Stop Thinking, Just Do!

Sungsoo Kim's Blog

Hough Transform for Lines

tagsTags

26 March 2019


Article Source


Hough Transform

The Hough transform is an incredible tool that lets you identify lines. Not just lines, but other shapes as well. In this article, I’ll talk about the mechanics behind the Hough transform. It will involve a bit of math, but just elementary concepts you learned in school. In this article, we’ll work with lines only, though the technique can be easily extended to other shapes.

Why the Hough Transform?

Lets say you take the snapshot of pole. You figure out edge pixels (using the Canny edge detector, the Sobel edge detector, or any other thing). Now you want a geometrical representation of the pole’s edge.You want to know its slope, its intercept, etc. But right now the “edge” is just a sequence of pixels.

You can loop through all pixels, and some how figure out the slope and intercept. But that is one difficult task. Images are never perfect.

So you want some mechanism that give more weightage to pixels that are already in a line. This is exactly what the Hough Transform does.

It lets each point on the image “vote”. And because of the mathematical properties of the transform, this “voting” allows us to figure out prominent lines in the image.

Hough Space

Polar Representation for Lines

Basic Hough Transform Algorithm

Complexity of the Hough Transform

Hough Example

Hough Demo Intro

Hough Demo

Hough on a Real Image

Impact of Noise on Hough

Extensions

End


comments powered by Disqus