CN107016317A - A kind of bar code decoding method and device - Google Patents

A kind of bar code decoding method and device Download PDF

Info

Publication number
CN107016317A
CN107016317A CN201710119932.1A CN201710119932A CN107016317A CN 107016317 A CN107016317 A CN 107016317A CN 201710119932 A CN201710119932 A CN 201710119932A CN 107016317 A CN107016317 A CN 107016317A
Authority
CN
China
Prior art keywords
character
scan line
bar code
decoded
result
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.)
Granted
Application number
CN201710119932.1A
Other languages
Chinese (zh)
Other versions
CN107016317B (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.)
Zhejiang Huaray Technology Co Ltd
Original Assignee
Zhejiang Huaray Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Huaray Technology Co Ltd filed Critical Zhejiang Huaray Technology Co Ltd
Priority to CN201710119932.1A priority Critical patent/CN107016317B/en
Publication of CN107016317A publication Critical patent/CN107016317A/en
Application granted granted Critical
Publication of CN107016317B publication Critical patent/CN107016317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Toxicology (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)
  • Printers Characterized By Their Purpose (AREA)

Abstract

The embodiment of the invention discloses a kind of bar code decoding method and device, methods described includes:At least three scan lines are determined in bar code to be decoded, decoded for corresponding each character in every scan line, the number of times that every scan line occurs for the decoded result of the character is determined, the most decoded result of number of times is will appear from as the target decoder result of the character;According to the target decoder result of each character, the decoded result of the bar code is determined.Due in embodiments of the present invention, for corresponding each character in scan line, determine the number of times that every scan line occurs for the decoded result of the character, the most decoded result of number of times be will appear from as the target decoder result of the character, weaken bar code because fracture, cut, printing quality it is poor, dirty, it is damaged situations such as caused by decoding error and the influence that can not decode, improve the accuracy and success rate of bar code decoding.

Description

