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

Richard Frank rfrank at dominionsw.com
Mon Oct 28 05:03:29 EDT 2013


Hi Juan,


Yes, if you have some info on what I might need to do to setup the filter that would be great....

Thanks

Rick

Sent from my iPad

On Oct 28, 2013, at 12:50 AM, "Juan Rodríguez" <juanrdz at gmail.com<mailto:juanrdz at gmail.com>> wrote:

Richard,

I made an implementation a few months ago using the same filter. I did not need to change anything to the code to get it working, but I did had some trouble finding the parameters to obtain what I expected.

If you need some info, let me know so I take a look on my code.

Juan Rodriguez


----

Ing. Juan Andrés Rodríguez


On Sun, Oct 27, 2013 at 8:36 PM, Richard Frank <rfrank at dominionsw.com<mailto:rfrank at dominionsw.com>> wrote:
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<http://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

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


More information about the Insight-users mailing list