摘要 |
PROBLEM TO BE SOLVED: To improve the decoding accuracy of a barcode by determining a wide element and a narrow element of a two-width type barcode by using a clustering method.SOLUTION: A first class (cluster) A of a wide bar or a wide space including n elements Array[1] to Array[n], and a second class (cluster) B of a narrow bar or a narrow space including N-n elements Array[n+1] to Array[N] are created so as to recognize a two-width type barcode having N bars and N spaces. An average value μof the class A and an average value μof the class B are calculated by performing a loop n times (n=1 to N-1), interclass difference D=μ-μis calculated, the value of n when D is a maximum value is recorded, if n=M when D is the maximum value, the N bars or N spaces are recognized as a two-width type barcode, and in the other cases, the N bars or N spaces are determined as not being a two-width type barcode. |