A kind of bar code decoding method and device
Technical field
The present invention relates to Bar Code field, more particularly to a kind of bar code decoding method and device.
Background technology
Bar code is multiple and sky for not waiting width, is arranged according to certain coding rule, to express a group information Graphical identifier.Common bar code be the bar that is differed greatly by reflectivity with idle discharge into pattern of parallel lines.Bar code can be marked Go out producing country, manufacturing firm, trade name, date of manufacture, book classification number, mail start-stop place, classification, date of article etc. Many information, thus be widely used in many fields such as commodity circulation, taking care of books, postal management, banking system.
Existing bar code decoding method mainly includes:Average distance method:The bar code is drawn after the original position for orienting bar code Actual overall width, according to the total length of bar code template and the actual overall width, obtain the pixel count of unit template, and then survey Each and the empty developed width in bar code are measured, the developed width of determination is carried out matching determination with the template of normal width Go out corresponding code value;Similar back gauge method:By calculate adjacent strip and empty width and, with the adjacent strip of standard character template and Empty width sum is matched to decode;Template matching algorithm based on bar width:Pass through record strip or aerial contained The quantity of pixel, determines bar and empty developed width, and the developed width of determination with the template of normal width match really Make corresponding code value.
But above-mentioned each method to bar code when decoding, it is to rely on bar and empty width in bar code and is decoded, But in actual applications bar code can there are problems that fracture, cut, printing quality it is poor, or the breakage caused by lighting issues, Bar and empty developed width will change, and cause decoding inaccurate, or even can not decode, and decoding rate is low.And existing skill Image processing method can only solve the problem of image obtains not good in art, for fracture, cut, printing quality be poor, dirty, breakage Situations such as bar code can not accomplish repair error correction, influence bar code decoding accuracy and decoding rate.
The content of the invention
The present invention provides a kind of bar code decoding method and device, to solve in the prior art to fracture, cut, printing quality The bar code decoding for situations such as amount is poor, dirty, damaged is inaccurate, the problem of decoding rate is low.
The embodiment of the invention discloses a kind of bar code decoding method, methods described includes:
At least three scan lines are determined in bar code to be decoded;
Decoded for corresponding each character in every scan line, determine that every scan line is directed to the decoding of the character As a result the number of times occurred, will appear from the most decoded result of number of times as the target decoder result of the character;
According to the target decoder result of each character, the decoded result of the bar code is determined.
Further, it is described if being directed to the decoded result non-targeted decoded result of the first character in the first scan line Carrying out decoding for corresponding each character in every scan line includes:
The decoded result for recognizing first character is the second scan line of target decoder result, according to the described second scanning The original position of the next character adjacent with first character on line, rises to next character in first scan line Beginning, position was updated;
According to the original position of next character after renewal in first scan line, in first scan line Next character decoded.
Further, it is described determine at least three scan lines in bar code to be decoded after, in every scan line Before corresponding each character is decoded, methods described also includes:
For every scan line, according to the starting character and the template of end mark pre-saved, determine to originate in the scan line The position of symbol and end mark;
According to the position of starting character and end mark in the scan line, the position of each character in the scan line is determined.
Further, it is described to determine that at least three scan lines include in bar code to be decoded:
For bar code to be decoded, bar code is divided into by least threeth area using first cut-off rule vertical with the bar code Domain, determines at least one scan line in each area.
Further, it is described to be directed to bar code to be decoded, it is determined that at least three scan lines include:
For bar code to be decoded, using at least three second cut-off rules vertical with the bar code by bar code be divided into Few four regions, it is corresponding every scan line to determine every second cut-off rule.
Further, the character includes:
Starting character, end mark and data symbols.
The embodiment of the invention discloses a kind of bar code decoding device, described device includes:
First determining module, for determining at least three scan lines in bar code to be decoded;
Decoder module, for being decoded for corresponding each character in every scan line, determines every scan line pin The number of times occurred to the decoded result of the character, will appear from the most decoded result of number of times as the target decoder knot of the character Really;
Second determining module, for the target decoder result according to each character, determines the decoded result of the bar code.
Further, the decoder module, if the decoding knot specifically for being directed to the first character in the first scan line Fruit non-targeted decoded result, the decoded result for recognizing first character is the second scan line of target decoder result, according to institute The original position of next character adjacent with first character in the second scan line is stated, under described in first scan line The original position of one character is updated;According to the original position of next character after renewal in first scan line, Next character in first scan line is decoded.
Further, described device also includes:
3rd determining module, for for every scan line, according to the starting character and the template of end mark pre-saved, really The position of starting character and end mark in the fixed scan line;According to the position of starting character and end mark in the scan line, it is determined that this is swept Retouch the position of each character on line.
Further, first determining module, specifically for for bar code to be decoded, using vertical with the bar code The first cut-off rule bar code is divided at least three regions, at least one scan line is determined in each area.
Further, first determining module, specifically for for bar code to be decoded, using vertical with the bar code At least three the second cut-off rules bar code is divided at least four regions, determine that every second cut-off rule is swept for corresponding every Retouch line.
The invention discloses a kind of bar code decoding method and device, methods described includes:Determined in bar code to be decoded At least three scan lines, are decoded for corresponding each character in every scan line, determine that every scan line is directed to the word The number of times that the decoded result of symbol occurs, will appear from the most decoded result of number of times as the target decoder result of the character;According to The target decoder result of each character, determines the decoded result of the bar code.Due in embodiments of the present invention, determining that every is swept The number of times that line occurs for the decoded result of the character is retouched, the most decoded result of number of times is will appear from as the target solution of the character Code result, weaken bar code because fracture, cut, printing quality it is poor, dirty, it is damaged situations such as caused by decoding error and can not decode Influence, improve the accuracy and success rate of bar code decoding.
Brief description of the drawings
Fig. 1 is a kind of bar code decoding process schematic that the embodiment of the present invention 1 is provided;
Fig. 2 is a kind of bar code decoding process schematic that the embodiment of the present invention 2 is provided;
Fig. 3 is a kind of bar code decoding apparatus structure schematic diagram that the embodiment of the present invention 5 is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Embodiment 1:
Fig. 1 is a kind of bar code decoding process schematic provided in an embodiment of the present invention, and the process includes:
S101:At least three scan lines are determined in bar code to be decoded.
A kind of bar code decoding method provided in an embodiment of the present invention, applied to electronic equipment, the electronic equipment can be hand Hold the bar code readers such as formula barcode reader, fixed barcode reader or mobile phone with bar code decoding function, The terminal devices such as tablet personal computer.
Specifically, when being decoded to bar code to be decoded, at least three scan lines are determined in bar code to be decoded, The distance between two adjacent scan lines can be the same or different.Preferably, in order to avoid because between scan line away from Exist from excessively near, in bar code fracture, cut, printing quality it is poor, dirty, it is damaged situations such as the portion of bar code information mistake that causes Point, while the character information of the bar code gathered to multi-strip scanning line is interfered, the accuracy of bar code decoding is influenceed, between can waiting Every selection scan line, no less than one pixel of the distance between adjacent scan line.And can also be according to bar to be decoded The degree of code determines the quantity of scan line, if the bar code degree to be decoded is relatively low, can use less Scan line quantitative commitments decoding efficiency, if the degree of the bar code to be decoded is higher, can use more Scan line quantitative commitments decoding accuracy.
S102:Decoded for corresponding each character in every scan line, determine that every scan line is directed to the character Decoded result occur number of times, will appear from the most decoded result of number of times as the target decoder result of the character.
In embodiments of the present invention, each character is recognized in every scan line, each character is decoded, in identification It is the sequencing and correspondence width occurred according to the corresponding each character of bar code to be decoded during each character in scan line, Determine the corresponding position of each character successively in every scan line, therefore the quantity of the character included in every scan line is phase With, and each character corresponding character in every scan line is also to know in advance in bar code to be decoded. When determining the information of the corresponding each character of bar code, decoded for corresponding each character in scan line, determine every The number of times that scan line occurs for the decoded result of the character, will appear from the most decoded result of number of times as the target of the character Decoded result.
In embodiments of the present invention, it is prior art to the process that each character is decoded in scan line, no longer carries out Repeat.
For example:The quantity of the scan line determined in bar code to be decoded be 5, respectively scan line 1, scan line 2, sweep Retouch line 3, scan line 4, scan line 5, the corresponding character A of scan line 1, scan line 2, scan line 3, scan line 4, scan line 5 decoding As a result it is respectively 001,001,001,002,001,001, it is determined that it is 4 times the number of times that decoded result is 001 occur for character A, It is 1 time the number of times that decoded result is 002 occur, is more than 1 time for 4 times, by the decoded result 001 that decoded result occurrence number is 4 times It is used as character A target decoder result.
S103:According to the target decoder result of each character, the decoded result of the bar code is determined.
Specifically, according to the target decoder result of each character in the bar code, determining the decoded result of the bar code.Example Such as:The character that the bar code is included is character A, character B, character C, character D, character E, wherein character A, character B, character C, word It is respectively 001,003,005,006,004 to accord with D, the corresponding target decoder results of character E, determines the corresponding decoded result of the bar code For 001003005006004.
, will due in embodiments of the present invention, determining the number of times that every scan line occurs for the decoded result of the character The most decoded result of occurrence number weakens bar code because of fracture, cut, printing quality as the target decoder result of the character Poor, dirty, damaged situations such as, causes decoding error and the influence that can not be decoded, and improves the accuracy and successfully of bar code decoding Rate.
Embodiment 2:
In order to improve accuracy and success rate to bar code decoding, on the basis of above-described embodiment, in present invention implementation It is described for every scanning if being directed to the decoded result non-targeted decoded result of the first character in the first scan line in example Corresponding each character, which carries out decoding, on line includes:
The decoded result for recognizing first character is the second scan line of target decoder result, according to the described second scanning The original position of the next character adjacent with first character on line, rises to next character in first scan line Beginning, position was updated;
According to the original position of next character after renewal in first scan line, in first scan line Next character decoded.
When bar code part exist fracture, cut, printing quality it is poor, dirty, it is damaged when, can cause by the portion Divide the scan line of collection bar code character information inaccurate to the corresponding character locating in the part, and influence the scan line to the portion The positioning of character position after point corresponding character, influences the normal decoding to the character after the character, to bar code solution The accuracy of code produces influence.
In embodiments of the present invention, in order to improve the accuracy to bar code decoding, if for the in the first scan line The decoded result non-targeted decoded result of one character, the next word adjacent with first character on to first scan line Before symbol is decoded, the decoded result for recognizing first character is the second scan line of target decoder result, and according to institute The position of next character adjacent with first character in the second scan line is stated, under described in first scan line The original position of one character is updated, according to the original position of next character after renewal in first scan line, Next character in first scan line is decoded.Specifically, can be according to described next in the second scan line The distance of the original position of character and the scan line original position, determines the start bit of next character in the first scan line Put.
For example:Decoded result in first scan line for the first character is 001, and target decoder result is 003, first Decoded result in scan line for the first character is the solution in non-targeted decoded result, the second scan line to first character Code result is target decoder result, then second is swept with this according to the original position of the next character determined in the second scan line The distance of line original position is retouched, the original position to next character in the first scan line is updated.
Fig. 2 is a kind of bar code decoding process schematic provided in an embodiment of the present invention, and the process includes:
S201:At least three scan lines are determined in bar code to be decoded.
S202:For current character to be decoded, decoding of the every scan line for the current character to be decoded is determined As a result the number of times occurred, will appear from the most decoded result of number of times as the target decoder result of the current character to be decoded.
S203:The next to be decoded character adjacent with the current character to be decoded is judged whether, if it is, carrying out S204, if not, carrying out S206.
S204:For every scan line, judge that the decoded result that the current character to be decoded is directed in the scan line is No is target decoder result, if it is, next character to be decoded is subjected to S202 as current character to be decoded, if It is no, carry out S205.
S205:It is to deserve in other scan lines of target decoder result according to the decoded result of the current character to be decoded The original position of next character of preceding character to be decoded, the original position to next character in the scan line is updated, Using next character to be decoded as current character to be decoded, S202 is carried out.
S206:According to the target decoder result of each character to be decoded, the decoded result of the bar code is determined.
Embodiment 3:
In order to accurately be decoded to corresponding each character in scan line, on the basis of the various embodiments described above, In the embodiment of the present invention, it is described determine at least three scan lines in bar code to be decoded after, for right in every scan line Before each character answered is decoded, methods described also includes:
For every scan line, according to the starting character and the template of end mark pre-saved, determine to originate in the scan line The position of symbol and end mark;
According to the position of starting character and end mark in the scan line, the position of each character in the scan line is determined.
In embodiments of the present invention, starting character corresponding with barcode types to be decoded and knot have been pre-saved in electronic equipment Record has the corresponding starting character of bar code and end mark of the type in the template of beam symbol, the template of the starting character and end mark The information of bar sky width, according to the information of the empty width of the bar of the starting character and end mark, it may be determined that with institute in scan line The position of the information match of the width of the bar sky of starting character and end mark is stated, so that it is determined that going out starting character and knot in the scan line The position of beam symbol, and according to starting character and the position of end mark, determine every before end mark after starting character in the scan line The position of individual character.In embodiments of the present invention according to starting character and the template of end mark, starting character and knot in scan line are determined The position of beam symbol is prior art, is no longer repeated.
In addition, if not only preserving the mould of the corresponding starting character of barcode types to be decoded and end mark in electronic equipment Plate, also preserves the corresponding starting character of other kinds of bar code and the template of end mark, it is determined that starting character and knot in scan line When beam accords with position, for the corresponding starting character of each type of bar code and the progress in the scan line successively of the template of end mark Match somebody with somebody, if all the match is successful in the scan line for the corresponding starting character of the bar code of the type and the template of end mark, by the type The corresponding starting character of bar code and the starting character that is determined in scan line of end mark and end mark position, as being risen in the scan line Begin to accord with the position with end mark.
The character includes:
Starting character, end mark and data symbols.
Specifically, after determining the type of the bar code to be decoded, can according to the corresponding starting character of bar code of the type, End mark and the corresponding standard form of data symbols, are matched to scan line coboundary point, determine starting character in scan line, end The position of symbol and data symbols.In embodiments of the present invention, starting character in the scan line of the bar code, knot are determined according to the type of bar code Beam is accorded with and the position of data symbols is prior art, is no longer repeated.
Embodiment 4:
In order to ensure the accuracy to the bar code decoding, on the basis of the various embodiments described above, in the embodiment of the present invention In, it is determined that the method for at least three scan lines includes:
Mode one,
It is described to determine that at least three scan lines include in bar code to be decoded:
For bar code to be decoded, bar code is divided into by least threeth area using first cut-off rule vertical with the bar code Domain, determines at least one scan line in each area.
Specifically, bar code is divided into at least threeth area upwardly through the first cut-off rule in the side perpendicular to the bar code Domain, trizonal size be can be the same or different, and at least one scan line is determined in each area, determine the bar At least three scan lines of code.
Mode two,
It is described to be directed to bar code to be decoded, it is determined that at least three scan lines include:
For bar code to be decoded, using at least three second cut-off rules vertical with the bar code by bar code be divided into Few four regions, it is corresponding every scan line to determine every second cut-off rule.
Specifically, for bar code to be decoded, using at least three second cut-off rules vertical with the bar code by bar code At least four regions are divided into, it is corresponding every scan line to determine every second cut-off rule, obtains the spacing of adjacent scanning lines From at least three equal scan lines.
Embodiment 5:
Fig. 3 is a kind of bar code decoding apparatus structure schematic diagram provided in an embodiment of the present invention, and the device includes:
First determining module 31, for determining at least three scan lines in bar code to be decoded;
Decoder module 32, for being decoded for corresponding each character in every scan line, determines every scan line The number of times occurred for the decoded result of the character, will appear from the most decoded result of number of times as the target decoder knot of the character Really;
Second determining module 33, for the target decoder result according to each character, determines the decoded result of the bar code.
The decoder module 32, if the decoded result non-targeted specifically for being directed to the first character in the first scan line Decoded result, the decoded result for recognizing first character is the second scan line of target decoder result, is swept according to described second The original position of next character adjacent with first character on line is retouched, to next character in first scan line Original position is updated;According to the original position of next character after being updated in first scan line, to described the Next character in scan line is decoded.
Described device also includes:
3rd determining module 34, for for every scan line, according to the starting character and the template of end mark pre-saved, Determine the position of starting character and end mark in the scan line;According to the position of starting character and end mark in the scan line, it is determined that should The position of each character in scan line.
First determining module 31, specifically for for bar code to be decoded, using vertical with the bar code first Bar code is divided at least three regions by cut-off rule, and at least one scan line is determined in each area.
First determining module 31, specifically for for bar code to be decoded, using it is vertical with the bar code at least Three bar code is divided at least four regions by the second cut-off rule, and it is corresponding every scan line to determine every second cut-off rule.
The invention discloses a kind of bar code decoding method and device, methods described includes:Determined in bar code to be decoded At least three scan lines;Decoded for corresponding each character in every scan line, determine that every scan line is directed to the word The number of times that the decoded result of symbol occurs, will appear from the most decoded result of number of times as the target decoder result of the character;According to The target decoder result of each character, determines the decoded result of the bar code.Due in embodiments of the present invention, determining that every is swept The number of times that line occurs for the decoded result of the character is retouched, the most decoded result of number of times is will appear from as the target solution of the character Code result, weaken bar code because fracture, cut, printing quality it is poor, dirty, it is damaged situations such as caused by decoding error and can not decode Influence, improve the accuracy and success rate of bar code decoding.
For systems/devices embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, the application can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the application can be used in one or more computers for wherein including computer usable program code The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The application is the flow with reference to method, equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellent Select embodiment and fall into having altered and changing for the application scope.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (11)

1. a kind of bar code decoding method, it is characterised in that methods described includes:
At least three scan lines are determined in bar code to be decoded;
Decoded for corresponding each character in every scan line, determine that every scan line is directed to the decoded result of the character The number of times of appearance, will appear from the most decoded result of number of times as the target decoder result of the character;
According to the target decoder result of each character, the decoded result of the bar code is determined.
2. the method as described in claim 1, it is characterised in that if being directed to the decoding knot of the first character in the first scan line Fruit non-targeted decoded result, it is described to include for corresponding each character progress decoding in every scan line:
The decoded result for recognizing first character is the second scan line of target decoder result, according in second scan line The original position of the next character adjacent with first character, to the start bit of next character in first scan line Put and be updated;
According to the original position of next character after renewal in first scan line, to the institute in first scan line Next character is stated to be decoded.
3. the method as described in claim 1, it is characterised in that described that at least three scan lines are determined in bar code to be decoded Afterwards, for before corresponding each character is decoded in every scan line, methods described also includes:
For every scan line, according to the starting character and the template of end mark pre-saved, determine in the scan line starting character and The position of end mark;
According to the position of starting character and end mark in the scan line, the position of each character in the scan line is determined.
4. the method as described in claim 1, it is characterised in that described that at least three scan lines are determined in bar code to be decoded Including:
For bar code to be decoded, bar code is divided into by least three regions using first cut-off rule vertical with the bar code, At least one scan line is determined in each area.
5. the method as described in claim 1, it is characterised in that described to be directed to bar code to be decoded, it is determined that at least three scannings Line includes:
For bar code to be decoded, bar code is divided at least four using at least three second cut-off rules vertical with the bar code Individual region, it is corresponding every scan line to determine every second cut-off rule.
6. the method as described in claim 1, it is characterised in that the character includes:
Starting character, end mark and data symbols.
7. a kind of bar code decoding device, it is characterised in that described device includes:
First determining module, for determining at least three scan lines in bar code to be decoded;
Decoder module, for being decoded for corresponding each character in every scan line, determines every scan line for being somebody's turn to do The number of times that the decoded result of character occurs, will appear from the most decoded result of number of times as the target decoder result of the character;
Second determining module, for the target decoder result according to each character, determines the decoded result of the bar code.
8. device as claimed in claim 7, it is characterised in that the decoder module, if specifically in the first scan line The upper decoded result non-targeted decoded result for the first character, the decoded result for recognizing first character is target decoder knot The second scan line of fruit is right according to the original position of next character adjacent with first character in second scan line The original position of next character is updated in first scan line;According to the institute after renewal in first scan line The original position of next character is stated, next character in first scan line is decoded.
9. device as claimed in claim 7, it is characterised in that described device also includes:
3rd determining module, for for every scan line, according to the starting character and the template of end mark pre-saved, it is determined that should The position of starting character and end mark in scan line;According to the position of starting character and end mark in the scan line, the scan line is determined The position of upper each character.
10. device as claimed in claim 7, it is characterised in that first determining module, specifically for for be decoded Bar code, is divided at least three regions by bar code using first cut-off rule vertical with the bar code, determines in each area At least one scan line.
11. device as claimed in claim 7, it is characterised in that first determining module, specifically for for be decoded Bar code, is divided at least four regions by bar code using at least three second cut-off rules vertical with the bar code, determines every Second cut-off rule is corresponding every scan line.
CN201710119932.1A 2017-03-02 2017-03-02 Bar code decoding method and device Active CN107016317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710119932.1A CN107016317B (en) 2017-03-02 2017-03-02 Bar code decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710119932.1A CN107016317B (en) 2017-03-02 2017-03-02 Bar code decoding method and device

