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
CodePudding user response:
Train a model of object detection: You can train some model like object detection (YOLOv5) or some other and calculate the count.
CodePudding user response:
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.