CN107463976A - A kind of QR codes figure adjustment method - Google Patents

A kind of QR codes figure adjustment method Download PDF

Info

Publication number
CN107463976A
CN107463976A CN201610384333.8A CN201610384333A CN107463976A CN 107463976 A CN107463976 A CN 107463976A CN 201610384333 A CN201610384333 A CN 201610384333A CN 107463976 A CN107463976 A CN 107463976A
Authority
CN
China
Prior art keywords
mtd
mrow
mtr
image
mtable
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.)
Pending
Application number
CN201610384333.8A
Other languages
Chinese (zh)
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.)
National Computer Network and Information Security Management Center
Original Assignee
National Computer Network and Information Security Management Center
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 National Computer Network and Information Security Management Center filed Critical National Computer Network and Information Security Management Center
Priority to CN201610384333.8A priority Critical patent/CN107463976A/en
Publication of CN107463976A publication Critical patent/CN107463976A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present invention is a kind of QR codes figure adjustment method, one two-dimensional image passes through perspective transform, as another plane picture, realize the correction to two-dimension code pattern, using bearing calibration of the present invention, deviation occurs at most only 10% pixel, and the M ranks serious forgiveness of most common QR Quick Response Codes is with regard to that can reach 15%, therefore the bearing calibration of the present invention can meet the correction needs of most of deformation Quick Response Code.

Description

A kind of QR codes figure adjustment method
Technical field
The invention belongs to the network information security, technical field of video monitoring, more particularly to a kind of QR codes figure adjustment method.
Background technology
Quick Response Code is the readable black and white Matrix Pattern bar code that one-dimensional formation is extended on the basis of bar code.Quick Response Code can Can be encoded to word, image, video, fingerprint etc. are any with digitized information, and it is expressed as visual rectangular code.Two Dimension code has the characteristics that information capacity is big, coding range is wide, fault-tolerant error correcting capability is strong, encoding and decoding cost is low, spread speed is fast, Through being widely used in the fields such as internet rich media information propagation and network payment.With mobile Internet fast development, two Dimension code has become the important carrier of information interchange, emerges in multitude in internet.Quick Response Code is while convenient people live There is also some problems.As information carrier, the text that is stored in Quick Response Code, image, link may include harmful information.Such as Fruit is not added with managing, and the proper network of the harmful information meeting severe jamming people propagated by Quick Response Code is lived, or even threatens state Family's network information security and social stability.Therefore, it is to provide under the new situation clearly to realize effective supervision to Quick Response Code in internet The major issue that clean network environment and Logistics networks information security are faced.
Image content in internet is various, and shooting angle is different, and picture format, encryption algorithm are varied, in identification The problems such as Quick Response Code also existence position in picture positions and posture is corrected, this all brings tired to the supervision of network Quick Response Code It is difficult.
The content of the invention
The technical problems to be solved by the invention are the defects of overcoming prior art, there is provided a kind of QR codes figure adjustment side Method.
The technical scheme is that a kind of QR codes figure adjustment method, a two-dimensional image passes through perspective transform, As another plane picture, this process can be defined by the formula:
Wherein (x, y) is the pixel coordinate in original image coordinate system, and (u, v) is corresponding in image coordinate system after conversion Pixel coordinate, a, b, c, d, e, f, g, h are conversion coefficients;
To given change point, conversion defined in formula (1) and formula (2) can be written as matrix form:
From (3), only it is to be understood that the point of 4 points and its corresponding transformation space in original image, it is possible to obtain 8 Linear equation, as long as this 8 linear equation linear independences, it becomes possible to 8 transformation parameters are solved, before and after obtaining perspective transform Transformation relation, realize to graphical perspectives convert after space coordinates position;
Obtain being corrected 4 points of image, be denoted as respectively:(x1,y1), (x2,y2), (x3,y3), and (x4,y4),
It is N to preset and finally correct the obtained image in 2 D code length of side, then is corrected four angle points of image in 2 D code Corresponding point coordinates on correction chart picture is (1,1), (1, N), (N, 1) and (N, N);Give 4 points and conversion corresponding to it The point in space, then 8 linear equations can be obtained according to formula (3), therefore can be in the hope of a, b, c, d, e, f, g, 8 parameters of h, Then all pixels points corresponding with two-dimension code pattern pixel is corrected can be obtained with (2) by (1), that is, after correcting Two-dimension code pattern.
The beneficial effects of the present invention are:Using bearing calibration of the present invention, at most only 10% pixel occurs Deviation, the M ranks serious forgiveness of most common QR Quick Response Codes is with regard to that can reach 15%, therefore the bearing calibration of the present invention can meet big portion Divide the correction of deformation Quick Response Code to need.
Embodiment
Due to the distortion of shooting angle or Quick Response Code in itself so that the Quick Response Code of square is originally used for there occurs deformation, Therefore need to be corrected Quick Response Code.More commonly used method for correcting image has, perspective transform method and control point transformation side Method.Perspective transform method is mainly according to video camera imaging principle, realizes image rectification;And point-transformation method is controlled then to adapt to one As image rectification, cardinal principle is the corresponding relation according to control point, and the correction of image is realized with the method for bilinear interpolation.
Because the deformation that the Quick Response Code under complex background occurs mostlys come from shooting angle problem, i.e., by filming apparatus Caused by perspective transform.Therefore, in image in 2 D code trimming process, select to enter image in 2 D code using perspective transform method Row correction.
One two-dimensional image passes through perspective transform, turns into another plane picture, this process can be defined by the formula:
Wherein (x, y) is the pixel coordinate in original image coordinate system, and (u, v) is corresponding in image coordinate system after conversion Pixel coordinate, a, b, c, d, e, f, g, h are conversion coefficients.
To given change point, conversion defined in (1) and (2) can be written as matrix form:
From (3), only it is to be understood that the point of 4 points and its corresponding transformation space in original image, it is possible to obtain 8 Linear equation, as long as this 8 linear equation linear independences, it is possible to solve 8 transformation parameters.Before and after obtaining perspective transform Transformation relation, realize to graphical perspectives convert after space coordinates position.
By last point we can obtain being corrected 4 points of image, be denoted as respectively:(x1,y1), (x2,y2), (x3, y3), and (x4,y4)。
It is N that we, which preset and finally correct the obtained image in 2 D code length of side, then is corrected four of image in 2 D code Corresponding point coordinates of the angle point on correction chart picture is (1,1), (1, N), (N, 1) and (N, N).
4 given points and the point of its corresponding transformation space are learnt now, then 8 lines can be obtained according to formula (3) Property equation, therefore can be in the hope of a, b, c, d, e, f, g, 8 parameters of h.Then it can obtain all by (1) and (2) and be corrected The corresponding all pixels point of two-dimension code pattern pixel, that is, the two-dimension code pattern after correcting.
Described is only the instantiation of the present invention, any equivalent transformation based on the inventive method basis, belongs to this hair Within bright protection domain.

Claims (1)

  1. A kind of 1. QR codes figure adjustment method a, it is characterised in that two-dimensional image passes through perspective transform, turns into another Plane picture, this process can be defined by the formula:
    <mrow> <mi>u</mi> <mo>=</mo> <mfrac> <mrow> <mi>a</mi> <mi>x</mi> <mo>+</mo> <mi>b</mi> <mi>y</mi> <mo>+</mo> <mi>c</mi> </mrow> <mrow> <mi>g</mi> <mi>x</mi> <mo>+</mo> <mi>h</mi> <mi>y</mi> <mo>+</mo> <mn>1</mn> </mrow> </mfrac> <mn>...</mn> <mrow> <mo>(</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow>
    <mrow> <mi>v</mi> <mo>=</mo> <mfrac> <mrow> <mi>d</mi> <mi>x</mi> <mo>+</mo> <mi>e</mi> <mi>y</mi> <mo>+</mo> <mi>f</mi> </mrow> <mrow> <mi>g</mi> <mi>x</mi> <mo>+</mo> <mi>h</mi> <mi>y</mi> <mo>+</mo> <mn>1</mn> </mrow> </mfrac> <mn>...</mn> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow>
    Wherein (x, y) is the pixel coordinate in original image coordinate system, and (u, v) is corresponding pixel in image coordinate system after conversion Coordinate, a, b, c, d, e, f, g, h are conversion coefficients;
    To given change point, conversion defined in formula (1) and formula (2) can be written as matrix form:
    <mrow> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mi>x</mi> </mtd> <mtd> <mi>y</mi> </mtd> <mtd> <mn>1</mn> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mrow> <mo>-</mo> <mi>u</mi> <mi>x</mi> </mrow> </mtd> <mtd> <mrow> <mo>-</mo> <mi>u</mi> <mi>y</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mn>0</mn> </mtd> <mtd> <mi>x</mi> </mtd> <mtd> <mi>y</mi> </mtd> <mtd> <mn>1</mn> </mtd> <mtd> <mrow> <mo>-</mo> <mi>v</mi> <mi>x</mi> </mrow> </mtd> <mtd> <mrow> <mo>-</mo> <mi>v</mi> <mi>y</mi> </mrow> </mtd> </mtr> </mtable> </mfenced> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mi>a</mi> </mtd> </mtr> <mtr> <mtd> <mi>b</mi> </mtd> </mtr> <mtr> <mtd> <mi>c</mi> </mtd> </mtr> <mtr> <mtd> <mi>d</mi> </mtd> </mtr> <mtr> <mtd> <mi>e</mi> </mtd> </mtr> <mtr> <mtd> <mi>f</mi> </mtd> </mtr> <mtr> <mtd> <mi>g</mi> </mtd> </mtr> <mtr> <mtd> <mi>h</mi> </mtd> </mtr> </mtable> </mfenced> <mo>=</mo> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mi>u</mi> </mtd> </mtr> <mtr> <mtd> <mi>v</mi> </mtd> </mtr> </mtable> </mfenced> <mn>...</mn> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow>
    From (3), only it is to be understood that the point of 4 points and its corresponding transformation space in original image, it is possible to obtain 8 linearly Equation, as long as this 8 linear equation linear independences, it becomes possible to 8 transformation parameters are solved, so as to obtain the change before and after perspective transform Relation is changed, realizes that the space coordinates after being converted to graphical perspectives positions;
    Obtain being corrected 4 points of image, be denoted as respectively:(x1,y1), (x2,y2), (x3,y3), and (x4,y4),
    It is N to preset and finally correct the obtained image in 2 D code length of side, then is corrected four angle points of image in 2 D code in school Corresponding point coordinates in positive image is (1,1), (1, N), (N, 1) and (N, N);Give 4 points and its corresponding transformation space Point, then 8 linear equations can be obtained according to formula (3), therefore can be in the hope of a, b, c, d, e, f, g, 8 parameters of h, then All all pixels points corresponding with two-dimension code pattern pixel is corrected, i.e. two after correction can be obtained with (2) by (1) Tie up code figure.
CN201610384333.8A 2016-06-02 2016-06-02 A kind of QR codes figure adjustment method Pending CN107463976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610384333.8A CN107463976A (en) 2016-06-02 2016-06-02 A kind of QR codes figure adjustment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610384333.8A CN107463976A (en) 2016-06-02 2016-06-02 A kind of QR codes figure adjustment method

Publications (1)

Publication Number Publication Date
CN107463976A true CN107463976A (en) 2017-12-12

Family

ID=60544378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610384333.8A Pending CN107463976A (en) 2016-06-02 2016-06-02 A kind of QR codes figure adjustment method

Country Status (1)

Country Link
CN (1) CN107463976A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307786A (en) * 2020-10-13 2021-02-02 上海迅邦电子科技有限公司 Batch positioning and identifying method for multiple irregular two-dimensional codes
CN112966533A (en) * 2021-02-26 2021-06-15 陕西科技大学 Two-dimensional code password verification system and method based on multiple data verification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105046256A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Distortion image correction based QR (quick response) code decoding method and system
CN105046184A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Distortion image correction based two-dimensional code decoding method and system
CN105046183A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Decoding method and system for distorted QR (Quick Response) code

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105046256A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Distortion image correction based QR (quick response) code decoding method and system
CN105046184A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Distortion image correction based two-dimensional code decoding method and system
CN105046183A (en) * 2015-07-22 2015-11-11 福建新大陆自动识别技术有限公司 Decoding method and system for distorted QR (Quick Response) code

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307786A (en) * 2020-10-13 2021-02-02 上海迅邦电子科技有限公司 Batch positioning and identifying method for multiple irregular two-dimensional codes
CN112966533A (en) * 2021-02-26 2021-06-15 陕西科技大学 Two-dimensional code password verification system and method based on multiple data verification

Similar Documents

Publication Publication Date Title
Chu et al. Cyclegan, a master of steganography
CN104301677B (en) The method and device monitored towards the panoramic video of large scene
CN105701837A (en) Geometric calibration processing method and apparatus for camera
JP2019505144A5 (en)
CN105681805B (en) Video coding, coding/decoding method and its inter-frame prediction method and device
CN109753838A (en) Two-dimensional code identification method, device, computer equipment and storage medium
CN104103058B (en) Image matching system and method
CN104537601A (en) Gray level image aerial region steganography method based on nine grids
CN109191361A (en) Image Watermarking, extracting method and correlation technique
CN107646112B (en) Method for correcting eye image using machine learning and method for machine learning
CN105894446A (en) Automatic face outline modification method for video
Bai et al. Adaptive correction procedure for TVL1 image deblurring under impulse noise
CN107463976A (en) A kind of QR codes figure adjustment method
CN104103057B (en) Method for fast generating panorama by fish eye image
Wang et al. Virtual background reference frame based satellite video coding
Cao et al. A secure video steganography based on the intra-prediction mode (IPM) for H264
Li et al. Screen-shooting resilient watermarking scheme via learned invariant keypoints and QT
CN104200468A (en) Method for obtaining correction parameter of spherical perspective projection model
Chung et al. Effective content-aware chroma reconstruction method for screen content images
CN107423651A (en) A kind of QR codes image position method
CN108491747A (en) Beautify the method for QR codes after a kind of blending image
CN104700357A (en) Chinese character image zooming method based on bilinear operator
US20180158194A1 (en) Determining Optical Flow
Wenjie et al. Optical identity authentication technique based on compressive ghost imaging with QR code
WO2018061232A1 (en) Information processing device, display method, reading method, and computer-readable non-transitory storage medium

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171212

WD01 Invention patent application deemed withdrawn after publication