Content uploaded by Muhammad Younus Javed
Author content
All content in this area was uploaded by Muhammad Younus Javed on Apr 27, 2015
Content may be subject to copyright.
2008 International Conference on Emerging Technologies
IEEE-ICET 2008
Rawalpindi, Pakistan, 18-19 October, 2008
Invisible Watermarking Schemes in Spatial and Frequency
Domains
Saba Riaz, M. Younus Javed, and M. Almas Anjum
Department
of
Computer Engineering, College
of
Electrical &Mechanical Engineering,
National University
of
Sciences &Technology (NUST), Rawalpindi 46000, Pakistan.
E-Mail: sabarzI48@yahoo.com.myjaved@ceme.edu.pk.almasanjum@yahoo.com
Abstract-The paper presents two invisible approaches for hiding
data in frequency and spatial domain. Both schemes were
exposed to different watermarking attacks. Though the
techniques used in spatial domain
is
not robust against many
attacks but it will give useless information to the attacker unless
he has the decoding key. In frequency domain, Fast Fourier
Transform has been adopted for digital image watermarking.
Central frequencies are selected to insert the data in aring. In
spatial domain, encrypted data will be inserted in the Least
Significant Bits. Also, it has been observed that the scheme in
frequency domain
is
robust against anumber of attacks. Both
schemes
do
not require the original image for extracting the
embedded data mark. Description of the frequency domain
method has been discussed in detail along with the results.
Keywords- Invisible Watermarking, Frequency domain, Spatial
Domain, Watermarking Attacks.
I.
INTRODUCTION
Today's advancement in technology has raised many issues
of
security. Digital watermarking is field
of
great focus for
researchers,
as
it
is
anew and emerging field. Different
methods have been developed
to
protect an unauthorized use
of
multimedia objects. Digital Watermarking method is one
of
them. From domain perspective, digital watermarking
is
addressed mostly in spatial or frequency domain. Based on
application's requirement different watermarking techniques
can be selected. Most
of
the present work in the area
of
digital
watermarking is inspired by the manipulating the frequency
domain
of
the multimedia objects. In frequency domain,
researchers have selected different transformation methods for
embedding and extracting watermark objects. These includes
Discrete Cosine Trans-form (DCT) [1, 2], Discrete Fourier
Transform (DFT)
[3,
4]
and Wavelets [5]. In DFT domain,
there are many approaches for instance Log-Polar Mapping
Method [6], Template Based Method with Log-Polar and Log-
log Mapping
[7]
and Circularly Symmetric Watermark
[8]
and
many others. In spatial domain, Turner
[9]
proposed amethod
of
insertion into adigital audio signal by substituting the
"insignificant" bits
of
randomly selected audio samples with
the bits
of
an identification code.
Two schemes are proposed in this paper. The proposed
scheme which
is
based on FFT (Fast Fourier Transform)
is
motivated by Licks et
al.
[10]. The idea behind the selected
technique
is
to
develop amethod that
is
robust against known
978-1-4244-2211-1/08/$25.00 ©2008 IEEE
attacks on the container image and at the same time
maintaining the security
of
embedded data. In case,
if
the
intruder has reached the embedded data, he cannot easily
access the original data.
II.
PROPOSED SCHEMES
Two schemes are proposed here for embedding data
in the image. In FFT based approach the data that
is
to be
embedded will be pre-processed before embedding. For that
purpose an encryption key will be used to encode the text data.
The preprocessing
of
both the schemes is similar but the
insertion and extraction algorithms are different in two
domains. The essence
of
the work
is
to use frequency and
spatial domain variants
to
embed data securely. The attacks
might be on the embedded data as well
as
on the career image.
The data
is
first preprocessed through encryption and then
embedded into the image. Encryption attacks on data are,
however, beyond the scope
of
this paper. Mainly, there are two
parts
of
that are implied in both schemes:
a.
Insertion and encryption process
b.
Extraction and decryption process
The Fig. 1shows the overall working
of
the scheme:
Insertion and Enctyption
Process
Data
(Image +Message)
Fig. 1: Flow chart
of
two watermarking schemes.
(5)
where M=N,
C=N/2 +1
MandNare
(4)
even numbers.
Each datamark will be inserted alternatively in the two
quadrants to enhance the retrieval capability
of
the algorithm.
However,
if
unique data is embedded in each quadrant it
is
possible to increase the data hiding capacity. The coordinates
are determined using the equation
of
the circle.
Cis considered to be acenter point. From the equation
of
circle:
Let
X'
and
Y'
are defined
as:
1)
Insertion Process in Frequency Domain
Insertion process involves encryption
of
the data with secret
key. Let atext message
of
strings (S) with length
of
(n)
characters and akey (K)
of
length (k) be an input to Encryption
function
E.
A. Frequency Domain Watermarking Scheme
Insertion process requires three inputs to the system (i.e.
data to be embedded, key and the container image). The data
will be encrypted prior to its insertion using the secret key that
is
known at the sender and receiver end. Thus,
if
the data is
extracted by some means it will survive against the
eavesdropper attacks. The proposed scheme has adopted the
private key cryptography.
E
(S,
K) =
e'
(1) y'=y,
Yo
=0
and
x=X'+C,
Xo
=0(6)
The row vector with binary values
of
the encrypted data
is
padded with zeros having length equal to the row dimension
of
the image. The values
of
the row vector are scaled by a
factor. The vector is multiplied by ascalar value (a) such that
the data values will not be "washed" out by the magnitude
of
the FFT and easily identified while reconstructing the image.
Another matrix ring [M, N], all filled with zeros
is
created.
This ring matrix is acontainer to insert datamarked values in a
ring form. The image is supposed to be divided into four
quadrants with acenter
C.
To find the coordinates where the
datamark will be added, first the center Cwill be determined.
To find the center, the following equation will be used:
For encryption asimple technique has been adopted in this
paper. Simple substitution cipher has been used.
Encrypted message
e'
will be inserted into the image. The
process involves aseries
of
steps. For an
image'!'
of
size MxN
denoted
as
I[M, N], let
'r'
be the radius to create acircular
data ring. Let
'a'
be the scaling factor. The value
of
aand rin
were used to generate the pseudorandom keys [10]. However,
in this paper the values were kept constant
as
best results
against anumber
of
attacks were obtained by defining certain
definite values.
The string
of
encrypted message will be converted into
binary equivalent. Let
e'
be aset
of
encrypted text having
length L
1.
Let
e'
be the input to convert the text into binary
form. The output
is
aset
of
bits
of
length L2. The binary
values
of
the encrypted message are stored in asingle row
vector which
is
padded with zeros to meet the circumference
need
of
the circular data ring. The value
of
ris used to define
the range
of
extending the padding values in the vector.
(7)
(8)
(Y'-O) =sqrt ((r2
-(x-C-O)2)
So
the equation (6) becomes:
Finally,
The location for storing the datamark is (x, C+Y'), (C-X',
C-Y'), (x, C-Y') and (C-X', C+Y').
Thus, the 'ring' matrix
is
updated with data bits which are
inserted from the 'datamark' row vector. The matrix
is
divided
into four quadrants so that each data bit is inserted into two
quadrants to improve the performance
of
extraction process.
Frequency in image processing
is
aterm to define the
brightness
of
colors in an image. Fourier transform defines a
function that is the sum
of
all increasing frequencies. The low
frequencies have larger magnitude and therefore possess more
information about the image. Similarly, the higher frequencies
contain information related to the sharp edges. Any change in
these two extreme frequencies will be visible. Middle
frequencies are considered to be best candidate for inserting
data
as
human eye is unable to catch the modifications. The
FFT
of
the image before insertion and after insertion
of
the data
is
shown in Fig. 2(
a,
b).
In FFT processing, the frequencies are shifted to center
location. The magnitude is calculated along with phase angle.
The magnitude
is
then added with the ring matrix. The
magnitude
is
reduced where data bits are zero. For each
(ith,
lh)
pixel value in the ring matrix, where adata bit "0" has been
encoded, it is reduced by alpha/lOin order to minimize the
chance that the value would be interpreted
as
a
"I"
(i.e. the
magnitude
of
the FFT was initially large; the extractor
interprets the pixel
as
logic
"1
'2'
For final generation
of
the
watermarked image, each
(ith,
j ) element
of
the matrix with
values marked with data values are multiplied with the phase
angle
of
each pixel
of
the image so that the image in the
original phase
is
obtained.
(3)
(2)
C'
=2*(r-4)-L2
datamark =a*[binarytext
C'j
o0
Fig. 2(a): FFT
of
the original image
Fy
300
information can be included in even the most modestly-sized
images, such
as
the 256x256 pixel images used in this
discussion.
For the new magnitude the frequency is shifted to the center
and Inverse Fast Fourier transform is computed. The new
image
is
generated with data embedded into it. The FFT
of
the
original and the embedded image is shown in Fig. 2(
a,
b).
2)
Extraction Process Frequency Domain
The extraction process
of
watermark is quite similar to
the embedding process. Read the input image that is marked
with hidden encrypted message. Once the encrypted data is
retrieved, the secret key is applied to decrypt the hidden text.
The FFT is computed and magnitude
is
stored into amatrix.
The values that are stored in the four quadrants are retrieved
based on determining the center
of
the image. Again, the same
coordinates are applied on the magnitude matrix
as
applied in
the inserting algorithm. These values are also stored into a
separate matrix. The scalar value that was initially multiplied
with the encrypted binary values in the insertion process
is
now
subtracted. For robustness, the data bits were embedded in two
quadrants
of
the FFT. The values are averaged to estimate the
true bits, thus reducing the bit error rate. The bits will be
converted back into text format. However, the message
is
in
encrypted form. Key is used to decrypt the message back into
the original message.
Thus LSB technique takes this advantage and replaces the
Nleast signification bits
of
each pixel in an unnoticeable way
to
the human eye.
As
the least-significant bits
of
an 8-bit grayscale image
encode the most minor variations in pixel color, they can be
replaced with informational bits without altering the image in a
perceptible way (provided that the number
of
bits replaced at
each pixel
is
kept reasonably low).
B.
Spatial Domain Watermarking Scheme
As human eye perceives the image in way that it
is
unable to attune to small variations in color, so the image
processing which adjusts the small differences between
adjacent pixels will leave aresulting effect which
is
unnoticeable.
The LSB technique proves to be arather well-rounded method
and lends itselfto avariety
of
information-hiding applications.
Its first principle benefit is sheer volume. Since each pixel
serves
as
adata carrier, alarge quantity
of
imbedded
Fig. 2(b): FFT
of
the embedded image
LSB also allows for the embedding
of
an interesting variety
of
hidden information. Where many other techniques only
allow for the embedding
of
coded text or simple shapes, LSB
can also allow for the hiding
of
photographic images and even
audio recordings. This investigation will concentrate on
embedding photographic images and encoded text using the
LSB-replacement technique.
1)
Insertion Process
in
Spatial domain
The data will be pre-processed before insertion. The
secret key will be used here. First, the key and text will be used
to
generate an encrypted data. Key will also be used to locate
the points where the data can be stored. The key will be stored
in an array and the cumulative sum
of
both rows and columns
will be used to identify the location
of
the storage in the image.
key1 =key (end:-1:1);
rows =cumsum(key);
columns =cumsum(key1);
Insertion
of
watermark
is
further divided into the following
steps:
-Create the data mark.
-Create amatrix
of
zero bits with size equal
to
that
of
the
image. The key will be used
to
determine hiding points.
For this, marked the hidingpoints with
1.
-Create an index
of
the points where data mark
is
1.
-Size
of
the message
is
up
to
1000. Calculate the ASCII
equivalent and represent them into binaryform.
Based on the Index values generated on the base
of
key, the
values are inserted into the image. Only the values which are
equivalent to 1are stored. For that, there are two choices
if
the
value
of
the image
is
odd then it
is
incremented by one.
Otherwise the value
is
decremented by
1.
The actual working
of
the algorithm
is
that grayscale
images are ranged from 0-255 which represents the intensities.
When the equivalent binary value
of
each pixel is calculated
there will be 8-bit representation
of
it.
The bitmap image
having intensities ranges from 0-255 when used to store the
message in its noise.
Suppose agrayscale value
of
apixel
is
123
and its binary
equivalent
is
0111
1011. Now
if
we want to add 1based on
storing the message bit then grayscale value will become
124.
Its binary equivalent will be
0111
1100. Thus, the data
is
stored
in the least significant bits. The Fig. 3shows the example:
-+
Pixels
of
images
Changing the grayscale
Fig.
3:
Pixels
of
an image before and after insertion
of
data.
2)
Extraction Process
in
Spatial domain
Similarly for extraction the key will be used to find the hiding
points and then decrypt the data. The index
is
again used to
indicate the position where the data value
is
1.
The values will be converted back from binary to decimal and
the ASCII equivalent alphabets will be the output
of
the
hidden message extracted from the image.
III. EXPERIMENTS AND RESULTS
This section will describe the efficiency
of
the proposed
approaches against avariety
of
attacks.
The scheme implemented in spatial domain
is
not surviving
against attacks but any attempt to access the embedded data
will be failed unless the key or the encryption algorithm is not
known. Thus the approach has made the data secure as
compared to simplest insertion process. The frequency domain
scheme has been found robust against anumber
of
attacks.
The data hiding capacity
of
spatial domain scheme
is
however
larger as compared to frequency domain scheme. The
watermarked images were attacked with JPEG compression,
different noise attacks, histogram equalization, horizontal
flipping, and cropping. For the frequency domain
watermarking scheme it has been noticed through experiments
that selecting the value
of
(alpha) a=10000 for retrieving the
embedded text gives acceptable results. The value
of
acan
vary from 10000 to 25000; however, there
is
no single value
defined which can stand against all the attacks [10].
Experiments conducted on aset
of
images while keeping
different values
of
ashow that best results are achieved by
keeping that value constant at a=10000. Thus, all the
experiments are performed keeping the value
of
a=10000.
A.
Selection
of
parametersfor the algorithm
For frequency domain algorithm, the data hiding capacity
of
in this paper, 8-bit gray images
of
size 256x256 are
selected. For these images, the value
of
r=
100 and the value
of
ahas been selected as 10000 to embed maximum characters.
It has been noted that best results are obtained
if
the value
of
scaling factor
is
selected as a=10000. The result
of
different
values
of
a
is
shown in the Table
1.
Characters are embedded
into the images with different values
of
aand BER (Bit Error
Rate)
is
calculated. The range
of
value
of
ahas been selected
from 8000
to
25000.
Table 1: BER at different values
of
a
a\
c=10
c=15
c=20 c=30
characters
8000 01 1 1
9000 00 0 1
10000
000 0
12000 00 0 1
15000 0010
20000 01 1 1
25000 00 0 1
B.
Data hiding Capacity
of
Two
Schemes
The data hiding capacity
of
spatial domain
watermarking
is
much higher as compared to frequency
domain however this scheme cannot withstand against many
vital attacks on images. Data hiding capacity and robustness
is
shown in the Fig.
4.
FFT
Based
LSB
Based
Robustness
Fig.
4:
Data hiding Capacity and Robustness
of
two
techniques.
C.
Quality
of
Watermarked Images
The PSNR (Peak Signal to Noise Ratio), usually used
to
determine the quality
of
processed images, here it
is
used to
determine the quality
of
the watermarked images. Quality
of
watermarked images was observed on aset
of
100
images and
12
10
salt &pepper noise attack on the watermarked image is in Fig.
7(b).
Fig. 6: Graphical representation
of
adding AWGN noise to
watermarked image.
the results are found to be PSNR
---
30 for images for images in
frequency domain whereas
PSNR---35
for images in spatial
domain.
The quality
of
both the watermarked images are calculated
based on the out comes
of
the peak signal-to-noise ratio.
Results show that the quality
of
the images lies in the
acceptable range. However, the image quality is better in case
of
spatial domain.
D.
Cropping Attacks
This is another important attack against which anumber
of
watermarking schemes failed. Cropping involves removing
of
pixels in horizontal and/or vertical direction. The algorithm
has been applied on aset
of
images. The result is shown in the
Fig.
5.
14
12
10
cr::
~6
•
8it
Error Rate
10
Noise
n
3.5
15
,
20
20
0.04 0.05 0002 0004
ow;.
oa:e
0.01
Nois.
Fig. 5: Cropping
of
image pixels and BER after extracting
data
E.
Noise Attacks:
Noise attack
is
one
of
the important attack against which
the watermarking schemes are found vulnerable. Various noise
attacks are applied to the watermarked image and the results
are found satisfactory. Spatial domain
is
failed against noise
attack and gives garbage data after attack.
1.
AWGN (Additive White Gaussian Noise): AWGN
channel adds wideband or white noise with aconstant spectral
density. The proposed scheme is exposed to AWGN with
different values and the results are found reasonable. These
noise values are scaled with aparameter n. The graphical
representation
of
the values and BER
is
shown in Fig.
6.
2.
Poisson andSpeckle Noise: These noises can destroy the
embedded data in the image. Against the Poisson noise the
BER =
2.
The same result has been observed when applied on
set
of
20 images. Speckle noise is another possible attack on
the image. Speckle is an arbitrary, deterministic, interference
pattern in an image. The results are found reasonable against
the speckle noise attack. The graphical representation
of
speckle noise when applied to the watermarked image is
presented in the Fig. 7(a).
3.
Salt &Pepper Noise: In salt &pepper noise the random
pixels are set to black and white throughout the image. The
proposed scheme provides reasonable results against the salt
and pepper noise attack. The graphical representation
of
the
(a) (b)
Fig. 7: Graphical representation
of
adding speckle noise (a) and
salt &pepper noise (b) to watermarked image showing BER.
F.
Histogram Equalization Attack
Histogram equalization adjusts the contrast
of
the image
by using image's histogram. Applying histogram equalization
to awatermarked image can also be asource
of
embedded
data distortion. In this work, the watermarked images are
exposed to histogram equalization. It has been observed
through experiments on aset
of
images that the proposed
scheme resists the histogram equalization attack. The Fig. 8(a,
b) shows the histogram applied on the watermarked image
before and after equalization.
G.
Compression Attack
JPEG standard is awell know technique that allows
image compression. The image can be compressed into a
stream
of
bytes. The compression technique is usually lossy
compression that may loss the visual quality
of
the image as
well.
If
such compression is applied to awatermarked image, it
may lose the data embedded into the image. Experiments
performed on the images show that the proposed scheme is
resistant when watermarked image is compressed using JPEG
standard.
In experiments, the image in frequency domain is
compressed up to 60% and watermark extraction
is
applied to
it. The scheme has been found resistant against the attack
however, fails in case
of
spatial domain.
lem
[5]
eoo
«Xl
[6]
2m
[7]
Fig. 8(a): Histogram for watermarked image before applying
equalization
100
Fig. 8(b): Histogram for watermarked image after applying
equalization
F.
Flipping Attack
Vertical image flipping is yet another very easy attack to
perform, however it is so effective that it fails many existing
watermarking algorithms.
Aset
of
images are shown below, which include both original
and vertical. Experiments show that the proposed approach is
robust against vertical attack however, fails in spatial domain.
The BER=O in case
of
vertical flipping. Fig. 8(a,
b)
shows the
image with flipping attacks.
IV. CONCLUSION
Through experiments it is observed that spatial domain
scheme is relatively simpler scheme with high capacity
of
data
hiding as compared to Frequency domain scheme. However,
spatial domain is less robust and therefore vulnerable to
number
of
attacks. Other proposed scheme has been found
robust against anumber
of
well known attacks. There are two
main attacks to which all the watermarked schemes are
vulnerable, one attack is
on
the embedded data and the second
is on the container image. The embedded can be secured
if
it is
encrypted using
an
encryption technique. Thus,
if
an intruder
has reached the embedded text, he will not
be
able to get the
original text.
It
is therefore concluded that the frequency
domain is best where there is
no
compromise
on
security.
Selection
of
algorithm is, therefore, based
on
the nature
of
its application. There is always atradeoff between the data
hiding capacity and its robustness. For future work, the
FFT
can be further enhanced to cater the rotation attack on the
image.
V. REFERENCES
[1]
1.
Joe J.
K.
_0
Ruanaidh, W. J. Dowling, and F. M. Boland.
Watermarking digital images for copy-right protection. lEE Proceedings
on Vision, Signal and Image Processing, 143(4):250{256, (1996)
[2] 2. I. Cox, J. Killian,
T.
Leighton, and
T.
Shamoon.Secure spread
spectrum watermarking for images, audio and video. In Proceedings
of
the IEEE Int. Conf. on Image Processing ICIP-96, pages 243 {246,
Lausanne, Switzerland, September (1996).
[3] 3. Joe J.
K.
_0
Ruanaidh and Thierry Pun. Rotation, scale and
translation invariant spread spectrum digital image watermarking. Signal
Processing, 66(3):303 {317, May (1998) (Special Issue on Copyright
Protection and Control,
B.
Macq and I. Pitas, eds.).
[4] 4. Alexander Herrigel, Joe J.
K.
_0
Ruanaidh,
H.
Petersen, Shelby
Pereira, and Thierry Pun. Secure copyright protection techniques for
digital images. In International Workshop on Information Hiding,
Portland, OR, USA, April (1998)
5. Marco Corvi and Gianluca Nicchiotti. Wavelet based image
watermarking for copyright protection. In The 10th Scandinavian
Conference on Image Analysis, pages 157{163, Lappeenranta, Finland,
June (1997)
6.
J.J.K.6 Ruanaidh and
T.
Pun, "Rotation, scale and translation
invariant spread spectrum digital image watermarking," in Signal
Processing, vol 66 May 1998, pp. 303-317
7.
S.
Pereira, J.J.K.6 Ruanaidh, F. Deguillaume, G.Csurka and
T.
Pun,
"Template based recovery
of
Fourier-based watermarks using log-polar
and log-log maps," in 1999. IEEE International Conference on
Multimedia Computing and Systems, vol: I, (1999) pp: 870 -874
[8]
8.
V.
Solachidis and I. Pitas, "Circularly symmetric watermark
embedding in 2-D DFT domain," in Proceedings
of
IEEE International
Conference on Acoustics, Speech, and Signal Processing 1999, vol: 6 ,
pp: 3469 -3472
[9]
L.
F.
Turner, "Digital data security system," Patent IPN WO 89108915,
1989.
[10]
9.
V.
Licks,
R.
Jordan, D.F.G. Azevedo, J.S. Correa, P.R.G. Frano,
R.D.R Ragundes "Circular Watermark Robust Against Geometric
Attacks", accepted for IEEE International Symposium on Information
Theory and Its Applications, Hawaii, USA, (2000)