edge
查找二维灰度图像中的边缘
语法
说明
示例
输入参数
输出参数
算法
对于梯度幅值边缘检测方法(Sobel、Prewitt 和 Roberts),
edge
使用threshold
作为计算所得梯度幅值的阈值。对于过零方法,包括高斯拉普拉斯,
edge
使用threshold
作为过零的阈值。换言之,较大的过零跳跃被视为边缘,而较小的过零跳跃不是。Canny 方法对梯度应用两个阈值:具有低边缘敏感度的上阈值和具有高边缘敏感度的下阈值。
edge
在低敏感度结果的基础上进行扩展,以包含高敏感度结果中连通的边缘像素。这有助于填补检测到的边缘中的间断。在所有情况下,
edge
都根据输入数据启发式地选择默认阈值。更改阈值的最佳方法是运行一次edge
,捕获计算出的阈值作为第二个输出参数。然后,从edge
计算的值开始,调高阈值以检测更少的边缘像素,或调低阈值以检测更多的边缘像素。
参考
[1] Canny, John, "A Computational Approach to Edge Detection," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. PAMI-8, No. 6, 1986, pp. 679-698.
[2] Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs, NJ, Prentice Hall, 1990, pp. 478-488.
[3] Parker, James R., Algorithms for Image Processing and Computer Vision, New York, John Wiley & Sons, Inc., 1997, pp. 23-29.
扩展功能
版本历史记录
在 R2006a 之前推出另请参阅
edge3
| fspecial
| imgradient
| imgradientxy