Data end-to-end digital image watermark correction detection method and system and medium

By constructing a synthetic dataset with pixel-level deformation mapping and an end-to-end correction model, the complex perspective distortion problem of watermark detection in printing-photography scenarios is solved, achieving efficient integrated processing of watermark correction and detection, and improving the accuracy and robustness of detection.

CN122066569APending Publication Date: 2026-05-19ZHONGKE TIANWANG (GUANGDONG) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGKE TIANWANG (GUANGDONG) TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing digital image watermarking technologies are insufficient in correcting complex perspective distortions in printing-photography scenarios, and have low robustness and accuracy in watermark detection, making it difficult to achieve integrated end-to-end processing of watermark correction and detection.

Method used

By constructing a synthetic distortion dataset that maps pixel-level deformation to real labels, an end-to-end correction model is trained, directly outputting two-dimensional coordinate mappings for geometric correction, and combining Fourier domain blind detection and dynamic detection thresholds to establish a confidence evaluation mechanism to form a closed-loop optimization.

Benefits of technology

It significantly improves the accuracy and robustness of watermark detection under complex perspective distortion conditions, realizes integrated end-to-end processing of watermark correction and detection, reduces the dependence on real print-photograph annotation data, and improves the model's generalization ability and the reliability of authentication decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122066569A_ABST
    Figure CN122066569A_ABST
Patent Text Reader

Abstract

The invention discloses a data end-to-end digital image watermark correction detection method and system and a medium, and relates to the technical field of digital images, and the digital image watermark correction detection method comprises the steps: embedding a watermark in a predetermined circular region of a frequency domain amplitude spectrum of an original image, and generating a watermark-containing image; constructing a printing-shooting distorted image data set through a synthetic data generation mode, and training an end-to-end correction model; inputting a watermark-containing distorted image obtained by printing-shooting into the correction model, outputting two-dimensional coordinate mapping and generating a corrected image; performing Fourier domain blind detection on the corrected image, and generating a watermark authentication decision based on a dynamic detection threshold; starting multi-frame verification when the detection result is in a critical state, and feeding back the detection confidence to the correction model to form closed-loop optimization; therefore, complex perspective distortion in a printing-shooting scene is effectively corrected, the accuracy and robustness of watermark detection are improved, and integrated end-to-end processing of watermark correction and detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image technology, and in particular to a method, system and medium for end-to-end digital image watermark correction and detection. Background Technology

[0002] With the rapid development of internet and mobile communication technologies, the generation, transmission, and sharing of digital images in the network environment are becoming increasingly frequent, leading to growing security issues such as illegal copying, tampering, and theft. To ensure the authenticity, integrity, and copyright ownership of digital image content, digital image watermarking technology has emerged. This technology embeds authentication information imperceptibly into the original image, and subsequently achieves content authentication and copyright protection by detecting or extracting the watermark. It has been widely applied in areas such as content anti-counterfeiting, traceability, and identity recognition.

[0003] In recent years, with the widespread adoption of smart mobile terminals, digital image watermarking technology has gradually expanded from purely digital environments to cross-media application scenarios such as "printing-shooting". In this scenario, the watermarked digital image is first printed onto a physical medium, and then captured by a mobile phone or camera for watermark detection and authentication. However, because the shooting process is usually under uncontrolled conditions, it is easily affected by factors such as changes in shooting angle, unstable device posture, distance differences, and complex lighting environments. The resulting images often have significant geometric distortions, especially complex perspective transformations such as rotation, scaling, translation, and perspective tilt. These distortions severely disrupt the spatial synchronization structure during watermark embedding, leading to the failure of traditional watermark detection algorithms or a significant decrease in detection accuracy.

[0004] For watermarking applications in print-to-photograph scenarios, existing technologies mainly focus on two types of solutions. One type is based on traditional image processing methods, which typically estimate geometric transformation parameters by detecting image borders, corner points, or pre-defined alignment markers, and then correct the image before performing watermark detection. However, this type of method is highly dependent on image quality and marker integrity, and its stability is poor in complex backgrounds, when markers are missing, or when occluded. The other type involves introducing deep learning methods, using neural networks for feature extraction or distortion parameter estimation. However, most solutions still require combining traditional optimization algorithms to complete geometric correction, making the overall process complex and difficult to achieve true end-to-end data processing. Furthermore, training deep learning models usually relies on a large amount of real print-to-photograph data with precise geometric distortion annotations, and obtaining such datasets is costly and difficult, limiting the model's generalization ability and practical application effectiveness.

[0005] In summary, the existing technology has at least the following technical problems: In printing-photographing scenarios, existing digital image watermarking technologies are insufficient in correcting complex perspective distortions, have low robustness and accuracy in watermark detection, and struggle to achieve integrated end-to-end processing of watermark correction and detection. Summary of the Invention

[0006] The purpose of this invention is to provide a digital image watermark correction and detection method, system and medium for end-to-end data processing, in order to solve the technical problems of insufficient correction capability for complex perspective distortion, low robustness and accuracy of watermark detection, and difficulty in achieving integrated end-to-end processing of watermark correction and detection in existing digital image watermarking technologies.

[0007] The preferred technical solutions among the many technical solutions provided by this invention can produce a variety of technical effects, which are described in detail below.

[0008] To address the aforementioned technical problems, the present invention provides the following technical solution: This invention provides an end-to-end digital image watermark correction and detection method, comprising the following steps: S1, watermark embedding: performing a discrete Fourier transform on the luminance component of the original image to obtain the frequency domain amplitude spectrum and phase spectrum; selecting a predetermined circular region in the frequency domain amplitude spectrum as the watermark embedding region; processing the coefficients within the circular region with a Gaussian low-pass filter; and embedding a key-driven pseudo-random watermark sequence using an additive rule to obtain watermarking coefficients; adaptively adjusting the embedding strength through iteration or binary search to achieve a predetermined target value for the peak signal-to-noise ratio of the watermarked image; and obtaining the watermarked image for printing based on the amplitude spectrum after watermark embedding and the original phase spectrum using an inverse Fourier transform. S2. Data Construction and Training: Construct a dataset of distorted printed and photographed images using synthetic data generation methods, including at least the distorted images and their corresponding pixel-level deformation maps as ground truth labels; train an end-to-end correction model based on the dataset. S3. End-to-end correction: Obtain the watermarked distorted image obtained by printing and shooting, input it into the trained correction model, output a two-dimensional coordinate mapping for resampling, and obtain the corrected image accordingly; S4. Blind Detection and Authentication: The corrected image is subjected to Fourier transform to extract the coefficient sequence from the frequency domain position corresponding to the predetermined circular region, and the maximum normalized cross-correlation coefficient between the coefficient sequence and the original watermark sequence is calculated through a sliding window; a dynamic detection threshold is set based on the Neyman-Pearson criterion, and the maximum normalized cross-correlation coefficient is compared with the dynamic detection threshold to generate an authentication decision; S5. Confidence and Closed Loop: Establish a confidence assessment mechanism. When the detection result is in a critical state, start the multi-frame verification process and output a structured authentication report containing timestamps, correlation coefficient values ​​and confidence levels. At the same time, feed the confidence level as a correction quality assessment index back to the input of the correction model step in S3 to form a closed loop optimization.

[0009] In one embodiment, the watermark embedding region is located in the mid-frequency region of the frequency domain amplitude spectrum, and the selection of the circular region is based on the rotation invariance property of the Fourier transform to improve robustness against geometric attacks.

[0010] In one embodiment, the watermark sequence is a binary pseudo-random sequence generated by a linear congruential method or a key-based pseudo-random number generator, and the length L of the watermark sequence is 512 to 4096.

[0011] In one embodiment, the adaptive adjustment of the embedding strength is aimed at achieving a peak signal-to-noise ratio of 40 dB for the watermarked image.

[0012] In one embodiment, the synthetic data generation method includes: constructing an m×n grid, randomly selecting grid vertices to generate deformation vectors with random directions and amplitudes to simulate perspective deformation, and using an interpolation algorithm to convert the sparse grid deformation field into pixel-level deformation mapping as the real label.

[0013] In one embodiment, the correction model employs a dual U-Net cascade architecture, including a first U-Net network for preliminary correction and a second U-Net network for fine correction, and a hollow spatial pyramid pooling module is integrated between the encoder and decoder of each U-Net to extract multi-scale features.

[0014] In one embodiment, the correction model integrates a compression-excitation attention mechanism into the convolutional blocks for adaptive calibration of channel feature responses.

[0015] In one embodiment, the second U-Net network takes the multi-channel data after stitching the output features of the first U-Net network with the original distorted image as input, and fuses the multi-scale features of the encoder of the first U-Net network and the encoder of the second U-Net network through a double hop connection.

[0016] A data-end-to-end digital image watermark correction and detection system is also provided, including a preprocessing module for executing S1 of the digital image watermark correction and detection method to generate a watermarked image for printing; a model training module for training a correction model based on a dataset of synthetic distorted images; a correction execution module for loading the trained correction model and performing end-to-end geometric correction on the watermarked distorted image to output a corrected image; and an authentication decision module for performing Fourier domain blind detection on the corrected image, setting a dynamic threshold based on the Neyman-Pearson criterion, and outputting an authentication decision, while generating a structured authentication report and forming a confidence feedback closed loop with the correction execution module.

[0017] In one embodiment, the authentication decision module calculates the maximum normalized cross-correlation coefficient between the extracted sequence and the original watermark sequence using a sliding window, and generates the authentication decision based on the comparison result of the maximum normalized cross-correlation coefficient and the dynamic detection threshold.

[0018] In one embodiment, the authentication decision module initiates a multi-frame verification process when the detection result is in a critical state, and outputs a structured authentication report containing a timestamp, correlation coefficient value, and confidence level; and feeds back the confidence level as a correction quality assessment indicator to the correction execution module.

[0019] A computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the digital image watermark correction and detection method.

[0020] The beneficial effects of this invention are as follows: (1) Significantly improves the accuracy and robustness of watermark detection under complex perspective distortion conditions. This technical solution addresses the complex perspective distortion problems commonly found in printing and photography scenarios, such as rotation, scaling, translation, and viewpoint tilt. By constructing a synthetic distortion dataset with pixel-level deformation mapping as the real label, and training an end-to-end correction model to directly output two-dimensional coordinate mapping, it achieves accurate geometric correction of distorted images. This effectively restores the spatial synchronization of watermark signals before watermark detection, significantly improving the accuracy and stability of watermark detection.

[0021] (2) Realize an integrated end-to-end processing flow for watermark correction and watermark detection. This technical solution integrates image correction and watermark detection into the same technical process. After outputting the corrected image through an end-to-end correction model, it directly performs Fourier domain blind detection, avoiding the complex processing flow of relying on multi-stage traditional geometric estimation and manual parameter adjustment in existing technologies. It realizes end-to-end processing from printing-capture image input to watermark authentication output, improving overall processing efficiency and system consistency.

[0022] (3) Reduce reliance on real print-and-photograph annotation data and improve model generalization ability. By constructing a training dataset using synthetic data generation and using pixel-level deformation mapping as a supervision signal, this technical solution can effectively train the calibration model without acquiring real print-photograph geometric distortion ground truth data that is difficult to collect. This reduces data acquisition costs and improves the model's generalization adaptability under different shooting devices, shooting angles, and environmental conditions.

[0023] (4) Improve the reliability of authentication decisions through dynamic thresholds and multi-frame verification mechanisms. This technical solution introduces a dynamic detection threshold based on the Neyman-Pearson criterion in the watermark detection stage, and initiates a multi-frame verification process when the detection result is in a critical state. This statistically balances the false negative rate and false positive rate, effectively reducing the impact of unstable factors in single-frame detection on the authentication result and improving the reliability of watermark authentication decisions.

[0024] (5) Construct a closed-loop optimization mechanism driven by detection results to improve the overall stability of the system. By establishing a confidence assessment mechanism and feeding back the detection confidence as a calibration quality assessment indicator to the calibration model input stage, a closed-loop optimization mechanism is formed that uses the detection results to guide the calibration process. This enables the system to dynamically adjust the calibration effect based on the detection confidence, further improving the overall stability and practicality in complex scenarios.

[0025] In summary, this technical solution effectively solves the problems of insufficient adaptability to complex perspective distortion, low detection robustness and accuracy, and difficulty in achieving end-to-end processing in existing digital image watermarking technologies in printing-shooting scenarios, and has significant technical benefits. Attached Figure Description

[0026] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic diagram of the steps of the digital image watermark correction and detection method of the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0029] The specific implementation provides a digital image watermark correction and detection method, system, and medium for end-to-end data processing. The method includes embedding a watermark within a predetermined circular region of the frequency domain amplitude spectrum of the original image to generate a watermarked image; constructing a dataset of distorted printed-photographed images using a synthetic data generation method and training an end-to-end correction model; inputting the watermarked distorted image obtained from printing and photography into the correction model, outputting a two-dimensional coordinate mapping, and generating a corrected image; performing Fourier domain blind detection on the corrected image and generating a watermark authentication decision based on a dynamic detection threshold; initiating multi-frame verification when the detection result is in a critical state, and feeding back the detection confidence to the correction model to form a closed-loop optimization; thereby effectively correcting complex perspective distortion in printing-photographing scenarios, improving the accuracy and robustness of watermark detection, and achieving integrated end-to-end processing of watermark correction and detection; effectively solving the technical problems of insufficient correction capability for complex perspective distortion, low robustness and accuracy of watermark detection, and difficulty in achieving integrated end-to-end processing of watermark correction and detection in existing digital image watermarking technologies.

[0030] The first implementation of the digital image watermark correction and detection method is as follows: Figure 1 As shown in S1 to S5, the process includes the following steps implemented sequentially from S1 to S5: S1, Watermark Embedding: Perform a Discrete Fourier Transform on the luminance component of the original image to obtain the frequency domain amplitude spectrum and phase spectrum; select a predetermined circular region in the frequency domain amplitude spectrum as the watermark embedding region; process the coefficients within the circular region with Gaussian low-pass filtering; and embed the key-driven pseudo-random watermark sequence using additive rules to obtain the watermarking coefficients; adaptively adjust the embedding strength through iteration or binary search to make the peak signal-to-noise ratio of the watermarked image reach a predetermined target value; and obtain the watermarked image for printing by performing an inverse Fourier Transform based on the amplitude spectrum after watermark embedding and the original phase spectrum. S2. Data Construction and Training: Construct a dataset of distorted printed and photographed images using synthetic data generation methods, including at least the distorted images and their corresponding pixel-level deformation maps as ground truth labels; train an end-to-end correction model based on the dataset. S3, End-to-end correction: Obtain the watermarked distorted image obtained by printing and shooting, input it into the trained correction model, output a two-dimensional coordinate mapping for resampling, and obtain the corrected image accordingly; S4. Blind Detection and Authentication: The corrected image is subjected to Fourier transform to extract the coefficient sequence from the frequency domain position corresponding to the predetermined circular region. The maximum normalized cross-correlation coefficient between the coefficient sequence and the original watermark sequence is calculated through a sliding window. A dynamic detection threshold is set based on the Neyman-Pearson criterion. The maximum normalized cross-correlation coefficient is compared with the dynamic detection threshold to generate an authentication decision. S5. Confidence and Closed Loop: Establish a confidence assessment mechanism. When the detection result is in a critical state, start the multi-frame verification process and output a structured authentication report containing timestamps, correlation coefficient values ​​and confidence levels. At the same time, use the confidence level as a correction quality assessment index to feed back to the input correction model steps of S3 to form a closed loop optimization.

[0031] Specifically, addressing the shortcomings of existing digital image watermarking technologies in correcting complex perspective distortions, resulting in low robustness and accuracy in watermark detection, and the difficulty in achieving integrated end-to-end processing of watermark correction and detection, this technical solution utilizes a data-driven end-to-end learning network for digital image watermark correction and detection. This solution offers several advantages: significantly improving the accuracy and robustness of watermark detection under complex perspective distortion conditions; and addressing the common issues of rotation, scaling, translation, and tilting perspective distortions in printing-photographing scenarios. By constructing a synthetic distortion dataset with pixel-level deformation mapping as the true label and training an end-to-end correction model to directly output two-dimensional coordinate mappings, it achieves precise geometric correction of distorted images. This effectively restores the spatial synchronization of the watermark signal before watermark detection, significantly improving the accuracy and stability of watermark detection.

[0032] This solution integrates image correction and watermark detection into a single end-to-end processing flow. After outputting the corrected image through an end-to-end correction model, it directly performs Fourier domain blind detection, avoiding the complex processing flow of existing technologies that rely on multi-stage traditional geometric estimation and manual parameter adjustment. This achieves end-to-end processing from printed / captured image input to watermark authentication output, improving overall processing efficiency and system consistency.

[0033] This approach reduces reliance on real-world printed-and-photographed labeled data and enhances model generalization ability. By constructing a training dataset using synthetic data generation and employing pixel-level deformation mapping as a supervision signal, this technical solution eliminates the need to acquire hard-to-collect real-world printed-and-photographed geometric distortion ground truth data. This enables effective training of the calibration model, thereby reducing data acquisition costs and improving the model's generalization adaptability under different shooting devices, shooting angles, and environmental conditions.

[0034] This technical solution improves the reliability of authentication decisions by using dynamic thresholds and multi-frame verification mechanisms. In the watermark detection stage, a dynamic detection threshold based on the Neyman-Pearson criterion is introduced, and a multi-frame verification process is initiated when the detection result is in a critical state. This statistically balances the false negative rate and false positive rate, effectively reducing the impact of unstable factors in single-frame detection on the authentication result and improving the reliability of watermark authentication decisions.

[0035] A closed-loop optimization mechanism driven by detection results is constructed to improve the overall stability of the system. By establishing a confidence assessment mechanism and feeding the detection confidence as a calibration quality assessment index back to the calibration model input stage, a closed-loop optimization mechanism is formed that uses detection results to guide the calibration process. This enables the system to dynamically adjust the calibration effect according to the detection confidence, further improving the overall stability and practicality in complex scenarios.

[0036] In summary, this technical solution effectively solves the problems of insufficient adaptability to complex perspective distortion, low detection robustness and accuracy, and difficulty in achieving end-to-end processing in existing digital image watermarking technologies in printing-shooting scenarios, and has significant technical benefits.

[0037] In S1, the watermark sequence is embedded into the filtered watermark coefficients using additive rules. The embedding formula is as follows: ,in This represents the coefficients after watermarking. This represents the original coefficients after filtering. For embedding strength, This is a watermark sequence.

[0038] As one alternative implementation method: In S1, the luminance component extraction process involves converting the original image in the RGB color space to the YUV color space and extracting its luminance component for processing. This step effectively separates the luminance and chromaticity information of the image, allowing subsequent watermark embedding operations to focus on the luminance component, which has a smaller impact on visual perception.

[0039] Meanwhile, regarding the specific settings of the watermark embedding area, the watermark embedding area is set in the mid-frequency region of the frequency domain amplitude spectrum, and the selection of the circular region is based on the rotation invariance property of Fourier transform to improve robustness against geometric attacks.

[0040] In application, by setting the watermark embedding region in the mid-frequency region of the frequency domain and using a circular region as the embedding position, the principle of approximately rotation invariance of the amplitude spectrum under rotational operations of the Fourier transform is fully utilized. This ensures that the watermark information maintains a relatively stable frequency domain distribution structure even when the image undergoes geometric attacks such as rotation, scaling, and perspective tilt. This, combined with the two-dimensional coordinate mapping output by the subsequent end-to-end correction model, effectively restores the frequency domain alignment of the watermark embedding region after spatial correction, thereby improving the consistency and reliability of watermark feature extraction in the Fourier domain blind detection stage. By setting the watermark embedding region, the robustness of the watermark to complex geometric distortions is significantly enhanced while maintaining its imperceptibility, solving the problem that existing mid-frequency domain watermarks are prone to failure due to rotation and perspective transformations in printing-photography scenarios.

[0041] In addition, the radius of the circular region in the mid-frequency region of the frequency domain amplitude spectrum is adaptively adjusted according to the image resolution, or multiple concentric rings are used as alternative embedding regions to further improve the adaptability to geometric attacks of different scales; furthermore, the circular region is replaced with an approximately circular polygonal region, as long as the requirement of rotation invariance is met.

[0042] Regarding the specific settings of the watermark sequence, the watermark sequence is a binary pseudo-random sequence, generated by the linear congruential method or a key-based pseudo-random number generator (PRNG), and the length L of the watermark sequence is 512 to 4096.

[0043] Specifically, the watermark sequence is generated as a binary sequence of length L = 1024: ; In application, a binary pseudo-random sequence generated by a linear congruential method or a key-based pseudo-random number generator is used as the watermark sequence. This makes the embedded watermark statistically approximate a random noise distribution, thereby reducing the risk of the watermark being detected or maliciously estimated. This watermark sequence is bound to the key during the embedding stage and serves as a reference sequence for correlation matching during the blind detection stage, participating in normalized cross-correlation calculations together with the frequency domain coefficients extracted from the Fourier domain. By working in conjunction with a dynamic detection threshold and a multi-frame verification mechanism, the security and uniqueness of watermark detection in complex environments are effectively improved, solving the problem of fixed or weakly random watermarks being easily forged or falsely detected in existing technologies.

[0044] In other implementations, the pseudo-random watermark sequence can also be generated using the Mason swirl algorithm, a hash function-driven random sequence, or a chaotic mapping sequence; the length of the watermark sequence can be adjusted according to security level requirements, or a segmented splicing method can be used to generate multiple sub-sequence watermarks to support multi-factor authentication or hierarchical authentication scenarios.

[0045] Regarding the specific settings for the adaptive adjustment of embedding strength, the process of adaptively adjusting the embedding strength aims to achieve a peak signal-to-noise ratio of 40dB for the watermarked image.

[0046] In application, the watermark embedding strength is iteratively or adaptively adjusted by using the peak signal-to-noise ratio of the watermarked image reaching a predetermined target value as a constraint. This balances the imperceptibility of the watermark embedding process with the detection reliability. This embedding strength adjustment mechanism works in conjunction with the frequency domain mid-frequency embedding strategy and subsequent end-to-end correction process to ensure the visual quality of the image before printing while reserving sufficient frequency domain energy for the effective recovery of the watermark signal after printing and shooting. This improves the overall watermark detection success rate and solves the problem in existing technologies where fixed embedding strength leads to either visible watermarks or difficult-to-detect watermarks.

[0047] In other implementations, the target peak signal-to-noise ratio is set to different thresholds depending on the application scenario, or a structural similarity index is introduced as a joint constraint index; in addition, the adaptive adjustment process dynamically adjusts the target value based on the estimated print-shooting noise model to adapt to different printing devices and shooting environments.

[0048] Specifically, adaptively adjust the embedding strength The process involves iterative optimization to achieve the optimal balance between watermark strength and image quality. First, a set... Search scope Then, in each iteration, the difference between the current PSNR value and the target value is calculated, and the search interval is dynamically adjusted until the accuracy requirement is met.

[0049] Finally, an inverse Fourier transform is performed based on the amplitude spectrum after watermarking and the original phase spectrum to obtain the watermarked luminance component, which is then merged with the original chrominance component to generate the final watermarked color image. This step completely preserves the color information of the original image while ensuring the imperceptibility of the watermark.

[0050] Regarding the specific generation method of the above-mentioned synthetic data, the synthetic data generation method includes: constructing an m×n grid, randomly selecting grid vertices to generate deformation vectors with random directions and amplitudes to simulate perspective deformation, and using an interpolation algorithm to convert the sparse grid deformation field into pixel-level deformation mapping as a real label.

[0051] In application, ID images are selected from the PICS database as raw materials. An m×n regular grid is constructed, and deformation vectors with variable direction and amplitude are randomly generated at the grid vertices to simulate the complex perspective distortion generated during the printing-photographing process. Then, an interpolation algorithm is used to transform the sparse deformation field into pixel-level deformation mappings as real labels, thus providing accurate and continuous supervision signals for the end-to-end correction model. This synthetic data generation method highly matches the two-dimensional coordinate mapping output format of the end-to-end correction model, enabling the model to directly learn the mapping relationship from distorted images to corrected coordinate mappings, avoiding dependence on explicit geometric parameter modeling. This solves the problems of difficulty in obtaining real distortion annotation data and insufficient model generalization ability in existing technologies.

[0052] In other implementations, deformation vectors are superimposed with nonlinear perturbations to simulate lens distortion, or composite distortion data is generated by combining brightness variations, noise injection, and blurring. Interpolation algorithms also employ bilinear interpolation, spline interpolation, or deep learning-based interpolation methods to meet different computational accuracy requirements.

[0053] Regarding the specific architecture of the above-mentioned correction model, the correction model adopts a dual U-Net cascade architecture, including a first U-Net network for preliminary correction and a second U-Net network for fine correction. Furthermore, the encoder and decoder of each U-Net integrate an Atrous Spatial Pyramid Pooling (ASPP) module to extract multi-scale features.

[0054] In application, a dual-U-Net cascaded architecture is employed. The first U-Net performs initial correction of the overall structure of the distorted image, while the second U-Net performs refined correction of local regions, thereby progressively reducing geometric errors. A hollow spatial pyramid pooling module is integrated between the encoder and decoder of each U-Net to extract contextual information at different receptive field scales, enabling the model to simultaneously perceive global perspective structure and local detail changes. This architecture, in conjunction with pixel-level deformation mapping supervision signals, effectively improves correction accuracy under complex perspective distortions, providing high-quality input for subsequent watermark detection and solving the problem that single-scale correction models struggle to simultaneously address global and local deformations.

[0055] In other implementations, the dual U-Net cascade structure is extended to a multi-level cascade structure, or residual connections are introduced between cascades; the hole rate parameter in the ASPP module can also be adaptively adjusted according to the image resolution to accommodate input images of different sizes.

[0056] The second embodiment of the digital image watermark correction and detection method differs from the first embodiment in that the second U-Net network takes the output features of the first U-Net network and the multi-channel data after stitching the original distorted image as input, and simultaneously fuses the multi-scale features of the encoder of the first U-Net network and the encoder of the second U-Net network through a double skip connection.

[0057] In application, the features output by the first U-Net network are stitched together with the original distorted image as the input to the second U-Net network. This allows the second-stage correction to retain the preliminary correction results while still being able to directly perceive the original distortion information, thus avoiding error accumulation.

[0058] Meanwhile, by fusing the encoder multi-scale features of the first U-Net network and the second U-Net network through a dual-skip connection method, the geometric information at different levels is fully utilized during the decoding process, thereby improving the accuracy and stability of the correction results in the detail region. In conjunction with the end-to-end training mechanism, the correction effect under complex perspective distortion conditions is significantly improved, and the problems of information attenuation and detail loss in cascaded models are solved.

[0059] In addition, multi-channel splicing methods introduce weight coefficients for weighted fusion, or perform dimensionality reduction on features before splicing; the fusion method of double skip connections adopts a layer-by-layer weighted or attention-guided fusion strategy.

[0060] The calibration model uses a combined loss function to supervise the training process, and its calculation formula is as follows: ;

[0061] in, For mean square error loss, For feature loss, For background loss, , , These are the weighting coefficients for each loss; in the above formula, Indicates the number of pixels. Represents true geometric coordinates, Indicates the model's predicted coordinates; During training, a combined loss function is used for supervision, including mean squared error loss. To ensure overall coordinate prediction accuracy, feature loss Combining absolute difference with regularization terms improves local alignment and reduces background loss. Negative predictions are specifically penalized to maintain the physical rationality of the output space.

[0062] The third embodiment of the digital image watermark correction and detection method differs from the first embodiment in that a compression-excitation attention mechanism is integrated into the convolutional block of the correction model for adaptive calibration of channel feature responses.

[0063] When applied, a compression-excitation attention mechanism is introduced into the convolutional blocks of the calibration model to adaptively weight the features of different channels, enabling the model to automatically enhance the feature channels related to the geometric structure and suppress background texture or noise interference features.

[0064] By working in conjunction with the attention mechanism, the dual U-Net cascade structure, and the multi-scale feature extraction module, the model's adaptability to complex backgrounds and unstructured shooting conditions is further improved, thereby enhancing the stability and consistency of the corrected image and indirectly improving the reliability of correlation calculation in the watermark detection stage. This solves the problem that the correction model is easily disturbed in complex scenes.

[0065] Alternatively, the attention mechanism can be replaced with channel-space joint attention or a self-attention structure, or enabled only in the second U-Net network, to strike a tradeoff between computational complexity and performance.

[0066] Based on the above embodiments of the digital image watermark correction and detection method, a data end-to-end digital image watermark correction and detection system is provided, including a preprocessing module for executing S1 of the digital image watermark correction and detection method to generate a watermarked image for printing; a model training module for training a correction model based on a dataset of synthetic distorted images; a correction execution module for loading the trained correction model and performing end-to-end geometric correction on the watermarked distorted image to output a corrected image; and an authentication decision module for performing Fourier domain blind detection on the corrected image, setting a dynamic threshold based on the Neyman-Pearson criterion and outputting an authentication decision, while generating a structured authentication report and forming a confidence feedback closed loop with the correction execution module.

[0067] Specifically, the authentication decision module calculates the maximum normalized cross-correlation coefficient between the extracted sequence and the original watermark sequence using a sliding window. And with the maximum normalized cross-correlation coefficient The comparison results with the dynamic detection threshold generate an authentication decision.

[0068] The maximum normalized cross-correlation coefficient between the extracted sequence and the original watermark sequence is calculated using a sliding window. The formula is as follows: It sets dynamic detection thresholds based on the Neyman-Pearson criterion and generates authentication decisions by comparing the relationship between correlation coefficients and thresholds. For the frequency domain coefficient sequence extracted from the corrected image, For the original watermark sequence, For watermark sequence length, and The mean of the corresponding sequence, This is the sliding offset.

[0069] If the maximum normalized cross-correlation coefficient If the value exceeds the preset threshold, the watermark is determined to exist, and authentication is successful.

[0070] The authentication decision module initiates a multi-frame verification process when the detection result is in a critical state, and outputs a structured authentication report containing timestamps, correlation coefficient values ​​and confidence levels; and feeds back the confidence level as a correction quality assessment indicator to the correction execution module.

[0071] In application, the various functional steps of the digital image watermark correction and detection method are integrated into a modular system, enabling the preprocessing module, model training module, correction execution module, and authentication decision module to operate collaboratively within the same system framework. Specifically, the preprocessing module generates watermarked images suitable for printing; the model training module trains the correction model based on a synthetic distortion image dataset; the correction execution module performs end-to-end geometric correction on the watermarked distortion images obtained from printing and photography during practical applications; and the authentication decision module directly performs Fourier domain blind detection and generates authentication results after correction. Through the functional division of labor and data flow connection between these modules, a complete end-to-end processing flow from image watermark embedding, printing-photography, geometric correction to watermark authentication is achieved.

[0072] Furthermore, the authentication decision module calculates the maximum normalized cross-correlation coefficient between the frequency domain coefficient sequence and the original watermark sequence using a sliding window method, and sets a dynamic detection threshold based on the Neyman-Pearson criterion, so that the authentication decision takes into account both the false detection rate and the false negative rate in a statistical sense. When the detection result is in a critical state, the multi-frame verification process is initiated, and the multi-frame detection results are combined to generate a confidence level, thereby outputting a structured authentication report containing timestamps, correlation coefficient values ​​and confidence information.

[0073] The confidence level information is further fed back to the correction execution module as a correction quality assessment indicator, enabling the system to dynamically adjust or evaluate the correction effect based on the detection confidence level, forming a closed-loop optimization mechanism driven by the detection results. Thus, through system-level collaborative settings, the stability and reliability of watermark detection in printing-photography scenarios are effectively improved, solving the problem in existing technologies where the correction and detection modules are independent and difficult to optimize in conjunction.

[0074] In other implementations, the digital image watermark correction and detection system is deployed on a server, edge computing node, or mobile terminal. The model training module can run independently of the correction execution module to support the separate deployment of offline training and online inference. The structured authentication report generated by the authentication decision module can be further uploaded to a blockchain or remote authentication platform to achieve tamper-proof evidence storage of the watermark authentication results. In addition, the communication between the functional modules adopts message queues, shared memory, or remote call interfaces to flexibly adapt to different system architecture requirements.

[0075] Based on the above embodiments of the digital image watermark correction and detection method, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program implements the digital image watermark correction and detection method when executed by a processor.

[0076] When applied, the program code corresponding to the digital image watermark correction and detection method is stored in a computer-readable storage medium, so that the digital image watermark correction and detection method can be deployed and run in software form on general-purpose computing devices or special-purpose computing devices. When the processor reads and executes the computer program, it sequentially realizes functions such as watermark embedding, training of correction models driven by synthetic data, end-to-end geometric correction, Fourier domain blind detection, and authentication decision based on dynamic threshold.

[0077] The storage medium embodiment, in conjunction with the aforementioned system embodiment, enables this technical solution to be implemented not only as a hardware system but also as a software product or algorithm service, allowing for flexible implementation in different application environments. This software-based implementation effectively reduces system deployment costs, improves the portability and scalability of the technical solution, and solves the problem of existing watermark correction and detection schemes relying on specific hardware platforms and being difficult to rapidly promote.

[0078] In other embodiments, the computer-readable storage medium may be a read-only memory, an erasable and rewritable memory, a solid-state drive, a cloud storage medium, or a network distribution medium; the computer program formed by the digital image watermark correction and detection method may also be loaded into the target device by network download or remote update to support model version updates or parameter optimization; in addition, the computer program formed by the digital image watermark correction and detection method may also be packaged into an application programming interface or a software development kit for integration into a third-party image processing or content authentication system.

[0079] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described.

Claims

