1、第 28 卷增刊 2农 业 工 程 学 报Vol.28Supp.22012 年10 月Transactions of the Chinese Society of Agricultural EngineeringOct.2012243Identification of maize kernel embryo based on hyperspectralimaging technology and PCAHuang Wenqian1,2,Li Jiangbo2,Zhang Chi2,Zhang Baohua2,3,Zhang Baihai1(1.School of Automation,Beij
2、ing Institute of Technology,Beijing 100081,China;2.Beijing Research Center of Intelligent Equipment for Agriculture,Beijing 100097,China;3.State Key Laboratory of Mechanical System and Vibration,Shanghai Jiaotong University,Shanghai 200240,China)Abstract:To segment the embryo from the maize kernel,a
3、 hyperspectral imaging system has been built for acquiringreflectance images from maize kernels in the spectral region between 500 and 950 nm.Hyperspectral images of maizesamples were evaluated using principal components analysis(PCA)with the goal of selecting several effectivewavelengths that could
4、 potentially be used in a multispectral imaging system.The second principal component imagesusing three effective wavelengths 510,555 and 575 nm in the visible spectral(VIS)had good identification results underinvestigation.For the investigated independent test samples,97.0%of embryos on samples wer
5、e correctly separated fromthe maize kernels.Key words:principal components analysis,image recognition,models,embryo,maize kernel,hyperspectral imaging,effective wavelengthsdoi:10.3969/j.issn.1002-6819.2012.z2.042CLC number:TP391.41;TP274.52Document code:AArticle ID:1002-6819(2012)-Supp.2-0243-05Huan
6、g Wenqian,Li Jiangbo,Zhang Chi,et al.Identification of maize kernel embryo based on hyperspectral imagingtechnology and PCAJ.Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE),2012,28(Supp.2):243247.(in English with Chinese abstract)黄文倩,李江波,张驰,等.高光谱成像技术和主成分分析识别
7、玉米籽粒的胚J.农业工程学报,2012,28(增刊2):243247.0IntroductionMaize is one of the most important foods in theworld.Prediction of the maize kernel quality enablesthe rapid selection of the seed.The quality of maizekernel is very important for high yields and quality ofcorn,whichismainlydeterminedbythecharacteristi
8、cs of embryo.Measuring exactly theembryo can increase the variety identification rate.Usually,embryoofmaizekernelinspectionisperformed manually,which is extremely low-efficiencyReceive date:2012-05-09Revised date:2012-08-29Foundation item:Postdoctoral Science Foundation of Beijing Academy ofAgricult
9、ure and Forestry Sciences of China 2012;the Young ScientistsFoundation of Beijing Academy of Agricultural Agriculture and ForestrySciences(No.QN201119);National High-Tech Research and DevelopmentProgram of China(863 Program)(No.2012AA101901).Biography:Huang Wenqian(1980),male,Fujian,Ph.D Student,maj
10、or innondestructivedetectiontechnologyandintelligentequipmentforagricultural products,School of Automation,Beijing Institute of Technology,Beijing 100081.Beijing Research Center of Intelligent Equipment forAgriculture,Beijing 100097.Email:.Corresponding author:Zhang Baihai(1966 ),male,Shandong,Profe
11、ssor,major in system engineering,School of Automation,BeijingInstitute of Technology,Beijing 100081.Email:.and labor-consuming.Hyperspectral imaging system,a powerful tool for simultaneous acquisition of spatialand spectral information,has attracted much attentionof researchers in detecting a variet
12、y of agriculturalproducts.Examples include detecting bruises onapples1-2,bruises on pickling cucumbers3,porkmarbling4,contaminant detection on poultry carcassesand cantaloupes5-6,pits in tart cherries7,nematodesin cod fillets8,cracks in shell eggs9,and etc.It isimportant to segment the embryo of the
13、 corn fromother parts before the quality can be inspected.Currently,computer vision technology has been usedto evaluate the quality of kernel10-14.However,theresearchers were more interested in detecting defectson the maize kernel.Few efforts were made towardsautomatic segmenting of maize kernel emb
14、ryo.Themain objective of this study was to investigate thepotential of using a hyperspectral imaging system forsegmenting the embryo from the maize kernel.1Materials and Methods1.1SamplesIn this study,maize kernels(Sweet Type LH-301)农业工程学报2012 年244were purchased from a local market in Beijing ofChin
15、a.In the laboratory,200 kernel samples wereselectedforsegmentationofembryobasedonhyperspectral imaging technology.A hundred sampleswere selected from the data set as training set andused to develop the algorithm.The other 100 sampleswere selected as test set and used to evaluate theperformance of th
16、e developed algorithm.1.2Hyperspectral imaging systemAschematicdiagramofthedevelopedhyperspectralimagingsystemwithaspectralresolution of approximately 2.8 nm and 30um slitwidth is shown in Fig.1.The system consists of fivemaincomponents:animagingspectrograph(ImSpector VNIR-V10E-EMCCD,Spectral Imagin
17、gLtd,Oulu,Finland),a 150 Watt(W)halogen lampwith two line lighting fibers(3900-ER,IlluminationTechnologies,Inc.,USA)providingauniformVIS-NIR illumination for the sample in the field ofview of the optics,an EMCCD camera(Andor LucaEMCCDDL-604M,AndorTechnology plc.,N.Ireland),a sample transportation pl
18、atform(EZHR17EN,AllMotion,Inc.,USA),and a computer(Dell E6520,Intel Core i5-2520M2.5GHz,RAM 8G).Theacquired image was 1004 by 1002 pixels.Because ofthe low quantum efficiency and dark current of CCDdetector at the edges of the spectral region,the imagesoutside the range of 500-950nm contained manyno
19、ises and should be discarded.Only the wavelengthrange between 500 nm and 950 nm was used forfurther processing.Fig.1Schematic of a hyperspectral imaging system1.3Hyperspectral image acquisitionThe system was operated in a dark chamber.During image acquisition,the samples were placed ona flat black-p
20、ainted plate that was fixed on thedisplacement platform,manually orienting the side ofthe samples that contained the embryo towards thecamera.The camera and spectrograph were used toscan the samples line-by-line as the plate moved thesamples through the field of view of the opticalsystem.The line sc
21、an data were saved and processedlater to create hyperspectral image cubes containingspatial and spectral data.Due to the uneven intensity of light source indifferent bands and the existence of dark current in theEMCCD camera,some bands with less light intensitycontained the bigger noises.Therefore,h
22、yperspectralimages need to be calibrated with white and darkreference images.The dark reference was used toremove the dark current effect of the CCD detectors.The dark image was collected by turning off all lightsources and covered the lens with a black cap.ATeflon white board with 99%reflection eff
23、iciency wasused to obtain a white reference image.The correctedimage(R)was calculated using Eq.(1)15-16:odrdRRRRR(1)where Rois the acquired original hyperspectral image;Rris the white reference image;Rdis the dark image.2Results and discussion2.1Hyperspectral reflectance spectraThe representative re
24、gions of interest(ROIs)reflectance spectra of samples in the wavelength rangebetween 500 and 950nm are shown in Fig.2.Spectrawere extracted from the hyperspectral image data oftraining set and were an average of 100 spectra(oneper sample)for embryo area and yellow peel area.Each spectrum was obtaine
25、d from a rectangular 100200 pixels ROI.Fig.2Representative ROIs averaged reflectance spectraobtained from 100 samplesThe reflectance of spectra in the VIS region waslower than that in the NIR region over the entirespectral region.The spectra of embryo region showedhigher reflectance comparing to tho
26、se of the yellow增刊 2黄文倩等:高光谱成像技术和主成分分析识别玉米籽粒的胚245peels.So the single band image would have potentialto discriminate between embryo region and yellowpeel area by using a simple thresholding.However,the results showed that it was difficult to obtain asatisfactory result due to non-uniform illumination
27、 onthe samples.In addition,the spectra as shown in Fig.2do not account for the spatial variations of lightintensities from the center toward the edges.2.2Principal components analysisAlldataprocessingandanalyzingwereperformed using the Environment for VisualizingImagessoftwareprogram(ENVI4.6,Researc
28、hSystem Inc.,Boulder,CO.,USA)and Matlab 2008a(The MathWorks Inc.,Natick,USA)with the imageprocessing toolbox.This research uses the ENVI software packagefor the application of PCA to the hyperspectral data.In the process of creating the PCA images,acorrelation matrix of the image was calculated.This
29、correlation matrix was then used to compute theeigenvalues.The eigenvalues were equivalent to thevariance of each principal component(PC)image.These PC images were ordered in the decreasingdegree of variance sizes,where first PC accounted forthe largest variance.2.3PCA on the VIS to NIR region 500-9
30、50 nmThe first three images(denoted by PC1 to PC3)obtained from PCA for the hyperspectral reflectanceimages of samples on the region from 500 to 950 nmare shown in Fig.3.The PCA provided a means toreduce the high spectral dimension of image data.Inthe first principal component(PC1)image,intensitydec
31、reased from the center to the edges.The contrastbetween embryo regions and yellow peel areas wasclear.However,PC1 images were easily influenced bynon-uniform illumination on the maize kernel.ThePC2imagesdemonstratedmoreinformationofembryo regions on the maize kernel.The embryoregions could be clearl
32、y identified in the PC2.In thePC3 and PC4 images,the image was not very goodcomparing to PC1 and PC2.Starting from PC5,thetransformedimagesnolongercontainedanymeaningful information,and they were not useful forembryo regions detection.Based on visual assessment,the PC2 images provided the best resul
33、ts.a.PC1b.PC2c.PC3d.PC4e.PC5Fig.3First five principal component images obtained usingthe spectral region from 500 to 950 nm2.4PCA on the VIS region 500-760 nmThe gray levels variations between embryoregions and yellow peel areas were mainly affected bythe spectra in VIS region.The spectra in the NIR
34、region were usually not sensitive to the variations.Thus,PCA on the Vis-NIR may weaken the contrastof different regions on maize kernel surface.Ingeneral,the band region from 380 to 760 nm wasknown as VIS region.Therefore,the hyperspectralimages in the wavelength range of 500-760 nm wereused to perf
35、orm PCA for further analysis.Fig.4 illustrates representative PC1,PC2 andPC3 images obtained from the PCA of the 500-760nm hyperspectral reflectance image data.The PC1images reflected a weighted sum and showed effectssimilar to those observed in the entire spectral region.Subsequent PC2 images showe
36、d the best contrastbetween embryo region and yellow peel area.PC3images were not very good comparing to PC1 andPC2.Compared to PC2 images in Fig.3,the PC2image as shown in Fig.4 was also very effective toidentifyembryo.However,usingtoomanywavelengths was also not effective to develop amultispectral
37、system for embryo detection.a.PC1b.PC2c.PC3Fig.4First three principal component images obtained usingthe VIS region from 500 to 760 nm2.5Selection of effective spectral wavebandsThe weighing coefficients plot for the PC2 imagefrom PCA on the 500-760 nm spectral region wasshown in Fig.5.The peaks and
38、 valleys indicated thedominant wavelengths.Therefore,three wavebandsfrom 500 to 760 nm were chosen,which werecentered at around 510,555 and 575 nm,respectively.农业工程学报2012 年246Fig.5Weighing coefficients for the PC2 that resulted fromPCA on the VIS wavelength region 500 to 760 nm2.6PCA on selected eff
39、ective wavebandsThe principal components analysis was thencarried out on the three optimal wavelengths(510,555and 575 nm)instead of the Vis-NIR and VISwavelength ranges.The three PC images were shownin Fig.6.A visual inspection of the three PC imagesrevealed the PC1 and PC2 were similar to PC1 andPC
40、2 obtained from Vis-NIR and VIS spectral regions.Because fewer wavelengths were better for building amultispectralimagingsystem,onlyPC2imageobtained from three effective wavelengths was usedfor further analysis.a.PC1b.PC2c.PC3Fig.6 First three principal component images obtained fromPCA on 510,555 a
41、nd 575 nm,respectively2.7Embryo segmentation algorithmFirstly,a mask template(Fig.7a)was createdusing a single-band image at 546 nm,and PC2 imageof PCA on three effective wavelengths was maskedusing the template to exclude the background thatcouldaffecttheresults.ThePC2imageafterremoving background
42、is shown in Fig.7b.Then,aglobal threshold value of 0.15 was applied to theFig.7b to separate embryo from the maize kernel.In some cases,there were some minor defects/blemishes(noises)on maize kernel,as shown inFig.8a.These noises may carry the same spectralsignature as embryo detected in this work.I
43、n order toovercomethisproblem,morphologicalopeningoperation was used to remove these noises.Theresultant embryo binary images are shown in Fig.8b.a.Mask templateb.PC2imageafterremovingbackgroundFig.7Background segmentationFig.8Morphological opening operation for removing noises.2.8Identification res
44、ultsThe algorithms for multispectral images processingdescribed above were evaluated using 100 independentsamples.The test results are shown in Table 1.97.0%of embryos on samples were correctly separated fromthe maize kernels.Embryos of three samples cannotbe detected.The embryos of these three samp
45、les werevery small and were also removed after removingnoises using morphological operation.Table 1The embryo segmentation results for maizekernelsSample NumbersCorrectionExtractionWrong ExtractionAccuracy/%10097397.0%3ConclusionsSegmentation of embryo in the maize kernel wasa critical step for maiz
46、e variety identification based onmachine vision technology.In this investigation,hyperspectral reflectance images were evaluated forseparating embryo from the maize kernel.Thisinvestigationillustratedthathighdimensionofhyperspectral reflectance images data were reduced toa few optimal wavelengths se
47、lected by using the PCAmethod to form multispectral images.We identifiedthree wavelengths 510,555 and 575 nm could bepotentially implemented in a multispectral imagingsystem for segmentation of embryos.The PCAcoupled with a simple threshold method achieved97.0%embryo segmentation accuracy.a.The resu
48、ltant embryo binaryimages before removing noisesb.The resultant embryo binaryimages after removing noises增刊 2黄文倩等:高光谱成像技术和主成分分析识别玉米籽粒的胚247References1Xing J,Bravo C,Jancs k P,et al.Detecting bruises on Golden Deliciousapples using hyperspectral imagingwith multiple wavebandsJ.Biosyst.Eng.2005,90(1):2
49、736.2ElMasry G,Wang N,Vigneault C,et al.Early detectionof apple bruises on different background colors usinghyperspectralimagingJ.LWT-FoodScienceandTechnology,2008,41(2):337345.3Ariana D,Lu R,Guyer D E.Hyperspectral reflectanceimaging for detection of bruises on pickling cucumbersJ.Comput.Electron.A
50、gric.,2006,53(1):6070.4Qiao J,Ngadi M,Wang N,et al.Pork quality andmarbling level assessment using a hyperspectral imagingsystemJ.J.Food Eng.,2007,83(1):1016.5Lawrence K C,Windham W R,Park B,et al.Partial leastsquares regression of hyperspectral images for contaminantdetectiononpoultry carcassesJ.J.