how to load and read image sequences in order in matlab

33 views (last 30 days)
Hi,
I have an image sequences in a folder. the images are named as: Image_time.tiff. how I can do to load and read in order my images.
look over my program:
files=dir('*.tiff');
for i=1:length(files);
I{i}=double(imread(files(i).name));
end
like this I read not in the correct order.
Thanks in advance

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 13 Feb 2014
Edited: Azzi Abdelmalek on 13 Feb 2014
d=dir('*.tif')
for i=1:numel(d)
im=imread(d(i).name);
I{i}=double(im);
end

Image Analyst
Image Analyst on 13 Feb 2014
What is the correct order? If your files are not returned by the operating system in the order you desire, you may have to sort them using sort() or manually using some parsing algorithm you devise.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!