CN102254298B - Digital watermark encrypting/decrypting method and system - Google Patents

Digital watermark encrypting/decrypting method and system Download PDF

Info

Publication number
CN102254298B
CN102254298B CN 201110235643 CN201110235643A CN102254298B CN 102254298 B CN102254298 B CN 102254298B CN 201110235643 CN201110235643 CN 201110235643 CN 201110235643 A CN201110235643 A CN 201110235643A CN 102254298 B CN102254298 B CN 102254298B
Authority
CN
China
Prior art keywords
dct coefficient
dimensional array
picture
information
dct
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.)
Active
Application number
CN 201110235643
Other languages
Chinese (zh)
Other versions
CN102254298A (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.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology Co Ltd
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 Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN 201110235643 priority Critical patent/CN102254298B/en
Publication of CN102254298A publication Critical patent/CN102254298A/en
Application granted granted Critical
Publication of CN102254298B publication Critical patent/CN102254298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a digital watermark encrypting/decrypting method and system. According to the digital watermark encrypting/decrypting method and system, the digital watermark encrypting/decrypting algorithm is greatly simplified, the calculation amount of encrypting/decrypting is remarkably reduced, the encrypting/decrypting efficiency is improved, and the digital watermark can be ensured to have extremely high robustness. The digital watermark encrypting method provided by the embodiment of the invention comprises the steps of: carrying out discrete cosine transformation on all the image blocks of a carrier picture to obtain a DCT (discrete cosine transformation) coefficient of the carrier picture, and extracting the DCT coefficient from an intermediate frequency band; digitalizing the information to be encrypted to obtain a corresponding two-dimensional array; mapping the two-dimensional array to the DCT coefficient of the intermediate frequency band according to a coefficient exchanging rule so as to attach the information to be encrypted into the carrier picture; and carrying out inverse DCT on the carrier picture attached with the information to be encrypted to obtain an encrypted picture.

Description

The encipher-decipher method of digital watermarking and system
Technical field
The present invention relates to digital watermark information safety technique field, especially relate to a kind of encipher-decipher method and system of digital watermarking.
Background technology
Along with the expanding day of internet scale, people enjoy increasing resource, resource anti-piracy more and more important.The digital watermark information safety technique is to develop at present very fast a kind of hot technology, and itself and image processing, digital communication, cryptography, Information security discipline have intersection.
In digital watermark technology, the data that needs are encrypted are embedded in media work, need these data are carried out conversion before adding, and the data after conversion are called digital watermarking.Digital watermarking joins in works as hiding Info, and does not affect original works, and digital watermarking has robustness, and namely original works amplifies, shearing, format conversion even still can correctly recover digital watermarking after disturbing, i.e. original data of encrypting.
Digital watermarking algorithm mainly contains two large classes at present, and the first kind is based on the algorithm of spatial domain, as least significant bit (LSB) algorithm (LSB); Equations of The Second Kind is based on the algorithm of spectrum domain, as the algorithm based on discrete cosine transform (DCT), wavelet transformation (WT), Fourier transform (FT/FFT).
Yet still there are some problems in existing digital watermarking algorithm, for example, and based on the algorithm poor robustness of spatial domain, when running into the original information of very difficult recovery such as interference or shearing; And based on the algorithm of spectrum domain, with respect to the algorithm based on spatial domain, robustness is good, but the data volume that can embed based on the algorithm of spectrum domain is usually less, and cryptographic algorithm is usually fixing and more complicated, and calculated amount is larger, and encryption efficiency is lower.
Summary of the invention
The embodiment of the present invention provides a kind of encipher-decipher method and system of digital watermarking, has greatly simplified the enciphering and deciphering algorithm of digital watermarking, has significantly reduced the encryption and decryption calculated amount, has improved encryption and decryption efficient, and can guarantee that digital watermarking has very strong robustness.
For achieving the above object, the technical scheme of the embodiment of the present invention is achieved in that
The embodiment of the present invention provides a kind of encryption method of digital watermarking, and described method comprises:
Each image block to the carrier picture carries out discrete cosine transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
The information that needs are encrypted is carried out digitized processing, obtain corresponding two-dimensional array;
According to the coefficient exchange regulation, described two-dimensional array is mapped in described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt;
Need the carrier picture of the information of encryption to carry out anti-dct transform to described having added, obtain encrypting picture.
The embodiment of the present invention also provides a kind of decryption method of digital watermarking, and described method comprises:
The encryption picture that receives is carried out dct transform, obtain encrypting the DCT coefficient of picture, and extract Mid Frequency DCT coefficient;
According to obtaining with the corresponding array extracting rule of encryption end the corresponding two-dimensional array of information that needs are encrypted from described Mid Frequency DCT coefficient;
Utilize described two-dimensional array reduction needing to obtain the information of encryption;
Wherein, described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation.
The embodiment of the present invention also provides a kind of encrypting and deciphering system of digital watermarking, and described system comprises encryption device and decryption device,
Described encryption device comprises as lower unit:
The DCT coefficient is encrypted extraction unit, is used for each image block of carrier picture is carried out discrete cosine transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
The two-dimensional array acquiring unit, the information that is used for needing to encrypt is carried out digitized processing, obtains corresponding two-dimensional array;
Coding unit is used for according to the coefficient exchange regulation, described two-dimensional array being mapped to described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt;
The inverse transformation unit is used for needing the carrier picture of the information of encryption to carry out anti-dct transform to described having added, and obtains encrypting picture;
Described decryption device comprises as lower unit:
DCT coefficient deciphering extraction unit is used for the encryption picture that receives is carried out dct transform, obtains encrypting the DCT coefficient of picture, and extracts Mid Frequency DCT coefficient;
Decoding unit is used for according to obtaining from described Mid Frequency DCT coefficient the corresponding two-dimensional array of information that needs are encrypted with the corresponding array extracting rule of encryption end;
The information reverting unit is used for utilizing described two-dimensional array reduction needing to obtain the information of encryption;
Wherein, described coefficient exchange regulation comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation;
Described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the logical relation that is satisfied according to described two DCT coefficients is determined the respective element in two-dimensional array.
As seen by above-mentioned, the embodiment of the present invention is adjusted by the Mid Frequency DCT coefficient to the carrier picture, and the digital watermarking after conversion is lain in the carrier picture, and a kind of novel digital watermarking encipherment scheme based on the DCT coefficient is provided.Encipherment scheme provided by the invention only needs the frequency chunks of Mid Frequency is adjusted, and as frequency chunks being carried out order again, has greatly simplified cryptographic algorithm, has significantly reduced computation degree, has improved encryption efficiency.
Accordingly, when adopting decrypt scheme provided by the invention, because decipherment algorithm is simplified greatly, also can significantly reduce the deciphering calculated amount, thereby improve deciphering efficient.
And, facts have proved when adopting the watermark of this programme enciphered digital, to have stronger robustness, can both correctly reply digital watermarking even be subject at the carrier picture in the situations such as format conversion, correction, shearing and noise pollution.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or description of the Prior Art, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The encryption method process flow diagram of a kind of digital watermarking that Fig. 1 provides for the embodiment of the present invention one;
The decryption method process flow diagram of a kind of digital watermarking that Fig. 2 provides for the embodiment of the present invention two;
The encrypting and deciphering system structural representation of a kind of digital watermarking that Fig. 3 provides for the embodiment of the present invention four;
The example of a kind of carrier picture that Fig. 4 provides for this programme;
The example of a kind of watermark picture that Fig. 5 provides for this programme;
Fig. 6 is for adopting the carrier picture after this programme adds digital watermarking;
Fig. 7 is the watermark picture of the digital watermarking adopting this programme and extract from Fig. 6;
Fig. 8 is the picture after the carrier picture that adds digital watermarking is sheared;
Fig. 9 is for extracting the watermark picture that obtains from Fig. 8;
Figure 10 is for carrying out the picture after format conversion to the carrier picture that adds digital watermarking;
Figure 11 is for extracting the watermark picture that obtains from Figure 10;
Figure 12 is for adding the picture after noise to the carrier picture that adds digital watermarking;
Figure 13 is for extracting the watermark picture that obtains from Figure 12.
Embodiment
Below in conjunction with accompanying drawing of the present invention, technical scheme of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skills obtain under the prerequisite of not making creative work belongs to the scope of protection of the invention.
The embodiment of the present invention one provides a kind of encryption method of digital watermarking, and referring to Fig. 1, described method comprises:
11: each image block to the carrier picture carries out discrete cosine transform (DCT), obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
12: the information that will need to encrypt is carried out digitized processing, obtains corresponding two-dimensional array;
13: according to the coefficient exchange regulation, described two-dimensional array is mapped in described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt;
14: need the carrier picture of the information of encryption to carry out anti-dct transform to described having added, obtain encrypting picture.
Further, above-mentioned coefficient exchange regulation comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation.
As seen by above-mentioned, the embodiment of the present invention is adjusted by the Mid Frequency DCT coefficient to the carrier picture, and the digital watermarking after conversion is lain in the carrier picture, and a kind of novel digital watermarking encipherment scheme based on the DCT coefficient is provided.Encipherment scheme provided by the invention only needs the frequency chunks of Mid Frequency is adjusted, and as frequency chunks being carried out order again, has greatly simplified cryptographic algorithm, has significantly reduced computation degree, has improved encryption efficiency.
Accordingly, when adopting decrypt scheme provided by the invention, because decipherment algorithm is simplified greatly, also can significantly reduce the deciphering calculated amount, thereby improve deciphering efficient.
And, facts have proved when adopting the watermark of this programme enciphered digital, to have stronger robustness, can both correctly reply digital watermarking even be subject at the carrier picture in the situations such as format conversion, correction, shearing and noise pollution.
The dct transform coefficient that adopts in this programme is arranged in the intermediate frequency zone of transform domain, main cause is: if when selecting the dct transform coefficient of high-frequency region, because find through research, interfere information generally all shows in the high-frequency region of image, and the anti-tampering property of this mode is poor; If when selecting the dct transform coefficient of low frequency region, because most information after the raw information process dct transform of carrier picture has all dropped in low frequency region, this mode can be influential to carrier data, may easily be perceiveed.This programme had both avoided being subject to the interference of noise by choosing the dct transform coefficient of Mid Frequency, also can not affect the content of carrier picture itself.
The embodiment of the present invention two provides a kind of decryption method of digital watermarking, and referring to Fig. 2, described method comprises:
21: the encryption picture that receives is carried out dct transform, obtain encrypting the DCT coefficient of picture, and extract Mid Frequency DCT coefficient; At this, the encryption picture that this encryption picture obtains for the cipher mode that adopts in above-described embodiment one.
The scope of the Mid Frequency DCT coefficient that extracts in step 21 and above-mentioned steps 11 is consistent.For example, the DCT coefficient of the carrier picture that obtains in step 11 comprises tactic 0 to 100 DCT coefficient, extracts the 30th to the 70th DCT coefficient as Mid Frequency DCT coefficient; Also obtain encrypting 0 to 100 DCT coefficient of picture in step 21, and extract the 30th to the 70th DCT coefficient as Mid Frequency DCT coefficient.This mode can further guarantee the validity of decrypted result, improves robustness.Be appreciated that the scope of the Mid Frequency DCT coefficient that extracts in step 21 and above-mentioned steps 11 can have certain deviation in the error range that allows.
22: according to obtaining with the corresponding array extracting rule of encryption end the corresponding two-dimensional array of information that needs are encrypted from described Mid Frequency DCT coefficient.
23: utilize described two-dimensional array reduction needing to obtain the information of encryption.
Wherein, described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the logical relation that is satisfied according to described two DCT coefficients is determined the respective element in two-dimensional array.
By as seen above-mentioned, corresponding to novel encipherment scheme, the embodiment of the present invention also provides a kind of decrypt scheme, this decrypt scheme only needs the frequency chunks of Mid Frequency is adjusted, as frequency chunks being carried out order again, greatly simplify decipherment algorithm, significantly reduced the deciphering calculated amount, improved deciphering efficient.
And, facts have proved when adopting the watermark of this programme enciphered digital, to have stronger robustness, can both correctly reply digital watermarking even be subject at the carrier picture in the situations such as format conversion, correction, shearing and noise pollution.
The below describes the digital encryption and decryption scheme that the embodiment of the present invention three provides.
The encryption method of a kind of digital watermarking that the embodiment of the present invention three provides comprises:
11: each image block to the carrier picture carries out dct transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient.
Do not limit in this concrete size to above-mentioned image block, for example, can adopt the image block of 8*8, can adopt the image block of 8*16 yet.When adopting the image block of 8*8, can carry out dct transform by following formula, obtain the DCT coefficient of carrier picture:
F ( u , v ) = 1 4 C ( u ) C ( v ) Σ x = 0 7 Σ y = 0 7 f ( x , y ) cos [ π ( 2 x + 1 ) u 16 ] cos [ π ( 2 y + 1 ) v 16 ]
Wherein, satisfy u, during v=0, C (u),
Figure BDA0000083903050000072
When u, v get other values, C (u), C (v)=1.
12: the information that will need to encrypt is carried out digitized processing, obtains corresponding two-dimensional array.
The concrete form of the information of encrypting as required is different, can adopt several different methods to obtain above-mentioned two-dimensional array.At least comprise following three kinds of modes:
Mode one: the described simulating signal of the information of encryption that needs is converted into digital signal, and this digital signal is quantized, obtain described two-dimensional array.
This mode mainly is applicable to the scene to video or audio-frequency information encryption.After video or audio-frequency information analog to digital conversion, can obtain this video or two-dimensional array corresponding to audio frequency through operations such as quantifications.
Mode two: the content of the information of encrypting as required, the information that needs are encrypted adopts white to write in the picture of black, obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture.
This mode mainly is applicable to the scene to the text message encryption.By the mode of the information of needs encryption with " wrongly written or mispronounced character " write in the picture of " black matrix ", obtain the watermark picture.And the watermark picture is carried out binary conversion treatment, obtain the two-dimensional array of two-value, as by 0 and 1 two-dimensional array that consists of.The white gray value is 255, and the gray-scale value of black is 0, and the element in two-dimensional array corresponding to the pixel of gray-scale value 255 is 1, and the element in two-dimensional array corresponding to the pixel of gray-scale value 0 is 0, is about to active data and is set to 1.
Mode three: the described information that needs to encrypt is for needing the image of encryption, and the image gray processing with needs are encrypted obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture.
This mode goes for the scene to the encryption of still image.
The image (as cromogram) that needs are encrypted carries out gray processing, then according to gray threshold being arranged to 0 greater than the element in the corresponding two-dimensional array of the pixel of this threshold value (perhaps 1), will be arranged to 1 less than the element in the corresponding two-dimensional array of the pixel of this threshold value (perhaps 0).Be appreciated that when the image of need encrypting this during as gray level image, above-mentioned gray processing operation can be omitted.
In the technology of this programme, can be set to 1 by the corresponding element value of effective enciphered data, the corresponding element value of other non-effective data is set to 0.
The two-dimensional array that obtains by above-mentioned three kinds of modes can be the binaryzation two-dimensional array of (only comprising 0 and 1 as the element value), two-dimensional array that also can many-valuedization (the element value comprises multiple numerical value).
13: according to the coefficient exchange regulation, described two-dimensional array is mapped in described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt.
In the coefficient exchange regulation, the logical relation that each element in two-dimensional array corresponds respectively to a logarithm value is set; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation.
The main design of above-mentioned coefficient exchange regulation is, determine two positions in Mid Frequency DCT coefficient, pair of DC T coefficient has been indicated in this position, choose these two DCT coefficients and adjust this two DCT coefficients (as switch) according to logical relation, repetitive operation is until be mapped to two-dimensional array in Mid Frequency DCT coefficient (as the Mid Frequency DCT coefficient after rearrangement) after adjustment.
Be the binaryzation array that forms by 1 and 0 when two-dimensional array, exemplary, above-mentioned steps 13 can be specific as follows:
In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, described DCT coefficient comprises a DCT coefficient and the 2nd DCT coefficient;
Described two-dimensional array is the binaryzation array that forms by 1 and 0, if current in two-dimensional array need the encryption element be 0, whether the decision logic relation is that a DCT coefficient is more than or equal to the 2nd DCT coefficient, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, with a described DCT coefficient and the 2nd DCT coefficient switch;
If in two-dimensional array, the current element of need encrypting be 1, the decision logic relation be whether a DCT coefficient less than the 2nd DCT coefficient, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, with a described DCT coefficient and the 2nd DCT coefficient switch.
Further, above-mentionedly formed by a position, odd number place and position, an even number place according to the determined present encoding of predetermined location relationship position, at this moment, logical relation can be expressed as code:
Figure BDA0000083903050000091
Wherein, WaterMarkData[iDxWaterMarkBit] expression two-dimensional array in current encryption element, iDxWaterMarkBit represents sequence number, plDCTBlock[m*8+1] expression position, odd number place DCT coefficient (a DCT coefficient), plDCTBlock[(m-1) * 8+2] expression position, even number place DCT coefficient (the 2nd DCT coefficient).
Being appreciated that present encoding position in this programme is not limited to by a position, odd number place and position, an even number place forms, and also can be the position by determined any two intermediate frequencies of predetermined location relationship DCT coefficient.
For the ease of the clear technical scheme of describing the embodiment of the present invention, in inventive embodiment, adopted the printed words such as " first ", " second " that the essentially identical identical entry of function and efficacy or similar item are distinguished, it will be appreciated by those skilled in the art that the printed words such as " first ", " second " do not limit quantity and execution order.
When two-dimensional array be the array that is comprised of elements A, B and C, exemplary, above-mentioned steps 13 can be specific as follows:
In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, described DCT coefficient comprises a DCT coefficient and the 2nd DCT coefficient;
If current in two-dimensional array need the encryption element be A, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is greater than first threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation;
If current in two-dimensional array need the encryption element be B, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is greater than Second Threshold and less than or equal to first threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation;
If current in two-dimensional array need the encryption element be C, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is less than or equal to Second Threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation.
The above-mentioned only array take two-dimensional array as three values is appreciated that when two-dimensional array comprises three above values as example is illustrated, can adopts similar mode to process.
Further, can pass through self-defined above-mentioned predetermined location relationship in this programme, the present encoding position of determining has flexibly been improved the dirigibility of encoding scheme, thereby has been strengthened the robustness of resulting digital watermarking.For example, in the example shown in above-mentioned code, predetermined location relationship can be expressed as m*8, and the m value can be 2,4 etc.
When encoding, the present encoding position is upgraded next time, again extracted pair of DC T coefficient.For example, the indicated next coding site of described predetermined location relationship can be made of the position, next odd number place that is close to position, current odd number place and the position, next even number place that is close to position, current even number place.A simple example is, if position, current odd number place is 1, position, even number place is 2, and when encoding, position, odd number place is 3 next time, and position, even number place is 4.
Further, this programme also comprises: after with a described DCT coefficient and the 2nd DCT coefficient switch, under guaranteeing that the respective logic relation is set up, adjust the numerical value of the 2nd DCT coefficient according to the numerical value of a DCT coefficient, adjust the numerical value of a DCT coefficient according to the numerical value of the 2nd DCT coefficient.
After considering the DCT coefficient change to original carrier picture, as switch, increase, minimizing numerical value, may affect the interior perhaps effect of original carrier picture, guaranteeing under the prerequisite that the respective logic relation is set up, the DCT coefficient DCT coefficient original in its present position after adjusting adjusted again.For example, adjusting operation is for to exchange the DCT coefficient 1 of position 1 and the DCT coefficient 2 of position 2, after place-exchange, the numerical value that is at present the DCT coefficient 2 of position 1 according to 1 pair of DCT coefficient is adjusted, the numerical value that is at present the DCT coefficient 1 of position 2 according to 2 pairs of DCT coefficients is adjusted, reduce the deviation of DCT coefficient before and after adjusting on same position, thereby avoid affecting the interior perhaps effect of original carrier picture.
14: need the carrier picture of the information of encryption to carry out anti-dct transform to described having added, obtain encrypting picture.
When adopting the image block of 8*8, can carry out anti-dct transform by following formula, obtain the DCT coefficient of carrier picture:
f ( x , y ) = 1 4 Σ u = 0 7 Σ v = 0 7 F ( u , v ) C ( u ) C ( v ) cos [ π ( 2 u + 1 ) x 16 ] cos [ π ( 2 v + 1 ) y 16 ]
Wherein, satisfy u, during v=0, C (u),
Figure BDA0000083903050000122
When u, v get other values, C (u), C (v)=1.
Complete the encryption of the information that needs are encrypted by aforesaid operations, the process of extracting digital watermarking in decrypting end can be with reference to above-mentioned ciphering process, decrypting process can be considered as an inverse process of ciphering process, and deciphering obtains corresponding two-dimensional array and reduction obtains the information that original needs are encrypted.For example, utilize two-dimensional array reduction to obtain the watermark picture, and adopt optical character identification (Optical Character Recognition, OCR) technology, from picture character recognition out.
As seen by above-mentioned, the embodiment of the present invention is adjusted by the Mid Frequency DCT coefficient to the carrier picture, and the digital watermarking after conversion is lain in the carrier picture, and a kind of novel digital watermarking encipherment scheme based on the DCT coefficient is provided.Encipherment scheme provided by the invention only needs the frequency chunks of Mid Frequency is adjusted, and as frequency chunks being carried out order again, has greatly simplified cryptographic algorithm, has significantly reduced computation degree, has improved encryption efficiency.
Accordingly, when adopting decrypt scheme provided by the invention, because decipherment algorithm is simplified greatly, also can significantly reduce the deciphering calculated amount, thereby improve deciphering efficient.
And, facts have proved when adopting the watermark of this programme enciphered digital, to have stronger robustness, can both correctly reply digital watermarking even be subject at the carrier picture in the situations such as format conversion, correction, shearing and noise pollution.
The embodiment of the present invention four also provides a kind of encrypting and deciphering system of digital watermarking, and referring to Fig. 3, described system comprises encryption device 31 and decryption device 32,
Described encryption device 31 comprises as lower unit:
The DCT coefficient is encrypted extraction unit 311, is used for each image block of carrier picture is carried out discrete cosine transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
Two-dimensional array acquiring unit 312, the information that is used for needing to encrypt is carried out digitized processing, obtains corresponding two-dimensional array;
Coding unit 313 is used for according to the coefficient exchange regulation, described two-dimensional array being mapped to described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt;
Inverse transformation unit 314 is used for needing the carrier picture of the information of encryption to carry out anti-dct transform to described having added, and obtains encrypting picture;
Described decryption device 32 comprises as lower unit:
DCT coefficient deciphering extraction unit 321 is used for the encryption picture that receives is carried out dct transform, obtains encrypting the DCT coefficient of picture, and extracts Mid Frequency DCT coefficient;
Decoding unit 322 is used for according to obtaining from described Mid Frequency DCT coefficient the corresponding two-dimensional array of information that needs are encrypted with the corresponding array extracting rule of encryption end;
Information reverting unit 323 is used for utilizing described two-dimensional array reduction needing to obtain the information of encryption;
Wherein, described coefficient exchange regulation comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation;
Described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the logical relation that is satisfied according to described two DCT coefficients is determined the respective element in two-dimensional array.
In system embodiment of the present invention, the specific works mode of each device and unit can be referring to embodiment of the method for the present invention.
As seen by above-mentioned, the embodiment of the present invention is adjusted by the Mid Frequency DCT coefficient to the carrier picture, and the digital watermarking after conversion is lain in the carrier picture, and a kind of novel digital watermarking encipherment scheme based on the DCT coefficient is provided.Encipherment scheme provided by the invention only needs the frequency chunks of Mid Frequency is adjusted, and as frequency chunks being carried out order again, has greatly simplified cryptographic algorithm, has significantly reduced computation degree, has improved encryption efficiency.
Accordingly, when adopting decrypt scheme provided by the invention, because decipherment algorithm is simplified greatly, also can significantly reduce the deciphering calculated amount, thereby improve deciphering efficient.
And, facts have proved when adopting the watermark of this programme enciphered digital, to have stronger robustness, can both correctly reply digital watermarking even be subject at the carrier picture in the situations such as format conversion, correction, shearing and noise pollution.
Below by experimental result, further illustrate the beneficial effect that this programme brings:
Referring to Fig. 4, shown the example of a kind of carrier picture that this programme provides.
Referring to Fig. 5, shown the example of a kind of watermark picture that this programme provides.The information that needs to encrypt is symbol a and b, and a and b are write in the picture of black with white, obtains this watermark picture.
Fig. 6 has shown the carrier picture that adopts after this programme adds digital watermarking, and Fig. 7 has shown the watermark picture of the digital watermarking that employing this programme extracts.
Fig. 6 and Fig. 4 are compared, can find out, when utilizing this programme to lie in digital watermarking in the carrier picture, digital watermarking is hidden in carrier image well, and carrier image does not visually change.Fig. 7 and Fig. 5 are compared, can find out, this programme can extract digital watermarking very exactly.
For the robustness of the digital watermarking of verifying this programme, after the carrier picture that adds digital watermarking has been carried out shearing or correction, format conversion or added noise etc. to process, again carry out the extraction of digital watermarking.
Referring to Fig. 8, shown the picture after the carrier picture that adds digital watermarking has been carried out shearing, partial data content disappearance is arranged in the picture after shearing.Fig. 9 has shown the watermark picture that extraction obtains from Fig. 8;
Referring to Figure 10, shown the carrier picture that adds digital watermarking has been carried out the picture after the format conversion, the mode of format conversion is for being converted to picture the BMP of 256 looks from JPG.Figure 11 has shown the watermark picture that extraction obtains from Figure 10;
Referring to Figure 12, shown the carrier picture that adds digital watermarking is added picture after noise, add the circular spot that has obviously occurred a large amount of black on the picture after noise.Figure 13 has shown the watermark picture that extraction obtains from Figure 12.
Can find out from Fig. 9, Figure 11 and Figure 13, the results show, the digital watermarking of adopting this programme at the carrier picture through format conversion, altered, sheared, be subject in the situation such as noise pollution, robustness is preferably arranged.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (9)

1. the encryption method of a digital watermarking, is characterized in that, described method comprises:
Each image block to the carrier picture carries out discrete cosine transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
The information that needs are encrypted is carried out digitized processing, obtain corresponding two-dimensional array, described two-dimensional array is that two-dimensional array or the described two-dimensional array of binaryzation is the two-dimensional array of many-valuedization;
According to the coefficient exchange regulation, described two-dimensional array is mapped in described Mid Frequency DC T coefficient, is attached in the carrier picture with the information that will need to encrypt;
Need the carrier picture of the information of encryption to carry out anti-dct transform to described having added, obtain encrypting picture;
Wherein, the described information that will need to encrypt is carried out digitized processing, obtains corresponding two-dimensional array and comprises at least following mode:
The described simulating signal of the information of encryption that needs is converted into digital signal, and this digital signal is quantized, obtain described two-dimensional array; Perhaps,
The content of the information of encrypting as required, the information that needs are encrypted adopts white to write in the picture of black, obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture; Perhaps,
The described information that needs to encrypt is for needing the image of encryption, and the image gray processing with needs are encrypted obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture.
2. method according to claim 1, is characterized in that, describedly according to the coefficient exchange regulation, described two-dimensional array is mapped to described Mid Frequency DCT coefficient and comprises:
The logical relation that each element in two-dimensional array corresponds respectively to a logarithm value is set;
For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation.
3. method according to claim 2, is characterized in that, describedly according to the coefficient exchange regulation, described two-dimensional array is mapped to described Mid Frequency DCT coefficient and comprises:
In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, described DCT coefficient comprises a DCT coefficient and the 2nd DCT coefficient;
Described two-dimensional array is the binaryzation array that forms by 1 and 0, if current in two-dimensional array need the encryption element be 0, whether the decision logic relation is that a DCT coefficient is more than or equal to the 2nd DCT coefficient, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, with a described DCT coefficient and the 2nd DCT coefficient switch;
If in two-dimensional array, the current element of need encrypting be 1, the decision logic relation be whether a DCT coefficient less than the 2nd DCT coefficient, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, with a described DC T coefficient and the 2nd DCT coefficient switch.
4. method according to claim 3, is characterized in that,
After with a described DCT coefficient and the 2nd DCT coefficient switch, under guaranteeing that the respective logic relation is set up, adjust the numerical value of the 2nd DCT coefficient according to the numerical value of a DCT coefficient, adjust the numerical value of a DCT coefficient according to the numerical value of the 2nd DCT coefficient.
5. method according to claim 3, is characterized in that,
Formed by a position, odd number place and position, an even number place according to the determined present encoding of predetermined location relationship position.
6. method according to claim 5, is characterized in that,
The indicated next coding site of described predetermined location relationship is made of the position, next odd number place that is close to position, current odd number place and the position, next even number place that is close to position, current even number place.
7. method according to claim 2, is characterized in that, describedly according to the coefficient exchange regulation, described two-dimensional array is mapped to described Mid Frequency DCT coefficient and comprises:
In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, described DCT coefficient comprises a DCT coefficient and the 2nd DCT coefficient;
Described two-dimensional array is the array that is comprised of elements A, B and C, if current in two-dimensional array need the encryption element be A, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is greater than first threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation;
If current in two-dimensional array need the encryption element be B, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is greater than Second Threshold and less than or equal to first threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation;
If current in two-dimensional array need the encryption element be C, whether the decision logic relation is that the difference of a DCT coefficient and the 2nd DCT coefficient is less than or equal to Second Threshold, if, keep a described DCT coefficient and the 2nd DCT coefficient, if not, adjust the numerical value of a described DCT coefficient and the 2nd DCT coefficient so that the establishment of described logical relation.
8. the decryption method of a digital watermarking, is characterized in that, described method comprises:
The encryption picture that receives is carried out dct transform, obtain encrypting the DCT coefficient of picture, and extract Mid Frequency DCT coefficient;
According to obtaining with the corresponding array extracting rule of encryption end the corresponding two-dimensional array of information that needs are encrypted from described Mid Frequency DCT coefficient;
According to encrypting the end inverse process of the described two-dimensional array of Information generation of encryption as required, utilize described two-dimensional array reduction to obtain the information that to encrypt;
Wherein, described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the logical relation that is satisfied according to described two DCT coefficients is determined the respective element in two-dimensional array;
Wherein, described two-dimensional array is that two-dimensional array or the described two-dimensional array of binaryzation is the two-dimensional array of many-valuedization, and the inverse process of the described two-dimensional array of Information generation that described encryption end is encrypted as required comprises:
The described simulating signal of the information of encryption that needs is converted into digital signal, and this digital signal is quantized, obtain the inverse process of described two-dimensional array; Perhaps,
The content of the information of encrypting as required, the information that needs are encrypted adopts white to write in the picture of black, obtains the watermark picture, and, obtain the inverse process of described two-dimensional array by the gray-scale value that extracts described watermark picture; Perhaps,
The image of described information of need encrypting for needing to encrypt, the image gray processing with needs are encrypted obtains the watermark picture, and, obtain the inverse process of described two-dimensional array by the gray-scale value that extracts described watermark picture.
9. the encrypting and deciphering system of a digital watermarking, is characterized in that, described system comprises encryption device and decryption device,
Described encryption device comprises as lower unit:
The DCT coefficient is encrypted extraction unit, is used for each image block of carrier picture is carried out discrete cosine transform, obtains the DCT coefficient of carrier picture, and extracts Mid Frequency DCT coefficient;
The two-dimensional array acquiring unit, the information that is used for needing to encrypt is carried out digitized processing, obtains corresponding two-dimensional array, and described two-dimensional array is that two-dimensional array or the described two-dimensional array of binaryzation is the two-dimensional array of many-valuedization;
Coding unit is used for according to the coefficient exchange regulation, described two-dimensional array being mapped to described Mid Frequency DCT coefficient, is attached in the carrier picture with the information that will need to encrypt;
The inverse transformation unit is used for needing the carrier picture of the information of encryption to carry out anti-dct transform to described having added, and obtains encrypting picture;
Described decryption device comprises as lower unit:
DCT coefficient deciphering extraction unit is used for the encryption picture that receives is carried out dct transform, obtains encrypting the DCT coefficient of picture, and extracts Mid Frequency DCT coefficient;
Decoding unit, be used for according to obtaining from described Mid Frequency DCT coefficient the corresponding two-dimensional array of information that needs are encrypted with the corresponding array extracting rule of encryption end, wherein, described two-dimensional array is that two-dimensional array or the described two-dimensional array of binaryzation are the two-dimensional array of many-valuedization;
The information reverting unit is used for holding the inverse process of the described two-dimensional array of Information generation of encryption as required according to encryption, utilizes described two-dimensional array reduction needing to obtain the information of encryption;
Wherein, described coefficient exchange regulation comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; For each element in two-dimensional array, in described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the numerical value of adjusting described two DCT coefficients satisfies corresponding logical relation;
Described array extracting rule comprises: the logical relation that each element in two-dimensional array is corresponded respectively to a logarithm value; In described Mid Frequency DCT coefficient, according to the determined present encoding of predetermined location relationship position, extract respectively two DCT coefficients, the logical relation that is satisfied according to described two DCT coefficients is determined the respective element in two-dimensional array;
Described two-dimensional array acquiring unit, concrete being used for is converted into digital signal with the described simulating signal of the information of encryption that needs, and this digital signal is quantized, and obtains described two-dimensional array; Perhaps, the content of the information of encrypting as required, the information that needs are encrypted adopts white to write in the picture of black, obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture; Perhaps, the described information that needs to encrypt is for needing the image of encryption, and the image gray processing with needs are encrypted obtains the watermark picture, and, obtain described two-dimensional array by the gray-scale value that extracts described watermark picture;
Described information reverting unit, concrete being used for is converted into digital signal with the described simulating signal of the information of encryption that needs, and this digital signal is quantized, and obtains the inverse process of described two-dimensional array; Perhaps, the content of the information of encrypting as required, the information that needs are encrypted adopts white to write in the picture of black, obtains the watermark picture, and, obtain the inverse process of described two-dimensional array by the gray-scale value that extracts described watermark picture; Perhaps, the image of described information of need encrypting for needing to encrypt, the image gray processing with needs are encrypted obtains the watermark picture, and, obtain the inverse process of described two-dimensional array by the gray-scale value that extracts described watermark picture.
CN 201110235643 2011-08-17 2011-08-17 Digital watermark encrypting/decrypting method and system Active CN102254298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110235643 CN102254298B (en) 2011-08-17 2011-08-17 Digital watermark encrypting/decrypting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110235643 CN102254298B (en) 2011-08-17 2011-08-17 Digital watermark encrypting/decrypting method and system

Publications (2)

Publication Number Publication Date
CN102254298A CN102254298A (en) 2011-11-23
CN102254298B true CN102254298B (en) 2013-06-19

Family

ID=44981542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110235643 Active CN102254298B (en) 2011-08-17 2011-08-17 Digital watermark encrypting/decrypting method and system

Country Status (1)

Country Link
CN (1) CN102254298B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824249A (en) * 2014-03-21 2014-05-28 上海斐讯数据通信技术有限公司 Picture hiding and acquiring method and intelligent terminal
CN105991559B (en) * 2015-02-05 2019-03-01 同济大学 A kind of user security login method based on image encryption technology
CN105427234A (en) * 2016-01-25 2016-03-23 上海斐讯数据通信技术有限公司 Sharing method and sharing system for WIFI password
CN106530205B (en) * 2016-11-15 2020-01-10 北京鹏润鸿途科技股份有限公司 Robust watermark embedding and detecting method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1421782A (en) * 2001-11-28 2003-06-04 佳程防伪科技(深圳)有限公司 Digital watermark anti-fake method for bills
CN101699508A (en) * 2009-09-03 2010-04-28 中兴通讯股份有限公司 Image digital watermark embedding and extracting method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1421782A (en) * 2001-11-28 2003-06-04 佳程防伪科技(深圳)有限公司 Digital watermark anti-fake method for bills
CN101699508A (en) * 2009-09-03 2010-04-28 中兴通讯股份有限公司 Image digital watermark embedding and extracting method and system

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
一种基于DCT域的按序嵌入水印算法;刘正东等;《自动化技术与应用》;20071231;第26卷(第10期);第55-58页 *
一种频率域数字水印算法;王伟静等;《咸阳师范学院学报》;20081130;第23卷(第6期);第44-47页 *
一种鲁棒性较强的DCT图像水印算法;张国良;《嘉兴学院学报》;20090531;第21卷(第3期);第42-46页 *
刘正东等.一种基于DCT域的按序嵌入水印算法.《自动化技术与应用》.2007,第26卷(第10期),第55-58页.
张国良.一种鲁棒性较强的DCT图像水印算法.《嘉兴学院学报》.2009,第21卷(第3期),第42-46页.
李蕴华等.一种基于人类视觉特性和DCT变换的图像水印新算法.《江南大学学报(自然科学版)》.2005,第4卷(第2期),第151-152页,图1,图2. *
王伟静等.一种频率域数字水印算法.《咸阳师范学院学报》.2008,第23卷(第6期),第44-47页.

Also Published As

Publication number Publication date
CN102254298A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
Xu et al. Separable and error-free reversible data hiding in encrypted images
CN101355684B (en) Method for transmitting and receiving image series digital content as well as transmitter and receiver
CN109348228A (en) A kind of hiding System and method for of the image encryption domain reversible information based on image segmentation and image space correlation
Zhang Commutative reversible data hiding and encryption
CN105634732A (en) Ciphertext domain multi-bit reversible information hiding method
CN104537600A (en) Secondary image encrypting and decrypting methods and watermark information tamper area positioning method
CN102254298B (en) Digital watermark encrypting/decrypting method and system
CN109547663B (en) Improved LSB image steganography method combined with cryptography
CN109600620A (en) Video file guard method
Chen et al. Error-free separable reversible data hiding in encrypted images using linear regression and prediction error map
Bhalla et al. Nested digital image watermarking technique using blowfish encryption algorithm
Nag et al. A Huffman code based image steganography technique
Sharma et al. Adaptive steganographic algorithm using cryptographic encryption RSA algorithms
Nag et al. A weighted location based lsb image steganography technique
Li et al. Attack and improvement of the joint fingerprinting and decryption method for vector quantization images
CN109413299A (en) Linear canonical transform and chaos Double random phase dual image encryption method
Atee et al. Cryptography and image steganography using dynamic encryption on LSB and color image based data hiding
CN109064381A (en) A kind of digital watermarking encryption method of the various dimensions based on key
CN114119332A (en) Block chain-based digital watermark writing and reading method and device
Raj et al. A survey on reversible data hiding in encrypted image
Pik-Wah Digital video watermarking techniques for secure multimedia creation and delivery
Reddy et al. A Novel Approach for Hiding Encrypted Data in Image, Audio and Video using Steganography
Rajkamal et al. Image and Text Hiding using RSA & Blowfish Algorithms with Hash-Lsb Technique
Kaur et al. Audio steganography using LSB edge detection algorithm
CN114172630B (en) Reversible information hiding method based on addition homomorphic encryption and multi-high-order embedding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder