CN108090390B - Bar code splicing algorithm - Google Patents

Bar code splicing algorithm Download PDF

Info

Publication number
CN108090390B
CN108090390B CN201711453718.6A CN201711453718A CN108090390B CN 108090390 B CN108090390 B CN 108090390B CN 201711453718 A CN201711453718 A CN 201711453718A CN 108090390 B CN108090390 B CN 108090390B
Authority
CN
China
Prior art keywords
pulse data
bar code
laser beam
decoding
splicing
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
CN201711453718.6A
Other languages
Chinese (zh)
Other versions
CN108090390A (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.)
Guangzhou Shangchen Electronic Co ltd
Original Assignee
Guangzhou Shangchen Electronic Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shangchen Electronic Co ltd filed Critical Guangzhou Shangchen Electronic Co ltd
Priority to CN201711453718.6A priority Critical patent/CN108090390B/en
Publication of CN108090390A publication Critical patent/CN108090390A/en
Application granted granted Critical
Publication of CN108090390B publication Critical patent/CN108090390B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The invention discloses a bar code splicing algorithm, which is used for decoding pulse data obtained by two laser beams after splicing the head and the tail of the pulse data; and if the decoding fails, the first pulse data of the pulse data head obtained by the second laser beam returns to the cyclic splicing decoding. When the bar code can not be completely read by the same laser beam due to the fact that the swing speed of the bar code scanning is too high, the capability of code scanning identification can be greatly improved by serially splicing two adjacent laser beams. The obtained second half bar code can not ensure that the first pulse data of the head is effective, or the bar codes obtained by two adjacent laser beams are overlapped, one pulse data is sequentially subtracted from the second half bar code and then spliced until the decoding is successful. Based on the swing speed of the hand, the invention can completely solve the problem that a complete bar code data can be accurately obtained in one scanning process, and the user does not need to scan for many times, thereby improving the user experience.

Description

Bar code splicing algorithm
Technical Field
The invention relates to a bar code scanning method, in particular to a bar code splicing algorithm for a multi-line scanning platform.
Background
The multi-line scanning platform is used for folding an original laser beam into a plurality of laser beams by principles such as optical angle reflection and the like, and each laser beam is the road strength of the same scanning point. So that the bar code can be read only by covering any one laser beam with the bar code. But since the laser scanning the barcode must be a left-to-right or right-to-left process. In the following description of the invention a fixed direction is chosen, i.e. scanning from left to right. When the light spot enters the bar code from the silent area on the left side of the bar code and then is scanned out from the silent area on the right side of the bar code, a finished scanning process is finished.
Generally, the same laser beam must complete the process of entering from the left silence region and then exiting from the right silence region to obtain a complete signal for decoding. However, since the multi-line scanning platform is a fast scanning device, a user may be required to identify a barcode by flashing the barcode in front of the scanning device. So, if the user's scan speed is fast enough, two cases may result: firstly, the method comprises the following steps: although the laser scanning point enters from the left silent area, the user slides too fast, and the laser scanning point is not scanned from the right silent area completely, so that the laser scanning point is obtained as the first half of the bar code. Secondly, the method comprises the following steps: due to the randomness of the sliding entry of the bar code, the light spot may enter from the middle of the bar code and be swept out from the right silent area of the bar code, thus obtaining the latter half of the bar code. In both cases, normal bar codes cannot be analyzed, resulting in poor user experience performance.
Disclosure of Invention
In order to solve the problems in the prior art, the invention aims to provide a barcode splicing algorithm.
The invention relates to a barcode splicing algorithm, which is characterized by comprising the following steps of:
A. identifying a first laser beam (d 1) that scans through the left silent region;
B. identifying a second laser beam (d 2) that scanned through the right silent region;
C. splicing the tail part of the pulse data obtained by the first laser beam with the head part of the pulse data obtained by the second laser beam;
D. decoding the phase-spliced pulse data;
E. if the decoding is successful, uploading the decoded data and ending; if the decoding fails, the next step is carried out;
F. deleting the first pulse data of the head of the pulse data obtained by the second laser beam, and then returning to the step C.
The barcode splicing algorithm has the advantage that when the barcode scanning swing speed of a user is too high and the same laser beam cannot completely read the barcode, the barcode scanning identification capability can be greatly improved by serially splicing two adjacent laser beams. Generally, the moving speed of the hands is much lower than that of the scanning speed, so that the complete bar codes can be directly obtained by direct splicing. However, considering that the obtained second half bar code can not ensure that the first pulse data of the head part is valid, or the bar codes obtained by two adjacent laser beams are overlapped, one pulse data is sequentially subtracted from the second half bar code and then spliced until the decoding is successful. Based on the swing speed of the hand, the invention can completely solve the problem that a complete bar code data can be accurately obtained in one scanning process, and the user does not need to scan for many times, thereby improving the user experience.
Drawings
FIG. 1 is a schematic view of two laser beams respectively obtaining partial barcodes.
Detailed Description
As shown in fig. 1, when no laser beam scans a barcode completely, the barcode stitching algorithm according to the present invention stitches the barcode according to the following method steps. First, the first laser beam d1 scanned through the left silent zone is identified, and then the second laser beam d2 scanned through the right silent zone is identified. Generally, the swinging speed of the human hand is not fast, so the first laser beam and the second laser beam are adjacent laser beams, but for more accurate decoding, the judgment of whether the two laser beams are adjacent or not is carried out. If the laser beams are adjacent, splicing the tail part of the pulse data obtained by the first laser beam with the head part of the pulse data obtained by the second laser beam; and returning to rescan if the adjacent is not. Decoding the phase-spliced pulse data; if the decoding is successful, uploading the decoded data and ending; if the decoding fails, deleting the first pulse data at the head of the pulse data obtained by the second laser beam, and then returning to the splicing step.
Due to the uncertainty of the speed of the human hand and the uncertainty of the position of the laser point entering the barcode, the pulse data obtained by the first laser beam d1 and the pulse data obtained by the second laser beam d2 may overlap, and the problem can still be solved by the barcode splicing method.
Suppose that: the data length of the barcode is 10 bits and the pulse data content of the barcode is L = 0123456789. The first laser beam d1 scans through the left quiet zone to obtain pulse data d1=012345, and the second laser beam d2 scans through the right quiet zone to obtain pulse data d2= 456789. Splicing the pulse data tail obtained by the first laser beam d1 with the pulse data head obtained by the second laser beam d2 results in d1+ d2=012345456789 (12 bits).
The newly spliced bar code digits are not aligned with the original bar code digits, and decoding is not successful. Therefore, the first pulse data at the head of the pulse data obtained by the second laser beam d2 is deleted, the second laser beam d2=56789 is obtained after the deletion, and the new second laser beam d2 is returned to the splicing step for splicing and decoding again.
The resulting length after splicing is still larger than the original barcode length (d 1+ d2=01234556789, 11 bits), so the first pulse data of the pulse data header obtained by the second laser beam d2 is deleted again. And performing a new cycle of barcode splicing to obtain new barcode pulse data d1+ d2= 0123456789. The number of bits is the same as that of the original bar code, and the pulse data consistent with the original bar code is obtained after the decoding is successful, so that the whole decoding process is completed.
It will be apparent to those skilled in the art that various other changes and modifications may be made in the above-described embodiments and concepts and all such changes and modifications are intended to be within the scope of the appended claims.

Claims (2)

