An Optimized Digital Watermarking Scheme Based on Invariant DC Coefficients in Spatial Domain

Digital watermarking has become an essential and important tool for copyright protection, authentication, and security of multimedia contents. It is the process of embedding a watermark in the multimedia content and its extraction. Block-based discrete cosine transform (DCT) is a widely used method in digital watermarking. This paper proposes a novel blind image watermarking scheme developed in the spatial domain by quantization of invariant direct current (DC) coefficients. The cover image is redistributed and divided into non-overlapped square blocks and then the DC coefficients invariant to rotation, row and column flip operations, without utilization of the DCT transform, are directly calculated in the spatial domain. Utilizing the quantization parameter and watermark information, the modified DC coefficients and the difference between DC and modified DC coefficients are calculated to directly modify the pixel values to embed watermark bits in the spatial domain instead of the DCT domain. Optimal values of the quantization parameter, which plays a significant role in controlling the tradeoff between robustness and invisibility, are calculated through differential evolution (DE), the optimization algorithm. Experimental results, compared with the latest similar schemes, demonstrate the advantages of the proposed scheme.


Introduction
Advancements in multimedia technologies and computer networks have made duplication and distribution of digital contents such as audio, video or digital images, much easier than ever before in recent years. Protection of such digital content has become a challenging task from a security and copyright point of view. To address these issues, the digital watermarking scheme was introduced [1,2]. The main concern of the digital image watermarking scheme is to maintain the quality of the host image showing good robustness against distortion attacks. Watermarking schemes can be categorized according to various factors, such as the domain in which the watermark is inserted, the spatial or frequency domain, visible or invisible watermarking, robust or fragile watermarking. A very brief discussion on these schemes is provided in the paragraphs below. However, for more details on watermarking schemes, the interested researchers may refer to [3,4]. the same pixel values under these operations, then obviously the DC values will be invariant. The host image is divided into blocks, DC values are calculated in the spatial domain without using DCT and then modified using the optimal quantization parameter obtained through the differential evolution (DE) algorithm to get the new DC values. The difference is calculated between the old and new DC values, and then the pixel values in the block are changed in such a way that the total amount of change is equal to the difference in the DC values. The performance of the proposed watermarking scheme is investigated by taking seven standard test images and two watermarks, and then employing various common image manipulation attacks. Results are compared with the other similar watermarking schemes available in the literature utilizing some well-known evaluation metrics, peak signal to noise ratio (PSNR), structural similarity index measure (SSIM), and normalized correlation (NC). Results analysis validates that the proposed watermarking scheme is robust against image distortion while maintaining the good quality of the watermarked image.
The structure of the paper is: invariant DC coefficient computation and the modification are explained in the Section 2. Section 3 describes the proposed watermarking scheme, and results analysis and comparisons are provided in Section 4. Concluding remarks and future research directions are given in the last section.

Invariant DC Coefficients Computation and Modification
This section provides the detailed process of DC coefficients computation invariant to ninety-degree rotation and image flipping in the spatial domain, and their modifications to insert the watermark.

Invariant DC Coefficient Computation in Spatial Domain
Discrete cosine transform (DCT) is one of the versatile mathematical transform techniques having numerous applications in image processing and digital watermarking [18][19][20][21]. It is used for the transformation of a signal from the spatial domain to the frequency domain and in the reconstruction of original data from the frequency data. In the transformed signal there is only one direct current (DC) component, the average of the given data, and multiple alternating current (AC) components. Generally, DCT-based watermarking schemes are implemented using spatially local transforms (block-based DCT). In block-based DCT watermarking, the input square image I (x, y) of size M × M (x = 0, 1, 2, ..., M − 1; y = 0, 1, 2, ..., M − 1) is divided into non-overlapping square blocks of size m × m. A commonly used block size for DCT watermarking, the same size adopted in the JPEG compression standard, is a square block of size 8 × 8 as shown in Figure 1. Each image block Ii,j (x, y) (i = 0, 1, 2, ..., M/m−1; j = 0, 1, 2, ..., M/m−1) is transformed into corresponding DCT coefficients DIi,j (u, v) and can be reconstructed into the original block Ii,j (x, y) from DCT coefficient block DIi,j (u, v) using two dimensional DCT and its inverse transform, respectively, as follows: Each image block I i,j (x, y) (i = 0, 1, 2, ..., M/m−1; j = 0, 1, 2, ..., M/m−1) is transformed into corresponding DCT coefficients DI i,j (u, v) and can be reconstructed into the original block I i,j (x, y) from DCT coefficient block DI i,j (u, v) using two dimensional DCT and its inverse transform, respectively, as follows: where The DC coefficient of each block DC (i, j), which is the average pixel intensity in the block as mentioned above, is given by putting u = v = 0 in Equation (1) as: It can be clearly understood from Equation (4), that the DC (i, j) coefficient of block I i,j can directly be calculated by a simple averaged sum of all pixel values I i,j (x, y) of the block in the spatial domain without utilizing DCT transform.
Although most of the existing block-based DCT watermarking techniques can resist common image manipulation attacks, there still is a scope of improvement for geometric distortion attacks such as multiples of 90 • rotation and image flipping for which existing algorithms are not robust. These attacks change the spatial locations of the pixels in a watermarked image to destroy the inserted watermark, without changing their intensities. The pixel's location may vary in a block under these attacks, but the intensity remains the same as the initial one. DC coefficient representing the mean intensity of the block does not consider the location. Therefore, getting invariant DC values under the rotation and flipping operations may be achieved by using the concept introduced by Li et al. [17] and implemented by several other authors in the wavelet domain. According to this concept, pixels in the cover image are redistributed to different locations and then some normalization procedures are performed. The original image (I) of size M × M is partitioned into four (2 × 2) equal-sized sub-images and then the mean of intensities is calculated for each sub-image and stored in a matrix form as: With the help of these means, a normalization matrix (N) is constructed as: Pixels in the given square image (I) are redistributed to the different locations to obtain the redistributed image (RI) using the distribution relation given in (6).
Electronics 2020, 9, 1428 5 of 18 If |N 3 | > |N 2 |, where the term |*| represents the absolute value function, take the transpose of the redistributed image RI, otherwise leave it unchanged to obtain the redistributed normalized image. If this redistributed image is divided into square blocks of size 2 n (n = 1, 2, 3, . . . |2 n < M/ 2) and DC values are calculated for each block using Equation (1) Pixels in the given square image (I) are redistributed to the different locations to obtain the redistributed image (RI) using the distribution relation given in (6).

DC Coefficients Modification in Spatial Domain
Watermark bits are embedded into the host image blocks by modifying the invariant DC coefficients in the spatial domain obtained in Section 2.1. This insertion procedure of the watermark into the DC component of the DCT domain can directly be achieved by modifying the values of the pixels in the spatial domain. The total amount of modification in intensities of all the pixels in the spatial domain of a block must be equal to the change in the DC coefficient in the DCT domain of that block. The inverse DCT of an image block given in Equation (2) can be written as: Initially, the embedding of the watermark in DC coefficients in the DCT domain is examined and then the concept is mapped to the equivalent method in the spatial domain. It is assumed that when embedding a bit of watermark W into the DC coefficient of the (i, j) th block, the new DC coefficient will get changed by an amount of C i,j from the old DC coefficient. The traditional embedding process of the watermark bit into the DC coefficient of the (i, j) th square block is given as: where DC' (i, j) is the new DC coefficient of (i, j)th block with the change by an amount of C i,j in the value. Now, using this new DC value, the block of the host image can be reconstructed with the embedded watermark given in Equation (8) with the help of Equation (9) as: From Equation (13), it is clear that insertion of the watermark bit into the DC coefficient in the spatial domain is possible by directly changing the values of all the pixels in the block by an amount of C i,j /m.

Proposed Watermarking Scheme
This section is dedicated to explaining the components of the proposed scheme. The scheme has different components such as watermark preprocessing, watermark insertion, watermark extraction, and optimal quantization factor. This study considers the host image "I" of a size of 512 × 512 and the watermark "W", a binary image of a size of 64 × 64. The details of each component are listed as below.

