Class CudaHoughCirclesDetector
Base class for circles detector algorithm.
public class CudaHoughCirclesDetector : SharedPtrObject, IDisposable
- Inheritance
-
CudaHoughCirclesDetector
- Implements
- Inherited Members
Constructors
CudaHoughCirclesDetector(float, float, int, int, int, int, int)
Create hough circles detector
public CudaHoughCirclesDetector(float dp, float minDist, int cannyThreshold, int votesThreshold, int minRadius, int maxRadius, int maxCircles = 4096)
Parameters
dp
floatInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height.
minDist
floatMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
cannyThreshold
intThe higher threshold of the two passed to Canny edge detector (the lower one is twice smaller).
votesThreshold
intThe accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected.
minRadius
intMinimum circle radius.
maxRadius
intMaximum circle radius.
maxCircles
intMaximum number of output circles.
Methods
Detect(IInputArray)
Finds circles in a grayscale image using the Hough transform.
public CircleF[] Detect(IInputArray image)
Parameters
image
IInputArray8-bit, single-channel grayscale input image.
Returns
- CircleF[]
Circles detected
Detect(IInputArray, IOutputArray, Stream)
Finds circles in a grayscale image using the Hough transform.
public void Detect(IInputArray image, IOutputArray circles, Stream stream = null)
Parameters
image
IInputArray8-bit, single-channel grayscale input image.
circles
IOutputArrayOutput vector of found circles. Each vector is encoded as a 3-element floating-point vector.
stream
StreamUse a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).
DisposeObject()
Release the unmanaged memory associated with this circle detector.
protected override void DisposeObject()