基于matlab的经典图像边缘检测算法
图像边缘检测算法 (1)Robert算子边缘检测 (2)Sobel算子边缘检测 (3)Prewitt算子边缘检测 (4)LOG算子边缘检测 (5)Canny边缘检测 Matlab的实现。 其实还只是掉包侠,一点算法没有写 争取有空用openCV写一遍 I=imread('1.jpg'); I0=rgb2gray(I); subplot(231); imshow(I); BW1=edge(I0,'Roberts',0.16); subplot(232); imshow(BW1); title('Robert算子边缘检测') BW2=edge(I0,'Sobel',0.16); subplot(233); imshow(BW2); title('Sobel算子边缘检测') BW3=edge(I0,'Prewitt',0.16); subplot(234); imshow(BW3); title('Prewitt算子边缘检测'); BW4=edge(I0,'LOG',0.012); subplot(235); imshow(BW4); title('LOG算子边缘检测') BW5=edge(I0,'Canny',0.2); subplot(236); imshow(BW5); title('Canny算子边缘检测') 来源: https://www.cnblogs.com