Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

FaceRecognizer doubs

Hello,

I'm developing an application that uses the OpenCV FaceRecognizer Java class to verify if a face is in a database of image. 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

FaceRecognizer doubs

Hello,

I'm developing an application that uses the OpenCV FaceRecognizer Java class to verify if a face is in a database of image. 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

FaceRecognizer doubsdoubts

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