jingweimo的个人博客分享 http://blog.sciencenet.cn/u/jingweimo

博文

Revisit to Canny Edge Detector

已有 2306 次阅读 2017-11-27 02:38 |系统分类:科研笔记

Principles

According to Canny (1986), three criteria for edge detection are;

1. Low error rate of detection. It should detect all edges, and nothing but edges.

2. Localization. The distance between actual and detected edges in the image is to be minimized

3. Single response. It should not return multiple edge pixels when only a single edge exists.

The best filter for begining the detection is a Gaussian filter for smoothing, followed by the derivative of the Gaussian for gradient computation.

Comments:

(1) It is more computationally efficient to apply a column/row Gaussian filter than a 2D filter

(2) In non-maximum suppression, the comparison is made between the (center) pixel under investigation and its two neighboring pixels along the given gradient direction. The two pixels are calculated from linear interpolation, i.e., by taking the weighted average of the two relevent adjacent pixels.

(3) And the current pixel is kept as a (strong) edge pixel only when it is greater in gradient magnitude than its two neighbors.

(4) The Canny edge detector is probably the most complex of the edge detector, but it is not the last word in edge detection (See: http://ieeexplore.ieee.org/abstract/document/6975234/)


Implementation example

%self-defined function cannyEdge.m

sigma = [1,2,4,6,8,10,12,15,20];
figure
for ii = 1:9
   bw2 = cannyEdge(mat2gray(ac.*bw),sigma(ii));
   subplot(3,3,ii); imshow(bw2); title(['Sigma=',num2str(sigma(ii))]);
end


Reference:

J. Canny, “A computational approach to edge detection,” IEEE Trans. Pattern Anal. Mach. Intell., vol. PAMI-8, no. 6, pp. 679–698, 1986.



https://wap.sciencenet.cn/blog-578676-1086982.html

上一篇:Hough circle detection
下一篇:Build Qt and Configure Opencv with VS2015
收藏 IP: 68.48.108.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-14 12:12

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部