Ask Your Question
0

Hough Circle

asked 2016-09-27 07:22:26 -0600

greenworld gravatar image

updated 2016-09-27 07:54:09 -0600

berak gravatar image

Hi everyone, I have a problem that I do not understand as below: I write a program to detect the circle, my goal is detect it in binary (only black and white) image. I read some example and I can use Houghcircle to detect the circle but only on gray image, in binay image I can not. Can you help to explain and solve my problem. Thank you!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-09-27 12:30:38 -0600

matman gravatar image

You can try to smooth your binary image a bit with cv::GaussianBlur or cv::blur before calling HoughCircles.

edit flag offensive delete link more

Comments

Yes, you are right, thank you!

greenworld gravatar imagegreenworld ( 2016-09-27 17:44:56 -0600 )edit
0

answered 2016-09-27 07:46:35 -0600

berak gravatar image

updated 2016-09-27 07:50:54 -0600

hough works on gradients, and a binary image does not have those.

please have a look at the tutorial

you either need a different image format, or a different method (findContours -> ellipse approx.)

edit flag offensive delete link more

Comments

my problem is I gonna detect a circle real time, but in the gray image, the speed quite slow, (use houghcircles)

greenworld gravatar imagegreenworld ( 2016-09-27 12:01:18 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-27 07:22:26 -0600

Seen: 329 times

Last updated: Sep 27 '16