• 沒有找到結果。

Fast Configuration Optimization for Regular Cases

Chapter 6 Optimal Design and Placement of Omni-cameras in Binocular Vision

6.4 Fast Configuration Optimization for Regular Cases

The optimization framework proposed previously can deal with general cases, in which the 3D measurement area and the camera placement area may both be of irregular shapes, and the two used perspective cameras may be different from each other. However, in regular indoor vision systems (called the regular cases), the two perspective cameras are of the same type, and the 3D measurement area and the camera placement area can be specified by two rectangular cuboids as illustrated in

54

Fig. 6.5. In the following, the formal definition of the optimization problem for such regular cases is first derived. Then, the derivation of the proposed optimization algorithm for generating the corresponding optimal system configuration is proposed, followed by another sub-optimal but analytic optimization method, which is shown additionally there to be a good approximation to the optimal solution.

O(0, 0)

Fig. 6.5 An illustration of the regular cases.

As described in the optimization framework, a system configuration includes all the necessary parameters to design a vision system, and an optimization process needs to find the optimal system configuration which yields the best 3D measurement accuracy. A criterion function Ew for the optimization is defined in this study to be the maximum measurement error within the 3D measurement area W, i.e.,

 

ensured to be lower than the value Ew. Next, as assumed, the two perspective cameras used in the omni-cameras are identical, so their focal lengths f1 and f2 are both equal to f, and their viewing angles 2max1 and 2max2 are both equal to 2max. The two omni-cameras are identical in structure and placed symmetrically, so the two optical axes a1 and a2 are coplanar so that the two optical axes can be defined by the two

55

angles a1 and a2 as shown in Fig. 6.5. Then, a system configuration can be defined to be the parameter set (Dx, Dy, a1, a2, 1, 2), where (1) the omni-cameras are placed, as seen from the top, at O1(Dx, Dy) and O2(Dx, Dy), respectively; (2) the orientations of their optical axes are defined by a1 and a2, respectively; and (3) the eccentricities of the mirrors are 1 and 2, respectively. Hence, the optimization problem is just to measurement area, the cameras should be oriented to face the 3D measurement area.

Accordingly, the optical axes a1 and a2 can be figured out to be just the bisectors of the angles spanned by the measurement area as depicted in Fig. 6.5, that is, the optical axis a1 of the left omni-camera is the bisector of the viewing angle formed by O W1 1

and O W1 2, and the optical axis a2 is the bisector of the viewing angle formed by

max can be solved respectively to be

1 1 optimization problem (56) is now reduced to include two parameters as follows:

*, *

arg min( , )

( )

arg min max( , )

( )

56

For further simplifications, two claims are given as follows.

Claim 6.1. The function Ew described by (55) can be rewritten as Ew(W) = max

( )

coordinates (Px, 0) can be derived using (50) and (51) with

1 Thus, the following equality can be derived:

 

2 2

 

2 2

The function E1(P) can be proved accordingly to be an even function by

57 which leads to the following fact according to (68):

( ) 1( )

E PE P . (69)

Furthermore, according to (61), E1(P) can be expressed as

     

conclusion described by (60) may be drawn. □

58

In the above proof, the assumption R(, f, 1) = R(, f, 2) is made, which is proved later by simulation results to be appropriate with very little affection on the 3D measurement precision of the derived system configuration (see the experimental results shown in a later section).

Fig. 6.6 Analysis of function Ew. (a) Illustrations of related terms. (b) Drawing of distribution of measurement errors E of a configuration.

Claim 6.2. A larger value of Dy always yields a smaller value of the criterion function Ew.

Proof. The inscribed angle theorem says that an angle q inscribed in a circle is a half of the central angle 2q that subtends the same arc on the circle [57]. That is, if the

59

viewing angle is 2max, the possible positions of the cameras can be figured out to be constrained on the dashed circle shown in Fig. 6.7(a), and the upper bound of Dy

occurs at the bottom of the circle. Also, while recalling that the two cameras are omni-directional, we assume their viewing angle 2max to be larger than 120°. So we have

max(Dy) = cotmax  cot(60)  0.6. (71) With this upper bound, the function Ew is plotted in Fig. 6.7(b), which shows that a

larger value of Dy yields a smaller value of Ew.

With Claim 6.1, Eq. (59) can be re-formulated as

(Dx*, Dy*) =

2

Also, recall that the upper bound of Dy is limited by the camera deployment constraint, which we denoted as xy in Fig. 6.5. With Claim 6.2, the optimal value Dy* in (72) can

60

An optimization algorithm to solve Dx* in (73) by a bisection scheme is proposed in the following. By referring to the plots of Emid and Ebound depicted in Fig. 6.8(a), the optimal solution Dx* is found at the intersection of the two functions of Emid and Ebound. So, if the two functions intersect each other, the intersection point may be defined to be the optimal solution Dx*; otherwise, the optimal solution Dx* is defined to be the maximum value which will also be derived later in this section.

In more details, at first we define a new function Eopt as

Eopt(Dx, Dy*) = Emid(Dx, Dy*)  Ebound(Dx, Dy*). (75) Then, the optimal solution Dx* is just the root of Eopt, which can be derived by a bisection scheme. Before the scheme is conducted, the initial range of the root must be determined. The lower bound lowerDx of Dx is obviously zero, and the upper bound upperDx is derived as follows. From Fig. 6.8(b), we have

