Saturday, April 19, 2014

Building opencv java module

Last week I tried to build OpenCV java module so I could use it for clj-drone so I could have more fun with AR Drone 2.0.  I couldn't figure out why the java module is set unavailable after cmake.  This happens on both Ubuntu 12.04 and OS X 10.9.  I have seen some issues regarding properly setting the JAVA_HOME and the cmake JNI file being incorrect.  I tried to look at this angle, seeing why the JNI interface would not work.

However it seems "ant" is a required component and not just a recommended install as indicated by the docs.  So after a "brew install ant" and "apt-get install ant" cmake is able to properly set the Java OpenCV module.  I never had ant for years in my system, right now only using mvn, sbt and lein.

OpenCV 2.4.5 built just fine on Ubuntu, OSX seems to be having some c++ compile issue...

No comments: