Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the...

41
Video Steganography Using Clustering Algorithm GRADUATE PROJECT REPORT Submitted to the Faculty of the Department of Computing Sciences Texas A&M University-Corpus Christi Corpus Christi, Texas In Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science By Kusa Koushik Reddy Spring 2018 Committee Members Dr. Dulal Kar Committee Chairperson Dr.Ajay Katangur Committee Member

Transcript of Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the...

Page 1: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

Video Steganography Using ClusteringAlgorithm

GRADUATE PROJECT REPORT

Submitted to the Faculty ofthe Department of Computing SciencesTexas A&M University-Corpus Christi

Corpus Christi, Texas

In Partial Fulfillment of the Requirements for the Degree ofMaster of Science in Computer Science

By

Kusa Koushik ReddySpring 2018

Committee Members

Dr. Dulal KarCommittee Chairperson

Dr.Ajay KatangurCommittee Member

Page 2: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

ii

ABSTRACT

Steganography is a technique for embedding digital information inside another

digital medium such as text, images, audio or video , without revealing its presence

in the medium. In video steganography, a video file will be used as a cover medium

within which any secret message can be embedded. There are many techniques

available for the implementation of video steganography, one of the method is Integer

Wavelet Transform (IWT) based video steganography where frames are divided into

bands and message is encryped in one of them. In this work instead of converting

into different bands we use one of the unsupervised machine learning technique which

is k-means, to cluster the image into different clusters and encrypt the message in

one of the cluster. Finally the results are compared by calculating the Peak signal

to Noise Ratio (PSNR) values and Mean Square Error (MSE).

Page 3: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

iii

TABLE OF CONTENTS

CHAPTER Page

ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii

TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

1 BACKGROUND AND RATIONALE . . . . . . . . . . . . . . . . . . . . 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.1.1 General Classification of Cryptographic Algorithms . . 2

1.1.1.2 General Specification of Steganography . . . . . . . . . . 3

1.1.1.3 Spatial Domain Methods . . . . . . . . . . . . . . . . . . 5

1.1.1.4 Transform Domain Methods . . . . . . . . . . . . . . . . 6

1.2 Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3.1 Integer Wavelet Transform (IWT) . . . . . . . . . . . . . . . . 7

1.3.2 Clustering Approach . . . . . . . . . . . . . . . . . . . . . . . . 8

2 SYSTEM DESIGN AND ARCHITECTURE . . . . . . . . . . . . . . . . 9

2.1 Integer Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 SYSTEM IMPLEMENTATION . . . . . . . . . . . . . . . . . . . . . . . 15

3.1 Integer Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.1 Data Encryption in Integer Wavelet Transform . . . . . . . . . 16

3.1.2 Data Decryption in Integer Wavelet Transform . . . . . . . . . 17

3.2 Clustering Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2.1 Data Encryption in Clustering . . . . . . . . . . . . . . . . . . 21

3.2.2 Data Decryption in Clustering . . . . . . . . . . . . . . . . . . 22

3.3 Performance assessment metrics . . . . . . . . . . . . . . . . . . . . . 23

Page 4: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

iv

CHAPTER Page

4 TESTING AND EVALUATION . . . . . . . . . . . . . . . . . . . . . . 25

4.1 Sender side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.2 Receiver side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.3 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5 CONCLUSION AND FUTURE WORK . . . . . . . . . . . . . . . . . . . 31

REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Page 5: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

v

LIST OF TABLES

TABLE Page

1 Comparison between Clustering algorithm and IWT algorithm . . . . 29

2 Comparison between different videos using clustering algorithm. . . 30

Page 6: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

vi

LIST OF FIGURES

FIGURE Page

1 Basic steganography system . . . . . . . . . . . . . . . . . . . . . . . 2

2 Classification of steganography . . . . . . . . . . . . . . . . . . . . . 3

3 Wavelet transform of an image . . . . . . . . . . . . . . . . . . . . . 10

4 Applying k-means algorithm on an image . . . . . . . . . . . . . . . 12

5 Euclidean distance to cluster pixels [9] . . . . . . . . . . . . . . . . . 13

6 Overview of the wavelet transform system . . . . . . . . . . . . . . . 15

7 Data embedding process . . . . . . . . . . . . . . . . . . . . . . . . . 16

8 Data extraction process . . . . . . . . . . . . . . . . . . . . . . . . . 18

9 Overview of clustering algorithm . . . . . . . . . . . . . . . . . . . . 19

10 LSB algorithm to hide data . . . . . . . . . . . . . . . . . . . . . . . 20

11 Data embedding process in clustering . . . . . . . . . . . . . . . . . . 21

