Skip to content

Camera calibration

Estimate a camera’s intrinsic parameters and lens distortion from known target geometry.

Try it on your image ↓

VISUAL WALKTHROUGH3D vision
REFERENCE INPUTKnown calibration target in several views

Known square spacing ties many observed image points to one target coordinate system.

RESULTEstimate the camera model

The intrinsic matrix relates camera coordinates to pixels. Distortion parameters and per-view poses complete this illustrative calibration model.

STEP 03 / 03

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

YOUR IMAGE · REAL OPENCV

Experiment at pixel level

Open full lab ↗

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.

Input448 × 320
OutputWaiting for a result

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
Hover to inspect. Click to pin a pixel.
Input
Select a pixel

Output
Select a pixel

Sample models and licenses

When to use it

Measure geometry, remove lens distortion, or prepare images for stereo reconstruction.

How it works

  1. 01Detect known target points in multiple views.
  2. 02Relate their 3D target coordinates to observed 2D pixels.
  3. 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.