Thread Subject: Read image fromsequence of folders

Subject: Read image fromsequence of folders

From: Smith S

Date: 18 Oct, 2008 07:31:01

Message: 1 of 3

Hi anyone help me how to read and process image files in the sequence of folder like folder1 has 5 files and folder2 has 5 files and folder3 has 5 files and so on continously like a sequence.this will be helpful for training the database.

Subject: Read image fromsequence of folders

From: Piter_

Date: 18 Oct, 2008 10:38:58

Message: 2 of 3

On Oct 18, 10:31=A0am, "Smith S" <x...@yahoo.com> wrote:
> Hi anyone help me how to read and process image files in the sequence of =
folder like folder1 has 5 files and folder2 has 5 files and folder3 has 5 f=
iles and so on continously like a sequence.this will be helpful for trainin=
g the database.

I don't know what kind of image and how you read them, but to load in
sequence I use "for loop".
if files differ in names like file_name.1 file_name.1 file_name.3....
path_folder=3D['path/folder1/'; 'path/folder2/'; 'path/folder3/';];

for i=3D1:length(path_folder(:,1))

     for u=3D1:5
         cd(path_folder(i))
         file_name=3D['file_name.' num2str(i)];
         eval([a ' num2str(i) num2str(u)
'=3Dcommand_to_load_image(filename)'];
end
end

You can play with output of dir (or ls) command if files don't have
pattern in names.

Hope it helps
Best.
Petro.

Subject: Read image fromsequence of folders

From: Bruno Luong

Date: 18 Oct, 2008 12:20:04

Message: 3 of 3

Piter_ <x.piter@gmail.com> wrote in message <2be4f27f-d0a8-454b-b92b-e9a5440373fa@e2g2000hsh.googlegroups.com>...

> eval([a ' num2str(i) num2str(u)
> '=3Dcommand_to_load_image(filename)'];

Do we really need call for this ugly EVAL?

Why not using cell or struct to store the list of things of different kinds and sizes?

Bruno

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
loop folder Smith S 18 Oct, 2008 03:35:03
rssFeed for this Thread

Contact us at files@mathworks.com