Ask Your Question
0

Detect circle in binary (thresholded image)

asked 2016-09-24 19:19:58 -0600

greenworld gravatar image

Hi everyone, I want to detect circle on the binary image, I try to use HoughCircles but it does not work, could you suggest me some methods to detect circle from binary image.

edit retag flag offensive close merge delete

Comments

When you say "it does not work", could you be more specific? What problems are you having? And could you post an example image?

AJW gravatar imageAJW ( 2016-09-25 03:06:36 -0600 )edit

you need a grayscale, not a binary image.

berak gravatar imageberak ( 2016-09-27 07:47:49 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-09-25 03:10:40 -0600

AJW gravatar image

One approach might be to use findContours() to get a collection of outline points, then use fitEllipse() to fit an ellipse to them. If the two axis lengths are very similar, it's a circle, otherwise it's not. The ellipse fitting tends to be pretty sensitive to outliers though, so in the case where you do have a circle, you'd need to have very few outline points that don't lie on the circle. It's hard to say without knowing what your data looks like.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-24 19:19:58 -0600

Seen: 404 times

Last updated: Sep 24 '16