Chapter 1. Setting Up OpenCV

This chapter is a quick guide for setting up a development environment for Android and OpenCV. We will also look at the OpenCV sample applications, documentation, and community.

By the end of this chapter, our development environment will include the following components:

There are many possible ways to install and configure these components. We will cover several common setup scenarios, but if you are interested in even more options, see OpenCV's official documentation at http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html.

All of the development tools for Android and OpenCV are cross platform. The following operating systems are supported with almost identical setup procedures:

To run the OpenCV samples and, later, our own application, we should have an Android device with the following specifications:

Android Virtual Devices (AVDs) are not recommended. Some parts of OpenCV rely on low-level camera access and may fail with virtualized cameras.