Publications (2)

Publication Number Publication Date
CN107016317A true CN107016317A (en) 2017-08-04
CN107016317B CN107016317B (en) 2019-12-24

Family

ID=59440255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710119932.1A Active CN107016317B (en) 2017-03-02 2017-03-02 Bar code decoding method and device

Country Status (1)

Country Link
CN (1) CN107016317B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797647A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Bar code decoding method and device
CN111797642A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Bar code identification method and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5384451A (en) * 1993-01-29 1995-01-24 United Parcel Service Of America, Inc. Method and apparatus for decoding bar code symbols using composite signals
US7314175B1 (en) * 2006-12-20 2008-01-01 Ncr Corporation Methods and apparatus for improved use of partial bar code information to decode a complete bar code
CN101882205A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Bar code image scanning method
US20150332077A1 (en) * 2012-05-25 2015-11-19 Metrologic Instruments, Inc. Laser scanning code symbol reading system employing programmable decode time-window filtering
CN106203216A (en) * 2016-06-30 2016-12-07 杭州晟元数据安全技术股份有限公司 A kind of high-performance bar code decoding method
CN106295443A (en) * 2016-08-03 2017-01-04 浙江华睿科技有限公司 The localization method in a kind of bar code region and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5384451A (en) * 1993-01-29 1995-01-24 United Parcel Service Of America, Inc. Method and apparatus for decoding bar code symbols using composite signals
US7314175B1 (en) * 2006-12-20 2008-01-01 Ncr Corporation Methods and apparatus for improved use of partial bar code information to decode a complete bar code
CN101882205A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Bar code image scanning method
US20150332077A1 (en) * 2012-05-25 2015-11-19 Metrologic Instruments, Inc. Laser scanning code symbol reading system employing programmable decode time-window filtering
CN106203216A (en) * 2016-06-30 2016-12-07 杭州晟元数据安全技术股份有限公司 A kind of high-performance bar code decoding method
CN106295443A (en) * 2016-08-03 2017-01-04 浙江华睿科技有限公司 The localization method in a kind of bar code region and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797647A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Bar code decoding method and device
CN111797642A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Bar code identification method and terminal
CN111797642B (en) * 2020-07-08 2021-06-29 北京京东振世信息技术有限公司 Bar code identification method and terminal
CN111797647B (en) * 2020-07-08 2023-11-03 北京京东振世信息技术有限公司 Bar code decoding method and device

