Chapter 2: Camera Models & Calibration
Understand how cameras project the 3D world onto 2D images. Learn the pinhole model, lens distortion, intrinsic and extrinsic parameters, and practical calibration techniques using checkerboards and stereo rigs. These concepts are the bridge between physical imaging and the mathematical models every 3D vision algorithm depends on.
- Topics
- 7
- Demos
- 2
- Videos
- 3
- Min read
- 39
Chapter Overview
Camera models describe the mathematical relationship between 3D points in the world and their corresponding 2D pixel locations in an image. Without an accurate camera model, no 3D reconstruction, no stereo matching, and no augmented reality overlay can work correctly.
What is this chapter about? We build the complete camera pipeline from first principles: starting with the idealized pinhole model, adding real-world lens distortion, formalizing intrinsic and extrinsic parameters, and then learning how to estimate all of these from calibration images.
Why does this matter? Every algorithm that connects images to 3D geometry---stereo vision, structure from motion, visual SLAM, augmented reality---requires knowing the camera parameters. An uncalibrated camera is like a ruler with no markings: you can see things, but you cannot measure them.
How the topics connect: We begin with the pinhole camera model to understand the fundamental projection geometry. Then lens distortion models the imperfections of real lenses. Intrinsic parameters encode the camera's internal properties (focal length, sensor center), while extrinsic parameters encode its pose in the world. Zhang's method shows how to estimate intrinsics from a checkerboard. Stereo calibration extends this to camera pairs, and multi-camera systems generalize to arbitrary camera arrays.
Chapter Roadmap
Click any topic to jump in
Pinhole Camera Model
The idealized projection from 3D to 2D — similar triangles, focal length, and perspective division.
Modeling the real camera
Lens Distortion
Real lenses bend straight lines — radial and tangential distortion models correct for this.
Intrinsic Parameters
The camera matrix K — focal length in pixels, principal point, and skew encoded in one 3x3 matrix.
Extrinsic Parameters
Where is the camera? [R|t] encodes position and orientation in the world.
Calibration methods
Zhang's Calibration
Estimate K from checkerboard images — homographies, constraints, and nonlinear refinement.
Stereo Calibration
Calibrating camera pairs — the extrinsic relationship between two cameras.
Multi-Camera Systems
Camera arrays, chain calibration, and synchronized capture for complex multi-view setups.
Topics
7 topics in this chapter
Chapter 1 ended with a promise: to fuse a LiDAR point with an image, place a virtual object in a headset, or measure anything from a photo, we must know exactly which pixel a 3D point lands on. That mapping is the camera model, and nearly every algorithm in the rest of this plan, from stereo to structure from motion to NeRF, calls it in its inner loop. The simplest useful model is the pinhole camera. Light from each scene point passes through one point, the optical centre, and hits a flat image plane at the focal distance behind it. Similar triangles then give the whole story: image size is proportional to focal length and inversely proportional to depth, so distant objects shrink and parallel lines converge. This topic derives perspective projection from that geometry, relates focal length to field of view, and assembles the full projection equation from the coordinate frames and homogeneous coordinates of Chapter 1. Later topics add what a real lens does wrong and how to measure every parameter.
Definition
The pinhole camera model maps a 3D point to the image by central projection through a single optical centre: a camera-frame point lands at on an image plane at focal distance . In homogeneous form, pixel coordinates are , with intrinsics and extrinsics .
In this topic
- 1Perspective Projection Geometry
- 2Focal Length and Field of View
- 3The Projection Equation
Perspective Projection Geometry
In the pinhole model, light from a 3D point passes through a single point (the optical center) and lands on the image plane at distance (the focal length) behind it. By similar triangles, a point in camera coordinates projects to image coordinates . This division by is called perspective division and is responsible for the foreshortening effect: distant objects appear smaller. The optical axis is the line through the pinhole perpendicular to the image plane, and the principal point is where this axis intersects the image plane.
A 3D point projects to on the image plane at distance . This dependence is the defining feature of perspective projection: it creates foreshortening (far objects shrink), vanishing points (parallel lines converge), and occlusion ordering. The projection is a many-to-one mapping --- all points along the ray for project to the same image point, which is why depth is lost in a single view and stereo or multi-view methods are needed to recover it.
A 1.8-meter-tall person stands 10 meters from a pinhole camera with focal length f = 50mm. How tall is their image on the sensor?
Focal Length and Field of View
The focal length determines the camera's field of view (FOV). A short focal length produces a wide FOV (wide-angle lens), capturing more of the scene but with more perspective distortion. A long focal length produces a narrow FOV (telephoto lens), magnifying distant objects but capturing less of the scene. The relationship is . In the intrinsic matrix, focal length is expressed in pixels: .
The half-angle satisfies , so gives exactly 90 degrees, and for small angles radians, inversely proportional to focal length. With a 36 mm sensor, 18, 35, 50 and 200 mm lenses give 90, 54.4, 39.6 and 10.3 degrees. In pixels, , and the angle per pixel is about radians. Depth of field shrinks roughly as at a fixed subject distance and aperture number, which is why long lenses isolate subjects with shallow focus.
A camera has focal length f = 35mm and a sensor width of 36mm. What is the horizontal field of view?
The Projection Equation
The full pinhole projection equation combines intrinsic and extrinsic parameters into a single projection matrix . Given a 3D world point in homogeneous coordinates, the pixel location is found by: , then dividing by the third component. The intrinsic matrix is (focal lengths, principal point, skew), and is the extrinsic matrix (rotation and translation from world to camera). This compact equation is the mathematical backbone of multi-view geometry.
The full projection combines intrinsics () and extrinsics () into the projection matrix . This matrix has 11 DOF: 5 intrinsic (fx, fy, cx, cy, skew) + 6 extrinsic (3 rotation + 3 translation). The result is a homogeneous 3-vector; dividing by the third component yields pixel coordinates. This single matrix multiplication encodes the entire camera model, which is why decomposing back into , , (camera resectioning) is a fundamental operation.
A camera has , , . What pixel does the world point project to?
The pinhole model of the previous topic assumes light travels in straight lines through a single point, but a real camera gathers light with a stack of curved glass elements, and they bend rays by amounts that depend on how far from the centre they pass. The result is lens distortion: straight edges of buildings bow outward in a wide-angle shot, a GoPro horizon curves, and pixel positions near the corners can be off by tens of pixels. For a photograph this is cosmetic, but for geometry it is fatal, because triangulation, pose estimation and stereo matching all assume the pinhole mapping. Distortion must therefore be modelled, measured during calibration and removed before any metric reasoning. This topic covers radial distortion, the dominant barrel or pincushion effect described by a polynomial in the distance from the principal point, tangential distortion from lens elements that are slightly tilted relative to the sensor, and the combined Brown-Conrady model used by OpenCV. Fisheye lenses need a different model, which is noted at the end. Calibration in the following topics estimates these coefficients along with the intrinsic matrix.
Definition
Lens distortion is the systematic deviation of a real lens from the pinhole projection. The Brown-Conrady model expresses it in normalized coordinates as a radial polynomial factor plus tangential terms in and , applied after perspective division and before the intrinsic matrix .
In this topic
- 1Radial Distortion
- 2Tangential Distortion
- 3The Brown-Conrady Distortion Model
Radial Distortion
Radial distortion moves each point along the line from the principal point, by an amount that depends only on its distance from that centre, where in normalized coordinates. It is the dominant distortion and comes from the curvature of the lens elements. The model scales coordinates by . A negative gives barrel distortion, pulling far points toward the centre so straight lines bow outward, typical of wide-angle lenses. A positive gives pincushion distortion, pushing corners outward so lines bow inward. Because the effect grows with , corners suffer most.
Radial distortion displaces pixels along radial lines from the principal point. The distorted radius is where is the undistorted normalized radius. When , the image exhibits barrel distortion (edges bow outward); when , pincushion distortion (edges bow inward). The effect grows as , so image corners are distorted far more than the center. For a typical wide-angle lens with , a point at shifts by while a point at shifts by .
A point at normalized coordinates has . With , , what are the distorted coordinates?
Tangential Distortion
Tangential distortion occurs when the lens is not perfectly parallel to the image sensor. It causes the image to shift asymmetrically, as if parts of the image are slightly tilted. The model adds two coefficients and : , . While smaller in magnitude than radial distortion, tangential distortion cannot be ignored in precision applications like 3D reconstruction.
Tangential terms are first order in the coefficients but quadratic in position: . For the example point (0.5, 0.3) with and the shift is (-0.00138, -0.00008) in normalized units, which at pixels is 0.69 and 0.04 pixels. The radial term with and moves the same point about 18 pixels. OpenCV's projectPoints reproduces both results exactly. Tangential terms are small, but leaving them out can bias the principal point estimate.
Given , , and a point at normalized coordinates with , compute the tangential distortion offset.
The Brown-Conrady Distortion Model
The Brown-Conrady model combines radial and tangential distortion into a single formulation. OpenCV uses 5 coefficients by default, with extended models supporting up to 14 parameters. The distortion is applied in normalized camera coordinates (after dividing by but before applying ). To undistort an image, one must invert this nonlinear mapping---typically done iteratively or via lookup tables. OpenCV's cv2.undistort() and cv2.initUndistortRectifyMap() handle this efficiently.
The Brown-Conrady model combines radial and tangential terms into a single distortion function with 5+ parameters . This is the model used by OpenCV. Undistortion inverts this mapping: given a distorted pixel , find the undistorted coordinates such that . Since the distortion function is nonlinear, undistortion requires iterative methods (Newton-Raphson) or precomputed lookup tables. OpenCV's undistort() uses a remap approach: for each output pixel, compute which distorted pixel maps to it.
OpenCV returns distortion coefficients [k1, k2, p1, p2, k3] = [-0.28, 0.1, 0.001, -0.001, 0.0]. Describe what kind of distortion this camera has.
Related Problems on PixelBank
After removing lens distortion, the remaining question is how a direction in front of the camera turns into a pixel position. The answer depends only on the camera body and lens, not on where the camera stands, and it is captured by the intrinsic matrix . Two cameras looking at the same scene from the same spot can still produce very different images: a smartphone with a 4.8 mm lens and a DSLR with a 50 mm lens differ in focal length, pixel size and sensor centre, and is exactly the bookkeeping for those differences. It converts the normalized coordinates of the pinhole model into pixels by scaling with the focal length expressed in pixels and shifting by the principal point, the pixel where the optical axis meets the sensor. Its inverse turns a pixel back into a viewing ray, which is the first step of every triangulation or back-projection. This topic dissects the five entries of , explains why focal length in pixels rather than millimetres is what matters to algorithms, and shows how a misplaced principal point biases every ray.
Definition
The intrinsic matrix is the 3-by-3 upper-triangular matrix that maps normalized camera coordinates to pixel coordinates. It holds the focal lengths in pixels and , the principal point , and a skew that is zero for modern sensors. Intrinsics depend only on the camera and lens, not on the camera's pose.
In this topic
- 1The 3x3 Intrinsic Matrix K
- 2Focal Length in Pixels vs Millimeters
- 3Principal Point Offset
The 3x3 Intrinsic Matrix K
The intrinsic matrix has five parameters. and are the focal lengths in pixels along the and axes (they differ when pixels are non-square). and are the principal point coordinates---where the optical axis intersects the image sensor (ideally the image center, but manufacturing tolerances cause offsets of a few pixels). The skew parameter accounts for non-perpendicular pixel axes, which is essentially zero in modern cameras and usually set to 0.
The intrinsic matrix has 5 parameters. Most modern cameras have zero skew () and square pixels (), reducing to 3 effective parameters. is upper-triangular, which means it can be extracted from a matrix via RQ decomposition. The determinant is always positive. maps pixel coordinates back to normalized image coordinates: , which is the first step in any 3D reconstruction pipeline.
A camera has a 4.8mm focal length, sensor pixel pitch of 1.4 micrometers, and 4032 x 3024 image resolution. Compute K assuming zero skew and centered principal point.
Focal Length in Pixels vs Millimeters
Physical focal length (in mm) describes the lens optics, while focal length in pixels describes the combined effect of lens and sensor. The conversion is: . A smartphone might have with 1.4 m pixels, giving pixels. A DSLR might have with 6.25 m pixels, giving pixels. The pixel-based focal length is what appears in the intrinsic matrix and determines the image-space magnification.
The conversion bridges physical and digital units. A 50mm lens on a sensor with 4000 pixels across 36mm gives pixels. This number determines how many pixels a 1-radian angle subtends. Knowing , the angular resolution per pixel is radians. For , each pixel spans --- this is why high-resolution sensors with long focal lengths can resolve fine details.
Camera A: f = 4.8mm, pixel pitch = 1.4μm (smartphone). Camera B: f = 50mm, pixel pitch = 6.25μm (DSLR). Which has the larger pixel focal length?
Principal Point Offset
The principal point is the pixel where the optical axis meets the sensor. Nominally it is the image centre, but lens mounting and sensor placement shift it by a few to tens of pixels, so calibration estimates it rather than assuming it. An error in the principal point tilts every back-projected ray by about radians, so a 20-pixel error at is 1.15 degrees, about 2 cm at 1 m. Because the bias is shared by all rays, it partly hides as a small rotation in pose estimation, but it distorts angles between rays, triangulated depths and stereo rectification.
The principal point is where the optical axis intersects the image plane. Ideally it is at the image center , but manufacturing tolerances cause offsets of 5-50 pixels. If uncorrected, this offset introduces a systematic error in direction estimation: a point at pixel with wrong points in the wrong direction by radians. For px and px, the angular error is , which causes cm error at 1 meter distance --- significant for precision 3D reconstruction.
A 640x480 camera has true principal point at (325, 237) instead of the assumed (320, 240). A point at normalized coordinates (0, 0, 1) should project to the center. What is the pixel error if we use the wrong principal point?
Related Problems on PixelBank
The intrinsic matrix of the previous topic describes the camera as if the world were already expressed in its own frame. In practice the world has its own frame, and the camera can stand anywhere in it, pointing anywhere. The extrinsic parameters supply that missing link: a rotation and a translation that move a point from world coordinates into camera coordinates, exactly the rigid transformation of Chapter 1. Together with they complete the projection . Extrinsics are where conventions bite hardest. The vector is not the camera's position; that is . Some tools store world-to-camera transforms and others camera-to-world, and a mix-up typically sends every point behind the camera or mirrors the scene. Estimating extrinsics from images, the Perspective-n-Point problem, is how AR markers, robot grasping and visual localization find the camera. This topic covers the matrix and its geometric meaning, pose versus extrinsics, and PnP solvers with their ambiguities, before Zhang's method estimates intrinsics and extrinsics together.
Definition
Extrinsic parameters are the rotation and translation of the rigid transformation from the world frame to the camera frame, six degrees of freedom in total. The camera centre in world coordinates is , and the camera's pose is the inverse transform from camera to world.
In this topic
- 1The [R|t] Extrinsic Matrix
- 2Camera Pose vs Camera Extrinsics
- 3Estimating Camera Pose (PnP Problem)
The [R|t] Extrinsic Matrix
The extrinsic matrix transforms homogeneous world coordinates to camera coordinates: . Here is a rotation matrix encoding the camera's orientation, and is a vector encoding the camera's position. Note that is NOT the camera center in world coordinates---it is the world origin expressed in camera coordinates. The camera center in world coordinates is . This distinction is a frequent source of confusion.
The extrinsic matrix maps world points to camera coordinates, . has 3 degrees of freedom and has 3, six in total. Setting gives the camera centre in world coordinates, . The rows of are the camera's axes written in world coordinates: row 1 is the camera's X (right) direction, row 2 its Y (down) direction, and row 3 its viewing direction. The columns of are the world axes seen from the camera. Reading row 3 is the quickest way to check where a camera is pointing.
A camera has R = I (no rotation) and t = (0, 0, -5). Where is the camera in world coordinates? What does a world point at the origin (0, 0, 0) look like in camera coordinates?
Camera Pose vs Camera Extrinsics
Two transforms describe the same camera. The extrinsics map world points into the camera frame, which is what projection needs. The pose is the inverse, camera to world: its rotation is and its translation is the camera centre , which is what a robot or a trajectory plot needs. Tools differ. OpenCV's solvePnP returns world-to-camera extrinsics, and COLMAP's images.txt also stores world-to-camera rotations and translations, giving the centre as . Many SLAM systems and NeRF datasets store camera-to-world poses instead. Name every transform by its source and target frames.
Write for the world-to-camera extrinsic matrix and for the pose. In block form has rotation and translation , and their product is the identity. The two are easy to tell apart numerically: the translation of is where the camera is, so it should look like a plausible position in the scene, while of is the world origin seen from the camera. Feeding a pose into a projection function typically puts most points at negative depth, or reflects the scene through the camera centre.
A camera is at world position C = (3, 0, 0), looking along the world -X axis (so its Z-axis aligns with world -X). Compute R and t for the extrinsic matrix.
Estimating Camera Pose (PnP Problem)
Perspective-n-Point, PnP, estimates the extrinsics of a calibrated camera from known 3D points and their pixel positions. Three points are the minimum, P3P, but give up to four solutions, so a fourth point picks the right one. EPnP handles many points in linear time, and iterative Levenberg-Marquardt refinement minimizes reprojection error. For four or more coplanar points, such as a square marker, IPPE is the specialised solver. Real correspondences contain outliers, so solvePnPRansac wraps a minimal solver in RANSAC. Accuracy depends on how large the points appear: a small or distant target gives a poorly constrained depth and rotation.
The Perspective-n-Point (PnP) problem estimates the camera pose from correspondences between 3D world points and their 2D image projections. With (P3P), there are up to 4 solutions. With , the solution is unique (generically). The DLT (Direct Linear Transform) formulates this as a linear system where contains the 12 elements of , solved via SVD. EPnP (efficient PnP) reduces the problem to estimating 4 control point coordinates, running in time.
You have 4 corners of a known planar marker (3D positions) and their pixel locations in an image. The marker is 10cm x 10cm. Can PnP solve for the camera pose?
The previous topics defined every parameter of a camera: focal lengths, principal point, distortion coefficients and pose. None of them is printed on the box with useful accuracy, so they must be measured. Classic photogrammetric calibration used precisely machined 3D targets, which were expensive and awkward to move. In 2000 Zhengyou Zhang showed that a flat printed pattern, photographed from a handful of different angles, is enough. Each view of the plane defines a homography, a 3-by-3 projective map from the board to the image, and the fact that the board's two in-plane axes are perpendicular and equally long gives two linear constraints on the intrinsic matrix per view. A few views pin down in closed form. The pose of each view and the distortion coefficients then follow, and a nonlinear least-squares refinement polishes everything by minimizing reprojection error. That recipe is what OpenCV's calibrateCamera and MATLAB's calibrator implement. This topic walks through the checkerboard target, the homography constraints, and the final refinement, including why a low reprojection error alone does not prove a good calibration.
Definition
Zhang's method calibrates a camera from several images of a planar pattern with known geometry. It estimates a homography per image, solves linear equations from the orthonormality of the plane's axes for the intrinsic matrix , recovers each view's pose, then jointly refines intrinsics, distortion and poses by minimizing total reprojection error.
In this topic
- 1Checkerboard Calibration Pattern
- 2Homography Estimation and Intrinsic Constraints
- 3Nonlinear Refinement (Bundle Adjustment)
Checkerboard Calibration Pattern
A checkerboard is the most popular calibration target because its corner points can be detected with sub-pixel accuracy using the Harris corner detector or saddle-point refinement. The pattern provides known 3D coordinates (corners on a flat plane with regular spacing) and corresponding 2D pixel detections. Typically, 10-25 images of the checkerboard at different orientations are sufficient. The pattern should be fully visible in each image and held at various angles to constrain all parameters.
A planar calibration pattern (e.g., checkerboard with 20mm squares) provides known 3D-to-2D correspondences per image. The 3D coordinates are fixed (e.g., ), and the 2D coordinates are detected as sub-pixel corner locations. Zhang's method requires images of the pattern at different orientations. More images reduce noise: the intrinsic parameter uncertainty scales approximately as . Using 15-20 images with varied orientations (tilts of 20-45 degrees) is standard practice.
A calibration board has 9 by 6 squares of 25 mm, and the camera takes 15 images of it. How many corner points does OpenCV detect in total? How many equations do they give, and how many unknowns must the calibration solve for, with 4 intrinsics, 5 distortion coefficients and a pose per image?
Homography Estimation and Intrinsic Constraints
For each image, the relationship between the planar pattern and the image is a homography ( projective transformation). Since the pattern is flat (), the projection simplifies from to where . The key insight of Zhang's method is that each homography provides two constraints on the intrinsic matrix (from the orthogonality of and ). With 3 or more images, we have enough constraints to solve for , then recover for each image.
Each image of the planar pattern yields a homography relating pattern coordinates to image coordinates: . Since the pattern has , the homography encodes both intrinsics and extrinsics. The orthonormality constraints and give two equations per image involving only. With images (6 equations for 5 unknowns in ), the intrinsics can be solved via a closed-form linear system involving the image of the absolute conic.
A homography maps a planar calibration target to the image. Given and , the columns satisfy , . What two constraints does orthogonality of give?
Nonlinear Refinement (Bundle Adjustment)
Zhang's method uses two stages. The first (linear) stage extracts an initial estimate of K and all [R|t] from homographies. The second (nonlinear) stage refines all parameters jointly by minimizing the total reprojection error: the sum of squared distances between detected corners and their predicted projections using the current estimates of K, distortion, and each [R|t]. This is solved using Levenberg-Marquardt optimization and typically reduces the mean reprojection error from 1-2 pixels to 0.1-0.3 pixels.
Reprojection error measures how well the fitted model explains the detected corners, so with 0.2 pixels of detection noise it settles near 0.27 pixels no matter how the views were taken. Parameter accuracy depends on geometry instead. Fronto-parallel views make the focal length and the board's distance nearly interchangeable, which is the degenerate case Sturm and Maybank analysed. In the probe, 3 views at 30 degrees gave a median focal error of 5.2 pixels, 15 views 0.9, and 15 nearly frontal views 15.6, with one run off by thousands. Tilt diversity, not RMS, governs accuracy.
After Zhang's calibration with 20 images of a 9x6 checkerboard, the mean reprojection error is 0.15 pixels. Is this a good calibration?
Related Problems on PixelBank
Zhang's method calibrates one camera, but a single camera cannot measure depth: every point along a ray lands on the same pixel. Add a second camera a known distance away and the ambiguity disappears, since a point seen in both images sits where the two rays cross. That is how stereo rigs, from the Intel RealSense and ZED cameras to the forward-facing pairs on cars, measure distance. Triangulation is only as good as the rig's geometry, so stereo calibration estimates the relative rotation and translation between the two cameras in addition to each camera's intrinsics. The length of that translation, the baseline, sets the depth resolution: for a rectified pair, depth equals focal length times baseline divided by disparity, so depth error grows with the square of distance and shrinks with longer baselines. This topic covers stereo geometry and its error budget, the calibration procedure built on simultaneous checkerboard views, and rectification, which warps both images so that matching becomes a one-dimensional search along rows. Chapter 3 develops the epipolar geometry behind all three.
Definition
Stereo calibration estimates both cameras' intrinsics and distortion plus the rigid transform from the first camera's frame to the second's, from synchronized views of a known target. The baseline , together with the focal length, sets the depth recovered from a disparity of pixels once both images are rectified.
In this topic
- 1Stereo Camera Geometry
- 2Stereo Calibration Procedure
- 3Stereo Rectification
Stereo Camera Geometry
A stereo rig consists of two cameras with a fixed relative pose. The baseline is the distance between their optical centers. Points that are visible to both cameras can be triangulated to recover their 3D position. The depth precision depends on the ratio of baseline to depth: , meaning depth errors grow quadratically with distance and decrease with larger baselines. Typical stereo baselines range from 6cm (human eyes, stereo phones) to 50cm (autonomous driving) to several meters (aerial surveying).
Depth and disparity are inversely related, , so a fixed disparity error costs more depth the farther the point is: . Each doubling of distance quadruples the absolute error, while doubling the baseline or the focal length halves it. With m, pixels and a sub-pixel matcher at 0.1 pixels, the error is 5 cm at 5 m and 5 m at 50 m. Wider baselines help range but make matching harder, because the two views differ more and occlusions grow.
A stereo camera has baseline b = 12cm and focal length f = 500 pixels. What is the depth error at Z = 5m if the disparity has 0.5 pixel uncertainty?
Stereo Calibration Procedure
Stereo calibration usually runs in two phases. First calibrate each camera on its own with Zhang's method to get its intrinsics and distortion. Then capture synchronized image pairs of a checkerboard visible to both cameras and estimate the rotation and translation from the first camera to the second. OpenCV's stereoCalibrate can refine everything jointly, but fixing the intrinsics found in phase one, with the CALIB_FIX_INTRINSIC flag, is more stable when the shared views are few. The board must appear in both images at the same instant, so unsynchronized captures of a hand-held board corrupt the result.
Stereo calibration estimates and by first calibrating each camera independently (intrinsics and distortion), then solving for the relative pose that minimizes the total reprojection error across both cameras simultaneously. The key constraint is that the same 3D pattern points must project correctly in both views. This yields 6 extrinsic parameters (3 rotation + 3 translation) with sub-degree rotation accuracy and sub-millimeter translation accuracy when using 20+ image pairs.
A stereo rig captures 20 synchronized image pairs of a calibration checkerboard. Each camera individually achieves 0.12 pixel reprojection error. After stereo calibration, the stereo reprojection error is 0.25 pixels. Is this acceptable?
Stereo Rectification
After calibration, stereo rectification warps both images so that corresponding points lie on the same horizontal row (epipolar lines become horizontal). This dramatically simplifies stereo matching: instead of searching a 2D region, the algorithm only needs to search along a single row. OpenCV's cv2.stereoRectify() computes the rectification homographies, and cv2.initUndistortRectifyMap() generates lookup tables for efficient remapping. After rectification, both images appear as if taken by parallel cameras with identical intrinsics.
Rectification warps both images so that corresponding epipolar lines become horizontal and aligned row-by-row. After rectification, the fundamental matrix becomes , meaning correspondences lie on the same row (). This reduces the stereo matching search from 2D (full image) to 1D (a single row), decreasing computational cost by a factor of (image height). Rectification requires applying homographies to the two images.
Before rectification, a point at pixel (300, 200) in the left image corresponds to pixel (250, 207) in the right image. After rectification, the left pixel is at (310, 205). Where is the right pixel?
Related Problems on PixelBank
A stereo pair sees the scene from one direction. Motion-capture stages, volumetric video studios, cars with surround cameras and research domes such as CMU's Panoptic Studio, with more than 500 cameras, need many viewpoints at once, so that every surface is seen by several cameras and occlusions in one view are filled by others. Extending stereo calibration to such systems brings three new problems. First, the cameras rarely all see one calibration target at the same time, so relative poses must be chained through cameras that share views, and errors accumulate along the chain unless a global optimization ties everything together. Second, configuration matters: how many cameras, where to place them, and how much their fields of view should overlap. Third, timing: a 2 ms offset between shutters moves a car at highway speed by several centimetres, which shows up directly as triangulation error. This topic covers rig configurations, chain calibration and global bundle adjustment, and hardware and software synchronization. Chapter 3 then returns to two views to develop epipolar geometry in depth.
Definition
A multi-camera system is a rig of three or more cameras with known intrinsics, known relative poses in a common frame, and synchronized capture. Calibrating it means estimating every camera's intrinsics, every camera's pose in the rig frame, and any time offsets, typically by chaining pairwise estimates and then refining them all jointly.
In this topic
- 1Multi-Camera Rig Configurations
- 2Chain Calibration and Global Optimization
- 3Synchronized Capture and Time Calibration
Multi-Camera Rig Configurations
Rigs come in a few common shapes. Linear arrays capture light fields or wide stereo, rings and domes surround a capture volume for motion capture and volumetric video, and vehicle rigs spread six to eight or more cameras around the body for surround view, often with a forward stereo pair. With cameras there are possible pairs, but only pairs with overlapping views and a useful baseline help. Wide baselines improve depth precision but make matching harder, since appearance changes more between views. Coverage is planned so every important surface is seen by at least two, preferably three, cameras.
Common configurations include stereo pairs (2 cameras, 1 baseline), trinocular rigs (3 cameras, 3 baselines), and surround systems (4-12+ cameras covering ). The geometric diversity of a rig determines its reconstruction quality: cameras separated by wide baselines give better depth precision but increase the difficulty of feature matching. For cameras, there are possible stereo pairs, each contributing independent depth information. The optimal rig design balances coverage, depth accuracy, and computational cost.
A motion-capture studio places 12 cameras evenly on a circle of radius 5 m, all aimed at the centre, each with a 60-degree horizontal field of view. A performer modelled as a vertical cylinder of radius 0.2 m stands at the centre. How many cameras see each point on the performer's surface?
Chain Calibration and Global Optimization
When not all cameras share a view of the calibration target, chain calibration estimates pairwise transforms between neighboring cameras and chains them together: T_1_3 = T_2_3 * T_1_2. However, errors accumulate along the chain. Global bundle adjustment then optimizes all camera poses and 3D points simultaneously, distributing errors across the entire system. Structure-from-Motion tools like COLMAP handle this automatically. For real-time systems, calibration must be verified periodically because mounting vibrations can shift cameras by fractions of a degree.
Composing pose estimates multiplies their errors: if each link carries a small random rotation error with standard deviation , the end-to-end error after links grows like when errors are independent, and like in the worst aligned case. A simulation of 5 links at 0.1 degrees gave an RMS of 0.223 degrees, matching . Global bundle adjustment changes the structure: each camera's pose is constrained by every camera it shares observations with, so the uncertainty depends on the whole graph rather than the longest path.
A 6-camera rig is calibrated pairwise: cam1-cam2, cam2-cam3, ..., cam5-cam6. Each pair has 0.1-degree rotation error. What is the worst-case accumulated error from cam1 to cam6?
Synchronized Capture and Time Calibration
Multi-camera reconstruction assumes all cameras capture the same instant. If one shutter fires late, a moving object has shifted, its rays no longer meet, and triangulation produces a wrong point. Hardware triggering, with one signal wired to every camera's trigger input or a genlock reference, aligns shutters to within microseconds. Network synchronization with the Precision Time Protocol, IEEE 1588, can reach sub-microsecond clock agreement on a local network when the hardware supports timestamping. Software timestamps from USB or network arrival times are far coarser. Residual offsets can be estimated from data by finding the time shift that best aligns moving features across cameras. Rolling shutters add a separate per-row delay.
Multi-camera systems need temporal synchronization to avoid motion artifacts. A 1ms timing offset at 30 fps corresponds to 3% of a frame interval. For an object moving at 1 m/s, this causes mm 3D error, but for fast motion (10 m/s), it becomes cm. Hardware sync (genlock signal) achieves precision. Software sync (NTP or frame timestamps) typically gives ms precision. Temporal calibration can be estimated from cross-camera motion trajectories by finding the time offset that minimizes the epipolar constraint violation across frames.
A car moves at 60 km/h (16.7 m/s). A multi-camera rig has 2ms synchronization error. What is the maximum 3D reconstruction error due to timing alone?