[ITK-users] Accumulator size in itkHoughTransform2DLinesImageFilter

Laurent Chauvin lchauvin at bwh.harvard.edu
Tue Oct 27 16:29:34 EDT 2015


Hello,

I'm trying to figure it out how the 2D Hough transform has been implemented
for line detection.
I think I understand it, however, I have a question. The accumulator size
has one dimension that has angle and the other one has radius.
In the header file, it is said that 'The distance axis depends on the size
of the diagonal of the output image' which I understand, because the point
on the line cannot be further away from the origin than the opposite
corner, with a radius equal to the diagonal.

However, my question is in the implementation. When I look at the method
GenerateOutputInformation, size[0] (distance axis) is equal to:
sqrt( m_AngleResolution*m_AngleResolution +
input->GetLargestPossibleRegion().GetSize()[0]*input->GetLargestPossibleRegion().GetSize()[0])

This seems to me that instead of taking the diagonal of the input image, it
calculates the diagonal of an image with in X axis the number of pixels of
the input image (normal) but in Y axis the angle steps from -pi to pi.

This axis is present in the accumulator, but I don't really understand why
we use it here, to calculate the size of the distance axis.

Is it a mistake or did I miss something ?

Thank you.
-Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20151027/fb9260c6/attachment.html>


More information about the Insight-users mailing list