When the camera location (center) ( C ) is known but the orientation (( R )) is unknown, we can use a linear algorithm to compute the camera matrix ( P ) by estimating the rotation matrix ( R ) that aligns the known 3D points with their corresponding image projections.
Algorithm Steps:
-
Preprocessing: Assume the intrinsic camera matrix ( K ) is known (camera is calibrated). For each 2D-3D correspondence ( x_i \leftrightarrow X_i ):
a. Compute normalized image coordinates:
( m_i = K^{-1} x_i )
b. Compute unit direction vectors in camera coordinates:
( v_i = \frac{m_i}{| m_i |} )
c. Compute unit direction vectors from camera center to 3D points:
( u_i = \frac{X_i - C}{| X_i - C |} )
-
Set Up Equations: The rotation ( R ) aligns the vectors ( u_i ) and ( v_i ):
( v_i = R u_i )
-
Solve for Rotation Matrix ( R ):
a. Construct the cross-covariance matrix:
( S = \sum_{i} v_i u_i^\top )
b. Compute the Singular Value Decomposition (SVD):
( S = U \Sigma V^\top )
c. Compute the optimal rotation matrix:
( R = U V^\top )
Ensure that ( \det(R) = 1 ); if ( \det(R) = -1 ), multiply the last column of ( U ) by -1 before computing ( R ).
-
Compute the Camera Matrix ( P ):
( P = K R [I | -C] )
Here, ( [I | -C] ) is a ( 3 \times 4 ) matrix combining the identity matrix and the camera center.
Number of Required Correspondences:
- Degrees of Freedom: The rotation matrix ( R ) in 3D space has 3 degrees of freedom.
- Constraints per Correspondence: Each 2D-3D correspondence provides constraints through the equation ( v_i = R u_i ), which can be expanded into three scalar equations.
- Minimum Correspondences: To solve for the 3 unknown parameters in ( R ), we need at least 3 non-colinear 2D-3D correspondences.
Justification:
- With fewer than three correspondences, the system is underdetermined, and there are infinitely many rotations that can align the points due to insufficient constraints.
- With at least three non-colinear points, the system becomes determined (or overdetermined if more points are used), allowing for a unique solution for ( R ) and thus ( P ), except in degenerate configurations (e.g., points being colinear), which we are ignoring.
Conclusion:
A linear algorithm can compute the camera matrix ( P ) when the camera location is known by estimating the rotation matrix ( R ) that aligns the known 3D points with their projections in the image. This requires at least three 2D-3D point correspondences to obtain a unique solution, provided the points are in a non-degenerate configuration.
Answer: By exploiting the known camera location, we can linearly compute the camera matrix ( P ) by estimating the rotation matrix ( R ) that aligns unit vectors from the camera to 3D points with unit vectors from the camera to image points. This involves solving ( v_i = R u_i ) using at least three 2D-3D correspondences (since ( R ) has three degrees of freedom), so a minimum of three matches is required for a unique solution.