Declaration: HoughCircleTransform (Data: TDouble2DArray; Radius: Integer; Thresh: double; cfxLow, cfxHigh, cfyLow, cfyHigh: integer; var HoughSpace: TInt2DArray): integer;
The function HoughCircleTransform creates the parameter map of the Hough transform for detecting circles. The parameter Data contains the data (image) to be analyzed, the Radius parameter specifies the radius of the expected circle. The parameter Thresh specifies the intensity threshold above which a pixel is used for the analysis. The parameters cfxLow, cfxHigh, cfyLow and cfyHigh control the range where the analysis is performed.

The results of the transform are written to the matrix HoughSpace which is automatically resized to hold all analyzed pixels.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the Radius must be greater than 2
-2 ... one of the confine parameters (cfXLow..cfyHigh) is outside the limits of the data matrix
-3 ... the confined region has no extension
-4 ... the Data matrix is empty or too small (must be at least 3x3 pixels)
-5 ... either the parameter cfxLow is greater than cfxHigh, or cfyLow is greater than cfyHigh

Hint: Use the function DetectHoughCircleCenters to find the corresponding circles.

Last Update: 2017-Nov-01