# 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.

## Recommended Posts

. [Edited by - GamerYZ on September 18, 2007 6:38:00 PM]

##### Share on other sites
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 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 on other sites
Quote:
 Original post by nagromoDetect 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.

1. 1
Rutin
48
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633409
• Total Posts
3011717
• ### Who's Online (See full list)

There are no registered users currently online

×