detectFacesFromMat method

Future<List<Face>> detectFacesFromMat(
  1. Mat image, {
  2. FaceDetectionMode mode = FaceDetectionMode.full,
})

Detects faces in a pre-decoded cv.Mat image.

The Mat is NOT disposed by this method - caller is responsible for disposal.

Throws StateError if initialize has not been called successfully.

Implementation

Future<List<Face>> detectFacesFromMat(
  cv.Mat image, {
  FaceDetectionMode mode = FaceDetectionMode.full,
}) {
  _requireReady();
  final f = _extractMatFields(image);
  return detectFacesFromMatBytes(
    f.data,
    width: f.width,
    height: f.height,
    matType: f.matType,
    mode: mode,
  );
}