diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-06-09 18:49:05 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-06-09 18:49:05 -0600 |
| commit | 51f04ada503b02c598c9940c96fdc444cf5da52a (patch) | |
| tree | 7fd4db831b96323dc5451e11b63ec329a320df97 /plugins/motion_capture/device.py | |
| parent | c16b8546c72673534965da5590a62ba3ee7635d3 (diff) | |
| parent | 898fde4dc286517cb27590b2f9cd7406d9922bd4 (diff) | |
Merge fix/motion-capture: template matching + frame-freeze selection UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'plugins/motion_capture/device.py')
| -rw-r--r-- | plugins/motion_capture/device.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/motion_capture/device.py b/plugins/motion_capture/device.py index 9806030..8eb1591 100644 --- a/plugins/motion_capture/device.py +++ b/plugins/motion_capture/device.py @@ -26,7 +26,8 @@ class CameraDevice(BaseDevice): def __init__(self, device_id: str = "cam_0", camera_index: int = 0, - simulate: bool = False): + simulate: bool = False, + resolution=None): name = "Camera (Sim)" if simulate else f"Camera {camera_index}" super().__init__(DeviceInfo( device_id = device_id, @@ -55,6 +56,7 @@ class CameraDevice(BaseDevice): )) self._camera_index = camera_index self._simulate = simulate + self._resolution = resolution self._tracker: Optional[Any] = None self._tracking_win = None @@ -63,7 +65,10 @@ class CameraDevice(BaseDevice): def connect(self) -> bool: from tracker import CameraTracker self._tracker = CameraTracker() - self._tracker.start(-1 if self._simulate else self._camera_index) + self._tracker.start( + -1 if self._simulate else self._camera_index, + resolution=self._resolution, + ) if self._tracker.simulated: self.status = DeviceStatus.SIMULATED else: |
