关于膨胀和腐蚀的概念请参考:

https://blog.csdn.net/Ibelievesunshine/article/details/100522440

close all;clear all;clc;
I = imread('rice.png');
se = strel('square',2);
J = imdilate(I,se);
K = imerode(I,se);
L = J-K;
figure;
subplot(121);imshow(I);
subplot(122);imshow(L);title('图像边缘');

 

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