Jump to content

Line detection

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ectech2000 (talk | contribs) at 02:39, 23 April 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In image processing, a line is a collection of edge points that are adjacent and have the same direction. [1] Line detection is an algorithm that take a collection of n edge points and find all the lines on which these edge points lie. The most popular line detectors are the Hough transform and convolution based technique. Hough transform can be used to detect lines and the output is a parametric description of the lines in an image, for example ρ = r cos(θ) + sin(θ). If we have a line in our row and column based image space, we can define that line by ρ, the distance from the origin to the line along a perpendicular to the line, and θ, the angle of the perpendicular projection from the origin to the line measured in degrees clockwise from the positive row axis. [2] Therefore, a line in the image corresponds to a point in the Hough space.[3]

In a convolution based technique, the line detector operator consists of a convolution masks tuned to detect the presence of lines of a particular width n and a θ orientation. The figures below show an a) Horizontal kernel

-1 -1 -1
2 2 2
-1 -1 -1

(b) Vertical

-1 2 -1
-1 2 -1
-1 2 -1

(C) Oblique (+45 degrees)

-1 -1 2
-1 2 -1
2 -1 -1

(d) Oblique (-45 degrees)

2 -1 -1
-1 2 -1
-1 -1 2

These masks above are tuned for light lines against a dark background, and would give a big negative response to dark lines against a light background.