Digital Image Watermarking Lab by mr8ball3

VIEWS: 109 PAGES: 4

									ENSIMAG / UJF Master 2 SCCI: Multimedia Applications




                           Digital Image Watermarking Lab

                                         François Cayre – cayre@inpg.fr

Goals

–   to develop a complete watermarking system for digital images
–   to understand BPSK coding
–   to understand psychovisual masking
–   to understand desynchronization issues
–   to assess the performance improvement when using side-information
–   to devise watermark removal attacks

Software

–   This lab uses Libit as a general purpose vector/matrix library for the C language
–   Make sure the following Debian packages are installed: gcc, make, cvs, libjpeg-progs, gimp
–   Feel free to use shell scripting to automate tasks

Requirements

Libit installation
1- Prepare directory:

$ mkdir ~/packages && cd packages

2- Fetch the latest Libit CVS snapshot (just press enter if asked for a password):

$ cvs -d:pserver:anonymous@libit.cvs.sf.net:/cvsroot/libit login
$ cvs -z3 -d:pserver:anonymous@libit.cvs.sf.net:/cvsroot/libit co -P libit

3- Install Libit (must be root for system-wide installation)

$ cd libit/ && ./configure && make && sudo make install && cd

Lab software installation
1- Download the archive:

$ wget www.balistic-lab.org/pub/ens/wm/wmlab.tgz

2- Extract files:

$ tar -xzvf wmlab.tgz && cd wmlab
Lab software directories content
–   cfg/ : configuration files for the embedder and the decoder
–   images/ : various grayscale PGM images for you to play with
–   include/ : include files
–   src/ : source code (where you have to work!)

Compiling, cleaning, running
Compile with:

$ make

Clean build files with:

$ make clean

Run the embedder with:

$ ./embedder cfg/embed.cfg

Run the decoder with:

$ ./decoder cfg/decoder.cfg

Description of the proposed watermarking scheme
–   Coding : BPSK;
–   Embedding : Improved Spread Spectrum [1] (given) or Maximum Linear Correlation [2].

An image I of size MxN pixels is divided into square tiles of size SZxSZ [3]. Each tile is watermarked with the
same message. Obtaining a 1D vector from a tile is done with the function mat_to_vec. The converse is
done with vec_to_mat. An upsampling parameter (power of two) allows to upsample a given matrix by
repeating every coefficients into a square. It is used on the carriers matrix. At the decoder, watermark signal
estimation is based on Wiener-like filter (simple denoiser in function mat_estimate).

Questions

1- BPSK coding and decoding
1.1- Recall what is BPSK coding.

1.2- Give the expression of the maximum number of bits Nc as a function of the tile square size SZ and the
upsampling parameter S. Hint: the unit variance constraint for all carriers imposes a restriction on the number
of linearly independent vectors w.r.t. the space dimension.

1.3- In file ss.c, complete function get_correlations to ensure proper decoding.

1.4- In file modulation.c, complete function encode_ss to perform basic BPSK coding. Do not pay
attention to the wcr parameter, as the distorsion is set aftewards using target PSNR.
2- Psycho-visual masking
Psycho-visual masking aims at varying the local power the watermarking signal, according to the eye
sensitivity. Local activity around a pixel is modeled by its local variance. A Sobel filter is generally used to
detect edges. Check the file masking.c for details. The custom masking strategy is basically a smoothing of the
Sobel filter output.

2.1- In file cfg/embed.cfg, vary the psycho-visual parameter. Discuss the results depending on local image
features (edge, texture and flat areas).

2.2- In file cfg/embed.cfg, vary the carriers matrix upsampling parameter. Discuss its influence.

2.3- Find the PSNR value (set it in cfg/embed.cfg) that ensures watermark invisibility (for you!) for each
psycho-visual model. Discuss the influence of psycho-visual masking on the watermarking signal power.

3- Tuning and using side-information at the encoder
3.1- Vary the upsampling parameter in {1,2,4}. Discuss against JPEG compression. Use the attack script to
output a PGM compressed/decompressed image with a given JPEG quality factor. Set the upsampling
parameter to the optimal value according to the perceptual / robustness trade-off.

3.2- Plot the robustness of the watermarking scheme against JPEG compression. Use several images, keys and
messages to smooth the results.

Hints:
– first find the relevant JPEG quality factor extremal values;
– Config file parameters can be overridden on the command line (useful for scripting).


3.3- Build an embedder with Improved Spread Spectrum: replace modulation.o by imodulation.o in
the src/Makefile. Plot the robustness of this embedder againt JPEG compression. Discuss the relevance of
using side-information at the encoder.

4- Investigating desynchronization issues
4.1- Perform an image cropping. Try to decode the message. Explain what is happening.

4.2- Devise a simple strategy to circumvent the effect of cropping. Update the function get_correlation
in file ss.c with your own implementation.

4.3- Using the function mat_acf2d, compute the autocorrelation function of the watermark signal estimation
(in file decoder.c). Do the same after the watermarked image has undergone a rotation. Use
mat_pgm_write after mat_scale to write an image on disk. Devise a strategy to resist more general
geometrical transforms than cropping. Do not implement it.

5- Clever attacks
5.1- Implement a watermark removal attack based on denoising. Find the average PSNR for a successful
attack.

5.2- Using the repetitive structure of the watermark, implement a watermark removal attack. Plot the
effectiveness of this attack as a function of the PSNR after attack vs. watermarked image size.
Bibliography

[1] H. Malvar and D.A.F. Florêncio. "Improved Spread Spectrum: A New Modulation Technique for Robust
Watermarking". IEEE Transactions on Signal Processing, 51(4):898-905. Special Issue on Signal Processing
for Data Hiding in Digital Media and Secure Content Delivery, 2003.

[2] M.L. Miller, I.J.Cox and J.A. Bloom, "Informed Embedding: Exploiting Image and Detector Information
During Watermark Insertion", Proc. 7th IEEE Int. Conf. on Image Processing: Special Session on Second
Generation Watermarking Methods, Vancouver, Canada, Vol. III, pp. 1-4, 2000.

[3] F. Deguillaume, S. Voloshynovskiy and T. Pun, "Method for the Estimation and Recovering from General
Affine Transforms in Digital Watermarking Applications", SPIE Photonics West, Electronic Imagin, Security
and Watermarking of Multimedia Contents IV, San Jose, CA, USA, 2002.

								
To top