[go: up one dir, main page]

CN119515653A - Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform - Google Patents

Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform Download PDF

Info

Publication number
CN119515653A
CN119515653A CN202411477025.0A CN202411477025A CN119515653A CN 119515653 A CN119515653 A CN 119515653A CN 202411477025 A CN202411477025 A CN 202411477025A CN 119515653 A CN119515653 A CN 119515653A
Authority
CN
China
Prior art keywords
watermark
band
channel
level
frequency sub
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.)
Granted
Application number
CN202411477025.0A
Other languages
Chinese (zh)
Other versions
CN119515653B (en
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.)
Haowei Technology Wuhan Co ltd
Original Assignee
Haowei Technology Wuhan 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 Haowei Technology Wuhan Co ltd filed Critical Haowei Technology Wuhan Co ltd
Priority to CN202411477025.0A priority Critical patent/CN119515653B/en
Priority claimed from CN202411477025.0A external-priority patent/CN119515653B/en
Publication of CN119515653A publication Critical patent/CN119515653A/en
Application granted granted Critical
Publication of CN119515653B publication Critical patent/CN119515653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention provides a YUV domain digital watermarking algorithm based on wavelet transformation, which comprises the steps of separating an original image to obtain an embedded channel, carrying out two-stage wavelet transformation on the embedded channel, calculating a low-frequency band pixel average value LL in a second-stage low-frequency sub-band, obtaining the watermark intensity embedded by the embedded channel according to the corresponding relation between the LL and the watermark intensity amplitude, embedding the watermark into a first-stage high-frequency sub-band to obtain a watermark-carrying second-stage high-frequency sub-band, carrying out wavelet inverse transformation to obtain a watermark-carrying channel, and merging the channels to obtain a watermark-carrying image. By adopting two-stage wavelet transformation, only 2 lines of buffer areas and addition and subtraction shift operation are needed, and the cost is low. Aiming at the visual characteristics of YUV three channels, different intensity curves are designed for the YUV three channels, and the watermark is embedded in any channel in YUV to obtain better image quality. The load is high, and longer information can be hidden. The robustness is high, and the high accuracy is still achieved under the strong noise transmission channel.

Description

