Resumen
Cereal grains are a vital part of the human diet. The appearance quality and size distribution of cereal grains play major roles as deciders or indicators of market acceptability, storage stability, and breeding. Computer vision is popular in completing quality assessment and size analysis tasks, in which an accurate instance segmentation is a key step to guaranteeing the smooth completion of tasks. This study proposes a fast deployable instance segmentation method based on a generative marker-based watershed segmentation algorithm, which combines two strategies (one strategy for optimizing kernel areas and another for comprehensive segmentation) to overcome the problems of over-segmentation and under-segmentation for images with dense and small targets. Results show that the average segmentation accuracy of our method reaches 98.73%, which is significantly higher than the marker-based watershed segmentation algorithm (82.98%). To further verify the engineering practicality of our method, we count the size distribution of segmented cereal grains. The results keep a high degree of consistency with the manually sketched ground truth. Moreover, our proposed algorithm framework can be used as a great reference in other segmentation tasks of dense targets.