xr_ai_tools.marker_tracking#

QR and ArUco marker detection from live participant frames.

Classes#

MarkerType

Marker families supported by MarkerTrackingTool.

MarkerTrackingRequest

Track markers in one participant's current live camera frame.

MarkerPoint

One image-space corner of a tracked marker.

TrackedMarker

One detected marker and its quadrilateral in the source frame.

MarkerTrackingResult

All enabled markers found in one current camera frame.

MarkerTrackingTool

A finite tool that tracks enabled marker families in a current frame.

Module Contents#

class xr_ai_tools.marker_tracking.MarkerType#

Marker families supported by MarkerTrackingTool.

QR_CODE = 'qr_code'#

QR codes containing arbitrary text.

ARUCO = 'aruco'#

ArUco fiducial markers containing numeric identifiers.

class xr_ai_tools.marker_tracking.MarkerTrackingRequest#

Track markers in one participant’s current live camera frame.

participant_id: str#

Participant whose current camera frame should be scanned.

class xr_ai_tools.marker_tracking.MarkerPoint#

One image-space corner of a tracked marker.

x: float#

Horizontal pixel coordinate.

y: float#

Vertical pixel coordinate.

class xr_ai_tools.marker_tracking.TrackedMarker#

One detected marker and its quadrilateral in the source frame.

marker_type: MarkerType#

Detected marker family.

value: str#

Decoded QR text or decimal ArUco marker identifier.

corners: tuple[MarkerPoint, MarkerPoint, MarkerPoint, MarkerPoint]#

Four clockwise image-space corners.

class xr_ai_tools.marker_tracking.MarkerTrackingResult#

All enabled markers found in one current camera frame.

markers: list[TrackedMarker]#

Detected markers in detector-provided order.

available: bool#

Whether a current frame was available and could be scanned.

message: str | None#

Human-readable detail when no marker was returned.

class xr_ai_tools.marker_tracking.MarkerTrackingTool(
*,
endpoint: xr_ai_hub.ProcessorEndpoint,
marker_types: collections.abc.Iterable[MarkerType | str] = (MarkerType.QR_CODE, MarkerType.ARUCO),
aruco_dictionary: str = 'DICT_4X4_50',
frame_max_age_s: float = 2.0,
frame_timeout_s: float = 5.0,
manage_status: bool = True,
)#

A finite tool that tracks enabled marker families in a current frame.

release(participant_id: str) None#

Forget cached frame state after a participant disconnects.