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

Chapter 1

INTRODUCTION
Watermarking has been considered to be a promising solution that can protect the copyright
of multimedia data through Trans coding, because the embedded message is always included in
the data. However, today, there is no evidence that watermarking techniques can achieve the
ultimate goal to retrieve the right owner information from the received data after all kinds of
content-preserving manipulations. Because of the fidelity constraint, watermarks can only be
embedded in a limited space in the multimedia data. There is always a biased advantage for the
attacker whose target is only to get rid of the watermarks by exploiting various manipulations in
the finite watermarking embedding space.
Now a day the availability of the digital data such as images, audio and video etc. to the
public exponentially increases through the internet. At the same time, it is becoming a challenge
to provide the ownership for the creators from the unauthorized persons who are duplicating their
data or work. Hence we have to design the methods for digital data to provide copyright
protection, content authentication, proof of ownership, etc.
There are many solutions that have been proposed like Cryptography, Steganography and
Watermarking. The watermarking technique provides one of the best solutions among them. This
technique embeds information so that it is not easily perceptible to the others. The embedded
watermark should not degrade the quality of the image and should be perceptually invisible to
maintain its protective secrecy.
In this project we have implemented the watermarking technique which involves the steps of
hiding one image (watermark image) into another image (cover image) based on Discrete
Wavelet Transform, Discrete Cosine Transform and Singular Value Decomposition respectively.
Further the attacks are inserted on the watermarked image to show different types of noisy
effects on it and then in the final step the watermark image is extracted back from this attacked
watermarked image and quality of extracted watermark image is compared with the original
watermark image.

1.1 Need of Project


1

We are in need of getting the good quality of extracted watermark image. The images
extracted using previous techniques were not enough to fulfill our desired quality standards
requirement and also the techniques were not fully robust to attacks. So, here we are designing
this project which will be robust to all different types of attacks and also the watermark image
extracted using this method will be helpful to achieve that standard of quality which is required.
This technique is really helpful in security applications where focus is on hiding the image inside
image.

1.2 Existing System


Protection of digital contents has relied for a long time on encryption though it is evident that
encryption alone is not sufficient to protect digital data. In fact, when a digital content is
decrypted to be eventually presented to the consumer, the protection offered by encryption no
longer exists and a user may duplicate or manipulate the content. Digital watermarking has
consequently been introduced as a complementary mean to enforce intellectual property rights.
The watermark is a digital code irremovably, robustly, and imperceptibly embedded in the host
data and typically contains information about origin, status, or destination of the data. The role of
the embedded information can be manifold.
For copyright protection, the watermark information can refer to the rights holder. If this
information is detected, it can prevent illicit usage of the content or can be used as a proof of
ownership. Another option is to use the watermark as a fingerprint. Using a watermarking
scheme, a fingerprint identifying the buyer is embedded in every sold copy. If an illegal is found
copy appears, the watermark permits to trace back to the guilty buyer.
Distortion occurs in both the pixel values and the geometric boundary of the rescanned
image. The distortion of pixel values is caused by (1) the luminance, contrast, gamma correction
and chrominance variations, and (2) the blurring of adjacent pixels. These are typical effects of
the printer and scanner, and cause perceptible visual quality changes to a rescanned image.
To design a watermarking scheme that can survive geometric distortion as well as pixel value
distortion is important. There has been much emphasis on the robustness of watermarks to pixel
value distortions such as compression and signal filtering. However, recently it has become clear
that even very small geometric distortions may break the watermarking method. This problem is
2

most severe when the original un-watermarked image is unavailable to the detector. Conversely,
if the original image is available to the detector, then the watermarked image can often be
registered to the original and the geometric distortion thereby inverted.
However, public watermarking requires that detection of the watermark be performed
without access to the original un-watermarked image. As such, it is not possible to invert the
geometric distortion based on registration of the watermarked and original images. Before
proceeding further, it is important to define what we mean by geometric distortions. Specifically,
we are interested in the situation in which a watermarked image undergoes an unknown rotation,
scale and/or translation prior to the detection of the watermark. The detector should detect the
watermark if it is present. This definition is somewhat obvious, so it may be more useful to
describe what we are not interested in. In particular, some watermark algorithms claim
robustness to scale changes by first embedding a watermark at a canonical scale, then changing
the size of the image and finally, at the detector, scaling the image back to the canonical size
prior to correlation. In our opinion, the detector does not see a scale change. Rather, the process
is more closely approximated by a low pass filtering operation that occurs when the image is
reduced in size. Similarly, tests that rotate an image by some number of degrees and
subsequently rotate the image by the same amount in the opposite direction are not adequate tests
of robustness to rotation. The same is true for translation.
These all existing techniques were having some drawbacks like

False positive problem

Diagonal line problem

Less value of PSNR

High value of Mean Square Error

Less value of Correlation coefficient

1.3 Proposed System


The proposed Watermarking scheme is implemented as in two phases first watermarking and
then extraction. First on image we will apply Haar wavelet transform and will get four sub band
images. On sub band we are applying first DCT and on that DCT matrix we are going to apply
SVD in all values. Then the watermarking step is performed by scaling down the pixel values of
3

watermark and then embedding those values into the cover image. After this the watermarked
image is obtained on which various attacks are applied in order to achieve the robustness in
watermarking. Then we follow the extraction phase where we apply again the Haar wavelet
transform, DCT and SVD and extract the watermark under attacks. Finally the correlation is
determined between the watermark extracted and original watermark as a measure of comparison
of quality of image. This proposed techniques has tried to overcome all issues occurring in
existing models and providing the better quality of image after extraction phase.

1.4 Problem Description


The main motive to implement this project is to solve the problems arising like False
Positive problem and Diagonal Line problem. Also, the problem of less PSNR and less
correlation coefficient after extraction phase is to be resolved here. Keeping these things in mind
only we are implementing this project so that we can be able to extract the image having a good
quality of pixels and also if any type of attack is also inserted in channel then also the effect of
this attack should be nullified.

1.5 Project Limitations


This technique is only applicable to the images having resolution of even size as we are here
first splitting the image into sub-bands which requires bands to get split in one fourth resolution
of original one. Also the resolution of watermark image should be less than the resolution of
cover image and again it also should be in even size. Again, the extracted watermark image here
is not having 100% same quality as of original rather it is limited to some 91-99%.

1.6 Project Methodologies


To implement the proposed technique we are using basically the following methods in both
embedding section and also in extraction phase. These techniques have been further discussed in
detail in subsequent chapters.

Discrete Wavelet Transform (DWT)

Discrete Cosine Transform (DCT)

Singular Value Decomposition (SVD)


4

1.7 Software Specifications


This project has been implemented in MATLAB software package using simple MATLAB
scripting. For designing our project the requirements are as follow

Minimum Hardware Requirement specification:


1. Intel Pentium IV Processor,
2. 1 GB RAM
3.

20 GB HDD

Minimum Software Requirement Specification:


1. Operating System: Windows XP SP-3, Windows 7
2. MATLAB 2011a

MATLAB (MATrix LABoratory) is a numerical computing environment and fourthgeneration programming language. Developed by Math Works, MATLAB allows matrix
manipulations, plotting of functions and data, implementation of algorithms, creation of user
interfaces, and interfacing with programs written in other languages, including C, C++, Java, and
FORTRAN.
MATLAB is an interactive system for doing numerical computations. A numerical analyst
called Cleve Moler wrote the first version of MATLAB in the 1970s. It has since evolved into a
successful commercial software package. MATLAB relieves you of a lot of the mundane tasks
associated with solving problems numerically. This allows you to spend more time thinking, and
encourages you to experiment. MATLAB makes use of highly respected algorithms and hence
you can be confident about your results. Powerful operations can be performed using just one or
two commands. You can build up your own set of functions for a particular application.
Excellent graphics facilities are available, and the pictures can be inserted into LATEX and
Word documents.
Jack Little joined Cleve and Steve Bangert to found the Math Works in 1984 and a developed
C rewrite of MATLAB. MATLAB was first adopted by control design engineers, Little's
specialty, but quickly spread to many other domains. It is now also used in education, in
particular the teaching of linear algebra and numerical analysis, and is popular amongst scientists

involved with image processing. MATLAB began with 80 functions simple matrix calculator,
portable machine graphic. Now it has over 8000 functions. MATLAB engines incorporated the
LAPACK and BLAS libraries, embedding the state of the art software for matrix computation.
MATLAB is an interactive system whose basic data element is an array that does not require
dimensioning. This allows you to solve many technical computing problems, especially those
with matrix and vector formulations, in a fraction of the time it would take to write a program in
a scalar non interactive language such as C or FORTRAN.
MATLAB has evolved over a period of years with input from many users. In university
environments, it is the standard instructional tool for introductory and advanced courses in
mathematics, engineering, and science. In industry, MATLAB is the tool of choice for high
productivity research, development, and analysis.
MATLAB is an interactive environment and programming language for numeric scientific
computation. One of its distinguishing features is the use of matrices as the only data type. In
MATLAB, a matrix is a rectangular array of real or complex numbers. All quantities, even loop
variables and character strings, are represented as matrices, although matrices with only one row,
or one column, or one element are sometimes treated specially.
MATLAB is a high-performance language for technical computing. It integrates
computation, visualization, and programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation. Typical uses include

Math and computation

Algorithm development

Data acquisition

Modeling, simulation, and prototyping

Data analysis, exploration, and visualization

Scientific and engineering graphics

Application development, including graphical user interface building

MATLAB features a family of add-on application specific solutions called toolboxes. Very
important to most users of MATLAB, toolboxes allow you to learn and apply specialized
6

technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that


extend the MATLAB environment to solve particular classes of problems. Areas in which
toolboxes are available include signal processing, control systems, neural networks, fuzzy logic,
wavelets, simulation, and many others.
This is the set of tools and facilities that help you use MATLAB functions and files.
Many of these tools are graphical user interfaces. It includes the MATLAB desktop and
Command Window, a command history, an editor and debugger, a code analyzer and other
reports, and browsers for viewing help, the workspace, files, and the search path.

Fig 1.1: Layout of MATLAB Window

MATLAB includes lots of toolboxes (like libraries in C or Java). We are mainly going to use
Image Processing toolboxes, Wavelet toolboxes and mathematical toolboxes for implementing
our project.
Wavelet Toolbox provides functions and an app for developing wavelet-based algorithms for
the analysis, synthesis, denoising, and compression of signals and images. The toolbox lets us
explore wavelet properties and applications such as speech and audio processing, image and
video processing, biomedical imaging, and 1-D and 2-D applications in communications and
geophysics.
Image Processing Toolbox provides a comprehensive set of reference-standard algorithms,
functions, and apps for image processing, analysis, visualization, and algorithm development.
You can perform image enhancement, image deblurring, feature detection, noise reduction,
image segmentation, geometric transformations, and image registration. Many toolbox functions
are multithreaded to take advantage of multicore and multiprocessor computers.
Image Processing Toolbox supports a diverse set of image types, including high dynamic
range, gigapixel resolution, embedded ICC profile, and tomographic. Visualization functions let
you explore an image, examine a region of pixels, adjust the contrast, create contours or
histograms, and manipulate regions of interest (ROIs). With toolbox algorithms you can restore
degraded images, detect and measure features, analyze shapes and textures, and adjust color
balance.
Math Toolbox provides functions for solving and manipulating symbolic math expressions
and performing variable-precision arithmetic. You can analytically perform differentiation,
integration, simplification, transforms, and equation solving. You can also generate code for
MATLAB, Simulink, and Simscape from symbolic math expressions.
Symbolic Math Toolbox includes the MuPAD language, which is optimized for handling and
operating on symbolic math expressions. It provides libraries of MuPAD functions in common
mathematical areas such as calculus and linear algebra and in specialized areas such as number
theory and combinatorics. You can also write custom symbolic functions and libraries in the
MuPAD language. The MuPAD Notebook app lets you document symbolic math derivations
with embedded text, graphics, and typeset math.
8

1.8 Watermarking Applications

One application of digital watermarking is source tracking. A watermark is


embedded into a digital signal at each point of distribution. If a copy of the work is
found later, then the watermark may be retrieved from the copy and the source of the
distribution is known. This technique reportedly has been used to detect the source
of illegally copied movies.

Another very important application is owner identification. Being able to identify the
owner of a specific digital work of art, such as a video or image can be quite
difficult.

Transaction tracking is another interesting application of watermarking. In this case


the watermark embedded in a digital work can be used to record one or more
transactions taking place in the history of a copy of this work.

Copy control is a very promising application for watermarking. In this application,


watermarking can be used to prevent the illegal copying of songs, images of movies,
by embedding a watermark in them.

1.9 Structure of Report


The outline of the thesis is as follows: Chapter 2 discusses literature survey on different
watermarking techniques. Chapter 3 describes about Discrete Wavelet Transform. In Chapter 4,
Discrete Cosine Transform is described. Chapter 5 presents Singular Value Decomposition
technique. In Chapter 6, watermarking and its applications have been discussed. In Chapter 7,
Implementation of our proposed watermarking technique in MATLAB is discussed. Chapter 8
presents the results and evaluations of the approach discussed. In Chapter 9, conclusions are
drawn and future work is outlined.

Chapter 2
Literature Survey
The task of watermarking and extraction has attracted much attention both from security
applications designers and from computer vision scientists. This chapter gives a literature survey
on state of the art watermarking algorithms. The following research papers focus on variety of
issues.
1.) Y. Shantikumar Singh, B. Pushpa Devi and Kh. Manglem Singh proposed A review of
different techniques on Digital Image Watermarking Scheme, IJER, 2013.
Digital Watermarking technique is becoming more important in the developing society of
Internet. It is being used as a key solution to make the data transferring secure from illegal and
unauthorized access. In this paper, the two main domains of watermarking have been discussed
viz. Spatial (pixel) and Transform (frequency) Domains. In spatial (pixel) domain, the watermark
is inserted in the cover image changing pixels or image characteristics. The robustness against
unauthorized alteration of a single bit in every consecutive 8-bits of length is enhanced by the
incorporation of parity checking. Watermark message is cut into numerous pieces and each piece
of message is inserted at different spots, hence, if a piece of message is lost in one spot, the error
correct decoding can be employed to possibly retrieve the same information from other spots.
Compared to spatial domain, frequency domain techniques are more applied. The objective of
this technique is to insert the watermarks in the spectral coefficients of the image. Most
commonly used transforms are the Discrete Cosine Transform (DCT), Discrete Fourier
Transform (DFT), and Discrete Wavelet Transform (DWT). The Discrete Wavelet Transforms
(DWT) and the Discrete Cosine Transforms (DCT). Now days these are being used with the
combination of SVD, which al together provides robustness.
In this paper, some of the recent watermarking algorithms have been reviewed and a
classification is proposed based on their intrinsic features, inserting methods and extraction
forms. Discrete Cosine Transform (DCT) is like Discrete Fourier Transform (DFT) technique
used for converting a signal into frequency components. The 2D-DCT of a given matrix gives
the frequency coefficient in the form of another matrix. Watermarking with DCT techniques are
10

robust as compared to spatial domain techniques. Such algorithms are robust on image
processing operation like low pass filtering, brightness and contrast adjustment, blurring etc. On
the other hand Discrete Wavelet Transform (DWT) is a mathematical tool used for decomposing
any image. Wavelet transform provides both frequency and spatial description of an image. The
wavelet transform decompose the image in four channels (LL, HL, LH and HH) with the same
bandwidth thus creating a multi-resolution perspective. Due to this advantage the watermark can
embed in any of the frequency bands and on inverse transform the watermark will be distributed
throughout the low and high frequencies as well as in the spatial domain. Singular Value
Decomposition (SVD) is numerical analysis tool in linear algebra, which is being used in many
applications of signal processing. It decomposes a matrix with a little error. It is used to provide
robustness characteristics to the image.
2.) Yashovardhan Kelkar, Heena Shaikh and Mohd. Imran Khan proposed Analysis of
robustness of hybrid digital image watermarking technique under various attacks,
IJCSMC, 2013.
This paper analyzed the robustness of hybrid digital image watermarking as compared to
DCT, DWT, SVD methods watermarking. Imperceptibility means that the perceived quality of
the host image should not be distorted by the presence of watermark. Peak Signal to Noise Ratio
(PSNR,

calculated in dB) which is based on Mean Square Error (MSE) is typically used to

calculate imperceptibility. PSNR properties does not take into account image properties such as
flat and textured regions. If, the watermark is embedded in textured regions and into edges, the
PSNR is inadequate to measure its quality in this case. So, the weighted PSNR (wPSNR) has
been defined as an extension to PSNR. Hybrid watermarking method satisfies all requisites of an
ideal watermarking scheme i.e., imperceptibility, robustness and good capacity along with robust
against different kind of attacks such as Gaussian noise, salt & pepper attacks, JPEG
compression, rotation through an angle etc. The DCT-SVD based method is very time
consuming because it offers better capacity and imperceptibility. DWT-SVD method is also
similar to DCT-SVD scheme except that the process was fast.
3.) Sabyasachi Padhihary proposed Digital watermarking Based on Redundant Discrete
Wavelet Transform and Singular Value Decomposition, IJARCSSE, 2013.

11

The ownership problem of digital multimedia content is a major problem of concern today.
The high speed of Internet allows a person to transfer the multimedia content like image, audio,
video very easily, but the transferred data is vulnerable as any hacker can easily modify it.
Watermarking is the proposed solution to this problem in which we embed a signal normally
known as watermark in the original data to protect it from the hackers and the watermark can be
detected whenever required. Some of the requirements which a watermarking technique has to
satisfy are Undeletable, Perceptually Invisible, Unambiguous, Non-Inevitability. SVD is widely
used because singular values shows good stability to different attacks but implementing SVD
alone is very costly, as a result hybrid watermarking schemes are proposed. In most of the SVD
based watermarking techniques there exists a drawback i.e. The False Positive Problem. In all
these techniques only the singular value of the watermark image was embedded. To avoid this
problem Jain et al. proposed the concept of principal component. According to this algorithm the
left singular vectors (U) and the right singular vectors (V) also contain significant information.
The principal component of the watermark can be calculated by multiplying the left singular
vectors and the singular vectors obtained after doing SVD on watermark image.

In this paper, RDWT-SVD scheme of watermarking has been proposed which overcomes the
drawbacks of DWT based watermarking scheme (which is a most commonly used watermarking
technique). RDWT method eliminates the down-sampling and up-sampling coefficients as a
result the redundancy is achieved. Thus RDWT based watermarking schemes are more robust
than DWT based watermarking scheme. The redundancy in DWT provides robustness to the
watermark image. As the embedding of watermark image occurs in all sub-bands, the principle
components of the watermark image are embedded into the host image so that the false positive
problem can be avoided and more information can be transferred. The proposed RDWT-SVD
scheme satisfies the capacity, robustness and imperceptibility. To evaluate the quality of
watermarked image Peak Signal to Noise Ratio (PSNR) is calculated and to evaluate robustness
of the watermarked image Normalized Cross-Correlation (NC) can be calculated.
4.) G. Sudheer and G. V. Sridhar proposed Implementation of robust watermarking
technique using SVD algorithm with GUI representation, IJARCSMS-2014.

12

This paper proposed invisible image watermarking algorithm based on Singular Value
Decomposition (SVD) to prevent the copy or hostilely modification of the products. An effective
watermarking algorithm should have certain characteristics such as robustness, security,
invisibility, adequate capacity of information etc. In spatial domain watermarks, the pixel value
of the image is modified such as LSB while in transform domain the image is first translated
using DCT or DWT and then watermark is embedded in any of these transforms. Singular Value
Transform (SVD) is an effective numerical analysis tool used for matrices and is used in image
processing.
5.) Ruizhen Liu and Tieniu Tan proposed A SVD-BASED WATERMARKING SCHEME
FOR PROTECTING RIGHTFUL OWNERSHIP, IEEE, 2002.
Digital watermarking has been proposed as a solution to the problem of copyright protection
of multimedia documents in networked environments. There are two important issues that
watermarking algorithms need to address. Firstly, watermarking schemes are required to provide
trustworthy evidence for protecting rightful ownership; Secondly, good watermarking schemes
should satisfy the requirement of robustness and resist distortions due to common image
manipulations (such as filtering, compression, etc.). In this paper, we propose a novel
watermarking algorithm based on singular value decomposition (SVD). Analysis and
experimental results show that the new watermarking method performs well in both security and
robustness.
In this paper, a new watermarking method for digital images has been presented. The
watermark is added to the SVD domain of the original image. The mathematical background of
this method is very clear, and the error between the original image and the watermarked image
can be estimated. As a result, important questions such as how to determine the location of the
watermark and how much energy to be inserted can be answered easily. Unlike some other
unitary transformations which adopt fixed orthogonal bases (such as discrete Fourier transform,
discrete cosine transform etc.), SVD uses non-fixed orthogonal bases. It is a one-way, nonsymmetrical decomposition. These properties lead to the good performance of the novel
algorithm in both security and robustness. Furthermore, the algorithm does not require
encryption to resolve rightful ownership and can provide more powerful security for rightful
ownership if combined with encryption. Extensive experiments and comparisons with the Cox
13

method have been made. Results show that the new method is very robust against image
distortion and is considerably more robust than the Cox method.
6.) Yasunori Ishikawa, Kazutake Uehira, and Kazuhisa Yanaka proposed Optimization of
Size of Pixel Blocks for Orthogonal Transform in Optical Watermarking Technique
IEEE, 2012.
They previously proposed a novel technology with which the images of real objects with no
copyright protection could contain invisible digital watermarking, using spatially modulated
illumination. In this optical watermarking technology, we used orthogonal transforms, such as
a discrete cosine transform (DCT) or a Walsh-Hadamard transform (WHT), to produce
watermarked images, where 1-b binary information was embedded into each pixel block. In this
paper, we propose an optimal condition for a technique of robust optical watermarking that
varies the size of pixel blocks by using a trade-off in the efficiency of embedded watermarking.
We conducted experiments where 4 x 4, 8 x 8, and 16 x 16 pixels were used in one block. A
detection accuracy of 100% was obtained by using a block with 16 x 16 pixels when embedded
watermarking was extremely weak, although the accuracy did not necessarily reach 100% by
using blocks with 4 x 4 or 8 x 8 pixels under the same embedding conditions. We also examined
the effectiveness of using a Haar discrete wavelet transform (Haar DWT) as an orthogonal
transform under the same experimental condition, and the results showed that the accuracy of
detection was slightly inferior to DCT and WHT under very weak embedding conditions. The
results from experiments revealed the effectiveness of our new proposal.
They proposed an optimal condition for the size of pixel blocks of an orthogonal transform
that was used for a technique of robust optical watermarking. The experimental results proved
that it was practical and that the accuracy of detection of data embedded with optical
watermarking could be improved with more pixels in each block. They revealed that under
conditions of very weak embedded watermarking, the accuracy of detection using a block with
16 x 16 pixels reached 100%, except when Haar DWT was used to produce watermarked images
and a complicated structured image was used as an object image. They also clarified that
robustness against various disturbances became a trade-off in optimizing embedded
watermarking data, as the volume of information using blocks with 16 x 16 pixels that could be
embedded into data for the watermarked image was lower than that using blocks with 4 x 4 or 8
14

x 8 pixels. As a result, we concluded that the maximum volume of embedded bits per unit block
size under conditions of 100% accuracy of detection could be determined in optical
watermarking.
7.) Baisa L. Gunjal, R. R. Manthalkar, proposed An Overview of Transform Domain
Robust Digital Image Watermarking Algorithms, CIS Journal, 2011.
Internet and Multimedia technologies have become our daily needs. Hence it has become a
common practice to create copy, transmit and distribute digital data. Obviously, it leads to
unauthorized replication problem. Digital image watermarking provides copyright protection to
image by hiding appropriate information in original image to declare rightful ownership. Aim of
this paper is to provide complete overview of Digital Image watermarking. The study focuses on
quality factors essential for good quality watermarking, Performance evaluation metrics (PSNR
and Correlation Factors) and possible attacks. Overview of several methods with spatial and
Transform Domain watermarking is done with detail mathematical formulae, their
implementations, strengths and weaknesses. The generalized algorithms are presented for DWT,
CDMA based, DCT-DWT combined approach. The Ridgelet Transform is also introduced.
Comparative results of Digital Image Watermarking using LSB, DCT and DWT are also
presented. The paper recommends DWT based techniques for achieving Robustness in Digital
Image Watermarking.
LSB based watermarking in spatial domain is the straightforward method, but once
algorithm is discovered, watermark will be no more secured. An improvement on LSB
substitution is to use pseudo random generator to determine pixels to be used for embedding,
based on given seed or key. Security can be improved but algorithm is not still such techniques
are not completely secured.
This paper provides complete overview of Digital Image Watermarking techniques in Spatial
as well as transform domain. The Transform domain watermarking techniques are recommended
to achieve robustness. As per ISO Norms, JPEG2000 has replaced DCT by DWT. Hence more
researchers are focusing on DWT.
8.) L. Robert and T.Shanmugapriya proposed A Study on Digital Watermarking
Techniques IJRTE, 2009.
15

With the widespread use of networks, intellectual properties can be obtained and reproduced
easily. This creates a high demand for content protection technique like watermarking, which is
one of the most efficient ways to protect the digital properties in recent years. This paper reviews
several aspects and techniques about digital watermarking.
The amount of data that can be embedded into audio is considerably low than amount that
can be hidden in images, as audio signal has a dimension less than two-dimensional image files.
Embedding additional information into audio sequence is a more tedious than images, due to
dynamic supremacy of HAS than HVS.

Least Significant Bit Coding

This simple approach in watermarking audio sequences is to embed watermark data by


altering certain LSBs of the digital audio stream with low amplitude.

Phase coding

The basic idea is to split the original audio stream into blocks and embed the whole
watermark data sequence into the phase spectrum of the first block.

Quantization Method

A scalar quantization scheme quantizes a sample value x and assign new value to the sample
x based on the quantized sample value.
This paper reviews various techniques for watermarking data files like text, image, audio and
video. According to the paper, we can conclude that watermarking is a potential approach for
protection of ownership rights on digital properties. According to different applications, there are
different requirements of the watermarking system. However, it is hard to satisfy all the
requirements at the same time. So, benchmark is used to evaluate and compare the performance
of different watermarking systems.
9.) G. Bhatnagar and B. Raman, proposed A new robust reference watermarking scheme
based on DWT-SVD. Computer Standards Interfaces, 2009.

16

