robust image watermarking in the spatial...

19
* Corresponding author. E-mail: pitas@zeus.csd.auth.gr. Signal Processing 66 (1998) 385 403 Robust image watermarking in the spatial domain N. Nikolaidis!, I. Pitas",* ! Department of Electrical and Computer Engineering, University of Thessaloniki, Thessaloniki 540 06, Greece " Department of Informatics, University of Thessaloniki, Thessaloniki 540 06, Greece Received 22 February 1997; received in revised form 23 September 1997 Abstract The rapid evolution of digital image manipulation and transmission techniques has created a pressing need for the protection of the intellectual property rights on images. A copyright protection method that is based on hiding an ‘invisible’ signal, known as digital watermark, in the image is presented in this paper. Watermark casting is performed in the spatial domain by slightly modifying the intensity of randomly selected image pixels. Watermark detection does not require the existence of the original image and is carried out by comparing the mean intensity value of the marked pixels against that of the pixels not marked. Statistical hypothesis testing is used for this purpose. Pixel modifications can be done in such a way that the watermark is resistant to JPEG compression and lowpass filtering. This is achieved by minimizing the energy content of the watermark signal at higher frequencies while taking into account properties of the human visual system. A variation that generates image dependent watermarks as well as a method to handle geometrical distortions are presented. An extension to color images is also pursued. Experiments on real images verify the effectiveness of the proposed techniques. ( 1998 Elsevier Science B.V. All rights reserved. Zusammenfassung Die schnelle Entwicklung digitaler Bildmanipulationen und -u¨ ber- tragungsverfahren hat eine dra¨ ngende Notwendig- keit fu¨r den Schutz intellektueller Eigentumsrechte von Bildern erzeugt. Ein Schutz des Copyrights, der auf dem Verstecken eines ‘unsichtbaren’ Signals beruht, ist als digitales Wasserzeichen innerhalb des Bildes bekannt und wird in dieser Arbeit vorgestellt. Der Einschlu{ eines Wasserzeichens wird im ra¨ umlichen Bereich durch eine geringe Modifika- tion der Intensita¨t zufa¨llig ausgewa¨hlter Bildpunkte erreicht. Die Erkennung des Wasserzeichens erfordert nicht die Vorlage des Originalbildes und wird durch Vergleich der mittleren Intensita¨t der markierten Bildpunkte mit derjenigen der nicht markierten Punkte erreicht. Zu diesem Zweck wird ein statistischer Hypothesentest benutzt. Die Punkt- modifikation kann in einer solchen Weise durchgefu¨hrt werden, da{ das Wasserzeichen gegenu¨ber einer JPEG- Kompression und Tiefpa{filterung resistent ist. Durch die Minimierung des Energieinhaltes des Wasserzeichensignals bei ho¨ heren Frequenzen wird dies erreicht, wobei die Eigenschaften des menschlichen Gesichtssinnes beru¨ cksichtigt werden. Es werden eine Variation, die bildabha¨ngige Wasserzeichen erzeugt, sowie eine Methode pra¨sentiert, die geometrische Verzerrungen behandelt. Ein Erweiterung auf Farbbilder wird auch verfolgt. Experimente mit echten Bildern besta¨ tigen die Effizienz der vorgeschlagenen Methode. ( 1998 Elsevier Science B.V. All rights reserved. 0165-1684/98/$19.00 ( 1998 Elsevier Science B.V. All rights reserved. PII S0165-1684(98)00017-6

Upload: others

Post on 26-Mar-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

*Corresponding author. E-mail: [email protected].

Signal Processing 66 (1998) 385—403

Robust image watermarking in the spatial domain

N. Nikolaidis!, I. Pitas",*

! Department of Electrical and Computer Engineering, University of Thessaloniki, Thessaloniki 540 06, Greece" Department of Informatics, University of Thessaloniki, Thessaloniki 540 06, Greece

Received 22 February 1997; received in revised form 23 September 1997

Abstract

The rapid evolution of digital image manipulation and transmission techniques has created a pressing need for theprotection of the intellectual property rights on images. A copyright protection method that is based on hiding an‘invisible’ signal, known as digital watermark, in the image is presented in this paper. Watermark casting is performed inthe spatial domain by slightly modifying the intensity of randomly selected image pixels. Watermark detection does notrequire the existence of the original image and is carried out by comparing the mean intensity value of the marked pixelsagainst that of the pixels not marked. Statistical hypothesis testing is used for this purpose. Pixel modifications can bedone in such a way that the watermark is resistant to JPEG compression and lowpass filtering. This is achieved byminimizing the energy content of the watermark signal at higher frequencies while taking into account properties of thehuman visual system. A variation that generates image dependent watermarks as well as a method to handle geometricaldistortions are presented. An extension to color images is also pursued. Experiments on real images verify theeffectiveness of the proposed techniques. ( 1998 Elsevier Science B.V. All rights reserved.

Zusammenfassung

Die schnelle Entwicklung digitaler Bildmanipulationen und -uber- tragungsverfahren hat eine drangende Notwendig-keit fur den Schutz intellektueller Eigentumsrechte von Bildern erzeugt. Ein Schutz des Copyrights, der auf demVerstecken eines ‘unsichtbaren’ Signals beruht, ist als digitales Wasserzeichen innerhalb des Bildes bekannt und wird indieser Arbeit vorgestellt. Der Einschlu{ eines Wasserzeichens wird im raumlichen Bereich durch eine geringe Modifika-tion der Intensitat zufallig ausgewahlter Bildpunkte erreicht. Die Erkennung des Wasserzeichens erfordert nicht dieVorlage des Originalbildes und wird durch Vergleich der mittleren Intensitat der markierten Bildpunkte mit derjenigender nicht markierten Punkte erreicht. Zu diesem Zweck wird ein statistischer Hypothesentest benutzt. Die Punkt-modifikation kann in einer solchen Weise durchgefuhrt werden, da{ das Wasserzeichen gegenuber einer JPEG-Kompression und Tiefpa{filterung resistent ist. Durch die Minimierung des Energieinhaltes des Wasserzeichensignals beihoheren Frequenzen wird dies erreicht, wobei die Eigenschaften des menschlichen Gesichtssinnes berucksichtigt werden.Es werden eine Variation, die bildabhangige Wasserzeichen erzeugt, sowie eine Methode prasentiert, die geometrischeVerzerrungen behandelt. Ein Erweiterung auf Farbbilder wird auch verfolgt. Experimente mit echten Bildern bestatigendie Effizienz der vorgeschlagenen Methode. ( 1998 Elsevier Science B.V. All rights reserved.

0165-1684/98/$19.00 ( 1998 Elsevier Science B.V. All rights reserved.PII S 0 1 6 5 - 1 6 8 4 ( 9 8 ) 0 0 0 1 7 - 6

Page 2: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Resume

L’evolution rapide de la manipulation des images numeriques et des techniques de transmission a genere un besoinpressant de protection des droits de la propriete intellectuelle sur les images. Une methode de protection des droitsd’auteur, basee sur le camouflage d’un signal ‘invisible’ dans l’image, connusous le nom de filigrane numerique (digitalwatermark) est presentee dans cet article. Le placement du watermark est opere dans le domaine spatial par modificationlegere de l’intensite de pixels de l’image choisis aleatoirement. La detection du watermark ne requiert pas l’imageoriginale et elle s’opere par comparaison entre l’intensite moyenne des pixels marques et celle des pixels non marques. Untest d’hypothese statistique est utilise a cet effet. Les modifications des pixels peuvent etre faites de telle fac7 on que lewatermark soit resistant vis-a-vis de la compression JPEG et du filtrage passe-bas. Ceci est obtenu en minimisantl’energie du signal de watermark dans les hautes frequences tout en tenant compte des proprietes du systeme visuelhumain. Une variante generant des watermarks dependant de l’image ainsi qu’une methode de prise en compte desdistorsions geometriques sont egalement presentees. Une extension aux images couleur est egalement en cours dedeveloppement. Les experiences realisees sur des images reelles permettent de verifier l’efficience des techniquesproposees. ( 1998 Elsevier Science B.V. All rights reserved.

Keywords: Copyright protection; Watermarking; Steganography

1. Introduction

Digital media have revolutionized the way stillimages and image sequences are stored, manipu-lated and transmitted, giving rise to a wide range ofnew applications (digital television, digital videodisc, digital image databases, electronic publishing,etc.) that are expected to have an important impacton the electronics and entertainment industry. Oneof the main features of digital technology is the easewith which images can be accessed and duplicated.However, this feature has an important side effect;it allows for easy unauthorized reproduction ofinformation, i.e. data piracy. Due to this, protectionof intellectual property rights, i.e. copyright protec-tion of stored/transmitted digital images is a veryimportant issue. One way to help protect imagesagainst illegal recordings and retransmissions is toembed an invisible signal, called digital signature orcopyright label or watermark, that completely char-acterizes the person who applied it and, therefore,marks it as being his intellectual property. Obvi-ously, the secure and unambiguous identification ofthe legal owner of an image requires that eachindividual or organization that produces, owns ortransmits digital images (artists, broadcasting cor-porations, image database providers, etc.) usesa different, unique watermark.

Copyright protection is just one of the potentialapplications of embedding invisible data within

images or other types of signal (e.g. audio signals),a technique usually referred to as data hiding orsteganography. Other applications include authen-tication control, tamper-proofing (i.e. checkingwhether the content of an image has been altered ornot) and insertion of invisible image annotations(e.g. scene/object description). For each of theseapplications, the embedded signal should possessa different set of properties. In this paper we wouldlimit our discussion to digital watermarks servingthe purpose of copyright protection. Digital water-marks of this type should be [14]:f undeletable by an ‘attacker’;f easily and securely detectable by their owner;f perceptually and statistically invisible;f resistant to lossy compression, filtering and other

types of processing.The creation of an algorithm capable of producingwatermarks that fulfil all these contradicting re-quirements is not an easy task. A number of at-tempts to introduce copyright labelling techniquesthat comply with some or all of the above specifica-tions have been reported lately in the literature[1,3,4,6,7,9,10,12,13,15—18,21—23,25,26,29,30].However, research on copyright protection of im-ages is still in its early stages and none of theexisting methods is totally effective against attacks.The techniques proposed so far can be classified intwo broad categories: (i) methods that embed thewatermark by directly modifying the intensity of

386 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 3: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

certain pixels [1,4,22,25,15,26]. (ii) methods that actupon selected coefficients of a properly chosentransform domain (DCT domain, DFT domain,etc.) [3,7,9,13,17,18,23,30]. Watermarking tech-niques can be alternatively split into two distinctclasses depending on whether the original image isnecessary for the watermark detection or not. Al-though the existence of the original image facilit-ates to a great extent watermark detection, sucha requirement is rather difficult to be met in mostreal life applications. It would be, e.g., totally im-practical for the owner of a large image database tokeep double copies of its images for authenticationand copyright protection purposes. Furthermore,searching within the database for the original im-age that corresponds to a given watermarked imagewould be very time consuming. In this paper wepropose a watermarking technique that belongs tothe class of intensity domain techniques, i.e. it em-beds copyright information by modifying the inten-sity of a subset of the image pixels. The proposedmethod is actually an extension and continuationof the method reported by the authors in[16,21,22]. The watermark casting algorithmallows for a flexible choice of the intensity modifica-tions. This flexibility can be exploited to designwatermarks that possess desirable properties likerobustness against lossy compression and lowpassfiltering. Watermark detection is carried out byusing hypothesis testing and does not require theoriginal image. Another important feature of thealgorithm is its mathematical tractability thatallows a thorough investigation of algorithm per-formance. Furthermore, the proposed watermark-ing technique can be easily combined with noisemasking techniques to yield watermarks that areinvisible.

The basic operating principle of the proposedalgorithm presents certain similarities to the so-called Patchwork technique that has been indepen-dently developed in MIT Media Lab [1]. However,the two methods differ in the statistical approachadopted for the watermark detection. Furthermore,an extensive part of our paper is devoted to impor-tant extensions of the basic method (image depen-dent watermarks, robust watermark design bymeans of optimization techniques, handling of geo-metric distortions) that are not addressed in [1].

The proposed algorithm bears also certain similar-ities with other methods [6,9,17] developed inde-pendently at about the same time or afterwards.However, the differences between our method andthe above-mentioned techniques are rather impor-tant. For example, the algorithms proposed by Coxand Ruanaidh require the original image during thewatermark detection whereas our method does not.The outline of this paper is the following. The basicalgorithm is described in Section 2. Design ofwatermarks that are robust to filtering and com-pression is discussed in Section 3. Section 4 dealswith ways to incorporate properties of the humanvisual system in order to generate invisible water-marks. A method to handle geometrical distortionsis presented in Section 5. Image dependent water-marks are proposed in Section 6 as a means offurther robustifying the algorithm. Extension tocolor images is treated in Section 7. Experimentson real images are presented in Section 8.

2. Basic watermarking algorithm

Consider an image I of dimensions N]M:

xnm

, 0)n(N, 0)m(M. (1)

A watermark pattern S is a binary pattern of thesame size where the number of ‘ones’ equals thenumber of ‘zeros’:

snm

, 0)n(N, 0)m(M,

snm3M0,1N. (2)

Using S we can split I into two subsets of equalsize:

A"M(n,m)Dsnm"1N, (3)

B"M(n,m)Dsnm"0N, (4)

DAD"DBD"12DID"1

2N]M"P, (5)

I"AXB. (6)

The digital watermark is superimposed on the im-age as follows:

xsnm"x

nm?f

nm, (7)

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 387

Page 4: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

where ? is a superposition law (in our caseaddition), xs

nmare the pixels of the watermarked

image Is and fnm

is the two-dimensional watermarksignal:

fnm"G

k, snm"1,

0, snm"0,

(8)

k being a positive integer that will be called embed-ding factor. Let us denote by aN , bM , and s

a, s

bthe

sample mean values and the sample standard devi-ations of the pixels belonging to the subsets A, B ofthe original image and by cN , s

cthe sample mean

value and the sample standard deviation of thepixels belonging to the subset A of the watermar-ked image. For example:

aN "1

P+

n,m|A

xnm

, (9)

s2a"

1

P!1+

n,m|A

(xnm!aN )2. (10)

Watermark detection is based on the examina-tion of the difference wN of the mean values cN , bM :

wN "cN!bM . (11)

If the pixels of the subsets A, B are intermixed andthe image has been watermarked then wN is close tok whereas in the case of an image that is notwatermarked or an image bearing a watermarkdifferent from the one that we are looking for, wN isapproximately zero. In other words, wN is a randomvariable whose mean is zero for an image thatbears no watermark and k for an image that hasbeen watermarked. The decision on whether theimage is watermarked or not is taken using hypoth-esis testing. The test statistic q that has been usedis based on the central limit theorem and is givenby [20]

q"wNpLwN, (12)

where pL 2wN

is an estimator of the variance of wN :

pL 2wN"

s2c#s2

bP

. (13)

The Null and the Alternative Hypotheses in thiscase are

H0: There is no watermark in the image.

H1: There is a watermark in the image.

Since the number of samples in the test (i.e. thenumber of pixels P) is sufficiently large (e.g. for animage as small as 16]16 pixels, the value of P is128) the test statistic q follows under the null hy-pothesis a zero mean, unit variance normal distri-bution. Under the alternative hypothesis, q followsa normal distribution having unit variance andmean equal to k/p

wN. Therefore, the exact calcu-

lation of the mean value for q in this case requiresknowledge of p

wN. However, for a large number of

samples, as in our case the estimate pLwN

gives a verygood estimate of p

wN.

In order to decide whether the image is water-marked or not, the value of q is tested againsta threshold ¹. If q'¹ we assume that the image iswatermarked, otherwise we conclude that the im-age bears no watermark. The possible detectionerrors are the following:

Type I Error: Accept the existence of a watermark,although there is none.

Type II Error: Reject the existence of a watermark,although there is one.

In hypothesis testing the probability of type I erroris denoted by a whereas the probability of type IIerror is denoted by b.

The threshold ¹ that results in equal probabilit-ies for errors of type I and type II is given by

¹"

k

2pLwN. (14)

In this case the Type I Error is the shaded region ofFig. 1a and the Type II Error, appears in Fig. 1b.The requirement that errors of type I and II shouldhave equal probabilities of occurrence (a"b) isjustified by the fact that both these errors are of thesame importance when watermarks are used forcopyright protection. Alternatively one can choose

388 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 5: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Fig. 1. Type I and Type II detection errors.

not equal probabilities for those two errors simplyby selecting a threshold ¹ that is not given byEq. (14). Of course, if one chooses to obtain a smallprobability of type I error this will automaticallylead to an increase of the probability of the type IIerror and vice versa. For a certain k and a threshold¹ given by Eq. (14) the probability (1!b) of cor-rect watermark detection in a watermarked image(certainty) would be equal to N(¹,0,1) whereN(x,k,p2) denotes the value at point x of the cumu-lative density function (cdf) of a normally distrib-uted random variable with mean value k andvariance p2. Inversely, in order to generate a water-mark that would be detectable with probability1!b the threshold ¹ should be chosen so that

1!b"N(¹,0,1). (15)

Therefore, ¹ should be equal to the z1~b percentile

of the normal distribution. This implies that theembedding factor k that should be used in this caseis given by the equation:

k"v2pLwNz1~bw . (16)

The ceiling operator in the previous equation isused because k is an integer constant (intensityvalue). Due to this ceiling operator, the actualprobability of correct detection is bigger than

1!b. In conclusion, the proposed algorithm canbe summarized as follows:

¼atermark casting: Generate S and calculate pLwN.

Decide for the desired probability of correct detec-tion 1!b, calculate the appropriate embeddingfactor k using Eq. (16) and cast the watermarkusing Eq. (7).

¼atermark detection: Generate S. Evaluate qusing Eqs. (11) to (13) and compare it against¹"z

1~b to decide for the watermark existence.A watermark pattern S where A, B are suffi-

ciently intermixed can be generated by assigning toeach pixel the rounded output of a random numbergenerator that produces samples in the range[0,2,1]. The seed that is used to initialize therandom generator completely characterizes thewatermark pattern S, i.e., it suffices to know thisseed to recreate the watermark pattern. This num-ber will be called in the sequel watermark key. Inorder to be effective for copyright protection, thewatermark key should be known only to the water-mark owner.

At this point we should mention that Eq. (16)gives actually a lower limit for k in the sense thatboth the probability 1!b of correct detection ina watermarked image and the probability a oferroneous detection in an image that bears no

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 389

Page 6: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

watermark are achieved only if the image has notbeen distorted. For a distorted image, both prob-abilities differ from the values that were used duringthe watermark casting phase. In such cases biggerembedding factors are required. Such an increase isessentially an increase on the energy of the water-mark signal. However, this presents no difficultiesbecause for relatively big images Eq. (16) givesa very small bound since, as the image size in-creases, the variance pL 2

wNof Eq. (13) of the estimator

wN decreases and, therefore, the embedding factork that is required for a specific certainty becomessmaller. The final decision on the embedding factorvalue should be taken after experimentally check-ing the watermark against possible distortions.This can be done by distorting K watermarkedcopies of a certain image and evaluating the per-centage of correctly detected watermarks (probabil-ity of correct detection). Before increasing theembedding factor we should also take into consid-eration that a watermark severely distorting thecorresponding image is of no practical use.

The watermarking algorithm described abovecan generate a great number of different water-marks, all distinguishable from each other, even forsmall size images. For an image of size N]M"2Pthe number of all possible watermarks that can begenerated equals the number of ways we can selectP items out of 2P items. As a result, the number ofpossible watermarks N

sis given by:

Ns"A

2P

P B"(2P)!

(P!)2K

22P

JnP(17)

by using the Stirling formula. For example, animage of size 32]32 (P"512) can host as many as4.48]10306 different watermarks. Of course onemight argue that two very similar watermark pat-terns can not be distinguishable under the pre-viously mentioned detection algorithm, due todomain overlapping. It can be proven that theincrease in the probability of error a of type I due tothe existence of a watermark different than the onethat we are trying to detect is limited by the follow-ing expression:

a@!a(N(z1~b, 0, 1)!NA

z1~b

S1#2z2

1~bP

, 0, 1B, (18)

where the error probabilities a and a@ denotethe probability of declaring that a watermarkis present when actually no watermark is presentand the probability of declaring that the samewatermark is present when a different watermarkhas been applied. The proof can be found in Appen-dix A.

This increase is extremely small for typical valuesof image size and desired probability of correctdetection 1!b. For example, for an image of di-mensions 128]128 (P"8192) and for probabilityof correct detection 1!b equal to 98%(z

1~b"2.0538) the increase is smaller than0.0051%. For more typical values i.e. P"32768(image size: 256]256) and 1!b"99.99%(z

1~b"4) the increase is smaller than 0.000026%.

3. Immunity to subsampling

An important issue that should be examinedabout the proposed watermarks is their immunityto subsampling. Only the case of mean value sub-sampling is considered here. In this case, if theoriginal image I was of size N]M, the subsampledimage I

46"is (N/2)](M/2) pixels large, and the

intensity levels x@nm

of its pixels are given by

x@nm

"

1

4(x

2n,2m#x

2n`1,2m#x

2n,2m`1#x

2n`1,2m`1),

0)n(N/2, 0)m(M/2. (19)

In order to apply the detection algorithm onI46"

, we generate a subsampled version S@ of theN]M watermark pattern S using the followingmethod:

Let s1,s2,s3,s43S denote the 4 neighboring pixels

to be subsampled and let u"s1#s

2#s

3#s

4be

their sum. The sample s, which will substitutes1,s2,s3,s4

has the following form:1. If u"0 or u"1 then s"0;2. If u"3 or u"4 then s"1;3. If u"2 then s"0 or s"1 with equal probabil-

ities.It is obvious that the subsampled watermark pat-tern S@ contains P@ pixels of value 1 and P@ pixels of

390 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 7: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

value 0, where

P@"1

2AN

2]

M

2 B. (20)

It can be proved that when calculating the differ-ence wN @ for the subsampled image we shall have:

cN @"aN @#1

8k#

4

8

3k

4#

3

8

k

2"aN @#

11

16k, (21)

bM @@"bM @#4

8

k

4#

3

8

k

2"bM @#

5

16k, (22)

wN @"cN @!bM @@"aN @!bM @#3

8k. (23)

The proof can be found in Appendix B. We use aN @and bM @ because they are not really the original aN andbM , since there was an intermixing due to subsamp-ling. Obviously pL

wN {is different from pL

wN(i.e. the

corresponding quantity in the original image). If weassume that s2

c"s2

c{and s2

b"s2

b{{then

pL 2wN {"

s2c{#s2

b{{P@

"4pL 2wN. (24)

The distribution of the test statistic q@"wN @/pLwN {

un-der the null hypothesis is N(q@,0,1) whereas, underthe alternative hypothesis the distribution of q@ isN(q@,3@8k

2pL wN ,1).Therefore, if we want the probability of correct

detection for the subsampled image to be (1!b@)we should use k@ given by

k@"v163) 2pL

wNz1~b{w . (25)

In this case, the probability of correct detection forthe original image is

1!b"N(k@/2pLwL {

0,1). (26)

Better approaches can be introduced by not tak-ing under consideration, for example, the blocksthat impose the highest ambiguity, i.e. those havingtwo signed pixels. However, such an approach re-duces the amount of pixels used for parameterestimation.

4. Robust watermark design

Unfortunately the method outlined in Section 2is not robust to compression using the well-estab-

lished JPEG standard which achieves efficient im-age compression by combining the Discrete CosineTransform (DCT) with appropriate DCT coeffic-ient quantization schemes. This is due to the factthat the watermark signal f

nm(8) is essentially low-

power, white noise. As a consequence, it is heavilydistorted by JPEG. Furthermore, the watermarkscan be easily deleted by other operations such asmean or median filtering. In the following we pro-pose variations of the basic watermarking algo-rithm that provide immunity against lowpassoperations such as lossy compression and filteringby reducing the energy content of the watermarksignal in high frequencies. Other approaches to thesame problem (placing the watermark informationin the low-middle DCT frequencies) have been pro-posed in a number of other papers about water-marking [6,7,17,18].

The first way to achieve robustness against com-pression is by using watermarks where the markedpixels, i.e. the pixels in A, form blocks of a certainsize b

1]b

2, e.g. 2]2 or 2]4. In practice, such

a grouping of pixels can be implemented by select-ing P/(b

1) b

2) randomly positioned blocks of size

b1]b

2. It is obvious that the only difference be-

tween this variation and the basic technique de-scribed in Section 2 lies in the methodology used toselect the pixels that belong to subset A. For bothtechniques the total number of pixels in A equals P.However, the energy of the new watermark signal isconcentrated in the low frequencies and thus thewatermark can endure much higher JPEG com-pression. The bigger the block size, the more robustto compression the watermark becomes. However,grouping the pixels in blocks along with the factthat the intensities of neighboring pixels exhibita high degree of correlation leads to correlatedsamples. Thus, the statistical test described in Sec-tion 2, which is based on the assumption that sam-ples are independent leads to erroneous results. Inorder to overcome this problem we evaluate pL

wN,

wN using an image of lower resolution which weconstruct by substituting the pixels in each b

1]b

2block with a pixel whose intensity is the meanintensity of all the pixels in the block. If the dimen-sions of the initial image are N]M, the dimensionsof the new image would be (N/b

1)](M/b

2) and

P@"P/(b1]b

2). Therefore, pL

wNgiven by Eq. (13)

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 391

Page 8: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

would be bigger than that of the original image.This means that the watermarks that are designedusing this variation require a bigger value of k inorder to have the same certainty with the water-marks produced by the basic technique.

The second method for designing robust water-marks exploits the fact that the decision for theexistence of the watermark is based on the exam-ination of the difference wN of the mean values cN ,bM .Therefore, the detection algorithm will give thesame results if, instead of modifying the intensity ofall pixels in A by the same constant k, we usea different value k

nmfor each pixel in A, provided

that the sum of all knm

is equal to Pk:

++n,m|A

knm"Pk. (27)

This versatility in the choice of knm

enables us todesign watermarks that are of low energy contentin the higher DCT frequencies. The approach usedto design such a signal is the following. First, thewatermark pattern S is generated and an appropri-ate embedding factor k is chosen. The watermarksignal f

nmis then divided into blocks of size 8]8 in

the same way as in the DCT algorithm and theoptimum values k

nmare separately calculated for

each block. Suppose that within a certain blockD f D

nm, kD

mn(n,m"0,2,7), denote the watermark

signal in the spatial domain and FDuv

(u,v"0,2,7)the watermark signal in the DCT domain. FD

uvis

given by [27]

FDuv"

1

4C(u)C(v)

]C+7n/0

+7m/0

f Dnm

cos(2n#1)up

16cos

(2m#1)vp

16 D,(28)

where C(u) are appropriate scale coefficients. Sup-pose also that r denotes the number of pixels ofblock D that belong to the subset A. Although thetotal number of image pixels that belong to A is(N]M)/2, the number of pixels within a certainblock that belong to A is not exactly (8]8)/2 butmay vary, i.e. r is a random variable with meanequal to 32. The design of a low frequency water-

mark signal can be achieved by minimizing thefollowing energy function with respect to kD

nm:

U"++u,v|H

(FDuv)2, (29)

where H is some user-selected set of higher frequen-cies, e.g.:

H"Mu,v D 4(u)7 or 4(v)7N. (30)

Better results can be expected if the DCT coeffi-cients are ordered in a zig-zag fashion and H ischosen to include a certain number R of the higherrank coefficients:

H"Mu,v D f (u,v)'64!RN, (31)

where f(u,v) is the function that gives the rank of the(u,v) zig-zag ordered coefficient:

f(u,v)"(u#v)(u#v#1)#u. (32)

The choice of DCT coefficients where the energyminimization will take place depends on theamount of compression that the image is expectedto undergo. As the expected compression increases,H should be chosen so as to contain more mid-highrange coefficients, i.e., a bigger R should be used inEq. (31). However, a direct relation between JPEGcompression and the appropriate choice of coeffi-cients in H is very difficult to be established due tothe complex nature of JPEG.

Minimization of U should take into account thefollowing constraints:

1. kDnm

should be chosen so that Eq. (27) holds forthe entire image. This can be achieved by enforc-ing the following constraint within the block D:

7+n/0

7+

m/0

f Dnm"rk; (33)

2. kDnm

should lie within a certain range so that thewatermark remains perceptually unnoticeable:

k.*/)kDnm)k.!9. (34)

For example if k"3 then a suitable choice fork.*/,k.!9 could be 0,6, respectively.

392 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 9: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Fig. 2. The watermark signal within an 8]8 block when a con-stant value k"3 is used.

Fig. 3. The same signal when the signal is optimized for lowenergy content in the higher frequencies.

As can be seen from Eqs. (28) and (29), U is quad-ratic in kD

nm. Therefore, finding the values of k

mnthat

minimize Eq. (29) under the previous constraints isa quadratic minimization problem that has beensolved using quadratic programming techniques[24,28]. The minimum value U

.*/achieved for the

objective function depends on the limits (34). Thesmaller the changes we allow to kD

nmthe more diffi-

cult it is to achieve a satisfactory minimum for U. Itshould also be noted, that the optimization proced-ure is image independent and needs to be per-formed only once for a specific watermark. The twomethods proposed in this section can be easilycombined to achieve robustness to even biggercompression ratios.

The watermarks produced using the optimiza-tion technique consist of smooth geometricalshapes instead of impulses. The effect of this algo-rithm on the watermark signal is illustrated inFigs. 2 and 3. Fig. 2 shows the watermark signalwithin a 8]8 block when a constant value of k"3is used and the watermark pixels are chosen so as toform 2]2 blocks. The number of marked pixels inthe 8]8 block for this particular case is r"28. Theoptimized watermark using the proposed algo-rithm with k.*/"0, k.!9"6 and H given byEq. (30) can be seen in Fig. 3. The new watermark‘fades’ smoothly to zero and, therefore, its energycontent in the higher DCT frequencies is limited.

Note that although some of the watermark pixelshave been set to zero the sum of the watermarksignal values is the same with that of the signal inFig. 2.

A slightly different approach to the watermarkcasting methodology is the following. Instead ofusing a watermark signal f

nmgiven by Eq. (8) (i.e.

a watermark constructed by increasing the inten-sity of all pixels in A by a suitable quantity k

nmand

leaving the intensity of the pixels in B unchanged)we can use a watermark signal that is nonzero in allimage pixels, provided that it satisfies the followingconstraint:

++n,m|A

fnm!++

n,m|B

fnm"Pk. (35)

It is obvious that the watermark in Eq. (27) isa special case of Eq. (35) for f

nm"0, n,m3B. By

using Eq. (35) instead of Eq. (27) we loosen theconstraints that we impose on the watermark signaland therefore we can reach a better solution (asmaller U

.*/) during the optimization. However,

a watermark designed to satisfy Eq. (35) affects theintensity of all image pixels and therefore causesmore prominent distortions than a watermark thatcomplies to Eq. (27).

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 393

Page 10: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

5. Invisible watermarking using propertiesof the human visual system

Since watermarks are essentially additive noisesuperimposed on the image, they should be invis-ible so as not to affect the image quality to a greatextent. Another important motivation for generat-ing invisible watermarks is the fact that such water-marks would be difficult to be detected (anddestroyed) by visual inspection. From this point ofview, watermarking exhibits significant resem-blance to lossy image compression [18], an ap-plication where invisible distortions are also highlydesirable. During the last few years, a considerableamount of research in the field of image compres-sion is directed towards algorithms that are tryingto exploit the properties of the human visual system(HVS) [11] in order to achieve compression distor-tions that are totally invisible or just noticeable.A fundamental principle in such techniques is thatof noise masking or distortion masking which refersto the decrease in the perceived intensity of a visualstimulus when this is superimposed over anotherstimulus. This phenomenon has been extensivelystudied and modelled through psychovisual tests.Noise masking has been incorporated in a couple ofwatermarking schemes in order to achieve invisiblewatermarks. In this paper we have tried to achievenoise masking by using Just Noticeable Distortion(JND) [11] which refers to the biggest possibleinvisible distortion that can be made on the signal.The evaluation of JND for a certain image is equiv-alent to the evaluation of a distortion map jnd(m,n),called JND profile. Each element of the JND pro-file gives the absolute value of the biggest invisibledistortion that we can cause on the correspondingimage pixel. The JND profile of an image can bereadily incorporated in the robust watermark de-sign algorithm described in Section 4 to help spec-ify in an optimal way the limits (34) that we imposeon k

nm. In other words, instead of using the same

limits k.*/,k.!9 for all image pixels, one can use thecorresponding value of the JND profile for thispurpose.

!jnd(m,n)(kmn(jnd(m,n). (36)

We have experimented with two different JNDevaluation methods that have been proposed in

[5,8]. Unfortunately, both JND evaluationmethods did not give satisfactory results (i.e. thepredicted invisible distortions were rather notice-able). The cause of this failure lies in the fact thatboth these models depend on a number of para-meters (image—observer distance, backgroundluminance, etc.) whose fine-tuning requires exten-sive experimentation thus making their successfulapplication rather difficult. We are currently ex-perimenting with other JND models.

Noise masking properties have been studied notonly for the intensity domain but also in otherimage representation domains, e.g., in the DCTdomain. The JPEG quantization table Q [2] i.e.,the matrix whose element Q

uvrepresents the quant-

ization step for the Fuv

DCT coefficient, is based onsuch psychovisual experiments. The degree of com-pression (and consequently the quality of the com-pressed image) obtained by the JPEG algorithmcan be controlled by multiplying the elements ofQ by a scaling factor g that is usually called qualityfactor. A quality factor equal to 0.5 producesa compressed image that is almost indistinguish-able from the original image, whereas, for biggervalues of g, distortions become gradually visible.The distortion e

uv"*F

uvcaused on the coefficient

Fuv, when this coefficient is uniformly quantized by

a quality factor g, lies in the range:

!

gQuv

2(e

uv(

gQuv

2. (37)

The fact that Quv

were selected by psychovisualexperiments ensures that, if the distortions e

uvon

the DCT coefficients of an image lie within thelimits (37), then the image distortion is in principleless visible than any other distortion of the samepower.

Let us now denote by Fuv, FI

uvthe DCT coeffi-

cients of the watermarked and the original image,respectively, and by FW

uvthe DCT coefficients of the

watermark signal. Taking into account the linearnature of the DCT transform and Eq. (7), we caneasily deduce the following relation:

Fuv"FI

uv#FW

uv. (38)

Eq. (38) can be rewritten as follows:

*FIuv"F

uv!FI

uv"FW

uv. (39)

394 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 11: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Eq. (39) states that the distortion caused on a DCTcoefficient of an image by watermarking is equal tothe corresponding DCT coefficient of the water-mark signal. Therefore, according to the precedingdiscussion, if we restrict the DCT coefficients of thewatermark signal within limits of the form:

!

gQuv

2(FW

uv(

gQuv

2(40)

the distortions *FIuv

that are caused by the water-mark on the image would be, in general, less visiblethan any other distortion of the same power. In-equality (40) can be used instead of Eq. (34) in thewatermark optimization procedure described inSection 4. Alternatively one can use both Eqs. (40)and (34) in the optimization procedure. By doingso, better results (i.e. less visible watermarks) can beexpected because the ad hoc limits k.*/, k.!9 arereplaced by limits that have been selected usingpsychovisual criteria. Using a single quantizationtable for all images and all blocks within an imageis not the optimal solution. However, it is a practi-cal solution that usually leads to satisfactory re-sults. It should be noted here that constraints of theform (40) cannot be imposed on the DC coefficientof the watermark, i.e. on the coefficient FW

00, whose

value, according to Eqs. (27) and (28), is fixed andequal to Pk/8.

The elements of the quantization matrix can bealso exploited to introduce weights on the terms ofthe objective function U (29). Such weights shouldreflect the fact that the minimization of the energyaccumulated on higher order DCT coefficients(which are more severely distorted from the JPEGalgorithm) is more important than the minimiz-ation of the energy of the lower rank coefficients.Therefore, Q

uvwhich denote the quantization step

for the corresponding coefficient can be used toform a weighted objective function U

8of the fol-

lowing type:

U8"++

u,v|H

(QuvFDuv

)2. (41)

6. Handling geometrical distortions

A weak point of the watermarking methods de-scribed in the previous sections is that the pixels

that form the subset A are specified only in terms oftheir spatial location and therefore, any geometri-cal distortion (e.g. line removal) can ‘fool’ the detec-tion algorithm. However, this type of distortion canbe treated using a correlation-based preprocessingmodule. The output of this module is an index d(n)that gives the translation that line n has undergone.d(n) can be fed into the detection algorithm tocorrect the distortions before proceeding to theevaluation of the statistic q. The procedure that weused was the following. We construct the signal ofhorizontal differences *x4

nmfor the distorted, water-

marked image in the following way:

*x4nm"x4

nm!x4

nm~1"*x

nm#( f

nm!f

nm~1),

0)n(N, 0(m(M. (42)

Since neighboring pixels are usually highly corre-lated, *x

nmis a low energy, noise-like, zero mean

signal. We construct also the signal *fnm

of horizon-tal differences for the watermark signal:

*fnm"f

nm!f

nm~1,

0)n(N, 0(m(M. (43)

Then, for each image line n, we evaluate the correla-tion C

nlof *x4

nmwith a certain number of lines of

*fnm

in the neighborhood of n:

Cnl"+

m

*fn`lm

*x4nm

, !¸(l(¸. (44)

The correct location of line n is then pronounced tobe n#d(n) where d(n)"arg max

lMC

nlN. A similar

procedure can be used to find the correct positionof image columns in an image where some of itscolumns have been removed, or to find the exactposition of a cropped image within the originalimage. In all these cases, distortion detection iscarried out using the distorted watermarked imageand the watermark signal (which is of courseknown), i.e., without using the original watermar-ked image. It should be noted here that erroneousestimates of d(n) for a line n or a set of lines, do notaffect watermark detection on the rest of the lines,i.e. the lines whose translation has been correctlyestimated. This implies that even with a certainnumber of errors the detection algorithm should

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 395

Page 12: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

reach the correct decision. Of course each erron-eously estimated line translation d(n) decreases theprobability that the detection algorithm will suc-ceed in correctly deciding upon the presence orabsence of a watermark.

7. Image dependent watermarks

Using a single watermark on all images of equalsize whose copyright is owned by the same indi-vidual is very convenient in terms of implementa-tion simplicity and speed. However, such a practiceis not a safe one. If, for example, someone canmanage to obtain both the original and the water-marked version of the same image, he can easilyrecover the watermark signal by performinga simple subtraction of the two images and theneliminate the watermark from all images in which itexists. Another way to recover and subsequentlydestroy a watermark embedded in a set of images isthe following. Let us suppose that a set of K imagesu1mn

,2,uKmn

have been marked with the same water-mark f

mnand a certain embedding factor k to pro-

duce the watermarked images v1mn

,2,vKmn

. Wesubtract the mean value from each watermarkedimage and average the zero mean images to obtainvNmn

vNmn"

1

K

K+i/1

(vimn!m@

i), (45)

or equivalently

vNmn"f

mn!

k

2K#

1

K+K

i/1(ui

mn!m

i), (46)

where m@i,m

iare the mean intensities of v

mn, u

mn,

respectively, which are related by the followingformula:

m@i"m

i#k/2. (47)

By averaging a large number of images the sum inthe right-hand side of Eq. (46) would tend to zeroand thus vN

mnwould give a noisy version of the

watermark signal that can be used to eliminate thewatermark from all images where it exists.

In order to robustify the watermarking techniqueagainst this type of attack we have devised a vari-

ation of the basic method that generates imagedependent watermarks, i.e. a technique that, for thesame watermark key, leads to different watermarkpatterns when applied on different images. This isachieved using the following methodology: First,we construct the watermark pattern S. Then wesplit the pixels in A in two subsets A

c,A

mcontaining

hP and (1!h)P pixels respectively (0)h)1). Thepixels of the subset A

cform the fixed part of the

watermark pattern. The position of these pixelsdoes not change when the watermark is applied ondifferent images. On the other hand, the spatiallocation of the pixels that form the subset A

mcha-

nges when the watermark is applied on differentimages. Each pixel in A

mis translated (*n,*m)

pixels away from its original position. The actualvalue of this translation (*n,*m) depends on theintensity value of some other pixel that belongs toA

c. The whole procedure of moving a pixel that

belongs to Am

into a new position should be insen-sitive to image distortions. Otherwise, the detectionalgorithm would not be able to calculate the posi-tions of these pixels. In our case we used the follow-ing procedure. We split the intensity range[02255] into C intervals G

1,2,G

Cand assign to

each interval Gi

a different translation vector(*n

i,*m

i). Then for each pixel in A

cwe find the

corresponding interval Gi

and translate one ormore of the pixels in A

mby (*n

i,*m

i). The proced-

ure of determining (*ni,*m

i) is robust to distortions

since even if the image is distorted by compression,filtering etc., the intensity interval of a pixel is notlikely to change, especially if the intensity range hasbeen coarsely quantized, i.e. if C is small (e.g. C"4or C"6). Intervals G

iare selected so that each of

them includes the same number of pixels. Thisensures that equal numbers of each translation willbe performed and, therefore, the distribution of themarked pixels on the image will continue to berandom. Such a segmentation can be done by split-ting the intensity range so that the area under theimage histogram curve is the same for all intervals.For the algorithm implemented in this paper weselected h"1/3 of the pixels in A to be of fixedposition, i.e. pixels that belong to A

c. Also, the

intensity range was split into C"4 intervals in theway described above. The intensity of each pixel(m,n) in A

ccontrolled the movements of two pixels

396 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 13: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

(m@, n@), (m@@, n@@) of Am

because the number of pixelsin A

mis twice the number of pixels in A

c:

DAmD"2

3DAD"2DA

cD. (48)

The selection of the pixels (m@,n@), (m@@,n@@) whosetranslation depends on the intensity of (m,n) wasdone through appropriate coordinate mappingfunctions f

1(m), g

1(n), f

2(m), g

2(n) in a way that

ensured that all pixels in Am

are visited. A simplemethod to do this mapping is to split the pixels inA in triplets (A

1,B

1,C

1),(A

2,B

2,C

2),2 and use

pixel Aito control the translation of pixels B

i,C

i.

A similar procedure is followed during the detec-tion phase. S is generated, the pixels in A

cas well as

the C intervals of the intensity range are beingselected and then the positions of pixels in A

mare

evaluated. When the determination of the pixelsthat belong to A has been completed, we proceed tothe watermark detection as described in Section 2.It is obvious that the image dependent watermarkdesign method can be easily combined with therobust watermark design methods proposed in theprevious sections.

The above procedure is also robust to histogramequalization, logarithmic grayscale transform andin general all grayscale transforms that are donethrough an increasing function. The proof can befound in Appendix C.

8. Watermarks for color images

The watermarking techniques presented in theprevious sections can be easily extended to handlecolor images. In this case, watermark casting isdone by generating three different watermark pat-terns S

R,S

G,S

B, one for each RGB channel, and

modifying, for each channel, the intensity of thepixels that belong to the corresponding setsA

R,A

G,A

B. The watermark casting and detection

procedures for color images are exactly the same asfor the corresponding procedures for grayscale im-ages. Sets A, B are now considered to be the unionof the sets A

R,A

G,A

Band B

R,B

G,B

B, respectively.

Therefore, in a color image, the number of samplesP that are used in the evaluation of the test statisticq is three times the number of samples in a gray-scale image of the same size. This implies that the

variance pLwN

of wN will be smaller and so the embed-ding factor k that is required for a specific probabil-ity of correct detection 1!b (without consideringimage distortions) is smaller than the one that weshould use to obtain the same certainty in a gray-scale image of the same dimensions. However, if wewant to generate watermarks that are robust toimage distortions this value might be too small toensure the desired distortion immunity level. Insuch cases we should proceed to an experimentalevaluation of the appropriate k value, as describedin Section 4.

Instead of marking the three R, G, B componentsone can choose to mark the luminance and thechrominance components of the image. The water-mark casting and detection methodology is exactlythe same.

9. Experimental results

The resistance of the proposed watermarkingalgorithms to various distortions was studied ina series of experiments on grayscale images. Thefirst set of experiments dealt with the resistance ofthe various techniques to JPEG compression. As itwas mentioned in Section 4, when an image is sub-ject to a certain distortion (in our case compres-sion), both the probability 1!b of correctdetection in a watermarked image and the prob-ability a of erroneous watermark detection in animage that bears no watermark change. The newvalues for 1!b and a cannot be theoreticallyevaluated. Therefore, we resort to the followingexperimental evaluation procedure. We createK copies of an image, each marked with a differentwatermark, i.e. a watermark generated by a differ-ent watermark key. Then, we compress the water-marked images using the JPEG algorithm anda certain quality factor g and we try to detect theK watermarks. The percentage of the successfullydetected watermarks expresses the probability ofcorrect detection for this compression. By repeatingthe above experiment for a range of different qual-ity factors we can generate plots that depict thechange of certainty 1!b with respect to compres-sion. Three such plots for three different water-marking techniques can be seen in Fig. 4.

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 397

Page 14: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Fig. 4. Plots of probability of correct detection 1!b versus thecompression ratio for the three watermarking techniques pre-sented in Section 9.

Fig. 5. Test image.

Fig. 6. Test image watermarked with technique (1) described inSection 9.

The watermarking techniques that were com-pared were the following:1. The basic algorithm described in Section 2.2. The first technique described in Section 4 with

a block size of 2]4.3. A combination of the technique (2) with the

technique for the generation of optimal water-marks described in Section 4. The objectivefunction in this specific implementation was thatof Eq. (41) whereas the coefficients in the setH were the 43 zig-zag ordered coefficients of thehigher rank (R"43 in Eq. (31)). A combina-tion of constraints (34) (k.*/"0, k.!9"4) and(40) (g"1.5) was used in the optimizationprocedure.

The embedding factor used in all three methodswas chosen so that the SNR for the watermarkedimages was 35db. The probability of correct detec-tion (no distortions considered) for the above em-bedding factor was practically 100% (100% fortechnique (1) and 99.99% for techniques (2) and (3)).In all three techniques we have incorporated theimage dependent watermarking method presentedin Section 7. The original test image is presented inFig. 5. The test image (dimensions 960]960 pixels)watermarked by the techniques (1)—(3) describedabove can be seen in Figs. 6—8. The watermarksignal is almost invisible.

Fig. 4 suggests that the basic watermarking tech-nique generates watermarks that are extremelyvulnerable to compression. On the other hand,techniques (2) and (3) exhibit a highly satisfactory

398 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 15: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Fig. 7. Test image watermarked with technique (2) described inSection 9.

Fig. 8. Test image watermarked with technique (3) described inSection 9.

Table 1Probability of correct detection for the watermarks generatedusing the techniques (1)—(3) presented in Section 9 when thewatermarked images have been filtered by 3]3 mean and me-dian filters

Method 3]3 median 3]3 mean

(1) 0 0(2) 97 92(3) 100 99

robustness against JPEG-caused distortions. Forinstance, watermarks generated by technique (3)are detected with a certainty of 100% even whenthe image is compressed down to 1 : 23. In contrast

to what happens to the probability of correct detec-tion 1!b, the probability a of erroneous detectionof an image that is not watermarked is not affectedby the JPEG compression, i.e. it remains practicallyzero.

In the second set of experiments we tested therobustness of the proposed watermarking tech-niques against 3]3 mean and median filtering. Theprobability of correct detection for the three tech-niques was experimentally calculated by filtering100 watermarked copies of the test image andevaluating the percentage of correctly detectedwatermarks. Results can be seen in Table 1 . Therobustness of techniques (2) and (3) to both opera-tions is very satisfactory. As expected, the water-mark optimization method (technique (3)) gave thebest results.

The effectiveness of the correlation-based mod-ule described in Section 6 was tested in the third setof experiments. 100 copies of the test image werewatermarked using the technique (2) and then threelines were removed from each image. The detectionalgorithm preceded by the correlation-based mod-ule succeeded in detecting the watermark in alldistorted images thus indicating that the proposedtechnique can successfully handle geometricallydistorted images.

In the last experiment we tested the resistance ofthe proposed techniques to noise. For this purposewe generated 100 copies of the test image, water-marked them by method (2) and then added zeromean Gaussian noise having standard deviationp"15. A sample noisy image can be seen in Fig. 9.The percentage of successfully detected watermarkson the noisy images was 99%, a strong indicationthat the proposed watermarking techniques areextremely robust to noise.

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 399

Page 16: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

Fig. 9. Test image watermarked and distorted by Gaussiannoise of standard deviation p"15.

10. Conclusions

A new method for the copyright protection ofimages using digital watermarks has been proposedin this paper. The proposed method produceswatermarks that are not detectable by visual in-spection but at the same time are robust to JPEGcompression and lowpass filtering. Variations thatproduce watermarks that are immune to geometrictransformations and also image-dependent werealso presented. An extension to color images wasalso presented.

Appendix A.

Let us consider the case when two watermarkshave X out of P pixels in common (partial overlap).When we try to detect one of these watermarks,while this image was watermarked by using theother, we will get the following:

cN @"aN #X

Pk, (A.1)

bM @"bM #A1!X

PBk, (A.2)

wN @"cN @!bM @"(aN !bM )#A2X

P!1Bk. (A.3)

In order to have a wrong answer, the followinginequality must hold:

(aN !bM )#(2XP!1)k

pLwN {

'z1~b, (A.4)

where pLwN {

is given by

pL 2wN {"

s2c{#s2

b{P

. (A.5)

Therefore, the probability of a wrong answer isgiven by

Prob(p#h'z1~b), (A.6)

where p and h are given by the following equations:

p"aN !bMpLwN {

, (A.7)

h"(2X

P!1) k

pLwN {

. (A.8)

In order to proceed, we shall assume that pLwN {"p

wN {which is a reasonable assumption since the numberP of samples is usually very large. Under the pre-vious assumption p and h are independent randomvariables and thus the density function of their sumis given by the convolution of their density func-tions [19]. p can be rewritten as follows:

p"(aN !bM )

pwN

)pwN

pwN {

"qpwN

pwN {

, (A.9)

where q is the test statistic we would get if weexamined the clear image. Since the cumulativedensity function of q is given by N(q,0,1) the cumu-lative density function of p is N(p,0,p2

wN/p2

wN {).

We shall now try to find the distribution of h.The first watermark divides the set of image pixelsinto two equally sized subsets, namely subsetA with P pixels having s

nm"1 and subset B with

P pixels as well, having snm"0. The probability

400 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 17: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

that the second watermark will have exactlyX pixels in A and P!X pixels in B is given by

AP

XBAP

P!XBA2P

P B"

AP

XB2

A2P

P B. (A.10)

X follows a hypergeometric distribution with meanvalue P/2 and variance P2/(8P!4). A good ap-proximation of the distribution of X can beachieved through a normal distributionN(X,P/2,P/8) having mean value P/2 and varianceP/8. As a result, according to Eq. (A.8), the cumu-lative density function of h is N(h,0,k2/2PpL 2

wN {), or,

due to the assumption about pLwN {

, N(h,0,k2/2Pp2wN {

).The convolution of two normal distributions is

also a normal distribution, having mean value thesum of means and variance the sum of variances[20]. Therefore, if we denote:

t"p#h (A.11)

it follows that the distribution of t isN(t,0,p2

wN

p2wN{# k2

2Pp2wN{). Using Eq. (16) the variance p2

tof

the random variable t can be rewritten as follows:

p2t"

p2wN

p2wN {

#

k2

2Pp2wN {

,

"

p2wN

p2wN {

#

p2wN

p2wN {

2z21~bP

. (A.12)

Since the watermark signal has the nature of addi-tive noise, the overall variance of the image isincreased, which means that p

wN(p

wN {. Therefore,

p2t(1#

2z21~bP

. (A.13)

The error probabilities a and a@ are given by thefollowing expressions:

a"1!N(z1~b,0,1), (A.14)

a@"1!N(z1~b,0,p2

t). (A.15)

Therefore, the increase in the probability of errora of type (I) due to the existence of a watermark

different from the one that we are trying to detect isgiven by

a@!a "N(z1~b,0,1)!N(z

1~b,0,p2t)

"N(z1~b,0,1)!NA

z1~bpt

,0,1B(N(z

1~b,0,1)!NAz1~b

S1#2z2

1~bP

, 0, 1B. h

(A.16)

Appendix B.

The pixels that belong to the subset A@ of thesubsampled image, i.e. the pixels x@

nmfor which

s@nm"1 would be the result of averaging Eq. (19)

within 2]2 blocks containing 2, 3 or 4 markedpixels. One can easily find out that within a 2]2block, there are 4 different ways to have 3 markedpixels, 3 ways to have 2 marked pixels and, obvi-ously, only one way to have 4 marked pixels. Inother words, there are 8 different types of 2]2blocks in I that result in a marked pixel in I

46".

Therefore, in 1/8 of the pixels in A@, k@ would beequal to k, in 3/8 of the pixels in A@, k@ would beequal to k/2 and in 4/8 of the pixels in A@, k@ wouldbe equal to 3k/4.

The pixels that belong to the subset B@ of thesubsampled image, i.e. the pixels x@

nmfor which

s@nm"0 would be the result of averaging Eq. (19)

within 2]2 blocks containing 0, 1 or 2 markedpixels. Within a 2]2 block, there are 4 differentways to have 1 marked pixel, 3 ways to have2 marked pixels and only one way to have0 marked pixels. In other words, there are 8 differ-ent types of 2]2 blocks in I that result in anunmarked pixel in I

46". Therefore, in 1/8 of the

pixels in B@, k@ would be equal to 0, in 3/8 of thepixels in B@, k@ would be equal to k/2 and in 4/8 ofthe pixels in B@, k@ would be equal to k/4. Therefore,when calculating wN @, Eqs. (21) to (23) result. h

Appendix C.

Let us suppose that the intensity range [0,255] isbeing split into C intervals G

1,2,G

Cwhose limits

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 401

Page 18: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

are denoted by ¸0,2,¸

C(¸

0"0, ¸

C"255). Let us

also suppose that a pixel xnm

belongs to the ithinterval C

i:

¸i~1

(xnm(¸

i

Finally, let ¸@0,2,¸@

C, x@

nmbe the mappings of

¸0,2,¸

C, x

nmin the transformed image (e.g.

x@nm"f(x

nm)) and G@

12,G@

Cthe intervals selected by

¸@0,2,¸@

C. If the transformation function f is an

increasing one, which is the case for histogramequalization and logarithmic grayscale, then wewill have

¸@i~1

(x@nm(¸@

i,

i.e. x@nm

will still belong to the ith interval G@iin the

transformed image. Similarly, all pixels of the orig-inal image whose intensity belonged to the ith in-terval would belong to the G@

iinterval in the

transformed image. Therefore, the intervalsG@

1,2,G@

Cwould contain equal numbers of pixels

which implies that G@1,2,G@

Cwill be the intervals

selected by the detection algorithm. Due to this facta pixel that has been classified to the ith intervalduring watermark casting would be classified in thesame interval in the transformed image by the de-tection algorithm and so the algorithm will not be‘fooled’ by the transform. h

References

[1] W. Bender, D. Gruhl, N. Morimoto, Techniques for datahiding, Proc. SPIE 2420 (1995) 40.

[2] V. Bhaskaran, K. Konstantinides, Image and video com-pression standards: algorithms and architectures, Kluwer,Dordrecht, 1995.

[3] A. Bors, I. Pitas, Image watermarking using DCT domainconstraints, Proc. 1996 IEEE Int. Conf. on Image Process-ing (ICIP 96), vol. III, 1996, pp. 231—234.

[4] O. Bruyndonckx, J.-J. Quisquater, B. Macq, Spatialmethod for copyright labeling of digital images, Proc.IEEE Workshop on Nonlinear Signal and Image Process-ing, Neos Marmaras, Greece, 20—22 June 1995, pp.456—459.

[5] C. Chou, Y. Li, A perceptually tuned subband image coderbased on the measure of just-noticeable-distortion profile,IEEE Trans. Circuits Systems Video Technol. 5 (6) (De-cember 1995) 467—476.

[6] I.J. Cox, J. Kilian, T. Leighton, T. Shamoon, Secure spreadspectrum watermarking for multimedia, NEC ResearchInstitute, Technical Report 95—10, 4 December 1995.

[7] I. Cox, J. Kilian, T. Leighton, T. Shamoon, Secure spreadspectrum watermarking for images, audio and video, Proc.1996 IEEE Int. Conf. on Image Processing (ICIP 96), vol.III, 1996, pp. 243—246.

[8] B. Girod, The information theoretical significance of spa-tial and temporal masking in video signals, SPIE, HumanVision, Visual Processing, and Digital Display 1077 (1989)178—187.

[9] F. Hartung, B. Girod, Digital watermarking of raw andcompressed video, Proc. SPIE 2952, Digital CompressionTechnologies and Systems for Video Communications,October 1996, pp. 205—213.

[10] C. Hsu, J. Wu, Hidden-signatures in images, Proc. 1996IEEE Int. Conf. on Image Processing (ICIP 96), vol. III,1996, pp. 223—226.

[11] N. Jayant, J. Johnston, R. Safranek, Signal compressionbased on models of human perception, Proc. IEEE 81 (10)(October 1993) 1385—1422.

[12] H. Kinoshita, An image digital signature system with ZKIPfor the graph isomorphism, Proc. 1996 IEEE Int. Conf. onImage Processing (ICIP 96), vol. III, 1996, pp. 247—250.

[13] E. Koch, J. Zhao, Towards robust and hidden imagecopyright labelling, Proc. IEEE Workshop on NonlinearSignal and Image Processing, Neos Marmaras, Greece,20—22 June 1995, pp. 452—455.

[14] B.M. Macq, J.J. Quisquater, Cryptology for digital TVbroadcasting, Proc. IEEE, June 1995, 944—957.

[15] K. Matsui, K. Tanaka, Video-steganography: how to se-cretly embed a signature in a picture, IMA IntellectualProperty Project Proc. 1 (1) (January 1994) 187—206.

[16] N. Nikolaidis, I. Pitas, Copyright protection of imagesusing robust digital signatures, IEEE Int. Conf. on Acous-tics, Speech and Signal Processing (ICASSP-96), vol. 4,May 1996, pp. 2168—2171.

[17] J. O’Ruanaidh, W. Dowling, F. Boland, Phase watermark-ing of digital images, Proc. 1996 IEEE Int. Conf. on ImageProcessing (ICIP 96), vol. III, 1996, pp. 239—242.

[18] J. O’Ruanaidh, W. Dowling, F. Boland, Watermarkingdigital images for copyright protection, IEEE Proc. onVision, Image and Signal Processing 143 (4), August 1996,pp. 250—256.

[19] A. Papoulis, Probability, Random Variables and Stochas-tic Processes, McGraw-Hill, New York, 1965.

[20] A. Papoulis, Probability & Statistics, Prentice Hall, Engle-wood Cliffs, NJ, 1990.

[21] I. Pitas, T.H. Kaskalis, Applying signatures on digital im-ages, IEEE Workshop on Nonlinear Image and Signal Pro-cessing, Neos Marmaras, Greece, June 1995, pp. 460—463.

[22] I. Pitas, A method for signature casting on digital images,Proc. 1996 IEEE Int. Conf. on Image Processing (ICIP 96),vol. III, pp. 215—218.

[23] M. Swanson, B. Zhu, A. Tewfik, Transparent robust imagewatermarking, Proc. 1996 IEEE Int. Conf. on Image Pro-cessing (ICIP 96), vol. III, 1996, pp. 211—214.

[24] R.J. Vanderbei, LOQO: an interior point code for quad-ratic programming, Technical Report SOR 94-15, Prin-ceton University, 1994.

402 N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385–403

Page 19: Robust image watermarking in the spatial domainposeidon.csd.auth.gr/.../JOURNAL/pdf/Elsevier_sigpro1998_watermarking.pdf · Robust image watermarking in the spatial domain N. Nikolaidis!,

[25] R.G. van Schyndel, A.Z. Tirkel, C.F. Osborne, A digitalwatermark, Proc. IEEE Int. Conf. on Image Processing,Austin, TX, 13—16 November 1994, pp. 86—90.

[26] G. Voyatzis, I. Pitas, Applications of toral automorphismsin image watermarking, Proc. 1996 IEEE Int. Conf. onImage Processing (ICIP 96), vol. II, 1996, pp. 237—240.

[27] G.K. Wallace, The JPEG still picture compression stan-dard, IEEE Trans. Consumer Electron., 38 (February1992), pp. 18—34.

[28] G.R. Walsh, Methods of Optimization, Wiley, New York,1975.

[29] R. Wolfgang, E. Delp, A watermark for digital images,Proc. 1996 IEEE Int. Conf. on Image Processing (ICIP 96),vol. III, 1996, pp. 219—222.

[30] J. Zhao, E. Koch, Embedding robust labels into imagesfor copyright protection, Technical Report, FraunhoferInstitute for Computer graphics, Darmstadt, Germany,1994.

N. Nikolaidis, I. Pitas / Signal Processing 66 (1998) 385—403 403