Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e2g2000hsh.googlegroups.com!not-for-mail
From: Piter_ <x.piter@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Read image fromsequence of folders
Date: Sat, 18 Oct 2008 03:38:58 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <2be4f27f-d0a8-454b-b92b-e9a5440373fa@e2g2000hsh.googlegroups.com>
References: <gdc3bl$7hq$1@fred.mathworks.com>
NNTP-Posting-Host: 160.114.60.28
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1224326339 1779 127.0.0.1 (18 Oct 2008 10:38:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 18 Oct 2008 10:38:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e2g2000hsh.googlegroups.com; posting-host=160.114.60.28; 
	posting-account=pb0hQAoAAABVqyKNcUUOA7evFo2gXQAA
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) 
	Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:495942


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.