1. A barcode splicing algorithm is characterized by comprising the following steps:
A. identifying a first laser beam (d 1) that scans through the left silent region;
B. identifying a second laser beam (d 2) that scanned through the right silent region;
C. splicing the tail part of the pulse data obtained by the first laser beam with the head part of the pulse data obtained by the second laser beam;
D. decoding the phase-spliced pulse data;
E. if the decoding is successful, uploading the decoded data and ending; if the decoding fails, the next step is carried out;
F. deleting the first pulse data of the head of the pulse data obtained by the second laser beam, and then returning to the step C.
2. The barcode stitching algorithm of claim 1, wherein step C determines whether the first laser beam and the second laser beam are adjacent to each other before stitching, if so, stitching is performed, and if not, returning is performed.
CN201711453718.6A 2017-12-28 2017-12-28 Bar code splicing algorithm Active CN108090390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711453718.6A CN108090390B (en) 2017-12-28 2017-12-28 Bar code splicing algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711453718.6A CN108090390B (en) 2017-12-28 2017-12-28 Bar code splicing algorithm

Publications (2)

Publication Number Publication Date
CN108090390A CN108090390A (en) 2018-05-29
CN108090390B true CN108090390B (en) 2021-01-26

Family

ID=62180620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711453718.6A Active CN108090390B (en) 2017-12-28 2017-12-28 Bar code splicing algorithm

Country Status (1)

Country Link
CN (1) CN108090390B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1630717A2 (en) * 1998-03-26 2006-03-01 Symbol Technologies, Inc. One piece optical assembly for low cost optical scanner
CN206133599U (en) * 2016-08-29 2017-04-26 广州卓德信息科技有限公司 Two -dimensional code scanner with pilot lamp

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102034072A (en) * 2009-09-25 2011-04-27 神基科技股份有限公司 Method for identifying barcode image
CN102629312B (en) * 2012-01-10 2014-08-13 广州优库电子有限公司 Omnidirectional multiple line laser bar code reading device and method thereof
US9373018B2 (en) * 2014-01-08 2016-06-21 Hand Held Products, Inc. Indicia-reader having unitary-construction
CN106203216B (en) * 2016-06-30 2018-11-09 杭州晟元数据安全技术股份有限公司 A kind of bar code decoding method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1630717A2 (en) * 1998-03-26 2006-03-01 Symbol Technologies, Inc. One piece optical assembly for low cost optical scanner
CN206133599U (en) * 2016-08-29 2017-04-26 广州卓德信息科技有限公司 Two -dimensional code scanner with pilot lamp

Also Published As

Publication number Publication date
CN108090390A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
US7000838B2 (en) Method for assembling fragments of scanned data
CN101198961B (en) Apparatus and process for two-stage decoding of high-density optical symbols
KR950009492A (en) Barcode Scan Stitching
US20070119944A1 (en) Decoding with data from multiple scans
US20050098632A1 (en) Method of reading a plurality of bar codes during a scanning motion
US20200342060A1 (en) Natural language generating apparatus, vehicle having the same and natural language generating method
CN108090390B (en) Bar code splicing algorithm
CN109300474B (en) Voice signal processing method and device
KR100308415B1 (en) Bar code reading device, bar code reading method and computer readable medium
US7431214B2 (en) Bar-code reader and method of reading bar code
US6283370B1 (en) Bar code reader, bar code reading method and computer readable medium
JPH0981660A (en) Bar code reader and bar code read method
CN114282556A (en) Code scanning system and method based on plug-in
JP5424369B1 (en) Bar code reader, bar code reading method and bar code reading program
JP3711775B2 (en) Bar code reader and program recording medium thereof
CN101840497A (en) RSS barcode decoding method
JPH10240852A (en) Code information reader
JP2641991B2 (en) Data processing method of bar code reader
JPS589471B2 (en) link link
CN114973257A (en) Book reading method, device, equipment and storage medium
JP2001076088A (en) Device and method for reading bar code, and read program recording medium
JPH0439786A (en) Pen type bar-code reader
JPH03217995A (en) Handwritten character recognizer
JPH07334609A (en) Bar code reading device
JPH09167196A (en) Bar code reconstitution device

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