# Image Segmentation Approaches for Weld Pool Monitoring during Robotic Arc Welding
## 4 Analysis of the Combination Approach  
In Reference [23], a combination approach is proposed to segment the reflected laser lines as accurate as possible. The flowchart of this segmentation approach comprises a difference operation, a two-dimensional spline fitting enhancement operation, a gradient feature detection filter and the slope difference distribution-based threshold selection. However, the reasons why the segmentation approach should contain these image processing algorithms were not explained adequately in Reference [23]. Quantitative results to validate the effectiveness of this segmentation approach were also not given. Here, we will theoretically explain why the proposed two-dimensional spline fitting enhancement method and the gradient feature detection filter work well in segmenting the laser lines. The intensity distribution, \(I_{a}\) of the captured image caused by the arc light could be modeled mathematically by the following equation [21]:  
\[I_{a}(T)=\tau\left|\frac{2 hv^{3}}{c^{2}}\times\frac{\overset{\rightarrow}{N} \times cos\beta\times O}{e^{\frac{hv}{T}}-1}\right|\times\frac{d}{r^{3}}=\frac {C_{a}(T)}{r^{3}}, \tag{4}\]  
Figure 2: Evaluation of state of the art methods (**a**) one typical captured image; (**b**) segmentation result by the top hat method; (**c**) segmentation result by the FFT method; (**d**) segmentation result by the difference method; (**e**) segmentation result by the GLCM method; (**f**) segmentation result by combination method. where \(\tau\) is the intensity mapping function of the CCD camera [27]. \(\overset{\rightarrow}{N}\) is the surface normal at position \(p\). \(\beta\) is the angle between the surface normal and the incident light. \(O\) denotes the color value. \(r\) is the distance between the arc light center and position \(p\). \(d\) is the distance from the arc light center to the diffusive imaging plane \(P1\). \(v\) is the spectral frequency of arc light and \(h\) is the planck's constant. \(c\) is the speed of the light and \(\gamma\) is the boltzmann's constant. \(T\) is the temperature of arc light source, which is determined by the welding current that alternates with the frequency of 10 Hz. The frame rate of the camera C2 is set to 300 frames per second during the experiment. Hence, 30 images are captured with different sampled currents at one period of the current wave. The temperature \(T\) is determined by the value of the current and thus it changes with the current from frame to frame in the time domain. In the same frame, the temperature \(T\) is a constant. At each image point, both the intensity mapping function \(\tau\) and the angle \(\alpha\) remain the same in all the captured image sequences. Thus, \(C^{a}\) is a constant at each specific image point in one frame and it varies from frame to frame with the value of \(T\). From Equation (4), it becomes much obvious that the intensity distribution produced by the arc light effect on the captured image is inversely proportional to the \(r^{3}\). Thus, the intensity distribution caused by the arc light can be modeled as:  
\[a(x,y)=\frac{C_{a}(T)}{\left[\left(x-x_{0}\right)^{2}+\left(y-y_{0}\right)^{2} +d^{2}\right]^{3/2}}, \tag{5}\]  
where \((x_{0},y_{0})\) denotes the center of arc light distribution and it may lie outside of the image. The arc light is affected by the additional laser line and can be modeled as:  
\[f(x,y)=l(x,y)+a(x,y), \tag{6}\]  
where \(l(x,y)\) denotes the intensity distribution of the laser line and it is formulated as:  
\[l(x,y)=\left\{ \begin{array}{ll}w\mu(x,y);&(x,y)\in A\\ 0;&(x,y)\
otin A\end{array} \right., \tag{7}\]  
where A denotes the laser line area, \(w\) is a constant whose value is higher than the average value of the arc light distribution, \(l_{a}\). \(\mu(x,y)\) is the membership function that represents the fuzziness of the laser line and is formulated as:  
\[\mu(x,y)=Exp\left(-\frac{\left(L(x,y)-\mu_{L}\right)^{2}}{2{\sigma_{L}}^{2}} \right), \tag{8}\]  
where \(L(x,y)\) denotes the ideal intensity distribution of the laser line.