图像的平移及代码实现
如何使用MATLAB实现一个图像的平移呢?
f = imread(‘C:\Users\lenovo\Pictures\butterfly.jpg’);
se=translate(strel(1),[180 190]);
b=imdilate(f,se);
figure;
subplot(1,2,1);
subimage(f);
title(‘原图像’);
subplot(1,2,2);
subimage(b);
title(‘平移后图像’);
效果如下: