1 Introduction

During the last decades, digital image, video and audio technologies, widely used within home computers, mobile devices and open networks have grown dramatically. Allowing that, digital media data may be easily copied, manipulated or format converted without any control. This fact suggests the necessity to develop some efficient methods to solve these problems. Digital watermarking is considered as a suitable solution for authentication of digital materials. In digital watermarking, a short message called “watermark” is embedded into an image, audio or video without affecting the perceptive quality such that it can be detected using a detection algorithm. In public digital image watermarking methods, the synchronization loss, between the embedding and detection stages, causes watermark detection errors. Geometric distortions, such as cropping, rotation, scaling and any affine transformation, which are common in practice, are the principal factors of this problem. In the literature, several approaches are related to geometrically resilient image watermarking. Firstly, we find algorithms based on invariant domains such as Fourier–Mellin domain [1, 2], log polar domain [3], Radon transformation domain [4], geometric moments [5, 6] and Zernike moments [7] which are used to embed the watermark and maintain synchronization under geometric transforms. These approaches show robustness against rotation and scaling distortions, because these methods embed the watermark into geometric invariant domains, however, may be typically highly vulnerable against cropping attacks and other aggressive geometric transformations, such as affine and projective transformations. On the other hand, almost all the algorithms mentioned above are designed to grayscale images and their application to color images is often inadequate since they usually work with an individual color channel [8]. The use of color in image and video processing systems has become in the recent years a key element in security, steganography, and watermarking applications of multimedia data [9]. Unfortunately, in the watermarking field, the color cannot be considered as a simple RGB color model decomposition and all of their intrinsic information must be integrated into the watermarking embedding and detection processes. While several methods have been proposed to watermark grayscale images, only a few have been designed specifically for color images [8]. In this way, several color image watermarking methods have been proposed in the literature, and some of them are based on the frequency domain transform [1012], pixel modification in the spatial domain [1315] and histogram modification [1622]. Thus, because the image histogram is one of the geometric invariant domains, one way to embed a watermark pattern into a color image is to use its color histogram. If the watermark can be embedded into this domain, it should survive to most geometric transformations. Authors of [16] use an exact histogram specification to embed a watermark into the images. In [17], the histogram-specification method proposed by Coltuc and Bolon [16] is extended to chromatic histograms and a watermark sequence is embedded in the chromatic plane of a color image. Authors of [18] proposed a watermarking method into a color histogram using constrained Earth Mover Distance (EMD) to optimize the modification of the image, according to a target histogram. In [19], authors proposed a partition and modify the feature space composed by a 3D histogram to insert the watermark pattern. Authors of [20] proposed a digital watermark algorithm based on histogram grouping, where fault tolerance channels are introduced to reduce and eliminate the disturbance brought by geometric attacks. In [21], a reversible watermarking scheme for images is proposed, which is based on 1D histogram modification. Almost all previous works based on histogram modification have shown watermark robustness to geometrical distortion; however, they cannot provide sufficient robustness against common signal processing, such as filtering, noise contamination and image compression neither some aggressive combinations of geometric attacks and common signal processing operations. To increase the robustness without decreasing the watermark imperceptibility, a very promising research direction consist in developing hybrid algorithms which combine the spatial and color image information [8]. In this way, authors of [22] proposed a hybrid watermarking scheme for authentication purposes. Due to the different nature of common signal processing and geometrical distortions, two different watermarks are embedding in this algorithm. The first one is embedded in the discrete cosine transform (DCT) domain combined with a chaotic function. The second watermark is embedded in a 1D histogram modification of the image. This hybrid watermarking method combines the robustness of DCT-chaotic domain against filtering, noise and compression attacks with the robustness of histogram domain against geometric distortions. The method shows the watermark robustness against some geometric distortions, common signal processing and artistic filters supported by commercial Photoshop\(^{\textregistered }\). However, it shows some vulnerability with respect to the cropping attack as well as to the combined attacks that involves this geometrical distortion. In this context, our paper presents a robust hybrid watermarking method applied to color images for authentication, which presents robustness against several distortions. As mentioned above, due to the different nature of common signal processing and geometrical attacks, two different techniques to embed a same watermark for authentication are used in this method. In the first one, the luminance component (Y) information is used to embed the watermark bit sequence into the magnitude of the middle frequencies of the Discrete Fourier Transform (DFT). In the second one, a selected region of 2D histogram composed by blue-difference and red-difference (Cb–Cr) chrominance components is modified according to the watermark bit sequence. The quality of the watermarked image is measured using the following well-known indices PSNR, VIF and SSIM. The difference color of the watermarked image is obtained using the NCD measure. Experimental results show that the proposed method provides robustness against several geometric distortions, signal processing operations, combined distortions and photo editing. The comparison with the previously reported methods based on different techniques is also provided. The rest of the paper is organized as follows: Sect. 2 describes the embedding and detection process of the proposed algorithm, and experimental results including comparison with previously reported watermarking algorithms are presented in Sect. 3. Finally, Sect. 4 concludes this work.

2 Proposed algorithm

The hybrid proposed watermarking method uses two distinct watermarking techniques to embed the same watermark into a color image. The proposed color image watermarking hybrid method supports the following features:

  • Blind detection, in which, the original image is not needed during the detection of the watermark.

  • Robustness against common signal processing operations such as median and Gaussian filtering, sharpness, brightness, contrast changes, JPEG compression, impulsive and Gaussian noise perturbation, among others.

  • Robustness against geometric attacks such as rotation, scaling, aspect ratio, affine and projective transformations, cropping, among others.

  • Robustness against combined distortions composed by common signal processing operations together with geometric attacks.

  • Robustness against artistic filter attacks such as jitter, glass, motion blurred, among others.

  • Good watermark imperceptibility.

  • Oriented to color images.

