Вы находитесь на странице: 1из 9

International Journal of Advance Research In Science And Engineering http://www.ijarse.

com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

DIGITAL WATERMARKING OF TEXT/IMAGE USING LEAST


SIGNIFICANT BIT ALGORITHM
Shahnawaz Uddin
University Women’s Polytechnic, Aligarh Muslim University, Aligarh 202002, U.P., India

ABSTRACT
The digital information is stored in a digital form or transmitted from one place to another through an electronic
media. This digital information may fall in the hands of sniffers who may use or misuse that information for their
intended use. Therefore, it is necessary to hide/embed very critical/important digital information (digital
media)covertly in acover digital data(image/audio/video) known as watermarked digital mediabefore its storage or
transmission without distorting the cover data. The digital information may be in the form of an image, a text file,
and an executable program.To verify the authenticity or ownership, the digital watermarks may also be embedded in
the copyrighted digital information. This research work discusses the basic idea of steganography and implements
Least Significant Bit (LSB) algorithm in MATLAB to hide text as well as an image in a cover image by the means of
digital watermarking.

Keywords: Digital Watermarking, Steganography, LSB Algorithm, Hide Information, Embedding


Information.

I. INTRODUCTION
Derived from Greek, the term “steganography” hasa literal meaning “covered writing”and includes various methods
for secret storage/communicationto hide the existence of secret information.Therefore, steganography is defined as
an art of hiding secretinformation that avoids the detection ofsecret information. Like the privacy of any kind of
secret information, the privacy of digital media (i.e., digital text/image/audio/video) is also very important because
of presence of hackers all over the world through internet. Digital watermarking, a technique of steganography, is
defined as the method of embedding a secret digital information into another digital signal. The main cause of the
appearance (first appeared in 1990‟s) of the digital watermarking are the invention and fast development of the
Internet, which is rapidly developing the excellent medium for trade [1-2]. The use of visible watermarksis as old as
paper manufacturing but incase of digital images, the embedded message data/information can be kept either hidden
or visible to the user using visible or invisible watermarking technique.The visual pattern just like logo/monogram
embedded into images/videovisible clearly to the viewer may be classified as visible watermark. The visible
watermarking technique changes the original cover data by overlaying the message data on top of it. The visible
watermark embedding algorithms are very simple to implement but the watermarked data can‟t withstand the data
processing attacks [3]. In late 1990s, there was an explosion of interest in digital systems for watermarking of
various contents. Interest in watermarking increased significantly after the terrorist attack on World Trade Center
(USA) on 11th September 2001, when it became clear that means for hiding the information bearing signals were
used for criminal activities [4].In recent years,the distribution of works of art, including pictures, music, video and
textual documents has become easier and digital forms of these media (text, images, audio, & video, etc.) are more
176 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

easilyaccessible/profitable since it is easier to market or sell one's works of art. However, this property of easy
access threatens copyright protection. To avoid interception by the attackers in the process of secret data
transmission, the secret information should be encrypted using various methods of data protection or information
hiding, but these techniques may modify the content of the host media and that is not be accepted in some
applications [5].
From the previous discussion, it is clear that digital documents are easy to copy and distribute which allowspiracy.
There are a number of methods for protecting one‟s copyright and ownership. One of these is known as digital
watermarking. Watermarks of varying degrees of obtrusiveness are added to presentation media as a guarantee of
authenticity, quality, ownership, and source. The embedded digital watermark also help us to identify the owner of
the digital media if some eavesdropper tries to claim the digital media. Thus, digital watermarking plays important
role in terms of authenticity and confidentiality, and we can easily detect tamper detection. Watermarking is a
pattern of bits inserted into a digital image, audio or video file that specifies the file's copyright information such
author rights and so on. The digital watermarking techniques embed the bits of message information in such a way
that they are completely invisible. The problem with the traditional way of printing logos/monograms is that they
may be easily duplicated/tampered. The message bits representing the watermark must be scattered throughout the
cover data in such a way that they can‟t be identified and tampered. Thus, the technique of watermarking should
show robustness in such a way that it can withstand normal changes to the files such as corrupted by noiseand show
resilience against attempts to remove the embedded/hidden message data[6-10].
In the present research work, the Least Significant Bit (LSB) algorithm has been implemented in
MATLABprogramming language which has been usedto embed/hidethe digital watermarks (text/image in the form
of a signature)in the cover image to verify the authenticity or ownership of copyrighted digital information.

II. HIDING/EMBEDDING DIGITAL DATA IN A DIGITAL IMAGE


In general, there are three main processes of watermarking: (i) insertion of watermark, (ii) detection of watermark,
and (iii) extraction of watermark (if required). As shown in block diagram of figure (1), the process of
hiding/embedding digitalinformation into an image requires two input files. The first one is the innocent looking
image (called the cover image)used to hold themessage information. The second file is the messageinformation to be
hidden in the cover image. A message information may be a plain text, a ciphertext, an image, or anything that can
be embedded into the bit stream of cover image. The combination of the cover image and the embedded message
makes a watermarked/stegoimage. The experts of steganography recommend the images having 256 levels of
greysince the grey shades change gradually from pixel to pixel, and slight change between the palette entries, the
better quality of the watermarked image. Therefore, the images other than grey image having large region of solid
colours is not a proper choice because modification in the cover image due to the message embedding will be
noticeable in the solid areas. After finalizing the cover image, the technique/algorithm to embed/hide the
information is decided [11-12].At the receiver end, a watermark detection and extractionis performed using the
decoding program as shown in figure (1). Here, we first locate the watermark and extract the message information
from the watermarked image which is compared with the original message information to find any deviation from it.
177 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

To take into an account, theparameters like MSE (mean squared error) and PSNR (peak signal to noise ratio) are
calculated to find out the deviation of the watermarked images from the original cover image. Other than these, there
are some other important and desirable parameters to be present in the digital watermarking process as described
below [13].
(i) Perceptually Transparent: The watermarked data should not be much affected by the digital
watermarking, i.e., the watermark (message data) in the cover data should beundetectable as it increases
security.
(ii) Robustness: The message data should not get affected by theintentional or unintentional/normal distortion
introducedin the watermarked data, or trying deliberately to disable or extract the watermark present.
(iii) Security:The advance digital watermarking should incorporate the security measures such that a third
person can‟t modify the watermark even if having the knowledge of the algorithm used for watermarking.
(iv) Unambiguous:The identity of the owner should be known unambiguously after extracting the watermark.
(v) Detection of Watermark:Detection of watermark to some extent should be done easily even if the
watermarked data is distorted/damaged due to any reason.
(vi) Payload of Watermark: The amount of message data to be hidden/embedded in the cover image should not
affect the quality of the watermarked image, i.e.,there should not be much trade-off between how much
information a watermarked image contains without being visible.

III. LEAST SIGNIFICANT BIT (LSB) ALGORITHM


As the security against piracy of any information of digital nature is minimal, therefore some way must be devised
to protect the rights of the owners of digital data. The procedure of hiding should be such that the modification of
the cover media are unperceivable, thus, the pixel value modification in case of images should to be invisible. If the
watermark is invisible, then a fraud person will not be able to extract the watermark as in case of visible
watermarking. Thus, the invisible watermarking is more robust to the data processing attacks when compared to
visible watermarking. Furthermore, depending on the application, the watermarked digital data may be either fragile
or robust. A digital watermark must also be easily recoverable from the watermarked data for the purpose of
copyright checking but unalterable by the intentional (like a fraud) or unintentional (such as data compression)
manipulations.

178 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

The least significant bit (LSB) algorithm is the first digital watermarkingalgorithm of steganography. The main
focus of this algorithm is on hiding the message information on the least significant bit of the Bitmap/GIF cover
images. Later on the subsequent efforts have done toincorporate the most common JPEGformatof the cover image.
The cover image pixels represented in the spatial domain, the hiding/embedding process inserts message into cover
image pixels. As the quality of the cover image does not deviate much, the LSB algorithm can be used in any
application. First of all, the encoder LSB methodselects a subset of pixel of cover image on which the message
text/image has to be embedded and then embeds the message information on the LSBs of the pixels from this
subset.As shown in figure (2),the pixel values of selected subset of cover image and ASCII character values of
message text or pixel values of message image are converted into 8-bits binary values. Then, the LSB of every pixel
the cover image is substituted with the binary bits of message text/image in a sequence. In this fashion, to hide every
character of message text or pixel of message image, we require 8-pixels of cover image means that the size of cover
image must be at least 8-times larger than the size of message text/image. The output image of the LSB substitution
process performed results into the watermarked image that is almost similar to the cover image. In order to
extractthe message text/image, we retrieve back the LSBs of every pixel of watermarked image and convert every
group of 8-bits into an ASCII character of message text or pixel of message image[14-18].

