CN103593653A - Character two-dimensional bar code recognition method based on scanning gun - Google Patents

Character two-dimensional bar code recognition method based on scanning gun Download PDF

Info

Publication number
CN103593653A
CN103593653A CN201310536024.4A CN201310536024A CN103593653A CN 103593653 A CN103593653 A CN 103593653A CN 201310536024 A CN201310536024 A CN 201310536024A CN 103593653 A CN103593653 A CN 103593653A
Authority
CN
China
Prior art keywords
character
bar code
scanner
feature
recognition method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310536024.4A
Other languages
Chinese (zh)
Inventor
刘志
姜帆
叶胜程
潘翔
郑河荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201310536024.4A priority Critical patent/CN103593653A/en
Publication of CN103593653A publication Critical patent/CN103593653A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

A character two-dimensional bar code recognition method based on a scanning gun includes the steps of obtaining a gray level image from the scanning gun, conducting positioning on a solid circle locator in the gray level image, extracting a character area through a distortion correction and bilinear interpolation method; conducting binarization processing and denoising on the character area, conducting transverse and longitudinal histogram normalization on the character area, then, conducting secondary smoothing, determining segment lines through crests and troughs, then conducting resegmentation on characters obtained through segmentation, accurately obtaining the character area, conducting normalization processing on the characters to form a 20*30 dot matrix, extracting character characteristics, and conducting recognition through characteristic matching. The character two-dimensional bar code recognition method is mainly characterized in that rapid recognition of a character two-dimensional bar code is achieved on the basis of the scanning gun and under limitation of limited internal storage and time.

Description

Character two-dimension bar code recognition method based on scanner
Technical field
The present invention relates to a kind of two-dimension bar code recognition method, the method is the character barcode identification based on scanner.
Background technology
At present, one of mobile value-added service is to carry out transmission of graphical two-dimensional bar code (being mainly Data Matrix and QR code) by sending multimedia message, this has certain requirement to user's mobile terminal and communication network, need mobile terminal device to support figure to show, this has limited the application of electronic ticket to a certain extent.
For this situation, the two-dimensional bar code of more existing text-orienteds comes out gradually.But these character two-dimensional bar codes are also in the trial stage at present, and recognition technology is also in constantly exploring.
At present, because character two-dimensional bar code does not also have unified standard, the coded character set of existing these character barcodes is different, and bar-code structure is also different, and the symbolism character that the concrete form of expression is bar code and Bar code positioning symbol select each variant.The present invention is on traditional figure two-dimensional bar code coding basis, the character two-dimensional bar code of a kind of applicable mobile terminal note transmission has been proposed, this character two-dimensional bar code adopts the matrix form character two-dimensional bar code of 8 kinds of capitalization English letters and three circular finger URL composition similar pattern bar codes, barcode size is also designed to meet the dimensions that mobile terminal receives, this character two-dimensional bar code can be with the form of text by short message channel but not multimedia message channel transfer to user's mobile terminal, this novel character two-dimensional bar code has solved traditional figure two-dimensional bar code and the incompatible phenomenon of mobile terminal.Character two-dimensional bar code is different from the figure two-dimensional bar code by multimedia message passage, can cover all cellphone subscribers, avoids using the existence of blind area.This character two-dimensional bar code is to promoting the fast development of mobile e-business to have vital role.
Character two-dimensional bar code is as a kind of novel barcode technology, on the composition of bar code content, there is essential difference with traditional figure two-dimensional bar code, character two-dimensional bar code is comprised of character, and figure two-dimensional bar code is comprised of black and white lattice, therefore also there is different processing in the identification problem after transmission.Along with the rise of character 2D bar code technology, its Study of recognition is also just seemed to particularly important.
Summary of the invention
The shortcoming that can not the character two-dimensional barcode image obtaining from scanner be processed, be identified and decode in order to overcome prior art, the invention provides a kind of character two-dimension bar code recognition method based on scanner.
The technical matters that the present invention solves and the technical scheme adopting thereof:
Character two-dimension bar code recognition method based on scanner, comprises the following steps:
(1) from scanner, obtain the gray-scale map of 844*644 size;
(2) location to character two bit codes, finger URL is filled circles, first carry out cross method and obtain the center of circle, find the connected region of all doubtful finger URLs, carry out geometry screening, again the connected region of obtaining is further screened by shape angle, get rid of character connected domain and other background connected domains, then by circularity, screen and navigate to solid circles;
(3) character two-dimensional bar code is carried out to distortion correction and bilinear interpolation extraction character zone;
(4) binary conversion treatment to character zone;
(5) character zone is carried out to denoising;
(6) character zone is carried out to horizontal and vertical histogram normalization, then carry out secondary smoothing processing, finally by Wave crest and wave trough, determine cut-off rule, the character splitting segments and cuts again, accurately obtains character zone;
(7) character is normalized into 20*30, extracts character feature, by characteristic matching, identify;
(8) algorithm packaging is become to plug-in unit, by compiling, generate MOCF file and write scanner, realize based on scanning
The character two-dimensional bar code identification of rifle.
Further, in step (2), first by OTSU algorithm, obtain threshold value k, then according to practical experience, be adjusted into T, T = k - 30 , k &GreaterEqual; 128 k - 45 , k < 128 , According to the characteristic in the center of circle, carry out cross method again and obtain the center of circle, by the center of circle, obtain connected region, according to geometric relationship, screen; Connected region is screened and removed background connected region according to shape angle; According to other circularity value location filled circles, circularity value is again: wherein S is the area of circle, and L is the girth of circle, and the circularity value of standard round is 1.In theory, the scope of polygonal circularity value is [0,1], and only have when figure be bowlder, circularity value has maximal value 1.
In described step (3), according to how much symmetry principles, can determine the coordinate of the 4th the summit D1 in bar code region, then carry out distortion correction by reference mark transform method and bilinear interpolation.
In described step (4), by OTSU algorithm, obtain global threshold, then carry out binary conversion treatment.
In described step (5), for the image after binaryzation, then carry out opening operation denoising.
In described step (6), character zone is carried out to horizontal and vertical histogram normalization, normalize between [0,100], then carry out secondary level and smooth after, then cut apart by Wave crest and wave trough.Then according to cut-off rule, be divided into M*N character block, M is horizontal line Segmentation Number, and N is ordinate Segmentation Number, finally to each character block statistics calculating character point position, be stain position, find out the coordinate of upper left point and lower-right most point in each character block, the position of carefully orienting each character.
In described step (7), the character splitting is normalized, size is 20*30.From passing through feature, character inner distance feature and grid feature three aspects:, carry out feature extraction, it after character barcode binaryzation, is white gravoply, with black engraved characters effect, passing through feature is the monochrome pixels change frequency of character in statistics row and column, inner distance feature is from the direction of row and column, to add up respectively the pixel distance of character inside, the grid feature of character is that each character zone is divided into several subregions, adds up respectively the black number of pixels in every sub regions; By characteristic matching, identify again.
Principle of work of the present invention is: by scanner, obtains character two-dimensional barcode image, according to the characteristic of character two-dimensional bar code finger URL, orients character zone, then carry out distortion correction, then by binaryzation and denoising bar code image; Carry out again Character segmentation, mark off each character zone, be finally normalized with feature and identify.
The invention has the advantages that: under scanner applied software development environment, based on limited memory, realize a kind of identification and decoding of new ocra font ocr two-dimensional bar code.
Accompanying drawing explanation
Fig. 1 algorithm flow chart of the present invention
Fig. 2 character two-dimensional bar code structure
Fig. 3 display shape angle
Fig. 4 a shows circular connected domain X
Fig. 4 b shows decussate texture element B
Fig. 4 c shows
Figure BDA0000407105400000031
Fig. 4 d shows
Figure BDA0000407105400000032
Fig. 5 shows bar code area positioning method
Fig. 6 shows the correction of bar code image inclination
Fig. 7 a has shown character coarse segmentation of the present invention
Fig. 7 b has shown that character of the present invention segmentation cuts
Fig. 8 has shown the character normalization that this is numb
Fig. 9 a has shown that row, column scanning extraction character of the present invention passes through feature
Fig. 9 b has shown that row, column scanning extraction character of the present invention passes through feature
Figure 10 a has shown line scanning extraction character inner distance feature of the present invention
Figure 10 b has shown line scanning extraction character inner distance feature of the present invention
Figure 11 has shown grid characteristic pattern of the present invention
Figure 12 has shown scanner developing plug figure of the present invention
Embodiment:
With reference to accompanying drawing, further illustrate the present invention:
With reference to Fig. 1, the character two-dimension bar code recognition method based on scanner, comprises the following steps:
(1) from scanner, obtain the gray-scale map of 844*644 size;
(2) two bar codes of character (with reference to Fig. 2) are located, finger URL is filled circles, first carry out cross method and obtain the center of circle, find the connected region of all doubtful finger URLs, carry out geometry screening, again the connected region of obtaining is further screened by shape angle, get rid of character connected domain and other background connected domains, then by circularity, screen to navigate to and carry out circle;
(3) character two-dimensional bar code is carried out to distortion correction and bilinear interpolation extraction character zone;
(4) binary conversion treatment to character zone;
(5) character zone is carried out to denoising;
(6) character zone is carried out to horizontal and vertical histogram normalization, then carry out secondary smoothing processing, finally by Wave crest and wave trough, determine cut-off rule, the character splitting segments and cuts again, accurately obtains character zone;
(7) character is normalized into 20*30, extracts character feature, by characteristic matching, identify;
(8) algorithm packaging is become to plug-in unit, by compiling, generate MOCF file and write scanner, realize the character two-dimensional bar code identification based on scanner.
In step (2), first by OTSU algorithm, obtain threshold value T1, one dimension OTSU algorithm (one dimension maximum variance between clusters) is a kind of global threshold split plot design of classics, its theoretical foundation is to choose a best threshold values grey level histogram of image is divided into two parts, and the inter-class variance that makes two parts gray scale is maximal value.
If image gray levels 1~M, i level pixel n iindividual, total pixel:
N = &Sigma; i = 1 M n i - - - ( 1 )
The probability that i level gray scale occurs is P i=n i/ N.
If gray scale threshold value is k, by grayscale image pixel, can be divided into two classes:
C 0={1,2,…,k},C 1={k+1,…,M} (2)
Image overall average gray level:
&mu; = &Sigma; i = 1 M i &CenterDot; P i - - - ( 3 )
C 0the average gray level of class and pixel count are:
&mu; ( k ) = &Sigma; i = 1 k i &CenterDot; P i , N 0 = &Sigma; i = 1 k n i - - - ( 4 )
C 1the average gray level of class is: μ-μ (k), pixel count is: N-N 0
Two parts image proportion is respectively:
w 0 = &Sigma; i = 1 k P i = w ( k ) , w 1 = 1 - w ( k ) - - - ( 5 )
C 0and C 1average be respectively:
μ 0=μ(k)/w(k),μ 1=[μ-μ(k)]/[1-w(k)] (6)
Image grand mean is:
μ=w 0μ 0+w 1μ 1 (7)
Inter-class variance is:
σ 2(k)=w 0(μ-μ 0) 2+w 1(μ-μ 1) 2=w 0w 101) 2 (8)
The variation range of k is [1, M], makes σ 2(k) maximum k is required best threshold values.
Then according to practical experience, be adjusted into T, T = k - 30 , k &GreaterEqual; 128 k - 45 , k < 128 , According to the characteristic in the center of circle, carry out cross method again and obtain the center of circle, cross ratio juris is that the center of circle is arrived Edge Distance and equated, if therefore point to Edge Distance up and down equate or the difference of four distances in certain threshold value ω, ω gets 5 here, just this point is divided into the center of circle.By the center of circle, obtain connected region, according to the screening of connected region size, area is the number of pixels that is greater than T in connected domain.Screening conditions are set is: 100<=S i<=500, wherein S iit is the area of i connected domain.Then connected region is screened and removed background connected region according to shape angle (with reference to Fig. 3).
Shape angle D αbe defined as follows: D &alpha; = 1 n &Sigma; i = 0 n - 1 &alpha; i = 1 n &Sigma; i = 0 n - 1 arccos ( g i &RightArrow; , m i &RightArrow; ) , Wherein, α i, with
Figure BDA0000407105400000061
be defined as follows: for the every bit on profile, the line that defines itself and profile barycenter is
Figure BDA0000407105400000062
the correspondent method vector of this point is
Figure BDA0000407105400000063
the two angle is α i.The corresponding α of every bit on profile imean value be exactly the shape angle D of this closed curve α.When obtaining connected region edge, in order to describe out more intuitively the edge of connected domain, the edge of connected domain is extracted in the inverse operation that the present invention introduces erosion operation.The inverse operation expression formula of erosion operation:
X &Theta; &OverBar; B = { a | B a &NotSubset; X } - - - ( 9 )
The set that all a points that above formula and erosion operation different are not satisfy condition form is
Figure BDA0000407105400000065
result.Correspond in character barcode image, X is the connected domain after binaryzation, and B is structural element.Finger URL connected domain is filled circles structure, so the present invention selects the decussate texture of symmetric figure.Select decussate texture element respectively to its arithmograph of struggling against the corrosive influence, through morphologic, struggle against the corrosive influence after processing, obtain the edge pixel point of connected domain, the girth of connected domain is the summation of all edge pixel points.With reference to Fig. 4 a, Fig. 4 b, Fig. 4 c, and Fig. 4 d.Wherein, Fig. 4 a is circular connected domain X, and Fig. 4 b is decussate texture element B, and Fig. 4 c is
Figure BDA0000407105400000066
fig. 4 d is
Figure BDA0000407105400000067
Finally, according to circularity value location filled circles, circularity value is:
Figure BDA0000407105400000068
wherein S is the area of circle, and L is the girth of circle, and the circularity value of standard round is 1.In theory, the scope of polygonal circularity value is [0,1], and only have when figure be bowlder, circularity value has maximal value 1.If net result surpasses 3, then sequence from big to small, select first three, be exactly final finger URL position.
In described step (3), according to geometry symmetry principle, can determine the coordinate of the 4th the summit D1 in bar code region.Mark after filled circles, find out respectively the center of circle of three filled circles, according to central coordinate of circle, can finally determine character barcode region, establish (x i, y i) be central coordinate of circle (i=0,1,2), r ibe i radius of a circle:
x i = 1 A i &Sigma; x i &Element; R i R i . x i - - - ( 10 )
y i = 1 A i &Sigma; y i &Element; R i R i . y i - - - ( 11 )
r i = A i / &pi; - - - ( 12 )
A ithe area of i filled circles, R ii filled circles connected domain.
With reference to Fig. 5, character two-dimensional bar code figure is symmetrical square chart picture, can determine the coordinate of the 4th the summit D1 in bar code region according to geometry symmetry principle:
x D1=x A1+x B1+x C1 (13)
y D1=y A1+y B1+y C1 (14)
Finally according to radius of circle r iwith quadrilateral A 1b 1c 1d 1finally simulate bar code region ABCD.
By reference mark transform method and bilinear interpolation, carry out distortion correction again.Suppose that g (s, t) is for the distorted image of bar code image, the bar code image that f (x, y) is standard, the bilinear space transformation equation between them is so:
s = ax + by + cxy + d t = ex + fy + gxy + h - - - ( 15 )
As long as after coefficient a~h, just can obtain the coordinate transform relation between bar code distorted image and bar code standard picture, and then can complete the coordinate transform of image in definite equation.By the above-mentioned formula of coordinate difference substitution of eight reference mark A, B having obtained, C, D, A', B', C', D', can set up bilinear equations, shown in following two formula.By bilinear equations, can solve these eight coefficients of a~h.Finally, the spatial mappings of carrying out a little in quadrilateral area can be realized to geometry distrotion correction.
x 1 = ax &prime; 1 + by &prime; 1 + cx &prime; 1 y &prime; 1 + d x 2 = ax &prime; 2 + by &prime; 2 + cx &prime; 2 y &prime; 2 + d x 3 = ax &prime; 3 + by &prime; 3 + cx &prime; 3 y &prime; 3 + d x 4 = ax &prime; 4 + by &prime; 4 + cx &prime; 4 y &prime; 4 + d - - - ( 16 )
y 1 = ex &prime; 1 + fy &prime; 1 + gx &prime; 1 y &prime; 1 + h y 2 = ex &prime; 2 + fy &prime; 2 + gx &prime; 2 y &prime; 2 + h y 3 = ex &prime; 3 + fy &prime; 3 + gx &prime; 3 y &prime; 3 + h y 4 = ex &prime; 4 + fy &prime; 4 + gx &prime; 4 y &prime; 4 + h - - - ( 17 )
In original image, a lot of pixels are obtaining to such an extent that pixel coordinate is not integer after bilinear space conversion, for the grey scale pixel value after making to change is closer to original image, need to use bilinear interpolation disposal route.Bilinear interpolation, according to the correlativity of original image pixels point four pixels around, calculates by bilinearity algorithm, and the method can produce a continuity and connective smooth conversion, has good effect.With reference to Fig. 6 a and Fig. 6 b, wherein, Fig. 6 a is the character two-dimensional barcode image that scanner is taken, and Fig. 6 b is the character two-dimensional barcode image after location, rectification.Bar code image after final correction is set to 250 * 250 sizes.,
In step (4), by OTSU algorithm, obtain global threshold, then carry out binary conversion treatment.
In step (5), for the image after binaryzation, then carry out opening operation denoising.Dilation operation expression formula:
X⊕B={a|B a∩X≠Φ} (18)
In above formula, after bar structure element B translation a, obtain B aif, B in translation ahave a common element at least with X, mark a point, meets the result that set that all a points of above-mentioned condition form is X ⊕ B.
Erosion operation expression formula:
X&Theta;B = { a | B a &SubsetEqual; X } - - - ( 19 )
In above formula, after bar structure element B translation a, obtain B aif, in translation
Figure BDA0000407105400000084
mark a point, meets the set that all a points of above-mentioned condition form and is
Figure BDA0000407105400000082
result.
Opening operation:
XoB = ( X&Theta;B ) &CirclePlus; B - - - ( 20 )
Above formula is that X is made the result of opening operation by structural element B.
In described step (6), character zone is carried out to horizontal and vertical histogram normalization, normalize between [0,100], then carry out secondary level and smooth after, then cut apart by Wave crest and wave trough.Then according to cut-off rule, be divided into M*N character block, M is horizontal line Segmentation Number, and N is ordinate Segmentation Number, finally to each character block statistics calculating character point position, be stain position, find out the coordinate of upper left point and lower-right most point in each character block, the position of carefully orienting each character.
First partitioning algorithm carries out Two dimensional Distribution analysis to the pixel value of picture, be that pixel is analyzed with the distribution character of vertical direction in the horizontal direction, different ranks will cause the Two dimensional Distribution of image pixel to present kurtosis, and trough is the gap of bar data code.Because very big-difference may quantitatively appear in the distribution of pixel, for the ease of statistics, first carry out normalized in 0 to 100 scope.With reference to Fig. 7 a and Fig. 7 b, respectively image is carried out to coarse segmentation and segmentation is cut.Because the direct projection histogram of pixel is rough, therefore, in actual cutting apart, before searching trough, need distribution histogram to carry out smooth operation, the present invention adopts the sliding window method of average.The sliding window method of average is used one to specify big or small window to travel through whole histogram, gets the mean value of all data in current window for the value of each data, and it is 1/20 of image length that the present invention adopts window size.For the image after level and smooth, carry out trough search, and determine character specification according to dividing line.Character barcode has designed the specification of being permitted miscellaneous editions, in projection process, can according to existing line number and columns specification, carry out projection respectively.
Through said method, can only mark off roughly the position of each character, so next step carries out Accurate Segmentation exactly.By cut-off rule before, every scope is searched to foreground point, namely black color dots, by calculating the position of each point, obtains left upper apex and the summit, bottom right of each character, so just can accurately navigate to the scope of every character, carries out Accurate Segmentation.
In described step (7), the character splitting is normalized, with reference to Fig. 8.Character normalization is that the character varying in size in character barcode image is unified to form identical size by conversion, and the present invention arranges size for 20*30, and character boundary is 20 pixel wide, 30 pixels tall.Further, from passing through feature, character inner distance feature and grid feature three aspects:, carry out feature extraction, after character barcode binaryzation, it is white gravoply, with black engraved characters, passing through feature is the monochrome pixels change frequency of character in statistics row and column, inner distance feature is from the direction of row and column, to add up respectively the pixel distance of character inside, the grid feature of character is that each character zone is divided into several subregions, adds up respectively the black number of pixels in every sub regions; By characteristic matching, identify again.
(1) through characteristic
With reference to Fig. 9 a and Fig. 9 b, respectively capable to character, scan, extract character and pass through feature.It is the monochrome pixels change frequency of character in statistics row and column that character barcode passes through feature, and is stored in respectively one-dimension array Rowjump[i] and Coljump[j] in (i=0,1,2...29; J=0,1,2...19).Shine-through feature computing method are as follows:
1) for each character zone after cutting apart, scan successively every row, from first white pixel of region left hand edge, start to scan to the right, run into the pixel of different gray-scale values, ++ Rowjump[i], until character zone right hand edge.
2) in like manner, scan successively every row, from first white pixel of region top, start downward scanning, run into the pixel of different gray-scale values, ++ Coljump[j], until character zone bottom margin.
(2) inner distance characteristic
With reference to Figure 10 a and Figure 10 b, respectively character is carried out to row, column scanning, extract character inner distance feature.Inner distance feature is from the direction of row and column, to add up respectively the pixel distance of character inside, and is stored in respectively one-dimension array Rowgap[i] and Colgap[j] in (i=0,1,2...29; J=0,1,2...19).The computing method of inner distance feature are as follows:
1) for each character zone after cutting apart, scan successively every row, from region left hand edge, start to scan to the right, run into first and start calculating pixel point number by the black pixel bleaching, until first finishes accumulative total by the black pixel of leucismus, aggregate-value d is stored in Rowgap[i] in.
2) in like manner, scan successively every row, from region top, start downward scanning, run into first and started to calculate by the black pixel bleaching, until first finishes accumulative total by the black pixel of leucismus, aggregate-value d is stored in Colgap[j] in.
(3) grid feature
With reference to Figure 11, the grid feature of character is that each character zone is divided into several subregions, add up respectively the black number of pixels in every sub regions, each character zone is divided into 24 sub regions herein, every sub regions is of a size of 5*5 pixel size, the black number of pixels counting is stored in to one-dimension array Grid[i] in (i=0,1,2...23).
Above-mentioned three kinds of architectural feature methods are respectively stroke characteristic, internal structural characteristic and the whole pixel distribution characters from character, and three kinds of features reflect respectively the global feature of character from different angles.These three kinds of architectural feature methods are merged character is identified, can be good at improving the discrimination of character.The dimension that passes through feature in the present invention is 50, and character inner distance intrinsic dimensionality is 50, and grid intrinsic dimensionality is 24, and the total dimension after fusion is 124.
This 124 dimensional feature carries out European geometric distance calculating with the template establishing the most at last, according to the minimum value calculating, judges character.
In step (8), with reference to Figure 12, the present invention is based on the exploitation of Honeywell scanner, and whole recognizer writes in scanner after need encapsulating.Algorithm is realized with standard C language, the crossstool chain that uses ARM ELF to provide for Cygwin, the chain function that Honeywell scanner is provided and plug-in card configuration file are encapsulated into plug-in unit chain MOCF file, use EZConfig-Scanning software that MOCF file is write to scanner.When scanner obtains after picture, system is carried out initialization process to decoding plug-in unit, calls plug-in unit of the present invention, realizes the identification to character two-dimensional barcode image, and identification and decode results are shown.

Claims (6)

1. the character two-dimension bar code recognition method based on scanner, comprises the following steps:
(1) from scanner, obtain the gray-scale map of 844*644 size;
(2) character two-dimensional bar code is positioned, first by cross method, obtain the center of circle, find the connected region of all doubtful finger URLs, carry out geometry screening, again the connected region of obtaining is further screened by shape angle, get rid of character connected domain and other background connected domains, then by circularity, screen and navigate to solid circles;
(3) character two-dimensional bar code is carried out to distortion correction and bilinear interpolation extraction character zone;
(4) binary conversion treatment to character zone;
(5) character zone is carried out to denoising;
(6) character zone is carried out to horizontal and vertical histogram normalization, then carry out secondary smoothing processing, finally by Wave crest and wave trough, determine cut-off rule, the character splitting segments and cuts again, accurately obtains character zone;
(7) character is normalized into the image of 20*30 size, extracts character feature, by characteristic matching, identify.
2. the character two-dimension bar code recognition method based on scanner as claimed in claim 1, is characterized in that: in described step (2), first by OTSU algorithm, obtains threshold value k, then according to practical experience, adjusts T value, T = k - 30 , k &GreaterEqual; 128 k - 45 , k < 128 , According to the characteristic in the center of circle, by cross method, obtain the center of circle again, by the center of circle, obtain connected region, according to geometric relationship, screen; Connected region is screened and removed background connected region according to shape angle; According to circularity value location filled circles, circularity value is again:
Figure FDA0000407105390000012
wherein S is the area of circle, and L is the girth of circle, and the circularity value of standard round is 1.When figure is bowlder, circularity value has maximal value 1.
3. the character two-dimension bar code recognition method based on scanner as claimed in claim 1, it is characterized in that: in described step (3), according to how much symmetry principles, can determine the coordinate of the 4th the summit D1 in bar code region, then carry out distortion correction by reference mark transform method and bilinear interpolation.
4. the character two-dimension bar code recognition method based on scanner as claimed in claim 1, is characterized in that: in described step (4), obtain global threshold, then carry out binary conversion treatment by OTSU algorithm.
5. the character two-dimension bar code recognition method based on scanner as claimed in claim 1, is characterized in that: in described step (5), for the image after binaryzation, then carry out opening operation denoising.
6. the character two-dimension bar code recognition method based on scanner as claimed in claim 1, it is characterized in that: in described step (6), character zone is carried out to horizontal and vertical histogram normalization, normalize to [0,100] between, then carry out secondary level and smooth after, then cut apart by Wave crest and wave trough; Then according to cut-off rule, be divided into M*N character block, M is horizontal line Segmentation Number, and N is ordinate Segmentation Number, finally to each character block statistics calculating character point position, be stain position, find out the coordinate of upper left point and lower-right most point in each character block, the position of carefully orienting each character.
Character two-dimension bar code recognition method based on scanner as claimed in claim 1, is characterized in that: in described step (7), the character splitting is normalized, size is 20*30.From passing through feature, character inner distance feature and grid feature three aspects:, carry out feature extraction, after character barcode binaryzation, it is white gravoply, with black engraved characters, passing through feature is the monochrome pixels change frequency of character in statistics row and column, inner distance feature is from the direction of row and column, to add up respectively the pixel distance of character inside, the grid feature of character is that each character zone is divided into several subregions, adds up respectively the black number of pixels in every sub regions; By characteristic matching, identify again.
CN201310536024.4A 2013-11-01 2013-11-01 Character two-dimensional bar code recognition method based on scanning gun Pending CN103593653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310536024.4A CN103593653A (en) 2013-11-01 2013-11-01 Character two-dimensional bar code recognition method based on scanning gun

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310536024.4A CN103593653A (en) 2013-11-01 2013-11-01 Character two-dimensional bar code recognition method based on scanning gun

Publications (1)

Publication Number Publication Date
CN103593653A true CN103593653A (en) 2014-02-19

Family

ID=50083785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310536024.4A Pending CN103593653A (en) 2013-11-01 2013-11-01 Character two-dimensional bar code recognition method based on scanning gun

Country Status (1)

Country Link
CN (1) CN103593653A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899589A (en) * 2015-05-12 2015-09-09 广州中大数码科技有限公司 Method for realizing two-dimensional bar code preprocessing by using threshold binarization algorithm
CN105184208A (en) * 2015-09-02 2015-12-23 福建联迪商用设备有限公司 Two-dimension code preliminary positioning method and system
CN104298947B (en) * 2014-08-15 2017-03-22 广东顺德中山大学卡内基梅隆大学国际联合研究院 Method and device for accurately positioning two-dimensional bar code
CN108009459A (en) * 2017-11-24 2018-05-08 浙江工业大学 Character two-dimensional bar code method for rapidly positioning based on triangle polyester fibre symbol
CN108520258A (en) * 2018-04-04 2018-09-11 湖南科技大学 Character code mark
CN108537217A (en) * 2018-04-04 2018-09-14 湖南科技大学 Identification based on character code mark and localization method
CN108573251A (en) * 2017-03-15 2018-09-25 北京京东尚科信息技术有限公司 Character area localization method and device
CN108701204A (en) * 2015-12-31 2018-10-23 深圳配天智能技术研究院有限公司 A kind of method and device of one-dimension code positioning
CN110533003A (en) * 2019-09-06 2019-12-03 兰州大学 A kind of threading method license plate number recognizer and equipment
CN110543286A (en) * 2019-09-19 2019-12-06 海明联合能源集团矩网科技有限公司 Image slicing method
CN111368574A (en) * 2020-03-06 2020-07-03 联想(北京)有限公司 Bar code identification method and device
CN111860521A (en) * 2020-07-21 2020-10-30 西安交通大学 Method for segmenting distorted code-spraying characters layer by layer
CN112101058A (en) * 2020-08-17 2020-12-18 武汉诺必答科技有限公司 Method and device for automatically identifying test paper bar code
CN112836541A (en) * 2021-02-03 2021-05-25 华中师范大学 Automatic acquisition and identification method and device for 32-bit bar code of cigarette
CN114169352A (en) * 2021-10-27 2022-03-11 珠海格力智能装备有限公司 Bar code information identification method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003248792A (en) * 2002-02-22 2003-09-05 Seiko Epson Corp Decoding method of two-dimensional code, decoding device of two-dimensional code, program of performing the decoding method of two-dimensional code on computer and recording medium with the program recorded
CN102096795A (en) * 2010-11-25 2011-06-15 西北工业大学 Method for recognizing worn two-dimensional barcode image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003248792A (en) * 2002-02-22 2003-09-05 Seiko Epson Corp Decoding method of two-dimensional code, decoding device of two-dimensional code, program of performing the decoding method of two-dimensional code on computer and recording medium with the program recorded
CN102096795A (en) * 2010-11-25 2011-06-15 西北工业大学 Method for recognizing worn two-dimensional barcode image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何振芬: ""字符二维条码识别技术研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 6, 15 June 2013 (2013-06-15) *
何振芬等: ""字符二维条码图像的识读"", 《计算机系统应用》, vol. 22, no. 2, 15 February 2013 (2013-02-15) *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298947B (en) * 2014-08-15 2017-03-22 广东顺德中山大学卡内基梅隆大学国际联合研究院 Method and device for accurately positioning two-dimensional bar code
CN104899589A (en) * 2015-05-12 2015-09-09 广州中大数码科技有限公司 Method for realizing two-dimensional bar code preprocessing by using threshold binarization algorithm
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
CN105184208B (en) * 2015-09-02 2017-10-31 福建联迪商用设备有限公司 A kind of Quick Response Code Primary Location method and system
WO2017036264A1 (en) * 2015-09-02 2017-03-09 福建联迪商用设备有限公司 Two-dimensional code preliminary positioning method and system
CN105184208A (en) * 2015-09-02 2015-12-23 福建联迪商用设备有限公司 Two-dimension code preliminary positioning method and system
CN108701204B (en) * 2015-12-31 2021-01-08 深圳配天智能技术研究院有限公司 One-dimensional code positioning method and device
CN108701204A (en) * 2015-12-31 2018-10-23 深圳配天智能技术研究院有限公司 A kind of method and device of one-dimension code positioning
US11017260B2 (en) 2017-03-15 2021-05-25 Beijing Jingdong Shangke Information Technology Co., Ltd. Text region positioning method and device, and computer readable storage medium
CN108573251A (en) * 2017-03-15 2018-09-25 北京京东尚科信息技术有限公司 Character area localization method and device
CN108573251B (en) * 2017-03-15 2021-09-07 北京京东尚科信息技术有限公司 Character area positioning method and device
CN108009459B (en) * 2017-11-24 2020-08-18 浙江工业大学 Character two-dimensional bar code rapid positioning method based on triangular locator
CN108009459A (en) * 2017-11-24 2018-05-08 浙江工业大学 Character two-dimensional bar code method for rapidly positioning based on triangle polyester fibre symbol
CN108537217A (en) * 2018-04-04 2018-09-14 湖南科技大学 Identification based on character code mark and localization method
CN108520258A (en) * 2018-04-04 2018-09-11 湖南科技大学 Character code mark
CN110533003B (en) * 2019-09-06 2022-09-20 兰州大学 Threading method license plate number recognition method and equipment
CN110533003A (en) * 2019-09-06 2019-12-03 兰州大学 A kind of threading method license plate number recognizer and equipment
CN110543286A (en) * 2019-09-19 2019-12-06 海明联合能源集团矩网科技有限公司 Image slicing method
CN110543286B (en) * 2019-09-19 2022-11-15 海明联合能源集团矩网科技有限公司 Image slicing method
CN111368574A (en) * 2020-03-06 2020-07-03 联想(北京)有限公司 Bar code identification method and device
CN111860521A (en) * 2020-07-21 2020-10-30 西安交通大学 Method for segmenting distorted code-spraying characters layer by layer
CN112101058A (en) * 2020-08-17 2020-12-18 武汉诺必答科技有限公司 Method and device for automatically identifying test paper bar code
CN112836541A (en) * 2021-02-03 2021-05-25 华中师范大学 Automatic acquisition and identification method and device for 32-bit bar code of cigarette
CN112836541B (en) * 2021-02-03 2022-06-03 华中师范大学 Automatic acquisition and identification method and device for 32-bit bar code of cigarette
CN114169352A (en) * 2021-10-27 2022-03-11 珠海格力智能装备有限公司 Bar code information identification method and electronic equipment

Similar Documents

Publication Publication Date Title
CN103593653A (en) Character two-dimensional bar code recognition method based on scanning gun
CN110738207B (en) Character detection method for fusing character area edge information in character image
Tian et al. Multilingual scene character recognition with co-occurrence of histogram of oriented gradients
Kumar et al. A detailed review of feature extraction in image processing systems
CN107093172B (en) Character detection method and system
CN109726657B (en) Deep learning scene text sequence recognition method
CN103049763B (en) Context-constraint-based target identification method
CN105469047A (en) Chinese detection method based on unsupervised learning and deep learning network and system thereof
CN105447522A (en) Complex image character identification system
Moghaddam et al. Application of multi-level classifiers and clustering for automatic word spotting in historical document images
CN111860525B (en) Bottom-up optical character recognition method suitable for terminal block
CN103870803A (en) Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion
CN105608454A (en) Text structure part detection neural network based text detection method and system
CN113033269B (en) Data processing method and device
Nasir et al. Hand written bangla numerals recognition for automated postal system
Choudhary et al. A new approach to detect and extract characters from off-line printed images and text
Pawar et al. Image to text conversion using tesseract
CN105335760A (en) Image number character recognition method
Kumar Performance comparison of features on Devanagari hand-printed dataset
CN114120299A (en) Information acquisition method, device, storage medium and equipment
CN104346628A (en) License plate Chinese character recognition method based on multi-scale and multidirectional Gabor characteristic
Dhanikonda et al. An efficient deep learning model with interrelated tagging prototype with segmentation for telugu optical character recognition
CN114359917A (en) Handwritten Chinese character detection and recognition and font evaluation method
CN110766001B (en) Bank card number positioning and end-to-end identification method based on CNN and RNN
Tian et al. Table frame line detection in low quality document images based on hough transform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140219