2

O Oc = O Wc 2 = csc(  2max) = csc(2max). (76) And the coordinates of the circle center Oc is

Oc = (0, cot(  2max)) = (0, cot(2max)). (77) According to the Pythagorean Theorem, we have

Dx2 = A method to solve the optimization problem is proposed below.

61

Algorithm 6.1. Finding the optimal configuration (Dx*, Dy*).

Input: the viewing angle 2max and the focal length f of the cameras.

Output:the optimal system configuration (Dx*, Dy*), meaning that the omni-cameras are placed at O1(Dx*, Dy*) and O2(Dx*, Dy*), and oriented as shown in Fig.

2.2 Calculate the eccentricity  according to (58).

2.3 Calculate Emid and Ebound by (74) with O1 = (Dx, Dy*) and O2 = (Dx, Dy*), and calculate Eopt by (75).

Step 3. Calculate the upper bound upperDx of Dx* by (80).

Step 4. Calculate Eopt(upperDx, Dy*) in a way similar to Steps 2.1 through 2.3, and assign the result to the variable upper.

Step 5. If lower and upper are with opposite signs, then find the root in a bisecting fashion as follows.

5.1. Set variable newDx = (lowerDx + upperDx)/2.

5.2. Calculate Eopt(newDx, Dy*) in a way similar to Steps 2.1 through 2.3 and

62

assign the result to the variable new.

5.3. If (new < lower), then set lower = new and lowerDx = newDx; otherwise, set formula for deriving a sub-optimal solution. Let v1 and v2 be two vectors, and q be the included angle. We have

Referring to Fig. 6.9 and based on the double-angle formula of the sine function, we can get

Thus, the function Emid in (82) can be rewritten as

   

Similarly, the measurement error Ebound of the feature point W2(1, 0) can be simplified, using (50), (51), (74) and (81), to be

63

From the geometry shown in Fig. 6.9, we have

 

Thus, the function Ebound in (85) can be rewritten to be

2 * 2

2 2

* 2

By combining (84) and (87), the function Eopt can be re-formulated as

 

To calculate the optimal system configuration, the value Dy* is firstly derived in the same way as stated in Algorithm 6.1. Then, the optimal solution Dx* is just the sub-optimal solution Dx′. This sub-optimal solution Dx′ is a good approximation to the optimal one Dx* as will be shown later in this section.

To simplify the function Eopt described by (88), we assume further

R(, f, mid)  R(, f, max), (89) which is a special case of the assumption R(, f, 1) = R(, f, 2) made before in the proof of Claim 1. This new assumption can be proved as well later by simulation

64

results to be proper with very little affection on the 3D measurement precision of the derived system configuration (see Fig. 6.10). Consequently, Equation (88) may now

65

Proof. To deal with the involved min/max function in (91), four cases are discussed separately, which are: (1) Dx′ < Dy* and Dx′  (1+(Dy*)2)0.5; (2) Dx′ < Dy* and Dx′ > exist, or equivalently, Dx′ does not exist. As a result, the assumptions made for Case (1) are invalid.

The assumptions made for Case (2) are Dx′ < Dy* and Dx′ > (1+(Dy*)2)0.5. Since these two inequalities are contradictory to each other, Case (2) is also out of consideration.

For Case (4), the two assumptions are Dx′  Dy* and Dx′ > (1+(Dy*)2)0.5. Thus, Equation (91) can be rewritten to be

2 * 2 2 * 2 2 2 assumptions made for Case (4) are also invalid.

As a result, Case (3) is the only valid one, for which the two assumptions are Dx

 Dy* and Dx′  (1+(Dy*)2)0.5. Accordingly, Equation (91) can be rewritten to be

66 polynomial equation has only one real root which can be described by (92) according

to [58]. □

The above-described process of generating the sub-optimal configuration (Dx′, Dy*) is summarized as an algorithm below.

Algorithm 6.2. Finding a sub-optimal configuration (Dx′, Dy*) by analytic formulas.

Input: the viewing angle 2max and the focal length f of the cameras.

Output: the sub-optimal configuration (Dx′, Dy*), meaning that the omni-cameras are placed at O1(Dx′, Dy*) and O2(Dx′, Dy*), and oriented as shown in Fig. 6.5.

The sub-optimal configuration (Dx′, Dy*) is shown to be a good approximation to the optimal one (Dx*, Dy*) as follows. Recalling that the goal of the optimization is to minimize the measurement error Ew defined by (73), we use the function Ew as a criterion to analyze the precision of the approximate one. In Fig. 6.10, we plot the curves of the measurement error values of the optimal and sub-optimal configurations

67

for all the possible values of Dy, from which we see that the measurement errors are very close to each other, meaning that the sub-optimal configuration also yields precise 3D measurement results as the optimal configuration does. Also, we use a difference ratio defined by

(Ew′  Ew*) / Ew* (101)

to determine the goodness of the performance of the sub-optimal configuration, where Ew* and Ew′ denote the measurement errors using the optimal and sub-optimal configurations, respectively. As shown in the figure, the difference ratio is smaller than 0.4%, showing that the sub-optimal solution is indeed a good approximation.

Ew

Dy

difference ratio

Fig. 6.10 Comparison of optimal configuration (Dx*, Dy*) and sub-optimal configuration (Dx′, Dy*) with viewing angle 2max = 60o.