1. A data-end-to-end digital image watermark correction and detection method, characterized in that, The process includes the following steps: S1, watermark embedding: performing a discrete Fourier transform on the luminance component of the original image to obtain the frequency domain amplitude spectrum and phase spectrum; selecting a predetermined circular region in the frequency domain amplitude spectrum as the watermark embedding region; processing the coefficients within the circular region with a Gaussian low-pass filter; and embedding the key-driven pseudo-random watermark sequence using an additive rule to obtain the watermarking coefficients. The embedding strength is adaptively adjusted through iteration or binary search to achieve the predetermined target value for the peak signal-to-noise ratio of the watermarked image; the watermarked image is obtained by inverse Fourier transform based on the amplitude spectrum after watermarking and the original phase spectrum for printing. S2. Data Construction and Training: Construct a dataset of distorted printed and photographed images using synthetic data generation methods, including at least the distorted images and their corresponding pixel-level deformation maps as ground truth labels; train an end-to-end correction model based on the dataset. S3. End-to-end correction: Obtain the watermarked distorted image obtained by printing and shooting, input it into the trained correction model, output a two-dimensional coordinate mapping for resampling, and obtain the corrected image accordingly; S4. Blind detection and authentication: The corrected image is subjected to Fourier transform to extract the coefficient sequence from the frequency domain position corresponding to the predetermined circular region, and the maximum normalized cross-correlation coefficient between the coefficient sequence and the original watermark sequence is calculated through a sliding window. A dynamic detection threshold is set based on the Neyman-Pearson criterion, and an authentication decision is generated by comparing the maximum normalized cross-correlation coefficient with the dynamic detection threshold. S5. Confidence and Closed Loop: Establish a confidence assessment mechanism. When the detection result is in a critical state, start the multi-frame verification process and output a structured authentication report containing timestamps, correlation coefficient values ​​and confidence levels. At the same time, feed the confidence level as a correction quality assessment index back to the input of the correction model step in S3 to form a closed loop optimization.

2. The digital image watermark correction and detection method according to claim 1, characterized in that, The watermark embedding region is located in the mid-frequency region of the frequency domain amplitude spectrum, and the selection of the circular region is based on the rotation invariance property of the Fourier transform to improve robustness against geometric attacks.

3. The digital image watermark correction and detection method according to claim 1, characterized in that, The watermark sequence is a binary pseudo-random sequence, generated by a linear congruential method or a key-based pseudo-random number generator, and the length L of the watermark sequence is 512 to 4096.

4. The digital image watermark correction and detection method according to claim 1, characterized in that, The adaptive adjustment of embedding strength aims to achieve a peak signal-to-noise ratio of 40dB for the watermarked image.

5. The digital image watermark correction and detection method according to claim 1, characterized in that, The synthetic data generation method includes: constructing an m×n grid, randomly selecting grid vertices to generate deformation vectors with random directions and amplitudes to simulate perspective deformation, and using an interpolation algorithm to convert the sparse grid deformation field into pixel-level deformation mapping as the real label.

6. The digital image watermark correction and detection method according to claim 1, characterized in that, The correction model adopts a dual U-Net cascaded architecture, including a first U-Net network for preliminary correction and a second U-Net network for fine correction. The encoder and decoder of each U-Net integrate a hole spatial pyramid pooling module to extract multi-scale features.

7. The digital image watermark correction and detection method according to claim 6, characterized in that, The correction model integrates a compression-excitation attention mechanism in its convolutional blocks for adaptive calibration of channel feature responses.

8. The digital image watermark correction and detection method according to claim 6, characterized in that, The second U-Net network takes the multi-channel data after stitching the output features of the first U-Net network with the original distorted image as input, and fuses the multi-scale features of the encoder of the first U-Net network and the encoder of the second U-Net network through a double hop connection.

9. A data end-to-end digital image watermark correction and detection system, characterized in that, Includes a preprocessing module for performing S1 of the digital image watermark correction and detection method of claim 1 to generate a watermarked image for printing; And a model training module for training a correction model based on a dataset of synthetically distorted images; And a correction execution module, used to load the trained correction model and perform end-to-end geometric correction on the watermarked distorted image to output the corrected image; The system also includes an authentication decision module, which performs Fourier domain blind detection on the corrected image, sets a dynamic threshold based on the Neyman-Pearson criterion, and outputs an authentication decision. Simultaneously, it generates a structured authentication report and forms a confidence feedback loop with the correction execution module.

10. The digital image watermark correction and detection system according to claim 9, characterized in that, The authentication decision module calculates the maximum normalized cross-correlation coefficient between the extracted sequence and the original watermark sequence using a sliding window, and generates the authentication decision based on the comparison result of the maximum normalized cross-correlation coefficient and the dynamic detection threshold.

11. The digital image watermark correction and detection system according to claim 9, characterized in that, When the detection result is in a critical state, the authentication decision module initiates a multi-frame verification process and outputs a structured authentication report containing timestamps, correlation coefficient values, and confidence levels; and feeds back the confidence level as a correction quality assessment indicator to the correction execution module.

12. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the digital image watermark correction and detection method as described in any one of claims 1 to 8 when executed by a processor.