李祥光,趙 偉,趙雷雷
缺株玉米行中心線提取算法研究
李祥光,趙 偉※,趙雷雷
(河南科技大學車輛與交通工程學院,洛陽 471000)
無人駕駛農機自主進行行駛路徑檢測和識別系統需要具備環境感知能力。作物行的中心線識別是環境感知的一個重要方面,已有的作物行中心線識別算法在缺株作物行中心線提取中存在檢測精度低的問題。該研究提出了一種能夠在缺株情況下提取玉米作物行中心線的算法。首先采用限定HSV顏色空間中顏色分量范圍的方法將作物與背景分割,通過形態學處理對圖像進行去噪并填補作物行空洞;然后分別在圖像底部和中部的橫向位置設置條狀感興趣區(Region of Interest,ROI),提取ROI內的作物行輪廓重心作為定位點。在圖像頂端間隔固定步長設置上端點,利用定位點和上端點組成的掃描線掃描圖像,通過作物行區域最多的掃描線即為對應目標作物行的最優線;將獲取的最優線與作物行區域進行融合填充作物行中的缺株部位;最后設置動態ROI,作物行區域內面積最大輪廓擬合的直線即為目標作物行中心線。試驗結果表明,對于不同缺株情況下的玉米圖像,該算法的平均準確率達到84.2%,每幀圖像的平均檢測時間為0.092 s。該研究算法可提高缺株情況下的作物行中心線識別率,具有魯棒性強、準確度高的特點,可為無人駕駛農機在作物行缺株的農田環境下進行作業提供理論依據。
算法;圖像處理;機器視覺;玉米;中心線;圖像去噪;動態ROI
為確保無人駕駛農機在田間作業過程中能根據實際情況調整作業路徑,需要其具備實時導航[1-3]的能力。現有的導航線檢測算法大部分針對連續作物行,對于存在缺株現象的作物行中心線提取方法有待進行深入研究。
目前國內外應用比較廣泛的導航方法主要有全球衛星導航(Global Navigation Satellite System,GNSS)、機器視覺導航[4-5]和傳感器融合導航等方式。機器視覺導航以其成本低、魯棒性強、實時性高的優點成為關注的熱點。諸多學者對此展開了研究,張雄楚等[6]利用垂直累計直方圖標準差和最小值的關系判斷棗園種類,以掃描像素點的方法確定每行候補點,將候補點作為已知點進行Hough變換[7-9]來提取導航線。Jiang等[10]采用移動窗口掃描的方式來獲取目標像素的分布,然后利用K均值(K-means)與Hough變換結合的方法篩選導航線。Meng等[11]采用微分算法、亮度分析法、顏色分析法分割水田圖像[12-16],利用過已知點的Hough變換進行目標直線檢測,計算速度相對于Hough變換方法有所提高,但是在不規則作物行及缺株情況下會導致目標點的檢測失準。李景彬等[17]使用顏色分量差的方法提取棉花已收獲和未收獲區域的邊界。亢潔等[18]提出了基于輪廓查找與線掃描的檢測算法,穿過定位點的直線中綠色元素最多的即為導航線,但是未解決作物缺失時無法獲取定位點的問題。曾宏偉等[19]采用區域生長算法進行圖像分割,利用相鄰像素的相似性將像素或子區域組合成更大的區域,能夠保證分割區域的連通性,由于計算復雜,平均耗時需要0.41 s。楊洋等[20]利用垂直投影法確定靜態ROI(Region of Interest)[21-23],通過對識別出的ROI進行動態更新來擬合玉米行間導航線,但是投影結果受作物密度影響較大,適用性不強。
綜上可知,現有的研究方法大部分以連續作物作為研究對象,實際田地中由于受外界環境等因素的影響,作物行中會存在作物缺失的現象,這時傳統算法難以保證作物行中心線的檢測精度。針對上述問題,本研究提出了一種能夠在缺株情況下檢測目標作物行中心線的算法。首先在設置的ROI以輪廓查找的方法獲取定位點;然后利用穿過定位點的直線以一定的步長掃描圖像,通過作物行區域最多的掃描線即為最優線。用最優線填充目標作物行的缺株部位,在動態ROI內面積最大輪廓擬合的直線即為目標作物行中心線,以期為為無人駕駛農機提供檢測缺株作物行中心線的算法,有助于無人駕駛農機在作物行缺株的農田環境下進行有效的作業。
圖像采集設備采用中國海康威視MV-CE100-30GC彩色相機(CMOS類型,最大分辨率為3 840×2 748(像素))。考慮相機視角以及后續相機在農機上的安裝高度等因素,圖像采集時相機距地面高度為1.5 m,俯角為30°(圖 1a)。樣本圖像分辨率為640×480(像素),視頻幀率為每秒30幀。圖像采集地點為中國一拖集團有限公司孟津試驗田(112°41′E,34°79′N),采集日期為2020年7月,試驗對象為玉米,苗高0.3~0.4 m,行間距0.2~0.3 m。為確保樣本的普遍性,分別對試驗田不同地塊的玉米進行樣本圖像采集。
對采集到的玉米圖像進行處理和作物行識別時,靠近圖像中心的2~3行比較容易分辨,并且處于農機的行駛軌跡上。因此本研究將圖像居中的2行設定為目標行(圖1b)[24-25]。
采用的圖像處理軟件為Python 3.6與OpenCV 3.4視覺庫,編譯器為Pycharm,硬件為處理器Inter Core i5(主頻1.6 GHz),顯卡AMD 8600(顯存2 G),內存12 G。
采集到的圖像格式為RGB彩色圖像,而利用RGB確定顏色閾值需要具體判斷每種分量的所占權重,計算較為復雜。由于圖像中作物行區域為綠色,行間的土壤區域為灰褐色。為對作物行所在區域進行分割,首先將RGB圖像轉換至HSV顏色空間[26],然后根據作物的顏色設定相應的顏色閾值。
RGB模型轉換為HSV模型的過程為:根據、、像素點在紅綠藍3個通道的取值(其取值范圍均為[0,255]),通過運算得到RGB模型中的色品坐標(,,)(其取值范圍均為[0,1]),將(,,)代入轉換函數求得HSV模型中、、值(其中使用角度衡量,取值范圍為[0°,360°];和為比例值,取值范圍均為[0,1])。為方便計算將的取值范圍量化為[0,180],和的取值范圍均量化為[0,255]。
根據綠色在HSV顏色空間模型中的映射范圍,將顏色閾值的取值范圍設置為∈[35,77]、∈[43,255]、∈[46,255]。通過OpenCV視覺庫中的二值化函數對圖像進行處理[27],得到圖像的二值圖(圖2a)。采用文獻[10]和文獻[20]的超綠(Excess Green,ExG)算法[28]對圖像做灰度處理并利用大津法[29]做閾值分割(圖2b)。通過對比可知,HSV顏色閾值分割方法每幀平均用時為0.013 s,ExG算法的平均用時為0.028 s,且ExG算法對作物密集區域的區分效果并不理想,相鄰行間粘連情況嚴重。因此,本研究選用HSV顏色閾值分割的方法進行圖像處理。
由于雜草、落葉等因素導致采集的圖像中存在大量噪聲。為了減少噪聲并保持圖像細節[30],采用先膨脹后腐蝕的閉運算對圖像進行形態學處理,消除噪聲和作物行區域內的孔洞(圖3a),濾波窗口為5×5矩陣。
由于光照因素的影響,圖像在進行閾值處理后出現苗尖與苗株分離的情況,形成了離散的小塊。針對這種情況可采用限制面積的方式進行離散小塊去除。通過對圖像進行輪廓查找,計算不同離散小塊的輪廓面積并刪除像素面積較小的區域,避免對作物行中心線的提取造成影響。樣本預處理后的二值化圖像如圖3b所示。
Hough變換作為一種窮盡式搜索的算法,計算過程需要耗費大量的時間;文獻[10]采用過已知點的Hough變換算法可減少計算量,但仍會受到雜草或缺株情況的影響;最小二乘法計算量較少,但是在作物缺失或作物密集的情況下聚類精度會受到影響[31],聚類中心會傾向于作物密度大的區域,導致生成的聚類中心點偏移。為了解決這些問題,本研究提出一種能夠在缺株情況下檢測目標作物行中心線的算法。
2.1.1 獲取底部和中部定位點
本研究將獲取的作物圖像左上角設定為為坐標原點,原點向右為橫軸正方向,原點向下為縱軸正方向。設置圖像底部ROI,對圖像坐標系縱軸0.95~1.00倍的高度(H,像素)區域進行掩膜操作。為避免目標行以外的區域對檢測結果造成干擾,將掩膜寬度限制在(0.20~0.80)倍的圖像寬度(W,像素)之間;設置圖像中部ROI,在圖像(0.50~0.55)H區域進行掩膜操作。由于相機視角影響,作物行頂端向中心靠攏,整體呈現梯形,因此將掩膜寬度限制在(0.30~0.70)W之間(圖 4)。然后對條狀ROI內的作物行進行重心提取,所采用圖像矩的定義如下:
在分辨率為×的灰度圖像中,設像素點(,)處的灰度值為(,)。用零階矩(即00)表示目標區域的灰度和,也可看作目標區域的質量或面積[32]。
零階矩的定義如式(1)所示。
式中表示圖像像素的總行數;表示圖像像素的總列數;、表示每個像素的橫、縱坐標。在二值化圖像中(圖 3b),白色像素的像素面積為1,黑色像素的像素面積為0,因此零階矩的值即為所有白色區域的像素面積。
一階矩中10、01表示白色像素對應的橫、縱坐標的累加和,反映橫縱坐標的平均值。兩者定義如式(2)和式(3)所示。

