on July 9, 2005 at 4:45 AM PDT
Here's some source for a Hough transform under JAI.
I started with the implementation for byte images, and then created the
one to handle float images. The latter does linear interpolation to
address the [probably harmless] binning artefacts that occur at critical
angles like 0,45 degrees - I've seen this in other Hough implementations
http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/sff1hou1.gif ). The
parameterised lines are returned in an image property, just like the JAI
stats operations - say, Histogram. There's some code included that
highlights the peaks for testing purposes, and I've only written this
thing to deal with single-banded edge data, but enhancement for wider
application should be trivial. Alas, it's an UntiledOpImage, because
the algorithm as implemented walks the entire input image and for each
pixel, writes a sinusoid into the output image. It also uses [requires]
the second input band to contain edge gradient direction - this
restricts the writing of output sinusoids to a limited range around the
edge angle. This is done to speed up performance, and to avoid writing
junk votes into the output, which otherwise just serves to add a noisy
baseline under the Hough peaks.
I fooled around with a convolution kernel that helps peak identification
in the Byte loop, however this is not required in the interpolated Float
loop. Use of a kernel like this isn't part of a standard Hough
implementation, so it probably should be stripped. Same for the use of
an edge direction band - my implementation suits my own needs, but it's
a little too restrictive to make such a band mandatory.
Seems to work nicely.
I've read the JAI Joint Copyright Assignment & Patent form, and agree to
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org