# Post-Filtering of Noisy Images Compressed by HEIF
## 4 Post-Filtering Opportunities and Results
### Post-Filtering Performance Analysis  
Filter performance is usually characterized by the output peak signal-to-noise ratio or its increase compared with the PSNR of the original noisy images [67]. Meanwhile, it has become popular to also analyze the visual quality metrics or their improvement due to filtering [69]. Below, we consider the metrics PSNR-HVS-M [32] and FSIM [70], which are among the best for characterizing denoising efficiency and the visual quality of images in general [68; 69]. Recall here that we considered grayscale images, and hence not all visual quality metrics (mainly intended on characterizing the color image quality) could be applied. PSNR-HVS-M is expressed in dB and larger values correspond to a better visual quality. FSIM varies between 0 and 1, and larger values relate to better quality. Post-filtering can be useful only under certain conditions (i.e., if it is efficient enough and if the provided CR is appropriately large). Because of this, we did not consider a QF > 51, for which the provided CR was small (see data in Table 1). Meanwhile, we also did not analyze a QF < 23, since it was expected that the filtering efficiency would be low [49]. In other words, we studied the behavior of post-filtering efficiency for the neighborhood of the optimal operation point (if it existed, see data in Table 2) and for a QF that produced a smaller CR than in the OOP. Namely, the interval of QF analysis was from 23 to 51. Some preliminary results are presented in Table 3 for \(\sigma^{2}\) = 50. The optimal values for \(\beta_{\text{opt}}\), which provide the maximal output PSNR, are given, and the produced PSNR-HVS-M values are also presented. Recall here that the input PSNR was equal to 31.12 dB and the output PSNR for the BM3D filter applied to an uncompressed noisy image was equal to 39.45 dB for the image Frisco and 33.72 dB for the image Fr03. As seen, filtering was more efficient for the simpler structure image Frisco. For the complex structure image Fr03, the PSNR improvement was only 2.6 dB. Analysis of the data in Table 3 allowed us to draw the following conclusions:  
1. If the QF decreases (i.e., the CR increases and the noise-filtering effect of lossy compression becomes larger), the PSNR and PSNR-HVS for post-filtering decrease and the optimal \(\beta\) is also reduced; this means that the positive effect of post-filtering becomes smaller if the QF increases, and in fact, post-filtering for a small QF becomes useless;
2. There are QF values for which post-filtering is expedient; for example, for QF = 41, the values of PSNR\({}_{\text{tc}}\) for the compressed images were equal to 34.74 dB for Frisco and 30.38 dB for Fr03, respectively, while the PSNR values after post-filtering were equal to 39.03 dB for Frisco and 32.48 dB for Fr03, respectively;
3. Certainly, post-filtering is less efficient for complex structure images, and this property is in good agreement with the general denoising properties [51; 55; 69];
4. The PSNR-HVS-M metric demonstrated the same properties and confirmed the conclusions based on the PSNR analysis;  
As can be seen, the surfaces are smooth, and the maxima in the neighborhood of the optimal \(\beta\) are not \"obvious\" (i.e., for \(\beta\), which slightly differed from \(\beta_{\text{opt}}\), the performance was practically the same as for \(\beta_{\text{opt}}\)). This means that errors in setting \(\beta\) do not considerably influence the post-filtering efficiency. Meanwhile, the reduction in the metric output values with QF decreasing was not rapid for QF = 40, but the reduction speed increased for a smaller QF. Let us now see what happens for other values of noise variance. The data obtained for \(\sigma^{2}=100\) are given in Table 4.  
Recall that the input PSNR in this case was equal to 28.12 dB and the output PSNR for the BM3D filter applied to the uncompressed noisy image was 37.66 dB for the image Fr03. Thus, filtering was again more efficient for the simpler structure image Frisco. For the image Fr03, the PSNR improvement was equal to 3.6 dB.