利用零階矩和一階矩可求出作物區域重心的坐標(x,y),如式(4)所示。

式中x、y分別表示二值圖中白色區域重心的橫、縱坐標。
2.1.2 掃描范圍
根據圖像矩的定義,求得圖像底部和中部ROI的重心作為定位點,為構成掃描作物區域的掃描線還需要確定每個定位點對應的上端點。上端點的坐標在圖像第一行像素中設定。設上端點的坐標為(,0),為減少計算量的同時保持較高的精度,步長設定為5個像素,并對掃描的范圍進行限制。設定位點坐標為(x,y),點(W-x,y)為點關于圖像垂直平分線的對稱點,點(W-x,0)為點在圖像頂部的垂直投影點,以點與點連接的直線作為掃描范圍的邊界,如圖4。掃描線和直線的斜率、k如式(5)和式(6)所示。


式中為第一行像素點的橫坐標。通過改變與k的大小來限定掃描范圍,當定位點位于圖像縱向對稱軸左側且<k<0時,可確定左側定位點對應掃描線的掃描范圍;當定位點位于圖像縱向對稱軸右側且>k>0時,可確定右側定位點對應掃描線的掃描范圍。
2.1.3 提取最優線
將每條掃描線中所有像素點的點集作為集合P中的元素,即P= {1,2,,l};掃描線與作物行重合部分的像素點的點集作為集合P中的元素,P= {1,2,,m},其中m≥0.3l,表示掃描線的數量。P中最大的元素所對應的掃描線即為穿過作物行區域最多的線。最終篩選出符合條件的最優線(圖4)。
為確保在不同的情況下都能夠對目標作物行進行填充,提出算法融合的思路,即把底部定位點和中部定位點獲取的最優線同時與作物行區域融合,以達到最佳的填充效果。將最優線與作物行區域融合,能夠有效填補目標作物行中的缺株部位,融合后的圖像如圖5所示。分別把底部和中部定位點對應的最優線與作物行區域融合,能夠對作物行中、底部區域的缺株部位起到填充效果。若在作物行中無法獲取底部或中部定位點,則無法對缺株部位進行填充。
本研究提出的最優線與作物行區域融合的算法可以分別將底部和中部缺株情況下的最優線提取出來。2種算法融合可以滿足不同缺株情況下作物行區域的填充。在填充后的圖像中篩選出面積最大的作物行輪廓,并利用最小二乘法進行直線擬合,擬合結果即為目標作物行中心線。具體步驟為:
1)檢測過程中同時運行獲取底部和中部定位點對應最優線的算法,使用圖像融合函數把2種算法的結果進行合并,對合并后的圖像進行輪廓提取操作。為方便篩選作物行輪廓,對圖像設置動態ROI(圖6a)。對融合后的圖像再次提取定位點。
計算底部最外側兩個定位點之間的距離,如式(7)所示。

