intelnside
Member level 2
matlab image resize
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.
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.