Watermark Insertion Process
To provide an extra layer of security to the watermarking scheme, first the watermark is encrypted using the piecewise linear chaotic map (PWLCM) [36] before embedding it into the cover image. It is one of the chaotic maps that recently has gained popularity due to its simplicity in representation and efficiency in implementation, and dynamical behavior. An imposter or unauthorized user cannot directly get the watermark from the watermarked image without having the correct security key. A watermark and its encrypted version using PWLCM are shown in Figure 3. The watermark insertion process is explained here stepwise: step 1. Redistribute the host image "I" to get the invariant features as explained in Section 2.1, and divide this image into 8 × 8 non-overlapping blocks I i,j (i = 0, 1, 2, . . . , 63; j = 0, 1, 2, . . . , 63), as shown in Figure 1. As a check point, the numbers of non-overlapping blocks should be equal to the numbers of the watermark bits because one bit of watermark is inserted per block. Scramble the watermark image W with a secret key to generate the scrambled watermark image. step 2. With the help of Equation (4), directly compute the invariant DC coefficient DC (i, j) in the spatial domain without applying the DCT transform. step 3. Based on the watermark bit information W (i, j), modifying magnitudes M1 and M2 are decided to modify the DC coefficient DC (i, j), as given in the Equations (14) and (15).
Electronics 2020, 9, 1428 where "Q" is the quantization factor, that will be discussed in detail later in this section. step 4. Now, using these magnitudes M1 and M2, the possible quantization results Q1 and Q2 are computed as follows: where k is an integer such that k = floor (ceil (DC (i, j)/Q)/2), floor (*), and ceil (*) provides the least and largest nearest integers, respectively.
is calculated based on Q1 and Q2 as follows: step 6. Calculate the amount of change C i, j in the value of the new DC coefficient using Equation (18): step 7. To insert the watermark bit W (i, j) directly to the host image block I i,j in the spatial domain add C i,j /8 to all pixels in the block according to Equation (13). step 8. Repeat steps 2-7 until all the pixels in all the blocks are modified to obtain the redistributed watermarked image. Then, apply the inverse redistribution operation to put back the pixels at their actual positions to obtain the watermarked image Iw.
Scramble the watermark image W with a secret key to generate the scrambled watermark image. step 2. With the help of Equation (4), directly compute the invariant DC coefficient DC (i, j) in the spatial domain without applying the DCT transform. step 3. Based on the watermark bit information W (i, j), modifying magnitudes M1 and M2 are decided to modify the DC coefficient DC (i, j), as given in the Equations (14) and (15).
1.5 ( , ) 1 2 where "Q" is the quantization factor, that will be discussed in detail later in this section. step 4. Now, using these magnitudes M1 and M2, the possible quantization results Q1 and Q2 are computed as follows: where k is an integer such that k = floor (ceil (DC (i, j)/Q)/2), floor (*), and ceil (*) provides the least and largest nearest integers, respectively.
is calculated based on Q1 and Q2 as follows: step 6. Calculate the amount of change Ci, j in the value of the new DC coefficient using Equation (18):

Watermark Extraction Process
The detailed steps of extraction of the watermark (eW) from the watermarked image Iw are described as follows. Electronics 2020, 9, 1428 8 of 18 step 3. Using the quantization parameter "Q" and DC' (i, j), extract the watermark bit eW (i, j) such as given in Equation (19).
step 4. Repeat steps 2 and 3 until all the blocks are visited to extract the encrypted watermark image. Then, apply the decryption operation with the correct keys to get extracted watermark eW.

Finding the Optimal Quantization Parameter Using Differential Evolution
Several researchers have utilized the advantages of optimization schemes in finding the optimal parameters of image watermarking. Watermark robustness and its imperceptibility are two mutually contradictory and interrelated properties. The proposed watermarking scheme uses the binary square watermark for embedding in the invariant DC values directly modifying the pixel values in the spatial domain using a quantization parameter "Q". It plays an important role in balancing the robustness and imperceptibility of the proposed watermarking algorithm. A small quantization parameter favors imperceptibility but reduces the robustness of the watermarked image towards several image manipulation attacks. On the other hand, a large quantization parameter favors robustness, but sacrifices the quality of the watermarked image. In the past, several watermarking algorithms have been tuned by adjusting this parameter manually [18][19][20][21]. A constant value of this parameter is not suitable for different kinds of images. The proper choice of this parameter is more difficult than expected, because it varies according to the image to achieve the robustness and imperceptibility goals. Therefore, an optimization technique is required to find its optimal value automatically depending upon the image and watermark. So, this study takes the help of the differential evolution (DE) optimization algorithm [29,30] to determine the optimal value of quantization parameter Q. DE is a simple, fast, and robust nature-inspired algorithm. The procedure starts by generating an initial population, which has a specific number of individuals or solutions (say 10), with the help of a random number generator. It has three main operations named mutation, crossover, and selection. In this study, the scaling factor used in the mutation operation and crossover rate is 0.5 for both. The maximum number of generations (iteration) is ten.
The watermark is inserted into the host image using this quantization parameter obtained by DE to get the watermarked image. Image distortion attacks are applied to the watermarked image to degrade the quality, and then extract the watermark from these distorted watermarked images. Objective function for each solution is calculated and then the solution corresponding to the higher fitness value is selected for the next generation. The objective function must include both of the important factors of image watermarking, imperceptibility and robustness. Out of the several quality metrics proposed in the literature, peak signal to noise ratio (PSNR) is a widely used metric for the quality assessment. The similarity of the inserted watermark image (W) with the extracted watermark image (eW) is evaluated by the normalized correlation coefficient (NC). The mathematical representation of the objective function involving these two main goals is given here [33]: where N is the number of attacks; NC i is the normalized correlation corresponding to the ith attack; PSNR target is a desired PSNR value. This study aimed to achieve the PSNR value forty-five. The two evaluation metrics used in the objective function are formally defined as: PSNR(I, Iw) = 10 log 10 Electronics 2020, 9, 1428 9 of 18 where I and Iw stand for the original and the processed images; subscripts i and j denote the location of the pixel value in the respective images; M and n are the sizes of square host and watermark images, respectively.

Performance Evaluation and Experimental Discussion
This section is fully dedicated to the performance analysis of the proposed watermarking scheme and its comparison with the other similar type of the watermarking algorithms proposed by Parah et al. [19] and Zeng et al. [21]. Both of these schemes have used DC coefficients and constant quantization factor for watermark embedding, but different quantization methods. The proposed scheme uses invariant DC coefficients and the image dependent optimal quantization parameter obtained by the DE algorithm. Seven grayscale standard test images of size 512 × 512, and two binary logos (W1 and W2) of size 64 × 64, given in Figure 4, are considered for the performance evaluation of the proposed scheme. These test images are collected from various open image databases that are freely available. For the investigation of the robustness of the proposed scheme, various common image distortion attacks, given in the Table 1, are applied to make a dent in the quality of the watermarked image (Iw). The algorithm is coded in MATLAB and executed on a personal computer (PC) with Intel core i5 processor, Windows 8 and 4 GB RAM. Experimental results are given in Tables 1-7. In Table 6, the best results are highlighted in bold and the tie cases are highlighted in italics.
where N is the number of attacks; NCi is the normalized correlation corresponding to the ith attack; PSNRtarget is a desired PSNR value. This study aimed to achieve the PSNR value forty-five. The two evaluation metrics used in the objective function are formally defined as: where I and Iw stand for the original and the processed images; subscripts i and j denote the location of the pixel value in the respective images; M and n are the sizes of square host and watermark images, respectively.

Performance Evaluation and Experimental Discussion
This section is fully dedicated to the performance analysis of the proposed watermarking scheme and its comparison with the other similar type of the watermarking algorithms proposed by Parah et al. [19] and Zeng et al. [21]. Both of these schemes have used DC coefficients and constant quantization factor for watermark embedding, but different quantization methods. The proposed scheme uses invariant DC coefficients and the image dependent optimal quantization parameter obtained by the DE algorithm. Seven grayscale standard test images of size 512 × 512, and two binary logos (W1 and W2) of size 64 × 64, given in Figure 4, are considered for the performance evaluation of the proposed scheme. These test images are collected from various open image databases that are freely available. For the investigation of the robustness of the proposed scheme, various common image distortion attacks, given in the Table 1, are applied to make a dent in the quality of the watermarked image (Iw). The algorithm is coded in MATLAB and executed on a personal computer (PC) with Intel core i5 processor, Windows 8 and 4 GB RAM. Experimental results are given in Tables 1-7. In Table 6, the best results are highlighted in bold and the tie cases are highlighted in italics.

Imperceptibility Analysis
The watermark inserted into the host or cover image must be imperceptible in case of invisible watermarking. This property is related to the human visual system. Generally, a watermarking scheme is said to be imperceptible if both the images, original and the watermarked, are mutually identical. A good watermarking scheme does not degrade the quality of the host image in the watermark insertion process. To analyze the imperceptibility of the watermarked images, several evaluation metrics are available in the literature [29][30][31][32][33][34][35][36][37][38][39]. Peak signal to noise ratio (PSNR) and structural similarity index measure (SSIM) [18] are the two most frequently used imperceptibility evaluation metrics. Following the same trend, this study uses these two metrics to analyze the imperceptibility. In Tables 2 and 3, PSNR and SSIM values are listed, obtained by the watermarking schemes for the comparison of imperceptibility. The proposed watermarking scheme is targeted to achieve forty-five PSNR value. It can be seen from Table 2 that the PSNR values for all the images are very close to 45 obtained by the proposed scheme, whereas the other algorithms are stuck near about 42 and 44. With a close observation of average PSNR, the proposed algorithm is better than the other algorithms. The average PSNR obtained by the proposed scheme is almost 5% higher than the other schemes. Similar types of responses can be seen from Table 3, which provides the SSIM. The proposed watermarking scheme provides better results in all the cases in comparison to the other algorithms.

Robustness Analysis against Attacks
This section is dedicated to the robustness analysis employing the image distortion attacks to the watermarked image given in Table 1. Normalized correlation (NC) given in Equation (22) is used to evaluate the quality of the extracted watermark. The extracted watermark is more similar to the inserted watermark as the NC value approaches closer to one. Results are given in Tables 4 and 5 for the extracted watermark1 (W1) and watermark2 (W2), respectively. From Tables 4 and 5, it can be seen that the proposed watermarking scheme survives against all the distortion attacks, having good NC values. Normalized correlation value 1 in cases of ninety-degree rotation, row and column flipping is the evidence that the proposed watermarking scheme extracted the watermarks the same as inserted. It is the main aim of the study that has achieved 100%. Average normalized correlation values over all the seven test images corresponding to each distortion attack are calculated and are given in Table 6 for comparison of the watermarking schemes. From Table 6, looking at the results, it can be said that all the schemes performed equally, having the average NC values 1 in cases without distortion and pixelation distortion attacks. In the remaining cases out of the thirteen, the proposed scheme performed better in seven cases (more than 50%) whereas the other schemes performed well in six cases. Having a look at the overall average NC values, we can say that the proposed scheme is able to achieve almost 7% higher values in comparison to the other schemes. Sample images of the attacks applied to the watermarked image "Lena" and the extracted watermarks are given in Figure 5 for the visual quality comparison of the schemes. Due to the space constraints, there is only one watermark shown in Figure 5. It is evident from the Figure 5, that the extracted watermark by the proposed scheme can be identified by naked eyes without any difficulty in all the cases, whereas the extracted watermarks by the other schemes are not visually clear in cases of ninety-degree rotation, row and column flipping. Therefore, the proposed scheme outperformed the other watermarking scheme in the competition. In some cases, mean filtering, Gaussian noise, JPEG compression, rescaling, median filtering, motion blur, the proposed scheme performed opposite to expectation in comparison to other schemes. Further studies need to investigate the reasons for not performing according to the expectation in these particular cases.

Execution Time Analysis
This section presents the computational complexity analysis of the proposed scheme in terms of time required for watermark insertion and extraction, and the results are given in Table 7. The main objective of copyright protection watermarking applications is to establish ownership of the owner, irrespective of time, and it is not a crucial factor in such kind of applications. While in broadcast monitoring applications, insertion and detection are performed in real time and this important factor cannot be neglected. It can be seen from Table 7 that the watermark insertion time of the other schemes is very low, whereas the extraction time is more or less same. This is because, not only the invariant DC values obtained in the proposed scheme, but also the differential evolution algorithm is used to get the optimal quantization parameter for the insertion process. Briefly, in the other watermarking schemes, watermark bits are inserted by modifying DC coefficients using a predefined quantization parameter. Hence, the proposed scheme is computationally complex in comparison to the other schemes.

Security and False Positive Detection of Watermark
Several researchers in the watermarking literature have observed false-positive detection problems in various digital image watermarking schemes. It happens generally due to the insertion of partial information of the watermark into the host image instead of complete watermark and partial watermark information being kept safe with the owner that is provided back at the time of the watermark extraction. The ownership problem or dispute remains unsolved in such a condition, as it creates an ambiguous situation. Insertion and extraction of the entire watermark instead of partial information are one of the solutions to this problem. A person who claims ownership of the image needs to extract the entire watermark from the watermarked image to prove it. Following the same principle, the proposed scheme inserts the entire watermark and extracts the entire watermark that makes it free from false-positive detection problems.
Furthermore, the inserted watermark has one extra layer of security that is provided by piecewise linear chaotic map (PWLCM) using two secret keys, control parameter and starting point. Without having these two correct keys it is impossible to extract the inserted watermark. Therefore, false-positive detection problems do not occur in the proposed scheme. Electronics 2020, 9,

Execution Time Analysis
This section presents the computational complexity analysis of the proposed scheme in terms of time required for watermark insertion and extraction, and the results are given in Table 7. The main objective of copyright protection watermarking applications is to establish ownership of the owner, irrespective of time, and it is not a crucial factor in such kind of applications. While in broadcast monitoring applications, insertion and detection are performed in real time and this important factor cannot be neglected. It can be seen from Table 7 that the watermark insertion time of the other schemes is very low, whereas the extraction time is more or less same. This is because, not only the invariant DC values obtained in the proposed scheme, but also the differential evolution algorithm is used to get the optimal quantization parameter for the insertion process. Briefly, in the other watermarking schemes, watermark bits are inserted by modifying DC coefficients using a predefined quantization parameter. Hence, the proposed scheme is computationally complex in comparison to the other schemes.

Security and False Positive Detection of Watermark
Several researchers in the watermarking literature have observed false-positive detection problems in various digital image watermarking schemes. It happens generally due to the insertion of partial information of the watermark into the host image instead of complete watermark and partial watermark information being kept safe with the owner that is provided back at the time of the watermark extraction. The ownership problem or dispute remains unsolved in such a condition, as it creates an ambiguous situation. Insertion and extraction of the entire watermark instead of partial information are one of the solutions to this problem. A person who claims ownership of the image needs to extract the entire watermark from the watermarked image to prove it. Following the same principle, the proposed scheme inserts the entire watermark and extracts the entire watermark that makes it free from false-positive detection problems.

Conclusions
This study proposed a robust watermarking scheme based on DC values invariant to ninety-degrees multiple rotation, row and column flipping, by modifying the pixel values in the spatial domain. Modification for watermark insertion into the host is based on a quantization parameter that is optimally obtained by DE algorithm. This study provides another scope for improving the image watermarking scheme by using invariant DC and optimal parameters. The strength of the proposed watermarking scheme is investigated by taking seven standard test images and applying various image distortion attacks. The proposed watermarking scheme survived against most of the attacks considered in this study very well, which can be seen numerically as well as through images. It is seen that the performance of the proposed scheme on average is better than the other schemes considered in the comparison, in terms of imperceptibility and robustness. However, in some cases, mean filtering, Gaussian noise, JPEG compression, rescaling, median filtering, motion blur, the performance of the proposed scheme is not at par with other schemes. Further studies need to investigate the reasons for the dull performance of the proposed scheme in these particular cases. Excited by the performance of the proposed scheme, its extension for the video, audio and colored image watermarking is one of the future research plans.