Detect circles with various radii in grayscale image via Hough Transform

Detect circular shapes in a grayscale image. Resolve their center positions and radii.

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Circular Hough transform based on the gradient field of an image.
1. Operates on grayscale images, NOT B/W bitmaps.
2. NO loops in the implementation of Circular Hough transform, which means faster operation but at the same time larger memory consumption.
3. Detection of radii works for concentric circles as well.

Cite As

Tao Peng (2026). Detect circles with various radii in grayscale image via Hough Transform (https://www.mathworks.com/matlabcentral/fileexchange/9168-detect-circles-with-various-radii-in-grayscale-image-via-hough-transform), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

Added Signal Processing Toolbox as additional product requirement

1.0.0.0

Fixed a bug in the code which causes the following problem:
??? Attempted to access SgnCv_LMPos(0); index must be a positive integer or logical.
Error in ==> CircularHough_Grd at 630
cirrad(k) = SgnCv_LMPos(end);