Invention content
For the disadvantages described above or Improvement requirement of the prior art, the present invention provides a kind of compression domains based on moving targetVideo watermark insertion and extracting method exist it is intended that solving the existing video digital watermark embedding grammar based on compression domainAfter video with watermark is recoded, the technical issues of watermark will damage.
To achieve the above object, according to one aspect of the present invention, a kind of compression domain based on moving target is provided to regardFrequency watermark embedding method, includes the following steps:
(1) scrambling encryption is carried out to binary system watermark information, to obtain encrypted binary system watermark information;
(2) moving target that each frame image of video is obtained using the video object method for tracing based on compression domain is markedFigure obtains corresponding moving target according to the moving target label figure in each frame image, and from each frame figure extractedCorresponding motion vector is obtained in moving target as in;
(3) modulus value of all motion vectors of the moving target in each frame image that step (2) obtains is calculated, and is usedThe binary system watermark information obtained in step (1) is to being greater than or equal to the modulus value of a predetermined threshold value its corresponding fortune in all modulus valueDynamic vector carries out loop embedding water mark operation, to obtain the video after embedded watermark.
Preferably, scrambling encryption method is Arnold conversion method, Fibonacci transposition encryptions algorithm, Hilbert curvesTransposition encryption algorithm, affine transformation Encryption Algorithm or Magic Square Transformation Encryption Algorithm etc.;Binary system watermark information be bianry image or{ 0,1 } sequence, video object method for tracing are the video object method for tracing based on space-time Markov model.
Preferably, obtain corresponding motion vector from the moving target in each frame image extracted specifically,Moving target marks the position coordinates that moving target is searched in figure, and according to the position coordinates of the moving target found rightMotion vector corresponding with the moving target is searched in the motion vector for the frame image answered.
Preferably, the value range of predetermined threshold value is greater than 0, is less than in the modulus value of all motion vectors of moving targetMaximum value.
Preferably, the process for carrying out embedded water mark operation to motion vector using binary system watermark information is transported by changingThe parity of motion vector residual error is realized in dynamic vector.
It is another aspect of this invention to provide that a kind of compressed domain video watermark extracting method based on moving target is provided,Include the following steps:
(1) video after embedded watermark is subjected to partial-decoding operation, is believed with obtaining motion vector and block coding patternBreath;
(2) according to the motion vector and block coding pattern obtained after partial decoding of h in step (1) and using based on compression domainVideo object method for tracing obtain the moving target label figure of each frame image, extract the moving target in the video, and fromCorresponding motion vector is obtained in moving target in each frame image extracted;
(3) modulus value for calculating all motion vectors of the moving target in each frame image that step (2) obtains, to allMore than or equal to the modulus value of a predetermined threshold value, its corresponding motion vector extracts water mark operation in modulus value, to obtain binary systemWatermark cipher-text information.
(4) the binary system watermark cipher-text information obtained in step (3) is carried out inverting random decryption, to obtain binary system watermarkCleartext information.
Preferably, the process for water mark operation being extracted to motion vector is according to motion vector residual error in motion vectorParity is realized.
In general, through the invention it is contemplated above technical scheme is compared with the prior art, can obtain down and showBeneficial effect:
(1) since the present invention is during watermark telescopiny, be from it is in each frame image extracted, have it is good anti-Weight compression performance moving target in obtain motion vector, therefore the motion vector obtained and watermark be provided with it is good anti-heavyCompression performance;
(2) the flexible insertion of watermark capacity size may be implemented by way of threshold value is arranged in the present invention;
(3) the method for the present invention can further increase method by carrying out scrambling encryption processing to binary system watermark informationSafety;
(4) since motion vector residual error data is utilized in the method for the present invention, this method is widely portable toMPEG-4, H.264, H.265 etc. in the video of formats;
(5) since the present invention can realize loop embedding watermark, the attacks such as frame loss, frame replacement can be prevented, to carryRise robustness of the present invention for frame attack;
(6) since the motion vector of present invention extraction moving target and embedded watermark and extraction watermark are all at compression domainReason avoids video decoding and reconstruct completely, can improve the treatment effeciency of system in this way using partial-decoding operation,Convenient for applying in real time.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, rightThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described belowIt does not constitute a conflict with each other and can be combined with each other.
As shown in figure 8, the compressed domain video watermark embedding method the present invention is based on moving target includes the following steps:
(1) scrambling encryption is carried out to binary system watermark information, to obtain encrypted binary system watermark information (such as Fig. 1 institutesShow);
Specifically, the scrambling encryption method used in this step can be Arnold conversion method, Fibonacci changesChange Encryption Algorithm, Hilbert curve transposition encryptions algorithm, affine transformation Encryption Algorithm or Magic Square Transformation Encryption Algorithm etc.;This stepThe binary system watermark information mentioned in rapid, can be bianry image, can also be { 0,1 } sequence.
(2) moving target that each frame image of video is obtained using the video object method for tracing based on compression domain is markedScheme (Fig. 2), the corresponding moving target (wheel of grey in such as Fig. 3 is obtained in each frame image according to the moving target label figureProfile area encompassed), and corresponding motion vector is obtained (as schemed from the moving target in each frame image extractedShown in 4);Specifically, the video object method for tracing based on compression domain used in this step is to be based on space-time MarkovVideo object method for tracing (the Video object tracking in the compressed domain using of modelSpatio-temporal Markov Random Fields)。
Corresponding motion vector is obtained from the moving target in each frame image extracted, is real in the following waysExisting:The position coordinates of moving target are searched in the moving target label figure of Fig. 2, and according to the moving target foundPosition coordinates search motion vector corresponding with the moving target in the motion vector of corresponding frame image.
(3) modulus value of all motion vectors of the moving target in each frame image that step (2) obtains is calculated, and is usedThe binary system watermark information obtained in step (1) is to being greater than or equal to the modulus value of a predetermined threshold value its corresponding fortune in all modulus valueDynamic vector carries out loop embedding water mark operation, to obtain the video after embedded watermark;
In the present embodiment, the value range of predetermined threshold value is greater than 0, is less than all motion vectors of moving targetMaximum value in modulus value.
Predetermined threshold value is smaller, can realize and completely be embedded in binary system watermark information in video, but can be to video qualityIt affects greatly;If predetermined threshold value is bigger, the influence to video quality is smaller, but predetermined threshold value is excessive, can causeBinary system watermark information can not be completely embedded among video.Preferably, the value of predetermined threshold value should be close to moving targetMaximum value in the modulus value of all motion vectors.
In this step, embedded water mark operation is carried out to motion vector using the binary system watermark information obtained in step (1)Process be to be realized by changing the parity of motion vector residual error in motion vector, i.e., if in binary system watermark informationA certain position be 0, then by the corresponding motion vector residual error of this (Motion vector difference, abbreviation MVD) changeThe corresponding MVD of this is revised as odd number if a certain position in binary system watermark information is 1 for even number.It should be appreciated thatIt is that can also be:If a certain position in binary system watermark information is 1, by the corresponding motion vector residual error (Motion of thisVector difference, abbreviation MVD) it is revised as even number, it is if a certain position in binary system watermark information is 0, this is rightThe MVD answered is revised as odd number.
As shown in figure 9, the compressed domain video watermark extracting method the present invention is based on moving target includes the following steps:
(1) video after embedded watermark is subjected to partial-decoding operation, is believed with obtaining motion vector and block coding patternBreath;
Specifically, the coding/decoding method used in this step is corresponding with the type of video, if video is H.264 latticeFormula, then corresponding coding/decoding method is exactly H.264 coding/decoding method.
(2) according to the motion vector and block coding pattern obtained after partial decoding of h in step (1) and using based on compression domainVideo object method for tracing obtain the moving target label figure of each frame image, extract the moving target in the video, and fromCorresponding motion vector is obtained in moving target in each frame image extracted;
Specifically, the video object method for tracing based on compression domain used in this step and above-mentioned watermark telescopinyThe process of middle step (2) is identical.
The specific mistake of corresponding motion vector is obtained in this step from the moving target in each frame image extractedJourney is identical with the process of step (2) in above-mentioned watermark telescopiny, and details are not described herein.
(3) modulus value of all motion vectors of the moving target in each frame image that step (2) obtains is calculated, and to instituteHave and be greater than or equal to the modulus value of a predetermined threshold value its corresponding motion vector in modulus value and extract water mark operation, with obtain two intoWatermark cipher-text information processed.
In this step, the process that water mark operation is extracted to motion vector is according to motion vector residual error in motion vectorParity realize, process with the process of embedded watermark in (3) the step of above-mentioned telescopiny be it is corresponding, i.e., such asFruit motion vector residual error MVD is even number, then position corresponding with the MVD in binary system watermark information is set as 0, if MVD isPosition corresponding with the MVD in binary system watermark information is then set as 1 by odd number;Can also be, if motion vector residual error MVDFor even number, then position corresponding with the MVD in binary system watermark information is set as 1, if MVD is odd number, by binary system waterPosition corresponding with the MVD is set as 0 in official seal breath.
(4) the binary system watermark cipher-text information obtained in step (3) is carried out inverting random decryption, to obtain binary system watermarkCleartext information;
The random decryption method that inverts used in this step is the scrambling encryption side with step (1) in above-mentioned embedded watermarking processThe corresponding algorithm for inversion of method.
Experimental result and analysis
One, the binary system watermark information performance obtained after watermark extraction process:
(1) Y-PSNR (Peak noise signal ratio, abbreviation PNSR)
Fig. 5 is by taking table tennis video sequence as an example, by recording the binary system watermark information extracted after each weight contractingPSNR values (Y-PSNR) come that comparison is of the invention and existing method contracts after video is embedded in watermark by multiple weight extractsThe damaged condition for the watermark arrived, from fig. 5, it can be seen that being respectively embedded into watermark with the present invention and existing method and by repeatedly pressureContracting, the speed that the watermark quality extracted is damaged in multiple compression process have prodigious difference, with the embedded watermark of the present inventionVideo watermark damage in multiple compression process is slower, disclosure satisfy that the protection of watermark quality.
(2) error rate ((Error Rate, abbreviation ER)
Fig. 6 is carried in compression process each time by the video of the embedded watermark of record by taking table tennis video sequence as an exampleThe error rate of the watermark obtained carrys out the comparison robustness of the invention with existing method water mark method, from fig. 6, it can be seen that with thisInvention and after existing method is respectively embedded into watermark, by repeatedly compressing, watermark error rate difference that two methods extract compared withGreatly, the watermark being embedded in the method for the present invention is after repeatedly compressing, and the variation speed and amplitude of variation of error rate are all than existingMethod will be got well.
Two, the video quality performance after embedded watermark:
(1)PNSR
Table 1
Upper table 1 is selecting video Stefan (Stefan), bus (bus), table tennis (tennis) the 1st, 10,20 frames pointNot Shi Yong the present invention and existing method insertion watermark rear video Y-PSNR contrast table, it can be seen from comparing resultIt is embedded in the method for the present invention smaller than existing method to the change of video quality after watermark, therefore the present invention can more preferably meet realityThe demand of border application.
(2) structural similarity (structural similarity index, abbreviation SSIM)
Fig. 7 is compared by recording the SSIM values of video frame in compression process each time by taking table tennis video sequence as an exampleCompared with the method for the present invention and existing method through excessive second compression picture damaged condition after video is embedded in watermark.From figure 7 it can be seen thatAfter being respectively embedded into watermark with the method for the present invention and existing method, speed that video quality damages in weight compression process has largerDifference, with the method for the present invention be embedded in watermark video in multiple compression process video quality damage it is slower, disclosure satisfy thatThe protection of video quality.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not toThe limitation present invention, all within the spirits and principles of the present invention made by all any modification, equivalent and improvement etc., should all includeWithin protection scope of the present invention.