3
|
1 #LyX 1.5.0rc2 created this file. For more info see http://www.lyx.org/
|
|
2 \lyxformat 276
|
|
3 \begin_document
|
|
4 \begin_header
|
0
|
5 \textclass paper
|
|
6 \language english
|
|
7 \inputencoding auto
|
3
|
8 \font_roman default
|
|
9 \font_sans default
|
|
10 \font_typewriter default
|
|
11 \font_default_family default
|
|
12 \font_sc false
|
|
13 \font_osf false
|
|
14 \font_sf_scale 100
|
|
15 \font_tt_scale 100
|
0
|
16 \graphics default
|
|
17 \paperfontsize default
|
3
|
18 \spacing single
|
|
19 \papersize default
|
|
20 \use_geometry false
|
|
21 \use_amsmath 1
|
|
22 \use_esint 0
|
|
23 \cite_engine basic
|
|
24 \use_bibtopic false
|
0
|
25 \paperorientation portrait
|
|
26 \secnumdepth 3
|
|
27 \tocdepth 3
|
|
28 \paragraph_separation skip
|
|
29 \defskip smallskip
|
|
30 \quotes_language english
|
|
31 \papercolumns 1
|
|
32 \papersides 1
|
|
33 \paperpagestyle default
|
3
|
34 \tracking_changes false
|
|
35 \output_changes false
|
|
36 \author "Anonymous"
|
|
37 \end_header
|
0
|
38
|
3
|
39 \begin_body
|
|
40
|
|
41 \begin_layout Title
|
0
|
42 Watermarking Source Code
|
3
|
43 \end_layout
|
0
|
44
|
3
|
45 \begin_layout SubTitle
|
|
46 version 0.5
|
|
47 \end_layout
|
0
|
48
|
3
|
49 \begin_layout Author
|
0
|
50 Peter Meerwald
|
3
|
51 \end_layout
|
0
|
52
|
3
|
53 \begin_layout Address
|
0
|
54 Dept.
|
3
|
55 of Computer Sciences, University of Salzburg
|
|
56 \newline
|
0
|
57 Jakob-Haringer-Str.
|
|
58 2, A-5020 Salzburg, Austria
|
3
|
59 \newline
|
0
|
60
|
3
|
61 \begin_inset LatexCommand url
|
|
62 target "mailto:pmeerw@cosy.sbg.ac.at"
|
0
|
63
|
3
|
64 \end_inset
|
0
|
65
|
|
66
|
3
|
67 \newline
|
0
|
68
|
3
|
69 \begin_inset LatexCommand url
|
|
70 target "http://www.cosy.sbg.ac.at/~pmeerw/Watermarking"
|
0
|
71
|
3
|
72 \end_inset
|
0
|
73
|
|
74
|
3
|
75 \end_layout
|
0
|
76
|
3
|
77 \begin_layout Abstract
|
0
|
78 This package provides source code for some watermarking algorithms in hopefully
|
|
79 portable C code.
|
|
80 The programs can be used to study watermarking techniques, perform comparative
|
|
81 robustness tests and develop new attacks against embedded watermarks.
|
3
|
82 \end_layout
|
0
|
83
|
3
|
84 \begin_layout Abstract
|
0
|
85 However, the provided programs are by no means suitable for real-world applicati
|
|
86 on (i.e.
|
|
87 copyright protection) and the code solely serves some educational purpose.
|
3
|
88 \end_layout
|
|
89
|
|
90 \begin_layout Standard
|
|
91 \begin_inset LatexCommand tableofcontents
|
|
92
|
|
93 \end_inset
|
0
|
94
|
|
95
|
3
|
96 \end_layout
|
0
|
97
|
3
|
98 \begin_layout Section
|
0
|
99 Introduction
|
3
|
100 \end_layout
|
0
|
101
|
3
|
102 \begin_layout Standard
|
0
|
103 Academic research in the watermarking field has grown dramatically since
|
|
104 approximately 1995.
|
|
105 But surprisingly, source code for the proposed watermarking schemes has
|
|
106 not been made available.
|
|
107 The reason is most likely the security of many watermarking systems lies
|
|
108 at least to some extent in the embedding and detection algorithm itself,
|
|
109 and not in the keys used -- violating the Kerckhoff principle
|
3
|
110 \begin_inset LatexCommand cite
|
|
111 key "Kerckhoff1883a"
|
0
|
112
|
3
|
113 \end_inset
|
0
|
114
|
|
115 .
|
3
|
116 \end_layout
|
0
|
117
|
3
|
118 \begin_layout Standard
|
0
|
119 With the availability of public robustness test for watermarking algorithms,
|
|
120 StirMark
|
3
|
121 \begin_inset LatexCommand cite
|
|
122 key "Petitcolas99c, Petitcolas98b, Petitcolas98a"
|
0
|
123
|
3
|
124 \end_inset
|
0
|
125
|
|
126 , Unzign
|
3
|
127 \begin_inset Foot
|
|
128 status collapsed
|
|
129
|
|
130 \begin_layout Standard
|
|
131 \begin_inset LatexCommand url
|
|
132 target "http://www.altern.org/watermark"
|
|
133
|
|
134 \end_inset
|
0
|
135
|
|
136
|
3
|
137 \end_layout
|
0
|
138
|
3
|
139 \end_inset
|
0
|
140
|
|
141 and very recently Checkmark
|
3
|
142 \begin_inset LatexCommand cite
|
|
143 key "Pereira01b"
|
0
|
144
|
3
|
145 \end_inset
|
0
|
146
|
|
147 , the situation begins to improve.
|
|
148 Now it is possible to measure the performance of watermarking systems.
|
|
149
|
3
|
150 \end_layout
|
0
|
151
|
3
|
152 \begin_layout Standard
|
0
|
153 In order the compare and evaluate new embedding and detection techniques,
|
|
154 it is also necessary to have some reference implementations of the older,
|
|
155 now often called classical schemes.
|
|
156 In this work, we provide some implementations of watermarking schemes,
|
|
157 some of which can be considered 'classical'.
|
3
|
158 \end_layout
|
0
|
159
|
3
|
160 \begin_layout Standard
|
0
|
161 It was the goal to capture the main ideas of the proposed algorithms, as
|
|
162 layed out in the respective papers.
|
|
163 This is clearly not an easy task as some papers do not disclose all details
|
|
164 or state which particular parameters were used to obtain the results outlined
|
|
165 in the communications.
|
3
|
166 \end_layout
|
0
|
167
|
3
|
168 \begin_layout Standard
|
0
|
169 I am very interested in hearing your comments, complaints and suggestions
|
|
170 regarding this software.
|
|
171 Moreover, if you have source code for a watermarking scheme not yet covered
|
|
172 or some useful utility I would be happy to include your code in this distributi
|
|
173 on.
|
|
174 Please see the contact information at the top of this document.
|
3
|
175 \end_layout
|
0
|
176
|
3
|
177 \begin_layout Standard
|
0
|
178 If you use the accompanying code, please cite my thesis:
|
3
|
179 \end_layout
|
0
|
180
|
3
|
181 \begin_layout Quotation
|
0
|
182 Peter Meerwald, Digital Image Watermarking in the Wavelet Transform Domain,
|
|
183 Master's Thesis, Department of Scientific Computing, University of Salzburg,
|
|
184 Austria, January 2001.
|
3
|
185 \end_layout
|
0
|
186
|
3
|
187 \begin_layout Section
|
0
|
188 Software
|
3
|
189 \end_layout
|
0
|
190
|
3
|
191 \begin_layout Standard
|
0
|
192 Most of the software provided herein was written by myself, as part of my
|
|
193 Master thesis.
|
|
194 Some contributions were made by Vassilis Fotopoulos
|
3
|
195 \begin_inset Foot
|
|
196 status collapsed
|
|
197
|
|
198 \begin_layout Standard
|
|
199 \begin_inset LatexCommand url
|
|
200 target "mailto:vfotop1@physics.upatras.gr"
|
|
201
|
|
202 \end_inset
|
0
|
203
|
|
204
|
3
|
205 \end_layout
|
0
|
206
|
3
|
207 \end_inset
|
0
|
208
|
|
209 .
|
|
210 The software in the archive is organized in the following sub-directories:
|
3
|
211 \end_layout
|
0
|
212
|
3
|
213 \begin_layout Description
|
0
|
214 Fotopoulos/ contains contributions by Vassilis Fotopoulos
|
3
|
215 \end_layout
|
0
|
216
|
3
|
217 \begin_layout Description
|
0
|
218 Meerwald/ contains my work
|
3
|
219 \end_layout
|
0
|
220
|
3
|
221 \begin_layout Description
|
0
|
222 images/ contains the Lena image in PGM format; the default parameters of
|
|
223 most algorithms are tuned to work best with that image
|
3
|
224 \end_layout
|
0
|
225
|
3
|
226 \begin_layout Description
|
0
|
227 linux_bin/ the place where the Linux executables are stored in the binary
|
|
228 distribution
|
3
|
229 \end_layout
|
0
|
230
|
3
|
231 \begin_layout Description
|
0
|
232 win32_bin/ the place where Windows 32-bit executables are distributed; tested
|
|
233 with Windows NT 4.0 only
|
3
|
234 \end_layout
|
0
|
235
|
3
|
236 \begin_layout Description
|
0
|
237 make/ contains the
|
3
|
238 \family typewriter
|
|
239 \size small
|
0
|
240 Makefile
|
3
|
241 \family default
|
|
242 \size default
|
0
|
243 options to build the code on supported platforms
|
3
|
244 \end_layout
|
0
|
245
|
3
|
246 \begin_layout Standard
|
0
|
247 For the purpose of this software package, a watermarking system comprises
|
|
248 four parts, namely: signature generation, watermark embedding, watermark
|
|
249 extraction and signature comparison or detection -- with the exception
|
|
250 of Vassilis's code; there are only cast and test programs (corresponds
|
|
251 to watermark embedding and detection).
|
|
252 Signature is used more less as a synonym for mark and can be thought of
|
|
253 as the payload (at least for some schemes :-).
|
3
|
254 \end_layout
|
0
|
255
|
3
|
256 \begin_layout Standard
|
0
|
257 All programs only accept the image in NetPBM format and will also produce
|
|
258 only NetPBM-format files (see section
|
3
|
259 \begin_inset LatexCommand ref
|
|
260 reference "sec:prereq"
|
0
|
261
|
3
|
262 \end_inset
|
0
|
263
|
|
264 ).
|
|
265 Unfortunately, most programs have only been tested with 8-bit gray-scale
|
|
266 images of size
|
3
|
267 \begin_inset Formula $512\times512.$
|
|
268 \end_inset
|
0
|
269
|
|
270
|
3
|
271 \end_layout
|
0
|
272
|
3
|
273 \begin_layout Standard
|
0
|
274 In order to simplify batch testing, the programs allow to read either from
|
|
275 a file, e.g.
|
3
|
276 \end_layout
|
0
|
277
|
3
|
278 \begin_layout Standard
|
0
|
279
|
3
|
280 \family typewriter
|
|
281 \size small
|
|
282 wm_cox_e -s cox.sig
|
|
283 \family default
|
|
284
|
|
285 \family typewriter
|
|
286 \series bold
|
0
|
287 image.pgm
|
3
|
288 \end_layout
|
0
|
289
|
3
|
290 \begin_layout Standard
|
0
|
291 or from standard input, i.e.
|
3
|
292 \end_layout
|
0
|
293
|
3
|
294 \begin_layout Standard
|
0
|
295 wm_cox_e -s cox.sig
|
3
|
296 \series bold
|
0
|
297 < image.pgm
|
3
|
298 \end_layout
|
0
|
299
|
3
|
300 \begin_layout Standard
|
0
|
301 The output is usually written to standard output, i.e.
|
|
302
|
3
|
303 \end_layout
|
0
|
304
|
3
|
305 \begin_layout Standard
|
0
|
306
|
3
|
307 \family typewriter
|
|
308 \size small
|
|
309 wm_cox_e -s cox.sig image.pgm
|
|
310 \family default
|
|
311
|
|
312 \family typewriter
|
|
313 \series bold
|
0
|
314 > wm_image.pgm
|
3
|
315 \end_layout
|
0
|
316
|
3
|
317 \begin_layout Standard
|
0
|
318 unless redirected to a file, e.g.
|
3
|
319 \end_layout
|
0
|
320
|
3
|
321 \begin_layout Standard
|
0
|
322
|
3
|
323 \family typewriter
|
|
324 \size small
|
|
325 wm_cox_e -s cox.sig
|
|
326 \family default
|
|
327
|
|
328 \family typewriter
|
|
329 \series bold
|
0
|
330 -o wm_image.pgm
|
3
|
331 \family default
|
|
332 \series default
|
|
333
|
|
334 \family typewriter
|
|
335 image.pgm
|
|
336 \end_layout
|
0
|
337
|
3
|
338 \begin_layout Subsection
|
0
|
339 Featured algorithms
|
3
|
340 \end_layout
|
0
|
341
|
3
|
342 \begin_layout Standard
|
0
|
343 Currently it includes the following watermarking algorithms
|
3
|
344 \end_layout
|
0
|
345
|
3
|
346 \begin_layout Itemize
|
0
|
347 Bruyndonckx [bruyn], refer to
|
3
|
348 \end_layout
|
0
|
349
|
3
|
350 \begin_layout Quotation
|
0
|
351 O.
|
|
352 Bruyndonckx, Jean-Jacques Quisquater, and Benoit M.
|
|
353 Macq.
|
|
354 Spatial method for copyright labeling of digital images.
|
|
355 In IEEE Workshop on Nonlinear Signal and Image Processing '95, Thessaloniki,
|
|
356 Greece, pages 456 - 459, 1995.
|
3
|
357 \end_layout
|
0
|
358
|
3
|
359 \begin_layout Itemize
|
0
|
360 Corvi, refer to
|
3
|
361 \end_layout
|
0
|
362
|
3
|
363 \begin_layout Quotation
|
0
|
364 Marco Corvi and Gianluca Nicchiotti.
|
|
365 Wavelet-based image watermarking for copyright protection.
|
|
366 In Scandinavian Conference on Image Analysis SCIA '97, Lappeenranta, Finland,
|
|
367 June 1997.
|
3
|
368 \end_layout
|
0
|
369
|
3
|
370 \begin_layout Itemize
|
0
|
371 Cox, refer to
|
3
|
372 \end_layout
|
0
|
373
|
3
|
374 \begin_layout Quotation
|
0
|
375 Ingemar J.
|
|
376 Cox, Joe Kilian, Tom Leighton, and Talal G.
|
|
377 Shamoon.
|
|
378 Secure spread spectrum watermarking for multimedia.
|
|
379 In Proceedings of the IEEE ICIP '97, volume 6, pages 1673 - 1687, Santa
|
|
380 Barbara, California, USA, 1997.
|
3
|
381 \end_layout
|
0
|
382
|
3
|
383 \begin_layout Itemize
|
0
|
384 Dugad, refer to
|
3
|
385 \end_layout
|
0
|
386
|
3
|
387 \begin_layout Quotation
|
0
|
388 Rakesh Dugad, Krishna Ratakonda, and Narendra Ahuja.
|
|
389 A new wavelet-based scheme for watermarking images.
|
|
390 In Proceedings of the IEEE International Conference on Image Processing,
|
|
391 ICIP '98, Chicago, IL, USA, October 1998.
|
|
392
|
3
|
393 \end_layout
|
0
|
394
|
3
|
395 \begin_layout Itemize
|
0
|
396 Fridrich (2.
|
|
397 scheme), refer to
|
3
|
398 \end_layout
|
0
|
399
|
3
|
400 \begin_layout Quotation
|
0
|
401 Jiri Fridrich.
|
|
402 Combining low-frequency and spread spectrum watermarking.
|
|
403 In Proceedings of the SPIE Symposium on Optical Science, Engineering and
|
|
404 Instrumentation, San Diego, USA, July 1998.
|
|
405
|
3
|
406 \end_layout
|
0
|
407
|
3
|
408 \begin_layout Itemize
|
0
|
409 Kim, refer to
|
3
|
410 \end_layout
|
0
|
411
|
3
|
412 \begin_layout Quotation
|
0
|
413 Jong Ryul Kim and Young Shik Moon.
|
|
414 A robust wavelet-based digital watermark using level-adaptive thresholding.
|
|
415 In Proceedings of the 6th IEEE International Conference on Image Processing
|
|
416 ICIP '99, page 202, Kobe, Japan, October 1999.
|
3
|
417 \end_layout
|
0
|
418
|
3
|
419 \begin_layout Itemize
|
0
|
420 Koch, refer to
|
3
|
421 \end_layout
|
0
|
422
|
3
|
423 \begin_layout Quotation
|
0
|
424 Eckhard Koch and Jian Zhao.
|
|
425 Towards robust and hidden image copyright labeling.
|
|
426 In Proceedings of the IEEE International Workshop on Nonlinear Signal and
|
|
427 Image Processing, pages 452 - 455, Halkidiki, Marmaras, Greece, June 1995.
|
3
|
428 \end_layout
|
|
429
|
|
430 \begin_layout Itemize
|
|
431 Kundur, refer to
|
|
432 \end_layout
|
|
433
|
|
434 \begin_layout Quotation
|
|
435 Deepa Kundur and Dimitrios Hatzinakos.
|
|
436 Digital watermarking using multiresolution wavelet decomposition.
|
|
437 In Proceedings of IEEE ICASSP '98, volume 5, pages 2969-2972, Seattle,
|
|
438 WA, USA, May 1998.
|
|
439
|
|
440 \end_layout
|
0
|
441
|
3
|
442 \begin_deeper
|
|
443 \begin_layout Standard
|
|
444 and
|
|
445 \end_layout
|
|
446
|
|
447 \end_deeper
|
|
448 \begin_layout Quotation
|
|
449 Deepa Kundur and D.
|
|
450 Hatzinakos.
|
|
451 Diversity and attack characterization for improved robust watermarking.
|
|
452 IEEE Transactions on Signal Processing, 29(10):2383-2396, October 2001.
|
|
453 \end_layout
|
|
454
|
|
455 \begin_layout Itemize
|
0
|
456 Wang, refer to
|
3
|
457 \end_layout
|
0
|
458
|
3
|
459 \begin_layout Quotation
|
0
|
460 Houng-Jyh Wang, Po-Chyi Su, and C.-C.
|
|
461 Jay Kuo.
|
|
462 Wavelet-based digital image watermarking.
|
|
463 Optics Express, volume 3, pp.
|
|
464 497, December 1998.
|
|
465
|
3
|
466 \end_layout
|
0
|
467
|
3
|
468 \begin_layout Itemize
|
0
|
469 Xia, refer to
|
3
|
470 \end_layout
|
0
|
471
|
3
|
472 \begin_layout Quotation
|
0
|
473 Xiang-Gen Xia, Charles G.
|
|
474 Boncelet, and Gonzalo R.
|
|
475 Arce.
|
|
476 Wavelet transform based watermark for digital images.
|
|
477 Optics Express, volume 3, pp.
|
|
478 497, December 1998.
|
3
|
479 \end_layout
|
0
|
480
|
3
|
481 \begin_layout Itemize
|
0
|
482 Xie, refer to
|
3
|
483 \end_layout
|
0
|
484
|
3
|
485 \begin_layout Quotation
|
0
|
486 Liehua Xie and Gonzalo R.
|
|
487 Arce.
|
|
488 Joint wavelet compression and authentication watermarking.
|
|
489 In Proceedings of the IEEE International Conference on Image Processing,
|
|
490 ICIP '98, Chicago, IL, USA, 1998.
|
3
|
491 \end_layout
|
0
|
492
|
3
|
493 \begin_layout Itemize
|
0
|
494 Zhu, refer to
|
3
|
495 \end_layout
|
0
|
496
|
3
|
497 \begin_layout Quotation
|
0
|
498 Wenwu Zhu, Zixiang Xiong, and Ya-Qin Zhang.
|
|
499 Multiresolution watermarking for images and video: a unified approach.
|
|
500 In Proceedings of the IEEE International Conference on Image Processing,
|
|
501 ICIP '98, Chicago, IL, USA, October 1998.
|
|
502
|
3
|
503 \end_layout
|
0
|
504
|
3
|
505 \begin_layout Itemize
|
0
|
506 Piva/Fotopoulos [cast|test-pv,hart,sub], contribution by Vassilis Fotopoulos,
|
|
507 refer to
|
3
|
508 \end_layout
|
0
|
509
|
3
|
510 \begin_layout Quotation
|
0
|
511 M.Barni, F.
|
|
512 Bartolini, V.
|
|
513 Cappellini, A.
|
|
514 Piva.
|
|
515 A DCT-Domain System for Robust Image Watermarking, Signal Processing, vol.
|
|
516 66, pp 357 - 372, 1998.
|
3
|
517 \end_layout
|
|
518
|
|
519 \begin_deeper
|
|
520 \begin_layout Standard
|
|
521 \begin_inset VSpace smallskip
|
|
522 \end_inset
|
|
523
|
0
|
524 and
|
3
|
525 \begin_inset VSpace smallskip
|
|
526 \end_inset
|
|
527
|
0
|
528
|
3
|
529 \end_layout
|
|
530
|
|
531 \end_deeper
|
|
532 \begin_layout Quotation
|
0
|
533 V.
|
|
534 Fotopoulos, A.
|
|
535 N.
|
|
536 Skodras, A Subband DCT approach to image watermarking, X European Signal
|
|
537 Processing Conference, September 4 - 8, 2000, Tampere, Finland.
|
3
|
538 \end_layout
|
0
|
539
|
3
|
540 \begin_layout Standard
|
0
|
541 More algorithms will be added over time, I have implemented about 13 watermarkin
|
|
542 g algorithms in the spatial-, DCT-, and wavelet domain so far.
|
3
|
543 \end_layout
|
0
|
544
|
3
|
545 \begin_layout Subsection
|
|
546 \begin_inset LatexCommand label
|
|
547 name "sec:utility_programs"
|
0
|
548
|
3
|
549 \end_inset
|
0
|
550
|
|
551 Utility programs
|
3
|
552 \end_layout
|
0
|
553
|
3
|
554 \begin_layout Standard
|
0
|
555 A good way to check the effect of a watermarking algorithm is computing
|
|
556 the difference image, i.e.
|
|
557 subtracting the original image from the watermarked image.
|
|
558 Alternatively, one can also have a look at the modified coefficients in
|
|
559 the transform domain.
|
|
560 The following programs facilitate these tasks:
|
3
|
561 \end_layout
|
0
|
562
|
3
|
563 \begin_layout Description
|
0
|
564 cmp_pgm compute difference image, PSNR, ...
|
3
|
565 \end_layout
|
0
|
566
|
3
|
567 \begin_layout Description
|
0
|
568 cmp_dct compute full-frame DCT domain difference image
|
3
|
569 \end_layout
|
0
|
570
|
3
|
571 \begin_layout Description
|
0
|
572 cmp_dct8x8 compute 8x8 block-based DCT difference image
|
3
|
573 \end_layout
|
0
|
574
|
3
|
575 \begin_layout Description
|
0
|
576 cmp_dwt compute DWT domain difference image
|
3
|
577 \end_layout
|
0
|
578
|
3
|
579 \begin_layout Standard
|
0
|
580 For example, to produce the difference image of two PGM files and compute
|
|
581 the PSNR along with some other measures, the following command can be used:
|
3
|
582 \end_layout
|
0
|
583
|
3
|
584 \begin_layout Standard
|
|
585
|
|
586 \family typewriter
|
|
587 \size small
|
0
|
588 cmp_pgm -p -i original.pgm -o diff.pgm watermarked.pgm
|
3
|
589 \end_layout
|
0
|
590
|
3
|
591 \begin_layout Section
|
0
|
592 Usage
|
3
|
593 \end_layout
|
0
|
594
|
3
|
595 \begin_layout Standard
|
0
|
596 Note, almost all programs will output usage information if called with the
|
|
597
|
3
|
598 \family typewriter
|
|
599 \size small
|
0
|
600 -h
|
3
|
601 \family default
|
|
602 \size default
|
0
|
603 argument.
|
3
|
604 \end_layout
|
0
|
605
|
3
|
606 \begin_layout Subsection
|
0
|
607 Generating a mark
|
3
|
608 \end_layout
|
0
|
609
|
3
|
610 \begin_layout Standard
|
0
|
611 First, you have to generate an appropriate signature file for the corresponding
|
|
612 embedding/detection algorithm; e.g.
|
|
613 if you are going to use Cox' scheme, then you would run
|
3
|
614 \end_layout
|
0
|
615
|
3
|
616 \begin_layout Standard
|
0
|
617
|
3
|
618 \family typewriter
|
|
619 \size small
|
0
|
620 gen_cox_sig
|
3
|
621 \end_layout
|
0
|
622
|
3
|
623 \begin_layout Standard
|
0
|
624 The programs outputs some parameters and a sequence of Gaussian distributed
|
|
625 random numbers (which is the watermark sequence).
|
|
626 You want to save that into a signature file, so you run
|
3
|
627 \end_layout
|
0
|
628
|
3
|
629 \begin_layout Standard
|
|
630
|
|
631 \family typewriter
|
|
632 \size small
|
0
|
633 gen_cox_sig > cox.sig or
|
3
|
634 \end_layout
|
0
|
635
|
3
|
636 \begin_layout Standard
|
0
|
637
|
3
|
638 \family typewriter
|
|
639 \size small
|
0
|
640 gen_cox_sig -o cox.sig
|
3
|
641 \end_layout
|
0
|
642
|
3
|
643 \begin_layout Standard
|
0
|
644 You can influence e.g.
|
|
645 the embedding strength that will be used in the embedding step by running
|
3
|
646 \end_layout
|
|
647
|
|
648 \begin_layout Standard
|
|
649
|
|
650 \family typewriter
|
|
651 \size small
|
|
652 gen_cox_sig -a 0.5 > too_strong_cox.sig
|
|
653 \end_layout
|
|
654
|
|
655 \begin_layout Standard
|
|
656 Usually, the programs for generating a signature will supply reasonable
|
|
657 default values for marking a 8-bit gray-scale image of size
|
|
658 \begin_inset Formula $512\times512.$
|
|
659 \end_inset
|
0
|
660
|
|
661
|
3
|
662 \end_layout
|
0
|
663
|
3
|
664 \begin_layout Subsection
|
|
665 Watermark embedding
|
|
666 \end_layout
|
0
|
667
|
3
|
668 \begin_layout Standard
|
0
|
669 Watermark embedding is performed with the following command (for our example,
|
|
670 we are using Cox' scheme):
|
3
|
671 \end_layout
|
0
|
672
|
3
|
673 \begin_layout Standard
|
0
|
674
|
3
|
675 \family typewriter
|
|
676 \size small
|
0
|
677 wm_cox_e -s cox.sig -o cox_lena.pgm lena.pgm
|
3
|
678 \end_layout
|
0
|
679
|
3
|
680 \begin_layout Standard
|
0
|
681 The signature file is parsed to obtain the particular watermark sequence
|
|
682 and the embedding strength.
|
|
683 The watermarked image is written to the file
|
3
|
684 \family typewriter
|
|
685 \size small
|
0
|
686 cox_lena.pgm
|
3
|
687 \family default
|
|
688 \size default
|
0
|
689 .
|
|
690 Now it the time to check the perceptual quality of the produced image and
|
|
691 also have a look at the difference image (see section
|
3
|
692 \begin_inset LatexCommand ref
|
|
693 reference "sec:utility_programs"
|
0
|
694
|
3
|
695 \end_inset
|
0
|
696
|
|
697 ).
|
3
|
698 \end_layout
|
0
|
699
|
3
|
700 \begin_layout Subsection
|
0
|
701 Watermark extraction
|
3
|
702 \end_layout
|
0
|
703
|
3
|
704 \begin_layout Standard
|
0
|
705 To extract the embedded signature, we execute the command
|
3
|
706 \end_layout
|
0
|
707
|
3
|
708 \begin_layout Standard
|
0
|
709
|
3
|
710 \family typewriter
|
|
711 \size small
|
0
|
712 wm_cox_d -s cox.sig -i lena.pgm -o cox.wm cox_lena.pgm
|
3
|
713 \end_layout
|
0
|
714
|
3
|
715 \begin_layout Standard
|
0
|
716 Since Cox' algorithm is not blind, the original image is needed as a reference
|
|
717 to extract the embedded mark.
|
|
718 The embedded mark will be stored in
|
3
|
719 \family typewriter
|
|
720 \size small
|
0
|
721 cox.wm
|
3
|
722 \family default
|
|
723 \size default
|
0
|
724 .
|
|
725 The original signature,
|
3
|
726 \family typewriter
|
|
727 \size small
|
0
|
728 cox.sig
|
3
|
729 \family default
|
|
730 \size default
|
0
|
731 , is used to get the auxiliary embedding parameter correct (e.g.
|
|
732 embedding strength).
|
|
733
|
3
|
734 \end_layout
|
0
|
735
|
3
|
736 \begin_layout Subsection
|
0
|
737 Comparing the mark
|
3
|
738 \end_layout
|
0
|
739
|
3
|
740 \begin_layout Standard
|
0
|
741 The final step is comparing the original signature against the extracted
|
|
742 signature.
|
|
743 The result here is usually a correlation factor.
|
|
744 Values around 0 indicate that the mark has not been found, values around
|
3
|
745 1.
|
|
746 \end_layout
|
0
|
747
|
3
|
748 \begin_layout Standard
|
0
|
749 In most programs a analytical detection threshold for some detection probability
|
|
750 is not used.
|
|
751 Hence, one has to observe the output of the detector for many different
|
|
752 keys (around 1000 I'd suggest) to establish a reasonable threshold for
|
|
753 detection.
|
|
754 A good value to go with initially might be 0.2 which means we claim the
|
|
755 watermark detected if the correlation factor is > 0.2.
|
3
|
756 \end_layout
|
0
|
757
|
3
|
758 \begin_layout Standard
|
0
|
759 The appropriate command for comparing the mark is
|
3
|
760 \end_layout
|
0
|
761
|
3
|
762 \begin_layout Standard
|
0
|
763
|
3
|
764 \family typewriter
|
|
765 \size small
|
0
|
766 cmp_cox_sig -s cox.sig cox.wm
|
3
|
767 \end_layout
|
0
|
768
|
3
|
769 \begin_layout Subsection
|
0
|
770 Batch testing - benchmarking
|
3
|
771 \end_layout
|
0
|
772
|
3
|
773 \begin_layout Standard
|
0
|
774 If you want to run many test you can pipe the images to be do be watermarked
|
|
775 (and tested) through the embedder and detector.
|
|
776 The programs then act like a filter.
|
|
777 Try something like the following in a Unix shell script:
|
3
|
778 \end_layout
|
0
|
779
|
3
|
780 \begin_layout Standard
|
|
781
|
|
782 \family typewriter
|
|
783 \size small
|
0
|
784 gen_cox_sig > cox.sig
|
3
|
785 \end_layout
|
0
|
786
|
3
|
787 \begin_layout Standard
|
0
|
788
|
3
|
789 \family typewriter
|
|
790 \size small
|
0
|
791 for i in *.pgm
|
3
|
792 \end_layout
|
0
|
793
|
3
|
794 \begin_layout Standard
|
0
|
795
|
3
|
796 \family typewriter
|
|
797 \size small
|
0
|
798 do
|
3
|
799 \end_layout
|
0
|
800
|
3
|
801 \begin_layout Standard
|
|
802
|
|
803 \family typewriter
|
|
804 \size small
|
|
805 \InsetSpace ~
|
|
806 \InsetSpace ~
|
0
|
807 wm_cox_e -s cox.sig $i |
|
3
|
808 \backslash
|
0
|
809
|
3
|
810 \end_layout
|
0
|
811
|
3
|
812 \begin_layout Standard
|
0
|
813
|
3
|
814 \family typewriter
|
|
815 \size small
|
|
816 \InsetSpace ~
|
|
817 \InsetSpace ~
|
0
|
818 wm_cox_d -s cox.sig -i $i |
|
3
|
819 \backslash
|
0
|
820
|
3
|
821 \end_layout
|
0
|
822
|
3
|
823 \begin_layout Standard
|
0
|
824
|
3
|
825 \family typewriter
|
|
826 \size small
|
|
827 \InsetSpace ~
|
|
828 \InsetSpace ~
|
0
|
829 cmp_cox_sig -s cox.sig
|
3
|
830 \end_layout
|
0
|
831
|
3
|
832 \begin_layout Standard
|
0
|
833
|
3
|
834 \family typewriter
|
|
835 \size small
|
0
|
836 done
|
3
|
837 \end_layout
|
0
|
838
|
3
|
839 \begin_layout Section
|
|
840 \begin_inset LatexCommand label
|
|
841 name "sec:recompile"
|
0
|
842
|
3
|
843 \end_inset
|
0
|
844
|
|
845 Recompiling
|
3
|
846 \end_layout
|
0
|
847
|
3
|
848 \begin_layout Standard
|
0
|
849 Note, that most watermark embedding/extraction programs use the built-in
|
|
850 random number generator of the C library, i.e.
|
|
851
|
3
|
852 \family typewriter
|
|
853 \size small
|
0
|
854 srandom()
|
3
|
855 \family default
|
|
856 \size default
|
0
|
857 and
|
3
|
858 \family typewriter
|
|
859 \size small
|
0
|
860 random().
|
3
|
861
|
|
862 \family default
|
0
|
863
|
3
|
864 \size default
|
0
|
865 Therefore, if you recompile, chances are that you won't be able to use your
|
|
866 images watermarked with the previous version.
|
3
|
867 \end_layout
|
0
|
868
|
3
|
869 \begin_layout Standard
|
0
|
870 The Makefile options for compiling on the different platforms can be found
|
|
871 in the
|
3
|
872 \family typewriter
|
|
873 \size small
|
0
|
874 make/
|
3
|
875 \family default
|
|
876 \size default
|
0
|
877 sub-directory of the archive.
|
3
|
878 \end_layout
|
0
|
879
|
3
|
880 \begin_layout Subsection
|
|
881 \begin_inset LatexCommand label
|
|
882 name "sec:prereq"
|
0
|
883
|
3
|
884 \end_inset
|
0
|
885
|
|
886 Prerequisites
|
3
|
887 \end_layout
|
0
|
888
|
3
|
889 \begin_layout Subsubsection
|
0
|
890 NetPBM
|
3
|
891 \end_layout
|
0
|
892
|
3
|
893 \begin_layout Standard
|
0
|
894 NetPBM is responsible for image file I/O and provides a definition of a
|
|
895 simple image file format along with many image file format filters that
|
|
896 allow to convert images to and from NetPBM format.
|
|
897
|
3
|
898 \end_layout
|
0
|
899
|
3
|
900 \begin_layout Standard
|
0
|
901 You need to get and install the NetPBM library at
|
3
|
902 \begin_inset LatexCommand url
|
|
903 target "http://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/"
|
0
|
904
|
3
|
905 \end_inset
|
0
|
906
|
|
907 or
|
3
|
908 \begin_inset LatexCommand url
|
|
909 target "http://netpbm.sourceforge.net"
|
0
|
910
|
3
|
911 \end_inset
|
0
|
912
|
|
913 .
|
|
914 The library provides
|
3
|
915 \family typewriter
|
|
916 \size small
|
0
|
917 pgm.h
|
3
|
918 \family default
|
|
919 \size default
|
0
|
920 and the appropriate implementation.
|
3
|
921 \end_layout
|
|
922
|
|
923 \begin_layout Subsubsection
|
|
924 getopt
|
|
925 \end_layout
|
0
|
926
|
3
|
927 \begin_layout Standard
|
|
928 When compiling on Windows, the getopt() function call required.
|
|
929 An implementation of getopt() can be found in the NetPBM package.
|
|
930
|
|
931 \end_layout
|
|
932
|
|
933 \begin_layout Subsection
|
0
|
934 Unix/Linux platform
|
3
|
935 \end_layout
|
0
|
936
|
3
|
937 \begin_layout Standard
|
0
|
938 All programs were developed using Linux and GNU C.
|
|
939 The programs should compile and work with all recent versions of Linux
|
|
940 and GNU C.
|
|
941
|
3
|
942 \end_layout
|
0
|
943
|
3
|
944 \begin_layout Subsection
|
|
945 \begin_inset LatexCommand label
|
|
946 name "sec:win32_compile"
|
0
|
947
|
3
|
948 \end_inset
|
0
|
949
|
|
950 Win32 platform
|
3
|
951 \end_layout
|
0
|
952
|
3
|
953 \begin_layout Standard
|
0
|
954 The programs were ported to the Windows platform using the Cygwin
|
3
|
955 \begin_inset Foot
|
|
956 status collapsed
|
|
957
|
|
958 \begin_layout Standard
|
|
959 \begin_inset LatexCommand url
|
|
960 target "http://www.cygwin.com"
|
|
961
|
|
962 \end_inset
|
|
963
|
|
964
|
|
965 \end_layout
|
|
966
|
|
967 \end_inset
|
|
968
|
|
969 and Mingw
|
|
970 \begin_inset Foot
|
|
971 status collapsed
|
|
972
|
|
973 \begin_layout Standard
|
|
974 \begin_inset LatexCommand url
|
|
975 target "http://www.mingw.org"
|
|
976
|
|
977 \end_inset
|
0
|
978
|
|
979
|
3
|
980 \end_layout
|
0
|
981
|
3
|
982 \end_inset
|
0
|
983
|
|
984 environment.
|
|
985 Most notable, the file mode for standard input and standard output has
|
|
986 to be set to binary mode.
|
|
987 This is accomplished with the
|
3
|
988 \family typewriter
|
|
989 \size small
|
0
|
990 setmode()
|
3
|
991 \family default
|
|
992 \size default
|
0
|
993 or
|
3
|
994 \family typewriter
|
|
995 \size small
|
0
|
996 _fsetmode()
|
3
|
997 \family default
|
|
998 \size default
|
0
|
999 commands.
|
3
|
1000 \end_layout
|
0
|
1001
|
3
|
1002 \begin_layout Section
|
0
|
1003 FAQ
|
3
|
1004 \end_layout
|
0
|
1005
|
3
|
1006 \begin_layout Standard
|
0
|
1007 Q: How can I report problems?
|
3
|
1008 \end_layout
|
0
|
1009
|
3
|
1010 \begin_layout Standard
|
0
|
1011 A: See the contact information at the beginning of this document.
|
3
|
1012 \end_layout
|
0
|
1013
|
3
|
1014 \begin_layout Standard
|
0
|
1015 Q: The compiler complains about
|
3
|
1016 \family typewriter
|
|
1017 \size small
|
0
|
1018 pgm.h
|
3
|
1019 \family default
|
|
1020 \size default
|
0
|
1021 ?
|
3
|
1022 \end_layout
|
0
|
1023
|
3
|
1024 \begin_layout Standard
|
0
|
1025 A: You need to get and install the NetPBM library, see section
|
3
|
1026 \begin_inset LatexCommand ref
|
|
1027 reference "sec:prereq"
|
0
|
1028
|
3
|
1029 \end_inset
|
0
|
1030
|
|
1031 .
|
3
|
1032 \end_layout
|
0
|
1033
|
3
|
1034 \begin_layout Standard
|
0
|
1035 Q: What is the best algorithm?
|
3
|
1036 \end_layout
|
0
|
1037
|
3
|
1038 \begin_layout Standard
|
0
|
1039 A: Depends on your application.
|
3
|
1040 \end_layout
|
0
|
1041
|
3
|
1042 \begin_layout Standard
|
0
|
1043 Q: What is the most robust algorithm?
|
3
|
1044 \end_layout
|
0
|
1045
|
3
|
1046 \begin_layout Standard
|
0
|
1047 A: Depends on the attack.
|
|
1048 See some results on
|
3
|
1049 \begin_inset LatexCommand url
|
|
1050 target "http://www.cosy.sbg.ac.at/~pmeerw/Watermarking"
|
0
|
1051
|
3
|
1052 \end_inset
|
0
|
1053
|
|
1054 .
|
3
|
1055 \end_layout
|
0
|
1056
|
3
|
1057 \begin_layout Standard
|
0
|
1058 Q: I need code for a full-frame DCT?
|
3
|
1059 \end_layout
|
0
|
1060
|
3
|
1061 \begin_layout Standard
|
0
|
1062 A: See the files Meerwald/dct.* in the archive.
|
3
|
1063 \end_layout
|
0
|
1064
|
3
|
1065 \begin_layout Standard
|
0
|
1066 Q: I need code for a 8x8 block DCT?
|
3
|
1067 \end_layout
|
0
|
1068
|
3
|
1069 \begin_layout Standard
|
0
|
1070 A: See the files
|
3
|
1071 \family typewriter
|
|
1072 \size small
|
0
|
1073 Meerwald/dct.*
|
3
|
1074 \family default
|
|
1075 \size default
|
0
|
1076 in the archive.
|
3
|
1077 \end_layout
|
0
|
1078
|
3
|
1079 \begin_layout Standard
|
0
|
1080 Q: I need code for the wavelet transform (DWT)?
|
3
|
1081 \end_layout
|
0
|
1082
|
3
|
1083 \begin_layout Standard
|
0
|
1084 A: See the files
|
3
|
1085 \family typewriter
|
|
1086 \size small
|
0
|
1087 Meerwald/wavelet.*
|
3
|
1088 \family default
|
|
1089 \size default
|
0
|
1090 in the archive.
|
3
|
1091 \end_layout
|
0
|
1092
|
3
|
1093 \begin_layout Standard
|
0
|
1094 Q: I get the message 'unable to open filter.dat' - what to do?
|
3
|
1095 \end_layout
|
0
|
1096
|
3
|
1097 \begin_layout Standard
|
0
|
1098 A: Make sure the file filter.dat is in the current directory or accessible
|
|
1099 via path/filename specified in the signature file.
|
|
1100 Use the signature generation command to specify an absolute path if necessary.
|
3
|
1101 \end_layout
|
0
|
1102
|
3
|
1103 \begin_layout Standard
|
0
|
1104 Q: I can't compile the code using some Microsoft product?
|
3
|
1105 \end_layout
|
0
|
1106
|
3
|
1107 \begin_layout Standard
|
0
|
1108 A: Make your life easier, install GNU software! See section
|
3
|
1109 \begin_inset LatexCommand ref
|
|
1110 reference "sec:recompile"
|
0
|
1111
|
3
|
1112 \end_inset
|
0
|
1113
|
|
1114 .
|
3
|
1115 \end_layout
|
0
|
1116
|
3
|
1117 \begin_layout Section
|
0
|
1118 Revision history
|
3
|
1119 \end_layout
|
|
1120
|
|
1121 \begin_layout Standard
|
|
1122 version 0.5 (December, 2005)
|
|
1123 \end_layout
|
0
|
1124
|
3
|
1125 \begin_layout Itemize
|
|
1126 added algorithm kund3, kund2 and xie2
|
|
1127 \end_layout
|
|
1128
|
|
1129 \begin_layout Standard
|
0
|
1130 version 0.4 (June 21, 2001)
|
3
|
1131 \end_layout
|
0
|
1132
|
3
|
1133 \begin_layout Itemize
|
0
|
1134 bug fixes
|
3
|
1135 \end_layout
|
0
|
1136
|
3
|
1137 \begin_deeper
|
|
1138 \begin_layout Itemize
|
0
|
1139 wm_xia_{e|d}.c variable level uninitialized
|
3
|
1140 \end_layout
|
0
|
1141
|
3
|
1142 \begin_layout Itemize
|
0
|
1143 wm_zhu_{e|d}.c variable level uninitialized
|
3
|
1144 \end_layout
|
0
|
1145
|
3
|
1146 \begin_layout Itemize
|
0
|
1147 issue with random() vs.
|
|
1148 rand() and RAND_MAX in frid2_common.c
|
3
|
1149 \end_layout
|
0
|
1150
|
3
|
1151 \end_deeper
|
|
1152 \begin_layout Itemize
|
0
|
1153 added option to bruyn algorithm to disable block skipping
|
3
|
1154 \end_layout
|
0
|
1155
|
3
|
1156 \begin_layout Itemize
|
0
|
1157 added algorithm kim
|
3
|
1158 \end_layout
|
0
|
1159
|
3
|
1160 \begin_layout Standard
|
0
|
1161 version 0.3 (June 18, 2001)
|
3
|
1162 \end_layout
|
0
|
1163
|
3
|
1164 \begin_layout Itemize
|
0
|
1165 created a nice (?) manual/documentation
|
3
|
1166 \end_layout
|
0
|
1167
|
3
|
1168 \begin_layout Itemize
|
0
|
1169 added algorithms by Dugad, Wang, Zhu, Fridrich
|
3
|
1170 \end_layout
|
0
|
1171
|
3
|
1172 \begin_layout Itemize
|
0
|
1173 added Makefiles for Win32 platform (mingw32)
|
3
|
1174 \end_layout
|
0
|
1175
|
3
|
1176 \begin_layout Standard
|
0
|
1177 version 0.2 (February 22, 2001)
|
3
|
1178 \end_layout
|
0
|
1179
|
3
|
1180 \begin_layout Itemize
|
0
|
1181 added contribution by Vassilis Fotopoulos (Piva's algorithm,
|
3
|
1182 \end_layout
|
0
|
1183
|
3
|
1184 \begin_layout Itemize
|
0
|
1185 DCT, Hartley and subband domain) - see Fotopoulos/ subdirectory
|
3
|
1186 \end_layout
|
0
|
1187
|
3
|
1188 \begin_layout Itemize
|
0
|
1189 stuff moved to Meerwald/ subdirectory
|
3
|
1190 \end_layout
|
0
|
1191
|
3
|
1192 \begin_layout Itemize
|
0
|
1193 added Bruyndonckx, Corvi, Koch, Xia, Xie algorithms
|
3
|
1194 \end_layout
|
0
|
1195
|
3
|
1196 \begin_layout Standard
|
0
|
1197 version 0.1 (February 18, 2001)
|
3
|
1198 \end_layout
|
0
|
1199
|
3
|
1200 \begin_layout Itemize
|
0
|
1201 initial release
|
3
|
1202 \end_layout
|
0
|
1203
|
3
|
1204 \begin_layout Section
|
0
|
1205 Legal statement
|
3
|
1206 \end_layout
|
0
|
1207
|
3
|
1208 \begin_layout Standard
|
0
|
1209 My license is called "I-don't-care" license: (1) You can do with the accompanyin
|
|
1210 g software whatever you want, but don't blame me if it doesn't work or it
|
|
1211 causes damage.
|
|
1212 (2) If you think my work is useful, tell me and tell others, but you are
|
|
1213 not obliged to do so.
|
|
1214 I suggest not to remove information contained in this other documentation
|
|
1215 file.
|
3
|
1216 \end_layout
|
|
1217
|
|
1218 \begin_layout Standard
|
|
1219 \begin_inset LatexCommand bibtex
|
|
1220 options "plain"
|
|
1221 bibfiles "watermarking"
|
|
1222
|
|
1223 \end_inset
|
0
|
1224
|
|
1225
|
3
|
1226 \end_layout
|
0
|
1227
|
3
|
1228 \end_body
|
|
1229 \end_document
|