Setting up OpenCV for Java via Maven

When you learn about OpenCV, you'll often hit up on OpenCV for Python or C++, but not Java.  I can understand that OpenCV is a glorified NumPy extension for Python and OpenCV C++ is very fast.  However, it's possible that you have a legit need to use Java instead of Python or C++.

In a professional setting, Java users are likely to use Apache Maven to allow everyone to get the same version of each software without causing build and run issues.  Sure, you can always install the library and setup the CLASSPATH to point at OpenCV, but I find it better to use Maven to handle the libraries.  Just note that there is no official Maven repository for OpenCV at the time of writing, but there been others that have uploaded alternative repositories.

Read more