s6.utils.camera_captureΒΆ
Shared synchronized multi-camera capture helpers.
- class s6.utils.camera_capture.SyncStats(release_host_ts: float, oldest_frame_host_ts: float, newest_frame_host_ts: float, oldest_frame_age_sec: float, newest_frame_age_sec: float, bundle_host_skew_sec: float, seqs: List[int], gst_pts_ns: List[int | None])
Bases:
objectHost-side timing stats for the most recent synchronized frame bundle.
- release_host_ts: float
- oldest_frame_host_ts: float
- newest_frame_host_ts: float
- oldest_frame_age_sec: float
- newest_frame_age_sec: float
- bundle_host_skew_sec: float
- seqs: List[int]
- gst_pts_ns: List[int | None]
- class s6.utils.camera_capture.MultiCameraCapture(pipeline_sources: Sequence[Any], *, source_labels: Sequence[str] | None = None, api_preference: int = cv2.CAP_GSTREAMER, startup_timeout_sec: float = 5.0, stale_frame_timeout_sec: float = 1.0, fps_window_sec: float = 1.0, sync_recovery_fps_ratio_threshold: float = 0.5, sync_recovery_cooldown_sec: float = 0.25, backend: str = 'auto')
Bases:
objectThreaded synchronized capture over multiple camera sources.
- start() None
- stop() None
- get_synced_frames(*, timeout_sec: float = 1.0, max_seq_skew: int = 0, copy_frames: bool = True) List[ndarray]
- get_camera_fps() List[float]
- get_synced_fps() float
- get_last_sync_stats() SyncStats | None
- get_backend_name() str