# Latitude-Adaptive Integer Bit Allocation for Quantization of Omnidirectional Images
## 3 Problem Formulation
### Latitude-Adaptive Bit Allocation Problem  
The right part of Figure 2 illustrates the integer bit allocation process proposed in our study. We allocate different bits to tiles at various latitudes, resulting in distinct quantizers for each tile. We assume that the coefficients \(\mathbf{c}_{k,l}\) of different blocks at the same latitude \(k\) follow the same distribution and share quantizers, so every tile has \(L^{2}\) scalar quantizers. Additionally, we assume coefficients in different tiles follow their respective distribution, necessitating the production of their own quantizers. As there are \(K\) tiles, the total number of quantizers is \(KL^{2}\). In our research, we delve into the strategy of allocating integer bits across various quantizers. The distributions of coefficients are needed in the bit allocation method. There  
Figure 2: Processing chain of our method. (**a**) A batch of original images. (**b**) Coefficient matrices partitioned into blocks. (**c**) Recovered images after quantization. (**d**) Distribution modeling of coefficients at different latitudes. (**e**) Bit allocation among titles. (**f**) Subsequent bit allocation in each tile. fore, we begin by analyzing the distribution of \(KL^{2}\) coefficients, as shown in Figure 2d. Notably, we observe that the distribution of \(\mathbf{c}_{k,l}\) is different from that of other coefficients \(\mathbf{c}_{k,l}\), where \(l=2,\ldots,L^{2}\), which will be further demonstrated in Section 6. As the transform removes the correlation between coefficients, we treat \(\mathbf{c}_{k,l}\) independently and employ empirical distributions to model their distribution. In Figure 2e, we consider allocating bits to \(K\) latitudes, where each block at latitude \(k\) is allocated \(b_{k}\) bits. Moving to Figure 2f, we proceed to allocate bits to the \(L^{2}\) quantizer within each tile, where each quantizer at latitude \(k\) is allocated \(b_{k,l}\) bits. Once every scalar quantizer is allocated with NNI bits, we can produce quantizers and use them to quantize coefficients in Figure 2b. Our goal is to minimize the reconstruction error under WMSE to recover the quantized panoramic images. The WMSE is defined as  
\[\text{WMSE}=\frac{\sum_{i=0}^{M-1}\sum_{j=0}^{N-1}\left(w(i,j)(y(i,j)-y^{ \prime}(i,j))^{2}\right)}{\sum_{i=0}^{M-1}\sum_{j=0}^{N-1}w(i,j)}, \tag{1}\]  
where \(y(i,j)\) and \(y^{\prime}(i,j)\) are samples at position \((i,j)\) on the \(M\times N\) original and recovered images, respectively. The weights of ERP are calculated as  
\[w(i,j)=\cos\frac{(j+0.5-M/2)\pi}{M}. \tag{2}\]  
Similar to PSNR, WS-PSNR for the omnidirectional image is calculated via the WMSE:  
\[\text{WS-PSNR}=10\log_{10}\left(\frac{\text{MAX}_{l}^{2}}{\text{WMSE}}\right), \tag{3}\]  
where \(\text{MAX}_{l}\) is the maximum possible intensity level of the image. Since our method is block-based and involves an orthogonal transform preserving the distance, we employ an average block weight of ERP as a replacement for the individual point weights within each block. The average block weight, denoted by \(\omega_{k}\), is solely dependent on the latitude of the block and is determined by the weight of the center point of the block. As mentioned earlier in this subsection, we make the assumption that distinct blocks within the same tile conform to the same distribution and the total bit budget is evenly allocated among blocks at the same latitude. With this assumption, we can formulate our problem as  
\[\text{min}_{Q(\cdot)}\mathbb{E}\bigg{\{}\sum_{k=1}^{K}\omega_{k} \Big{\|}\mathbf{c}_{k}-\mathbb{E}\Big{\{}\mathbf{c}_{k}\mid Q^{b_{k}}( \mathbf{c}_{k})\Big{\}}\Big{\|}^{2}\bigg{\}}\] (4) s.t. \[\sum_{k=1}^{K}b_{k}\leq\frac{B}{2K},b_{k}\in\mathbb{N},\]  
where \(B\) is the total budget assigned to the image, \(b_{k}\) is the bit budget allocated to quantize \(\mathbf{c}_{k}\), and \(Q^{b_{k}}\) is the vector quantizer with budget \(b_{k}\). In the following sections of the paper, we utilize \(L^{2}\) scalar quantizers for coefficients within each block.