1. Introduction
Suppliers that produce high-precision metal parts are confronted with customers’ demands for zero defects, and full inspection reports. Because most common high-precision metal parts are stainless-steel and aluminum plates with high strength and high reflectivity, products made of these parts are mainly inspected manually. Inspection environments for such products involve high risks. Thus, this study aimed to reduce the effect of light reflection from highly reflective metal on defect display. Hemispherical light domes and imaging devices were designed to create an environment similar to that of an integrating sphere to obtain light sources with uniform illumination. Subsequently, image processing was conducted to highlight defect features and determine relatively favorable light source positions, thereby effectively reducing the difficulty in defect category identification and the defect omission rate by overcoming the problem of metal reflection during automated optical inspection (AOI).
Huang et al. [
1] proposed a real-time defect extraction framework for the surface inspection of aluminum sheets or plates in high-speed production. Under their framework, images of defects are subjected to a Gaussian smoothing algorithm and Prewitt edge detection. After image nonuniformity is enhanced, a segmentation algorithm is applied to reduce the heterogeneity of images and enhance edge detection. Wang et al. [
2] proposed that illumination directly affects optical imaging systems. To ensure the acquisition of high-quality images and high-accuracy detection in dark environments, they proposed an optimal illumination planning method for image quality assessment and classified image brightness quality features into five levels. Intensity histograms were used to extract simple features, which were adopted as the main features to describe the image intensity distribution. The main features were then amplified, and their discernibility was enhanced by subjecting them to the evolutionary process of stacked autoencoders to determine the image brightness. Chen et al. [
3] developed a two-stage illumination device to increase the precision of detecting glass substrate defects. The first step involved verifying the feasibility of detecting glass surface defects in dark-field images, and the second step involved optimization design to achieve multidirectional illumination and increase the optical scattering of defects on glass substrates. The results of Chen et al. indicated that clear dark-field, high-contrast images of glass substrate defects were obtained using the two-stage illumination device.
Molina et al. [
4] proposed a method that involves using deflectometry- and vision-based technologies for the automatic detection of small defects (with a diameter of up to 0.2 mm) on the entire surface of automobile bodies after their painting. The method comprises two steps. Step 1 involved using an image fusion algorithm to enhance pixels with low and high intensity levels (indicating the presence and absence of defects, respectively). Step 2 involved the use of a background extraction method based on local directional blurring to enhance image contrast. This facilitates the detection of an increased number of defects; because pixels of different intensity levels can identify defects of different sizes, surface defects lead to observable projection pattern deformation and reflection models. Martínez et al. [
5] proposed a high-precision automated surface metal machining system to meet the strictest machining requirements of the aviation and automobile industries. Their system is a machine vision system for inspecting surface defects, and the main component of this system is the illumination device. Under different lighting conditions, Martínez et al. collected multiple images to conduct binary operations and addition. A reconstructed binary image was obtained from each illumination device and processed separately before all the reconstructed binary images were combined into one image for feature extraction and preprocessing. In sum, the system mainly comprises the supervised learning classifier of an artificial neural network, incorporated additional features of geometric and texture data, and segregated defective and nondefective regions to facilitate defect detection using machine vision.
León et al. [
6] proposed a method for detecting specular and painted surfaces, systematically generated different intensity patterns in the surface environment, and used an image fusion approach to display the fused images on a hemispherical screen. The detected surface was located at the center of the hemispherical screen, and a camera was used to observe this surface through an opening in the screen. The image was observed from the surface onto the screen using the deflecting method; because light reflections on specular surfaces conform to the law of reflection, the image observed using the camera was reflected on the screen from the surface. Jin et al. [
7] developed a system for inspecting glass surface defects. To improve the capability of inspecting miniature defects, they used a cold cathode fluorescent lamp to replace light-emitting diodes (LEDs) as the light source. Data processors were used to process light intensity signals, which were transmitted by a glass ribbon and received by a linear charge-coupled device (CCD) array. Only defective data featuring high-threshold and low-threshold characteristics of glass defects were collected. The connectivity of defective data and the number of defective data were then used to calculate the size of defect areas and identify defect types, including glass defects, such as bubbles, concretion, bruises, and scratches.
Zhang et al. [
8] proposed a design and testing process for a vision system to detect surface defects on highly reflective metals. They designed four subsystems for image acquisition, image preprocessing, feature extraction, and feature classification. Lighting devices with diffused light sources were used to reduce the difficulty of detecting the surface of highly reflective metal surfaces. The image preprocessing subsystem mainly performed image enhancement and image smoothing or image noise removal. A spectral measure method for extracting features was used to characterize seven classes of defects. During a design process based on the support vector machine algorithm, cross validation was employed to obtain the optimal parameters, which were then applied to train and test samples. Consequently, the system of Wu et al. could identify and inspect the seven most commonly observed defects on highly reflective metal surfaces. Li et al. [
9] proposed a lighting method for alleviating frequently encountered problems during the inspection of defects in images of shiny or highly reflective surfaces. Diffused light sources are based on the physical analysis of light reflection, thereby making them suitable for detecting defects on metal balls, planes, and cylinders. Diffused light is a prioritized option for surface defect illumination; its applications are divided into two methods. The first method involved setting the light source angles and the relative positions between the light source and the CCD camera in such a manner that reflected light did not enter the camera. The second method involved controlling the distribution of reflected light to enable the uniform distribution of scattered light. If the light source and CCD camera are located in the same hemisphere, the reflected light near the light source directly enters the camera. The light reflection design used in Li et al. contained circular LEDs to eliminate reflection and the effect of strong light sources around an object. The experimental results of Li et al. revealed that, relative to lighting methods based on diffused light sources, lighting methods based on allowing defects to be captured more clearly produced more accurate defect data.
Huang et al. [
10] proposed a method that involves the use of structured-light modulation analysis to detect surface defects and dust on specular objects. Considering the discrepancy in polarization states between locations with and without dust, polarized illumination and a linear polarizer were employed to photograph dust images exclusively. Subsequently, the captured light-modulated images and dust images were combined to obtain a purified defect distribution without complex calibration experiments. This approach is suitable for rapid defect detection in industrial settings. Kwon et al. [
11] exploited the characteristics of a line scan camera and proposed a vision-based mura detection algorithm for black resin-coated steel plates. Their proposed algorithm involves preprocessing, threshold selection, binarization, and postprocessing. Preprocessing consists of the following steps: moving-average filtering, image partitioning, and the assignment of an additional weight for black defects. Two threshold values are employed to binarize designated regions and obtain defective regions. To distinguish defects from the background, appropriate threshold values must be selected. The aforementioned algorithm is repeated on every region of an original image to obtain binary images of the original image. However, binary images contain extremely small defective regions that are induced by signal noise. To eliminate such regions, image opening and closing methods are used to remove low signal noise.
Seulin et al. [
12] proposed a special illumination method to obtain defect information by reducing light reflection on examined objects. To ensure the imaging of defects, the defects were illuminated using specific lighting devices, which enabled straightforward and fast defect segmentation. Seulin et al. examined two simulation cases. In the first case, for a surface without defects, the surface reflects a dark zone of the lighting. In the second case, for a surface with defects, the defects deflected light rays from the luminous zone and the captured image clearly displayed the defects. Under these illumination and imaging conditions, defects only appeared as high-gray-level pixels in the dark zone. Luo et al. [
13] used a machine-vision-based technique to inspect steel surfaces. The main obstacle in the inspection was the considerable time spent processing a large number of images with uneven lighting. Luo et al. developed a real-time modular and cost-effective AOI system for hot-rolled flat steel. First, according to the design goals of a majority of steel mills, a detailed system topology was constructed. Moreover, a suitable lighting setup was designed, and typical defect patterns were identified. Second, the image enhancement method was used to overcome the problems of uneven lighting, overexposure, and underexposure. Third, a defect detection algorithm based on variance, entropy, and the average gradient was developed. The developed algorithm improved the inspection speed. The aforementioned AOI system’s topology was divided into two sections: an image-capturing subsystem, and a defect analysis subsystem. The image capture subsystem was installed at the end rolling side near the press-fit machine, whereas the defect analysis subsystem and other controllers of the rolling machine were placed in a control room.
Win et al. [
14] proposed a mesoscopic contrast adjustment thresholding method for surface defect detection. In this method, first, a contrast-adjusted Otsu’s method is used. Second, a contrast-adjusted median-based Otsu’s method is used for the automated detection of defects on titanium-coated aluminum surfaces. Compared with the minimum error thresholding method and Otsu’s method, the method proposed by Win et al. detected defects more accurately in images with different resolutions. However, the effects of lighting and shadows might compromise the detection accuracy of the method proposed by Win et al. Thus, they recommended using a fuzzy cluster algorithm or conducting wavelet analysis in the image preprocessing step to identify defect-affected regions and reduce false detections.
To increase the defect recognition rate for aluminum sheet surfaces, Liu et al. [
15] proposed the Nonsubsampled Shearlet Transform–Kernel Spectral Regression (NSST–KSR) method, a feature extraction method for flexibly extracting the multidimensional and multidirectional feature information of images. The aforementioned method can rapidly remove redundant signal noise and select crucial information as features. Moreover, it can enhance the effectiveness and conciseness of extracted features and facilitate easier classification. The NSST–KSR method was tested using samples captured from production lines of aluminum sheets, including five true defect types and three pseudo defect types of lighting variation, oil stains, and water marks. The experimental results confirmed that the NSST–KSR method effectively improved the recognition rate of defects on aluminum sheet surfaces under low contrast and complicated defect shapes. The aforementioned method can be used to inspect defects on steel surfaces and is, thus, a popular method in the steel industry. Mordia et al. [
16] summarized vision-system-based surface defect detection techniques to inspect the research progress of visual inspection systems. They explored the hardware and software required for visual detection of the defects of steel products. The hardware setup required for such defect detection includes a camera and suitable light source. Compared with light sources or CCD sensors, lighting methods have stronger effects on the inspection of steel surface defects. According to the basic concepts of image processing, Mordia et al. classified software-based surface inspection methods into statistical, filtering, model-based, and machine learning methods.
Qiu et al. [
17] proposed an effective framework for the automated detection of the surface defects of metal parts. Their framework consisted of an image registration module and a defect detection module. Visual and spatial features were integrated into a principal component to obtain high-precision image registration results. An image difference algorithm with preset constraints was then used to construct a defect detection module, in which two categories of constraint bounding boxes were designed to reduce the false detection induced by sensitive boundaries and increase the accuracy of the detection of defects on metal surfaces. Dawda et al. [
18] combined stereo vision reconstruction and laser line projection to conduct precise three-dimensional measurements to detect defects on highly specular surfaces. Their technique could accurately detect defects with sizes of 0.03 and 0.07 mm in ambient lighting conditions. The method of Dawda et al. was confirmed to be simple, fast, feasible, accurate, and cost-effective for the detection of light-reflecting objects in industrial environments. Hao et al. [
19] proposed the use of multidimensional feature information in the surface inspection of steel plates to improve the accuracy of defect detection and obtain multidimensional defect information. They used multiple cameras to acquire highly dynamic images of the surfaces of steel-band watches. These images had different scales and were preprocessed to obtain clearer images. Defect targets in the images were subjected to object-relational mapping by using multidimensional information. Furthermore, multiscale, multidimensional, and multilayer defect feature information was generated to identify and classify the defects of thin steel-plate surfaces. Rosati et al. [
20] proposed an automated defect detection system for coated plastic parts used in the automotive industry. On the basis of a previous study, they adopted a nonflat mirror to illuminate and inspect highly reflective curved surfaces. The method of Rosati et al. involved directing the rays emitted from a light source onto the surface to be inspected by using a suitably curved mirror. The reflected light rays were collected by a CCD camera, and the coating defects were in the form of shadows of various shapes and dimensions. Rosati et al. used a simplified specular device and a set of plane mirrors, rather than a curved mirror, to reduce the cost and complexity of their defect detection system. Jacques et al. [
21] provided a description of diffusion light transport, including the basic analytic equations of time-resolved, steady-state, and modulated light transport. They outlined a perturbation method for handling slight heterogeneities in optical properties and described the treatment of boundary conditions, such as an air–tissue interface. They also adopted finite mesh-based numerical methods to calculate the diffuse light field in complex tissues with arbitrary boundaries and explained the theoretical and computational tools used in tissue spectroscopy and imaging applications.
The present study aimed to develop an automated defect detection system with two main focuses. The first focus was to use the LightTools optical simulation software to verify the devices installed, as shown in
Figure 1. The concept of simulating the reference integrating sphere and light source design is important. To attain light with uniform illumination, the designed light source was diffused to create uniform light in a hemispherical cover. The second focus was to reduce the high reflectivity of the object to be examined. A diffuse light source similar to an integrating sphere with a black mask to match the designed light source was used to obtain images of the defects on specular stainless-steel plates. Image processing methods were applied to extract defect features, including grayscaling, binarization, antibinarization, dilation, and erosion. The attainment of favorable light source positions facilitated subsequent defect coordinate detection and feature identification, thereby decreasing the difficulty of and omission rate in defect category identification.