Method for resisting robust video watermarking recorded by camera

By introducing a synchronous watermarking mechanism and an image segmentation model for automatic perspective correction in video watermarking, the robustness and automated extraction of watermarks recorded by cameras are solved, achieving efficient watermark extraction and resistance to frame insertion and frame dropping attacks in recording scenarios.

CN120935424APending Publication Date: 2025-11-11UNIV OF ELECTRONICS SCI & TECH OF CHINA ZHONGSHAN INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511252055.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing video watermarking solutions that resist camera recording have difficulty automatically performing perspective correction in recording scenarios, and are not robust enough against frame interpolation and frame dropping attacks, resulting in poor watermark invisibility.

Method used

A synchronous watermarking mechanism is adopted. By preprocessing and grouping video frames, watermarks are embedded using DFT transformation and quadrant division, and automatic perspective correction is performed in conjunction with an image segmentation model to extract synchronous and copyright watermarks.

Benefits of technology

It improves the robustness of watermarks against temporal synchronization attacks in camera recording scenarios, realizes automatic perspective correction and efficient extraction of watermarks, and expands application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935424A_ABST
    Figure CN120935424A_ABST
Patent Text Reader

Abstract

The invention provides a robust video watermarking method capable of resisting camera recording. The method comprises a watermark embedding process and a watermark extraction process. A watermark embedding process: carrying out transform domain processing on a frame sequence of the video, and embedding a synchronous watermark and a copyright watermark on a transform domain coefficient; and a watermark extraction process: carrying out perspective correction on the video recorded by the camera, and extracting the synchronous watermark and the copyright watermark from the corrected transform domain coefficient. According to the method, the position of the copyright watermark is positioned by utilizing the synchronous watermark, so that the capability of resisting video frame insertion and frame loss of the watermark is enhanced, the robustness of resisting time domain desynchronization attack by the watermark can be improved in a recording scene, and meanwhile, manual video alignment is avoided. Compared with the prior art, the method has the advantages that the ability of the system to resist desynchronization attacks is improved by using different types of watermarks, and the robustness of the watermarks is further enhanced by designing a watermark embedding and extracting method on a frequency domain coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robust watermarking technology, and in particular to a robust video watermarking method that resists camera recording. Background Technology

[0002] In recent years, the widespread use of smartphones and other photographic devices has raised significant concerns about protecting multimedia content such as images and videos displayed on computer screens from infringement. To address this issue, copyright information is embedded into the target medium, and then extracted from the medium to verify copyright in the event of a dispute. Video watermarking technology is one such technique, capable of hiding secret information within the video with minimal visual distortion. When a copyright dispute arises, information is extracted from the tagged video to verify the copyright of the video content. Existing robust video watermarking schemes mainly fall into the following categories: spatial domain-based video watermarking, frequency domain-based video watermarking, compression domain-based video watermarking, and deep learning-based video watermarking.

[0003] Frequency-domain-based video watermarking methods typically embed watermark information into the frequency coefficients of the video. Common frequency-domain transform methods include Discrete Cosine Transform (DCT), Discrete Fourier Transform (DFT), Dual-Tree Complex Wavelet Transform (DT-CWT), and Complex Wavelet Transform (DWT). These frequency-domain-based methods balance the concealment and robustness of the watermark by embedding it in different frequency bands. Spatial-domain-based video watermarking methods typically embed watermark information into the pixels of the video frame; these algorithms are less resistant to pixel distortion attacks. Furthermore, compression-domain-based video watermarking methods typically embed watermark information into the parameters of the video compression format, such as MPEG compression; however, these algorithms are easily limited by the compression format. With the rapid development of deep learning technology, more and more researchers are combining deep learning with video watermarking techniques, typically training an end-to-end neural network to perform watermark embedding and extraction. With the increasing prevalence of information leaks caused by camera recordings and screen captures, video watermarking resistant to camera recordings has become a hot research topic. Since recording attacks are a type of watermarking attack involving a combination of distortions such as light distortion, geometric distortion, and temporal distortion, it is necessary to research a sufficiently robust video watermarking scheme to resist camera recordings.

[0004] Currently, some research on video watermarking resisting camera recording utilizes the spatial geometric invariance of feature points to locate the watermark embedding region, achieving good robustness in recording scenarios. Other research embeds the watermark by modulating inter-frame energy, which provides good resistance to recording attacks but struggles against large-scale frame dropping or interpolation attacks. Deep learning-based robust video watermarking resisting camera recording embeds the watermark by constructing an encoder and decoder, and additionally constructs a noise layer to simulate camera recording attacks, achieving good resistance to recording attacks, but the watermark's invisibility is poor. Since most existing video watermarking resistors rely on manually selecting the four corner points of the video for perspective correction, limiting the application scenarios, it is necessary to design a video watermarking method capable of automatically correcting perspective in distorted videos. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a robust video watermarking method that resists camera recording. Through a synchronous watermarking mechanism, this invention can effectively resist frame insertion and frame dropping attacks, and especially in recording scenarios, it greatly improves the robustness of the watermark against temporal synchronization attacks.

[0006] The technical solution of this invention is: a robust video watermarking method resistant to camera recording, comprising the following steps:

[0007] S1) Preprocess the input video sequence;

[0008] S2) Embed synchronous watermarks into the preprocessed video frame sequence;

[0009] S3) Embed copyright watermarks into the preprocessed video frame sequence;

[0010] S4) Perform automatic perspective correction on the input video for the camera recording scene;

[0011] S5) Extract synchronous watermarks and copyright watermarks from the perspective-corrected video.

[0012] More specifically, in step S1), the preprocessing includes the following steps:

[0013] S11) Extract the Y channel of the input video to form a frame sequence, and group the video frames into groups, with each group containing the same number of frames.

[0014] S12) For each group, the frame is divided into two parts. The first part is used to embed a set of synchronous watermarks, and the second part is used to embed a set of copyright watermarks. It is ensured that a set of synchronous watermarks is embedded at the beginning and end of each set of copyright watermarks.

[0015] S13) For each group, take the inscribed square region of each frame for DFT transformation and extract the DFT amplitude spectrum coefficients.

[0016] S14) Divide the DFT amplitude spectrum coefficients into quadrants.

[0017] More specifically, in step S13), the process of selecting the inscribed square region of each frame is as follows: take the center of the Y frame as the center of the square, and take the shortest side length of the Y frame as the side length of the square; after obtaining the inscribed square region of the Y frame, perform DFT transformation on the inscribed square, and extract the DFT amplitude spectrum coefficients for subsequent embedding of synchronization watermark or copyright watermark.

[0018] More specifically, in step S14), the DFT amplitude spectrum coefficients are divided into quadrants, specifically as follows:

[0019] A Cartesian coordinate system is established with the center of the amplitude spectrum as the origin, resulting in four quadrants of the amplitude spectrum. If the current Y-frame is to embed a synchronization watermark, the coefficients of the first and third quadrants of the amplitude spectrum are modulated to embed the synchronization watermark. If the current Y-frame is to embed a copyright watermark, the coefficients of the second and fourth quadrants are modulated to embed the watermark. The same Y-frame cannot embed both a synchronization watermark and a copyright watermark simultaneously.

[0020] More specifically, in step S2), the process of embedding the synchronous watermark includes the following steps:

[0021] S21), through the modulation angle range of The coefficients within the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] are used to embed the synchronous watermark; after modulation, within the same angular range, the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] presents an alternating light and dark ring shape;

[0022] S22) Use coefficient T1 as the synchronization watermark embedding intensity to embed the synchronization watermark into the DFT amplitude spectrum coefficient F. s,i (ρ s ,θ s In the process, the DFT amplitude spectrum coefficients F′ containing the synchronous watermark are obtained. s,i (ρ s ,θ s );

[0023] S23) Perform inverse DFT transformation on the amplitude spectrum and corresponding phase spectrum of the embedded synchronization watermark to obtain the inscribed square block after the synchronization watermark is embedded. Replace the original inscribed square area of ​​the Y channel with the inscribed square frame to obtain the Y channel with watermark, and finally obtain the video frame sequence with synchronization watermark.

[0024] More specifically, in step S22), if the synchronization watermark bit to be embedded is ws,i =1, the expression for synchronous watermark embedding is:

[0025]

[0026] If you want to embed the synchronization watermark bit w s,i If = 0, then the embedding expression for the synchronized watermark is:

[0027]

[0028] In the formula, F′ s,i (ρ s ,θ s ) represents the amplitude spectrum coefficients after embedding the watermark; F s,i (ρ s ,θ s ) represents the original DFT amplitude spectrum coefficients; ρ1={R1,R1+4d}, ρ2=ρ1+d, ρ3={R1+2d,R1+6d}, ρ4=ρ3+d; V h V w These are the height and width of the inscribed square, respectively; d is the width of the ring corresponding to the synchronized watermark.

[0029] More specifically, in step S3), the process of embedding the copyright watermark includes the following steps:

[0030] S31) For the DFT amplitude spectrum to be embedded with a copyright watermark, the angle range is as follows: DFT amplitude spectrum coefficients F with radius range [R2, R2+d] and [R3, R3+d] c,i (ρ c ,θ c Use this to embed the copyright watermark;

[0031] S32) Use coefficient T2 as the embedding intensity of the copyright watermark to modulate the DFT amplitude spectrum coefficient F. c,i (ρ c ,θ c To obtain the watermarked DFT amplitude spectrum coefficients F′ c,i (ρ c ,θ c );

[0032] S33) Perform inverse DFT transform on the DFT amplitude spectrum and its corresponding phase spectrum containing the copyright watermark to obtain the inscribed square block containing the copyright watermark, and finally obtain the Y channel frame containing the copyright watermark.

