CN110084733A - The embedding grammar and system of text image watermark, extracting method and system - Google Patents

The embedding grammar and system of text image watermark, extracting method and system Download PDF

Info

Publication number
CN110084733A
CN110084733A CN201910317711.4A CN201910317711A CN110084733A CN 110084733 A CN110084733 A CN 110084733A CN 201910317711 A CN201910317711 A CN 201910317711A CN 110084733 A CN110084733 A CN 110084733A
Authority
CN
China
Prior art keywords
watermark
coefficient
matrix
text image
obtains
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
CN201910317711.4A
Other languages
Chinese (zh)
Other versions
CN110084733B (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 CN201910317711.4A priority Critical patent/CN110084733B/en
Publication of CN110084733A publication Critical patent/CN110084733A/en
Application granted granted Critical
Publication of CN110084733B publication Critical patent/CN110084733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0062Embedding of the watermark in text images, e.g. watermarking text documents using letter skew, letter distance or row distance

Abstract

The present invention proposes the embedding grammar and system, extracting method and system of a kind of text image watermark, and wherein embedding grammar includes: after carrying out secondary encryption to input watermark, to obtain watermark to be embedded by Error Correction of Coding;Second level wavelet transform is carried out to text image and obtains four first band coefficient matrixes;First band coefficient matrix is subjected to Block DCT, obtains corresponding first blocking factor matrix;For each first blocking factor matrix, intermediate frequency coefficient is chosen, watermark is embedded in by modification coefficient, each first blocking factor matrix after obtaining insertion watermark;Inverse discrete cosine transformation, inverse discrete wavelet transformation are carried out to each first blocking factor matrix after the insertion watermark, obtain the text image of insertion watermark.The embodiment of the present invention improves the robustness and algorithm security that the attacks such as compression, noise, shearing are resisted in watermark under the premise of guaranteeing watermark invisibility.

Description

The embedding grammar and system of text image watermark, extracting method and system
Technical field
The invention belongs to digital media rights to protect field, and in particular to a kind of embedding grammar of text image watermark and be System, extracting method and system.
Background technique
Quick universal with digital information with the development of internet technology, the propagation of digital media is increasingly extensive, number Word media have the characteristics that easily propagation, low cost.People are also faced with number while easily obtaining digital media Media content is by piracy and the risk distorted.Therefore it needs suitably to handle it before digital media distribution, number Digital watermark is a kind of effectively digital media rights protection technique, can be investigated to pirate and tampering, realization pair The copyright protection of copyright.Text is also constantly going deep into as a kind of common Digital Media, the research of digital watermark. Text digital water mark refers to the digital information with distinctive permanently inlayed in the text, and the watermark of insertion should not influence text Availability.Text digital water mark should have the characteristics such as robustness, invisibility, safety, large capacity.Text digital water mark is calculated Method is broadly divided into editing environment text watermarking algorithm and text image watermarking algorithm.Editing environment text watermarking algorithm need by Editing machine carries out watermark insertion to the control code of document specific format according to the specific format of editing environment.This kind of algorithm need to be borrowed Specific editing environment is helped, application surface is small.It is the main part of digital text propagation using text image as the data content of carrier Point, text image is mostly gray level image and bianry image, format have black and white picture, document, signature, check, contract, proof and Seal etc..Text image watermarking algorithm is using characteristics such as text image texture-rich, distribution uniforms, by improving and applying biography Watermarking algorithm of uniting is embedded in watermark.
Text image watermarking algorithm is divided into spatial-domain algorithm and transform-domain algorithm according to embedded location.Spatial-domain algorithm is main There are row shifting and word shifting, character feature, semantic scheduling algorithm, this kind of algorithm is the pixel that watermark information is directly embedded in text image In, pretreatment is needed not move through, it is easy to operate but poor to the resistivity of rotation, scaling plus the attacks such as make an uproar, shake, it is unable to satisfy Actual demand.Transform-domain algorithm is then text image pixel transform is modified frequency to certain frequency domain according to certain rules Domain coefficient, to achieve the purpose that be embedded in watermark.Compared to spatial-domain algorithm, although transform-domain algorithm implementation procedure is more complicated, Antinoise, in terms of performance it is more preferable, be more practical algorithm.It includes discrete that transform-domain algorithm, which commonly converts, Cosine transform, wavelet transform, discrete Fourier transform and singular value decomposition etc..The watermarking algorithm of single transform domain is generally only Using a kind of matrixing, the higher region of text image energy is then embedded watermark data into, text diagram has been concentrated in these regions The watermark of the main contents feature of picture, insertion can interfere text image, and this method affects water to a certain extent The invisibility and robustness of print.And various transform-domain algorithms are different for the resistivity of same attack, are unable to satisfy pair Various attacks all have preferable resistivity.During Internet communication, if text image interference under attack, water is extracted The accuracy rate of print can further decline, and robustness is not high.Watermark should ensure that illegal or malicious attacker can not be from text image Important information is got, or is distorted and is forged.For the safety for guaranteeing watermark, need to carry out watermark before watermark insertion Scrambling encryption, but a kind of single Encryption Algorithm, once public encryption algorithm, key are easily cracked, the safety of watermark without Method guarantee.
Summary of the invention
In order to solve the above problem in the prior art, in order to solve the invisibility, robustness, algorithm security of watermark Property the problem of, the present invention proposes the embedding grammar and system of a kind of text image watermark, meanwhile, correspondence propose a kind of text image The extracting method and system of watermark.
First aspect of the present invention it is proposed a kind of embedding grammar of text image watermark, which includes following Step:
Secondary encryption is carried out to input watermark, obtains secondary encrypted watermark;
Error Correction of Coding is carried out to the secondary encrypted watermark, obtains watermark to be embedded;
Second level wavelet transform is carried out to the text image of the watermark to be embedded, obtains four first band coefficient squares Battle array;The first band coefficient matrix is subjected to Block DCT, obtains corresponding first blocking factor matrix;
For each first blocking factor matrix, intermediate frequency coefficient is chosen, and watermark is embedded in by modification coefficient, is obtained embedding Each first blocking factor matrix after entering watermark;
To each first blocking factor matrix after the insertion watermark carries out inverse discrete cosine transformation, inverse discrete small echo becomes It changes, obtains the text image of insertion watermark.
In some preferred embodiments, " secondary encryption is carried out to input watermark, obtain secondary encrypted watermark ", side Method are as follows:
Scrambling encryption processing is carried out to input watermark, obtains primary encryption watermark;
Level-one wavelet transform is carried out to the text image of watermark to be embedded, obtains LL1Subgraph coefficient matrix;To described LL1Subgraph coefficient matrix carries out global discrete cosine transform, obtains the first dct coefficient matrix.
Based on the first dct coefficient matrix, construction feature vector extracts fisrt feature sequence;By described first Characteristic sequence and each column step-by-step exclusive or of the primary encryption watermark, obtain secondary encrypted watermark.
In some preferred embodiments, " level-one wavelet transform is carried out to the text image of watermark to be embedded " it Before further include the steps that the text image rescaling of watermark to be embedded:
When G < N × 32 or H < N × 32, small scale amplification is carried out to the text image of watermark to be embedded, until obtaining height Degree is H1, width G1Amplification text image;
Wherein, G, H are respectively the width of the text image of watermark to be embedded, height, and N × N is the size of watermarking images, G1、H1It is that can be divided exactly by 8, be respectively greater than equal to G, H, and G1≥N×32、H1The minimum positive integer of >=N × 32.
In some preferred embodiments, " it is based on the first dct coefficient matrix, construction feature vector mentions Take fisrt feature sequence ", method are as follows:
" it " is carried out by the sequence of low frequency component to high fdrequency component to the coefficient in the first dct coefficient matrix Font is reset;
According to the preceding S × N number of low frequency coefficient taken out in addition to DC component that puts in order, coefficient sequence M is formedLL;Wherein, S For odd number and meet 3≤S≤((G × G/4-1)/N, 3≤S≤((H × H/4-1)/N, MLL=[u0,u1,u2…uS×N-1];
According to preset threshold, by coefficient sequence MLLIn each coefficient be expressed as 0 or 1, obtain ordered series of numbers M 'LL
It is length to M ' using NLLIt is divided, obtains the feature vector that S length is N, feature vector group is U=[U0, U1,…Ui,…,US-1], wherein Ui=[u '0,u1′,…u′j,…u′N-1];
U is traversed, the identical characteristic value of subscript in each feature vector is taken into mode, obtains the value characterized by calculated mode Fisrt feature sequence V, the length is N.
In some preferred embodiments, " the first band coefficient matrix is subjected to Block DCT, is obtained Take corresponding first blocking factor matrix ", method are as follows:
To each first band coefficient matrix, following steps are executed:
According to pre-set dimension R × R, first band coefficient matrix piecemeal is cut into the O coefficient block not overlapped, wherein O=L × N, L=N+k, k are the detection digit in Error Correction of Coding, and N × N is the size of watermarking images;
Discrete cosine transform is carried out to each coefficient block respectively, O transform coefficient matrix block is obtained, uses Di,jIt indicates, wherein i ∈ i | 1 < i < L }, j ∈ j | 1 < j < N };
O transform coefficient matrix block is spliced in order, obtains the first blocking factor matrix.
In some preferred embodiments, " for each first blocking factor matrix, intermediate frequency coefficient is chosen, and is led to Cross the insertion watermark of modification coefficient, each first blocking factor matrix after obtaining insertion watermark ", method are as follows:
To each transform coefficient matrix block D of each the first blocking factor matrixi,j, choose two intermediate frequency coefficient Di,j (a, b) and Di,j(b, a), wherein [1, R] a ∈, b ∈ [1, R];
The watermark W to be embedded is read by turnH, watermark is embedded according to following rule:
If WH(i, j)=0 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j (a,b)-Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH (i, j)=1 and Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,j(a, B) < t when, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);
Or
If WH(i, j)=1 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j (a,b)-Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH (i, j)=0 and Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,j(a, B) < t when, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);
Wherein, t be watermark embedment strength, meet t > | Di,j(a,b)-Di,j(b,a)|;WH(i, j) is described to be embedded I-th row of watermark, the binaryzation of jth column indicate.
The second aspect of the present invention, proposes a kind of extracting method of text image watermark, the extracting method include with Lower step:
Second level wavelet transform is carried out to the text image of watermark to be extracted, obtains four second band coefficient matrixes; Block DCT is carried out to the second band coefficient matrix, determines corresponding second blocking factor matrix;
Based on the second blocking factor matrix, selection and withdrawal coefficient carries out watermark extracting, obtains watermark to be decoded;
Error correction decoding processing is carried out to the watermark to be decoded, obtains watermark to be decrypted;
Secondary decryption, the watermark information finally extracted are carried out to the watermark to be decrypted.
In some preferred embodiments, " it is based on the second blocking factor matrix, selection and withdrawal coefficient carries out watermark and mentions Take, obtain watermark to be decoded ", method are as follows:
It is obtained by the following formula the corresponding watermark information of each second band coefficient matrix:
Or
Wherein,For two in a transform coefficient matrix block in the second blocking factor matrix A intermediate frequency coefficient;Serial number of the n for second band coefficient matrix, n=1,2,3,4;A ∈ [1, R], b ∈ [1, R], R × R are default Second band coefficient matrix piecemeal is cut into the multiple coefficient blocks not overlapped according to the pre-set dimension by size;
The W is read in step-by-step* H1, W* H2, W* H3, W* H4The data value of same index, takes data value in four watermark informations Mode obtains watermark W to be decoded as the corresponding lower target data value of watermark is extracted* H
In some preferred embodiments, " secondary decryption is carried out to the watermark to be decrypted, is finally extracted Watermark information " specifically includes:
Level-one wavelet transform is carried out to the text image of watermark to be extracted, is obtainedSubgraph coefficient matrix, to It arrivesSubgraph coefficient matrix carries out global discrete cosine transform, obtains corresponding second dct coefficient matrix;
Based on the second dct coefficient matrix, construction feature vector extracts second feature sequence;By described second Characteristic sequence and the watermark step-by-step exclusive or to be decrypted, obtain the watermark by once decrypting;
Using the method opposite with telescopiny, scramble decryption processing is carried out to the watermark by once decrypting, is obtained Watermark information after to decryption.
The third aspect of the present invention, proposes a kind of embedded system of text image watermark, which includes secondary Encrypted watermark acquiring unit, watermark acquiring unit to be embedded, the first blocking factor matrix acquiring unit, insertion watermark unit, square Battle array inverse transformation block;
The secondary encrypted watermark acquiring unit is configured to carry out secondary encryption to input watermark, obtains secondary encryption water Print;
The watermark acquiring unit to be embedded is configured to carry out Error Correction of Coding to the secondary encrypted watermark, obtain to embedding The watermark entered;
The first blocking factor matrix acquiring unit is configured to carry out second level to the text image of the watermark to be embedded Wavelet transform obtains four first band coefficient matrixes;The first band coefficient matrix is subjected to piecemeal discrete cosine Transformation obtains corresponding first blocking factor matrix;
The insertion watermark unit is configured to choose intermediate frequency coefficient, and pass through for each first blocking factor matrix It modifies coefficient and is embedded in watermark, each first blocking factor matrix after obtaining insertion watermark;
The matrix inverse transformation block, be configured to it is described insertion watermark after each first blocking factor matrix carry out instead from Cosine transform, inverse discrete wavelet transformation are dissipated, the text image of insertion watermark is obtained.
The fourth aspect of the present invention, proposes a kind of extraction system of text image watermark, and the extraction system includes the Two blocking factor matrix acquiring units, watermark acquiring unit to be decoded, watermark acquiring unit to be decrypted, watermark decryption are single Member;
The second blocking factor matrix acquiring unit, the text image progress second level being configured to watermark to be extracted are discrete Wavelet transformation obtains four second band coefficient matrixes;Block DCT is carried out to the second band coefficient matrix, Determine corresponding second blocking factor matrix;
The watermark acquiring unit to be decoded, is configured to the second blocking factor matrix, and selection and withdrawal coefficient carries out Watermark extracting obtains watermark to be decoded;
The watermark acquiring unit to be decrypted is configured to carry out error correction decoding processing to the watermark to be decoded, obtain To watermark to be decrypted;
The watermark decryption unit is configured to carry out secondary decryption to the watermark to be decrypted, finally be extracted Watermark information.
Beneficial effects of the present invention:
Scrambling encryption and characteristic sequence are combined and carry out secondary encryption by the present invention, using scrambling encryption algorithm to input water Print carries out level-one encryption, then extracts the invariant feature sequence of text image, carries out secondary encryption to the watermark of level-one encryption, improves The safety of insertion watermark reduces the risk that watermark is identified and is maliciously wiped.Error Correction of Coding is carried out to encrypted watermark And decoding, it can be improved the accuracy rate of watermark extracting.
According to text image texture distribution, treated using wavelet transform with discrete cosine transform joint transform embedding The text image for entering watermark is handled, in conjunction with the multiple dimensioned multiresolution analysis characteristic of wavelet transform and discrete cosine transform " energy concentration ", the ability of decorrelation, realizes hidden insertion and the Blind extracting of text image watermark, while improving watermark Invisibility and resist the robustness of the attacks such as shearing, noise and JPEG compression, solve text image to a certain extent The problems such as propagating the copyright protection and infringement certification in use process.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other features, Objects and advantages will become more apparent upon:
Fig. 1 is the flow diagram according to the embedding grammar of the text image watermark shown in an exemplary embodiment;
Fig. 2 is the exemplary diagram according to the binary bitmap of 26 × 26 sizes shown in an exemplary embodiment;
Fig. 3 a is according to the text image exemplary diagram before the insertion watermark shown in an exemplary embodiment;
Fig. 3 b is according to the text image exemplary diagram after the insertion watermark shown in an exemplary embodiment;
Fig. 3 c be according to shown in an exemplary embodiment text image insertion or extraction process in coefficient matrix distribution and Piecemeal situation exemplary diagram;
Fig. 3 d be according to shown in an exemplary embodiment text image insertion or extraction process in blocking factor matrix and Intermediate frequency coefficient chooses exemplary diagram;
Fig. 4 is the flow diagram according to the extracting method of the text image watermark shown in an exemplary embodiment;
Fig. 5 is to be by quality factor for aqueous print text image shown in Fig. 3 b according to shown in an exemplary embodiment Experimental result exemplary diagram after 30% to 90% JPEG compression;
Fig. 6 is that mean value is 0, variance is according to passing through shown in an exemplary embodiment for text image shown in Fig. 3 b The exemplary diagram of experimental result after 0.001 to 0.025 Gauss noise;
Fig. 7 be according to shown in an exemplary embodiment for text image shown in Fig. 3 b by energy be 0.005 to The exemplary diagram of experimental result after 0.05 Salt&Pepper noise;
Fig. 8 be according to shown in an exemplary embodiment by text image shown in Fig. 3 b after the upper left corner 1/4 is sheared Exemplary diagram;
Fig. 9 a is according to going out text image shown in Fig. 3 b by correct cipher key-extraction shown in an exemplary embodiment The exemplary diagram of watermark;
Fig. 9 b is according to shown in an exemplary embodiment that text image shown in Fig. 3 b is close by Arnold conversion mistake The exemplary diagram for the watermark that key extracts;
Fig. 9 c is that text image shown in Fig. 3 b is passed through secondary decryption error key according to shown in an exemplary embodiment The exemplary diagram of the watermark extracted.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to the embodiment of the present invention In technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, without It is whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.
A kind of embedding grammar of text image watermark of the invention, the embedding grammar the following steps are included:
Secondary encryption is carried out to input watermark, obtains secondary encrypted watermark;
Error Correction of Coding is carried out to the secondary encrypted watermark, obtains watermark to be embedded;
Second level wavelet transform is carried out to the text image of the watermark to be embedded, obtains four first band coefficient squares Battle array;The first band coefficient matrix is subjected to Block DCT, obtains corresponding first blocking factor matrix;
For each first blocking factor matrix, intermediate frequency coefficient is chosen, and watermark is embedded in by modification coefficient, is obtained embedding Each first blocking factor matrix after entering watermark;
To each first blocking factor matrix after the insertion watermark carries out inverse discrete cosine transformation, inverse discrete small echo becomes It changes, obtains the text image of insertion watermark.
A kind of extracting method of text image watermark of the invention, the extracting method the following steps are included:
Second level wavelet transform is carried out to the text image of watermark to be extracted, obtains four second band coefficient matrixes; Block DCT is carried out to the second band coefficient matrix, determines corresponding second blocking factor matrix;
Based on the second blocking factor matrix, selection and withdrawal coefficient carries out watermark extracting, obtains watermark to be decoded;
Error correction decoding processing is carried out to the watermark to be decoded, obtains watermark to be decrypted;
Secondary decryption, the watermark information finally extracted are carried out to the watermark to be decrypted.
In order to which more clearly the present invention will be described, with reference to the accompanying drawing to step each in an embodiment of the present invention into Row expansion is described in detail.
The embedding grammar of the text image watermark of an embodiment of the present invention, as shown in Figure 1, the embedding grammar includes step S100 to step S140:
Step S100 carries out secondary encryption to input watermark, obtains secondary encrypted watermark.
Here watermark is the watermarking images for indicating copyright information, refers to the bianry image being only made of 0 and 1, Fig. 2 is illustratively A kind of bianry image of 26 × 26 sizes is shown as watermarking images.It is 1024 using width shown in Fig. 3 a and height Text image carries out watermark insertion.
Secondary cryptographic operation is carried out to watermark by this step, energy information representated by watermark can be made more concealed, Be conducive to embody the invisibility and robustness of watermark in this way.
Specifically, this step may include: step S101 to step S103.
Step S101 carries out scrambling encryption processing to input watermark, obtains primary encryption watermark.
Arnold scramble transformation can realize the scrambling encryption processing to watermark well.Encryption based on Arnold conversion Algorithm is converted by location of pixels and completes encryption, and Information hiding effect is good, is the most commonly used watermark encrypting algorithm.According to following Formula carries out watermark scramble:
Wherein, x, y are the coordinate of the pixel of watermark to be embedded;X', y' are the pixel after interative computation scramble Coordinate;N is the size of watermarking images to be embedded, also referred to as order.By successive ignition, the number of iterations is saved as key Key improves algorithm security, it can be ensured that can not decrypt just using false key by the way that key key is arranged True watermark information;Inverse transformation formula restores original watermark by corresponding the number of iterations.Iteration time is set in preferred embodiment Number is 10, is saved as encryption key key.In other embodiments, other similar scrambling encryption side can also be used Method, such as the encryption of Logistic Chaotic Scrambling etc..
Step S102 carries out level-one wavelet transform to the text image of watermark to be embedded, obtains LL1Subgraph coefficient square Battle array;To the LL1Subgraph coefficient matrix carries out global discrete cosine transform, obtains the first dct coefficient matrix.
In the present embodiment, the size of watermarking images is N × N, and the width of the text image of watermark to be embedded is G, is highly H is adjusted the scale of the text image of watermark to be embedded, and rule is as follows:
If G meets G >=N × 32, and H meets H >=N × 32, then to the text image of watermark to be embedded carry out level-one from Wavelet transformation is dissipated, LL is obtained1Subgraph coefficient matrix, to LL1Subgraph coefficient matrix carries out global discrete cosine transform, obtains first Dct coefficient matrix;
If G is unsatisfactory for G >=N × 32, if or H be unsatisfactory for H >=N × 32, need the text diagram to the watermark to be embedded As carrying out small scale amplification, until obtaining height is H1, width G1Amplification watermark to be embedded text image;Wherein, institute State height H1And width G1, for the minimum positive integer for meeting the following conditions: the height H1And width G1, can be divided exactly and be divided by 8 It great Yu Dengyu not the height H, width G;By the text image of the small amplified watermark to be embedded of scale carry out level-one from Wavelet transformation is dissipated, LL is obtained1Subgraph coefficient matrix, to LL1Subgraph coefficient matrix carries out global discrete cosine transform, obtains first Dct coefficient matrix.
Step S103, is based on the first dct coefficient matrix, and construction feature vector extracts fisrt feature sequence; By the fisrt feature sequence and each column step-by-step exclusive or of the primary encryption watermark, secondary encrypted watermark is obtained.
All coefficients in first dct coefficient matrix are subjected to the sequence of ' it ' font, are existed with low frequency component Before, high fdrequency component posterior sequence arrangement.
According to the preceding S × N number of low frequency coefficient taken out in addition to DC component that puts in order, coefficient sequence M is formedLL;Wherein, S For odd number, and 3≤S≤((G × G/4-1)/N, 3≤S≤(after (H × H/4-1)/N, G and H are respectively small scale amplification (if any) The width and height of the text image of watermark to be embedded, N are the size of watermarking images, G >=N × 32, H >=N × 32.The present embodiment Middle G and H value is that 1024, N value is 26.
According to coefficient sequence MLLIn each coefficient symbol by its with " 0 " or " 1 " indicate, obtain ordered series of numbers M 'LL.This implementation M ' is obtained by way of comparing with preset threshold in exampleLL, formula is as follows:
Or
Wherein, MLLiIndicate MLLIn i-th of coefficient, M 'LLiIndicate M 'LLIn i-th of coefficient.
It is length to M ' using NLLIt is divided, obtains the feature vector that S length is N, be denoted as U, U=[U0,U1,… Ui,…,US-1], Ui=[u '0,u′1,…u′j,…u′N-1], u 'j∈ { 0,1 }, i=0,1 ..., S-1, j=0,1 ..., N-1.
S feature vector U is traversed simultaneously, takes mode (to obtain each feature the identical characteristic value of subscript in feature vector The most characteristic value of frequency of occurrence in subscript identical entry in vector), using mode as the corresponding lower target characteristic value of characteristic sequence, obtain To fisrt feature sequence V, length N.Such as u '0Characteristic value in each feature vector is respectively 0,1,1,1,0,0,0, then and The characteristic value that 0 item is designated as under in one characteristic sequence V is 0.
By each column step-by-step exclusive or of the fisrt feature sequence V of extraction and the watermark after primary encryption, obtain secondary Encrypted watermark.
Step S110 carries out Error Correction of Coding to the secondary encrypted watermark, obtains watermark to be embedded.
Hamming code error control coding can realize the correction process to watermark well.In the present embodiment, Hamming code is poor Mistake control coding establishes linear connection by algorithm, is that can pass through by adding several check bit data in initial data Inverse operation detects and corrects the Linear block coding of a bit-errors.If the size of watermarking images is N × N, the watermarking images Each column are that the binary sequence that a length is N needs to make the binary sequence of each length N all have error correcting capability K check bits, the sequence of composition N+k are added after each binary sequence.So, the detection digit k newly increased should expire Foot: 2k≥N+k+1。
Hamming code error control coding can extract watermark by improving to watermark information error coding and error correction decoding Accuracy, to improve robustness.The initial data referred to and watermark information i.e. secondary encrypted watermark in this step.Through Hamming code error control coding is crossed, determines watermarking images W to be embeddedH(size is L × N, and L=N+k, k are in hamming code Digit is detected, k value is 6 in preferred embodiment, and watermark size to be embedded is 32 × 26).
Step S120 carries out second level wavelet transform to the text image of the watermark to be embedded, obtains four first Frequency band coefficient matrix;The first band coefficient matrix is subjected to Block DCT, obtains corresponding first piecemeal system Matrix number.
This step carries out first time wavelet transform to the text image of watermark to be embedded first, obtains after choosing transformation Image upper left corner a quarter region, to the region carry out second of wavelet transform, obtain four different first Frequency band coefficient matrix LL2、LH2、HL2、HH2
The four first band coefficient matrixes obtained after second level wavelet transform are subjected to piecemeal respectively and piecemeal is discrete Cosine transform, with LL2For first band coefficient matrix, by LL2First band coefficient matrix be cut into do not overlap, size it is big Small is O coefficient block (O=L × N of R × R (being 8 × 8 in the present embodiment);L=N+k, k are the detection digit in Error Correction of Coding, 1≤k≤(G/4/8-N), 1≤k≤(H/4/8-N));N × N is the size of original watermark image;It can be obtained in preferred embodiment 32 × 32 image blocks.
Discrete cosine transform is carried out to each coefficient block respectively, O transform coefficient matrix block is obtained, uses Di,jIt indicates, wherein i ∈ i | 1 < i < L }, j ∈ j | 1 < j < N };O transform coefficient matrix block is spliced in order, obtains the first blocking factor matrix.
To LH2、HL2、HH2First band coefficient matrix carries out same treatment as above.
As shown in Figure 3c, the 8 × 8DCT obtained after Block DCT is carried out to each first band coefficient matrix (discrete cosine transform) coefficient block, i.e. 8 × 8DCT blocking factor matrix.
Step S130 chooses intermediate frequency coefficient for each first blocking factor matrix, and is embedded in water by modification coefficient Print, each first blocking factor matrix after obtaining insertion watermark.
When being embedded in watermark, two coefficients are modified in each transform coefficient matrix block, are embedded in 1 watermark, entire first piecemeal Entire watermarking images could be embedded in by coefficient matrix.With LL2The first blocking factor matrix for, from LL2The first piecemeal Each transform coefficient matrix block D of coefficient matrixi,jTwo intermediate frequency coefficient D of middle selectioni,j(a, b) and Di,j(b, a), wherein a ∈ [1, R], b ∈ [1, R] (R=8 in the present embodiment), as shown in Figure 3d, in each transformation series of each first blocking factor matrix It carries out intermediate frequency coefficient in matrix number block to choose to be embedded in a watermark bit, a in this method preferred embodiment, b value is respectively 2 Hes 7。
The watermark W to be embedded is read by turnH, watermark is embedded according to following rule:
If WH(i, j)=0 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j (a,b)-Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH (i, j)=1 and Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,j(a, B) < t when, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);It does not execute and appoints in the case of other What is exchanged or the operation of modification numerical value;
Or
If WH(i, j)=1 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j (a,b)-Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH (i, j)=0 and Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,j(a, B) < t when, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);It does not execute and appoints in the case of other What is exchanged or the operation of modification numerical value.
According to above step, by WHIt is embedded into the first blocking factor matrix of each first band coefficient matrix simultaneously.
In order to which more clearly above-mentioned rule is described, below exemplary give the form of presentation of program language:
Or:
Wherein, if () is the condition for judging whether to meet in bracket, swap (Di,j(a,b),Di,j(b, a)) indicates exchange Di,j(a, b) and Di,j(b, value a).T be watermark embedment strength, meet t > | Di,j(a,b)-Di,j(b, a) |, the value of t is bigger, water The robustness of print is better, but invisibility is poorer, and embedment strength t value is 20 in this method preferred embodiment.WH(i, j) is institute The binaryzation of the i-th row, jth column of stating watermark to be embedded indicates (i.e. 0 or 1).
To the LH2、HL2、HH2Respective first blocking factor matrix carries out same treatment as above, by watermark information WHTogether When be embedded into the respective first blocking factor matrix of four first band coefficient matrixes, determine it is corresponding insertion watermark after point Block coefficient matrix.
It is small to carry out inverse discrete cosine transformation, inverse discrete to each first blocking factor matrix after insertion watermark by step S140 Wave conversion obtains the text image of insertion watermark.
Piecemeal inverse discrete cosine transformation is carried out to four blocking factor matrixes after the insertion watermark respectively, determines insertion The first discrete wavelet transform coefficients matrix after watermark.
Inverse discrete wavelet transformation is carried out to the first discrete wavelet transform coefficients matrix, obtains the second wavelet transform Coefficient matrix.Inverse discrete wavelet transformation is carried out to the second discrete wavelet transform coefficients matrix again, so that it is determined that the text of insertion watermark This image.Fig. 3 b schematically illustrates the text image after insertion watermark, and size is 1024 × 1024.
The extracting method of the text image watermark of an embodiment of the present invention, as shown in figure 4, the extracting method includes step Rapid S200-S230.
Step S200 carries out second level wavelet transform to the text image of watermark to be extracted, obtains second band coefficient Matrix;Block DCT is carried out to the second band coefficient matrix, determines corresponding second blocking factor matrix.
This step determines corresponding second blocking factor using method identical with above-mentioned text image watermark telescopiny Matrix, each transform coefficient matrix block D therein* i,jIt indicates, wherein i ∈ { i | 1 < i < L }, j ∈ j | 1 < j < N }.
Step S210, is based on the second blocking factor matrix, and selection and withdrawal coefficient carries out watermark extracting, obtains to be decoded Watermark.
Based on corresponding second blocking factor matrix, withThe second blocking factor matrix for, more each transformation Two intermediate frequency coefficients in coefficient matrix blockWithSize relation.Obtain watermark information W* H1.According to such as Lower Rule Extraction watermark:
Or
Wherein, D* i,j(a,b)、D* i,j(b is respectively a) in a transform coefficient matrix block in the second blocking factor matrix Two intermediate frequency coefficients;A ∈ [1, R], b ∈ [1, R], R × R are pre-set dimension (R=8 in the present embodiment), can be pre- according to this If second band coefficient matrix piecemeal is cut into the multiple coefficient blocks not overlapped by size;
It should be understood that intermediate frequency coefficient D here* i,j(a, b) and D* i,j(b, size relation (D a)* i,j(a,b)>D* i,j (b, a) or D* i,j(a,b)<D* i,jThe corresponding relationship of (b, a)) and watermarking components (0 or 1) is by the insertion side of text image watermark What the specific embedding method of watermark in method embodiment determined.If using opposite in the embedding grammar embodiment of text image watermark Rule insertion watermark, then intermediate frequency coefficient D in the extracting method embodiment of text image watermark* i,j(a, b) and D* i,j(b, a) The corresponding relationship of size relation and watermark information also should be just the opposite.
To LH* 2、HL* 2、HH* 2Respective second blocking factor matrix carries out same treatment as above, obtains watermark information W* H1, W* H2, W* H3, W* H4
W is read in step-by-step* H1, W* H2, W* H3, W* H4The data value of same index, takes the mode of data value in four watermark informations As the corresponding lower target data value of watermark is extracted, watermark W to be decoded is obtained* H
Step S220 carries out error correction decoding processing to the watermark to be decoded, obtains watermark to be decrypted.
Using the decoding operation of error correction method identical with telescopiny, error correction solution is carried out to the watermark to be decoded of extraction Code is handled, and Hamming code error control decoding is used in the present embodiment, obtains watermark to be decrypted.
Step S230 carries out secondary decryption, the watermark information finally extracted to the watermark to be decrypted.
The step can be subdivided into step S231 to step S233.
Step S231: level-one wavelet transform is carried out to the text image of watermark to be extracted, is obtainedSubgraph coefficient square Battle array (identical as the watermark encrypting process in watermark embedding method) is rightSubgraph coefficient matrix carries out global discrete cosine transform, Obtain the second dct coefficient matrix.
Step S232: being based on the second dct coefficient matrix, is constructed using method identical with telescopiny special Vector is levied, extracts characteristic sequence, and once decrypted to watermark to be decrypted.
Successively traversing S feature vector U*, (U is counted in U* calculation formula and above-mentioned text image watermark embedding method embodiment It is identical to calculate formula), the identical characteristic value of subscript in feature vector is taken into mode, mode is special as the corresponding lower target of characteristic sequence Value indicative obtains characteristic sequence V*, length N.By the characteristic sequence V* of extraction and watermark step-by-step exclusive or to be decrypted, obtain by The watermark once decrypted.
Step S233: using the method opposite with telescopiny, carries out scramble solution to the watermark by once decrypting Close processing, the watermark information after being decrypted.
Using scrambling encryption method identical with telescopiny decryption operation to it is described by the watermark once decrypted into The secondary decryption of row.Arnold scramble decryption processing is carried out to the watermark by once decrypting according to key key in embodiment, to water Print completes secondary decryption, determines watermark information.
Y-PSNR (Peak Signal to Noise Ratio, PSNR) is commented as the objective of watermark invisibility Price card is quasi-, calculates two width text images before and after the insertion watermark shown in Fig. 3 a and Fig. 3 b, it is known that PSNR=34.15dB, explanation Text image and original text image caused by the embodiment of the present invention containing watermark do not have apparent vision difference, and watermark is not Visibility is preferable.The wherein calculation method of PSNR are as follows:
Wherein, I (i, j) represents in original text image coordinate as the gray value of the pixel of (i, j);I ' (i, j) is represented Coordinate is the gray value of the pixel of (i, j) in text image after being embedded in watermark;M and P respectively represents the height of text image And width;Max (I (i, j)) is the maximum value of all pixels gray value in text image, is generally taken as 255.
Watermark extracting is carried out to the text image shown in Fig. 3 b using the method and above-mentioned parameter setting of watermark extracting.This In, according to the following formula, calculate the normalizated correlation coefficient between the original watermark sequence W and watermark sequence W ' extracted (Normalized Correlation, NC):
Wherein, W indicates original watermark, and the watermark that W ' expression extracts passes through original watermark sequence and the watermark extracted Watermark known to the comparison of sequence can completely, be correctly extracted (NC=1).
The embedded system of the text image watermark of an embodiment of the present invention, the embedded system include that secondary encrypted watermark obtains Take unit, watermark acquiring unit to be embedded, the first blocking factor matrix acquiring unit, insertion watermark unit, matrix inverse transformation list Member;
The secondary encrypted watermark acquiring unit is configured to carry out secondary encryption to input watermark, obtains secondary encryption water Print;
The watermark acquiring unit to be embedded is configured to carry out Error Correction of Coding to the secondary encrypted watermark, obtain to embedding The watermark entered;
The first blocking factor matrix acquiring unit is configured to carry out second level to the text image of the watermark to be embedded Wavelet transform obtains four first band coefficient matrixes;The first band coefficient matrix is subjected to piecemeal discrete cosine Transformation obtains corresponding first blocking factor matrix;
The insertion watermark unit is configured to choose intermediate frequency coefficient, and pass through for each first blocking factor matrix It modifies coefficient and is embedded in watermark, each first blocking factor matrix after obtaining insertion watermark;
The matrix inverse transformation block, be configured to it is described insertion watermark after each first blocking factor matrix carry out instead from Cosine transform, inverse discrete wavelet transformation are dissipated, the text image of insertion watermark is obtained.
The extraction system of the text image watermark of an embodiment of the present invention, the extraction system include the second blocking factor Matrix acquiring unit, watermark acquiring unit to be decoded, watermark acquiring unit to be decrypted, watermark decryption unit;
The second blocking factor matrix acquiring unit, the text image progress second level being configured to watermark to be extracted are discrete Wavelet transformation obtains four second band coefficient matrixes;Block DCT is carried out to the second band coefficient matrix, Determine corresponding second blocking factor matrix;
The watermark acquiring unit to be decoded, is configured to the second blocking factor matrix, and selection and withdrawal coefficient carries out Watermark extracting obtains watermark to be decoded;
The watermark acquiring unit to be decrypted is configured to carry out error correction decoding processing to the watermark to be decoded, obtain To watermark to be decrypted;
The watermark decryption unit is configured to carry out secondary decryption to the watermark to be decrypted, finally be extracted Watermark information.
Person of ordinary skill in the field can be understood that, for convenience and simplicity of description, foregoing description The specific work process of system and related explanation, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
It should be noted that the embedded system of text image watermark provided by the above embodiment, text image watermark mention Take system, only the example of the division of the above functional modules, in practical applications, can according to need and will be above-mentioned Function distribution is completed by different functional modules, i.e., by the embodiment of the present invention module or step is decomposed again or group It closes, for example, the module of above-described embodiment can be merged into a module, multiple submodule can also be further split into, with complete At all or part of function described above.For module involved in the embodiment of the present invention, the title of step, only it is Differentiation modules or step, are not intended as inappropriate limitation of the present invention.
Using the extracting method embodiment of text image watermark to the JPEG compression for being 30% to 90% by quality factor Text image after attack does watermark extracting and is compared with original watermark, obtains respective NC value such as Fig. 5, horizontal axis JPEG The compression quality factor, the longitudinal axis are NC value, and as compressive strength is continuously improved, NC value is gradually increased, when compressive strength is 30%, NC value is 0.93, when compressive strength is more than or equal to 60%, NC=1.
Using text image watermark extracting method embodiment to be 0 by mean value, variance is 0.001 to 0.025 Text image after Gauss attacked by noise does watermark extracting and is compared with original watermark, obtains respective NC value such as Fig. 6, Horizontal axis is Gauss noise variance, and the longitudinal axis is NC value, and as Gauss noise variance is continuously increased, NC value is gradually decreased, noise side When difference is 0.001, NC=1.
Using the extracting method embodiment of text image watermark to the Salt&Pepper for being 0.005 to 0.05 by energy Text image after attacked by noise does watermark extracting and is compared with original watermark, obtains respective NC value such as Fig. 7, and horizontal axis is Salt & Pepper noise energy, the longitudinal axis are NC value, when noise energy is 0.005 to 0.02, NC=1, later with noise Energy improves, and NC value constantly reduces, when noise variance is 0.05, NC=0.94.
Using the extracting method embodiment of text image watermark to by the text after the attack of 3 × 3 median filtering Image does watermark extracting and is compared with original watermark, obtains NC=0.82.
Fig. 8 is to be directed to aqueous print text image shown in Fig. 3 b by the upper left corner 1/4 according to shown in an exemplary embodiment Schematic diagram after shearing.Using the extracting method embodiment of text image watermark to by after 1/4 shearing attack of the upper left corner Text image do watermark extracting and be compared with original watermark, obtain NC=0.92.
Meanwhile Fig. 9 a is that text image shown in Fig. 3 b is passed through correct cipher key-extraction according to shown in an exemplary embodiment The schematic diagram of watermark out;Fig. 9 b is according to becoming text image shown in Fig. 3 b by Arnold shown in an exemplary embodiment Change the schematic diagram for the watermark that false key extracts;Fig. 9 c be according to shown in an exemplary embodiment by text diagram shown in Fig. 3 b As the schematic diagram of the watermark gone out by secondary decryption error cipher key-extraction;By comparison it is found that proposed by the present invention be based on key Evolution and characteristic sequence based on joint transform domain extracts and encryption and decryption plays in terms of improving algorithm security Vital effect.
Those skilled in the art should be able to recognize that, mould described in conjunction with the examples disclosed in the embodiments of the present disclosure Block, method and step, can be realized with electronic hardware, computer software, or a combination of the two, software module, method and step pair The program answered can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electric erasable and can compile Any other form of storage well known in journey ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field is situated between In matter.In order to clearly demonstrate the interchangeability of electronic hardware and software, in the above description according to function generally Describe each exemplary composition and step.These functions are executed actually with electronic hardware or software mode, depend on technology The specific application and design constraint of scheme.Those skilled in the art can carry out using distinct methods each specific application Realize described function, but such implementation should not be considered as beyond the scope of the present invention.
Term " first ", " second " etc. are to be used to distinguish similar objects, rather than be used to describe or indicate specific suitable Sequence or precedence.
Term " includes " or any other like term are intended to cover non-exclusive inclusion, so that including a system Process, method, article or equipment/device of column element not only includes those elements, but also including being not explicitly listed Other elements, or further include the intrinsic element of these process, method, article or equipment/devices.
So far, it has been combined preferred embodiment shown in the drawings and describes technical solution of the present invention, still, this field Technical staff is it is easily understood that protection scope of the present invention is expressly not limited to these specific embodiments.Without departing from this Under the premise of the principle of invention, those skilled in the art can make equivalent change or replacement to the relevant technologies feature, these Technical solution after change or replacement will fall within the scope of protection of the present invention.

Claims (11)

1. a kind of embedding grammar of text image watermark, which is characterized in that the embedding grammar the following steps are included:
Secondary encryption is carried out to input watermark, obtains secondary encrypted watermark;
Error Correction of Coding is carried out to the secondary encrypted watermark, obtains watermark to be embedded;
Second level wavelet transform is carried out to the text image of watermark to be embedded, obtains four first band coefficient matrixes;By institute It states first band coefficient matrix and carries out Block DCT, obtain corresponding first blocking factor matrix;
For each first blocking factor matrix, intermediate frequency coefficient is chosen, and watermark is embedded in by modification coefficient, obtains insertion water Each first blocking factor matrix after print;
Inverse discrete cosine transformation, inverse discrete wavelet transformation are carried out to each first blocking factor matrix after the insertion watermark, obtained To the text image of insertion watermark.
2. the embedding grammar of text image watermark according to claim 1, which is characterized in that " carry out two to input watermark Secondary encryption obtains secondary encrypted watermark ", method are as follows:
Scrambling encryption processing is carried out to input watermark, obtains primary encryption watermark;
Level-one wavelet transform is carried out to the text image of watermark to be embedded, obtains LL1Subgraph coefficient matrix;To the LL1Son Figure coefficient matrix carries out global discrete cosine transform, obtains the first dct coefficient matrix;
Based on the first dct coefficient matrix, construction feature vector extracts fisrt feature sequence;By the fisrt feature Sequence and each column step-by-step exclusive or of the primary encryption watermark, obtain secondary encrypted watermark.
3. the embedding grammar of text image watermark according to claim 2, which is characterized in that " to the text of watermark to be embedded Further include the steps that the text image rescaling of watermark to be embedded before this image progress second level wavelet transform ":
When G < N × 32 or H < N × 32, small scale amplification is carried out to the text image of watermark to be embedded, is up to obtaining height H1, width G1Amplification text image;
Wherein, G, H are respectively the width of the text image of watermark to be embedded, height, and N × N is the size of watermarking images, G1、H1For It can be divided exactly by 8, be respectively greater than equal to G, H, and G1≥N×32、H1The minimum positive integer of >=N × 32.
4. the embedding grammar of text image watermark according to claim 3, which is characterized in that " be based on the first discrete cosine Transform coefficient matrix, construction feature vector extract fisrt feature sequence ", method are as follows:
"the" shape is carried out by the sequence of low frequency component to high fdrequency component to the coefficient in the first dct coefficient matrix It resets;
According to the preceding S × N number of low frequency coefficient taken out in addition to DC component that puts in order, coefficient sequence M is formedLL;Wherein, S is surprise Number and satisfaction 3≤S≤((G × G/4-1)/N, 3≤S≤((H × H/4-1)/N, MLL=[u0,u1,u2…uS×N-1];
According to preset threshold, by coefficient sequence MLLIn each coefficient be expressed as 0 or 1, obtain ordered series of numbers M 'LL
It is length to M ' using NLLIt is divided, obtains the feature vector that S length is N, feature vector group is U=[U0,U1,… Ui,…,US-1], wherein Ui=[u '0,u′1,…u′j,…u′N-1];
U is traversed, the identical characteristic value of subscript in each feature vector is taken into mode, obtains first of the value characterized by calculated mode Characteristic sequence V, the length is N.
5. the embedding grammar of text image watermark according to claim 1, which is characterized in that " by the first band system Matrix number carries out Block DCT, obtains corresponding first blocking factor matrix ", method are as follows:
To each first band coefficient matrix, following steps are executed:
According to pre-set dimension R × R, first band coefficient matrix piecemeal is cut into the O coefficient block not overlapped, wherein O=L × N, L=N+k, k are the detection digit in Error Correction of Coding, and N × N is the size of watermarking images;
Discrete cosine transform is carried out to each coefficient block respectively, O transform coefficient matrix block is obtained, uses Di,jIndicate, wherein i ∈ i | 1 < i < L }, j ∈ j | 1 < j < N };
O transform coefficient matrix block is spliced in order, obtains the first blocking factor matrix.
6. the embedding grammar of text image watermark according to claim 1, which is characterized in that " for each described first point Block coefficient matrix chooses intermediate frequency coefficient, and is embedded in watermark by modification coefficient, each first blocking factor after obtaining insertion watermark Matrix ", method are as follows:
To each transform coefficient matrix block D in each first blocking factor matrixi,j, choose two intermediate frequency coefficient Di,j(a, And D b)i,j(b, a), wherein [1, R] a ∈, b ∈ [1, R];
The watermark W to be embedded is read by turnH, watermark is embedded according to following rule:
If WH(i, j)=0 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(a,b)- Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH(i, j)=1 And Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,jWhen (a, b) < t, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);
Or
If WH(i, j)=1 and Di,j(a,b)<Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(a,b)- Di,j(b, a) < t when, enable Di,j(a, b)=Di,j(a,b)+(t/2)、Di,j(b, a)=Di,j(b,a)-(t/2);If WH(i, j)=0 And Di,j(a,b)>Di,j(b a) then exchanges Di,j(a, b) and Di,j(b, value a), and in Di,j(b,a)-Di,jWhen (a, b) < t, enable Di,j(b, a)=Di,j(b,a)+(t/2)、Di,j(a, b)=Di,j(a,b)-(t/2);
Wherein, t be watermark embedment strength, meet t > | Di,j(a,b)-Di,j(b,a)|;WH(i, j) is the watermark to be embedded The binaryzation expression of i-th row, jth column;
By WHIt is embedded into each first band coefficient matrix simultaneously.
7. a kind of extracting method of text image watermark, which is characterized in that the extracting method the following steps are included:
Second level wavelet transform is carried out to the text image of watermark to be extracted, obtains four second band coefficient matrixes;To institute It states second band coefficient matrix and carries out Block DCT, determine corresponding second blocking factor matrix;
Based on the second blocking factor matrix, selection and withdrawal coefficient carries out watermark extracting, obtains watermark to be decoded;
Error correction decoding processing is carried out to the watermark to be decoded, obtains watermark to be decrypted;
Secondary decryption, the watermark information finally extracted are carried out to the watermark to be decrypted.
8. the extracting method of text image watermark according to claim 7, which is characterized in that " be based on the second blocking factor Matrix, selection and withdrawal coefficient carry out watermark extracting, obtain watermark to be decoded ", method are as follows:
It is obtained by the following formula the corresponding watermark information of each second band coefficient matrix:
Or
Wherein, D* i,j(a,b)、D* i,j(b, a) in two in a transform coefficient matrix block in the second blocking factor matrix Frequency coefficient;Serial number of the n for second band coefficient matrix, n=1,2,3,4;A ∈ [1, R], b ∈ [1, R], R × R are pre-set dimension, Second band coefficient matrix piecemeal is cut into the multiple coefficient blocks not overlapped according to the pre-set dimension;
W is read in step-by-step* H1, W* H2, W* H3, W* H4The data value of same index in four watermark informations, takes the mode conduct of data value The corresponding lower target data value of watermark is extracted, watermark W to be decoded is obtained* H
9. the extracting method of text image watermark according to claim 7, which is characterized in that " to the water to be decrypted Print carries out secondary decryption, the watermark information finally extracted ", it specifically includes:
Level-one wavelet transform is carried out to the text image of watermark to be extracted, obtains LL* 1Subgraph coefficient matrix, to what is obtained LL* 1Subgraph coefficient matrix carries out global discrete cosine transform, obtains corresponding second dct coefficient matrix;
Based on the second dct coefficient matrix, construction feature vector extracts second feature sequence;By the second feature Sequence and the watermark step-by-step exclusive or to be decrypted, obtain the watermark by once decrypting;
Using the method opposite with telescopiny, scramble decryption processing is carried out to the watermark by once decrypting, is solved Watermark information after close.
10. a kind of embedded system of text image watermark, which is characterized in that the embedded system includes that secondary encrypted watermark obtains list Watermark acquiring unit first, to be embedded, the first blocking factor matrix acquiring unit, insertion watermark unit, matrix inverse transformation block;
The secondary encrypted watermark acquiring unit is configured to carry out secondary encryption to input watermark, obtains secondary encrypted watermark;
The watermark acquiring unit to be embedded is configured to carry out Error Correction of Coding to the secondary encrypted watermark, obtain to be embedded Watermark;
The first blocking factor matrix acquiring unit, the text image progress second level being configured to the watermark to be embedded are discrete Wavelet transformation obtains four first band coefficient matrixes;The first band coefficient matrix is subjected to Block DCT, Obtain corresponding first blocking factor matrix;
The insertion watermark unit is configured to choose intermediate frequency coefficient, and pass through modification for each first blocking factor matrix Coefficient is embedded in watermark, each first blocking factor matrix after obtaining insertion watermark;
The matrix inverse transformation block is configured to carry out more than inverse discrete each first blocking factor matrix after the insertion watermark String transformation, inverse discrete wavelet transformation, obtain the text image of insertion watermark.
11. a kind of extraction system of text image watermark, which is characterized in that the extraction system includes the second blocking factor matrix Acquiring unit, watermark acquiring unit to be decoded, watermark acquiring unit to be decrypted, watermark decryption unit;
The second blocking factor matrix acquiring unit is configured to carry out second level discrete wavelet to the text image of watermark to be extracted Transformation, obtains four second band coefficient matrixes;Block DCT is carried out to the second band coefficient matrix, is determined Corresponding second blocking factor matrix;
The watermark acquiring unit to be decoded, is configured to the second blocking factor matrix, and selection and withdrawal coefficient carries out watermark It extracts, obtains watermark to be decoded;
The watermark acquiring unit to be decrypted is configured to carry out error correction decoding processing to the watermark to be decoded, obtain to The watermark of decryption;
The watermark decryption unit is configured to carry out secondary decryption, the watermark finally extracted to the watermark to be decrypted Information.
CN201910317711.4A 2019-04-19 2019-04-19 Text image watermark embedding method and system and text image watermark extracting method and system Active CN110084733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910317711.4A CN110084733B (en) 2019-04-19 2019-04-19 Text image watermark embedding method and system and text image watermark extracting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910317711.4A CN110084733B (en) 2019-04-19 2019-04-19 Text image watermark embedding method and system and text image watermark extracting method and system

