CN105891230B - 基于光谱图像分析的水果外表检测方法 - Google Patents

基于光谱图像分析的水果外表检测方法 Download PDF

Info

Publication number
CN105891230B
CN105891230B CN201610404811.7A CN201610404811A CN105891230B CN 105891230 B CN105891230 B CN 105891230B CN 201610404811 A CN201610404811 A CN 201610404811A CN 105891230 B CN105891230 B CN 105891230B
Authority
CN
China
Prior art keywords
image
spectral
fruit
analysis
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610404811.7A
Other languages
English (en)
Other versions
CN105891230A (zh
Inventor
熊菊莲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Ruipengcheng Science and Technology Co Ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201610404811.7A priority Critical patent/CN105891230B/zh
Publication of CN105891230A publication Critical patent/CN105891230A/zh
Application granted granted Critical
Publication of CN105891230B publication Critical patent/CN105891230B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30128Food products

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Pathology (AREA)
  • Immunology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Biochemistry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

本发明公开一种基于光谱图像分析的水果外表检测方法,其包括步骤:预先确定待检测水果进行光谱图像分析检测时所采用的特征波长;光谱图像采集***利用特征波长检测水果外表面,分别获取对应每个特征波长的光谱分量图像,对所有的光谱分量图像进行主成分分析,得到初步检测分析图;对上述初步检测分析图进行预处理后,得到待分割图像,再采用自适应阈值分割方法对预处理后的待分割图像进行图像分割,在待分割图像中将水果轻微损伤区域图像被完整分割出来,实现水果外表检测识别。本发明可以有效识别各种水果外表轻微损伤,且检测识别准确率较高。

Description

基于光谱图像分析的水果外表检测方法
本申请是对CN2014104528793(申请日:2014-09-05,专利名称:基于光谱图像分析的水果外表检测方法)做出的分案申请。
技术领域
本发明涉及一种图像识别技术,尤其是涉及一种基于光谱图像分析的水果外表检测方法。
背景技术
可见光图像检测技术能够解决水果显著表面缺陷的检测问题,但对瘀伤等水果表面轻微损伤的检测能力则比较有限。而近红外光谱分析技术在内部缺陷和轻微损伤检测方面具有较好的灵敏度和检测精度,但近红外光谱分析属于点测量,轻微损伤在冬枣上的出现部位存在很强的随机性,所以检测精度难以保证。
目前已有论文或专著公开了高光谱图像技术对水果外表面的检测技术,比如,农业机械学报,2008,39(1):106-109,公开了“利用高光谱图像技术检测水果轻微损伤”的论文(作者:赵杰文,刘剑华,陈全胜,等),作者以苹果为研究对象,通过对500nm~900nm的高光谱图像进行PCA,选取547nm波长下的图像,通过数字图像处理方法提取轻微损伤区域,轻微损伤检测的正确率为88.57%。
以上论文公开的技术方案,虽然验证了高光谱成像分析技术在水果损伤检测方面的可行性,但仍存在如下技术缺陷:对所有高光谱分量图像进行主成分分析(PrincipalComponents Analysis,PCA)变换,虽然降维速度较快,但由于过多波长参与变换,易导致大量噪声引入而降低PCA变换效果,从而影响了识别及检测精度。
发明内容
本发明提出一种基于光谱图像分析的水果外表检测方法,通过提取光谱的特征波长,并利用特征波长主成分图像对水果表面的轻微损伤进行识别检测。
本发明采用如下技术方案实现:一种基于光谱图像分析的水果外表检测方法,其包括步骤:
计算光谱图像各个波段的图像标准差选择的图像标准差最大的a个光谱波段(又简称“波段”或“波段矢量”);
计算上述a个光谱波段中任意波段矢量o和波段矢量p之间的相关系数Rop,选出相关系数Rop最小的b个波段矢量作为初步特征波长;
利用光谱角度制图法,在上述b个波段矢量上分别计算无损伤表面的待检测水果的光谱图像c与有损伤表面的待检测水果的光谱图像d之间的光谱夹角β,将光谱夹角β最大的波段组合确定为待检测水果进行光谱图像分析检测时所采用的特征波长;
光谱图像采集***利用特征波长检测水果外表面,实现水果外表轻微损伤区域的检测识别;
其中,a和b均为整数且b<a。
其中,图像标准差的计算为:
M和N分别表示某个波段的行数和列数,f(i,j)为某个波段在光谱图像中像素点(i,j)的灰度值,m为某个波段在光谱图像中所有像素点的平均灰度值。
其中,相关系数Rop计算为:
mo和mp分别是波段o和波段p的均值矢量,xo和xp分别表示波段矢量o和波段p上像素点的灰度值,0≤Rop≤1。
其中,光谱夹角β的计算为:
xck及xdk分别为两个光谱图像c及光谱图像d在波段k上的光谱值,k=1,2,…,b。
与现有技术相比,本发明具有如下有益效果:
本发明采用图像标准差计算、相关系数计算和光谱角计算筛选了针对待检测水果进行光谱图像识别所用的特征波长,然后通过特征波长的光谱分量图像基于主成分分析,实现了光谱图像信息的融合,并通过图像预处理和自适应阈值分割实现了水果微观损伤的识别。实践证明,本发明可以有效识别各种水果外表轻微损伤,识别试验的正确识别率达到了95%以上。
附图说明
图1是本发明一个实施例的流程示意图。
具体实施方式
本发明提出一种基于光谱图像分析的水果外表检测方法,通过提取光谱的特征波长,并利用特征波长主成分图像对水果表面的轻微损伤进行识别检测,检测识别快速且准确率较高。
如图1所示,在一个优选实施例中,本发明包括如下实现步骤:
步骤S1、预先确定光谱图像的特征波长,具体由步骤S11~步骤S13来实现。
由于光谱图像波段数众多、数据量庞大,直接进行对象识别与分类比较困难,故在进行对象识别之前,必须首先通过对光谱图像进行数据降维提取特征波长,即选出信息量大、相关性小、类别可分性好的波段子集。
步骤S11,根据光谱图像各波段包含的信息量进行数值评价,确定各个波段子集包含信息量的大小。
本实施例通过计算各波段的光谱图像的图像标准差来确定各个波段子集包含信息量的大小。图像标准差反映了图像灰度值与平均灰度值的总的离散度,它是衡量图像信息量大小的重要度量,其值越大,所包含的信息量越大。其中,图像标准差的计算如公式(1)。
其中,M、N分别表示某个波段的行数和列数,f(i,j)为某个波段在光谱图像中像素点(i,j)的灰度值,m为某个波段在光谱图像中所有像素点的平均灰度值。
步骤S12,计算出光谱图像各波段的图像标准差选择的图像标准差最大(或较大)的a个波段(其中a可以根据实际情况确定,比如,a为光谱图像的波段总数的10-20%),计算此a个光谱波段之间的相关系数,以进一步剔除冗余变量。
定义此a个光谱波段中任意两个波段矢量o和波段矢量p之间的相关系数Rop,计算如公式(2):
式中mo和mp分别是波段o和波段p的均值矢量,xo和xp分别表示波段矢量o和波段p上像素点的灰度值,0≤Rop≤1,Rop越大说明这两个波段矢量o和波段矢量p之间相关性越强。
根据所有计算出的相关系数Rop,选出相关系数Rop最小(或较小)的b(其中b<a且b为整数)个波段矢量作为初步特征波长。
步骤S13,利用光谱角度制图法,在这b个波段矢量上分别计算无损伤表面的待检测水果的光谱图像c与有损伤表面的待检测水果的光谱图像d之间的光谱夹角β,光谱夹角β越小则说明这两个光谱图像越相似。
光谱夹角β的计算如公式(3):
光谱夹角计算如公式(3),其中:b为波段个数,可根据实际需要设定b值,比如b=6;xck及xdk分别为两个光谱图像c及光谱图像d在波段k上的光谱值(k=1,2,…,b)。例如,对选择的10个波段进行光谱夹角β的计算,当在波段k光谱夹角β越大时,则说明两个光谱图像c和d的可分性越好,因此,将光谱夹角β最大的波段矢量组合确定待检测水果进行光谱图像分析检测时所采用的特征波长。
因此,通过上述步骤,步骤S1可以针对不同的检测水果分别预先确定检测时光谱图像的特征波长。
步骤S2、光谱图像采集***利用步骤S1确定的特征波长检测水果外表面,获得初步检测分析图。
比如步骤S1针对苹果外表面损伤检测时,预先确定了光谱图像的6个特征波长,利用这6个特征波长分别检测苹果外表获取对应的6个光谱分量图像,然后对这6个光谱分量图像采取现有技术公开的主成分分析(Principal Components Analysis,PCA),得到初步检测分析图。
步骤S3、对上述初步检测分析图进行直方图均衡化、中值滤波等图像预处理后,得到待分割图像,再采用自适应阈值分割方法对预处理后的待分割图像进行图像分割,即可以在待分割图像中将水果轻微损伤区域图像被完整分割出来,且不存在误分割区域,从而实现了轻微损伤区域的直接识别。
综上,本发明采用图像标准差计算、相关系数计算和光谱角计算筛选了针对待检测水果进行光谱图像识别所用的特征波长,然后通过特征波长的光谱分量图像基于主成分分析,实现了光谱图像信息的融合,并通过图像预处理和自适应阈值分割实现了水果微观损伤的识别。实践证明,本发明可以有效识别各种水果外表轻微损伤,识别试验的正确识别率达到了95%以上。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。

Claims (3)

1.一种基于光谱图像分析的水果外表检测方法,其特征在于,包括步骤:
计算光谱图像各个波段的图像标准差选择的图像标准差最大的a个光谱波段;
计算上述a个光谱波段中任意波段矢量o和波段矢量p之间的相关系数Rop,选出相关系数Rop最小的b个波段矢量作为初步特征波长;
利用光谱角度制图法,在上述b个波段矢量上分别计算无损伤表面的待检测水果的光谱图像c与有损伤表面的待检测水果的光谱图像d之间的光谱夹角β,将光谱夹角β最大的波段组合确定为待检测水果进行光谱图像分析检测时所采用的特征波长;
光谱图像采集***利用特征波长检测水果外表面,分别获取对应每个特征波长的光谱分量图像,对所有的光谱分量图像进行主成分分析,得到初步检测分析图;
对上述初步检测分析图进行预处理后,得到待分割图像,再采用自适应阈值分割方法对预处理后的待分割图像进行图像分割,在待分割图像中将水果轻微损伤区域图像被完整分割出来,且不存在误分割区域,实现水果外表轻微损伤区域的直接识别;
其中,a和b均为整数且b<a;
其中,相关系数Rop计算为:mo和mp分别是波段o和波段p的均值矢量,xo和xp分别表示波段o和波段p上像素点的灰度值,0≤Rop≤1;
其中,光谱夹角β的计算为:
xck及xdk分别为两个光谱图像c及光谱图像d在波段k上的光谱值,k=1,2,…,b。
2.根据权利要求1所述基于光谱图像分析的水果外表检测方法,其特征在于,图像标准差的计算为:
<mrow> <mo>&amp;part;</mo> <mo>=</mo> <msqrt> <mfrac> <mrow> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>M</mi> <mo>=</mo> <mn>1</mn> </mrow> </munderover> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>j</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>N</mi> <mo>=</mo> <mn>1</mn> </mrow> </munderover> <msup> <mrow> <mo>&amp;lsqb;</mo> <mi>f</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>)</mo> </mrow> <mo>-</mo> <mi>m</mi> <mo>&amp;rsqb;</mo> </mrow> <mn>2</mn> </msup> </mrow> <mrow> <mi>M</mi> <mo>*</mo> <mi>N</mi> </mrow> </mfrac> </msqrt> </mrow>
M和N分别表示某个波段的行数和列数,f(i,j)为某个波段在光谱图像中像素点(i,j)的灰度值,m为某个波段在光谱图像中所有像素点的平均灰度值。
3.根据权利要求1所述基于光谱图像分析的水果外表检测方法,其特征在于,b=6。
CN201610404811.7A 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法 Active CN105891230B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610404811.7A CN105891230B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610404811.7A CN105891230B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法
CN201410452879.3A CN104181170B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201410452879.3A Division CN104181170B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法

