[Insight-users] Re: radius computation in
itkHoughTransform2DCirclesImageFilter
Peter Roesch
Peter.Roesch at fh-augsburg.de
Wed Sep 19 09:05:48 EDT 2007
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