# Post-Filtering of Noisy Images Compressed by HEIF
## 2 Image/Noise Model and Basic Rate/Distortion Dependences for HEIF  
According to the assumed AWGN model, a noisy image can be represented as  
\[I_{ij}^{n}=I_{ij}^{true}+n_{ij}, \tag{1}\]  
where \(I_{ij}^{true}\), \(i=1,..,I_{Im}\), \(j=1,..,J_{Im}\) is the true (noise-free image), \(n_{ij}\) denotes the AWGN in the \(ij\)-th pixel, and \(I_{Im}\) and \(J_{Im}\) define the image size. It is assumed that AWGN has a zero mean and its variance \(\sigma^{2}\) is a priori known or has been accurately pre-estimated. The performance characteristics of lossy compression strongly depend on the image content (complexity). Taking this into account, we mainly used three test images, namely the test image Frisco (Figure 1a), which has a simple structure (characterized by a large percentage of pixels that belong to homogeneous image regions), the typical image Fr03 (Figure 1b), and the image Diego (Figure 1c), which contains many textures and small details with a very small percentage of pixels belonging to homogeneous image regions. All three images are represented as 8-bit data arrays and have a size of 512 \(\times\) 512 pixels. Recall here that the HEIF coder, similarly to JPEG, is controlled by a QF varying from 1 (low quality of compressed images with large CR) to 100 (insignificant compression with very small losses). One specific feature of HEIF (here we used the version available at [[https://github.com/bigcat88/pillow_heif](https://github.com/bigcat88/pillow_heif)]([https://github.com/bigcat88/pillow_heif](https://github.com/bigcat88/pillow_heif))) is that the compression characteristics for pairs of neighbor values of QF (e.g., 3 and 4, 5 and 6) are practically identical [17]. The CR for HEIF (similarly to many other compression techniques) not only depends on the QS, but also on the image complexity and noise properties. To demonstrate this, consider the data in Table 1. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**QF**} & \multicolumn{4}{c}{**Frisco**} & \multicolumn{4}{c}{**Diego**} \\ \cline{2-7}  & \(\sigma^{2}\)**=25** & \(\sigma^{2}\)**= 100** & \(\sigma^{2}\)**=196** & **Qoop** & \(\sigma^{2}\)**=25** & **\(\sigma^{2}\)**=100** & \(\sigma^{2}\)**=196** & **Qoop** \\ \hline
9 & 158.29 & 175.34 & 175.11 & & 77.972 & 78.982 & 80.289 & \\
19 & 80.362 & 82.176 & 78.392 & & 30.552 & 29.427 & 27.187 & \\
29 & 43.137 & 17.629 & 8.963 & OOPs were & 11.260 & 9.068 & 7.001 & \\
39 & 11.050 & 5.219 & 4.248 & observed for QF & 5.072 & 4.199 & 3.759 & OOP was observed \\
49 & 4.619 & 3.225 & 2.839 & equal to 24, 22, and & 3.426 & 3.014 & 2.793 & for QF equal to 29 \\
59 & 2.970 & 2.362 & 2.162 & 19 for \(\sigma=5\)\(\sigma=10\), & 2.339 & 2.133 & 2.032 & for only \(\sigma=14\). \\
69 & 2.174 & 1.816 & 1.684 & and \(\sigma=14\), & 1.851 & 1.729 & 1.645 & for only \(\sigma=14\). \\
79 & 1.733 & 1.494 & 1.400 & respectively. & 1.530 & 1.437 & 1.375 & \\
89 & 1.459 & 1.259 & 1.180 & 1.281 & 1.108 & 1.161 & \\
99 & 1.415 & 1.187 & 1.112 & & 1.199 & 1.133 & 1.090 & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Compression ratio for the Frisco and Diego images for different QF and \(\sigma^{2}\). Figure 1: Test single-channel (grayscale) images Frisco (**a**), Fr03 (**b**), and Diego (**c**), all 512 \(\times\) 512 pixels. As expected, the CR increased when the QF was reduced. As also expected, the CR for the simple structure image was larger than the CR for the complex structure image for the same QF and \(\sigma^{2}\). Quite small CR values (smaller than 3) were observed for both images for QF \(\geq\) 59, where it was possible to note near-lossy compression. Meanwhile, there were two interesting observations. First, the CR decreased if the \(\sigma^{2}\) increased for a large QF (e.g., QF = 79); for a small QF, the CR for a larger \(\sigma^{2}\) was larger or practically the same (see data for QF = 9).