式中B_R表示圖像底部右側定位點的橫坐標,B_L表示圖像底部左側定位點的橫坐標。左側定位點的連線與圖像上下邊線的交點分別定義為點、,直線的斜率k和截距b分別如式(8)、式(9)所示。

式中B_L和B_L分別表示圖像底部左側定位點的橫縱坐標,M_L和M_L分別表示圖像中部左側定位點的橫縱坐標。由于圖6a中點的縱坐標為0,點B的縱坐標為高度H,點、點的橫坐標如式(10)所示。
由此可得、點的坐標,將直線向外平移0.25的距離至直線處。在右側執行相同的操作。最終點、、和構成的區域即為動態ROI。
2)利用輪廓面積計算函數求出動態ROI內各作物行輪廓的面積,從中提取2個面積最大的作物行區域。利用直線擬合函數對這2個區域進行最小二乘法直線擬合操作,即可得到目標作物行中心線(圖6b)。
為驗證不同缺株情況下本研究算法的可靠性,分別在不同種植密度的農田環境下采樣。在樣本圖像中以人工標記的作物行中心線作為標準線,根據標準線與作物行區域重合部分在標準線中所占的比重,對作物缺株情況進行分類:
1)若重合部分在標準線中所占的比重為≥0.30~0.50之間,表明作物生長較為稀疏,此時存在大量缺株現象;
2)若重合部分在標準線中所占的比重為≥0.50~0.70之間,作物存在少量缺株現象;
3)若重合部分在標準線中所占的比重≥0.70,則作物間距正常。

