Firemark: a Java Tool for SVG Watermarking

Keywords: SVG, watermarking, fourier descriptor

Dr. Sebastiano Battiato
D.M.I. -Universita' di Catania
Via Andrea Doria, 6
9125, Catania
Italy
battiato@dmi.unict.it

Ph.D. Gianpiero Di Blasi
D.M.I. -Universita' di Catania
Via Andrea Doria, 6
9125, Catania
Italy
gdiblasi@dmi.unict.it

Prof. Giovanni Gallo
D.M.I. -Universita' di Catania
Via Andrea Doria, 6
9125, Catania
Italy
gallo@dmi.unict.it

Enrico Messina
D.M.I. -Universita' di Catania
Via Andrea Doria, 6
9125, Catania
Italy
windam82@gmail.com


Abstract


This paper presents Firemark: a tool able to embed a watermark into an SVG file. The algorithm, partially inspired by [Sol04], uses as anchor points all vertex coordinates typically present in almost all SVG files. Preliminary results show the effectiveness of the proposed strategy.


Table of Contents


1. Introduction
2. The Fourier Descriptors
3. Watermark Creation
4. Experimental Results
Bibliography

1. Introduction

Digital images are easy to copy, to reproduce, to edit and to process maliciously. For this reason watermarking has emerged as an important technology for protecting copyright of multimedia products. A watermark is a digital signal carrying information about the copyright owner that is (or at least should be) permanently embedded into a digital product, making it robust to any alteration (malicious or not) of its content.

Watermark data embedding should not produce severe quality degradation. Many applications use vector graphics images (digital maps, GIS data, 2D graphics, cartoon images and SVG). Classical watermarking techniques should be adapted to this new environment taking into account the peculiarity of the vector graphics world. For example applying just a slightly luminance alteration to watermark a vector graphics image is not a good choice.

Vector graphics images usually consist of large homogeneous regions, which often have uniform luminance value. Thus, even a small perturbation on the luminance values is easily visible in these regions. Other watermarking methods embed the watermark in the homogeneous regions (e.g. low frequencies), but for vectorial images also a low power watermark (that guarantees the low visibility) can be easily removed by applying a malicious perturbation affecting only the homogeneous region intensity (see [Cox02] for details).

It is largely accepted that the critical information for vector graphics is stored in the contours. Thus, for these kind of images, altering the contours (and not the luminance) is essential for imperceptible and robust watermarking.

Recently SVG has been used for rendering of real raster images (see for example [Bat05b], [Bat05c], [Bat05d]), so the problem of watermarking a SVG file is of great interest, because the same information could be found in raster or vector form.

We have developed a Java tool for embedding and detecting watermarks in SVG images showing also some results obtained simulating typical attacks. The tool extends the approach proposed in [Sol04], adapting it to the special case of SVG file. Because an SVG file is composed by several basic primitives containing vertex points (e.g. circle, rectangle, etc.) all of them can be considered suitable for embedding a mark. The method presented in [Sol04] has been extended/adapted to manipulate all SVG primitives.

The algorithm proposed here embeds watermarks in the vertex points found in the SVG file slightly modifying the vertex coordinates. More precisely the watermark is embedded in the magnitude of the curve's Fourier descriptors to exploit its location, scale, and rotation invariant properties. It is well proven that working in the spectrum domain guarantee higher robustness degree. Watermark detection is blind (the watermark detection procedure doesn't need the original SVG file).

The technique has certain similarities to bitmap image watermarking in the discrete Fourier transform (DFT) domain. However, it's essentially different because it can be applied to SVG rather than bitmap images. Furthermore, Fourier descriptor watermarking problems differ from DFT bitmap image watermarking problems. For example, watermarks can cause curve discontinuity or curve self-crossing. Such undesirable side effects don't exist in DFT bitmap image watermarking.

The paper is structured as follows: Section 2 describes the Fourier descriptors, in Section 3 the watermark creation is described, while Section 4 shows experimental Results.

2. The Fourier Descriptors

Let L be a closed polygonal line that consists of N vertices. Let also [x(n), y(n)], n= 0,1, ..., N - 1 be the Cartesian coordinates of each vertex. We consider the complex signal z(n), where z(n) = x(n) + i y(n), n = 0, 1, ..., N - 1, by randomly selecting a vertex as a starting point and tracing the vertices in a clockwise or counter clockwise direction. The watermark embedding and detection procedures do not require knowledge of the starting point or the traversing path. Let Z(k) be the Fourier transform representation of the signal z(n):

