Added use_video_port argument back to array()
This commit is contained in:
parent
3eb2aa8823
commit
f51d4ff200
1 changed files with 2 additions and 5 deletions
|
|
@ -518,7 +518,7 @@ class PiCameraStreamer(BaseCamera):
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def array(self) -> np.ndarray:
|
def array(self, use_video_port=True) -> np.ndarray:
|
||||||
"""Capture an uncompressed still RGB image to a Numpy array.
|
"""Capture an uncompressed still RGB image to a Numpy array.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -531,11 +531,8 @@ class PiCameraStreamer(BaseCamera):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
logging.debug("Creating PiRGBArray")
|
logging.debug("Creating PiRGBArray")
|
||||||
with picamerax.array.PiRGBArray(self.camera) as output:
|
with picamerax.array.PiRGBArray(self.camera) as output:
|
||||||
|
|
||||||
logging.info("Capturing to %s", (output))
|
logging.info("Capturing to %s", (output))
|
||||||
|
self.camera.capture(output, format="rgb", use_video_port=use_video_port)
|
||||||
self.camera.capture(output, format="rgb", use_video_port=True)
|
|
||||||
|
|
||||||
return output.array
|
return output.array
|
||||||
|
|
||||||
# HANDLE STREAM FRAMES
|
# HANDLE STREAM FRAMES
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue