Multiresolution Video Watermarking Algorithm Exploiting the Block-Based Motion Estimation

This paper presents a novel technique for embedding a digital watermark into video frames based on motion vectors and discrete wavelet transform (DWT). In the proposed scheme, the binary image watermark is divided into blocks and each watermark block is embedded several times in each selected video frame at different locations. The block-based motion estimation algorithm is used to select the video frame blocks having the greatest motion vectors magnitude. The DWT is applied to the selected frame blocks, and then, the watermark block is hidden into these blocks by modifying the coefficients of the Horizontal sub-bands (HL). Adding the watermark at different locations in the same video frame makes the scheme more robust against different types of attacks. The method was tested on different types of videos. The average peak signal to noise ratio (PSNR) and the normalized correlation (NC) are used to measure the performance of the proposed method. Experimental results show that the proposed algorithm does not affect the visual quality of video frames and the scheme is robust against a variety of attacks.


Introduction
These days, the reproduction, manipulation, and distribution of the different digital multimedia and entertainment resources such as images, audio, and video via the internet become faster and easier.The various social networks and websites such as Facebook, Tweeter, and Instagram allow sharing of images and videos over a wide range.Meanwhile, such material could be available for the users to illegally download and copy them without the owner permission.Therefore, copyright protection and authentication schemes are becoming essential to effective security.
Digital watermarking technology is proposed as an effective solution for copyright protection and product authentication.Watermarking is the process of embedding some security information into the host digital contents without loss of the watermarked data quality and with the ability to extract this information lately to prove the ownership of intellectual property.There are two criteria that the watermarking techniques should achieve with trade-off among them, robustness and visual quality of watermarked data.However, increasing the robustness leads to increasing the ability to detect or extract the watermark under different kinds of intentional and unintentional attacks, at the expense of visual quality.
The watermark could be image, logo, pattern, license information; any information can identify the owner or prove the ownership.Any digital watermarking scheme consists of two basic parts: watermark embedding and watermark detection/extraction.In the embedding process, the watermark is embedded into a host data which may be an image, an audio or a video using a key.Some techniques embed the watermark in the spatial domain by modifying the pixel values directly.On the other hand, other techniques embed the watermark in the frequency domain by modifying the transformed coefficients and these techniques are more robust than spatial domain.The most commonly used transforms are the discrete fourier transform DFT, discrete cosine transform DCT and DWT [1]- [5].
Many research proposed different techniques for video watermark in compressed [6]- [8] and uncompressed domains [9] [10].Some methods extend image watermarking algorithms by considering that video frames are still consecutive images while other methods based on inherent features of the video sequence like motion vectors.Watermarking in the motion vector between successive frames can be used in the compressed and uncompressed video with a little degradation in the video quality.Lee et al. [11] presented an adaptive video watermarking using motion information.A number of blocks are selected from the first frame based on some criteria.By using block matching algorithm, these blocks are tracked in each frame and transformed to DWT.The same watermark is embedded in the middle frequency band of the same block with adjustable strength.Zhongjie et al. [12] proposed a technique in which the watermark information is embedded by changing the horizontal or vertical component of motion vectors.This scheme has low computational complexity and could be extracted blindly.In Zhang et al. [13] the watermark is embedded in the compressed domain using the motion vectors that have greater amplitude than a certain threshold.Different watermarks are embedded in different pieces of the motion vectors.Mishra et al. [14] used Back-Propagation Neural network (BPN) to embed the watermark in a selected video frames that have a maximum motion in X and Y directions.After that, the watermark is embedded into the DWT coefficients of the blue channel of the selected frames.Nakano-Miyatake et al. [15] have proposed algorithm that embeds and detects the watermark in the compressed domain (MPEG-2).The watermark is embedded into the coefficient of the DCT blocks of I-frame and P-frame using the adequate embedding energy.However, the adequate embedding energy is computed for each block using Human Visual System (HVS) criteria.
This paper presents a new uncompressed video watermarking algorithm which embeds different parts of a single watermark into different frames of a video using motion vectors and DWT.The watermark is divided into blocks and each block of the watermark is embedded into a selected blocks in each frame.As the human eye cannot notice the details of fast moving region, the blocks with highest motion vector magnitude are chosen to embed the watermark.The selected blocks are transformed using wavelet transform and the coefficients are changed according to the watermark signal.Consequently, the watermark could be extracted from different locations in the same frame.Thus, if there is any distortion in a recovered watermark from one or more locations, the rest will be used to provide the correct watermark.The proposed embedding and extracting schemes make it robust against different attacks.Comparing to the work in the literature, the proposed techniques not only focus on making the watermark not noticeable but also to be robust against the different attacks which is a trade-off.
The rest of the paper is organized as follows: Section 2 describes the motion estimation.The proposed watermarking scheme is explained in Section 3. Section 4 demonstrates the experimental results and finally Section 5 concludes the paper.

Motion Estimation
The successive video frames contain temporal redundancy so any two adjacent frames are similar and changes may be caused by object movement.Motion estimation technique is used to reduce the inter-frame correlation and reduce the total transmission bit rate which plays an important role in the video compression process [16] [17].The block-matching algorithm (BMA) as shown in Figure 1 is the most common and efficient method for motion estimation [18].In this algorithm each frame is divided into equal sized non-overlapping blocks then each block of current frame F is compared with the corresponding block and its neighbors within a search window on the previous frame F-1 to find the best matching block [19].There are several criterion can be used to determine the candidate block as Mean Absolute Difference (MAD), Mean of Squared Error (MSE) and Sum of absolute difference (SAD) [20].The proposed work uses Equation (1) to calculate the MAD. 1 where nxn is the block size and Bc ij and Bp ij are the pixel number (i, j) in the compared blocks in the current frame and the previous frame, respectively.The displacement between the block and the best matching one is defined as the motion vector MV and there is only one motion vector for each block.The larger motion vector magnitude means the faster moving of its block and less sensitive to the human eye to observe the change.

Proposed Watermarking Scheme
The block diagrams of embedding and extraction algorithms are shown in Figure 2 and Figure 3 in proposed method, video frames are taken as an input, and the watermark is embedded in selected blocks with high motion vector magnitude by altering the wavelet coefficients of selected DWT sub-bands.

Watermarking Embedding
The proposed watermarking process shown in Figure 2 is briefly described as following: where i mvx and i mvy are the x and y components of the motion vector of block i.The DWT is applied lo- cally to all chosen blocks of frame F and get four multiresolution sub-bands n × n: LL, HL, LH, and HH [22].The watermark is a binary logo image of n × n and it has been divided into 8 × 8 blocks.The same block of watermark is embedded L times in the same frame by modify the coefficients of LH sub-bands of all chosen blocks L. If B LH is the embedding sub-band then the embedding equation is: where LH B′ is the watermarked sub-band; α is the watermarking strength and W B is the watermark block.Apply the inverse DWT for each block to produce the watermarked luminance component of the frame.Then combine the modified luminance component with original U and V to obtain the watermarked frame and then reconstruct the watermarked video.

Watermarking Extraction
The watermark extraction process shown in Figure 3 is the inverse procedure of the watermark embedding process.The proposed algorithm is a non-blind algorithm so the original video sequence is required.The watermark extraction procedure is as follows: The watermarked (and may be attacked) video is divided into frames and converts the N × N RGB frames into YUV components.For each two consecutive frames, the Y component of each frame is divided into 16 × 16 blocks.The block matching algorithm is applied to calculate the motion vectors.The DWT is applied to the L chosen blocks with highest motion vector magnitude of frame F, and from LH sub-bands the watermark block is extracted using the following equation: where B W ′ is the extracted watermark block and LH B′′ is the watermarked sub-band (and may be attacked).
After the extraction process, multiple copies of each block of the watermark are obtained.As the watermarked video may expose to a different type of attacks and may create spurious matches, the watermark block is recovered by averaging the watermarked blocks extracted from the same frame to reduce the attack effects.Finally, all the blocks are combined together to produce the recovered watermark.

