Background technology
The numerical information revolution has brought deep variation for human society and life, has also brought new challenge and innovation opportunity simultaneously.Multimedia technology and development of internet technology make that electronic publications such as digitized voice, text, image, music and video can be obtained rapidly and accurately, transmit and store, and these have become information interchange, especially the important way of network information interchange.Yet the image that we contact at ordinary times, most of still the passing through of literal are printed output, like branded goods packing, certificate, video and audio products front cover, currency, bill, business card, passport or the like.Though the traditional printing technical guarantee homogeneity of printed matter, the personator still can duplicate these printing packaging article by the operating type of routine easily, has upset market order, grievous injury the producer and consumer's legitimate rights and interests.
Digital watermarking is paid close attention to as a kind of potential solution widely, and becomes popular research field of domestic and international academia.Digital watermarking is through in multi-medium data, adding some numerical information to reach functions such as file real and fake discrimination, copyright protection; The watermark information that embeds does not influence the integrality of source document; Can be through detecting or extract the authenticity of watermark information documentary evidence; Can reach good antifalse effect, can reduce cost effectively again.Protect the anti-counterfeiting technology of digital information to compare with traditional being only applicable to; Digital watermark technology is applied to printed matter or the false proof field of the packing of product; Have practical, detection speed is fast, safe, characteristics such as cost is low, makes application prospect more wide.
Bar code can indicate the information such as date of manufacture, trade name, classification and price of commodity.Secret note that common bar code is differed greatly by reflectivity (abbreviation bar) and informal voucher (being called for short empty) are formed; In view of it is made easily; Information acquisition speed is fast, and assay device structures is simple, characteristics such as low and easy repair of cost; Therefore, adopting two-dimensional bar code is a kind of application widely as practical application of watermarks.
Most of encryption technologies and digital watermark method only provide the antiforge function of numeric field to image, can not resist geometric attack and be similar to the print scanned attack of Denging.If the image behind the embed watermark is transmitted with the paper-based form after printing; When detecting watermark information through detection system; Watermark has been experienced digital-to-analogue-analog-digital conversion process such as printing/print, scan/take pictures with image; Simultaneously, this process has been introduced much noise (like scanning jittering noise, thermonoise, random noise etc.), makes watermark before extraction, receive destruction to a great extent.Digital watermark technology is applied to printed matter anti-counterfeiting; Not only require the algorithm invisibility better; And require algorithm to resist once to print/print, scan/information loss that the process of taking pictures is brought; Require simultaneously to secondary print/print, scan/after taking pictures, product no longer contains effective watermark, this makes the application of digital watermark technology in the antiforge field become more challenging.
Summary of the invention
The technical matters that the present invention solved provides a kind of can the opposing once and prints/print, scans/information loss that the process of taking pictures has been brought; And secondary is printed/print, scan/after taking pictures; Watermark information will be lost; Not only have the truth identification function, also have the anti-anti-counterfeiting authentication method of forging the anti-counterfeiting image of printed matter of effect simultaneously.
For solving above-mentioned technical matters, the technical scheme that the present invention takes:
special character of the present invention is: after at first the two-value bar code being handled; Be embedded into carrier image; Then, after once printing, become legal printed matter; Utilize mobile phone to take pictures to printed matter and upload to authentication center, utilize detection algorithm to read watermark,, thereby reach false proof purpose with the true and false of discriminating printed matter.
Above-mentioned anti-counterfeiting authentication method is realized through following steps: the generation of (1), two-value bar code:
Original bar code W is pruned processing, be divided into the watermark partial information W1 of embedding and the watermark partial information W2 of reservation, wherein; The size of the watermark partial information W1 that embeds is 54% of original bar code W; It is embedded in the carrier image, plays the effect of copyright proof, then through being extracted watermark information W1 ' the carrier image of method of detecting watermarks after quilt is taken pictures; It is merged formation bar code W ' with the watermark partial information W2 that keeps; Adopt maximum membership grade principle at last, W ' revises to bar code, obtains revised two-value bar code watermarking images;
(2), the generation of anti-counterfeiting image:
Magnitude relationship according to carrier image and the resulting two-value bar code of step (1) watermarking images is carried out carrier image
Piecemeal carries out discrete cosine transform to each piecemeal, obtains piecemeal DCT matrix of coefficients; The coefficient value of each piecemeal DCT matrix of coefficients is sorted according to Zig-Zag, and the reference position of choosing the watermark of embedding does
, the length of embedding does
, the DCT coefficient of each piecemeal is repeatedly embedded
Inferior 1bit information establishes that the one dimensional system matrix number by the Zig-Zag ordering does behind the piecemeal
, wherein
t=1,2,3 ..., n * n;
i=1,2,3 ...,
k*
k, because the less DCT index variation of amplitude is more obvious before and after printing, therefore, before carrying out watermark and embedding elder generation to selected coefficient in the less coefficient of amplitude revise, the amplitude intensity of establishing modification does
,
, when the absolute value of the amplitude of selected coefficient less than
, then the amplitude with coefficient is revised as
, sign is constant, and the embed watermark information of wanting that a certain piecemeal is corresponding is 1 o'clock, revises coefficient and satisfies:
When wanting embed watermark information to be 0, revise coefficient and satisfy:
Be enough to two formula if be discontented with; Then revise a less symbol of absolute value in
and
; Make it satisfy following formula; According to top embedding grammar, whole binary bitmap is embedded into the DCT territory of original image; DCT matrix of coefficients to having embedded watermark information carries out the piecemeal inverse discrete cosine transformation, can obtain the anti-counterfeiting image of embed watermark information;
(3), watermark detection process:
Use the mobile phone with camera function that printed matter is taken to the printed matter that circulates in market, photographic images is uploaded to authentication center through Net-connected computer or mobile network, authentication center starts watermark detection module and detects:
Doubtful digital picture to after taking pictures is carried out
Piecemeal, each piece carries out dct transform, obtains piecemeal DCT matrix of coefficients, to each piecemeal dct transform and by the coefficient one dimension matrix after the Zig-Zag ordering does
, wherein
t=1,2,3 ..., n * n;
i=1,2,3 ...,
k*
k, for each piecemeal, only extract the watermark information of 1bit, if
, the watermark information that then extracts is 1, if
The watermark information that then extracts is 0; The watermarking images that calculating proposes from picture according to the normalization calculating formula of similarity at last and the similarity of original watermark image, the threshold value that only extracts the similarity of watermark reaches at 86% o'clock, thinks that just watermark extracting is successful; Assert that this printed matter is a genuine piece, otherwise the explanation printed matter is pseudo-article.
Error code may appear in the bar code watermark information that extracts in the above-mentioned step (3); Bar code watermark to extracting is corrected through maximum membership grade principle in the fuzzy mathematics theory; Its process is following: definition extracts watermark for
, and it is that 1 degree of membership does to watermark information
;
;, watermark information is 1 number
in
To watermark information is that 0 degree of membership does
;
;, watermark information is 0 number
in
If watermark information is 1 degree of membership is 0 degree of membership greater than watermark information; Then judging
is 1, otherwise is 0.
Compared with prior art, beneficial effect of the present invention:
1. the printed matter anti-counterfeiting technology based on the mobile phone photograph authentication has the not available peculiar property of a lot of traditional anti-counterfeiting printing technologies: because the watermark that embeds in the printed matter is sightless; Therefore hide property, security is good; Utilize mobile phone to realize detecting; Equipment is convenient, has mobility etc., has broad application prospects.
2. realized special antiforge function: can resist once and print/print, scan/information loss that the process of taking pictures has been brought; And secondary is printed/print, scan/after taking pictures; Watermark information will be lost, and not only have the truth identification function, also have the anti-effect of forging simultaneously.
3. with respect to traditional printed matter anti-counterfeiting; The present invention is according to human vision property; Be chosen in frequency field to the insensitive zone of image vision, embed two-value bar code watermark, guarantee that the image vision difference before and after the embed watermark is minimum through the positive negativity of revising coefficient symbols.
4. before watermark embeds, earlier watermark bar code is pruned pre-service; When watermark extracting, adopt maximum membership grade principle that bar code is revised, above measure has guaranteed that image can recover watermark information to greatest extent receiving under the extraneous different attack condition.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is elaborated.
After
the present invention at first handles the two-value bar code; Be embedded into carrier image; Then, after once printing, become legal printed matter; Utilize mobile phone to take pictures to printed matter and upload to authentication center, utilize detection algorithm to read watermark,, thereby reach false proof purpose with the true and false of discriminating printed matter.
As shown in Figure 4, based on the implementation process of mobile phone photograph authenticated printing article Antiforge system, be divided into following step and describe: accomplish that 1) watermark information is embedded image to be protected; 2), use the mobile phone or the digital camera of band camera function the printed matter watermark information is gathered through printing/printing treatment; 3) information that collects is sent to authentication center after, detect the printed matter true and false through detection system, and the result fed back in the user.The practical implementation step is following:
(1), the generation of two-value bar code:
Original bar code W is pruned processing, as shown in Figure 1, be divided into the watermark partial information W1 of embedding and the watermark partial information W2 of reservation; Wherein, as shown in Figure 2, the size of embed watermark partial information W1 is 54% of original bar code W; It is embedded in the carrier image, plays the effect of copyright proof, then through extracting watermark information W1 ' the carrier image of method of detecting watermarks after taking pictures; It is merged formation bar code W ' with reservation watermark partial information W2; Adopt maximum membership grade principle at last, W ' is revised, obtain revised two-value bar code watermarking images.
(2), the generation of anti-counterfeiting image:
Magnitude relationship according to carrier image and the resulting two-value bar code of step (1) watermarking images is carried out carrier image
Piecemeal carries out discrete cosine transform to each piecemeal, obtains piecemeal DCT matrix of coefficients; The coefficient value of each piecemeal DCT matrix of coefficients is sorted according to Zig-Zag, and the reference position of choosing the watermark of embedding does
, the length of embedding does
, the DCT coefficient of each piecemeal is repeatedly embedded
Inferior 1bit information establishes that the one dimensional system matrix number by the Zig-Zag ordering does behind the piecemeal
, wherein
t=1,2,3 ..., n * n;
i=1,2,3 ...,
k*
k, because the less DCT index variation of amplitude is more obvious before and after printing, therefore, before carrying out watermark and embedding elder generation to selected coefficient in the less coefficient of amplitude revise, the amplitude intensity of establishing modification does
,
, when the absolute value of the amplitude of selected coefficient less than
, then the amplitude with coefficient is revised as
, sign is constant, and the embed watermark information of wanting that a certain piecemeal is corresponding is 1 o'clock, revises coefficient and satisfies:
When wanting embed watermark information to be 0, revise coefficient and satisfy:
If do not satisfy formula (1) and formula (2); Then revise a less symbol of absolute value in
and
; Make it satisfy following formula; According to top embedding grammar, whole binary bitmap is embedded into the DCT territory of original image; DCT matrix of coefficients to having embedded watermark information carries out the piecemeal inverse discrete cosine transformation, can obtain the anti-counterfeiting image of embed watermark information;
When embed watermark, should consider the invisibility of algorithm, also to consider the robustness of algorithm.The present invention chooses three coefficients of watermarking algorithm; Be reference position
; Insert length
; Coefficient amplitude intensity
is directly determining the invisibility and the robustness of anti-counterfeiting image.
choosing too small the time; Embedded location is just near low frequency region; The robustness of watermark strengthens, but the invisibility of watermark simultaneously but reduces relatively; As
choosing excessive the time; The position that embeds is just near high-frequency region; The invisibility of watermark strengthens, but robustness reduces.Therefore take all factors into consideration; This paper chooses medium and low frequency and comes embed watermark; I.e.
chooses
.
When
is too small; Robustness reduces, and invisibility strengthens; When
is excessive; Robustness strengthens; Invisibility reduces, the operation time of also having strengthened algorithm simultaneously.In addition; When choosing
; Also to consider reference position
; As
during near Low Medium Frequency;
chooses excessive; The position that watermark is embedded concentrates on high frequency; So not only can not strengthen the robustness of watermark, can reduce the robustness of watermark on the contrary.Therefore, choose
.
For the 3rd coefficient amplitude intensity
, then be in order to increase the robustness of algorithm.If it is too small then for the robustness that increases algorithm about-face too not, if
excessive invisibility that then possibly reduce watermark because the amplitude of revising is excessive that
gets.
(3), watermark detection process:
Use the mobile phone with camera function that printed matter is taken to the printed matter that circulates in market, photographic images is uploaded to authentication center through Net-connected computer or mobile network, authentication center starts watermark detection module and detects:
Doubtful digital picture to after taking pictures is carried out
Piecemeal, each piece carries out dct transform, obtains piecemeal DCT matrix of coefficients, to each piecemeal dct transform and by the coefficient one dimension matrix after the Zig-Zag ordering does
, wherein
t=1,2,3 ..., n * n;
i=1,2,3 ...,
k*
k, for each piecemeal, only extract the watermark information of 1bit, if
, the watermark information that then extracts is 1, if
The watermark information that then extracts is 0; The watermarking images that calculating proposes from picture according to the normalization calculating formula of similarity at last and the similarity of original watermark image, the threshold value that only extracts the similarity of watermark reaches at 86% o'clock, thinks that just watermark extracting is successful; This printed matter is a genuine piece, otherwise the explanation printed matter is pseudo-article.
Error code may appear in the bar code watermark information that extracts in the step (3); Bar code watermark to extracting is corrected through maximum membership grade principle in the fuzzy mathematics theory; Its process is following: definition extracts watermark for
, and it is that 1 degree of membership does to watermark information
;
;, watermark information is 1 number
in
To watermark information is that 0 degree of membership does
;
;, watermark information is 0 number
in
If watermark information is 1 degree of membership is 0 degree of membership greater than watermark information; Then judging
is 1, otherwise is 0.
Referring to Fig. 4, service-user process of the present invention:
The user carries out the true and false when distinguishing at needs to this print product is arranged, and can provide two kinds of methods to realize:
1) user can use the mobile phone with camera function printed matter is taken; Photographic images is uploaded images onto authentication center's application through mobile network platform detect commodity true and false; After watermark is extracted to image in center to be certified; Relevant information is returned mobile network platform, by mobile network platform the result is beamed back inquiring user with the note form again.
[0025] 2), can download watermark detection software, the real-time detection printed matter true and false through the Internet network authentication center of visit manufacturing enterprise for the cellphone subscriber who supports the JAVA program.