# A Fast Method of Visually Lossless Compression of Dental Images
## 3 Basic Dependences  
We use ADCTC codec in this paper (more information on this coder can be found at [[https://ponomarenko.info/adct.htm](https://ponomarenko.info/adct.htm)]([https://ponomarenko.info/adct.htm](https://ponomarenko.info/adct.htm))). The main peculiarity of this coder is that it employs partition schemes (i.e., a variable size DCT is carried out in image blocks). In addition, coding of numbers of significant bits, context modeling and coding of signs of DCT coefficients are applied. Figure 2 gives an illustration of ADCTC partition schemes. The maximal block size is \(64\times 64\) pixels, the minimal size is \(8\times 8\) pixels, and all blocks have rectangular shape with sides equal to the power of two. A larger block is divided into two smaller ones based on the entropy analysis (e.g., when the block contains heterogeneous parts). The ADCTC has the following peculiarities:  
1. Fast DCT algorithms can be used in the coder;
2. Coding of partition scheme is fast, and the obtained partition scheme occupies considerably less space than the coded quantized DCT coefficients;
3. A specific adaptation to the image content takes place and this results in better compression. Note that the partition scheme also depends on QS (partition schemes in Figure 2 are shown for two values of QS). ADCTC outperforms many compression techniques, even including those proposed recently [24]. The corresponding comparisons have been made earlier using standard optical test images. Here we show that this is also valid for dental images. Recall that a quantization step serves for ADCTC, as PCC and larger QS leads to a larger CR and, simultaneously, increases the level of introduced distortions (which means worse compressed image quality). The performance of a compression technique is usually compared using rate/distortion curves for a set of test images in terms of an image quality metric characterizing decompressed image quality. Most often researchers have used two metrics--mean square error (MSE) of introduced distortions and peak signal-to-noise ratio (PSNR) strictly related to it. During the last decade, unconventional visual quality metrics have been widely used. One such image quality metric is PSNR-HVS-M, which is a generalization of PSNR:  
\[\text{PSNR}-\text{HVS}-\text{M}=10\log_{10}\left(\frac{255^{2}}{\text{MSE}_{ \text{HVS}-\text{M}}}\right) \tag{2}\]  
where \(\text{MSE}_{\text{HVS}-\text{M}}\) is a specific MSE determined in the DCT domain using two important features of HVS: (a) The fact that distortions in low spatial frequencies can be more easily detected visually than distortions in high spatial frequencies; (b) the masking effect (i.e., ability of textures, edges and details to mask distortions). \(\text{MSE}_{\text{HVS}-\text{M}}\) for an entire image is calculated as a mean of local estimates \(\text{MSE}_{\text{HVS}-\text{M}}(\text{n})\), \(\text{n}=1,\ldots,\text{N}\), where n is a block index and N denotes the total number of analyzed blocks of size \(8\times 8\) pixels. Local values of \(\text{MSE}_{\text{HVS}-\text{M}}(\text{n})\) are calculated in the DCT domain using weights that use the JPEG quantization table, which is based on the contrast sensitivity function. In addition, an existence of the masking effect is verified for every block and employed in the calculation of \(\text{MSE}_{\text{HVS}-\text{M}}(\text{n})\). More details can be found in [[http://ponomarenko.info/psnrhvsm.htm](http://ponomarenko.info/psnrhvsm.htm)]([http://ponomarenko.info/psnrhvsm.htm](http://ponomarenko.info/psnrhvsm.htm)). Note that both PSNR and PSNR-HVS-M are expressed in dB (Formula (2) relates to 8-bit representation of images). Smaller values of both metrics, in general, correspond to worse quality. PSNR at the level of 36 dB and PSNR-HVS-M around 41 dB can be considered as empirically found thresholds of distortion invisibility [23]. Dependences of PSNR and PSNR-HVS-M on CR for the fragments in Figure 1 are presented in Figure 3 for ADCTC, JPEG2000 and SPIHT [25].