From: Naeem on
"talal hammouri" <talalah(a)yahoo.com> wrote in message <gsjs6p$i1v$1(a)fred.mathworks.com>...
> Dear all,
>
> I have a problem of how to read 100 images from a folder in the desktop , would you please inform me of how to read these images using matlab code (i'm beginer of using MATLAB).


hey
i am facing the same problem, send the matlab code if u have one.
thanks
From: Steven Lord on

"Naeem " <nshayan(a)gmail.com> wrote in message
news:hosmna$qfp$1(a)fred.mathworks.com...
> "talal hammouri" <talalah(a)yahoo.com> wrote in message
> <gsjs6p$i1v$1(a)fred.mathworks.com>...
>> Dear all,
>>
>> I have a problem of how to read 100 images from a folder in the
>> desktop , would you please inform me of how to read these images using
>> matlab code (i'm beginer of using MATLAB).
>
>
> hey i am facing the same problem, send the matlab code if u have one.
> thanks

See question 4.12 in the newsgroup FAQ.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Naeem on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hosuq2$4lr$1(a)fred.mathworks.com>...
>
> "Naeem " <nshayan(a)gmail.com> wrote in message
> news:hosmna$qfp$1(a)fred.mathworks.com...
> > "talal hammouri" <talalah(a)yahoo.com> wrote in message
> > <gsjs6p$i1v$1(a)fred.mathworks.com>...
> >> Dear all,
> >>
> >> I have a problem of how to read 100 images from a folder in the
> >> desktop , would you please inform me of how to read these images using
> >> matlab code (i'm beginer of using MATLAB).
> >
> >
> > hey i am facing the same problem, send the matlab code if u have one.
> > thanks
>
> See question 4.12 in the newsgroup FAQ.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>
thanks Steve lord
i used the code given below to read and add noise to bmp files from a folder. now i want to write these files into a new folder under the same name like bus_0000.bmp, bus_0001.bmp, etc (or overwrite them).

bmpFiles = dir('*.bmp');
for k = 1:length(bmpFiles)
filename = bmpFiles(k).name;
data1 = imread(filename);
J = imnoise(data1,'gaussian',0,0.1);
end
From: Sadik on
Hi Naeem,

You can add a single more line to overwrite it, but it certainly is a better practice to make a new folder and save things there:

mkdir NoisyImages
bmpFiles = dir('*.bmp');
for k = 1:length(bmpFiles)
filename = bmpFiles(k).name;
data1 = imread(filename);
J = imnoise(data1,'gaussian',0,0.1);
imwrite(J,['NoisyImages\' filename]);
end

Best.
From: Naeem on
"Sadik " <sadik.hava(a)gmail.com> wrote in message <hov59o$r5p$1(a)fred.mathworks.com>...
> Hi Naeem,
>
> You can add a single more line to overwrite it, but it certainly is a better practice to make a new folder and save things there:
>
> mkdir NoisyImages
> bmpFiles = dir('*.bmp');
> for k = 1:length(bmpFiles)
> filename = bmpFiles(k).name;
> data1 = imread(filename);
> J = imnoise(data1,'gaussian',0,0.1);
> imwrite(J,['NoisyImages\' filename]);
> end
>
> Best.

thanks Sadik

it worked.