ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
FPGA Implementation of Image Adaptive Watermarking Using Human Visual Model Pankaj U. Lande¹, Sanjay N. Talbar², G.N. Shinde³ ¹University of Pune,S.G.G.S. ²E&T Nanded,³Indira Gandhi (sr.) college, Nanded ¹
[email protected],²
[email protected],³
[email protected] using information bit substitution for medical images in spatial domain is describe in [5] and Self embedding watermarking algorithm in spatial domain by using half toning method is proposed in [6].
Abstract In this paper we describing blind, robust and computational efficient algorithm in DHT (Discrete Hadamard Transform) domain. The algorithm was developed using the human visual system (HVS) based on DHT. This allows embedding the watermark with maximum gain factor within the imperceptible regions of the image. The algorithm was implemented on FPGA (Field Programmable Gate Array) and tested for various images. The objective is to develop the low power real time and reliable watermarking scheme. We have synthesized this prototype on Xilinx FPGA. The proposed scheme reports the less hardware utilization and robustness against the attacks1.
In the transform domain the pixel values are transformed into another domain by applying appropriate transform like DCT [7][8], DWT [9][10],DHT[11] etc. and then embed a watermark by modifying these coefficients. Watermarking scheme by using the multi resolution analysis property of DWT was reported in [12]. The embedding factor was based on the level of decomposition of the wavelets thus the scheme was adaptive in nature. Another method based on based on DWT and DHT is reported in [13].The algorithm uses the PN sequence to embed a binary logo image. But it was seen that the spatial domain watermarks are weaker than the frequency domain [3].
Keywords: HVS,PN,DHT,FPGA
1. Introduction Over the past few years, the technology of digital watermarking gained great successes as to solve the basic problem of legal ownership and content authentication for digital media such as like image, video, music etc. These problems arise due to advances in internet and computer technology in the recent years. Development in these two technologies coming together provides the tool for unlimited copying of data and share it on internet without any loss in fidelity [1]. Digital watermark is the information signal that contents the owner’s copyright information to protect the multimedia data. Later, watermark can be extracted from suspected image to verify the ownership identification [2]. There are three prominent methods for watermarking still images. These are spatial domain methods, transform domain and color space methods. Spatial domain methods provides algorithm that directly operate on the pixel values of the of the host image such as the LSB (Least Significant Bit) substitution [3], Information bit hiding in spatial domain for JPEG image is described in [4]. Multiple watermarking technique
Human visual system (HVS) has been characterized with several phenomenon that permits to adjust the pixel values to elude perception. These phenomenons are luminance sensitivity, frequency sensitivity and texture sensitivity. Human visual model based on the characteristics such as edges and textures are incorporated to determine the gain factor in watermarking. The distortion visibility is very low if the back ground is with the high texture. In a high texture block, energy is more distributed among the pixel block. Therefore if the block having a stronger texture can be embedding a signal with the larger gain and the block having low texture can be embedded with the less gain. This technique is beneficial when host image is attacked such as by the JPEG compression. In proposed algorithm we have used the quantization table based on DHT. The quantization table was derived using HVS and reported [10] for the compression of images in DHT domain. The binary image is used as a watermark for the host image. The proposed scheme of watermarking was verified for the various intentional attacks.
1
This study has been implemented on XC3SD1800A4FGG676C device platform. university of Pune.
17
ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
The paper is organized as follows section 2 and 3 describe about the DHT and human visual model used for watermarking. PN (Pseudo Noise) and watermark embedding architecture are described in section 4 and 5 respectively. Proposed watermark extraction algorithm is described in section 6. Obtained results are discussed in section 7 for the proposed watermarking system.
⎡+ ⎢+ ⎢ ⎢+ ⎢ 1 ⎢+ H8 = 8 ⎢+ ⎢ ⎢+ ⎢+ ⎢ ⎢⎣ +
2. Discrete Hadamard Transform Hadamard transform is used in many signal processing applications such as image and video compression [10].The elements of the basis vector of the Hadamard transform take the only the value of ±1 and are therefore well suited for digital hardware implementations. Hadamard transform involves the shorter processing time as the processing involves only simple integer manipulation. So computationally it is simpler to implement than the any other orthogonal transforms. 1 C (u, v) = N
N −1 N −1
∑∑ I ( x, y)(−1)
+ + + +
+
− + − + + − − + − − + +
− + −
+ − + −
− − + +
+ + − + − + − − + − + −
+ +⎤ + − ⎥⎥ − −⎥ ⎥ − +⎥ − −⎥ ⎥ + −⎥ − −⎥ ⎥ + − ⎥⎦
(4)
N −1
∑ [bi ( x )bi (u ) + bi ( y )bi (v )] i =0
(1)
x =0 y =0
Figure 1. Fast DHT
Let [I] represent the original image and [C] is the transformed image then the 2D transform can be given by
3. Human Visual System (HVS) The human visual system is investigated by several researcher [11][14]. The human visual system based on psychophysical process that relates with the psychophysical phenomenon like light intensity, spatial frequency and wavelength etc. In [11] proposed the modulation transfer function(MTF) which is incorporated with human visual system. H ( f ) = a (b + cf ) exp(−c( f )) d (5)
H n [ I ]H n (2) N Where the Hn represents the NXN Hadamard matrix [C ] = n
N= 2 where n=1, 2, 3…. The advantage of the hadamard transform is that they are elements are binary, real numbers and the row and columns are orthogonal. That is H n= H n* = H T = H −1 (3)
Where f is the radial frequency in cycles/degree of the visual angle and a, b and c are the constants. The modified version of this model was reported in [14] to calculate the quantization table. The modified model is a=2.2, b=0.192, c= 0.114 and d=1.1.respectively. The MTF of HVS has been successful applied to image half toning and image compression.
In the proposed watermarking algorithm the hadamard transform was applied to the 8X8 sub blocks of the image. To calculate the two dimensions it is first applied to row wise and then column wise. The hadamard transform takes only binary ±1 value. The actual multiplication can be carried out by simple operations like addition or the subtraction. The kernels for the forward and inverse are same. The signal flow graph as shown in Figure 1 shows the hardware implementation of the DHT. Fast DHT was implemented with 12 adders and 12 subtractors and 8 multipliers. To reduce the pin count of FPGA we divide the block of 8X8 in to 4X4 in this way the pin required was reduced to ¼. The 4X4 block read are stored in to temporary memory before performing a block operation. After the operation the block are again divide into 4X4 to read back in computer through JTAG cable. This approach increase the number of cycles required for the block processing but it reduces the number of pins required for the interfacing.
(
⎧2.2 0.192 + 0.114 fˆ (u , v) ⎪ ⎪* exp(−(0.114 fˆ (u , v )1.1 ) H (u , v) = ⎨ ⎪if fˆ(u,v) > f ⎪ ⎩1.0 otherwise
) (6)
Where fˆ (u , v) is the spatial frequency in cycles/degree and f is the frequency of 8 cycles/degree at which the exponential peak. To convert the horizontal and vertical frequencies in to radial visual frequencies. This quantization table was calculated for dot pitch of the computer display 0.25mm. 128X128 mm in height and width to display the 512X512 image. The appropriate distance for viewing is four times of the height. Table 1 shows the quantization table for the quality of Q=50.
18
ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
50
76
50
52
50
65
50
57
76
359
111
147
79
273
89
201
50
111
65
74
50
96
56
34
52
147
74
92
53
127
61
109
50
79
50
53
50
67
50
59
65
273
96
127
67
219
77
169
50
89
56
61
50
77
52
67
57
201
84
109
59
169
67
138
We have implemented sixteen such 4 bit leap forward LFSR to generate necessary 64 bit random number. This approach reduces the circuit complexity.
Table 1. Quantization Table (Q=50)
4. PN sequence generator To generate the PN sequence Leap forward LFSR(Linear Feedback Shift Register) was implemented in hardware. leap forward LFSR is methods uses only one LFSR and shift out several bit in parallel this makes them very fast to generate the particular random number with little increase in a hardware. It performs all shifts in one clock that is multiple steps are done to solve recurrence equitation. This method was developed from the observations of LFSR and the register state can be written as in vector format q(i + 1) = A • q (i ) (7)
Figure 2. 4 bit Leap Forward LFSR
5. Watermark embedding In this paper the image adaptive blind watermarking technique was used to insert the watermark in image in DHT domain. The 4x4 block of the image are feed to FPGA which are stored in temporary memory. The DHT was calculated for each block of 8X8 separately. The quantization table was stored in the memory. If the watermark bit was Mi=0 then the PN sequence was added to the block according to equation 11. ⎧ I i ( x, y ) + K * q( x, y ) * PN ( x, y ) if M i = 0 I w i ( x, y ) = ⎨ else ⎩ I i ( x, y ) (11)
In this equation q(i+1) and q(i) are the content of shift resister after (i+1) and ith step and A is a transient matrix. one can calculate the A and determine the structure accordingly. The 4 bit leap forward LFSR can be determined as given bellow. ⎡q0 ⎤ ⎡0 1 0 0 ⎤ ⎢ ⎥ ⎢0 0 1 0 ⎥ q1 ⎥ q = ⎢ ⎥ And A = ⎢ ⎢ q2 ⎥ ⎢0 0 0 1 ⎥ ⎢ ⎥ ⎢ ⎥ ⎣1 0 0 1⎦ ⎣⎢q3 ⎦⎥
The circuit can be implemented as follows ⎡q0 _ next ⎤ ⎡0 1 0 0 ⎤ ⎡q0 ⎤ ⎢ ⎥ ⎢0 0 1 0 ⎥ ⎢ q ⎥ ⎢q1 _ next ⎥ ⎢ ⎥ ⎢ 1⎥ = ⎢q ⎥ ⎢ ⎥ ⎢ q2 ⎥ 0 0 0 1 ⎢ 2 _ next ⎥ ⎢ ⎥ ⎢ ⎥ ⎢q3 _ next ⎥ ⎣1 0 0 1⎦ ⎣⎢q3 ⎦⎥ ⎣ ⎦
Where K is constant which decides the gain one can decide the proper value so that the watermark remains Imperceptible but it should be robust against the various attacks. The hardware implementation of this equitation is as show in figure 3.
(8)
(9)
Figure 3. Watermark embedding
After performing the matrix multiplications we can derive the feedback equation to generate the random number.
PN sequence is consisting of binary values 1 and 0 it can be embedded by using multiplier, adder and 2:1 multiplexer. The quantization number multiplied by a constant was added to the original coefficient. This process was performed for the total coefficients in the block
q0 _ next = q0 ⊕ q3 q1 _ next = q0 ⊕ q1 ⊕ q3 q1 _ next = q0 ⊕ q1 ⊕ q2 ⊕ q3
(10)
6. Watermark extraction
q1 _ next = q0 ⊕ q1 ⊕ q2
The watermark detection algorithm was implemented using MATLAB. The algorithm utilizes the blind watermark detection technique which means that the
19
ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
original image was not required for the watermark detection. The suspected image was divided in to 8X8 blocks and the DHT as calculated for each block. The PN sequence was generated with a user key. The correlation between DHT block and the generated PN sequence ρ is
seen from figures that the watermark is not perceptible, but at the same time it could be extracted without any error.
findout for each block. If the correlation coefficient ρi , as given by equation (4), is greater than the threshold
Td then message bit M i recovered as 0 else 1 where block number i=1, 2, 3. typical value of Td =0.6. ρi =
∑∑(B − B )(PN m
mn
− PN )
(11)
n
Fig. 4. (a) Original
Image
(∑ ∑ ( Bmn − B ) )(∑∑ ( PNmn − PN ) ) 2
m
n
2
m
Fig. 4. (b)Watermarked Image(K=0.1)
n
7.3. Image Performance Evaluation on Various Attacks
7. Experimental Result
The experiment was performed on more than 50 different images with different textures. Kutter and Petitcolas [15] have discussed various parameters to estimate any watermarking scheme. The watermark images are acceptable to the human visual system as the distortion introduced due to watermarking is less. (12) I m ,n I m ,n ∑ m .n NC = ∑ I 2 m ,n
The experimental results show the robustness of the technique to the intentional and unintentional attacks.
7.1. Synthesis and Implementation The chip was modeled using a Verilog and the functional simulation was performed. The code was synthesized on XC3SD1800A-4FGG676C device using AccelDSP tool from Xilinx. The results were verified using the hardware co-simulation using AccelDSP. The hardware cosimulation run at 33.3 MHz clock frequency and samples are fed to the target device at the rate of 448.76KSPS through JTAG USB cable. The design utilizes the 204 startup clock cycles and 203 clock cycles for per function call. The device utilization summary is given in Table 1.
m ,n
CQ
=
∑
I m ,n I m ,n
(13)
m ,n
∑
I m ,n
m ,n
IF = 1 −
∑
m ,n
( I m ,n − I w ) 2
∑
I
(14)
2
m ,n
Various performance evaluations metrics, like Image Fidelity (IF), Normalized cross correlation and correlation quality calculated from watermarked image for few popular images is given in Table II. Image NC CQ IF Lena 0.99 1 1 Carpet 0.99 1 1 City 0.99 1 1 Table 3. Quality Measures
7.4. Performance against Attacks
Figure 4 Screen shot of hardware co-simulation
The watermarked image was tested with various types of attacks. The most common attack was the JPEG compression. The results show that the proposed scheme withstand against the JPEG attack. The graph of the JPEG attack varies the BER (Bit Error Rate) is shown in figure 5. As we can see from the graph ac coefficients are distributed in DHT so that there is decrease in BER at some quality factor. The watermark was well detected upto 40% of JPEG quality.
Slices 56% Slice Flip Flops 43% 4 input LUTs 14% bonded IOBs 57% BRAMs 8% GCLKs 4% DSP48s 4% Table 2. Device utilization
It was observed that the watermark with stands after image preprocessing attacks like median filtering (7×7). The proposed scheme also tolerates noise attacks such as addition of Gaussian noise, salt and pepper noise. The results shows that proposed scheme can withstand the attacks if they are done intentionally or unintentionally.
7.2. Imperceptibility Fig. 4.(a) shows the original image with 512×512 and 8 bits per pixels. The watermarked image with gain K=0.1 and block size B (8×8) is shown in Fig. 4 (b). It can be
20
ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
[8] Juan R. Hernandez, Martin Amado, Fernando Perez-Gonzalez “DCT Domain watermarking technique for still Image: Detectors Performance analysis and New Structure”, IEEE Transaction on Image Processing, VOL.9, No.1, Jan 2000. [9] Pankaj U.Lande,Sanjay N.Talbar and G.N. Shinde “Hiding A Digital Watermark Using Spread Spectrum At Multi-Resolution Representation”, Internatational conference ACVIT, Aurangabad, India 2007 [10] K.Veeraswamy , S. Srinivaskumar, B.N.Chatterji “Designing Quantization Table for Hadamard Transform based on Human Visual System for Image Compression”ICGST-GVIP Journal, Volume 7, Issue 3, November 2007 [11] J.L. Mannos and D.J. Sakrison “Effect of visual fidelity criterion of images”,IEEE trans. information theory,vol.20,525-536, 1974. [12] Wan Azizun Wan Adnan1 S. Abdul-Kareem2 S.Hitam1 “An Adaptive Multiresolution Digital Watermarking” Proceedings of the International Conference on Electrical Engineering and Informatics Institut Teknologi Bandung, Indonesia June 17-19, 2007. [13] G.S.El-Taweel, H.M. Onsi, M.Samy, M.G. Darwish “Secure and Non-Blind Watermarking Scheme for Color Images Based on DWT” ICGST-GVIP Journal, Volume 5, Issue4, April 2005. [14] S. Daly. “subroutine for the generation of a two dimentional human visual contrast sensitivity function ” Tech.Rep.Eastman Kodak, 1987. [15] M. Kutter and F.A. Petitcolas, “A Fair Benchmark for Image Watermarking Systems”,Electronic imaging ,Security and Watermarking of Multimedia Contents, VOL. 3657, 25-32, 1999
----BER 80 70 60
BER
50 40 30 20 10 0 100
80
60
40
20
0
JPEG Quality
Figure 5. BER vs. JPEG quality Attacks BER Median filtering(3X3) 4% Gaussian noise 5% Paper and salt nose 7% Table 4. BER on various attacks
8. Conclusion The experimental results proved the robustness and Imperceptibility of the proposed scheme. The scheme performs well against attacks like JPEG compression and noise addition. The importance of quantization table to determine the watermark strength was proved by the algorithm. The experiment results also showed that the DHT well suited for the hardware implementations. The proposed scheme outperforms many present algorithms [10] in terms of various attacks and calculation of gain factor.
References [1] Er-Hsinen, “Literature Survey on Digital Image termarking,”EE381K-Multidimentional Signal Processing 8/19/98 [2] Chang and J. C. Chuan, “An image intellectual property protection scheme for gray-level images using visual secret sharing strategy,” Pattern Recognition Letters, vol. 23, pp. 931-941, June 2002. [3] N. Nikolaidis, I. Pitas, “Robust Image Watermarking in Spatial Domain”, International journal of signal processing, 66(3),385-403, 1988 [4] H. Arafat Ali “Qualitative Spatial Image Data Hiding for Secure Data Transmission”, GVIP Journal, Volume 7, Issue 2, August, 2007 [5] Mohamed Kallel, Jean-Christophe Lapayre et Mohamed Salim Bouhlel “A multiple Watermarking Scheme for Medical Image in the Spatial Domain” GVIP Journal, Volume 7, Issue 1, April, 2007 [6] Hao Luo · Shu-Chuan Chu · Zhe-Ming Lu“Self Embedding Watermarking Using Halftoning Technique” Circuits Syst Signal Process 27:155– 170, 2008 [7] Pankaj U. Lande, Sanjay N. Talbar and G. N. Shinde “Adaptive DCT Domain Watermarking For Still Images”, Internatational Conference RACE, Bikaner, Rajastan, India. 2007
21
ICGST-PDCS Journal, Volume 9, Issue 1, October 2009
Biographies Pankaj U.Lande received his BSc and Msc in Electronics science from University of Pune,Pune India in 2003 and 2005 respectively. He received a Late Satish Bhide award for the best project from university of Pune . Presently he is working as a lecturer in instrumentation science department, university of Pune, Pune, India. He has published two papers on digital watermarking technology in International conferences. His research interest includes Digital Image Processing Neural Network, Fuzzy logic.
Dr. G. N. Shinde is Principal in Indira Gandhi College, Nanded, Maharashtra, INDIA. He has received M. Sc. & Ph.D. degree from Dr. B.A. M. University, Aurangabad. He has awarded Benjongi Jalnawala award for securing highest marks at B.Sc. He has published 27 papers in the International Journals and presented 15 papers in International Conferences. In his account one book is published, which is reference book for different courses. He is also member of different academic & professional bodies such as IAENG (Hon Kong), ANAS (Jordan).He is in reviewer panel for different Journals such as IEEE (Transactions on Neural Networks), International Journal of Physical Sciences (U.S.A.), Journal of Electromagnetic Waves and Applications (JEMWA, U.S.A.). He was the Chairperson for F-9 session of International Conference on Computational and Experimental Science & Engineering which was held at Honolulu, U.S.A. He is member of Management Council & Senate of S.R.T.M. University, Nanded, INDIA. His research interest includes Filters, Image processing and Multimedia analysis and retrieval system.
Sanjay N. Talbar received his B.E and M.E degrees from SGGS Institute of Technology, Nanded, India in 1985 and 1990 respectively. He obtained his PhD from SRTM University, Nanded, India in 2000. He received the “Young Scientist Award” by URSI, Italy in 2003. He had Collaborative research programme at Cardiff University Wales, UK. Presently he is working as Professor and Head, Department of Electronics & Telecommunication Engg., SGGS Institute of Engineering & Technology Nanded, India. He has published 12 journal papers and more than 65 papers in referred National as well as International Conferences. His research interests includes Image processing, Multimedia Computing and Embedded System Design. He is a member of many prestigious committees in academic field of India.
22