盧 軍,胡秀文
?
弱光復(fù)雜背景下基于MSER和HCA的樹上綠色柑橘檢測(cè)
盧 軍1,胡秀文2
(1. 華中農(nóng)業(yè)大學(xué)理學(xué)院,武漢 430070;2. 華中農(nóng)業(yè)大學(xué)工學(xué)院,武漢 430070)
基于圖像處理和機(jī)器視覺的樹上綠色柑橘檢測(cè),能為果園管理者施肥、估產(chǎn)及采摘作業(yè)提供指導(dǎo)。該文提出一種基于水果表面光照分布的分層輪廓分析(hierarchical Contour Analysis,HCA)算法實(shí)現(xiàn)了樹上綠色柑橘的檢測(cè)。彩色數(shù)碼相機(jī)拍攝弱光下由閃光燈補(bǔ)光的樹上柑橘場(chǎng)景彩色圖像,基于水果表面的光照分布應(yīng)用最大穩(wěn)定極值區(qū)域(maximally stable extremal region,MSER)算法提取圖像中的感興趣區(qū)域,然后建立感興趣區(qū)域周圍的分層輪廓圖,并利用霍夫變換擬合每一級(jí)輪廓獲得分層圓形目標(biāo),最后進(jìn)行擬合圓嵌套分析得到綠色柑橘水果目標(biāo)。所提算法在20張復(fù)雜的柑橘果園場(chǎng)景圖像中進(jìn)行了測(cè)試,最終的召回率達(dá)81.2%,查準(zhǔn)率達(dá)到83.5%,單幅圖像平均處理時(shí)間為3.70 s。該文所提出的基于光照分布的分層輪廓分析算法,不僅適用于綠色柑橘的檢測(cè),也可為其他樹上綠色水果檢測(cè)提供通用的框架和思路。
圖像處理;目標(biāo)識(shí)別;算法;最大穩(wěn)定極值區(qū)域;分層輪廓分析;霍夫變換;綠色柑橘檢測(cè)
在水果生產(chǎn)過程中,充分利用信息化、智能化技術(shù)對(duì)作物生長進(jìn)行動(dòng)態(tài)監(jiān)測(cè),對(duì)于果園的自動(dòng)管理(自動(dòng)施肥/灌溉/噴藥)、提高農(nóng)作物品質(zhì)、產(chǎn)量估計(jì)及自動(dòng)采摘都有著重要意義。本文以柑橘為例,討論了基于圖像處理的樹上綠色水果檢測(cè)。樹上綠色水果的檢測(cè)與識(shí)別是實(shí)現(xiàn)水果生產(chǎn)自動(dòng)化和智能化的一個(gè)關(guān)鍵環(huán)節(jié),對(duì)優(yōu)化果園管理、實(shí)現(xiàn)自動(dòng)作業(yè)具有重要的價(jià)值和應(yīng)用前景。
隨著圖像處理、機(jī)器視覺技術(shù)的發(fā)展,關(guān)于樹上水果檢測(cè)和識(shí)別已吸引了眾多在圖像處理和農(nóng)業(yè)工程領(lǐng)域研究者的目光。Jimenez等[1-3]撰寫了關(guān)于樹上水果檢測(cè)定位的綜述性文章,全面地展示了該領(lǐng)域當(dāng)時(shí)的發(fā)展階段和存在的挑戰(zhàn),描述了為解決挑戰(zhàn)所采用的各種成像設(shè)備和圖像處理方法。其中大部分工作是研究與背景顏色差異較大,如紅色、橙色水果的檢測(cè),而關(guān)于樹上綠色水果的檢測(cè)與識(shí)別的工作較少且起步較晚。自2004年開始,陸續(xù)有關(guān)于樹上綠色水果檢測(cè)的論文發(fā)表。Annamalai等[4]在實(shí)驗(yàn)室利用光譜儀對(duì)比了綠色柑橘和綠色葉片的光譜,提出基于光譜波段比的綠色柑橘檢測(cè)方法。Safren等[5]研究了基于可見光和近紅外高光譜圖像的綠色蘋果產(chǎn)量估計(jì)系統(tǒng)。Okamoto等[6]實(shí)現(xiàn)了基于高光譜相機(jī)和波段比算法的綠色柑橘檢測(cè),對(duì)于完整柑橘檢測(cè)的成功率在82%以上,但對(duì)于遮擋柑橘檢測(cè)的成功率在47%~59%之間。Stajnko等[7]利用熱像儀來估計(jì)未成熟蘋果的數(shù)量和直徑,Wachs等[8]提出利用彩色圖像和熱圖像來檢測(cè)綠色蘋果的方案,但利用熱圖像的方法僅能在陽光直射的下午使用。而利用彩色相機(jī)獲取的彩色圖像進(jìn)行樹上綠色水果檢測(cè),由于設(shè)備價(jià)格低廉、使用方便而被普遍采用。更多的工作集中在分析處理彩色圖像,并利用顏色、紋理、形狀或多個(gè)特征組合來實(shí)現(xiàn)對(duì)樹上綠色水果的檢測(cè)[9-13]。
利用彩色圖像進(jìn)行樹上綠色水果檢測(cè)的方法,對(duì)于多變的自然光照條件非常敏感,檢測(cè)的效果不夠穩(wěn)定魯棒[14-15]。針對(duì)該方法易受自然光照條件影響的問題,Payne等[16-19]利用人造光源對(duì)夜間的樹冠進(jìn)行照明,從而獲得人造光照條件下的夜間彩色圖像并實(shí)現(xiàn)了較魯棒的樹上水果檢測(cè)。Linker等[20]提出了利用水果表面形狀的凸性所產(chǎn)生的光照分布特征來檢測(cè)樹上蘋果。Linker等[18]指出,在弱光條件下利用人工光源照明時(shí),由于水果表面的鏡面反射效果,在光源正入射方向會(huì)形成一個(gè)亮斑,在該亮斑附近由于水果的球形特征會(huì)形成具有環(huán)狀對(duì)稱性特征的光強(qiáng)分布。Linker[19]提出了利用多個(gè)閾值來分割夜間樹上綠色蘋果圖像,然后針對(duì)分割結(jié)果圖進(jìn)行圓擬合,并利用在多個(gè)分割圖中擬合圓的累計(jì)得分來檢測(cè)樹上綠色柑橘的方法。該方法效果較好而且比較穩(wěn)定,但處理過程中共需要設(shè)置7個(gè)參數(shù),而且在多個(gè)分割圖像中進(jìn)行圓霍夫變換來檢測(cè)圓目標(biāo),這是一件極為耗時(shí)的工作,其時(shí)間性能沒有報(bào)道。
針對(duì)當(dāng)前利用水果表面光照分布檢測(cè)樹上水果等工作的亮點(diǎn)和不足,本文提出基于最大穩(wěn)定極值區(qū)域和分層輪廓分析算法的樹上綠色柑橘檢測(cè)算法。本項(xiàng)工作利用彩色攝像機(jī)獲取在弱光條件下由閃光燈補(bǔ)光的樹上綠色柑橘圖像,利用最大穩(wěn)定極值區(qū)域檢測(cè)場(chǎng)景中的感興趣目標(biāo)區(qū)域。針對(duì)符合形狀條件的感興趣局部區(qū)域,本文首次提出局部分層輪廓分析算法,捕捉并檢測(cè)柑橘目標(biāo)表面的環(huán)形光照對(duì)稱分布,從而最終檢測(cè)出樹上綠色柑橘目標(biāo)。
本文圖像的采集時(shí)間為2016年8月—10月18:00—19:30,試驗(yàn)對(duì)象為樹上綠色柑橘,柑橘品種為Hamlin,地點(diǎn)為美國弗洛里達(dá)大學(xué)柑橘果園。所使用的相機(jī)為佳能公司生產(chǎn)的微型單反相機(jī)EOS M,鏡頭為佳能公司生產(chǎn)的EF-M卡口18~55 mm鏡頭(拍攝時(shí)使用18 mm廣角端),配備一個(gè)閃光燈(Canon 430EX)。閃光燈直接安裝在相機(jī)機(jī)頂?shù)臒嵫ブ信c鏡頭對(duì)齊。試驗(yàn)拍攝同一果園中20棵不同果樹的單側(cè)圖像,所拍攝圖像的原始分辨率為5 184′3 456像素,存儲(chǔ)為24位彩色JPG圖像。圖像處理時(shí)將所有圖像均調(diào)整成1 037′691像素的大小以便后期處理,圖像處理的軟件是Matlab R2015b,所使用的計(jì)算機(jī)CPU為Intel Core i5 4258U 2.40 GHz,內(nèi)存為4 GB,操作系統(tǒng)為 Microsoft Windows 8.1中文版。
本文所提算法分為兩個(gè)階段:感興趣區(qū)域提取及分層輪廓分析。第一階段首先提取彩色圖像的綠色分量進(jìn)行預(yù)處理,然后運(yùn)用最大穩(wěn)定極值區(qū)域(maximally stable extremal region,MSER)算法[21-23]提取灰度圖像中的感興趣區(qū)域,通過對(duì)檢測(cè)出的感興趣區(qū)域進(jìn)行形狀分析初步篩選出水果目標(biāo)區(qū)域。第二階段提出分層輪廓分析算法(hierarchical contour analysis,HCA),針對(duì)篩選后的感興趣區(qū)域提取目標(biāo)的分層輪廓線,利用圓形霍夫變換擬合出目標(biāo)圓并依據(jù)圓心距離進(jìn)行嵌套分析得到最終的柑橘水果目標(biāo)。算法的主要流程圖如圖1所示。
圖1 綠色柑橘檢測(cè)算法流程圖
由于檢測(cè)的是樹上綠色水果目標(biāo),本文首先提取彩色圖像中的綠色分量灰度圖,然后對(duì)綠色分量圖進(jìn)行濾波以濾除部分噪聲。在本試驗(yàn)的測(cè)試過程中發(fā)現(xiàn),對(duì)比維納濾波[24],中值濾波會(huì)使目標(biāo)的誤檢測(cè)增加。而在使用維納濾波的過程中,3′3的濾波窗口比5′5及更大的濾波窗口更有利于檢測(cè)面積較小及遮擋嚴(yán)重的水果目標(biāo)。因此本文最終采用3′3的濾波窗口進(jìn)行維納濾波濾除圖像中的高斯噪聲。經(jīng)過維納濾波平滑的圖像,能夠在水果表面提供更好的光照環(huán)形對(duì)稱性分布,有助于利用該特征實(shí)現(xiàn)對(duì)綠色柑橘的檢測(cè)。
MSER算法最初是Matas等[25]在檢測(cè)局部仿射不變特征區(qū)域時(shí)基于分水嶺變換的方法提出的,主要用于處理灰度圖像[26-28]。其基本思想是:對(duì)于一幅灰度圖像,利用遞變的閾值對(duì)圖像進(jìn)行二值化分割,閾值取0~255共256個(gè)數(shù)值,由此得到256幅二值圖像。在閾值由0不斷增大或由255不斷減小的過程中,有一些連通區(qū)域在較大范圍閾值內(nèi)形狀保持穩(wěn)定,這些區(qū)域即為最大穩(wěn)定極值區(qū)域MSERs。
針對(duì)預(yù)處理平滑后的灰度圖像,利用MSER算法提取其最大穩(wěn)定極值區(qū)域,圖2給出了一個(gè)檢測(cè)的示例。圖2a為原始彩色圖像,圖2b為MSER算法對(duì)相應(yīng)灰度圖像中最大穩(wěn)定極值區(qū)域的提取,圖中的柑橘目標(biāo)有明顯區(qū)別于背景的輪廓,且在柑橘目標(biāo)中心入射點(diǎn)附近呈現(xiàn)出近似于同心圓環(huán)的光強(qiáng)分布特征。在MSER算法提取結(jié)果的基礎(chǔ)上,針對(duì)每一個(gè)最大穩(wěn)定極值區(qū)域輪廓進(jìn)行橢圓目標(biāo)擬合[29-32],得到如圖2c的結(jié)果。由橢圓擬合結(jié)果可見,算法提取出的目標(biāo)較多,且其中大部分為背景。因此,需要對(duì)提取區(qū)域結(jié)果進(jìn)行形狀分析,初步篩選出具有合適形狀特征的最大穩(wěn)定極值區(qū)域。
a. 原始圖像 a. Original imageb. 最大穩(wěn)定極值區(qū)域(MSER)b. Maximally stable extremal regions (MSER) c. 橢圓擬合結(jié)果 c. Fitting results of ellipsed. 篩選結(jié)果 d. Screening results
假設(shè)利用MSER算法提取出了個(gè)最大穩(wěn)定極值區(qū)域,其中第個(gè)極值區(qū)域擬合出來的橢圓目標(biāo)E參數(shù)為
式中(x,y)為中心坐標(biāo),a、b分別為長軸與短軸長度,θ為橢圓長軸傾角。根據(jù)該橢圓離心率e去除無效橢圓
式中4為離心率閾值,該式指出有效橢圓的離心率必須足夠小。在獲取的圖像集中利用柑橘目標(biāo)外輪廓的內(nèi)接矩形手動(dòng)標(biāo)記了100個(gè)柑橘水果目標(biāo),分析了這100個(gè)水果目標(biāo)的離心率,發(fā)現(xiàn)其離心率均低于0.35,因此此處的閾值4取值為0.35。然后對(duì)圖2c的目標(biāo)區(qū)域進(jìn)行形狀分析,最終得到的有效區(qū)域如圖2d所示。
MSER算法提取出的感興趣區(qū)域數(shù)量較多,經(jīng)過橢圓擬合和形狀分析之后,保留了形狀接近于圓形的最大穩(wěn)定極值區(qū)域,而這些區(qū)域中僅有一部分是水果目標(biāo)。本文首次提出一種分層輪廓分析算法(hierarchical contour analysis,HCA)用以檢測(cè)有效感興趣區(qū)域中的水果目標(biāo)。
本試驗(yàn)中,由于柑橘果實(shí)近似球形,在光線正入射的表面處會(huì)出現(xiàn)一個(gè)亮斑。在該亮斑中心附近,柑橘表面的光強(qiáng)呈現(xiàn)出環(huán)形對(duì)稱分布的特征。針對(duì)這種光強(qiáng)環(huán)形對(duì)稱分布特征,本文提出分層輪廓分析方法來檢測(cè)水果表面這種特有的光照分布模式(圖3)。
注:LM、LM-1、LM-2分別為第M、M-1、M-2級(jí)分層輪廓(上行)及對(duì)應(yīng)擬合圓目標(biāo)(下行)。
在2.2節(jié)所檢測(cè)出的每一個(gè)最大穩(wěn)定極值區(qū)域基礎(chǔ)上,圖3a為圖2d所對(duì)應(yīng)的亮度等高線分布圖,選取圖像中藍(lán)色框標(biāo)記的水果作為目標(biāo)進(jìn)行進(jìn)一步分析。圖3b是該目標(biāo)的亮度等高線放大圖,最中間的輪廓線定義為L,由中心向外層依次選取3級(jí)輪廓線,分別為L、L1、L2。針對(duì)這三級(jí)等高線的外輪廓,分別利用圓形霍夫變換[33-37]進(jìn)行圓檢測(cè),結(jié)果如圖3c~3e所示。每個(gè)水果目標(biāo)的每級(jí)輪廓線擬合出一個(gè)圓,由此擬合出多個(gè)近似同心圓,即為水果目標(biāo)的分層輪廓特征,如圖3f所示。最終,依據(jù)式(3)對(duì)多級(jí)輪廓線進(jìn)行嵌套分析得到最終的目標(biāo)圓。
其中R與R分別表示圓C與圓的半徑,d表示兩個(gè)圓心的距離。當(dāng)兩個(gè)圓的圓心距離足夠近時(shí),則認(rèn)為圓屬于圓的一部分,因此只保留圓。最終保留下來的最后一個(gè)圓目標(biāo)唯一對(duì)應(yīng)一個(gè)水果,如圖3g所示。
為驗(yàn)證本文所提算法的有效性,對(duì)20幅復(fù)雜的樹上綠色柑橘圖像進(jìn)行處理,結(jié)果表明該算法能夠有效識(shí)別圖像中的綠色柑橘目標(biāo)。圖4a與圖4b為其中2張圖像處理的結(jié)果(依次對(duì)應(yīng)表1中前兩組數(shù)據(jù))。由圖4可見,本文算法識(shí)別出了圖像中大部分的綠色柑橘目標(biāo)。
a. 圖像1檢測(cè)結(jié)果 a. Detection results of image 1
b. 圖像2檢測(cè)結(jié)果 b. Detection results of image 2
注:藍(lán)色矩形框?yàn)槿斯?biāo)記的柑橘;紅色小圓為最大穩(wěn)定極值區(qū)域中心點(diǎn);較大的紅色圓為算法檢測(cè)到的綠色柑橘。
Note: The blue rectangles are artificial markers of citrus; The small red circles are the center points of MSER; The larger red circles are the green citrus fruits that the algorithm detected.
圖4 示例圖像及檢測(cè)結(jié)果
Fig.4 Example images and test results
表1是本文所提算法在20幅測(cè)試圖像上的檢測(cè)結(jié)果。其中,真正類tp表示每張圖中正確識(shí)別的水果目標(biāo)個(gè)數(shù),假正類fp表示背景被錯(cuò)誤識(shí)別成水果的目標(biāo)個(gè)數(shù),假負(fù)類fn表示圖中未被正確檢出的水果目標(biāo)個(gè)數(shù)。ac表示召回率,%;pc表示查準(zhǔn)率,%。
其中ac與pc的計(jì)算公式如式(4)所示。
在以上20幅圖構(gòu)成的測(cè)試圖像集中,共檢測(cè)出了496個(gè)水果目標(biāo),漏檢測(cè)115個(gè)目標(biāo),誤檢測(cè)98個(gè)目標(biāo)。在整個(gè)測(cè)試集上的總計(jì)召回率為81.2%,查準(zhǔn)率為83.5%。
表1 本文算法對(duì)20幅柑橘圖像檢測(cè)結(jié)果
Linker等[20]提出了利用水果表面形狀的凸性所產(chǎn)生的光照分布特征實(shí)現(xiàn)樹上蘋果檢測(cè),其所提算法的召回率為93.5%,查準(zhǔn)率為86.0%。但該算法首先要提取水果目標(biāo)的外輪廓,因此極易受到光照變化和遮擋的影響;而本文提出的分層輪廓分析,利用的是環(huán)形光照的多級(jí)輪廓特征,不需要提取水果目標(biāo)的外輪廓,當(dāng)柑橘表面被部分遮擋時(shí),其外層輪廓線不再完整但內(nèi)層輪廓線仍舊完整,保證了該算法在光照變化和遮擋下的穩(wěn)定性。
Li等[13]采用了模板匹配和圓霍夫變換的方法提取感興趣區(qū)域,然后利用紋理特征去除假正區(qū)域,最終在59張圖共154個(gè)目標(biāo)果的測(cè)試集上達(dá)到了84.4%的識(shí)別率。Zhao等[38]整合了基于色差分析和模板匹配的方法提取感興趣區(qū)域,然后利用紋理特征和支持向量機(jī)對(duì)感興趣區(qū)域進(jìn)行了分類得到最終水果目標(biāo),最終在68張圖共308個(gè)目標(biāo)果的測(cè)試集上達(dá)到了83.4%的識(shí)別率。
表2為上述幾種最新的方法與本文的結(jié)果對(duì)比,由表2可見,本文算法在召回率和查準(zhǔn)率方面要略低于這幾篇文章的結(jié)果。Linker等[20]和Li等[13]所使用的測(cè)試集中的平均每幅圖像僅包含2個(gè)左右水果目標(biāo), Zhao等[38]所處理的圖像包含目標(biāo)平均在4.5個(gè)/幅,而本文所使用的測(cè)試集中的每幅圖像平均包含30.6個(gè)目標(biāo)。隨著每張圖中包含的目標(biāo)數(shù)量大幅增加,遮擋和水果尺度變化顯著增加,因此目標(biāo)檢測(cè)的復(fù)雜度和難度相應(yīng)地也會(huì)大幅增加。
表2 不同方法檢測(cè)結(jié)果對(duì)比
水果目標(biāo)漏檢測(cè)的主要原因估計(jì)來自兩個(gè)方面:1)如圖4a中大部分漏檢測(cè)的水果所示,水果本身像素太小或遮擋率超過60%甚至更高;2)光照不夠均勻及陰影的存在,使部分水果表面未形成環(huán)形對(duì)稱分布特征。由于樹冠場(chǎng)景復(fù)雜,導(dǎo)致樹冠場(chǎng)景圖像中存在極亮或極暗區(qū)域,這些區(qū)域內(nèi)的葉片由于對(duì)比度偏低,易被誤檢測(cè)為柑橘,如圖4b右側(cè)。另一方面,一些正對(duì)相機(jī)的葉片表面易形成一種近似環(huán)形分布的特征,往往會(huì)被誤檢測(cè)為柑橘目標(biāo)。
為了進(jìn)一步了解本文所提算法的時(shí)間性能,將本文所提算法分為兩個(gè)階段:最大穩(wěn)定極值區(qū)域提?。∕SER)及分層輪廓分析(HCA),如圖1所示。經(jīng)在測(cè)試集上的所有圖像測(cè)試,平均每幅圖像在第一階段的處理時(shí)間為0.57 s,第二階段的處理時(shí)間為3.13 s,每幅圖像的平均處理時(shí)長合計(jì)為3.70 s。兩個(gè)階段相比較而言,利用HCA方法提取輪廓所花時(shí)間較長,主要是由于霍夫變換擬合圓形目標(biāo)需要較長時(shí)間。下一步的工作擬采用其他圓擬合的方法替換霍夫變換,從而減少HCA算法的執(zhí)行時(shí)間。
本文提出了一種基于最大穩(wěn)定極值區(qū)域(maximally stable extremal region,MSER)和分層輪廓分析(hierarchical contour analysis,HCA)的樹上綠色柑橘檢測(cè)算法。該算法首先提取彩色圖像的綠色分量,進(jìn)行維納濾波后,采用MSER算法提取圖像中的最大穩(wěn)定極值區(qū)域,通過形狀分析篩選感興趣的最大穩(wěn)定極值區(qū)域。然后使用HCA算法提取感興趣區(qū)域的輪廓信息,對(duì)提取出的每級(jí)輪廓采用霍夫變換進(jìn)行圓擬合,對(duì)分層擬合圓目標(biāo)進(jìn)行嵌套分析從而得到最終檢測(cè)目標(biāo)。本文所提算法利用了水果表面環(huán)形光照分布的輪廓形狀特征實(shí)現(xiàn)了樹上綠色水果檢測(cè),該方法所使用的形狀特征比顏色特征更為穩(wěn)定,同時(shí)也避免了常見水果外輪廓形狀特征在陰影和遮擋下的不穩(wěn)定性。通過在20幅圖像構(gòu)成的圖像集合上進(jìn)行測(cè)試,本文所提算法的最終召回率達(dá)81.2%,查準(zhǔn)率為83.5%,每幅圖像的平均處理時(shí)間為3.70 s。試驗(yàn)表明,本文所提算法能夠有效識(shí)別復(fù)雜果園場(chǎng)景中的綠色柑橘水果目標(biāo)。在下一步的工作中,一方面需要優(yōu)化圓擬合階段從而提高時(shí)間性能;另一方面要驗(yàn)證該算法在不同水果品種、不同時(shí)間和光照條件下的性能,以推廣該算法。
[1] Jimenez A R, Ceres R, Pons J L. A survey of computer vision methods for locating fruit on trees[J]. Transactions of the ASAE, 2000, 43(6): 1911-1920.
[2] Kapach K, Barnea E, Mairon R, et al. Computer vision for fruit harvesting robots–state of the art and challenges ahead[J]. International Journal of Computational Vision and Robotics, 2012, 3(1): 4-34.
[3] Gongal A,Amatya S,Karkee M,et al. Sensors and systems for fruit detection and localization: A review[J]. Computers and Electronics in Agriculture,2015,116:8-19.
[4] Annamalai P, Lee W S. Identification of green citrus fruits using spectral characteristics[C]//ASABE Paper No. FL04–1001. St. Joseph, Mich: ASABE, 2004.
[5] Safren O,Alchanatis V, Ostrovsky V,et al. Detection of green apples in hyperspectral images of apple–tree foliage using machine vision[J]. Transactions of the ASABE, 2007, 50(6): 2303-2313.
[6] Okamoto H,Lee W S. Green citrus detection using hyperspectral imaging[J]. Computers and Electronics in Agriculture, 2009,66(2): 201-208.
[7] Stajnko D, Lakota M,Ho?evar M. Estimation of number and diameter of apple fruits in an orchard during the growing season by thermal imaging[J]. Computers and Electronics in Agriculture, 2004, 42(1): 31-42.
[8] Wachs J P, Stern H I, Burks T, et al. Low and high–level visual feature–based apple detection from multi–modal images[J]. Precision Agriculture, 2010, 11(6): 717-735.
[9] Rakun J, Stajnko D, Zazula D. Detecting fruits in natural scenes by using spatial-frequency based texture analysis and multiview geometry[J]. Computers and Electronics in Agriculture, 2011, 76(1): 80-88.
[10] Aggelopoulou A D, Bochtis D,F(xiàn)ountas S, et al. Yield prediction in apple orchards based on image processing[J]. Precision Agriculture, 2011, 12(3): 448-456.
[11] Kurtulmus F, Lee W S, Vardar A. Green citrus detection using ‘eigenfruit’, color and circular Gabor texture features under natural outdoor conditions[J]. Computers and Electronics in Agriculture, 2011, 78(2): 140-149.
[12] Chaivivatrakul S, Dailey M N. Texture–based fruit detection[J]. Precision Agriculture, 2014, 15(6): 662-683.
[13] Li H, Lee W S, Wang K. Immature green citrus fruit detection and counting based on fast normalized cross correlation (FNCC) using natural outdoor colour images[J]. Precision Agriculture, 2016, 17(6): 678-697.
[14] Linker R, Cohen O, Naor A. Determination of the number of green apples in RGB images recorded in orchards[J]. Computers and Electronics in Agriculture, 2012, 81: 45-57.
[15] Payne A B, Walsh K B, Subedi P P, et al. Estimation of mango crop yield using image analysis–segmentation method[J]. Computers and Electronics in Agriculture, 2013, 91: 57-64.
[16] Payne A, Walsh K, Subedi P, et al. Estimating mango crop yield using image analysis using fruit at ‘stone hardening’ stage and night time imaging[J]. Computers and Electronics in Agriculture, 2014, 100: 160-167.
[17] Font D, Tresanchez M, Martínez D, et al. Vineyard yield estimation based on the analysis of high resolution images obtained with artificial illumination at night[J]. Sensors, 2015, 15(4): 8284-8301.
[18] Linker R, Kelman E, Cohen O. Estimation of apple orchard yield using night time imaging[M]. Netherlands: Wageningen Academic Publishers, 2015: 568-580.
[19] Linker R. A procedure for estimating the number of green mature apples in night-time orchard images using light distribution and its application to yield estimation[J]. Precision Agriculture, 2017, 18(1): 59-75.
[20] Linker R,Kelman E. Apple detection in nighttime tree images using the geometry of light patches around highlights[J]. Computers and Electronics in Agriculture, 2015, 114: 154-162.
[21] 廉藺,李國輝,王海濤,等. 基于MSER的紅外與可見光圖像關(guān)聯(lián)特征提取算法[J]. 電子與信息學(xué)報(bào),2011,33(7):1625-1631. Lian Lin, Li Guohui, Wang Haitao, et al. Corresponding feature extraction algorithm between infrared and visible images using MSER[J]. Journal of Electronics & Information Technology, 2011, 33(7): 1625-1631. (in Chinese with English abstract)
[22] Mikolajczyk K, Tuytelaars T, Schmid C, et al. A comparison of affine region detectors[J]. International Journal of Computer Vision, 2005, 65(1): 43-72.
[23] Fraundorfer F, Bischof H. A novel performance evaluation method of local detectors on non-planar scenes[C]//Computer Vision and Pattern Recognition– Workshops. CVPR Workshops. IEEE Computer Society Conference on. IEEE, 2005: 33.
[24] Grover R, Hwang P Y C. Introduction to random signals and applied Kalman filtering[M]. New York: Willey, 2012.
[25] Matas J, Chum O, Urban M, et al. Robust wide-baseline stereo from maximally stable extremal regions[J]. Image Vision Computing, 2004, 22(10): 761-767.
[26] Mikolajczyk K,Schmid C. A performance evaluation of local descriptors[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2005, 27(10): 1615-1630.
[27] Nistér D, Stewénius H. Linear time maximally stable extremal regions[C]// Computer Vision - ECCV 2008, European Conference on Computer Vision, Marseille, France, 2008:183—196.
[28] Obdr?álek D, Basovník S, Mach L, et al. Detecting scene elements using maximally stable colour regions[C]// International Conference on Research and Education in Robotics. Springer Berlin Heidelberg, 2009: 107-115.
[29] 王志彬,王開義,張水發(fā),等. 基于K-means聚類和橢圓擬合方法的白粉虱計(jì)數(shù)算法[J]. 農(nóng)業(yè)工程學(xué)報(bào),2014,30(1):105-112. Wang Zhibin,Wang Kaiyi,Zhang Shuifa,et al. Whiteflies counting with K-means clustering and ellipse fitting[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2014, 30(1): 105-112. (in Chinese with English abstract)
[30] 賀磊盈,蔡麗苑,武傳宇. 基于機(jī)器視覺的幼苗自動(dòng)嫁接參數(shù)提取[J]. 農(nóng)業(yè)工程學(xué)報(bào),2013,29(24):190-195. He Leiying, Cai Liyuan, Wu Chuanyu. Vision-based parameters extraction of seedlings for grafting robot[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(24): 190-195. (in Chinese with English abstract)
[31] 盧軍,桑農(nóng). 變化光照下樹上柑橘目標(biāo)檢測(cè)與遮擋輪廓恢復(fù)技術(shù)[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2014,45(4):76-81. Lu Jun, Sang Nong. Detection of citrus fruits within tree canopy and recovery of occlusion contour in variable illumination[J]. Transactions of the Chinese Society for Agricultural Machinery, 2014, 45(4): 76-81. (in Chinese with English abstract)
[32] 陳基偉. 橢圓直接擬合算法研究[J]. 工程勘察,2007(6):49-51. Chen Jiwei. Study on direct fitting algorithm of ellipse[J]. Geotechnical Investigation & Surveying,2007(6): 49-51. (in Chinese with English abstract)
[33] Pothen Z S, Nuske S. Texture-based fruit detection via images using the smooth patterns on the fruit[C]//IEEE International Conference on Robotics and Automation. IEEE, 2016: 5171-5176.
[34] Duda R O. Use of the Hough transform to detect lines and curves in pictures[J]. Commun ACM, 1972, 15: 11.
[35] 李寒,張漫,高宇,等. 溫室綠熟番茄機(jī)器視覺檢測(cè)方法[J].農(nóng)業(yè)工程學(xué)報(bào),2017,33(增刊1):328-334.
Li Han, Zhang Man, Gao Yu, et al. Green ripe tomato detection method based on machine vision in greenhouse[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE),2017, 33(Supp.1):
328-334. (in Chinese with English abstract)
[36] 陶丹,王崢榮,李光林,等. 基于解模糊算法的蠶蛹圖像恢復(fù)及雌雄識(shí)別[J]. 農(nóng)業(yè)工程學(xué)報(bào),2016,32(16):168-174.Tao Dan, Wang Zhengrong, Li Guanglin, et al. Silkworm pupa image restoration based on aliasing resolving algorithm and identifying male and female[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2016, 32(16): 168-174. (in Chinese with English abstract)
[37] 李昕,李立君,高自成,等. 改進(jìn)類圓隨機(jī)Hough變換及其在油茶果實(shí)遮擋識(shí)別中的應(yīng)用[J]. 農(nóng)業(yè)工程學(xué)報(bào),2013,29(1):164-170. Li Xin, Li Lijun, Gao Zicheng, et al. Revised quasi-circular randomized Hough transform and its application in camellia- fruit recognition[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(1): 164-170. (in Chinese with English abstract)
[38] Zhao C, Lee W S, He D. Immature green citrus detection based on colour feature and sum of absolute transformed difference (SATD) using colour images in the citrus grove[J]. Computers and Electronics in Agriculture, 2016, 124: 243-253.
盧 軍,胡秀文. 弱光復(fù)雜背景下基于MSER和HCA的樹上綠色柑橘檢測(cè)[J]. 農(nóng)業(yè)工程學(xué)報(bào),2017,33(19):196-201. doi:10.11975/j.issn.1002-6819.2017.19.025 http://www.tcsae.org
Lu Jun, Hu Xiuwen. Detecting green citrus fruit on trees in low light and complex background based on MSER and HCA [J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(19): 196-201. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2017.19.025 http://www.tcsae.org
Detecting green citrus fruit on trees in low light and complex background based on MSER and HCA
Lu Jun1, Hu Xiuwen2
(1.430070,; 2.430070,)
Accurate crop-load estimation is very important for efficient management of nutrients and harvest operations. Current machine vision techniques for crop-load estimation have achieved only limited success mostly due to partial occlusion, shape irregularity, varying illumination and multiple sizes. Detecting immature green fruit is a more challenging task for similar color of fruit and background. The key starting point of this paper for detecting immature citrus fruit was the observation that the light distribution on citrus fruit follows a general pattern in which the light intensity decreases with the distance from a local maximum due to specular reflection. Immature citrus fruit detection was achieved by detecting this pattern with concentric circles or parts of circles. This pattern was proposed with the maximally stable extremal region (MSER) method and validated by hierarchical contour analysis (HCA) which was the first proposed in this paper. The images were captured by a color camera under low natural light conditions with a flashlight, and the green component of the color images was used for further analysis. After smoothing the whole image by Weiner filter, the regions of interest (ROIs) in the image were extracted by the method of MSER. The ROIs detected by MSER were those whose support was nearly the same over a range of thresholds, so the regions on citrus fruit were detected by MSER for the pattern that the light intensity decreases stably and gently with the distance from a local maximum. However, many regions on leaves and background were also detected as ROIs and should be excluded in the next step. A novel algorithmic technique was proposed to remove these regions on background, and this method was named as the HCA. Firstly, shape analysis was used for each ROI and only those ROIs were considered as valid if the shape was nearly circular. Secondly, multiple levels of contours around each valid ROI were extracted and fitted with the circular Hough transform (CHT). Lastly, multiple fitted circles would be merged into one if their most parts were overlapped together, this step was called circle merging and the merged circles were considered as the last detected citrus fruits. The algorithm was tested on a testing dataset with 20 images and achieved the recall rate of 81.2% and the precision rate of 83.5%. The processing time of the proposed method was 3.70 s totally on each image, on average, in which 0.57 s was used for MSER detection and 3.13 s was used for HCA. The result showed that the proposed method can detect green citrus fruit in a very difficult and challenging scene with so many fruits in one image and extensive partial occlusion. The good performance of partial occlusion tolerance of the proposed method in this paper is mainly due to that the proposed HCA doesn’t use the shape of outer contour of fruit, but uses multiple concentric contours which come from the pattern of light intensity distribution on fruit surface. The research framework in this paper can give a novel thought on other green fruit detection besides citrus fruit.
image processing; object recognition; algorithms; hierarchical contour analysis (HCA); maximally stable extremal region (MSER); circular hough transform; immature citrus detection
10.11975/j.issn.1002-6819.2017.19.025
TP391. 41
A
1002-6819(2017)-19-0196-06
2017-06-09
2017-09-19
國家自然科學(xué)基金資助項(xiàng)目(34113029)
盧 軍,湖北宜昌人,副教授,博士生,主要從事圖像處理與機(jī)器視覺方面的研究。Email:lujun5918@163.com