Sie sind auf Seite 1von 11

Data Hiding using Image Stitching and Image

Steganography

Anshul Salgotra (101503040)


Computer Science and Engineering Department
Thapar Institute of Engineering and Technology (Patiala)
asalgotra_be15@thapar.edu

Abstract:
Security can be provided to any image by simply using image steganography and image stitching
which has to be sent or transferred via any electronic mode. The message which has to be sent
secretly is collaborated with the image in different phases. The first phase is the encryption
phase where the message which is to be sent is converted into cipher-text with the help of
Advance Encryption Standard algorithm. The second phase is the embedding phase in which the
image gets embedded with the cipher-text. Then the last phase is the hiding phase image
steganography is done on the image from the previous phase and the on the other parts where
bit manipulation is done using least significant bit replacement. This image is sent and on the
receiver end image decryption takes place. The parts obtained are attached together using k-
nearest method and then Scale Invariant Feature Transform is used to improve the image
quality.

Keywords:
Image stitching, Image steganography, Cryptography.

1. Introduction
In today’s world with the growing science and technology, security of data is one big issue. With
the increase in number of cybercrime only providing network security is not enough. With image
stitching and image steganography security can be provided for the data such as secret messages

Page 1 of 11
that can be used for army, blue prints etc. Because of the use of AES algorithm, the message is
embedded in the image in such a way that it is very difficult to find the message and in addition
to it the message is divided into parts and then sent to the receiver makes it more difficult to
interpret the message. All this steps make is very difficult to interpret the message and increase
the security level and there is no limit of the format of image. The images can be colored or grey-
scale. But the message size that is to be sent should not exceed 140 characters.

2. Literature Survey
In today’s world there has been a hike in the number of internet users increasing day by day.
Everything that one can think can be done with internet for example shopping on online stores
and the transactions done using information and card details and many other things can be done
online it is the perk of internet but everything has some cons every activity that is transmitted
through internet is under risk of any type of online crimes. With the growth in technology there
has been growth in online crimes also because the hackers keep on finding new ways to breach
through the security. Only providing network security is not enough for transmitting personal
information through internet.

One way of providing security from the hackers is hiding the information in such a way they do
not come to know about the presence of important information.

There are few methods developed for providing security such as visual cryptography and digital
watermarking. There are a few methods of hiding data in images such as frequency domain,
spatial domain and compressed domain [3]. In frequency domain images are converted into
frequency domain and then the data which is to be sent is embedded by modifying coefficients of
the frequency domain [2]. In spatial domain the pixels of the image are modified in order to
embed the data into it. This is a very simple technique and is easy to implement. It gives a large
hiding capacity and the quality of the image can also be controlled easily [2].

In compressed domain the data is to be transmitted over the network, it is in compressed form.
The information is embedded into the image by manipulating the compressed data.

In visual cryptography the encryption can be done without the help of computer manually by
mechanical operations. Cryptography helps in protecting the content and steganography protects

Page 2 of 11
content as well as communicating parties. The image is divided into n parts and the one holding
the access to all the n parts can decrypt the image. Any individual parts do not reveal the image.

There are two methods of for image alignment and image stitching one is direct and the other is
feature based [1]. In the direct method all the image data is used thus providing very accurate
results but there is a disadvantage that it requires close initialization. On the other-hand there is
no need for initialization in feature based method. But it lacks invariance properties needed for
reliable matching.

Image stitching was done using RANSAC parameters and linear blending. But its efficiency was
very less and to improve its efficiency many invariant features were used such as multi-blending,
gain compensation, etc. Thus double security can be provided by using the steganography and
image stitching.

3. Existing System
There are few methods available for data embedding and hiding with images, but all of them
have some cons such as they either use weak algorithm for cryptography or they do not encrypt
the data. One more major drawback is they use same key for encrypting and decrypting thus
reducing the level of security. In some methods the original image and the encrypted images are
so different that they can be distinguished from naked eyes. Let us take an example of an
encrypting algorithm named DES which uses 64-bit key making it very easy to understand and
then decode it. It would be better that larger size key is used for the purpose for better security.
For the stitching purposes there are a few techniques namely gain composition, multiband
blending which helps in making the image more realistic.

4. Proposed System
The system consists of few phases which consist of breaking of image into sub-images done
using inbuilt function of matlab named blkproc which can divide the image (w * h) into n sub-
images (x * y).

Page 3 of 11
4.1. Encrypting Phase

A method named AES algorithm is used for encrypting the data with the image. The following
steps are involved.

AES use key lengths of 128m192and 256 bits and a block size of 128 bits. First a random
number is selected in which the key and the data is to be stored, after this it goes through four
mathematical processes. The same key should be used for both encryption and decryption [4].
The process is depicted in the below image (figure 1).

Figure 1: AES Algorithm

The four rounds shown in figure 1 are explained below:

 Sub Bytes: In this round a lookup table is used to determine which byte is to be replaced
and basically the rearrangement of the bytes takes place.
 Shift Rows: Every row is cyclically shifted by an offset just leaving the left row
unchanged. In second row bytes are shifted by offset set to one towards left, in third row
by two and in forth row by three. This is applied to each and every key.

Page 4 of 11
 Mix Columns: The combining of bytes each column is done using an invertible linear
transformation. Basically the four bytes are input to the output.
 Add Round Key: Rijndael’s key schedule is used to derive a round key, which is then
added to each byte of the row. Each round key is combined with each corresponding row.

The above four rounds are repeated for the fifth round. The data is converted into cipher text.

Figure 2: Crypto Module

For crypto module (Figure 2) below steps are followed:

 Inserting the message for encryption


 Appling the AES algorithm.
 Generating cipher text.