12 Data extraction process in clustering . . . . . . . . . . . . . . . . . . 23

13 UI of embedding phase . . . . . . . . . . . . . . . . . . . . . . . . . 25

14 UI of extracting phase . . . . . . . . . . . . . . . . . . . . . . . . . . 25

15 Message used to embed . . . . . . . . . . . . . . . . . . . . . . . . . 26

16 One frame in the cover media . . . . . . . . . . . . . . . . . . . . . . 26

17 Embedding using IWT algorithm . . . . . . . . . . . . . . . . . . . . 27

18 Embedding using clustering algorithm . . . . . . . . . . . . . . . . . 27

19 Extracting using IWT algorithm . . . . . . . . . . . . . . . . . . . . 28

Page 7: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

vii

FIGURE Page

20 Extracting using clustering algorithm . . . . . . . . . . . . . . . . . . 28

Page 8: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

1

CHAPTER 1

BACKGROUND AND RATIONALE

1.1 Introduction

Steganography is a process that involves hiding important information or

message inside other carrier data to protect the message from unauthorized users.

The mixed data also called as stego objects will be seen by the Human Visual System

(HVS) as one piece of data because the HVS will not be able to recognize the small

change that occurs in the cover data. Message and cover data can be any data

format such as text, audio, image, and video [5]. As shown in figure 1, the basic

steganographic system has different components like cover media, message and the

main component which is the algorithm. [6]. Any successful steganography system

should consider three main important factors: embedding capacity, imperceptibility,

and robustness against attacks [2].

First, the embedding payload is defined as the amount of secret information

that is going to be embedded inside the cover data. The algorithm has a high em-

bedding payload if it has a large capacity for the secret message[10]. The embedding

efficiency includes the stego visual quality, security, and robustness against attackers.

Second, both a low modification rate and good quality of the cover data lead to a

high embedding efficiency. The steganography algorithm that contains a high em-

bedding efficiency will reduce attacker suspicion of finding hidden data and will be

quite difficult to detect through steganalysis tools [5]. However, any distortion to the

cover data after the embedding process occurs will increase the attention of attackers

. The embedding efficiency is directly affected by the security of the steganographic

scheme. Increasing the capacity of the secret message will decrease the quality of

Page 9: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

2

stego videos that then weakens the embedding efficiency. Both factors should be

considered [2].

Figure 1.: Basic steganography system

1.1.1 Background

Cryptography and steganography [16] are well known and widely used tech-

niques that are basically used for manipulation of information in order to cipher or

hide their existence respectively Steganography is a method which allows people to

communicate and hide the existence of communication. Cryptography scrambles a

message so it cannot be understood, in other words, cryptography is a method of

transforming data so that only those for whom it is intended can read and process

it. Even though both methods provide security, a study is made to combine both

cryptography and steganography methods into one system for better confidentiality

and security.

1.1.1.1 General Classification of Cryptographic Algorithms

• Symmetric Key Cryptography : Both encryption and decryption process use

the same key.

Page 10: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

3

• Asymmetric key Cryptography: Uses one key for encryption and another for

decryption which are mathematically related.

• Hash Functions: Applies a mathematical function on information whose inverse

cannot be found easily [2].

1.1.1.2 General Specification of Steganography

• Hidden Data : The data that is to be embedded or the data that must remain

hidden from everyone other than intended receiver.

• Cover Media : The media in which the information is to be embedded. Cov-

er/carrier media can be an image file, or an audio file or it can be a video

file.

• Stego Media: Cover media containing the hidden information [14]

Figure 2.: Classification of steganography

Steganography is the science of invisible communication. This transfer of

information takes place by hiding data inside media. As shown in the figure 2,

various steganographic techniques can be categorized into four main components.

they are as follows [6]:

Page 11: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

4

• Image Steganography : We use an image file as a cover medium to hide the

secret message. A digital image is a combination of low and high frequency

contents. A low frequency region is strongly related with its neighboring pixels

whereas a high frequency region strongly deviates from its neighboring pixels.

By taking the advantage of human vision sensitivity the secret message is em-

bedded within the image pixels depending on different transform techniques to

hide the data in an image. Recently, a few machine learning techniques are

also being used to increase the robustness, embedding capacity etc [5].

• Audio Steganography : It is a technique used to transmit a hidden message

within an audio file. Embedding message in an audio file is much more difficult

than hiding message in an image file as the human auditory system HAS) is

more sensitive than human visual system (HVS). As the message is embedded

in audio signals, there are various methods used for embedding process in an

audio file like LSB coding, parity coding and echo data hiding [6].

• Text Steganography : It deals changing with format of an existing text within

a file, changing the words within the text or generating random character

sequences. Basically here we use the text file as a cover media to embed the

secret information. It is more vulnerable for attack as it can be easy for an

attacker to detect the pattern [14].

• Video Steganography : A video file is used as a cover medium to hide the

secret message. It is less prone for steganalysis as a video file is a combination

of text, image and audio. It is a collection of certain frames running at some

constant speed and is measured in frame per second. In order to embed a

secret message in a video file first, we have to extract the frames from it. In

Page 12: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

5

order to embed the message in video file first, Frame conversion is done. It

is a process of converting a video to consequent images or frames and then

each or one frame is used as carrier data to conceal the hidden information.

After the embedding process, all frames are merged together to produce the

stego video. Video steganographic techniques consist of spatial and transform

domain techniques [5, 6, 16] .

1.1.1.3 Spatial Domain Methods

There are many steganographic techniques that rely on the spatial domain

such as Least significant bit (LSB) substitution, Pixel Value Differencing (PVD),

Region of Interest (ROI), histogram manipulation, matrix encoding, and mapping

rule [10]. One of the basic method among them is hiding the data in a video file using

an LSB substitution method [3]. In this algorithm, data are stored in all the pixels of

a frame sequentially. Any hacker may retrieve the message without much difficulty

if he knows the frame number [8]. In PVD, two consecutive pixels are selected and

then these pixels are embedded with the data. Payload is calculated through the

difference between these two consecutive pixels and is treated as a base which helps

in determining whether two pixels belongs to an edge or smooth area. A technique

that combines PVD and LSB was proposed [13], in order to enhance the capacity

of PVD along with the quality of the technique. LSB technique is an efficient way

of data hiding but the loophole is that it is easily detectable by the intruder so to

resolve this problem PVD is combined.

Page 13: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

6

1.1.1.4 Transform Domain Methods

In the transform domain steganographic methods, each video frame is indi-

vidually transformed into frequency domain using discrete cosine transform (DCT),

discrete wavelet transform (DWT), and discrete fourier transform (DFT) and the

secret message is embedded utilizing the low, middle, or high frequencies of the

transformed coefficients. Many techniques were proposed in this domain to hide the

data in a frame. One among them is using the different wavelet transforms, where a

video frame is divided into four sub-bands, separating the odd and even coefficients.

The secret information is then embedded into the RGB coefficients. For accurate

extraction of embedded data, the length of hidden data is concealed into the coeffi-

cients [8]. These methods have high embedding capacity but these techniques have

less average video clarity after embedding the video [2, 13].

1.2 Rationale

As seen from the existing techniques, there are many embedding algorithms in

spatial and transform domain. The spatial domain techniques were lacking robust-

ness to attack but were having better PSNR values when compared with transform

techniques [2]. This spatial domain techniques had many different approaches to

embed like LSB or histogram but over time these techniques could not maintain the

security in stego-media. Transform domain techniques have greater security since

its hard to know the embedded pixels in the cover media. Since there are different

bands in these techniques, the embedding capacity is high [8]. But these techniques

have low PSNR value. So, we need a different algorithm in the spatial domain which

is difficult for the attacker and maintain high PSNR value. Use of clustering algo-

rithm can help in increasing the robustness to attacks as the embedded pixels will

Page 14: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

7

be scattered among the frame which makes it difficult for the attacker to decode.

The main objective of the project is to implement two algorithms for video

steganography, one is integer wavelet transform while the other is using a clustering

approach, and then compare their performances based on some standard criteria.

1.3 Approach

1.3.1 Integer Wavelet Transform (IWT)

Wavelets are set of non-linear basis. When resembling a function in terms

of wavelets, the wavelet basis functions are chosen according to the function being

approximated. Wavelets utilize a dynamic set of basis functions that represents the

input function proficiently. The secret data can be hidden in images using wavelets.

In many multimedia applications, the IWT maps an integer into another integer

data. Fortunately,a schema known as the lifting scheme can be modified easily to a

transform that maps integers to integers and it is reversible [11]. The lifting scheme

is a method for decomposing wavelet transforms into a set of elements. A simple

example of a lifting scheme is the Haar wavelet. Haar wavelet transforms the wavelets

by a process of dilation and shifting.

Haar wavelet operates on the input data by calculating the sums and dif-

ferences of adjacent elements. This wavelet operates first on adjacent horizontal

elements and then on adjacent vertical elements. An excellent feature of the Haar

wavelet transform is that the transform is equal to its inverse. The wavelet transform

is considered to be more robust for multi-resolution analysis that has been widely

used in most of the steganography applications. IWT splits the components into

numerous frequency bands called sub bands known as LL which means horizontally

and vertically low pass, LH which means horizontally low pass and vertically high

Page 15: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

8

pass, HL which means horizontally high pass and vertically low pass and HH which

means horizontally and vertically high pass. Hiding in LL sub-band is much more

sensitive to human visual system (HVS) [11]. Generally wavelet domain allows us

to hide data in regions that the HVS is less sensitive to, such as the high resolution

sub-bands, LH, HL and HH. Hiding data in these wavelet bands does not degrade

video quality and allow us to increase the robustness while maintaining good visual

quality [7][11].

1.3.2 Clustering Approach

In this method, we can choose a frame from the video to hide the data.This

frame can be used for clustering, where clustering is used to divide the set of data

into a specific number of groups. One of the clustering method known is k-means

clustering [4]. This k -means clustering algorithm is an unsupervised algorithm which

can be used to to divide the images into different disjoint clusters. k-means clustering

aims to partition pixels into k clusters in which each pixel belongs to their respective

cluster [16] [12].

The k-means algorithm consists of mainly two separate phases. In the first

phase it calculates the k centroid and in the second phase it takes each pixel to

the cluster which has nearest centroid from the respective data point. There are

different methods to define the distance of the nearest centroid and one of the most

used methods is Euclidean distance. Once the grouping is done, it recalculates the

new centroid of each cluster. Finally the frame is clustered into different groups,

then the message is embedded in one of the clusters. If the cluster is not big enough

to encrypt the message it moves to next frame for encryption. Finally the frame is

reformed and added back to video [4].

Page 16: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

9

CHAPTER 2

SYSTEM DESIGN AND ARCHITECTURE

Steganography techniques are categorized as spatial domain methods and

transform domain methods as stated in chapter one. A transform domain approach

is more secure whereas a spatial domain approach provides more payload embed-

ding. In spatial domain approach the simplest data hiding technique is the least

significant bit (LSB) substitution method [15] , in which the least significant bit of

the pixel value is replaced with the value of secret data value. In transform domain,

there are wide varieties of tools [11] such as Fourier Transform (FT), Discrete Cosine

Transform (DCT) and Discrete Wavelet Transform (DWT). Apart from these two

techniques, another category is also there, i.e., Adaptive steganography (AS). It can

be applied either in spatial domain or in frequency domain. It is a special case of

steganography techniques.

Generally embedding of data is performed directly on the data or performed

after decomposing the media or by transforming them. Although there are wide

varieties of data embedding techniques, these techniques are vulnerable to attacks,

it means there may be a threat to the security of data. To overcome this problem,

we can use machine learning techniques in data embedding.

In this work, the main idea is to use clustering approach for embedding the

message in the stego frames. Along with the clustering approach, a transform domain

approach is used to compare the results. For this, the Haar wavelet transform [8] is

used for embedding the message and the least significant bit substitution [9] is used.

Page 17: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

10

2.1 Integer Wavelet Transform

An integer to integer wavelet transform maps an integer data set into another

integer data set. This transform is perfectly invertible and yields exactly the original

data set back. A one dimensional discrete wavelet transform is a repeated filter bank

algorithm. The reconstruction involves a convolution with the syntheses filters and

the results of these convolutions are added. In two dimensions, we first apply one

step of the one dimensional transform to all rows. Then, we repeat the same for all

columns. This process continues as shown in figure 3. In the next step, we proceed

with the coefficients that result from a convolution in both directions.

Figure 3.: Wavelet transform of an image

Since the integer wavelet transform allows independent processing of the re-

sulting components without significant perceptible interaction between them, hence

it is expected to make the process of imperceptible embedding more effective. How-

ever, the used wavelet filters have floating point coefficients. Thus, when the input

data consist of sequences of integers (as in the case for images), the resulting filtered

Page 18: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

11

outputs no longer consist of integers, which doesn’t allow perfect reconstruction of

the original image. However, the introduction of wavelet transforms that map inte-

gers to integers help characterize the output completely with integers.

The transform can be computed for an image using equations 2.1, 2.2, 2.3, and

2.4 where ’A’ represents average component, ’V’ represents vertical component, ’D’

represents diagonal component and ’H’ represents horizontal component. Of course

the transform is reversible, i.e., we can exactly recover the original image pixels from

the computed transform coefficients.

Ai,j = [(I2i,2j + I2i+1,2j)/2] (2.1)

Hi,j = I2i,2j+1 − I2i,2j (2.2)

Vi,j = I2i+1,2j − I2i,2j (2.3)

Di,j = I2i+1,2j+1 − I2i,2j (2.4)

The inverse can be computed by using equations 2.5, 2.6, 2.7, and 2.8. The transform

results in four classes of coefficients: average component is the low pass coefficients,

horizontal component represent high pass coefficients of the image, vertical and di-

agonal component will reflect a combination of high pass and low pass information

respectively. During the transform we ignore any odd pixels on the borders.

I2i,2j = Ai,j − [Hi,j/2] (2.5)

I2i,2j+1 = Ai,j − [(Hi,j + 1)/2] (2.6)

I2i+1,2j = I2i,2j+1 − Vi,j −Hi,j (2.7)

I2i+1,2j+1 = I2i+1,2j −Di,j − Vi,j (2.8)

Page 19: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

12

This is one of the most common approaches used in hiding the messages in the

image. This method inserts the covert information directly into the cover file. The

problem with this APPROACH is that IT IS vulnerable to even slight manipulation

of the image.

2.2 Clustering

Clusters are the groups of similar objects (pixels).The objects are such that

they are similar to each other in a cluster and dissimilar with objects of other clusters.

The process of creating clusters is termed as clustering. Clusters can be created

according to color, size etc.

Figure 4.: Applying k-means algorithm on an image

Clusters are designed in such a way so as to always contain useful information.

Page 20: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

13

Clustering on image helps to get different sets of useful data. This approach is also

used in image steganography [1].

Subsequently, the frame in which the text message has to be hidden is chosen.

The pixels of the image are then clustered into groups based on the pixel values

(R,G,B). The k-means algorithm is used for clustering. K-means clustering aims to

partition observations (in this case, pixels) into k clusters in which each observation

belongs to the cluster with the nearest centroid. As shown in figure 4, first random

centroids are chosen, then the distances are calculated between the centroids and the

first pixel. Based on the values of the distances, the pixel is added to the centroid

with minimum distance value. Now the centroid is recalculated for the new cluster

and the process continues.

Figure 5.: Euclidean distance to cluster pixels [9]

For calculating the distance among pixels, there are many ways like euclidean,

correlation, chi-square distance etc. This project uses euclidean distance to compute

the values between every pixel and the centroids. From figure 5 in order to add pixel

to the centroids, the euclidean distance between centroids and pixel are calculated.

Based on the minimum values obtained, the pixel is added to the cluster and centroid

Page 21: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

14

is calculated again for this cluster [9].

The encrypted message is then embedded in one of the clusters. Clusters are

stacked back together according to the pixel position, thus ensuring the restoration

of the original picture.

Page 22: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

15

CHAPTER 3

SYSTEM IMPLEMENTATION

3.1 Integer Wavelet Transform

For data hiding, the coefficients obtained by one level integer wavelet decom-

position of the original cover-video are used. IWT coefficients are integer values that

come as a result of the transform.

Figure 6.: Overview of the wavelet transform system

Figure 6 illustrates the data embedding and extraction processes in the pro-

posed video steganography system. In this system, the secret data in binary form

are hidden in the LSB of the blue layer of RGB component of the cover-video se-

Page 23: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

16

quences. The use of this property of RGB components ensures the robustness of the

proposed algorithm. One dimensional (1D) Haar IWT is applied on RGB frames of

cover-video. The secret data are embedded in the LSB of blue components of the

frame in the video. The Inverse IWT (IIWT) is applied on the resulting video frames

to obtain the stego-video.

3.1.1 Data Encryption in Integer Wavelet Transform

Figure 7 shows the data embedding process to embed the text data.

Figure 7.: Data embedding process

• Step 1: Input the cover-video which is selected for the encryption process. The

video is then converted into frames. The number of frames obtained depends

on the video which is been selected for this process. For the implementation,

the frame number is being shared personally, so the sender and the receiver

have the frame number with them.

Page 24: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

17

• Step 2: The message which we are encrypting in the video is converted into

binary bits, after that the video frames are selected in which the message is to

be hidden. These frames are later converted into RGB components.

• Step 3: Obtain the wavelet coefficients of frames using 1D Haar IWT. Based on

the equation (2.4) mentioned in the earlier chapter, the frames are transformed

into coefficients and these coefficients are used to hide the data or message.

• Step 4: Read the text data bits to be embedded only in the blue frame of

the image because changes in this component will not effect the final output

stego-video.

• Step 5: Use the LSB substitution technique on the blue frame of the transform,

where in a blue frame only in diagonal component of the transform is used for

embedding in each video frame.

• Step 6: Finally all the coefficients after the embedding process is converted

