1 Introduction

Digital image watermarking entails embedding some information such as text, image or some other type of information entity as watermark into a digital image called the cover image. The embedding strategy is typically chosen to maximize the payload or the amount of watermark information that is embedded without compromising the visual integrity of the cover image and also ensuring robustness against intentional or unintentional attacks. The embedded watermark can be utilized for various purposes including image authentication, proving ownership, copyright protection etc. [1] Watermarking techniques can be classified into different categories based on a variety of considerations. Some of these are as follows.

i.:

Digital image watermarking is classified into two categories i.e. blind and non-blind watermarking based on the implementation method. Blind watermarking is the most challenging one as it does not require the availability of original cover image at the time of watermark extraction. Non-blind techniques require the original cover image and embedded watermark for watermark extraction.

ii.:

Visible and invisible image watermarking provide classification based on visibility of the watermark over the cover image. Visible watermarks affect the image quality and are more easily distorted and destroyed. Invisible watermarks are hidden within the cover image information and, therefore, preserve the visual integrity of the cover image. They are also more resistant to image processing attacks due to their being hidden inside the cover image.

iii.:

Image contents such as text, visuals, 3D or combinations of them and structural contents such as lines, edges, curves and other geometrical structures like circles, rectangle, triangle etc. may be exploited to ensure effectiveness of the watermarking technique. Identification of texture in some area or in the complete image helps in finding the right amount and position to embed the watermark [2].

iv.:

Color also plays an important role in digital image watermarking. Images can be monochrome, gray or colored. Image watermarking strategies vary a lot according to the color content and representation of the image. As monochrome images have less representational power in comparison to gray and color images, they have limited scope to embed the watermark information. Gray and color image watermarking exploit the watermark in a much broader way while maintaining the visual appearance of the cover image and resistance against various intentional or unintentional image processing attacks.

The basic figures of merit in any watermarking scheme include: imperceptibility, robustness and payload [3]. Imperceptibility of watermark is necessary to ensure that the image quality is not degraded. Robustness against attacks is important to ensure that the watermark is available for retrieval when there is a need. Payload is the amount of watermark information to be added to cover image. These payloads are added directly to the cover image in case of spatial domain watermarking or in some transformed manner in transformed domain watermarking. Payload should be enough so that the desired watermark can be embedded without affecting the imperceptibility and robustness. These are non-commensurable and, often, conflicting requirements. The goal of any watermarking scheme is to provide the best possible combination of these parameters as necessary for a particular application.

Watermarking is performed either in spatial or in transform domain. Spatial domain watermarking techniques rely on spatial or pixel value information for watermarking purpose. These techniques have a limited scope and high vulnerability against predictive and statistical analysis by image processing attacks and are less popular these days. Transform domain watermarking techniques use various popular signal processing transforms such as Discrete Fourier Transform (DFT) [4,5,6,7,8], Discrete Cosine Transform (DCT) [9,10,11,12,13,14,15,16] and Discrete Wavelet Transform (DWT) [2, 17,18,19,20], Contourlet Wavelet Transform (CWT) [21, 22], Walsh-Hadamard Transform (WHT) [23] etc.

Image steganography has also been used in conjunction with some watermarking techniques. It provides a way to hide some encrypted data using some prominent encryption and decryption techniques. A related work [24] uses the combination of random pixel manipulator techniques and stego-keys. Another related work [25] uses the concept of randomization selection to increase the security of the information hidden in bits of the pixels.

Watermarking in transform domain mostly relies on selection of appropriate frequency bands in the transformed components or regions. Various approaches have been proposed for this purpose. Embedding the watermark in low frequency components of the cover image leads to artifacts in the watermarked image due to major modifications in high energy regions. Visual quality of the image gets altered in a significant manner. These changes can be easily detected by Human Visual System (HVS). Medium frequency bands provide tradeoff between the low and high frequency bands and can also be used for watermarking in conjunction with them. These bands are relatively less altered during image processing operations such as noise addition, filtering, color enhancement, masking, compression and scaling etc. and also have a significant amount of energy values to preserve. Variations in the high frequency bands can be done in some intelligent manner preserving the visual integrity of the image. High frequency bands are a good choice for watermarking as watermark can survive intensity changes and noise addition. Further, HVS is less sensitive to changes made in them [26].

