Unable to create Recognzer Object
Hello, i am new to openCV java library. I want to create a face recognizer object in my java file but there is no face recognizer exist in my java code. Which files are necessary to import Facerecognizer.
import java.awt.FlowLayout;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfByte;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
import org.opencv.objdetect.CascadeClassifier;
import org.opencv.videoio.VideoCapture;
import java.util.Scanner;
public class FaceTrainer{
public static void main(String[] args){
FaceRecognizer rec=createLBPHFaceRecognizer();
}
}
the face recognizer classes were moved to opencv_contrib with opencv3, you you need to rebuild the opencv libs with those modules (see readme there)
then, java bindings for this are not enabled by default, try to append "java" at the end here so it says:
WRAP python java)
last:
Face.createLBPHFaceRecognizer();
.. maybe you can try demo code heregood luck, and please report back, how it went ... !