next up previous
Next: Discussion Up: No Title Previous: A Single line in

Two lines in a noisy image

The program used in the previous section to find a straight line in an image was extended to find a line in a noisy image. The noisy image was constructed with two lines, one of gradient m=2.0 and y-intercept b=10.0, and the other line of gradient m=-0.7 and y-intercept b=85.0. Rather than finding feature points, the program implemented the Hough transform on all points in the image. For each $(r,\theta )$ coordinate calculated, the accumulator array was incremented by the grey level value at the corresponding (x,y) pixel in the input image.
It should be noted that the Hough transform will only find the longest line in the image. To detect the second line in the image, the program would have to locate the second local maxima in the accumulator array. The input image, accumulator array, and reconstructed line can be viewed below. The Matlab code can be viewed in Appendic C.


 
Figure 8: (a) Input image. (b) Accumulator array. (c) Longest line in the input image reconstructed.
\begin{figure}\par\centerline{\psfig{figure=htrand_b.eps,clip=,height=15cm,angle=0}}
\par
\end{figure}

Below a surface plot of the accumulator array is shown. The highest and second highest peak in the surface plot correspond to the $(r,\theta )$-coordinates of the longest and second longest line respectively in the input image. It should be noted that all values in the accumulator array $A(r,\theta)$ for $180 \le \theta \le 270^{\circ}$ are zero. The dimensions of the input image restrict the parameters that a line in the image could have.

Figure 9: Surface Plot of the Accumulator Array.

next up previous
Next: Discussion Up: No Title Previous: A Single line in
vicky safouris
2000-06-02