Re: [SciPy-user] hough transform again (stephen emslie)
I have some code for working with Hough transforms and their inverses. I haven't been following this thread very closely, so hopefully this is useful to someone. It hasn't been tested in isolation, but it does work fine embedded in my application. Try: import * from Hough ht = HoughTransformFromFilename("my_test_image.jpg") and then: showPiccy(ht) Note that this is *not* the standard Hough transform that operates on binary thresholded images. Rather, this an alternate "Hough" transform as described in the Shapiro & Stockman book. It takes the grayscale image and calculates the gradient at every pixel, discards those with a small magnitude and adds the rest to the Hough transform array. However, the inverse functions should be easily modifiable to be used with the real standard Hough transform. I like this form better because I am working with noisy images, which give useless results with the standard version. Cheers, Josh
Note that this is *not* the standard Hough transform that operates on binary thresholded images. Rather, this an alternate "Hough" transform as described in the Shapiro & Stockman book. It takes the grayscale image and calculates the gradient at every pixel, discards those with a small magnitude and adds the rest to the Hough transform array.
Is that similar to the sobel filter?
participants (2)
-
Josh Marshall -
stephen emslie