The proposed watermarking method consists of the embedding and detection process, which are explained in detail as follows.

2.1 Definition of the color model

The literature in the area contains different color models which have been used to represent several color components which can be more or less independent. One of the major issues in color image processing is to find the appropriated color model for the problem being addressed [23]. Whereas the application context often defines the original color model, particularly RGB model for color images; the color model used for embedding a watermark has to be discussed according to the expectative of the watermark scheme, i.e., fragile, semi-fragile or robust scheme. According to [8], the RGB color model has the most correlated components while the YCbCr color model components are the less correlated. Also, the forward and backward transformations between RGB and YCbCr color models are linear. Taking into account this fact, if the correlated color model such like RGB is used, the modification of one component independently to the others is not necessarily the best choice, because the perceived colors are dependant of the three components together. This is the reason why the RGB model is called a correlated color model. On the other hand, YCbCr allows obtaining non-correlated components and has the advantage of separating the luminance information from the chrominance information [8, 23]. According to this fact, YCbCr is adopted as suitable color model in this watermarking method.

2.2 Embedding process

Embedding process consists of two stages: frequency domain embedding and 2D histogram modification, respectively. Moreover, the embedding sequence is designed in order to avoid one embedding procedure interfering in the other.

2.2.1 Frequency domain embedding

Watermark embedding in the DFT domain has a certain number of robust properties with respect to rotation, scaling and translation (RST) invariance as well as watermark robustness against common signal processing such as JPEG compression, filtering, and noise contamination, among others. Frequency domain embedding process is described as follows, according to the next eleven steps (1) Convert the RGB color model of the original image \(I\) to YCbCr color model representation. And isolate the luminance component (Y) from YCbCr color model representation. (2) The watermark is a zero mean 1D binary pseudorandom pattern composed by {1,0} values generated by a secret key \(k_{1},\,W = \{w_{i}|i=1,\ldots ,L\}\), where \(L\) is the length of the watermark. (3) Apply the 2D DFT transform to the original luminance component \(Y(x,\,y)\). The 2D DFT transform of \(Y(x,\,y)\) of size \(N_{1}\times N_{2}\) is given by (1):

$$\begin{aligned} \text{ YF }(u,v)=\sum _{x=1}^{N_1} {\sum _{y=1}^{N_2} {Y(x,y)e^{-j2\pi (f_1 x/N_1 +f_2 y/N_2)}}} . \end{aligned}$$
(1)

(4) Get the magnitude \(M(u,\,v) = |\text{ YF }(u,\,v)|\) and phase \(P(u,\,v)\) of the 2D DFT transform \(\text{ YF }(u,\,v)\). Translations in the spatial domain do not affect the magnitude of the DFT transform, as shown in (2):

$$\begin{aligned} |\text{ DFT }\left[ Y(x+x_1 ,y+y_1)\right] |=M(u,v). \end{aligned}$$
(2)

Concerning the scaling in the spatial domain, it causes an inverse scaling in the frequency domain, as shown in (3):

$$\begin{aligned} \text{ DFT }\left[ {Y(\rho x,\rho y)} \right] =\frac{1}{\rho }\text{ YF }\left( {\frac{u}{\rho },\frac{v}{\rho }} \right) . \end{aligned}$$
(3)

where \(\rho \) is the scaling factor. And rotation in the spatial domain causes the same rotation in the frequency domain, as shown in (4):

$$\begin{aligned}&\text{ DFT }\left[ {Y(x\cos \theta -y\sin \theta ,x\sin \theta +y\cos \theta )} \right] \nonumber \\&=\text{ YF }(u\cos \theta -v\sin \theta ,u\sin \theta +v\cos \theta ) \end{aligned}$$
(4)

Thus, selecting the DFT domain to embed the watermark \(W\) has a certain number of advantages for rotation, scaling and translation (RST) invariance as well as watermark robustness against common signal processing. However, the DFT domain presents weak robustness against other aggressive geometric distortions such as affine and projective transformations, aspect ratio changes, flipping image, among others. Thus, in order to increase the robustness without decreasing the watermark imperceptibility, a very promising research direction consist in developing hybrid algorithms which combine the spatial and color image information [8]. In our method, the proposed 2D histogram modification is designed to complement and increase the robustness against geometric distortions and is explained in the following section.

(5) Select a pair of radiuses \(r_{1}\) and \(r_{2}\) in \(\text{ YF }\,(u,\,v)\) and the annular area \(A=\pi (r_{2}^{2}-r_{1}^{2})\) between \(r_{1}\) and \(r_{2}\) that should cover the middle frequency components in the DFT domain around the zero frequency term; because modifications in the magnitude of lower frequencies of the DFT will cause visible distortion in the spatial domain of the image. On the other hand, the magnitudes of the higher frequencies are vulnerable to the JPEG compression. Thus, the watermark pattern should be embedded in the band of the middle frequencies because, in this spectral region, it will be robust against JPEG compression and at the same time imperceptible. (6) Divide the DFT magnitude into four quadrants and select the middle frequencies DFT magnitude coefficients. So that to ensure the correct watermark embedding, the condition (\(A\)/4) \(\ge \, L\) should be satisfied, where \(A\) corresponds to the annular area between radiuses \(r_{1}\) and \(r_{2},\) and \(L\) is the watermark length. In case that the condition (\(A\)/4) \(\ge L\) is not satisfied, the pair of radiuses \(r_{1}\) and \(r_{2}\) can be adjusted so that the total number of magnitude coefficients in the middle frequencies is enough to embed the \(L\) watermark data bits. (7) Scramble the watermark data bits in order to guarantee their security using a self-inverse Quadratic Permutation Polynomial (QPP) over \(\delta _{2}^{l}\), where \(l\ge 2\) [24]. (8) Obtain the magnitude difference denoted by \(d\) between the magnitude coefficients from first and second quadrants of the upper half part of the DFT magnitude, respectively, \(d=M_{i}(u_{j},\,v_{j})-M_{i}\,(-u_{j},\,v_{j})\). (9) Once the difference \(d\) is obtained, consider a watermark strength parameter \(\alpha \) in order to modify the DFT middle frequency magnitude in a controlled manner. If the watermark data bit \(w_{i} = 0\) and \(d<\,(-\alpha )\), then \(M_{i}(u_{j},\,v_{j}),\,M_{i}\,(-u_{j},\,v_{j})\) are not modified. On the other hand, if \(d \ge \,(-\alpha )\), then \(M_{i}(u_{j},\,v_{j}),\,M_{i}(-u_{j},\,v_{j})\) are modified according to (5):

$$\begin{aligned} \begin{array}{l} M^{\prime }_i (u_j ,v_j)=M_i (u_j ,v_j)-(\alpha +d) \\ M^{\prime }_i (-u_j ,v_j)=M_i (-u_j ,v_j)+(\alpha +d), \\ \end{array} \end{aligned}$$
(5)

where the difference \(d\) is added to the watermark strength \(\alpha \) in order to force the compliance of the condition \(d <\,(-\alpha \)) when \(w_{i} = 0\), providing a large enough margin between \(M^{\prime }_{i}(u_{j},\,v_{j})\) and \(M^{\prime }_{i}\,(-u_{j},\,v_{j})\) in order to preserve \(d <\,(-\alpha )\) after that the watermarked color image is processed by a common signal processing or a geometric distortion.

If the watermark data bit \(w_{i}= 1\) and \(d>\alpha \), then \(M_{i}(u_{j},\,v_{j}),\,M_{i}\,(-u_{j},\,v_{j})\) are not modified. On the other hand, if \(d \le \,\alpha \), then \(M_{i}(u_{j},\,v_{j}),\,M_{i}\,(-u_{j},\,v_{j})\) are modified according to (6):

$$\begin{aligned} \begin{array}{l} M^{\prime }_i (u_j ,v_j)=M_i (u_j ,v_j)+(\alpha -d) \\ M^{\prime }_i (-u_j ,v_j)=M_i (-u_j ,v_j)-(\alpha -d), \\ \end{array} \end{aligned}$$
(6)

where the difference \(d\) is subtracted from the watermark strength \(\alpha \) in order to force the compliance of the condition \(d>\,\alpha \) when \(w_{i}\) = 1, providing a large enough margin between \(M^{\prime }_{i}(u_{j},\,v_{j})\) and \(M^{\prime }_{i}\,(-u_{j},\,v_{j})\) in order to preserve \(d>\,\alpha \) after that the watermarked color image is processed by a common signal processing or a geometric distortion. In (5) and (6), \(i =1,{\ldots }, L\) denotes an index mapping corresponding to the \(w_{i}\) watermark data bits, \(M_{i}(u_{j},\,v_{j})\), and \(M_{i}(-u_{j},\,v_{j})\) denotes the original magnitude coefficients. \(M^{\prime }_{i}(u_{j},\,v_{j})\) and \(M^{\prime }_{i}(-u_{j},\,v_{j})\) denote the watermarked magnitude coefficients. A larger value of \(\alpha \) would increase the robustness of the watermark, on the other hand, the watermark imperceptibility is less affected for a small value of \(\alpha \). Hence, there is a trade-off between robustness and imperceptibility. According to DFT symmetrical properties, in order to produce real values after the DFT magnitude modification, watermark was embedded into the upper half part of middle frequencies of the DFT magnitude coefficients, and subsequently, the lower half part of the middle frequency band should be modified symmetrically. By repeating the above-mentioned procedure, the total \(L\) watermark data bits can be embedded in the annular region. (10) Finally, the watermarked luminance component \(\text{ Y }_{w}(x,\,y)\) is obtained applying the inverse DFT (IDFT) to the watermarked magnitude \(M^{\prime }(u,\,v)\) and the corresponding original phase \(P(u,\,v)\) as shown follows:

$$\begin{aligned} \text{ Y }_w =\text{ IDFT }(\text{ YF }^{\prime }),\;\;\;\text{ YF }^{\prime }=(M^{\prime },P). \end{aligned}$$
(7)

(11) Once the watermarked luminance component \(\text{ Y }_{w}\) is obtained, the watermarking embedding procedure is ready for switching to the 2D histogram modification and thus getting the watermarked color image, which is explained in the following section.

2.2.2 Modification of the 2D Cb–Cr histogram

In computer graphics and photography, a color histogram is a representation of the color distribution in an image, derived by accumulating the number of pixels of each color. These representations can be one-dimensional (1D), two-dimensional (2D) or three-dimensional (3D). In this paper, we use 2D Cb–Cr color histogram to embed a binary watermark sequence. The embedding process comprises the next six steps:

(1) Using the blue-difference and the red-difference (Cb–Cr) chrominance components, compute a 2D Cb–Cr color histogram \(H_{\mathrm{Cb}{-}\mathrm{Cr}}\). (2) Scramble the watermark data bits to guarantee their security using a self-inverse Quadratic Permutation Polynomial (QPP) over \(\delta _{2}^{l}\), where \(l\ge 2\) [24]. (3) Reshape the watermark sequence \(W\) in a pattern \(W_{r}\) of size \(L=P\,\times \,Q\) (where \(P\) and \(Q\) are any integers). (4) Segment the histogram \(H_{\mathrm{Cb}{-}\mathrm{Cr}}\) into blocks of size \(L=P\,\times \,Q\) and select an adequate block \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\) to embed the watermark sequence. The principal characteristic for an adequate block to be chosen is that almost all pixel values in the block must be nonzero. Fortunately, there are many blocks that satisfy this condition; among them, one block is selected randomly, whose block number will be provided as secret key \(k_{2}\) in the detection stage. The pixel value of \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}(m,\,n)\) is modified according to the watermark bit \(W_{r}(m,\,n)\), as shown in (8):

$$\begin{aligned} \text{ if } W_r (m,n)&= 0\quad \text{ then } \text{ BH }_{\mathrm{Cb-Cr}} (m,n)\leftarrow 0 \nonumber \\ \text{ if } W_r (m,n)&= 1 \quad \text{ then } \text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}} (m,n)\leftarrow 1\nonumber \\&\quad m=1\ldots P,n=1\ldots Q. \end{aligned}$$
(8)

Several situations may arise: If \(W_{r}(m,\,n)=0\) and \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)=0\) as well as \(W_{r}(m,\,n)=1\) and \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\, (m,\,n)\,\ne 0\), then it is not necessary to modify the \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)\). However, if these conditions are not satisfied, \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)\) must be modified. In the upper case of (8), \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)\) must be forced to zero, distributing its value as uniformly as possible among its four neighbors. In the lower case, \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)\) must be forced to be nonzero, which can be achieved subtracting one pixel from its largest neighbor and assigning it to \(\text{ BH }_{\mathrm{Cb}{-}\mathrm{Cr}}\,(m,\,n)\). This embedding method ensures the watermark imperceptibility, because the modified values are assigned to the neighbor pixels, so that causes slight changes in the image colors, leaving the total number of pixels unaltered with respect to the original ones.

(5) Once the histogram \(H_{\mathrm{Cb}{-}\mathrm{Cr}}\) was modified, all pixel values are restored and watermarked chrominance components \(\text{ Cb }_{w}\) and \(\text{ Cr }_{w}\) are obtained. (6) Finally, the watermarked image \(I_{w}\) is constructed using the watermarked luminance component \(\text{ Y }_{w}\) obtained in the frequency domain embedding procedure and the watermarked chrominance components \(\text{ Cb }_{w}\) and \(\text{ Cr }_{w}\), thus restoring the \(\text{ Y }_{w}\,\text{ Cb }_{w}\,\text{ Cr }_{w}\) watermarked components to RGB color model representation. The diagram of the embedding process is shown in Fig. 1. The secret keys \(k_{1}\) and \(k_{2}\) shown in Fig. 1 are also known by the watermark detector. These secret keys are used as the seed for generating the watermark pattern and the block number used in the modification of the 2D Cb–Cr histogram, respectively.

Fig. 1
figure 1

General diagram of watermark embedding process

Figure 2 shows an example of original and watermarked images with their 2D Cb–Cr color histograms, respectively.

Fig. 2
figure 2

Example of original and watermarked Gold hill images with their 2D Cb–Cr color histogram. a Original image and 2D Cb–Cr color histogram with zoom of the selected region. b Watermarked image and 2D Cb–Cr color histogram with zoom of the watermarked region (color figure online)

2.3 Detection process

The detection process diagram is shown in Fig. 3 and it is described as follows:

Fig. 3
figure 3

General diagram of watermark detection process

(1) Convert the RGB color model of the watermarked image \(I_{w}\) to YCbCr color model representation and obtain the watermarked components \(\text{ Y }_{w}\text{ Cb }_{w} \text{ Cr }_{w}\). (2) Using the blue-difference and the red-difference (\(\text{ Cb }_{w}\text{-- }\text{ Cr }_{w})\) watermarked chrominance components, compute a 2D \(\text{ Cb }_{w}\text{-- }\text{ Cr }_{w}\) color histogram \(H_{\mathrm{Cbw}{-}\mathrm{Crw}}\), which is segmented into blocks of size \(L=P\times Q\). (3) Using secret key \(k_{2}\) extract the region \(\text{ Hr }_{W}\), in which the watermark was embedded. From this region, the watermark pattern \(W_{1}\) is extracted according to the following conditions: if \(\text{ Hr }_{W}(m,\,n)\,>\)0 then \(W_{1}(m,\,n) =1,\) otherwise \(W_{1}(m,\,n) =0, m=1\ldots P,\,n=1\ldots Q\). (4) Reorder the watermark pattern \(W_{1}\) into a 1D stream. (5) Once the watermark pattern \(W_{1}\) is restored, obtain the bi-dimensional DFT transform \((\text{ YF }^{\prime }u,\,v)\) of the watermarked luminance component \(\text{ Y }_{w}(x,\,y)\). Then, from \((\text{ YF }^{\prime }u,\,v)\) the watermarked magnitude \(M^{\prime }(u,\,v)=|\text{ YF }^{\prime }(u,\,v)|\) and phase \(P(u,\,v)\) are obtained. (6) The annular area \(A\) is computed with the same pair of radiuses \(r_{1}\) and \(r_{2}\) used in the frequency domain embedding process. (7) Split the DFT magnitude \(M^{\prime }(u,\,v)\) in four quadrants and obtain the result of applying the subtraction operation \(s_{i}=M^{\prime }_{i}(u_{j},\,v_{j})-M^{\prime }_{i}\,(-u_{j},\,v_{j})\) of the first and second quadrants of the upper half part of the watermarked DFT magnitude of the annular region \(A\). (8) Recover the watermark pattern \(W_{2}\) using the sign function as follows: if \(\text{ sign }(s_{i})\) is ‘+’ or ‘0’ then \(w^{\prime }_{i}=1\), otherwise \(w^{\prime }_{i}=0,\) where \(i = 1,{\ldots }, L\). (9) Once \(W_{1}\) and \(W_{2}\) are recovered, re-arrange each one using the self-inverse Quadratic Permutation Polynomial (QPP) used in each embedding stage. (10) Reconstruct the original watermark pattern \(W\) with the secret key \(k_{1}\) and obtain the bit error rate (BER) between \(W\) and \(W_{1}\). Assuming ergodicity, the BER is defined as the ratio between the number of incorrectly decoded bits and the total number of embedded bits. A threshold value \(T_\mathrm{BER}\) must be defined to determine whether the watermark \(W\) is present or not into the image. In this concern, considering a binomial distribution with success probability equal to 0.5, the false alarm probability \(P_\mathrm{fa}\) for \(r\) bits embedded watermark data is given by (9), and a threshold value \(T\) must be controlled in order to make \(P_\mathrm{fa}\) smaller than a predetermined value.

