thinning static method

Mat thinning(
  1. InputArray src, {
  2. OutputArray? dst,
  3. int thinningType = THINNING_ZHANGSUEN,
})

Applies a binary blob thinning operation, to achieve a skeletization of the input image.

The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.

https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#ga37002c6ca80c978edb6ead5d6b39740c

Implementation

static Mat thinning(InputArray src, {OutputArray? dst, int thinningType = THINNING_ZHANGSUEN}) {
  final p = dst?.ptr ?? calloc<cvg.Mat>();
  cvRun(() => ccontrib.ximgproc_thinning(src.ref, p, thinningType));
  return dst ?? Mat.fromPointer(p);
}