唐振三,袁剑龙,康亮河,程李香,吕汰,杨晨,张峰
基于图像特征识别的马铃薯薯皮粗糙度分级研究
唐振三1,袁剑龙1,康亮河2,程李香1,吕汰3,杨晨3,张峰1
1甘肃农业大学农学院/干旱生境作物学国家重点实验室/甘肃省作物遗传改良与种质创新重点实验室,兰州 730070;2甘肃农业大学信息科学技术学院,兰州 730070;3天水市农业科学研究所,天水 741000
【目的】马铃薯薯皮粗糙度分级研究可以提供块茎外观品质性状无损检测方法,为客观评价品质质量和高通量筛选品种提供理论和实践基础。【方法】以79份马铃薯品种(系)为供试材料,利用相机采集有/无芽眼的薯皮图像。基于MATLAB R2016a软件对薯皮图像预处理,随机选择8份材料用相关函数指标比较图像灰度化、增强及去噪效果。利用灰度共生矩阵(gray level co-occurrence matrix,GLCM)提取图像特征参数角二阶矩(angular second moment,ASM)、熵(entropy,ENT)、对比度(contrast,CON)和相关度(correlation,COR),并确定矩阵最适像素距离(d)。比较两类薯皮图像特征参数间的差异,选择差异较小的薯皮图像特征集进行统计分析和分类识别。构建支持向量机(support vector machines,SVM)和BP神经网络(backpropagation neural network,BPNN)模型对薯皮粗糙度分级分类,模型分级精度评价指标为准确率、精准率、召回率及调和平均数。【结果】加权平均值法进行灰度处理后的薯皮图像纹理结构清晰,图像清晰度评价值为2.5698±0.5959,显著高于平均值法(1.8035±0.4856)和最大值法(1.0535±0.4088);直方图均衡化增强后的薯皮图像灰度级范围由100—200扩大为0—200,灰度分布更加广泛;中值滤波对3×3窗口下的薯皮图像椒盐噪声去噪效果明显,峰值信噪比(peak signal-to-noise ratio,PSNR)最大((28.6250±3.9784)Bp),显著高于3×3和5×5窗口下对高斯噪声去噪后的PSNR。通过GLCM(d=4)提取的两类薯皮图像特征参数间差异显著,选择其中差异较小的无芽眼薯皮图像特征集进行统计分析和分类识别,结果表明该特征集变异系数差异明显,对比度变异系数最大(0.40),其次是角二阶矩(0.24)和相关度(0.23),熵变异系数最小(0.18)。将该特征集作为分类模型输入变量用于薯皮分类,相较于BP神经网络,SVM对马铃薯薯皮粗糙度的整体分类性能较高,准确率为87.5%。其中,对光滑皮和重麻皮的预测准确度和识别能力最高,精准率均为100%,召回率分别为85.7%和100%,调和平均数分别为92.3%和100%。【结论】综合利用本研究提出的图像处理技术及GLCM提取的纹理特征参数能有效表征马铃薯块茎薯皮粗糙度差异;通过构建SVM分类模型可实现基于机器视觉的马铃薯薯皮粗糙度分级,且准确率达87.5%。
马铃薯;薯皮粗糙度;图像特征;机器视觉;支持向量机
【研究意义】马铃薯是世界第四大粮食作物。薯皮粗糙度是马铃薯块茎重要外观品质性状,是品种特异性测试及商业分类分级的重要标准和依据[1]。【前人研究进展】薯皮粗糙度由遗传因子和环境因子相互作用决定,是细胞生长、分裂、分化和代谢相互作用的最终体现[2]。目前马铃薯分级筛选主要侧重块茎形状、大小及缺陷的简单人工分级和机械分级,人工分级依赖视觉感官定性分类,通量和精准度低;机械分级虽可避免人工差异,但会造成不同程度的二次损伤,降低马铃薯商品性[3-4]。新兴的基于图像处理的机器视觉技术可通过对图像颜色、纹理、形状等特征信息的挖掘,快速实现待测物精准高效无损鉴别[4-5]。图像处理中,纹理粗糙度是图像不依赖颜色和亮度变化的视觉特征,表现出局部不规则、宏观有规律的特性,可以反映图像像素间的空间分布关系[6]。利用灰度共生矩阵(gray level co-occurrence matrix,GLCM)提取的纹理特征参数角二阶矩(angular second moment,ASM)、熵(entropy,ENT)、对比度(contrast,CON)和相关度(correlation,COR)等,通过与机器学习算法结合,建立BP神经网络、支持向量机(support vector machines,SVM)等分类模型可快速实现农产品无损伤检测[7-15],已被广泛应用于玉米籽粒识别分类、病虫害识别、种子质量检测及水果自动分拣系统构建等领域[12,16-19]。【本研究切入点】目前,基于图像处理的机器视觉技术可在马铃薯生产加工过程中实现精准高效的质量控制和定量鉴别。但研究方向主要集中在马铃薯块茎形状大小、表皮缺陷及病害鉴别等方面[3-5,16,20-21],薯皮粗糙度分级应用中尚无涉及。【拟解决的关键问题】拟通过基于图像处理的机器视觉技术对马铃薯薯皮粗糙度分级展开研究,找出合适的薯皮图像处理方法及特征参数,构建高识别率分类模型用于薯皮粗糙度分类,为马铃薯薯皮粗糙度分级识别提供高效精准且系统的客观评价方法,加快马铃薯自动化生产和商品化处理效率。
以79份马铃薯品种(系)为供试材料(表1),2021年种植于甘肃省渭源县五竹镇鹿鸣村(海拔2 260 m,年平均降雨量520—560 mm,年平均气温5.8 ℃,年平均日照时数约2 412 h,无霜期145 d,黑垆土)。
使用专业可调LED光源拍摄箱(60 cm×60 cm×60 cm)拍照,SMART SENSOR光照度计(测量范围1—200 000 lx,分辨率1 lx)测定光照强度为(9 000± 50)lx。选择相机型号Canon EOS 760 D,镜头EF-S 18-135 mm f/3.5—5.6 IS STM。相机参数设定:快门速度1/100 s,光圈值(F)6.3,焦距50 mm,感光度(ISO)100,相机固定于拍摄物体上方,物距60 cm,图像像素6 000×4 000。各块茎图像选取6个像素大小为1 000×1 000的区域作为参试样本图像。
参照马铃薯品种特异性、一致性和稳定性测试指南(GB/T 19557.28—2018),将采集的马铃薯人工分级[1],用作分类模型结果对照。
用MATLAB R2016a对薯皮图像预处理(灰度化、增强和降噪);将处理后的图像划分为有、无芽眼两类,芽眼图像按1 000×1 000像素区域分块,再根据有无芽眼对每个区域进行分类。利用GLCM提取两类薯皮图像纹理粗糙度特征并比较差异,选择对分类识别影响较小的图像作为SVM和BP神经网络分类模型输入变量用于薯皮粗糙度分类识别,采用混淆矩阵指标(准确率、精准率、召回率和F1值)评价分类精度(图1)。
图1 技术路线
1.3.1 薯皮图像预处理 采用最大值法、平均值法和加权平均值法进行图像灰度处理[22],从中随机选取8份材料通过能量梯度函数比较三者处理效果[23-24];采用直方图均衡化法进行图像灰度增强[25];采用中值滤波在3×3和5×5窗口下对添加高斯噪声和椒盐噪声的薯皮图像降噪,计算峰值信噪比(peak signal-to- noise ratio,PSNR)评价预处理后的图像质量,PSNR 值越高,越接近原图[26-28]。
1.3.2 薯皮图像分类处理 根据有无芽眼特征对预处理薯皮图像进行区分,对含芽眼的薯皮图像按1 000×1 000像素大小分块,再将各区域按有无芽眼进行分类。
1.3.3 薯皮图像纹理特征参数提取及差异比较 将待处理图像灰度保持256级,选取图像0°、45°、90°和135°方向均值作为GLCM方向参数(q)[14,29-30];利用GLCM计算选取的8份参试材料特征参数在不同像素距离处的取值以确定矩阵最适像素距离(d),然后通过GLCM提取有、无芽眼的薯皮图像特征参数角二阶距、对比度、相关度和熵进行差异比较。公式详见(1)—(4)[22,30-33]。
角二阶距:GLCM元素值平方和,反映图像灰度分布均匀程度和纹理粗细程度。
对比度:反映图像清晰度和纹理沟纹深浅程度。
相关度:度量GLCM元素在行或列方向上的相似程度,反映图像局部灰度相关性。
熵:图像所含信息量的度量,反映图像纹理非均匀程度或复杂程度。
1.3.4 薯皮粗糙度分类识别 采用SVM和BP神经网络对薯皮粗糙度分类评价,在特征参数中随机选取55份数据用作训练,剩余24份数据用作测试验证。在SVM中,设定输入参数和输出参数为4,径向基函数作为核函数,惩罚系数ζ和非负松弛项g分别设定为25和35;设定BP神经网络输入层、输出层和隐含层节点数分别为4、1、6,最大迭代数为1 000。相关公式见文献[34]。
1.3.5 数据处理及分类模型精度评价 用Microsoft Excel 2010和SPSS 22.0进行薯皮图像粗糙度特征数据的统计描述和方差分析;用准确率(accuracy,Acc)、精准率(precision,Pre)、召回率(recall,Re)和调和平均数(F1)评价模型分类结果。公式详见(5)—(8)[35]:
Acc=(TP+TN)/(TP+TN+FP+FN) (5)
Pre=TP/(TP+FP) (6)
Re=TP/(TP+FN) (7)
F1=2Pre×Re/(Pre+Re) (8)
式中,TN、FN、TP和FP分别为真反例、假反例、真正例和假正例。
参照马铃薯品种特异性、一致性和稳定性测试指南(GB/T 19557.28—2018),将79份马铃薯品种(系)人工分为重麻皮(6份)、麻皮(26份)、略麻皮(27份)和光滑皮(20份),列出分级结果的部分马铃薯薯皮图像(表2)。
由表3可知,加权平均值法处理后的图像纹理结构最清晰,效果最好。平均值法、最大值法和加权平均值法处理的图像灰度清晰度差异显著,加权平均值法与平均值法和最大值法的均值差最大,分别为0.7663和1.1516(表4)。
薯皮图像均衡化增强后,灰度级范围由100—200(表5,C-1、C-2、C-3和C-4)扩大为0—200,灰度分布更为均匀广泛(表5,D-1、D-2、D-3和D-4)。相较于表5原始图像A-1、A-2、A-3和A-4,增强后的薯皮图像B-1、B-2、B-3和B-4纹理更加清晰突出。
利用中值滤波对图像去噪,发现中值滤波对含椒盐噪声的图像去噪效果显著,在3×3窗口下中值滤波滤除椒盐噪声的PSNR均值差最大,且在3×3窗口下中值滤波对椒盐噪声滤除效果最好,最接近原始图像(表6和表7)。
像素距离d=4时,GLCM提取的8个参试材料薯皮图像特征参数变化基本趋于一致,表现出稳定性(图2)。
2.4.1 薯皮图像特征参数差异比较 利用GLCM提取有、无芽眼的薯皮图像特征参数进行差异比较。相较于无芽眼的薯皮图像,芽眼薯皮图像特征参数除角二阶矩外,对比度、熵和相关度均存在极显著差异(图3)。
2.4.2 特征参数变异系数 为避免芽眼对薯皮纹理特征的识别影响,选择差异较小的无芽眼薯皮图像进行分类识别。经统计分析,薯皮图像纹理特征参数变异系数差异明显,对比度变异系数最大(0.40),其次是角二阶矩(0.24)和相关度(0.23),熵变异系数最小(0.18)(表8)。
表2 薯皮图像
A:重麻皮;B:麻皮;C:略麻皮;D:光滑皮
A: Heavy hemp skin; B: Hemp skin; C: Slightly hemp skin; D: Smooth skin
表3 灰度方法处理的马铃薯薯皮图像效果比较
A:原始图像;B:平均值法;C:最大值法;D:加权平均值法
A: Original images B: Average method; C: Maximum method; D: Weighted-average method
表4 灰度图像清晰度差异比较
A:平均值法;B:最大值法;C:加权平均值法。不同小写字母表示多重比较差异显著(<0.05)
A: Average method; B: Maximum method; C: Weighted-average method. Different lowercase letters indicate significant differences in multiple comparisons (<0.05)
A:原始图像;B:直方图均衡化处理后图像;C:处理前图像灰度直方图;D:处理后图像灰度直方图
A: Original images; B: Images after histogram equalization; C: Gray scale histogram of images before processing; D: Gray scale histogram of images after processing
分类模型中,相较于BP神经网络,SVM在薯皮分类中准确率较高(87.5%),表明该模型对薯皮类别整体分类性能较好,且对光滑皮和重麻皮类别的预测准确度和识别能力最高,精准率均为100%,召回率分别为85.7%和100%,F1值分别为92.3%和100%(表9)。
薯皮图像采集过程中,受环境条件、摄像设备等因素影响,图像质量可能存在差异。像素距离大小主要取决于拍摄图像尺寸、感光度(ISO)、镜头光圈等参数的设置[36-37]。像素距离太小,放大尺寸的图像会出现模糊现象;低光环境下拍摄,为提高相机镜头感光性能,应选较大像素距离。
表6 图像降噪处理比较
A:重麻皮;B:麻皮;C:略麻皮;D:光滑皮 A: Heavy hemp skin; B: Hemp skin; C: Slightly hemp skin; D: Smooth skin
A:G16;B:大西洋;C:布尔班克;D:G67;E:夏波蒂;F:G121;G:陇薯10号;H:G33 A: G16; B: Atlantic; C: Burbank; D: G67; E: Shepody; F: G121; G: Longshu no.10; H: G33
表7 去噪图像峰值信噪比(PSNR)差异比较
A:3×3椒盐噪声;B:5×5椒盐噪声;C:3×3高斯噪声;D:5×5高斯噪声。不同小写字母表示多重比较差异显著(<0.05)
A: The 3×3 salt and pepper noise; B: The 5×5 salt and pepper noise; C: The 3×3 gaussian noise; D: The 5×5 gaussian noise. Different lowercase letters indicate significant differences in multiple comparisons (<0.05)
表8 灰度共生矩阵提取薯皮特征参数表现及变异系数
表9 分类精度结果
合理的图像处理是图像特征准确识别的前提。图像灰度化是图像处理的基本方法,选择合适灰度化方法可提高图像灰度效果控制[38]。本研究采用的加权平均值法考虑了R(Red)、G(Green)、B(Blue)三通道权值分配,处理后的图像相较于平均值法和最大值法,纹理清晰度最高,更符合人眼视觉感受。由于图像灰度分布在较窄区间,亮度过于集中,使薯皮纹理模糊。采用直方图均衡化在0—255灰度级范围内调整图像灰度直方图分布,拓展像素集中区域,归并低频像素,可使图像灰度分布均匀且动态范围扩大,图像明暗对比明显。但对低频灰度级过度简并,可能会造成图像边缘细节信息丢失。图像灰度集中区域存在直方图高峰,均衡化后灰度级过度拉伸会导致图像对比度过度增强和出现伪影[39-40]。去噪可规避图像处理中噪声干扰造成的图像信息丢失并保护图像边缘细节[26]。在实际应用中,忽略噪声类型盲目采用滤波算法去噪难以达到预期效果。本研究采用的中值滤波是一种非线性信号处理方法,对椒盐噪声、脉冲噪声有明显的抑制作用。为验证中值滤波的去噪效果,利用PSNR客观衡量去噪后的图像质量,为选择合适的去噪方法提供科学依据,以实现图像有效去噪[41-42]。
A:角二阶距;B:对比度;C:熵;D:相关度。ns:不显著;**:差异极显著(P<0.01)
薯皮图像纹理特征识别中,纹理是不依赖于颜色、亮度变化而反映图像同质现象的视觉特征[12]。利用共生矩阵提取纹理特征用于图像相似性度量检索时,在0°、45°、90°和135°四个方向上求取特征均值且归一化,可使图像发生旋转和缩放时对共生矩阵提取的纹理特征影响非常小,且对视觉变化、仿射变化及噪声干扰起到稳定作用[34,43]。薯皮凸起、凹陷、裂变等缺陷会对薯皮纹理分布和连续性产生扰动,使纹理分布不均匀。薯皮缺陷常与周围区域形成明显对比,纹理特征存在差异,在纹理识别中,可能会对SVM和BP神经网络模型分类性能产生影响,增大识别难度。模型应用中应针对薯皮缺陷调整训练策略,选择适当的SVM核函数和惩罚系数,或者在BP神经网络中利用交叉验证方法选择最佳隐藏层节点数和层数,以此提高模型学习能力,以便更好地识别图像纹理特征[44]。
利用分类模型进行薯皮分类,有限的样本量会使模型过拟合,导致分类结果不稳定、泛化性能低,无法在实际场景中应用。选择合适的分类模型是有效降低样本量过小导致模型过拟合和泛化性能低的重要方法[3,15,38]。本研究采用SVM和BP神经网络模型对不同薯皮类别的马铃薯分类,SVM模型对薯皮的整体分类性能显著高于BP神经网络,更适于解决小样本非线性可分问题。其可避免过度依赖样本数据,降低模型对训练集的过拟合,提高对新样本数据的分类准确度。另外,为避免样本量影响分类模型的可靠性和实用性,通过设定薯皮图像像素大小,从单一样本中获取多幅图像扩充样本数据集,可使分类模型鲁棒性和泛化性能达到平衡。
加权平均值法、直方图均衡化法和中值滤波法能够实现图像灰度化、增强及去噪效果;灰度共生矩阵提取的图像纹理特征参数角二阶矩、对比度、熵和相关度作为分类模型输入值用作马铃薯薯皮识别,可有效表征马铃薯薯皮粗糙度差异。小样本集中,支持向量机模型识别性能优于BP神经网络,分类准确率达87.5%,更适合薯皮粗糙度分类。
[1] 国家市场监督管理总局, 中国国家标准化管理委员会. 植物品种特异性、一致性和稳定性测试指南马铃薯: GB/T 19557.28—2018. 北京: 中国标准出版社, 2018.
State Administration for Market Regulation; Standardization Administration of the People's Republic of China. Guidelines for the conduct of tests for distinctness, uniformity and stability-Potato (L.): GB/T 19557.28-2018. Beijing: Standard Press of China, 2018. (in Chinese)
[2] 韩仲志, 赵友刚. 利用花生荚果图像特征识别品种与检验种子. 作物学报, 2012, 38(3): 535-540.
HAN Z Z, ZHAO Y G. Variety identification and seed test by peanut pod image characteristics. Acta Agronomica Sinica, 2012, 38(3): 535-540. (in Chinese)
[3] 王红军, 熊俊涛, 黎邹邹, 邓建猛, 邹湘军. 基于机器视觉图像特征参数的马铃薯质量和形状分级方法. 农业工程学报, 2016, 32(8): 272-277.
WANG H J, XIONG J T, LI Z Z, DENG J M, ZOU X J. Potato grading method of weight and shape based on imaging characteristics parameters in machine vision system. Transactions of the Chinese Society of Agricultural Engineering, 2016, 32(8): 272-277. (in Chinese)
[4] 姜宏, 于永波, 章翔峰, 陈宇彤. 马铃薯外部品质分级方法综述. 科学技术与工程, 2022, 22(14): 5519-5527.
JIANG H, YU Y B, ZHANG X F, CHEN Y T. Potato external quality grading methods: a review. Science Technology and Engineering, 2022, 22(14): 5519-5527. (in Chinese)
[5] 周竹, 黄懿, 李小昱, 文东东, 汪成龙, 陶海龙. 基于机器视觉的马铃薯自动分级方法. 农业工程学报, 2012, 28(7): 178-183.
ZHOU Z, HUANG Y, LI X Y, WEN D D, WANG C L, TAO H L. Automatic detecting and grading method of potatoes based on machine vision. Transactions of the Chinese Society of Agricultural Engineering, 2012, 28(7): 178-183. (in Chinese)
[6] 刘丽, 匡纲要. 图像纹理特征提取方法综述. 中国图象图形学报, 2009, 14(4): 622-635.
LIU L, KUANG G Y. Overview of image textural feature extraction methods. Journal of Image and Graphics, 2009, 14(4): 622-635. (in Chinese)
[7] 展慧, 李小昱, 王为, 汪成龙, 周竹, 黄懿. 基于机器视觉的板栗分级检测方法. 农业工程学报, 2010, 26(4): 327-331.
ZHAN H, LI X Y, WANG W, WANG C L, ZHOU Z, HUANG Y. Determination of chestnuts grading based on machine vision. Transactions of the Chinese Society of Agricultural Engineering, 2010, 26(4): 327-331. (in Chinese)
[8] 薄华, 马缚龙, 焦李成. 图像纹理的灰度共生矩阵计算问题的分析. 电子学报, 2006, 34(1): 155-158, 134.
BO H, MA F L, JIAO L C. Research on computation of GLCM of image texture. Acta Electronica Sinica, 2006, 34(1): 155-158, 134. (in Chinese)
[9] SINGH K R, CHAUDHURY S. Comparative analysis of texture feature extraction techniques for rice grain classification. IET Image Processing, 2020, 14(11): 2532-2540.
[10] LADDI A, SHARMA S, KUMAR A, KAPUR P. Classification of tea grains based upon image texture feature analysis under different illumination conditions. Journal of Food Engineering, 2013, 115(2): 226-231.
[11] SHAFI U, MUMTAZ R, HAQ I U, HAFEEZ M, IQBAL N, SHAUKAT A, ZAIDI S M H, MAHMOOD Z. Wheat yellow rust disease infection type classification using texture features. Sensors, 2021, 22(1): 146.
[12] 张超, 乔敏, 刘哲, 金虹杉, 宁明宇, 孙海艳. 基于无人机和卫星遥感影像的制种玉米田识别纹理特征尺度优选. 农业工程学报, 2017, 33(17): 98-104.
ZHANG C, QIAO M, LIU Z, JIN H S, NING M Y, SUN H Y. Texture scale analysis and identification of seed maize fields based on UAV and satellite remote sensing images. Transactions of the Chinese Society of Agricultural Engineering, 2017, 33(17): 98-104. (in Chinese)
[13] 谢元澄, 徐焕良, 谢庄. 基于牛肉大理石花纹标准(BMS)图像的纹理特征分析. 中国农业科学, 2010, 43(24): 5121-5128.doi: 10.3864/j.issn.0578-1752.2010.24.016.
XIE Y C, XU H L, XIE Z. Analysis of texture features based on beef marbling standards (BMS) images. Scientia Agricultura Sinica, 2010, 43(24): 5121-5128. doi: 10.3864/j.issn.0578-1752.2010.24.016. (in Chinese)
[14] 高程程, 惠晓威. 基于灰度共生矩阵的纹理特征提取. 计算机系统应用, 2010, 19(6): 195-198.
GAO C C, HUI X W. GLCM-based texture feature extraction. Computer Systems & Applications, 2010, 19(6): 195-198. (in Chinese)
[15] 刘涛, 仲晓春, 孙成明, 郭文善, 陈瑛瑛, 孙娟. 基于计算机视觉的水稻叶部病害识别研究. 中国农业科学, 2014, 47(4): 664-674.doi: 10.3864/j.issn.0578-1752.2014.04.006.
LIU T, ZHONG X C, SUN C M, GUO W S, CHEN Y Y, SUN J. Recognition of rice leaf diseases based on computer vision. Scientia Agricultura Sinica, 2014, 47(4): 664-674. doi: 10.3864/j.issn.0578- 1752.2014.04.006. (in Chinese)
[16] 党满意, 孟庆魁, 谷芳, 顾彪, 胡耀华. 基于机器视觉的马铃薯晚疫病快速识别. 农业工程学报, 2020, 36(2): 193-200.
DANG M Y, MENG Q K, GU F, GU B, HU Y H. Rapid recognition of potato late blight based on machine vision. Transactions of the Chinese Society of Agricultural Engineering, 2020, 36(2): 193-200. (in Chinese)
[17] GOMES J F S, LETA F R. Applications of computer vision techniques in the agriculture and food industry: A review. European Food Research and Technology, 2012, 235(6): 989-1000.
[18] GUZMÁN E, BAETEN V, PIERNA J A F, GARCÍA-MESA J A. Determination of the olive maturity index of intact fruits using image analysis. Journal of Food Science and Technology, 2015, 52(3): 1462-1470.
[19] WANG A C, ZHANG W, WEI X H. A review on weed detection using ground-based machine vision and image processing techniques. Computers and Electronics in Agriculture, 2019, 158(2019): 226-240.
[20] LI B, XU X M, ZHANG L, HAN J W, BIAN C S, LI G C, LIU J G, JIN L P. Above-ground biomass estimation and yield prediction in potato by using UAV-based RGB and hyperspectral imaging. ISPRS Journal of Photogrammetry and Remote Sensing, 2020, 162: 161-172.
[21] RAZMJOOY N, MOUSAVI B S, SOLEYMANI F. A real-time mathematical computer method for potato inspection using machine vision. Computers & Mathematics with Applications, 2012, 63(1): 268-279.
[22] 纪娜, 何国荣. 基于灰度识别的猕猴桃形状疤痕图像纹理特征提取方法. 自动化与仪器仪表, 2019(1): 159-162.
JI N, HE G R. Texture feature extraction method of kiwifruit shape scar image based on gray level recognition. Automation & Instrumentation, 2019(1): 159-162. (in Chinese)
[23] 李祚林, 李晓辉, 马灵玲, 胡玥, 唐伶俐. 面向无参考图像的清晰度评价方法研究. 遥感技术与应用, 2011, 26(2): 239-246.
LI Z L, LI X H, MA L L, HU Y, TANG L L. Research of definition assessment based on no-reference digital image quality. Remote Sensing Technology and Application, 2011, 26(2): 239-246. (in Chinese)
[24] 宋凤菲. 彩色图像灰度化及其效果的客观评价方法研究[D]. 泉州: 华侨大学, 2014.
SONG F F. Research on objective evaluation method of color image graying and its effect [D]. Quanzhou: Huaqiao University, 2014. (in Chinese)
[25] 杨卫中, 徐银丽, 乔曦, 饶伟, 李道亮, 李振波. 基于对比度受限直方图均衡化的水下海参图像增强方法. 农业工程学报, 2016, 32(6): 197-203.
YANG W Z, XU Y L, QIAO X, RAO W, LI D L, LI Z B. Method for image intensification of underwater sea cucumber based on contrast-limited adaptive histogram equalization. Transactions of the Chinese Society of Agricultural Engineering, 2016, 32(6): 197-203. (in Chinese)
[26] 孙宏琦, 施维颖, 巨永锋. 利用中值滤波进行图像处理. 长安大学学报(自然科学版), 2003, 23(2): 104-106.
SUN H Q, SHI W Y, JU Y F. Image processing with medium value filter. Journal of Chang’an University (Natural Science Edition), 2003, 23(2): 104-106. (in Chinese)
[27] 刘祝华. 图像去噪方法的研究[D]. 南昌: 江西师范大学, 2005.
LIU Z H. Research on image denoising method [D]. Nanchang: Jiangxi Normal University, 2005. (in Chinese)
[28] DASS A K. Improvising MSN and PSNR for finger-print image noised by GAUSSIAN and SALT & PEPPER. The International Journal of Multimedia & Its Applications, 2012, 4(4): 59-72.
[29] HARALICK R M, SHANMUGAM K, DINSTEIN I. Textural features for image classification. IEEE Transactions on Systems, Man, and Cybernetics, 1973, SMC-3(6): 610-621.
[30] 侯群群, 王飞, 严丽. 基于灰度共生矩阵的彩色遥感图像纹理特征提取. 自然资源遥感, 2013, 25(4): 26-32.
HOU Q Q, WANG F, YAN L. Extraction of color image texture feature based on gray-level co-occurrence matrix. Remote Sensing for Natural Resources, 2013, 25(4): 26-32. (in Chinese)
[31] 蔡苇荻, 张羽, 刘海燕, 郑恒彪, 程涛, 田永超, 朱艳, 曹卫星, 姚霞. 基于成像高光谱的小麦冠层白粉病早期监测方法. 中国农业科学, 2022, 55(6): 1110-1126.doi: 10.3864/j.issn.0578-1752.2022. 06.005.
CAI W D, ZHANG Y, LIU H Y, ZHENG H B, CHENG T, TIAN Y C, ZHU Y, CAO W X, YAO X. Early detection on wheat canopy powdery mildew with hyperspectral imaging. Scientia Agricultura Sinica, 2022, 55(6): 1110-1126. doi: 10.3864/j.issn.0578-1752.2022. 06.005. (in Chinese)
[32] 李智峰, 朱谷昌, 董泰锋. 基于灰度共生矩阵的图像纹理特征地物分类应用. 地质与勘探, 2011, 47(3): 456-461.
LI Z F, ZHU G C, DONG T F. Application of GLCM-based texture features to remote sensing image classification. Geology and Exploration, 2011, 47(3): 456-461. (in Chinese)
[33] 郑冠楠, 谭豫之, 张俊雄, 李伟. 基于计算机视觉的马铃薯自动检测分级. 农业机械学报, 2009, 40(4): 166-168, 156.
ZHENG G N, TAN Y Z, ZHANG J X, LI W. Automatic detecting and grading method of potatoes with computer vision. Transactions of the Chinese Society for Agricultural Machinery, 2009, 40(4): 166-168, 156. (in Chinese)
[34] 黄辰, 费继友. 基于图像特征融合的苹果在线分级方法. 农业工程学报, 2017, 33(1): 285-291.
HUANG C, FEI J Y. Online apple grading based on decision fusion of image features. Transactions of the Chinese Society of Agricultural Engineering, 2017, 33(1): 285-291. (in Chinese)
[35] 魏永康, 杨天聪, 臧少龙, 贺利, 段剑钊, 谢迎新, 王晨阳, 冯伟. 基于无人机多光谱影像特征融合的小麦倒伏监测. 中国农业科学, 2023, 56(9): 1670-1685.doi: 10.3864/j.issn.0578-1752.2023.09.005.
WEI Y K, YANG T C, ZANG S L, HE L, DUAN J Z, XIE Y X, WANG C Y, FENG W. Monitoring wheat lodging based on UAV multi-spectral image feature fusion. Scientia Agricultura Sinica, 2023, 56(9): 1670-1685. doi: 10.3864/j.issn.0578-1752.2023.09.005. (in Chinese)
[36] 高传新, 殷勇. 数码相机ISO感光度的调整对刑事案件中痕迹检验照相质量的影响. 影像技术, 2008, 21(3): 33-35.
GAO C X, YIN Y. Influence of digital camera ISO speed setting on the quality of criminological photography for traces detection. Image Technology, 2008, 21(3): 33-35. (in Chinese)
[37] PHAM L H, TRAN D N N, RHIE C H, JEON J W. Analysis of the smartphone camera exposure effect on laser extraction//2021 International Conference on Electronics, Information, and Communication (ICEIC), 2021.
[38] 唐俊, 邓立苗, 陈辉, 栾涛, 马文杰. 基于机器视觉的玉米叶片透射图像特征识别研究. 中国农业科学, 2014, 47(3): 431-440. doi: 10.3864/j.issn.0578-1752.2014.03.003.
TANG J, DENG L M, CHEN H, LUAN T, MA W J. Research on maize leaf recognition of characteristics from transmission image based on machine vision. Scientia Agricultura Sinica, 2014, 47(3): 431-440. doi: 10.3864/j.issn.0578-1752.2014.03.003. (in Chinese)
[39] 杨嘉能. 基于直方图均衡的图像增强算法优化研究[D]. 乌鲁木齐: 新疆大学, 2021.
YANG J N. Optimization of image enhancement algorithm based on histogram equalization [D]. Urumqi: Xinjiang University, 2021. (in Chinese)
[40] 陈永亮. 灰度图像的直方图均衡化处理研究[D]. 合肥: 安徽大学, 2014.
CHEN Y L. Research on histogram equalization processing of gray image [D]. Hefei: Anhui University, 2014. (in Chinese)
[41] 宁媛, 李皖. 图像去噪的几种方法分析比较. 贵州工业大学学报(自然科学版), 2005, 34(4): 63-66.
NING Y, LI W. Analysis and comparison of some techniques on image denoising. Journal of Guizhou University of Technology (Natural Science Edition), 2005, 34(4): 63-66. (in Chinese)
[42] 杨光义. 图像质量评价及其在图像去噪中的应用研究[D]. 武汉: 武汉大学, 2018.
YANG G Y. Image quality evaluation and its application in image denoising [D]. Wuhan: Wuhan University, 2018. (in Chinese)
[43] 苑丽红, 付丽, 杨勇, 苗静. 灰度共生矩阵提取纹理特征的实验结果分析. 计算机应用, 2009, 29(4): 1018-1021.
YUAN L H, FU L, YANG Y, MIAO J. Analysis of texture feature extracted by gray level co-occurrence matrix. Journal of Computer Applications, 2009, 29(4): 1018-1021. (in Chinese)
[44] 王璨, 李志伟. 利用融合高度与单目图像特征的支持向量机模型识别杂草. 农业工程学报, 2016, 32(15): 165-174.
WANG C, LI Z W. Weed recognition using SVM model with fusion height and monocular image features. Transactions of the Chinese Society of Agricultural Engineering, 2016, 32(15): 165-174. (in Chinese)
Potato Tuber Skin Roughness Classification Analysis Based on Image Characteristics Recognition
TANG ZhenSan1, YUAN JianLong1, KANG LiangHe2, CHENG LiXiang1, LÜ Tai3, YANG Chen3, ZHANG Feng1
1College of Agriculture, Gansu Agricultural University/State Key Laboratory of Aridland Crop Science/Gansu Key Laboratory of Crop Improvement & Germplasm Enhancement, Lanzhou 730070;2College of Information Science and Technology, Gansu Agricultural University, Lanzhou 730070;3Tianshui Institute of Agricultural Sciences, Tianshui 741000, Gansu
【Objective】The classification analysis of potato tuber skin roughness could provide the non-destructive testing methods for tuber appearance quality traits, which would establish the theoretical and practical base for the objective evaluation of tuber quality and high-throughput screening varieties.【Method】Seventy-nine potato varieties (lines) were selected as materials, and the images of tuber skin with and without bud-eyes were taken by camera. The tuber skin images were preprocessed using MATLAB R2016a software. Eight materials were randomly selected to compare the effect of image graying, enhancement and denoising using the correlation function indicators. The image characteristic parameters, angular second moment (ASM), entropy (ENT), contrast (CON) and correlation (COR) were extracted using the gray level co-occurrence matrix (GLCM), and the suitable distance (d) of GLCM were determined. The differences in two types of tuber skin image feature parameters were compared, and the set of tuber skin image features with less difference was selected for statistical analysis and classification recognition. The support vector machine (SVM) and backpropagation neural network (BPNN) models were constructed for tuber skin roughness classification, and the evaluation indexes of model grading accuracy were accuracy, precision, recall and harmonic mean, respectively. 【Result】The texture structure of tuber skin image after grayscale processing using the weighted average method was clear, and the evaluation value of image clarity was 2.5698±0.5959, which was significantly higher than that of the mean method (1.8035±0.4856) and the maximum method (1.0535±0.4088). The gray scale range of tuber skin image after histogram equalization enhancement was expanded from 100-200 to 0-200, which made the gray distribution wider. The salt noise denoising effect of tuber skin images using the median filter under 3×3 sliding windows was obvious, and the peak signal-to-noise ratio (PSNR) was maximum (28.6250±3.9784 Bp), which was significantly higher than that under 3×3 and 5×5 windows. Two types of tuber skin image feature parameters extracted by GLCM (d=4) were significantly different, and the set of tuber skin image features (without bud-eyes) with less difference was selected for statistical analysis and classification recognition. The results indicated that the variation coefficient of these parameters was varied significantly. The variation coefficient of contrast was the largest (0.40), followed by the angular second moment (0.24) and correlation (0.23), and the variation coefficient of entropy was the smallest (0.18). Using the feature set as the input variable of tuber skin classification model, the overall classification performance of SVM was higher than BP neural network, and the accuracy reached 87.5%. Especially, the prediction accuracy and recognizability of SVM for smooth and heavy hemp skins was the highest. The accuracy reached 100%, the recall reached 85.7% and 100%, and the harmonic mean reached 100% and 92.3%, respectively. 【Conclusion】The combination of the image processing techniques presented in this study and the GLCM extracted texture feature parameters could effectively characterize potato tuber skin roughness variations. The tuber skin roughness grading based on machine vision could be achieved by constructing SVM classification model, and the accuracy reached 87.5%.
; tuber skin roughness; image characteristic; machine vision; support vector machine
10.3864/j.issn.0578-1752.2023.22.006
2023-03-17;
2023-07-24
国家重点研发计划(SQ2022YFD1600328)、甘肃省科技重大专项(21ZD11NA002,21ZD11NA009)
唐振三,E-mail:1316740746@qq.com。通信作者张峰,E-mail:zhangf@gsau.edu.cn
(责任编辑 赵伶俐)