right, extending the example at the bottom of the houghtf.py,
i do:
import scipy as S
largevals = S.where(out + delta > max(out.flatten()));
largevals = N.array(zip(ss[0],ss[1]))
which gives an array of r,thetas that are within delta of the maximum. now, to find img coordinates that match those values...
I'm busy doing just that at the moment (in fact literally right now), and I'll be happy to post any results here.
My understanding is that you'll need to search the output of the hough transform for cells with a high count as those will be the most likely to correspond to lines in the main image. The output is a matrix relating combinations of rho and theta to the number of feature points that that line passes through - so the combinations of rho and theta with that go through the most feature points will be the strongest lines.
Or something like that - I'm also really new to this stuff so I'd be happy to be corrected by someone that knows more.
The second to last part of this document is a good read on the hough transform: http://homepages.inf.ed.ac.uk/rbf/BOOKS/VERNON/Chap006.pdfStephen
On 8/17/06, Brent Pedersen <bpederse@gmail.com > wrote:hi, i found this in recent archives and the script is useful.
http://projects.scipy.org/pipermail/scipy-user/2006-August/008841.html
has anyone written the code to go from the hough transform back to the image with the lines/edges enhanced or with non-lines removed? it's bending my mind a bit so if someone's already done it, i'd be glad of it--or any pointers.
thanks.
-brent
[please include my email in the reply, i've subscribed to scipy-users, but not sure if it went through yet]
_______________________________________________
SciPy-user mailing list
SciPy-user@scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-user