Various color models are used for representation of digital images. A specific color model works best in a specific image processing application. RGB, YCbCr, CIELAB are some extensively used color models with some variations and standards for representation. These color models are related and images are convertible from one model to the other using appropriate mathematical conversion formulae. Choice of color model plays a crucial role in image processing applications as it affects the results and also causes certain degree of variation in the image content. These variations in image contents should be examined carefully as they vary in accordance to the characteristics and visual quality of the cover image. Some visual quality assessment parameters provide mathematical analysis to determine the exact nature and value of variation due to the image processing done with specific color model. Digital image watermarking has been done with images in all these color models. However, RGB is the most widely used color model primarily due to the popularity of the RGB model in image storage and processing. Most early work in color image watermarking used RGB representation. However, watermark embedding in RGB suffers against compression type of attacks such as JPEG compression as the blue channel is heavily quantized. Therefore, the embedded watermark is lost to a great extent.

A method proposed in [27] suggests use of Y-Channel in YCbCr as the ideal space for data hiding when tolerance against JPEG compression and noise addition are the most important concerns. Cr channel is the best choice for resistance against scaling and rotation attacks while Cb channel is a better option for resistance against cropping. YCbCr space is used for watermarking to achieve robustness against maximum number of attacks. In another study [28] robustness of the color image watermarking scheme using different color spaces for embedding is examined. The watermarking scheme uses perceptually redundant signal spaces to insert watermark in color spaces. The robustness comparison shows that the non-uniform color spaces indeed provide a large amount of perceptual redundancy for embedding high-strength watermarking signals which can survive various attacks. Therefore, it is claimed [28] that YCbCr is much better than XYZ which is better than CIELAB for watermarking purposes. RGB, XYZ, YUV, YCbCr are non-uniformly distributed color spaces whereas CIELAB is a uniformly distributed color space. Another wavelet-based image watermarking scheme [29] uses benchmark images of size 512*512 with a watermark of size 21*12. The watermark is split into two parts - one larger (2/3) and another smaller (1/3). These are embedded in Y and Cr channel respectively and the scheme is shown to be resistant against various attacks.

QR code is a two dimensional (2D) bar code successfully implemented in a variety of harsh working environments providing extensively good results. Emergence of quick capturing and processing devices such as smart phones and tablets equipped with software apps has extended the use of QR code for information capturing and further processing in more intelligent ways. QR codes are used for various purposes like storing product information, advertisement, web-links, personal and business cards, Wi-Fi access codes, airlines tickets, equipments tracking etc.

In the present work, a robust watermarking scheme is presented for invisible watermarking of color digital images. The watermarking is performed in YCbCr color space in transform domain using DWT and SVD. The watermark is in the form of a QR code. YCbCr is preferred as it closely models the HVS. The approach provides a robust scheme that is resistant to various image processing attacks utilizing the inherent robustness of QR codes.

The rest of the paper is organized as follows. Some preliminaries are discussed in Section 2 covering in brief the YCbCr color model and its relationship with RGB color model. Structural properties of the QR Code are presented along with a brief note about DWT and SVD and their uses in watermarking. Section 3 presents the proposed watermarking scheme. Experiments and analysis of computational results are presented in Section 4. Section 5 concludes the paper.

2 Preliminaries

RGB is a prominent color model for representing digital images. In the present work, an RGB color cover image is converted into YCbCr color image. The approach presented then utilizes the Y channel of this color model. This conversion is successfully performed using formulae given. The basic structure of the QR codes and the motivation for utilizing the QR codes in the proposed approach is presented. A brief description of DWT and SVD and their role in the Watermarking domain is also explained in this section.

2.1 YCbCr color model

YCbCr color space stores Y as luminance, Cb as blue difference and Cr as red difference of the image. Figure 1 shows the relation between RGB and YCbCr color model; these color models are interchangeable. Conversion formulae from RGB color model to YCbCr color model and vice-versa are as follows.

Fig. 1
figure 1

Relationship between RGB cube and YCbCr cube. (image source: Intel integrated performance primitives manual)

RGB color model to YCbCr color model

