This post is about getting started with Computer Vision. It’s starts off with OpenCV 2.0, then moves onto OpenCV 3.1.2. At the time of write this post version 3.4.1 has been released.
I’m going to cover a quick introduction and getting the following below:
- Quick Start to OpenCV 2.0 on Raspberry Pi
- OpenCV 3.x on Ubuntu/Raspberry Pi
- TensorFlow, Darknet and Yolo
Quick Start to OpenCV on Raspberry Pi
So I just wanted to get it up and running. I had an Raspberry Pi at home. I ordered a 5MP Pi Camera not the latest one as you don’t need an 8MP camera module as the processor couldn’t process the stream of images at this resolution.
- Install the latest Raspbian OS onto the PI. Download the image from RaspberryAPI.org and use the cool little application Etcher to flash your micro SD card.
- Once you get the Pi to boot, run the command below. Enable the camera module. You can also overclock the Pi for a performance boost but for now leave it as default.
- Ok you’ll need Python and OpenCV
sudo apt-get install python-opencv sudo pip install imutils
- Now test your camera, if you see an image you’re good to go. Otherwise check the cable is connected correctly. I actually plugged mine in the wrong way around the first time, Doh!
raspistill -o cam.jpg
- You can download the face tracking sample code using haar cascade from here.
- For more in depth how the code work read – http://www.mindsensors.com/blog/how-to/how-to-install-opencv-on-raspberry-pi-and-do-face-tracking
This short procedure will get you up and running however to do more serious stuff you’ll need OpenCV 3+. But this demo works very well even in low light.
The next post I’ll cover OpenCV 3+