1 Introduction

The advancement in technology has eased life with lots of amenities available at hand, accompanied with easy sharing and distribution of multimedia content across the internet. However, the rate of illegal distribution and malicious tampering increased exponentially through the easy and online availability of various softwares and tools. Hence, techniques securing the multimedia content like cryptography, digital signatures, steganography, watermarking etc are promoted and serve as active research areas. Each technique is designed for a specific purpose like cryptography is meant for delivering documents unreadable, steganography conceals the very existence of the message whereas watermarking assures the integrity of the multimedia content and proves the rightful ownership. Watermarking is basically a two phase technique. First phase involves watermark embedder that embeds a secret information into the cover image to obtain a watermarked image that is transmitted via internet. In the second phase, the watermark extractor extracts this secret information on the receiving end to proof the integrity of the content.

Based on the purpose, watermarking schemes can be mainly categorized as fragile, semi-fragile and robust watermarking schemes. Fragile watermarking aims for authenticity verification whereas robust watermarking is meant for proving the rightful ownership. Intermediate schemes between these two extremes are termed as semi-fragile watermarking schemes. Variation of these schemes called as dual watermarking schemes are gaining attention these days. Dual watermarks are combination of both, fragile as well as robust watermarks and could fetch benefits of both ownership assertion as well as integrity verification. Dual watermarking schemes can be broadly categorized into three main types: First type of schemes generate a dual watermark from the combination of fragile and robust watermarks and then embed it into the cover image as the typical watermarking scheme. If this watermark is tampered, then the whole purpose of its dual functionality is destroyed. Second kind of dual watermarking schemes follow a pipeline pattern while embedding of fragile and robust watermarks. The embedding and functionality of one watermark must not get affected by embedding of the other watermark. Third kind of dual watermarking schemes embed both fragile as well as robust watermarks into separate areas of the cover image. They are considered to be most versatile schemes as they become independent from any of the constraints of interference while embedding or functioning of the respective watermarks.

In literature, varied robust watermarking schemes have already been proposed [7, 12, 16, 17, 25, 31, 36] to maintain the integrity of the content. Copyright protection schemes for e-government document images based on discrete cosine transform (DCT) with zigzag space-filling curve (SFC) was proposed in [6], singular value decomposition (SVD) exploiting luminance masking in [1, 4] where the singular values of the DCT transformed coefficients of the watermark was embedded into the left singular value of the host image. The genetic algorithm was utilized to find the optimum value of the scaling factor depending on the content of the image. A reversible watermarking scheme for authentication of relational databases has been proposed in [2] where exact original document was recovered even though 95 % tuples of watermarked data were deleted. Another svd based copyright protection scheme presented in [5] increased the reliability of the scheme by embedding the principal contents of the watermark into DCT and DWT domains. The robustness factor was also enhanced via incorporation of particle swarm optimization for finding suitable scaling factors. However, many malicious attacks could not be detected by such schemes. Hence, came the need of fragile watermarking schemes that could sense even minute manipulations.

