# Research on Rapid and Accurate 3D Reconstruction Algorithms Based on Multi-View Images
## 3 Materials and Methods  
Smartphones were used in this study to capture immersive multi-view images of campus status for three-dimensional reconstruction. By analyzing the imaging principles of objects and the camera's imaging model, the aim is to extract the corresponding back-projected three-dimensional coordinate points from the two-dimensional pixel points in the images, thus achieving three-dimensional reconstruction. The specific camera imaging model is illustrated in Figure 1.  
Figure 1: Coordinate systems of the pinhole camera model: (**a**) camera coordinate system; (**b**) image coordinate system; (**c**) pixel coordinate system. Figure 1a depicts the transformation between world and camera coordinate systems. The world coordinate system refers to the coordinate system in the real world, measured in arbitrary units m where any point and its coordinates are represented as \(P_{W}=(X_{W},Y_{W},Z_{W})^{T}\). The camera coordinate system is a right-handed coordinate system, where the imaging device aperture O is the origin. Its Z-axis typically aligns with the camera's optical axis (perpendicular to the imaging plane) and also uses arbitrary units mm, where any point and its coordinates are represented as \(P_{\text{C}}=(X_{C},Y_{\text{C}},Z_{\text{C}})^{T}\). Both coordinate systems occupy the same space and represent rigid transformations with different positions and orientations. Therefore, only rotation R and translation T operations are necessary for completing the transformation, as indicated in the following equation:  
\[ \begin{bmatrix}X_{\text{C}}\\ Y_{\text{C}}\\ Z_{\text{C}}\\ 1\end{bmatrix} = \begin{bmatrix}R&T\\ 0&1\end{bmatrix}\begin{bmatrix}X_{W}\\ Y_{W}\\ Z_{W}\\ 1\end{bmatrix}\begin{bmatrix}R:\begin{bmatrix}r_{11}&r_{12}&r_{13}\\ r_{21}&r_{22}&r_{23}\\ r_{31}&r_{32}&r_{33}\end{bmatrix}\\ T:\begin{bmatrix}t_{11}&t_{12}&t_{13}\end{bmatrix}^{T}\end{bmatrix}  \tag{1}\]  
Figure 1b illustrates the transformation from the camera coordinate system to the image coordinate system. The latter resides on the camera's imaging plane as a two-dimensional coordinate system. Its origin is at the center of the virtual imaging plane. The units are represented as mm, and the system effectively uses physical dimensions to describe pixel positions. All the point coordinates on this system can be expressed as \(p=(x,y)^{T}\). The relationship from the camera coordinate system to the image coordinate system exemplifies perspective projection, signifying the conversion from 3D to 2D, as detailed in the following equation:  
\[Z_{\text{C}} \begin{bmatrix}x\\ y\\ 1\end{bmatrix} = \begin{bmatrix}f&0&0&0\\ 0&f&0&0\\ 0&0&1&0\end{bmatrix}\begin{bmatrix}X_{\text{C}}\\ Y_{\text{C}}\\ Z_{\text{C}}\\ 1\end{bmatrix}  \tag{2}\]  
Figure 1c illustrates the transformation from the image coordinate system to the pixel coordinate system. The latter represents a two-dimensional grid on a digital image, typically with the origin located at the top-left corner measured in pixels. Scaling and translation exist between the physical image and pixel plane coordinate systems. For any point with coordinates \(p=(u,v)^{T}\), both coordinate systems reside on the imaging plane, differing only in their respective origins and measurement units, as detailed in the following equation:  
\[ \begin{bmatrix}u\\ v\\ 1\end{bmatrix} = \begin{bmatrix}1/dx&0&u_{0}\\ 0&1/dy&v_{0}\\ 0&0&1\end{bmatrix}\begin{bmatrix}x\\ y\\ 1\end{bmatrix}  \tag{3}\]  
\(1/dx\) and \(1/dy\) represent the number of pixels contained within a unit length of 0.001 m in the horizontal and vertical directions, respectively. By integrating the aforementioned steps, one can derive the comprehensive transformation formula from the world coordinate system to the image coordinate system:  
\[ \begin{bmatrix}x\\ y\\ 1\end{bmatrix} = \begin{bmatrix}f_{x}&0&u_{0}&0\\ 0&f_{y}&v_{0}&0\\ 0&0&1&0\end{bmatrix}\begin{bmatrix}R&T\\ 0&1\end{bmatrix}\begin{bmatrix}X_{W}\\ Y_{W}\\ Z_{W}\\ 1\end{bmatrix}