Skip to content

Commit 0e9857b

Browse files
committed
Add optional image argument to camera read()
Enables optimization by not having to create new images all the time
1 parent e1dd199 commit 0e9857b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cv2_drivers/cameras/hm01b0_pio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,13 @@ def open(self):
321321
def release(self):
322322
self.active(False)
323323

324-
def read(self):
324+
def read(self, image = None):
325325
"""
326326
Reads a frame from the camera.
327327
Returns:
328328
tuple: (success, frame)
329329
"""
330-
return (True, cv2.cvtColor(self.buffer, cv2.COLOR_BayerRG2BGR))
330+
return (True, cv2.cvtColor(self.buffer, cv2.COLOR_BayerRG2BGR, image))
331331

332332
def _vsync_handler(self):
333333
# Disable DMA before reconfiguring it

0 commit comments

Comments
 (0)