Tamper assessment function was proposed in literature [13] in this respect. Various transform domain and quantization based schemes have been proposed to enhance the security of the scheme and prevent tampering [39]. A fragile watermarking scheme for authentication of H.264/AVC content having high sensitivity to video attacks was proposed in [3]. Minimum deterioration of perceptual quality was guaranteed by incorporation of spatiotemporal analysis. However, they failed against incidental manipulations [18, 22]. Thus, intermediate kind of schemes that could tolerate incidental distortions along with sensitivity to malicious attacks came into picture [23, 26]. Though a lot of schemes have already been proposed, but still a lot of improvement is needed. A integrity check authentication scheme has been presented in [28]. It detected the tampers but localization accuracy was compromised. In [29], the accuracy of tampered regions increased but it could not perform recovery of the altered regions. Hence, schemes with dual functionalities are more preferable nowadays. A scheme with both authentication as well as recovery was proposed in [33], but the security and visual quality was compromised for its sake. Secret keys are often used to enhance the security of the schemes [34]. If security of these schemes is compromised, then the whole algorithm fails. Hence, correlating the watermark with pixel values of the cover image and thereby, embedding coefficients in other regions would serve as safety enhancement against such distortions [33]. A dual watermarking utilizing both spatial as well as frequency domain has been proposed in [9]. Firstly, 5/3 wavelet transform of the cover image was calculated and a robust watermark was embedded into the middle frequency coefficients. Thereafter, LSB substitution was done in spatial domain to embed the fragile watermark. However, this scheme suffered from the limitation that the embedding of fragile watermark affected the extraction of the robust watermark. One such dual watermarking scheme based on DCT coefficient, separating the integer and decimal portions to embed the robust and fragile watermarks has been proposed in [18]. This ensured that the two watermarks doesn’t affect each other. However, there was no means to recover the lost content. In this paper, a selfrecoverable dual watermarking scheme providing all the three functionalities of ownership assertion, tamper detection and recovery has been proposed. It minimized the storage requirements for embedding of recovery information to just four bits for each 2×2 sized image block and utilized the space for embedding of copyright information. The tamper detection and recovery are both performed at pixel level.

The rest of the paper is organized as follows: Section 2 describes the proposed approach in detail, experimental results with analysis are presented in Section 3. Conclusions along with the scope of future work has been concluded in Section 4 followed by references.

2 Proposed methodology

The proposed watermarking scheme consists of six main phases: generation and embedding of recovery information, embedding of copyright information, generation and embedding of authentication information, ownership verification via extraction of copyright information, tamper detection and recovery of tampered image.

Consider a gray scale cover image I having M rows and N columns where M and N are even . Then T represent the total number of pixels (T = M×N). Let the intensity value of each pixel of the cover image be denoted by P n ∈ [0,255] where n = 1,2,3,...., T.

The individual bit of P n is denoted by b(P n ,8), b(P n ,7), b(P n ,6)...b(P n ,1) and it can be represented in binary form as follows:

$$ b(P_{n},m)= \lfloor{\frac{P_{n}}{2^{m-1}}}\rfloor mod 2, m=1,2,3,.....8 $$
(1)

The decimal equivalent can be represented as:

$$ P_{n}= \sum\limits_{m=1}^{8}b(P_{n},m)2^{m-1} $$
(2)

A principal content image I c is formed from the cover image I by obtaining the major information content of the cover image via taking the five most significant bits (MSBs) of all pixels. All the phases of the proposed watermarking scheme will take this principal content image I c as input for further processing.

A basic flow of the proposed scheme is depicted in Fig. 1. The principal content image serves as input on the sender end where generation and embedding of recovery, embedding of copyright information and generation and embedding of authentication information is done which produces the watermarked image (I w ) as output. This output image is transmitted to the receiver end where the ownership verification is done via extraction of copyright information. Then, its authenticity is checked and in case of tampering, a recovery image is obtained as output. The algorithmic flowchart of the proposed scheme has been depicted in Fig. 2 along with symbols, abbreviations and functions listed in Tables 1 and 2 respectively. The detailed approach is presented as follows:

Fig. 1
figure 1

Basic flow of the Proposed Scheme

Fig. 2
figure 2

Flowchart of the Proposed Scheme

Table 1 Symbols and abbreviations used in the flowchart
Table 2 Functions used in the algorithms

2.1 Generation and embedding of recovery information

In this phase,the principal content image I c of size M×N is divided into non overlapping blocks B i of size 2×2 pixels each. A eight bit recovery information \((R_{B_{i}})\) is generated for each of the image blocks B i . The method for recovery generation is done in the spatial domain whereas embedding is done in the frequency domain to maintain its robustness in case of tampers.

The detailed methodology for the block recovery generation has been enlisted as follows:

1. Image Block Division: The principal content image I c of size M×N is divided into non overlapping blocks B i of size 2×2 pixels each where :

$$ B_{i} = \left[\begin{array}{cc} X_{p,q} & X_{p,q+1} \\ X_{p+1,q} & X_{p+1,q+1} \end{array}\right] $$
(3)

where, X p, q , X p, q+1, X p+1, q , X p+1, q+1 represent the neighboring block pixels at (p, q)th, (p, q+1)th, (p+1, q)th and (p+1, q+1)th co-ordinates of I c respectively.

Hence, total number of such blocks formed T b :

$$ T_{b}=\frac{M \times N}{2\times2} $$
(4)

2. Block Recovery Generation: The recovery information is obtained for each block depending upon the content of the block, directly from the pixel values using the recovery bit generation (R B G) and cluster based generation (C B G) methods as Algorithm 1 and Algorithm 2.

figure c

Example 2.1

Consider a block of cover image B i of size 2×2. The block elements are clustered into two clusters C 1 and C 2 using CBG Algorithm.

figure d
figure e

Example 2.2

Recovery vector bits \(R_{B_{i}}\) for image block B i is generated using RBG Algorithm.

figure f

After generation of eight bit recovery information for each image block through Algorithms 1 and 2, this generated information must be embedded into mapping blocks such that it could handle worst tampering scenarios. To achieve this goal of increasing chances of accurate localization and recovery, the extracted recovery information of a block is permuted using secret key prior to embedding in the corresponding mapping blocks. Random mapping of recovery information enhances the robustness against cryptanalysis as well as enhances the security of the scheme. Based on a secret key(K 1), a non convergent and non periodic logistic chaotic map, sensitive to the initial conditions is generated. The sequence is as follows:

$$ z_{n+1}=\xi z_{n+1}(1-z_{n}) $$
(5)

where 3.57 < ξ < 4 and 0 < z 0 < 0.5. The composition of secret key is as follows: K 1 = (ξ, z 0). The generated chaotic sequence after binarization is sub divided into small series, each composed of eight bit binary information. The sub series is as follows: y i =\({(y_{i_{1}}, y_{i_{2}},y_{i_{3}},y_{i_{4}}, y_{i_{5}},y_{i_{6}},y_{i_{7}},y_{i_{8}})}, i = 1, 2, ..., T_{b}\). The generated recovery information bits is encoded after operating in exclusive-or mode with the chaotic sub series to obtain the final sequence as follows: \({W={W_{1},W_{2},....W_{T_{b}}}}\).

$$ w_{i,j}=R_{B_{ij}} \bigoplus y_{ij} $$
(6)

where 1≤iT b ,1≤j ≤ 8.

3) Embedding position generation. The embedding of the encoded block recovery information is mapped randomly to another block using a sequence generated based on a secret key K 2. A random sequence of length \(T_{b}, r = (r_{1},r_{2},{\ldots } r_{T_{b}})\) is obtained using chaotic map in [20] as follows:

$$ r_{n+1}=(1+0.3 \times \left( r_{n-1}-1.08)+379 \times {r_{n}^{2}} + 1001 \times {q_{n}^{2}}\right) mod 3 $$
(7)

Here, q n signifies the initial values q 0, r 0, r 1 of the logistic chaotic map [20]. The secret key K 2=(r 0, r 1, q 0) where (r 0, r 1)𝜖(−1.5,1.5), q 0 𝜖(0,1). This random sequence \((r_{1},r_{2},....r_{T_{b}})\) is sorted to obtain an ordered index sequence \((I_{1},I_{2},...I_{N_{b}})\) used to select mapping block positions for embedding.

