Robust video watermark embedding method combined with error correction coding

By introducing error correction encoding and adaptive embedding strategies in video watermark technology, the problem of insufficient watermark robustness in the existing technology is solved, and the reliable extraction of watermarks under compression, transcoding and malicious attacks and the stability of video code streams is realized. sex.

CN119135921APending Publication Date: 2024-12-13GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410859631.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing digital video watermarking technology shows low robustness in the face of compression, transcoding, cropping and other processing, and it is difficult to ensure the integrity and invisibility of watermark bits, especially in the case of malicious attacks.

Method used

Combined with error correction coding technology, the watermark embedding position and intensity are adaptively adjusted according to the complexity of the video picture, and error correction coding is performed during the watermark embedding process to ensure that the watermark bits can be automatically detected and corrected, and the watermark is robust. Sex and invisibility.

Benefits of technology

It effectively solves the bit misalignment problem of watermark bits during extraction, ensures the integrity and reliable extraction of watermarks, enhances the survivability of watermarks in harsh environments, and maintains the stability and fluency of video streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135921A_ABST
    Figure CN119135921A_ABST
Patent Text Reader

Abstract

The invention relates to a robust video watermark embedding method combined with error correction coding, which is characterized in that firstly, the embedding position and strength of a watermark are adaptively adjusted according to the complexity of a video picture, the invisibility of the watermark is ensured by the adaptability, and the robustness of the watermark in various scenes is improved; the visual distortion of the video is avoided; secondly, performing error correction coding processing on watermark information in a watermark embedding process so as to automatically detect and correct a bit dislocation problem caused by compression, transmission or hostile attack during watermark bit extraction; and finally, embedding the watermark into the original video according to the watermark embedding algorithm logic. According to the method, the watermark is embedded in a self-adaptive manner according to the picture complexity, so that the problem of bit dislocation during extraction of watermark bits is solved, and good invisibility of the watermark and good stability of a code stream are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of digital video processing and information security, and in particular relates to a robust video watermark embedding method combined with error correction coding. Background Art

[0002] As digital video applications become a common phenomenon, the importance of ensuring the security and integrity of video content is increasing. In this context, watermarking technology, as an effective means of protecting digital content, has received widespread attention and research. Since video signals are generally transmitted and stored in a compressed form, video watermarking algorithms usually need to consider compression algorithms. There are two commonly used technical routes: non-compressed domain video algorithms (such as the least significant bit (LSB) replacement method) and compressed domain video watermarking algorithms (such as DCT domain watermarking algorithms). The former embeds the watermark in the original video (non-compressed video). For robust watermarks, being able to resist subsequent video compression is a basic performance requirement. The latter integrates the embedding of the watermark into the video compression process, which is usually referred to as "embedding while compressing"; in this case, the watermark is usually extracted during the decoding process. The reason why late compression domain watermarking has become mainstream is mainly because it has significant advantages in computational efficiency, video quality maintenance, robustness, security, and compatibility with modern video processing and transmission methods. These advantages make compressed domain watermarking more attractive in practical applications. Early compression domain video watermarking algorithms (such as motion vector embedding or DCT coefficient embedding) usually choose motion vectors or residual coefficients after discrete cosine transform as the location for watermark embedding. The former is a common choice for fragile watermarking algorithms, while the latter is the main direction of robust watermarking research. However, traditional digital video watermarking technology often shows low robustness when facing compression, transcoding, cropping and other processing. For example, the following existing technologies:

[0003] 1) Li et al. proposed a semi-fragile video watermarking algorithm (Li C, Yang Y, Liu K, et al. A Semi-Fragile Video Watermarking Algorithm Based on H.264 / AVC[J]. Wireless Communications and Mobile Computing, 2020, 2020: 1-11. DOI: 10.1155 / 2020 / 8848553.)

[0004] 2) Zhang et al. proposed a deep video watermarking framework (REVMark) (Yulin Zhang, Jiangqun Ni, Wenkang Su, and Xin Liao. 2023. A Novel Deep Video Watermarking Framework with Enhanced Robustness to H.264 / AVC Compression. In Proceedings of the 31st ACM International Conference on Multimedia (MM'23). Association for Computing Machinery, New York, NY, USA, 8095–8104. https: / / doi.org / 10.1145 / 3581783.3612270)

[0005] 3) Wang et al. enhance robustness to distortion by introducing distortion layers or using complex distortion modeling (Li, Y., Wang, X., Zhang, H., & Zhao, J. (2021). DVMark: A Deep Multiscale Framework for Video Watermarking. arXiv preprint arXiv:2104.12734. Retrieved from https: / / arxiv.org / abs / 2104.12734)

[0006] 4) Thomas et al. optimized the rate-distortion problem in video coding, especially the method used in the H.264 / AVC standard (VAChouliaras and J.Nunez, "Scalar coprocessors for accelerating theG723.1 and G729A speech coders," in IEEE Transactions on Consumer Electronics, vol.49, no.3, pp.703-710, Aug.2003, doi:10.1109 / TCE.2003.1233807.). Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention provides a robust video watermark embedding method combined with error correction coding. The method embeds the watermark adaptively according to the complexity of the picture, solves the problem of bit misalignment when the watermark bits are extracted, and ensures good invisibility of the watermark and good stability of the code stream.

[0008] In order to achieve the above object, the present invention provides a robust video watermark embedding method combined with error correction coding, which is implemented by the following technical solutions:

[0009] The first step is to adaptively adjust the embedding position and strength of the watermark according to the complexity of the video. This adaptability not only ensures the invisibility of the watermark, but also improves the robustness of the watermark in various scenarios to avoid visual distortion of the video.

[0010] The second step is to perform error correction coding on the watermark information during the watermark embedding process to automatically detect and correct the bit misalignment caused by compression, transmission or malicious attacks when the watermark bits are extracted;

[0011] Finally, the watermark is embedded into the original video according to the logic of the watermark embedding algorithm.

[0012] As a further improvement of the above solution, during the process of embedding the watermark into the original video, the watermark embedding algorithm logic will control the change of the bit stream through the algorithm logic to avoid the decoding difficulty problem caused by the increase in bit rate due to the watermark embedding.

[0013] The present invention first adaptively selects the watermark embedding position and strength according to the complexity of the video picture. In areas with higher complexity (such as parts containing rich details or dynamic changes), the algorithm can embed more watermark information while maintaining a high level of invisibility. To avoid obvious visual distortion. This adaptive strategy ensures the concealment and stability of the watermark in various scenarios, making it difficult to detect and remove. In order to further improve the robustness of the watermark, this paper introduces error correction coding technology. During the watermark embedding process, the algorithm first performs error correction coding on the watermark information. This processing method can automatically detect and correct bit misalignment problems caused by compression, transmission or malicious attacks when extracting watermark bits. Specifically, when extracting the watermark, error correction coding can effectively restore the damaged or lost watermark bits, thereby ensuring the integrity and reliable extraction of the watermark. In addition to the concealment and robustness of the watermark, the algorithm in this paper also pays special attention to the impact of the embedding process on the stability of the H.264 / AVC bitstream. When embedding the watermark, the algorithm avoids a significant increase in bit rate or decoding difficulties caused by watermark embedding by controlling the changes in the bitstream. This feature ensures that the video can still be transmitted and played smoothly after the watermark is embedded, maintaining the stability and smoothness of the video stream.

[0014] The present invention proposes a robust watermark embedding method for H.264 / AVC combined with error correction coding. By performing error correction coding on the watermark information, the survival ability of the watermark in a harsh environment is enhanced, enabling it to be correctly extracted even after being attacked. Brief Description of the Drawings

[0015] Figure 1 It is the overall framework diagram of the watermark embedding method in the embodiment of the present invention;

[0016] Figure 2 It is the flowchart of watermark embedding in the embodiment of the present invention;

[0017] Figure 3 It is the flowchart of watermark extraction in the embodiment of the present invention;

[0018] Figure 4 It is the binary image of the character "teacher" in the embodiment of the present invention;

[0019] Figure 5 It is the watermark image extracted after recompression of the character "teacher" in the embodiment of the present invention

[0020] Figure 6 It is the comparison diagram of randomly corresponding frames before and after watermark embedding. Detailed Embodiment

[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0022] Refer to Figure 1 、 Figure 2 and Figure 3 A robust video watermark embedding method combined with error correction coding in an embodiment of the present invention is implemented through the following technical solutions:

[0023] In the first step, the embedding position and strength of the watermark are adaptively adjusted according to the complexity of the video picture. This adaptability not only ensures the invisibility of the watermark but also improves the robustness of the watermark in various scenarios to avoid visual distortion of the video;

[0024] In the second step, error correction coding processing is performed on the watermark information during the watermark embedding process to automatically detect and correct bit misalignment problems caused by compression, transmission, or malicious attacks during watermark bit extraction;

[0025] Finally, the watermark is embedded into the original video according to the logic of the watermark embedding algorithm.

[0026] As a further improvement of the above solution, during the process of embedding the watermark into the original video, the watermark embedding algorithm logic will control the change of the bit stream through the algorithm logic to avoid the decoding difficulty problem caused by the increase in bit rate due to the watermark embedding.

[0027] Figure 1 It is the overall framework for embedding and extracting video watermarking algorithms based on the H.264 coding standard. Figure 1 ,The framework starts with the original video and the original watermark. First, the watermark is scrambled to enhance its security. Then, the scrambled watermark is embedded into the original video through the watermark embedding algorithm to generate a watermarked video. The watermarked video is recompressed, and finally the watermark is extracted from the attacked video.

[0028] Grey code scrambling is an important method to improve the security of watermarks. Let the original watermark be a matrix W with a size of n×n. In order to apply Grey code scrambling, we first expand W into a one-dimensional vector w, that is, w=[w1,w2,…,w n2 ]. In this step, each watermark element w i is converted to its corresponding binary representation b i , where bi = [b i1 ,b i2 ,…,b ik ], assuming that each element is represented using k bits of binary data.

[0029] Next, for each binary representation b i , we calculate the corresponding Grey code g i Grey code is a specific binary code in which each value differs from the next by only one bit. ij The calculation formula is as follows:

[0030]

[0031] Among them, ⊕ represents the bitwise XOR operation, b i(j-1) Yes i The previous binary bit of . Through this formula, we convert each binary number into Grey code representation. Then use each Grey code g i Generate a new watermark vector w G ,in Each It is from Grey code i Converted back to decimal, the calculation formula is:

[0032]

[0033] This formula converts each Grey code back into a decimal number to generate new watermark data. Finally, we convert the new watermark vector w G Reorganize it into an n×n matrix, recorded as the scrambled watermark W1. Through this step, we complete the entire conversion process of the watermark from the original form to the Grey code scrambled form.

[0034] Error correction coding technology implements error detection and correction by introducing additional redundant bits, thereby automatically correcting the received erroneous codewords at the destination. The basic principle of this technology is to add multiple redundant codewords to the original information codewords and ensure that these redundant codewords are related to the original information codewords according to certain rules. When an error occurs in the codeword during transmission, that is, the relationship between the redundant bits and the original information codewords is destroyed, the receiving end can use a specific algorithm to detect and correct the error. Typical error correction coding methods include Hamming codes, BCH codes, convolutional codes, etc.

[0035] Compared with other error correction codes, 7-4 Hamming code uses fewer redundant bits to achieve the same error detection and correction capabilities and has higher coding efficiency. Therefore, this paper selects Hamming code as the error correction code of the watermark. Set the watermark matrix after the scrambling to W1, with a size of n×n. For ease of processing, we convert W1 into a one-dimensional vector w1, where: w1 = [w 1,1 ,w 1,2 ,…,w 1,n2 ] (3)

[0036] Each element w 1,i represents a bit or pixel value of the scrambled watermark. Since the 7-4 Hamming code processes 4 data bits at a time and encodes them into 7-bit codewords, we divide the watermark data vector w1 into multiple 4-bit blocks. For the k-th 4-bit block, denoted as d k :d k =[d k,1 ,d k,2 ,d k,3 ,d k,4 ] (4)

