INTRODUCTION TO DIGITAL WATERMARKING Igor Djurović

65
INTRODUCTION TO DIGITAL WATERMARKING Igor Djurović Research Center for Signals and Systems Electrical Engineering Department University of Montenegro 81000 Podgorica Serbia & Montenegro E-mail: [email protected] [email protected]

Transcript of INTRODUCTION TO DIGITAL WATERMARKING Igor Djurović

INTRODUCTION TO DIGITAL WATERMARKING

Igor Djurović

Research Center for Signals and Systems Electrical Engineering Department

University of Montenegro 81000 Podgorica

Serbia & Montenegro E-mail: [email protected] [email protected]

INTRODUCTION TO DIGITAL WATERMARKING

Background in watermarking

− Three papers published in leading journals. − Several papers in international conferences. − Two versions of the watermarks in the joint spatial/space-frequency domain

are proposed in: o S. Stanković, I. Djurović, I. Pitas: "Watermarking in the space/spatial-

frequency domain using two-dimensional Radon Wigner distribution", IEEE Trans. on Image Processing, Vol.10, No.4, April 2001, pp.650-658.

o I. Djurović, S. Stanković, I. Pitas: “Digital watermarking in the fractional Fourier domain”, Journal of Network and Computer Applications, Academic Press, Vol.24, No.2, Apr. 2001, pp.167-173.

− These papers are cited and analyzed by other researchers.

INTRODUCTION TO DIGITAL WATERMARKING

Our current research directions in watermarking field − Design of the sophisticated watermarks detectors that can be useful in the

case of data sensitive to any change. o Related paper: S. Stanković, I. Djurović, R. Herpers, LJ. Stanković:

"An Approach to Optimal Watermark Detection", AEU International Journal of Electronics and Communications, Vol. 57, No. 5, 2003, pp. 355-357.

− Design of multiwatermarking systems − Template matching for detection of watermarks in images subject to

geometrical transforms − Further development in design of space/spatial frequency watermarking

systems − Practical implementation of the watermarking systems

INTRODUCTION TO DIGITAL WATERMARKING

Digital watermarking

− For the first time in the history of humankind perfect copying of intellectual property material is so easy task and so widespread, causing multimillion losses in revenues in various industry fields (especially in entertainment industry).

− The first choice in counterfeit with illegal activities is standard cryptography methods.

− Only valid keyholders can access data but, once decoded, data lose any protection.

− Digital watermarking is assumed to be additional protecting mechanism against these illegal activities.

− The main difference between digital watermarking and cryptography is the fact that user can access and use watermarked data without any key but watermark can be detected from the information.

INTRODUCTION TO DIGITAL WATERMARKING

Requirements for digital watermarking systems

• Unobtrusiveness Watermark should be invisible or its presence should not interfere with the work being protected.

• Robustness Watermark must be difficult or impossible to remove. If information on the way how watermark is embedded is present the attempts to remove watermark should result in severe degradation of multimedia data.

• Universality The same (or slightly modified) algorithm should be applied for all considered digital multimedia data.

• Unambiguousness Watermark should be used to unambiguously identify the owner.

In the meantime some requirements have been added and some of these requirements (or their importance) have been corrected, but the main conclusions from the Cox paper, including this list, remains.

From famous Cox paper Secure Spread Spectrum Watermarking for Multimedia by I. J. Cox, J. Kilian, T. Leighton, T. Shamoon IEEE Trans. on Image Processing, Vol. 6, No. 12, Dec. 1997, pp.1673-1687.

INTRODUCTION TO DIGITAL WATERMARKING

+

original image feature extraction

generated watermark

watermarked features watermarked image

features based watermark embedding algorithm

+

generated watermark

watermarking in the spatial domain

+

generated watermark

watermark embedding algorithm in transf. domain

image transformation (FT, DCT, etc)

watermarked transformation

Commonly, watermark is "mixed" with data (data-dependent) since this kind of watermark is more difficult to be removed.

INTRODUCTION TO DIGITAL WATERMARKING

Comparison between various watermarking techniques

• The most commonly used group of techniques is methods for transformation domain watermarking.

• Desired properties: o Development of the invisible watermark is easier than in other

techniques. o This type of watermark systems produces watermarks robust to some

common attacks. • Drawback

o Calculation complexity (users do not like to wait long for embedding and detecting watermarks).

INTRODUCTION TO DIGITAL WATERMARKING

Comparison between various watermarking techniques

• Watermarking in the spatial domain is simpler to calculate but it is more difficult to design system robust on attacks.

• Embedding watermarks in image features is not very popular, since it is very difficult to have inverse feature transform.

• Here, we consider watermarking in transformation and spatial domain.

Example of watermarks in spatial domain:G. Voyatzis, I. Pitas: "Digital image watermarking usingmixture systems," Computer & Graphics, Vol. 22, No.3, 1998.

INTRODUCTION TO DIGITAL WATERMARKING

Watermark embedding – Formal expressions O(n,m) original image T(n,m)=T{O(n,m)} image transform T{O(n,m)}=O(n,m) for watermark in spatial domain

T{O(n,m)}≠O(n,m) feature extraction or image transform watermarks

w(n,m) watermark Watermarked image:

W(n,m)=T(n,m)+αF{w(n,m),T(n,m)}

Parameter that controls strength of the watermark (visibility or amount of disturbances to image)

Function of the watermark and T(n,m)

INTRODUCTION TO DIGITAL WATERMARKING

Watermark embedding – Q&A

1. Why F{w(n,m),T(n,m)} is not just w(n,m)?

− Reason is very simple. If somebody knows the watermark he can subtract the watermark from the W(n,m) and obtain original information. Then, he can distribute information without embedded watermark and in this way violate watermarking goals.

2. How to form watermark function?

− This topic is subject to arguing. Numerous authors (for example Cox et all) propose that watermark be pseudorandom sequence. In order to take advantage of the information theory aspects of the watermarking some authors propose that watermark be coded by some sophisticated code from coding theory.

INTRODUCTION TO DIGITAL WATERMARKING

Watermark embedding – Q&A

− For the second type of watermark function look in:

− The truth, in our opinion, is somewhere in the middle. The watermark should have property of (pseudo)random sequence but also some advantage could be taken from sophisticated codes applied on the watermarking systems.

For simplicity reasons we will use here just pseudo-random watermarks!

