FaceRecognizer doubts
Hello,
I'm developing an application that uses the OpenCV FaceRecognizer Java class to verify if a face is in a database of images. It works if I run my code only one time, but I want to update the database and remake the training multiple times. I'm having some doubts about doing this:
If I need to repeat the training, do I have to create the object again like the code below? How can I reset the FaceReconizer object?
faceRecognizer = new FaceRecognizer(); faceRecognizer = createEigenFaceRecognizer(); faceRecognizer.train(images, labels);
I have a database with images of 5 different people. How do I have to pass these images to faceRecognizer.train? What do I have to insert in the labels variable?
I'm having doubts about how to read the result of faceRecognizer.predict. In my case I only want to check if a face is in the database. How can I read the returned variables (label and confidence) to determine it?
Sorry for the newbie questions but I'm really stuck and I cannot find any documentation about it :(
Any tip will be very helpful,
Thanks
which opencv version is it ? (are you even able to create an instance ?)
I'm using version 2.4.9 and yes, I can create the instance.
there is also a (unsupported, 3rdparty) wrapper called javaCV, are you using that ? (we probably can't help much with api details, then).