blobFromImageAsync function
Implementation
Future<Mat> blobFromImageAsync(
InputArray image, {
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_BlobFromImage_Async(
image.ref,
scalefactor,
size.cvd.ref,
mean!.ref,
swapRB,
crop,
ddepth,
callback,
),
(c, mat) => c.complete(Mat.fromPointer(mat.cast<cvg.Mat>())),
);
return rval;
}