findNonZero function

Mat findNonZero(
  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

Mat findNonZero(InputArray src, {OutputArray? idx}) {
  idx ??= Mat.empty();
  cvRun(() => ccore.cv_findNonZero(src.ref, idx!.ref, ffi.nullptr));
  return idx;
}