Jump to content
  • Advertisement
Sign in to follow this  
GamerYZ

Circle Hough Transform

This topic is 4204 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

Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!