Also Published As

Publication number Publication date
CN107016317B (en) 2019-12-24

Similar Documents

Publication Publication Date Title
CN102880850B (en) A kind of method of Quick Response Code batch scanning and scanning device
EP2849115B1 (en) Method for decoding matrix-type two-dimensional code
US6244764B1 (en) Method for data matrix print quality verification
RU2678485C1 (en) Method of character segmentation and recognition
CN105989317B (en) Two-dimensional code identification method and device
CN106778996A (en) It is embedded with the generation system and method and reading system of the Quick Response Code of visual pattern
CN110909743B (en) Book checking method and book checking system
CN110647956A (en) Invoice information extraction method combined with two-dimensional code recognition
CN107016318B (en) A kind of bar code decoding method and device
CN107016317A (en) A kind of bar code decoding method and device
US20060043189A1 (en) Method and apparatus for determining the vertices of a character in a two-dimensional barcode symbol
CN106909869A (en) A kind of sampling grid partitioning method and device of matrix two-dimensional code
WO2016206446A1 (en) Character encoding method and character decoding method having error correction function and product thereof
CN106991348B (en) A kind of bar code decoding method and device
CN113420580B (en) Method and device for positioning auxiliary locator of two-dimensional code, two-dimensional code scanning equipment and storage medium
CN104217189A (en) Self-learning identification method of barcode used for test strip
CN101882202A (en) Sign character extracting module and method
CN101833645B (en) Bar code decoding method based on code word combination
CN108491914B (en) Bar code generating and identifying method and device, printed matter and electronic equipment
CN112396048A (en) Picture information extraction method and device, computer equipment and storage medium
CN106991347B (en) The localization method and device of identifier word symbol in a kind of bar code
CN101840500A (en) Device based on confidence for code word decoding and method
CN201927028U (en) Code word decoding device based on confidence
US11328194B2 (en) Generation and recognition of barcode
CN107016388A (en) A kind of localization method and device in one-dimension code region

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: C10, No. 1199 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Zhejiang Huarui Technology Co.,Ltd.

Address before: C10, No. 1199 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: ZHEJIANG HUARAY TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder