fileFolder = fullfile('E:\tom\mat');
dirOutput = dir(fullfile(fileFolder,'image*.jpg'));
fileNames = {dirOutput.name}'
I = imread(fileNames{1});
imshow(I);
出现了这样的错误:
Error using imread
File "exp.jpg" does not exist.
正确的表达应该是这样的吧
I = imread(fullfile(fileFolder,fileNames{1}));
参考文章:(英文)
http://blogs.mathworks.com/steve/2011/12/23/batch-processing-files-in-another-folder/?s_tid=blog_steve_category
http://mathforum.org/kb/thread.jspa?messageID=7003882&threadID=2050246
事实上在那个文件夹下明明就有图片,为什么会出现不存在的提示呢
很急啦!!!明天来找答案,拜托各位了