IV. IMPLEMENTATION OF LSB ALGORITHM


The algorithm for implementation of LSB at the transmitter and the receiver end is as given below.

179 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

180 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

V. RESULTS & DISCUSSION


In this research work, a gray image (lenna.bmp) of size 512 x 512 has been used as a cover image.The experimental
outcomes by applying the LSB algorithm on the message text and message image have been discussed separately as
given below:
5.1 Results for Message Text Hidden in Cover Image
After reading a grey cover image (“lenna.bmp”), it has been displayed in figure (3a). The message text to be
hidden/embedded is entered by the user as displayed in figure (3b).In this MatLab command window, the user enters
any text message as input to be hidden in the cover image. After applying the LSB substitution algorithm and the
constituent MatLab program, the digital watermarked image is displayed in figure (3c) which appears like the
original cover image.And afterextracting the message text from the watermarked image as shown in figure (3d), it is
same as the message text at the time of digital watermarking.

5.2 Results for Message Image Hidden in Cover Image

After the message text hiding and extracting it as discussed in section (5.1), same algorithm (i.e. LSB algorithm) is
applied for message image hiding/embedding. Again same grey image (“lenna.jpg”) is read as a cover image which
has been displayed in figure (4a). Themessage gray image (“baboon.bmp”) to be hidden/embedded is entered by the
user as displayed in figure (4b). In this MatLab command window, the user enters the path of message image as
input to be hidden in the cover image. After applying the LSB algorithm and the constituent MatLab program, the
watermarked image is displayed in figure (4c) which appears like the original cover image.And afterextracting the
messageimage from the watermarked image as shown in figure (4d), it is same as the message image at the time of
digital watermarking used at the sender‟s end.

181 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

Th
e objective quality of the watermarked image can be measured with the help of (i) MSE (Mean Square Error) and
(ii) PSNR (Peak Signal to Noise Ratio). TheMSE represents themean squared error between the watermarked image
and the original cover image,whereas PSNR represents a measure of the peak signal to error ratio. The value of MSE
is calculated by using thefollowing equation (1):

(1)

where M & N are the number of rows and columns in the watermarked image and Ic& Iw represent the intensity
levels of pixels of the original cover and watermarked images respectively. The PSNR is calculated as per the
equation (2) given below:

(2)

where Icmax represents maximum intensity level of the pixels in the watermarked image and its value is 255 for 8-bit
grey images [19].

182 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

The calculated values of MSE & PSNR for both the message text as well as message image have been listed in table
(3).
As observed from the outcomes of the sections (5.1-5.2), the results using LSB substitution closely match with the
expected one and there is no visible difference between the digital watermarked image and the original cover image.
The objective good quality of the watermarked image is observed by the lower value of MSE and higher value of
PSNR.
Here, it must be noted that the total number of characters/pixels in a message text/image must be≤ 1/8 of the number
of pixels in the cover image (i.e., if the cover image is of 512x512 size then message text/image must be of ≤ 64x64
size).

VI. CONCLUSION
In this research work, LSB algorithm implemented by using programming language of MatLab has been applied on
a digital message text/image &a digital cover image to get watermarked image.This algorithm has been used for its
simplicity and negligible change in the quality of the watermarked image compared to the original cover image after
embedding or hiding the message text/image in it.Thus, by just looking at the watermarked image, none can suspect
of the presence of secret message information because people look at the watermarked image and never suspect
something is hidden in it.
This method of digital watermarking also shows the importance of digital media security, i.e., the digital information
hidden in the watermarked image can be (i) protected from unauthorized use and claims (ii) used to show
authenticity/ownership/source. Therefore, the copyrights can be embedded into an image to protect the rights of its
owner without altering the appearance of the image. Furthermore, digital watermarking plays important role in terms
of authenticity and confidentiality, and we can easily detect tamper detection.
As discussed in results and discussion section, the total number of characters/pixels in a message text/image must be
≤ 1/8 of the number of pixels in the cover image. However, the restriction on the size of the message text/image can
be improved if two or more LSBs of cover image are substituted by the binary bits of the message text/image to
hide/embed (e.g., for substituting two LSBs of the cover image, the message text/image must have≤ 1/4 of the
number of pixels in the cover image)but on the expense of little degradation of the quality of the watermarked
image, i.e., higher value of MSE & lower value of PSNR.

