thresholdAsync function
Future<(double, Mat)>
thresholdAsync(
- InputArray src,
- double thresh,
- double maxval,
- int type, {
- OutputArray? dst,
Threshold applies a fixed-level threshold to each array element.
For further details, please see: https:///docs.opencv.org/3.3.0/d7/d1b/group__imgproc__misc.html#gae8a4a146d1ca78c626a53577199e9c57
Implementation
Future<(double, Mat dst)> thresholdAsync(
InputArray src,
double thresh,
double maxval,
int type, {
OutputArray? dst,
}) {
dst ??= Mat.empty();
final p = calloc<ffi.Double>();
return cvRunAsync0(
(callback) => cimgproc.cv_threshold(src.ref, dst!.ref, thresh, maxval, type, p, callback),
(c) {
final rval = (p.value, dst!);
calloc.free(p);
return c.complete(rval);
},
);
}