Vous êtes sur la page 1sur 10


- Interim Report (EE 5359: Multimedia Processing)

Under the guidance of, Dr. K. R. Rao

Submitted By,

Ehsan Syed 1000671971 seaquadri@gmail.com

The University of Texas at Arlington Spring 2011


Watermarking is defined as the practice of altering a work to embed a message about that work [1]. Embedding a digital signal (audio, video or image) with information which cannot be removed easily is called digital watermarking. Digital watermarking is based on the science of steganography [2] or data hiding. Steganography comes from the Greek meaning covered writing. Steganography is defined as the practice of undetectably altering a work to embed a secret message. It is an area of research of communicating in a hidden manner. Steganography and watermarking rely on imperfections of human senses. The eyes and ears are not perfect detectors and cannot detect minor change therefore can be tricked into thinking two images or sounds are identical but actually differ, for example in luminance or frequency shift. The human eye has a limited dynamic range so low quality images can be hidden within other high quality images [3].

Basic Principle
There are three main stages in the watermarking process [4]: generation and embedding attacks retrieval/detection

Generation of watermarks is an important stage of the process. Watermarks contain information that must be unique otherwise the owner cannot be uniquely identified. In embedding, an algorithm accepts the host and the data to be embedded and produces a watermarked signal. Various algorithms have been developed so far [5-14].The watermarked signal is then transmitted or stored, usually transmitted to another person. If this person makes a modification, this is called an attack. There are many possible attacks. Detection is an algorithm which is applied to the attacked signal to attempt to extract the watermark from it. If the signal is not modified during transmission, then the watermark is still present and it can be extracted. If the signal is copied, then the information is also carried in the copy. The embedding takes place by manipulating the contents of the digital data, which means the information is not embedded in the frame around the data, it is carried with the signal itself. Figure 1 shows the basic block diagram of watermarking process.

Watermark Image

Private Key

Host Image


Watermarked Image

Extracted watermark signal

Private Key


Figure 1: Basic block diagram of watermarking

Types of Watermarking:
There are mainly three types of watermarking [15]: Visible Watermarking Invisible Watermarking Dual watermarking

Techniques of Watermarking:
There are mainly two major techniques of watermarking [16]: Spatial domain: slightly modifies the pixels of one or two randomly selected subsets of an image

Frequency domain: this technique is also called transform domain. Values of certain frequencies are altered from their original.

Spatial Domain: In this type of watermarking, the pixels of one or two randomly selected subsets of an image are modified. These modifications can even include the flipping of the low-order bit of each pixel. But this technique is not considered reliable for normal media operations like lossy compression or filtering [9]. - LSB Coding: The least significant bits of the host signals are modified by the watermark signal. - Correlation Based: Pseudo random noise (PN) with a pattern W(x, y) is added to according to ( ) ( ) ( ) an image

At the decoder the correlation between the random noise and the image is found. If the value exceeds a threshold, watermark is detected.

Patchwork This algorithm has been proposed as an image watermarking scheme at the outset. This inserts the information into the time-domain signal. Original patchwork algorithm [20] is refreshingly novel among many watermarking methods. Moreover, the population of each subset was very large: It was not adaptive to the signal: it added or subtracted constant d independently of the signal strength. Nonetheless, it has provided a solid base as an excellent tool for information hiding.

Frequency Domain Discrete Cosine Transform (DCT): The sequence of data points in the spatial domain are converted to the sum of sine and cosine waveforms with different amplitudes in the frequency domain. Unlike Discrete Fourier Transform, this transform has only real numbers when a cosine function is used. There are eight different variants of DCT with slight modifications between them [17][18][19]. Discrete Wavelet Transform (DWT): In this transform the signal is decomposed into a set of basic wavelets followed by the altering of lower frequencies at various resolutions [17][18][19].

For this project, a form of spatial domain watermarking technique will be used.

Project Goal
This project aims at embedding a watermark into an image using a form of spatial domain technique, which is least significant bit technique, and then performing JPEG compression and decompression and followed by the removal of watermark from the watermarked image. The following are the subdivisions of the project:

Embedding the Watermark image into the Host image:

Host image, A, is selected A watermark image, B, is selected The least significant bits (LSBs) of the host image A will be replaced by the most significant bits (MSBs) of the watermark image B A watermarked image, C, is obtained which contains the image A with its LSBs replaced by the MSBs of B

Compression of the watermarked image:

Watermarked image C is read Discrete Cosine Transform is applied [21] [22] Block is compressed through quantization or Huffman coding

Decompression of the watermarked image: The compressed image will now be decompressed Removing the watermark from the watermarked image: The watermark from the watermarked image C is removed It gives host image A and the watermark image B

The tools used in this projects implementation are MATLAB, Visual Studio.

My program:

host_image = input('Enter the host image file name with extension : ', 's'); wmrk_image = input('Enter watermark image file name with extension: ', 's'); host = imread(host_image); wmrk = imread(wmrk_image); figure(1) imshow(host,[]) title('Host Image') figure(2) imshow(wmrk,[]) title('Watermark Image') host=double(host); wmrk=double(wmrk); bits=3; wmrk_shifted=bitshift(wmrk,-(8-bits)); for i=1:bits host=bitset(host,i,0); end watermarked_image = uint8(host+wmrk_shifted); figure(3) imshow(watermarked_image,[]) title('Watermarked Image')


