136
5) Determine coordinates of the global maximum Max1 = (y11,y12) of the accumulator in the area y1<Tyl.
6) Determine coordinates of the global maximum Max2 = (y21,y22) of the accumulator in the area y1>Ty1.
The pair of maxima of the accumulator (Max1 , Max2) corresponds to the pair of object lines in the image.
In our implementation of this algorithm, step (2) is incorporated into step (1), i.e. for each contour point the Hough
voting is performed just after the grey level gradients are computed. This allows to select points based on the gradient
orientation. The voting range also depends on the gradient orientation. Thus, the computational efficiency of the
Hough Transform is improved very much.
3. THE MEASUREMENT STAGE
After the pair of lines is detected, it is necessary to measure the angle between them as accurately as possible. For this
purpose, one should measure the angles of inclination of both lines and calculate their difference.
It is known, that LSM provides a robust estimation of line parameters, from a set of line points. At the same time,
LSM is too sensitive to points that are far from the true line. Such gross errors occured in our case. After the coarse
line detection in the Hough space, preliminary selection of points, participating in the LSM-estimation of the line
parameters, is possible.
The selection of contour points can be made based on their location in some neighborhood of the line and the gradient
direction at these points, which should be approximately perpendicular to the line.
For the measurement stage, the following algorithm is used:
1). Compute parameters (p1 , 61) of the line corresponding to Max1, obtained at the detection stage.
2). For each contour point of the image in a stripe (p1-Ap , p1+Ap , 01) execute:
3). Compute gradient (by Sobel operator).
4). If the orientation of the normal to the gradient is in [01-A0 , 01+A6], then use the given point in the input
data set for LSM1. Otherwise, go to the next point.
5). Obtain the specified LSM-estimation of parameters (p1 , 01) on the data LSMI.
6). Compute parameters (p2 , 02) of the line corresponding to Max2, obtained at the detection stage.
7). For each contour point of the image in a stripe (p2-Ap , p2+Ap , 02) execute:
8). Compute gradient (by Sobel operator).
9). If the orientation of the normal to the gradient is in [O2-A0 , 02+A0], then use the given point in the input
data set for LSM2. Otherwise, go to the next point.
10). Obtain the specified LSM-estimation of parameters (p2 , 62) on the data LSM2.
11). Determine the conjunction angle of the seam as ¢ = 02 - 91.
The parameters A0 and Ap are adaptive and vary depending on the scale and size of the image.
4. RESULTS
This algorithm was implemented on an IBM PC and tested using a large set of the images. The main goal of the
testing was to check the robustness and precision of the algorithm. Robustness means a low percentage of "abnormal"
errors. The error is abnormal, if the result of the detection stage is wrong, i.e. the object is not detected or the
estimation of the location of the lines is wrong. When there are no such errors, the precision of the obtained angle
value can be estimated by comparison to angle value from manual measurements.
No abnormal errors have been registrered in the whole test set of real images (169 tests).
Naturally, the precision of the results depends on the scale and size of the image, as well as on the image quality. We
have used test images of size 400x300 pixels. The systematic and the dispersion components of the normal errors
were estimated using the test images. Practically, the normal error has no systematic part (it is less than 0.001% of the
angle value). The RMS is about 0.47% of the angle value. For example, when the true conjunction angle value is
about 2°, the RMS will be 0.095°.
IAPRS, Vol. 30, Part 5W1, ISPRS Intercommission Workshop “From Pixels to Sequences’, Zurich, March 22-24 1995