Ask Your Question
1

Additional LIBs (CUDA,JNI) with OpenCV by MinGW instead of VisualStudio VS(any)

asked 2014-05-09 09:24:53 -0500

volodia gravatar image

updated 2014-05-09 17:25:48 -0500

Hi everyone!

When configure OpenCV by cmake it mentioned that CUDA could be compiled only with VS2010 or sth. like this... Is it real to compile OCV(any version) with CUDA by MinGW? On Windows...

How to get it ?!?

Best regards!

EDIT: somebody post this http://answers.opencv.org/question/5799/building-opencv-249-with-cuda-linking-problem/?answer=9877#post-id-9877 But on Ubuntu...

CUDA compilation is disabled (due to only Visual Studio compiler supported on your platform).

:( Sad but true?

What about JNI (ant, JNI and Java tests?) ?

Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

I know and have read tutorial: Introduction into Android Development but there is no info what actually put (and where) to compile OpenCV from source with Java Native Interface...

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2015-01-01 10:42:01 -0500

denixx gravatar image

updated 2015-01-03 02:40:11 -0500

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/...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-05-09 09:24:53 -0500

Seen: 1,828 times

Last updated: Jan 03 '15