# 2008 International Conference on Computer Science and Software Engineering

A Novel Steganographic Algorithm Based on the Motion Vector Phase
Xuansen He
College of computer and communication Hunan University Changsha, China hxshf@vip.sina.com

Zhun Luo
College of computer and communication Hunan University Changsha, China gol_ele@sina.com Changyong Xu et al propose that the secret data are embedded in the amplitude of the motion vector and the control data are embedded in I frame [2]. Dingyu Fang et al proposes a data-hiding scheme that embeds the secret data in digital videos using the phase angle difference of the motion vector[3]. Shan Zhu et al proposes the diamond search algorithm for fast block-matching motion estimation[4]. Above the methods have the advantages of least influence on the videos and simple algorithms. In this paper we proposes an new effective algorithm that embeds the secret information into P or B frame of the phase of the motion vector. The remainder of this paper is organized as follows. Section 2 introduce a data hiding algorithm based on the phase angle difference of the motion vector. Section 3 is dedicated to deriving a new seganographic algorithm based on the phase of the motion vector. The simulation results of the algorithms are presented in Section 4. Finally, Section 5 concludes the paper. II. THE ALGORITHM BASED ON THE PHASE ANGLE DIFFERENCE OF THE MOTION VECTOR The foundation of the data hiding algorithm based on the phase angle difference of the motion vector [3] (method _first) is as follows: most of the video encoders perform some fast block search algorithm to substitute the full search algorithm, these fast search algorithms include three steps search (TSS), four steps search (FSS) and diamond search(DS) [4],[5], and so on, these algorithms can find the local optimal motion vector and can save lots of computational burden. The method_first replaces the original motion vector with another local optimal motion vector to embed data in the motion vectors in the inter frame, the process of the algorithm is as below [3]: (1) Discard the surrounding macroblock in the current inter frame. (2) Compute the motion vector magnitudes in the remaining macroblocks. (3) Using the predefine threshold T to select a set S for candidate motion vectors(MV).

Abstract—Most data hiding techniques in digital video utilize I frame to embed the secret information so the capacity of P and B frame is wasted. In this paper, we first analyze a data-hiding algorithm using the phase angle difference of the motion vector, on this base a novel steganographic algorithm based on the phase of the motion vector is proposed. The algorithm utilizes the phase of single motion vector to embed the secret data in P or B frame, in order to improve the embedding efficiency we use the matrix encoding technique to achieve a better tradeoff between the quantities of hidden data and the motion vectors modification rate. The simulation results have validated the feasibility of the algorithm. Keywords-seganography; phase of motion vector; matrix encoding; digital video

I.

INTRODUCTION

Data hiding technique (seganography or information hiding) has become an important research content in the field of information security. The up-to-date information hiding is that the important data or secret information is embedded into some media such as images, videos or audios without introducing perceptual distortion. After receiving the media embedded the secret information, the receiver extracts the information by the corresponding key and algorithm. Because the information quantities of uncompressed video are big so the videos have to be compressed in order to save transmission bandwidth and storage space. The most famous compressing and coding standards are MPEG-X (X=1,2,4) and H.26X (X=1,2,3,4), the information hiding algorithms on those standards are called digital video or compressed video algorithms. The digital video has become an important information hiding medium because of its big signal capacity and extended applications range. Up to now, there are many techniques for embedding the secret information into digital video. The steganography in digital video can choose different position to embed the secret information, for example, the secret information is added to the DCT coefficients, the information is embedded in the motion vectors, etc. The algorithms based on the motion vectors select the appropriate motion vector first and then embed the secret information into the amplitude or phase. Jordan et al propose information hiding in digital video using INTER-frame [1]. They select the inter frames in MPEG video sequences, and regularize the motion vectors into a modified sequences.

S = {MV0 , MV1 ,

, MVn −1} , |S|=n

2 2 ( MViV + MViH ) ≥ T (0 ≤ i < n) , where MViH and MViV is

respectively the horizontal and vertical components of the

978-0-7695-3336-0/08 \$25.00 © 2008 IEEE DOI 10.1109/CSSE.2008.359

822

We only modify one motion vector once. either motion vector must be attributed to one of the two sectors. if MV1 and MV3 need to be modified synchronously. then go to Step (5).180°). 180° <| Φ 2i − Φ Let MSE2i = MSE between B∗ 2i and B p 2i .270°) attribute to one sector set. For example. but the method_second uses fixed right-angled coordinate system.270°). Let p MSE2i +1 = MSE between B∗ (2i +1) and B p (2i +1) . four sectors (0°. MV2i+1 is replaced with MV2∗i +1 . this method restricts the searching area and makes the difference between the optimal vector and the original vector increase. then the phase of MV2 must be satisfied with the two conditions of MV1 and MV3 synchronously. (6) If the embedding process is not completed. and 2 bits secret information are embedded in per group. otherwise.90°) and (180°. 823 . That is showed in Figure 1. 360°) into two sectors and the two sectors express respectively data “0” and “1”. if 180° <| Φ 2i − Φ 2i +1 |≤ 360° then the data bit is 1. Reference [3] has done the experiment and proved that the sixteen sectors improves PSNR approximate 2. ∗ prediction block B∗ 2i with MV2i in the reference frame. MV2 . (4) Compute the phase angle of each motion vector in S: Φ i = arctan ( MViV MViH ) (5) Get a pair of motion vectors MV2i and MV2i +1 (0≤i≤[n/2]) from S in a sequential order. the both motion vectors are not changed. MV2i+1 is replaced with MV2∗i +1 . another is that the computation and replacing amount of the motion vectors is big. we only modify MV2 to satisfy the corresponding relation. if MV2 needs to be modified but MV1 and MV3 are fixedness. When the embedded data match with the phase information of the motion vector. |≤ 360° . Our algorithm can improve the utilizing efficiency of the media but cannot solve the problem that the motion vectors modification amount is too big. The method_first and method_second respectively adopt different set of coordinates. The circle can be segmented into more sectors and every sector denotes different embedded bits respectively. so we introduce matrix encoding to improve the performance of the algorithm. the new motion vectors ∗ MV2i and MV2∗i +1 are searched for the (2i)-th and (2i+1)-th macroblocks such that 180° <| Φ − Φ 2i +1 |≤ 360° . (b) If data bit is 1. where the p prediction block B p 2i with MV2i in the reference frame. where the p prediction block B p (2i +1) with MV2i +1 in the reference frame. Per three sequential motion vectors that are satisfied with the amplitude conditions are segmented into a group. III. ii) If 0° <| Φ 2i − Φ 2i +1 |≤ 180° . If (MSE2i<MSE2i+1) then MV2i is replaced with MV2i . (270°. the two algorithms only search an optimal MV2∗ in the shadow section of Figure 1 to substitute MV2 . (180°. we search one optimal motion vector in another sector to replace the original motion vector. where the p prediction block B p (2i +1) with MV2i +1 in the reference frame. MV3 are in one group. Let p MSE2i +1 = MSE between B∗ (2i +1) and B p (2i +1) . From the figure we can obviously see that the searching area has been decreased.motion vector MVi . the prediction block B∗ (2i +1) with MV2∗i +1 in the reference p ∗ frame.90°). The vertical coordinate axis of the method_first is the motion vector that is not changed. where (0°. MV1 . In order to solve the above disadvantages we proposes an algorithm based on the phase of the motion vector (method_second). 0° <| Φ − Φ 2i +1 |≤ 180° and 0° <| Φ 2i − Φ |≤ 180° . where the p prediction block Bp2i with MV2i in the reference frame. otherwise. (a) If data bit is 0. (7) The extraction process of the secret information: if 0° <| Φ 2i − Φ 2i +1 |≤ 180° then the secret data bit is 0. THE ALGORITHM BASED ON THE PHASE OF THE MOTION VECTOR There are two disadvantages in the method_first: one is that 1 bit secret data is embedded in two motion vectors so the utilizing efficiency of the media is lower. (90°.360°). | MV2∗i +1 |≥ T ∗ 2 i +1 . go to Step (1) to process the next inter frame. Matrix encoding is a circulation encoding technique. ∗ 2i | MV2∗i |≥ T and ∗ 2 i +1 | MV2∗i +1 |≥ T . for example. then the motion vector is not changed. ii) If 180° <| Φ 2i − Φ 2i +1 |≤ 360° the new motion vectors MV2∗i and MV2∗i +1 are searched for the (2i)-th and (2i+1)-th macroblocks ∗ 2i The above two sectors data hiding algorithm for embedding 1 bit in the phase angle of a pair of motion vectors can be extended to multi-sectors.5dB comparing with the two sectors. otherwise. In the method_first. The matrix encoding of the method_first in four sectors is showed in Figure 2. the two conditions are considered: i) If 0° <| Φ 2i − Φ 2i +1 |≤ 180° the both motion vectors are not changed. the two conditions are considered: i) If 180° <| Φ 2i − Φ 2i +1 |≤ 360° . such that | MV2∗i |≥ T . it can improve the information embedding efficiency. ∗ prediction block B∗ 2i with MV2i in the reference frame. Let MSE2i = MSE between B∗ 2i and B p 2i . the prediction block B∗ (2i +1) with MV2∗i +1 in the reference p ∗ frame. We also segment circle (0°. otherwise. If (MSE2i<MSE2i+1) then MV2i is replaced with MV2i . When MV2 needs to be changed.

i) If Q1⊕Q2=0 and Q2⊕Q3=0. 360°) into sixteen sectors. MVi+1. ii) If Q1⊕Q2=1 and Q2⊕Q3=0. then MVi + 2 is modified into another phase sector. ii) If Q1⊕Q2=1 and Q2⊕Q3=0. we make a series of experiments. EXPERIMENT RESULTS ANALYSIS To test the performance of the algorithms. ii) If Q1⊕Q2=1 and Q2⊕Q3=0. otherwise. then MVi is modified into another phase sector. Q3 express respectively the embedded data of motion vectors MVi. then MVi +1 is modified into another phase sector. MVi+2. MVi+1. Q2. (c) If embedded data are “10”. then MVi is modified into another phase sector. MVi+2 in S are segmented into a group. i) If Q1⊕Q2=0 and Q2⊕Q3=0. iii) If Q1⊕Q2=0 and Q2⊕Q3=1. then MVi is modified into another phase sector. For our algorithm we embed a random sequence of the secret information into P frame of the tested video and choose “IPPP” encoding. iv) If Q1⊕Q2=1 and Q2⊕Q3=1. ii) If Q1⊕Q2=0 and Q2⊕Q3=1. iv) If Q1⊕Q2=1 and Q2⊕Q3=1. iv) If Q1⊕Q2=1 and Q2⊕Q3=1. then every motion vectors are not changed. Q1. then MVi +1 is modified into another phase sector. (d) If embedded data are “11”. we consider four conditions as below: iii) If Q1⊕Q2=0 and Q2⊕Q3=1. Figure 2. The matrix encoding of the method_first (a) The method_first (b) The method_second Figure 1. The set of coordinates of the two algorithms The process of our algorithm can be written as follows. In the simulations we compare the performances of the two algorithms. iii) If Q1⊕Q2=0 and Q2⊕Q3=1. so the value of Qi is “0” or “1”. then every motion vectors are not changed. where sign “⊕” denotes the “exclusive or” operator. go to Step (1) to process the next inter frame. then every motion vectors are not changed. then MVi + 2 is modified into another phase sector. then MVi + 2 is modified into another phase sector. (5) The sequential three motion vectors MVi. Step (1) to Step (4) are the same with that of the method_first. (b) If embedded data are “01”. iii) If Q1⊕Q2=1 and Q2⊕Q3=0. then MVi + 2 is modified into another phase sector. iv) If Q1⊕Q2=1 and Q2⊕Q3=1. and the same simulation conditions are used for the two algorithms to allow fair comparison. we consider four conditions as below: i) If Q1⊕Q2=0 and Q2⊕Q3=0. Q2⊕Q3 and can easily get the embedded secret information. 824 . In the experiment. then go to Step (5). then MVi +1 is modified into another phase sector. (6) If the embedding process is not completed. then MVi is modified into another phase sector. VI. the two methods are applied to the MPEG-2 digital video stream and we segment circle (0°. (7) The extraction of the secret information: we only compute the value of Q1⊕Q2. then MVi +1 is modified into another phase sector. then every motion vectors are not changed. we consider four conditions as below: i) If Q1⊕Q2=0 and Q2⊕Q3=0.

