Efficient Perspective-n-Point (PnP)

Learn how to use the efficient PnP algorithm to estimate the pose of a camera.

Overview

The perspective-n-point algorithm, or PnP for short (also known as the projective-n-point algorithm), is used frequently in computer vision to efficiently and accurately estimate the pose of a camera in 3D space. It accomplishes this by solving a system of equations, which involve the camera’s intrinsic parametersThe internal properties of the camera, such as focal length, the image center, and skew., a collection of nn points in 3D space, and nn corresponding points in the 2D space of the camera.

The perspective-n-point algorithm

The purpose of the PnP algorithm is to estimate all six degrees of freedom of a calibrated camera. That is, it estimates the rotation RR and translation TT of the camera. It requires a set of nn points with 3D world coordinates and corresponding 2D camera space coordinates. The PnP algorithm finds the 3×33 \times 3 rotation matrix RR and 1×31 \times 3 translation matrix TT that minimize the reprojection error between a collection of world points pwip_w^i and camera points pcip_c^i where 0i<n0 \le i \lt n.

Get hands-on with 1400+ tech skills courses.