Publications (2)

Publication Number Publication Date
CN105891230A CN105891230A (zh) 2016-08-24
CN105891230B true CN105891230B (zh) 2018-06-01

Family

ID=51962393

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201410452879.3A Active CN104181170B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法
CN201610404811.7A Active CN105891230B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法
CN201610404689.3A Pending CN105891229A (zh) 2014-09-05 2014-09-05 确定水果外表进行光谱图像分析检测所用特征波长的方法

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201410452879.3A Active CN104181170B (zh) 2014-09-05 2014-09-05 基于光谱图像分析的水果外表检测方法

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201610404689.3A Pending CN105891229A (zh) 2014-09-05 2014-09-05 确定水果外表进行光谱图像分析检测所用特征波长的方法

Country Status (1)

Country Link
CN (3) CN104181170B (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105784712B (zh) * 2016-02-29 2018-07-17 东华大学 一种采用接触式图像传感器的自动验布方法
CN105738376B (zh) * 2016-02-29 2018-07-17 东华大学 一种采用接触式图像传感器的自动验布机
CN105699386B (zh) * 2016-02-29 2019-02-26 东华大学 一种采用接触式图像传感器的自动验布标记方法
CN106332713B (zh) * 2016-08-16 2019-06-11 浙江科技学院 一种sd-oct图像的枇杷早期瘀伤鉴别方法
CN106780347B (zh) * 2017-02-09 2020-03-03 浙江科技学院 一种基于oct图像处理的枇杷早期瘀伤鉴别方法
CN107505325B (zh) * 2017-08-18 2023-04-25 西北农林科技大学 冬枣果实的全方位品质检测方法
CN109272030A (zh) * 2018-09-03 2019-01-25 贵阳学院 基于光纤光谱技术的苹果表面早期损伤快速无损识别方法
CN109270022B (zh) * 2018-09-14 2020-03-10 山东大学 一种近红外光谱模型的波段选择方法及模型构建方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5339963A (en) * 1992-03-06 1994-08-23 Agri-Tech, Incorporated Method and apparatus for sorting objects by color
CN101131734A (zh) * 2007-06-25 2008-02-27 北京航空航天大学 适用于高光谱遥感图像的自动波段选择方法
JP5568444B2 (ja) * 2010-11-01 2014-08-06 株式会社日立ハイテクノロジーズ 欠陥検査方法、微弱光検出方法および微弱光検出器
CN102495005B (zh) * 2011-11-17 2013-05-08 江苏大学 高光谱图像技术诊断作物水分亏缺的方法
CN102890092B (zh) * 2012-10-12 2014-12-17 浙江大学 利用特征角余弦值检测水蜜桃褐腐病缺陷的方法
CN103278464B (zh) * 2013-04-18 2015-10-21 北京工商大学 鱼肉检测方法和装置

Also Published As

Publication number Publication date
CN105891229A (zh) 2016-08-24
CN104181170B (zh) 2016-08-17
CN105891230A (zh) 2016-08-24
CN104181170A (zh) 2014-12-03

Similar Documents

Publication Publication Date Title
CN105891230B (zh) 基于光谱图像分析的水果外表检测方法
Yiyang The design of glass crack detection system based on image preprocessing technology
Sahu et al. Defect identification and maturity detection of mango fruits using image analysis
Zhang et al. Computer vision detection of defective apples using automatic lightness correction and weighted RVM classifier
Blasco et al. Recognition and classification of external skin damage in citrus fruits using multispectral data and morphological features
CN111612741B (zh) 一种基于失真识别的精确无参考图像质量评价方法
CN108563979B (zh) 一种基于航拍农田图像判别水稻稻瘟病病情的方法
Ashok et al. Automatic quality evaluation of fruits using probabilistic neural network approach
CN106815819B (zh) 多策略粮虫视觉检测方法
US20140301608A1 (en) Chemical structure recognition tool
CN111007013B (zh) 面向东北冷凉区的作物轮作休耕遥感监测方法与装置
Zhang et al. Automated apple stem end and calyx detection using evolution-constructed features
Huang et al. Online apple grading based on decision fusion of image features
Jin et al. Darkvisionnet: Low-light imaging via rgb-nir fusion with deep inconsistency prior
CN109829905A (zh) 一种面部美化感知质量的无参考评价方法
CN114937038B (zh) 面向可用性的遥感影像质量评价方法
WO2019184269A1 (zh) 基于Landsat8含雪影像的云检测方法
Qu et al. Dimensionality reduction and derivative spectral feature optimization for hyperspectral target recognition
CN109682821B (zh) 一种基于多尺度高斯函数的柑橘表面缺陷检测方法
Tian et al. Detection of early bruises on apples using near‐infrared camera imaging technology combined with adaptive threshold segmentation algorithm
Shi et al. Urban feature shadow extraction based on high-resolution satellite remote sensing images
Janardhana et al. Computer aided inspection system for food products using machine vision—a review
Kim et al. A novel red apple detection algorithm based on adaboost learning
Nie et al. Machine vision-based apple external quality grading
CN104764402A (zh) 柑橘体积的视觉检测方法

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191205

Address after: Room 314-1, dantaihu building (Wuluo Science Park), No.9, Taihu East Road, Wuzhong District, Suzhou, Jiangsu Province

Patentee after: Suzhou ruipengcheng Technology Co., Ltd

Address before: 528500 Guangdong city of Foshan province Wenchang city streets Gaoming District Road No. 183 6 102

Patentee before: Xiong Julian

TR01 Transfer of patent right