我如何找到此图像中的谷物数量?

发布于 2025-02-02 22:43:52 字数 221 浏览 2 评论 0原文

我正在研究一个项目,我需要确定图片中的谷物数量,其中几个谷物接触,重叠。有人可以帮我吗?非常感谢 “在此处输入图像描述”

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 lotenter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

怀中猫帐中妖 2025-02-09 22:43:52

训练对象检测模型:您可以训练一些模型,例如对象检测(Yolov5)或其他一些模型并计算计数。

Train a model of object detection: You can train some model like object detection (YOLOv5) or some other and calculate the count.

携余温的黄昏 2025-02-09 22:43:52

这是一个非常广泛的问题,所以我会给您一个广泛的答案,您可以训练计算机视觉模型,或者您可以使用开放式简历使用简单的图像处理:

  • 了解颜色阈值:所有不是颜色的一切谷物变成黑色像素,其他一切都变成了白色像素。

  • 了解形态学,断开连接的谷物。

  • 在涂黑的图像中获取白色对象的轮廓数。

所有这些都是简单的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.

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