1 Introduction

With the digitization of the modern world, the availability of advanced computer technology and the Internet originates the accessibility of multimedia data very easily between users. One can easily amend the content of digital data and claim its ownership with the help of advanced software. This creates a challenge to the legitimate owners to claim copyright protection and rightful ownership of their original work. To overcome this burden of illegal copying of digital data gave rise to various image security techniques among which digital watermarking is very effective. In watermarking, secret information is hidden with the help of a suitable scaling factor into the original data using an embedding algorithm [1]. The copyright and rightful ownership are claimed by extracting the secret information using the suitable data used while embedding the watermark. The verification of extracted watermark can be done manually by the human eye or with the machine using evaluation parameters like NC (normalized correlation coefficient) with original watermark information. Watermarking is classified in various ways according to different requirements and considerations [2,3,4,5], which are explained as follows.

  • Implementation: Digital watermarking is implemented in two working domain, spatial and frequency. The first one performs computation with the pixels while in the later different transforms are used implementation.

  • Visibility: Watermarking is described as visible and invisible according to a visibility perspective. In the former one, the watermark information is observable to the human eye, while in the latter one the watermark is not noticeable.

  • Extraction type: Extraction of watermark classified watermarking as blind, semi-blind, and non-blind methods. Blind extracts the hidden information without any requirement of original information, semi-blind watermarking requires original watermark during extraction while non-blind watermarking demands both host and watermark information at the time of extraction.

  • Selection of embedding factor: The selection of embedding factor in watermarking categorized watermarking as constant scaling factor value and optimized scaling factor value. A constant scaling factor is decided on a hit and trial basis, while the optimized scaling factor is obtained by using the optimization algorithm.

  • Content type: Watermarking can be defined according to the content type on which watermarking is required. The host can be a grayscale image or color image.

The basic requirement of digital watermarking is the imperceptibility, security, robustness, and amount of payload used to embed in the host data. If we take care of one, then the other will degrade and vice versa. Any watermarking scheme has to required a keen observation of all the above basic requirements. In [2], color information is hidden into a color host image using hybrid fractional Fourier transform and least significant bit (LSB). The input images are first transformed to YCbCr color space and then into binary values for the embedding process. In [3], the watermark image is first separated into two equivalent dimensions, and afterward, each is hiding into the diagonal value of horizontal as well as in vertical components of the cover with suitable scale factor, respectively. In the extraction process, each half part is merged again to detect the watermark. A high correlation between two pixels of the orthogonal matrix of singular value decomposition (SVD) decomposition which allows to embed the watermark in a color cover image in all three components is proposed in [4]. A non-blind scheme using the DCT-DWT domain is presented in [5]. The DCT coefficient of the grayscale watermark is hidden into each band of the multi-resolution wavelet transform of cover to obtain a robust scheme. In [6], a robust watermarking for a color image is presented using the quaternion domain Fourier transform and least square support vector machine. This scheme improves the visual quality by embedding a binary image adaptively using real quaternion Fourier coefficients.

To increase the robust nature of the scheme, the embedding factor is optimized using different optimization techniques [7]. In [8], firefly optimization is used for optimizing the scale factor, and the input image is transformed by DWT and SVD. The singular values of the input image are modified by singular values of the watermark using an optimal scale factor. In [9], a color watermarking is implemented in the RDWT-SVD hybrid domain. The robustness of the scheme is improved by using an adaptive optimal embedding factor. In [10], the singular values of the input image are managed by the principal components of the watermark. Both cover and watermarks are grayscale images, while the artificial bee colony (ABC) algorithm is used for obtaining an optimal scaling factor. In [11], the grayscale cover is alienated into [8 \(\times\) 8], size blocks and DCT values are utilized for embedding the grayscale watermark, while ABC optimization is used to provide a robust watermarking.

After closely studying the literature, it is observed that a major challenge in digital watermarking is to design a robust and secure algorithm for color images. This motivates and helps us to develop a color watermarking by hybridizing multiple domain properties. In the proposed paper, an effective robust and secure color watermarking in hybrid DWT-SVD are developed. The isotropic property of DWT towards the human visual system (HVS) is used to improve the quality of image [12]. The use of a chaotic map to hide the original appearance of a watermark enhances the protection level of the scheme. The robustness towards communication attacks is improved by using the properties of SVD. The perceptual property and robustness of the proposed scheme are enhanced simultaneously, even after increasing the payload capacity by embedding all color channels, i.e., RGB using ABC optimization. ABC is preferred over others because of its simpler and less complex computational cost. The remainder of this article is divided as follows: Sect. 2 presents a description of related methods. The proposed algorithm is described in Sect. 3. The experimental setup and comparative study are represented in Sects. 4 and 5. Lastly, the conclusion is drawn in Sect. 6.

