Code covered by the BSD License  

Highlights from
findcircles

4.71429

4.7 | 7 ratings Rate this file 11 Downloads (last 30 days) File Size: 2.66 KB File ID: #121

findcircles

by John T. McCarthy

 

24 Apr 2001

This function provides an example of feature-extraction in a binary image.

| Watch this File

File Information
Description

This function provides an example of feature-extraction in a binary image. This example could be adapted for other specific requirements.

Features are assumed to be made up of ones, against a background of zeros. The program makes an effort to remove outliers and stray pixels (line 47). Features are isolated using MATLAB's morphological routine BWLABEL. Conceptually, a square is drawn around each separate feature, then the feature is compared with a circle occupying the same square. If it resembles the circle to within a certain tolerance (line 40), the feature is counted as a circle. Features are not considered if they are smaller than a preset size (line 43). The program also finds the distance between the centers of the first two circles found. Circles may be missed if they are only partly in the image (i.e. at the edges).

NOTE: Requires IMCIRCLE.M, also provided in the MATLAB image userfiles.

The files have been tested on Matlab v. 5.3.1, and 6.0.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
15 Jul 2002  
12 Jan 2004 Nicolette Louw

Very effective algorithm, and very easy to use.

18 Apr 2004 Harry Beveja

I do not understand how the comparision is made. I ran it on my image and it found all images are circles. Confused.

21 Jun 2004 Carlos Palacios Morales

Ok

04 Sep 2005 Saurabh Garg

excellent code, works like a charm.

23 Oct 2006 ajith ukwatta  
28 Mar 2007 Andres Cifuentes  
19 Dec 2009 chaogui xia

good

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image analysis John T. McCarthy 22 Oct 2008 06:32:28
image processing John T. McCarthy 22 Oct 2008 06:32:28
binary image John T. McCarthy 22 Oct 2008 06:32:28
find John T. McCarthy 22 Oct 2008 06:32:28
circles John T. McCarthy 22 Oct 2008 06:32:29
image John T. McCarthy 22 Oct 2008 06:32:29

Contact us at files@mathworks.com