Tuesday, June 10, 2008

Assignment 8 question 5



function [ im ] = shrinkpaste( pic,k ,f)
im = pic;
temp = pic;
Np = size(pic,1);
Mp = size(pic,2);
for i = 1:k
temp = shrink(temp,f);
n = size(temp,1);
m = size(temp,2);
stn = round(Np/2 - n/2);
stm = round(Mp/2 - m/2);
im(stn:stn+n-1,stm:stm+m-1,:)=temp;
end
end
>> imshow(shrinkpaste(start,4,0.75))

No comments: