CN102693409B - Method for quickly identifying two-dimension code system type in images - Google Patents

Method for quickly identifying two-dimension code system type in images Download PDF

Info

Publication number
CN102693409B
CN102693409B CN201210156118.4A CN201210156118A CN102693409B CN 102693409 B CN102693409 B CN 102693409B CN 201210156118 A CN201210156118 A CN 201210156118A CN 102693409 B CN102693409 B CN 102693409B
Authority
CN
China
Prior art keywords
image
quick response
response code
code
sample
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
CN201210156118.4A
Other languages
Chinese (zh)
Other versions
CN102693409A (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.)
Sichuan University
Original Assignee
Sichuan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan University filed Critical Sichuan University
Priority to CN201210156118.4A priority Critical patent/CN102693409B/en
Publication of CN102693409A publication Critical patent/CN102693409A/en
Application granted granted Critical
Publication of CN102693409B publication Critical patent/CN102693409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for quickly identifying two-dimension code system type in images, comprising a learning training process and a classification identifying process. The learning training process is as follows: collecting and building a sample image set of various two-dimension code images; converting each sample image into a grey image, performing Gaussian smoothing filtering and binaryzation to obtain binaryzation images; scanning prospect boundaries of the binaryzation images in the horizontal and vertical directions, obtaining an outer boundary point set of the two-dimension code; enabling the two-dimension code to be horizontal by rotating images, achieving horizontal correction of the two-dimension code; performing partitioning, combining and normalizing for the two-dimension code; performing fast wavelet transform for the normalized sample image to obtain a wavelet characteristic sample set. The classification identifying process is as follows: extracting wavelet characteristic of the to-be-identified image to build a distance measurement model; using the K nearest neighbor algorithm to identify code system type. The method is convenient and quick, has real-time performance, accuracy and high identification rate.

Description

