COLOR DIGITAL IMAGE WATERMARKING BASED ON HVS MODEL IN DCT DOMAIN Peter Foriš, Rastislav Hovančák, Dušan Levický Department of Electronics and Multimedia Telecommunications, Technical University of Košice, Park Komenského 13, 041 20 Košice, Slovak Republic. Tel: +421-55-6338659; Fax: +421-55-6323989 E-mail:
[email protected],
[email protected],
[email protected] Abstract In this paper a digital watermarking method for color images by using Human Visual System (HVS) model is presented. Watermark embedding is performed in discrete cosine transform (DCT) domain of chosen color image component in selected color space. The HVS model consists of two parts. The first part is the HVS model in DCT domain based on frequency sensitivity, luminance sensitivity and neighborhood masking. The second part is the HVS model based on Region of Interest (ROI). The thresholds of HVS model are used to select perceptually significant DCT coefficients and at the same time to determine the amount of modification of selected coefficients in watermark embedding process. Watermark detection is performed without use of original image and the watermark is in form of real number sequence with normal distribution zero mean and unit variance. 1 Introduction Digital watermarking is a promising solution of ownership protection and authentication problem of digital multimedia. It is defined as a technique of embedding additional information called watermark into digital multimedia while preserving perceptual quality of watermarked data. The watermark can be detected or extracted for purpose of true owner identification or integrity verification of tested data [1]. 2 HVS model in DCT domain for color images The discrete cosine transform is widely used in signal processing applications and many compression standards. HVS model in DCT domain was designed for image compression purposes. Most HVS models in image processing use three basic properties of human vision: frequency sensitivity, luminance sensitivity and masking effects. Just Noticeable Difference (JND) thresholds of frequency sensitivity Tφ (u , v ) for color image components of YOZ color space were determined by psychological experiments and can be approximated by the following equation ⎧ ⎛ ⎞ Tmin φ ( f u2,0 + f 0,2v ) 2 log ⎜ 2 ⎪ ⎟⎟ 2 2 2 2 ⎜ ⎪ ⎝ ( fu ,0 + f 0,v ) − 4(1 − rφ ) f u ,0 f 0,v ⎠ log Tφ (u , v) = ⎨ ⎞ Tmin φ ( f u2,0 + f 0,2v ) 2 ⎪ ⎛ 2 2 2 ⎪log ⎜⎜ ( f 2 + f 2 ) 2 − 4(1 − r ) f 2 f 2 ⎟⎟ + Sφ (log f u ,0 + f 0,v − log f min φ ) 0, v φ u ,0 0, v ⎠ ⎩ ⎝ u ,0
ak fu ,v ≤ f min φ
(1) ak f u ,v > f min φ
where fu ,0 , f 0,v are vertical and horizontal spatial frequency, respectively, Tmin φ is the minimum threshold occurs at spatial frequency f min φ , Sφ determines the steepness of the parabola, rφ is the model’s parameter and φ is the index of color image component [2]. The JND thresholds in YOZ color space can be converted to other color spaces. The only condition is the linear dependency between YOZ color space and the required color space. If
M YOZ is the conversion matrix form color space DEF to color space YOZ then the conversion of JND thresholds from YOZ color space to required DEF color space can be expressed by the following equations DEF
TD (u, v) =
⎧⎪T (u, v) T (u, v) T (u, v) ⎫⎪ ⎧⎪T (u, v) T (u, v) T (u, v) ⎫⎪ 1 1 min ⎨ Y , O , Z min ⎨ Y , O , Z ⎬, TE (u, v) = ⎬ C(u)C(v) C ( u ) C ( v ) M M M M M M3,2 ⎭⎪ 1,1 2,1 3,1 ⎭ 2,2 ⎪ ⎩⎪ ⎩⎪ 1,2
,(2)
⎧⎪T (u, v) T (u, v) T (u, v) ⎫⎪ 1 TF (u, v) = min ⎨ Y , O , Z ⎬ C(u)C(v) M M M3,3 ⎭⎪ 1,3 2,3 ⎩⎪
where C (u ), C (v ) are DCT normalization constants and M i , j are elements of conversion matrix
DEF
M YOZ . Examples of DEF color spaces are RGB, YCrCb, YUV, YIQ and XYZ.
JND thresholds in each color image component can be further corrected by luminance sensitivity. Luminance sensitivity is a nonlinear function of the local image characteristics and performs the correction of JND thresholds of frequency sensitivity according to the change of background or mean luminance. The thresholds of luminance sensitivity in individual color image components can be given by following equation aT
⎛ y (0, 0, k ) ⎞ Tφ (u , v, k ) = Tφ (u , v). ⎜ Y ⎟⎟ , ⎜ y 0,0 ⎝ ⎠
(3)
l
where yY (0, 0, k ) is the DC coefficient for block k in luminance component, y0,0 is the DC coefficient corresponding to the mean luminance of the display, and aT is a parameter which controls the degree of luminance sensitivity. Thresholds of luminance sensitivity are further corrected by neighborhood masking. Masking refers to the effect of decreasing visibility of one signal in the presence of another signal called masker. Thresholds of neighborhood masking are given by ⎡ ⎛ −π ((u −um )2 +( v−vm )2 ) ⎢ ⎜ ⎛ 2 2 2 ⎞ ⎢ ⎜ ⎜⎝ϕ .max(1, u +v ) ⎟⎠ yφ (um , vm , k ) c l Tφ (u, v, k ) = Tφ (u, v, k ).max ⎢1, e ⎜ Tφl (u, v, k ) ⎢ ⎜ ⎢⎣ ⎝
⎞ ⎟ ⎟ ⎟ ⎟ ⎠
wu ,v ( k )
⎤ ⎥ ⎥, ⎥ ⎥ ⎥⎦
(4)
where yφ (u m , vm , k ) is the value of the DCT coefficient in block k that acts as a mask of coefficient yφ (u , v, k ) , ϕ is a model’s parameter and wu ,v ( k ) controls the degree of masking effect and it can take different values for different spatial frequencies and different image blocks. The values of this parameter were determined by using Noise Visibility Function (NVF) according to the following equation ⎧ λ M M φ ⎪ 3M 2 ∑∑ (1 − NVF (u , v, k ) ) ak ⎪ u =1 v =1 wuφ,v (k ) = ⎨ M M λ ⎪ (1 − NVF φ (u, v, k ) ) ak ⎪⎩ M 2 ∑∑ u =1 v =1
M
M
∑∑ NVF φ (u, v, k ) < M u =1 v =1 M
M
∑∑ NVF φ (u, v, k ) = M u =1 v =1
2
P
,
(5)
2
P
where λ determines the maximal value of this parameter according to the robustness requirements of embedded watermark, NVF φ (u, v, k ) are values of NVF in block k , M is the size of block and NVFPφ (u, v, k ) is the thresholded NVF which detects sharp edges in an image. The most known form of NVF is given as
NVF φ (i, j ) =
1 , 1 + θ Vφ (i, j )
(6)
where Vφ (i, j ) denotes the local variance of the image in a window centered on the pixel with coordinates (i,j), 1 ≤ i , j ≤ L and θ is a tuning parameter [4]. 3 HVS model based on Region of Interest The density of photoreceptors on a human’s eye retina is nonuniform and thus determines the spatial resolution of HVS. The eye is most sensitive at the point of fixation which is the center point of Region of Interest (ROI) and its sensitivity decreases rapidly while the eccentricity gets larger. The contrast thresholds as a function of eccentricity can be given by equation ⎧ exp(0, 0461. f .e(ϑ , x)) TROI (ϑ , f , x) = ⎨ ⎩exp(0, 0461. f m ( x ).e(ϑ , x ))
for f ≤ f m ( x) , for f > f m ( x)
(7)
where x is a pixel position in an image, x denotes a pixel position where TROI reaches its maximum and after that point remains constant and f m ( x) is the cutoff frequency. These thresholds of HVS model based on ROI are used as weights for JND thresholds of frequency sensitivity of HVS model in DCT domain according to the equation ⎛ β .TROI (ϑ , f , xk ) ⎞ , Tφ f (u , v, k ) = Tφ (u , v ). ⎜ 1 + ⎟ 100.max(TROI ) ⎠ ⎝
(8)
where xk = x from block k: min ( x − xROI ) , xROI is the center point of ROI and β [%] controls the impact of HVS model based on ROI on final HVS model. These thresholds are further corrected by luminance sensitivity and neighborhood masking [3]. 4 Watermark embedding In watermark embedding process the original color image is first converted to required color space and one color component to be watermarked is selected. This selected color image component is transformed by using 2D DCT with block size 8x8. Then the visibility thresholds Tφc (u , v, k ) of neighborhood masking for selected color component are computed. In the next step by using a secret key the watermark in form of a real number sequence with N(0,1) distribution is generated. Watermark embedding is described by equation. ⎧⎪ y (u, v, k ) + Tφc (u, v, k ).W (u, v, k ). if yφ (u, v, k ) > Tφc (u, v, k ) , yφW (u, v, k ) = ⎨ φ yφ (u, v, k ) otherwise ⎪⎩
(9)
where yφ (u , v, k ) and yφW (u , v, k ) are DCT coefficients of selected color image component before and after watermark embedding. In the end the modified and unmodified DCT coefficients are transformed back by using 2D IDCT and the watermarked image is obtained. 5 Watermark detection Watermark detection does not need the original image. The test image is first converted to color space of embedding process and then the selected color image component is transformed by using 2D DCT with block size 8x8. Then the visibility thresholds of frequency sensitivity Tφ f (u , v, k ) are computed. These visibility thresholds are used to select perceptually significant DCT coefficients. Next by using a secret key the watermark in form of a real number sequence with N(0,1) distribution is generated. The detection of watermark is performed by correlation between selected perceptually significant DCT coefficients and
the watermark scaled by visibility thresholds of HVS model. In the end according to the correlation the decision about watermark presence in the test image is made. 6 Experimental results Verification of the proposed method has been performed on the color image “Lena” (256x256) in RGB color space. The watermarked image was tested for quality of attacked images and robustness against various types of attacks (JPEG (Q=30), JPEG2000 (0.5 bpp), Cropping (1/2), Wiener filtration (3x3), Gaussian noise (σ=0,005), Resize (1/2), Rotation (0.5°), Brightness change (+30), Gamma correction (0.5)). Experimental results are shown in Tab.1. In the detection process always 500 different watermarks were tested. Among them only one was really used in watermark embedding process therefore correlation should have given only one significant peak. Tab. 1 Experimental results (N - watermark detection failed) R G B Attack PSNR Corr. PSNR Corr. PSNR Corr. [dB] Coeff. [dB] Coeff. [dB] Coeff. No attack JPEG JPEG2000 Cropping Filtration Gauss. noise Resize Rotation Brightness Gamma
42,416 29,451 29,456 7,4977 34,993 23,086 39,177 26,205 18,699 14,129
994,67 N N 1117,4 649,87 474,35 912,67 476,48 942,41 1003,4
45,545 29,424 29,446 7,4981 35,218 23,113 40,366 26,262 18,706 14,129
115,16 69,457 N 124,76 55,892 26,056 92,049 38,734 114,97 126,28
44,858 29,505 29,49 7,498 35,054 23,106 39,92 26,246 18,704 14,13
7068,3 N N 8062,4 6454,8 6833,3 6686,9 5673 7065,7 8838
6 Conclusion In this paper a new method of invisible color image watermarking in DCT domain by using HVS models has been presented. Watermark embedding was performed in color image components of RGB color space. Experimental results showed that the best results were obtained by watermark embedding into G color image component of RGB space. Acknowledgments The work presented in this paper was supported by Grant of Ministry of Education and Academy of Science of Slovak republic VEGA under Grant No. 1/1057/04. References [1] Katzenbeisser, S., Petitcolas, F. A. P.: Information Hiding Techniques for Steganography and Digital Watermarking. Artech House, ISBN 1-58053-035-4, 2000. [2] Peterson, H. A., Ahumada, A. J., Watson, A. B.: An Improved Detection Model for DCT Coefficient Quantization, Proc. SPIE Conf. Human Vision, vol. 1913, pp. 191201, 1993. [3] Levický, D., Foriš, P.: Human Visual System Models in Digital Image Watermarking. Radioengineering, vol. 13, no. 4, pp. 38-43, 2004. [4] Voloshynovskiy, S., Herrigel, A., Baumgartner, N., Pun, T.: A Stochastic Approach to Content Adaptive Digital Image Watermarking. Proceedings of the Third International Workshop on Information Hiding, pp. 211-236, 1999.