Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmake for OpenCV doesn't detect jdk

Tags:

java

opencv

cmake

I want to to compile OpenCV 2.4.10 with Java native interface. I use this guide Introduction to Java Development. It says that I should have installed JDK. I installed it by using this command: yum install java-1.7.0-openjdk-devel and set export JAVA_HOME=/usr/java/jdk1.7.0_75

Now I try to run cmake -DBUILD_SHARED_LIBS=OFF ..

Its output 'OpenCV modules' section is:

--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera dynamicuda java python viz

As you see cmake consider java unavailable. What should I do for make OpenCV with java support?

like image 403
eLTG Avatar asked Feb 27 '15 12:02

eLTG


1 Answers

I solved it. Cmake for opencv needs ANT, but I didn't have it. For now cmake can make opencv with java support.

like image 183
eLTG Avatar answered Sep 29 '22 05:09

eLTG