# Feature Point Identification in Filtel Weld Joints Using an Improved CPDA Method
## 3 Feature Points Extraction Method in Fillet Welding
### Laser Stripe Center Extraction Using a Gaussian-Weighted PCA Method  
As shown in Figure 1c, because more than one pixel of the CCD camera received the metal-reflected light, the laser stripe has a center width. It is of high importance to identify the center laser stripe from the image, which will directly affect the accuracy of three-dimension reconstruction. There are demanding requirements for accuracy and stability for methods to extract the center line and identify feature points in robotic welding applications. Laser stripe center line extraction methods can be mainly divided into three types: grayscale-based peak-value and/or gravity method [33], model-based curve fitting method, and Hessian-matrix-based Steger method [26]. When the laser fringe is mainly distributed in the vertical direction in the image, the center pixel-coordinates of the laser stripe can be obtained as the grayscale gravity center [33] by extracting the grayscale distribution along the horizontal and vertical directions, respectively, using Equation (3):  
\[\left\{ \begin{array}{l}x_{c}=\sum\limits_{i=1}^{N}u_{i}\cdot f(u_{i},v)/ \sum\limits_{i=1}^{N}f(u_{i},v)\\ y_{c}=\sum\limits_{j=1}^{M}v_{j}\cdot f(u,v_{j})/\sum\limits_{j=1}^{M}f(u,v_{ j})\end{array} \right. \tag{3}\]  
where, (\(x_{c}\), \(y_{c}\)) are the coordinates of the center line. (\(u\), \(v\)) are the image coordinates for column and row in the range of \([1,N]\) and \([1,M]\), respectively. \(f(u,v)\) is the grayscale value for each pixel in (\(u\), \(v\)). (\(i,j\)) are indexes used for calculating the gravity from left to right and top to bottom within the image, respectively. However, as depicted in Figure 1c for the fillet welding application, the laser stripe is distributed at a significant angle with respect to the horizontal or vertical direction. Consequently, the obtained laser line centers exhibit higher errors. The Hessian-matrix-based method [26] has robust noise resistance and can maintain high center line extraction accuracy in complex environments. Nevertheless, it requires five large-scale Gaussian convolutions and second-order Taylor expansions, as formulated in Equation (4). These operations are in high computational complexity and cannot be implemented in real time. \[\mathbf{H}(x,y)=\left[ \begin{matrix}\partial^{2}G(x,y)/\partial x^{2}&\partial ^{2}G(x,y)/\partial x\partial y\\ \partial^{2}G(x,y)/\partial y\partial x&\partial^{2}G(x,y)/\partial y^{2} \end{matrix} \right]\otimes f(x,y) \tag{4}\]  
where \(\mathbf{H}(x,y)\) in Equation (4) is the Hessian matrix that related to the Gaussian kernel \(G(x,\)\(y)\) and grayscale image \(f(x,y)\). \(\otimes\) is the convolution operator. To improve accuracy and optimize the extraction speed for fillet welding with an inclined laser stripe, a Gaussian-weighted PCA (principal component analysis)-based algorithm is proposed in this paper. For a given laser stripe coordinate set (\(\mathbf{g}_{x}\), \(\mathbf{g}_{y}\)) in \(x\) and \(y\) directions, respectively, a covariance matrix [\(\mathbf{C}\)] can be computed using Equations (5)-(7):  
\[[\mathbf{C}]=\left[\begin{matrix}\text{cov}(\mathbf{g}_{  
\[\overline{g}=\frac{1}{N}\sum_{n=1}^{N}g_{n} \tag{7}\]  
From Equation (5), the eigenvalue (\(\lambda_{1}\), \(\lambda_{2}\)) can be determined in descending order, along with the corresponding eigenvectors (\(\mathbf{v}_{1}\), \(\mathbf{v}_{2}\)) that represent the direction of the laser stripe. This determination is accomplished using the singular-value-decomposition method [34]. The inclined laser stripe can then be transformed into the PCA coordinate system using transformation matrix [\(\mathbf{A}\)] as defined in Equation (8). This transformation allows for the retrieval of the center line of the laser stripe through a zero-mean Gaussian-weighted convolution in Equation (9). \[ \begin{bmatrix}\mathbf{P}_{x}\\ \mathbf{P}_{y}\end{bmatrix} = \begin{bmatrix}\mathbf{A}\end{bmatrix}\begin{bmatrix} \mathbf{g}_{x}-\overline{g}_{x}\\ \mathbf{g}_{y}-\overline{g}_{y}\end{bmatrix} \text{ where }[\mathbf{A}]=