getStructuringElement static method

Mat getStructuringElement(
  1. int shape,
  2. (int, int) ksize
)

Returns a run length encoded structuring element of the specified size and shape.

https://docs.opencv.org/4.x/df/def/group__ximgproc__run__length__morphology.html#ga8a7c10c524fb2572e2eefe0caf0375fc

Implementation

static Mat getStructuringElement(int shape, (int, int) ksize) {
  final p = calloc<cvg.Mat>();
  cvRun(() => cffi.ximgproc_rl_getStructuringElement(shape, ksize.cvd.ref, p));
  return Mat.fromPointer(p);
}