1 Introduction

With the advancement in digital technologies, the use of social media becomes very common in our day to day life. The uploading of images on social media platforms is one of the primary ways for information sharing in the present time. These images need to be protected against wrongful ownership claims. At the same time, they must have the ability to detect tampering and self-recovery (in case attackers modifies the content) [23]. Images are main communication medium over the social media. Therefore, the safe communication of digital images needs to be assured by using highly secured digital technologies. The copyright protection [29], image authentication [30], and the recovery of the altered portion of the image [28] are some of the imperative matters that need serious attention with the increase in the digital industry. The security of digital images against attacks is an important research area among researchers, which results in a wide verity of solutions like digital watermarking [27], steganography [14], and cryptography [5]. Watermarking provides many advantages over other methods including key-based verification and access control [18].

Digital image watermarking is the process of inserting watermark data (e.g., digital data) into the image [4]. The watermark data are extracted from the watermarked image at the time of extraction. Digital watermarking can be divided into different categories. The watermarking schemes are widely used in healthcare, secure communication, and other areas [4, 5, 18]. Digital watermarking offers verification of ownership/copyright and image integrity, which is mandatory in the current era of digital media communication. Let us suppose, a person (owner) uploads an image on a social media platform. If the image is publically available (this is mostly the case), attacker can easily modify, tamper, and claim false ownership of the image. If a proper watermarking protection is provided (before upload), the owner can verify the ownership (using secret key), prove its authenticity and recover the tampered regions. Figure 1 represents this same process graphically.

Fig. 1
figure 1

Image security/verification using digital image watermarking

The rapid development of digital era demands more advanced watermarking methods; having multipurpose nature for various applications. Multipurpose watermarking schemes help to achieve multiple objectives simultaneously, which make it more convenient for practical applications [16]. In the literature, many multipurpose image watermarking methods have been proposed [1, 2, 6, 7, 10, 11, 15,16,17, 19, 24,25,26, 32,33,34,35], but very limited work has been done on methods that can simultaneously solve three main objectives: ownership proof, tamper detection, and tamper recovery [2, 24]. In addition, solving three objectives with blind nature and good imperceptibility is still the most challenging task in watermarking domain. Therefore, a multipurpose image watermarking is proposed in this work to address three objectives (copyright/ownership protection, tamper localization, and self-recovery) in an efficient and blind manner with good imperceptibility. The main contributions of this work are as follows:

  1. 1.

    To the best knowledge of authors, first blind multipurpose (with three objectives) scheme with imperceptibility ~ 41 dB.

  2. 2.

    Even after multipurpose nature, excellent image restoration even for severely tampered images (up to 80% tampered).

  3. 3.

    Average tamper localization is found to be around 99.8%.

  4. 4.

    Very good robustness even after multipurpose nature.

2 Literature Review

Generally, the robust watermarking schemes are used for copyright/ownership verification. Mostly transform domain schemes (i.e., Fourier Transform (FT), Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT), Lifting Wavelet Transform (LWT), Integer Wavelet Transform (IWT), etc.) have been preferred over spatial domain approaches to get high robustness [2, 15, 24]. IWT maps integer values to integers with no rounding-off error. Thus, it reduces the loss of information due to round-off errors and performs efficiently as compare to counterpart transforms [3, 13, 36]. The fragile watermarking detects tamper/forged region and authenticate the image [35]. Some of the advanced fragile schemes also offer self-recovery of the image by inserting the recovery data with the fragile watermark during embedding [32,33,34,35]. Multipurpose schemes fulfill two or more requirements at the same time. Normally, robust and fragile mechanisms are combined in a single scheme to get the multipurpose nature [2, 24].

To the best knowledge of authors, Lu and Liao [16] presented first ever multipurpose watermarking scheme in 2001 that can be used for image authentication and copyright protection. The watermark embedding was based on the quantization of wavelet coefficients. The scheme has blind nature and acceptable results to a certain limit. However, the discussion on the security issues and feature of image restoration were not provided. Zhu et al. [35] offered a semi-fragile scheme for image watermarking to provide image authentication and restoration. In this scheme, the Pinned Sine Transform (PST) was used to embed authentication watermark and restoration of image was considered as an irregular sampling issue. The repetitive projections onto convex were used to reconstruct the tampered blocks. However, the performance was limited to low tampering rate. Zhang and Wang [32] introduced a fragile image watermarking method for authentication and restoration of the image. The embedding process was based on differential expansion (DE). The image restoration was limited to the tampering rate less < 3.2% (very low). Additionally, the visual quality of the watermarked image was also low (approx. 28 dB). Zhang et al. [33] offered two fragile image watermarking methods using the reference sharing mechanism for digital images. The first method performed efficiently for very low tampering rate (i.e., < 24%). The second scheme used adaptive restoration along with the reference sharing to get efficient results for the tampering rate < 66%.

Zhang et al. [34] presented a watermarking scheme for tamper localization and self-recovery. The method was based on compressive sensing, DCT, and Composite reconstruction. The imperceptibility of the scheme was significant, but the image restoration was limited to a tampering rate of less than 60%. Ansari et al. [1] presented a watermarking technique for tamper localization and self-recovery of the tampered regions. It was based on the spatial domain, block-wise division, singular value decomposition (SVD), and LSB bit replacement. The scheme has given significant results. However, the scheme's ability to restore the image has been limited to the tampering rate of 50%. Mehta et al. [17] offered a watermarking scheme based on LWT, QR decomposition, and LSVR (Lagrangian Support Vector Regression) for protecting ownership/copyright. The robust watermark has been secured by using AT (Arnold Transform). Acceptable experimental outcomes in terms of robustness have been achieved but the scheme has only robust nature, and therefore, it could not be used for tamper detection and self-recovery. Liu et al. [15] proposed a multipurpose watermarking scheme to offer copyright protection and image authentication. The scheme was based on DWT, luminance quantization, and an efficient LSB replacement procedure. Results showed the effectiveness of the scheme but it was not secured against block-based attacks due to lack of organized randomness in fragile sequence, and block-based self-authentication. Furthermore, it lacked in restoring the tampered images. Singh and Agarwal [24] offered a multipurpose scheme that can be used for copyright protection, image authentication, and self-recovery. The chaotic map and DCT were used to provide security and quantization, respectively. The scheme provided high robustness but the imperceptibility was poor (≤ 30 dB). Even the image restoration was limited to a tampering rate of less than 50%. Ansari and Pant [2] established a non-blind multipurpose watermarking for gray images using DWT, SVD. The scheme had acceptable results to protect copyright and check authenticity, along with significant imperceptibility. Yet the considerable image restoration can be attained only for a tampering rate < 50%. Also, the non-blind mechanism made it impractical. Islam and Laskar [10] introduced an image watermarking technique using LWT and SVD. To extract the watermark, SVM (support vector machine)-based binary classification process was applied. Experimental outcomes proved that significance in terms of robustness and imperceptibility, but the embedding capacity (payload) was low. Additionally, the scheme was unable to provide tamper detection and self-recovery features. Singh and Singh [25] presented a BTC (block truncation coding)- and quantization-based fragile watermarking technique for digital images, which can be used for tamper localization and image recovery. Results demonstrated effective authentication and recovery, but the significant image restoration was possible only for the tampering of less than 50%.

Qin et al. [19] offered a novel fragile image watermarking method using non-uniform watermark sharing and OIBTC (optimal iterative block truncation coding). Although the results showed significant outcomes in terms of tamper detection and image recovery but similarly to [1] and [25], the restoration condition required tampering rate ≤ 50%. Islam et al. [11] proposed a watermarking scheme for copyright protection of digital images based on LWT. To extract the robust watermark, SVM classifier has been employed. The scheme gave considerable results; however, the embedding payload (capacity) of the scheme was significantly low and multipurpose nature was also not there. Haghighi et al. [7] offered a blind multipurpose image watermarking method based on Shearlet transform using MLP and NSGA-II algorithms. The embedding threshold and blocks got selected using an optimization approach for watermarking. The method provided good results for copyright protection/image authentication to a certain limit against attacks. However, the method did not provide image restoration capability. Daneshmandpour et al. [6] introduced a fragile scheme for tamper detection and self-recovery of gray images. The detection of tampering in the images was based on the cyclic redundancy check (CRC), whereas the image recovery process was based on Embedded Zero Block Coding (EZBC), bit streaming and rate allocation. Although a multi-scale recovery process provides acceptable results, the scheme can’t tolerate tampering more than 72%. Additionally, the scheme used the block size of 8 × 8 for watermarking, which reduces the detection accuracy significantly.

