[0059] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0060] Such as Image 6 As shown, the present invention provides a compression domain video watermark embedding method based on visually sensitive blocks, including the following steps:
[0061] (1) Perform scrambling encryption on the binary watermark sequence to obtain the encrypted binary watermark sequence (such as Figure 4 Shown);
[0062] Specifically, the scrambling encryption method used in this step can be the Arnold transformation method, Fibonacci transformation encryption algorithm, Hilbert curve transformation encryption algorithm, affine transformation encryption algorithm, or magic square transformation encryption algorithm, etc.;
[0063] The binary watermark sequence mentioned in this step is the {0, 1} sequence.
[0064] (2) Obtain the visually sensitive block of the last frame in each group of pictures (GOP) of the video, and use the video saliency region detection method based on the compressed domain to correct the visually sensitive block to obtain The macro block to be embedded in the watermark;
[0065] Specifically, the compression domain-based video saliency region detection method used in this step is Compressed-domain correlates of human fixations in dynamic scenes (Compressed-domain correlates of human fixations in dynamic scenes).
[0066] This step specifically includes the following substeps:
[0067] (2-1) Obtain the last frame in each GOP of the video;
[0068] (2-2) Set the counter i=1, and initialize the non-zero number NNZ in the quantized transformed residual coefficient (Quantized transformed residual, QDCT) of the i-th macroblock with a size of 16*16 in the last frame i And energy factor EN i Are equal to 0;
[0069] (2-3) Judge whether the counter i is greater than or equal to the total number of 16*16 macroblocks in the last frame, if yes, go to step (2-14), otherwise go to step (2-4);
[0070] Specifically, the total number of macroblocks with a size of 16*16=the size of the last frame/(16*16).
[0071] (2-4) Set the counter j=1;
[0072] (2-5) Determine whether the counter j is greater than or equal to 16, if yes, go to step (2-13), otherwise go to step (2-6);
[0073] The purpose of this step is to traverse the 16 4*4 sub-macroblocks included in each macroblock with a size of 16*16;
[0074] (2-6) Set the counter k=1;
[0075] (2-7) Determine whether the counter k is greater than or equal to 16, if yes, go to step (2-11), otherwise go to step (2-8);
[0076] The purpose of this step is to traverse the 16 QDCTs included in each sub-macro block with a size of 4*4;
[0077] (2-8) Get the k-th QDCT in the j-th 4*4 sub-macroblock in the i-th 16*16 macroblock k , And judge whether it is not equal to 0, if it is not equal to 0, go to step (2-9), otherwise go to step (2-10);
[0078] (2-9) Set the non-zero number NNZ in QDCT i =NNZ i +1, energy factor EN i =EN i +|QDCT k |;
[0079] (2-10) Set the counter k=k+1, and return to step (2-7);
[0080] (2-11) Set the counter j=j+1, and return to step (2-5);
[0081] (2-12) Set the counter i=i+1, and return to step (2-3);
[0082] (2-13) According to the number of non-zero NNZ in the QDCT of the i-th macroblock with a size of 16*16 i And energy factor EN i Calculate the information amount M of the i-th 16*16 macroblock i , M i =Norm(NNZ i +EN i +NNZ i ⊙EN i ), where Norm() represents the normalization operation, and A⊙B represents the multiplication of the corresponding bits of the matrices A and B, and returns to step (2-12);
[0083] (2-14) Take out the amount of information M from all the 16*16 macroblocks in the last frame i All macroblocks equal to 1 constitute visually sensitive blocks (such as figure 1 Shown);
[0084] (2-15) Use the compression domain-based video saliency region detection method to process the last frame to use the motion vector of the last frame to obtain the moving target mark map (such as figure 2 Shown), and filter the multiple visually sensitive blocks obtained in step (2-14) according to the moving target label map, so as to obtain multiple visually sensitive blocks after screening (such as image 3 (Shown) as the macro block to be embedded in the watermark;
[0085] Specifically, the screening process in this step is to retain the multiple visually sensitive blocks obtained in step (2-14) that are located in the moving target marking map, and to remove the visually sensitive blocks located outside the moving target marking map. Block deletion.
[0086] (3) According to step (2), the first alternating current (Alternating current, abbreviated AC) coefficient of the 4*4 size sub-macro block located in the first row and the first column of the macro block to be embedded in the watermark is obtained in step (1) The encrypted binary watermark sequence is embedded in the macro block to obtain the watermarked video;
[0087] This step includes the following substeps:
[0088] (3-1) Set the counter m=1;
[0089] (3-2) Determine whether the counter m is greater than the total length Length of the encrypted binary watermark sequence in step (1), if it is, the process ends, otherwise go to step (3-3);
[0090] (3-3) Set counter n=1;
[0091] (3-4) Determine whether the counter n is greater than the total number of macroblocks to be embedded in the watermark obtained in step (2), if so, the process ends, otherwise, go to step (3-5);
[0092] (3-5) Take the nth macroblock from the macroblock to be embedded in the watermark obtained in step (2), and determine the size of the 4*4 sub-macroblock located in the first row and first column of the nth macroblock The first AC coefficient AC 1 Whether it is greater than or equal to 0, if yes, go to step (3-6), otherwise go to step (3-9);
[0093] Such as Figure 5 As shown, it shows the scanning sequence diagram of 4*4 size sub-macro blocks.
[0094] (3-6) Determine whether the m-th watermark value in the encrypted binary watermark sequence in step (1) is equal to 1, if yes, go to step (3-7), otherwise go to step (3-8);
[0095] (3-7) Set AC coefficient AC 1 =AC 1 +1, and return to step (3-2);
[0096] (3-8) Set AC coefficient AC 1 =-AC 1 +1, and return to step (3-2);
[0097] (3-9) Determine whether the m-th watermark value in the encrypted binary watermark sequence in step (1) is equal to 1, if yes, go to step (3-10), otherwise go to step (3-11);
[0098] (3-10) Set AC coefficient AC 1 =-AC 1 -1, and return to step (3-2);
[0099] (3-11) Set AC coefficient AC 1 =AC 1 -1, and return to step (3-2);
[0100] The above steps (3-7), (3-8), (3-10) and (3-11) process are to embed the watermark on the macro block.
[0101] Such as Figure 7 As shown, the present invention provides a compression domain video watermark extraction method based on visually sensitive blocks, including the following steps:
[0102] (1) Obtain the visually sensitive block in the last frame of each GOP of the embedded watermark, and use the video saliency region detection method based on the compressed domain to correct the visually sensitive block to obtain multiple watermarks to be extracted Macroblock
[0103] Specifically, this step is exactly the same as the process of step (2) in the above watermark embedding process, and will not be repeated here.
[0104] The decoding method used in this step corresponds to the type of video. If the video is in the H.264 format, the corresponding decoding method is the H.264 decoding method.
[0105] (2) For the first macroblock to be watermarked obtained in step (1), determine the first AC coefficient AC of the 4*4 size sub-macroblock located in the first row and first column 1 Whether it is greater than or equal to 0, if yes, go to step (3), otherwise go to step (4);
[0106] (3) Set the watermark value corresponding to the macro block in the binary watermark ciphertext to 1;
[0107] (4) Set the watermark value corresponding to the macroblock in the binary watermark ciphertext to 0;
[0108] (5) For the remaining macroblocks to be extracted from the watermark obtained in step (1), repeat the above steps (2) to (4) to obtain a complete binary watermark ciphertext;
[0109] (6) Perform inverse scrambling and decryption on the complete binary watermark ciphertext obtained in step (5) to obtain a binary watermark sequence;
[0110] The inverse scrambling decryption method used in this step is the inverse algorithm corresponding to the scrambling encryption method in step (1) in the watermark embedding process.
[0111] Experimental results and analysis
[0112] 1. The performance of binary watermark information obtained after the watermark extraction process:
[0113] Table 1
[0114]
[0115] Table 1 above is the watermark error rate (ie Error Rate, ER for short) under the compression of different quantization parameters of the present invention. By selecting three different sequences of video Stefan, library (hall), and news (news), the first The second use is to compress and embed the watermark when QP=20, and re-compress when QP=16,17,18,19,20,21,22,23 to propose a watermark. The video with embedded watermark is compressed every time The error rate of the watermark extracted in the process is used to judge the robustness of the existing watermarking method. From the table, it can be judged that under different quantization and recompression, the proposed watermark has better robustness and no information is lost. It can satisfy the protection and effective transmission of embedded watermark information.
[0116] 2. Video quality performance after watermark is embedded:
[0117] (1) Peak noise signal ratio (PNSR)
[0118] Table 2
[0119]
[0120] Table 2 above is the PSNR of the watermarked video compressed under different quantization parameters of the present invention. Table 2 selects three different video sequences of video Stefan (Stefan), library (hall), and news (news) as examples. The peak signal-to-noise ratio of the video is calculated after the video is embedded with watermark and different QP recompression. It can be seen from the data in Table 2 that by using the method of the present invention, the embedded watermark has little impact on the quality of the video, which is hardly noticeable by the human eye, and has robustness. The present invention can better meet the needs of practical applications.
[0121] (2)Structural similarity index (SSIM)
[0122] table 3
[0123]
[0124] Table 3 above is the SSIM of the watermarked video compressed under different quantization parameters of the present invention. Table 3 selects three different video sequences of Stefan, Hall, and News as examples. By recording the SSIM value of the video frame in each compression process, it is judged that the video has been embedded in the watermark for many times. Different QP compression screen damage degree. From the data in Table 3, it can be seen that the video quality of the video embedded with the watermark in the method of the present invention is relatively slowly damaged during multiple compression processes, which can meet the protection of video quality.
[0125] Those skilled in the art can easily understand that the above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement and improvement, etc. made within the spirit and principle of the present invention, All should be included in the protection scope of the present invention.