API/GUI parity: document what exists, fix what did not work - #1009
Merged
Conversation
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.
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.
Documentation cleanup plus a few additions to the scripting surface.
Docs
docs/scripting.mdstopped atalign_to_objectandsave, 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_pointsheldrotation_countas 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 theCharucoTOML methods required aPathand raisedAttributeErroron a string, unlikeCaptureVolume.saveandload, which already took either. All widened toPath | str.Additions
CaptureVolume.translate(x, y, z)shifts the coordinate system by a fixed offset, the companion torotate.groundedandcenteredare now built on it, collapsing three copies of the same identity-rotation transform.groundedgainslowest_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: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.