### 1. Introduction

_{1}and W

_{2}, in the three different domains of DWT, DCT, and SVD.

### 2. Related Works

_{w}, S

_{w}, and V

_{w}, where, k is a scale factor that controls the strength of the watermark embedded into the original image. The watermarked image I

_{w}is then obtained by multiplying the matrices U, S

_{W}, and V. Many recent works that use the SVD transform to build watermarking systems can be found in [19–21].

### 3. The Proposed Watermarking Scheme

_{3}that will undergo each one the SVD transforms to give them the following three matrices, respectively: diagonal S and S

_{3}and the two orthogonal ones U, V for D and U

_{3},V

_{3}for D

_{3}.

_{1}and W

_{2}. A transformed DWT is applied to the two watermarks producing four levels (LL

_{1}, HL

_{1}, LH

_{1}, HH

_{1}) and (LL

_{2}, HL

_{2}, LH

_{2}, HH

_{2}) for W

_{1}and W

_{2}, respectively. We then perform the DCT transform on LH

_{1}and LH

_{2}to give D

_{2}and D

_{1}, and the SVD transform is applied to D

_{2}and D

_{1}to give (U

_{2}, S

_{2}, V

_{2}) and (U

_{1}, S

_{1}, V

_{1}), respectively. The embedding of the watermark W

_{1}is performed by adding the two diagonals matrices S and S

_{2}that were previously multiplied by a factor α to obtain S

_{33}. Embedding the watermark W

_{2}is performed by adding the two diagonals matrices S and S

_{2}that were multiplied by the same factor α to obtain S

_{32}. The SVD is performed on S

_{32}to obtain W

_{img}, in order to reconstruct the watermarked image I

_{W}and the inverse IDCT is applied to W

_{img}.

### 3.1 Watermark Embedding Process

- A reversible watermark W

_{1}, which is used to verify data authentication and the integrity of the image. It is defined by the RSA enciphering of a data block composed of a combination of the SHA-512 hash of the most significant bits (MSB) with the RLE compression of the least significant bits (LSB);- A second watermark W

_{2}is created by enciphering the inputted logo using a secret key that allows the image’s user to check its confidentiality and integrity. It also transforms the result using DWT and SVD transforms.

_{1}and W

_{2}, to give the watermarked image I

_{w}as output. Details of different embedding and watermark extraction steps are presented in the following sections, while a complete diagram of the approach is illustrated in Figs. 1 and 2.

_{1}representing the watermark W

_{1}is generated according to the following steps:

Extracting the MSB from the cover image and calculating the corresponding message authentication code (MAC) using the SHA-512 algorithm;

Concatenating the obtained MAC with the patient information and encrypting the resulting string(as shown in Fig. 3);

Selecting the LSBs of all pixels and compressing the resulting string using RLE;

Concatenating the compressed string and the encrypted one;

Converting the characters of a string to a binary matrix A;

Applying the DWT on the resulting matrix A to obtain: LL

_{1}, HL_{1}, LH_{1}, and HH_{1};Applying the DCT transform on LH

_{1}to obtain a new matrix D_{1};Performing the SVD on D

_{1}to obtain the SVs decomposition of: U_{1}.S_{1}.V_{1}′.

_{1}represents the watermark W

_{1}that is to be inserted as the watermarking information in the host image I. The watermark W

_{1}is computed from the host image and will serve for integrity verification and authentication (as illustrated in Fig. 3).

_{2}, which represents the watermark W

_{2}, is then generated according to the following steps:

Reading the watermark message and reshaping it into a vector;

A pseudorandom sequence is then generated from the secret key using a stream ciphering algorithm (RC4 in our implementation) and combined using XOR with a watermark message;

Applying the DWT transform on the resulting ciphertext after reshaping it as a matrix to obtain: L

_{L2}, H_{L2}, L_{H2}and H_{H2};Applying the DCT to the sub-band LH

_{2}to obtain the new matrix D_{2};Decompose D

_{2}in singular values to obtain the SVs: SVD (D_{2})=U_{2}.S_{2}.V_{2}^{t}.

_{2}represents the watermark W

_{2}that is to be inserted as the watermarking information in the host image I. The watermark W

_{2}is computed from the host image and will serve for confidentiality guaranteeing (as illustrated in Fig. 4).

_{1}and W

_{2}, the embedding phase can now be performed. The embedding process for the watermark W

_{1}is first performed as follows:

Applying the DWT transform to decompose the cover image into four sub-bands;

Perform the SVD on the subband LL to obtain the SVs: SVD(LL) = U.S.V′;

Insert the singular values of the watermark S

_{1}in the matrix S of LL to obtain: S_{33}= S + α* S_{1};Perform the SVD on S

_{33}to obtain the SVs: SVD(S_{33}) = U_{6}.S_{6}.V_{6}^{t};Finally, calculate the watermarked matrix using U, V, and S

_{6}: W_{img2}= U . S_{6}. V^{t}.

_{2}is embedded into the watermarked image using the following steps:

Apply the DCT to subband HH of the cover image to get the new matrix D

_{3};Perform the SVD on D

