CN113869328B - Watermark information extraction method, device, equipment and storage medium - Google Patents
Watermark information extraction method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113869328B CN113869328B CN202111081193.4A CN202111081193A CN113869328B CN 113869328 B CN113869328 B CN 113869328B CN 202111081193 A CN202111081193 A CN 202111081193A CN 113869328 B CN113869328 B CN 113869328B
- Authority
- CN
- China
- Prior art keywords
- matrix
- watermark
- image
- watermark information
- original
- 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
- 238000000605 extraction Methods 0.000 title claims abstract description 28
- 239000011159 matrix material Substances 0.000 claims abstract description 173
- 238000012545 processing Methods 0.000 claims abstract description 55
- 230000002441 reversible effect Effects 0.000 claims abstract description 49
- 230000009466 transformation Effects 0.000 claims abstract description 27
- 238000000034 method Methods 0.000 claims description 27
- 238000000354 decomposition reaction Methods 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 8
- 238000009499 grossing Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000004044 response Effects 0.000 claims description 4
- 230000001131 transforming effect Effects 0.000 claims description 4
- 150000003839 salts Chemical class 0.000 claims description 3
- 238000010008 shearing Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 101100127891 Caenorhabditis elegans let-4 gene Proteins 0.000 description 1
- 235000002566 Capsicum Nutrition 0.000 description 1
- 239000006002 Pepper Substances 0.000 description 1
- 235000016761 Piper aduncum Nutrition 0.000 description 1
- 235000017804 Piper guineense Nutrition 0.000 description 1
- 244000203593 Piper nigrum Species 0.000 description 1
- 235000008184 Piper nigrum Nutrition 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/14—Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
- G06F17/148—Wavelet transforms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
- G06T1/005—Robust watermarking, e.g. average attack or collusion attack resistant
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Algebra (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a watermark information extraction method, a device, equipment and a storage medium, wherein original watermark information and a carrier image are obtained, pixels of the original watermark information are subjected to transformation scrambling processing through a reversible matrix set to obtain an encrypted watermark, the carrier image is subjected to watermark embedding processing according to the encrypted watermark to obtain watermark carrier data, attack processing is performed according to the watermark carrier data to obtain an attack image, and decryption processing is performed on the attack image according to the reversible matrix set to obtain extracted watermark information; the transformation scrambling of the pixels has global property and diffusivity on errors of original watermark information, the original watermark information is difficult to recover due to the occurrence of small errors, and the key space can be increased and the security can be improved by the transformation scrambling processing of the reversible matrix set.
Description
Technical Field
The present invention relates to the field of encryption technologies, and in particular, to a watermark information extraction method, device, apparatus, and storage medium.
Background
With the rapid development of the Internet, the progress of multimedia data storage and transmission technology and the enhancement of copyright awareness, the urgent requirement of balancing the robustness and invisibility of the digital image watermarking technology is further embodied. Digital watermarking is a special information identifier which is embedded into digital media to identify the effective rights and interests of the effective information protection holder. While research on digital watermarks generally continuously innovates and optimizes about several inherent characteristics of digital watermarks such as visibility, security, robustness and the like, the existing watermark encryption mode has low security, and needs to seek solutions.
Disclosure of Invention
In view of the above, it is an object of the present invention to provide a watermark information extraction method, apparatus, device and storage medium for improving security.
The technical scheme adopted by the embodiment of the invention is as follows:
a watermark information extraction method, comprising:
Acquiring original watermark information and a carrier image;
The pixels of the original watermark information are subjected to transformation scrambling processing through a reversible matrix set, so that an encrypted watermark is obtained;
the carrier image is subjected to watermark embedding processing according to the encrypted watermark, so that watermark carrier data are obtained;
According to the watermark carrier data, carrying out attack processing to obtain an attack image;
And decrypting the attack image according to the reversible matrix set to obtain the extracted watermark information.
Further, the transforming and scrambling processing is performed on the pixels of the original watermark information through the reversible matrix set to obtain an encrypted watermark, which includes:
Extracting a brightness matrix set of the original watermark information; the brightness matrix set comprises an original first channel brightness matrix, an original second channel brightness matrix and an original third channel brightness matrix;
determining a scrambling first channel brightness matrix, a scrambling second channel brightness matrix and a scrambling third channel brightness matrix according to the product of the brightness matrix set and the reversible matrix set;
And forming an encryption watermark according to the scrambled first channel brightness matrix, the scrambled second channel brightness matrix and the scrambled third channel brightness matrix.
Further, the set of invertible matrices includes a first random invertible matrix, a second random invertible matrix, and a third random invertible matrix, and determining a scrambled first channel luminance matrix, a scrambled second channel luminance matrix, and a scrambled third channel luminance matrix from a product of the set of luminance matrices and the set of invertible matrices includes:
Determining the scrambled first channel luminance matrix according to the product of the original first channel luminance matrix and the first random invertible matrix;
determining the scrambled second channel luminance matrix according to the product of the original second channel luminance matrix and the second random invertible matrix;
and determining the scrambling third channel brightness matrix according to the product of the original third channel brightness matrix and the third random invertible matrix.
Further, the watermark embedding processing is performed on the carrier image according to the encrypted watermark to obtain watermark carrier data, including:
Performing discrete wavelet transformation on the carrier image to obtain a target low-frequency part;
extracting features of the target low-frequency part, and determining feature points;
and embedding the encrypted watermark into the characteristic points to obtain watermark carrier data.
Further, the attack processing is performed according to the watermark carrier data to obtain an attack image, including:
Obtaining an updated wavelet coefficient according to preset embedding strength, the target low-frequency part and the encrypted watermark;
performing image reconstruction on the watermark carrier data according to the updated wavelet coefficients to obtain a reconstructed image;
Carrying out attack processing on the reconstructed image to obtain an attack image; the attack processing comprises at least one of median filtering, motion blurring, rotation, scaling, direct equalization, spiced salt noise, shearing, gaussian low-pass filtering and adding white noise.
Further, the decrypting the attack image according to the reversible matrix set to obtain extracted watermark information includes:
decomposing and transforming the attack image;
and decrypting the decomposition and transformation result through the reversible matrix set to obtain the extracted watermark information.
Further, the watermark information extraction method further includes:
Calculating a normalized correlation coefficient of the original watermark information and the extracted watermark information; the size of the normalized correlation coefficient characterizes the accuracy of extracting watermark information.
The embodiment of the invention also provides a watermark information extraction device, which comprises:
the acquisition module is used for acquiring the original watermark information and the carrier image;
the first processing module is used for carrying out conversion scrambling processing on the pixels of the original watermark information through the reversible matrix set to obtain an encrypted watermark;
the second processing module is used for carrying out watermark embedding processing on the carrier image according to the encrypted watermark to obtain watermark carrier data;
the third processing module is used for carrying out attack processing according to the watermark carrier data to obtain an attack image;
and the decryption module is used for decrypting the attack image according to the reversible matrix set to obtain the extracted watermark information.
The embodiment of the invention also provides electronic equipment, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the method.
Embodiments of the present invention also provide a computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the method.
The beneficial effects of the invention are as follows: the method comprises the steps of obtaining original watermark information and a carrier image, performing conversion scrambling processing on pixels of the original watermark information through a reversible matrix set to obtain an encrypted watermark, performing watermark embedding processing on the carrier image according to the encrypted watermark to obtain watermark carrier data, performing attack processing according to the watermark carrier data to obtain an attack image, and performing decryption processing on the attack image according to the reversible matrix set to obtain extracted watermark information; the transformation scrambling of the pixels has global property and diffusivity on errors of original watermark information, the original watermark information is difficult to recover due to the occurrence of small errors, and the key space can be increased and the safety is improved by performing transformation scrambling processing through the reversible matrix set.
Drawings
FIG. 1 is a schematic flow chart of the steps of the watermark information extraction method of the present invention;
FIG. 2 is a schematic diagram of a discrete wavelet transform according to an embodiment of the present invention;
FIG. 3 is a diagram of watermark information extraction results using different wavelet bases;
FIG. 4 (a) is a first schematic diagram of normalized correlation coefficients of extracted watermark information obtained using different wavelet bases; fig. 4 (b) is a second schematic diagram of normalized correlation coefficients of extracted watermark information obtained using different wavelet bases.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
As shown in fig. 1, an embodiment of the present invention provides a watermark information extraction method, including steps S100 to S500:
s100, acquiring original watermark information and a carrier image.
In the embodiment of the invention, the original watermark information refers to unprocessed watermark information which needs to be added into a carrier image, and the original watermark information contains specific information which needs to be hidden by a user; the carrier image refers to the original data, i.e. the carrier to which the original watermark information needs to be added. Alternatively, the original watermark information includes, but is not limited to, graphics, text, etc., and the carrier image and watermark pattern (original watermark information) are read from the matlab. In the embodiment of the present invention, taking original watermark information as an example of a picture including text S.
S200, performing conversion scrambling processing on pixels of the original watermark information through the reversible matrix set to obtain the encrypted watermark.
In the embodiment of the invention, the reversible matrix set comprises a first random reversible matrix, a second random reversible matrix and a third random reversible matrix which are randomly generated. The first random reversible matrix, the second random reversible matrix, and the third random reversible matrix may be the same or different, and in the embodiment of the present invention, the description is given by taking the difference as an example.
In the embodiment of the present invention, step S200 includes steps S210 to S230:
S210, extracting a brightness matrix set of original watermark information.
In an embodiment of the present invention, the luminance matrix set (pixel matrix) includes an original first channel luminance matrix, an original second channel luminance matrix, and an original third channel luminance matrix. Taking the original watermark information as an image, the image includes a pixel matrix M 1×N1,M1 as the number of pixels in the length direction and N 1 as the number of pixels in the width direction. Each pixel comprises three channels of RGB (red, green and blue), R is a first channel, G is a second channel and B is a third channel, and each of the first channel, the second channel and the third channel has a corresponding brightness value. Specifically:
The original first channel luminance matrix R' = (R ij), (i=1, 2, …, k, j=1, 2, …, R1), where k is the number of pixels in the length direction (row) in the original watermark information, R1 is the number of pixels in the width direction (column), and R ij is the luminance value of the first channel in the pixel in the ith row and jth column.
The original second channel luminance matrix G' = (G ij),(i=1,2,…,k,j=1,2,…,r1),gij is the luminance value of the second channel in the pixel of the ith row and jth column.
The original third channel luminance matrix B' = (B ij),(i=1,2,…,k,j=1,2,…,r1),bij is the luminance value of the third channel in the pixel of the ith row and jth column.
Wherein each brightness value has 256-level brightness, and the value range is 0 to 255.
S220, determining a scrambling first channel brightness matrix, a scrambling second channel brightness matrix and a scrambling third channel brightness matrix according to the product of the brightness matrix set and the reversible matrix set.
Specifically, step S220 includes the steps of:
Determining a scrambling first channel luminance matrix according to the product of the original first channel luminance matrix and the first random invertible matrix;
Determining a scrambling second channel luminance matrix according to the product of the original second channel luminance matrix and the second random invertible matrix;
and determining a scrambling third channel brightness matrix according to the product of the original third channel brightness matrix and the third random invertible matrix.
Specifically, the calculation formula is:
R”=P1R’
G”=P2G’
B”=P3B’
Wherein, P 1 is a first random reversible matrix, P 2 is a second random reversible matrix, P 3 is a third random reversible matrix, and neither is a unit matrix, the number and arrangement of elements in P 1、P2、P3 are the same as those of the original first channel brightness matrix, the original second channel brightness matrix and the original third channel brightness matrix, R "is a scrambled first channel brightness matrix, G" is a scrambled second channel brightness matrix, and B "is a scrambled third channel brightness matrix, so as to obtain brightness values of corresponding positions of the scrambled original first channel brightness matrix, the original second channel brightness matrix and the original third channel brightness matrix.
S230, forming the encryption watermark according to the scrambled first channel brightness matrix, the scrambled second channel brightness matrix and the scrambled third channel brightness matrix.
Specifically, the first channel brightness matrix, the second channel brightness matrix and the third channel brightness matrix are overlapped to obtain a numerical matrix (i.e. an encrypted watermark). For example, when the luminance value of the first row and the first column in the scrambled first channel luminance matrix is 168, the luminance value of the first row and the first column in the scrambled second channel luminance matrix is 55, and the luminance value of the first row and the first column in the scrambled second channel luminance matrix is 20, the three channel values corresponding to the pixels of the first row and the first column in the numerical matrix are 168, 55, 20, and the pixels at other positions are the same.
It should be noted that, the numerical matrix (i.e. the encrypted watermark) obtained after the superposition processing has errors, the errors are further spread to each pixel of the numerical matrix, each pixel is formed by superposing three different random reversible matrices with the corresponding channel brightness matrix, even if each channel brightness matrix has small changes, the superposition will generate great changes, so that the scrambling transformation has global property and diffusivity on the errors, so that each small error can cause irrecoverability of the encrypted watermark, and meanwhile, the first random reversible matrix, the second random reversible matrix and the third random reversible matrix are equivalent to the encryption keys of the linear transformation, and because the first random reversible matrix, the second random reversible matrix and the third random reversible matrix are randomly generated, the key space is very large, and the violent decoding is almost impossible, thereby having high security.
And S300, carrying out watermark embedding processing on the carrier image according to the encrypted watermark to obtain watermark carrier data.
Specifically, step S300 includes steps S310 to S330:
S310, performing discrete wavelet transformation on the carrier image to obtain a target low-frequency part.
In the discrete wavelet transform, the carrier image is decomposed into sub-images with different spaces and different frequencies through multi-resolution decomposition, and the carrier image is subjected to discrete wavelet transform by utilizing optimal transformation parameters, for example, the optimal wavelet coefficients can be the optimal discrete wavelet transformation parameters and wavelet bases. Alternatively, the optimal wavelet coefficients may be determined by performing update experiments with changes and modifications. In the embodiment of the present invention, the discrete wavelet transform may include at least one stage of decomposition, for example, may include one stage of decomposition of the discrete wavelet transform, or further perform two stages of decomposition of the discrete wavelet transform on the decomposition result of the one stage of decomposition of the discrete wavelet transform, which is not limited in particular, and the discrete wavelet transform in the embodiment of the present invention uses two stages of decomposition as an example, specifically, two stages of decomposition based on haar wavelet basis, and the decomposed image is displayed in different colors corresponding to different values by using a function imagesc in Matlab. As shown in fig. 2, specifically, the carrier image (i.e., original image) is subjected to primary discrete wavelet transform decomposition to obtain four sub-bands, i.e., a low-frequency smoothing portion (LL 1) and high-frequency detail portions (LH 1, HL1, HH 1), wherein LH1, HL1, HH1 respectively correspond to a horizontal detail component, a vertical detail component, and a diagonal detail component, and most of information is concentrated in the low-frequency smoothing portion (LL 1) after the image is decomposed, i.e., a visually important portion, so that repeated decomposition (secondary decomposition) of LL1 can achieve a higher level of decomposition. Specifically, the low-frequency smoothing part (LL 1) is repeatedly decomposed (second-order decomposition) by the above-described optimal transformation parameters, to obtain four parts of LL2 (target low-frequency part), LH2, HL2, HH 2. The discrete wavelet transformation in the embodiment of the invention can greatly reduce image data and is convenient for extracting the characteristic points.
S320, extracting features of the target low-frequency part, and determining feature points.
In the embodiment of the invention, a feature extraction algorithm is performed on a target low-frequency part through the feature extraction algorithm, and specifically:
Selecting a target low-frequency part in a carrier image, setting a carrier image function as f (X, Y), setting a target low-frequency part pixel point as (X, Y), respectively taking first-order differential derivatives I x,Iy of the pixel point in the X and Y directions, and constructing a Harris correlation matrix M by convolution of two derivatives and a filtering function by using a Harris characteristic method. The formula of the first derivative in the X and Y directions of the pixel is as follows:
The Harris correlation matrix M is defined as follows:
wherein w1 is a Gaussian filter function for smoothing and eliminating isolated noise points. The response corner value R' is as follows:
R'=det(M)-k1(trace(M))2
det (M) is determinant of matrix, trace (M) is direct product of matrix M, k 1 is constant, and the value range is 0.04-0.06.
Dividing the obtained pixel points of the target low-frequency part into three types of common points, edge points and corner points, wherein the corner points are characteristic points, and specifically: the correlation matrix M has two eigenvalues, and the matrix M is a semi-positive definite matrix, so that the two eigenvalues are greater than or equal to 0, and the three points are distinguished according to the sizes of the two eigenvalues, so as to find out the eigenvalues, for example: if the two feature values are smaller, the point is a common point, if one of the two feature values is larger and the other is smaller, the installation point is an edge point, if the two feature values are larger, the point is a feature point, specifically, a threshold T is set for judging the feature point, judging whether the position angular point response value R 'of the matrix metering feature point is the maximum value in the local area and is larger than the threshold T, if so, the R' is the feature point, and recording the position information.
S330, embedding the encrypted watermark into the characteristic points to obtain watermark carrier data.
It should be noted that, M 2×N2 target feature points are selected from all feature points, M 2×N2 is the size of the encrypted watermark, and the encrypted watermark is embedded into the target feature points to obtain watermark carrier data.
In the embodiment of the invention, the characteristic points are used as the embedded positions of the encrypted watermark, and the modification of numerical values is convenient, so that the visibility and the robustness of the encrypted watermark are improved; the method has the advantages that the encrypted watermark is embedded in the position of the characteristic point, the reference is provided for the embedded position and direction of the encrypted watermark, the relative fixed position direction can improve the geometric attack resistance of watermark carrier data, the blind watermark is extracted, the blind watermark is better invisible under the data comparison of peak signal to noise ratio, the invisible blind watermark is embedded, the watermark extraction of most of the extracted normalized correlation coefficient can basically have better robustness, and the image embedding and extraction effects are different due to the decomposition of different effects corresponding to different wavelet coefficients. In addition, the transformation scrambling processing performed by the reversible matrix set is equivalent to directly performing coefficient transformation on the gray coefficient of the image, and embedding the encrypted watermark ensures the invisibility of the encrypted watermark to a certain extent and improves the robustness of the embedding algorithm.
S400, carrying out attack processing according to the watermark carrier data to obtain an attack image.
Specifically, step S400 includes steps S410-S430:
S410, obtaining updated wavelet coefficients according to preset embedding strength, the target low-frequency part and the encrypted watermark.
Optionally, the embedding has the formula:
LL2′=LL2+K2W2
LL 2' is the wavelet coefficient after embedding the watermark (updated wavelet coefficient), K 2 is the preset embedding strength, and W2 is the encrypted watermark.
S420, performing image reconstruction on watermark carrier data according to the updated wavelet coefficients to obtain a reconstructed image.
Optionally, the watermark carrier data is subjected to wavelet coefficient image reconstruction according to the updated wavelet coefficients, for example, the wavelet coefficients updated for the optimal wavelet coefficients, so as to obtain a reconstructed image. In some embodiments, image reconstruction may also be performed using the optimal wavelet coefficients in S310.
Wherein, when reconstructing, the blind watermark embedding effect is achieved by calculating the peak signal-to-noise ratio (PSNR) of the reconstructed image, and the PSNR is used for the invisibility of the image (watermark carrier data) after embedding the watermark. The calculation formula of PSNR is as follows.
Where n is the number of bits per sample value, MSE is the mean square error between the original image and the processed image, H and W are the number of image pixels, X (i, j) is the pixel point of the ith row and jth column of the original image (watermark carrier data), and Y (i, j) is the pixel point of the ith row and jth column of the reconstructed image (reconstructed image). The higher the PSNR, the clearer the reconstructed image, and a signal-to-noise ratio threshold can be set during reconstruction, and the reconstructed image is reconstructed until the signal-to-noise ratio of the reconstructed image is greater than or equal to the signal-to-noise ratio threshold.
S430, carrying out attack processing on the reconstructed image to obtain an attack image.
Optionally, the attack process includes, but is not limited to, at least one of a median filtering attack, a motion blur (attack), a rotation attack, a scaling attack, a direct equalization, a salt and pepper noise (attack), a clipping attack, a gaussian low pass filtering (attack), a white noise (acoustic) attack. For example, the above attack processing may be used to perform attack processing on the reconstructed images, respectively, to obtain a plurality of attack images, respectively.
S500, decrypting the attack image according to the reversible matrix set to obtain the extracted watermark information.
The specific ratio comprises the steps of S510-S520:
s510, performing decomposition transformation on the attack image.
Optionally, wavelet secondary decomposition transformation is performed on the attack image to obtain LL sub-band coefficients of the attack image, then the threshold value set by wavelet coefficient operation comparison is used for judging whether watermark information exists, and if so, the watermark information is decrypted according to the inverse transformation of linear transformation.
S520, decrypting the analysis transformation result through the reversible matrix set to obtain the extracted watermark information.
Specifically, the decryption processing formula of the inverse transform of the linear transform is:
R’=P1 -1R”
G’=P2 -1G”
B’=P3 -1B”
Wherein, R 'is the original first channel brightness matrix, G' is the original second channel brightness matrix, B 'is the original third channel brightness matrix, P 1 is the first random reversible matrix, P 2 is the second random reversible matrix, P 3 is the third random reversible matrix, R' is the scrambling first channel brightness matrix, G 'is the scrambling second channel brightness matrix, B' is the scrambling third channel brightness matrix, and then the original R, G and B are obtained, and the original image matrix (original pixel matrix) is obtained after superposition, namely the watermark information is extracted.
The watermark information extraction method of the embodiment of the invention further comprises the following step S600:
S600, calculating a normalized correlation coefficient of the original watermark information and the extracted watermark information.
In the embodiment of the invention, the size of the normalized correlation coefficient (Normalized Correlation, NC) characterizes the accuracy of extracting watermark information, and particularly, when the normalized correlation coefficient is larger, the accuracy is higher, and the robustness of the watermark information extraction method of the embodiment of the invention is better. Specifically:
the calculation formula of NC is as follows:
where w 'is the original watermark information, w "is the extracted watermark information, i and j are the rows and columns of image pixels, w' (i, j) is the pixel of the ith row and jth column in the original watermark information, and w" (i, j) is the pixel of the ith row and jth column in the extracted watermark information.
As shown in fig. 3, the recognition degree and accuracy of the extracted watermark information obtained by the Haar extraction method in the embodiment of the invention are higher, and meanwhile, the robustness to various attacks is illustrated. Fig. 4 (a) and fig. 4 (b) are first diagrams showing normalized correlation coefficients of extracted watermark information obtained by using different wavelet bases, and the results of normalized correlation coefficients NC of extracted watermark information obtained by different wavelet bases sym3, sym5, sym7, coif1, coif3, coif5, dmey under different attacks can be seen to have better accuracy and robustness under various attacks.
The embodiment of the invention also provides a watermark information extraction device, which comprises:
the acquisition module is used for acquiring the original watermark information and the carrier image;
the first processing module is used for carrying out transformation scrambling processing on pixels of the original watermark information through the reversible matrix set to obtain an encrypted watermark;
The second processing module is used for carrying out watermark embedding processing on the carrier image according to the encrypted watermark to obtain watermark carrier data;
The third processing module is used for carrying out attack processing according to the watermark carrier data to obtain an attack image;
And the decryption module is used for decrypting the attack image according to the reversible matrix set to obtain the extracted watermark information.
The content in the method embodiment is applicable to the embodiment of the device, and the functions specifically realized by the embodiment of the device are the same as those of the method embodiment, and the obtained beneficial effects are the same as those of the method embodiment.
The embodiment of the invention also provides electronic equipment, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the watermark information extraction method of the previous embodiment. The electronic equipment of the embodiment of the invention comprises any intelligent terminal such as a mobile phone, a tablet personal computer, a Personal Digital Assistant (PDA), a vehicle-mounted computer and the like.
The content in the method embodiment is applicable to the embodiment of the device, and functions specifically implemented by the embodiment of the device are the same as those of the embodiment of the method, and the achieved beneficial effects are the same as those of the embodiment of the method.
The embodiment of the invention also provides a computer readable storage medium, in which at least one instruction, at least one section of program, code set or instruction set is stored, and the at least one instruction, the at least one section of program, code set or instruction set is loaded and executed by a processor to implement the watermark information extraction method of the foregoing embodiment.
Embodiments of the present invention also provide a computer program product or computer program, the computer program product or computer program includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the watermark information extraction method of the foregoing embodiment.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including multiple instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk, or an optical disk, or other various media capable of storing a program.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (7)
1. A watermark information extraction method, characterized by comprising:
Acquiring original watermark information and a carrier image;
The pixels of the original watermark information are subjected to transformation scrambling processing through a reversible matrix set, so that an encrypted watermark is obtained;
the carrier image is subjected to watermark embedding processing according to the encrypted watermark, so that watermark carrier data are obtained;
According to the watermark carrier data, carrying out attack processing to obtain an attack image;
Decrypting the attack image according to the reversible matrix set to obtain extracted watermark information;
the transforming and scrambling processing is carried out on the pixels of the original watermark information through the reversible matrix set to obtain the encrypted watermark, and the method comprises the following steps:
Extracting a brightness matrix set of the original watermark information; the brightness matrix set comprises an original first channel brightness matrix, an original second channel brightness matrix and an original third channel brightness matrix;
determining a scrambling first channel brightness matrix, a scrambling second channel brightness matrix and a scrambling third channel brightness matrix according to the product of the brightness matrix set and the reversible matrix set;
Forming an encrypted watermark according to the scrambled first channel brightness matrix, the scrambled second channel brightness matrix and the scrambled third channel brightness matrix;
The set of invertible matrices includes a first random invertible matrix, a second random invertible matrix, and a third random invertible matrix, and determining a scrambled first channel luminance matrix, a scrambled second channel luminance matrix, and a scrambled third channel luminance matrix based on a product of the set of luminance matrices and the set of invertible matrices, comprising:
Determining the scrambled first channel luminance matrix according to the product of the original first channel luminance matrix and the first random invertible matrix;
determining the scrambled second channel luminance matrix according to the product of the original second channel luminance matrix and the second random invertible matrix;
determining the scrambled third channel luminance matrix from the product of the original third channel luminance matrix and the third random invertible matrix;
The watermark embedding processing is carried out on the carrier image according to the encrypted watermark to obtain watermark carrier data, which comprises the following steps:
Performing discrete wavelet transformation on the carrier image to obtain a target low-frequency part; specifically, performing primary discrete wavelet transform decomposition on a carrier image to obtain four sub-bands, namely a low-frequency smoothing part (LL 1) and high-frequency detail parts (LH 1, HL1 and HH 1), wherein LH1, HL1 and HH1 respectively correspond to a horizontal detail component, a vertical detail component and a diagonal detail component, most of information is concentrated in the low-frequency smoothing part (LL 1) after the image is decomposed, namely a vision important part, the LL1 is repeatedly decomposed to reach a higher-level decomposition, and specifically, the low-frequency smoothing part (LL 1) is repeatedly decomposed through optimal transformation parameters to obtain four parts of LL2, LH2, HL2 and HH2, wherein LL2 refers to a target low-frequency part;
Extracting features of the target low-frequency part, and determining feature points; specifically, selecting a target low-frequency part in a carrier image, setting a carrier image function as f (X, Y), setting a pixel point of the target low-frequency part as (X, Y), respectively taking first-order differential derivatives I x,Iy of the pixel point in the X and Y directions, and constructing a Harris correlation matrix M by convolution of two derivatives and a filtering function by using a Harris characteristic method; the formula of the first derivative in the X and Y directions of the pixel is as follows:
The Harris correlation matrix M is defined as follows:
wherein w1 is a Gaussian filter function and is used for smoothing treatment to eliminate isolated noise points; the response corner value R' is as follows:
R'=det(M)-k1(trace(M))2
det (M) is determinant of matrix, trace (M) is direct product of matrix M, k 1 is constant, and the value range is 0.04-0.06;
Dividing the obtained pixel points of the target low-frequency part into three types of common points, edge points and corner points, wherein the corner points are characteristic points, and specifically: the matrix M has two characteristic values, and is a semi-positive definite matrix, so that the two characteristic values are larger than or equal to 0, the three points are distinguished according to the sizes of the two characteristic values, the characteristic points are found out, specifically, a threshold T is set for judging the characteristic points, judging whether the position angular point response value R 'of the matrix metering characteristic points is the maximum value in the local area and is larger than the threshold T, if yes, the R' is marked as the characteristic point, and the position information is recorded;
and embedding the encrypted watermark into the characteristic points to obtain watermark carrier data.
2. The watermark information extraction method according to claim 1, wherein: and performing attack processing according to the watermark carrier data to obtain an attack image, wherein the attack image comprises the following steps:
Obtaining an updated wavelet coefficient according to preset embedding strength, the target low-frequency part and the encrypted watermark;
performing image reconstruction on the watermark carrier data according to the updated wavelet coefficients to obtain a reconstructed image;
Carrying out attack processing on the reconstructed image to obtain an attack image; the attack processing comprises at least one of median filtering, motion blurring, rotation, scaling, direct equalization, spiced salt noise, shearing, gaussian low-pass filtering and adding white noise.
3. The watermark information extraction method according to claim 1, wherein: the decryption processing is carried out on the attack image according to the reversible matrix set to obtain extracted watermark information, and the method comprises the following steps:
decomposing and transforming the attack image;
and decrypting the decomposition and transformation result through the reversible matrix set to obtain the extracted watermark information.
4. A watermark information extraction method according to any one of claims 1 to 3, wherein: the watermark information extraction method further comprises the following steps:
Calculating a normalized correlation coefficient of the original watermark information and the extracted watermark information; the size of the normalized correlation coefficient characterizes the accuracy of extracting watermark information.
5. An apparatus for implementing the watermark information extraction method according to any one of claims 1 to 4, comprising:
the acquisition module is used for acquiring the original watermark information and the carrier image;
the first processing module is used for carrying out conversion scrambling processing on the pixels of the original watermark information through the reversible matrix set to obtain an encrypted watermark;
the second processing module is used for carrying out watermark embedding processing on the carrier image according to the encrypted watermark to obtain watermark carrier data;
the third processing module is used for carrying out attack processing according to the watermark carrier data to obtain an attack image;
and the decryption module is used for decrypting the attack image according to the reversible matrix set to obtain the extracted watermark information.
6. An electronic device comprising a processor and a memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the method of any one of claims 1-4.
7. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, code set, or instruction set being loaded and executed by a processor to implement the method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111081193.4A CN113869328B (en) | 2021-09-15 | 2021-09-15 | Watermark information extraction method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111081193.4A CN113869328B (en) | 2021-09-15 | 2021-09-15 | Watermark information extraction method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113869328A CN113869328A (en) | 2021-12-31 |
CN113869328B true CN113869328B (en) | 2024-08-20 |
Family
ID=78996103
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111081193.4A Active CN113869328B (en) | 2021-09-15 | 2021-09-15 | Watermark information extraction method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113869328B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114627303B (en) * | 2022-03-16 | 2024-07-12 | 平安科技(深圳)有限公司 | Image processing method, device, equipment and storage medium based on recognition model |
CN114385984B (en) * | 2022-03-22 | 2023-03-14 | 腾讯科技(深圳)有限公司 | Application traceability management method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102208097A (en) * | 2011-05-26 | 2011-10-05 | 浙江工商大学 | Network image copyright real-time distinguishing method |
CN107240061A (en) * | 2017-06-09 | 2017-10-10 | 河南师范大学 | A kind of watermark insertion, extracting method and device based on Dynamic BP neural |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101699508B (en) * | 2009-09-03 | 2012-01-11 | 中兴通讯股份有限公司 | Image digital watermark embedding and extracting method and system |
CN110264390A (en) * | 2019-06-24 | 2019-09-20 | 上海海事大学 | A kind of digital watermark method based on double watermarks insertion |
CN111968025A (en) * | 2020-08-19 | 2020-11-20 | 海南大学 | Bandlelet-DCT-based medical image robust zero watermarking method |
-
2021
- 2021-09-15 CN CN202111081193.4A patent/CN113869328B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102208097A (en) * | 2011-05-26 | 2011-10-05 | 浙江工商大学 | Network image copyright real-time distinguishing method |
CN107240061A (en) * | 2017-06-09 | 2017-10-10 | 河南师范大学 | A kind of watermark insertion, extracting method and device based on Dynamic BP neural |
Also Published As
Publication number | Publication date |
---|---|
CN113869328A (en) | 2021-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sharma et al. | An adaptive color image watermarking using RDWT-SVD and artificial bee colony based quality metric strength factor optimization | |
CN110084733B (en) | Text image watermark embedding method and system and text image watermark extracting method and system | |
Dixit et al. | A review on digital image watermarking techniques | |
Cheema et al. | A novel optimized semi-blind scheme for color image watermarking | |
Song et al. | A robust region-adaptive dual image watermarking technique | |
Rahman | A DWT, DCT and SVD based watermarking technique to protect the image piracy | |
Mohananthini et al. | Comparison of multiple watermarking techniques using genetic algorithms | |
Singh et al. | Video watermarking scheme based on visual cryptography and scene change detection | |
Keshavarzian et al. | ROI based robust and secure image watermarking using DWT and Arnold map | |
Giri et al. | A robust color image watermarking scheme using discrete wavelet transformation | |
CN113869328B (en) | Watermark information extraction method, device, equipment and storage medium | |
Singh et al. | A secure and robust block based DWT-SVD image watermarking approach | |
George et al. | Color image watermarking using DWT-SVD and Arnold transform | |
Bhatnagar | A new facet in robust digital watermarking framework | |
Dharwadkar et al. | An Efficient Non-blind Watermarking Scheme for Color Images using Discrete Wavelet Transformation” | |
Zhang et al. | Image watermarking scheme based on Arnold transform and DWT-DCT-SVD | |
Barnouti et al. | Digital watermarking based on DWT (discrete wavelet transform) and DCT (discrete cosine transform) | |
Rawat et al. | Best tree wavelet packet transform based copyright protection scheme for digital images | |
Tsai | A visible watermarking algorithm based on the content and contrast aware (COCOA) technique | |
Singh et al. | A secured robust watermarking scheme based on majority voting concept for rightful ownership assertion | |
Kumar et al. | Investigation on watermarking algorithm for secure transaction of electronic patient record by hybrid transform | |
Sharma et al. | Robust technique for steganography on Red component using 3-DWT-DCT transform | |
Yasmeen et al. | An efficient image steganography approach based on QR factorization and singular value decomposition in non‐subsampled contourlet transform domain | |
Malshe et al. | Survey of digital image watermarking techniques to achieve robustness | |
Chukwuchekwa et al. | Improved DCT based Digital Image Watermarking Technique using Particle Swarm Optimization Algorithm |
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 | ||
GR01 | Patent grant |