[0037] To generate the corresponding 7-bit codeword c k =[c k,1 ,c k,2 ,c k,3 ,c k,4 ,c k,5 ,c k,6 ,c k,7 ], we need to calculate 3 redundant bits p k,1 ,p k,2 ,p k,3 So that:

[0038] p k,1 =dk,1 ⊕d k,2 ⊕d k,4 (5)

[0039] p k,2 =d k,1 ⊕d k,3 ⊕d k,4 (6)

[0040] p k,3 =d k,2 ⊕d k,3 ⊕d k,4 (7)

[0041] Where ⊕ represents a bitwise XOR operation. k The redundant bits p calculated by k,1 ,p k,2 ,p k,3 Combined, we get a 7-bit codeword, denoted as c k :c k =[p k,1 ,p k,2 ,d k,1 ,p k,3 ,d k,2 ,d k,3 ,d k,4 ](8)

[0042] These codewords can form a new coded watermark vector w′, where the 7-bit codewords of each 4-bit data block are arranged in sequence. Since w1 is divided into m 4-bit blocks, we finally get:

[0043] w′=[c1,c2,…,c m ] (9)

[0044] Where m = n 2 / 4, indicating the total number of 4-bit blocks. 2 If it is not a multiple of 4, the last block can be padded with 0 to make it 4 bits. Finally, we reorganize the encoded watermark vector w′ into a matrix form for subsequent processing. The encoded watermark matrix is ​​denoted as W′, and its size is (74×n×n). The encoded watermark W′ adds redundant information compared to the original scrambled watermark W1, thereby improving the robustness of the watermark.

[0045] Reference Figure 2In order to ensure that the watermark can still be detected after the video is compressed, filtered, cropped, etc., and the embedding of the watermark should not significantly affect the visual quality of the video. This algorithm can reduce the impact on high-frequency details by selecting macroblock coefficients with NNZ (number of non-zeros) greater than a certain threshold for embedding, because these details have little impact on visual perception, and realize the algorithm's picture complexity adaptation, thereby maintaining the concealment of the watermark. In this paper, sub-macroblocks with NNZ ≥ 6 in the key frame sub-macroblocks are selected and watermark bits are embedded in the sub-macroblocks.

[0046] When encoding the brightness component of the key frame, select the Intra_4×4 sub-macroblock and calculate the judgment basis of the sub-macroblock's region before encoding each sub-macroblock. Since the content distribution in the video image is usually uneven, some areas may contain more details and motion information, while other areas may be relatively smooth and static. Therefore, the sub-macroblock is divided into three areas to improve the overall coding efficiency. The calculation formula for the sub-macroblock's region is as follows:

[0047] area = mb_address / 3 (10)

[0048] Among them, area represents the number of the current area, mb_address represents the address of the current sub-macroblock. Whenever area changes, it means starting to encode the sub-macroblock of the next area. When area just changes, the embedding strength qd is set to 0 and the element value in the Hamming array is assigned to the temporary variable sy according to the area. sy represents the Hamming watermark bits that need to be embedded in the current area.

[0049] The watermark embedding rules are:

[0050] 1) If the value of sy is equal to 1 and the sum of all non-zero quantization coefficients of the sub-macroblock is an even number, the absolute value of the last non-zero quantization coefficient of the sub-macroblock is increased by 1, and at the same time, the value of qd is increased by 1, otherwise, the encoding of the next sub-macroblock is entered.

[0051] 2) If the value of sy is equal to 0 and the sum of all non-zero quantization coefficients of the sub-macroblock is an odd number, the absolute value of the last non-zero quantization coefficient of the sub-macroblock is increased by 1, and at the same time, the value of qd is increased by 1, otherwise, the encoding of the next sub-macroblock is entered.

[0052] After all regions of the current frame have been embedded with a watermark of a certain strength, the next key frame is embedded with a watermark until all key frames are encoded. At this time, all watermarks with redundant information are embedded, and the watermark embedding is completed. However, in the process of embedding watermarks, there may be a situation where a watermark is not embedded in a certain area because there is no suitable Intra_4×4 sub-macroblock. Therefore, when extracting watermarks, it is necessary to determine whether there are skipped areas and assign bit values ​​to these areas that are not embedded with watermarks through majority voting. The next section 3.3 will explain this issue.

