Home of Buys de Barbanson

Hough transform in javascript

Because, why not?

The Hough transform is used to find lines or ellipses in an image. In the course Advanced Digital Image Processing @TuDelft this technique was described. Later while fiddling around with the plug and play hough transform in Matlab I really wanted to implement one myself; nothing is more unsatisfying than using things which already work.

This implementation finds lines and estimates start and endpoints of those lines. As I quite dislike Matlab I decided to write it in Javascript, all images are rendered on HTML 5 canvas. Do not expect any performance as this is a hobby project only :). Oddly enough it is way faster in Internet explorer than Firefox. Click

Screenshot of the Hough transform implementation in javascript
Link to this article