CN114493969A - DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium - Google Patents

DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium Download PDF

Info

Publication number
CN114493969A
CN114493969A CN202210081771.2A CN202210081771A CN114493969A CN 114493969 A CN114493969 A CN 114493969A CN 202210081771 A CN202210081771 A CN 202210081771A CN 114493969 A CN114493969 A CN 114493969A
Authority
CN
China
Prior art keywords
watermark
image
rgb component
rgb
information
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.)
Pending
Application number
CN202210081771.2A
Other languages
Chinese (zh)
Inventor
贺佳乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wingtech Information Technology Co Ltd
Original Assignee
Xian Wingtech Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Wingtech Information Technology Co Ltd filed Critical Xian Wingtech Information Technology Co Ltd
Priority to CN202210081771.2A priority Critical patent/CN114493969A/en
Publication of CN114493969A publication Critical patent/CN114493969A/en
Priority to PCT/CN2022/141415 priority patent/WO2023138303A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20064Wavelet transform [DWT]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a DWT-based digital watermarking method, a DWT-based digital watermarking system, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an original color image and a watermark color image, respectively extracting RGB components of the original color image and the watermark color image, and respectively carrying out DWT (discrete wavelet transform) conversion to correspondingly obtain RGB component matrix information of the original image and the watermark; embedding RGB component matrix information of the watermark into RGB component matrix information of a corresponding original image in a mode of embedding low-frequency information and high-frequency information together; carrying out DWT inverse transformation on the RGB component images after the watermarks are embedded respectively, and reconstructing the RGB component images; and (4) carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image. The watermark is embedded in the original image in a mode of embedding low-frequency information and high-frequency information together, and the low-frequency band contains most information of the image, so that the watermark is embedded in the low-frequency band, the difference between the finally extracted watermark and the original watermark is not large, and the integrity of the extracted watermark is high.

Description

DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium
Technical Field
The present disclosure relates generally to the field of information security technologies, and in particular, to a DWT-based digital watermarking method, system, electronic device, and storage medium.
Background
With the advent of the information age, especially the popularization of the Internet (Internet), the issue of security protection of information has become increasingly prominent. The digital watermarking technology is an effective method for realizing multimedia copyright protection and information integrity guarantee in the field of information hiding, and the basic idea of the digital watermarking technology is to embed secret watermarking information in a digital image so as to protect the copyright of a digital product, and the copyright of the digital product is just like stamping a picture, and the ownership is noted.
Digital watermark embedding methods are many, such as Least Significant Bit (LSB), Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT), and the like. The DWT is commonly used for watermark embedding, but in the existing watermark embedding method based on the DWT, the dimension reduction processing of the watermark is converted into a one-dimensional matrix during watermark embedding, the one-dimensional matrix is only embedded in a high-frequency part, but not embedded in a low-frequency part, and the extracted watermark is incomplete during subsequent watermark extraction.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a DWT-based digital watermarking method, system, electronic device and storage medium.
In a first aspect, an embodiment of the present application provides a DWT-based digital watermarking method, including a watermark embedding method, including:
acquiring an original color image of a watermark to be embedded and a watermark color image to be embedded;
respectively extracting RGB components of the original color image and RGB components of the watermark color image, and correspondingly obtaining an RGB component image of the original image and an RGB component image of the watermark;
respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermark to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermark;
embedding RGB component matrix information of the watermark into RGB component matrix information of a corresponding original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component image embedded with the watermark;
respectively carrying out inverse discrete wavelet transform on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
and carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
In a second aspect, an embodiment of the present application provides a DWT-based digital watermarking method, where the watermarked image obtained by the DWT-based digital watermarking method includes a watermark extraction method, including:
acquiring an original color image without embedded watermark and the image after the watermark;
respectively extracting RGB components of the original color image and RGB components of the watermarked image to correspondingly obtain an RGB component image of the original image and an RGB component image of the watermarked image; respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermarked image to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermarked image;
extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the watermarked image and the RGB component matrix information of the original image, and further obtaining the RGB component matrix information of the watermark;
respectively carrying out inverse discrete wavelet transform on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
and carrying out three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
In a third aspect, an embodiment of the present application provides a DWT-based digital watermarking system, including a watermark embedding apparatus, including:
the original image acquisition module is used for acquiring an original color image to be embedded with the watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the watermark acquisition module is used for acquiring a watermark color image to be embedded;
the watermark RGB extraction module is used for extracting RGB components of the watermark color image to obtain an RGB component map of the watermark;
the watermark discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermarks to obtain RGB component matrix information of the watermarks;
the embedding module is used for embedding the RGB component matrix information of the watermark into the corresponding RGB component matrix information of the original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component map embedded with the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
In a fourth aspect, an embodiment of the present application provides a DWT-based digital watermarking system, including a watermark extraction apparatus, including:
the original image acquisition module is used for acquiring an original color image without embedded watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the post-watermark image acquisition module is used for acquiring a post-watermark image of the watermark to be extracted;
the watermark image RGB extraction module is used for extracting RGB components of the watermark image to obtain an RGB component map of the watermark image;
the watermark image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermark image to obtain RGB component matrix information of the watermark image;
the extraction module is used for extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the watermarked image and the RGB component matrix information of the original image so as to obtain the RGB component matrix information of the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
In a fifth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the DWT-based digital watermarking method provided in any embodiment of the present application when executing the computer program.
In a sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the DWT-based digital watermarking method provided in any of the embodiments of the present application.
According to the DWT-based digital watermarking method, the DWT-based digital watermarking system, the electronic equipment and the storage medium, when the watermark is embedded into the original image, a mode of embedding low-frequency information and high-frequency information together is adopted, and as the low-frequency band contains most of information of the image, the watermark is embedded in the low-frequency band, so that the difference between the finally extracted watermark and the original watermark image is not large, and the integrity of the extracted watermark image is high; and under noise interference, the watermark can be effectively embedded and extracted, and the robustness is better.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a block diagram illustrating an exemplary flow chart of a DWT-based digital watermark embedding method according to an embodiment of the present application;
FIG. 2 is a decomposition diagram of a discrete wavelet transform provided by an embodiment of the present application;
fig. 3 is matrix information [ C, S ] obtained by wavelet decomposition according to the embodiment of the present application;
fig. 4 is an exemplary flowchart of a DWT-based digital watermark extraction method provided in an embodiment of the present application;
fig. 5 is a block diagram illustrating an exemplary structure of a DWT-based digital watermark embedding apparatus according to an embodiment of the present application;
fig. 6 is a diagram of simulation results of a conventional watermark embedding method; wherein, the graph (a) is an original image (size 512 x 512), and the graph (b) is an image embedded with a watermark; graph (c) watermark image (size 64 x 64); fig. (d) is a watermark image extracted from a watermark-containing image;
fig. 7 is a diagram of a simulation result of a DWT-based digital watermarking method provided in an embodiment of the present application; wherein, the image (a) is an original image, and the image (b) is an image embedded with a watermark; figure (c) a watermark image; fig. (d) is a watermark image extracted from a watermark-containing image;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Interpretation of professional terms
Discrete Wavelet Transform (DWT): the wavelet transform is a local transform of space and frequency, and can effectively extract information from signals; in the numerical calculation, in order to reduce the redundancy of information, it is generally necessary to discretize the scale factor and the displacement factor of the wavelet transform, thereby forming a discrete wavelet transform.
Robustness: that is, the digital watermark remains partially intact and can be accurately authenticated after undergoing various unintentional or intentional signal processing procedures. Possible signal processing procedures include channel noise, filtering, scale variation, and lossy compression coding, among others.
The existing DWT-based digital watermark embedding method comprises the following specific steps:
(1) performing dimension reduction decomposition processing on the watermark image: scanning the watermark image into a one-dimensional vector to obtain a one-dimensional digital watermark sequence V;
(2) selecting a Haar wavelet function as a wavelet basis function to perform n-level discrete wavelet transform on the original image I, so that the original image is placed in a low-frequency band LLn;
(3) selecting wavelet coefficient c of watermark sequence VkFor the selected wavelet coefficient ckModifying according to the following formula, and utilizing wavelet coefficient c 'obtained after modification'kEmbedding the watermark;
c′k=ck+aV
wherein a is a fixed parameter (designed according to the requirement).
(4) And (3) synthesizing each sub-image obtained by the n-level discrete wavelet decomposition of the original image with the sub-image of the watermark image, and carrying out DWT inverse transformation on the synthesized sub-image to obtain the reconstructed watermark-containing image.
As can be seen from the above, in the existing DWT-based digital watermark embedding method, the watermark embedding coefficient is not set, and the watermark embedding transparency cannot be adjusted, resulting in poor watermark embedding effect; and when the watermark is embedded, the dimension reduction processing of the watermark is converted into a one-dimensional matrix which is only embedded in a high-frequency part but not embedded in a low-frequency part, so that the extracted watermark is incomplete when the watermark is subsequently extracted.
Fig. 1 is an exemplary flowchart of a DWT-based digital watermark embedding method provided in an embodiment of the present application. As shown in fig. 1, a first aspect of embodiments of the present application provides a DWT-based digital watermarking method, including a watermark embedding method, including:
s110: acquiring an original color image of a watermark to be embedded and a watermark color image to be embedded;
s120: respectively extracting RGB components of the original color image and RGB components of the watermark color image, and correspondingly obtaining an RGB component image of the original image and an RGB component image of the watermark; wherein R is red, G is green, and B is blue;
s130: respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermark to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermark;
s140: embedding RGB component matrix information of the watermark into RGB component matrix information of a corresponding original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component image embedded with the watermark;
s150: respectively carrying out inverse discrete wavelet transform on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
s160: and carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
In the embodiment, the mode of embedding the low-frequency information and the high-frequency information together is adopted when the watermark is embedded into the original image, the watermark is embedded in the low-frequency band due to the fact that the low-frequency band contains most of information of the image, although the embedded part is complex in processing, the subsequent extraction of the watermark is facilitated, the finally extracted watermark simultaneously contains the low-frequency information and the high-frequency information, the difference between the extracted watermark image and the original watermark image is not large, and the integrity of the extracted watermark image is high. And when the watermark is embedded, the color of the watermark is considered, and the way of the RGB components of the watermark is adopted, so that the finally extracted watermark is still a color image.
It should be noted that the watermark has security, and different designers can set different watermark embedding rules according to their own requirements, for example, the position, size, and format of the inserted watermark, and different designers will be different. The watermark is arranged by a designer by using certain rules, and the rules are difficult to imitate by a thief, so that the characteristics of safety and reliability are ensured.
Specifically, in step S120, the extraction method of extracting red, green, and blue is the same as that of extracting input r ═ input (:,: 1). Respectively extracting RGB components of an original color image, and dividing the original color image into R, G, B parts; the RGB components of the watermark color image are extracted separately, and the watermark image is divided into R, G, B three parts. Therefore, when the subsequent watermark is embedded, R, G, B three parts of the watermark are respectively embedded into R, G, B three parts of the original image.
In one embodiment, step S130 specifically includes:
selecting a Haar wavelet function as a wavelet basis function, and respectively performing n-level two-dimensional discrete wavelet transform on the RGB component image of the original image and the RGB component image of the watermark;
the component matrix information is [ C, S]Wherein C is used for storing decomposition results of n levels of two-dimensional discrete wavelet transform, and C ═ ((cAn, cH)n,cVn,cDn),(cHn-1,cVn-1,cDn-1),…… (cH2,cV2,cD2),(cH1,cV1,cD1) cAn denotes the nth order low frequency approximation component, cHnRepresenting a high frequency level detail component, cV, of level nnRepresenting the nth order high frequency vertical detail component, cDnRepresenting a high frequency diagonal detail component of level n; s is used for explaining the decomposition results of all levels stored in C, and the size information of the original image and the size information of the decomposition results of all levels are recorded in S;
the R component matrix information of the original image is [ C ]R,SR]The G component matrix information of the original image is [ C ]G,SG]The B component matrix information of the original image is [ C ]B,SB](ii) a Wherein, CRDecomposition results of each level, S, for storing an N-level two-dimensional discrete wavelet transform of R components of an original imageRFor pair CRThe stored decomposition results of each level are explained; cGDecomposition results of each level, S, for storing an n-level two-dimensional discrete wavelet transform of the G component of an original imageGFor pair CGThe stored decomposition results of each level are explained; cBDecomposition results of each level, S, for storing an n-level two-dimensional discrete wavelet transform of the B-component of an original imageBFor pair CBThe stored decomposition results of each level are explained;
the R component matrix information of the watermark is [ C ]WR,SWR]The G component matrix information of the watermark is [ C ]WG,SWG]The B component matrix information of the watermark is [ C ]WB,SWB](ii) a Wherein, CWRDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing R components of a watermarkWRFor pair CWRThe stored decomposition results of each level are explained; cWGDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing a watermark G componentWGFor pair CWGThe stored decomposition results of each level are explained; cWBFor storing the decomposition results of each stage of the n-stage two-dimensional discrete wavelet transform of the watermark B component,SWBfor pair CWBThe decomposition results of each stage stored in (1) are explained.
Specifically, the technique of image processing using wavelet transform is to perform multi-resolution decomposition on a digital image, expand the digital image into specific levels, form layered images of different spaces and different frequencies, and then calculate and process the layered sub-images. Since an image can be regarded as a two-dimensional signal composed of rows and columns, it needs to be processed on the rows and columns respectively during the wavelet transform, as shown in fig. 2, after one two-dimensional discrete wavelet transform, the image can be decomposed into 4 sub-images (i.e. 4 bands: HL)1For the first-order high-frequency horizontal band, LH1For the first-order high-frequency vertical band, HH1For the first-order high-frequency diagonal band, LL1First order low frequency band); wherein the first stage low frequency band LL1Can be decomposed into second high-frequency horizontal band HL2Second-order high-frequency vertical band LH2Second-level high-frequency diagonal band HH2Second stage low frequency band LL2. And analogizing in sequence, performing n-level two-dimensional discrete wavelet transform on the image to obtain the corresponding nth-level low-frequency band and nth-level high-frequency band.
Wherein, matrix information [ C, S ] after picture decomposition is obtained by adopting wavedec2() wavelet decomposition function in Matlab]And C is used for actually storing decomposition results of each level of the n-level two-dimensional discrete wavelet transform, and S is used for explaining the results of each level stored in C. As shown in fig. 3, after wavelet decomposition using wavedec2(), the low-frequency and high-frequency components of each stage of the decomposition are actually all stored in C in the form of a vector (one-dimensional array), where C is a one-dimensional array and C ═ C ((cAn, cH)n,cVn,cDn),(cHn-1,cVn-1,cDn-1),……(cH2,cV2,cD2), (cH1,cV1,cD1) cAn denotes the nth order low frequency approximation component, cHnRepresenting a high frequency level detail component, cV, of level nnRepresenting the nth order high frequency vertical detail component, cDnRepresenting a high frequency diagonal detail component of level n; in S, record the size information of original andsize information of each stage of decomposition results. Since the two-dimensional matrices of the same level of high-frequency components (horizontal H, vertical V, diagonal D) have the same size, the same level of high-frequency components only need to have a single recording size.
Taking 2-level wavelet decomposition as an example, that is, assuming n is 2 in fig. 3, each level of low-frequency and high-frequency components (which are two-dimensional matrices) obtained by decomposition is converted from the two-dimensional matrices into one-dimensional arrays by columns, and then (cA) is obtained2,cH2,cV2,cD2),(cH1,cV1,cD1) Storing the sequence arrangement of the C (which is a one-dimensional array) into the C; where a represents the low frequency approximate components and H, D, V represents the high frequency detail components, respectively. From the above description, it can be seen that C is a large one-dimensional array containing all the decomposition result information, but it cannot be determined by C alone which two-dimensional matrix the data in a certain interval originally belongs to. Therefore, the S matrix is used to illustrate the data stored in C, and as shown in FIG. 3, the first row in S records cA2(low-frequency component) originally used as the row and column number information of the two-dimensional matrix, namely 32x32, sequentially going down to be the row and column number information of the two-dimensional matrix of the high-frequency component (because the two-dimensional matrix of the high-frequency component at each level is the same in size, only a single record is needed for explanation); the last line records the size of the original X.
In this embodiment, a Haar wavelet function is selected as a wavelet basis function, and n-level two-dimensional discrete wavelet transform is performed on R, G, B three components of the original image respectively to obtain R component matrix information [ C ] of the original imageR,SR]The G component matrix information of the original image is [ C ]G,SG]The B component matrix information of the original image is [ CB,SB](ii) a Wherein [ CR,SR]、[CG,SG]、[CB,SB]Is explained in detail with the matrix information [ C, S]For explaining (1), e.g. CRDecomposition results of each level, S, for storing an N-level two-dimensional discrete wavelet transform of R components of an original imageRFor pair CRThe stored decomposition results of each stage are explained, and are not repeated in this application.
At the same time, Haar wavelet function is selected asWavelet basis function, n-level two-dimensional discrete wavelet transform is respectively carried out on R, G, B three components of the watermark to obtain R component matrix information [ C ] of the watermarkWR,SWR]The G component matrix information of the watermark is [ C ]WG,SWG]The B component matrix information of the watermark is [ C ]WB,SWB](ii) a Wherein [ CWR,SWR]、[CWG,SWG]、[CWB,SWB]Is explained in detail with the matrix information [ C, S]The explanation of (1) is not repeated in detail in this application.
In one embodiment, step S140 includes:
setting an embedding coefficient m, multiplying the low-frequency information of the RGB component matrix information of the watermark by the embedding coefficient m, and adding the low-frequency information of the RGB component matrix information of the original image;
and multiplying the high-frequency information of the RGB component matrix information of the watermark by the embedding coefficient, adding the high-frequency information to the high-frequency information of the RGB component matrix information of the original image, and repeatedly embedding the high-frequency information k times to obtain the RGB component image embedded with the watermark.
In this embodiment, when embedding a watermark, the wavelet decomposition is performed first, and then the low-frequency information of the original image row and column is stored, where the embedding code is as follows:
Ci(1:size(CWi,2)/16)=Ci(1:size(CWi,2)/16)+m*CWi(1:size(CWi,2)/16)
wherein i belongs to [ R, G, B ]; m belongs to [ r, g, b ], r is a red embedding coefficient, g is a green embedding coefficient, and b is a blue embedding coefficient; size (X,2) represents the length of the X vector.
For example, when i is R and m is R, the low frequency information of the R component of the watermark is embedded into the low frequency information of the R component of the original image, and the embedded code is CR(1:size(CWR,2)/16) =CR(1:size(CWR,2)/16)+r*CWR(1:size(CWR2)/16) representing the original R component matrix CROn its own + watermark R component matrix CWRThe first B/16 elements of (a) red embedding coefficient r (for each element respectively). When i is G and m is G, watermarkThe low-frequency information of the G component of the original image is embedded into the low-frequency information of the G component of the original image; when i is equal to B and m is equal to B, the low frequency information of the B component of the watermark is embedded into the low frequency information of the B component of the original image.
And then, repeatedly embedding high-frequency parts corresponding to the watermarks at the horizontal, vertical and diagonal positions of the high-frequency components, wherein three high-frequency parts of the watermark picture are added to the original image by multiplying the high-frequency components of the watermarks by an embedding coefficient. The repeated embedding times k are determined by the ratio of the length of an original color image to be embedded with the watermark to the length of a watermark color image to be embedded, the length of the original color image is the same as the length of an R component of an original image, the length of the watermark color image is the same as the length of an R component of the watermark, the length of the image is not changed after three primary colors RGB are extracted from the image, and C is assumedRIs represented by A, CWRB, the number of times k of repeated embedding is a/B, and if a/B is 1, a while loop k is 0 and a while k is compiled<The embedding can be repeated only once for a/B-1.
Taking embedding of three high-frequency components of the G component as an example, the embedding code of three high-frequency components (H, V, D) of the G component is as follows:
CG(1+size(CG,2)/4+k*size(CWG,2)/4:size(CG,2)/4+...
(k+1)*size(CWG,2)/4)=CG(1+size(CG,2)/4+...
k*size(CWG,2)/4:size(CG,2)/4+(k+1)*size(CWG,2)/4+...
g*CWG(1+size(CWG,2)/4:size(CWG,2)/2));
CG(1+size(CG,2)/2+k*size(CWG,2)/4:size(CG,2)/2+...
(k+1)*size(CWG,2)/4)=CG(1+size(CG,2)/2+...
k*size(CWG,2)/4:size(CG,2)/2+(k+1)*size(CWG,2)/4+...
g*CWG(1+size(CWG,2)/2:3*size(CWG,2)/4));
CG(1+3*size(CG,2)/4+k*size(CWG,2)/4:3*size(CG,2)/4+...
(k+1)*size(CWG,2)/4)=CG(1+3*size(CG,2)/4+...
k*size(CWG,2)/4:3*size(CG,2)/4+(k+1)*size(CWG,2)/4+...
g*CWG(1+3*size(CWG,2)/4:size(CWG,2)));
for the same reason of high-frequency embedding of the R component and the B component, the same embedding method as that of the G component is adopted, and details are not repeated in the embodiments of the present application.
In this example, the transparency of the watermark can be changed by setting a watermark embedding coefficient m, and the smaller the value of m, the higher the transparency of the watermark is, the smaller the influence on the original image after the watermark is embedded is, and the better the hiding performance of the watermark is. The value of m may be set to a small point at the time of embedding, for example, m is 0.03, but of course, in practical application, other parameter values may be set. And the high-frequency information of the watermark is embedded repeatedly, so that the watermark can be embedded into the original image more fully, and a more complete watermark can be obtained during subsequent watermark extraction, so that the difference between the finally extracted watermark and the original watermark is not large.
In an embodiment, the embedding the low frequency information of the RGB component matrix information of the watermark into the low frequency information of the RGB component matrix information of the original image includes:
simultaneously applying R component matrix information [ C ] of the watermarkWR,SWR]Low frequency information c inWRAnWatermarked G component matrix information CWG,SWG]Low frequency information c inWGAnWatermarked B component matrix information [ CWB,SWB]Low frequency information c inWBAnCorresponding to the R component matrix information [ C ] embedded in the original imageR,SR]Low frequency information c inRAnG component matrix information [ C ] of original imageG,SG]Low frequency information c inGAnB component matrix information [ C ] of original imageB,SB]Low frequency information c inBAn. The displayIn the example, the low frequency information of R, G, B three components of the watermark is correspondingly embedded into the low frequency information of R, G, B three components of the original image, the specific embedded code is adjusted correspondingly as described above, and the above-mentioned C is correspondingly embeddediIs replaced by CiAnMixing C withWiIs replaced by CWiAnThe method comprises the following steps:
CiAn(1:size(CWiAn,2)/16)
=CiAn(1:size(CWiAn,2)/16)+m*CWiAn(1:size(CWiAn,2)/16)
wherein i belongs to [ R, G, B ]; m belongs to [ r, g, b ], r is a red embedding coefficient, g is a green embedding coefficient, and b is a blue embedding coefficient; size (X,2) represents the length of the X vector.
In this example, the watermark is embedded in low-frequency information, which can retain most of the information of the image, but is beneficial to extracting the watermark subsequently, so that the extracted watermark is complete and has little difference from the original watermark.
In one embodiment, the red embedding coefficient r, the green embedding coefficient g, and the blue embedding coefficient b are set in equal proportion.
In this embodiment, r, g, and b embedding coefficients are set in equal proportion, and r is set to g or b, so that color misregistration of the obtained image is prevented. In order to make the watermark less obvious and not easy to distinguish, the slightly smaller embedding coefficients r, g and b in debugging can increase the transparency of the watermark, so that the image embedded with the watermark is closer to the original image.
In an embodiment, the repeatedly embedding the high-frequency information of the RGB component matrix information of the watermark into the high-frequency information of the RGB component matrix information of the original image includes:
mapping R component matrix information [ C ] of the watermarkWR,SWR]High frequency level information c inWRHnHigh frequency vertical information cWRVnHigh frequency diagonal information cWRDnCorrespondingly embedding R component matrix information [ C ] of the original image by using high-frequency information embedding codesR,SR]High frequency level information c inRHnHigh frequency vertical information cRVnHigh frequency pairAngular information cRDnPerforming the following steps;
simultaneously converting G component matrix information [ C ] of the watermarkWG,SWG]High frequency level information c inWGHnHigh frequency vertical information cWGVnHigh frequency diagonal information cWGDnG component matrix information [ C ] correspondingly embedded into the original image by using high-frequency information embedding codesG,SG]High frequency level information c inGHnHigh frequency vertical information cGVnHigh frequency diagonal information cGDnPerforming the following steps;
simultaneously converting B component matrix information [ C ] of the watermarkWB,SWB]High frequency level information c inWBHnHigh frequency vertical information cWBVnHigh frequency diagonal information cWBDnCorrespondingly embedding B component matrix information [ C ] of the original image by using high-frequency information embedding codesB,SB]High frequency level information c inBHnHigh frequency vertical information cBVnHigh frequency diagonal information cBDnPerforming the following steps;
repeating the high-frequency information embedding step for multiple times, and finally correspondingly embedding the high-frequency information of the RGB component matrix information of the watermark into the high-frequency information of the RGB component matrix information of the original image.
In this example, the above-mentioned G component is embedded in the code at a high frequency, CGActually representing high frequency level information cGHnHigh frequency vertical information cGVnHigh frequency diagonal information cGDn;CWGHigh frequency level information c of the actual representationWGHnHigh frequency vertical information cWGVnHigh frequency diagonal information cWGDn. For R, B component high frequency information embedding principle, the description of the application is omitted.
In step 150, the three R, G, B components of the watermarked image are reconstructed using a reconstruction function, resulting in R, G, B reconstructed three components.
In step 160, three colors of the reconstructed R, G, B components are superimposed to obtain a watermarked image.
Fig. 4 is an exemplary flowchart of a DWT-based digital watermark extraction method provided in an embodiment of the present application. As shown in fig. 4, a second aspect of the present application embodiment provides a DWT-based digital watermarking method, where a watermarked image obtained based on the DWT-based digital watermarking method provided by the present application embodiment includes a watermark extraction method, which includes:
s210: acquiring an original color image without embedded watermark and the image after the watermark;
s220: respectively extracting RGB components of the original color image and RGB components of the watermarked image to correspondingly obtain an RGB component image of the original image and an RGB component image of the watermarked image; wherein R is red, G is green, and B is blue;
s230: respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermarked image to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermarked image;
s240: extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the image after the watermark and the RGB component matrix information of the original image so as to obtain the RGB component matrix information of the watermark;
s250: respectively carrying out inverse discrete wavelet transform on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
s260: and performing three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
In this embodiment, the extraction of the watermark is to extract the watermark position information according to the inverse transform of watermark embedding in the same manner to obtain the complete watermark, in this example, the low frequency information and the high frequency information of the watermark can be extracted, and since the low frequency band contains most of the information of the image, the difference between the extracted watermark image and the original watermark image is not large, and the integrity of the extracted watermark image is high. And in the watermark extraction, the color of the watermark is considered, and the way of the RGB components of the watermark is adopted, so that the finally extracted watermark is still a color image.
Specifically, in step S210, a post-watermark image is obtained, where both the low-frequency portion and the high-frequency portion are embedded during watermark embedding, that is, the post-watermark image obtained by using the watermark embedding method provided in the embodiment of the present application is a post-watermark image from which a watermark is to be extracted.
In step S220, the extraction method of extracting red, green, and blue colors using input r ═ input (: 1) is the same. Respectively extracting RGB components of an original color image, and dividing the original color image into R, G, B parts; RGB components of the watermarked image are respectively extracted, and the watermarked image is divided into R, G, B parts.
In one embodiment, step S230 specifically includes:
selecting a Haar wavelet function as a wavelet basis function, and respectively performing n-level two-dimensional discrete wavelet transform on the RGB component image of the original image and the RGB component image of the watermarked image;
the component matrix information is [ C, S]Wherein C is used for storing decomposition results of n levels of two-dimensional discrete wavelet transform, and C ═ ((cAn, cH)n,cVn,cDn),(cHn-1,cVn-1,cDn-1),…… (cH2,cV2,cD2),(cH1,cV1,cD1) cAn denotes the nth order low frequency approximation component, cHnRepresenting a high frequency level detail component, cV, of level nnRepresenting the nth order high frequency vertical detail component, cDnRepresenting a high frequency diagonal detail component of level n; s is used for explaining the decomposition results of all levels stored in C, and the size information of the original image and the size information of the decomposition results of all levels are recorded in S;
the R component matrix information of the original image is [ C ]R,SR]The G component matrix information of the original image is [ C ]G,SG]The B component matrix information of the original image is [ C ]B,SB];
The R component matrix information of the watermarked image is [ C ]TR,STR]And the G component matrix information of the image after the watermark is [ C ]TG,STG]The B component matrix information of the watermarked image is [ C ]TB,STB](ii) a Wherein, CTRDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing R components of a watermarked imageTRFor pair CTRIn (1) stored inExplaining the level decomposition result; cTGDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing a watermarked image G componentTGFor pair CTGThe stored decomposition results of each level are explained; cTBDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing a watermarked image B componentTBFor pair CTBThe decomposition results of each stage stored in (1) are explained.
In this embodiment, an n-level two-dimensional discrete wavelet transform method is adopted to decompose R, G, B components of the original image and R, G, B components of the watermarked image, and according to matrix information obtained by decomposition, extraction of low-frequency information and high-frequency information of the watermark is facilitated in the following process.
In one embodiment, step S240 specifically includes:
correspondingly solving the difference value of the RGB component matrix information of the image after the watermark and the RGB component matrix information of the original image, and then dividing the difference value by an embedding coefficient m to obtain low-frequency information and high-frequency information of the RGB components of the watermark;
and combining the low-frequency information and the high-frequency information of the RGB components of the watermark to obtain the RGB component matrix information of the watermark.
Specifically, the high frequency part of the RGB component matrix information of the watermarked image and the high frequency part of the RGB component matrix information of the original image are correspondingly differenced to extract the high frequency component of the RGB component of the watermark, and the R component is taken as an example for explanation, which specifically includes the following steps:
low frequency component wa of R componentRThe extraction code is as follows:
waR=CWR(1:size(CWR,2)/16)-CR(1:size(CR,2)/16)
the R component high-frequency component extraction code is as follows:
for k=0:3
whR(k+1,:)=CWR(1+size(CWR,2)/4+k*size(CWR,2)/16:...
size(CWR,2)/4+(k+1)*size(CWR,2)/16)-...
CR(1+size(CR,2)/4+k*size(CR,2)/16:...
size(CR,2)/4+(k+1)*size(CR,2)/16);
wvR(k+1,:)=CWR(1+size(CWR,2)/2+k*size(CWR,2)/16:...
size(CWR,2)/2+(k+1)*size(CWR,2)/16)-...
CR(1+size(CR,2)/2+k*size(CR,2)/16:...
size(CR,2)/2+(k+1)*size(CR,2)/16);
wdR(k+1,:)=CWR(1+3*size(CWR,2)/4+k*size(CWR,2)/16:...
3*size(CWR,2)/4+(k+1)*size(CWR,2)/16)-...
CR(1+3*size(CR,2)/4+k*size(CR,2)/16:...
3*size(CR,2)/4+(k+1)*size(CR,2)/16);
end
wherein k is the number of repeated embedding times and can be 0,1,2 or 3. whRWv being a high-frequency horizontal component of the R componentRIs the high frequency vertical component of the R component, wdRIs the R component high frequency diagonal component. The G, B component low-frequency component and high-frequency component are coded by the same method as the R component.
Due to the extracted low frequency component wa of the R componentRR component (wh)R、wvR、 wdR) And also contains an embedding coefficient R, so that the obtained low-frequency component wa of the R componentRR component (wh)R、wvR、wdR) The code needs to be divided by the embedded coefficients as follows:
whR=(whR(1,:)+whR(2,:)+whR(3,:)+whR(4,:))/(4*r);
wvR=(wvR(1,:)+wvR(2,:)+wvR(3,:)+wvR(4,:))/(4*r);
wdR=(wdR(1,:)+wdR(2,:)+wdR(3,:)+wdR(4,:))/(4*r);
waR=(CWR(1:size(CWR,2)/16)-CR(1:size(CR,2)/16))/r;
dividing the low frequency information wa by the embedding coefficientRHigh frequency information (wh)R、wvR、wdR) Combining to obtain R component cwRMatrix cwR=[waR,whR,wvR,wdR](ii) a Similarly, the low-frequency information and the high-frequency information of the G, B component are combined to correspondingly obtain the G component cwGMatrix, B component cwBAnd (4) matrix.
It should be noted that, when extracting the low frequency information and the high frequency information of the RGB components, tests have been conducted to cause the extracted watermark to be distorted compared with the original image if the coefficient m is set too small, so it is recommended that the coefficient m is set slightly larger as possible during extraction to ensure the image effect, that is, in order to make the image color of the watermark more true during extraction, the RGB coefficient is changed slightly larger in the program, for example, r-g-b-0.1 may be set.
Step S250 specifically includes: using reconstruction function waverec (cw)R,swR), waverec(cwG,swG)waverec(cwB,swB) The reconstruction parameters obtain the reconstructed RGB components wR,wG,wB
Step S260 is specifically to reconstruct the RGB components wR,wG,wBAnd performing three-color superposition to obtain the extracted color watermark.
It should be understood that, although the steps in the flowcharts of fig. 1 and 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1 and 4 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
Fig. 5 is a block diagram illustrating an exemplary structure of a DWT-based digital watermark embedding apparatus according to an embodiment of the present application. As shown in fig. 5, a third aspect of the embodiments of the present application provides a DWT-based digital watermarking system, including a watermark embedding apparatus, including:
the original image acquisition module is used for acquiring an original color image to be embedded with the watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image; wherein R is red, G is green, and B is blue;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the watermark acquisition module is used for acquiring a watermark color image to be embedded;
the watermark RGB extraction module is used for extracting RGB components of the watermark color image to obtain an RGB component map of the watermark;
the watermark discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermarks to obtain RGB component matrix information of the watermarks;
the embedding module is used for embedding the RGB component matrix information of the watermark into the corresponding RGB component matrix information of the original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component map embedded with the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
A fourth aspect of the embodiments of the present application provides a DWT-based digital watermarking system, including a watermark extraction apparatus, including:
the original image acquisition module is used for acquiring an original color image without embedded watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image; wherein R is red, G is green, and B is blue;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the watermark post-image acquisition module is used for acquiring a watermark post-image of the watermark to be extracted;
the watermark image RGB extraction module is used for extracting RGB components of the watermark image to obtain an RGB component map of the watermark image;
the watermark image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermark image to obtain RGB component matrix information of the watermark image;
the extraction module is used for extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the watermarked image and the RGB component matrix information of the original image so as to obtain the RGB component matrix information of the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
For specific limitations of the watermark embedding device and the watermark extracting device, reference may be made to the above limitations of the DWT-based digital watermark embedding and extracting method, which are not described herein again. The modules in the watermark embedding device and the watermark extracting device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Simulation experiment
The digital watermark embedding method is characterized in that a plurality of digital watermark embedding methods are provided, the watermark can be smoothly embedded, so that the watermark is not obviously changed before and after the watermark is embedded, any person except a designer can not extract the embedded watermark without changing the original, meanwhile, the extraction of the designer does not influence the original image, and the immune performance of the algorithm for embedding the digital watermark noise and attacking is evaluated, so that the hiding performance, the safety and the robustness of the digital watermark are comprehensively embodied.
Test 1: LSB watermark and DWT watermark of this application are to immunity performance test of attack
1) Test method
The attack test has noise attack, compression, and other attack modes, and the watermarked image (the image watermarked by the LSB method and the image watermarked by the DWT-based digital watermarking method provided by the embodiment of the application) needs to be attacked and then extracted, wherein the noise is added to the watermarked image by using a function innovation (from',) firstly, the first parameter in the function parameters fills in the original image with noise, the second parameter can fill in noise types such as salt-pepper noise and Gaussian noise, the third parameter is the intensity of the added noise, and after the noise is added, the wavelet decomposition is carried out on the watermarked image by using wavedec () according to the method, and the difference value is calculated to reconstruct the watermarked image to obtain the watermark.
2) Test results
The LSB method is processed in a spatial domain, the algorithm is simple, but the attack resistance is not good, and the test result shows that the LSB is compressed and then the original embedded watermark arrangement rule is disturbed, so that the extracted watermark is disordered.
According to the DWT-based digital watermarking method provided by the embodiment of the application, the DWT is used for processing information on a transform domain, the original information is operated through forward transform and then restored through reverse transform, so that the DWT-based digital watermarking method has flexible and changeable characteristics, the test result shows that the result after DWT compression is better than LSB, in the aspect of noise attack, the impulse noise is seen to be less broken than Gaussian noise, and the influence is larger when the noise density is larger. In the aspect of signal-to-noise ratio, the signal-to-noise ratios of the three color arrays are different from each other and the minimum value of the signal-to-noise ratio is larger than 5, so that the obtained value of the signal-to-noise ratio is objective, the DWT digital watermark is verified to have better robustness relative to the LSB method, and the immunity of the DWT digital watermark to attack is better.
Test 2: comparison of effects of existing DWT watermark and DWT watermark method of the application
Fig. 6 is a diagram of simulation results of a DWT-based digital watermarking method provided by the prior art. In the prior art, when watermark embedding is carried out, dimension reduction processing of the watermark is converted into a one-dimensional matrix, and the low frequency is only embedded in the high frequency part but not embedded, and as can be seen from fig. 6, the finally extracted watermark is incomplete and has partial defects.
Fig. 7 is a diagram of simulation results of a DWT-based digital watermarking method provided in an embodiment of the present application. The method comprises the steps of processing an image by using a discrete wavelet method, decomposing the image into three high-frequency parts with low frequency by three-color separation and two-level decomposition of a color image, respectively embedding watermarks into an original image, then performing inverse transformation and three-color superposition to complete embedding, and obtaining watermark information three-color superposition by an extraction part by only using the original image and the watermarked image to solve a difference value after decomposition to complete extraction. The method adopts a mode of embedding the low frequency part and the high frequency part together, the low frequency of the watermark contains most information of the image, although the processing of the embedding part is complex, the difference between the obtained watermark image and the original watermark is not very large, and the extracted watermark is still a color image to obtain a complete watermark (known from figure 7).
In one embodiment, an electronic device is provided, the internal structure of which may be as shown in FIG. 8. The electronic device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, Near Field Communication (NFC) or other technologies. The computer program is executed by a processor to implement a DWT based digital watermarking method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the structure shown in fig. 8 is a block diagram of only a portion of the structure relevant to the present disclosure, and does not constitute a limitation on the electronic device to which the present disclosure may be applied, and that a particular electronic device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, the wearable device provided herein may be implemented in the form of a computer program that is executable on an electronic device such as that shown in fig. 8. The memory of the electronic device may store various program modules constituting the wearable device, such as an original image acquisition module, an original image RGB extraction module, a watermark acquisition module, and the like shown in fig. 5. The computer program of each program module causes the processor to execute the steps of the DWT-based digital watermarking method according to each embodiment of the present application described in the present specification.
In one embodiment, an electronic device is provided, comprising a memory storing a computer program and a processor implementing steps S110 to S160, S210 to S260 when executing the computer program.
In one embodiment, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the following steps S110 to S160, S210 to S260.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), and the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A DWT-based digital watermarking method is characterized by comprising a watermark embedding method, and the method comprises the following steps:
acquiring an original color image of a watermark to be embedded and a watermark color image to be embedded;
respectively extracting RGB components of the original color image and RGB components of the watermark color image, and correspondingly obtaining an RGB component image of the original image and an RGB component image of the watermark;
respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermark to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermark;
embedding RGB component matrix information of the watermark into RGB component matrix information of a corresponding original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component image embedded with the watermark;
respectively carrying out inverse discrete wavelet transform on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
and carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
2. The DWT-based digital watermarking method of claim 1, wherein the performing discrete wavelet transform on the RGB component map of the original image and the RGB component map of the watermark respectively, and obtaining RGB component matrix information of the original image and RGB component matrix information of the watermark correspondingly comprises:
selecting a Haar wavelet function as a wavelet basis function, and respectively performing n-level two-dimensional discrete wavelet transform on the RGB component image of the original image and the RGB component image of the watermark;
the component matrix information is [ C, S]Wherein C is used for storing decomposition results of n levels of two-dimensional discrete wavelet transform, and C ═ ((cAn, cH)n,cVn,cDn),(cHn-1,cVn-1,cDn-1),……(cH2,cV2,cD2),(cH1,cV1,cD1) cAn denotes the nth order low frequency approximation component, cHnRepresenting a high frequency level detail component, cV, of level nnRepresenting the nth order high frequency vertical detail component, cDnRepresenting a high frequency diagonal detail component of level n; s is used for explaining the decomposition results of all levels stored in C, and the size information of the original image and the size information of the decomposition results of all levels are recorded in S;
the R component matrix information of the original image is [ C ]R,SR]G component of said original imageThe matrix information is [ C ]G,SG]The B component matrix information of the original image is [ C ]B,SB](ii) a Wherein, CRDecomposition results of each level, S, for storing an N-level two-dimensional discrete wavelet transform of R components of an original imageRFor pair CRThe decomposition results of each level stored in the database are explained; cGDecomposition results of each level, S, for storing an n-level two-dimensional discrete wavelet transform of the G component of an original imageGFor pair CGThe stored decomposition results of each level are explained; cBDecomposition results of each level, S, for storing an n-level two-dimensional discrete wavelet transform of the B-component of an original imageBFor pair CBThe stored decomposition results of each level are explained;
the R component matrix information of the watermark is [ C ]WR,SWR]The G component matrix information of the watermark is [ C ]WG,SWG]The B component matrix information of the watermark is [ C ]WB,SWB](ii) a Wherein, CWRDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing R components of a watermarkWRFor pair CWRThe stored decomposition results of each level are explained; cWGDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing a watermark G componentWGFor pair CWGThe stored decomposition results of each level are explained; cWBDecomposition results of each level, S, of an n-level two-dimensional discrete wavelet transform for storing a B-component of a watermarkWBFor pair CWBThe decomposition results of each stage stored in (1) are explained.
3. The DWT-based digital watermarking method of claim 2, wherein the embedding of the RGB component matrix information of the watermark into the RGB component matrix information of the corresponding original image in a way of embedding low-frequency information and high-frequency information together to obtain the RGB component image with the embedded watermark comprises:
setting an embedding coefficient m, multiplying the low-frequency information of the RGB component matrix information of the watermark by the embedding coefficient m, and adding the low-frequency information of the RGB component matrix information of the original image;
and multiplying the high-frequency information of the RGB component matrix information of the watermark by the embedding coefficient, adding the high-frequency information to the high-frequency information of the RGB component matrix information of the original image, and repeatedly embedding the high-frequency information k times to obtain the RGB component image embedded with the watermark.
4. A DWT-based digital watermarking method according to claim 3, characterized in that the low frequency information of the RGB component matrix information of the watermark is multiplied by the embedding coefficient m, and the specific embedding code added to the low frequency information of the GRB component matrix information of the original is as follows:
Ci(1:size(CWi,2)/16)=Ci(1:size(CWi,2)/16)+m*CWi(1:size(CWi,2)/16)
wherein i belongs to [ R, G, B ]; m belongs to [ r, g, b ], r is a red embedding coefficient, g is a green embedding coefficient, and b is a blue embedding coefficient; size (X,2) represents the length of the X vector.
5. A DWT-based digital watermarking method, wherein the watermarked image obtained based on the DWT-based digital watermarking method of any one of claims 1 to 4 comprises a watermark extraction method, comprising:
acquiring an original color image without embedded watermark and the image after the watermark;
respectively extracting RGB components of the original color image and RGB components of the watermarked image to correspondingly obtain an RGB component image of the original image and an RGB component image of the watermarked image;
respectively performing discrete wavelet transformation on the RGB component map of the original image and the RGB component map of the watermarked image to correspondingly obtain RGB component matrix information of the original image and RGB component matrix information of the watermarked image;
extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the image after the watermark and the RGB component matrix information of the original image so as to obtain the RGB component matrix information of the watermark;
respectively carrying out inverse discrete wavelet transform on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
and carrying out three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
6. The DWT-based digital watermarking method of claim 5, wherein the extracting the low frequency information and the high frequency information of the watermark according to the RGB component matrix information of the watermarked image and the RGB component matrix information of the original image, and further obtaining the RGB component matrix information of the watermark comprises:
correspondingly solving the difference value of the RGB component matrix information of the image after the watermark and the RGB component matrix information of the original image, and then dividing the difference value by an embedding coefficient m to obtain low-frequency information and high-frequency information of the RGB components of the watermark;
and combining the low-frequency information and the high-frequency information of the RGB components of the watermark to obtain the RGB component matrix information of the watermark.
7. A DWT-based digital watermarking system is characterized by comprising a watermark embedding device, which comprises:
the original image acquisition module is used for acquiring an original color image to be embedded with the watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the watermark acquisition module is used for acquiring a watermark color image to be embedded;
the watermark RGB extraction module is used for extracting RGB components of the watermark color image to obtain an RGB component map of the watermark;
the watermark discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermarks to obtain RGB component matrix information of the watermarks;
the embedding module is used for embedding the RGB component matrix information of the watermark into the corresponding RGB component matrix information of the original image in a mode of embedding low-frequency information and high-frequency information together to obtain an RGB component map embedded with the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component images embedded with the watermarks to obtain reconstructed RGB component images;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain a watermarked image.
8. DWT-based digital watermarking system is characterized by comprising a watermark extraction device, which comprises:
the original image acquisition module is used for acquiring an original color image without embedded watermark;
the original image RGB extraction module is used for extracting RGB components of the original color image to obtain an RGB component image of the original image;
the original image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the original image to obtain RGB component matrix information of the original image;
the post-watermark image acquisition module is used for acquiring a post-watermark image of the watermark to be extracted;
the watermark image RGB extraction module is used for extracting RGB components of the watermark image to obtain an RGB component map of the watermark image;
the watermark image discrete wavelet transform module is used for respectively carrying out discrete wavelet transform on the RGB component images of the watermark image to obtain RGB component matrix information of the watermark image;
the extraction module is used for extracting low-frequency information and high-frequency information of the watermark according to the RGB component matrix information of the watermarked image and the RGB component matrix information of the original image so as to obtain the RGB component matrix information of the watermark;
the discrete wavelet inverse transformation module is used for respectively carrying out discrete wavelet inverse transformation on the RGB component matrix information of the watermark to obtain a reconstructed RGB component map;
and the superposition module is used for carrying out three-color superposition on the reconstructed RGB component image to obtain the extracted color watermark.
9. An electronic device, comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the DWT-based digital watermarking method of any of claims 1-6.
10. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, performs the steps of the DWT-based digital watermarking method according to any of claims 1-6.
CN202210081771.2A 2022-01-24 2022-01-24 DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium Pending CN114493969A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210081771.2A CN114493969A (en) 2022-01-24 2022-01-24 DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium
PCT/CN2022/141415 WO2023138303A1 (en) 2022-01-24 2022-12-23 Dwt-based digital watermarking method and system, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210081771.2A CN114493969A (en) 2022-01-24 2022-01-24 DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114493969A true CN114493969A (en) 2022-05-13

Family

ID=81475217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210081771.2A Pending CN114493969A (en) 2022-01-24 2022-01-24 DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114493969A (en)
WO (1) WO2023138303A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115482142A (en) * 2022-09-27 2022-12-16 河北纬坤电子科技有限公司 Dark watermark adding method, extracting method, system, storage medium and terminal
CN115564634A (en) * 2022-12-05 2023-01-03 杭州海康威视数字技术股份有限公司 Video anti-watermark embedding method and device, electronic equipment and storage medium
WO2023138303A1 (en) * 2022-01-24 2023-07-27 西安闻泰信息技术有限公司 Dwt-based digital watermarking method and system, electronic device, and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093965B (en) * 2023-10-20 2024-03-12 江苏省测绘资料档案馆 Full-flow tracking system and method for basic surveying and mapping result
CN117808654A (en) * 2023-12-04 2024-04-02 苏州科技大学 Remote sensing image watermark embedding and extracting method based on triple mixed frequency domain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011026365A1 (en) * 2009-09-03 2011-03-10 中兴通讯股份有限公司 Method and system for embedding and extracting image digital watermark
CN104252694A (en) * 2014-10-17 2014-12-31 苏州工业职业技术学院 Embedding method and extraction method for image watermark based on DWT (Discrete Wavelet Transform)
CN110910299A (en) * 2019-11-29 2020-03-24 山东科技大学 Self-adaptive reversible information hiding method based on integer wavelet transform
CN112801846A (en) * 2021-02-09 2021-05-14 腾讯科技(深圳)有限公司 Watermark embedding and extracting method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2528865A (en) * 2014-07-31 2016-02-10 Innovation Ulster Ltd Digital image watermarking system and method
CN114493969A (en) * 2022-01-24 2022-05-13 西安闻泰信息技术有限公司 DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011026365A1 (en) * 2009-09-03 2011-03-10 中兴通讯股份有限公司 Method and system for embedding and extracting image digital watermark
CN104252694A (en) * 2014-10-17 2014-12-31 苏州工业职业技术学院 Embedding method and extraction method for image watermark based on DWT (Discrete Wavelet Transform)
CN110910299A (en) * 2019-11-29 2020-03-24 山东科技大学 Self-adaptive reversible information hiding method based on integer wavelet transform
CN112801846A (en) * 2021-02-09 2021-05-14 腾讯科技(深圳)有限公司 Watermark embedding and extracting method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
石红梅: "一种基于小波变换的彩色图像数字水印算法的设计", 《技术研发》, no. 21, 8 November 2010 (2010-11-08), pages 97 *
石红梅: "一种强鲁棒性的图像数字水印算法的设计", 《常州信息职业技术学院学报》, vol. 10, no. 3, 15 June 2011 (2011-06-15), pages 36 - 39 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023138303A1 (en) * 2022-01-24 2023-07-27 西安闻泰信息技术有限公司 Dwt-based digital watermarking method and system, electronic device, and storage medium
CN115482142A (en) * 2022-09-27 2022-12-16 河北纬坤电子科技有限公司 Dark watermark adding method, extracting method, system, storage medium and terminal
CN115564634A (en) * 2022-12-05 2023-01-03 杭州海康威视数字技术股份有限公司 Video anti-watermark embedding method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023138303A1 (en) 2023-07-27

Similar Documents

Publication Publication Date Title
CN114493969A (en) DWT-based digital watermarking method, DWT-based digital watermarking system, electronic equipment and storage medium
Molina-Garcia et al. An effective fragile watermarking scheme for color image tampering detection and self-recovery
Abdelwahab et al. A discrete wavelet transform based technique for image data hiding
Bhattacharya et al. A session based multiple image hiding technique using DWT and DCT
CN108648134B (en) Spatial domain color digital image blind watermarking method fusing discrete wavelet transform
CN109685710A (en) A kind of method and device of the hidden digital watermark embedding of image copyright
Wang et al. Blind color image watermarking based on DWT and LU decomposition
CN115908095A (en) Hierarchical attention feature fusion-based robust image watermarking method and system
JP4245123B2 (en) Wavelet processing apparatus and wavelet processing method
CN104835106A (en) Full frequency domain sub-band digital watermarking embedding method based on wavelet decomposition
EP2154649A1 (en) An adaptive watermarking system and method
CN105072453B (en) A kind of video watermark process of facing moving terminal
CN116703726A (en) Large-scale image steganography method, device and equipment based on reversible neural network
US8989278B2 (en) Method and device for coding a multi dimensional digital signal comprising original samples to form coded stream
CN111065000B (en) Video watermark processing method, device and storage medium
CN116308986A (en) Hidden watermark attack algorithm based on wavelet transformation and attention mechanism
Al-Qershi et al. Reversible watermarking scheme based on two-dimensional difference expansion (2D-DE)
CN114630130B (en) Face-changing video tracing method and system based on deep learning
Al-Korbi et al. High-capacity image steganography based on Haar DWT for hiding miscellaneous data
US20220292647A1 (en) Apparatus and method for processing image
Aghagolzadeh et al. Bayer and panchromatic color filter array demosaicing by sparse recovery
Li et al. Resampling forgery detection in JPEG-compressed images
EP1615168A1 (en) Colour interpolation in DWT domain
Karmani et al. Efficient hardware architecture of 2D-scan-based wavelet watermarking for image and video
JP2002057883A (en) Image processor and image processing method and storage medium

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