With reference to the above discussed literature, it is quite evident that the multipurpose watermarking is still an open and challenging research area. Existing schemes are unable to provide an acceptable solution for ownership protection, image authentication, and image restoration simultaneously. Even though a few existing schemes such as [24] and [2] fulfill all three purposes, yet they have other serious limitations. For example, [24] has poor imperceptibility and [2] has a non-blind mechanism that required the original host for the extraction process. The proposed work offers a blind multipurpose scheme to provide effective solutions for the mentioned issues without compromising the performance.

3 Proposed Scheme

The proposed scheme has four main parts: (1) Watermark preparation, (2) Watermark embedding, (3) Watermark extraction (for ownership and tamper check), and (4) Image self-recovery. Robust watermark is embedded in the transform domain using IWT after double layers of encryptions (using Arnold Transform (AT) [31] and XOR key). Encryption provides extra security to the robust watermark. Fragile watermark is embedded using 9-base notation-based least significant bitreplacement [15]. Each part of the proposed framework is explained in detail as follows:

3.1 Watermark Preparation

In the proposed scheme, the pseudo-random binary sequences are used for robust watermark encryption (XOR-based) and fragile watermarking. In context to digital image watermarking, the pseudo-random binary representation helps to secure the watermarking system against illegal reach. Further, it improves the robust watermarking results against cropping, content removal, and other common attacks. In terms of fragile watermarking, it improves the authentication results in an effective manner against copy-move, copy-paste, and other types of tampering attacks. Moreover, it ensures the authenticity and safety of the digital data because no one can decrypt or access the data in its actual form without the knowledge of the secret key. Thus, the pseudo-random binary sequences can be effective in order to get better results with added security in digital watermarking schemes. Mersenne Twister (MT) is one of the widely used PRNG (pseudo-random number generation) algorithms [12, 21]. The sequence obtained by PRNG generator remains deterministic in nature and can be reproduced by using the initial value (i.e., seed value). A variant of MT algorithm known as SFMT (SIMD-Oriented Fast Mersenne Twister) is used in this work because of its faster speed and improved equi-distribution feature [22]. SFMT generates floating-point numbers ranging between 0 and 1, each element (\({\text{Num}}_{{{\text{val}}}}\)) of the sequence is converted into \({\text{Bin}}_{{{\text{val}}}}\) (i.e., binary value 0 or 1) using Eq. (1).

