threshold function

VARP threshold(
  1. VARP src,
  2. double thresh,
  3. double maxval,
  4. int type,
)

Implementation

VARP threshold(VARP src, double thresh, double maxval, int type) {
  MnnAssert(
    type != THRESH_MASK && type != THRESH_OTSU && type != THRESH_TRIANGLE,
    "Don't support THRESH_MASK/THRESH_OTSU/THRESH_TRIANGLE.",
  );
  final pOut = c.mnn_cv_threshold(src.ptr, thresh, maxval, type);
  final rval = VARP.fromPointer(pOut);
  return rval;
}