Quick Response Code code system kind identification method in a kind of image fast
Technical field
?the invention belongs to Digital Image Processing, computer vision and mode identification method, particularly relate to the method for quickly identifying of code system type in image in 2 D code.
Background technology
?two-dimensional bar code (2-dimensional bar code) refers to that on the basis of bar code, expanding another dimension has readable bar code.The width of bar code is being recorded data, and its length is not recorded data.The length of two-dimensional bar code, width are all being recorded data." anchor point " and " fault tolerant mechanism " that two-dimensional bar code has bar code not have.Fault tolerant mechanism is even without recognizing whole bar codes or saying that bar code has when stained, the information that also can correctly reduce in bar code.At present, occurred the two-dimensional bar code of numerous species, wherein more conventional code system has: Data Matrix, QR Code, PDF417 etc.The characteristics such as two-dimensional bar code has that storage capacity is large, confidentiality is high, traceability is high, anti-damage is strong, redundant is large, cost is cheap, these characteristics are specially adapted to the aspects such as list, safe and secret, tracking, license, stock taking, data redundant.
?by mobile phone or camera camera, taking the image that comprises Quick Response Code, utilize digital image processing techniques to identify, is the domestic and international main direction of studying to two-dimensional bar code.Owing to there being at present multiple Quick Response Code code system, before carrying out Quick Response Code identification decoding, first to identify code system, then could be according to the processing of decoding of code system rule.Common processing mode is according to various code system rules, the view finding figure of Quick Response Code in scan image one by one, according to the Search Results of view finding figure, determine code system type, as the parametric technique providing in GB < < quick response matrix code QR Code > > is, in entire image, search for the view finding figure of QR code, the feature of QR code view finding figure is that the ratio of the suitable width of each element is 1:1:3:1:1, in horizontal and vertical direction, survey, find out three such view finding figures, determine it for QR code.When code system type is more, the efficiency of carrying out one by one match search is lower, and in addition, this method is had relatively high expectations to image resolution ratio, has reduced the bulk velocity that Quick Response Code is processed.
?the key link of image object recognition technology is feature extraction and target classification.Feature extraction can adopt several different methods, common are contour feature, Fourier descriptor, wavelet character etc.Wherein contour feature and Fourier descriptor have only been considered the image information of object boundary, very responsive to noise, affect discrimination.Wavelet character is that template image is transformed to the recognition feature in wavelet field, can be when keeping object space relation, and the frequency structure information in Description Image, compares with the feature based on boundary information, has good adaptability.After having extracted target signature, will classify to feature, to pick out the pattern class of target.Common classifying identification method comprises, K nearest neighbor method, support vector machine and neural network etc.Wherein, support vector machine can solve small sample, non-linearity and higher-dimension pattern recognition problem preferably, but method is comparatively complicated, and calculated amount is large.Neural network is the behavior of simulated animal neural network, by adjusting the relevant connection relation between inner a large amount of neurode, reach the object of information processing, can solve a lot of nonlinear problems, but it has the theoretical question that much there is no solution, makes to exist in actual applications a lot of difficulties.K arest neighbors (k-Nearest Neighbor, KNN) algorithm is K the point finding in hyperspace with unknown sample arest neighbors, and judge the class of unknown sample according to the classification of this K point, because K nearest neighbor method theory is ripe and it is simple to use, be therefore widely used in pattern classification problem.
Summary of the invention
?the object of this invention is to provide Quick Response Code code system recognition methods in a kind of image fast, can be used as the pre-treatment step of Quick Response Code identification decoding, the whole efficiency of processing to improve image in 2 D code.
?the object of the present invention is achieved like this: Quick Response Code code system recognition methods in a kind of image fast, mainly comprises two processes, i.e. learning training process and Classification and Identification process.
?learning training process comprises the following steps:
1.1) by gathering the image in 2 D code of all kinds, various version, set up the sample graph image set for learning training;
1.2) for each sample image, convert thereof into after gray level image, carry out Gaussian smoothing filtering, remove the noise in image, then according to the intensity profile information of image, adopt maximum between-cluster variance method to carry out binary conversion treatment, in the bianry image obtaining, the black module of Quick Response Code is prospect, and remainder is background;
1.3) scan in the horizontal and vertical directions respectively the prospect border of binary image, obtain the outer boundary point set of Quick Response Code, the minimum that adopts the rotation method that gets stuck to calculate point set covers rectangle, according to minimum, cover the orientation angles of rectangle, image rotating so that Quick Response Code in horizontality, thereby realize the rectification of Quick Response Code;
1.4), for the image after rectification, the postrotational minimum covering rectangle of take is border, extracts the image-region of Quick Response Code.The corner part of considering Quick Response Code has comprised the feature that major part has distinguishing property, piecemeal is carried out to according to certain scale-up factor in Quick Response Code region, choose the wherein piecemeal in corner part, be combined into new sample image, and it is normalized, obtain normalization sample image;
1.5) each normalized sample image is carried out to fast wavelet transform, will obtain wavelet conversion coefficient as feature, and then set up the wavelet character sample set for follow-up classification;
Classification and Identification process comprises the following steps:
2.1) to image in 2 D code to be identified, according to step 1.2) to step 1.5) mode extract the wavelet character of image;
2.2) set up the distance metric model based on feature distribution weighting; Feature to be identified and sample characteristics are carried out to pointwise to be mated, and using the weighted sum of mating a little the distance between feature, wherein the set-up mode of weight is, in the point of different spatial, given different weights, point weight the closer to regional center is lower, higher the closer to the some weight at Quick Response Code edge;
2.3) adopt K arest neighbors sorting algorithm to carry out code system type identification, according to step 2.2) the middle distance metric model defining, K the feature samples that chosen distance is nearest, the code system type that these sample great majority belong to is the type of image to be identified.
?beneficial effect of the present invention mainly contains following 2 points:
1, technical scheme provided by the invention is simple and efficient, and by extracting in Quick Response Code tool, distinguishes the characteristic area of property, realizes higher discrimination, can take into account real-time and the accuracy of processing;
2, recognition methods has only utilized the characteristics of image of Quick Response Code, need not consider concrete code system rule, has good general applicability, can identify common Quick Response Code type at present, and the profile that only requires Quick Response Code is rectangle.
?the present invention is based on the target identification technology of image, by extracting the characteristics of image in Quick Response Code with the property distinguished, application model recognition methods, classifies and identification to Quick Response Code code system, can greatly improve code system recognition efficiency.
Accompanying drawing explanation
?fig. 1 is the system schematic block diagram of the method for the invention.
?fig. 2 is that the inventive method is estimating that the minimum in Quick Response Code region covers the schematic diagram of rectangle (one of top is former figure, and the left next one is border point set, and the minimum that the right next one is estimation covers rectangle).
?fig. 3 is that the inventive method is being chosen the schematic diagram of image block.
Embodiment
?below in conjunction with accompanying drawing, specifically describe embodiments of the present invention.
?with reference to Fig. 1, specifically introduce the method step of identifying Quick Response Code code system type in image, whole processing procedure is divided into learning training and Classification and Identification, and wherein the step of learning training process is as follows:
Step 1: read the training image that includes Quick Response Code, convert it into the gray level image of 256 grades, the core that then adopts Gaussian function to generate carries out filtering, to remove the noise existing in image.According to the intensity profile information of image, adopt large Tianjin method (being maximum between-cluster variance method) to carry out binary conversion treatment, making the black module in Quick Response Code is display foreground, image remainder is background;
Step 2: in the horizontal direction, respectively from left to right, the outer boundary of progressive scanning picture prospect from right to left, obtain the outer boundary point of image vertical direction.Equally, in vertical direction, scan by column from the top down, from bottom to top respectively the outer boundary of display foreground, obtain the outer boundary point of image level direction.According to the outer boundary point set obtaining, as shown in lower-left figure in Fig. 2, the convex closure that calculating consists of these points heel is put is right, and then obtains the minimum covering rectangle of this point set, and the white rectangle as shown in bottom-right graph in Fig. 2, using this rectangular area as Quick Response Code region;
Step 3: cover according to the minimum obtaining the anglec of rotation that rectangle is determined Quick Response Code, make Quick Response Code in horizontality by image rotating.Extract image in 2 D code region, piecemeal is carried out in this region, the range of size of piecemeal is set to 5 ~ 7 times of Quick Response Code basic module.The most representative view finding figure and the auxiliary positioning function figure of being characterized as in image in 2 D code, these figures are mainly distributed in the fringe region of Quick Response Code, therefore, the keep to the side image block in region of selection, as shown in the white rectangle piece in Fig. 3, according to sequence of positions, be combined as new sample image, reduce the redundant information of image, realization character dimensionality reduction;
Step 4: sample image is normalized, and in order to guarantee that image has certain identifiability, the image resolution ratio after normalization is set to 180 * 180 pixels; Utilize fast wavelet transform algorithm, normalized sample image is converted into wavelet field, wavelet conversion coefficient is as the feature templates of follow-up classification.For the Quick Response Code of every type, the image that gathers various version totally 100 width, then according to step 1 to step 4, obtain the feature templates of each sample, thereby set up feature samples collection.
?the step of Classification and Identification process is as follows:
Step 1: to image in 2 D code to be identified, according to the disposal route of sample image, obtain the wavelet character of this image;
Step 2: set up the distance metric model based on feature distribution weighting, for measuring two similarities between wavelet character.Because the representative feature of Quick Response Code is near image border, therefore, when characteristic matching, give the different weight of characteristic allocation in different spatial, higher the closer to the weight of the characteristic allocation of image border part.The weight calculation of feature is that this point is to Euclidean distance of picture centre, weight be normalized between 0 and 1(be greater than zero-sum and be less than or equal to 1) between a numerical value.Feature to be identified is mated with sample characteristics pointwise, and the weighted sum of mating is a little as the distance between feature;
Step 3: according to the distance model of step 2 definition, calculate the wavelet character of image to be identified and the distance between training set feature samples, select wherein nearest K neighbours (getting K=10), then according to the code system type under this K neighbour, that type of selecting same type to count maximum is recognition result.

Claims (4)

1. a Quick Response Code code system kind identification method in image fast, is characterized in that, method comprises two processing procedures, i.e. learning training process and Classification and Identification process, and the performing step of two processing procedures is as follows:
The treatment step of learning training process is:
1.1) by gathering the image in 2 D code of all kinds, various version, set up the sample graph image set for learning training;
1.2) for each sample image, convert thereof into after gray level image, carry out Gaussian smoothing filtering, remove the noise in image, then according to the intensity profile information of image, adopt maximum between-cluster variance method to carry out binary conversion treatment, in the binary image obtaining, the black module of Quick Response Code is prospect, and remainder is background;
1.3) scan in the horizontal and vertical directions respectively the prospect border of binary image, obtain the outer boundary point set of Quick Response Code, the minimum that adopts the rotation method that gets stuck to calculate point set covers rectangle, according to minimum, cover the orientation angles of rectangle, image rotating so that Quick Response Code in horizontality, thereby realize the rectification of Quick Response Code;
1.4), for the image after rectification, the postrotational minimum covering rectangle of take is border, extracts the image-region of Quick Response Code; The corner part of considering Quick Response Code has comprised the feature that major part has distinguishing property, piecemeal is carried out to according to certain scale-up factor in Quick Response Code region, choose the wherein piecemeal in corner part, be combined into new sample image, and it is normalized, obtain normalization sample image;
1.5) each normalization sample image is carried out to fast wavelet transform, using the wavelet conversion coefficient obtaining as wavelet character, and then set up the wavelet character sample set for follow-up classification;
The treatment step of Classification and Identification process is:
2.1) to image in 2 D code to be identified, according to step 1.2) to step 1.5) mode extract the wavelet character of image;
2.2) set up the distance metric model based on feature distribution weighting; Feature to be identified and sample characteristics are carried out to pointwise to be mated, and using the weighted sum of mating a little the distance between feature, wherein the set-up mode of weight is, in the point of different spatial, given different weights, point weight the closer to regional center is lower, higher the closer to the some weight at Quick Response Code edge;
2.3) adopt K arest neighbors sorting algorithm to carry out code system type identification, according to step 2.2) the middle distance metric model defining, K the feature samples that chosen distance is nearest, the code system type that these sample great majority belong to is the type of image to be identified.
2. Quick Response Code code system kind identification method in a kind of image fast according to claim 1, it is characterized in that, described step 2.2) in, the weight calculation of feature arrives Euclidean distance of picture centre for this point, and weight is normalized into a numerical value between 0 and 1 and is greater than zero-sum and is less than or equal to 1.
3. Quick Response Code code system kind identification method in a kind of image fast according to claim 1 and 2, is characterized in that described step 2.3) in K be 10.
4. Quick Response Code code system kind identification method in a kind of image fast according to claim 3, is characterized in that, the profile of described Quick Response Code is rectangle.
CN201210156118.4A 2012-05-18 2012-05-18 Method for quickly identifying two-dimension code system type in images Active CN102693409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210156118.4A CN102693409B (en) 2012-05-18 2012-05-18 Method for quickly identifying two-dimension code system type in images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210156118.4A CN102693409B (en) 2012-05-18 2012-05-18 Method for quickly identifying two-dimension code system type in images

