## 3 Profile Fitting and Geometric Modeling
### Measurement System Camera Calibration  
In this paper, the coplanar linear calibration method is used to solve the hidden parameter matrix \(\mathbf{M}\) of the transformation from the world coordinate system to the image coordinate system; the schematic diagram is shown in step A of Figure 4. The details can be seen in the literature [19]. If the pixel coordinates of the maximum sidewall fusion width feature point A and B are \((u_{1},v_{1})\) and \((u_{2},v_{2})\), respectively, the calculation process of the maximum sidewall melting width \(B_{w}\) is as follows:  
* Establish the internal and external parameter model of the camera. Equation (1) is the in-camera parameter model, which is used to describe the conversion relationship between the image coordinate \( \begin{bmatrix}u&v\end{bmatrix} ^{T}\) and the camera coordinate \( \begin{bmatrix}x_{c}&y_{c}&z_{c}\end{bmatrix} ^{T}\). Where \(k_{u}=f/d_{x}\), \(k_{v}=f/d_{y}\), \(f\) is the focal length, \((u^{\prime},v^{\prime})\) is the camera main point coordinates, \(d_{x},d_{y}\) are the physical dimensions of the two coordinate axis directions in the image plane. \[z_{c} \begin{bmatrix}u\\ v\\ 1\end{bmatrix} = \begin{bmatrix}k_{u}&0&u^{\prime}\\ 0&k_{v}&v^{\prime}\\ 0&0&1\end{bmatrix}\begin{bmatrix}x_{c}\\ y_{c}\\ z_{c}\end{bmatrix} , \tag{1}\]  
Equation (2) is an off-camera parameter model, which describes the conversion relationship between camera coordinates and world coordinates \( \begin{bmatrix}x_{w}&y_{w}&z_{w}\end{bmatrix} ^{T}\), where \(\mathbf{R}\) and \(\mathbf{T}\) are the rotation matrix and translation matrix in the world coordinate system relative to the camera coordinate system. \[ \begin{bmatrix}x_{c}\\ y_{c}\\ z_{c}\\ 1\end{bmatrix} =\begin{bmatrix} \begin{bmatrix}R&x&x&x&x&x\\ n_{y}&o_{y}&o_{y}&o_{y}&y\\ n_{z}&o_{z}&a_{z}&p_{z}\\ 0&0&0&1\end{bmatrix}\begin{bmatrix}x_{w}\\ y_{w}\\ z_{w}\\ 1\end{bmatrix} , \tag{2}\]Let the calibration plate and weld specimen be coplanar, the world coordinate system is established on the calibration plate; at this time \(z_{w}=0\), so the Formula (2) will be simplified by substituting into Formula (1) to obtain, this time: \[\left\{ \begin{array}{l}z_{c}u=m_{1}x_{w}+m_{2}y_{w}+m_{3}\\ z_{c}v=m_{4}x_{w}+m_{5}y_{w}+m_{6}\\ z_{c}=m_{7}x_{w}+m_{8}y_{w}+m_{9}\end{array} \right.,\] (3) \(m_{9}=p_{z}\
eq 0\), so eliminating \(z_{c}\) and dividing by \(m_{9}\), we obtain \[\underbrace{ \begin{bmatrix}u\\ v\end{bmatrix} }_{B}=\underbrace{ \begin{bmatrix}x_{w}&y_{w}&1&0&0&0&0&-ux_{w}&-uy_{ w}\\ 0&0&0&x_{w}&y_{w}&1&-vx_{w}&-vy_{w}\end{bmatrix} }_{A}\underbrace{ \begin{bmatrix}m^{ \prime}_{1}\\.\\.\\ m^{\prime}_{8}\end{bmatrix} }_{M},\] (4)
* The Harris corner point extraction method [20] was used to obtain the calibration plate corner points with known world and pixel coordinates, which were used to calculate the hidden parameter matrix \(M\). \[\boldsymbol{M}=\left(\boldsymbol{A}^{T}\boldsymbol{A}\right)^{-1}\boldsymbol {A}^{T}\boldsymbol{\cdot}\boldsymbol{B},\] (5)
* From Equations (3) and (4), the transformation relationship between the feature point image coordinate system and the world coordinate system can be obtained as \[\underbrace{ \begin{bmatrix}m^{\prime}_{1}-um^{\prime}_{7}&m^{\prime}_{2}-um^{ \prime}_{8}\\ m^{\prime}_{4}-vm^{\prime}_{7}&m^{\prime}_{5}-vm^{\prime}_{8}\end{bmatrix} }_{ C}\underbrace{ \begin{bmatrix}x_{w}\\ y_{w}\end{bmatrix} }_{D}=\underbrace{ \begin{bmatrix}u-m^{\prime}_{3}\\ v-m^{\prime}_{6}\end{bmatrix} }_{D},\] (6)
* The world coordinates of the feature point are \[ \begin{bmatrix}x_{w}\\ y_{w}\end{bmatrix} =\left(\boldsymbol{C}^{T}\boldsymbol{C}\right)^{-1} \boldsymbol{C}^{T}\boldsymbol{\cdot}\boldsymbol{D},\] (7)
* Substituting the pixel coordinates of the points A and B into Equation (7), we obtain their world coordinates as \[B_{w}=\sqrt{\left(x_{w1}-x_{w2}\right)^{2}+\left(y_{w1}-y_{w2}\right)^{2}},\] (8)  
To verify the performance of the method, the influence of the number of corner points of the calibration plate on the measurement results was investigated.