ROBOTICS 101Concept explainer

Fiducial Markers and PnP Pose

A fiducial marker is a printed square with a known size and a code inside, like an AprilTag or ArUco marker. A camera that finds its four corners in the image can work out exactly where the marker is and how it is turned, solving what is called the Perspective-n-Point problem.

Perspective-n-Point

The marker's four corners are known in its own frame, say \(\mathbf{P}_i\) on a 16 cm square. The camera measures their pixels \(\mathbf{u}_i\). PnP finds the rotation \(R\) and translation \(\mathbf{t}\) that best explain them:

$$\min_{R,\,\mathbf{t}}\ \sum_{i=1}^{4} \big\lVert \mathbf{u}_i - \pi\big(K\,(R\,\mathbf{P}_i + \mathbf{t})\big) \big\rVert^2$$

This page solves it with Gauss-Newton over the six pose numbers, starting from the last answer.

What to notice

Up close, the pose comes out within millimeters and a fraction of a degree. Move the marker away and the same pixel noise turns into larger errors, especially in distance and tilt, since the square shrinks to a few pixels. A marker seen nearly face-on is also hard to read for tilt, because small tilts barely change its shape. Robots use markers for docking, calibration, and as ground truth when testing other methods.