针对带钢表面图像亮度不均匀、对比度低以及缺陷种类多、形式复杂的问题,提出一种基于小波去噪与改进Canny算法的带钢表面缺陷检测算法.首先通过小波变换将原始图像分解,对低频分量采用改进的同态滤波提高亮度和对比度,对高频分量采用改进的阈值函数进行去噪,并通过小波重构得到增强图像.其次对传统Canny算法进行改进,通过改进的自适应加权中值滤波进行平滑,并增加梯度方向模板;然后采用迭代式最优阈值选择法与最大类间方差法来求取高低阈值,提高算法的自适应性.最后采用形态学处理对缺陷边缘填充,并去除干扰边缘及毛刺,得到带钢表面缺陷区域.实验结果表明,所提算法对带钢表面缺陷的检测效果较好、精度较高,适用于多种类型的带钢表面缺陷检测.
In allusion to the problems of uneven brightness,low contrast,many kinds of defects and complex forms of strip surface images,an algorithm of strip surface defect detection based on wavelet denoising and improved Canny algorithm is proposed.The original image is decomposed by means of wavelet transform,the improved homomorphic filtering is used for low-frequency components to enhance brightness and contrast,the high frequency component is denoised by means of the improved threshold function,and the enhanced image is obtained by the wavelet reconstruction.The traditional Canny algorithm is improved,and the improved adaptive weighted median filter is smoothed,and the gradient direction template is added.The iterative optimal threshold selection method and the maximum inter-class variance method are used to obtain the high and low thresholds,so as to improve the adaptability of the algorithm.The morphological processing is used to fill the defect edge,and remove the interference edge and burr,so as to obtain the defect area on the strip surface.The experimental results show that the proposed algorithm has good detection effect and high detection accuracy,and is suitable for various types of strip surface defects detection.