findEllipses static method

Mat findEllipses(
  1. InputArray image, {
  2. OutputArray? ellipses,
  3. double scoreThreshold = 0.7,
  4. double reliabilityThreshold = 0.5,
  5. double centerDistanceThreshold = 0.05,
})

Finds ellipses fastly in an image using projective invariant pruning.

The function detects ellipses in images using projective invariant pruning. For more details about this implementation, please see 137 Jia, Qi et al, (2017). A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.

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

Implementation

static Mat findEllipses(
  InputArray image, {
  OutputArray? ellipses,
  double scoreThreshold = 0.7,
  double reliabilityThreshold = 0.5,
  double centerDistanceThreshold = 0.05,
}) {
  final p = ellipses?.ptr ?? calloc<ccontrib.Mat>();
  cvRun(
    () => ccontrib.ximgproc_findEllipses(
      image.ref,
      p,
      scoreThreshold,
      reliabilityThreshold,
      centerDistanceThreshold,
    ),
  );
  return ellipses ?? Mat.fromPointer(p);
}