Summary of the invention
The objective of the invention is to propose a kind of sane stealthy visual blind Detecting water mark method that can resist general signal Processing such as JPEG compression and geometric transformation simultaneously, and the quantity of information of hiding (quiet lotus) is big (can reach more than 200 bits), and the invisibility of watermark is better.
The method of calibration of the inventive method image geometry and protection digital image, at first the information watermark is embedded in the visual DWT territory with a training sequence through band spectrum modulation with after interweaving, again a matching template is embedded into visual DFT territory, be embedded in the heavy synchronous detection of the information watermark in the visual DWT territory after realizing band spectrum modulation and interweave by matching template that is embedded in visual DFT territory and the training sequence that is embedded in visual DWT territory at last, specific practice is: 1) meaningful information b to be embedded (L bits) is at first carried out the spread spectrum coding modulation with a pseudo-random binary PN sequence that is produced by key, can obtain scale-of-two watermark data W to be embedded like this, and then interweave; To adopt the method that quantizes modulation directly to be embedded in the LL that visual DWT conversion obtains by the training sequence T that the pseudo-random code that key produces is formed
3In the central row of subband and central series sub-band coefficients or other sub-band coefficients, and the method that adopts quantification to modulate in all the other sub-band coefficients embeds the scale-of-two watermark data W after interweaving; By 2-D IDWT obtain embedding the watermark of DWT territory visual f ' (x, y); 2) (x y) carries out the DFT conversion, and the method that we adopt addition to embed in the amplitude spectrum coefficient of DFT conversion embeds a matching template, and template point position is produced by a cipher controlled with f '; 3) testing process is the inverse process of telescopiny, detect matching template earlier, and after relatively obtaining the transformation matrix of the affined transformation that image stood and do inverse transformation recovering geometric configuration with original matching template, do visual translation calibration back according to training sequence again and extract watermark information.
For detect the image stand the transformation matrix of affined transformation and recover its original geometry do inverse transformation, can embed a matching template that is made of a little louder local pole in the amplitude spectrum coefficient of visual DFT conversion, a little bigger position of local pole can be produced by a cipher controlled; Embed a training sequence simultaneously in visual DWT territory and be used for the translation calibration.
The information watermark that is embedded in the visual DWT territory through band spectrum modulation with after interweaving realizes heavy synchronous detection by matching template that is embedded in visual DFT territory and the training sequence that is embedded in visual DWT territory; The detection two big steps that are divided into the embedding and the watermark of watermark.
1, the embedding of watermark:
The present invention is embedded in the information watermark in the low frequency sub-band coefficient in visual DWT territory, and the template watermark is embedded in the amplitude spectrum intermediate frequency coefficient after the visual DFT conversion, and two parts watermark is not disturbed mutually like this, can obtain better robustness again.The image watermark embedding grammar block scheme that the present invention proposes as shown in Figure 1.
2: the detection of watermark:
Do not need the auxiliary of raw image, the inventive method can detect the data of hiding and obtain from the watermark image that may suffer geometric attack and JPEG compression simultaneously.Testing process is as follows:
A) when watermark detection, at first want the watermark of application training Sequence Detection whether synchronous.If asynchronous, then must be earlier through the overweight synchronous image g that obtains synchronously
*(x, y).It is heavy that to comprise that synchronously plate watermark detection, contrary affined transformation, the translation of application training sequence are touched in the DFT territory synchronous.If synchronously, directly do a step.
B) to synchronous image g
*(x y) makes DWT territory watermark detection, has obtained actual hiding data.
Watermark embed process mainly contains the embedding of the DWT territory watermark pre-service of (comprising information watermark, training sequence), the watermark of DWT territory and embedding three parts that the plate watermark is touched in the DFT territory.
The pre-service of 1) DWT territory watermark (information watermark, training sequence): direct sequence spread spectrum is encoded, is interweaved.
The present invention introduces the robustness and the secret that hide Info with enhancing in the image watermark method with technology commonly used in some communication theories (as the direct sequence spread spectrum modulation and interweave).
Suppose that the raw image size is 512 * 512.Application length is N
1PN sign indicating number sequence m={m
jJ=1 ..., N
1Information b{b to embedding
iI=1 ..., L} (b wherein
j∈ 0,1}) carry out the spread spectrum coding modulation." 1 " is modulated to m (bipolar sequence, m
j∈ 1, positive sequence 1}), i.e. {+1 * m
iJ=1 ..., N
1, " 0 " is modulated to the anti-phase sequence of m, i.e. { 1 * m
jJ=1 ..., N
1.15 PN sign indicating number sequence is produced by PN sign indicating number sequencer by a key.Can obtain scale-of-two watermark data W to be embedded like this:
Training sequence is that can the information watermark realize the key that translation is synchronous, and for make its influence that is subjected to visual cutting less as far as possible, it should be embedded in needs to lay special stress on protecting the low frequency sub-band position of part correspondence or the central row and the central series of low frequency sub-band in the image.Be embedded in 32 row and 32 row of low frequency sub-band as shown in Figure 2.And in the remainder of low frequency sub-band, embed through the scale-of-two watermark data W after interweave (adopting 2-dimensional interleaving technology or other interleaving technologies).
Deposit 127 training sequences on 32 row of one 64 * 64 two-dimensional matrix and 32 column positions, all the other sequence of positions are deposited the scale-of-two watermark data W afterwards that interweaves, and the two-dimensional matrix that obtains is become an one-dimension array by line scanning, are designated as X.
The embedding and the detection method of 2) DWT territory watermark (information watermark, training sequence)
(x y) carries out three grades of DWT and decomposes, low frequency sub-band LL the embedding raw image f of DWT territory watermark
3Coefficient becomes one-dimension array by line scanning, is designated as C.By formula (1), we are added to binary data X on the low frequency coefficient C, obtain new low frequency coefficient c ':
0≤i<4096 wherein, C (i), C ' (i), x
iBe respectively i the element of C, C ', X.α represents embedment strength, is satisfying under the prerequisite of invisibility, selects maximum round values as far as possible.With the wavelet coefficient behind the embed watermark carry out IDWT obtain embedding the watermark of DWT territory visual f ' (x, y).
The detection of DWT territory watermark is synchronous visual g
*(x, the low frequency sub-band LL after y) DWT decomposes
3Coefficient becomes one-dimension array by line scanning, is designated as C
*The binary data that extracts is designated as X
*={ x
i -, it is as follows to extract formula:
0≤i<4096 wherein, α is an embedment strength.With the binary data X that extracts
*Carry out reciprocal cross and knit the binary data sequence W that (inverse process that interweaves) recovers embedding
*W then
*Carry out segmentation by 15 bits, every section is carried out relevantly with the sequence m of 15bits, if correlation is greater than 0, then to embed information bit be " 1 " in judgement, otherwise judgement embedding information bit is " 0 ".Just obtain the embedding information recovered after the despreading.
3) embedding of DFT territory template and detection
(x, DFT territory y) embeds the synchronizing information after a template is out of shape as watermark image to visual f ' after embedding DWT territory watermark.
The embedding of template divides following four steps:
A) (x, y) (512 * 512) extend to 1024 * 1024 around filling with average with f '.
B) do the DFT conversion, get the fourier coefficient range weight.(normalized frequency is 0.20~0.30) embeds 28 template points in the intermediate frequency zone, and being evenly distributed in inclination angle, DFT territory is θ
1And θ
2Two straight lines, 14 points on the every line, Fig. 2 is the synoptic diagram of embedded template, the situation of 14 the template points of poincare half plane that only draw among the figure, lower half-plane also embeds 14 template points about former point symmetry.The inclination angle of straight line and the utmost point of template point footpath are produced by a key pseudorandom.
C) the mould value of increase template point place fourier coefficient, (can adopt radius is the circular window of R, maximum value as shown in Figure 3) to make it to become regional area.The change amount is standard with invisible, and generally getting maximum value is that local mean values adds the variance about several times to tens times.
D) calculate inverse fourier transform (IDFT) and obtain final watermark image f " (x, y).
Image will produce the corresponding linear conversion in the DFT territory in the linear transformation that spatial domain is subjected to, so just can determine the geometric deformation that image is experienced by the transformation relation of template point position.If the linear transformation of square image below spatial domain has taken place:
Be equivalent to so do following linear transformation in the DFT territory:
For the template point on the template line, after the experience linear transformation, they still coexist one and cross on the initial point straight line.There is certain relation (as r '=Kr, K is a certain constant) in the coordinate of new template point (as utmost point footpath r ') with the coordinate (as utmost point footpath r) of original template point, and this can be used for the quick matching judgment of search procedure.
The step of template detection is as follows:
A) treating mapping resembles g (x y) does Barlette filtering.
The same during b) with embedded template, filtered image to be measured is extended to 1024 * 1024.
C) do the DFT conversion.With a radius be R ' (R '<R, the windows radius of R when embedding) circular window (as regional area) in the poincare half plane of fourier coefficient magnitude matrix, search for, extract all local maximum points.Is DFT coefficient amplitude matrix poincare half plane that the summit is divided into N with the initial point
b(N
b=360 or 180 or other values) individual sector region, each fan-shaped drift angle is 0.5 ° or 1 °.By angle all local maximum points are included into each sector region respectively again.
D) find with two and touch corresponding possible of printed line and touch the set of plate point.
In each sector region, at K
Min<K<K
MaxThe such K value of search in the scope: it makes to have N at least in this sector
mIndividual local maximum point satisfies | r
Li-Kr
Tj' |<threshold, wherein N
mBe a number of predesignating, r
LiBe the utmost point footpath (i=l...N of Local Extremum among the i of sector
b), r
Tj' be the utmost point footpath of touching plate point on the grand master pattern printed line j (j=1,2), threshold>0 is a threshold value.We get N in the experiment
m=5, threshold=0.002, K
Min=0.5 and K
Max=2.0 (are 2~0.5 corresponding to the zooming parameter on the spatial domain).If find such K value, we just get off corresponding Local Extremum coordinate record.
E) by above-mentioned steps, obtain the set of possible matched line, be called " accurate matched line ", the Local Extremum on the line is called " accurate match point ", and coordinate is designated as (x
Ij, y
Ij).The coordinate of the corresponding primary template point of image poincare half plane is designated as (x
Ij', y
Ij'), wherein { 1,2} represents i bar template (coupling) line to i ∈, and { 1,2, Λ, 7} represent j template (coupling) point to j ∈.Take out a set and concentrate another set of taking-up from concentrating corresponding to the accurate match point of template line 2 corresponding to the accurate match point of template line 1.A possible transformation matrix A who calculates according to the point and the corresponding relation between template point of these two set.Seek the minimum A of average error MAE (Mean Absolute Error).
Wherein template point is (x
Ij', y
Ij') and " accurate match point " be (x
Ij, y
Ij), nummatches is the match point number, is the error matrix of one 2 row among the operational symbol ‖ Λ ‖.
F) will add 180 ° corresponding to the accurate match point of template line 1, repeat e), determine last frequency domain transform matrix A by the MAE value of minimum.Can get spatial domain transformation matrix B=A by formula (3) and (4)
T
Use the training sequence S of extraction and the related coefficient of original training sequence T and determine whether image reaches the translation synchronization parameter of image synchronously.
Whether when watermark detection, it is synchronous at first will to detect watermark.If asynchronous, then must just can carry out watermark detection behind the heavy synchronization watermarking.If synchronously, then directly extract low frequency sub-band LL
3Subband hiding data and decode information.
Whether detect watermark synchronous: (x, y) resetting size is 512 * 512, then it is carried out 3 grades of DWT and decomposes, from LL with visual g to be measured
3Extract training sequence S in 32 row of subband and 32 row, calculate the related coefficient of it and original training sequence T
Whether see 〉=threshl.If we think that S is real training sequence, and watermark is synchronous, can directly carry out the extraction and the decoding of the watermark of DWT territory.If<threshl thinks that then watermark is nonsynchronous, must be earlier through overweight extraction and the decoding that just can carry out the watermark of DWT territory synchronously.General desirable 0.56 (by the definite value of experiment) of threshl.Pseudo-synchronous probability promptly appears in the appearance false-alarm can be by calculating
E=round (127 * (1-threshl)/2) wherein.Round represents round.
The heavy synchronous first step is: recover original geometry.(x detects the template watermark of embedding in y), and it and original template compared obtains the affine transformation matrix B that image is stood from visual g to be measured.After obtaining affine transformation matrix B, with visual g (x to be measured, y) carry out the visual g ' (x that the image geometry inverse transformation reverts to M * N size, y) (Fig. 5 b), and then fill 0 one-tenth 512 * 512 size visual I (x, y), filled with 0 by the part of cutting, (x is y) at visual I (x, y) center (Fig. 5 c) for g '.
The heavy second synchronous step is: translation is synchronous.Promptly determine the translation synchronization parameter of image with the related coefficient of training sequence S that extracts and T.
Translation synchronously adoptable a kind of way is, with visual I (x, y) do following all possible translation:
I
t(x,y)=I(x-x
t)mod512,(y-y
t)mod512);
Image after each translation is made DWT and is decomposed, from LL
332 row of subband extract training sequence S in being listed as with 32.Can determine translation parameters (x according to the training sequence that extracts and the related coefficient maximum of original training sequence
t, y
t).
Another method that the present invention proposes is that (x y) does maximum 8 * 8=64 time translation and gets final product, thereby can reduce calculated amount greatly with visual I.According to the time-frequency local character of DWT, LL
3Each coefficient of subband is all corresponding to a part of image.Can prove (our experiment has also proved this point), if when DWT, adopt a tight wavelet filter and adopt periodic extension mode (if other continuation modes of employing then except image border, also satisfy following relationship), visual I (x, y) translation 8 * x
T1Row and 8 * y
T1Row (x
T1, y
T1Be integer), obtain translation image I
t(x, y):
I
t(x,y)=I((x-8×x
t1)mod512,(y-8×y
t1))mod512) (7)
LL after then three grades of DWT of image decompose
3Subband is translation x also
T1Row and y
T1Row:
LL
3t(x,y)=LL
3((x-x
t1)mod 64,(y-y
t1)mod64) (8)
LL wherein
3(x, y) and LL
3t(x, y) be respectively visual I (x, y) and I
t(x, y) LL
3Sub-band coefficients.LL
3Translation also takes place in the training sequence that the translation of subband causes embedding.The character that application of formula 7 and 8 provides, we can be only to I (x, y) do maximum 8 * 8 translations:
I
t(x,y)=I((x-x
t)mod 512,(y-y
t)mod 512);{-4≤x
t,y
t<4 (9)
Every translation once is DWT and is decomposed, and obtains LL
3Subband LL
3t(x, y).With LL
3t(x, y) do translation:
LL
3t′(x,y)=LL
3t((x-x
t1)mod64,(y-y
t1)mod64);{-T
1≤x
t1<T
1;-T
2≤y
t1<T
2 (10)
In the following formula, T
1=round (0.5 * (512-M)/8), T
2=round (0.5 * (512-N)/8).Each translation is from LL
3t'; (x, 32 row y) and 32 row extractions training sequence S, according to and original training sequence T between maximum related value determine translation parameters.Can determine the translation parameters (8 * x of image after maximum 64 translations search
t+ x
T1, 8 * y
t+ y
T1), thereby the visual g after the acquisition translation calibration
*(x, y).
The present invention has the following advantages:
1) the digital watermarking blind checking method of the DFT-DWT compositum of the present invention's proposition resists normal signal processing aspect and affined transformation aspect at the same time and has all reached stronger robustness (table 1).When compressibility factor is 15 JPEG compression (JPEG_15), can realize that zero defect detects, can resist other geometric transformations except that Rand Bending among the international watermark test platform StirMark 3.1, as to rotation (auto crop, auto scale), jitter, scaling, shearing, general linear transform etc. can both realize that zero defect detects, and can resist the combination attacks of JPEG compression and geometric transformation, as resisting combination attacks such as JPEG_50 compression, rotation, convergent-divergent, cutting, translation simultaneously.
2) water mark method that proposes of the present invention can be hidden the above information of 264 bits, and more than 40dB, the invisibility of watermark is better with respect to the PSNR of raw image for watermark image.
3) the image geometry collimation technique among the present invention, the degree of accuracy height, and can avoid in image, embedding a visable indicia.
Table 1 the present invention proposes the result that method water seal test platform StirMark 3.1 carries out the robustness test.
| StirMark functions |
Lena |
Baboon |
| JPEG 15~100 |
0 |
0 |
| Gauss filtering |
0 |
0 |
| sharpening |
0 |
0.02 |
| jitter |
0 |
0 |
| scaling |
0 |
0 |
| aspect ratio |
0 |
0 |
| cropping 25 |
0 |
0 |
| rotation(auto-crop,scale) |
0 |
0 |
| general linear transform |
0 |
0 |
| shearing |
0 |
0 |