Publications (2)

Publication Number Publication Date
CN110084733A true CN110084733A (en) 2019-08-02
CN110084733B CN110084733B (en) 2021-02-02

Family

ID=67415663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910317711.4A Active CN110084733B (en) 2019-04-19 2019-04-19 Text image watermark embedding method and system and text image watermark extracting method and system

Country Status (1)

Country Link
CN (1) CN110084733B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158322A (en) * 2019-12-30 2020-05-15 上海煤气第二管线工程有限公司 On-site management system based on enterprise WeChat
CN111223035A (en) * 2020-01-07 2020-06-02 鲁东大学 Color blind watermarking method based on Hamming code, eigenvalue decomposition and image correction
CN111489278A (en) * 2020-04-07 2020-08-04 贵州大学 Text watermark embedding and extracting method based on scrambling diffusion
CN111625786A (en) * 2020-05-07 2020-09-04 清华四川能源互联网研究院 Time sequence data watermarking algorithm based on discrete cosine transform
CN111768328A (en) * 2020-07-07 2020-10-13 中国科学院自动化研究所 Text image watermark embedding method and system and text image watermark extracting method and system
CN111966974A (en) * 2020-08-18 2020-11-20 哈尔滨工业大学(威海) Safe and reversible relational database copyright protection technology
CN112150339A (en) * 2020-09-25 2020-12-29 南京师范大学 Vector geographic data watermark encryption and decryption method and system
CN112580329A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Text noise data identification method and device, computer equipment and storage medium
CN112669361A (en) * 2020-12-11 2021-04-16 山东省科学院海洋仪器仪表研究所 Method for rapidly decomposing underwater image of seawater
CN112907428A (en) * 2021-02-10 2021-06-04 海南大学 Encrypted image watermark processing method and system based on stripe transformation processing
US20210203994A1 (en) * 2015-06-12 2021-07-01 Shaoher Pan Encoding data in a source image with watermark image codes
CN113222804A (en) * 2021-06-02 2021-08-06 景德镇陶瓷大学 Ceramic process-oriented up-sampling ceramic watermark model training method and embedding method
CN113538200A (en) * 2021-07-05 2021-10-22 西安电子科技大学 Rapid robust watermarking method, system and application for color image
CN113627567A (en) * 2021-08-24 2021-11-09 北京达佳互联信息技术有限公司 Picture processing method, text processing method, related equipment and storage medium
CN114140310A (en) * 2021-12-07 2022-03-04 合肥工业大学 Digital watermark hardware circuit based on DCT (discrete cosine transformation)
CN116362953A (en) * 2023-05-30 2023-06-30 南京师范大学 High-precision map watermarking method based on invisible characters

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699508A (en) * 2009-09-03 2010-04-28 中兴通讯股份有限公司 Image digital watermark embedding and extracting method and system
US8064102B1 (en) * 2010-07-01 2011-11-22 Xerox Corporation Embedding frequency modulation infrared watermark in digital document
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN102938133A (en) * 2012-11-20 2013-02-20 海南大学 Robust watermarking method for medical images on basis of Arnold scrambling transformation and DWT (discrete wavelet transform)-DFT (discrete Fourier transform)
CN103049682A (en) * 2013-01-28 2013-04-17 上海理工大学 Character pitch encoding-based dual-watermark embedded text watermarking method
CN103208288A (en) * 2013-03-13 2013-07-17 漳州职业技术学院 Dual encryption based discrete wavelet transform-discrete cosine transform (DWT-DCT) domain audio public watermarking algorithm
CN103279919A (en) * 2013-06-21 2013-09-04 海南大学 Volume data watermarking method based on three-dimensional DWT-DCT and chaos scrambling
CN106097237A (en) * 2016-05-25 2016-11-09 中国科学院自动化研究所 The embedding grammar of image watermark and extracting method and associated method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699508A (en) * 2009-09-03 2010-04-28 中兴通讯股份有限公司 Image digital watermark embedding and extracting method and system
US8064102B1 (en) * 2010-07-01 2011-11-22 Xerox Corporation Embedding frequency modulation infrared watermark in digital document
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN102938133A (en) * 2012-11-20 2013-02-20 海南大学 Robust watermarking method for medical images on basis of Arnold scrambling transformation and DWT (discrete wavelet transform)-DFT (discrete Fourier transform)
CN103049682A (en) * 2013-01-28 2013-04-17 上海理工大学 Character pitch encoding-based dual-watermark embedded text watermarking method
CN103208288A (en) * 2013-03-13 2013-07-17 漳州职业技术学院 Dual encryption based discrete wavelet transform-discrete cosine transform (DWT-DCT) domain audio public watermarking algorithm
CN103279919A (en) * 2013-06-21 2013-09-04 海南大学 Volume data watermarking method based on three-dimensional DWT-DCT and chaos scrambling
CN106097237A (en) * 2016-05-25 2016-11-09 中国科学院自动化研究所 The embedding grammar of image watermark and extracting method and associated method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
关虎等: "A Novel Robust Digital Image Watermarking Algorithm based on Two-Level DCT", 《2014 INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE, ELECTRONICS AND ELECTRICAL ENGINEERING》 *
宁国强等: "一种基于DWT-DCT变换强鲁棒性的数字水印算法", 《电子设计工程》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210203994A1 (en) * 2015-06-12 2021-07-01 Shaoher Pan Encoding data in a source image with watermark image codes
CN112580329A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Text noise data identification method and device, computer equipment and storage medium
CN112580329B (en) * 2019-09-30 2024-02-20 北京国双科技有限公司 Text noise data identification method, device, computer equipment and storage medium
CN111158322A (en) * 2019-12-30 2020-05-15 上海煤气第二管线工程有限公司 On-site management system based on enterprise WeChat
CN111223035A (en) * 2020-01-07 2020-06-02 鲁东大学 Color blind watermarking method based on Hamming code, eigenvalue decomposition and image correction
CN111223035B (en) * 2020-01-07 2022-04-05 鲁东大学 Color blind watermarking method based on Hamming code, eigenvalue decomposition and image correction
CN111489278A (en) * 2020-04-07 2020-08-04 贵州大学 Text watermark embedding and extracting method based on scrambling diffusion
CN111625786B (en) * 2020-05-07 2022-03-01 清华四川能源互联网研究院 Time sequence data watermarking method based on discrete cosine transform
CN111625786A (en) * 2020-05-07 2020-09-04 清华四川能源互联网研究院 Time sequence data watermarking algorithm based on discrete cosine transform
CN111768328A (en) * 2020-07-07 2020-10-13 中国科学院自动化研究所 Text image watermark embedding method and system and text image watermark extracting method and system
CN111966974A (en) * 2020-08-18 2020-11-20 哈尔滨工业大学(威海) Safe and reversible relational database copyright protection technology
CN111966974B (en) * 2020-08-18 2022-04-05 哈尔滨工业大学(威海) Safe and reversible relational database copyright protection method
CN112150339A (en) * 2020-09-25 2020-12-29 南京师范大学 Vector geographic data watermark encryption and decryption method and system
CN112669361A (en) * 2020-12-11 2021-04-16 山东省科学院海洋仪器仪表研究所 Method for rapidly decomposing underwater image of seawater
CN112907428A (en) * 2021-02-10 2021-06-04 海南大学 Encrypted image watermark processing method and system based on stripe transformation processing
CN113222804B (en) * 2021-06-02 2022-03-15 景德镇陶瓷大学 Ceramic process-oriented up-sampling ceramic watermark model training method and embedding method
CN113222804A (en) * 2021-06-02 2021-08-06 景德镇陶瓷大学 Ceramic process-oriented up-sampling ceramic watermark model training method and embedding method
CN113538200A (en) * 2021-07-05 2021-10-22 西安电子科技大学 Rapid robust watermarking method, system and application for color image
CN113538200B (en) * 2021-07-05 2023-11-17 西安电子科技大学 Fast robust watermarking method, system and application for color image
CN113627567A (en) * 2021-08-24 2021-11-09 北京达佳互联信息技术有限公司 Picture processing method, text processing method, related equipment and storage medium
CN113627567B (en) * 2021-08-24 2024-04-02 北京达佳互联信息技术有限公司 Picture processing method, text processing method, related device and storage medium
CN114140310A (en) * 2021-12-07 2022-03-04 合肥工业大学 Digital watermark hardware circuit based on DCT (discrete cosine transformation)
CN114140310B (en) * 2021-12-07 2024-02-13 合肥工业大学 Digital watermark hardware circuit based on DCT transformation
CN116362953A (en) * 2023-05-30 2023-06-30 南京师范大学 High-precision map watermarking method based on invisible characters
CN116362953B (en) * 2023-05-30 2023-08-01 南京师范大学 High-precision map watermarking method based on invisible characters

Also Published As

Publication number Publication date
CN110084733B (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN110084733A (en) The embedding grammar and system of text image watermark, extracting method and system
Agarwal et al. Survey of robust and imperceptible watermarking
Ansari et al. Multipurpose image watermarking in the domain of DWT based on SVD and ABC
Mahto et al. A survey of color image watermarking: State-of-the-art and research directions
Haghighi et al. TRLH: Fragile and blind dual watermarking for image tamper detection and self-recovery based on lifting wavelet transform and halftoning technique
Ernawan et al. An improved watermarking technique for copyright protection based on tchebichef moments
Hosny et al. New geometrically invariant multiple zero-watermarking algorithm for color medical images
Malik et al. Recovery based high capacity reversible data hiding scheme using even-odd embedding
CN109191361B (en) Image watermark embedding method, image watermark extracting method and related method
Parah et al. Realisation and robustness evaluation of a blind spatial domain watermarking technique
Hadmi et al. Perceptual image hashing
CN109859093A (en) A kind of mixing transformation area image Zero watermarking method based on variable element chaotic maps
CN108629728A (en) A kind of high power capacity bianry image information concealing method
Abusitta A visual cryptography based digital image copyright protection
Agilandeeswari et al. RST invariant robust video watermarking algorithm using quaternion curvelet transform
Koliwad A comprehensive survey of contemporary researches in watermarking for copyright protection of digital images
Chen et al. A Secure and Privacy‐Preserving Watermark Based Medical Image Sharing Method
CN103093127B (en) Method and system of dynamic copyright protection based on sudoku and multiple digital watermarks
Gul A blind robust color image watermarking method based on discrete wavelet transform and discrete cosine transform using grayscale watermark image
Kannan et al. An extensive research on robust digital image watermarking techniques: A review
Mehraj et al. RBWCI: robust and blind watermarking framework for cultural images
Wang et al. Robust periodic blind watermarking based on sub-block mapping and block encryption
CN117291786A (en) DNN model back door watermarking method without third party authentication
Yasmeen et al. A novel watermarking scheme based on discrete wavelet transform‐singular value decomposition
Sridhar et al. An importance of crypto-watermarking techniques for secure transmission of multimedia information

Legal Events

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