傅隆生,孫世鵬,Vázquez-Arellano Manuel,李石峰,李 瑞,崔永杰
?
基于果萼圖像的獼猴桃果實(shí)夜間識(shí)別方法
傅隆生1,孫世鵬1,Vázquez-Arellano Manuel2,李石峰1,李 瑞1,崔永杰1※
(1. 西北農(nóng)林科技大學(xué)機(jī)械與電子工程學(xué)院,楊凌 712100;2. Institute of Agricultural Engineering, University of Hohenheim, Stuttgart 70599, Germany)
根據(jù)獼猴桃的棚架式栽培方式,提出了一種適用于獼猴桃采摘機(jī)器人夜間識(shí)別的方法。采用豎直向上獲取果實(shí)圖像的拍攝方式,以果萼為參考點(diǎn),進(jìn)行果實(shí)的識(shí)別,并測(cè)試該方法對(duì)光照的魯棒性。試驗(yàn)結(jié)果表明:基于果萼能夠有效的識(shí)別獼猴桃果實(shí),成功率達(dá)94.3%;未識(shí)別和誤識(shí)別的果實(shí)一般出現(xiàn)在5果及5果以上的簇中,原因是果實(shí)相互擠壓導(dǎo)致的果萼部分不在果實(shí)圖像的中心區(qū)域,以及果實(shí)之間的三角區(qū)形成暗色封閉區(qū)域;光照過(guò)小或過(guò)大會(huì)導(dǎo)致成像模糊或過(guò)曝,對(duì)正確率有細(xì)微影響;識(shí)別速度達(dá)到了0.5 s/個(gè)。因此,基于果萼的獼猴桃果實(shí)夜間識(shí)別方法在正確識(shí)別率和速度上都有很大提升,更接近實(shí)際應(yīng)用。
機(jī)器人;圖像識(shí)別;農(nóng)作物;獼猴桃;果萼;夜間識(shí)別;毗鄰果實(shí)
中國(guó)是世界上獼猴桃種植面積最大的國(guó)家[1-2],但目前靠人工采摘,是獼猴桃種植中最費(fèi)時(shí)費(fèi)力的環(huán)節(jié)[3]。此外,中國(guó)用于水果采摘的勞動(dòng)力占整個(gè)生產(chǎn)過(guò)程所用勞動(dòng)力的1/3以上[4-6]。因此,研究獼猴桃等果實(shí)的采摘機(jī)器人具有重要意義[7]。
獼猴桃一般采用棚架式的栽培方式,獼猴桃果實(shí)顏色與枯草、枯葉、枝干、果柄等復(fù)雜背景的顏色相近[8]。因此自然環(huán)境下對(duì)目標(biāo)果實(shí)的準(zhǔn)確分割、特征提取、識(shí)別和定位是獼猴桃采摘機(jī)器人視覺(jué)系統(tǒng)需要解決的一個(gè)關(guān)鍵問(wèn)題[9]{傅隆生, 2015 #56}。
針對(duì)獼猴桃果實(shí)的日間識(shí)別,已有研究多是參考其它果實(shí)[10-15],從果實(shí)斜側(cè)面獲取圖像進(jìn)行識(shí)別。丁亞蘭等[16]提出利用R-B顏色因子,采用固定閾值93進(jìn)行圖像分割,獲得果實(shí)區(qū)域,但未涉及單個(gè)獼猴桃的識(shí)別;崔永杰等[17]利用L*a*b*顏色空間a*通道對(duì)獼猴桃圖像進(jìn)行分割,采用橢圓形Hough變換擬合單個(gè)果實(shí)輪廓從而識(shí)別每個(gè)果實(shí);武濤等[18]運(yùn)用Otsu算法在a*通道進(jìn)行圖像分割,結(jié)合分水嶺算法識(shí)別單個(gè)果實(shí);慕軍營(yíng)等[19]同樣使用Otsu算法在a*通道進(jìn)行圖像分割,但采用正橢圓Hough變換提取針對(duì)Canny算子獲取的邊緣圖像識(shí)別獼猴桃果實(shí),平均時(shí)間為3.98 s,成功率為88.5%;崔永杰等[20]在對(duì)比獼猴桃果實(shí)及其背景的顏色特征基礎(chǔ)上,提出利用0.9R-G進(jìn)行圖像分割,再采用橢圓形Hough變換進(jìn)行單個(gè)果實(shí)的識(shí)別,成功率是89.1%。以上研究主要利用獼猴桃的橢圓形特征進(jìn)行目標(biāo)識(shí)別,但未有效解決果實(shí)的重疊遮擋問(wèn)題。
由于機(jī)器人擁有全天候工作的優(yōu)勢(shì)[21-23],故也需要進(jìn)行夜間果實(shí)的識(shí)別[24]。根據(jù)獼猴桃的棚架式栽培方式而形成果實(shí)自然下垂且成簇位于枝葉下方的特點(diǎn),F(xiàn)u等[25]提出從地面豎直向上獲取圖像進(jìn)行果實(shí)識(shí)別的方法,并研究了最佳照明設(shè)置。該研究根據(jù)試驗(yàn)結(jié)果,提出1.1R-G顏色特性進(jìn)行圖像分割,針對(duì)Canny算子獲得的圖像邊緣,采用最小外接矩形法和橢圓形Hough變換識(shí)別每個(gè)果實(shí)。研究結(jié)果表明光照為50 lux時(shí)的識(shí)別效果最好,達(dá)88.3%,平均每個(gè)果實(shí)的識(shí)別時(shí)間為1.64 s。但識(shí)別時(shí)間過(guò)長(zhǎng),相比于采摘機(jī)器人研究中蘋(píng)果的0.35 s[26]和草莓的0.44 s[21],該研究還有很大提升空間,且成功率也有望提高。
因此,本文針對(duì)前述研究存在的問(wèn)題,結(jié)合夜間環(huán)境下獼猴桃成像后的特點(diǎn),每個(gè)果實(shí)的果萼都顯現(xiàn),提出基于果萼的獼猴桃果實(shí)夜間識(shí)別方法,以期達(dá)到提高識(shí)別率和速度的目的。
1.1 圖像采集
在西北農(nóng)林科技大學(xué)眉縣獼猴桃試驗(yàn)站(34°07'39''N,107°59'50''E,海拔648 m),以當(dāng)?shù)刈顬閺V泛種植的海沃德品種為研究對(duì)象,于每年的收獲季節(jié)10月下旬采集圖像。具體場(chǎng)景如圖1所示,將一個(gè)常規(guī)的攝像頭(Microsoft, LifeCam studio,分辨率640像素×360像素)通過(guò)三腳架置于果實(shí)下方20 cm處(實(shí)際被成像果實(shí)區(qū)域約為 36 cm×20 cm),接往筆記本計(jì)算機(jī)(ThinkPad T400,2.53GHz)用于保存圖像。為實(shí)現(xiàn)目標(biāo)果實(shí)處的均勻光照,照明由一臺(tái)離果實(shí)1 m遠(yuǎn)的無(wú)級(jí)可調(diào)光LED影視平板燈提供(CM-LED 1200HS, 武漢珂瑪影視燈光科技有限公司,最大照度為1 m遠(yuǎn)的1 200 lux),利用平板照明的柔和均勻特點(diǎn)。同時(shí)測(cè)試不同光照下的識(shí)別效果并提出最佳光照度,設(shè)置了12個(gè)不同光照水平(10、30、50、80、110、150、200、300、400、500、800、1 200 lux),以果實(shí)附近的3次光照測(cè)量值的平均值為準(zhǔn)(TES-1332A數(shù)字式照度計(jì),臺(tái)灣泰仕電子工業(yè)股份有限公司)。由于獼猴桃的特殊生長(zhǎng)模式產(chǎn)生果實(shí)下垂的特點(diǎn)和末端執(zhí)行器自下向上包絡(luò)分離的工作方式,當(dāng)采用底部成像的方式時(shí),為一次性將多個(gè)果實(shí)納入圖片中,視覺(jué)系統(tǒng)和光源離果實(shí)不會(huì)很近,因此產(chǎn)生局部曝光過(guò)度的可能性較低。
1.2 圖像預(yù)處理
獼猴桃本身呈棕色[27-28],背景大多是綠色或者是淺綠色的葉子、藤蔓等,以及少許的支架和晚上黑色的背景信息,如圖2a所示。由前述研究[25]可知,提取RGB圖像1.1R-G合成的灰度圖像,最有利于分割獼猴桃與背景,如圖2b所示。通過(guò)中值濾波去除灰度圖像中的噪聲,采用最大類(lèi)間方差法(Otsu)[29]獲取自動(dòng)閾值,將灰度圖像轉(zhuǎn)化二值圖像,如圖2c所示。再標(biāo)記連通域,由于連通域?yàn)槎鄠€(gè)或單個(gè)獼猴桃區(qū)域,取像素面積最大的連通域?yàn)閰⒖?,去除所有小于參考像素面積0.2倍的連通域,如圖2d所示。最后,按最大面積的1/45進(jìn)行膨脹,再利用空洞填充函數(shù)填充空洞,最后獲取果實(shí)所在區(qū)域,如圖2e所示。與原始的RGB圖像按位做與運(yùn)算,即可獲得果實(shí)區(qū)域圖像,如圖2f所示。
1.3 圖像識(shí)別
由于獼猴的果實(shí)區(qū)域與果萼部分的亮度值有很大的不同,因此利用亮度分量圖像提取果萼部分,圖3為圖像識(shí)別過(guò)程。具體步驟如下:
1)把RGB顏色空間轉(zhuǎn)換到HSV顏色空間,提取V(亮度)分量圖像,如圖3a所示。
2)圖像中值濾波后提取果實(shí)區(qū)域的Otsu閾值進(jìn)行二值化處理,如圖3b所示。
3)取最大白色區(qū)域像素?cái)?shù)的平方根的1/90進(jìn)行形態(tài)學(xué)開(kāi)運(yùn)算,獲得包含果萼部分的果實(shí)區(qū)域圖像,如圖3c所示。圖中黑色部分,最大為背景區(qū)域,其次為果萼部分,最小的為噪聲。因此對(duì)所有黑色區(qū)域求取像素面積N,從大至小進(jìn)行排序?yàn)?、2、…N(為黑色區(qū)域的數(shù)量,大于1時(shí)表示圖像中有獼猴桃果實(shí)),最大值1為黑色背景的像素?cái)?shù),次大值2則為某個(gè)獼猴桃果萼部分的像素?cái)?shù)。由于獼猴桃果萼部分面積最大值與最小值之比一般在10倍以?xún)?nèi),而噪聲面積必定小于任意一個(gè)獼猴桃果萼部分,因此取面積次大的黑色區(qū)域的像素?cái)?shù)2作為果萼部分的參考面積。若小于參考面積的0.1倍,為噪聲區(qū)域;介于參考面積和0.1倍的參考面積之間,為其他果萼,從而獲得果萼的數(shù)量,即為獼猴桃個(gè)數(shù)。
1.噪聲 2.果萼區(qū)域
1. Noise 2. Fruit calyx area
注:圖3f中的亮點(diǎn)表示果萼位置,圓圈表示識(shí)別的每個(gè)果實(shí)區(qū)域。下同。
Note: Bright points and circles in Fig. 3f are identified fruit calyx and recognized fruit area. Same as below.
圖3 果實(shí)識(shí)別過(guò)程
Fig.3 Fruit recognition process
當(dāng)N>0.1×2且N+1≤0.1×2,則=–1(為2,3,…,)。
由于每個(gè)果萼部分都近似一個(gè)圓形或者橢圓形,所以對(duì)每一組標(biāo)記的點(diǎn)求取中位數(shù),即為該果萼的中心坐標(biāo)。針對(duì)圖2e所示的二值圖像利用Canny算子獲得獼猴桃果實(shí)邊緣圖像,如圖3d所示。對(duì)每一個(gè)獼猴桃果萼中心,遍歷對(duì)應(yīng)的邊緣的像素點(diǎn),尋找最近的邊緣像素點(diǎn),如圖3e所示。以該距離為半徑、果萼中心為原點(diǎn),繪制獼猴桃區(qū)域圓,即可確定果實(shí)位置和區(qū)域,如圖3f所示。
此時(shí)雖然不能精確的分割獼猴桃果實(shí)所占的區(qū)域,但由于果萼位置和主要區(qū)域已確定,采用本項(xiàng)目開(kāi)發(fā)的獼猴桃采摘機(jī)器人末端執(zhí)行器[9]能夠?qū)崿F(xiàn)果實(shí)的采摘。該末端執(zhí)行器根據(jù)獼猴桃的生長(zhǎng)特點(diǎn),采用仿形設(shè)計(jì)的理念,利用獼猴桃果實(shí)相鄰之間在底部形成的人字形毗鄰間隙和垂直耷拉擁有擺動(dòng)空間的優(yōu)勢(shì),從果實(shí)底部旋轉(zhuǎn)上升伸入毗鄰間隙,逐漸包絡(luò)分離毗鄰果實(shí),實(shí)現(xiàn)前后夾持和抓取。最后,末端執(zhí)行器向上轉(zhuǎn)動(dòng)實(shí)現(xiàn)果實(shí)-果柄的分離。該末端執(zhí)行器[9]由于采用逐漸包絡(luò)的方式分離毗鄰果實(shí)并抓持,試驗(yàn)結(jié)果表明允許的誤差半徑為10 mm,因此只需要知道果萼位置和果實(shí)的大部分區(qū)域即可,避免了果實(shí)實(shí)際區(qū)域難以精確定位的問(wèn)題。
試驗(yàn)共采集36簇獼猴桃果實(shí)的圖像(2013年10月26日,5簇20個(gè)果實(shí);2014年10月23日,10簇40個(gè)果實(shí);2014年10月27日,10簇35個(gè)果實(shí);2015年10月25日,11簇45個(gè)果實(shí);共140個(gè)果實(shí),平均每簇4個(gè)果實(shí)),每簇分別在12個(gè)不同光照水平下采集了1幅夜視圖像,共432幅獼猴桃夜視圖像。圖4為其中1簇獼猴桃對(duì)應(yīng)的12幅夜視圖像。當(dāng)光照度較低時(shí),如圖4a和4b所示的10和30 lux,此時(shí)圖像較暗且有些模糊。當(dāng)光照度大于50 lux后,圖像都比較清晰,本文以50 lux光照下的圖像進(jìn)行分析。
a. 10 luxb. 30 luxc. 50 luxd. 80 lux e. 110 luxf. 150 luxg. 200 luxh. 300 lux i. 400 luxj. 500 luxk. 800 luxl. 1 200 lux
2.1 果萼的識(shí)別效果
果實(shí)的識(shí)別率取決于果萼的識(shí)別結(jié)果,因此以50 lux下的果萼識(shí)別效果為例,先分析某一光照下的結(jié)果。根據(jù)每簇所包含的獼猴桃果實(shí)數(shù),將36簇樣本分為5類(lèi):2果簇、3果簇、4果簇、5果簇、5果以上簇,每類(lèi)的簇?cái)?shù)和果實(shí)數(shù)如表1所示。大部分獼猴桃簇都是包含3個(gè)、4個(gè)或5個(gè)果實(shí),占試驗(yàn)樣本總簇?cái)?shù)的80.6%。2果簇和5果以上簇相對(duì)較少,分別占11.1%和8.3%。與實(shí)際調(diào)研中發(fā)現(xiàn)的大部分簇包含3至5個(gè)果實(shí)的結(jié)果一致。
根據(jù)試驗(yàn)結(jié)果,識(shí)別效果分為3類(lèi):未識(shí)別的果萼(果萼存在,卻未識(shí)別出來(lái))、誤識(shí)別的果萼(將不是果萼的位置識(shí)別為果萼)、正確識(shí)別的果萼,具體識(shí)別結(jié)果如表1所示。以正確識(shí)別率做為評(píng)價(jià)指標(biāo),定義為
=/(+)×100%
式中為正確識(shí)別的果萼數(shù),為誤識(shí)別的果萼數(shù),為正確識(shí)別率,%。
正確識(shí)別的果萼數(shù)占果實(shí)數(shù)的比例隨著獼猴桃簇包含的果實(shí)數(shù)量增多而降低,2果簇和3果簇的比例達(dá)到了100%,4果簇、5果簇和5果以上簇分別為97.9%、94.3%和78.9%。誤識(shí)別的果萼數(shù)占果實(shí)數(shù)的比例隨著獼猴桃簇包含的果實(shí)數(shù)量增多而上升,最高達(dá)到了31.6%(5果以上簇)。與Fu等[25]的研究結(jié)果相比,3果族、4果簇和5果簇都在正確識(shí)別率上有顯著的提升(Fu等[25]未研究5果以上的識(shí)別),總的正確識(shí)別率由88.3%提高到了94.3%。
果萼未正確識(shí)別的情況主要出現(xiàn)在4果及以上的簇中。當(dāng)果實(shí)分布存在某一個(gè)果實(shí)與3個(gè)或更多果實(shí)相接觸時(shí),相互之間擠壓嚴(yán)重,使得部分果實(shí)并非豎直向下,而是有所傾斜,導(dǎo)致果萼部分不在果實(shí)圖像的中心區(qū)域,如圖5所示。因此,在圖3c所示的果萼區(qū)域形態(tài)學(xué)運(yùn)算中,易將該部分處理為非封閉區(qū)域,引起未識(shí)別。
表1 光照為50 lux下不同果簇的果萼識(shí)別結(jié)果
a. 原始圖像a. Original imageb. 果萼判別圖像b. Image for detecting fruit calyxes c. 果實(shí)識(shí)別結(jié)果c. Fruit recognition results
1.未識(shí)別果萼 2.誤識(shí)別果萼
1. Undetected fruit calyx 2. Wrongly detected fruit calyx
圖5 未識(shí)別和誤識(shí)別的果實(shí)示例
Fig.5 Example of undetected and wrongly detected fruits
此外,3個(gè)及以上的果實(shí)相互接觸時(shí),會(huì)在接觸的三角區(qū)形成暗色封閉區(qū)域,且面積與果萼部分相當(dāng)。在圖3c所示的果萼區(qū)域識(shí)別過(guò)程中,會(huì)被誤識(shí)別為果萼,如圖5b所示。這也是果萼的誤識(shí)別率同樣隨著獼猴桃簇包含的果實(shí)數(shù)量增多而升高的主要原因。但是,由于外部?jī)蓚?cè)的果實(shí)周?chē)h(huán)境相對(duì)簡(jiǎn)單,一般都能被正確識(shí)別。因此,在實(shí)際的采摘過(guò)程中,對(duì)于5果以上的獼猴桃簇,可以先采摘外側(cè)的果實(shí)后,再次成像并識(shí)別,有望降低未識(shí)別率和誤識(shí)別率,從而提高識(shí)別率。
2.2 不同光照下的識(shí)別效果
為了驗(yàn)證算法對(duì)光照的魯棒性,測(cè)試了所有果實(shí)在12種不同光照下的識(shí)別效果,結(jié)果如圖6所示。當(dāng)光照較低時(shí)(10和30 lux),由于圖像較暗導(dǎo)致果萼和果實(shí)區(qū)域?qū)Ρ炔皇欠浅C黠@,如圖4a和圖4b所示,正確識(shí)別率有所降低,分別為91.4%和93.6%。當(dāng)光照度能保證清晰成像時(shí),識(shí)別率比較穩(wěn)定,從50~400 lux,正確識(shí)別率都是最高的94.3%。當(dāng)光照度增大到500 lux后,識(shí)別率開(kāi)始減小。原因是光照強(qiáng)時(shí),可能使得部分區(qū)域發(fā)生過(guò)曝,導(dǎo)致果萼部分的亮度增大,影響了圖像分割,果萼部分區(qū)域過(guò)小而被作為噪聲去除,如圖7所示。因此,在實(shí)際應(yīng)用中,光照過(guò)低或過(guò)高都會(huì)影響識(shí)別效果,需使光照度維持在50至400 lux之間。從能源節(jié)約的角度出發(fā),在保證識(shí)別率的前提下,使光照維持在50 lux比較合理。
2.3 果實(shí)識(shí)別速度
本研究的另一個(gè)目的是提高識(shí)別速度,盡可能貼近實(shí)際應(yīng)用的需求。采用同一臺(tái)筆記本電腦(ThinkPad T400,2.53 GHz),在Matlab 7.10.0(R2010a)的編程環(huán)境下,分別測(cè)試了本文算法和Fu等[25]算法的圖像預(yù)處理時(shí)間和果實(shí)識(shí)別時(shí)間,結(jié)果如表2所示。
a. 原始圖像a. Original imageb. 果萼判別圖像b. Image for detecting fruit calyxesc. 果實(shí)識(shí)別結(jié)果c. Fruit recognition results
表2 本文算法與參考算法的果實(shí)識(shí)別速度對(duì)比
根據(jù)每幅圖像處理所需時(shí)間,以平均每簇包含4個(gè)果實(shí)為依據(jù),計(jì)算每個(gè)果實(shí)從圖像獲取后至正確識(shí)別的平均時(shí)間。由于采用相同的圖像預(yù)處理方法,所以該部分的時(shí)間相同,都是0.83 s/幅。但在圖像識(shí)別算法,本文算法有了很大提升,平均只需1.16 s識(shí)別一幅圖像中的獼猴桃,是對(duì)比算法所需時(shí)間的20.2%??傮w而言,本文算法在平均每個(gè)果實(shí)的識(shí)別時(shí)間上,達(dá)到了0.50 s/幅,獲得了3倍左右的提升。同時(shí),也更接近采摘機(jī)器人研究中蘋(píng)果(0.35 s)[26]和草莓(0.44 s)[21]的識(shí)別水準(zhǔn)。此外,在實(shí)際應(yīng)用中,將使用執(zhí)行效率更高的C++編寫(xiě)代碼,并采用OpenCV等計(jì)算機(jī)視覺(jué)庫(kù)構(gòu)造算法,可能在速度上還會(huì)有所提升[30]。
1)測(cè)試了獼猴桃夜間圖像的機(jī)器識(shí)別能力,為完善獼猴桃采摘機(jī)器人的能力,使其具有夜間采摘的能力,提高工作效率和環(huán)境適應(yīng)能力進(jìn)行了有益探討。
2)證實(shí)了利用獼猴桃果萼進(jìn)行果實(shí)識(shí)別的可行性,50~400 lux下的正確識(shí)別率達(dá)94.3%。未識(shí)別和誤識(shí)別的果實(shí)一般出現(xiàn)在5果及5果以上的簇中,原因是果實(shí)相互擠壓導(dǎo)致的果萼部分不在果實(shí)圖像的中心區(qū)域,以及果實(shí)之間的三角區(qū)形成暗色封閉區(qū)域。在實(shí)際的采摘過(guò)程中,對(duì)于5果以上的獼猴桃簇,可以先采摘外側(cè)的果實(shí)后,再次成像并識(shí)別,有望降低未識(shí)別率和誤識(shí)別率,從而提高識(shí)別率。
3)該算法對(duì)光照有較好的魯棒性,從10至1 200 lux,都能取得91.4%以上的識(shí)別率。從正確率和節(jié)約能源的角度出發(fā),使光照維持在50 lux比較合理。在后期的實(shí)際采摘系統(tǒng)設(shè)計(jì)和研究中,應(yīng)將光源、末端執(zhí)行器、視覺(jué)系統(tǒng)進(jìn)行綜合考慮,合理分布。
4)本文算法在果實(shí)識(shí)別速度上有了很大提升,達(dá)到了平均0.50 s識(shí)別一個(gè)果實(shí)。
為了減小定位誤差對(duì)采摘成功率的影響,本項(xiàng)目中研發(fā)的末端執(zhí)行器采用的仿形設(shè)計(jì)具有一定的誤差允許范圍。但電子圖像傳感器的物距過(guò)近可能造成圖像畸變以及光線遮擋等問(wèn)題,后期研究中將測(cè)試視場(chǎng)較小的鏡頭,減小定位誤差。本文算法的前提是根據(jù)獼猴桃的栽培方式,從底部拍攝圖像,與常規(guī)的側(cè)面成像有所不同。該方法能否在日間使用,還需進(jìn)一步研究和試驗(yàn)驗(yàn)證。
[1] 孫兆軍. 陜西水果面積和產(chǎn)量實(shí)現(xiàn)“十二連增”[J]. 中國(guó)果業(yè)信息,2013,30(1):44-45.
[2] 張計(jì)育,莫正海,黃勝男,等. 21世紀(jì)以來(lái)世界獼猴桃產(chǎn)業(yè)發(fā)展以及中國(guó)獼猴桃貿(mào)易與國(guó)際競(jìng)爭(zhēng)力分析[J]. 中國(guó)農(nóng)學(xué)通報(bào),2014,30(23):48-55.
Zhang Jiyu, Mo Zhenghai, Huang Shengnan, et al. Development of kiwifruit industry in the world and analysis of trade and international competitiveness in china entering 21st century[J]. China Agricultural Science Bulletin, 2014, 30(23): 48-55. (in Chinese with English abstract)
[3] 陳軍,王虎,蔣浩然,等. 獼猴桃采摘機(jī)器人末端執(zhí)行器設(shè)計(jì)[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2012,43(10):151-154.
Chen Jun, Wang Hu, Jiang Haoran, et al. Design of end-effector for kiwifruit harvesting robot[J]. Transactions of the Chinese Society for Agricultural Machinery, 2012, 43(10): 151-154. (in Chinese with English abstract)
[4] 畢昆,趙馨,侯瑞鋒,等. 機(jī)器人技術(shù)在農(nóng)業(yè)中的應(yīng)用方向和發(fā)展趨勢(shì)[J]. 中國(guó)農(nóng)學(xué)通報(bào),2011,27(4):469-473.
Bi Kun, Zhao Xin, Hou Ruifeng, et al. The trend of application and development of robot technology in agriculture[J]. China Agricultural Science Bulletin, 2011, 27(4): 469-473. (in Chinese with English abstract)
[5] 徐麗明,張鐵中. 果蔬果實(shí)收獲機(jī)器人的研究現(xiàn)狀及關(guān)鍵問(wèn)題和對(duì)策[J]. 農(nóng)業(yè)工程學(xué)報(bào),2004,20(5):38-42.
Xu Liming, Zhang Tiezhong. Present situation of fruit and vegetable harvesting robot and its key problems and measures in application[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2004, 20(5): 38-42. (in Chinese with English abstract)
[6] 趙勻,武傳宇,胡旭東,等. 農(nóng)業(yè)機(jī)器人的研究進(jìn)展及存在的問(wèn)題[J]. 農(nóng)業(yè)工程學(xué)報(bào),2003,19(1):20-24.
Zhao Yun, Wu Chuanyu, Hu Xudong, et al. Research progress and problems of agricultural robot[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2003, 19(1): 20-24. (in Chinese with English abstract)
[7] Bechar A, Vigneault C. Agricultural robots for field operations: concepts and components[J]. Biosystems Engineering, 2016, 149: 94-111.
[8] 王景紅,梁軼,柏秦鳳,等. 陜西獼猴桃高溫干旱災(zāi)害風(fēng)險(xiǎn)區(qū)劃研究[J]. 中國(guó)農(nóng)學(xué)通報(bào),2013,29(7):105-110.
Wang Jinghong, Liang Yi, Bai Qinfeng, et al. Study on risk zoning of high temperature and drought disaster for kiwifruit in shaanxi[J]. China Agricultural Science Bulletin, 2013, 29(7): 105-110. (in Chinese with English abstract)
[9] 傅隆生,張發(fā)年,槐島芳德,等. 獼猴桃采摘機(jī)器人末端執(zhí)行器設(shè)計(jì)與試驗(yàn)[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2015,46(3):1-8.
Fu Longsheng, Zhang Fanian, Gejima Yoshinori, et al. Development and experiment of end-effector for kiwifruit harvesting robot[J]. Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(3): 1-8. (in Chinese with English abstract)
[10] 馬翠花,張學(xué)平,李育濤,等. 基于顯著性檢測(cè)與改進(jìn)Hough變換方法識(shí)別未成熟番茄[J]. 農(nóng)業(yè)工程學(xué)報(bào),2016,32(14):219-226.
Ma Cuihua, Zhang Xueping, Li Yutao, et al. Identification of immature tomatoes base on salient region detection and improved hough transform method[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2016, 32(14): 219-226. (in Chinese with English abstract)
[11] 王糧局,張立博,段運(yùn)紅,等. 基于視覺(jué)伺服的草莓采摘機(jī)器人果實(shí)定位方法[J]. 農(nóng)業(yè)工程學(xué)報(bào),2015,31(22):25-31.
Wang Liangju, Zhang Libo, Duan Yunhong, et al. Fruit localization for strawberry harvesting robot based on visual servoing[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(22): 25-31. (in Chinese with English abstract)
[12] 賈偉寬,趙德安,劉曉洋,等. 機(jī)器人采摘蘋(píng)果果實(shí)的K-means和GA-RBF-LMS神經(jīng)網(wǎng)絡(luò)識(shí)別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2015,31(18):175-183.
Jia Weikuan, Zhao De’an, Liu Xiaoyang, et al. Apple recognition based onk-means and ga-rbf-lms neural network applicated in harvesting robot[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(18): 175-183. (in Chinese with English abstract)
[13] 項(xiàng)榮,應(yīng)義斌,蔣煥煜,等. 基于雙目立體視覺(jué)的番茄定位[J]. 農(nóng)業(yè)工程學(xué)報(bào),2012,28(5):161-167.
Xiang Rong, Ying Yibin, Jiang Huanyu, et al. Localization of tomatoes based on binocular stereo vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2012, 28(5): 161-167. (in Chinese with English abstract)
[14] Hannan M, Burks T, Bulanon D M. A machine vision algorithm combining adaptive segmentation and shape analysis for orange fruit detection[J]. Agricultural Engineering International: CIGR Journal, 2009, 11(1): 1281.
[15] Bulanon D A, Burks T E, Alchanatis V. Fruit visibilty analysis for robotic citrus harvesting[J]. Transactions of the ASABE, 2009, 52(1): 277-283.
[16] 丁亞蘭,耿楠,周全程. 基于圖像的獼猴桃果實(shí)目標(biāo)提取研究[J]. 微計(jì)算機(jī)信息,2009,18(4):294-295.
Ding Yalan, Geng Nan, Zhou Quancheng. Research on the object extraction of kiwifruit based on images[J]. 2009, 18(4): 294-295. (in Chinese with English abstract)
[17] 崔永杰,蘇帥,呂志海,等. 基于 Hough 變換的獼猴桃毗鄰果實(shí)的分離方法[J]. 農(nóng)機(jī)化研究,2012,34(12):166-169.
Cui Yongjie, Su Shuai, Lü Zhihai, et al. A method for separation of kiwifruit adjacent fruits based on hough transformation[J]. Journal of Agricultural Mechanization Research, 2012, 34(12): 166-169. (in Chinese with English abstract)
[18] 武濤,袁池,陳軍. 基于機(jī)器視覺(jué)的獼猴桃果實(shí)目標(biāo)提取研究[J]. 農(nóng)機(jī)化研究,2012,34(12):21-26.
Wu Tao, Yuan Chi, Chen Jun. Research on the object extraction of kiwifruit based on machine vision[J]. Journal of Agricultural Mechanization Research, 2012, 34(12): 21-26. (in Chinese with English abstract)
[19] 慕軍營(yíng),陳軍,孫高杰,等. 基于機(jī)器視覺(jué)的獼猴桃特征參數(shù)提取[J]. 農(nóng)機(jī)化研究,2014,36(6):138-142.
Mu Junying, Chen Jun, Sun Gaojie, et al. Characteristic parameters extraction of kiwifruit based on machine vision[J]. Journal of Agricultural Mechanization Research, 2014, 36(6): 138-142.(in Chinese with English abstract)
[20] 崔永杰,蘇帥,王霞霞,等. 基于機(jī)器視覺(jué)的自然環(huán)境中獼猴桃識(shí)別與特征提取[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2013,44(5):247-252.
Cui Yongjie, Su Shuai, Wang Xiaxia, et al. Recognition and feature extraction of kiwifruit in natural environment based on machine vision[J]. Transactions of the Chinese Society for Agricultural Machinery, 2013, 44(5): 247-252. (in Chinese with English abstract)
[21] Hayashi S, Shigematsu K, Yamamoto S, et al. Evaluation of a strawberry-harvesting robot in a field test[J]. Biosyst. Eng., 2010, 105(2): 160-171.
[22] Hayashi S, Takahashi K, Yamamoto S, et al. Gentle handling of strawberries using a suction device[J]. Biosystems Engineering, 2011, 109(4): 348-356.
[23] Scarfe A J, Flemmer R C, Bakker H, et al. Development of an autonomous kiwifruit picking robot[C]//4th International Conference on Autonomous Robots and Agents. Wellington, New Zealand: IEEE, 2009: 380-384.
[24] 趙德安,劉曉洋,陳玉,等. 蘋(píng)果采摘機(jī)器人夜間識(shí)別方法[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2015,46(3):15-22.
Zhao De’an, Liu Xiaoyang, Chen Yu, et al. Image recognition at night for apple picking robot[J]. Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(3): 15-22. (in Chinese with English abstract)
[25] Fu L, Wang B, Cui Y, et al. Kiwifruit recognition at nighttime using artificial lighting based on machine vision[J]. International Journal of Agricultural and Biological Engineering, 2015, 8(4): 52-59.
[26] Ji W, Zhao D, Cheng F, et al. Automatic recognition vision system guided for apple harvesting robot[J]. Computers & Electrical Engineering, 2012, 38(5): 1186-1195.
[27] Huang H, Ferguson A R. Review: Kiwifruit in China[J]. New Zealand Journal of Crop and Horticultural Science, 2001, 29(1): 1-14.
[28] Huang H, Ferguson A R. Kiwifruit (Actinidia chinesis and A. deliciosa) plantings and production in China, 2002[J]. New Zealand Journal of Crop and Horticultural Science, 2003, 31(3): 197-202.
[29] Otsu N. A threshold selection method from gray-level histograms[J]. Automatica, 1975, 11(4): 23-27.
[30] Matuska S, Hudec R, Benco M. The comparison of CPU time consumption for image processing algorithm in Matlab and OpenCV[C]//9th Internation Conference on Elektro. Rajecke Teplice, Slovakia, 2012: 75-78.
Kiwifruit recognition method at night based on fruit calyx image
Fu Longsheng1, Sun Shipeng1, Vázquez-Arellano Manuel2, Li Shifeng1, Li Rui1, Cui Yongjie1※
(1.712100;2.)
China is the largest country for cultivating kiwifruits, and Shaanxi Province provides the largest production, which accounts for approximately 70% of the nationwide production and 33% of the global production. Harvesting kiwifruits in this region relies mainly on manual picking which is labor-intensive. Therefore, the introduction of robotic harvesting is highly desirable and suitable. Most researches involved so far in kiwifruit harvesting robots suggest the scenario of daytime harvesting for taking advantage of the sunlight. Robot picking at night can overcome the problem of low work efficiency and will help to minimize fruit damage. In addition, artificial lights can be used to ensure constant illumination instead of the variable natural sunlight for image acquisition. The study object of this paper was a kiwifruit recognition system at night using artificial lighting by identifying the fruit calyx. According to kiwifruits’ growth characteristics, which were grown on sturdy support structures, an RGB (red, green, blue) camera was placed underneath the canopy so that kiwifruits clusters could be included in the images. An image processing algorithm was developed to recognize kiwifruits by identifying the fruit’s calyx. Firstly, it subtracted 1.1R-G gray image, and then segmentation was done using the Otsu method for the thresholding. A morphological operation was applied to remove the noise that adhered to the target fruits (such as branches). Afterwards, an area thresholding method was employed to eliminate the remaining noises. This method is based on finding the biggest area of neighboring white pixels in the image and eliminating all areas which are smaller than 1/5 of the biggest area. Using this image as the mask, a fruit image without background was obtained. After that, V (value) component of HSV (hue, saturation, value) color model was calculated for segmenting the fruit’s calyx from the fruit, also using the Otsu method for thresholding. Black areas were then labeled and sorted by their pixels numbers. The first largest black area was the image background and the second largest black areas was a fruit calyx area that used as the reference area. Since the fruit calyx areas varies in a small range in one image, the fruit calyx areas are judged by comparing with the reference area. If a black area in the image was smaller than the reference area and larger than 1/10 of the reference area, it is a fruit calyx; otherwise, it is not. Finally, the nearest edge pixel for each fruit’s calyx was searched and their distance calculated was as radius, and a circle around the fruit calyx was drawn. Finally, the algorithm was also tested for the robustness under 12 different light illuminations (10, 30, 50, 80, 110, 150, 200, 300, 400, 500, 800 and 1 200 lux). The fruits illumination was estimated by averaging the illumination values, which were measured for 3 times at 3 different locations around the target fruit cluster. Results showed that the image processing algorithm based on the calyx could recognize kiwifruit and reached a success rate of 94.3%. Undetected and wrongly detected fruits appeared mostly at the same cluster where one fruit was adjacent to 3 or more fruits. The calyxes of those fruits sometimes were not in the centers of their fruits’ images, thus, causing undetected fruits. Those fruits also formed dark areas among them, which were wrongly recognized as calyx. On the other hand, most clusters were linearly arranged on the branches, which made them suitable for the proposed algorithm. The algorithm was robust to different illuminations although the success rates were slightly decreased under extremely weak or strong illuminations. It only took 0.5 s in average to recognize a fruit, which is a great step toward filed robotic harvesting of kiwifruit.
robots; image recognition; crops; kiwifruit; fruit calyx; night recognition; adjacent fruits
10.11975/j.issn.1002-6819.2017.02.027
TP391.41
A
1002-6819(2017)-02-0199-06
2016-08-23
2016-11-22
國(guó)家自然科學(xué)基金資助項(xiàng)目(61175099);陜西省資助國(guó)外引進(jìn)人才經(jīng)費(fèi)(Z111021303);西北農(nóng)林科技大學(xué)國(guó)際科技合作種子基金(A213021505)。
傅隆生,男,江西吉安人,副教授,博士,主要從事農(nóng)業(yè)智能化技術(shù)與裝備研究。楊凌 西北農(nóng)林科技大學(xué)機(jī)械與電子工程學(xué)院,712100。Email:fulsh@nwafu.edu.cn。中國(guó)農(nóng)業(yè)工程學(xué)會(huì)會(huì)員:傅隆生(E042600025M)。
崔永杰,男,吉林圖們?nèi)耍苯淌?,博士生?dǎo)師,博士,主要從事果蔬生產(chǎn)自動(dòng)化研究。楊凌 西北農(nóng)林科技大學(xué)機(jī)械與電子工程學(xué)院,712100。Email:cuiyongjie@nwafu.edu.cn。
傅隆生,孫世鵬,Vázquez-Arellano Manuel,李石峰,李 瑞,崔永杰. 基于果萼圖像的獼猴桃果實(shí)夜間識(shí)別方法[J]. 農(nóng)業(yè)工程學(xué)報(bào),2017,33(2):199-204. doi:10.11975/j.issn.1002-6819.2017.02.027 http://www.tcsae.org
Fu Longsheng, Sun Shipeng, Vázquez-Arellano Manuel, Li Shifeng, Li Rui, Cui Yongjie. Kiwifruit recognition method at night based on fruit calyx image[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(2): 199-204. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2017.02.027 http://www.tcsae.org
農(nóng)業(yè)工程學(xué)報(bào)2017年2期