Skip to content

Add ChArUco board generator for dual-camera calibration jig#33

Open
danielkaijzer wants to merge 6 commits into
mainfrom
claude/calibration-jig-review-aKec3
Open

Add ChArUco board generator for dual-camera calibration jig#33
danielkaijzer wants to merge 6 commits into
mainfrom
claude/calibration-jig-review-aKec3

Conversation

@danielkaijzer

Copy link
Copy Markdown
Owner

Summary

Add a script to generate printable ChArUco calibration boards at three different square sizes (15mm, 22mm, 30mm) for the dual-camera calibration jig. The boards are optimized to fill US Letter pages and include reference rulers for verification.

Key Changes

  • generate_charuco_boards.py: New script that:

    • Generates ChArUco boards using OpenCV's DICT_5X5_1000 dictionary
    • Creates three board sizes with different marker IDs to avoid conflicts
    • Tiles squares to maximize calibration points across the full page
    • Renders boards as PNG images at 600 DPI for precise scaling
    • Generates PDF output with centered boards, margins, and a 50mm reference ruler
    • Includes detailed printing instructions and board specifications in the PDF footer
  • Generated artifacts: Three pairs of PNG and PDF files (small, medium, large) ready for printing and use in calibration

Notable Implementation Details

  • Uses reportlab for PDF generation with precise millimeter-based positioning
  • Marker size is 72% of square size for optimal detection
  • Each board size uses a different ID offset (0, 200, 400) to prevent marker ID collisions
  • Reference ruler (50mm) included in bottom margin for users to verify correct print scale
  • Comprehensive metadata printed on each PDF (square size, marker size, grid dimensions, ID ranges)
  • Emphasizes 100% / "Actual size" printing to prevent silent rescaling

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr

claude added 6 commits June 8, 2026 17:45
Generates small/medium/large ChArUco boards (15/22/30 mm squares) as
exact-size US-Letter PDFs for testing which marker size the headset
cameras resolve at the jig working distance before committing to a
laminated final board. Each board uses a distinct ID range so sizes
don't collide. PDFs include a 50 mm reference ruler to catch print
scaling.

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
Each board now tiles as many squares as fit on US-Letter so the pattern
covers the whole sheet. Camera sees more calibration points in every
partial view. Grids are now 13x17 / 9x11 / 6x8 vs the previous 5x7.

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
Cameras are more likely to see the lower part of the panel, so the
board now fills from the bottom up and the 50 mm ruler + label sit in
the top margin.

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
Computes the rigid transform between the two non-overlapping cameras
using the jig's two ChArUco boards. Formulated as a robot-world/hand-eye
problem (cv2.calibrateRobotWorldHandEye) so it recovers both the camera
extrinsic and the board-to-board transform from varied rig poses — no
need to measure where the boards sit on the panels, only that the jig is
rigid.

Captures synchronized pairs from both cameras (SPACE/C/R/Q like the
intrinsics script), solves each board pose via matchImagePoints+solvePnP,
runs SHAH and LI and keeps the lower-residual result. Reports pose
diversity, camera baseline, inter-camera angle, and recovered board
separation (sanity-checked against measured panel spacing). Saves both
T_eye_scene and T_scene_eye (the latter is what gaze projection needs).

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
…flow

Mirrors calibrate_scene_intrinsics.py for the eye camera (eye-cam
resolution, optional vertical flip for inverted mounts) and saves
eye_intrinsics.npz in the format the extrinsics script expects. Documents
the full intrinsics + extrinsics calibration flow and output files in the
backend README.

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
Records the rig display's physical active area (~326.6 x 211.4 mm) and the
logical-points-vs-native-pixels caveat, so the future data-collection
pipeline can convert on-screen marker positions to metric object points and
recover fixation depth via solvePnP. Reference data only; no pipeline code.

https://claude.ai/code/session_01LwRnc5nA2QKS7GYMUA8aHr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants