Table of Contents

Method HoughCircles

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

HoughCircles(InputArray, HoughModes, double, double, double, double, int, int)

Finds circles in a grayscale image using a Hough transform.

public static CircleSegment[] HoughCircles(InputArray image, HoughModes method, double dp, double minDist, double param1 = 100, double param2 = 100, int minRadius = 0, int maxRadius = 0)

Parameters

image InputArray

The 8-bit, single-channel, grayscale input image

method HoughModes

The available methods are HoughMethods.Gradient and HoughMethods.GradientAlt

dp double

The inverse ratio of the accumulator resolution to the image resolution.

minDist double

Minimum distance between the centers of the detected circles.

param1 double

The first method-specific parameter. [By default this is 100]

param2 double

The second method-specific parameter. [By default this is 100]

minRadius int

Minimum circle radius. [By default this is 0]

maxRadius int

Maximum circle radius. [By default this is 0]

Returns

CircleSegment[]

The output vector found circles. Each vector is encoded as 3-element floating-point vector (x, y, radius)