Summary of the invention
The present invention is directed to the deficiency that present original video watermarking algorithm exists, a kind of video watermark process based on the location, moving region is provided, the method has great improvement and raising to the robustness and the invisibility of watermark.
The video watermark process based on the location, moving region that the present invention proposes may further comprise the steps:
(1) location, moving region, the component motion frame of adjacent two frames promptly comprises the two field picture of adjacent two frame relative motion information, and realizes the location of moving region in the original video frame in view of the above in the extraction video;
(2) watermarked, according to location, the moving region in the step (1), watermark is embedded the moving region of each frame of video;
(3) detect watermark, each frame of video is carried out watermark extracting, and the further watermark of each frame extraction of statistical analysis, to detect in the video whether contain watermark information.
Every frame in the video all passes through the location of the moving region of frame realization thereafter, and every frame is all watermarked according to step (2), but except the last frame.Can resist frame deletion like this attacks.
The specific implementation step of described step (1) is:
A extracts the component motion frame of adjacent two frames in the video, promptly comprises the two field picture of adjacent two frame relative motion information;
B resolves into the fritter that is easy to encode of non-overlapping copies with the component motion frame, and calculates the variance of each piece;
Square that comprises at least four fritters of c definition is a macro block, with this macro block scanning motion component frame, with the variance of each fritter in the macro block with as weighing the whether violent standard of motion, with variance and maximum macro block is that a square region is determined at the center, this zone corresponds in the former frame of video, is the moving region that will locate.
The length of neglecting watermark greatly of square region is determined among the above-mentioned steps c, should satisfy the requirement of each fritter embedding one bit watermark information in the square region.
Extract in the described step (1) method that the component motion frame of adjacent two frames in the video adopted be based on method of wavelet, based on the method for two-dimentional principal component analysis (2DPCA), the method that the front and back frame subtracts each other, independent component analysis (ICA) algorithm.When adopting independent component analysis (ICA) algorithm can be quick independent component analysis (FastICA) algorithm.
The watermarking algorithm of watermarked employing is the watermarking algorithm that is applicable to rest image in the described step (2), particularly based on quantization index modulation (QIM) algorithm of vision mode.
The specific implementation step of described step (3) is:
The watermark that a extracts each frame according to the extraction step of the watermarking algorithm that adopts in the step (2);
B utilizes voting method that statistical analysis is carried out in the watermark that each frame extracts, i.e. certain bit of watermark extracts that this bit is 1 in the watermark that obtains if surpass half frame of sum, and then this bit is judged to 1, otherwise is judged to 0.
The present invention considers the visual characteristic that human eye is relatively low to the variation sensitiveness of moving region and adjacent domain thereof, makes full use of the interframe relation of video sequence, and the setting movement zone is with watermarked.The method has great improvement and raising to the robustness and the invisibility of watermark.
Embodiment
Adopt quick independent component analysis (FastICA) algorithm to extract the dynamic component frame, promptly extract the two field picture that comprises adjacent two frame relative motion information, and adopt that quantization index modulation (QIM) algorithm in the existing watermarking algorithm is watermarked to be specifically described for example.Those skilled in the art also can adopt other algorithms to carry out the extraction of dynamic component according to explanation, the method for subtracting each other as adjacent two frames, utilize method of wavelet and other ICA algorithm etc.In addition, in watermarked, also can utilize other existing watermarking algorithm, as spread spectrum (SS) watermarking algorithm, based on the watermarking algorithm of small echo, based on watermarking algorithm of singular value decomposition etc.
Fig. 1 has provided the frame diagram of the inventive method, and flow process shown in pressing comprises following concrete steps:
1. locate the moving region, promptly determines the embedded location of watermark
Original video is decomposed framing, utilize the FastICA algorithm to extract the component motion frame of adjacent two frames, described component motion frame is meant the two field picture that comprises adjacent two frame relative motion information.The fritter that this component motion frame is resolved into non-overlapping copies and be easy to encode (size is 8*8 usually), and calculate the variance of each piece.With the macro block that is equivalent to four block sizes (size is 16*16 usually) scanning motion component frame, with the variance of each fritter in the macro block with as weighing the whether violent standard of motion, with variance and maximum macro block is that the center determines that a size is the square region of N*N, this zone corresponds to former frame of video, promptly obtains the moving region that will locate.Wherein, the size of moving region satisfies relational expression L=N * N by the decision of the length L of watermark, promptly embeds the watermark information of a bit in fritter.As shown in Figure 2.The result of FastICA algorithm extraction component motion such as Fig. 3, Fig. 4, Fig. 5, shown in Figure 6.
Why Fig. 3, Fig. 4, Fig. 5, Fig. 6 can interpretation scheme adopt variance as weighing the whether violent foundation of motion.As seen from Figure 5, only have texture at the moving region image, these textures have identified relative motion.And the violent motion of significant texture reflection, fuzzy texture represents its motion small, does not have the i.e. not motion generation of texture.Can draw from mathematical computations, the significant regional variance of texture is big in the component motion frame, so scheme utilizes variance as weighing the location that the whether violent standard of motion realizes the moving region.
2. watermark embeds
In watermark embed process, scheme has adopted a kind of QIM algorithm based on vision mode, and Fig. 7 has provided the frame diagram of this algorithm.The Watson vision mode that uses in the algorithm is made up of a sensitivity function, two masked portion and assembling sections of sheltering based on the brightness and contrast.Each element t in the responsive kilsyth basalt of Watson vision mode (i, j) with the DCT coefficient (i, j) corresponding one by one, representative under situation without any masking noise, calculate the DCT coefficient (i, j) the critical visible error of maximum magnitude of modification, i wherein, j=0,1 ..., 7.c
o(i, j, k) be k piece among the former figure the DCT coefficient (i, j), c
w(i, j are that (i, j), watermark W is for only comprising 0,1 binary pseudo-random sequence for the DCT coefficient of watermarked back k piece k).
According to the watermark embedded part among Fig. 7, its idiographic flow is as follows:
(1) the piece dct transform is carried out in the moving region,, set c by the Waston model
o(i, j, k) watermarked quantization step be step (i, j)=(i, j), wherein beta is used for controlling watermarked intensity to beta * t.Quantification obtains
m
e(i, j, k)=round (q
e(i, j, k)), δ=m
e(i, j, k)-q
e(i, j, k), wherein
And watermarked by following rule:
(a) if mod (m
e(i, j, k), 2)=W, then | c
w(i, j, k) |=m
e(i, j, k) * step (i, j);
(b) if mod (m
e(i, j, k), 2) ≠ W, then
When δ 〉=0, | c
w(i, j, k) |=(m
e(i, j, k)+1) * step (i, j);
When δ<0, | c
w(i, j, k) |=(m
e(i, j, k)-1) * step (i, j).
(2) after all bits embed and finish, carry out anti-piece dct transform, obtain the image after watermarked.
In the video every two field picture through moving region location watermarked after, rebuild and obtain watermarked video.
3. watermark detection
The video that receives is decomposed framing, each frame is carried out motion positions according to the detailed process of step 1, obtain carrying out watermark extracting behind the moving region.According to the watermark detection part among Fig. 7, its idiographic flow is as follows:
(1) the piece dct transform is carried out in moving region to be detected, obtain k piece (i, j) the DCT coefficient c of position
w(i, j, k), calculate its quantization step that detects watermark and be step (i, j)=beta * t (i, j).Quantification obtains
m
d(i, j, k)=round (q
d(i, j, k)), and by following Rule Extraction watermark: W '
n=mod (m
d(i, j, k), 2).
Obtain watermark W '
n, subscript n is represented watermark W '
nBe to extract by the n frame in the video to obtain;
(2) the watermark W ' that each frame is extracted with voting method
nCarrying out the comprehensive statistics analysis, is example with the wherein bit of watermark, if surpass
Watermark in this bit be 1, then this bit is for being judged to 1, otherwise is judged to 0, that is:
Wherein, W ' is final detection watermark, and L is the length of watermark.
(3) the normalizated correlation coefficient NC between the watermark W of the watermark W ' of calculating extraction and embedding, to judge whether there is watermark in the video:
As NC during, judge in the video to have watermark, otherwise do not have watermark in the video greater than threshold value threshold.Wherein, the value of threshold can be carried out different settings according to different situations.
L-G simulation test has intercepted one section polar bear video as the carrier video, comprises 51 two field pictures altogether, and every two field picture size is 272*352, and frame per second is 25fps.The watermark of using is the binary pseudo-random sequence of forming by 0,1, and length is 100.Fig. 8 has provided the PSNR curve chart of watermark video each frame of the present invention under noiseless condition, and each frame of watermark video has higher PSNR value as seen from Figure 8, and promptly each two field picture has higher fidelity.
Robustness for watermark among proof the present invention, adopt some common information processing manners that watermark video is handled, comprise that various averages are that the different white Gaussian noise of 0 variance Var is attacked, under the prerequisite that keeps video duration or frame number, adopt the MPEG-2 compression of different frame per second, and frame deletion and frame are cut out attack.Wherein, delete in the video about 10% frame in the frame deletion at random, i.e. 5 frames, frame are cut out attack and have been comprised again and cut out and cut out at random dual mode in proper order.Following table has provided under the various attack, the detected value NC of watermark.
The detected value NC of watermark under the various attack
To sum up, simulation result has proved the feasibility and the reliability of this programme.It is guaranteeing under the sightless prerequisite of watermark, white Gaussian noise, MPEG-2 compression, frame deletion and frame is being cut out attack have higher robustness.