Preface
This book will show you how to use OpenCV's Java bindings in an Android app that displays a camera feed, saves and shares photos, manipulates colors and edges, and tracks real-world objects in 2D or 3D. Integration with OpenGL is also introduced so that you can start building augmented reality (AR) apps that superimpose virtual 3D scenes on tracked objects in the camera feed.
OpenCV is an open-source, cross-platform library that provides building blocks for computer vision experiments and applications. It offers high-level interfaces for capturing, processing, and presenting image data. For example, it abstracts away details about camera hardware and array allocation. OpenCV is widely used in both academia and industry.
Android is a mobile operating system that is mostly open source. For Java developers, it offers a high-level application framework called Android SDK. Android apps are modular insofar as they have standard, high-level interfaces for launching each other and sharing data. Mobility, a high level of abstraction, and data sharing are great starting points for a photo sharing app, similar to the one we will build.
Although OpenCV and Android provide a lot of high-level abstractions (and a lot of open source code for curious users to browse), they are not necessarily easy for newcomers. Setting up an appropriate development environment and translating the libraries' broad functionality into app features are both daunting tasks. This concise book helps by placing an emphasis on clean setup, clean application design, and a simple understanding of each function's purpose.
The need for a book on this subject is particularly great because the OpenCV's Java and Android bindings are quite new and their documentation is not yet mature. Little has been written about the steps for integrating OpenCV with an Android's standard camera, media, and graphics APIs. Surely integration is a major part of an app developer's work, so it is a major focus of this book.
By the end of our journey together, you will have a taste of the breadth of application features that are made possible by integrating OpenCV with other Android libraries. You will have your own small library of reusable classes that you can extend or modify for your future computer vision projects. You will have a development environment and the knowledge to use it, and you will be able to make more apps!