Z(k).png

Figure 1:

The complex coefficients Z(k) are called Fourier descriptors of the polygonal line. In the Fourier descriptor representation, the Z(k) coefficients around Z(0) (DC term) describe low-frequency information, whereas the coefficients around Z(N/2) describe high-frequency information. Low-frequency coefficients typically represent the general shape, whereas outline and high-frequency coefficients describe shape details and sharp corners. The Z(0) coefficient represents the center of gravity of the shape (Z(0) =S z(n)), which is why translations are only effective on the DC term Z(0).

Fourier descriptors have several interesting properties and can be easily used to watermark a polygonal line (see [Sol04] for details).

3. Watermark Creation

We create the mark using a pseudorandom generator and a bi-valued +/-1 random sequence. The sequence is constructed as follows:

w(i).png

Figure 2:

where 0 < a < b = 0.5 and N is the number of Fourier coefficients. The multiplicative embedding of the watermark on the magnitude of the polygonal line vertices Fourier descriptors produces the watermarked polygonal line. In particular, the magnitude of the Fourier descriptors of the watermarked polygonal line Z'(k) is:

|Z'(k)| = |Z(k)| + p|Z(k)|W(k) = |Z(k)|[1 + pW(k)]

where k = 0, 1, ..., N - 1, and p is the watermark power. Because the magnitude of the watermarked Fourier descriptors line must be nonnegative, the multiplicative factor p must be less than 1. We used multiplicative embedding because it corresponds to a simple watermark masking (the watermark amplitude is larger in large Fourier descriptor coefficients).

Coefficients a and b control the low and high frequency ranges that the watermark affects. Because of the watermark invariant properties, we embed the watermark only in the Fourier descriptor magnitude. We use the inverse Fourier transform of the Fourier coefficients to produce the watermarked curve L'. This watermarking method is also applicable in the control points of B-spline contour representations. In both polygonal curves and in B-spline curves, watermark embedding can create curve discontinuities or curve self-crossing. Using correlation between the stored mark W(k) and the corresponding Fourier descriptors of the image under investigation, it is possible to obtain a robust detection of the embedded mark. In [Sol04] the authors describe in detail this technique and how it can be used for polygonal watermarking creation, embedding and detection.

4. Experimental Results

The overall system has been implemented within a Java framework. A demo applet can be found at [Bat05a]. Preliminary results show how embedding and detection can be easily performed. Tests are on-going to confirm the relative robustness with respect to typical attacks (rotation, scaling, etc.). Figure 3 shows a snapshot of the applet. Major details, on line demo and results can be found at the following web address: http://svg.dmi.unict.it/

snapshot.png

A snapshot of the applet

Figure 3:

Bibliography

[Bat05a]
Battiato S., Di Blasi G, Gallo G., Messina E. the Firemark applet http://www.dmi.unict.it/~gdiblasi/firemark/firemark.html, Java application http://www.dmi.unict.it/~gdiblasi/firemark/firemark.jar
[Bat05b]
Battiato S., Di Blasi G., Gallo G., Messina G., Nicotra S. SVG Rendering of Digital Images: an Overview. In poster proceedings of ACM/WSCG2005
[Bat05c]
Battiato S., Costanzo A., Di Blasi G., Gallo G., Nicotra S. SVG Rendering by Watershed Decomposition. In proceedings of IS&T/SPIE Electronic Imaging 2005
[Bat05d]
Battiato S., Barbera G., Di Blasi G., Gallo G., Messina G. Advanced SVG Triangulation/Polygonalization of Digital Images. In proceedings of IS&T/SPIE Electronic Imaging 2005
[Cox02]
Cox I.J., Miller M.L. The First 50 Years of Electronic Watermarking. EURASIP Journal of Applied Signal Processing, 2002, 2, 126-132, 2002
[Sol04]
Solachidis, V., Pitas, I. Watermarking Polygonal Lines Using Fourier Descriptors. IEEE CG&A, Volume: 24, Issue: 3, May-Jun 2004

XHTML rendition made possible by SchemaSoft's Document Interpreter™ technology.