Search Comments and Ratings

File Comment by Comment
09 Sep 2014 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm David Kelly

David Kelly (view profile)

Add the following at the bottom of the MidPoint Circle function to created filled circles

tempR = sqrt((double(ii) - double(xc)).^2 + (double(jj) - double(yc)).^2);
i(ii,jj)=value;
end
end
end

Comment only
25 Jun 2014 Hough Transform for circle detection An optimized Hough transform for circle detection. Zhang Zheng

Zhang Zheng (view profile)

3
06 Jun 2014 Hough Transform for circle detection An optimized Hough transform for circle detection. Brett Shoelson

Brett Shoelson (view profile)

Although it's not specified, the Image Processing Toolbox is a required product for this function.

Comment only
19 May 2014 Machine learning - balancing a stack of balls A genetic algorithm is used to train a neural network controller to balance a stack of balls. Daria

Daria (view profile)

5
18 Feb 2014 Hough Transform for circle detection An optimized Hough transform for circle detection. sardar

sardar (view profile)

5
01 Nov 2013 calcCircle Find the circle that passes through 3 non-collinear points. Juernjakob Dugge

Juernjakob Dugge (view profile)

5
11 Oct 2012 Hough Transform for circle detection An optimized Hough transform for circle detection. shelly

shelly (view profile)

I hace two question,first,this algorithm must need the radius,second,what's the meaning of "Undefined function or method 'circlehough' for input arguments of type 'double'"?thank you very much

4
25 Sep 2012 Machine learning - balancing a stack of balls A genetic algorithm is used to train a neural network controller to balance a stack of balls. Rob Campbell

Rob Campbell (view profile)

5
10 May 2012 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Chean Lee

Chean Lee (view profile)

This code is extremely useful.
I'm not particularly good in using matlab but i had no trouble understanding how to use it (although it took me a good FIVE minutes).

So Five stars for sure for doing EXACTLY what it says on the box, nothing more and nothing less. You guys should be ashamed for rating less then 5 stars.

For others, to get rid of the gaps I used

FilteredResult=medfilt2(Result, [3 3])

This is how I used this code
(you will now notice i'm no good at matlab)

GGG(1:355,1:355)=0;
xxx(1:355,1:355)=0;
y=rand(1,150);
y=y*50

jj=1;
for j=1:150;
AAA=MidpointCircle(xxx,j,177,177,y(1,jj));
GGG=AAA+GGG;
jj=jj+1;
end;

GGG=medfilt2(GGG, [3 3])
image (GGG)

5
29 Feb 2012 Hough Transform for circle detection An optimized Hough transform for circle detection. Miroslav Ondac

Miroslav Ondac (view profile)

4
10 Jan 2012 Hough Transform for circle detection An optimized Hough transform for circle detection. ling li

ling li (view profile)

This works well

5
26 Dec 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. Olfa

Olfa (view profile)

How to view the code please??
can you send me the code to chabbeh.olfa@yahoo.fr
Thanks

Comment only
10 Dec 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. Carlos

Carlos (view profile)

How can i show the processed image just like the image above? i am trying to detect the pupil, can anyone could give me any information of this function? carlosfer.02@gmail.com
ty

Comment only
29 Oct 2011 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Ibtissem Labed

Ibtissem Labed (view profile)

i

Comment only
02 Oct 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. Reji

Reji (view profile)

I would be really grateful if you could tell me how can i modify this code to get the cordinates of the centre of the biggest circle detected in the image. I am using a head gear to capture the live image of an eye and in that i need to track the centre of the cornea.
I would be really grateful if you could suggest on how to get the cordinates of the cornea from the close up image of an eye.

Comment only
02 Oct 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. Reji

Reji (view profile)

This is a wonderful code. I really appreciate the optimization done in this code.

I would be really grateful if you could tell me how to extract the coordinates of the center of the largest circle detected in the image.
kindly send me the code to contactreji@yahoo.com
Thanks
Reji

4
03 Sep 2011 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm William Lau Kai Wei

William Lau Kai Wei (view profile)

this is a coding to draw a circle.
i using the same code but i looping it with reduce the radius.

let say, my radius is 7, I try looping it by draw radius with 7, and then 6, and then 5 and so on until it become 0. It really fill in a lot of space but the problem is still got some space is empty.

My problem now is I want to fill in all the area inside the circle. So, any idea to solve this problem? Thank you

5
28 Aug 2011 Learn French vocabulary A simple tool to learn French vocabulary with intelligent choice of test word. Matignon

Matignon (view profile)

wofks well the french.m

4
17 Aug 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. Paulo

Paulo (view profile)

i can't seem to have this work properly. how can it detect the circle shape of the pupil like the one in the image above? please email me. i need help! thanks. pauflores912@yahoo.com

4
07 Aug 2011 Learn French vocabulary A simple tool to learn French vocabulary with intelligent choice of test word. Mohammad

Dear,
I ran the program, but for text I got error, I think one M-file is missed
test_I = I(randi(length(I)));
could you please provide this ?

Comment only
20 Jul 2011 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm chitra s

chitra s (view profile)

what value i have to give for the parameter 'value'?

Comment only
22 Apr 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. yzinedine

yzinedine (view profile)

hey, if anyone had this error, cause each time time I Run this program I had this error at line 74 ..
if xpxxmax || ypxymax, continue; end
xpxxmax and ypxymax are indefined.
so tried to feet the program and I fixed them like this :
if xpx>=xmax || ypx>=ymax, continue; end
if anyone have an idea about that.

Comment only
06 Apr 2011 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Nor Muzakkir

Nor Muzakkir (view profile)

got it working.

i = the pixel value for coordinate (1,1).
xc and yc = center coordinate of the circle.
value = the pixel value for the circle.

extra note: the value for xc and yc must be larger than radius.

thanks author, i've been searching for this kind of function.

4
23 Feb 2011 Hough Transform for circle detection An optimized Hough transform for circle detection. White Apple

White Apple (view profile)

I don't understand how to run the program. When I set houghcircle(i,10,4);
then figures come out continuously.
I want to use this program to detect the eyes circle.

Comment only
20 Oct 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. Kevin J. Delaney

Kevin J. Delaney (view profile)

It seems the Image Processing Toolbox is required--is this correct?

Comment only
02 Oct 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. SasiKanth

SasiKanth (view profile)

Works neatly! Although, wish the program was better commented!

5
02 Jul 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. zahid khan

zahid khan (view profile)

??? Maximum recursion limit of 500 reached. Use
set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack
space can
crash MATLAB and/or your computer.

Error in ==> ismember

Comment only
02 Jul 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. zahid khan

zahid khan (view profile)

??? Error using ==> houghcircle
Maximum recursion limit of 500 reached........................................your available stack space can crash MATLAB and/or

Comment only
02 Jul 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. zahid khan

zahid khan (view profile)

its not works for me..

Comment only
04 May 2010 Hough Transform for circle detection An optimized Hough transform for circle detection. Alireza Saberi

Alireza Saberi (view profile)

Nice work, good for like head detection application

Hough transform is not sensitive to noise and it is robust to those discrete edges, but it is slow. So lots of development on its speed were done such a randomized hough transform (RHT)

Comment only
08 Dec 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. Kenz

Kenz (view profile)

This script is quite handy for finding a known radius circle in an image. (I withheld five stars only because the program is not properly commented.)

Comment only
08 Dec 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. Kenz

Kenz (view profile)

4
15 Sep 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. LOVE Jain

LOVE Jain (view profile)

can some1 send me matlab program to find circle co-ordinate and radius in an image..
my email is <jain.deep108@gmail.com>

Comment only
21 Aug 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. naveen kumar B T

naveen kumar B T (view profile)

thanks , program works nice.

to run the program follow this code
houghcircle(i,10,4); % i=binary image containing a circle
% 10= radius, 4= threshold (>=4).
if u don t specify threshold it will be selected automatically.

everything is given nicely.

2
15 Aug 2009 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Matthew

Matthew (view profile)

Can someone fill me in as to how this code works. Also, can it be altered to make an annulus as opposed to just a circle?

4
07 Aug 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. syed islam

syed islam (view profile)

Could anyone plz tell me how to run the program..? when I run the program, it says "??? Error using ==> run at 56
Input argument "thresh" is undefined."

And sometimes.."??? Error using ==> run at 56
Input argument "Imbinary" is undefined."

Thanks.

5
04 Jun 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. Berkan Sesen

Berkan Sesen (view profile)

I apply this to a 512*512 logical image but get no results.
The function has an 'r' parameter, which is given by the author as follows:
"r - radius of circles."

I suspect the radius has to be specidifed precisely. If that is the case and the lagorithm requires a priori knowledge of the circle radius, I do not see much functionality in this.

2
09 May 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. Idillus

Idillus (view profile)

Nice function. Can you tell me how to find the radious and values?

4
02 May 2009 Hough Transform for circle detection An optimized Hough transform for circle detection. Anil N

Anil N (view profile)

When i run this code, i am getting som many numbers, can any one help me how to see the circles on the input image

Comment only
25 Dec 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. Pradeep Cheriyan

Pradeep Cheriyan (view profile)

can you tell me how we enter the region parameters for the function?

Comment only
08 Oct 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. andy ong

hi.. i have an image that contains 400 circles.. is there any way where i can detect 1 of the circle?

Comment only
07 Oct 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. Chathurika Perera

can someone help me how to use this for face recognition

5
13 Aug 2008 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Andrew Harward

It is simple to modify this function to allow circles of both odd & even size (currently the algorithm cannot produce even sized e.g. 8x8 circles). Maybe I'll post up a modified version if that's OK with you?

3
10 Jul 2008 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm John Doe

Excellent, clean implementation. This is the first of over a dozen submissions I've seen that actually uses this algorithm (and they all should). Very nice. Commenting your code would be a nice touch, however...

4
29 Jun 2008 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Sheila Geva

Hi,
I need to draw circles in each cell in an intensity matrix that I'm printing. How do I use your code to do so?
Also, I don't understand the parameters that need to be put in the function. Please explain?

2
31 May 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. m lopen

I don't understand how to use this function.would you please help me.thanks a lot.

Comment only
06 Apr 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. imamiscool imamiscool

cool, but how can I use this function to measure similarity between several image?
can I use the accumulator or else?

5
22 Mar 2008 Draw a circle in a matrix / image Draw a circle in a 2D matrix using the integer midpoint circle algorithm Ellen Blinka

When I ran the code, there were some skipped pixels in the drawn circle.

2
07 Mar 2008 calcCircle Find the circle that passes through 3 non-collinear points. John D'Errico

This submission and its cousin, points2circle (FEX 19082) were submitted together, in the spirit of friendly competition. Lets take an extra careful look at these two, in that same spirit. How do they compare?

The most obvious question is, does this function work? I'll create a set of three points on a known circle, here with center [1 2], and radius 1.3.

center = [1,2];
theta = [.1 .2 .98]; % radians

[c,r] = calc_circle(p1,p2,p3)
c =
1 2
r =
1.3

So, yes, it does indeed seem to work properly, returning the correct center and radius for my test points.

How fast is this code? I've used Steve's code, timeit (find it on the fex!) for the comparison. It gives a good estimate for the time required.

timeit(@() points2circle(p1,p2,p3))
ans =
0.00047171

timeit(@() calc_circle(p1,p2,p3))
ans =
0.00017641

Note that both codes are fast, but that calc_circle is nearly 3 times as fast. There really is not a huge amount of work to do, so the time should not be a serious factor, UNLESS you have this function call deep inside nested loops and you need maximum speed. In that event, calc_circle (this code) will give you almost 3x the throughput.

Pure speed is not all that matters however. Do you want the right answer slowly, or the wrong one fast? While speed is important, we also need to look at other factors. Does this code detect collinear data?

p1 = [0 0]; p2 = [1 1]; p3 = [3 3];
[c,r] = calc_circle(p1,p2,p3)
c =
0 0
r =
-1

As I might hope, it finds the problem and returns a result that indicates a problem, although no error or warning message was thrown. The user must test the radius to know there was a problem. IMHO, points2circle dealt with this in a more friendly way.

Next, I looked at the interface. The alternative code, points2circle, has a more flexible interface, allowing the user to provide their points in either of two logical forms. However, I'll admit that the calc_circle interface is entirely adequate here.

calc_circle has no error checks on its arguments. This might partly explain its speed. There are no size checks, no checks on the argument types. I did find an H1 line here.

The help for calc_circle is poor, almost useless in fact. Lets try it here:

help calc_circle
Fit a circle to a set of 3 points
Returns radius of -1 if points are collinear

Author: Peter Bone
Date: 6th March 2008

That is all of it! What information does this provide about how to use calc_circle? Almost none! What are the arguments? What type should they be? What sizes? Are these three points that lie in the (x,y) plane? Can it be in higher dimensions? What output(s) would we expect? There is no example of use. I don't want to know the author's name and the date as much as how to use the code. That is what help is for, and this author should know better.

An interesting point to note is whether this code survives a common problem. What happens if your data is not composed of doubles?

p1 = rand(1,2);p2 = rand(1,2);p3 = rand(1,2);

This one works:
[c,r] = calc_circle(p1,p2,p3)
c =
0.41636 0.48853
r =
0.34388

Single data is fine:
[c,r] = calc_circle(single(p1),single(p2),single(p3))
c =
0.41636 0.48853
r =
0.34388

But no test is done for non-floating point data. calc_circle just returns its silent non-answer.

[c,r] = calc_circle(uint8(p1),uint8(p2),uint8(p3))
c =
0 0
r =
-1

An often overlooked issue is, can calc_circle survive complex data? It does so nicely. Well done here, since calc_circle uses norm to compute the radius at the end.

[c,r] = calc_circle(p1+i,p2+i,p3+i)
c =
0.41636 + 1i 0.48853 + 1i
r =
0.34388

Overall, this code gets a rating of 2 for me, although I did consider a 3 rating. The lack of any useful help, examples, and error checks pushed me down. Your job as a programmer does not end when you write the last line of code. (The author should know this fact.) I liked the better speed of calc_circle, as well as the use of norm for the radius.

With the proper cleanup, I'd rate this code a 5.

2
03 Mar 2008 Hough Transform for circle detection An optimized Hough transform for circle detection. saif shloul

can this code help me in hand writting recognation

Comment only