Upload
amit-joshi
View
213
Download
4
Embed Size (px)
Citation preview
M. Tech (Research) Dissertation REPORT
Entitled
FPGA IMPLEMENTATION OF WATER MARKING
ALGORITHM FOR DIGITAL CAMERA
Submitted in partial fulfillment of the requirements
For the degree of M. Tech (Research)
SUBMITTED BY
Amit M. Joshi (Roll No.R07EC903)
GUIDED BY
Mr.Anand D. Darji
ELECTRONICS ENGINEERING DEPARTMENT SARDAR VALLABHBHAI NATIONAL INSTITUTE OF
TECHNOLOGY SURAT-395007
AUGUST-2009
Sardar Vallabhbhai National Institute of Technology Surat-395007, Gujarat, India.
Electronics Engineering Department
CERTIFICATECERTIFICATECERTIFICATECERTIFICATE
This is to certify that Mr. Amit M Joshi, Roll No.: R07EC903, has satisfactorily completed
a Dissertation on “FPGA Implementation of Watermarking Algorithm for Digital
Camera” as the partial fulfillment of the requirement for MASTER OF TECHNOLOGY
in ELECTRONICS ENGINEERING during the year 2008-2009.
Chairman Examiner Guide Head of the Department Prof. B. R Taunk Seal Of Department
ACKNOWLEDGEMENT
I take this opportunity to express my sincere gratitude to my guide Mr. Anand D. Darji,
Senior Lecturer, Electronics Engineering Department, for his esteemed guidance
throughout my dissertation work & his inspiration which motivated me to get fruitful
outcome through my work.
I gives me immense pleasure to thank Prof. B. R. Taunk, Head of the Department,
Electronics Department, SVNIT and Prof. N. Y. Desai, PG Incharge (Research),
Electronics Department, SVNIT for their co-operation at every stage
I would also like to thank my colleagues and family for providing me moral support,
constant inspiration, enthusiasm and co-operation for my dissertation work. Thanks to all
who have supported me directly or indirectly throughout my dissertation work.
Place: S.V.N.I.T., Surat Amit M Joshi
ACKNOWLEDGEMENT FOR SMDP-II
This project would have not been possible without support of high end EDA tools, which
were purchased under SMDP-II project by CEERI, pilani. I would like to thank MCIT,
New Delhi, without their support SMDP-II project would have never been started. I
would like to thank Incharge, Prof. N.Y.Desai and co-incharge, Mr. A.D. Darji for their
kind permission to work in VLSI Design Laboratory at our site. I would like to extend
my thanks to IIT, Bombay, which act as resource centre (RC) for SVNIT under this
project
Place: S.V.N.I.T., Surat Amit M Joshi
ABSTRACT
The rapid growth of techniques for storage and network distribution of digital media
information is demanding secure content for authentication.The image captured by digital
camera is major concern for the same as it. This image can easily altered by editig software.
Such problems have hindered the application of digital image for courtroom evidence, insurance
claim, copyright and journalistic photography. By using watermarking scheme, information such
as the author’s credentials and time stamps can be embedded into digital images for tamper-
proofing or authentication. Such an embedded watermark is transparent to general readers of
images, but it can be extracted and verified for detecting any tampering with images using a
relevant detection tool. For digital camera, we have to use invisible and robust watermarking
scheme for authenticity and ownership. The camera with inbuilt such capability is called as
“Secure Digital Camera”. Spatial domain watermarking is very widely used due to their less
computational complexity but suffers from less robustness. Frequency domain watermarking is
very popular due to transform domain property and higher robustness but it has larger
computational cost. We have adapted dual domain (spatial-frequency domain) scheme to take
advantage of both domain properties. Software implementation of this watermarking scheme is
well matured. Nowadays, hardware based watermarking has been drawn more attention as it
provides high performance and high speed. The proposed scheme provides higher MSE and
PSNR compared to other existing schemes. The main goal of research to adapt efficient FPGA
implementation of watermarking algorithm which provides ownership and authentication.
CONTENTS
List of Figures
List of Tables
List of Acronyms
Chapter 1. Introduction 1
1.1 Motivation 2
1.2 Data Hiding Techniques 5
1.3 Digital Camera Overview 5
1.4 Overview of Digital Watermarking Scheme 7
1.5 Objective of Research 8
1.6 Summary 9
Chapter 2. Digital Watermarking 10
2.1 Literature Survey of Watermarking 10
2.2 Basics of Watermarking 12
2.2.1 Characteristics of Watermarking 12
2.2.2 Types of watermarks 13
2.2.3 Classification of Watermarking Method 15
2.2.4 Conflicting Requirements of watermarking 15
2.3 Watermarking for Different Domain 16
2.3.1 Spatial domain Watermarking 17
2.3.2 Frequency Domain Watermarking 17
2.3.3 Spatial Domain Vs Frequency Domain Watermarking 18
3.2.4 Advantage of wavelet based Watermarking Techniques 19
2.4 Types of watermark attacks 19
2.5 Common Attack Techniques 20
2.6 Performance of Watermarked Image 21
2.7 Summary 22
Chapter 3. Wavelet Transform 23
3.1 History of Frequency Domain Transformation 23
3.2 Discrete Wavelet Transform (DWT) 23
3.2.1 Sub band for Wavelet Based Coding 24
3.2.2 Watermarking with Wavelet Decomposition Level 25
3.3 Implementation of Wavelet Transform 26
3.3.1 Relationship between Convolution and lifting scheme 26
3.3.2 Advantage of lifting scheme 27
3.3.3 Lifting based Scheme 28
3.4 Summary 33
Chapter 4. DWT Based Watermarking Algorithms 34
4.1 Algorithm 1 34
4.1.1 Watermark Embedding Method 34
4.1.2 Watermark Detection Method 35
4.2 Algorithm 2 35
4.2.1 Watermarking Embedding Algorithm 35
4.2.2 Watermark Extraction Process 37
4.2.3 Effect of Scaling factor α and Quantization factor q 37
4.3 Algorithm 3 39
4.3.1 The Embedding Method 40
4.3.2 Watermark Extraction Method 41
4.4 Proposed Watermarking Algorithm 42
4.4.1 Bit-plane slicing Method 43
4.5 Summary 46
Chapter 5. Implementation of Proposed Techniques 47
5.1 Hardware Implementation Lifting based DWT Scheme 50
5.1.1 Implementation of (lossless) Le gall 5/3 algorithm 50
5.1.2 Memory management 53
5.2 Watermark Embedding Hardware Implementation 56
5.2.1 Bit Plane Slicing Implementation 57
5.2.2 Random Number Generator 58
5.3 VLSI Implementation for Proposed Scheme 59
5.3.1 Architecture of Proposed scheme 59
5.3.2 Pin Diagram 60
5.4 Summary 61
Chapter 6. Results Analysis 62
6.1 MATLAB Results 62
6.2 FPGA Implementation Results 75
Chapter 7. Conclusion 81
References 82
Appendix A
Appendix B
Appendix C
LIST OF FIGURES
Figure 1.1 Watermarking Example
Figure 1.2 Watermarking Technique
Figure 1.3 Block Diagram of Digital Still Camera
Figure 1.4 Watermark Embedding Process
Figure 1.5 Watermark Extraction Process
Figure 2.1 Subband Coding
Figure 2.2 Level Of Decomposition for Wavelet Transform
Figure 2.3 Convolution based scheme
Figure 2.4 Lifting based filtering Method
Figure 3.1 Types of watermarks [34]
Figure 3.2 Conflicting Requirements
Figure 4.1 Watermark embedding and extraction step
Figure 4.2 Plot for different α versus PSNR for original and watermarked Images
Figure 4.3 Plot for α versus similarity factor for original and watermarked image
Figure 4.4 Plot for different q versus PSNR for original and watermarked Images
Figure 4.4 Plot for q versus similarity factor for original and watermarked image
Figure 4.6 Embedding Process
Figure 4.7 The pixel array graph of the block
Figure 4.8 Watermarking extracting process
Figure 4.9 Wavelet Decomposition
Figure 4.10 Bit Plane Slicing Scheme to LL Band
Figure 4.11 Explanation of Proposed Algorithm step by step
Figure 5.1 VLSI Flow for Proposed Scheme
Figure 5.2 Implementation Flow for Proposed Scheme
Figure 5.3 Watermark Detection Process
Figure 5.4 Lifting architecture for 5/3 wavelet
Figure 5.5 Single scale one dimensional wavelet lifting (5-3 lossless wavelet)
Figure 5.6 Predict phase
Figure 5.7 Update phase
Figure 5.8 1-D DWT unit
Figure 5.9 Memory mapping
Figure 5.10 Flowchart to calculate the 2D Forward wavelet Transform
Figure 5.11 Flowchart to calculate the 2D Inverse wavelet Transform
Figure 5.12 Bit Plane Slice Method
Figure 5.13 Random Number generation scheme
Figure 5.14 Architecture of proposed scheme
Figure 5.15 Pin diagram
Figure 6.1 Comparison of PSNR for all algorithms for gray and color images
Figure 6.2 Comparison of Similarity Factor for all algorithms for gray and color
images
Figure 6.3 Down sampling and up sampling process for Y component
Figure 6.4 Reconstructed Y plane after up sampling
Figure 6.5 Modified Down-Up sampling process with proper reconstruction of
I Image
Figure 6.6 Down sampling and up sampling process for Cb component
Figure 6.7 Down sampling and up sampling process for Cr component
Figure 6.8 Simulation of Legal 5/3 Scheme
LIST OF TABLES
Table 2.1 Complexity comparison of convolution and lifting based
implementation
Table 2.2 Daubenchies 9/7 analysis filter coefficient
Table 2.3 Daubenchies 9/7 synthesis filter coefficient
Table 2.4 Le Gall 5/3 analysis and synthesis filter coefficient
Table 6.1 Comparison of Original Image and Watermarked Image without any
attack
Table 6.2 Comparison of Original Image and Watermarked Image with Gaussian
noise attack
Table 6.3 Comparison of Original Image and Watermarked Image with 1 degree
anticlockwise rotation
Table 6.4 Comparison of Original Image and Watermarked Image with JPEG
Compression
Table 6.5 Comparison of Original Watermark and Extracted Watermarked without
any attack
Table 6.6 Comparison of Original Watermark and Extracted Watermark with 1
degree anticlockwise rotation
Table 6.7 Comparison of Original and Extracted Watermark with JPEG
Compression
Table 6.8 Comparison of Original Watermark and Extracted Watermark with
Gaussian noise
Table 6.9 Comparison of Original Image and Watermarked Image without any
attack
Table 6.10 Comparison of Original Image and Watermarked Image with Gaussian
attack
Table 6.11 Comparison of Original Image and Watermarked Image with 1 degree
anticlockwise rotation
Table 6.12 Comparison of Original Image and Watermarked Image with JPEG
Compression
Table 6.13 Comparison of Original Watermark and Extracted Watermarked without
any attack
Table 6.14 Comparison of Original Watermark and Extracted Watermark with
Gaussian noise
Table 6.15 Comparison of Original Watermark and Extracted Watermark with 1
degree anticlockwise rotation
Table 6.16 Comparison of Original Image and Watermarked Image with JPEG
Compression
Table 6.17 Synthesis Report for Proposed DWT, IDWT and Watermarking
Processor(SPARTEN 3E)
Table 6.18 Device Utilization Report for Proposed DWT, IDWT and Watermarking
Processor (SPARTEN 3E)
Table 6.19 Timing Reports for DWT,IDWT and Watermarking Processor
(SPARTEN 3E)
Table 6.20 Synthesis Report for Proposed DWT, IDWT and Watermarking
Processor (VIRTEX XCV50-6bg256)
Table 6.21 Device Utilization Report for Proposed DWT, IDWT and Watermarking
Processor (VIRTEX XCV50-6bg256)
Table 6.22 Timing Reports for DWT,IDWT and Watermarking Processor
(VIRTEX XCV50-6bg256)
Table 6.23 Comparison with Previous Work
Table 6.24 Device utilization comparison (VIRTEX XC4VLX25-10FF676)
Table 6.25 Timing analysis comparison (VIRTEX XC4VLX25-10FF676)
LIST OF ACRONYMS
DCT Discrete Cosine Transform
DRM Digital Right Management
CMOS Complementary Metal Oxide Semiconductor
LCD Liquid Crystal Display
ADC Analog to Digital Converter
DAC Digital to Analog Converter
JPEG Joint Photographic Experts Group
MPEG Motion Photographic Experts Group
DWT Discrete Wavelet Transform
IDWT Inverse Discrete Wavelet Transform
VLSI Very Large Scale Integrated
LSB Least Significant Bit
HVS Human Visual System
FPGA Field Programmable Gate Array
ASIC Application Specific Integrated Circuit
DFT Discrete Fourier Transform
FFT Fast Fourier Transform
RTL Register Transfer Level
PSNR Peak Signal to Noise Ratio
MSE Mean Square Error
SF Similarity Factor
I/O Input/Output
RAM Random Access Memory
ROM Read Only Memory
MUX Multiplexer
LUT Look Up Table
IOB Input/Output Blocks
GCLK Global Clock Buffer
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 1
CHAPTER 1. INTRODUCTION
Digital photography is rapidly gaining popularity, and so the authentication of images taken by
digital cameras has become a great concern. Since the growth of computer networks and internet,
the information types of multimedia contents have changed. These kinds of digital contents are
easy to be stolen by way of transmitting on networks. For this reason, such technical mechanism
as copy protection, distribution tracing, and usage control are important issue for copyright
protection. Digital camera has been widely used in present days and images captured by it are
displayed on WWW and electronic commerce. But digital images are not easily acceptable in
courts, news reporting, and medical archiving because they can be altered or manipulated with
ease [1].
As the computers are more and more integrated via the network, the distribution of digital
media is becoming faster, easier, and requiring less effort to make exact copies. One of the major
impediments is the lack of effective intellectual property protection of digital media to
discourage unauthorized copying and distribution. Watermarking is a technique for inserting
information (watermark) into an image, which can be extracted or detected later for a variety of
purposes such as identification and/or authentication. Also referred to as simply watermarking, a
pattern of bits inserted into a digital image, audio or video file that identifies the file's copyright
information (author, rights, etc.). The name comes from the faintly visible watermarks imprinted
on stationery that identify the manufacturer of the stationery. The purpose of digital watermarks
is to provide copyright protection for intellectual property that's in digital format. Unlike printed
watermarks, which are intended to be somewhat visible, digital watermarks are designed to be
completely invisible, or in the case of audio clips, inaudible. Moreover, the actual bits
representing the watermark must be scattered throughout the file in such a way that they cannot
be identified and manipulated.
The digital watermark must be robust enough so that it can withstand normal changes to the
file, such as reductions from lossy compression algorithms. Satisfying all these requirements is
no easy feat, but there are a number of companies offering competing technologies. All of them
work by making the watermark appear as noise - that is, random data that exists in most digital
files anyway. To view a watermark, you need a special program that knows how to extract the
watermark data. Watermarking is also called data embedding and information hiding.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 2
1.1 Motivation
Owing to the usage of internet, concerns about protecting and enforcing intellectual property
(IP) rights of the digital content are mounting. Unauthorized replication and manipulation of
digital content is relatively easy and can be achieved with inexpensive tools. Digital Rights
Management (DRM) systems ([2], [3]) address issues related to ownership rights of digital
content. Various aspects of content management – namely; content identification, storage,
representation, and distribution – and IP rights management are highlighted in DRM. Although
unauthorized access of digital content is being prevented by implementing encryption
technologies, these approaches do not prevent an authorized user from illegally replicating the
decrypted content. Digital watermarking is one of the key technologies that can be used in DRM
systems for establishing ownership rights, tracking usage, ensuring authorized access, preventing
illegal replication, and facilitating content authentication. Therefore, a two-layer protection
mechanism utilizing both watermarking and encryption is needed to build effective DRM
systems that can address IP rights and copyright issues [4].
Conventionally, in analog world, a painting is signed by the artist to attest the copyright, an
identity card is stamped by the steel seal to avoid forgery, and the paper money is identified by
the embossed portrait. Such kind of hand-written signatures, seals and watermarks have been
used from ancient times as a way to identify the source, creator of a document or a picture. For
example, a priceless painting of the 11th century in National Palace Museum named "Travelers
on a Mountain Path" had not been identified as the genuine work of Fan Kuan until Fan's
signature is found between the woods behind a group of travelers of the painting.
(a) Travelers on a Mountain (b) Fan’s signature
Fig 1.1 Watermarking Example
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 3
However, in the digital world, digital technology for manipulating images has made it difficult
to distinguish the visual truth. Besides, the characteristics of digitization bring significant hangs
in copyright issues, which create an urgent need to intellectual property protection on the
digitally recorded information. Digital watermarking has been proposed as a way to claim the
ownership of the source and owner. Unlike encryption, watermarking does not restrict access to
the data. Once the encrypted data is decrypted, the intellectual property rights are no longer
protected.
Over the past few years, the technology of the digital watermarking has gained prominence and
emerged as a leading candidate that could solve the fundamental problems of legal ownership
and content authentications for digital multimedia data. A great deal of research efforts has been
focused on digital image watermarking in recent years. The techniques proposed so far can be
divided into two groups according to the embedding domain. One group is spatial domain
approach.The other group is frequency domain approach.
The process of embedding a watermark in a multimedia object is termed as watermarking.
Watermark can be considered as a kind of a signature that reveals the owner of the multimedia
object. Content providers want to embed watermarks in their multimedia objects (digital content)
for several reasons like copyright protection, content authentication, tamper detection etc. A
watermarking algorithm embeds a visible or invisible watermark in a given multimedia object.
The embedding process is guided by use of a secret key which decided the locations within the
multimedia object (image) where the watermark would be embedded. Once the watermark is
embedded it can experience several attacks because the multimedia object can be digitally
processed. The attacks can be unintentional (in case of images, low pass filtering or gamma
correction or compression) or intentional (like cropping). Hence the watermark has to be very
robust against all these possible attacks. When the owner wants to check the watermarks in the
possibly attacked and distorted multimedia object, s/he relies on the secret key that was used to
embed the watermark. Using the secret key, the embedded watermark sequence can be extracted.
This extracted watermark may or may not resemble the original watermark because the object
might have been attacked. Hence to validate the existence of watermark, either the original
object is used to compare and find out the watermark signal (non-blind watermarking) or a
correlation measure is used to detect the strength of the watermark signal from the extracted
watermark (blind watermarking).In the correlation based detection the original watermark
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 4
sequence is compared with the extracted watermark sequence and a statistical correlation test is
used to determine the existence of the watermark.
Fig 1.2 Watermarking Technique
Each of the watermarking algorithms has its own applications; thus, all are equally important.
Over the past decade, numerous watermarking algorithms have been invented, and their software
implementations have been demonstrated ([5], [6]). However, only a few hardware
implementations are presented in the literature. A hardware based watermarking system can be
designed on a field programmable gate array (FPGA) board, Trimedia processor board [7], or
custom integrated circuit (IC) [8]. The choice between an FPGA and a cell-based IC is a trade-
off among cost, power consumption, and performance ([8], [9]). In this thesis, we present both
FPGA-based prototyping and a custom IC design to facilitate high-performance real-time
watermarking at the source end when the image is captured by an electronic component like a
digital camera.
We propose a new concept for digital cameras to solve some of the significant problems
associated with the use of digital images as evidence in a court of law. The integrity of digital
images as evidence rests on the accurate answering of a simple question: Who did what when?
Watermarking algorithms and Encryption schemes are used to identify from the digital image the
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 5
photographer, the camera, the time when the image was taken, and verify the image
authentication. We call a camera with this capability “Secure Digital Camera”.
1.2 Data Hiding Techniques
Cryptography: It scrambles a message into a code to obscure its meaning. Scrambling of
message is done with help of secret key. Scrambling message called as encrypted and it is again
decrypted with that secret key only. Cryptography provides security to message.
Steganography: With Steganography, the sender of a message would hide it in a host file. The
host file, or cover message, is the file that anyone can see. When people use steganography, they
often hide the true intent for communicating in a more common place communication scenario.
In steganography, usually the message itself is of value and must be protected through clever
hiding techniques and the “vessel” for hiding the message is not of value.
Watermarking: Watermarking is the direct embedding of additional information into the
original content or host signal. Ideally, there should be no perceptible difference between the
watermarked and original signal and the watermark should be difficult to remove or alter without
damaging the host signal. In watermarking, the effective coupling of message to the “vessel,”
which is the digital content, is of value and the protection of the content is crucial.
In case of steganography, where the method of hiding the message may be secret and the
message itself is secret, in watermarking, typically the watermark embedding process is known
and the message (except for the use of a secret key) does not have to be secret.
1.3 Digital Camera Overview
A block diagram of the proposed digital watermark is shown in Fig 1.1[10]. In the proposed
digital camera, the image is captured by an image sensor and converted to a digital signal by the
A/D converter. A Complementary Metal Oxide Semiconductor (CMOS) image sensor that has an
embedded A/D converter will be used. The captured image is stored temporarily in the scratch
memory, after which it is displayed on the LCD panel with the help of the controller. The
purpose of the Liquid Crystal Display (LCD) panel is to enable the user to see the image frame
before it is watermarked by the watermarking unit and stored in the camera, which can then be
further transmitted over the network, or transferred to flash memory, computer hard drive or
optical discs. The controller unit that is responsible will handle both color and monochrome
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 6
images. We will use robust and invisible watermarking scheme for implementation of
authenticity. The spatial domain co-efficient are converted to frequency domain co-efficient with
the help of frequency domain transformation methods like Discrete Cosine Transform (DCT),
Discrete Wavelet Transform (DWT) and Discrete Fourier Transform (DFT) [11]. The co-efficient
selection key provides the selected coefficients to embed the watermark. The watermark unit is
embedding the watermark to give “watermarked secure image”. User has been provided with a
flexibility to make a decision about insertion of watermark into an image. Based on requirement,
watermark may or may not be inserted into image. Images with and without watermark are
stored in two separate memories. Images without watermark are stored in temporary memory and
watermarked image are stored in flash memory. In case of non blind detection, images stored in
temporary memory can be used for detection.
Fig 1.3 Block Diagram of Digital Still Camera
A watermarking system can be implemented with either software or hardware. Most
watermarking algorithms have been developed for software implementations due to ease of use,
upgrading and flexibility. However, the software implementations have the limited speed
problem and are vulnerable to the off-line attacks. In software, implementation requires the
addition of a dedicated processor such as a DSP core that occupies considerably more area,
consumes significantly more power, and may still not perform adequately fast. The hardware
CMOSSensor
Sensor
ADCTemporaryMemory
LCD Controller
FrequencyTransformation
WatermarkingUnit
FlashMemory
InputImage
Co-efficientKey
Out
WatermarkedImage
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 7
implementation has advantage over the software implementation in terms of reliability and high
performance. The overall advantage is that hardware consumes less area, less power and faster
for implementing [12].If a chip is to be fitted in the digital devices, the output videos or images
can be marked right at the original although the same can be done using software after those
videos or images downloaded to the computer. But in this case embedding software will take
more time compared to hardware. The example of TV broadcast will highlight the significance
where digital media is to be marked in real time and hardware is the only solution.
1.4 Overview of Digital Watermarking scheme
The watermark extraction process is similar to the watermark embedding process. The whole
watermark embedding process is shown in Fig 1.4 [13] whereas the watermark extraction
process is shown in Fig 1.5 [13].
As with traditional color processing, we first convert an image from an RGB color space to the
YCbCr color space [14]. Then Y component of the image is down-sampled to form a grayscale
image of resolution of 1 M pixels (assuming the original is between 2 M and 8 M pixels true for
most digital cameras today). Afterwards, a watermark is embedded in the image of the
coefficients of the nth sub band level DWT of the image with secret key. Finally, the Y image
plane is converted back to spatial domain by IDWT and a watermarked image is formed by up-
sampling the image and adding it with the original Y, Cb and Cr color components. For
extraction process, the user has access of watermark (w), the coefficient selection key (c key)
Fig 1.4 Watermark Embedding Process
WC-key
Upsampling
YCbCr toRGB
IDWT
F
CbCr
DownSampling
RGB toYCbCr DWT
EmbeddingBlock
Y
Z
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 8
Fig 1.5 Watermark Extraction Process
([15],[16]) and the original image incase of non blind watermarking. Since only the user of the
digital camera knows the secret key for the watermarking, security against forgery is guaranteed.
As shown in above Fig 1.4, watermark is applied to frequency transform domain. There are
various schemes for spatial to frequency domain conversion like DFT,DCT,DWT etc. DWT is
recently used technique for frequency domain conversion. There are various methods available
for DWT based watermarking schemes. Arnold transform based watermarking scheme
([17],[18]) can be used where watermarked symbol is also transformed before embedding it to
the original image. Energy based watermarking scheme ([19],[20],[21],[22]) where, we embed
the watermark into the detail wavelet coefficients using a watermarking key, only in the first
level of the decomposed image. In middle band algorithm [23], one way to use one middle
frequency co-efficient as a scale to quantize the other co-efficent of the same middle frequency
band pair. Spread spectrum based watermarking [24] can be used for both spatial and spectral
domain watermarking.
1.5 Objective of Research
The objective of research is to develop a feasible and hardware implemented watermarking
scheme for digital cameras so as to provide a cost-effective and practical tool for authentication
and ownership verification of images taken by digital camera. The objectives of research for
thesis are as follows:
1) To study the different watermarking algorithms
2) To compare various watermarking algorithms to select best for FPGA/ASIC
implementation.
RGB toYCbCr
DownSampling
DWT MarkExtraction
Z
C-keyW
W’’
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 9
3) To propose the efficient algorithm which is useful for copyright protection and ownership
verification?
4) To achieve FPGA implementation of watermarking schemes and comparison based on
power, area and speed.
5) To synthesize the net list using synopsys Design Vision for UMC .18 µm standard Cell
library.
1.6 Organization of Thesis
The outline of rest of thesis is as follows: Chapter 2 includes literature survey of watermarking
and different characteristics of digital watermarking, types of watermarking and geometrical
attacks for watermarking. Chapter 3 describes the basics of Discrete Wavelet Transform (DWT)
and lifting based legall 5/3 scheme which has lesser computer complexity. Chapter 4 analyzes
the different algorithm for watermarking and also proposes scheme which has comparable PSNR
and MSE results.Chapter 5 emphasis implementation of wavelet based lifting scheme and
watermark hardware implementation. Chapter 6 provides results of different watermarking
algorithms, synthesis reports for wavelet based watermarking scheme and timing reports for
proposed scheme.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 10
CHAPTER 2: DIGITAL WATERMARKING
Watermarking is the process that embeds data called a watermark, tag or label into a
multimedia object such that watermark can be detected or extracted later to make an assertion
about object. The object may be an image, audio, video or text. In general, any watermarking
scheme consists of three parts, such as the watermark, the encoder and the decoder.
2.1 Literature Survey of Watermarking
Previously, spatial domain watermarking techniques for image data was popular. Some of the
earliest techniques embed m sequences into the least significant bit (LSB) of the data to provide
effective transparent embedding technique ([25], [26]). M-sequences are chosen due to their
good correlation properties so that a correlation operation can be used for watermark detection.
Furthermore, these techniques are computationally inexpensive to implement. Such a scheme
was first proposed in and extended to two dimensional [27].Then, the authors reshape the m
sequence into two-dimensional watermark blocks which are added and detected on block by
block basis [25]. The block based method, known as variable two dimensional watermark
(VW2D) shown to be robust to JPEG compression. This technique has also been shown to be an
effective fragile watermarking scheme which can detect image alternation on a block basis [28].
Another spatial domain technique consists of embedding a texture based watermark into a
portion of the image with similar texture, it will be difficult to pensive the watermark. The
watermark is detected using a correlation detector [29]. Transformation domain watermarking is
useful for taking advantage of perceptual criteria in embedding process, for designing
watermarking techniques which are robust to common compression techniques, and for direct
watermark embedding of compressed bit stream. A common transform framework for images is
the block based DCT which is a fundamental building block of current image coding standards
such as JPEG and video coding standards such as the MPEG video coders [30] and the ITU H.26
x family of codecs.
First DCT based semi fragile watermarking algorithm for digital camera with FPGA
implementation was developed by Hyun Lim, Soon-Young Park and Seong jun Kang in early
2003 [31]. In 2004, Saraju P. Mohanty, N. Raganathan had also developed visible watermarking
scheme on DCT [32]. After that, algorithms for wavelet based approach were developed to adapt
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 11
JPEG2000 new millennium standard and to explore multiresolution property of wavelet ([33],
[34]). In 2005 later part, Sammy H. M. Hawk and Edumund Y. Lam proposed watermark
implementation technique in digital photography with DWT approach [35] for software based
implementation. In 2006, Lei Tian and Heng-Ming Tai had developed Secure Images captured
by Digital camera for DWT based approach [36]. Another spread spectrum watermarking
techniques provides better perceptual transparency and watermark robustness ([37], [38]). This
can also developed for secure digital camera application. A. Lumini and Dario Maio have
developed watermarking scheme with random binary sequence [39]. Yong-Gang Fu and Hui -
Rong Wang have done watermarking on threshold based scheme [40]. Hsien-Wen Tseng and
Chin-Chen Chang suggested watermarking with block processing method for with differential
expansion method [41]. Tung Shou Chen, Jeanne Chen and Jian-Guo Chen have developed
simple and efficient watermark technique for JPEG2000 Codec with scattered matrix watermark
[42].
The current literature is rich in watermarking algorithms developed for various types of media,
such as image, video, audio, and text data, and their software implementations. The algorithms
work in various domains like spatial, DCT, and wavelet and insert-extract different types of
watermarks including invisible robust, invisible fragile, and visible. These watermarking
algorithms primarily work off-line; i.e., the images are first acquired and then the watermarks are
inserted before the watermarked images are made available to the user. Thus, in these
approaches, there is a gap between image capture and image transmission. The objective of work
was to develop a hardware-based watermarking system to bridge this gap. The watermark chip
will be fitted in any electronic component that acquires the images, which are then watermarked
in real time while capturing.
A DCT domain invisible watermarking chip is presented by Tsai and Lu [43]. The
watermarking system embeds a pseudorandom sequence of real numbers with a selected set of
DCT coefficients and is extracted without using the original image. The chip is implemented
with TSMC 0.35 µm technology and has a die size of 3.064 x 3.064 mm2 and 46,374 gates. The
chip is estimated to consume 62.78 mW of power when operated at 50 MHz frequency with a
3.3V supply.
Garimella et al. [44] have proposed a watermarking VLSI architecture for invisible fragile
watermarking in the spatial domain. In this scheme, the differential error is encrypted and
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 12
interleaved along with the first sample. The watermark can be extracted by accumulating the
consecutive least significant bits (LSBs) of the pixels and then decrypting them. The extracted
watermark is then compared with the original watermark for image authentication. The
Application Specific Integrated Circuit (ASIC) is implemented using 0.13 µm technology. The
area of the chip is 3453 x 3453 µm2, and the chip consumes 37.6 µW of power when operated at
1.2 V. The critical path delay of the circuit is 5.89 ns.
Mohanty et al. [8] have proposed another watermarking hardware architecture that can insert
two visible watermarks in images in the spatial domain. This architecture can insert either of the
two watermarks depending on the requirements of the user. The chip is implemented with 0.35
µm2 technology and occupies an area of 3.34 x 2.89 mm2 and consumes 6.9286 mW when
operated at 3.3V and 292.27 MHz.
Fan et al. [45] have proposed a visible watermarking design based on an adaptive discrete
wavelet transform (DWT). They proposed efficiently reduced operational and resource-sharing
techniques using an existing algorithm. Host image and watermark are transformed into three-
level multi-resolution structures. The host image signal is divided into two sequences with the
same pattern length. Processing time is reduced by using a two-path parallel processing
architecture. The signal is sent to different processing elements by the demultiplexers. The
watermark image is embedded by modifying the coefficients of the image.
In this report, we describe a VLSI architecture that implements both invisible and robust
watermarking functionalities. We first decompose original image with first level DWT. Then, we
applied bit plane slicing method to obtain MSB to LSB plane. We embed the watermark in the
LSB plane. A binary watermark generated from pseudo random number generator is embedded
into selected co-efficient with the original image bit plane in the invisible robust watermarking
algorithm. The VLSI architecture is prototyped with a Xilinx FPGA and a custom IC design.
2.2 Basics of Watermarking
2.2.1 Characteristics of Watermarking
A watermark is designed to permanently reside in the host data. When the ownership of data is
in question, the information can be extracted to completely characterize the owner. To achieve
maximum protection of intellectual property with watermarked media, several requirements must
be satisfied. Digital watermarking is regarded as a possible solution to ownership problem
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 13
because it can embed the owner information into images to protect the copyright. A good
watermarking scheme should meet following requirements.
Imperceptible: The digital watermark should not be perceptible to the viewer. It means that
after the embedding process, the quality of the image should not be degraded. The watermark
should be imperceptible so as not to affect the viewing experience of the image or the quality of
the audio signal.
Undeletable: The watermark must be difficult or even impossible to remove by a malicious
cracker, at least without obviously degrading the host signal.
Statistically undetectable: A pirate should not be able to detect the watermark by comparing
several watermarked signals belonging to the same author.
Robustness: The watermark should be able to survive lossy compression techniques like JPEG,
which is commonly used for transmission and storage. The embedded mark should resist
malicious attacks such as compression, linear or nonlinear filtering, image enhancement,
resizing. The watermark should be retrievable even if common signal processing operations are
applied, such as signal enhancement, geometric image operations and noise filtering.
Unambiguous: Retrieval of the watermark should unambiguously identify the owner, and the
accuracy of identification should degrade gradually in the face of attacks.
Security: The embedded mark should only be accessible by authorized organization. Although
the watermarking algorithm is published to everyone, those without a secret key cannot access
the marks in the protected images.
Capacity: The amount of information that can be stored in a watermark depends on the
application. For application like digital images authentication, a payload of one bit is usually
sufficient.
2.2.2 Types of watermarks [46]
Visible: Visible watermarks are designed to be easily perceived by the viewer, and should
clearly identify the owner. The watermark must not detract from the image content itself.
However, most research currently focuses on invisible watermarks, which are imperceptible
under normal viewing conditions.
Fragile: Fragile watermarks are designed to be distorted, or to be broken, under the slightest
changes to the image. Semi-fragile watermarks are designed to break under all changes that
exceed a user-specified threshold.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 14
Spatial: These are constructed in the image spatial domain, and embedded directly into an
image’s pixel data.
Spectral: These are constructed in the image transform domain, and watermarks are
incorporated into an image’s transform coefficients Discrete-Cosine Transform (DCT), Discrete-
Wavelet Transform (DWT).
Public & private: In some applications like copyright protection and data monitoring,
watermark extraction algorithm can use original un-watermarked data to find the watermark.
This is called as non oblivious or private watermarking. The original image is usually subtracted
from the suspected image before a detection algorithm is applied. Non-oblivious watermarking is
at present the only option for reliable copyright protection. In most other applications e.g. copy
protection and indexing, the watermark extraction algorithms do not have access to the original
watermark data. This renders the watermark extraction more difficult. Watermarking algorithm
of this kind is referred as public, blind or oblivious watermarking algorithm.
Fig 2.1 Types of watermarks [46].
Asymmetric & Symmetric: Asymmetric watermarking (also called asymmetric key
watermarking) is a technique where different keys are used for embedding and detecting the
watermark. In symmetric watermarking (or symmetric key watermarking), the same keys are
used for embedding and detecting watermarks.
The image captured by Digital Camera can not alter with malicious attacks so it should be
robust. We are using original image at the time of detection so it is private type of digital
watermarking.
Types of Watermark
Invisible Visible
Fragile Robust
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 15
2.2.3 Classification of Watermarking Method
There are two types of watermarking:
Irreversible watermarking
Reversible watermarking
Irreversible watermarking: Permanent distortion is one of the main drawbacks of all the
irreversible watermarking schemes. Attempts to recover the original signal after the signal
passing the authentication process is not guaranteed. Some common problems, such as salt-and
pepper artifacts and retrieval of original image can now be resolved using reversible
watermarking. Irreversible watermarking deals with copyright protection focusing more on
robustness.
Reversible watermarking: Reversible watermarking deals with fragile watermarking
applications like authentication and integrity of an image by embedding the assigned watermark
into the original image and it can also recover the original image from the suspected image. The
retrieved watermark can be used to determine the ownership by comparing the retrieved
watermark with the assigned one. Similar to conventional watermarking schemes, reversible
watermarking schemes have to be robust against the intentional or the unintentional attacks and
should be imperceptible to avoid the attraction of attacks and value lost. Therefore, the reversible
watermarking also has to satisfy all requirements of the conventional watermarking such as
robustness, imperceptibility, and readily embedding and retrieving. Reversible watermarking’s
application areas comprise of authenticity of the image where fragility is the main requirement.
For image authentication purpose for digital camera requires reversible watermarking approach
because original image should be retrieved at the time of extraction.
2.2.4 Conflicting Requirements of watermarking
The properties listed above are all related to each other. For instance, a very robust watermark
can be obtained by making many large modifications to the host data for each bit of the
watermark. Large modifications in the host data will be noticeable, however, and many
modifications per watermark bit will limit the maximum amount of watermark bits that can be
stored in a data object. Hence, a tradeoff should be considered between the different
requirements so that an optimal watermark for each application can be developed. The mutual
dependencies between the basic requirements are shown in Fig 2.2.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 16
Fig 2.2 Conflicting Requirements
2.3 Watermarking In Different Domain
Generally, there are two broad watermarking schemes and categories: spatial domain
watermarking and frequency domain watermarking. In a spatial domain watermarking scheme,
the watermark is embedded by direct modifying the pixel value of an image. These spatial
domain watermarking schemes are simple and less robust to common signal processing
operations, since the watermark doesn’t spread all over the image and some common signal
processing easily erase the embedded watermark without affecting the quality of the
watermarked image. On the other hand, frequency domain watermarking schemes involve
embedding the watermark by modifying the transform co-efficient, after the image has been
transformed to the transform domain. Human eyes are more sensitive to noise in the lower
frequency range than in its higher frequency range counterpart. (The energy of most natural
images is concentrated on the lower frequency range.) Therefore, the quantization table applied
in lossy compression always reflects the human visual system that is less sensitive to
quantization noise at higher frequencies. In order to invisibly embed the watermark and survive
the lossy data compression, a reasonable trade-off is to embed the watermark into the middle-
frequency range of the image. To prevent an expert from extracting the hidden information
directly from the transformed domain, the watermarks are embedded by modifying the
relationship of the neighboring blocks of middle-frequency coefficients of the original image.
This is done instead of embedding by an adaptive operation. “Adaptive” watermarks may be
detected by using adaptive filters – as the watermark is based on the original image
characteristics only. The former is better as the coefficient governing relationship is known to the
Capacity
RobustnessImperceptibility
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 17
creator only. The oldest technique of embedding data into images is the Least Significant Bit
(LSB), and it is implicitly based on masking. What LSB does initially is to set the least significant
bit of each pixel to 0. This method satisfies the perceptual transparency property, since only the
least significant bit of an 8-bit value is altered. Data can be embedded into the image by choosing
the desired values of 0’s and 1’s for the LSB. This method was initially designed to work for gray
scale images. But it can be easily extended to color images by treating each plane as the single
plane in the former. This technique is useful for detecting size modifications or when some
editing may have been done to the image.
2.3.1 Spatial domain Watermarking
Spatial domain watermarking is performed by modifying values of pixel of a frame. Let us
denote a picture to be watermarked by P and values of its pixel samples by Pi, a watermarked
version of picture P by 'P and values of its pixel color samples by 'P i . Let us have as many
elements of watermark W with values Wi as number of pixels in picture P. Watermark W hereby
covers the whole picture P. Further, it is possible to increase the watermark strength by
multiplying watermark element values by weight factor α. Then the natural formula for
embedding watermark W into picture P is:
'i i iP P W (2.1)
The most common algorithm using spatial domain watermarking is LSB. The simplest
watermarking method in spatial domain is to just flip the least significant bit (LSB) of chosen
pixels in an image. Given the extraordinarily high channel capacity of using the entire cover for
transmission in this method, a smaller object may be embedded multiple times. Even if most of
these are lost due to attacks, a single surviving watermark would be considered a success.
2.3.2 Frequency Domain Watermarking
These methods are similar to spatial domain watermarking in that the values of selected
frequencies can be altered. Because high frequencies will be lost by compression or scaling, the
watermark signal is applied to lower frequencies, or better yet, applied adaptively to frequencies
containing important elements of the original picture. Upon inverse transformation, watermarks
applied to frequency domain will be dispersed over the entire spatial image, so these methods are
not as susceptible to defeat by cropping as the spatial technique.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 18
a) Discrete Cosine Transform (DCT): DCT allows an image to be broken up into different
frequency bands, making it much easier to embed watermarking information into the middle
frequency bands of an image. The middle frequency bands are chosen such that they have
minimize to avoid the most visual important parts of the image (low frequencies) without over-
exposing themselves to remove through compression and noise attacks (high frequencies).In this
technique, the original image is divided into 8x8 blocks of pixels. Then, the 2-D DCT is applied
independently to each block. After that, coefficients of the middle-frequency range are picked
from the DCT coefficients.
b) Discrete Wavelet Transform (DWT) :In DWT based approach, each level produces four
level bands of data, one corresponding to the low pass band(LL), and three other corresponding to
horizontal (HL), vertical (LH) and diagonal (HH) high pass bands. The decomposed images show
a coarse approximation image in the lowest resolution low pass band, and three detail image in
higher bands. The low pass band can further be decomposed to obtain another level of
decomposition. Watermark data inserted into low frequencies is more robust to image distortions
that have low pass characteristics like filtering, lossy compression and geometric manipulation
and less robust to change of the histogram such as contrast/brightness adjustment, gamma
correction and cropping. On the other hand, watermark data inserted into middle and high
frequencies is typically less robust to low pass filtering, lossy compression and geometric
deformation of the image but extremely robust with respect to noise adding and nonlinear
deformation of the gray scale.
2.3.3 Spatial Domain Vs Frequency Domain Watermarking [47]
The watermark can be applied to frequency or in spatial domain. The frequency domain
methods are more robust than that of the spatial domain techniques. On the other hand, the
spatial domain watermarking schemes have less computational overhead compared to frequency
domain schemes. Nowadays, most researches focus on developing various watermarking
methods in the frequency domain since probably most currently popular information
transmission and compression techniques are in frequency domain e.g. like JPEG, MPEG, DCT,
etc. Several methods have been processed in frequency domain such like DFT, DCT and DWT.
Compared with other methods in frequency domain, DWT can better localize the feature whose
change is less sensitive to human eyes and localize the information in space and frequency.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 19
Especially, DWT based watermarking methods have been researched intensively due to the fact
that the current image compression is based on wavelet domain, such like JPEG 2000.The spatial
domain watermarking scheme is generally fast and simple, but it doesn’t guarantee robustness
against common signal distortion, whereas frequency domain method based on a multi resolution
wavelet decomposition, which shows greater robustness against such common attacks. We have
focused on wavelet based frequency domain watermarking method for our digital camera.
2.3.4 Advantage of Wavelet based Watermarking Techniques [48]
1) It avoids blocking artifacts so perceptibility of water marked image is very good.
2) Wavelet-based watermarking schemes are more robust under transmission.
3) They are better matched to the HVS (Human Visual System) characteristics.
4) It exploits the multi resolution property of wavelet very well. Hence an image can be shown
at different levels of resolution and can be sequentially processed from low resolution to high
resolution.
5) Visual artifacts introduced by wavelet coded images are less evident compared to DCT
because wavelet transmission doesn’t decompose the image into blocks for processing. At
higher compression ratios blocking artifacts are noticeable in DCT; however, in wavelet
coded images it is much clearer.
6) DFT and DCT are full frame transform, and hence any change in the transform coefficients
affects the entire image except if DCT is implemented using a block based approach.
However DWT has spatial frequency locality, which means if signal is embedded it will
affect the image locally. Hence a wavelet transform provides both frequency and spatial
description for an image.
2.4 Types of watermark attacks
Simple attacks (other possible names include waveform attacks or noise attacks) are
conceptually simple. They attempt to impair the embedded watermark by manipulating the
whole watermarked data (host data plus watermark), without trying to identify and isolate the
watermark. Examples include linear and general non-linear filtering, waveform-based
compression (JPEG, MPEG), addition of noise, addition of a cropping, quantization in the pixel
domain, conversion to analog, and correction.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 20
Detection-disabling attacks (other names include synchronization attacks) try to break the
correlation and make the recovery of the watermark infeasible for a watermark detector. This is
done mostly by geometric distortion like zooming, shift in spatial or temporal (for video)
direction, rotation, shear, cropping, pixel permutations, sub sampling, removal or insertion of
pixels or pixel clusters, or any other geometric transformation of the data. A typical property of
this type of attacks is that the watermark remains in the attacked data. Typically, it can be
recovered with increased intelligence (and thus, complexity) of the watermark decoder.
Ambiguity attacks (other possible names include confusion attacks, deadlock attacks, inversion
attacks, fake-watermark attacks and fake-original attacks) attempt to confuse by producing fake
data. In an ambiguity attack, the attacker tries to fake a watermark and an object such that the
watermark is embedded in the alleged “original” object.
Removal attacks attempt to: a) analyze the watermarked data, b) estimate the watermark or the
host data, c) separate the watermarked data into host data and watermark, and d) discard only the
watermark. Examples are collusion attacks, denoising, certain nonlinear filter operations and
compression attacks using synthetic modeling of the image (e.g. using texture models or 3-D
models).
2.5 Common Attack Techniques
Additive noise: This may stem in certain applications from the use of digital to analog (D/A) and
analog to digital (A/D) converters or from transmission errors. However, an attacker may
introduce perceptually shaped noise (thus, imperceptible) with the maximum unnoticeable
power. This action will typically increase the threshold at which the correlation detector works.
Cropping : This is a very common attack since in many cases the attacker is interested in a small
portion of the watermarked object, such as parts of a certain picture or frames of a video
sequence. With this in mind, in order to survive, the watermark needs to be spread over the
dimensions where this attack takes place.
Rotation and scaling: This has been the true battle horse of digital watermarking, especially
because of its success with still images. Correlation-based detection and extraction fail when
rotation or scaling is performed on the watermarked image because the embedded watermark and
the locally generated version do not share the same spatial pattern anymore. An exhaustive
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 21
search with different rotation angles and scaling factors does yield the correlation peak, but it is
prohibitively complex.
2.5 Performance of Watermarked Image
a) Similarity Factor (SF): To assess the change in quality of image, we require correlating each
coefficient of original image as well as watermarked image.
( , ) ' ( , )
( , ) ( , ) ' ( , ) ' ( , )
w m n w m nS F
w m n w m n w m n w m n
(2.2)
Where, w (m, n) = original Image, w (m, n) = watermarked Image
It gives correlation of original images and watermarked images. It should be ideally 1.
b) Mean Square Error (MSE): To measure the credibility of the modified image, the mean
square error (MSE) between the original watermark and the extracted watermark can be used.
MSE is defined as
2
1
1( , ') ( ( ) '( ) )
wN
iw
M S E w w w i w iN
(2.3)
Where w = Original watermark, w’= Extracted watermark & Nw = Length of watermark. A
small value of the MSE (For example, a value less than 0.02) indicates the extracted watermark is
still credible. When the MSE value is near 0.5, we can consider that the extracted watermark is
totally uncorrelated to the original one.
c) Peak Signal to Noise Ratio (PSNR): It is a ratio of maximum signal power to noise power.
225510logPSNR
MSE
(2.4)
The PSNR is term for the ratio between the maximum possible power of a signal and the power
of corrupting noise that affects the fidelity of watermarked image. Because many signals have a
very wide dynamic range, PSNR is usually expressed in terms of the logarithmic decibel scale.
Higher the value of PSNR gives better quality of image. For color images with three RGB values
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 22
per pixel, the definition of PSNR is the same except the MSE is the sum over all squared value
differences divided by image size and by three. Typical values for the PSNR in lossy image and
video compression are between 30 and 50 dB, where higher is better.
2.6 Summary
Digital watermarking is a technique for inserting ownership information (watermark) into an
image, which can be detected later on for identification and authentication. Digital watermarking
has been used to address issue through the embedding of a secret signal in a digital image that
enables ownership. Watermarking is defined as the practice of imperceptibility altering a
multimedia work to hide a message into the host image. In order for a watermark to be useful, a
watermarking scheme should at least meet basic requirements such as transparency, robustness
and security. Watermarking provides authentication and ownership verification for secure
images taken by digital camera. For digital camera application, invisible and robust
watermarking techniques is required.
FPGA Implementation of Watermarking Algorithm for Digital Camera
23
CHAPTER 3. WAVELET TRANSFORM
Wavelets are functions defined over a finite interval and having an average value of zero. The
basic idea of the wavelet transform is to represent any arbitrary function as a superposition of a
set of such wavelets or basis functions. These basis functions or baby wavelets are obtained from
a single prototype wavelet called the mother wavelet, by dilations or contractions (scaling) and
translations (shifts).
3.1 History of Frequency Domain Transformation
The discovery of first of DCT in 1974 is an important achievement for the research community
working on frequency domain transformation. The DCT can be regarded as a discrete-time
version of the fourier-cosine series. It is a close relative of DFT, a technique for converting a
signal into elementary frequency components. In 1992, JPEG [49] established the first
international standard for still image compression where the encoders and decoders are DCT-
based. The DCT-based encoder can be thought of as essentially compression of a stream of 8x8
blocks of image samples. Each 8x8 block makes its way through each processing step, and yields
output in compressed form into the data stream. Because adjacent image pixels are highly
correlated, the Forward DCT (FDCT) processing step lays the foundation for achieving data
compression by concentrating most of the signal in the lower spatial frequencies. For a typical
8x8 sample block from a typical source image, most of the spatial frequencies have zero or near-
zero amplitude and need not be encoded. In principle, the DCT introduces no loss to the source
image samples; it merely transforms them to a domain in which they can be more efficiently
encoded. Since some of the current image compression techniques are based on the wavelet
domain, such as JPEG2000, DWT based watermarking methods have been researched
intensively.
3.2 Discrete Wavelet Transform (DWT)
Despite all the advantages of JPEG compression schemes based on DCT namely simplicity,
satisfactory performance, and availability of special purpose hardware for implementation; there
are some shortcomings also. Since, the input image needs to be “blocked”; correlation across the
FPGA Implementation of Watermarking Algorithm for Digital Camera
24
block boundaries is not eliminated. This results in noticeable and annoying “blocking artifacts”
particularly at low bit rates. Over the past several years, the wavelet transform has gained
widespread acceptance in signal processing in general and in image compression research in
particular. In many applications, wavelet-based schemes (also referred as sub band coding)
outperform other coding schemes like the one based on DCT. Since there is no need to block the
input image and its basis functions have variable length, wavelet coding schemes at higher
compression avoid blocking artifacts. Wavelet-based coding is more robust under transmission
and decoding errors, and also facilitates progressive transmission of images. In addition, they are
better matched to the HVS characteristics. Because of their inherent multi resolution nature [50],
wavelet coding schemes are especially suitable for applications where scalability and tolerable
degradation are important.
3.2.1 Sub band for Wavelet Based Coding: Over the years, there have been many efforts
leading to improved and efficient design of filter banks and subband coding techniques. Since
1990, methods very similar and closely related to sub band coding [51] have been proposed by
various researchers under the name of Wavelet Coding (WC) using filters specifically designed
for image compression purpose. Such filters must meet additional and often conflicting
requirements ([52], [53]). These include short impulse response of the analysis filters to preserve
the localization of image features as well as to have fast computation, short impulse response of
the synthesis filters to prevent spreading of artifacts (ringing around edges) resulting from
quantization errors, and linear phase of both types of filters since nonlinear phase introduce
unpleasant waveform distortions around edges. Orthogonality is another useful requirement since
orthogonal filters ([54], [55]) in addition to preservation of energy; implement a unitary
transform between the input and the sub bands. The concept Sub band coding is given in Fig 3.1.
Unlike in the case of 1-D, in two-band Finite Impulse Response (FIR) systems linear phase and
orthogonally are mutually exclusive, and so orthogonality is sacrificed to achieve linear phase.
The input is passed to the low pass filter L and high pass filter H as shown in below Fig 3.1.After
it is passed to filter it is down sampled with the sampling factor 2. Then again low pass filter and
high pass filter both are passed through the high pass filter and low pass filter followed by down
sampling by two to obtain the LL, LH, HL and HH separated bands. The input is passed through
FPGA Implementation of Watermarking Algorithm for Digital Camera
25
the 1st level of decomposition procedure to have one approximation co-efficient (LL) and three
detailed co-efficient LH, HL and HH.
Fig 3.1 Sub band Coding
3.2.2 Watermarking with Wavelet Decomposition Level: With different combination of a low
pass and high pass filter, an image is decomposed into low-low (LL), low-high (LH), high-low
(HL) and high-high (HH) bands. To obtain the next scaled wavelet co-efficient, the band LL is
further decomposed and sub sampled. This process is repeated several times, which is
determined by requirement of the user. Furthermore, from these DWT coefficients, the original
image can be reconstructed. This reconstruction of process is called the inverse DWT (IDWT).
There are two basics requirements to embedded watermark for Secure Digital Camera that
watermark should be invisible and robust for various attacks [56]. To have invisibility we can
insert it in the high frequency band (HH) but it provides less robustness. To have robustness we
can embed watermark into the low frequency band (LL) but then of course; the invisibility is the
issue, hence there is always trade off between invisibility and robustness [57]. So optimum way
is to choose middle frequency bands (LH) and (HL) to insert watermark symbol. So there is
always tradeoff between robustness and invisibility while choosing any watermarking algorithm.
With increase the level of decomposition, the robustness will increase. This requires these issues
should be considered at the cost of additional hardware while dealing with watermarking
embedding algorithm. Three level decomposition is given in Fig 3.2
H
L2
L
H
H
L
2
2
2
2
2
LL
LH
HL
HH
I/P
FPGA Implementation of Watermarking Algorithm for Digital Camera
26
Fig 3.2 Level Of Decomposition for Wavelet Transform.
3.3 Implementation of Wavelet Transform
DWT can be implemented either using convolution technique or lifting techniques. Previously,
DWT implementations were based on the so-called convolution technique (filter bank scheme
[58]), which computes the DWT of a signal by iterating a sequence of high and low pass filtering
steps, followed by down sampling. In 1997, Sweldens proposed a new scheme, called Lifting
Scheme (LS), as an alternative way to compute the DWT [59]. The LS has immediately obtained
a noteworthy success, as it provides several advantages with respect to the convolution scheme
(filter bank scheme.)
3.3.1 Relationship between Convolution and lifting scheme
Convolution-based filtering consists in performing a series of dot products between the two
filter masks and the extended 1-D signal. This implementation is non-polyphase and suffers from
inefficient hardware utility, low throughput and perfect reconstruction is not guaranteed.
Convolution scheme is same as filter bank scheme. We define matrices called Quadrate Mirror
Filter (QMF) in terms of filter coefficients and multiply by our data vector to produce a step of
wavelet transform. The method for computing the DWT coefficients used is matrix
multiplication. It is found that a large fraction of entries of matrices used in this method are
zeros.
HL2
HH1
LH1
HL1
HH2
LH22
LH3
HL3 HH3
LL3
FPGA Implementation of Watermarking Algorithm for Digital Camera
27
Fig 3.3 Convolution based scheme
Clearly, this method is inefficient for computational purpose – it would be preferable to take
the advantage of the fact that the matrices are sparse. The factorization of wavelet transform
enables this, replacing the process of multiplication with the sequence of trivial operations
involving simple multiplications, addition and shifting of data vectors. This has the advantages
of being faster and easily invertible, and allows less calculation. The Lifting Scheme (LS) takes
advantage of the fact that there is a simple relation between all multiresolution analyses that
share the same filter (h). It has been shown to be equivalent to the traditional method of
implementing the wavelet transform via the QMF matrices [60]. It turns out that, the procedure is
equivalent to the factorization of a matrix whose components are related to the z transform of the
filter. Lifting-based filtering consists of a sequence of very simple filtering operations for which
alternately odd sample values of the signal are updated with a weighted sum of even sample
values, and even sample values are updated with a weighted sum of odd sample values. To get
smooth coefficient, lifting scheme is used. For smooth coefficient division by two is needed.
Lifting is more efficient polyphase alternative to convolution implementation. It requires fewer
coefficients (less memory) and has twice throughput. It enables efficient lossy and lossless
compression to be achieved within a common framework, even within a single compressed data
stream.
3.3.2 Advantage of lifting scheme
1) Lifting scheme is fast: For long filters, Lifting scheme has a complexity of order n/2,
compared with a complexity of order n for classical wavelet implementation.
Ho(n)
H1(n)
Go(n)
G1(n)
X(n) Yo(K)
Y1(K)
FPGA Implementation of Watermarking Algorithm for Digital Camera
28
2) All operations within a lifting step can be done entirely in parallel, while the only sequential
part is the order of lifting operations.
3) Lifting can be done in-place; therefore an auxiliary memory is not needed. At every
summation point the new stream replaces the old one.
4) Maps integer to integer transformation thus eliminating the use of floating point operator.
Thus more efficient in term of hardware implementation
5) Process is reversible and lossless.
Table 3.1 Complexity comparison of convolution and lifting based implementation [61]
Two pixel 1- level 1-D DWT
Convolution Lifting scheme
Filter Multiplication Addition Multiplication Addition
5/3 4 6 2 4
9/7 9 14 6 8
3.3.3 Lifting based Scheme
Lifting scheme is fast DWT implementation scheme [62], which can be used to construct both
first and second-generation wavelets. The idea behind the Lifting scheme is to use half of the
data samples to predict the other half and repeat this until all the samples are predicted. The
algorithm consists of three simple steps, applied repetitively on the samples: Split phase, Predict
phase and Update phase, as shown in Fig 3.4.
Split phase: Assume that the scheme starts at level 0. We denote the data set a k,0 where k
represents the data element and 0 signifies the iteration level 0. In the first stage, the data set is
split into two other sets:
The even samples k,1 and the odd samples k,1 (see Fig. 3.4). This is also referred to as the
Lazy Wavelet transform because it does not de-correlate the data, but just sub-samples the signal
into even and odd samples. We use negative indices according to the convention that smaller the
data set, the smaller the index
kk 2,0,1 (3.1)
12,0,1 kk (3.2)
FPGA Implementation of Watermarking Algorithm for Digital Camera
29
Fig 3.4 Split, Predict and Update Phase for lifting scheme
Predict Phase (dual lifting): The next step is to use the even sub-set k,1 to predict the odd sub-
set k,1 using a prediction function )( ,1 kP . The more correlation presented in the original data,
the closer will the predicted value be to the original k,1 . For odd set k,1 will be replaced by the
difference between itself and its predicted value. Thus,
1, 1, 1,( )k k kP (3.3)
Different functions can be used for prediction of odd samples. The easiest choice is to predict
that an odd sample is just equal to its neighboring even sample. This prediction method is result
to the Haar wavelet. Obviously, this is an easy but not realistic choice, as there is no reason why
the odd samples should be equal to the even ones. Alternatively, second or higher degree
interpolation functions can be used for prediction. Depending on the degree of the interpolating
function N, we can measure failure to predict . N is referred to as the number of dual vanishing
moments and defines the degree of the polynomials that can be predicted by the dual wavelet.
Update Phase (primal lifting): In this stage the coefficients k,1 are lifted with the help of the
neighboring wavelet coefficients , so that a certain scalar quantity Q, e.g. the mean, is
preserved.
)()( ,0,1 kk QQ (3.4)
A new operator U is introduced that ensures the preservation of this quantity:
Split Predict Update
+
-+
+
kj ,1
kj ,
kj ,
odd samples γ
even samples λ
FPGA Implementation of Watermarking Algorithm for Digital Camera
30
1, 1, 1,( )k k kU (3.5)
Operator U uses a wavelet coefficient of the current level ),( kj to update N’ even samples of the
same level ),( kj . N is also known as the number of real vanishing moments, not necessary equal
to N.
Inverse Transform: One of the advantages of the lifting scheme is that the inverse transform is
very trivial. The inversion rules are: revert the order of the operations, invert the signs in the
lifting steps, and replace the split
Step by a Merge step:
1-Update phase , , ( , )( )j k j k j kU (3.6)
2-Predict phase , , ,( )j k j k j kP (3.7)
3-Merge phase 1,2 , 1,2 1 ,j k j k j k j k (3.8)
These three phases are repeatedly applied on the even samples, transforming half of the samples
each pass (level), until all samples are transformed.
2-D transform: 2-D transform is performed by applying the 1-D transform algorithm
consecutively on the rows and columns of a 2-D signal. Starting from the first iteration level, the
1-D forward transform is first applied to all the rows, and then to all the columns. Subsequently
we move to the next iteration level and repeat the mentioned steps, and so on.
There are different form of Wavelet transform function have been proposed for still images.
From those function there has been growing interest on reversible integer to integer wavelet
transform. This comes from the fact that it maps integer to integer. Indeed, such transforms are
invertible in finite precision arithmetic, and approximate the linear wavelet transform from
which they are derived. Another wavelet transform to obtain lossy transformation is proposed by
Daubechies, with greater compression ratio. The interest in Daubechies 9/7 filter comes from the
fact that 9/7 algorithm satisfy the condition required to obtain wavelet transform like it utilize bi-
orthogonal pair of filters which gives linear phase, symmetric output. Since lossless compression
requires no data loss due to rounding, a reversible wavelet transform using lifting scheme with
Le Gall 5/3 filters are used. The equation below describes the 5/3 DWT algorithm
implementation.
FPGA Implementation of Watermarking Algorithm for Digital Camera
31
(2 ) (2 2)(2 1) (2 1)
2
x n x ny n x n
(3.9)
(2 1) (2 1) 2(2 ) (2 )
4
y n y ny n x n
(3.10)
Where x the input signal and y is is is the output signal. The 5/3 filter allows repetitive
encoding and de-coding of an image without any loss. Of course, this is true when the
decompressed image values are not clipped when they fall outside the full dynamic range (i.e., 0-
255 for an 8 b/p image). Traditional wavelet transform implementations require the whole image
to be buffered and the filtering operation to be performed in vertical and horizontal directions.
While filtering in the horizontal direction is very simple, filtering in the vertical direction is more
cumbersome. Filtering along a row requires one row to be read; filtering along a column requires
the whole image to be read. The line-based wavelet transform overcomes this difficulty,
providing exactly the same transform coefficients as the traditional wavelet transform
implementation.
Lossy compression allows for some data to be lost during the compression, allowing non-
reversible wavelet transformations. The irreversible (lossy) transformation is implemented by
means of the biorthogonal Daubechies 9-tap/7-tap filter. The equations below shows how the 9/7
tap Daubechies algorithm can be implemented in lifting scheme.
Forward transformation:
2 1 2 1 2 2 2( )n n n nY X X X
2 2 2 1 2 1( )n n n nY X Y Y
2 1 2 1 2 2 2( )n n n nY Y Y Y
2 2 2 1 2 1( )n n n nY Y Y Y
2 1 2 1n nY K Y
2 2 /n nY Y k (3.11)
Inverse transformation:
2 2n nX k Y
FPGA Implementation of Watermarking Algorithm for Digital Camera
32
2 1 2 1 /n nX X k
2 12 2 2 1( )nn n nX X X X
2 22 1 2 1 2( )nn n nX X X X
2 12 2 2 1( )nn n nX X X X
2 1 2 1 2 2 2( )n n n nX X X X (3.12)
Where the values of constants are:
1.586134342 , 0.052980118 , 1.230174105 , 0.882911075 and
0.443506852k
Table 3.2 Daubenchies 9/7 analysis filter coefficient
Analysis Filter coefficient
Index Low-pass filter High-pass filter
0 0.602949 1.115087
1 0.262864 -0.059127
2 -0.078223 -0.057543
3 -0.016864 0.091271
4 0.026748
Table 3.3 Daubenchies 9/7 synthesis filter coefficient
Synthesis Filter coefficients
Index Low-pass filter High-pass filter
0 1.115087 0.602949
1 0.591271 -0.266864
2 -0.057543 -0.07822
3 -0.091271 -0.016864
4 0.026748
FPGA Implementation of Watermarking Algorithm for Digital Camera
33
Table 3.4 Le Gall 5/3 analysis and synthesis filter coefficient
Analysis filter coefficient Synthesis filter coefficient
Index Low-pass High-pass Low-pass High-pass
0 6/8 1 1 6/8
1 2/8 -1/2 -1/2 2/8
2 -1/8 - - -1/8
3.4 Summary
There are two Lifting based wavelet implementation one is Le Gall 5/3 and another is
Daubenchies 9/7. Le Gall 5/3 based watermarking scheme has coefficients which can be
implemented very easily without loss of its values as all coefficients have values of in terms of
negative powers of 2. But for Daubenchies 9/7 based lifting scheme has co-efficient which can
be complex for the implementation. To implement hardware efficient wavelet based
watermarking scheme, it is obvious choice to have Le Gall 5/3 based lifting scheme due to
simpler & lossless hardware implementation.
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 34
CHAPTER 4. DWT BASED WATERMARKING ALGORITHMS
We have implemented total three different wavelet based watermarking algorithm.
Algorithm 1: Wavelet Based watermarking with Random binary sequence (A. Lumini et al.
[39]).
Algorithm 2: Wavelet Based watermarking with Threshold scheme (You Fu et al [40]).
Algorithm 3: Wavelet Based watermarking with Block processing method (Hsien-Wen et al.
[41]).
All three algorithms are studied and results are compared against robustness, security and
transparency.
4.1 Algorithm 1 [39]
4.1.1 Watermark Embedding Method
Step 1: Let X is the original gray-level image with size p q . First, we apply 1st level wavelet
transform on X to obtain four different frequency bands such as approximation co-efficient,
detailed co-efficient, horizontal and vertical co-efficient band.
Step 2: Apply 2nd level Decomposition on approximation co-efficient band X2. Arrange the
approximation co-efficient in the descending format such that Maximum co-efficient comes first
and minimum coefficient last.
Step 3: Generate the watermark key of Y which is of 64 x 64 using the random number generator
to embed into X2.
Step 4: Add the watermark to the 2nd level approximation co-efficient with the secret key applied
for selection of coefficient.
Z= X2+ a *Y (4.1)
Where Z= Watermarked Image, X2= 2nd level of decomposition level of X.
Y= Generated watermarked key,
a = scaling factor=0.1
Step 5: Save the embedded position, sub band label, then, we take the two-dimensional
IDWT of Z.
Step 6: To simulate an attack on watermark image, we have added Gaussian noise, 1 degree anti
clockwise rotation, compression and rescaling to check robustness of watermarking scheme.
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 35
The advantage of this scheme is simpler in implementation and disadvantage is availability of
same random number generator at transmitter and receiver side.
4.1.2 Watermark Detection Method
Step 1: Perform Wavelet transform to get recovered image.
Step 2: Remove the watermark from approximation co-efficient exactly inverse process of
embedding process.
Step 3: Perform 2 levels Inverse DWT transform to obtain the original image co- efficient.
Step 4: Compare the original Image with recovered Image.
4.2 Algorithm 2 [40]
The block diagram of the proposed image watermarking system is shown in Fig.4.1 below.
Suppose an 8-bit gray-scale image I of size M × N to be protected by insertion of a binary
watermark w, further assume w is of the size M/4 × N/4 (i.e. the size of lower frequency sub band
coefficient after two level decomposition), if not, a M/4 × N/4 binary image can be constructed
from w in several ways, a natural way is to periodically tile w.
4.2.1 Watermark Embedding Method
Step 1:We first decompose the original image into two levels by using a discrete bi-orthogonal
spline wavelet transform.
Step 2: A secret key K is used to generate one random permutation vectors Rp and Cp of the row
and column vectors Row = [1,2,…, M/4 ] and Col =[1,2,…, N/4 ] of the watermark image W,
and permute the pixel positions of the watermark W by using Rp and Cp as follows
wp (Rp (i),Cp ( j)) = w(i, j) (4.2)
where, wp represents the permuted watermark.
Step 3: For robust watermark embedding, the watermark is embedded into the lower frequency
sub band after two levels decomposition. Let CLL be the lower frequency coefficients at a
resolution level 2 discrete wavelet transform with orientation LL and C*LL be the corresponding
watermarked sub band coefficient.
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 36
Fig 4.1 watermark Embedding and extraction steps
Step 4: The embedding algorithm can be depicted as follows:
Let d (i, j)= C (i, j)/Q( i, j)LL
If wp (i, j) ≠ mod(d (i, j),2) ,
C*LL (i, j) = (d(i, j) +1) *Q(i, j) ;
Else, C*LL (i, j) = CLL (i, j).
Where, Q is constant matrix for controlling the embedding watermark strength, and
└ ┘ is the operation to get the integer part of the number.
Step 5: Then, after the inverse DWT, the watermarked image can be acquired. The decision of
the matrix Q is a key problem for the robustness of the watermark. The greater Q, the watermark
is more robust. We can have two methods to decide the element of Q, one simple way is to let all
the element of Q be the same number Const; the other is an adaptive way according to the
corresponding coefficients of the detail sub band.
Q1 (i, j) = Const. i =1,..., M /4 , j =1,2,.., N/4 (4.3)
2 2
2 2
| ( , ) | | ( , ) |( , ) log (2 )
2HL LHC i j C i j
Q i j
i = 1,...,M/4 , j = 1,2,.., N/4 (4.4)
where C2HL and C2
LH are the detail coefficients at the horizontal and vertical direction of the
level 2nd wavelet decomposition respectively, and α is a parameter for controlling the strength of
the watermark embedding.
For later formula, when the image has complex texture at the place (i, j), the coefficient Q (i, j)
is large, then we can have a strong watermark embedding. Whereas when the Q (i, j) is small, the
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 37
image is flat at (i, j), so we can have a light watermark, where α is a parameter for controlling the
strength of watermark embedding space. Hence in such a way, we can get robustness but less
degradation for original image.
4.2.2 Watermark Extraction Method
For watermark extraction, the inverse operations are carried out.
Step 1: The watermarked image is transformed by a DWT into two levels.
Step 2: For the lower frequency sub band coefficients CLL , the quantization matrix by (4.3) or
(4.4) is firstly computed.
Step 3: For each element of the coefficients we do as follows:
Let d (i, j) = C (i, j)/Q( i, j)LL
w* (i, j) = mod (d (i, j), 2);
Step 4: After inverse random permutation, leading to w* = w, i.e., the right watermark is
extracted. To evaluate the watermark detector response, we use the similarity factor to correlate
two values.
The advantage of scheme is that it is energy saving scheme but it is difficult to adjust the
threshold with accurate value of Q matrix.
4.2.3 Effect of Scaling factor α and Quantization factor q:
We have been implemented the different values of α varies from 0.1 to 0.5 for threshold based
scheme suggested by Yong Fu et al [17].The parameter α represents a compromise between
resistance and image fidelity. The goal of maximizing the watermark robustness and minimizing
Fig 4.2 Variation in PSNR with respect to α for original and watermarked Images
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 38
its perceptibility is competing objectives. The parameter α can be turned in order to improve the
performance of one to another: In fact, by increasing α the robustness is improved, while by
decreasing α more perceptual fidelity to the original is achieved. The algorithm has been
checked for different images of gray scale as well as color images. The graph plot for α against
PSNR is shown in below Fig. 4.2.As you observe in the plot, as value of α increases the PSNR
is decreases.
The Fig 4.3 shown below is plot for values of scaling factor α against PSNR. As value of
scaling factor α increases the correlation between original and watermarked image is also
decreases.
Fig 4.3 Variation in similarity factor with respect to α for original and watermarked image
The Fig 4.4 shows the effect of quantization factor on PSNR. The quantization factor varies
from value 0.1 to 0.5.It signifies the threshold of the images for watermark embedding process. A
Fig 4.4 Variation in PSNR with respect to q for original and watermarked Images
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 39
different threshold should be chosen for each image in order to preserve the contribution due to the
coherent portion among different images. As value of quantization factor increases the value of
PSNR decreases as shown in plot below.
As shown below in Fig. 4.5, Similarity factor values decreases as value of q increases. The color
images have more similarity compare to gray scale image.
Fig 4.5 Variation in similarity factor with respect to q for original and watermarked image
4.3 Algorithm 3[41]
It is a based on integer wavelet transform scheme with reversible watermarking scheme. It uses
the block processing scheme with differential expansion scheme.
,2
x yl h x y
(4.5)Symbol └ ┘ is the floor function meaning “the greatest integer less than or equal to”.
The inverse transformation of [4.5] is,
1,
2 2
hhx l y l
(4.6)
As grayscale values are bounded in [0,255], we have
10 255
2
hl
and 0 255
2
hl
(4.7)
Which is equivalent tomin(2(255 ),2 1)h l l (4.8)
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 40
Then, the process of embedding watermarking using difference expansion is described asfollows:
4.3.1 The Embedding Method
Fig 4.6 Embedding Process
Assume that the original image is a grayscale image with size of 256 X 256 pixels.
a) Confirm the location of Embedding:
Step 1: We first split the original image which is to be watermarked, into many non-overlapping
small blocks with 8 X 8 pixels in a scan-line order. For convenience, let us assume that the image
has 256 gray levels and 256 X 256 pixels. Thus, we will get 1024 small blocks.
Step 2: For every block, it is decomposed by 1-level IWT (Integer Wavelet Transform), and
produces a low frequency sub-band LL1, which is a 4x4 matrix, as shown in Fig. 4.7
Step 3: If the pair of values (b1, b6) and (b11, b16) all are expandable, then we use ‘1’ to stand
for the attribute, else ‘0’ is used to represent the attribute.
b1
b6
b11
b16
Fig 4.7 The pixel array graph of the block
OriginalImage
Embed watermarkdata into
expansible block
Watermark data
Divide into 8X8Blocks
IntegerWavelet
Transform
CheckExpansibility&generate Key
Watermarked Image
256X256
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 41
Definition of Expansibility: For a grayscale-valued pair, (x, y) we say its difference number is
expandable if it satisfies the following condition, such that
0 2 min(2(255 ),2 1)h b l l (4.9)
Where,
,2
x yl h x y
(4.10)
Symbol └ ┘ is the floor function meaning “the greatest integer less than or equal to”, For both
b=0 and b=1.
Step 4: According to expansibility of each block a 1024 bit secret key is generated composed by
‘0’ and ‘1’.
b) Embed Watermarking
Step 1: Watermark is embedded in the corresponding block where key is 1. Calculating the
average li and difference hi for the ith pair of pixels, denoted as (xi, yi) by using [4.4] for both the
pair of pixels of ith block
Step 2: Calculating, hi’ =2hi+ wi , where wi is the corresponding bit of watermark.
Step 3: Calculating new ith pair of pixels (xi’,yi’ ) after embedding watermark by the following
with equation [4.7] and [4.8].
Step 4: Repeat the former steps until both pixel pairs of each ith block.
Step 5: Construct new coefficients using new (xi’,yi’).
Step 6: Find inverse IWT of each block and rearrange 8x8 blocks to get watermark image.
4.3.2 Watermark Extraction Method
The extraction procedure can be gotten from the procedure of watermarking embedding. The
block diagram is shown below.
The steps are given below:
Step 1: The watermarked image is firstly split into 8 X 8 many non-overlapping small blocks
with pixels in a scan-line order.
Step 2: According to secret key, the expansible blocks is decomposed by 1-level wavelet lifting
scheme, for pair of pixels (b1,b6) and (b11,b16) of low frequency sub-band LL1, the following
procedures are adopted to extract watermarking extraction:
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 42
Fig 4.8 watermarking extracting process
1. Calculate the average and difference of the pair of pixels.
' '' , ' ' '
2
x yl h x y
(4.11)
2. Extract watermarking:
0
'( '),
2
hw LSB h h
(4.12)
3. Restore the original pixel values back using [4.8]
0 00 0
1' , '
2 2
h hx l y l
(4.13)After the restoring the original pixel finds the inverse IWT to the subtracted image, which is
similar to the original image. The result according to this algorithm is shown in Fig. 4.8.
4.4 Proposed Watermarking Algorithm
Spatial-domain digital watermarking methods are generally considered as having poor
performance after geometric distortion (such as cropping and scaling), common signal processing
(such as JPEG and filtering), or subterfuge attacks (such as changing the least-significant bits).It
has less computational cost due to their easy operation. So it is more efficient. On the other hand,
frequency-domain watermark techniques, have their high computation complexity, and provide
great robustness to different attack. However, we have adopted the combined approach with
spatial-frequency domain approach which has advantages of both domains. The frequency domain
Using DifferenceExpansion and
According to key
IWTSplit into 8X8block
WatermarkedImage
Watermarkeddata
SubtractedImage
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 43
transformation is done with lifting based wavelet scheme and spatial domain transformation done
with bit plane slicing.
(a) Original Image (b)1st level decomposed Image
Fig 4.9 Wavelet Decompostion
These operations correspond to the following filtering processes:
Top left: 2-D low pass filter (LL).
Top right: horizontal high pass and vertical low pass filter (HL).
Lower left: horizontal low pass and vertical high pass filter (LH).
Lower right: 2-D high pass filter (HH).
To apply this transform to a complete image, we group the pixels into different blocks and
apply DWT transformation to each block. To view the result, all the top left components in Fig
4.9 (a) of the different blocks were grouped together to form the top left sub image in Fig 4.9 (b)
and the same for the components in the other three positions. It is clear from Fig 4.9 (b) that the
most of the energy is contained in the top left (LL) sub image and the least energy is in the lower
right (HH) sub image. The top right (HL) and the lower left (LH) sub image contains the edges.
The energies of LL Band (88-89%), HL (4-5%), LH (6-7%) and HH (1-2%). So the LL band
contains most part of energy while HH band contains marginal part of the total energy of image.
4.4.1 Bit-plane slicing Method
Instead of highlighting gray level images, highlighting the contribution made to total image
appearance by specific bits might be desired. Suppose that each pixel in an image is represented
by 8 bits. Imagine the image is composed of 8, 1-bit planes ranging from bit plane 0 (LSB) to bit
plane 7 (MSB). In terms of 8-bit bytes, plane 0 contains all lowest order bits in the bytes
comprising the pixels in the image and plane 7 contains all high order bits. Separating a digital
image into its bit planes is useful for analyzing the relative importance played by each bit of the
image, implying, it determines the adequacy of numbers of bits used to quantize each pixel,
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 44
useful for image compression. In terms of bit-plane extraction for a 8-bit image, it is seen that
binary image for bit plane 7 is obtained by proceeding the input image with a threshold gray-
level transformation function that maps all levels between 0 and 127 to one level (e.g. 0)and
maps all levels from 129 to 253 to another (eg. 255).
a) Watermark Embedding Method:
Step 1: Read the original Image X.
Step 2: Compute the first level wavelet decomposition of original image X. We obtain one
approximation image (LL Band) and three detail images, corresponding to the horizontal,
vertical and diagonal details of the original host image.
Step 3: Convert the LL band of original image into different 8 planes start with MSB to LSB.
Step 4: Generate the required watermark of text, image or random number.
Step 5: Add the LSB plane of high frequencies with desired watermark plane.
Step 6: Reconstruct the image with adding all the 8 planes again with MSB to LSB.
Step 7: Apply 1st level inverse to LL band and three detailed co-efficient to obtain the
watermarked image.
Step 8: Apply different attacks to the watermarked image to check the robustness.
Fig 4.10 Bit Plane Slicing Scheme to LL Band
b) Watermark Extraction process
Step 1: Apply DWT to watermarked image to get approximation and details co-efficient.
Step 2: Apply bit plane slicing to the LL of the watermarked image to get 8 different planes
start from LSB to MSB.
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 45
Original Image 1st Level Decomposition
Watermarked Image Reconstruction from plane Watermarked LSB Plane
(a) Watermark Embedding Process
Watermarked Image Watermarked LSB Plane
Original Image LSB plane of original Image Watermark(b) Watermark Extraction process
Fig 4.11 Explanation of Proposed Algorithm step by step
Step 3: Apply DWT to the original image to have four sub bands of LL, LH, HL and HH.
+
IDWT
Watermark
-
DWT
DWT
Bit Plane Slicing
A
A
FPGA Implementation of Watermarking Algorithm For Digital Camera
VLSI Design Lab., SVNIT, Surat 46
Step 4: Apply bit plane slicing to LL band of original image to get different planes from LSB
to MSB.
Step 5: Subtract the LSB plane of the original image from the LSB plane of watermarked
image to get watermark.
4.5 Summary
Spatial domain watermarking has advantage of less computational cost. Frequency domain
watermarking provides more robustness. The proposed algorithm has been developed to take
advantage of both spatial as well as frequency domain properties. The proposed algorithm
has been verified on MATLAB platforms for various attacks. It has comparable PSNR and
MSE results compare to other algorithms.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 47
CHAPTER 5. IMPLEMANTATION OF PROPOSED SCHEME
We have implemented the proposed watermarking algorithm through HDL implementation.
We have targeted algorithm to implement on FPGA kit. The complete flow for proposed scheme
is shown below in Fig 5.1. The design of DWT,IDWT and watermarking is done through VHDL
based RTL coding. The functional simulation of RTL codes has been checked through Modelsim
simulator. The synthesis results are obtained in ISE 9.1 of Xilinx. The area, power and speed
performance has been verified and also generate .net list which is useful to download in FPGA
through design vision of Synopsys.
The implementation flow for proposed scheme is shown in Fig 5.2.The image is read through
DesignSpecification
Design Entry
Function simulation
Synthesis
Post Synthesis Simulation
Translate, Place & RouteMap
Target FPGA
I/p : -----------------0/p: .vhd file
I/p : .vhd and library0/p: .vsim or .sim file
I/p : .vhd and technology library andsymbol library0/p: net list .v file
I/p : net list .v file andVerilog Technology library0/p: .vsim or .sim file
HDL Code
Modelsim
ISE and Design Compiler
Modelsim and VCS
Area, Power and Timingreports
Fig 5.1 VLSI Flow for Proposed Scheme
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 48
Fig 5.2 Implementation Flow for Proposed Scheme
MATLAB and pixel is stored in datain.txt file. With help of text I/O package the datain.txt file has
read in VHDL and Legall 5/3 based Lifting wavelet applied to obtain transform domain co-
MATLABImage Read
Function
TextInput/Output
Functionto read
Pixel input
LiftingBasedDWT
TransformDomain
Co-efficientMatrix
Separate LL bandMemory to embed
watermark
Bit Plane SlicingMethod
WatermarkEmbedding
process in LSB
Random Number Generator forCo-efficient key and watermarkGeneration
Reconstruction ofPlane to obtain LL
Band ofwatermarked
image
Original Image
LiftingBasedIDWT
Watermarked Image
TextInput/output
Functionto write
out put Pixel
MATLABImage Write
Function
MATLABImplementation
MATLABImplementation
HDL Implementation
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 49
efficient matrix. LL band coefficient stored in separate memory to embed watermark. The RTL
code of bit Plane slicing has been developed to separate different planes from LSB to MSB. To
the selected co-efficient generated by random number generator, then watermark has embedded
to them. Then all planes are reconstructed with bit plane slicing RTL code to obtain LL band of
watermarked image. Then lifting based legall 5/3 IDWT has been applied to obtain pixel values.
The MATLAB function is used to construct watermarked image.
Watermarked Image Original Image
Fig 5.3 Watermark Detection Process
The detection process is very simple. We just use MATLAB and Text I/O function to read
original image and watermarked image. The DWT based Legall 5/3 lifting scheme is applied and
bit plane slicing RTL applied to obtain LSB of watermarked and original image. Then after,
Bit plane Slice toObtain LSB Plane
MATLAB & TextInput/Output
Read Function
DWT Based Lifting
MATLAB & TextInput/Output
Read Function
DWT Based Lifting
Bit plane Slice toObtain LSB Plane
-
Watermark
Co-efficient Selection Key
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 50
subtract these two LSB planes and watermark is extracted according to selection key generated
by random number generator.
5.1 Hardware Implementation Lifting based DWT Scheme
For implementation of hardware efficient DWT based scheme, lifting based scheme obviously
far better than traditional convolution scheme.
1) It requires less operations than the filter bank scheme, with a saving of up to one half for very
long filters;
2) It allows to compute an integer wavelet transform (IWT), that is, a wavelet transform that
maps integers to integers, thus enabling the design of embedded lossless and lossy image
encoders .
3) In terms of FPGA implementation, it uses fewer resources and can have pipeline stages
enabling higher operating speed and lower power consumption.
Lifting based wavelet scheme used in various approaches like Daubechies 9/7 and Le Gall 5/3.
But Le Gall 5/3 is proven more hardware efficient due to its simplicity and lossless
implementation. Since lossless compression requires no data loss due to rounding, a reversible
wavelet transform using lifting scheme with Le Gall 5/3 filters are used. The equation below
describes the 5/3 DWT algorithm implementation. The odd and even samples values can be
calculated by,
2
)22()2()12()12(
nxnxnxny extext
ext (5.1)
4
2)12()12()2()2(
nynynxny ext (5.2)
5.1.1 Implementation of (lossless) Le gall 5/3 algorithm
To implement this algorithm, the equations stated earlier are utilized. In lifting scheme this
algorithm is divided in two phases: predict phase and update phase. To find the value for predict
phase, at a time three inputs are required. Similarly in update phase one even input and two
values obtained form predict phase is needed. The structure in Fig 5.4 shows the 5/3
implementation.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 51
Fig. 5.4 Lifting architecture for 5/3 wavelet
From the equations 5.1 and 5.2, it is found that odd and even coefficient can be easily calculated
using only shifting algorithm in VHDL. To save the memory during computation, once three
inputs are fetched from the memory, next time only two inputs are needed for calculation. So,
previous two inputs memory locations are utilized to store the values of predict phase (odd
coefficients). Hence, during computation total three memory locations are required. Fig. 5.5
shows how the coefficients are calculated with input pixels.
Fig 5.5 Single scale one dimensional wavelet lifting (5-3 lossless wavelet)
To perform 5/3 DWT 8 bit-gray scale image of LENA (256 X 256) is used. To implement the
predict phase and update phase necessary steps are shown below:
SplitPhase
PredictPhase
UpdatePhase
Xodd
Xeven
+
+
HP
LP
I/p value X
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 52
1. Split the input into odd and even positions.
2. perform predict step
3. perform update step
The architecture module of predict phase & update phase are shown below.
Fig 5.6 Predict phase
Fig 5.7 Update phase
The whole w-bit 1D-DWT structure, constructed according to lifting scheme is shown below in
Fig. 5.8. To process the image such a two one dimensional DWT unit for horizontal and vertical
transforms are required. To minimize the area, once the horizontal transform is completed same
Adder
ShiftReg
Adder
Y(2n + 1)
Y (2n ) Y(2n)
Y(2n - 1)
Adder
ShiftReg
subtractor
X(2n)
X(2n + 1)
X(2n + 2) Y(2n+1)
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 53
1D- DWT unit is utilized for vertical transformation. The coefficients computed in this way are
stored in internal memory.
Fig 5.8 1-D DWT unit
5.1.2 Memory management
As suggested, to obtain the forward wavelet transform, initially we need to read the three data.
From these three input data we get two coefficients detail (high) and approximate (low). We
need to manipulate these coefficients to display the image correctly at output. In VHDL, two
dimensional metric is not synthesizable. If we read the image having size n X n, then total n ^2
memory location are required to store each input pixels. For this thesis, 256 X 256 gray scale
image is utilized. So total memory location to store the input data are 65,536.Similarily total
65,536 memory locations are needed to store wavelet coefficient. Thus total memory locations
are 1, 31,072. Therefore the address size is calculated as 256 X 256 X 2 = 217 (17 bit address
size), and each data width is 8 bit as each pixel have size of 8 bits.
In 2-D wavelet transform, data is processed row wise and then after column wise. So during
the 1-D wavelet transform on rows, calculated detail coefficient should be placed at n/2 locations
form average coefficient. This mapping is shown in Fig 5.9. To store these coefficients also
single port RAM is designed in the FPGA. So before initialing the transformation, control offset
must be calculated from the size of image.
Thus to process the image, all rows are transferred to the FPGA from the SDRAM. The
coefficients from the corresponding to rows of the image itself are stored into single port RAM.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 54
Fig 5.9 Memory mapping (a) input pixels (b) after forward DWT transformation
Here is short description of the VHDL design unit. The design was described in number of
entities as described below:
Legall_5_3_forward and Legall_5_3_inverse: These entity –architecture pairs implement
the whole 5/3 forward DWT transformation and inverse DWT transformation
respectively.
2 Dimensional DWT and IDWT: These entity –architecture pairs implement the 2-D
forward DWT transformation and inverse DWT transformation respectively. They are
utilized as a component in Legall_5_3_forward and Legall_5_3_inverse programs.
1 Dimensional DWT an IDWT: These entity-architecture pairs implement the 1-D DWT
transformation in forward and inverse direction respectively. They are utilized as a
component in 1 Dimensional DWT an IDWT programs.
The flow chart for 2 Dimensional forward wavelet transformations is shown in the Fig 5.10.
First we load the total number of decomposition level N to initiate the process. Afterwards,
counter is incremented until it reaches the specified value of row counter R and column counter
C. First forward transformation on row has been calculated and then same procedure is
applicable on coloumn. After complete process of transformation on row and coloumn the load
value of decomposition level is each time decremented and same steps are repeated as above
follows. The same way inverse wavelet transformation is performed as shown in the Fig 5.11.
Every time, Level of decomposition is decremented once row and coloumn inverse
transformation is completed.
0 256
65,53565,280
65,536
128
65,664 65,792
1, 31,0721,30 ,816
L H
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 55
2D Wavelet Transform
Load = N
X = 0
X = X + 1 Forward 1-D TransformOn rows
R < X ?
X = 0
X = X + 1
C < X ?
Decrement load by one
Load > 0
STOP
Forward 1-D TransformOn rows
YES
NO
START
Fig 5.10 Flowchart to calculate the 2D Forward wavelet Transform
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 56
Fig 5.11 Flowchart to calculate the 2D Inverse wavelet Transform
5.2 Watermark Embedding Hardware Implementation
There are two basic blocks required for watermark embedding process.
1) Bit plane Slicing scheme Implementation
2) Random Number Generator for key selection and watermark generation
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 57
5.2.1 Bit Plane Slicing Implementation
It is the spatial domain techniques. In Spatial domain scheme, watermark is directly embedding
into the pixel values. Algorithm splits the image into 8 planes from MSB to LSB. The whole
concept is explained in details as shown in below Fig 5.12.
Consider the case; following co-efficients are stored in memory after transformation is applied.
01111001 01100101 01001010 0010011010000100 10000110 10001001 10001101
The values read from memory are taken one by one in temp variable.
Fig 5.12 Bit Plane Slice Method
To separate out the values in different planes, we will xor the temp values with standard values
as follows. Here first value read from memory and stored in temp is 01111001.
LSB plane : 01111001 and 00000001 : The resultant values is 00000001. Seventh plane: 01111001 and 00000010 : The resultant values is 00000000. Sixth plane : 01111001 and 00000100 : The resultant values is 00000000. Fifth plane : 01111001 and 00001000 : The resultant values is 00001000. Fourth plane : 01111001 and 00010000 : The resultant values is 00010000. Third plane : 01111001 and 00100000 : The resultant values is 00100000. Second plane : 01111001 and 01000000 : The resultant values is 01000000. MSB plane : 01111001 and 10000000 : The resultant values is 00000000.
Next time another value read from memory and stored in temp as 01100101. and same procedure
of and operation with constants is follows as above. This way with all LSB plane of all the co-
efficient are obtained. The reconstruction of the planes are also very simple. We have to just add
all the resultant values plane s to obtain original value. With addition of all plane obtained
values:
Bit plane 7(MSB)
Bit plane 1(LSB)
One 8 bit byte
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 58
00000001 + 00000000 + 00000000 + 00001000 + 00010000 + 00100000 + 01000000 +
00000000 = 01111001
The LSB plane and plane next to LSB contains practically no visually significant information. LSB
manipulation gives an enormous amount of capacity in LSB plane for hiding information.
5.2.2 Watermark Generation and Selection Unit
We have used invisible and robust watermarking algorithm that insert the pseudorandom
numbers that insert pseudorandom numbers to host data. Therefore, we focused on structural
design aspect of watermarking generators using LFSRs. The binary watermark is generated by a
pseudorandom sequence generator. The watermark generation unit consists of an LFSR. The
LFSR has a multitude of uses in digital system design and is a very crucial unit in watermark
security and detection. It is a sequential and detection. It is a shift register with a combinational
feedback logic around it that causes it to cycle pseudo randomly through a sequence of binary
values. The LFSR consists of flip-flops (FFs) as sequential elements with feedback loops. The
feedback around an LFSR comes from a selected set of points called taps in FF chain; these taps
are fed back to the FFs after either xor, and, nor operation. Here an 8 bit LFSR is modeled so as
to use a one to many feedback structure and has been modified for a 2n looping sequence. It
calculates and holds the next values of the LFSR, which is then assigned to output signal.
Fig 5.13 Random Number generation scheme
It is one of the important blocks of watermarking process. It is used to generate the co-efficient
selection key and as well as watermark generation. As shown in Fig 5.13, 8 bit D-flip flop is
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 59
used so the maximum number of co-efficient selection key from random number generator is
255. The watermark is added according to key generated at the output. The whole process is
explained in below Fig 5.13. The random number generator is started with secret key provided to
its initial state. We have used as secret key 10101101 is the initial seed to start random number
generation. The same key has been used with same random number at the detection side.
5.3 VLSI Implementation for Proposed Scheme
5.3.1 Architecture of Proposed scheme
Main Memory
Fig 5.14 architecture for proposed scheme
AdderSubtractor
ShiftRegister
TemporaryStorage
Adder
ShiftRegister
Adder
RAM 1
ExternalRAM
LL BandStorage
LFSRFlip Flops
LogicalAND
WatermarkAdder
RAM 2
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 60
The architecture design for proposed scheme is defined as shown in Fig 5.14.The main memory
comprises of 2 times larger memory for size of original image. For size of 256 x256 image the
main memory requirement is 2*256*256=1,31,072. The memory is divided into two parts as
RAM1 as one for original image and second as RAM2 for watermarked image. At time of
detection in non blind scheme, RAM1 values are considered as original pixels values and RAM2
is watermarked values. At start three values are read from RAM for lifting based wavelet scheme
with legal 5/3 method as explained in section 5.1.
5.3.2 Pin Diagram
The pin diagram for wavelet based spatial domain watermarking chip is shown in the Fig 5.15.
The function of each pin is also explained in details.
Fig 5.15 Pin Diagram
The functional description of each pin is as follow:
Data In [7:0] : DATA Input bus. Original pixel value which was stored will be input on this bus
for operation.
CLK : Clock signal to chip.
Wmcontrol: Enables during embedding the watermark.
RESETZ: It is active low signal to reset the chip
START: It is an active low handshake signal to initiate data transfer operation on Data In
bus on every clock edge.
Data out [7:0]: DATA output bus. Watermarked pixel values are output on this bus.
Data In [7:0] Wavelet based
Spatial Domain
watermarking
chip
clk
wmcontrol
RESETZ
START
Data out [7:0]
READY
BUSY
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 61
READY: It is active high signal will be activated for one CLK cycle after the completion of
watermark embedding operation. It indicates that Data out bus has valid out on
bus.
BUSY: It is a active high signal. It indicates that watermarking process in progress. When
signal is active high, external access to RAM1’s are isolated. The data on data out
bus is not valid.
5.4 Summary
The proposed scheme uses wavelet based lifting scheme with legal 5/3 transformation to obtain
frequency domain co-efficient. The proposed scheme requires bit plane slicing hardware to
separate out 8 different Planes from LSB to MSB. We embed the watermark with random binary
watermark in LSB plane according co-efficient selection key.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 62
CHAPTER 6. RESULTS ANALYSISWe have implemented different DWT based watermarking algorithms to check basic properties of
transparency, robustness and security of watermarking. We have used input image of 256 x 256
size of gray scale as well as color image. We have compared all algorithms for PSNR, MSE and
Similarity Factor results and also concluded the most suitable watermarking scheme for hardware
implementation. We have also measured the effect of quantization factor q and scaling factor α on
different watermarking schemes. We have used color images to prove watermarking scheme for
future generation secure digital camera.
6.1 MATLAB RESULTS
The watermarking algorithms are simulated for following gray scale original images.
Lena (256X256) (greyscale, 8 bpp)
Baboon (256X256) (greyscale, 8 bpp)
Cameraman (256X256) (greyscale, 8 bpp)
Transparency:
Table 6.1 Comparison of Original Image and Watermarked Image without any attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
Proposedscheme
Scheme 1(α) Scheme 2(q)
LenaPSNR 50.7988 67.55 46.154 48.1513 60.000MSE 0.541 0.01143 1.5621 0.9953 0.065SF 0.9950 0.99928 0.99181 0.9925 0.996
BaboonPSNR 49.4857 66.063 46.193 47.7169 59.55MSE 0.7320 0.016097 1.5625 1.1000 0.072SF 0.9947 0.99914 0.9913 0.9917 0.995
CameramanPSNR 51.3804 68.149 46.193 48.2631 61.14MSE 0.4732 0.039832 1.5625 0.9700 0.050SF 0.9954 0.99942 0.99109 0.9932 0.998
As shown in Table 6.1, it has been concluded that Yong Fu et al. [17] algorithm for threshold
method with scheme 1 has provided better result compare to others. The proposed scheme has also
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 63
comparable results with higher PSNR values. Hsien Wen [18] algorithm which uses block
processing approach has less efficient because of artifacts.
Robustness:
To check the robustness of the algorithm, we have verified the algorithms with Gaussian noise
attack, JPEG compression and 1 degree anticlockwise rotation
Table 6.2 Comparison of original Image and Watermarked Image with Gaussian noise attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
Proposedscheme
Scheme 1(α) Scheme 2(q)
LenaPSNR 20.068 20.079 20.029 20.014 20.071MSE 640.21 638.55 645.86 648.10 639.73SF 0.9910 0.99965 0.99348 0.9903 0.998
BaboonPSNR 20.041 20.047 20.011 20.021 20.043MSE 644.10 643.3 648.6 647.17 643.9SF 0.9980 0.99837 0.99348 0.9972 0.99805
CameramanPSNR 20.0391 20.402 20.352 20.369 20.392MSE 594.3 593.79 599.58 597.32 594.1SF 0.99952 0.99973 0.99337 0.99421 0.99965
Table 6.3 Comparison of Original and Watermarked Image with 1 degree anticlockwise rotation
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
Proposedscheme
Scheme 1(α) Scheme 2(q)
LenaPSNR 21.927 22.852 22.834 21.032 22.822MSE 417.20 337.19 338.63 512.70 339.54SF 0.9908 0.98581 0.99401 0.9901 0.9985
BaboonPSNR 16.983 17.229 17.225 16.821 17.229MSE 1302.4 1230.8 1231.9 1352.0 1230.9SF 0.9423 0.95305 0.9609 0.9321 0.9603
CameramanPSNR 20.053 20.034 20.026 20.007 20.049MSE 642.32 645.4 646.41 649.21 643.0SF 0.9592 0.97359 0.98119 0.9503 0.9851
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 64
Table 6.4 Comparison of Original Image and Watermarked Image with JPEG Compression
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
ProposedschemeScheme 1(α) Scheme 2(q)
JPEG Compression 10%Lena
PSNR 41.943 42.879 41.758 41.794 42.097MSE 4.157 3.3512 4.3384 4.302 4.012SF 0.9997 0.99998 0.99109 0.9932 0.9998
BaboonPSNR 38.601 38.94 38.447 38.573 38.651MSE 8.973 8.2996 9.2987 9.032 8.872SF 0.9993 0.99956 0.99254 0.9937 0.99942
CameramanPSNR 39.485 39.914 39.302 39.327 39.573MSE 7.321 6.6326 7.6367 7.592 7.234SF 0.99980 0.99999 0.99351 0.9949 0.99988
JPEG Compression 20%Lena
PSNR 39.137 39.751 39.002 38.997 39.034MSE 7.932 7.1768 8.1822 8.23 8.123SF 0.9989 0.99979 0.99303 0.9947 0.9998
BaboonPSNR 36.09 36.353 36.079 35.549 35.768MSE 16.00 15.058 16.04 18.12 17.23SF 0.9943 0.9958 0.99519 0.9960 0.9950
CameramanPSNR 36.695 33.795 35.539 35.559 35.824MSE 17.52 17.107 18.162 18.09 17.01SF 0.9990 0.99967 0.99367 0.9949 0.99950
JPEG Compression 30%Lena
PSNR 37.752 37.883 36.17 36.364 36.225MSE 10.912 10.588 15.706 15.02 15.51SF 0.9989 0.99959 0.9920 0.9938 0.9993
BaboonPSNR 35.801 16.4 17.433 35.323 35.375MSE 17.10 35.982 35.717 19.09 18.86SF 0.9903 0.99110 0.98925 0.9899 0.9910
CameramanPSNR 32.913 26.776 27.864 32.885 32.993MSE 33.25 33.853 33.68 33.70 33.10SF 0.9992 0.99948 0.99402 0.9952 0.99932
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 65
From Table 6.2, 6.3 and 6.4, it has been concluded that proposed scheme has better robustness
compare to other schemes. The proposed scheme utilizes the advantages of wavelet domain and
spatial domain concept which will improve the robustness with lesser computational complexity.
Security:
Table 6.5 Comparison of Original and Extracted Watermarked without attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedSchemeScheme 1(α) Scheme 2(q)
LenaText Logo 0.9982 0.99931 0.99136 0.9920 0.9989Randomnumber
0.9985 0.99934 0.99138 0.9922 0.9991
BaboonText Logo 0.9972 0.99893 0.99113 0.9913 0.9985Randomnumber
0.9974 0.99895 0.99116 0.9916 0.9988
CameramanText Logo 0.9987 0.99947 0.99184 0.9925 0.9993Randomnumber
0.9989 0.99952 0.99188 0.9929 0.9996
Table 6.6 Comparison of Original and Extracted Watermark with 1 degree anti clock rotation
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
LenaText Logo 0.9976 0.99930 0.99029 0.9820 0.9980Randomnumber
0.9978 0.99976 0.99140 0.9834 0.9989
BaboonText Logo 0.9974 0.99895 0.99076 0.9000 0.9975Randomnumber
0.9975 0.99910 0.99127 0.9025 0.9983
CameramanText Logo 0.9977 0.99950 0.99120 0.9910 0.9982Randomnumber
0.9979 0.99968 0.99137 0.9927 0.9991
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 66
Table 6.7 Comparison of Original and Extracted watermark with JPEG Compression
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
JPEG Compression 10%Lena
Text Logo 0.9970 0.99972 0.99542 0.9798 0.9979Randomnumber
0.9973 0.99974 0.99545 0.9801 0.9981
BaboonText Logo 0.9953 0.99964 0.99533 0.9789 0.9964Randomnumber
0.9955 0.99969 0.99538 0.9790 0.9965
CameramanText Logo 0.9975 0.99979 0.99547 0.9802 0.9983Randomnumber
0.9979 0.99982 0.999549 0.9805 0.9985
JPEG Compression 20%Lena
Text Logo 0.9962 0.99964 0.99452 0.9791 0.9972Randomnumber
0.9965 0.99969 0.99457 0.9795 0.9975
BaboonText Logo 0.9945 0.99953 0.99446 0.9780 0.9956Randomnumber
0.9948 0.99959 0.99447 0.9782 0.9958
CameramanText Logo 0.9968 0.99970 0.99460 0.9793 0.9974Randomnumber
0.9973 0.99973 0.99464 0.9796 0.9977
JPEG Compression 30%Lena
Text Logo 0.9950 0.99954 0.99636 0.9780 0.9961Randomnumber
0.9953 0.99957 0.99938 0.9783 0.9964
BaboonText Logo 0.9934 0.99948 0.99632 0.9767 0.9942Randomnumber
0.9937 0.99952 0.99635 0.9768 0.9945
CameramanText Logo 0.9955 0.99959 0.99643 0.9780 0.9965Randomnumber
0.9959 0.99963 0.99648 0.9783 0.9969
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 67
Table 6.8 Comparison of Original and Extracted Watermark with Gaussian noise
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
LenaText Logo 0.9969 0.99982 0.9964 0.9820 0.9982Randomnumber
0.9972 0.99985 0.9966 0.9835 0.9990
BaboonText Logo 0.9963 0.99971 0.9958 0.9500 0.9980Randomnumber
0.9968 0.99975 0.9962 0.9522 0.9987
CameramanText Logo 0.9974 0.99987 0.9974 0.9877 0.9987Randomnumber
0.9976 0.99989 0.9975 0.9884 0.9992
We have used Text Logo and random number as watermark to all algorithms. From 6.6, 6.7 and 6.8,
it has been concluded that the proposed scheme has almost Similarity Factor 0.99 in all the cases.
Higher values of Similarity Factor show that extracted watermark is exactly similar to the original
watermark.
Color Images:
All the Tables 6.9-6.16 suggest that proposed scheme has better results for color images also.
Table 6.9 Comparison of Original Image and Watermarked Image without any attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
ProposedschemeScheme 1(α) Scheme 2(q)
LenaPSNR 51.0551 68.067 46.154 49.5346 61.21MSE 0.510 0.010288 1.5621 0.7238 0.0492SF 0.9952 0.99929 0.99061 0.9935 0.997
BaboonPSNR 50.0352 67.955 46.193 48.3394 60.937MSE 0.645 0.010413 1.5625 0.9531 0.0524SF 0.9949 0.99929 0.99021 0.9929 0.996
CameramanPSNR 52.0455 68.54 46.193 50.1971 62.05MSE 0.4060 0.00990 1.5625 0.6214 0.0405SF 0.9955 0.99941 0.99128 0.9939 0.998
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 68
Table 6.10 Comparison of Original Image and Watermarked Image with Gaussian noise attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
ProposedschemeScheme 1(α) Scheme 2(q)
LenaPSNR 20.036 20.044 20.018 19.993 20.041MSE 644.90 643.72 647.52 651.32 644.10SF 0.9908 0.99871 0.99308 0.9900 0.997
BaboonPSNR 20.034 20.038 20.027 20.02 20.038MSE 645.21 644.63 646.18 647.20 644.80SF 0.9989 0.9993 0.99057 0.9979 0.9990
CameramanPSNR 20.377 20.175 20.184 20.311 20.348MSE 596.21 624.63 622.63 605.35 600.20SF 0.9972 0.99283 0.99912 0.9954 0.9997
Table 6.11 Comparison of Original and Watermarked Image with 1 degree anti clock rotation
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
Proposedscheme
Scheme 1(α) Scheme 2(q)
LenaPSNR 22.331 23.514 0.9953 21.405 23.499MSE 380.15 289.51 290.97 470.5 290.5SF 0.9937 0.98661 0.9953 0.9915 0.9990
BaboonPSNR 22.293 23.482 25.461 21.39 23.443MSE 383.52 291.63 293.1 472.1 294.3SF 0.9737 0.98652 0.99521 0.9642 0.9812
CameramanPSNR 21.165 21.741 21.752 21.034 21.734MSE 497.2 435.45 434.42 512.5 436.2SF 0.9642 0.9882 0.98007 0.9591 0.9901
We have separate out RGB components from color images and convert it into YCbCr
component. Then luminance component of color image is processed for watermark embedding
process. This Y component has saved as gray image and all the attacks applied to luminance
component of color images. Table 6.9-6.12 shows the comparison of different images for all
algorithms. All the parameters like MSE, PSNR and Similarity Factor has calculated for color
images. The results shows that color images have even better results compare to gray level
images.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 69
Table 6.12 Comparison of Original Image and Watermarked Image with JPEG Compression
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
Proposedscheme
Scheme 1(α) Scheme 2(q)
JPEG Compression 10%Lena
PSNR 45.768 46.228 44.062 44.474 46.004MSE 1.7230 1.5499 2.5519 2.321 1.632SF 0.9980 0.9997 0.9925 0.9935 0.9988
BaboonPSNR 50.328 52.008 46.67 47.52 51.038MSE 0.6032 0.40387 1.3999 1.191 0.5120SF 0.9990 0.9999 0.99247 0.9930 0.9995
CameramanPSNR 45.695 45.372 48.631 48.344 48.993MSE 1.752 1.8873 0.89114 0.9521 0.820SF 0.9910 0.99265 0.99988 0.9972 0.9925
JPEG Compression 20%Lena
PSNR 42.425 42.9 41.755 42.087 42.789MSE 3.72 3.3347 4.34 4.021 3.421SF 0.9989 0.99984 0.99248 0.9935 0.9990
BaboonPSNR 47.158 48.466 45.275 45.53 48.322MSE 1.251 0.92583 1.93 1.82 0.957SF 0.9990 0.99989 0.99253 0.99421 0.9997
CameramanPSNR 44.474 43.994 46.085 45.763 46.909MSE 2.321 2.5924 1.6018 1.725 1.329SF 0.9910 0.99265 0.99959 0.99972 0.99203
JPEG Compression 30%Lena
PSNR 40.868 41.084 40.229 40.407 41.123MSE 5.325 5.1347 6.169 5.921 5.021SF 0.9998 0.9999 0.9925 0.9940 0.99985
BaboonPSNR 45.298 47.003 44.507 45.075 46.517MSE 1.92 1.2966 2.3036 2.021 1.45SF 0.99825 0.99977 0.99225 0.99321 0.99987
CameramanPSNR 37.224 37.144 37.493 37.164 37.366MSE 12.321 12.552 11.583 12.492 11.925SF 0.9921 0.99231 0.99923 0.9910 0.9922
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 70
Table 6.13 Comparison of Original and Extracted Watermarked without attack
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al [41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
LenaText Logo 0.9985 0.99933 0.99139 0.9922 0.9992
Random number 0.9987 0.99937 0.99140 0.9925 0.9993Baboon
Text Logo 0.9974 0.99894 0.99115 0.9914 0.9987Random number 0.9975 0.99897 0.99117 0.9918 0.9989
CameramanText Logo 0.9988 0.99949 0.99187 0.9927 0.9996
Random number 0.9991 0.99955 0.99190 0.9932 0.9997
Table 6.14 Comparison of Original and Extracted Watermark with Gaussian noise
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
LenaText Logo 0.9971 0.99987 0.9969 0.9827 0.9986
Random number 0.9975 0.99989 0.9973 0.9842 0.9993Baboon
Text Logo 0.9967 0.99974 0.9961 0.9513 0.9985Random number 0.9970 0.99978 0.9964 0.9529 0.9991
CameramanText Logo 0.9977 0.99989 0.9977 0.9883 0.9989
Random number 0.9979 0.99990 0.9979 0.9891 0.9993
Table 6.15 Comparison of Original and Extracted Watermark with 1 degree anti clock rotation
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
LenaText Logo 0.9982 0.99934 0.99032 0.9832 0.9985
Random number 0.9985 0.99982 0.99039 0.9839 0.9992Baboon
Text Logo 0.9979 0.99898 0.99003 0.9007 0.9979Random number 0.9981 0.99910 0.99012 0.9019 0.9983
CameramanText Logo 0.9983 0.99960 0.99079 0.9006 0.9990
Random number 0.9987 0.99972 0.99086 0.9020 0.9992
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 71
Table 6.16 Comparison of Original Image and Watermarked Image with JPEG Compression
Parameter A. Luminiet al.[39]
Yong Fu et al[40] Hsien-WenTseng et al
[41]
ProposedScheme
Scheme 1(α) Scheme 2(q)
JPEG Compression 10%Lena
Text Logo 0.9974 0.99975 0.99546 0.9801 0.9983Random number 0.9976 0.99978 0.99548 0.9805 0.9984
BaboonText Logo 0.9956 0.99966 0.99536 0.9791 0.9967
Random number 0.9957 0.99972 0.99540 0.9793 0.9969Cameraman
Text Logo 0.9980 0.99983 0.99552 0.9806 0.9988Random number 0.9983 0.99987 0.99553 0.9810 0.9989
JPEG Compression 20%Lena
Text Logo 0.9965 0.99966 0.99455 0.9793 0.9975Random number 0.9967 0.99972 0.99459 0.9798 0.9977
BaboonText Logo 0.9946 0.99954 0.99448 0.9781 0.9958
Random number 0.9949 0.99960 0.99449 0.9784 0.9959Cameraman
Text Logo 0.9972 0.99973 0.99464 0.9796 0.9977Random number 0.9976 0.99977 0.99467 0.9800 0.9980
JPEG Compression 30%Lena
Text Logo 0.9960 0.99962 0.99450 0.9793 0.9966Random number 0.9963 0.99967 0.99455 0.9789 0.9977
BaboonText Logo 0.9942 0.99951 0.99444 0.9778 0.9954
Random number 0.9946 0.99956 0.99446 0.9780 0.9956Cameraman
Text Logo 0.9968 0.99970 0.99460 0.9793 0.9973Random number 0.9973 0.99973 0.99464 0.9796 0.9977
The Fig 6.1 shows the comparison of PSNR against all algorithms for gray level and color
images. The algorithm 2 with scheme 1 of scaling factor α has much better results compare to
other algorithms. But it suffers from larger computational complexity. In comparison with that,
the proposed scheme has lesser computational cost and has comparable results for PSNR as
shown in Fig 6.1.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 72
Fig 6.1 Comparison of PSNR for all algorithms for gray and color images
The Fig 6.2 also proves that proposed algorithm has better correlation for original and extracted
watermark.
Fig 6.2 Comparison of Similarity Factor for all algorithms for gray and color images
Down sampling of Color Image:
The complete process of down–up sampling of Lena 256 x 256 color image is shown below Fig
6.3. First color images which comprises of RGB components are converted to YCbCr where Y
contains luminance information and Cb and Cr contains the chrominance information of the image.
Then Y signal is down sampled at factor two to obtain down sample image. This image is used for
wavelet processing and to embed the watermark processing. This image is again up sampled with
factor two to obtain recover Y component. The up sampling process added zero to the image so that
reconstruction of the image is with is distorted as shown in below.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 73
Fig 6.3 Down sampling and up sampling process for Y component
The problem with process that the up sampling adds the zero to the images so image after up
sample is distorted (recovered Y component) as shown in above Fig 6.3. To over come this
problem, we just simply add the original Y component value to the zero pedding values as shown
in below in Fig 6.4
+ =
Up sampled Y component Difference of Y Reconstructed Y
Fig 6.4 Reconstructed Y plane after up sampling
The complete modified process is shown in below Fig 6.5.
Fig 6.5 Modified Down-Up sampling process with proper reconstruction of Image
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 74
The chrominance signal can also be down sample as shown in Fig 6.6 for Cb component and Fig
6.7 for Cr component. We can see the difference between original and recovered up sampled
image in Fig 6.6 and Fig 6.7. As we can see, luminance component Y signal down/up sampling
process provides better results compare to chrominance signal Cb and Cr down/up sampling.
Fig 6.6 Down sampling and up sampling process for Cb component
Fig 6.7 Down sampling and up sampling process for Cr component
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 75
6.2 FPGA Implementation Results
Simulation results of Legall 5/3 as shown below.
Fig 6.8 Simulation of Legal 5/3 Scheme
a) SPARTEN Family:
Synthesis was performed by Xilinx project navigator ISE 10.1. During simulation as textio
library was utilized to read the gray scale image (lena 256 x 256) file. After processing results
are stored in text file. This text file is read through MATLAB to generate image.
Table 6.17 Synthesis Report for Proposed DWT, IDWT and Watermarking Processor
Resources DWT processor Watermarking
Processor
IDWT Processor
RAM/ROM 3 2 4
Adders/Subtractor 22 2 23
Latches 34 5 35
Muxs 4 3 4
Counters 3 2 3
Registers/Flip
Flops
382 62 381
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 76
The synthesis report and device utilization reports for proposed DWT, IDWT and Watermarking
Processor is shown in Table 6.17 and Table 6.18 respectively. The results are obtained for
Xc3s500e-4fg320-SPARTAN 3E FPGA using ISE 10.1 from Xilinx Tool.
Table 6.18 Device Utilization Report for Proposed DWT, IDWT and Watermarking Processor
Table 6.19 Timing Reports for DWT,IDWT and Watermarking Processor(SPARTEN)
Resources Path Time (ns) Frequency(MHz)
DWT Processor
Minimum Period 9.685 ns
103.254 MHz
Minimum input arrival time
before clock
6.084 ns
Maximum output required
time after clock
7.662 ns
IDWT Processor
Minimum Period 9.772ns
102.337 MHz
Minimum input arrival time
before clock
7.200 ns
Maximum output required
time after clock
6.385 ns
Watermarking
Processor
Minimum Period 2.309 ns
433.088 MHz
Minimum input arrival time
before clock
4.134 ns
Maximum output required
time after clock
4.394 ns
Resources DWT Processor IDWT Processor Watermarking
Processor
Slices 510/4656 (10%) 553/4656 (11%) 5/4656 (0%)
Slice Flip-Flops 361/9312 (3%) 358/9312 (3%) 9/9312 (0%)
4 inputs LUTs 976/9312 (10%) 1062/9312 (11%) 2/9312 (0%)
bounded IOBs 44/232 (18%) 44/232 (18%) 10/232 (4%)
GCLKs 1/24 (4%) 1/24 (4%) 1/24 (4%)
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 77
The timing analysis report is also generated using ISE Xilinx 10.1 and we obtained the maximum
operation frequency for each module .The detailed timing report is defined in Table 6.19
b) VIRTEX XCV50-6bg256 Family:
The synthesis report ,device utilization and timing reports for proposed DWT, IDWT and
Watermarking Processor are shown in Table 6.20,Table 6.21 and Table 6.22 respectively. The
results are obtained for XCV50-6bg256-VIRTEX Technology FPGA using ISE 10.1 from Xilinx
Tool.
Table 6.20 Synthesis Report for Proposed DWT, IDWT and Watermarking Processor
Resources DWT processor Watermarking
Processor
IDWT Processor
RAM/ROM 3 2 4
Adders/Subtractor 16 4 14
Latches 12 7 10
Muxs 6 4 5
Counters 2 2 3
Registers/Flip
Flops
469 68 542
Table 6.21 Device Utilization Report for Proposed DWT, IDWT and Watermarking Processor
Resources DWT Processor IDWT Processor Watermarking
Processor
Slices 528/768 (66%) 562/768 (73%) 5/768 (0%)
Slice Flip-Flops 363/1536 (23%) 363/1536 (23%) 9/1536 (0%)
4 inputs LUTs 997/1536 (64%) 1059/1536 (68%) 2/1536 (0%)
bounded IOBs 44/180 (24%) 44/180 (24%) 10/180 (5%)
GCLKs 1/4 (25%) 1/4 (25%) 1/4 (25%)
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 78
Table 6.22 Timing Reports for DWT,IDWT and Watermarking Processor(VIRTEX)
Resources Path Time (ns) Frequency(MHz)
DWT Processor
Minimum Period 15.767 ns
63.424 MHz
Minimum input arrival time
before clock
10.658 ns
Maximum output required
time after clock
16.757 ns
IDWT Processor
Minimum Period 15.502 ns
64.508 MHz
Minimum input arrival time
before clock
10.582 ns
Maximum output required
time after clock
12.767 ns
Watermarking
Processor
Minimum Period 3.564 ns
280.584 MHz
Minimum input arrival time
before clock
6.927 ns
Maximum output required
time after clock
7.184 ns
Previously, S.P.Mohanty [63] has developed FPGA based implementation of an invisible
spatial domain watermarking encoder. The watermarking encoder consists of a watermark
generation unit and watermark insertion module. He has synthesized the prototype watermarking
encoder chip using Xilinx FPGA XCV50-6bg250-VIRTEX Technology. Mohanty has also used
LFSR module to insert binary watermark as watermark generation unit. He has design the all the
modules with VHDL. The comparison of the proposed scheme with Mohanty scheme is given in
Table 6.23
Table 6.23 Comparison with Previous Work
Units S.P.Mohanty et al[63] Proposed
Watermark Generation 4.916 ns 4.632 ns
Watermark Insertion 15.526 ns 3.590 ns
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 79
c) VIRTEX XC4VLX25-10FF676 Family:
The device utilization and timing reports for proposed DWT, IDWT and Watermarking
Processor are shown in Table 6.24 and Table 6.25 respectively. The results are obtained for
XC4VLX25-10FF676 VIRTEX Technology FPGA using ISE 10.1 from Xilinx Tool.
Table 6.24 Device utilization comparison
Logic Utilization S.P.Maity et al.[64] Proposed
Number of Slices 11536/10752 (107%) 1078/10752 (10%)
Number of Slice Flip-Flops 296/21504 (1%) 728/21504 (3%)
Number of 4 input LUTs 21692/21504 (100%) 2061/21504 (9%)
Number of bonded IOBs 649/448 (144%) 98/448 (21%)
Number of GCLKs 2/32 (6%) 3/32 (9%)
Table 6.25 Timing analysis comparison
Delay S.P.Maity et al.[64] Proposed
Minimum clock period
(Maximum Frequency)
4.555 ns
(212.542 MHz)
6.819 ns
(146.651 MHz)
Maximum output
required time after clock
102.195 ns 105.21 ns
Maximum combinational
path delay
103.346 ns 62.51 ns
S.P. Maity [64] has recently developed watermarking techniques based on spread spectrum
modulation techniques for authentication and copyright protection. He has synthesized the
watermark embedding and decoding logic with help of FPGA family of XC4VLX25-10FF676
VIRTEX Technology. He has embedded 64 x 64 watermark in 256 x256 original image size.
The synthesized results with proposed scheme has compared in Table 6.24. The timing report
comparison is also done with proposed scheme and S.P. Maity scheme in Table 6.25
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 80
Previously, Tsai and Lu also developed [43] DCT based invisible watermarking which has
synthesized on 0.35 um technology which operates on 50 MHz and consumes power of around
62.78 mw. Garimella [44] has developed watermarking in spatial domain with invisible fragile
property. The scheme proposed by him was synthesized in on 0.13 um technology and operate on
100 MHz clock frequency with 37.6 uW power consumption. Later on Mohanty [8] has developed
visible watermarking scheme with spatial domain on 0.35 um standard cell technology. The
watermarking algorithm consumes 6.93 mW power and operates on 292 MHz clock frequency.
Later on again Mohanty has developed DCT based Invisible watermarking scheme which has 0.3
mW power consumption and synthesized on 0.25 um technology. The proposed scheme has
synthesized on 0.18um technology with Design Vision of synopsys.
FPGA Implementation of Watermarking Algorithm for Digital Camera
VLSI Design Lab., SVNIT, Surat 81
CHAPTER 7. CONCLUSION
The proposed algorithm has combined approaches of spatial and frequency domain. The results are
verified on MATLAB platform against various attacks. The proposed schemes have been
compared with different schemes. We have compared results of MSE, PSNR and Similarity Factor
for watermarked and original images. From Table 6.1-6.16, it has concluded that proposed scheme
has comparable results for transparency, security and robustness. It has overcome the problem of
block artifacts and advantage of both domain properties. From Table 6.17-6.25, it has proved that
it has also lesser computational complexity compare to other algorithms because we embed
watermark in wavelet domain. Overall, the proposed scheme has scheme provides comparable
results of MATLAB simulation which has effective hardware application suited for authentication
and ownership verification application.
82
REFRENCES
[1] P.Blythe and J. Fridrich, “Secure digital Camera”, Digital Forensic Research
Workshop,Aug,2004
[2] S. Emmanuel and M. S. Kankanhalli, “A Digital Rights Management Scheme for
Broadcast Video,” ACM-Springer Verlag Multimedia Systems Journal, vol. 8, no.
6, pp. 444–458, June 2003.
[3] D. Kundur and K. Karthik, “Digital Fingerprinting and Encryption Principles for
Digital Rights Management,” IEEE Signal Processing, vol. 52, 2004.
[4] A. M. Eskicioglu and E. J. Delp, “An Overview of Multimedia Content Protection
in Consumer Electronics Devices,” Elsevier Signal Processing: Image
Communication, vol. 16, pp. 681–699, 2001.
[5] F. A. P. Petitcolas, R. J. Anderson, and M. G. Kuhn, “Information Hiding - A
Survey,” Proceedings of the IEEE, vol. 87, no. 7, pp.1062–1078, July 1999.
[6] S. Voloshynovskiy, S. Pereira, T. Pun, J. J. Eggers, and J. K. Su, “Attacks on
Digital Watermarks: Classification, Estimation-based Attacks and Benchmarks,”
IEEE Communications Magazine, vol. 39, no. 9, pp. 118–126, August 2001.
[7] M. Maes, T. Kalker, J. P. M. G. Linnartz, J. Talstra, G. F. G. Depovere, and J.
Haitsma, “Digital Watermarking for DVD Video Copyright Protection,” IEEE
Signal Processing Magazine, vol. 17, no. 5, pp. 47–57, Sep 2000.
[8] S. P. Mohanty, N. Ranganathan, and R. K. Namballa, “A VLSI Architecture for
Visible Watermarking in a Secure Still Digital Camera (S2DC) Design,” IEEE
Transactions on Very Large Scale Integration Systems (TVLSI), vol. 13, no. 8, pp.
1002–1012, August 2005.
[9] N. J. Mathai, D. Kundur, and A. Sheikholeslami, “Hardware Implementation
Perspectives of Digital Video Watermarking Algortithms,”IEEE Transactions on
Signal Processing, vol. 51, no. 4, pp. 925–938, April 2003.
[10] O. B. Adamo, S. P. Mohanty, E. Kougianos, M. Varanasi, and W. Cai, “VLSI
Architecture and FPGA Prototyping of a Digital Camera for Image Security and
Authentication”, in Proceedings of IEEE Region 5 Technology and Science
Conference, pp. 154-158, 2006.
83
[11] Victor V. Hernandez Guzman, Mariko Nankano, “Analysis of a Wavelet based
watermarking Algorithm”, Proceeding of the 14th International Conference on
Electronics, Communication and Computers, 2004.
[12] Jianyog Huang and Changsheng Yang, “Image Digital Watermarking algorithm
Using Multiresolution wavelet Transform”, IEEE International conference on
systems, man and Cybernetics, 2004.
[13] Sammy H. M. Hawk and Edumund Y. Lam, “Watermark implementation in digital
photography”, Signal processing symposium,Dec-2005.
[14] Lei Tian and Heng-Ming Tai, “Secure Image Captured by Digital Camera”, IEEE,
2006
[15] L.J. Cox, J. Kilian, T. Leighton and T. Shanon, “Secure spread spectrum for
Multimedia”, NEC research institute, prinecton, NJ, technical report 95-10, 1995.
[16] I. J. Cox, J. Kilian, F.T. Leighton, and T. Shamoon, “Secure Spread Spectrum
Watermarking for Multimedia,” IEEE Transactions on Image Processing, vol. 6,
no. 12, pp. 1673-1687, Dec. 1997.
[17] A. Lumini and D. Maio, “A Wavelet-Based Image Watermarking Scheme”, The
International Conference on Information Technology: Coding and Computing
(ITCC’00), Las Vages, NV, pp. 122-127, March 27-29, 2000.
[18] Yong-Gang Fu and Hui-Rong Wang, “A Novel Discrete Wavelet Transform Based
Digital Watermarking Scheme”, 2nd International Conference on Anti-
counterfeiting, Security and Identification, 2008. ASID 2008. pp 55-58,Aug-2008
[19] Hsien-Wen Tseng , Chin-Chen Chang, “An extended difference expansion
algorithm for reversible watermarking”,Elsiver, Image and vision computing, pp
1148-13,2008
[20] Tung-Shou Chen, Jeanne Chen, Jian –Guo Chen, “A Simple and efficient
watermark technique based on JPEG2000 Codec”, Springer, Multi media systems,
pp 16-26, 2004.
[21] N. Memon and P. W. Wong, “Protecting Digital Media Content”, Communications
of the ACM, vol. 41, no. 7, pp. 34–43, July 1998.
[22] Nebu John Mathai, Deepa Kundar, Ali Sheikholeslani, “Hardware Implementation
Perspective of Digital Video Watermarking Algorithm”, IEEE Signal processing,
84
Vol. 51,No. 4, April 2003.
[23] Sammy H. M. Kwok, Edmund Y. Lam, “Watermarking Implementation in digital
photography”, Proceeding of 2005 International Symposium on Intelligent Signal
Processing and Communication System.
[24] R. Gonzalez and R. Woods, Digital Image Processing, Second edition, Prentice
Hall, 2002
[25] R.G. Schynded, a. Tirkel and C. Osborne, “A digital watermark”, Proc. IEEE Int.
Conf. Image Processing ( ICIP), 1994, pp 86-90.
[26] R.B. Wolfgang and E.J. Delp, “A watermark for digital images”, in Proc. Int.
Conf. Image Processing, Lausanne Switzerland, Sept. 1996, vol 3, pp 215-218.
[27] R.G. van Schyndel and C. Osborne, “A two-dimensional watermark”, in proc.
DICTA, 1993, pp. 378-393.
[28] R.B.Wolfgang and E.J. Delp, “fragile watermarking using vw2d watermark”, in
Proc. SPIE, security and watermarking of multimedia contents, an Jose,CA,Jan
1999,vol. 3657,pp 204-213.
[29] W. bender, d. Gruhi and N. Morimoto, “Techniques for data hiding”, IBM syst. J.,
vol. 35,nos. 3-4 pp,313-336,1996.
[30] B.G. Haskell, A. puri and A.N. Netravali, “digital video: An Introduction to
MPEG 2”, New York: Chapman & Hall, 1997.
[31] Hyun Lim, Soon-Young Park and Seong jun Kang, “FPGA Implementation of
Image Watermarking Algorithm for a Digital camera”, Signal processing & VLSI,
IEEE, 2003.
[32] Saraju P. Mohanty, N. Raganathan, “VLSI Implementation of Visible
Watermarking for a secure Digital Camera Design”, Proceeding of 17th
International Conference on VLSI design,2004.
[33] Victor V. Hernandez Guzman, Mariko Nankano, “Analysis of a Wavelet based
watermarking Algorithm”, Proceeding of the 14th International Conference on
Electronics, Communication and Computers, 2004.
[34] Jianyog Huang and Changsheng Yang, “Image Digital Watermarking algorithm
Using Multiresolution wavelet Transform”, IEEE International conference on
systems, man and Cybernetics, 2004.
85
[35] Sammy H. M. Hawk and Edumund Y. Lam, “Watermark implementation in digital
photography”, Signal processing symposium,Dec-2005.
[36] Lei Tian and Heng-Ming Tai, “Secure Image Captured by Digital Camera”, IEEE,
2006
[37] L.J. Cox, J. Kilian, T. Leighton and T. Shanon, “Secure spread spectrum for
Multimedia”, NEC research institute, prinecton, NJ, technical report 95-10, 1995.
[38] I. J. Cox, J. Kilian, F.T. Leighton, and T. Shamoon, “Secure Spread Spectrum
Watermarking for Multimedia,” IEEE Transactions on Image Processing, vol. 6,
no. 12, pp. 1673-1687, Dec. 1997.
[39] A. Lumini and D. Maio, “A Wavelet-Based Image Watermarking Scheme”, The
International Conference on Information Technology: Coding and Computing
(ITCC’00), Las Vages, NV, pp. 122-127, March 27-29, 2000.
[40] Yong-Gang Fu and Hui-Rong Wang, “A Novel Discrete Wavelet Transform Based
Digital Watermarking Scheme”, 2nd International Conference on Anti-
counterfeiting, Security and Identification, 2008. ASID 2008. pp 55-58,Aug-2008
[41] Hsien-Wen Tseng , Chin-Chen Chang, “An extended difference expansion
algorithm for reversible watermarking”,Elsiver, Image and vision computing, pp
1148-13,2008
[42] Tung-Shou Chen, Jeanne Chen, Jian –Guo Chen, “A Simple and efficient
watermark technique based on JPEG2000 Codec”, Springer, Multi media systems,
pp 16-26, 2004.
[43] T. H. Tsai and C. Y Lu, “A Systems Level Design for Embedded Watermark
Technique using DSC Systems,” in Proceedings of the IEEE International
Workshop on Intelligent Signal Processing and Communication Systems, 2001.
[44] A. Garimella, M. V. V. Satyanarayan, R. S. Kumar, P. S. Murugesh, and U. C.
Niranjan, “VLSI Implementation of Online Digital Watermarking Techniques with
Difference Encoding for the 8-bit Gray Scale Images,” in Proceedings of the
International Conference on VLSI Design, 2003, pp. 283–288.
[45] Y. C. Fan, L. D. Van, C. M. Huang, and H. W. Tsao, “Hardware-Efficient
Architecture Design of Wavelet-based Adaptive Visible Watermarking,” in
Proceedings of 9th IEEE International Symposium on Consumer Electronics, 2005,
86
pp. 399–403.
[46] Christine I. Podilchuk and Edward J. Delp, “Digital watermarking: Algorithms and
applications,” IEEE Signal Processing Magazine, Vol. 18, Issue 4, pp 33-46.,July-
2001
[47] Tefas, A., Pitas, I., “Robust Spatial Image Watermarking Using Progressive
Detection”, In Proceedings of the IEEE International Conference on Acoustics,
Speech, and Signal Processing ,Salt Lake City,USA,Vol. 3,pp. 1973–1976,2001
[48] Vidhyasagar M. Potdar, Song Han, Elizabeth Chang, “A survey of Digital Image
Watermarking Techniques”, 3rd International Conference on Industrial Informatics
(INDICON 2005), pp 709-716, 10-12 Aug-2005.
[49] Froment , J. and Mallat, S. “Second Generation Compact Image Coding with
Wavelets”, Academic Press Professional, Inc .,San Diego, CA,USA, pp. 655-678,
1993
[50] Mallat S G. “A theory of multi resolution signal decomposition: The wavelet
representation”, IEEE Trans. Pattern Analysis and Machine Intelligence, 1989, vol.
11, no. 7, pp. 674-693, July 1989.
[51] Woods, J. W. and S. D. O’Neil, “Sub band coding of images,” IEEE Trans.
Acoust., Speech, Signal Processing, vol. ASSP-34, pp. 1278-1288, Oct. 1986.
[52] Strang, G. and Nguyen, T.Wellesley, “Watermark for copyright protection”,
Cambridge Press, Wellesley, MA, 1996,
[53] Vetterli, M. and Kovacevic, “DCT-DWT Watermarking”, Englewood Cliffs, NJ,
Prentice Hall, 1995, http://cm.bell-labs.com/who/jelena/Book/home.html
[54] Donovan Artz, “Digital Steganography: Hiding Data within Data”, IEEE Internet
Computing, Vol 5, pp. 75-80,May-June 2001
[55] E. Lam, “Image Restoration in Digital Photography”, IEEE Transactions on
Consumer Electronics, vol. 49, no. 2, pp. 269-274, May 2003.
[56] Tefas, A., Pitas, I., “Robust Spatial Image Watermarking Using Progressive
Detection”, In Proceedings of the IEEE International Conference on Acoustics,
Speech, and Signal Processing ,Salt Lake City,USA,Vol. 3,pp. 1973–1976,2001
[57] Tsai, T.H., Lu, C.Y., “A Systems Level Design for Embedded Watermark
Technique using DSC Systems.” presented at the IEEE Int. Workshop Intelligent
87
Signal Processing Communication System, Nashville, TN, pp 20-23,Nov 2001.
[58] Amara Grapes, “An introduction to wavelets”, IEEE Computational Science and
Engineering, vol. 2, num. 2, published by the IEEE Computer Society, Summer
1995,
[59] Mohanty, S.P., Ranganathan, N., Namballa, R.K.“VLSI Implementation of
Invisible Digital Watermarking Algorithms Towards the Development of a Secure
JPEG Encoder.” In: Proceedings of the IEEE Workshop on Signal Processing
Systems, pp 183–188, Aug 27-29,2003
[60] Majid Rabbani and Rajan Joshi. “An overview of the jpeg2000 still image
compression standard”, Signal Processing: Image Communication Journal, Vol. 17,
pp 3-48, 2002.
[61] W. Sweldens, “The lifting scheme: A new philosophy in Biorthogonal wavelet
constructions,” in Proc. SPIE, vol. 2569, 1995, pp. 68–79.
[62] C.C. Liu,Y.H. Shiau, and J.M. Jou, “Design and Implementation of a Progressive
Image Coding Chip Based on the Lifted Wavelet Transform,” in Proc. of the 11th
VLSI Design/CAD Symposium, Taiwan, 2000
[63] S.P.Mohanty, Renuka Kumara C.,Sridhara Nayak, “FPGA Based Implementation
of an Invisible-Robust Image Watermarking Encoder,” In: Lecture notes in
computer science,vol. 3356,pp 344-353,2004
[64] Santi P Maity, Hafizur Rahman, Sudip Ghosh,Pranab Ray, “Spread Spectrum
Image Watermarking with Digital Design,” IEEE International Advance
Computing Conference (IACC 2009),Patiala, India, pp 868-873,2009
[65] Saraju P. Mohanty, N. Raganathan and K. Balakrishna, “ A Dual Voltage-
Frequency VLSI chip for Image Watermarking in DCT Domain”, IEEE
Transaction on circuits and systems II(TCAS-II), vol. 53,pp 394-398,May 2006.
PUBLICATION
[1] Amit M Joshi, Anand Darji, “Secure Digital Camera with DWT
Based Watermarking”, International Journal of Emerging Technologies and
Application in Engineering Technology and Sciences, vol 2,issue 2,pp
813-818,July-2009 (Published).
[2] Amit M Joshi, Anand Darji, “Efficient Dual Domain Watermarking Scheme
for Secure Images ”, IEEE International Conference on Advanced in
recent Technologies in Communication & Computing,ARTCOM-2009
(Selected).
[3] Amit M Joshi,Anand Darji,Taral Chhatbar, Abhishek Agrahari, “Clock
Skew Analysis & Optimization of Sequential Circuit”, National Conference on
Inteligent Systems NCIS-07 at MJCET, Hyderabad, August-2007 (Selected and
Presented)
APPENDIX A
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 813
SECURE DIGITAL CAMERA WITH DWT BASEDWATERMARKING
1 Amit M. Joshi, 2 Anand D. Darji
1, 2 ECED, SVNIT, Surat
1 [email protected], 2 [email protected]
ABSTRACT:The rapid growth of digital media information is demanding secure content for authentication. The imagecaptured by digital camera can easily altered by editing software. Such problems have hindered the applicationof digital image for courtroom evidence, insurance claim, copyright and journalistic photography. By usingwatermarking scheme, information such as the author’s own identity embedded into digital images forauthentication. Such an embedded watermark can be extracted later on as a proof for ownership. For digitalcamera, we have to use invisible and robust watermarking scheme for authenticity and ownership. The camerawith inbuilt such capability is called as “Secure Digital Camera”. Previously, spatial domain watermarkingschemes are very widely use. But nowadays, frequency domain schemes are very popular due to their transformdomain property. DWT based watermarking is upcoming technology of frequency domain watermarking fordigital camera due to its multiresolution property. The main goal of research is to adapt DWT basedwatermarking algorithm which provides ownership verification.
Keywords- Digital Watermarking, Discrete Wavelet Transform, Secure Digital Camera, WaveletDecomposition
1. INTRODUCTIONDigital camera has been widely used in present daysand images captured by it are displayed on WWWand electronic commerce. But digital images are noteasily acceptable in courts, as a proof and medicalimage archiving because they can be altered ormanipulated with ease. Watermarking is a techniquefor inserting ownership information (watermark) intoan image, which can be detected later on foridentification and authentication. In 1998, USCongress passed The Digital Millennium CopyrightAct (DMCA) which makes it illegal to circumventany technological measure that protects an owner’sintellectual property rights of digital content. Digitalwatermarking provides security of owner againstcopyright violation. Digital watermarks aretransparent signatures. They are integrated withindigital files as noise, or random information thatalready exists in the file. Thus, detection and removalof watermark becomes more difficult. Typically,watermarks are dispersed throughout the entiredigital file such that the manipulation of one portionof the file does not alter the underlying watermark.There are several data hiding techniques available forsecurity apart from watermarking such ascryptography and steganography. Cryptography dealswith scrambling of message to form encryptedversion with help of secret key. With steganography,the sender of a message would hide it in a host file.The host file, or cover message, is the file thatanyone can see in steganography, usually the
message itself is of value and must be protectedthrough clever hiding techniques and the “vessel” forhiding the message is not of value. Watermarking isthe direct embedding of additional information intothe original content or host signal. Ideally, thereshould be no perceptible difference between thewatermarked and original signal and the watermarkshould be difficult to remove or alter withoutdamaging the host signal. In watermarking, theeffective coupling of message to the “vessel,” whichis the digital content, is of value and the protection ofthe content is crucial. Previously, spatial domainwatermarking techniques for image data was popular.Some of the earliest techniques embed m sequencesinto the Least Significant Bit (LSB) of the data toprovide effective transparent embedding technique[1]. M-sequences were extended to 2 dimensional [2].The block based method proposed in [3] to be robustfor JPEG Compression. First DCT based semi fragilewatermarking algorithm for digital camera withFPGA implementation was developed by Hyun Lim,Soon-Young Park and Seong jun Kang in early2003[4]. In 2004, Saraju P. Mohanty, N. Raganathanhad also developed visible watermarking scheme onDCT [5]. After that some algorithms for waveletbased approach were starting to explore to adaptJPEG2000 new millennium standard and exploremultiresolution property of Wavelet [6]. In 2005 laterpart, Sammy H. M. Hawk and Edumund Y. Lamproposed watermark implementation technique indigital photography with DWT approach [7] for
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 814
software based implementation. Afterwards, there areseveral attempts to develop secure images capturedby digital camera for DWT based approach. The flowof paper is as following manner. Section 1 includesthe literature review of digital watermark and scopeof watermarking for digital camera. Section 2describes the overview of digital camera and theblock diagram of digital camera. Section 3 emphasison different properties of digital watermarking andwatermark embedding and detection process. Section4 describes three different algorithmsimplementation. Section 5 and 6 provides results andconclusion for DWT based watermarking for digitalcamera.2. DIGITAL CAMERA OVERVIEWA block diagram of the proposed camera withwatermark embedded unit is shown in Fig. 1. In thedigital camera, the image is captured by a sensor andconverted to a digital signal by ADC. The capturedimage is stored temporarily in the Temp. memory,after which it is displayed on the LCD with the helpof the control unit. The display is used to enable theuser to see the image frame before it is watermarkedby the watermark unit and stored in the camera,which can be further transmitted over the network, ortransferred to Flash memory, computer hard drive oroptical discs. The control unit is responsible forcontrolling the entire sequence of events. There arethree main blocks of our interest compression unit,watermark unit and Co-efficient Key Generator. Userhas been provided with a flexibility to make adecision about insertion of watermark into an image.Based on requirement, watermark may or may not beinserted into image. Images with and withoutwatermark are stored in two separate memories.Images without watermark are stored in Temp.memory and watermarked image are stored in Flashmemory. In case of non blind detection, imagesstored in Temp. memory can be used for detection.The objective of research is to develop a feasible andeffective DWT based digital watermarking scheme[8] to provide a cost-effective and practical tool forauthentication and ownership verification of digitalimages taken by Secure Digital Camera.
Fig 1 Block Diagram of Secure Digital Camera
2. PROPERTIES OF DIGITALWATERMARKING
Watermarking provides user its ownership forcopyright protection. A good watermarking schemeshould meet following requirements.Security: The embedded mark should only beaccessible by authorized organization. Although thewatermarking algorithm is published to everyone,those without a secret key cannot access the marks inthe protected images.Robustness: It should resist malicious attacks such ascompression, rotation, image enhancement, resizing.Imperceptibility: The digital watermark should notbe perceptible to the viewer.Capacity: It shows total number of bits can beembedded per unit of cover image.3.1 Spatial Domain Vs Frequency DomainWatermarkingThe watermark can be applied to frequency or inspatial domain. The frequency domain methods aremore robust than that of the spatial domaintechniques. On the other hand, the spatial domainwatermarking schemes have less computationalcomplexity compared to frequency domain schemes.Nowadays, most researches focus on developingvarious watermarking methods in the frequencydomain since most currently popular informationtransmission and compression techniques are infrequency domain e.g. like JPEG, MPEG, DCT, etc.Compared with other transforms in frequencydomain, DWT can better localize the feature whosechange is less sensitive to human eyes and localizethe information in space and frequency [9].Especially, DWT based watermarking methods havebeen researched intensively due to the fact that thecurrent image compression is based on waveletdomain, such like JPEG 2000.The spatial domainwatermarking scheme is generally fast and simple,but it doesn’t guarantee robustness against commonsignal distortion. The frequency domain methodbased on a multi resolution wavelet decomposition,which shows greater robustness against suchcommon attacks. We have focused on wavelet basedfrequency domain watermarking method for ourSecure Digital Camera.3.2 Watermarking with Wavelet DecompositionLevelFor Secure Digital Camera, watermarking schemeshould be invisible and robust for various attacks[10]. To have invisibility we insert watermark in highfrequency band (HH) but it provides less robustnessto the system. To have robustness we can embedwatermark into the Low frequency band (LL) but ofcourse the invisibility then the issue, so there isalways trade off between invisibility and robustness[11].With increase the level of decomposition, therobustness will increase but computationalcomplexity will also be increased. So these issuesmust be considered while dealing with watermarking
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 815
embedding schemes. The area of research to developwatermarking DWT based algorithm for SecureDigital Camera.3.3 Implementation of Digital WatermarkFor Secure CameraThe whole watermark embedding process is shown inFig 2.Whereas the watermark extraction process isshown in Fig 3.
Fig. 2 Proposed Watermark Embedding Process
Fig. 3 Watermark Extraction Process
As with traditional color processing, we first convertan image from an RGB color space to the YCbCrgray space. Then the Y component of the image isdown-sampled to form a grayscale image ofresolution of 1 M pixels (assuming that the original isbetween 2M and 8M pixels, true for most digitalcameras today). Afterwards, a watermark isembedded in the image by Key of co-efficientselection for DWT of the image. Finally, the image isconverted back to spatial domain by IDWT and awatermarked image is formed by up-sampling theimage and adding it with the original Cb and Cr colorcomponents. The Key provides co-efficient selectionplaces at which watermark to be embedded. This Keyis only known to user and same key must be use atthe time of extraction. Since only the user of theSecure Digital Camera knows the key for thewatermarking, so security against forgery isguaranteed. First image is converted to transformdomain by DWT and then watermarking is applied tothe frequency domain co-efficient. There are variousmethods available for DWT based watermarkingschemes.3.4 Performance of Watermarked Image3.4.1 Similarity Factor (SF): To assess the changein quality of image, it is required to correlate eachcoefficient of original image as well as watermarkedimage. It is a normalized correlation.
( , ) '( , )
( , ) ( , ) '( , ) '( , )
w m n w m nSF
w m n w m n w m n w m n
Where, w (m, n) = original Image,
w (m, n) = watermarked Image3.4.2 Mean Square Error (MSE): To measure thecredibility of the modified image, the Mean SquareError (MSE) between the original watermark and theextracted watermark can be used. MSE is defined as
2
1
1( , ') ( ( ) '( ))
wN
iw
MSE w w w i w iN
Where, w = Original watermark,
w = Extracted watermark,Nw = Length of watermark.
4. DWT BASED WATERMARKINGALGORITHMSIn the DWT based watermarking method, a twodimensional image is divided into four frequencybands namely, low frequency band (LL), Highfrequency band (HH), Low-high frequency band(LH) and High-low frequency band (HL). LL bandcontains important information of the image so itsvalue is likely to remain constant, because it is highenergy band and its coefficient values do not getchanged with attack. This band is used to calculatesignature of an image. We have explained threedifferent algorithms for DWT based watermarkingschemes.Algorithm 1:It performs two level wavelet decomposition of thehost image and obtains the sum of the ten highestapproximations co-efficient as their values are likelyto remain constant. This is passed to the randomnumber generator as a seed. In implementing theabove technique we have assumed that the samerandom number generator is available at bothreceiver and the transmitter end. One of thelimitations of this technique is that detection of therecovered image depends on the availability oforiginal image.Following are steps for watermarking scheme.Embedding Process:1) Read the host image and perform two levelwavelet decomposition of the host image2) Sum the 10 highest approximation coefficients anddivide it by 512 and store it in ‘M’ variable.3) Pass the value of ‘M’ to random number generatoras initial state which will generate the watermark4) Add this watermark to the detailed diagonal co-efficient of the transformed image.
( , ) ( , ) ( , )x xd m n d m n w m n
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 816
Where,
( , )xd m n = watermarked image,
( , )xd m n = original image
w (m, n) = watermark to be embedded = scaling factor for watermark =0.01
5) Reconstruct the image by doing inverse wavelettransformation which will give the watermarkedimage6) To simulate an attack on watermark image, wehave added salt and pepper noise, 180 degreeclockwise rotation and rescaling to check robustnessof watermarking scheme.Detection Process:7) Perform two level wavelet decomposition of awatermarked image8) Sum the 10 highest approximation coefficients anddivide it by 512 and store it in ‘M1’ variable9) Pass the value of ‘M1’ to random numbergenerator as initial state which will give watermark.10) Remove this watermark from the detaileddiagonal co-efficient of the transformed watermarkedimage to get the recovered image
' ( , ) ( , )
( , )x xd m n d m n
w m n
Where = scaling factor for watermark11) Reconstruct the recovered image by two levelinverse wavelet transformations.Algorithm 2:This watermark scheme is based on wave lift integertransform. It uses simple random number to performwatermarking.The following steps are performed:Embedding Process:1) Read an input image2) Perform 2 level integer wave lift scheme of legall5/3 to obtain approximation image and three detailedcoefficient.3) Generate the watermark with pseudo randomnumber generator4) Add the watermark image with secret key toneighboring approximation co-efficient5) Perform wavelet transform to generatewatermarked image6) To simulate an attack on watermark image, wehave added salt and pepper noise, 180 degreeclockwise rotation, compression and rescaling tocheck robustness of watermarking scheme.Detection Process:7) Perform Inverse wavelet transform to getrecovered image.8) Remove the watermark from approximation co-efficient exactly inverse process of embeddingprocess.9) Perform 2 levels Inverse integer wave lift schemeof legall 5/3 to obtain transform domain co-efficient
10) Compare the original Image with recoveredImage.Algorithm 3:This watermark scheme is based on the fixedthreshold of wavelet co-efficient. We assume that thebinary watermark is of length Nw, and consists ofelements from the set {−1, 1}. Let OI be the originalimage. We embed the watermark into the detailwavelet coefficients using a watermarking key.Embedding Process:1) Read the host image OI.2) Compute the first level wavelet decomposition ofthe original image. We obtain one approximationimage and three detail images, corresponding to thehorizontal, vertical and diagonal details of the image.We denote the Xth detail image of the original by d x
(m n) , where x Є {h, v, d} (h, v, d stands for“horizontal”, “vertical” and “diagonal” co-efficient,respectively). The approximation image is ax (m, n).3) For each detail image, we consider the coefficientlocation (m, n) and we compute a watermarking key kx (m n), where x Є {h, v, d}
kx (m, n) = 1 if dx (m, n) > qMx
= 0 otherwiseWhere q is a user-defined variable and Mx= maximumof the value (m, n).4) For the given detail image d x (m n), if theassociated value of the key is zero, we do not embeda mark.5) To embed a watermark bit w (m, n); we increase ordecrease the detail image coefficient with a givenquantity:
( , ) ( , ) ( , )x xd m n d m n w m n Where x Є {h, v, d}, α =0.01 = user-defined positive
variable.6) The watermarked image is computed from theapproximation image a(m, n) and from the detailimages d’ x (m, n), where x Є {h, v, d}. Theparameters q and α are user-defined. It is easy tonotice that a larger value for α and a smaller value forq will increase the robustness of the method, but willmake the marking process more visible.Detection Process:7) To extract the watermark, compute the first leveldiscrete wavelet decomposition of the received imageRI and of original image OI. We obtain twodecomposition images r (m, n) and o (m, n). Wedenote the xth detail image of received image by rdx,where where x Є {h, v, d} (h, v, d stands forhorizontal, vertical and diagonal respectively.)Theapproximation image is ra (m, n).8) Compute the watermarking key kx (m, n). Wemake use of the key to locate the coefficients wherethe mark was embedded. We extract the watermarkas follows:
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 817
[ ( , ) ( , )]1, 0
[ ( , ) ( , )]( , ) 1, 0
( 1,1),
x x
x x
rd m n d m nif
rd m n d m nrw m n if
rand otherwise
Where rw (m, n) is the recovered watermark bit.9) If the watermark had been embedded in differentlocations several times, then the most common bitvalue is assigned for the recovered bit. Otherwiserandom guess is made for this value.
5. RESULTSWe have been implemented three different DWTbased watermarking algorithms to check basicproperties of transparency, robustness and security ofwatermarking. We have used input image as 256x256 jpg image.
Transparency:
Table 1 Similarity Factor and MSE comparison oforiginal and watermarked Image
Robustness:Attacks Adding
noise asSalt &pepper
Rotateclockwise
180 degree
Rescaling
Algorithm-1MSE-1.84 x
10-3
5.77x10-4 0.0081 50.40 x10-4
Algorithm-2MSE-6.00 x
102
1.81x101 6.56 x 102 33.01 x10-6
Algorithm-3MSE-4.56 x
10 -4
6.2 x 10-4 6.93 x 10-4 44.93 x10-4
Table 2 MSE Comparison of Watermarked andOriginal Image for different algorithm after attacks
Attacks Addingnoise asSalt &pepper
Rotateclockwise 180degree
Rescaling
Algorithm-1SF-1.0000
0.9990 0.9812 0.9963
Algorithm-2SF-0.9617
0.9617 0.9950 1.0000
Algorithm-3SF-0.9873
0.9754 0.9826 0.9855
Table 3 Similarity Factor Comparison ofWatermarked and Original Image for different
algorithm after attacks
Security:Attacks Adding
noise asSalt &pepper
Rotateclockwis
e 180degree
Rescaling
Algorithm-1MSE-3.02 x
10-8
3.0213 x10-8
2.106 x10-4
1.64 x 10-7
Algorithm-2MSE-1.11 x
10-4
1.6852 x10-4
1.353 x10-4
1.31 x 10-4
Algorithm-3MSE-4.78 x
10-4
5.892 x10-4
6.251 x10-4
4.93 x 10-4
Table 4 Similarity Factor Comparison of Recoveredand Original Image for different algorithm after
attacks
6. CONCLUSIONSecure Digital Camera requires robust and invisiblewatermarking scheme for captured image. The resultsare verified on MATLAB platform against variousattacks. Three algorithms have been developed forrobustness, invisibility and security measurementwith standard parameter. Table 1 suggests thatalgorithm 2 provides better transparency compare toothers schemes because of better Similarity Factorand less Mean Square Error(MSE). Table 2 and 3reveal that algorithm 1 provides greater robustnessand correlation compare to other schemes forwatermarked and original image. Table 4 and 5emphasis that algorithm 2 provides better security inorder to correlate Similarity Factor and Mean SquareError for original and recover watermark. Overallalgorithm 2 provides better transparency, security androbustness among all three algorithms. Further workrequired for blind watermarking technique to developdigital camera with their watermarking capability.
Similarity Factor MSEAlgorithm-
10.9970 4.5632 x 10-4
Algorithm-2
1.0000 3.0029 x 10-6
Algorithm-3
0.9873 5.1027
INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGIES AND APPLICATIONS INENGINEERING, TECHNOLOGY AND SCIENCES (IJ-ETA-ETS)
ISSN: 0974-3588 | July ’09 – December ’09 | Volume 2 : Issue 2 | Page: 818
Attacks Addingnoise asSalt &pepper
Rotateclockwis
e 180degree
Rescaling
Algorithm-1SF-0.9996
0.9996 0.3194 0.9985
Algorithm-2(SF-0.9617
0.9994 0.9617 1.0000
Algorithm-3(SF-0.9477
0.9257 0.9400 0.9439
Table 5 MSE Comparison of Recovered and Originalwatermark for different algorithm after attacks
7. REFERENCES[1]. R.G. Van Shindig, A.Z.Tirkel and C. F. Osborne,
“A Two-Dimensional Digital Watermark,” inproc. DICTA, 1993, pp. 378-393.
[2]. R.G. Van Schyndel, A.Z.Tirkel, N.R.A.Mee,C.F.Osborne., “A Digital Watermark,” FirstIEEE Image Processing Conference, HoustonTX, November 15-17, 1994, vol II, p.86-90.
[3]. A.N. Netravali and B.G.Haskell, “DigitalPictures-Representation, compression andstandards,” 2nd Edition, New York, PlennumPress, 1995.
[4]. Hyun Lim, Soon-Young Park and Seong JunKang, “FPGA Implementation of ImageWatermarking Algorithm for a Digital camera,”Signal processing & VLSI, IEEE, 2003.
[5]. Saraju P. Mohanty, N. Raganathan, Ravi K.Namballa, “VLSI Implementation of VisibleWatermarking for a Secure Digital CameraDesign,” Proceeding of 17th InternationalConference on VLSI design, 2004.
[6]. Victor V. Hernandez Guzman, Mariko NankanoMiyatake, Hector M. Perez Meana “Analysis of aWavelet based watermarking Algorithm,”Proceeding of the 14th International Conferenceon Electronics, Communication and Computers,2004.
[7]. Sammy H. M. Kwok and Edmund Y. Lam,“Watermark implementation in digitalphotography,” Processing Of 2005 InternationalSymposium on Intelligent Signal Processing andCommunication Systems, Dec-2005.
[8]. Nebu John Mathai, Deepa Kundur, AliSheikholeslani, “Hardware ImplementationPerspective of Digital Video WatermarkingAlgorithm,” IEEE Signal processing, Vol. 51,No. 4, April 2003.
[9]. Jianyog Huang and Changsheng Yang, “ImageDigital Watermarking algorithm UsingMultiresolution wavelet Transform,” IEEEInternational conference on systems, man andCybernetics, 2004.
[10]. Pennebaker, W. B., Mitchell, J. L. ,“Arithmetic coding articles,” IBM J. Res.Dev., vol. 32, no 6 (Nov1988), pp 717-774.
[11]. Froment, J. and Mallat S, “SecondGeneration Compact Image Coding withWavelets,” in C.K. Chui, editor, WatermarkEmbedding Techniques, vol. 2, Academic Press,NY, 1992..
1
Efficient Dual Domain Watermarking Scheme for Secure Images
Amit M Joshi PG Student, Electronics Engg. Department,
Sardar Vallabhbhai National Institute of Technology, Surat, India.
Anand Darji Lecturer, Electronics Engg. Department,
Sardar Vallabhbhai National Institute of Technology, Surat, India.
Abstract— Day to day growth of multimedia technology draws great attention for security. Digital images can be easily altered with software. This problems demand copyright protection and ownership verification. Digital watermarking is proposed as one of the ways to accomplish this, in which Digital watermarks are generally embedded into digital images in a manner that make the watermark invisible to a human observer as such watermarks do not cause degradation in the visual quality, or in the usefulness of the images. Digital watermarking is a technique to insert owner’s identity into images for authentication. Digital watermarking has emerged as a new area of research for the Intellectual Property (IP) protection of images. Spatial domain watermarking has advantage of less computational cost. Frequency domain watermarking provides more robustness. The proposed algorithm has been developed to take advantage of both spatial as well as frequency domain properties.
Keywords— Digital watermark, Discrete Cosine Transform, Discrete Wavelet Transform, Least Significeny Bit, Ownership
I. INTRODUCTION Due to the rapid and extensive growth of electronic
publishing industry, data can now be distributed much faster and easier. The digital multimedia information such as images, texts, music and videos are exchanged through open channels of internet. This information can be easily copied, modified or tampered without any authorization during multimedia transmission. So there is a need of security for information. One possible solution to this proprietary problem can be achieved with digital watermarking. A new emerging technology, digital watermarking protects digital media by embedding a robust signal directly into the media, thus providing a promising way to protect the digital media from illegal copyright and manipulation. Digital watermarking is a process of embedding data called as watermark (may be text, image or random number) into multimedia object in order to protect the owner’s right to the object. The concept of digital watermarking arose while trying to solve problems related to the copyright of intellectual property in digital media. It is used as a means to identify the owner or distributor of digital data. There is a wide range of application of digital watermarking, including copy right protection, authentication, finger printing, copy control and broadcast. For different kind of applications, digital watermark should show different properties. Here, we mainly discuss the ownership verification and authentication
problem. For this kind of application, digital watermarking should have properties like invisibility, robustness, high detection reliability, etc. The embedded data may be either perceptible or imperceptible. In general, Digital watermarking system consists of three main stages: embedding stage, manipulation stage and extraction stage as shown in Figure 1. The embedding stage involves hiding of owner’s identity for authentication, watermark, inside the image without affecting the visual quality of original image. The watermark can be of any form in terms of pseudo random number, text and image.
Embedding Stage Manipulation Stage Extraction Stage
Figure 1. Block Diagram of Watermark process
The key can be used to enforce security in which it prevents unauthorized parties from recovering and manipulating stage, also referred to some attacks like adding noise, signal distortion and different geometric operations. The extraction stage is an important stage to make assertions about data ownership verification. Digital watermarking is a major sub discipline of information hiding. A watermarking system can be either imperceptible (invisible) or visible. Imperceptible watermarking systems may be more robust towards non destructive attacks where as visible watermarking may be fragile. This kind of watermarking is ideal for image authentication applications. Different approaches are adopted to provide efficient imperceptible watermarking algorithms. Previously, spatial domain watermarking techniques were very popular due to their less computational complexity. Some of the earliest techniques used to embed m sequences into Least Significant Bit (LSB) of the data to provide effective transparent embedding technique [1].Another Spatial Domain technique consist of embedding a texture based watermark into a portion of the image with similar texture, it will be difficult to pensive the watermark. The watermark is detected using a correlation detector [2].DCT based transform domain watermarking started in later part of 90s. In 2004, Saraju P. Mohanty, N. Raga Nathan had also developed visible watermarking scheme on DCT [3]. After some period, wavelet based approach were starting due to their multiresolution property for wavelet [4]. In 2005 later part, Sammy H., M.
Original Image
Watermarked Image
Recovered Image
2
Hawk and Edumund Y. Lam proposed watermark implementation technique in digital photography with DWT approach [5]. In 2007, Cong JIN, Liang-Gang PAN and Ting SU proposed the scheme for Image watermark based of DWT with Visual based concept [6]. In 2008, M.A.EI-Iskandarani, Saad M. Saad and Ahmed M. Abubahia has proposed novel concept of DWT based watermarking with Lifting scheme which uses filter parameterization concept for efficient image watermarking[7]. The flow of the paper is as follow: Section II provides different properties of watermarking. In Section III explains three different algorithms for watermarking. Section IV gives results for different algorithm and Finally, Section V describes conclusion
II. PROPERTIES OF WATERMARKING
A. Types of Watermark 1) Visible: Visible watermarks are designed to be easily
perceived by the viewer, and clearly identify the owner. The watermark must not detract from the image content itself, however. Most research currently focuses on invisible watermarks, which are imperceptible under normal viewing conditions.
2) Fragile: Fragile watermarks are designed to be distorted, or to be broken, under the slightest changes to the image. Semi-fragile watermarks are designed to break under all changes that exceed a user-specified threshold. 3) public and private: In some applications like copyright protection and data monitoring, watermark extraction algorithm can use original un-watermarked data to find the watermark. This is called as non oblivious or private watermarking. The original image is usually subtracted from the suspected image before a detection algorithm is applied. Non-oblivious watermarking is at present the only option for reliable copyright protection. 4) Asymmetric and symmetric: Asymmetric watermarking (also called asymmetric key watermarking) is a technique where different keys are used for embedding and detecting the watermark. In symmetric watermarking (or symmetric key watermarking), the same keys are used for embedding and detecting watermarks.
B. Requirements for watermarking A watermark is designed to permanently reside in the host
data. When the ownership of data is in question, the information can be extracted to completely characterize the owner. To achieve maximum protection of intellectual property with watermarked media, several requirements must be satisfied:
1) Perceptual Transperency: In many applications, such as copyright and usage tracking, embedding data or additional information, the algorithms must embed data without affecting the perceptual quality of the underlying host signal. A data-embedding procedure is truly imperceptible if humans cannot differentiate between the original host signal and a host signal with inserted data.
2) Robustness: The watermark should be retrievable even if common signal processing operations are applied, such as signal enhancement, geometric image operations and noise filtering. This modification include additive Gaussian or non-Gaussian noise,, linear filtering JPEG, wavelet, rotation, spatial or temporal scaling, nonlinear filtering e.g., median filtering. In general the robustness of watermark against the processing techniques depends on the embedding depth and amount of information bits of watermark [8].
3) Security:A secure data-embedding procedure cannot be broken unless the unauthorized user has access to a secret key that controls the insertion of the data in the host signal .
4) Capacity:The capable size of embedding information is defined as the embedding capacity. The embedding capacity should not be extremely low to affect the accuracy of the retrieved watermark and the recovered image.
5) Robustnes:The watermark must be able to be easily and securely embedded and retrieved by the owner. Therefore, the overheads of embedding process and retrieving process should be limited in a reasonable range.
C. Watermarking for Different Domain Generally, there are two broad watermarking schemes and
categories: spatial domain watermarking and frequency domain watermarking. In a spatial domain watermarking scheme, the watermark is embedded by direct modifying the pixel value of an image These spatial domain watermarking schemes are simple and less robust to common signal processing operations, since the watermark doesn’t spread all over the image and some common signal processing easily erase the embedded watermark without affecting the quality of the watermarked image. On the other hand, frequency domain watermarking schemes involve embedding the watermark by modifying the transform co-efficient, after the image has been transformed to the transform domain.
1) Spatial domain Watermarking: Spatial domain watermarking is performed by modifying values of pixel of a frame. Let us denote a picture to be watermarked by P and values of its pixel samples by iP , a watermarked version of picture P by 'P and values of its pixel color samples by 'iP . Let us have as many elements of watermark W with values Wi as number of pixels in picture P . Watermark W hereby covers the whole picture P . Further, it is possible to increase the watermark strength by multiplying watermark element values by weight factor α. Then the natural formula for embedding watermark W into picture P is 'i iP P Wα= +
The most common algorithm using spatial domain watermarking is LSB. The simplest watermarking method in spatial domain is to just flip the least significant bit (LSB) of chosen pixels in an image. Given the extraordinarily high channel capacity of using the entire cover for transmission in this method, a smaller object may be embedded multiple times. Even if most of these are lost due to attacks, a single surviving watermark would be considered a success [9].
3
2) Frequency Domain Watermarking :These methods are similar to spatial domain watermarking in that the values of selected frequencies can be altered. Because high frequencies will be lost by compression or scaling, the watermark signal is applied to lower frequencies, or better yet, applied adaptively to frequencies containing important elements of the original picture. Upon inverse transformation, watermarks applied to frequency domain will be dispersed over the entire spatial image, so these methods are not as susceptible to defeat by cropping as the spatial technique.
a) Discrete Cosine Transform (DCT) :The DCT allows an image to be broken up into different frequency bands, making it much easier to embed watermarking information into the middle frequency bands of an image. The middle frequency bands are chosen such that they have minimize they avoid the most visual important parts of the image (low frequencies) without over- exposing themselves to removal through compression and noise attacks (high frequencies).
b) Discrete Wavelet Transform (DWT):In DWT based approach, each level produces four level bands of data, one corresponding to the low pass band(LL), and three other corresponding to horizontal (HL), vertical (LH) and diagonal (HH) high pass bands. The decomposed images shows a coarse approximation image in the lowest resolution low pass band, and three detail image in higher bands. The low pass band can further be decomposed to obtain another level of decomposition. Watermark data inserted into low frequencies is more robust to image distortions that have low pass characteristics like filtering, lossy compression and geometric manipulation and less robust to change of the histogram such as contrast/brightness adjustment, gamma correction and cropping. On the other hand, watermark data inserted into middle and high frequencies is typically less robust to low pass filtering, lossy compression and l geometric deformation of the image but extremely robust with respect to noise adding and nonlinear deformation of the gray scale.
III. PROPOSED WATERMARKING ALGORITHM Spatial-domain digital watermarking methods are generally
considered as having poor performance after geometric distortion (such as cropping and scaling), common signal processing (such as JPEG and filtering), or subterfuge attacks (such as changing the least-significant bits).It has less computational cost due to their easy operation. So it is more efficient. On the other hand, frequency-domain watermark techniques, have their high computation complexity, and provide great robustness to different attack. However, we have adopted the combined approach with spatial-frequency domain approach which has advantages of both domains. The frequency domain transformation is done with simple haar wavelet and spatial domain transformation done with bit plane slicing. This paper describes the technique of wavelet transform for decomposition of image into different bands. For the image decomposition and reconstruction the Haar transform has been applied as a basic tool used in the wavelet transform. Here some mathematical analysis of Haar transforms extraction using decomposition and reconstruction
matrices. is described for image compression and image pixels features
A. Haar Wavelet: Wavelets are functions generated from a single function by
its dilations and translations. The Haar transform forms the simplest compression process of this kind. In 1-dimension, transforms a 2-element vector [x (1), x (2)]T into [y (1), y (2)]T by relation:
(1) (1)(2) (2)
y xT
y x⎡ ⎤ ⎡ ⎤
=⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ Where,
1 111 12
T⎡ ⎤
= ⎢ ⎥−⎣ ⎦ (1)
is an orthonormal matrix as its rows are orthogonal to each other (their dot products are zero).Therefore T−1 = TT and it is possible to recover x from y by relation
(1) (1)(2) (2)
Tx yT
x y⎡ ⎤ ⎡ ⎤
=⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ (2)
In 2-dimensions x and y become 2 × 2 matrices. We can transform at first the columns of x, by pre-multiplying by T, and then the rows of the result by post-multiplying by TT to find
y = T x TT and in the next step x = TT yT (3)
To show more clearly what is happening we can use a specific matrix x of the form
12
a b a b c d a b c dx imlying that y
c d a b c d a b c d+ + + − + −⎡ ⎤ ⎡ ⎤
= =⎢ ⎥ ⎢ ⎥+ − − − − +⎣ ⎦ ⎣ ⎦ (4)
(a) Original Image (b)1st level decomposed Image
Figure 2. Wavelet Decompostion with Haar Wavelet
These operations correspond to the following filtering processes: Top left: 2-D low pass filter (LL). Top right: horizontal high pass and vertical low pass filter (HL). Lower left: horizontal low pass and vertical high pass filter (LH). Lower right: 2-D high pass filter (HH). To apply this transform to a complete image, we group the pixels into different blocks and apply (3) to each block. To view the result, all the top left components in Figure 2(a) of the different blocks in y were grouped together to form the top left sub image in Figure 2(b) and the same for the components in the other three positions. It is clear from Figure 2(b) that the most of the energy is contained in the top left (LL) sub image and the least energy is in the lower right (HH) sub image. The top right (HL) and the lower left (LH) sub image contains the
4
edges. The energies of LL Band (88-89%), HL(4-5%),LH(6-7%) and HH(1-2%). So the LL band contains most part of energy while HH band contains marginal part of the total energy of image.
B. Bit-plane slicing Instead of highlighting gray level images, highlighting the contribution made to total image appearance by specific bits might be desired. Suppose that each pixel in an image is represented by 8 bits. Imagine the image is composed of 8, 1-bit planes ranging from bit plane1-0 (LSB) to bit plane 7 (MSB). In terms of 8-bits bytes, plane 0 contains all lowest order bits in the bytes comprising the pixels in the image and plane 7 contains all high order bits. separating a digital image into its bit planes is useful for analyzing the relative importance played by each bit of the image, implying, it determines the adequacy of numbers of bits used to quantize each pixel, useful for image compression. In terms of bit-plane extraction for a 8-bit image, it is seen that binary image for bit plane 7 is obtained by proceeding the input image with a threshold gray-level transformation function that maps all levels between 0 and 127 to one level (e.g 0)and maps all levels from 129 to 253 to another (eg. 255). Watermark Embedding Method: Step 1: Read the original Image X. Step 2: Compute the first level wavelet decomposition of original image X. We obtain one approximation image (LL Band) and three detail images, corresponding to the horizontal, vertical and diagonal details of the original host image . Step 3: Convert the LL band of original image into different 8 planes start with MSB to LSB.
Figure 3. Bit Plane Slicing to LL Band
Step 4: Generate the required watermark of text, image or random number. Step 5: Add the LSB plane of high frequencies with desired
watermark plane. Step 6: Reconstruct the image with adding all the 8 planes again with MSB to LSB. Step 7: Apply 1st level inverse to LL band and three detailed co-efficient to obtain the watermarked image. Step 8: Apply different attacks to the watermarked image to check the robustness. Watermark Extraction process: Step 1: Apply DWT to the watermarked image to get approximation and details co-efficient. Step 2: Apply bit plane slicing to the LL of the watermarked image to get 8 different planes start from LSB to MSB. Step 3: Apply DWT to the original image to have four sub bands of LL, LH, HL and HH.
Step 4: Apply bit plane slicing to LL band of original image to get different planes from LSB to MSB. Step 5: Subtract the LSB plane of the original image from the LSB plane of watermarked image to get watermark
IV. EXPERIMENTEL RESULTS The proposed algorithm is implemented and results are
obtained on MATLAB platform. The proposed algorithm has been compared with some another algorithm is proposed by Jun Tian [10] based on differential expansion. In this approach, whole image is divided into the blocks and then 1st level Integer wavelet transform is obtained to check expansibility of each block and generate secret key. If block is expansible then watermark is embedded otherwise it is not embed. At extraction part with secret key, the expansible blocks is decomposed by 1-level wavelet lifting scheme. This algorithm is also used for image authentication and ownership verification application. But due to division of image in blocks it gives less PSNR and high MSE. We have removed the concept of blocks and convert in different level of decomposition and then apply bit plane slicing to embedded the watermark. With proposed our approach, we overcome block artifacts issues. So we get good PSNR and MSE compare to existing approaches. We compared our results with differential expansion method results.
A. Performance of an Algorithm Before presenting the results, it is necessary that the factor, which determines the performance of an algorithm, is clearly stated. Essentially, the most important factor is Similarity factor which gives difference between the original image and the reconstructed image to achieve complete reversibility and others are Mean square error and Peak signal to noise ratio (db).
5
Original Image 1st level decomposition
Watermarked Image Reconstruction from plane Watermarked LSB Plane (a) Watermark Embedding Process
Watermarked Image Watermarked LSB Plane
Original Image LSB Plane of original Image Watermark
(b) Watermark Extraction process
Figure 4. Explanation of Praposed algorithm with Step by Step
B. Performance of an Algorithm Before presenting the results, it is necessary that the factor, which determines the performance of an algorithm, is clearly stated. Essentially, the most important factor is Similarity factor which gives difference between the original image and the reconstructed image to achieve complete reversibility and others are Mean square error and Peak signal to noise ratio (db).
C. Simulation Parameters The simulated models are set to the following parameters: Original Image: Lena (512X512) (greyscale,8 bpp) Baboon (512X512) (greyscale,8 bpp) Cameraman (512X512) (greyscale,8 bpp)
Bit Plane Slicing
DWT
IDWT
Watermark
DWT
DWT
A
A
6
D. Mean Square Error(MSE)
It is measured as the average of square of error introduce. It is defined as,
{ }21 1
0 0( , ) 1 ( , )M N
r cI r c I r c
M S EM N
− −
= =⎛ ⎞−⎜ ⎟=⎜ ⎟⎝ ⎠
∑ ∑
M x N is size of image. I(r,c) and I1(r,c) denotes row element “r” and column element “c” of Original and Watermarked image.
E. Peak Signal to Noise Ratio(PSNR)
It is a ratio of maximum signal power to noise power. PSNR = 10 log (2552 / MSE)
F. Similarity Factor(SF)
SF = ( )∑ ∑ ∑ ∑−
=
−
=
−
=
−
=′1
0
1
0
1
0
1
02 ),(/),(*),(M
r
N
c
M
r
N
ccrfcrfcrf
M x N is size of image. f(r,c) and f’(r,c) denotes row element “r” and column element “c” of original and reconstructed image.
TABLE I. COMPARISION ORIGINAL MSE,PSNR AND SIMILARITY FACTOR OF WATERMARKED AND ORIGINAL IMAGE
Image MSE PSNR SF Proposed Scheme
Lena 0.050 61.14 0.998 Cameraman 0.065 60.00 0.996 Baboon 0.072 59.55 0.995
Jun Tian[10] Lena 0.692 49.7274 0.990 Cameraman 1.643 45.9727 0.984 Baboon 1.260 47.1253 0.982
TABLE II. COMPARISION ORIGINAL MSE,PSNR AND SIMILARITY FACTOR OF WATERMARKED AND ORIGINAL IMAGE AFTER SALT AND PEEPER
NOISE ADDED TO WATERMARKED IMAGE Image MSE PSNR SF Proposed Scheme Lena 0.062 60.21 0.997
Cameraman 0.067 59.74 0.996 Baboon 0.078 59.20 0.996
Jun Tian[10] Lena 0.9162 48.5105 0.997 Cameraman 1.1942 47.3598 0.999 Baboon 1.9214 45.2946 0.999
TABLE III. COMPARISION ORIGINAL MSE,PSNR AND SIMILARITY FACTOR OF WATERMARKED AND ORIGINAL IMAGE AFTER 180 DEGREE
CLOCKWISE ROTATION TO WATERMARKED IMAGE
Image MSE PSNR SF Proposed Scheme Lena 10.60 37.87 0.973
Cameraman 11.25 37.61 0.969 Baboon 12.56 37.16 0.970
Jun Tian[10] Lena 125.30 27.1512 0.804 Cameraman 124.78 27.1690 0.798 Baboon 121.87 27.2720 0.813
TABLE IV. COMPARISION ORIGINAL MSE,PSNR AND SIMILARITY FACTOR OF WATERMARKED AND ORIGINAL IMAGE AFTER RESIZING OF
WATERMARKED IMAGE
Image MSE PSNR SF Proposed Scheme Lena 75.0 29.38 0.989
Cameraman 90.32 28.52 0.984 Baboon 100.7 28.09 0.987
Jun Tian[10] Lena 17.951 35.5899 0.997 Cameraman 31.621 33.1310 0.987 Baboon 52.136 30.9593 0.982
V. CONCLUSION The proposed algorithm has combined approaches of spatial and frequency domain. The results are verified on MATLAB platform against various attacks. The proposed scheme has been compared with differential expansion schemes. We have compared results of MSE and PSNR for watermarked and original images. From Table I-IV, it is conclude that proposed scheme has better robustness to withstand various geometrical attacks. It has overcome the problem of block artifacts and advantage of both domain properties. We embed the watermark in just adding in the LSB plane and achieved the higher PSNR results. It has also lesser computational complexity compare to other algorithms because we embed the watermark in 1st decomposition level.
REFERENCES [1] R.G. Van Shindig, A.Z.Tirkel and C. F. Osborne, “A Two-Dimensional
Digital Watermark,” in proc. DICTA, pp. 378-393,1993. [2] S. Arivazhagan and L. Ganesan, “Texture Segmentation Using Wavelet
Transform,” Pattern recognition Letters, Vol. 24,pp 3197-3203,December-2003
[3] Saraju P. Mohanty, N. Raganathan, Ravi K. Namballa, “VLSI Implementation of Visible Watermarking for a Secure Digital Camera Design,” Proceeding of 17th International Conference on VLSI design, 2004.
[4] A. Gavlasova,A. Prochazka, and M. Mudrova, “Wavelet Use for Image Classification,” 15th International Conference on Process Control,2005
[5] Sammy H. M. Kwok and Edmund Y. Lam, “Watermark implementation in digital photography,” Processing Of 2005 International Symposium on Intelligent Signal Processing and Communication Systems, Dec-2005.
[6] Cong Jin, Liang-Gang Pan, Ting Su, “A Blind Watermarking Scheme Based on Visual Model for Copyright Security,” MCAM,pp 454-463,2007.
[7] M.A.EI-Iskandarani,Saad M. Saad, Ahmed M. Abubahiam, “An Efficient Digital Image Watermarking,” ICCST,2008
[8] W. bender, d. Gruhi and N. Morimoto,“Techniques for data hiding,” IBM syst. J., vol. 35,nos. 3-4 pp. 313-336,1996.
[9] C. Fei, D. Kundur, and R.H. Kwong, “The choice of watermark domain in the presence of compression”, in Proc. IEEE Int. Conf. on Infermation Technology: Coding and Computing,pp79-84,April 2001.
[10] Jun Tain, “ Reversible Watermarking by Difference expansion” Multimedia and Security workshop at ACM-02 France,Dec-06,2002.
CLOCK SKEW ANALYSIS AND OPTIMIZATION OF SEQUENTIAL
CIRCUIT
Amit M Joshi *, Anand D. Darji , Taral D Chhatbar , Abhishek Aghrahari SARDAR VALLABHAI NATIONAL INSTITUTE OF ENGINEERING & TECHNOLOGY
SURAT-395007; e-mail: [email protected]
Abstract. A well-designed clock system is a
fundamental requirement in high-speed computers.
As the demand for high-speed computers grows, the
design of their clock systems have become a major
concern not only in achieving high performance, but
also in reducing assembly and maintenance costs. This
paper gives an idea about important issues of clock
skew which gives more focus in today research area.
As technology advances and timing cycle reduces it
becomes an important parameter of sequential design.
In this paper analysis and optimization techniques for
clock skew is discussed. We have also focused on
double clocking & zero clocking constraints for
optimization. To overcome these constraints clock
period minimization is required. H tree is one of the
standard technique which is used in clock distributed
network to reduce the clock skew. Approaches like
retiming and transistor sizing techniques are
discussed for skew optimization.
Key words: Gufe skew; Double clocking; Zero
clocking; H- Tree.
1. INTRODUCTION
We specify system timing such that every system
memory element has an expected arrival time for
the active edge of its clock signal. Clock-edge
inaccuracy is the difference between the actual and
expected arrival time of this clock edge. We define
path clock skew as the sum of the clock-edge
inaccuracies of the pair’s source and destination.
System clock skew is the largest path clock skew in
the system. It is the value of the worst-case timing
inaccuracy among all paths. We can break it into
inter board skew, on-board inter chip skew, and so
on to the smallest timed component. The challenge
to designers of clock-distribution networks is how
to control system clock skew so that it becomes an
acceptably small fraction of the system clock
period. As a rule, most systems cannot tolerate a
clock skew of more than 10% of the system clock
period. If system clock skew goes beyond the
design limit, system behavior is affected in terms of
setup and hold times, which results in long and
short paths. No scheme is immune from these
problems-even flip-flop machines can malfunction
when clock skew is present. Clock-powering trees
are a source of clock. We can minimize the clock
skew by placing all the gates at a given tree level,
or delay which is the difference between its hest-
case and worst-case delays. This difference is called
gufe skew. In addition,we can realize elements at
each tree level by using electrically matched
devices and careful wiring.
2. IS CLOCK SKEW OPTIMIZATION SAFE?
A common misconception about changing clock
skews is believed to be an “unsafe” optimization. A
small change in either gate or interconnect delays
may cause a circuit with hazardously small
tolerance to malfunction. But one can build in
safety margins, to ensure skewing errors do not
disrupt circuit functionality. These safety margins
ensure that the circuit will operate in the presence
of unintentional process-dependent skew variations.
Introducing deliberate delays within the clocking
network has been a tactic that has long been used
by designers [1]. From the design point of view,
zero skew clock tree construction techniques may
be adapted to build fixed skew clock networks. A
practical proof of this concept was demonstrated in
a pipelined data buffer chip using the concept of
skewed clocks, which was previously designed and
fabricated [2].
Register A Register B
Fig. 1 The concept of zero clocks skew
In fact it is a misconception to believe that zero
skew is entirely safe. To see this, consider a shift
register consisting of register A whose output is
connected to register B with no combinational logic
between them as shown in the Fig. 1 [3,4]. Even
for a circuit designed for a skew, a small
unintentional positive skew at register B will cause
double clocking i.e. a short path constraint
violation. Such problem may be avoided by the use
of safety margins with introducing the delibrate
skew to the circuit. A small amout of delibrate
positive skew at register A provides an effective
safety margin aginst short path violation.
D Q
D Q
clk
3. CLOCK SKEW OPTIMIZATION
Use of intentional non-zero clock skews can speed
up the clock period for a sequential circuit since it
facilitates cycle-borrowing. Now its time to find the
optimal skews at each memory element in an edge-
triggered circuit, where the optimality is defined in
terms of minimizing the clock period [5]. The
problem is posed as a linear program, and this
formulation is described in this section.
Fig. 2 Ccombinational block in sequential circuit
Consider a combinational block in a sequential
circuit, as shown in Fig. 2. Let FFi and FFj be a pair
of flip flops at the input and output of the
combinational block respectively. Where Xi and Xj
are clocks for FFi and FFj respectively. Denote the
delay of the combinational block between them as
),( jid . d(i ,j) being the minimum delay and
),( jid being the maximum delay. If Thold is the
flip-flop hold time, Tset-up the flip-flop set-up time,
and P the clock period, then in the presence of
skews the double-clocking and zero-clocking
constraints are discussed as below..
Double-clocking/short path constraint:
To avoid double-clocking, the data from the next
clock cycle should arrive at FFj no earlier than Thold
after the current clock. The data leaves FFi at time
Xi and reaches FFj at Xi + d(i,j). Thus, the double
clocking constraint illustrated in Fig. 3.
Fig. 3 Double clocking
Zero-clocking/ long path constraint:
To avoid zero-clocking, the data from the current
clock cycle should arrive at FFj no later than a time
Tsetup before the next clock. Since the data leaves
FFi at time Xi, the latest time by which it will reach
FFj is Xi+ ),( jid . The zero-clocking constraint
shown in Fig. 4 may be expressed as
setupTPXjjidXi ),(
Fig 4. Zero clocking
4. CLOCK PERIOD MINIMIZATION
The problem of minimizing the clock period P by
controlling the clock skew at each flip-flop, subject
to correct timing, can now be formulated as the
following linear program. Minimize P Such that ,
holdTXjjidXi ),(
setupTPXjjidXi ),(
The linear program assumes that the delays of the
combinational segments are constant.The above
formulation may be altered to model uncertainties
in the clock skews. If it can be guaranteed that in
the manufactured circuit, the skew at flip-flop k will
be within the range [Xk- /2 , Xk + /2]. Where Xk is
the designed value of the skew. Then the difference
between any skews (Xi – Xj) in the manufactured
circuit, must be within of the designed value of
(Xi – Xj). A linear program that is guaranteed to
produce a functional manufactured circuit is
formulated below.
Minimize P Such that,
holdTXjjidXi ),(
setupTPXjjidXi ),(
5.EFFICIENT SOLUTION OF SKEW
OPTIMIZATION PROBLEM
The constraint of the linear program are rewritten as
),( jidTXjXi hold
PjidTXiXj setup ),(
Note that the skews at the primary inputs and the
primary outputs may be set to zero under the
assumption that they cannot be controlled or
adjusted. For a constant value of P, the constraint
matrix for this problem reduces to a system of
difference constraints [6]. For such a system, it is
possible to construct a constraint graph. The
Xi Xj
FFi
CK
Combinational
FFj
CK
Xj
Xi
holdTXjjidXi ),(
Thold d (i,j)
Xi
Xj
Input Latch
Clock
Output Latch
Clock
Output Data
Input Latch
Clock
Output
Latch
Clock
Output
Data
d (i,j) Tsetup
vertices of the constraint graph correspond to the Xi
variables, and each constraint Xa-Xb > C
corresponds to a directed edge from node b to node
a with a weight of c. If P is achievable, then a set of
skews that satisfies P can be found by solving the
longest path problem on this directed graph. The
clock period P is feasible, provided the
corresponding constraint graph contains no positive
cycles. This observation was utilized in for efficient
solution of the skew optimization problem [7]. The
optimal clock period is obtained by performing a
binary search. The procedure continues until the
smallest feasible clock period is found. The
following skeletal pseudo code is used to perform
the binary search for the optimal clockperiod.
Algorithm:
Construct the Constraint graph;
Pmin= Plow ;
Pmax=Phigh;
While (Pmax – Pmin) >
{
P= ( Pmax + Pmin)/2;
If constraint graph has a positive cycle
Pmin = P;
Else
Pmax = P;
}
6. CLOCK DISTRIBUTED NETWORK
Clock distribution network is required to propagate
the clock signal to every register. It must be
designed carefully to achieve performance
requirements on clock signal at sink nodes.
Objective of the clock tree distibution methods are
to achieve either zero skew or fixed skew. H tree
stucture is classical method for clock distibution
network design as shown in Fig 5.
Fig.5 H Tree Structure
The H tree ensures that all sinks of the clock tree
are equidistant from the clock source. The H-tree
works well for regular structure such as systolic
arrays to reduce skew. In practice, asymmetric
distribution of clock pins are very much common
hence H-tree may not be effective for clock routing.
To address this issue, the method of recursive
geometric matching was proposed [8]. It is an
extension of the H-tree idea to structures with a
smaller degree of regularity. Large high
performance circuits have internal clock that is the
function of external clock. The internal clock cycle
time comprises of several components, such as
delay associated with storage devices on the chip,
clock skew & signal transmission etc. The internal
clock signal is distributed to the circuits through
distributed network. The clock skew within a chip
is the variation in the internal clock signal of the
circuit. The main contributor to the skew are
RC transmission delay variations, device variations,
and localized loading varations. In the past, clock
skew is the only small portion of clock time. But as
cycle time decreases, the propagation of clock skew
to the cycle time has dramatically increased. Clock
skew introduces propogation delay between internal
and external clock, which makes interfacing
difficult. Current techniques to control clock skew
focus on controlling the RC variation by equalizing
the routing loading and/or distance. Loading
variation is controlled by adding the dummy loads
to equalize load capacitance of the distribution
network. Effectivness of these techniques depend
on precision by which they equalize load and
distance.
7. CLOCK SKEW OPTIMIZATION AND
RETIMING
In a sequential circuit, due to difference in
interconnect delays on the clock distribution
network, clock signal do not arrive at all of the FF’s
at the same time.There is a skew between the clock
arrival times at different FF’s.Several methods for
achiving zero clock skew have been developed.
Viewing clock skew as a managable resours rather
then a liability allows a designer to introduce
intentional skews to improve the performance of the
circuit. To illustrate this, consider the example in
Fig 6 where each inverter has a unit delay. The
combinational circuit blocks CC1 and CC2 have
delays of 3.0 and 1.0 units, respectively, therefore
the fastest allowable clock has a period of 3.0 units.
However if a skew of +1.0 unit is applied to the
clock line to FF B, the circuit can run with a clock
period of 2.0 units.
Fig. 6 Nonzero clock skew
A second approach to timing optimization is the
procedure of retiming [1]. Retiming involves the
relocation of FF’s across logic gates to allow the
circuit to be operated under a faster clock without
changing its functionality. For the circuit in Fig 6.
the period of the original circuit can be minimized
to 2.0 units by moving FF B to the left across the
FF
A
ck
FF
B
ck
FF
C
ck
CC1 CC2
I1 I2 I3 I4
inverter I3. This results in the combinational circuit
blocks CC1 & CC2 having delays of 2.0 units.
Fig.7 Retiming for clock period minimization
8. OPTIMAZATION WITH TRANSISTOR SIZING
It has been assumed that the delay of each
combinational path is fixed .However, the drive
strength of gates can be altered by transistor sizing
[9]. Thereby changing the combinational path
delays. To illustrate this, consider a pair of
combinational stages separated by latches, as shown
in Fig 8. We will consider area as the cost function
here, but the same idea is valid for other correlated
cost functions such as power. If only the sizing
transformation were to be applied, the nature of the
cost-delay tradeoff curve for each stage would be as
shown in Fig 9.If the timing specification on Stg1
were stringent, then the optimal sizing solution
would lie beyond the knee of the curve, at a point
such as point A. Similarly, if the specifications on
Stg2 were loose, then the optimal solution might lie
at a point such as C. The cost of sizing solution
would then be [Area(A) + Area(C)].
Fig 8 Non zero clock skew
Now consider a situation where a small skew S, is
applied to the registers between the two stages,
allowing Stg1 to borrow time from Stg2.This would
lead to a looser specification on Stg1, bringing the
solution point from A to B, and a tighter
specification for stage2, moving its solution from C
to D. The cost of the overall sizing solution, [Area
(B) + Area(D)] can be seen to be much smaller than
the cost with zero skew.For a small amount of cycle
borrowing, the cost at the solution point A was well
above the knee of the curve. Therefore, the
judicious use of sizing in conjunction with
deliberate skew can deliver solutions of
significantly better quality than sizing alone. It is
important to perform the two optimizations
concurrently, rather than sequentially, So
to fully incorporate the mutual interactions between
skew and sizing.
Fig 9 Sizing in conjunction with clock skew
9. CONCLUSION
The clock system is an integral part of synchronous
computers, yet it is not a widely studied aspect of
their design. Early attention to system timing issues
can provide benefits in system performance as well
as product development time. The goal of the clock
system designer is to control system clock skew at
the system operating frequency as well as to
minimize electrical hazards that may add
undesirable components to the clock signals.
10. REFERENCE
(1) K.D. Wagner. Clock system design.IEEE Design
and test of Computers, pages 9-27, October 1988.
(2) M. Heshami and B.A. Wooley. A 250 MHz skewed
–clock pipelined data buffer. IEEE Journal of
Solid-State Circuits, 31(3):376-383,March 1996.
(3) H.Sathyamurthy, S.S. Spanker, and J. P. Fish
burn. Speeding up piplined circuits through a
combinational of gate sizing and clock skew
optimization. In proceeding of the IEEE/ACM
International Conference on Computer-Aided
design, pages 467-470.1995
(4) H.Sathyamurthy, S.S. Spanker, and J. P. Fish
burn. Speeding up piplined circuits through a
combinational of gate sizing and clock skew
optimization. IEEE Transactions on Computer-
Aided Design of Integrated Circuits and systems,
17(2):173-182, February 1998.
(5) J. P. Fish burn. Clock skew optimization.IEEE
Transaction on Computers, 39 (7) :945-951, July
1990
(6) T.H.Coremen, C.E. Leiserson and R.L.Rivest.
Introduction to Algorithms. McGraw-Hill, New
York,NY, 1990
(7) R.B. Deokar and S.S. Spanker. A graph-theoretic
approach to clock skews optimization. In
Proceeding of the IEEE International Symposium
on Circuits and systems, pages 1.407-1.410,1994
(8) A.Kahang,J.Cong, and G.Robins.High-
performance clock routing based on recursive
geometric matching.In Proceeding of the
ACM/IEEE Design Automation Conference,pages
322-327,1991
(9) S.S. Sapatnekar and S.M. Kang. Design
automation for timing driven Layout synthesis.
Kluwer Academic Publishers, Boston, MA, 1993.
F
F
1
Stage 1
Stg1
Stage 2
Stg2
F
F
2
F
F
3
FF
A
CK
FF
B
CK
FF
C
CK
CC1 CC2
I1 I2 I3 I4
APPENDIX B
Lifting Scheme In traditional convolution (filtering) based approach for computation of the forward
DWT, the input signal (x) is filtered separately by a low-pass filter (~h ) and a high-pass
filter (~g ). The two output streams are then sub-sampled by simply dropping the alternate
output samples in each stream to produce the low-pass (L) and high-pass (H) sub band
outputs as shown in Fig 1. The two filters (~h ,
~g ) form the analysis filter bank. The
original signal can be reconstructed by a synthesis filter bank (h, g) starting from L and H
as shown in Fig 2.
Fig 1 Analysis and Synthesis Filter Bank
The condition for the perfect reconstruction of a signal are given by equations [1]-[2].
~ ~1 1( ) ( ) ( ) ( ) 2h z h z g z g z− −+ = [1]
~ ~1 1( ) ( ) ( ) ( ) 0h z h z g z g z− −− + − = [2]
Where ( )h z is the z-transform of the FIR (Finite Impulse Response) filter h . h can be
expressed as a Laurent polynomial of degree p as
0( )
pi
ii
h z h z−
=
=∑ [3]
By splitting the filter coefficients into odd and even parts, the filters can be rewritten as
follows.
2 1 2( ) ( ) ( )e oh z h z z h z−= + [4]
2 1 2( ) ( ) ( )e og z g z z g z−= + [5]
~ ~ ~2 1 2( ) ( ) ( )e oh z h z z h z−= + [6]
~ ~ ~2 1 2( ) ( ) ( )e og z g z z g z−= + [7]
The corresponding polyphase representation is [34]:
( ) ( )( )
( ) ( )e e
o o
h z g zP z
h z g z⎡ ⎤
= ⎢ ⎥⎣ ⎦
and ~ ~
~
~ ~
( ) ( )( )
( ) ( )
e o
e o
h z h zP z
g z g z
⎡ ⎤⎢ ⎥=⎢ ⎥⎣ ⎦
Often ( )P z is unity is called dual of ~
( )P z and for perfect reconstruction, they are related
as ~
1( ) ( )TP z P z I− = ,
where I is a 2x2 identity matrix. Now wavelet transform in terms of polyphase matrix
can be expressed as equations (3.8)-(3.9) for forward DWT and inverse DWT
respectively [34].
~
1
( ) ( )( )
( ) ( )e
o
L z x zP z
H z z x z−
⎡ ⎤ ⎡ ⎤=⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ [8]
1
( ) ( )( )
( ) ( )e
o
x z L zP z
z x z H z−
⎡ ⎤ ⎡ ⎤=⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ [9]
If the determinant of ( )P z is unity, it can be shown by applying Cramer’s rule [34] that
~1 1( ) ( )h z z g z−= − −
~1 1( ) ( )g z z h z− −=
~1 1( ) ( )h z z g z− −= − −
~1 1( ) ( )g z z h z− −= − .
Daubechies and Sweldens in [34] have shown that the polyphase representation can
always be factored into lifting steps by Euclidean algorithm to find the greatest common
divisor. Thus the polyphase representation becomes:
1
1 ( ) 1 0( )
0 1/ 0 1 ( ) 1
n i
i i
K O a zP z
K b z=
⎡ ⎤ ⎡ ⎤ ⎡ ⎤= Π⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎣ ⎦
[10]
Where K is a constant and acts as a scaling factor. ( )ia z and ( )ib z are the Laurent
polynomials which correspond to the updaters and the predictors of the lifting steps. By
factoring the wavelet filters into lifting steps, it is expected that the computation
performed on each stage will be much less complex.
We can say, the main feature of the lifting based DWT scheme is to break up the
high pass and low pass filters into a sequence of upper and lower triangular matrices and
convert the filter implementation into banded matrix multiplications. Lifting based
approach has several advantages over conventional convolution based approach [34].
Lifting Architecture
Lifting scheme can be mainly divided into three parts as shown in the Fig 2 splitting,
lifting and scaling.
Split Step: The input signal x[n] is split into odd and even subsequences, [ ]d n and [ ]s n
respectively (also known as Lazy Wavelet Transform).
2i is x∈
2 1i id x +∈
Predict Step: This step predicts data in the subsequence [ ]d n using the samples in the
[ ]s n and replaces the samples in [ ]d n using prediction error.
Fig 2 Basic Lifting Scheme
[ ] [ ] ( [ ])d n d n P s n= −
()P = Prediction Operator
Update Step: This step updates the data in [ ]s n using the data in [ ]d n .
[ ] [ ] ( [ ])s n s n U d n= +
()U =Update Operator
APPENDIX C
TEST IMAGES
Gray Scale Images:
Lena (256x256) Baboon (256x256) Cameraman(256x256)
Color Images:
Lena (256x256) Baboon (256x256) Cameraman(256x256)
Watermarked Images
Text Logo (64 x 64) Text Logo (64 x 64) Random Sequence (64x64)