中国农业科学 ›› 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()   

  1. 1 西南大学工程技术学院,重庆 400716
    2 西南大学柑桔研究所/中国农业科学院柑桔研究所,重庆 400712
  • 收稿日期:2018-08-06 接受日期:2018-11-06 出版日期:2019-01-16 发布日期:2019-01-21
  • 通讯作者: 吕强 E-mail:qlu@swu.edu.cn
  • 作者简介:张明,E-mail: pine_torch@126.com
  • 基金资助:
    重庆市重点产业共性关键技术创新专项(cstc2015zdcy-ztzx80001);海南省重点研发计划(ZDYF2017028);中央高校基本科研业务费XDJK2017C017(XDJK2017C017)

Segmentation of Navel Orange Surface Defects Based on Mask and Brightness Correction Algorithm

ZHANG Ming1,2,LI Peng2,DENG Lie2,HE ShaoLan2,YI ShiLai2,ZHENG YongQiang2,XIE RangJin2,MA YanYan2,LÜ Qiang2()   

  1. 1 College of Engineering and Technology, Southwest University, Chongqing 400716
    2 Citrus Research Institute, Southwest University/Chinese Academy of Agricultural Sciences, Chongqing 400712
  • 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,然后掩模模板ImaskI分量图通过点乘运算得到去除背景的I分量图;提出基于多尺度高斯函数图像亮度校正算法对去除背景后的I分量图像进行亮度校正,通过构建多尺度高斯函数滤波器,将去除背景后的I分量图与构建的多尺度高斯函数进行卷积运算即得到去除背景后的I分量图像表面光照分量图,最后将去除背景后的I分量图与得到的光照分量图进行点除运算即得到去除背景后的I分量图像亮度校正图;然后采用单一全局阈值法对脐橙表面缺陷进行提取。【结果】 基于HSI颜色空间模型法去除背景,可在有效去除背景的同时完好保留脐橙的表面信息,有利于后续操作;基于多尺度高斯函数的图像亮度校正算法分别对6种常见脐橙缺陷进行图像亮度校正后采用单阈值法提取缺陷,使不同灰度等级的脐橙表面缺陷一次性分割成功,其中分割率最高为100%,最低为88.5%,整体达92.7%。通过试验分析后发现造成部分误分割或漏分割的原因主要在于部分缺陷果缺陷处颜色较轻,与正常区域灰度差较小,从而造成漏分割;还有部分缺陷果由于缺陷面积小,在图像形态学处理过程被误认为是噪声而被去除;同时发现正常果的误判率也达到了10.8%,经分析发现误判的正常果表皮组织区域的褶皱位于图像的边缘区域,从而被误认为是边缘区域的缺陷,导致误判。【结论】 基于HSI颜色空间模型法去除背景及基于多尺度高斯函数的图像亮度不均校正算法对纽荷尔脐橙图像背景分割和去除背景后的I分量图像表面亮度校正均取得了较好的效果,能有效识别脐橙缺陷区域,为脐橙精确分级提供了技术支持,也为其他果品表面缺陷快速检测提供了一种新思路。

关键词: 脐橙, 表面缺陷, 分割, 去除背景, 亮度校正, 单阈值

Abstract:

【Objective】 The purpose of this study was to effectively solve the problem that some defects of fruit images with defective peels were mistakenly divided into backgrounds when removing background, and it was difficult to effectively segment and extract fruit surface defects.【Method】 Taking Newhall navel orange as the research object, this paper proposed to remove the background based on HSI color space model method to construct the mask template with I component image, and to select a single threshold (T=75) by bimodal method according to its gray histogram information and filled the holes to obtain a mask template. At last, the mask template and I component image were obtained by dot multiplication to obtain I component image from which the background was removed. A multi-scale Gaussian function image brightness correction algorithm was proposed to correct the brightness of I component image after removing the background. By constructing a multi-scale Gaussian function filter, I component image with the background removed and the constructed multi-scale Gaussian function filter were convoluted to obtain the surface illumination component image of I component image after the background was removed. Finally, the I component image after removing the background and the obtained illumination component image were subjected to dot division operation to obtain a luminance correction image of the I component image after the background was removed. At last, the surface defects of navel orange were extracted by a single global threshold method.【Result】 The background was removed based on the HSI color space model method, and the surface information of the navel orange could be preserved while the background was effectively removed, which was beneficial to subsequent operations. The image brightness correction algorithm based on multi-scale Gaussian function was used to extract the defects of the six common navel orange defects, and then the single-threshold method was used to extract the defects. Therefore the surface defects of navel oranges with different gray levels were successfully segmented at one time, and the segmentation rate was up to 100%, the lowest was 88.5%, and the total was 92.7%. Through experimental analysis, it was found that the cause of partial mis-segmentation or leakage segmentation was mainly due to the fact that some defects were lighter in color, and the difference in gray level from normal region was smaller, resulting in leakage segmentation. There were still some defects due to the small defect area, which was mistaken for noise removal during image morphology processing. At the same time, the false positive rate of normal fruit was also found to be 10.8%. It was found that the fold of a part of the normal fruit epidermal tissue area was located in the edge area of the image, which was mistaken for the defect of the edge area, resulting in misjudgment.【Conclusion】 The experimental results showed that image removal based on HSI color space model and image brightness unevenness correction algorithm based on multi-scale Gaussian function had achieved good results for background image segmentation of Newhall navel orange image and I component image surface brightness correction after background removal. It provided technical support for the precise grading of navel oranges and also provided a new idea for the rapid detection of other fruit surface defects.

Key words: navel orange, surface defect, segmentation, remove background, brightness correction, single threshold