matlab学习笔记(十)---边缘检测

来源:互联网 发布:红外枪型网络摄像机 编辑:程序博客网 时间:2024/05/29 05:09

分别采用roberts、sobel、prewitt、canny、log算子来检测图像的边缘并比较

I=imread('rice.png');B1=edge(I,'roberts');B2=edge(I,'sobel');B3=edge(I,'prewitt');B4=edge(I,'canny');B5=edge(I,'log');subplot(231),imshow(I),title('原始图像');subplot(232),imshow(B1),title('roberts算子图像');subplot(233),imshow(B2),title('sobel算子图像');subplot(234),imshow(B3),title('prewitt算子图像');subplot(235),imshow(B4),title('canny算子图像');subplot(236),imshow(B5),title('log算子图像');
效果图如下:



图像处理中各种边缘检测的微分算子简单比较(Sobel,Robert, Prewitt,Laplacian,Canny)

0 0