Hello, I am trying to use FaceRecognizer class (from contrib folder).
I have created LBPFaceRecognizer class that inherits from FaceRecognizer class with one method nativecreateObject.
the corresponding JNI nativecreateOBject function:
JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_LBPFaceRecognizer_nativeCreateObject
(JNIEnv * jenv, jclass)
{
Ptr<FaceRecognizer> model;
model= createLBPHFaceRecognizer();
return (jlong)model.obj; //Problem here!?!?!?!? What should I return?
}
Then I call the nativeCreateObject in the constructor of LBPFaceRecognizer:
public LBPFaceRecognizer() {
super(nativeCreateObject());}
The problem is here: (inside the OnManagerConnected()):
BPFaceRecognizer model= new LBPFaceRecognizer();
model.getInt("radius", 12); //!?!?! CRASH HERE
I get Fatal signal 11 (SIGSEGV) at 0x00000028.and I can;t debug neither.
how can I use the FaceRecognizer ??