# Integrating Visual Cryptography for Efficient and Secure Image Sharing on Social Networks
## 4 Experimental Results
### Experiment Results  
Across all tested grayscale levels, our algorithm consistently demonstrated better encryption results, with fewer clusters of pixels and a more uniform overall distribution, making it visually more appealing. This indicates that our algorithm optimizes the visual effect of the image while maintaining encryption security. Although the random-grid algorithm can produce uniform encryption patterns, it may not handle details as finely as our algorithm, especially at low grayscale levels, where the encrypted images might appear rather coarse. The probabilistic encryption method may exhibit certain statistical biases when dealing with grayscale levels, leading to uneven pixel distributions in certain areas of the encrypted image. Despite acceptable overall results, it falls slightly short of our algorithm in terms of detail retention and aesthetic appeal. Our algorithm excels in image encryption, ensuring both encryption security and superior visual effects compared to other comparative algorithms. Notably, our algorithm has significant advantages in reducing pixel clusters and enhancing the aesthetics of the images. Figure 3 shows seven classic images for encryption. These are our, random-grid, probabilistic, block [16] and error diffusion-based VCSs from left to right, respectively. VCS has seen numerous advancements aimed at improving efficiency, security, and usability. Notable approaches include the random-grid VCS, which leverages random grids to create shares that individually reveal nothing about the secret image, and block-based VCS, which enhances flexibility and scalability by encrypting image blocks independently. Probabilistic VCS offers another solution, minimizing pixel expansion and improving decrypted image quality, making it ideal when pixel size is a concern. These techniques form the basis for our proposed method, which seeks to overcome existing VCS limitations and provide a more efficient and secure solution. Our method demonstrated excellent encryption results across all test images. The encrypted images maintained the contours and feature information of the originals while creating difficult-to-recognize encrypted patterns through unique pixel distribution and density variations. This encryption method ensures both the security of the encryption and the preservation of the visual aesthetics of the images. As shown in Table 1, our method demonstrates a level comparable to ED images in both PSNR and SSIM, indicating effective preservation of image details and structural information during the encryption process. The NAE value is also relatively low, significantly outperforming probabilistic and random-grid encryption methods. These results suggest that our encryption algorithm can effectively retain the visual features and structural information of images while protecting image data, providing an efficient and reliable solution in the field of image encryption. Compared with the ED method, which optimizes image encryption through error diffusion technology but has high computational complexity and is not friendly to resource-constrained devices, our method significantly reduces computational overhead by combining downsampling and VCS, while maintaining high encryption quality. Unlike the probabilistic method that improves security by randomizing the encryption process but suffers from unstable decryption quality, our proposed method introduces weighting factors to ensure security while enhancing the stability of decryption quality. In contrast to the random-grid method that achieves encryption through grid partitioning but has severe pixel expansion issues, our method effectively reduces pixel expansion through downsampling technology, thereby optimizing the size and transmission efficiency of encrypted images. The subtlety in performance differences can be attributed primarily to the nature of the preprocessing step involving halftoning algorithms in visual cryptography.