$$ {\text{Bin}}_{{{\text{val}}}} = \left\{ {\begin{array}{*{20}l} 0 \hfill & {{\text{if}}\;{\text{Num}}_{{{\text{val}}}} < 0.5} \hfill \\ 1 \hfill & {{\text{if}}\;{\text{Num}}_{{{\text{val}}}} \ge 0.5} \hfill \\ \end{array} } \right. $$
(1)

This generated \({\text{Bin}}_{{{\text{val}}}}\) is used in robust as well as fragile watermark preparation for different purposes, which are discussed in following sections.

3.1.1 Robust Watermark Preparation

The robust watermark \(W_{{{\text{robust}}}}\) (i.e., binary image of size 32 × 32) is encrypted to get better security against unauthorized access. At first, AT transform is applied on the robust watermark for \(K_{1}\) (secret key-1) times. It converts \(W_{{{\text{robust}}}}\) to scrambled noisy form \(W_{{{\text{AT}}}}\). Next, a random binary sequence \(W_{{{\text{ran}}\_1}}\) is produced using \(K_{2}\) (secret key-2) with the help of SFMT generator of length 32 × 32. Next, XOR operation is performed between corresponding bits of \(W_{{{\text{ran}}\_1}}\) and \({\text{W}}_{AT}\), which generates \(W_{{{\text{encrypted}}}}\) (of size 32 × 32). The process of robust watermark preparation and encrypted robust watermark are shown in Fig. 2a, b, respectively. Only correct keys (\(K_{1}\) and \(K_{2}\)) can decrypt the robust watermark to original form.

Fig. 2
figure 2

a Robust watermark preparation. b The robust watermark and its encrypted watermark

3.1.2 Fragile Watermark Preparation

The host image is divided into 2 × 4 size non-overlapping blocks (total blocks = TB).A random binary sequence \(W_{{{\text{ran}}\_2}}\) is produced using \(K_{3}\) (secret key-3) with the help of SFMT generator of length 6 × TB. The average blocks intensities of every 2 × 4 are converted into 8-bit binary representation. 6 MSB (most significant bit) of these 8 bits are concatenate in a controlled randomized manner using \(K_{4}\) (secret key-4) to generate recovery watermark data (\(W_{{{\text{recov}}}}\)). Now, Every 6 bits from both sequences (i.e., \(W_{{{\text{ran}}\_2}}\) and \(W_{{{\text{recov}}}}\)) and cascaded. Finally, the combined watermark \(W_{{{\text{fragile}} + {\text{recov}}}}\) is obtained from this cascading. Figure 3 presents the process of generating the watermark \(W_{{{\text{fragile}} + {\text{recov}}}}\).

Fig. 3
figure 3

Fragile watermark preparation in order to preserve the recovery data along with the authentication data

3.2 Watermark Embedding

The watermark insertion (Robust and Fragile) process is described as follows.

3.2.1 Robust Embedding

The following steps show the embedding of the robust watermark (i.e., \(W_{{{\text{encrypted}}}}\)) into the host image.

Step-1 Divide the host image into 16 × 16 size non-overlapping blocks.

Step-2 Apply IWT transform on the first block to get LL, LH, HL, and HH bands. Again apply IWT on the LH band to get LL1, LH1, HL1, and HH1.

Step-3 Calculate modification coefficients using Eq. (2).

$$ M_{{\text{coeff-1}}} = {\raise0.5ex\hbox{$\scriptstyle {\left\{ {\alpha - \left( {{\text{HL1}}_{{{\text{avg}}}} - {\text{ LH}}1_{{{\text{avg}}}} } \right)} \right\}}$} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{$\scriptstyle 2$}} \, \;{\text{and}}\;M_{{\text{coeff-2}}} = {\raise0.5ex\hbox{$\scriptstyle {\left\{ {\alpha - \left( {{\text{LH1}}_{{{\text{avg}}}} - {\text{ HL}}1_{{{\text{avg}}}} } \right)} \right\}}$} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{$\scriptstyle 2$}} $$
(2)

Here, \(\alpha\) is the embedding parameter, \({\text{LH1}}_{{{\text{avg}}}}\) and \({\text{HL1}}_{{{\text{avg}}}}\) denote average value of pixels of LH1 and HL1, respectively.

Step-4 Embed first bit of \(W_{{{\text{encrypted}}}}\) by updating the LH1 and HL1 coefficients using Eq. (3) and Eq. (4).

$$ {\text{LH}}1(x,y) = \left\{ {\begin{array}{*{20}l} {{\text{LH1(}}x,y{) } - \, M_{{\text{coeff-1}}} } \hfill & {{\text{if}}\;\; \, w\_{\text{bit}} = 1\;\;{\text{and}}\;\;{\text{HL1}}_{{{\text{avg}}}} - {\text{ LH1}}_{{{\text{avg}}}} { < }\alpha } \hfill \\ {{\text{LH1(}}x,y{)} + M_{{\text{coeff-2}}} } \hfill & {{\text{if}}\;\;w\_{\text{bit}} = 0\;\;{\text{and}}\;\;{\text{LH1}}_{{{\text{avg}}}} - {\text{HL1}}_{{{\text{avg}}}} { < }\alpha } \hfill \\ {{\text{LH1(}}x,y{)}} \hfill & {{\text{otherwise}}} \hfill \\ \end{array} } \right. $$
(3)
$$ {\text{HL1(}}x,y{)} = \left\{ {\begin{array}{*{20}l} {{\text{HL1(}}x,y{)} + M_{{\text{coeff-1}}} \, } \hfill & {{\text{if}}\;\; \, w\_{\text{bit}} = 1\;\;{\text{ and}}\;\;{\text{HL1}}_{{{\text{avg}}}} - {\text{LH1}}_{{{\text{avg}}}} { < }\alpha } \hfill \\ {{\text{HL1(}}x,y{)} - M_{{\text{coeff-2}}} } \hfill & {{\text{if}}\;\; \, w\_{\text{bit}} = 0\;\;{\text{and}}\;\;{\text{LH1}}_{{{\text{avg}}}} - {\text{HL1}}_{{{\text{avg}}}} { < }\alpha } \hfill \\ {{\text{HL1(}}x,y{) }} \hfill & {{\text{otherwise}}} \hfill \\ \end{array} } \right. $$
(4)

Step-5 Perform inverse IWT operation twice to get the robust watermarked block.

Step-6 Repeat steps 2, 3, 4, and 5 for each block to embed each bit of \(W_{{{\text{encrypted}}}}\) in blocks sequentially.

Step-7 Finally combine the blocks to generate the robust watermarked image (\({\text{Watermarked}}_{r}\)).

3.2.2 Fragile Embedding

The following steps show the embedding of the watermark (\(W_{{{\text{fragile}} + {\text{recov}}}}\)) into the image (\({\text{Watermarked}}_{r}\)).

Step-1 Divide the image (\({\text{Watermarked}}_{r}\)) into 2 × 4 size of non-overlapping blocks. Then, sequentially select 12 bits of watermark data from \(W_{{{\text{fragile}} + {\text{recov}}}}\) for each block.

Step-2 Choose the first block and consider that each column is representing a pixel unit (with 2 pixels). Thus, each 2x4 size block has four units (e.g., U1, U2, U3, and U4).

Step-3 Convert 12-bit watermark into 9-base number \({\text{Wat}}\_9\) in such a way that it has four digits (e.g., \({\text{Wat}}\_9\) = d1d2d3d4).

Step-4 Modify pixels of U1 using d1 as per the given steps.

  • Compute digit \(F_{{{\text{embed}}}}\) as shown in Eq. (5). Here,\(P_{k}\) is the kth pixel of unit U.

    $$ F_{{{\text{embed}}}} = \left\{ {\sum\limits_{k = 1}^{n} {3^{k-1} P_{k} .} } \right\}\bmod 3^{n} \;\;{\text{where}}\; \, n = 2 $$
    (5)
  • Calculate x as given in Eq. (6).

    $$ x = \left( {d - F_{{{\text{embed}}}} + \left\lfloor {\frac{{3^{n} - 1}}{2}} \right\rfloor } \right)\bmod 3^{n} $$
    (6)
  • Change x into \({x}^{^{\prime}}\) by converting into 3-base number as \({x}^{^{\prime}}\)= y1y2…..yn, where yi denotes the ith digit of \({x}^{^{\prime}}\) for 1 ≤ i ≤ n. Next, get \({x}^{"}\)=z1z2…..zn, where zi = yi − 1.

  • Add digits of \({x}^{"}\) to the pixels of unit U to get the updated pixels as shown in Eq. (7).

    $$ P\_{\text{new}}_{k} = P_{k} + \, z_{i} \;{\text{where}}\;\left\{ {\begin{array}{*{20}c} {1 \le \, k \, \le \, n \, } \\ {i = n - k + 1} \\ \end{array} } \right. $$
    (7)
  • Repeat the steps with U2, U3, and U4 to embed d2, d3, and d4, respectively.

Step-5 Repeat step 2, 3, and 4 for each block to get the dual watermarked image \(W\_{\text{img}}\).

3.3 Watermark Extraction

The attacker can modify the watermarked image (\(W\_{\text{img}}\)) considering that the owner may have uploaded it on a public platform. In such a situation, robust watermark can be used to check the ownership and fragile watermark can be used for content verification and self-recovery.

3.3.1 Robust Watermark Extraction (Ownership Check)

During simulation, common signal processing attacks have been used to check the performance of the scheme. Following steps show the extraction process from the attacked image:

Step-1 Divide the attacked image into blocks (i.e., 16 × 16 size) that are uniform and non-overlapping.

Step-2 Get LL, LH, HL, and HH by applying IWT on the first block. Next, perform IWT on LH band to get LH1 and HL1.

Step-3 Calculate average values \({\text{LH}}1_{{{\text{avg}}}}\) and \({\text{HL}}1_{{{\text{avg}}}}\), and extract the bit as per Eq. (8).

$$ {\text{Ext}}_{{{\text{bit}}}} = \left\{ {\begin{array}{*{20}l} 0 \hfill & {{\text{if}}\;\;{\text{HL}}1_{{{\text{avg}}}} \le {\text{ LH}}1_{{{\text{avg}}}} } \hfill \\ 1 \hfill & {{\text{if}}\;\;{\text{HL}}1_{{{\text{avg}}}} > {\text{LH}}1_{{{\text{avg}}}} } \hfill \\ \end{array} } \right. $$
(8)

Step-4 Repeat step 2 and 3 on each block to extract all bits from the attacked watermarked image.

Step-5 Reshape the extracted bits and decrypt it via reversing the encryption process to get the extracted watermark \(W_{{{\text{extracted}}}}\).

3.3.2 Fragile Watermark Extraction (Tamper Check)

The following steps show the authentication process to check the tampering:

Step-1 Divide the attacked watermarked image into 2 × 4 size blocks and extract the four digits (\(F_{{{\text{ext}}}}\)) using Eq. (5) from each block.

Step-2 Convert the four digit 9-base number (i.e., \({F}_{\mathrm{ext}\_1}{F}_{\mathrm{ext}\_2}{F}_{\mathrm{ext}\_3}{F}_{\mathrm{ext}\_4}\)) into binary (i.e., 12 bit size). Similarly, extract 12-bit number from each block.

Step-3 Get \({\text{EW}}_{{{\text{ran}}\_2}}\) by concatenating initial 6-bits concerning each block. Likewise, get \({\text{EW}}_{{{\text{recov}}}}\) by cascading last 6 bits related to each block.

Step-4 Generate binary sequence \(W_{ran\_2}\) using \(K_{3}\)-based SFMT process and Eq. (1). Further, compare the corresponding bits of \({\text{EW}}_{{{\text{ran}}\_2}}\) and \(W_{{{\text{ran}}\_2}}\) to authenticate the image. If the bits are different, then the concerning block is marked as tampered.

Step-5 Apply the block-neighborhood approach to smoothen the resultant of Step 4. For smoothing, eight neighborhood blocks (except corner positions) of each block is considered. If majority of the blocks (out of these nine blocks) are tampered/non-tampered, the block is also marked as tampered/non-tampered.

3.4 Image Self-recovery

The authenticated image (after tamper localization) can be divided into tampered blocks and non-tampered blocks. Further, the tampered blocks can also be classified into two types. (1) Reserved feature blocks: The tampered blocks, whose mapping blocks are not tampered. (2) Ruined feature blocks: The tampered blocks, whose mapping blocks are also tampered.

At first, reserved feature blocks are recovered with the help the mapping. The recovery information from the mapped block is extracted (6 MSB) using \(K_{4}\) and padded with “00” to make it 8 bit. This 8 bit (after decimal conversion) is used to replace pixel values of reserved feature block. Then after, Ruined feature blocks are recovered through the adaptive neighborhood block averaging (ANBA) process. Figure 4 represents the ANBA process for the recovery for the tampered block ‘T’.

Fig. 4
figure 4

Adaptive neighborhood block averaging for the recovery of block ‘T

Here, average intensity “µ” is calculated for each valid (non-tampered or recovered) neighbor block. Next, the average (X) of all valid “µ” values is obtained as shown in Fig. 4. At last, X is substituted on all pixel positions of tampered block “T”. In the same way, repeat the process for every tampered block. Afterward, the ANBA process is applied one more time to improve recovery. Finally, the recovered image is obtained.

4 Experimental Results and Discussion

Testing has been performed over 150 images of size 512 × 512 (selected from reference [9]); including medical, texture, and other standard test images. Here result of selected images (Fig. 5) is shown for succinct representation. A binary image (i.e., 32 × 32 size) is used as the robust watermark. For robust watermarking, the value of embedding parameter α is selected as α = 11 based on the experimental evaluation in order to keep the significant trade-off between imperceptibility and robustness. The imperceptibility results are obtained by calculating PSNR (peak signal to noise ratio) [20] and SSIM (structural similarity index) [8] for different test images as shown in Table 1.

Fig. 5
figure 5

Host images a Lena b M-1 c pepper d Barbara e Mandrill f F-16g Living room h House i M-2 j M-3kM-4lM-5 m Bricks n Robust binary watermark image

Table 1 PSNR and SSIM results for test images (after embedding)

The average PSNR value is found to be 41.17 and the average SSIM as 0.9551. Results show that the proposed watermarking scheme is highly imperceptible to the viewers. As specified in the previous sections, the proposed scheme is a dual watermark approach and has multipurpose nature. It can be used for multiple applications such as copyright protection, ownership verification, tamper detection, tamper localization, and image self-recovery. Robust and fragile watermarking results are as follows:

4.1 Robust Watermarking Results

Different image processing attacks have been applied on the watermarked image before extracting the watermark. It gives a better insight into the robust feature of the scheme against attacks. The robustness results have been evaluated in terms of BER (bit error rate) [17]. As described in Table 2, the same watermark gets extracted (i.e., BER = 0) when the watermarked image is not attacked. In the case of different noise attacks like Gaussian noise (GN), speckle noise (SN), and Salt and Pepper noise (SPN), etc., the robust mechanism of the proposed scheme gives remarkable results. Similarly, the significant robustness is achieved against filtering attacks such as Median filter (MF), Gaussian filter (GF), and Wiener filter (WF). However, the scheme needs to improve against rotation attacks. The comparison (Table 3) of the proposed robust mechanism with other existing robust schemes has been performed; which testify the dominance of the proposed scheme over the existing schemes.

Table 2 Robustness (BER) results for host images
Table 3 Robustness (BER) results comparison with existing schemes

4.2 Fragile Watermarking Results

In order to authenticate the image against forgery, the scheme has been checked by applying different tampering attacks. Further, the tampered region is also recovered successfully during experimentation. It is important to note that, the tamper detection process would be block-wise rather than pixel-wise. Therefore, even if one pixel of a block (i.e., 2 × 4 pixels) is tampered, the complete block would be considered as the tampered block. In general, the tampering/forgery is done on a portion of an image and not on a specific pixel, hence the scheme is very effective for tamper detection. For quantitative analysis, the parametric values \({\mathrm{TD}}_{\mathrm{eff}}\), PSNR and SSIM have been obtained for different tampering rates (TR). Here, \({\mathrm{TD}}_{\mathrm{eff}}\) represents the efficiency of tamper detection and it is the ratio of the number of detected tampered blocks and the number of total tampered blocks. These parameters give an impression of an effective performance of the proposed scheme in terms of detection and self-recovery of the tampered part of the attacked image. The visual quality of the recovered image has been studied with respect to the watermarked (WM) image.

As presented in Table 4, the proposed scheme is able to detect and recover the tampered part of the watermarked image, even for quite high tampering rates. Different types of attacks (i.e., tampering) are applied on the watermarked images and average detection rate of 99.8% is obtained. Further, the significant results for self-recovery of the tampered images are obtained for different tampering rates. A tampered image can be recovered significantly for tampering rate up to 80%. Result of content tampering is presented in Table 5. Table 6 presents the investigational results for the recovery of tampered area of test images for different tampering rates in terms of PSNR and SSIM, which proves the effectiveness of the scheme. The results show that the proposed scheme is very useful to provide protection, authentication and recovery against different types of attacks.

Table 4 Image authentication and self-recovery (with respect to the watermarked image) results for different tampering rates
Table 5 Image authentication and self-recovery results (with respect to the watermarked image) for random tampering attacks
Table 6 Results (PSNR, SSIM) for self-recovery of the tampered images at different tampering rates

Table 7 describes the performance of different fragile schemes, which clearly proves the superiority of the proposed fragile watermarking mechanism. The performance of different techniques is compared in terms of PSNR of watermarked image (i.e., after embedding) and PSNR of recovered image. In addition, successful recovery condition has been compared with existing fragile watermarking methods. Most of the schemes such as [32,33,34,35], and [19]-B used an 8 × 8 block size for watermarking. Thus, if one pixel got tampered then the complete block (including 63 non-tampered pixels) is considered as a tampered region. Subsequently, preserved recovery information is used to restore the tampered region (which was almost original or non-tampered). Consequently, the performance decreases in terms of image restoration especially in case of severe tampering as can be seen in Table 7. Similarly, the schemes [1] and [19]-A used 4 × 4 size blocks for watermarking but their condition of restoration gets limited up to tampering rate of 50% and 45%, respectively. On the other side, the scheme [25] employed 2 × 2 size blocks during watermarking. The restoration capacity gets limited to a 50% tampering rate because the scheme [25] used only 5-MSB bits as the recovery data for each block. In conclusion, small block size limits the size of the recovery data and large block size limits the tamper localization capability.

Table 7 Performance comparisons (fragile nature) with existing schemes

Therefore, the proposed scheme opted for the block size of 2 × 4 for watermarking, which let us embed significant tamper detection data (6-bit) as well as the significant recovery data (i.e., 6 MSB bits) with decent localization ability. In addition, the ANBA approach provides remarkable improvement in recovery at high tampering rates. While maintaining the visual quality of the image, the scheme can recover the tampered area even for the 80% tampering rate. It should be noted that the proposed scheme is a multipurpose and dual watermarking scheme. Even then it provides better/significant performance as compared to the schemes dedicated to a specific purpose. Therefore, the scheme provides improved alternative for image security and monitoring. To investigate the restoration results, the average parametric values (i.e., PSNR etc.) have been calculated during the thorough experimentation. For restored images, the average range of PSNR values is [23.83, 48.78] (with respect to the watermarked image) and [19.54, 39.98] (with respect to the host image) for less than 80% tampering rate. Moreover, the average PSNR value for watermarked images turns out to be 41.17 that signify that the imperceptibility feature of the scheme is eminently admissible.

4.3 Security Analysis

The discussion about the security features of the proposed method and the advantage of dual watermark (robust and fragile) approach is presented in this section. During robust watermarking, the robust watermark has been encrypted before embedding process using Arnold transform and secret key-based random binary sequence. Therefore, even if someone illegally gets the extracted watermark, the actual/original form of the watermark information remains unintelligible. Thus, the watermark data would be utilizable only for the users with the correct secret key. Additionally, the embedding strategy is robust enough to counter general image processing attacks and provide copyright protection for images. Similarly, fragile watermarking mechanism is secured enough by using secret key-based fragile watermark data. The authentication information is completely based on secret key (seed value). During tampering detection and localization, the extracted authentication data is compared with the generated authentication data (key-based). It means that one cannot perform authentication without having secret key values. Therefore, the tamper detection and localization process is highly sensitive to the secret keys. Moreover, the recovery data of each 2 × 4 block is stored into another block using a specific key-based pseudo-random order. Only the knowledge of the correct key can provide the information of the block that has been used to preserve the recovery data of a block. Thus, both robust as well as fragile watermarking mechanisms are highly secured.

Many times, attackers use LSB modification tools to modify the LSB bits. In the proposed work, the fragile watermarking framework does not modify the LSB bits directly. Instead of this, the complete 2 × 4 size block is processed during fragile watermarking using a base-9 number system framework. Hence, attackers cannot extract the fragile watermark via LSB tools because LSB bits are not modified directly based on watermark bits. Therefore, if the attackers produce a counterfeit image using such tools then the generated image would not be able to pass the authentication process. Nonetheless, counterfeit attacks can also create issues of fake ownership claims, as discussed by authors [15]. To claim ownership, attackers can use completely different watermarking schemes or can frame up the embedding sub-bands. Even multiple users can claim over digital data by modifying or replacing the watermarking strategy. In such cases, the proposed dual watermarking approach can successfully deal with such types of attacks. The attacked image (e.g., counterfeit attacks) can be detected as a forged one during image authentication. Thus, it would be obvious that the extracted robust watermark is not correct because the image has been manipulated. When both the watermarks (robust as well as fragile) are extracted correctly and it is found that the image has not been altered, only then the user wins the ownership claim. Hereby it is clear that the proposed multipurpose and dual watermarking mechanism is highly secured while providing image authentication, self-recovery, and copyright protection.

4.4 Relative Study with Other Existing Multipurpose Watermarking Schemes

The proposed scheme contains dual watermarking (both robust as well as fragile) mechanism. This scheme can be used effectively for copyright protection, image authentication and image restoration; thus, the scheme is having multipurpose nature. The multipurpose nature makes the watermarking methods more useful and highly desired. It can be used for different applications at the same time. Some of the multipurpose watermarking schemes from the watermarking literature have been studied and compared with the proposed watermarking method to analyze the relative features. Table 8 compares the features of the proposed watermarking method with existing multipurpose watermarking schemes. From the analysis, it is observed that the proposed scheme is more versatile and efficient than the existing schemes.

Table 8 Comparison of proposed watermarking method with existing schemes (multipurpose nature)

5 Conclusion

The proposed work offered a blind multipurpose image watermarking scheme that can be used for efficient copyright protection, image authentication, and self-recovery of the image. The robust mechanism worked very well against various signal processing attacks and was able to extract robust watermark efficiently. The fragile procedure was able to detect and localize the tampered portion with more than 99.8% accuracy. Additionally, a satisfactory restoration of the image is achieved for tampering rate up to 80%. The scheme was made secure against unauthorized access via four secret keys. Experimental results showed remarkable results in terms of watermarking parameters like PSNR, SSIM, BER, tamper detection accuracy, and image recovery. The limitation of the proposed work includes the poor robustness performance against the rotational attacks, which will be investigated and solved in future research work. Future research directions also includes the possibility of improving the imperceptibility feature by incorporating better embedding framework without compromising the other characteristics. Furthermore, the scheme will be extended for color images in future.