reachy.io.cam

Wrapper around two RPI and the multi channel switch.

It relies on the use of the Multi_Adapter_Board_2Channel_uc444 for switching camera via the I2C and GPIO control.

See https://github.com/ArduCAM/RaspberryPi/tree/master/Multi_Camera_Adapter/Multi_Adapter_Board_2Channel_uc444

Module Contents

Classes

BackgroundVideoCapture

Wrapper on OpenCV VideoCapture object.

class reachy.io.cam.BackgroundVideoCapture(camera_index, resolution=(600, 800), lazy_setup=True)

Bases: object

Wrapper on OpenCV VideoCapture object.

Parameters
  • camera_index (int) – index of the used camera (see OpenCV doc for details)

  • resolution (int, int) – desired resolution for the grabbed frame (the resolution must be compatible with the driver)

Instantiating this object will automatically start the polling of image in background.

This wrapper is reponsible for automatically polling image on the camera. This ensures that we can always access the most recent image.

_setup(self)
close(self)

Stop polling image and release the Video Capture.

_read_loop(self)
read(self)

Retrieve the last grabbed image.