2 Related work

This section provides an analysis of various watermarking methods based on DWT and SVD. The prime concern is to consider requirements in watermarking which are perceptual appearance, robustness, security, and capacity to get a solution to envelop all these concerns in an optimal mode.

Ansari and Pant [13] present a watermarking method in DWT and SVD hybrid domain for grayscale images. This method is non-blind in nature, and the robustness and visual quality are improved by using ABC optimized scale factor. In [12], a secure watermarking for grayscale medical and non-medical images is presented using 2-D SVD along with DWT. The scheme is independent of the size of input images to enhance the imperceptibility and capacity towards attacks. The diagonal values of the DWT decomposed cover are exploited by the diagonal matrix of the mark by a fixed embedding value. A non-blind algorithm for the color image dataset is presented in [14]. In this approach, the input images are transformed by translation invariant wavelet (TIW) to obtain LL (approximation band), after that diagonal elements of cover are modified by the watermark. The enhanced gray wolf optimization is used in this method to optimize the embedding factor.

In [15], a hybrid technique in DWT-SVD for grayscale images is generated and watermark is embedded in the diagonal elements of the DWT decomposed middle-frequency bands (LH and HL) by constant strength factor. In [16], a robust method watermarking using soft computing is proposed. This technique is designed by grouping of DWT and SVD, and the computational results are tested against adversarial attacks. In this work, the experiments are performed only on the general grayscale images. In [17], a block-based watermarking is generated in the SVD domain. The input image is distributed into a matrix of size [4 \(\times\) 4], and the watermark pixels are embedded iteratively in the orthogonal pixels.

Su et al. [18] developed a blind digital watermarking by exploiting the properties of the SVD. The cover image is split into different matrices and each is undergone by SVD to generate the U (left orthonormal matrix), which depicts a special relation among two pixels for exploiting the multiplicative embedding of a watermark. This scheme is found robust against common image processing distortions. A medical image watermarking in the DWT + SVD domain is presented in [19]. The patient records in a form of digital images are watermarked by exploiting the singular elements of middle-frequency DWT bands. The ability to resist communication attacks is managed by using a combination of hyperchaotic and LZW.

In [20], a robust scheme using lifting wavelet transform is presented. A support vector machine is incorporated to create this algorithm robust towards attacks. The method is tested on different sub-bands of wavelet transform to advance the perceptual quality. Swaraja et al. [21] developed a secure scheme for medical records using DWT and Schur decomposition. Wavelet coefficients are selected blockwise by considering the HVS to ensuring that the scheme is imperceptible. Particle swarm optimization is used to make the scheme robust towards different communication distortions.

3 Nature-inspired intelligence watermarking

In this section, a nature-inspired intelligence-based watermarking in DWT-SVD has been described. ABC is an optimization algorithm motivated by the natural swarm honey bees foraging behavior [22]. The population taken initially represents the possible solutions, while the fitness value of any solution describes the nectar amount of the total population. Multiple categories of bees are worked in ABC, i.e., employed, onlooker, and scout bees. A detailed description involving step-by-step formulation of ABC is described in [9]. In the area of image processing applications especially digital image watermarking, ABC is quite effective. While designing a secure watermarking method, one should have to take care of the other important parameters of computation like processing time and memory space. ABC required lesser computing parameters in comparison with other optimization techniques, which results in less computational cost and memory requirement [23]. This motivates us to develop a robust watermarking using ABC in this work.

Fig. 1
figure 1

a Host image, b DWT (1-Level) of host

3.1 Proposed scheme

The proposed watermarking scheme exploits the characteristic features of the human visual system, hiding watermark under RGB color space. Firstly the host is decomposed by DWT as shown in Fig. 1. The middle-frequency band of this decomposition is split into the red, green, and blue channels. Each of these channels is then transformed by SVD to generate singular values. To offer an additional stage of protection color watermark is firstly encoded by the chaotic map and converted into some other form. Then decomposing it by single-level DWT, the middle-frequency band is split into three components. Principal components of each channel are taken to embed into singular values of each color channel of the host, respectively.

Fig. 2
figure 2

Schematic view of proposed watermark embedding process

3.2 Embedding process

The schematic view of the embedding is displayed in Fig. 2 are explained as step-by-step below:

Step 1: Read the color image I and perform 2-D Haar wavelet transform up to 4 levels to obtain the approximate, horizontal (h), vertical (v), and diagonal (d) sub-bands.

$$\begin{aligned}{}[I_{\mathrm{LL}}^k,I_{\mathrm{LH}}^k,I_{\mathrm{HL}}^k,I_{\mathrm{HH}}^k]=dwt2[I] \end{aligned}$$
(1)

