A fast video robust watermarking method based on zernike moments
By combining Zernike moments and adaptive block segmentation, the problems of low watermark extraction efficiency and insufficient robustness of high-definition videos under high-intensity rotation attacks are solved, achieving fast and effective watermark extraction and improved robustness.
Patent Information
- Application Number
- CN202310601266.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-05-25
AI Technical Summary
Existing robust video watermarking technologies suffer from low extraction efficiency and insufficient robustness under high-intensity rotation attacks, making them difficult to apply to high-definition videos.
We employ Zernike moments combined with an adaptive block method, extracting the maximum value as the feature matrix through singular value decomposition, embedding and extracting watermarks, and utilizing the orthogonality of Zernike polynomials and the adaptive block method to improve computational efficiency and robustness.
Fast and effective watermark extraction was achieved under high-intensity rotation attacks, improving the robustness and computational efficiency of high-definition videos.
Smart Images

Figure CN116600177B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of robust watermark technology for video copyright protection and tracing, and in particular to a fast video robust watermarking method based on Zernike moments. BACKGROUND
[0002] The comprehensive popularity of videos enriches people's production and life, but due to the development of mobile Internet technology and the easy copyability of multimedia data, videos are often illegally obtained, tampered with and spread, thereby causing copyright disputes and other problems. The infringing pirated videos often circulate freely on the network, seriously affecting the production and sales environment of video works. Therefore, the copyright protection of video data has become an important and urgent task. In order to protect the copyright of video works, some experts and scholars have proposed digital watermarking technology, which can prove the copyright ownership and ensure the integrity of the data. Compared with encryption technology, the watermark in digital watermarking technology is hidden in the video content in an imperceptible form and does not affect the use of digital products. It uses the information redundancy of the video itself to embed the copyright information into the video carrier. In the event of a copyright dispute, the copyright ownership can be proved by extracting the copyright information in the video. In addition, when the video is illegally spread, in order to trace the responsibility of the pirate, different watermarks can be embedded in different copies of the same video before the video is distributed, and the responsibility of the pirate can be determined by corresponding watermark identification when the watermark is extracted. As an effective method for protecting the security of video information, video watermarking technology has been applied to the copyright protection of movies and TV series, and has important significance for maintaining the legitimate rights and interests of copyright owners.
[0003] Existing researches have proposed video robust watermarking algorithms based on different embedding domains. Some of these works use frequency domain methods, such as watermarking algorithms based on wavelet transform and watermarking algorithms based on discrete cosine transform. There are also some research works based on spatial domain methods, such as watermarking algorithms based on variable block and watermarking algorithms based on edge detection. These methods have their own characteristics and can be selected according to the needs of actual application scenarios. Secondly, some research works focus on the perception of watermarking, such as algorithms based on color domain embedding watermarking, which minimize the impact of embedded watermark on video quality and improve the imperceptibility of watermarking. However, these methods still have shortcomings in high-intensity rotation attacks, such as 30, 180, and mirror flip attacks, which can easily cause watermark extraction failure. If Zernike moments are used, the resolution of high-definition videos is high, which consumes a lot of time and computing load in watermark extraction, and the extraction efficiency is low. SUMMARY
[0004] The present application aims at overcoming the defects of the prior art and provides a fast video robust watermarking method based on Zernike moments, which uses Zernike moments as a watermark embedding carrier, and can achieve good extraction effect and high robustness and efficiency in the face of high-intensity rotation attacks when extracting the watermark.
[0005] The object of the present application can be achieved by the following technical solutions:
[0006] The present application provides a fast video robust watermarking method based on Zernike moments, which comprises adding watermark and extracting watermark, wherein the adding watermark comprises the following steps:
[0007] S1, obtaining an unwatermarked video sequence, pre-processing the video sequence to obtain Zernike moments for embedding watermark, wherein the specific steps of the pre-processing of S1 comprise:
[0008] S1-1, extracting the chrominance component of the video sequence, grouping the video frames of the video sequence, and each group containing the same number of frames;
[0009] S1-2, for each group, determining the difference between each pair of adjacent frames, selecting a group of adjacent frames with the smallest difference to form a group of frame pairs, and covering the previous frame to the next frame, and taking the covered next frame as a key frame;
[0010] S1-3, using an adaptive blocking method to divide the key frame into corresponding mutually disjoint blocks;
[0011] S1-4, performing singular value decomposition on each block obtained in S1-3 to extract the maximum singular value of each block corresponding to the key frame, and combining the maximum singular value of each block into a feature matrix corresponding to the key frame;
[0012] S1-5, calculating the Zernike moments of the feature matrix;
[0013] S1-6, deleting a part of the Zernike moments;
[0014] S1-7, sorting the remaining Zernike moments in S1-6 in ascending order according to the subscript, and selecting to obtain the Zernike moments for embedding watermark;
[0015] S2, embedding watermark data into the Zernike moments obtained in S1-7 to obtain a video sequence with embedded watermark;
[0016] The extracting watermark comprises the following steps:
[0017] S3, obtaining the video sequence embedded with the watermark according to the method in S1-S2, pre-processing the video sequence to obtain the Zernike moment embedded with the watermark, wherein the video sequence embedded with the watermark is not attacked or is attacked by rotation or scaling;
[0018] The specific steps of the pre-processing of S3 are as follows:
[0019] S3-1, extracting the chroma component from the video sequence embedded with the watermark, grouping the video sequence, each group containing the same number of frames, the number being the same as that in S1-1, and selecting the frames at the same positions as the key frames in S1-2 as the key frames;
[0020] S3-2, repeating S1-3;
[0021] S3-3, performing singular value decomposition on each block obtained in S3-2 to extract the maximum singular value of each block corresponding to the key frame, combining the maximum singular value of each block into a feature matrix of the corresponding key frame, and adjusting the size of the feature matrix to the size of the feature matrix in S1-4;
[0022] S3-4, repeating S1-5 to S1-7 to obtain the Zernike moment embedded with the watermark;
[0023] S4, extracting the watermark from the Zernike moment embedded with the watermark in S3.
[0024] Further, in S1-5, the specific steps of calculating the Zernike moment of the feature matrix are as follows:
[0025] Calculating the Zernike polynomial;
[0026] Let the feature matrix in S1-4 be f(x, y), and calculate the Zernike moment of the feature matrix with n as the order and m as the repetition degree, wherein (x, y) represents a point in a rectangular coordinate system;
[0027] The expression of the Zernike moment is as follows:
[0028]
[0029] Wherein f represents the pixel value, and the relationship between p, q and x, y is represented as: q = tan -1 (y / x), V n,m is the Zernike polynomial with n as the order and m as the repetition degree, and * represents conjugate,
[0030] The expression of the Zernike polynomial with n as the order and m as the repetition degree is as follows:
[0031] V n,m (x, y) = R n,m (ρ)ejmθ
[0032] wherein R n,m (p) is an orthogonal radial polynomial, whose expression is:
[0033]
[0034] wherein n is the order, and m is the repetition degree.
[0035] Further, in S1-6, the deleted part of Zernike matrix is: the Zernike matrix whose repetition degree m is a multiple of 4, the Zernike matrix whose repetition degree m and order n are both 0 or 1, and the Zernike matrix whose repetition degree m is less than 0.
[0036] Further, in S1-7, the subscript of Zernike matrix is the order n and the repetition degree m, and the priority of the order n is higher than that of the repetition degree m.
[0037] The specific steps of screening in S1-7 are: setting a screening coefficient a, and selecting the first a x L Zernike matrices in the sorted order as the Zernike matrices for embedding watermark, wherein L is the total number of the sorted Zernike matrices.
[0038] Further, the specific steps of S2 are:
[0039] S2-1, obtaining the Zernike matrices for embedding watermark in S1, and embedding watermark data into the amplitude of the obtained Zernike matrices;
[0040] S2-2, constructing a watermark signal based on the Zernike matrices embedding watermark data;
[0041] S2-3, superimposing the watermark signal into the feature matrix in S1-4 to obtain a feature matrix embedding watermark;
[0042] S2-4, performing a series of inverse transformations on the feature matrix embedding watermark to obtain a key frame embedding watermark, and then obtaining a video sequence embedding watermark.
[0043] Further, in S2-1, the watermark embedding formula used for embedding watermark data into the amplitude of the obtained Zernike matrices is:
[0044]
[0045] wherein the superscript w represents a watermark bit, taking values of 0 or 1, Δ represents a quantization step, Q represents a quantizer, and |A n,m | represents the modulus value of the Zernike matrix of order n and repetition degree m;
[0046] The expression of the quantizer is:
[0047]
[0048] Where x' is the input of the quantizer, Δ represents the quantization step size, and the return value of the round function is the sum of the input and output values. The closest integer.
[0049] Furthermore, the specific steps of S4 are as follows:
[0050] S4-1. Calculate the watermark bit from the Zernike moments embedded with the watermark and extract the watermark, wherein the quantization step size when extracting the watermark is equal to the quantization step size in S2-1.
[0051] S4-2. From the watermarks extracted in S4-1, select the watermark with the highest frequency of the corresponding embedded Zernike moments as the final extracted watermark.
[0052] Furthermore, the expression for the watermark bit in S4-1 is:
[0053]
[0054] Where b represents the extracted watermark position, w b Indicates watermark information, |B n,m | represents the modulus of the Zernike moment with the embedded watermark, where n is the order and m is the repetition degree.
[0055] Furthermore, in S3, if the height and width of the acquired watermarked video sequence are prime numbers, the watermarked video sequence is adjusted to a resolution proportional to the original video.
[0056] Furthermore, in S3, if the acquired watermarked video sequence has not been scaled but only subjected to a rotation attack, then the center points of the watermarked video sequence and the original video are used as the origin. A square is extracted from the origin, and the Zernike moments of the cropped images in the original video and the watermarked video sequence are calculated using the parameter set. Based on these Zernike moments, the rotation angle is calculated. The obtained angles are added together, averaged, and then subtracted to obtain the final estimated rotation angle. Take the estimated value of the rotation angle as well as and The angle corresponding to the highest normalized cross-correlation value is used as the compensation angle. The video sequence after embedding the watermark is compensated using the compensation angle, and then the video sequence is preprocessed.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The present application uses Zernike moments as a watermark embedding carrier, combined with adaptive block method to take the maximum singular value as the feature matrix, the Zernike moments are based on the orthogonalization function of Zernike polynomial, the orthogonal polynomial set used is a complete orthogonal set in a unit circle, which can cope with small angle, 180 degrees and mirror high strength rotation attack, and has good robustness, and through the combination of adaptive block method to take the maximum singular value as the feature matrix, the calculation efficiency of the Zernike moments used in the digital watermark technology is effectively improved, and then the video watermark algorithm based on the Zernike moments is extended to be applied to high-definition video. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 The flowchart of the present application is shown in the figure. Figure 1 (a) is the flowchart of adding watermark, Figure 1 (b) is the flowchart of extracting watermark.
[0060] Figure 2 The principle diagram for calculating the compensation angle is shown in the figure. DETAILED DESCRIPTION
[0061] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical scheme of the present application, and detailed implementation and specific operation process are given, but the protection scope of the present application is not limited to the following embodiments.
[0062] The present application proposes a fast video robust watermarking method based on Zernike moments, and the flowchart of the method is shown in the figure. Figure 1 The method includes adding watermark and extracting watermark, Figure 1 (a) is the flowchart of adding watermark, Figure 1 (b) is the flowchart of extracting watermark.
[0063] The method includes the following steps:
[0064] S1, preprocessing before embedding watermark.
[0065] Step 1-1: extracting the chrominance component U of the input YUV video sequence, and then grouping the video frames, each group containing the same number of frames. In some embodiments, each group contains 6 frames. In the sequence, the extracted U component (Y represents the luminance component, U and V represent the chrominance), which is used for subsequent watermark embedding.
[0066] Step 1-2: for each group, determine the difference between each pair of adjacent frames to select the frame for embedding watermark, after calculating the difference value of the adjacent frames in the group, select the group of adjacent frames with the smallest difference value to form a group of frame pairs, and cover the previous frame to the next frame, and the covered next frame is used as the key frame for subsequent watermark embedding step.
[0067] The formula for calculating the inter-frame difference is as follows:
[0068]
[0069] where f(x, y, i) and f(x, y, i+1) represent the pixel value of the coordinate (x, y) in the i-th frame and the i+1-th frame in a group of frames. After calculating the difference between adjacent frames in a group, the set of adjacent frames with the smallest difference is selected to form a frame pair for subsequent watermark embedding steps.
[0070] After all frame pairs are collected through the above steps, in each frame pair, the previous frame is used to cover the latter frame, and the latter frame covered by the previous frame is used as the key frame for embedding the watermark. The watermark can be transmitted as the difference between the two frames. The relationship between the two frames can be expressed as follows: let I i and I i+1 be the i-th frame and the i+1-th frame of the above formula, assume that (I i ,I i+1 ) is the frame pair to be embedded with a watermark, and the watermark signal is W i After embedding the watermark, the frame pair (I i ,I i+1 ) will be converted to (I′ i ,I′ i+1 ), where I′ i = I i , and the value of I′ i+1 is determined by (I i ,W i ).
[0071] Steps 1-3: Use adaptive block method to divide the key frame into mutually disjoint blocks, and the number of blocks is the same in the horizontal and vertical directions. In order to balance the number of blocks in the horizontal and vertical directions, calculate the greatest common divisor of the height and width of the key frame as the block number in both directions.
[0072] Assume that (I i ,I i+1 ) represents the frame pair that needs to be embedded with a watermark. After covering the previous frame into the latter frame, we can get where Secondly, perform adaptive block division on to divide it into mutually disjoint blocks, and the number of blocks is the same in the horizontal and vertical directions. Assume that h and w are the height and width of , in order to balance the number of blocks in the horizontal and vertical directions, calculate the greatest common divisor (GCD) of h and w as the block number in both directions. Therefore, the size of an adaptive block can be described by the following formula:
[0073]
[0074] where h b represents the height of the block, w b is the width of the block, and gcd(h,w) represents the greatest common divisor of h and w.
[0075] Step 1-4: Perform singular value decomposition on each block after adaptive blocking of each key frame, and extract the maximum value of each singular value of the block, and then combine them in order as the feature matrix A of the key frame, which is used for subsequent watermark embedding.
[0076] Perform singular value decomposition on each block after adaptive blocking of the key frame, as follows:
[0077] F = UΣV T
[0078] where F represents a specific block, with a size of h b × w b , U is an orthogonal matrix of h b × h b , Σ is a diagonal matrix of h b × w b containing singular values, and V is an orthogonal matrix of w b × w b , and the superscript T represents transposition.
[0079] Since the maximum value of the singular value represents most of the information of the corresponding matrix, it is more robust than other singular values, so in this step, the maximum value of each singular value of the block is extracted as the eigenvalue of the matrix.
[0080] After collecting all the eigenvalues in the key frame, the feature matrix A with a size of gcd(h,w)×gcd(h,w) can be obtained, which can be used for subsequent watermark embedding.
[0081] Step 1-5: Take N as the maximum order to calculate the Zernike moments of the feature matrix A.
[0082] First, calculate the Zernike polynomial, which can be expressed as follows:
[0083] V n,m (x,y) = R n,m (ρ)e jmθ
[0084] where n = 0, 1, …, ∞, 0 ≤ |m| ≤ n, n-|m| is even, (x,y) represents a point in the rectangular coordinate system, and the relationship between ρ, θ and x, y can be expressed as: θ = tan -1(y / x).
[0085] Where R n,m (ρ) is an orthogonal radial polynomial, expressed as follows:
[0086]
[0087] After calculating the Zernike polynomial, assuming the characteristic matrix A is represented by f(x,y), its Zernike moments with order n and repetition m can be calculated, as shown in the following formula:
[0088]
[0089] Where V n,m Let n be a Zernike polynomial of order n and repetition degree m, and * denote conjugation.
[0090] In some embodiments, the maximum order N = 20.
[0091] Steps 1-6: Delete a portion of the moments that are not suitable for embedding watermarks. Assume each moment is composed of A. n,m Let represent the Zernike moments when the repetition m is a multiple of 4, when both n and m are 0 or both are 1, and when m is negative.
[0092] Steps 1-7: Assume that after deleting unsuitable moments according to steps 1-6, there are a total of L moments, all of which are derived from A. n,m This means that the above moments are sorted in ascending order by their indices (n, m), where n has a higher priority. Then, the coefficient α is used to select the first α×L Zernike moments after sorting for watermark embedding.
[0093] In some embodiments, the coefficient α = 0.5.
[0094] S2, Embed watermark.
[0095] Step 2-1: Use the quantization step size Δ to embed the watermark data into the amplitude of all the selected moments in Steps 1-7, with each moment containing 1 bit of watermark data.
[0096] After selecting moments suitable for watermark embedding, the watermark data is embedded into the amplitude of all selected moments, with each target matrix containing 1 bit of watermark data. The specific expression is as follows:
[0097]
[0098] in The superscript w indicates that the amplitude has embedded watermark information, and Q(x,y) represents the quantizer, defined as follows:
[0099]
[0100] The function round(·) returns the integer closest to the input value, where w represents the watermark bit and Δ represents the quantization step size.
[0101] In some embodiments, the watermark information w∈{0,1}, and the quantization step size Δ=30000.
[0102] Step 2-2: Use the moments from Step 2-1 that embed the watermark to construct the watermark signal R.
[0103] The watermark signal R is constructed as follows:
[0104]
[0105] Where x, y represent the corresponding pixel coordinates of the watermark signal, V n,m (ρ,θ) denotes the Zernike polynomial, where θ = tan -1 (y / x).
[0106] Steps 2-3: Using coefficient β, superimpose the watermark signal onto the feature matrix A to obtain the feature matrix A with the embedded watermark. w The coefficient β is used to control the embedding strength of the watermark to enhance its imperceptibility.
[0107] Using the coefficient β, the watermark signal R is superimposed onto the feature matrix A. The specific mathematical expression is as follows:
[0108] A w =A+β·R
[0109] The coefficient β is used to control the embedding strength of the watermark to enhance its imperceptibility. β can be calculated by the following formula:
[0110]
[0111] Here, Θ(·) returns the mean of all data within the inscribed circle of the input matrix.
[0112] A r The reconstructed matrix representing the original feature matrix is expressed as follows:
[0113]
[0114] Steps 2-4: Process the feature matrix A containing the embedded watermark. w Perform a series of inverse transformations based on the above steps to obtain keyframes with embedded watermarks, and finally obtain the video sequence with embedded watermarks.
[0115] S3. Obtain the video sequence after watermarking according to the methods in S1 to S2, and preprocess the video sequence. The video sequence after watermarking can be an unattacked sequence or a sequence that has been attacked by rotation or scaling.
[0116] Step 3-1: Extract the chroma component U of the input YUV video sequence, then group the video frames. Each group contains the same number of frames as the number used in Step 1-1. Select the frames whose positions correspond to the keyframes obtained in Step 1-2 as keyframes for subsequent watermark extraction.
[0117] Step 3-2-1 (Optional): If the height and width of the input YUV video sequence are coprime numbers, adjust it to a resolution proportional to the original video. As shown in Table 1, taking a 1080p video as an example, it illustrates the size of each block after adaptive segmentation of the U channel component under different scaling factors. When the original video resolution is 1080p, if the height and width of the video are coprime numbers after scaling, it can be adjusted to a resolution close to 1080p as described in Table 1. This function is enabled by default and is mutually exclusive with Step 3-2-2.
[0118] Table 1 shows the adaptive chunk size of the U channel component in a 1080P video at different scaling factors.
[0119]
[0120] Step 3-2-2 (Optional): If the input YUV video sequence has not been scaled and has only undergone a rotation attack, use the center point of the original video and the center point of the input video as the origin, and extract a square with a side length of 50 from the origin. Use the parameter set S to calculate the Zernike moments of the cropped images in the original video and the input video sequence respectively, and then average and subtract them to obtain the final rotation angle estimate. To minimize error, supplementary use and The watermark is extracted from two angles, and the angle with the highest NCC value among the three is selected as the compensation angle. This function is not enabled by default and is mutually exclusive with step 3-2-1. The principle diagram for calculating the compensation angle is shown below. Figure 2 As shown. After applying the compensation angle, watermarks can be extracted from videos rotated at any angle. If step 3-2-2 is not performed, watermarks can be extracted from videos rotated at small angles, rotated 180°, and mirrored.
[0121] Wherein, the parameter set S={(n,m)|(3,1),(5,1),(7,1),(4,2),(6,2),(8,2)}, after calculating the Zernike moments of the cropped images in the original video and input video sequences, the rotation angle is calculated, and the expression is as follows:
[0122]
[0123] The angles obtained are added together, averaged, and then subtracted to obtain the final estimated value of the rotation angle. The expression is as follows:
[0124]
[0125] To minimize error, supplementary use and Extract the watermark from two angles, and select the angle with the highest NCC value among the three as the compensation angle. This function is not enabled by default and is mutually exclusive with step 3-2-1.
[0126] Step 3-3: Repeat steps 1-3.
[0127] Steps 3-4: Perform singular value decomposition on each block after adaptive segmentation of each keyframe, extract the maximum value of the singular value of each block, and then combine them in order to obtain the feature matrix. Adjust its size to the size of feature matrix A in steps 1-4 to finally obtain feature matrix B, which is used for subsequent watermark extraction.
[0128] Steps 3-5: Repeat steps 1-5 through 1-7.
[0129] S4. Extract watermark.
[0130] Step 4-1: Use the modulo value of the filtered Zernike moments in each keyframe as a carrier to extract the watermark, where the quantization step size Δ needs to use the same parameter value as the embedding step. Assume |B n,m | represents the modulus of the Zernike moment for embedding the watermark, and b represents the extracted watermark position, which can be obtained by the following formula:
[0131]
[0132] in, The expression is as follows:
[0133]
[0134] Δ represents the quantization step size, and argmin(·) returns the independent variable used to minimize the function value. The watermark information w∈{0,1} has a quantization step size Δ=30000.
[0135] Step 4-2: After extracting the watermark embedded in all selected moments within the keyframe, in order to reduce the possibility of abrupt changes in the extraction results, the moment with the highest frequency is selected as the final extracted watermark bit for each target frame to reduce the bit error rate and improve the accuracy of the extraction results. The watermark bits extracted from all keyframes are then combined in sequence as the final watermark data.
[0136] Peak signal-to-noise ratio (PSNR), structural similarity (SSIM), video quality metric (VQM), normalized cross-correlation value (NCC), and seconds (s) can be used as evaluation metrics: the higher the PSNR and SSIM values and the lower the VQM, the better the imperceptibility, while the higher the NCC, the better the watermark robustness.
[0137] Tables 2 to 4 show the comparison results with the methods used in other literature. The literature used is:
[0138] Reference 1:
[0139] ASIKUZZAMAN M,ALAM M,LAMBERT A,et al.Imperceptible and robust blindvideo watermarking using chrominance embedding:a set of approaches in the DT-CWT domain[J].IEEE Transactions on Information Forensics and Security,2014,9(9):1502-1517.
[0140] Reference 2:
[0141] HUAN W, LI S, QIAN Z, et al.: Exploring stable coefficients on joint sub-bands for robust video watermarking in DT CWT domain[J]. IEEE Transactions onCircuits and Systems for Video Technology, 2021, 32(4):1955-1965.
[0142] Reference 3:
[0143] ERNAWAN F,KABIR M NA blind watermarking technique using redundantwavelet transform for copyright protection[C]. Proceedings of the 2018IEEE14th International Colloquium on Signal Processing&Its Applications(CSPA),2018:221-226.
[0144] Reference 4:
[0145] CHEN S,CHEN Y,CHEN Y,et al.Robust Video Watermarking Using NormalizedZernike Moments[C].Proceedings of Artificial Intelligence and Security:8thInternational Conference,2022:323-336.
[0146] Reference 5:
[0147] HE W, SUN J, YANG Z, et al. Video watermarking scheme based on normalization of pseudo-Zernike moment [C]. Proceedings of the International Conference on Measuring Technology and Mechatronics Automation, 2010: 1080-1082.
[0148] Table 2 compares the PSNR, SSIM, and VQM of the present invention with existing methods in a publicly available video dataset. The results show that the present invention has better imperceptibility than existing methods. Table 3 compares the NCC of the present invention with existing methods in a publicly available video dataset. The results show that the present invention has high and stable robustness. Table 4 compares the embedding extraction efficiency of the present invention with existing methods in a publicly available video dataset, using seconds (s) as the evaluation metric. The results show that the present invention has high embedding extraction efficiency.
[0149] Table 2 Comparison of PSNR, SSIM, and VQM with existing methods
[0150]
[0151]
[0152] Table 3. NCC Comparison with Existing Methods
[0153]
[0154] Table 4 Comparison of embedding extraction efficiency with existing methods
[0155] Method Embedding step Extraction step Document 1 0.9841 0.4755 Document 2 0.8605 2.3757 Document 3 11.0521 2.7778 Document 4 6.7238 4.2836 Document 5 Cannot be applied Cannot be applied Method of the invention 0.8999 0.2963
[0156] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A fast video robust watermarking method based on Zernike moments, characterized in that, The method includes adding watermarks and extracting watermarks. Adding a watermark includes the following steps: S1. Obtain the unwatermarked video sequence, preprocess the video sequence to obtain the Zernike moments for embedding the watermark, wherein the specific steps of the preprocessing in S1 include: S1-1. Extract the chroma components of the video sequence and group the video frames of the video sequence into groups, with each group containing the same number of frames. S1-2. For each group, determine the difference between each pair of adjacent frames, select the pair of adjacent frames with the smallest difference to form a frame pair, and cover the previous frame to the next frame, and take the covered next frame as the key frame. S1-3. Use the adaptive block division method to divide the keyframe into corresponding non-overlapping blocks; S1-4. Perform singular value decomposition on each block obtained in S1-3, extract the maximum value of the singular value of each block corresponding to the key frame, and combine the maximum value of the singular value of each block into the feature matrix of the corresponding key frame. S1-5, Calculate the Zernike moments of the characteristic matrix; S1-6, Delete a portion of Zernike moments; S1-7. Sort the remaining Zernike moments in S1-6 in ascending order by index and filter them to obtain the Zernike moments used for embedding watermarks. In S1-6, the specific deletion of some Zernike moments is as follows: Zernike moments when the repetition m is a multiple of 4, Zernike moments when the repetition m and the order n are both 0 or 1, and Zernike moments when the repetition m is less than 0. S2. Embed the watermark data into the Zernike moments obtained in S1-7 to obtain the video sequence with the watermark embedded. Extracting watermarks involves the following steps: S3. Obtain the video sequence after watermarking according to the method of S1 to S2, preprocess the video sequence to obtain the Zernike moments with watermarking, wherein the video sequence after watermarking has not been attacked or has been attacked by rotation or scaling. The specific steps of S3 preprocessing are as follows: S3-1. Extract the chroma component from the video sequence after embedding the watermark, group the video sequence, and each group contains the same number of frames as in S1-1. Select the frames that correspond to the keyframes in S1-2 as keyframes. S3-2, Repeat S1-3; S3-3. Perform singular value decomposition on each block obtained in S3-2, extract the maximum value of the singular value of each block corresponding to the key frame, combine the maximum value of the singular value of each block to form the feature matrix of the corresponding key frame, and adjust the size of the feature matrix to the size of the feature matrix in S1-4. S3-4, Repeat S1-5 to S1-7 to obtain the Zernike moments with embedded watermarks; S4. Extract the watermark using Zernike moments from the embedded watermark in S3.
2. The fast video robust watermarking method based on Zernike moments according to claim 1, characterized in that, In S1-5, the specific steps for calculating the Zernike moments of the characteristic matrix are as follows: Calculate the Zernike polynomial; Let f(x,y) be the characteristic matrix of S1-4. Calculate the Zernike moments of the characteristic matrix with order n and repetition degree m, where (x,y) represents a point in a Cartesian coordinate system. The expression for Zernike moments is: Where f represents the pixel value, and the relationship between ρ, θ and x, y is expressed as: θ=tan -1 (y / x), V n,m Let m be a Zernike polynomial of order n and repetition degree m, where * denotes conjugation. The expression for a Zernike polynomial of order n and repetition degree m is: V n,m (x,y)R n,m (ρ)e jmθ Among them, R n,m (ρ) is an orthogonal radial polynomial, and its expression is: Where n is the order and m is the degree of repetition.
3. The fast video robust watermarking method based on Zernike moments according to claim 1, characterized in that, In S1-7, the subscripts of the Zernike moments are the order n and the repetition m, with the order n having higher priority than the repetition m. The specific steps for filtering in S1-7 are as follows: set the filtering coefficient α, and select the first α×L Zernike moments after sorting as Zernike moments for embedding watermarks, where L is the total number of sorted Zernike moments.
4. The fast video robust watermarking method based on Zernike moments according to claim 1, characterized in that, The specific steps of S2 are as follows: S2-1. Obtain the Zernike moment from S1 for embedding the watermark, and embed the watermark data into the amplitude of the obtained Zernike moment. S2-2. Constructing the watermark signal based on the moments embedded with the watermark data; S2-3. Superimpose the watermark signal onto the feature matrix of S1-4 to obtain the feature matrix with embedded watermark; S2-4. Perform a series of inverse transformations on the feature matrix with the embedded watermark to obtain the keyframes with the embedded watermark, and then obtain the video sequence with the embedded watermark.
5. A fast video robust watermarking method based on Zernike moments according to claim 4, characterized in that, In S2-1, the watermark embedding formula used to embed the amplitude of the Zernike moment obtained by embedding the watermark data is: Wherein, the superscript w represents the watermark bit, which takes the value 0 or 1, Δ represents the quantization step size, Q represents the quantizer, and |A n,m | represents the modulus of the Zernike moment with order n and repetition degree m; The expression for the quantizer is: Where x' is the input of the quantizer, Δ represents the quantization step size, and the return value of the round function is the sum of the input and output values. The closest integer.
6. A fast video robust watermarking method based on Zernike moments according to claim 5, characterized in that, The specific steps of S4 are as follows: S4-1. Calculate the watermark bit from the Zernike moments embedded with the watermark and extract the watermark, wherein the quantization step size when extracting the watermark is equal to the quantization step size in S2-1. S4-2. From the watermarks extracted in S4-1, select the watermark with the highest frequency of the corresponding embedded Zernike moments as the final extracted watermark.
7. A fast video robust watermarking method based on Zernike moments according to claim 6, characterized in that, The expression for the watermark bit in S4-1 is: Where b represents the extracted watermark position, w b Indicates watermark information, |B n,m | represents the modulus of the Zernike moment with the embedded watermark, where n is the order and m is the repetition degree.
8. A fast video robust watermarking method based on Zernike moments according to claim 1, characterized in that, In S3, if the height and width of the watermarked video sequence are prime numbers, the watermarked video sequence is adjusted to a resolution proportional to the original video.
9. A fast video robust watermarking method based on Zernike moments according to claim 1, characterized in that, In S3, if the acquired watermarked video sequence has not been scaled but only subjected to a rotation attack, then the center points of the watermarked video sequence and the original video are used as the origin. A square is extracted from the origin, and the Zernike moments of the cropped images in the original video and the watermarked video sequence are calculated using the parameter set. Based on these Zernike moments, the rotation angle is calculated. The obtained angles are added together, averaged, and then subtracted to obtain the final estimated rotation angle. Take the estimated value of the rotation angle as well as and The angle corresponding to the highest normalized cross-correlation value is used as the compensation angle. The video sequence after embedding the watermark is compensated using the compensation angle, and then the video sequence is preprocessed.
Citation Information
Patent Citations
DWT-SVD robust blind watermark method based on Zernike moments
CN103955880A
Robust reversible watermark embedding method and extraction method based on pseudo Zernike moment
CN115861015A