Rules | Recent posts | topic RSS | Search | Register  | Log in

help in matlab read 100 image,resize 100 image, and store

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Author Message
intelnside



Joined: 06 Jun 2006
Posts: 44


Post12 Aug 2008 15:55   help in matlab read 100 image,resize 100 image, and store

any1 know the code of read 100 image in a time, and also resize it without repeating the same code ??

this is my code

clear all; close all
%source = 'C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code/';
destination = 'd:/';

A = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.1.bmp');
B = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.2.bmp');
C = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.3.bmp');
D = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.4.bmp');
E = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.5.bmp');
F = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.6.bmp');
G = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.7.bmp');
H = imread('C:\Users\Ruey Cherng\Documents\Turkey Bone image and wiener filter code\image\2.8.bmp');

A1 = imresize(A, [512 512]);
B1 = imresize(B, [512 512]);
C1 = imresize(C, [512 512]);
D1 = imresize(D, [512 512]);
E1 = imresize(E, [512 512]);
F1 = imresize(F, [512 512]);
G1 = imresize(G, [512 512]);
H1 = imresize(H, [512 512]);


name =strcat(num2str(I),'_filtered.bmp');
name= strcat(destination,name);
imwrite (A1,name,'bmp')
disp(sprintf('Denoised image stored in %s\n',name));

but the problem is i don't want to repeat the same which is wasting the space.
Back to top
lordsathish



Joined: 11 Feb 2006
Posts: 244
Helped: 26
Location: Asia


Post14 Aug 2008 5:20   Re: help in matlab read 100 image,resize 100 image, and stor

Hey is it possible to have 100 images in memory,
you got to read a set of images that your memory can hold,
resize them,then store them.
have to repeat this operations until you finish with all of the images.
I don't think you would be able to read all of the images at the same time...
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post14 Aug 2008 14:41   Re: help in matlab read 100 image,resize 100 image, and stor

i have wrote some code , i would able to store the image in a big array but i cant call out the image to resize it, would u able to help me?

clear all;close all

source = 'F:\;
destination = 'd:/';
number =8;

for I = 1:number,
name =strcat(num2str(I),'.bmp');
name = strcat(source,name);
disp(sprintf('Reading Image %s ...',name));
image= imread(name);
[csx csy]=size(image);

for j=1:csx,
for k=1:csy,
coeffimage(j,k,I)=image(j,k);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
this below code is call out the image that i stored and resize it, but i got problem, so could you help me to fix it?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for I = 1:number,
for j = 1:csx,
for k = 1:csy,
if (j==csx)&&(k==csy)&&(I==1)
IR1=imresize(coeffimage(j,k,I),[512 512]);
end
end
end
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap