## 4 Experimental Verification and Analysis
### Analysis of Experimental Results
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **A11** & **A12** & **Tx** & **A21** & **A22** & **Ty** \\ \hline Linear Fitting & & & \(Y=A+B\times X\) & & & \\ Plot & A11 values & A12 Values & \(\overset{R}{C}\) values & A21 Values & A22 Values & \(\overset{R}{C}\) values \\ Weight & & & No Weighting & & & \\ Intercept & \(-0.00561\) & \(0.70041\) & \(-1748.81438\) & \(0.69845\) & \(0.005\) & \(682.24144\) \\  & \(\pm 2.8386\times 10^{-4}\) & \(\pm 3.91838\times 10^{-4}\) & \(\pm 0.28725\) & \(\pm 2.05966\times 10^{-4}\) & \(\pm 3.34172\times 10^{-4}\) & \(\pm 0.62448\) \\ Slope & \(1.16124\times 10^{-5}\) & \(-2.09597\times 10^{-4}\) & \(0.35111\) & \(-1.96476\times 10^{-4}\) & \(-1.13693\times 10^{-5}\) & \(0.54652\) \\  & \(\pm 4.06162\times 10^{-6}\) & \(\pm 5.60664\times 10^{-6}\) & \(\pm 0.00411\) & \(\pm 2.94707\times 10^{-6}\) & \(\pm 4.78151\times 10^{-6}\) & \(\pm 0.00894\) \\ Residual Sum & \(7.12351\times 10^{-7}\) & \(1.35738\times 10^{-6}\) & \(0.72949\) & \(3.75039\times 10^{-7}\) & \(9.87247\times 10^{-7}\) & \(3.44764\) \\ of Squares & \(0.75941\) & \(-0.99787\) & \(0.99959\) & \(-0.99933\) & \(-0.69652\) & \(0.9992\) \\ Pears\(\overset{R}{C}\) & \(0.5767\) & \(0.99574\) & \(0.99918\) & \(0.99865\) & \(0.48515\) & \(0.9984\) \\ Adj.R\(-\)Square & \(0.50615\) & \(0.99503\) & \(0.99904\) & \(0.99843\) & \(0.39934\) & \(0.99813\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Rigid transform matrix parameters fitting table. As can be seen from Figure 4  
\[\frac{f}{H^{\prime}}=\frac{u}{W} \tag{12}\]  
when the focal length and position of the camera are fixed, the greater the height of the workpiece, the smaller the distance \(H^{\prime}\) between the optical center of the camera and the upper surface of the workpiece, and the smaller the field of view of the camera. The equation is  
\[W=\frac{\mu H^{\prime}}{f} \tag{13}\]  
Set the resolution of the camera as \(M\times n\). If \(M>N\), the calculation formula of PPI is  
\[Pr=\frac{m}{W}=\frac{fm}{\mu H^{\prime}} \tag{14}\]  
Visible pixel density \(Pr\) is inversely proportional to the distance \(H^{\prime}\) between the optical center of the camera and the upper surface of the workpiece and is directly proportional to the height h of the workpiece. From Figure 11 and Table 3, the corresponding relationship is established to calculate the corresponding length pixel ratio (\(Pr\_I\)) and width pixel ratio (\(Pr\_w\)), as shown in Equation (15). Where \(I1\) and \(I2\) are the length dimensions of the image, \(w1\) and \(w2\) are the width dimensions of the image, and \(1\) and \(W\) are the workpiece dimensions. \[\left\{ \begin{array}{l}l=X_{C}D-X_{C}A\\ l=X_{C}C-X_{C}B\\ w1=Y_{C}B-Y_{C}A\\ w2=Y_{C}C-Y_{C}D\\ P_{r}\_l=\frac{I1+I2}{2L}\\ P_{r}\_w=\frac{w1+w2}{2W}\end{array} \right. \tag{15}\]  
The table of pixel ratio relationship under the height of Equation (15) is shown in Table 6.  
Through Table 6, we fit the relationship between the length-width pixel ratio and the workpiece height, as well as the correlation coefficient, as shown in Figure 13. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Height (mm)** & **Workpiece Size (mm)** & **Image Size (Pixel)** & **Length Pixel Ratio (\(Pr\_I\))** & **Width Pixel Ratio (\(Pr\_w\))** \\ \hline
15 & & 2865 \(\times\) 1724 & 1.432374 & 1.437484 \\ \hline
30 & & 2879 \(\times\) 1734 & 1.439345 & 1.444716 \\ \hline
45 & & 2896 \(\times\) 1740 & 1.447762 & 1.45003 \\ \hline
55 & & 2906 \(\times\) 1746 & 1.452295 & 1.454739 \\ \hline
75 & & 2920 \(\times\) 1755 & 1.460094 & 1.46255 \\ \hline
85 & & 2929 \(\times\) 1760 & 1.464606 & 1.466992 \\ \hline
95 & & 2937 \(\times\) 1765 & 1.4685 & 1.470833 \\ \hline
105 & & 2945 \(\times\) 1770 & 1.4727 & 1.475282 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Length and width pixel ratio at different heights. As shown in Figure 13. It can be seen that the fitting data in the length direction and the fitting data in the width direction are basically the same, but there is also a deviation. Ideally, it should be a straight line.