blobFromImages function
Creates 4-dimensional blob from series of images. Optionally resizes and crops images from center, subtract mean values, scales values by scalefactor, swap Blue and Red channels. https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f
Implementation
Mat blobFromImages(
VecMat images, {
Mat? blob,
double scalefactor = 1.0,
(int, int) size = (0, 0),
Scalar? mean,
bool swapRB = false,
bool crop = false,
int ddepth = MatType.CV_32F,
}) {
blob ??= Mat.empty();
mean ??= Scalar.zeros;
cvRun(
() => cffi.Net_BlobFromImages(
images.ref,
blob!.ref,
scalefactor,
size.cvd.ref,
mean!.ref,
swapRB,
crop,
ddepth,
),
);
return blob;
}