Thursday, February 19th, 2009, 1581 days ago
Circle recognition using openCV
The picture below demonstrats openCV recognition progress of object detection. In this step, we now can locate the circle shapes in the captured image and output the number of the circles found.
Source code : circleDetect.cpp if you need more instructions please leave your comments.
QR code for this post, SCAN ME
POSTS MAY BE OF INTEREST
Doing openCV in pandaboard 3 – s...
Doing openCV in Pandaboard
Hand gesture recognition for HCI
Hand detection and image recognition
Coming soon: A review of openCV detect...
Pattern recognition and applications
Object tracking using AS3
Interactive table
Touchable holography
About the codes sharing
Usability of comsumer electronic produ...
Rules of memory management of openCV

Hi,
I’m getting started with OpenCV and wondered if you’ve posted your code anywhere? Thanks.
thanks for your concerning. i’ve updated the circle recognition code above.
can u please send me the code to detect circles in an image using OpenCV.. I need to detect a orange ball in a image
can u please send me the code to detect circles in an image using OpenCV.. I need to detect a orange ball in a image.This is my email address
python.c.madhav@gmail.com
can u please send me the code to detect circles in an image using OpenCV.. I need to detect a orange ball in a image.This is my email address
python.c.madhav@gmail.com Thanks in advance
the codes have been sent to you, please check it, hope it is helpful.
Thanks for sharing the code! It’s exactly the example I was looking for
I’m learning OpenCV to use it in robotics
Really thanks to you people…
.. THanks again
its really helpful to we newbies
Thanks for sharing the code
I’m learning OpenCV to use it in robotics
you welcome.
Hi Andol,
would you mind please emailing me the code of your example… I am getting started with openCV too and I also need to detect some colored balls on a plain background. Email: gatemaze@gmail.com
Many thanks,
GM
Ooops, sorry discard previous msg… just show that there is a link to the source code…
can u please send me the code to detect circles in an image using OpenCV.. I need to detect a yellow ball in a image.
My email address:brkapadia2003@yahoo.com
sure, the code has been sent.
Thanks for sharing the code
Could you please send me the code to detect circles in an image using OpenCV.
tecc.card@gmail.com
actually the code can be found in this post, the bottom. or you can refer here: http://www.andol.info/wp-content/uploads/2009/02/circledetect.cpp
Hey Andol,
i have to detect balls (they are all the same size) on a picture. I used cvSub and cvHoughCircles, and find all balls on the picture. But openCV doesn’t find them centered… so I’d like to test your code and see if it works better.
So please could you send me your code?
fightmaster[at]mkh-clan.de
Thank you!
http://www.andol.info/wp-content/uploads/2009/02/circledetect.cpp
thanks ya man
There are good example for opencv.
I wonder where your codes are, because i am going to use it as a refernce. If its OK to you, may I have it?
yes you can have it as you want.
http://www.andol.info/wp-content/uploads/2009/02/circledetect.cpp
can u please send me the code to detect circles in an image using OpenCV.. I need to detect a Orange ball in a image.
My email address:frndsndrahul@gmail.com
Thank you very much man, I will test your code (if it is the one I found in your link). One question here. I used to use Camshift to find green object(a green ball in another colored background), but it seems that my webcam doesnt do well find that. Do you think you algorithm will be better finding it? I will leave you feedback when I tested your program.
Thank you again
Well John, thought this may help, using hsv color segmentation to detect objects: http://www.andol.info/hci/1116.htm
Hi Andol,
Thanks a loooot for your reply.
I tested the code but :
int px[0], py[0];
gives me a problem. I use VS 2005 to compile it and it and the errors are :
cvtest.cpp(61) : error C2466: cannot allocate an array of constant size 0
.\cvtest.cpp(61) : error C2133: ‘px’ : unknown size
.\cvtest.cpp(61) : error C2466: cannot allocate an array of constant size 0
.\cvtest.cpp(61) : error C2133: ‘py’ : unknown size
I have the same problem…. can it related to library? I´m using the library below:
#include “stdafx.h”
#include “cv.h”
#include “highgui.h”
error:
.\RecconheceCirculo.cpp(31) : error C2466: cannot allocate an array of constant size 0
.\RecconheceCirculo.cpp(31) : error C2133: ‘px’ : unknown size
.\RecconheceCirculo.cpp(31) : error C2466: cannot allocate an array of constant size 0
.\RecconheceCirculo.cpp(31) : error C2133: ‘py’ : unknown size
.\RecconheceCirculo.cpp(91) : error C2065: ‘cout’ : undeclared identifier
.\RecconheceCirculo.cpp(111) : error C2065: ‘cout’ : undeclared identifier
.\RecconheceCirculo.cpp(113) : error C2065: ‘cout’ : undeclared identifier
i´m using VS 2008
I tested the code but :
int px[0], py[0];
gives me a problem. I use VS 2005 to compile it and it and the errors are :
cvtest.cpp(61) : error C2466: cannot allocate an array of constant size 0
.\cvtest.cpp(61) : error C2133: ‘px’ : unknown size
.\cvtest.cpp(61) : error C2466: cannot allocate an array of constant size 0
.\cvtest.cpp(61) : error C2133: ‘py’ : unknown size
I am using VS2008 to execute this program>>
could you tell me how to redefine px and py, so they could be no problems for the program?
It’s a good reference for me.
Hi ,
that’s interesting project , thank you.
I just started in OpenCV . I need to get the coordinate of a polygon on image , could you advise which function in OpenCV I should use ?
referring these, it may help
http://www.andol.info/hci/1273.htm
http://www.andol.info/hci/815.htm
http://www.andol.info/hci/797.htm
and
http://www.andol.info/hci/785.htm
dear andol, my opencv refuses to run, was wondering if you could help?
im running unbuntu 10.4
so far:
Downloaded source code for open cv+dependcys
Used cmake to create a new build folder
now im stuck ;/
everysingle guide on the internet seems not to work, im new to linux yesterday so im not to sure on how to configure it to work.
many thanks
Acido
Hi Acido, sorry i have got no experiences of openCV in Unbuntu.
But you could have a look at this openCV and Ubuntu, thought it may help.
Dear Andol
Could you please send me your code? I want to learn it, thanks a lot.
Email: chiefdesigner@live.ca
@Jason, please refer here http://www.andol.info/wp-content/uploads/2009/02/circledetect.cpp. Actually the code has been provided just on the bottom of the post which you have posted this comment