View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Circle Finder

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0
5.0 | 4 ratings Rate this file 66 Downloads (last 30 days) File Size: 116 KB File ID: #34365 Version: 2.0
image thumbnail

Circle Finder

by

Brett Shoelson (view profile)

 

27 Dec 2011 (Updated )

Interactive app and function to find circles in an image.

| Watch this File

File Information
Description

In R2012a, we introduce CIRCULAR HOUGH TRANSFORMS for detecting circles in images. There are several parameters which can be manipulated to enhance the performance of the IMFINDCIRCLES functionality. This app provides an interactive environment for changing parameters and options, and for visualizing immediately the effects of the calculation.
USAGE:
circleFinder launches the GUI environment with the default image ('coins.png') pre-loaded.
circleFinder(inputImage) sllows user to specify input image, or the name of an input image.

CLASS SUPPORT:
inputImage can be any valid image format readable by IMREAD. Color (RGB) images are supported, but circle detection is performed on the RGB2GRAY representation.
     
(See help for IMFINDCIRCLES for details.)

NOTE: This function and app are verified for R2014b readiness, and are intended as REPLACEMENTS FOR FindCirclesGUI.

A VIDEO TUTORIAL explaining the use of this app can be accessed here:
https://www.youtube.com/watch?v=dgxvBBn_oIQ

Comments/suggestions welcome.

Acknowledgements

This file inspired Segment Tool: An Interactive Gui For Segmenting Images.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.5 (R2015a)
MATLAB Search Path
/
Other requirements The dependency report will show a reliance on the Computer Vision System Toolbox, but that Toolbox is required only for outputting images burned with detected circles. All other functionality should work independently of that Toolbox.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
15 Jun 2016 Brett Shoelson

Brett Shoelson (view profile)

@Hauke,
Thanks for the rating--your approach to processing large images is clever. And if you're not aware of it, the |blockproc| function facilitates exactly such interactions. Once you have a function handle (as returned by my app), you can read and process arbitrarily large images a chunk at a time!
Cheers,
Brett

Comment only
15 Jun 2016 Hauke Carstensen

Thank you for providing this GUI, I have used it a lot!
It could not process my images with size 20.000*20.000, but by adding a loop that goes through the image in (overlapping) sections it is possible. Double counts are cleared in a second step. In this way you also have a process bar and you save memory.

09 Feb 2016 Brett Shoelson

Brett Shoelson (view profile)

@Kenneth,
Thanks for the suggestions. If you click the "Export" button, one of the things exported is a "results" image. Alternatively, you can simply write:

imshow(imgIn)
viscircles(circles,radii)

As for the red-until-done, how long are your processes taking? Typically, it's pretty fast.

Regards,
Brett

Comment only
08 Feb 2016 Kenneth Schepler

Much better than trying different parameters by hand. It would be nice to be able to save an image of what I see once I've found the circles and their radii. Also, changing the color of the Process Now button to red until it was done would help to recognize when the processing is complete.

Comment only
12 Dec 2013 khorshid1974  
16 Oct 2012 Kyle Morris

With a 4096 x 4096 image, searching with two-stage (sensitivity 0.3), over 10 - 50 px, 'tic' and 'toc' report a calculation time of 95 seconds.

I appreciate that this image size and search parameters are probably pushing 'imfindcircles' beyond its intended design and reliability so the time is not a problem, I'm actually quite impressed, just curious if the accumulator progress can be reported on.

Comment only
15 Oct 2012 Brett Shoelson

Brett Shoelson (view profile)

Kyle, thanks for the rating. A waitbar is not really practical in this case--there's no for loop. Just an accumulator that runs until it's done. (How long are your calculations taking, though?)

Comment only
15 Oct 2012 Kyle Morris

Great implementation. Is there any way to indicate the Hough transforms progress with a 'waitbar' for instance?

21 Sep 2012 Jehan Ziad Ghafuri  
Updates
08 Mar 2012 1.4

Steered to correct files.

09 Mar 2012 1.2

Adding copyright.

12 Sep 2012 1.5

Updated to include an App file for R2012b.

13 May 2013 1.6

Now defaults to "process immediately" = false. Also, takes optional input argument specifying initial radius range. A few minor bug fixes, better expandAxes behavior, better image import behavior.

21 Aug 2013 1.7

Incorporates a missing file that disallowed loading new images. Also fixes a problem with underscores in image titles.

21 Aug 2013 1.8

Fixed a problem with underscores in image names, and with loading subsequent images.

08 Jan 2015 1.9

Verified for R2014b readiness. I think it should still work in previous versions.

11 Jun 2015 2.0

I think I still had some incompatibilities with newer (R14b+) MATLABs. This should fix them.

07 Jul 2015 2.0

Modifying description to include link to instructional YouTube video.

Contact us