File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/arduino/app_peripherals/camera Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def _open_camera(self) -> None:
7878 self ._cap = cv2 .VideoCapture (url )
7979 if not self ._cap .isOpened ():
8080 raise CameraOpenError (f"Failed to open IP camera: { self .url } " )
81-
81+
8282 self ._cap .set (cv2 .CAP_PROP_BUFFERSIZE , 1 ) # Reduce buffer to minimize latency
8383
8484 # Test by reading one frame
Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ def _open_camera(self) -> None:
126126 self ._cap = cv2 .VideoCapture (self .device_index )
127127 if not self ._cap .isOpened ():
128128 raise CameraOpenError (f"Failed to open V4L camera { self .device_index } " )
129-
129+
130130 self ._cap .set (cv2 .CAP_PROP_BUFFERSIZE , 1 ) # Reduce buffer to minimize latency
131-
131+
132132 # Set resolution if specified
133133 if self .resolution and self .resolution [0 ] and self .resolution [1 ]:
134134 self ._cap .set (cv2 .CAP_PROP_FRAME_WIDTH , self .resolution [0 ])
You can’t perform that action at this time.
0 commit comments