This paper presents a new semi-blind reference watermarking scheme based on discrete
wavelet transform (DWT) and singular value decomposition (SVD) for copyright protection and
authenticity. We are using a gray scale logo image as watermark instead of randomly generated
Gaussian noise type watermark. For watermark embedding, the original image is transformed
into wavelet domain and a reference sub-image is formed using directive contrast and wavelet
coefficients. We embed watermark into reference image by modifying the singular values of
reference image using the singular values of the watermark. A reliable watermark extraction
scheme is developed for the extraction of watermark from distorted image. Experimental
evaluation demonstrates that the proposed scheme is able to withstand a variety of attacks. We
show that the proposed scheme also stands with the ambiguity attack also.
Watermarking techniques can be broadly classified into two categories: Spatial and
Transform domain methods. Spatial domain methods are less complex and not robust against
various attacks as no transform is used in them. Transform domain methods are robust as
compared to spatial domain methods. This is due to the fact that when image is inverse
transformed, watermark is distributed irregularly over the image, making the attacker difficult to
read or modify. Due to the fact of localization in both spatial and frequency domain, wavelet
transform is the most preferable transform among all other transforms.
The proposed method embeds watermark by decomposing the host image by the means of
Discrete Wavelet Transform. The watermark used for embedding is a gray scale image. First, the
reference image is formed and is used for watermark embedding. Also, we save this reference
image for the extraction process. For embedding, SVD is applied on both reference and
watermark images and the singular values of reference image is modified with the help of
singular values of watermark image. Inverse wavelet transform is performed to reconstruct the
watermarked image. The block diagram of the proposed watermarking technique is shown.
Original image is not required for the extraction. Reference image is used for the watermark
extraction. The objective of this semi blind watermark extraction is to obtain the estimate of the
original watermark. For watermark extraction from watermarked image, original image is not
required. Hence this extraction is called semi-blind.
10.)

Jain, C., Arora, S., & Panigrahi, P. K. proposed A reliable SVD based

watermarking scheme. Adsabs, 2008.


17

This proposes a novel scheme for watermarking of digital images based on singular value
decomposition (SVD), which makes use of the fact that the SVD subspace preserves significant
amount of information of an image, as compared to its singular value matrix, Zhang and Li
(2005). The principal components of the watermark are embedded in the original image, leaving
the detector with a complimentary set of singular vectors for watermark extraction. The above
step invariably ensures that watermark extraction from the embedded watermark image, using a
modified matrix, is not possible, thereby removing a major drawback of an earlier proposed
algorithm by Liu and Tan (2002).
Recently, a SVD based watermarking scheme has been proposed by Liu and Tan (2002),
which tries to take advantage of the optimal image decomposition property of SVD for
embedding a watermark in an image. It was however argued by Zhang and Li (2005), that by
taking recourse to the reference matrices of the watermark, the same can be extracted from a
possibly distorted watermarked image. The fact that SVD subspace can preserve major
information of an image, leads to the above-mentioned flaw, in which any reference watermark
that is being searched for in an arbitrary image can be found.
In this paper we have presented a singular value based watermarking scheme, where we
embed the principal components of the watermark in the original image rather than just the
singular values. The fact that the principal components have been added to the singular values of
original image achieves two useful purposes. Firstly, the information about the entire watermark
is not available without a prior knowledge of the original watermark. This is of significance for
the security of the watermark. Secondly, the method avoids the pitfall encountered by Liu and
Tan, where the watermark was modified only along the diagonals, leading to the extraction of a
reference watermark that is being searched using an arbitrary image. Hence, our method utilizes
the property of SVD based watermarking algorithms and ensures rightful ownership of the
digital watermark image.
11.)

Roman Rykaczewski proposed Comments on An SVD-Based Watermarking

Scheme for Protecting Rightful Ownership. IEEE, 2007.


This comment demonstrates that this watermarking algorithm is fundamentally flawed in that
the extracted watermark is not the embedded watermark but determined by the reference
18

watermark. The reference watermark generates the pair of SVD matrices employed in the
watermark detector. In the watermark detection stage, the fact that the employed SVD matrices
depend on the reference watermark biases the false positive detection rate such that it has a
probability of one. Hence, any reference watermark that is being searched for in an arbitrary
image can be found. Both theoretical analysis and experimental results are given to support our
conclusion.
In short, the problem has to do with the fact that their detection stage makes use of
information that is dependent on the watermark. The watermark-dependent information is so
improperly used such that it does not guarantee an objective detection outcome and creates a
false positive detection rate of one in the above example. We also note that such type of
problems has been independently addressed in a slightly different way in a recent paper.

12.)

Sha Wang, Dong Zheng and Jiying Zhao proposed An Image Quality Evaluation

Method Based on Digital Watermarking IEEE, 2007.


As a practical and novel application of watermarking, this paper presents a digital
watermarking-based image quality evaluation method that can accurately estimate image quality
in terms of the classical objective metrics, such as peak signal-to-noise ratio (PSNR), weighted
PSNR (wPSNR), and Watson just noticeable difference (JND), without the need for the original
image. In this method, a watermark is embedded into the discrete wavelet transform (DWT)
domain of the original image using a quantization method. Considering that different images
have different frequency distributions, the vulnerability of the watermark for the image is
adjusted using automatic control. After the auto-adjustment, the degradation of the extracted
watermark can be used to estimate image quality in terms of the classical metrics with high
accuracy. We calculated PSNR, wPSNR, and Watson JND quality measures for JPEG
compressed images and compared the values with those estimated using the watermarking-based
approach. We found that the calculated and estimated measures of quality to be highly
correlated, suggesting that the proposed method can provide accurate measures of image quality
under JPEG compression. Furthermore, given the similarity between JPEG and MPEG-2, this
achievement has paved the road for the practical and accurate quality evaluation of MPEG-2
19

compressed video. We believe that this achievement is of great importance to video


broadcasting.
In this paper, we presented a new image quality evaluation method based on digital
watermarking. The watermark is embedded by quantizing the DWT coefficients of the image and
the degradation of the watermark reflects the degradation of image quality. The most important
aspect of the proposed method is that the image quality evaluation of compressed images can be
achieved without the need for accessing information pertaining to the original images. The
accuracy of quality estimation is maintained by automatically adjusting the watermark
vulnerability according to the different frequency distribution of each image. Therefore, the TDR
computed at the receiver/user side can be used to estimate the image quality in terms of either
PSNR, wPSNR, or the Watson JND. The evaluations demonstrated the effectiveness of the
proposed scheme against JPEG image compression. Theoretically, the evaluation results also
apply to MPEG compression. Most importantly, one novel and significant aspect of the proposed
method is that by employing different ideal mapping curves, the method can be used to evaluate
image quality in terms of other image quality metrics, under other distortions, current or future,
as well. Being accurate, effective and future-proof, the proposed method for automatic image
quality evaluation is ideal for the monitoring of image quality for broadcasting and multimedia
applications.
13.)

Amol R. Madane, K T. Talele and M. M. Shah proposed Watermark Logo in

Digital Image using DWT IEEE, 2007.


This paper gives the idea of the method digital image watermarking algorithm which is new
popular topic for research. The Discrete wavelet is the tool used for digital image watermarking.
Wavelet transform has been applied widely in watermarking research as its excellent multi
resolution analysis property. The watermark logo is embedded based on the frequency
coefficients of the discrete wavelet transform. The detailed wavelet coefficients of low frequency
band of the host image are altered by the watermark logo. The algorithm has been tested under
the presence of attacks like Jpeg compression, bit planer reduction, cropping, warping etc. The
watermark logo is inserted in the host image in frequency domain which gets spread over the
whole part of the host image in time domain.

20

They have designed the system for digital image watermarking with a given gray scale logo
using a secret key. The system also provides for a MSE, PSNR and normalized correlation
coefficient (r) that determine the robustness of the logo in the digital image. This is necessary in
the case of fragile watermarks as they can be easily removed by basic image transformations. In
such a case the imperceptibility of the watermark helps protect it from malicious attacks.
The robust watermark is embedded in the wavelet coefficients of LL band of the image to
strengthen the watermark and against various attacks such filtering, data compressing, and other
malicious modification etc. The developed system also detects and extracts an embedded
watermark from a digital image.
The given system provides the good results against the attacks like Filtering, Jpeg
compression, and bit planer reduction, warping, cropping, and fading. Out of these, system gives
best result against Jpeg compression and worst against warping.
14.)

Emir Ganic and Ahmet M. Eskicioglu proposed Robust DWT-SVD Domain

Image Watermarking: Embedding Data in All Frequencies, Workshop Multimedia


Security, 2004.
Protection of digital multimedia content has become an increasingly important issue for
content owners and service providers. As watermarking is identified as a major technology to
achieve copyright protection, the relevant literature includes several distinct approaches for
embedding data into a multimedia element (primarily images, audio, and video). Because of its
growing popularity, the Discrete Wavelet Transform (DWT) is commonly used in recent
watermarking schemes. In a DWT based scheme, the DWT coefficients are modified with the
data that represents the watermark. In this paper, we present a hybrid scheme based on DWT and
Singular Value Decomposition (SVD). After decomposing the cover image into four bands, we
apply the SVD to each band, and embed the same watermark data by modifying the singular
values. Modification in all frequencies allows the development of a watermarking scheme that is
robust to a wide range of attacks.
In image watermarking, two distinct approaches have been used to represent the watermark.
In the first approach, the watermark is generally represented as a sequence of randomly
generated real numbers having a normal distribution with zero mean and unity variance. This
21

type of watermark allows the detector to statistically check the presence or absence of the
embedded watermark. In the second approach, a picture representing a company logo or other
copyright information is embedded in the cover image. The detector actually reconstructs the
watermark, and computes its visual quality using an appropriate measure.
15.)

Ruizhen Liu and Tieniu Tan proposed A SVD-BASED WATERMARKING

SCHEME FOR PROTECTING RIGHTFUL OWNERSHIP, IEEE, 2002.


Digital watermarking has been proposed as a solution to the problem of copyright protection
of multimedia documents in networked environments. There are two important issues that
watermarking algorithms need to address. Firstly, watermarking schemes are required to provide
trustworthy evidence for protecting rightful ownership; Secondly, good watermarking schemes
should satisfy the requirement of robustness and resist distortions due to common image
manipulations (such as filtering, compression, etc.). In this paper, we propose a novel
watermarking algorithm based on singular value decomposition (SVD). Analysis and
experimental results show that the new watermarking method performs well in both security and
robustness.
In this paper, a new watermarking method for digital images has been presented. The
watermark is added to the SVD domain of the original image. The mathematical background of
this method is very clear, and the error between the original image and the watermarked image
can be estimated. As a result, important questions such as how to determine the location of the
watermark and how much energy to be inserted can be answered easily. Unlike some other
unitary transformations which adopt fixed orthogonal bases (such as discrete Fourier transform,
discrete cosine transform etc.), SVD uses non-fixed orthogonal bases. It is a one-way, nonsymmetrical decomposition. These properties lead to the good performance of the novel
algorithm in both security and robustness. Furthermore, the algorithm does not require
encryption to resolve rightful ownership and can provide more powerful security for rightful
ownership if combined with encryption. Extensive experiments and comparisons with the Cox
method have been made. Results show that the new method is very robust against image
distortion and is considerably more robust than the Cox method.

22

2.1 Motivation
As per we have discussed the techniques proposed previously are limited up to either less
PSNR or more MSE or less normalized correlation coefficient and other problems like diagonal
line etc. We are willing to overcome these limitations of digital watermarking techniques in
addition to make it robust. Also the pixel quality of watermarked image and extracted watermark
image is one of the main concerns. The ultimate solution to these problems underlies in the
hybrid watermarking using different combinations. Out of these combinations we will use the
trio of DWT, DCT and SVD here.

23

Chapter 3
Discrete Wavelet Transform
The wavelet transform is similar to the Fourier transform (or much more to the windowed
Fourier transform) with a completely different merit function. The main difference is this:
Fourier transform decomposes the signal into sines and cosines, i.e. the functions localized in
Fourier space; in contrary the wavelet transform uses functions that are localized in both the real
and Fourier space. Generally, the wavelet transform can be expressed by the following equation:

