Using the camera with Python

The camera module on the Raspberry Pi is more than just a standard webcam. Since we have full access to the controls and settings from within our own programs, it allows us to take control and create our own camera applications.

In this chapter, we will use the Python module called picamera created by Dave Hughes to control the camera module, which performs all the functions raspivid and raspistill support.

See http://picamera.readthedocs.org for additional documentation and lots of useful examples.

Getting ready

The Raspberry Pi camera module should be connected and installed as detailed in the previous section.

In addition, we will also need to install the Python 3 Pillow Library (the details of how to do this have been ...

Get Raspberry Pi for Python Programmers Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.