where k define the level and multi-resolution bands (LL, LH, HL, HH) are derived by dwt2 [15] as.

$$\begin{aligned} \mathrm{LL}= \,& {} \gamma (i,j)=\gamma (i)\gamma (j) \end{aligned}$$
(2)
$$\begin{aligned} \mathrm{LH}= \,& {} \delta _{h}(i,j)=\delta (i)\delta (j) \end{aligned}$$
(3)
$$\begin{aligned} \mathrm{HL}= \,& {} \delta _{v}(i,j)=\delta (i)\delta (j) \end{aligned}$$
(4)
$$\begin{aligned} \mathrm{HH}=\, & {} \delta _{d}(i,j)=\delta (i)\delta (j) \end{aligned}$$
(5)

Here \(\gamma\), \(\delta\) are scaling and wavelet derivations.

$$\begin{aligned} \gamma _{z,x,y}(i,y)= \,& {} 2^{\frac{z}{2}}\gamma (2^{z}(i-x),2^{z}(j-y)) \end{aligned}$$
(6)
$$\begin{aligned} \delta _{z,x,y}^{m}(i,y)= \,& {} 2^{\frac{z}{2}}\delta ^{m}(2^{z}(i-x),2^{z}(j-y)) \end{aligned}$$
(7)

Step 2: Choose the middle-frequency band and split into three color components separately and then perform SVD.

$$\begin{aligned}{}[\mathrm{USV}^{T}]^{(R,G,B)}=I_{\mathrm{LH}} \end{aligned}$$
(8)
Fig. 3
figure 3

a Watermark, b encoded form of a by chaotic map using secret key

Step 3: Read the color watermark image W and apply a chaotic map using a secret key to obtain encoded watermark \(W^{'}\). The image is first encrypted to hide its actual identity, to improve the security benchmarks [24, 25]. Chaotic maps are found quite effective for providing security in image processing applications. In the proposed work, W is transformed into some other form by arnold transform cat map before embedding to obtain \(W^{'}\) [26]. A two-dimensional Arnold cat map is defined mathematically as.

$$\begin{aligned} \begin{bmatrix} i_{k+1}\\ j_{k+1} \end{bmatrix}= \begin{bmatrix} 1&{}1\\ 1&{}2 \end{bmatrix} \begin{bmatrix} i_{k}\\ j_{k} \end{bmatrix}\mathrm{mod} A \end{aligned}$$
(9)

