黃小玉,李光林,馬 馳,楊士航
?
基于改進判別區(qū)域特征融合算法的近色背景綠色桃子識別
黃小玉,李光林※,馬 馳,楊士航
(西南大學工程技術學院,重慶 400715)
針對機器視覺識別中自然光照條件下未成熟綠色果實的識別存在顏色與背景相似、光照不均、果葉遮擋等問題,該文提出在判別區(qū)域特征集成(discriminative regional feature integration,DRFI)算法框架的基礎上,結合顏色、紋理、形狀特征,對未成熟綠色桃子進行識別。首先通過基于圖的圖像分割(graph-based image segmentation)算法,取不同的參數(shù)將圖像分割為多層,再計算各層圖像的顯著圖,并用線性組合器將其融合,得到DRFI顯著圖。再用OTSU算法得到的閾值自適應調整之后對DRFI顯著圖進行分割,減少了顯著圖中識別為低概率果實的誤分割。對于分割后仍存在的果實相互粘連的情況,通過控制標記符和距離變換相結合的分水嶺分割算法將其分開。試驗結果表明:該方法在訓練集中的準確識別率為91.7%,在驗證集中的準確識別率為88.3%,與相關文獻報道的結果以及原始DRFI算法在驗證集中的檢測結果相比,該文方法的準確識別率提高了3.7~10.7個百分點,較有效地解決了顏色相近和果葉遮擋問題,可為果樹早期估產和綠色果實采摘自動化、智能化提供參考。
機器視覺;圖像處理;算法;桃子;顯著對象檢測;特征提??;分水嶺變換;識別
將機器視覺的方法用于果樹早期估產以及農業(yè)機器人的對象識別是近年來的研究熱點[1]。果樹早期估產能提供給種植者對于產量分布和質量的清晰認知,并對施肥、噴藥、采摘、倉儲等過程進行調整,以促進資源的有效利用[2-3];果蔬采摘機器人實現(xiàn)了采摘機械化和自動化,降低了勞動和時間成本,使采摘效率大幅度提升[4]。果樹早期估產的對象是未成熟的綠色果實,采摘機器人的采摘對象也不乏香梨、青蘋果等綠色水果,且果實的精確識別與定位是機器采摘果實的關鍵[5]。因此,研究綠色果實的精確識別方法十分重要。
自然環(huán)境下采集的水果圖像存在光照不均、陰影、葉片反光、枝葉遮擋及果實之間的相互遮擋[6-7]等問題。且未成熟果實本身呈現(xiàn)綠色,與葉片、雜草顏色相近,無法單用顏色特征區(qū)分[8]。目前國內外相關文獻針對上述問題提出了多種解決方法。Bansal等[9]提出基于快速傅里葉變換(fast Fourier transform,F(xiàn)FT)泄露的檢測方法識別自然光照條件下采集的綠色柑橘圖像,識別準確率為82.2%。盧軍等[10-11]提出利用水果表面呈環(huán)形光照分布的輪廓特征,結合Hough變換進行圓擬合,該算法在20幅柑橘果園場景圖像的召回率達到81.2%,采用LBP(local binary pattern)紋理特征后,在25幅圖像上測試的準確率能達到82.3%,但圖像采集過程需要人工配置光源。Gan等[12]提出將彩色圖像和熱圖像信息融合進行未成熟柑橘的檢測,召回率達到90.4%,但柑橘類水果僅在清晨能達到最佳熱成像,對圖像采集時間有依賴,且熱成像設備價格相對高昂。馬翠花等[13]將密集和稀疏重構[14](dense and sparse reconstruction,DSR)的顯著性檢測方法用于識別未成熟番茄,正確識別率為77.6%。該研究采用無監(jiān)督的顯著性檢測方法,識別率相對較低,強光下漏檢或誤檢的情況相對弱光增加。文獻[15-20]采用諸如神經網絡、隨機森林等分類器對未成熟的番茄、蘋果、芒果、葡萄等水果進行檢測,均取得了較好的效果,但鮮少有對未成熟綠色桃子的檢測[21],不同水果背景及果實形狀的差異大,上述方法直接用于桃子檢測效果不理想,桃子作為西南地區(qū)特色水果之一,生產管理也亟需實現(xiàn)自動化和智能化。
針對當前綠色桃子機器視覺識別研究工作的缺失,本文基于判別區(qū)域特征融合算法(discriminative regional feature integration,DRFI)[22-23]的框架和分水嶺分割算法,提出綠色桃子的機器視覺識別方法。DRFI顯著性檢測算法采用有監(jiān)督的方式進行模型訓練,比DSR算法性能更優(yōu)異。用綠色桃子特有的顏色、紋理、形狀特征代替DRFI算法采用的部分特征,同時對相應的參數(shù)進行調整,以更適用于計算未成熟綠色桃子的顯著圖;針對顯著圖OTSU分割和數(shù)學形態(tài)學處理去噪后圖像中存在的果實粘連情況,用控制標記符和距離變換相結合的分水嶺分割算法進一步分割,從而實現(xiàn)樹上綠色桃子的有效識別,以期為果樹早期估產和綠色果實自動采摘提供參考。
2018年4月21日于重慶市沙坪壩區(qū)虎峰山果園內進行圖像采集,用Panasonic DMC_LX5GK 型號的數(shù)碼相機在自然光照條件下拍攝桃子早熟品種胭脂脆桃圖像,共采集186幅,包括順光、逆光、遮擋等環(huán)境。相機鏡頭距離果實30~80 cm,圖像分辨率為2 560×1 920像素,存儲為JPG格式。為滿足實時檢測的要求并避免圖像失真,多次試驗并結合相關文獻[10-11,13],采用雙3次插值法將圖像縮小為原始圖像大小的1/8,即320×240像素。將采集到的186幅圖像隨機抽取150幅作為訓練集,另外36幅作為驗證集。本文所有算法運行環(huán)境為MATLAB R2015b,計算機配置為Intel(R) Xeon(R) CPU E5-2609 v2@2.50GHZ,RAM為16.0GB。
DRFI算法訓練回歸模型需要原始圖像的ground truth圖作為標簽。采用Photoshop CS6標注150幅訓練集圖像的ground truth圖,將目標像素標記為白色,即灰度值為255,背景像素標記為黑色,即灰度值為0。這樣原始圖像在基于圖的圖像分割后產生的每個超像素都會對應一個區(qū)域級標簽。圖1是150幅訓練集中的6幅桃子圖像及其對應的ground truth標簽示例。
圖1 桃子圖像及其對應的ground truth標簽示例
圖2展示了本文DRFI算法計算桃子圖像顯著圖的主要步驟,具體算法如下:
1)多層分割。給定一幅圖像,使用基于圖的圖像分割(graph-based image segmentation)算法[24]將圖像分割為個超像素區(qū)域,每個超像素用不同的RGB顏色定義。單次圖像分割產生的超像素可能跨越顯著對象(桃子)的邊界,同時由顯著對象和背景像素組成;超像素可能太小而沒有包含足夠的特征去判斷它是否屬于顯著對象。因此,采用多層分割,通過改變基于圖的圖像分割算法中sigma(高斯濾波器核函數(shù)的標準差)、(控制合并后區(qū)域的數(shù)量)和min(當分割后的區(qū)域像素點的個數(shù)小于min時,選擇與其差異最小的區(qū)域合并)3個參數(shù)的取值,生成不同的圖像分割結果。共取組參數(shù),將圖像分為層S(=1,2,???,),={1,2,…,S}。
2)各層圖像顯著性計算。每一層分割產生的超像素由26維的特征向量表示,包括2個顏色特征,16個紋理特征,8個形狀特征。將圖像的各層分割結果={1,2,…,S}與ground truth圖進行匹配,得到超像素對應的標簽,將桃子標記為1,背景標記為-1。將150幅訓練集圖像的特征向量及標簽輸入到隨機森林進行訓練,得到回歸模型=(),從而將特征向量映射為顯著值,并分配給對應的超像素區(qū)域,這樣區(qū)域中的每個像素,都會對應產生該像素的顯著性概率。個超像素一一映射的結果便得到每一層分割的顯著圖。
3)多層顯著圖融合。通過將層顯著圖融合在一起生成最終的顯著圖,用A表示訓練集中第幅圖像的顯著圖,A=(A1, …,A),其中A表示第幅圖第層分割的顯著圖,(·)是一個線性組合器,如式(1)所示。
式中w表示權重,學習過程采用最小二乘法估計,使損失總和最小化,即使(2)式達到最小,為訓練集圖 像總數(shù),=150,*為第幅訓練集圖像對應的ground truth圖。
注:圖中“多層分割”中的從上到下的3張圖的sigma, k, min取值分別為[0.8,100,150]、[0.9,200,200]和[0.8,300,150]。
原始DRFI算法提出3種區(qū)域特征:對比度特征、背景描述特征、目標描述特征。其中,對比度特征的重要性不如后兩者,背景描述特征則認為圖像邊界區(qū)域的像素屬于背景。事實上,自然條件下采集的水果圖像,果實隨機散布在圖像的各個區(qū)域,無規(guī)律可言。另一方面,顯著性算法用于識別圖像中最突出的物體,該物體可以是所有類型,不針對特定對象。因此,將DRFI算法用于檢測未成熟綠色桃子這一特定對象時,原始的區(qū)域特征并不完全適用。
本文基于DRFI算法的框架,只保留目標描述特征中的16個紋理特征,在此基礎上,增加綠色桃子特有的特征,即RGB顏色空間中-分量的均值,HSV顏色空間中Hue分量的均值,和區(qū)域的面積、周長、圓形度、長軸長度、短軸長度、長寬比、長軸長度與周長比、離心率這8個形狀特征,共26個特征用于訓練回歸模型。
2.2.1 顏色特征
識別顏色與背景相近的綠色目標中,將RGB顏色空間中的-分量、和HSV顏色空間中的Hue分量作為有效特征,或為了避免光照變化的影響,先對圖像做增強處理,再提取上述特征分量[4,25]。圖3分別為順光和逆光環(huán)境下拍攝的桃子圖像及其對應的-分量、Hue分量和圖像增強后的-分量、Hue分量。圖3c和圖3h是對圖像進行限制對比度自適應直方圖均衡化后,提取的-色差圖。圖3e和圖3j是將RGB圖的、、各分量單獨進行直方圖均衡化后融合,再轉化為HSV模型,并提取Hue分量。
由圖3順光和逆光圖像的對比可以看出,-分量和Hue分量在圖像增強前后均能較好地將順光環(huán)境下的目標和背景區(qū)分開,逆光環(huán)境下,即使經過圖像增強,也無法有效地區(qū)分桃子和背景。因此,僅提取顏色特征不可靠,需加入其他類型的特征。
2.2.2 紋理特征
本文采用Leung-Malik(LM)濾波器組響應的方差,和等價模式LBP特征[26]的方差作為區(qū)域紋理特征。
LBP指局部二值模式,用來描述圖像局部特征,以中心像素的灰度值為閾值,若相鄰像素點灰度值大于或等于中心像素點,該相鄰像素點標記為1,否則為0,以周圍0-1序列排列形成的二進制數(shù)的數(shù)值作為中心像素的LBP值。因此,像素點個數(shù)為,半徑為的圓形鄰域將會產生2種模式。為解決模式過多的問題,采用等價模式LBP,引入變量,如式(3)所示。規(guī)定當某個LBP所對應的循環(huán)二進制數(shù)從0到1或從1到0最多有2次跳變,即≤2,該LBP所對應的二進制就稱為一個等價模式類,其余模式稱為混合模式類。至此,模式數(shù)量減少為(-1)+2種。等價模式LBP值的計算如式(4)所示。
式中為符號函數(shù),g為鄰域像素的灰度值,本文選取鄰域像素點個數(shù)為8,其8鄰域內8個像素的灰度值分別為g={0,1,…,7};g為中心像素的灰度值;半徑取2;上標riu2表示使用值最高為2的旋轉不變的等價模式LBP。
a. 順光圖像 a. Sunny side imageb. 順光下的R-B圖 b. R-B image under sunny sidec. 順光下增強后的R-B圖 c. Enhanced R-B image under sunny side d. 順光下的Hue圖 d. Hue image under sunny sidee. 順光下增強后的Hue圖 e. Enhanced Hue image under sunny sidef. 逆光圖像 f. Shadow side image
2.2.3 形狀特征
桃子的輪廓形狀接近橢圓,與葉片和枝干等背景的形狀明顯不同,因此,在顏色和紋理特征的基礎上,提取分割區(qū)域的形狀特征,如表1所示。這8個形狀特征可直接或間接通過Matlab函數(shù)regionprops求出。
表1 區(qū)域形狀特征描述
針對訓練集圖像數(shù)量和特征個數(shù)的改變,對訓練過程中的部分參數(shù)進行調整。參考原始DRFI算法和多次試驗所得的經驗,多層分割時,本文將訓練集圖像分為25層,考慮到精度和速度之間的平衡,將驗證集圖像分為15層。訓練隨機森林回歸模型時,測試了采用50、100、200棵決策樹,單個決策樹使用特征的最大數(shù)量分別為5、10、15、26時的性能,試驗結果表明,當選取100棵決策樹,最大特征數(shù)取10時,性能最優(yōu),得到的顯著圖與ground truth圖最吻合。
顯著圖表征圖中每個像素屬于顯著對象的概率,為灰度圖,還需進一步處理才能實現(xiàn)果實檢測。
如圖4b所示,本文算法認為某些果實區(qū)域屬于果實的概率較低,在顯著圖中表現(xiàn)為較小的灰度值。圖4中上下2行圖像用OTSU算法[27]計算得到的自適應閾值()分別為0.486 3和0.494 1,如果直接以閾值分割顯著圖,會將低灰度值的桃子分割為背景,如圖4c所示。多次試驗得出,分別用閾值和-0.1分割得到二值圖,并以后者減去前者,然后去除差值圖中面積小于500像素的區(qū)域。若剩下各區(qū)域的圓形度小于0.57,或長寬比大于2.65,說明以閾值-0.1分割引入了背景部分,應直接以為閾值進行分割,否則,以-0.1為閾值進行分割。
3.2.1 小區(qū)域去除
圖5為整個顯著圖處理過程的示例。如圖5b所示,經過二值化后的圖像存在與果實相連的細小的突出部分和小面積殘留區(qū)域,圖5a的分割閾值為0.403 9。針對細小的突刺,采用開運算斷開其與目標之間狹窄的連接,平滑目標的輪廓,開運算的結構元素選取半徑為5的圓盤。針對殘留的小面積區(qū)域,選出整個數(shù)據集中最小的10個桃子,用Photoshop逐像素將其標出,用matlab統(tǒng)計出其平均像素數(shù)為584,考慮到可能存在的誤差,實際上將圖像中面積小于500像素的區(qū)域去除。圖5c為閾值分割后經過開運算和小區(qū)域去除后的結果。
a.原圖 a. Original imageb. 顯著圖 b. Saliency mapc. OTSU閾值 c. OTSU thresholdd. OTSU閾值調整 d. OTSU threshold adjustment
3.2.2 控制標記符和距離變換相結合的分水嶺分割
自然條件下水果總是成簇生長,經過OTSU分割和簡單的小區(qū)域去除后,圖像表現(xiàn)為目標為白色,背景為黑色的二值圖像,白色區(qū)域仍然存在粘連,用控制標記符和距離變換相結合的分水嶺分割算法[28-30]將其分開。首先對二值圖像求補后進行距離變換,并將結果取反,如圖5d所示。為克服傳統(tǒng)分水嶺分割每個局部極小值均為匯水盆地而造成的過分割現(xiàn)象,使用imextendedmin函數(shù),將圖5d中深度不超過值的局部極小值濾除,從而得到內部標記符的集合如圖5e所示(圖5e中的白色小區(qū)域才是真正的內部標記符,為了方便觀察將內部標記符疊加到圖5c上顯示),本文的深度閾值取為2。使用強制最小技術修正距離圖后再進行分水嶺變換分割后的結果如圖5f所示。然后取每個分離區(qū)域的中心為圓心,以與區(qū)域有相同二階中心矩的橢圓的長軸長度為直徑[25],在原圖上畫出檢測到的桃子,如圖5g所示。
a. 顯著圖a. Saliency mapb. OTSU分割b. OTSU segmentationc. 小區(qū)域去除 c. Small area removald. 距離變換 d. Distance transformatione. 內部標記符 e. Internal markersf. 分水嶺分割 f. Watershed segmentationg. 檢測結果 g. Detection result
為驗證本文方法的有效性,共做了2部分試驗,首先對采集到的186幅圖像進行本文方法的檢測;其次對本文方法和原始DRFI算法[22]在36幅驗證集圖像(分為順光場景圖像和逆光場景圖像)中的檢測結果進行對比,并與馬翠花等[13]、Kurtulmus等[21]文獻中報道的結果進行對比。
對訓練集和驗證集中的所有圖像進行了檢測,包括順光、逆光、枝葉遮擋和果實重疊的場景。用本文提出的改進的DRFI算法得到顯著圖后,以圖5所示過程進行處理,部分檢測結果如圖6所示??煽吹奖疚姆椒ㄔ陧樄狻⒛婀鈭鼍跋?,均能較好地識別出綠色桃子,對于枝葉遮擋和果實重疊也能較有效處理。
圖6 不同場景下的檢測結果
表2是本文算法在150幅訓練集圖像,36幅驗證集圖像上的檢測結果,對圖像中遮擋不超過1/3的水果進行檢測計數(shù)。訓練集圖像共315個果實,實際檢測到289個,誤檢44個,漏檢26個,正確識別率為91.7%;驗證集圖像共77個果實,實際檢測到68個,誤檢12個,漏檢9個,正確識別率為88.3%。
表2 本文算法檢測結果
注:訓練集和驗證集果實總數(shù)分別為315和77個。
Note: Total fruits in training and validation dataset are 315 and 77 fruits respectively.
如圖7為本文改進的算法與原始DRFI算法[22]、DSR算法[14]計算出的顯著圖的對比。如圖7b的DRFI算法認為光照較強處顯著性更突出,因此,直接運用顯著性檢測易受到光照變化的影響;如圖7c的DSR算法認為目標位于圖像中間位置,因此將接近圖像中間位置的果梗、樹葉等背景誤判為目標,稍邊緣的果實區(qū)域顯著性反而不突出。而本文提出的方法由于只用了DRFI算法的框架,提取的是綠色桃子特有的顏色、紋理、形狀特征,克服了DSR和DRFI顯著性檢測算法的不足,使目標和背景能夠較大程度地分離。
a. 原圖 a. Original imageb. DRFI顯著圖 b. DRFI saliency map c. DSR顯著圖 c. DSR saliency mapd. 本文方法顯著圖 d. Saliency map of proposed method
本文將36幅驗證集圖像分為順光場景圖像和逆光場景圖像,進行本文改進的算法與原始DRFI算法[22]識別結果的對比分析,以及與馬翠花等[13]、Kurtulmus等[21]文獻中報道結果的對比。4種方法檢測的結果如表3所示。
本文算法在驗證集上的準確識別率為88.3%,對比未改進的原始DRFI算法80.5%的正確識別率,本文算法的正確識別率提高了7.8個百分點。對比同樣是用顯著性檢測算法識別綠色水果的馬翠花等提出的基于DSR的顯著性檢測方法識別未成熟番茄77.6%的正確識別率,本文方法的正確識別率提高了10.7個百分點。對比同是檢測未成熟綠色桃子的Kurtulmus等提出的算法在驗證集中最高84.6%的正確識別率,本文算法的正確識別率提高了3.7個百分點。
表3數(shù)據顯示,文獻[13,21-22]方法在順光環(huán)境下的正確識別率均低于逆光環(huán)境,而本文方法在順光和逆光場景下的正確識別率分別為88.6%和88.1%,基本相當。
表3 不同方法驗證集檢測結果對比
同時,Kurtulmus等的方法處理驗證集中單幅圖像用時72.8~112 s,達不到實時檢測的要求,而本文用訓練好的模型處理驗證集中單幅圖像用時3.16~4.58 s,包括顯示檢測結果的時間,處理時間最少能減少68.22 s。
為解決未成熟綠色桃子識別中顏色與背景相近及枝葉遮擋、果實重疊,易受光照變化影響的問題,本文提出基于DRFI(discriminative regional feature integration)顯著性檢測算法的框架和控制標記符與距離變換相結合的分水嶺分割算法識別未成熟綠色桃子的方法。該方法首先以綠色桃子特有的顏色、紋理、形狀特征替換原始DRFI中的部分特征,并對相應參數(shù)進行調整后訓練回歸模型。以該模型計算桃子圖像的顯著圖,然后用OTSU算法進行初步分割,用數(shù)學形態(tài)學處理去噪后,采用控制標記符與距離變換相結合的分水嶺分割算法將粘連的果實區(qū)域分割開,從而實現(xiàn)自然環(huán)境下未成熟綠色桃子的識別。試驗結果表明該方法在訓練集中的正確識別率為91.7%,在驗證集中的正確識別率為88.3%,在順光、逆光、遮擋重疊環(huán)境下均能較準確地識別出果實區(qū)域,受光照變化影響較小。本文方法為果實早期估產和果蔬采摘機器人采摘綠色水果提供了一種解決思路,但提取的區(qū)域特征仍然是基于人工設計的特征。今后將進一步研究卷積神經網絡應用于檢測未成熟綠色水果。
[1] He Z L, Xiong J T, Lin R, et al. A method of green litchi recognition in natural environment based on improved LDA classifier[J]. Computers and Electronics in Agriculture, 2017, 140(8): 159-167.
[2] 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(1): 45-57.
[3] Li H, Lee W S, Wang K. Identifying blueberry fruit of different growth stages using natural outdoor color images[J]. Computers and Electronics in Agriculture, 2014, 106(8): 91-101.
[4] 趙川源. 基于圖像和光譜技術的果實識別與病害檢測方法研究[D]. 楊凌:西北農林科技大學,2017.Zhao Chuanyuan. Detection Methods of Fruit Maturity and Diseases Based on Image and Spectral Techniques[D]. Yang ling: Northwest A&F University, 2017. (in Chinese with English abstract)
[5] 劉繼展. 溫室采摘機器人技術研究進展分析[J]. 農業(yè)機械學報,2017,48(12): 1-18. Liu Jizhan. Research progress analysis of robotic harvesting technologies in greenhouse[J]. Transactions of the Chinese Society for Agricultural Machinery, 2017, 48(12): 1-18. (in Chinese with English abstract)
[6] Lu J, Sang N. Detecting citrus fruits and occlusion recovery under natural illumination conditions[J]. Computers and Electronics in Agriculture, 2015,110(1): 121-130.
[7] 王丹丹,徐越,宋懷波,等. 融合K-means與Ncut算法的無遮擋雙重疊蘋果目標分割與重建[J]. 農業(yè)工程學報,2015,31(10):227-234.Wang Dandan, Xu Yue, Song Huaibo, et al. Fusion of K-means and Ncut algorithm to realize segmentation and reconstruction of two overlapped apples without blocking by branches and leaves[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(10): 227-234. (in Chinese with English abstract)
[8] 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.
[9] Bansal R, Lee W S, Satish S. Green citrus detection using fast Fourier transform (FFT) leakage[J]. Precision Agriculture, 2013, 14(1): 59-70.
[10] 盧軍,胡秀文. 弱光復雜背景下基于MSER和HCA的樹上綠色柑橘檢測[J].農業(yè)工程學報,2017,33(19):196-201. 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)
[11] Lu J, Lee W S, Gan H, et al. Immature citrus fruit detection based on local binary pattern feature and hierarchical contour analysis[J]. Biosystems Engineering, 2018, 171(7): 78-90.
[12] Gan H, Lee W S, Alchanatis V, et al. Immature green citrus fruit detection using color and thermal images[J]. Computers and Electronics in Agriculture,2018,152(9): 117-125.
[13] 馬翠花,張學平,李育濤,等. 基于顯著性檢測與改進Hough變換方法識別未成熟番茄[J].農業(yè)工程學報,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)
[14] Li X, Lu H, Zhang L, et al. Saliency detection via dense and sparse reconstruction[C]// IEEE International Conference on Computer Vision (ICCV), Sydney, 2013: 2976-2983.
[15] Yamamoto K, Guo W, Yoshioka Y, et al. On plant detection of intact tomato fruits using image analysis and machine learning methods[J]. Sensors, 2014, 14(7): 12191-12206.
[16] Bargoti S, Underwood J P. Image segmentation for fruit detection and yield estimation in apple orchards[J]. Journal of Field Robotics, 2017, 34(6): 1039-1060.
[17] Sengupta S, Lee W S. Identification and determination of the number of immature green citrus fruit in a canopy under different ambient light conditions[J]. Biosystems Engineering, 2014, 117(1): 51-61.
[18] 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, 2016: 5171-5176.
[19] Stein M, Bargoti S, Underwood J. Image based mango fruit detection, localisation and yield estimation using multiple view geometry[J]. Sensors, 2016, 16(11): 1915.
[20] 薛月菊,黃寧,涂淑琴,等. 未成熟芒果的改進YOLOv2識別方法[J]. 農業(yè)工程學報,2018,34(7): 173-179. Xue Yueju, Huang Ning, Tu Shuqin, et al. Immature mango detection based on improved YOLOv2[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(7): 173-179. (in Chinese with English abstract)
[21] Kurtulmus F, Lee W S, Vardar A. Immature peach detection in colour images acquired in natural illumination conditions using statistical classifiers and neural network[J]. Precision Agriculture, 2014, 15(1): 57-79.
[22] Wang Jingdong, Jiang Huaizu, Yuan Zejian, et al. Salient object detection: A discriminative regional feature integration approach[J]. International Journal of Computer Vision, 2017, 123(2): 251-268.
[23] Jiang Huaizu, Wang Jingdong, Yuan Zejian, et al. Salient object detection: A discriminative regional feature integration approach[C]// IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, 2013: 2083-2090.
[24] Felzenszwalb P F, Huttenlocher D P. Efficient graph-based image segmentation[J]. International Journal of Computer Vision, 2004, 59(2): 167-181.
[25] 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(6): 243-253.
[26] Ojala T, Pietik?inen M, M?enp?? T. Multiresolution gray-scale and rotation invariant texture classification with local binary patterns[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2002, 24(7): 971-987.
[27] Gonzalez R C, Woods R E. Digital Image Processing Using MATLAB, Second Edition[M]. Beijing: Publishing House of Electronics Industry, 2013.
[28] Choi D, Lee W S, Ehsani R, et al. A machine vision system for quantification of citrus fruit dropped on the ground under the canopy[J]. Transactions of the ASABE, 2015, 58(4): 933-946.
[29] 張春龍,張楫,張俊雄,等. 近色背景中樹上綠色蘋果識別方法[J]. 農業(yè)機械學報,2014,45(10):277-281. Zhang Chunlong, Zhang Ji, Zhang Junxiong, et al. Recognition of green apple in similar background[J]. Transactionsof the Chinese Society for Agricultural Machinery, 2014, 45(10): 227-281. (in Chinese with English abstract)
[30] Shin J S, Lee W S, Ehsani R. Postharvest citrus mass and size estimation using a logistic classification model and a watershed algorithm[J]. Biosystems Engineering, 2012, 113(1): 42-53.
Green peach recognition based on improved discriminative regional feature integration algorithm in similar background
Huang Xiaoyu, Li Guanglin※, Ma Chi, Yang Shihang
(400715,)
In order to solve the problems in the recognition of immature green fruits under natural illumination in machine vision recognition, such as the color similarity between the fruits and the background, uneven illumination and partial occlusion, etc., in this paper, color, texture and shape features of green peach were combined to identify immature green peach based on the DRFI (discriminative regional feature integration) algorithm. The color features included the mean ofcomponentminuscomponent, Hue component. The texture features were variances of LM(Leung-Malik) filter bank response and LBP(local binary pattern) feature, and the shape features included area, perimeter, circularity, major axis length, minor axis length, length-width ratio, major-axis length to perimeter ratio and eccentricity. The DRFI algorithm mainly had 3 steps, that was, the multi-level segmentation, saliency computation in each level and multi-level saliency fusion. Firstly, the input image was preprocessed based on the multi-level segmentation, which were generated in the graph-based image segmentation algorithm with different control parameters of standard deviation of kernel function of the Gaussian filter (sigma), the number of the merged region (), and the minimal pixels of segmented region (min). With the values of control parameters changing, different image segmentation results were obtained. In this paper, the input image was divided into 25 layers in the training set and each layer was further divided into several super-pixels. Secondly, the super-pixel in each layer had 26 feature variables, which included 2 color features, 16 textural features and 8 shape features. The segmentation results of each layer of the input image were matched with the ground truth map, then the tag of the super-pixel was produced, which was the positive one (the peach) or the negative one (the background). The 26 dimensional feature vector and tag of each super pixel were inputted into the random forest model, and the regression model was trained, and then the saliency map of each layer segmentation image was calculated by the model. Thirdly, the DRFI saliency map was obtained by a linear combiner to fuse the multi-level saliency map , whose weights was given through a least square estimator. To effectively detect the immature green peach in natural environment, the DRFI saliency map needed to be processed further. So adaptive segmentation threshold from the OTSU algorithm for DRFI saliency map must be adjusted to reduce the wrongly segmentation of the fruit with low probability in the saliency map. Mathematical morphology was then used, such as removing noise from the binary map. The watershed segmentation algorithm which combined the maker-controlled and distance transform was used to separate the fruit which still existed adhesion after segmentation. A total of 186 images were collected as the samples for experiment. 150 images were randomly selected as the training set, and the remaining 36 images were as the validation set. The experimental results of peach images recognition showed that the recognition accuracy of the proposed method in this paper in the training set was 91.7%, and the accuracy in the validation set reached 88.3%. At the same time, the recognition results of the proposed method outperformed the results from other methods, including Kurtulmus et al.(2014), Ma et al.(2016), and original DRFI algorithm(2017). Furthermore, the proposed algorithm could show a good performance in the complex scenes such as sunny side, shadow side, occlusion and overlap. The recognition results revealed that the proposed method could provide reference for early estimation of fruit yield and picking of green fruit automatically and intelligently.
machine vision; image processing; algorithms; peach; salient object detection; feature extraction; watershed transform; recognition
黃小玉,李光林,馬 馳,楊士航. 基于改進判別區(qū)域特征融合算法的近色背景綠色桃子識別[J]. 農業(yè)工程學報,2018,34(23):142-148. doi:10.11975/j.issn.1002-6819.2018.23.017 http://www.tcsae.org
Huang Xiaoyu, Li Guanglin, Ma Chi, Yang Shihang. Green peach recognition based on improved discriminative regional feature integration algorithm in similar background[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(23): 142-148. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2018.23.017 http://www.tcsae.org
2018-07-31
2018-10-26
重慶市科委重點項目(csk2016shmszx80018);重慶市研究生科研創(chuàng)新項目(CYS18109)
黃小玉,研究方向為圖像處理。Email:1653370505@qq.com
李光林,教授,博士,博士生導師,研究方向為傳感器與智能檢測。Email:liguanglin@swu.edu.cn
10.11975/j.issn.1002-6819.2018.23.017
S126
A
1002-6819(2018)-23-0142-07