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

Home » Public Forums » archive » Extracting the resultant angles from the Hough transform
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
Extracting the resultant angles from the Hough transform [message #46017] Wed, 26 October 2005 02:36 Go to next message
txominhermos is currently offline  txominhermos
Messages: 25
Registered: October 2005
Junior Member
I am using the IDL's Hough transform function to detect lines in some
crop images.

I can perfom the transformation and the backproject with the lines, but
I dont know it if it possible to extract one list with the value of the
angles that actually are lines in the backproject images.


If you know how to do it,please help me.



Cheers
Re: Extracting the resultant angles from the Hough transform [message #46069 is a reply to message #46017] Thu, 03 November 2005 03:53 Go to previous message
txominhermos is currently offline  txominhermos
Messages: 25
Registered: October 2005
Junior Member
THE ANSWER TO THIS QUESTION HAS BEEN GIVEN BY THE RSI TECH SUPPORT


------------------------------------------------------------ --------------------

The THETA output variable can be used to find the angle for a line.
Here is a short example demonstrating how this is done:

;*********************************************************** ****************
pro test

; Choose two points in the range
; 1 < x < 199
; 1 < y < 199
p0 = [40.,20]
p1 = [120,180]

nx = 200d
ny = 200d

array = fltarr(nx,ny)
array[[p0[0],p1[0]],[p0[1],p1[1]]] = 1b

; Display the data:
window, 0, xs = nx, ys = ny, $
xpos = 0, ypos = 0, $
title = 'original data'
tvscl, array

; HOUGH input parameters:
dx = 1.2
dy = 1.0
xmin = 0.0
ymin = 0.0

r = hough(array, rho = rho, theta = theta, $
dx = dx, dy = dy, xmin = xmin, ymin = ymin)

sz = size(r, /dim)

; Locate the line
maxcount = where(r eq max(r))

; Use the output variable THETA to get the line's angle:
radangles = theta[maxcount mod sz[0]] - !pi/2
print, 'Angle(s) : '
print, radangles
print

end
;*********************************************************** ****************
Reply to this post
Re: Extracting the resultant angles from the Hough transform [message #46135 is a reply to message #46017] Mon, 31 October 2005 03:25 Go to previous message
Timm Weitkamp is currently offline  Timm Weitkamp
Messages: 66
Registered: August 2002
Member
txominhermos@hotmail.com wrote:
> Nobody will answer me?

Well, maybe nobody here *knows* the answer. It happens, you know.

Of course, you can always try to find somebody who will find out for
you. In exchange for appropriate payment, that is.

Good luck
Timm
Re: Extracting the resultant angles from the Hough transform [message #46140 is a reply to message #46017] Fri, 28 October 2005 03:55 Go to previous message
txominhermos is currently offline  txominhermos
Messages: 25
Registered: October 2005
Junior Member
Nobody will answer me?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reading wav files
Next Topic: GDL installation for Ubuntu Linux

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

Current Time: Fri Oct 10 11:41:39 PDT 2025

Total time taken to generate the page: 0.48020 seconds