Experimental Results
The performance of the proposed algorithm is tested on three 256 × 256 video sequences; Foreman, Calendar, and Silent.Only the luminance components of the different frames are watermarked during the test procedures.
For motion estimation algorithm each frame is divided into blocks of size 16 × 16.The DWT is applied to chosen blocks and a number of HL sub-bands of size 8 × 8 pixels are obtained.The watermark, shown in Figure 4, is a binary logo image with size 32 × 32 and is divided also into blocks of size 8 × 8. Different kinds of attacks are simulated to test the proposed watermarking scheme.The algorithm performance is evaluated from the imperceptibility and robustness against various attacks points of view [23].The visual quality of the watermarked frame is evaluated by PSNR and is defined as [24]: where MSE (mean squared error) between the original and watermarked frames and is defined as follows [24]: where m and n are the size of the frame and f(i, j) and f'(i, j) are the pixel values at location (i, j) of the original and watermarked frame.However, robustness is measured by NC and is given by [24]:   To evaluate the robustness of the watermarking algorithm, the three video sequences are subject to different attacks.Tables 1-6 show the PSNR and NC for each case of the attacked videos.To test the robustness of the proposed algorithm against noise attack, Gaussian noise is added to the watermarked videos at mean = 0 and variance = 0.001.The watermark is still recognizable with human eyes and can be extracted from corrupted wa-   1. Table 2 illustrates the results of frame attacked by Gamma correction with different parameters (Par) 0.4 and 2. The watermark can be recovered with NC value greater than 0.9 except for Mobile video when the parameter = 2 so the scheme can resist this attack.In the same manner, the proposed scheme is robust against contrast adjustment with factor = 20 with NC = 0.9046, 0.9134 and 0.9576 as shown in Table 3, and robust against histo-gram equalization with NC = 0.9458, 0.9651 and 0.9849 as shown in Table 4, all the NC values exceed 0.9.The video frames are filtered by a sharpening filter with parameter value 0.6.The watermark is reconstructed with NC = 0.8596, 0.8767 and 0.8803 as in Table 5.
Finally, Table 6 shows the robustness of the proposed algorithm JPEG attacks with different quality factors (QF = 90% and 80%).From NC values, it is found that the proposed watermark can survive under the compression process.
The proposed technique is compared to the proposed work in [14] for Foreman video results: • Gaussian noise attack: the achieved NC at variance 0.0007 was 0.8 in [14] while it was 0.8114 at variance 0.001 in the current work as shown in Table 1.This implies that the proposed technique is robust against a higher noise variance value.• JPEG compression attack: the achieved NC was 0.7 and 0.85 in [14] and 0.9204 and 0.9377 in the current work for QF equal 80% and 90% respectively.This indicates that the proposed technique is more resistant to this attack.

Conclusion
In this paper, a video watermarking scheme has been implemented.Embedding the watermark in motion blocks satisfies the requirement of imperceptibility besides applying block based DWT which satisfies the robustness of the algorithm.The proposed scheme is tested by applying some signal and image processing attack and measuring the robustness of the scheme by NC and visual quality by PSNR.The experimental results show that the proposed scheme is robust against common attacks such as Gaussian noise, gamma correction, and automatic equalization, contrast adjustment, sharpening filter and JPEG compression with different QF.In the future research, we will try to enhance our algorithm to be robust against geometric transformations like frame resizing, rotating and cropping.

Figure 3 .
Figure 3. Watermark extraction algorithm.The video sequence is taken as input and divided into N × N RGB frames.The RGB frames are converted into YUV components, and only the luminance Y component is used for watermark embedding.For each two consecutive frames F-1 and F, the Y component of each frame is divided into 16 × 16 blocks and the block matching algorithm is applied to calculate the motion vectors.The first L blocks with highest motion vector magnitude are chosen to embed the watermark.The motion vector magnitude is computed as following[21]:2

Figure 5 (
Figure 5(a), Figure 6(a), Figure 7(a) show the original sampled frame of Foreman, Mobile, and Silent video