我如何找到此图像中的谷物数量?
I'm working on a project and I need to identify the number of grains in pictures with several of these grains touching, overlapping. Can someone help me with this ? Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
训练对象检测模型:您可以训练一些模型,例如对象检测(Yolov5)或其他一些模型并计算计数。
Train a model of object detection: You can train some model like object detection (YOLOv5) or some other and calculate the count.
这是一个非常广泛的问题,所以我会给您一个广泛的答案,您可以训练计算机视觉模型,或者您可以使用开放式简历使用简单的图像处理:
了解颜色阈值:所有不是颜色的一切谷物变成黑色像素,其他一切都变成了白色像素。
了解形态学,断开连接的谷物。
在涂黑的图像中获取白色对象的轮廓数。
所有这些都是简单的Google搜索,可以实现您想要的东西。使用开放的简历。
This is a very broad question so I will give you a broad answer, you could train a computer vision model, or you could use simple image processing using open cv:
Learn about color threshholding: everything that is not the color of the grain becomes a black pixel, everything else becomes a white pixel.
Learn about MorphologyEx, to disconnect connected grains.
Get the numbers of contours of white objects in the blacked out image.
All of those are simple google searches that will achieve what you desire. Using open CV.