The recovery information is embedded in the frequency domain so as to increase its robustness against various tampers while transmission and also enhance its imperceptibility. First of all, the eight recovery bits are converted pairwise into their decimal equivalents to obtain a four valued resulting vector holding values within range of 0 to 3. The mapping has been depicted in Fig. 3 for mapping recovery bits to their decimal equivalents. Thereafter, discrete cosine transform is calculated for each of the image blocks and each DCT coefficient value of the block pixels is quantized to a new modified value depending upon the recovery bits using DCT based quantization method (D C T Q) as Algorithm 4. Thereafter, inverse DCT is computed for each of the modified blocks to obtain the recovery embedded blocks to finally compose the watermarked image (I r v ). The detailed methodology of the recovery bit embedding (R B E) is described in Algorithm 3.

figure g
Fig. 3
figure 3

Mapping of Recovery Bits

Example 2.3

Consider a block of cover image(B i ) of size 2×2. The recovery bits \(R_{B_{i}}=[ 1 1 1 1 0 1 1 1]\) is embedded using RBE and DCTQ Algorithm into the block B i to obtain recovery information embedded block \(B_{e_{i}}\).

For \({H_{i}^{j}}\)=57, and D j=3, flag=1

figure h
figure i

For \({H_{i}^{j}}\)=-8, and D j=3, flag=-1

figure j

For \({H_{i}^{j}}\)=-3, and D j=1, flag=-1

figure k

For \({H_{i}^{j}}\)=8, and D j=3, flag=1

figure l
figure m
figure n

2.2 Embedding of copyright information

After obtaining the recovery information embedded cover image (I r v ), next comes the task of embedding the copyright information. Copyright logos (C L ) are in the form of binary watermarks containing total pixels as \(\frac {M \times N}{4}\). The copyright logo is traversed in a sequential row by row manner to get an equivalent bit sequence W L of the logo pixel values. Thereafter, corresponding to each bit of the sequence, a 2×2 block is generated according to the copyright embedding algorithm (C P E) as Algorithm 5 to obtain the copyright encoded image I c p . The detailed algorithm is as follows:

Example 2.4

Consider a recovery information embedded block of cover image(B e m b ) of size 2×2. The extraction of recovery bits is done using the RIG Algorithm from it.

For \(F_{dct}^{i}\)=58.5,

For \(F_{dct}^{i}\)=-8.5,

For \(F_{dct}^{i}\)=-3,

For \(F_{dct}^{i}\)=8.5,

figure o
figure p
figure q
figure r

Hence, recovery bits vector is obtained as follows:

figure s

2.3 Generation and embedding of Authentication information

The authentication of the watermarked image is done at pixel level. An authentication bit is generated for each of the pixel depending upon its intensity value (P x y ) and position co-ordinates (row(x), column(y)) as shown in Fig. 4. The detailed algorithm for pixel level authentication (PLA) is enlisted in the Algorithm 6.

figure t
Fig. 4
figure 4

Authentication Bit for a Pixel

Example 2.5

Generation of authentication bit for Pixel P x y using PLA Algorithm.

After obtaining the recovery information embedded image (I r v ), copyright information encoded image (I c p ) and the authentication matrix (ψ), all the three are coupled to obtain the final watermarked image (I w ) using the recovery copyright authentication (R C A) algorithm as Algorithm 7. The detailed procedure will follow.

figure u
figure v
figure w
figure x

2.4 Ownership verification

The watermarked image (I w ) is transmitted to the receiver end. To proceed with the ownership assertion, the copyright information is extracted from the received watermarked image to obtain the copyright logo, called as extracted watermark logo (W e x t ) using copyright extraction (CEX) algorithm as Algorithm 8. The rightful owner possesses the original watermark logo. If the extracted logo matches with the original one, he is proved to be the legitimate owner of the cover image. If there is a dispute, then he is the unauthorized owner and there may be a possibility of tampering of the content. To actually detect the tampered areas, one has to proceed with the TMD (Tamper Detection) algorithm as Algorithm 9.

figure y

2.5 Tamper detection

