Skip to content

Commit 6805208

Browse files
committed
refactor: directly use V4LCamera
1 parent 91f4219 commit 6805208

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/arduino/app_peripherals/usb_camera/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import warnings
77
from PIL import Image
88
from arduino.app_peripherals.camera import Camera, CameraReadError as CRE, CameraOpenError as COE
9+
from arduino.app_peripherals.camera.v4l_camera import V4LCamera
910
from arduino.app_utils.image.image_editor import compressed_to_png, letterboxed
1011
from arduino.app_utils import Logger
1112

@@ -47,10 +48,7 @@ def __init__(
4748
if letterbox:
4849
pipe = pipe | letterboxed() if pipe else letterboxed()
4950

50-
self._wrapped_camera = Camera(source=camera,
51-
resolution=resolution,
52-
fps=fps,
53-
adjustments=pipe)
51+
self._wrapped_camera = V4LCamera(camera, resolution, fps, pipe)
5452

5553
def capture(self) -> Image.Image | None:
5654
"""Captures a frame from the camera, blocking to respect the configured FPS.

0 commit comments

Comments
 (0)