Sign in to follow this  

Circle Hough Transform

This topic is 3861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Detect circles in what scene? In 3d geometry or in a screen image?

Also, how do you know that the circle will be centered on (test_point_x, test_point_y) with the right radius? If you don't, your current method would need more for loops for that, which would take way, way too long.

Tell us what circles you're trying to find and what you need to use them for, and maybe we can help think of a way around the problem.

Share this post


Link to post
Share on other sites
Since you're using exactly 360 iterations every time, just create a 360 wide lookup table for the sine function. It will actually work very fast, since the table is accessed in a sequential manner. Also, you don't need to do a table for cosine, just offset the lookups by 90 and wrap them around. Another piece of advice. Remove the divison by 180, and just bake that into the PI constant instead.

Edit: Just realized my two pieces of advice don't fit together. If you're doing a lookup table, index into it with i directly.

Share this post


Link to post
Share on other sites
Quote:
Original post by nagromo
Detect circles in what scene? In 3d geometry or in a screen image?

Also, how do you know that the circle will be centered on (test_point_x, test_point_y) with the right radius? If you don't, your current method would need more for loops for that, which would take way, way too long.

Tell us what circles you're trying to find and what you need to use them for, and maybe we can help think of a way around the problem.


Let's say I have a 2D rounded rectangle image, and I want to detect the 2 semicircle ends. The radius is an estimate. I use the calculated x and y in an accumulator, like all hough transform uses, to find the most likely place a circle or part of circle would be.

Share this post


Link to post
Share on other sites

This topic is 3861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this