face recognition, opencv 2.4, javacv, JNI
I am doing face recognition app using opencv 2.4.11, jdk 1.7.75, eclipse juno in windows 7 os and mingw64 (c,c++ compiler) all are 64 bits, here i can capture and detect as well as crop the face for recognition process, I am going to use createFisherFaceRecognizer()
method, here I used java native interface for compile through c++ but i got some errors like
undefined reference to cv::createFisherFaceRecognizer(int, double)
please help me to solve this error.
Thanks you in advance
you have to link against opencv_contrib2411
yeah link it in make file like
// CREATE .DLL FILE
$@ matches the target, $< matches the first dependancy
facerec.dll : RecognizeFace.o gcc -m64 -Wl,--add-stdcall-alias -shared -o $@ $< -LC:/opencv/build/x64/vc10/lib -lopencv_contrib2411
// CREATE .O OBJECT FILE
$@ matches the target, $< matches the first dependancy
RecognizeFace.o : RecognizeFace.cpp RecognizeFace.h gcc -m64 -I"C:/Program Files/Java/jdk1.7.0_75/include" -I"E:/Mahesh/open cv/opencv/build/include" -I"C:/Program Files/Java/jdk1.7.0_75/include/win32" -LC:/opencv/build/x64/vc10/lib -c $< -o $@ -lopencv_contrib2411
Thank you
gcc -m64 -Wl,--add-stdcall-alias -shared -o facerec.dll RecognizeFace.o -LC:/opencv/build/x64/vc10/lib -lopencv_contrib2411 -lopencv_core2411 -lopencv_highgui2411
wait, i hope, you're not trying with the prebuild vs opencv libs, those are for a different compiler.
did you built the libs for mingw using cmake ? (you'll have to !)