Current Issue Cover
钢板表面低对比度微小缺陷图像增强和分割

汤勃1, 孔建益1, 王兴东1, 刘钊2, 刘怀广1(1.武汉科技大学机械自动化学院, 武汉 430081;2.武汉科技大学计算机科学与技术学院, 武汉 430065)

摘 要
目的 环境干扰及光学元件不稳定等因素往往会造成钢板表面图像照度不均,钢板表面的微小缺陷具有图像灰度不均、对比度低、形态微小等特点,给后续图像分析和缺陷识别带来因难。为此,提出一种钢板表面低对比度微小缺陷图像增强和分割算法,以消除照度不均并突出缺陷信息,从而有效分割缺陷目标。方法 采用小波-同态滤波算法进行图像增强处理,即先利用小波变换对图像进行分解,再基于同态滤波对小波低频系数进行图像灰度修正,同时对高频系数进行高通滤波,然后将处理后的小波低频系数和高频系数进行重构得到增强的图像,从而达到消除照度不均、增强缺陷细节信息的目的。最后利用最大类间方差法(Otsu法)确定自适应阈值提供给Canny算子进行边缘检测。结果 采用本文算法对钢板表面多类型低对比度表面微小缺陷进行研究,有效消除了光照不均;单一的Otsu阈值分割和Canny算子难以有效检测这些缺陷,而本文Otsu-Canny算法的正确检测率达96%。结论 采用小波-同态滤波进行图像增强处理后,再利用Otsu-Canny算法对钢板表面多类型、低对比度的微小缺陷进行边缘检测取得了良好效果。
关键词
Image enhancement and segmentation algorithm for low-contrast small defects on steel plate

Tang Bo1, Kong Jianyi1, Wang Xingdong1, Liu Zhao2, Liu Huaiguang1(1.School of Mechanical and Automation Engineering, Wuhan University of Science and Technology, Wuhan 430081, China;2.College of Computer Science and Technology, Wuhan University of Science and Technology, Wuhan 430065, China)

Abstract
Objective Steel plates are important raw materials in industry. In its manufacturing process, a variety of surface defects inevitably arise. These surface defects have a negative effect on the appearance and performance of the product; thus, detecting and controlling them in time is necessary. At present, an increasing number of iron and steel manufacturing enterprises use the machine vision method to detect and identify steel-plate surface defects automatically. The defect detection of the steel-plate surface based on machine vision collects the image of the steel-plate surface by using a charge-coupled device camera. By image denoising and enhancement, the defect image is segmented, the defect features are extracted, and the defect classification is conducted. In image acquisition, being disturbed by the on-site environment of the production line is unavoidable, as are the reflection of the steel plate, the illumination environment or the instability of the optical elements, often resulting in the non-uniform illumination of the image. If the image is not enhanced, great interference in the detection and recognition of small surface defects of the steel plate would occur. The common characteristics of small defects on the steel plate surface are non-uniform gray scale, low contrast between defects and background, obscure edge, diverse and small shape, and a small proportion of a defective area in the entire image, which is even mixed with noise. The contrast between the surface defect of the steel plate and its background is low. To conduct subsequent image analysis and defect recognition effectively, we need to conduct image enhancement processing to emphasize the surface defect information. The purpose of image enhancement is to make the original image clear or emphasize interesting features, thereby improving the overall contrast of the image and enhancing the local details of the image, which has good visual effect and rich information features. On this basis, the surface defect target is segmented from the background by image segmentation; thus, the feature of the defect can be extracted and recognized in the future. Method Low-contrast image enhancement methods often include histogram equalization (HE), Retinex model, homomorphic filtering, and gray transform. The HE algorithm is widely used because of its simple principle and easy implementation, but it cannot adapt to the local contrast of the image of small defects on the surface of the steel plate. The Retinex model algorithm is also a common method for low-contrast image enhancement. Based on this model, single-scale Retinex (SSR) and multi-scale Retinex (MSR) algorithms have emerged. These series of algorithms have achieved good results, but the computational complexity is high. Homomorphic filtering can also enhance low-contrast images. This method avoids the distortion of image directly processed by Fourier transform (FFT), but it also has problems, such as over-enhancement and poor enhancement effect in high-light regions. In low-contrast image enhancement, if the local contrast of the image is enhanced in the spatial domain and the detailed information is enhanced by high-pass processing in frequency domain; the spatial and frequency characteristics of the image are considered at the same time. Compared with Fourier transform, wavelet transform (WT) is a localized analysis of space and frequency. It refines the signal step-by-step by scaling and translation operations, and it finally achieves time subdivision at high frequency and frequency subdivision at low frequency, focusing on arbitrary details of the signal. The wavelet-homomorphic filtering algorithm is used in image enhancement to eliminate non-uniform illumination. First, the image is decomposed by wavelet transform, and then the low-frequency coefficients of wavelet are modified by homomorphic filtering, while the high-pass filtering is applied to the high-frequency coefficients. Then, the low-frequency coefficients and high-frequency coefficients of the processed wavelet are reconstructed to obtain the enhanced image to eliminate non-uniform illumination. After image enhancement with wavelet transform and homomorphic filtering, the surface defect target is segmented to obtain the surface defect area of the steel plate. Many methods are used in image segmentation. The common classical methods are threshold segmentation based on gray histogram and edge detection. Given the low contrast of small defects on the surface of the steel plate, the distribution of gray histogram of the image does not have obvious peaks and valleys; thus, obtaining satisfactory results for image segmentation by using threshold method alone is difficult. The edge detection methods of Roberts, Sobel, and Prewitt operators are also poor for this type of small defects with low contrast, and canny edge detection operator remains widely studied and applied, but the segmentation effect is greatly affected by the threshold. On this basis, this study uses the Otsu-Canny algorithm in defect edge detection. In other words, the method of maximum inter-class variance (Otsu method) is used to determine the adaptive threshold for the Canny operator to perform edge detection. Result In this study, the algorithm is used to study the multiple types of low-contrast surface small defects on the strip surface, thereby effectively eliminating the non-uniform illumination. The Otsu algorithm or Canny operator cannot easily detect these defects effectively, and the correct detection rate of the Otsu-Canny algorithm in this study is 96%. Conclusion After image enhancement with wavelet-homomorphic filtering, the Otsu-Canny algorithm is used to detect the edges of small defects with multiple types and low contrast on the surface of the steel plate, and good results are obtained. Image enhancement and image segmentation should focus not only on the effect of processing but also on the real-time performance of the algorithm. In steel-plate surface defect detection based on machine vision, a real-time algorithm can be used for conventional surface defects. This algorithm is suitable for small surface defects with low contrast. To improve the processing speed, the parallel algorithm of a high-performance processor graphic processing unit can greatly improve the speed of image processing, thereby satisfying the effectiveness and real-time performance of the algorithm.
Keywords

订阅号|日报