The test conditions are Football video sequences. Hunan Province. The [4] [5] 825 . IEEE Trans image Process.7(1):l6—22 [2] Figure 4. Zhang Tao. Our algorithm can be applied to compressed videos such as MPEG-X (X=1. 3. ACKNOWLEDGMENT This work was supported by the Key Item of Science and Technology Program of Xiangtan City. In the third experiment we compare the signal-to-noise ratio (PSNR) of the two algorithms. Greece. 1997 Xu Changyong. CONCLUSION Figure 3. The motion vector modification rate comparison [3] Because the two algorithms are materially the same in modifying the single motion vector. From it we can see that our algorithm improves the embedding capacity about 15%. From it we can see that our algorithm can improve PSNR about 2dB. From it we can see that our algorithm can decrease the motion vectors modification rate about 10%. A new diamond search algorithm for fast block matching motion estimation[J]. Steganography in Compressed Video Stream. 2. IEEE Trans Multimedia. StockhoLm: ISO/IEC. REFERENCES [1] Kutter M. The experimental results show that our algorithm not only can embed large amounts of the secret information into a video but also can maintain good video quality. The simulation result is showed in Figure 4. 4) or H. The result of this simulation is showed in Figure 3. Information and Control[C]. IEEE Society Press. Data Hiding For Digital Video with Phase of Motion Vector. China (No. The embedding capacity comparison In the second simulation we compare the motion vectors modification rate of the two algorithms.2005. Proc of International Conference on Innovative Computing. then the lower MV modification rate can directly improve the quality of the video embedded the secret information. Here we chiefly compare the relation between the PSNR and the number of embedded data bits. Proc of International Symposium on Circuit and Systems (ISCAS)[C]. Chang Longwen. simulation result is showed in Figure 5. In the algorithm the sequential three motion vectors are segmented into a group and 2 bits data are embedded in per group. once only one motion vector is modified at most so that the MV modification rate is decreased and the embedding efficiency is improved. IEEE Society Press.26X (X=1. Proposal of a watermarking technique for hiding/retrieving data in compressed and decompressed video [R]. we define the motion vectors (MV) modification rate as below: MV modification rate = the number of modified MV the number of embedded data bits The test conditions are 20 groups random sequences of Stefan video. 2006:1422-1425 Zhu S. China. Ebrahimi T. Jordan F.9(2):287—290 Cheung C H.In the first simulation we compare the embedding capacity of the two algorithms. Mak K. 2. 4) and can be compatible with other types of data hiding algorithms. Po L M. We propose a new steganographic algorithm based on the phase of the motion vector in this paper. The simulation conditions are T=10 and the video signals are the sequential eight P frames of Stefan video. ZJ20071008). Figure 5. Ping Xijian. 2006: 269-272 Fang Dingyu. Novel cross-diamond-hexagonal search algorithms for fast block motion estimation[J].2000. The PSNR comparison V.