Let the arbitrary point *P*(*x*, *y*, *z*) in 3D space be taken in the view field of two video cameras, where *x*, *y*, *z* are the global coordinates that should be defined. The optical scheme of the considered stereoscopic system is presented in Figures 1a and 2a. The 3D orthogonal system of *XYZ* coordinates was applied for this scheme, its initial point *O* coinciding with the left camera matrix center, and axis *Z* being perpendicular to plane *YOX* containing CCD matrixes of the left and the right video cameras.

Figure 1 Top view of the stereoscopic system with parallel optical axes.

(a) Optical scheme for paths of rays in the stereoscopic system. (b) Geometric scheme of the stereoscopic system.

Figure 2 Side view of the stereoscopic system with parallel optical axes.

(a) Optical scheme for paths of rays in the stereoscopic system. (b) Geometric scheme of the stereoscopic system.

The left and the right video cameras are shown in the scheme (Figure 1a), their optical axes are parallel and they pass through points *O*_{1}, *O*_{2} correspondingly, and are also perpendicular to the plane of the CCD matrix location. Let the distance *O*_{1}*O*_{2} between the axes of two cameras be denoted as *b*, that is usually named as the “baseline”.

According to similarity of right triangles *ABC*_{L} and *AGP*, it follows that

$$\begin{array}{}\frac{B{C}_{L}}{AB}=\frac{GP}{GA},\end{array}$$(1)

and according to similarity of right triangle *KEC*_{R} and *KSP*, it follows that

$$\begin{array}{}{\displaystyle \frac{{C}_{R}E}{EK}=\frac{PS}{SK}.}\end{array}$$(2)

Since *AB* = *KE* = *h*, *WP* = *x*, *GW* = *BC*_{L} and *AG* = *KS* = *z*, then from Equation (1) it is possible to derive the following:

$$\begin{array}{}{\displaystyle \frac{B{C}_{L}}{h}=\frac{B{C}_{L}+x}{z}.}\end{array}$$(3)

Since *PS* = *O*_{1} *O*_{2} − *x* + *O*_{2} *K* and *US*=*C*_{R}*E*, then *PS* = *b* − *x* + *C*_{R}E, and from Equation (2) the following relation is obtained:

$$\begin{array}{}{\displaystyle \frac{{C}_{R}E}{h}=\frac{PU+US}{z}}\end{array}$$

or

$$\begin{array}{}{\displaystyle \frac{{C}_{R}E}{h}=\frac{b-x+{C}_{R}E}{z}.}\end{array}$$(4)

From Equations (3) and (4) it follows that

$$\begin{array}{}{\displaystyle \frac{B{C}_{L}}{B{C}_{L}+x}=\frac{h}{z}}\end{array}$$

and

$$\begin{array}{}{\displaystyle \frac{{C}_{R}E}{b-x+{C}_{R}E}=\frac{h}{z}.}\end{array}$$

Since the right parts of the latter relations are equal, then

$$\begin{array}{}{\displaystyle \frac{B{C}_{L}}{B{C}_{L}+x}=\frac{{C}_{R}E}{b-x+{C}_{R}E}.}\end{array}$$

It results in

$$\begin{array}{}{\displaystyle x=\frac{b\cdot B{C}_{L}}{B{C}_{L}+{C}_{R}E}.}\end{array}$$(5)

Then from Equation (3) the following relation is obtained:

$$\begin{array}{}{\displaystyle z=\frac{h\cdot b}{B{C}_{L}+{C}_{R}E}+h.}\end{array}$$(6)

According to similarity of right triangles *PTM* and *C*_{L}VM, it follows that

$$\begin{array}{}{\displaystyle \frac{{C}_{L}V}{VM}=\frac{PT}{TM}.}\end{array}$$(7)

Since *VM* = *h*, *PT* = *PJ* + *JT*, *PJ* = *y*, *JT* = *C*_{L}V and *TM* = *z*, then Equation (7) is transformed as follows:

$$\begin{array}{}{\displaystyle \frac{{C}_{L}V}{h}=\frac{y+{C}_{L}V}{z},}\end{array}$$(8)

and then

