简体   繁体   English

如何在不将它们相互合并的情况下检测此图像中具有白色背景的所有对象?

[英]How can I detect all objects in this image with a white background without merging them with each other?

My goal is to separate all the objects from each other.我的目标是将所有对象彼此分开。 After that I could use blob or detection so that I can measure the area of each one to make a Histogram with the size distribution of the objects.之后,我可以使用 blob 或检测,以便我可以测量每个区域的面积,以制作包含对象大小分布的直方图。

Original image:原图:

原始图像

The problem is that the objects are merging with each other, mainly due to their shadow and/or their proximity to each other.问题是对象彼此合并,主要是由于它们的阴影和/或它们彼此接近。

Final results - bounding box:最终结果 - 边界框:

最终结果 - 边界框

Binary image:二进制图像:

二进制图像

I have tried canny edge detection, holistically-nested-edge-detection, and still having this issue.我已经尝试过精明的边缘检测,整体嵌套边缘检测,但仍然存在这个问题。 What can I do to fix it?我能做些什么来修复它?

you can get the box coordinates for each detection and extract the detect image based on those coordinates and then apply your filter.您可以获取每个检测的框坐标并根据这些坐标提取检测图像,然后应用您的过滤器。

Check out this post on region of interest https://stackoverflow.com/a/58211775/14770223查看感兴趣区域https://stackoverflow.com/a/58211775/14770223上的这篇文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM