blobFromImagesAsync function

Future<Mat> blobFromImagesAsync(
  1. VecMat images, {
  2. double scalefactor = 1.0,
  3. (int, int) size = (0, 0),
  4. Scalar? mean,
  5. bool swapRB = false,
  6. bool crop = false,
  7. int ddepth = MatType.CV_32F,
})

Implementation

Future<Mat> blobFromImagesAsync(
  VecMat images, {
  double scalefactor = 1.0,
  (int, int) size = (0, 0),
  Scalar? mean,
  bool swapRB = false,
  bool crop = false,
  int ddepth = MatType.CV_32F,
}) async {
  mean ??= Scalar.zeros;
  final rval = await cvRunAsync<Mat>(
    (callback) => cffi.Net_BlobFromImages_Async(
      images.ref,
      scalefactor,
      size.cvd.ref,
      mean!.ref,
      swapRB,
      crop,
      ddepth,
      callback,
    ),
    (c, blob) => c.complete(Mat.fromPointer(blob.cast<cvg.Mat>())),
  );
  return rval;
}