I think I understand what we are doing--make a sine wave for each black
pixel in the image and then find a way to rasterize this?
What is the form of the input? I assume an array with one scalar per
pixel...

I haven't really looked at anyone's code in detail yet, but this seems
pretty straightforward.

Marshall

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Aai
Sent: Tuesday, September 14, 2010 10:16 AM
To: Programming forum
Subject: Re: [Jprogramming] Hough transform

Hi David,
I don't know exactly what you expect but here's an alternative using
viewmat.

require 'viewmat'

Because you just increment coordinate values by 1 for every iteration it's
sufficient to compose a triple X Y Z  in which Z is the 'height' or
'density' of a point in hough space.

hough2=: 4 : 0
radii=: (>:length>:$y)*_0.5+grid {. x
angle=: 1r1p1*grid {: x
b=: 0 < ,y
inter=: b # , y
coord=: ($y) #: I. b
rhoug=: (coord,.1)+/ .*(1 0,0 _1,:_0.5 0.5*$y)+/ .*1 2 o./angle
r=: (<:@# - I.&rhoug)radii
'X Y Z'=.|:({.,#)/.~,/r ,."1 i. {: x
viewmat Z (;/ X,.Y) } 0 $~ 0 _1 { x
)


try e.g.

250 hough2 data


--
Met vriendelijke groet,
=@@i

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to