A hybrid watermarking method for digital images based on synchronization of time and frequency domains

By using a digital image hybrid watermarking method that synchronizes time domain and frequency domain, combined with a deep learning extraction framework, the problems of poor robustness and insufficient adaptability of watermarks in existing technologies are solved, and efficient copyright protection is achieved in complex environments.

CN119741182BActive Publication Date: 2025-09-12DATA SPACE RES INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510239463.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-09-12
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

Existing digital image watermarking technology has poor robustness in the face of complex attack methods, limited watermark adaptability, and cannot effectively protect image copyright.

Method used

A digital image hybrid watermarking method based on synchronization of time domain and frequency domain is adopted. A powerful defense mechanism is constructed through the complementary characteristics of time domain and frequency domain. Combined with the extraction framework of deep learning, flexible embedding and stable extraction of watermarks in images are achieved.

Benefits of technology

In the face of various image processing attacks, the watermark information can maintain high integrity and robustness, ensuring the reliability of copyright protection. The watermark can be accurately extracted even when the image quality is severely degraded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741182B_ABST
    Figure CN119741182B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of digital image processing technology, and more specifically, to a digital image hybrid watermarking method based on time domain and frequency domain synchronization. The present invention innovatively combines a time domain and frequency domain synchronization watermark embedding algorithm with a multi-level watermark extraction algorithm, aiming to significantly improve the concealment and robustness of the watermark, effectively address the problems existing in digital image copyright protection in the face of printing and scanning attacks and network attacks, ensure the security and reliability of digital image copyright protection, and provide a more advanced and effective technical means for digital image copyright protection. The advantage of this method is that the time domain and frequency domain synchronization watermark embedding algorithm enables the watermark to be integrated into the image details and has strong concealment, effectively protecting the watermark in the face of various attacks, and the multi-level watermark extraction algorithm ensures accurate extraction when the image quality degrades, thereby improving the watermark performance as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and in particular to a digital image hybrid watermarking method based on time domain and frequency domain synchronization. Background Art

[0002] To address the urgent need for digital image copyright protection, digital watermarking technology has been widely researched and applied as a potential solution. The basic principle of digital watermarking technology is to embed specific information (watermark) into digital images in an invisible or imperceptible manner, thereby identifying and protecting image copyright without affecting the normal use of the image.

[0003] Existing digital watermarking technologies are categorized into two types: spatial domain and transform domain. Spatial domain watermarking directly manipulates pixel values ​​to embed the watermark. While computationally complex, simple to implement, and fast to embed, the watermark is susceptible to damage from minor image modifications and exhibits poor robustness. Transform domain watermarking transforms the image into a specific domain before embedding the watermark and then inversely transforming it back to the spatial domain. This leverages the transform domain's characteristics to make the watermark resistant to common manipulations and can embed low-frequency coefficients in the discrete cosine transform domain. However, this computationally complex technique makes it difficult to maintain the watermark's effectiveness against printing, scanning, and network attacks, making it ineffective for reliably protecting copyright.

[0004] Existing technologies have some limitations and deficiencies in digital image hybrid watermarking:

[0005] Secondly, the watermark has limited adaptability: the watermark embedding method is simple and lacks consideration of image content characteristics. It cannot flexibly adjust the watermark embedding strategy according to the importance and characteristics of different areas of the image, resulting in unreasonable distribution of the watermark in the image and easy destruction.

[0006] Furthermore, the watermark protection effect is poor: when faced with complex attack methods (such as printing and scanning attacks that introduce multiple noises, change resolution, geometric distortion, and network attacks that add noise, over-compression, cropping and splicing, etc.), the distribution pattern of watermark information is easily destroyed, making it difficult for watermark extraction algorithms to accurately identify and restore watermarks, and unable to provide reliable copyright protection for digital images. Summary of the Invention

[0007] The purpose of the present invention is to provide a digital image hybrid watermarking method based on time domain and frequency domain synchronization to solve the problems in the prior art mentioned in the above background technology that the digital image hybrid watermarking method has some limitations and shortcomings.

[0008] To achieve the above object, the present invention provides a digital image hybrid watermarking method based on time domain and frequency domain synchronization, comprising the following steps:

[0009] S1, read the digital image that needs to be watermarked and pre-process the image;

[0010] S2. Determine the watermark information content according to the copyright protection requirements and convert the information into a format suitable for embedding into the image;

[0011] S3, through the time domain and frequency domain synchronous watermark embedding algorithm, monitor the changes in the time domain of the image and select the appropriate frequency in the frequency domain to embed the watermark;

[0012] S4. Save the processed image with embedded watermark. The saving format can be selected according to actual needs.

[0013] S5. Use a deep learning-based extraction framework to identify watermark features in digital images by training the model.

[0014] As a further improvement of the present technical solution, the step S1 of reading the digital image to be watermarked and pre-processing the image specifically includes the following steps:

[0015] S11, read the image and obtain basic information;

[0016] S12, format conversion;

[0017] S13, size adjustment;

[0018] S14: Normalization processing.

[0019] As a further improvement of the present technical solution, in step S2, determining the watermark information content according to the copyright protection requirements and converting the information into a format suitable for embedding into an image specifically include the following steps:

[0020] S21, determining the watermark information content;

[0021] S22, information coding conversion;

[0022] S23. Coding review and testing.

[0023] As a further improvement of the present technical solution, in step S3, the changes in the time domain of the image are monitored by using a time domain and frequency domain synchronous watermark embedding algorithm, and a suitable frequency is selected in the frequency domain to embed the watermark, which specifically includes the following steps:

[0024] S31. Establish an image change monitoring module to track the changes in the pixel values ​​of the image in real time;

[0025] S32, using fast Fourier transform to convert the image into frequency domain space, analyzing the spectrum characteristics of the image, and selecting appropriate frequency components as watermark embedding positions according to the frequency characteristics of the watermark information and the distribution of the image spectrum;

[0026] S33, using a specific encoding method to embed the watermark information into the selected frequency domain coefficients;

[0027] S34. During the embedding process, a correlation model between the time domain and the frequency domain is established to achieve synchronous embedding of the watermark in the time domain and the frequency domain, thereby enhancing the stability and recoverability of the watermark when it is attacked.

[0028] As a further improvement of this technical solution, step S32 specifically includes the following steps:

[0029] S321, converting the image from the time domain space to the frequency domain space using fast Fourier transform;

[0030] S322, providing a basis for selecting a suitable watermark embedding position by calculating the distribution of image energy in the frequency domain;

[0031] S323: Select appropriate frequency components as watermark embedding positions according to the frequency characteristics of the watermark information and the distribution of the image spectrum.

[0032] As a further improvement of this technical solution, step S33 specifically includes the following steps:

[0033] S331, before embedding the watermark, pre-analyze the image and adaptively adjust the watermark embedding strength according to the local complexity and visual importance areas of the image;

[0034] S332, the encoding method based on phase modulation uses the sensitivity of the phase of the frequency domain coefficient to embed watermark information;

[0035] S333, amplitude modulation coding adjusts the amplitude of the frequency domain coefficient according to the value of the watermark information;

[0036] S334. After embedding the watermark, post-process the image to make the image after embedding the watermark as visually similar as possible to the original image.

[0037] As a further improvement of the present technical solution, in step S4, the processed image with embedded watermark is saved, and the saving format can be selected according to actual needs. The specific operation steps are as follows: if the image needs to be transmitted quickly on the network and has high storage space requirements, select the JPEG format; if the image quality requirements are high and transparent background support is required, select the PNG format.

[0038] As a further improvement of the present technical solution, the extraction framework based on deep learning is adopted in step S5, and the watermark features in the digital image are identified by training the model, which specifically includes the following steps:

[0039] S51, the noise-resistant and compression-resistant feature extraction layer suppresses the noise in the image and compensates for the information loss caused by compression through the pre-learned noise and compression patterns;

[0040] S52, inputting the image processed by the anti-noise and anti-compression features into a pre-trained convolutional neural network, and the convolutional neural network automatically extracts potential watermark features in the image by using its convolution layer and pooling layer structures;

[0041] S53, inputting the features extracted by the convolutional neural network into a multilayer perceptron, which further processes and analyzes the features through its multiple hidden layers;

[0042] S54. Decode and identify the extracted watermark features, restore them to the original watermark information, and determine the copyright of the image by comparing them with the watermark information registered in the database.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] 1. In the present invention, a powerful watermark defense mechanism is constructed by using a time domain and frequency domain synchronous watermark embedding algorithm and utilizing the complementary characteristics between the time domain and the frequency domain. When facing various common image processing attacks (such as cropping, compression, noise interference, printing and scanning, etc.), whether it is image changes in the time domain or coefficient disturbances in the frequency domain, the synergistic effect of the time domain and the frequency domain can effectively protect the watermark information and ensure that the watermark can maintain a high degree of integrity after being attacked.

[0045] 2. In the present invention, the anti-noise and anti-compression feature extraction layer in the multi-level watermark extraction algorithm provides a solid guarantee for watermark extraction, so that it can still accurately extract the watermark even when the image quality is severely degraded, greatly improving the robustness of the watermark in complex environments and providing reliable technical support for digital image copyright protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The figure is a schematic diagram of the overall steps of the digital image hybrid watermarking method based on time domain and frequency domain synchronization of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] In a specific embodiment, Figure 1 As shown, the present invention provides a digital image hybrid watermarking method based on time domain and frequency domain synchronization, comprising the following steps:

[0049] 1. Time and frequency domain synchronous watermark embedding (TFSW): Establish a time domain image change monitoring mechanism, convert the image to the frequency domain through fast Fourier transform (FFT) and select the appropriate frequency components, and embed the watermark using the complementary relationship between the time domain and frequency domain to achieve synchronous embedding;

[0050] 2. Multi-level watermark extraction: Obtain the image to be detected, first extract the potential watermark features through a convolutional neural network (CNN), and then process it through a multi-layer perceptron (MLP) combined with anti-noise and anti-compression feature extraction layers to accurately extract the watermark and determine copyright ownership.

[0051] The detailed algorithm steps are as follows:

[0052] Step 1: Read the digital image to be watermarked and preprocess the image.

[0053] Step 1.1: Read the image and get basic information.

[0054] 1) Read image: Assume that the reading function of the image reading library is , where path is the image storage path or network data source address, and I is the read image object (data structure).

[0055] 2) Get image format: define the function to get image format , the value range of F is {JPEG,PNG,BMP,...}.

[0056] 3) Get the original size: Let the function for getting the width and height of the image be W, , where W represents width and H represents height, in pixels.

[0057] 4) Get color mode: define the function to get color mode , the value range of C is {GRAYSCALE,RGB,CMYK,...}.

[0058] Step 1.2: Format conversion.

[0059] 1) Assume the default universal format is target_format (RGB). If F≠target_format, perform format conversion.

[0060] 2) For grayscale images converted to RGB format (assuming the grayscale value is G): the converted RGB pixel values ​​R=G, G=G, B=G (that is, the value of each channel is equal to the grayscale value);

[0061] 3) For CMYK mode images converted to RGB format (assuming C, M, Y, and K are the values ​​of the CMYK channels respectively): According to the color space conversion formula, R=255×(1 and C)×(1 and K), G=255×(1 and M)×(1 and K), and B=255×(1 and Y)×(1 and K).

[0062] Step 1.3: Sizing.

[0063] 1) Determine the standard size: Assume the preset standard size is std_width and std_height (std_width=256, std_height=256).

[0064] 2) Calculate the scaling ratio: width scaling ratio , height scaling .

[0065] 3) Image scaling (taking bilinear interpolation scaling as an example): The bilinear interpolation scaling function is ,in is the scaled image.

[0066] Step 1.4: Normalization.

[0067] 1) Calculate the conversion ratio (taking mapping to the [0, 1] interval as an example): Assume that the maximum value that the image pixel value data type can represent is (For 8-bit unsigned integers, ), then the conversion ratio .

[0068] 2) Normalization operation: traverse each pixel (x, y) of the image, set the original pixel value to p(x, y), and the normalized pixel value to , making If you want to map to the interval [1,1], you can first perform the above mapping to the interval [0,1], and then use the formula to convert.

[0069] Step 2: According to the requirements of copyright protection, determine the content of the watermark information and convert this information into a format suitable for embedding into the image.

[0070] Step 2.1: Determine the watermark information content.

[0071] Let W be the watermark information. This is a set of multiple information items, represented as W = {owner, reg_no, create_date, ...}, where owner is the full name of the copyright owner, reg_no is the copyright registration number, and create_date is the creation date. Other information that may be added, such as the work version number and the authorized use range auth_range, can also be included in this set.

[0072] Step 2.2: Information encoding conversion.

[0073] 1) Convert character encoding to digital encoding (taking ASCII code as an example): Let the ASCII code value of character c be a(c). For each character in the watermark information (i=1,2,...,n, n is the total number of watermark information characters), the corresponding digital code ).

[0074] 2) Convert digital code to binary: Let the function that converts the number m into k-bit binary be b(m,k). For each digital code , converted to binary is b( ,8) (assuming 8-bit binary representation, which can be adjusted according to actual needs). Connecting the binary codes of all characters to obtain the binary sequence B of the watermark information can be expressed as ,in Represents a join operation.

[0075] Step 2.3: Coding review and testing.

[0076] Suppose the compatibility check function is check_compatibility(B, embedding_algorithm), and its return value is True or False, indicating whether the watermark information encoding B is compatible with the watermark embedding algorithm embedding_algorithm.

[0077] 1) Test by simulating the watermark embedding and extraction process. Let the simulated embedding function be simulate_embed(I,B), where I is the test image and B is the binary sequence of the watermark information. The function returns the image after embedding the watermark. .

[0078] 2) Set the simulation extraction function to simulate_extract( ), which is obtained from the image after embedding the watermark Extract watermark information binary sequence .

[0079] 3) Check whether the extracted watermark information is consistent with the original watermark information. You can define a comparison function compare(B, ), if compare(B, )=True, it means that the watermark information can be accurately embedded and completely restored under this test condition.

[0080] Step 3: Through the time domain and frequency domain synchronous watermark embedding algorithm, monitor the changes in the time domain of the image and select the appropriate frequency in the frequency domain to embed the watermark.

[0081] Step 3.1: Establish an image change monitoring module to track the changes in the pixel values ​​of the image in real time.

[0082] By calculating the difference in pixel values ​​between adjacent frames or adjacent regions, it detects whether an image has undergone cropping, modification, translation, or other operations. It also monitors changes in image size and records information such as the image zoom ratio. The image change detection module is built on precise analysis of image pixel values. Its core principle is to detect any temporal changes in the image by comparing pixel values ​​at different times or in different regions. For video image sequences, the relationship between adjacent frames can reflect dynamic changes in image content. For single images, comparing pixel values ​​after dividing the image into regions can reveal local modifications within the image.

[0083] Calculation of pixel value differences between adjacent frames (video image sequence).

[0084] Suppose the first The frame image is , No. The frame image is , for the coordinates in the image ) pixel point, the difference in pixel values ​​between adjacent frames .

[0085] Assume the total number of pixels is , the statistical difference exceeds the threshold The number of pixels is , then calculate the ratio .like , it is preliminarily determined that the image may have been cropped, modified, or translated.

[0086] Calculate the mean difference of pixel values ​​in adjacent regions (single image).

[0087] For a single image , divided into small areas of 8×8 pixels, set area The coordinates of the upper left corner are ,area The mean of the inner pixel values .

[0088] Set adjacent areas and , whose means are and , then the difference between the means of adjacent regions is .Will With threshold For comparison, if , we further analyze the changes in the area.

[0089] Set adjacent areas and , whose means are and , then the difference between the means of adjacent regions is .Will With threshold For comparison, if , we further analyze the changes in the area.

[0090] Image scaling calculation.

[0091] Assume that the width of the image at a certain moment is , the height is , and at another moment the width is , the height is , the width scaling ratio , height scaling The scaling uniformity index can be further defined ,like If it is larger, it means that the image has been non-proportionally scaled.

[0092] Step 3.2: Use Fast Fourier Transform (FFT) to convert the image into frequency domain space, analyze the spectral characteristics of the image, and select the appropriate frequency component as the watermark embedding position based on the frequency characteristics of the watermark information and the distribution of the image spectrum.

[0093] The use of Fast Fourier Transform (FFT) to convert an image from the time domain to the frequency domain is based on the principle of Fourier analysis. , FFT decomposes it into a series of combinations of sine and cosine waves of different frequencies.

[0094] Assume that the two-dimensional digital image is , whose size is M×N (M is the number of rows and N is the number of columns).

[0095] First, perform one-dimensional FFT calculation on each row of the image. Row (0≤ <M), its FFT result (u=0,1,...N and 1), where .

[0096] Then perform a one-dimensional FFT calculation on each column of these intermediate results to finally obtain the spectrum of the image (u=0,1,...N and 1, v=0,1,...M and 1).

[0097] By calculating the distribution of image energy in the frequency domain, a basis is provided for selecting the appropriate watermark embedding position.

[0098] When calculating the spectrum energy distribution, the formula Calculate each frequency component energy.

[0099] Suppose the frequency domain is divided into K frequency bands (for example, low frequency, medium frequency, and high frequency bands, which are set as K for general representation), and the frequency range of frequency band k (1≤k≤K) is , then the energy in frequency band k , the ratio of the energy of this frequency band to the total energy .

[0100] Selecting appropriate frequency components as the watermark embedding location based on the frequency characteristics of the watermark information and the distribution of the image spectrum is the key to ensuring the effectiveness and stability of the watermark.

[0101] Suppose the frequency characteristic function of the watermark information is W(f), which represents the characteristics of the watermark information such as the intensity or importance at the frequency (for low-frequency signals, the W(f) value is larger in the low-frequency area; for watermarks containing high-frequency components, it has a certain value in the corresponding high-frequency area).

[0102] When selecting the watermark embedding position, calculate each frequency component Weight ) (Here it is assumed that the frequency is in the two-dimensional frequency domain and the coordinates The relationship is , which can actually be adjusted according to the specific frequency definition method).

[0103] Then choose the weight The larger frequency component is used as the watermark embedding position, for example, ( is the threshold value, which is determined based on experiments and watermark characteristics) Position embedded watermark.

[0104] Step 3.3: Use a specific encoding method to embed the watermark information into the selected frequency domain coefficients.

[0105] Before embedding the watermark, the image is pre-analyzed and the watermark embedding strength is adaptively adjusted according to the local complexity and visually important areas of the image.

[0106] Assume the local complexity of the image is ( is the image pixel coordinate), the visual importance region function is (In important areas The value is larger in the non-important area and smaller in the non-important area), then the watermark embedding strength adjustment factor ( is the initial strength factor, which can be set based on experience);

[0107] For phase modulation based coding, the actual phase adjustment amount during embedding is actual( is the basic phase adjustment amount mentioned above ), then the modified phase is actually , the new frequency domain coefficients .

[0108] For amplitude modulation coding, the actual amplitude adjustment coefficient when embedded ( Adjust the basic coefficients for the amplitude, such as , corresponding to the basic 1.2 and 0.8 adjustments), when When the modified amplitude , the new frequency domain coefficients ;when hour, , .

[0109] The coding method based on phase modulation utilizes the sensitivity of the phase of frequency domain coefficients to embed watermark information.

[0110] The encoding method based on phase modulation has the advantage of having relatively little impact on the visual quality of the image, because the human eye is less sensitive to phase changes than amplitude changes.

[0111] Assume that the binary bits of the watermark information are ( =1,2,...,K, K is the length of the watermark sequence), for the frequency domain coefficient ,when When the phase increase , then the modified phase , the new frequency domain coefficients .

[0112] when When the phase decreases , then the modified phase , the new frequency domain coefficients .

[0113] Amplitude modulation coding adjusts the amplitude of the frequency domain coefficients according to the value of the watermark information.

[0114] The advantage of amplitude modulation coding is that watermark extraction is relatively simple and direct, but it is easy to affect the visual quality of the image, especially when the embedding strength is large.

[0115] When the watermark information bit When the frequency domain coefficient , the modified amplitude , the new frequency domain coefficients .

[0116] when When the modified amplitude , the new frequency domain coefficients .

[0117] After embedding the watermark, the image is post-processed to make the watermarked image as visually similar to the original image as possible, thereby improving the concealment of the watermark.

[0118] Assume that the original pixel value of the image at coordinate (x, y) is I(x, y), and the average pixel value of the local area (set as 3×3 neighborhood N(x, y)) is , the standard deviation is .

[0119] Enhanced pixel value ( is the contrast enhancement factor, which is determined according to the image characteristics and visual quality requirements, for example ), by improving the local contrast of the image in this way, the visual quality of the image after watermark embedding is better and the concealment of the watermark is improved.

[0120] Step 3.4: During the embedding process, a correlation model between the time domain and the frequency domain is established to achieve synchronous embedding of the watermark in the time domain and the frequency domain, thereby enhancing the stability and recoverability of the watermark when it is attacked.

[0121] Establishing the mapping function M between the time domain and the frequency domain is the key to achieving synchronous watermark embedding.

[0122] This mapping function needs to be constructed based on the type of image changes in the time domain and the characteristics of the frequency domain.

[0123] Assume that the image in the time domain is cropped horizontally Pixel, the original embedding position of the watermark in the horizontal frequency direction in the frequency domain is , according to the mapping function M, the position after translation .here is the scale factor, which is determined as follows: suppose a series of test images are cropped with different numbers of horizontal pixels ( , is the number of experiments), record the translation amount in the corresponding frequency domain when the watermark extraction effect is the best . Through linear regression and other methods to fit The value of satisfy .

[0124] For phase modulation, let the original phase adjustment be (For example, when embedding the watermark, the watermark information is set to 1 or 0. ), the cropping ratio is ( is the original image width), then the adjusted phase change At this time, when the embedded watermark is 1, the modified phase becomes , the new frequency domain coefficients ; When the embedded watermark is 0, , .

[0125] For amplitude modulation, let the original amplitude adjustment coefficient be (such as 1.2 or 0.8), the adjusted amplitude coefficient When the watermark information bit is 1, the modified amplitude becomes , the new frequency domain coefficients ; When the watermark information bit is 0, , .

[0126] Establishing constraints is crucial to ensuring the stability of the watermark during synchronous embedding in the time and frequency domains.

[0127] Ensuring the conservation of watermark energy in the time domain and frequency domain is an important constraint. When the watermark energy changes due to operations such as scaling the image in the time domain, the watermark in the frequency domain adjusts the embedding coefficients to keep the total energy constant or fluctuate within a certain range.

[0128] Assume that the image is scaled in the time domain, and the scaling ratio is ( Indicates shrinkage, Indicates amplification), when amplitude modulation coding is used, the amplitude of the original watermark after embedding is .

[0129] For the zoom-out case, the amplitude of the watermark in the frequency domain after zooming should be adjusted to , at this time the watermark energy in the frequency domain ( is the amplitude of the scaled frequency domain coefficient), and the original watermark energy Compared to, satisfied (Within a certain error range, it can be set according to actual needs) to achieve watermark energy conservation.

[0130] For the case of magnification, the amplitude of the watermark in the frequency domain after scaling should be adjusted to , it can also be verified that the energy relationship meets the conservation requirements.

[0131] At the same time, other constraints can also be established, such as the consistency constraint of the watermark information in the time domain and the frequency domain, to ensure that the watermark information will not be lost or erroneous during the conversion process between the time domain and the frequency domain.

[0132] At the same time, other constraints can also be established, such as the consistency constraint of the watermark information in the time domain and the frequency domain, to ensure that the watermark information will not be lost or erroneous during the conversion process between the time domain and the frequency domain.

[0133] Assume that the watermark information embedded in the time domain is ( is the watermark sequence length), the watermark information extracted in the frequency domain is . Define the consistency function , in an ideal situation, , indicating that the watermark information is not lost or erroneous during the conversion between time domain and frequency domain. In practical applications, a threshold is set (For example ),when When , it is considered that the watermark information remains consistent in the time domain and frequency domain, satisfying the constraints.

[0134] By establishing a correlation model between the time and frequency domains, the watermark is simultaneously embedded in both the time and frequency domains, significantly enhancing the watermark's stability and recoverability against attacks. Due to the simultaneous embedding of the watermark in the time domain, the watermark can adapt to image noise and color changes; in the frequency domain, the watermark can also adapt to changes in resolution. Using appropriate extraction algorithms, the watermark information can be accurately recovered.

[0135] Step 4: Save the image with the watermark embedded after the above series of processing. The saving format can be selected according to actual needs, such as common formats such as JPEG and PNG.

[0136] After a series of processing steps, including the improved singular value decomposition (ISVD) and time- and frequency-domain simultaneous watermark embedding (TFSW), the watermarked image is obtained. When saving this image, choose an appropriate image format based on the actual application scenario and requirements. If the image needs to be transmitted quickly over a network and requires a high level of storage space, JPEG format can be chosen. JPEG format uses a lossy compression algorithm, which can significantly reduce the image file size, but with some loss of image quality. When saving in JPEG format, it is important to set an appropriate compression ratio, which can generally be determined through experimentation. If higher image quality is required and features such as transparent backgrounds are required, such as for design materials or professional image editing, PNG format can be chosen. PNG format uses lossless compression, which better preserves image details and watermark information, but the file size is relatively large.

[0137] During the preservation process, ensure that relevant image metadata is fully preserved. Watermark embedding parameters include the size of the image blocks during the ISVD operation (e.g., 8×8 pixels or 16×16 pixels), the strength factor for singular value modification (e.g., the value used to modify the singular value size during watermark embedding), and the frequency components of the watermark embedded during the TFSW phase (e.g., the specific frequency range or specific frequency band in the low-frequency region). Copyright information, such as the copyright owner's name, copyright registration number, and creation date, must also be clearly recorded. This metadata can be stored in the image file header or a dedicated metadata area, using a specific encoding format for easy subsequent reading and parsing.

