Outdoors the noise caused by sunlight has a distinguishing characteristic: the values of the R, G and B components are nearly equal. Sometimes the needed information of the image may not show clearly in RGB color space. Therefore, transforming the color space to a monochromatic value space may be helpful to highlight the characteristics of the laser and conveniently segment the stripe. In the paper, a linear transformation is used to obtain a monochromatic value image from RGB images.
3.1. Preprocessing Based on Monochromatic Value Space
In a discrete color image
cij (with a size of
), color values of a pixel are given as three corresponding tristimulus
Rij,
Gij, and
Bij. The linear transformation is defined as Equation (8):
In the Equation (8), Iij is the desired monochromatic value image, and , , ωr, ωg, and ωb R. In order to segment the stripe the characteristics of laser should be take into consideration. An objective function needs defining to search the optimal ωr, ωg, and ωb.
Owing to the concentration and the strong brightness of the laser beam, one of the remarkable characteristics of laser is the high concentration of energy, which makes the stripe show a waveform with a few spikes (as shown in
Figure 6b, a laser profile example, which is obtained through showing all the image row vectors). It means that the contrast between the laser stripe and background is high. The objective function should retain and enhance the feature so that it will become much easier to segment the laser stripe after transformation. Thus, the contrast can be used to construct the objective function. In
Figure 6a, intensity values of the pixels within the laser stripe are close to their average. In these areas, the greater the energy concentration is, the higher the contrast will be and the higher the Kurtosis will be. Therefore, it is reasonable to define the contrast as kurtosis:
In the Equation (9), kurtosis K is defined as the ratio of fourth-order cumulant (FOC) κ4 to square of the second-order cumulant (SOC) . and are respectively the fourth central moment and the standard deviation of the energy distribution of the laser.
Figure 6.
Example of laser profiles. (a) Captured image including the cross lasers stripe on the weld line; (b) Superposition of the luminance values row by row.
Figure 6.
Example of laser profiles. (a) Captured image including the cross lasers stripe on the weld line; (b) Superposition of the luminance values row by row.
The transformation result of the stripe is expected to be an impulse-like signal which is orderly and furnished with high kurtosis. The background is of great disorder and low kurtosis. For instance, in a communication system, disorder is equivalent to the concept of entropy. There is a positive correlation between the entropy and the random nature of information. For this reason, Wiggins [
33] first presented the minimum entropy deconvolution technique. He proposed to maximize a norm function called the Varimax Norm, which is equivalent to maximized kurtosis with assumed zero-mean [
34]. The transformation model can be named as minimum entropy model. When
K < 0, the Equation (9) can be modified as the Equation (10):
Thereupon, a maximized function of Equation (10) which is differentiable everywhere can be defined as the square of kurtosis, as shown in Equation (11):
If the image is taken as a multi-channel signal (with
N segments and
M elements per segment), the Kurtosis can be written as:
In the Equation (12), μ
j is the mean of column
j in the transform image
Iij. To obtain the solution of the maximizing Equation (12),
K and ω need to satisfy the Equation (13):
Obviously, it is difficult to solve Equation (13), but the maximum value of
K can be approximately calculated according to [
35]. An infinite color feature space set is determined by the continuous coefficients in Equation (8). ω
r, ω
g, and ω
b can be learned from training data by the maximum likelihood estimation or the maximum posteriori estimation. For the convenience of calculation, ω
r, ω
g, and ω
b are discretized as integers, and their value range is limited in [−2, 2]. Then Equation (13) is solved by the exhaustion method. Considering that red laser light is used in the experiments, the
R component of the captured image has higher intensity, so it is reasonable to define ω
r ≥ 0, that is, ω
r {0, 1, 2}, ω
g, ω
b {−2, −1, 0, 1, 2}, (ω
r, ω
g, ω
b) ≠ (0, 0, 0). Then, the parameters can be solved by the traversal method.
Figure 7.
The color transport result: (a) captured image; (b) R component; (c) Grayscale;(d) the monochromatic value of R-G.
Figure 7.
The color transport result: (a) captured image; (b) R component; (c) Grayscale;(d) the monochromatic value of R-G.
In
Figure 7, the optimal coefficient vector of the monochromatic value image is (ω
r, ω
g, ω
b) = (1, −1, 0), and the monochromatic value space is
R-G. Compared with the color value
R of the stripe and grayscale (
i.e., (ω
r, ω
g, ω
b) = (0.30, 0.59, 0.11)) of the original image,
R-G is more effective in suppressing noise and improving the SNR. On the one hand, it distinguishes the laser from the background more efficiently. On the other hand, it has much smaller amount of data (one-third of
Figure 7a) than that of the original image.
3.2. Stripe Segmentation Based on Minimum Entropy Deconvolution(MED)
Ideally, the horizontal (and vertical) illumination distributions of stripes are independent, and their intensity conforms to a Gaussian distribution. When the laser projects onto the surface of an object, the distribution form will not change, but the stripe will deform with the change of the object surface geometrical shape. In an ideal situation, the laser peaks are in the center of the stripe composed of the intensity maximum along each column (or row). The laser stripe can be segmented only according to the peaks. However, in real environments, captured images contain various noises such as laser speckle, ambient noise, electrical noise, quantization noise, energy diffusion and excessive saturation [
23]. Because of these noises, it is difficult to produce reliable stripe centers by simply calculating the maximum intensity along each profile of the laser stripe. The laser intensity does not always conform to Gaussian distribution and the maximum-valued locations of some columns (or rows) may not be in the center of the stripe. In
Figure 8, it shows that some points off the center of stripe replace the stripe’s center points as the maximum points. From the prospect of signal processing, the structure information and the consistency of laser stripe signal are destroyed. Hence some actions should be taken to enhance the energy concentration of the laser stripe to return to their original locations.
Figure 8.
Laser peaks and their locations.
Figure 8.
Laser peaks and their locations.
After an appropriate monochromatic value space is chosen, to improve the image quality, the next step is to reset the peak points (theoretical maximum) back to their original positions. This process can be described as 2D image deconvolution.
Figure 9 shows the algorithmic model [
33,
35,
36].
Figure 9.
The model for 2D deconvolution.
Figure 9.
The model for 2D deconvolution.
It can be generally formulated as:
Because the image is a set of the discrete points, Equations (14) and (15) are described as the following equations:
In the Equations (14)–(17):
S denotes the laser stripe;
H denotes the point spread function of the optical imaging system;
U denotes a noise function;
I denotes the acquired image;
* denotes the 2D convolution operator;
(i, j) is discrete spatial coordinates;
W denotes the finite impulse response (FIR) filter,
W = 0 if
i < 1or
j < 1, and
W*
H = δ
i-Δi,j-Δj, where δ
ij is the Krönecker delta (discrete impulse signal) [
37], and Δ
i, Δ
j are the phase delay;
B denotes the recovered image.
The goal of solving the deconvolution is to find the convolution kernel
W by the maximized kurtosis
K, so that
Bij ≈ α
Si-Δi,j-Δj, in which α is a scale factor.
MED is an effective technique for deconvolving the impulsive sources from a mixture signals. In [
38], an iterative deconvolution approach is proposed. A FIR filter is used to minimize the entropy of the filtered signal,
i.e., it searches for an optimum set of filter coefficients, which can recover the output signal with the maximum value of Kurtosis. This process will eventually enhance energy concentration and the structured information in the output signal [
39,
40,
41], recovering an impulsive signal which will be more consistent than before.
Taking the input image as a multi-channel signal in columns (with
N segments and
M elements per segment) or in rows (with
M segments and
N elements per segment), in the former case, the horizontal component of the laser stripe is largely restored, and meanwhile, the vertical component information is suppressed, and
vice versa. Then the whole recovered information of the laser stripe can be obtained by executing the two operations separately. The model in columns to extract the horizontal laser line can be formulated as:
In Equations (18) and (19), μBj is the mean of column j of Bij, and L is the order of the filter, both of which have significant impact on the MED outputs. The form of objective function can be described by Equation (19).
The above model is similar to Wiggins’ method except for the objective function, and it will not influence the solution procedure. The
MED searches an optimum set of filter
Wk coefficients that recover the output signal with the maximum value of kurtosis. For convenience, the filter can be normalized as:
In accordance with this constraint, it is feasible to conclude that
Iij is converted into
Bij, with its energy preserved and its entropy reduced. The reason can be found through explaining Equation (18) mathematically. In Equation (18), it can be seen that
Bij is obtained by weighting, shifting, overlapping and adding the corresponding components of
Iij (1 <
L <
N). (
i) If
L = 1, the filter has no impact on the output; (
ii) if
L ≥
N, the last
L −
N + 1 elements has no impact on the output; (
iii) it is a well-posed estimation problem because there are fewer parameters than those in [
42]. Generally, the greater
L is, the more easily the kurtosis
K converges to a high value. An appropriate
L should balance kurtosis, the energy and the computation. Therefore, from the prospect of minimal entropy or maximal kurtosis, the criterion is not the optimal but an acceptable result. Gonzalez suggests that the
L value should lie between 50% and 100% of the number of elements per segment [
38]. In our experiments,
L is empirically defined as 50% which satisfy the experiment requirements. The deconvolution model (
Figure 9) of this problem can be described as
Figure 10.
Figure 10.
The MED model of the multichannel signal.
Figure 10.
The MED model of the multichannel signal.
The extremum of Equation (19) is obtained by Equation (21):
An iteratively converging local-maximum solution can be derived as:
where:
and
Wk is iteratively selected. The general procedure is listed in
Table 2.
Table 2.
General Procedure of MED.
Table 2.
General Procedure of MED.
Step | Algorithm |
---|
1 | Initializing the adaptive FIR filter, and setting Wk = [11...1...11]/, K = 0. |
2 | Computing the output signal Bij according to Equation (11). |
3 | Inputting Bij to Equations (22)–(24), Wk is obtained. |
4 | Inputting Bij to Equation (19) to compute kurtosis K and . |
5 | Repeating step 2 and 3 to make sure that a specified number of iterations is achieved and that the change in K between iterations is less than a specified small value. |
Figure 11.
The comparison of energy concentration before and after MED processing. (a) waveform of the input signal in the columns; (b) waveform of the output signal in the columns.
Figure 11.
The comparison of energy concentration before and after MED processing. (a) waveform of the input signal in the columns; (b) waveform of the output signal in the columns.
Figure 11 shows the comparison of energy concentration between the input signal and output signal (deconvolved signal by
MED).
Obviously, after MED processing, SNR is higher and the peaks of laser stripe are much steeper. For the segmentation of the vertical laser stripe, its process is the same as that of the horizontal laser stripe.