Methods and systems for encoding and decoding data in 2D symbology
AssigneeShenzhen Syscan Technology Co. Ltd.
InventorsWai Cheung, Zhi-guo Chang, Shillin Ding, Ying-feng Lv
Life of this patent
Estimating the term…
Abstract
Methods and systems for encoding and decoding a 2D symbol is disclosed. According to one aspect of the 2D symbol, the following characteristics are realized: 1) variable symbol widths and height; 2) variable print resolution, 3) multiple damage protection levels; 4) large information storage; 5) high redundancy; 6) readable by line based scanning devices; 7) recognizable by either contact scanning or non-contact scanning devices. In addition, a set of positioning lines are attached 2D symbol for guiding scanning devices to decode the 2D symbol with proper resolution.
Claims29
A method for encoding a 2D symbol, the method comprising:
- converting binary data into a first bit-stream of codeword data;
- calculating a set of error correction codewords from the first bit-stream based on a predefined error correction level;
- combining the first bit-stream and the set of error correction codewords into a second bit-stream of codeword data;
- dividing the second bit-stream into a set of equally sized data segments;
- adding a set of control information codewords into each of the data segments;
- adding a data segment divider between the data segments;
- providing a top border and a bottom border, a left border and a right border circumscribing the data segments such that the 2D symbol is so created, wherein the top boarder includes at least one start code pattern and only one terminator code pattern along a line, both the start code pattern and the terminator code pattern include alternating light and dark bars in accordance with a predefined rule, and the start code pattern is repeated enough times as necessary to accommodate all of the data segments.
A method for decoding a 2D symbol including a plurality of bars and spaces in a data area representing a bit-stream of codeword data from a binary data file, the data area circumscribed by a top border, a bottom border, a left border and a right border, a plurality of data segment dividers dividing the bit-stream data area into a plurality of data segments, the method comprising:
- scanning the 2D symbol in entirety to produce a stored image;
- searching in the stored image for the top border having at least a start code pattern and a terminator code pattern along a line, wherein the start code pattern and the terminator code pattern include alternating light and dark bars in accordance with a predefined rule, and the start code pattern is repeated enough times, if necessary, to accommodate all of the data segments;
- determining a horizontal axis and a vertical axis of the symbol image based on the start code pattern and the end code pattern;
- calculating a scan line angle between a scan line and the horizontal axis of the stored image;
- determining a print resolution from the stored image;
- locating the plurality of data segment dividers in the stored image;
- retrieving a set of control information from the data segments;
- restoring the bit-stream of codeword data from the data segments;
- and
- converting the bit-stream of codeword data into original binary data file.
A method for decoding a 2D symbol including a plurality of bars and spaces in a data area representing a bit-stream of codeword data from a binary data file, the data area circumscribed by a top border, a bottom border, a left border and a right border, a plurality of data segment dividers dividing the bit-stream data area into a plurality of data segments, the method comprising:
- scanning the 2D-symbol to produce a first scan line in a scanned image;
- searching in the scanned image for the top border having a start code pattern, and the bottom border having an end code pattern;
- switching to a decoding method to scan the 2D symbol in entirety before decoding when the scanned image is determined upside down or is an mirror image;
- (a) scanning the 2D symbol into a scanned image until a first data segment is detected;
- (b) retrieving a set of control information codewords for the first data segment after error-correction;
- (c) switching to the decoding method for the graphic symbol image in entirety if the first data segment is out of sequence, or the bit-stream data area in the first data segment is stored in an interleaved order;
- (d) retrieving the plurality of codeword information in the bit-stream data area using the coordinates of the data elements in the current data segment;
- (e) restoring a first part of the first bit-stream of codeword data for the current data segment;
- repeating steps (a) through (e) for every data segment divider is detected till the bottom border is detected.
A 2D symbol embedding information readable by a scanning device to recover the information, the 2D symbol comprises:
- a data information area;
- a top border and a bottom border, a left border and a right border circumscribing the data information area, both of the top border and the bottom border being directional by embedding at least one start pattern and only a stop pattern, respectively, wherein the start and stop patterns are positioned along a line, and either one of the start and stop patterns includes alternating dark and light bars in accordance with a predefined rule, and the start pattern is repeated enough times, if necessary, to accommodate the data information area including at least a data segment generated from a bit-stream including binary data and error correction codewords;
- and
- wherein, when the bit-stream exceeds a certain line to require two or more data segments, a data segment divider is provided to separate two adjoining data segment.
Dependencies are inferred from the claim text.