Image processing

8 views (last 30 days)
Fish Out Of Water :D
Fish Out Of Water :D on 7 Oct 2011
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 !

Answers (1)

Walter Roberson
Walter Roberson on 7 Oct 2011
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 ?

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!