back to the frame by IIWT transform where the similar equations (2.8)(2.7)

are used for this process.

• Step 7: Finally the stego frame is placed back in the video and stego video is

formed.

3.1.2 Data Decryption in Integer Wavelet Transform

Figure 8 shows the data extraction process.

• Step 1: Input the stego-video which is received for the decryption process. Then

this video is converted into frames. The number of frames obtained depends

on the video which is been selected for this process.

Page 25: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

18

Figure 8.: Data extraction process

• Step 2: The video frames are selected in which the message is hidden, these

stego-video frames are decomposed into RGB components.

• Step 3: Obtain the wavelet coefficients of frames using 1D Haar IWT. Based on

the equations the frames are transformed into coefficients and these coefficients

are used to extract the data or message.

• Step 4: Use the LSB substitution technique on blue components of each video

frame to identify the bits containing hidden data bits, and extract the secret

data bits from the coefficients.

• Step 5: Retrieve the data from all the frames and then convert the retrieved

data bits into a text message.

Page 26: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

19

3.2 Clustering Approach

After the frame is selected, the pixel values are loaded into a data-set. Each

pixel value, that is (R,G,B) tuple is stored in an array of tuples. k-means clustering

is performed on the pixels using the (R,G,B) values. The pixels are divided into k

clusters. Set of all the elements of the array, the (R,G,B) tuples, are used to find

the centroid of each of the k clusters. The centroids of the pixel set are found by

calculating the distance between every pixel pair and updating the centroid value.

After the formation of clusters, the text message is converted to binary bits

and this message is embedded in one of the cluster. For this purpose, Least Significant

Bit (LSB) method is used. Figure 9 shows the oveerview of clustering algorithm.

Figure 9.: Overview of clustering algorithm

This method reads the pixel values from the top to bottom and left to right.

Every pixel has a red, green and blue value (R,G,B). Sometimes, pixels have trans-

parency value as well, but is ignored in this method.

Page 27: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

20

Each of these values ranges from 0 to 255 that is, 8-bits are allotted for each

color value. LSB substitution method stores data by changing the last bit. Thus,

one bit information can be stored in 8 bits. Another set of 8 bits is required for

storing the next bit.

The text to be hidden, is separated character by character, and each characters

ASCII value is converted into binary representation. Thus, each character requires

8 bits as shown in figure 10.

To store 8-bit information, eight sets of 8-bits are required, as information

will be stored only in the last bit. Thus, three pixels are read, each having a set of

three 8-bits corresponding to R value, G value and B value. Therefore, a total of

9 sets of 8-bits is obtained. The last sets least significant bit is used for denoting

whether any more information is stored or not [15].

Figure 10.: LSB algorithm to hide data

Page 28: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

21

3.2.1 Data Encryption in Clustering

Figure 10 shows the data embedding process in clustering.

Figure 11.: Data embedding process in clustering

• Step 1: Input the cover-video which is selected for the encryption process. This

video is then converted into frames.The number of frames obtained depends on

the video which is been selected for this process.

• Step 2: The message which we are encrypting in the video is converted into

binary bits, after that the video frame is selected in which the message is to be

hidden. This frame is later used for clustering where k clusters are formed.

• Step 3: During clustering of the selected frame, first random initial points are

selected, then later based on the points added, the centroid is calculated and

Page 29: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

22

updated before the next pixel is checked. Finally k clusters are formed and

centroid points are noted.

• Step 4: Read the text data bits to be embedded and these text bits are embed-

ded in the largest cluster in the order which they were added to the cluster.

• Step 5: Use the LSB substitution technique on the cluster to embed the secret

data bits into the pixels of that cluster. In this step in one pixel three bits are

substituted, one in red, one in green , one in blue.

• Step 6: From the cluster the frame is reformed and added back to the video.

3.2.2 Data Decryption in Clustering

Figure 12 shows the data extraction process in clustering .

• Step 1: Input the stego-video which is selected for the encryption process. This

video is then converted into frames. The number of frames obtained depends

on the video which is been selected for this process and also remains the same,

since we are using only one video and making changes in pixels. Therefore,

the number of frames during the embedding process and extracting process

remains the same.

• Step 2: The video frame is selected in which the message is hidden. This frame

is later used for clustering where k clusters are formed. This is the same frame

number which is shared between the sender and the receiver.

• Step 3: During this step the frame in which the message is hidden is selected

and k means clustering is used. Finally after all the iterations, k clusters

Page 30: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

23

Figure 12.: Data extraction process in clustering

are formed and the cluster with largest size or the cluster with the maximum

number of points are selected.

