Skip to content

Undistort marker points before solving the calibration homography#34

Open
danielkaijzer wants to merge 1 commit into
mainfrom
use-intrinsics-for-homography
Open

Undistort marker points before solving the calibration homography#34
danielkaijzer wants to merge 1 commit into
mainfrom
use-intrinsics-for-homography

Conversation

@danielkaijzer

Copy link
Copy Markdown
Owner

findHomography assumes a pinhole model, but marker corners sit near the frame edges where real lens distortion is largest — biasing the fit exactly where accuracy matters most. When scene_intrinsics.json is present, ArucoHomography now solves in undistorted/normalized space and redistorts projected points back to raw scene-cam pixels before use, so labels.csv, the live overlay, and saved frames all stay in the same pixel-space contract as before. Falls back to the old raw-pixel-space solve unchanged if no intrinsics file exists.

Also centralizes the homography homogeneous-divide into ArucoHomography.project_via_homography(), replacing hand-rolled H@[x,y,1] math in routine.py's tick()/_log_aruco_check(), and wires the previously unused screen_to_scene/scene_to_screen interface through the same path.

findHomography assumes a pinhole model, but marker corners sit near the
frame edges where real lens distortion is largest — biasing the fit
exactly where accuracy matters most. When scene_intrinsics.json is
present, ArucoHomography now solves in undistorted/normalized space and
redistorts projected points back to raw scene-cam pixels before use, so
labels.csv, the live overlay, and saved frames all stay in the same
pixel-space contract as before. Falls back to the old raw-pixel-space
solve unchanged if no intrinsics file exists.

Also centralizes the homography homogeneous-divide into
ArucoHomography.project_via_homography(), replacing hand-rolled H@[x,y,1]
math in routine.py's tick()/_log_aruco_check(), and wires the previously
unused screen_to_scene/scene_to_screen interface through the same path.
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.

1 participant