[0033] More specifically, in step S32), if w c,i If = 1, then the embedding expression for the copyright watermark is:

[0034]

[0035] If w c,i If the value is 0, then the embedding expression for the copyright watermark is:

[0036]

[0037] In the formula, F c,i (ρ c ,θ c F' represents the DFT amplitude spectrum coefficients to be embedded with the copyright watermark; c,i (ρ c ,θ c ) represents the amplitude spectrum coefficients after embedding the watermark; the subscripts c and i represent the current frame embedding the copyright watermark and the i-th frame, respectively; w c,i R1 represents the i-th bit of the copyright watermark sequence; R2 represents the starting radius of the first ring corresponding to the copyright watermark; R3 represents the starting position of the second watermark ring; and d represents the width of the ring corresponding to the copyright watermark.

[0038] More specifically, in step S4), automatic perspective correction is performed on the input video for the camera recording scene; this includes the following steps:

[0039] S41) Use an image segmentation model to fully segment each frame of the input video sequence to obtain a segmented image set;

[0040] S42), For the i-th frame, from its segmented image set D i Select a set of candidate images; and perform rectangle detection and color richness calculation on each candidate image;

[0041] If the largest rectangle detected among all candidate images comes from the image with the highest color richness, then that candidate image is selected as the image of interest; otherwise, the image with the highest color richness is selected as the image of interest.

[0042] S43), Repeat steps S41) and S42) to obtain the images of interest for all frames;

[0043] S44) Remove images of interest whose area is less than half or more than twice the average area of ​​all images.

[0044] S45) Convert the image of interest obtained in step S44) into a grayscale image and superimpose them to obtain a two-dimensional matrix I;

[0045] S46) Set the pixels in the two-dimensional matrix I with pixels less than the coefficient τ to 0, and the pixels with pixels greater than τ to 1, to obtain a two-dimensional matrix with binarization.

[0046] S47) Extract the edges of the video content region obtained in step S46), and perform nonlinear fitting on the four sides of the obtained rectangle to obtain the linear equations corresponding to the four sides.

[0047] S48) Solve the equations of the lines corresponding to the four sides to obtain the coordinates of the four corner points of the video area; and perform perspective correction on the recorded video based on the coordinates of the four corner points of the video area. The corrected video is used for subsequent extraction of copyright watermark and synchronization watermark.

[0048] More specifically, in step S42), the candidate image is D. i Find the m images with the largest area; where the area is calculated by counting the number of non-zero pixels in the image.

[0049] The color richness calculation formula is: μ + α·var(X), where μ is the mean of the pixels; var(X) is the variance of the pixels; and α is an adjustable weighting coefficient.

[0050] More specifically, in step S5), the extraction of the synchronized watermark and copyright watermark includes the following steps:

[0051] S51) Perform DFT on the inscribed square of the Y channel and extract the amplitude spectrum, and set the angle range to... The amplitude spectral coefficients with radii of [ρ1,ρ2] and [ρ3,ρ4] are summed to obtain the summed value E1 = {e 1,1 ,e 1,2}、E2={e 2,1 ,e 2,2};

[0052] S52), based on E1 and E2, we calculate S = {e 1,1 -e 2,1 ,e 2,1 -e 1,2 ,e 1,2 -e 2,2 If S = {0, 1, 0}, then the current frame is considered to contain a synchronization watermark.

[0053] S53) Extract a set of copyright watermarks by extracting frames G whose indexes fall between adjacent synchronous watermark frame group indices;

[0054] S54), based on the copyright watermark length L c Divide G into L equal parts c A segment g i and from fragment g i All the watermark bits extracted are subjected to a majority vote, and finally a set of copyright watermarks can be extracted from G;

[0055] S55) A majority vote is conducted on the watermark bits at the corresponding positions of the multiple sets of copyright watermarks extracted from the input video to obtain the final set of copyright watermarks.

[0056] More specifically, in step S52), the expressions for E1 and E2 are:

[0057]

[0058] S={e 1,1 -e 2,1 ,e 2,1 -e 1,2 ,e 1,2 -e 2,2}

[0059] Among them, e 1,1 e 1,2 e 2,1 e 2,2 These represent the summation of amplitude spectral coefficients with radii ranging from [ρ1, ρ2] to [ρ3, ρ4]. If an element in S is greater than 0, it is mapped to 1; otherwise, it is mapped to 0.

[0060] More specifically, in step S54), from fragment g i The formula for extracting watermark information is:

[0061]

[0062] in, Let w be the amplitude spectral coefficient of the watermark to be extracted. j ′ For fragment g i The watermark information was extracted from a specific frame.

[0063] The beneficial effects of this invention are as follows:

[0064] 1. This invention targets camera recording scenarios, employs an image segmentation model to fully segment the recorded video, and locates the video content area by combining the color features and rectangular region features of the video content; and achieves automatic perspective correction of the video content area by combining methods such as brightness superposition, making the watermark extraction work in camera recording scenarios highly automated.

[0065] 2. This invention extracts the synchronization watermark before extracting the copyright watermark, and locates a range of copyright watermarks by the index of the synchronization watermark. This makes the invention more robust to video temporal attacks, such as frame insertion and frame dropping attacks, while avoiding manual video alignment.

[0066] 3. The present invention utilizes DFT amplitude spectrum coefficients as a watermark embedding carrier, which can further enhance the robustness of the watermark. Attached Figure Description

[0067] Figure 1 This is a schematic flowchart of the method of the present invention;

[0068] Figure 2 This is a flowchart of the method of the present invention;

[0069] Figure 3 This is a schematic diagram of the watermark extraction process of the present invention;

[0070] Figure 4 This is a flowchart illustrating the watermark extraction process of the present invention.

[0071] Figure 5 This is a schematic diagram illustrating the perspective correction of a video based on the coordinates of the four corner points of the video content according to the present invention;

[0072] Figure 6 This diagram illustrates the results of the average structural similarity (MSSIM) and average normalized cross-correlation (NC) values ​​obtained from publicly available video datasets based on different embedding intensities. Detailed Implementation

[0073] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0074] like Figure 1 and 2 As shown, this example provides a robust video watermarking method that resists camera recording, including the following steps:

[0075] S1) Preprocess the input video sequence, including the following steps:

[0076] S11) Extract the Y channel of the input video to form a frame sequence, and then group the video frames, with each group containing the same number of frames.

[0077] S12) For the Y channel in each group, the frame is divided into two parts. The first part is used to embed a set of synchronization watermarks, and the second part is used to embed a set of copyright watermarks. It is ensured that a set of synchronization watermarks is embedded at the beginning and end of each set of copyright watermarks. In this example, for the segments with embedded synchronization watermarks and the segments with embedded copyright watermarks, five consecutive frames are used to represent one bit.

[0078] S13) For each group, perform DFT transformation on the inscribed square region of each frame and extract the DFT amplitude spectrum coefficients; that is:

[0079] F s,i =DFT am (fs,i ), 1≤i≤|f s |

[0080] In the formula, F s,i Represents the DFT amplitude spectrum; DFT am This is a function that performs a DFT on an image and extracts the magnitude spectrum of the transformed DFT; f s,i The frame to be embedded with the synchronized watermark; the subscripts s and i indicate that the current frame is the frame to be embedded with the synchronized watermark, and i indicates that the current frame is the i-th frame of the video sequence.

[0081] In this example, the process of selecting the inscribed square region of each frame is as follows: take the center of the Y frame as the center of the square, and take the shortest side length of the Y frame as the side length of the square; after obtaining the inscribed square region of the Y frame, perform DFT on the inscribed square, and extract the DFT amplitude spectrum coefficients for subsequent embedding of synchronization watermark or copyright watermark.

[0082] S14) Divide the DFT amplitude spectrum into quadrants; specifically:

[0083] A Cartesian coordinate system is established with the center of the amplitude spectrum as the origin, resulting in four quadrants of the amplitude spectrum. If the current Y-frame is to embed a synchronization watermark, the coefficients of the first and third quadrants of the amplitude spectrum are modulated to embed the synchronization watermark. If the current Y-frame is to embed a copyright watermark, the coefficients of the second and fourth quadrants are modulated to embed the watermark. The same Y-frame cannot embed both a synchronization watermark and a copyright watermark simultaneously.

[0084] S2) Embed a synchronized watermark into the preprocessed video frame sequence; including the following steps:

[0085] S21), through the modulation angle range of The coefficients within the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] are used to embed the synchronous watermark; after modulation, within the same angular range, the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] presents an alternating light and dark ring shape;

