[go: up one dir, main page]

CN106845314B - A kind of method for rapidly positioning of two dimensional code - Google Patents

A kind of method for rapidly positioning of two dimensional code Download PDF

Info

Publication number
CN106845314B
CN106845314B CN201611232321.XA CN201611232321A CN106845314B CN 106845314 B CN106845314 B CN 106845314B CN 201611232321 A CN201611232321 A CN 201611232321A CN 106845314 B CN106845314 B CN 106845314B
Authority
CN
China
Prior art keywords
image
dimensional code
spacing
edge
rapidly positioning
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
CN201611232321.XA
Other languages
Chinese (zh)
Other versions
CN106845314A (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.)
Development Research Institute Of Guangzhou Smart City
Guangzhou Bochuang Information Technology Co ltd
Original Assignee
Guangzhou Smart City Development Research Institute
Guangzhou Shizhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Smart City Development Research Institute, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Smart City Development Research Institute
Priority to CN201611232321.XA priority Critical patent/CN106845314B/en
Publication of CN106845314A publication Critical patent/CN106845314A/en
Application granted granted Critical
Publication of CN106845314B publication Critical patent/CN106845314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • 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

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention proposes a kind of method for rapidly positioning of two dimensional code, include the following steps: S1, obtain image in 2 D code to be processed;The step S1 image in 2 D code obtained is converted to gray level image by S2;S3, median filtering;S4, edge detection;S5, parallel coordinates positioning;Wherein, the step S5 specifically comprises the following steps: S51, and the step S4 edge image got is mapped on parallel coordinates;S52, the edge image that step S4 is got is rotated along Y-axis, and postrotational edge image is mapped on parallel coordinates;The spacing for each intersection point on image that the spacing and step S52 for each intersection point on image that S53, comparison step S51 are obtained obtain, coordinate corresponding to the equal point of spacing describe the region where two dimensional code jointly.A kind of method for rapidly positioning of two dimensional code provided by the invention quickly positions two dimensional code region under complex background.

Description

