Open koenschauwaert opened 6 years ago
The Fotoapparat FaceDetector uses class FaceDetector
(a class in library) to do face detection actually. The FaceDetector.detectFaces
will return the detected faces location. You can use below code to do this:
FaceDetector mFaceDetector = FaceDetector.create(context);
List<Rectangle> detectedFaceAreas = mFaceDetector.detectFaces(nv21Image, width, height, 0);
Now you get the location of detected faces. And then you can use Google Vision API to detect the face item location. Lastly, just draw the face with rectangle and face item with number on your app(in bitmap or overlay).
Note: The nv21Image
is the byte array stores the image nv21 format data.
I want to use Fotoapparat in combination with the Google Vision API and work with landmarks to detect faces, eyes, nose and mouth; like this:
The Fotoapparat FaceDetector only shows a square around faces.
Can I use your library together with Google's API? If so: how?