how to run all the images from a particular folder at a time ?
1 view (last 30 days)
Show older comments
Iam new to matlab.Iam working with a project realted to iris recognition.So for testing the Database i need to run whole database at a time.I need scripts to run the whole images from a particular folder at a time.I need help..!!!
0 Comments
Accepted Answer
Joseph Cheng
on 8 Apr 2014
you can get the listing for all the images in a folder by using imageFiles = dir('*.imageExtension');
imageFiles will be a structure that contains all the image file names in imageFiles(i).name.
2 Comments
Joseph Cheng
on 8 Apr 2014
you would write a for loop that cycles through the structure.
for i =1:length(imageFiles)
filepath = [folder '\' imageFiles(i).name];
[template mask]=createiristemplate(filepath);
end
I'll leave it to you to store the template and mask as i do not know the shape of the output of your createiristemplate.
however you could use structures.
DATA(i).name = imageFiles(i).name;
[DATA(i).template DATA(i).mask]=createiristemplate(filepath);
and store the data that way.
More Answers (1)
Image Analyst
on 8 Apr 2014
See FAQ for code examples: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!