How to recognize faces in Java using OpenCV

I have a simple applet that works in Java using OpenCV, which does nothing but track faces in a webcam preview . It recognizes faces using Haar Cascades, but in fact it does not recognize faces. Now I want to change it so that when it detects a face, it makes it possible that it matches an existing face OR makes it possible to save that face in the bounding box as a new or existing person (like the Faces function for iPhoto), I know that OpenCV has the library needed for this , but I'm not sure what the best way to continue working in Java. Is there a Java example where I can look? Should I look at another library for the face recognition part? Can someone tell me some basic pseudo code to do this in JavaCV ?

My ultimate goal is to reproduce something like the Android Face Unlock feature for the desktop application that I am developing (even better - with automatic learning abilities with every successful login). But now, given the two faces, I find the shape of my bounding box (see My link to pastebin), I would like to spit out a number from 0 to 1 for the probability that these faces are of the same person.

+4
source share
3 answers

I managed to create a standalone Java Face discovery package: https://github.com/pathikrit/JFaceRecog

+3
source

I developed a full face recognition using the FaceRecognizer JavaCV class. I posted the full code and usage here . Try using this class and let me know if you have any questions.

+2
source

Source: https://habr.com/ru/post/1441630/


All Articles