A kind of method for rapidly positioning of two dimensional code
Technical field
The present invention relates to two dimensional code fields, and in particular to a kind of method for rapidly positioning of two dimensional code.
Background technique
Two dimensional code be distributed in plane i.e. two-dimensional directional according to certain rules with certain specific geometric figure it is black White alternate graphic recording data symbol information;Composition computer-internal logical foundations are dexterously utilized in code compilation The concept of " 0 ", " 1 " bit stream indicates text numerical information using several geometrical bodies corresponding with binary system, passes through Image input device or photoelectric scanning device automatically identifying and reading are to realize automatic processing of information: it has some total of barcode technology Property: every kind of code system has its specific character set;Each character occupies certain width;With certain verifying function etc..Simultaneously Also have to the information automatic identification function and the processing rotationally-varying point of figure that do not go together.Two dimensional code is a kind of image identification skill Art stores the advantages that information category is more, and error correcting capability is strong because having memory capacity big, in article code, the neck such as mobile payment Domain is widely used.
Two dimensional code has a wide range of application, therefore its application environment is relative complex.The picture got often has complicated back Scape in decoding process, need to navigate to the specific region of two dimensional code from picture.Common method disappears in two dimensional code positioning stage Time-consuming is long.
Summary of the invention
To solve the above-mentioned problems, the present invention provides a kind of method for rapidly positioning of two dimensional code.Provided by the invention one The method for rapidly positioning of kind two dimensional code quickly positions two dimensional code region under complex background.
The technical solution adopted by the invention is as follows:
A kind of method for rapidly positioning of two dimensional code, includes the following steps:
S1 obtains image in 2 D code to be processed;
The step S1 image in 2 D code obtained is converted to gray level image by S2;
S3, median filtering;
S4, edge detection;
S5, parallel coordinates positioning;
Wherein, the step S5 specifically comprises the following steps:
The step S4 edge image got is mapped on parallel coordinates by S51;
S52, the edge image that step S4 is got is rotated along Y-axis, and postrotational edge image is mapped in parallel On coordinate;
On the image that the spacing and step S52 for each intersection point on image that S53, comparison step S51 are obtained obtain The spacing of each intersection point, coordinate corresponding to the equal point of spacing describe the region where two dimensional code, the spacing phase jointly Deng point refer to point equal between the spacing of the intersection point inside step S51 or S52.
The method for rapidly positioning of above-mentioned a kind of two dimensional code, wherein the step S4 specifically includes use " Canny " operator Extract the edge of image.
A kind of method for rapidly positioning of above-mentioned two dimensional code, wherein the step S2 is specifically included: the figure that step S1 is obtained Picture respectively indicates the red, green, blue component of each pixel in color image with R, G, B, the corresponding picture of gray level image after conversion The brightness value of vegetarian refreshments is I, then:
I=0.3*R+0.59*G+0.11*B.
The present invention provide the beneficial effects of the present invention are: by image carry out gradation conversion, median filtering, edge examine After survey, the edge line of image is obtained, further whether judges edge line to being converted to for parallel coordinates using cartesian coordinate Correctly.Its is easy to operate, is not related to complicated calculations, and by mathematical model, promotes precision.Under complex background, to two dimensional code Region is quickly positioned, applied widely.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the method for rapidly positioning of two dimensional code of the present invention;
Fig. 2 is an image in 2 D code example in a kind of method for rapidly positioning of two dimensional code of the present invention;
Fig. 3 is edge line example corresponding with Fig. 2 in a kind of method for rapidly positioning of two dimensional code of the present invention;
Fig. 4 is that the cartesian coordinate point (0,2) and (2,0) in a kind of method for rapidly positioning of two dimensional code of the present invention are mapped to The schematic diagram of parallel coordinates.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Embodiment
As shown in Figure 1, a kind of method for rapidly positioning of two dimensional code, includes the following steps:
S1 obtains image in 2 D code to be processed;The color image of equipment acquisition thecamera head.
The step S1 image in 2 D code obtained is converted to gray level image by S2;Gray level image, that is, image brightness values are arrived 0 255 image.The image that step S1 is obtained, the red, green, blue component of each pixel in color image is respectively indicated with R, G, B, The brightness value of the corresponding pixel of gray level image after converting is I, then: I=0.3*R+0.59*G+0.11*B.
S3, median filtering;Since camera and transmission process will receive the influence for the factors such as electric current is unstable, image can go out Existing other bright spot, i.e. salt-pepper noise.In order to eliminate the influence of salt-pepper noise, need to carry out median filtering to image.Intermediate value filter Wave is a kind of nonlinear filter.In the window of definition, it is ranked up by the pixel value size of image, takes the number in middle position Result as filter output.
S4, edge detection;Use the edge of " Canny " operator extraction image.After edge detection, the side of image is obtained Edge, edge are made of line.It is exactly some parallel lines, as shown in Figure 2 and Figure 3 after two dimensional code edge detection.
S5, parallel coordinates positioning;
Wherein, the step S5 specifically comprises the following steps:
The step S4 edge image got is mapped on parallel coordinates by S51;It, will be two-dimentional according to parallel coordinates principle Code is considered as the image in cartesian coordinate, then the straight line of cartesian coordinate is mapped as the point of parallel coordinates, but can only be to negative The mapping of slope straight line.Cartesian coordinate point (0,2) and (2,0) are mapped to parallel coordinates, as shown in Figure 4.
S52, the edge image that step S4 is got is rotated along Y-axis, and postrotational edge image is mapped in parallel On coordinate;Because parallel coordinates can only detect the straight line of negative slope, this step rotates edge image along y-axis, re-maps flat On row coordinate, the straight line of positive slope in original image can detecte at this time.
On the image that the spacing and step S52 for each intersection point on image that S53, comparison step S51 are obtained obtain The spacing of each intersection point, coordinate corresponding to the equal point of spacing describe the region where two dimensional code, the spacing phase jointly Deng point refer to point equal between the spacing of the intersection point inside step S51 or S52.In two images, the equal point of spacing is just It is two dimensional code region.The straight line of negative slope in image is detected in step S51, and image positive slope is detected in step S52 Straight line.In addition, the spacing of each parallel lines is equal, therefore, the image after the mapping of two width is compared, the equal point of spacing is just It is the region of two groups of parallel lines intersection, two dimensional code region can be positioned as.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (3)

