Circle detection
Detects circles within grayscale images using the Hough transform.
Description
Detects circles within grayscale images using the Hough transform. Input images can be of binary or grayscale format, but the circle features must be brighter than their surrounding background and have dark centres (i.e. be rings). For solid circles, a gradient filter or equivalent should be applied to the image first. Detected circles are output to the workspace as solid objects. Circles are detected within a user-defined radius range and must exceed a user-defined threshold score (based on the intensity of the circle feartures in the input image and the feature circularity).
Parameters
Parameter | Description |
---|---|
Input image | Input image from which objects will be detected. |
Output objects | Output objects to be added to the workspace. Irrespective of the form of the input features, output objects are always solid. |
Output transform image | When selected, the Hough-transform image will be output to the workspace with the name specified by "Output image". |
Output image | If "Output transform image" is selected, this will be the name assigned to the transform image added to the workspace. The transform image has XY dimensions equal to the input image and an equal number of Z-slices to the number of radii tested. Circluar features in the input image appear as bright points, where the XYZ location of the point corresponds to the XYR (i.e. X, Y, radius) parameters for the circle. |
Downsample factor | To speed up the detection process, the image can be downsampled. For example, a downsample factor of 2 will downsize the image in X and Y by a factor of 2 prior to detection of circles. |
Normalise scores | When selected, scores for each parameter combination will be normalised based on the number of samples used to produce them. Normalisation will prevent reduction of scores towards the image edge; however, it can also lead to some overestimation in these regions. |
Detection mode | Controls which objects will be added to the output collection:
|
Detection threshold | If "Detection mode" is set to "All above score", this is the minimum score a detected circle must have to be stored. Scores are the sum of all pixel intensities lying on the perimeter of the circle. As such, higher scores correspond to brighter circles, circles with high circularity (where all points lie on the perimeter of the detected circle) and circles with continuous intensity along their perimeter (no gaps). |
Number of objects | If "Detection mode" is set to "N highest scores", this is the number of objects with the highest scores that will be added to the output object collection. |
Exclusion radius (px) | The minimum distance between adjacent circles. For multiple candidate points within this range, the circle with the highest score will be retained. Specified in pixel units. |
Enable multithreading | Process multiple radii simultaneously. This can provide a speed improvement when working on a computer with a multi-core CPU. |
Show transform image | When selected, the transform image will be displayed (as long as the module is currently set to show its output). |
Show detection image | When selected, the detection image will be displayed (as long as the module is currently set to show its output). |
Show detection score | When selected, the detection image will also show the score associated with each detected object. |
Label size | Font size of the detection score text label. |
X range (px) | Range of X-position values to be tested. X-position can be specified as a comma-separated list, using a range (e.g. "4-7" specifies values 4,5,6 and 7). Unlike other parameter ranges, X-position can't be specified as a range extracting every nth slice (e.g. "4-10-2"), instead image downsampling ("Downsample factor" parameter) should be used. X-position values are specified in pixel units. |
Y range (px) | Range of Y-position values to be tested. Y-position can be specified as a comma-separated list, using a range (e.g. "4-7" specifies values 4,5,6 and 7). Unlike other parameter ranges, Y-position can't be specified as a range extracting every nth slice (e.g. "4-10-2"), instead image downsampling ("Downsample factor" parameter) should be used. Y-position values are specified in pixel units. |
Radius range (px) | Range of radius values to be tested. Radii can be specified as a comma-separated list, using a range (e.g. "4-7" specifies values 4,5,6 and 7) or as a range extracting every nth slice (e.g. "4-10-2" specifies values 4,6,8 and 10). Radii are specified in pixel units. |
Output radius resize (px) | Radius of output objects will be adjusted by this value. For example, a detected circle of radius 5 with a "radius resize" of 2 will have an output radius of 7. Similarly, setting "radius resize" to -3 would produce a circle of radius 2. |