# A DCT Domain Visible Watermarking Technique for Images

A DCT Domain Visible Watermarking Technique for Images

Saraju P. Mohanty? Dept. of Comp. Science & Engg. University of South Florida Tampa, FL 33620, USA smohanty@csee.usf.edu K.R. Ramakrishnan Dept. of Electrical Engg. Indian Institute of Science Bangalore 560 012, India krr@ee.iisc.ernet.in Mohan S Kankanhalli School of Computing National University of Singapore Kent Ridge, Singapore 119260 mohan@comp.nus.edu.sg

ABSTRACT

The growth of computer networks has boosted the growth of the information technology sector to a greater extent. There is a trend to move from conventional libraries to digital libraries. In the digital libraries images and texts are made available through the internet for scholarly research. At the same time care is taken to prevent the unauthorized use of the images commercially. In some cases the observer is encouraged to patronize the institution that owns the material. To satisfy both these needs simultaneously the owner needs to use visible watermarking. Visible watermarking is a type of digital watermarking used for protection of publicly available images. In this paper, we describe a visible watermarking scheme that is applied into the host image in the DCT domain. A mathematical model has been developed for that purpose. We have also proposed a modification of the algorithm to make the watermark more robust.

There are very few visible watermarking techniques available in current literature. The IBM digital library organization has used a visible watermarking technique to mark the digitized pages of manuscript from the Vatican archive [3][9]. Kankanhalli et al.[4] have proposed a visible watermarking technique in DCT domain. They divide the image into different blocks, classify the blocks by perceptual methods proposed in [5] and modify the DCT coefficients of host image as follows. c'ij(n) = αn cij(n) + βn wij(n) n = 1,2… (1)

The αn and βn coefficients are for block n. The cij(n) are the DCT coefficients of the host image block and wij(n) the DCT coefficients of the watermark image block. In this paper, we propose a visible watermarking technique that modifies the DCT coefficients of the host image using eqn.(1). But, the αn and βn values are found out using a mathematical model developed by exploiting the texture sensitivity of the human visual system (HVS). This ensures that the perceptual quality of the image is better preserved. We call αn the scaling factor and βn as the embedding factor. We have also proposed a modification to make the watermark more robust.

1. INTRODUCTION

Digital watermarking is defined as a process of embedding data (watermark) into a multimedia object to help to protect the owner's right to that object. The embedded data (watermark) may be either visible or invisible. In visible watermarking of images, a secondary image (the watermark) is embedded in a primary (host) image such that watermark is intentionally perceptible to a human observer whereas in the case of invisible watermarking the embedded data is not perceptible, but may be extracted/detected by a computer program. Some of the desired characteristics of visible watermarks are listed below [1][2]. ? ? ? ? ? A visible watermark should be obvious in both color and monochrome images. The watermark should be spread in a large or important area of the image in order to prevent its deletion by clipping. The watermark should be visible yet must not significantly obscure the image details beneath it. The watermark must be difficult to remove; removing a watermark should be more costly and labor intensive than purchasing the image from the owner. The watermark should be applied automatically with little human intervention and labor.

2. FINDING THE SCALING AND EMBEDDING FACTORS

While finding the scaling factors (αn) and embedding factors (βn), the following are taken into consideration [4][5][6][7] so that the quality of the watermarked image is not degraded. ? The edge blocks should be least altered to avoid significant distortion of the image. So one can add only small amount of watermark gray value in the edge block of host image. This means that scaling factor αn should be close to αmax , (the maximum value of the scaling factor) and embedding factor βn should be close to βmin, (the minimum value of the embedding factor). The distortion visibility is low when the background has strong texture. In a highly textured block, energy tends to be more evenly distributed among the different AC DCT coefficients. That means AC DCT coefficients of highly textured blocks have small variances and we can add more to those blocks. So for convenience, we assume αn to be directly proportional to variance (σn) and βn to be inversely proportional to variance (σn).

?

?

Let us denote the mean gray value of each image block as ?n and that of the image as ?. The blocks with mid-intensity values (?n ≈ ?) are more sensitive to noise than that of low intensity blocks (?n < ?) as well as high intensity blocks (?n > ?). This means that αn should increase with ?n as long as (?n < ?) and should decrease with ?n as long as (?n > ?). For convenience, the relationship between αn and ?n is taken to be truncated Gaussian. The variation of βn with respect to ?n is the reverse of that of αn. The mean gray value of each block is given by its DC DCT coefficient.

σ'n = σ?n / σ?max where, σ?max is the maximum value of σ?n.

(7)

To confirm to the above requirements we have chosen αn and βn as follows. ? ? The αn and βn for edge blocks are taken to be αmax and βmin respectively. For non-edge blocks αn and βn are computed as: (2) αn = σ'n exp. ( - (?'n - ?' )2 ) βn = (1/σ'n) (1 – exp. ( - (?'n - ?' )2)) (3) where, ?'n , ?' are the normalized values of ?n and ? respectively, and σ'n is normalized logarithm of σn (the variance of the AC DCT coefficients). αn and βn are then scaled to the ranges (αmin , αmax ) and (βmin , βmax) respectively, where αmin and αmax are the minimum and maximum values of the scaling factor, and βmin and βmax are the minimum and maximum values of the embedding factor. These are the parameters determining the extent of watermark insertion.

Figure 1: Variation of αn with σn

Figure 2: Variation of βn with σn

?

Figure 3: Variation of αn with ?n

We divide the original image I into 8x8 blocks and find the DCT coefficients of each block. Let us denote the DCT coefficients of block n by, cij(n) = 1,2, ... N, where n represents the position of block in image I (if we traverse the image in a raster-scan manner). N is the total number of 8x8 blocks in the image and given by (row x col)/64, "row" is the number of rows and "col" is the number of columns of the image. The normalized mean gray value of block n is found out using equation (4): ?'n = c00(n) / c00max where, c00max is the maximum value of c00(n). The normalized mean gray value of the image I is calculated using equation (5): ?’ = (1/N) ΣNn=1 c00(n) (5) (4) Figure 4: Variation of βn with ?n The plots for the above expressions are given in fig.1-fig.4.

3. INSERTION OF WATERMARK

Figure 5 gives the schematic representation of the insertion process. The steps for watermark insertion are discussed now. ? ? ? The original image I (to be watermarked) and the watermark image W are divided into blocks of size 8x8. (Both the images may not be of equal size). The DCT coefficients for each block of the original image are found out. For each block of the original image I, the normalized mean gray value ?’n is computed using eqn.(4) and are scaled to the range 0.1-1.0.

The variance of the AC DCT coefficients (σn) of block n is found using equation (6): σn = (1/64) ΣiΣj (cij - ?nAC)2 where, ?nAC is the mean of the AC DCT coefficients . The normalized variance of the AC DCT coefficients of block n is of the value given by equation (7). Let us denote the natural logarithm of σn as σ?n. (6)

? ? ? ? ? ?

The normalized image mean gray value ? is found out using equation (5). For the AC DCT coefficients, the normalized variances σ’n are computed using equation (7) and scaled to the range 0.11.0. The edge blocks are identified using the Sobel edge operator. The αn and βn are found by using equations (2) and (3). The DCT of watermark image blocks are found out. The nth block DCT coefficient of the host image I is modified using equation (1). The IDCT of modified coefficients give the watermarked image. Figure 7: Original "Lena"

Figure 5: Watermark Insertion Process

Figure 8: Watermarked "Lena" (Watermark over the whole image)

Figure 6: Image used as Watermark Fig. 6 shows the image used as watermark. Fig. 7 shows the original 'Lena' image. Fig. 8 shows the watermarked 'Lena image.