1. a kind of method for rapidly positioning of two dimensional code, which comprises the steps of:
S1 obtains image in 2 D code to be processed;
The step S1 image in 2 D code obtained is converted to gray level image by S2;
S3, median filtering;
S4, edge detection;
S5, parallel coordinates positioning;
Wherein, the step S5 specifically comprises the following steps:
The step S4 edge image got is mapped on parallel coordinates by S51;
S52, the edge image that step S4 is got is rotated along Y-axis, and postrotational edge image is mapped to parallel coordinates On;
It is each on the image that the spacing and step S52 for each intersection point on image that S53, comparison step S51 are obtained obtain The spacing of intersection point, coordinate corresponding to the equal point of spacing describe the region where two dimensional code jointly, and the spacing is equal Point refers to point equal between the spacing of the intersection point inside step S51 or S52.
2. a kind of method for rapidly positioning of two dimensional code according to claim 1, which is characterized in that the step S4 is specifically wrapped Include the edge of use " Canny " operator extraction image.
3. a kind of method for rapidly positioning of two dimensional code according to claim 1 or 2, which is characterized in that the step S2 tool Body includes: the image that step S1 is obtained, and the red, green, blue component of each pixel in color image is respectively indicated with R, G, B, is turned The brightness value of the corresponding pixel of gray level image after changing is I, then: I=0.3*R+0.59*G+0.11*B.
CN201611232321.XA 2016-12-28 2016-12-28 A kind of method for rapidly positioning of two dimensional code Active CN106845314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611232321.XA CN106845314B (en) 2016-12-28 2016-12-28 A kind of method for rapidly positioning of two dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611232321.XA CN106845314B (en) 2016-12-28 2016-12-28 A kind of method for rapidly positioning of two dimensional code

Publications (2)

Publication Number Publication Date
CN106845314A CN106845314A (en) 2017-06-13
CN106845314B true CN106845314B (en) 2019-07-12

Family

ID=59113057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611232321.XA Active CN106845314B (en) 2016-12-28 2016-12-28 A kind of method for rapidly positioning of two dimensional code

Country Status (1)

Country Link
CN (1) CN106845314B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845314B (en) * 2016-12-28 2019-07-12 广州智慧城市发展研究院 A kind of method for rapidly positioning of two dimensional code
CN108985129B (en) * 2018-08-02 2021-11-23 谷东科技有限公司 Two-dimensional code positioning and detecting method
CN110348265B (en) * 2019-07-19 2022-04-05 福建工程学院 Novel matrix code restoration method based on parallel coordinate system
CN111178111A (en) * 2019-12-31 2020-05-19 航天信息股份有限公司 Two-dimensional code detection method, electronic device, storage medium and system
CN116776909B (en) * 2023-08-28 2023-11-03 四川星点网络技术有限公司 Bottle lid two-dimensional code system of tracing to source

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102074051A (en) * 2011-01-13 2011-05-25 深圳市蓝韵实业有限公司 Fast locating method for data bonding volume of volume rendering parallel projection
CN103354928A (en) * 2012-02-03 2013-10-16 日本电气株式会社 Device, method, and program for visualization of multi-dimensional data
CN106845314A (en) * 2016-12-28 2017-06-13 广州智慧城市发展研究院 A kind of method for rapidly positioning of Quick Response Code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10244181A1 (en) * 2002-09-23 2004-04-01 Siemens Ag Image forming method in computer tomography, by filtering data output from detector array and back-projecting, with rays weighted based on position in beam

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102074051A (en) * 2011-01-13 2011-05-25 深圳市蓝韵实业有限公司 Fast locating method for data bonding volume of volume rendering parallel projection
CN103354928A (en) * 2012-02-03 2013-10-16 日本电气株式会社 Device, method, and program for visualization of multi-dimensional data
CN106845314A (en) * 2016-12-28 2017-06-13 广州智慧城市发展研究院 A kind of method for rapidly positioning of Quick Response Code

