CN119741182B - Digital image mixed watermarking method based on time domain and frequency domain synchronization - Google Patents
Digital image mixed watermarking method based on time domain and frequency domain synchronizationInfo
- Publication number
- CN119741182B CN119741182B CN202510239463.1A CN202510239463A CN119741182B CN 119741182 B CN119741182 B CN 119741182B CN 202510239463 A CN202510239463 A CN 202510239463A CN 119741182 B CN119741182 B CN 119741182B
- Authority
- CN
- China
- Prior art keywords
- watermark
- image
- frequency domain
- time domain
- embedding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of digital image processing, in particular to a digital image mixed watermarking method based on time domain and frequency domain synchronization. The invention aims to remarkably improve the concealment and robustness of the watermark by innovatively combining a time domain and frequency domain synchronous watermark embedding algorithm and a multi-stage watermark extraction algorithm, effectively solves the problems of digital image copyright protection when facing printing and scanning attacks and network attacks, ensures the safety and reliability of digital image copyright protection, provides a more advanced and effective technical means for digital image copyright protection, and has the advantages that the time domain and frequency domain synchronous watermark embedding algorithm enables the watermark to be fused into image details and has strong concealment, the watermark is effectively protected when facing various attacks, and the multi-stage watermark extraction algorithm ensures accurate extraction when the image quality is reduced, thereby integrally improving the watermark performance.
Description
Technical Field
The invention relates to the technical field of digital image processing, in particular to a digital image mixed watermarking method based on time domain and frequency domain synchronization.
Background
In order to cope with the urgent need for digital image copyright protection, digital watermarking technology has been widely studied and applied as a potential solution. The basic principle of the digital watermarking technology is to embed specific information (watermark) into a digital image in an invisible or indiscernible manner, so that the identification and protection of image copyright are realized on the premise of not affecting the normal use of the image.
The existing digital watermarking technology is divided into two types, namely an airspace domain and a transform domain. The spatial watermark technology directly operates pixel values to embed the watermark, and although the computational complexity is low, the implementation is simple and the embedding speed is high, the watermark is easy to be damaged due to small image modification, and the robustness is poor. The transform domain watermark technology firstly transforms an image to a specific domain and then embeds the watermark, then inverts the transform domain, can make the watermark have certain resistance to common operation by utilizing the characteristics of the transform domain, can embed low-frequency coefficients in the discrete cosine transform domain, but has complex calculation, and can not reliably protect copyright because the watermark effectiveness is difficult to maintain when facing printing, scanning and network attack.
The prior art has some limitations and disadvantages in terms of digital image hybrid watermarking:
Secondly, the watermark adaptability is limited, the watermark embedding mode is simple, the consideration of the content characteristics of the image is lacking, the watermark embedding strategy cannot be flexibly adjusted according to the importance and the characteristics of different areas of the image, so that the distribution of the watermarks in the image is unreasonable and is easy to destroy;
Moreover, the watermark protection effect is poor, namely, when facing complex attack means (such as various noise, resolution change, geometric distortion are introduced in printing and scanning attacks, noise adding, over-compression, clipping and splicing in network attacks and the like), the distribution rule of watermark information is easy to break, so that a watermark extraction algorithm is difficult to accurately identify and recover the watermark, and reliable copyright protection cannot be provided for digital images.
Disclosure of Invention
The invention aims to provide a digital image mixed watermarking method based on time domain and frequency domain synchronization, which solves the problems that the prior art proposed in the background art has some limitations and disadvantages in the aspect of digital image mixed watermarking.
In order 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:
s1, reading a digital image which needs watermark processing, and preprocessing the image;
S2, determining watermark information content according to copyright protection requirements, and converting the watermark information into a format suitable for embedding an image;
S3, monitoring the change in the time domain of the image through a time domain and frequency domain synchronous watermark embedding algorithm, and selecting proper frequency in the frequency domain to embed the watermark;
s4, storing the processed watermark-embedded image, wherein the storage format can be selected according to actual requirements;
s5, adopting an extraction frame based on deep learning, and identifying watermark features in the digital image through a training model.
As a further improvement of the present technical solution, the step S1 of reading the digital image to be watermarked, and preprocessing the image specifically includes the following steps:
S11, reading an image and acquiring basic information;
s12, format conversion;
s13, size adjustment;
S14, normalization processing.
As a further improvement of the present technical solution, in the step S2, according to the requirement of copyright protection, determining watermark information content, and converting the watermark information into a format suitable for embedding an image specifically includes the following steps:
S21, determining watermark information content;
s22, information code conversion;
s23, coding inspection and test.
As a further improvement of the present technical solution, in the step S3, the change is monitored in the time domain of the image by using a time domain and frequency domain synchronous watermark embedding algorithm, and selecting a suitable frequency embedded watermark in the frequency domain specifically includes the following steps:
S31, an image change monitoring module is established, and the change condition of pixel values of an image is tracked in real time;
S32, converting the image into a frequency domain space by utilizing fast Fourier transform, analyzing the frequency spectrum characteristic of the image, and selecting a proper frequency component as a watermark embedding position according to the frequency characteristic of watermark information and the distribution condition of the image frequency spectrum;
S33, embedding watermark information into the selected frequency domain coefficient by adopting a specific coding mode;
s34, in the embedding process, a correlation model between the time domain and the frequency domain is established, so that the synchronous embedding of the watermark in the time domain and the frequency domain is realized, and the stability and the restorability of the watermark when the watermark is attacked are enhanced.
As a further improvement of the present technical solution, the step S32 specifically includes the following steps:
S321, converting an image from a time domain space to a frequency domain space by utilizing fast Fourier transform;
S322, providing a basis for selecting a proper watermark embedding position by calculating the distribution condition of image energy in a frequency domain;
s323, selecting proper frequency components as watermark embedding positions according to the frequency characteristics of watermark information and the distribution condition of image spectrums.
As a further improvement of the present technical solution, the step S33 specifically includes the following steps:
s331, before embedding the watermark, pre-analyzing the image, and adaptively adjusting the watermark embedding strength according to the local complexity and the visual importance area of the image;
S332, embedding watermark information by using sensitivity of frequency domain coefficient phase in a coding method based on phase modulation;
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-processing the image, so that the image with the embedded watermark is similar to the original image as much as possible in vision.
As a further improvement of the technical scheme, in the step S4, the processed watermark-embedded image is saved, and the specific operation steps of saving the watermark-embedded image can be selected according to actual requirements, namely, if the image needs to be rapidly transmitted on a network and has higher requirements on storage space, a JPEG format is selected, and if the requirement on image quality is higher and a transparent background needs to be supported, a PNG format is selected.
As a further improvement of the present technical solution, in the step S5, an extraction framework based on deep learning is adopted, and the identifying watermark features in the digital image through training a model specifically includes the following steps:
S51, the anti-noise and compression-resistant feature extraction layer suppresses noise in the image through pre-learned noise and compression modes, and compensates information loss caused by compression;
S52, inputting the image processed by the anti-noise and compression-resistant characteristics into a pre-trained convolutional neural network, and automatically extracting potential watermark characteristics in the image by using structures such as a convolutional layer and a pooling layer of the convolutional neural network;
S53, inputting the characteristics extracted by the convolutional neural network into a multi-layer perceptron, and further processing and analyzing the characteristics by the multi-layer perceptron through a plurality of hidden layers of the multi-layer perceptron;
S54, decoding and identifying the extracted watermark features, restoring the extracted watermark features into original watermark information, and judging the copyright attribution of the image by comparing the watermark information registered in a database.
Compared with the prior art, the invention has the beneficial effects that:
1. according to the invention, a powerful watermark defense mechanism is constructed by utilizing the complementary characteristics between the time domain and the frequency domain through a time domain and frequency domain synchronous watermark embedding algorithm, and when facing various common image processing attacks (such as clipping, compression, noise interference, printing, scanning and the like), the watermark information can be effectively protected through the synergistic effect of the time domain and the frequency domain no matter the image on the time domain is changed or the coefficient on the frequency domain is disturbed, so that the watermark can still keep higher integrity after being attacked.
2. In the invention, the anti-noise and compression-resistant characteristic extraction layer in the multi-stage watermark extraction algorithm provides solid guarantee for watermark extraction, so that the watermark can still be accurately extracted under the condition of severely reduced image quality, the robustness of the watermark in a complex environment is greatly improved, and a reliable technical support is provided for digital image copyright protection.
Drawings
Fig. 1 is a flowchart illustrating the overall steps of a digital image hybrid watermarking method based on time domain and frequency domain synchronization according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In a specific embodiment, as shown in fig. 1, the present invention provides a digital image hybrid watermarking method based on time domain and frequency domain synchronization, which includes the following steps:
1. The time domain and frequency domain synchronous watermark embedding (TFSW) is implemented by establishing a time domain image change monitoring mechanism, simultaneously converting an image into a frequency domain through Fast Fourier Transform (FFT) and selecting proper frequency components, and embedding the watermark by utilizing the complementary relation of the time domain and the frequency domain to realize synchronous embedding;
2. and (3) extracting the multistage watermark, namely acquiring an image to be detected, extracting potential watermark characteristics through a Convolutional Neural Network (CNN), and accurately extracting the watermark and judging copyright attribution through processing of a multi-layer perceptron (MLP) combined with anti-noise and compression-resistant characteristic extraction layers.
The detailed algorithm steps are as follows:
And 1, reading a digital image which needs to be subjected to watermark processing, and preprocessing the image.
And 1.1, reading the image and acquiring basic information.
1) Reading an image by setting a reading function using an image reading library asWhere path is the storage path or network data source address of the image and I is the read image object (data structure).
2) Acquisition of image Format defining a function for acquiring an image FormatThe value range of F is { JPEG, PNG, BMP.
3) The original size is acquired by setting the function of the acquired image width and height as W,Where W represents width, H represents height, and unit is pixel.
4) Acquisition of color patterns defining functions for acquisition of color patternsThe value range of C is { GRAYSCALE, RGB, CMYK, }.
And step 1.2, format conversion.
1) Assuming that a preset general format is target_format (RGB), if F is not equal to target_format, performing format conversion.
2) Converting the gray image into RGB format (assuming gray value G), wherein the converted RGB pixel values r=g, g=g, b=g (i.e. the value of each channel is equal to the gray value);
3) For CMYK mode image conversion to RGB format (assuming C, M, Y, K is the CMYK channel values, respectively) according to the color space conversion formula R=255× (1 and C) × (1 and K), G=255× (1 and M) × (1 and K), B=255× (1 and Y) × (1 and K).
And 1.3, adjusting the size.
1) The standard sizes are determined by setting preset standard sizes as std_width and std_height (std_width=256, std_height=256).
2) Calculating the scaling ratio width scaling ratioHigh scaling。
3) Image scaling (bilinear interpolation scaling, for example) the bilinear interpolation scaling function isWhereinIs a scaled image.
And 1.4, normalizing.
1) Calculating the conversion ratio (mapping to [0,1] interval is taken as an example) by setting the maximum value which can be represented by the image pixel value data type as(For an 8-bit unsigned integer,) Conversion ratio is then。
2) Normalization operation, namely traversing each pixel (x, y) of the image, setting an original pixel value as p (x, y), and normalizing the pixel valueSo that. If mapping to the [ and 1,1] interval is desired, the mapping to the [0,1] interval can be performed first, and then the formula is passedAnd performing conversion.
And 2, determining watermark information content according to the copyright protection requirement, and converting the information into a format suitable for embedding an image.
And 2.1, determining watermark information content.
Let watermark information be W, which is a collection of information items, and may be represented as w= { owner, reg_no, create_date, }, where owner represents the full name of the copyright owner, reg_no represents the copyright registration number, and create_date represents the creation date. Other information that may be added, such as work version number version and authorized usage range authrange, may also be included in this collection.
And 2.2, information transcoding.
1) The character code is converted into digital code (ASCII code, for example) by setting the ASCII code value of character c as a (c), for each character in the watermark information(I=1, 2,) n, n being the total number of watermark information characters) its corresponding digital code)。
2) Conversion of digital codes into binary values by setting the function of converting the number m into k-bit binary values as b (m, k) for each digital codeConverted into binary system to be b #8) (Assuming an 8-bit binary representation, which is actually adjustable according to the requirements). The binary sequence B connecting the binary codes of all the characters to obtain watermark information can be expressed asWhereinRepresenting the connection operation.
And 2.3, coding inspection and test.
Let the compatibility check function be check_compatibility (B, embedding _algorithm) and return a value True or False indicating whether the watermark information code B is compatible with the watermark embedding algorithm embedding _algorithm.
1) Testing by simulating watermark embedding and extracting process, setting the simulated embedding function as simulate _emmbed (I, B), wherein I is test image, B is watermark information binary sequence, and the function returns the image embedded with watermark。
2) Let the simulated extraction function be simulate _extract%) It is derived from the watermarked imageExtracting watermark information binary sequence。
3) Checking whether the extracted watermark information is consistent with the original watermark information, a comparison function compare (B,) If the data of the compact (B,) =True, then means that the watermark information can be accurately embedded and completely restored in this test case.
And 3, monitoring the change in the time domain of the image through a time domain and frequency domain synchronous watermark embedding algorithm, and selecting proper frequency in the frequency domain to embed the watermark.
And 3.1, establishing an image change monitoring module and tracking the change condition of the pixel value of the image in real time.
And detecting whether the image is subjected to operations such as clipping, modification, translation and the like by calculating the difference of pixel values of adjacent frames or adjacent areas, and simultaneously monitoring the change of the image size and recording information such as image scaling and the like. The image change monitoring module is constructed based on an accurate analysis of the image pixel values. The core principle is to detect any variation of the image in the time domain by comparing pixel values at different moments or different areas. For a video image sequence, the relation between adjacent frames can reflect the dynamic change of image content, and for a single image, the comparison of pixel values after dividing the area can reveal the local modification condition inside the image.
Adjacent frame pixel value difference computation (video image sequence).
Set the first in the video image sequenceThe frame image isFirst, theThe frame image isFor the coordinates in the image as) Is adjacent to the pixel point of the frame and the pixel value of the adjacent frame is different。
Let the total number of pixels beThe statistical difference exceeds a thresholdThe number of pixels isCalculating the ratio. If it isThen the preliminary determination image may have undergone cropping, modification, or panning operations.
And (5) calculating the average value difference of the pixel values of the adjacent areas (single image).
For a single imageDivided into 8×8 pixels, and provided with regionsThe upper left corner coordinates areArea (area)Mean value of intra pixel values。
Setting adjacent areasAndThe average value is respectivelyAndDifferences in mean values of adjacent regions. Will beAnd threshold valueComparing ifThe change in the area is further analyzed.
Setting adjacent areasAndThe average value is respectivelyAndDifferences in mean values of adjacent regions. Will beAnd threshold valueComparing ifThe change in the area is further analyzed.
And (5) calculating the image scaling.
Let the width of the image at a certain time beThe height isAt another moment the width isThe height isThen the width is scaledHigh scaling. Scaling uniformity indicators may be further definedIf (if)Larger, it indicates that the image is scaled unevenly.
And 3.2, converting the image into a frequency domain space by utilizing Fast Fourier Transform (FFT), analyzing the frequency spectrum characteristic of the image, and selecting a proper frequency component as a watermark embedding position according to the frequency characteristic of watermark information and the distribution condition of the image frequency spectrum.
Transforming an image from time domain space to frequency domain space using a Fast Fourier Transform (FFT) is based on the principle of fourier analysis. For a two-dimensional digital imageThe FFT breaks it down into a series of combinations of sine and cosine waves of different frequencies.
Let two-dimensional digital image beThe size is M×N (M is the number of rows and N is the number of columns).
First, one-dimensional FFT calculation is performed for each line of the image, for the firstRow (0 is less than or equal to< M), FFT results thereof(U=0, 1,..n and 1), here。
Then, one-dimensional FFT calculation is carried out on each column of the intermediate results, and finally, the frequency spectrum of the image is obtained(U=0, 1,..n and 1, v=0, 1,..m and 1).
The distribution condition of the image energy in the frequency domain is calculated, so that a basis is provided for selecting a proper watermark embedding position.
In calculating the spectral energy distribution, the formula is passed throughCalculating each frequency componentIs a function of the energy of the (c).
The frequency range of the frequency band K (1≤k≤K) is set to be K frequency bands (for example, three frequency bands of low frequency, intermediate frequency and high frequency, which are set to be K for the sake of general representation)Then the energy in band kThe energy of the frequency band being a proportion of the total energy。
The selection of a suitable frequency component as a watermark embedding location according to the frequency characteristics of watermark information and the distribution of image spectrum is a key to ensure the effectiveness and stability of the watermark.
The frequency characteristic function of watermark information is set to be W (f), which represents the intensity or importance of the watermark information at the frequency (the W (f) value is larger in the low frequency region for the low frequency signal, and a certain value is present in the corresponding high frequency region for the watermark containing the high frequency component).
When selecting the watermark embedding position, each frequency component is calculatedWeights of (2)) (It is assumed here that the frequency is in two-dimensional frequency domain and coordinatesThe relation of (2) is thatAnd may be adjusted in practice according to the specific frequency definition).
Then select the weightsLarger frequency components as watermark embedding locations, e.g. selected to satisfy(For a set threshold, determined based on experimental and watermark characteristics)The watermark is embedded in the location.
And 3.3, embedding the watermark information into the selected frequency domain coefficients by adopting a specific coding mode.
Before embedding the watermark, pre-analyzing the image, and adaptively adjusting the watermark embedding strength according to the local complexity and the visual importance area of the image.
Let the local complexity of the image be(Image pixel coordinates), the visual importance area function is(In the important region)Larger value, smaller value for non-important area), then the watermark embedding strength adjustment factor(As an initial intensity factor, can be empirically set);
For encoding based on phase modulation, the amount of phase adjustment at the time of actual embedding Actual%For the above basic phase adjustment amount) The modified phase is actualNew frequency domain coefficients。
For amplitude modulation coding, the amplitude adjustment coefficient at the time of actual embedding(Adjusting basic coefficients for amplitude, e.g.Corresponding to basic 1.2 and 0.8 adjustments), whenWhen modified amplitudeNew frequency domain coefficientsWhen (1)In the time-course of which the first and second contact surfaces,,。
The phase modulation-based coding method exploits the sensitivity of the frequency domain coefficient phase to embed watermark information.
An advantage of the phase modulation based coding method is that it has a relatively small impact on the visual quality of the image, since the human eye has a lower sensitivity to phase variations than amplitude variations.
Let binary bits of watermark information be(=1, 2,..K, K is watermark sequence length), for frequency domain coefficientsWhen (when)Phase increment amount at the timeThen the modified phaseNew frequency domain coefficients。
When (when)Phase reduction amountThen the modified phaseNew frequency domain coefficients。
Amplitude modulation coding adjusts the amplitude of the frequency domain coefficients according to the value of the watermark information.
The advantage of amplitude modulation coding is that watermark extraction is relatively straightforward, but is prone to impact on the visual quality of the image, especially when the embedding strength is large.
When watermarking information bitsFor the frequency domain coefficientsAmplitude after modificationNew frequency domain coefficients。
When (when)When modified amplitudeNew frequency domain coefficients。
After the watermark is embedded, the image is post-processed, so that the image with the embedded watermark is similar to the original image as much as possible in vision, and the concealment of the watermark is improved.
Let the original pixel value of the image at coordinates (x, y) be I (x, y), the average pixel value of the local area (set as 3 x 3 neighborhood N (x, y)) beStandard deviation is。
Enhanced pixel values(For contrast enhancement factors, e.g. determined based on image characteristics and visual quality requirements) By the method, the local contrast of the image is improved, so that the visual quality of the image after watermark embedding is better, and the concealment of the watermark is improved.
And 3.4, in the embedding process, establishing a correlation model between the time domain and the frequency domain, realizing synchronous embedding of the watermark in the time domain and the frequency domain, and enhancing the stability and the restorability of the watermark when the watermark is attacked.
Establishing a mapping function M between a time domain and a frequency domain is a key for realizing watermark synchronous embedding.
This mapping function needs to be constructed according to the type of variation of the image in the time domain and the characteristics of the frequency domain.
Let the image in the time domain cut out in the horizontal directionThe original embedded position of the pixel in the horizontal frequency direction of the watermark in the frequency domain isAccording to the mapping function M, the translated position. Here, theIs proportional coefficient and is determined by cutting a series of test images to obtain different numbers of horizontal pixels(,For the number of experiments), the translation amount of the corresponding frequency domain with the best watermark extraction effect is recorded. Fitting by linear regressionValues of (2) such thatSatisfy the following requirements。
For phase modulation, the original phase adjustment amount is set to(E.g. set to 1 or 0 according to watermark information at the time of watermark embedding)) The cutting proportion is(Original image width), the adjusted phase change amount. At this time, when the embedded watermark is 1, the modified phase becomesNew frequency domain coefficientsWhen the embedded watermark is 0,,。
For amplitude modulation, the original amplitude adjustment coefficient is set as(E.g., 1.2 or 0.8), then the adjusted amplitude coefficient. When the watermark information bit is 1, the modified amplitude becomesNew frequency domain coefficientsWhen the watermark information bit is 0,,。
Establishing constraint conditions is important to ensure the stability of the watermark in the synchronous embedding process of the time domain and the frequency domain.
Ensuring conservation of watermark energy in the time and frequency domains is an important constraint. When the watermark energy changes due to the scaling and other operations of the image in the time domain, the watermark in the frequency domain keeps the total energy unchanged or fluctuates within a certain range by adjusting the embedding coefficient.
Let the image scale in the time domain, the scale is(The representation is scaled down so that,Representation amplification), when amplitude modulation coding is used, the amplitude after the original watermark is embedded is。
For the case of scaling, the amplitude of the watermark in the scaled frequency domain should be adjusted toWatermark energy in the time-frequency domain(For the amplitude of the scaled frequency domain coefficients), and the original watermark energyIn comparison, satisfyAnd (within a certain error range, the watermark energy conservation is realized according to the actual requirement.
For the amplification case, the amplitude of the watermark in the scaled frequency domain should be adjusted toIt can also be verified that the energy relationship satisfies the conservation requirement.
Meanwhile, other constraint conditions, such as consistency constraint of watermark information in time domain and frequency domain, can be established, so that the watermark information is ensured not to be lost or wrong in the conversion process of the time domain and the frequency domain.
Meanwhile, other constraint conditions, such as consistency constraint of watermark information in time domain and frequency domain, can be established, so that the watermark information is ensured not to be lost or wrong in the conversion process of the time domain and the frequency domain.
Let the watermark information embedded in the time domain be(Length of watermark sequence), the watermark information extracted in the frequency domain is. Defining a consistency functionIn an ideal case, the number of the cells,Indicating that the watermark information is not lost or erroneous during the time-domain and frequency-domain conversion. In practical application, a threshold is set(E.g.) When (when)And when the watermark information is considered to be consistent in the time domain and the frequency domain, the constraint condition is met.
The synchronous embedding of the watermark in the time domain and the frequency domain is realized by establishing the time domain and frequency domain association model, so that the stability and the restorability of the watermark when the watermark is attacked are greatly enhanced. However, since the watermark is synchronously embedded in the time domain and the frequency domain, the watermark can be adaptively adjusted according to noise and color change of the image in the time domain, and the watermark can be adaptive to the change of resolution in the frequency domain. Watermark information can be accurately recovered through a corresponding extraction algorithm.
And 4, storing the watermark embedded image after a series of processing, wherein the storage format can be selected according to actual requirements, such as common JPEG, PNG and other formats.
And obtaining the watermark embedded image after a series of processing such as the Improved Singular Value Decomposition (ISVD), time domain and frequency domain synchronous watermark embedding (TFSW). When the image is stored, a proper image format is selected according to the actual application scene and the requirement. If the image needs to be transmitted quickly on the network and the requirement on the storage space is high, the JPEG format can be selected. The JPEG format adopts a lossy compression algorithm, which can reduce the size of an image file to a large extent, but can lose certain image quality. When saved in the JPEG format, care should be taken to set a suitable compression ratio, which can generally be determined experimentally. If the requirements on image quality are high and characteristics such as transparent background are required to be supported, for example, the PNG format can be selected for designing materials or professional image editing scenes. The PNG format uses lossless compression, which can better preserve image details and watermark information, but the file size is relatively large.
During the saving process, the relevant metadata information of the image is ensured to be completely reserved. For watermark embedding parameters, including the size of the image block (e.g., 8 x 8 pixels or 16 x 16 pixels) in the ISVD operation, the strength factor of the singular value modification (e.g., the value used to modify the singular value size to embed the watermark), the watermark embedding frequency component (e.g., the specific frequency range or specific frequency band of the low frequency region) selected at stage TFSW, etc. At the same time, copyright information such as copyright owner name, copyright registration number, creation date, etc. is explicitly recorded. Such metadata information may be stored in the header of the image file or in a specialized metadata area, in a specific encoding format, for convenient subsequent reading and parsing.
And 5, identifying watermark features in the digital image through a training model by adopting an extraction framework based on deep learning.
And 5.1, the anti-noise and compression-resistant characteristic extraction layer suppresses noise in the image through the pre-learned noise and compression mode and compensates information loss caused by compression, so that watermark characteristics can still be accurately extracted under the condition of reduced image quality.
Noise suppression (e.g., gaussian noise and an averaging filter).
Image settingThe neighborhood of the middle pixel (x, y) is N (x, y), and the kernel of the mean filter is。
Pixel value after passing through average value filter。
For Gaussian noise, the probability density function is(Is the mean value of the two values,Standard deviation), the anti-noise feature extraction layer estimates parameters of noise by learning images with a large amount of Gaussian noise added, so that the noise is suppressed in actual detection.
Compressed information compensation (e.g., JPEG compression and bilinear interpolation).
Let the quantized frequency coefficient matrix of a certain 8×8 block of the JPEG-compressed image be C, its low frequency part(Assuming upper left corner portion) and high frequency portion(Lower right corner portion). When the high frequency information is lost, the high frequency information is recovered using the low frequency information.
Let bilinear interpolation function beFor pixel locations where high frequency information is lostIts recovered pixel value(HereThe function calculates the target pixel value by bilinear interpolation from the surrounding low frequency pixel values).
And 5.2, inputting the image processed by the anti-noise and compression-resistant characteristics into a pre-trained Convolutional Neural Network (CNN), and automatically extracting potential watermark characteristics in the image by the CNN by utilizing structures such as a convolutional layer, a pooling layer and the like.
Convolutional layer operation (taking a 3 x 3 convolutional kernel as an example).
Let the input image be I, the convolution kernel beFor each pixel (x, y) in the image, the output eigenvalue F (x, y) of the convolution layer (over a certain eigenvector channel) is calculated as follows:
。
Here, the Representing convolution kernels atWeight value of the location. And (3) sliding calculation is carried out on the image through the convolution kernel, so that a feature map corresponding to the convolution kernel can be obtained. Different convolution kernels (such as 3×3 and 5×3) obtain a plurality of feature maps through similar calculation, and the feature maps jointly form a convolution layer output and contain feature information of different scales of the image.
Pooling layer operation (2 x 2 max pooling for example).
Let the pooling window size be 2 x 2, for the feature map of pooling layer inputOutputting a characteristic diagramIs calculated as follows:
。
I.e. selecting the maximum value as output in each 2x 2 window, the purpose of dimension reduction and retaining key features is achieved.
And 5.3, inputting the CNN extracted features into a multi-layer perceptron (MLP), and further processing and analyzing the features by the MLP through a plurality of hidden layers of the MLP to gradually extract higher-level and more abstract watermark feature representations.
Neuron weighted summation and nonlinear transformation (in the fourth)For example, a hidden layer).
Set the firstThe feature vector of the layer output is) (N is the number of features), the thThe connection weight matrix of the layer is(=1,2,Represent the firstThe number of neurons in the layer,=1,2,) The offset vector is。
First, theLayer neuronsIs a weighted sum input of (2)。
Output after ReLU activation function。
By multi-layering such computations (from the input layer to multiple hidden layers), the original image features are gradually transformed into a more abstract watermark feature representation.
And 5.4, decoding and identifying the extracted watermark features, restoring the extracted watermark features into original watermark information, and accurately judging the copyright attribution of the image by comparing the extracted watermark features with watermark information registered in a database, so as to realize effective protection of the copyright of the digital image.
Watermark decoding (binary sequence decoding for example).
Let the extracted feature vector beIf the watermark is encoded by modifying the singular value size, the encoding rule is set as(The original watermark bits are calculated back for the decoding function determined from the embedding rules, e.g. from the singular value modification rules).
Obtaining a decoded binary sequence。
Copyright ownership determination (e.g., hamming distance).
Let the watermark information registered in the database beThe extracted watermark information is。
Hamming distance。
If it is(A set threshold value), the copyright of the image is considered to belong to the owner corresponding to the registered watermark information, otherwise, the copyright problem of the image is considered to exist.
The foregoing has shown and described the basic principles, principal features and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the above-described embodiments, and that the above-described embodiments and descriptions are only preferred embodiments of the present invention, and are not intended to limit the invention, and that various changes and modifications may be made therein without departing from the spirit and scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (7)
1. The digital image mixed watermarking method based on time domain and frequency domain synchronization is characterized by comprising the following steps of:
s1, reading a digital image which needs watermark processing, and preprocessing the image;
S2, determining watermark information content according to copyright protection requirements, and converting the watermark information into a format suitable for embedding an image;
S3, monitoring change in the time domain of the image through a time domain and frequency domain synchronous watermark embedding algorithm, and selecting proper frequency in the frequency domain to embed the watermark, wherein the method specifically comprises the following steps:
S31, an image change monitoring module is established, and the change condition of pixel values of an image is tracked in real time;
S32, converting the image into a frequency domain space by utilizing fast Fourier transform, analyzing the frequency spectrum characteristic of the image, and selecting a proper frequency component as a watermark embedding position according to the frequency characteristic of watermark information and the distribution condition of the image frequency spectrum;
s33, embedding watermark information into the selected frequency domain coefficient by adopting a coding mode;
s34, in the embedding process, establishing a correlation model between a time domain and a frequency domain, realizing synchronous embedding of the watermark in the time domain and the frequency domain, and enhancing the stability and the restorability of the watermark when the watermark is attacked;
Let the watermark information embedded in the time domain be ,For the length of the watermark sequence, the watermark information extracted from the frequency domain isDefining a consistency functionSetting a threshold valueWhen (when)When the watermark information is considered to be consistent in the time domain and the frequency domain;
s4, storing the processed watermark-embedded image, wherein the storage format is selected according to actual requirements;
s5, adopting an extraction frame based on deep learning, and identifying watermark features in the digital image through a training model.
2. The digital image watermarking method based on time domain and frequency domain synchronization according to claim 1, wherein the step S1 of reading the digital image to be watermarked and preprocessing the image specifically includes the steps of:
S11, reading an image and acquiring 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, wherein determining watermark information content according to copyright protection requirements in step S2, converting the information into a format suitable for embedding an image specifically includes the steps of:
S21, determining watermark information content;
s22, information code conversion;
s23, coding inspection and test.
4. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1, wherein the step S32 specifically includes the steps of:
S321, converting an image from a time domain space to a frequency domain space by utilizing fast Fourier transform;
S322, providing a basis for selecting a proper watermark embedding position by calculating the distribution condition of image energy in a frequency domain;
s323, selecting proper frequency components as watermark embedding positions according to the frequency characteristics of watermark information and the distribution condition of image spectrums.
5. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 4, wherein the step S33 specifically includes the steps of:
s331, before embedding the watermark, pre-analyzing the image, and adaptively adjusting the watermark embedding strength according to the local complexity and the visual importance area of the image;
S332, embedding watermark information by using sensitivity of frequency domain coefficient phase in a coding method based on phase modulation;
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-processing the image, so that the image with the embedded watermark is similar to the original image as much as possible in vision.
6. The method for digital image watermarking based on time domain and frequency domain synchronization according to claim 1, wherein the step S4 is characterized in that the processed image embedded with watermark is saved, and the specific operation step of selecting the save format according to actual requirements is that if the image needs to be rapidly transmitted on the network and has high requirement on storage space, the JPEG format is selected, and if the requirement on image quality is high and needs to support transparent background, the PNG format is selected.
7. The digital image hybrid watermarking method based on time domain and frequency domain synchronization according to claim 1, wherein the step S5 adopts an extraction framework based on deep learning, and the step of identifying watermark features in the digital image through training a model specifically comprises the following steps:
S51, the anti-noise and compression-resistant feature extraction layer suppresses noise in the image through pre-learned noise and compression modes, and compensates information loss caused by compression;
S52, inputting the image processed by the anti-noise and compression-resistant characteristics into a pre-trained convolutional neural network, and automatically extracting potential watermark characteristics in the image by using a convolutional layer and pooling layer structure of the convolutional neural network;
S53, inputting the characteristics extracted by the convolutional neural network into a multi-layer perceptron, and further processing and analyzing the characteristics by the multi-layer perceptron through a plurality of hidden layers of the multi-layer perceptron;
S54, decoding and identifying the extracted watermark features, restoring the extracted watermark features into original watermark information, and judging the copyright attribution of the image by comparing the watermark information registered in a database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202510239463.1A CN119741182B (en) | 2025-03-03 | 2025-03-03 | Digital image mixed watermarking method based on time domain and frequency domain synchronization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202510239463.1A CN119741182B (en) | 2025-03-03 | 2025-03-03 | Digital image mixed watermarking method based on time domain and frequency domain synchronization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN119741182A CN119741182A (en) | 2025-04-01 |
CN119741182B true CN119741182B (en) | 2025-09-12 |
Family
ID=95130274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202510239463.1A Active CN119741182B (en) | 2025-03-03 | 2025-03-03 | Digital image mixed watermarking method based on time domain and frequency domain synchronization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119741182B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110084737A (en) * | 2019-05-10 | 2019-08-02 | 钱涛 | A kind of watermark insertion and extracting method based on two-dimensional adaptive Fourier decomposition |
CN115272044A (en) * | 2022-08-10 | 2022-11-01 | 大连大学 | A Deep Image Watermarking Method Based on Mixed Frequency Domain Channel Attention |
CN117745509A (en) * | 2024-02-20 | 2024-03-22 | 四川数盾科技有限公司 | Digital watermark embedding method, system, equipment and medium based on Fourier transformation |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6674876B1 (en) * | 2000-09-14 | 2004-01-06 | Digimarc Corporation | Watermarking in the time-frequency domain |
CN103295184B (en) * | 2013-05-13 | 2015-09-30 | 西安电子科技大学 | The half water transfer impression method that a kind of frequency domain and spatial domain combine |
CN116825116B (en) * | 2023-07-18 | 2024-03-12 | 合肥工业大学 | Robust audio watermark embedding and extracting method for resisting desynchronization attack |
CN117522666A (en) * | 2023-11-20 | 2024-02-06 | 深圳市证通电子股份有限公司 | Method and device for embedding and extracting invisible digital watermark in image |
-
2025
- 2025-03-03 CN CN202510239463.1A patent/CN119741182B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110084737A (en) * | 2019-05-10 | 2019-08-02 | 钱涛 | A kind of watermark insertion and extracting method based on two-dimensional adaptive Fourier decomposition |
CN115272044A (en) * | 2022-08-10 | 2022-11-01 | 大连大学 | A Deep Image Watermarking Method Based on Mixed Frequency Domain Channel Attention |
CN117745509A (en) * | 2024-02-20 | 2024-03-22 | 四川数盾科技有限公司 | Digital watermark embedding method, system, equipment and medium based on Fourier transformation |
Also Published As
Publication number | Publication date |
---|---|
CN119741182A (en) | 2025-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12327402B2 (en) | Systems and methods for detection and localization of image and document forgery | |
Ahmaderaghi et al. | Blind image watermark detection algorithm based on discrete shearlet transform using statistical decision theory | |
Huang et al. | Enhancing image watermarking with adaptive embedding parameter and PSNR guarantee | |
Roy et al. | A hybrid domain color image watermarking based on DWT–SVD | |
JP5321698B2 (en) | Robust digital watermarking signal insertion method and watermark detection method | |
Assini et al. | A robust hybrid watermarking technique for securing medical image | |
CN117745509B (en) | Digital watermark embedding method, system, equipment and medium based on Fourier transformation | |
CN114529441B (en) | Image frequency domain digital watermarking method, system, device and medium | |
CN114638738B (en) | Embedding method, detection method and anti-counterfeiting tracing method for hidden information in image | |
CN110211016A (en) | A kind of watermark embedding method based on convolution feature | |
Jarusek et al. | Photomontage detection using steganography technique based on a neural network | |
Fung et al. | A novel DWT-SVD video watermarking scheme using side view | |
CN110211015B (en) | A Watermarking Method Based on Characteristic Object Protection | |
CN119741182B (en) | Digital image mixed watermarking method based on time domain and frequency domain synchronization | |
Kusuma et al. | Robust Digital Image Watermarking Using DWT, Hessenberg, and SVD for Copyright Protection | |
Liu et al. | Optimization-based image watermarking algorithm using a maximum-likelihood decoding scheme in the complex wavelet domain | |
Coronel et al. | Robust watermark technique using masking and Hermite transform | |
Chetan et al. | An intelligent blind semi-fragile watermarking scheme for effective authentication and tamper detection of digital images using curvelet transforms | |
Jamali et al. | Robustness and Imperceptibility Enhancement in Watermarked Images by Color Transformation | |
Rawat et al. | DCT and SVD based new watermarking scheme | |
Motwani et al. | Wavelet based fuzzy perceptual mask for images | |
US20250308226A1 (en) | Systems and Methods for Detection and Localization of Image and Document Forgery | |
CN118864271B (en) | A turbulence removal method and system based on image restoration | |
CN119364012B (en) | An information hiding method based on deep learning | |
Joseph et al. | Singular Value Decomposition based wavelet domain watermarking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |