comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Hough transform help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Hough transform help [message #31817] Fri, 16 August 2002 21:18
mperrin+news is currently offline  mperrin+news
Messages: 81
Registered: May 2001
Member
I'm attempting to use the new HOUGH function in IDL 5.5 to detect
linear features in an image. However, I don't understand the scaling
it applies to its results.

I have a 256x256 floating-point image. I am doing this:
edge_enh = sobel(image)
h = hough(edge_enh,/gray,rho=rho,theta=theta)

and it very nicely detects the lines in the image as bright
points in the Hough transform. However, I want to extract the slopes
and intercepts of those lines (in standard y=mx+b format). Well, that
should be easy given rho and theta for each line - except that
the rho which is being returned ranges from -181 to 181.
Negative values don't make any sense to me, particularly given
that my image looks something like

+-----------+
| \ | |
| \ | |
| \ \ | |
| \ \ | |
+-----------+

..all of which are clearly to the right of the origin and thus should
have positive rho. It's getting the thetas perfectly correct as far
as I can tell.

Does anyone have any better explanation of the way that Hough calculates
the rho values? I can provide more details if it's useful, but as I've never
used Hough transforms before I assume there's just something I'm
misinterpreting.


- Marshall
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: CoolHelp update
Next Topic: Re: Attempt to subscript FILNAM with I is out of range....

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:30:27 PDT 2025

Total time taken to generate the page: 0.00580 seconds