The various results obtained by me as results of applying
the line detection routine is shown below.The detected lines are marked
in red.
Edge Linking Pixels appear in green.
The routine has two options :
The first one is to detect general line directions
which results in the detection of the infinite lines in the direction of
the lines
present in the image.If the accumulator threshold
is reduced the number of lines detected increases as is expected.
|
|
|
|
Accumulator Maxima 85 |
Hough Parameter Space |
Accumulator Threshold 40 |
Accumulator Threshold 25 |
The second option is to detect the actual line segments
present in the image. This however requires the use of the gradient image
which has been computed here using Sobel's Operator
(This facility is included in the Hough routines).Another facility is to
attempt
edge linking - The routines tries to link together
pieces of the same line which are within a certain distance threshold,
using a kind
of edge relaxation technique.
|
|
|
Gradient Threshold 0.6 |
|
Linking pixels are shown in green |
Next, I demonstrate the Hough transform's capbility
of detecting straight lines from amongst other shapes.
|
|
|
|
Accumulator Maxima 120 (after gradient) |
Gradient Threshold 0.6 |
Hough Parameter Space |
Accumulator Threshold 110 |
Next, I demonstrate the Hough transform's capability
of detecting straight lines in noisy images.
|
|
|
Accumulator Maxima 65 |
Hough Parameter Space |
Accumulator Threshold 40 |
Now, I demonstrate the Hough Transform's cpability
on a real life image. The image is of the NASA Dryden Flight Research Center.
The Hough transform is used to detect a major road
segment as shown.
|
Accumulator Maxima 312 (after gradient) |
|
Gradient Threshold 0.9 |
|
|
Other Experiments possible :
1. The accumulator resolution and
quantization can both be varied and the results studied.
2. Each edge point can be made
to vote for a neighbourhood of cells in the accumulator insted of just
on cell and the effect studied.
Salient Features of this Implementation :
1. Highly efficient due to pre-calculation of Sin and Cos tables.
2. Very Interactive - allows the user to vary a lot
of parameters at runtime such as -
a) The choice of calculating the
Gradient Image
b) The Gradient Threshold
c) The choice of plotting the
Hough Parameter Space
d) The Accumulator Threshold (The
routine reports the accumulator Maxima for easy selection of this threshold).
e) The choice of detecting general
line directions or actual line segments
f) The choice of performing edge
linking.
3. Though the Accumulator quantization is fixed to
1 pixel for 'rho' and 1 radian for 'theta', these are very clearly documented
and can be easily changed in the source
code.
4. Auto selection of suitable accumulator resolution
(If the quantization is changed this adjusts automatically).
Page last updated on 28 January, 2004. | AT cse.iitd.ac.in | © Parag Chaudhuri , 2009 |