Geometric correction code-based robust image watermarking

Digital image watermarking is one of the effective schemes to protect the copyrights of still images. However, the existing watermarking schemes are still not robust enough to the common geometric transformation attacks such as arbitrary rotation, scaling and shifting with desirable hiding capacity. To address this issue, we propose a robust watermarking scheme based on geometric correction codes (GCCs). In this scheme, the watermark and pre-set GCCs are combined and embedded into a cover image to obtain the watermarked image. At the stage of watermark extraction, the watermarked image, under a variety of geometric transformation attacks, can be geometrically corrected by minimising the difference between the extracted and the original GCCs, then the watermark is extracted from the watermarked image. The experiments demonstrate that, compared to the typical watermarking schemes, the proposed scheme achieves much higher robustness to the common geometric transformation attacks and comparable invisibility with the same embedding capacity.


INTRODUCTION
Digital watermarking is popularly adopted to protect the copyright of multimedia content by invisibly embedding watermarks into digital media. However, in practice, the images may suffer a variety of intentional or unintentional geometric transformation and image manipulation attacks such as rotation, scaling and noise-like attacks [1][2][3], which will affect the correct extraction of watermarks from the watermarked images for the copyright protection. Thus, an ideal watermarking scheme should be robust to most of the common attacks with desirable hiding capacity.
According to the manners of watermark embedding, the existing watermarking schemes can be roughly categorised into two classes: Image-level and region-level watermarking schemes. Image-level watermarking schemes embed watermarks into whole image region, while region-level watermarking schemes embed watermarks into a set of local regions. In early works, image-level watermarking schemes are proposed based on frequency domains such as discrete cosine transform (DCT) [4], discrete wavelet transform [5], discrete Fourier transform [6] and singular value decomposition [7]. These schemes generally show high robustness to noise-like attacks such as JPEG compression, Gaussian noise adding and blurring. Subsequently, some improved watermarking schemes based on frequency domains [8][9][10][11] have been proposed to further enhance the robustness to those noise-like attacks. Recently, some researchers applied neural networks in image-level watermarking [12][13][14][15]. Mei et al. [16] designed a neural network to model the human visual system to decide the watermark strength for DCT coefficients. Kandi et al. [17] trained an autoencoder convolutional neural network (CNN) and applied it in image watermarking tasks. However, it is a non-blind watermarking scheme, making it less appealing in practice. Zhong and Shih [18] viewed image watermarking as an image fusion task and adopted CNN to fuse watermark with a cover image. However, those image-level watermarking schemes are generally vulnerable to the common geometric transformation attacks such as rotation, scaling and shifting, as those geometric transformation attacks usually desynchronise the watermark extractors and image blocks used for embedding the watermark.
To resist the geometric transformation attacks, instead of embedding a watermark into the whole image region, some region-level watermarking schemes [19][20][21][22][23][24][25] embedded watermark into a set of invariant local regions detected by region detectors such as scale-invariant feature transform [26] and speed-up robust feature detector [27]. It has been proven that these region-level watermarking schemes have shown high robustness to the common geometric transformations including rotation, scaling and shifting, since the content of detected local regions used for watermark extraction is invariant under these attacks. However, to ensure accurate extraction of the watermark, these schemes usually selected a set of non-overlapping local regions and embedded the same watermark into each of these regions. This causes the region-level watermarking schemes have limited hiding capacity.
To achieve high robustness and desirable hiding capacity simultaneously, some geometric correction-based watermarking schemes [28,29] embedded watermark into the image frequency domain and adopted the fuzzy least squares support vector machine, the least squares support vector regression and Bessel K-form distribution to estimate parameters of possible geometric transformations to geometrically correct the watermarked image for watermark extraction. Unfortunately, these schemes cannot accurately correct the watermarked image under combinations of geometric transformations due to its limited ability of parameter estimation. In this study, we propose a novel geometric correction-based image watermarking scheme using geometric correction codes (GCCs). In this scheme, the GCCs are designed and used to geometrically correct the watermarked image for watermark extraction.
Specifically, at the stage of watermark embedding, the watermarked image and pre-set GCCs are combined to form a new watermark binary image, and the new watermark image is embedded into the DCT coefficients of a copyrighted image to obtain the watermarked image. At the stage of watermark extraction, the watermarked image under various geometric transformation attacks is geometrically corrected by minimising the difference between the extracted and the original GCCs, and then the watermark is extracted from the DCT coefficients of geometrically corrected watermarked image. By introducing GCCs in watermarking, the proposed scheme outperforms the typical watermarking schemes in the aspect of robustness to common geometric transformation attacks such as rotation, scaling, shifting and their combinations while it has comparable invisibility with the same embedding capacity.
This study is organised as follows. The proposed scheme is presented in Section 2. Experimental results and analysis are described in Section 3. Finally, the conclusion is drawn in Section 4.

Discrete cosine transform
Discrete cosine transform is the image transformation that converts an image from spatial to the frequency domain, and it is widely adopted in image watermarking schemes because the low-frequency DCT coefficients are robust to noise-like attacks. We assume that an image f (i, j ) with the size of N × N and N is integer multiples of 8, and thus the image f (i, j ) can be divided into N × N ∕64 non-overlapping blocks with a size of 8 × 8. The transformation from the spatial to the frequency domain can be expressed by the following Equation (1).
The inverse DCT that transforms the image from the frequency to the spatial domain can be expressed as follows: In Equations (1) and (2),

Geometric correction codes
As shown in Figure 1, the GCCs are arranged around the watermarked image to form the new watermark image. There are four GCCs in total, each of which is with the size of a ′ × a ′ . The pixel value of one code is set as 1 and those of the other three GCCs are set as 0. Note that the pixel values of GCCs are not symmetric, as we cannot geometrically correct the watermarked images undergoing 90 • rotation transformation by the symmetric GCCs. The setting of the sizes of GCCs is discussed in Section 3.1. The GCCs can not only geometrically correct the watermarked images undergoing geometric transformations but also locate the embedded watermark information in the watermark extraction stage. Then, after the geometric correction, the watermark can be accurately extracted from the watermarked images. More details are given as follows.

Framework of the proposed scheme
In practice, an ideal image watermarking scheme should have high robustness to most of the common image attacks with desirable hiding capacity so that the watermark can be accurately extracted under these attacks to prove the ownership if needed. However, it is still a challenge for the existing image watermarking schemes to resist geometric transformation attacks such as rotation, scaling and shifting, which are also called desynchronisation attacks. This is because the geometric transformation attacks would contribute to desynchronisation between embedded pixel blocks and watermark extractors [30,31]. Therefore, the robustness against the geometric transformation attacks would be significantly improved as long as the watermark extractors are resynchronised with the embedded pixel blocks. To this end, we propose a GCC-based robust image watermarking scheme. Figure 2 shows the overall framework of the proposed watermarking scheme, which consists of watermark embedding and extraction stages. At the stage of watermark embedding, we pre-set GCCs, which will be used to geometrically correct the watermarked image undergoing various geometric transformation attacks, and then combine GCCs with the original watermark image to form a new watermark image as shown in Figure 1. Then, the new watermark image is embedded into the frequency domain of a cover image by DCT.
At the stage of watermark extraction, to achieve high robustness against geometric transformation attacks, the watermarked image is geometrically corrected by minimising the difference between the original GCCs and the ones extracted from the watermarked image, and then the watermark is extracted from the synchronised watermarked image.

Watermark embedding
In this section, the watermarked image is embedded into the DCT coefficients of a cover image. The steps of the embedding process of the proposed scheme are detailed as follows. We suppose the information of GCCs is shared between the sender and receiver beforehand. Step (1): Pre-processing. We first combine the original watermark image and the GCCs to generate a new watermark image as shown in Figure 1. Since the size of each GCC and that of the original watermark image are denoted as a ′ × a ′ and a × a, respectively, the size of the new watermark image can be represented as (a × a + 4 × a ′ × a ′ ). Then, the new watermark image is converted to a binary sequence W for watermark embedding: To facilitate the watermark embedding, the cover image is adjusted to the certain size 8(a + 2a ′ ) × 8(a + 2a ′ ), which is necessary in watermark extraction for the purpose of keeping the watermark extractor synchronised with the embedded image blocks.
Step (2): Colour space transformation. Actually, RGBchannels are not appropriate for watermark embedding because of their high correlation. Therefore, the colour space of the cover image needs to be transformed into other space. As an alternative, we transform the cover image from RGB colour space to YCrCb colour space, and then the watermark information is embedded into the Y channel, which represents the luminance component of the cover image.
Step (3): DCT transformation. The Y channel of the cover image is segmented into (a + 2a ′ ) × (a + 2a ′ ) nonoverlapping image blocks B k , each of which is with the size of 8 × 8 as shown in Equation (4): Then, DCT technique is applied to transform the image blocks from spatial to frequency domain. The DCT coefficients FIGURE 3 Watermark embedding process. The bit in green is reference bit and the bit in red is embedding bit of each image block, denoted as C k (m, n), can be obtained by Equation (5): Step (4): DCT coefficient modification. As shown in Figure 3, once a pair of reference bit (i 1 , j 1 ) and embedding bit (i 2 , j 2 ) in the same image block is selected, the watermark information is embedded by modifying the DCT coefficients of embedding bits using Equation (6): where p represents the embedding strength, and w k represents the watermark information to be embedded, C k (i 1 , j 1 ) and C k (i 2 , j 2 ) denote the DCT coefficients of reference and embedding bits, respectively. The low-frequency domain is usually used to embedding watermark, in this study, we set the reference bit to (2,2) and the embedding bit to (3,3).
Step (5): Watermarked image generation: After the above steps, the watermark information has been embedded into the frequency domain of the cover image. The inverse DCT transformation is performed on the coefficients of each block, and then YCrCb colour space is transformed to RGB colour space to generate the final watermarked image.

Watermark extraction
It is a common phenomenon that watermarked images would undergo a variety of intentional or unintentional geometric transformation and noise-like attacks during transmission since the internet is open to all users. Especially, the geometric transformation attacks, that is, desynchronisation attacks, would make the accurate extraction of watermarks quite difficult.
To resist the geometric transformation attacks, image geometric correction using GCCs is introduced in this subsection. Although the geometric transformation attacks are usually unknown by the receiver, we assume the watermarked image has undergone some common types of geometric transformations, and denote the set of possible geometric transformations as Ω. The steps of geometric correction are detailed as follows: Step (1): GCCs extraction. For each geometric transformation from Ω, we assume the watermarked image has undergone this transformation. Then, we attempt to geometrically correct the watermarked image under this assumption and extract embedded GCCs from geometrically corrected watermarked image by DCT transformation. The GCCs are marked in red as shown in Figure 4.
Step (2): Similarity calculation. The extracted GCCs are compared with the original GCCs and the similarity between them can be computed. When the maximum similarity reaches a preset threshold, it can be inferred that the watermarked image has been resynchronised, and the watermark is very likely to be extracted accurately. The geometric transformation that the watermarked image has undergone can be determined by Equation (7): * = argmin ∈Ω {Ext (T (I )) − C } where I denotes the watermarked image, and T (I ) means the watermarked image has undergone the geometric transformation , respectively. The possible transformation may be one certain type of rotation, scaling, shifting or their combinations, and Ext (T (I )) and C denote the extracted GCCs and original ones, respectively. The geometric transformation set Ω contains rotation angles varying from 1 to 360 • in steps of 1 • and the shifting varying from (1,1) to (512,512) in steps of 1 pixel. Scaling is not included because the proposed scheme resizes the watermarked image to a specific size before extraction to avoid desynchronisation error caused by scaling.
Step (3): Geometric correction. From the above, we have known the transformation type * that the watermarked image has undergone, and thus the distorted watermarked image can be geometrically corrected by Equation (8), where I and I * denote the distorted image and recovered one, respectively: Step (4): Watermark extraction. The watermark extraction process can be implemented on the geometrically corrected watermarked image. The watermark extraction is the inverse process of watermark embedding. According to the stage of watermark embedding, in order to resynchronise the watermark extractor with the embedded image blocks, the restored image is first scaled to a specific size 8(a + 2a ′ ) × 8(a + 2a ′ ) and then divided into non-overlapping image blocks with a size of 8 × 8.
Subsequently, inverse DCT transformation is performed on each image block to construct the coefficient matrix C k , and watermark information can be extracted by comparing the values of the reference and the embedding bits in each block according to Equation (9).
Finally, the extracted sequence of watermark information shown in Equation (10) is converted to a binary watermark image.

EXPERIMENTAL RESULTS AND ANALYSES
In this section, our parameter settings of the embedding strength, the sizes of GCCs and geometric transformation set Ω are first discussed and determined in Section 3.1. Then, the performance test of the proposed scheme is shown in Section 3.2, and the comparison with other typical watermarking schemes is implemented in the aspects of invisibility and robustness in Section 3.3.
In order to evaluate the performances of the proposed watermarking scheme and the typical watermarking schemes [32,33], the standard image dataset, that is, c512 [34] including 512 × 512 sized images such as 'Lena', 'peppers', 'baboon' is adopted. Some test images are shown in Figure 5. Besides, the binary watermark image of size 64 × 64 adopted in the scheme [32] is used as the watermarked image, which is shown in Figure 1. In our experiments, both structural similarity index measure (SSIM) and peak signal-to-noise ratio (PSNR) between the original cover and watermarked images are used to measure the invisibility, and the normalised correlation (NC) between the original watermark and recovered watermark is adopted to measure the robustness.

Parameter settings
In the proposed scheme, the selection of embedding strength p is critical, which will significantly affect the invisibility and robustness of the proposed scheme. Another parameter that needs to be noted is the size of GCCs. In general, the size of the original watermark image is fixed at 64 × 64, and the size of the new watermark image is related to those of GCCs. The scheme is designed to enhance the robustness against geometric transformation attacks. Smaller sizes of GCCs mean they could provide less reference for geometric correction. On the contrary, larger sizes of GCCs mean the proposed scheme has As shown in Figures 6 and 7, the NC value increases but SSIM value decreases with the increase of the size of GCCs when the embedding strength p is fixed. The GCCs with the small sizes of 2 × 2 are too weak to geometrically correct the watermarked image, as the GCCs with small sizes are easy to be lost after attacks. When the GCC sizes are set as 4 × 4, the robustness is satisfactory. Thus, there is no need to set the sizes of GCCs as 8 × 8 in which the improvement of NC is limited and the SSIM decreases significantly. Hence, it is suitable to set the size of GCCs as 4 × 4.
Then, we fix the size of GCCs at 4 × 4 to test the impact of parameter p as shown in Figures 6(b) and 7(b). It can be observed that when p increases, the NC value increases but the SSIM value decreases. It means invisibility is sacrificed for higher robustness. The NC increases rapidly when embedding strength is between 50 and 70. However, further increasing p cannot improve robustness significantly. Therefore, we set the embedding strength p to 70. We discuss the definitions of geometric transformation set Ω, as it directly decides the accuracy of watermark extraction and the time consumption. We give three definitions of set Ω denoted as Ω 1 , Ω 2 and Ω A ; where Ω 1 contains rotation angles ranging from 1 to 360 • in a step of 1 • ; Ω 2 contains the shifting transformations with the offset (1,1) to (512,512) in a step of 1 pixel; and Ω A denotes the set that nclude both Ω 1 and Ω 2 . We randomly select 10 geometric attack samples from each set and perform those attacks on the dataset. The results shown in Table 1 are the time consumption of a given image under the 10 different attacks from each set, and the right-most column named 'average' represents the average value of different test images in the dataset.
It can be clearly observed that time required for watermark extraction is acceptable even under complicated attacks. Thus, to resist multiple geometric transformation attacks, the geometric transformation set Ω A is more appropriate for our scheme.

Performance test
According to the above, the size of GCCs is set as 4 × 4 and embedding strength is set as 70 in this experiment. To   Figure 8. The corresponding watermarks extracted from these distorted watermarked images are shown in Figure 9.
Since the proposed scheme is designed to resist geometric transformation attacks, to further verify the robustness of this scheme against geometric transformation attacks, not only the Gaussian noise, salt and pepper noise, JPEG compression but also the rotation, scaling, shifting, cropping and their combinations are performed on the watermarked image. It can be observed from Tables 2 and 3 that the proposed scheme shows high robustness on these attacks, especially for JPEG compression, rotation and scaling.
The three cover images and their corresponding watermarked images are shown in Figure wwwww10. There is almost no visual difference between the cover images and the corresponding watermarked images.

Performance comparison
As mentioned above, Gaussian noise, salt and pepper noise, JPEG compression, rotation, scaling and so on are applied to the watermarked images. Tables 2 and 3 summarise robustness test of the proposed scheme and the typical watermarking schemes under different attacks. The proposed scheme demonstrates that it achieves desirable robustness against these attacks, especially the common geometric transformations. On the contrary, the scheme [32] is not robust enough to the geometric transformation attacks, as it is based on the correlation between different channels of colour spaces such as RGB, YCrCb, HSI,  and YIQ, which are sensitive to these geometric attacks. The scheme [33] introduced teaching learning-based optimisation method to image watermarking, but it is still not robust enough to these geometric attacks. From this table, it is clear that our scheme can achieve much higher robustness. The main reason behind that is the proposed scheme can resynchronise the embedded pixel blocks and the watermark extractor by introducing the GCCs. Also, comparison of invisibility between the proposed scheme and the typical schemes [32,33] by using SSIM and PSNR are presented in Tables 4 and 5, respectively. From these tables, the invisibility of the proposed scheme is slightly lower than those of typical schemes [32,33], as it needs to embed the additional information, that is, GCCs, into the cover image during the watermark embedding process. In summary, compared to the typical watermarking scheme, the proposed scheme achieves much higher robustness to the common attacks, especially the common geometric transformations, while it has comparable invisibility.

CONCLUSION
In this study, we have presented a robust image watermarking scheme. Due to the introduction of the GCCs, the proposed scheme is robust to geometric transformation attacks such as rotation and scaling, which are difficult to resist with desirable high capacity. However, the proposed scheme is still not robust enough to cropping attack. Our further work is to enhance the robustness against cropping attacks while maintaining desirable hiding capacity.