[0086] S22) Using coefficient T1 as the synchronization watermark embedding strength, the synchronization watermark embedding coefficient F s,i (ρ s ,θ s In the process, the coefficient F′ containing the synchronous watermark is obtained. s,i (ρ s ,θ s );

[0087] The synchronized watermark sequence used in this example is w. s,i ={1,0,1,0}, if the synchronization watermark bit to be embedded is w s,i =1, the expression for synchronous watermark embedding is:

[0088]

[0089] If you want to embed the synchronization watermark bit w s,i If = 0, then the embedding expression for the synchronized watermark is:

[0090]

[0091] In the formula, F′ s,i (ρ s ,θ s ) represents the amplitude spectrum coefficients after embedding the watermark; F s,i (ρ s ,θ s ) represents the original DFT amplitude spectrum coefficients; ρ1={R1,R1+4d}, ρ2=ρ1+d, ρ3={R1+2d,R1+6d}, ρ4=ρ3+d; V h V w These are the height and width of the inscribed square, respectively; d is the width of the ring corresponding to the synchronized watermark, with a value of 10.

[0092] In this example, the embedding strength T1 is 10. 5 .

[0093] S23) Perform inverse DFT transformation on the amplitude spectrum and corresponding phase spectrum of the embedded synchronization watermark to obtain the inscribed square block after the synchronization watermark is embedded. Replace the original inscribed square area of ​​the Y channel with the inscribed square frame to obtain the Y channel with watermark, and finally obtain the video frame sequence with synchronization watermark.

[0094] S3) Embed copyright watermarks into the preprocessed video frame sequence; including the following steps:

[0095] S31) For the DFT amplitude spectrum to be embedded with a copyright watermark, the angle range is as follows: The amplitude spectral coefficient F with a radius range of [R2, R2+d] and [R3, R3+d] c,i (ρ c ,θ c Use this to embed the copyright watermark;

[0096] S32) Use coefficient T2 as the embedding strength of the copyright watermark to modulate F. c,i (ρ c ,θ c To obtain the amplitude spectral coefficient F′ of the watermark. c,i (ρ c ,θ c ); Specifically as follows:

[0097] If w c,i If = 1, then the embedding expression for the copyright watermark is:

[0098]

[0099] If w c,i If the value is 0, then the embedding expression for the copyright watermark is:

[0100]

[0101] In the formula, F c,i (ρ c ,θ c F' represents the DFT amplitude spectrum coefficients to be embedded with the copyright watermark; c,i (ρ c ,θ c ) represents the amplitude spectrum coefficients after embedding the watermark; the subscripts c and i represent the current frame embedding the copyright watermark and the i-th frame, respectively; w c,i R1 represents the i-th bit of the copyright watermark sequence; R2 represents the starting radius of the first ring corresponding to the copyright watermark; R3 represents the starting position of the second watermark ring; d represents the width of the ring corresponding to the copyright watermark, with a value of 10.

[0102] also, Furthermore, ρ c ∈[R2,R2+d)∪[R3,R3+d) In this example, we take λ. s The value is 1 / 200.

[0103] S33) Perform inverse DFT transform on the DFT amplitude spectrum and its corresponding phase spectrum containing the copyright watermark to obtain the inscribed square block containing the copyright watermark, and finally obtain the Y channel frame containing the copyright watermark.

[0104] S4) Perform automatic perspective correction on the input video for the camera recording scene; specifically, this includes the following steps:

[0105] S41) Use an image segmentation model to fully segment each frame of the input video sequence to obtain a segmented image set; after segmentation, a set of segmented candidate images D will be obtained for the i-th frame. i :

[0106]

[0107] S42), for the i-th frame, from its segmented image set E i Select a set of candidate images; and perform rectangle detection and color richness calculation on each candidate image;

[0108] In this example, the candidate image is E. i The 15 images with the largest area are selected; the area is calculated by counting the number of non-zero pixels in the image.

[0109] If the largest rectangle detected among all candidate images comes from the image with the highest color richness, then that candidate image is selected as the image of interest; otherwise, the image with the highest color richness is selected as the image of interest. In this example, the color richness is calculated as: μ + α·var(X), where μ is the mean of the pixels; var(X) is the variance of the pixels; and α is the weighting coefficient, which is 20 in this example.

[0110] S43), Repeat steps S41) and S42) to obtain the images of interest for all frames;

[0111] S44) Remove images of interest whose area is less than half or more than twice the average area of ​​all images.

[0112] S45) Convert the image of interest obtained in step S44) into a grayscale image and superimpose them to obtain a two-dimensional matrix I;

[0113] S46) Set pixels in the two-dimensional matrix I with pixels less than the coefficient τ to 0, and vice versa, to 1, to obtain a two-dimensional matrix with binarization. The coefficient τ is calculated by sorting the pixels in I in ascending order and taking the mean of the smallest 30% as the value of τ.

[0114] S47) Extract the edges of the video content region obtained in step S46), and perform nonlinear fitting on the four sides of the obtained rectangle to obtain the linear equations corresponding to the four sides; in this example, the nonlinear fitting method used is the least squares method, and the fitted linear equation is in intercept form.

[0115] S48) Solve the equations of the lines corresponding to the four sides to obtain the coordinates of the four corner points of the video area; for example Figure 5 As shown, perspective correction is performed on the recorded video based on the coordinates of the four corner points of the video area. The corrected video is then used for the subsequent extraction of copyright watermarks and synchronization watermarks.

