## 4 Method
### Calibration of Installation Error of Triangular Plate
The optimization requires multiple 3D scans, because it is necessary to eliminate the interference of random factors, so that the actual value of angle \(\alpha\) can be estimated more accurately. We did 50 repeated scans in the highest resolution mode (mode 7, see Table 1) according to the method described in Figure 7, and used these 50 3D point clouds \(\mathbf{C}_{O}\) as the input of the optimization algorithm, that is, \(\left\{\mathbf{C}_{O}^{1},\mathbf{C}_{O}^{2},\mathbf{C}_{O}^{3},\ldots,\mathbf{C}_{O}^{50}\right\}\). The optimized value of angle \(\alpha\) is the output of the algorithm. The reason why mode 7 is used is that in lower resolution mode (such as mode 1), the points in point cloud \(\mathbf{C}_{\text{tri}}\) are sparser, so that the error of the 3D coordinate of the center point \(\mathbf{c}\) is bigger. The inaccuracy of point \(\mathbf{c}\) leads to the inaccuracy of angle \(\beta\). Since the value of the angle \(\alpha\) is constant, through Equation (10) we can know that the angle \(\varphi_{\text{offset}}\) inherits the inaccuracy of the angle \(\beta\), which ultimately leads to the inaccuracy of the attitude of point cloud \(\mathbf{C}_{O}\), as shown in Equations (8) and (9). Although the attitude of point cloud \(\mathbf{C}_{O}\) has been corrected, there are still residual errors remaining. One stems from the above-mentioned inaccuracy of point \(\mathbf{c}\), which is particularly obvious in low-resolution mode. The other stems from the constant error of the angle \(\alpha\) caused by the installation error, which depends on the accuracy of the installation and has nothing to do with the scanning mode. In low-resolution mode, the former is the main factor. The phenomenon is that the attitude of point cloud \(\mathbf{C}_{O}\) obtained from several 3D scans is slightly different. In the high-resolution mode, the latter is the main factor. The phenomenon is that the attitude of the point cloud \(\mathbf{C}_{O}\) obtained from several 3D scans is almost the same, but there is a constant difference between the attitude of point cloud \(\mathbf{C}_{O}\) and the correct attitude. Here we focus on the latter, and calibrate the installation error of the triangular plate. Therefore, we use the highest resolution mode to collect data as the input of our optimization algorithm, for the purpose of avoiding the above-mentioned first type of error as much as possible, that is, the error caused by low resolution. In our optimization algorithm, we use the Levenberg-Marquardt method [32; 33] to estimate the angle \(\alpha\). Because the initial value and the final optimization result are very close (the installation error is generally small), the initial value is set as \(\alpha_{0}=30^{\circ}\). Our optimization algorithm is shown in Algorithm A1, which is in Appendix C.  
By Algorithm A1, we can estimate the value of angle \(\alpha\), \(\alpha=29.3598^{\circ}\). In Equation (10) for the calculation of \(\varphi_{\text{offset}}\), the value of angle \(\alpha\) is replaced from the expected value of \(30^{\circ}\) to the value estimated by Algorithm A1. Until now, we can accurately calculate the angle \(\varphi_{\text{offset}}\) between point cloud \(\mathbf{C}_{O^{\prime}}\) relative to coordinate frame \(O^{\prime}\) and point cloud \(\mathbf{C}_{O}\) relative to coordinate frame \(O\). Since point cloud \(\mathbf{C}_{O^{\prime}}\) and angle \(\varphi_{\text{offset}}\) are both known, point cloud \(\mathbf{C}_{O}\) can be calculated according to Equations (8) and (9). It is accurate both in shape or attitude. Summarizing our method, in Sections 2 and 3, we obtained the 3D point cloud \(\mathbf{C}_{O^{\prime}}\), which has an uncertain attitude error, but no shape error. In Section 4.1, we calibrated the uncertain attitude error of the point cloud \(\mathbf{C}_{O^{\prime}}\) by using a triangular plate. In Section 4.2, we corrected the installation error of the triangular plate. Through the above steps, we can use our prototype to obtain a 3D point cloud with correct shape and attitude.