LLNet模型实现:基于Matlab的图像格式转换用于训练数据准备
发布时间
阅读量:
阅读量
1. 背景
核心目标在于对LLNet模型论文中所采用的PGM格式图像数据实施相应的处理与转换操作
2. 代码实现
function converTool(fromDir, fromFormat, toDir, toFormat, toPrefix)
% Inputs:
% fromDir: 输入的文件目录
% fromFormat: 输入的文件格式
% toDir: 保存文件的目录,层数同fromDir
% toFormat: 保存文件的格式
% toPrefix: 保存文件的前缀
% Author: HSW
% Date: 2018-05-05
filePaths = searchRoot(fromDir, fromFormat);
if ~exist(toDir, 'dir')
mkdir(toDir)
end
dirLen = length(fromDir);
fileCnt = length(filePaths);
for idx = 1 : fileCnt
filePath = filePaths{idx};
idxs = strfi
全部评论 (0)
还没有任何评论哟~
