README for IWDW08-scal-wm Version 0.1; April 18, 2008 Python code implementing and testing the DWT and DCT domain blind additive spread spectrum watermarking schemes proposed in the paper Peter Meerwald, Andreas Uhl, "Scalability evaluation of blind spread-spectrum image watermarking", In Proceedings of the 7th International Workshop on Digital Watermarking, IWDW '08, Lecture Notes in Computer Science, vol. 5450, pp. 61-75, Busan, South Korea, November 10 - 12, 2008. See http://wavelab.at/sources. How to run: Test DCT scheme, no attack: python dct_test.py models.pgm Perform JPEG attack, quality factor 70 on DWT scheme: python dwt_test.py -a jpeg:70 models.pgm Files provides: * dwt_test.py: test program for the scalable DWT watermarking scheme * dct_test.py: test program for the scalable DCT watermarking scheme * dct.py: Discrete Cosine Transform (DCT) code * wm.py: misc. routines for watermarking purpose dwt_test and dct_test take an input image in .pgm format and perform watermark embedding and detection with different keys. The output is to stdout per default, in the following format: H0, H1 denotes the hypothesis to test (ie. no watermark/wrong key or correct watermark); LLn is the n-th frequency band (DCT), Ln/Om is the decomposition level n, orientation m; LL, L1, L2 are the combined results for the base layer and enhancement layers 1 and 2, resp. The most important number is the first (after the colon), the detection result. The following options are supported by both programs: -p, --pfa Probability of false alarm, default: 10e-6. -d, --dwr Document-to-watermark ratio (per-channel embedding strength), default: 20 for DWT, 15 for DCT scheme. -k, --key Secret start key, default: 1234. -c, --count Number of keys to test, default: 1000. -a, --attack Attack to perform: none, jpeg or jpeg2000, default: none. -r, --reduce Resolution reduction, 1 or 2, default: 0 dwt_test in addition accepts the options: -w, --wavelet Wavelet filter used for decomposition, see pywt documentation, default: bior2.2. -l, --levels Decomposition levels, default: 2. Temporary files are created in /tmp. Dependencies: The following programs and libraries need to be installed and in the execution path (in [brackets] the Ubuntu/Debian Linux package names for convenient installation): * Python 2.5.1, http://www.python.org [python2.5] * Python Image Library (PIL) 1.1.6, http://www.pythonware.com/products/pil/ [python-imaging] * numpy 1.0.3, http://numpy.org [python-numpy] * scipy 0.5.2, http://scipy.org [python-scipy] * pywt 0.1.6, http://wavelets.scipy.org/ [python-pywt] * JPEG tools cjpeg, djpeg [libjpeg-progs] * Netpbm 10.0 [netpbm] * Kakadu JPEG2000 programs 6.0, from http://www.kakadusoftware.com The code has been tested under Ubuntu Linux 8.04. Disclaimer: This material is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all. The material is prepared strictly for research use only, commercial use is prohibited. Do not distribute the material without written permission. If you publish any work based on this code, please cite the original paper. Contact: Please address any technical questions to Peter Meerwald (pmeerw@cosy.sbg.ac.at) or write to Andreas Uhl Department of Computer Sciences Universität Salzburg Jakob-Haringer-Str. 2 A-5020 Salzburg AUSTRIA Telephone: ++43 (0)662 8044 6303 Fax: ++43 (0)662 8044 172 Email: uhl@cosy.sbg.ac.at