1. Introduction
With the improvement and development of the modern industrial level, welding has become an important industrial processing technology, and welding quality inspection is an important method to ensure the quality of welding. However, a variety of welding defects may occur in the welding process, mainly due to welding workers’ technical level, welding materials, processing environment, and other factors. Welding quality inspection affects not only the appearance of the product, but also the structure and strength of the product, and even causes potential safety hazards [
1].
Challenging material and optical phenomena such as high reflective surface areas often present on welding seams tend to produce artifacts such as holes in the reconstructed model using current visual sensors, hence leading to insufficiency or even errors in the inspection result. This research aims at devising an innovative 3D reconstruction technique for high reflective welding surfaces based on binocular style structured light stereo vision. The method starts from extracting a fully lit image for identifying highly reflective regions on a welding surface using conventional computer vision models, including gray-scale, binarization, dilation, and erosion. Then, fringe projection profilometry is introduced to generate point clouds on the interested area.
2. Literature Review
There are many sensors that can be used for welding quality inspection, such as arc audible sound, magneto-optical sensors, radiographic [
2], and vision sensors [
3].
The arc audible sound method is based on the sound characteristics emerging during the welding process to determine whether the defect is generated. Yusof et al. proposed a method to research the relationship between arc audible sound and weld defect information using wavelet transform [
4]. This method can estimate the location of the defect, but its accuracy is not high compared with other inspection methods, and it cannot detect the defects of welds that have already been welded because it relies on sound signals collected during the welding process.
The magneto-optical imaging method is a method based on Faraday’s magneto-optical rotation effect, which inspects the defective condition by detecting the magnetic leakage phenomenon of the weld under magnetic field excitation. Gao et al. compared magneto-optical images of different weld defects by alternating and rotating magnetic fields and found that the optimal excitation magnetic voltage and lift-off value of a rotating magnetic field are 120 V and 20 mm [
5]. Although possessing the unique advantage of balanced speed and accuracy, the disadvantage of this method is the complexity of the equipment and its setup.
Radiographic inspection mainly detects defects inside parts by analyzing the attenuation changes of the recording film, which takes advantage of the photosensitive properties of X-rays. Zou et al. proposed an X-ray-based method to detect weld defects in spiral pipes [
6]. Although this method has a good detection effect, it can cause harm to the human body due to the nature of X-rays.
In contrast, machine vision-based inspection is a method of detecting defects by calculating the surface topography information of welding seams from the image taken by the industrial camera. Because of the convenience and efficiency of visual inspection technology, it can replace manual detection in many fields, and its application is becoming wider [
7,
8]. The visual inspection can be used to detect various defects on welded surfaces, such as uneven surface and press marks, and can also detect parameters such as width and height of weld in real time [
9,
10]. Visual inspection can be divided into passive visual inspection and active visual inspection according to different image acquisition methods and feature extraction methods. Passive visual inspection is similar to manual inspection. The defects are detected by comparing the images of welds collected by the camera with the standard welds [
11]. Active visual inspection is a method to obtain a series of 3D parameters by projecting coded patterns onto the measured object, such as binocular structured light stereo vision technology [
12].
The 3D reconstruction technology based on structured laser is a method to calculate the surface topography of the measured object according to the modulation of projected laser stripes on the surface. The performance of its reconstruction is affected by the method used to extract the laser stripes, because it is a challenge to accurately extract the center locations of the detected laser stripes. At the same time, in order to reconstruct the entire surface, it needs to add additional mechanical motion to ensure that the laser stripes cover the measured object, which is a disadvantage [
13].
The 3D reconstruction technology and defect inspection method based on binocular structured light are applied by many industrial enterprises because of its high efficiency, accuracy, and no damage to the detected parts [
14]. However, binocular stereo vision technology is not ideal for object reconstruction with high reflection on the surface, because it is a method based on 2D images taken by the camera. Due to the phenomenon of overexposure in the high reflection region, as shown in
Figure 1, the quality of images taken by the camera will be affected, which will cause the loss of point cloud data, forming holes, and reducing the accuracy of subsequent data analysis. According to the characteristics of the welding process, welding objects in many cases are metal parts of high surface reflection, and the shape of welding surface is mostly curved. Additionally, in some weld surfaces, there will often be some uneven bumps or pits, which aggravate the phenomenon of light reflection. All of these increase the difficulty of applications of visual methods in welding quality inspection [
15].
Currently, there are some attempts for 3D reconstruction of highly reflective objects, namely, a few multiple exposure methods, polarization technology, separation of saturated pixels using RGB channels, and machine learning technology. For example, the multiple exposure method is a method to determine suitable projection patterns in different exposure times. Zhang et al. proposed a method to generate a new and suitable fringe pattern by selecting the best pixels from patterns with different exposure times. This method works well but takes a lot of time [
16]. Polarization technology refers to the method of using polarizers to filter projected and captured images respectively, so as to obtain better images. However, this method increases the cost of the equipment [
17]. The method of the separation of saturated pixels using RGB channels utilizes the different performance of pixels in color space to remove the highly reflective areas [
18]. However, sensor noise poses a big challenge for this method. With the development of machine learning technology, the combination of machine learning and fringe projection technology provides a new solution for the 3D reconstruction of high reflective objects. Liu et al. used machine learning to train the exposure time of different surfaces and the number of saturated pixels to solve the problem of high reflection. Although this method achieved good results, the acquisition of training samples has always been a difficult problem for machine learning [
19].
This research investigates techniques and models to enable precision 3D reconstruction of complex welding surfaces based on an innovative binocular structured light stereo vision technique. The proposed technique focuses on the analysis and identification of high reflection regions on the welding surface and devising a fitting algorithm for filling the point cloud “holes”—featureless regions—caused by specular or mirroring reflections, hence significantly improving the accuracy of the reconstructed 3D models for manufacturing applications.
This paper is structured as follows: The theories and working principles of the proposed method are described in
Section 3; experimental design and benchmarking have been presented in
Section 4. Key knowledge contributions and envisaged future works have been highlighted in
Section 5.
4. Experiment Design and Verification
4.1. Setup of the Binocular Structured Light Stereo Vision System
The experimental setup consisted of a projector with a resolution of 1024 × 176 and two industrial cameras with a resolution of 4608 × 3288 shown in
Figure 11a. Firstly, the 3D reconstruction system based on the binocular stereo was calibrated, and the internal and external parameters of the two cameras were obtained to calculate the relative position and direction between them. Zhang’s calibration method was used for system calibration, and projection patterns were encoded and decoded with gray codes.
4.2. Measurement Pipeline of a Weld Surface
In order to verify the effectiveness and robustness of the proposed method, a 3D reconstruction of the surface of a weld shown in
Figure 11b was performed using the proposed method. In this section, the whole measurement pipeline will be described in detail, including the following steps.
- Step 1:
Data collection
The coded structured light pattern is projected to the surface of the measured weld in sequence using a projector, and then two industrial cameras are used to take each pattern modulated by the surface of the measured weld.
- Step 2:
Identify the high reflective region
According to the algorithm pipeline, the first image collected by the two cameras is extracted for analysis. Through image processing operations such as gray-scale, binarization, dilation, and erosion, the coordinate set of images in a highly reflective region is obtained. The xy coordinate range of the point cloud of the high reflective region is determined by expanding the high reflective region by 30 pixels in 2D images. Based on this coordinate range, the point cloud that needs to be complemented is extracted.
- Step 3:
Data estimation of point cloud in hole region
Firstly, the extracted point clouds with holes are sliced in X and Y directions. Secondly, the slices are projected to the XY plane, XZ plane, and YZ plane, respectively. Thirdly, the projected discrete points are fitted to the curve using the Smooth Spline method. Finally, calculate the intersection (X, Y) of the fitted curve on the XY plane and estimate the Z value.
- Step 4:
Complement the point cloud hole
The coordinate value of the point estimated in Step 3 is added to the origin cloud data, and iterative operations are carried out until the estimation of all points is completed.
In order to accurately evaluate the effect of the proposed method, a coordinate measuring machine (CMM) was used to scan and measure the weld due to its high precision, and the point clouds with holes were automatically filled by Geomagic Studio, which is a very popular and effective software in the field of point cloud processing.
The 3D reconstruction of the weld with high reflectivity by the proposed method, the result of measurement by CMM, and the effect of the holes filling by Geomagic Studio are shown in
Figure 12.
Figure 12b shows the 3D reconstruction result of the welding surface with high reflectivity by traditional binocular structured light, which obviously has some holes.
Figure 12c is the result of processing by the proposed method. It can be concluded that the proposed method has a good effect by comparing with the CMM measurement result shown in
Figure 12e and the filling result by Geomagic Studio shown in
Figure 12f.
4.3. Measurement of Standard Sphere
In order to prove that the proposed method can lead to good reconstruction results for objects with high reflective surfaces, a standard sphere with highly reflective surfaces shown in
Figure 11c was reconstructed using this method. Since the surface of the standard sphere is reflective, there are holes in the point cloud generated by the traditional binocular structured light stereo vision method. By using the method proposed in this paper, the 3D reconstruction of the standard sphere has no holes. The point clouds generated by the traditional method and the method proposed in this paper were respectively fitted into spheres, and the results are shown in
Figure 13.
5. Conclusions and Future Work
This research proposes a 3D reconstruction method based on a binocular structured light stereo vision for the weld surface with high reflection, which can effectively complement the point cloud holes caused by high reflection. This method designed a structured light coding form, which can effectively help the system to identify the high reflective region. The 2D coordinates of the high reflective area were determined by the operations of gray-scale, binarization, dilation, and erosion of the first images taken by the two cameras. According to the mapping from the 2D image to the 3D point cloud, the hole of the point cloud was determined. A two-way slicing method of point cloud based on 2D image pixels was designed. The point cloud of the hole was estimated by the Smoothing Spline method. Experimental results show that this method can accurately reconstruct the surface of the object with a high reflective phenomenon. The reconstructed surface topography is highly consistent with the object being measured and has good smoothness.
The hole identification and two-way slicing methods proposed in this paper are based on 2D images; in other words, these methods are only suitable for the 3D reconstruction schemes that can acquire 2D images and are not suitable for the other 3D reconstruction schemes such as radar and TOF. In the future, further research can be conducted in point cloud slicing and curve fitting to reduce the dependence on 2D images and increase the universality of this method.