Calibrate Subsets
SUMMARY
calibrate_subsets() calibrates and triangulates every camera subset of the given sizes, useful for finding which camera combination gives the most reliable rig.
SUPPORTED TARGETS
Available only on CharucoTarget, it calibrates and triangulates each subset, and both stages require per-corner ArUco ids.
UNITS
Input images are BGR ndarrays. Returned transforms are (4, 4) SE(3) matrices with translation in meters; reprojection errors are in pixels.
The Skill
python
subset_results = calibrator.calibrate_subsets(image_lists, subset_sizes=[2, 3], frame_index=0)| Skill | Returns | Description |
|---|---|---|
calibrate_subsets(image_lists, subset_sizes=[2, 3], frame_index=0) | list[SubsetResult] | Calibrate and triangulate every camera subset of the given sizes. |
| Parameter | Type | Description |
|---|---|---|
image_lists | list[list[ndarray]] | image_lists[cam][frame]; every camera must have the same frame count. |
subset_sizes | list[int] | Subset sizes to evaluate. Default [2, 3]. |
frame_index | int | Frame to triangulate for each subset. Default 0. |
The Code
python
from telekinesis.axon import MultiCameraCalibrator
from telekinesis.axon.targets import CharucoTarget
target = CharucoTarget(squares_x=6, squares_y=9, square_length=0.012, marker_length=0.009)
calibrator = MultiCameraCalibrator(target, num_cameras=4, reference_index=1)
subset_results = calibrator.calibrate_subsets(image_lists, subset_sizes=[2, 3], frame_index=0)
for subset in subset_results:
subset.subset # e.g. [0, 1]
subset.result.ok
subset.has_triangulationSubsetResult
| Field | Type | Description |
|---|---|---|
subset | list[int] | Camera indices in this subset. |
result | MultiCameraResult | Calibration result for this subset, see calibrate(). |
has_triangulation | bool | Whether triangulation was computed for this subset. |
triangulation | TriangulationReport | Triangulation report for this subset, see triangulate(). |