CN106097237A - The embedding grammar of image watermark and extracting method and associated method - Google Patents

The embedding grammar of image watermark and extracting method and associated method Download PDF

Info

Publication number
CN106097237A
CN106097237A CN201610352984.9A CN201610352984A CN106097237A CN 106097237 A CN106097237 A CN 106097237A CN 201610352984 A CN201610352984 A CN 201610352984A CN 106097237 A CN106097237 A CN 106097237A
Authority
CN
China
Prior art keywords
watermark
vector
image
coefficient matrix
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610352984.9A
Other languages
Chinese (zh)
Other versions
CN106097237B (en
Inventor
关虎
张桂煊
曾智
刘杰
张树武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN201610352984.9A priority Critical patent/CN106097237B/en
Publication of CN106097237A publication Critical patent/CN106097237A/en
Application granted granted Critical
Publication of CN106097237B publication Critical patent/CN106097237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0092Payload characteristic determination in a watermarking scheme, e.g. number of bits to be embedded

Abstract

The invention discloses the embedding grammar of a kind of image watermark, the extracting method of image watermark, digital media copyright protection method and digital media rights method for tracing.Wherein, the embedding grammar of image watermark includes watermark being converted into as required watermark binary sequence;Described watermark binary sequence is carried out spread spectrum operation based on key, determines spread-spectrum watermark vector;The image of watermark to be embedded is carried out self adaptation piecemeal;Based on described self adaptation piecemeal, the image of described watermark to be embedded is carried out multilevel discrete cosine transform, determines the first transform coefficient matrix;Based on described first transform coefficient matrix, construction feature vector, and described spread-spectrum watermark vector is embedded described characteristic vector;The inverse discrete cosine transformation etc. that the characteristic vector embedding spread-spectrum watermark vector carries out coefficient reset and coefficient matrix is processed, determines the image embedding watermark.The embodiment of the present invention improves watermark invisibility, robustness and safety, weakens the risk that watermark is identified and is maliciously wiped.

Description

The embedding grammar of image watermark and extracting method and associated method
Technical field
The present embodiments relate to digital media rights resist technology field, be specifically related to the embedding side of a kind of image watermark Method, the extracting method of image watermark, digital media copyright protection method and digital media rights method for tracing.
Background technology
In recent years, developing rapidly, on network or various terminal unit along with Internet technology and digital media technology There is substantial amounts of digital media content resource (such as: text, image, audio frequency and video etc.), user can be easily to these numbers Word media content carries out replicating, revise, propagate and using, and therefore, the copyright protection of digital media content is increasingly caused Art circle and the common concern of business circles.During solving this problem, it is a kind of quilt that digital media content adds watermark Widely used technological means.Digital watermark technology is by being embedded in Digital Media by the identifier representing its copyright information Rong Zhong so that it is follow digital media content and propagate together and use, but identifier can during media content is modified Keep its integrity wherein, the when of necessary, digital media content copyright can be carried out by the extraction of identifier and comparison Tracking and certification, thus for digital media content copyright protection with infringement follow the trail of provide a kind of strong technical thought and Scheme.Through the development of decades, digital watermark technology has been achieved for certain achievement in research, but technically with in application Still suffer from some shortcomings.
The position that digital figure watermark algorithm embeds according to watermark can be divided into spatial-domain algorithm and transform-domain algorithm.Space Being mainly characterized by by the direct pixel domain coefficient revising image or by adjusting the statistic of image pixel value of territory algorithm Realizing watermark to embed, this kind of algorithm principle is simple, it is very fast to realize, but the ability that opposing image procossing is attacked is poor, and base This does not have the ability of opposing geometric attack;Transform-domain algorithm be by by image pixel fields transformation of coefficient to certain frequency domain (mainly including discrete Fourier transform territory, discrete cosine transform domain, wavelet transform territory and singular value decomposition etc.), then According to certain specific rules modification frequency domain coefficient, thus reaching to embed the purpose of watermark, wherein some algorithm is always according to people The characteristic of class visual system, increases the modulation of visual masking model in watermark telescopiny, makes watermark invisibility further Improve;Also have watermarking algorithm based on spread spectrum communication and watermarking algorithm etc. based on dirty gauze trellis coding simultaneously;The most all multiple The algorithm of class all can improve the ability that watermark opposing image procossing is attacked to some extent, but for rotating, scale, upset etc. Geometric attack, above-mentioned algorithm does not has resistivity substantially.
Along with the development further of digital image watermarking technology and further expanding of application, current image watermark is calculated The research emphasis of method be concentrated mainly on raising the algorithm resistivity aspect to geometric attack, it has been suggested that algorithm be roughly divided into Four classes: one is algorithm based on geometry field of invariants, the ability of this kind of algorithm opposing geometric attack is relatively strong, but in geometric transformation with anti- Conversion process can introduce the operations such as substantial amounts of interpolation arithmetic and data truncation, the visual quality of image is had considerable influence, this Also it is the main reason hindering this kind of algorithm to develop further;Two is algorithm based on image normalization, and this kind of algorithm also can Enough resist to a certain extent rotations, scale, the geometric attack such as upset, but theoretical and experiment shows, this algorithm is just for pros The standardization effect of shape image is preferable, standardizes rectangle diagram picture it is difficult to ensure that concordance before and after attacking, and this allows for The range of application of this kind of algorithm is greatly limited, and meanwhile, the introducing of a large amount of interpolation arithmetics also can make this kind of algorithm to image Visual quality have considerable influence;Three be based on template embed and the algorithm mated, this kind of algorithm due to template use significantly Improve the ability of algorithm opposing geometric attack, but a prominent question is that the template point embedded is easy to be parsed out And maliciously wiped, thus losing synchronization mechanism, this is also that this kind of algorithm can not be applied directly to real figure copyright protection Main reason in system;Four is the algorithm based on image characteristic point and characteristic area, and this kind of algorithm can support better Anti-rotation, scaling etc. are attacked, but due to the particularity of such algorithm, most algorithms broadly fall into spatial-domain algorithm, opposing figure More weak as processing the ability attacked, on the other hand, the accuracy of feature point extraction is relied on relatively big by the performance of such algorithm, also makes Obtain the attack tolerant of this kind of algorithm by bigger restriction.
In view of this, the special proposition present invention.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of image watermark solving the problems referred to above at least in part Embedding grammar.Additionally, also provide for the extracting method of a kind of image watermark, digital media copyright protection method and Digital Media version Power method for tracing.
To achieve these goals, according to an aspect of the invention, it is provided techniques below scheme:
The embedding grammar of a kind of image watermark, the method may include that
As required watermark is converted into watermark binary sequence;
Described watermark binary sequence is carried out spread spectrum operation based on key, determines spread-spectrum watermark vector;
The image of watermark to be embedded is carried out self adaptation piecemeal;
Based on described self adaptation piecemeal, the image of described watermark to be embedded is carried out multilevel discrete cosine transform, determine One transform coefficient matrix;
Based on described first transform coefficient matrix, construction feature vector, and described spread-spectrum watermark vector is embedded described spy Levy vector;
The characteristic vector embedding spread-spectrum watermark vector is carried out the inverse discrete cosine transformation of coefficient reset and coefficient matrix Process, to determine the image embedding watermark.
To achieve these goals, according to another aspect of the present invention, the extraction side of a kind of image watermark is additionally provided Method, the method may include that
The length of the watermark binary sequence extracted as required generates random code book;
Described random code book is carried out vector orthogonalization;
The image of watermark to be extracted is carried out self adaptation piecemeal;
Based on described self adaptation piecemeal, the image of described watermark to be extracted is carried out multilevel discrete cosine transform, determine Two transform coefficient matrixs;
Based on described second transform coefficient matrix, determine the characteristic vector of the image of described watermark to be extracted;
Ask for the relevance values of each vector in the random code book after described characteristic vector and orthogonalization, and according to feature to Measure with orthogonalization after random code book in the symbol of relevance values of each vector determine that the watermark sequence on correspondence position divides Amount.
To achieve these goals, according to a further aspect of the invention, a kind of digital media rights protection is additionally provided Method, the method may include that
Obtain digital media rights information;
Use the embedding grammar of above-mentioned image watermark, described digital media rights information is embedded and described copyright information pair In the image answered, it is achieved digital media rights is protected.
To achieve these goals, according to a further aspect of the invention, additionally provide a kind of digital media rights to follow the trail of Method, the method may include that
Obtain the image containing digital media rights information;
Use the extracting method of above-mentioned image watermark, from described image, extract described digital media rights information, it is achieved Tracking to described digital media rights.
Compared with prior art, technique scheme at least has the advantages that
The embodiment of the present invention is by using binary sequence as original watermark sequence;Then watermark binary sequence is carried out base In the spread spectrum operation of key, determine spread-spectrum watermark vector;Then the image of watermark to be embedded is carried out self adaptation piecemeal;Again based on Self adaptation piecemeal, carries out Block DCT (Discrete Cosine to the image of watermark to be embedded Transformation, DCT) and the overall DCT of part coefficient, operated by multistage DCT and specific coefficient is chosen and arranged Row mode, determines the first transform coefficient matrix;Based on the first transform coefficient matrix, construction feature vector, and by spread-spectrum watermark to Amount repeats to embed in multiple characteristic vector;Finally the characteristic vector embedding spread-spectrum watermark vector is carried out coefficient reset and coefficient The inverse discrete cosine transformations of matrix etc. process, and determine the image embedding watermark.The method that the embodiment of the present invention proposes is by image Piecemeal DCT combines with overall situation DCT, by multi-stage transformation by watermark information snugly embedded images content, targetedly Select amendment conversion coefficient, repeat to embed watermark information, it is possible to watermark be distributed on the different frequency of image, improve watermark Invisibility;Wherein, by the analysis to DCT character, conversion coefficient is selected and in arrangement mode and spread spectrum operation to Amount orthogonalization, the introducing of unitization operation, (opposing image procossing is attacked, geometric attack, even combination are attacked to make watermark robustness The ability hit) significantly improve;By introducing spread spectrum operation based on symmetric key, improve the safety that the embodiment of the present invention processes Property, weaken the risk that watermark is identified and is maliciously wiped.Achieve hidden embedding and the Blind extracting of image watermark.Necessarily Solve image in degree and propagate the copyright protection during using and the problems such as tracking of encroaching right.
Certainly, the arbitrary product implementing the present invention is not necessarily required to realize all the above advantage simultaneously.
Other features and advantages of the present invention will illustrate in the following description, and, partly become from description Obtain it is clear that or understand by implementing the present invention.Objectives and other advantages of the present invention can be by the explanation write Method specifically noted in book, claims and accompanying drawing realizes and obtains.
Accompanying drawing explanation
Accompanying drawing, as the part of the present invention, is used for providing further understanding of the invention, and the present invention's is schematic Embodiment and explanation thereof are used for explaining the present invention, but do not constitute inappropriate limitation of the present invention.Obviously, the accompanying drawing in describing below It is only some embodiments, to those skilled in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawings are obtained according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of the embedding grammar according to the image watermark shown in an exemplary embodiment;
Fig. 2 is the 0-1 sequence diagram according to 128 bits shown in an exemplary embodiment;
Fig. 3 a be embed according to the image watermark shown in an exemplary embodiment or extract during the choosing of a kind of coefficient Position and ordering schematic diagram;
Fig. 3 b be embed according to the image watermark shown in an exemplary embodiment or extract during corresponding with Fig. 3 a another The chosen position of a kind of coefficient and ordering schematic diagram;
Fig. 4 a is according to embedding the image before watermark shown in an exemplary embodiment;
Fig. 4 b is according to embedding the image after watermark shown in an exemplary embodiment;
Fig. 5 is the schematic flow sheet of the extracting method according to the image watermark shown in an exemplary embodiment;
Fig. 6 a is according to being through quality factor containing watermarking images for shown in Fig. 4 b shown in an exemplary embodiment Schematic diagram after the JPEG compression of 60%;
Fig. 6 b be according to shown in an exemplary embodiment for shown in Fig. 4 b containing watermarking images through 3 × 3 average filter Schematic diagram after ripple;
Fig. 6 c be according to shown in an exemplary embodiment for shown in Fig. 4 b containing watermarking images through 3 × 3 intermediate value filter Schematic diagram after ripple;
Fig. 6 d be according to shown in an exemplary embodiment for image shown in Fig. 4 b through average be 0, variance be 0.02 Gauss noise after schematic diagram;
Fig. 6 e be according to shown in an exemplary embodiment for image shown in Fig. 4 b through energy be the Salt& of 0.05 Schematic diagram after Pepper noise;
Fig. 6 f be according to shown in an exemplary embodiment for image signal after histogram equalization shown in Fig. 4 b Figure;
Fig. 6 g be according to shown in an exemplary embodiment brightness of image shown in Fig. 4 b is reduced to original 60% after Schematic diagram;
Fig. 6 h be according to shown in an exemplary embodiment brightness of image shown in Fig. 4 b is promoted to original 200% after Schematic diagram;
Fig. 7 a be according to shown in an exemplary embodiment by image schematic diagram after flip horizontal shown in Fig. 4 b;
Fig. 7 b be according to shown in an exemplary embodiment by image schematic diagram after flip vertical shown in Fig. 4 b;
Fig. 7 c be according to shown in an exemplary embodiment by image shown in Fig. 4 b through scaling factor be the scaling of 50% After schematic diagram;
Fig. 7 d be according to shown in an exemplary embodiment by the most postrotational through 90 degree of image shown in Fig. 4 b Schematic diagram;
Fig. 7 e be according to shown in an exemplary embodiment by image shown in Fig. 4 b through zoom factor be the signal of 0.8 Figure;
Fig. 7 f be according to shown in an exemplary embodiment by image shown in Fig. 4 b through aspect ratio be 0.8 × 1.4 draw Schematic diagram after stretching.
These accompanying drawings and word describe and are not intended as limiting by any way the concept of the present invention, but pass through reference Specific embodiment is that those skilled in the art illustrate idea of the invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings and the specific embodiment technical side that the embodiment of the present invention solved the technical problem that, is used The technique effect of case and realization carries out clear, complete description.Obviously, described embodiment is only of the application Divide embodiment, be not whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not paying creation Property work on the premise of, the embodiment of other equivalents all of being obtained or substantially modification all falls within protection scope of the present invention In.The embodiment of the present invention can embody according to the multitude of different ways being defined and covered by claim.
It should be noted that in the following description, understand for convenience, give many details.But it is the brightest Aobvious, the realization of the present invention can not have these details.
It should be noted that the most clearly limiting or in the case of not conflicting, each embodiment in the present invention and In technical characteristic can be mutually combined and form technical scheme.
The embodiment of the present invention provides the embedding grammar of a kind of image watermark.As it is shown in figure 1, the method may include that step S100 is to step S150.
Step S100: as required watermark is converted into watermark binary sequence.
Wherein, watermark can be the watermark representing copyright information, its form of expression variation.Watermark binary sequence refers to only The binary sequence being made up of 0 and 1.Fig. 2 schematically illustrates the 0-1 sequence of a kind of 128 bits.
If watermark itself is 0-1 binary sequence, then need not conversion;If watermark is not 0-1 sequence, can by character or Literal code converts thereof into 0-1 sequence.Such as: ASCII character can be converted characters to, then it is right that ASCII character is converted into it The binary code answered;Text conversion can become the standard word symbol of its correspondence, then character code is converted into the two of its correspondence enters Code processed.
Step S110: watermark binary sequence is carried out spread spectrum operation based on key, it is thus achieved that spread-spectrum watermark vector.
In this step, the watermark binary sequence got being carried out spread spectrum operation can make the energy representated by watermark believe Breath more disperses, and is so conducive to embodying invisibility and the robustness of watermark.
Specifically, this step may include that step S111 is to step S113.
Step S111: based on key, generates a series of random number, and a series of randoms number is arranged in two-dimemsional number in order According to matrix, form random code book.Wherein, the columns of random code book is more than or equal to line number.
In this step, using key key as the seed of randomizer, generate a series of random number accordingly.Pass through Key key is set, improves safety, it can be ensured that correct watermark cannot be extracted in the case of using false key Information.
Every a line of random code book represents a random vector.The length of random vector can be set as L (namely with The columns of machine code book).The line number (the namely number of random vector) of random code book and the length of watermark sequence (0-1 binary sequence) Spend identical (can be set as n here).Here, L Yu n meets following condition: L not less than n.By arranging between above-mentioned L and n Relation, can facilitate follow-up operation.Thus, above-mentioned random code book i.e. the two-dimensional random matrix of n row L row.
As example, in the case of characterizing copyright information with watermark binary sequence, a length of 128 bits (bits) 0-1 sequence can realize description more comprehensive to copyright information substantially.So, in reality is implemented, it can be assumed that watermark two-value The greatest length of sequence is 128bits.Based on this it is assumed that be not less than the condition of n for meeting L, it is preferable that L takes 128.If water The length of print binary sequence, can be by the length of random vector, watermark embedment strength in regulation random code book more than 128bits The embedded length watermark binary sequence more than 128bits is carried out etc. parameter.
Those skilled in the art will be understood that above-mentioned hypothesis is only used to the present invention is better described, and it is right to be not construed as The restriction of scope.
Step S112: the vector in random code book is orthogonalized with unitization.
In this step, orthogonalized purpose is to make each vector in random code book keep independence between any two, it is possible to Play the effect strengthening watermark robustness.Unitization purpose is that the L2 norm making each vector is 1, it is simple to embodiment of the method In the self-adaptative adjustment of other parameters.
In actual implementation process, it is, for example possible to use Schmidt process is to the institute's directed quantity in random code book It is orthogonalized, and each vector after orthogonalization is carried out unitization.
It is more than or equal to vector number n owing to defining the vector length L in random code book in above-mentioned steps, so, this Step can ensure that the correct execution of vector orthogonalization procedure in random code book.
Step S113: based on orthogonalization and unitization vector, according to below equation, determines that spread-spectrum watermark is vectorial:
SsW=[β01,…,βL-1]
Wherein, ssW represents spread-spectrum watermark vector;βiRepresent the i-th component in spread-spectrum watermark vector;pkiRepresent random code Vector in Ben through orthogonalization and unitization after the i-th component of kth unit vector;αkRepresent the in watermark sequence K component;I=0,1 ..., L-1;K=0,1 ..., n-1.
The spread-spectrum watermark vector determined in this step i.e. spread-spectrum watermark sequence.The method that the embodiment of the present invention proposes is i.e. It is that this spread-spectrum watermark vector is embedded in image.
Citing below describes the process determining spread-spectrum watermark vector in detail.
Assume that watermark sequence (namely original watermark sequence) is W0=[α0, α1..., αn-1], wherein, αj∈ { 0,1}, j= 0,1 ..., n-1, a length of n of this watermark sequence.
Process according to below equation:
Determine: ssW=[β01,…,βL-1]。
Wherein, ssW represents spread-spectrum watermark vector;L represents the length of spread-spectrum watermark vector;βiRepresent in spread-spectrum watermark vector I-th component;pkiRepresent vector in random code book through orthogonalization and unitization after the i-th of kth unit vector Component;αkRepresent the kth component in watermark sequence.
Step S120: the image of watermark to be embedded is carried out self adaptation piecemeal.
Specifically, this step may include that
Step S121: determine that the first height of the image of watermark to be embedded and the first width the most all can be divided exactly by K, its In, K takes the length of the spread-spectrum watermark vector square more than or equal to 8 times of positive integer and K;The most then perform step S122;No Then, step S123 and step S124 are performed.
Step S122: the image of watermark to be embedded is divided into non-overlapping copies, K × K equivalently-sized self adaptation piecemeal, Wherein, third height and the 3rd width of each self adaptation piecemeal meet respectively: third height is equal to the ratio of the first height and K, the Three width are equal to the ratio of the first width with K.
Step S123: according to the first height and the first width of the image of watermark to be embedded, the image to watermark to be embedded Carry out little yardstick amplification, calculate little yardstick amplify after watermark to be embedded image second height and the second width, wherein, Second height and the second width are the minimum positive integer meeting following condition: (1) second height and the second width all can be whole by K Remove, K square more than or equal to 8L, L represent spread-spectrum watermark vector length;(2) second height and the second width are respectively greater than In the first height and the first width.
Wherein, carry out little yardstick and amplify the consistent size of the self adaptation piecemeal that subsequent step can be made to be partitioned into, Jin Erke To improve the robustness of watermark.
Above-mentioned condition (1) and (2) are set, all being the same size of the self adaptation piecemeal after subsequent step segmentation can be made, K's The arranging of span can make the self adaptation piecemeal will not be the least, such that it is able to guarantee intactly to be embedded in image watermark.
It should be noted that the above-mentioned mode carrying out little yardstick amplification is only for example, the most existing or may go out from now on The mode that existing little yardstick amplifies, as long as it meets above-mentioned condition (1) and (2), also should be included in protection scope of the present invention Within, and be herein incorporated by reference at this.
Step S124: the image of watermark to be embedded after little yardstick is amplified be divided into non-overlapping copies, equivalently-sized K × K self adaptation piecemeal, wherein, third height and the 3rd width of each self adaptation piecemeal meet respectively: third height is equal to second Height and the ratio of K, the 3rd width is equal to the second width and the ratio of K.
Different from the partitioned mode that current existing major part watermark embedding method uses " fixed block size ", carry here To " self adaptation " refer to the number of blocking process fixed block, self adaptation determines the size of piecemeal, so can significantly improve The ability of the attacks such as watermark opposing picture size change.
Citing below is treated and is embedded the image of watermark and carry out little yardstick amplification and carry out the process of self adaptation piecemeal and carry out in detail Describe in detail bright.
The height assuming the image of watermark to be embedded is oH, width is oW, and after carrying out little yardstick amplification, the height of image is SH, width are sW.Wherein, sH and sW is the minimum positive integer meeting following condition: (1) all can be divided exactly by K, K square not The length of spread-spectrum watermark sequence is represented less than 8L, L;(2) sH, sW are respectively not less than oH, oW.
In order to ensure in watermark energy embedded images, the value of K needs to meet: K square not less than 8L.Preferably, K is Little value is 32.
After carrying out little yardstick amplification, the image of watermark to be embedded is divided into K × K self adaptation piecemeal, Mei Gefen The height bH and width bW of block are respectively as follows: bH=sH/K, bW=sW/K.
It should be noted that above-mentioned being obtained from adapts to the mode of piecemeal and be only for example, the most existing or may go out from now on Existing is obtained from the mode adapting to piecemeal, if meeting above-mentioned width and the segmentation condition of height, the most also should be included in the present invention's Within protection domain, and it is herein incorporated by reference at this.
Step S130: based on self adaptation piecemeal, the image of watermark to be embedded is carried out multilevel discrete cosine transform, determines One transform coefficient matrix.
Specifically, this step may include that step S131 is to step S133.
Step S131: each self adaptation piecemeal is carried out two-dimension discrete cosine transform respectively, determines the first discrete cosine transform Coefficient matrix.
This step carries out two-dimensional dct process respectively to K × K the self adaptation piecemeal determined by above-mentioned steps, determines K × K Individual DCT coefficient matrix.
Step S132: choose r row in each self adaptation piecemeal, the first discrete cosine transform coefficient of r row, builds the One Block DCT coefficient matrix, wherein, r is even number and represents medium and low frequency or the first of medium-high frequency in self adaptation piecemeal Discrete cosine transform coefficient.
In this step, each self adaptation piecemeal from K × K self adaptation piecemeal takes out a discrete cosine respectively and becomes Changing coefficient, just constituting a size is the coefficient matrix of K × K.
Here, the line number of dct coefficient matrix and row number start note from 0, and the size of each piecemeal is the most identical. Along with line number and the increase of row number of dct coefficient matrix, the frequency of DCT coefficient is in rising trend, needs to ensure to be somebody's turn to do Discrete cosine transform coefficient is in the centre position of matrix, it is impossible to too low or too high, so, the coefficient of r position is that self adaptation is divided Medium and low frequency or the first discrete cosine transform coefficient of medium-high frequency in block.
Step S133: the first Block DCT coefficient matrix is carried out overall situation discrete cosine transform and processes, determine First transform coefficient matrix.
The size that above-mentioned steps is determined by this step is coefficient matrix (the i.e. first Block DCT coefficient of K × K Matrix) carry out overall situation DCT process, it may be determined that and size is the conversion coefficient square formation (the i.e. first transform coefficient matrix) of K × K.
Step S140: based on the first transform coefficient matrix, construction feature vector, and spread-spectrum watermark vector is embedded feature to Amount.
This step specifically may include that step S141 is to step S144.
Step S141: based on the first transform coefficient matrix, according to following constraints, extracts the coefficient of characteristic vector:
(1) coefficient in the characteristic vector extracted is that in the first transform coefficient matrix, row, column number is on even number position Coefficient;
(2) in two characteristic vectors extracted, two coefficients in the sequence of same position are about the first main diagonal angle of transform coefficient matrix Line is symmetrical or simultaneously the most all on leading diagonal and misaligned.
Step S142: according to the coefficient extracted according to constraints (1), (2), build respectively first eigenvector, second Characteristic vector.
Step S143: calculate first eigenvector and the coefficient meansigma methods of second feature vector respectively, be designated as first respectively Coefficient meansigma methods and the second coefficient meansigma methods.
It should be understood that
First, carry out extraction coefficient according to above-mentioned constraints, just may insure that synchronicity during watermark extracting.Such as Fig. 3 a and Shown in Fig. 3 b, it is numbered the coefficient of 1-8 all on the leading diagonal of the first transform coefficient matrix, and position non-overlapping copies, simultaneously Fig. 3 a and Fig. 3 b is numbered the coefficient of 9-128 the most not on the leading diagonal of the first transform coefficient matrix, but Fig. 3 a and Fig. 3 b In the position of coefficient of identical label (9-128) be symmetrical about matrix leading diagonal;
Second, the coefficient extracted position in the first transform coefficient matrix is that line number is on even number position with row number Data, here the line number of the first transform coefficient matrix and row number from 0 start note, this be based on DCT coefficient in geometric transformation The character shown determines;
3rd, when selecting coefficient according to the rule of constraints (1) and (2), the number that coefficient is chosen is come according to the value of L Determine, it is not necessary to the data meeting condition are all extracted, it is ensured that the length of each characteristic vector determined is equal to L i.e. Can;
4th, Fig. 3 a and Fig. 3 b schematically illustrates selection and the arrangement mode (L of a kind of coefficient meeting above-mentioned rule =128), but the present invention is not limited solely to the mode in diagram, can be that any one meets the coefficient of above-mentioned constraints Choose and arrangement mode.
Step S144: combine the first coefficient meansigma methods and the second coefficient meansigma methods, is respectively embedded into by spread-spectrum watermark vector One characteristic vector and second feature vector.
In a preferred embodiment, it is assumed that spread-spectrum watermark vector representation is ssW=[β01,…,βL-1];First is special Levy vector or second feature vector representation is V=[v0,v1,…,vL-1];Embed the first eigenvector after spread-spectrum watermark vector or Second feature vector representation is V'=[v0',v1',…,vL-1']。
Wherein, the length of vector ssW, V and V' is L.
Embedding process is carried out according to below equation:
vi'=vi+δ·value·βi
Wherein, i=0,1 ..., L-1;δ represents watermark embedment strength;AVal takes val_1 or val_2;Val_1 represents first Coefficient meansigma methods;Val_2 represents the second coefficient meansigma methods.
Preferably, δ takes 175.As such, it is possible to preferably weigh invisibility and the robustness of watermark.
Those skilled in the art will be understood that above-mentioned hypothesis is only only for example, and is not construed as inappropriate limitation of the present invention.
It can be seen that the value of value carries out adaptive according to the coefficient overall distribution in characteristic vector from above-described embodiment Should select on ground, when aVal is in different intervals, the value of selected value is the most different.So can make embedding Watermark reaches well to weigh between robustness and invisibility.
Step S150: the characteristic vector embedding spread-spectrum watermark vector is carried out the inverse discrete of coefficient reset and coefficient matrix Cosine transforms etc. process, and determine the image embedding watermark.
This step specifically may include that
Step S151: replace respectively with the coefficient embedded in the vectorial first eigenvector of spread-spectrum watermark and second feature vector Change the coefficient on relevant position in the first transform coefficient matrix, determine the first transform coefficient matrix after embedding watermark.
The coefficient that this step will embed in two characteristic vectors after watermark puts back into the first transform coefficient matrix the most again Relevant position, to replace the coefficient on origin-location, so that it is determined that embedding size after watermark is the matrix (square formation) of K × K. Here the relevant position in the first transform coefficient matrix and step S142 are extracted position selected during two characteristic vectors and Order is identical.
Step S152: the first transform coefficient matrix after embedding watermark is carried out overall situation inverse discrete cosine transformation and processes, really Determine the coefficient matrix after inverse transformation, i.e. embed the first Block DCT coefficient matrix after watermark.
Step S153: with the coefficient embedded in the first Block DCT coefficient matrix after watermark replace first from Dissipate the coefficient on each self adaptation piecemeal r row, r column position in cosine transform coefficient matrix, determine the after embedding watermark One dct coefficient matrix.
Here each coefficient in the first Block DCT coefficient matrix after watermark is embedded in corresponding piecemeal Position refer in step S132 in each piecemeal r row, r row position.
If image to watermark to be embedded does not carries out little yardstick processing and amplifying in abovementioned steps, then perform step S154;Otherwise, step S155 and step S156 are performed.
Step S154: the first dct coefficient matrix after embedding watermark is carried out piecemeal inverse discrete cosine transformation Process, determine the image embedding watermark.
Step S155: the first dct coefficient matrix after embedding watermark is carried out piecemeal inverse discrete cosine transformation Process, determine the enlarged drawing picture after embedding watermark.
Step S156: the enlarged drawing picture after embedding watermark is contracted to the size identical with the image of watermark to be embedded, from And determine the image embedding watermark.
As shown in Figs. 4a and 4b, Fig. 4 a schematically illustrates the image embedded before watermark;Fig. 4 b is exemplarily illustrated Embed the image after watermark.Wherein, the size of two width figures is 512 × 512.
The embedding grammar of image watermark is described below in detail with a preferred embodiment.
As a example by Fig. 2, Fig. 3 a, Fig. 3 b and Fig. 4 a, said method is described in detail.
Sets itself key value key.The present embodiment uses the watermark sequence of 128 bits shown in Fig. 2.Definition random code book A length of the 128 of middle vector.Use the width shown in Fig. 4 a and be highly the image of 512 and carry out watermark embedding.
Step S201: watermark is converted into the watermark binary sequence of 128 bits.(watermark sequence shown in Fig. 2 has been 0- 1 binary sequence, it is convenient to omit this step)
Step S202: based on key, generates random code book.
Step S203: the vector in random code book is orthogonalized with unitization.
Step S204: based on orthogonalization and unitization vector, the watermark binary sequence of 128 bits is carried out at spread spectrum Reason, determines the spread-spectrum watermark vector of a length of 128.
Step S205: the image of watermark to be embedded is fixed the self adaptation piecemeal of piecemeal number.Wherein, self adaptation is divided The width of block and be highly 16.
Step S206: the image adaptive piecemeal of each the 16 × 16 of image is carried out DCT operation, extracts each self adaptation One low frequency components composition size of piecemeal is the square formation of 16 × 16, and wherein, the position r of low frequency components takes 6.
Step S207: the square formation to 16 × 16 carries out overall situation DCT process.
Step S208: choose mode according to the coefficient shown in Fig. 3 a and Fig. 3 b and ordering choose respectively two features to Amount.
Step S209: calculate the coefficient meansigma methods of two characteristic vectors.
Step S210: attachment coefficient meansigma methods, distinguishes the most embedding with the watermark embedment strength that value is 175 by spread-spectrum watermark vector Enter in two characteristic vectors.
Step S211: replace the first conversion coefficient respectively with the coefficient in two characteristic vectors embedding spread-spectrum watermark vector Coefficient on relevant position in matrix, determines the matrix after embedding watermark.
Step S212: the matrix after embedding watermark is carried out overall situation inverse discrete cosine transformation and processes, after determining inverse transformation Coefficient matrix, i.e. embeds the first Block DCT coefficient matrix after watermark.
Step S213: replace respectively with each coefficient in the first Block DCT coefficient matrix after embedding watermark Change the coefficient on the r row of each piecemeal, r column position in the first dct coefficient matrix, after determining embedding watermark The first dct coefficient matrix.
Step S214: the first dct coefficient matrix after embedding watermark is carried out piecemeal inverse discrete cosine transformation Process, determine the image embedding watermark, as shown in Figure 4 b.
The embodiment of the present invention also provides for the extracting method of a kind of image watermark.As it is shown in figure 5, the method may include that
Step S500: the length of the watermark binary sequence extracted as required generates random code book.
Step S510: random code book is carried out vector orthogonalization.
Wherein it is possible to utilize Schmidt process that the institute's directed quantity in code book is orthogonalized.To random code book After being orthogonalized, institute's directed quantity pairwise orthogonal in random code book and the number of vector with need the watermark two-value that extracts The length of sequence is identical (being n), and in code book, vector length is L, L not less than n.
Step S520: the image of watermark to be extracted is carried out self adaptation piecemeal.
Specifically, this step may include that
Step S521: determine that the 4th height of the image of watermark to be extracted and the 4th width the most all can be divided exactly by K;Its In, K take positive integer and K square more than or equal to the length of vector in the random code book of 8 times;The most then perform step S522;No Then, step S523 and 524 is performed.
Step S522: the image of watermark to be extracted is divided into non-overlapping copies, K × K equivalently-sized self adaptation piecemeal, Wherein, the 5th height of each self adaptation piecemeal and the 5th width meet respectively: the 5th height is equal to the ratio of the 4th height and K, the Five width are equal to the ratio of the 4th width with K.
Step S523: the image of watermark to be extracted is carried out little yardstick amplification, calculate little yardstick amplify after to be extracted 6th height and the 6th width of the image of watermark, wherein, the 6th height and the 6th width are just to meet the minimum of following condition Integer: (1) the 6th height and the 6th width all can be divided exactly by K, K square represents in random code book vector more than or equal to 8L, L Length;(2) the 6th height, the 6th width are respectively greater than equal to the 4th height, the 4th width.
Wherein, carry out little yardstick and amplify the consistent size of the self adaptation piecemeal that subsequent step can be made to be partitioned into, Jin Erke To improve the robustness of watermark.
Above-mentioned condition (1) and (2) are set, all being the same size of the self adaptation piecemeal after subsequent step segmentation can be made, K's The arranging of span can make the self adaptation piecemeal will not be the least, thus matches with watermark embedding method, it is possible to ensures smoothly Extract the watermark information contained in image.
It should be noted that the above-mentioned mode carrying out little yardstick amplification is only for example, the most existing or may go out from now on The mode that existing little yardstick amplifies, as long as it meets above-mentioned condition (1) and (2), also should be included in protection scope of the present invention Within, and be herein incorporated by reference at this.
Step S524: the image of watermark to be extracted after little yardstick is amplified be divided into non-overlapping copies, equivalently-sized K × K self adaptation piecemeal, wherein, the 5th height of each self adaptation piecemeal and the 5th width meet respectively: the 5th height is equal to the 6th Height and the ratio of K;5th width is equal to the ratio of the 6th width with K.
Match with the embedding grammar embodiment of image watermark in order to ensure the extracting method embodiment of image watermark, K's Value needs to meet: K square not less than 8L.Preferably, the minimum value of K is 32.
It should be noted that above-mentioned being obtained from adapts to the mode of piecemeal and be only for example, the most existing or may go out from now on Existing is obtained from the mode adapting to piecemeal, if meeting above-mentioned width and the segmentation condition of height, the most also should be included in the present invention's Within protection domain, and it is herein incorporated by reference at this.
Step S530: based on self adaptation piecemeal, the image of watermark to be extracted is carried out multilevel discrete cosine transform, determines Two transform coefficient matrixs.
Specifically, this step may include that step S531 is to step S533.
Step S531: each self adaptation piecemeal is carried out two-dimension discrete cosine transform respectively, determines the second discrete cosine transform Coefficient matrix.
This step carries out two-dimensional dct process respectively to K × K the self adaptation piecemeal determined by above-mentioned steps, determines K × K Individual DCT coefficient matrix.
Step S532: choose r row in each self adaptation piecemeal, the second discrete cosine transform coefficient of r row, builds the Two Block DCT coefficient matrixes, wherein, r is even number and represents the of medium and low frequency in self adaptation piecemeal or medium-high frequency Two discrete cosine transform coefficients.
In this step, each self adaptation piecemeal from K × K self adaptation piecemeal takes out a discrete cosine respectively and becomes Changing coefficient, just constituting a size is the coefficient matrix of K × K.
Here, the line number of dct coefficient matrix and row number start note from 0, and the size of each piecemeal is the most identical. Along with line number and the increase of row number of dct coefficient matrix, the frequency of DCT coefficient is in rising trend, needs to ensure to be somebody's turn to do Discrete cosine transform coefficient is in the centre position of matrix, it is impossible to too low or too high, so, the coefficient of r position is that self adaptation is divided Medium and low frequency or medium-high frequency coefficient in block, and in order to match with Image Watermarking embodiment, the value of r needs herein Keep consistent with the value of r in step S132 in Image Watermarking embodiment.
Step S533: the second Block DCT coefficient matrix is carried out overall situation discrete cosine transform and processes, determine Second transform coefficient matrix.
The size that above-mentioned steps is determined by this step is that the coefficient matrix of K × K carries out overall situation DCT process, it may be determined that big The little conversion coefficient square formation for K × K.
Step S540: based on the second transform coefficient matrix, determine the characteristic vector of the image of watermark to be extracted.
Specifically, this step may include that
Step S541: based on the second transform coefficient matrix, according to following constraints, extracts the coefficient of characteristic vector:
(1) coefficient in the characteristic vector extracted is that in the second transform coefficient matrix, row, column number is on even number position Coefficient;
(2) coefficient in the characteristic vector extracted is on the leading diagonal of the second transform coefficient matrix or at main diagonal angle The side of line.
Step S542: according to the coefficient extracted according to constraints (1), (2), determine the feature of the image of watermark to be extracted Vector.
In this step, a features described above vector namely coefficient vector.
It should be understood that
First, in condition (1) and (2), mode of choosing and the ordering of coefficient need to implement with Image Watermarking Coefficient in example chooses mode and ordering one_to_one corresponding, to ensure the synchronicity of watermark extracting;
Second, although have selected two characteristic vectors in the embedding grammar embodiment of image watermark, to carry out watermark respectively embedding Enter, but, in the extracting method embodiment of image watermark, have only to extract one of them characteristic of correspondence vector carry out water Print is extracted;As shown in Figure 3 a and Figure 3 b shows, Image Watermarking embodiment have employed and shown in this two width figure be Number chooses mode and arrangement mode, and the chosen position of the two is all on the leading diagonal of the first transform coefficient matrix or about master Diagonal is symmetrical, thus realizes watermark repeating in two characteristic vectors and embed;And in image watermark extracting method embodiment In, it is only necessary to select a kind of coefficient in Fig. 3 a or Fig. 3 b to choose according to above-mentioned rule and i.e. can reach watermark extracting with arrangement mode Purpose;
3rd, when selecting coefficient according to the rule of condition (1) and (2), the number that coefficient is chosen is come really according to the value of L Fixed, it is not necessary to the data meeting condition are all extracted, identical with the embedding grammar embodiment of image watermark, it is ensured that to obtain The length of characteristic vector equal to L;
4th, Fig. 3 a and Fig. 3 b schematically illustrates selection and the arrangement mode (L of the two kinds of coefficients meeting above-mentioned rule =128), may select a kind of mode therein during image zooming-out, but the present invention is not limited solely to the mode in diagram, permissible That any one coefficient meeting above-mentioned condition chooses mode and arrangement mode, if with the embedding grammar embodiment of image watermark There is corresponding relation in selected mode.
Step S550: ask for the relevance values of each vector in the random code book after characteristic vector and orthogonalization, and according to In random code book after characteristic vector and orthogonalization, the symbol of each vector correlation value determines the watermark sequence on correspondence position Row component.
In a preferred embodiment, it is assumed that the characteristic vector extracted is expressed as V*=[v0 *,v1 *,…,vL-1 *], long Degree is expressed as L;In random code book, the vector representation after i-th orthogonalization is Pi'=[p'i0,p'i1,…,p'i(L-1)], its length For L, wherein i=0,1 ..., n-1.
Watermark sequence component is determined according to below equation:
Then, watermark sequence is W'=[γ01,…,γn-1]。
Wherein, C () is the function of the relevance values seeking two identical vectors of length,A =[a0,a1,…,aL-1], B=[b0,b1,…,bL-1] it is two length one-dimensional vector of being L.
If characteristic vector and the relevance values of a certain vector in random code book are more than or equal to 0, it is determined that on correspondence position Watermark sequence component is 1, is otherwise 0.
It should be understood that the corresponding relation of symbol (plus or minus) and the watermark vector component (1 or 0) of relevance values here It is to be determined by the generating mode of spread-spectrum watermark vector in the embedding grammar embodiment of image watermark.If the embedding at image watermark Embodiment of the method use contrary mode generate spread-spectrum watermark vector, then dependency in the extracting method embodiment of image watermark The symbol of value also should be just the opposite with the corresponding relation of watermark vector component.
By two width images before and after the embedding watermark shown in comparison diagram 4a and Fig. 4 b, calculate the peak value noise of two width images Ratio (Peak Signal to Noise Ratio, PSNR), it is known that, PSNR=36.28dB, illustrate that the embodiment of the present invention is produced There is no obvious vision difference containing watermarking images and original image, the invisibility of this explanation watermark is preferable.Wherein, PSNR Computational methods are:Wherein, (i j) represents coordinate in original image to I For (i, the gray value of pixel j);I'(i, j) representing coordinate in the image after embedding watermark is (i, the ash of pixel j) Angle value;The height of M and N representative image respectively and width;Max (I (i, j)) is the maximum of all grey scale pixel values in image, Typically it is taken as 255.
The method and the above-mentioned parameter that utilize watermark extracting arrange and the image shown in Fig. 4 b are carried out watermark extracting, by former Beginning watermark sequence and the comparison of watermark sequence extracted understand watermark can completely, be correctly extracted (BER= 0.00%).
Here, according to below equation, calculate original watermark sequence W=[w1,w2,…,wn] and the watermark sequence W' that extracts =[w1',w2',…,wn'] between bit error rate (Bit Error Rate, BER):
Wherein,I=1,2 ..., n;N is the length of watermark sequence.
Fig. 6 a-Fig. 6 h schematically illustrate in the embodiment of the present invention shown in Fig. 4 b containing watermarking images at image Reason attack after containing watermarking images.Wherein, Fig. 6 a is the image after the JPEG compression of quality factor 60%;Fig. 6 b is for passing through Image after the mean filter of 3 × 3;Fig. 6 c is the image after the medium filtering of 3 × 3;Fig. 6 d for be 0 through average, side Difference is the image after the Gauss noise of 0.02;Fig. 6 e is the image after the Salt&Pepper noise that energy is 0.05;Figure 6f is the image after histogram equalization;Fig. 6 g is luminance-reduction to the image after original 60%;Fig. 6 h is luminance raising Image after original 200%.
Utilize the extracting method embodiment of image watermark the image after attacking is done watermark extracting and and original watermark carry out Comparison, obtains respective BER such as table one:
Table one:
Wherein, the type that figure number is the attack suffered by the diagram corresponding to this figure number shown in attack type one hurdle.
Fig. 7 a-7f schematically illustrate in the embodiment of the present invention shown in Fig. 4 b containing watermarking images after geometric attack Containing watermarking images.Wherein, Fig. 7 a is the image after flip horizontal;Fig. 7 b is the image after flip vertical;Fig. 7 c For the image after the scaling (resize) that scaling factor is 50%;Fig. 7 d is the counterclockwise postrotational figure through 90 degree Picture;Fig. 7 e is the image after the scaling (scale) that zoom factor is 0.8;Fig. 7 f for through aspect ratio be 0.8 × 1.4 Image after stretching.
Utilize the method that image watermark extracts the image after attacking is done watermark extracting and and original watermark compare, Obtain respective BER such as table two:
Table two:
Wherein, the figure number in attack type one hurdle represents the type of the attack suffered by the diagram corresponding to this figure number.
Table three schematically illustrate in the embodiment of the present invention shown in Fig. 4 b containing watermarking images after combination attacks Watermark extracting BER:
Table three:
Sequence number Attack type Watermark extracting BER (%)
1 90-degree rotation+scaling 0.6 counterclockwise 0.00
2 Scaling 0.7+ rotation turnback 0.00
3 Scaling 0.75+JPEG compression 60% 2.34
4 Scaling 0.75+ Gaussian noise variance 0.01 0.00
5 90-degree rotation+salt-pepper noise energy 0.02 counterclockwise 0.00
6 Flip vertical+salt-pepper noise energy 0.02 0.00
Additionally, the embodiment of the present invention also provides for a kind of digital media copyright protection method.The method may include that
Obtain digital media rights information.
Wherein, Digital Media can be text, image, audio frequency and video etc..
Use the embedding grammar embodiment of above-mentioned image watermark, digital media rights information is embedded corresponding with copyright information Image in, it is achieved digital media rights protect.
Explanation about the present embodiment can be found in other embodiments, does not repeats them here.
Additionally, the embodiment of the present invention also provides for a kind of digital media rights method for tracing.The method may include that
Obtain the image embedding digital media rights information.
Use the extracting method embodiment of above-mentioned image watermark, from image, extract digital media rights information, it is achieved right The tracking of digital media rights.
Explanation about the present embodiment can be found in other embodiments, does not repeats them here.
Although in above-described embodiment, each step is described according to the mode of above-mentioned precedence, but this area Those of skill will appreciate that, in order to realize the effect of the present embodiment, perform not necessarily in such order between different steps, It can simultaneously (parallel) perform or perform with reverse order, these simply change all protection scope of the present invention it In.
The embodiment of the present invention has preferable safety, watermark invisibility and robustness, can resist at common image Reason attack, geometric attack and combination attacks, the copyright protection that can be applicable to digital picture is followed the trail of with infringement, it is possible to thinking accordingly, It is introduced in digital video, embeds for realizing video watermark based on frame and extract and the copyright protection of digital video Follow the trail of with infringement.
The technical scheme provided the embodiment of the present invention above is described in detail.Although applying concrete herein Individual example principle and the embodiment of the present invention are set forth, but, the explanation of above-described embodiment be only applicable to help reason Solve the principle of the embodiment of the present invention;For those skilled in the art, according to the embodiment of the present invention, it is being embodied as All can make a change within mode and range of application.
It should be noted that referred to herein to flow chart or block diagram be not limited solely to form shown in this article, its Can also divide and/or combine.
It should be understood that labelling and word in accompanying drawing are intended merely to be illustrated more clearly that the present invention, it is not intended as this The improper restriction of invention protection domain.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " Two " it is etc. for distinguishing similar object, without being used for describing specific order or precedence.Should be appreciated that so use Data can exchange in the appropriate case, in order to embodiments of the invention described herein can with except here diagram or Order beyond those described is implemented.
Term " includes " or any other like term is intended to comprising of nonexcludability, so that include that one is The process of row key element, method, article or equipment/device not only include those key elements, but also include being not expressly set out Other key element, or also include the key element that these processes, method, article or equipment/device are intrinsic.
Each step of the present invention can realize with general calculating device, and such as, they can concentrate on single Calculate on device, such as: personal computer, server computer, handheld device or portable set, laptop device or many Processor device, it is also possible to be distributed on the network that multiple calculating device is formed, they can be to be different from order herein Step shown or described by execution, or they are fabricated to respectively each integrated circuit modules, or by many in them Individual module or step are fabricated to single integrated circuit module and realize.Therefore, the invention is not restricted to any specific hardware and soft Part or its combination.
The method that the present invention provides can use PLD to realize, it is also possible to is embodied as computer program soft Part or program module (it include performing particular task or realize the routine of particular abstract data type, program, object, assembly or Data structure etc.), can be such as a kind of computer program according to embodiments of the invention, run this computer program Product makes computer perform for the method demonstrated.Described computer program includes computer-readable recording medium, should Comprise computer program logic or code section on medium, be used for realizing described method.Described computer-readable recording medium can To be the built-in medium being mounted in a computer or the removable medium (example that can disassemble from basic computer As: use the storage device of hot plug technology).Described built-in medium includes but not limited to rewritable nonvolatile memory, Such as: RAM, ROM, flash memory and hard disk.Described removable medium includes but not limited to: optical storage media is (such as: CD- ROM and DVD), magnetic-optical storage medium (such as: MO), magnetic storage medium (such as: tape or portable hard drive), have built-in can Rewrite the media (such as: storage card) of nonvolatile memory and there are the media (such as: ROM box) of built-in ROM.
Particular embodiments described above, has been carried out the purpose of the present invention, technical scheme and beneficial effect the most in detail Describe in detail bright it should be understood that the foregoing is only the specific embodiment of the present invention, be not limited to the present invention, all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. done, should be included in the protection of the present invention Within the scope of.

Claims (17)

1. the embedding grammar of an image watermark, it is characterised in that described method at least includes:
As required watermark is converted into watermark binary sequence;
Described watermark binary sequence is carried out spread spectrum operation based on key, determines spread-spectrum watermark vector;
The image of watermark to be embedded is carried out self adaptation piecemeal;
Based on described self adaptation piecemeal, the image of described watermark to be embedded is carried out multilevel discrete cosine transform, determines the first change Change coefficient matrix;
Based on described first transform coefficient matrix, construction feature vector, and described spread-spectrum watermark vector is embedded described feature to Amount;
The inverse discrete cosine transformation that the characteristic vector embedding spread-spectrum watermark vector carries out coefficient reset and coefficient matrix is processed, To determine the image embedding watermark.
Method the most according to claim 1, it is characterised in that described described watermark binary sequence is carried out based on key Spread spectrum operation, determines spread-spectrum watermark vector, specifically includes:
Based on described key, generate a series of random number, and described a series of randoms number are arranged in 2-D data square in order Battle array, forms random code book;Wherein, the columns of described random code book is more than or equal to line number;
Vector in described random code book is orthogonalized with unitization;
Based on orthogonalization and unitization vector, according to below equation, determine that described spread-spectrum watermark is vectorial:
SsW=[β01,…,βL-1]
β i = Σ k = 0 n - 1 ( l k · p k i ) , l k = 1 , α k = 1 - 1 , α k = 0
Wherein, described ssW represents spread-spectrum watermark vector;Described βiRepresent the i-th component in spread-spectrum watermark vector;Described pkiTable Show vector in random code book through orthogonalization and unitization after the i-th component of kth unit vector;Described αkRepresent water Kth component in print sequence;Described i=0,1 ..., L-1;Described k=0,1 ..., n-1.
Method the most according to claim 1, it is characterised in that the described image to watermark to be embedded carries out self adaptation and divides Block, specifically includes:
Determine that the first height and first width of the image of described watermark to be embedded the most all can be divided exactly by K;Wherein, described K takes The length of the described spread-spectrum watermark vector square more than or equal to 8 times of positive integer and described K;
If so, the image of described watermark to be embedded is divided into non-overlapping copies, K × K equivalently-sized self adaptation piecemeal, its In, third height and the 3rd width of described each self adaptation piecemeal meet respectively: described third height is equal to described first height With the ratio of described K, described 3rd width is equal to the ratio of described first width with described K.
Method the most according to claim 3, it is characterised in that described method also includes:
If it is not, the image of described watermark to be embedded is carried out little yardstick amplification, calculate the watermark to be embedded after little yardstick amplifies The second height and the second width of image, wherein, described second height and described second width are to meet following condition Little positive integer: described second height and described second width all can be divided exactly by K, described second height, described second width are respectively More than or equal to described first height, described first width;
The image of the watermark to be embedded after being amplified by described little yardstick is divided into non-overlapping copies, K × K equivalently-sized self adaptation Piecemeal, wherein, described third height and described 3rd width of described each self adaptation piecemeal meet respectively: described third height etc. Ratio in described second height with described K;Described 3rd width is equal to the ratio of described second width with described K.
Method the most according to claim 1, it is characterised in that described based on described self adaptation piecemeal, to described to be embedded The image of watermark carries out multilevel discrete cosine transform, determines the first transform coefficient matrix, specifically includes:
Described each self adaptation piecemeal is carried out two-dimension discrete cosine transform respectively, determines the first dct coefficient matrix;
Choose r row in described each self adaptation piecemeal, the first discrete cosine transform coefficient of r row, build the first piecemeal from Dissipating cosine transform coefficient matrix, wherein, described r is even number and medium and low frequency or the first of medium-high frequency in representing described self adaptation piecemeal Discrete cosine transform coefficient;
Described first Block DCT coefficient matrix carries out overall situation discrete cosine transform process, determine that described first becomes Change coefficient matrix.
Method the most according to claim 5, it is characterised in that described based on described first transform coefficient matrix, builds spy Levy vector, and described spread-spectrum watermark vector embedded described characteristic vector, specifically include:
Based on described first transform coefficient matrix, according to following constraints, extract the coefficient of described characteristic vector: (1) is described Coefficient in the characteristic vector extracted is that in described first transform coefficient matrix, row, column number is the coefficient on even number position;(2) In two characteristic vectors of described extraction, two coefficients in the sequence of same position are about described first transform coefficient matrix leading diagonal Symmetrical or simultaneously the most all on described first transform coefficient matrix leading diagonal and misaligned;
According to the described coefficient extracted according to described constraints (1), (2), build respectively first eigenvector, second feature to Amount;
Calculate described first eigenvector and the coefficient meansigma methods of described second feature vector respectively, be designated as the first coefficient respectively and put down Average and the second coefficient meansigma methods;
In conjunction with described first coefficient meansigma methods and described second coefficient meansigma methods, described spread-spectrum watermark vector is respectively embedded into described First eigenvector and described second feature vector.
Method the most according to claim 6, it is characterised in that the first coefficient meansigma methods and described second described in described combination Coefficient meansigma methods, is respectively embedded into described first eigenvector and described second feature vector, specifically by described spread-spectrum watermark vector Including:
According to below equation described spread-spectrum watermark vector is respectively embedded into described first eigenvector and described second feature vector:
vi'=vi+δ·value·βi
v a l u e = 1 , | a V a l | < 1 | a V a l | , 1 &le; | a V a l | &le; 2 2 , | a V a l | > 2
Wherein, described i=0,1 ..., L-1;Described V represents first eigenvector or second feature vector, V=[v0,v1,…, vL-1];Described V ' represents the first eigenvector after embedding spread-spectrum watermark vector or second feature vector, V '=[v0′,v1′,…, vL-1′];Described ssW represents spread-spectrum watermark vector, ssW=[β01,…,βL-1];δ represents watermark embedment strength;Described aVal takes Val_1 or val_2;Described val_1 represents described first coefficient meansigma methods;Described val_2 represents described second coefficient meansigma methods.
Method the most according to claim 6, it is characterised in that the described characteristic vector by embedding spread-spectrum watermark vector is carried out Coefficient resets and the inverse discrete cosine transformation of coefficient matrix processes, and to determine the image embedding watermark, specifically includes:
Replace described first respectively with the coefficient embedded in the vectorial first eigenvector of spread-spectrum watermark and second feature vector to become Change the coefficient on relevant position in coefficient matrix, determine the first transform coefficient matrix after embedding watermark;
The first transform coefficient matrix after described embedding watermark carries out overall situation inverse discrete cosine transformation process, determine embedding watermark After the first piecemeal long-lost cosine code coefficient matrix;
Replace described first discrete remaining with the coefficient in the first piecemeal long-lost cosine code coefficient matrix after described embedding watermark Coefficient on each self adaptation piecemeal r row, r column position in string transform coefficient matrix, determine embed after watermark first from Dissipating cosine transform coefficient matrix, wherein, described r is even number and medium and low frequency or the first of medium-high frequency in representing described self adaptation piecemeal Discrete cosine transform coefficient;
The first dct coefficient matrix after described embedding watermark is carried out piecemeal inverse discrete cosine transformation process, determines Embed the image of watermark.
Method the most according to claim 8, it is characterised in that put the image of described watermark to be embedded is carried out little yardstick Big and in the case of carrying out self adaptation piecemeal, described the first dct coefficient matrix after described embedding watermark is carried out Piecemeal inverse discrete cosine transformation also includes after processing:
Determine the enlarged drawing picture after embedding watermark;
Enlarged drawing picture after described embedding watermark is contracted to the size identical with the image of described watermark to be embedded, so that it is determined that Embed the image of watermark.
10. the extracting method of an image watermark, it is characterised in that described method at least includes:
The length of the watermark binary sequence extracted as required generates random code book;
Described random code book is carried out vector orthogonalization;
The image of watermark to be extracted is carried out self adaptation piecemeal;
Based on described self adaptation piecemeal, the image of described watermark to be extracted is carried out multilevel discrete cosine transform, determines the second change Change coefficient matrix;
Based on described second transform coefficient matrix, determine the characteristic vector of the image of described watermark to be extracted;
Ask for the relevance values of each vector in the random code book after described characteristic vector and orthogonalization, and according to described feature to In random code book after amount and described orthogonalization, the symbol of each vector correlation value determines the watermark sequence on correspondence position Component.
11. methods according to claim 10, it is characterised in that the described image to watermark to be extracted carries out self adaptation and divides Block specifically includes:
Determine that the 4th height and the 4th width of the image of described watermark to be extracted the most all can be divided exactly by K;Wherein, described K takes Positive integer and described K square more than or equal to the length of vector in the described random code book of 8 times;
The most then the image of described watermark to be extracted is divided into non-overlapping copies, K × K equivalently-sized self adaptation piecemeal, its In, the 5th height of described each self adaptation piecemeal and the 5th width meet respectively: described 5th height is equal to described 4th height With the ratio of described K, described 5th width is equal to the ratio of described 4th width with described K.
12. methods according to claim 11, it is characterised in that described method also includes:
If it is not, then the image to described watermark to be extracted carries out little yardstick amplification, calculate the water to be extracted after little yardstick amplifies 6th height and the 6th width of the image of print, wherein, described 6th height and described 6th width are to meet following condition Minimum positive integer: described 6th height and described 6th width all can be divided exactly by K, described 6th height, described 6th width divide Great Yu Dengyu described 4th height, described 4th width;
The image of the watermark to be extracted after being amplified by described little yardstick is divided into non-overlapping copies, K × K equivalently-sized self adaptation Piecemeal, wherein, described 5th height of described each self adaptation piecemeal and described 5th width meet respectively: described 5th height etc. Ratio in described 6th height with described K;Described 5th width is equal to the ratio of described 6th width with described K.
13. methods according to claim 10, it is characterised in that described based on self adaptation piecemeal, to described water to be extracted The image of print carries out multilevel discrete cosine transform, determines the second transform coefficient matrix, specifically includes:
Described each self adaptation piecemeal is carried out two-dimension discrete cosine transform respectively, determines the second dct coefficient matrix;
Choose r row in described each self adaptation piecemeal, the second discrete cosine transform coefficient of r row, build the second piecemeal from Dissipating cosine transform coefficient matrix, wherein, described r is even number and represents the second discrete of medium and low frequency in self adaptation piecemeal or medium-high frequency Cosine transform coefficient;
Described second Block DCT coefficient matrix carries out overall situation discrete cosine transform process, determine that described second becomes Change coefficient matrix.
14. methods according to claim 10, it is characterised in that described based on described second transform coefficient matrix, determine The characteristic vector of the image of described watermark to be extracted, specifically includes:
Based on described second transform coefficient matrix, according to following constraints, extract the coefficient of described characteristic vector: (1) is described Coefficient in the characteristic vector extracted is that in described second transform coefficient matrix, row, column number is the coefficient on even number position;(2) Coefficient in the characteristic vector of described extraction is on the leading diagonal of described second transform coefficient matrix or at leading diagonal Side;
According to the described coefficient extracted according to described constraints (1), (2), determine the feature of the image of described watermark to be extracted Vector.
15. methods according to claim 10, it is characterised in that described in ask for the random code after characteristic vector and orthogonalization The relevance values of each vector in Ben, and according to vector phase each in the random code book after described characteristic vector and described orthogonalization The symbol of closing property value determines the watermark sequence component on correspondence position, specifically includes:
Described watermark sequence component is determined according to below equation:
&gamma; i = 1 , C ( V * , P i &prime; ) &GreaterEqual; 0 0 , C ( V * , P i &prime; ) < 0
Wherein, described W ' represents described watermark sequence, W '=[γ01,…,γn-1];Described C () is to seek two length phases With the function of the relevance values of vector,A=[a0,a1,…,aL-1], B=[b0,b1,…,bL-1] It is two length one-dimensional vector of being L;Described Pi' represent the vector after i-th orthogonalization, P in described random code booki'= [p′i0,p′i1,…,p′i(L-1)];I=0,1 ..., n-1;Described V* represents the characteristic vector extracted, V*=[v0 *, v1 *..., vL-1 *]。
16. 1 kinds of digital media copyright protection method, it is characterised in that described method at least includes:
Obtain digital media rights information;
Use the method as described in arbitrary in claim 1 to 9, described digital media rights information is embedded and believes with described copyright In the image that breath is corresponding, it is achieved digital media rights is protected.
17. 1 kinds of digital media rights method for tracing, it is characterised in that described method at least includes:
Obtain the image containing digital media rights information;
Use the method as described in arbitrary in claim 10 to 15, from described image, extract described digital media rights letter Breath, it is achieved the tracking to described digital media rights.
CN201610352984.9A 2016-05-25 2016-05-25 The embedding grammar of image watermark and extracting method and associated method Active CN106097237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610352984.9A CN106097237B (en) 2016-05-25 2016-05-25 The embedding grammar of image watermark and extracting method and associated method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610352984.9A CN106097237B (en) 2016-05-25 2016-05-25 The embedding grammar of image watermark and extracting method and associated method