[0138] Step 5: Use a deep learning-based extraction framework to identify watermark features in digital images by training the model.

[0139] Step 5.1: The noise-resistant and compression-resistant feature extraction layer suppresses the noise in the image and compensates for the information loss caused by compression through the pre-learned noise and compression patterns, so that the watermark features can still be accurately extracted even when the image quality is degraded.

[0140] Noise suppression (using Gaussian noise and mean filters as examples).

[0141] Assume image The neighborhood of pixel (x, y) is N(x, y), and the kernel of the mean filter is .

[0142] Pixel value after passing through the mean filter .

[0143] For Gaussian noise, the probability density function is ( is the mean, is the standard deviation), the noise-resistant feature extraction layer estimates the noise parameters by learning a large number of images with Gaussian noise added, thereby suppressing the noise in actual detection.

[0144] Compensation for compressed information (taking JPEG compression and bilinear interpolation as examples).

[0145] Suppose the frequency coefficient matrix of a 8×8 block of the JPEG compressed image after quantization is C, and its low-frequency part (assuming the upper left corner) and the high frequency part (Lower right corner.) When high-frequency information is lost, low-frequency information is used to restore high-frequency information.

[0146] Assume the bilinear interpolation function is , for the pixel position where high-frequency information is lost , the restored pixel value (here The function calculates the target pixel value through bilinear interpolation based on the surrounding low-frequency pixel values).

[0147] Step 5.2: Input the image processed by anti-noise and anti-compression features into the pre-trained convolutional neural network (CNN). CNN uses its convolutional layer and pooling layer structures to automatically extract the potential watermark features in the image.

[0148] Convolutional layer operation (taking a 3×3 convolution kernel as an example).

[0149] Let the input image be I and the convolution kernel be , for each pixel (x, y) in the image, the output eigenvalue F(x, y) of the convolutional layer (on a certain feature channel) is calculated as follows:

[0150] .

[0151] here Indicates that the convolution kernel is The weight value of the position. By sliding the convolution kernel across the image, the corresponding feature map is obtained. Different convolution kernels (such as 3×3 and 5×3) are calculated through similar calculations to obtain multiple feature maps. These feature maps together constitute the convolution layer output, which contains feature information at different scales of the image.

[0152] Pooling layer operation (taking 2×2 maximum pooling as an example).

[0153] Assume that the pooling window size is 2×2, for the feature map of the pooling layer input , output feature map The calculation is as follows:

[0154] .

[0155] That is, the maximum value in each 2×2 window is selected as the output, achieving the purpose of dimensionality reduction and retaining key features.

[0156] Step 5.3: The features extracted by CNN are input into the Multi-Layer Perceptron (MLP). MLP further processes and analyzes the features through its multiple hidden layers, and gradually extracts higher-level and more abstract watermark feature representations.

[0157] Neuron weighted summation and nonlinear transformation (with the first hidden layers as an example).

[0158] Set up the first The feature vector output by the layer is ) (n is the number of features), The connection weight matrix of the layer is ( =1,2, Indicates the The number of neurons in the layer, =1,2, ), the bias vector is .

[0159] No. Layer neurons Weighted sum input .

[0160] The output after ReLU activation function .

[0161] Through multiple layers of such calculations (from the input layer to multiple hidden layers), the original image features are gradually transformed into more abstract watermark feature representations.

[0162] Step 5.4: Decode and identify the extracted watermark features, restore them to the original watermark information, and compare them with the watermark information registered in the database to accurately determine the copyright ownership of the image, thereby achieving effective protection of digital image copyright.

[0163] Watermark decoding (taking binary sequence decoding as an example).

[0164] Assume that the extracted feature vector is , if the watermark is embedded by modifying the singular value size during encoding, the encoding rule is ( is a decoding function determined according to the embedding rule, for example, the original watermark bits are calculated in reverse according to the singular value modification rule).

[0165] Get the decoded binary sequence .

[0166] Copyright ownership judgment (taking Hamming distance as an example).

[0167] Assume that the watermark information registered in the database is , the extracted watermark information is .

[0168] Hamming distance .

[0169] like ( is the set threshold), the image copyright is considered to belong to the owner of the registered watermark information; otherwise, it is considered that the image may have copyright issues.

[0170] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A digital image hybrid watermarking method based on time domain and frequency domain synchronization, characterized in that: The following steps are involved: S1, read the digital image that needs to be watermarked and pre-process the image; S2. Determine the watermark information content according to the copyright protection requirements and convert the information into a format suitable for embedding into the image; S3. Using the time domain and frequency domain synchronous watermark embedding algorithm, we monitor the changes in the time domain of the image and select the appropriate frequency in the frequency domain to embed the watermark. Specifically: S31. Establish an image change monitoring module to track the changes in the pixel values ​​of the image in real time; S32, using fast Fourier transform to convert the image into frequency domain space, analyzing the spectrum characteristics of the image, and selecting appropriate frequency components as watermark embedding positions according to the frequency characteristics of the watermark information and the distribution of the image spectrum; S33, embedding the watermark information into the selected frequency domain coefficients using an encoding method; S34. During the embedding process, a correlation model between the time domain and the frequency domain is established to achieve synchronous embedding of the watermark in the time domain and the frequency domain, thereby enhancing the stability and recoverability of the watermark when it is attacked. Assume that the watermark information embedded in the time domain is , is the watermark sequence length, and the watermark information extracted in the frequency domain is , define the consistency function , set a threshold ,when When , the watermark information is considered to be consistent in the time domain and frequency domain; S4. Save the processed image with embedded watermark, and the saving format is selected according to actual needs; S5. Use a deep learning-based extraction framework to identify watermark features in digital images by training the model.

2. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1 is characterized in that: The step S1 of reading the digital image to be watermarked and pre-processing the image specifically includes the following steps: S11, read the image and obtain basic information; S12, format conversion; S13, size adjustment; S14: Normalization processing.

3. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1 is characterized in that: In step S2, the watermark information content is determined according to the copyright protection requirements, and the watermark information is converted into a format suitable for embedding into an image, which specifically includes the following steps: S21, determining the watermark information content; S22, information coding conversion; S23. Coding review and testing.

4. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1 is characterized in that: The step S32 specifically includes the following steps: S321, converting the image from the time domain space to the frequency domain space using fast Fourier transform; S322, providing a basis for selecting a suitable watermark embedding position by calculating the distribution of image energy in the frequency domain; S323: Select appropriate frequency components as watermark embedding positions according to the frequency characteristics of the watermark information and the distribution of the image spectrum.

5. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 4 is characterized in that: The step S33 specifically includes the following steps: S331, before embedding the watermark, pre-analyze the image and adaptively adjust the watermark embedding strength according to the local complexity and visual importance areas of the image; S332, the encoding method based on phase modulation uses the sensitivity of the phase of the frequency domain coefficient to embed watermark information; S333, amplitude modulation coding adjusts the amplitude of the frequency domain coefficient according to the value of the watermark information; S334. After embedding the watermark, post-process the image to make the image after embedding the watermark as visually similar as possible to the original image.

6. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1 is characterized in that: In step S4, the processed image with embedded watermark is saved, and the specific operation steps for selecting the saving format according to actual needs are: if the image needs to be transmitted quickly on the network and has high storage space requirements, select the JPEG format; if the image quality requirements are high and transparent background needs to be supported, select the PNG format.

7. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1 is characterized in that: In step S5, the extraction framework based on deep learning is adopted to identify the watermark features in the digital image by training the model, which specifically includes the following steps: S51, the noise-resistant and compression-resistant feature extraction layer suppresses the noise in the image and compensates for the information loss caused by compression through the pre-learned noise and compression patterns; S52, inputting the image processed by the anti-noise and anti-compression features into a pre-trained convolutional neural network, and the convolutional neural network automatically extracts potential watermark features in the image by using its convolution layer and pooling layer structure; S53, inputting the features extracted by the convolutional neural network into a multilayer perceptron, which further processes and analyzes the features through its multiple hidden layers; S54. Decode and identify the extracted watermark features, restore them to the original watermark information, and determine the copyright of the image by comparing them with the watermark information registered in the database.

Citation Information

Patent Citations

  • Watermark embedding and extracting method based on two-dimensional adaptive Fourier decomposition

    CN110084737A

  • Depth image watermarking method based on mixed frequency domain channel attention

    CN115272044A

  • Digital watermark embedding method, system and equipment based on Fourier transform and medium

    CN117745509A