I am using opencv -249 and everything works fine, but when I want to use facerecognizer can not create an instance of this , and therefore , when I want to use the training does not leave an exception " NullPointerException ". When I do the following : ArrayList < Mat > images = new ArrayList < Mat > (); Mat id = new Mat (); FaceRecognizer face ;
all is well , but if I want to use the " train" : face.train (images , id) I get the error: "Exception in thread" AWT - EventQueue -0 " java.lang.NullPointerException " I understand is that it has not created an object of facerecognizer , but when I do this : FaceRecognizer facerec = createLBPHFaceRecognizer ( 1,8,8,8,100 ) ; the program did not recognize the part : " createLBPHFaceRecognizer ( 1,8,8,8,100 ) " and do not know how to create an object of FaceRecognizer