# A Novel Adaptive Image Data Hiding and Encryption Scheme Using Constructive Image Abstraction
## 3 Experimental Results and Analysis
### Analysis of Security
#### 3.2.4 Analysis of Entropy  
Information entropy is a concept in information theory that quantifies the amount of uncertainty or randomness in a set of data or a signal. It is also known as the Shannon entropy Shannon (1954). In the case of an 8-bit grayscale image, denoted by \(Z\), the gray level \(i\) is represented by \(z_{i}\). Equation (11) defines the Shannon entropy, where \(P(z_{i})\) represents the probability of gray level \(i\) occurring:  
\[H(Z)=-\sum_{i=0}^{255}P(z_{i})log_{2}[P(z_{i})] \tag{11}\]  
Assuming that \(Z\) represents a perfect random image, where \(P(z_{i})=1/256\) and it has the entropy of 8. Thus, a well-encrypted 8-bit image will have an entropy close to 8. Table 6 presents the entropy analysis results of our encryption algorithm. The plain image exhibits low entropy value, particularly in the E-channel, with a minimum value of 3.16 in the HDR image. However, the statistics of the ciphered image indicate that the entropy values in all the channels are close to 8. The results indicate that our scheme is effective in producing a ciphered image with entropy values that closely resemble those of an ideal random image.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Image**} & \multirow{2}{*}{**Channel**} & \multicolumn{4}{c}{**Plain Image**} & \multicolumn{4}{c}{**Ciphered Image**} \\ \cline{3-8}  & & **H** & **V** & **D** & **H** & **V** & **D** \\ \hline
507 & R & 0.974378 & 0.969364 & 0.950080 & \(-0.000235\) & \(-0.000080\) & 0.000381 \\ (HDR) & G & 0.976883 & 0.974866 & 0.956821 & 0.000765 & \(-0.000685\) & 0.000299 \\  & B & 0.979750 & 0.980885 & 0.964439 & \(-0.000883\) & 0.000147 & 0.000373 \\ \hline NCHU Main & R & 0.908312 & 0.905556 & 0.855767 & \(-0.000568\) & 0.000030 & 0.001296 \\ Gate & G & 0.915412 & 0.913782 & 0.868304 & \(-0.001012\) & 0.001337 & 0.000797 \\ (LDR) & B & 0.937499 & 0.937616 & 0.903753 & \(-0.000181\) & 0.000799 & \(-0.000592\) \\ \hline \hline \end{tabular}
\end{table}
Table 5: Correlation coefficients of the adjacent pixels in the abstracted stego test images.  
Moreover, [PERSON] et al. [39] introduced the local Shannon entropy (LSE) to address the limitations of the Shannon entropy, aka the global one. The LSE for an 8-bit grayscale image \(Z\), can be calculated by averaging the information entropy over \(k\) non-overlapping and randomly chosen \(n\)-pixels blocks, \(B_{i}\). The computation of LSE is shown in Equation (12). If the parameters \((k,n)=(30,1936)\) and significance level (\(\alpha\)) is 0.05, a ciphered image is expected to have an LSE value close to the ideal of 7.9025. To satisfy the test criteria, the LSE value should be within the interval [7.9019, 7.9030]  
\[\overline{H_{k,n}}(Z)=\sum_{i=1}^{k}\frac{H(B_{i})}{k} \tag{12}\]  
In order to evaluate our algorithm, we calculated the average LSE values across 10 encrypted stego images, as depicted in Figure 9. The results indicate that all LSE values fall within the target range, thus satisfying the statistical test. The tests conducted on both global and local entropy indicate that our encryption scheme generates ciphered images that display characteristics of randomness on both global and local levels, thereby making them resilient against statistical attacks.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Image** & **Channel** & **Plain Image** & **Ciphered Image** \\ \hline \multirow{4}{*}{507} & R & 7.368588 & 7.999787 \\  & G & 7.329590 & 7.999727 \\ (HDR) & B & 7.216471 & 7.999764 \\  & E & 3.161784 & 7.999724 \\ \hline \multirow{2}{*}{NCHU Main Gate (LDR)} & R & 6.182650 & 7.999734 \\  & G & 5.950375 & 7.999707 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Analysis of entropy for the abstracted stego test images in the plain and ciphered statuses.  
Figure 8: Correlation coefficients between adjacent pixels are close to zeros for all 10 encrypted abstracted stego test images in three channels and three directions. (**a**) HDR images; (**b**) LDR images.