Contact Us

Surface Scratch Detection Based on Machine Vision

In the manufacturing industry, surface defects such as scratches and cracks are common in production and processing. If these defects are too subtle, they are challenging for both manual and machine inspections. The difficulty of scratch detection lies in the irregular shape of such defects, low contrast, and the influence of natural texture on the product surface. Surface scratch detection requires high standards in terms of light source, camera resolution, detection position, and algorithm software.


Machine vision generally divides surface scratches into three categories according to the difficulty of detection: light, moderate, and high.


Machine vision scratches


They are easily recognizable in appearance, and the gray value changes are obvious compared to the surrounding areas, making it possible to directly mark the defective part.


Machine vision scratches


Some gray value changes are not significant, the overall image gray value is relatively uniform, and the area of the scratches is relatively small, making them difficult to identify. The original image can be subjected to average filtering to obtain a smoother image by the machine vision measurement. By subtracting the smoothed image from the original image, those whose absolute difference value is greater than the threshold can be targeted and marked. Finally, small targets are removed, and the remaining are defined as scratches.


Machine vision scratches


The gray value differences in different parts are significant, and the shape is usually elongated. Adopting a fixed threshold for segmentation on a single image will cause the marked defect area to be smaller than the actual area.


Since the scratches in this type of image are narrow and elongated, relying solely on gray scale detection will cause the extended part of the defect to be missed. For these images, it is necessary to adopt a method that combines dual thresholds and defect features.


The scratch detection system based on machine vision can be installed on the production line of metal products with regular shapes. It can inspect each product in real-time and automatically reject defective products, contributing to automation and efficiency.


Canrill Optics is the first company in China that focuses on the manufacturing, marketing, and design of eccentric lenses. It is also the only company with a complete industrial lens supply chain that owns its mechanical and optical factories. As a custom-made lens manufacturer, Canrill lens has undergone four generations of advanced technology and performance upgrades, winning the trust of customers worldwide, including Samsung, Apple, LG, Huawei, Dajia Laser, and TSMC. Our goal is to produce top-level lenses and become one of the leaders in eccentric technology. We have been striving for excellence from manufacturing to creation.