_{3}: SVD (D_{3})=U_{3}.S_{3}.V_{3}^{t};Add the content of S

_{2}of the watermark W_{2}to the matrix diagonal S_{3}: S_{32}= S_{3}+ α . S_{2};Perform the SVD on S

_{32}to obtain U_{5}, V_{5}^{t}, S_{5}and reconstruct the W_{img}matrix using S_{5}, U_{3}and V_{3}: W_{img}= U_{3}. S_{5}.V_{3}^{t}.Apply the inverse DCT to reconstruct B

_{1}using W_{img};Obtain the watermarked image I

_{W}by performing the inverse DWT using B_{2}and three sets of DWT coefficients: HL_{2,}B_{1}and HH_{2}.

### 3.2 Watermark Extraction Process

_{1}and watermark W

_{2}. The first step consists of applying the decomposition DWT to decompose the watermarked image I

_{W}, which produce four detailed components: LL

_{w}*, HL

_{w}*, LH

_{w}*, and HH

_{w}* (these are possibly corrupted). The detail LL

_{w}* is used for extracting watermark W

_{1}, while the HH

_{w}* is used for extracting watermark W

_{2}.

_{w}* to give the three matrixes U

_{w}*, S

_{w}*, and V

_{w}*. After that, the matrix S

_{r}is computed using the diagonal matrix S (obtained during the SVD transformation applied on the original detail LL of the original image) and the matrixes S

_{W}. A new matrix D* is then computed using the matrixes U

_{1}and V

_{1}that were obtained during the embedding process, and the inverse DCT transform is applied to the new matrix D* to produce a matrix G. Finally, in order to extract the watermark W

_{1}, the inverse DWT transform of the original image’s details LL

_{1}, LH

_{1}, HL

_{1}, and G are computed.

_{2}, the DCT transform is applied to HH

_{w}* producing T

_{W}. The SVD transform is then applied to T

_{W}produce three matrixes: U

_{ww}, V

_{ww}, and S

_{ww}. These are used with the original matrix S

_{3}to compute the matrix S

_{r1}. A new matrix D

_{22}* is then computed using the matrix S

_{r1}matrixes with the matrixes U

_{2}, V

_{2}of the original watermark W

_{2}. Finally, applying the inverse DCT on the new matrix D

_{22}* gives the new matrix B, and the inverse DWT of the original detail LL

_{2}, HL

_{2}, LH

_{2}, and B is computed and deciphered using the same secret key used during the watermark generation to deduce the watermark W

_{2}. The different steps for extracting watermark W

_{1}are explicitly explained as follows:

The watermarked image I

_{w}* (possibly attacked) is decomposed into four DWT transform coefficients: LL_{w}*, HL_{w}*, LH_{w}*, and HH_{w}*;The SVD transform is performed on LL

_{w}* to obtain: SVD(LL_{w}*) = U_{w}*.S_{w}*.V_{w}*^{t};The corrupted watermark is obtained by: S

_{r}= (S−S_{w}*)/4;The matrix containing the watermark is computed by: D* = U

_{1}.S_{r}.V_{1}^{t};The extracted watermark W

_{1}* is obtained by performing the inverse DWT using the original watermark’s coefficient sets: LL_{1,}HL_{1}, LH_{1}, and D*.

_{2}are explicitly explained as follows:

The DCT transform is applied to HH

_{w}*to obtain T_{w};The SVD transform is applied to T

_{w}to obtain: SVD(T_{w}) = U_{ww}. S_{ww}.V_{ww}^{t};The corrupted watermark is obtained by: S

_{r1}= (S_{3}−S_{ww})/4;The matrix containing the watermark is computed by: D

_{22}* = U_{2}. S_{r1}. V_{2}^{t};The inverse DCT transform is applied to D

_{22}*;The extracted watermark W

_{2}* is obtained by performing the inverse DWT using the original watermark’s W_{2}coefficient set: LL_{2}, HL_{2}, LH_{2}, and D_{22}*.

### 3. Experiments and Obtained Results

_{W}is the watermarked image. Images having high PSNR and SNR values are preferable.

_{1}has a size of 1×206 and the watermark image W

_{2}has a size of 106×143 binary pixels. Both of which are illustrated in Fig. 6. Fig. 7 shows the results of when the watermarking process is applied to the original image.

_{1}that was extracted from several attacked images. It is clear that the perceptual quality of the watermark is highly preserved even with hard attacks, such as compression and cropping.

*p*

*and*

_{i}*M*is the size of the watermark.

*T*

*, we can say that the watermark is present in the image. According to [25], the threshold value can be computed using the following formula:*

_{s}_{1}is 106×143 binary pixels, we concluded that the threshold

*T*

*is equal to 0.14. In Fig. 10, we show the variation between different detection score that were obtained for the extracted watermark from several attacked images by varying the angle of rotation. We can easily see that the detection score is always higher than the threshold*

_{s}*T*

*. This means that the watermark was always detected.*

_{s}*T*

*. The results of Figs. 10 and 11 approve the NCC results given in Table 2, and they ensure that the proposed scheme is very robust against several types of watermarking attacks.*

_{s}