式中為設定的角度誤差,(°),本文將設定為5°。
為驗證算法融合后最優線對目標作物行的填充效果,對定位點的各種分布情況進行測試驗證,試驗結果如圖7所示。
根據獲取到的定位點數與對應最優線之間的關系可以把圖像分為3種類型。類型Ⅰ:如圖7a~圖7d,為定位點缺失1個時獲取的最優線;類型Ⅱ:如圖 7f~圖7h,為定位點缺失2個時獲取的最優線;類型Ⅲ:如圖7e,為定位點都存在時獲取的最優線。對存在少量缺株情況的387幀玉米圖像進行試驗驗證,其中符合類型Ⅰ、Ⅱ、Ⅲ情況的分別有93、25、266幀。通過分析可知,每個目標作物行基本對應1條最優線,可對目標作物行的缺株部位進行填充,填充的平均成功率為95.3%。表明本研究算法對不同缺株情況的玉米行均有較好填充效果,可為目標作物行中心線的擬合提供先驗條件。
為量化分析缺株情況下本研究算法的可靠性,隨機選取1 190幀玉米圖像進行試驗驗證,其中包含正常圖像431幀,大量缺株圖像372幀,少量缺株圖像387幀,檢測結果如表1所示。針對正常、大量和少量缺株3種情況,中心線檢測準確率分別為85.4%、72.1%和95.3%,平均準確率為84.2%,平均處理速度為每幀0.092 s。正常情況下相鄰作物行間可能存在粘連現象,導致最優線的獲取數增加,檢測用時增加;大量缺株情況下存在無法獲取定位點的現象,檢測準確度隨之下降;在少量缺株情況下作物行間距明顯,定位點容易獲取,因此檢測準確度較高。通過試驗驗證,本文算法在大量及少量缺株情況下仍保持較高的準確度,表明本文算法在缺株玉米行中心線檢測中具有較強的魯棒性。
為進一步驗證本算法對其他作物的適用性,選取不同類型作物進行中心線提取試驗,并與文獻[10]算法進行對比,結果如圖8和表2所示。

