s6.utils.camera_identifier_bottomΒΆ

Bottom-camera identifier utilities.

This module provides a lightweight two-frame identifier for bottom views, mapping incoming frames to role IDs such as LL and LR.

class s6.utils.camera_identifier_bottom.BottomConfig(bottom_ids: Tuple[str, str]=('LL', 'LR'), params: Dict[str, ~typing.Any]=<factory>)

Bases: object

Configuration for bottom camera ID assignment.

bottom_ids

Output IDs in left-right order.

Type:

tuple[str, str]

params

Optional extra params reserved for future heuristics.

Type:

dict[str, Any]

bottom_ids: Tuple[str, str] = ('LL', 'LR')
params: Dict[str, Any]
class s6.utils.camera_identifier_bottom.CameraIDIdentifierBottom(config: BottomConfig | None = None)

Bases: object

Identify bottom camera IDs from exactly two frames.

The current heuristic computes a brightness asymmetry score for each image: mean(left third) - mean(right third). The frame with higher score is assigned the left ID, and the other frame is assigned the right ID.

reset() None

Clear stabilization state and fixed mapping.

identify(frames: Sequence[ndarray], stabilize_frames: int = 1) Dict[str, int]

Identify frame indices for configured bottom IDs.

order(frames: Sequence[ndarray]) Dict[str, ndarray]

Return mapping from configured bottom IDs to frame arrays.