# US 5,352,878 A · Method and apparatus for decoding bar code symbols using independent bar and space analysis

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,352,878 A
- Document ID: US5352878A
- Status: Granted
- Kind: A
- Application number: 08/011,458
- Filed: 1993-01-29
- Granted: 1994-10-04
- Earliest claimed: 1993-01-29
- Assignees: United Parcel Service of America, Inc.
- Inventors: Christopher E. Smith; Mihael Klancnik
- Web page: https://patentgrep.com/patent/US5352878A

## CPC

- G06K 7/1443: {locating of the code in an image}
- G06K 7/10851: {Circuits for pulse shaping, amplifying, eliminating noise signals, checking the function of the sensing device (basic electronic circuitry H03)}
- G06K 7/14: using light without selection of wavelength, e.g. sensing reflected white light {(G06K7/10831 - G06K7/1097 take precedence)}
- G06K 7/1465: {using several successive scans of the optical code}
- G06K 7/1486: {Setting the threshold-width for bar codes to be decoded}
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS

## Abstract

A bar code reader decodes a bar code symbol, one character at a time, by analyzing the spaces of each character independently from the bars of each character. The reader determines the widths of each space and each bar. The reader then determines a space-width threshold based on the widths of the spaces and a bar-width threshold based on the widths of the bars. The reader then classifies each space as being either narrow or wide by comparing each space to the space-width threshold. The reader also classifies each bar as being either narrow or wide by comparing each bar to the bar-width threshold. The reader then decodes the character according to the narrow/wide classifications.

## Claims

### Claim 1

A method for decoding a character of a bar code symbol, wherein said character comprises one or more spaces and one or more bars, comprising the steps of:
(a) scanning said symbol to determine the widths of said spaces and the widths of said bars;
(b) determining a space-width threshold in accordance with said widths of said spaces;
(c) determining a bar-width threshold in accordance with said widths of said bars, wherein said space-width threshold is different from said bar-width threshold;
(d) comparing each of said spaces to said space-width threshold;
(e) comparing each of said bars to said bar-width threshold; and
(f) decoding said character in accordance with said comparisons of steps (d) and (e).

### Claim 2 (depends on 1)

The method of claim 1, wherein:
said space-width threshold is the average of the widest of said spaces and the narrowest of said spaces;
said bar-width threshold is the average of the widest of said bars and the narrowest of said bars;
step (d) comprises the step of comparing each of said spaces to said space-width threshold to determine whether each of said spaces is narrow or wide; and
step (e) comprises the step of comparing each of said bars to said bar-width threshold to determine whether each of said bars is narrow or wide.

### Claim 3 (depends on 1)

The method of claim 1, wherein said bar code symbol is a Code 39 symbol and said character comprises four spaces and five bars.

### Claim 4 (depends on 1)

The method of claim 1, wherein said bar code symbol is an Interleaved Code 2 of 5 symbol and said character comprises five spaces and five bars.

### Claim 5 (depends on 1)

The method of claim 1, wherein said bar code symbol is in a pixel image, and step (a) comprises the steps of:
(1) generating a composite signal in accordance with said symbol; and
(2) determining said widths of said spaces and said widths of said bars in accordance with said composite signal.

### Claim 6 (depends on 1)

The method of claim 1, wherein said bar code symbol is in a pixel image, and step (a) comprises the steps of:
(1) generating a whitening gradient signal and a blackening gradient signal in accordance with said symbol; and
(2) determining said widths of said spaces and said widths of said bars in accordance with said whitening and blackening gradient signals.

### Claim 7 (depends on 1)

The method of claim 1, wherein said bar code symbol is in a binary pixel image and further comprising the step of locating said symbol in said image using byte-based searching for a quiet zone of said symbol.

### Claim 8 (depends on 1)

The method of claim 1, wherein said bar code symbol is in a binary pixel image and further comprising the step of locating said symbol in said image using byte-based searching for a plurality of bright/dark transitions of said symbol.

### Claim 9

An apparatus for decoding a character of a bar code symbol, wherein said character comprises one or more spaces and one or more bars, comprising:
(a) means for scanning said symbol to determine the widths of said spaces and the widths of said bars;
(b) means for determining a space-width threshold in accordance with said widths of said spaces;
(c) means for determining a bar-width threshold in accordance with said widths of said bars, wherein said space-width threshold is different from said bar-width threshold;
(d) means for comparing each of said spaces to said space-width threshold;
(e) means for comparing each of said bars to said bar-width threshold; and
(f) means for decoding said character in accordance with said comparisons of means (d) and (e).

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein:
said space-width threshold is the average of the widest of said spaces and the narrowest of said spaces;
said bar-width threshold is the average of the widest of said bars and the narrowest of said bars;
means (d) comprises means for comparing each of said spaces to said space-width threshold to determine whether each of said spaces is narrow or wide; and
means (e) comprises means for comparing each of said bars to said bar-width threshold to determine whether each of said bars is narrow or wide.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is a Code 39 symbol and said character comprises four spaces and five bars.

### Claim 12 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is an Interleaved Code 2 of 5 symbol and said character comprises five spaces and five bars.

### Claim 13 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is in a pixel image, and means (a) comprises:
(1) means for generating a composite signal in accordance with said symbol; and
(2) means for determining said widths of said spaces and said widths of said bars in accordance with said composite signal.

### Claim 14 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is in a pixel image, and means (a) comprises:
(1) means for generating a whitening gradient signal and a blackening gradient signal in accordance with said symbol; and
(2) means for determining said widths of said spaces and said widths of said bars in accordance with said whitening and blackening gradient signals.

### Claim 15 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is in a binary pixel image and further comprising means for locating said symbol in said image using byte-based searching for a quiet zone of said symbol.

### Claim 16 (depends on 9)

The apparatus of claim 9, wherein said bar code symbol is in a binary pixel image and further comprising means for locating said symbol in said image using byte-based searching for a plurality of bright/dark transitions of said symbol.
