Focal length / pixel scale
Larger values narrow the field of view and produce larger pixel offsets for the same normalized coordinates.
Camera Models & Imaging Geometry
Projection first transforms 3D points into camera coordinates, then applies perspective division, distortion, and intrinsics. RGB-D also requires depth scale, back-projection, and sensor-to-sensor extrinsics.
Projection Pipeline
Each stage has different units and validity conditions. Unpacking homogeneous projection helps diagnose direction, scale, distortion, and visibility beyond memorizing a 3×4 camera matrix.
3D points in CAD, map, or robot coordinates
m / mmCamera optical frame; visible pinhole rays require Z > 0
m / mmNormalized image plane with focal length 1
dimensionlessColumn and row coordinates in the image array
pxCamera Intrinsics
Pixel-unit focal lengths incorporate physical focal length and pixel pitch. The principal point is the optical-axis intersection with the image plane, not necessarily the image center. Skew is often zero in modern cameras, but its formula position still matters.
Larger values narrow the field of view and produce larger pixel offsets for the same normalized coordinates.
The pixel corresponding to normalized-coordinate origin; cropping and padding change it.
Describes coupling from nonorthogonal pixel axes; usually approximately 0 in modern digital cameras.
Store K with its resolution; the same lens has different numerical intrinsics at different output sizes.
Interactive Lab
Three experiments share a 640×480 camera. Move a 3D point to explore perspective and distortion, simulate crop/resize updates to K, then recover camera coordinates from pixels and raw depth while comparing Z-depth and range.
Interactive · Camera Geometry
Coordinate chain
Intrinsic matrix
Field of view
Image dimensions are fixed here; shifting the principal point does not change the nominal FOV calculated from sensor width and height.
Scale
Updated focal length
Updated principal point
Affine image transform
K′ = A KFor padding, flips, or other affine image transforms, left-multiply K by the full pixel transform A, rather than updating only focal lengths.Deprojected point
Unit viewing ray
Z-depth vs. range
Lens Distortion
Standard OpenCV models apply perspective division, radial/tangential distortion on the normalized plane, then K. Undistortion solves the inverse problem, typically through iteration or lookup tables.
| Model | Core projection | Typical parameters | Applications | Cautions |
|---|---|---|---|---|
| Pinhole | x=X/Z, y=Y/Z | fx, fy, cx, cy, skew | Conventional lenses, undistorted images, and basic geometry | Cannot represent strong wide-angle distortion |
| Radial–Tangential | Pinhole + radial/tangential distortion | k1…k6, p1, p2; optional thin-prism/tilt | Standard OpenCV models and industrial-camera calibration | Excess parameters can overfit or compensate for each other |
| Fisheye / Equidistant | Based on incident angle θ rather than simply X/Z | fx, fy, cx, cy + fisheye coefficients | Fisheye, ultrawide, surround-view, and head-mounted cameras | Standard pinhole/radtan coefficients do not transfer directly |
| Omnidirectional / Unified | First maps to a unit sphere or unified image surface | Intrinsics + mirror/unified parameters | Catadioptric, very-wide-field, and omnidirectional cameras | Projection, back-projection, and Jacobians depend on the model |
Image-space Transform
Resize, crop, padding, flips, and rotations change pixel coordinates. For a 2D affine or projective mapping A, transform pixels and camera matrices together to avoid systematic PnP, coordinate-map, and projection-supervision errors.
Nonuniform resizing permits sx≠sy, so fx and fy are updated separately.
A pure crop does not change focal lengths. The principal point may legitimately lie outside the new image.
Padding on the left and top increases cx and cy, respectively.
A reflection can change handedness; K′=AK alone does not make it an ordinary 3D rotation.
Depth & RGB-D
RGB-D data often appear aligned, but raw RGB and depth usually have different optical centers, resolutions, and distortion models. The order of back-projection, extrinsic transformation, and reprojection must be explicit.
Pixels on the same plane z=constant have equal depth; their actual distance from the optical center increases farther from the principal point.
Substituting it directly into the Z-depth equation places points near the image edges incorrectly.
Z = fB/d; zero disparity, subpixel precision, and baseline errors strongly affect distant depth estimates.
In BOP, raw depth multiplied by depth_scale gives millimeters; other devices commonly use m, mm, or device units.
Reflective, transparent, and black surfaces, as well as occlusion boundaries, can produce holes or flying pixels.
Depth-to-RGB and RGB-to-depth alignment require 3D extrinsics and reprojection, rather than a simple resize.
| Depth source | Geometric mechanism | Common strengths | Typical issues |
|---|---|---|---|
| Stereo / multi-view | Disparity + triangulation | Passive sensing; generally suitable for outdoor use | Weak or repetitive texture; increasing error at long range |
| Structured light | Project a known pattern and triangulate | Fine detail at close range; works with weak texture | Sunlight interference, reflective/transparent surfaces, limited working range |
| ToF | Modulated-light time of flight or phase | Direct ranging; relatively high frame rates | Multipath, flying pixels, temperature drift, phase ambiguity |
| Monocular prediction | Learn an image-to-depth or inverse-depth mapping | No depth hardware required; dense coverage | Uncertain scale, generalization, and boundary geometry |
Camera Calibration
Camera calibration jointly estimates intrinsics, distortion, and the extrinsics of each calibration image. Reliable results depend on model selection, view coverage, corner quality, focal stability, and independent validation, rather than a single overall RMS value.
Conventional, fisheye, and omnidirectional models cannot be interchanged merely by adding k coefficients. Oversimplification leaves systematic residuals; excessive complexity can destabilize estimation.
Calibration boards should cover the center, corners, distances, and tilts. Translation near the image center alone cannot sufficiently constrain distortion and focal length.
Minimize corner reprojection error while estimating K, distortion, and each calibration-board pose relative to the camera.
Low mean error does not prove a correct model. Examine residuals by image, position, and ray direction, especially systematic edge errors.
Use held-out images, straight lines, known lengths, or multiview reprojection. Record resolution, focus, and zoom settings.
6D Pose Connection
The same 2D–3D correspondences define different spatial rays under different K matrices, yielding different R and t. Unhandled distortion also enters the reprojection residual directly.
After letterboxing, dynamic cropping, or multiscale training, update K and the pixel transforms used by 2D keypoints, bounding boxes, and coordinate maps.
Convert the renderer's FOV, principal point, axes, and pixel-center convention to the training data definition; distortion is usually simulated separately after rendering.
Render-and-compare, ICP, and depth residuals require RGB, depth, CAD, K, and extrinsics to use consistent resolutions, units, and frames.
Debug Protocol
First verify that a camera-space point produces the expected pixel, then add extrinsics, distortion, image augmentation, and depth alignment. Enabling every module at once can let multiple errors cancel each other out.
[0,0,Z] should project to (cx,cy), regardless of Z. Failure usually indicates an incorrect K layout, homogeneous division, or pixel axes.
[Z/fx,0,Z] should lie about 1 px to the right of the principal point; this directly checks fx, column vectors, and the +x direction.
Set D=0 to verify pinhole projection before adding distortion; avoid adjusting K and D simultaneously while guessing the cause.
Output Pc, normalized, distorted, and pixel coordinates together, checking the transition from m/mm to dimensionless values and then px.
Apply crop/resize/pad to the four corners and principal point, and check that K′=AK produces exactly the same new pixels.
Back-project a known plane z=constant and check that the point cloud is flat; curvature often indicates an incorrect distortion model, K, or depth definition.
Axis directions, silhouette offsets, and scale errors have different visual patterns, helping distinguish extrinsic, K, and unit errors.
Next geometry topic · 05