19Hough transform

19.1 Introduction

In this chapter, the implementation of the Hough transform (HT) is described. However, in order to fully understand the implementation, a review of the algorithm will be given first.

The HT is a popular technique for feature extraction in computer vision and digital image processing. It was first filed for a patent in 1960 by Paul V. C. Hough [1], and used later for the first time by Duda and Hart in 1972 to detect lines and curves in pictures [2]. With the HT, one can detect lines, circles or any structures with a known parametric equation. In this chapter, the implementation is limited to detect lines that will be used for lane detection in automotive applications.

19.2 Theory

Consider the Cartesian representation in Figure 19.1. Pi represents a point with the coordinates (xi,yi). There are an infinite number of lines passing by the point Pi. Each line can be fully represented by r (the normal to a line passing the point Pi) and the angle θ, as shown in Figure 19.1.

Image described by caption and surrounding text.

Figure 19.1 Cartesian representation of a line.

Let’s express a line passing by the point Pi in terms of r and θ (see Equations (19.1), (19.2) and (19.3)) and then generalise this for each line.

Also:

Get Multicore DSP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.