[Insight-users] radius computation in itkHoughTransform2DCirclesImageFilter

Julien Jomier julien.jomier at kitware.com
Tue Sep 18 21:47:59 EDT 2007


Hi Carlos,

I think you are correct, this looks like a bug and the RadiusImage 
should store the average radius instead. Can you try to modify your 
local copy and see if that fixes the problem?

If you can log a bug in the Bug tracker (www.itk.org/Bug) and assign it 
to me that would be great. I'll take a look as soon as I can.

Thanks for the report,

Julien

Carlos Santos wrote:
> Hi all,
> 
> I am using itkHoughTransform2DCirclesImageFilter to detect circles in
> a set of images. I am getting strange results where the computation of
> the center of the circle seems to be normal but the radius is
> overestimated sometimes. Could someone provide me with a reference for
> the method used for radius computation (like some paper the
> implementation is based on)?
> 
> For those acquainted with the code (or the Hough transform), I am
> getting suspicious about the following lines in
> "itkHoughTransform2DCirclesImageFilter.txx":
> 
> if(outputImage->GetRequestedRegion().IsInside( index ))
> {
>      outputImage->SetPixel(index, outputImage->GetPixel(index)+1);
>      m_RadiusImage->SetPixel(index,
> (m_RadiusImage->GetPixel(index)+distance)/2);
> }
> 
> 
> Context: the above section is inside a loop over the image pixels. For
> each index, RadiusImage estimates the radius of a circle centered on
> index, by averaging distances from index to points which are probably
> over the circle edge. From the above, it seems that the iteration is
> performed as:
>     radius = (radius + distance)/2
> which might give excessive weight to the last distances used in the
> iteration. That is what I inferred from reading the code, thus I
> wanted some reference to know for sure what is going on.
> 
> Thanks in advance.
> 
> Carlos
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



More information about the Insight-users mailing list