[0053] Reference Figure 3 ,The specific steps of watermark extraction are as follows:

[0054] Step 1: Select the Inter4×4 sub-macroblock whose number of non-zero coefficients (NNZ) in the luminance component of the key frame is greater than or equal to 6 as the sub-macroblock to be extracted.

[0055] Step 2: During the watermark embedding process, there may be a region without a suitable Intra_4×4 sub-macroblock, so the watermark is not embedded in the region. Therefore, before extracting the watermark, it is necessary to determine whether there is a skipped region. By calculating the difference between the current sub-macroblock number and the previous sub-macroblock number, the number of skipped sub-macroblocks can be determined. If the difference is d, it means that d-1 sub-macroblocks are skipped.

[0056] Step 3: Calculate the difference d and the quantization step difference qd, where d is initialized to -1 and qd is initialized to 0. The judgment conditions in the process include checking whether the sub-macroblock is the first sub-macroblock and whether the difference d is greater than 1. If qd is less than 11 and it is not the last key frame, qd will increase; if the current sub-macroblock is not the first sub-macroblock and d is greater than 1, or the current frame is the last key frame, the process will end. If the last key frame is reached, qd will be reset to 0.

[0057] Step 4: Extract the watermark from the current sub-macroblock, including performing majority voting and obtaining valid watermark bits through error correction. This process ensures the robustness of the watermark information and can reliably extract the watermark even after the video has been compressed and other signal processing. The bit extraction rules are as follows:

[0058] (1) If the sum of all non-zero quantized coefficients of the sub-macroblock is an odd number, extract the bit "1".

[0059] (2) If the sum of all non-zero quantized coefficients of the sub-macroblock is an even number, the bit "0" is extracted.

[0060] Reference Figure 4, the experimental platform in this paper is the test model JM19.0 based on the H.264 / AVC standard running on VS2022. The format of the video sequence adopted is the CIF format, the GOP structure is IBB, the quantization parameter is 28, the video frame rate is 30fps, the total number of video frames is 50, and the entropy coding method is CAVLC. The embedded watermark can be any binary sequence. To clearly present the effect of watermark extraction, in this paper's experiment, the binary image of the Chinese character "师" is used as the watermark information to be embedded. This binary image is embedded into each key frame. The binary sequence is generated by reading each pixel of the binary image in raster scan order, and finally, the watermark is scrambled through Gray code transformation to achieve the purpose of encrypting the watermark information. The binary image of the Chinese character "师" is as Figure 4 shown.

[0061] Figure 6 We present visual comparisons of the corresponding frames in the video before and after watermark embedding. Visually, the presence of the watermark cannot be detected. Here, we use PSNR (Peak Signal-to-Noise Ratio) as the objective evaluation basis. PSNR is an important indicator for measuring the quality of images or videos and is usually used to evaluate the quality loss after compression, transmission, or watermark embedding. The higher the PSNR value, the better the quality of the image or video, and the smaller the distortion. Generally speaking, a PSNR value above 30dB is considered to be of good quality, and below 20dB is of poor quality, with serious distortion of the image or video. Table 1 shows the average PSNR values obtained by comparing each frame of the video after watermark embedding with each frame without watermark embedding.

[0062] Table 1 PSNR values

[0063] Table 1 PSNR values

[0064]

[0065] As can be seen from Table 1, compared with the video decoded from the bitstream without watermark embedding, the PSNR value of mobile.yuv is 37.96, the PSNR value of gaoyuan.yuv is 37.02, the PSNR value of bus.yuv is 37.04, the PSNR value of hechang.yuv is 37.33, and the average PSNR value is 37.33. From the test results, the PSNR value of the algorithm in this chapter maintains an appreciable value, and the video has good invisibility.

[0066] Watermark Robustness Test