REFERENCES
[1] Neil F. Johnson and Sushil Jajodia, “Exploring Steganography: Seeing the Unseen", Computer, February 1998,
0018-9162/98, pp. 26-34.
[2] Dwayne Phillips, “Image Processing using C”, 2nd Edition (2000), R & D Publications, ISBN 0-13-104548-2
[3] Mohannad Ahmad AbdulAziz Al-Dharrab,” Benchmarking Framework for Software Watermarking” King Fahd
University of Petroleum and Minerals, Dhahran, Saudi Arabia, June 2005.

183 | P a g e
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No. 02, February 2013 ISSN-2319-8354(E)

[4] M. M. Latha, G. K. Pillai, and K. A. Sheela, “Watermarking based content Security and Multimedia Indexing in
digital Libraries”, International Conference on Semantic Web and digital Libraries (ICSD), ARD Prasad & D.
P. Madalli (Eds.), 2007
[5] H. Frank H. and M. Kutter (1999): “Multimedia Watermarking Techniques”, Proceedings on IEEE, 87(7), pp.
1079-1107.
[6] N. K. Mandhani, “Watermarking Using Decimal Sequences”, LSU Master‟s Thesis (2004), The Louisiana State
University, Baton Rouge, Louisiana, USA
[7] K. Gulati (2003), Information Hiding Using Fractal Encoding. Thesis for master degree, Mumbai, India.
[8] S. Katzenberg and F. A. P. Petitcolas, “Information Hiding Techniques for Steganography and Digital
Watermarking”, Artech House Publishers.
[9] J. Nagra, C. Thomborson, and C. Collberg, “A functional Taxonomy for Software Watermarking”, Proc. 25th
Australian Computer Science Conference 2002, ACS, pp. 177-186.
[10] G. Bhatnagar and B. Raman, “A New Robust Reference Watermarking Scheme based on DWT-SVD”,
Computer Standards Interface, Elsevier, Vol. 31, No. 5, pp. 1002-1013, Sept 2009
[11] B. Pfitzmann, “Information Hiding Terminology,” Proc. First Int‟l Workshop Information Hiding, Lecture
Notes in Computer Science No. 1,174, Springer-Verlag, Berlin, 1996, pp. 347-356.
[12] T. Aura, “Invisible Communication”, EET 1995, Technical Report, Helsinki Univ. of Technology, Finland,
Nov. 1995.
[13] C. T. Li and F.M. Yang., “One Dimensional Neighbourhood Forming Strategy for Fragile Watermarking”,
International Journal of Electronic Imaging , vol. 12, no. 2, pp. 284-291, 2003.
[14] Cox I, Miller M, Bloom J, Fridrich J, Kalker T (2008): Digital Watermarking and Steganography Second
Edition. Elsevier, 2008.
[15] Wang, R. Z., Lin, C. F., Lin, J. C. (2003): „‟Image hiding by optimal LSB substitution and genetic algorithm‟‟,
Pattern Recognition, 34: 671- 683.
[16] M. Kobayashi and Tewfix, “Digital watermarking: Historical Roots,” IBM Research, Tokyo Res. Lab., Tech.
Rep., Apr. 1998.
[17] Chunlin Song, Sud Sudirman, and Madjid Merabti, “Recent Advances and Classification of Watermarking
Techniques in Digital Images” International Journal of Advanced Science and Technology, 2009, ISBN: 978-1-
902560-22-9
[18] Rafael C. Gonzalez and Richard E. Woods, “Digital Image Processing using MatLab”, 2nd edition
(2009),Gatesmark Publishing, ISBN-10: 0982085400, ISBN-13: 978-0982085400
[19] Puneet Kumar Sharma and Rajni, “Analysis of Image Watermarking using LeastSignificant Bit Algorithm”,
International Journal of Information Sciences and Techniques (IJIST) Vol.2, No.4, July 2012

184 | P a g e

Вам также может понравиться