温室绿熟番茄机器视觉检测方法

    Green ripe tomato detection method based on machine vision in greenhouse

    • 摘要: 针对基于可见光图像对绿色番茄进行识别过程中,光线不均造成的阴影等会影响果实的识别、枝干和叶片对果实的遮挡以及果实之间的遮挡对果实识别的影响等难题,该文对基于机器视觉的绿色番茄检测方法进行研究。首先通过快速归一化互相关函数(FNCC,fast normalized cross correlation)方法对果实的潜在区域进行检测,再通过基于直方图信息的区域分类器对果实潜在区域进行分类,判别该区域是否属于绿色果实,并对非果实区域进行滤除,估计果实区域的个数。与此同时,基于颜色分析对输入图像进行分割,并通过霍夫变换圆检测绿色果实的位置。最终对基于FNCC和霍夫变换圆检测方法的检测结果进行融合,实现对绿色番茄果实的检测。当绿色果实和红色果实同时存在时,将绿色果实检测结果与基于局部极大值法和随机圆环变换检测圆算法的红色番茄果实检测结果进行合并。算法通过有机结合纹理信息、颜色信息及番茄的形状信息,对绿色番茄果实进行了检测,解决了绿色番茄与叶子、茎秆等背景颜色接近等难题。文中共使用了70幅番茄图像,其中35幅图像作为训练集图像,35幅作为验证集图像。所提出算法对训练集图像中的83个果实的检测正确率为89.2%,对验证集图像中105个果实的检测正确率为86.7%,为番茄采摘机器人采摘红色和绿色成熟番茄奠定了基础。

       

      Abstract: Abstract: During the detecting and locating process of green tomatoes based on obtained visible images, problems such as shadow caused by uneven illumination source, occlusion of stems and leaves, and occlusion between fruits, need to be solved. In this study, a machine vision algorithm was put forward, which aimed to determine fruit location and size of green tomatoes. Normalized cross-correlation function (NCC) is a feature detection method using template matching. The algorithm firstly detected the potential location of green tomatoes through fast normalized cross-correlation function (FNCC). Then a gray histogram based classifier was used to classify if the location corresponded to green fruit. The histogram based classifier was built based on fruit areas and non-fruit areas of a certain size (30×30 pixels) extracted from the obtained image. Seven texture features, including mean, standard deviation, smoothness, third moment, uniformity, entropy, and gray level range were calculated for those fruit areas and non-fruit areas. Three classifiers including k-nearest neighbor (KNN), SVM (support vector machine), and Naive Bayes, were used to classify fruit and non-fruit areas using those 7 texture features as input vectors. SVM was chosen based on its performance. The non-fruit location was filtered out, and the number of fruit locations was estimated. Meanwhile, the image was segmented based on color analysis. Red and Blue component from RGB (red, green, blue) image, and Hue component from HSV (hue, saturation, value) image transformed from RGB images, were used as the basis for color analysis. Using the fruit potential location number estimated using FNCC as an input parameter of circular Hough transform (CHT), CHT was then applied to the edge image of the segmented result. The center coordinates and radius value of each circle were calculated. Finally, the detection results were merged based on the analysis of the distances of 2 centers of fruit circles detected using CHT. If the distance between 2 circles is smaller than the minimum fruit radius, the circle with a larger radius will be kept, while the other circle will be flagged as repeatedly detected one. Thus, the recognition and positioning of the green tomato were realized. When green fruits and red fruits appear on the same image, a red fruit detection algorithm based on the local maximum value method and random circle round transform detection, which was proposed by the author in another paper, would be carried out on the obtained image. Then the red fruit detection result was combined with the green fruit detection result. The proposed method combined the texture, color, and shape information of the image, and eliminated the disturbance of the color similarity between the green tomatoes and green leaves and stems. A total of 70 images were used in this study, in which 35 images were used as training images, and the other 35 images were used as validation images. The correct detection ratio for 72 fruits in the training dataset was 89.2%, and the correct detection ratio for 105 fruits in the validation dataset was 86.7%. The proposed method has provided a reference for the development of tomato harvesting robots for both red and green mature tomato fruits.

       

    /

    返回文章
    返回