METHOD AND APPARATUS FOR INSERTING AND EXTRACTING
WATERMARK
FIELD OF THE INVENTION The present invention relates to a method for embedding and detecting a self-reference watermark by using the extended M-ary modulation method based on QOS and a finite field sequence resistant to desynchronization attacks, in a watermarking method for protecting a copyright. BACKGROUND OF THE INVENTION Watermarking is a technology for protecting a copyright by embedding an imperceptible signal in an image and afterward detecting an embedded watermark from the image, thereby offering a viable alternative for the protection of copyright. Conventional watermarks have been embedded with a type of perceptible logo, but recently other methods for embedding an imperceptible watermark are being studied to overcome a problem caused by watermark deletion and qualitative degradation of an image.
Likewise, when a third party claims a copyright on an image or uses the image illegally, the original copyright owner can settle a dispute by embedding the copyrighter's imperceptible watermark and then detecting the embedded watermark. Also, when a buyer illegally circulates this image in a market, this buyer who is illegally
circulating this image can be discovered by detecting the watermark embedded in the circulated image if the original copyrighter sold the image with the watermark embedded. That is, the watermark can be used for protection of the copyright of digital images and prevention of copying data. Because the traditional watermarking method does not use original data, it is impossible for the watermark to be detected with regard to desynchronization attacks, for example, rotation, image scaling, and image aspect ratio change.
An enhanced method to overcome this problem has already been suggested, however it still has defects such as low channel capacity and high computational complexity.
DETAILED DESCRIPTION OF THE PRESENT INVENTION
The present invention is proposed to overcome the aforementioned problems of the prior art. The object of the present invention is to provide a method and a device for protecting a copyright of digital contents by applying a robust watermarking method.
Also, another object of the present invention is to provide the robust watermarking method that is resilient to desynchronization attacks and overcomes the problem caused by the conventional watermarking method having a difference between the original data and the watermark-embedded image. Also, another object of the present invention is to provide a watermarking
method for resolving problems of a self-reference watermarking method such as low channel capacity and high calculation amount.
According to the preferred embodiment of the present invention for achieving these objects, the method and the device for embedding a watermark to an image is characterized as follows: separating Y component from the image; determining an intensity of embedding the watermark by using the separated Y component; coding the message by using a message and copyrighter key to generate a watermark sequence; and embedding the watermark to the Y component corresponding to an intensity of embedding of watermark and the watermark sequence. Herein, when the image consists of RGB components, the image is transformed to YUV component by way of a mathematical equation described as follows: Y=0.229 x R+0.587xG+0.114xB U=0.492x(B-Y) N=0.877x(R-Y) Also, the watermark-embedded Yw component and the UV components of the image are transformed to RGB components by way of a mathematical equation described as follows:
B=Yw+2.032xU G= Yw-0.395xU-0.581xN R= Yw+1.140xN
Also, a step for determining the intensity of embedding the watermark by using the separated Y component further comprises determining an intensity of embedding the entire watermark by the overall complexity of the image and determining an intensity of embedding the watermark regionally. In addition, a step of coding a message by using a message and copyrighter key to generate a watermark sequence further comprises: establishing a finite field sequence and the message about synchronization information content as a two-dimensional ("2-D") partitioning set; applying the extended M-ary modulation technique during the use of QOS for coding in order to embed the message in the 2-D partitioning set; coding the copyrighter key in order to embed a synchronization recovery sequence; and allocating randomly the watermark in the 2-D partitioning set by using the coded copyrighter key.
The synchronization recovery sequence is (M-H)xR, that is a sequence of ± 1 and (t) to satisfy the mathematical equation described as follows: E[α(t)]=0
E[ (t)2]-(E[α(t)])2=l wherein, E[] is an expectation operator. According to the preferred embodiment of the present invention, a method for detecting a watermark in the image is characterized by comprising: separating Y component from the image; estimating a watermark signal from the Y component;
estimating an affine transform parameter from the watermark signal by using an autocorrelation function; recovering the Y component by using the estimated affine transform parameter; checking a watermark in the Y component by using the autocorrelation function; and decoding a message from the watermark signal by using QOS.
Herein, the method further comprises correcting errors when the decoded message has errors.
When the image consists of RGB components, the image is transformed to YUV components by a mathematical equation described as follows: Y=0.299xR+0.587xG+0.114xB
U=0.492x(B-Y) N=0.877x(R-Y). The autocorrelation function comprises: applying a hard-decision of the estimated watermark signal; calculating the autocorrelation function after the hard-decision; finding periodic peaks in the autocorrelation function; and estimating the affine transform parameter by using the periodic peaks.
BRIEF DESCRIPTION OF THE DRAWINGS
Fig. 1 is a block diagram of a device for self-reference watermarking by using the extended M-ary modulation method based on finite field sequences and QOS
according to the preferred embodiment of the present invention.
Fig. 2 is a flowchart showing that a watermark embedding unit embeds a watermark during a method for self-reference watermarking using the extended M-ary modulation method based on finite field sequences and QOS according to the preferred embodiment of the present invention.
Fig. 3 is a flowchart showing a method for determining watermark strength according to the preferred embodiment of the present invention.
Fig.4 is a flowchart showing a process for coding a message to be embedded by a copyrighter as the copyrighter's secret key according to the preferred embodiment of the present invention.
Fig. 5 is a flowchart showing that the watermark-detecting unit detects the watermark during a self-reference watermarking method by using the extended M-ary modulation method based on QOS and finite field sequences according to the preferred embodiment of the present invention.
EMBODIMENT
The method and the device for self-reference watermarking using the extended
M-ary modulation method based on finite field sequences and QOS ("Quasi-Orthogonal
Sequences") according to the preferred embodiment of the present invention will be described in further detail by way of example with reference to the accompanying
drawings.
Fig. 1 is a block diagram of a device for self-reference watermarking using the extended M-ary modulation method based on QOS and finite field sequences according to the preferred embodiment of the present invention. As shown in Fig. 1, the device consists of the watermark embedding unit 1 and the watermark detecting unit 3. The watermark embedding unit 1 functions by embedding a watermark in an image and the watermark detecting unit 3 functions by detecting a watermark from the image.
The watermark embedding unit 1 and the watermark detecting unit 3 can be included in one device, but they are constituted as individual devices.
Fig. 2 is a flowchart showing that the watermark embedding unit embeds a watermark during a method for self-reference watermarking using the extended M-ary modulation method based on QOS and finite field sequences according to the preferred embodiment of the present invention. As shown in Fig. 2, the watermark embedding unit transforms RGB components of image to YUN components at step 10.
By way of definition, RGB is a way of representing color to be defined by red, green, and blue. YUV is a way of representing color to be defined that the luminance is expressed as Y component and the chrominance is expressed as U and V components, considering the fact that a person's eye is sensitive to luminosity.
Use of YUV color image has a possible advantage upon considering the property of compression when embedding a watermark. The sense of sight in a human is more sensitive to luminance Y than chrominance UV when seeing an image.
The mathematical equation 1 describes that the watermark embedding unit transforms RGB components to YUV components as follows: Equation 1
Y=0.229 x R+0.587xG+0.114xB U=0.492x(B-Y) V=0.877x(R-Y) Thereafter, a watermark embedding unit extracts only Y component at step 20.
Based upon the reason that if a watermark is embedded to Y component, a watermark can be embedded without image format, and the image need not depend on whether it is gray-level picture or a color picture.
The watermark embedding unit determines the intensity of embedding a watermark using the separated Y component, considering the entire properties of image and regional properties of image at step 30. In particular, this will be described as shown in Fig. 3.
Fig. 3 is a flow chart showing a method for determining the intensity for embedding a watermark according to the preferred embodiment of the present invention. As shown in Fig 3, the watermark embedding unit is divided into two steps and
determines the intensity for embedding a watermark (watermark strength).
First, the watermark embedding unit determines a global watermark strength based on the overall complexity of image at step 310.
The watermark embedding unit partitions the image to a texture region, a flat region, and an edge region at step 320. Also, the watermark embedding unit partitions the edge region to the width edge, the length edge, 45' diagonal edge, and 135' diagonal edge.
Thereafter, the watermark embedding unit determines watermark strength at each region at step 330. According to the preferred embodiment of the present invention, the watermark embedding unit cannot embed a watermark in a simple region but rather enhances watermark strength in a complex region.
Referring again to Fig. 2, the watermark embedding unit encodes the message to be embedded by the copyrighter as the copyrighter's secret key if watermark strength is determined at step 60. In particular, it will be described as shown in Fig.4.
Fig. 4 is a flowchart showing a process for encoding a message to be embedded by the copyrighter as the copyrighter's secret key according to the preferred embodiment of the present invention. As shown in Fig. 4, at step 400, the watermark embedding unit establishes a 2-D set partition of the message to be coded and the copyrighter key by using finite field sequences. For robust resistance to cropping attack, the watermark is
embedded as a unit block which is smaller than the image.
For example, the watermark embedding unit establishes a 64x64 block as unit block, and the unit blocks can be partitioned into 16 sets of cardinality 256. Herein, the watermark embedding unit partitions the unit block as a set by applying a finite field sequence.
According to the preferred embodiment of the present invention, a finite field sequence is best described in terms of trace function of the finite field.
Given a field GF(p) and its extended field GF(pn) where p is a power of some prime number, for all α£ΞGF(pn), the trace function is defined with respect to GF(p) as Equation 2.
^(α )=α +α i?+α + - • • +α ^
Since the trace function has properties of ontoness and linearity, a finite field sequence from GF(pn) to GF(p) partitions a set of cardinality pa into p sets of cardinality pn . Using this property, paxp blocks, where a + b = n, can be partitioned into/? sets of cardinality pn .
According to the preferred embodiment of the present invention, a method that the watermark embedding unit partitions the unit block using a finite field sequence into a set is applied as follows:
The trace function from GF(212) to GF(24) partitions a block of the image into 16 cells of size 256 as follows:
(1) Let α£GF(212) be a primitive element, and let c be an integer satisfying gcd(c, 2 -1)=1. The 2-D 64x64 slots represented as (x,y), where 0<x,y<64, are converted into 1-D slots of size 64x64 represented as t=64xx-ty, where 0<t<64x64.
(2) Value Tr(αct+d) is allocated to each slot, where 0≤t<64x64 and d is an arbitrary integer which can be determined by the watermark embedding unit. (3) Slots of the same allocated value are grouped as a cell.
The parameter in the process can be used as the copyrighter's secret key, having space of (212-l)xφ (212-1), where φ(.) is the Euler phi function. A finite field sequence from GF(qn)/0 to GF(q) as described in the above definition is called the m-sequence, where q is a prime. Referring again to Fig. 4, the watermark embedding unit encodes the message to properly embed the copyrighter's message in a block by 2-D set partition at step 410.
The procedure that the watermark embedding unit encodes the message is described as follows. The watermark embedding unit uses the extended M-ary modulation, which is enhanced by using QOS, in order to embed L bits of message. Generally, M-ary modulation uses a family of sequences that are mutually
orthogonal to each other. An extended m-sequence and a GMW (Gordon, Mills and
Welch) sequence are possible alternatives. When the extended m-sequence is properly
substituted, it exactly coincides with the Walsh sequence. In a general M-ary method, if a
frequency is T, the maximum Iog2T+l bit can be embedded in biorthogonal modulation.
Thus, to eliminate the limitation of this embedding capacity, the watermark embedding
unit applies QOS. When a frequency is 2E(E is natural number), a binary QOS family T
is satisfied with the below conditions.
i) Walsh sequence is subset of T .
n) Correlation of two functions is Rij, when i≠ , Equation 3 is satisfied.
Equation 3
E
I Ri} |≤ 22 (when E is even number)
■E+l
I R.j |≤ 2 2 (when E is odd number)
iii) Given f(t) of T and one sequence w(t) of Walsh sequence, any natural
number J=2](2≤ j ≤E) and r(0≤r≤2E"J-l) satisfy Equation 4.
Equation 4
rJ+J-l
V _1/C) + »'( |≤ 22 (wnen J is even number)
rJ+J-l +ι
J _ι w+«< |≤ 2 2 (when J is odd number) r-r
QOS can be made by well-known Gold sequences, Kasami sequences, or binary
Kerdock codes. When a period is 25, 26, 27, 28, the QOS set is llx 32, 9x 64, 23x 128,
21x 256 respectively. For convenience, an exponent of 2 was used among this set. For o example, when a period is 2 , then 16x 256 set is used. Herein, the watermark embedding
unit can embed information of 12 bit per one period in orthogonal modulation and 13 bit
in biorthogonal modulation.
The watermark embedding unit can embed — bits into each of given H cells
using QOS. Such allocation strategy is described as the following example.
(1) Assuming that — bits are embedded in a cell, Sι(t) is a finite field
sequence whose period is R, cardinality of the set of S,(t) sequences
is at least more than 2H . (2) A certain sequence is allocated as message.
The remaining cells are applied by the same method as the above method.
Also, the watermark embedding unit encodes as the copyrighter's key for
embedding a recovery signal to attain synchronization at step 420.
When partitioning a unit block of image whose size is NxN into M cells whose
size is R, M-H cells are constituted with synchronization recovery sequence, where H
cells are constituted with the copyrighter's message.
A procedure that the watermark embedding unit encodes the synchronization
recovery sequence is described below.
Assume that α(t) is a sequence set that has (M-H)xR period, is constituted with
±1, and satisfies Equation 5 below.
Equation 5
E[ (t)]=0 £[ (02]- (£[α( ]) 2=l where, E[] is an expectation operator. Also, the watermark embedding unit performs a randomization by using a secret key when embedding a watermark into the unit block at step 430 to ensure that only a copyrighter can recognize watermark for absolute confidentiality.
Referring again to Fig. 2, the watermark embedding unit may embed the watermark in Y component after generating the watermark sequence and determining the watermark strength through procedures as shown in Figs. 3 and 4 at step 110.
Assuming that the value of the luminance component of image in a unit block of each NxN refers to p(x,y)7 this can be represented as Equation 6.
Equation 6
p χ,y) = p(χ,y) +a(χ,y)χ w(χ,y) where, 0 ≤x,y <N, α(x,y) is a perceptual weighting factor, where HVS (Human
Visual System) is applied, of the watermark generated by a flowchart shown in Fig. 3, w(x,y) is an encoded watermark value.
Finally, the watermark embedding unit transforms the watermark-embedded Yw component and the UV components of original image into RGB components at step 130. This step can be represented as Equation 7.
Equation 7
B=YW + 2.032 xU
G=TW - 0.395 x U - 0.581 x V
R=Yw + U40xV As described above, the method for detecting a watermark in the watermark-embedded image by the watermark embedding unit comprises three steps for estimating the watermark, synchronization recovery, and watermark decoding. These points will be described in further detail by referring to Fig.5.
Fig. 5 is a flowchart showing that the watermark detecting unit detects the watermark during a self-reference watermarking method by using the extended M-ary modulation method based on QOS and finite field sequences according to the preferred embodiment of the present invention.
As shown in Fig. 5, the watermark detecting unit transforms RGB color space into YUV color space during a decision making step at step 500, and extracts Y component at step 510. Since steps 500 and 510 are the same as the steps when the watermark embedding unit embeds the watermark, that description can be omitted.
Thereafter, the watermark detecting unit estimates the watermark signal (step 520). Specifically, the watermark detecting unit referring to a blind detector can detect the watermark without using an original image. Accordingly, the watermark detecting unit recognizes power of image as the
main noise source. Upon rating this noise compared to power of watermark, the main noise source may be hundreds of times as high as the power of watermark at maximum. In order to reduce the power of image, the watermark detecting unit performs a preprocessing called the whitening process. The preprocessing can improve performance of a self-reference watermarking method against desynchronization attacks.
The watermark detecting unit can estimate affine parameter by applying the autocorrelation method in order to recover a possible geometrical transformation (affine transform attack) using the estimated watermark signal (step 540). Given the estimated watermark sequence q(x,y the watermark detecting unit can calculate the autocorrelation function. However, since the estimated watermark signal uses real numbers and the calculation of the autocorrelation function requires a multiplication operation, its complexity is quite high. For example, it takes about 2 minutes to calculate the autocorrelation function of a 256x256. image on an 800MHz Pentium-Ill PC with 128MB main memory.
However, according to the present invention, since the original watermark signal is a sequence of ±1 when the watermark embedding unit embeds the watermark, it is necessary to calculate the autocorrelation function of 2D sequence of ±1 when the watermark detecting unit detects the watermark. Thus, the present invention reduces the complexity of integer multiplication operation to bit-wise operation when the watermark
detecting unit detects the watermark.
However, for the watermark detecting unit to perform the aforementioned procedure, the following assumptions are required.
(1) Let a and b be vectors of length N, whose components take on 1 or -1. Let qX and bχ_ be vectors of length N transformed from a and b by the following mapping:
Equation 8 r :{-tl}→ {0,l}
T(ι) = (1-0/2 where the mapping is applied tuple-wise. (2) Then the correlation between the two vectors α, b is given as:
Equation 9 correlation = N-2xdH (dJX) where d H (α_',b denotes the Hamming distance between the two vectors X and
Pi- The aforementioned assumptions can be proven as follows:
The correlational value between two vectors whose value is either ±1 is Equation 10
# of coincidental positions - # of different positions which is calculated tuple-wise. Let m be the number of "mismatch" positions between the two vectors a and b. Then the correlation is (N - m) - m = N - 2 D . .
When the two vectors are transformed by the above mapping, the number of
"mismatch" positions is identical to the Hamming distance. Thus, the correlation is (N -
m) - m = N - 2D m. If two vectors use either 0 or 1, the Hamming distance can be
calculated by exclusive-OR operation, namely, bit-wise operation. Thus, since the
autocorrelation is calculated by bit-wise operation and integer addition, the time required
to calculate the same autocorrelation function can be reduced about 1/13 of the
real-valued case.
Since the watermark embedding unit partitions an image and embeds a
watermark signal periodically in the process of embedding the watermark into the image,
the autocorrelation function of the watermark signal that the watermark detecting unit
detects shall have peak positions periodically. The watermark detecting unit can estimate
affine parameter by using the periodic peaks that is different from conventional
watermarking method additionally by using template signal.
Generally, the affine parameter ignoring the horizontal and vertical translation
can be described as Equation 11 in a matrix form.
The reason for ignoring the horizontal and vertical translation of image is
because the present invention can estimate the horizontal and vertical translation in the
synchronization recovery process.
The watermark detecting unit estimates the affine parameter by applying the autocorrelation function method at step 530.
More particularly, the watermark detecting unit performs the following four steps by using the watermark signal estimated at step 530. (1) Apply hard-decision to the estimated watermark signal. In this case, the hard-decision threshold value is 0.
(2) Calculate the autocorrelation function.
(3) Find periodic peaks.
(4) Estimate the affine parameter by using periodic peaks. In practice, it is not easy to find those peaks, mainly due to attacks and interpolation errors, etc., and finding both synchronization information and affine parameters using only the autocorrelation function may decrease accuracy.
Thus, according to the preferred embodiment of the present invention, the watermark detecting unit performs the process for finding the periodic peaks and the process for estimating the affine parameter separately.
Also, the watermark detecting unit uses various schemes in order to enhance the accuracy of estimating the affine parameter. For example, the watermark detecting unit can use the properties of affine parameter itself. Namely, since peaks always exist on a line, the watermark detecting unit can exclude incorrect peaks. Furthermore, when the watermarked image is large enough, the watermark detecting unit can improve the
performance by averaging the parameters.
When desynchronization attacks are applied to the watermark embedded image, the same desynchronization attacks are applied to the embedded watermarks, too. Since the watermark signals are embedded periodically, the watermark detecting unit can obtain peaks by calculating the autocorrelation function.
Thereafter, the watermark detecting unit inverts the Y component by use of the affine parameter at step 540. Also, the watermark detecting unit can estimate flipping, mirroring or rotation of 90xn after the procedure of recovering the Y component.
Also, the watermark detecting unit performs synchronization recovery against the cropping attack at step 550. Assuming that the watermarked image is cropped and not transformed geometrically, the watermark detecting unit can detect the watermark signal theoretically. However, if the image is cropped by N'. D N', which size is available to recover, the watermark detecting unit can detect the watermark signal not only when a cropping attack occurs but also when geometric attacks occur. In order to detect the watermark signal from the cropped image, there must be an image whose size is at least larger than NxN.
The image recovery of the watermark detecting unit for the image translation using a synchronization signal is as follows. It can be assumed that there is no geometric attack in the image when the watermark detecting unit recovers the image by using affine parameter. As the synchronization recovery sequence is embedded together with the
watermark signal into each block, the watermark detecting unit can estimate the
translation parameter by using the synchronization recovery sequence. Accordingly,
calculation complexity can be reduced by aforementioned assumptions.
On the other hand, the existence of a watermark as well as detection of affine
parameter can be determined by the detected synchronization recovery sequence. Namely,
the synchronization recovery sequence may be used as a threshold of the function for
measuring the probability of existence of a watermark in association with the false alarm
rate.
For example, the false alarm rate can be calculated as follows assuming that the
threshold is set to 256 out of 1024 when the correlation is calculated using the
aforementioned assumption. Then its Hamming distance is 384. Assuming that the
watermarks estimated by hard-decision follow the binomial distribution, the false alarm
rate is calculated using the Stirling formula as follows:
Equation 12
The watermark detecting unit detects the watermark from the image recovered
through the aforementioned procedure at step 550, and additionally generates the
copyrighter's key at step 560. Then the watermark detecting unit determines that a
correlation exists between the copyrighter's key and the watermark of the recovered
image at step 570. If the correlation is lower than the specific threshold, the watermark
detecting unit terminates the procedure for detecting watermark at step 580.
If the correlation is higher than the specific threshold, the watermark detecting unit decodes the message at step 590. According to the preferred embodiment of the present invention, the block-wise watermark folding scheme may be used in order to improve the performance of watermark detecting unit.
When the folding scheme is applied to the watermarked image, the noise power of the image tends to be reduced because the noise distribution is assumed to have a zero mean. However, the power of watermark sequence is not reduced much because the watermark is embedded periodically. The watermark detecting unit uses the extended M-ary modulation method based on QOS to decode the message. The calculation of the correlation by applying the extended M-ary modulation method based on QOS to the watermarked image is as follows:
Equation 13
where w
t(i) is the estimated watermark sequence in the cell / and m,(i) is the sequence having index ;
". Both sequences are of length R. The watermark detecting unit chooses the maximum correlated sequence as the embedded sequence and reads the information according to the embedded sequence.
Then, the watermark detecting unit determines whether or not error occur in the watermark at step 600. If some error occur, the watermark detecting unit corrects the error of decoded watermark by using ECC (Error Correcting Codes) at step 610. In this correction, the present invention uses FEC (Forward Error Correction) to improve the performance of the watermark detecting unit. Assuming that some errors occur in the decoded message, the watermark detecting unit chooses another sequence different from the embedded sequence. Thus, the correlation of embedded sequence does not become the maximum value. However, the sequence chosen by the watermark detecting unit still has a relatively high correlation. Thus, the watermark detecting unit can improve its performance by exploiting this property. However, in this example, the watermark sequence to be embedded into the image must be encoded in association with ECC. Although there are many coding techniques, CRC (cyclic redundancy check) codes have high error detection capability and MDS (maximum distance separable) codes have high error correction capability. After correction, the watermark detecting unit determines again whether or not any error remains at step 620. If an error still exists, the watermark detecting unit terminates the procedure for detecting the watermark without finishing the watermark detection at step 630.
If no error exists at step 600 and step 620, the watermark detecting unit terminates the procedure for detecting the watermark by finishing the watermark
detection at step 640.
Since the terminology used in the present invention is defined in association with the functions of the present invention so that various terms may be interchanged by those who are skilled in the art or practice of the corresponding technical field, the meanings of each definition must be interpreted in association with the overall specification of the present invention.
Also, since the present invention has been described by referring to the preferred embodiments so that those who are skilled in the art can easily modify the present invention when considering the technical difficulty, the aforementioned embodiments and their modifications will not depart from the spirit and scope of the present invention.
Industrial applicability
As described above, since the watermark is embedded after separating Y component from an image and determining watermark strength (global watermark strength, local watermark strength) so that the watermark embedded by the present invention is resilient to conventional image processing, cropping attack and desynchronization attacks, the present invention can provide for enhanced copyright protection. Also, the present invention solves the problem of conventional watermark
algorithms that require the original image to detect the embedded watermark.
Also, since the present invention has the same resilience as the method that does not use the copyrighter's key, it can be applied to a public watermark method.