CN110033067B - Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code - Google Patents

Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code Download PDF

Info

Publication number
CN110033067B
CN110033067B CN201910254762.7A CN201910254762A CN110033067B CN 110033067 B CN110033067 B CN 110033067B CN 201910254762 A CN201910254762 A CN 201910254762A CN 110033067 B CN110033067 B CN 110033067B
Authority
CN
China
Prior art keywords
dimensional code
image
data area
authentication
peak value
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
CN201910254762.7A
Other languages
Chinese (zh)
Other versions
CN110033067A (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.)
Shenzhen University
Original Assignee
Shenzhen University
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 Shenzhen University filed Critical Shenzhen University
Priority to CN201910254762.7A priority Critical patent/CN110033067B/en
Publication of CN110033067A publication Critical patent/CN110033067A/en
Priority to PCT/CN2019/104598 priority patent/WO2020199500A1/en
Application granted granted Critical
Publication of CN110033067B publication Critical patent/CN110033067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The present disclosure provides a two-dimensional code for preventing copying, which is a two-dimensional code in which a pixel lattice expressed by a binary code is arranged on a two-dimensional plane, the two-dimensional code including: a data area storing information; and a position detection pattern disposed around the data area, wherein the pixel array is formed with a multilevel gray scale by a halftone process in the data area. According to the two-dimensional code copying preventing method and device, the copying preventing capability of the two-dimensional code can be improved under the condition that the universality of the two-dimensional code is kept. In addition, the disclosure also provides an anti-counterfeiting authentication method for the two-dimensional code of the anti-copying two-dimensional code.

