30 Jul 2020

Hough Circle Fitting

This module uses a Generalized Hough-transform to detect circles in an image.

hough circle fitting xtra

This module can use either a label-field that already contains edges (disable Canny edge-detection for these inputs), or it can detect edges in a gray-scale image (enable Canny edge-detection for these inputs). Circle-fitting is done per XY-slice. The module uses the Python-library scikit-image to perform the Hough-transform.

The module creates three results:

  • A circle edge mask label field.
  • A filled circle mask label field (calculated by scikit-image's flood-fill).
  • A table that contains 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.

To invoke the module, right-click on the image and then select "Xtra -> Image Processing -> Hough Circle Fitting".


Example project:

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):

  1. On an edge-image created via Sobel Filter and Auto Thresholding (left).
  2. Directly on the grey-scale image with activated edge-detection (right).

The parameters of Hough Circle Fitting are set to search for circles with radii between 10 and 40 pixels.

The centers of the detected circles must be at least 20 pixels apart, which corresponds to the diameter of the smallest circles looked for.

The module returns a maximum of 200 circles.

To reject circles with low significance, the minimum allowed accumulator-value is set to 0.8 and 0.45, respectively.