The aforementioned program is written in MATLAB and is executed. The following points explain the program code: It asks the user to input the Host image and the Watermark image

It reads the images input by the user and displays them It then doubles the images for the subsequent operations It then assigns the number of bits of host image to be replaced by the watermark image Each pixel is an 8-bit byte, hence the watermark image is shifted to 8(number of bits assigned) places to the right
Table 1: Watermark pixel before bit-shift

The above (table 1) is the representation of the pixel of the watermark image before the bit-shift. The following (table 2) is the representation of the pixel after the bit-shift
Table 2: Watermark pixel after bit-shift

The host image assigns its LSBs to zeroes as many as the number of bits assigned
Table 3: Host image before the LSBs are made zero

The above (table 3) is the representation of the pixel of the host image before the least significant bits are made zero. The following (table 4) is the representation of the pixel after the LSBs are made zero 0 0 0
Table 4: Host image after the LSBs are made zero

The host image and the watermark images area added to give the watermarked image (shown in table 5)

+ 0 = 0 0

Table 5: Watermarked image pixel with MSBs of host image and LSBs of watermark


The visible watermarked images are shown in the fig. 2 The invisible watermarked images are shown in the fig. 3

Visible Watermarking

Figure 2: Host image and the watermark image are added to give a visible watermarked image

Invisible Watermarking

Figure 3: Host image and watermark image are added to give an invisible watermarked image

Conclusions: A program was written using MATLAB, which read the watermark image and host image. It replaced the LSBs of host image with MSBs of watermark image and obtained a new watermarked image.

1. I. Cox et al, "Digital Watermarking", Journal of Electronic Imaging, Vol. 11, No.3, July 2002 2. L.M. Marnel et al, Spread spectrum image steganography, IEEE Transactions on Image Processing, pp 1075-1083, Aug 1999 3. J.J.K O-Ruanaidh et al, Watermarking digital images for copyright protection, IEE Proceedings in Vision, Image and Signal Processing, pp250-256, Aug 1996 4. I. J. Cox and M. L. Miller, A review of watermarking and the importance of perceptual modeling, Proceedings of Electronic Imaging, February 1997 5. H.J. Wang et al, Wavelet based digital image watermarking , Optics Express, PP 491-496, Dec 1998

6. P.-T.Yu et al, Digital watermarking based on neural networks for color images, Signal Processing, PP 663-671, Mar 2001 7. J. O-Ruanaidh et al, Cryptographic copyright protection for digital images based on watermarking techniques, Theoretical Computer Science, pp 117-142, Sep 1999 8. C. Fornaro and A.Sanna, Public key watermarking for authentication of CSG models, Computer-Aided design, pp 727-735, Oct 2000 9. M. Barni et al, Copyright protection of digital images by embedded unperceivable marks, Image and Vision Computing, pp897-906, Aug 1998 10. J.R. Hernandez et al, Improving the performance of spatial watermarking of images using channel coding, Signal Processing, pp 1261-1279, July 2000 11. S. Pereira et al, Optimal transform domain watermark embedding via linear programming, Signal Processing, pp 1251-1260, July 2001 12. F. Perez-Gonzalez et al, Approaching the capacity limit in image watermarking: a perspective on coding techniques for data hiding applications, Signal Processing, pp 1215-1238, July 2001 13. R. Baitello et al, From watermark detection to watermark decoding: a PPM approach, Signal Processing, pp 1261-1271 , July 2001 14. M. Barni et al, A DCT-domain system for robust image watermarking, Signal Processing, pp 357-372, May 1998 15. S. P. Mohanty, et al, A Dual Watermarking Technique for images, Proceedings of the seventh ACM international conference on Multimedia, pp 49-51, 1999 16. F. Hartung and M. Kutter, Multimedia watermarking techniques, Proceedings of the IEEE, Vol. 87, No. 7, pp 1079 1107, July 1999 17. N. Ahmed, et al, "Discrete cosine transform", IEEE Trans. Computers, Vol. 23(1), pp. 90-93, Jan. 1974 18. V. Britanak, et al, Discrete Cosine Transform: Properties, Algorithms, Advantages, Applications, Academic Press Publications, ISBN 978-0-12-373624-6, Boston, 1990. 19. J. Cummins, et al, Steganography and digital watermarking, School of Computer Science, The University of Birmingham, 2004 Website: http://www.cs.bham.ac.uk/~mdr/teaching/modules03/security/students/SS5/Steganography.pdf 20. W. Bender et al, Techniques for data hiding, IBM Systems Journal, Vol. 35, Nos. 3&4, 1996 21. R. Popa, An analysis of steganographic techniques, The Politehnica University of Timisoara, Faculty of Automatics and Computers, Department of Computer Science and Software Engineering, Website: http://ad.informatik.unifreiburg.de/mitarbeiter/will/dlib_bookmarks/digital-watermarking/popa/popa.pdf, 1998 22. T. Natarajan, and K. R. Rao, "Discrete cosine transform", IEEE Trans. Computers, Vol. 23(1), pp. 90-93, Jan. 1974