Keywords

1 Introduction

The tremendous growth of high-speed LAN, WAN, MAN, and Internet technology have delivered means of new business, scientific, entertainment, and social prospects in the form of electronic broadcasting and marketing. The cost-effectiveness of sharing information and data in the form of digital documents, images, audios, and video sequences by transmission over high-speed computer networks is greatly improved due to the advancement in Internet technology. Moreover transmission of digital information through Internet is very fast, low cost, and last but not least mostly without losing quality. Editing, copying, and tempering of data are easy because one can get access to the data through various means. Furthermore, a copy of a digital record is indistinguishable from the original record. Therefore, copyright protection and content authentication are becoming increasingly difficult tasks for digital data. Encryption/decryption techniques can be applied to restrict access to the data. However, encryption technique is unsuitable whenever the important data or information is decrypted and that can be manipulated and freely shared over the network. Digital image watermarking techniques are widely used for copyright protection and content authentication. However, continuous efforts are required to improve its performance due to new requirements and challenges such as multiple attacks and information sharing on social media Web sites [1,2,3]. A lot of information, authentic documents, government circulars, photographs, audios, and videos are shared on whats app and facebook. These original documents and images are subject to manipulations using sophisticated signal/image processing algorithms. Typically original images undergo various forms of manipulations such as cropping, geometric translation, contrast enhancement, and compression before being shared on Web sites or apps. Also when these images are shared and transmitted through communication networks are vulnerable to noise attack. Digital image watermarking plays important role in protection and authentication of images through watermark. Watermark can be an image embedded into the original image through watermarking algorithms. Yet watermark image can be visually invisible and recognizable when recovered from the original image even after being prone to multiple attacks [4,5,6,7]. It is possible to identify, remove, or change embedded watermark through sophisticated signal/image processing algorithms. Watermark being the identity of the content owner needs protection even after removed from the original document or image or video. Encryption provides additional security to the original watermark image in the event of unauthorized watermark extraction and manipulation. By the application of transforms such as DFT, DCT, and DWT, watermarking can be applied in the frequency domain [4,5,6]. Watermarking techniques using DCT are found to be more robust as compared to simple techniques applied in temporal domain [8]. Transform domain algorithms are robust against common signal and image processing operations like contrast enhancement, low-pass filtering, brightness adjustment, blurring [9,10,11,12]. However, their disadvantages are computationally expensive, difficult to implement and weak against geometric attacks like rotation, scaling, cropping [11]. DWT through multiresolution analysis provides the much-needed simplicity in watermark embedding and extraction through watermark encryption. DWT decomposes image with a normalized basis set. Thus, it can embed the watermark in any frequency band of a cover image [3]. In this study, authors have proposed digital image watermarking technique based on discrete wavelet transform (DWT) and encryption. Watermark embedding and extraction algorithm are devised and results are compared using watermarking parameters and its resistance to attack. The paper is organized as Sect. 2 describes the embedding and extraction algorithm, Sect. 3 illustrates results and concluded in Sect. 4.

2 Watermark Embedding Algorithm

Firstly, an image encryption algorithm based on row and column rotation through random number generator key k of the watermark image is performed. In this paper, we have used 90 × 90 pixels grayscale baboon image as watermark. Figure 1 shows the original watermark image and encrypted image.

Fig. 1
figure 1

a Original watermark image b encrypted watermark image

Secondly, the original input image is decomposed using two-dimensional (2D) DWT to obtain the relevant scaled images with reduced size. Also, the encrypted watermark image is decomposed using 2D DWT to obtain decomposed scaled watermark images. Figure 2 shows the multiresolution decomposed images obtained after 2D DWT on original input and watermark image.

Fig. 2
figure 2

Decomposition of image through 2D DWT a original input image b watermark image

Thirdly, the pixel point at decomposed input image for embedding of the decomposed watermark image was identified based on Euclidean distance. More is the similarity between the input and watermark image, perceptibility of the input image does not change and increases the strength of watermark. Thus, it is more suitable for embedding watermark into the input image.

Fourthly, encrypted watermark was embedded into input image using (1) depending on the match between decomposed images of input and encrypted watermark image

$$ {\text{y}}({\text{i}},{\text{j}}) = \left( {1\,{-}\,{\text{alpha}}} \right)\,*\,{\text{i}}({\text{i}},{\text{j}}) + {\text{alpha}}\,*\,{\text{iw}}({\text{i}},{\text{j}}) $$
(1)

where alpha is visibility coefficient, i(i, j) are DWT coefficients of respective decomposed input image, iw(i, j) are DWT coefficients of respective decomposed watermark image, and y(i, j) are the DWT coefficients of the watermark embedded output image.

The process for the watermark embedding algorithm is shown in Fig. 3.

Fig. 3
figure 3

Watermark embedding algorithm

3 Watermark Extraction and Detection Algorithm

The watermark extraction is exactly reverse procedure of watermark embedding. The algorithm presented in this paper is non-blind and therefore requires original input image and encryption key for watermark extraction and detection. The similarity between the original watermark image and extracted watermark image was measured using three parameters: mean square error (MSE), normalized correlation coefficient (CC), and peak signal to noise ratio (PSNR). In general, value of CC > 0.75 and PSNR > 30 dB is considered acceptable. Also, it is necessary to evaluate these watermarking parameters at various signal processing attacks. Watermark extraction algorithm is shown in Fig. 4.

Fig. 4
figure 4

Watermark extraction algorithm

4 Results and Discussion

Watermark embedding and extraction algorithm was implemented using MATLAB software and executed on intel i5 processor with 1 GB RAM and 3 GHz processing speed. In this paper, Lena image of size 228 × 228 and baboon image of size 90 × 90 were selected as input and watermark images, respectively. Figure 5 shows the original input image, watermark image, watermark embedded image, and extracted watermark image.

Fig. 5
figure 5

a Original input image b watermark embedded image c original watermark image d extracted watermark image

The performance of the presented algorithm is evaluated through three parameters MSE, CC, and PSNR. Also, the comparison of the experimentally obtained parameters was performed under two different conditions with and without attacks. Three general attacks such as salt-and-pepper noise, geometrical attack through rotation and JPEG compression attack were considered. In this experiment, salt-and-pepper noise of density 0.01, compression ratio of 2, and rotation of 90° was added into the watermark embedded image. Figure 6 shows the three types of attacks on watermark embedded image used for extraction algorithms. Table 1 shows the watermarking parameters evaluated between original watermark image and extracted watermark image at various attacks and without attacks. Comparison of PSNR with other methods through DWT is given in Table 2.

Fig. 6
figure 6

Attacks on watermark embedded image a salt-and-pepper noise b rotation and c compression

Table 1 Watermarking parameters
Table 2 Comparison of PSNR (dB) values

Obtain results validate the presented watermark embedding and extraction algorithm. DWT along with encryption provides better robustness to the algorithm for three general attacks. It has especially demonstrated better robustness against compression attack. Presented algorithm is simple to implement and provides some security to watermark through encryption key that can be suitable for applications such as Facebook and what’s up that runs on android operating systems based devices.

5 Conclusion

In this paper, digital image watermarking algorithm through DWT and encryption for most common application facebook and whats app is presented. Robustness of the algorithm for general attacks such as salt-and-pepper noise, rotation, and compression is demonstrated. The presented algorithm is more suitable since simple convolution technique can be employed for computation of DWT, encryption with simple row and column rotation and pseudo-random number generator can be easily implemented on any device operating on android operating system. Further, robustness against geometrical distortions is focus of research in the implementation of watermarking algorithms.