4.2. Embedding Phase

Now the encrypted message is embedded with part of the secret image. The cipher text is
actually hidden in the cipher. The below figure 3 shows the above description diagrammatically.

Figure 3: The embedding phase

Page 5 of 11
Now for hiding the cipher into the image LSB steganography is used, in this each and every bit
value of cipher text is replaced with last bit of every pixel value of the image.

From the cipher text each value of the pixels last bit is exchanged to its binary equivalent. The
four possible replacements are as follows:

 ‘0’ is replaced with ‘0’.


 ‘0’ is replaced with ‘1’.
 ‘1’ is replaced with ‘0’.
 ‘1’ is replaced with ‘1’.

Only in two cases the last bit is changed this is the result that the resulting image is not changed
that much and the resulting image is very similar to the original image. This technique combined
with masking provides a better security. In masking the bits are replaced before it is ANDed with
254.

4.3 Hiding Phase

In the hiding phase image steganography is used. The method used is Kekre’s Median Codebook
Generation Algorithm (KNCG) which is explained below. In this method firstly the image is
divided into parts which are then converted into vectors of size k.

A matrix of size M*k is maintained where M is the number of vectors of dimension k. Each row
acts like a vector of dimension k which is used for training.

According to the very first column of the matrix the training vectors gets arranged and it is
considered as one single cluster. The median is selected from the matrix and put into the
codebook and then set to one after it. Then the matrix is divided into two parts of same size and
again it is adjusted according to the second column. The two clustered obtained are equal in size.
Then two medians are calculated and noted into the codebook. Again the parts are divided. The
parts are arranged according to the third column. The above process is executed again and again
till we get the codebook of the required size. Quick sort algorithm is used for the above because
of less execution time. The above mentioned process is shown in the below figure 4.

Page 6 of 11
Figure 4: The Hiding Phase

4.4 Stitching Phase

For the stitching phase a supervised machine learning algorithm is used which is K-Nearest
Neighbour (KNN) algorithm. This algorithm does not require assumptions about the parameters
hence it is also a non-parametric technique. The basic working of the algorithm involves finding
the minimum distance from query instance which determine k-nearest neighbours instance. Then
after finding all the neighbours then we predict from the majority of the neighbours the query
instance.

The algorithm for the stitching is as follows:

 n images are given as input.


 The features are extracted from the n images.
 For every feature k-nearest neighbours are found.
 For every image:
 Selecting images which have the most similar features.
 Using RANSAC in finding the features.
 A probabilistic model is used for verifying the matches.
Page 7 of 11
 Connected components are searched.
 For every component:
 Bundle adjustment is performed for solving focal length and rotation for cameras.
 Multi-band blending is done in order to render panorama.
 Panoramic images are the output of the above steps.

5. Result and Evaluation:

5.1. Result of Hiding

The following figure 5,6 and 7 shows the cover image, the message and result after applying
kmcg respectively. As it can be seen from the below figure that there is not much change in the
image given as input and what we got after applying kmcg.

Figure 5: Cover Image

Figure 6: Message

Figure 7: Image after applying kmcg

Page 8 of 11
The figure 8 shows the average Mean square error vs the hiding capacity of the codebook.

Figure 8 Graph plot of average MSE vs hiding capacity of various methods 1,2,3,4 and variable bits on KMCG

5.2. Result of Image Stitching

The demonstration of two images being stitched together using automatic panorama stitching
using SIFT features is illustrated below by taking an example in figure 9. The operation in
followed in the same exact way in which the below sample images are assembled.

(a) Image No.1 (b) Image No.2

(c) SIFT Matches No.1 (d) SIFT Matches No.2

Page 9 of 11
(e) RANSAC inliers No.1 (f) RANSAC inliers No.2

(g) Panoramic Image


Figure 9: The stitching process

After all the steps the final image that is the panoramic image is received which is basically
combination of both the images in such a way that it totally looks like a normal smooth image.

6. Conclusion
This paper has presented an efficient and effective way of data hiding into images using various
techniques namely AES algorithm, image stitching and image cryptography that can be used to
send data through internet safely and securely. This method can be proved highly secure method
for data transaction as it combines cryptography and image steganography. It is very difficult for
the intruder to interpret the data which is being send because the images are divided into parts
and then sent over the internet. More over every image that is sent is camouflaged and then sent
making it almost impossible for the intruder to interpret. Also used probabilistic model for
feature matching of the images. With the help of SIFT features and RANSAC algorithm it makes
easy to get a better and realistic looking image as output. Any document which is password
protected can be opened using this type of image.

Page 10 of 11
7. References
[1] Matthew Brown and David G. “Automatic Panoramic Image Stitching using invariant
features”, International Journal of Computer Vision, Vol 74, Issue 1, pp 53-73, August 2007.

[2] H.B. Kekre and Pallavi N. Halarnkar, “Performance Evaluation of Pixel value Differencing
and Kekre’s Modified Algorithm for Image Hiding”, ACM International Conference on
Advances in Computing, Communication and Control (ICAC3) 2009.

[3] H.B. Kekre, Archana Athawale and Pallavi N. Halarnkar, “Polynomial Transformation to
improve Capacity of Cover Image for Information Hiding in Multiple LSBs”, International
Journal of Engineering Research and Industrial Applications(IJERIA), Ascent Publications,
Volume 2, March 2009, Pune.

[4] K.S Dipti and Bajpai Neha, “Proposed System for data hiding using Cryptography and
Steganography”, International Journal of Computer Applications 8(9), September 2010.

Page 11 of 11

Das könnte Ihnen auch gefallen