feat(cameracalibrate): charuco boards and a --check mode#3161
Draft
AaryanAgrawal wants to merge 1 commit into
Draft
feat(cameracalibrate): charuco boards and a --check mode#3161AaryanAgrawal wants to merge 1 commit into
AaryanAgrawal wants to merge 1 commit into
Conversation
…ting chessboard/fisheye command Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(cameracalibrate): charuco boards and a --check mode
Problem
dimos cameracalibratehandled a chessboard only, and there was no way to tell whether a shipped calibration had drifted. Charuco boards recover intrinsics from partial/occluded views a plain chessboard can't, and a drifted calibration silently poisons every downstream pose estimate.What this adds
cv2.calibrateCamera/cv2.fisheye.calibratesolvers.--checkmode — re-score an existing calibration against fresh frames: per-view solvePnP reprojection RMS + drift vs a fresh calibration in the deployed lens model → anOK/DEGRADEDverdict and a JSON report.qto quit). Hint only; never gates capture.Additive: chessboard detection, both calibration solvers,
write_camera_info_yaml, and the capture loop are untouched.Breaking Changes
--checkon a charuco target solves viacv2.calibrateCameraover the id-selected correspondences (same math ascalibrateCameraCharuco).Core changes — why
utils/cli/cameracalibrate/cameracalibrate.py— one detector path per board, onecv2.calibrateCamera/cv2.fisheye.calibrateover per-view correspondences,write_camera_info_yamlfor the saved intrinsics. Uses verified OpenCV throughout;is_fisheye_modelis imported frommarker_pose, not re-implemented.robot/cli/dimos.py— thecameracalibratecommand wiring (flags →run_calibration/run_check_report).How to Test
Hardware. Point a camera at a charuco (or chessboard), capture ~15 views, calibrate, then
--checkthe result against fresh frames:Test to read:
test_cameracalibrate.py::test_write_camera_info_yaml_round_trips_through_dimos_camera_info— the saved YAML loads back identically throughDimosCameraInfo. Calibration math itself is verified OpenCV.AI assistance
Claude Code (Opus 4.8 / Fable 5) — implementation + simplification; all changes reviewed.
Checklist
uv run pytest+ pre-commit for the changed files.