function soccer()
% Example for the usage of interp2
% Bicubic smoothing of an image
src = imread('soccer_src.jpg');
size(src)
[x,y] = meshgrid(1:64);
[xi,yi] = meshgrid(1:0.1:64);
for k = 1:3
soccer_cub(:,:,k) = ...
interp2(x,y,double(src(:,:,k)),xi,yi,'cubic');
end
subplot(1,2,1);
image(src);
axis square;
subplot(1,2,2);
image(uint8(soccer_cub));
axis square;
评论0