为实现超级稻育秧播种过程按“穴粒数”播补种的思路,需要对播种钵体秧盘上每个穴位的种子数进行精确检测。传统的单一面积法和平均灰度值法虽然简单,但检测精度较低,无法准确识别每个穴位种子粒数,最终影响播种质量。考虑到种子单个连通区域的形状参数与粒数之间存在密切关系,提出一种基于改进形状因子的钵体秧盘播种质量检测方法。首先采用RGB加权法对彩色图像进行灰度化处理,Otsu分割阈值算法进行二值化,形态学算法进行去噪;再利用掩膜定位技术提取出秧盘中每个穴位内的种子图像并进行连通域检测,测量单个连通域的面积、周长、最小外接多边形面积等参数,计算出改进后的形状因子,结合单连通域面积大小,完成单个连通域种子0粒(含杂质)、1粒、2粒、3粒、4粒及以上情况的检测,并通过累加实现穴粒数的检测。实验结果表明,该方法对于单个连通域内种子数在0~3粒时识别准确率均达到95%以上,4粒以上种子的识别率达到90%;穴粒数的平均检测准确率均达到95%以上,每幅图像平均处理时间为0.518s,满足在线检测的需求,为后续播补种提供了参考依据。
To achieve super rice seeding according to the numbers of seeds per bunch, it requires precise detect the seeding quantity per bunch in the potted seeding tray. The traditional detection method based on the area and average gray has low detection precision, which could not accurately identify the number of seeds per bunch and reduce adult seedling rate. There is a close relationship between the shape features of seeds in single connected region and the seeding quantity. In this article, a method base on the improved shape factor was presented to detect the seeding quantity per bunch in the potted seedling tray. Firstly,the RGB weighting method was used to gray the color image, the Otsu algorithm was used to binary image processing, morphological filtering algorithm was used to remove the image noise. Secondly, the small image of seeds per punch in potted seedling tray was extracted by the masked location-based technology and the single connected region on' the small image was detected. Thirdly,the shape features of each seed were extracted, such as the area and perimeter of single connected region and area of the minimum enclosing circumscribing convex polygon. Then, the improved shape factor was computed according to shape features of each seed. Lastly, the improved shape factor and the area of single connected region were used to classify seed connected regions into cavity (including impurities), one particle, two particles, three particles, or four particles and above. After adding up the particles of each bunch, the seedling tray seeding quantity can be obtained. The result showed that the detection accuracy of the number of seeds between zero particle and three particles in every single connected region was up to 95% and the detection accuracy of the number of seeds more than four particles in every single connected region was up to 90%. The detection accuracy of the number of seeds in every bunch was up to 93%. Each image was processed less than 0. 518 seconds. It' s proved that the method of potted