• Step 4: The largest cluster is taken and we use the LSB substitution technique

to get the message from the cluster.

• Step 5: All the binary bits are collected and the final text message is formed.

3.3 Performance assessment metrics

The main purpose of steganography techniques is to conceal the secret in-

formation inside the cover video data, thus the quality of the cover data will be

changed ranging from a slight modification to a severe distortion. In order to eval-

uate whether the distortion level is acceptable or not, statistically, different metrics

Page 31: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

24

have been utilized. Pick Signal to Noise Ratio (PSNR) is a common metric utilized

to calculate the difference between the carrier and stego data. The PSNR can be

calculated as shown in equation 3.1

PSNR = 10 ∗ log10

(MAX2

c

MSE

)(3.1)

MSE =

∑mi=1

∑nj=1

∑hk=1[C(i, j, k) − S(i, j, k)]2

m ∗ n ∗ h(3.2)

’C’ and ’S’ represent the carrier and stego frames. Both ’m’ and ’n’ indicate

the frame resolutions, and ’h’ represents the RGB colors.’i’ and ’j’ , represent the

position of the pixel in the image. k represents which component k=1 for red, k=2

for green, and k=3 for blue. Since the values of red,green and blue can vary from

zero to 255, the value of ’MAX’ is 255.

Page 32: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

25

CHAPTER 4

TESTING AND EVALUATION

A basic user interface is developed so that the input and output folders can

be controlled, along with it the message and cover-media’s location can be provided.

Figure 13 and figure 14 show the user interface.

Figure 13.: UI of embedding phase

Figure 14.: UI of extracting phase

Page 33: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

26

4.1 Sender side

First the message is provided on the sender side. It is a 124 character message

which is being used for testing the algorithm as shown in Figure 15.

Figure 15.: Message used to embed

For testing, since our cover media is video, a video is chosen where the length

of the video is 30 seconds and since the message is small, the video quality of 360p

is chosen. Figure 16 shows a frame from the cover video.

Figure 16.: One frame in the cover media

Figure 17 and figure 18 shows the embedding phase where the video and the

output folder are selected and the message is provided.

Page 34: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

27

Figure 17.: Embedding using IWT algorithm

Figure 18.: Embedding using clustering algorithm

4.2 Receiver side

The stego-video created on the sender side is used to extract the message. In

the UI as shown in Figure 20, the stego video path is given for extraction.

Page 35: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

28

Figure 19.: Extracting using IWT algorithm

Figure 20.: Extracting using clustering algorithm

4.3 Comparison

Different lengths of messages were chosen and same cover-media is used for all

messages which is a video with the resolution 360 X 640 pixels to calculate the MSE

and the PSNR values. These values are shown in table 1. From this table we can

see that the mean square error for the IWT algorithm is high when compared with

the clustering algorithm. This is because when we are changing one bit from the

Page 36: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

29

transformed bands of IWT algorithm, its effecting two pixels in the original image.

So, that is why the error is more for IWT. Also we can see that as the number of

characters increases, PSNR value is almost the same in these frame. This is because

the maximum number of bits were replaced in one frame and moved to next frame.

The table 1 shows the worst PSNR value among all the embedded frames for one

message. so, when compared these values are almost same for different message

lengths.

Table 1.: Comparison between Clustering algorithm and IWT algorithm

Number of Characters in Message Integer wavelet transform algorithm Clustering algorithm

65MSE=3474.29 MSE=140.29

PSNR=12.722 PSNR=26.6

115MSE=6042.34 MSE=174.29

PSNR=10.31 PSNR=25.71

208MSE=7751.2 MSE=216.29

PSNR=9.2 PSNR=24.78

491MSE=9157.22 MSE= 310.34

PSNR=8.51 PSNR=23.21

1025MSE=8915.23 MSE=296.3

PSNR=8.6 PSNR=23.41

2045MSE= 9076 MSE=326.23

PSNR= 8.55 PSNR=22.99

Page 37: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

30

Table 2 shows the comparison between two video resolutions which are used

for cover media. From table 2 we can see that higher resolution video had more

PSNR value which is obvious because number of pixels in the image was high.

Table 2.: Comparison between different videos using clustering algorithm.

Number of Characters in Message 360 x 640 720 x 1280

540MSE=206.39 MSE=179.08

PSNR=24.9 PSNR=25.6

1104MSE=280.32 MSE=173.08

PSNR=23.6 PSNR=25.7

2009MSE=316.23 MSE=164.08

PSNR=23.12 PSNR=25.98

Page 38: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

31

CHAPTER 5

CONCLUSION AND FUTURE WORK

