# Viewport Rendering Algorithm with a Curved Surface for a Wide FOV in 360\({}^{\circ}\) Images
## 4 Algorithm Proposed to Render the Viewport
### Adjusted Sampling Intervals  
In this section, we adjust the sampling intervals that are made by using the curved UV surface so that the sampling positions are more evenly spaced. Figure 12 presents a mapping function between the original index \(u\) and the modified index \(u^{\prime}\) on the UV plane, where the function passes through {S(1), S(3), S(5)} on the diagonal line and {S(2), S(4)}, which are not on the diagonal line. {S(1), S(2), S(3), S(4), S(5)} are ancillary parameters that are used to explain the mapping function. The quantity of the deviation of {S(2), S(4)} from the diagonal line is set to \(w\), which is defined as follows:  
\[w=\frac{\text{FOV}-\text{thr}_{\text{FOV}}}{\alpha},\text{ FOV }\geq\text{thr}_{\text{FOV}} \tag{39}\]  
where \(\text{thr}_{\text{FOV}}\) is a threshold for the FOV. When the FOV is larger than \(\text{thr}_{\text{FOV}}\), i.e., when the FOV is wide, the sampling intervals are modified. In (39), the parameter \(\alpha\) is set based on the empirical data. Using this mapping function, the sampling points \(P^{\prime}\) on the unit sphere are more uniformly sampled horizontally. This reduces the degradation (e.g., stretching) in the boundary regions of the viewport. The mapping function in Figure 12 can be modeled with the following equation:  
\[u^{\prime}=g(u)=c_{0}+c_{1}u+c_{2}u^{2}+c_{3}u^{3} \tag{40}\]  
where the variables {\(c_{0}\),\(c_{1}\),\(c_{2}\),\(c_{3}\)} are calculated by applying a polynomial regression algorithm [34] as follows:  
\[\left[ \begin{array}{c}u^{\prime}_{1}\\ u^{\prime}_{2}\\ u^{\prime}_{3}\\ u^{\prime}_{4}\\ u^{\prime}_{5}\end{array} \right]=\left[ \begin{array}{cccc}1&u_{1}&u^{2}_{1}& u^{3}_{1}\\ 1&u_{2}&u^{2}_{2}&u^{3}_{2}\\ 1&u_{3}&u^{2}_{3}&u^{3}_{3}\\ 1&u_{4}&u^{2}_{4}&u^{3}_{4}\\ 1&u_{5}&u^{2}_{5}&u^{3}_{5}\end{array} \right]\left[ \begin{array}{c}c_{0}\\ c_{1}\\ c_{2}\\ c_{3}\end{array} \right] \tag{41}\]  
\[\overset{\rightarrow}{u}=\mathbf{U}\overset{\rightarrow}{c} \tag{42}\]  
\[\overset{\rightarrow}{c}=\left(\mathbf{U}^{\text{T}}\mathbf{U}\right)^{-1} \mathbf{U}^{\text{T}}\overset{\rightarrow}{u} \tag{43}\]  
Note that all of the techniques that are explained in this subsection can be applied for \(v\). Figure 12: Adjustment function to modify the sampling position on the UV plane. In Figure 8a,b, if the sampling positions are ideal, then the normalized \(l^{h}(m,n*)\) is equal to 1 for all m values. Thus, the degradations in these figures can be evaluated by using the following equation. \[\mathrm{L}^{h}_{n*}=\frac{1}{W_{VP}-1}\sum_{m=0}^{W_{VP}-2}\left\{1-\left(\frac {l^{h}(m,n*)}{\mathrm{Max}\big{(}l^{h}(m,n*)\big{)}}\right)\right\}^{2} \tag{44}\]  
In order to analyze the effect of the parameter \(r\) of equation (29) in the proposed algorithm, the values of \(\mathrm{L}^{h}_{n*}\) of (44) for various \(r\) are shown in Figure 13. In the figure, as the value of \(\mathrm{L}^{h}_{n*}\) decreases, the quality of the viewport increases because it means that the data on the sphere are sampled uniformly. As shown in Figure 13, the optimal values of \(r\) differ based on \(\mathrm{F}_{h}\), where the optimal values of \(r\) for \(\mathrm{F}_{h}=\) [75, 90, 120, 150] are [3.2061, 3.4041, 3.1588, 2.9040], respectively. The optimal values for \(r\) were obtained by Quasi-Newton Method [35]. To demonstrate the effect of the proposed UV surface, Figure 14 displays the normalized \(l^{h}(m,n*)\) when \((u,\ v)\) of the UV plane is modified by applying the mapping technique of Figure 12 for \(u\) and \(v\) independently after the proposed UV surface is employed with the optimized values of \(r\). Figure 14: Normalized \(l^{h}(m,n^{*}=H_{VP}/2)\) when the proposed UV surface is used with the optimized values of \(r\) and \(u\) is modified by the mapping function \(g(u)\). Figure 13: \(\mathrm{L}^{h}_{n*}\) of (44) for various \(r\) and \(\mathrm{F}_{h}\) in the proposed algorithm.