[Insight-users] Re: radius computation in
itkHoughTransform2DCirclesImageFilter
Carlos Santos
csantos.incor at gmail.com
Wed Sep 19 13:12:37 EDT 2007
Hi Peter and Julien,
Thanks for the responses!
I hacked a version of the filter that uses an additional accumulator
image and DivideImageFilter to calculate the average radius. It is
essentially the same thing that Peter suggested, except his way is
more efficient (it allocates one less image and uses no additional
filter). The hacked version was able to pass the tests. I will mail it
to my co-worker (who is actually processing the images) to see whether
the results are improved.
For the time being I filled a bug report and attached the new filter to it:
http://www.itk.org/Bug/view.php?id=5750
I couldn't assign it to Julien, though (maybe I don't have the
privilege or simply I could not find the way to do it in the web
interface).
Cheers,
Carlos
On 9/19/07, Peter Roesch <Peter.Roesch at fh-augsburg.de> wrote:
> Hi Carlos,
>
> I came across the same source file when I was playing with
> the Hough transform a while ago. My conclusions were
>
> 1. The iteration
> radius = (radius + distance)/2
> is probably meant to be some average value, but in fact
> is not as you pointed out in your posting.
> A possible way to correct this is to simply add up the
> distances in the loop you quote
> ...
> m_RadiusImage->SetPixel(index, m_RadiusImage->GetPixel(index)+distance);
> ...
>
> and to add another loop to do the averaging, something like
>
> for index in m_RadiusImage:
> m_RadiusImage->SetPixel(index,
> m_RadiusImage->GetPixel(index) / outputImage->GetPixel(index));
> ...
>
> 2. However, even with corrected average value computation, the filter is
> not capable of detecting concentric circles, as two 2D histograms
> (one for the radii and one for the centre positions) are used.
> In order to store more than one radius per centre position, a
> 3D histogram (more memory and computation time ..) is required.
>
> Greetings
> Peter
>
More information about the Insight-users
mailing list