clear
close all
Input = imread('Flower.jpg');
figure
subplot(2,3,1);
imshow(Input);
m = 1024;
s = num2str(m);
xlabel(s);
for i = 1:5,
m = m/2;
J=Input(1:2^i:size(Input,1),1:2^i:size(Input,2));
subplot(2,3,i+1);
imshow(J);
s = num2str(m);
xlabel(s);
end;
gtext('using code');
% sampling using imresize()
m=1024;
scale=[512 256 128 64 32]
figure;
subplot(2,3,1);
imshow(Input);
s=num2str(m);
xlabel(s);
for i = 1:5
m=m/2;
subplot(2,3,i+1);
imshow(imresize(Input,[scale(i) scale(i)]));
s=num2str(m);
xlabel(s);
end
gtext('using built-in function');
OUTPUT RESULT :
Sampling using Code
No comments:
Post a Comment