( )

)(

where the * is the complex conjugate symbol and function is some function. This function
can be chosen arbitrarily provided that obeys certain rules.
As it is seen, the Wavelet transform is in fact an infinite set of various transforms, depending
on the merit function used for its computation. This is the main reason, why we can hear the term
Wavelet Transform in very different situations and applications. There are also many ways
how to sort the types of the wavelet transforms. Here we show only the division based on the
wavelet orthogonality. We can use orthogonal wavelets for discrete wavelet transform
development and non-orthogonal wavelets for continuous wavelet transform development. These
two transforms have the following properties:

The discrete wavelet transform returns a data vector of the same length as the
input is. Usually, even in this vector many data are almost zero. This corresponds
to the fact that it decomposes into a set of wavelets (functions) that are orthogonal
to its translations and scaling. Therefore we decompose such a signal to a same or
lower number of the wavelet coefficient spectrum as is the number of signal data
points. Such a wavelet spectrum is very good for signal processing and
compression, for example, as we get no redundant information here.

The continuous Wavelet Transform in contrary returns an array one dimension


larger that the input data. For a 1D data we obtain an image of the time-frequency
24

plane. We can easily see the signal frequencies evolution during the duration of
the signal and compare the spectrum with other signals spectra. As here is used
the non-orthogonal set of wavelets, data are correlated highly, so big redundancy
is seen here. This helps to see the results in a more humane form.
In mathematics, a wavelet series is a representation of a square-integrable (real- or complex
valued) function by a certain orthonormal series generated by a wavelet. Nowadays, wavelet
transformation is one of the most popular candidates of the time-frequency-transformations. This
article provides a formal, mathematical definition of an orthonormal wavelet and of the integral
wavelet transform.

3.1 Discrete Wavelet Transform


The discrete wavelet transform (DWT) is an implementation of the wavelet transform using a
discrete set of the wavelet scales and translations obeying some defined rules. In other words,
this transform decomposes the signal into mutually orthogonal set of wavelets, which is the main
difference from the continuous wavelet transform (CWT), or its implementation for the discrete
time series sometimes called discrete-time continuous wavelet transform (DT-CWT).
In mathematics, a wavelet series is the best representation of a square integrable (real or
complex-valued) function by certain orthonormal series generated by a wavelet. This article
provides a formal, mathematical definition of an orthonormal wavelet and of the integral wavelet
transform. The wavelet transform can provide us with the frequency of the signals and the time
associated to those frequencies, making it very convenient for its application in numerous fields.
For instance, signal processing of accelerations for gait analysis.
In numerical analysis and functional analysis, a discrete wavelet transform (DWT) is any
wavelet transform for which the wavelets are discretely sampled. As with other wavelet
transforms, a key advantage it has over Fourier transforms is temporal resolution: it captures
both frequency and location information (location in time). The discrete wavelet transform has a
huge number of applications in science, engineering, and mathematics and computer science.
Most notably, it is used for signal coding, to represent a discrete signal in a more redundant form,
often as a preconditioning for data compression.

25

( ) ( )

( )

( )

( )

Following L-level decomposition of the image f(x, y), we obtain approximation and three
detail transform coefficients
(

* (

)+

* (

)+

* (

)+

* (

)+

The wavelet can be constructed from a scaling function which describes its scaling
properties. The restriction that the scaling functions must be orthogonal to its discrete
translations implies some mathematical conditions on them which are mentioned everywhere,
e.g. the dilation equation
( )

where S is a scaling factor (usually chosen as 2). Moreover, the area between the function
must be normalized and scaling function must be orthogonal to its integer translations, i.e.

( ) (

After introducing some more conditions (as the restrictions above does not produce unique
solution) we can obtain results of all these equations, i.e. the finite set of coefficients ak that
define the scaling function and also the wavelet. The wavelet is obtained from the scaling
function as N where N is an even integer. The set of wavelets then forms an orthonormal basis
26

which we use to decompose the signal. Note that usually only few of the coefficients ak are
nonzero, which simplifies the calculation.

Fig. 3.1: Block diagram of filter banks of DWT first level

27

Fig. 3.2: Block diagram of DWT multi level


The basic thought of wavelet transform is using the same function by expanding and shifting
to approach the original signal. The wavelet coefficients carry the time-frequency information in
certain areas. It has good local characteristics both in time domain and frequency domain. It can
maintain the fine structure of the original images in various resolutions and it is convenient to
combine with human vision characteristics. Compared with the orthogonal wavelet, biorthogonal wavelet has more obvious superiority in image processing because it balances the
orthogonality and symmetry. In addition, the reconstructing signal of biorthogonal wavelet
transform is suitable to embed watermark for its balance. Daubechies9/7 wavelet is
recommended in JPEG2000. In this algorithm Daubechies9/7 biorthogonal wavelet is selected
because it is one of the most suitable biorthogonal wavelets implicated in digital watermark.

Fig 3.3: Lena image after wavelet decomposition


A digital image is decomposed into three high frequency sub bands and a low frequency sub
band by one level wavelet transform. The low frequency sub band can be decomposed
continuously. With the more levels the image is decomposed by wavelet transform, the energy of
28

the image is diffused better and the stronger image intensity can be embedded. So the wavelet
decomposing levels adopted in the algorithms should be chosen as far as possible.
The symmetry extension is adopted in wavelet decomposing process, while repeat
symmetrical extension is adopted in wavelet reconstruction process. The standard test sequence
Lena is decomposed by three-level wavelet decomposition into low frequency sub band LL3,
horizontal high frequency sub bands LH3 LH2 LH1, vertical high frequency sub band HL3 HL2
HL1 and diagonal direction high frequency sub band HH3 HH2 HH1, as shown in figure 1. (In
order to display, the high frequency sub bands coefficients are amplified.)
In the following figure, some wavelet scaling functions and wavelets are plotted. The most
known family of orthonormal wavelets is the family of Daubechies. Her wavelets are usually
denominated by the number of nonzero coefficients ak, so we usually talk about Daubechies 4,
Daubechies 6, etc. wavelets. Roughly said, with the increasing number of wavelet coefficients
the functions become smoother. See the comparison of wavelets Daubechies 4 and 20 below.
Another mentioned wavelet is the simplest one, the Haar wavelet, which uses a box function as
the scaling function.

Fig 3.4: Haar scaling function and wavelet (left) and their frequency content (right)

29

Fig 3.5: Daubechies 4 scaling function & wavelet (left) and their frequency content (right)

Fig 3.6: Daubechies 20 scaling function & wavelet (left) and their frequency content (right)
There are several types of implementation of the DWT algorithm. The oldest and most
known one is the Mallat (pyramidal) algorithm. In this algorithm two filters smoothing and
non-smoothing one are constructed from the wavelet coefficients and those filters are
recurrently used to obtain data for all the scales. If the total number of data D = 2N is used and
30

the signal length is L, first D/2 data at scale L/2N - 1 are computed, then (D/2)/2 data at scale
L/2N - 2 up to finally obtaining 2 data at scale L/2. The result of this algorithm is an array of
the same length as the input one, where the data are usually sorted from the largest scales to the
smallest ones. Within Gwyddion the pyramidal algorithm is used for computing the discrete
wavelet transform. Discrete wavelet transform in 2D can be accessed using DWT module.
Discrete wavelet transform can be used for easy and fast denoising of a noisy signal. If we
take only a limited number of highest coefficients of the discrete wavelet transform spectrum,
and we perform an inverse transform (with the same wavelet basis) we can obtain more or less
denoised signal. There are several ways how to choose the coefficients that will be kept. Within
Gwyddion, the universal thresholding, scale adaptive thresholding and scale and space adaptive
thresholding is implemented. For threshold determination within these methods we first
determine the noise variance guess given by
|

where Yij corresponds to all the coefficients of the highest scale subband of the
decomposition (where most of the noise is assumed to be present). Alternatively, the noise
variance can be obtained in an independent way, for example from the AFM signal variance
while not scanning. For the highest frequency subband (universal thresholding) or for each
subband (for scale adaptive thresholding) or for each pixel neighbourhood within subband (for
scale and space adaptive thresholding) the variance is computed as

Threshold value is finally computed as


(

Where,

)
31

When threshold for given scale is known, we can remove all the coefficients smaller than
threshold value (hard thresholding) or we can lower the absolute value of these coefficients by
threshold value (soft thresholding).

3.2 Haar Wavelet Transform


The first DWT was invented by the Hungarian mathematician Alfrd Haar. For an input
represented by a list of

numbers, the Haar wavelet transform may be considered to simply

pair up input values, storing the difference and passing the sum. This process is repeated
recursively, pairing up the sums to provide the next scale: finally resulting in

differences

and one final sum.


The frequency domain transform we applied in this research is Haar-DWT, the simplest
DWT. A 2-dimensional Haar-DWT consists of two operations: One is the horizontal operation
and the other is the vertical one. Detailed procedures of a 2-D Haar-DWT are described as
follows:
Step 1: At first, scan the pixels from left to right in horizontal direction. Then, perform the
addition and subtraction operations on neighboring pixels. Store the sum on the left and the
difference on the right as illustrated in Figure. Repeat this operation until all the rows are
processed. The pixel sums represent the low frequency part (denoted as symbol L) while the
pixel differences represent the high frequency part of the original image (denoted as symbol H).

Fig. 3.7: The horizontal operation of first row


Step 2: Secondly, scan the pixels from top to bottom in vertical direction. Perform the
addition and subtraction operations on neighboring pixels and then store the sum on the top and
32

the difference on the bottom as illustrated in Figure. Repeat this operation until all the columns
are processed. Finally we will obtain 4 sub-bands denoted as LL, HL, LH, and HH respectively.
The LL sub-band is the low frequency portion and hence looks very similar to the original
image.

Fig 3.8: The vertical operation

33

Chapter 4
Discrete Cosine Transform
A discrete cosine transform (DCT) expresses a sequence of finitely many data points in terms
of a sum of cosine functions oscillating at different frequencies. DCTs are important to numerous
applications in science and engineering, from lossy compression of audio (e.g. MP3) and images
(e.g. JPEG) (where small high-frequency components can be discarded), to spectral methods for
the numerical solution of partial differential equations. The use of cosine rather than sine
functions is critical in these applications: for compression, it turns out that cosine functions are
much more efficient (as described below, fewer functions are needed to approximate a typical
signal), whereas for differential equations the cosines express a particular choice of boundary
conditions.
In particular, a DCT is a Fourier-related transform similar to the discrete Fourier transform
(DFT), but using only real numbers. DCTs are equivalent to DFTs of roughly twice the length,
operating on real data with even symmetry (since the Fourier transform of a real and even
function is real and even), where in some variants the input and/or output data are shifted by half
a sample. There are eight standard DCT variants, of which four are common.
The most common variant of discrete cosine transform is the type-II DCT, which is often
called simply "the DCT"; its inverse, the type-III DCT, is correspondingly often called simply
"the inverse DCT" or "the IDCT". Two related transforms are the discrete sine transforms (DST),
which is equivalent to a DFT of real and odd functions, and the modified discrete cosine
transform (MDCT), which is based on a DCT of overlapping data.
The DCT, and in particular the DCT-II, is often used in signal and image processing,
especially for lossy data compression, because it has a strong "energy compaction" property (Rao
and Yip, 1990): most of the signal information tends to be concentrated in a few low-frequency
components of the DCT, approaching the Karhunen-Love transform (which is optimal in the
decorrelation sense) for signals based on certain limits of Markov processes. As explained
below, this stems from the boundary conditions implicit in the cosine functions.

34

Figure 4.1: DCT-II (bottom) compared to the DFT (middle) of an input signal (top).
A related transform, the modified discrete cosine transform, or MDCT (based on the DCTIV), is used in AAC, Vorbis, WMA, and MP3 audio compression. DCTs are also widely
employed in solving partial differential equations by spectral methods, where the different
variants of the DCT correspond to slightly different even/odd boundary conditions at the two
ends of the array. DCTs are also closely related to Chebyshev polynomials, and fast DCT
algorithms (below) are used in Chebyshev approximation of arbitrary functions by series of
Chebyshev polynomials, for example in ClenshawCurtis quadrature.
Like any Fourier-related transform, discrete cosine transforms (DCTs) express a function or a
signal in terms of a sum of sinusoids with different frequencies and amplitudes. Like the discrete
Fourier transform (DFT), a DCT operates on a function at a finite number of discrete data points.
The obvious distinction between a DCT and a DFT is that the former uses only cosine functions,
while the latter uses both cosines and sines (in the form of complex exponentials). However, this
visible difference is merely a consequence of a deeper distinction: a DCT implies different
boundary conditions than the DFT or other related transforms.
35

The Fourier-related transforms that operate on a function over a finite domain, such as the
DFT or DCT or a Fourier series, can be thought of as implicitly defining an extension of that
function outside the domain. That is, once you write a function f(x) as a sum of sinusoids, you
can evaluate that sum at any x, even for x where the original f(x) was not specified. The DFT,
like the Fourier series, implies a periodic extension of the original function. A DCT, like a cosine
transform, implies an even extension of the original function.

Figure 4.2: Illustration of the implicit even/odd extensions of DCT input data, for N=11
data points (red dots), for the four most common types of DCT (types I-IV).
However, because DCTs operate on finite, discrete sequences, two issues arise that do not
apply for the continuous cosine transform. First, one has to specify whether the function is even
or odd at both the left and right boundaries of the domain (i.e. the min-n and max-n boundaries in
36

the definitions below, respectively). Second, one has to specify around what point the function is
even or odd. In particular, consider a sequence abcd of four equally spaced data points, and say
that we specify an even left boundary. There are two sensible possibilities: either the data are
even about the sample a, in which case the even extension is dcbabcd, or the data are even about
the point halfway between a and the previous point, in which case the even extension is
dcbaabcd (a is repeated).
These choices lead to all the standard variations of DCTs and also discrete sine transforms
(DSTs). Each boundary can be either even or odd (2 choices per boundary) and can be
symmetric about a data point or the point halfway between two data points (2 choices per
boundary), for a total of 2 2 2 2 = 16 possibilities. Half of these possibilities, those where
the left boundary is even, correspond to the 8 types of DCT; the other half are the 8 types of
DST.
These different boundary conditions strongly affect the applications of the transform and lead
to uniquely useful properties for the various DCT types. Most directly, when using Fourierrelated transforms to solve partial differential equations by spectral methods, the boundary
conditions are directly specified as a part of the problem being solved. Or, for the MDCT (based
on the type-IV DCT), the boundary conditions are intimately involved in the MDCT's critical
property of time-domain aliasing cancellation. In a more subtle fashion, the boundary conditions
are responsible for the "energy compactification" properties that make DCTs useful for image
and audio compression, because the boundaries affect the rate of convergence of any Fourier-like
series.
In particular, it is well known that any discontinuities in a function reduce the rate of
convergence of the Fourier series, so that more sinusoids are needed to represent the function
with a given accuracy. The same principle governs the usefulness of the DFT and other
transforms for signal compression: the smoother a function is, the fewer terms in its DFT or DCT
are required to represent it accurately, and the more it can be compressed. (Here, we think of the
DFT or DCT as approximations for the Fourier series or cosine series of a function, respectively,
in order to talk about its "smoothness".) However, the implicit periodicity of the DFT means that
discontinuities usually occur at the boundaries: any random segment of a signal is unlikely to
have the same value at both the left and right boundaries. (A similar problem arises for the DST,
37

in which the odd left boundary condition implies a discontinuity for any function that does not
happen to be zero at that boundary.) In contrast, a DCT where both boundaries are even always
yields a continuous extension at the boundaries (although the slope is generally discontinuous).
This is why DCTs, and in particular DCTs of types I, II, V, and VI (the types that have two even
boundaries) generally perform better for signal compression than DFTs and DSTs. In practice, a
type-II DCT is usually preferred for such applications, in part for reasons of computational
convenience.

4.1 Inverse Transforms


Using the normalization conventions above, the inverse of DCT-I is DCT-I multiplied by
2/(N-1). The inverse of DCT-IV is DCT-IV multiplied by 2/N. The inverse of DCT-II is DCT-III
multiplied by 2/N and vice versa.
Like for the DFT, the normalization factor in front of these transform definitions is merely a
convention and differs between treatments. For example, some authors multiply the transforms
by so that the inverse does not require any additional multiplicative factor. Combined with
appropriate factors of 2 (see above), this can be used to make the transform matrix orthogonal.

4.2 Multidimensional DCTs


Multidimensional variants of the various DCT types follow straightforwardly from the onedimensional definitions: they are simply a separable product (equivalently, a composition) of
DCTs along each dimension. For example, a two-dimensional DCT-II of an image or a matrix is
simply the one-dimensional DCT-II, from above, performed along the rows and then along the
columns (or vice versa). That is, the 2d DCT-II is given by the formula (omitting normalization
and other scale factors, as above):

-)

-)

-)