$$\begin{aligned} P_\mathrm{fa} =\sum _{l=T}^r {\left( {\frac{1}{2}} \right) ^{r}\cdot \left( {\frac{r!}{l!(r-l)!}} \right) }, \end{aligned}$$
(9)

where \(r\) is the total number of watermark data bits, whose value is empirically set to 64. The false alarm probability must be less than \(P_\mathrm{fa}=9.4048 \times 10^{-7}\) which is to be able to satisfy the requirements of most watermarking applications for a reliable detection, and then, an adequate threshold value \(T_\mathrm{BER}(=1-(T/r) =1-(51/64))\) is equal to 0.20, according to the fact that the bit error rate (BER) + the bit correct rate (BCR) must be equal to 1. If the BER value between \(W\) and \(W_{1}\) is greater than 20 % (more than 13 error bits), the watermark detection is failed, and then, the detection process switch to obtain the BER between \(W\) and \(W_{2}\), otherwise, the watermark detection is successful and the detection process is terminated. The same condition is applied to the BER between \(W\) and \(W_{2}\); if this is greater than 20 %, the watermark detection is failed and the detection process is terminated, otherwise, the watermark detection is successful and the detection process is terminated.

3 Experimental results

In this section, the performance of the proposed algorithm is evaluated considering the watermark payload, imperceptibility and robustness grades using a variety of digital images. We have used many images with different texture content (e.g., Goldhill, Sailboat, Lena, Airplane, Baboon, Peppers, among others) of size \(512\times 512\) and color resolution of 24bits per pixel which can be found in http://sipi.usc.edu/database/. Our experiments are carried out on a personal computer running win7© with an AMD© Athlon processor (2.7 Ghz) and 4 GB RAM while the embedding and extracting procedures were implemented on Matlab© 7.10. In our system, the average computing time for the embedding procedure has been 11.85 s while an average of 8.72 s was needed for the detection procedure. A 1D binary pseudorandom sequence of size \(L = 64\) bits is used as the watermark pattern \(W\). The false alarm probability is \(P_\mathrm{fa}=9.4048 \times 10^{-7}\) when \(T_\mathrm{BER} =0.20.\) The pair of radiuses used in the frequency domain embedding were \(r_{1} =80\) and \(r_{2} =81.\) The watermark strength used in the frequency domain embedding is equal to \(\alpha \) = 15,000. \(P\) and \(Q\) integers used in the 2D Cb–Cr histogram modification have the values of \(P = 8\) and \(Q = 8\) when \(L = 64\). The watermarked image quality is measured using the following well-known indices PSNR, VIF and SSIM. The difference color of the watermarked image is obtained using the NCD measure. Finally, our experimental results are compared with previous reported watermarking works.

3.1 Settings of radiuses \(r_{1},\,r_{2}\) and watermark strength \(\alpha \)

Considering the frequency domain embedding process into the luminance component (Y) from YCbCr color model of the original color image, a watermark strength \(\alpha \) = 15,000, a pair of experimental radiuses \(r_{1}=20,\,r_{2} =25\) for low, \(r_{1} =80,\,r_{2} =81\) for middle and \(r_{1} =250,\,r_{2} =251\) for high DFT magnitude frequency, respectively, and a value of \(L=64,\) in Fig. 4, we show the average PSNR after the watermark embedding in each spectral region, obtaining 41.08 dB for low, 48.50 for middle and 49.75 for high DFT magnitude frequency, respectively. Although it may be considered that an acceptable average PSNR is 41.08 dB, the modifications in the magnitude of lower frequencies of the DFT will cause visible distortion in the spatial domain of the image. To illustrate the visible distortions in the spatial domain, in Fig. 5, we show the watermarked Lena image when watermark was embedded into the low (a), middle (b) and high (c) DFT magnitude frequency, with 38.95, 49.45 and 49.76 dB, respectively. On the other hand, the magnitudes of the higher frequencies are vulnerable to the JPEG compression. Considering the same parameters used in the above experiment and applying a JPEG compression to the watermarked image with quality factor equals to 20, in Fig. 6 we show the average BER after the watermark embedding in each spectral region, obtaining 0.13 for low, 0.05 for middle and 0.44 for high DFT magnitude frequency respectively. In low and middle frequencies, we have obtained BER values less than the threshold value \(T_\mathrm{BER} = 0.20,\) however, using the high frequencies, the BER value is greater than the threshold value \(T_\mathrm{BER} = 0.20,\) confirming the vulnerability of the higher frequencies against JPEG compression. Thus, the watermark pattern should be embedded in the band of the middle frequencies \(r_{1} =80,\,r_{2} =81\) because, in this spectral region, it will be robust against JPEG compression and at the same time imperceptible.