where (\(i_{k+1}\),\(j_{k+1}\)) are the new pixels after shuffling original (\(i_{k}\),\(j_{k}\)) pixels of image size A by period Q (Q is selected according to dimension of A). Let Q is shuffled by Z times to encode, then it can be decoded back by (Q-Z) times. Hence, the value of Z is used as a secret key. This key will preserve the ownership right even though if embedding algorithm is leaked with unauthorized users. Figure 3 describes the encoded image by a chaotic map using a secret key. Now apply a 1 level Haar wavelet transform on \(W^{'}\).

$$\begin{aligned}{}[W_{\mathrm{LL}}^{'},W_{\mathrm{LH}}^{'},W_{\mathrm{HL}}^{'},W_{\mathrm{HH}}^{'}]=dwt2[W^{'}] \end{aligned}$$
(10)

Step 4: Select the middle-frequency sub-band and split into red, green, and blue separately and perform SVD on each channel to generate principal component PC [10].

$$\begin{aligned}{}[\mathrm{WU},\mathrm{WS},\mathrm{WV}^{T}]^{(R,G,B)}= \,\,& {} \mathrm{svd}(W_{\mathrm{LH}}^{'}) \end{aligned}$$
(11)
$$\begin{aligned} \mathrm{PC}^{(R,G,B)}=\, & {} (\mathrm{WU}*\mathrm{WS})^{(R,G,B)} \end{aligned}$$
(12)

Step 5: Embed the generated principal component into singular values of host color channels, respectively, using scaling factor \(\alpha\) generated from Sect. 3.4. Obtain the side information, i.e., singular values \(S^{(R,G,B)}\) and other sub-bands of encoded watermark image.

$$\begin{aligned} S_{\mathrm{new}}^{(R,G,B)}=S^{(R,G,B)}+\alpha *\mathrm{PC}^{(R,G,B)} \end{aligned}$$
(13)

Step 6: Apply inverse SVD using the new modified singular values obtained in step 5 for each color channel

$$\begin{aligned}{}[\mathrm{US}_{\mathrm{New}}V^{T}]^{(R,G,B)}=I_{\mathrm{LH}}^{'} \end{aligned}$$
(14)

Step 7: Perform inverse 2-D Haar wavelet transform modified middle-frequency sub-band up to k (k=4) levels to obtain the required color watermarked image WM.

$$\begin{aligned} \mathrm{WM}=idwt2[I_{\mathrm{LL}}^k,I_{\mathrm{LH}}^{'^{k}},I_{\mathrm{HL}}^k,I_{\mathrm{HH}}^k] \end{aligned}$$
(15)
Fig. 4
figure 4

Schematic view of proposed watermark extraction process

3.3 Extracting process

The embedded watermark is required to extract out from the attacked image to claim the rightful ownership as shown in Fig. 4. The extracting steps are shown below as.

Step 1: Read the distorted color watermarked image WM and host color image I and apply a 2-D Haar wavelet transform up to 4 levels to obtain approximate, horizontal, vertical, and diagonal sub-bands.

$$\begin{aligned}&[\mathrm{WM}_{\mathrm{LL}}^{k}, \mathrm{WM}_{\mathrm{LH}}^{k}, \mathrm{WM}_{\mathrm{HL}}^{k}, \mathrm{WM}_{\mathrm{HH}}^{k}]=dwt2(\mathrm{WM}) \end{aligned}$$
(16)
$$\begin{aligned}&[I_{\mathrm{LL}}^{k}, I_{\mathrm{LH}}^{k}, I_{\mathrm{HL}}^{k}, I_{\mathrm{HH}}^{k}]=dwt2(I) \end{aligned}$$
(17)

Step 2: Subtract the middle-frequency sub-band of distorted watermarked image from host image to obtain the distorted middle-frequency sub-band \(D_{\mathrm{LH}}\).

$$\begin{aligned} D_{\mathrm{LH}}=[\mathrm{WM}_{\mathrm{LH}}-I_{\mathrm{LH}}] \end{aligned}$$
(18)

Step 3: Select \(D_{\mathrm{LH}}\) and \(I_{\mathrm{LH}}\) to split into red, green, and blue components and then apply SVD on \(I_{\mathrm{LH}}\).

$$\begin{aligned}{}[\mathrm{USV}^{T}]^{(R,G,B)}=I_{\mathrm{LH}} \end{aligned}$$
(19)

Step 4: Compute extracted component E by \(D_{\mathrm{LH}}\), U, and V using \(\alpha\). After that, multiply it with the right unitary matrix of watermark image obtained using side information.

$$\begin{aligned} E=\, & {} \frac{[U^{T}D_{\mathrm{LH}}V]^{(R,G,B)}}{\alpha } \end{aligned}$$
(20)
$$\begin{aligned} E^{'}= \,& {} [E*\mathrm{WV}^{T}]^{(R,G,B)} \end{aligned}$$
(21)

Step 5: Apply inverse 1-Level Haar wavelet transform using \(E^{'}\) along with other sub-bands from side information to obtain the encoded watermark. Finally, perform an inverse chaotic map using a secret key to decode and obtain the required color extracted image \(\mathrm{EW}\).

3.4 Optimization of embedding factor

The process of computing the optimized embedding strength factor \(\alpha\) is described in this sub-section. The value of imperceptibility and robustness depends upon the selection of an optimal value of \(\alpha\) using ABC. Instead of selecting a specific value of the scaling factor by hit and trial basis, the optimal value of the embedding factor \(\alpha _{\mathrm{optimized}}\) is evaluated as shown in Fig. 5. The solution range lies all the permissible entries for [\(\alpha\)], where \([\alpha ]_{\min }\) < [\(\alpha\)] < \([\alpha ]_{\max }\).

The optimized value \(\alpha _{\mathrm{optimized}}\) is evaluated iteratively. The population size of 50 is initiated with a limit value of 25. The size of employed and onlooker bees is defined as 50% of the original population. The upper limit of iteration taken is 25 to find the optimal solution. The sizes of scout bees are changeable according to the update of the population. The range of scaling factors \(\alpha\) to be optimized is lies between {\([\alpha ]_{\min }\) : \([\alpha ]_{\max }\)} and let N number of attacks are undergone to obtain the optimized value of the scaling factor by applying the various attacks over the watermarked image using the ABC algorithm.

Fig. 5
figure 5

Schematic view of ABC for evaluating [\(\alpha\)]

By considering the evaluation metric, an objective is designed to optimize the scaling factor \(\alpha\) by minimizing the objective function shown in Eq. 22. Perceptual quality (P) is computed by \(\mathrm{PSNR}\) and \(\mathrm{NC}\) between host image I and watermarked image \(\mathrm{WM}\). And the robust behavior (R) is checked by computing \(\mathrm{NC}\) between extracted (\(\mathrm{EW}\)) and watermark image (W) by applying variety of attacks N as shown in Fig. 6.

$$\begin{aligned} \mathrm{Objective}\,\mathrm{Function}= & {} \left( \frac{100}{\mathrm{PSNR}(I,\mathrm{WM})}+\frac{1}{\mathrm{NC}(I,\mathrm{WM})}\right) _{P}\nonumber \\&+\,\left( \frac{N}{\sum _{i=1}^{N}\mathrm{NC}_{i}(W,\mathrm{EW})}\right) _{R} \end{aligned}$$
(22)
Fig. 6
figure 6

Schematic view of solution selection and computing fitness value

The proposed objective function considers the perceptual quality and robust behavior simultaneously, for computing the fitness value. This will improve the robustness of the process method, by not degrading the imperceptibility. The objective function evaluates the fineness of every solution by its rank among the population \(S_{N}\). Proposed solution selection is performed to every solution until they are distributed among perceptual quality and the robustness class. Then the two classes are joined together to perform the optimization steps, as the ABC process iterates over a single solution. The fitness value is computed in each iteration for every solution accordingly. The computational steps are performed as.

  1. 1.

    Arrange the solution of perceptual quality and robustness class in increasing order according to objective outcomes as:

    $$\begin{aligned} \mathrm{Perceptual}\,\mathrm{quality}= & {} \begin{bmatrix} [\alpha ]_{1}\\ [\alpha ]_{2}\\ :\\ :\\ [\alpha ]_{N_{p}}\\ \end{bmatrix}_{P} \end{aligned}$$
    (23)
    $$\begin{aligned} \mathrm{Robustness}= & {} \begin{bmatrix} [\alpha ]_{1}\\ [\alpha ]_{2}\\ :\\ :\\ [\alpha ]_{N_{r}}\\ \end{bmatrix}_{R} \end{aligned}$$
    (24)

    where \(N_p\) and \(N_r\) are the solutions in the perceptaul quality and robustness class. The objective of each class is arranged as:

    $$\begin{aligned}&\mathrm{Objective}([\alpha ]_{1})_{P}>\mathrm{Objective}([\alpha ]_{2})_{P}\\&\quad>\cdots>\mathrm{Objective}([\alpha ]_{N_p})_{P}\\&\mathrm{Objective}([\alpha ]_{1})_{R}>\mathrm{Objective}([\alpha ]_{2})_{R}\\&\quad>\cdots >\mathrm{Objective}([\alpha ]_{N_r})_{R} \end{aligned}$$

    Here Objective\(([\alpha ]_{N_p})_{P}\) and Objective\(([\alpha ]_{N_r})_{R}\) are the perceptual quality and robustness objective after the \(y^{th}\) iteration accordingly.

  2. 2.

    Merge the solutions of the above two classes to generate a single population, where each rank of each solution describes its fitness value. The merged population is generated as:

    $$\begin{aligned} {\mathrm{Merged} = \begin{bmatrix} \begin{bmatrix} [\alpha ]_{1}\\ [\alpha ]_{2}\\ :\\ :\\ [\alpha ]_{N_{p}}\\ \end{bmatrix}_{P} \\ \begin{bmatrix} [\alpha ]_{1}\\ [\alpha ]_{2}\\ :\\ :\\ [\alpha ]_{N_{r}}\\ \end{bmatrix}_{R} \end{bmatrix}} \end{aligned}$$
    (25)

    The merged population are ranked in such a manner that the rank of \([\alpha ]_{i}\) solution is assigned among one of the possible outcomes of the proposed objective function must satisfy the following condition.

    1. (a)

      Condition 1: Objective function() \(\propto\) {Objective (\([\alpha ]_{i})_{P}\) > Objective (\([\alpha ]_{i})_{R}\) }

      In this condition, the solution [\(\alpha ]_{i}\) favors the perceptual quality class and not the robustness class. Hence it does not fulfill the requirement of the proposed objective function.

    2. (b)

      Condition 2: Objective function() \(\propto\) {Objective (\([\alpha ]_{i})_{R}\) > Objective (\([\alpha ]_{i})_{P}\) }

      In this condition, [\(\alpha ]_{i}\) favors the robustness class, while the perceptual quality class does not. Hence it does not fulfill the requirement of the proposed objective function.

    3. (c)

      Condition 3: Objective function() \(\propto\) \([\alpha ]_{i}\) \(\in\)[Objective (\([\alpha ]_{i})_{R}\), Objective (\([\alpha ]_{i})_{P}\)]

      In this condition, [\(\alpha ]_{i}\) favors both the perceptual quality class and robustness class. Hence it fulfills the requirement of the proposed objective function.

The proposed nature-inspired intelligence watermarking improves the perceptual quality, robust behavior, and embedding capacity simultaneously by considering the Condition 3 as shown in Fig. 6.

Fig. 7
figure 7

Test dataset general images (ad), medical images (eh), aerial images (il)

4 Experimental setup

The experimental implementation of the presented algorithm is obtained using MATLAB 2014b software on the i3 processor. The performance of the proposed algorithm is calculated by a 24-bit color watermark of dimension [64 \(\times\) 64] RTU logo as shown in Fig. 3, using multiple experiments carried out on color host images of dimension [512 \(\times\) 512] taken from the different dataset [27, 28] (including general images, medical images, aerial images, etc.) as shown in Fig. 7. The range of scaling factors \(\alpha\) to be optimized lies between [0.1, 1]. Along with different dataset, the experiments are also performed by varying the dimension of the input images. To measure the efficacy of the developed algorithm mathematically, we used different quality metrics [4].

The invisibility of the secret mark in the host image represents the imperceptibility in terms of quality evaluation. Imperceptibility can be evaluated using PSNR (peak signal-to-noise ratio) which is presented as.

$$\begin{aligned} \mathrm{PSNR}=10* \log _{10}\frac{255^{2}}{\frac{1}{3mn}\sum _{c=1}^{3}\sum _{i=1}^{m}\sum _{j=1}^{n}[I(i,j,c),\mathrm{WM}(i,j,c)]^{2}} \end{aligned}$$
(26)

Here mn represents the size, and c describes the color channel. SSIM (structural similarity index modulation) evaluates the pixel-by-pixel structural similarity between two images, which is more effective according to HVS. SSIM can be calculated mathematically as.

$$\begin{aligned} \mathrm{SSIM}=\mathrm{lum}(I,\mathrm{WM})\mathrm{con}(I,\mathrm{WM})\mathrm{str}(I,\mathrm{WM}) \end{aligned}$$
(27)

where lum gives the luminance difference, con gives the contrast difference and str gives the structural variation between images.

The robustness of the implemented scheme towards various intentional and unintentional image distortions has also been calculated. The matching of the extracted watermark with the embedded watermark image is computed mathematically with the help of NC which is defined as.

$$\begin{aligned} \mathrm{NC}=\frac{\sum _{c=1}^{3}\sum _{i=1}^{m}\sum _{j=1}^{n}[W(i,j,c) \oplus \mathrm{EW}(i,j,c)]^{'}}{3mn} \end{aligned}$$
(28)

where W and EW are embedded and extracted watermark images, \(\oplus\) is a pixel-wise XOR operation.

Fig. 8
figure 8

Watermarked and extracted watermark for general image dataset (a, d, g, j), medical image dataset (b, e, h, k), aerial image dataset (c, f, i, l)

Table 1 Imperceptibility outcome of the proposed work

4.1 Imperceptibility test

The quality of the image on inserting a watermark describes the imperceptibility test [29]. Figure 8 displays the visual appearance of the image after adding a watermark, and their extracted image for the proposed scheme. All the images from different dataset have PSNR values higher than 46 dB. Table 1 presents the results obtained after using the optimized scaling factor for visual appearance taking different dataset. The PSNR and SSIM of the proposed work taking different dataset are shown graphically in Fig. 9.

Fig. 9
figure 9

Plot for imperceptibility test of the proposed algorithm

4.2 Robustness test

To investigate the capability of the proposed nature-inspired intelligence-based color image watermarking, a variety of attacks are applied in this section. The attacks are including salt and pepper noise, Gaussian noise, speckle noise, average filter, median filter, Gaussian filter, JPEG compression, sharpening, rotation, and resizing. As the proposed algorithm is not designed for a particular category of an image, it is examined on different dataset including general, medical, and aerial images. In this article, we have displayed the visual outcomes for one image only due to space limitations of dimension [512 \(\times\) 512] from each dataset after applying the attacks.

4.2.1 Attacks on general image dataset

Figure 10 displays the visual impact of exposing the watermarked Lena from a general image dataset to a variety of attacks as mentioned above for the proposed nature-inspired intelligence watermarking scheme. A total of twelve diverse nature of attacks are applied on Lena, and the NC value is computed for the extracted mark.

Fig. 10
figure 10

Watermarked and extracted watermark after applying various attacks for general image dataset

The NC values calculated for all the input images from the general image dataset are presented in Table 2. In Fig. 10a–c, the Lena image is exposed to noise attacks including salt and pepper, Gaussian, and speckle noise. Salt and pepper noise with density 0.01 is applied on Lena and NC obtained for extracted watermark is 0.9898. The impact of Gaussian noise with mean value 0 and variance 0.01 on Lena is shown in Fig. 10 (b), and the NC computed is 0.9649 for extraction. Similarly, the NC value under speckle noise with an intensity of 0.01 is 0.9840. This explains that the presented algorithm is robust against the noise.

The other type of attack which is used to test robustness is image filtering. Lena of general dataset is tested against average, Gaussian, and median filter with filter size 3 \(\times\) 3 as present in Fig. 10d–f. The NC values obtained for the extraction are 0.9844, 0.9973, and 0.9960, respectively. The results depict that the presented algorithm is more robust to Gaussian and median filter attacks.

Geometrical attacks are implemented on the general image dataset to check the robustness of the presented work. Lena is firstly tested by JPEG compression with quality factor 30, and the NC of the extracted image is 0.9657 as shown in Fig. 10g. Then the rotation (1\(^\circ\)) is applied to the marked image as described in Fig. 10i. Finally resizing is performed with scale (512-256-512), and the NC obtained for the extracted image is 0.9976.

The other attacks applied to the general image dataset include sharpening, gamma correction, and histogram equalization. The NC computed for all these attacks are shown in Table 2 and the visual appearance is presented in Fig. 10h, j, k, respectively. The observations from Table 2 depict that the proposed nature-inspired watermarking is robust towards a variety of attacks for general image dataset.

Table 2 NC results for general image dataset after applying variety of attacks

4.2.2 Attacks on medical image dataset

To prove the robust property of the algorithm, all the twelve attacks are performed to the medical image dataset. Figure 11 displays the outcome of applying attacks on XRay1 and extracted image only due to limitation of space from the medical dataset.

Firstly the XRay1 is exposed to salt and pepper noise, and the extracted image has the NC outcome 0.9863 with density level of noise is 0.01. The NC value of the extracted image in case of severing Gaussian noise is 0.9583. Finally, the speckle noise with variance 0.01 is applied on XRay1 and the NC computed is 0.9840. The appearance of applying noise attacks is given in Fig. 11a–c. These outcomes highlight that the presented algorithm is robust to noise attack for medical images also.

Fig. 11
figure 11

Watermarked and extracted watermark after applying various attacks for medical image dataset

In Fig. 11d , average filter attack is applied on medical XRay1 image. The filter size is kept 3 \(\times\) 3, which is applicable to test the severity of the attack. The NC value obtained from the extracted image is 0.9848. Then XRay1 is tested against the Gaussian filter, and the NC obtained against this attack is 0.9972 as shown in Fig. 11e. Finally, the median filter attack is applied to the XRay1 and the NC of extraction, in this case, is 0.9956. The impact of applying the median filter on the medical image is displayed in Fig. 11f.

In Fig. 11g, i, l, XRay1 of medical dataset is exposed to different geometrical attacks including JPEG compression, rotation, and resizing. Firstly, JPEG compression with QF 30 is applied on XRay1 and the NC value obtained for the extracted image is 0.9631. The impact of rotation (1\(^\circ\)) attack is severe as the NC value of the extracted image is 0.8713. The watermarked XRay1 is tested with a resizing (512-256-512) attack to obtain the NC 0.9975. These results highlight the robust behavior of the proposed work for medical images.

The scheme is also tested for a sharpening attack as shown in Fig. 11h. The NC obtained by applying this attack is 0.9963 for the extracted image. Other attacks on which the proposed work is checked are gamma correction and histogram equalization whose results are present in Fig. 11j, l. The NC of extracted images in these attacks is 0.9873 and 0.9037. Table 3 includes the NC results for the medical image dataset depicts the robustness test against a variety of attacks.

Table 3 NC results for medical image dataset after applying variety of attacks

4.2.3 Attacks on aerial image dataset

To prove the non-dependency on the input image of the presented work, the robustness test is also applied to the aerial dataset. All the above discussed twelve attacks are implemented on the aerial images. The NC of the extracted image is described in Table 4. While the visual results for Aerial1 image from the aerial image dataset are shown in Fig. 12.

Aerial1 is firstly tested against the noise addition attacks. Figure 12a shows the results of applying salt and pepper noise, and the extracted image has obtained NC 0.9865. The Aerial1 is exposed to Gaussian noise with intensity 0.01, and the NC achieved is 0.9607 as viewed in Fig. 12b. Similarly, the speckle noise is tested to the Aerial1 as shown in Fig. 12c, and the extracted image has obtained NC 0.9874. These results show that the Aerial1 has attained higher robustness towards salt and pepper and speckle noise.

The filtering attacks including average, Gaussian, and median filter are applied on the Aerial1, and the results are presented in Fig. 12d–f. The NC value of extracted images obtained for the filtering attacks is 0.9882, 0.9977, and 0.9958, respectively. The Aerial image dataset is found robust against the filtering attacks.

The Aerial1 is tested with JPEG compression (QF=30), and the NC obtained for extracted image is 0.9620 as shown in Fig. 12g. Other geometrical attacks including rotation (1\(^\circ\)) and resizing (512-256-512) are shown in Fig. 12i, l, with NC 0.8261 and 0.9976, respectively.

For other attacks like sharpening, gamma correction, and histogram equalization, the results for Aerial1 are displayed in Fig. 12h, j, k. The scheme is found highly robust towards a sharpening attack with NC 0.9961. Furthermore, the NC for gamma correction and histogram equalization is 0.9833 and 0.8931, respectively. The results of NC in Table 4 highlight the effectiveness of the scheme towards attacks for the aerial image dataset.

Fig. 12
figure 12

Watermarked and extracted watermark after applying various attacks for aerial image dataset

Table 4 NC results for aerial image dataset after applying variety of attacks

4.3 Capacity test

In the presented work, the proposed work is tested for the embedded capacity of the watermark in the original image. The embedding capacity is evaluated using a bit per pixel of watermark inserted in the host. In the presented technique, a 24-bit color image of size 64 \(\times\) 64 is taken to hide in the color host of size 512 \(\times\) 512, and the embedding capacity is computed as.

$$\begin{aligned} (64 * 64 * 24)/(512 * 512 * 3)=0.125 \,\mathrm{bit}\,\mathrm{per}\,\mathrm{pixel} \end{aligned}$$
(29)

4.4 Security test

In the SVD-based watermarking, a major security flaw that occurs is known as false-positive detection. In this flaw, during extraction intruders can able to extract the false watermark. This type of false detection generally occurs when diagonal elements of watermark are used during embedding. The proposed algorithm resolves this security issue by first scrambling the watermark using a secret key and embedding the principal component as discussed in the embedding steps. While extraction, the same secret key is obligatory to pull out the correct watermark. Our algorithm is also tested for this flaw of false detection and the results are shown in Fig. 13.

Fig. 13
figure 13

Security test of the proposed watermarking scheme

4.5 Execution time

The implementation time of the presented algorithm is computed on MATLAB2014a running on a dual-core i3 processor with 2.40GHz and 2GB RAM. Time computation includes embedding time, extraction time, and optimization time. Table 5 presents the average execution time for the proposed algorithm. It is noticed from Table 5 that the execution time of proposed embedding and extraction is negligible in comparison with the optimization process. Furthermore, the execution time will also depend on the dimensions of the test images.

Table 5 Average execution time of the proposed work

5 Comparative study

In this section, the proposed nature-inspired intelligence-based scheme is compared with several other related methods on several essential characteristics like imperceptibility, capacity, robustness, security, etc.. In this context, various properties of watermarking are considered and compared with other methods in Table 6. These properties include type and size of input images, working domain, security, method of extraction, false-positive detection, and computation of scaling factor. As illustrated, it is obvious that the proposed work is found quite effective in comparison with others.

Fig. 14
figure 14

Comparative analysis of imperceptibility

The imperceptibility of the presented scheme is compared with several latest schemes based on wavelet transform and SVD [2, 4,5,6, 10, 13, 18,19,20,21]. It is evidently noticed from Fig. 14 that the proposed work is highly imperceptible as compared to the additional related work. In Table 7, the comparison of the presented work with time-efficient watermarking using machine learning [30], in terms of execution time is performed. We also compare time computation with non-optimized watermarking [4, 31], as expected these schemes have less execution time because no calculation is performed to optimize the embedding parameters. To compute the recital of the presented watermarking scheme, variety of attacks are applied on different image dataset. The appearance of the extracted mark is found visible by the human eye as required in any robust image watermarking despite manipulation attacks [2]. The comparative analysis for robustness is performed by comparing the NC of the presented scheme with other closely interrelated schemes in Table 8. Furthermore, it is noticed from Table 8 that in most of the attacks the proposed scheme is found more robust in comparison with state-of-the-art.

Table 6 Comparative discussion of the methodology used in the proposed scheme and other schemes
Table 7 Comparison of average execution time between presented work with other related works

6 Conclusions

Digital image watermarking is originated as an effective technique for image security to take care of rightful ownership and copyright protection. The hiding of secret information in the host image should be done in such a manner that it should distort and the originality of the image and able to survive the unauthorized image manipulation attacks. The proposed work tried to handle all these issues by taking the optimal scaling factor using ABC optimization. To provide extra security, the watermark is first encoded into some other forms and then the principal components are used to insert in the diagonal metric of the host which also helps to resolve the false-positive error problem. A large dataset of images is used for testing the working of the proposed scheme, but due to limitation of space one image from each dataset is displayed in the paper. The robustness and perceptual appearance of the presented scheme are highlighted by comparing the results with the latest watermarking schemes. In the nearby future, the scheme will be improvised on video data as input and utilizing more parameters for optimization

Table 8 Robustness analysis by NC outcome of the presented algorithm with other related schemes