Video watermark embedding processing method, extraction processing method, device and equipment
By converting video data to YUV color space, dynamically calculate the minimum perceptible difference threshold in the airspace and combining BCH encoding and time domain grouping strategies, the robustness problem of the airspace video watermark algorithm in the screen camera channel is solved, and stable watermark embedding and extraction in complex attack environments is realized.
Patent Information
- Application Number
- CN202510518813.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-24
AI Technical Summary
The existing airspace video watermarking algorithm is poorly robust to composite attacks under the screen camera channel, making it difficult to effectively resist geometric deformation and composite noise interference.
By converting the video data into YUV space, using the visual characteristics of the brightness and chromaticity channels, the minimum perceptible difference threshold for the airspace is dynamically calculated, and combining BCH encoding and time domain grouping strategies to embed and extract watermarks to enhance robustness.
It improves the stability and robustness of video watermarks under the screen camera channel, can effectively resist screen camera attacks, and ensures the concealment and reliable extraction of watermark information.
Smart Images

Figure CN120075545B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer information processing, and in particular to a video watermark embedding processing method, extraction processing method, device and equipment. Background Art
[0002] Information hiding technology, a fundamental paradigm in multimedia security, aims to embed encrypted or encoded sensitive information in an imperceptible manner within a carrier by analyzing the redundant characteristics of the host data. This allows for covert communication and copyright identification while maintaining the perceived quality of the original content. Within this technical framework, digital watermarking has become a key research direction due to its wide applicability. Using specific algorithms, digital watermarking can covertly embed unique copyright identifiers or metadata into digital media such as images and audio, creating a verifiable and robust marking system that supports content traceability, tamper detection, and copyright assertion. Video watermarking, with its ability to accommodate various video formats, has become an extremely pressing industry need. Video watermarking systems typically utilize imperceptible information embedding mechanisms to covertly transmit copyright information while maintaining visual quality. This technical framework requires the construction of an embedding model that integrates multi-dimensional features. For example, by incorporating the quantization parameters of video coding standards, adaptive embedding strategies can be designed across multiple dimensions: temporal, spatial, and transform domains.
[0003] Based on the differences in embedding domain characteristics and performance indicators, existing video watermarking algorithms can be divided into two mainstream methods: frequency domain and spatial domain. Their technical paths and applicable scenarios show significant differences. Video watermarking technology based on frequency domain characteristics analyzes the spectral distribution characteristics of video signals to achieve covert embedding of watermark information in transform domain coefficients. Typical methods use discrete cosine transform to construct a block transform matrix, or combine it with a multi-resolution analysis framework of discrete wavelet transform, giving priority to low-frequency components for quantization modulation. Benefiting from the energy concentration characteristics of the frequency domain, this type of algorithm has natural compatibility with compression coding such as H.264 / HEVC, and exhibits strong robustness against attacks such as re-encoding and noise interference in traditional channels. However, it has poor robustness against the composite distortion accumulated by the video decoding, screen display, optical acquisition, and re-encoding processes included in the screen capture attack chain.
[0004] Spatial video watermarking technology generally operates directly on the spatial pixel values of video frames, often employing strategies to improve the robustness and invisibility of the watermark. For example, by leveraging the characteristics of the human visual system (HVS), watermarks are embedded in pixels in areas of low eye sensitivity. A common approach is to embed copyright information by changing pixel brightness, color, and other components. This type of algorithm circumvents complex frequency domain transformation calculations and offers significant advantages in real-time streaming and low-power devices. However, existing spatial video watermarking algorithms face a significant conflict between visual masking and embedding strength in screen capture scenarios, leading to instability in the face of complex screen capture attacks. Summary of the Invention
[0005] The present invention provides a video watermark embedding processing method, extraction processing method, device and equipment, which can effectively resist the geometric deformation and composite noise interference problems caused by the screen-camera channel, and enhance the stability during screen capture attacks.
[0006] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0007] An embodiment of the present invention provides a video watermark embedding processing method, comprising:
[0008] Obtain video data to be processed;
[0009] Performing color space conversion processing on the video data to be processed to obtain original video data;
[0010] Segmenting the original video data according to a preset time length to obtain a plurality of time domain groups, wherein each time domain group includes continuous video frames;
[0011] Performing equal division processing on the continuous video frames to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data;
[0012] Performing dynamic threshold calculation processing on the multiple channel data to obtain spatial just noticeable difference thresholds of the multiple channels;
[0013] According to the spatial domain just noticeable difference thresholds of the multiple channels, watermark embedding processing is performed on the multiple channel data to obtain video data embedded with watermarks.
[0014] Optionally, performing dynamic threshold calculation processing on the multiple channel data to obtain spatial just noticeable difference thresholds of the multiple channels includes:
[0015] Determining residual masking effect data according to the plurality of channel data;
[0016] Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data;
[0017] determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data;
[0018] Determining self-information of a color component based on the chrominance channel data;
[0019] performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance;
[0020] determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency;
[0021] Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
[0022] Optionally, determining spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perceptual weight data includes:
[0023] according to:
[0024] ,
[0025] Obtaining the spatial just noticeable difference thresholds of multiple channels;
[0026] Among them, JND θ,k is the spatial least noticeable difference threshold of the θ channel, θ∈{Y,U,V}, Y is brightness, U and V are chrominance, DM k,θ is the composite masking effect data, and PW is the perceptual weight data.
[0027] Optionally, performing watermark embedding processing on the multiple channel data according to the spatial just noticeable difference thresholds of the multiple channels to obtain watermarked video data includes:
[0028] Get watermark data;
[0029] Encoding the watermark data to obtain watermark bit data;
[0030] According to the spatial domain just noticeable difference thresholds and watermark bit data of the multiple channels, watermark embedding processing is performed on the multiple channel data to obtain video data embedded with watermarks.
[0031] The embodiment of the present invention further provides a video watermark extraction and processing method, comprising:
[0032] Get video data with watermark;
[0033] Performing color space conversion processing on the video data with the watermark to obtain video data after color space conversion;
[0034] Segmenting the video data after the color space conversion according to a preset time length to obtain a plurality of time domain groups;
[0035] Equally dividing the video frames in the multiple time domain groups to obtain a first video frame and a second video frame;
[0036] Performing statistical processing on the difference between the first video frame and the second video frame to obtain a comprehensive difference value;
[0037] Determining a watermark bit position according to the comprehensive difference value;
[0038] The watermark bits are processed to obtain watermark data.
[0039] Optionally, performing statistical processing on the difference between the first video frame and the second video frame to obtain a comprehensive difference value includes:
[0040] according to:
[0041] ,
[0042] Get the comprehensive difference value;
[0043] Among them, D j is the comprehensive difference value, is the mean value of the jth frame in channel θ of the first part of the video, is the mean value of the jth frame in channel θ of the second part of the video, Y is the brightness, and U and V are the chrominance.
[0044] Optionally, determining a watermark bit position according to the comprehensive difference value includes:
[0045] according to:
[0046] ,
[0047] Get the watermark bits;
[0048] in, is the watermark bit.
[0049] The embodiment of the present invention further provides a video watermark embedding processing device, comprising:
[0050] A first acquisition module, configured to acquire video data to be processed;
[0051] The first processing module is used to perform color space conversion processing on the video data to be processed to obtain original video data; segment the original video data according to a preset time length to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; divide the continuous video frames into equal parts to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data; perform threshold dynamic calculation processing on the multiple channel data to obtain spatial domain just noticeable difference thresholds of the multiple channels; and perform watermark embedding processing on the multiple channel data according to the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with watermarks.
[0052] The embodiment of the present invention further provides a video watermark extraction and processing device, comprising:
[0053] The second acquisition module is used to obtain video data with a watermark;
[0054] The second processing module is used to perform color space conversion processing on the video data with the watermark to obtain video data after color space conversion; segment the video data after color space conversion according to a preset time length to obtain multiple time domain groups; divide the video frames in the multiple time domain groups into equal parts to obtain a first video frame and a second video frame; perform difference statistics processing on the first video frame and the second video frame to obtain a comprehensive difference value; determine the watermark bit position based on the comprehensive difference value; and process the watermark bit position to obtain watermark data.
[0055] An embodiment of the present invention further provides a computing device, comprising: a processor and a memory storing a computer program, wherein the computer program executes the above method when executed by the processor.
[0056] The technical solution of the present invention includes at least the following effects:
[0057] The above-mentioned solution of the present invention performs color space conversion on the video data to be processed to obtain original video data; segments the original video data according to a preset duration to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; divides the continuous video frames into equal parts to obtain a first video frame and a second video frame, wherein each of the first and second video frames includes multiple channel data, including luminance channel data and chrominance channel data; dynamically calculates thresholds on the multiple channel data to obtain spatial just noticeable difference thresholds for the multiple channels; and embeds watermarks on the multiple channel data based on the spatial just noticeable difference thresholds for the multiple channels to obtain watermarked video data; and the process of obtaining the spatial just noticeable distortion threshold relies on the collaborative modeling of the double masking effect driven by the active prediction mechanism of the visual cortex, combined with heterogeneous visual feature analysis and dynamic perceptual weight adaptive control mechanism, ultimately achieving just noticeable difference (JND) threshold quantization. The obtained JND threshold is applied to the embedding of the alternating perturbation signal into the image frames processed by the grouping strategy. During this process, by constructing a periodically accumulated differentiated gradient field in the time domain of the carrier video, this feature exhibits considerable stability after attacks, thus demonstrating good robustness against screen capture attacks. Furthermore, the redundant information after BCH encoding during watermark extraction enhances the fault tolerance of the watermark sequence, and combined with the grouping mechanism to form an implicit identifier, even if an attack causes frame rate offset, the watermark timing information can still be recovered during extraction through time window alignment, avoiding phase mismatch issues. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a flow chart of a video watermark embedding method provided by an embodiment of the present invention;
[0059] Figure 2 This is a flow chart of a video watermark extraction and processing method provided by an embodiment of the present invention;
[0060] Figure 3 Schematic diagram of the time domain grouping strategy of the video watermark embedding method provided by an embodiment of the present invention;
[0061] Figure 4 1 is a flow chart of a video watermark extraction and processing method provided by an embodiment of the present invention;
[0062] Figure 5 is a structural diagram of a video watermark embedding processing device provided by an embodiment of the present invention;
[0063] Figure 6 It is a structural diagram of a video watermark extraction and processing device provided by an embodiment of the present invention;
[0064] Figure 7 It is a structural diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0066] like Figure 1 As shown, an embodiment of the present invention provides a video watermark embedding processing method, comprising:
[0067] Step 11: Obtain the video data to be processed;
[0068] Step 12: performing color space conversion on the video data to be processed to obtain original video data;
[0069] Step 13: segmenting the original video data according to a preset time length to obtain a plurality of time domain groups, wherein each time domain group includes continuous video frames;
[0070] Step 14: equally divide the continuous video frames to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data;
[0071] Step 15, performing dynamic threshold calculation processing on the multiple channel data to obtain spatial domain just noticeable difference thresholds of the multiple channels;
[0072] Step 16: Perform watermark embedding processing on the data of the multiple channels according to the spatial just noticeable difference thresholds of the multiple channels to obtain video data embedded with watermarks.
[0073] In this embodiment, the original video data to be watermarked is first obtained from a source such as a locally stored video file, a network video stream, or a video capture device. The obtained video data is then segmented according to a pre-set duration. For example, the video can be segmented into time domain groups every 10 seconds, with each time domain group containing consecutive video frames within that time period.
[0074] Within each time domain group, the continuous video frames are divided equally. The equally divided video frames provide smaller processing units for subsequent watermark embedding. By embedding the watermark in different small blocks, the distribution range of the watermark can be increased, and the robustness of the watermark can be improved.
[0075] Convert the equally divided video frames from one color space, such as RGB, to another color space, such as YUV. In YUV, the video frame is decomposed into a luminance channel (Y channel) and chrominance channels (U channel and V channel).
[0076] The luminance channel is more sensitive to the human eye, while the chrominance channel is relatively less sensitive. By converting the video frame from RGB to YUV color space, different channels can be processed separately, and the appropriate watermark embedding position and strength can be selected according to the visual characteristics of the human eye, thereby improving the concealment and robustness of the watermark.
[0077] A dynamic calculation method is used to determine the spatial just noticeable difference (JND) threshold for each channel's data. The JND threshold represents the minimum luminance or chromaticity change that the human eye can detect in that channel. This dynamic calculation method considers factors such as the video frame's content, brightness, and contrast to ensure that the calculated JND threshold accurately reflects the human eye's visual perception characteristics.
[0078] Watermarking is performed on channel data based on the JND threshold of each channel. Specifically, a specific watermark signal can be added to the channel data, with the watermark signal intensity not exceeding the JND threshold of that channel. For example, watermark information can be embedded by adjusting the pixel values of the luminance channel or the chrominance channel. By properly utilizing the JND thresholds of different channels, effective watermark embedding and concealment can be achieved. The watermarked video data can be used in various application scenarios. When verifying video copyright, the watermark information can be extracted using a corresponding watermark extraction algorithm, thereby proving the copyright of the video.
[0079] This technical solution dynamically quantizes the distortion threshold by constructing a spatial domain JND model based on the visual system, and integrates multi-dimensional heterogeneous features such as color, edge, and brightness to effectively balance the relationship between embedding strength and visual masking effect, ensuring the invisibility of the watermark. At the same time, through the time domain grouping strategy and YUV color space modulation, the statistical characteristics of each channel are reshaped, and synergistically with BCH encoding (Bose Chaudhuri Hocquenghem), it can effectively resist frame rate offset and timing mismatch problems, significantly improving the robustness against screen capture.
[0080] In an optional embodiment of the present invention, in step 12, performing color space conversion on the video data to be processed to obtain original video data may include:
[0081] Since rods and cones in the human retina have significant differences in sensitivity to brightness and color, in order to facilitate the subsequent HVS brightness-color perception decoupling characteristics and perform channel-independent feature analysis, the formula for converting video image frames from RGB to YUV color space is:
[0082]
[0083] In this embodiment, different color spaces have different characteristics and application scenarios. The RGB (red, green, blue) color space is a color space commonly used in computer graphics and digital image processing, and it directly corresponds to the color output of the display device. The YUV (luminance, chrominance) color space is a color space that separates the luminance (Y) and chrominance (U, V) components. It is more consistent with the human visual system (HVS)'s perception characteristics of luminance and chrominance. The color space conversion processing is performed on the processed video data to convert the video image frame from the RGB color space to the YUV color space. This is to facilitate the subsequent use of the luminance-chrominance perception decoupling characteristics of the human visual system (HVS) to perform channel-independent feature analysis.
[0084] Because rods in the human retina are primarily responsible for sensing brightness, while cones are responsible for sensing color, the significant differences in sensitivity between rods and cones to brightness and color enable the human visual system to process these information more efficiently. The YUV color space separates the luma (Y) and chroma (U, V) components, which better aligns with the perceptual characteristics of the human visual system. In the YUV color space, the luma component (Y) can be processed independently, while the chroma components (U, V) can also be processed specifically based on their characteristics. The conversion of video image frames from RGB to YUV color space is typically based on mathematical transformation formulas. These formulas are designed to convert the red, green, and blue components in the RGB color space into the luma and chroma components in the YUV color space.
[0085] Conversion process: For each frame of the video data to be processed, its RGB components are first obtained; then, the above conversion formula is used to convert the RGB components into YUV components; the converted YUV components will be used as the original video data for subsequent processing and analysis.
[0086] In an optional embodiment of the present invention, in step 13, the original video data is segmented according to a preset time length to obtain a plurality of time domain groups, wherein each time domain group includes continuous video frames, which may include:
[0087] Assume the original video sequence is ,in Represents the kth frame, and the video is fixed in length Split it and you can get time domain groups, denoted as , .
[0088] In the field of video processing and analysis, long videos are segmented to facilitate more detailed analysis; time domain grouping is a method of dividing video data into multiple continuous segments in chronological order, each segment contains a certain number of consecutive video frames.
[0089] In this embodiment, long videos are segmented to facilitate more detailed analysis. Time domain grouping is a method of dividing video data into multiple consecutive segments in chronological order, each segment containing a certain number of consecutive video frames. The specific process includes:
[0090] Original video sequence representation: Let the original video sequence be ,in represents the kth frame, T is the total number of frames in the video, and represents the length of the video sequence.
[0091] Split duration setting: The preset duration ΔT is the basis for video segmentation, which determines the number of video frames contained in each time domain group. ΔT can be set according to specific needs, such as seconds, minutes, or other time units.
[0092] Time domain grouping generation: Split the video into fixed time lengths ΔT to obtain M time domain groups, denoted as G i , where i=1,2,⋯,M. Each time domain group G i Contains consecutive video frames that are temporally consecutive and whose total duration does not exceed ΔT.
[0093] In an optional embodiment of the present invention, in step 14, the continuous video frames are equally divided to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data, which may include:
[0094] Through the video segmentation method of symmetrical time domain structure, each group of sequential image frames is divided into two parts according to time, which are recorded as part A and part B respectively.
[0095] Because screen capture attacks often involve frame rate shift, traditional fixed-frame grouping can lead to timing discontinuities. Therefore, this strategy uses time-based segmentation to strictly align the watermark signal period with the physical time axis, avoiding phase shifts caused by resampling. Furthermore, the A and B parts of each group are complementary on the time axis, paving the way for differentiated operations when embedding the watermark.
[0096] It is worth noting that each frame group will correspond to 1 bit of BCH encoded information, and It is an embedding cycle.
[0097] In an optional embodiment of the present invention, step 15 may include:
[0098] Step 151, determining residual masking effect data according to the plurality of channel data;
[0099] Step 152: performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data;
[0100] Step 153, determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data;
[0101] Step 154, determining the self-information of the color component based on the chrominance channel data;
[0102] Step 155, performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance;
[0103] Step 156, determining perceptual weight data based on the self-information of the color component and the brightness-edge coupling saliency;
[0104] Step 157: Determine spatial just noticeable difference thresholds of multiple channels based on the composite masking effect data and the perception weight data.
[0105] In this embodiment, the calculation of the spatially just-noticeable distortion threshold is a key step in achieving a balance between stealth and robustness. This is essential due to the nonlinear nature of HVS's sensitivity to distortion, requiring precise quantification of the distortion perception boundary through physiological-psychophysical modeling. The design of its JND model consists of two key components: a composite masking model and heterogeneous visual feature-driven perceptual weighting.
[0106] To simulate the human visual cortex's active prediction mechanism for image content, a neural prediction model that integrates Residual Masking (RM) and Luminance Adaptation Masking (LAM) is used. The specific implementation is as follows:
[0107] Quantification of residual masking effect: The human visual cortex has the ability to actively predict image content and build an autoregressive prediction model to generate a predicted image. Since the three YUV channels are independently modeled and analyzed, it is beneficial to accurately quantify the masking effect of HVS on different color space components. Therefore, the pixel value of a certain channel of the input image frame is calculated. The absolute value of the residual with the predicted image ψk,θ , used to characterize prediction uncertainty; and θ is used to distinguish color channels, θ∈{Y,U,V}. Residual masking effect data RM k,θ By adjusting the coefficient η θ The residual is weighted to quantify the masking strength, ψ k,θ With RM k,θ The calculation formula is:
[0108]
[0109]
[0110] in, is the weight coefficient of the i-th surrounding pixel, is the pixel position z around the k-th frame in channel θ i The pixel value, i, k are natural numbers, is the error compensation term, , 1.0, 1.0;
[0111] Dynamic modeling of brightness-adaptive masking: The human eye's sensitivity to noise varies significantly across local areas of varying brightness, necessitating dynamic adjustment of the masking threshold to match the nonlinear nature of brightness perception. The piecewise function design aligns with the physiological response of the HVS, ensuring tighter distortion control in low-brightness areas.
[0112]
[0113] in, is the pixel value of the Y channel, i.e., the brightness channel, of the coordinate in the YUV color space; the brightness masking threshold of the kth frame maintains the segmented characteristics, with the threshold decreasing in low brightness areas and increasing linearly in high brightness areas; By performing the first preprocessing process on the luminance channel data, the luminance adaptive masking data can be obtained. ;
[0114] Double masking effect nonlinear superposition: masking the residual RM k,θ with brightness adaptive masking Fusion is achieved through nonlinear superposition formula, specifically:
[0115]
[0116] Among them, C θ (YUV channels are set to 0.3, 0.25, and 0.2 respectively) to eliminate masking effect overlap and avoid threshold overestimation; DM k,θ This is the composite masking effect data.
[0117] Visual attention is driven by competition among heterogeneous features such as color and edges. At the same time, highly salient regions (such as centrally vibrant objects and prominent edges) require lower distortion thresholds to match the HVS's attentional priority. To comprehensively account for these various influencing factors, an analysis is conducted from three dimensions: color heterogeneity, spatial structure sensitivity, and brightness differences. The entire process is based on color space distribution clustering analysis using the Gaussian Mixture Model (GMM), edge gradient field feature extraction using the Canny multi-directional gradient filter, and luminance region contrast quantification based on the Kullback-Leibler (KL) divergence. This process then generates perceptual weights to modulate the results of the previous process.
[0118] Color perception saliency modeling: Several color categories are obtained in advance through GMM clustering to comprehensively represent the color areas with similar perceptual characteristics in the image. Indicates the Then, the color contrast, spatial distribution dispersion and center preference are quantified, and finally the self-information Characterizes the color perception saliency, the formula is:
[0119]
[0120] in, is the color component in GMM The Gaussian weight of reflects the statistical proportion or importance of the color in the overall image. The larger the weight, the wider or more significant the color distribution. For color components The contrast intensity is a combination of color contrast, spatial distribution dispersion (quantified by color variance), and the average distance from the color area to the image center. i ) is the color component c i The probability of I(c i ) is the color component c i The larger the value, the brighter the color component, the more concentrated the distribution, the closer it is to the center of the image, and the stronger the visual significance.
[0121] Luminance-edge coupled saliency modeling: Given that flat areas (low contrast) can tolerate more distortion due to the brightness masking effect and have lower saliency, edge areas need to strictly limit distortion due to their high sensitivity. This step combines luminance and edges for joint analysis. First, Canny edge detection is used to simulate the human eye's processing of edge information through retinal ganglion cells to extract edge weights. , further through the design of exponential function, the edge saliency is dynamically enhanced, and the edge saliency adjustment factor that conforms to the neural response characteristics is obtained , and finally calculate the brightness-edge coupling significance , the specific formula is:
[0122]
[0123]
[0124] in, After clustering the brightness values through GMM, the brightness component Gaussian weights of For the brightness component The contrast intensity of p(δ i ) is the brightness component δ i The probability of I(δ i ) is the brightness-edge coupling significance. The brightness-edge coupling significance can be obtained by performing a second preprocessing process on the brightness channel data in combination with edge features.
[0125] The JND threshold formula for dynamic perception weight control is:
[0126]
[0127]
[0128] Among them, JND θ,k is the spatial least noticeable difference threshold of the θ channel, θ∈{Y,U,V}, Y is brightness, U and V are chrominance, DM k,θ is the composite masking effect data, and PW is the perception weight data. Unifying the above-mentioned features that affect perception into a single weight avoids threshold conflicts caused by independent adjustments, which is consistent with the characteristics of HVS for multi-feature collaborative perception.
[0129] In an optional embodiment of the present invention, step 16 may include:
[0130] Step 161, obtaining watermark data;
[0131] Step 162: Encode the watermark data to obtain watermark bit data;
[0132] Step 163, according to:
[0133] ,
[0134] Obtaining video data embedded with a watermark;
[0135] Among them, F' k,θ (x, y) is the pixel value of the kth frame with coordinates (x, y) in channel θ, F k,θ (x,y) is the video frame F kThe θ channel pixel value of , A is the first part of the video frame, B is the second part of the video frame, and b is the watermark bit data.
[0136] In this embodiment, under the framework of the time domain grouping strategy, the video sequence is divided into several frame groups of fixed duration ∆T, each group corresponding to a watermark bit after BCH error correction coding. Each group of frames is further divided into two subsequences A and B along the time axis. Through the multi-pixel coordinated adjustment mechanism, controlled chroma and luminance offsets are introduced in the three YUV channels, ultimately forming stable statistical feature differences between groups to achieve watermark encoding. The specific process is as follows:
[0137] ,
[0138] Among them, F' k,θ (x, y) is the pixel value of the kth frame with coordinates (x, y) in channel θ, F k,θ (x,y) is the video frame F k The θ channel pixel value of the first part of the video frame, B is the second part of the video frame, and b is the BCH encoding bit corresponding to the current frame group. Through the symbol alternation mechanism; the A and B subsequences show positive and negative disturbance trends on the YUV channel respectively, ensuring the stability of the statistical feature differences.
[0139] like Figure 2 As shown, an embodiment of the present invention provides a video watermark extraction and processing method, including:
[0140] Step 21, obtaining video data with watermark;
[0141] Step 22, performing color space conversion processing on the video data with the watermark to obtain video data after color space conversion;
[0142] Step 23, segmenting the video data after the color space conversion according to a preset time length to obtain a plurality of time domain groups;
[0143] Step 24, equally dividing the video frames in the multiple time domain groups to obtain a first video frame and a second video frame;
[0144] Step 25, performing statistical processing on the difference between the first video frame and the second video frame to obtain a comprehensive difference value;
[0145] Step 26, determining the watermark bit position according to the comprehensive difference value;
[0146] Step 27: Process the watermark bits to obtain watermark data.
[0147] In this embodiment, video data with a watermark is first obtained from an online video platform, a locally stored video file, or the like. Through color space conversion, the video data can be converted from the RGB color space to the YUV color space. In the YUV color space, the Y component represents brightness information, and the U and V components represent chrominance information. Since watermark information is generally less correlated with brightness information but has a certain correlation with chrominance information, conversion to the YUV color space makes it easier to extract the watermark. For the RGB to YUV conversion, the following formula can be used:
[0148] Video data is continuous in time. By segmenting the video data according to a preset duration, the video can be divided into multiple time domain groups. Each time domain group contains video frames within a certain time range, facilitating the subsequent segmented processing and analysis of the watermark information. The preset duration can be adjusted based on actual conditions. For example, the appropriate preset duration can be determined based on factors such as the watermark embedding cycle and the characteristics of the video content. If the watermark is embedded periodically, the preset duration can be set to an integer multiple of the watermark embedding cycle. Based on the preset duration, video segments of corresponding durations are sequentially captured, starting from the starting frame of the video data, to form multiple time domain groups.
[0149] The video frames in each time domain group are equally divided into two parts, which facilitates subsequent statistical processing of the differences between the two parts. Various equal division methods can be used, for example, the video frames in each time domain group are equally divided according to the middle position of the frame number to obtain the first video frame in the first half and the second video frame in the second half.
[0150] Watermark information typically manifests as subtle differences in video frames. By performing statistical analysis on the differences between the first and second video frames, these differences can be quantified, thereby extracting watermark-related features. Various statistical methods can be used, such as calculating the grayscale value or color difference between corresponding pixels in the two frames. The differences across all pixels are then statistically analyzed to generate a comprehensive difference value. This comprehensive difference value reflects the overall degree of difference between the first and second video frames.
[0151] Because watermark information manifests as a specific difference pattern in video frames, there's a certain correspondence between the comprehensive difference value and the watermark bit position. By analyzing the size, distribution, and other characteristics of the comprehensive difference value, the corresponding watermark bit position can be determined. Pre-set thresholds or rules can be used to determine the watermark bit position based on the comparison between the comprehensive difference value and these thresholds or rules. For example, if the comprehensive difference value is greater than a certain threshold, the watermark bit position is determined to be 1; otherwise, the watermark bit position is determined to be 0.
[0152] Finally, according to the encoding method and structure of the watermark, the watermark bits are arranged, combined, and decoded. For example, if the watermark uses a specific encoding algorithm, the corresponding decoding algorithm needs to be used to decode the watermark bits to obtain the final watermark data.
[0153] In an optional embodiment of the present invention, step 25 may include:
[0154] according to:
[0155] ,
[0156] Get the comprehensive difference value;
[0157] Among them, D j is the comprehensive difference value, is the mean value of the jth frame in channel θ of the first part of the video, is the mean value of the jth frame in channel θ of the second part of the video, Y is the brightness, and U and V are the chrominance.
[0158] In this embodiment, for a certain frame group with a fixed duration ∆T, the following can be used:
[0159] ,
[0160] Get the comprehensive difference value; where j is the relative index of the image frame in the frame group, D j It is the difference between the total mean values of the three YUV channels. It is the statistical feature of the two subsets (parts A and B) on each channel. It directly reflects the distribution shift caused by the embedded perturbation, that is, it reflects the overall difference between the j-th frame of the first video frame and the j-th frame of the second video frame. The size of this value is closely related to the difference between the two frames in each color channel.
[0161] In an optional embodiment of the present invention, step 26 may include:
[0162] according to:
[0163] ,
[0164] Get the watermark bits;
[0165] in, is the watermark bit.
[0166] In this embodiment, during the watermark extraction process, the comprehensive difference value D is obtained through the previous steps. j , which reflects the overall difference between the first video frame and the second video frame at the jth frame. This step aims to calculate the difference value D j To determine the corresponding watermark bit By setting a simple judgment rule, the comprehensive difference value is converted into binary watermark bit information. For each calculated comprehensive difference value D j , judge according to the set rules:
[0167] When D j ≥0, the watermark bit It is determined to be 1. This means that when the comprehensive difference between the first video frame and the second video frame at the jth frame is greater than or equal to zero, the watermark bit corresponding to the position is considered to be 1.
[0168] When D j <0, the watermark bit It is determined to be 0. That is, when the comprehensive difference is less than zero, the watermark bit corresponding to the position is considered to be 0.
[0169] The above steps convert the comprehensive difference value into specific watermark bits. By using threshold judgment, this efficient conversion from difference value to binary bits is achieved. This method of determining watermark bits based on comprehensive difference values is quite versatile and can adapt to different watermark embedding methods. As long as the watermark is embedded by introducing specific difference patterns in certain channels of the video frame, this method can be used to extract the watermark information by properly setting the judgment rules and thresholds.
[0170] A specific embodiment of a video watermark processing method provided by an embodiment of the present invention is as follows:
[0171] The anti-screen capture video watermark processing method includes two processes: embedding watermark into video data and extracting watermark data from video data;
[0172] (1) When embedding the watermark, preprocessing is first performed according to the time domain grouping strategy, and then each channel is independently modeled to calculate the visually optimal JND threshold. Then, according to the embedding strategy, a periodically accumulated differentiated gradient field is constructed in the time domain of the carrier video. Therefore, through the synergy of the time domain segmentation strategy and the spatial domain perception constraint model, the robustness and invisibility of the watermark embedding are optimized. Specifically, it includes:
[0173] Step 31, time domain grouping;
[0174] Assume the original video sequence is ,in Represents the kth frame, and the video is fixed in length Split it and you can get time domain groups, denoted as , Then, through the video segmentation method of symmetrical time domain structure, each group of sequence image frames is divided into two parts according to time, such as Figure 3As mentioned above, they are recorded as parts A and B respectively. Since screen capture attacks are often accompanied by frame rate deviation, traditional fixed frame number grouping will cause timing discontinuity. Therefore, this strategy uses time base segmentation to strictly align the watermark signal period with the physical time axis to avoid phase dislocation caused by resampling. In addition, part A and part B of each group are complementary on the time axis, paving the way for the use of differentiated operations when embedding watermarks later. It is worth noting that each frame group will correspond to 1 bit of BCH encoded information, and It is an embedding cycle.
[0175] Step 32, color space conversion;
[0176] The rods and cones in the human retina have significant differences in sensitivity to brightness and color. To facilitate the subsequent decoupling of brightness and color perception in HVS and perform channel-independent feature analysis, the formula for converting video image frames from RGB to YUV color space is:
[0177]
[0178] Step 33, calculation of spatial JND threshold;
[0179] In the video watermark embedding framework, calculating the spatially just-noticeable distortion threshold is a key step in achieving a balance between stealth and robustness. This is essential due to the nonlinear nature of HVS's sensitivity to distortion, requiring precise quantification of the distortion perception boundary through physiological-psychophysical modeling. The design of the JND model consists of two main components: a composite masking model and perceptual weight adjustment driven by heterogeneous visual features.
[0180] To simulate the human visual cortex's active prediction mechanism for image content, a neural prediction model that combines residual masking (RM) and luminance adaptation masking (LAM) is used. The specific implementation is as follows.
[0181] Quantification of residual masking effect: The human visual cortex has the ability to actively predict image content. In this method, an autoregressive prediction model is constructed to generate a predicted image. Since the three YUV channels are independently modeled and analyzed, it is conducive to accurately quantifying the masking effect of HVS on different color space components. Therefore, based on the calculation of a channel of the input image frame The absolute value of the residual with the predicted image , which is used to characterize the prediction uncertainty; and Used to distinguish color channels, Residual masking effect By adjusting the coefficient The residual is weighted to quantify the masking strength; the specific formula is:
[0182]
[0183]
[0184] in, is the weight coefficient of the i-th surrounding pixel, is the pixel position z around the k-th frame in channel θ i The pixel value, i, k are natural numbers, is the error compensation term, , 1.0, 1.0;
[0185] Dynamic modeling of brightness-adaptive masking: The human eye's sensitivity to noise varies significantly across local areas of varying brightness, necessitating dynamic adjustment of the masking threshold to match the nonlinear nature of brightness perception. The piecewise function design aligns with the physiological response of the HVS, ensuring tighter distortion control in low-brightness areas.
[0186]
[0187] in, is the pixel value of the Y channel, i.e., the brightness channel, of the coordinate in the YUV color space; the brightness masking threshold of the kth frame maintains the segmented characteristics, with the threshold decreasing in low brightness areas and increasing linearly in high brightness areas; is brightness adaptive masking.
[0188] Double masking effect nonlinear superposition: masking the residual RM k,θ with brightness adaptive masking Fusion is achieved through nonlinear superposition formula, specifically:
[0189]
[0190] Among them, C θ (YUV channels are set to 0.3, 0.25, and 0.2 respectively) to eliminate masking effect overlap and avoid threshold overestimation; DM k,θ This is the composite masking effect data.
[0191] Visual attention is driven by competition among heterogeneous features such as color and edges. At the same time, highly salient regions (such as centrally vibrant objects and prominent edges) require lower distortion thresholds to match the HVS's attentional priority. To comprehensively account for these various influencing factors, an analysis is conducted from three dimensions: color heterogeneity, spatial structure sensitivity, and brightness differences. The entire process is based on color space distribution clustering analysis using the Gaussian Mixture Model (GMM), edge gradient field feature extraction using the Canny multi-directional gradient filter, and luminance region contrast quantification based on the Kullback-Leibler (KL) divergence. This process then generates perceptual weights to modulate the results of the previous process.
[0192] Color perception saliency modeling: Several color categories are obtained in advance through GMM clustering to comprehensively represent the color areas with similar perceptual characteristics in the image. Indicates the Then, the color contrast, spatial distribution dispersion and center preference are quantified, and finally the self-information Characterizes the color perception saliency, the formula is:
[0193]
[0194] in, is the color component in GMM The Gaussian weight reflects the statistical proportion or importance of the color in the overall image. The larger the weight, the wider or more significant the color distribution. For color components The contrast intensity combines color contrast, spatial distribution dispersion (quantified by color variance), and the average distance between the color area and the image center. A larger value indicates a brighter color component, a more concentrated distribution, and a closer proximity to the image center, resulting in a stronger visual saliency.
[0195] Luminance-edge coupled saliency modeling: Given that flat areas (low contrast) can tolerate more distortion due to the brightness masking effect and have lower saliency, edge areas need to strictly limit distortion due to their high sensitivity. This step combines luminance and edges for joint analysis. First, Canny edge detection is used to simulate the human eye's processing of edge information through retinal ganglion cells to extract edge weights. , further through the design of exponential function, the edge saliency is dynamically enhanced, and the edge saliency adjustment factor that conforms to the neural response characteristics is obtained , and finally calculate , the specific formula is:
[0196]
[0197]
[0198] in, After clustering the brightness values through GMM, the brightness component Gaussian weights of For the brightness component The contrast intensity of p(δ i ) is the brightness component δ i Through the above brightness channel data, combined with the edge features to perform the second preprocessing process, we can get I(δ i ).
[0199] The JND threshold formula for dynamic perception weight control is:
[0200]
[0201]
[0202] Among them, JND θ,k is the spatial least noticeable difference threshold of the θ channel, θ∈{Y,U,V}, Y is brightness, U and V are chrominance, DM k,θ is the composite masking effect data, and PW is the perception weight data. Unifying the above-mentioned features that affect perception into a single weight avoids threshold conflicts caused by independent adjustments, which is consistent with the characteristics of HVS for multi-feature collaborative perception.
[0203] Step 34, alternate disturbance injection;
[0204] Under the framework of the time-domain grouping strategy, the video sequence is divided into several frame groups of fixed duration ∆T, each corresponding to a watermark bit after BCH error correction coding. Each frame group is further divided into two subsequences, A and B, along the time axis. Through a multi-pixel coordinated adjustment mechanism, controlled chroma and luminance offsets are introduced into the three YUV channels, ultimately forming stable statistical feature differences between groups to achieve watermark encoding. The specific process is as follows:
[0205] ,
[0206] Among them, F' k,θ (x, y) is the pixel value of the kth frame with coordinates (x, y) in channel θ, F k,θ (x,y) is the video frame F k The θ channel pixel value of the first part of the video frame, B is the second part of the video frame, and b is the BCH encoding bit corresponding to the current frame group. Through the symbol alternation mechanism; the A and B subsequences show positive and negative disturbance trends on the YUV channel respectively, ensuring the stability of the statistical feature differences.
[0207] (2) When extracting the watermark, the captured video to be detected must first be converted into the YUV color space and grouped in the time domain according to the fixed time length ∆T set in the embedding stage. Each group is further divided into two parts, A and B, according to time symmetry to ensure that the grouping strategy is consistent with the embedding process to resist the timing phase mismatch caused by frame rate offset. Considering that the starting point of the group may be offset after being attacked by screen capture, this method first uses the existing beginning as the starting point, and then uses BCH error correction and loop step size to adjust the time window and gradually align the original embedding period. Specifically, the steps after capturing the video group are as follows:
[0208] Step 41, calculation and fusion of multi-channel differences;
[0209] Different from the traditional single channel (such as U channel), this method needs to extract by fusing the mean difference of the three YUV channels. For a certain frame group with a fixed duration ∆T, the calculation formula is:
[0210] ,
[0211] Where j is the relative index of the image frame in the frame group, and are the pixel mean values of part A or part B in the θ channel of the frame group respectively; the bit information calculation formula corresponding to the frame group is:
[0212] ,
[0213] Step 42, calculation and fusion of multi-channel differences;
[0214] In order to deal with the frame rate deviation or packet breakage caused by screen capture attacks, this link restores the packet timing through a dynamic time window alignment mechanism to ensure that the packet start point is aligned with the embedding period. In this process, BCH error correction coding is required. Figure 4 As shown in the figure, the binary watermark sequence extracted by the previous stage according to the unit embedding period is restructured into a symbolic data stream and mapped to the BCH codeword space for iterative decoding. If the decoder outputs an invalid flag, the adaptive recapture mechanism is triggered: based on the preset step size ∆t, the video capture start time is dynamically adjusted by increasing the segmentation starting point by n∙∆t each time (n is the current iteration number), and the packet extraction process is reinitialized.
[0215] This process continues iteratively until the termination condition is reached: the remaining captureable video duration is less than a full embedding cycle, or the payload is successfully parsed. This closed-loop feedback architecture significantly improves robustness against time-varying impairments in the screen capture channel through dual error correction in both time and space.
[0216] To verify the algorithm's generalization and robustness in complex screen capture scenarios, we designed a multi-dimensional experimental verification framework. The experiment used five sets of heterogeneous video samples (v1.mp4 to v5.mp4). The sample parameters are shown in Table 1. These samples cover a wide range of resolutions and frame rates, and the scene complexity includes typical types such as static text, dynamic motion, and highly textured areas, simulating the diverse characteristics of real-world application scenarios.
[0217] Table 1 Basic information of video samples
[0218] sample Resolution Frame rate Duration / s v1 450×260 25.00 60 v2 684×380 25.00 60 v3 936×526 25.00 80 v4 1006×566 25.00 120 v5 1356×680 24.67 120
[0219] In attack simulation, a screen capture attack chain was constructed using multi-angle optical camera equipment. Attacked videos were captured under varying lighting conditions and shooting angles (0°, 5°, and 10°) to evaluate the algorithm's robustness against physical channel distortion. Experimental results demonstrate that the proposed method, through the collaborative design of spatial JND modeling and temporal periodic gradient fields, achieves visually imperceptible watermark embedding in three YUV channels while significantly improving robustness against screen capture. The watermarked video frames exhibit no visible distortion compared to the original frames. Despite the presence of optical noise and geometric distortion in the captured frames after the screen capture attack, the watermark features maintain a stable distribution.
[0220] Quantitative analysis shows that, under various camera angles without BCH correction, the watermark extraction accuracy for a single embedding cycle sampling exceeded 89%. Thanks to the synergistic effectiveness of the grouping and error correction alignment framework, as well as the redundant embedding of information across multiple embedding cycles, the watermarked videos in the following experiments were successfully extracted. These experimental results demonstrate that our method achieves a good balance between invisibility, robustness, and adaptability.
[0221] The anti-screen capture video watermark processing method proposed in the present invention dynamically quantizes the distortion threshold by constructing a spatial JND model based on HVS, and integrates multi-dimensional heterogeneous features such as color, edge and brightness, effectively balancing the relationship between embedding strength and visual masking effect, thereby ensuring invisibility; at the same time, through the time domain grouping strategy and modulation of the YUV color space, the statistical characteristics of each channel are reshaped, and synergistically with BCH encoding, it can effectively resist frame rate offset and timing mismatch problems, and significantly improve the anti-screen capture robustness.
[0222] like Figure 5 As shown, the embodiment of the present invention further provides a video watermark embedding processing device 50, comprising:
[0223] A first acquisition module 51 is used to acquire video data to be processed;
[0224] The first processing module 52 is used to perform color space conversion processing on the video data to be processed to obtain original video data; segment the original video data according to a preset time length to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; divide the continuous video frames into equal parts to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame both include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data; perform threshold dynamic calculation processing on the multiple channel data to obtain spatial minimum noticeable difference thresholds of the multiple channels; and perform watermark embedding processing on the multiple channel data according to the spatial minimum noticeable difference thresholds of the multiple channels to obtain video data embedded with watermarks.
[0225] Optionally, the first processing module 52 is specifically configured to:
[0226] Determining residual masking effect data according to the plurality of channel data;
[0227] Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data;
[0228] determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data;
[0229] Determining self-information of a color component based on the chrominance channel data;
[0230] performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance;
[0231] determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency;
[0232] Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
[0233] Optionally, the first processing module 52 is further configured to:
[0234] according to:
[0235] ,
[0236] Obtaining the spatial just noticeable difference thresholds of multiple channels;
[0237] Among them, JND θ,k is the spatial least noticeable difference threshold of the θ channel, θ∈{Y,U,V}, Y is brightness, U and V are chrominance, DM k,θ is the composite masking effect data, and PW is the perceptual weight data.
[0238] Optionally, the first processing module 52 is further configured to:
[0239] Get watermark data;
[0240] Encoding the watermark data to obtain watermark bit data;
[0241] According to the spatial domain just noticeable difference thresholds and watermark bit data of the multiple channels, watermark embedding processing is performed on the multiple channel data to obtain video data embedded with watermarks.
[0242] It should be noted that this device is a device corresponding to the above-mentioned watermark embedding method. All implementation methods in the above-mentioned watermark embedding method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0243] like Figure 6 As shown, the embodiment of the present invention further provides a video watermark extraction and processing device 60, comprising:
[0244] A second acquisition module 61 is used to acquire video data with a watermark;
[0245] The second processing module 62 is used to perform color space conversion processing on the video data with the watermark to obtain video data after color space conversion; segment the video data after color space conversion according to a preset time length to obtain multiple time domain groups; divide the video frames in the multiple time domain groups into equal parts to obtain a first video frame and a second video frame; perform difference statistics processing on the first video frame and the second video frame to obtain a comprehensive difference value; determine the watermark bit position based on the comprehensive difference value; and process the watermark bit position to obtain watermark data.
[0246] Optionally, the second processing module 62 is specifically configured to:
[0247] according to:
[0248] ,
[0249] Get the comprehensive difference value;
[0250] Among them, D j is the comprehensive difference value, is the mean value of the jth frame in channel θ of the first part of the video, is the mean value of the jth frame in channel θ of the second part of the video, Y is the brightness, and U and V are the chrominance.
[0251] Optionally, the second processing module 62 is further specifically configured to:
[0252] according to:
[0253] ,
[0254] Get the watermark bits;
[0255] in, is the watermark bit.
[0256] It should be noted that this device is a device corresponding to the above-mentioned watermark extraction method. All implementation methods in the above-mentioned method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0257] like Figure 7 As shown, an embodiment of the present invention further provides a computing device 70, including a processor 71, a memory 72, and a program or instruction stored in the memory 72 and executable on the processor 71. When the program or instruction is executed by the processor 71, each process of the above-mentioned video watermark embedding method and extraction method is implemented, and the same technical effect is achieved. To avoid repetition, it is not described here. It should be noted that the computing device in the embodiment of the present invention includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0258] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0259] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0260] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0261] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0262] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0263] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0264] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but they do not necessarily need to be performed in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it can be understood that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including a processor, storage medium, etc.) or a network of computing devices. This can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0265] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved simply by providing a program product containing program code for implementing the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but do not necessarily need to be performed in chronological order. Certain steps can be performed in parallel or independently of each other.
[0266] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A video watermark embedding method, characterized in that: include: Obtain video data to be processed; Performing color space conversion processing on the video data to be processed to obtain original video data; Segmenting the original video data according to a preset time length to obtain a plurality of time domain groups, wherein each time domain group includes continuous video frames; Performing equal division processing on the continuous video frames to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, and the multiple channel data include luminance channel data and chrominance channel data; Performing dynamic threshold calculation processing on the multiple channel data to obtain spatial just noticeable difference thresholds of the multiple channels; Performing watermark embedding processing on the multiple channel data according to the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with the watermark; The dynamic threshold calculation process is performed on the multiple channel data to obtain the spatial just noticeable difference thresholds of the multiple channels, including: According to the plurality of channel data, the residual masking effect data is determined, and the calculation formula is: ; Among them, RM k,θ is the residual masking effect data, η θ is the adjustment coefficient, ψ k,θ For image frames θ The absolute value of the residual between the video frame pixel value of the channel and the predicted image is calculated as: ; in, For the i The weight coefficient of the surrounding pixels, For the k Frame in channel θ Center surrounding pixel positions z i The pixel value of i, k is a natural number, is the error compensation term, For the k frame θ The video frame pixel value of the channel; Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data; determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data; According to the chromaticity channel data, the self-information of the color component is determined, and the calculation formula is: in, is the color component in the Gaussian mixture model Gaussian weights of For color components contrast intensity; p ( c i ) is the color component c i probability; I ( c i ) is the color component c i Self-information; performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance; determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency; Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
2. The video watermark embedding method according to claim 1, characterized in that: Determining spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perceptual weight data, including: according to: , Obtaining the spatial just noticeable difference thresholds of multiple channels; Among them, JND θ,k for θ The spatial just noticeable difference threshold of the channel, θ ∈{ Y , U , V }, Y is brightness, U 、 V is chromaticity, DM k,θ is the composite masking effect data, and PW is the perceptual weight data.
3. The video watermark embedding method according to claim 2, characterized in that: Performing watermark embedding processing on the multiple channel data according to the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with watermarks, including: Get watermark data; Encoding the watermark data to obtain watermark bit data; According to the spatial domain just noticeable difference thresholds and watermark bit data of the multiple channels, watermark embedding processing is performed on the multiple channel data to obtain video data embedded with watermarks.
4. A video watermark extraction and processing method, characterized in that: include: Get video data with watermark; Performing color space conversion processing on the video data with the watermark to obtain video data after color space conversion; Segmenting the video data after the color space conversion according to a preset time length to obtain a plurality of time domain groups; Equally dividing the video frames in the multiple time domain groups to obtain a first video frame and a second video frame; Performing statistical processing on the difference between the first video frame and the second video frame to obtain a comprehensive difference value; Determining a watermark bit position according to the comprehensive difference value; Processing the watermark bits to obtain watermark data; The video data with watermark is determined through the following process: Obtaining video data to be processed; performing color space conversion processing on the video data to be processed to obtain original video data; segmenting the original video data according to a preset time length to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; equally dividing the continuous video frames to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, wherein the multiple channel data include luminance channel data and chrominance channel data; performing threshold dynamic calculation processing on the multiple channel data to obtain spatial domain just noticeable difference thresholds of the multiple channels; performing watermark embedding processing on the multiple channel data based on the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with the watermark; The dynamic threshold calculation process is performed on the multiple channel data to obtain the spatial just noticeable difference thresholds of the multiple channels, including: According to the plurality of channel data, the residual masking effect data is determined, and the calculation formula is: ; Among them, RM k,θ is the residual masking effect data, η θ is the adjustment coefficient, ψ k,θ For image frames θ The absolute value of the residual between the video frame pixel value of the channel and the predicted image is calculated as: ; in, For the i The weight coefficient of the surrounding pixels, For the k Frame in channel θ Center surrounding pixel positions z i The pixel value of i, k is a natural number, is the error compensation term, For the k frame θ The video frame pixel value of the channel; Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data; determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data; According to the chromaticity channel data, the self-information of the color component is determined, and the calculation formula is: in, is the color component in the Gaussian mixture model Gaussian weights of For color components contrast intensity; p ( c i ) is the color component c i probability; I ( c i ) is the color component c i Self-information; performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance; determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency; Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
5. The video watermark extraction and processing method according to claim 4, characterized in that: Performing statistical processing on the difference between the first video frame and the second video frame to obtain a comprehensive difference value includes: according to: , Get the comprehensive difference value; in, D j is the comprehensive difference value, For the first part of the video j Frame in channel θ The mean of For the second part of the video j Frame in channel θ The mean of Y is brightness, U 、 V For chroma.
6. The video watermark extraction and processing method according to claim 5, characterized in that: Determining a watermark bit position according to the comprehensive difference value includes: according to: , Get the watermark bits; in, is the watermark bit.
7. A video watermark embedding processing device, characterized in that: include: A first acquisition module, configured to acquire video data to be processed; A first processing module is configured to perform color space conversion processing on the video data to be processed to obtain original video data; segment the original video data according to a preset time length to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; equally divide the continuous video frames to obtain a first video frame and a second video frame, wherein each of the first video frame and the second video frame includes multiple channel data, wherein the multiple channel data includes luminance channel data and chrominance channel data; perform threshold dynamic calculation processing on the multiple channel data to obtain spatial domain just noticeable difference thresholds of the multiple channels; and perform watermark embedding processing on the multiple channel data based on the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with the watermark; The dynamic threshold calculation process is performed on the multiple channel data to obtain the spatial just noticeable difference thresholds of the multiple channels, including: According to the plurality of channel data, the residual masking effect data is determined, and the calculation formula is: ; Among them, RM k,θ is the residual masking effect data, η θ is the adjustment coefficient, ψ k,θ For image frames θ The absolute value of the residual between the video frame pixel value of the channel and the predicted image is calculated as: ; in, For the i The weight coefficient of the surrounding pixels, For the k Frame in channel θ Center surrounding pixel positions z i The pixel value of i, k is a natural number, is the error compensation term, For the k frame θ The video frame pixel value of the channel; Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data; determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data; According to the chromaticity channel data, the self-information of the color component is determined, and the calculation formula is: in, is the color component in the Gaussian mixture model Gaussian weights of For color components contrast intensity; p ( c i ) is the color component c i probability; I ( c i ) is the color component c i Self-information; performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance; determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency; Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
8. A video watermark extraction and processing device, characterized in that: include: The second acquisition module is used to obtain video data with a watermark; A second processing module is used to perform color space conversion processing on the video data with the watermark to obtain video data after color space conversion; Segmenting the video data after the color space conversion according to a preset time length to obtain a plurality of time domain groups; equally dividing the video frames in the plurality of time domain groups to obtain a first video frame and a second video frame; performing statistical difference processing on the first video frame and the second video frame to obtain a comprehensive difference value; determining a watermark bit position based on the comprehensive difference value; and processing the watermark bit position to obtain watermark data; The video data with watermark is determined through the following process: Obtaining video data to be processed; performing color space conversion processing on the video data to be processed to obtain original video data; segmenting the original video data according to a preset time length to obtain multiple time domain groups, wherein each time domain group includes continuous video frames; equally dividing the continuous video frames to obtain a first video frame and a second video frame, wherein the first video frame and the second video frame each include multiple channel data, wherein the multiple channel data include luminance channel data and chrominance channel data; performing threshold dynamic calculation processing on the multiple channel data to obtain spatial domain just noticeable difference thresholds of the multiple channels; performing watermark embedding processing on the multiple channel data based on the spatial domain just noticeable difference thresholds of the multiple channels to obtain video data embedded with the watermark; The dynamic threshold calculation process is performed on the multiple channel data to obtain the spatial just noticeable difference thresholds of the multiple channels, including: According to the plurality of channel data, the residual masking effect data is determined, and the calculation formula is: ; Among them, RM k,θ is the residual masking effect data, η θ is the adjustment coefficient, ψ k,θ For image frames θ The absolute value of the residual between the video frame pixel value of the channel and the predicted image is calculated as: ; in, For the i The weight coefficient of the surrounding pixels, For the k Frame in channel θ Center surrounding pixel positions z i The pixel value of i, k is a natural number, is the error compensation term, For the k frame θ The video frame pixel value of the channel; Performing a first preprocessing on the luminance channel data to obtain luminance adaptive masking data; determining composite masking effect data according to the residual masking effect data and the brightness adaptive masking data; According to the chromaticity channel data, the self-information of the color component is determined, and the calculation formula is: in, is the color component in the Gaussian mixture model Gaussian weights of For color components contrast intensity; p ( c i ) is the color component c i probability; I ( c i ) is the color component c i Self-information; performing a second preprocessing on the luminance channel data in combination with edge features to obtain luminance-edge coupling significance; determining perceptual weight data based on the self-information of the color component and the luminance-edge coupling saliency; Determine spatial just noticeable difference thresholds of multiple channels according to the composite masking effect data and the perception weight data.
9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 3 or the method according to any one of claims 4 to 6 is executed.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and storage equipment
CN113395475A
Video watermark information processing method, device and equipment
CN117376664A