detect method
Detects faces in the input image. Following is an example output.
image
an image to detect
detection results stored in a 2D cv::Mat of shape num_faces, 15
- 0-1: x, y of bbox top left corner
- 2-3: width, height of bbox
- 4-5: x, y of right eye (blue point in the example image)
- 6-7: x, y of left eye (red point in the example image)
- 8-9: x, y of nose tip (green point in the example image)
- 10-11: x, y of right corner of mouth (pink point in the example image)
- 12-13: x, y of left corner of mouth (yellow point in the example image)
- 14: face score
https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#ac05bd075ca3e6edc0e328927aae6f45b
Implementation
Mat detect(Mat image) {
final p = calloc<cvg.Mat>();
cvRun(() => cffi.FaceDetectorYN_Detect(ref, image.ref, p));
return Mat.fromPointer(p);
}