matlab边缘检测代码(包含roberts,sobel,prewitt三种算子)
2011-11-03 12:00
567 查看
代码
I=a;
BW1=edge(I,'roberts');
[BW1,thresh1]=edge(I,'roberts');
figure;
%subplot(1,2,1);
imshow(BW1);
BW1=edge(I,'roberts',0.05);
figure;
%subplot(1,2,2);
imshow(BW1);
BW2=edge(I,'sobel');
figure;
%subplot(1,3,1);
imshow(BW2);
[BW2,thresh2]=edge(I,'sobel');
BW2=edge(I,'roberts',0.05,'horizontal');
figure;
%subplot(1,3,2);
imshow(BW2);
BW2=edge(I,'roberts',0.05,'vertical');
%subplot(1,3,3);
imshow(BW2);
BW3=edge(I,'prewitt');
figure;
subplot(1,3,1);imshow(BW3);
[BW3,thresh3]=edge(I,'prewitt');
BW3=edge(I,'roberts',0.05,'horizontal');
subplot(1,3,2);imshow(BW3);
BW3=edge(I,'prewitt',0.05,'vertical');
subplot(1,3,3);imshow(BW3);
效果如下
原图:
边缘检测:
I=a;
BW1=edge(I,'roberts');
[BW1,thresh1]=edge(I,'roberts');
figure;
%subplot(1,2,1);
imshow(BW1);
BW1=edge(I,'roberts',0.05);
figure;
%subplot(1,2,2);
imshow(BW1);
BW2=edge(I,'sobel');
figure;
%subplot(1,3,1);
imshow(BW2);
[BW2,thresh2]=edge(I,'sobel');
BW2=edge(I,'roberts',0.05,'horizontal');
figure;
%subplot(1,3,2);
imshow(BW2);
BW2=edge(I,'roberts',0.05,'vertical');
%subplot(1,3,3);
imshow(BW2);
BW3=edge(I,'prewitt');
figure;
subplot(1,3,1);imshow(BW3);
[BW3,thresh3]=edge(I,'prewitt');
BW3=edge(I,'roberts',0.05,'horizontal');
subplot(1,3,2);imshow(BW3);
BW3=edge(I,'prewitt',0.05,'vertical');
subplot(1,3,3);imshow(BW3);
效果如下
原图:
边缘检测:
相关文章推荐
- 使用roberts Prewitt Sobel 三种算子对raw格式图像进行边缘检测
- 几种边缘检测算子的比较Roberts,Sobel,Prewitt,LOG,Canny
- 13. 用Roberts、Sobel、Prewitt和Laplace算子对一幅灰度图像进行边缘检测。观察异同。
- 边缘检测类(包括Roberts, Sobel, Prewitt, Kirsch等算子的边缘检测算法) - wtuyzh的专栏 - CSDNBlog
- [ZZ] 边缘检测 梯度与Roberts、Prewitt、Sobel、Lapacian算子
- 图像梯度特征的常用边缘检测算子:Sobel、Prewitt、Roberts
- OpenCV环境下Laplace(拉普拉斯)和Roberts基本边缘检测算子的实现代码
- OpenCV2马拉松第14圈——边缘检测(Sobel,prewitt,roberts)
- unity3d shader之Roberts,Sobel,Canny 三种边缘检测方法
- 边缘检测算子的MATLAB代码
- matlab sobel canny prewitt 边缘检测算子
- unity3d shader之Roberts,Sobel,Canny 三种边缘检测方法
- 图像边缘检测与边缘增强处理——(Roberts、prewitt、sobel)
- Unity之梯度应用实现Roberts、Prewitt、Sobel边缘检测
- 边缘检测的各种微分算子比较(Sobel,Robert,Prewitt,Laplacian,Canny)
- Sobel边缘检测(matlab)
- 图像处理中各种边缘检测的微分算子简单比较(Sobel,Robert, Prewitt,Laplacian,Canny)
- 图像处理中各种边缘检测的微分算子简单比较(Sobel,Robert, Prewitt,Laplacian,Canny)
- delphi FMX图像简单的边缘检测(sobel、prewitt、robert)
- Opencv图像识别从零到精通(19)----Robert,prewitt,Sobel边缘检测