Mathematical Problems in Engineering

Volume 2017 (2017), Article ID 3509258, 10 pages

https://doi.org/10.1155/2017/3509258

## An Efficient Image Watermarking Method Based on Fast Discrete Cosine Transform Algorithm

^{1}Department of Computer Science and Information Engineering, Chang Jung Christian University, Tainan City 701, Taiwan^{2}Asian Institute of Telesurgery, Changhua County 500, Taiwan^{3}Department of Aeronautics and Astronautics, National Cheng Kung University, Tainan City 701, Taiwan

Correspondence should be addressed to S. E. Tsai

Received 15 February 2017; Revised 24 May 2017; Accepted 21 June 2017; Published 16 August 2017

Academic Editor: Raffaele Solimene

Copyright © 2017 S. E. Tsai et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper proposes an image watermarking method based on the fast discrete cosine transform (DCT) algorithm for implementation in digital signal processor. A digital watermark can be effectively embedded and efficiently extracted without the host image. The keys in watermarking process include four frequency coefficients in DCT, two random permutation vectors, and a quantization matrix for normalizing the watermark and the host image. The fast DCT algorithm has been shown to reduce the complexity of two-dimensional image transformation so that embedding/decoding an image watermark can be completed in real time within 0.33 seconds. The quality of both watermarked image and extracted (retrieved) watermark remains excellent. It is shown that the watermarking method is efficient in and robust to data cropping, transmission loss, and compression/decompression.

#### 1. Introduction

Conventional technique of embedding watermark signals or patterns into digital image is to insert a secret bit string in spatial, frequency, or wavelet domain. In spatial domain watermarking, the human visual system (HVS) is applied to assure that modifications of an original image by embedded watermark are imperceptible. Koz and Alatan [1] applied the temporal contrast threshold of HVS to prevent image distortion after watermarking, but the watermarked image is vulnerable to data transmission. Kaur et al. [2] proposed a technique to substitute the blue component of image pixels with character bits, but it is also vulnerable to signal processing attack. Agarwal [3] embedded a watermark with data encryption which required substantial data capacity thus leading to low image quality. Tyagi et al. [4] also applied the least significant bit (LSB) to achieve high security at the price of lower image quality. Nath et al. [5] proposed a method for hiding encrypted secret message inside a cover file, which again is vulnerable to data compression and attack. Sara et al. [6] selected the pixels with higher intensity to embed watermark bits by LSB. A major constraint of the above studies is that they all require the original image data to decode the watermark.

In “blind” watermarking, Chadha et al. [7] proposed a method based on LSB and discrete cosine transform (DCT) for decoding watermark without the original image, but the method is sensitive to common image compression. Surrah and Mohamed [8] presented a binary data hiding algorithm by changing the position of every image block to increase security. Wang et al. [9] proposed watermarking by quaternion Fourier transform, but the image quality was reduced significantly by the embedded watermark. With Joint Photographic Experts Group (JPEG) adopting DCT to its compression process, many watermarking methods based on DCT have been developed. Benoraira et al. [10] proposed embedding the watermark bits sequence in both DCT and discrete wavelet transform (DWT) to guard against attack, but the procedure is computational intensive. A watermarking technique based on the so-called wavelet-tree [11] and another based on DWT [12] were also proposed achieving better robustness; however, both required substantial computation with large data capacity.

Singular value decomposition (SVD) is desirable for implementation together with DCT or DWT because it requires extensive computations if applied separately onto images. Rawat and Raman [13] proposed an SVD-based watermarking scheme to increase security in copyright protection. Makbol and Khoo [14] and Lagzian et al. [15] also developed image watermarking schemes based on DWT and SVD to achieve robustness against image processing, but the computational load was substantial. Hu and Hsu [16] proposed image watermarking with DWT-SVD-DCT features to guard against compression. Mishra et al. [17] applied a firefly algorithm based on DWT and SVD for watermarking, but the encryption is time consuming. The above SVD-based watermarking may have good robustness against JPEG compression; however, the embedded watermark becomes vulnerable because all pixels would be changed when one singular value is modified. This paper presents an efficient digital image watermarking method based on the fast DCT algorithm for real-time application. It is shown that the watermarked image quality, robustness, and computation loading can all be improved.

#### 2. Embedding Watermark by the Fast DCT Algorithm

Consider an 8-bit gray-level original image** S** and an image watermark** W**,where and are integers, . The original image** S** is divided into nonoverlapping pixel blocks of size and then transformed into frequency domain. Each block is processed independently by two-dimensional (2D) DCT into matrix** F**. The fast DCT algorithm [18] is applied to decompose the 2D DCT into a pair of 1D DCTs for computation efficiency. For a digital image** S**, the 2D DCT matrix** F** in frequency domain and its inverse transform back to spatial domain can be written in matrix form by where matrix with being the elements in the th row and th columnThe 2D spatial data matrix in (2b) is the linear combination of the base images, which are obtained by the outer product of the column and row vectors of** M**. By exploiting the redundancy in DCT coefficients, it can be shown that the fast DCT algorithm can reduce the complexity of a 2D DCT of 8 × 8 block from** S** to** F** in (2a) in only 24 multiplications, and the inverse transform from** F** to spatial domain in (2b) is simply the transpose of the DCT matrix** M** [18].

Watermarking is performed first by decomposing a true color image into RGB components, and the watermark should be embedded in the main composition of the original image to maintain image quality after watermarking. For example, an image rich in blue shall be watermarked with gray-level blue watermarks. Due to the lower sensitivity of human eyes to blue light, it is recommended to embed watermark in blue component if one cannot determine the main composition of the image. The image embedding process of the watermarking method as shown in Figure 1 includes computation optimization by the fast DCT algorithm and its inverse transform, selection of the middle frequency coefficients, permutation of the watermark, and quantization (normalization) of the watermark and the host image. A spatial domain image** S** is processed by the fast DCT algorithm into spectral domain** F**. Intuitively a watermark should be embedded into the higher frequency coefficients in DCT for better perceptual invisibility. However, the image “energy” is concentrated in the low frequency coefficients (e.g., the 0th~5th coefficients in Figure 2) so that the information embedded (hidden) in the high frequency coefficients (the 28th~63th coefficients) may be vulnerable to data processing. To maintain the quality of a host image after watermarking and to improve the robustness of a watermarked image against data processing, it is recommended to embed the watermark in some of the middle frequency coefficients (the 6th~27th coefficients) as shown in the light color region of Figure 2. Because the host image of size and the watermark are divided into nonoverlapping pixel blocks of size 8 × 8, the number of the middle frequency coefficients selected for embedding the watermark is ()^{2} such that the sizes of the host image and the watermark are compatible. For an 8-bit original image of size 256 × 256 () and 8-bit digital watermark of size 64 × 64 (), 4 middle frequency coefficients in each of the 8 × 8 blocks from the host image are needed to embed the watermark. The image block composed of these middle frequency coefficients is denoted as in frequency domain.