$$\begin{array}{}{\displaystyle y=\frac{z\cdot {C}_{L}V}{h}-{C}_{L}V={C}_{L}V\left(\frac{z}{h}-1\right)=\frac{{C}_{L}V}{h}(z-h).}\end{array}$$

From Equation (6), the following relation is derived

$$\begin{array}{}{\displaystyle z-h=\frac{h\cdot b}{B{C}_{L}+{C}_{R}E}.}\end{array}$$

Substituting it into the latter expression, we obtain

$$\begin{array}{}{\displaystyle y=\frac{{C}_{L}V}{h}\left(\frac{h\cdot b}{B{C}_{L}+{C}_{R}E}\right)=\frac{{C}_{L}V\cdot b}{B{C}_{L}+{C}_{R}E}.}\end{array}$$(9)

Thus, on the basis of the above-mentioned calculations, the space coordinates of the arbitrary point are calculated by the following formulas:

$$\begin{array}{}{\displaystyle \left\{\begin{array}{}x=\frac{b\cdot B{C}_{L}}{B{C}_{L}+{C}_{R}E}\\ \\ z=\frac{h\cdot b}{B{C}_{L}+{C}_{R}E}+h\\ \\ y=\frac{{C}_{L}V\cdot b}{B{C}_{L}+{C}_{R}E}\end{array}\right.}\end{array}$$(10)

Since these formulas were obtained as geometric relation intervals, and the CCD matrix image is presented by the pixel system of coordinates, then these formulas should be matched with pixel representation. Relatively to the left and the right cameras, the CCD matrixes have their origins of pixel coordinates *O*_{L} and *O*_{R} correspondingly which are situated in the upper left corner of each matrix. The directions of pixel axes *O*_{L}X_{L} and *O*_{R}X_{R} of cameras along the width coincide with the direction of the axis *O*_{1}*X*, and directions of pixel axes *O*_{L}Y_{L} and *O*_{R}Y_{R} along the height are opposite to the direction of the axis *O*_{1}*Y*. It is conditioned by the fact that in the images the coordinate origin is the upper corner of the CCD matrix, and the values along the axis *Y*_{L} increase from bottom to top (relative to the axis *O*_{1}*Y* these values decrease), and along the axis *X*_{L} the values increase from left to right (i.e. similarly as along the axis *O*_{1}*X*). It should be noted that each CCD matrix of both video cameras has the same fixed sizes: *w* is the width in pixels along the axis *X*_{L}, and *d* is the height in pixels along the axis *Y*_{L}. In its turn, each pixel of video camera CCD matrixes has the same size *m* both along the width and along the height.

Let’s suppose that the arbitrary point *P*(*x*, *y*, *z*) exists in the space of the stereoscopic system scene, and its stereopair is depicted on the flat image of CCD matrixes as two pixel points *P*_{L}(*x*_{L}, *y*_{L}) and *P*_{R}(*x*_{R}, *y*_{R}) of the right and the left video cameras correspondingly (Figure 1b). The following task arises: how to calculate the 3D coordinates of the material point *P*(*x*, *y*, *z*) using its pixel images of the stereopair *P*_{L}(*x*_{L}, *y*_{L}) and *P*_{R}(*x*_{R}, *y*_{R}).

To solve this problem it is necessary to make transition from the geometrically obtained calculation Equations (10) of global coordinates to their pixel interpretation. The centers *O*_{1} and *O*_{2} of CCD matrix in pixels have the following coordinates
$\begin{array}{}{\displaystyle (\frac{w}{2};\frac{d}{2}).}\end{array}$
From the geometric scheme (Figure 1b) it is seen that as point *P* is situated within the stereoscopic system base, the coordinate *x*_{L} of its image on the left camera is negative relative to *O*_{1}*Z*, and it is positive relative to the right camera. It can also be seen from the geometric scheme that if point *P* is situated strictly higher than the plane *ZO*_{1}*X*, then its global coordinate
$\begin{array}{}{\displaystyle {y}_{\text{L}}^{\prime}}\end{array}$
on the image of the left camera CCD matrix is negative. Also from the stereoscopic system optical scheme presented in Figure 1a it is obvious that *O*_{1}Y_{L} = *O*_{2}Y_{R}, and that means that the global coordinates of CCD matrix images have the same height for the left and the right cameras, i.e.
$\begin{array}{}{\displaystyle {y}_{\text{L}}^{\prime}={y}_{\text{R}}^{\prime}}\end{array}$
. Then the pixel points *P*_{L}(*x*_{L}, *y*_{L}) and *P*_{R}(*x*_{R}, *y*_{R}) have the following global coordinates:

$$\begin{array}{}{\displaystyle {x}_{\text{L}}^{\prime}=-m\cdot \left({x}_{\text{L}}-\frac{w}{2}\right);}& {y}_{\text{L}}^{\prime}=-m\cdot \left({y}_{\text{L}}-\frac{d}{2}\right);\\ {\displaystyle {x}_{\text{R}}^{\prime}=m\cdot \left({x}_{\text{R}}-\frac{w}{2}\right);}& {y}_{\text{R}}^{\prime}=m\cdot \left({y}_{\text{R}}-\frac{d}{2}\right).\end{array}$$(11)

Since from the geometric scheme of the stereoscopic system (Figure 3) it is clear that *BC*_{L} =
$\begin{array}{}{\displaystyle {x}_{\text{L}}^{\prime}}\end{array}$
, *C*_{R} E =
$\begin{array}{}{\displaystyle {x}_{\text{R}}^{\prime}}\end{array}$
and *C*_{L} V =
$\begin{array}{}{\displaystyle {y}_{\text{L}}^{\prime}={y}_{\text{R}}^{\prime}}\end{array}$
, then Equations (10) are transformed as follows:

$$\begin{array}{}{\displaystyle \left\{\begin{array}{}x=\frac{{x}_{\text{L}}^{\prime}\cdot b}{{x}_{\text{R}}^{\prime}+{x}_{\text{L}}^{\prime}}\\ \\ y=\frac{{y}_{\text{L}}^{\prime}\cdot b}{{x}_{\text{R}}^{\prime}+{x}_{\text{L}}^{\prime}}\\ \\ z=\frac{h\cdot b}{{x}_{\text{R}}^{\prime}+{x}_{\text{L}}^{\prime}}+h\end{array}\right.}\end{array}$$(12)

Figure 3 3D-view of geometric scheme of the stereoscopic system.

After substitution of the Equation (11) into the Equation system (12), the following space coordinates of point *P* are obtained:

$$\begin{array}{}{\displaystyle \left\{\begin{array}{}x=\frac{-b\cdot m\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)}{-m\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)+m\cdot \left({x}_{\text{R}}-\frac{w}{2}\right)}\\ \\ y=\frac{-b\cdot m\cdot \left({y}_{\text{L}}-\frac{d}{2}\right)}{-m\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)+m\cdot \left({x}_{\text{R}}-\frac{w}{2}\right)}\\ \\ z=\frac{b\cdot h}{-m\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)+m\cdot \left({x}_{\text{R}}-\frac{w}{2}\right)}+h\end{array}\right.}\end{array}$$(13)

or

$$\begin{array}{}{\displaystyle \left\{\begin{array}{}x=\frac{b\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)}{{x}_{\text{L}}-{x}_{\text{R}}}\\ \\ y=\frac{b\cdot \left({y}_{\text{L}}-\frac{d}{2}\right)}{{x}_{\text{L}}-{x}_{\text{R}}}\\ \\ z=-\frac{h\cdot b}{m\cdot \left({x}_{\text{L}}-{x}_{\text{R}}\right)}+h\end{array}\right.}\end{array}$$(14)

To simplify the notation, as denote
$\begin{array}{}{\displaystyle \mathit{\Theta}=\frac{b}{{x}_{\text{L}}-{x}_{\text{R}}},}\end{array}$
then the Equation (14) can be written in the following form:

$$\begin{array}{}{\displaystyle \left\{\begin{array}{l}x=\mathit{\Theta}\cdot \left({x}_{\text{L}}-\frac{w}{2}\right)\\ \\ y=\mathit{\Theta}\cdot \left({y}_{\text{L}}-\frac{d}{2}\right)\\ \\ z=h\cdot \left(1-\frac{\mathit{\Theta}}{m}\right)\end{array}\right.}\end{array}$$(15)

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.