农业工程学报
農業工程學報
농업공정학보
2014年
1期
105-112
,共8页
王志彬%王开义%张水发%刘忠强%穆翠霞
王誌彬%王開義%張水髮%劉忠彊%穆翠霞
왕지빈%왕개의%장수발%류충강%목취하
机器视觉%虫害控制%算法%自动计数%K-means聚类%椭圆拟合%白粉虱
機器視覺%蟲害控製%算法%自動計數%K-means聚類%橢圓擬閤%白粉虱
궤기시각%충해공제%산법%자동계수%K-means취류%타원의합%백분슬
computer vision%pest control%algorithms%automatic counting%K-means clustering%ellipse fitting%whitefly
为了能够对害虫的准确计数,该文以白粉虱为例,提出了一种基于K-means聚类和椭圆拟合方法的白粉虱计数算法。该方法首先利用K-means聚类算法对白粉虱图像进行分割,使白粉虱从背景图像中分离,然后利用基于最小二乘法的椭圆拟合方法对分割结果进行椭圆拟合,统计椭圆的个数,提取椭圆中心点的颜色特征值,将其作为新的分类中心,重新对白粉虱图像进行分割和椭圆个数的统计,最后将算法收敛时的椭圆个数作为当前白粉虱的个数。对辣椒、黄瓜、番茄和茄子4种作物叶片上附着的白粉虱进行了计数试验,该算法在这4种作物上的平均计数错误率依次为2.80%,8.51%,5.00%,1.56%,并且分别比阈值化方法和 K-means 聚类方法的平均计数错误率降低了11.65%和70.18%。试验结果表明:所提方法能够实现对不同作物上白粉虱的准确计数,且算法具有很好的泛化性。该研究结果可为虫害的检测以及采取正确的防治措施提供重要依据。
為瞭能夠對害蟲的準確計數,該文以白粉虱為例,提齣瞭一種基于K-means聚類和橢圓擬閤方法的白粉虱計數算法。該方法首先利用K-means聚類算法對白粉虱圖像進行分割,使白粉虱從揹景圖像中分離,然後利用基于最小二乘法的橢圓擬閤方法對分割結果進行橢圓擬閤,統計橢圓的箇數,提取橢圓中心點的顏色特徵值,將其作為新的分類中心,重新對白粉虱圖像進行分割和橢圓箇數的統計,最後將算法收斂時的橢圓箇數作為噹前白粉虱的箇數。對辣椒、黃瓜、番茄和茄子4種作物葉片上附著的白粉虱進行瞭計數試驗,該算法在這4種作物上的平均計數錯誤率依次為2.80%,8.51%,5.00%,1.56%,併且分彆比閾值化方法和 K-means 聚類方法的平均計數錯誤率降低瞭11.65%和70.18%。試驗結果錶明:所提方法能夠實現對不同作物上白粉虱的準確計數,且算法具有很好的汎化性。該研究結果可為蟲害的檢測以及採取正確的防治措施提供重要依據。
위료능구대해충적준학계수,해문이백분슬위례,제출료일충기우K-means취류화타원의합방법적백분슬계수산법。해방법수선이용K-means취류산법대백분슬도상진행분할,사백분슬종배경도상중분리,연후이용기우최소이승법적타원의합방법대분할결과진행타원의합,통계타원적개수,제취타원중심점적안색특정치,장기작위신적분류중심,중신대백분슬도상진행분할화타원개수적통계,최후장산법수렴시적타원개수작위당전백분슬적개수。대랄초、황과、번가화가자4충작물협편상부착적백분슬진행료계수시험,해산법재저4충작물상적평균계수착오솔의차위2.80%,8.51%,5.00%,1.56%,병차분별비역치화방법화 K-means 취류방법적평균계수착오솔강저료11.65%화70.18%。시험결과표명:소제방법능구실현대불동작물상백분슬적준학계수,차산법구유흔호적범화성。해연구결과가위충해적검측이급채취정학적방치조시제공중요의거。
Insect pests are one of the important factors leading to crop loss. Accurate insect counts provide an important basis for pest detection, and for proper preventive measures to be taken. At present, the common counting methods are mainly based on computer vision, but this type of technology primarily has the following problems: 1) how to determine the threshold of image segmentation. The effects of the algorithms are unsatisfactory, as their thresholds or parameters are fixed when they are used to segment insect images. 2) Most counting algorithms are mainly aimed at one certain crop for learning and testing. If applied to other crops, their portability is poor, and the counting results are inaccurate. Therefore, how to improve the generalization and accuracy of counting algorithm is an important direction for research on a counting method based on machine vision. To solve the above problems, a novel counting algorithm for whiteflies based on k-means clustering and ellipse fitting method was proposed in this paper. It combined k-means clustering algorithm with ellipse fitting and automatically learned the features of whiteflies and background to segment and count whitefly images accurately. First, whitefly image were segmented by a k-means clustering algorithm to separate the whiteflies from the background, and then the segmentation results were fitted using an ellipse fitting based on least square method and adding up the ellipse number. The color features of the ellipse centers were extracted as new centers of classes. The segmentation and counting was iterated until the difference between two continuous counts met the needs of the algorithm and the convergence ellipse count was output as the number of whiteflies. Moreover, to improve the adaptability of the algorithm to count whiteflies on various crops, the whitefly images to be counted were parted into blocks and the center block was used to learn the features of whiteflies such as color, size, and area. The learned result was set as the initial value of the algorithm. Thus, the accuracy and generalization of the algorithm was improved. To verify the effectiveness of the proposed algorithm, the counting experiment was performed on whitefly images of cayenne peppers, cucumbers, tomatoes, and eggplants respectively. These images were captured in the open environment from Xiao Tang Shan field research and a demonstration base of national precision agriculture in Beijing. The experimental results compared to that of the threshold method and the K-means clustering method showed that:1) The count results of the proposed method had a high accuracy in cayenne peppers, cucumbers, tomatoes, and eggplants. The error rates of the pepper were 1.54%, 2.86%, and 4.00%;eggplant, 1.56%;tomato, 5.00%;cucumber, 11.30%and 5.71%. 2) The proposed method had better image segmentation results and higher count accuracy, compared to the threshold method and the K-means clustering method. Moreover, the counting error rate was decreased by 12.46% and 70.18% respectively. 3) The adaptive method learns the features of whiteflies such as color, sharpness, and size in the image to be counted, which is propitious for the accurate segmentation and counting of whitefly images. 4) The method makes the most of two important visual features of whiteflies, color and shape, and combines them by image segmentation and ellipse fitting to further increase the accuracy of the count results.