Ask Your Question
0

FaceRecognizer cannot be resolved to a type ?

asked 2018-06-07 02:09:07 -0500

Naim gravatar image

updated 2018-06-07 02:15:53 -0500

So i'm trying to train my FaceRecognizer but then my Java IDE tells me "FaceRecognizer cannot be resolved to a type" ..

can any one tell me how to proceed with this ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-06-07 02:18:07 -0500

berak gravatar image

updated 2018-06-07 02:19:12 -0500

the FaceRecognizer classes are not part of the main opencv distribution.

to use that, you'll have to rebuild the opencv libs with the opencv_contrib repo ,

then it is also in a cv::face namespace, like:

Ptr<face::FaceRecognizer> fr = face::LBPHFaceRecognizer::create();

in the meantime, you should also try the new, builtin dnn based face recognition (with a pretrained network).

have a look at the answer here, please.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-06-07 02:09:07 -0500

Seen: 75 times

Last updated: Jun 07 '18