112
8th International Conference on Electrical and Computer Engineering 20-22 December, 2014, Dhaka, Bangladesh
Design of an Improved Algorithm for Blind Digital Image Watermarking Using Both Grayscale and Binary Watermark in DFWHT Domain Sudip Ghosh,1,* Arijit Biswas,1 Santi P Maity,2 and Hafizur Rahaman1,2 1
School of VLSI Technology, Indian Institute of Engineering Science and Technology(IIEST) Howrah, Shibpur, West Bengal, India 2 Department of Information Technology, Indian Institute of Engineering Science and Technology(IIEST) Howrah, Shibpur, West Bengal, India *
[email protected]
Abstract—This paper focuses on the design of an improved DFWHT (Discrete Fast Walsh Hadamard Transform) domain robust, blind digital image watermarking algorithm. Both encoding and extraction algorithm have been verified using MATLAB R2013a. Here both grayscale and binary watermarks are possible for embedding and extraction using the same designed algorithm and only grayscale cover image of maximum size(256 x 256) is used. The speciality of this algorithm attracts to the fact that there is no requirement for any other information other than the received watermarked image to extract the watermark at decoding, which makes it blind watermarking. The time complexity of the proposed algorithm is of the order of O(n2) and it is simple to implement in hardware. Index Terms - Blind Digital Image Watermarking; DFWHT; Robust; time complexity; Binary and Grayscale watermark.
I. INTRODUCTION There are various ways by which digital watermarking [1] can be accomplished, such as image, text, video and audio for example. Several data embedding schemes are available for spatial [2] and transform domain (e.g. Discrete Fourier Transform[3], Discrete Cosine Transform[4], Discrete Wavelet Transform[5], Discrete Walsh Transform[6],[7]).Digital Watermark can be classified as visible and invisible watermark. In case of visible watermark the watermark is visible to normal eye such as company logo etc., but for invisible watermark the locations where the watermark is embedded is secret and known only to the authorized person. One of the important characteristics for watermarking is Robustness ,that is how good the watermark is to resist the common signal processing attacks such as Scaling, sharpening and geometrical transforms. The watermark which are not being able to resist the attacks are Fragile in nature, and watermark which can to some extent sustain the attacks are called Semi-fragile. Thus depending on the application for which the watermark is used, watermarking can be of several types. Modern day, to ensure Quality Of Service of a multimedia channel, digital watermarking is also used. For this purpose visible and fragile watermark can be used. For high security data transmission purpose invisible and robust watermark must be used. For embedding the data, several watermarking techniques are used, but transform domain watermarking are most widely used due to high robustness of the watermark. Among them the most popular for watermarking JPEG and JPEG 2000 images are DCT and Wavelet transform. However, it is been found out that DCT domain transform are much more robust 978-1-4799-4166-7/14/$31.00 ©2014 IEEE
to JPEG but not so robust to JPEG 2000 images. Reverse are true for Wavelet domain transforms. So proper watermarking scheme must be used which shows similar robustness for both JPEG and JPEG 2000 images. It is been reported in [6] that Hadamard and Hartley transforms, due to small values of the standard deviation for the processing noise provide higher resiliency at low quality compression compared to DCT and Wavelet transforms. In this paper, we have proposed the design of an improved invisible, blind and robust (with respect to sharpening and scaling) image watermarking algorithm in DFWHT [8] domain. The rest of the paper is organized as follows. Section II gives the basics of DFWHT. Section III describes the related works and motivation. Section IV states the proposed image watermark encoding and extraction algorithm in DFWHT domain. Section V focus on the detail description of the watermark encoding and decoding units. Section VI reports the analysis and experimental results. Section VII is the conclusion followed by the references. II. DISCRETE FAST WALSH HADAMARD TRANSFORM PRELIMINARIES Let [A] be the original image block and [H] be the Walsh transformation matrix then the Walsh transformed block can be viewed as [Y]= ([H][A][H])/N. (1) Here N is the order of the Hadamard matrix; H is a (N x N) Hadamard matrix of which all element are either +1 or -1. The elements of the Walsh Hadamard Matrix are simple and real valued. The inverse Walsh Hadamard transform is given by [A]= ([H][Y][H])/N. (2) Here we use the (8x8) Hadamard matrix given by
1 11 1 1 11 1 1 -1 1 -1 1 -1 1 -1 1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 1 1 -1 Fig. 1 Order 8 Hadamard matrix.
113
Here the first row and first column are DC values, and the rows in which the sign changes are AC values. III. RELATED WORKS AND MOTIVATION OF PROPOSED WORK Ho et.al.[6] proposed an algorithm in which the watermark image is transformed by Walsh Hadamard transformation. Then the cover image is partitioned into blocks of size (8 x 8) and the 16 watermark image coefficients values are inserted into cover image block by substituting the lower rows of the blocks which are the high frequency blocks. The scheme stated in [6] has left out the DC coefficient value (that is the first row and column values in the watermark image transformed block) while embedding other AC or high frequency values in a pseudo randomly selected blocks. Thus the disadvantage in [6] is that we have to separately send the DC values. It has been reported in [9] that processing noise increases drastically for high frequency DCT and Wavelet coefficient. On the other hand the high frequency Hadamard coefficients are much more immune to processing noise. Thus it is quite possible to embed data to the higher frequency bands of the Walsh Hadamard Transformed blocks than to DCT or Wavelet high frequency bands. Watermarking schemes using Walsh Hadamard Transform is also used in several works. In [10] binary watermark is embedding using spread spectrum techniques in Walsh Hadamard domain. In [11] the grayscale cover image with binary watermark is used which is also embedded using the spread spectrum watermarking and its dual mode architecture has been implemented. In our work we have proposed an improved algorithm over [6] and here in this paper we embed all the Walsh Hadamard transformed coefficients of the watermark image in the cover image, thus if we do not have any other value to be transmitted, the watermarked image has to be sent only making it blind. IV. PROPOSED IMAGE WATERMARKING ALGORITHM BINARY AND GRAYSCALE WATERMARK EMBEDDING Here a (256 x 256) size cover image is used and a (32 x 32) size grayscale watermark image of maximum pixel value of 15 is used to encode. A. Partitioning the cover image and Walsh Hadamard transformation The watermark image of size (32 x 32) is partitioned in (8 x 8) blocks. Then Walsh Transform is applied to all the blocks. Let the Walsh transformed blocks of the watermark image be denoted as 'w'. The transformed blocks are then converted to a linear array of size (1 x 1024). B. Row and Column selection and corresponding block selection The random selection of the block for inserting the watermark is inserted in by the user. To insert 8 coefficient values of the watermark image in the lowest row of the cover image selected block the row vector must have 32 random non repeating values as the watermark has 32 rows and 4 random non repeating values for column selection as in each row 8 values are inserted so 4 column select value is required. The selected row value let be 'm' and column value be 'n' are used to select the first element of the selected block in
which the watermark will be embedded. This element can be selected from the original image denoted as ‘G’, as G(((m-1)*8)+1),((n-1)*8)+1)).
(3)
The corresponding block thus can be selected by incrementing both row and column values from the initial pixel location, as incrementing the column value as ((m1)*8+1) to ((m-1)*8+8) and the row value as ((n-1)*8+1) to ((n-1)*8+8). Thus the complete block is selected. This block is Walsh Hadamard transformed. C. Inserting watermark data The one dimensional block of Walsh Hadamard transformed data is embedded in the last row of the selected transformed cover image block denoted as 'X" as X(8,1 to 8) = w(1, k to (k+7)).
(4)
Here k is used to select the corresponding value to be embedded in the block, where k is initially to 1. D. Watermarked image generation The watermarked block is then inserted back into the original image after applying inverse Walsh Hadamard transform on 'X'. We then round up the values and the block is now denoted as 'X1'.This block is then inserted into the region of the image where it was initially taken from. Thus we get the watermarked image denoted as 'G1'. E. Error values transmitted For correct decoding of the transmitted watermark the fractional values which are generated due to Walsh transformation are stored in a matrix as E=X1-X.
(5)
Again let the image right before the transmission be denoted G2.Now it may be possible that due to some reason some values which were actually embedded is altered then this error is also taken into account as E1=G1-G2.
(6)
Thus the total error value transmitted is Etotal=E1-E.
(7)
Thus this is the complete encoding method where along with the transformed the error Etotal is transmitted. BINARY AND GRAYSCALE WATERMARK EXTRACTION We receive the watermarked image G2 along with the error value Etotal. A. Generating the decodable block The received image G2 and error Etotal is used to generate the block from which we can decode the watermark as Y=Etotal + G2.
(8)
114
B. Selecting the proper block From the row and column value which was used at the time of encoding can be used here also to find out the corresponding block. C. Inverse transform and finding the embedded data The last row of the corresponding block is stored in a one dimensional array of size (1 x 1024), this is the decoded transformed value of the watermark. D. Watermark decoding The linear array is converted to (32 x 32) block which is then inverse Walsh transformed as (8 x 8) block and stored in a (32 x 32) matrix, which is the watermark image. Thus we get the decoded watermark image. V. DESCRIPTION OF THE WATERMARK ENCODING AND DECODING UNIT The block diagram of the watermarking method is divided in encoding and decoding blocks. The block diagram of the encoding block is shown in Fig. 2. row Cover Selected FWHT column image block (8X8)
Water mark
FWHT as blocks
Linearize
Embedding
Round Off watermarked image Error
IFWHT Subtraction
Fig. 2 Block diagram of the watermark encoding block.
The cover image considered here is of size (256 x 256) and the watermark is of size (32 x 32). Here the row and column select values are used to select a particular block from the original image. The row and column select value are inserted by the user at the time of embedding as linear arrays. Then the selected block is Fast Walsh Hadamard Transformed (FWHT). The watermark is also broken in blocks of size (8 x 8) and passed through FWHT block. Equation (4) is used for the Embedding block for performing the watermarking process. After embedding, the block is inverse transformed by the block IFWHT. The inverse transformed values are round off. These blocks are then embedded back in the original cover image to the place which was selected by the row and column select values and thus we get the watermarked image. Thus the Watermarked image and the error value is transmitted along with the image. This is the complete operation of the encoder block. Here the error while transmitting the image is not considered as the process used by the transmitter to transmit the image is not exactly known. To decode the watermark the decoder block is used .The block diagram for the decoder shown in Fig. 3. The decoder block gets as input the received watermarked image and the error values. These values are added to get the actual image block generated at the transmitter before rounding off the value for transmission. The row and column select values used at the transmitter is also used here for the selection of the proper block. The selected block is passed through the FWHT block. As the watermark was initially embedded in the last row of the block, the last row is selected and put in a linear array.
Error
Received image
Adder
Watermarked image
Row Column Linear array
Select last row
2 dimensional array
FWHT
IFWHT as block of (8 x 8)
Selected block Received watermark
Fig. 3 Block diagram of the watermark decoding block.
The linear array is converted to two dimensional array. The two dimensional array is then inverse transformed block wise then combined to get the original watermark. Thus by using this architecture we can get the original watermark. VI. ANALYSIS AND EXPERIMENTAL RESULTS After performing the above stated algorithm in Matlab the following results have been obtained. For Matlab simulation we used a (256 x 256) cover image and (32 x 32) and (64 x 64) watermark. The operation has been performed on both grayscale and binary watermark and the result obtained is illustrated in Table I. Here the index on which we have stated the quality of watermarking is the Mean Squared Error (MSE) and Peak Signal to Noise Ratio (PSNR). TABLE I PERFORMANCE METRICS OF THE PROPOSED WATERMARKING ALGORITHM
Type of image
Gray scale image
Encoded image index Water mark image size 32x32
64x64 Binary Image
32x32
8
Peak Signal to Noise Ratio(dB) 46.869
17
52.03
0.472
8
42.58
3.588
17
45.99
1.1134
1
69.81
0.0065
Normal ization value
Mean Squared Error(MSE) 1.3372
The normalization factor used here is the amount by which the pixel value is divided by, that is ,if the intensity of a pixel be 255 then after normalization by 17 we get the maximum pixel value as 15. Here are few image examples,
(a)
(b)
(c)
(d)
Fig. 4 Watermark embedding and decoding for (64 x 64) grayscale watemark: (a) is the cover image,(b) is the watermark,(c) is watermarked image,(d) decoded watermark
115
(a)
(b)
(c)
(d)
Fig. 5 Watermark embedding and decoding for (32 x 32) binary watemark: (a) is the cover image,(b) is the watermark,(c) is watermarked image,(d) decoded watermark
Now we have applied some common watermark attacks such as image sharpening and image scaling to see how the decoded watermark looks like. TABLE III DIFFERENT WATRMARK ATTACKS
Original watermark
Difference watermarks after operations Received Operation watermarks Scaling by 0.75 Sharpening
Grayscale Cropping
Binary
Sharpening + Cropping
perform the operation both row and column wise of the block , hence it has time complexity O(n2). In case of the decoder the row selection block is same as the encoder. For selection of the last row from the selected block, we fix the row value to 7 and then the column values are incremented, thus the time complexity here is O(n). The last row values stored in the linear array is transformed in the 2 dimensional matrix to get the original watermark, thus here also two loops are needed, thus the time complexity is O(n2). VII. CONCLUSION From the above discussion we can finally draw some concluding remarks as: If the error value is not there , that is if the normalization used in the Walsh-Hadamard transform is not taken in consideration and if there is no error while transmission, then the proposed algorithm can be completely blind, which is an improvement over[6] that is we do not need any new values to be transmitted along with the image. The maximum value of the pixel which can be embedded without affecting the quality of the watermarked image is 32, that is each pixel can be represented by 5 bits in binary. The ratio of the of the cover image to the watermark must not be more than 8:1,that is if the cover image be of size (256 x 256) the watermark must be of size maximum (64 x 64) . For higher size of watermark, higher size of cover image is required, else the quality of the watermarked image will degrade. For embedding and decoding unit the time complexity is compatible to be implemented in hardware. In our proposed algorithm, both binary as well as grayscale watermark can be embedded and extracted which is an added advantage. REFERENCES
The algorithmic time complexity of different blocks of both encoder and decoder are shown in the Table III as TABLE IIIII ALGORITHMIC TIME COMPLEXITY OF DIFFERENT BLOCKS
Unit Encoder
Blocks Block Selection Linearization Embedder
Decoder
Time Complexity
O(n2) O(n2) O(n2)
Selection of last row O(n) Linear array to 2 dimensional array
O(n2)
The encoder has several blocks, we here select the block with size ( n x n). The block selection block uses both row and column values, since both row and column values are to be selected thus we use two loops thus the time complexity is O(n2). For linearization again we have to use array of the size 'n2', Thus here the time complexity is also O(n2). The embedder unit has first n.(n-1) elements at the output linearly, but the last row of the matrix is transmitted by logically substituting the lowest row of the original matrix by the transformed watermark image values. Thus here also we
[1]
S. Katzenbeisser and F. Petitcolas , Information Hiding Technique for Stenography and Digital Watermarking, Artech House , London, 2000. [2] N. Nikolaidis and I. Pitas,"Robust Image Watermarking in the Spatial Domain," Signal Processing, vol. 66, no. 3,pp. 385-403, 1998 [3] Xiu-mei Wen,Wei Zhao, Fan-xing Meng, “Research of digital image watermarking algorithm resisting geometrical attacks in Fourier domain,” International Conference on Computational Intelligence and Security, pp. 265-268, 2009. [4] C. Pradhan, V. Saxena and A. K. Bisoi, “Non-Blind digital watermarking technique using DCT and cross chaos map,” International Conference on Communications, Devices and Intelligent Systems, pp. 274-277, 2012 [5] Yingli Wang, Xue Bai, Shuang Yan, “Digital image watermarking based on texture block and edge detection in discrete wavelet domain,” International Conference on Sensor Network Security Technology and privacy Communication System, pp. 170-174, 2013. [6] A. T. S. Ho, J. Shen, S. H. Tan and A. C. Kot, "Digital image-in-image watermarking for copyright protection of satellite images using the Fast Hadamard Transform," IGARRS, pp. 3311-3313, 2002. [7] Amani Bin Sewaif, Mohammed Al-Mualla and Hussain Al-Ahmad, "Walsh-coded signatures for robust digital image watermarking," IEEE conf. 2004,pp. 431-434. [8] K. Beauchamp, Applications of Walsh and Realted Functions with an Introduction to Sequence theory, Academic Press, London,1984. [9] M. Ramkumar, A. N. Akansu, "Capacity estimates for data hiding in compressed images," IEEE Transactions on Image Processing, pp. 1252-1263, 2001. [10] S. P. Maity, M. K. Kundu and S. Maity, "Dual purpose FWT domain spread spectrum image watermarking in real-time,"Elsevier Journal of Computers and Electrical Engineering.Volume 35, Issue 2, March 2009, pp. 415–433 [11] S. Ghosh, S. Talapatra, J. Sharma, N. Chatterjee, Hafizur Rahaman and Santi P Maity, “Dual Mode VLSI Architecture for Spread Spectrum Image Watermarking using Binary Watermark” (ICCCS-2012) from 6-8 October 2012 at NIT Rourkela, India. pp: 784-791