WO2020238239A1 - 二维码识别方法、二维码定位识别模型建立方法及其装置 - Google Patents

二维码识别方法、二维码定位识别模型建立方法及其装置 Download PDF

Info

Publication number
WO2020238239A1
WO2020238239A1 PCT/CN2020/071156 CN2020071156W WO2020238239A1 WO 2020238239 A1 WO2020238239 A1 WO 2020238239A1 CN 2020071156 W CN2020071156 W CN 2020071156W WO 2020238239 A1 WO2020238239 A1 WO 2020238239A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional code
identified
image resolution
code
preset image
Prior art date
Application number
PCT/CN2020/071156
Other languages
English (en)
French (fr)
Inventor
梁明杰
陈家大
陈爽
王浦林
Original Assignee
创新先进技术有限公司
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 创新先进技术有限公司 filed Critical 创新先进技术有限公司
Priority to US16/809,256 priority Critical patent/US10956696B2/en
Publication of WO2020238239A1 publication Critical patent/WO2020238239A1/zh
Priority to US17/208,448 priority patent/US11216629B2/en

Links

Images

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/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • 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/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10792Special measures in relation to the object to be scanned
    • G06K7/10801Multidistance reading
    • G06K7/10811Focalisation
    • 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/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices

Definitions

  • the invention relates to the field of information technology, in particular to a two-dimensional code recognition method, a two-dimensional code positioning recognition model establishment method and a device thereof.
  • QR Quadick Response Code, Quick Response Matrix
  • Other two-dimensional codes are widely used in different scenarios in all walks of life, and almost involve all aspects of life, for example, mobile payment, information recognition through two-dimensional codes, etc. , which greatly improves the convenience of daily life.
  • problems such as too small code area and inaccurate focus that make it impossible to decode quickly.
  • problems such as parking tolls and highway tolls that require long-distance scan code payment
  • there are often two-dimensional codes captured due to the long shooting distance resulting in low resolution and unable to quickly decode, which affects the efficiency of payment and causes slow and slow passing through toll gates. Queuing problems. Therefore, for long-distance or other complex scenes where it is difficult to clearly capture the two-dimensional code, how to improve the accuracy of the two-dimensional code decoding is currently an urgent problem to be solved.
  • An object of the present invention is to provide a two-dimensional code recognition method, a two-dimensional code positioning recognition model establishment method and a device thereof, so as to solve the existing problem of low accuracy of two-dimensional code decoding in complex scenes.
  • a two-dimensional code recognition method including:
  • the method of the present invention further includes:
  • the sampled two-dimensional code and identification information are used as the input data of deep learning for training to obtain a two-dimensional code positioning recognition model.
  • the method of the present invention further includes:
  • the step of performing a focus adjustment process on the two-dimensional code to be recognized after the positioning detection is completed is performed according to the preset image resolution.
  • performing focusing processing on the to-be-identified two-dimensional code after positioning detection is completed according to the preset image resolution, including:
  • performing focusing processing on the to-be-identified two-dimensional code after positioning detection is completed according to the preset image resolution, including:
  • zoom processing is performed on the two-dimensional code to be identified to adjust the image resolution of the two-dimensional code to be identified.
  • the method of the present invention further includes:
  • control the two-dimensional code scanning device to collect the two-dimensional code to be identified according to the preset image resolution; otherwise, adjust the pixel area of the collected two-dimensional code to be identified according to the interpolation processing method.
  • the method of the present invention further includes:
  • the two-dimensional code scanning device has an optical zoom function, after controlling the two-dimensional code scanning device to collect the two-dimensional code to be recognized according to the preset image resolution, it is detected whether the two-dimensional code to be recognized meets the preset image resolution rate;
  • a method for establishing a two-dimensional code positioning recognition model including:
  • the sampled two-dimensional code and identification information are used as the input data of deep learning for training to obtain a two-dimensional code positioning recognition model.
  • the designated area includes the corner points of the sampled two-dimensional code.
  • a two-dimensional code recognition device including:
  • the two-dimensional code positioning module is used to obtain the two-dimensional code to be identified, and perform the positioning detection of the global feature of the two-dimensional code to be identified through the pre-established two-dimensional code positioning and recognition model;
  • the focusing processing module is used to perform focusing processing on the QR code to be identified after positioning detection is completed according to the preset image resolution;
  • the two-dimensional code decoding module is used to decode the to-be-identified two-dimensional code after focusing processing.
  • the device of the present invention further includes:
  • the two-dimensional code sampling module is used to collect the corresponding sampling two-dimensional code based on preset environmental conditions
  • the information identification module is used to mark the designated area of the sampled QR code with corresponding identification information
  • the model generation module is used for training the sampled two-dimensional code and identification information as the input data of deep learning to obtain the two-dimensional code positioning recognition model.
  • the device of the present invention further includes:
  • the resolution determination module is used to determine whether the resolution of the two-dimensional code to be recognized meets the preset image resolution, and if not, perform focusing processing on the two-dimensional code to be recognized after the positioning detection is completed according to the preset image resolution A step of.
  • the focusing processing module also includes:
  • the focus adjustment sub-module is configured to perform focus processing on the two-dimensional code to be identified according to the auto-focus algorithm to adjust the image resolution of the two-dimensional code to be identified.
  • the focusing processing module also includes:
  • the zoom adjustment sub-module is configured to perform zoom processing on the two-dimensional code to be identified according to the preset image resolution to adjust the image resolution of the two-dimensional code to be identified.
  • zoom adjustment sub-module is also used for:
  • the processing method adjusts the pixel area of the collected QR code to be identified.
  • zoom adjustment sub-module is also used for:
  • the two-dimensional code scanning device has an optical zoom function, after controlling the two-dimensional code scanning device to collect the two-dimensional code to be recognized according to the preset image resolution, it is detected whether the two-dimensional code to be recognized meets the preset image resolution If not, adjust the pixel area of the collected QR code to be identified according to the interpolation processing method.
  • an apparatus for constructing a two-dimensional code positioning recognition model including:
  • the two-dimensional code sampling module is used to collect the corresponding sampling two-dimensional code based on preset environmental conditions
  • the information identification module is used to mark the designated area of the sampled QR code with corresponding identification information
  • the model generation module is used for training the sampled two-dimensional code and identification information as the input data of deep learning to obtain the two-dimensional code positioning recognition model.
  • the designated area includes the corner points of the sampled two-dimensional code.
  • a storage medium that stores computer program instructions that are executed according to the method of the present invention.
  • a computing device comprising: a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, trigger The computing device executes the method described in the present invention.
  • the present invention provides a two-dimensional code recognition method and device.
  • the acquired two-dimensional code to be recognized is positioned and detected by global features through a pre-established two-dimensional code positioning and recognition model, and the position to be detected is determined according to the preset image resolution. Recognize the two-dimensional code for focusing processing, and then decode.
  • using the pre-established QR code positioning recognition model to perform location detection on the acquired QR code to be recognized can improve the recognition accuracy of the fuzzy QR code shot in complex scenes.
  • the to-be-recognized two-dimensional code is subjected to focusing processing, which can automatically adjust the resolution of the fuzzy two-dimensional code, which greatly improves the user experience.
  • FIG. 1 is a schematic flowchart of a two-dimensional code recognition method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a two-dimensional code recognition method according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic diagram of identification information of a QR code in an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for establishing a two-dimensional code positioning recognition model according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of a two-dimensional code recognition device according to an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of an apparatus for establishing a two-dimensional code positioning recognition model according to an embodiment of the present invention.
  • the terminal and the equipment serving the network each include one or more processors (CPU), input/output interfaces, network interfaces and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer readable instructions, data structures, program devices, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassette type Magnetic tape, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technology
  • CD-ROM
  • Fig. 1 is a schematic flow diagram of a two-dimensional code recognition method according to the first embodiment of the present invention.
  • the two-dimensional code recognition method can be applied to terminal devices with image collection functions such as mobile phones, pads, and payment devices.
  • the present invention The two-dimensional code recognition method provided in the first embodiment includes steps S101 to S103, wherein:
  • Step S101 Obtain a two-dimensional code to be identified, and perform positioning detection on the two-dimensional code to be identified through a pre-established two-dimensional code positioning and identification model;
  • Step S102 performing focus adjustment processing on the to-be-identified two-dimensional code after positioning detection is completed according to the preset image resolution
  • Step S103 decoding the to-be-identified two-dimensional code after the focusing processing.
  • the QR code to be identified can be an unlocking QR code for unlocking car locks and door locks, or a QR code for receipt and payment for consumption, or QR code for identification and so on.
  • the two-dimensional code positioning and recognition model is established after pre-training the input data such as the sampled two-dimensional code and the marked identification information.
  • the collected two-dimensional code to be identified is input into the two-dimensional code positioning and recognition model, and the two-dimensional code to be identified is passed To perform positioning detection on the global features of, to output the two-dimensional code to be identified after positioning.
  • the two-dimensional code positioning recognition model established in step S101 may be pre-established by the server according to the input parameters.
  • the establishment of the two-dimensional code positioning recognition model may include: collecting corresponding sampling two-dimensional codes based on preset environmental conditions; The designated area of the two-dimensional code is marked with corresponding identification information; the sampled two-dimensional code and the identification information are used as input data of deep learning for training to obtain a two-dimensional code positioning recognition model. in particular:
  • the set sampling method can be based on different distances from the two-dimensional code display device.
  • the set sampling method can be based on multiple samplings corresponding to different angles of the two-dimensional code display device.
  • Two-dimensional code, etc.; in addition, the sampling two-dimensional code can be collected according to different lighting conditions, or a combination of different lighting and the above distance and angle.
  • the different distances, different angles, and different illuminations can be determined according to conditions such as the collection position of the two-dimensional code collection device in the actual application scenario, which is not limited in the present invention.
  • the designated area is an area that has an indicating effect on the position of the two-dimensional code in the image, for example, the four corner points of the two-dimensional code, or the position graphics in the two-dimensional code.
  • the corresponding identification information can be added to the designated area by manual labeling or by automatically identifying and labeling the designated area.
  • the sampled two-dimensional code and the identification information added in the designated area are used as the input data of the deep learning network for training. After the network converges, the two-dimensional code positioning recognition model, namely the network structure and parameters, is obtained.
  • the deep learning network can be a deep convolutional neural network, Faster R-CNN, YOLO, SSD, etc.
  • the embodiment of the present invention takes the current application scenario as an example of a scenario that requires remote code scanning and payment.
  • the set sampling distances are based on the data collected at different distances of 1m, 1.5m, 1.8m, and 2m from the QR code display device.
  • the designated area marked in the two-dimensional code positioning recognition model is the four corner points of the sampled two-dimensional code , Please refer to Figure 2, the identification information marked for the designated area is the upper left corner, lower left corner, upper right corner, and lower right corner of the four corner points of each sampled QR code.
  • the two-dimensional code to be recognized After obtaining the two-dimensional code to be recognized collected by the user at a distance of 1.8m from the two-dimensional code display device, determine the resolution of the two-dimensional code to be recognized, and find the resolution and the two-dimensional code to be recognized in the two-dimensional code positioning and recognition model
  • the sampled two-dimensional code with the most matching code and locate the global features of the two-dimensional code to be identified according to the sampled two-dimensional code and its identification information "upper left corner, lower left corner, upper right corner, and lower right corner of the four corner points" , And then output the two-dimensional code to be identified after positioning.
  • step S102 focusing processing is performed on the two-dimensional code to be identified after the positioning detection is completed according to the preset image resolution
  • the preset image resolution can be the minimum standard that meets the conditions for recognizing the QR code, or the maximum resolution that the QR code scanning device can achieve when the image is taken. Of course, it can also be other values preset by the user according to needs.
  • the invention is not specifically limited here.
  • the to-be-identified two-dimensional codes collected by the two-dimensional code scanning device may not be effectively recognized due to the small code area and low resolution.
  • the focus can be adjusted on the two-dimensional code to be recognized after the positioning detection is completed according to the preset image resolution.
  • the auto-focusing algorithm may be ranging auto-focusing, focus-detecting auto-focusing, etc., for example, it may specifically be a contrast-detecting auto-focusing algorithm of focus-detecting auto-focus.
  • the area of the two-dimensional code to be recognized can be in the clearest state, so as to avoid being unable to decode due to out-of-focus blur.
  • FIG. 3 is a schematic flowchart of a two-dimensional code recognition method according to the second embodiment of the present invention.
  • the two-dimensional code recognition method of the second embodiment of the present invention after focusing, if the resolution of the two-dimensional code to be recognized is less than the preset image resolution, according to the preset image resolution, the two-dimensional code to be recognized may also be Further zoom processing is performed to adjust the image resolution of the two-dimensional code to be recognized. Specifically, it includes step S1021-step S1023, wherein:
  • Step S1021 detecting whether the two-dimensional code scanning device that collects the two-dimensional code to be recognized has an optical zoom function; if so, perform step S1022; otherwise, perform step S1023.
  • Step S1022 controlling the two-dimensional code scanning device to collect the two-dimensional code to be identified according to a preset image resolution
  • Step S1023 Adjust the pixel area of the collected two-dimensional code to be identified according to the interpolation processing method.
  • step S1021-step S1023 for the two-dimensional code scanning device that supports optical zoom, the optical zoom method can be preferentially used, and the two-dimensional code scanning device is controlled to collect the second-to-be-identified devices that meet the preset image resolution according to the preset image resolution.
  • QR code or collect the QR code to be identified that meets the requirements of the preset image resolution as much as possible to achieve lossless magnification; for QR code scanning devices that do not support optical zoom, you can use the digital zoom method through the QR code scanning device
  • the internal processor increases the area of each pixel of the two-dimensional code to be identified, and then enlarges the area of the two-dimensional code to be identified to the preset image resolution as much as possible.
  • the QR code scanning device that supports optical zoom to collect the QR code to be recognized through the ultra-long distance
  • the scanning device has an optical zoom function. After controlling the two-dimensional code scanning device to collect the two-dimensional code to be identified according to the preset image resolution, it can further detect whether the two-dimensional code to be identified meets the preset image resolution; If satisfied, the pixel area of the collected QR code to be recognized can be adjusted according to the interpolation processing method, that is, the area of each pixel of the QR code to be recognized is increased, and the area of the QR code to be recognized is enlarged to the preset image Resolution size.
  • step S103 the to-be-identified two-dimensional code after the focusing processing is decoded.
  • the mask After focusing on the QR code to be recognized, the mask is removed by reading the symbol image, format information, and version information of the QR code to be recognized, and the symbol characters are read according to the module arrangement rules, and the information data and error correction code are restored Then, error correction and decoding are performed to obtain data characters and output the result to complete the decoding of the two-dimensional code to be recognized. Since the resolution of the two-dimensional code to be recognized has met or close to the preset image resolution after the focus processing of the two-dimensional code to be recognized, the success rate of decoding the two-dimensional code can be greatly improved when the two-dimensional code to be recognized is decoded And the recognition time.
  • FIG. 4 is a schematic flowchart of a method for constructing a two-dimensional code positioning recognition model according to Embodiment 3 of the present invention.
  • the method for constructing a two-dimensional code positioning recognition model in the third embodiment of the present invention can be applied to a server, and the server completes the construction of the two-dimensional code positioning recognition model.
  • the method for constructing a two-dimensional code positioning recognition model in the third embodiment of the present invention may include:
  • Step S401 based on preset environmental conditions, collect the corresponding sampling QR code
  • Step S402 marking the designated area of the sampled QR code with corresponding identification information
  • step S403 the sampled two-dimensional code and identification information are used as input data of deep learning for training, so as to obtain a two-dimensional code positioning recognition model.
  • the corresponding two-dimensional code sampling method can be set according to the current application scenario, such as highway toll and other scenarios that require remote code scanning and payment, the set sampling method can be based on the two-dimensional code Multiple sampling QR codes corresponding to different distances of the display device; for example, in a scene where the parking fee is set at the exit of a curved parking lot, the sampling method can be set based on different angles from the QR code display device. Collect multiple corresponding sampling two-dimensional codes, etc.; in addition, you can also collect sampling two-dimensional codes according to different lighting conditions, or a combination of different lighting and the aforementioned distances and angles. The different distances, different angles, and different illuminations can be determined according to conditions such as the collection position of the two-dimensional code collection device in the actual application scenario, which is not limited in the present invention.
  • the designated areas of the collected multiple sampled two-dimensional codes are marked with corresponding identification information.
  • the designated area is an area indicating the position of the two-dimensional code in the image, such as at least one corner point of the two-dimensional code, or a position graphic in the two-dimensional code.
  • the corresponding identification information can be added to the designated area by manual labeling or by automatically identifying and labeling the designated area.
  • step S403 the sampled two-dimensional code and the identification information added in the designated area are used as the input data of the deep learning network for training. After the network converges, the two-dimensional code positioning and recognition model, that is, the network structure and parameters, is obtained.
  • the deep learning network can be a deep convolutional neural network, Faster R-CNN, YOLO, SSD, etc.
  • the embodiment of the present invention takes the current application scenario as an example of a scenario that requires remote code scanning and payment.
  • the set sampling distances are based on the data collected at different distances of 1m, 1.5m, 1.8m, and 2m from the QR code display device.
  • the designated area marked in the two-dimensional code positioning recognition model is the four corner points of the sampled two-dimensional code , Please refer to Figure 3, the identification information marked for the designated area is the upper left corner, lower left corner, upper right corner, and lower right corner of the four corner points of each sampled QR code.
  • the two-dimensional code to be recognized After obtaining the two-dimensional code to be recognized collected by the user at a distance of 1.8m from the two-dimensional code display device, determine the resolution of the two-dimensional code to be recognized, and find the resolution and the two-dimensional code to be recognized in the two-dimensional code positioning and recognition model
  • the sampled two-dimensional code with the most matching code and locate the global features of the two-dimensional code to be identified according to the sampled two-dimensional code and its identification information "upper left corner, lower left corner, upper right corner, and lower right corner of the four corner points" , And then output the two-dimensional code to be identified after positioning.
  • the sampled two-dimensional code and identification information are used as the input data of deep learning for training to complete the establishment of the two-dimensional code positioning and recognition model.
  • FIG. 5 is a schematic structural diagram of a two-dimensional code recognition device according to an embodiment of the present invention.
  • the two-dimensional code recognition device according to an embodiment of the present invention includes a two-dimensional code positioning module 501, a focusing processing module 502, and a two-dimensional code Code decoding module 503, where:
  • the two-dimensional code positioning module 501 is configured to obtain a two-dimensional code to be identified, and perform positioning detection of the global feature of the two-dimensional code to be identified through a pre-established two-dimensional code positioning and recognition model;
  • the focusing processing module 502 is configured to perform focusing processing on the two-dimensional code to be identified after the positioning detection is completed according to the preset image resolution;
  • the two-dimensional code decoding module 503 is used to decode the to-be-identified two-dimensional code after the focusing processing.
  • the device further includes:
  • the two-dimensional code sampling module is used to collect the corresponding sampling two-dimensional code based on preset environmental conditions
  • the information identification module is used to mark the designated area of the sampled QR code with corresponding identification information
  • the model generation module is used for training the sampled two-dimensional code and identification information as the input data of deep learning to obtain the two-dimensional code positioning recognition model.
  • the device further includes:
  • the resolution determination module is used to determine whether the resolution of the two-dimensional code to be recognized meets the preset image resolution, and if not, perform focusing processing on the two-dimensional code to be recognized after the positioning detection is completed according to the preset image resolution A step of.
  • the focusing processing module further includes:
  • the focus adjustment sub-module is configured to perform focus processing on the two-dimensional code to be identified according to the auto-focus algorithm to adjust the image resolution of the two-dimensional code to be identified.
  • the focusing processing module further includes:
  • the zoom adjustment sub-module is configured to perform zoom processing on the two-dimensional code to be identified according to the preset image resolution to adjust the image resolution of the two-dimensional code to be identified.
  • zoom adjustment sub-module is also used for:
  • the processing method adjusts the pixel area of the collected QR code to be identified.
  • zoom adjustment sub-module is also used for:
  • the two-dimensional code scanning device has an optical zoom function, after controlling the two-dimensional code scanning device to collect the two-dimensional code to be recognized according to the preset image resolution, it is detected whether the two-dimensional code to be recognized meets the preset image resolution If not, adjust the pixel area of the collected QR code to be identified according to the interpolation processing method.
  • the device shown in FIG. 5 of the embodiment of the present invention is a device for implementing the methods shown in FIG. 1 and FIG. 2 of the embodiment of the present invention.
  • the specific principle is the same as the method shown in FIG. 1 and FIG. 2 of the embodiment of the present invention, and will not be repeated here.
  • Fig. 6 is a schematic structural diagram of a two-dimensional code positioning recognition model establishment device according to an embodiment of the present invention.
  • the two-dimensional code positioning recognition model establishment device includes a two-dimensional code sampling module 601 and an information identifier Module 602 and model generation module 603, where:
  • the two-dimensional code sampling module 601 is configured to collect corresponding sampling two-dimensional codes based on preset environmental conditions
  • the information identification module 602 is used to mark the designated area of the sampled QR code with corresponding identification information
  • the model generation module 603 is used for training the sampled two-dimensional code and identification information as input data for deep learning to obtain a two-dimensional code positioning recognition model.
  • the designated area includes the corner points of the sampled two-dimensional code.
  • the device shown in FIG. 6 of the embodiment of the present invention is an implementation device of the method shown in FIG. 4 of the embodiment of the present invention, and its specific principle is the same as that of the method shown in FIG. 4 of the embodiment of the present invention, and will not be repeated here.
  • An embodiment of the present invention also provides a storage device that stores computer program instructions, and the computer program instructions are executed according to the methods shown in FIG. 1, FIG. 2, and FIG. 4 of the present invention.
  • An embodiment of the present invention also provides a computing device, including: a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the calculation is triggered
  • the device executes the methods shown in Figure 1, Figure 2, and Figure 4 of the present invention.
  • some embodiments of the present invention also provide a computer-readable medium having computer program instructions stored thereon, and the computer-readable instructions can be executed by a processor to implement the methods and methods of the foregoing multiple embodiments of the present invention. / Or technical solutions.
  • the present invention can be implemented in software and/or a combination of software and hardware.
  • it can be implemented by an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device.
  • the software program of the present invention may be executed by a processor to realize the above steps or functions.
  • the software program (including related data structure) of the present invention can be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive or a floppy disk and similar devices.
  • some steps or functions of the present invention may be implemented by hardware, for example, as a circuit that cooperates with a processor to execute each step or function.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (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

一种二维码识别方法、二维码定位识别模型建立方法及其装置,该二维码识别方法包括:获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征定位检测(S101);根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理(S102);对调焦处理后的待识别二维码进行解码(S103)。通过该方法可以提高复杂场景下拍摄的二维码的识别准确度。

Description

二维码识别方法、二维码定位识别模型建立方法及其装置 技术领域
本发明涉及信息技术领域,尤其涉及一种二维码识别方法、二维码定位识别模型建立方法及其装置。
背景技术
目前,QR(Quick Response Code,快速响应矩阵)码等二维码被广泛的应用于各行各业的不同场景,几乎涉及到生活的方方面面,例如,通过二维码进行移动支付、信息识别等等,极大地提升了日常生活的便利性。但是,对于一些需要远距离拍摄二维码的特定场景下,经常存在因码区域过小、对焦不准等问题导致无法快速解码。例如,在停车收费、高速路收费等需要进行远距离扫码支付的场景,经常存在因拍摄距离远导致拍摄的二维码分辨率较低而无法快速解码,影响付费效率造成通过收费口缓慢及排队问题。因此,对于远距离或其他难以清楚拍摄二维码的复杂场景中,如何提升二维码解码准确度是目前亟待解决的问题。
发明内容
本发明的一个目的是提供一种二维码识别方法、二维码定位识别模型建立方法及其装置,以解决现有对于复杂场景中二维码解码准确度低的问题。
根据本发明的第一方面,提供一种二维码识别方法,包括:
获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征定位检测;
根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
对调焦处理后的待识别二维码进行解码。
进一步,本发明所述的方法,还包括:
基于预设的环境条件,采集对应的采样二维码;
对采样二维码的指定区域标注对应标识信息;
将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步,本发明所述的方法,还包括:
确定所述待识别二维码的分辨率是否满足预设图像分辨率,若否,执行根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理的步骤。
进一步,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,包括:
根据自动对焦算法对待识别二维码进行对焦处理,以调节所述待识别二维码的图像分辨率。
进一步,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,包括:
按照所述预设图像分辨率,对待识别二维码进行变焦处理,以调节所述待识别二维码的图像分辨率。
进一步,本发明所述的方法,还包括:
检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;
若是,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;否则,按照插值处理方式调节已采集的待识别二维码像素面积。
进一步,本发明所述的方法,还包括:
若所述二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,检测待识别二维码是否满足预设图像分辨率;
若否,按照插值处理方式调节已采集的待识别二维码像素面积。
根据本发明的第二方面,提供一种二维码定位识别模型建立方法,包括:
基于预设的环境条件,采集对应的采样二维码;
对采样二维码的指定区域标注对应标识信息;
将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步,本发明所述的方法,所述指定区域包括所述采样二维码的角点。
根据本发明的第三方面,提供一种二维码识别装置,包括:
二维码定位模块,用于获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征的定位检测;
调焦处理模块,用于根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
二维码解码模块,用于对调焦处理后的待识别二维码进行解码。
进一步,本发明所述的装置,还包括:
二维码采样模块,用于基于预设的环境条件,采集对应的采样二维码;
信息标识模块,用于对采样二维码的指定区域标注对应标识信息;
模型生成模块,用于将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步,本发明所述的装置,还包括:
分辨率确定模块,用于确定所述待识别二维码的分辨率是否满足预设图像分辨率,若否,执行根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理的步骤。
进一步,调焦处理模块还包括:
对焦调节子模块,用于根据自动对焦算法对待识别二维码进行对焦处理,以调节所述待识别二维码的图像分辨率。
进一步,调焦处理模块还包括:
变焦调节子模块,用于按照所述预设图像分辨率,对待识别二维码进行变焦处理,以调节所述待识别二维码的图像分辨率。
进一步,变焦调节子模块,还用于:
检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;若是,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;否则,按照插值处理方式调节已采集的待识别二维码像素面积。
进一步,变焦调节子模块,还用于:
若所述二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,检测待识别二维码是否满足预设图像分辨率;若否,按 照插值处理方式调节已采集的待识别二维码像素面积。
根据本发明的第四方面,提供一种二维码定位识别模型构建装置,包括:
二维码采样模块,用于基于预设的环境条件,采集对应的采样二维码;
信息标识模块,用于对采样二维码的指定区域标注对应标识信息;
模型生成模块,用于将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步,所述指定区域包括所述采样二维码的角点。
根据本发明的第五方面,提供一种存储介质,所述存储介质存储计算机程序指令,所述计算机程序指令根据本发明所述的方法进行执行。
根据本发明的第六方面,提供一种计算设备,包括:用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述计算设备执行本发明所述的方法。
本发明提供一种二维码识别方法以及装置,通过预先建立的二维码定位识别模型对获取的待识别二维码进行全局特征定位检测,并根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,进而解码。一方面通过预先建立的二维码定位识别模型对获取的待识别二维码进行定位检测可以提高复杂场景下拍摄的模糊二维码的识别准确度,另一方面,通过预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,可自动对模糊二维码进行分辨率调节,大幅提升用户体验。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:
图1为本发明实施例一的二维码识别方法的流程示意图;
图2为本发明实施例二的二维码识别方法的流程示意图;
图3为本发明实施例中二维码标识信息示意图;
图4为本发明实施例三的二维码定位识别模型建立方法的流程示意图;
图5为本发明实施例的二维码识别装置的结构示意图;
图6为本发明实施例的二维码定位识别模型建立装置的结构示意图。
附图中相同或相似的附图标记代表相同或相似的部件。
具体实施方式
下面结合附图对本发明作进一步详细描述。
在本发明一个典型的配置中,终端、服务网络的设备均包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的装置或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
图1为本发明实施例一的二维码识别方法的流程示意图,该二维码识别方法可以应用于手机、pad、支付设备等具有图像采集功能的终端设备,如图1所示,本发明实施例一提供的二维码识别方法,包括步骤S101-步骤S103,其中:
步骤S101,获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行定位检测;
步骤S102,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
步骤S103,对调焦处理后的待识别二维码进行解码。
在步骤S101中,根据应用场景的不同,待识别二维码可以是用于开启车锁、门锁的解锁二维码,也可以是用于消费的收付款二维码,还可以是用于身份识别的二维码等等。二维码定位识别模型为预先对采样二维码及标注的标识信息等输入数据进行训练后建立的,将采集到的待识别二维码输入二维码定位识别模型,通过对待识别二维码的全局特征 进行定位检测,以输出定位后的待识别二维码。
步骤S101中建立的二维码定位识别模型可以由服务器根据输入的各项参数预先建立,建立二维码定位识别模型可以包括:基于预设的环境条件,采集对应的采样二维码;对采样二维码的指定区域标注对应标识信息;将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。具体而言:
根据当前应用场景,设定对应的二维码采样方式,如高速路收费等需要进行远距离扫码支付的场景中,设定的采样方式可以是分别基于与二维码显示设备的不同距离采集对应的多个采样二维码;如停车收费处设于弯道型的停车场出口的场景中,设定的采样方式可以是分别基于与二维码显示设备的不同角度采集对应的多个采样二维码等;另外还可以根据不同光照等条件,或者不同光照与上述距离、角度结合的方式采集采样二维码。该不同距离、不同角度、不同光照可以根据实际应用场景中对二维码采集设备的采集位置等条件测试而定,本发明对此不做限定。对采集的多个采样二维码的指定区域标注对应标识信息。该指定区域是对二维码在图像中的位置具有指示作用的区域,例如是二维码的四个角点,或者是二维码中的位置图形等。之后可以通过人工标注的方式或者自动识别该指定区域并标注的方式在指定区域添加对应的标识信息。将采样二维码及在指定区域添加的标识信息作为深度学习网络的输入数据进行训练,网络收敛后得到二维码定位识别模型,即网络结构及参数。该深度学习网络可以是深度卷积神经网络、Faster R-CNN、YOLO、SSD等。
本发明实施方式以当前应用场景为需要进行远距离扫码支付的场景举例,所设定的采样距离分别是基于与二维码显示设备1m,1.5m,1.8m,2m的不同距离所采集的对应的多个采样二维码,并记录不同距离拍摄的多个采样二维码的对应的分辨率大小;二维码定位识别模型中所标注的指定区域是采样二维码的四个角点,请参考图2所示,对指定区域所标注的标识信息分别是对应各个采样二维码四个角点的左上角、左下角、右上角、右下角。当获取用户在距二维码显示设备1.8m采集的待识别二维码后,确定该待识别二维码的分辨率大小,并查找二维码定位识别模型中分辨率大小与待识别二维码最为匹配的采样二维码,并根据该采样二维码及其标识信息“四个角点的左上角、左下角、右上角、右下角”对该待识别二维码的全局特征进行定位,进而输出定位后的待识别二维码。
在步骤S102中,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
预设图像分辨率可以是满足识别二维码条件的最低标准,也可以是二维码扫描设备在拍摄图像时可以达到的最大分辨率,当然还可以是用户根据需求预设的其他值,本发明在 此不做具体限定。
在停车收费、高速路收费等二维码获取条件较为复杂的场景下,二维码扫描设备采集的待识别二维码可能由于码区域过小导致分辨率较低等原因而不能被有效识别。为提升二维码识别准确性,本发明实施方式中,在对待识别二维码完成定位后,可以根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,调焦处理可以包括对焦和/或变焦处理。具体地,可以根据自动对焦算法对待识别二维码进行对焦处理,以调节所述待识别二维码的图像分辨率。自动对焦算法可以是测距自动对焦、聚焦检测自动对焦等,例如具体可以是聚焦检测自动对焦的对比度检测自动对焦算法等。通过对焦算法对待识别二维码进行对焦后能够使得待识别二维码区域处于最清晰状态,避免因失焦模糊而导致无法解码。
图3为本发明实施例二的二维码识别方法的流程示意图。本发明实施例二的二维码识别方法中,在完成对焦之后,若待识别二维码的分辨率小于预设图像分辨率,按照所述预设图像分辨率,还可以对待识别二维码进一步进行变焦处理,以调节所述待识别二维码的图像分辨率。具体地,包括步骤S1021-步骤S1023,其中:
步骤S1021,检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;若是,执行步骤S1022;否则,执行步骤S1023。
步骤S1022,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;
步骤S1023,按照插值处理方式调节已采集的待识别二维码像素面积。
在步骤S1021-步骤S1023中,对于支持光学变焦的二维码扫描设备,可以优先采用光学变焦方法,控制二维码扫描设备按照预设图像分辨率采集满足预设图像分辨率要求的待识别二维码,或者采集尽可能满足预设图像分辨率要求的待识别二维码,以实现无损放大;对不支持光学变焦的二维码扫描设备,可以采用数码变焦方法,通过二维码扫描设备内的处理器,把待识别二维码的每个象素面积增大,进而将待识别二维码区域尽可能放大到预设图像分辨率大小。
对于支持光学变焦的二维码扫描设备通过超远距采集的待识别二维码,采用光学变焦方法进行分辨率调节后,可能仍不能满足预设图像分辨率要求,因此,若确定二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,可以进一步检测待识别二维码是否满足预设图像分辨率;若不满足,可以再按照插值处理方式调节已采集的待识别二维码像素面积,即,把待识别二维码的每个象素面积增大,进而将待识别二维码区域放大到预设图像分辨率大小。
在步骤S103中,对调焦处理后的待识别二维码进行解码。
对待识别二维码进行调焦处理后,通过识读待识别二维码的符号图像、格式信息、版本信息,消除掩模,根据模块排列规则识读符号字符,恢复信息的数据与纠错码字,进而进行纠错、译码,得出数据字符并输出结果,以完成对待识别二维码的解码。由于对待识别二维码进行调焦处理后,待识别二维码的分辨率已满足或接近预设图像分辨率,因此在对待识别二维码进行解码时可以大幅提升二维码解码的成功率以及识别时间。
图4为本发明实施例三的二维码定位识别模型构建方法的流程示意图。本发明实施例三的二维码定位识别模型构建方法可以应用于服务器,由服务器完成二维码定位识别模型的构建。其中,本发明实施例三的二维码定位识别模型构建方法可以包括:
步骤S401,基于预设的环境条件,采集对应的采样二维码;
步骤S402,对采样二维码的指定区域标注对应标识信息;
步骤S403,将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
在步骤S401中,可以根据当前应用场景,设定对应的二维码采样方式,如高速路收费等需要进行远距离扫码支付的场景中,设定的采样方式可以是分别基于与二维码显示设备的不同距离采集对应的多个采样二维码;如停车收费处设于弯道型的停车场出口的场景中,设定的采样方式可以是分别基于与二维码显示设备的不同角度采集对应的多个采样二维码等;另外还可以根据不同光照等条件,或者不同光照与上述距离、角度结合的方式采集采样二维码。该不同距离、不同角度、不同光照可以根据实际应用场景中对二维码采集设备的采集位置等条件测试而定,本发明对此不做限定。
在步骤S402中,对采集的多个采样二维码的指定区域标注对应标识信息。该指定区域是对二维码在图像中的位置具有指示作用的区域,例如是二维码的至少一个角点,或者是二维码中的位置图形等。之后可以通过人工标注的方式或者自动识别该指定区域并标注的方式在指定区域添加对应的标识信息。
在步骤S403中,将采样二维码及在指定区域添加的标识信息作为深度学习网络的输入数据进行训练,网络收敛后得到二维码定位识别模型,即网络结构及参数。该深度学习网络可以是深度卷积神经网络、Faster R-CNN、YOLO、SSD等。
本发明实施方式以当前应用场景为需要进行远距离扫码支付的场景举例,所设定的采 样距离分别是基于与二维码显示设备1m,1.5m,1.8m,2m的不同距离所采集的对应的多个采样二维码,并记录不同距离拍摄的多个采样二维码的对应的分辨率大小;二维码定位识别模型中所标注的指定区域是采样二维码的四个角点,请参考图3所示,对指定区域所标注的标识信息分别是对应各个采样二维码四个角点的左上角、左下角、右上角、右下角。当获取用户在距二维码显示设备1.8m采集的待识别二维码后,确定该待识别二维码的分辨率大小,并查找二维码定位识别模型中分辨率大小与待识别二维码最为匹配的采样二维码,并根据该采样二维码及其标识信息“四个角点的左上角、左下角、右上角、右下角”对该待识别二维码的全局特征进行定位,进而输出定位后的待识别二维码。最后,将采样二维码及标识信息作为深度学习的输入数据进行训练,以完成二维码定位识别模型的建立。
图5为本发明实施例的二维码识别装置的结构示意图,如图5所示,本发明实施例的二维码识别装置,包括二维码定位模块501、调焦处理模块502以及二维码解码模块503,其中:
二维码定位模块501,用于获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征的定位检测;
调焦处理模块502,用于根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
二维码解码模块503,用于对调焦处理后的待识别二维码进行解码。
进一步地,所述装置还包括:
二维码采样模块,用于基于预设的环境条件,采集对应的采样二维码;
信息标识模块,用于对采样二维码的指定区域标注对应标识信息;
模型生成模块,用于将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步地,所述装置还包括:
分辨率确定模块,用于确定所述待识别二维码的分辨率是否满足预设图像分辨率,若否,执行根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理的步骤。
进一步地,调焦处理模块还包括:
对焦调节子模块,用于根据自动对焦算法对待识别二维码进行对焦处理,以调节 所述待识别二维码的图像分辨率。
进一步地,调焦处理模块还包括:
变焦调节子模块,用于按照所述预设图像分辨率,对待识别二维码进行变焦处理,以调节所述待识别二维码的图像分辨率。
进一步地,变焦调节子模块,还用于:
检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;若是,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;否则,按照插值处理方式调节已采集的待识别二维码像素面积。
进一步地,变焦调节子模块,还用于:
若所述二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,检测待识别二维码是否满足预设图像分辨率;若否,按照插值处理方式调节已采集的待识别二维码像素面积。
本发明实施例图5所示装置为本发明实施例图1、图2所示方法的实现装置,其具体原理与本发明实施例图1、图2所示方法相同,此处不再赘述。
图6为本发明实施例的二维码定位识别模型建立装置的结构示意图,如图5所示,本发明实施例的二维码定位识别模型建立装置,包括二维码采样模块601、信息标识模块602以及模型生成模块603,其中:
二维码采样模块601,用于基于预设的环境条件,采集对应的采样二维码;
信息标识模块602,用于对采样二维码的指定区域标注对应标识信息;
模型生成模块603,用于将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
进一步地,所述指定区域包括所述采样二维码的角点。
本发明实施例图6所示装置为本发明实施例图4所示方法的实现装置,其具体原理与本发明实施例图4所示方法相同,此处不再赘述。本发明实施例还提供一种存储设备,所述存储设备存储计算机程序指令,所述计算机程序指令根据本发明图1、图2、图4所示的方法进行执行。
本发明实施例还提供一种计算设备,包括:用于存储计算机程序指令的存储器和 用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述计算设备执行本发明图1、图2、图4所示的方法。
此外,本发明的一些实施例还提供了一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现前述本发明的多个实施例的方法和/或技术方案。
需要注意的是,本发明可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一些实施例中,本发明的软件程序可以通过处理器执行以实现上文步骤或功能。同样地,本发明的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本发明的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。

Claims (18)

  1. 一种二维码识别方法,其特征在于,所述方法包括:
    获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征定位检测;
    根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
    对调焦处理后的待识别二维码进行解码。
  2. 如权利要求1所述的方法,其特征在于,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理之前,所述方法还包括:
    确定所述待识别二维码的分辨率是否满足预设图像分辨率,若否,执行根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理的步骤。
  3. 如权利要求1所述的方法,其特征在于,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,包括:
    根据自动对焦算法对待识别二维码进行对焦处理,以调节所述待识别二维码的图像分辨率。
  4. 如权利要求1或3所述的方法,其特征在于,根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理,包括:
    按照所述预设图像分辨率,对待识别二维码进行变焦处理,以调节所述待识别二维码的图像分辨率。
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;
    若是,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;否则,按照插值处理方式调节已采集的待识别二维码像素面积。
  6. 如权利要求5所述的方法,其特征在于,所述方法还包括:
    若所述二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,检测待识别二维码是否满足预设图像分辨率;
    若否,按照插值处理方式调节已采集的待识别二维码像素面积。
  7. 一种二维码定位识别模型构建方法,其特征在于,所述方法包括:
    基于预设的环境条件,采集对应的采样二维码;
    对采样二维码的指定区域标注对应标识信息;
    将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
  8. 如权利要求7所述的方法,其特征在于,所述指定区域为所述采样二维码的角点。
  9. 一种二维码识别装置,其特征在于,所述装置包括:
    二维码定位模块,用于获取待识别二维码,通过预先建立的二维码定位识别模型对所述待识别二维码进行全局特征的定位检测;
    调焦处理模块,用于根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理;
    二维码解码模块,用于对调焦处理后的待识别二维码进行解码。
  10. 如权利要求9所述的装置,其特征在于,所述装置还包括:
    分辨率确定模块,用于确定所述待识别二维码的分辨率是否满足预设图像分辨率,若否,执行根据预设图像分辨率对完成定位检测的待识别二维码进行调焦处理的步骤。
  11. 如权利要求9所述的装置,其特征在于,调焦处理模块还包括:
    对焦调节子模块,用于根据自动对焦算法对待识别二维码进行对焦处理,以调节所述待识别二维码的图像分辨率。
  12. 如权利要求9或11所述的装置,其特征在于,调焦处理模块还包括:
    变焦调节子模块,用于按照所述预设图像分辨率,对待识别二维码进行变焦处理,以调节所述待识别二维码的图像分辨率。
  13. 如权利要求12所述的装置,其特征在于,变焦调节子模块,还用于:
    检测采集所述待识别二维码的二维码扫描设备是否具有光学变焦功能;若是,控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码;否则,按照插值处理方式调节已采集的待识别二维码像素面积。
  14. 如权利要求13所述的装置,其特征在于,变焦调节子模块,还用于:
    若所述二维码扫描设备具有光学变焦功能,在控制所述二维码扫描设备按照预设图像分辨率采集所述待识别二维码后,检测待识别二维码是否满足预设图像分辨率;若否,按照插值处理方式调节已采集的待识别二维码像素面积。
  15. 一种二维码定位识别模型构建装置,其特征在于,所述装置还包括:
    二维码采样模块,用于基于预设的环境条件,采集对应的采样二维码;
    信息标识模块,用于对采样二维码的指定区域标注对应标识信息;
    模型生成模块,用于将采样二维码及标识信息作为深度学习的输入数据进行训练,以得到二维码定位识别模型。
  16. 如权利要求15所述的装置,其特征在于,所述指定区域为所述采样二维码的角点。
  17. 一种存储介质,其特征在于,所述存储介质存储计算机程序指令,所述计算机程序指令根据权利要求1至7中任一项所述的方法进行执行。
  18. 一种计算设备,其特征在于,包括:用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述计算设备执行权利要求1至7中任一项所述的方法。
PCT/CN2020/071156 2019-05-31 2020-01-09 二维码识别方法、二维码定位识别模型建立方法及其装置 WO2020238239A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/809,256 US10956696B2 (en) 2019-05-31 2020-03-04 Two-dimensional code identification and positioning
US17/208,448 US11216629B2 (en) 2019-05-31 2021-03-22 Two-dimensional code identification and positioning

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910470176.6 2019-05-31
CN201910470176.6A CN110378165B (zh) 2019-05-31 2019-05-31 二维码识别方法、二维码定位识别模型建立方法及其装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/809,256 Continuation US10956696B2 (en) 2019-05-31 2020-03-04 Two-dimensional code identification and positioning

Publications (1)

Publication Number Publication Date
WO2020238239A1 true WO2020238239A1 (zh) 2020-12-03

Family

ID=68249587

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/071156 WO2020238239A1 (zh) 2019-05-31 2020-01-09 二维码识别方法、二维码定位识别模型建立方法及其装置

Country Status (2)

Country Link
CN (2) CN110378165B (zh)
WO (1) WO2020238239A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114021596A (zh) * 2021-09-22 2022-02-08 厦门华联电子股份有限公司 一种基于深度学习的条码识别方法及装置
CN114021595A (zh) * 2021-09-22 2022-02-08 厦门华联电子股份有限公司 一种二维码识别方法及装置
CN114754810A (zh) * 2021-01-08 2022-07-15 中国石油天然气集团有限公司 获取防腐补口数据的系统
CN114862427A (zh) * 2022-07-06 2022-08-05 一物一码数据(广州)实业有限公司 基于二维码的质量检测跟踪的方法
CN115086381A (zh) * 2022-07-25 2022-09-20 东集技术股份有限公司 标签数据采集方法、装置、采集设备及标签数据采集系统
CN116882433A (zh) * 2023-09-07 2023-10-13 无锡维凯科技有限公司 一种基于机器视觉的扫码识别方法和系统

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10956696B2 (en) 2019-05-31 2021-03-23 Advanced New Technologies Co., Ltd. Two-dimensional code identification and positioning
CN110378165B (zh) * 2019-05-31 2022-06-24 创新先进技术有限公司 二维码识别方法、二维码定位识别模型建立方法及其装置
CN111008540B (zh) * 2019-11-29 2021-10-22 联想(北京)有限公司 一种条码识别方法及设备、计算机存储介质
CN113496133B (zh) * 2020-04-07 2024-03-29 深圳爱根斯通科技有限公司 二维码识别方法、装置、电子设备及存储介质
CN111860027B (zh) * 2020-06-11 2024-06-18 贝壳技术有限公司 二维码的识别方法及装置
CN111767754B (zh) * 2020-06-30 2024-05-07 创新奇智(北京)科技有限公司 一种识别码的识别方法、装置、电子设备及存储介质
CN112417918B (zh) * 2020-11-13 2022-03-18 珠海格力电器股份有限公司 二维码识别方法、装置、存储介质及电子设备
CN112464687A (zh) * 2020-11-19 2021-03-09 苏州摩比信通智能系统有限公司 图形码处理方法、装置以及终端设备
CN113919382B (zh) * 2021-04-29 2023-04-28 荣耀终端有限公司 一种扫码的方法及装置
CN115706854A (zh) * 2021-08-06 2023-02-17 北京小米移动软件有限公司 足式机器人的相机控制方法、装置及足式机器人
CN116451720A (zh) * 2023-06-09 2023-07-18 陕西西煤云商信息科技有限公司 一种仓储物资扫描识别方法及其识别系统
CN117576617B (zh) * 2024-01-16 2024-04-16 杭州长河智信科技有限公司 一种基于不同环境自动调节的解码系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1870835A2 (en) * 2006-06-21 2007-12-26 NAMCO BANDAI Games Inc. Two-dimensional code generation method, two-dimensional code, two-dimensional code recognition method, and image recognition device
CN102244737A (zh) * 2008-03-28 2011-11-16 三洋电机株式会社 摄像装置
CN107220577A (zh) * 2017-05-12 2017-09-29 广州智慧城市发展研究院 一种基于机器学习的二维码定位方法及系统
CN108596003A (zh) * 2018-04-11 2018-09-28 中山大学 一种基于机器学习的污损二维码修复方法及系统
CN109564651A (zh) * 2016-05-19 2019-04-02 思比机器人公司 用于自动生成将产品分配到商店内的货架结构的货架图的方法
CN109815765A (zh) * 2019-01-21 2019-05-28 东南大学 一种提取含有二维码的营业执照信息的方法及装置
CN110378165A (zh) * 2019-05-31 2019-10-25 阿里巴巴集团控股有限公司 二维码识别方法、二维码定位识别模型建立方法及其装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056027A (zh) * 2016-05-25 2016-10-26 努比亚技术有限公司 一种实现远距离扫描二维码的终端、系统和方法
CN107358135B (zh) * 2017-08-28 2020-11-27 北京奇艺世纪科技有限公司 一种二维码扫码方法及装置
CN108629220A (zh) * 2018-03-23 2018-10-09 阿里巴巴集团控股有限公司 一种二维码识读方法、装置及设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1870835A2 (en) * 2006-06-21 2007-12-26 NAMCO BANDAI Games Inc. Two-dimensional code generation method, two-dimensional code, two-dimensional code recognition method, and image recognition device
CN102244737A (zh) * 2008-03-28 2011-11-16 三洋电机株式会社 摄像装置
CN109564651A (zh) * 2016-05-19 2019-04-02 思比机器人公司 用于自动生成将产品分配到商店内的货架结构的货架图的方法
CN107220577A (zh) * 2017-05-12 2017-09-29 广州智慧城市发展研究院 一种基于机器学习的二维码定位方法及系统
CN108596003A (zh) * 2018-04-11 2018-09-28 中山大学 一种基于机器学习的污损二维码修复方法及系统
CN109815765A (zh) * 2019-01-21 2019-05-28 东南大学 一种提取含有二维码的营业执照信息的方法及装置
CN110378165A (zh) * 2019-05-31 2019-10-25 阿里巴巴集团控股有限公司 二维码识别方法、二维码定位识别模型建立方法及其装置

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114754810A (zh) * 2021-01-08 2022-07-15 中国石油天然气集团有限公司 获取防腐补口数据的系统
CN114021596A (zh) * 2021-09-22 2022-02-08 厦门华联电子股份有限公司 一种基于深度学习的条码识别方法及装置
CN114021595A (zh) * 2021-09-22 2022-02-08 厦门华联电子股份有限公司 一种二维码识别方法及装置
CN114862427A (zh) * 2022-07-06 2022-08-05 一物一码数据(广州)实业有限公司 基于二维码的质量检测跟踪的方法
CN114862427B (zh) * 2022-07-06 2022-11-22 一物一码数据(广州)实业有限公司 基于二维码的质量检测跟踪的方法
CN115086381A (zh) * 2022-07-25 2022-09-20 东集技术股份有限公司 标签数据采集方法、装置、采集设备及标签数据采集系统
CN115086381B (zh) * 2022-07-25 2022-11-11 东集技术股份有限公司 标签数据采集方法、装置、采集设备及标签数据采集系统
CN116882433A (zh) * 2023-09-07 2023-10-13 无锡维凯科技有限公司 一种基于机器视觉的扫码识别方法和系统
CN116882433B (zh) * 2023-09-07 2023-12-08 无锡维凯科技有限公司 一种基于机器视觉的扫码识别方法和系统

Also Published As

Publication number Publication date
CN110378165B (zh) 2022-06-24
CN110378165A (zh) 2019-10-25
CN115456002A (zh) 2022-12-09

Similar Documents

Publication Publication Date Title
WO2020238239A1 (zh) 二维码识别方法、二维码定位识别模型建立方法及其装置
US11216629B2 (en) Two-dimensional code identification and positioning
CN110827247B (zh) 一种识别标签的方法及设备
TW202011733A (zh) 對影像進行目標取樣的方法及裝置
CN108875731B (zh) 目标识别方法、装置、系统及存储介质
WO2021031954A1 (zh) 对象数量确定方法、装置、存储介质与电子设备
CN110688902B (zh) 一种检测停车位内车辆区域的方法及装置
WO2018059365A1 (zh) 图形码处理方法及装置、存储介质
TW201447775A (zh) 資訊識別方法、設備和系統
KR20140090078A (ko) 이미지 처리 방법 및 그 방법을 처리하는 전자 장치
CN110659658A (zh) 一种目标检测方法及其装置
JP2016212784A (ja) 画像処理装置、画像処理方法
WO2022002262A1 (zh) 基于计算机视觉的字符序列识别方法、装置、设备和介质
CN111507332A (zh) 车辆vin码检测方法与设备
WO2016184152A1 (zh) 一种测量方法、装置、移动终端及存储介质
CN112749694B (zh) 用于识别图像方向、识别铭牌文字的方法及装置
CN109523573A (zh) 目标对象的跟踪方法和装置
CN111929688B (zh) 一种用于确定雷达回波预测帧序列的方法与设备
CN109934185B (zh) 数据处理方法及装置、介质和计算设备
CN112215036B (zh) 跨镜追踪方法、装置、设备及存储介质
CN111951328A (zh) 一种物体位置检测方法、装置、设备和存储介质
CN115546221A (zh) 一种钢筋计数方法、装置、设备及存储介质
CN110849380A (zh) 一种基于协同vslam的地图对齐方法及系统
CN110827194A (zh) 图像处理的方法、装置及计算机存储介质
CN113762017B (zh) 一种动作识别方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20814875

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20814875

Country of ref document: EP

Kind code of ref document: A1