Video steganography allows two individuals to communicate privately. The

proposed technique can be used to securely send sensitive information without wor-

rying about man-in-the-middle attack. Use of clustering technique in steganography

provides greater security as it is harder for the attacker to find the pixels which

are encrypted. Moreover, the encrypted pixels are hidden in the clusters which di-

minishes the probability of the message being found. When compared with IWT

algorithm the clustering algorithm has greater PSNR value for the same message

and cover-media.

In the future, this work can be extended by using more complex stegano-

graphic and encryption techniques. Even before embedding the message in the

frame, encryption can be performed using AES. This work can be further enhanced

by changing the parameters in clustering so that the noise is minimized. In future

work the frame number can also hidden some where in the video, so that sharing

this information is also not required.

Page 39: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

32

REFERENCES

[1] Chen, H., and Liu, C. Research and application of cluster analysis algo-

rithm. In Proceedings of 2013 2nd International Conference on Measurement,

Information and Control (Aug 2013), vol. 01, pp. 575–579.

[2] Eman Abdelfattah, R. J. M., and Elleithy, K. M. Video steganography

techniques: Taxonomy, challenges, and future directions. Systems, Applications

and Technology Conference (LISAT), 2017 IEEE Long Island (May 2017).

[3] Gupta, H., and Chaturvedi, D. S. Video data hiding through lsb substi-

tution technique. International Journal Of Engineering And Science 2 (April

2013), 32–39.

[4] Jangid, S., and Sharma, S. High psnr based video steganography by

mlc(multi-level clustering) algorithm. 589–594.

[5] Johri, P., Mishra, A., Das, S., and Kumar, A. Survey on steganography

methods (text, image, audio, video, protocol and network steganography). In

2016 3rd International Conference on Computing for Sustainable Global Devel-

opment (INDIACom) (March 2016), pp. 2906–2909.

[6] Joseph, P., and Vishnukumar, S. A study on steganographic techniques. In

2015 Global Conference on Communication Technologies (GCCT) (April 2015),

pp. 206–210.

[7] Lakshmi Narayanan K., P. G., and R, B. A high capacity video steganog-

raphy based on integer wavelet transform. Journal of Computer Applications 5

(February 2016), 358–365.

Page 40: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

33

[8] M.Mary Shanthi Rani, G. M., and Euphrasia, K. Video- steganography

based on integer haar wavelet transforms for secured data transfer. Advances in

Intelligent systems and Computing, Springer series 412 , 403–412.

[9] Pillai, B., Mounika, M., Rao, P. J., and Sriram, P. Image steganog-

raphy method using k-means clustering and encryption techniques. In 2016

International Conference on Advances in Computing, Communications and In-

formatics (ICACCI) (Sept 2016), pp. 1206–1211.

[10] Prashant Johri, A. M., and Das, S. Survey on steganography methods.

Computing for Sustainable Global Development (INDIACom) (February 2016).

[11] Ramalingam, M., and Isa, N. A. M. Video- steganography based on integer

haar wavelet transforms for secured data transfer. Indian Journal of Science and

Technology 7 (July 2014), 897 904.

[12] Sethy, P. K., Pradhan, K., and Behera, S. K. A security enhanced ap-

proach for video steganography using k-means clustering and direct mapping. In

2016 International Conference on Automatic Control and Dynamic Optimiza-

tion Techniques (ICACDOT) (Sept 2016), pp. 618–622.

[13] Sharma, N., and Batra, D. U. A review on spatial domain technique based

on image steganography. : Computing and Communication Technologies for

Smart Nation (IC3TSN) (2017).

[14] Sharma, S., Gupta, A., Trivedi, M. C., and Yadav, V. K. Analysis of

different text steganography techniques: A survey. In 2016 Second International

Conference on Computational Intelligence Communication Technology (CICT)

(Feb 2016), pp. 130–133.

Page 41: Video Steganography Using Clustering Algorithmsci.tamucc.edu/~cams/projects/531.pdfavailable for the implementation of video steganography, one of the method is Integer Wavelet Transform

34

[15] Smitha, G. L., and Baburaj, E. A survey on image steganography based

on block-based edge adaptive based on least significant bit matched revisited

(lsbmr) algorithm. In 2016 International Conference on Control, Instrumenta-

tion, Communication and Computational Technologies (ICCICCT) (Dec 2016),

pp. 132–139.

[16] Zaheer, R., Gaur, R. S., and Dixit, V. A literature survey on various

approaches of data hiding in images. In 2017 International Conference on In-

novations in Information, Embedded and Communication Systems (ICIIECS)

(March 2017), pp. 1–5.