# Dense Robust 3D Reconstruction and Measurement for 3D Printing Process Based on Vision
## 5 Comparison and Analysis of 3D Reconstruction Experiments in 3D Printing Process
### Accuracy Analysis of 3D Reconstruction Results  
In order to ensure that the entire reconstruction system has a certain application value, this paper designed the following experiment to estimate the accuracy. In this reconstruction system, the accuracy of reconstruction can be estimated by the known parameters in the system. In order to facilitate calculation, the code of the reconstruction system is adjusted when the accuracy is measured, and the following operations are carried out. 1. When photographing the target object from the front, the distance between the measuring camera and the target object is \(d\). 2. Set the front-shot image as the standard view angle, set the translation vector of the perspective as 0, and set its rotation matrix as the unit matrix. After the above processing, the origin of the perspective will be aligned with the origin of the world coordinate system. 3. In the subsequent reconstruction process, \(V_{1}\) was always taken as the basic view angle and the dual-view reconstruction is carried out. In the subsequent optimization of the beam adjustment method, the external parameters of the camera are not changed. Finally, after the reconstruction is completed, check in the open source point cloud computing project MashLab, 3D points of patch of 50 * 50 size reconstructed from the marked \(V_{1}\) perspective are selected, and the depth of these points is averaged, denoted as \(z\). In theory, a scale mapping relationship between the reconstructed point cloud and the actual object is \(r\) = d/z. However, due to the existence of reprojection error, this equation is not valid. When the reprojection error is \(e\), it will lead to the reconstruction point cloud error is \(\sigma\). When the distance \(d\) between the camera and the object to be measured is known, the relationship \(c\) between the pixel and the actual distance can be calculated. According to the similarity principle of triangles, the following formula can be obtained:  
\[\frac{e}{c\cdot\sigma}=\frac{f}{d} \tag{18}\]  
The theoretical error can be obtained from the above equation:  
\[\sigma=\frac{e\cdot d}{c\cdot f} \tag{19}\]  
The accuracy calculation formula is applied to the reconstruction system. In the formula, \(d\) is 156 mm after repeatedly measurements, and its error is \(\pm\)5 mm. By photographing the grid reference platform, \(c\) is 53.55 pixels/mm, the average reprojection error \(e\) is 0.61, and \(f\) is 4.5013 mm. Finally, the theoretical error of this system can be obtained as [0.4074, 0.3821] mm. Figure 12: Sparse reconstruction results based on comprehensive SFM: (a) sparse reconstruction results of image set 1; and (b) sparse reconstruction results of image set 2. In order to verify the accuracy of the above calculation, the ordinary printing platform is replaced with a customized checkerboard printing platform, and the checkerboard grid spacing is fixed. The standard cube is placed on the chessboard. When the first picture is taken, the camera is pointed directly at the cube. The measured shooting distance is 156 mm, and the rest are taken normally. The cube objects are reconstructed together with the checkerboard printing platform, and finally the reconstructed model is input to MashLab for measurement. The fragments of the collected image set are shown in Figure 13.  
Figure 14 shows the results of model reconstruction and measurement. The corresponding scale relationship is found through the grid chessboard and the reconstructed grid chessboard. Since the distance of the grid of the chessboard printing platform is known, and the side length of each chessboard is 10 mm, it could be obtained that \(M_{3}=1.15011\) and the reconstructed size is 30.00 mm, and the scale coefficient \(r=26.084\) containing reprojection error could be obtained.