Article sections
What does camera calibration correct, and what does it leave unchanged?Perspective correction, alignment and reference coordinatesWhich parameters does camera calibration actually estimate?When is a homography sufficient, and when is it not?Which calibration approach suits which application?How should calibration results be reported?Why examine radial and tangential distortion separately?Frequently asked questionsWhat does camera calibration correct, and what does it leave unchanged?
Camera calibration numerically describes the geometry of image formation. In a typical pinhole model, the intrinsic matrix K contains the focal lengths in pixel units and the principal point. Lens distortion is modeled separately. Rotation and translation between the camera and the world form the extrinsic parameters.
The main purpose of calibration is to estimate lens distortion and projection relationships, enabling geometric transformations. Calibration does not sharpen a blurred image, increase inadequate resolution or recover an edge that the lighting does not reveal. Moreover, a very low reprojection error does not, by itself, demonstrate micrometer-level measurement accuracy throughout the working volume. Forgetting that distinction can be an expensive mistake.
Intrinsics, distortion and extrinsics
The intrinsic parameters include fx, fy, cx, cy. Distortion coefficients approximate radial and tangential effects; their number depends on the camera and model. Extrinsic parameters describe the camera's position and orientation relative to a reference coordinate system. A planar homography can be used for a fixed camera and a single reference plane, but this is not equivalent to calibrating an entire three-dimensional space.

The figure transforms the perspective view of a plane back into a front-facing view using known corner correspondences. A homography is a powerful tool for points on the same plane, but the height of a part extending out of that plane can introduce measurement errors. It is therefore used where height variation can be neglected.
How should calibration images be captured?
Collecting 20 checkerboard images in essentially the same pose is not the same as collecting good calibration data. Capture the target at different positions and angles, including the edges and corners of the field of view. Its square size must be known accurately, and printing or manufacturing tolerances must suit the measurement requirement. Images should be sharp and sufficiently varied to characterize distortion. OpenCV explains corner detection and reprojection-error evaluation in detail. OpenCV camera calibration.
Post-calibration checks: Measure a new, independent reference target at several locations across the working area. Reassess calibration validity after changing focus, aperture, camera position, sensor ROI or binning mode, or working distance.
Perspective correction, alignment and reference coordinates
An industrial measurement camera cannot always be mounted perpendicular to the part. An affine transformation represents translation, rotation, scaling and shear. A projective transformation, or homography, represents a plane's perspective change. Alignment helps compare different images in a common reference coordinate system.
However, every pixel in a rectified image has been resampled, introducing interpolation and resampling errors. For very tight tolerances, an alternative worth evaluating is to locate edges in the original sensor coordinates and transform those points geometrically, rather than detect edges in a resampled image. This aims to reduce the influence of filtering and interpolation on the result. Reference measurements must establish which approach works better.
Sending coordinates to a robot or PLC
When a part center has been located at image coordinates (u,v), the robot usually needs (X,Y,Z) or a pose estimate. The relationship between camera and workstation coordinates, or camera and robot coordinates, must be established. Even a good image-processing algorithm can send the wrong point if the world reference changes or a fixture loosens while the camera remains fixed. Mechanical stability and periodic verification matter as much as geometry.
Which parameters does camera calibration actually estimate?
The pinhole model projects a three-dimensional point into image coordinates using focal-length-dependent scale factors and the image center. The intrinsic matrix generally contains fx, fy, cx and cy. Extrinsic parameters describe camera rotation and translation relative to the chosen reference frame. Lens distortion coefficients model departures from ideal projection. These parameters alone are not a millimeter measurement: a physical reference and suitable assumptions about the measurement plane are still needed.
Why does diversity in calibration images matter?
A checkerboard or circular target should be captured at different positions, orientations and regions of the field of view. Keeping it in one place may not sufficiently constrain parameters across the image. To characterize corner distortion in particular, the target must appear near the boundaries as well as in the center. Its printing or manufacturing tolerances directly affect calibration results.
When is a homography sufficient, and when is it not?
A homography is a 3-by-3 transformation describing the perspective relationship between points on the same plane. It can align labels, flat PCBs, printed surfaces and thin parts on a table. Transforming points at different heights as though they belonged to one plane creates geometric errors. For a thick metal housing viewed obliquely, the upper and lower surfaces may not both be measured correctly using the same transformation.
| Technique | Problem addressed | Main limitation |
|---|---|---|
| Lens distortion correction | Radial and tangential image distortion | Does not independently establish scale on the reference plane |
| Homography | Planar perspective correction and alignment | Out-of-plane height variations |
| Camera-to-robot transformation | Converting image or camera coordinates into robot coordinates | Requires revalidation after mounting or timing changes |
| Multi-camera geometry | Reconstructing three-dimensional structure | Requires matching, synchronization and calibration |
Does a low reprojection error guarantee an accurate system?
No. Reprojection error indicates how well the model explains calibration points in the images. A low value is encouraging, but incorrect physical target dimensions or insufficient viewing angles can still cause errors in millimeter measurements. After calibration, validate physically using a separate reference part that was not used to calibrate the system.
First evaluate the detected center using an appropriate camera model, calculate the physical point on the working plane, then transform it into the robot's coordinate system. If the part moves between image capture and robot arrival, time synchronization with the conveyor encoder is also required.
Which calibration approach suits which application?
A homography may be sufficient to position a part on a flat surface. Measuring parts at different heights, however, introduces perspective effects. Stereo cameras and 3D sensors additionally require knowledge of relative camera positions and rectification. Relating camera coordinates to robot coordinates is a separate transformation problem in robotic systems.
The mechanical relationship between camera, lens and target must remain stable for calibration to remain valid in production. Temperature changes, focus-ring movement, vibration or fixture displacement can cause a transformation that worked on day one to drift later. Periodic reference-part checks and a record of error over time provide stronger evidence than the mean error from the initial calibration alone.
How should calibration results be reported?
A report should contain more than the camera matrix. Record physical target dimensions, image resolution, focus, aperture, number of images and variety of viewing angles. In addition to mean reprojection error, examine its distribution near image corners and across target positions. Finally, validate physically by measuring different known distances in the actual application plane.
Why examine radial and tangential distortion separately?
Radial distortion may bend geometry inward or outward increasingly with distance from the image center. Common model terms include k1, k2 and k3. Tangential distortion can represent asymmetric effects related to departures from ideal lens-to-sensor alignment; models using p1 and p2 are common. No single model should be expected to describe every physical lens perfectly across its full field.
More free parameters do not automatically make a calibration model better. With limited data, additional coefficients can fit the calibration images while becoming unstable at real application points. Start with a suitably simple model and inspect error distributions on independent validation images.
Is the geometric transformation being applied correctly after calibration?
The calibrated image resolution must remain consistent with later ROI, cropping and resizing operations. For example, principal-point coordinates must be shifted when using an ROI different from the original full image. Autofocus and digital stabilization can also alter calibration assumptions. In production systems, version image-processing settings together with calibration.
Frequently asked questions
Must the camera be calibrated again for every image?
Parameters can be reused if the mechanical and optical setup remains stable. Changes to focus, lens, sensor position or installation require revalidation.
Does a homography correct lens distortion?
A homography models planar perspective. Lens distortion must be addressed separately.
Does a near-zero reprojection error guarantee accurate measurement?
Not by itself. Validate using an independent physical reference.
Technical references
This article combines explanations supported by technical references with educational numerical examples. The example system values are not measurements from an actual facility.