表1 不同缺株情況下玉米行中心線的檢測結果
由圖8可知,本研究算法在作物行中心線檢測精度上具有一定的優勢,檢測后的平均角度誤差小于文獻[10],且對不同種類的作物均有較好的效果。文獻[10]在檢測生長較密集的馬鈴薯及小麥圖像時具有較好的檢測效果,但對生長較稀疏的玉米圖像中心線檢測精度明顯下降,誤差超過本研究算法的檢測結果。試驗結果表明,本算法在不同作物環境中具有一定的適用性。
分析表2數據可知,由于文獻[10]采用的算法是對全圖作物密集區域進行聚類進而擬合作物行中心線,處理過程中容易將未連通的作物區域識別為作物行,當試驗樣本存在缺株現象較多時,該算法將較密集的作物區域進行聚類,導致聚類中心與實際作物行中心相差過大,擬合的作物行中心線隨之偏離,提取作物行中心線平均準確率為62.3%,其平均耗時為0.226 s;本研究算法通過限制最優線的檢測范圍,節省了計算量,檢測耗時較少,處理每幀圖片平均耗時0.092 s,平均檢測準確率為84.2%。對比可知,本研究算法步驟比較簡單,且對農田環境依賴性不強,適用于多種缺株場景下的作物行中心線檢測。

