边缘检测技术
有谁知道边缘检测算法中的 Prewitt、Sobel 和 Laplacian 算子有什么区别?
有些人比其他人更好吗?
不同的情况下是否使用不同的运算符?
Does anyone know what the differences between the Prewitt, Sobel and Laplacian operators in edge detection algorithms?
Are some better than others?
Are different operators used in different situations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
拉普拉斯算子是二阶导数算子,另外两个是一阶导数算子,因此它们用于不同的情况。 Sobel/Prewitt 测量斜率,而拉普拉斯测量斜率的变化。
示例:
如果您有一个具有恒定斜率(梯度)的信号:
一阶导数滤波器 (Sobel/Prewitt) 将测量斜率,因此滤波器响应
为 对于该信号,拉佩斯滤波器的结果为 0,因为斜率是恒定的。
示例 2:如果有边缘信号:
sobel 滤波器结果有一个峰值;峰值的符号取决于边缘的方向:
拉普拉斯滤波器产生两个峰值;边缘的位置与拉普拉斯滤波器结果的零交叉相对应:
因此,如果您想知道 和 边缘的方向,您可以使用一阶导数滤波器。此外,拉普拉斯滤波器比索贝尔或普鲁伊特对噪声更敏感。
另一方面,Sobel 滤波器和 Prewitt 滤波器非常相似,并且用于相同的目的。一阶导数滤波器之间的重要区别是
这些属性可以通过人工测试图像来测量(例如著名的 Jähne 测试模式,位于 Bern Jähne 的“图像处理”)。不幸的是,我在那本书中没有找到任何关于普鲁伊特算子的内容,所以你必须自己做实验。
最后,这些属性之间总是需要权衡,其中哪个更重要取决于应用程序。
The laplace operator is a 2nd order derivative operator, the other two are 1st order derivative operators, so they're used in different situations. Sobel/Prewitt measure the slope while the Laplacian measures the change of the slope.
Examples:
If you have a signal with a constant slope (a gradient):
a 1st derivative filter (Sobel/Prewitt) will measure the slope, so the filter response is
The result of a lapace filter is 0 for this signal, because the slope is constant.
Example 2: If you have an edge signal:
The sobel filter result has one peak; the sign of the peak depends on the direction of the edge:
The laplace filter produces two peaks; the location of the edge corresponds with the zero crossing of the laplace filter result:
So if you want to know the direction of and edge, you'd use a 1st order derivative filter. Also, a Laplace filter is more sensitive to noise than Sobel or Prewitt.
Sobel and Prewitt filters on the other hand are quite similar and are used for the same purposes. Important differences between 1st order derivative filters are
These properties can be measured with artificial test images (like the famous Jähne test patterns, found in "Image Processing" by Bern Jähne). Unfortunately, I didn't find anything about the Prewitt operator in that book, so you'd have to do your own experiments.
In the end, there's always a trade-off between these properties, and which of them is more important depends on the application.