Circular Hough Transform

A Java applet demonstration

The circular Hough transform finds circles of a given size in an image.

See also: Active Contours (Snakes) using Java: a demonstration of boundary refinement.

Your web browser apparently does not support Java applets. Netscape 3.0 (except for Windows 3.x) is one of several browsers that run Java applets. Further information for users with non-Java browsers may be added to this page in the future. Thank you for your interest.

Instructions

The dialog boxes at the top of the applet allow you to enter the radius of the circles you would like to find in the image and the number of circles you would like to find (up to 25). The original image is shown on the left and the Hough transform of the image for the radius value entered is shown on the right. The found circles are drawn on the original image in red, and the center pixel of these circles is changed to red in the transformed image. Changes to the values of the radius or number of circles take effect only after the 'return' key is pressed. The original image used here has a number of circles of different sizes in white on a black background, with their respective radius sizes listed on the circles in gray.


Description

This applet demonstrates the use of the circular Hough transform to find circles of a given size in an image. The transform is computed by taking the gradient of the original image (in this case, the Sobel gradient) and accumulating each non-zero point from the gradient image into every point that is one radius distance away from it. That way, edge points that lie along the outline of a circle of the given radius all contribute to the transform at the center of the circle, and so peaks in the transformed image correspond to the centers of circular features of the given size in the original image. Once a peak is detected and a circle 'found' at a particular point, nearby points (within one-half of the original radius) are excluded as possible circle centers to avoid detecting the same circular feature repeatedly.


Warning

Although in theory Java applets are supposed to work equally well on all supported platforms, Java is still a relatively immature technology and you may experience problems running this applet on your system. It seems to work fairly consistently on my PowerMac 7600/120 system (32MB RAM) running MacOS 7.5.3 and Netscape 3.0, but I have not had the opportunity to test it on other systems.

If you experience any problems running these applets on your system, I'd appreciate a quick note from you briefly describing the situation so I can at least be aware of problems with these programs and maybe even fix a few of them. Thanks!


References

D. H. Ballard, "Generalizing the Hough transform to detect arbitrary shapes." Pattern Recognition, v. 13, n. 2, pp. 111-122, 1981.

C. Kimme, D. H. Ballard, and J. Sklansky, "Finding circles by an array of accumulators." Communications of the Association for Computing Machinery, v. 18, pp. 120-122, 1975.

P. V. C. Hough, "Method and means for recognizing complex patterns." U. S. Patent 3069654, 1962.

General Image Processing References

Kenneth R. Castleman, Digital Image Processing. Prentice Hall, 1996.

Anil K. Jain, Fundamentals of Digital Image Processing. Prentice Hall, 1989.

William K. Pratt, Digital Image Processing. Wiley, 1991.

Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing. Addison-Wesley, 1992.


Return to Image Filtering using Java.

Return to Mark's home page.


Page created: 30 October 1996
Code last modified: 30 October 1996
Page last modified: 25 February 1998

Mark A. Schulze
schulze@persci.com
© Copyright 1996