Ask Your Question

Revision history [back]

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();
    }
}
click to hide/show revision 2
retagged

updated 2017-05-12 04:47:43 -0600

berak gravatar image

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();
    }
}