首页 > 其他 > 详细

MATLAB 进行五种边缘检测

时间:2018-10-30 16:31:56      阅读:190      评论:0      收藏:0      [点我收藏+]
自定义函数:
function []=edge_detect(image_name)
a=imread(image_name);
I=rgb2gray(a);

BW1=edge(I,Roberts,0.16);
BW2=edge(I,Sobel,0.16);
BW3=edge(I,Prewitt,0.06);
BW4=edge(I,LOG,0.012); 
BW5=edge(I,Canny,0.12);

figure(Name,进行五种边缘检测);
subplot(2,3,1);imshow(I);title(原图);
subplot(2,3,2);imshow(BW1);title(Robert算子边缘检测)
subplot(2,3,3);imshow(BW2);title(Sobel算子边缘检测)
subplot(2,3,4);imshow(BW3);title(Prewitt算子边缘检测);
subplot(2,3,5);imshow(BW4);title(LOG算子边缘检测);
subplot(2,3,6);imshow(BW5);title(Canny边缘检测);

 

 

MATLAB 进行五种边缘检测

原文:https://www.cnblogs.com/junjunjun123/p/9876688.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!