[Community] [Insight-users] itk::HoughTransform2DLinesImageFilter - implementation seems incorrect?

Richard Frank rfrank at dominionsw.com
Sun Oct 27 22:36:49 EDT 2013


I am prototyping in Matlab and then implementing in ITK.

When moving my line detection code to ITK,  using the Houghtransform2DLinesImageFilter  I got results that were not what I expected.

I then created a simple input tiff file with a single white line. 

In Matlab, the output Hough space looks "correct". 

In ITK, the Output() image ( which is the Hough space) looks "different". 

In looking at the code , I notice that the accumulator image for the Hough space seems to be the wrong size, and the inner loop goes from -180 to 180.....

I believe it should only need to span -90 to 90.

Also, if you use -90 to 90 I believe it's more usual to offset the Hough space so the origin is in the center.

I made changes as I describe above, and now my output space matches Matlab's.

Not sure where to go with this. I don't want to conclude the code doesn't work- maybe I'm not using it as intended. But I think all one has to do is create a file with a few lines and run the example code from the wiki and see if the output is correct.

The example code has not input or output data included, so there's no way to know what the intended input / output should look like.


Rick Frank 
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users



More information about the Community mailing list