Ask Your Question

denixx's profile - activity

2015-01-03 02:40:11 -0600 received badge  Editor (source)
2015-01-01 11:39:27 -0600 answered a question Additional LIBs (CUDA,JNI) with OpenCV by MinGW instead of VisualStudio VS(any)

Hi!
I've already fighted with JNI error on both Linux and Windows platforms.
The answer is to set JAVA_HOME manually before launching cmake.
http://stackoverflow.com/questions/17...
For Linux it will be something like

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

note: JAVA_HOME should point to JDK main dir.
For Windows I've got string

--     JNI:                         C:/Program Files/Java/jdk1.7.0_71/include C:/Program Files/Java/jdk1.7.0_71/include/win32 C:/Program Files/Java/jdk1.7.0_71/include

in output, but messed up with Java installations on my Windows, after I've installed latest jdk1.7.0_71 (x64) - error gone. I think you can just set JAVA_HOME to value you want before launching cmake to test if I'm right. Now I'm fighting with something in cmake, I think...

-- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE) (Required is at least version "3.2")
-- Found apache ant 1.9.4: D:/Soft/apache-ant-1.9.4/bin/ant.bat
-- Found JNI: C:/Program Files/Java/jdk1.7.0_71/lib/jawt.lib
Ошибка: Не удается найти указанный раздел или параметр в реестре.
Ошибка: Не удается найти указанный раздел или параметр в реестре.
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)

Ошибка: Не удается найти указанный раздел или параметр в реестре. (this can be translated from Russian to English like "Error: Can not find the specified key or value in the registry.", next line is the same. This comes from OS.)

On Linux I've got working build of 2.4.9, and even got lena.png processed (it's a tutorial thing) in latest Java 1.7. So I've thought to try process video from my webcam, and got failed, because it's VirtualBox and both my Logitech webcams failed to start in virtualized environment. So I've tried to build OpenCV on Windows, and got problem which I described above. Also tried MinGW first, second try was VS 2010 - all the same: unavailable java and

--   Java:
--     ant:                         D:/Soft/apache-ant-1.9.4/bin/ant.bat (ver 1.9.4)
--     JNI:                         C:/Program Files/Java/jdk1.7.0_71/include C:/Program Files/Java/jdk1.7.0_71/include/win32 C:/Program Files/Java/jdk1.7.0_71/include
--     Java wrappers:               NO
--     Java tests:                  NO

UPDATE 1:
Hi again!
This step by step guide helped me a lot to manage things with build: http://docs.opencv.org/doc/tutorials/...