Mp=floor(size(picture,1)*f);
Np=floor(size(picture,2)*f);
smallimage(:,:,1)=zeros(Mp-1,Np-1);
smallimage(:,:,2)=zeros(Mp-1,Np-1);
smallimage(:,:,3)=zeros(Mp-1,Np-1);
for i=1:(Mp-1);
for j=1:(Np-1);
a=round(i/f);
b=round(j/f);
smallimage(i,j,:)=picture(a,b,:);
end;
end;
endfunction;
Original size(109 200 3)
From Assignment 7 Method 2 (f=0.75)
size ( 80 149 3)
f(1.25)
size(99 198 3)
From Assignment 7 Method 2 (f=0.25)
size (26 49 3)
size(51 97 3)
From Assignment 7 Method 2 (f=0.1)
size (9 19 3)
(f=2)
size( 17 37 3 )
From Assignment 7 Method 2 (f=0.75)
Original size (151 160 3)
size ( 112 119 3)
(f=1.25)
size (139 147 3)
From Assignment 7 Method 2 (f=0.25)size( 36 39 3)
From Assignment 7 Method 2 (f=0.1)
size(14 15 3)
(f=2)size( 27 29 3)
Original size(157 160 3)
From Assignment 7 Method 2 picture 2(f=0.75)
size(116 119 3)
From Assignment 7 Method 2 picture 2(f=0.25)
size ( 75 77 3)
No comments:
Post a Comment