Raspberry PI Video Cameras

Video Cameras on Raspberry Pi may be accessed from a WPI Libary Robot Program via the WPI Library CameraServer class which works with the Raspberry Pi’s V4L2 driver to both configure and acquire camera data. WPI Library-based vision processing techniques are documented in the WPI Libary vision processing documentation.

Each video camera is addressed on the Raspberry Pi using a Linux video device name (which includes a video device number starting from 0). The first video device address will be:

/dev/video0

The video device number is used to specify the video camera in the WPI Library CameraServer class.

USB Video Cameras

One or more USB Video Cameras connected to Raspberry Pi USB ports may be accessed.

Raspberry Pi Camera Module

The Raspberry Pi Camera Module may be accessed.

Note: to access the Raspberry Pi Camera Module, the “Camera Interface” must be enabled in the Raspberry Pi Configuration settings.

Tips for working with multiple Video Cameras

The WPI Library Server supports working with multiple cameras, described further on the Using MultipleCameras page.

NOTE: If multiple video cameras are used, it may be necessary to assign each camera an identifier that is always the same each time the Raspberry Pi is booted. For details, see this Raspberry Pi Foundation blog post on consistent video device identifier assignment.