Camera Calibration Pipeline Test - Synthetic Chessboard
Description
Testing the new camera calibration pipeline with automatic quality evaluation. This test uses a synthetically generated video with 9x6 chessboard pattern moving across different positions and orientations to test the full calibration workflow. Key Results: - Overall Quality Score: 84.4/100 - Reprojection Error (RMSE): 3.7722 pixels - Valid Views: 25 - Spatial Coverage: 55.6% The pipeline includes: 1. Automatic chessboard detection from video (samples every Nth frame) 2. OpenCV-based camera calibration with rational distortion model 3. Quality assessment including: - Spatial coverage (checkerboard position distribution across 3x3 grid) - Orientation variance analysis - Distance variation check - Minimum view count validation 4. HTML visualization report with all metrics Test data location: `/home/xpeng/data/slam/calib_20250325_01/` ## Test Video Due to browser codec compatibility issues, you can directly download the video: **[Download Test Video](/static/uploads/calibration/synthetic_calibration.mp4)** (18.8 MB) Video: `synthetic_calibration.mp4` - 30 seconds of 9×6 chessboard pattern at 30 FPS You can also open the file directly at: `/home/xpeng/Documents/robot/xrollout/static/uploads/calibration/synthetic_calibration.mp4` Data location: `/home/xpeng/data/slam/calib_20250325_01/`
01 Input & Feature Detection
Check that chessboard corners were detected correctly. Red circles indicate detected corner positions.
Overview: All Detections Collage
Spatial Coverage Analysis
This shows how many detections fell into each region of the image frame. Good calibration requires detections spread across the entire frame.
02 Calibration Results Summary
Key calibration parameters computed from the detected feature points.
Camera Intrinsic Matrix (K)
| 347605.46 | 0.00 | 319.73 |
| 0.00 | 347605.46 | 239.28 |
| 0.00 | 0.00 | 1.00 |
- fx = 347605.46 — focal length (x-axis)
- fy = 347605.46 — focal length (y-axis)
- cx = 319.73 — principal point x
- cy = 239.28 — principal point y
Distortion Coefficients
| k1 (radial) | k2 (radial) | p1 (tangential) | p2 (tangential) | k3 (radial) |
|---|---|---|---|---|
-0.000129 |
0.000546 |
-0.522670 |
0.118658 |
-0.000139 |
Model: [k1, k2, p1, p2, k3] — OpenCV rational distortion model
03 Quality Assessment
Visual analysis of calibration quality to verify good coverage and check for systematic errors.
Quality Metrics Summary
| Metric | Value | Score | Description |
|---|---|---|---|
| Spatial Coverage | 56% | How completely detections cover the image frame | |
| Orientation Variance | 4.9°² | Variation in viewing angles (higher = better) | |
| Distance Variance | 0.079 | Variation in distances (higher = better) |
🔍 Observability Analysis
Good camera calibration requires that chessboard patterns be observed with good variation in position, orientation, and distance from the camera. This allows the optimization algorithm to accurately estimate all intrinsic and distortion parameters.
💡 Data Collection Recommendations
🎯 Vary Your Angles
Explicitly tilt the chessboard at steep angles in all directions (left tilt, right tilt, forward/backward tilt). The estimation of focal length and distortion depends heavily on seeing the pattern from different viewpoints. If all views are fronto-parallel, the camera cannot correctly separate focal length from object distance.
🗺️ Cover the Entire Frame
Include images where the chessboard goes all the way to the edges and corners of the image. Distortion is greatest at the periphery, so you need samples there to accurately estimate it.
📏 Change Distances
Move the camera closer to and farther away from the calibration pattern. This helps separate different distortion parameters and improves overall robustness.
🔄 Blur Is Okay, Don't Worry
Slight motion blur is acceptable as long as corners are still detected. It's better to have blurry but varied views than sharp but all similar views.
04 Undistortion Validation
Compare original image vs. undistorted image to verify distortion correction works correctly.
Upload your own sample image to see the undistortion comparison.
Applications
This calibration can be used directly in: