|
Purpose
|
Hough transform for detection of lines in images.
|
Synopsis
[HT,rho,theta] = htl(IM).
[HT,rho,theta] = htl(IM,M).
[HT,rho,theta] = htl(IM,M,N).
[HT,rho,theta] = htl(IM,M,N,trace).
|
Description
From an image IM, computes the integration of the values of
the image over all the lines. The lines are parametrized using
polar coordinates. The origin of the coordinates is fixed at the
center of the image, and theta is the angle between the vertical axis and the perpendicular (to the line) passing through
the origin. Only the values of IM exceeding 5 % of the
maximum are taken into account (to speed up the algorithm).
| Name |
Description |
Default value |
| IM |
image to be analyzed (size (Xmax,Ymax)) |
|
| M |
desired number of samples along the radial axis |
Xmax |
| N |
desired number of samples along the azimutal (angle) axis |
Ymax |
| trace |
if nonzero, the progression of the algorithm is shown |
0 |
| HT |
output matrix (MxN matrix) |
|
| rho |
sequence of samples along the radial axis |
|
| theta |
sequence of samples along the azimutal axis |
|
When called without output arguments, htl displays HT using
mesh.
|
Example
|
The Wigner-Ville distribution of a linear frequency modulation is almost
perfectly concentrated (in the discrete case) on a straight line in the
time-frequency plane. Thus, applying the Hough transform on this image will
produce a representation with a peak, whose coordinates give estimates of
the linear frequency modulation parameters (initial frequency and sweep rate):
|
N=64; t=(1:N); y=fmlin(N,0.1,0.3);
IM=tfrwv(y,t,N); imagesc(IM); pause(1);
htl(IM,N,N,1);
Reference
|
[1] H. Maître ``Un Panorama de la Transformation de Hough'', Traitement du
Signal, Vol 2, No 4, pp. 305-317, 1985.
|
Eric Chassande-Mottin
2005-10-26
|