• 沒有找到結果。

Line detection using pano-mapping table

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

5.2  Proposed Technique for Space Line Detection

5.2.1  Line detection using pano-mapping table

In this section, we introduce the proposed space line detection technique for use on omni-images taken by the two-mirror omni-camera. As mentioned previously, it is desired to detect the space plane, which goes through a specified space line and the mirror center, instead of detecting a space line projected on an omni-image in other methods. The process is described in the following. It is emphasized that the pano-mapping table has be established in advance for the use in this process.

Suppose that the space line L to be detected is projected by Mirror A onto the omni-image, and that P is an arbitrary space point on L. Firstly, we consider a way to represent a vector which goes through P and the mirror center in the camera system used in this study. As shown in Figure 5.2, a light ray going through the space point P is projected by Mirror A onto an image point I. The mirror center OA and P together form a vector Vp, denoted as (Px, Py, Pz) in the CCS CCSlocal. This vector Vp can be described using the elevation and azimuth angles α and  by the following equations:

cosP'x  cos ; cosP 'y  sin ; P'z sin . (5.1) Next, owing to the slant-up placement of Mirror A discussed previously in Chapter 2, we rotate the camera coordinate system CCSlocal by a specific slant angle, denoted as . By the use of the rotation matrix described in Equation (2.5), the transformation between the coordinates (X′, Y′, Z′) of the original CCS CCSlocal and the coordinates (X, Y, Z) of the rotated CCS can be described as follows:

1 0 0

Figure 5.2 A space point with a elevation angle α and an azimuth.

By the above coordinate transformation described by Equation (5.2), we can convert vector Vp into a new one Vp, which represents the vector with an azimuth angle  and an elevation angle α going through the mirror center in the rotated CCS and may be described by the following equations:

cos cos

Next, considering the space line L projected onto the omni-image the one IL as shown in Figure 5.3, we can find a space plane Q which goes through L and the mirror center OA. For this, suppose that the normal vector of Q is denoted as NQ = (l, m, n). Then, we can derive the following equation to describe the coordinates (X, Y, Z) of a pixel on the space plane Q:

0

lX mY nZ   . (5.4)

On the other hand, it is noted that vector VP is perpendicular to NQ, so that the

inner product between VP and NQ becomes zero, leading to the following equation:

Figure 5.3 A space line L projected on IL in an omni-image.

By Equation (5.3), we can transform Equation (5.5) into an alternative form as follows:

cos sin cos sin sin cos sin sin cos

cos cos cos cos 0

From Equation (5.6), it is desired to obtain the three unknown parameters l, m, and n which represent the normal of the space plane Q. For this purpose, we divide Equation (5.6) by n to get the following form:

cos sin cos sin sin cos sin sin cos

cos cos cos cos 0

where A = m/n, B = l/n. We may rewrite the above equation further to obtain

In the above equation, we use two parameters A and B to represent the original three ones l, m, n. By this form, we can use a simple 2D Hough transform technique to obtain the parameters A and B, as described in detail in the following algorithm.

Algorithm 5.1 Space line detection.

Input: an input edge-point image Iedge which includes the points of the projection IL of a space line L, and the pano-mapping table for Mirror A.

Output: two parameters, Amax and Bmax, representing a normal vector of the space plane described by Equation (5.8).

Steps.

Step 1. Set a 2D Hough space S with the parameters A and B, and initialize all cell counts to be zero.

Step 2. For an edge point I at coordinates (u, v) in Iedge, look up the pano-mapping table and obtain a corresponding azimuth-elevation angle pair ( α).

Step 3. Compute the parameter values A and B by Equation (5.7) using and α, and increment the count in the cell (A, B) of the Hough space S by one.

Step 4. Repeat Steps 2 and 3 until all the edge points in Iedge are computed.

Step 5. Take the cell (Amax, Bmax) with a maximum count in S as output.

After the algorithm is conducted, we can obtain the normal vector (l, m, n) of the desired space plane Q in another form represented by the two parameters A = m/n and

B = l/n.

Furthermore, if L is a vertical space line which means that the normal vector of the space plane Q is parallel to the ground, then it is easy to figure out that m is equal to zero. Thus Equation (5.8) can be reduced to the following equation:

B = -a1 (5.9)

In a similar way as described in Algorithm 5.1, we can use a 1D Hough transform to find the parameter B, which represents a normal vector of the specific space plane through a vertical space line and the mirror center.

3D data computation using a vertical space line

In this section, based on the proposed space line detection technique described above, we can derive the 3D data of a vertical space line (such as the boundary lines of a light pole or the vertical axis of a hydrant) from the omni-image, as described subsequently.

As shown in Figure 5.4, a vertical space line L is projected onto IL1 and IL2 on the regions of Mirrors A and B, respectively. The center OA of Mirror A is located at coordinates (0, 0, 0) in the CCS as we previously assumed. Thus, with the slant angle denoted as  and the length of the baseline denoted as b as shown in Figure 5.4, we can derive the position of the center OB of Mirror B to be at coordinates (0, bsin, bcos). Next, according to Equation (5.4), the equations of the two space planes Q1

and Q2 going through L and the mirror centers, OA and O, respectively, can be described in the following:

l1X + m1Y + n1Z = 0; (5.10) l2X + m2(Y - bsin + n2(Z - bcos) = 0 (5.11) where (l1 , m1 , n1) represents the normal vector of Q1 and (l2 , m2 , n2) represents that of Q2.

In addition, by the reason that the space line L is perpendicular to the ground, we know that m1 and m2 are both zero. Thus, the above two space plane equations can be reduced into the following forms:

l1X + n1Z = 0; (5.12)

l2X + n2(Z bcos) = 0 (5.13) which are equivalent to

B1X + Z = 0; (5.14)

B2X + (Z bcos) = 0 (5.15) where B1 = l1/n1 and B1 = l2/n2.

Figure 5.4 A space line projected onto IL1 and IL2 on two mirrors in the used two-mirror omni-camera.

By solving Equations (5.14) and (5.15), we can obtain the following equations to describe the position of the vertical space line L:

2 1 In conclusion, for a vertical space line projected on both of the regions of Mirrors A and B in the omni-image, after conducting the proposed line detection on the regions of Mirrors A and B in the omni-image and finding a pair of the corresponding space planes using Algorithm 5.1, we can use Equation (5.16) to compute the location of the vertical space line directly.