基于背景分离与亮度校正的苹果表面缺陷提取

2020-09-02 06:31:23王银敏费树岷真昕欣
软件导刊 2020年8期

王银敏 费树岷 真昕欣

摘 要:苹果是我国年产量最高的水果,但出口量不足总产量的2%,采用基于图像处理的水果表面缺陷检测技术可促进水果的分级与销售。以红富士苹果为研究对象,首先采集苹果的RGB图像,并根据转换公式得到图像的HSV彩色模型,对饱和度S分量进行阈值分割与孔洞填充,获得苹果背景分离模板;然后根据背景分离模板得到R分量的背景分离图,并对分离背景后的R分量进行亮度校正;最后采用单阈值分割法提取缺陷。实验共采集300个苹果样本,包括缺陷果200个,正常果100个,其中对缺陷果的识别率达到96.5%,对正常果的识别率达到100%。实验结果表明,采用S分量获取背景分离模板,并结合亮度校正算法,可在不增加额外拍摄装置的情况下获得较好的缺陷提取效果。

关键词:缺陷提取;背景分离;亮度校正;阈值分割

DOI:10. 11907/rjdk. 192663 开放科学(资源服务)标识码(OSID):

中图分类号:TP317.4 文献标识码:A 文章编号:1672-7800(2020)008-0234-05

Abstract: Apple has the highest yield of fruits in our country, but the export volume is less than 2% of the total output. Fruit surface defect detection technology based on image processing can promote the classification and sale of fruits. This article takes Red Fuji Apple as the research object. Firstly, the RGB image of Apple is obtained, and the HSV model of the image is obtained based on the conversion formula. The threshold segmentation and hole filling of the saturation S component are used to obtain the apple background separation template. Then the background separation map of the R component is obtained according to the background separation template, and the R component after the separation of the background is subjected to luminance correction. Finally, the single threshold segmentation method is used to extract the defects. A total of 300 apple samples were collected during the experiment, of which 200 were defective and 100 were normal. The defect recognition rate of the defective fruit reached 96.5%, and the discrimination rate of the normal fruit was 100%. The experimental results show that the S-component acquisition background separation template combined with the brightness correction algorithm can obtain better defect extraction results without adding additional cameras.

Key Words: defect extraction; background separation; brightness correction; threshold segmentation

0 引言

截至2018年,我國水果总产量已达到29 000万吨,然而总出口量只有490万吨,不足总产量的2%,经济效益不够明显。与其它水果出口量占比较大的国家相比,主要差距表现在果品的采后处理环节。果品采后处理是果品增值的关键,采后处理一般包括催熟、分级、打蜡及储存保鲜等步骤[1]。其中水果分级技术是果品采后处理的核心技术,也是目前亟待解决的技术难题[2]。水果分级的依据主要是颜色、尺寸、形状以及有无缺陷,与其它指标相比,表面缺陷检测一直是果品分级中的重点及难点[3]。……

登录APP查看全文