# Perspective-n-Point Algorithm (PnP)

PnP estimates the pose of a calibrated camera given 3D points in the world and their corresponding 2D projections on the cameraβs image plane.

PnP (Perspective-n-Point) is a method to solve 3D to 2D motion estimation.

Several ways to solve this:

The SLAM textbook introduces an approach that is basically bundle adjustment, where we try to minimize the reprojection error.

We know that to relate from 3D to 2D, we have the equation $s_{i}βu_{i}v_{i}1ββ=KTβX_{i}Y_{i}Z_{i}1ββ$ To solve for $T$, we can simply construct the least squares problem and minimize $T$

$T=argmin_{T}21ββ₯u_{i}βs_{i}1βKTP_{i}β₯_{2}$

$e(x+Ξx)βe(x)+J_{T}Ξx$

- This is essentially linearization