侯加林,田 林,李天華,牛子孺,李玉華
基于雙側(cè)圖像識別的大蒜正芽及排種試驗(yàn)臺設(shè)計(jì)與試驗(yàn)
侯加林,田 林,李天華,牛子孺,李玉華※
(1. 山東農(nóng)業(yè)大學(xué)機(jī)械與電子工程學(xué)院,泰安 271018;2.山東省農(nóng)業(yè)裝備智能化工程實(shí)驗(yàn)室,泰安 271018)
針對現(xiàn)有大蒜播種機(jī)難以滿足雜交蒜種“鱗芽朝上、直立栽種”農(nóng)藝要求的問題,提出了一種基于圖像識別的蒜種鱗芽識別與正芽方法,設(shè)計(jì)了大蒜排種及正芽試驗(yàn)臺,實(shí)現(xiàn)了蒜種的單粒取種、圖像采集、鱗芽方向識別、鱗芽扶正等功能。以雜交大蒜為試驗(yàn)對象,通過試驗(yàn)確定了影響蒜種鱗芽扶正效果的4個(gè)主要因素:通道寬度、電動機(jī)轉(zhuǎn)速、拍攝距離、識別閾值,建立了蒜種鱗芽扶正率與試驗(yàn)因素之間的回歸模型,模型決定系數(shù)2值為0.903 8,分析了各因素對蒜種鱗芽扶正率的影響,各因素對蒜種扶正率影響的顯著性順序從大到小依次為通道寬度、電動機(jī)轉(zhuǎn)速、拍攝距離、識別閾值。并對試驗(yàn)因素進(jìn)行了綜合優(yōu)化。最優(yōu)工作參數(shù)組合為:電動機(jī)轉(zhuǎn)速為18 r/min、蒜種通道寬度為38 mm、拍攝距離為8.6 mm、識別閾值為178時(shí),蒜種鱗芽扶正率為90.56%,平均每粒蒜種識別用時(shí)0.29 s,滿足大蒜播種機(jī)播種要求。該文結(jié)果可為解決雜交大蒜直立播種問題提供參考。
農(nóng)業(yè)機(jī)械;模型;大蒜播種;設(shè)計(jì);試驗(yàn);鱗芽識別;鱗芽扶正
中國是世界上生產(chǎn)、出口和消費(fèi)大蒜最多的國家,大蒜產(chǎn)量約為全球總產(chǎn)量的70%[1]。按照農(nóng)藝要求,大蒜播種時(shí)需要調(diào)整蒜種鱗芽方向,使其根部向下、直立栽種。國外大蒜播種機(jī)[2-5]價(jià)格昂貴,且不能適用于雜交大蒜的機(jī)械化播種作業(yè)。國內(nèi)大蒜播種機(jī)多采用機(jī)械式調(diào)頭的方式調(diào)整蒜種鱗芽方向[6-11],這種機(jī)械對蒼山大蒜播種效果較好,但對雜交大蒜機(jī)械化播種效果差,鱗芽扶正率低。由于雜交大蒜蒜種形狀不規(guī)則,不符合重心位于蒜瓣下半部分[12]這一特征,難以使用機(jī)械式調(diào)頭的方式對其進(jìn)行扶正,雜交大蒜鱗芽扶正已成為制約大蒜機(jī)械化播種的主要因素。
近年來,機(jī)器視覺技術(shù)迅速發(fā)展,廣泛應(yīng)用于交通、農(nóng)業(yè)、醫(yī)學(xué)、工業(yè)等各個(gè)領(lǐng)域[13-16]。隨著機(jī)器視覺技術(shù)理論和實(shí)踐越來越成熟,機(jī)器視覺在蒜種識別方面也得到快速發(fā)展[17-23]。方春等[24]采用基于CNN的深度學(xué)習(xí)[25-26]方法,利用Python語言和Keras深度學(xué)習(xí)框架來編程實(shí)現(xiàn)計(jì)算機(jī)自動識別蒜瓣的鱗芽朝向,這種方法需要大量的蒜種樣本進(jìn)行訓(xùn)練,工作量大且對識別環(huán)境要求較高。郭英芳等[27]通過邊緣檢測算法對蒜瓣的形狀特征進(jìn)行提取,并把SUSAN角點(diǎn)檢測算法運(yùn)用到瓣尖識別中,當(dāng)蒜皮有和蒜瓣尖角類似的尖銳突起時(shí),該算法就不能準(zhǔn)確識別瓣尖的位置。吳獻(xiàn)等[28]采用一種觀測窗的方法來識別定位蒜瓣的尖角位置,結(jié)合質(zhì)心的位置得出蒜瓣的偏角,以上方法均處于算法研究階段并未與硬件結(jié)合,都是基于試驗(yàn)條件下的蒜尖識別,對識別環(huán)境有較高的要求,在大蒜機(jī)械化播種時(shí),由于識別環(huán)境差,干擾多,識別效果不理想。
本文以雜交大蒜為研究對象,采用雙側(cè)圖像識別[29]技術(shù),根據(jù)蒜種不同的頭尾特征,識別蒜種鱗芽并對其進(jìn)行扶正,為解決雜交大蒜直立播種問題提供有益參考。
大蒜排種及正芽試驗(yàn)臺主要包括機(jī)架、調(diào)速電動機(jī)、傳動機(jī)構(gòu)、單粒取種機(jī)構(gòu)(包含單粒取種勺與取種鏈條)、蒜種橫向有序排列機(jī)構(gòu)、圖像采集機(jī)構(gòu)、杠桿式蒜種扶正機(jī)構(gòu)、地輪、蒜種箱等部分(如圖1a所示)。
試驗(yàn)臺工作時(shí),由調(diào)速電機(jī)提供動力,電動機(jī)輸出的動力經(jīng)鏈傳動輸入單粒取種機(jī)構(gòu),單粒取種機(jī)構(gòu)從種箱中進(jìn)行單粒取種,取出的蒜種隨取種裝置運(yùn)動至蒜種排列機(jī)構(gòu)的最高點(diǎn),取種勺翻轉(zhuǎn),蒜種落入蒜種通道中,在蒜種通道中實(shí)現(xiàn)橫向有序排列,并隨蒜種擋板一起向下做勻速直線運(yùn)動。當(dāng)蒜種運(yùn)動至圖像采集點(diǎn)時(shí),觸發(fā)U型光電傳感器,觸發(fā)蒜種通道兩側(cè)的USB攝像頭各采集一張圖像,處理器對采集到的圖像進(jìn)行鱗芽方向識別,控制杠桿式蒜種扶正機(jī)構(gòu)對蒜種進(jìn)行扶正。
單粒取種與橫向有序排列機(jī)構(gòu)的功能是從種箱單粒取種,并實(shí)現(xiàn)蒜種的橫向排列。其組成如圖1b所示,主要包括機(jī)架、調(diào)速電動機(jī)、蒜種箱、單粒取種勺、蒜種擋板、鏈輪、取種鏈條和蒜種通道等。單粒取種勺由蒜種擋板和2個(gè)容積不同的取種勺體組成,單粒取種機(jī)構(gòu)工作時(shí),調(diào)速電機(jī)驅(qū)動鏈輪運(yùn)動,鏈輪帶動安裝在鏈條上的取種勺運(yùn)動,取種勺經(jīng)過種箱時(shí)通過大蒜種群相互擠壓實(shí)現(xiàn)取種功能,由容積較大的勺體取出一粒或多粒蒜種,接著單粒取種勺翻轉(zhuǎn)90°,取出的蒜種落入容積較小的取種勺中,由于取種勺容積較小,只能容納一粒蒜種,多余的蒜種落入種箱中。單粒取種勺由螺栓固定于取種鏈條上,取種勺的間距為2個(gè)鏈節(jié)(38.1 mm),共26個(gè)取種勺。取種鏈條選用滾子鏈(鏈號12A,節(jié)距19.05 mm)。
1.單粒取種勺 2.取種鏈條 3.蒜種橫向有序排列機(jī)構(gòu) 4.蒜種箱 5.杠桿式蒜種扶正機(jī)構(gòu) 6.調(diào)速電動機(jī) 7.圖像采集機(jī)構(gòu) 8.傳動機(jī)構(gòu) 9.蒜種擋板 10.鏈輪 11.動力鏈條 12.蒜種通道底板 13.蒜種通道寬度調(diào)節(jié)槽 14.蒜種通道 15. 機(jī)架
由于單粒取種機(jī)構(gòu)取出的蒜種呈現(xiàn)為無序散亂狀態(tài),不利于蒜種鱗芽方向識別。為了降低蒜種圖像處理和識別難度,提高鱗芽方向識別的準(zhǔn)確率,需要對蒜種進(jìn)行橫向排列,使蒜種頭尾正對著攝像頭,本文針對這一問題,設(shè)計(jì)了蒜種橫向有序排列機(jī)構(gòu)。蒜種橫向有序排列機(jī)構(gòu)工作原理是蒜種離開單粒取種裝置后,落入蒜種通道中,撞擊蒜種通道與蒜種擋板,在蒜種擋板的支持力和重力作用下蒜種呈平行于擋板的姿態(tài)放置,并隨蒜種擋板一起向下做勻速直線運(yùn)動,實(shí)現(xiàn)橫向有序排列。蒜種排列效果如圖2所示。
1.蒜種通道底板 2.單粒取種勺 3.蒜種擋板 4.鱗芽朝右蒜種 5.磷芽朝左蒜種
圖像采集與識別機(jī)構(gòu)的功能是采集蒜種頭尾圖像,并將采集的圖像傳入處理器,識別蒜種鱗芽方向。其組成如圖3所示,主要包括機(jī)架、電源、處理器、U型光電傳感器、光電傳感器觸發(fā)裝置、攝像頭、圖像采集通道等部分,圖像采集通道對稱安裝于蒜種通道兩邊,蒜種通道與圖像采集通道做遮光處理。
1.左側(cè)采集通道 2.左側(cè)攝像頭調(diào)節(jié)槽 3.右側(cè)攝像頭調(diào)節(jié)槽 4.右側(cè)采集通道
圖像采集機(jī)構(gòu)工作時(shí),電動機(jī)驅(qū)動鏈輪運(yùn)動,鏈輪帶動安裝在鏈條上的光電傳感器觸發(fā)裝置運(yùn)動,觸發(fā)U型光電傳感器(日本OMRON公司生產(chǎn),型號為EE-SX674-WR),觸發(fā)蒜種通道兩側(cè)的USB攝像頭分別采集一張圖像,處理器對采集到的圖像進(jìn)行鱗芽方向識別。光電傳感器觸發(fā)裝置通過螺栓安裝于取種鏈條上,每個(gè)觸發(fā)裝置間距為2個(gè)鏈節(jié)(38.1 mm),共26個(gè)觸發(fā)裝置,U型光電傳感器通過I/O口與樹莓派相連,2組USB攝像頭(30萬像素,攝像頭自帶6顆可調(diào)節(jié)亮度的LED補(bǔ)光燈)分別安裝于蒜種通道兩邊的蒜種圖像采集通道中,通過USB接口連接樹莓派。
杠桿式蒜種扶正機(jī)構(gòu)用于蒜種鱗芽扶正作業(yè),可保證大蒜播種時(shí)的直立率。其結(jié)構(gòu)如圖4所示,主要包括支架、電磁鐵、調(diào)整叉、限位螺栓、扶正通道、繼電器等部分。調(diào)整叉由左右2部分組成,可繞連接銷在一定范圍內(nèi)擺動。杠桿式蒜種扶正機(jī)構(gòu)根據(jù)蒜種鱗芽方向?qū)λ夥N進(jìn)行扶正,當(dāng)鱗芽位于調(diào)整叉右側(cè)時(shí),繼電器閉合,電磁鐵通電,向上提起電磁鐵鐵芯,帶動調(diào)整叉向左旋轉(zhuǎn),右側(cè)調(diào)整叉落下對蒜種進(jìn)行扶正,如圖4a所示;當(dāng)鱗芽位于調(diào)整叉左側(cè)時(shí),繼電器斷開,電磁鐵斷電,在重力作用下,電磁鐵鐵芯落下,帶動調(diào)整叉向右旋轉(zhuǎn),左側(cè)調(diào)整叉落下對蒜種進(jìn)行扶正,如圖4b所示。通過調(diào)節(jié)左右兩側(cè)調(diào)整叉限位螺栓實(shí)現(xiàn)左右調(diào)整叉扶正位置的調(diào)整,扶正通道中的蒜種向下滑落經(jīng)過蒜種扶正機(jī)構(gòu)時(shí),使調(diào)整叉接觸蒜種鱗芽部位,在調(diào)整叉的作用下蒜種繞重心旋轉(zhuǎn),完成調(diào)頭作業(yè)。
1.電磁鐵 2.支架 3.限位螺栓 4.扶正通道 5.左側(cè)調(diào)整叉 6.右側(cè)調(diào)整叉 7.連接銷
1.Electromagnet 2.Frame 3.Limit bolt 4.Adjustment channel 5.Left directing device 6.Right directing device 7.Pin
注:箭頭方向?yàn)樗夥N運(yùn)動方向。
Note: Direction of arrow is the direction of garlic movement.
圖4 杠桿式蒜種扶正機(jī)構(gòu)示意圖
Fig.4 Schematic of lever type garlic adjustment mechanism
該系統(tǒng)以樹莓派為控制核心,由電源模塊、信號采集模塊、控制模塊、顯示模塊構(gòu)成控制系統(tǒng)硬件,如圖5所示。
圖5 系統(tǒng)硬件結(jié)構(gòu)圖
所采用的控制器為嵌入式Linux樹莓派3代B型處理器,運(yùn)行基于Linux的開源系統(tǒng),其體積?。?2 mm× 56 mm×19.5 mm,50 g),功耗低,適于野外長期工作。樹莓派3代B型采用64位1.2G主頻的四核芯ARM v8處理器(Broadcom BCM2837),有1G的RAM,以SD/MicroSD卡為內(nèi)存硬盤,主板周圍有4個(gè)USB接口、一個(gè)以太網(wǎng)接口和豐富的外部I/O口,本系統(tǒng)將其作為蒜種鱗芽方向識別與鱗芽扶正的主控模塊。
3.2.1 系統(tǒng)工作流程
系統(tǒng)上電開機(jī)后進(jìn)行初始化,輸入程序運(yùn)行指令開始運(yùn)行。系統(tǒng)主要工作流程圖如圖6所示。
圖6 大蒜排種及正芽試驗(yàn)臺工作流程圖
3.2.2 識別方法
蒜種頭尾在特征上有一定的差異,利用其紋理特征[30-31]識別蒜種鱗芽方向是一個(gè)有效的選擇。試驗(yàn)隨機(jī)挑選了50粒雜交大蒜蒜種進(jìn)行特征分析,利用USB攝像頭對每粒蒜種頭尾各拍攝一張圖像,拍攝背景為白色,采用LED補(bǔ)光燈補(bǔ)光。獲取的圖片格式為JPEG,分辨率為640×480像素,將圖像轉(zhuǎn)化為灰度圖,并通過計(jì)算得到蒜種頭尾圖像的能量、熵、慣性矩等統(tǒng)計(jì)特征值。通過比較蒜種頭尾圖像的能量、熵、慣性矩(如圖7所示)可知,每粒蒜種的頭部能量均大于尾部能量,頭部熵均小于尾部熵,頭部慣性矩均小于蒜種尾部慣性矩,蒜種頭尾紋理特征有明顯差異。蒜種頭尾圖像二值化處理后,可以通過比較同一閾值下二值圖像的黑色區(qū)域面積(黑色像素點(diǎn)數(shù)目)來識別蒜種鱗芽方向,黑色像素點(diǎn)多的圖像為蒜種尾部圖像,黑色像素點(diǎn)少的為蒜種頭部圖像。由圖8可知,識別閾值取75~200時(shí),蒜種尾部的黑色像素點(diǎn)數(shù)目均大于蒜種頭部的黑色像素點(diǎn)數(shù)目,識別閾值為175時(shí),蒜種頭尾像素點(diǎn)數(shù)目差別最大。圖9為選取不同閾值時(shí),蒜種頭尾圖像的識別效果圖,當(dāng)閾值小于175時(shí),隨著閾值的增加蒜種頭尾像素點(diǎn)數(shù)目差值增加,當(dāng)閾值高于175時(shí),隨著閾值的增加蒜種頭尾像素點(diǎn)數(shù)目差值減小。
圖7 蒜種頭尾特征對照曲線
圖8 不同閾值時(shí)蒜種頭尾圖像的黑色像素點(diǎn)數(shù)目
圖9 不同閾值時(shí)蒜種頭尾閾值效果圖
為了測試鱗芽扶正準(zhǔn)確率及對影響扶正率因素進(jìn)行優(yōu)化分析,進(jìn)行了蒜種鱗芽扶正試驗(yàn)設(shè)計(jì)。試驗(yàn)設(shè)備為大蒜排種及正芽試驗(yàn)臺,試驗(yàn)選取雜交大蒜為試驗(yàn)蒜種。實(shí)際播種需求及大蒜種植農(nóng)藝研究表明,大蒜種植中,蒜種鱗芽傾斜角小于30°視為朝上,即可達(dá)到滿意的種植效果[8,32]。
由于蒜種經(jīng)扶正裝置扶正后還要由插播鴨嘴進(jìn)行播種作業(yè),插播鴨嘴結(jié)構(gòu)對蒜種直立度有一定的修正作用。在扶正試驗(yàn)時(shí),用插播鴨嘴承接扶正后的蒜種,落入插播鴨嘴中的大蒜鱗芽朝上即為扶正合格。每組試驗(yàn)選用120粒蒜種進(jìn)行測試,以蒜種扶正率作為試驗(yàn)指標(biāo),蒜種扶正率的計(jì)算公式為
式中為蒜種扶正率,%;為鱗芽朝上的蒜種數(shù)量;0為試驗(yàn)蒜種總數(shù)。
在前期試驗(yàn)的基礎(chǔ)上,對影響蒜種識別較大的因素電動機(jī)轉(zhuǎn)速、通道寬度、拍攝距離、識別閾值進(jìn)行考察。分別設(shè)計(jì)以下單因素試驗(yàn),每組試驗(yàn)選用120粒蒜種進(jìn)行測試,考察各因素對蒜種鱗芽扶正率的影響。
由圖10可知,當(dāng)轉(zhuǎn)速低于30 r/min,電動機(jī)轉(zhuǎn)速對蒜種扶正率影響不明顯,當(dāng)轉(zhuǎn)速高于30 r/min時(shí),蒜種扶正率下降;隨著通道寬度、拍攝距離、識別閾值的增加,蒜種扶正率均呈先升高后降低的趨勢變化。為尋找最優(yōu)組合,選取電動機(jī)轉(zhuǎn)速為10、20、30 r/min,通道寬度為38、41、44 mm,拍攝距離為5、10、15 mm,識別閾值為155、175、195進(jìn)行正交試驗(yàn)。
4.3.1 試驗(yàn)結(jié)果
依據(jù) Box-Behnken 試驗(yàn)原理設(shè)計(jì)試驗(yàn)方案[33-34],每組試驗(yàn)選用120粒蒜種進(jìn)行測試,試驗(yàn)方案及結(jié)果如表1所示。
注:電動機(jī)轉(zhuǎn)速單因素試驗(yàn)時(shí),固定因素條件為:通道寬度為38 mm,拍攝距離10 mm,識別閾值為175;通道寬度單因素試驗(yàn)時(shí),固定因素條件為:電動機(jī)轉(zhuǎn)速為10 r·min-1,拍攝距離10 mm,識別閾值為175;拍攝距離單因素試驗(yàn)時(shí),固定因素條件為:電動機(jī)轉(zhuǎn)速為10 r·min-1,通道寬度為38 mm,識別閾值為175;識別閾值單因素試驗(yàn)時(shí),固定因素條件為:電動機(jī)轉(zhuǎn)速為10 r·min-1,通道寬度為38 mm,拍攝距離10 mm。
表1 試驗(yàn)方案與結(jié)果
注:括號中1、2、3、4為1、2、3、4實(shí)際值,單位分別為r·min-1、mmmm,無量綱。
Note: The actual values of1,2,3,4are shown in brackets. The units of1,2,3,4are r·min-1, mm and mm, and dimensionless.
4.3.2 回歸模型的建立與方差分析
運(yùn)用 Design-Expert 10 數(shù)據(jù)處理軟件對試驗(yàn)數(shù)據(jù)進(jìn)行多元回歸擬合,得到各因素與蒜種扶正率的回歸方程
回歸方程的方差分析結(jié)果見表2。蒜種扶正率的值小于0.01,表明回歸模型高度顯著。失擬項(xiàng)值大于0.05,說明無失擬因素存在,表明回歸方程擬合度高。各因素對蒜種扶正率影響的顯著性順序從大到小依次為通道寬度、電動機(jī)轉(zhuǎn)速、拍攝距離、識別閾值。模型決定系數(shù)2值為0.9038,表明該模型可以擬合90%以上的試驗(yàn)結(jié)果,可以用來進(jìn)行試驗(yàn)預(yù)測。
表2 回歸模型方差分析
注:*表示影響顯著,<0.05;**表示影響極顯著,<0.01。
Note: * Means the influence is significant,<0.05; ** means the influence is highly significant,<0.01.
4.3.3 因素影響效應(yīng)分析
依據(jù)建立的扶正率回歸模型,將其中 2 個(gè)試驗(yàn)因素置于零水平,考慮其他2因素對試驗(yàn)指標(biāo)的影響,繪制響應(yīng)面圖,如圖11所示。
如圖11a所示為拍攝距離、識別閾值處于中心水平時(shí),電動機(jī)轉(zhuǎn)速與通道寬度對蒜種扶正率的響應(yīng)曲面圖。通道寬度一定時(shí),隨著電動機(jī)轉(zhuǎn)速的增加,蒜種扶正率先增大后減小。電動機(jī)轉(zhuǎn)速一定時(shí),隨著通道寬度的增加,蒜種扶正率減小。在電動機(jī)轉(zhuǎn)速為15~25 r/min,通道寬度為38 mm時(shí),扶正率較高。如圖11b所示為通道寬度、識別閾值處于中心水平時(shí),電動機(jī)轉(zhuǎn)速與拍攝距離對蒜種扶正率的響應(yīng)曲面圖。由圖可知,拍攝距離與電動機(jī)轉(zhuǎn)速的交互作用不顯著。如圖11c所示為通道寬度、拍攝距離處于中心水平時(shí),電動機(jī)轉(zhuǎn)速與識別閾值對蒜種扶正率的響應(yīng)曲面圖。識別閾值一定時(shí),隨著電動機(jī)轉(zhuǎn)速的增加,蒜種扶正率先增大后減小。電動機(jī)轉(zhuǎn)速一定時(shí),隨著識別閾值的增加,蒜種扶正率先增大后減小。在電動機(jī)轉(zhuǎn)速為15~20 r/min,識別閾值為165~185時(shí),扶正率較高。如圖11d所示為電動機(jī)轉(zhuǎn)速、識別閾值處于中心水平時(shí),通道寬度與拍攝距離對蒜種扶正率的響應(yīng)曲面圖。拍攝距離一定時(shí),隨著通道寬度的增加,蒜種扶正率減小。通道寬度一定時(shí),隨著拍攝距離的增加,蒜種扶正率先增大后減小。在通道寬度為38 mm,拍攝距離為7~13 mm時(shí),扶正率較高。如圖11e所示為電動機(jī)轉(zhuǎn)速、拍攝距離處于中心水平時(shí),通道寬度與識別閾值對蒜種扶正率的響應(yīng)曲面圖。識別閾值一定時(shí),隨著通道寬度的增加,蒜種扶正率減小。通道寬度一定時(shí),隨著識別閾值的增加,蒜種扶正率先增大后減小。在通道寬度為38 mm,識別閾值為175~185時(shí),扶正率較高。如圖11f所示為電動機(jī)轉(zhuǎn)速、通道寬度處于中心水平時(shí),拍攝距離與識別閾值對蒜種扶正率的響應(yīng)曲面圖。識別閾值一定時(shí),隨著拍攝距離的增加,蒜種扶正率先增大后減小。拍攝距離一定時(shí),隨著識別閾值的增加,蒜種扶正率先增大后減小。在拍攝距離為7~13 mm,識別閾值為175~185時(shí),扶正率較高。
圖11 交互因素對蒜種扶正率影響的響應(yīng)曲面
4.3.4 參數(shù)優(yōu)化
為了使試驗(yàn)臺達(dá)到最佳工作性能,需要對試驗(yàn)中的影響因素進(jìn)行優(yōu)化。其目標(biāo)函數(shù)與約束條件為
利用Design-Expert 數(shù)據(jù)分析軟件對參數(shù)進(jìn)行最優(yōu)化求解,優(yōu)化后得到影響雜交蒜種扶正率因素的最佳參數(shù)組合為:電動機(jī)轉(zhuǎn)速為18.34 r/min、通道寬度為38 mm、拍攝距離為8.64 mm、識別閾值為178.36,此時(shí)蒜種扶正率為91.67%。
4.3.5 驗(yàn)證試驗(yàn)
為驗(yàn)證優(yōu)化結(jié)果的準(zhǔn)確性,對優(yōu)化參數(shù)進(jìn)行適當(dāng)取整,設(shè)置電動機(jī)轉(zhuǎn)速為18 r/min、通道寬度為38 mm、拍攝距離為8.6 mm、識別閾值為178,進(jìn)行3次重復(fù)試驗(yàn)取平均值,每組試驗(yàn)選用120粒蒜種進(jìn)行測試,試驗(yàn)驗(yàn)證結(jié)果如表3所示,蒜種平均扶正率為90.56%,實(shí)測值與預(yù)測值的相對誤差為1.11%,小于5% ,實(shí)測值與預(yù)測值較為吻合,說明回歸模型可靠,每粒蒜種的平均識別時(shí)間為0.29 s。
蒜種扶正失敗的主要原因是蒜種鱗芽錯(cuò)誤識別。造成鱗芽錯(cuò)誤識別的主要因素有:1)蒜種運(yùn)動及振動造成通道中的識別環(huán)境復(fù)雜,影響圖像的清晰度;2)大蒜個(gè)體間外形及鱗芽特征差異較大,影響鱗芽的識別準(zhǔn)確率。
表3 優(yōu)化值與試驗(yàn)驗(yàn)證值
1)設(shè)計(jì)了一種基于雙側(cè)圖像識別的大蒜排種及正芽試驗(yàn)臺,采用雙側(cè)圖像識別技術(shù),根據(jù)蒜種不同的頭尾特征,識別蒜種鱗芽并控制杠桿式蒜種扶正機(jī)構(gòu)對其進(jìn)行扶正,實(shí)現(xiàn)大蒜單粒取種及鱗芽扶正功能。解決了難以采用純機(jī)械機(jī)構(gòu)對雜交大蒜鱗芽扶正的問題。
2)通過單因素試驗(yàn)和正交試驗(yàn)對影響蒜種扶正率的因素(電動機(jī)轉(zhuǎn)速、通道寬度、拍攝距離、識別閾值)進(jìn)行了研究,采用Box-Behnken試驗(yàn)設(shè)計(jì)方法建立了以雜交大蒜扶正率為響應(yīng)指標(biāo)的二次回歸模型,模型決定系數(shù)2值為0.903 8。對所建立的回歸模型進(jìn)行優(yōu)化,最優(yōu)工作參數(shù)組合為:電動機(jī)轉(zhuǎn)速為18.34 r/min、通道寬度為38 mm、拍攝距離為8.64 mm、識別閾值為178.36,此時(shí)扶正率為91.67%。對該最優(yōu)參數(shù)組合進(jìn)行取整并進(jìn)行試驗(yàn),結(jié)果為90.56%,實(shí)測值與預(yù)測值的相對誤差為1.11%,與預(yù)測值較為吻合,平均每粒蒜種識別時(shí)間為0.29 s,滿足大蒜機(jī)械化播種要求。
[1]栗曉宇,耿愛軍,侯加林,等. 大蒜播種機(jī)研究現(xiàn)狀及展望[J]. 農(nóng)業(yè)機(jī)械,2017(2):105-107,109.
[2]Lee S Y, Park H J, Kweon G Y. Basic study on a garlic (L.) upright planter[J]. Korean Journal of Agricultural Science, 2019, 46(2): 341-350.
[3]Kim D, Yang S H. Parameter analysis of vacuum suction hole in developing garlic vacuum planter[C]//Proceedings of the Korean Society for Agricultural Machinery Conference. Korean Society for Agricultural Machinery, 2017: 92.
[4]Calderon R E. Aportaciones a La Mecanización de la Siembra del ajo. Dise?o de una Sembradora Neumática de Precisión[D]. Valencia: Universitat Politècnica de València, 2016.
[5]Salda?a-Robles N, Serwatowski Hlawinska R J, Aguilera Hernández R A, et al. Localización del ápice del ajo mediante técnicas de análisis digital de imagen[J]. Agrociencia, 2016, 50(2): 215-225.
[6]侯加林,黃圣海,牛子孺,等. 雙鴨嘴式大蒜正頭裝置調(diào)頭機(jī)理分析與試驗(yàn)[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2018,49(11):87-96.
Hou Jialin, Huang Shenghai, Niu Ziru, et al. Mechanism analysis and test of adjusting garlics upwards using two duckbill devices[J]. Transactions of the Chinese Society for Agricultural Machinery, 2018, 49(11): 87-96. (in Chinese with English abstract)
[7]栗曉宇,耿愛軍,侯加林,等. 全自動蒜種盒提取投放裝置設(shè)計(jì)與試驗(yàn)[J]. 農(nóng)業(yè)工程學(xué)報(bào),2017,33(23):32-37.
Li Xiaoyu, Geng Aijun, Hou Jialin, et al. Design and experiment of full-automatic lifting and releasing device of garlic seed box[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(23): 32-37. (in Chinese with English abstract)
[8]耿愛軍,栗曉宇,侯加林,等. 自動定向大蒜播種機(jī)的設(shè)計(jì)與試驗(yàn)[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(11):17-25.
Geng Aijun, Li Xiaoyu, Hou Jialin, et al. Design and experiment of automatic directing garlic planter[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(11): 17-25. (in Chinese with English abstract)
[9]文恩楊,吳彥強(qiáng),李天華,等. 牽引式大蒜播種機(jī)的設(shè)計(jì)[J]. 農(nóng)機(jī)化研究,2020,42(1):96-100.
Wen Enyang, Wu Yanqiang, Li Tianhua, et al. Design of traction garlic sowing machine[J]. Journal of Agricultural Mechanization Research, 2020, 42(1): 96-100. (in Chinese with English abstract)
[10]謝學(xué)虎,張永,劉召,等. 大蒜播種機(jī)種植機(jī)構(gòu)的設(shè)計(jì)[J].農(nóng)業(yè)工程學(xué)報(bào),2015,31(1):34-39.
Xie Xuehu, Zhang Yong, Liu Zhao, et al. Design of planting mechanism for garlic planter[J]. Transactions of the Chinese Society of Agricultural Engineerng (Transactions of the CSAE), 2015, 31(1): 34-39. (in Chinese with English abstract)
[11]耿愛軍,張兆磊,宋占華,等. 蒜種盒機(jī)械投放過程運(yùn)動學(xué)分析與參數(shù)優(yōu)化試驗(yàn)[J]. 農(nóng)業(yè)工程學(xué)報(bào),2016,32(5):29-35.
Geng Aijun, Zhang Zhaolei, Song Zhanhua, et al. Kinematic analysis and parameter optimized experiment of garlic box putting process[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2016, 32(5): 29-35. (in Chinese with English abstract)
[12]李立新,李小忠,錢志兵. 大蒜播種機(jī)械現(xiàn)狀與發(fā)展方向[J]. 現(xiàn)代農(nóng)業(yè)科技,2012(21):220-221.
Li Lixin, Li Xiaozhong, Qian Zhibing. Present situation and development direction of garlic sowing machinery[J]. Modern Agricultural Sciences and Technology, 2012(21): 220-221. (in Chinese with English abstract)
[13]郭小清,范濤杰,舒欣. 基于改進(jìn)Multi-Scale AlexNet的番茄葉部病害圖像識別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2019,35(13):162-169.
Guo Xiaoqing, Fan Taojie, Shu Xin. Tomato leaf diseases recognition based on improved Multi-Scale AlexNet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(13): 162-169. (in Chinese with English abstract)
[14]李玉華,李天華,牛子孺,等. 基于色飽和度三維幾何特征的馬鈴薯芽眼識別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(24):158-164.
Li Yuhua, Li Tianhua, Niu Ziru, et al. Potato bud eyes recognition based on three-dimensional geometric features of color saturation[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(24): 158-164. (in Chinese with English abstract)
[15]鄧向武,齊龍,馬旭,等. 基于多特征融合和深度置信網(wǎng)絡(luò)的稻田苗期雜草識別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(14):165-172.
Deng Xiangwu, Qi Long, Ma Xu, et al. Recognition of weeds at seedling stage in paddy fields using multi-featurefusion and deep belief networks[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(14): 165-172. (in Chinese with English abstract)
[16]王丹丹,何東健. 基于R-FCN深度卷積神經(jīng)網(wǎng)絡(luò)的機(jī)器人疏果前蘋果目標(biāo)的識別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2019,35(3):156-163.
Wang Dandan, He Dongjian. Recognition of apple targets before fruits thinning by robot based on R-FCN deep convolution neural network[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(3): 156-163. (in Chinese with English abstract)
[17]張麗芬. 大蒜種植機(jī)械蒜瓣方向識別與系統(tǒng)設(shè)計(jì)—基于PLC控制技術(shù)[J]. 農(nóng)機(jī)化研究,2017,39(8):228-230.
Zhang Lifen. Planting garlic cloves machine PLC control technology and system design—based on the direction identification[J]. Journal of Agricultural Mechanization Research, 2017, 39(8): 228-230. (in Chinese with English abstract)
[18]席東河,陸劍,劉志剛,等. 大蒜種植機(jī)械蒜瓣方向識別算法與控制系統(tǒng)設(shè)計(jì)[J]. 農(nóng)機(jī)化研究,2015,37(5):82-85.
Xi Donghe, Lu Jian, Liu Zhigang, et al. Algorithm and control system design on garlic direction identification of garlic planting machine[J]. Journal of Agricultural Mechanization Research, 2015, 37(5): 82-85. (in Chinese with English abstract)
[19]宋偉,趙麗清. 基于機(jī)器視覺的蒜頭最大橫切面直徑分級方法[J]. 農(nóng)機(jī)化研究,2015,37(7):203-205,212.
Song Wei, Zhao Liqing. Grading method of garlic by maximum cross-sectional diameter based on machine vision[J]. Journal of Agricultural Mechanization Research, 2015, 37(7): 203-205, 212. (in Chinese with English abstract)
[20]曹世佳. 基于圖像識別的種植機(jī)器人的研究與應(yīng)用[D]. 石家莊:河北科技大學(xué),2019.
Cao Shijia. Research and Application of Planting Robot Based on Image Recognition[D]. Shijiazhuang: Hebei University of Science & Technology, 2019. (in Chinese with English abstract)
[21]趙麗清,馬志勇. 大蒜播種機(jī)裝盤系統(tǒng)蒜瓣定向識別算法的研究[J]. 農(nóng)機(jī)化研究,2013,35(6):163-166.
Zhao Liqing, Ma Zhiyong. The study of garlic machine installation system of the directional recognition algorithm[J]. Journal of Agricultural Mechanization Research, 2013, 35(6): 163-166. (in Chinese with English abstract)
[22]郭英芳. 大蒜種植機(jī)械中蒜瓣方向識別方法的研究[D]. 楊凌:西北農(nóng)林科技大學(xué),2011.
Guo Yingfang. Research of the Recognition Method of Garlic Direction in Planting Machinery[D]. Yangling: Northwest A&F University, 2011. (in Chinese with English abstract)
[23]楊清明,李娟玲,何瑞銀. 基于圖像處理的大蒜蒜瓣朝向識別[J]. 浙江農(nóng)業(yè)學(xué)報(bào),2010,22(1):119-123.
Yang Qingming, Li Juanling, He Ruiyin. Direction identification of garlic seeds based on image processing[J]. Acta Agriculturae Zhejiangensis, 2010, 22(1): 119-123. (in Chinese with English abstract)
[24]方春,孫福振,任崇廣. 基于深度學(xué)習(xí)的大蒜鱗芽朝向識別研究[J]. 計(jì)算機(jī)應(yīng)用研究,2019,36(2):598-600,610.
Fang Chun, Sun Fuzhen, Ren Chongguang. Identifying bulbil direction of garlic based on deep learning[J]. Application Research of Computers, 2019, 36(2): 598-600, 610. (in Chinese with English abstract)
[25]謝忠紅,徐煥良,黃秋桂,等. 基于高光譜圖像和深度學(xué)習(xí)的菠菜新鮮度檢測[J]. 農(nóng)業(yè)工程學(xué)報(bào),2019,35(13):277-284.
Xie Zhonghong, Xu Huanliang, Huang Qiugui, et al. Spinach freshness detection based on hyperspectral image and deep learning method[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(13): 277-284. (in Chinese with English abstract)
[26]孫鈺,周焱,袁明帥,等. 基于深度學(xué)習(xí)的森林蟲害無人機(jī)實(shí)時(shí)監(jiān)測方法[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(21):74-81.
Sun Yu, Zhou Yan, Yuan Mingshuai, et al. UAV real-time monitoring for forest pest based on deep learning[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(21): 74-81. (in Chinese with English abstract)
[27]郭英芳,王志華. 基于圖像處理的大蒜瓣尖識別方法[J].陜西農(nóng)業(yè)科學(xué),2015,61(8):54-57.
[28]吳獻(xiàn),胡偉. 基于觀測窗的大蒜鱗芽朝向識別研究[J]. 測控技術(shù),2016,35(7):35-39.
Wu Xian, Hu Wei. Research on garlic clove orientation recognition based on observation window[J]. Measurement & Control Technology, 2016, 35(7): 35-39. (in Chinese with English abstract)
[29]錢建平,李明,楊信廷,等. 基于雙側(cè)圖像識別的單株蘋果樹產(chǎn)量估測模型[J]. 農(nóng)業(yè)工程學(xué)報(bào),2013,29(11):132-138.
Qian Jianping, Li Ming, Yang Xinting, et al. Yield estimation model of single tree of Fuji apples based on bilateral image identification[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(11): 132-138. (in Chinese with English abstract)
[30]劉舒,姜琦剛,邵永社,等. 應(yīng)用灰度共生矩陣的紋理特征描述的研究[J]. 科學(xué)技術(shù)與工程,2012,12(33):8909-8914.
Liu Shu, Jiang Qigang, Shao Yongshe, et al. Investigation of the textual description based on gray level co-occurrence matrix measurements[J]. Science Technology and Engineering, 2012, 12(33): 8909-8914. (in Chinese with English abstract)
[31]Hum C Y, Lai K W, Tan T S, et al. Gray-level co-occurrence matrix bone fracture detection[J]. American Journal of Applied Sciences, 2011, 8(1): 26-32.
[32]劉靜. 不同大蒜品種及鱗芽播種朝向?qū)ιL特性與品質(zhì)的影響[D]. 泰安:山東農(nóng)業(yè)大學(xué),2018.
Liu Jing. Effects of Different Garlic Varieties and Bulbil Seeding Directions on Growth Characteristic and Quality[D]. Taian: Shandong Agricultural University, 2018. (in Chinese with English abstract)
[33]葛宜元. 試驗(yàn)設(shè)計(jì)方法與 Design-Expert 軟件應(yīng)用[M]. 哈爾濱:哈爾濱工業(yè)大學(xué)出版社,2015.
[34]潘麗軍,陳錦權(quán). 試驗(yàn)設(shè)計(jì)與數(shù)據(jù)處理[M]. 南京:東南大學(xué)出版社,2008.
Design and experiment of test bench for garlic bulbil adjustment and seeding based on bilateral image identification
Hou Jialin, Tian Lin, Li Tianhua, Niu Ziru, Li Yuhua※
(1.2710182.271018)
Garlic is one of the most important cash crops in China. Single grain sowing in garlic planting needs to follow the agronomic requirements of the upward bulbil and downward root. Since foreign garlic planters cannot be used for hybrid garlic sowing in our case, it becomes necessary for domestic garlic planters to adjust the direction of various garlic bulbils using mechanical devices. These garlic planters have a good effect on the sowing of Cangshan garlic, but not good on that of the hybrid garlic. The reason is that the irregular shape of the hybrid garlic cannot meet the condition of the center of gravity locating at the lower half of the garlic clove. In this case of the irregular garlic, the mechanical directing device also fail to adjust the direction of the garlic bulbil. Here a test bench for the garlic seeding was designed to solve the sowing of the hybrid garlic. The test bench of garlic sowing is mainly composed of a seed taking device, a garlic sorting device, an image acquiring machine, a detecting system of garlic bulbil direction, a device of garlic seed directing, and a box for the garlic seeds. The motor with adjustable speeds can serve as the power source for the test bench of the garlic seeding. The following procedure will be performed on this test bench. The power of the motor via the chain drive can first be input to the single-grain taking device with large/small scoops, which can take the single-grained garlic out from the storing box. A large scoop can take one or more garlic seeds in one time, where the single-grain spoon can be turned 90o counter clockwise to transfer the garlic into the small volume of the spoon. Since the small spoon can hold only one garlic, the rest of garlics fall back into the seed box. The device of the single-grain picking transports the garlic and flips the spoon at the top of the garlic channel. Due to the movement of the garlic baffle and various gravity-center of garlics, the garlic seeds that fell into the garlic channel can be arranged horizontally to move linearly with the downward baffle. When the garlic reached to the location of the image collection, the photoelectric sensor can be triggered to control each of the USB cameras on the both sides of the garlic channel to take an image. Based on the collected image showing the bulbil/root of the garlic, the detecting device can identify the direction of the garlic bulbil, whereas the directing device of garlic seed can adjust timely the direction of the garlic. In the course of the garlic seeding, it is necessary to optimize the operating parameters of the test bench. Therefore, the test factors can be selected as the motor speed, the width of the garlic channel, the shooting distance, and the recognition threshold, while the test index as the directing rate of garlic seed. The performance test for the test bench of garlic seeding was carried out by using Box-Behnken analytical method to obtain the influence of the seed directing rate on the sowing of hybrid garlic. The primary and secondary factors in order were the width of the garlic channel, the motor speed, the shooting distance and the recognition threshold. These parameters can then be optimized in the data-processing software Design Expert 10. The optimum parameters can be achieved as the index of the seed directing rate: the motor speed was 18.34 r/min, the width of the garlic channel was 38 mm, the shooting distance was 8.64 mm, and the recognition threshold was 178.36. The seed directing rate was reached 91.67% predicted by the model. Under the condition of modified optimum working parameters, the garlic seed directing rate in the physical test can reached 90.56%, showing that the experimental results were consistent with the optimized simulation. The average identification time of a garlic was 0.29 s, which can meet the requirements of the sowing speed of the garlic planter. These findings can provide insightful application for the vertical planting technology of hybrid garlics.
agricultural machinery; models; garlic planter; design; experiments; bulbil identification; garlic seed adjustment
侯加林,田林,李天華,牛子孺,李玉華. 基于雙側(cè)圖像識別的大蒜正芽及排種試驗(yàn)臺設(shè)計(jì)與試驗(yàn)[J]. 農(nóng)業(yè)工程學(xué)報(bào),2020,36(1):50-58.doi:10.11975/j.issn.1002-6819.2020.01.006 http://www.tcsae.org
Hou Jialin, Tian Lin, Li Tianhua, Niu Ziru, Li Yuhua. Design and experiment of test bench for garlic bulbil adjustment and seeding based on bilateral image identification[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(1): 50-58. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2020.01.006 http://www.tcsae.org
2019-08-24
2019-12-24
國家特色蔬菜產(chǎn)業(yè)技術(shù)體系項(xiàng)目(CARS-24-D-01);山東省農(nóng)機(jī)裝備研發(fā)創(chuàng)新計(jì)劃項(xiàng)目(2017YF001);山東省農(nóng)業(yè)重大應(yīng)用技術(shù)創(chuàng)新項(xiàng)目(SD2019NJ004)
侯加林,教授,博士生導(dǎo)師,主要從事智能農(nóng)業(yè)裝備研究。Email:jlhou@sdau.edu.cn
李玉華,講師,博士生,主要從事智能農(nóng)業(yè)裝備研究。Email:liyuhua@sdau.edu.cn
10.11975/j.issn.1002-6819.2020.01.006
S223.2
A
1002-6819(2020)-01-0050-09