Finds circles in a grayscale image using a Hough transform.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic static CircleSegment[] HoughCircles(
InputArray image,
HoughMethods method,
double dp,
double minDist,
double param1 = 100,
double param2 = 100,
int minRadius = 0,
int maxRadius = 0
)
Public Shared Function HoughCircles (
image As InputArray,
method As HoughMethods,
dp As Double,
minDist As Double,
Optional param1 As Double = 100,
Optional param2 As Double = 100,
Optional minRadius As Integer = 0,
Optional maxRadius As Integer = 0
) As CircleSegment()
public:
static array<CircleSegment>^ HoughCircles(
InputArray^ image,
HoughMethods method,
double dp,
double minDist,
double param1 = 100,
double param2 = 100,
int minRadius = 0,
int maxRadius = 0
)
static member HoughCircles :
image : InputArray *
method : HoughMethods *
dp : float *
minDist : float *
?param1 : float *
?param2 : float *
?minRadius : int *
?maxRadius : int
(* Defaults:
let _param1 = defaultArg param1 100
let _param2 = defaultArg param2 100
let _minRadius = defaultArg minRadius 0
let _maxRadius = defaultArg maxRadius 0
*)
-> CircleSegment[]
OpenCvSharp.Cv2.HoughCircles = function(image, method, dp, minDist, param1, param2, minRadius, maxRadius);
Parameters
- image
- Type: OpenCvSharpInputArray
The 8-bit, single-channel, grayscale input image - method
- Type: OpenCvSharpHoughMethods
Currently, the only implemented method is HoughCirclesMethod.Gradient - dp
- Type: SystemDouble
The inverse ratio of the accumulator resolution to the image resolution. - minDist
- Type: SystemDouble
Minimum distance between the centers of the detected circles. - param1 (Optional)
- Type: SystemDouble
The first method-specific parameter. [By default this is 100] - param2 (Optional)
- Type: SystemDouble
The second method-specific parameter. [By default this is 100] - minRadius (Optional)
- Type: SystemInt32
Minimum circle radius. [By default this is 0] - maxRadius (Optional)
- Type: SystemInt32
Maximum circle radius. [By default this is 0]
Return Value
Type:
CircleSegmentThe output vector found circles. Each vector is encoded as 3-element floating-point vector (x, y, radius)
See Also