为了快速准确地提取麦田作物行中心线,提出了基于图像特征点粒子群聚类算法的麦田作物行检测。首先,对自然光照下获取的彩色图像运用"过绿颜色因子图像灰度化"、"Otsu图像二值化"、"左右边缘中间线检测提取作物行特征点算法"3步对图像进行预处理。然后,根据农田作物行中心线周围区域的特征点到该直线的距离均小于某一距离阈值的特征,运用粒子群优化算法对每一作物行的特征点分别进行聚类。最后,对每一类的特征点用最小二乘法进行直线拟合获取麦田作物行中心线。试验结果表明,该算法可以对作物断行、杂草、土块等复杂农田环境下的图像进行有效地作物行检测,识别率达95%,识别误差小于3°。与标准Hough算法相比,运行速率提升了一倍。该文可为实现农业机器人田间作业提供参考。
In order to extract the crop rows of wheat quickly and accurately,a new method of wheat crop row detection was proposed based on particle swarm optimization(PSO)-clustering.The first step is image segmentation.The purpose of image segmentation was to separate the green plants from background,and it required the following 2 steps:Firstly,gray-level transformation,which could be done in RGB color space.In this paper,the color excess green index 2G-R-B was used;Secondly,image binarization was conducted.Among the global thresholding techniques for image binarization,Otsu method is one of the best threshold ways.So,this paper used Otsu algorithm to binarize the above obtained gray-level image.In order to reduce the burden of the next work,it was essential to extract a number of feature points indicating the crop rows.The specific algorithm can be divided into 2 steps:Firstly,get the left and right boundary points of each crop row.Secondly,extract the midpoint between left and right boundary points.After the original crop image was processed by the above steps,we got the feature points of the crop rows.According to the characteristics that the distances from the feature points around the crop row centreline to this straight line were all smaller than a certain distance threshold,we used the clustering method based on PSO to determine the real center points indicating crop rows.In the crop rows detection algorithm based on the PSO-clustering,the line in the data space composed of the feature points was considered as a particle.Finally,the centrelines were detected by fitting a straight line with the least square method.In order to prove the superiority of the algorithm,we compared the algorithm with standard Hough transform and the algorithm proposed in another literature.We tested the performance from the aspects of the detection accuracy and processing time for different images.Here,a total of 350 images have been tested.The number of the wheat images in overwintering stage was 197 and the number of the wheat