# Determining Thresholds for Optimal Adaptive Discrete Cosine Transformation
## 3 Results and Discussion
A decrease in quality also allows less detailed images (with lower original ITDV) to be covered in solid color. Threshold value approximation equations depending on quality (original image ITDV) are presented in Tables 2 and 3. Table 2 considers equations of the linear approximation. Figure 8: Optimal threshold values for different original ITDV values of the images. The obtained results were compared to the non-adaptive discrete cosine transform such as used in the JPEG algorithm. The graphs in Figure 11 illustrate the dependence between MS-SSIM and the compression ratio of adaptive DCT (ADCT) and conventional DCT (DCT), respectively. As we can see from Table 4, lower target quality allows adaptive DCT to better express its advantages. High-quality compression slightly improves the compression ratio over regular DCT (3% higher on average) while preserving the quality (1% lower MS-SSIM on average). Meanwhile, low-quality compression with ADCT on average provides a 66% higher compression ratio with an 8.4% MS-SSIM loss when using the first-order approximation for the threshold values. We can also observe that first-order linear approximation demonstrates higher stability than the third-order curve and provides better results. At low quality, third-order approximation led to ADCT splitting without solid color fragments just like non-adaptive DCT, hence the match in MS-SSIM and CR values. The optimal threshold equations have been tested using the frames from the testing dataset as well as on other images, mainly highway imagery. The comparison between \begin{table}
\begin{tabular}{l l l} \hline \hline  & \(ps\) & \(pm\) \\ \hline High & 0.3509 + 0.0051 \(\times\) ITDV & 0.6233 \(-\) 0.0043 \(\times\) ITDV \\ \hline Medium & 0.1277 + 0.0105 \(\times\) ITDV & 0.4559 \(-\) 0.0117 \(\times\) ITDV \\ \hline Low & 0.2302 \(-\) 0.0101 \(\times\) ITDV & 0.0226 + 0.0359 \(\times\) ITDV \\ \hline \hline \end{tabular}
\end{table} 
Table 2: First-order threshold value approximation equations. \begin{table}
\begin{tabular}{l l l} \hline \hline  & \(ps\) & \(pm\) \\ \hline High & \(0.0691+0.0882\times ITDV-0.0075\times\) & \(0.6358+0.0455\times ITDV-0.0097\times\) \\  & \(ITDV^{2}+0.00021\times ITDV^{3}\) & \(ITDV^{2}+0.00045\times ITDV^{3}\) \\ \hline Medium & \(0.1703-0.0301\times ITDV+0.0065\times\) & \(0.5508\)\(-\)\(0.0281\)\(\times\)\(ITDV^{2}+0.00005\)\(\times\) \\  & \(ITDV^{2}-0.00028\times ITDV^{3}\) & \(0.50008\)\(\times\)\(ITDV^{2}+0.00005\)\(\times\) \\ Low & \(0.0089\)\(\times\)\(ITDV^{2}+0.00026\)\(\times\)\(ITDV^{3}\) & \(0.00037\)\(\times\)\(ITDV^{2}+0.00023\)\(\times\) \\  & \(ITDV^{3}\) & \(ITDV^{3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Third-order threshold value approximation equations. Figure 9: Examples of the test dataset frames. adaptive and non-adaptive DCT is presented for images with various compression qualities in Appendix A. We approximated the resulting bitrate (bits per pixel) of the images compressed with ADCT and regular DCT and compared this bitrate against MS-SSIM for both methods. We demonstrate this in Figure 12. As we can see, adaptive DCT becomes more efficient at lower bitrates. It still trades quality for compression but can quickly reach lower bits per pixel values and better compression. Figure 11: Comparison of resulting MS-SSIM and compression ratio after ADCT and non-adaptive DCT for ITDV values from 9 to 16. Figure 10: Distribution of ITDV values through all images of the considered dataset. Using this data, we compared our algorithm to other existing methods [25] and demonstrate it in Figure 13. The comparison does not account for only using static images in H.264. We believe that without motion compensation techniques our algorithm can compete with the existing methods. Additionally, the qualitative assessment of ADCT vs. DCT performance throughout the experiment is shown in the tables in Appendix A.