# Research on Panorama Generation from a Multi-Camera System by Object-Distance Estimation
## 3 Proposed Method
### Object-Distance Estimation Algorithm
#### 3.3.2 Estimation of Object-Distance Pyramid Maps in Overlapping Regions
: _The corresponding image patches are represented as \(I_{i}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) and \(I_{j}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) at the 1 th pyramid level, respectively, where \(G_{i,j}^{l}(\varphi,\psi)\) be the grid cell located at the \(\varphi^{th}\) row and \(\psi^{th}\) column of the pyramid grid in \(A_{i,j}\), \(r_{R_{i,j}^{l}(\varphi,\psi)}\) be the object-distance in this cell, \(R_{i,j}^{l}(\varphi,\psi)\) denotes the index of \(r_{R_{i,j}^{l}(\varphi,\psi)}\) in \(r_{list}\), and here \(l\) takes values from \(N\) down to \(t\)._  
We can assume that the pixel point \(a\) in the grid cell is reprojected to locations of \((u_{a,i},v_{a,i})\) in image \(I_{i}\) and \(\left(u_{a,j},v_{a,j}\right)\) in image \(I_{j}\) using \(r_{R_{i,j}^{l}(\varphi,\psi)}\) as the cylinder radius based on Equation (9) derived from Equation (5), respectively. Thus, a pair of grey values can be acquired based on the grey bilinear interpolation algorithm using four-pixel points around the points \((u_{a,i},v_{a,i})\) and \(\left(u_{a,j},v_{a,j}\right)\), respectively. In this way, \(I_{i}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) and \(I_{j}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) can be generated with a resolution of \(2^{l}\) pixels by \(2^{l}\) pixels, respectively. \[ \begin{bmatrix}u_{a,i}\\ v_{a,i}\\ 1\end{bmatrix} =s_{i}K_{i}R_{i} \begin{bmatrix}r_{R_{i,j}^{l}(\varphi,\psi)} sin\frac{\pi\chi_{a}}{L}-X_{i}\\ r_{R_{i,j}^{l}(\varphi,\psi)}cos\frac{\pi\chi_{a}}{L}-Y_{i}\\ \frac{2\pi r_{R_{i,j}^{l}(\varphi,\psi)}}{L}\left(\frac{\psi}{2}-y_{a}\right)- Z_{i}\end{bmatrix} , \begin{bmatrix}u_{a,j}\\ v_{a,i}\\ 1\end{bmatrix} =s_{j}K_{j}R_{j} \begin{bmatrix}r_{R_{i,j}^{l}(\varphi,\psi)} sin\frac{\pi\chi_{a}}{L}-X_{j}\\ r_{R_{i,j}^{l}(\varphi,\psi)}cos\frac{\pi\chi_{a}}{L}-Y_{j}\\ \frac{2\pi r_{R_{i,j}^{l}(\varphi,\psi)}}{L}\left(\frac{\psi}{2}-y_{a}\right)- Z_{j}\end{bmatrix}  \tag{9}\]  
Figure 6: Projection tracks from radius list. **Definition 2**. : _Let \(NCC\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) be the Normalized Cross-Correlation image matching parameter between image blocks \(I_{i}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) and \(I_{j}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\)._  
The value of \(NCC(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi))\) can be computed by Equation (10). \[NCC(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)) \tag{10}\] \[=\frac{\sum_{t=0}^{s}\sum_{j=0}^{s}(g_{i}(x,y)-\overline{g_{i}}) \left(g_{j}(x,y)-\overline{g_{j}}\right)}{\sqrt{\sum_{t=0}^{s}\sum_{j=0}^{s} \left(g_{i}(x,y)-\overline{g_{i}}\right)^{2}}}\sqrt{\sum_{t=0}^{s}\sum_{j=0}^{ s}\left(g_{j}(x,y)-\overline{g_{j}}\right)^{2}}}\]  
where \(g_{i}(x,y)\) and \(g_{j}(x,y)\) are the greyscales located at \((x,y)\) in the image block \(I_{i}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\) and \(I_{j}\left(G_{i,j}^{l}(\varphi,\psi),R_{i,j}^{l}(\varphi,\psi)\right)\), respectively. \(\overline{g_{i}}\), \(\overline{g_{j}}\) are the average grey values of the two image patches, respectively, where \(s=2^{l}\). Object-distance estimation based on the above definitions: Different from previous VLL-based methods that predict object-distance information directly, the proposed PVLL object-space matching method computes the index of the required object-distance in the estimated list \(r_{list}\) from coarse to fine. First, an objective function \(E_{i,j}\) is generated at the \(N^{th}\) pyramid layer in the overlapping region \(A_{i,j}\) to optimize the object-distance information of each grid cell. \(E_{i,j}\) is proposed based on the similarity of the image intensity between a pair of corresponding image patches and the smoothness of object-distance between adjacent grid cells, as depicted in Equation (11).