Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PinholeCamera

Often we optimize a camera’s location and orientation (extrinsics) together with its calibration parameters (intrinsics). PinholeCamera<CALIBRATION> combines both in one value and provides projection, backprojection, reprojection error, and camera geometry; Python exposes one concrete class per wrapped calibration model.

Open In Colab

Creating a calibrated pinhole camera

This example uses PinholeCameraCal3_S2; the Cal3DS2, Cal3Unified, Cal3Bundler, Cal3f, and Cal3Fisheye specializations have the same camera interface.

Projection and visibility

project() maps a world point to pixels. projectSafe() additionally reports whether the point is in front of the camera, and reprojectionError() compares a point with an observed pixel measurement.

Backprojection and range

backproject(pixel, depth) recovers a world point at a specified camera-frame depth. range() reports Euclidean distance instead, so depth and range differ away from the optical axis.

Source

PinholeCamera.h

AI assistance caveat

AI was used to help draft this documentation, and inaccuracies could be present.