Circle Hough Transform

Started by
2 comments, last by GamerYZ 16 years, 11 months ago
. [Edited by - GamerYZ on September 18, 2007 6:38:00 PM]
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.
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.
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.

This topic is closed to new replies.

Advertisement