Hough Circle Fitting
This module uses Generalized Hough-transform to detect circles in an image.
For performing the actual Hough-transform, the Python-library scikit-image is used.
Circle-fitting is done per XY-slice.
As input, either a label-field already containing edges can be used (Canny edge-detection should be disabled), or, by enabling Canny edge-detection, edges can be detected in a grey-scale image by the module itself.
Three results are created, two label-fields and one spreadsheet:
- circle edge mask,
- filled circle mask (calculated by scikit-image's flood-fill),
- table, containing slice-number (for 3D images), circle centers, radii, and accumulator values. The coordinates of the circle-centers (X, Y, Z) and the radii are given in physical units.
Invoke the module by right-clicking on the image and then selecting "Xtra -> Image Processing -> Hough Circle Fitting".
The example-project demonstrates the use of Hough Circle Fitting on an Amira-Avizo example dataset located in "tutorials\xlab".
In the project, one slice from the data is extracted, and then Hough Circle Fitting is applied in two different ways (but leading to very similar results):
- on an edge-image created via Sobel Filter and Auto Thresholding (left),
- directly on the grey-scale image with activated edge-detection (right).
parameters of Hough Circle Fitting are set such that circles with radii between
10 and 40 pixels are searched.
The centers of the detected circles must be at least 20 pixels apart, which corresponds to the diameter of the smallest circles looked for.
A maximum of 200 circles would be returned.
To reject circles with low significance, the minimum allowed accumulator-value is set to 0.8 and 0.45, respectively.