Summary of the invention
The purpose of the embodiment of the invention provides digital watermarking embedding, extraction and quantizing step size coordinating factor optimizing method and device, realizes the invisibility of digital watermark method and the balance of robustness.
For solving the problems of the technologies described above, the embodiment of the invention provides digital watermarking embedding, extraction and quantizing step size coordinating factor method and device to be achieved in that
A kind of data waterprint embedded method comprises:
The image segmentation of digital watermarking to be embedded is become the image subblock of pre-sizing;
Described image subblock is carried out discrete cosine transform DCT, the result behind the DCT is carried out svd SVD, obtain piecemeal singular value vector through the described image subblock behind the SVD;
Obtain brightness the result behind DCT and shelter parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
Adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value;
Revise according to described quantized value and original figure watermark information, obtain the revision value of embed digital watermark information;
Utilize the revision value of described embed digital watermark information to obtain the image of embed digital watermark.
Preferably, in the described method, described image segmentation with digital watermarking to be embedded becomes the image subblock of pre-sizing further to comprise before:
The original figure watermark information is carried out the pre-service of expansion scramble.
Preferably, in the described method, described pre-service comprises to original figure watermark information execution expansion scramble:
The original figure watermark information is adopted the pre-service of Arnold conversion expansion scramble.
Preferably, in the described method, described adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantizes to comprise:
Add 1 value quantizes according to the F norm of the adaptive quantizing step-length of described image subblock and singular value vector.
Preferably, in the described method, the described revision according to described quantized value and digital watermark information comprises:
Parity and original figure watermark bit information according to described quantized value are revised described quantized value.
A kind of digital watermarking extracting method comprises:
The image segmentation of embed digital watermark is become the image subblock of pre-sizing;
Described image subblock is carried out discrete cosine transform DCT, the result behind the DCT is carried out svd SVD, obtain piecemeal singular value vector through the described image subblock behind the SVD;
Obtain brightness the result behind DCT and shelter parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
Adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value;
Extract digital watermarking position information according to quantized value, obtain digital watermark information.
Preferably, in the described method,, described according to further comprising after the information of quantized value extraction digital watermarking position if the original figure watermark information in the image of described embed digital watermark has been carried out the pre-service of expansion scramble:
Expand the scramble pre-service to described digital watermarking position information and executing is counter.
Preferably, in the described method, describedly expand the scramble pre-service and comprise described digital watermarking position information and executing is counter:
Digital watermark information adopted the Arnold conversion is counter expands the scramble pre-service.
Preferably, in the described method, described adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantizes to comprise:
Add 1 value quantizes according to the F norm of the adaptive quantizing step-length of described image subblock and singular value vector.
Preferably, in the described method, describedly extract digital watermarking position information according to quantized value and comprise:
Extract digital watermarking position information according to the parity of described quantized value.
A kind of quantizing step size coordinating factor optimizing method comprises:
Definition and random initializtion population, the particle in the described population is a quantizing step size coordinating factor;
Image according to the generation of the quantizing step size coordinating factor behind random initializtion embed digital watermark comprises:
The image segmentation of digital watermarking to be embedded is become the image subblock of pre-sizing;
Described image subblock is carried out discrete cosine transform DCT, the result behind the DCT is carried out svd SVD, obtain piecemeal singular value vector through the described image subblock behind the SVD;
Obtain brightness the result behind DCT and shelter parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to described quantizing step size coordinating factor and described brightness;
Adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value;
Revise according to described quantized value and original figure watermark information, obtain the revision value of embed digital watermark information;
Utilize the revision value of described embed digital watermark information to obtain the image of embed digital watermark;
Calculate the normalizing related coefficient of the image of the image of described embed digital watermark and digital watermarking to be embedded;
Image to described embed digital watermark carries out the image attack;
Extract the digital watermark information of attacking through image, comprising:
The image segmentation of embed digital watermark is become the image subblock of pre-sizing;
Described image subblock is carried out discrete cosine transform DCT, the result behind the DCT is carried out svd SVD, obtain piecemeal singular value vector through the described image subblock behind the SVD;
Obtain brightness the result behind DCT and shelter parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
Adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value;
Extract digital watermarking position information according to quantized value, obtain digital watermark information;
Calculate the bit error rate between the digital watermark information of attacking through image of described original figure watermark information and described extraction;
According to described normalized correlation coefficient and described bit error rate structure fitness function;
Calculate the optimal value of particle according to fitness function, the iteration count counting, whether the numerical value of judging iteration count surpasses predetermined value, if do not surpass predetermined value, the optimal value of described particle is back to described data waterprint embedded method, upgrades the quantizing step size coordinating factor in the described data waterprint embedded method; If surpass predetermined value, with the optimal value of described particle as final quantizing step size coordinating factor.
A kind of digital watermarking flush mounting comprises:
Cut apart module, be used for the image segmentation of digital watermarking to be embedded is become the image subblock of pre-sizing;
Discrete cosine transform module is used for described image subblock is carried out discrete cosine transform DCT;
The svd module is used for the result behind the described DCT is carried out svd SVD, obtains the piecemeal singular value vector through the described image subblock correspondence behind the SVD;
Adaptive quantizing step size computation module, being used for result behind the DCT obtains brightness and shelters parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
The digital watermark information merge module, be used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value vector of image subblock, obtain quantized value, revise according to described quantized value and original figure watermark information, obtain the revision value of embed digital watermark information, utilize the revision value of described embed digital watermark information to obtain the image of embed digital watermark.
Preferably, in the described device, described digital watermark information merge module comprises:
Quantization modules is used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value vector of described image subblock, obtains quantized value, and the output quantized value is to revising module;
The revision module is revised according to described quantized value and original figure watermark information, obtains the revision value of embed digital watermark information, and the revision of output embed digital watermark information is worth to acquisition module;
Acquisition module is used to utilize the revision value of described embed digital watermark information to obtain the image of embed digital watermark.
Preferably, in the described device, described device further comprises:
Pretreatment module is used for the original figure watermark information is carried out the pre-service of expansion scramble, and output is through the merge module of the pretreated original figure watermark information of expansion scramble to digital watermark information.
A kind of digital watermarking extraction element comprises:
Cut apart module, be used for the image segmentation of digital watermarking to be embedded is become the image subblock of pre-sizing;
Discrete cosine transform module is used for described image subblock is carried out discrete cosine transform DCT;
The svd module is used for the result behind the described DCT is carried out svd SVD, obtains the piecemeal singular value vector through the described image subblock correspondence behind the SVD;
Adaptive quantizing step size computation module, being used for result behind the DCT obtains brightness and shelters parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
Quantization modules is used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value vector of described image subblock, obtains quantized value;
Extraction module is used for extracting the digital watermarking position according to described quantized value, obtains digital watermark information.
A kind of quantizing step size coordinating factor optimizing device comprises digital watermarking flush mounting and digital watermarking extraction element, further comprises:
Definition module is used to define population, and the particle in the described population is a quantizing step size coordinating factor, exports described population to initialization module;
Initialization module is used for the described population of random initializtion, exports particle behind the described random initializtion to the digital watermarking flush mounting;
First computing module is used to calculate the normalizing related coefficient of image of the embed digital watermark of the image of digital watermarking to be embedded and the output of described digital watermarking flush mounting, exports described normalizing related coefficient to constructing module;
Processing module is used for image to the embed digital watermark of described digital watermarking flush mounting output and carries out image and attack, and the image of export described embed digital watermark through the image attack is to the digital watermarking extraction element;
Second computing module is used to calculate the bit error rate of the digital watermark information of described original figure watermark information and described digital watermarking extraction element output, exports the described bit error rate to constructing module;
Constructing module is used for exporting described fitness function to the three computing modules according to described normalized correlation coefficient and described bit error rate structure fitness function;
The 3rd computing module is used for the optimal value according to described fitness function calculating particle, and the optimal value of exporting described particle is to iteration count;
Iteration count is used for the calculation times counting to the particle optimal value, and the numerical value of exporting described iteration count is to judge module;
Judge module, be used to judge whether the numerical value of iteration count surpasses predetermined value, if surpass predetermined value, the optimal value of described particle value is back to described digital watermarking flush mounting, upgrade the quantizing step size coordinating factor in the described digital watermarking flush mounting; If surpass predetermined value, with the optimal value of described particle as final quantizing step size coordinating factor.
The technical scheme that is provided by the above embodiment of the invention as seen, the embodiment of the invention becomes the different sub-pieces of figure by the image segmentation with watermark to be embedded, characteristic in conjunction with the human visual system, different image subblocks is calculated the texture that embodies human visual system's masking characteristics respectively to be sheltered parameter and obtains the brightness that embodies human visual system's masking characteristics and shelter parameter, thereby shelter parameter and texture is sheltered the adaptive quantizing step-length that calculation of parameter goes out the sub-piece of corresponding different images according to brightness, according to the digital watermark information of the adaptive embedding varying strength of the characteristics of the sub-piece of different images, realize the balance of digital watermark method invisibility and robustness better.
Embodiment
The embodiment of the invention provides the method and the device of digital watermarking embedding, extraction and quantizing step size coordinating factor optimizing.
In order to make those skilled in the art person understand the present invention program better, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills should belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The method embodiment that the digital watermarking that below introducing the embodiment of the invention provides embeds, Fig. 1 shows the process flow diagram of this embodiment, comprising:
Step 101: with the image I of digital watermarking to be embedded
0Be divided into the image subblock A of non-overlapping 8 * 8 sizes
i, i=1,2 ..., M, the sub-piece number of M presentation video;
Also can be with the image I of digital watermarking to be embedded
0Be divided into non-overlapping 4 * 4 or the image subblock of 16 * 16 sizes.
Step 102: to described image subblock A
iCarry out discrete cosine transform DCT, the result after the discrete cosine transform is carried out svd SVD, obtain the piecemeal singular value vector of described image subblock correspondence;
Discrete cosine transform (DCT, Discrete Cosine Transform):
DCT is and the relevant a kind of transform domain transform method of Fourier transform (DFT, Discrete Fourier Transform) that DCT is similar to discrete Fourier transformation.DCT has 8 kinds of types, and usually wherein 4 kinds are common, are modal a kind of DCT form below, directly are called as DCT usually.
Svd (SVD, Singular Value Decomposition):
From the linear algebra angle, any width of cloth digital picture can be regarded the real matrix of a m * n size as, the real matrix A of a given m * n size, and its SVD can be expressed as:
Wherein, U and V are respectively the orthogonal matrix of m * m and n * n size, ∑
i=diag (λ
1, λ
2..., λ
r, 0,0 ... .0) be non-negative diagonal matrix, its diagonal element λ
iBe the singular value of matrix A, and satisfy λ
1〉=λ
2..., 〉=λ
r>0, r is the order of A.
The singular value features vector of A has good stable, and this also is the Fundamentals of Mathematics of SVD digital watermarking scheme.Because SVD has advantages such as one-way that DCT, wavelet transform etc. do not possess and asymmetry, so it has a wide range of applications in Digital Image Processing.
The advantage of SVD is:
(1) matrix size of carrying out SVD is fixing, and square, rectangle can;
(2) singular value has good stable, and the slight disturbance of singular value can not influence the visual quality of digital picture;
(3) each singular value λ
iDetermined the brightness (energy) of a SVD image layer, simultaneously two singular vector U of its correspondence
iAnd V
i TDetermined the geometric properties of image.
To described image subblock A
iCarry out discrete cosine transform DCT, the result after the discrete cosine transform carried out svd SVD, obtain the piecemeal singular value vector of the described image subblock correspondence behind SVD, be formulated as:
Step 103: obtain brightness according to the result behind the described DCT and shelter parameter and calculate texture and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the calculation of parameter image subblock according to the quantizing step size coordinating factor of the sub-piece of correspondence image and brightness;
Embed digital watermark can be regarded weak signal of stack under a strong background as in image information, only when the signal of stack surpasses certain intensity, just can be detected by the human visual system.The observability thresholding of superposed signal is subjected to the factor affecting such as spatial frequency of texture complicacy, background and the digital watermarking of background luminance, background.Background luminance is high more, and the observability threshold value is high more, and this specific character is called the brightness sheltering, and this brightness sheltering can be sheltered parameter by brightness and represent; Background texture is complicated more, and the observability threshold value is high more, and this specific character is called the texture sheltering, and this texture sheltering can be sheltered parameter by texture and represent; Spatial frequency by the contrast sensitivity function representation, is called frequency masking to the influence of observability thresholding.
Brightness masking characteristics according to Weber law and human visual system, background luminance is bright more, direct current (DC just, Direct Current) coefficient value (mean flow rate of representative image piece) is big more, the observability detection threshold of digital watermarking is just high more, promptly can embed more high-intensity digital watermark signal.Image texture is strong more, and the observability detection threshold of digital watermarking is just high more, promptly can embed more high-intensity digital watermark signal.According to the background luminance and the local grain complicacy of image, the intensity that improves embed digital watermark as far as possible is to improve the effective way of watermark robustness.
Utilize the brightness masking characteristics of image and the embedment strength that the texture masking characteristics is regulated digital watermarking adaptively, realize the balance of digital watermark method invisibility and robustness.The brightness masking characteristics of image is reflected on the background luminance of image, and the background luminance of image in the DCT territory by discrete cosine DC representation in components, can be directly as the yardstick of brightness of image.Image texture complexity is represented by the image variance that to a certain extent variance is big more, illustrates that image texture is complicated more; Otherwise, illustrate that then image texture is level and smooth more.
Parameter M is sheltered in brightness
i LFor:
Wherein, D
iThe sub-piece A of (0,0) presentation video
iDC component behind the DCT, what choose is DC component behind the DCT herein, is exactly first coefficient value that DCT decomposes the back matrix.
Calculate texture and shelter parameter M
i TFor:
Wherein, D
iBe image subblock A
iAverage behind the DCT.
The adaptive quantizing step-length of calculating the sub-piece of correspondence image is:
Wherein, a
iBe the sub-piece A of correspondence image
iQuantizing step size coordinating factor, a
iChoose can be by virtue of experience or repeatedly experiment determine, also can be the embodiment of the invention provide calculate the optimal value of the quantizing step size coordinating factor that gets based on particle swarm optimization algorithm (PSO, Particle Swarm Optimization).
Step 104: adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value N
i
Calculate
S wherein
i=(σ
I1, σ
I2..., σ
I8) be the piecemeal singular value vector that described piecemeal singular value is formed, || s
i|| be the F norm of piecemeal singular value vector, quantize for adaptive quantizing step-length and piecemeal singular value vector according to described image subblock, can be according to the adaptive quantizing step-length δ of described image subblock
iAdd 1 value with the F norm of singular value vector and quantize, quantitative formula is:
Wherein,
Represent downward bracket function, the quantitative formula that also can adopt other quantizes according to the adaptive quantizing step-length and the piecemeal singular value vector of image subblock.
Step 105: according to described quantized value N
iRevise described quantized value N with the original figure watermark information
i, obtain the revision value N of embed digital watermark information
Iw
For according to described quantized value N
iRevise described quantized value N with the original figure watermark information
iCan be according to described quantized value N
iParity and original figure watermark bit information revise described quantized value N
i, obtain the revision value N of embed digital watermark information
Iw, the original figure watermark information is made up of original figure watermark bit information 0 and 1.The revision formula is as follows in detail:
Wherein, w
iBe corresponding N
iDigital watermarking position information, by the revision N
iRealize the embedding of digital watermarking.
Step 106: the revision value N that utilizes described embed digital watermark information
IwObtain the image of embed digital watermark.
The revision value N of described embed digital watermark information
IwThrough obtaining the image of embed digital watermark after the predetermined process, described predetermined process is: calculate
According to formula
Revise the piecemeal singular value vector, carry out the singular value inverse transformation, form the image subblock A ' that contains digital watermark information revising back piecemeal singular value vector
i, at last to the image subblock A ' of embed digital watermark information
iCarry out inverse discrete cosine transform; Through after the above-mentioned predetermined process, obtain the image I of embed digital watermark '
0
Below this formula realizes is the inverse transformation of DCT, this distortion is commonly called inverse discrete cosine transform.
The embodiment of the invention is to different image subblocks, sheltering in conjunction with the human visual system, different image subblocks is calculated texture respectively to be sheltered and obtains brightness parameter and the result behind DCT and shelter parameter, thereby shelter parameter and the adaptive quantizing step-length that calculation of parameter goes out the sub-piece of corresponding different images is sheltered in brightness according to texture, the digital watermark information of adaptive embedding varying strength is realized the balance of digital watermark method invisibility and robustness better.
The embodiment of the invention further comprised become the image subblock of non-overlapping pre-sizing in the image segmentation with digital watermarking to be embedded before: digital watermark information is carried out the pre-service of expansion scramble.
Adopt a significant bianry image as digital watermark information, than adopting traditional pseudo-random sequence that higher practical value is arranged.The embodiment of the invention is expanded the scramble pre-service to bianry image, can eliminate the correlativity between the digital watermarking pixel, strengthens the robustness and the security of digital watermarking.
Digital Image Scrambling is by a given image is transformed to disorderly and unsystematic, a skimble-skamble image at locational space, color space and transformation space with it by certain transformation rule, realization is encrypted image information, is a kind of preprocess method of common logarithm word watermarking images.Common disorder method has methods such as Arnold conversion, magic square conversion, fractal Hilbert curve, Tangram algorithm, IFS model, Conway recreation, Gray code conversion, generalized Gray code conversion.Wherein, the Arnold conversion is simple and have periodically because of its conversion, is widely used in the digital watermarking.
The Arnold conversion claims cat face conversion (cat mapping) again, is a kind of conversion that Arnold proposes in ergodic theory research.For size is the digital picture of N * N, and the Arnold transformation transform definition is:
(x y) is conversion preceding pixel coordinate, (and x ', y ') be pixel coordinate behind the scramble.
In order to expand Arnold alternate key space, enhance system security, the embodiment of the invention adopts expansion Arnold conversion scramble digital watermark information.
With matrix
(numerical value in the matrix can arbitrarily be provided with, and is equivalent to be provided with key), matrix iteration frequency n and scramble number of transitions are expanded the scramble key space as the key K 1 of image scrambling.Simultaneously, behind the scramble between the digital watermarking image pixel incidence relation upset, image pixel is distributed in the entire image space equably, realizes that digital watermarking has improved the robustness of digital watermark method when embedding.
Below the digital watermarking extracting method extract for the digital watermarking that the image to the embed digital watermark handled through top data waterprint embedded method carries out.
The method embodiment that Fig. 2 extracts for the digital watermarking that the embodiment of the invention provides, Fig. 2 shows the process flow diagram of this embodiment, comprising:
Step 201: with the image I of embed digital watermark '
0Be divided into the image subblock A of non-overlapping 8 * 8 sizes "
i, i=1,2 ..., M, the sub-piece number of M presentation video;
If during embed digital watermark with the image I of digital watermarking to be embedded
0Be divided into non-overlapping 4 * 4 or the image subblock of 16 * 16 sizes, step 201 should be mutually with the image I of embed digital watermark '
0Be divided into non-overlapping 4 * 4 or the image subblock of 16 * 16 sizes.
Step 202: described image subblock is carried out discrete cosine transform DCT, the result after the discrete cosine transform is carried out svd SVD, obtain the piecemeal singular value vector of described image subblock correspondence;
Step 203: obtain brightness according to the result behind the described DCT and shelter parameter and calculate texture and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the calculation of parameter image subblock according to the quantizing step size coordinating factor of the sub-piece of correspondence image and brightness;
The method of the adaptive quantizing step-length of the sub-piece of computed image is the same in described step 203 and the step 103, does not do too much introduction at this.
Step 204: adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantize, and obtain quantized value N '
i
Calculate
S ' wherein
i=(σ '
I1, σ '
I2..., σ '
I8), the piecemeal singular value vector of being made up of the piecemeal singular value quantizes to be the adaptive quantizing step-length δ according to the image subblock correspondence according to the adaptive quantizing step-length and the piecemeal singular value vector of described image subblock
iThe F norm of piecemeal singular value vector added 1 value and quantize, quantitative formula is:
Wherein, definite method unanimity of definite method of adaptive quantizing step-length adaptive quantizing step-length during with embed digital watermark information, it also is sheltering in conjunction with the human visual system, parameter is sheltered in brightness and texture is sheltered parameter by calculating, thereby shelters parameter and texture is sheltered the adaptive quantizing step-length that calculation of parameter goes out the sub-piece of corresponding different images according to brightness.
The quantitative formula that also can adopt other quantizes according to the adaptive quantizing step-length and the piecemeal singular value vector of image subblock, does not do too much introduction at this.
Step 205: according to described quantized value N '
iExtract digital watermarking position information, obtain digital watermark information.
According to described quantized value N '
iExtract digital watermarking position information and can obtain digital watermark information for extracting digital watermarking position information according to the parity of described quantized value,
Wherein, w
iFor digital watermarking position information, if N '
iBe even number, digital watermarking position information is 1, if N '
iBe odd number, digital watermarking is that information is 0, forms digital watermark information by described digital watermarking position information.
If in the data waterprint embedded method original figure watermark information has been carried out the pre-service of expansion scramble, step 205 was to extract the digital watermarking position according to quantized value when digital watermark information extracted, and carried out the pre-service of anti-expansion scramble, obtained digital watermark information.If what carry out during embed digital watermark is to adopt Arnold conversion scramble digital watermark information, anti-expansion scramble pre-service herein is for adopting the pre-service of anti-Arnold conversion expansion scramble.
It is the inverse process that digital watermarking embeds that digital watermarking is extracted, and the embodiment of the invention is used quantization step (in the quantization index modulation method a kind of), does not need the image I of digital watermarking to be embedded in the combine digital watermark extracting
0, but directly the image of embed digital watermark is handled, realize the blind extraction of digital watermark information, make range of application wider, safer.
For the quantizing step size coordinating factor in the determining of embodiment of the invention adaptive quantizing step-length, by virtue of experience or repeatedly the quantizing step size coordinating factor determined of experiment can be realized embodiments of the invention, but adaptivity is not very strong.In order further to utilize picture characteristics embed watermark adaptively, embodiment of the invention utilization is selected automatically based on particle swarm optimization algorithm and is optimized quantizing step size coordinating factor.
According to the PSO principle, each particle in the population is all represented a possibility solution to problem.Particle finds optimum solution by iterating according to speed of obtaining and position.In iterating each time, particle upgrades self by upgrading two extreme values.First is exactly the optimum solution that particle itself finds, and this is separated and is called the body extreme value; Another extreme value is exactly the optimum solution that whole population is found at present, and this is separated and is called global extremum.In addition also can whole population and just with wherein a part is as the neighbours of particle, the extreme value in all neighbours is exactly a local extremum so.When finding these two extreme values, particle upgrades speed of oneself and new position according to following formula.
V
i=w
iv
i+c
iξ(pbest
i-X
i)+c
2η(pbest
g-X
i)
X
i=X
i+V
i
Wherein, V
iBe particle's velocity, X
iIt is current particle position.Pbest
iAnd pbest
gBe respectively body extreme value and global extremum, w
iBe inertia weight, v
iBe the current speed of particle, ξ and η are the random number .c between (0,1)
1, c
2Be respectively the cognitive factor and the social factor.
Fig. 3 as shown in Figure 3, comprising for the PSO that utilizes that the embodiment of the invention provides optimizes a method flow diagram of quantizing step size coordinating factor:
Step 301: definition population;
The size of population, the dimension of particle, the cognitive factor, the social factor and inertia weight function are the basic parameters of population; According to the PSO principle, each particle in the population is represented a possibility solution to problem in the group, so we utilize the population of a multidimensional of each piecemeal corresponding quantitative step size coordinating factor structure.
Step 302: random initializtion population;
PSO is initialized as a group random particles (RANDOM SOLUTION), initialization particle position and speed.
Step 303: the image that generates embed digital watermark;
According to the image of data waterprint embedded method flow process generation embed digital watermark shown in Figure 1, wherein initial quantizing step size coordinating factor is the quantizing step size coordinating factor of random initializtion.
Step 304: the normalizing related coefficient between the image of calculating embed digital watermark and the image of digital watermarking to be embedded;
Normalizing related coefficient NC between the image of embed digital watermark and the image of digital watermarking to be embedded (I '
0, I
0) can be used for weighing the invisibility of digital watermarking.
Step 305: the image to described embed digital watermark carries out the image attack, extracts digital watermark information from described embed digital watermark image through the image attack;
Extract the described digital watermark information of attacking through image according to digital watermarking extracting method flow process shown in Figure 2.
Step 306: the bit error rate of calculating described digital watermark information that extracts and original figure watermark information;
The error rate BER of digital watermark information that extracts and original figure watermark information (W '
i, W) can be used for weighing the robustness of watermark.
Step 307: according to described normalized correlation coefficient and described bit error rate structure fitness function;
The structure of fitness function need be considered the invisibility and the robustness of digital watermarking, according to described normalized correlation coefficient and described bit error rate structure fitness function is:
Wherein, m represents the number of digital watermarking attack method, λ
iBe the different weights of attacking.In the PSO optimizing process, utilize this formula, can increase or reduce kind and method that digital watermarking is attacked easily.
Step 308: according to the optimal value of fitness function calculating particle, the iteration count counting;
Step 309: whether the numerical value of judging iteration count surpass predetermined value, if surpass predetermined value, the optimal value of described particle value is back to step 303, upgrades the quantizing step size coordinating factor when carrying out watermark and embedding; If surpass predetermined value, with the optimal value of particle as final quantizing step size coordinating factor.
Wherein, described predetermined value is an iterations.Iterations is 10-20 time among the PSO, and iterations is generally by the relevant document decision with reference of experiment repeatedly here.
Constantly obtain the optimal value of the coordinating factor of quantization step by adopting many iteration of PSO, thereby obtain the optimal value of optimum adaptive quantizing step-length, make that the adaptivity of digital watermark method is better, can better realize the balance of digital watermarking invisibility and robustness.
What also have other except the embodiment of the optimization of the top described coordinating factor of realizing quantization step based on PSO also can realize the optimization of the coordinating factor of quantization step based on the embodiment of PSO method, does not do too much introduction at this.
Based on the embedding grammar of above-mentioned digital watermarking, adopt same principle, in conjunction with human auditory system's characteristic, can realize embedding to the digital watermarking of digitized audio message, realize the digital watermarking invisibility of digitized audio message and the balance of robustness.
The digital watermarking flush mounting synoptic diagram that Fig. 4 provides for the embodiment of the invention, as shown in Figure 4, the digital watermarking flush mounting comprises:
Cut apart module, be used for the image segmentation of digital watermarking to be embedded is become the image subblock of non-overlapping pre-sizing;
Discrete cosine transform module is used for described image subblock is carried out discrete cosine transform DCT;
The svd module is used for the result behind the described DCT is carried out svd SVD, obtains the piecemeal singular value vector through the described image subblock correspondence behind the SVD;
Adaptive quantizing step size computation module, being used for result behind the DCT obtains brightness and shelters parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
The digital watermark information merge module, be used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value vector of image subblock, obtain quantized value, revise according to described quantized value and original figure watermark information, obtain the revision value of embed digital watermark information, revision value to described embed digital watermark information is carried out predetermined process, obtains the image of embed digital watermark.
Described adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantizes and can quantize for according to the adaptive quantizing step-length of described image subblock the F norm of piecemeal singular value being added 1 value.
Describedly revise and to revise for parity and original figure watermark bit information according to described quantized value according to described quantized value and original figure watermark information.
The device that the embodiment of the invention provides further comprises pretreatment module, is used for the original figure watermark information is carried out the pre-service of expansion scramble, and output is through the merge module of the pretreated original figure watermark information of expansion scramble to digital watermark information.
The synoptic diagram of the digital watermark information merge module that Fig. 5 provides for the embodiment of the invention, as shown in Figure 5, described digital watermark information merge module comprises:
Quantization modules is used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value vector of described image subblock, obtains quantized value, and the output quantized value is to revising module;
Described adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantizes and can quantize for according to the adaptive quantizing step-length of described image subblock the F norm of piecemeal singular value being added 1 value.
The revision module is used for revising according to described quantized value and original figure watermark information, obtains the revision value of embed digital watermark information, and the revision of output embed digital watermark information is worth to acquisition module;
Describedly revise and to revise for parity and original figure watermark bit information according to described quantized value according to described quantized value and original figure watermark information.
Acquisition module is used to utilize the revision value of described embed digital watermark information to obtain the image of embed digital watermark.
The synoptic diagram of the digital watermarking extraction element that Fig. 6 provides for the embodiment of the invention, described as shown in Figure 6 digital watermarking extraction element comprises:
Cut apart module, be used for the image segmentation of digital watermarking to be embedded is become the image subblock of non-overlapping pre-sizing;
Discrete cosine transform module is used for described image subblock is carried out discrete cosine transform DCT;
The svd module is used for the result behind the described DCT is carried out svd SVD, obtains the piecemeal singular value vector through the described image subblock correspondence behind the SVD;
Adaptive quantizing step size computation module, being used for result behind the DCT obtains brightness and shelters parameter, calculate texture according to the result behind the DCT and shelter parameter, shelter the adaptive quantizing step-length that parameter, texture are sheltered the described image subblock of calculation of parameter according to the quantizing step size coordinating factor of the sub-piece of correspondence image and described brightness;
Quantization modules is used for quantizing according to the adaptive quantizing step-length and the piecemeal singular value of described image subblock, obtains quantized value;
Described adaptive quantizing step-length and piecemeal singular value vector according to described image subblock quantizes and can quantize for according to the adaptive quantizing step-length of described image subblock the F norm of piecemeal singular value being added 1 value.
Extraction module is used for extracting digital watermarking position information according to described quantized value, obtains digital watermark information.
Described can be to extract digital watermarking position information according to the parity of described quantized value according to described quantized value extraction digital watermarking position information.
The quantizing step size coordinating factor optimizing schematic representation of apparatus that Fig. 7 provides for the embodiment of the invention, module among Fig. 7 in the solid box is the module of quantizing step size coordinating factor optimizing device, frame of broken lines is digital watermarking flush mounting and digital watermarking extraction element, and described as shown in Figure 7 quantizing step size coordinating factor optimizing device comprises:
Definition module is used to define population, and the particle in the described population is a quantizing step size coordinating factor, exports described population to initialization module;
Initialization module is used for the described population of random initializtion, and the particle after the described initialization exports described digital watermarking flush mounting to;
First computing module, be used to calculate the normalizing related coefficient of the image of the image of described embed digital watermark and digital watermarking to be embedded, export described normalizing related coefficient to constructing module, the image of wherein said embed digital watermark is the image through the embed digital watermark that obtains after the described digital watermarking flush mounting processing;
Processing module is used for image to described embed digital watermark and carries out image and attack, and the image of export the described embed digital watermark of attacking through image is described digital watermarking extraction element extremely;
Second computing module, be used to calculate the bit error rate between original figure watermark information and the described digital watermark information that passes through the image attack that extracts, export the described bit error rate to constructing module, the wherein said digital watermark information of attacking through image that extracts is the digital watermark information through obtaining after the described digital watermarking extraction element processing;
Constructing module is used for exporting described fitness function to the three computing modules according to described normalized correlation coefficient and described bit error rate structure fitness function;
The 3rd computing module is used for the optimal value according to described fitness function calculating particle, and the optimal value of exporting described particle is to iteration count;
Iteration count is used for the calculation times counting to the particle optimal value, and the numerical value of exporting described iteration count is to judge module;
Judge module is used to judge whether the numerical value of iteration count surpasses predetermined value, if surpass predetermined value, the optimal value of described particle value is back to the digital watermarking flush mounting, upgrades the quantizing step size coordinating factor in the digital watermarking flush mounting; If surpass predetermined value, with the optimal value of particle as final quantizing step size coordinating factor.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.