Description

Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
Technical Field
The disclosure relates to the technical field of information, in particular to a modeling method and system for an illegal copy channel of a two-dimensional code.
Background
The conventional two-dimensional code is easily copied by an illegal user after being printed. At present, the two-dimensional code anti-copy method mainly comprises: (1) use of special printing materials or processes to prevent copying; (2) controlling the generation and reading of the two-dimensional code by using an encryption algorithm and a security protocol; (3) using digital watermarking techniques to protect against copying; (4) the physical unclonable feature is used to prevent copying.
Although the above method can function as a copy protection to some extent, there are also significant limitations. For example, the two-dimensional code is manufactured by special printing materials or processes, so that the control of the production process can be strengthened to resist illegal copying of the two-dimensional code, the universality of the two-dimensional code is inevitably reduced, and the production cost of the two-dimensional code and the dependence on special equipment are increased. In addition, the scheme based on algorithms such as encryption and digital watermarking or a security protocol is introduced to control unauthorized generation of the two-dimensional code and illegal tampering of the data, but the complexity of the system is increased. Moreover, even if the two-dimensional code applies a copy detection pattern and a physical unclonable function, or the above-mentioned security (encryption and digital watermarking) algorithm, it is difficult to prevent a counterfeiter from copying the two-dimensional code under the system framework of the internet of things. The image features extracted based on the physically unclonable function relate to details in the printout image. The comprehensive performance of the above methods in ensuring the uniqueness of the two-dimensional code, i.e., resisting illegal copying, still needs to be further improved. In the face of increasingly serious product counterfeiting and a relatively preliminary two-dimensional code source-tracing anti-counterfeiting system framework, a new theory and technical scheme for improving the security of the two-dimensional code to resist illegal copying need to be actively explored.
Disclosure of Invention
In order to solve the problems, an optimized two-dimensional code illegal copy channel modeling method and system which can obtain an illegal copy channel closer to an actual scene and can be used for preventing two-dimensional codes from being copied are provided.
To achieve the above object, a first aspect of the present disclosure provides a copy-protected two-dimensional code in which a pixel array represented by a binary code is arranged on a two-dimensional plane, the copy-protected two-dimensional code comprising: a data area storing information; and a position detection pattern provided around the data area, wherein the pixel dot matrix is formed with a multilevel gray scale by a halftone process within the data area.
In the first aspect of the present disclosure, when generating a two-dimensional code, a pixel lattice of the two-dimensional code is halftoned to form a multilevel gray scale, whereby the frequency of the two-dimensional code in the frequency domain can be made closer to the sampling frequency of a scanning-printing apparatus to improve signal aliasing during copying, and thus the anti-copying capability of the two-dimensional code can be improved while the versatility of the two-dimensional code is improved.
In the copy-protected two-dimensional code relating to the first aspect of the present disclosure, optionally, the pixel lattice has a reference peak in a spectrum related to a parameter of the halftone processing. In this case, the complexity in generating the two-dimensional code can be reduced.
In the copy-protected two-dimensional code relating to the first aspect of the present disclosure, optionally, the reference peak value is further related to at least one of a resolution and a rotation angle of an imaging device that captures the two-dimensional code. This can further improve the copy prevention capability of the two-dimensional code.
In the copy-protected two-dimensional code relating to the first aspect of the present disclosure, optionally, the pixel lattice has a predetermined number of reference peaks located at predetermined positions on a frequency spectrum. Therefore, the validity of the two-dimensional code can be conveniently judged by comparing the reference peak values.
The second aspect of the present disclosure discloses an anti-counterfeiting authentication method for a two-dimensional code, which is a method for performing anti-counterfeiting authentication on the two-dimensional code, and is characterized in that an image of the two-dimensional code is captured; identifying a position detection pattern of the two-dimensional code; acquiring the data area based on the position detection pattern; analyzing the data area, and calculating whether the data area has a corresponding frequency domain peak value on a frequency domain according to the resolution and the rotation angle of the data area and an imaging device capturing the two-dimensional code; and judging whether the two-dimensional code is legal or not according to the calculated frequency domain peak value.
In the second aspect of the present disclosure, whether a two-dimensional code is legitimate can be conveniently judged by calculating whether a data region has a corresponding frequency domain peak in the frequency domain from the data region and the resolution and rotation angle of an imaging device capturing the two-dimensional code, and judging whether the two-dimensional code is legitimate from the calculated frequency domain peak.
In the anti-counterfeit authentication method for a two-dimensional code according to the second aspect of the present disclosure, optionally, if it is determined that the calculated frequency domain peak matches the distribution of the reference peak of the pixel dot matrix, the captured two-dimensional code is regarded as a legitimate two-dimensional code, and if it is determined that the calculated frequency domain peak does not match the distribution of the reference peak of the pixel dot matrix, the captured two-dimensional code is regarded as an illegally copied two-dimensional code. Therefore, the validity of the two-dimensional code can be conveniently judged by comparing the reference peak values.
In the anti-counterfeit authentication method for a two-dimensional code according to the second aspect of the present disclosure, optionally, the method further includes performing quality evaluation on the captured two-dimensional code image, and if the two-dimensional code image does not reach a predetermined quality, re-capturing the two-dimensional code. Therefore, whether the user obtains the two-dimensional code image meeting the preset quality requirement can be prompted, and the accuracy of the two-dimensional code anti-counterfeiting authentication is improved.
In the anti-counterfeit authentication method for a two-dimensional code according to the second aspect of the present disclosure, optionally, if it cannot be determined whether the distribution of the calculated frequency domain peak and the reference peak of the pixel lattice matches, the authentication feature extraction is performed on the two-dimensional code image in the time domain based on the halftone processing. In this case, the authentication feature extraction can be performed on the two-dimensional code image in the time domain based on the halftone processing conveniently, so that the complexity of the forgery-proof authentication can be suppressed.
In the anti-counterfeit authentication method for a two-dimensional code according to the second aspect of the present disclosure, optionally, before the two-dimensional code image is restored, the two-dimensional code image is corrected so that the two-dimensional code image appears as a standard two-dimensional code. Therefore, the accuracy of the two-dimension code anti-counterfeiting authentication can be further improved by presenting the two-dimension code image as the standard two-dimension code.
In the anti-counterfeit authentication method of a two-dimensional code according to the second aspect of the present disclosure, optionally, in the authentication feature extraction, a local binarization mode descriptor is used. Therefore, the authentication feature extraction can be conveniently carried out by using the local binarization mode descriptor, and the authentication efficiency is improved.
According to the present disclosure, a copy-protected two-dimensional code and an anti-counterfeit authentication method for the two-dimensional code can be provided, which can improve the copy-protection capability of the two-dimensional code while improving the versatility of the two-dimensional code.
Drawings
Embodiments of the present disclosure will now be explained in further detail, by way of example only, with reference to the accompanying drawings, in which:
fig. 1 is a diagram showing an actual scene of a copy-protected two-dimensional code to which an example of the present disclosure relates.
Fig. 2 is a schematic diagram illustrating a two-dimensional code to which an example of the present disclosure relates.
Fig. 3 is a partially enlarged schematic view showing a legal two-dimensional code and a copied two-dimensional code image according to an example of the present disclosure.
Fig. 4 is a diagram showing one example of image distortion of a copied two-dimensional code.
Fig. 5 is a schematic diagram showing a spectrum of a halftone multilevel two-dimensional code of a two-dimensional code according to an example of the present disclosure.
Fig. 6 is a schematic diagram illustrating anti-counterfeit authentication of a copy-protected two-dimensional code according to an example of the present disclosure.
Fig. 7 is a flow chart illustrating anti-counterfeit authentication of a two-dimensional code according to an example of the present disclosure.
Detailed Description
Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In the following description, the same components are denoted by the same reference numerals, and redundant description thereof is omitted. In addition, the drawings are only schematic drawings.
It should be noted that the terms "first," "second," "third," and "fourth," etc. in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Fig. 1 is a diagram showing an actual scene of a copy-protected two-dimensional code to which an example of the present disclosure relates. Fig. 2 is a schematic diagram illustrating a two-dimensional code to which an example of the present disclosure relates. Fig. 3 is a partially enlarged schematic view showing a legal two-dimensional code and a copied two-dimensional code image according to an example of the present disclosure.
As shown in fig. 1, a two-dimensional code image of an original two-dimensional code obtained through a "print-and-shoot" channel (PC) is a real two-dimensional code, and specifically, the original two-dimensional code (designed two-dimensional code) is printed by a printing apparatus and then captured (shot) by an imaging device, thereby obtaining a real two-dimensional code. In addition, a two-dimensional code image obtained through a "print-scan-print-shoot" channel (PSPC) is a duplicate two-dimensional code (illegally captured two-dimensional code), and specifically, an electronic two-dimensional code (designed two-dimensional code) is printed by a printing apparatus, then scanned by a scanning device, and then printed and captured. In addition, the printing apparatus, the scanning, the image forming apparatus, and the like shown in fig. 1 may be commercially available.
The copy-protected two-dimensional code 1 according to the present disclosure is a two-dimensional code in which a pixel dot matrix represented by a binary code is arranged on a two-dimensional plane (see fig. 2(b)), and includes: a data area 10 in which information is stored; and a position detection pattern 20 disposed around the data area 10, wherein the pixel array is formed with a multilevel gray scale by a halftone process in the data area. In the present disclosure, as described above, the pixel lattice of the two-dimensional code is halftoned to form a multilevel gray scale when the two-dimensional code is generated, whereby the frequency of the two-dimensional code in the frequency domain can be made closer to the sampling frequency of the scanning-printing apparatus to improve signal aliasing during copying, so that the anti-copying capability of the two-dimensional code can be improved while the versatility of the two-dimensional code is improved.
In comparison with a conventional two-dimensional code 1A (for example, as shown in fig. 2 (a)) composed of a black-and-white block-shaped (low-frequency square wave) structure, which has a frequency far different from a sampling frequency of a scanning-printing device, and a signal aliasing phenomenon generated after resampling is not obvious, the two-dimensional code having a pixel dot matrix subjected to halftone processing in the present disclosure has a multi-level gray scale, and a signal aliasing phenomenon generated after resampling is obvious, which can increase difficulty in copying the two-dimensional code.
In an embodiment of the present disclosure, the original two-dimensional code may be an electronic two-dimensional code as illustrated in fig. 1. The original two-dimensional code may be obtained based on the original information and the authentication information. The original information may be information to be transmitted by the user, that is, the original information may be information input by the user, such as a character string. The authentication information may be parameters of halftone processing, resolution of a commonly used imaging device, rotation angle at the time of photographing, and the like. The authentication information can be used for authenticating the authenticity of the original two-dimensional code so as to verify the authenticity of the original two-dimensional code.
In some examples, the position detection pattern 20 may be a plurality of corner points, for example, 3 corner points, located in the data area 10. In this case, the two-dimensional code 1 including the position detection pattern 20 is captured by using an imaging device, whereby the data area 10 can be accurately acquired. In addition, the position detection pattern 20 may be a dot matrix (not shown) surrounding the data area 10, and in this case, the data area 10 may be captured in preparation by capturing the two-dimensional code 1 including the position detection pattern 20 as well.
In some examples, the encoding method of the original two-dimensional code is not particularly limited, and for example, a multilevel error correction encoding method may be adopted. Such as Reed-solomon (RS) coding. RS coding is a kind of channel coding. RS encoding has forward error correction capability and is effective on the polynomial generated by correcting the oversampled data. The RS code has stronger anti-interference, anti-noise and error correction capabilities. In addition, the encoded information may be a binary bit stream consisting of "0" and "1".
In addition, the encoding mode of the original two-dimensional code can also adopt a binary error correction encoding mode. Such as BCH (Bose, Ray-Chaudhuri Hocquenghem) coding scheme. The BCH code is a linear block code in a finite field. BCH codes have the ability to correct multiple random errors and are commonly used for error correction in the communications and storage fields. BCH encoding may be used for multi-level phase shift keying at the prime level or at the power of the prime. Compared with RS codes, BCH codes have weak anti-interference, anti-noise and error correction capabilities.
Further, in some examples, authentication information may also be added when encoding the original two-dimensional code. The information length of the authentication information can be far smaller than that of the original information of the two-dimensional code. For example, the authentication information may be less than 30% of the original information. For example, the length of the authentication information is 100bits, the length of the original information is 1000bits, and the length of the finally obtained target bit stream is between 1000bits and 1100 bits.
In some examples, the original two-dimensional code is obtained based on the original information and the authentication information. Specifically, the authentication information is embedded into the original information to obtain a target bit stream; and converting the target bit stream into a gray value according to a preset modulation mode, and carrying out halftone processing to further generate the original two-dimensional code. Therefore, the original two-dimensional code with strong encryption capacity and multi-level gray scale can be further obtained.
In some examples, the preset modulation scheme may adopt any one of a Quadrature Amplitude Modulation (QAM) scheme, a Quadrature Phase-Shift Keying (QPSK) scheme, or a pulse modulation scheme.
In some examples, the Pulse modulation scheme may be a Pulse Amplitude Modulation (PAM) modulation scheme. The target bit stream can be converted into a gray value by adopting a PAM (pulse amplitude modulation) mode, and the original two-dimensional code is generated after half-tone processing.
Specifically, the target bitstream may be composed of "0" and "1". Considering adjacent two-bit binary numbers as a group, there are 4 cases, for example, "00", "01", "10", and "11", per group. Different groups can be modulated into different gray values by adopting a PAM modulation mode, for example, the gray values corresponding to the four cases can be 40, 100, 160 and 220. The original two-dimensional code can be obtained based on the four gray values. And the position relation of each group of adjacent two-bit binary numbers in the target bit stream corresponds to the position relation of pixels with corresponding gray values in the original two-dimensional code one to one. Therefore, the target bit stream can be converted into a gray value by adopting a pulse amplitude modulation mode, and the original two-dimensional code is generated by performing halftone processing. The examples of the present disclosure are not limited thereto, and in other examples, adjacent three or more bits of the target bit stream may be regarded as one group, different groups may be modulated to different gray values by using a PAM modulation method, and the original two-dimensional code may be obtained.
In some examples, as described above, based on the actual scene graph of fig. 1, the legal two-dimensional code may be obtained by printing the original two-dimensional code of fig. 1 into a real two-dimensional code through a printer and then passing through an imaging device, such as a mobile terminal. Thereby, a legitimate two-dimensional code image can be obtained. In addition, for example, an illegal method may capture a real two-dimensional code using a scanning device or the like, print the real two-dimensional code again, and capture the real two-dimensional code using an imaging device, in which case the captured two-dimensional code image thereof belongs to a copied two-dimensional code.
As shown in fig. 3, the real two-dimensional code is clearly distinguished from the copied two-dimensional code on the image. Fig. 3(a) shows an image of a real two-dimensional code, and fig. 3(b) shows an image of a copied two-dimensional code. As can be seen from fig. 3, there is significant image distortion in the reproduced two-dimensional code.
Fig. 4 is a diagram showing one example of image distortion of a copied two-dimensional code. Hereinafter, distortion of a two-dimensional code image in a PSPC channel will be described by taking the image distortion of the duplicated two-dimensional code of fig. 4 as an example. As shown in fig. 4, the original two-dimensional code becomes a real two-dimensional code after being printed, and if the real two-dimensional code is scanned again, noise or the like is introduced into the scanned two-dimensional code image, which causes distortion in the image structure, for example, a point where the circular shape is changed into a directional point, to be generated at the time of reprinting.
In the copy-protected two-dimensional code according to the embodiment of the present disclosure, the pixel dot matrix may have a reference peak in a spectrum related to a parameter of the halftone process. In this case, the complexity in generating the two-dimensional code can be reduced. Specifically, the frequency representation of the original two-dimensional code and the frequency representation of the copied two-dimensional code are both peaks distributed over the entire frequency spectrum. The difference between the two is represented by the number and location of peaks, which are mainly determined by the parameters of the halftone process. Therefore, the original two-dimensional code can be effectively distinguished from the copied two-dimensional code by the halftone processing.
In the copy-protected two-dimensional code according to the embodiment of the present disclosure, the reference peak is optionally further related to at least one of a resolution and a rotation angle of an imaging device that captures the two-dimensional code. This can further improve the copy prevention capability of the two-dimensional code. In particular, referring to fig. 5 described later, there are also some additional spectral peaks in the reproduced two-dimensional code. The position of these peaks is determined by the imaging parameters (resolution and rotation angle) in the scanning operation.
In the copy-protected two-dimensional code according to the embodiment of the present disclosure, the pixel dot matrix may have a predetermined number of reference peaks located at predetermined positions on the frequency spectrum. Therefore, the validity of the two-dimensional code can be conveniently judged by comparing the reference peak values.
As an example, 9 points in the spectrum of the original two-dimensional code are selected as a reference, and white circles represent interference (see fig. 5 (b)). In calculating the peak position of the two-dimensional code image, the halftone and the camera parameters are provided by the user. Thus, if the number and location of the reference points being calculated match the observed one, the two-dimensional code is considered to be authentic, otherwise it is considered to be duplicated.
Fig. 6 is a schematic diagram illustrating anti-counterfeit authentication of a copy-protected two-dimensional code according to an example of the present disclosure. Fig. 7 is a flow chart illustrating anti-counterfeit authentication of a two-dimensional code according to an example of the present disclosure. Hereinafter, the anti-counterfeit authentication method of the two-dimensional code according to the present disclosure will be described in detail with reference to fig. 6 and 7.
In the anti-counterfeit authentication method of a two-dimensional code according to the present disclosure, first, an image of the two-dimensional code is captured (step S100). Next, the position detection pattern of the two-dimensional code is recognized (step S200). Then, a data area is acquired based on the position detection pattern 10 (step S300). After the data area 20 is acquired, the data area is analyzed, and whether the data area has a corresponding frequency domain peak in the frequency domain is calculated according to the resolution and the rotation angle of the data area and the imaging device capturing the two-dimensional code (step S400). Finally, whether the two-dimensional code is legal is judged according to the calculated frequency domain peak value (step S500). According to the present disclosure, a copy-protected two-dimensional code and an anti-counterfeit authentication method for the two-dimensional code can be provided, which can improve the copy-protection capability of the two-dimensional code while improving the versatility of the two-dimensional code.
In step S100, quality evaluation of the captured two-dimensional code image may be further included, and if the two-dimensional code image does not reach a predetermined quality, the two-dimensional code is re-captured (step S110). Therefore, whether the user obtains the two-dimensional code image meeting the preset quality requirement can be prompted, and the accuracy of the two-dimensional code anti-counterfeiting authentication is improved.
In step S200, the position detection pattern of the two-dimensional code may be recognized. For example, in some examples, the position detection pattern is a corner of the two-dimensional code. The position of the two-dimensional code can be identified through the corner points of the two-dimensional code.
Next, in step S300, by the recognized position of the two-dimensional code, the data area 10 may be acquired based on the position detection pattern 20 (see fig. 2(b)), whereby the data area 10 can be processed and decoded.
In step S400, whether the two-dimensional code is legitimate can be conveniently determined by calculating whether the data region has a corresponding frequency domain peak in the frequency domain according to the resolution and the rotation angle of the data region 10 and the imaging device capturing the two-dimensional code, and determining whether the two-dimensional code is legitimate according to the calculated frequency domain peak.
In the above steps, in order to improve the effect of frequency domain feature extraction, preprocessing is performed in the captured two-dimensional code image spectrum to remove some noise. First, gaussian filtering processing is performed on the spectrum image. The local peaks are then detected using a speckle detector (e.g., LOG filtering) for detecting the DFT spectrogram peak points, and the detected peaks are marked with white circles.
The two-dimensional code image passing through the PC channel can be expressed by the following formula (1):
Figure BDA0002013371390000091
wherein
Figure BDA0002013371390000092
Indicating the shooting process, IG(x) Representing a two-dimensional code image after printing, DeltaxcIs the error between the printing and photographing processes, FlpA low pass filter is shown. The approximation process (a) is performed by modeling the imaging process as a convolution step. The resampling process is formed by convolution of a two-dimensional Dirac function array and a low-pass filter, and the vector d, e specifies the sampling direction and frequency in the resampling process.
The frequency spectrum can be expressed by formula (2):
Figure BDA0002013371390000093
wherein
Figure BDA0002013371390000094
A two-dimensional fourier transform is represented,
Figure BDA0002013371390000095
representing a true two-dimensional code image passing through the PC channel,
Figure BDA0002013371390000096
is a frequency domain representation of a halftone multilevel two-dimensional code prior to passing through a channel,
Figure BDA0002013371390000097
is a frequency domain representation of a low pass filter. The vector s, t is a frequency domain representation of the vector d, e.
The two-dimensional code image passing through the PSPC channel can be expressed by the following formula (3):
Figure BDA0002013371390000098
where the approximation process (a) represents a sufficiently high resolution in the calibration and printing process assuming perfect alignment. The approximation process (b) represents the assumption that both the scanning and recovery processes produce blur-free barcode images.
The frequency spectrum can be expressed by formula (4):
Figure BDA0002013371390000101
by comparing the frequency domain channel models, formula (2) and formula (4), it can be seen that the frequency representation forms of the original two-dimensional code and the copied two-dimensional code are peaks distributed on the whole frequency spectrum. The difference between the two is in the number and location of the peaks.
According to the spectrum model of equation (1), the positions of the 9 reference points (as shown in fig. 5) can be calculated by the following equation:
P0=(0,0);
P2=sc;P4=tc
P6=-tc;P8=-sc
P1=sc-tc;P5=-sc+tc
P3=sc+tc;P7=-sc-tc. (5)
based on the 9 reference points calculated by equation (5), 3 features in the frequency domain are proposed to describe the difference between the original two-dimensional code and the copied two-dimensional code: 1) number of peak points around each reference point 2) number of all points around 9 reference points; 3) an average distance between the resulting reference point and the observed resulting reference point is calculated.
These features can be generalized to the case of geometric distortions, such as rotation. Depending on the nature of the two-dimensional DFT rotation, the rotation in space may result in rotation by the same angle in the frequency domain. The four corners of the image and the mode of the two-dimensional code can be accurately estimated by giving the rotation angle in the space, and the rotation angle in the frequency domain can be calculated according to the four corners and the mode of the two-dimensional code.
In step S500, optionally, if it is determined that the calculated frequency domain peak matches the distribution of the reference peaks of the pixel dot matrix, the captured two-dimensional code is regarded as a legal two-dimensional code, and if it is determined that the calculated frequency domain peak does not match the distribution of the reference peaks of the pixel dot matrix, the captured two-dimensional code is regarded as an illegally copied two-dimensional code. Therefore, the validity of the two-dimensional code can be conveniently judged by comparing the reference peak values.
In addition, in step S500, optionally, if it cannot be determined whether the distribution of the calculated frequency domain peak and the reference peak of the pixel lattice matches, the authentication feature extraction is performed on the two-dimensional code image in the time domain based on the halftone processing. In this case, the authentication feature extraction can be performed on the two-dimensional code image in the time domain based on the halftone processing conveniently, so that the complexity of the forgery-proof authentication can be suppressed.
As shown in fig. 6, the quality of the two-dimensional code image to be authenticated is first evaluated, and if the quality of the two-dimensional code does not meet the requirement, the user is prompted to take a picture again, thereby improving the reliability of the authentication process.
In addition, in the authentication process, the extracted frequency domain features are input into a certain probability SVM, and a probability value p is output, wherein the probability value p represents the real probability of the two-dimensional code. Setting the probability interval to (p1, p2), when the p value is in this interval (p1, p2), it is not determined whether it is a true two-dimensional code, and then it is transferred to the second stage for further evaluation. In the second stage, firstly, the two-dimensional code image is subjected to deformation correction so that the two-dimensional code is presented as a standard square, and thus the two-dimensional code module can be ensured to be accurately extracted and perform time domain feature description. And finally, inputting the time domain feature vector into a standard SVM for authentication to obtain a result.
In some examples, before the step of recovering the two-dimensional code image is performed, the two-dimensional code image may be modified to present the two-dimensional code image as a standard two-dimensional code. Therefore, the accuracy of the two-dimension code anti-counterfeiting authentication can be further improved by presenting the two-dimension code image as the standard two-dimension code.
In some examples, the two-dimensional code anti-counterfeiting authentication method may further include using a local binarization pattern descriptor in the authentication feature extraction. Therefore, the authentication feature extraction can be conveniently carried out by using the local binarization mode descriptor, and the authentication efficiency is improved.
The present embodiment discloses a computer-readable storage medium, and those skilled in the art can understand that all or part of the steps in the above-disclosed anti-counterfeit authentication methods for various anti-copy two-dimensional codes and two-dimensional codes can be completed by a program (instruction) instructing related hardware, where the program (instruction) can be stored in a computer-readable memory (storage medium), and the memory can include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
While the invention has been specifically described above in connection with the drawings and examples, it will be understood that the above description is not intended to limit the invention in any way. Those skilled in the art can make modifications and variations to the present invention as needed without departing from the true spirit and scope of the invention, and such modifications and variations are within the scope of the invention.

Claims (7)

1. An anti-copy two-dimensional code is an original two-dimensional code, wherein a pixel lattice represented by a binary code is configured on a two-dimensional plane, and the original two-dimensional code is obtained based on original information and authentication information, wherein the original information is information to be transmitted by a user, and the authentication information comprises parameters of halftone processing, resolution of a common imaging device and a rotation angle during shooting; the original two-dimensional code is generated by embedding the authentication information into the original information to obtain a target bit stream, converting the target bit stream into a gray value according to a preset modulation mode and performing the halftone processing, wherein the information length of the authentication information is smaller than that of the original information,
the original two-dimensional code is printed to form a real two-dimensional code, the real two-dimensional code is scanned, printed and captured by an imaging device to become a duplicate two-dimensional code, the pixel lattice has a reference peak value related to the parameters of the halftone processing on the frequency spectrum, the reference peak value is also related to at least one of the resolution and the rotation angle of the imaging device capturing the two-dimensional code, the duplicate two-dimensional code has an additional frequency spectrum peak value, and the position of the frequency spectrum peak value is determined by the resolution of the imaging device and the rotation angle during shooting,
the original two-dimensional code is provided with:
a data area storing information; and
a position detection pattern disposed around the data area,
in the data area, the pixel dot matrix is processed by the halftone to form a multi-level gray scale, so that the frequency of the two-dimensional code on the frequency domain is close to the sampling frequency of a scanning-printing device to improve the signal aliasing in the copying process.
2. The two-dimensional code according to claim 1,
the pixel lattice has a predetermined number of reference peaks at predetermined locations across the frequency spectrum.
3. An anti-counterfeiting authentication method of a two-dimensional code, which is a method for performing anti-counterfeiting authentication on the two-dimensional code according to claim 1,
capturing an image of the two-dimensional code;
identifying a position detection pattern of the two-dimensional code;
acquiring the data area based on the position detection pattern;
analyzing the data area, and calculating whether the data area has a corresponding frequency domain peak value on a frequency domain according to the resolution and the rotation angle of the data area and an imaging device capturing the two-dimensional code; and is
Judging whether the two-dimensional code is legal or not according to the calculated frequency domain peak value,
if the distribution of the calculated frequency domain peak value and the reference peak value of the pixel dot matrix cannot be judged to be matched, extracting frequency domain features according to the data area, inputting the extracted frequency domain features into a probability SVM to obtain a probability value, wherein the probability value represents the real probability size of the two-dimensional code, if the probability value is located in a probability interval and the two-dimensional code is not determined to be the real two-dimensional code, firstly carrying out deformation correction on an image of the two-dimensional code to enable the image of the two-dimensional code to be a standard square, carrying out authentication feature extraction on the image of the two-dimensional code on a time domain based on halftone processing, inputting a time domain feature vector into a standard SVM for authentication, and obtaining a result.
4. The authentication method according to claim 3,
and if the distribution of the calculated frequency domain peak value and the reference peak value of the pixel dot matrix is judged to be matched, the captured two-dimensional code is regarded as a legal two-dimensional code, and if the distribution of the calculated frequency domain peak value and the reference peak value of the pixel dot matrix is judged not to be matched, the captured two-dimensional code is regarded as an illegally copied two-dimensional code.
5. The two-dimensional code anti-counterfeiting authentication method according to claim 3,
the method further comprises the step of carrying out quality evaluation on the captured two-dimensional code image, and if the two-dimensional code image does not reach the preset quality, the two-dimensional code is required to be captured again.
6. The two-dimensional code anti-counterfeiting authentication method according to claim 3,
before the two-dimensional code image is subjected to authentication feature extraction, the two-dimensional code image is corrected so that the two-dimensional code image is presented as a standard two-dimensional code.
7. The two-dimensional code anti-counterfeiting authentication method according to claim 3,
in the authentication feature extraction, a local binarization mode descriptor is used.
CN201910254762.7A 2019-03-31 2019-03-31 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code Active CN110033067B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910254762.7A CN110033067B (en) 2019-03-31 2019-03-31 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
PCT/CN2019/104598 WO2020199500A1 (en) 2019-03-31 2019-09-05 Clone-proof qr code and anti-counterfeiting qr code authentication method for qr code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910254762.7A CN110033067B (en) 2019-03-31 2019-03-31 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code

Publications (2)

Publication Number Publication Date
CN110033067A CN110033067A (en) 2019-07-19
CN110033067B true CN110033067B (en) 2020-06-02

Family

ID=67237123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910254762.7A Active CN110033067B (en) 2019-03-31 2019-03-31 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code

Country Status (2)

Country Link
CN (1) CN110033067B (en)
WO (1) WO2020199500A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033067B (en) * 2019-03-31 2020-06-02 深圳大学 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
CN111680772A (en) * 2020-06-02 2020-09-18 云南省烟草质量监督检测站 Method, device and equipment for detecting authenticity of cigarette strip and box packaging paper
CN114898002A (en) * 2022-05-03 2022-08-12 翼存(上海)智能科技有限公司 Data coding method of rectangular gray-scale dot matrix image for data storage

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732400A (en) * 2013-12-24 2015-06-24 卓望数码技术(深圳)有限公司 Commodity authenticity detecting method and system based on two-dimension code
CN106529637A (en) * 2016-10-28 2017-03-22 深圳大学 Anti-copy realization method and realization system of two-dimensional code

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9016571B2 (en) * 2013-08-08 2015-04-28 National Tsing Hua University Two dimensional code and method of creating the same
CN103839031A (en) * 2014-02-27 2014-06-04 杭州晟元芯片技术有限公司 Special embedded type two-dimensional code recognition method
CN106682717B (en) * 2016-12-19 2019-12-31 合肥阿巴赛信息科技有限公司 Method and system for generating halftone two-dimensional code
CN107766771B (en) * 2017-11-15 2021-01-19 深圳大学 Two-dimensional code detection method and terminal
CN107918791B (en) * 2017-11-15 2020-10-09 深圳大学 Two-dimensional code generating and decoding method and device in two-dimensional code copying process
CN109102451B (en) * 2018-07-24 2023-03-21 齐鲁工业大学 Anti-counterfeiting halftone intelligent digital watermark manufacturing method for paper media output
CN109376833B (en) * 2018-12-21 2023-06-27 北京印刷学院 Triple anti-counterfeiting two-dimensional code for pseudo-random information overprinting digital fluorescent image
CN110033067B (en) * 2019-03-31 2020-06-02 深圳大学 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732400A (en) * 2013-12-24 2015-06-24 卓望数码技术(深圳)有限公司 Commodity authenticity detecting method and system based on two-dimension code
CN106529637A (en) * 2016-10-28 2017-03-22 深圳大学 Anti-copy realization method and realization system of two-dimensional code

Also Published As

Publication number Publication date
CN110033067A (en) 2019-07-19
WO2020199500A1 (en) 2020-10-08

Similar Documents

Publication Publication Date Title
Fei et al. Analysis and design of secure watermark-based authentication systems
JP4965278B2 (en) An improved technique for detecting, analyzing and using visible authentication patterns
US6101602A (en) Digital watermarking by adding random, smooth patterns
US7305104B2 (en) Authentication of identification documents using digital watermarks
US8175329B2 (en) Authentication of physical and electronic media objects using digital watermarks
US7424131B2 (en) Authentication of physical and electronic media objects using digital watermarks
JP4721469B2 (en) Printing and authentication of security documents on substrates
CN110033067B (en) Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
EP1953752A1 (en) A method for embeding and detecting hiding codes
JP2006014280A (en) Secure recorded document
JP4143441B2 (en) Information processing method and apparatus, computer program, and computer-readable storage medium
Schlauweg et al. Quantization-based semi-fragile public-key watermarking for secure image authentication
Tang et al. Print-and-scan resilient watermarking for authenticating paper-based certificates
Fei et al. Analysis and design of authentication watermarking
Melman et al. Methods for countering attacks on image watermarking schemes: Overview
CN109829529B (en) Method and device for optimizing embedded parameters of anti-copy two-dimensional code
Fei et al. A hypothesis testing approach to semifragile watermark-based authentication
Nguyen A watermark algorithm against de-synchronization attacks
JP6920719B2 (en) Digital watermarking device and method
Tang et al. A Robust Reversible Watermarking Scheme Using Attack-Simulation-Based Adaptive Normalization and Embedding
David et al. Image Authentication Techniques and Advances Survey
Fei et al. Achieving computational and unconditional security in authentication watermarking: analysis, insights, and algorithms
Alnaanah Optimisation of Tamper Localisation and Recovery Watermarking Techniques
WO2019095172A1 (en) Qr code generating and decoding method and apparatus in qr code copying process
Agaian et al. Secure and robust steganographic algorithm for binary images

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