Our goal in this chapter is to rewrite some of our Java classes so that they become thin wrappers around C++ classes. We will use an intermediary framework, Java Native Interface (JNI), which can expose Java and C++ code to each other. Along the way, we will gain a greater understanding of OpenCV's Java and C++ interfaces.
Note
The complete Eclipse project for this chapter can be downloaded from the author's website. The project has the following two versions:
A version for OpenCV 3.x is located at http://nummist.com/opencv/4598_06.zip.
A version for OpenCV 2.x is located at http://nummist.com/opencv/5206_06.zip.