• 沒有找到結果。

Chapter 5  Light Pole and Hydrant Detection in Images Using a New Space Line

5.3  Method of Light Pole Detection

The idea of the proposed method for light pole localization is to use two vertical boundary lines of the light pole to estimate the position of the light pole. The entire process for light pole position computation is shown in Figure 5.5. Firstly, the proposed technique to detect two boundary lines of the light pole is introduced in Section 5.3.1. Then, the computation of the light pole location is described in Section 5.3.2. Finally, some experimental results for light pole detection are given in Section 5.3.3.

5.3.1 Light pole boundary detection

In this section, we describe how to detect the two boundary lines of a light pole in an omni-image. The proposed method consists of two steps. Firstly, we conduct light pole segmentation by the Canny edge detection technique to obtain the boundary

points of the light pole. Then, by the resulting edge-point image, we use the above-mentioned space line detection technique to find the two vertical boundary lines based on a 1D Hough transform technique. Finally, we can obtain two specific space planes which go through one of the two light pole boundary lines as well as two other space planes which go through the other of the two light pole boundary lines;

and use these results to compute the light pole location, as described in the next section. The detailed algorithm for the just-mentioned idea of light pole detection is described as follows.

Figure 5.5 Proposed method of light pole localization.

Algorithm 5.2 Light pole boundary line detection.

Input: an input image Iinput, two pano-mapping tables for Mirrors A and B, and a set of environment windows Winlp.

Output: two parameters BA1 and BB1 representing the parameters of two space planes through one of the two boundary lines of the light pole and then through the Mirror A center and the Mirror B center, respectively; and two other parameters BA2 and BB2 representing the parameters of two space planes through the other one of the two boundary lines of the light pole and then through the Mirror A center and the Mirror B center, respectively.

Steps.

Step 1. For Iinput, use the Canny edge detector to conduct edge detection to extract the feature points of the boundary lines of the light pole, and obtain an

Step 2. Set a 1D space S with parameter B and initialize all cell counts to be zero.

Step 3. For each edge point I at coordinates (u, v) in winB of Winlp, look up the pano-mapping table to obtain an azimuth  and an elevation angle α.

Step 4. Compute B by Equation (5.9) using and α, and increment by 1 the value of the cell with parameter B in S.

Step 5. Repeat Steps 2 and 3 until all edge points in winB of Winlp are computed.

Step 6. Find two cells, denoted as B1 and B2, with the two maximum values in space S

Step 7. If B1 > B2, set BA1 = B1 and BA2 = B2; else, set BA1 = B2 and BA2 = B1. Step 8. Take BA1 and BA2 as outputs.

Step 9. In the same way, repeat Steps 2 through 8 in winS of Winlp for Mirror B and take the obtained two corresponding parameters BB1 and BB2 as outputs.

5.3.2 Light pole position computation

After successfully detecting two boundary lines of a light pole, we can use them to compute the light pole location. The proposed technique for this is described in this section. At first, by the use of two known corresponding space planes obtained in the previous section, we compute the locations of the two light pole boundary lines, denoted as Lin and Lout, respectively, in the CCS as illustrated in Figure 5.6. Then, two corresponding points, Gin and Gout, on the ground can be obtained by the obtained equations of Lin and Lout. Next, we check whether the distance between Gin and Gout is close to the known diameter of the light pole. If not, we assume that the detected two vertical space lines are not the boundary lines of the light pole. Finally, we compute the center position between Gin and Gout for use as the light pole position Glp. The detailed algorithm to estimate the light pole position is described in the following

algorithm.

Figure 5.6 Two obtained boundary lines Lin and Lout of the light pole in the CCS.

Algorithm 5.3 Light pole position computation.

Input: two corresponding space plane parameters BA1 and BB1, and two other corresponding parameters BA2 and BB2 obtained from Algorithm 5.2, of a light pole appearing in an omni-image.

Output: a light pole position Glp in the CCS.

Steps.

Step 1. By BA1 and B 1, compute one boundary space line L1 of the light pole by Equation (5.16) and obtain its equation as follows:

B

X = X1; Z= Z1. (5.17)

Step 2. By BA2 and B 2, compute another boundary space line L2 of the light pole by Equation (5.16) and derive its equation as follows:

B

X = X2; Z = Z2. (5.18) Step 3. Compute the distance d between the two lines by the following equation:

2

diameter of the light pole and ThD is a pre-defined threshold, then go to Step 5; else, show the message that there is no light pole and exit.

Step 5. Compute the coordinates (xlp, ylp, zlp) of the light pole position Glp in the CCS as follows:

xlp = (X2+ X1)/2; ylp = -H; zlp = (Z1 +Z2)/2 (5.20) where H is the height of the camera center, and take Glp as output.

Experimental results for light pole detection

An input image with the projection of a light pole on the regions of Mirrors A and B is shown in Figure 5.7(a). After conducting Canny edge detection, we obtain an edge-point image as shown in Figure 5.7(b). By this edge image, we use the proposed line detection method to extract two light pole boundary lines, and the two 1D Hough spaces of the parameter B for Mirrors A and B are shown in Figures 5.8(a) and 5.8(b), respectively. The result of light pole detection is shown in Figure 5.9 and the relative light pole position with respect to the vehicle is shown in Figure 5.10.