Downloading and building OpenCV on Raspberry Pi

Building OpenCV from the source is the easiest way to grab OpenCV for your Raspberry Pi Java projects. The following steps will guide you through how to download, build and make OpenCV on the Raspberry Pi. Connect it to your Raspberry Pi through SSH using PuTTY:

  1. Install the following build essentials on the Raspberry Pi to have all the necessary tools to build the OpenCV source:
 sudo apt-get -y install ant build-essential cmake  cmake-curses-gui
  1. The GitHub page (Figure 7-14) at https://github.com/opencv/opencv/releases lists all the releases of OpenCV and the latest release is OpenCV 3.2.0, dated Dec 23, 2016 at the time of writing this book. We need only the source code of OpenCV 3.2.0 ...

Get Raspberry Pi 3 Projects for Java Programmers 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.