$$ \left( \begin{array}{c} R\\ G\\ B \end{array}\right) =\left( \begin{array}{ccc} +1.000 & -0.000 & +1.403\\ +1.000 & -0.344 & -0.714\\ +1.000 & +1.773 & +0.000 \end{array}\right) \left( \begin{array}{c} Y\\Cb-128\\Cr-128 \end{array}\right) $$
(1)

YCbCr color model to RGB color model

$$ \left( \begin{array}{c} Y\\Cb\\Cr \end{array}\right) =\left( \begin{array}{ccc} +0.299&+0.587&+0.114\\ -0.169&-0.331&+0.500\\ +0.500&-0.419&-0.081 \end{array}\right) \left( \begin{array}{c} R\\G\\B \end{array}\right) +\left( \begin{array}{c} 0\\128\\128 \end{array}\right) $$
(2)

2.2 QR code

QR codes can be generated in varying sizes from 21*21 modules to 177*177 modules considering specific error correction levels (Low, Medium, Quartile and High). The QR code consists of finder patterns (position detection patterns), data area (cells), alignment pattern, timing pattern, cell (module), quit zone (margin), dark module, and separators. Finder pattern is the set of three pattern blocks situated at top-left, top-right and bottom-right. Alignment pattern is used to handle minor image changes while reading the QR Code. Data area (cells) is the central area of the QR code that consists of encoded data. Separators are used to segregate finder patterns from data area. QR code provides an enhanced security mechanism with its error correction algorithms. It is a more substantial way to embed watermark information than embedding an ordinary image as watermark. It has the facility of coding varying lengths and types of text. It provides more multifaceted types of watermarks to embed. QR codes are elegant and small in size, have high capacity of encoding data, resistance against dirt and damages and direction independent readability. Constituents of the QR code are shown in Fig. 2.

Fig. 2
figure 2

Constituents of QR Code

2.3 DWT and SVD

Wavelets are extensively used in image processing operations as they provide more comprehensive representation and analysis for color images. Use of wavelets in watermarking is suggested as both the spatial information and frequency information of the transformed cover image is utilized [30]. DWT transform of a digital image is represented by a two dimensional scaling function ϕ(x,y), and three 2-dimensional (2D) wavelets ψ H(x,y), ψ V(x,y) and ψ D(x,y) [31]. Scaling function is represented as ϕ(x,y) = ϕ(x)ϕ(y) in 1D scaling functions and 2D wavelets are represented in the form of 1D wavelets as follows.

$$ \psi^{H} (x,y) = \psi(x)\phi(y) $$
(3)
$$ \psi^{V} (x,y) = \phi(x)\psi(y) $$
(4)
$$ \psi^{D} (x,y) = \psi(x)\psi(y) $$
(5)

In DWT terminology, ϕ(x,y) is termed as approximation sub band, ψ H(x,y) as horizontal sub band, ψ V(x,y) as vertical sub band and ψ D(x,y) as diagonal sub band. SVD is a matrix factorization technique, used for image processing applications such as image quality assessment, compression and noise reduction [33].

2.4 Related work

A DWT based watermarking scheme presented in [32] uses mask of watermark according to the HVS. Image sub-bands, generated through the wavelet transform consider the luminance and texture content for the watermarking purpose. A content based image watermarking technique using advance HVS based on Just Noticeable Distortion (JND) mask provides good invisibility in smooth areas of images but is not suitable for edge and textured areas.

Some approaches in the literature suggest use of SVD in conjunction with transform domain watermarking as modification in singular values of SVD results in approximately same visual quality of image. SVD based watermarking techniques which embed watermark in the singular values of the cover image are termed as Pure SVD watermarking techniques. SVD watermarking techniques which utilize the coefficients of the frequency transforms are termed as Hybrid-SVD techniques. SVD based watermarking techniques are robust against most of the geometric attacks and signal processing attacks [34, 35]. These techniques select appropriate number of singular values (partial or complete) for watermark insertion with varying or fixed weighted multiplication factors. These weighted multiplication factors are selected according to the intended strength of the embedding while preserving the visual integrity of the image. Watermark coefficient values are either replaced or modified additively, multiplicatively or quantized based on processing with singular values obtained after processing the cover image.

