[Insight-users] The Hough transform and world/pixel coordinates

Gomez, Alberto alberto.gomez at kcl.ac.uk
Wed Jan 27 05:52:31 EST 2010


Hi all,

I am using the itk::HoughTransform2DLinesImageFilter  to extract the 
lines from an image for a certain application. The point is that I don't 
want to draw the lines but to get the lines parameters (direction and a 
point ) for further computations. I realised that, following the example 
from the software guide, the vector and the line are in pixel 
coordinates and not in real world coordinates. Can anyone confirm this?

So, what I did is to use the TransformIndexToPhysicalPoint() method, but 
it does not work properly (mi lines are slightly deviated). My 
assumption is that the extracted points are in pixel coordinates but 
aren't integers. Because of that, the TransformIndexToPhysicalPoint() 
method rounds them and then computes the physical coordinates, which 
yields in the inaccuracy I realized.

The solution I found was to get two points, in pixel coordinates, very 
far from each other, so that the inaccuracy of the conversion is 
smaller. Nevertheless, this is not clean. Does anyone know a way to get 
the line parameters accurately in physical coordinates? I guess that the 
Hough map (output of the filter) is (r, theta) in real physical 
coordinates, but I don't know how to extract the maximums in the same 
way that getLines() does (using the disc, etc).

Thank you,
Alberto
| 
<http://www.itk.org/Doxygen/html/itkHoughTransform2DLinesImageFilter_8h-source.html>| 


-- 

Alberto Gómez

/Division of Imaging Sciences
The Rayne Institute
4th Floor, Lambeth Wing
St Thomas' Hospital
London SE1 7EH /

phone: +44 (0) 20 718 88364
email: alberto.gomez at kcl.ac.uk <mailto:alberto.gomez at kcl.ac.uk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100127/96a24917/attachment.htm>


More information about the Insight-users mailing list