[0116] S5) Extract synchronized watermarks and copyright watermarks from the perspective-corrected video, such as... Figure 3 and 4 As shown, it includes the following steps:

[0117] S51) Perform DFT transform on the inscribed square of the Y channel and extract the amplitude spectrum, and set the angle range to... The amplitude spectral coefficients with radii of [ρ1,ρ2] and [ρ3,ρ4] are summed to obtain the summed value E1 = {e 1,1 ,e 1,2}、E2={e 2,1 ,e2,2};

[0118] S52), based on E1 and E2, we calculate S = {e 1,1 -e 2,1 ,e 2,1 -e 1,2 ,e 1,2 -e 2,2 If S = {0, 1, 0}, then the current frame is considered to contain a synchronization watermark.

[0119] The expressions for E1 and E2 are as follows:

[0120]

[0121] S={e 1,1 -e 2,1 ,e 2,1 -e 1,2 ,e 1,2 -e 2,2}

[0122] Among them, e 1,1 e 1,2 e 2,1 e 2,2 These represent the sum of amplitude spectral coefficients with radii ranging from [ρ1, ρ2] to [ρ3, ρ4], respectively; if an element in S is greater than 0, it is mapped to 1, otherwise it is mapped to 0.

[0123] S53) Extract a set of copyright watermarks by extracting frames G whose indexes fall between adjacent synchronous watermark frame group indices;

[0124] S54), based on the copyright watermark length L c Divide G into L equal parts c A segment g i and from fragment g i All the watermark information extracted is subjected to a majority vote, and finally a set of copyright watermarks can be extracted from G;

[0125] In this example, from fragment g i The formula for extracting watermark information is:

[0126]

[0127] in, Let w be the amplitude spectral coefficient of the watermark to be extracted. j ′ For fragment g i The watermark bits were extracted from a specific frame.

[0128] S55) A majority vote is conducted on the watermark bits at the corresponding positions of the multiple sets of copyright watermarks extracted from the input video to obtain the final set of copyright watermarks.

[0129] In this example, the average peak signal-to-noise ratio (MPSNR), average structural similarity (MSSIM), normalized cross-correlation value (NC), and watermark embedding algorithm time cost are used as evaluation indicators: the higher the PSNR and SSIM values, the better the imperceptibility, while the higher the NC values, the better the watermark robustness, and the shorter the watermark embedding time cost, the better.

[0130] like Figure 6 As shown, this example considers the MSSIM and NC indices obtained by different copyright watermark embedding strengths, and finally determines that when β is 1, robustness and invisibility can be better balanced.

[0131] Table 1 shows a comparison of the MPSNR and MSSIM of this example with existing algorithms in a publicly available video dataset. The results show that the present invention has better imperceptibility than existing solutions. The four algorithms compared are, in order: video watermarking based on DT-CWT correlated subbands (Algorithm 1), video watermarking based on moments (Algorithm 2), video watermarking based on intra-frame difference (Algorithm 3), and video watermarking based on tensor feature mapping (Algorithm 4). The basic ideas of each algorithm are as follows:

[0132] Algorithm 1: Perform a four-level DT-CWT on the U channel of the video frame. Since the first and sixth sub-bands in the four-level high-pass sub-bands are highly correlated, and the third and fourth sub-bands are highly correlated, watermark bits 0 and 1 are embedded by modulating the magnitude relationship between the energy of these two pairs of correlated sub-bands.

[0133] Algorithm 2: The watermark is embedded by modulating the amplitude of the moment in the central circular region of the U channel of the video frame, which has good robustness against geometric attacks.

[0134] Algorithm 3: After dividing the U channel of the video frame into non-overlapping blocks, randomly divide all blocks into two parts, A and B. Based on the embedded 0 and 1 bits, modulate the pixel values ​​of the two parts so that the total pixel values ​​of A and B are in a relative order to complete the watermark embedding.

[0135] Algorithm 4: Treat a grayscale video segment as a three-dimensional data structure (tensor), then extract the factor matrix representing the temporal variation features of the video through high-order singular value decomposition, and construct a new representation called "tensor feature map" based on this matrix. Wavelet transform and cosine transform are then applied to the tensor feature map, and watermark embedding is achieved by adjusting the intermediate frequency coefficients of the image blocks.

[0136] Table 1. Comparison of MPSNR between this example and existing algorithms in a publicly available video dataset.

[0137]

[0138] As shown in Table 2, this example compares the performance of existing algorithms against rotation attacks in a publicly available video dataset. The results show that this invention has high robustness against rotation attacks.

[0139] Table 2 compares the average NC obtained by this example with existing algorithms in resisting rotation attacks on a publicly available video dataset.

[0140]

[0141]

[0142] As shown in Table 3, this example demonstrates the average NC under camera recording conditions. The results indicate that this invention exhibits high watermark robustness even in recording scenarios.

