Ask Your Question
0

How can I import org.opencv.contrib on Java Project?

asked 2017-07-29 15:15:07 -0600

I'm making a PoC with OpenCV version 3.2.0 in Java Project. But I could't find the package org.opencv.contrib.

I'm using MacOS and I did install the opencv with this command

$ brew install opencv3 --with-java --with-contrib

I just imported the opencv320.jar. Do I need import an other specific jar?

The objective is use LBPH FaceRecognizer algorithm.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2017-07-29 23:36:23 -0600

berak gravatar image

updated 2017-07-29 23:54:49 -0600

edit flag offensive delete link more

Comments

I'm a newbie in OpenCV framework and I have aim to make a open source face recognize system. I'm trying to use the Java language. I followed some tutorial that explained install the OpenCV in MacBook by brew application. The installation was successful, but I couldn't find in the OpenCV java library the LBPH FaceRecognizer algorithm. Apparently this algorithm is available in org.opencv.contrib package. I don't know if OpenCV java library is incomplete or I need another java library to access the wrapper of this algorithm. Are there a example of code?

gugaucb gravatar imagegugaucb ( 2017-07-30 11:49:48 -0600 )edit

again, there is no org.opencv.contrib package (why do you think, it exists?), and you will only get the org.opencv.face package, IF you build both opencv and the opencv_contrib repo from src after you enabled the java wrappers for that module. (it's not on by default, that's why brew can't build it)

yea, i know, admittedly a painful process..

berak gravatar imageberak ( 2017-07-30 11:56:02 -0600 )edit

then, just saying, face recognition has improved a lot in recent years, and maybe it's easier (or more promising) to build on more java friendly libs

berak gravatar imageberak ( 2017-07-30 12:05:49 -0600 )edit

Thanks Berak! I will try install opencv_contrib from repo. I sorry my unknown.

gugaucb gravatar imagegugaucb ( 2017-07-30 15:28:33 -0600 )edit

@Bahramudin You can help? I have never used a compiler or visual studio. I use windows 10 x64 and am building opencv_contrib with the original OpencCV fonts. But I get an error in the Windows console:

C:\Users\Nelson Castiblanco\Desktop\opencv\build>cmake -DOPENCV_EXTRA_MODULES_PATH=C:\Users\Nelson Castiblanco\Desktop\opencv_contrib\modules "C:\Users\Nelson Castiblanco\Desktop\opencv\sources"

-- The CXX compiler identification is unknown -- The C compiler identification is unknown CMake Error at CMakeLists.txt:127 (project): The CMAKE_CXX_COMPILER:

cl is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix

JavaMaster gravatar imageJavaMaster ( 2018-03-28 14:54:47 -0600 )edit

@JavaMaster please read FAQ

LBerger gravatar imageLBerger ( 2018-03-28 15:05:55 -0600 )edit

Si señor, me equivoqué de lugar de publicacion. Gracias

JavaMaster gravatar imageJavaMaster ( 2018-03-28 16:21:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-29 15:15:07 -0600

Seen: 2,231 times

Last updated: Jul 29 '17