Also Published As

Publication number Publication date
CN106845314A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106845314B (en) A kind of method for rapidly positioning of two dimensional code
US10924729B2 (en) Method and device for calibration
CN111008597B (en) Space identification method and device for CAD drawing, electronic equipment and storage medium
CA3204361A1 (en) Image processing method, image processing apparatus, and non-transitory storage medium
US10713528B2 (en) System for determining alignment of a user-marked document and method thereof
CN107609451A (en) A kind of high-precision vision localization method and system based on Quick Response Code
EP3309703A1 (en) Method and system for decoding qr code based on weighted average grey method
CN107993263B (en) Automatic calibration method for panoramic system, automobile, calibration device and storage medium
EP2833636B1 (en) Color chart detection device, color chart detection method and color chart detection computer program
US11275955B2 (en) Lane line processing method and device
JP2011238228A (en) Screen area detection method and system
CN108090486B (en) Image processing method and device in billiard game
CN104361569A (en) Method and device for splicing images
US10055668B2 (en) Method for the optical detection of symbols
CN109801428B (en) Method and device for detecting edge straight line of paper money and terminal
CN100383810C (en) Distorted QR code image correction method
CN111401365B (en) OCR image automatic generation method and device
Gu et al. Concentric circle detection method based on minimum enveloping circle and ellipse fitting
CN105069393B (en) The anti-malice read method of Quick Response Code and device
CN103729852A (en) Double-bright-line-based registration method for oil depot SAR (Synthetic Aperture Radar) image and optical image
Ukida et al. Visual communication using LED panel and video camera for mobile object
CN113435287A (en) Lawn obstacle recognition method and device, mowing robot and readable storage medium
CN113487594B (en) Sub-pixel corner detection method, system and medium based on deep learning
CN116883998B (en) Article labeling method and device based on millimeter wave image and electronic equipment
Chhajed Barcode detection from barcode images captured by mobile phones: an android application

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230417

Address after: 6 / F, block a, 88 Tiangui Road, Huadu District, Guangzhou, Guangdong 510800

Patentee after: DEVELOPMENT Research Institute OF GUANGZHOU SMART CITY

Patentee after: GUANGZHOU BOCHUANG INFORMATION TECHNOLOGY CO.,LTD.

Patentee after: Guangzhou Zhongke Integrated Circuit Design Co.,Ltd.

Address before: 6 / F, block a, 88 Tiangui Road, Huadu District, Guangzhou, Guangdong 510800

Patentee before: DEVELOPMENT Research Institute OF GUANGZHOU SMART CITY

Patentee before: GUANGZHOU BOCHUANG INFORMATION TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231117

Address after: 6 / F, block a, 88 Tiangui Road, Huadu District, Guangzhou, Guangdong 510800

Patentee after: DEVELOPMENT Research Institute OF GUANGZHOU SMART CITY

Patentee after: GUANGZHOU BOCHUANG INFORMATION TECHNOLOGY CO.,LTD.

Address before: 6 / F, block a, 88 Tiangui Road, Huadu District, Guangzhou, Guangdong 510800

Patentee before: DEVELOPMENT Research Institute OF GUANGZHOU SMART CITY

Patentee before: GUANGZHOU BOCHUANG INFORMATION TECHNOLOGY CO.,LTD.

Patentee before: Guangzhou Zhongke Integrated Circuit Design Co.,Ltd.