Keywords

1 Introduction

With the developments in information technology and computer-based communication, the sharing of digital data becomes very easy on the world wide web. Such unprotected sharing of digital data increased the cases of false ownership claims and copyright violations in the recent past. These digital data include images, audios, and videos. Copyrighted images can easily be manipulated with the help of powerful image processing tools in such a way that it leads to financial loss [1]. So there is a need of such tool which can detect/protect these manipulations. Digital image watermarking is one of such tools, which can protect the ownership of digital image by adding some ownership information (watermark) to the host image. Robust watermark is inserted into the host image in such a way that it remains robust to intentional/unintentional attacks and provides the ownership proof, whenever needed [2].

Broadly, image watermarking techniques are divided into visible and invisible image watermarking [1]. Visible image watermarking is a technique in which a logo (watermark) is placed in the original image which helps in identifying the owner of the image. On the other hand, invisible watermarking can again be divided into time domain and transfer domain techniques [1]. Time domain techniques are those, where the watermark is directly embedded by changing the pixel values of the image. On the other hand, original image has to undergo some transformations before the watermark embedding in transfer domain techniques. Transformed domain image watermarking techniques perform better as compared to simple time domain techniques [3]. Transformed domain techniques can further be divided into DCT (discrete cosine transform) [4], FFT (fast fourier transform), DWT (discrete wavelet transform) [5], and SVD (singular value decomposition) [6, 7] based image watermarking. A good watermarking scheme must have a high value of these four features: robustness, imperceptibility, capacity, and security [1, 3]. In this paper, we proposed an optimization of SVD (false positive free) based image watermarking technique in DWT domain using particle swarm optimization so that high value of all the four features can be attained.

Rest of the paper is organized as follows: Sect. 2 gives a brief review of related works and gaps in image watermarking domain. In Sect. 3, basics of DWT, PSO, and false positive solution are discussed, Sect. 4 talks about the proposed watermarking scheme, result and discussions are shown in Sect. 5 and finally Sect. 6 provides a brief conclusion.

2 Related Work

The SVD-based scheme reportedly performs better in the recently developed watermarking algorithms [1, 5, 6]. The main reason for good performance is that the dominant singular values get very less affected by the intentional/unintentional attacks and show very small changes [7]. Generally, SVD-based watermarking is used with other transforms; because used alone increases its computational complexity to quite a high level. Ganic et al. [8] proposed the use of SVD along with DWT to provide robust watermarking scheme. Rastergar et al. [9] suggested shuffling of the host image pixels to increase the security for a 3-level DWT and SVD-based watermarking scheme. Lagzian et al. [10] proposed the use of RDWT at the place of DWT to increase the capacity and then utilized the scheme proposed by Ganic et al. [8] for complete watermarking implementation. This scheme [10] performed better than other schemes in terms of capacity and robustness but suffers with a basic security flaw, which makes the scheme unusable [11]. Lai et al. [12] proposed a secure scheme with DWT. They decompose the watermark into two halves and embedded it into the LH and HL bands of DWT transformed host image. The main drawback of this scheme was low capacity. Makbool et al. [13] proposed a scheme with improved capacity by making use of RDWT. They claimed their scheme to be false positive free but later, it is proved by Ling et al. [14] that it also suffers with a security flaw (false positive problem), which makes their scheme vulnerable to attacks.

This study proposes a new watermarking scheme based on DWT, which is free from false positive error. In order to enhance the robustness further, proposed scheme also makes use of particle swarm optimization for optimal selection of scaling factors during embedding of watermark.

3 Preliminaries

3.1 Particle Swarm Optimization

Soft computing techniques (ANN, GA, PSO, etc.) are used in many fields for efficient problem solving [15, 16]. PSO is an optimization technique proposed by Kennedy et al. [17] in 1995. It is inspired by the swarm behavior of animals like bird flocking, animal herding, fish schooling, etc. Each member in the group learns from its own best performance as well as from the best performance of other members. This kind of property helps it to reach global optimum value in an efficient manner. PSO is a powerful tool for complex and multidimensional search [18, 19]. The very first step is the bounded initialization of swarm particles in the search space. Let each particle Pi have an initial position and velocity of \(x_{i} (t)\) and \(v_{i} (t)\) respectively at the time t. These positions assume to be the local best for the first iteration. PSO Algorithm has these steps:

  1. (1)

    Initialization of position \(x_{i} (t)\) and velocity \(v_{i} (t)\)

  2. (2)

    Compute the value of fitness function for each position

  3. (3)

    Compute the local best position, i.e., each particles best position in all the iterations

  4. (4)

    Compute the global best position, i.e., best particle’s position in current iteration

  5. (5)

    Update the velocity \(v_{i} (t)\) and position \(x_{i} (t)\) of each particle using Eqs. 1 and 2

    $$v_{i} \left( {t + 1} \right) = w*v_{i} \left( t \right) + c1*{\text{rand}}\left( {l_{\text{best}} - x_{i} \left( t \right)} \right) + c2*{\text{rand}}\left( {g_{\text{best}} - x_{i} \left( t \right)} \right)$$
    (1)
    $${\text{and}}\,x_{i} (t + 1) = x_{i} \left( t \right) + v_{i} (t)$$
    (2)

    Here w is inertia weight used to determine the step size for each iteration. \(c1\) and \(c2\) are the learning factors, which determine the effectiveness of local and global learning and rand function is used to generate a number between (0, 1).

  6. (6)

    Repeat the steps (2) to (5) till stopping criterion reached.

The stopping criterion can be the maximum number of iterations or change of fitness function below a certain threshold level.

3.2 Discrete Wavelet Transform

DWT provides excellent spatio-frequency localization and this makes it very useful for watermark hiding; as it provides high value of robustness and imperceptibility. Many watermarking schemes have been proposed using this feature of DWT. Then again, DWT is not able to provide a high capacity (large amount of data hiding) due to the shift variance. Shift variance occurs because of down sampling for each level filtering. Even a small variance makes noticeable changes in the wavelet coefficients. This led to inaccurate reconstruction of cover and watermark images.

RDWT is known and implemented by many names like aa trous algorithm, discrete wavelet frames, overcomplete DWT, undecimated DWT, and shift invariant DWT [20]. First time, the implementation of RDWT was done by the aa trous algorithm. It basically removes the down sampling operator from the normal implementation of DWT [20]. To keep the spatial location intact in each sub-band, each band must be of same size as of original image. On the contrary, the size of each level band decreases as the number of level increases in DWT. So, the RDWT kept the same size on each level band and provides more accurate local texture representation [21]. It increases the capacity of RDWT. Then again, any change in RDWT (due to watermark insertion) leads to loss of complete host image because of the band’s high correlation (dependence) on each other [14]. In order to get a trade off in this problem (capacity vs. data recovery), DWT is used in proposed work with 2-level of transform.

3.3 Ensuring the False Positive Free Nature of Scheme

The problem of false positive error comes into picture because of complete dependence of extracted watermark on the singular vectors matrices (U and V), which are supplied by the owner. A supply of false/changed matrices (U and V) during watermark extraction process led to false/wrong watermark extraction. This dependence need to be removed from the watermarking scheme in order to provide rightful ownership check. Run et al. [22] suggest that one should embed the principal components (PC) of watermark into the host image instead of singular values. The PC values can be obtained by multiplying the singular values to the left singular matrix. The proposed scheme is also embedding the principal components of watermark into the singular values of host image to get rid of false positive error.

4 Watermarking Scheme

The watermarking scheme is divided into three stages: Embedding process, Extraction process, and optimization of scaling factors.

4.1 Embedding Process

The block diagram of proposed scheme is shown in Fig. 1 and it contains following steps:

Fig. 1
figure 1

Block diagram of embedding process

  1. (1)

    Perform DWT (2-level) on the host image (H) and obtain (2-level) four bands \(I_{i}\) (i = LL, HL, LH and HH) of transformed host image.

  2. (2)

    Perform singular value decomposition of these bands using Eq. 3. Here i = LL, HL, LH, HH.

    $$I_{i} = U_{i} S_{i} V_{i}^{T}$$
    (3)
  3. (3)

    Perform DWT (1-level) on the watermark image and obtain four bands \(W_{i}\) (i = LL, HL, LH and HH) of watermark (1-level).

  4. (4)

    Perform singular value decomposition of the watermark image using Eq. 4 and compute principal components (PC’s) using Eq. 5. Here i = LL, HL, LH, HH.

    $$W_{i} = U_{wi} S_{wi} V_{wi}^{T}$$
    (4)
    $$PC_{i} = U_{wi} S_{wi}$$
    (5)
  5. (5)

    Modify the singular values of host image (each band) with the scaled principal components of watermark (each band) using Eq. 6.

    $$S_{i}^{'} = S_{i} + \alpha_{i} PC_{i}$$
    (6)

    where \(\alpha\) is the scaling factor and PC is the principal components.

  6. (6)

    Use matrix \(S_{i}^{'}\) along with \(U_{i}\) and \(V_{i}\) to create the watermarked sub bands \(I_{wi}\) for each band as shown in the Eq. 7.

    $$I_{wi} = U_{i} S_{i}^{'} V_{i}^{T}$$
    (7)
  7. (7)

    Perform inverse DWT on \(I_{wi}\) to generate watermarked Image \(H_{w}\).

4.2 Extraction Process

The attacked watermarked image is represented by \(H_{w}^{*}\). For proper extraction of watermark, we need original host image. Firstly, DWT is performed on the watermarked image to obtain \(I_{wi}^{*}\). The extraction process is performed as shown in Fig. 2 and described in following steps:

Fig. 2
figure 2

Block diagram of extraction process

  1. (1)

    Perform DWT (1-level) on the original host image and watermarked image to obtain transformed \(I_{i}\) and \(I_{wi}^{*}\) respectively.

  2. (2)

    Perform subtraction of watermarked bands from the original host bands to obtain \(P_{i}\) using Eq. 8. Here i = LL, HL, LH, HH.

    $$X_{i} = I_{wi}^{*} - I_{i}$$
    (8)
  3. (3)

    Calculate probably corrupted principal components \(PC_{i}^{*}\) using Eq. 9.

    $$PC_{i}^{*} = U_{i}^{T} X_{i} V_{i} /\alpha_{i}$$
    (9)
  4. (4)

    Use \(PC_{i}^{*}\) along with user’s supplied matrix \(V_{wi}^{T}\) to regenerate watermark image (wavelet domain) with the help of Eq. 10. Here i = LL, HL, LH, HH.

    $$W_{i}^{*} = PC_{i}^{*} V_{wi}^{T}$$
    (10)
  5. (5)

    Perform Inverse DWT to regenerate time domain watermark image W.

4.3 Optimization of Scaling Factors Using PSO

It is quite visible from the embedding and extraction process that the quality of formed watermarked image and extracted watermark greatly depends on the scaling factor α. A low value of scaling factor degrades the robustness of watermark where a high value minimizes the imperceptibility so there is a need to choose an optimal value of scaling factor, which provides a balance between imperceptibility and robustness. These two factors are defined below:

$${\text{Imperceptibility = correlation}} (I, I_{w} )$$
(11)
$${\text{Robustness = correlation}} (W, W^{*} )$$
(12)

Here I is host image, \(I_{w}\) is watermarked image, W is original watermark, and W* is extracted watermark. Suppose that N type of attacks has been considered then the robustness will become

$${\text{Inverse}}\,{\text{Robustness}} = \frac{N}{{\mathop \sum \nolimits_{i = 1}^{N} {\text{correlation}} (W, W_{i}^{*} )}}$$
(13)

As the objective is to maximize both imperceptibility and robustness, the following objective function has been created for minimization:

$${\text{Error}} = \frac{N}{{\mathop \sum \nolimits_{i = 1}^{N} {\text{correlation}} (W, \,W_{i}^{*} )}} - {\text{correlation }}(A, A_{w} )$$
(14)

The error function will become a multidimensional search, which cannot be visualized graphically and needs special tool like PSO for optimal value search of scaling factors [\(\alpha\)].

A bounded initialization of population size of 50 has been done in the range of 0.001–0.8. 200 generations have been used in the PSO optimization. The value of PSO’s step size with other parameters has been kept low (w = 0.1, c1 = 0.8, c2 = 0.12) through out the search in order to get better local search as the single optimal value of \(\alpha\) was known beforehand. The block diagram of optimization process is shown in Fig. 3.

Fig. 3
figure 3

Block diagram of scaling factor optimization

5 Results and Discussions

Three host images (Lena, Man and Baboon) are used in this study as shown in Fig. 4. All the hosts are of size 512 × 512. The DWT provides the half size of all the bands as that of the size of time domain host image. This makes the capacity of DWT-based watermarking scheme half as compared to the size of host image. So the watermark is also taken as half size of host image, i.e., 256 × 256 and the same is shown in Fig. 4. PSNR (Peak signal to noise ratio) is used to show the similarity between host images and watermarked images. Normal cross-correlation is used to compare the similarity of extracted watermarks with original watermark. Suppose that the size of two images X and X* is \(n \times n\) and they can attain a maximum pixel value as \(X_{ \hbox{max} }\). Then PSNR and normalized cross-correlation can be defined as:

Fig. 4
figure 4

Host images and watermark: Lena, Man, Baboon, and Watermark logo (left to right)

$${\text{PSNR}} = 10\,{ \log }_{10} \left( {\frac{{n \times n \times (X_{ \hbox{max} } )^{2} }}{{\mathop \sum \nolimits_{i = 1}^{n} \mathop \sum \nolimits_{i = 1}^{n} (X\left( {i,j} \right) - X^{*} (i,j))^{2} }}} \right)$$
(15)
$${\text{correlation}} (X, X^{*} ) = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \mathop \sum \nolimits_{j = 1}^{n} \overline{{X_{(i,j)} {\text{XOR }}X_{(i,j)}^{*} }} }}{n \times n}$$
(16)

5.1 Imperceptibility and Robustness of Scheme

The quality of watermarked image (Imperceptibility) and extracted watermark (Robustness) with different scaling factors is shown in this section. Table 1 is showing the PSNR of watermarked images with different scaling factors. Table 2 is showing the normalized cross-correlation of watermarked host (Host (W)) and extracted watermark with respect to original host and original watermark, respectively.

Table 1 Variation of PSNR of watermarked images with scaling factors
Table 2 Variation of NCC of watermarked image and extracted watermark with scaling factors

5.2 Optimization of Scaling Factors

As we can see from the Tables 1 and 2 that the imperceptibility and robustness are dependent on scaling factor and are inversely proportional to each other. So, PSO-optimized multiple scaling factors are used to find an optimal trade off between them; as explained in Sect. 4.3. Figure 5 is showing the watermarked images and Table 3 is showing the imperceptibility and robustness (without any attack) of proposed scheme after the scaling factor optimization.

Fig. 5
figure 5

Watermarked images: Lena, Man, and Baboon (left to right)

Table 3 Imperceptibility and robustness (without any attack) of proposed scheme after the scaling factor optimization

Table 4 is showing the proposed watermarking scheme’s performance under different attacks for three host images.

Table 4 NCC of extracted watermarks under different attacks with respect to original watermark

5.3 Applicability of Scheme to Color Images

The proposed scheme is not directly applicable to the color images as the color images contain three channels contrary to single channel of gray host. Figure 6 is showing the color host images used in this study.

Fig. 6
figure 6

Color host images: RGB-Lena and RGB-Baboon (left to right)

The color host is first divided into the RGB (Red-green-blue) channels and then one/multiple channels are selected for watermark embedding. In case of multiple channels, same watermark is embedded in all the channels. PSO-optimized multiple scaling factors are utilized in this embedding. The imperceptibility is shown in Table 5 and robustness of scheme toward different signal processing attacks is shown in Table 6 for host “RGB-Lena.” The scheme performs quite similar with the host “RGB-Baboon” also.

Table 5 Imperceptibility of color hosts during single and multiple channel embedding
Table 6 Robustness of scheme toward different signal processing attacks for host “RGB-Lena”

6 Conclusion

This work utilized embedding to principal components of watermark in the singular values of host to make the watermarking free from false positive error. The watermarking was done in the domain of DWT, so proposed scheme provided decent data embedding. The robustness and imperceptibility of scheme was improved by making use of PSO-optimized multiple scaling factors instead of single scaling factor. After a bit modification in the scheme, it worked almost similar with the color hosts also. In future, more variants of PSO and other soft computing techniques [2327] will be applied to proposed scheme in order to improve the scheme’s performance.