A watermarking scheme for digital images using SVD and image compression technique called Dither quantization divides the host image into two sub-images [36]. Copies of watermark are embedded into both of them separately in different components of SVD transform of the sub-images obtained earlier from the host image. This technique provides more resistance to watermarking attacks and a good rate of retrieval due to dual watermarking system. This technique does not provide any guarantee regarding which component of the matrix will yield the best watermark as the extracted watermark depends upon the types of the image processing attacks.

A visible QR code watermarking scheme called Difference Expansion uses a reversible data hiding scheme based on a histogram based technique [37]. It embeds the hyperlink related to the host image in QR code. The QR code vanishes and original image is retrieved at last after successfully retrieving the hyperlink information from the watermark image using reversible data hiding techniques. This technique visually degrades the visual quality of image as it contains a small QR code on bottom left corner of the image.

A redistributed wavelet based technique [38] shows its robustness to geometric distortions and invariant to some specific image rotations and image flipping attacks. This technique performs well for rotational angles in multiples of 90 degrees, but does not provide good robustness for other rotational angles, whereas it shows its robustness against other common image processing attacks such as filtering and compression.

A hybrid image watermarking technique [39] transforms the host image using DWT. The resultant low frequency components are separated and DCT transform and SVD is performed on it. Watermark is also transformed using DCT-SVD and added to the earlier obtained matrix component. This technique has lesser SVD computations than other compared methods.

3 Proposed watermarking algorithm

The proposed watermarking scheme utilizes DWT-SVD combination for embedding the QR-coded watermark in a YCbCr color image. QR code provides a robust mechanism to embed the watermark in the image due to its spreading of information over a large area and inherent error correction mechanism. The data area and the mechanism used to store the QR code as watermark provides an effective method to hide the data into the image. QR codes are used as binary images in this watermarking technique which shows the specific type and amount of information to be added during watermarking.

Embedding strength parameter decides the potential amount of watermark information to be added to the cover image with the varying multiplying factor. Alteration in its value can change the visual quality of watermarked image and robustness of the watermark embedded. These changes can be systematically verified with image quality assessment parameters. Embedding strength can be experimentally computed and analyzed, that for a specific watermarking algorithm it gives the best results for some possible range of values.

Algorithms for watermark embedding and watermark extraction are described in next subsections with the requisite mathematical basis. The pseudo-code and the details of each step therein are as follows.

3.1 Watermark embedding

Initially RGB image is read and converted into YCbCr color space, then Y component is processed with DWT. The diagonal sub-band is used to perform SVD. Watermark information is entered and binary QR code is generated and DWT is applied. SVD is performed on its diagonal sub-band. Embedding strength is multiplied with singular value component obtained from watermark. Add this result to singular value component obtained earlier from cover image. Perform Inverse SVD on this modified singular value component and apply Inverse DWT (IDWT) on resultant. Now covert this image into RGB color space to get the resultant color watermark image Fig. 3.

Fig. 3
figure 3

Block diagram of watermark embedding algorithm

figure d

3.2 Watermark extraction

Read the watermarked image and cover image. Convert these images into YCbCr color space and apply DWT up to required level on Y components of them to get four sub-bands for each one. Use these diagonal sub-bands and perform SVD on them. Subtract singular value component obtained with cover image from singular value component obtained with watermarked image and divide the resultant from embedding strength to get new singular value component. Also read the original watermark image and apply DWT transform to get its four sub-bands. Use the diagonal sub-band and perform SVD on it. Use new singular value component and perform Inverse SVD and IDWT to get the retrieved watermark and extract the watermark information from it (Fig. 4).

Fig. 4
figure 4

Block diagram of watermark extraction algorithm

figure e

4 Experimental results and analysis

Experiments are performed to find the effect of watermarking strength on the quality of extracted watermark images. Some common image processing attacks are performed on the watermarked images and the proposed watermarking scheme is examined for its efficiency and robustness against these attacks. The four test images considered here are of same size with different visual properties (Fig. 5). These images are different from each other in terms of color, texture, brightness and contrast. QR codes are generated in the form of variable-sized modules which can be extended to obtain QR code images of the desired size. Thus large and appropriate watermark images are available with enhanced visual appearance for embedding purposes. In this work, the QR code watermark images are taken to be of size 128*128 pixel values.

