Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is further described, the particular technique details hereinafter mentioned, such as:Method, equipment etc., are only better understood from reader
Technical scheme, does not represent that present invention is limited only by following ins and outs.
The embodiment provides a kind of robust video watermark is embedded and extracting method, equipment and its storage device,
Passing through will.Referring to Fig. 1, Fig. 1 is the overall flow figure of the insertion of robust video watermark and extracting method in the embodiment of the present invention, institute
State method and realize that specific steps include by a kind of insertion of robust video watermark and extraction equipment:
S101:Binary watermarking (can be BMP format-patterns) is read in adjustment.
S102:Storing pixel values;With array W [k] storing pixel values;Number of pixels M=XY, X are the length of watermark, and Y is
The width of watermark.
S103:Expand pixel value and insert and start over flag bit;The rule expanded the W [k] be W [0]=
0, W [1]=1, W [2]=0, W [3]=1 ..., W [k+4]=W [k] ..., W [M+4]=0, W [M+5]=1, W [M+6]=0, W
[M+7]=0, the expansion insert flag bit.
S104:Obtain the frame of video and set the threshold value of pixel access average;For more preferable invisibility, color is chosen
Informative frame.Pixel access includes red pixel passage PR, green pixel passage PGAnd blue pixel passage PB;The picture
The threshold value of plain passage average is (50,200);Wherein,M, N
For the length and width of a two field picture, P (x, y) is the pixel value of coordinate (x, y).
S105:Screening pixel access average meets the frame of threshold value as embedded object.
S106:Obtain the left side edge pixel abscissa value T of frame for meeting threshold value;Using sobel operators to video longitudinal direction
It is T that edge, which is detected to obtain pixel abscissa minimum value,;The rim detection uses matrixTo regarding
Frequency frame carries out convolution.
S107:The frame of video for embedding a watermark into acquisition obtains the video containing watermark;The insertion of watermark is carried out by following formula
Wherein, P (T, y) represents frame of video T row, and the rgb pixel value of y rows, 0 represents black, and 1 represents white.
S108:Parse the video acquisition frame of video containing watermark.
S109:Obtain the leftmost side edge pixels abscissa value T of frame of video.
S110:Detect the watermark symbol sequence in T row.
S111:Watermark is extracted by pixel access average;By following formula reduction W [k]
Wherein, PB(T, k) is the average of coordinate (T, k) point pixel blueness (passivation degree is high) passage.Then, mark is removed
Position, obtain the W [k] of raw water print, onestep extraction watermark of going forward side by side.
Referring to Fig. 2, Fig. 2 is the enlarged drawing of the frame after the embedded watermark of the present invention, wherein:201 represent 0 (black), and 202 represent
1 (white).
Referring to Fig. 3, Fig. 3 is that frame of video left side edge detects schematic diagram before watermark is embedded in the embodiment of the present invention, wherein:
The leftmost side edge that 301 expressions detect, the edge for the other positions that 302 expressions detect.
Referring to Fig. 4, Fig. 4 is the frame of video left side edge detects schematic diagram after embedded watermark in the embodiment of the present invention, wherein:
401 represent the leftmost side edge that detects, and white line part is other edges detected in figure.
Referring to Fig. 5, Fig. 5 is the video comparison diagram that watermark insertion is front and rear in the embodiment of the present invention, wherein:501 represent insertion
Video before watermark, 502 represent the video after embedded watermark.It is it can be seen that not any to video pictures after embedded watermark
Influence.
Referring to Fig. 6, Fig. 6 is the hardware device operating diagram of the embodiment of the present invention, and the hardware device specifically includes:One
The insertion of kind robust video watermark and extraction equipment 601, processor 602 and storage device 603.
The insertion of robust video watermark and extraction equipment 601:A kind of robust video watermark is embedded and extraction equipment 601 is real
A kind of existing robust video watermark insertion and extracting method.
Processor 602:The processor 602 load and perform the instruction in the storage device 603 and data be used for it is real
A kind of existing described robust video watermark insertion and extracting method.
Storage device 603:The store instruction of storage device 603 and data;The storage device 603 is described for realizing
A kind of robust video watermark is embedded and extracting method.
By performing embodiments of the invention, all technical characteristics in the claims in the present invention are obtained for detailed explain
State.
Prior art is different from, the embodiment provides a kind of insertion of robust video watermark and extracting method, is set
Standby and its storage device, by the way that the leftmost side edge of video will be embedded in after watermark progress binary-coding by ad hoc rules, reach branch
Hold video stream media Real-time embedding and extraction (inverse embedded).Simultaneously as embedding method has used video pixel and watermark pixel
Equity rule, protective capacities of the watermark to compression and the attack such as reproduction (including but is not limited to) can be effectively improved.That is, improve
The robustness of watermark.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.