Declaration: DetectHoughCircleCenters (HoughSpace: TDouble2DArray; SearchRad, Thresh: Integer; var CircleList: TInt2DArray): integer;
The function DetectHoughCircleCenters uses the data in the array HoughSpace (which has been calculated previously by the function HoughCircleTransform) and searches for circles. The found circles are entered into the open array CircleList, the number of circles found is returned as a function result.

The parameter SearchRad (in pixels) is the minium required distance between multiple overlapping circles. It should be set to values between 5 and 10% of the Radius parameter of the function HoughCircleTransform. The parameter Thresh has two different meanings:

  1. If Thresh > 0 the parameter is interpreted as a threshold which must be exceeded by the HoughSpace cell value to detect a circle. The theoretical range of Thresh is between 0 and 360, typically values between 150 and 200 are used under practical circumstances. The best value to be used depends on several conditions (i.e. the connectedness of the circle line to be detected, the settings of the HoughCircleTransform parameters, the width of the circular line, the contrast of the image, etc) and must be determined experimentally.
  2. If Thresh is < 0 the parameters is interpreted as the number of circles expected. This mode should be preferred if you know how many circles are to be detected.

The list of circles CircleList contains the found circles, each circle corresponds to one column of the matrix. For example, CircleList[2][0] is the x coordinate of the third circle, CircleList[2][1] is its y coordinate.

Last Update: 2017-Nov-01