郭志明,黃文倩,陳全勝,王慶艷,張 馳,趙杰文
(1.江蘇大學(xué)食品與生物工程學(xué)院,鎮(zhèn)江212013;2.國(guó)家農(nóng)業(yè)智能裝備工程技術(shù)研究中心,北京100097)
蘋果腐心病的透射光譜在線檢測(cè)系統(tǒng)設(shè)計(jì)及試驗(yàn)
郭志明1,2,黃文倩2,陳全勝1,王慶艷2,張 馳2,趙杰文1
(1.江蘇大學(xué)食品與生物工程學(xué)院,鎮(zhèn)江212013;2.國(guó)家農(nóng)業(yè)智能裝備工程技術(shù)研究中心,北京100097)
針對(duì)蘋果內(nèi)部缺陷在線檢測(cè)的產(chǎn)業(yè)技術(shù)需求,研究基于透射光譜技術(shù)的蘋果內(nèi)部缺陷在線檢測(cè)系統(tǒng)。研究設(shè)計(jì)了光源套件、專用光纖和果托式輸送單元等關(guān)鍵部件,提升在線透射光譜質(zhì)量、降低熱損傷和機(jī)械損傷;解決了光電信號(hào)干擾問題,開發(fā)了專用檢測(cè)軟件,實(shí)現(xiàn)蘋果內(nèi)部品質(zhì)信息的無損在線獲取。比較分析了正常蘋果與腐心病果的光譜響應(yīng)差異,優(yōu)化參數(shù)后設(shè)置在線檢測(cè)速度3個(gè)/秒,觸發(fā)控制光譜采集時(shí)間80 ms。在選擇特征波長(zhǎng)的基礎(chǔ)上利用線性判別分析建立了蘋果腐心病的在線判別模型,預(yù)測(cè)的總體識(shí)別率達(dá)90%以上。研究結(jié)果表明該系統(tǒng)可以實(shí)現(xiàn)蘋果內(nèi)部缺陷的快速、無損在線檢測(cè)。
光譜檢測(cè);模型;農(nóng)業(yè);在線檢測(cè)系統(tǒng);透射光譜;蘋果;內(nèi)部缺陷;無損檢測(cè)
郭志明,黃文倩,陳全勝,王慶艷,張 馳,趙杰文.蘋果腐心病的透射光譜在線檢測(cè)系統(tǒng)設(shè)計(jì)及試驗(yàn) [J].農(nóng)業(yè)工程學(xué)報(bào),2016,32(6):283-288.doi:10.11975/j.issn.1002-6819.2016.06.039 http://www.tcsae.org
Guo Zhiming,Huang Wenqian,Chen Quansheng,Wang Qingyan,Zhang Chi,Zhao Jiewen.Design and test of on-line detection system for apple core rot disease based on transmitted spectrum[J].Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE),2016,32(6):283-288.(in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2016.06.039 http://www.tcsae.org
蘋果的內(nèi)部缺陷無法用肉眼直接觀察到,常見的有腐心病、水心病、霉心病、黑心病等內(nèi)部缺陷類型,在中國(guó)所有蘋果的栽培生長(zhǎng)區(qū)域均有發(fā)生[1]。內(nèi)部缺陷果在發(fā)病初期和中期與正常果在外觀上沒有區(qū)別,從外觀上很難剔除。缺陷果在加工、貯藏、流通等環(huán)節(jié),隨著時(shí)間的延長(zhǎng),缺陷部位擴(kuò)大,缺陷更嚴(yán)重,可能危害正常果,帶來一定的經(jīng)濟(jì)損失。蘋果內(nèi)部缺陷的常規(guī)檢測(cè),采用隨機(jī)抽取樣品,然后切片進(jìn)行目視判斷,但這種破壞性抽樣檢測(cè)的方法浪費(fèi)極大,對(duì)種植者和加工者均不合適,對(duì)產(chǎn)品分級(jí)毫無意義。因此需要尋求一種快速有效的方法,來剔除內(nèi)部有缺陷的蘋果。
在水果內(nèi)部缺陷檢測(cè)研究方面,國(guó)內(nèi)外很多學(xué)者開展相關(guān)研究。Upchurch[2]和Zerbini[3]分別采用特征波長(zhǎng)下的光學(xué)特性差異識(shí)別蘋果的褐變和梨腐心病。Clark[4]利用近紅外透射光譜檢測(cè)蘋果的褐腐病,指出蘋果個(gè)體的非對(duì)稱分布影響預(yù)測(cè)精度。McGlone[5]構(gòu)建了2種近紅外漫透射在線檢測(cè)系統(tǒng),分別配制1 000 W和250 W石英鹵鎢燈,蘋果褐變的最優(yōu)模型決定系數(shù)達(dá)到0.9。Han[6]利用近紅外透射光譜檢測(cè)中國(guó)鴨梨的褐心病,正確識(shí)別率為95.4%。Fu等[7]發(fā)現(xiàn)透射光譜相比漫反射光譜更適合檢測(cè)梨褐心病,識(shí)別率為91.2%。Shenderey[8]比較了4種光譜變換形式下蘋果霉心病的預(yù)測(cè)效果,正常果的識(shí)別率為92%。Vanoli[9]利用時(shí)間分辨反射光譜獲得的蘋果光學(xué)特性參數(shù),判別正常蘋果和褐心病果的識(shí)別率分別為90%和71%。韓東海等[10-12]利用透射光譜識(shí)別蘋果的水心病和褐腐病。李順峰等[13]利用近紅外漫反射光譜對(duì)蘋果霉心病的判別率為87.8%。田有文等[14]采用高光譜成像技術(shù)識(shí)別蘋果的蟲傷缺陷與果梗/花萼。劉海彬等[15]利用激光散斑技術(shù)識(shí)別皇冠梨的表面缺陷與果梗/花萼。相比表面缺陷,水果的內(nèi)部缺陷檢測(cè)難度更大。
已有研究表明,利用近紅外透射光譜技術(shù)檢測(cè)水果的內(nèi)部缺陷是可行的,但內(nèi)部缺陷在線檢測(cè)報(bào)道很少,且使用大功率光源。蘋果屬于薄皮水果,易灼傷,同時(shí)較強(qiáng)雜散光的干擾會(huì)降低光譜信噪比,從而降低缺陷檢測(cè)的效果。蘋果組織具有較好的透光性,透射式光譜能有效獲取水果內(nèi)部組織信息,依據(jù)可見近紅外光在正常果和缺陷果的光傳輸特性差異,建立內(nèi)部缺陷判別模型,解決內(nèi)部缺陷在線檢測(cè)實(shí)際應(yīng)用需求過程中的關(guān)鍵科學(xué)問題。本文嘗試設(shè)計(jì)基于透射光譜技術(shù)的蘋果內(nèi)部缺陷在線檢測(cè)試驗(yàn)系統(tǒng),提升在線透射光譜質(zhì)量、降低熱損傷和機(jī)械損傷、提高檢測(cè)系統(tǒng)適應(yīng)性,為實(shí)際在線檢測(cè)應(yīng)用提供理論參考和方法指導(dǎo)。
首先構(gòu)建了蘋果內(nèi)部缺陷近紅外光譜透射式在線檢測(cè)系統(tǒng),如圖1所示,系統(tǒng)包括果托式輸送單元、光源套件組、光譜采集單元、光電傳感器、機(jī)架、暗箱和計(jì)算機(jī)等,實(shí)現(xiàn)蘋果透射光譜信息的實(shí)時(shí)高效獲取與處理。蘋果置于果托上,輸送中蘋果觸發(fā)光電開關(guān),觸發(fā)光譜儀中微控制器控制電荷耦合元件(charge-coupled device,CCD)探測(cè)器通過光纖采集探頭獲得水果的透射光譜,用于檢測(cè)水果的內(nèi)部隱性缺陷。
圖1 透射光譜在線檢測(cè)系統(tǒng)結(jié)構(gòu)示意圖Fig.1 Schematic representation of transmission spectra online detection system
1.1 光源選型及套件設(shè)計(jì)
農(nóng)產(chǎn)品品質(zhì)的光譜檢測(cè)技術(shù),一般需要連續(xù)光譜,特別是在近紅外光譜區(qū)。在農(nóng)產(chǎn)品透射用光源選擇上,從安全和強(qiáng)度考慮需挑選低壓特種鹵素?zé)?。選擇反光杯鍍金屬膜的優(yōu)質(zhì)鹵素?zé)?,同時(shí)避免鍍紅外反射膜型的鹵素?zé)簟Mㄟ^比較多種型號(hào)的鹵素?zé)舻墓庾V響應(yīng)發(fā)現(xiàn),在短波近紅外區(qū)幾種燈的差異顯著。短波近紅外區(qū)比可見光區(qū)包含更多與內(nèi)部組分相關(guān)的信息,光源選擇在短波近紅外區(qū)光強(qiáng)度較大的鹵素?zé)?,可提高獲得光譜的信噪比。在前期研究的基礎(chǔ)上,選用JCR12V 100W鹵鎢燈用于后續(xù)的光源設(shè)計(jì)。
蘋果屬于薄皮水果,易灼傷,同時(shí)較強(qiáng)雜散光的干擾會(huì)降低光譜信噪比,從而降低透射光譜的質(zhì)量。為此,選用防反射膜涂層的凸透鏡,改變光路,使發(fā)散的光聚集在蘋果樣本上。鍍膜平凸透鏡安裝于燈杯正前方,透鏡中心與燈杯中心在同一法線上;鍍膜透鏡對(duì)檢測(cè)波段具有高透過性,對(duì)紅外波段透過性低,可避免水果的熱損傷。在600~105 0 nm范圍透鏡反射率很低,≤0.5%,也就是說在這個(gè)光譜范圍透鏡的透射率≥99.5%。為避免局部高溫,降低器件的使用壽命,在光源殼體上安裝小型風(fēng)扇,在光源點(diǎn)亮的情況下同步工作,研制的光源套件如圖2所示,經(jīng)連續(xù)測(cè)試發(fā)現(xiàn),光源光照穩(wěn)定,殼體不過熱,運(yùn)轉(zhuǎn)正常。
圖2 光源套件實(shí)物及效果圖Fig.2 Diagram and rendering of light source modules
1.2 光纖選型及設(shè)計(jì)
光纖作為光傳導(dǎo)工具,可簡(jiǎn)化光路結(jié)構(gòu)設(shè)計(jì)。普通商品化光纖一般光通量低,受光面積小,不能滿足蘋果透射光譜在線檢測(cè)的實(shí)際需要。蘋果的透射光譜強(qiáng)度比較低,為增強(qiáng)在線檢測(cè)過程透射光的獲取質(zhì)量,光纖設(shè)計(jì)方面有如下考慮:1)數(shù)值孔徑大,收光區(qū)域才能大;2)近紅外區(qū)低衰減,選擇雙包層石英光纖;3)選用大芯徑光纖,實(shí)現(xiàn)高通量;4)標(biāo)準(zhǔn)SMA905接口,用于連接光纖光譜儀;5)光纖探頭前加配可調(diào)透鏡,增加采光寬度。光纖探頭選擇數(shù)值孔徑0.37的大芯徑雙包層石英光纖,光纖探頭末端配制可調(diào)透鏡組用于高效收集透射光譜,光纖探頭一端與光譜儀連接,另一端安裝于果托圓心位置的正下方,實(shí)現(xiàn)蘋果透射光譜的高效獲取。系統(tǒng)選用微型光纖光譜儀(USB2000+,OceanOptics,USA),光譜范圍為488~1150nm,光譜分辨率為1.5 nm,探測(cè)器為線陣CCD,可采集有效波數(shù)2 048個(gè)。
1.3 光電傳感器和信號(hào)控制器
蘋果品質(zhì)在線檢測(cè)系統(tǒng)實(shí)現(xiàn)光譜信號(hào)的自動(dòng)采集,需要對(duì)樣品位置和信號(hào)有無進(jìn)行判斷,當(dāng)蘋果樣本在輸送線上行進(jìn)至需要檢測(cè)時(shí),系統(tǒng)應(yīng)能自動(dòng)采集和處理光譜數(shù)據(jù),若輸送線上沒有樣品,則系統(tǒng)應(yīng)處于待觸發(fā)檢測(cè)狀態(tài)。為實(shí)現(xiàn)系統(tǒng)的自動(dòng)在線檢測(cè),自動(dòng)采集光譜信息,自動(dòng)進(jìn)行數(shù)據(jù)的運(yùn)算與處理。本系統(tǒng)選用光電傳感器對(duì)樣品信號(hào)有無進(jìn)行檢測(cè),當(dāng)檢測(cè)到樣品信號(hào)時(shí)即對(duì)光譜儀進(jìn)行外觸發(fā),進(jìn)行信息的采集與處理。因?qū)嶋H檢測(cè)過程的需要,光電傳感器選型要求具有可靠的檢測(cè)性能,1)電磁抗干擾性;2)光抗干擾性;3)復(fù)雜環(huán)境下(粉塵或振動(dòng)環(huán)境)能保持較高的檢測(cè)穩(wěn)定性。綜合考慮系統(tǒng)各種傳感器的結(jié)構(gòu)、特點(diǎn)和應(yīng)用場(chǎng)合,本系統(tǒng)選用紅外對(duì)射型光電傳感器(E3FA-TN11,OMRON)。光電傳感器通過支架固定安裝在檢測(cè)平臺(tái)上,對(duì)稱分布在傳送帶的兩側(cè)。
光電傳感器輸出的電信號(hào)傳到計(jì)算機(jī)之前需要先對(duì)信號(hào)進(jìn)行轉(zhuǎn)換編碼,為此,開發(fā)了小型信號(hào)控制器。信號(hào)控制器包括單片機(jī)最小系統(tǒng)開發(fā)板、單片機(jī)、5 V開關(guān)電源等。因系統(tǒng)中信號(hào)傳遞和控制過程簡(jiǎn)單,選用常見的51單片機(jī)STC89C52RC作為處理模塊。在線檢測(cè)過程中,光電傳感器將電信號(hào)輸出至單片機(jī)開發(fā)板,經(jīng)單片機(jī)電平轉(zhuǎn)換,通過RS232串口將信號(hào)傳給計(jì)算機(jī),觸發(fā)光譜儀自動(dòng)采集光譜,實(shí)現(xiàn)單個(gè)樣本在線檢測(cè)過程的信號(hào)處理及傳遞。
1.4 傳送裝置及信號(hào)干擾解決方法
在線檢測(cè)系統(tǒng)中,所用傳送皮帶材質(zhì)為食品級(jí)聚氯乙烯,表面黑色啞光處理,皮帶中央位置等間隔開有圓形孔。皮帶上安裝有分離式果托,在線檢測(cè)過程,蘋果置于果托上傳送。下果托安裝在圓形孔上用于固定和支撐水果,上果托由卡環(huán)連接在下果托上用于遮光和水果防損,機(jī)架為梯形結(jié)構(gòu),機(jī)架中間位置上下分別設(shè)有暗箱,用于消除環(huán)境光的干擾。分離式果托中的上果托上部為喇叭口形,中部為波形,下部為卡緊環(huán)與下果托連接,上下果托均為硅膠塑模而成,下果托硬度為80,上果托硬度為40。蘋果品質(zhì)透射光譜在線檢測(cè)系統(tǒng),在試驗(yàn)和研究過程,需要樣本穩(wěn)定傳輸,運(yùn)動(dòng)速度可調(diào)。為此,設(shè)計(jì)了樣品穩(wěn)定傳動(dòng)的傳送裝置,由減速電機(jī)、變頻器、傳送帶、輥輪和支架等組成。減速電機(jī)加變頻器的組合實(shí)現(xiàn)水果的低速穩(wěn)定輸送。
在試驗(yàn)過程發(fā)現(xiàn),研發(fā)的在線檢測(cè)系統(tǒng),光電傳感器信號(hào)在靜態(tài)時(shí)穩(wěn)定,但系統(tǒng)在線調(diào)試時(shí)信號(hào)有干擾,會(huì)偶然出現(xiàn)高電平。分析其原因,變頻器和電機(jī)都是非線性負(fù)載,工作時(shí)產(chǎn)生諧波分量,特別是在變頻器運(yùn)行以及電機(jī)啟動(dòng)和停止時(shí)使電網(wǎng)出現(xiàn)大量諧波。變頻器和強(qiáng)電部分封裝在箱體內(nèi)。此外,對(duì)信號(hào)干擾問題的一般處理方法是要保證良好的接地,控制回路線使用屏蔽線,并合理布線,強(qiáng)電和弱電分離。采取防止電磁感應(yīng)的屏蔽措施,可將變頻器用金屬鐵箱屏蔽起來,做成控制箱,適當(dāng)降低載波頻率。經(jīng)這些措施處理之后,在線檢測(cè)過程系統(tǒng)信號(hào)傳輸穩(wěn)定可靠。
1.5 硬件整體系統(tǒng)調(diào)試
利用光機(jī)電一體化技術(shù),特別是透射光譜分析技術(shù),研發(fā)水果內(nèi)部缺陷在線檢測(cè)系統(tǒng),克服漫反射光譜僅能獲取水果表面信息導(dǎo)致精度低、穩(wěn)定性差的問題。在前幾項(xiàng)關(guān)鍵部件或模塊的設(shè)計(jì)開發(fā)基礎(chǔ)上,對(duì)整個(gè)系統(tǒng)進(jìn)行組裝、調(diào)試和性能測(cè)試。根據(jù)蘋果品質(zhì)在線檢測(cè)過程的實(shí)際要求,對(duì)裝配的系統(tǒng)進(jìn)行調(diào)試,包括機(jī)械裝置安裝調(diào)整,信號(hào)控制部分連線調(diào)試,光譜實(shí)時(shí)觸發(fā)調(diào)試試驗(yàn)等,檢測(cè)系統(tǒng)所需功能是否完備,各個(gè)模塊工作是否正常,參數(shù)調(diào)整是否合理。針對(duì)調(diào)試過程中出現(xiàn)的問題進(jìn)行參數(shù)優(yōu)化,經(jīng)系統(tǒng)測(cè)試發(fā)現(xiàn),系統(tǒng)運(yùn)轉(zhuǎn)具有較好的可靠性和穩(wěn)定性。
1.6 在線檢測(cè)軟件設(shè)計(jì)
軟件結(jié)構(gòu)具備硬件設(shè)備間通訊、光譜數(shù)據(jù)的采集和處理、光譜曲線的顯示、內(nèi)部缺陷類別的判別、缺陷程度的識(shí)別、分析結(jié)果的統(tǒng)計(jì)和保存等。為簡(jiǎn)化軟件系統(tǒng)的程序編寫過程和軟件后期的維護(hù)和功能擴(kuò)展,軟件設(shè)計(jì)過程采用模塊化設(shè)計(jì),即根據(jù)功能要求將整個(gè)系統(tǒng)劃分為不同的功能模塊[16]。系統(tǒng)初始化主要完成系統(tǒng)工作的準(zhǔn)備工作,實(shí)現(xiàn)計(jì)算機(jī)與光譜采集單元的正常通訊,將判別模型載入以備計(jì)算。軟件界面上可以設(shè)置光譜采集參數(shù),選擇是否實(shí)時(shí)保存測(cè)試數(shù)據(jù)等功能。程序初始化完成,打開開始采集即進(jìn)入工作狀態(tài),操作簡(jiǎn)單。
2.1 內(nèi)部缺陷蘋果樣本制備
蘋果的內(nèi)部缺陷中危害最大的腐心病,會(huì)產(chǎn)生面源擴(kuò)散,造成巨大經(jīng)濟(jì)損失。本文以腐心病為研究對(duì)象,嘗試建立在線無損檢測(cè)方法。因肉眼無法直觀的識(shí)別,在市場(chǎng)上購(gòu)買自然形成的內(nèi)部缺陷果是比較困難的。新鮮蘋果也會(huì)受到真菌感染,真菌孢子可通過花萼進(jìn)入并在果核繁殖,蘋果在生長(zhǎng)和成熟期,由于水果自然的防衛(wèi)機(jī)制,真菌孢子處于休眠狀態(tài)[17]。在蘋果收貨后貯藏期,自然防衛(wèi)機(jī)制減弱,真菌孢子生長(zhǎng),引起內(nèi)部腐爛并產(chǎn)生真菌毒素[18]。為此,在北京和山東蘋果產(chǎn)區(qū),收集了腐心病蘋果樣本,培養(yǎng)了復(fù)合病原菌,并嘗試了樣本制備。
首先提取腐爛部位的真菌孢子,以去皮后的蘋果泥為培養(yǎng)基,用培養(yǎng)皿置于37℃培養(yǎng)箱中培養(yǎng)。選擇形狀規(guī)則、無表面缺陷的蘋果一批,用注射器吸取復(fù)合菌懸液,從花萼處注入到果核處進(jìn)行培養(yǎng)。培養(yǎng)的復(fù)合菌株、制備的樣本和制備效果如圖3所示,可見樣本制備效果較好。
圖3 腐心病蘋果復(fù)合病原菌培養(yǎng)、缺陷樣本及制備效果Fig.3 Cultivation of brown-rot core fungi in apple and preparation of defect apple samples
圖4 正常與不同腐變程度的蘋果樣本透射光譜比較圖Fig.4 Transmittance spectra comparison of intact with different defect degree in apple
2.2 蘋果透射光譜在線獲取與特異性分析
蘋果品質(zhì)透射光譜在線檢測(cè)系統(tǒng)經(jīng)優(yōu)化采集參數(shù),設(shè)置在線檢測(cè)3個(gè)/秒,光譜每次觸發(fā)采集時(shí)間80 ms。獲取的透射光譜在600~680 nm范圍內(nèi)光譜強(qiáng)度波動(dòng)較大,主要是蘋果表面顏色差異引起的[19];700~1 050 nm范圍光譜強(qiáng)度波動(dòng)不大,波形變化較小,相對(duì)穩(wěn)定。在線獲得的蘋果透射光譜信號(hào)強(qiáng)度較漫反射采集方法獲得的光強(qiáng)度低,光譜的信噪比低。為了消除基線漂移和噪聲信號(hào)的影響,研究嘗試并比較了多種光譜預(yù)處理方法,發(fā)現(xiàn)二階導(dǎo)數(shù)預(yù)處理方法可以有效提高光譜質(zhì)量。從原理上分析,導(dǎo)數(shù)計(jì)算常增加噪音,為消除高頻噪聲,導(dǎo)數(shù)預(yù)處理前常需要進(jìn)行平滑處理。對(duì)光譜求導(dǎo)一般都采用Savitzky-Golay卷積求導(dǎo)法計(jì)算。在使用時(shí),差分寬度選擇是十分重要的:如果差分寬度太小,噪聲會(huì)很大,影響所建模型的質(zhì)量;如果差分寬度太大,平滑過度,會(huì)失去大量的細(xì)節(jié)信息。經(jīng)比較后,研究采用13點(diǎn)2次的Savitzky-Golay卷積求導(dǎo)后得到的二階導(dǎo)數(shù)光譜用于后續(xù)研究。
對(duì)制備的缺陷蘋果樣本,利用研發(fā)的在線檢測(cè)系統(tǒng)采集透射光譜,分析缺陷蘋果的透射光譜差異。在550~900 nm光譜范圍內(nèi),蘋果具有較好的透光性。通過光譜分析發(fā)現(xiàn),腐心病蘋果透射光譜強(qiáng)度比正常果低,在600~750 nm光譜區(qū)域衰減顯著,嚴(yán)重腐心病蘋果可使640 nm波峰消失,708 nm波峰強(qiáng)度降低很多,可能是腐變使蘋果組織中空氣間隙比增加,光散射增強(qiáng)導(dǎo)致透射光通量降低。從機(jī)理上揭示透射光譜檢測(cè)內(nèi)部缺陷的可行性和不同缺陷檢測(cè)的特異性。蘋果缺陷樣本及透射光譜曲線如圖4所示,可以發(fā)現(xiàn)同類缺陷不同病變程度的光譜均存在一定差異,結(jié)合模式識(shí)別方法能夠?qū)崿F(xiàn)高精度快速判別。目前,中國(guó)蘋果的國(guó)家和地方標(biāo)準(zhǔn)中尚無內(nèi)部缺陷的相關(guān)規(guī)定,但探索性研究?jī)?nèi)部缺陷具有重要現(xiàn)實(shí)意義。依據(jù)美國(guó)蘋果主產(chǎn)區(qū)華盛頓州的相關(guān)標(biāo)準(zhǔn),按蘋果切面缺陷面積占總面積的比例將腐心病劃分為輕度、中度和重度3種。
2.3 蘋果內(nèi)部缺陷判別模型
模式識(shí)別方法是一種依據(jù)計(jì)算準(zhǔn)則對(duì)信息進(jìn)行處理實(shí)現(xiàn)判別分類的統(tǒng)計(jì)方法。模式識(shí)別根據(jù)“物以類聚”的原則進(jìn)行樣本的分類,以已知樣本作為訓(xùn)練集進(jìn)行訓(xùn)練,依據(jù)準(zhǔn)則讓計(jì)算機(jī)向這些已知樣本“學(xué)習(xí)”,經(jīng)過訓(xùn)練得到判別模型。在光譜分析方面,常用的模式識(shí)別方法包括線性判別分析、馬氏距離、簇類的獨(dú)立軟模式方法、K最近鄰法等線性方法,人工神經(jīng)網(wǎng)絡(luò)和支持向量機(jī)等非線性方法。選用模式識(shí)別的方法原則是首先考慮線性的模式識(shí)別的方法,如果線性模式識(shí)別的方法識(shí)別效果不好的情況下再重新考慮非線性的方法。為保證在線檢測(cè)的計(jì)算效率,本研究采用線性判別分析(linear discriminant analysis,LDA)。LDA是一種經(jīng)典的有監(jiān)督模式識(shí)別方法,在目前機(jī)器學(xué)習(xí)、數(shù)據(jù)挖掘領(lǐng)域廣泛使用[20]。
從蘋果的透射光譜來看,在600~900 nm范圍蘋果的透光性較好,選擇該波段用于缺陷的判別。因光譜變量數(shù)較多,為降低LDA計(jì)算的復(fù)雜度,運(yùn)用LDA方法前先進(jìn)行主成分分析(principal component analysis,PCA)提取特征波長(zhǎng)。PCA是把多個(gè)指標(biāo)轉(zhuǎn)化為幾個(gè)綜合指標(biāo)的一種統(tǒng)計(jì)方法,它沿著協(xié)方差最大方向由多維光譜數(shù)據(jù)空間向低維數(shù)據(jù)空間投影,各主成分向量之間相互正交。通過選擇合理的主成分既可以避免建模中的信息冗余,又不會(huì)過多地丟失原始特征信息,同時(shí)在分析數(shù)據(jù)中也起到簡(jiǎn)化的目的。根據(jù)主成分分量權(quán)重,提取蘋果腐心病檢測(cè)的特征波長(zhǎng)為645、675、688、710、750、810和860 nm,作為L(zhǎng)DA模式識(shí)別的輸入。經(jīng)制備的缺陷樣本,先在線采集透射光譜,然后切片目視法判斷缺陷等級(jí),共84個(gè)樣本,其中完好果18個(gè),輕度21個(gè),中度25個(gè),嚴(yán)重18個(gè),建立蘋果腐心病在線判別模型。為驗(yàn)證識(shí)別模型的性能,再次制備蘋果缺陷樣本,共71個(gè),并在線驗(yàn)證。在線判別的結(jié)果如表1所示,有1個(gè)完好果被判斷為輕度缺陷果,因該蘋果中心有輕度空心;輕度缺陷有3個(gè)被判斷為完好,蘋果果核處缺陷較小,未能有效獲取缺陷信息,輕度缺陷的正確識(shí)別率最低。模型預(yù)測(cè)時(shí)總體識(shí)別率為90.14%,可見透射光譜的缺陷在線檢測(cè)是有效的。
表1 蘋果腐心病在線預(yù)測(cè)判別結(jié)果Table 1 Discriminant result of on-line prediction internal defect apples
1)根據(jù)水果具有良好透光性的特點(diǎn),構(gòu)建了近紅外透射光譜技術(shù)的蘋果腐心病在線檢測(cè)系統(tǒng),優(yōu)化設(shè)計(jì)了光源、光纖、信號(hào)控制器和傳送單元,解決了信號(hào)干擾問題,開發(fā)了在線檢測(cè)專用軟件。經(jīng)試驗(yàn)發(fā)現(xiàn),檢測(cè)速度3個(gè)/秒時(shí)系統(tǒng)運(yùn)行穩(wěn)定可靠,能有效的在線獲取蘋果的透射光譜信息。
2)研究分析正常蘋果與不同腐變程度蘋果的透射光譜發(fā)現(xiàn),在600~900 nm光譜區(qū)域蘋果透光性較好,在708和810 nm有2個(gè)明顯的吸收峰;蘋果腐心病越嚴(yán)重,透射光譜強(qiáng)度越低,揭示了不同缺陷程度檢測(cè)的可行性。
3)研究采用模式識(shí)別方法LDA建立蘋果腐心病在線判別模型,預(yù)測(cè)時(shí)總體識(shí)別率為90.14%,可見基于透射光譜技術(shù)的缺陷在線檢測(cè)是有效的。
4)研究結(jié)果表明,研發(fā)的近紅外透射光譜在線檢測(cè)系統(tǒng)可以實(shí)現(xiàn)蘋果內(nèi)部缺陷的快速、無損在線檢測(cè)。下一步工作中,將研究蘋果內(nèi)在組分和內(nèi)部缺陷的多指標(biāo)同步檢測(cè)方法,提高內(nèi)部品質(zhì)在線檢測(cè)的全面性。
[1]Gao L L,Zhang Q,Sun X Y,et al.Etiology of moldy core,core browning,and core rot of Fuji apple in China[J].Plant Disease, 2013,97(4):510-516.
[2]Upchurch B L,Throop J A,Aneshansley D J.Detecting internal breakdown in apples using interactance measurements[J]. Postharvest Biology and Technology,1997,10(1):15-19.
[3]Zerbini P E,Grassi M,Cubeddu R,et al.Nondestructive detection of brown heart in pears by time-resolved reflectance spectroscopy[J].Postharvest Biology and Technology,2002,25 (1):87-97.
[4]Clark C J,McGlone V A,Jordan R B.Detection of brownheart in‘braeburn’apple by transmission NIR spectroscopy[J].Postharvest Biology and Technology,2003,28(1):87-96.
[5]McGlone V A,Martinsen P J,Clark C J,et al.On-line detection ofbrownheartin braeburn apples using near infrared transmission measurements[J].Postharvest Biology and Technology, 2005,37(2):142-151.
[6]Han D,Tu R,Lu C,et al.Nondestructive detection of brown core in the Chinese pear‘Yali’by transmission visible NIR spectroscopy[J].Food Control,2006,17(8):604-608.
[7]Fu X,Ying Y,Lu H,et al.Comparison of diffuse reflectance and transmission mode of visible-near infrared spectroscopy for detecting brown heart of pear[J].Journal of Food Engineering, 2007,83(3):317-323.
[8]Shenderey C,Shmulevich I,Alchanatis V,et al.NIRS detection of moldy core in apples[J].Food and Bioprocess Technology, 2010,3(1):79-86.
[9]Vanoli M,Rizzolo A,Grassi M,et al.Studies on classification models to discriminate‘Braeburn’apples affected by internal browning using the optical properties measured by time-resolved reflectance spectroscopy[J].Postharvest Biology and Technology, 2014,91:112-121.
[10]韓東海,劉新鑫,魯超,等.蘋果內(nèi)部褐變的光學(xué)無損傷檢測(cè)研究[J].農(nóng)業(yè)機(jī)械學(xué)報(bào),2006,37(6):86-88+93. Han Donghai,Liu Xinxin,Lu Chao,et al.Study on opticalnondestructive detection of breakdown apples[J].Transactions of the Chinese Society for Agricultural Machinery,2006,37(6): 86-88,93.(in Chinese with English abstract)
[11]劉新鑫,韓東海,涂潤(rùn)林,等.蘋果水心病在貯藏期變化的無損檢測(cè)[J].農(nóng)業(yè)工程學(xué)報(bào),2004,20(1):211-214. Liu Xinxin,Han Donghai,Tu Runlin,et al.Non-destructive detecting watercore apple during storage[J].Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE),2004,20(1):211-214.(in Chinese with English abstract)
[12]王加華,孫旭東,潘璐,等.基于可見/近紅外能量光譜的蘋果褐腐病和水心鑒別[J].光譜學(xué)與光譜分析,2008,28(9):2098-2102. Wang Jiahua,Sun Xudong,Pan Lu,et al.Discrimination of brownheart and watercore of apples based on energy spectrum of visible/near infrared transmittance[J].Spectroscopy and Spectral Analysis,2008,28(9):2098-2102.(in Chinese with English abstract)
[13]李順峰,張麗華,劉興華,等.基于主成分分析的蘋果霉心病近紅外漫反射光譜判別[J].農(nóng)業(yè)機(jī)械學(xué)報(bào),2011,42(10):158-161. Li Shunfeng,Zhang Lihua,Liu Xinghua,et al.Discriminant analysis of apple moldy core using near infrared diffuse reflectance spectroscopy based on principal component analysis [J].Transactions of the Chinese Society for Agricultural Machinery,2011,42(10):158-161.(in Chinese with English abstract)
[14]田有文,程怡,王小奇,等.基于高光譜成像的蘋果蟲傷缺陷與果梗/花萼識(shí)別方法[J].農(nóng)業(yè)工程學(xué)報(bào),2015,31(4):325-331. Tian Youwen,Cheng Yi,Wang Xiaoqi,et al.Recognition method ofinsectdamage and stem/calyx on apple based on hyperspectral imaging[J].Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE),2015,31 (4):325-331.(in Chinese with English abstract)
[15]劉海彬,高迎旺,盧勁竹,等.基于激光散斑的梨缺陷與果梗/花萼的識(shí)別[J].農(nóng)業(yè)工程學(xué)報(bào),2015,31(4):319-324. Liu Haibin,Gao Yingwang,Lu Jinzhu et al.Pear defect and stem/calyx discrimination using laser speckle[J].Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE),2015,31(4):319-324.(in Chinese with English abstract)
[16]張海云,彭彥昆,王偉,等.生鮮豬肉主要品質(zhì)參數(shù)無損在線檢測(cè)系統(tǒng)[J].農(nóng)業(yè)機(jī)械學(xué)報(bào),2013,44(4):146-151. Zhang Haiyun,Peng Yankun,Wang Wei,et al.Nondestructive real-time detection system for assessing main quality parameters of fresh pork[J].Transactions of the Chinese Society for Agricultural Machinery,2013,44(4):146-151.(in Chinese with English abstract)
[17]Soliman S,Li X Z,Shao S,et al.Potential mycotoxin contamination risks of apple products associated with fungal flora of apple core[J].Food Control,2015,47:585-591.
[18]Zhang C,Wang J,Zhang J,et al.Effects of β-aminobutyric acid on control of postharvest blue mould of apple fruit and its possible mechanisms of action[J].Postharvest Biology and Technology,2011,61(2):145-151.
[19]Guo Z M,Huang W Q,Peng Y K,et al Color compensation and comparison of shortwave near infrared and long wave near infrared spectroscopy for determination of soluble solids content of‘Fuji’apple[J].Postharvest Biology and Technology,2016, 115:81-90.
[20]Brito A L B,Araújo D A,Pontes M J C,et al.Near infrared reflectance spectrometry classification of lettuce using linear discriminant analysis[J].Analytical Methods,2015,5(7):1890-1895.
Design and test of on-line detection system for apple core rot disease based on transmitted spectrum
Guo Zhiming1,2,Huang Wenqian2,Chen Quansheng1,Wang Qingyan2,Zhang Chi2,Zhao Jiewen1
(1.School of Food and Biological Engineering,Jiangsu University,Zhenjiang 212013,China;2.National Engineering Research Center of Intelligent Equipment for Agriculture,Beijing 100097,China)
Internally defected apples are not easily distinguished from normal ones by their external appearances,since there are no visible defects on the exterior.Detection of internally defected apples with a suitable technique is thus crucial for quality control.Aimed to the nondestructive on-line test of the internal defect of apple,this work presented the development of an on-line detection prototype system using visible and near-infrared(Vis/NIR)technology as a new approach for on-line identifying the defects without sample destructiveness.The system included a fruit tray conveyor,an illumination source,a spectral acquisition unit,a photoelectric sensor,chassis,an industrial computer,a dark sample compartment,and an analysis unit.The critical components such as light source module,costumed fiber and transmission unit with separate tray were designed and developed to improve spectra signal quality,lower heat damage and reduce mechanical damage.The problem of photoelectric signal interference was solved by strong and weak electricity separation and metal shield.Special detection software was developed for real-time inspection based on multithread programmingtechnology.The advantages of this software were presented by the process of modular design,including software system initialization,information communication,information interaction,spectral data acquisition and processing,spectral curve real-time display,defect category discrimination,statistics and saving of detection results.It is difficult to collect the internally defected apple samples from orchard,supermarket and wholesalers,because the symptoms are not externally recognizable and visible if the fruits are not cut.In this experiment,the apples with internal defects caused by core rot fungi were collected and cultivated.We tried the preparation of samples and achieved good performance.A total of 84‘Fuji’apples were used to establish classification model,and another batch(a total of 71 samples)was on-line measured for verification the robustness and applicability of model.The detection of internal quality information in nondestructive online way was achieved by this system.The differences of spectral response between intact and internally defected apple were compared and analyzed.Meanwhile,the varying degrees of defect apple were discussed.After the optimization of parameters,the conveyor was set at a speed of 3 apples within one second,and the integration time of the spectral collection was set to 80 ms.Spectral data were recorded as absorbance units.On the basis of selection characteristic wavelength, linear discriminant analysis(LDA)was implemented to establish a discriminant model of apple internal defects.The optimal LDA model was used to estimate the samples in the training set,and the total classification rate was 94.05%in the training set.The optimal LDA was used to test the new samples in the prediction set,and the total classification rate was 90.14%in the predication set.The classification results demonstrate that the LDA model has high and robust classification performance.Additionally,we could found that slight degree internal defect was difficult to identify,because it was small in the core of apple with weak spectra response.The proposed system could successfully differentiate the apple with internal defect from intact apple.The results showed that a nondestructive on-line internal defect determination prototype based on Vis/NIR transmittance technique was feasible.In view of these results,the present research lays the foundation for the future development of an automatic system based on transmittance spectroscopy in the visible and NIR regions that is capable of detecting internal defects in apple fruits,which is extremely important from the economic point of view.The use of such detecting techniques potentially makes it possible to remove internally defected samples simply in a fast, nondestructive on-line way for high quality control in fruit industries.
spectrometry;models;agriculture;on-line detection system;transmittance spectroscopy;apple;internal defect; nondestructive inspection
10.11975/j.issn.1002-6819.2016.06.039
TP274.4;O433.4
A
1002-6819(2016)-06-0283-06
2015-09-13
2016-01-23
國(guó)家自然科學(xué)基金(31501216);國(guó)家科技支撐計(jì)劃(2015BAD19B03);江蘇大學(xué)高級(jí)人才基金(15JDG169)
郭志明(1982-),男,山東人,講師,博士,主要從事食品農(nóng)產(chǎn)品快速無損檢測(cè)技術(shù)與裝備研究。鎮(zhèn)江 江蘇大學(xué)食品與生物工程學(xué)院,212013。Email:zhmguo@126.com
農(nóng)業(yè)工程學(xué)報(bào)2016年6期