imagecapture
– Support for “Parallel capture” interfaces
See also
Espressif microcontrollers use the espcamera
module together.
Available on these boards
- class imagecapture.ParallelImageCapture(*, data_pins: List[microcontroller.Pin], clock: microcontroller.Pin, vsync: microcontroller.Pin | None, href: microcontroller.Pin | None)
Capture image frames from a camera with parallel data interface
Create a parallel image capture object
This object is usually used with a camera-specific wrapper library such as adafruit_ov5640.
- Parameters:
data_pins (List[microcontroller.Pin]) – The data pins.
clock (microcontroller.Pin) – The pixel clock input.
vsync (microcontroller.Pin) – The vertical sync input, which has a negative-going pulse at the beginning of each frame.
href (microcontroller.Pin) – The horizontal reference input, which is high whenever the camera is transmitting valid pixel information.
- capture(buffer: circuitpython_typing.WriteableBuffer) circuitpython_typing.WriteableBuffer
Capture a single frame into the given buffer.
This will stop a continuous-mode capture, if one is in progress.
- continuous_capture_start(buffer1: circuitpython_typing.WriteableBuffer, buffer2: circuitpython_typing.WriteableBuffer, /) None
Begin capturing into the given buffers in the background.
Call
continuous_capture_get_frame
to get the next available frame, andcontinuous_capture_stop
to stop capturing.Until
continuous_capture_stop
(ordeinit
) is called, theParallelImageCapture
object keeps references tobuffer1
andbuffer2
, so the objects will not be garbage collected.
- continuous_capture_get_frame() circuitpython_typing.WriteableBuffer
Return the next available frame, one of the two buffers passed to
continuous_capture_start
- continuous_capture_stop() None
Stop continuous capture.
Calling this method also causes the object to release its references to the buffers passed to
continuous_capture_start
, potentially allowing the objects to be garbage collected.
- __enter__() ParallelImageCapture
No-op used in Context Managers.
- __exit__() None
Automatically deinitializes the hardware on context exit. See Lifetime and ContextManagers for more info.