CN109325575B - Encryption and decryption method for generating dynamic two-dimensional code - Google Patents
Encryption and decryption method for generating dynamic two-dimensional code Download PDFInfo
- Publication number
- CN109325575B CN109325575B CN201811151618.2A CN201811151618A CN109325575B CN 109325575 B CN109325575 B CN 109325575B CN 201811151618 A CN201811151618 A CN 201811151618A CN 109325575 B CN109325575 B CN 109325575B
- Authority
- CN
- China
- Prior art keywords
- dimensional code
- dimensional
- dynamic
- encryption
- black
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000008859 change Effects 0.000 claims abstract description 7
- 238000005286 illumination Methods 0.000 claims description 28
- 230000003068 static effect Effects 0.000 claims description 14
- 238000003708 edge detection Methods 0.000 claims description 9
- 230000009467 reduction Effects 0.000 claims description 7
- 238000005260 corrosion Methods 0.000 claims description 4
- 230000007797 corrosion Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 2
- 230000003247 decreasing effect Effects 0.000 claims description 2
- 238000012795 verification Methods 0.000 abstract description 10
- 230000008569 process Effects 0.000 abstract description 4
- 238000011161 development Methods 0.000 abstract 1
- 230000018109 developmental process Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009466 transformation Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record 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/06009—Record 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/06037—Record 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an encryption and decryption method for generating a dynamic two-dimensional code, which comprises the following steps: acquiring an original two-dimensional code, performing image processing on the original two-dimensional code by using a shaft side algorithm and a shadow processing algorithm, drawing ten two-dimensional codes in sequence, and displaying the ten two-dimensional codes in sequence to realize encryption; sweep sign indicating number developments two-dimensional code and continuously upload three two-dimensional codes, according to the time interval and the black partial area rate of change of three two-dimensional codes, judge whether the two-dimensional code passes verification, realize the deciphering through going the shadow. The encryption and decryption method for generating the dynamic two-dimensional code can enable the generation and display speed of the dynamic two-dimensional code and the identification and decoding process to be fast, can improve the use convenience, and improves the convenience of users and the interactivity among electronic equipment.
Description
Technical Field
The invention belongs to the technical field of two-dimension code encryption and two-dimension code anti-copying, and particularly relates to an encryption and decryption method for generating a dynamic two-dimension code.
Background
With the improvement of living standard of people and the continuous progress of science and technology, the two-dimensional code is widely applied to various fields, and the advantages of large amount of stored information, wide coding range, strong error correction capability and the like are important reasons for the wide application of the two-dimensional code. But the security problem of easy replication is widely existed in every corner of society, and the interests of many merchants are also influenced. The dynamic two-dimensional code can better solve the safety problem caused by easy copying, but the current dynamic two-dimensional code changes according to the change of time, different times correspond to different two-dimensional codes, a one-to-one correspondence exists, the identification process is similar to that of the common two-dimensional code, the copying and the cracking are easy, and the use safety is greatly influenced.
Disclosure of Invention
The present invention is directed to an encryption and decryption method for generating a dynamic two-dimensional code, so as to solve the above-mentioned existing technical problems. The encryption and decryption method for generating the dynamic two-dimensional code can greatly improve the safety of the dynamic two-dimensional code.
In order to achieve the purpose, the invention adopts the following technical scheme:
an encryption and decryption method for generating a dynamic two-dimensional code, comprising the steps of:
step 1, obtaining a static two-dimensional code to be encrypted;
step 2, performing image processing on the static two-dimensional code obtained in the step 1 by using an axis side algorithm and a shadow processing algorithm; the axis side algorithm is an algorithm for drawing a three-dimensional graph on a two-dimensional plane, and the shadow processing algorithm is an algorithm for adding shadows to the drawn static two-dimensional code three-dimensional graph under different illumination angles so as to realize the constant change of shadow areas;
step 3, after the image processing is carried out in the step 2, more than 3 two-dimensional codes drawn according to different illumination angles are obtained, the obtained more than 3 two-dimensional codes are arranged and played in sequence according to the sequence that the illumination angles are sequentially increased or decreased, and the obtained dynamic two-dimensional codes realize the encryption of the static two-dimensional codes in the step 1;
step 4, scanning the dynamic two-dimensional code obtained in the step 3 through the mobile terminal, and continuously uploading the scanned 3 two-dimensional codes;
step 5, verifying whether the time interval of uploading the first two-dimensional code and the third two-dimensional code is within a threshold range; skipping to step 6 within the threshold range, otherwise skipping to step 4;
step 6, calculating the number of black pixel points in each uploaded two-dimensional code; verifying whether the number ratio of black pixel points in the adjacent two-dimensional codes is within a threshold range; skipping to step 7 within the threshold range, otherwise skipping to step 4;
and 7, removing the shadow of the dynamic two-dimensional code, restoring and decrypting the dynamic two-dimensional code, wherein the method specifically comprises the following steps:
step 7.1, carrying out image binarization processing on the received two-dimensional code uploaded in the step 4;
and 7.2, drawing an edge line on a black pixel part in the two-dimensional code by using an edge detection algorithm, and calculating first derivatives G of each pixel point in the X direction and the Y directionx、GyGradient ofAnd its placeCorresponding angle of direction
7.3, through traversing each pixel point in the two-dimensional code, finding out the gradient relation satisfying Gx=-Gy、|Gx|=|GyThe angular relationship isPixel point (X)m,Ym) Determining edge positioning points of the lower right corners of all black squares in the two-dimensional code; finding a relation satisfying gradient GyNot equal to 0, the angular relationship is The distance relation is min (Y)0-Ym) Point > 0 (X)m , Y0) (ii) a Find satisfying the gradient relation as GxNot equal to 0, the angular relationship isThe distance relation is min (X)m-X0) Point > 0 (X)0,Ym);
And 7.4, redrawing each black square in the two-dimensional code under a white background according to the three edge feature point coordinates found in the step 7.3 to obtain the original static two-dimensional code in the step 1 to realize decryption of the dynamic two-dimensional code.
Further, the static two-dimensional code in the step 1 is an original QR code carrying information.
Further, the variation range of the illumination angle in the step 2 is 0-90 degrees.
Further, after the image processing is performed in the step 2 in the step 3, 10 two-dimensional codes drawn according to different illumination angles are obtained.
Further, in the step 3, the playing time interval of each two-dimension code is 1s when the two-dimension codes are played in sequence; the threshold range in step 5 is 2s to 3 s.
Further, the threshold value range in the step 6 is 0.9-1.1.
Further, step 7.4 specifically includes, redrawing each black square in the two-dimensional code under the white background according to the three edge feature point coordinates found in step 7.3, drawing a black rectangular boundary first, and setting the coordinates of the four boundary points as (X)0,Ym)、(Xm, Ym)、(Xm,Y0) And (X)0,Y0) And then, the inside of the rectangle is filled into black by utilizing corrosion treatment, so that shadow removal and reduction of the dynamic two-dimensional code are realized.
Further, step 7.2 specifically includes: utilizing an edge detection algorithm to draw an edge line on a black pixel part with a gray value of 0 in the two-dimensional code image; the edge detection algorithm adopts sobel operator to calculate the first derivative G of each pixel point in X and Y directionsx、GyGradient ofAnd the corresponding direction angleThe calculation formula is as follows:
in the formula, GxIs the first derivative, G, of a pixel point in the X directionyThe first derivative of the pixel point in the Y direction is obtained;
in the formula, GxIs the first derivative, G, of a pixel point in the X directionyThe first derivative of the pixel point in the Y direction.
Further, the mobile terminal in step 4 is a mobile phone.
Compared with the prior art, the invention has the following beneficial effects:
according to the encryption and decryption method for generating the dynamic two-dimensional code, the image processing technology with the added shadow is adopted for encryption, the plurality of two-dimensional codes are generated under different illumination angles, the plurality of two-dimensional codes are played in sequence to generate the dynamic two-dimensional code, the generation and the transformation of the dynamic two-dimensional code are more convenient and faster, and the problems of low generation speed and slow display transformation of the dynamic two-dimensional code can be solved; in the decryption process, shadow-removing reduction is adopted to realize decryption, only the image needs to be processed and distinguished, encrypted information in the two-dimensional code does not need to be decrypted and then distinguished, and the decryption speed and the decryption safety are improved; meanwhile, the time efficiency verification and the number ratio verification of black pixel points of the two-dimensional code can improve the safety of the dynamic two-dimensional code generated by the invention and solve the problem that the traditional two-dimensional code is difficult to prevent copying.
Drawings
FIG. 1 is a schematic block flow diagram of an encryption and decryption method for generating a dynamic two-dimensional code in an embodiment of the invention;
fig. 2 is a schematic coordinate diagram of a two-dimensional code after being shaded in an encryption and decryption method for generating a dynamic two-dimensional code according to an embodiment of the present invention;
fig. 3 is a schematic diagram of ten two-dimensional codes generated in succession at different illumination angles in an encryption and decryption method for generating a dynamic two-dimensional code according to an embodiment of the present invention; FIG. 3a is a two-dimensional code generated when the illumination angle is 90 degrees; FIG. 3b is a two-dimensional code generated when the illumination angle is 100 degrees; FIG. 3c is a two-dimensional code generated when the illumination angle is 110 degrees; FIG. 3d is a two-dimensional code generated when the illumination angle is 120 degrees; FIG. 3e is a two-dimensional code generated when the illumination angle is 130 degrees; FIG. 3f is a two-dimensional code generated when the illumination angle is 140 degrees; FIG. 3g is a two-dimensional code generated when the illumination angle is 150 degrees; FIG. 3h is a two-dimensional code generated when the illumination angle is 160 degrees; FIG. 3i is a two-dimensional code generated when the illumination angle is 170 degrees; fig. 3j is a two-dimensional code generated when the illumination angle is 180 degrees.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. In the following examples, the structure and use of the present invention are explained and illustrated by using the commonly used qr (quick response) code as an example, but not as a limitation of the present invention.
Fig. 1 is a flowchart illustrating an encryption and decryption method according to an embodiment of the present invention. Referring to fig. 1 to 3, an encryption and decryption method for generating a dynamic two-dimensional code according to the present invention includes the following steps:
step 100: and acquiring the original static two-dimensional code to be encrypted by the merchant. The original static two-dimensional code is an original QR code carrying merchant information.
Step 110: and carrying out image processing on the original two-dimensional code by using an axis side algorithm and a shadow processing algorithm. The shadow processing algorithm is an algorithm that under different illumination angles, shadows are added to a drawn three-dimensional graph, so that the area of the shadows is changed continuously. The variation range of the illumination angle is 0-90 degrees.
Step 120: and drawing ten two-dimensional codes according to different illumination angles, as shown in figure 3. The ten two-dimensional codes are different two-dimensional codes generated when the illumination angle is increased by 10 degrees each time and the shadow area is changed differently after the angle is changed every time.
Step 130: ten two-dimension codes are numbered and played in sequence, and the playing time interval of adjacent two-dimension codes is 1 s.
Step 140: and scanning the two-dimensional code. The scanning of the two-dimensional code can be completed by mobile terminals such as a mobile phone. And the mobile terminal needs to stay for 3s when scanning the two-dimensional code.
Step 150: and continuously uploading the scanned three two-dimensional codes.
Step 160: and verifying whether the time interval between the first two-dimensional code and the third two-dimensional code is between 2 and 3 s. The time interval is the difference between the uploading time of the third two-dimensional code and the uploading time of the first two-dimensional code.
Step 161: if the verification fails, please re-verify. Verification failure means that the difference in upload time is greater than 3 s.
Step 170: and calculating the black area of each uploaded two-dimensional code. The black part area refers to the number of black pixel points in each two-dimensional code.
Step 180: whether the ratio of the black areas in the adjacent two-dimensional code pictures is within 0.9-1.1. The black area ratio in the adjacent two-dimensional code pictures refers to the number of black pixels in each extracted two-dimensional code, the number of the black pixels in the adjacent two-dimensional code is compared, and whether the ratio is in the range of 0.9-1.1 is verified.
Step 181: if the verification fails, please re-verify. The verification failure means that the ratio of the black areas of two uploaded adjacent two-dimensional codes is larger than 1.1 or smaller than 0.9.
Step 190: and (5) through verification, the two-dimensional code is subjected to shadow reduction. The two-dimensional code shadow removal reduction comprises the following four steps:
(1) and carrying out image binarization processing on the received first two-dimensional code.
(2) By using an edge detection algorithm, a black pixel part (a point with a gray value of 0) in the two-dimensional code image is drawn into an edge line, and a first derivative G in the X direction and a first derivative G in the Y direction of each pixel point are calculatedx、GyGradient ofAnd the corresponding direction angle
(3) And searching edge feature points. In generating the shadow, a black square has two sides that are constant and perpendicular, as shown in FIG. 2. Through traversing each pixel point in the picture, the gradient relation G is found outx=-Gy、|Gx|=|GyThe angular relationship isPixel point (X)m,Ym) And determining the edge positioning point of the lower right corner of all the black squares. Then search for satisfying the gradient relation GyNot equal to 0, the angular relationship isThe distance relation is min (Y)0-Ym) Point > 0 (X)m , Y0) (ii) a Finally, the relation of satisfying the gradient is found to be GxNot equal to 0, the angular relationship isThe distance relation is min (X)m-X0) Point > 0 (X)0,Ym)。
(4) And redrawing each black square in the two-dimensional code under a white background according to the coordinates of the three found edge feature points. Firstly, drawing black rectangular boundary, and the coordinates of four boundary points are (X)0,Ym)、(Xm,Ym)、(Xm,Y0) And (X)0,Y0). And then filling the interior of the rectangle into black by corrosion treatment, and finishing reduction.
The invention can better solve the anti-copying problem of the two-dimension code, provides a new idea for encryption and decryption of the dynamic two-dimension code, can improve the generation speed and the identification process of the dynamic two-dimension code, and improves the use convenience of the dynamic two-dimension code. The method comprises the steps of adding a changed shadow to a black part in an original two-dimensional code of a merchant by using a shaft side algorithm and a shadow processing algorithm, continuously drawing ten two-dimensional codes in sequence, playing the ten two-dimensional codes on a display screen in sequence, transmitting three scanned continuous two-dimensional codes back to a server when a mobile device scans the screen, and judging whether the three two-dimensional codes are legal or not by the server according to time intervals among the three two-dimensional codes and the change rate of the black part areas of the three two-dimensional codes. And restoring the original two-dimensional code by utilizing a shadow removing algorithm after the verification is passed, thereby obtaining original information. The axis side algorithm is an algorithm for drawing a three-dimensional graph on a two-dimensional plane. The shadow processing algorithm is an algorithm for adding a shadow to a drawn solid figure. The illumination angle range of the added shadow is between 0 and 90 degrees. The varying shadows are drawn using the different areas of the shadow at different illumination angles. The original two-dimensional code is an original QR code carrying merchant information. Ten consecutive two-dimensional codes are generated one two-dimensional code each time the shadow area changes. The sequential playing of the two-dimension codes is to switch the two-dimension code pictures every 1 s. The time interval between the three two-dimensional codes is the time interval between the first two-dimensional code and the third two-dimensional code which are uploaded. The area change rate of the black part refers to the number of black pixels in each two-dimensional code, the number of the black pixels of the adjacent two-dimensional codes is compared, and whether the ratio is in the range of 0.9-1.1 is verified. The shadow removing algorithm is a method for removing the generated shadow and keeping the original black and white color blocks. The method comprises the following steps:
(1) and carrying out image binarization processing on the received first two-dimensional code. I.e. the image is changed to black and white, displaying the grey value of each pixel.
(2) Utilizing an edge detection algorithm to draw an edge line from a black pixel part in the two-dimensional code image, namely a point with a gray value of 0, wherein the edge detection algorithm adopts a sobel operator to calculate a first derivative G of each pixel point in X and Y directionsx、GyGradient ofAnd the corresponding direction angleThe formula is as follows:
(3) and searching edge feature points. In generating the shadow, a black square has two sides that are constant and perpendicular, as shown in FIG. 2. Through traversing each pixel point in the picture, the pixel point (X) meeting the following condition is found outm,Ym):
Gx=-Gy
|Gx|=|Gy|
The edge anchor point for the lower right corner of all black squares on the image can be determined.
Then, a point (X) satisfying the following condition is searched form,Y0):
Gy≠0
min(Y0-Ym) > 0 (coordinate value of the nearest vertical axis)
The edge anchor point for the upper right corner of all black squares on the image can be determined.
Then, a point (X) satisfying the following condition is searched for0,Ym):
Gx≠0
min(Xm-X0) > 0 (the coordinate value of the abscissa closest to the axis),
the edge anchor point for the lower left corner of all black squares on the image can be determined.
(4) According to the coordinates of the three found edge feature points, each black square in the two-dimensional code is redrawn under a white background, a black rectangular boundary is drawn first, and the coordinates of the four boundary points are (X)0,Ym)、(Xm,Ym)、(Xm,Y0) And (X)0,Y0). And then, filling the inside of the rectangle into black by using corrosion treatment, and realizing decryption of the dynamic two-dimensional code after the reduction is finished.
The two-dimensional code dynamic encryption and decryption method comprises the following steps: acquiring an original two-dimensional code of a merchant; and processing the image of the original two-dimensional code, drawing ten two-dimensional codes in sequence, and displaying the ten two-dimensional codes in sequence, wherein the display time interval is 1 s. The mobile phone code scanning method includes the steps that three two-dimensional codes are continuously uploaded through a mobile phone code scanning device, and whether the two-dimensional codes pass verification or not is judged according to time intervals of the three two-dimensional codes and area change rates of black parts. The invention provides an encryption method for adding shadows to the two-dimensional code for the first time, thereby providing a new idea for the anti-copying technology of the two-dimensional code, solving the problem of insufficient security caused by easy copying of the two-dimensional code, enhancing the security of the two-dimensional code, and improving the convenience of users and the interactivity among electronic equipment through the continuously changing picture characteristics.
Claims (9)
1. An encryption and decryption method for generating a dynamic two-dimensional code, comprising the steps of:
step 1, obtaining a static two-dimensional code to be encrypted;
step 2, performing image processing on the static two-dimensional code obtained in the step 1 by using an axis side algorithm and a shadow processing algorithm; the axis side algorithm is an algorithm for drawing a three-dimensional graph on a two-dimensional plane, and the shadow processing algorithm is an algorithm for adding shadows to the drawn static two-dimensional code three-dimensional graph under different illumination angles so as to realize the constant change of shadow areas;
step 3, after the image processing is carried out in the step 2, more than 3 two-dimensional codes drawn according to different illumination angles are obtained, the obtained more than 3 two-dimensional codes are arranged and played in sequence according to the sequence that the illumination angles are sequentially increased or decreased, and the obtained dynamic two-dimensional codes realize the encryption of the static two-dimensional codes in the step 1;
step 4, scanning the dynamic two-dimensional code obtained in the step 3 through the mobile terminal, and continuously uploading the scanned 3 two-dimensional codes;
step 5, verifying whether the time interval of uploading the first two-dimensional code and the third two-dimensional code is within a threshold range; skipping to step 6 within the threshold range, otherwise skipping to step 4;
step 6, calculating the number of black pixel points in each uploaded two-dimensional code; verifying whether the number ratio of black pixel points in the adjacent two-dimensional codes is within a threshold range; skipping to step 7 within the threshold range, otherwise skipping to step 4;
and 7, removing the shadow of the dynamic two-dimensional code, restoring and decrypting the dynamic two-dimensional code, wherein the method specifically comprises the following steps:
step 7.1, carrying out image binarization processing on the received two-dimensional code uploaded in the step 4;
and 7.2, drawing an edge line on a black pixel part in the two-dimensional code by using an edge detection algorithm, and calculating first derivatives G of each pixel point in the X direction and the Y directionx、GyGradient ofAnd the corresponding direction angle
7.3, through traversing each pixel point in the two-dimensional code, finding out the gradient relation satisfying Gx=-Gy、|Gx|=|GyThe angular relationship isPixel point (X)m,Ym) Determining edge positioning points of the lower right corners of all black squares in the two-dimensional code; finding a relation satisfying gradient GyNot equal to 0, the angular relationship is The distance relation is min (Y)0-Ym) Point > 0 (X)m,Y0) Determining edge positioning points of the upper right corners of all black squares in the two-dimensional code; find satisfying the gradient relation as GxNot equal to 0, the angular relationship isThe distance relation is min (X)m-X0) Point in the lower left corner > 0 (X)0,Ym);
And 7.4, redrawing each black square in the two-dimensional code under a white background according to the three edge feature point coordinates found in the step 7.3 to obtain the original static two-dimensional code in the step 1 to realize decryption of the dynamic two-dimensional code.
2. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein the static two-dimensional code in step 1 is a QR code carrying information.
3. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein the variation range of the illumination angle in step 2 is 0 ° to 90 °.
4. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein 10 two-dimensional codes rendered according to different illumination angles are obtained after the image processing in step 3 through step 2.
5. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein the time interval of playing each two-dimensional code is 1s when the two-dimensional codes are played sequentially in step 3; the threshold range in step 5 is 2s to 3 s.
6. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein the threshold value in step 6 is in the range of 0.9 to 1.1.
7. The encryption and decryption method for generating dynamic two-dimensional code according to claim 1, wherein step 7.4 specifically includes, based on the three edge feature point coordinates found in step 7.3, redrawing each black square in the two-dimensional code on a white background, first drawing a black rectangular boundary, and defining four boundary point coordinates as (X)0,Ym)、(Xm,Ym)、(Xm,Y0) And (X)0,Y0) And then, the inside of the rectangle is filled into black by utilizing corrosion treatment, so that shadow removal and reduction of the dynamic two-dimensional code are realized.
8. The encryption and decryption method for generating a dynamic two-dimensional code according to claim 1, wherein step 7.2 specifically comprises: utilizing an edge detection algorithm to draw an edge line on a black pixel part with a gray value of 0 in the two-dimensional code image; the edge detection algorithm adopts sobel operator to calculate the first derivative G of each pixel point in X and Y directionsx、GyGradient ofAnd the corresponding direction angleThe calculation formula is as follows:
in the formula, GxIs the first derivative, G, of a pixel point in the X directionyThe first derivative of the pixel point in the Y direction is obtained;
in the formula, GxIs the first derivative, G, of a pixel point in the X directionyThe first derivative of the pixel point in the Y direction.
9. The encryption and decryption method for generating a dynamic two-dimensional code according to any one of claims 1 to 8, wherein the mobile terminal in step 4 is a mobile phone.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811151618.2A CN109325575B (en) | 2018-09-29 | 2018-09-29 | Encryption and decryption method for generating dynamic two-dimensional code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811151618.2A CN109325575B (en) | 2018-09-29 | 2018-09-29 | Encryption and decryption method for generating dynamic two-dimensional code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109325575A CN109325575A (en) | 2019-02-12 |
CN109325575B true CN109325575B (en) | 2021-07-06 |
Family
ID=65266289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811151618.2A Active CN109325575B (en) | 2018-09-29 | 2018-09-29 | Encryption and decryption method for generating dynamic two-dimensional code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109325575B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110428531B (en) * | 2019-08-12 | 2021-04-27 | 北京百佑科技有限公司 | Access control method, terminal and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546174A (en) * | 2011-12-20 | 2012-07-04 | 贾松仁 | Two-dimensional code encryption/decryption method and anti-counterfeiting method |
CN102760242A (en) * | 2012-05-16 | 2012-10-31 | 孟智平 | Encoding and decoding method for three-dimensional codes and using method |
KR101705316B1 (en) * | 2016-08-01 | 2017-02-09 | (주)글로벌 로보틱스 | Qr code marking system |
CN107437103A (en) * | 2017-07-28 | 2017-12-05 | 中冶华天工程技术有限公司 | Point inspection equipments and method based on dynamic two-dimension code |
CN108197521A (en) * | 2017-12-31 | 2018-06-22 | 南京理工大学 | A kind of leggy Quick Response Code obtains identification device and method |
-
2018
- 2018-09-29 CN CN201811151618.2A patent/CN109325575B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546174A (en) * | 2011-12-20 | 2012-07-04 | 贾松仁 | Two-dimensional code encryption/decryption method and anti-counterfeiting method |
CN102760242A (en) * | 2012-05-16 | 2012-10-31 | 孟智平 | Encoding and decoding method for three-dimensional codes and using method |
KR101705316B1 (en) * | 2016-08-01 | 2017-02-09 | (주)글로벌 로보틱스 | Qr code marking system |
CN107437103A (en) * | 2017-07-28 | 2017-12-05 | 中冶华天工程技术有限公司 | Point inspection equipments and method based on dynamic two-dimension code |
CN108197521A (en) * | 2017-12-31 | 2018-06-22 | 南京理工大学 | A kind of leggy Quick Response Code obtains identification device and method |
Also Published As
Publication number | Publication date |
---|---|
CN109325575A (en) | 2019-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100470452C (en) | Method and system for implementing three-dimensional enhanced reality | |
CN113365041B (en) | Projection correction method, projection correction device, storage medium and electronic equipment | |
KR101542756B1 (en) | Hidden image signaling | |
US9607348B2 (en) | Position information adding apparatus, position information adding method, and computer program for adding position information and position detection apparatus | |
JP6216516B2 (en) | Digital watermark embedding method and digital watermark detection method | |
CN104008542B (en) | A kind of Fast Corner matching process for specific plane figure | |
US10663291B2 (en) | Method and system for reproducing visual content | |
WO2018219156A1 (en) | Structured light coding method and apparatus, and terminal device | |
WO2015096462A1 (en) | Method and system for focused display of 2-dimensional bar code | |
WO2018006566A1 (en) | View adjustment method and system | |
CN103024421A (en) | Method for synthesizing virtual viewpoints in free viewpoint television | |
CN106558040A (en) | Character image treating method and apparatus | |
Hashemzadeh | Hiding information in videos using motion clues of feature points | |
WO2018176929A1 (en) | Image background blurring method and apparatus | |
CN109325575B (en) | Encryption and decryption method for generating dynamic two-dimensional code | |
TW201824176A (en) | Projection drawing construction method and device | |
He et al. | A mini-Sudoku matrix-based data embedding scheme with high payload | |
Dong et al. | Watermark-preserving keypoint enhancement for screen-shooting resilient watermarking | |
US20130128992A1 (en) | Methods and Apparatus for Preparation of Casual Stereoscopic Video | |
CN103024375A (en) | Three-dimensional image semi-fragile watermarking method based on binocular just-perceived distortion | |
CN110942500B (en) | Method and device for converting static diagram into dynamic diagram | |
JP4970385B2 (en) | Two-dimensional code reader and program thereof | |
Kang et al. | Robust spherical panorama image watermarking against viewpoint desynchronization | |
CN115983304A (en) | Two-dimensional code dynamic adjustment method and device, electronic equipment and storage medium | |
US20230196707A1 (en) | Fiducial patterns |
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 |