# US 2013/0153665 A1 · Method and Apparatus for Locating and Decoding Machine-Readable Symbols

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

- Number: US 2013/0153665 A1
- Document ID: US20130153665A1
- Status: Published application
- Kind: A1
- Application number: 13/526,819
- Filed: 2012-06-19
- Published: 2013-06-20
- Earliest claimed: 2011-12-20
- Assignees: Seiko Epson Corporation
- Inventors: Yang Yang
- Web page: https://patentgrep.com/patent/US20130153665A1

## CPC

- G06K 7/1443: {locating of the code in an image}
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS

## Abstract

For recognizing two-width barcodes having N bars and N spaces, a first class (cluster) A of wide bars or spaces contains n elements Array [1] to Array [n], and a second class (cluster) B of narrow bars or spaces contains N−n elements Array [n+1] to Array [N] are created. Looping n times where n=1 to N−1, a mean value μA to of class A and a mean value μB of class B are calculated, a between-class difference D=μA−μB is calculated, a value of n when D achieves a maximum value is recorded, and if n=M when D achieves the maximum value, then the N bars or spaces are recognized as a two-width barcode; otherwise, the N bars or spaces are determined as not a two-width barcode.

## Claims

### Claim 1

A method for recognizing two-width barcodes having N bars and N spaces, with each two-width barcode having M wide bars or spaces and N−M narrow bars or spaces, comprising using a processor to:
sort the N bars or spaces according to width in descending order from widest bar or space to narrowest bar or space;
loop n, where n=1 to N−1, wherein a first class A of wide bars or spaces contains n elements Array [1] to Array [n], and a second class B of narrow bars or spaces contains N−n elements Array [n+1] to Array [N];
calculate a mean value μA of class A and a mean value μB of class B, where
μ
A
=
∑
k
=
1
n


Array

[
k
]
n
,

μ
B
=
∑
k
=
n
+
1
N


Array

[
k
]
N
-
n
;
calculate a between-class difference D=μA−μB;
record a value of n when D achieves a maximum value; and
if n=M when D achieves the maximum value, then recognize the N bars or spaces as a two-width barcode; otherwise, determine the N bars or spaces are not a two-width barcode.

### Claim 2 (depends on 1)

A method as in claim 1 wherein N=5 and M=2, and if n=2 when D achieves the maximum value, then recognizing the 5 bars or spaces as an ITF barcode where there are 5 bars and 5 spaces, and among the 5 bars, 2 bars are wide, and among the 5 spaces, 2 spaces are wide.

### Claim 3 (depends on 1)

A method as in claim 1 wherein the processor uses k-means clustering to cluster the bars or spaces into the first class A and the second class B.

### Claim 4

A device for recognizing two-width barcodes having N bars and N spaces, with each two-width barcode having M wide bars or spaces and N−M narrow bars or spaces, comprising:
a unit for inputting an image of N bars and N spaces; and
a processor that:
sorts the N bars or spaces according to width in descending order from widest bar or space to narrowest bar or space;
loops n, where n=1 to N−1, wherein a first class A of wide bars or spaces contains n elements Array [1] to Array [n], and a second class B of narrow bars or spaces contains N−n elements Array [n+1] to Array [N];
calculates a mean value μA of class A and a mean value μB of class B, where
μ
A
=
∑
k
=
1
n


Array

[
k
]
n
,

μ
B
=
∑
k
=
n
+
1
N


Array

[
k
]
N
-
n
;
calculates a between-class difference D=μA−μB;
records a value of n when D achieves a maximum value; and
if n=M when D achieves the maximum value, then recognizes the N bars or spaces as a two-width barcode; otherwise, determines the N bars or spaces are not a two-width barcode.

### Claim 5 (depends on 4)

A device as in claim 4 wherein N=5 and M=2, and if n=2 when D achieves the maximum value, then recognizing the 5 bars or spaces as an ITF barcode where there are 5 bars and 5 spaces, and among the 5 bars, 2 bars are wide, and among the 5 spaces, 2 spaces are wide.

### Claim 6 (depends on 4)

A device as in claim 4 wherein the processor uses k-means clustering to cluster the bars or spaces into the first class A and the second class B.

### Claim 7 (depends on 4)

A device as in claim 4 wherein the unit for inputting an image is a scanner.

### Claim 8 (depends on 4)

A device as in claim 4 further comprising a memory for storing the image.

### Claim 9

One or more tangible, non-transitory computer-readable media embodying instructions executable by a computer to perform a method for recognizing two-width barcodes having N bars and N spaces, with each two-width barcode having M wide bars or spaces and N−M narrow bars or spaces, the method comprising:
sorting the N bars or spaces according to width in descending order from widest bar or space to narrowest bar or space;
looping n, where n=1 to N−1, wherein a first class A of wide bars or spaces contains n elements Array [1] to Array [n], and a second class B of narrow bars or spaces contains N−n elements Array [n+1] to Array [N];
calculating a mean value μA of class A and a mean value μB of class B, where
μ
A
=
∑
k
=
1
n


Array

[
k
]
n
,

μ
B
=
∑
k
=
n
+
1
N


Array

[
k
]
N
-
n
;
calculating a between-class difference D=μA−μB;
recording a value of n when D achieves a maximum value; and
if n=M when D achieves the maximum value, then recognizing the N bars or spaces as a two-width barcode; otherwise, determining the N bars or spaces are not a two-width barcode.

### Claim 10 (depends on 9)

The one or more tangible, non-transitory computer-readable media as in claim 9 wherein N=5 and M=2, and if n=2 when D achieves the maximum value, then recognizing the 5 bars or spaces as an ITF barcode where there are 5 bars and 5 spaces, and among the 5 bars, 2 bars are wide, and among the 5 spaces, 2 spaces are wide.

### Claim 11 (depends on 9)

The one or more tangible, non-transitory computer-readable media as in claim 9 further comprising using k-means clustering to cluster the bars or spaces into the first class A and the second class B.
