Matlab中没有直接用于图像平移的函数,代码是基于灰度形态学的图像平移实现

%图像平移
A=imread('example.jpg');
%translate(SE, [y x])在结构元素SE上进行y和x方向的位移 正数对应右移和下移
se=translate(strel(1),[100 80]);
B=imdilate(A,se);%形态学膨胀
figure;
subplot(1,2,1),subimage(A);
title('原图像')
subplot(1,2,2),subimage(B);
title('图像平移')

结果如下
Matlab中图像平移的实现

相关文章:

  • 2022-01-07
  • 2021-08-09
  • 2022-12-23
  • 2021-08-29
  • 2022-01-07
  • 2022-01-07
  • 2021-05-24
猜你喜欢
  • 2021-11-28
  • 2021-05-26
  • 2022-01-07
  • 2021-07-14
  • 2021-11-23
  • 2021-11-23
相关资源
相似解决方案