The proposed scheme performs pixel level authentication for detecting the tampered regions of the suspected watermarked image. To chalk out the tampered regions, first of all the authentication bit is calculated for each pixel using the PLA algorithm. Also, the authentication information is extracted from the suspected watermarked image received. If there is a match between the extracted authentication bit and the calculated one, then it indicates the untampered pixel signified by black region. Otherwise, it belongs to the tampered region indicated by white regions in the tamper detected image (I D e t ) respectively.

figure z

2.6 Recovery of tampered image

After the detection of tampered areas(tampered blocks) by using the pixel level authentication (PLA) algorithm, the recovery is to be done by mapping them to their corresponding recovery information embedded blocks. Thereafter, two bits recovery information is extracted from each of the DCT block coefficients to finally build up the eight bits recovery information of the block. From the retrieved recovery information, the block elements are build up to form the recovered block. The detailed algorithm of Recovery image generation (RIG) has been detailed in Algorithm 10.

figure aa

3 Experimental results and analysis

The proposed scheme has been simulated on a wide set of standard grayscale images using MATLAB 2013Ra. Variations of grayscale images has been tested upon, majorly categorized into three main kinds i.e. natural images, satellite images and texture images. Some of these grayscale images sized 512×512 has been shown in Fig. 5. To quantitatively evaluate the imperceptibility of the watermarked images, peak signal to noise ratio (PSNR) metric have been adopted with values enlisted in Table 3 and visual quality representation depicted in Fig. 6 respectively.

Fig. 5
figure 5

Cover Test Images

Fig. 6
figure 6

Watermarked Test Images

Table 3 PSNR Values for Different Types of Watermarked Images

The Peak-Signal-to-Noise-Ratio (PSNR) metric is defined as follows:

$$ PSNR=10\log_{10}{\frac{255^{2}}{MSE}}(dB) $$
(8)
$$ MSE=\frac{1}{M1 \times M2}\sum\limits_{1}^{M1}\sum\limits_{1}^{M2}||C^{\prime}_{i,j}-C_{i,j}|| $$
(9)

where, C i, j and \(C^{\prime }_{i,j}\) represents pixel value of original cover image and the watermarked image of size MM2.

PSNR values for the three categories of grayscale images has been tabulated in Table 3. Indistinguishability and imperceptibility attained for the above three categories of watermarked images is satisfyingly enough as indicated by the PSNR values. The dual functionalities of the proposed scheme have been evaluated using various available metrics and discussed in separate sections as follows:

3.1 Tamper detection and recovery

To evaluate the tamper detection and recovery efficiency of the proposed scheme, following metrics have been adopted:

1. Tampering Ratio(TR)

$$ r_{t}= \frac{100N_{T}}{ N} \% $$
(10)

where, N and N T denotes the total number of blocks and the number of tampered blocks in the test cover image.

2. Probability of False Rejection(PFR)

$$ P_{fr}= \frac{100 N_{ud}}{(N- N_{T} )}\% $$
(11)

where, N u d , N and N T denotes the number of valid blocks that are wrongly detected, the total number of blocks and the number of tampered blocks in the test cover image.

3. Probability of False Acceptance(PFA)

$$ P_{fa}= \frac{100(N_{T}- N_{td}) }{ N_{T}}\% $$
(12)

where, N t d , N and N T denotes the number of tampered blocks that are correctly detected,the total number of blocks and the number of tampered blocks in the test cover image.

To validate the efficiency of tamper detection and accurate localization of the proposed scheme for aforementioned three major categories of images: natural, texture and satellite, different attacks have been tested with few depicted in Fig. 7 for natural images, in Fig. 8 for texture images and in Fig. 9 for satellite images respectively. The detection of the altered regions have been done using Algorithm 9 and reflected by white regions in the tamper detected image(I D e t ) whereas untampered ones signified by black regions. The level of accuracy is quite good. In the Figs. 78 and 9, column representation is as follows: (a) the original image (b)the tampered image (c)the tamper detected image and (d)the recovered image. Different kind of attacks have been applied on the watermarked images like addition of text to the image, cropping some portion of the image, exchanging different image portions, removing some detailed sensitive information of the image etc. The tamper detection results along with recovery on pixel basis are tabulated in Tables 45 and 6 for natural images, texture images and remote sensing images respectively.

Fig. 7
figure 7

Examples of Natural Images (a) Watermarked Images (b) Tampered Images (c) Tamper Detected Images (d) Recovered images

Fig. 8
figure 8

Examples of Texture Images (a) Watermarked Images (b) Tamper Images (c) Tampered Detected Images (d) Recovered images

Fig. 9
figure 9

Examples of Satellite Images (a) Watermarked Images (b) Tamper Images (c) Tampered Detected Images (d) Recovered images

Table 4 Results of Tamper Detection and Recovery for Natural Images
Table 5 Results of Tamper Detection and Recovery for Texture Images
Table 6 Results of Tamper Detection and Recovery for Remote Sensing Images

To further demonstrate the efficacy of the proposed scheme for recovery, the cover image is tampered with varying tampering ratios (T R) as shown in Fig. 10 for one of the test cover lena images. The scheme is able to recover the lost content even when major portions of the image are lost although the visual quality deteriorates with increasing tampering ratio.

Fig. 10
figure 10

Recovery for different Tampering Ratios(TR) (a)10 % (b) 20 % (c)30 % (d)40 % (d)50 %

To illustrate the efficacy of the proposed scheme over other state of the art algorithms, following tests were performed as depicted in Fig. 11. The details of the tests are as follows:

T e s t1::

A rectangular portion (300×420) of the watermarked baboon image is tampered [11(d)].

T e s t2::

Watermarked Flinstones image is tampered by drawing 20 rectangles, filled with a random integer ∈[200, 223][11(e)].

T e s t3::

The watermarked Lena image is tampered by pasting portion of the watermarked Flinstones image on it(collage attack) besides placing few small flowers and two large ones on it [11(f)].

Fig. 11
figure 11

(a)–(c)Watermarked Image,(d)–(f)Tampered Image

The tamper detection efficacy of the proposed scheme is found to be quite good as pixel level authentication is done to chalk out the tampered pixels. Authentication bit for each pixel is generated based on pixel intensity value, its location co-ordinates and boundary intersecting neighbors as shown in Fig. 4. The recovery of the altered regions is done via extracting the recovery information bits from the corresponding mapped block and rebuilding the lost content from it. The comparative results for accuracy of localization and recovery are presented in Figs. 12 and 13. Schemes [21] and [11] were able to localize the collage attack in test 3 approximately. However, [43] was not even able to detect the collaged blocks.

Fig. 12
figure 12

Tamper Detection Results:(a)–(c)Proposed method, (d)–(f)[11], (g)–(i) [43],(j)–(l)[21]

Fig. 13
figure 13

Recovery Results:(a)–(c)Proposed method, (d)–(f)[11], (g)–(i) [43],(j)–(l)[21]

The probability of false acceptance (PFA), probability of false rejection (PFR) and PSNR metric values are evaluated for variable degree of alterations on the cover test images. Comparative results are tabulated in Tables 78 and 9 and presented graphically in Figs. 1415 and 16. The PFR and PFA values of the proposed scheme are quite close to the ideal value zero in most of the analytical analysis. The imperceptibility of the recovered image decreases with the increasing tampering ratios.

Table 7 Comparative Performance based on PFA
Table 8 Comparative Performance based on PFR
Table 9 Comparative Performance based on PSNR
Fig. 14
figure 14

Variation of Probability of False Acceptance(PFA) with Tampering Ratio(TR)

Fig. 15
figure 15

Variation of Probability of False Rejection(PFR) with Tampering Ratio(TR)

Fig. 16
figure 16

Variation of PSNR of Recovered Image with Tampering Ratio(TR)

3.2 Robustness test results

The proposed scheme provides the feature of copyright protection too. Different binary logos have been used as test watermarks. Some are shown in Fig. 17. The robustness of the scheme is tested against comprehensive set of image processing attacks. Some are enlisted in Tables 10 and 11. The similarity of the extracted watermark with respect to the original one has been evaluated using the normalized cross correlation (NCC) metric value. The comparative results with other existing state of art approaches are tabulated in Tables 12 and 13. The evaluation of the extracted watermark has been further extended by using the various available error metrics. It is based on mutual relation between pixels, their values and their locations respectively.

Fig. 17
figure 17

Copyright Logos

Table 10 Robustness test results
Table 11 Robustness test results
Table 12 Comparative Performance based on NCC
Table 13 Comparison with other methods

Let us assume that W e m b is the embedded watermark and W e x t is the extracted binary watermark. The total number of true positive, false positive, true negative and false negative pixels with respect to W e m b and W e x t are indicated by N T P , N F P , N T N and N F N respectively [19, 42]. Some of the objective error metrics are defined as follows:

3.2.1 Precision

$$ Precision = \frac{N_{TP}}{N_{TP}+N_{FP}} $$
(13)

For identical images value of Precision will be 1.

3.2.2 Recall/Sensitivity

$$ Recall = \frac{N_{TP}}{N_{TP}+N_{FN}} $$
(14)

For identical images the value of recall will be 1.

3.2.3 F-Measure

$$ FM = \frac{2 \times Recall \times Precision}{Recall + Precision} $$
(15)

For identical images the value of F-Measure will be 1.

3.2.4 Structural Similarity Index (SSIM)

SSIM is a Human Visual System (HVS) based evaluation metric used to measure image quality.

$$ SSIM(x,y) = \frac{(2\mu_{x}\mu_{y}+c_{1})(2\sigma_{xy} + c_{2})}{({\mu^{2}_{x}} + {\mu^{2}_{y}} + c_{1})({\sigma^{2}_{x}} + {\sigma^{2}_{y}} + c_{1})} $$
(16)

Where μ x , μ y , \({\sigma ^{2}_{x}}\), \({\sigma ^{2}_{y}}\) and σ x y are the average, variance and covariance for x and y respectively. The SSIM index value ranges from -1 and 1, with value 1 is case of two identical data sets.

3.2.5 Specificity

$$ Specificity = \frac{N_{TN}}{N_{TN}+N_{FP}} $$
(17)

For identical images value of Specificity will be 1.

3.2.6 Balanced Classification Rate (BCR)/Area Under the Curve (AUC)

$$ BCR = 0.5 \times (Specificity + Sensitivity) $$
(18)

For identical images the value of BCR/AUC will be 1.

3.2.7 Balanced Error Rate (BER)

$$ BER = 100 \times (1- BCR) $$
(19)

For identical images the value of BER will be 0.

3.2.8 Negative Rate Matrix (NRM)

The NRM is based on the pixel wise mismatch between the I and G.

$$ NRM= \frac{NR_{fn}+NR_{fp}}{2} $$
(20)

where

$$ NR_{fn}= \frac{N_{FN}}{N_{FN} +N_{TP}} $$
(21)
$$ NR_{fp}= \frac{N_{FP}}{N_{FP} +N_{TN}} $$
(22)

For identical images value of NRM will be 0.

3.2.9 Distance-Reciprocal Distortion Measure (DRDM)

Let W m is the weight matrix and i c and j c are the center pixel.

$$ W_{m}(i,j)= \left\{\begin{array}{ll} 0,& \text{if } i_{c} =j_{c}\\ \frac{1}{\sqrt{(i-i_{c})^{2}+(j-j_{c})^{2}}}, & \text{otherwise} \end{array}\right. $$
(23)

This matrix is Normalized by.

$$ W_{Nm}(i,j)= \frac{W_{m}(i,j)}{\sum\nolimits_{i=1}^{m}\sum\nolimits_{j=1}^{m}W_{m}(i,j) } $$
(24)

Now

$$ DRD_{k}= \sum\nolimits_{i,j}^{}[D_{k}(i,j) \times W_{Nm}(i,j)] $$
(25)

Where D k is given by (B k (i, j)−g[(x, y) k ]). Thus D R D k equals to he weighted sum of the pixels in the block B k of the original image.

$$ DRD=\frac{ \sum\nolimits_{k=1}^{s}DRD_{k}}{NUBN} $$
(26)

Where NUBN is the nonuniform blocks in F(x, y).

For identical Image DRDM will be 0.

3.2.10 Misclassification Penalty Metric (MPM)

$$ MP = \frac{1}{2}(MP_{fn} + MP_{fp}) $$
(27)

where

$$ MP_{fn} = \frac{{\sum}_{j=1}^{N_{fn}} d_{fn}^{j}}{D} $$
(28)

Represents the sum of distances of all false negatives.

$$ MP_{fp} = \frac{{\sum}_{j=1}^{N_{fp}} d_{fp}^{j}}{D} $$
(29)

Represents the sum of distances of all false positives.

For identical images the value of MPM will be 100.

The objective parameters for the extracted watermark tested against the comprehensive set of attacks has been tabulated in Table 14 and their respective 3D graphs has been depicted in Figs. 18192021222324252627282930 and 31 respectively.

Table 14 Various Objective Measures for Extracted Binary Watermark against Various Attacks
Fig. 18
figure 18

Objective Parameters for Extracted Watermark Against Salt & Pepper Noise Attack

Fig. 19
figure 19

Objective Parameters for Extracted Watermark Against Histogram Equalization Attack

Fig. 20
figure 20

Objective Parameters for Extracted Watermark Against Rotation Attack

Fig. 21
figure 21

Objective Parameters for Extracted Watermark Against Speckle Noise Attack

Fig. 22
figure 22

Objective Parameters for Extracted Watermark Against Motion Blur Attack

Fig. 23
figure 23

Objective Parameters for Extracted Watermark Against Weiner Filter Attack

Fig. 24
figure 24

Objective Parameters for Extracted Watermark Against Average Attack

Fig. 25
figure 25

Objective Parameters for Extracted Watermark Against Unsharp Masking Attack

Fig. 26
figure 26

Objective Parameters for Extracted Watermark Against Median Fiter Attack

Fig. 27
figure 27

Objective Parameters for Extracted Watermark Against JPEG Compression Attack

Fig. 28
figure 28

Objective Parameters for Extracted Watermark Against Cropping Attack

Fig. 29
figure 29

Objective Parameters for Extracted Watermark Against Laplacian Filter Attack

Fig. 30
figure 30

Objective Parameters for Extracted Watermark Against Gaussian Noise Attack

Fig. 31
figure 31

Objective Parameters for Extracted Watermark Against Resizing Attack

4 Conclusion and future scope

A dual watermarking scheme incorporating both features of ownership assertion as well as integrity check has been proposed here. Recovery information of each 2×2 sized non-overlapping block was reduced to just eight bits which were further encoded to obtain only four bits and embedded in the mapping block of the cover image. The reduction in storage requirements for recovery bits was utilized for efficiently embedding the copyright information, thus adding the feature of robustness in the scheme. The scheme performed well against comprehensive set of attacks like noises, filtering, histogram equalization, rotation, jpeg compression etc. The pixel level tamper detection of the scheme could chalk out the altered areas accurately for all the three major categories of natural, texture as well as satellite images. The random chaotic mapping of blocks enhanced the efficacy of the scheme against tampers even upto 50 %. Evaluation of extracted watermark logo via variety of suitable error metrics further added to its advantages, with satisfiable PSNR values for both watermarked as well as recovered images.