Camera calibration
Estimate a camera’s intrinsic parameters and lens distortion from known target geometry.
Known square spacing ties many observed image points to one target coordinate system.
Interior checkerboard intersections provide repeated point correspondences. Multiple poses constrain the camera parameters.
The optimizer adjusts intrinsics, distortion and each view’s pose to reduce the distance between predicted and detected points.
The intrinsic matrix relates camera coordinates to pixels. Distortion parameters and per-view poses complete this illustrative calibration model.
Optimize intrinsics, distortion and each view’s pose to reduce reprojection error.
Illustrative example. The stages explain the method; they are not a live OpenCV execution.
Try it on an image
Experiment at pixel level
Preview calibration corner detection in your checkerboard photo. A single view cannot provide a reliable camera calibration; this lab focuses on its image-dependent corner stage.
The engine loads on your first run. Your images stay in this browser.
Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.
Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Select a pixel
Select a pixel
When to use it
Measure geometry, remove lens distortion, or prepare images for stereo reconstruction.
How it works
- 01Detect known target points in multiple views.
- 02Relate their 3D target coordinates to observed 2D pixels.
- 03Optimize intrinsics, distortion and each view’s pose to reduce reprojection error.
3D target → camera pose → projection → observed pixel
What to tune
Use consistent physical units and image size. Calibration flags determine which model parameters are fitted or fixed.
Where it breaks down
Poor target coverage or nearly identical views leave parameters weakly constrained. A low average error alone does not prove calibration quality.
TypeScript API
Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.
All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.
Related methods
Lens undistortion
Invert a calibrated lens model to map distorted observations onto an idealized camera image.
Perspective-n-point pose
Estimate a camera-relative object pose from known 3D points and their 2D image observations.
Fundamental and essential matrices
Constrain where a point from one camera view can appear in another.
Stereo block matching
Find horizontal correspondences between rectified stereo images using local block similarity.