# Research on Panorama Generation from a Multi-Camera System by Object-Distance Estimation
## 3 Proposed Method
### Object-Distance Estimation Algorithm  
A panoramic image generated from the multi-camera system can be divided into the overlapping areas projected from two adjacent cameras and non-overlapping areas projected from only one camera, as shown in Figure 3. Traditionally, the panoramic images can be generated with a single projection radius \(r\) under the assumption of a constant object-distance in the surroundings. While projection errors may occur due to variations in object-distance information, these errors are typically not easily discernible in the non-overlapping areas of a virtual panoramic image. However, stitching seams and geometric inconsistencies may become apparent and visible in the overlapping regions of a panoramic image. For example, the object points \(Q_{1}\), \(Q_{2}\), and \(Q_{3}\) are respectively projected onto distinct overlapping regions of a virtual cylinder surface with the radius \(r\) by individual cameras, as shown in Figure 4. In this case, the displacements between corresponding projection points \(Q_{k,L}\) and \(Q_{k,R}\) (\(k=1,2,3\)) from the same object point are contingent upon the difference between the object-distance \(d_{k}\) and the radius \(r\). In this case, a crucial challenge lies in estimating the object-distance information of the surrounding scene captured within the overlapping regions of each pair of adjacent cameras. To solve the problem, this paper presents a three-step algorithm for determining object-distance information in the surroundings to create seamless panoramic images. In the first step, we estimate the scope of overlapping regions in a panoramic image and generate pyramid grids. In the second step, object-distance information is determined using an improved VLL (Vertical Locus Line Method for the surroundings captured in the overlapping regions of the panoramic image). Finally, we employ an interpolation method to estimate object-distance information for each non-overlapping region. Figure 3: The view of the panoramic cylinder projection structure. 3.3.1. Generation Algorithm of Pyramid Grids in Overlapping Regions  
In this paper, each overlapping region of a panoramic image is first generated around the central line, which is defined as the angular bisector vector between two adjacent cameras. As illustrated in Figure 3, let \(Q_{ij}\) be a point on the cylinder surface, and \(\overrightarrow{OQ_{ij}}\) be the vector in the same direction as the angular bisector vector between \(\overrightarrow{OC_{i}}\) and \(\overrightarrow{OQ_{j}}\). The vector \(\overrightarrow{OQ_{ij}}\) can be derived by Equation (6). In addition, \(Q_{ij}\) is then projected onto the point \(q_{ij}\) within the panoramic image. The \(x\)-coordinate \(gap_{i,j}\) of \(q_{ij}\) can be computed by Equation (7). Further, the overlapping region \(A_{i,j}\), with a width of \(w\) and \(gap_{i,j}\) setting as the central line, is generated, expanding \(x_{i,j}\) pixels away from the y-axis. \[\overrightarrow{OQ_{i,j}}=\lambda(\frac{\overrightarrow{OC_{i}}}{\left\|{OC _{i}}\right\|}+\frac{\overrightarrow{OC_{j}}}{\left\|{OC_{j}}\right\|}) \tag{6}\]  
\[x_{i,j}=\frac{W}{2\pi}\text{arctan}(\frac{Y_{i,j}}{X_{i,j}}) \tag{7}\]  
In Equations (6) and (7), \(\overrightarrow{OQ_{ij}}\) is set as \(\left[X_{i,j}Y_{i,j}Z_{i,j}\right]^{T}\), where \(X_{i,j},Y_{i,j},Z_{i,j}\) represent the \(X\), \(Y\) and \(Z\) cylindrical coordinates of point \(\text{Q}_{ij}\), respectively. \(\lambda\) is the scale factor, and \(x_{i,j}\) is the x-coordinate of \(q_{ij}\) in the panoramic image coordinate system. \(W\) is the width of the virtual panorama image. The parameters \(i\) and \(j\) take on the following values: \(i=1,2,3,\ldots,8\), \(j=1,2,3,4,\ldots,8\). By adopting a strategy of progressive refinement from coarse to fine, eight object-distance maps (ODMs) are constructed for each overlapping region of a virtual panoramic image.