YUV domain digital watermarking algorithm based on wavelet transformation
Technical Field
The invention belongs to the technical field of integrated circuit manufacturing, and particularly relates to a YUV domain digital watermarking algorithm based on wavelet transformation.
Background
The development of digital technology and networking has enabled digital information to be conveniently and rapidly spread over the network, however, while a fast and accurate means of digital transmission has provided convenience to people, new challenges are presented, such as infringement, piracy and random tampering of digital products. The digital watermarking technology is a new direction in the technical field of information security at present, is a novel technology capable of protecting copyright, authentication sources and integrity under an open network environment, and has very wide application prospects in the aspects of tamper identification, hierarchical access of data, data tracking and detection, business and video broadcasting, service payment of network digital media, electronic commerce authentication and identification and the like. The wavelet transformation known as a 'mathematical microscope' has good time-frequency characteristics and consistency with a human eye vision system, and after wavelet inverse transformation, the added watermark information is basically and uniformly dispersed on the whole image, so that noise and filtering to a certain extent cannot interfere with hidden information, and the robustness to shearing, noise and filtering can be greatly improved.
YUV is a low bandwidth color coding model, widely used in image transmission. According to different sampling modes, YUV derives different formats to cope with different bandwidth requirements. Compared with the traditional RAW domain or RGB domain, the YUV domain watermark is not subjected to image post-processing, is only affected by a transmission channel, and is a more reliable carrier. However, the traditional watermark algorithm is only embedded into a specific channel, the watermark load is low, the quality of the watermark image is low, the channel characteristics of Y, U and V three channels are not considered, and the channel characteristics are not optimized.
Disclosure of Invention
The invention aims to provide a YUV domain digital watermarking algorithm based on wavelet transformation, which adopts two-stage wavelet transformation, only needs 2 lines of buffer areas and addition and subtraction shift operation, and has lower cost. Aiming at YUV visual characteristics, YUV three channels are designed with different intensity curves, and watermark embedding in any channel in YUV can obtain better watermark image quality. The load is high, longer information can be hidden, and the Y channel has twice the hiding capacity of the U/V channel, so that the higher load requirement can be met. The robustness is high, and the high accuracy is still achieved under the strong noise transmission channel.
The invention provides a YUV domain digital watermarking algorithm based on wavelet transformation, comprising the following steps:
s1, separating an original image to obtain an embedded channel, wherein the embedded channel is any one channel of YUV three channels obtained by separating the original image;
S2, carrying out primary haar wavelet transformation on the embedded channel to obtain four primary sub-bands, wherein the four primary sub-bands sequentially comprise a primary low-frequency sub-band, a primary middle-high frequency sub-band in the vertical direction, a primary middle-high frequency sub-band in the horizontal direction and a primary high frequency sub-band;
s3, performing secondary haar wavelet transformation on the primary high-frequency sub-band to obtain four first secondary sub-bands, wherein the four first secondary sub-bands comprise first secondary high-frequency sub-bands;
s4, performing secondary haar wavelet transformation on the primary low-frequency sub-band to obtain four secondary sub-bands, wherein the four secondary sub-bands comprise secondary low-frequency sub-bands;
S5, calculating a low-frequency band pixel average value LL in the second-level low-frequency sub-band, and obtaining the watermark intensity alpha of the embedded channel embedded with the watermark according to the corresponding relation between the low-frequency band pixel average value LL and the watermark intensity amplitude Z;
S6, embedding the watermark into the first second-level high-frequency sub-band according to the calculated watermark strength, so as to obtain a watermark-carrying second-level high-frequency sub-band;
S7, carrying out wavelet inverse transformation on all sub-bands containing the watermark-carrying second-level high-frequency sub-band to obtain a watermark-carrying channel, and combining the watermark-carrying channel and the non-watermark-carrying channel to obtain a watermark-carrying image.
Further, the step S2 specifically includes performing 2-dimensional haar wavelet transform on the embedded channel by using a2×2 pixel block as a unit, where A0, A1, A2, and A3 are pixel values of 4 pixels of the 2×2 pixel block, L0, L1, L2, and L3 are coefficients of the four first-level subbands sequentially corresponding to each other, and the calculation method is as follows:
L0=A0+A1+A2+A3;L1=A0+A1-A2-A3;
L2=A0-A1+A2-A3;L3=A0-A1-A2+A3。
Further, the step S3 specifically includes performing 1-dimensional haar wavelet transform on the primary high-frequency sub-band by taking 1*4 pixel blocks as units, wherein the four first secondary sub-bands are sequentially a first secondary low-frequency sub-band, a first secondary vertical middle-high-frequency sub-band, a first secondary horizontal middle-high-frequency sub-band and the first secondary high-frequency sub-band, B0, B1, B2 and B3 are respectively pixel values of 4 pixels of 1*4 pixel blocks in the primary high-frequency sub-band, L30, L31, L32 and L33 are respectively coefficients sequentially corresponding to the four first secondary sub-bands, and the calculation mode is as follows:
L30=B0+B1+B2+B3;L31=B0+B1-B2-B3;
L32=B0-B1+B2-B3;L33=B0-B1-B2+B3。
further, the step S4 specifically includes performing 1-dimensional haar wavelet transform on the first-level low-frequency sub-band by taking 1*4 pixel blocks as units, wherein the four second-level sub-bands are sequentially the second-level low-frequency sub-band, the second-level vertical mid-high-frequency sub-band, the second-level horizontal mid-high-frequency sub-band and the second-level high-frequency sub-band, C0, C1, C2 and C3 are respectively pixel values of 4 pixels of 1*4 pixel blocks in the first-level low-frequency sub-band, L00, L01, L02 and L03 are respectively corresponding coefficients of the four second-level sub-bands in sequence, and the calculation mode is as follows:
L00=C0+C1+C2+C3;L01=C0+C1-C2-C3;
L02=C0-C1+C2-C3;L03=C0-C1-C2+C3。
Further, the first-stage low-frequency sub-band is m rows by 4n columns of pixels, the second-stage low-frequency sub-band obtained by the haar wavelet transformation is m rows by n columns of coefficient matrixes, L00 represents any one coefficient in the coefficient matrixes, and the actually calculated low-frequency pixel average value LL=L00/16.
Further, the step S5 specifically includes:
Obtaining k+1 typical values of the low-frequency band pixel average value from small to large intervals according to experiments or experience, and correspondingly dividing k sections or segments;
obtaining the watermark intensity amplitude values of the k+1Y channels embedded watermark, wherein the k+1 typical values are in one-to-one correspondence;
Obtaining the watermark intensity amplitude values of the k+1U channels and the V channels which are in one-to-one correspondence with the k+1 typical values, wherein the watermark intensity amplitude values of the U channels and the V channels which are in one-to-one correspondence with the same typical value are equal, and the watermark intensity amplitude values of the Y channels which are in one-to-one correspondence with the same typical value are smaller than the watermark intensity amplitude values of the U channels or the V channels.
Further, in step S5, the watermark strength magnitude Z is calculated according to the following formula,
Wherein x 0-xk represents k+1 of said typical values, when calculating said Y channel, said Y 0-yk represents k+1 of said Y channel watermark intensity magnitudes, when calculating said U channel and said V channel, said Y 0-yk represents k+1 of said U channel and said V channel watermark intensity magnitudes, n is any integer number between 1 and k;
When the calculated average value LL < x k of the low-frequency band pixels of x 0 < x, according to the size of the LL value, using interpolation method to calculate, inserting LL into a corresponding one of the sections (x n-1,xn), determining a straight line by two points (x n-1,yn-1) and (x n,yn), using LL as the horizontal coordinate corresponding to the straight line, and calculating the vertical coordinate of the LL point corresponding to the straight line as the watermark intensity amplitude Z.
Further, in step S5, setting the maximum variation of the pixel value of the pixel in the time domain caused by the embedding of the watermark in the pixel in the embedded channel as Δp, calculating the corresponding maximum watermark intensity value Δn=Δp×16 in the frequency domain, and calculating the watermark intensity value alpha=z×Δn.
Further, step S6 specifically includes:
Dividing the first secondary frequency sub-band into blocks according to 2 x 2, setting a watermark embedding mode corresponding to each Bit of watermark as P, wherein P comprises a 2 x 2 matrix formed by elements of-1/1 and the sum of all elements is 0;
L33' =l33+p x alpha (if bit=1);
L33' =l33-p×alpha (if bit=0).
Further, step S7 specifically includes:
S71, performing 1-dimensional wavelet inverse transformation, namely performing 1-dimensional haar wavelet inverse transformation on the first secondary low-frequency sub-band, the first secondary middle-high-frequency sub-band in the vertical direction, the first secondary middle-high-frequency sub-band and the watermark-carrying secondary high-frequency sub-band to obtain an inverse transformation primary high-frequency sub-band;
b0', B1', B2', B3' are the pixel values of 4 pixels of 1*4 pixel blocks in the inverse transform first-level high-frequency subband, respectively;
B0’=L30+L31+L32+L33’;B1’=L30+L31-L32-L33’;
B2’=L30-L31+L32-L33’;B3’=L30-L31-L32+L33’。
Further, step S7 specifically further includes:
S72, performing 2-dimensional wavelet inverse transformation, namely performing 2-dimensional haar wavelet inverse transformation on the primary low-frequency sub-band, the primary middle-high frequency sub-band in the vertical direction, the primary middle-high frequency sub-band in the horizontal direction and the inverse transformation primary high-frequency sub-band to obtain the watermark carrying channel;
A0', A1', A2', A3' are respectively the pixel values of 4 pixels of A2 x 2 pixel block in the watermark carrying channel, L3' is the coefficient of the first-stage high-frequency sub-band of the inverse transform, L0 is the coefficient of the first-stage low-frequency sub-band, L1 is the coefficient of the first-stage middle-high-frequency sub-band in the vertical direction, and L2 is the coefficient of the first-stage middle-high-frequency sub-band in the horizontal direction;
A0’=L0+L1+L2+L3';A1’=L0+L1-L2-L3';
A2’=L0-L1+L2-L3';A3’=L0-L1-L2+L3'。
further, the method also comprises watermark extraction, wherein the watermark extraction comprises the following steps:
Separating YUV channels of the watermark-carrying image to obtain the watermark-carrying channel, wherein the watermark-carrying channel is any one channel of a watermark-carrying Y channel, a watermark-carrying U channel and a watermark-carrying V channel;
performing primary wavelet transform, and performing 2-dimensional haar wavelet transform on the watermark-carrying channel by taking 2x 2 pixel blocks as units to obtain 4 primary extraction sub-bands, wherein the 4 primary extraction sub-bands comprise primary extraction high-frequency sub-bands;
performing secondary wavelet transformation, namely performing 1-dimensional haar wavelet transformation on the primary extraction high-frequency sub-band by taking 1*4 pixel blocks as units to obtain 4 secondary extraction sub-bands, wherein the 4 secondary extraction sub-bands comprise secondary extraction high-frequency sub-bands;
Dividing coefficients in the secondary extraction high-frequency sub-band to obtain coefficient matrix blocks, sequentially calculating and extracting watermark Bit values of each coefficient matrix block, splicing all the extracted watermark Bit values Bit to obtain a final watermark, wherein in each coefficient matrix block, if a result of matrix point multiplication operation of the coefficient matrix block and the watermark embedding mode P is greater than 0, bit=1, and if a result of matrix point multiplication operation of the coefficient matrix block and the watermark embedding mode P is less than 0, bit=0.
Compared with the prior art, the invention has the following beneficial effects:
The invention provides a YUV domain digital watermarking algorithm based on wavelet transformation, which comprises S1, separating an original image to obtain an embedded channel, wherein the embedded channel is any one channel of YUV three channels obtained by separating the original image; watermark embedding is only carried out on one channel in the YUV three channels; S2, carrying out primary haar wavelet transformation on the embedded channel to obtain four primary sub-bands, wherein the four primary sub-bands sequentially comprise a primary low-frequency sub-band, a primary middle-high frequency sub-band in the vertical direction, a primary middle-high frequency sub-band and a primary high frequency sub-band, S3, carrying out secondary haar wavelet transformation on the primary high frequency sub-band to obtain four first secondary sub-bands, wherein the four first secondary sub-bands comprise a first secondary sub-band, S4, carrying out secondary haar wavelet transformation on the primary low frequency sub-band to obtain four second secondary sub-bands, the four second secondary sub-bands comprise a second secondary low frequency sub-band, S5, calculating the average value LL of low frequency pixels in the second secondary low frequency sub-band, obtaining the watermark intensity of the watermark embedded channel according to the corresponding relation between the average value LL of the low frequency pixels and the watermark intensity amplitude Z, S6, carrying out inverse transformation on the first secondary sub-band and the second secondary sub-band according to the calculated intensity, and carrying out watermark-embedding on the primary low frequency sub-band to obtain the watermark carrier image, and carrying the watermark carrier image which is not carrying 7, and carrying out watermark-carrying on the two-level watermark-carrying sub-band.
The invention adopts two-stage wavelet transformation, only needs 2 lines of buffer areas and addition and subtraction shift operation, and has lower cost. Aiming at YUV visual characteristics, YUV three channels are designed with different intensity curves, and watermark embedding in any channel in YUV can obtain better image quality. The load is high, longer information can be hidden, and the Y channel has twice the hiding capacity of the U/V channel, so that the higher load requirement can be met. The robustness is high, and the high accuracy is still achieved under the strong noise transmission channel.
Drawings
Fig. 1 is a schematic flow chart of a YUV domain digital watermarking algorithm based on wavelet transform according to an embodiment of the present invention.
FIG. 2 is a schematic diagram of a first order wavelet transform performed in the algorithm of the present invention.
Fig. 3 is a schematic diagram of the two-level wavelet transform of the first-level high-frequency subband HH1 in the algorithm of the present invention.
Fig. 4 is a schematic diagram of performing a two-level wavelet transform on a first-level low-frequency subband LL1 in the algorithm of the present invention.
Fig. 5 is a table of watermark strength in the algorithm of the present invention.
Fig. 6 is a plot of watermark intensity magnitude Z versus low-band pixel average LL in the algorithm of the present invention.
Fig. 7 is a schematic diagram of embedding a watermark into a first secondary high frequency sub-band HH2a to obtain a watermarked secondary high frequency sub-band HH2a' in the algorithm of the present invention.
Fig. 8 is a schematic diagram of an inverse 1-dimensional wavelet transform in the algorithm of the present invention.
Fig. 9 is a schematic diagram of an inverse 2-dimensional wavelet transform in accordance with the algorithm of the present invention.
Fig. 10 is a schematic diagram of the primary wavelet transform performed by the watermark carrying channel C' in the algorithm of the present invention.
Fig. 11 is a schematic diagram of the first-order extraction of the high-frequency subband HH1t for the second-order wavelet transform in the algorithm of the present invention.
Fig. 12 is a schematic diagram of watermark extraction accuracy under a lossless transmission channel.
Fig. 13 is a schematic diagram of watermark extraction accuracy under strong noise channel transmission.
Fig. 14 is a first diagram of image quality for an original image, a watermark Y-channel, a watermark U-channel, and a watermark V-channel.
Fig. 15 is a second schematic diagram of image quality of an original image, a watermark Y-channel, a watermark U-channel, and a watermark V-channel.
Detailed Description
The invention is described in further detail below with reference to the drawings and the specific examples. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are in a very simplified form and are not to scale precisely, but rather merely for the purpose of facilitating and clearly aiding in the description of the embodiments of the invention.
For ease of description, some embodiments of the application may use spatially relative terms, such as "above," "below," "top," "below," and the like, to describe one element or component's relationship to another element(s) or component(s) as illustrated in the figures of the embodiments. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements or components described as "below" or "beneath" other elements or components would then be oriented "above" or "over" the other elements or components. The terms "first," "second," and the like, herein below, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that such terms so used are interchangeable under appropriate circumstances.
The embodiment of the invention provides a YUV domain digital watermarking algorithm based on wavelet transformation, which comprises the following steps as shown in figure 1:
S1, separating an original image to obtain an embedded channel, wherein the embedded channel is any one channel of YUV three channels obtained by separating the original image;
S2, carrying out primary haar wavelet transformation on the embedded channel to obtain four primary sub-bands, wherein the four primary sub-bands sequentially comprise a primary low-frequency sub-band, a primary vertical middle-high frequency sub-band, a primary horizontal middle-high frequency sub-band and a primary high frequency sub-band;
S3, performing secondary haar wavelet transformation on the primary high-frequency sub-band to obtain four first secondary sub-bands, wherein the four first secondary sub-bands comprise first secondary high-frequency sub-bands;
S4, performing secondary haar wavelet transformation on the primary low-frequency sub-band to obtain four secondary sub-bands, wherein the four secondary sub-bands comprise secondary low-frequency sub-bands;
S5, calculating a low-frequency band pixel average value LL in a second-level low-frequency sub-band, and obtaining the watermark intensity alpha of the embedded channel embedded with the watermark according to the corresponding relation between the low-frequency band pixel average value LL and the watermark intensity amplitude Z;
S6, embedding the watermark into the first second-level high-frequency sub-band according to the calculated watermark intensity, so as to obtain a watermark-carrying second-level high-frequency sub-band;
S7, carrying out wavelet inverse transformation on all sub-bands containing the watermark-carrying second-level high-frequency sub-band to obtain a watermark-carrying channel, and combining the watermark-carrying channel and the non-watermark-carrying channel to obtain a watermark-carrying image.
The following describes in detail each step of the YUV domain digital watermarking algorithm based on wavelet transform according to the embodiment of the present invention with reference to the accompanying drawings.
S1, separating an original image to obtain an embedded channel C, wherein the embedded channel C is any one channel of YUV three channels obtained by separating the original image, and watermark embedding is only embedded into one channel of the YUV three channels. In the whole watermark embedding operation, only one channel of YUV three channels is embedded, and if any two channels or three channels are embedded with watermarks, the image quality is affected.
The original image may be in RAW format or RGB format. The image may be represented using different color spaces, of which RGB (red green blue) and YUV (luminance-chrominance) color spaces are common, and the RGB color space is one of the most common color representation modes, in which the color of the image is composed of intensities of three channels of red (R), green (G) and blue (B). The value of each channel is typically in the range of 0 to 255, representing the brightness of the color channel. The YUV color space is a color space for representing brightness and chromaticity of an image, a brightness channel (Y) represents brightness of the image, and chromaticity channels (U and V) represent differences in color. Since the human eye is more sensitive to luminance variations and relatively less sensitive to chrominance variations, extracting features of an image can be more conveniently performed by converting the image into YUV format, with luminance (Y) and chrominance (U, V) components being explicitly separated.
Converting the RGB format of an original image into a YUV format according to a calculation formula, and separating a Y channel, a U channel and a V channel, wherein the formula is as follows:
Y=0.299×R+0.587×G+0.114×B;
U=0.564×(B-Y);V=0.713×(R-Y)。
Wherein Y represents a luminance channel, U and V each represent a chrominance channel, R, G, B are red, green and blue of the image, respectively. By the operation of the formula, YUV three channels can be obtained. The invention is based on a mathematical model, the Y component occupies the most weight in the final mapping to the RGB domain, and the U/V component occupies the approximate weight. Based on a physical model, the human eye is more sensitive to the brightness Y component, and the chromaticity U/V component does not obviously influence the visual effect.
Step S2, as shown in FIG. 2, performing primary wavelet transform, and performing primary haar wavelet transform on the embedded channel C to obtain four primary sub-bands, wherein the four primary sub-bands sequentially comprise a primary low-frequency sub-band LL1, a primary vertical middle-high frequency sub-band HL1, a primary horizontal middle-high frequency sub-band LH1 and a primary high-frequency sub-band HH1. The wavelet transform can decompose the image in multiple resolutions, and each level of wavelet transform obtains 4 subbands, namely a low-frequency subband LL, a high-frequency subband HL in the vertical direction, a high-frequency subband LH in the horizontal direction and a high-frequency subband HH. Haar wavelet transform is a signal processing method based on wavelet analysis that can decompose a signal into a plurality of sub-signals of different frequencies.
Specifically, the embedded channel C performs 2-dimensional haar wavelet transform with a2×2 pixel block as a unit to obtain 4 primary subbands. For example, the embedded channel C is a matrix of pixels of, for example, 64×64 (64 rows by 64 columns), resulting in a coefficient matrix of 32×32 for each of the 4 primary subbands. The calculation method is as follows:
A0, A1, A2, A3 are respectively the pixel values of 4 pixels of A2 x2 pixel block embedded in the channel C, L0 is a coefficient of the primary low-frequency sub-band LL1, L0 can be understood as an output value (also called a coefficient) of the primary low-frequency sub-band LL1 obtained by carrying out 2-dimensional haar primary wavelet transform on the embedded channel C, and all the coefficients form the primary low-frequency sub-band LL 1. L1 is the coefficient of the high-frequency subband HL1 in the primary vertical direction, L2 is the coefficient of the high-frequency subband LH1 in the primary horizontal direction, and L3 is the coefficient of the primary high-frequency subband HH 1.
L0=A0+A1+A2+A3;L1=A0+A1-A2-A3;
L2=A0-A1+A2-A3;L3=A0-A1-A2+A3。
Step S3, as shown in FIG. 3, performing two-level wavelet transform, and performing 1-dimensional haar wavelet transform on the first-level high-frequency sub-band HH1 by taking 1*4 pixel blocks as units to obtain 4 first-level sub-bands, namely a first-level low-frequency sub-band LL2a, a first-level vertical middle-high-frequency sub-band HL2a, a first-level horizontal middle-high-frequency sub-band LH2a and a first-level high-frequency sub-band HH2a. The calculation method is as follows:
b0, B1, B2, B3 are pixel values of 4 pixels of 1*4 pixel blocks in the first-level high-frequency subband HH1, L30 is a coefficient of the first-level low-frequency subband LL2a, L31 is a coefficient of the first-level vertical mid-high-frequency subband HL2a, L32 is a coefficient of the first-level horizontal mid-high-frequency subband LH2a, and L33 is a coefficient of the first-level high-frequency subband HH2a, respectively.
L30=B0+B1+B2+B3;L31=B0+B1-B2-B3;
L32=B0-B1+B2-B3;L33=B0-B1-B2+B3。
The invention adopts two-stage wavelet transformation, the first stage wavelet transformation adopts 2-dimensional transformation (2 x 2 blocks), and the second stage wavelet transformation adopts 1-dimensional transformation (1*4 blocks). The 2-dimensional wavelet transformation mode and the 1-dimensional wavelet transformation mode only need 2 lines of buffer areas and addition and subtraction shift operation, the cost is low, and the robustness of the watermark is high.
In step S4, as shown in fig. 4, a two-level wavelet transform is performed, and a 1-dimensional haar wavelet transform is performed on the primary low-frequency subband LL1 by using 1*4 pixel blocks as units to obtain 4 second-level subbands. For example, the primary low-frequency subband LL1 is a pixel matrix of, for example, 32×32 (32 rows by 32 columns), and 4 coefficient matrices of 32×8 secondary subbands are obtained. The 4 second-level subbands are a second-level low-frequency subband LL2b, a second-level vertical mid-high-frequency subband HL2b, a second-level horizontal mid-high-frequency subband LH2b, and a second-level high-frequency subband HH2b, respectively. The calculation method is as follows:
C0, C1, C2, C3 are pixel values of 4 pixels of 1*4 pixel blocks in the first-level low-frequency subband LL1, L00 is a coefficient of the second-level low-frequency subband LL2b, L01 is a coefficient of the second-level vertical mid-high-frequency subband HL2b, L02 is a coefficient of the second-level horizontal mid-high-frequency subband LH2b, and L03 is a coefficient of the second-level high-frequency subband HH2b, respectively.
L00=C0+C1+C2+C3;L01=C0+C1-C2-C3;
L02=C0-C1+C2-C3;L03=C0-C1-C2+C3。
S5, calculating a low-frequency band pixel average value LL in the second-level low-frequency sub-band LL2b, and respectively obtaining the watermark intensity alpha of each embedded YUV three channels according to the corresponding relation between the low-frequency band pixel average value LL and the watermark intensity amplitude Z. Specifically, the low-band pixel average value LL, LL=L00/16 is calculated, and L00=C0+C1+C2+C3, namely L00 is the superposition of four pixels in the first-level low-frequency sub-band LL1, and each pixel in the first-level low-frequency sub-band LL1 is the superposition of four pixels A0, A1, A2 and A3 embedded in the channel C, so that L00 is equivalent to the low-band pixel average value LL which comprises 16 pixels embedded in the channel C, and the L00 of the frequency domain is divided by 16 to be the time domain. In this example, the parameter value in the frequency domain is divided by 16 to obtain the corresponding parameter value in the time domain, and the parameter value in the time domain is multiplied by 16 to obtain the corresponding parameter value in the frequency domain.
Fig. 5 is a watermark strength table, and fig. 6 is a plot of watermark strength magnitude Z against low band pixel average value LL. The watermark intensity table in fig. 5 is a relatively typical value obtained from a number of experiments. The specific values in the table of fig. 5 are not limited, and may be adjusted according to practical situations. The first column in fig. 5 shows k+1 (for example, k+1 is illustrated by 8 as an example) typical low-band pixel average values LL (x 0-x7), and the value range of the low-band pixel average values LL is 0 to 255. The second column in fig. 5 shows the watermark strength amplitude Z of the 8Y-channel embedded watermark corresponding to the 8 more typical low band pixel averages LL. The third column in fig. 5 shows the watermark strength magnitudes Z of 8U-channel and V-channel embedded watermarks corresponding to the 8 more typical low-band pixel averages LL, which are equal. The watermark intensity amplitude of the Y channel corresponding to the same typical value is smaller than that of the U channel or the V channel.
The calculation formula of the watermark intensity amplitude Z with respect to the low-band pixel average value LL is as follows:
as can be seen from the above formula, when the calculated average value ll+.x 0(x0 of the low-band pixels is 4), the watermark intensity amplitude of the corresponding Y-channel embedded watermark is a constant value Y 0(y0, for example, 0.16), and the watermark intensity amplitudes of the corresponding U-channel and V-channel embedded watermarks are a constant value Y 0(y0, for example, 0.33).
X 0 < calculated low-band pixel average LL < x 7, the watermark strength magnitude Z of the embedded watermark can be understood as a short line segment with a slope. For example, LL is interpolated into a corresponding one of the intervals (x n-1,xn) based on the magnitude of the average value LL of the low-band pixels calculated by ll=l00/16, for example, calculated as LL is 25,25 is inserted into the interval (x 1,x2), x 1 is 12, for example, and x 2 is 28, for example. A straight line is determined by two points (x n-1,yn-1) and (x n,yn), for example, an exemplary straight line is determined by two points (x 1,y1) and (x 2,y2), and the ordinate of the LL point corresponding to the straight line is calculated to be the watermark intensity amplitude Z. For the Y channel, Y n-1 and Y n of the second column of FIG. 5 are taken, and for the U and V channels, Y n-1 and Y n of the third column of FIG. 5 are taken. For the Y channel, a first ordinate corresponding to an abscissa 25 on a first straight line is calculated by utilizing the first straight line determined by the two points of the point (12,0.22) and the point (28,0.30), and the first ordinate is the watermark intensity amplitude Z of the embedded watermark of the Y channel corresponding to the low-frequency pixel average value LL of 25. For the U/V channel, a second ordinate corresponding to an abscissa 25 on a second straight line is calculated by utilizing a second straight line determined by two points (12,0.42) and (28,0.48), wherein the second ordinate is the watermark intensity amplitude Z of the U/V channel embedded watermark corresponding to a low-frequency pixel average value LL, for example, 25.
The average value LL Σ k(xk of the pixels in the low-band is, for example, 188), the watermark intensity amplitude of the corresponding Y-channel embedded watermark is a constant value Y k(yk, for example, 0.63), and the watermark intensity amplitude of the corresponding U-channel and V-channel embedded watermark is a constant value Y k(yk, for example, 0.99). The nonlinear watermark strength model is suitable for Y/U/V three channels.
As can be seen from fig. 6, the watermark intensity amplitude (blue curve) of the Y-channel embedded watermark corresponding to the average value LL of the same low-frequency band pixel is smaller than the watermark intensity amplitudes (yellow curve) of the U-channel and V-channel embedded watermarks, and the watermark intensity amplitude of the Y-channel embedded watermark is smaller, i.e., the Y-channel embedded watermark is weaker and is not easily seen by human eyes by adopting a strong constraint watermark intensity model. The watermark strength amplitude values of the U channel and the V channel embedded watermarks are larger, namely the U/V channel embedded watermark is relatively stronger by adopting a wide constraint watermark strength model.
The ordinate is interpolated from the interval of the watermark intensity table in fig. 5 and the calculation formula according to the low-band pixel average value LL, and is the watermark intensity amplitude Z of the embedded watermark. Setting the maximum variation of the pixel value of a pixel in the time domain caused by embedding the watermark as deltap, calculating the corresponding maximum watermark intensity value deltaN=deltap×16 in the frequency domain, and calculating the watermark intensity alpha=Z×deltaN.
Step S6, as shown in FIG. 7, according to the calculated watermark intensity, embedding the watermark into the first secondary high-frequency sub-band HH2a to obtain a watermark-carrying secondary high-frequency sub-band HH2a'. Specifically, the watermark embedding mode corresponding to each bit of the watermark is set as P, wherein P can be any-1, 1 sequence, and the quantity of-1, 1 is equal. P may also be a 2x 2 matrix with elements of-1/1 composition, and the sum of all elements is 0. An example of P is the following 2x 2 matrix:
illustratively, the first secondary high frequency sub-band HH2a is partitioned by 2 x2 blocks, and the watermark is embedded bit by bit into each block of the first secondary high frequency sub-band HH2 a. L33 'are coefficients of the watermark-carrying secondary high frequency sub-band HH2 a'. The watermark information is, for example, a combination of binary Bit numbers 0, 1. In each of the blocks of the block-by-block,
L33' =l33+p x alpha (if bit=1);
L33' =l33-p×alpha (if bit=0).
Because the human eyes have different perception degrees on the change of high-frequency and low-frequency components, the human eyes generally have high perception degrees on low frequency and relatively weak perception on high-frequency details, and therefore, the watermark is embedded into the high-frequency sub-band, so that the robustness and the concealment of the steganography algorithm are ensured.
S7, carrying out wavelet inverse transformation on all sub-bands containing the watermark-carrying second-level high-frequency sub-band HH2a' to obtain a watermark-carrying channel, and merging the YUV three channels carrying the watermark to obtain a watermark-carrying image. Specifically, as shown in FIG. 8, S71 performs 1-dimensional wavelet inverse transformation, namely, performs 1-dimensional haar wavelet inverse transformation on a first secondary low-frequency sub-band LL2a obtained by performing first-level high-frequency sub-band HH1 wavelet transformation, a first secondary vertical middle-high-frequency sub-band HL2a, a first secondary horizontal middle-high-frequency sub-band LH2a and a watermark-carrying secondary high-frequency sub-band HH2a 'to obtain an inverse transformation primary high-frequency sub-band HH1'.
B0', B1', B2', B3' are respectively the pixel values of 4 pixels of the 1*4 pixel block in the inverse transform primary high-frequency subband HH1', and L33' is the coefficient of the watermark-carrying secondary high-frequency subband HH2a '.
B0’=L30+L31+L32+L33’;B1’=L30+L31-L32-L33’;
B2’=L30-L31+L32-L33’;B3’=L30-L31-L32+L33’。
As shown in fig. 9, S72, performing 2-dimensional inverse wavelet transform on the first-level low-frequency sub-band LL1, the first-level vertical middle-high-frequency sub-band HL1, the first-level horizontal middle-high-frequency sub-band LH1, and the inverse-transformed first-level high-frequency sub-band HH1 'to obtain a watermark-carrying channel C', which is calculated as follows:
a0', A1', A2', A3' are the pixel values of 4 pixels of A2 x 2 pixel block in the watermark carrying channel C ', respectively, and L3' is the coefficient of the inverse transform primary high frequency subband HH1 '.
A0’=L0+L1+L2+L3';A1’=L0+L1-L2-L3';
A2’=L0-L1+L2-L3';A3’=L0-L1-L2+L3'。
By adopting the method, the watermark carrying channel can be obtained, only one channel of YUV three channels is embedded in the whole watermark embedding operation, and the specific embedding channel is set according to the actual requirement, and the watermark carrying channel and the two channels without the watermark are combined to obtain the watermark carrying image. Specifically, the two channels of the watermark carrying channel and the non-watermark carrying channel can be converted into RGB channels and then combined to obtain the watermark carrying image.
The invention discloses a YUV domain digital watermarking algorithm based on wavelet transformation, which further comprises watermark extraction, wherein the watermark extraction comprises the following steps:
As shown in fig. 10, the YUV channels of the watermark-carrying image are separated to obtain a watermark-carrying channel C ', where the watermark-carrying channel C' is any one of a watermark-carrying Y channel, a watermark-carrying U channel, and a watermark-carrying V channel.
And performing primary wavelet transformation, and performing 2-dimensional haar wavelet transformation on the watermark carrying channel C' by taking the 2 x2 pixel blocks as units to obtain 4 primary extraction sub-bands. The 4 primary extraction subbands are a primary extraction low-frequency subband LL1t, a primary extraction high-frequency subband HL1t in the vertical direction, a primary extraction high-frequency subband LH1t in the horizontal direction, and a primary extraction high-frequency subband HH1t, respectively. The calculation method is as follows:
A0', A1', A2', A3' are respectively pixel values of 4 pixels of 2 x 2 pixel blocks in the watermark carrying channel C ', T0 is a coefficient of primary extraction of a low-frequency sub-band LL1T, T1 is a coefficient of primary extraction of a high-frequency sub-band HL1T in the vertical direction, T2 is a coefficient of primary extraction of a high-frequency sub-band LH1T in the horizontal direction, and T3 is a coefficient of primary extraction of a high-frequency sub-band HH 1T.
T0=A0’+A1’+A2’+A3’;T1=A0’+A1’-A2’-A3’;
T2=A0’-A1’+A2’-A3’;T3=A0’-A1’-A2’+A3’。
As shown in fig. 11, the two-level wavelet transform is performed, and the first-level extracted high-frequency subband HH1t is subjected to 1-dimensional haar wavelet transform with 1*4 pixel blocks as units to obtain 4 two-level extracted subbands, namely a two-level extracted low-frequency subband LL2c, a two-level extracted vertical mid-high-frequency subband HL2c, a two-level extracted horizontal mid-high-frequency subband LH2c and a two-level extracted high-frequency subband HH2c. The calculation method is as follows:
D0, D1, D2, D3 are pixel values of 4 pixels of 1*4 pixel blocks in the first-order extraction high-frequency subband HH1T, T30 is a coefficient of the second-order extraction low-frequency subband TT2c, T31 is a coefficient of the second-order extraction high-frequency subband HT2c in the vertical direction, T32 is a coefficient of the second-order extraction high-frequency subband TH2c in the horizontal direction, and T33 is a coefficient of the second-order extraction high-frequency subband HH2c, respectively.
T30=D0+D1+D2+D3;T31=D0+D1-D2-D3;
T32=D0-D1+D2-D3;T33=D0-D1-D2+D3。
The coefficients in the secondary extracted high frequency subband HH2c are partitioned to obtain blocks of coefficient matrices, e.g. 2 x 2 blocks, each block being a 2 x 2 coefficient matrix. And sequentially calculating and extracting watermark Bit values corresponding to each coefficient matrix block, and splicing all the extracted watermark Bit values Bit to obtain a final watermark. In each coefficient matrix block, bit=1 if the result of the matrix point multiplication operation of the coefficient matrix block and the watermark embedding pattern P is >0, and bit=0 if the result of the matrix point multiplication operation of the coefficient matrix block and the watermark embedding pattern P is < 0.
Fig. 12 is a schematic diagram of watermark extraction accuracy under a lossless transmission channel. As shown in fig. 12, in the lossless transmission channel, the Bit Error Rate (BER) of the YUV three-channel watermark is 0, and the lower the Bit Error Rate, the higher the accuracy of the extracted watermark information. Under the channel of lossless transmission, the extraction accuracy of YUV three-channel watermarks reaches 100%.
Fig. 13 is a schematic diagram of watermark extraction accuracy under strong noise channel transmission. As shown in fig. 13, under the channel transmission of strong noise (SNR <20 dB), the U/V channel watermark extraction accuracy can reach 100%, and the Y channel accuracy approaches 100%. The method has good robustness for different YUV data transmission conditions.
Fig. 14 is a first diagram of image quality for an original image, a watermark Y-channel, a watermark U-channel, and a watermark V-channel. Fig. 15 is a second schematic diagram of image quality of an original image, a watermark Y-channel, a watermark U-channel, and a watermark V-channel. As shown in fig. 14 and 15, the images of the watermark Y channel, the watermark U channel and the watermark V channel have no visual difference, the image quality is high, and the peak signal-to-noise ratio (PSNR) of the watermark images embedded on the different channels is higher than 38dB. The Y/U/V channels can each maintain high image quality (PSNR >38dB represents high quality).
In summary, the invention provides a YUV domain digital watermarking algorithm based on wavelet transformation, which comprises S1, separating an original image to obtain an embedded channel, wherein the embedded channel is any one channel of YUV three channels obtained by separating the original image, watermark embedding is only carried out on one channel of the YUV three channels, S2, carrying out primary haar wavelet transformation on the embedded channel to obtain four primary sub-bands, the four primary sub-bands sequentially comprise a primary low-frequency sub-band, a primary high-frequency sub-band in the vertical direction, a primary high-frequency sub-band in the horizontal direction and a primary high-frequency sub-band, S3, carrying out secondary haar wavelet transformation on the primary high-frequency sub-band to obtain four first secondary sub-bands, the four first secondary sub-bands comprise a first secondary sub-band, S4, carrying out secondary haar wavelet transformation on the primary low-frequency sub-band to obtain four second secondary sub-bands, the four secondary sub-bands comprise a secondary low-band, S5, calculating the average value of low-pixels in the secondary low-frequency sub-band, and the primary low-band, and carrying out watermark embedding is carried out on the primary low-frequency sub-band according to the LL sub-carrier, and the primary watermark is obtained, and the watermark is not carried out on the primary watermark, and the primary watermark is obtained by carrying out the watermark embedding relation between the primary high-frequency sub-band and the carrier watermark.
The invention adopts two-stage wavelet transformation, only needs 2 lines of buffer areas and addition and subtraction shift operation, and has lower cost. Aiming at YUV visual characteristics, YUV three channels are designed with different intensity curves, and watermark embedding in any channel in YUV can obtain better image quality. The load is high, longer information can be hidden, and the Y channel has twice the hiding capacity of the U/V channel, so that the higher load requirement can be met. The robustness is high, and the high accuracy is still achieved under the strong noise transmission channel.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the method disclosed in the embodiment, the description is relatively simple since it corresponds to the device disclosed in the embodiment, and the relevant points refer to the description of the method section.
The foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the claims, and any person skilled in the art may make any possible variations and modifications to the technical solution of the present invention using the method and technical content disclosed above without departing from the spirit and scope of the invention, so any simple modification, equivalent variation and modification made to the above embodiments according to the technical matter of the present invention fall within the scope of the technical solution of the present invention.

Claims (12)

1.一种基于小波变换的YUV域数字水印算法,其特征在于,包括:1. A YUV domain digital watermarking algorithm based on wavelet transform, characterized by comprising: S1、分离原始图像得到被嵌入通道,所述被嵌入通道为分离所述原始图像得到的YUV三通道中的任意一通道;水印嵌入只嵌入所述YUV三通道中的一个通道;S1. Separate the original image to obtain an embedded channel, wherein the embedded channel is any one of the three YUV channels obtained by separating the original image; and embed the watermark into only one of the three YUV channels; S2、将所述被嵌入通道进行一级haar小波变换得到四个一级子带,所述四个一级子带依次包括:一级低频子带、一级垂直方向中高频子带、一级水平方向中高频子带和一级高频子带;S2, performing a first-level Haar wavelet transform on the embedded channel to obtain four first-level sub-bands, wherein the four first-level sub-bands include: a first-level low-frequency sub-band, a first-level vertical medium-high frequency sub-band, a first-level horizontal medium-high frequency sub-band and a first-level high frequency sub-band; S3、将所述一级高频子带进行二级haar小波变换得到四个第一二级子带;所述四个第一二级子带包括:第一二级高频子带;S3, performing a second-level Haar wavelet transform on the first-level high-frequency sub-band to obtain four first and second-level sub-bands; the four first and second-level sub-bands include: first and second-level high-frequency sub-bands; S4、将所述一级低频子带进行二级haar小波变换得到四个第二二级子带;所述四个第二二级子带包括:第二二级低频子带;S4, performing a secondary Haar wavelet transform on the primary low-frequency sub-band to obtain four second-secondary sub-bands; the four second-secondary sub-bands include: a second-secondary low-frequency sub-band; S5、计算出所述第二二级低频子带中的低频段像素平均值LL,根据所述低频段像素平均值LL与水印强度幅值Z的对应关系,获得所述被嵌入通道嵌入所述水印的水印强度大小alpha;S5, calculating the low-frequency pixel average LL in the second-level low-frequency sub-band, and obtaining the watermark intensity alpha of the watermark embedded in the embedded channel according to the corresponding relationship between the low-frequency pixel average LL and the watermark intensity amplitude Z; S6、根据计算出的所述水印强度大小,将所述水印嵌入所述第一二级高频子带,得到载水印二级高频子带;S6. embedding the watermark into the first secondary high frequency sub-band according to the calculated watermark strength to obtain a watermark-carrying secondary high frequency sub-band; S7、将包含所述载水印二级高频子带的所有子带进行小波逆变换得到载水印通道;将所述载水印通道和未载水印的两通道合并,得到载水印图像。S7, performing inverse wavelet transform on all sub-bands including the watermarked secondary high-frequency sub-band to obtain a watermarked channel; merging the watermarked channel with the two channels without watermarks to obtain a watermarked image. 2.如权利要求1所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S2具体包括:将所述被嵌入通道以2*2像素块为单元进行2维所述haar小波变换;A0,A1,A2,A3分别为所述2*2像素块的4个像素的像素值;L0,L1,L2和L3分别为所述四个一级子带依次对应的各自的系数;计算方式为:2. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 1 is characterized in that step S2 specifically comprises: performing 2-dimensional Haar wavelet transform on the embedded channel with 2*2 pixel blocks as units; A0, A1, A2, A3 are respectively the pixel values of 4 pixels of the 2*2 pixel blocks; L0, L1, L2 and L3 are respectively the coefficients corresponding to the four primary sub-bands in sequence; the calculation method is: L0=A0+A1+A2+A3;L1=A0+A1-A2-A3;L0=A0+A1+A2+A3; L1=A0+A1-A2-A3; L2=A0-A1+A2-A3;L3=A0-A1-A2+A3。L2=A0-A1+A2-A3; L3=A0-A1-A2+A3. 3.如权利要求1所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S3具体包括:将所述一级高频子带以1*4像素块为单元进行1维所述haar小波变换;所述四个第一二级子带依次为:第一二级低频子带、第一二级垂直方向中高频子带、第一二级水平方向中高频子带和所述第一二级高频子带;B0,B1,B2,B3分别为所述一级高频子带中1*4像素块的4个像素的像素值;L30,L31,L32和L33分别为所述四个第一二级子带依次对应的各自的系数;计算方式为:3. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 1 is characterized in that step S3 specifically comprises: performing 1-dimensional Haar wavelet transform on the first-level high-frequency subband with 1*4 pixel blocks as units; the four first-level and second-level subbands are: the first-level and second-level low-frequency subbands, the first-level and second-level vertical medium-high frequency subbands, the first-level and second-level horizontal medium-high frequency subbands and the first-level and second-level high-frequency subbands; B0, B1, B2, and B3 are respectively the pixel values of the four pixels of the 1*4 pixel block in the first-level high-frequency subband; L30, L31, L32 and L33 are respectively the coefficients corresponding to the four first-level and second-level subbands in sequence; the calculation method is: L30=B0+B1+B2+B3;L31=B0+B1-B2-B3;L30=B0+B1+B2+B3; L31=B0+B1-B2-B3; L32=B0-B1+B2-B3;L33=B0-B1-B2+B3。L32=B0-B1+B2-B3; L33=B0-B1-B2+B3. 4.如权利要求1所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S4具体包括:将所述一级低频子带以1*4像素块为单元进行1维所述haar小波变换;所述四个第二二级子带依次为:所述第二二级低频子带、第二二级垂直方向中高频子带、第二二级水平方向中高频子带和第二二级高频子带;C0,C1,C2,C3分别为所述一级低频子带中1*4像素块的4个像素的像素值;L00,L01,L02,L03分别为所述四个第二二级子带依次对应的各自的系数;计算方式为:4. The YUV domain digital watermark algorithm based on wavelet transform as claimed in claim 1 is characterized in that step S4 specifically comprises: performing 1-dimensional Haar wavelet transform on the primary low-frequency subband with 1*4 pixel blocks as units; the four second-second subbands are: the second-second low-frequency subband, the second-second vertical medium-high frequency subband, the second-second horizontal medium-high frequency subband and the second-second high frequency subband; C0, C1, C2, and C3 are respectively the pixel values of 4 pixels of the 1*4 pixel block in the primary low-frequency subband; L00, L01, L02, and L03 are respectively the coefficients corresponding to the four second-second subbands in sequence; the calculation method is: L00=C0+C1+C2+C3;L01=C0+C1-C2-C3;L00=C0+C1+C2+C3; L01=C0+C1-C2-C3; L02=C0-C1+C2-C3;L03=C0-C1-C2+C3。L02=C0-C1+C2-C3; L03=C0-C1-C2+C3. 5.如权利要求4所述的基于小波变换的YUV域数字水印算法,其特征在于,所述一级低频子带为m行*4n列的像素;所述haar小波变换得到的所述第二二级低频子带为m行*n列的系数矩阵;所述L00代表所述系数矩阵中的任意一个系数;实际计算出的所述低频段像素平均值LL=L00/16。5. The YUV domain digital watermarking algorithm based on wavelet transform as described in claim 4 is characterized in that the first-level low-frequency sub-band is a pixel of m rows*4n columns; the second-level low-frequency sub-band obtained by the Haar wavelet transform is a coefficient matrix of m rows*n columns; the L00 represents any coefficient in the coefficient matrix; the actually calculated average value LL of the low-frequency band pixels is LL=L00/16. 6.如权利要求1所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S5具体包括:6. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 1, characterized in that step S5 specifically comprises: 根据实验或经验获得所述低频段像素平均值从小到大间隔的k+1个典型值,对应的划分出k个区间或段;According to experiments or experience, k+1 typical values of the low-frequency band pixel average value from small to large are obtained, and k intervals or segments are correspondingly divided; 获得所述k+1个典型值一一对应的k+1个Y通道嵌入水印的所述水印强度幅值;Obtaining the watermark intensity amplitudes of k+1 Y channel embedded watermarks corresponding to the k+1 typical values one by one; 获得所述k+1个典型值一一对应的k+1个U通道和V通道嵌入水印的所述水印强度幅值,同一所述典型值对应的所述U通道和所述V通道嵌入水印的所述水印强度幅值相等;同一所述典型值对应的所述Y通道的水印强度幅值小于所述U通道或所述V通道的水印强度幅值。The watermark intensity amplitudes of k+1 U channels and V channels embedded in the watermark corresponding to the k+1 typical values are obtained, the watermark intensity amplitudes of the U channel and the V channel embedded in the watermark corresponding to the same typical value are equal; the watermark intensity amplitude of the Y channel corresponding to the same typical value is smaller than the watermark intensity amplitude of the U channel or the V channel. 7.如权利要求6所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S5中,所述水印强度幅值Z按下面公式计算,7. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 6, characterized in that in step S5, the watermark intensity amplitude Z is calculated according to the following formula: 其中,x0-xk代表k+1个所述典型值;计算所述Y通道时,所述y0-yk代表k+1个所述Y通道的水印强度幅值;计算所述U通道和所述V通道时,所述y0-yk代表k+1个所述U通道和所述V通道的水印强度幅值;n为1至k之间任意一个整数序号;Wherein, x 0 -x k represent k+1 typical values; when calculating the Y channel, y 0 -y k represent k+1 watermark intensity amplitudes of the Y channel; when calculating the U channel and the V channel, y 0 -y k represent k+1 watermark intensity amplitudes of the U channel and the V channel; n is any integer number between 1 and k; x0<计算出的所述低频段像素平均值LL<xk时,根据LL值的大小,利用插值法计算,将LL插入对应的一个所述区间(xn-1,xn);由两点(xn-1,yn-1)和(xn,yn)确定一直线,LL作为所述直线对应的横坐标,计算出所述直线对应LL点的纵坐标即为所述水印强度幅值Z。When x0 <the calculated low-frequency band pixel average value LL< xk , according to the size of the LL value, the interpolation method is used to insert LL into the corresponding interval (xn -1 , xn ); a straight line is determined by two points (xn -1 , yn -1 ) and ( xn , yn ), LL is used as the abscissa corresponding to the straight line, and the ordinate of the point LL corresponding to the straight line is calculated to be the watermark intensity amplitude Z. 8.如权利要求1所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S5中,设定所述被嵌入通道内的像素在嵌入水印后引起的时域内所述像素的像素值最大变化量为Δp,计算频域内对应的水印最大强度值ΔN=Δp*16;计算出所述水印强度大小alpha=Z*ΔN。8. The YUV domain digital watermarking algorithm based on wavelet transform as described in claim 1 is characterized in that in step S5, the maximum change in the pixel value of the pixel in the time domain caused by the embedding of the watermark in the pixel embedded in the channel is set to Δp, and the corresponding watermark maximum intensity value ΔN=Δp*16 in the frequency domain is calculated; and the watermark intensity alpha=Z*ΔN is calculated. 9.如权利要求3所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S6,具体包括:9. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 3, characterized in that step S6 specifically comprises: 将所述第一二级高频子带按2*2分块,设置水印每比特Bit对应的水印嵌入模式为P,P包括元素是-1/1组成的2*2矩阵,且所有元素之和为0;将水印逐比特嵌入所述第一二级高频子带中的每个块,得到所述载水印二级高频子带;L33为所述第一二级高频子带的系数,L33’为所述载水印二级高频子带的系数;The first secondary high frequency sub-band is divided into 2*2 blocks, and the watermark embedding mode corresponding to each bit of the watermark is set to P, where P includes a 2*2 matrix composed of -1/1 elements, and the sum of all elements is 0; the watermark is embedded bit by bit in each block of the first secondary high frequency sub-band to obtain the watermarked secondary high frequency sub-band; L33 is the coefficient of the first secondary high frequency sub-band, and L33' is the coefficient of the watermarked secondary high frequency sub-band; L33’=L33+P*alpha(如果Bit=1);L33' = L33 + P*alpha (if Bit = 1); L33’=L33-P*alpha(如果Bit=0)。L33’=L33-P*alpha (if Bit=0). 10.如权利要求9所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S7,具体包括:10. The YUV domain digital watermarking algorithm based on wavelet transform as claimed in claim 9, characterized in that step S7 specifically comprises: S71、进行1维小波逆变换:将所述第一二级低频子带、所述第一二级垂直方向中高频子带、所述第一二级水平方向中高频子带和所述载水印二级高频子带进行1维haar小波逆变换,得到逆变换一级高频子带;S71, performing a one-dimensional inverse wavelet transform: performing a one-dimensional Haar wavelet inverse transform on the first secondary low-frequency sub-band, the first secondary vertical medium-high frequency sub-band, the first secondary horizontal medium-high frequency sub-band and the watermarked secondary high frequency sub-band to obtain an inverse transformed primary high frequency sub-band; B0’,B1’,B2’,B3’分别为所述逆变换一级高频子带中1*4像素块的4个像素的像素值;B0’, B1’, B2’, B3’ are respectively the pixel values of 4 pixels of the 1*4 pixel block in the inverse transformed first-level high frequency sub-band; B0’=L30+L31+L32+L33’;B1’=L30+L31-L32-L33’;B0’=L30+L31+L32+L33’; B1’=L30+L31-L32-L33’; B2’=L30-L31+L32-L33’;B3’=L30-L31-L32+L33’。B2’=L30-L31+L32-L33’; B3’=L30-L31-L32+L33’. 11.如权利要求10所述的基于小波变换的YUV域数字水印算法,其特征在于,步骤S7,具体还包括:11. The YUV domain digital watermarking algorithm based on wavelet transform according to claim 10, characterized in that step S7 specifically further comprises: S72、进行2维小波逆变换:对所述一级低频子带、所述一级垂直方向中高频子带、所述一级水平方向中高频子带和所述逆变换一级高频子带进行2维haar小波逆变换得到所述载水印通道;S72, performing a 2D inverse wavelet transform: performing a 2D inverse Haar wavelet transform on the primary low-frequency sub-band, the primary vertical medium-high frequency sub-band, the primary horizontal medium-high frequency sub-band and the inverse-transformed primary high frequency sub-band to obtain the watermarked channel; A0’,A1’,A2’,A3’分别为所述载水印通道中2*2像素块的4个像素的像素值;L3’为所述逆变换一级高频子带的系数;L0为所述一级低频子带的系数,L1为所述一级垂直方向中高频子带的系数;L2为所述一级水平方向中高频子带的系数;A0', A1', A2', A3' are the pixel values of the 4 pixels of the 2*2 pixel block in the watermark channel respectively; L3' is the coefficient of the inverse transform first-level high-frequency sub-band; L0 is the coefficient of the first-level low-frequency sub-band, L1 is the coefficient of the first-level vertical high-frequency sub-band; L2 is the coefficient of the first-level horizontal high-frequency sub-band; A0’=L0+L1+L2+L3';A1’=L0+L1-L2-L3';A0’=L0+L1+L2+L3’; A1’=L0+L1-L2-L3’; A2’=L0-L1+L2-L3';A3’=L0-L1-L2+L3'。A2'=L0-L1+L2-L3'; A3'=L0-L1-L2+L3'. 12.如权利要求9所述的基于小波变换的YUV域数字水印算法,其特征在于,还包括:水印提取;所述水印提取包括:12. The YUV domain digital watermark algorithm based on wavelet transform as claimed in claim 9, characterized in that it also includes: watermark extraction; the watermark extraction includes: 分离所述载水印图像的YUV通道得到所述载水印通道;所述载水印通道为载水印Y通道、载水印U通道和载水印V通道中的任意一个通道;Separating the YUV channel of the watermarked image to obtain the watermarked channel; the watermarked channel is any one of the watermarked Y channel, the watermarked U channel and the watermarked V channel; 进行一级小波变换,将所述载水印通道以2*2像素块为单元进行2维haar小波变换得到4个一级提取子带;所述4个一级提取子带包括:一级提取高频子带;Performing a first-level wavelet transform, performing a 2-dimensional Haar wavelet transform on the watermark channel with 2*2 pixel blocks as units to obtain four first-level extraction sub-bands; the four first-level extraction sub-bands include: a first-level extraction high-frequency sub-band; 进行二级小波变换,将所述一级提取高频子带以1*4像素块为单元进行1维haar小波变换得到4个二级提取子带;所述4个二级提取子带包括:Perform a secondary wavelet transform, and perform a 1-dimensional Haar wavelet transform on the primary extracted high-frequency subband in units of 1*4 pixel blocks to obtain four secondary extracted subbands; the four secondary extracted subbands include: 二级提取高频子带;Second level extraction of high frequency sub-bands; 将所述二级提取高频子带中的系数分块,得到系数矩阵块;按顺序计算并提取每个所述系数矩阵块的水印比特值,将所有提取的所述水印比特值Bit拼接得到最终水印;每个所述系数矩阵块中,如果所述系数矩阵块与所述水印嵌入模式P的矩阵点乘运算的结果>0,则Bit=1;如果所述系数矩阵块与所述水印嵌入模式P的矩阵点乘运算的结果<0,则Bit=0。The coefficients in the secondary extracted high-frequency sub-band are divided into blocks to obtain coefficient matrix blocks; the watermark bit value of each coefficient matrix block is calculated and extracted in sequence, and all the extracted watermark bit values Bit are concatenated to obtain the final watermark; in each coefficient matrix block, if the result of the matrix dot multiplication operation between the coefficient matrix block and the watermark embedding mode P is > 0, then Bit = 1; if the result of the matrix dot multiplication operation between the coefficient matrix block and the watermark embedding mode P is < 0, then Bit = 0.
CN202411477025.0A 2024-10-22 Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform Active CN119515653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411477025.0A CN119515653B (en) 2024-10-22 Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411477025.0A CN119515653B (en) 2024-10-22 Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform

Publications (2)

Publication Number Publication Date
CN119515653A true CN119515653A (en) 2025-02-25
CN119515653B CN119515653B (en) 2025-10-10

Family

ID=

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040208339A1 (en) * 2003-01-15 2004-10-21 Yasushi Abe Image processing apparatus, program, and storage medium that can selectively vary embedding specification of digital watermark data
US20070140524A1 (en) * 2005-12-21 2007-06-21 Sanjeev Kumar Image Watermarking Based on Sequency and Wavelet Transforms
CN102496135A (en) * 2011-12-06 2012-06-13 银江股份有限公司 Deadweight tonnage (DWT) domain-based digital watermark method and system
CN103413266A (en) * 2013-07-02 2013-11-27 济南大学 Blind watermark method in wavelet domain
CN109447889A (en) * 2018-11-22 2019-03-08 央视国际网络无锡有限公司 A method of realizing concealed video digital watermark
CN111445374A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Watermark template generation method and device for embedding hidden digital watermark into image
CN112907435A (en) * 2021-04-09 2021-06-04 辽宁工程技术大学 High-robustness holographic blind watermarking algorithm based on improved Boqi coding and data interval mapping
CN115695825A (en) * 2022-11-03 2023-02-03 豪威科技(武汉)有限公司 Hidden watermark writing method and readable storage medium
CN117522666A (en) * 2023-11-20 2024-02-06 深圳市证通电子股份有限公司 Method and device for embedding and extracting invisible digital watermark in image
CN117670637A (en) * 2023-11-30 2024-03-08 华南理工大学 Image blind watermark embedding and complete extraction method based on strong robust multi-domain transformation

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040208339A1 (en) * 2003-01-15 2004-10-21 Yasushi Abe Image processing apparatus, program, and storage medium that can selectively vary embedding specification of digital watermark data
US20070140524A1 (en) * 2005-12-21 2007-06-21 Sanjeev Kumar Image Watermarking Based on Sequency and Wavelet Transforms
CN102496135A (en) * 2011-12-06 2012-06-13 银江股份有限公司 Deadweight tonnage (DWT) domain-based digital watermark method and system
CN103413266A (en) * 2013-07-02 2013-11-27 济南大学 Blind watermark method in wavelet domain
CN109447889A (en) * 2018-11-22 2019-03-08 央视国际网络无锡有限公司 A method of realizing concealed video digital watermark
CN111445374A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Watermark template generation method and device for embedding hidden digital watermark into image
CN112907435A (en) * 2021-04-09 2021-06-04 辽宁工程技术大学 High-robustness holographic blind watermarking algorithm based on improved Boqi coding and data interval mapping
CN115695825A (en) * 2022-11-03 2023-02-03 豪威科技(武汉)有限公司 Hidden watermark writing method and readable storage medium
CN117522666A (en) * 2023-11-20 2024-02-06 深圳市证通电子股份有限公司 Method and device for embedding and extracting invisible digital watermark in image
CN117670637A (en) * 2023-11-30 2024-03-08 华南理工大学 Image blind watermark embedding and complete extraction method based on strong robust multi-domain transformation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZORAN S 等: "A Secured Digital Video Watermarking in Chrominance Channel", 2018 23RD INTERNATIONAL SCIENTIFIC-PROFESSIONAL CONFERENCE ON INFORMATION TECHNOLOGY (IT), 31 December 2018 (2018-12-31), pages 1 - 4 *
苗鑫梅 等: "可携带图像特性信息的双盲水印设计与实现", 计算机工程与设计, vol. 40, no. 5, 31 May 2019 (2019-05-31), pages 1225 - 1230 *

Similar Documents

Publication Publication Date Title
US10282801B2 (en) Full-color visibility model using CSF which varies spatially with local luminance
US9401001B2 (en) Full-color visibility model using CSF which varies spatially with local luminance
Chou et al. A perceptually tuned watermarking scheme for color images
CN100461864C (en) Objective Quality Evaluation Method of Multimedia Video Communication Based on Digital Watermark
CN101621708B (en) Calculation Method of Perceivable Distortion Degree of Color Image Based on DCT Domain
CN107888925B (en) A kind of embedding grammar and detection method of digital video hiding information
CN108416727B (en) Color image full-blind robust digital watermarking method based on self-embedding technology
CN110189243B (en) Color image robust watermarking method based on tensor singular value decomposition
Advith et al. Novel digital image watermarking using DWT-DFT-SVD in YCbCr color space
CN106570813A (en) Holographic digital watermark embedding method, extraction method and device
Kishore A novel and efficient blind image watermarking in transform domain
Kunhu et al. Index mapping based hybrid DWT-DCT watermarking technique for copyright protection of videos files
CN110798749B (en) Robust video watermarking method based on tensor singular value decomposition
EP2154649A1 (en) An adaptive watermarking system and method
Sharma et al. Video watermarking scheme based on DWT, SVD, rail fence for quality loss of data
Singh et al. A secured robust watermarking scheme based on majority voting concept for rightful ownership assertion
Medda et al. Color image quality index based on the UIQI
CN119515653B (en) Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform
Sharma et al. Robust technique for steganography on Red component using 3-DWT-DCT transform
CN119515653A (en) Digital Watermarking Algorithm in YUV Domain Based on Wavelet Transform
Bhaskar et al. DCT based watermark embedding into mid frequency of DCT coefficients using luminance component
Drebuzhan et al. The Steganographic Method of Introducing Additional Information, Resistant to Transcoding and Conversion
Kaur et al. Comparative analyses of YCbCr color space and CIELab color space based on DWT and SVD
Liby et al. Data hiding scheme for video watermarking using horizontal and vertical coefficients of single level discrete wavelet transform method
Vahedi et al. On optimal color coordinate selection for wavelet-based color image watermarking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant