Watermark Project
Watermark Project
العلم
ي العال والبحث
ي وزارة التعليم
إ رشاف
قدم هذا ال ر
مشوع استكماال لنيل درجة البكالوريوس
اس ()2018-2019
للعام الدر ي
April 2019
بسم هللا الرحمن الرحيم
((اقرأ بأسم ربك الذي خلق ( )1خلق االنسان من علق( )2اقرأ وربك ال كرم( )3الذي علم
سورة العلق بالقلم ()4علم االنسان مالم يعلم()) )5
العل العظيم
صدق هللا ي
إهــــــــــــــــداء
امي وابي
البد لنا ونحن نخطوا خطواتنا األخيرة في الحياة الجامعية من وقفة نعود إلى أعوام قضيناها في
رحاب الجامعة مع أساتذتنا الكرام الذين قدموا لنا الكثير باذلين بذلك جهودا كبيرة في بناء جيل
الغد لتبعث األمة من جديد ...
وقبل أن نمضي تقدم أسمى آيات الشكر واالمتنان والتقدير والمحبة إلى الذين حملوا أقدس رسالة
في الحياة ...
"كن عالما ..فإن لم تستطع فكن متعلما ،فإن لم تستطع فأحب العلماء ،فإن لم تستطع فال
تبغضهم"
وكذلك نشكر كل من ساعد على إتمام هذا المشروع وقدم لنا العون ومد لنا يد المساعدة وزودنا
بالمعلومات الالزمة إلتمام هذا المشروع ونخص بالذكر
الذين كانوا عونا لنا في بحثنا هذا ونورا يضيء الظلمة التي كانت تقف أحيانا في طريقنا.
إلى من زرعوا التفاؤل في دربنا وقدموا لنا المساعدات والتسهيالت واألفكار والمعلومات ،ربما
دون يشعروا بدورهم بذلك فلهم منا كل الشكر
الشكر الجزيل لجميع اساتذة وتدريسي كلية علوم الحاسوب وتكنولوجيا المعلومات .
CHAPTER ONE
Introduction To Watermark
1.1 INTRODUCTION
Since the Internet has become very popular, and people can share
whatever they want to share such as images, videos, documents, etc.,
there has been a need to protect publishing copyright. In addition, there
has been also a significant demand for information security. For these
Chapter One Introduction To Watermark 2
reasons and other reasons, digital image watermarking has become very
popular recent years as a good solution for these cases. Many researches
have gone through this field to create new techniques, and to enhance
current techniques as proper solutions for previous problems. Digital
image watermarking techniques stand on embedding a host image with
information which is called watermark, then the watermarked image will
be transmitted, and can be extracted at the receiver. There are two kinds
of detection types at the receiver. The first type is called blind
watermarking, because the detector doesn’t need the original cover image
to detect the watermark. The second type is called non-blind and it needs
the original cover image to extract the watermark [1].
The basic model of digital image watermarking consists of two parts; the
first part is the watermark embedding process which shown in Figure (1),
and the second part is the watermark detection process which shown in
Figure(2)
Watermark
Watermark Watermarked
Cover image
Embedding Data
Algorithm
Secret Key
Secret Key
A. Robustness:
The robustness is the ability of detecting the watermark after some signal
processing modification such as spatial filtering, scanning and printing,
lossy compression, translation, scaling, and rotation , and other
Chapter One Introduction To Watermark 4
B. Imperceptibility:
Imperceptibility (also known as Invisibility and Fidelity) is the most
significant requirement in watermarking system, and it refers to the
perceptual similarity between the original image before watermarking
process and the watermarked image [2].
C. Capacity:
D. Security:
E. Low Complexity:
A. Copyright Protection:
B. Content Authentication:
C. Broadcast Monitoring:
D. Owner Identification:
E. Fingerprinting:
F. Copy Control:
G. Medical Applications:
achieve them together. However, this paper highlights the attacks that
affect the robustness directly, it highlights some common attacks such as
JPEG compression attack, Noise, and Geometric attacks. First, JPEG is a
standard compression technique, and it reduces the size of images for the
goals of storage and transmission. As the compression rate increases, the
quality of the image decreases. Second, Noise attacks are the data that are
not part of the original image which caused by other sources. There are
many types of noise such as Gaussian noise, and blurring noise . Lastly,
Geometric attack is a set of parameters that can be applied on the image.
There are many types of geometric attacks such as rotation, cropping, and
other transformations .
embed information into a host image. The idea behind LSB is very
simple; the host image pixels are changed by no of bits of the secret
Chapter One Introduction To Watermark 8
message. Despite of the number was embedded into the first 8 bytes of
the grid, the 1 to 4 least bits needed to be modified according to the
embedded secret message. On the average, only half of the bits in an
image will need to be changed to hide a secret message using a host
image. Because the quality of the Watermarked image is low, less than
over the 4 least significant bits, changing the LSB of a pixel results in
small changes in the intensity of the colors.
C. Patchwork[4]
Wavelet Transform has been used widely since it has been adopted in the
established image coding standard and it produce considerably better
quality for decoded image than JPEG. The main advantage that DWT has
over Fourie r transforms is temporal resolution. It captures both location
and frequency information .The basic idea of DWT is to separate
frequency detail, which is multi-resolution decomposition. One
time of decomposition can divide the image to four sub image.
CHAPTER TWO
Therefore, this does not affect the original image perceptibility. Hence it
is a very popular technique. However, it is extremely vulnerable to attacks.
Any image manipulations such as cropping, intensity changes for any
enhancements such as contrast stretching, histogram equalization, addition
of noise etc.. will destroy the embedded message.
The techniques other than LSB technique are complicated, although they
are robust to most attacks. LSB technique can therefore be used wherever
we want to store confidential information on a standalone PC or one which
is shared among several users. LSB technique can be used to store personal
data such as ATM PIN, Credit card details, salary statement, income tax
data, passport information etc in an imperceptible way. So, wherever this
kind of information is to be preserved in a manner that only legitimate user
should be able to retrieve it whenever needed, by simple ways, LSB is a
better solution.
Chapter Tow LSB algorithm for watermarks 13
Least Significant Bit (LSB) encoding is the easiest of the techniques used
for embedding secret or confidential information in digital images. For a
gray scale bitmap (BMP), using the LSB of each byte (8 bits) in an image,
a secret message of size 1/8th of the Cover image can be stored. This can
be easily done by directly substituting every bit of the secret message into
every LSB.
For a 24 bit color image as the cover image, since there are 3 bytes for
every pixel, 3 bits of data can be stored in each pixel, so the capacity to
store increases by 3 times thus making it 3/8 of the cover image size. If the
message to be embedded is a text message a secret message of size 1/7th of
the grayscale cover image can be stored and in a 24 bit color image as
cover a text message of size 3/7 can be embedded.
The technique [5] implemented in this section not only replaces the LSB,
but the LSB is modified by taking into consideration the other bits of the
Chapter Tow LSB algorithm for watermarks 14
Cover and the message bit as well. Advantage of this method is it adds one
more level of security, by encrypting the message bits before embedding
with just a slight increase in the encoding / decoding complexity and Cover
capacity remains the same as LSB substitution, accuracy of retrieval is
100%, and good perceptual transparency of cover image is achieved.
0 0 0 No Change
0 1 0 0
1 0 0 1
1 1 0 No change
0 0 1 1
0 1 1 No change
1 0 1 No change
1 1 1 0
Remark: There are 50 % chances that there will not be any change in the Stego.
Stego image.
b) Take successive Red, Green and Blue component values of pixels and
convert them into array of values for message and Stego image.
c) Convert every decimal value into 8 bit binary equivalent for Stego
image.
d) Retrieval of the message bit is done by using the XOR operation on
is 1.
f) Convert every 8 bits to form a byte whose decimal value is the pixel
decimal value forms the intensity of Red component of the first pixel
of the Secret image, if the message embedded is a 24 bit color image.
If the message that is embedded is a text message then after every 7
bits are retrieved convert them into decimal which forms the ASCII
code of the 1st character. In this manner these steps are continued till
the full message is retrieved.
g) In case of 24 bit, every byte forms either the Red, Green or Blue
Instead of only 2 or 3 LSB‟s this method can be extended till all the 8 bits
of the cover image are considered to encrypt the message bit, and then in
that case the decryption will be done considering 2, 3 till 8 bits of the Cover
image respectively.
In addition to the above encryption method, one more simple method for
encryption is suggested, which uses parity as a key for embedding. The
embedding and retrieval is to be done as given below.
Adjust the LSB of the byte of the Cover so that it is even parity after
embedding if the message bit to be embedded is 0 and adjust the LSB of
Chapter Tow LSB algorithm for watermarks 19
the byte of the Cover so that it becomes odd parity after embedding of if
the message bit to be embedded is 1. This is done till the embedding of
all message bits is over.
For retrieving the message the Stego image is taken. The parity of every
byte is checked. If the parity is even that means the message bit is 0 and if
the parity is odd it means the message bit is 1. The role of odd and even
parity is interchangeable.
In this way after 8 such message bits are retrieved they are converted to
decimal and this decimal number becomes the intensity value of the first
message pixel for grayscale image or Red component of the first pixel if
the message is 24 bit color image. If the message embedded was a text
message, then after every 7 bits of message are retrieved they are converted
to decimal and this decimal value is the ASCII code of the 1st character in
the message. This procedure is repeated until the full message is retrieved,
and the message image is formed or the full text message is retrieved.
Chapter three Convert the algorithm into programming codes using the
20
Chapter Three
There are a lot of programming methods for watermarks but we will use
this simplified method .
shown in image(1-3)
image(1-3)
The first button selects the objective image which we later hide another
image shown in image (2-3).
Chapter three Convert the algorithm into programming codes using the
22
Image(2-3)
The second button selects the image to be hidden or watermark from the
computer shown in image(3-3)
Image(3-3)
When you press the button, it will fetch an image from the files and then
convert it to a binary image according to the following code
if user_cance
msgbox(sprintf('Error'),'Error','Error'); // Warning
message if we do not choose a picture.
The third button is to hide the hidden image hidden in the first image after
deleting the less important bits of the image as explained in the second
chapter shown in image (4-3)
image (4-3)
Chapter three Convert the algorithm into programming codes using the
25
When you press the button, the Matlab will merge the two images, but
after performing the LSB algorithm and the following code…
axes(handles.a3);
imshow(l)
title('Invisble watermarked Image');
The fourth button extracts the hidden image from the original image
shown image (5-3).
Image(5-3)
Chapter three Convert the algorithm into programming codes using the
26
Where the watermark is returned but not the same original quality as the
following code……
h=mod(l,2);
p=zeros(1000,1000);\\ The function resizes the image to make the
images the same size when installed or merged for the purpose of getting
the best results.
for x=1:1000
for y=1:1000
if(h(x,y)==1)
p(x,y)=255;
end
end
end
s=im2bw(p);
axes(handles.a4);
imshow(s);
title('Recovered hidden image')
What Is MATLAB?[11]
MATLAB has evolved over a period of years with input from many users.
In university environments, it is the standard instructional tool for
introductory and advanced courses in mathematics, engineering, and
science. In industry, MATLAB is the tool of choice for high-productivity
research, development, and analysis.
Handle Graphics.
This is the MATLAB graphics system. It includes high-level commands
for two-dimensional and three-dimensional data visualization, image
processing, animation, and presentation graphics. It also includes low-level
commands that allow you to fully customize the appearance of graphics as
well as to build complete Graphical User Interfaces on your MATLAB
applications.
Chapter three Convert the algorithm into programming codes using the
29
CONCLUSION
This paper reviewed the latest research work done on digital image
watermarking. It presented the basic model of digital image watermarking
for embedding and detection. Next, it mentioned the requirements of any
REFERENCES
[1] Cox, I., Miller, M., & Bloom, J. , " Watermarking application and their
properties ", paper presented at the proceedings of the international conference
on information technology: coding and computing , Las Vegas, Nevada,
2000,March 27-29.
[2] 2013 IEEE 9th International Colloquium on Signal Processing and its Applications,
8 - 10 Mac. 2013, Kuala Lumpur, Malaysia" Properties of Digital Image
Watermarking".
[3] Bender, W., " Techniques for Data Hiding ", IBM System Journal, Vol.35,
313(23), 1996.
[4] I.J. Cox, M.L. Miller, J.A. Bloom, Digital watermarking, Morgan
Kaufmann, 2001
[5] A.Z. Tirkel, R.G. Van Schyndel, C.F. Osborne, A digital watermark,
Proceedings of ICIP 1994, Austin Convention Center, Austin, Texas, Vol. II,
1994, pp. 86 –90.
[6] W. Bender, N. Morimoto, A. Lu, Techniques for data hiding, IBM Syst. J. 35
(3/4) (1996) 313–336.
32
[7] T.S. Chen, C.C. Chang, M.S. Hwang, A virtual image cryptosystem based
upon vector quantization, IEEE Trans. Image Process. 7 (10) (1998) 1485–1488.
[8] L.M. Marvel, C.G. Boncelet, C.T. Retter, Spread spectrum image
steganography, IEEE Trans. Image Process. 8 (8) (1999) 1075–1083.
[9] K.L. Chung, C.H. Shen, L.C. Chang, A novel SVD- and VQ-based image
hiding scheme, Pattern Recognition Lett. 22 (9) (2001) 1051–1058.
[10] Chi-Kwong Chan, L.M. Cheng, Improved hiding data in images by optimal
moderately signi7cant-bit replacement, IEE Electron. Lett. 37 (16) (2001) 1017–
1018. [8] Ran-Zan Wang, Chi-Fang Lin, Ja-Chen Lin, Image hiding by optimal
LSB substitution and genetic algorithm, Pattern Recognition 34 (3) (2001) 671–
683.
[11] wikipedia.MATLAB
[15] A. M. Zeki and A. Abdul Manaf, "A novel digital watermarking technique based
on ISB (Intermediate Significant Bit)," World Academy of Science, Engineering and
Technology, vol. 50, pp. 989-996, 2009.
33