## 3 3D Foot Reconstruction Method
### Sparse Reconstruction
#### 3.2.2 Estimating the 3D Coordinates of the Feature Points Pair and Camera Parameters  
At present, only the existing foot photo is a known quantity, that is, only the pixel position (x, y) of the feature point to be measured in multiple images is known. Therefore, the incremental SFM method is used for sparse reconstruction. Using the Zhang's Camera Calibration Method mentioned above to directly solve the camera's internal parameter matrix \(K\), the camera rotation matrix \(R\), the relative translation of the world coordinate t, and the coordinate of the feature point to be measured in the world coordinate system P(X, Y, Z), then the scale factor \(\lambda\) is determined using a reference of a known specification, thereby obtaining the true spatial position coordinates (X, Y, Z) of the feature point.  
As shown in Figure 3 above, ImageJ and ImageJ are randomly selected in multiple images of different angles to determine the initial image pair. The polar geometric constraints of the two views can be described by a 3 \(\times\) 3 matrix, which is called the basic matrix F. F expresses the mapping relationship of the polar line between the point \(X_{1}\) in ImageJ and the point \(X_{2}\) in ImageJ. We can use the 8-points method to find F, and use [PERSON]'s Camera Calibration Method to calculate the initial value \([R\mid t]\) matrix of the internal and external parameters of the camera that captures images ImageJ and ImageJ:  
\[\mathbf{x}_{1}^{T}\mathbf{F}\mathbf{x}_{2}=0\rightarrow\mathbf{x}_{1}^{T} \mathbf{K}_{1}^{-T}\mathbf{R}[t]_{\mathbf{x}}\mathbf{K}_{2}^{-1}\mathbf{x}_{2 }=0. \tag{10}\]  
when the parameter matrices K\({}_{1}\) and K\({}_{2}\) are known, \(\mathrm{E}=\mathrm{R}[t]_{\mathbf{x}}\) is called an essential matrix, and the essential matrices E1 and E2 corresponding to the ImageJ and ImageJ are respectively calculated by the 5-point method. Since \(E=[R\mid t]\), the rotation matrices \(R_{1}\) and \(R_{2}\) and the translation matrices \(t_{1}\) and \(t_{2}\) with relative to world coordinates can be decomposed from the essential matrix E. Then, the position information of the feature points to be measured in each image is extracted to construct the initial sparse modeling.  
The initial sparse model is obtained by the above, using the triangulation method to calculate the positions \(\lambda(X_{1},Y_{1},Z_{1})\) and \(\lambda(X_{2},Y_{2},Z_{2})\) of the feature points to be measured in the world coordinates of the images ImageJ and ImageJ. Inputting ImageJ, the pixel position of the feature point to be measured in the camera coordinates in the initial sparse modeling, and can reacquire the camera internal and external parameter \([R\mid t]\) matrix, that is, the camera rotation matrix \(R_{3}\) and the translation amount \(t_{3}\) with respect to the world coordinates, and using the internal and external parameters of the camera to modify the initial sparse model. Iteratively, and the position coordinates of the feature points obtained by the above method are corrected by the BA (Bundle Adjustment) method; BA is an optimization model, whose essence is to minimize the reprojection error. BA boils down to minimizing the reprojection error between the image locations of observed and predicted image points, which is expressed as the sum of squares of a large number of nonlinear, real-valued functions [26]. BA can not only optimize the pose (\(R\) and \(t\)), but also the spatial position of feature points.