边缘检测技术

发布于 2024-10-08 12:14:08 字数 100 浏览 1 评论 0原文

有谁知道边缘检测算法中的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灼痛 2024-10-15 12:14:09

拉普拉斯算子是二阶导数算子,另外两个是一阶导数算子,因此它们用于不同的情况。 Sobel/Prewitt 测量斜率,而拉普拉斯测量斜率的变化。

示例:

如果您有一个具有恒定斜率(梯度)的信号:

Gradient signal: 1 2 3 4 5 6 7 8 9

一阶导数滤波器 (Sobel/Prewitt) 将测量斜率,因此滤波器响应

Sobel result:      2 2 2 2 2 2 2 

为 对于该信号,拉佩斯滤波器的结果为 0,因为斜率是恒定的。

示例 2:如果有边缘信号:

Edge:            0 0 0 0 1 1 1 1 

sobel 滤波器结果有一个峰值;峰值的符号取决于边缘的方向:

Sobel result:    0 0 0 1 1 0 0 0

拉普拉斯滤波器产生两个峰值;边缘的位置与拉普拉斯滤波器结果的零交叉相对应:

Laplace result:  0 0 0 1 -1 0 0 0

因此,如果您想知道 和 边缘的方向,您可以使用一阶导数滤波器。此外,拉普拉斯滤波器比索贝尔或普鲁伊特对噪声更敏感。

另一方面,Sobel 滤波器和 Prewitt 滤波器非常相似,并且用于相同的目的。一阶导数滤波器之间的重要区别是

  • 对噪声的敏感性
  • 各向异性:理想情况下,X/Y 的滤波器结果应与 sin αcos α 成正比,其中 α 是梯度的角度,并且每个角度的两个平方和应该相同。
  • 拐角处的行为

这些属性可以通过人工测试图像来测量(例如著名的 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):

Gradient signal: 1 2 3 4 5 6 7 8 9

a 1st derivative filter (Sobel/Prewitt) will measure the slope, so the filter response is

Sobel result:      2 2 2 2 2 2 2 

The result of a lapace filter is 0 for this signal, because the slope is constant.

Example 2: If you have an edge signal:

Edge:            0 0 0 0 1 1 1 1 

The sobel filter result has one peak; the sign of the peak depends on the direction of the edge:

Sobel result:    0 0 0 1 1 0 0 0

The laplace filter produces two peaks; the location of the edge corresponds with the zero crossing of the laplace filter result:

Laplace result:  0 0 0 1 -1 0 0 0

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

  • Sensitivity to noise
  • Anisotropy: Ideally, the filter results for X/Y should be proportional to sin α and cos α, where α is the angle of the gradient, and the sum of the two squares should be the same for every angle.
  • Behavior at corners

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文