Skip to content

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)
SkillReturnsDescription
calibrate_subsets(image_lists, subset_sizes=[2, 3], frame_index=0)list[SubsetResult]Calibrate and triangulate every camera subset of the given sizes.
ParameterTypeDescription
image_listslist[list[ndarray]]image_lists[cam][frame]; every camera must have the same frame count.
subset_sizeslist[int]Subset sizes to evaluate. Default [2, 3].
frame_indexintFrame 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_triangulation

SubsetResult

FieldTypeDescription
subsetlist[int]Camera indices in this subset.
resultMultiCameraResultCalibration result for this subset, see calibrate().
has_triangulationboolWhether triangulation was computed for this subset.
triangulationTriangulationReportTriangulation report for this subset, see triangulate().