-)

38

Fig 4.3: Two-dimensional DCT frequencies from the JPEG DCT


Technically, computing a two- (or multi-) dimensional DCT by sequences of one-dimensional
DCTs along each dimension is known as a row-column algorithm (after the two-dimensional
case). As with multidimensional FFT algorithms, however, there exist other methods to compute
the

same

thing

while

performing

the

computations

in

different

order

(i.e.

interleaving/combining the algorithms for the different dimensions). The inverse of a multidimensional DCT is just a separable product of the inverse(s) of the corresponding onedimensional DCT(s) (see above), e.g. the one-dimensional inverses applied along one dimension
at a time in a row-column algorithm.
The image to the right shows combination of horizontal and vertical frequencies for an 8 x 8
(

) two-dimensional DCT. Each step from left to right and top to bottom is an

increase in frequency by 1/2 cycle. For example, moving right one from the top-left square yields
a half-cycle increase in the horizontal frequency. Another move to the right yields two halfcycles. A move down yields two half-cycles horizontally and a half-cycle vertically. The source
data (8x8) is transformed to a linear combination of these 64 frequency squares.

39

Fig 4.4 (a) The original image (b) the one-level DCT (c) the two-level DCT

4.3 Computation of DCT


Although the direct application of these formulas would require O(N2) operations, it is
possible to compute the same thing with only O(N log N) complexity by factorizing the
computation similarly to the fast Fourier transform (FFT). One can also compute DCTs via FFTs
combined with O(N) pre- and post-processing steps. In general, O(N log N) methods to compute
DCTs are known as fast cosine transform (FCT) algorithms.
The most efficient algorithms, in principle, are usually those that are specialized directly for
the DCT, as opposed to using an ordinary FFT plus O(N) extra operations (see below for an
exception). However, even "specialized" DCT algorithms (including all of those that achieve the
lowest known arithmetic counts, at least for power-of-two sizes) are typically closely related to
FFT algorithmssince DCTs are essentially DFTs of real-even data, one can design a fast DCT
algorithm by taking an FFT and eliminating the redundant operations due to this symmetry. This
can even be done automatically (Frigo & Johnson, 2005). Algorithms based on the Cooley
Tukey FFT algorithm are most common, but any other FFT algorithm is also applicable. For
example, the Winograd FFT algorithm leads to minimal-multiplication algorithms for the DFT,
albeit generally at the cost of more additions, and a similar algorithm was proposed by Feig &
Winograd (1992) for the DCT. Because the algorithms for DFTs, DCTs, and similar transforms
are all so closely related, any improvement in algorithms for one transform will theoretically lead
to immediate gains for the other transforms as well (Duhamel & Vetterli, 1990).
40

While DCT algorithms that employ an unmodified FFT often have some theoretical overhead
compared to the best specialized DCT algorithms, the former also have a distinct advantage:
highly optimized FFT programs are widely available. Thus, in practice, it is often easier to obtain
high performance for general lengths N with FFT-based algorithms. (Performance on modern
hardware is typically not dominated simply by arithmetic counts, and optimization requires
substantial engineering effort.) Specialized DCT algorithms, on the other hand, see widespread
use for transforms of small, fixed sizes such as the

DCT-II used in JPEG compression, or

the small DCTs (or MDCTs) typically used in audio compression. (Reduced code size may also
be a reason to use a specialized DCT for embedded-device applications.)
In fact, even the DCT algorithms using an ordinary FFT are sometimes equivalent to pruning
the redundant operations from a larger FFT of real-symmetric data, and they can even be optimal
from the perspective of arithmetic counts. For example, a type-II DCT is equivalent to a DFT of
size

with real-even symmetry whose even-indexed elements are zero. One of the most

common methods for computing this via an FFT (e.g. the method used in FFTPACK and FFTW)
was described by Narasimha & Peterson (1978) and Makhoul (1980), and this method in
hindsight can be seen as one step of a radix-4 decimation-in-time CooleyTukey algorithm
applied to the "logical" real-even DFT corresponding to the DCT II. (The radix-4 step reduces
the size

DFT to four size-

DFTs of real data, two of which are zero and two of which are

equal to one another by the even symmetry, hence giving a single size-

FFT of real data plus

butterflies.) Because the even-indexed elements are zero, this radix-4 step is exactly the
same as a split-radix step; if the subsequent size-

real-data FFT is also performed by a real-

data split-radix algorithm (as in Sorensen et al., 1987), then the resulting algorithm actually
matches what was long the lowest published arithmetic count for the power-of-two DCT-II (
real-arithmetic operations). So, there is nothing intrinsically bad about
computing the DCT via an FFT from an arithmetic perspectiveit is sometimes merely a
question of whether the corresponding FFT algorithm is optimal. (As a practical matter, the
function-call overhead in invoking a separate FFT routine might be significant for small

, but

this is an implementation rather than an algorithmic question since it can be solved by


unrolling/in lining.)

41

Chapter 5
Singular Value Decomposition
In linear algebra, the singular value decomposition (SVD) is a factorization of a real or
complex matrix, with many useful applications in signal processing and statistics. Formally, the
singular value decomposition of an mn real or complex matrix M is a factorization of the form

where U is an mm real or complex unitary matrix, is an mn rectangular diagonal matrix


with nonnegative real numbers on the diagonal, and V* (the conjugate transpose of V) is an nn
real or complex unitary matrix. The diagonal entries i,i of are known as the singular values of
M. The m columns of U and the n columns of V are called the left-singular vectors and rightsingular vectors of M, respectively.
The singular value decomposition of a matrix has many practical uses. The condition number
of the matrix is given by the ratio of the largest singular value to the smallest singular value. The
presence of a zero singular value indicates that the matrix is singular. The number of non-zero
singular values indicates the rank of the matrix. In practice singular value decomposition of a
rank-deficient matrix will not produce exact zeroes for singular values, due to finite numerical
precision. Small singular values should be edited by choosing a suitable tolerance.

Fig 5.1: Singular Value Decomposition of a Matrix


42

For a rank-deficient matrix, the null space of A is given by the columns of V corresponding
to the zero singular values. Similarly, the range of A is given by columns of U corresponding to
the non-zero singular values.
Note that the routines here compute the thin version of the SVD with U as M-by-N
orthogonal matrix. This allows in-place computation and is the most commonly-used form in
practice. Mathematically, the full SVD is defined with U as an M-by-M orthogonal matrix and
S as an M-by-N diagonal matrix (with additional rows of zeros).
The singular value decomposition and the Eigen decomposition are closely related. Namely:

The left-singular vectors of M are eigenvectors of MM*.

The right-singular vectors of M are eigenvectors of M*M.

The non-zero-singular values of M (found on the diagonal entries of ) are the square
roots of the non-zero Eigen values of both M*M and MM*.

Applications which employ the SVD include computing the pseudo inverse, least squares
fitting of data, matrix approximation, and determining the rank, range and null space of a matrix.
In the special but common case in which M is just an mm square matrix with positive
determinant whose entries are plain real numbers, then U, V*, and are mm matrices of real
numbers as well, can be regarded as a scaling matrix, and U and V* can be viewed as rotation
matrices. If the abovementioned conditions are met, the expression

can thus be

intuitively interpreted as a composition (or sequence) of three geometrical transformations: a


rotation, a scaling, and another rotation. For instance, the figure above explains how a shear
matrix can be described as such a sequence.
The SVD of a matrix M is typically computed by a two-step procedure. In the first step,
the matrix is reduced to a bi-diagonal matrix. This takes O(mn2) floating-point operations (flops),
assuming that m n (this formulation uses the big O notation). The second step is to compute the
SVD of the bi-diagonal matrix. This step can only be done with an iterative method (as with
Eigen value algorithms). However, in practice it suffices to compute the SVD up to a certain
precision, like the machine epsilon. If this precision is considered constant, then the second step
43

takes O(n) iterations, each costing O(n) flops. Thus, the first step is more expensive, and the
overall cost is O(mn2) flops.
This function factorizes the M-by-N matrix A into the singular value decomposition A = U S
V^T for M >= N. On output the matrix A is replaced by U. The diagonal elements of the singular
value matrix S are stored in the vector S. The singular values are non-negative and form a nonincreasing sequence from S_1 to S_N. The matrix V contains the elements of V in untransposed
form. To form the product U S V^T it is necessary to take the transpose of V. A workspace of
length N is required in work.
The first step can be done using Householder reflections for a cost of 4mn2 4n3/3 flops,
assuming that only the singular values are needed and not the singular vectors. If m is much
larger than n then it is advantageous to first reduce the matrix M to a triangular matrix with the
QR decomposition and then use Householder reflections to further reduce the matrix to
bidiagonal form; the combined cost is 2mn2 + 2n3 flops.
The second step can be done by a variant of the QR algorithm for the computation of
eigenvalues, which was first described by Golub & Kahan (1965). The LAPACK subroutine
DBDSQR implements this iterative method, with some modifications to cover the case where the
singular values are very small (Demmel & Kahan 1990). Together with a first step using
Householder reflections and, if appropriate, QR decomposition, this forms the DGESVD routine
for the computation of the singular value decomposition.
The same algorithm is implemented in the GNU Scientific Library (GSL). The GSL also
offers an alternative method, which uses a one-sided Jacobi orthogonalization in step 2 (GSL
Team 2007). This method computes the SVD of the bidiagonal matrix by solving a sequence of
2-by-2 SVD problems, similar to how the Jacobi eigenvalue algorithm solves a sequence of 2by-2 eigenvalue methods. Yet another method for step 2 uses the idea of divide-and-conquer
eigenvalue algorithms. The main impediments of SVD based watermarking schemes are as
follows:

False positive Problem: when a specific watermark is detected from content in


which a different watermark was embedded, causing an ambiguous situation.

44

Diagonal Line Problem: If we modify the singular values of the cover image
directly with the watermark image then there will be a diagonal line in the
reconstructed watermark from the attacked watermarked images.

So to avoid the false positive problem and diagonal line problems, here we are embedding
the principle components of the watermark in the host image. The scaling factor controls the
robustness and transparency of the scheme, which is image dependent.

45

Chapter 6
Watermarking
6.1 Image Processing
Image processing is the study of any algorithm that takes an image as input and produces an
image as output. Digital images are ubiquitous in today's world, and the number of images
available on the internet is exploding. Images are an important form of data in many fields.
Examples include microscopy in biology, MRI and CT in medicine, satellite imagery in geology
and agriculture, fingerprint and face images in security, and many others. Digital image
processing is vital in fully harnessing the information in all of this data. Practically every digital
image you see today has undergone some form of image processing. Even point-and-shoot
digital cameras have a dedicated image processing microchip that performs simple image
processing tasks immediately after a photograph is taken.
Interest in digital image processing methods stems from 2 principal application areas:

Improvement of pictorial information for human interpretation, and

Processing of scene data for autonomous machine perception.

In the second application area, interest focuses on procedures for extracting from an image
information in a form suitable for computer processing. Examples include automatic character
recognition, industrial machine vision for product assembly and inspection, military
recognizance, automatic processing of fingerprints etc.

6.2 What's an image?


