File switching in matlab??

Status
Not open for further replies.

bt87

Junior Member level 3
Joined
May 25, 2008
Messages
30
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,457
i want to compare a image with other images in folder can any body tell me how can i do this??
only thing i wanna know is who to switch from one image to next??
plz...
thanks in advnce..
 

I = imread('image.jpg');
files = dir('test\*.jpg');

for i=1:size(files,1);
img = imread(files(i).name)

% Do comparison here

end

If the first image and the ones that you'll be comparing against are in the same folder than you can check for the file name inside the loop.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…