Using Your Raspberry Pi To Learn Compute PDF
Using Your Raspberry Pi To Learn Compute PDF
Interested in using your Raspberry Pi to learn computer vision, image processing, and OpenCV?
If so, then this document is your quick-start guide to getting OpenCV and the required packages
installed and running on your Raspberry Pi.
If you have a B+ model, definitely use it when going through Practical Python and OpenCV. But
once you get to the Case Studies book, I highly recommend that you upgrade to the Pi 2.
Personally, I prefer to spend a little extra money and purchase from Canakit — their shipping is
fast and reliable (fulfillment through Amazon.com), plus their complete ready-to-go bundles are
really nice.
You should also pick up a Raspberry Pi camera module so you can take photos using your Pi
and access the video stream. Examples in the Case Studies book, such as face detection and
eye tracking in webcam video streams require a Raspberry Pi camera module.
I also picked up a camera housing to keep the camera safe, because why not?
http://www.pyimagesearch.com/2015/02/23/install-opencv-and-python-on-your-raspberry-pi-2-
and-b/
How do I access the Raspberry Pi camera
module using OpenCV?
No worries, I have you covered there as well:
http://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-
and-python/
$ cd code
$ cd chapter-03
This will load the trex.png image from disk, display it to your screen, and write it back to file.
# USAGE
# python load_display_save.py --image ../images/trex.png
Simply copy-and-paste these commands into your terminal and you'll be able to run the
examples.
Also, all examples inside Case Studies will run out of the box on the Raspberry Pi, with the
exception of two: webcam_face_detection and eye_tracking .
Inside the Case Studies/pi_code directory you will find special versions of these Python
programs that are designed to run on the Raspberry Pi using the picamera module.
For all other code examples in the Case Studies book, use the Case
Case Studies/code
Studies/code
directory.