Fig. 4
figure 4

Average PSNR after the watermark embedding in each spectral region. Radiuses \(r_{1} =20,\,r_{2} =25\) for low, \(r_{1} =80,\,r_{2} =81\) for middle and \(r_{1} =250,\,r_{2} =251\) for high DFT magnitude frequency

Fig. 5
figure 5

Visible distortions in the spatial domain from watermarked Lena image when watermark was embedded into the low (a), middle (b) and high (c) DFT magnitude frequency, with 38.95, 49.45 and 49.76 dB, respectively

Fig. 6
figure 6

Average BER after the watermark embedding in each spectral region. BER = 0.13 for low, BER = 0.05 for middle and BER = 0.44 for high DFT magnitude frequency, respectively

Once that the pair of radiuses \(r_{1} =80\) and \(r_{2} =81\) are set, considering a value of \(L=64\) and the variable watermark strength \(\alpha \) with values 1,000, 5,000, 10,000, 15,000 and 20,000, respectively, the suitable watermark strength \(\alpha \) is estimated. For this test, the watermarked image is attacked by an aggressive JPEG compression with QF \(=\) 10. In Table 1, we show the BER obtained for each value of \(\alpha \) in order to obtain the more robust value against this signal processing and illustrate the reason of the selected range of values \(\alpha \). When the BER value is greater than 20 % (more than 13 error bits), the watermark detection is reported in italics and indicates that the watermark detection has failed. From Table 1, we show that \(\alpha \) values greater than or equal to 15,000 presents good robustness against JPEG QF \(=\) 10p; however, to preserve the trade-off between robustness and imperceptibility, based on our experiments, we considered a watermark strength \(\alpha \) \(=\) 15,000 as a suitable value.

Table 1 Average BER obtained with variable watermark strength \(\alpha \) against JPEG with QF = 10

3.2 Watermark payload

Considering the frequency domain embedding process into the luminance component (Y) from YCbCr color model of the original color image, a watermark strength \(\alpha \) = 15,000, a pair of radiuses \(r_{1} =80\) and \(r_{2} =81\) and variable value of \(L\) from 16 to 512 bits have been used. In Fig. 7, we show that a large value of \(L\) would increase the capacity of the watermarking method; however, the robustness of the watermarking algorithm would decrease for large \(L\). Hence, there is a trade-off between capacity and robustness. From Fig. 7, we show that for \(L = 16\) to 64, the BER obtained are null, which indicates a good performance in robustness terms. On the other hand, while the value of \(L\) is increased, the robustness is affected. According to this behavior, \(L = 16, 32\) or 64 are considered a suitable set of values. In order to preserve the trade-off between capacity, robustness and imperceptibility, in the proposed watermarking method, we adopted the value \(L = 64\) in conjunction with the rest of the frequency domain embedding parameters.

Fig. 7
figure 7

Bit error rate with watermark length \(L\) variable

3.3 Watermark imperceptibility

As explained in the previous paragraphs, the proposed algorithm embeds a watermark sequence twice in two different domains, i.e., DFT frequency domain and 2D histogram, respectively; therefore careful watermark imperceptibility evaluation is compulsory. Using a pair of radiuses \(r_{1} =80\) and \(r_{2} =81\), watermark length \(L = 64\) and variable watermark strength \(\alpha \) from 10 to 20 \(\times 10^{3}\); the watermark imperceptibility was evaluated in terms of the PSNR, VIF [25] and SSIM [26] image quality metrics defined by (10), (11) and (12), respectively.

$$\begin{aligned}&\text{ PSNR }(\text{ dB })=10\log _{10} \left( {\frac{\text{ MaxPixelValue }^{2}}{(\mathrm{MSE}_Y \!+\!\text{ MSE }_\mathrm{Cb} \!+\!\text{ MSE }_\mathrm{Cr})/3}} \right) ,\qquad \end{aligned}$$
(10)
$$\begin{aligned}&\text{ VIF }=\frac{\sum _{k\in \text{ channels }} {I(\vec {C}^{Z,k};\vec {F}^{Z,k}|s^{Z,k})}}{\sum _{k\in \text{ channels }} {I(\vec {C}^{Z,k};\vec {E}^{Z,k}|s^{Z,k})}}, \end{aligned}$$
(11)

where we sum over the channels of interest, \(\vec {C}^{Z,k}\) represent \(Z\) elements of the random field RF \(C_{k}\) that describes the coefficients from channel \(k\) and so on [25]. \(E\) and \(F\) denote the visual signal at the output of the Human Visual System Model (HVS) from the original and the watermarked images, respectively, from which the brain extracts cognitive information. \(I({\vec {C}^{Z,k};\vec {E}^{Z,k}|s^{Z,k}})\) and \(I({\vec {C}^{Z,k};\vec {F}^{Z,k}|s^{Z,k}})\) represent the information that can ideally be extracted by the brain from a particular channel in the original and the watermarked images, respectively, [25].

$$\begin{aligned} \text{ SSIM }(I_o ,I_w)\!=\!\frac{(2\mu _{I_o} \mu _{I_w} \!+\!C_1)(2\sigma _{I_o I_w} \!+\!C_2)}{(\mu _{I_o}^2 \!+\!\mu _{I_w}^2 \!+\!C_1)(\sigma _{I_o}^2 \!+\!\sigma _{I_w}^2 +C_2)}. \end{aligned}$$
(12)

where \(I_{o},\,I_{w}\) are original and watermarked images, respectively, and \(C_{1},\,C_{2}\) are small constant values [26].

