Image processing

1 次查看(过去 30 天)
Fish Out Of Water :D
p ='C:\MATLAB\R2010b';
fn = dir(fullfile(p,'*.jpeg'));
trh = 0.1;
for i = 1:length(fn)
a = imread ( 'C:\MATLAB\R2010b',jpeg);
imwrite(im7,['C:\MATLAB\R2010b\New folder','C:\MATLAB\R2010b']);
procImage([p '\' fn(i).name],trh);
end;
// procImage is my function
Hi this is the code i've tried to write out.... I'm finding a method to save the batch of image that i've processed in the function as stated.
imwrite did not allow me save the image.
ARIGATO FOR THE HELP !

回答(1 个)

Walter Roberson
Walter Roberson 2011-10-7
p ='C:\MATLAB\R2010b';
q ='C:\MATLAB\R2010b\New folder';
fn = dir(fullfile(p,'*.jpeg'));
trh = 0.1;
for i = 1:length(fn)
jpeg = fn(i).name;
fullinputname = fullfile(p,jpeg);
fulloutputname = fullfile(q,jpeg);
[im7, im7map] = imread(fullinputname);
imwrite(im7,im7map, q);
procImage(fullinputname, trh);
end;
It is, though, not clear why you do not just copy the files to the new directory, cd() to it, and process the images there ?

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by