Publications (2)

Publication Number Publication Date
CN102693409A CN102693409A (en) 2012-09-26
CN102693409B true CN102693409B (en) 2014-04-09

Family

ID=46858828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210156118.4A Active CN102693409B (en) 2012-05-18 2012-05-18 Method for quickly identifying two-dimension code system type in images

Country Status (1)

Country Link
CN (1) CN102693409B (en)

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294783B (en) * 2013-05-16 2016-08-03 广州唯品会信息科技有限公司 Product picture group technology and device
US9191108B2 (en) 2013-07-16 2015-11-17 Intel Corporation Techniques for low power visual light communication
CN103412906B (en) * 2013-08-01 2017-06-20 百度在线网络技术(北京)有限公司 Information transferring method and system
EP3157410B1 (en) * 2014-06-20 2020-05-06 Rambus Inc. System for lensed and lensless optical sensing
WO2016037300A1 (en) * 2014-09-10 2016-03-17 Xiaoou Tang Method and system for multi-class object detection
CN104298953A (en) * 2014-10-27 2015-01-21 苏州睿新捷信息科技有限公司 Method and system for recognizing barcodes in batches
CN104363400A (en) * 2014-10-29 2015-02-18 广东欧珀移动通信有限公司 Method and device for scanning local two-dimensional codes
CN105809094A (en) * 2014-12-31 2016-07-27 研祥智能科技股份有限公司 Bar code identification method based on machine vision
CN104899589B (en) * 2015-05-12 2018-10-12 广州中大数码科技有限公司 It is a kind of that the pretreated method of two-dimensional bar code is realized using threshold binarization algorithm
CN105262991B (en) * 2015-10-12 2018-09-11 国家电网公司 A kind of substation equipment object identifying method based on Quick Response Code
CN105260693B (en) * 2015-12-01 2017-12-08 浙江工业大学 A kind of laser two-dimensional code localization method
CN105868676A (en) * 2016-06-13 2016-08-17 郝迎喜 Improved two-dimension code region positioning system and positioning method thereof
CN106127093A (en) * 2016-06-17 2016-11-16 广州中大微电子有限公司 A kind of Quick Response Code identification chip and its implementation
CN107665324B (en) * 2016-07-27 2020-08-28 腾讯科技(深圳)有限公司 Image identification method and terminal
CN107273777A (en) * 2017-04-26 2017-10-20 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of Quick Response Code identification of code type method matched based on slide unit
CN107220577A (en) * 2017-05-12 2017-09-29 广州智慧城市发展研究院 A kind of Quick Response Code localization method and system based on machine learning
CN107545259A (en) * 2017-08-31 2018-01-05 华南理工大学 A kind of Quick Response Code reconstructing method based on Da-Jin algorithm
CN108846664A (en) * 2018-06-26 2018-11-20 刘晓英 Mobile phone scan code system based on image procossing
CN109214225A (en) * 2018-07-04 2019-01-15 青岛海信移动通信技术股份有限公司 A kind of scan method, device, mobile terminal and the storage medium of figure bar code
CN110874542A (en) * 2018-08-31 2020-03-10 北京意锐新创科技有限公司 Method and device suitable for reading bar codes displayed by different carriers
CN110874540A (en) * 2018-08-31 2020-03-10 北京意锐新创科技有限公司 Method and device for reading bar code at all angles
CN109359497A (en) * 2018-09-17 2019-02-19 四川长虹电器股份有限公司 A kind of positioning and recognition methods in VAT invoice two-dimensional image code region
CN110147864B (en) * 2018-11-14 2022-02-22 腾讯科技(深圳)有限公司 Method and device for processing coding pattern, storage medium and electronic device
CN109739233B (en) * 2018-12-29 2022-06-14 歌尔光学科技有限公司 AGV trolley positioning method, device and system
CN109800616A (en) * 2019-01-17 2019-05-24 柳州康云互联科技有限公司 A kind of two dimensional code positioning identification system based on characteristics of image
CN111507119B (en) * 2019-01-31 2024-02-06 北京骑胜科技有限公司 Identification code recognition method, identification code recognition device, electronic equipment and computer readable storage medium
CN110991201B (en) * 2019-11-25 2023-04-18 浙江大华技术股份有限公司 Bar code detection method and related device
CN114818765A (en) * 2020-04-03 2022-07-29 支付宝(杭州)信息技术有限公司 Identification method and device
CN112766012B (en) * 2021-02-05 2021-12-17 腾讯科技(深圳)有限公司 Two-dimensional code image recognition method and device, electronic equipment and storage medium
CN112560538B (en) * 2021-02-26 2021-05-11 江苏东大集成电路系统工程技术有限公司 Method for quickly positioning damaged QR (quick response) code according to image redundant information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480627B1 (en) * 1999-06-29 2002-11-12 Koninklijke Philips Electronics N.V. Image classification using evolved parameters
CN102236788A (en) * 2010-04-20 2011-11-09 荣科科技股份有限公司 Kilowatt-hour meter image automatic identification method
CN102254144A (en) * 2011-07-12 2011-11-23 四川大学 Robust method for extracting two-dimensional code area in image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480627B1 (en) * 1999-06-29 2002-11-12 Koninklijke Philips Electronics N.V. Image classification using evolved parameters
CN102236788A (en) * 2010-04-20 2011-11-09 荣科科技股份有限公司 Kilowatt-hour meter image automatic identification method
CN102254144A (en) * 2011-07-12 2011-11-23 四川大学 Robust method for extracting two-dimensional code area in image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
叶龙欢.复杂背景下的票据字符分割方法.《计算机应用》.2012,第32卷(第11期),3198-3120,3125.
复杂背景下的票据字符分割方法;叶龙欢;《计算机应用》;20121101;第32卷(第11期);3198-3120,3125 *

