Chapter 4 Authentication of Surveillance Videos by Hiding Tree-Structured
4.2 Generation of Authentication Signals
In this section, the proposed technique for composition of authentication signals is described. In Section 4.2.1, the principle is described first, and in Section 4.2.2, the proposed process for generation of authentication signals is presented.
4.2.1 Principle of Authentication Signal Generation
In this study, a frame group is treated as a unit for authentication. Therefore, each frame group G of an input video has its own authentication signals which comprise two parts. The first part is the index of G which is used to detect temporal tampering. The second part is tree structured macroblock decomposition information T of the motion regions of a P frame within G, which is selected randomly by a key.
Since surveillance videos usually contain some suspicious activities in motion regions, we use the motion regions to generate the authentication signals. More specifically, we record T and quantify it to form a string I. Then, I together with the index of G comprise the authentication signals Sb. Finally, Sb is embedded into the I frame of G for the authentication use.
4.2.2 Process for Generation of Authentication Signals
In Chapter 2, we have reviewed the tree structured motion compensation technique of the H.264 standard. A 16×16 macroblock can be partitioned by one of the following ways: one 16×16 macroblock partition, two 16×8 partitions, two 8×16 partitions, and four 8×8 partitions. If the 8×8 macroblock partition mode is chosen,
each of the four 8×8 sub-macroblocks in the macroblock may be further partitioned in four ways: one 8×8 sub-macroblock partition, two 8×4 sub-macroblock partitions, two 4×8 sub-macroblock partitions, and four 4×4 sub-macroblock partitions.
Therefore, a macroblock partition mode and four sub-macroblock partition modes are used to describe the partition of a 16×16 macroblock in the H.264 standard.
Besides the index of a frame group G, we also need the tree structured macroblock decomposition information T of a P frame within G, which is selected randomly, to generate the authentication signals. Specifically, we select one of the P frames Fp in G and perform the motion detection algorithm introduced in Chapter 3 to Fp to obtain a set of the motion regions, R, in it. For each 16×16 macroblock M of each region Ri of R, denote its macroblock partition mode as Pm. If Pm is a large partition mode except for the 8×8 macroblock partition, we use the bit 0 to represent M. If Pm is the 8×8 macroblock partition and each sub-macroblock partition mode of M is the 8×4, 4×8 or 4×4 mode, we use the bit 1 to represent M. If Pm is the 8×8 macroblock partition mode and all the sub-macroblock partition modes of M are the 8×8 sub-macroblock partition modes, then we treat M as a special case which will be described later.
Next, we form a binary string S′ with a pre-defined length LT to represent the tree structured macroblock decomposition information of Ri by assigning each macroblock a representing bit in the above-mentioned way. We then combine S′ with the binary form Gb of the index of G and the binary form Rib of the coordinates of Ri to compose a binary string Si with length LR which is the sum of the value of LT, the length of Gb
and the length of Rib. Moreover, we call Si the region signal of Ri. Finally, we combine all region signals of R to produce the authentication signals Sb of G. The following algorithm describes the details of the above-mentioned process.
Algorithm 4.1. Process for generating authentication signals.
Input: a frame group G in a video, a secret key K, and a random number generator f.
Output: authentication signals Sb to be embedded.
Steps:
1. Use the input secret key K as a seed for f and use f to generate a sequence of random numbers, Q.
2. Select randomly a P frame Fp in G according to Q.
3. Perform the motion detection process (Algorithm 3.1) to Fp to obtain a set of the motion regions R in Fp.
4. For each region Ri within R, perform the following steps.
4.1 For each 16×16 macroblock M in Ri, perform the following steps.
4.1.1 Denote the macroblock partition mode of M as Pm and the sub-macroblock partition mode as Ps.
4.1.2 If Pm is the 16×16, 16×8, or 8×16 mode, Mark M as a large partition macroblock.
4.1.3 If Pm is the 8×8 mode and each Ps of M is 8×4, 4×8, or 4×4 mode, Mark M as a small partition macroblock.
4.1.4 For the case that both Pm and Ps are the 8×8 mode, decide that M is a large partition macroblock or a small partition macroblock according to the following rules.
4.1.4.1 Evaluate the partition score of M according to the following rules.
4.1.4.1.1 Name the eight neighboring macroblocks as A through H, as depicted in Figure 4.4.
4.1.4.1.2 Define the macroblock gain Gi for each of A through H in the following way.
(1) For A, B, C, and D, if Pi is the 8×8 mode, set the value of Gi to 1; otherwise, to 0.
(2) For D, E, F, and H, if Pi is the 8×8 mode, set the value of Gi to 0.5; otherwise, to 0.
4.1.4.1.3 Calculate the partition score according to the following equation:
4.1.4.2 If the partition score is larger than a pre-defined threshold T, mark M as a large partition macroblock; otherwise, as small.
4.1.5 If M is a large partition macroblock, set B(M) to 1; otherwise, to 0.
4.2 For each Ri, select LT 16×16 macroblocks M1 through ML, each denoted as Mi, and combine all B(Mi) to form a binary string S′, where LT is a
pre-defined length of signals. If the total number of macroblocks in Ri is smaller than LT, allow repetition of using macroblocks in Ri.
4.3 Transform the coordinate information of Ri into the binary form and combine it with S′ to form a new binary string Si. macroblock; otherwise, a small one. A partition score is calculated for M based on the
eight neighboring macroblocks to decide which case M belongs to. The macroblocks which are in direct contact with M (macroblocks A, B, C, and D in Figure 4.4) have much influence on M than macroblocks E through H.
The case that the macroblock partition mode is 8×8 and the sub-macroblock