Fast robust video watermarking method based on prime number decomposition Fourier-Mellin moment
Through the Fourier Mellin moment algorithm based on prime number decomposition, it solves the problems of high computational complexity and insufficient attack resistance of traditional video watermarking technology in high-resolution video processing, and achieves efficient and robust video watermark embedding and extraction. Ensure video quality and attack resistance.
Patent Information
- Application Number
- CN202410877453.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-27
AI Technical Summary
Traditional video watermarking technology has high computational complexity when processing high-resolution videos, and is difficult to resist geometric attacks such as rotation and scaling, as well as signal processing attacks such as compression and noise, which affects the efficiency of watermark embedding and extraction.
The Fourier Merlin moment (OFMM) algorithm based on prime number decomposition is used to generate the feature matrix through preprocessing, select frame pairs for adaptive blocking and singular value decomposition, optimize the OFMM algorithm to reduce computational complexity, and embed in the OFMM moment Watermark, taking advantage of its rotation invariance feature to improve robustness.
It improves the robustness and computational efficiency of video watermarks, ensures the persistence and detectability of watermarks in the face of attacks such as rotation and scaling, maintains the visual perception quality of videos, and enhances resistance to compression and noise attacks.
Smart Images

Figure CN118710481A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of video processing, and in particular to a fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments. Background Art
[0002] Traditional video watermarking technology faces several key challenges, including how to embed watermarks without affecting video quality, and how to ensure that watermarks are resistant to various attacks (such as compression, rotation, scaling, etc.). OFMM, as a feature with geometric invariance, is widely used in image and video watermarking technology, but its computational complexity is high, especially when processing high-resolution videos.
[0003] Videos may be subject to scaling and translation during transmission and sharing, which poses a challenge to watermark detection. As video resolution increases, the computational complexity of traditional watermark algorithms will increase significantly, affecting the efficiency of watermark embedding and extraction. In addition to geometric attacks, video watermarks also need to be able to resist signal processing attacks such as compression and noise addition. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a fast and robust video watermarking method based on prime number decomposition Fourier Mellin moment, so as to improve the robustness of video watermarking technology, especially the resistance to geometric attacks such as rotation and scaling and signal processing attacks such as compression and noise.
[0005] The present invention adopts the following technical solutions to achieve the invention objectives: A fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moment, characterized by comprising the following steps: S1: Preprocess the original video to obtain a feature matrix, generate a labeled frame corresponding to each feature matrix, and generate a labeled video by post-processing the frame; S2: watermark embedding; S21: frame pair selection and overlay; S22: Adaptive blocking and singular value decomposition; S23: Optimize OFMM algorithm; S24: OFMM moment correction; S3: watermark extraction; S31: extract U channel and frame pair selection; S32: construct feature matrix B; S33: Calculate OFMM and extract watermark information.
[0006] As a further limitation of the present technical solution, the specific steps of S21 are: Given a host video, use the chrominance component, i.e., the U channel, to carry the watermark. Collect and group all U channel frames to form a group of GOPs. For each GOP, determine the difference between every two adjacent frames: (1); in: and Respectively represent the first Frame position and The pixel value at the frame position; By determining all the differences, two adjacent frames with the smallest difference are selected to form a frame pair for embedding watermarks; After collecting all the frame pairs, the next frame of each frame pair is overwritten with the previous frame, and the next frame overwritten by the previous frame is used as the key frame for watermark embedding. The difference between the frames can be simulated as a watermark. set up and They represent the first Frame and Frame, set is the frame pair to be watermarked, regardless of the current watermark How is it generated? After watermark embedding, becomes , and satisfy: , that is, the first The frame can be regarded as the original The sum of the frame and the watermark.
[0007] As a further limitation of the technical solution, the specific steps of S22 are: Selected Frames Divide into blocks and apply singular value decomposition to each block; set up and They are In order to make the number of blocks in the horizontal and vertical directions equal, calculate and The greatest common divisor of is used as the number of blocks in both directions. Therefore, the size of the block can be expressed as: (2); in: is the height; is the width; express and The greatest common divisor of; After the video frame is divided into blocks, singular value decomposition is applied to each block to extract the largest singular coefficient in each block, and all the extracted coefficients are combined to form a feature matrix , for the feature matrix Processing is performed to generate corresponding marked frames.
[0008] As a further limitation of the present technical solution, the image in the OFMM polar coordinate system Repeatability The definition of is as follows: (3); in: is a non-negative integer; is an integer; is the angular component; is the radial component; is the radial basis function, of The polynomial expression is: (4); in: are the coefficients of the polynomial; exist is weighted orthogonal in the range: (5); in: is the Kronecker symbol; is the normalization factor; represents the k-th order radial basis function, which is a function of the radial component Polynomial function of ; According to radial basis function Angular harmonic factor The properties of OFMM basis functions Orthogonal inside the unit circle: (6); represents radial basis function and Orthogonality conditions between ; represents the angular basis function and Orthogonality conditions between ; According to the orthogonal function system theory, the original image It can be reconstructed by a finite number of OFMMs, such as the highest order and maximum repetition OFMM, the image can be reconstructed as follows: (7).
[0009] As a further limitation of the technical solution, the OFMM algorithm is optimized and the radial basis function calculation strategy is improved to reduce the calculation complexity and improve the calculation accuracy; S231: For each factorial value to be calculated, first decompose it into a product form of prime factors; S232: for specific calculation requirements of polynomial coefficients in OFMM, identifying and canceling the same prime factor parts in the numerator and denominator, thereby reducing the amount of calculation; S233: For the remaining prime factor products, an efficient multiplication algorithm is used to perform calculations to further improve calculation efficiency.
[0010] As a further limitation of the present technical solution, the specific steps of S24 are: S241: After using singular value decomposition, use N-order to determine the OFMM of the feature matrix A of the video frame, and select a suitable moment for watermark embedding; Remove the OFMM that meets one of the following three characteristics, namely , or 1 or ,when When , due to the deviation from orthogonality, the corresponding OFMM cannot be accurately determined, and the number of suitable moments is express; For the above OFMM Sort in ascending order, The smaller, The smaller, but The same, the higher the priority; Using ratio parameters To select the OFMM to be embedded, the first one in the above sorting sequence is used OFMM is used to embed watermark; S242: Each selected frame pair carries only one bit. Therefore, the following embedding operation is performed on each selected OFMM: (8); The watermark is embedded into the selected moments by modifying the amplitude of the OFMM, reconstructing the watermark feature matrix, and using it to generate the marked frame where the superscript Indicates that the variable is labeled; in: Indicates watermark bit information; is the quantizer defined in equation (8); For the quantification step, according to The value of is determined; is the position in the original feature matrix The value of the OFMM coefficient at determines the original amplitude is the corrected moment amplitude; (9); in: Returns the integer closest to the input number; S243: After each bit is corrected by the quantization step size of the selected OFMM amplitude, after processing, a watermark matrix signal is constructed using the watermarked OFMM. The signal is represented by a residual matrix R of the same size as The calculation formula is: (10); in: and is the polar coordinate, , ; and is the coordinate variable in the Cartesian coordinate system, representing the residual matrix The position of the elements in is the corrected moment; is the orthogonal Fourier-Mellin polynomial; S244: Use factor Right now Will Add to In the process, the singular value decomposition inverse transform is performed to reconstruct the watermark frame. The coefficient controls the embedding strength and maintains invisibility. The value of is given by: (11); in: Collect the elements in the inscribed circle of the input matrix and return the average of these elements; is a reconstructed version without removing moments that are not suitable for embedding watermarks ; Middle position The elements of can be represented as: (12); in: represents the highest order of Fourier-Mellin moment; S245: Perform inverse singular value decomposition on the watermark feature matrix to obtain a watermark frame, the difference between the watermark frame and the original frame is the watermark, and the difference between the watermarked frame and the latter frame in the original frame pair is overwritten to obtain a watermarked video.
[0011] As a further limitation of the technical solution, the specific steps of S31 are: Extract the U channel from the labeled video, which is the same as the embedding process; According to the same criteria as in the embedding process, frame pair selection is performed, and usually two adjacent frames with the smallest change are selected as the frame pair to be processed.
[0012] As a further limitation of the present technical solution, the specific steps of S32 are: When extracting, find the frame pairs selected during embedding, divide them into blocks and perform singular value decomposition to obtain the feature matrix B, and apply singular value decomposition to each block; The key information used to construct the feature matrix B is extracted from the results of the singular value decomposition, which corresponds to the feature matrix A in the embedding process.
[0013] As a further limitation of the technical solution, the specific steps of S33 are: Calculate the OFMM moment of feature matrix B. If the size of feature matrix B is not equal to that of feature matrix A, perform adaptive scaling on B, calculate the OFMM moment value of feature matrix B, extract the same moment coefficient as embedded, extract each bit of binary information according to the difference between the moment amplitude and the quantized value, and extract the final watermark sequence from all frame extraction results. According to the same OFMM selected during embedding, extract the watermark information from the calculated OFMM. For each OFMM used to embed the watermark, the change in its amplitude is used to determine whether the embedded value is 0 or 1. This determination is based on the quantization step size. and the rules used when embedding; As an optional step for rotation and scaling attacks, for large angle rotation attacks, a square area is cropped from the center of the frame, and its OFMM is used to calculate the rotation angle, so as to extract the watermark after angle compensation.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are: the traditional video watermarking method may fail when the video content undergoes a rotation transformation, especially when the rotation angle is large or not a multiple of 90 degrees. The present invention solves the problem of accurately extracting the watermark after undergoing a rotation transformation by utilizing the rotational invariance of the moment.
[0015] The present invention improves the efficiency of processing high-resolution videos by optimizing the algorithm flow, especially by using prime number decomposition to select or optimize the calculation and application of orthogonal Fourier-Mellin (OFMM) moments, improves the robustness of watermarks, and retains the visual perception quality of the original video to the greatest extent. The present invention enhances the persistence and detectability of watermarks in the face of such attacks by improving watermark embedding and extraction strategies. The present invention, i.e., a high-resolution video watermarking method based on OFMM moments, is mainly designed to protect the copyright of video content and has a high degree of robustness against common attacks such as compression, scaling, rotation, etc. This method realizes a watermark system that is secret and difficult to tamper with in the video through sophisticated frame pair selection, adaptive block processing, and the orthogonal and rotational invariant characteristics of OFMM moments. OFMM provides higher computational efficiency and better geometric invariance (especially robustness to rotation and scaling attacks), which is particularly important for video watermarks because video content often needs to be played on different devices and may be subject to various geometric transformations. Frame pairs for embedding watermarks are automatically selected by evaluating the similarity between video frames. This is crucial because it is directly related to the visibility and robustness of the watermark. Singular value decomposition (SVD) is used on the selected frames to extract key features, and then a feature matrix is constructed for calculating the OFMM. The watermark information is embedded in the calculated OFMM coefficients, and the amplitude of the selected OFMM coefficients is adjusted by quantization to encode the watermark information. The embedded watermark information is located and decoded using the same OFMM calculation steps as embedding, including compensation for possible attacks such as rotation and scaling. Optional strategies for handling rotation and scaling attacks are introduced, such as adjusting the OFMM parameters to compensate for these geometric deformations to ensure the integrity of the watermark and the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is the high-resolution video watermark embedding procedure proposed by the present invention.
[0017] Figure 2 This is the watermark extraction procedure proposed by the present invention for high-resolution labeled videos.
[0018] Figure 3 This is the reconstruction order time comparison of the present invention. DETAILED DESCRIPTION
[0019] A specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation.
[0020] The present invention comprises the following steps: S1: Preprocess the original video to obtain a feature matrix, generate a labeled frame corresponding to each feature matrix, and generate a labeled video by post-processing the frame.
[0021] S2: Watermark embedding.
[0022] S21: Frame pair selection and overlay.
[0023] The specific steps of S21 are: Given a host video, use the chrominance component, i.e., the U channel, to carry the watermark. Collect and group all U channel frames to form a group of GOPs. For each GOP, determine the difference between every two adjacent frames: (1); in: and Respectively represent the first Frame position and The pixel value at the frame position; By determining all the differences, two adjacent frames with the smallest difference are selected to form a frame pair for embedding watermarks; After collecting all the frame pairs, the next frame of each frame pair is overwritten with the previous frame, and the next frame overwritten by the previous frame is used as the key frame for watermark embedding. The difference between the frames can be simulated as a watermark. set up and They represent the first Frame and Frame, set is the frame pair to be watermarked, regardless of the current watermark How is it generated? After watermark embedding, becomes , and satisfy: , that is, the first The frame can be regarded as the original The sum of the frame and the watermark, frame The value depends on the frame and watermark .
[0024] S22: Adaptive blocking and singular value decomposition (SVD).
[0025] The specific steps of S22 are: Selected Frames Divide into blocks and apply singular value decomposition to each block; set up Indicates the current frame pair to be embedded. into disjoint blocks. We need to find a suitable block size so that the number of blocks in the horizontal direction is the same as the number of blocks in the vertical direction, so that the use of inscribed circles in high-resolution videos is advantageous for fast and robust video watermarking methods based on prime number decomposition Fourier-Mellin moments; set up and They are In order to make the number of blocks in the horizontal and vertical directions equal, calculate and The greatest common divisor of As the number of blocks in both directions, the block size can therefore be expressed as: (2); in: is the height; is the width; express and The greatest common divisor of; for example ; After the video frame is divided into blocks, singular value decomposition is applied to each block to extract the largest singular coefficient in each block, and all the extracted coefficients are combined to form a feature matrix , for the feature matrix Processing is performed to generate corresponding marked frames.
[0026] OFMM polar coordinate system image Repeatability The definition of is as follows: (3); in: is a non-negative integer; is an integer; It is the angular component, which represents the angle from the 0 degree position of the polar coordinate system (usually the positive direction of the x-axis) to a certain point. The value range is ; is the radial component, which represents the distance from the origin to a certain point. Its value range is usually [0,1], because in image processing, the image is usually normalized to the unit circle; is the radial basis function, of The polynomial expression is: (4); in: are the coefficients of the polynomial; exist is weighted orthogonal in the range: (5); in: is the Kronecker symbol; is the normalization factor; represents the k-th order radial basis function, which is a function of the radial component Polynomial function of ; According to radial basis function Angular harmonic factor The properties of OFMM basis functions Orthogonal inside the unit circle: (6); represents radial basis function and The orthogonality condition between ,when hour, ;when hour, , this condition indicates that radial basis functions of different orders are in the interval The interior is orthogonal; represents the angular basis function and The orthogonality condition between ,when hour, ;when hour, , this condition indicates that the angular basis functions of different angular frequencies are in the interval is orthogonal only when and When , the right side of the equal sign in the above formula is , otherwise it is 0, which shows that the basis functions of OFMM form a complete orthogonal basis function system within the unit circle; In the mathematical expression related to the Fourier-Mellin moment (OFMM), and is a common index variable used to describe the angular and radial components of the basis function. The physical meaning of formula (6) is to express the orthogonality conditions of the OFMM basis function in the radial and angular directions.
[0027] In complex analysis, it is usually used to represent the imaginary unit, that is, In Fourier analysis, the imaginary unit Used to represent the angular component of the complex exponential function.
[0028] In the formulas for the Fourier transform and the Fourier-Mellin moments, Appears in complex exponential functions to represent angular changes. For example: (13); in: represents the change of angular direction in the polar coordinate system, is the index of the angular frequency component, where is the imaginary unit, representing the complex exponent.
[0029] In the expression of Fourier-Mellin moments, the complex exponential function and Represent two complex exponential functions with different angular frequencies. is the angle parameter, and its value range is [0, 2π]. is an integer variable representing another angular frequency used with Compare to determine whether the two angular basis functions are orthogonal.
[0030] According to the orthogonal function system theory, the original image It can be reconstructed by a finite number of OFMMs, such as the highest order and maximum repetition OFMM, the image can be reconstructed as follows: (7).
[0031] The OFMM algorithm is optimized and the radial basis function calculation strategy is improved to reduce the calculation complexity and improve the calculation accuracy; S231: For each factorial value to be calculated, first decompose it into a product form of prime factors; Factorials can be represented as a collection of prime factors rather than a single large number, for example: In OFMM, we often need to use such factorial operations, especially when it comes to formula (4). By expressing the factorial as the product of its prime factors, these operations can be handled more efficiently. Observing formula (4), it is not difficult to find that the values in formula (4) are accumulated from the beginning. For this formula, it is noted that there are multiple factorial combinations in the numerator and denominator. How to optimize these factors to improve computational efficiency is discussed. First, it must be noted that the factors in some combinations can be directly eliminated. For example: for and ,then , yes subset of , so they have many factors that directly cancel each other out. Then, yes A subset of , the extra one is just a multiplier of Based on the above observations, we propose a simplified calculation procedure.
[0032] S232: for specific calculation requirements of polynomial coefficients in OFMM, identifying and canceling the same prime factor parts in the numerator and denominator, thereby reducing the amount of calculation; For each The value of , which actually only involves The multiplication of these numbers, because the other parts will be Offset. and , we only need to multiply This extra multiplier. This simplification method provides us with computational convenience because we no longer need to perform a full factorial calculation, but can directly calculate the necessary multipliers. Through the Sieve of Eratosthenes, a pure, non-redundant list of numbers can be obtained. Finally, each factorial factor is decomposed and saved, and then the numerator and denominator are eliminated, and the remaining terms are finally calculated. This optimization method not only reduces the total number of calculation steps, but also improves the accuracy of the calculation, especially when the sum is large. By removing unnecessary calculations, we also reduce the possibility of errors, especially in the case of numerical overflow or underflow, we only save prime numbers and their exponents, which greatly reduces storage requirements.
[0033] S233: This method can process large numbers more accurately because all calculations are based on decimals, which greatly improves stability. For the remaining prime factor products, an efficient multiplication algorithm is used to calculate, further improving the calculation efficiency. Due to technical and theoretical limitations, the traditional method reaches its limit at the 21st order. When processing images higher than this order, not only does the reconstruction error increase dramatically, but it also seriously affects the quality of the reconstructed image. The new factorial calculation method we proposed can directly and efficiently process higher-order images.
[0034] S24: OFMM moment correction.
[0035] The purpose of OFMM moment modification is to embed watermarks, which includes multiple steps, such as Figure 2 The specific steps of S24 are as follows: S241: After using singular value decomposition, use N-order to determine the OFMM of the feature matrix A of the video frame, and select a suitable moment for watermark embedding; Remove the OFMM that meets one of the following three characteristics, namely , or 1 or ,when When , due to the deviation from orthogonality, the corresponding OFMM cannot be accurately determined, and the number of suitable moments is express; For the above OFMM Sort in ascending order, The smaller, The smaller, but The same, the higher the priority; Using ratio parameters To select the OFMM to be embedded, the first one in the above sorting sequence is used OFMM is used for watermark embedding; since low-order OFMM can better resist geometric attacks and noise-like distortion, we can select a suitable To maximize robustness; S242: Each selected frame pair carries only one bit. Therefore, the following embedding operation is performed on each selected OFMM: (8); The watermark is embedded into the selected moments by modifying the amplitude of the OFMM, reconstructing the watermark feature matrix, and using it to generate the marked frame where the superscript Indicates that the variable is labeled; in: Indicates watermark bit information; is the quantizer defined in equation 8; For the quantification step, according to The value of is determined; is the position in the original feature matrix The value of the OFMM coefficient at determines the original amplitude is the corrected moment amplitude; (9); in: Returns the integer closest to the input number; S243: Each bit is quantized by the step size After the selected OFMM amplitude is corrected, a watermark matrix signal is constructed using the watermarked OFMM after processing. The signal is represented as a residual matrix R of the same size as The calculation formula is: (10); in: and is the polar coordinate, , ; and is the coordinate variable in the Cartesian coordinate system, representing the residual matrix The position of the elements in is the corrected moment; is the orthogonal Fourier-Mellin polynomial; S244: Use factor Right now Will Add to In the process, the singular value decomposition inverse transform is performed to reconstruct the watermark frame. The coefficient controls the embedding strength and maintains invisibility. The value of is given by: (11); in: Collect the elements in the inscribed circle of the input matrix and return the average of these elements; is a reconstructed version without removing moments that are not suitable for embedding watermarks ; Middle position The elements of can be represented as: (12); in: Indicates the highest order of Fourier-Mellin moments; it determines the number of Fourier-Mellin moments used to reconstruct the image. The higher the order, the higher the accuracy of the reconstructed image, but the computational complexity will also increase; S245: Perform inverse singular value decomposition on the watermark feature matrix to obtain a watermark frame, the difference between the watermark frame and the original frame is the watermark, and the difference between the watermarked frame and the latter frame in the original frame pair is overwritten to obtain a watermarked video.
[0036] S3: Watermark extraction.
[0037] S31: Extract U channel and frame pair selection.
[0038] The specific steps of S31 are: Extract the U channel (chrominance component) from the labeled video, which is the same as the embedding process; According to the same criteria as in the embedding process, frame pair selection is performed, and usually two adjacent frames with the smallest change are selected as the frame pair to be processed.
[0039] S32: Construct feature matrix B.
[0040] The specific steps of S32 are: When extracting, find the frame pairs selected during embedding, divide them into blocks and perform singular value decomposition to obtain the feature matrix B, and apply singular value decomposition to each block; The key information used to construct the feature matrix B is extracted from the results of the singular value decomposition, which corresponds to the feature matrix A in the embedding process.
[0041] S33: Calculate OFMM and extract watermark information.
[0042] The specific steps of S33 are: Calculate the OFMM moment of feature matrix B. If the size of feature matrix B is not equal to that of feature matrix A, perform adaptive scaling on B, calculate the OFMM moment value of feature matrix B, extract the same moment coefficient as embedded, extract each bit of binary information according to the difference between the moment amplitude and the quantized value, and extract the final watermark sequence from all frame extraction results. According to the same OFMM selected during embedding, extract the watermark information from the calculated OFMM. For each OFMM used to embed the watermark, the change in its amplitude is used to determine whether the embedded value is 0 or 1. This determination is based on the quantization step size. and the rules used when embedding; As an optional step for rotation and scaling attacks, for large angle rotation attacks, a square area is cropped from the center of the frame, and its OFMM is used to calculate the rotation angle, so as to extract the watermark after angle compensation.
[0043] Adaptive resizing: If the attacked video has been scaled, the video frame needs to be resized first to ensure that the calculation of positive OFMM can be performed accurately.
[0044] Angle compensation: For videos rotated at large angles, the rotation angle is estimated in advance and corresponding angle compensation is performed to ensure that the watermark information can be accurately extracted.
[0045] Orthogonal Fourier-Mellin moments (OFMM) have higher computational efficiency while maintaining mathematical orthogonality and scale invariance. This is because the prime factorial decomposition algorithm proposed in the present invention effectively supports and greatly reduces the demand for computing resources, making it more efficient to process high-resolution videos. OFMM is not only invariant to rotation, but also invariant to scaling, which enables the watermark to be accurately detected after common video editing operations such as scaling. In addition, these properties of OFMM also make the watermark system more robust to complex geometric attacks. By precisely controlling the embedded OFMM coefficients, the present invention can not only improve the concealment of the watermark, but also enhance the robustness of the watermark without sacrificing video quality. This method allows effective resistance to common signal processing attacks such as compression and noise while maintaining the visual quality of the video. In summary, by using orthogonal Fourier-Mellin moments (OFMM), not only the computational efficiency and robustness of video watermarking technology are improved, but also its application applicability in different video editing and playback environments is expanded. These advantages make the present invention have important practical value both commercially and technically.
[0046] The above disclosure is only a specific embodiment of the present invention, but the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments, characterized in that: The following steps are involved: S1: Preprocess the original video to obtain a feature matrix, generate a labeled frame corresponding to each feature matrix, and generate a labeled video by post-processing the frame; S2: watermark embedding; S21: frame pair selection and overlay; S22: Adaptive blocking and singular value decomposition; S23: Optimize OFMM algorithm; S24: OFMM moment correction; S3: watermark extraction; S31: extract U channel and frame pair selection; S32: construct feature matrix B; S33: Calculate OFMM and extract watermark information.
2. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 1 is characterized in that: The specific steps of S21 are: Given a host video, use the chrominance component, i.e., the U channel, to carry the watermark. Collect and group all U channel frames to form a group of GOPs. For each GOP, determine the difference between every two adjacent frames: (1); in: and Respectively represent the first Frame position and The pixel value at the frame position; By determining all the differences, two adjacent frames with the smallest difference are selected to form a frame pair for embedding watermarks; After collecting all the frame pairs, the next frame of each frame pair is overwritten with the previous frame, and the next frame overwritten by the previous frame is used as the key frame for watermark embedding. The difference between the frames can be simulated as a watermark. set up and They represent the first Frame and Frame, set is the frame pair to be watermarked, regardless of the current watermark How is it generated? After watermark embedding, becomes , and satisfy: , that is, the first The frame can be regarded as the original The sum of the frame and the watermark.
3. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 2 is characterized in that: The specific steps of S22 are: Selected Frames Divide into blocks and apply singular value decomposition to each block; set up and They are In order to make the number of blocks in the horizontal and vertical directions equal, calculate and The greatest common divisor of is used as the number of blocks in both directions, so the block size can be expressed as: (2); in: is the height; is the width; express and The greatest common divisor of; After the video frame is divided into blocks, singular value decomposition is applied to each block to extract the largest singular coefficient in each block, and all the extracted coefficients are combined to form a feature matrix , for the feature matrix Processing is performed to generate corresponding marked frames.
4. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 3 is characterized by: OFMM polar coordinate system image Repeatability is defined as follows: (3); in: is a non-negative integer; is an integer; is the angular component; is the radial component; is the radial basis function, of The polynomial expression is: (4); in: are the coefficients of the polynomial; exist is weighted orthogonal in the range: (5); in: is the Kronecker symbol; is the normalization factor; represents the k-th order radial basis function, which is a function of the radial component Polynomial function of ; According to radial basis function Angular harmonic factor The properties of OFMM basis functions Orthogonal inside the unit circle: (6); represents radial basis function and Orthogonality conditions between ; represents the angular basis function and Orthogonality conditions between ; According to the orthogonal function system theory, the original image It can be reconstructed by a finite number of OFMMs, such as the highest order and maximum repetition OFMM, the image can be reconstructed as follows: (7)。 5. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 4 is characterized in that: The OFMM algorithm is optimized and the radial basis function calculation strategy is improved to reduce the calculation complexity and improve the calculation accuracy; S231: For each factorial value to be calculated, first decompose it into a product form of prime factors; S232: for specific calculation requirements of polynomial coefficients in OFMM, identifying and canceling the same prime factor parts in the numerator and denominator, thereby reducing the amount of calculation; S233: For the remaining prime factor products, an efficient multiplication algorithm is used to calculate to further improve the calculation efficiency.
6. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 5 is characterized by: The specific steps of S24 are: S241: After using singular value decomposition, use N-order to determine the OFMM of the feature matrix A of the video frame, and select a suitable moment for watermark embedding; Remove the OFMM that meets one of the following three characteristics, namely , or 1 or ,when When , due to the deviation from orthogonality, the corresponding OFMM cannot be accurately determined, and the number of suitable moments is express; For the above OFMM Sort in ascending order, The smaller, The smaller, but The same, the higher the priority; Using ratio parameters To select the OFMM to be embedded, the first one in the above sorting sequence is used OFMM is used to embed watermark; S242: Each selected frame pair carries only one bit. Therefore, the following embedding operation is performed on each selected OFMM: (8); The watermark is embedded into the selected moments by modifying the amplitude of the OFMM, reconstructing the watermark feature matrix, and using it to generate the marked frame where the superscript Indicates that the variable is labeled; in: Indicates watermark bit information; is the quantizer defined in equation (8); For the quantification step, according to The value of is determined; is the position in the original feature matrix The value of the OFMM coefficient at determines the original amplitude is the corrected moment amplitude; (9); in: Returns the integer closest to the input number; S243: After each bit is corrected by the quantization step size of the selected OFMM amplitude, after processing, a watermark matrix signal is constructed using the watermarked OFMM. The signal is represented by a residual matrix R of the same size as The calculation formula is: (10); in: and is the polar coordinate, , ; and is the coordinate variable in the Cartesian coordinate system, representing the residual matrix The position of the elements in is the corrected moment; is the orthogonal Fourier-Mellin polynomial; S244: Use factor Right now Will Add to In the process, the singular value decomposition inverse transform is performed to reconstruct the watermark frame. The coefficient controls the embedding strength and maintains invisibility. The value of is given by: (11); in: Collect the elements in the inscribed circle of the input matrix and return the average of these elements; is a reconstructed version without removing moments that are not suitable for embedding watermarks ; Middle position The elements of can be represented as: (12); in: represents the highest order of Fourier-Mellin moments; S245: Perform inverse singular value decomposition on the watermark feature matrix to obtain a watermark frame, the difference between the watermark frame and the original frame is the watermark, and the difference between the watermarked frame and the latter frame in the original frame pair is overwritten to obtain a watermarked video.
7. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 6 is characterized by: The specific steps of S31 are: Extract the U channel from the labeled video, which is the same as the embedding process; According to the same criteria as in the embedding process, frame pair selection is performed, and usually two adjacent frames with the smallest change are selected as the frame pair to be processed.
8. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 7 is characterized in that: The specific steps of S32 are: When extracting, find the frame pairs selected during embedding, divide them into blocks and perform singular value decomposition to obtain the feature matrix B, and apply singular value decomposition to each block; The key information used to construct the feature matrix B is extracted from the results of the singular value decomposition, which corresponds to the feature matrix A in the embedding process.
9. The fast and robust video watermarking method based on prime number decomposition Fourier-Mellin moments according to claim 8, characterized in that: The specific steps of S33 are: Calculate the OFMM moment of feature matrix B. If the size of feature matrix B is not equal to that of feature matrix A, perform adaptive scaling on B, calculate the OFMM moment value of feature matrix B, extract the same moment coefficient as embedded, extract each bit of binary information according to the difference between the moment amplitude and the quantized value, and extract the final watermark sequence from all frame extraction results. According to the same OFMM selected during embedding, extract the watermark information from the calculated OFMM. For each OFMM used to embed the watermark, the change in its amplitude is used to determine whether the embedded value is 0 or 1. This determination is based on the quantization step size. and the rules used when embedding; As an optional step for rotation and scaling attacks, for large angle rotation attacks, a square area is cropped from the center of the frame, and its OFMM is used to calculate the rotation angle, so as to extract the watermark after angle compensation.
Citation Information
Cited By
Hybrid video double-watermark method and system
CN119496963A
Fast and accurate ternary number orthogonal-Fourier-Mellin moment zero watermark construction method
CN120013739A
