为准确定位叠贴情况下的葡萄目标,提出了一种基于轮廓分析的双串叠贴葡萄目标识别方法。首先提取最能突显夏黑葡萄的HSV颜色空间中的H分量,通过改进K-means聚类方法对葡萄图像进行分割,运用形态学去噪等处理获取葡萄图像区域,再提取该区域边缘轮廓和左右轮廓的类圆中心。然后以该中心点为原点建立基于轮廓分析的叠贴葡萄串分界线几何求解与计算模型,分别在逆时针方向45°-135°和225°-315°区域内沿葡萄轮廓搜索距离原点最近的点,进而确立两叠贴葡萄轮廓拐点及其分界线,最终实现对叠贴葡萄目标的分别提取。对从果园采集的27幅双串叠贴葡萄图像进行试验,结果显示:24幅图像中的叠贴葡萄串被正确识别和提取,成功率达88.89%,目标像素区域的识别精准度为87.63%-96.12%,算法处理时间在0.59-0.68 s之间。将算法移植到自主研制的机器人上进行视觉定位试验,结果表明所提方法可很好地用于两叠贴葡萄目标的识别与定位。
The recognition and location of overlapping or adjacentgrape clusters in vineyard is one of the difficulties of grape picking robot vision system.In order to locate the grape clusters accurately,a method for targets detection and extraction in two overlapping and adjacent grape clusters was proposed based on image contour analysis.Firstly,the H color component images that can well distinguish the summer black grape clusters from the background were extracted from the HSV color space,the grape clusters in the extracted images were segmented by using the improved K-means clustering method,and subsequently the noises in the segmented images were eliminated by using morphological operations.Secondly,the edges of grape clusters were extracted,and the midpoint of the line crossed the extreme points on the left and right edge of grape clusters was calculated out.Thirdly,midpoint was taken as the original point,and a geometry calculation model for solving the dividing line between two grape clusters was built after analyzing the contour characteristics.The two intersection points of the adjacent grape clusters' edges were computed by using the minimum distance constraint between the original point and the specified edges.Finally,the dividing line of two grape clusters was obtained by connecting the two intersection points,and the two grape clusters were extracted separately.To verify the robust of the proposed method,totally 27 vineyard images with two overlapping and adjacent grape clusters were tested,and the results showed that the grape clusters in 24 images were correctly identified and extracted.The success rate reached up to 88.89%,and the accuracy of the extracted pixel region was from 87.63% to 96.12%.The elapsed time of the developed algorithm was 0.59 - 0.68 s.Moreover,the developed algorithm was transplanted to the self-developed harvesting robot,and the running results showed that the proposed method could be used to localize two overlapping and adjacent grape clusters.