Publications (2)

Publication Number Publication Date
CN106097237A true CN106097237A (en) 2016-11-09
CN106097237B CN106097237B (en) 2019-11-15

Family

ID=57230755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610352984.9A Active CN106097237B (en) 2016-05-25 2016-05-25 The embedding grammar of image watermark and extracting method and associated method

Country Status (1)

Country Link
CN (1) CN106097237B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934780A (en) * 2017-03-15 2017-07-07 中山大学 A kind of automatic watermark minimizing technology based on image repair
CN108961139A (en) * 2018-05-25 2018-12-07 珠海奔图电子有限公司 watermark configuration control method and system
CN109191361A (en) * 2018-09-11 2019-01-11 中国科学院自动化研究所 Image Watermarking, extracting method and correlation technique
CN109300078A (en) * 2018-08-31 2019-02-01 太原理工大学 A kind of image spread-spectrum watermark embedding grammar with adaptive feed-forward network intensity
CN109462469A (en) * 2018-11-13 2019-03-12 常熟理工学院 Based on arrangement and displaced network flow-medium information security encryption method and system
CN109493271A (en) * 2018-11-16 2019-03-19 中国科学院自动化研究所 Image difference quantisation watermarking embedding grammar, extracting method, equipment and storage medium
CN109767378A (en) * 2019-01-02 2019-05-17 腾讯科技(深圳)有限公司 Image processing method and device
CN110084733A (en) * 2019-04-19 2019-08-02 中国科学院自动化研究所 The embedding grammar and system of text image watermark, extracting method and system
CN110365986A (en) * 2018-04-09 2019-10-22 北京京东尚科信息技术有限公司 The guard method and protective device of video copy
CN111062853A (en) * 2019-12-20 2020-04-24 中国科学院自动化研究所 Self-adaptive image watermark embedding method and system and self-adaptive image watermark extracting method and system
CN111555861A (en) * 2020-04-30 2020-08-18 山东师范大学 Circular range query method and system in cloud environment based on position privacy protection
CN111768328A (en) * 2020-07-07 2020-10-13 中国科学院自动化研究所 Text image watermark embedding method and system and text image watermark extracting method and system
CN113099264A (en) * 2021-04-21 2021-07-09 湖南天河国云科技有限公司 Block chain monitoring video tamper-proof method and system based on global features

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN103955879A (en) * 2014-04-11 2014-07-30 杭州电子科技大学 DWT-SVD robust blind watermark method based on multilevel DCT

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN103955879A (en) * 2014-04-11 2014-07-30 杭州电子科技大学 DWT-SVD robust blind watermark method based on multilevel DCT

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
关虎: "基于备案的数字版权追踪关键技术研究", 《中国科学院机构知识库服务网络》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934780A (en) * 2017-03-15 2017-07-07 中山大学 A kind of automatic watermark minimizing technology based on image repair
CN106934780B (en) * 2017-03-15 2019-11-01 北京思创科泰科技有限公司 A kind of automatic watermark minimizing technology based on image repair
CN110365986A (en) * 2018-04-09 2019-10-22 北京京东尚科信息技术有限公司 The guard method and protective device of video copy
CN108961139A (en) * 2018-05-25 2018-12-07 珠海奔图电子有限公司 watermark configuration control method and system
CN109300078A (en) * 2018-08-31 2019-02-01 太原理工大学 A kind of image spread-spectrum watermark embedding grammar with adaptive feed-forward network intensity
CN109300078B (en) * 2018-08-31 2022-12-30 太原理工大学 Image spread spectrum watermark embedding method with self-adaptive embedding strength
CN109191361A (en) * 2018-09-11 2019-01-11 中国科学院自动化研究所 Image Watermarking, extracting method and correlation technique
CN109462469A (en) * 2018-11-13 2019-03-12 常熟理工学院 Based on arrangement and displaced network flow-medium information security encryption method and system
CN109493271A (en) * 2018-11-16 2019-03-19 中国科学院自动化研究所 Image difference quantisation watermarking embedding grammar, extracting method, equipment and storage medium
CN109767378A (en) * 2019-01-02 2019-05-17 腾讯科技(深圳)有限公司 Image processing method and device
CN109767378B (en) * 2019-01-02 2021-07-20 腾讯科技(深圳)有限公司 Image processing method and device
US11489984B2 (en) 2019-01-02 2022-11-01 Tencent Technology (Shenzhen) Company Limited Frequency and spatial domain image processing method for image marking and mark detection, apparatus, and storage medium
CN110084733A (en) * 2019-04-19 2019-08-02 中国科学院自动化研究所 The embedding grammar and system of text image watermark, extracting method and system
CN111062853A (en) * 2019-12-20 2020-04-24 中国科学院自动化研究所 Self-adaptive image watermark embedding method and system and self-adaptive image watermark extracting method and system
CN111555861A (en) * 2020-04-30 2020-08-18 山东师范大学 Circular range query method and system in cloud environment based on position privacy protection
CN111555861B (en) * 2020-04-30 2023-04-18 山东师范大学 Circular range query method and system in cloud environment based on position privacy protection
CN111768328A (en) * 2020-07-07 2020-10-13 中国科学院自动化研究所 Text image watermark embedding method and system and text image watermark extracting method and system
CN111768328B (en) * 2020-07-07 2021-08-13 中国科学院自动化研究所 Text image watermark embedding method and system and text image watermark extracting method and system
CN113099264A (en) * 2021-04-21 2021-07-09 湖南天河国云科技有限公司 Block chain monitoring video tamper-proof method and system based on global features

Also Published As

Publication number Publication date
CN106097237B (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN106097237A (en) The embedding grammar of image watermark and extracting method and associated method
CN109300078B (en) Image spread spectrum watermark embedding method with self-adaptive embedding strength
CN110084733B (en) Text image watermark embedding method and system and text image watermark extracting method and system
Lei et al. Reversible watermarking scheme for medical image based on differential evolution
Sun A novel edge based image steganography with 2k correction and Huffman encoding
Andalibi et al. Digital image watermarking via adaptive logo texturization
CN104361548B (en) Image watermark insertion and extracting method based on BP neural network digital image compression
Yuan et al. Local multi-watermarking method based on robust and adaptive feature extraction
CN109191361A (en) Image Watermarking, extracting method and correlation technique
Shih et al. An adjustable-purpose image watermarking technique by particle swarm optimization
Parah et al. Realisation and robustness evaluation of a blind spatial domain watermarking technique
Ferreira et al. A robust 3D point cloud watermarking method based on the graph Fourier transform
Jarusek et al. Robust steganographic method based on unconventional approach of neural networks
Jana et al. A new DCT based robust image watermarking scheme using cellular automata
Singh et al. Efficient watermarking method based on maximum entropy blocks selection in frequency domain for color images
Mehrish et al. Joint spatial and discrete cosine transform domain-based counter forensics for adaptive contrast enhancement
Yadav et al. Lagrangian twin support vector regression and genetic algorithm based robust grayscale image watermarking
El Hajji et al. New image watermarking algorithm based on mixed scales wavelets
Yang Information analysis for steganography and steganalysis in 3D polygonal meshes
CN109493271B (en) Image difference quantization watermark embedding method, image difference quantization watermark extracting equipment and storage medium
CN116757903A (en) Watermark embedding and extracting method and watermark processing device
Liu et al. Novel robust multiple watermarking against regional attacks of digital images
Zhu et al. Image sanitization in online social networks: A general framework for breaking robust information hiding
Nam et al. WAN: Watermarking attack network
Hatoum Digital watermarking for PDF documents and images: security, robustness and AI-based attack

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant