如何测量边缘检测图像中的边缘长度?
我想通过使用图像处理边缘检测技术来计算仓库中的箱子数量。所以我使用Sobel算法来检测边缘。现在我需要测量边长。有谁知道如何获得边缘长度以及任何合适的算法来获得最终计数?
I want to get the boxes count in a warehouse by using image processing edge detection techniques. So I used Sobel algorithm to detect edges. Now I need to measure the edge length. Does anyone know how to get length of edges and any suitable algorithm to get final count ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以考虑使用 Canny Edge Detector 来提取边缘。所有边缘点的宽度均为一个像素。然后,您可以提取边缘点的连通分量并计算每个连通分量中有多少个像素。
You can consider using Canny Edge Detector that extracts edges. All edge points have the width of one pixel. Then you can extract the connected components of edge points and count how many pixels are in each connected component.
您应该考虑使用霍夫变换来识别框。然而,基本变换不会明确地给出特定盒子的边长,但这将是一个很好的起点。
看看 Piled 的本地化通过霍夫变换的盒子。
You should consider using the Hough transform for identifying the boxes. The basic transform won't explicitly give you the length of the side of a particular box however, but it would be a good starting point.
Take a look at Localization of Piled Boxes by Means of the Hough Transform.