中国农业科学 ›› 2019, Vol. 52 ›› Issue (2): 327-338.doi: 10.3864/j.issn.0578-1752.2019.02.011
张明1,2,李鹏2,邓烈2,何绍兰2,易时来2,郑永强2,谢让金2,马岩岩2,吕强2()
收稿日期:
2018-08-06
接受日期:
2018-11-06
出版日期:
2019-01-16
发布日期:
2019-01-21
通讯作者:
吕强
E-mail:qlu@swu.edu.cn
作者简介:
张明,E-mail: 基金资助:
ZHANG Ming1,2,LI Peng2,DENG Lie2,HE ShaoLan2,YI ShiLai2,ZHENG YongQiang2,XIE RangJin2,MA YanYan2,LÜ Qiang2()
Received:
2018-08-06
Accepted:
2018-11-06
Online:
2019-01-16
Published:
2019-01-21
Contact:
Qiang Lü
E-mail:qlu@swu.edu.cn
摘要: 【目的】 本研究旨在有效解决果皮有缺陷的水果图像在去除背景时部分缺陷被误分割为背景,以及水果表面缺陷难以有效分割提取的问题。【方法】 以I分量图来构建掩模模板,根据其灰度直方图信息,通过双峰法选择单一阈值(T=75)分以纽荷尔脐橙为研究对象,提出基于HSI颜色空间模型法去除背景割背景并填充孔洞得到掩模模板Imask,然后掩模模板Imask与I分量图通过点乘运算得到去除背景的I分量图;提出基于多尺度高斯函数图像亮度校正算法对去除背景后的I分量图像进行亮度校正,通过构建多尺度高斯函数滤波器,将去除背景后的I分量图与构建的多尺度高斯函数进行卷积运算即得到去除背景后的I分量图像表面光照分量图,最后将去除背景后的I分量图与得到的光照分量图进行点除运算即得到去除背景后的I分量图像亮度校正图;然后采用单一全局阈值法对脐橙表面缺陷进行提取。【结果】 基于HSI颜色空间模型法去除背景,可在有效去除背景的同时完好保留脐橙的表面信息,有利于后续操作;基于多尺度高斯函数的图像亮度校正算法分别对6种常见脐橙缺陷进行图像亮度校正后采用单阈值法提取缺陷,使不同灰度等级的脐橙表面缺陷一次性分割成功,其中分割率最高为100%,最低为88.5%,整体达92.7%。通过试验分析后发现造成部分误分割或漏分割的原因主要在于部分缺陷果缺陷处颜色较轻,与正常区域灰度差较小,从而造成漏分割;还有部分缺陷果由于缺陷面积小,在图像形态学处理过程被误认为是噪声而被去除;同时发现正常果的误判率也达到了10.8%,经分析发现误判的正常果表皮组织区域的褶皱位于图像的边缘区域,从而被误认为是边缘区域的缺陷,导致误判。【结论】 基于HSI颜色空间模型法去除背景及基于多尺度高斯函数的图像亮度不均校正算法对纽荷尔脐橙图像背景分割和去除背景后的I分量图像表面亮度校正均取得了较好的效果,能有效识别脐橙缺陷区域,为脐橙精确分级提供了技术支持,也为其他果品表面缺陷快速检测提供了一种新思路。
张明,李鹏,邓烈,何绍兰,易时来,郑永强,谢让金,马岩岩,吕强. 基于掩模及亮度校正算法的脐橙表面缺陷分割[J]. 中国农业科学, 2019, 52(2): 327-338.
ZHANG Ming,LI Peng,DENG Lie,HE ShaoLan,YI ShiLai,ZHENG YongQiang,XIE RangJin,MA YanYan,LÜ Qiang. Segmentation of Navel Orange Surface Defects Based on Mask and Brightness Correction Algorithm[J]. Scientia Agricultura Sinica, 2019, 52(2): 327-338.
表2
基于多尺度高斯函数图像亮度校正算法的单阈值缺陷分割结果"
表皮类型 Epidermis type | 样本数 Number of samples | 分割结果 Segmentation result | 识别率 Recognition rate (%) |
---|---|---|---|
正常果 Normal fruit | 65 | 58 | 89.2 |
溃疡果 Canker fruit | 49 | 45 | 91.8 |
蓟马果 Thrips fruit | 48 | 43 | 89.6 |
油斑病果 Oil spotting fruit | 35 | 31 | 88.6 |
黑斑病果 Blackspot fruit | 76 | 74 | 97.4 |
风伤果 Wind damage fruit | 61 | 54 | 88.5 |
炭疽病果 Anthracnose fruit | 66 | 66 | 100.0 |
合计 Total | 400 | 371 | 92.7 |
[1] | VIJAYAREKHA K . Segmentation techniques applied to citrus fruit images for external defect identification. Research Journal of Applied Sciences Engineering & Technology, 2012,4(24):5313-5319. |
[2] |
ZHANG B H, HUANG W Q, LIANG G, LI J B, ZHAO C J, LIU C L, HUANG D F . Computer vision detection of defective apples using automatic lightness correction and weighted RVM classifier. Journal of Food Engineering, 2015,146:143-151.
doi: 10.1016/j.jfoodeng.2014.08.024 |
[3] |
IQBAL S M, GOPAL A, SANKARANARAYANAN P E, NAIR A B . Classification of selected citrus fruits based on color using machine vision system. International Journal of Food Properties, 2016,19(2):272-288.
doi: 10.1080/10942912.2015.1020439 |
[4] | 容典 . 脐橙表面缺陷的机器视觉快速检测研究及嵌入式系统应用[D]. 杭州: 浙江大学, 2017. |
RONG D . Study on rapid detection of navel orange surface defect based on machine vision and embedded system application[D]. Hangzhou: Zhejiang University, 2017. ( in Chinese) | |
[5] | 白雪冰, 宋恩来, 李润佳, 许景涛 . 柑橘表面缺陷图像快速准确分割方法. 沈阳农业大学学报, 2018,49(2):242-249. |
BAI X B, SONG E L, LI R J, XU J T . Fast and accurate segmentation method for surface defects of citrus. Journal of Shenyang Agricultural University, 2018,49(2):242-249. (in Chinese) | |
[6] | 周水琴, 应义斌 . 颜色模型在农产品颜色检测与分级中的应用. 浙江大学学报, 2003,29(6):684-688. |
ZHOU S Q, YING Y B . Color models and their applications in color inspection and farm produce grading. Journal of Zhejiang University, 2003,29(6):684-688. (in Chinese) | |
[7] |
THROOP J A, ANESHANSLEY D J, UPCHURCH B L, ANGER B . Apple orientation on two conveyors: Performance and predictability based on fruit shape characteristics. Transactions of the ASAE, 2001,44(1):99-109.
doi: 10.13031/2013.2294 |
[8] | LI J, RAO X, WANG F, WU W, YING Y . Automatic detection of common surface defects on oranges using combined lighting transform and image ratio methods. Postharvest Biology & Technology, 2013,82(4):59-69. |
[9] | 李江波, 饶秀勤, 应义斌 . 水果表面亮度不均校正及单阈值缺陷提取研究. 农业机械学报, 2011,42(8):159-163. |
LI J B, RAO X Q, YING Y B . Correction algorithm of illumination nonuniformity on fruit surface and defects extraction using single threshold value. Transactions of the Chinese Society of Agricultural Machinery, 2011,42(8):159-163. (in Chinese) | |
[10] |
TAO Y, WEN Z . An adaptive spherical image transform for high-speed fruit defect detection. Transactions of the ASAE, 1999,42(1):241-246.
doi: 10.13031/2013.13201 |
[11] | 冯斌, 汪懋华 . 计算机视觉技术识别水果缺陷的一种新方法. 中国农业大学学报, 2002,7(4):73-76. |
FENG B, WANG M H . Study on identifying measurement about default of fruit in computer vision. Journal of China Agricultural University, 2002,7(4):73-76. (in Chinese) | |
[12] | 付峰, 应义斌 . 球体图像灰度变换模型及其在柑桔图像校正中的应用. 农业工程学报, 2004,20(4):117-120. |
FU F, YING Y B . Gray level transform model of ball image and its application in citrus image correction. Transactions of the Chinese Society of Agricultural Engineering, 2004,20(4):117-120. (in Chinese) | |
[13] | LÓPEZ-GARCÍA F, ANDREU-GARCÍA G, BLASCO J, ALEIXOS N, VALIENTE J M . Automatic detection of skin defects in citrus fruits using a multivariate image analysis approach. Computers & Electronics in Agriculture, 2010,71(2):189-197. |
[14] |
BLASCO J, ALEIXOS N , GÓMEZ J, MOLTÓ. Citrus sorting by identification of the most common defects using multispectral computer vision. Journal of Food Engineering, 2007,83(3):384-393.
doi: 10.1016/j.jfoodeng.2007.03.027 |
[15] | 章海亮, 高俊峰, 何勇 . 基于高光谱成像技术的柑橘缺陷无损检测. 农业机械学报, 2013,44(9):177-181. |
ZHANG H L, GAO J F, HE Y . Nondestructive detection of citrus defection using hyper-spectra imaging technology. Transactions of the Chinese Society of Agricultural Machinery, 2013,44(9):177-181. (in Chinese) | |
[16] |
张保华, 李江波, 樊书祥, 黄文倩, 张驰, 王庆艳, 肖广东 . 高光谱成像技术在果蔬品质与安全无损检测中的原理及应用. 光谱学与光谱分析, 2014,34(10):2743-2751.
doi: 10.3964/j.issn.1000-0593(2014)10-2743-09 |
ZHANG B H, LI J B, FAN S X, HUANG W Q, ZHANG C, WANG Q Y, XIAO G D . Principles and application of hyperspectral imaging technique in quality and safety inspection of fruits and vegetables. Spectroscopy and Spectral Analysis, 2014,34(10):2743-2751. (in Chinese)
doi: 10.3964/j.issn.1000-0593(2014)10-2743-09 |
|
[17] | 李江波 . 脐橙表面缺陷的快速检测方法研究[D]. 杭州: 浙江大学, 2012. |
LI J B . Study on rapid detection methods of defects on navel orange surface[D]. Hangzhou: Zhejiang University, 2012. ( in Chinese) | |
[18] | 李江波, 饶秀勤, 应义斌, 马本学, 郭俊先 . 基于掩模及边缘灰度补偿算法的脐橙背景及表面缺陷分割. 农业工程学报, 2009,25(12):133-137. |
LI J B, RAO X Q, YING Y B, MA B X, GUO J X . Background and external defects segmentation of navel orange based on mask and edge gray value compensation algorithm. Transactions of the Chinese Society of Agricultural Engineering, 2009,25(12):133-137. (in Chinese) | |
[19] | 李江波, 饶秀勤, 应义斌 . 基于照度-反射模型的脐橙表面缺陷检测. 农业工程学报, 2011,27(7):338-342. |
LI J B, RAO X Q, YING Y B . Detection of navel surface defects based on illumination-reflectance model. Transactions of the Chinese Society of Agricultural Engineering, 2011,27(7):338-342. (in Chinese) | |
[20] |
LAND E H, MCCANN J J . Lightness and Retinex theory. Journal of the Optical Society of America, 1971,61(1):1-11.
doi: 10.1364/JOSA.61.000001 |
[21] |
WANG S H, ZHENG J, HU H M, LI B . Naturalness preserved enhancement algorithm for non-uniform illumination images. IEEE Transactions on Image Processing A Publication of the IEEE Signal Processing Society, 2013,22(9):3538-3548.
doi: 10.1109/TIP.2013.2261309 |
[22] | 刘志成, 王殿伟, 刘颖, 刘学杰 . 基于二维伽马函数的光照不均匀图像自适应校正算法. 北京理工大学学报, 2016,36(2):191-196. |
LIU Z C, WANG D W, LIU Y, LIU X J . Adaptive adjustment algorithm for non-uniform illumination images based on 2D gamma function. Transaction of Beijing Institute of Technology, 2016,36(2):191-196. (in Chinese) | |
[23] | 王殿伟, 王晶, 许志杰, 刘颖 . 一种光照不均匀图像的自适应校正算法. 系统工程与电子技术, 2017,39(6):1383-1390. |
WANG D W, WANG J, XU Z J, LIU Y . Adaptive correction algorithm for non-uniform illumination images. Journal of Systems Engineering and Electronics, 2017,39(6):1383-1390. (in Chinese) | |
[24] | 饶秀勤 . 基于机器视觉的水果品质实时检测与分级生产线的关键技术研究[D]. 杭州: 浙江大学, 2007. |
RAO X Q . Real-time inspection technology of fruit quality using machine vision[D]. Hangzhou: Zhejiang University, 2007. ( in Chinese) | |
[25] | 白菲 . 基于机器视觉的柑橘水果外形识别方法研究[D]. 北京: 中国农业大学, 2005. |
BAI F . Research on the shape identification of orange based on computer vision technology[D]. Beijing: China Agricultural University, 2005. ( in Chinese) | |
[26] | 应义斌 . 水果图像的背景分割和边缘检测技术研究. 浙江大学学报, 2000,26(1):35-38. |
YING Y B . Study on background segment and edge detection of fruit image using machine vision. Journal of Zhejiang University, 2000,26(1):35-38. (in Chinese) | |
[27] | XIAO J S, PENG H, ZHANG Y Q, TU C P, LI Q Q . Fast image enhancement based on color space fusion. Color Research & Application, 2016,41(1):22-31. |
[28] | 姜柏军, 钟明霞 . 改进的直方图均衡化算法在图像增强中的应用. 激光与红外, 2014,44(6):702-706. |
JIANG B J, ZHONG M X . Improved histogram equalization algorithm in the image enhancement. Laser and Infrared, 2014,44(6):702-706. (in Chinese) | |
[29] |
LAND E H . An alternative technique for the computation of the designator in the Retinex theory of color vision. Proceedings of the National Academy of Sciences of the United States of America, 1986,83(10):3078-3080.
doi: 10.1073/pnas.83.10.3078 |
[30] | 李福文, 金伟其, 陈伟力, 曹扬, 王霞, 王岭雪 . 基于Retinex模型的彩色图像全局增强算法. 北京理工大学学报, 2010,30(8):947-951. |
LI F W, JIN W Q, CHEN W L, CAO Y, WANG X, WANG L X . Global color image enhancement algorithm based on Retinex model. Transaction of Beijing Institute of Technology, 2010,30(8):947-951. (in Chinese) | |
[31] |
LI J . Application of image enhancement method for digital images based on Retinex theory. Optik-International Journal for Light and Electron Optics, 2013,124(23):5986-5988.
doi: 10.1016/j.ijleo.2013.04.115 |
[32] | 赵源萌, 王岭雪, 金伟其, 骆媛 , Saritporn Vittayapadung. 基于区域直方图统计的灰度图像色彩传递方法. 北京理工大学学报, 2012,32(3):322-326. |
ZHAO Y M, WANG L X, JIN W Q, LUO Y, SARITPORN V . A color transfer method for colorization of grayscale image based on region histogram statistics. Transaction of Beijing Institute of Technology, 2012,32(3):322-326. (in Chinese) | |
[33] | 解维域, 丁辰, 宋烨 . GB/T 12947-2008, 鲜柑橘[S]. 北京: 中华人民共和国国家标准化管理委员会, 2008. |
XIE W Y, DING C, SONG Y . GB/T 12947-2008, Fresh citrus[S]. Beijing: Standardization Administration of the People’s Republic of China, 2008. ( in Chinese) | |
[34] | 庞江伟 . 基于计算机视觉的脐橙表面常见缺陷种类识别的研究[D]. 浙江: 浙江大学, 2006. |
PANG J W . Study on external defects classification of navel orange based on machine vision[D]. Hangzhou: Zhejiang University, 2006. ( in Chinese) | |
[35] | 赵杰文, 刘剑华, 陈全胜 , Saritporn Vittayapadung. 利用高光谱图像技术检测水果轻微损伤. 农业机械学报, 2008,39(1):106-109. |
ZHAO J W, LIU J H, CHEN Q S, SARITPORN V . Detecting subtle bruises on fruits with hyperspectral imaging. Transactions of the Chinese Society of Agricultural Machinery, 2008,39(1):106-109. (in Chinese) |
[1] | 李文涛,杨江波,张绩,王克健,邓烈,吕强,何绍兰,谢让金,郑永强,马岩岩,易时来. 基于不同传感器的纽荷尔脐橙叶片叶绿素含量检测技术评价[J]. 中国农业科学, 2018, 51(6): 1057-1066. |
[2] | 刘庆飞,张宏立,王艳玲. 基于深度可分离卷积的实时农业图像逐像素分类研究[J]. 中国农业科学, 2018, 51(19): 3673-3682. |
[3] | 郑永强,王娅,杨琼,贾学梅,何绍兰,邓烈,谢让金,易时来,吕强,马岩岩. 重庆三峡库区鲍威尔脐橙花期叶片矿质营养诊断[J]. 中国农业科学, 2018, 51(12): 2378-2390. |
[4] | 廖秋红,何绍兰,谢让金,钱春,胡德玉,吕强,易时来,郑永强,邓烈. 基于近红外光谱的纽荷尔脐橙产地识别研究[J]. 中国农业科学, 2015, 48(20): 4111-4119. |
[5] | 樊卫国,葛会敏. 同形态及配比的氮肥对枳砧脐橙幼树生长及氮素吸收利用的影响[J]. 中国农业科学, 2015, 48(13): 2666-2675. |
[6] | 何义仲1, 陈兆星1, 2, 刘润生1, 方贻文2, 古祖亮3, 严翔2, 陈红3, 张洪铭2, 唐焕庆3, 程运江1. 不同贮藏方式对赣南纽荷尔脐橙果实品质的影响[J]. 中国农业科学, 2014, 47(4): 736-748. |
[7] | 刘世尧. 奉节脐橙黄酮类特征性成分HPLC色谱指纹图谱构建与应用[J]. 中国农业科学, 2013, 46(19): 4131-4148. |
[8] | . 脐橙果皮油斑病解剖结构[J]. 中国农业科学, 2011, 44(6): 1301-1306 . |
[9] | 刘桂东,姜存仓,王运华,彭抒昂,曾庆銮 . 硼对两种不同砧木‘纽荷尔’脐橙叶片硼形态影响的差异 [J]. 中国农业科学, 2011, 44(5): 982-989 . |
[10] | 赖军臣,汤秀娟,谢瑞芝,白中英,李少昆 . 基于G-MRF模型的玉米叶斑病害图像的分割[J]. 中国农业科学, 2010, 43(7): 1363-1369 . |
[11] | 邓雨艳,明建,张昭其,曾凯芳 . 壳聚糖诱导脐橙果实抗病性、水杨酸及活性氧代谢变化 [J]. 中国农业科学, 2010, 43(4): 812-820 . |
[12] | 凌丽俐,彭良志,淳长品,曹立,江才伦,雷霆 . 赣南纽荷尔脐橙叶片黄化与营养元素丰缺的相关性 [J]. 中国农业科学, 2010, 43(17): 3602-3607 . |
[13] | 张竞成,顾晓鹤,王纪华,黄文江,何馨,罗菊花 . 基于中分辨率影像的农田管理单元自动提取研究[J]. 中国农业科学, 2010, 43(17): 3529-3537 . |
[14] | . ‘红肉脐橙’八氢番茄红素合成酶基因的克隆与原核表达[J]. 中国农业科学, 2008, 41(10): 3200-3207 . |
[15] | 夏俊芳,李小昱,李培武,王 为,丁小霞. 小波变换在脐橙维生素C含量近红外光谱预测中的应用[J]. 中国农业科学, 2007, 40(8): 1760-1766 . |
|