You are on page 1of 4

An Unsupervised Learning Approach for Visual

Data Compression with Chaotic Encryption


2021 Fourth International Conference on Electrical, Computer and Communication Technologies (ICECCT) | 978-1-6654-1480-7/21/$31.00 ©2021 IEEE | DOI: 10.1109/ICECCT52121.2021.9616827

Bharti Ahuja Rajesh Doriya


Department of IT Department of IT
National Institute of Technology Raipur National Institute of Technology Raipur
Raipur, India Raipur, India
bharti.salunke99@gmail.com rajeshdoriya.it@nitrr.ac.in

Abstract—The increased demand of multimedia leads to information in the form of visuals exist on the World Wide
shortage of network bandwidth and memory capacity. As a Web.
result, image compression is more significant for decreasing
data redundancy, saving storage space and bandwidth. Along Every day, billions of photos are uploaded to social
with the compression the next major challenge in this field is to media like instagram, Twitter, Linkedin and Facebook, as
safeguard the compressed data further from the spy which are well as cloud storage systems like Google Drive and
commonly known as hackers. It is evident that the major Dropbox. Image compression technologies are required to
increments in the fields like communication, wireless sensor reduce the image size and save storage space when dealing
network, data science, cloud computing and machine learning with such vast amounts of information. Due to restricted
not only eases the operations of the related field but also bandwidth and spying, the image of interest should be
increases the challenges as well. This paper proposes a worthy protected and compressed too while sending through a
composition for image compression encryption based on channel [5].
unsupervised learning i.e. k-means clustering for compression
with logistic chaotic map for encryption. The main advantage Image compression process is eliminating unnecessary
of the above combination is to address the problem of data and repeated data from a digital image in order to reduce the
storage and the security of the visual data as well. The data needed to represent it. It entails downsizing image while
algorithm reduces the size of the input image and also gives the maintaining all of the relevant information which can appeals
larger key space for encryption. The validity of the algorithm is the human visual system.
testified with the PSNR, MSE, SSIM and Correlation
coefficient. Discrete wavelet transform, Discrete cosine transform,
SPHIT, JPEG, K-Means clustering, and Fuzzy Compression
Keywords—Compression, Encryption, Chaotic map, [6] are few of the majorly used image compression
Clustering, Data security. algorithms previously. Some hybrid combinations such as
PCA with K means clustering were also employed in the
I. INTRODUCTION past. It operates with the goal of reducing unnecessary data
by applying dimension reduction and color quantization [7].
Since an image carries a huge set of information as Pixels are the units of measurement for the intensity of a
compared to almost all data types hence the strongest popular picture. Each pixel in a colorful image is made up of three
medium of communication at this time. The today’s modern bytes, each of which contains RGB (Red-Blue-Green) data
era of social networking, advancements in satellite, with Red, Blue, and Green intensities.
communication, cloud storage and advanced high class
algorithms like machine learning and deep learning are In the proposed work, k mean clustering is used with the
working like catalyst in the widespread use of visual data logistic chaotic map for compression and encryption
communication. Because images are frequently transmitted respectively. The objective here is to provide the security
across an insecure channel like the internet, protecting with the compression.
images against cyber-attacks is a critical issue in a wide The said combination has the following two advantages:
range of applications including medical services like
telemedicine, smart devices like electric vehicles, navigation • The K means clustering effectively reduce the size
and the defense. of an image up to the adequate level of human
visual system.
Image encryption is a useful technique for converting
visual data into a form that is hard for humans to • The Logistic chaotic map provides the good level of
comprehend. Secure form of communication for images is encryption with larger key space.
always provided by the variety of research in the field of The following is a breakdown of the remaining article:
cryptography. Different approaches for image cryptography The early notions are the topic of Section II. The III section
have recently been suggested, including optical image displays proposed technique, while section IV exhibits the
encryption [1], DNA coding [2], Compressive sensing [3], effectiveness of the scheme through computer simulations.
and Chaos. Finally, in part V, a conclusion is reached.
Due to the extreme sensitivity of chaotic maps to their
originating states, a number of cryptographic algorithms II. PREREQUISITES
dependent on chaos theory have been proposed [4]. As a
result, in the encryption algorithm, their originating A. K-Means Clustering
circumstances are being used as a key. Large volumes of For resolving the clustering difficulty, K-Means has been
one of the easiest unsupervised learning method. It also finds

Authorized licensed use limited to: National Institute of Technology. Downloaded on December 03,2021 at 17:52:38 UTC from IEEE Xplore. Restrictions apply.
application in image compression. K-Means employs lossy  y n1  u  yn  (1  y n ) 
compression rather than lossless compression, therefore the
original picture cannot be recovered again from compressed
Two arguments are used in the above technique to
image. The disparity between the compressed picture and the
generate random sequencing. As a result, this technique
original image grows as the compression ratio increases.
exhibits disordered conduct, often referred as chaotic
It is a clustering method based on centroid values. The behavior. Fig. 2 depicts a schematic approach of illustrating
method divides the data into k distinct clusters as shown in this process, in which the bifurcation diagram provides
fig. 1. The centroid point represents each cluster in the K- information on machine dynamics. Fig. 2 shows a bifurcation
Means clustering technique. It divides data sets into k diagram where value begins at u = 3.75 and ends at u = 4.
clusters Si(0,1,2,....k), each of which has a centroid (cluster For y1, y2, y3.....yn , it obtains values between 0 and 1 [10].
center) Ci [8]. The K-means clustering technique for picture
compression works on the following principle:
 The value of k (Number of chosen clusters) is
critical in the sense that k must be smaller than the
number of picture pixels N.
 By using pixel of the picture as a data set, the
centroid is calculated using the K-means method to
get the centroid µ.
 Every pixel's centroid and index of the centroid are
stored, eliminating the need to preserve all of the
source data.

Fig. 2. Bifurcation diagram of Logistic Map.

III. SUGGESTED ALGORITHM


Following are the key steps of the proposed compression
encryption algorithm which is shown in fig.3
 Reshaping Image: It reduces all pixel values to a
single size dimension (mxn), with each pixel having
three dimensions to represent RGB values. Here m
Fig. 1. Data map before and after clustering.
and n representing row and column respectively.
 Clustering: Apply K means clustering to obtain the