3. How to select function F{w(n,m),T(n,m}?

− the most commonly used watermark embedding function is proposed by Barni et all:

F{w(n,m),T(n,m)}=w(n,m)|T(n,m)|

Signal Processing, Special Issue on InformationTheory in Watermarking Systems, Vol. 81, No.6,2001.

M. Barni, F. Bartolini, V. Capellini, A. Piva: "A DCT-domain system forrobust image watermarking," Sig. Proc., Vol. 66, No. 3, May 1998, pp.357-372.

INTRODUCTION TO DIGITAL WATERMARKING

Watermarked image

From watermarked signal W(n,m) (that could be in transformation domain) the watermarked image can be calculated as:

WI(n,m)=T-1{W(n,m)}=T-1{T(n,m)+αw(n,m)|T(n,m)|}

Unfortunately, this is not the final step in image watermarking process.

The reason is the fact that humans easily observe changes in the flat image regions.

T-1{} is inverse transform of T{}

watermarked image

INTRODUCTION TO DIGITAL WATERMARKING

Watermark masking

Variations in the flat region can be observed.

Variations in the textured are difficult to be observed.

Original image Changed image with two changed regions

INTRODUCTION TO DIGITAL WATERMARKING

Watermark masking

Instead of the original watermark, a masked watermark should be embedded in image:

WI'(n,m)=(1-R(n,m))O(n,m)+R(n,m)WI(n,m)

R(n,m)≈0 for flat image regions ⇒ WI'(n,m)≈O(n,m)

R(n,m)≈1 for textured (varying) regions ⇒ WI'(n,m)≈WI(n,m)

calculated watermark

watermark masking function0≤R(n,m)≤1

INTRODUCTION TO DIGITAL WATERMARKING

Watermark masking

Masking function proposed by Barni:

1 1

1 1

n 4 m 42

1 1n n 4 m m 4

[O(n , m ) ](nV(n, m ,) m )+ +

= − = −

μ= −∑ ∑

1 1

n 4 m 4

1 12n n 4 m m 4

1 O(n , m )(n, m)9

+ +

= − = −

=μ ∑ ∑

max

V(n,m)R( m)V

n, =

variance of the image samples in 9x9 neighborhood

mean value of the image samples in 9x9 neighborhood

maximal value of V(n,m) calculated in entire image

INTRODUCTION TO DIGITAL WATERMARKING

Watermark masking

The considered masking function satisfies:

− R(n,m)≥0 R(n,m)≤1

− For O(n,m)=const in the considered region (for flat image region) R(n,m)=0.

− For varying (textured) image regions R(n,m) takes higher values.

Is this ideal form of the masking function?

No. It produces nice results but it is calculationaly demanding. Some simpler function is required, but the idea how to form such function should be very similar to the previous one.

INTRODUCTION TO DIGITAL WATERMARKING

Did we finish with embedding?

No! Digital image is digitalized in domain [0,255], i.e., any image pixel takes integer value in this interval. Then it remains to transform obtained watermarked data to integers.

• WI'(n,m)=3.75 should be rounded to 4

• WI'(n,m)=103.35 should be rounded to 103

• WI'(n,m)=256 is out of domain and it should be returned to the closest value from domain WI'(n,m)=255.

Wow!!! We described the simplest watermark-embedding algorithm.

Note that there are some additional refinement steps, but we will explain it later within examples.

INTRODUCTION TO DIGITAL WATERMARKING

Watermark detection

watermarked image

feature extraction for watermarked image

transformation of watermarked image

detector response functions

watermarking in spatial domain

searched watermark

Decision with two possible outcomes: watermark is detected or watermark is not detected

INTRODUCTION TO DIGITAL WATERMARKING

Watermark detection process

• The first step in watermark detection process is to transform image in domain in which the watermark is embedded:

T{WI'(n,m)}

• We suppose that watermark ws(n,m) is embedded in T{WI'(n,m)}.

• Then we calculate watermark detection function between watermark ws(n,m) and image transform T{WI'(n,m)}:

S(T{WI'(n,m)},ws(n,m))

• For S(T{WI'(n,m)},ws(n,m))>threshold we assume that watermark is

detected, otherwise that watermark is not detected.

INTRODUCTION TO DIGITAL WATERMARKING

Watermark detection function

• The most commonly used form of the watermark detection function is:

N M

n 1 m 1

S(a(n, m), b(n, m)) a(n, m)b(n,m)= =

= ∑∑

• Other details on calculation of watermark detection function and threshold selection will be given in examples.

Commonly this function is multipliedwith a constant that controls themaximal value of detector function butfor us it is not of great importance.

This form of watermark detection function is so-called matched correlator.

image dimensions NxM

INTRODUCTION TO DIGITAL WATERMARKING

Example – Simple watermarking in spatial domain

• This is an example of the simplest possible watermarking system.

• All steps in the watermark embedding and detection process will be illustrated in the software package MATLAB.

• Original image is O(n,m) of dimension NxM, i.e., n∈[1,N] and m∈ [1,M].

• Watermark is formed as 2D function w(n,m) created as a white Gaussian

random variable.

• Mean value of the white Gaussian random is E{w(n,m)}=0 and variance is equal to E{w2(n,m)}-E2{w(n,m)}=σ2.

• Watermarked image is: WI(n,m)=O(n,m)+w(n,m).

INTRODUCTION TO DIGITAL WATERMARKING

Example – Simple watermarking in spatial domain

• Watermark detection function calculated for embedded watermark is: N M

n 1 m 1N M N M

2

n 1 m 1 n 1 m 1

S(WI(n, m), w(n, m)) WI(n, m)w(n, m)

O(n, m)w(n, m) w (n, m)

= =

= = = =

= =

= +

∑∑

∑∑ ∑∑

Expected value of the watermark is (remember E{w(n,m)}=0 E{w2(n,m)}=σ2):

2E{S(WI(n,m), w(n,m))} MN= σ

− In the case that there are no watermarks in an image, detector response function is equal to:

N M

n 1 m 1

S(WI(n,m), w(n,m)) O(n,m)w(n,m)= =

= ∑∑ E{S(WI(n,m),w(n,m)}=0

INTRODUCTION TO DIGITAL WATERMARKING

Example – Simple watermarking in spatial domain

− Assume that watermark w(n,m) is embedded and that we search for watermark w'(n,m):

N M

n 1 m 1N M N M

n 1 m 1 n 1 m 1

S(WI(n,m), w '(n,m)) WI(n,m)w '(n,m)

O(n,m)w '(n, m) w(n,m)w '(n,m)

= =

= = = =

= =

= +

∑∑

∑∑ ∑∑

For different Gaussian variable w and w' holds E{w(n,m)w'(n,m)}=0. Then search for wrong watermark in watermarked image results in mean value of detector response:

E{S(WI(n,m),w(n,m)}=0

INTRODUCTION TO DIGITAL WATERMARKING

Example – Threshold

− When we try to detect proper watermark we want that watermark response function produces high value (in our case average of that value is MNσ2).

− If there is no watermark in the image we want that detector response function be small (in our case 0).

− Also, if we look for inaccurate watermark we want that watermark detection function produces small value (in our case again it is 0).

− Decision if watermark is detected is binary YES or NO.

− Then, we decide that if S{WI(n,m),w(n,m)}>threshold decision is YES and NO otherwise.

− We set threshold as a mean of ⇒ MNσ2/2

INTRODUCTION TO DIGITAL WATERMARKING

Example – Matlab Code

− In previous derivation some points including function R(n,m) are dropped but we will use it in our program.

− Now we will give part of MATLAB program with explanations.

clear %clear all variables from memory

close all %close all open windows

ci=imread('baboon.jpg');

%common test image Baboon figure(1) imshow(ci) %RGB (color) image

%note that color image has %three channels R - Red, %G - Green and B - Blue

title('Color image') pause g=rgb2gray(ci); %transform RGB image

%to grayscale figure(2) imshow(g)

title('original grayscale image') pause [N,M]=size(g); %image dimensions

alpha=5; %watermark strength

w_orig=alpha*randn(N,M); %watermark embedded in image

wi=uint8(double(g)+w_orig);

MATLAB images are member of uint8 class. Arithmetic operations are not allowed to this class.

To return to standard image format (return to [0,255] domain and round to integer values).

INTRODUCTION TO DIGITAL WATERMARKING

figure(3) imshow(wi) title('watermarked image') pause wdet_p=sum(sum(double(wi).*w_orig));

%detection of proper watermark w_wrong=alpha*randn(N,M); wdet_w=sum(sum(double(wi).*w_wrong));

%detection of wrong watermark threshold=M*N*alpha^2/2;

[wdet_p,wdet_w,threshold]

This program is a quite simple watermark implementation. We detect watermark and we compare it with detection of the wrong watermark. Results are as expected. The second example is slightly more complicated. We will repeat previous procedure 1000 times in order to get some statistics.

2.06 106 -0.18 106 0.82 106 in our experiment

INTRODUCTION TO DIGITAL WATERMARKING

Example – Matlab Code – Statistical study in 1000 trials TRIALS=1000; wp_vec=zeros(1,TRIALS);

%detector for proper watermarks ww_vec=zeros(1,TRIALS);

%detector for wrong watermarks th_vec=threshold*ones(1,TRIALS); for k=1:TRIALS w_orig=alpha*randn(N,M);

%watermark embedded in image wi=uint8(double(g)+w_orig); wp_vec(k)=sum(sum(double(wi).*w_orig)); w_wrong=alpha*randn(N,M); ww_vec(k)=sum(sum(double(wi).*w_wrong));

end figure(4) plot(1:k,[wp_vec;ww_vec;th_vec],'k') %%%Calculation of the histograms [a1,b1]=hist(wp_vec,30); [a2,b2]=hist(ww_vec,30); figure(5) plot(a1,b1,'r',a2,b2,'b')

INTRODUCTION TO DIGITAL WATERMARKING

0 100 200 300 400 500 600 700 800 900 1000-1

-0.5

0

0.5

1

1.5

2

2.5x 10

6

detector response function for properly detected watermark

detector response function for wrong watermark

threshold

0 50 100 150-1

-0.5

0

0.5

1

1.5

2

2.5x 10

6

original image watermarked image

INTRODUCTION TO DIGITAL WATERMARKING

Example –Statistical study for α=20

0 100 200 300 400 500 600 700 800 900 1000-0.5

0

0.5

1

1.5

2

2.5

3x 10

7

0 50 100 150

-0.5

0

0.5

1

1.5

2

2.5

3x 10

7

original image watermarked image

INTRODUCTION TO DIGITAL WATERMARKING

Example –Statistical study for α=2

0 100 200 300 400 500 600 700 800 900 1000-3

-2

-1

0

1

2

3

4

5x 10

5

0 20 40 60 80 100 120

-3

-2

-1

0

1

2

3

4

5x 10

5

original image

watermarked image

INTRODUCTION TO DIGITAL WATERMARKING

Comments on the experimental results

• Large amount of watermark produces very reliable detector:

o All detector responses for proper watermarks are above the threshold

o All detector responses for wrong watermarks are below the threshold

o Gap between histograms of the detector response function for proper and wrong watermarks is wide.

• Large amount of watermark causes image degradation (noise in some image parts can easily be observed).

• Small amount of watermark does not visually degrade the image but detector response function is not reliable.

• There is a trade-off between perceptual visibility of watermark and reliability of detection.

• Reliable measure of the image degradation caused by the watermark is very important issue.

INTRODUCTION TO DIGITAL WATERMARKING

Measure of image degradation

• There are numerous measures for image degradation caused by various influences.

• The most commonly used measure is the Pseudo-Signal-to-Noise-Ratio

(PSNR):

10 N M2

n 1

2max

m 1

MNPSNR 10log[O(n,m) WI( , m)]

O

n= =

=−∑∑

PSNR in MATLAB notation:

maximal value (luminance) of image

PSNR=10*log10(M*N*max(max(double(g)))^2/sum(sum((double(wi)-double(g)).^2)));

INTRODUCTION TO DIGITAL WATERMARKING

PSNR

• Recommendation is that PSNR≥35dB. • PSNR≥40dB produces invisible watermark. • PSNR≤25dB means that watermark is very visible in image. • PSNR≥60dB is sometimes required for medical imaging watermarking

systems. In our simple system for α=5 → PSNR≈32dB α=20 → PSNR≈20dB α=2 → PSNR≈41dB There are other measures like, for example, SNR or some other.

INTRODUCTION TO DIGITAL WATERMARKING

Detection methodology • Assume that we want to check if watermark is embedded in the image. • Assume that we watermarked numerous images and that we do not know

which watermark is used for particular image. • Then search strategy is employed and detector response is calculated for all

watermarks from our database. • When we detect watermark we can stop with procedure.

0 100 200 300 400 500 600 700 800 900 1000-1

-0.5

0

0.5

1

1.5x 10

6

watermark No.900

In this example only proper watermark No. 900 is detected.

INTRODUCTION TO DIGITAL WATERMARKING

Masking function

• For considered watermarking system masking function R(n,m) can be calculated as:

%%%mean value in 9x9 location mi=zeros(N,M); gd=double(g); for n=5:N-4 for m=5:M-4 mi(n,m)=mean(mean(gd(n-4:n+4,m-4:m+4))); end end

%%%Much simpler mi=conv2(gd,ones(9,9)/9^2,'same');

v=zeros(n,m); for n=5:N-4 for m=5:M-4 v(n,m)=sum(sum(gd(n-4:n+4,m-4:m+4)-mi(n-4:n+4,m-4:m+4))); end end

%%%Much simpler v=conv2((gd-mi).^2,ones(9,9),'same');

R=v./max(max(v));

INTRODUCTION TO DIGITAL WATERMARKING

Masking function – Baboon and Cameraman

• White color means larger values of R(n,m) close to 1, while dark values are close to 0.

• Obviously proper positions where watermark can be embedded are around object edges and in varying image areas.

INTRODUCTION TO DIGITAL WATERMARKING

For exercise

1. Threshold in our experiments is set to be MNσ2/2, i.e., it depends on image size (MxN) and watermark strength (σ). Develop watermark in the spatial domain with threshold that doesn’t depend on the image size and watermark strength.

Hint: Watermark detection function should be divided with something.

2. Our detector is developed to work with image that is not masked with function R(n,m). Determine proper threshold for watermark with used masking function.

Hint: It is mean value between expected response of watermark detection function of image with proper watermark and image without watermark.

INTRODUCTION TO DIGITAL WATERMARKING

For exercise

3. Determine probability of error in considered watermark system. Hint: It is rather difficult. There are several sources of errors:

• wrong watermark is detected • it is detected watermark in nonwatermarked image • embedded watermark is not detected

In order to simplify this procedure it could be assumed that watermark detector response is Gaussian random variable:

2

2

1 ( )p( ) exp22

⎛ ⎞ξ −ξ = −⎜ ⎟

πσ ⎝

μ

⎠σ

• Three probability density functions should be calculated for above-mentioned cases and compared with the threshold.

mean value of the detector response function

standard deviation of the detector response

INTRODUCTION TO DIGITAL WATERMARKING

For exercise

• In this case calculation of the detector variance needs the following relationship for independent white Gaussian random variables ν1, ν2, ν3 and ν4:

1 2 3 4 1 2 3 4 1 3 2 4 1 4 2 3E{ } E{ }E{ } E{ }E{ } E{ }E{ }ν ν ν ν = ν ν ν ν + ν ν ν ν + ν ν ν ν

• If required, probability of error can be expressed in term of erfc function:

2

x

2erfc(x) exp( t )dt∞

= −π ∫

• Assume implicitly that image and watermark are statistically independent.

INTRODUCTION TO DIGITAL WATERMARKING

2D DFT Two the most commonly used transformation domains in image processing are Discrete-Fourier-Transform domain and Discrete-Cosine-Transform domain:

• 2D DFT is defined as:

1 2

N 1 M 1nk mk

1 2 N Mn 0 m 0

X(k ,k ) x(n, m)W W− −

= =

= ∑∑ In MATLAB it is evaluated as:

A=fftshift(fft2(a));

a image of interest A 2D DFT fft2 2D DFT calculated with fast algorithm fftshift required reorganization of 2D DFT samples

WN=exp(-j2π/N)

ifft2 is inverse 2D DFT used to return image to spatial domain.

INTRODUCTION TO DIGITAL WATERMARKING

2D DFT and 2D DCT

• Other common signal transform used in image processing is 2D DCT. • 2D DCT in MATLAB can be evaluated by using function A=dct2(a); while

inverse 2D DCT is idct2(A)

2D DFT of image Baboon 2D DCT of image Baboon

“Low frequency region” with very high values corresponding to image luminance. Not suitable for watermarking.

“High frequency region” with image details. Not suitable for watermarking.

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking in 2D DCT domain

• Obviously, region of middle frequencies with middle samples of the 2D DFT and 2D DCT is suitable for watermarking since it will not change image luminance nor image details.

• Note that 2D DCT for image (real valued signal) is real valued (for 2D DFT

it is not the case since it is complex valued).

• Therefore, the 2D DCT domain will be used in our example for transformation domain watermarking (but some other domains are used in practice including 2D DFT).

• Just main steps will be described here and it remains for your exercise to

realize this type of watermark.

INTRODUCTION TO DIGITAL WATERMARKING

Steps in the DCT watermarking

• Determination of the samples where watermark will be embedded

Keep in mind that we should remember where (in which samples) watermark is embedded.

R1

R2

One approach is to embed watermark in DCT samplesthat have distance between R1 and R2 in DCT domain. Alternative approach is to sort DCT samples from thebiggest toward the smallest:

M Highest DCT samples where watermark is

not embedded

smallest DCT samples not used for watermark

embedding

L middle DCT samples used for watermark embedding

INTRODUCTION TO DIGITAL WATERMARKING

Steps in the DCT watermarking

• Watermark embedding. Assume that selected DCT coefficients are Ti, and that watermark is white Gaussian noise wi, then watermarked DCT coefficients are calculated as:

Ti’=Ti+α|Ti|wi Ti=M+1,…,M+L Note that watermark key consist of: wi i=M+1,...,M+L and positions where watermark is embedded.

• Calculation of the inverse DCT (with rounding to integer values).

• Watermark masking.

• Watermark detection procedure is simple:

o 2D DCT o Selection of watermarked coefficients o Detection of watermark in DCT domain by comparing the detector

response with a threshold

INTRODUCTION TO DIGITAL WATERMARKING

For exercise

• Realize watermark in DCT domain.

• Consider various values of R1, R2 or M and L, α, etc.

• Determine proper threshold for DCT watermarking system (with and without R(n,m)).

• Determine PSNR for considered watermarks.

• Determine probability of error in watermark system based on DCT.

• Repeat these steps for DFT watermarking system.

INTRODUCTION TO DIGITAL WATERMARKING

Attacks

• Watermark systems should be robust to attacks. • Attacks are intentional (in order to remove watermark) or unintentional

image transformations. • Common attacks are:

o Digital-to-analog and Analog-to-digital conversion o Resampling (change in image size), requantization (change in number

of bits used to represent image) o Variations of the image contrast, histogram equalization o JPEG compression o Geometrical transformations (rotation, scaling, cropping etc) o Oracle attack (sometimes image is divided in several smaller images,

watermark should be recognized from all such images)

INTRODUCTION TO DIGITAL WATERMARKING

For exercise • Realize some common attacks on our watermarking systems and perform

statistical testing and determination of proper threshold (if it is possible to recognize watermark). What kind of procedure is more robust under the same strength (PSNR) of the watermark?

• Proposed attacks in MATLAB:

o histeq (histogram equalization), brighten (brighten or darken image), imadjust (adjust image)

o imwrite with proper options (JPEG compression with various image quality)

o randn or imnoise (add Gaussian noise to image) o imresize (change image dimensions), imrotate (rotation of image),

imcrop (crop image from all sides) o remove image columns or rows

INTRODUCTION TO DIGITAL WATERMARKING

Attacks - Conclusion

• Plot detector response functions versus parameters of attack (for example image quality in JPEG compression).

• Try to determine probability of error analytically for some common attacks

(this is not an easy task and the first, easiest, exercise is removing just one column or row for watermarking in spatial domain).

The DCT technique should be more robust especially to geometrical attacks. Note that main problem in watermarking are small (geometrical) attacks that remove watermark but that keep high quality of image. There are specially designed watermark like so-call STIRMARK attack that is combination of several attacks that remove watermark but with preserved image quality.

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking in other multimedia data We considered watermarking in grayscale images. Here, we will just explain recommended techniques for other multimedia data. This is not state of the art in the field but in our opinion it is good starting point for further research and development.

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking for color images All colors that humans can observe can be considered as combination of Red, Green and Blue. Image is memorized as three matrices representing amount of various colors for each image pixel. We can represent colors in the Descartes coordinates as:

R

G

B Human eye is very sensitive to variations of colors but it is notsensitive to variations of illuminance. It is reason why watermarking in the color space is notperformed directly to R-G-B directions but sometransformation is required. Common technique is based on transformation of image fromRGB model to some spherical or cylindrical model with onecoordinate representing illuminance (for example HSI, HSV,HSB or YIQ). Watermark is then embedded only in thiscoordinate (matrix). After that image is transformed again inthe RGB model

Try yourselves!

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking in video sequences

Video sequences consist of numerous frames.

Each frame could be considered as a separate image.

However, human eye is very sensitive to non-correlated noise in frames of video-sequence (we can notice such alteration of video sequence).

Since watermark is in fact noise signal, the same conclusion holds for it.

Some recent formats of the video-sequences (MPEG and AVI etc) have two groups of frames: independent (representing new scenes) dependent (that are somehow related to independent frames) In these types of video-sequences watermark is embedded only in independent frames.

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking in sounds recording

− This is very challenging area.

− Humans have ability to hear very small variation of the sound.

− That is the reason why some common techniques fail to work for sounds.

− Currently the most promising technique is embedding watermark in signal echo.

− Namely, humans cannot hear echo in interval shorter than 5ms after signal.

INTRODUCTION TO DIGITAL WATERMARKING

Template matching techniques

− Obviously watermarking techniques are very sensitive to any geometrical variations (attacks).

− Group of techniques is designed in order try to overcome this drawback.

− One of them is based on the template matching.

Watermark with template:

WI(n,m)=O(n,m)+w(n,m)+wT(n,m)

Standard pseudo-random watermark Deterministic signal

called template

INTRODUCTION TO DIGITAL WATERMARKING

Template matching techniques

− In the first step we try to detect pseudorandom watermark, w(n,m), as in the previous algorithms.

− If watermark is not detected we are looking for template.

o If template is detected, based on variations in template, we estimate which kind of geometrical transform is performed on image.

o Then, we perform inverse geometrical transform and look for pseudo-random watermark.

o If template or pseudo-random watermark is not detected our decision is that there is no watermark embedded in the image.

INTRODUCTION TO DIGITAL WATERMARKING

Template matching techniques Template proposed in: S. Pereira, T. Pun: "Robust template matching for affine resistant image watermarks", IEEE Trans. Im. Proc. is defined in the 2D DFT domain as:

∑θ

θ θ−ωθ−ωδ=ωω )sin,cos(),( rrAT yxyx This template represents several (they recommend 14) pulses in the 2D DFT domain on distance r from origin. It can be shown that this watermark keeps similar form for translation and rotation of image and that it is quite simple to detect parameters of these two geometrical transforms.

INTRODUCTION TO DIGITAL WATERMARKING

Template matching techniques

− Authors of this template technique performed some additional modification of the template system that can work for some other geometrical transformations.

− For practical exercise prove the invariance property of this template for

translation and rotation and try to implement template detector.

INTRODUCTION TO DIGITAL WATERMARKING

Detection of weak watermark

− Medical data are assumed not to be useful if level of added signal is higher than PSNR=60dB.

− Then it is important for such data to design watermark system that can

detect watermarks in the case of PSNR≥60dB.

− Medical images are useless if illegal party altered them in any way.

− Medical image watermarks are designed to detect weak watermarks but not to survive attacks.

− For design of such watermarks some signal detection theory review is

required.

INTRODUCTION TO DIGITAL WATERMARKING

Signal detection framework Consider useful signal s(n) embedded in noise ν(n):

x(n)=s(n)+ν(n)

Let noise be distributed with probability density function p(ξ). Then the ideal detector is:

n

F[x(nD s(n) )]= ∑ For Gaussian noise function, F[x(n)] is proportional to F[x(n)]=x(n). This detector is called matched correlator. In watermarking case, useful signal to be detected is watermark while image is noise.

F[x(n)]=-p'(x(n))/p(x)

INTRODUCTION TO DIGITAL WATERMARKING

Watermark detectors When we assume that image (or image transform) has Gaussian probability density function, the already used watermark detector follows (here given for watermarking in spatial domain):

N M

n 1 m 1

S(WI(n,m), w(n,m)) WI(n, m)w(n,m)= =

= ∑∑

However, images and especially image transforms cannot be modeled as a Gaussian random variable and better results can be achieved for other detectors.

INTRODUCTION TO DIGITAL WATERMARKING

Watermark detectors

− For exercise, try with detectors of the form: p

N M

n 1 m 1

sign[WI(n,mS(WI(n,m), w(n,m)) | WI(n,m) | w(n] , m))= =

= ∑∑ 1 x 0

sign[x] 0 x 01 x 0

>⎧⎪= =⎨⎪− <⎩

− For some idea on the distribution of the image samples and transformation coefficients consider their histograms.

− General conclusion can be made only in statistical analysis based on huge

number of trials.

Try for various p≥0.

INTRODUCTION TO DIGITAL WATERMARKING

Link to watermarking research As a starting point to further research in watermarking we recommend:

http://www-nt.e-technik.uni-erlangen.de/~hartung/watermarkinglinks.html

WWW References on Multimedia Watermarking and Data Hiding Research & Technology

edited by Frank Hartung, [email protected]

INTRODUCTION TO DIGITAL WATERMARKING

Watermarking products

• Alpvision • Alpha Tec Ltd., Greece

(EIKONAmark) • AT&T - security software. • Blue Spike Inc. • CRL • datamark • DCT Digital Copyright

Technologies • digital-watermark.com

• Digimarc Corp • Fraunhofer CRCG • IBM EMMS • Intertrust • Macrovision Corporation • MediaSec Technologies LLC • Philips • Signum Technologies • Verance

INTRODUCTION TO DIGITAL WATERMARKING

What to read? Books.

− Chun-Shien Lu: "Multimedia Security: Steganography and Digital Watermarking Techniques for Protection of Intellectual Property"

− Mauro Barni, Franco Bartolini: "Watermarking Systems Engineering: Enabling Digital Assets Security and Other Applications"

− Husrev T. Sencar, Mahalingam Ramkumar, Ali N. Akansu: "Data Hiding Fundamentals And Applications"

− Michael Arnold, Stephen D. Wolthusen, Martin Schmucker: "Techniques and Applications of Digital Watermarking and Content Protection"

− Joachim Eggers, Bernd Girod: "Informed Watermarking" − Peter Wayner: "Disappearing Cryptography" − Ingemar Cox, Matthew Miller, Jeffrey Bloom: "Digital Watermarking" − Neil F. Johnson, Zoran Duric, Sushil Jajodia: "Information Hiding : Steganography and

Watermarking - Attacks and Countermeasures" − Stefan Katzenbeisser, Fabien A. P. Petitcolas (Editors): "Information hiding techniques

for steganography and digital watermarking"

INTRODUCTION TO DIGITAL WATERMARKING

What to read? Special Issues. Proceeding of IEEE, Special issue on identification and protection of multimedia informations, Vol. 87, No.7, July 1999. Signal Processing, Special issue on watermarking, Vol. 66, No. 3, 1998, and Vol. 81, No.6. IEEE Transactions on Signal Processing, Vol. 52, No. 10, Supplement on Secure Media. IEEE Signal Processing Magazine, Vol. 20, No. 5 and 6, Forum on future of watermarking. + Regular Issues of IEEE Transactions on Image Processing.

INTRODUCTION TO DIGITAL WATERMARKING

What to read? Conference Proceedings.

− IEEE International Conference on Image Processing (ICIP) from 1996-2004.

− IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) from 1997-2004.

− European Signal Processing Conference EUSIPCO from 1998-2004.

− SPIE Security and Watermarking 2002.

− Watermarking Workshops 1999, Workshop on Information Hiding 1998, 1999, Security

and Watermarking of Multimedia Contents. − IEEE International Conference on Multimedia Computing and Systems (ICMCS) 1999-

2004. etc.