CHAPTER 1 INTRODUCTION Over the past few years, there has been tremendous growth in computer networks and more specifically, the World Wide Web demonstrating the commercial potential of offering multimedia resources through the digital networks. This phenomenon, coupled with the exponential increase of computer performance, has facilitated the distribution of multimedia data such as images [1-6]. Since commercial interests seek to use the digital networks to offer digital media for profit, a strong interest in protecting the ownership rights arises. Publishers, artists, and photographers, however, are unwilling to distribute pictures over the internet due to a lack of security; images can be easily duplicated and distributed without the owner’s consent. Digital watermarks [4,14,26], have been proposed as a way to tackle these issues. The digital watermarks could discourage copyright violation, prevent duplication and authenticate the contents. The aim of watermarking [7,8,13,18,26] is to include subliminal information (i.e., imperceptible) in a multimedia document to ensure a security service or 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHAPTER 1
INTRODUCTION
Over the past few years, there has been tremendous growth in computer networks
and more specifically, the World Wide Web demonstrating the commercial potential
of offering multimedia resources through the digital networks. This phenomenon,
coupled with the exponential increase of computer performance, has facilitated the
distribution of multimedia data such as images [1-6]. Since commercial interests seek
to use the digital networks to offer digital media for profit, a strong interest in
protecting the ownership rights arises. Publishers, artists, and photographers,
however, are unwilling to distribute pictures over the internet due to a lack of
security; images can be easily duplicated and distributed without the owner’s
consent. Digital watermarks [4,14,26], have been proposed as a way to tackle these
issues. The digital watermarks could discourage copyright violation, prevent
duplication and authenticate the contents.
The aim of watermarking [7,8,13,18,26] is to include subliminal information (i.e.,
imperceptible) in a multimedia document to ensure a security service or simply a
labeling application. It would be then possible to recover the embedded message at
any time, even if the document was altered by one or more nondestructive attacks,
whether malicious or not. A digital watermark [6] is a digital signal or pattern
inserted into a digital image. Since this signal or pattern is present in each unaltered
copy of the original image, the digital watermark may also serve as a digital
signature for the copies. A given watermark may be unique to each copy (e.g. to
identify the intended recipient), or common to multiple copies (e.g. to identify the
document source). In either case, the watermarking of the document involves the
transformation of the original into another form. This distinguishes digital
watermarking from digital fingerprinting, where the original file remains intact and a
new created file 'describes' the original file's content. The information embedded as a
watermark can be a bit string representing copyright message, serial number,
1
grayscale or colored image, plain text, etc. The watermark is not always hidden but
sometimes visible watermarks are used such as a company logo.
Digital watermarking is also to be contrasted with public-key encryption [11-13,26],
which also transforms original files into another form. It is a common practice
nowadays to encrypt digital documents so that they are not viewable without the
decryption key. Unlike encryption, digital watermarking leaves the original image
(or file) intact and recognizable. In addition, digital watermarks, as signatures, may
not be validated without special software. Further, decrypted documents are free of
any residual effects of encryption, whereas digital watermarks are designed to be
persistent in viewing, printing, or subsequent retransmission or dissemination.
It is desirable that the watermark is irremovable from the cover image. However,
several intentional and unintentional operations with the watermarked image may
provide possibility for disabling the watermark. Commonly, these operations
(especially the intentional ones) are referred as attacks [16,26,29,36] against
watermarks.
This thesis presents a performance analysis of digital watermarking techniques in
spatial and transform domain for grayscale image. The work is carried on the
Lena.bmp image. Various techniques of watermark embedding in both the domains
are implemented in MATLAB and their performance is analyzed based on the
following:
1. Computational cost in terms of the time required for embedding and recovery
of the watermark.
2. Imperceptibility in terms of signal to noise ratio.
3. Robustness in terms of ratio of bits of the watermark retrieved correctly.
4. Capacity in terms of allowable size of watermark to be embedded.
5. Tamper resistance in terms of tolerance to geometrical distortions like scaling
and cropping; and in terms of signal processing applications like histogram
equalization, Gaussian noise, median filtering.
2
The outline of the thesis is as follows:
Chapter 2 covers the history of watermarking, models, types, characteristics and
applications of watermarking systems focusing on the grayscale images. Various
attacks, intentional and unintentional are also covered in this chapter.
Chapter 3 covers the image watermarking techniques in spatial domain.
Chapter 4 covers the image watermarking techniques in transform domain. The
transform domains covered are Discrete Cosine Transform, Singular Value
Decomposition and Discrete Wavelet Transform.
Chapter 5 gives the performance parameters for which the techniques discussed in
chapter 3 and 4 are analyzed.
Chapter 6 contains the results of implementation of these techniques with analysis
and discussions.
Chapter 7 gives the conclusion of the work with future scope.
3
CHAPTER 2
2.0 INTRODUCTION
The general idea of hiding some information in digital content has a wide class of
application. The techniques involved in such applications are collectively referred to
as information hiding techniques. For example, an image printed on a document is
annotated by metadata that could lead a user to its high resolution version. In general,
metadata provides additional information about an image. Usually, when a file is
transformed to another format (e.g., from TIFF to JPEG or to BMP), the metadata is
lost. Similarly, cropping or any other form of image manipulation destroys the
metadata. Also, metadata can only be attached to an image as long as the image
exists in the digital form and is lost once the image is printed. Information hiding
allows the metadata to travel with the image regardless of the file format and image
state (digital or analog).
2.1 HISTORY OF INFORMATION HIDING
The idea of communicating secretly is as old as communication itself. The earliest
allusion to secret writing in the West appears in Homer’s Iliad. Steganographic
methods made their record debut a few centuries later in several tales by Herodotus,
the father of history. Herodotus tells how around 440 B.C. Histiaeus [3,8,11] shaved
the head of his most trusted slave and tattooed it with a message which disappeared
after the hair had regrown. The purpose of this message was to instigate a revolt
against the Persians. Another slave could be used to send a reply.
During the American Revolution, invisible ink [3,8], made from milk, vinegar, fruit
juices and urine, which would glow over a flame was used by both the British and
Americans to communicate secretly. Later, chemically affected sympathetic inks
were developed. This was used in World Wars I and II. German spies hid text by
using invisible ink to print small dots above or below letters and by changing the
4
heights of letter-strokes in cover texts. In World War I, prisoners of war would hide
Morse code messages in letters home by using the dots and dashes on i, j, t and f.
Censors intercepting the messages were often alerted by the phrasing and could
change them in order to alter the message. A message reading “Father is dead” was
modified to read “Father is deceased” and when the reply “Is Father dead or
deceased?” came back the censor was alerted to the hidden message. During World
War II, the Germans would hide data as microdots. Microdots are text or
photographic images that are shrunk down to the size and shape of a period or the dot
of an i or j. Microdots were usually sent by writing a letter containing periods, i's, or
j's, and the intended recipient could read the messages using a microscope. Because
of the extremely small size of the microdots the messages typically went unnoticed
by inspectors. FBI director J. Edgar Hoover described the use of microdots as “the
enemy’s masterpiece of espionage”.
A message sent by a German spy during World War II [39,41] read:
“Apparently neutral’s protest is thoroughly discounted and ignored. Isman hard hit.
Blockade issue affects for pretext embargo on by-products, ejecting suets and
vegetable oils.”
By taking the second letter of every word the hidden message retrieved is
“Pershing sails for NY June 1”
2.2 INFORMATION HIDING TERMINOLOGY
Information hiding, steganography and watermarking are three closely related fields
that have a great deal of overlap and share many technical approaches [7,40]. This
section discusses different information hiding terminologies. Figure 2.1 gives the
classification [9] of the information hiding techniques.
5
Information hiding [40] is a general term encompassing a wide range of problems
beyond that of embedding messages in contents, the term hiding may refer to either
making the information imperceptible or keeping the existence of information secret.
Information Hiding
Steganography Cryptography Watermarking
Technical Linguistic
Figure 2.1: Classification of information hiding techniques
Steganography
Steganography is the art / science /study of communicating in a way which hides a
secret message in the main information. The origin of steganography is biological
and physiological. The term steganography came into use in 1500’s after the
appearance of Trithemius’ book on the subject “Steganographia”. The word
steganography is derived from two Greek words [39], “Stegos” meaning hidden or
covered and “Graphia” meaning writing. The goal of steganography is to avoid
drawing attention to the transmission of a hidden message. If suspicion is raised, then
this goal is defeated. In steganography an issue of concern is bandwidth for the
hidden message whereas robustness is of more concern with watermarking.
Steganography hides messages in plain sight rather than encrypting the message; it is
embedded in the data and doesn’t require secret transmission. The message is carried
inside data. Steganography is therefore broader than cryptography. Figure 2.2 (a)
shows the model of steganography [4].
The Steganographic techniques are classified as Technical and Linguistic
Steganography. The former, such as invisible ink tries to hide data physically while
the later one uses linguistic or language forms of hidden writing. Linguistic
6
Steganography, also called acrostic was one of the popular ancient Steganographic
techniques. The secret messages were encoded [40] as initial letters of sentences or
successive tersest in a poem. These are the semagrams and the open code.
Semagrams hide information by the use symbols or signs. A visual semagram uses
innocent-looking or everyday physical objects to convey a message, such as doodles
or the positioning of items on a desk (or Web site). A text semagram hides a message
by modifying the appearance of the carrier text, such as subtle changes in font size or
type, adding extra spaces, or different flourishes in letters or handwritten text. Open
codes hide a message within a legitimate carrier message in ways that are not
obvious to an unsuspecting observer. The carrier message is sometimes called the
covert communication while the hidden message is the covert communication.
(a)
(b)
7
Figure 2.2: (a) Steganography (b) Cryptography
Cryptography
Cryptography is the study of methods of sending messages in distinct form so that
only the intended recipients can remove the disguise and read the message. The
message we want to send is called plain text and disguised message is called cipher
text. The process of converting a plain text to a cipher text is called enciphering or
encryption, and the reverse process is called deciphering or decryption. Encryption
protects contents during the transmission of the data from the sender to receiver.
However, after receipt and subsequent decryption, the data is no longer protected and
is the clear. The schematic representation of the cryptography is given in Fig. 2.2 (b).
Steganography differs from cryptography in the sense that where cryptography is the
practice of scrambling a message to an obscured form to prevent others from
understanding it, steganography is the study of obscuring the message so that it
cannot be seen. Steganography and cryptography are both ways to protect
information from unwanted parties but neither technology alone is perfect and can be
compromised. Once the presence of hidden information is revealed or even
suspected, the purpose of steganography is partly defeated. The strength of
steganography can thus be amplified by combining it with cryptography.
Digital watermarking
A special case of steganography is digital watermarking. Watermarking is the
process that embeds data called a watermark, tag or label into a multimedia object
such that watermark can be detected or extracted to make an assertion about the
object may an image or video or audio may also be text only. A watermark is
perceived as an attribute of the carrier (cover). It may contain information such as
copyright, license and authorship etc. Whereas in case of steganography, the
embedded message may have nothing to do with the cover. The key difference
between steganography and watermarking is the absence of an active adversary. In
watermarking applications like copyright protection and authentication, there is an
active adversary that would attempt to remove, invalidate or forge watermarks. In
8
steganography there is no such active adversary as there is no value associated with
the act of removing the information hidden in the content. Nevertheless,
steganography techniques need to be robust against accidental distortions.
2.2.1 DIFFERENCES BETWEEN STEGANOGRAPHY AND DIGITAL
WATERMARKING
Digital Information Hiding is the protection or concealing of digital information.
Steganography and Digital Watermarking are both sub-disciplines of information
hiding. Steganography is a way of hiding pertinent information. An example of
Steganography is sending a message containing invisible ink. The message appears
to be saying one thing but the invisible ink contains the true message. Watermarking
unlike Steganography focuses on the robustness of the information being hidden or
protected. The goal of Watermarking is for the watermarked information to be
irremovable. In fact, although primary focus is on invisible watermarks, this is not a
requirement. Watermarking focuses [15, 31] on protecting digital content and
therefore the watermarked information is always related to the digital content it is
applied to. Steganography does not follow this criterion while it is possible that the
information being hidden is related to the digital content itself, in many cases the
digital content is simply a decoy to hide the pertinent hidden information.
Steganography is usually applied to a one-to-one relationship and it is a two-way
communication. Information is hidden by one individual for another individual to
decode. Watermarking is usually applied to a one-to-many relationship and the
communication is one-way. Information is watermarked by one to prevent the theft
by many.
Thus, to summarize, the differences between Steganography and watermarking are:
Digital Watermarking:
Main goals are copyright protection and information authentication.
Inserts information related either to the host signal or its owner.
9
Is either visible or imperceptible.
Is for communications point-to-multiple points.
Capacity is not an important issue.
Robustness is an important issue.
Digital Steganography:
Main goal is covert communication.
Inserts any kind of information.
Must not only be imperceptible but also statistically undetectable.
Is for communications point-to-point.
Capacity is an important issue.
May be robust (not necessary).
2.3 THE PRISONER’S PROBLEM: MODERN FORMULATION OF
STEGANOGRAPHY
Watermarking technique has evolved from steganography. The use of watermarks is
almost as old as paper manufacturing. Paper Watermarks have been in wide use since
the late middle Ages. Their earliest use seems to have been to record the
manufacturer’s trademark on the product so that the authenticity could be clearly
established without degrading the aesthetics and utility of the stock. Today most
developed countries also watermark their paper, currencies and postage stamps to
make forgery more difficult. The digitization of our world has expanded our concept
of watermarking to include immaterial digital impressions for use in authenticating
ownership claims and protecting proprietary interests. However, in principle digital
watermarks are like their paper ancestors. They signify something about the token of
a document or file in which they inherit. Whether be the product of paper press or
discrete cosine transformations, watermarks of varying degree of visibility are added
to presentation media as a guarantee of authenticity, quality ownership and source.
10
Although steganography is an ancient subject, the modern formulation of it is often
given in terms of the prisoner’s problem [1,6,15,33] proposed by Simmons, where
two inmates, Alice and Bob, wish to communicate in secret to hatch an escape plan.
All of their communication passes through a warden, Wendy, who will throw them in
solitary confinement should she suspect any covert communication. The warden,
who is free to examine all communication exchanged between the inmates, can either
be passive or active [33]. A passive warden simply examines the communication to
try and determine if it potentially contains secret information. If she suspects a
communication to contain hidden information, a passive warden takes note of the
detected covert communication, reports this to some outside party and lets the
message through without blocking it. An active warden, on the other hand, will try to
alter the communication with the suspected hidden information deliberately, in order
to remove the information. The scenario is modeled as in figure 2.3. Alice wants to
send a secret message ‘m’ to Bob. In order to do so, she embeds ‘m’ into a cover
object ‘c’ and obtains a stego object ‘s’, which is sent over a public channel. Thus,
cover object refers to the object used as carrier to embed the secret message into and
the stego object is the object that contains the hidden message. In a pure
Steganographic scenario, the technique for embedding the message is unknown to
Wendy and shared as a secret between Alice and Bob. Sometimes it is considered
that the algorithm for embedding message is known but the key used by the
algorithm is kept as a secret between the two parties. Now Wendy has to find out if
the message sent is a stego object or not? In this context, Steganalysis refers to the
techniques that aid Wendy to distinguish between stego object and cover object,
sometimes even without knowing the algorithm used for embedding the secret
message, just determining a hidden message will do the work.
11
Figure 2.3: General model for Steganography
2.4 GENERAL WATERMARKING SYSTEM
Digital Watermarking is a promising solution of content copyright protection in the
global network. It imposes extra robustness on embedded information. To put into
words, digital watermarking is the art and science of embedding copyright
information in the original files, the information embedded is called watermarks.
Digital watermarks don’t leave a noticeable mark on the content and not affect its
appearance. These are imperceptible and can be detected only by proper authorities.
Digital watermarks are difficult to remove without noticeably degrading the content
and are a covert means in situations where cryptography fails to provide robustness.
A watermarking system can be viewed as a communication system [30,34,35]
consisting of three main elements:
an embedder (insertion algorithm),
a communication channel and
a detector (verification or extraction or detection algorithm).
12
Watermark information is embedded within the host signal before the watermarked
signal is transmitted over the communication channel, so that the watermark can be
detected at the receiving end, that is, at the detector.
Figure 2.4: A general watermarking system
A watermarking system is illustrated in figure 2.4. The dotted lines represent the
optional components, which may or may not be required according to the
application.
First of all, a watermark Wo is generated by the watermark generator with a secret
watermark generation key Kg. The watermark Wo can be a logo, or a pseudo-random
signal. Instead of directly embedding it into the host signal, the watermark Wo can be
pre-coded to optimize the embedding process, i.e. to increase robustness against
possible signal processing operations or imperceptibility of the watermark. This is
done by an information coder, which may require the original signal S0.
The outcome of the information coding component is denoted by symbol W that,
together with the original signal S0 and a secret key K, are taken as input of the
13
embedder. The secret key K is intended to differentiate between authorized users and
unauthorized users at the detector in the absence of Kg. The embedder takes in W, S0
and K, so as to hide W within S0 in a most imperceptible way with the help of K, and
produce the watermarked signal Sw. Afterwards, Sw enters into the communication
channel where a series of unknown signal processing operations and attacks may
take place. The outcome of the communication channel is denoted by the symbol S’w.
At the receiving end, the detector works in an inversely similar way as the embedder,
and it may require the secret key Kg, K, and the original signal S0. Then the detector
reads S´w and decides if the received signal has the legal watermark. Each owner has
a unique watermark or an owner can also put different watermarks in different
objects the marking algorithm incorporates the watermark into the object. The
verification algorithm authenticates the object determining both the owner and the
integrity of the object. A watermark must be detectable or extractable to be useful.
Depending on the way the watermark is inserted and depending on the nature of the
watermarking algorithm, the method used can involve very distinct approaches. In
some watermarking schemes, a watermark can be extracted in its exact form, a
procedure we call watermark extraction. In other cases, we can detect only whether a
specific given watermarking signal is present in an image, a procedure we call
watermark detection. It should be noted that watermark extraction can prove
ownership whereas watermark detection can only verify ownership.
2.5 CLASSIFICATION OF WATERMARKING
A digital watermark [34] is a digital signal or pattern inserted into a digital image.
Since this signal or pattern is present in each unaltered copy of the original image,
the digital watermark may also serve as a digital signature for the copies. A
watermark may be unique to each copy or may be common to multiple copies. In
either case, the watermarking of the image involves the transformation of the original
into another form.
14
The classification of watermarks and watermarking techniques is very broad. These
are divided into various categories [8, 11, 12] based on different criterions as shown
in figure 2.5.
Figure 2.5: Types of watermarking techniques
According to the type of Document
Watermarking techniques can be divided into four categories according to the type of
document [18] to be watermarked as follows.
Image Watermarking
Video Watermarking
Audio Watermarking
Text Watermarking
15
According to the prior exchange of data
The watermarking system is said to be pure watermarking system [33,35,37] if it
does not require prior exchange of data like shared secret keys while it is said to be
shared-key or shared-secret watermarking system if there is required a prior
exchange of keys. Depending on the exchange and availability of keys these shared
key systems are further classified. Public- key steganography [29, 31,35, 37] does
not rely on shared-key exchange. Instead it is based on the public-key cryptography
principle in which there are two keys, one being the public key which can be usually
obtained from a public database and the other a private key. Usually in this case the
public key is used in the embedding process and the private key in the decoding
process. A typical watermarking system is a shared-secret system. Private-key
steganography no public key and the intended recipient is to be supplied with the
key separately.
According to how watermark is detected and extracted
Many of the watermarking algorithms initially published required that the original
data be available to the detector. It would typically be subtracted from the
watermarked data to reveal the watermark itself. These are referred to as private
watermarks [29]. Watermark detection and extraction that do not depend on the
availability of original image are referred to as Blind watermarking [12,31,35]
techniques. The drawback is when the watermarked image is seriously destroyed;
watermark detection will become very difficult. Nonblind-extracting [12,29,35]
watermark can only be detected by those who have a copy of original image. It
guarantees better robustness but may lead to multiple claims of ownerships.
According to the domain for watermark embedding
On the basis of domain used for watermarking the techniques fall in two categories:
those which use spatial domain and those which use transform domain. Spatial-
domain watermarking [12,18] technologies change the intensity of original image or
16
gray levels of its pixels. This kind of watermarking is simple and with low
computing complexity, because no frequency transform is needed. However, there
must be tradeoffs between invisibility and robustness, and it is hard to resist common
image processing and noise. Transform-domain watermarking [12,18] embeds the
watermark into the transformed image. It is complicated but has the merits which the
former approach lacks.
According to the ability of watermark to resist attack
Fragile watermarks [12,18,29,35] are ready to be destroyed by random image
processing methods. The change in watermark is easy to be detected, thus can
provide information for image completeness. Robust watermarks [12,18,29,35] are
unaffected under most image processing methods and can be extracted from heavily
attacked watermarked image. Thus it is preferred in copyright protection.
According to the human perception
According to the human perception [8,11,18,35], the digital watermarks can be
divided into different types as follows.
Visible watermark
Invisible-Robust watermark
Invisible-Fragile watermark
Dual watermark
Visible watermark is a secondary translucent overlaid into the primary image. The
watermark appears visible to a casual viewer on a careful inspection. The invisible-
robust watermark is embedded in such a way that an alternation made to the pixel
value is perceptually not noticed and it can be recovered only with appropriate
decoding mechanism. The invisible-fragile watermark is embedded in such a way
that any manipulation or modification of the image would alter or destroy the
watermark. An invisible robust private watermarking scheme requires the original or
reference image for watermark detection; whereas the public watermarks do not. The
class of invisible robust watermarking schemes that can be attacked by creating a
17
counterfeit original is called invertible watermarking scheme. .Dual watermark [42]
is a combination of a visible and an invisible watermark .In this type of watermark an
invisible watermark is used as a back up for the visible watermark as clear from the
following diagram shown in figure 2.6.
Figure 2.6: Schematic representation of dual watermarking
According to the application
From application point of view digital watermark is either source based or
destination based. Source-based watermark are desirable for ownership identification
or authentication where a unique watermark identifying the owner is introduced to all
the copies of a particular image being distributed. A source-based watermark could
be used for authentication and to determine whether a received image or other
electronic data has been tampered with. The watermark could also be destination
based where each distributed copy gets a unique watermark identifying the particular
buyer. The destination -based watermark could be used to trace the buyer in the case
of illegal reselling.
2.6 APPLICATIONS OF WATERMARKING
The requirements that a watermarking system needs to comply with depends upon
the specific type of application. A few most common applications [2,3,15,38]
involve:
1. Owner Identification: The owner identification [2,3,15,18] can be printed on the
covers or mentioned somewhere on the item. Examples are the identification mark of
an audio company on the CD case or the mark of the paper manufacturer on top
18
corner of the paper. These types of watermarks can be easily removed by cropping
the image or by tearing the part that has the identification. Digital watermarking
helps to overcome this problem by embedding the watermark in the form of bits and
forming an integral part of the content. The device reads the CD and identifies the
watermark. For having further access to the CD the owner should have a license or
he should have paid a fee to access the copyrighted work.
2. Copy Protection: To prevent the data from being copied [3,15,18] a watermark
can be introduced in the data with a copy protect bit. When the copying device reads
the data, the watermark detecting circuitry should detect the watermark and stop
recording. This would need all the copying machines to have the watermark circuitry
to identify the watermark and act accordingly.
3. Broadcast Monitoring: A commercial advertisement may be watermarked
putting a unique watermark in each video or sound clip prior to broadcast [3].
Automated monitoring systems can then receive broadcasts and check for these
watermarks, identifying when and where each clip appears. This proves very helpful
for the advertisers as they actually pay for only the number of times the
advertisement was actually relayed.
4. Medical applications: Names of the patients can be printed on the X-ray reports
and MRI scans using techniques of visible watermarking. The medical reports play a
very important role in the treatment offered to the patient. If there is a mix up in the
reports of two patients this could lead to a disaster.
5. Fingerprinting: A fingerprinting [15] technique can be used to trace the source of
illegal copy. Every copy available can be watermarked with a unique bit sequence.
Now, if a copy is made illegally the source can be easily tracked since each original
copy had a unique bit sequence embedded into it.
6. Data Authentication: A given set of data (images) can be easily tampered
without even being detected. To avoid this [18] and maintain the originality of the
19
image a watermark like signature, a set of words, may be embedded into the image.
If the image is now being tampered it can be easily detected as the pixel values of the
embedded data would change and not match the original pixel values. If the image is
being copied it would lose its authentication as the embedded data would not be
copied along with the image.
Different types of watermarks are used for different applications depending upon
their characteristics as follows.
2.6.1 Applications of visible watermark
Visible watermarks can be used in following cases:
Visible watermarking for enhanced copyright protection [35]. In such
situations, where images are made available through Internet and the content
owner is concerned that the images will be used commercially (e.g. imprinting
coffee mugs) without payment of royalties. Here the content owner desires an
ownership mark, that is visually apparent, but which does not prevent image
being used for other purposes.
Visible watermarking used to indicate ownership [35] originals. In this case
images are made available through the Internet and the content owner desires to
indicate the ownership of the underlying materials (library manuscript), so an
observer might be encouraged to patronize the institutions that own the material.
2.6.2. Applications of invisible robust watermark
Invisible robust watermarks find application in following cases.
Invisible watermarking to detect misappropriated images [35]. In this
scenario, the seller of digital images is concerned, that his, fee-generating images
may be purchased by an individual who will make them available for free, this
would deprive the owner of licensing revenue.
Invisible watermarking as evidence of ownership [35]. In this scenario, the
seller that of the digital images suspects one of his images has been edited and
published without payment of royalties. Here, the detection of the seller’s
20
watermark in the image is intended to serve as evidence that the published image
is property of seller.
2.6.3 Applications of Invisible fragile watermarks
Following are the applications of invisible fragile watermarks.
Invisible watermarking for a trustworthy camera. In this scenario, images are
captured with a digital camera for later inclusion in news articles. Here, it is the
desire of a news agency to verify that an image is true to the original capture and
has not been edited to falsify a scene. In this case, an invisible watermark is
embedded at capture time; its presence at the time of publication is intended to
indicate that the image has not been attended since it was captured.
Invisible watermarking to detect alternation [35] of images stored in a digital
library. In this case, images (e.g. human fingerprints) have been scanned and
stored in a digital library; the content owner desires the ability to detect any
alternation of the images, without the need to compare the images to the scanned
materials.
2.7 ATTACKS ON WATERMARKS
A watermarked image is likely to be subjected to certain manipulations [3,18,21,40],
some intentional such as compression and transmission noise and some intentional
such as cropping, filtering, etc. They are summarized in figure 2.7.
Lossy Compression: Many compression schemes like JPEG and MPEG can
potentially degrade the data’s quality through irretrievable loss of data.
Geometric Distortions [3]: Geometric distortions are specific to images videos
and include such operations as rotation, translation, scaling and cropping.
Common Signal Processing Operations: They include the followings.
o D/A conversion
o A/D conversion
o Resampling
21
o Requantization
o Dithering distortion
o Recompression
o Linear filtering such as high pass and low pass filtering
o Addition of a constant offset to the pixel values
o Addition of Gaussian and Non Gaussian noise
o Local exchange of pixels
Other intentional attacks:
o Printing and Rescanning
o Watermarking of watermarked image (rewatermarking)
o Collusion: A number of authorized recipients of the image should not be
able to come together (collude) and like the differently watermarked
copies to generate an un-watermarked copy of the image (by averaging all
the watermarked images).
o Forgery: A number of authorized recipients of the image should not be
able to collude to form a copy of watermarked image with the valid
embedded watermark of a person not in the group with an intention of
framing a 3rd party.
22
Figure 2.7: Attacks on watermarks
These attacks may also be classified as active attacks, passive attacks, collusion
attacks and forgery attacks.
Active Attacks: Here, the hacker tries deliberately to remove the watermark or
simply make it undetectable. This is a big issue in copyright protection,
fingerprinting or copy control for example.
Passive attacks: In this case, the attacker is not trying to remove the watermark but
simply attempting to determine if a given mark is present or not. As the reader
should understand, protection against passive attacks is of the utmost importance in
23
covert communications where the simple knowledge of the presence of watermark is
often more than one want to grant.
Collusion attacks: In collusive attacks [3], the goal of the hacker is the same as for
the active attacks but the method is slightly different. In order to remove the
watermark, the hacker uses several copies of the same data, containing each different
watermark, to construct a new copy without any watermark. This is a problem in
fingerprinting applications (e.g. In the film industry) but is not the widely spread
because the attacker must have access to multiple copies of the same data and that
the number needed can be pretty important.
Forgery attacks: This is probably the main concern in data authentication. In
forgery attacks, the hacker aims at embedding a new, valid watermark rather than
removing one. By doing so, it allows him to modify the protected data as he wants
and then, re-implants a new given key to replace the destructed (fragile) one, thus
making the corrupted image seems genuine.
These four types of malicious attacks are only a categorization of what has been
encountered in the past. Of course, a lot of new attacks can be designed and it is
impossible to know what will come out next from hackers’ imagination. To those
malicious attacks, one must add all signal processing operations involved in the
transmission or storage of data, which can naturally degrade the image and alter the
watermarked information to the point of not being detectable anymore. In fact, the
identification and classification of attacks, as well as the implantation of a standard
benchmark for robustness testing is of great importance and will be a key issue in the
future development of watermarking.
2.8 DESIRED CHARACTERISTICS OF WATERMARKS
This section focuses on a number of watermarking system requirements
[13,15,18,21,38] as well as the tradeoffs among them.
24
Security: The security requirement of a watermarking system can differ slightly
depending on the application. Watermarking security implies that the watermark
should be difficult to remove or alter without damaging the host signal. As all
watermarking systems seek to protect watermark information, without loss of
generality, watermarking security [2] can be regarded as the ability to assure
secrecy and integrity of the watermark information, and resist malicious attacks.
Imperceptibility: The imperceptibility [2, 3] refers to the perceptual
transparency of the watermark. Ideally, no perceptible difference between the
watermarked and original signal should exist. A straightforward way to reduce
distortion during watermarking process is embedding the watermark into the
perceptually insignificant portion of the host signal. However, this makes it easy
for an attacker to alter the watermark information without being noticed.
However, other techniques, such as spread spectrum [3], can be used to add
imperceptible or unnoticeable watermarks in perceptually significant regions.
Capacity: Watermarking capacity [2] normally refers to the amount of
information that can be embedded into a host signal. Generally speaking,
capacity requirement always struggle against two other important requirements,
that is, imperceptibility and robustness as shown in figure 2.8. A higher capacity
is usually obtained at the expense of either robustness strength or
imperceptibility, or both.
Figure 2.8: The tradeoffs among imperceptibility, Robustness, and capacity
Robustness: Robustness[2,3,18] actually comprises two separate issues:
1) Whether or not the watermark is still present in the data after distortion.
2) Whether the watermark detector can detect it.
25
For example, watermarks inserted into images by many algorithms remain in the
signal after geometric distortions such as scaling, but the corresponding detection
algorithms can only detect the watermark if the distortion is first removed. In this
case, if the distortion cannot be determined and/or inverted, the detector cannot
detect the watermark even though the watermark is still present albeit in a
distorted form. Apart from malicious attacks, common signal processing
operations can pose a threat to the detection of watermark, thus making it
desirable to design a watermark that can survive those operations. For example, a
good strategy to robustly embed a watermark into an image is to insert it into
perceptually significant parts of the image. Therefore, robustness is guaranteed
when we consider the case of lossy compression which usually discards
perceptually insignificant data, thus data hidden in perceptual significant portions
is likely to survive lossy compression operation. However, as this portion of the
host signal is more sensitive to alterations, watermarking may produce visible
distortions in the host signal. The exact level of robustness an algorithm must
possess cannot be specified without considering the application scenario. Not all
watermarking applications require a watermark to be robust enough to survive all
attacks and signal processing operations. Indeed, a watermark needs only to
survive the attacks and those signal processing operations that are likely to occur
during the period when the watermarked signal is in communication channel. In
an extreme case, robustness may be completely irrelevant in some case where
fragility is desirable.
Tamper-resistance: Watermarks are often required to be resistant to signal
processing that is solely intended to remove them, in addition to being robust
against the signal distortions that occur in normal processing. We refer to this
property as tamper-resistance [3]. Tamper-resistance can be visualized in the
same way that we visualize robustness.
Key restrictions: An important distinguishing characteristic is the level of
restriction placed on the ability to read a watermark. The watermarks in which
the key is available to a very large number of detectors are described as
26
“unrestricted-key” watermarks, and those in which keys are kept secret by one or
a small number of detectors are described as “restricted-key” watermarks. Some
watermarking methods create a unique key for each piece of data that is
watermarked. Such algorithms can be used for restricted-key applications, where
the owner of the original data can afford to keep a database of keys for all the
data that has been watermarked. But they cannot be used for unrestricted-key
applications, since this would require every detector in the world having a
complete list of all the keys. Thus, algorithms for use as unrestricted-key systems
must employ the same key for every piece of data.
Computational cost: The speed requirements are highly application dependent.
In general, there is often an asymmetry between the requirement for speed of
insertion and speed of detection. This is particularly true when watermarks need
to be inserted or detected in real-time video or audio. Another issue to consider in
relation to computational cost is the issue of scalability [3,18]. It is well known
that computer speeds are increasing and it is therefore very desirable to design a
watermark whose detector and/or inserter is scalable with each generation of
computers.
2.8.1 Desired characteristics of visible watermarks [15]
A visible watermark should be obvious in both color and monochrome images.
The watermark should spread in a large or important area of the image in order to
prevent its deletion by clipping.
The watermark should be visible yet must not significantly obscure the image
details beneath it.
The watermark must be difficult to remove. Rather, removing a watermark
should be more costly and labor intensive than purchasing the image from the
owner.
The watermark should be applied automatically with little human intervention
and labor.
27
2.8.2 Desired characteristics of invisible robust watermarks [15]
The invisible watermark should neither be noticeable to the viewer nor should
degrade the quality of the content.
An invisible robust watermark must be robust to common signal distortions and
must be resistant to various intentional tampering solely intended to remove the
watermark.
Retrieval of watermark should unambiguously identify the owner.
It is desirable to design a watermark whose decoder is scalable with each
generation of computer.
While watermarking high quality images and art works the amount of pixel
modification should be minimum.
Insertion of watermark should require little human intervention or labor.
The robust watermark must be able to reliably carry higher number of
information bits in the presence of attacks.
2.8.3 Desired characteristics of invisible fragile watermarks [15]
The invisible watermark should neither be noticeable to the viewer nor should
degrade the quality of the content.
An invisible fragile watermark should be readily modified when the image pixel
values have been altered.
The watermark should be secure. This means that it is impossible to recover the
changes, or regenerate the watermark after image alternations, even when the
watermarking procedure, and/or the watermark itself is known.
For high quality images, the amount of individual pixel modification should be as
small as possible.
2.9 IMAGE STEGANOGRAPHY
28
There have been a number of image steganography algorithms proposed which find
wide use in the image watermarking domain. These algorithms could be categorized
in a number of ways [6,35]:
1. Spatial or Transform, depending on redundancies used from either domain for
the embedding process.
2. Model based or ad-hoc, if the algorithm models statistical properties before
embedding and preserves them, or otherwise.
3. Active or Passive Warden, based on whether the design of embedder-detector
pair takes into account the presence of an active attacker.
2.9.1 SPATIAL DOMAIN WATERMARKING
The techniques for spatial domain watermarking [21] insert the watermark into the
intensity values of the predefined regions of the image. The best widely known
watermarking algorithm is based on modifying the least significant bit layer of
images, hence known as the LSB technique. This technique makes use of the fact
that the least significant bits in an image could be thought of random noise and
changes to them would not have any effect on the image. Although the image seems
unchanged visually after the LSBs are modified, the statistical properties of the
image changes significantly. In the LSB technique, the LSB of the pixels is replaced
by the message to be sent. The message bits are permuted before embedding, this has
the effect of distributing the bits evenly, thus on average only half of the LSB's will
be modified. Different tools vary in their approach for hiding information. Some
algorithms change LSB of pixels visited in a random walk, others modify pixels in
certain areas of images, or instead of just changing the last bit they increment or
decrement the pixel value.
Spatial domain technique for watermarking can also be applied using color
separation. In this way, the watermark appears in only one of the color bands. This
renders the watermark visibly subtle such that it is difficult to detect under regular
viewing. However, the mark appears immediately when the colors are separated for
29
printing. This renders the document useless for the printer unless the watermark can
be removed from the color band. This approach is used commercially for journalists
to inspect digital pictures from a photo-stock house before buying unmarked
versions.
Another approach for embedding in spatial domain is that, noise that statistically
resembles common processing distortion, e.g., scanner noise, or digital camera noise,
is introduced to pixels on a random walk. The noise is produced by a pseudo random
noise generator using a shared key. A parity function is designed to embed and detect
the message signal modulated by the generated noise. These are referred to as
Correlation based techniques. The next chapter discusses different spatial domain
watermark embedding techniques in detail.
2.9.2 TRANSFORM DOMAIN EMBEDDING
Another category for embedding techniques for which a number of algorithms have
been proposed is the transform domain [2,21,30] embedding category. Most of the
work in this category has been concentrated on making use of redundancies in the
DCT (discrete cosine transform) domain, which is used in JPEG compression.
Embedding in DCT domain is simply done by altering the DCT coefficients [6,30].
Although changing the DCT coefficients will cause unnoticeable visual artifices,
they do cause detectable statistical changes. But there have been other algorithms
which make use of other transform domains, such as the frequency domain, by
quantizing the coefficients in the frequency domain in order to embed messages.
Since high frequencies will be lost by compression or scaling, the watermark signal
is applied to lower frequencies, or better yet, applied adaptively to frequencies that
contain important information of the original picture. Since watermarks applied to
the frequency domain will be dispersed over the entirety of the spatial image upon
inverse transformation, this method is not as susceptible to defeat by cropping as the
spatial technique. However, there is more a tradeoff here between invisibility and
decodability, since the watermark is in effect applied indiscriminately across the
spatial image. The other important and upcoming methods use Discrete Wavelet
30
Transform, Fast Wavelet Transform and Singular Value Decomposition. The basic
principle of use of these transforms remains the same. The transform coefficients are
altered.
Some other transforms used are Radon Transform, Hartley Transform [22], Discrete
Laguerre Transform[25], Steerable Pyramid Transform[26]. There are many more
algorithms proposed lately which use more than one transform[23] i.e. there exists a
class of hybrid techniques to embed a watermark. The simplest example is modifying
Singular Values of the Discrete Cosine Transform of an image to put in watermark
secretly.
The table 2.1 shows the comparison of the spatial domain and Transform domain
watermarking techniques depending upon various characteristics. The data is
practically evaluated in Chapter 6.
Characteristics Spatial Domain Transform Domain
Computation Cost Low High
Robustness Fragile More robust
Perceptual quality High Control Low control
Capacity High(depends on image size) Low
Example of Application Mainly authentication Copyright
Table 2.1: Comparison between watermarking techniques
2.9.3 MODEL BASED TECHNIQUES
Unlike previously discussed techniques, model based techniques [6,24] try to model
statistical properties of an image, and preserve them in the embedding process. For
example, the transformed image coefficients are divided into two parts and the
perceptually insignificant component is replaced with the coded message signal.
Another model based technique proposed to process the message signal so that it
31
would exhibit the properties of an arbitrary cover signal. This approach is called data
masking.
As argued if Alice wants to send an encrypted message to Bob, the warden Wendy
would be able to detect such a message as an encrypted stream since it would exhibit
properties of randomness. In order for a secure channel to achieve covertness, it is
necessary to preprocess the encrypted stream at the end points to remove randomness
such that the resulting stream defeats statistical tests for randomness and the stream
is reversible at the other end.
CHAPTER 3
IMAGE WATERMARKING IN SPATIAL DOMAIN
The most straight-forward method of watermark embedding would be to embed the
watermark into the least-significant-bits of the cover object. This technique lies
under spatial domain watermarking techniques. Given the extraordinarily high
32
channel capacity of using the entire cover for transmission in this method, a smaller
object may be embedded multiple times. Even if most of these are lost due to attacks,
a single surviving watermark would be considered a success. The resulting
watermark may be visible or invisible depending upon the value (large or small,
respectively) of the watermark intensity.
3.1 SIMPLE LSB SUBSTITUTION
A naive algorithm for LSB substitution would be to take the first M cover pixels
where M is the length of the secret message to be hidden in bits. And then every
pixel's last bit is replaced [1,2,6,13] by one of the message bit because this has
negligible effect to the appearance of the carrier message. This can be observed in
figure 3.1.
Image 1 grayscale pixel value=128
Image 2 grayscale pixel value=129
Image 3 grayscale pixel value=000
Figure 3.1: Effect of changing LSB and MSB on grayscale pixel value
Consider that the grayscale value at any arbitrary pixel is 128 represented with 8 bits
as 10000000. Now, if LSB is changed from zero to one, the grayscale pixel value
changes from 128 to 129, which is undetectable to human eye. However if MSB is
changed, the change in gray level is from 128 to 0 which is a significant change to be
detected by human eye. This is the simplistic case; we could get away with replacing
more than one bit also.
X w = 0 1
…………
7 = 0111 y = 6 = 0110 7 = 0111
1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0
33
D = 1 = 0
8 = 1000 y = 8 = 1000 9 = 1001
D = 0 = 1
…………
Table 3.1: Distortion for R=1
x w = 00 01 10 11
…………..
4 = 0100 y=4=0100 5=0101 6=0110 7=0111
D = 0 = 1 = 2 =3
5 = 0101 y=4=0100 5=0101 6=0110 7=0111
D = 1 = 0 = 1 =2
6 = 0110 y=4=0100 5=0101 6=0110 7=0111
D = 2 = 1 = 0 =1
7 = 0111 y=4=0100 5=0101 6=0110 7=0111
D = 3 = 2 = 1 =0
8 = 1000 y=8=1000 9 = 1001 10=1010
11=1011
D = 0 = 1 = 2 = 3
9 = 1001 y=8=1000 9 = 1001 10=1010
11=1011
D = 1 = 0 = 1 = 2
10 = 1010 y=8=1000 9 = 1001 10=1010
11=1011
D = 2 = 1 = 0 = 1
11 = 1011 y=8=1000 9 = 1001 10=1010
11=1011
D = 3 = 2 = 1 = 0
………….
Table 3.2: Distortion for R = 2
If we assume the set of permissible gray levels is represented with B number of
bits, the number of bit used for message embedding as R and the value of bit(s) as w,
then say the gray level changes from x to y. Then the distortion [13] introduced due
34
to change in LSB can be given with the help of the following tables. From table 3.1
[13], for R=1 the distortion is and from table 3.2 [13], for R= 2 the average
distortion is .
To recover the watermark, the LSB of the watermarked image are extracted. LSB
substitution however despite its simplicity brings a host of drawbacks. Although it
may survive transformations such as cropping, any addition of noise or lossy
compression is likely to defeat the watermark. An even better attack would be to
simply set the LSB bits of each pixel to 1 or 0 fully defeating the watermark with
negligible impact on the cover object. Furthermore, once the algorithm is discovered,
the embedded watermark could be easily modified by an intermediate party.
This technique is a pure watermarking technique as it does not require a key to be
shared between the sender and the receiver but only the number of bits used for
hiding the data. One solution to improve the robustness of the watermark is to use a
pseudo random number generator [4] to determine the pixels to be used for
embedding. This is discussed in the following section. The security is increased but it
does require a key or a password to be sent with the image or shared between the
users.
3.2 VISITING PIXELS IN A RANDOM WALK FOR LSB SUBSTITUTION
An improvement on basic LSB substitution would be to use a pseudo-random
number generator [2,4,12] to determine the pixels to be used for embedding based on
a given “seed” or key.
Security of the watermark would be improved as the watermark could no longer be
easily viewed by intermediate parties. The algorithm however would still be
vulnerable to replacing the LSBs with a constant. Even in locations that were not
used for watermarking bits, the impact of the substitution on the cover image would
be negligible. LSB modification proves to be a simple and fairly powerful tool for
35
stenography, however lacks the basic robustness that watermarking applications
require.
To recover the watermark, the same key is used to regenerate the pseudo-random
number generator to determine the pixel where watermark was embedded. Extracting
the LSB of these pixels gives back the watermark.
3.3 OTHER LSB SUBSTITUTION TECHNIQUES
Many other LSB substitution techniques are found in the literature where different
coding schemes like Hamming Codes and Golay Codes for example are used as they
affect the LSB of each gray scale symbol. These techniques find the modified forms
in literature with the use of ternary embedding [13]. These methods have lower
distortion rates.
3.4 ADVANTAGES AND DISADVANTAGES OF LSB SUBSTITUTION
Advantages:
1. It is a well-rounded method and lends itself to a variety of information hiding
applications.
2. A large quantity of embedded information can be included in even the most
modestly sized images.
3. LSB can also allow for the hiding of photographic images and even audio
recordings.
4. Calculation complexity is relatively low.
Disadvantages [12]:
1. Any attack or noise distortion of the composite image will seriously damage
the imbedded data.
2. Cropping or translation of the composite image will destroy an equal portion
of the imbedded image.
3. Robustness limits the overall effectiveness.
36
3.5 CORRELATION BASED TECHNIQUES
These techniques for watermark embedding exploit the correlation properties of
additive pseudo-random noise patterns as applied to an image [11]. Pseudo-
random noise sequences are a good tool for watermarking because
of the following reasons:
PN generator produces periodic sequences that appear to be
random.
PN sequences are generated by an algorithm that uses an
initial seed.
The PN sequence generated is actually not statically random
but will pass many tests of randomness.
Unless the algorithm and seed are known, the sequence is
impractical to predict.
A pseudo-random noise (PN) pattern, W(x,y) is added to the cover image, I(x,y)
according to the equation shown below
, 3.1
Where, k is the gain factor, and is the watermarked image. Increasing k increases
the robustness of the watermark at the expense of the quality of the watermarked
image. To retrieve the watermark, the same pseudo-random noise generator
algorithm is seeded with the same key, and the correlation between the noise pattern
and possibly watermarked image computed. If the correlation exceeds a certain
threshold T, the watermark is detected, and a single bit is set. This method can easily
be extended to a multiple-bit watermark by dividing the image up into blocks, and
performing the above procedure independently on each block.
37
This basic algorithm can be improved in a number of ways. First, the notion of a
threshold being used for determining a logical “1” or “0” can be eliminated by using
two separate pseudo-random noise patterns. One pattern is designated a logical “1”
and the other a “0”. The above procedure is then performed once for each pattern,
and the pattern with the higher resulting correlation is used. This increases the
probability of a correct detection, even after the image has been subject to attack.
We can further improve the method by pre-filtering the image before applying the
watermark. If we can reduce the correlation between the cover image and the PN
sequence, we can increase the immunity of the watermark to additional noise. By
applying the edge enhancement filter shown below in figure 3.2, the robustness of
the watermark can be improved with no loss of capacity and very little reduction of
image quality.
. 3.2
Figure 3.2: FIR edge enhancement pre-filter
Rather then determining the values of the watermark from “blocks” in the spatial
domain, we can employ CDMA spread-spectrum techniques to scatter each of the
bits randomly throughout the cover image, increasing capacity and improving
resistance to cropping. The watermark is first formatted as a long string rather then a
2D image. For each value of the watermark, a PN sequence is generated using an
independent seed. These seeds could either be stored, or themselves generated
through PN methods. The summation of all of these PN sequences represents the
watermark, which is then scaled and added to the cover image.
To detect the watermark, each seed is used to generate its PN sequence, which is then
correlated with the entire image. If the correlation is high, that bit in the watermark is
set to “1”, otherwise a “0”. The process is then repeated for all the values of the
watermark. CDMA improves on the robustness of the watermark significantly, but
requires several orders more of calculation.
38
3.6 EMBEDDING CHECKSUM IN LSB
Another variation in the approach for exploiting the spatial domain for information
hiding can be to hide the checksum [5, 30] for the cover image divided into blocks
instead of the binary logo or file directly. A checksum is the modulo-2 addition of a
sequence of fixed-length binary words; it is a special type of hash function. The
technique divides the cover image into blocks and for each block then selects a
pseudorandom group of pixels according to a secret key. The checksum is calculated
by summing the numbers determined by the seven most significant bits of selected
pixels which is then embedded in the LSB. As proposed in [5], the checksum can be
calculated using all the pixels in the block and selecting a large integer N using the
following equation.
, 3.3
where, M is the number of pixels in each block, ai is pseudorandom sequence of M
integers comparable in size to N and g(pi) is the gray level of pixel determined by the
seven MSBs. Further before embedding this checksum, the binary form of it is
encrypted. The checking process is similar to the embedding process. It consists of
comparing, for each block, the check-sum determined by the MSB of the tested
image with the original check-sum value recovered from the LSB. The main
advantages of this method are that it does not produce visible changes in the image
and provides a very high probability of tamper detection. For example, if we swap
only two pixels of any block, the check-sum will be modified because each pixel pi
of the block is multiplied by a different coefficient ai . Furthermore the random walk
of the pixels pi and the coefficients ai are block dependent, thus making it impossible
to swap or duplicate entire blocks without making undetected changes.
Advantages
39
1. Embedding W only changes (on average) half of the pixels covered by W. This not
only reduces visual distortion but also increases security.
2. An image may hold many W as long as they do not overlap.
3. This method is very fast.
Disadvantages
1. This watermarking method is fragile. Any change to either the image data itself or
the embedded checksum can cause the verification procedure to fail.
2. The checksum method does not detect pixel swaps or similar attacks. A forger
could replace a section of watermarked block with one of equal size and checksum.
3. An attacker could remove the entire watermark by replacing the LSB plane.
3.7 SPATIAL WATERMARKING USING BITMAP PARITY CHECKING
APPROACH
This approach [19] does not directly embed the information in the LSB but does so
with a certain criterion. This is achieved by using the mean gray value and bitmap in
the block to hide the logo in a secret, undetectable and unambiguous way. The
technique is fragile and blind in nature. In this technique the image f(x,y) is broken
down into blocks and the corresponding bitmaps are obtained by comparing the pixel
values with the block mean value according to the following equations:
. 3.4
The pixel values may be modified to embed logos by checking the even or odd parity
of the block bitmap using sum (S) of the binary values of the bitmap and a random
number R such that the following relation is satisfied for each block, k.
. 3.5
40
A secret key and a random number generator are used to enhance the logo in a secret,
undetectable, and unambiguous way. If sum does not satisfy the above relation, a
pixel with value f(x,y) is chosen and is modified to f’(x,y)
, 3.6
where, is pre-selected random value between 0 and standard deviation for each
block. By choosing a modified pixel near to the mean value of the block and
diffusing the errors of modifications the neighborhood pixels, we can obtain the
smallest value of the mean absolute error in the watermarked image. For retrieving
the watermark, the watermarked image is divided into the same sized non-
overlapping blocks as for embedding process. For each block the bitmap and the sum
is calculated and using the following relation the watermark bit is decided.
, 3.7
where, R produced by a random number generator using the original secret
key.
41
CHAPTER 4
IMAGE WATERMARKING IN TRANSFORM DOMAIN
An advantage of the spatial domain techniques discussed in the previous chapter is
that they can be easily applied to any image regardless of subsequent processing
(whether they survive this processing however is a different matter entirely). But the
disadvantage of spatial techniques is they do not allow for the exploitation of this
subsequent processing in order to increase the robustness of the watermark.
In addition to this, adaptive watermarking techniques are a bit more difficult in the
spatial domain. Both the robustness and quality of the watermark are improved if the
properties of the cover image are exploited. For instance, it is generally preferable to
hide watermarking information in noisy regions and edges of images, rather then in
smoother regions. The benefit is two-fold; Degradation in smoother regions of an
image is more noticeable to the Human Visual System (HVS), and becomes a prime
target for lossy compression schemes.
Taking these aspects into consideration, working in a transform domain becomes
very attractive. The classic and still most popular domain for image processing is that
of the Discrete-Cosine-Transform, or DCT. Although changing the DCT coefficients
will cause unnoticeable visual artifices, they do cause detectable statistical changes.
Another transform domain which is being exploited is Singular Value
Decomposition (SVD) due to its simplicity in implementation and attractive
mathematical features. It is one of the most powerful numerical analysis technique
and used in various applications. Some SVD based algorithms are purely SVD based
in a sense that only SVD domain is used to embed watermark into image. Recently
some hybrid SVD algorithms have been proposed where different types of
transforms are used including discrete Cosine Transform, Discrete Wavelet
Transform and Fast Hadamard Transform. There are two types of pure SVD based
42
algorithms where in some watermarking schemes watermark is embedded into the
whole cover image and in some other schemes the cover image is divided into
several blocks and the watermark is embedded into each block of the cover image
separately.
Another domain exploited for embedding the watermark is the wavelet domain. The
DWT (Discrete Wavelet Transform) separates an image into a lower resolution
approximation image (LL) as well as horizontal (HL), vertical (LH) and diagonal
(HH) detail components. The process can then be repeated to computes multiple
“scale” wavelet decomposition.
One of the many advantages over the wavelet transform is that that it is believed to
more accurately model aspects of the HVS as compared to the FFT or DCT. This
allows us to use higher energy watermarks in regions that the HVS is known to be
less sensitive to, such as the high resolution detail bands {LH, HL, HH). Embedding
watermarks in these regions allow us to increase the robustness of our watermark, at
little to no additional impact on image quality
4.1 DISCRETE COSINE TRANSFORM
The transform domain watermarking techniques use a DCT to transform successive 8
X 8 pixel blocks of the image into 64 DCT coefficients each. The DCT coefficients
F(u, v) of an 8 X 8 block of image pixels f(x, y) are given by
, 4.1
where C(x) = 1/√2 where x equals to zero and C(x) is 1 otherwise.
The corresponding inverse DCT transformation is given by
43
. 4.2
The DCT allows an image to be broken up into different frequency bands, making it
much easier to embed watermarking information into the middle frequency bands of
an image. The middle frequency bands are chosen such that they have minimize they
avoid the most visual important parts of the image (low frequencies) without over-
exposing themselves to removal through compression and noise attacks (high
frequencies), FL is used to denote the lowest frequency components of the block,
while FH is used to denote the higher frequency components. FM is chosen as the
embedding region as to provide additional resistance to lossy compression
techniques, while avoiding significant modification of the cover image,
Figure 4.1: Definitions of DCT regions
Embedding in DCT domain is simply done by altering the DCT coefficients, for
example by changing the least significant bit of each coefficient as for JSteg
algorithm [7]. One of the constraints of embedding in DCT domain is that many of
the 64 coefficients are equal to zero, and changing two many zeros to non-zeros
values will have an effect on the compression rate. That is why the number of bit one
could embed in DCT domain, is less that the number of bits one could embed by the
LSB method. Also the embedding capacity becomes dependent on the image type
used in the case of DCT embedding, since depending on the texture of image the
number of non-zero DCT coefficients will vary. The two methods using the above
discussed statistical anomalies are F5 and Outguess [6, 7].
44
A widely accepted point now is the frequency-domain watermark should be
embedded into the mid-band of the transformed host image. Watermarks in high
frequency band tend to have less influence on the quality of original image, while
watermarks in low band will achieve a better robustness (since a large portion of
high frequency components may be quantized to zero under JPEG compression, as
shown in figure 4). And the mid-bind scheme is right a tradeoff between the
imperceptibility and robustness.
4.1.1 USEFUL PROPERTIES OF DCT
1. The cosine transform is real and orthogonal.
2. The cosine transform is fast transform. The cosine transform of a vector of N
elements can be calculated in O(N log2 N) operations via an N-point FFT.
4.1.2 EMBEDDING WATERMARK IN HIGH FREQUENCY BANDS OF
DCT
The simplest algorithm to hide a watermark using DCT is to directly embed the DCT
coefficient of the watermark into the high frequency band of the DCT coefficient
matrix of the cover image. The important thing is that, that the size of watermark
should be small as compared to the cover image. For a cover image of size 2nX2n,
the watermark size should at most be nXn. As previously discussed, most of the
components in the DCT coefficient matrix are zero and thus a small sized watermark
is easily embedded in this high frequency band of DCT coefficient as shown in the
figure 4.2.
45
Figure 4.2: Embedding watermark into the high frequency bands of DCT coefficient matrix of
cover image
The DCT of watermark is though flipped during embedding so that its low frequency
components fall to the high frequency side of the DCT matrix of cover image. The
watermark is recovered by taking the DCT of the lower right square of the
watermarked image. This works well if 8 bit image is hidden in a 16 bit image.
4.1.3 WATERMARK EMBEDDING USING COMPARISON OF MID BAND
COEFFICIENT OF DCT
The DCT allows an image to be broken up into different frequency bands, making it
much easier to embed watermarking information into the middle frequency bands of
an image. The middle frequency bands are chosen such that they have minimize they
avoid the most visual important parts of the image (low frequencies) without over-
exposing themselves to removal through compression and noise attacks (high
frequencies).
One such technique utilizes the comparison of middle-band DCT coefficients to
encode a single bit into a DCT block. The middle-band frequencies (FM) of an 8x8
DCT block as shown below in figure 4.1.
Next, two locations Bi (u1, v1) and Bi (u2, v2) are chosen from the FM region for
comparison. Rather then arbitrarily choosing these locations, extra robustness to
compression can be achieved if we base the choice of coefficients on the
recommended JPEG quantization table for a blocksize of 8 X 8 shown below in table
4.1. If two locations are chosen such that they have identical quantization values, we
can be sure that any scaling of one coefficient will scale the other by the same factor
preserving their relative size.
16 11 10 26 24 40 51 61
12 12 14 19 26 58 60 55
46
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
Table 4.1 - Quantization values used in JPEG compression scheme
Based on the table, we can observe that coefficients (4,1) and (3,2) or (1,2) and (3,0)
would make suitable candidates for comparison, as their quantization values are
equal. The DCT block will encode a “1” if Bi(u1,v1) > Bi(u2,v2); otherwise it will
encode a “0”. The coefficients are then swapped if the relative size of each
coefficient does not agree with the bit that is to be encoded.
The swapping of such coefficients should not alter the watermarked image
significantly, as it is generally believed that DCT coefficients of middle frequencies
have similar magnitudes. The robustness of the watermark can be improved by
introducing a watermark “strength” constant k, such that Bi(u1,v1) - Bi(u2,v2) > k.
Coefficients that do not meet this criteria are modified though the use of random
noise as to then satisfy the relation. Increasing k thus reduces the chance of detection
errors at the expense of additional image degradation.
4.1.4 WATERMARK EMBEDDING USING THRESHOLD BASED
CORRELATION FOR DCT BLOCK
Another possible technique is to embed a PN sequence W into the middle
frequencies of the DCT block. We can modulate a given DCT block using the
following equations.
47
. 4.3
For each 8x8 block of the image W(x,y), the DCT for the block is first calculated
IW(x,y)(u,v). In that block, the middle frequency components FM are added to the pn
sequence W(x,y) (u,v), multiplied by a gain factor k. Coefficients in the low and middle
frequencies are copied over to the transformed image unaffected. Each block is then
inverse-transformed to give us our final watermarked image IW.
The watermarking procedure can be made somewhat more adaptive by slightly
altering the embedding process to the following method
. 4.4
This slight modification scales the strength of the watermarking based on the size of
the particular coefficients being used. Larger k’s can thus be used for coefficients of
higher magnitude in effect strengthening the watermark in regions that can afford it;
weakening it in those that cannot.
For detection, the image is broken up into those same 8x8 blocks, and a DCT
performed. The same PN sequence is then compared to the middle frequency values
of the transformed block. If the correlation between the sequences exceeds some
threshold T, a “1” is detected for that block; otherwise a “0” is detected. Again k
denotes the strength of the watermarking, where increasing k increases the
robustness of the watermark at the expense of quality.
For further modification to increase the robustness of the watermark, instead of one,
two highly uncorrelated pn sequences for zero and one respectively are used. The
procedure can be given by the following equation set.
48
. 4.5
For recovering the watermark, the same pn sequences for zero and one are used. For
every 8 X 8 block obtained by taking the DCT of the same block of the watermarked
image, a pn sequence is generated using the mid band coefficients. The correlation of
this pn sequence is calculated with those for zero and one respectively. Whichever
has higher correlation, that bit is assigned to the recovered watermark.
4.2 SINGULAR VALUE DECOMPOSITION
Singular Value Decomposition (SVD) is a mathematical tool used to analyze
matrices. In SVD, a matrix is decomposed into three matrices of same size. Let A be
M X N matrix with M ≥ N. One form of singular value decomposition of A is
A= UDVT. 4.6
Here U and V are orthogonal and D is square diagonal. That is, UUT = Irank(A), VVT=
Irank(A), U is rank(A) X M, V is rank(A) X N and D is a rank(A) X rank(A) diagonal
matrix.
. 4.7
49
These diagonal entries σi' s are called singular values of A and their number is equal
to the rank of A. These singular values satisfy the relation
σ 1 ≥ σ 2 ≥ σ 3......σrank ( A) > 0. 4.8
Each singular value specifies [16, 17] the luminance of an image layer while the
corresponding pair of singular vectors specifies the geometry of the image. For
majority of the attacks, the change in the largest singular value is very small. The
columns of U are called the left singular vectors of A, and the columns of V are
called the right singular vectors of A.
This decomposition is known as the Singular Value Decomposition (SVD) of A, and
can be written as
SVD(A) = [U D V ]. 4.9
SVD (A) = λ1U1V1T + λ 2U2V2
T + ...... + λ U V
A' =UDVT. 4.10
4.2.1 PROPERTIES OF SVD
The properties of SVD [16] are reviewed below which make the technique useful for
watermarking.
1. If AЄRmxn , then there exist orthogonal matrices U = [u1,...,um ] Є Rmxn and V
= [v1,...,vn ] Є Rmxn such that UTAV = diag (σ1 σ2 …..σp)Where, p = min (m, n)
= rank (A), σ1 ≥σ 2 ≥ ...σ p ≥ 0. σ i, i=1,2,…p are the singular values of A. The
singular values are the square roots of the Eigen values λi of AAH or AHA,
that is σi = √λi.
2. The stability of singular value indicates that, when there is a little disturbance
with A, the variation of its singular value is not greater than 2-norm of
disturbance matrix. 2-norm is equal to the largest singular value of the matrix.
50
3. If the singular values of Amxn are σ1, σ 2, ...σ k , the singular values of α *Amxn
are σ1* ,σ 2
* ,...σ k*, then . This is referred
to as scaling property of SVD.
4. If P is a unitary and rotating matrix, the singular values of PA (rotated matrix)
are the same as those of A. This is referred to as rotation invariance property.
5. The translation invariance property states that the original image A and its
rows or columns interchanged image have the same singular values.
6. Transposition Invariance property of SVD states that if AATu = u, then
AATv = v, so that A and AT have same singular values.
These properties of stability, scaling, rotation invariance, translation invariance and
transposition invariance are much desirable in watermarking. When the watermarked
image undergoes rotation, scaling or noise addition, these properties enable the
watermark embedded in the SVD to be retrieved effectively. This makes the
techniques robust against these attacks.
4.2.2 DITHER QUANTIZATION
In an ideal watermarking scheme, one signal (a digital watermark) is embedded
within another signal (host image) signal to form a third signal (watermarked image)
signal. The embedding should be done in such a way that minimizes the distortion
between the host signal and watermarked signal and maximizes the information
embedding rate and robustness of the embedding. All the three requirements are
usually conflicting, and hence embedding process must be designed to efficiently
tradeoff these requirements. In the Dither quantization[16,17] based watermarking
schemes, the embedded information modulates a dither signal and the host signal is
quantized with an associated dithered quantizer. Dither quantization based schemes
have considerable performance advantages over conventional spread spectrum based
schemes [16]. The conventional spread spectrum embedding function combines the
51
host image and the watermark image in a linear way, and hence the watermark image
can be extracted with ease. In contrast, dither quantization based schemes effectively
hide the exact value of the host signal.
The concept of dither quantization[16,17] was introduced to digital watermarking
community by Chen and Wornell. Dither quantizers are set of basic quantizers. Each
quantization cell in the set is constructed from a basic quantizer. The basic quantizer
is shifted to get the reconstruction point. The shift depends on the watermark bit. The
basic quantizer is a uniform scalar quantizer with a fixed step size T.
4.2.3 NON-BLOCK BASED PURE SVD ALGORITHMS
Many of the earlier algorithms, based on SVD, used to embed the watermark signal
directly into the SVD domain. The simplest approach is where the watermark image
is embedded directly in the SVD domain. A single image is used as watermark which
is embedded in the whole image. This method is blind but requires the singular
values or the orthogonal matrices for retrieving the watermark. This algorithm is
resistant to some of the attacks like compression, filtering, cropping etc. but is not
robust against the attacks including rotation and translation.
Another algorithm uses basic M-sequence as the watermark[17]. Considering the
visible quality and robustness criteria, watermark has been embedded in middle
singular values maintaining the original order. This algorithm is blind i.e. does not
require the original image or any other information of original singular values to
detect the watermark. This method can resist some attacks like JPEG compression,
median filtering, rescaling, Gaussian low-pass filtering but is not robust against some
other attacks including rotation, cropping etc.
4.2.4 BLOCK BASED PURE SVD ALGORITHMS
A naïve block based pure SVD algorithm divides the original image into blocks and
then embed the watermark in the singular values of each blocks separately. The
52
watermark can be a pseudorandom number or an image. The method was found to be
robust against attacks like JPEG compression, cropping, Gaussian noise, resizing and
rotation. However this method could not resist translation. If the cover image size is
not fully divisible by the block size, then it requires adjustments before embedding
the watermark. The following part discusses a few of block based SVD algorithms.
4.2.5 EMBEDDING WATERMARK IN ‘D’ MATRIX
The main idea is to find the SVD of the image and modify its singular values to
embed the watermark. The largest coefficients of these block SVD transformations
are so modified according to the message bits such that the image quality is not
degraded.
Two Dither quantizers [16] were used to shift the quantization levels to T/2 with
respect to each other. The largest coefficients of the D matrices of 8X8 blocks are
quantized using either quantizer1 or quantizer 2 depending upon the watermark bit to
be embedded. The number of 8X8 blocks in the host image partition should be equal
to the size of the watermark. The entire range of these largest coefficients is divided
into ‘n’ number of bins with a step size of T as shown in table 4.2. Each of the
coefficients is modified either to or
depending on the value of the watermark bit which is
either 0 or 1 respectively.
Bin Number dlow dhigh
1 dmin-T dmin
2 dmin dmin+T
….. ….. …..
bn-1 dmax-T dmax
bn dmax dmax+T
53
Table 4.2: Quantization table for n bins with step size T
Here, low (n) and high (n) represent the low and high levels of the bin ‘n’ to which
each coefficient belongs. The new quantized value is the center of the quantizer.
After the modification of the singular values, inverse SVD is applied.
For retrieving the embedded watermark the block SVD transformation on the
watermarked image is applied and the largest coefficients of these matrices are
extracted and checked for the bin position in the quantization table. Now if the
coefficient value lies in the range the watermark bit is
suggestively 1 or if it lies in the range the
corresponding watermark bit is 0.
Robustness of the method against attacks and imperceptibility can be improved with
the number of bins and decrease in the step size. Security can be enhanced by using a
secret key for permuting the watermark before embedding and then using the same
key at the retrieving side to permute the watermark obtained to obtain the original
watermark.
A modified approach was proposed in [17] by using edge detector before taking the
block SVD transformation. Canny edge detector was applied on the entire cover
image and then number of edges was calculated for all 8 X 8 non overlapping blocks.
Now using a threshold
4.2.6 EMBEDDING WATERMARK IN ‘U’ MATRIX
A modification is proposed in the algorithm presented in [16] for embedding the
watermark in U matrix of SVD. The image is divided into 8 X 8 blocks and
watermark image is embedded in the columns of each block of U matrix. For each
block of U matrix the first row, first column element and second row, first column
elements are modified based on their difference compared with a threshold.
54
The difference of these two elements is found and modified according to the
following proposed equations.
If watermark bit is 1 and the difference is greater than a threshold or watermark bit is
0 and the difference is less than the threshold,
. 4.11
And, . 4.12
If watermark bit is 1 and the difference is less than threshold or watermark bit is 0
and the difference is less than the threshold,
. 4.13
And, . 4.14
After the coefficients of the U matrix are modified, the inverse SVD is applied to
each block. To recover the embedded watermark, SVD transformation is applied on
each block of the watermarked image. The number of blocks in which the
watermarked image is divided at the retrieving end should be same as that used at the
embedding end. For each block, the first row, first column and the second row, first
column elements are compared. The watermark bit is suggestively 1 if the first row,
first column element is greater and is not the watermark bit is suggestively 0.
To increase the security, the watermark can be permuted before embedding using a
secret key[16]. The same key is used at the other end to recover the original
watermark. To increase the robustness of the algorithm discussed in section 4.2.5, the
edge detector[17] can be first applied to the image blocks to choose the block to
embed the watermark in, according to some threshold value based on number of
edges present in each block..
55
4.3 DISCRETE WAVELET TRANSFORM
Although the Fourier Transform has been the mainstay of transform based image
processing, but the Wavelet Transform makes it even easier to compress, transmit
and analyze many images. Discrete Wavelet Transform (DWT) allows images to be
viewed and processed at multiple resolutions and provides a powerful insight into an
image’s spatial and frequency characteristics. It separates an image into a lower
resolution approximation image (LL) as well as horizontal (HL), vertical (LH) and
diagonal (HH) detail components. The process can then be repeated to computes
multiple “level” wavelet decomposition [12], as in the level 2 wavelet transform
shown below in figure 4.3.
Figure 4.3: Level 2 Discrete Wavelet Transform
The term Discrete Wavelet Transform refers to a class of transformations that differ
not only in the transformation kernels employed, but also the fundamental nature of
those functions and in the way in which they are applied. Since the DWT
encompasses a variety of unique but related transformations, a single equation cannot
completely describe it. Instead each DWT is characterized by a transform kernel pair
or set of parameters that defines the pair. The basis functions of DWT are based on
small waves, called wavelets, of varying frequency and limited duration.
The Fast Wavelet Transform (FWT) is a computationally efficient implementation of
the DWT that exploits the relationship between the coefficients of the DWT at
adjacent scales.
4.3.1 WAVELETS
56
The first recorded mention of what we now call a "wavelet" seems to be in 1909, in a
thesis by Alfred Haar. The attention of researchers gradually turned from frequency-
based analysis to scale-based analysis when it started to become clear that an
approach measuring average fluctuations at different scales might prove less
sensitive to noise.
Any discussion of wavelets begins with Haar wavelet, the first and simplest. Haar
wavelet is discontinuous, and resembles a step function.
Ingrid Daubechies, one of the brightest stars in the world of wavelet research,
invented what are called compactly supported orthonormal wavelets -- thus making
discrete wavelet analysis practicable. The names of the Daubechies family wavelets
are written dbN, where N is the order, and db the "surname" of the wavelet. The db1
wavelet is the same as Haar wavelet.
The third family of wavelets, called biorthogonal wavelets, exhibits the property of
linear phase, which is needed for signal and image reconstruction. By using two
wavelets, one for decomposition and the other for reconstruction instead of the same
single one, interesting properties are derived.
4.3.2 PROPERTIES OF DISCRETE WAVELET TRANSFORM
The DWT kernels possess the following general properties:
1. Separability, scalability and translatability:
The kernels can be represented as three separable 2-D wavelets,
, 4.15
57
where , and are called horizontal, vertical and
diagonal wavelets respectively and one separable 2-D scaling function
. 4.16
Each of these 2-D functions is the product of two 1-D real, square-integrable
scaling and wavelet functions
. 4.17
Translation k determines the position of these 1-D functions along the x-axis,
scale j determines their width along x and 2j/2 controls their height or amplitude.
2. Multiresolution compatibility:
The 1-D scaling function satisfies the following requirements of multiresolution
analysis:
(a) is orthogonal to its integer translates.
(b) The set of functions that can be represented as a series expansion of
at low scales or resolutions is contained within those that can be
represented at higher scales.
(c) The only function that can be represented at every scale is f(x) = 0.
(d) Any function can be represented with arbitrary precision as .
When these conditions are met, there is a companion wavelet , that together
with its integer translates and binary scalings, spans the difference between any
two sets of representable functions at adjacent scales.
3. Orthogonality:
58
The expansion function forms an orthonormal or biorthogonal basis for the set of
1- D measurable, square integrable functions. To be called a basis, there must be
a unique set of expansion coefficients for every representable function.
4.3.2 ADVANTAGES AND DISADVANTAGES OF DWT OVER DCT
Advantages of DWT over DCT [12]
1) Wavelet transform understands the HVS more closely than the DCT.
2) Wavelet coded image is a multi-resolution description of image. Hence an image
can be shown at different levels of resolution and can be sequentially processed from
low resolution to high resolution.
3) Visual artifacts introduced by wavelet coded images are less evident compared to
DCT because wavelet transform doesn't decompose the image into blocks for
processing. At high compression ratios blocking artifacts are noticeable in DCI;
however, in wavelet coded images it is much clearer.
4) DFT and DCI are full frame transform, and hence any change in the transform
coefficients affects the entire image except if DCT is implemented using a block
based approach. However DWT has spatial frequency locality, which means if signal
is embedded it will affect the image locally. Hence a wavelet transform provides
both frequency and spatial description for an image.
Disadvantages of DWT over DCT
1) Computational complexity of DWT is more compared to DCT' . As Feig (1990)
pointed out it only takes 54 multiplications to compute DCT for a block of 8x8,
unlike wavelet calculation depends upon the length of the filter used, which is at least
1 multiplication per coefficient.
4.3.3 EMBEDDING CDMA WATERMARK INTO HORIZONTAL AND
VERTICAL SUB-BAND
59
Figure 4.3: model to embed watermark into the DWT coefficients.
The main idea of embedding CDMA watermark is to embed randomly generated PN
sequence into the horizontal, vertical or diagonal components [21] of the DWT
coefficients as shown in figure 4.3.
The PN sequences are embedded into the horizontal and vertical component
coefficients with certain gain k, when the watermark bit is zero, according to the
following equation:
Hz = Hz + k * PN sequence for horizontal component
Vz = Vz + k * PN sequence for vertical component
where, Hz represents the coefficients of horizontal component and Vz represents the
coefficients of vertical component.
The method used for recovery of the watermark is also very simple. The two PN
sequences for horizontal and vertical component respectively are regenerated and
their correlations with the horizontal and vertical component coefficients are found.
If the average correlation crosses the threshold set at the mean correlation, the
watermark bit is assumed to be 0 else 1.
4.3.4 WATERMARK EMBEDDING USING SECOND LEVEL DWT
DECOMPOSITION
Some of the conventional DWT watermarking techniques as discussed in section
4.3.2, embeds the watermark in the coefficients of first level DWT. The second level
decomposition [36] is performed by either decomposing the approximation sub-band
obtained from the first level decomposition as shown in figure 4.4 (a) or it is
60
performed on the detail sub-band resulting from the first level decomposition as
shown in figure 4.4 (b). Here, L represents the approximation sub-band, HL
represents the horizontal sub-band, LH represents the vertical, and HH represents
diagonal sub-band.
(a) (b)
Figure 4.4: (a) Second level decomposition of approximation sub-band. (b) Second level decomposition of horizontal sub-band.
To embed the watermark in the horizontal sub-band [36] of the second level
decomposition, the horizontal detail information is obtained by decomposing the
image using DWT. These horizontal details are further decomposed using DWT.
Now, as for CDMA technique, a PN sequence is generated and whenever the
watermark bit is 0, the PN sequence is added to these coefficients with some gain, k.
Lastly, Inverse DWT is taken twice to obtain the watermarked image.
To recover the watermark [36] back, the watermarked image is decomposed using
DWT and the obtained horizontal detail is decomposed again. PN sequence is
generated and its correlation with the horizontal detail coefficients is computed. If
the correlation is greater than a threshold the watermark bit is set to 0, else 1.
Horizontal sub-band [36] is chosen because embedding in the approximation sub-
band produces perceptible artifacts in the watermarked image. The technique can be
made secure by using a secret key for embedding and recovery of the watermark.
4.4 HYBRID WATERMARK EMBEDDING TECHNIQUES
61
Many techniques have been proposed using two or more of the transforms. [23] gives
an algorithm which uses DCT and SVD together to watermark the image, such that
the watermark is embedded in all frequencies of DCT. After applying the DCT to the
cover image, we map the DCT coefficients in a zig-zag order into four quadrants as
shown in figure 4.5, and apply the SVD to each quadrant. These four quadrants
represent frequency bands from the lowest to the highest. The singular values in each
quadrant are then modified by the singular values of the DCT-transformed visual
watermark.
Figure 4.5: Mapping of DCT coefficients into the 4 blocks.
The four sets of modified DCT coefficients are mapped back to their respective
positions and inverse DCT is calculated to obtain watermarked image.
For recovery of the four watermarks, the coefficients of the DCT transformed
watermarked image are mapped into the four quadrants and SVD are calculated for
each. The DCT coefficients of the four watermarks are obtained using the the
singular vectors and inverse DCT is obtained.
Another example of hybrid watermarking technique is presented in [22] which uses
Discrete Cosine Transform and Discrete Hartley transform along with edge
detection. The technique divides the image into non-overlapping blocks and then
these blocks are sorted in decreasing order of the number of edges present. The
watermark is embedded block by block in different blocks of the image. The decision
whether to embed in DHT domain or in DCT domain is based on the number of
edges which exist in a given block in the image to be watermarked.
Yet another variation in the combination of techniques used is presented in [27],
which combines the spatial domain LSB technique with the transform domain DCT
and compression technique on raw images to increase the security of the payload.
62
Initially, the LSB algorithm is used to embed the payload bits into the cover image to
derive the stego image which is then transformed from spatial domain to the
frequency domain using DCT. Finally quantization and run length coding algorithms
are used for compressing the stego image to enhance the security.
CHAPTER 5
PERFORMANCE ANALYSIS OF
WATERMARKING TECHNIQUES
Each of the watermarking technique discussed so far has its own pros and cons.
However to judge the performance of these, they should be analyzed on the same
platform. The performance evaluation is based on various performance metrics.
5.1 Measuring Imperceptibility
Imperceptibility of an embedded watermark can be expressed either as fidelity or
quality measure. Fidelity represents a measure of similarity between the original and
watermarked cover.
An important way of evaluating watermarking algorithms for fidelity is to compare
the amount of distortion introduced into a host image by a watermarking algorithm.
The widely used peak signal-to-noise ratio (PSNR) measurement [8,12,40] which
measures the maximum signal to noise ratio found on an image is used as an
objective measure for the distortions introduced by the watermarking system. The
PSNR is given by [8,12]:
5.1
where MSE is mean square error between the original image Iorg and the watermarked
one Iw. The MSE is defined as [8]:
63
5.2
Where, M and N are the image dimensions. When SNR approaches infinity, the
original image and output image are totally the same. SNR provides only a rough
approximation of the quality of the watermark as it does not take into account, the
Human Visual System (HVS). The evaluation relies strictly on the observations
under varied conditions.
5.2 Measuring Robustness
Some of the early literature considered a binary robustness metric that only allows
for two different states (the watermark is either robust or not). However, it makes
sense to use a metric that allows for different levels of robustness. The use of the bit-
correct ratio (BCR) has become common recently, as it allows for a more detailed
scale of values. The bit correct ratio (BCR) is defined as the ratio of correct extracted
bits to the total number of embedded bits and can be expresses using the formula:
5.3
Where, l is the watermark length, Wn corresponds to the nth bit of the embedded
watermark and W'n corresponds to the nth bit of the recovered watermark.
5.3 Measuring Execution Time
Another important tool for evaluating algorithms is measurement of the amount of
time required to embed a watermark into a host image, and then extract it afterwards.
The actual time in CPU cycles will be used as a measure of execution time.
5.4 Measuring Payload
64
Payload or capacity simply refers to the size of watermark that can be embedded in
the cover image. The size is in terms of bits. Payload or capacity is another important
characteristic because it has a direct negative impact on the robustness.
CHAPTER 6
RESULTS AND DISCUSSIONS
Various techniques were discussed in the previous chapters of the thesis for spatial
domain and transform domain watermarking. The first part of the thesis is to
implement these techniques in MATLAB and then in the second part, based on the
results obtained; these algorithms are analyzed for their performance based on the
performance metrics discussed in chapter 5.
6.1 IMAGES USED
The cover image used as cover object is a 512 X 512, 8-bit, .bmp image with 256
gray levels, Lena.bmp as shown in figure 6.1(a). The different images used as
watermark are shown in figure 6.1 (b)-(d). These are the versions of the copyright
image differing in their sizes. The image shown in figure 6.1 (b)-(d) are binary
images of sizes 512 X 512, 20 X 50 and 9 X 12 respectively.
65
(a) (b)
(c) (d)
Figure 6.1: Images (a) cover image (b) copyright large (c) copyright (d) copyright small
The choice of watermark image for each algorithm depends upon the capacity of the
data the technique can hide in a given sized cover object.
6.2 SPATIAL DOMAIN TECHNIQUES
Based on the discussions about different spatial domain techniques in chapter 3,
following algorithms are implemented in MATLAB.
1. Simple LSB substitution.
2. LSB substitution with a random walk.
3. Comparison based correlation.
4.
6.2.1 ALGORITHM 1: SIMPLE LSB SUBSTITUTION
Embedding:
Input: cover image, watermark
66
Output: watermarked image
1. Read watermark.
2. Convert the watermark into binary.
3. Read the cover image.
4. Set the LSB plane of cover image (i,j) to the value of watermark (i,j).
Recovery:
Input: watermarked image
Output: retrieved watermark
1. Read watermarked image.
2. Extract the LSB plane from the watermarked image.