2.1. Algorithm Flowchart
Figure 2 shows the computational flowchart of the intelligent laser cleaning methodology. Regarding the offline procedure, many images are accumulated through processing parameter experiments. First, many surface images of rusty carbon steel are collected, and a series of image features, including the GLCM and the concave-convex region features, are computed to evaluate the corrosion degree of these workpieces. Second, many laser process parameters are also set carefully to carry out practical laser cleaning applications. Then, a large number of surface images of the workpiece after cleaning can be captured. Third, both a metal color difference feature and a DWD corrosion texture are computed to evaluate the cleaning performance, and all the cleaning performance images are marked as qualified or unqualified. Finally, both the image features and the laser parameters are used to train the PSO-SVM for laser parameter prediction purposes.
In the online computational process, first, the surface images of the rusty workpiece are collected. Second, the image features of the captured image above, such as the GLCM and the concave-convex region features, are computed. Third, the laser parameters are set randomly, and the PSO-SVM model is used to forecast the cleaning performance [
19]. The input data of the PSO-SVM include the image features and the laser process parameters; its output is the qualified label or the unqualified label of image data. If the result is unqualified, the laser parameters are generated randomly again to participate in the cleaning performance prediction. This process is implemented iteratively until the result becomes qualified. Finally, practical laser cleaning is carried out, the cleaning performance of the material surface is quantitatively evaluated, and the corresponding cleaning efficiency results are outputted.
2.2. Cleaning Performance Evaluation Using a Two-Stage Method
In this paper, a two-stage cleaning performance evaluation method is developed.
Figure 3 presents the proposed computational flowchart. When carrying out cleaning, the bright white metal substrate can be exposed if the laser process parameters are set properly; otherwise, residual rust will remain. Another fact is that when the laser power density exceeds the damage threshold, the workpiece may also be oxidized, which will result in a yellow or even red metal surface. To assess the cleaning performance objectively, the CIEDE2000 color difference model is utilized to preliminarily determine the overall cleaning performance of the workpiece [
20]. Then, image enhancement is computed, and a DWD corrosion texture feature is calculated after Otsu’s segmentation. Generally, the DWD refers to the percentage of corroded area in the whole image area, with a range of 0–1. Different weights are given to the corroded pixels according to their individual corrosion aggregation degrees. Finally, the equivalent area of the residual corrosion is calculated to assess whether the cleaning performance is acceptable.
2.2.1. Color Difference Feature
After the laser cleaning of carbon steel workpieces, we can divide the cleaning performance of the workpieces into three grades: insufficient cleaning, proper cleaning, and overcleaning.
Figure 4 shows their corresponding image samples in
Figure 4a–c. From
Figure 4, it can be found that the color difference apparently exists among these images; thus, this index can be utilized as an image feature for cleaning performance evaluation. In our application, the images of insufficient cleaning or overcleaning are directly determined as the unqualified cleaning case. When collecting these images, it should be emphasized that these images are collected under the same environmental lighting conditions; otherwise, the color difference will be seriously affected by the lighting.
In this paper, the CIEDE2000 model is utilized to calculate the color difference feature between our rusty image of the workpiece and the standard image, and then the initial evaluation of whether the cleaning performance is qualified can be determined. Compared with other color space models, such as CIE94, CIELCH, and CIELAB, CIEDE2000 improved the evaluation accuracy of color information. When implementing the CIEDE2000 computation, it is necessary to convert all the color images from the red, green and blue (RGB) color space to the LAB color space first. Then, three new weight coefficients
,
, and
are computed, and the CIEDE2000 feature is computed by Equation (1). Clearly, it is believed that this kind of computation effect is closer to the subjective cognition of the human eye. After that, the color difference and the threshold
of the two images are compared. If
, laser cleaning has a good effect; otherwise, insufficient cleaning or overcleaning occurs.
where
represents the total color difference;
,
, and
are the brightness difference, the saturation difference, and the hue difference, respectively;
,
, and
are the experience parameters, and they are all set to 1.0 in this paper;
,
, and
are the weight coefficients that can be used to correct the color space; and
is used to correct the deflection of the ellipse principal axis in the blue area of the color space.
2.2.2. Dynamic Weight Dispatch (DWD) Corrosion Texture Feature
Before the computation of image features, a series of classic image-processing computations are carried out. First, the image preprocessing is performed. Both median filtering and linear transformation are considered. Median filtering can reduce the interference in images. Linear transformation is used to highlight the corrosion residual area. Second, Otsu’s segmentation is adopted for image segmentation. Clearly, fixed threshold segmentation has difficulty achieving good results under uncertain environmental factors and metal surface states; thus, the maximum interclass variance method is performed to realize adaptive threshold segmentation. Finally, a DWD corrosion texture feature that can be used to evaluate the percentage of residual rust is calculated.
The DWD feature is designed to assess the cleaning performance. When calculating the DWD feature, a fixed-size sliding window is used to evaluate the aggregation degree of rusty residues in the image. A unit area is defined to represent the size of the sliding window. It is assumed that the higher the degree of pixel aggregation, the larger the weight of the unit area should be. For example, the weight of the corrosion unit area will be low if the aggregation degree of residual corrosion is small. A dynamic weight dispatch method is proposed to represent the rust degree; the rust pixels are reset to three intensity levels according to their initial rust aggregation degrees. The judgment method of rust aggregation degree is shown in Equation (2), and the dynamic weight dispatch method is given in Equation (3). After sliding window processing, the equivalent area of corrosion is calculated to evaluate the laser cleaning performance. Its calculation method is shown in Equation (4). The judgment method of the cleaning performance is shown in Equation (5).
where the
and
are the height and width of the sliding window, respectively;
is the number of corrosion pixels in the window;
reflects the local aggregation degree of corrosion pixel, the threshold of
are the empirical values obtained from many experiments;
is the pixel value of the rust point in the processed image;
is the output of SVM; and
,
,
, and
T = 0.15 in this paper.
2.3. Cleaning Performance Prediction Using Particle Swarm Optimization-Support Vector Machine (PSO-SVM)
Laser cleaning is related to the thermal effect. The phase transformation, the deposition of materials, the uncertainty of corrosion distribution, the laser parameters, and the laser working path will affect the cleaning procedure and result. In this study, an SVM [
21] is considered to search for suitable laser process parameters under complex working conditions [
22]. In the training stage, a variety of image features and laser parameters are used as the input vector, and the qualified or unqualified evaluation result is regarded as the SVM output. Without loss of generality, the input features of SVM include the GLCM features, the concave-convex features, and the laser parameters. The energy, entropy, contrast, and correlation features of the GLCM at 0°, 45°, 90°, and 135° are computed [
23]. An effective image concavity feature is used to describe the rust holes or burrs on the workpiece. The laser processing parameters include the power, linear velocity, and line spacing. linear velocity. The laser is scanned on the metal surface, and a series of laser pulse spots get a continuous linear region. Linear velocity and line spacing are used to describe the process.
Table 1 shows the SVM training data list. In this paper, the laser parameters are not randomly generated; they are selected from the laser parameter candidate table randomly, which contains empirical information. In fact, a commonly used parameter list is accumulated according to our past engineering practice. We only pick the parameters from this list randomly. Therefore, the applied process parameters are safe for our application. Finally, the appropriate laser parameters can be generated by the trained SVM.
In general, two methods are utilized to tune the SVM parameters, including the manual adjustment method and the intelligent optimization algorithm. The manual parameter adjustment method uses the research experience of humans to control the parameters, while the intelligent optimization algorithm can realize automatic parameter setting. The PSO method can simulate the swarm behaviors of insects, herds of animals, birds and fish. These groups search for food cooperatively. Each member of the swarm changes its search mode by learning its own experience and other members’ experiences. A PSO-SVM model is proposed in this paper, and its processing steps are shown as follows.
(1) The training and test sample sets are accumulated. In this paper, there are 120 training samples; each sample contains an input feature vector and a cleaning performance evaluation tag. The input vector has 20 dimensional features, which include the laser process parameters and some image features. The output data are the binary evaluation result of laser cleaning.
(2) The kernel function is selected for the SVM. The radial basis function (RBF) kernel function is utilized in this system.
(3) The PSO algorithm is used to optimize the SVM parameters. The particle swarm optimization algorithm searches the penalty factor c and the kernel parameter g of SVM. The computational steps of the PSO-based parameter optimization are shown as follows:
Step 1: The maximum number of iteration steps is set;
Step 2: The initial positions, velocities, and the value range of the penalty coefficient c and the kernel parameter g are set;
Step 3: The fitness values of the particles are calculated;
Step 4: The individual extremum and population extremum are updated according to the particle fitness values;
Step 5: The termination condition, i.e., the maximum iteration number, is evaluated. If the termination condition is not satisfied, the particle velocities and positions are updated, and the computation jumps to step 2. The update method is shown in Equations (6) and (7); otherwise, the algorithm goes to step 6.
where
and
are the velocities and positions of the particles, rand() is a 0–1 random number, and
t is the number of iterations.
and
are the historical optimal positions of individuals and groups, respectively.
Step 6: The optimization parameters of the particles are assigned to the SVM.