I. Calibration Target Selection
1. Target Size Selection
Select the target size based on the camera's Field of View (FOV). It is recommended that the target pattern covers at least 1/4 but less than the entire FOV, capturing 15–20 calibration images. For higher accuracy, the pattern should cover more than 1/3 but less than the full FOV, with the number of images determined by specific requirements.
2. Material Selection
Front Lighting: Choose ceramic or metal targets to avoid specular reflections. Backlighting: Optical glass targets are suitable.
II. Pre-Calibration Preparation
Camera Fixation: Lock the camera securely on a tripod or mount. Focal length, aperture, and focus must remain constant throughout the process; do not adjust these parameters after calibration.
Lighting: Use uniform diffuse lighting. Avoid specular reflections, shadows, overexposure, or underexposure.
Working Distance: Match the actual measurement distance. If there is a height difference, record it and apply compensation in the software.
III. Image Acquisition
Objective: Capture 15–25 sharp images at diverse poses to cover the entire FOV.
Standards: The target must appear in five regions: top-left, top-right, bottom-left, bottom-right, and center. Images must be free of motion blur, defocus, and reflections. All corner points must be intact, uncropped, and unoccluded.
Quantity: ≥10 images for general scenes; ≥15 images for industrial/high-precision applications.
IV. Software Calibration (OpenCV/Halcon Examples)
1. Input Target Parameters
Chessboard: Number of inner corner rows and columns (e.g., 7×5, not the number of squares), and actual square size (unit: meters/millimeters).
Circle Grid: Center-to-center spacing and dot diameter.
2. Corner Extraction & Refinement
Automatically detect corners (e.g., OpenCV findChessboardCorners).
Apply sub-pixel refinement (cornerSubPix) to improve localization accuracy.
Discard images with failed corner detection or blur.
3. Camera Parameter Estimation
Intrinsics: Focal lengths ( fx,fy ), principal point ( cx,cy ), distortion coefficients ( k1,k2,p1,p2,k3).
Extrinsics: Rotation and translation matrices for each image.
Reprojection Error (RMS): Industrial requirement < 0.5 pixels; excellent performance < 0.2 pixels.
4. Save & Application
Save calibration files (yml/.dat/.vcal).
Load this file during subsequent measurements to automatically correct distortion and compute physical dimensions.
V. Calibration Validation (Mandatory)
Reprojection Error Check: If RMS is excessive (>1 pixel), recapture images or replace the target.
Distortion Correction Test: Undistort test images using calibrated parameters; straight lines must appear perfectly straight without barrel/pincushion distortion.
Dimensional Verification: Capture an object of known dimensions; the error between calculated and true values should be ≤0.1% for high-precision applications.
VI. Common Pitfalls & Best Practices
Frontal-only shots (no tilt) → Inaccurate distortion correction
Blurry / reflective images → Failed corner extraction, high error
Adjusting focus/aperture post-calibration → Invalidates calibration entirely
Using standard A4 paper → Poor accuracy due to deformation
Suggestion: Use glass/ceramic targets + ≥15 multi-angle images + sub-pixel refinement