As it is known in the literature, the VIF value reflects perceptual distortions more precisely than PSNR. The range of VIF is [0, 1] and the closer value to 1 represents the better fidelity with respect to the original image. Also it is well known in the literature that the SSIM value reflects perceptual distortions more precisely than PSNR. The range of SSIM is [0, 1], and the closer value to 1 represents the better quality with respect to the original image; a value 1 indicates that the original and the reference image are the same. In Figs. 8 and 9, the average PSNR and VIF-SSIM are plotted with variable watermark strength \(\alpha \) ranging from 10 to \(20 \times 10^{3}\), respectively. As shown in Figs. 8 and 9, a larger value of \(\alpha \) would increase the robustness of the watermark, but the watermark imperceptibility is diminished. Hence, there is a trade-off between robustness and imperceptibility. To preserve the trade-off between robustness and imperceptibility, based on our experiments, we considered a watermark strength of \(\alpha \) = 15,000 as a suitable value. On the other hand, the normalized color difference NCD [27, 28] is based on the CIELAB color space and it is applied to measure the difference of color between two images. NCD is given by (13) [27, 28]:

$$\begin{aligned}&\text{ NCD }=\frac{\sum _{x=1}^{N_1} {\sum _{y=1}^{N_2} {\!\left( \!{\sqrt{(L_o (x,y)\!-\!L_w (x,y))^{2}\!+\!(a_o (x,y)\!-\!a_w (x,y))^{2}\!+\!(b_o (x,y)-b_w (x,y))^{2}}} \right) }}}{\sum _{x=1}^{N_1} {\sum _{y=1}^{N_2} {\!\left( \!{\sqrt{(L_o (x,y))^{2}\!+\!(a_o (x,y))^{2}\!+\!(b_o (x,y))^{2}}} \right) }}}, \end{aligned}$$
(13)

where \(L_{o},\,L_{w}\) represents lightness values and \(a_{o},\,a_{w},\,b_{o},\,b_{w}\) the chrominance values corresponding to the original \(I_{o}\) and watermarked \(I_{w}\) images expressed in the CIE Lab color space.

Fig. 8
figure 8

Average PSNR (dB) obtained with variable watermark strength \(\alpha \)

Fig. 9
figure 9

Average VIF and SSIM obtained with variable watermark strength \(\alpha \)

Finally, using \(r_{1} =80\) and \(r_{2} =81,\,\alpha \) = 15,000, \(P = 8\) and \(Q = 8\) with \(L = 64,\) in Table 2, we show the values of PSNR, VIF, SSIM and NCD of ten watermarked test images with respect to the original ones, and in Fig. 10, some original images (a–f) together with their watermarked version (g–l) are shown.

Fig. 10
figure 10

Original (af) and watermarked (gl) six test images

Table 2 Watermark imperceptibility measured in terms of PSNR, VIF, SSIM and NCD

From Table 2 and Fig. 10, it follows that the proposed scheme provides a fairly good fidelity of the watermarked image, and also, the difference of colors between the watermarked image and the original one is insignificant [29]. From Table 2, we show that the average PSNR is greater than 47 dB, and the SSIM as well as VIF values obtained are near to 1; it follows that the proposed scheme provides a fairly good fidelity of the watermarked image.

3.4 Watermark robustness

To evaluate the watermark robustness of the proposed algorithm, the StirMark Benchmark available on http://www.petitcolas.net/fabien/watermarking/stirmark/, combined attacks of the several geometrical distortions-common signal processing and artistic filter attacks supported by Photoshop\(^{\textregistered }\) are carried out. Experimental results are classified in geometric, common signal processing, combined distortions and artistic filter attacks. For illustrative purposes, Table 3 shows the BER obtained after applying geometric distortions to five watermarked test images: Mandrill, Gold hill, Sailboat, Boats and Airplane F16. When the BER value is greater than 20 % (more than 13 error bits), the watermark detection is reported in italics and indicates that the watermark detection has failed. The detection results are displayed in a 2D-H/DFT form, where 2D-H is the reference to the 2D histogram modification detector output, and DFT corresponds to the frequency domain detector output.

Table 3 BER obtained from five test watermarked images after geometric distortions

From Table 3, we conclude that the proposed method presents good robustness against several geometric distortions, including scaling from 0.3 to 2, rotation with different angles with and without auto-cropping with re-scaling, general affine transformation, shearing 20 % in \(x\) and \(y\) directions, centered and common cropping attack with 35 and 75 %, respectively, aspect ratio in \(x\) and \(y\) directions by 1.5 and 1, respectively, translation by \(x=100\) and \(y=100\), shearing 5 % in each axis, and flipping horizontal, vertical and projective transformation with [0 0; 1 0; 1 1; 0 1], [\(-\)4 2; \(-\)8 \(-\)3; \(-\)3 \(-\)5; 6 3]. In all cases, we have obtained BER values less than the threshold value \(T_\mathrm{BER}\) = 0.20. In Table 3, we show that both detectors (2D-H/DFT) present good robustness against RST geometric attacks and centered cropping. However, while the DFT detector fails against scaling when the factor is 0.3 as well as to the rest of geometric distortions, the 2D-H detector preserves the good robustness against aggressive attacks, such as 75 % cropping with re-scaling, affine transformation, projective transformation, and rotation with auto-cropping and re-scaling. Because the image histogram is one of the geometric invariant domains, if the watermark can be embedded into this domain, it should survive to most geometric transformations. In Fig. 11, we show the watermarked image before and after applying the above-mentioned aggressive geometric attacks together with the 2D Cb–Cr histogram, and the zoom of the recovered watermarked region into the histogram.

Fig. 11
figure 11

Watermarked image before and after aggressive geometric attacks, and the 2D Cb–Cr histogram modification together with the zoom of the recovered watermarked region into the histogram. a Without distortion. b Affine transformation. c Cropping with re-scaling. d Projective transformation and e rotation with auto-cropping and re-scaling

For illustrative purposes, Table 4 shows the BER obtained after applying several signal processing to five watermarked test images: Mandrill, Gold hill, Sailboat, Boats and Airplane F16. From Table 4, we show that also the proposed method presents good robustness against several common signal processing operations, such as JPEG compression with several quality factors ranging from 70 to 10; which presents robustness against adjust brightness and contrast, impulsive noise with a density of 0.02 and 0.10, Gaussian noise perturbation with zero mean and variance 0.005 and 0.015, Gaussian filter with window size \(3\times 3\), median filter with windows sizes \(3\times 3\) and \(9\times 9\), sharpening by \(3\times 3\), and histogram equalization are also consider.

In all cases, we obtain a BER value less than the threshold value \(T_\mathrm{BER}\) \(=\) 0.20, except when the watermarked image was compressed with JPEG QF \(=\) 10. In Table 4, we show that the DFT detector presents good robustness against all signal processing operations, obtaining BER values less than or near to 0, except when the watermarked image was corrupted by impulsive noise with density equals to 0.10. However, the 2D-H detector fails against all signal processing distortions, except for the impulsive noise, because, as it is well known and happened in several works reported previously in the literature, several image processing may change the histogram distribution of an image, causing the loss of the watermark representation carried out by the histogram modification [21, 22].

Table 4 BER obtained from five test watermarked images after signal processing distortions

For illustrative purposes, Table 5 shows the BER obtained applying combined distortions to five watermarked test images: Mandrill, Gold hill, Sailboat, Boats and Airplane F16. The combined distortions are composed of a JPEG compression with quality factor QF = 20 together with a common signal processing and geometric attacks. From Table 5, we show that also the proposed method presents good robustness against several aggressive combined attacks composed by a JPEG 20 compression together with a common signal processing and geometric attacks, specifically scaling from 0.5 to 2, rotation with different angles with and without auto-cropping with re-scaling, centered cropping attack with 35 %, translation by \(x=100\) and \(y=100\), adjust brightness and contrast, impulsive noise with a density of 0.02, Gaussian noise perturbation with zero mean and variance 0.005, several filters including median and Gaussian filters, sharpening, all of them with a window size of \(3\times 3\) and histogram equalization. The robustness of our method is not affected by this kind of combined attacks, obtaining BER values less than \(T_\mathrm{BER}\) \(=\) 0.20 in the DFT detector output.

The watermark is also robust against artistic filter attacks (supported by Photoshop\(^{\textregistered }\)) such as brightness of lens, cellophane effect, film effect, old photo, glass, engraving, newsprint, jitter, vignette frame, motion blurred, texture add and tiles as shown in Table 6 and depicted in Fig. 12. From Table 6, we show that also the proposed method presents good robustness against several artistic filters, obtaining watermark detection rates greater than 93 % in the DFT detector output.

Table 5 BER obtained from five test watermarked images after combined distortions
Table 6 BER obtained from watermarked Lena image after artistic filters
Fig. 12
figure 12

Artistic filters in watermarked Lena image

Finally, this investigation compares the performance of the proposed method with the invariant domain algorithm developed by Wang et al. [30] in 2008, the histogram-oriented watermarking algorithm proposed by Lin et al. [19] in 2006, the watermarking color histogram scheme developed by Roy et al. [18] in 2004 and the hybrid watermarking based on chaos and histogram modification scheme proposed by Chrysochos et al. [22] in 2012, under JPEG lossy, scaling, cropping, affine transformation, rotation, projective transformation, Gaussian noise and artistic filters distortions. Table 7 compares the performance of the watermark detector outputs, the watermark data length and the kind of image associated with each algorithm. Table 7 presents also the tolerance under distortions and designates the capacity to resist as either “detected” or “fail,” when the tolerance is not given in detail by the other four methods mentioned above. A grid-cell is marked with a dash for attack simulations not mentioned in the literature. These results show better performance of the proposed method compared with principal methods reported previously against most common geometric, signal processing and artistic filter attacks.

Table 7 Performance comparison

4 Conclusions

In this paper, we present a robust hybrid watermarking method for authentication, which is very robust against geometric distortions including rotation by several angles with and without cropping, affine transformation, projective transformation, scaling, aspect ratio and aggressive cropping attacks among others. Also, the method is robust against several common signal processing distortions such as JPEG compression, median and Gaussian filtering, impulsive and Gaussian noise perturbation, brightness, contrast and sharpen and histogram equalization. The method presents good robustness against combined distortions composed by several geometric and signal processing attacks. In the experiments, the watermark is also robust against artistic filter attacks supported by Photoshop\(^{\textregistered }\) such as brightness of lens, cellophane effect, film effect, old photo, glass, engraving, newsprint, jitter, vignette frame, motion blurred, texture add and tiles. In the first embedding technique, the luminance component (Y) information is used to embed the watermark bit sequence into the magnitude of the middle frequencies of the Discrete Fourier Transform (DFT). While in the second one, a selected region of 2D histogram composed by blue-difference and red-difference (Cb–Cr) chrominance components is modified according to the watermark bit sequence. In this way, this hybrid watermarking scheme combines the robustness of DFT domain against RST geometric distortions, JPEG compression, noise, filtering attacks and other common signal processing, with the robustness of histogram domain against geometrical attacks. Other hybrid watermarking schemes like the one reported in [22] which shows similar performance to the proposed method against geometric, signal processing and artistic filters is outperformed in terms of robustness against cropping attack as well as to the combined attacks that involves this geometrical distortion.