[0143] Table 3 shows the NC results obtained in this example regarding resistance to camera recording from publicly available video datasets.

[0144]

[0145] The method presented in this example enables watermark extraction to continue uninterrupted even after being subjected to rotation attacks, aspect ratio scaling attacks, recompression attacks, common noise attacks, and camera recording attacks. The introduction of an image segmentation model and automatic perspective correction method enhances the automation of watermark extraction and expands the application scenarios of video watermarking. Furthermore, the synchronous watermarking mechanism introduced in this example effectively resists frame interpolation and dropping attacks, significantly improving the robustness of the watermark against temporal synchronization attacks, especially in recording scenarios.

[0146] The examples and descriptions above are merely illustrative of the principles and best practices of the invention. Various changes and modifications may be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the invention as claimed.

Claims

1. A robust video watermarking method resistant to camera recording, characterized in that, Includes the following steps: S1) Preprocess the input video sequence; S2) Embed synchronous watermarks into the preprocessed video frame sequence; S3) Embed copyright watermarks into the preprocessed video frame sequence; S4) Perform automatic perspective correction on the input video for the camera recording scene; S5) Extract synchronous watermarks and copyright watermarks from the perspective-corrected video.

2. The robust video watermarking method against camera recording according to claim 1, characterized in that: In step S1), the preprocessing includes the following steps: S11) Extract the Y channel of the input video to form a frame sequence, and group the video frames into groups, with each group containing the same number of frames. S12) For each group, the frame is divided into two parts. The first part is used to embed a set of synchronous watermarks, and the second part is used to embed a set of copyright watermarks. It is ensured that a set of synchronous watermarks is embedded at the beginning and end of each set of copyright watermarks. S13) For each group, take the inscribed square region of each frame and perform Discrete Fourier Transform (DFT), and extract the DFT amplitude spectrum coefficients. S14) Divide the DFT amplitude spectrum into quadrants.

3. The robust video watermarking method against camera recording according to claim 2, characterized in that: In step S13), the selection process of the inscribed square region of each frame is as follows: take the center of the Y frame as the center of the square, and take the shortest side length of the Y frame as the side length of the square; after obtaining the inscribed square region of the Y frame, perform DFT transformation on the inscribed square, and extract the DFT amplitude spectrum coefficients for subsequent embedding of synchronization watermark or copyright watermark.

4. A robust video watermarking method resistant to camera recording according to claim 2, characterized in that: In step S14), the DFT amplitude spectrum is divided into quadrants, specifically as follows: A Cartesian coordinate system is established with the center of the amplitude spectrum as the origin, resulting in four quadrants of the amplitude spectrum. If the current Y frame is to embed a synchronization watermark, the coefficients of the first and third quadrants of the amplitude spectrum are modulated to embed the synchronization watermark. If the current Y frame is to embed a copyright watermark, then modulate the coefficients in the second and fourth quadrants to embed the watermark; The same Y-frame does not embed a synchronous watermark and a copyright watermark at the same time.

5. A robust video watermarking method resistant to camera recording according to claim 2, characterized in that: In step S2), the embedding process of the synchronous watermark includes the following steps: S21), through the modulation angle range of The coefficients within the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] are used to embed the synchronous watermark; after modulation, within the same angular range, the annulus with radii ranging from [ρ1,ρ2] to [ρ3,ρ4] presents an alternating light and dark ring shape; S22) Use coefficient T1 as the synchronization watermark embedding intensity to embed the synchronization watermark into the DFT amplitude spectrum coefficient F. s,i (ρ s ,θ s In the process, the DFT amplitude spectrum coefficients F′ containing the synchronous watermark are obtained. s,i (ρ s ,θ s ); S23) Perform inverse DFT transformation on the amplitude spectrum and corresponding phase spectrum of the embedded synchronization watermark to obtain the inscribed square block after the synchronization watermark is embedded. Replace the original inscribed square area of ​​the Y channel with the inscribed square frame to obtain the Y channel with watermark, and finally obtain the video frame sequence with synchronization watermark.

6. A robust video watermarking method resistant to camera recording according to claim 5, characterized in that: In step S22), if the synchronization watermark bit to be embedded is w s,i =1, the expression for synchronous watermark embedding is: If you want to embed the synchronization watermark bit w s,i If = 0, then the embedding expression for the synchronized watermark is: In the formula, F′ s,i (ρ s ,θ s ) represents the amplitude spectrum coefficients after embedding the watermark; F s,i (ρ s ,θ s ) represents the original DFT amplitude spectrum coefficients; ρ1={R1,R1+4d}, ρ2=ρ1+d, ρ3={R1+2d,R1+6d}, ρ4=ρ3+d; V h V w These are the height and width of the inscribed square, respectively; d is the width of the ring corresponding to the synchronized watermark.

