Skip to content

API/GUI parity: document what exists, fix what did not work - #1009

Merged
mprib merged 11 commits into
mainfrom
feature/api-gui-parity
Jul 25, 2026
Merged

API/GUI parity: document what exists, fix what did not work#1009
mprib merged 11 commits into
mainfrom
feature/api-gui-parity

Conversation

@mprib

@mprib mprib commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Documentation cleanup plus a few additions to the scripting surface.

Docs

docs/scripting.md stopped at align_to_object and save, leaving several things that already worked undocumented. It now covers printing a board, rotating the axes, shifting the origin, anchoring without a board, and the aniposelib export, and closes with a table mapping GUI controls to their API calls.

The home page opened on pairwise PnP and transitive chaining, which is initialization detail already covered in extrinsic_calibration.md. Rewritten around the three stages, then split into the two entry points: with a calibration target and without one.

Fixes

extract_image_points held rotation_count as a local pinned to 0, and the multicam path passed a literal 0, so a script could not set a camera rotation. Both now accept it. No effect on Charuco, ArUco, or chessboard detection, which is rotation-invariant; ONNX pose trackers use it.

CameraArray.from_toml, to_toml, to_aniposelib_toml, and the Charuco TOML methods required a Path and raised AttributeError on a string, unlike CaptureVolume.save and load, which already took either. All widened to Path | str.

Additions

CaptureVolume.translate(x, y, z) shifts the coordinate system by a fixed offset, the companion to rotate. grounded and centered are now built on it, collapsing three copies of the same identity-rotation transform.

grounded gains lowest_point_height_m. It rests the lowest triangulated point on Z=0, but that point is a marker rather than the floor, so a toe marker leaves the ground plane buried by the height of the shoe:

volume = volume.grounded(lowest_point_height_m=0.02)

Defaults to 0.0, so existing callers are unchanged.

Notes

Board width and height never reach the calibration; they only size the rendered PNG. A test now pins that, since the docs say so.

Version bumped to 0.11.4. Full suite passes.

mprib added 11 commits July 25, 2026 10:39
Scene frames are sync indices, so a 60 fps capture played at Blender's 24
fps default runs 2.5x slow and the camera backgrounds drift against the
skeleton. write_blender_scene now requires an fps argument and stamps it
into scene.render.fps.
Runs the markerless pipeline on OpenCap LabValidation footage and scores
the recovered poses against OpenCap's own checkerboard calibration. The
syncdWithMocap videos carry a constant per-camera frame offset, so the
script measures it by keypoint cross-correlation and settles the integer
by reprojection error before calibrating.
extract_image_points held rotation_count as a local pinned to 0 and the
multicam path passed a literal 0, so a script had no way to say what the
GUI's rotate buttons say. Both now take the quarter-turn count.

Charuco, ArUco, and chessboard detection is rotation-invariant and ignores
it; ONNX pose trackers need it to see an upright body.
CaptureVolume.save and load take Path | str, but CameraArray.from_toml,
CameraArray.to_toml, to_aniposelib_toml, and the Charuco TOML methods
required a Path and raised AttributeError on a string. The scripting docs
pass strings, so the reload example in them could not run.

Also pins the board-size equivalence the docs now promise: board_width and
board_height never reach the geometry, because both the GUI and from_squares
set square_size_override_cm.
…he scripting guide

The guide stopped at align_to_object and save, so three things the GUI does
had no scripted equivalent on the page: printing a board, rotating the axes,
and writing camera_array_aniposelib.toml. All three already existed in the
API. Adds a GUI control to API call table so the gap is visible at a glance.

Also states what the board width and height do, since the GUI collects them
and from_squares does not: they set the printed aspect ratio and nothing else.
grounded() rests the lowest triangulated point on Z=0, but that point is a
marker rather than the floor. A toe marker rides above the ground on the shoe
and its own thickness, so the recovered floor sits low by that amount. There
was no way to correct it short of hand-editing the saved points.

translate shifts points and cameras together by a fixed offset in meters,
leaving shape and scale alone. It is the companion to rotate.
…correction

Three copies of the same identity-rotation SimilarityTransform block existed;
grounded and centered now resolve to translate instead.

grounded gains lowest_point_height_m. It defaults to 0.0, so existing callers
are unchanged, and the demo scripts still ground the same way.
What it solves opened on pairwise PnP and transitive chaining, which is
initialization detail and already covered in the extrinsic calibration page.
It said nothing about intrinsics, anchoring, the GUI, the scripting API, or
markerless calibration, all of which the tool now does.

Replaces that with the three stages, then splits the two entry points into
their own sections: with a target, and without one.
The full constructor takes square_size_override_cm; square_size_cm belongs to
from_squares, which is the other example on the page.
@mprib
mprib merged commit b3f37a1 into main Jul 25, 2026
5 checks passed
@mprib
mprib deleted the feature/api-gui-parity branch July 25, 2026 19:43
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