Book Image

Android Application Programming with OpenCV 3

By : Joseph Howse
Book Image

Android Application Programming with OpenCV 3

By: Joseph Howse

Overview of this book

<p>Android Application Programming with OpenCV 3 is a practical, hands-on guide to computer vision and mobile app development. It shows how to capture, manipulate, and analyze images while building an application that combines photography and augmented reality. To help the reader become a well-rounded developer, the book covers OpenCV (a computer vision library), Android SDK (a mobile app framework), OpenGL ES (a 3D graphics framework), and even JNI (a Java/C++ interoperability layer).</p> <p>Now in its second edition, the book offers thoroughly reviewed code, instructions, and explanations. It is fully updated to support OpenCV 3 and Android 5, as well as earlier versions. Although it focuses on OpenCV's Java bindings, this edition adds an extensive chapter on JNI and C++, so that the reader is well primed to use OpenCV in other environments.</p>
Table of Contents (13 chapters)
Android Application Programming with OpenCV 3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building the native library


C++ is a compiled language. This means that C++ code is not intended as an instruction set for machines (such as ARMv7-A chips) or virtual machines (such as the Java Virtual Machine or JVM). Rather, we use a tool named a compiler to translate C++ code into instructions that a given platform can understand. Each C++ source file is compiled to produce one object file (not to be confused with the term "object" in object-oriented programming). Then, we use a tool named a linker to combine multiple object files into either a library or an executable. The linker can also combine libraries to produce other libraries or executables. The linkage of libraries may be either static (meaning that a given version of the input library is "baked into" the output) or dynamic (meaning that any available version of the library may be loaded at runtime). Android NDK provides a tool named ndk-build, which abstracts the use of the compiler and linker, but we must still specify certain...