Raspberry Pi

OpenCV

OpenCV (Open Source Computer Vision Library) is an infrastructure for vision tasks on your Raspberry Pi, and of course any other platform. This library has become a de-facto standard for running simple code to work with complex vision tasks: face recognition, tracking of moving objects, working with 3D point clouds, deep learning and much more.

opencv logo


NOTICE: This page is under construction. We are investigating the software and updating the guide. Please come back regularly, you'll find updates as we try out things.


Installation

There are plenty of tutorials to install OpenCV on a Raspberry Pi. Having said that, many of them lead to extra frustration when things don't work as expected. We'll be showing a direct installation approach, just follow this great article: Install OpenCV 4 on Raspberry Pi with Python 3.7. It worked for us, and we hope it'll work for you as well. You don't have to follow the first part - i.e. installing Python 3.7 - on newer versions on Raspbian. It's already there.

If you gry as far as here, maybe it's a good idea to backup your image!

Other Installation Options

The above installation guide is not the only way on how to get OpenCV on your Pi (or development machine). Let us look at alternative options.

  • You can use Docker to run OpenCV without any hassle. See our Docker on Raspberry Pi guide and search the Docker Hub for an OpenCV image which suits your needs.
  • You don't have to compile OpenCV as we did, instead you can install an unofficial, pre-built package. For example opencv-python

Which one is best? Hard to say, we tested the above options and actually use one or the other, depending on the task at hand.