7. A robust video watermarking method resistant to camera recording according to claim 6, characterized in that: In step S3), the process of embedding the copyright watermark includes the following steps: S31) For the DFT amplitude spectrum to be embedded with a copyright watermark, the angle range is as follows: The radius ranges from [R2, R2+d] to [R3, R].   The amplitude spectral coefficient F of +d] c,i (ρ c ,θ c Use this to embed the copyright watermark; S32) Use coefficient T2 as the embedding intensity of the copyright watermark to modulate the amplitude spectrum coefficient F. c,i (ρ c ,θ c To obtain the amplitude spectral coefficient F′ of the watermark. c,i (ρ c ,θ c ); S33) Perform inverse DFT transform on the DFT amplitude spectrum and its corresponding phase spectrum containing the copyright watermark to obtain the inscribed square block containing the copyright watermark, and finally obtain the Y channel frame containing the copyright watermark.

8. A robust video watermarking method resistant to camera recording according to claim 7, characterized in that: In step S32), if w c,i If = 1, then the embedding expression for the copyright watermark is: If w c,i If the value is 0, then the embedding expression for the copyright watermark is: In the formula, F c,i (ρ c ,θ c F' represents the DFT amplitude spectrum coefficients to be embedded with the copyright watermark; c,i (ρ c ,θ c ) represents the amplitude spectrum coefficients after embedding the watermark; the subscripts c and i represent the current frame embedding the copyright watermark and the i-th frame, respectively; w c,i R1 represents the i-th bit of the copyright watermark sequence; R2 represents the starting radius of the first ring corresponding to the copyright watermark; R3 represents the starting position of the second watermark ring; and d represents the width of the ring corresponding to the copyright watermark.

9. A robust video watermarking method resistant to camera recording according to claim 1, characterized in that: In step S4), automatic perspective correction is performed on the input video for the camera recording scene; specifically, the following steps are included: S41) Use an image segmentation model to fully segment each frame of the input video sequence to obtain a segmented image set; S42), For the i-th frame, from its segmented image set D i Select a set of candidate images; Rectangle detection and color richness calculation are performed on each candidate image; If the largest rectangle detected among all candidate images comes from the image with the highest color richness, then that candidate image is taken as the image of interest. Otherwise, select the image with the highest color richness as the image of interest; S43), Repeat steps S41) and S42) to obtain the images of interest for all frames; S44) Remove images of interest whose area is less than half or more than twice the average area of ​​all images. S45) Convert the image of interest obtained in step S44) into a grayscale image and superimpose them to obtain a two-dimensional matrix I; S46) Set the pixels in the two-dimensional matrix I with pixels less than the coefficient τ to 0, and the pixels with pixels greater than τ to 1, to obtain a two-dimensional matrix with binarization. S47) Extract the edges of the video content region obtained in step S46), and perform nonlinear fitting on the four sides of the obtained rectangle to obtain the linear equations corresponding to the four sides. S48) Solve the equations of the lines corresponding to the four sides to obtain the coordinates of the four corner points of the video area; and perform perspective correction on the recorded video based on the coordinates of the four corner points of the video area. The corrected video is used for subsequent extraction of copyright watermark and synchronization watermark.

10. A robust video watermarking method resistant to camera recording according to claim 1, characterized in that: Step S5), the extraction of the synchronized watermark and copyright watermark, includes the following steps: S51) Perform DFT on the inscribed square of the Y channel and extract the amplitude spectrum, and set the angle range to... The amplitude spectral coefficients with radii of [ρ1,ρ2] and [ρ3,ρ4] are summed to obtain the summed value E1 = {e 1,1 ,e 1,2 }、E2={e 2,1 ,e 2,2 }; S52), based on E1 and E2, we calculate S = {e 1,1 -e 2,1 ,e 2,1 -e 1,2 ,e 1,2 -e 2,2 If S = {0, 1, 0}, then the current frame is considered to contain a synchronization watermark. S53) Extract a set of copyright watermarks by extracting frames G whose indexes fall between adjacent synchronous watermark frame group indices; S54), based on the copyright watermark length L c Divide G into L equal parts c A segment g i and from fragment g i All the watermark bits extracted are subjected to a majority vote, and finally a set of copyright watermarks is extracted from G; Among them, from fragment g i The formula for extracting the watermark bits is: in, Let w be the amplitude spectral coefficient of the watermark to be extracted. j ′ For fragment g i Watermark information extracted from a specific frame; S55) A majority vote is conducted on the watermark bits at the corresponding positions of the multiple sets of copyright watermarks extracted from the input video to obtain the final set of copyright watermarks.

Citation Information

Patent Citations

  • Method for resisting video compression robustness blind watermarking based on DST

    CN115150627A