电子科技 ›› 2020, Vol. 33 ›› Issue (8): 16-20.doi: 10.16180/j.cnki.issn1007-7820.2020.08.003

• • 上一篇    下一篇

基于改进Canny算子的垃圾图像边缘检测

巨志勇,张文馨,翟春宇   

  1. 上海理工大学 光电信息与计算机工程学院,上海 200093
  • 收稿日期:2019-06-16 出版日期:2020-08-15 发布日期:2020-08-24
  • 作者简介:巨志勇(1975-),男,博士,讲师。研究方向:图像处理与模式识别。|张文馨(1994-),男,硕士研究生。研究方向:图像处理与模式识别。
  • 基金资助:
    国家自然科学基金(81101116)

Garbage Image Edge Detection Based on Improved Canny Algorithm

JU Zhiyong,ZHANG Wenxin,ZHAI Chunyu   

  1. School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093,China
  • Received:2019-06-16 Online:2020-08-15 Published:2020-08-24
  • Supported by:
    National Natural Science Foundation of China(81101116)

摘要:

为提高垃圾识别分类的准确率,文中在垃圾图像预处理过程中提出了一种基于改进Canny算子的垃圾图像边缘检测方法。该方法从传统Canny算子滤波方式、梯度方向及阈值自适应3个角度实现了垃圾图像边缘检测的优化。针对Canny算子高斯滤波仅适用于高斯噪声和边缘细节易丢失的问题,采用改进的梯度倒数加权法进行滤波。针对Canny算子易检测出伪边缘的问题,通过在计算图像梯度方向的过程中增加方向梯度模板实现了边缘的精确化。同时采用最小误差法解决人工设定阈值的局限性,实现阈值自适应。实验结果表明,该方法在去噪性能和边缘细节两方面得到了改进,获得了更好的边缘检测效果,为后续垃圾图像的识别分类提供了技术保障。

关键词: 边缘检测, Canny算子, 梯度倒数加权滤波, 梯度方向, 最小误差法, 垃圾图像

Abstract:

In order to improve the accuracy of garbage in the process of identification and classification, this paper proposed a method based on improved Canny algorithm for garbage image edge detection in the process of garbage image preprocessing. The method optimized the edge detection of garbage images from three aspects: traditional Canny algorithm filtering, gradient direction and threshold adaptive. For the poor performance of Gauss filter used by traditional Canny algorithm in limitation of removing gauss noise and loss of edge details, the improved gradient reciprocal weighting method was used to filter. For the problem that the Canny algorithm was easy to detect the false edge, the edge was refined by adding the direction gradient template in the process of calculating the gradient direction of the image. At the same time, the minimum error method was used to solve the limitation of manually setting the threshold, and the threshold could be adaptive. The experimental result showed that this method improved the denoising performance and obtained better edge detection effect, which provided technical support for the subsequent classification and classification of garbage images.

Key words: edge detection, Canny algorithm, gradient reciprocal weighted filtering, gradient direction, minimum error method, garbage image

中图分类号: 

  • TP391