Fig. 5
figure 5

Color Test Image Set (512*512 pixels) (a) Lena, (b) Baboon, (c) Airplane, (d) Taj Mahal

4.1 Images considered for watermarking

Three different watermarks are considered here. The first watermark is a Logo image (LI), the second is an image of text (TI) and the third watermark is a text input (e.g. Faculty of Engineering Dayalbagh Educational Institute), which is processed with a QR code generator to get a QR code binary image (QRI). All the test images are watermarked with these watermarks using different embedding strengths. The LI, TI and QRI are taken to be of the same size for making the comparison meaningful (Fig. 6).

Fig. 6
figure 6

Watermarks (128*128 pixels) (a) Logo image (b) Text image (c) QR code image

4.2 Effect of variation in embedding strength on Peak Signal to Noise Ratio (PSNR) and Normalized Correlation Coefficients (NC)

The quality of watermarked images is assessed using PSNR values between cover image and watermarked image. The PSNR value for a single channel (e.g. gray scale) cover image is calculated as follows:

$$ PSNR=10.log10.\left[\frac{MX^{2}_{CI}}{\frac{1}{m\times n}{\sum}_{m}{\sum}_{n}[CI_{mn}-WI_{mn}]^{2}}\right] $$
(6)

Where, CI is the cover image and WI is the watermarked image. M X C I is the maximum intensity value of the cover image. Here, m and n are the number of rows and columns in the cover image. The PSNR value of color images is calculated by averaging the PSNR values of all the three channels (i.e. R, G, B). It can be represented as

$$ PSNR_{Color(RGB)}=\frac {PSNR_{R}+PSNR_{G}+PSNR_{B}}{3} $$
(7)

NC values depict the quality of extracted watermark with reference to the original watermark. NC is calculated as follows:

$$ NC=\frac {{\sum}_{m}{\sum}_{n}(OW_{mn}-\overline{OW})(RW_{mn}-\overline{RW})}{\sqrt{{\sum}_{m}{\sum}_{n}[OW_{mn}-\overline{OW}]^{2}{\sum}_{m}{\sum}_{n}[RW_{mn}-\overline{RW}]^{2}}} $$
(8)

Where, OW is the original watermark image and RW is the recovered watermark image. Where, \(\overline {OW}\) and \(\overline {RW}\) are the mean of OW and RW respectively, m and n are the number of rows and column in this image.

Graph in Fig. 7 shows the effect of varying embedding strengths on PSNR values in watermarking different test images. In this work different embedding strengths are employed and all the test images are watermarked. The resulting PSNR and NC values are tabulated in Table 1. The LI watermark has maximum PSNR value of 54.9980 for Lena test Image and minimum value of 53.4773 for Airplane test image. Similar PSNR values are also observed for TI watermark (ranging from 45.6689 to 50.1360) and QRI watermark (ranging from 42.8059 to 47.4772) for the same test images. Thus the range of PSNR values with all the three watermarks is quite acceptable. NC values obtained with the QR code watermark images are more consistent and thus show the usefulness of the QR code image as a watermark. The NC values with LI show a large variation even with the same watermarking strengths. This implies that the extracted watermark is degraded. Results with TI fall in between the other two watermark images considered.

Fig. 7
figure 7

Image PSNR graph for all test images at various embedding strengths (α)

Table 1 Image PSNRs and NCs for different watermarks

It is well known that higher the embedding strength in watermark embedding the easier it is to extract the watermark. However, this results in lesser imperceptibility. Therefore, images that have been watermarked at low embedding strength are taken to demonstrate the impact on extraction of watermark. Tables 2 and 3 show attacks consisting of salt and peeper Noise (SP), Gaussian noise (GN) with μ = 0, cropping (CR), cropping of 16 pixels around all border sides (CR-16), cropping of 32 pixels around all border sides (CR-32), contrast adjustment (CA) with zero low out and various high out (HO) values, rotation (RT), average filter (AVF), motion filter (MOF) with various lengths, median filter (MEF), masking with 3*3 mask, histogram equalization (HE), JPEG compression (JC) with varying quality factor (QF). Significant degradation for extracted watermarks are in case of Logo and Text images whereas the QR code watermarks and watermark information retrieval (WIR) performed successfully despite these types of attacks at higher strengths. The visual quality of the extracted watermarks is also found to be considerably better in case of the QR code watermarks.