表2 文獻[10]與本文算法對玉米行中心線提取結果
本研究以存在多種缺株情況的玉米作物行的檢測和識別為研究內容,以期提取缺株情況下的作物行中心線。
1)采用限定作物行在HSV顏色空間中顏色范圍的方法對圖像進行二值化處理,通過形態學處理對圖像進行去噪并填補作物行空洞。相較于超綠(Excess Green,ExG)算法,該算法減少了作物行間的粘連情況,用時也得到降低。
2)通過圖像底部及中部設置的條狀感興趣區(Region of Interest,ROI)確定定位點,將穿過定位點獲取的最優線與作物行區域融合,以此達到填充目標作物行缺株部位的效果。經過試驗驗證,該算法提高了對目標作物行缺株部位填充的準確率,適用于存在不同缺株情況的作物行區域。
3)最終采用在動態ROI內提取面積最大輪廓的方法來擬合作物行中心線。通過隨機選取的玉米圖像進行試驗,表明本研究算法提取玉米行中心線的平均準確度為84.2%,滿足在缺株情況下的農田環境中提取作物行中心線的要求,完善了傳統算法面對缺株作物行分析的不足。本研究算法對計算量的要求較低,所述檢測算法對應每幀圖像的平均檢測時間為0.092 s,滿足無人駕駛農機田間作業時對玉米或其他作物實時提取作物行中心線的要求。
[1] 陳兵旗. 農田作業視覺導航系統研究[J]. 科技導報,2018,36(11):66-81.
Chen Bingqi. Study on vision navigation for field work[J]. Science & Technology Review, 2018, 36(11): 66-81. (in Chinese with English abstract)
[2] 韓樹豐,何勇,方慧. 農機自動導航及無人駕駛車輛的發展綜述[J]. 浙江大學學報:農業與生命科學版,2018,44(4):381-391.
Han Shufeng, He Yong, Fang Hui. Recent development in automatic guidance and autonomous vehicle for agriculture: A review[J]. Journal of Zhejiang University: Agriculture and Life Sciences Edition, 2018, 44(4): 381-391. (in Chinese with English abstract)
[3] 崔維,丁玲. 基于視覺導航和RBF的移動采摘機器人路徑規劃研究[J]. 農機化研究,2016,38(11):234-238.
Cui Wei, Ding Ling. Research on path planning for mobile picking robot based on visual navigation and RBF[J]. Journal of Agricultural Mechanization Research, 2016, 38(11): 234-238. (in Chinese with English abstract)
[4] 孟慶寬,何潔,仇瑞承,等. 基于機器視覺的自然環境下作物行識別與導航線提取[J]. 光學學報,2014,34(7):180-186.
Meng Qingkuan, He Jie, Qiu Ruicheng, et al. Crop recognition and navigation line detection in natural environment based on machine vision[J]. Acta Optica Sinica, 2014, 34(7): 180-186. (in Chinese with English abstract)
[5] 梁習卉子,陳兵旗,李民贊,等. 質心跟蹤視頻棉花行數動態計數方法[J]. 農業工程學報,2019,35(2):175-182.
Liang Xihuizi, Chen Bingqi, Li Minzan, et al. Dynamic counting method of cotton rows in video based on centroid tracking[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(2): 175-182. (in Chinese with English abstract)
[6] 張雄楚,陳兵旗,李景彬,等. 紅棗收獲機視覺導航路徑檢測[J]. 農業工程學報,2020,36(13):133-140.
Zhang Xiongchu, Chen Bingqi, Li Jingbin, et al. Path detection of visual navigation for jujube harvesters[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(13): 133-140. (in Chinese with English abstract)
[7] Gongal A, Silwal A, Amatya S, et al. Apple crop-load estimation with over-the-row machine vision system[J]. Computers and Electronics in Agriculture, 2016, 120: 26-35.
[8] 宋宇,劉永博,劉路,等. 基于機器視覺的玉米根莖導航基準線提取方法[J]. 農業機械學報,2017,48(2):38-44.
Song Yu, Liu Yongbo, Liu Lu, et al. Extraction method of navigation baseline of corn roots based on machine vision[J]. Transactions of the Chinese Society for Agricultural Machinery, 2017, 48(2): 38-44. (in Chinese with English abstract)
[9] 彭順正,坎雜,李景彬. 矮化密植棗園收獲作業視覺導航路徑提取[J]. 農業工程學報,2017,33(9):45-52.
Peng Shunzheng, Kan Za, Li Jingbin. Extraction of visual navigation directrix for harvesting operation in short-stalked and close-planting jujube orchard[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(9): 45-52. (in Chinese with English abstract)
[10] Jiang G Q, Wang X J, Wang Z H, et al. Wheat rows detection at the early growth stage based on Hough transform and vanishing point[J]. Computers and Electronics in Agriculture, 2016, 123: 211-223.
[11] Meng Q H, Qiu R C, He J, et al. Development of agricultural implement system based on machine vision and fuzzy control[J]. Computers and Electronics in Agriculture, 2015, 112: 128-138.
[12] 姜國權,王志衡,趙翠君. 基于已知點的作物行檢測方法[J]. 應用基礎與工程科學學報,2013,21(5):983-990.
Jiang Guoquan, Wang Zhiheng, Zhao Cuijun. Crop row detection method based on known points[J]. Journal of Applied Basic and Engineering Science, 2013, 21(5): 983-990. (in Chinese with English abstract)
[13] Zhang Q, Chen S J, Li B. A visual navigation algorithm for paddy field weeding robot based on image understanding[J]. Computers and Electronics in Agriculture, 2017, 143: 66-78.
[14] 陳子文,李偉,張文強,等. 基于自動Hough變換累加閾值的蔬菜作物行提取方法研究[J]. 農業工程學報,2019,35(22):314-322.
Chen Ziwen, Li Wei, Zhang Wenqiang, et al. Vegetable crop row extraction method based on accumulation threshold of Hough transformation[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(22): 314-322. (in Chinese with English abstract)
[15] Hamuda E, Glavin M, Jones E. A survey of image processing techniques for plant extraction and segmentation in the field[J]. Computers and Electronics in Agriculture, 2016, 125: 184-199.
[16] 劉瓊,史諾. 基于Lab和YUV顏色空間的農田圖像分割方法[J]. 國外電子測量技術,2015,34(4):39-41,57.
Liu Qiong, Shi Nuo. Farmland image segmentation method based on Lab and YUV color space[J]. Foreign Electronic Measurement Technology, 2015, 34(4): 39-41, 57. (in Chinese with English abstract)
[17] 李景彬,陳兵旗,劉陽,等. 采棉機視覺導航路線圖像檢測方法[J]. 農業工程學報,2013,29(11):11-19.
Li Jingbin, Chen Bingqi, Liu Yang, et al. Detection for navigation route for cotton harvester based on machine vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(11): 11-19. (in Chinese with English abstract)
[18] 亢潔,馬振. 基于輪廓查找與線掃描的作物行檢測算法[J]. 科學技術與工程,2019,19(20):273-277.
Kang Jie, Ma Zhen. Detection algorithm of crop row based on contour searching and line scanning[J]. Science, Technology and Engineering, 2019, 19(20): 273-277. (in Chinese with English abstract)
[19] 曾宏偉,雷軍波,陶建峰,等. 低對比度條件下聯合收割機導航線提取方法[J]. 農業工程學報,2020,36(4):18-25.
Zeng Hongwei, Lei Junbo, Tao Jianfeng, et al. Navigation line extraction method for combine harvester under low contrast conditions[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(4): 18-25. (in Chinese with English abstract)
[20] 楊洋,張博立,查家翼,等. 玉米行間導航線實時提取[J]. 農業工程學報,2020,36(12):162-171.
Yang Yang, Zhang Boli, Zha Jiayi, et al. Real-time extraction of navigation line between corn rows[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(12): 162-171. (in Chinese with English abstract)
[21] 劉瓊,羅晴,彭紹武. 車載熱成像行人檢測ROI提取方法[J]. 東北大學學報:自然科學版,2020,41(8):1083-1090.
Liu Qiong, Luo Qing, Peng Shaowu. ROI extraction for vehicular thermal infrared pedestrian detection[J]. Journal of Northeastern University: Natural Science Edition, 2020, 41(8): 1083-1090. (in Chinese with English abstract)
[22] 張強. 最小二乘法原理及其處理方法的探討[J]. 計量與測試技術,2020,47(4):75-76.
Zhang Qiang. Exploring for the principle of least square method and its treatment method[J]. Metrology and Testing Technology, 2020, 47(4): 75-76. (in Chinese with English abstract)
[23] 李源韜. 基于K-means與區域生長的ROI圖像分割算法[D]. 南昌:南昌大學,2015.
Li Yuantao. ROI Algorithm for Image Segmentation Based on Region Growing and K-means[D]. Nanchang: Nanchang University, 2015. (in Chinese with English abstract)
[24] 陳兵旗,機器視覺技術及應用實例詳解[M]. 北京:化學工業出版社,2014.
[25] Choi K H, Han S K, Han S H, et al. Morphology-based guidance line extraction for an autonomous weeding robot in paddy fields[J]. Computers and Electronics in Agriculture, 2015, 113: 266-274.
[26] Jiang GQ, Wang ZH, Liu HM. Automatic detection of crop rows based on multi-ROIs[J]. Expert Systems with Applications, 2015, 42(5): 2429-2441.
[27] 喬詩展. 基于OpenCV的機器人目標檢測候選區域生成算法[J]. 科技創新與應用,2020(17):1-5,10.
Qia Shizhan. Opencv-based algorithm for generating candidate regions for robot target detection[J]. Science and Technology Innovation and Application, 2020(17): 1-5, 10. (in Chinese with English abstract)
[28] 趙騰,野口伸,楊亮亮,等. 基于視覺識別的小麥收獲作業線快速獲取方法[J]. 農業機械學報,2016,47(11):32-37.
Zhao Teng, Noboru Noguchi, Yang Liangliang, et al. Fast edge detection method for wheat field based on visual recognition[J]. Transactions of the Chinese Society for Agricultural Machinery, 2016, 47(11): 32-37. (in Chinese with English abstract)
[29] 王春雷,盧彩云,陳婉芝,等. 基于遺傳算法和閾值濾噪的玉米根茬行圖像分割[J]. 農業工程學報,2019,35(16):198-205.
Wang Chunlei, Lu Caiyun, Chen Wanzhi, et al. Image segmentation of maize stubble row based on genetic algorithm and threshold filtering noise[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(16): 198-205. (in Chinese with English abstract)
[30] 易詩,李俊杰,賈勇. 基于紅外熱成像的夜間農田實時語義分割[J]. 農業工程學報,2020,36(18):174-180.
Yi Shi, Li Junjie, Jia Yong. Real-time semantic segmentation of farmland at night using infrared thermal imaging[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(18): 174-180. (in Chinese with English abstract)
[31] 姜國權,楊小亞,王志衡,等. 基于圖像特征點粒子群聚類算法的麥田作物行檢測[J]. 農業工程學報,2017,33(11):165-170.
Jiang Guoquan, Yang Xiaoya, Wang Zhiheng, et al. Crop rows detection based on image characteristic point and particle swarm optimization-clustering algorithm[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(11): 165-170. (in Chinese with English abstract)
[32] 蔡道清,李彥明,覃程錦,等. 水田田埂邊界支持向量機檢測方法[J]. 農業機械學報,2019,50(6):22-27,109.
Cai Daoqing, Li Yanming, Qin Chengjin, et al. Detection method of boundary of paddy fields using support vector machine[J]. Transactions of the Chinese Society for Agricultural Machinery, 2019, 50(6): 22-27, 109. (in Chinese with English abstract)
Extraction algorithm of the center line of maize row in case of plants lacking
Li Xiangguang, Zhao Wei※, Zhao Leilei
(,,471000,)
Identification of crop centerlines has been one of the most essential links in the environmental perception, particularly for the detection of driving paths during operation for the emerging unmanned agricultural machinery at present. However, the current detection of centerlines presents a low accuracy in the extraction of lacking rows for the maize seedling. In this study, an algorithm was proposed to extract the centerlines of maize rows in the lacking seedlings. The collection date was in July 2020, and the experimental subjects were maize seedlings. The height of the seedling was 0.3-0.4 m and the seedling spacing was 0.2-0.3 m at the time of image collection. The height of the camera was 1.5 m and the pitch angle was about 30°. The images of maize seedling rows were also collected in different plots of the experimental fields to ensure the universality of samples. Firstly, the range of HSV color components was limited to segment the seedlings and the background. The average time of threshold processing per frame of the image was 0.013 s. Morphological processing was utilized to fill the holes in the crop areas of denoised images. Secondly, a strip Region of Interest (ROI) was set in the horizontal position at the bottom and middle of the images. The barycenter was extracted from the seedlings contour located in the ROI as the locating points. Specifically, the upper endpoint was determined by the fixed step size in the pixel point of the first line of the image. The row area of the crop within a limited range was scanned using a straight line through the locating points and upper endpoint, where the line that crossed the most seedlings was the optimal line of target seedlings. As such, the contour feature of the seedling was strengthened, and the lack of seedling in the bottom area was filled, when the optimal line was fused with the seedling area. Because the algorithm was used to extract the crop centerline under different conditions of seedlings lacking, the optimal lines at the bottom and the middle of rows were fused with the region to fill the lacking part of the row. Finally, the dynamic ROI was set, where the fitting profile of the maximum area within the region was the target centerlines of seedling rows. The experimental results showed that the algorithm fully met the extracting requirement for the centerlines of seedlings in the field with seedling deficiency, compared with the traditional. It was also utilized to deal with the low detection rate when there was a seedling deficiency. Experimental verification was also performed on 1 190 frames of maize seedlings images for the reliability of the algorithm in the lack of seedlings. The results showed that this algorithm required a relatively small amount of computation. Specifically, the average accuracy rate was 84.2%, and the average detection time of each frame was 0.092 s, indicating a better filling effect on the maize seedlings row with different crop lacked conditions. Consequently, the improved algorithm presented strong robustness and high accuracy for the recognition rate when seedlings were lacking. The finding can provide sound theoretical support to the operation of unmanned agricultural machinery in the field environment of seedlings lacking.
algorithms; image processing; machine vision; maize; centerlines; image denoising; dynamic ROI
李祥光,趙偉,趙雷雷. 缺株玉米行中心線提取算法研究[J]. 農業工程學報,2021,37(18):203-210.
10.11975/j.issn.1002-6819.2021.18.024 http://www.tcsae.org
Li Xiangguang, Zhao Wei, Zhao Leilei. Extraction algorithm of the center line of maize row in case of plants lacking[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(18): 203-210. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2021.18.024 http://www.tcsae.org
2020-09-26
2021-04-02
河南省科技攻關項目(202102210278)
李祥光,研究方向為機器視覺。Email:nourixiix@163.com
趙偉,博士,副教授,研究方向為無人駕駛、機器視覺。Email:zhaowei@haust.edu.cn
10.11975/j.issn.1002-6819.2021.18.024
TP391.41
A
1002-6819(2021)-18-0203-08