[0067] This paper conducts a recompression attack on the video embedded with the watermark. The bit error rate (BER), which is the ratio of the number of erroneous bits to the total number of bits, can objectively reflect the degree of information distortion. This paper extracts the watermark of each valid frame after the video is recompressed, and compares all the extracted watermarks with the original watermarks to obtain the BER value. The results are shown in Table 2.

[0068] Table 2 Bit Error Rate

[0069] Table 2 Bit error rate

[0070]

[0071] It is generally believed that after a video is attacked, if the BER value is below 0.25, it indicates that the watermark has good robustness. As shown in Table 2, except for the BER value of hechang.yuv which is slightly higher than 0.25, the BER values ​​of other video sequences are all lower than 0.25. Among them, the BER value of mobile.yuv is only 0.002. Figure 5 This is the effect picture after the watermark is restored to a binary image.

[0072] Depend on Figure 5 The overall outline of the binary image is still recognizable, with some pixel shifts and errors. In the mobile.yuv and bus.yuv videos, the watermark can be accurately extracted, which is due to the large number of texture macroblocks contained in these video frames. The main problem with the watermark images extracted from the hechang.yuv and gaoyuan.yuv videos is the pixel forward shift phenomenon.

[0073] In order to further analyze the robustness of the algorithm proposed in this chapter in watermark extraction, the algorithm document

[28] with excellent robustness and good bit rate growth rate in recent related literature is selected for comparison. The same three video sequences as those in document

[28] , mobile.yuv, tempete.yuv, and waterfall.yuv, are used to compare their bit error rates. According to the experimental settings of document

[28] , a total of 1024 bits of watermark are embedded in each CIF format video sequence, the embedding position is the key frame, the video encoding frame rate is 30 frames per second, and the key frame interval is set to 2 seconds. In the experiment of this chapter, a total of 1258 bits of watermark are embedded in the same video sequence, and key frames are also selected for embedding, keeping the video encoding frame rate and key frame interval consistent with document

[28] . The comparison with document

[30] is shown in Table 3.

[0074] Table 3Comparison of Bit Error Rates

[0075] Table 3 Bit error rate comparison

[0076]

[0077] As shown in Table 3, the algorithm in this chapter makes the watermark have a lower bit error rate after the video is heavily compressed. Compared with the literature

[28] , the algorithm in this chapter makes the watermark have better resistance to heavy compression. This is because the algorithm simultaneously uses majority voting and error correction coding of watermark bits, two methods that can effectively enhance the robustness of the watermark.

[0078] Bit rate growth rate

[0079] The bit rate growth rate (BitIncrease Rate, BIR) reflects the bit rate growth degree of the bit stream after the watermark is embedded. The lower the bit rate growth rate, the smaller the impact on the original bit stream, and the more conducive to video transmission. The formula for the bit rate growth rate is as follows: BIR = (B W -B0) / (C×B0)×100% (11)

[0080] Among them, Bw is the total bit rate of the bitstream after embedding the watermark, Bo is the total bit rate of the bitstream without embedding the watermark, and C is the watermark capacity. The bit rate growth rate is shown in Table 4.

[0081] Table 4 Changes in Bitrate of Bitstream

[0082] Table 4 Changes in bit rate of code stream

[0083]

[0084] In general, the algorithm in this chapter still makes the bitstream have a lower bit rate growth rate, making the bitstream embedded with watermark more compatible.

[0085] In this embodiment, the adaptive watermark embedding strategy dynamically adjusts the embedding position and strength of the watermark according to the complexity of the video screen. Specifically, in areas with higher complexity (such as parts with rich details or fast motion), the algorithm can accommodate more watermark information, and this information is more difficult to detect visually. In smooth or static areas, the amount of watermark embedding is reduced to avoid obvious visual artifacts. This adaptability not only ensures the invisibility of the watermark, but also improves the robustness of the watermark in various scenarios.

[0086] In this embodiment, the error correction coding technology realizes error detection and correction by introducing additional redundant bits, thereby automatically correcting the received erroneous codewords at the destination end. The basic principle of this technology is to add multiple redundant codewords to the original information codewords, and ensure that these redundant codewords are associated with the original information codewords according to certain rules. When an error occurs in the codeword during the transmission process, that is, the relationship between the redundant bits and the original information codewords is destroyed, the receiving end can use a specific algorithm to detect and repair the error. Typical error correction coding methods include Hamming codes, BCH codes, convolutional codes, etc.