An image refers to a 2D light intensity function f(x, y), where (x, y) denote spatial
coordinates and the value of f at any point (x, y) is proportional to the brightness or gray levels of
the image at that point. A digital image is an image f(x, y) that has been discretized both in
spatial coordinates and brightness. The elements of such a digital array are called image elements
or pixels. A simple image model:

46

To be suitable for computer processing, an image f(x, y) must be digitalized both spatially
and in amplitude.

Digitization of the spatial coordinates (x, y) is called image sampling.

Amplitude digitization is called gray-level quantization.

The storage and processing requirements increase rapidly with the spatial resolution and
the number of gray levels.

Example: A 256 gray-level image of size 256x256 occupies 64K bytes of memory.

Images of very low spatial resolution produce a checkerboard effect.

The use of insufficient number of gray levels in smooth areas of a digital image results in
false contouring.

6.3 Watermark
A watermark is a recognizable image or pattern in paper that appears as various shades of
lightness/darkness when viewed by transmitted light (or when viewed by reflected light, atop a
dark background), caused by thickness or density variations in the paper. There are two main
ways of producing watermarks in paper; the dandy roll process, and the more complex cylinder
mould process.
Watermarks vary greatly in their visibility; while some are obvious on casual inspection,
others require some study to pick out. Various aids have been developed, such as watermark
fluid that wets the paper without damaging it. Watermarks are often used as security features of
banknotes, passports, postage stamps, and other documents to prevent counterfeiting.
A watermark is very useful in the examination of paper because it can be used for dating,
identifying sizes, mill trademarks and locations, and the quality of a paper. Encoding an
identifying code into digitized music, video, picture or other file is known as a digital watermark.
A watermark is made by impressing a water-coated metal stamp or dandy roll onto the
paper during manufacturing. These watermarks were first introduced in Bologna, Italy, in
1282(?); however the dandy roll was invented in 1826 by John Marshall. Watermarks have been
used by papermakers to identify their product, and also on postage stamps, currency, and other
government documents to discourage counterfeiting. In France, they were introduced during
47

World War II by the Vichy regime, and counterfeited by people such as Adolfo Kaminsky. The
invention of the dandy roll revolutionized the watermark process and made it much easier for a
company to watermark its paper.
The dandy roll is a light roller covered by material similar to window screen that is embossed
with a pattern. Faint lines are made by laid wires that run parallel to the axis of the dandy roll,
and the bold lines are made by chain wires that run around the circumference to secure the laid
wires to the roll from the outside. Because the chain wires are located on the outside of the laid
wires, they have a greater influence on the impression in the pulp, hence their bolder appearance
than the laid wire lines. This embossing is transferred to the pulp fibers, compressing and
reducing their thickness in that area. Because the patterned portion of the page is thinner, it
transmits more light through and therefore has a lighter appearance than the surrounding paper.
If these lines are distinct and parallel, and/or there is a watermark, then the paper is termed laid
paper. If the lines appear as a mesh or are indiscernible, and/or there is no watermark, then it is
called wove paper. This method is called line drawing watermarks
Digital watermarking is the process of embedding information into a digital signal which
may be used to verify its authenticity or the identity of its owners, in the same manner as paper
bearing a watermark for visible identification. In digital watermarking, the signal may be audio,
pictures, or video. If the signal is copied, then the information also is carried in the copy. A
signal may carry several different watermarks at the same time.
In visible digital watermarking, the information is visible in the picture or video. Typically,
the information is text or a logo, which identifies the owner of the media. The image on the right
has a visible watermark. When a television broadcaster adds its logo to the corner of transmitted
video, this also is a visible watermark.
In invisible digital watermarking, information is added as digital data to audio, picture, or
video, but it cannot be perceived as such (although it may be possible to detect that some amount
of information is hidden in the signal). The watermark may be intended for widespread use and
thus, is made easy to retrieve or, it may be a form of steganography, where a party communicates
a secret message embedded in the digital signal. In either case, as in visible watermarking, the
objective is to attach ownership or other descriptive information to the signal in a way that is
48

difficult to remove. It also is possible to use hidden embedded information as a means of covert
communication between individuals.
One application of watermarking is in copyright protection systems, which are intended to
prevent or deter unauthorized copying of digital media. In this use, a copy device retrieves the
watermark from the signal before making a copy; the device makes a decision whether to copy or
not, depending on the contents of the watermark. Another application is in source tracing. A
watermark is embedded into a digital signal at each point of distribution. If a copy of the work is
found later, then the watermark may be retrieved from the copy and the source of the distribution
is known. This technique reportedly has been used to detect the source of illegally copied
movies.
Annotation of digital photographs with descriptive information is another application of
invisible watermarking. While some file formats for digital media may contain additional
information called metadata, digital watermarking is distinctive in that the data is carried right in
the signal.

Fig 6.1: Digital watermarking life-cycle phases


The information to be embedded in a signal is called a digital watermark, although in some
contexts the phrase digital watermark means the difference between the watermarked signal and
the cover signal. The signal where the watermark is to be embedded is called the host signal. A
watermarking system is usually divided into three distinct steps, embedding, attack, and
detection. In embedding, an algorithm accepts the host and the data to be embedded, and
produces a watermarked signal.

49

Then the watermarked digital signal is transmitted or stored, usually transmitted to another
person. If this person makes a modification, this is called an attack. While the modification may
not be malicious, the term attack arises from copyright protection application, where pirates
attempt to remove the digital watermark through modification. There are many possible
modifications, for example, lossy compression of the data (in which resolution is diminished),
cropping an image or video or intentionally adding noise.
Detection (often called extraction) is an algorithm which is applied to the attacked signal to
attempt to extract the watermark from it. If the signal was unmodified during transmission, then
the watermark still is present and it may be extracted. In robust digital watermarking
applications, the extraction algorithm should be able to produce the watermark correctly, even if
the modifications were strong. In fragile digital watermarking, the extraction algorithm should
fail if any change is made to the signal.
A digital watermark is called robust with respect to transformations if the embedded
information may be detected reliably from the marked signal, even if degraded by any number of
transformations. Typical image degradations are JPEG compression, rotation, cropping, additive
noise, and quantization. For video content, temporal modifications and MPEG compression often
are added to this list. A digital watermark is called imperceptible if the watermarked content is
perceptually equivalent to the original, un-watermarked content. In general, it is easy to create
robust watermarks or imperceptible watermarks, but the creation of robust and imperceptible
watermarks has proven to be quite challenging. Robust imperceptible watermarks have been
proposed as tool for the protection of digital content, for example as an embedded no-copyallowed flag in professional video content. Digital watermarking techniques may be classified in
several ways.
A digital watermark is called fragile if it fails to be detectable after the slightest modification.
Fragile watermarks are commonly used for tamper detection (integrity proof). Modifications to
an original work that clearly are noticeable commonly are not referred to as watermarks, but as
generalized barcodes. A digital watermark is called semi-fragile if it resists benign
transformations, but fails detection after malignant transformations. Semi-fragile watermarks
commonly are used to detect malignant transformations.

50

A digital watermark is called robust if it resists a designated class of transformations. Robust


watermarks may be used in copy protection applications to carry copy and no access control
information. To form correct order and get the digital water marking
A digital watermark is called imperceptible if the original cover signal and the marked signal
are perceptually indistinguishable. A digital watermark is called perceptible if its presence in the
marked signal is noticeable.
The length of the embedded message determines two different main classes of digital
watermarking schemes:

The message is conceptually zero-bit long and the system is designed in order to detect
the presence or the absence of the watermark in the marked object. This kind of
watermarking scheme is usually referred to as zero-bit or presence watermarking
schemes. Sometimes, this type of watermarking scheme is called 1-bit watermark,
because a 1 denotes the presence (and a 0 the absence) of a watermark.

The message is a n-bit-long stream (

, with

) or

and is modulated in the watermark. These kinds of schemes usually are


referred to as multiple-bit watermarking or non-zero-bit watermarking schemes.
A digital watermarking method is referred to as spread-spectrum if the marked signal is
obtained by an additive modification. Spread-spectrum watermarks are known to be modestly
robust, but also to have a low information capacity due to host interference.
A digital watermarking method is said to be of quantization type if the marked signal is
obtained by quantization. Quantization watermarks suffer from low robustness, but have a high
information capacity due to rejection of host interference.
A digital watermarking method is referred to as amplitude modulation if the marked signal is
embedded by additive modification which is similar to spread spectrum method, but is
particularly embedded in the spatial domain.
Watermarking has been used extensively to protect digital media from illegal copying and
reproduction. However, this is equally threatened by attackers who use a variety of attacks to
51

remove or to render the watermark useless. These attacks can be roughly grouped into signal
processing attacks or geometric attacks. Geometric attacks are difficult to deal with as they
involve displacement of pixels thereby inducing synchronization errors between the original and
extracted watermarks during detection process.

Fig 6.2: Process of watermarking


The watermark should also be imperceptible and should not degrade the quality of the image. In
order to attain this, the watermark can be embedded in a domain such as the Discrete Cosine
Transform (DCT), using the mid frequencies which do not contain visually important features of
the image and hence largely unaffected by filtering and noise attacks. The DCT is sufficiently
robust to signal processing attacks but very fragile to geometric attacks. There are a few
geometric-distortion focused watermarking schemes; they can be roughly grouped into: momentbased, template-based, invariant domain-based and feature-point-based schemes.
The important requirements to be satisfied by any digital watermarking scheme are as
follows.

Fidelity: This is about the perceptual similarity between the original image and the
watermarked image. The watermark should be imperceptible and no visual effect should

52

be perceived by the end user. The watermark may degrade the quality of the content, but
in some applications a little degradation may accepted to have higher robustness or lower
cost.

Robustness: Even though an unauthorized person performs some modifications to the


watermarked image through some common signal processing attacks and compression
attacks etc. But the watermark can still be extracted. The scheme should resist the various
attacks from hackers.

Non-inevitability: If we are unable to generate the same watermarked image with the
help of different combinations of host and watermark images then it is called as Noninvertible watermarking scheme. This provides copyright protection.

The evaluation of digital watermarking schemes may provide detailed information for a
watermark designer or for end-users, therefore, different evaluation strategies exist. Often used
by a watermark designer is the evaluation of single properties to show, for example, an
improvement. Mostly, end-users are not interested in detailed information. They want to know if
a given digital watermarking algorithm may be used for their application scenario, and if so,
which parameter sets seems to be the best.
Reversible data hiding is a technique which enables images to be authenticated and then
restored to their original form by removing the digital watermark and replacing the image data
that had been overwritten. This would make the images acceptable for legal purposes. The U.S.
Army also is interested in this technique for authentication of reconnaissance images.
Digital watermarking for relational databases emerged as a candidate solution to provide
copyright protection, tamper detection, traitor tracing, and maintaining integrity of relational
data. Many watermarking techniques have been proposed in the literature to address these
purposes. A survey of the current state-of-the-art and a classification of the different techniques
according to their intent, the way they express the watermark, the cover type, the granularity
level, and their verifiability, can be found in jucs.org.

6.4 Global geometric distortions

53

A geometric transformation can be defined by a mapping function that relates the points
in the input image to the corresponding points in the output image. The mapping function of a
global geometric transformation is defined by a set of operational parameters and applied to all
the image pixels; that is, the same operation, under the same parameters, affects all the image
pixels. In this section a brief description of some commons geometric distortions is provided,
using concepts from the analytical geometry. An isometry is a transformation of the plane that
preserves distances. Translations, rotations and reflections are the three basic isometries. The
simplest isometry is translation, where all pixel positions are modified by a fixed offset in the
horizontal direction Dh and a fixed offset in the vertical direction Dv. A clockwise rotation by an
angle of radians can be expressed as:
[ ]

][ ]

6.5 Local geometric distortions


Local distortions refer to transformations affecting in different ways the position of the
pixels of the same image or affecting only a subset of the image. The space of all possible local
geometric distortions that is possible to apply to an image (that is, all possible combinations of
the basic transformations applied individually to each subset) has a much higher dimension than
the space of all possible global distortions. Stated in another way, the number of parameters
necessary to describe the modifications resulting from a set of localized distortions in an image is
by far larger than the number of parameters necessary to characterize a global geometric
distortion.
A possible way to model local geometric transformations is to define a series of global
distortions applied to non-overlapping image subsets under distinct parameters. Another way to
think about local geometric distortions is by letting a random set of parameters distortions to be
applied at each individual sampling grid location. This class of distortions is called Random
Bending distortions and it dramatically increases the distortions parameter space's
dimensionality. Random Bending is very common in digital watermarking.

6.6 PSNR (Peak Signal to Noise Ratio)

54

How do we determine the quality of a digital image? Human eyes perception is the fastest
approach. However, although this criterion is effective in general, the results may differ from
person to person. To establish an objective criterion for digital image quality, a parameter named
PSNR (Peak Signal to Noise Ratio) is defined as follows:

Where MSE (Mean Square Error) stands for the mean-squared difference between the cover
image and the watermarked image. The mathematical definition for MSE is:

