So my project is to make a face recognition(not detection) app for Android. My plan is to use JavaCV with the contrib library facerecogniser. However when training the recogniser the app crashes with this error:
Fatal signal 11 (SIGSEGV) 0xdeadbaad (code=1). the error logs can be found here:
The code I'm using to do this is as follows:
MatVector images;
CvArr labelsCV;
final int numberOfImages = 20;
File faceDir = new File("/sdcard/FaceDB");
images = new MatVector(numberOfImages);
ArrayList<Integer> labels = new ArrayList<Integer>();
IntPointer iPoint = new IntPointer();
CvArr image;
// Load an image:
image = cvLoadImage(faceDir + "/s1/1.pgm");
// And put it into the MatVector:
images.put(0, image);
// and put the label in
labels.add(0);
for (Integer i: labels){
iPoint.put(i);
}
labelsCV = new CvArr(iPoint);
FaceRecognizerPtr model = createFisherFaceRecognizer(0,1000);
// Then train it. See how I call get(), to get the FaceRecognizer inside the FaceRecognizerPtr:
model.get().train(images, labelsCV);
I'm not sure but it could be something to do with my labelsCV variable and pointer, I'm not really sure how to do this.
Any help would be much apreciated thanks