基于分水岭和凸包理论的自然场景下未成熟苹果直径测量方法

    Diameter measurement method for immature apple based on watershed and convex hull theory

    • 摘要: 针对自然场景下生长期内树上未成熟果实的自动探测与大小计算问题,提出了一种基于改进分水岭和凸包理论的自然场景下未成熟苹果识别与直径计算方法。该方法首先对灰度图像进行形态学重构后进行边缘检测,再利用合并局部极小值点分水岭分割方法从粘连区域中提取目标果实,并结合基于凸包理论的真轮廓提取和圆拟合方法,实现目标果实圆拟合直径的自动测量。计算结果与人工测量结果进行对比试验,结果表明:在不考虑扁平型目标果的情况下,该方法的直径计算均方根误差最小值为1.91 mm,均值为2.27 mm,误差范围在品质评定等级差(5 mm)以内,具有较好的推广应用价值。研究结果为生长期内果实的大小监测提供参考。

       

      Abstract: Abstract: In agriculture field, the knowledge about the size of immature fruit in its growing period could be helpful to the aspects such as precision fertilization and irrigation, training and pruning, yield estimation and harvest stage determination. Thus, it can improve the fruit yield and quality. However, the most important premise is the fruit detection and the size calculation in natural condition. The color of fruits on tree is very similar with their surrounding objects, so that the recognition and size calculation is very difficult in natural condition. This paper proposed an algorithm of diameter measurement for immature apple based on the morphological reconstruction, the watershed and convex hull theory. Firstly, the images were acquired using the JV205 cameras which were installed in front of the apple trees with the distance of about 1-2 m, whose resolution was 4 608 pixels × 3456 pixels; and acquisition time was from June 1th, 2014 to September 30th, 2014. Before preprocessing, the images were cropped into 1400 pixels × 1100 pixels to get the scope of the target apples. In order to enhance the visibility of the target area, the morphological reconstruction operation was used before the edge detection. Secondly, the rough contour of target fruit was extracted by the dilation and erosion operation using micro-disk structure element with a radius of two pixels. After the above image preprocessing, excessive local minimum points, which were caused by occluded leaves and uneven illumination, were merged using the bresenham algorithm. And then the overlapping target fruits were segmented by distance transform and improved watershed algorithm. Later, the contours of segmented target region were tracked and the continuous smooth contour curve was extracted using convex hull on the edge of the segmentation images. Finally, the entire circle was reconstructed using the three different points on the reserved true target contour based on the circle feature principle. Thus, the center and radius parameters were estimated and the precise detection of target fruit was realized. In order to verify the algorithm accuracy, a total of 4 typical target apples and 96 images were selected in the experiments. The reference object, table tennis ball was 200 pixels and its actual size was 40 mm. So the calibration coefficient was 0.2 mm/pixel. The result of preprocessing showed that the image morphological reconstruction could not only weaken the brightness of the background, but also maintain the edge of target fruit. After the edge detection and structure expansion with a radius of two pixels, the contour of the fruit had been acquired, but there were some defects due to the fact that some fruits were shaded by leaves. At last, the calculated results were compared with the manual measurement ones. The experiment results showed that the minimum root mean square error (RMSE) and the mean value were 1.91 mm and 2.27 mm, respectively. In addition, it was found that the calculation result of the flat apples had larger error and the reason was that the radius of fitting circle was less than the actual one. The size class of fruit in market is mostly expressed in millimetre and the change from class size to another is often 5 mm or 0.5 cm. So without considering the flat apples, this method can meet the market fruit's grading requirement. In conclusion, the paper proposed a new approach to deal with segmentation for overlapping and occluded apples and to realize size detection and precise measurement of immature fruits in natural condition. And the results were consistent with the manual measurement, which could meet the producers' demand to precision management during the fruit growth period and had a good practicality.

       

    /

    返回文章
    返回