# Joint Image Compression and Encryption Using IWT with SPIHT, Kd-Tree and Chaotic Maps
## 5 Experimental Results and Discussion
### Compression Performance  
In this paper, lossless image compressions have been achieved. Table 1 lists the compression ratios (CRs) of six images when the permutation and diffusion operations were performed on the upper-left 64 \(\times\) 64 wavelet coefficients and SPIHT bit-stream compression with permutations at block sizes of greater than 8\(\times\)8. The compression performance is represented by the compression ratio (CR) or bits per pixel (bpp). Larger values of CR indicate more compression, whereas lower values of bpp indicate more compression. CR and bpp are defined as follows.  
\[\text{CR}=\frac{\text{Number}-\text{of}-\text{bits}-\text{of}-\text{plain}- \text{image}}{\text{Number}-\text{of}-\text{bits}-\text{of}-\text{cipher}- \text{image}}\]  
\[\text{bpp}=\frac{\text{Total}-\text{bits}-\text{in}-\text{compression}-\text{ image}}{\text{Total}-\text{number}-\text{of}-\text{image}-\text{pixels}}\]  
Here, we used both the CR and bpp for comparison.  
The compression comparison of the proposed method with the most relevant methods [14; 35; 37; 38] indicate that our method has achieved much more compression performance in joint image compression and encryption domain as compared to the existing methods. It indicates that the algorithm has a better compression ratio and the impact of encryption on compression is not substantial; thus, the proposed approach achieves a good balance between compression and encryption.  
The commonly used criteria for image quality assessment after compression are mean square error (MSE), which is defined in Equation (13), and peak signal-to-noise ratio (PSNR), which is defined in Equation (14).  
\[MSE=\frac{1}{M\times N}\sum_{j=1}^{N}\left(\widehat{I}\left(i,j\right)-I(i,j)\right) \tag{13}\]  
Here, \(\widehat{I}\left(i,j\right)\) denotes the original image and \(I(i,j)\) is the testing image, i.e., the compressed image. \(M\) and \(N\) represent the height and width, respectively, of the image.  
\[PSNR=10\times\text{log}_{10}\left(\frac{x_{peak}^{2}}{MSE}\right) \tag{14}\]  
Here, \(x_{peak}\) represents the peak signal value.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Image** & \multicolumn{3}{c}{**PSNR/dB**} & \multicolumn{3}{c}{**CR/bpp**} \\ \hline  & \begin{tabular}{c} **Our** \\ **Approach** \\ \end{tabular} & **Ref. [37]** & **Ref. [38]** & \begin{tabular}{c} **Our** \\ **Approach** \\ \end{tabular} & **Ref. [14]** & **Ref. [35]** & **Ref. [37]** & **Ref. [38]** & **QF =** \\ \hline \begin{tabular}{c} Lena \\ (grayscale) \\ \end{tabular} & 39.85 & 42.23 & — & 8.19/0.97 & 6.222713 & 10.426 & 4 & - \\ \hline \begin{tabular}{c} Baboon \\ (grayscale) \\ \end{tabular} & 36.37 & 35.15 & 32.5956 & 8.20/0.97 & 7.569092 & 4.977 & 4 & 2.4414 \\ \hline \begin{tabular}{c} Peppers \\ (grayscale) \\ \end{tabular} & 37.81 & 41.3 & - & 8.26/0.96 & 6.698654 & - & 4 & - \\ \hline \begin{tabular}{c} Airplane \\ (grayscale) \\ \end{tabular} & 40.68 & - & - & 8.49/0.94 & 6.388039 & 5.313 & - & - \\ \hline \
\begin{tabular}{c} House \\ (grayscale) \\ \end{tabular} & 40.41 & - & - & 8.13/0.98 & 6.671848 & - & - & - \\ \hline
\begin{tabular}{c} Lake \\ (grayscale) \\ \end{tabular} & 34.54 & - & - & 8.39 & - & - & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 1: CR and PSNR values of our approach and the compared approaches.  
The results in Table 1 demonstrate that the proposed method yields very good compression results compared to other related joint image compression and encryption methods with high-quality images.