Given a calibrated camera and a set of correspondences between three-dimensional world points
and their image observations
, the problem is to determine the camera pose—that is, the rotation
and translation
—that best explains the available observations.
This problem is known in the literature as Perspective-n-Point (PnP), where denotes the number of 3D correspondences used. In the theoretical minimum case of three points, the problem is called Perspective-3-Point (P3P). For an ideal calibrated camera, three independent 3D–2D correspondences provide the minimum number of constraints required to obtain a finite set of candidate poses.
One possible solution is to formulate the problem as a linear system and solve it using Direct Linear Transform (DLT) techniques. Although conceptually simple, this approach is generally inaccurate and numerically unstable in the presence of observation noise.
A more natural approach is to note that a candidate pose
makes it possible to project each three-dimensional point onto the image plane. The quality of the solution can therefore be measured using the reprojection error, defined as
| (9.77) |
where
denotes the projection of the three-dimensional point
using the current pose.
The PnP problem can therefore be expressed as
| (9.78) |
that is, as the search for the pose that minimizes the total reprojection error.
Iterative methods that directly minimize this cost function usually provide highly accurate results, but require an initial estimate sufficiently close to the correct solution to avoid converging to undesirable local minima.
For this reason, numerous algorithms have been developed specifically for the PnP problem to provide a robust and efficient initial pose estimate. Well-known examples include EPnP (LFNP09), which introduces a particularly efficient linear formulation of the problem, and DLS (Direct Least Squares) (HR11), which estimates the pose by direct least-squares minimization.
In practical applications, pose estimation is generally performed by combining a PnP algorithm with robust outlier rejection techniques such as RANSAC, followed by nonlinear refinement through reprojection-error minimization.
The PnP problem plays a central role in numerous computer vision applications, including visual localization, augmented reality, visual odometry, Structure from Motion, and SLAM. The main solution techniques will be discussed in greater detail in the following chapters on multiview vision and pose estimation.
Paolo medici