4. MODIFICATIONS TO MAKE THE WATERMARK MORE ROBUST

Figure 9: Hardware Image The algorithm proposed here and also that of the classification schemes proposed in [4] are not robust for images having very few objects and large uniform areas like in Fig.9 ('hardware image'). In [4] most of the blocks will be classified to be in one class for this type of image. If the algorithm discussed in Section 3 is applied then most of the blocks will have the same αn and βn values as is clear from Fig.10-Fig.11. The different αn and βn are sorted and displayed here to get a clear understanding of the situation. So in either of the cases, it is easy for a digital thief to remove the watermark from the watermarked image as it would be easy to predict the αn and βn values. We propose a modification to our above watermark insertion technique. After getting the βn values we classify them into two or three different groups. If more than 1/3 of blocks have the same value then we generate Gaussian random numbers with mean same as the normalized image mean and variance 1, and scale to the range [0,(βmax -βmin)/2]. Then the numbers are added to (subtracted from) βn of the largest group. The αn values are not disturbed to preserve the quality of the image. Fig.12 shows the watermarked 'hardware' image.

Figure 10: αn for "hardware" image

in different portions for different images. We have used lower values of αmin and αmax , and higher values of βmin and βmax to make the watermark more prominent even when the images are printed on paper. But when the watermarked images are to be viewed only through the internet, the typical values of αmin , αmax , βmin and βmax are 0.95, 0.98, 0.07 and 0.17 respectively. The visible watermark can be used in digital TV [8], digital library, ecommerce [1][2] etc. We are now trying to incorporate a mathematical model that takes more characteristics of the human visual system into consideration.

6. REFERENCES

[1] Yeung M.M., et al., "Digital Watermarking for HighQuality Imaging", Proc. of IEEE First Workshop on Multimedia Signal Processing, Princeton, NJ, pp. 357-362, June 1997. [2] Mintzer F., et al., "Effective and Ineffective Digital Watermarks", Proc. of IEEE International Conference on Image Processing ICIP-97, Vol.3, pp. 9-12, 1997. [3] Mintzer F., et al., "Towards Online Worldwide Access to Vatican Library Materials", IBM Journal of Research and Development, Vol.40, No.2, pp.139-162, Mar. 1996. [4] Kankanhalli M.S., et al., "Adaptive Visible Watermarking of Images", appeared in Proc. of ICMCS'99, Florence, Italy, June 1999. [5] Tao B. and Dickinson B., "Adaptive Watermarking in DCT Domain", Proc. of IEEE International Conf. on Acoustics, Speech and Signal Processing, ICASSP-97, Vol.4, pp.19852988, 1997. [6] Granrath D.J., "The Role of Human Visual Models in Image Processing", Proceedings of the IEEE, Vol.69, No.5, pp.552-561, May 1981. [7] Kankanhalli M.S., et al., "Content Based Watermarking for Images", Proc. of 6th ACM International Multimedia Conference, ACM-MM 98, Bristol, UK, pp.61-70, Sep. 1998. [8] Macq B.M, Quisquater J.J, "Cryptography for Digital TV Broadcasting", Proceedings of the IEEE, Vol.83, No.6, pp.944-957, June 1995. [9] Braudaway G. W., Magerlein K. A. and Mintzer F., “Protecting Publicly Available Images with a Visible Image Watermark”, Proc. of International Conference on Image Processing, 1997, Vol.1, pp. 524 -527.

Figure 11: βn for "hardware" image

Figure 12: Watermarked 'hardware' image

5. CONCLUSIONS

A visible watermarking technique has been proposed in the DCT domain. A mathematical model has been developed for this purpose exploiting the texture sensitivity of the HVS. We have also proposed a modification to increase the robustness of the watermark when used for images with very few objects. For more robustness, the watermark should not be made publicly available, the watermark should be used in different sizes and should be put

?

This work was done when the author was at the Indian Institute of Science, Bangalore, India