Also Published As

Publication number Publication date
CN102693409A (en) 2012-09-26

Similar Documents

Publication Publication Date Title
CN102693409B (en) Method for quickly identifying two-dimension code system type in images
Vu et al. Masked face recognition with convolutional neural networks and local binary patterns
CN105956582B (en) A kind of face identification system based on three-dimensional data
Raghavendra et al. Scaling-robust fingerprint verification with smartphone camera in real-life scenarios
Zhou et al. Histograms of categorized shapes for 3D ear detection
Yao et al. Traffic sign recognition using HOG-SVM and grid search
Pan et al. Palmprint recognition using Gabor-based local invariant features
CN102254188B (en) Palmprint recognizing method and device
CN109711416B (en) Target identification method and device, computer equipment and storage medium
CN109325507B (en) Image classification method and system combining super-pixel saliency features and HOG features
CN106203539B (en) Method and device for identifying container number
CN104680550A (en) Method for detecting defect on surface of bearing by image feature points
CN105550641B (en) Age estimation method and system based on multi-scale linear differential texture features
CN102542243A (en) LBP (Local Binary Pattern) image and block encoding-based iris feature extracting method
CN104217203A (en) Complex background card face information identification method and system
CN104751093A (en) Method and device for acquiring image identification code displayed by host equipment
CN108509861B (en) Target tracking method and device based on combination of sample learning and target detection
CN102842133B (en) A kind of method for describing local characteristic
CN108961262A (en) A kind of Bar code positioning method under complex scene
Guo et al. Image classification based on SURF and KNN
CN115238723A (en) Local vertex detection method and device
Bhatt et al. A framework for quality-based biometric classifier selection
Tribak et al. QR code patterns localization based on Hu Invariant Moments
Mihreteab et al. Crow birds detection using HOG and CS-LBP
Tong et al. QR code detection based on local features

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant