Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

FaceRecognizer.java in Opencv4Android 2.4.3

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 ??

FaceRecognizer.java in Opencv4Android 2.4.3

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); int r=model.getInt("radius"); //!?!?! CRASH HERE

I get Fatal signal 11 (SIGSEGV) at 0x00000028.and I can;t debug neither.0x00000028. when the native method getInt(nativeObject,"radious") is called.

how can I use the FaceRecognizer ??

FaceRecognizer.java in Opencv4Android 2.4.3

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();    
                 int r=model.getInt("radius"); //!?!?! CRASH HERE

I get Fatal signal 11 (SIGSEGV) at 0x00000028. when the native method getInt(nativeObject,"radious") getInt0(nativeObject,"radious") is called.

how can I use the FaceRecognizer ??