findNonZeroAsync function

Future<Mat> findNonZeroAsync(
  1. InputArray src, {
  2. OutputArray? idx,
})

FindNonZero returns the list of locations of non-zero pixels.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaed7df59a3539b4cc0fe5c9c8d7586190

Implementation

Future<Mat> findNonZeroAsync(InputArray src, {OutputArray? idx}) async {
  idx ??= Mat.empty();
  return cvRunAsync0(
    (callback) => ccore.cv_findNonZero(src.ref, idx!.ref, callback),
    (c) {
      return c.complete(idx);
    },
  );
}