[0087] Compared with other error correction codes, 7-4 Hamming code uses fewer redundant bits to achieve the same error detection and correction capabilities and has higher coding efficiency. Therefore, this paper selects Hamming code as the error correction code of the watermark. Set the watermark matrix after the scrambling to W1, with a size of n×n. For ease of processing, we convert W1 into a one-dimensional vector w1, where: w1 = [w 1,1 ,w 1,2 ,…,w 1,n2 ] (3)

[0088] Each element w 1,i represents a bit or pixel value of the scrambled watermark. Since the 7-4 Hamming code processes 4 data bits at a time and encodes them into 7-bit codewords, we divide the watermark data vector w1 into multiple 4-bit blocks. For the k-th 4-bit block, denoted as d k :

[0089] d k =[d k,1 ,d k,2 ,d k,3 ,d k,4 ] (4)

[0090] To generate the corresponding 7-bit codeword c k =[c k,1 ,c k,2 ,c k,3 ,c k,4 ,c k,5 ,c k,6 ,c k,7 ], we need to calculate 3 redundant bits p k,1 ,p k,2 ,p k,3 So that:

[0091] p k,1 =d k,1 ⊕d k,2 ⊕d k,4 (5)

[0092] p k,2 =d k,1 ⊕d k,3⊕d k,4 (6)

[0093] p k,3 =d k,2 ⊕d k,3 ⊕d k,4 (7)

[0094] Where ⊕ represents a bitwise XOR operation. k The redundant bits p calculated by k,1 ,p k,2 ,p k,3 Combined, we get a 7-bit codeword, denoted as c k :

[0095] c k =[p k,1 ,p k,2 ,d k,1 ,p k,3 ,d k,2 ,d k,3 ,d k,4 ] (8)

[0096] These codewords can form a new coded watermark vector w′, where the 7-bit codewords of each 4-bit data block are arranged in sequence. Since w1 is divided into m 4-bit blocks, we finally get:

[0097] w′=[c1,c2,…,c m ] (9)

[0098] Where m = n2 / 4, which indicates the total number of 4-bit blocks. If n2 is not a multiple of 4, the last block can be padded with 0 to make it 4 bits. Finally, we reorganize the encoded watermark vector w′ into a matrix form for subsequent processing. The encoded watermark matrix is ​​denoted as W′, and its size is (74×n×n). The encoded watermark W′ adds redundant information compared to the original scrambled watermark W1, thereby improving the robustness of the watermark.

[0099] The present invention proposes an H.264 / AVC robust watermark embedding algorithm combined with error correction coding, which enhances the survivability of the watermark in harsh environments by performing error correction coding on the watermark information, so that the watermark can still be correctly extracted after being damaged.

[0100] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A robust video watermark embedding method combined with error correction coding, mainly comprising the following steps: The first step is to adaptively adjust the embedding position and strength of the watermark according to the complexity of the video. This adaptability not only ensures the invisibility of the watermark, but also improves the robustness of the watermark in various scenarios to avoid visual distortion of the video. The second step is to perform error correction coding on the watermark information during the watermark embedding process to automatically detect and correct the bit misalignment caused by compression, transmission or malicious attacks when the watermark bits are extracted; Finally, the watermark is embedded into the original video according to the logic of the watermark embedding algorithm.

2. The robust video watermark embedding method combined with error correction coding according to claim 1, characterized in that: In the process of embedding the watermark into the original video, the watermark embedding algorithm logic will control the change of the bit stream through the algorithm logic to avoid the decoding difficulty problem caused by the increase in bit rate due to the watermark embedding.

Citation Information

Cited By

  • Electronic screen content tampering detection system and method based on dynamic watermark

    CN120034702A

  • Watermark endowing method based on video high-concurrency real-time coding and decoding

    CN120602593A

  • Adaptive multi-level digital watermarking method based on coding process optimization

    CN121940550A