Table 2 NC values and QR code retrieval results for various image processing attacks on Lena and Baboon Test Images
Table 3 NC values and QR code retrieval results for various image attacks on Airplane and Taj Mahal Test Images

4.3 Effect of increasing watermark information in QR code on watermark retrieval

In this section, watermarks of 3 different text sizes are considered as shown in Table 4 to demonstrate the effect of increased payload and the effectiveness of the QR code watermark embedding and retrieval with the increased amount of information embedded as the watermark. The first watermark contains the text ”Faculty of Engineering Dayalbagh Educational Institute”. The second one contains ”Department of Electrical Engineering Faculty of Engineering Dayalbagh Educational Institute” while the third one contains ”Department of Electrical Engineering Faculty of Engineering Dayalbagh Educational Institute (Deemed University) Dayalbagh Agra 282005”.

Table 4 WIR with different QR code watermark text sizes on Lena test image

Table 4 shows that effect of increasing the size of watermark text on the effectiveness of extraction. As the number of characters increases from 56 to 91 and then 133, the watermark is retrieved for most of the image processing attacks like cropping, rotation, Gaussian noise, salt and pepper noise, median filtering and JPEG compression. This shows its strength against filtering as well as geometric attacks.

Table 5 shows a comparison with some previous works using the similar kind of watermarking approach. The proposed method uses the same Lena image for the comparison purpose and shows its robustness against some common image processing attacks reported in these previously proposed work.

Table 5 Comparison of NC values among [40, 41] and the proposed scheme under some common image processing attacks

From the graph in Fig. 8 for salt and pepper attacks, it is observed that NC values of Logo image degrade rapidly from 0.4791 to -0.1145 for Lena; 0.7589 to -0.0320 for Baboon; 0.4361 to -0.1040 for Airplane; 0.5069 to -0.0350 for Taj Mahal cover images. Text images of retrieved watermarks are also visually degraded even though the value of NCs obtained are high. The QR codes and extraction results, in which the QR code information is retrieved exactly at all level of attacks. Similar phenomena is observed in all other test images as can be clearly verified from graphs showing NC values in Figs. 89 and 10. Results in Tables 2 and 3 show that QR code watermarks are retrieved effectively in all the experiments while maintaining high levels of NC values.

Fig. 8
figure 8

NC values for salt and pepper attacks with logo image as watermark

Fig. 9
figure 9

NC values for salt and pepper attacks with text image as watermark

Fig. 10
figure 10

NC values for salt and pepper attacks with QR code as watermark

4.4 Comparison with related works

Table 5 shows the comparison of this work with some other related works. These related works has been using similar scenarios of experimental environments, type of cover images and watermarks in nature. These comparison shows the efficiency of the proposed work over some standard image processing attacks and this proves to be an efficient watermarking technique in comparison. First related work uses singular values for color image watermarking scheme, where as second one shows some improvement over it. Second technique also uses orthogonal values in addition for extraction of watermark. Proposed work shows its effectiveness over these related works on the same test image.

5 Conclusion

This paper proposes a robust watermarking method employing DWT and SVD in YCbCr color space using QR codes as watermarks. Results on various test images under different image processing attacks prove the robustness and applicability of this technique in digital image watermarking. This technique uses cutting edge QR code technology in this watermarking scheme which itself has a robust error correction mechanism. Proposed technique using QR code watermarking provides a robust mechanism and preserves the visual integrity of the watermarked image. QR codes are used as binary images in this watermarking technique which shows the specific type and amount of information to be added during watermarking. Selection of appropriate embedding strength is done in accordance to the image quality parameters. This technique is robust against various image processing attacks such as noise additions, filtering, cropping, image adjustments and rotations and compression whereas the other image watermarks are significantly degraded with these image processing attacks and the exactness of the watermark information lost in those watermarks. Extraction of watermark information from QR code is possible even when it is heavily corrupted by image processing attacks. This demonstrates the robustness of the technique and the advantage of selecting the QR code as watermark.