The algorithm will group similar colors together in ‘k' k-centroid which gives information about its
clusters (say ‘k' = 64) in an image compression problem. As neighboring color set.
a result, the centroid of every cluster represents the 3
dimensional color vectors (RGB) that fall within that cluster.  Substituting every pixel with its centroid: The
Such ‘k' centroids will substitute all of the color vectors in centroid now indicate all color combination of
respective clusters, resulting in only ‘k' color combinations (mxn) number of pixels. Every pixel's value should
being used across the image. As a result, we just need to be replaced with its centroid.
preserve the label of each pixel in the image that indicates
 Reshaping Compressed Image: Reshaping the
which cluster that pixel belongs to. We also maintain the
compressed image. [(mxn, 3) dimension to actual
codebook for the ‘k' centroids, that are the only colors visible
(m, n, 3) dimension]
in the compressed image [9].
 Get Compressed Image: Show the compressed
B. Logistic Map image and save it to storage.
For its basic but unpredictable nature, the logistic map  Logistic Chaotic Map applied: On application of
becomes one of the most widely utilized chaotic maps in chaotic map, the compressed image is encrypted
image encryption. with the advantage of large key space.
Mathematically it is represented as:  Output Compressed Encrypted Image: Display the
compressed encrypted image.

Authorized licensed use limited to: National Institute of Technology. Downloaded on December 03,2021 at 17:52:38 UTC from IEEE Xplore. Restrictions apply.
Fig. 3. Flow diagram of the proposed compression encryption algorithm.

(Software Version: MATLAB 2016a) Fig. 4 and 5


IV. RESULT describes the computational outcomes after MATLAB
This segment contains two colored images (Pepper and simulation.
Aeroplane) for testing purpose with a resolution of 512×512.

Fig. 4. Simulation results for Pepper image.

Fig. 5. Simulation results for Aeroplane image.

TABLE I. PERFORMANCE ASSESSMENT OF THE IMAGES FOR THE


The performance assessment of the proposed algorithm is PROPOSED SCHEME
evaluated like PSNR (Peak signal to noise ratio), MSE
(Mean square error), SSIM (Structural similarity index) and Performance assessment
Images
Correlation coefficient. Table 1 describes the PSNR, MSE PSNR MSE SSIM
and SSIM values of the images for the proposed scheme. Pepper 31.0386 7.8731e-04 0.9797
Graphical representation of Correlation coefficient for
Aeroplane 33.2496 4.7320e-04 0.9754
original and compressed encrypted Pepper image is shown in
fig. 6.

Authorized licensed use limited to: National Institute of Technology. Downloaded on December 03,2021 at 17:52:38 UTC from IEEE Xplore. Restrictions apply.
Fig. 6. Correlation coefficient for original and compressed encrypted Pepper image.

[4] S. Salunke, M. Venkatadri, M. Farukh Hashmi, and B. Ahuja, “Novel


V. CONCLUSION beta function-based image encryption with fractional sine transform,”
Mater. Today Proc., 2021, doi: 10.1016/j.matpr.2021.05.278.
The suggested technique employs K means clustering [5] A. Ghaffari, “Image compression-encryption method based on two-
and the logistic chaotic map. The goal is to ensure security dimensional sparse recovery and chaotic system,” Sci. Rep., vol. 11,
while compressing an image data. The following are the no. 1, 2021, doi: 10.1038/s41598-020-79747-4.
advantages of the aforementioned combined effect: K means [6] A. Singh and K. G. Kirar, “Review of image compression
clustering is easier to implement, can scales huge set of data, techniques,” in International Conference on Recent Innovations in
efficiently reduces the size of an image to a level that the Signal Processing and Embedded Systems, RISE 2017, 2018, vol.
2018-January, doi: 10.1109/RISE.2017.8378148.
human visual system can sustain and the most importantly
guarantees convergence. With a larger key space, the [7] R. Rayan, M. S. Hossain, and Asaduzzaman, “Compression of Large-
Scale Image Dataset using Principal Component Analysis and K-
Logistic Chaotic Map offers a decent level of security with means Clustering,” in 2nd International Conference on Electrical,
adequate Peak Signal to Noise Ratio and shows the lowest Computer and Communication Engineering, ECCE 2019, 2019, doi:
level of Structural Similarity Index for encrypted image. 10.1109/ECACE.2019.8679270.
[8] Z. Sun and Y. Wun, “Multispectral image compression based on
fractal and K-Means clustering,” in 2009 1st International Conference
REFERENCES on Information Science and Engineering, ICISE 2009, 2009, doi:
[1] M. A. B. Farah, R. Guesmi, A. Kachouri, and M. Samet, “A novel 10.1109/ICISE.2009.772.
chaos based optical image encryption using fractional Fourier [9] X. Wan, “Application of K-means Algorithm in Image Compression,”
transform and DNA sequence operation,” Opt. Laser Technol., vol. in IOP Conference Series: Materials Science and Engineering, 2019,
121, 2020, doi: 10.1016/j.optlastec.2019.105777. vol. 563, no. 5, doi: 10.1088/1757-899X/563/5/052042.
[2] X. Chai, X. Fu, Z. Gan, Y. Lu, and Y. Chen, “A color image [10] S. Salunke, M. Venkatadri, M. F. Hashmi, and B. Ahuja, “Image Data
cryptosystem based on dynamic DNA encryption and chaos,” Signal Preservation with Fractional Sine Transform and Dual Chaotic
Processing, vol. 155, 2019, doi: 10.1016/j.sigpro.2018.09.029. Sequence,” in Advances in Intelligent Systems and Computing, 2021,
[3] Y. Dou and M. Li, “An Image Encryption Algorithm Based on vol.1299.
Compressive Sensing and M Sequence,” IEEE Access, 2020, doi:
10.1109/ACCESS.2020.3043240.

Authorized licensed use limited to: National Institute of Technology. Downloaded on December 03,2021 at 17:52:38 UTC from IEEE Xplore. Restrictions apply.

You might also like