Chapter 1. Setting Up OpenCV for Java
I'm sure you want to start developing astonishing computer vision applications. You must have heard of a nice C/C++ computer vision library called OpenCV to help you do so. But in case you would like to develop the applications using your knowledge of Java programming, we have good news for you. Since the release of OpenCV 2.4.4 in January 2013, Java bindings have been officially developed. So you can use them not only for desktop Java, but also for Scala development.
This chapter will set you up for OpenCV development right away. As Java developers are mostly used to working with tools such as Eclipse, NetBeans, Apache Ant, and Maven, we will cover the details of creating a simple OpenCV application using the environment that the Java developers are more used to.
In this chapter, we will do the following:
- Get OpenCV with desktop Java support
- Discuss Java Native Interface (JNI) details
- Configure Eclipse and NetBeans for OpenCV
- Create Apache Ant and Maven OpenCV projects
By the end of this chapter, the user should have an OpenCV for Java installation running on his OS which can easily be linked to Eclipse, NetBeans, Apache Ant, or Maven, the most used tools and building systems for Java.