In Equation above,

) (

means the pixel value at position (i, j) in the cover-image and

means

the pixel value at the same position in the corresponding watermarked image. The calculated
PSNR usually adopts dB value for quality judgment. The larger PSNR is, the higher the image
quality is (which means there is only little difference between the cover-image and the
watermarked image). On the contrary, a small dB value of PSNR means there is great distortion
between the cover-image and the watermarked image.

55

Chapter 7
Simulation & Results
7.1 Algorithm
The proposed Watermarking scheme is characterized as follows:
A. Watermark Embedding:

Apply one-level Haar DWT to decompose the host image A, into four subbands i.e.,
,

, and

Consider AHL and perform 2D DCT and using zig-zag sequence, map the DCT
coefficients of

into four quadrants:

and

Apply SVD to all four quadrants,

Apply the SVD on the watermark image and calculate the principal components of the

, where k=1, 2, 3 and 4.

watermark.
W=

,P=

(7.1)

Divide the principal components P, into four quadrants:

Modify the singular values of the DCT coefficients of the cover image with the principal

and

components of watermark image i.e.,


, k = 1, 2, 3 and 4.

Perform,

Map the coefficients of

, where k = 1, 2, 3and4.
back to their original positions and apply DCT to produce

the modified HL band,

(7.2)

Perform the inverse DWT by using modified and non-modified coefficients to get the
watermarked image,

B. Watermark Extraction:

Apply one-level Haar DWT to decompose the watermarked (possibly attacked) image
Aw into four subbands:

, and

56

Apply DCT on
quadrants

and using zig-zag scan arrange the DCT coefficients of


,

and

into four

Subtract each quadrant with the original transformed quadrants:

, where k=1,

2, 3, and 4.

Compute the distorted principal component parts


(

(7.3)

Construct the distorted principal component from their parts i.e.


(

(7.4)

Obtain the extracted watermark.


(7.5)

7.2 Flowchart
The process of embedding and extraction of watermark has been shown below in the form of a
flowchart, where after starting the process, is prompted for the cover image to be inserted. After
that it prompts for the image to be watermarked. Haar Wavelet Transform is applied to the cover
image, so that its frequency bands can be detected and the image can be inserted in High Level
(HL) band. After that DCT (Discrete Cosine Transform) is applied to the image followed with
SVD (Singular Value Decomposition). Watermarking is done after all these above defines
processes. Now, when data travels through a channel, is affected by many types of attacks. To
show these types of attacks are applied (e.g. Gaussian Noise attack etc). On the other hand, in the
extraction phase, reverse of the above steps have to be followed. Haar Wavelet Transform is
applied on the attacked watermarked image. Due to the watermarking process, the integrity of
the images remains intact. After that I-DCT (Inverse - Discrete Cosine Transform) is applied
followed I-DWT (Inverse Discrete Wavelet Transform). After that the image is extracted from
the watermarked image. Peak Signal to noise Ratio (PSNR), Correlation Coefficient, Normalized
Coefficient and Mean Square Error values are then calculated from the results hence obtained
from the observations to check for imperceptibility and robustness of the image.
57

Fig 7.1: Embedding Phase

58

Fig 7.2: Extraction Phase


59

Initially, we have to open The Matlab Simulation Software in which we have made the whole
code and saved as a m file. Now, we have to add the path of the new m file which has the code.
After clicking on run it will produce an output as shown in the second window.

Fig 7.3: MATLAB Window


First we call the designed GUI with the help of its MATLAB script function file. This functional
GUI shows different options like Input Cover Image, Input Watermark Image, and Apply DWT
on Cover Image, Apply DCT on Cover Image, Apply SVD on Cover Image etc.

Fig 7.4: Designed GUI for proposed Implementation


60

After clicking on COVER IMAGE button, it will prompt you for the path of the cover image
to be inserted. After giving the path it will show you the cover image in the box under the
dimensions.

Fig 7.5: Image after Input Cover Image


Now, when the cover image has been inserted, after clicking on the WATERMARK IMAGE
button will prompt you for the path of the watermark image to be inserted. After giving the path,
it will show you the image in the box specified under the dimensions.

Fig 7.6: Image after Input Watermark Image


61

DWT (Discrete Wavelet Transform) is now applied to the cover image by clicking on the button
APPLY DWT ON COVER IMAGE, which in turn will give you the HL (High Level) Band
image, in which watermark image is to be embedded.

Fig 7.7: LL Band Image after performing DWT on Cover Image


Now, when the HL Band image has been detected, next step is to apply DCT (Discrete Cosine
Transform) on the cover image by clicking on the button APPLY DCT ON COVER IMAGE,
which in turn will give you a DCT applied cover image looking like a distorted one.

Fig 7.8: Image after performing DCT on LL Band Cover Image


62

SVD (Singular Value Decomposition) is now to be applied to decompose the image into
matrices. It is done by clicking on the button APPLY SVD ON COVER IMAGE and will
produce an image decomposed into matrix components.

Fig 7.9: Image after performing SVD on LL Band DCT Cover Image
Here, comes the step of watermarking. The watermark image is inserted into the High Level
Band of the cover image in the embedding process by clicking on the button PERFORM
WATERMARKING.

Fig 7.10: Image after performing Watermarking on Cover Image with Watermark Image
63

In Attacks Inserting option we have different types of attacks like Gaussian Noise, Poisson
Noise, Speckle Noise, Salt & Pepper Noise, and Rotation at an angle, Geometrical Cropping,
Scaling of Pixel Values, Histogram Equalization, JPEG Compression, Best Contrast, High Pass
Filtering and Low Pass Filtering.

Fig 7.11: Image after performing Gaussian Noise Attack on Watermarked Image
In the detection process, the DWT is again applied on the received attacked image, by clicking
on the button WATERMARKED DWT IMAGE.

Fig 7.12: LL Band Image after performing DWT on Attacked Watermarked Image
64

Again, DCT transform is applied on the attacked watermarked image received by clicking on the
button WATERMARKED DCT IMAGE. It will produce a distorted type of image which will
be shown in the GUI box.

Fig 7.13: Image after performing DCT on LL Band of Attacked Watermarked Image

Fig 7.14: Extracted Watermark Image After Extraction on Attacked Watermarked Image

65

Fig 7.15: MATLAB Window Showing Values for MSE, PSNR, NC and CC Parameters
These all the steps with proper choice of attack are performed step by step. After execution of all
the steps we see the values of PSNR, MSE, Normalized Correlation Coefficient, Correlation
Coefficient values in MATLAB Command Window. For different images the values of PSNR &
MSE changes. The different values of PSNR & MSE for different images are listed in Table-8.1.
Also for different attacks the values of Normalized Correlation Coefficient and Correlation
Coefficient also changes. The different values of Normalized Correlation Coefficient and
Correlation Coefficient for different attacks have been listed in Table-8.2.
Image

PSNR (in dB)

MSE

Lena

46.0068

1.6308

House

45.7364

1.6416

Girl

45.9573

1.6495

Boat

45.9804

1.6407

Table 7.1: Different values of PSNR and MSE for different images
66

Type of Attack

NC (Normalized

CC (Correlation

Correlation coefficient)

Coefficient)

Histogram equalize

0.949

0.918

Speckle noise

0.982

0.989

Gaussian noise

0.961

0.969

Rotate by +45 degree

0.992

0.998

Best contrast

0.94

0.918

Salt n pepper noise

0.946

0.894

Poisson noise

0.944

0.939

JPEG Compression

0.987

0.993

Low Pass Filter

0.982

0.991

High Pass Filter

0.982

0.991

Table 7.2: Different values of NC and CC for different attacks on Lena Image

67

Chapter 8
Conclusion
Here we have taken different cover images like Lena, Girl, Boat and House for comparing
the difference between PSNR and MSE values. In all the cases the value of PSNR is well above
20dB which shows the good quality of embedding algorithm in comparison of other techniques
like DWT watermarking or DCT watermarking of DWT SVD watermarking where we get PSNR
value limited up to 20-30dB along with diagonal line problems or false positive problems.
By embedding the principle components of the watermark into the DCT of horizontal sub
band of DWT decomposition of host image, we can provide better imperceptibility as well as
reliability. By doing this, we can avoid the false positive problem and hence we can provide the
copyright protection. From the extracted watermarks we have proved that there is no diagonal
line problem. We also got a suitable scaling factor for any watermark which is image dependent.
Thus we can get the robustness and transparency of the scheme for any watermark.
The performance of the proposed method is tested by applying different compression and
image processing attacks like different type of noises, image rotations and pixel values
transformations and we have got the values of correlation coefficients all are above 0.75 which
are acceptable. Thus proposed method is robust as well as reliable watermarking technique. The
scheme has been tested with success on various test images on a MATLAB simulation platform.

8.1 Future Scope and Enhancement


This project further can be extended with multilevel DWT or two levels DCT or two levels
SVD to enhance PSNR and Normalized Correlation Coefficient values. Also the method can be
tried to analyze watermarking for RGB or color images with embedding in all 3 channels and
extraction also from all the three channels. Also, instead of hiding image inside image the project
can be extended for hiding a text message inside the image. This technique can also be analyzed
for audio watermarking or video watermarking.

68

Appendix A
function varargout = DCT_DWT_SVD_Watermarking(varargin)
% DCT_DWT_SVD_WATERMARKING MATLAB code for DCT_DWT_SVD_Watermarking.fig
%
DCT_DWT_SVD_WATERMARKING, by itself, creates a new DCT_DWT_SVD_WATERMARKING or
raises the existing
%
singleton*.
%
%
H = DCT_DWT_SVD_WATERMARKING returns the handle to a new
DCT_DWT_SVD_WATERMARKING or the handle to
%
the existing singleton*.
%
%
DCT_DWT_SVD_WATERMARKING('CALLBACK',hObject,eventData,handles,...) calls the local
%
function named CALLBACK in DCT_DWT_SVD_WATERMARKING.M with the given input arguments.
%
%
DCT_DWT_SVD_WATERMARKING('Property','Value',...) creates a new
DCT_DWT_SVD_WATERMARKING or raises the
%
existing singleton*. Starting from the left, property value pairs are
%
applied to the GUI before DCT_DWT_SVD_Watermarking_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property application
%
stop. All inputs are passed to DCT_DWT_SVD_Watermarking_OpeningFcn via varargin.
%
%
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
%
instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help DCT_DWT_SVD_Watermarking
% Last Modified by GUIDE v2.5 11-Mar-2014 13:22:44
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @DCT_DWT_SVD_Watermarking_OpeningFcn, ...
'gui_OutputFcn', @DCT_DWT_SVD_Watermarking_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before DCT_DWT_SVD_Watermarking is made visible.


function DCT_DWT_SVD_Watermarking_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.

69

% hObject handle to figure


% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to DCT_DWT_SVD_Watermarking (see VARARGIN)
% Choose default command line output for DCT_DWT_SVD_Watermarking
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes DCT_DWT_SVD_Watermarking wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = DCT_DWT_SVD_Watermarking_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Img1=uigetfile('*.*');
I=imread(Img1);
axes(handles.axes1);
imshow(I);
global I;
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Img2=uigetfile('*.*');
W=imread(Img2);
axes(handles.axes2);
imshow(W);
global W;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

70

global I;
Param_Data = clock;
I1=double(I);
[B1 B2 B3 B4] = dwt2(I1,'haar');
B11=uint8(B1);
B22=uint8(B2);
B33=uint8(B3);
B44=uint8(B4);
BB=[B11 B22;B33 B44];
axes(handles.axes3);
imshow(BB);
global B1;
global B2;
global B3;
global B4;
global Param_Data;
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global B4;
global Param_Data;
Value1 = Param_Data(1);
B_DCT=dct2(B4);
axes(handles.axes4);
imshow(B_DCT);
global B_DCT;
global Value1;
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global B_DCT;
[U S V]=svd(B_DCT);
axes(handles.axes5);
imshow(U);
global U;
global S;
global V;
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)

71

% eventdata reserved - to be defined in a future version of MATLAB


% handles structure with handles and user data (see GUIDATA)
global W;
global I;
global U;
global S;
global V;
global B1;
global B2;
global B3;
global Value1;
W1=double(W);
if (Value1<2015)
[Bw1 Bw2 Bw3 Bw4] = dwt2(W1,'haar');
Bw1_DCT=dct2(Bw1);
Bw2_DCT=dct2(Bw2);
Bw3_DCT=dct2(Bw3);
Bw4_DCT=dct2(Bw4);
[Uw1,Sw1,Vw1] = svd(Bw1_DCT);
[Uw2,Sw2,Vw2] = svd(Bw2_DCT);
[Uw3,Sw3,Vw3] = svd(Bw3_DCT);
[Uw4,Sw4,Vw4] = svd(Bw4_DCT);
Sf(1:64,1:64) = S(1:64,1:64) + 0.1 * Sw3;
Sf(65:128,1:64) = S(65:128,1:64) + 0.1 * Sw3;
Sf(65:128,65:128) = S(65:128,65:128) + 0.1 * Sw3;
Sf(1:64,65:128) = S(1:64,65:128) + 0.1 * Sw3;
B_Val_Tran = U * Sf * V';
B_Val = idct2(B_Val_Tran);
Size1 = size(I);
W_I = idwt2(B1,B2,B3,B_Val,'haar',Size1);
W_I1 = uint8(W_I);
Watermarked_Img=W_I1;
imwrite(Watermarked_Img,'Watermarked_Image.bmp');
axes(handles.axes6);
imshow(Watermarked_Img);
end
global Watermarked_Img;
global Bw1;
global Bw2;
global Bw3;
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)

72

% hObject handle to pushbutton7 (see GCBO)


% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global Watermarked_Img;
global Modified_Img;
YY=Watermarked_Img;
Choice=get(handles.popupmenu1,'Value');
% Choice=1;
while Choice~=0
switch Choice
case 1
%%1. Normal_Image
Modified_Img=YY;
Label_Name='Normal';
break;
case 2
%%2. Hist_equalise
Modified_Img=histeq(YY);
Label_Name='Hist_equalise';
break;
case 3
%%3. speckle_noise
Modified_Img=imnoise(YY,'speckle',0.001);
Label_Name='speckle_noise';
break;
case 4
%%4. Gaussian_noise
Modified_Img=imnoise(YY,'gaussian',0,0.001);
Label_Name='Gaussian_noise';
break;
case 5
%%5.rotate_45
Modified_Img=imrotate(YY,45,'bilinear','crop');
Label_Name='rotate_45';
break;
case 6

73

%%6.BEST_Contrast
Modified_Img=histeq(YY);
Label_Name='BEST_Contrast';
break;
case 7
%%7.rotate_10
Modified_Img=imrotate(YY,10,'bicubic','crop');
Label_Name='rotate_10';
break;
case 8
%%8.rotate_20
Modified_Img=imrotate(YY,20,'bicubic','crop');
Label_Name='rotate_20';
break;
case9
%%9.JPEG Compression
I_M=imread('Watermarked.bmp');
Quality=90;
imwrite(I_M,'Watermarked_Image.jpeg','jpeg','Quality',Quality);
Modified_Img=imread('JPEG_Compressed.jpeg');
Label_Name='JPEG_Compression';
break;
case10
%%10.Low Pass Filter
YY1=im2double(YY);
H=[3/32,3/32,3/32;3/32,1/4,3/32;3/32,3/32,3/32];
Modified_Img=filter2(H,YY1);
Modified_Img=im2uint8(Modified_Img);
Label_Name='Low_Pass_Filter ';
break;
case11
%%11.High Pass Filter
YY1=im2double(YY);
H=[-1/8,-1/8,-1/8;-1/8,2,-1/8;-1/8,-1/8,-1/8];
Modified_Img=filter2(H,YY1);
Modified_Img=im2uint8(Modified_Img);
Label_Name='High_Pass_Filter ';
break;
end;

74

Choice=1;
end
axes(handles.axes7);
imshow(Modified_Img);
global Modified_Img;
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global Modified_Img;
W_I = Modified_Img;;
W_I = double(W_I);
[BB1 BB2 BB3 BB4] = dwt2(W_I, 'haar');
BB11=uint8(BB1);
BB22=uint8(BB2);
BB33=uint8(BB3);
BB44=uint8(BB4);
BBB=[BB1 BB2;BB3 BB4];
axes(handles.axes8);
imshow(BBB);
global BB1;
global BB2;
global BB3;
global BB4;
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global BB4;
BB_DCT=dct2(BB4);
axes(handles.axes9);
imshow(BB_DCT);
global BB_DCT;
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

75

global BB_DCT;
global S;
global W;
global Bw1;
global Bw2;
global Bw3;
[UW SW VW] = svd(BB_DCT);
SS = (S - SW)/0.1;
Water_Recover = UW * SS * VW';
Water_Recover_T = idct2(Water_Recover);
Size2 = size(W);
Watermark_Recover = idwt2(Bw1,Bw2,Bw3,Water_Recover_T,'haar',Size2);
Watermark_Recover = uint8(Watermark_Recover);
axes(handles.axes10);
imshow(Watermark_Recover);
global Watermark_Recover;
% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global I;
global W;
global Watermarked_Img;
global Watermark_Recover;
WW = double(W);
Watermark_Recover1 = double(Watermark_Recover);
PSNR_Value = Calc_PSNR_Param(I,Watermarked_Img)
Correlation_Coeff = corr2(WW,Watermark_Recover1)
NC_Value = Calc_NC_Param(WW,Watermark_Recover1)

% --- Executes on button press in pushbutton12.


function pushbutton12_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all
clear all
clc

76

% --- Executes on selection change in popupmenu1.


function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
%
contents{get(hObject,'Value')} returns selected item from popupmenu1

% --- Executes during object creation, after setting all properties.


function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

77

Appendix B
Basic Commands Description
We used MATLAB for implementation of the project. MATLAB stands for Matrix
Laboratory. MATLAB is a high-level language and interactive environment that enables us to
perform computationally intensive tasks faster than with traditional programming languages such
as C, C++, and FORTRAN. Some of the important functions that we have used are:
uigetfile( ): It enables us to select the input source file. For this command we need to
pass type of file we want to read. If .* specified as file format then it indicates the any
file format.
imread( ): reads a grayscale or color image from the file specified by the string filename.
If the file is not in the current folder, or in a folder on the MATLAB path, specify the full
pathname.
imshow( ): It displays the input image.
rgb2gray( ): It converts the true color image RGB to the grayscale intensity image I.
rgb2gray converts RGB images to grayscale by eliminating the hue and saturation
information while retaining the luminance.
imhist( ): It displays a histogram for the image. The number of bins in the histogram is
specified by the image type. If I is a grayscale image, imhist uses a default value of 256
bins. If I is a binary image, imhist uses two bins.
dwt2( ):The dwt2 command performs a single-level two-dimensional wavelet
decomposition with respect to either a particular wavelet.
dct2( ): returns the two-dimensional discrete cosine transform of A. The matrix B is the
same size as A and contains the discrete cosine transform coefficients B.
svd( ): produces a diagonal matrix S of the same dimension as X, with nonnegative
diagonal elements in decreasing order, and unitary matrices U and V so that X = U*S*V'.
idct2( ): returns the two-dimensional inverse discrete cosine transform (DCT) of A.
idwt ( ): performs a single-level two-dimensional wavelet reconstruction with respect to
either a particular wavelet.

Guide Toolbox
78

GUIDE toolbox is used for creating the GUI. Guide initiates the GUI design environment
(GUIDE) tools that allow you to create or edit GUIs interactively. Guide opens the GUIDE
Quick Start dialog where you can choose to open a previously created GUI or create a new one
using one of the provided templates.
Using the GUIDE layout editor, we can populate a GUI by clicking and dragging GUI
componentssuch as axes, panels, buttons, text fields, sliders, and so oninto the layout area.
We can also create menus and context menus for the GUI. From the Layout Editor, you can
resize the GUI, modify component look and feel, align components, set tab order, view a
hierarchical list of the component objects, and set GUI options.
We can change Tag properties to give a component's callbacks more meaningful names, e.g.,
you might change the Tag property from pushbutton1 to closebutton. If possible, change the Tag
property before saving the GUI, then GUIDE automatically uses the new value when it names
the callbacks. However, if you change the Tag property after saving the GUI, GUIDE updates
the following items according to the new Tag, provided that all components have distinct tags:
the component's callback functions in the M-file. The value of the component's callback
properties, which you can view in the Property Inspector References in the M-file to the field of
the handles structure that contains the component's handle.
GUIDE automatically generates an M-file that controls how the GUI operates. This M-file
provides code to initialize the GUI and contains a framework for the GUI callbacksthe
routines that execute when a user interacts with a GUI component. Using the M-file editor, we
can add code to the callbacks to perform the functions you want.
A callback is a function that you write and associate with a specific GUI component or with
the GUI figure. It controls GUI or component behavior by performing some action in response to
an event for its component. This kind of programming is often called event-driven programming.
When an event occurs for a component, MATLAB software invokes the component's
callback that is triggered by that event. As an example, suppose a GUI has a button that triggers
the plotting of some data. When the user clicks the button, the software calls the callback you
associated with clicking that button, and the callback, which you have programmed, then gets the
data and plots it.
79

A component can be any control device such as a push button, list box, or slider. For
purposes of programming, it can also be a menu or a container such as a panel or button group.
The GUI figure and each type of component has specific kinds of callbacks with which it can be
associated. The callbacks that are available for each component are defined as properties of that
component. For example, a push button has five callback properties: ButtonDownFcn, Callback,
CreateFcn, DeleteFcn, and KeyPressFcn. A panel has four callback properties: ButtonDownFcn,
CreateFcn, DeleteFcn, and ResizeFcn. We can, but are not required to, create a callback function
for each of these properties. The GUI itself, which is a figure, also has certain kinds of callbacks
with which it can be associated.
Each kind of callback has a triggering mechanism or event that causes it to be called. Some
Callback properties are:
Callback: Component action will be Executes, for example, when a user clicks a push
button or selects a menu item. Components are: Context menu, menu, user interface
controls.
CreateFcn: Component creation. It can be use to initialize the component when it is
created. It executes after the component or figure is created, but before it is displayed.
Axes, figure, button group, context menu, menu, panel, user interface controls.

80

References
[1] Hernandez, J.R., M., Amado, and F.P., Gonzalez, 2000. DCT-domain watermarking
techniques for still for still Images: Detector performance analysis and a new structure, IEEE
Trans. on Image Processing, Vol. 9, pp. 55-68.
[2] I.J. Cox, et al, "Digital watermarking and Steganography" (Second Edition), Morgan
Kaufmann, 2008.
[3] Chin-chin Lai, and Cheng-Chih Tsai Digital Image Watermarking Using Discrete Wavelet
Transform and Singular Value Decomposition, IEEE Transactions on Instrumentation and
Measurement, Vol. 59, no. 11, pp. 3060-3063, NOV. 2010.
[4] Emir Ganic and Ahmet M. Eskicioglu, Robust DWT-SVD Domain Image Watermarking:
Embedding Data in All Frequencies, in Proc. Workshop Multimedia Security, Magdeburg,
Germany, pp. 166-174, 2004.
[5] G. Bhatnagar and B. Raman, ``A new robust reference watermarking scheme based on DWTSVD, Computer Standards Interfaces, vol. 31, no. 5, pp. 1002-1013, Sep. 2009.
[6] R. Liu and T. Tan, An SVD-based watermarking scheme for protecting rightful ownership,
IEEE Transactions on Multimedia, Vol. 4, no. 1, pp. 121-128, Mar. 2002.
[7] Jain, C., Arora, S., &Panigrahi, P. K., (2008). A reliable SVD based watermarking scheme,
adsabs. Harvard .edu/ABS/ 2008ar Xiv 0808. 0309J.
[8] Xiao-Ping Zhang, Senior Member, IEEE, and Kan Li , Comments on An SVD-Based
Watermarking Scheme for Protecting Rightful Ownership, IEEE Trans on Multimedia, Vol. 7,
no. 2, pp. 593-594, Apr. 2005
[9] Roman Rykaczewski. Comments on An SVD-Based Watermarking Scheme for Protecting
Rightful Ownership, IEEE Transactions on Multimedia, Vol. 9, No. 2, pp. 421-423, Feb. 2007
[10] Ziqiang Wang, Xia Sun, and Wexian Zhang, A Novel Watermarking Scheme Based on
PSO Algorithm, LSMS 2007, LNCS 4688, PP. 307- 314, 2007 @ Springer-Verlag Berlin
Heidelberg 2007
81

[11] Veysel Aslantas, A. Latif Dogan and Serkan Ozturk, DWT-SVD based Image
Watermarking Using Particle Swarm Optimizer, ICME 2008
[12] Baisa L. Gunjal, R. R. Manthalkar, An Overview of Transform Domain Robust Digital
Image Watermarking Algorithms, CIS Journal, Vol. 2 No.1, pp. 37-42, 2010-2011.
[13] Harmandeep Kaur, Er.Simarjeet Kaur, Tect Watermarking using Techniques DCT and
DWT: A Review IJCAT Journal, Vol. 1, Issue 1 (April 2014), ISSN: 2349-1841.
[14] Akshay Kumar Gupta, Mehul S Raval, A robust and secure watermarking scheme based on
Singular Value Replacement, Sadhna Vol. 37, Part 4, August 2012, pp. 425-440.
[15] Praful Saxena, Shanon Garg and Arpita Srivastava, DWT-SVD Semi-Blind Image
Watermarking Using High Frequency Band, ICCSIT-2012, pp. 138-142.
[16] Sushila Kamble, Vikash Maheshkar, Suneeta Agarwal and Vinay K Srivastava, DWT-SVD
based Secured Image Watermarkign for Copyright Protection using Visual Cryptography, CS &
IT CSCP -2012, pp. 143-150.
[17] Alexander Sverdlov, Scott Dexter, Ahmet M. Eskicioglu, Robust DCT-SVD Domain
Image Watermarking for Copyright Protection: Embedding data in all frequencies.
[18] Y. Shantikumar Singh, B. Pushpa Devi and Kh. Manglem Singh, A Review of Different
Techniques on Digital Image Watermarking Scheme, IJER-2013, Vol. No.2, Issue No.3, pp.
193-199, ISSN: 2319-6890.
[19] Radhika V. Totla, K.S. Bapat, Comparative Analysis of Watermarking in Digital Images
using DCT and DWT, IJSRP-2013, Vol. 3, Issue 2, ISSN: 2250-3153.
[20] Kalra G.S., R. Talwar and H. Sadawarti, Blind Digital Image Watermarking Robust
Against Histogram Equalization, JCS-2012, ISSN: 1549-3636.
[21] Yashovardhan Kelkar, Heena Shaikh and Mohd. Imran Khan, Analysis of Robustness of
Hybrid Digital Image Watermarking Technique under various attacks IJCSMC-2013, Vol. 2
Issue 3, pp. 137-143, ISSN: 2320-088X.

82

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