JP2903792B2 - Barcode reader - Google Patents

Barcode reader

Info

Publication number
JP2903792B2
JP2903792B2 JP3220464A JP22046491A JP2903792B2 JP 2903792 B2 JP2903792 B2 JP 2903792B2 JP 3220464 A JP3220464 A JP 3220464A JP 22046491 A JP22046491 A JP 22046491A JP 2903792 B2 JP2903792 B2 JP 2903792B2
Authority
JP
Japan
Prior art keywords
character
pattern
value
bar
width
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.)
Expired - Fee Related
Application number
JP3220464A
Other languages
Japanese (ja)
Other versions
JPH0562005A (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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP3220464A priority Critical patent/JP2903792B2/en
Publication of JPH0562005A publication Critical patent/JPH0562005A/en
Application granted granted Critical
Publication of JP2903792B2 publication Critical patent/JP2903792B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、バーコード情報のバー
およびスペースのパターンの幅を測定し、測定結果に基
づいてキャラクタパターンを順次解析しキャラクタを判
読するバーコード読取装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bar code reader which measures the width of a bar and space pattern of bar code information, sequentially analyzes a character pattern based on the measurement result, and reads the character.

【0002】[0002]

【従来の技術】従来、UPC系、EAN系のバーコード
をデコードする装置として、例えば特開昭60−108
978号公報記載の装置が知られている。従来装置では
以下のようにしてバーコードの読み取りが実行される。
図2にバーコードの要部を拡大して示す。まず、1個の
キャラクタを示す2本のスペースと2本のバーの各々の
幅b,c,d,eを測定する。そして、1本目のバーの
幅cと2本目のスペースの幅dとの和、さらに2本目の
スペースの幅dと2本目のバーの幅eとの和などからキ
ャラクタを判別する。ただし、この手法だけでは数字
「1」と数字「7」との区別、さらに数字「2」と数字
「8」との区別がつかない。そこで、従来装置ではこれ
ら区別のつかない数字が候補に挙がった場合、さらに1
本目および2本目のスペースの幅の和(b+d)から、
1本目および2本目のバーの幅の和(c+e)を減算
し、この減算値をしきい値と比較することで、数字
「1」,「2」の判別、あるいは数字「7」,「8」の
判別を可能にしている。
2. Description of the Related Art Conventionally, as an apparatus for decoding UPC-based and EAN-based bar codes, for example, Japanese Patent Application Laid-Open No. 60-108
An apparatus described in Japanese Patent No. 978 is known. In the conventional device, the barcode is read as follows.
FIG. 2 is an enlarged view of a main part of the barcode. First, the widths b, c, d, and e of two spaces and two bars representing one character are measured. Then, the character is determined from the sum of the width c of the first bar and the width d of the second space, and the sum of the width d of the second space and the width e of the second bar. However, this technique alone cannot distinguish between the number “1” and the number “7”, and further cannot distinguish between the number “2” and the number “8”. Therefore, if these indistinguishable numbers are listed as candidates in the conventional device, one more
From the sum (b + d) of the widths of the second space and the second space,
By subtracting the sum (c + e) of the widths of the first and second bars and comparing the subtracted value with a threshold value, it is possible to determine the numbers “1” and “2” or to determine the numbers “7” and “8”. "Can be determined.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来装置では、バーコードの印刷の際ににじみ等により生
じるバーやスペースの太りまたは細りに起因する誤読が
発生するという問題がある。つまり、各バーの幅c,e
が両側で公称値よりそれぞれΔ3,Δ4,Δ5,Δ6だ
け太っているとすると、所定しきい値と比較する減算値
は、公称値から算出した減算値にさらに2×(Δ3+Δ
4+Δ5+Δ6)という大きな値を減算した値となる。
したがって、Δnの大きさによっては誤読が生じてしま
う。
However, the above-mentioned conventional apparatus has a problem that erroneous reading occurs due to thickening or thinning of a bar or space caused by bleeding or the like when printing a barcode. That is, the width c, e of each bar
Is larger than the nominal value on both sides by Δ3, Δ4, Δ5, and Δ6, respectively, the subtraction value to be compared with the predetermined threshold value is 2 × (Δ3 + Δ
4 + Δ5 + Δ6).
Therefore, erroneous reading may occur depending on the magnitude of Δn.

【0004】本発明は上記課題を解決し、バーやスペー
スの太りや細りに起因する誤読のおそれを解消すること
を目的とする。
An object of the present invention is to solve the above-mentioned problems and to eliminate the possibility of erroneous reading caused by a thick or thin bar or space.

【0005】[0005]

【課題を解決するための手段及び作用】本発明のバーコ
ード読取装置は、図1に例示するように、バーコード情
報のバーおよびスペースのパターンの幅を測定する測定
手段と、該測定手段が測定した結果に基づいて前記パタ
ーンの並びが構成する複数のキャラクタパターンを順次
解析し各キャラクタパターンが示すキャラクタを判読す
る解析手段と、該解析手段が判読したキャラクタによ
り、前記バーコード情報を読取る読取手段とを備えるバ
ーコード読取装置において、前記解析手段による解析の
結果、デコード対象のキャラクタパターンに対して候補
のキャラクタが複数挙げられた場合、該デコード対象の
キャラクタパターンの最初の1本のパターンの幅の測定
値と、該デコード対象のキャラクタパターンの直前の1
本のパターンの幅の測定値とを加算し、さらに該加算値
から前記直前の1本のパターンの幅の公称値を減算した
減算値を算出する減算値算出手段と、前記候補のキャラ
クタに対応する各キャラクタパターンのうちで最初の1
本のパターンの公称値が前記減算値と近似するキャラク
タパターンを選択し、該選択したキャラクタパターンの
対応キャラクタを前記デコード対象のキャラクタパター
ンが示すキャラクタとして判読して、前記読取手段へこ
の選択されたキャラクタを出力するキャラクタ選択手段
とを備えることを特徴とする。
As shown in FIG. 1, a bar code reader according to the present invention has a measuring means for measuring the width of a bar and space pattern of bar code information, and the measuring means comprises: Analyzing means for sequentially analyzing a plurality of character patterns constituting the pattern arrangement based on the measured result and reading the character indicated by each character pattern; and reading means for reading the barcode information by the character read by the analyzing means. And a bar code reading apparatus comprising: a plurality of candidate characters for the decoding target character pattern as a result of the analysis by the analysis unit; The measured value of the width and the one immediately before the character pattern to be decoded
A subtraction value calculating means for adding a measured value of the width of the pattern and calculating a subtraction value obtained by subtracting the nominal value of the width of the immediately preceding pattern from the added value; First one of each character pattern
A character pattern whose nominal value of the book pattern is close to the subtraction value is selected, a character corresponding to the selected character pattern is read as a character indicated by the character pattern to be decoded, and the selected character is read by the reading means. And character selecting means for outputting a character.

【0006】上記構成においては、測定手段がバーコー
ド情報のバーおよびスペースのパターンの幅を測定す
る。そして、測定手段が測定した結果に基づいて、解析
手段が、パターンの並びが構成する複数のキャラクタパ
ターンを順次解析し各キャラクタパターンが示すキャラ
クタを判読する。
In the above arrangement, the measuring means measures the width of the bar and space pattern of the bar code information. Then, based on the result measured by the measuring means, the analyzing means sequentially analyzes a plurality of character patterns constituting the pattern arrangement and interprets the character indicated by each character pattern.

【0007】解析手段における解析の手法としては公知
の種々の手法が利用される。例えば従来技術において記
載した手法が利用される。この公知手法による解析の結
果、デコード対象のキャラクタパターンに対して候補の
キャラクタが複数挙げられることがある。従来技術にお
いて記載した手法によれば、数字「1」と数字「7」と
の区別がつかず共に候補のキャラクタとして挙げられ
る。数字「2」と数字「8」とについても同様に共に候
補に挙げられる。
Various well-known techniques are used as an analysis technique in the analysis means. For example, the method described in the related art is used. As a result of the analysis by the known method, a plurality of candidate characters may be listed for the character pattern to be decoded. According to the method described in the related art, the number “1” and the number “7” cannot be distinguished from each other and are both considered as candidate characters. Similarly, the numeral “2” and the numeral “8” are both candidates.

【0008】減算値算出手段は、このように候補のキャ
ラクタが複数挙げられた場合、デコード対象のキャラク
タパターンの最初の1本のパターンの幅の測定値と、デ
コード対象のキャラクタパターンの直前の1本のパター
ンの幅の測定値とを加算し、さらに加算値から直前の1
本のパターンの幅の公称値を減算した減算値を算出す
る。ここで減算値算出手段が算出する減算値を、図2に
したがい説明する。図2に示すように各バーや各スペー
スは太りや細りを生じている。各バーa,c,eの両側
には太り成分Δ1〜Δ6(あるいは細り成分)がある。
一般にこうした太りあるいは細りは、印刷機械のくせ等
により発生するため、各バーa,c,eの太り成分Δ
1,Δ3,Δ5(あるいは細り成分)の幅はほぼ等し
い。したがって、デコード対象のキャラクタパターンの
最初の1本のパターンbと直前の1本のパターンaとを
加算した加算値(a+b)から、直前の1本のパターン
の公称値Aを減算した減算値は、 (a+b)−A=(Δ1+A+Δ2+b)−A =Δ1+Δ2+b≒Δ2+b+Δ3 となる。これはデコード対象のキャラクタパターンの最
初の1本のパターンの測定値、つまりスペースの幅bに
太り成分(あるいは細り成分)Δ2,Δ3を加えて細り
(あるいは太り)の影響を補償した値で、このスペース
の公称値Bに充分近い値となる。
When a plurality of candidate characters are listed, the subtraction value calculation means calculates the measured value of the width of the first one of the character patterns to be decoded and the one immediately before the character pattern to be decoded. The measured value of the width of the pattern of the book is added, and the one
A subtraction value is calculated by subtracting the nominal value of the width of the book pattern. Here, the subtraction value calculated by the subtraction value calculation means will be described with reference to FIG. As shown in FIG. 2, each bar and each space are thick and thin. There are thick components Δ1 to Δ6 (or thin components) on both sides of each bar a, c, e.
Generally, such thickening or thinning occurs due to the habit of a printing machine or the like, and thus the thickening component Δ of each of the bars a, c, and e.
The width of 1, Δ3, Δ5 (or the narrow component) is substantially equal. Therefore, a subtraction value obtained by subtracting the nominal value A of the immediately preceding pattern from the sum (a + b) obtained by adding the first one pattern b of the character pattern to be decoded and the immediately preceding pattern a is: , (A + b) −A = (Δ1 + A + Δ2 + b) −A = Δ1 + Δ2 + b ≒ Δ2 + b + Δ3 This is the measured value of the first pattern of the character pattern to be decoded, that is, the value obtained by adding the thick components (or thin components) Δ2 and Δ3 to the width b of the space to compensate for the effect of the thin (or thick). This value is sufficiently close to the nominal value B of this space.

【0009】キャラクタ選択手段は、候補のキャラクタ
に対応する各キャラクタパターンのうちで最初の1本の
パターンの公称値が上記減算値と近似するキャラクタパ
ターンを選択し、選択したキャラクタパターンの対応キ
ャラクタをデコード対象のキャラクタパターンが示すキ
ャラクタとして判読する。そして、選択されたキャラク
タを読取手段に出力する。読取手段はそのキャラクタに
よりバーコード情報を読み取る。減算値は上述のように
公称値と充分近い値であるから、このように公称値との
近似をみることにより、バーやスペースの太りや細りの
影響を排除した精度の高い読取が可能になる。
The character selection means selects a character pattern in which the nominal value of the first one of the character patterns corresponding to the candidate character is close to the subtraction value, and selects a character corresponding to the selected character pattern. It is interpreted as a character indicated by the character pattern to be decoded. Then, the selected character is output to the reading means. The reading means reads bar code information by the character. Since the subtraction value is a value sufficiently close to the nominal value as described above, by reading the approximation with the nominal value in this way, it is possible to perform high-precision reading without the influence of the thickening or thinning of the bar or space. .

【0010】[0010]

【実施例】以下、本発明の一実施例を説明する。図3に
実施例のバーコード読取装置の要部のブロック図を示
す。バーコード読取装置は、図示のように中央処理装置
1、センサ出力信号処理回路3、CCDイメージセンサ
5、センサ駆動回路7、光学系9、LED11、LED
駆動回路13、インタフェース回路15等を備える。中
央処理装置1はCPU,ROM,RAMなどを中心に構
成されるコンピュータである。ROMには予め後述の各
種処理のソフトウェアや読取処理で参照されるテーブル
などが格納されている。中央処理装置1は上記ソフトウ
ェアを実行することで、周辺回路の制御、およびバーコ
ードBの幅数ならびにバーコードBの解析などを行な
う。解析したデータはインタフェース回路15を介して
POS等の外部機器(読取手段に相当)に出力される。
センサ出力信号処理回路3はCCDイメージセンサ5の
出力信号を増幅したり、出力信号をデジタル信号化す
る。光学系9はレンズ、ミラー、絞り等からなり、バー
コードBの像をCCDイメージセンサ5に結像させる。
LED11はバーコードBの照明用の光源であって、L
ED駆動回路13により駆動される。
An embodiment of the present invention will be described below. FIG. 3 is a block diagram of a main part of the barcode reading device according to the embodiment. The bar code reader includes a central processing unit 1, a sensor output signal processing circuit 3, a CCD image sensor 5, a sensor driving circuit 7, an optical system 9, an LED 11, an LED
It includes a drive circuit 13, an interface circuit 15, and the like. The central processing unit 1 is a computer mainly including a CPU, a ROM, a RAM, and the like. The ROM previously stores software for various processes to be described later, a table referred to in the reading process, and the like. CPU 1 by executing the software, the control of the peripheral circuits, and performs such as a bar code width counting and analysis of the bar code B of the B. The analyzed data is output to an external device such as a POS (corresponding to a reading unit) via the interface circuit 15.
The sensor output signal processing circuit 3 amplifies the output signal of the CCD image sensor 5 and converts the output signal into a digital signal. The optical system 9 includes a lens, a mirror, an aperture, and the like, and forms an image of the barcode B on the CCD image sensor 5.
The LED 11 is a light source for illuminating the bar code B.
Driven by the ED drive circuit 13.

【0011】上記中央処理装置1は、LED駆動回路1
3およびセンサ駆動回路3を制御してバーコードBのバ
ーおよびスペースの幅データをセンサ出力信号処理装置
3から取り込み、以下のようにバーコードの解析を行な
う。バーコードの解析処理の一例として、センターバー
の左側にあるキャラクタをデコードする様子を以下に説
明する。
The central processing unit 1 includes an LED driving circuit 1
3 and the sensor drive circuit 3 to capture the bar and space width data of the bar code B from the sensor output signal processing device 3, and analyze the bar code as follows. As an example of the barcode analysis processing, the decoding of a character on the left side of the center bar will be described below.

【0012】中央処理装置のCPUはデコード処理ルー
チン(図4)を開始すると、まず、バーコードの測定要
素a,b,c,d,eの測定処理(S100,S11
0,S120,S130,S140)を実行する。測定
要素aは、今からデコードを行なうキャラクタパターン
の直前の一本のバーの幅である。なお、この直前の一方
のバーの幅の公称値をAとする。測定要素b,c,d,
eは、それぞれ今からデコードを行なうキャラクタパタ
ーンの1本目のスペースの測定値、1本目のバーの測定
値、2本目のスペースの測定値、2本目のバーの測定値
である。
When the CPU of the central processing unit starts the decoding processing routine (FIG. 4), first, the measurement processing of the bar code measurement elements a, b, c, d, and e (S100, S11).
0, S120, S130, S140). The measurement element a is the width of one bar immediately before the character pattern to be decoded. The nominal value of the width of one of the bars just before this is A. Measuring elements b, c, d,
e is the measured value of the first space, the measured value of the first bar, the measured value of the second space, and the measured value of the second bar of the character pattern to be decoded.

【0013】次に、比較値M1,M2を演算する(S1
50,S160)。比較値M1には1本目のバーの幅の
測定値と2本目のスペースの幅の測定値との和がセット
される(S150)。判断値M2には2本目のスペース
の幅の測定値と2本目のバーの幅の測定値との和がセッ
トされる(S160)。
Next, the comparison values M1 and M2 are calculated (S1
50, S160). The sum of the measured value of the width of the first bar and the measured value of the width of the second space is set as the comparison value M1 (S150). The sum of the measured value of the width of the second space and the measured value of the width of the second bar is set as the determination value M2 (S160).

【0014】次に、比較値M1,M2を公知手法により
判断し(S170)、比較値M1,M2が数字「1,
2,7,8」以外のキャラクタである判断すれば、その
キャラクタの判別処理を実行する(S180)。一方、
比較値M1,M2が数字「1」と数字「7」、あるいは
数字「2」と数字「8」のいずれかであると判断した場
合(S170)、いずれの場合も比較値M4を演算する
処理を実行する(S190,S200)。比較値M4に
は、直前の1本のバーの幅の測定値aと1本目のスペー
スの幅の測定値bとの和から、直前の1本のバーの公称
値Aを減算した値がセットされる。
Next, the comparison values M1 and M2 are determined by a known method (S170), and the comparison values M1 and M2 are set to the numbers "1,"
If it is determined that the character is a character other than "2, 7, 8", a determination process for that character is executed (S180). on the other hand,
When it is determined that the comparison values M1 and M2 are either the number “1” and the number “7” or the number “2” and the number “8” (S170), the processing of calculating the comparison value M4 in any case. Is executed (S190, S200). The comparison value M4 is set to a value obtained by subtracting the nominal value A of the immediately preceding bar from the sum of the measured value a of the immediately preceding bar and the measured value b of the first space. Is done.

【0015】次に、比較値M4をしきい値Sと比較する
(S210,S220)。しきい値Sは、表1のごとく
予め設定され、ROMに格納されている。
Next, the comparison value M4 is compared with the threshold value S (S210, S220). The threshold value S is set in advance as shown in Table 1 and stored in the ROM.

【0016】[0016]

【表1】 [Table 1]

【0017】例えば、このデコード処理ルーチン(図
4)はセンターバーの左側にあるキャラクタを対象とし
ている。センターバーの左側でODDパリティとする
と、数字「2」と数字「8」とを判別する場合は、しき
い値S=1.5と比較値M4とを比較する(S21
0)。比較値M4がしきい値Sより小さければ(S21
0)、数字「8」を設定する処理(S240)を実行
し、M4がしきい値S以上であれば(S210)、数字
「2」を設定する処理(S230)を実行して、本ルー
チンを終了する。一方、数字「1」と数字「7」とを判
別する場合は、しきい値S=1.5とM4の値とを比較
する(S220)。そして、M4がしきい値Sより小さ
ければ(S220)、数字「7」を設定する処理(S2
60)を実行し、M4がしきい値S以上であれば(S2
20)、数字「1」を設定する処理(S250)を実行
して、本ルーチンを終了する。
For example, this decoding processing routine (FIG. 4) targets a character on the left side of the center bar. Assuming that ODD parity is set on the left side of the center bar, when determining the number “2” and the number “8”, the threshold value S = 1.5 is compared with the comparison value M4 (S21).
0). If the comparison value M4 is smaller than the threshold value S (S21
0), the process of setting the number "8" (S240) is executed, and if M4 is equal to or larger than the threshold value S (S210), the process of setting the number "2" (S230) is executed, and this routine is executed. To end. On the other hand, when determining the number “1” and the number “7”, the threshold value S = 1.5 is compared with the value of M4 (S220). If M4 is smaller than the threshold value S (S220), the process of setting the number "7" (S2)
60), and if M4 is greater than or equal to the threshold value S (S2
20), the process of setting the number “1” (S250) is executed, and this routine ends.

【0018】即ち、数字「2」,「8」の判別がつかな
い場合、または数字「1」,「7」の判別がつかない場
合、デコードを行なうキャラクタパターンの直前の1本
のバーの測定値と公称値とを利用することで、上記数字
「2」,「8」、または数字「1」,「7」の判別が実
行される。この実施例の事例について、図2を使用して
以下に説明する。各バーa,c,eの両側には太り成分
(あるいは細り成分)Δ1〜Δ6がある。既述したよう
に、一般にこうした太りあるいは細りは印刷機械のくせ
等により発生するため、各バーa,c,eの太り成分
(あるいは細り成分)Δ1,Δ3,Δ5の幅はほぼ等し
い。したがって、上記デコード処理ルーチンのステップ
S190,S200において演算される比較値M4は次
式のとおり、今から判別するキャラクタパターンの1本
目のスペースの公称値に極めて近い値となる。
That is, when the numbers “2” and “8” cannot be determined, or when the numbers “1” and “7” cannot be determined, the measurement of one bar immediately before the character pattern to be decoded is performed. By using the value and the nominal value, the determination of the numbers “2” and “8” or the numbers “1” and “7” is performed. An example of this embodiment will be described below with reference to FIG. There are thick components (or thin components) Δ1 to Δ6 on both sides of each bar a, c, e. As described above, since such thickening or thinning generally occurs due to the habit of a printing machine or the like, the widths of thickening components (or thinning components) Δ1, Δ3, and Δ5 of the bars a, c, and e are substantially equal. Therefore, the comparison value M4 calculated in steps S190 and S200 of the decoding processing routine is very close to the nominal value of the first space of the character pattern to be determined from now, as shown in the following equation.

【0019】 M4=(a+b)−A=(Δ1+A+Δ2+b)−A =Δ1+Δ2+b≒Δ2+b+Δ3=B キャラクタパターンの1本目のスペースの公称値Bは、
表1に示すように、各数字で異なる。したがって、候補
のキャラクタの公称値Bどうしを区別するしきい値と上
記M4とを比較することで、比較値M1,M2からでは
判断できない数字「1」,「7」、数字「2」,「8」
がバーおよびスペースの太りや細りに影響されることな
く判読できるのである。
M4 = (a + b) −A = (Δ1 + A + Δ2 + b) −A = Δ1 + Δ2 + b ≒ Δ2 + b + Δ3 = B The nominal value B of the first space of the character pattern is
As shown in Table 1, each number differs. Therefore, by comparing the threshold value for distinguishing between the nominal values B of the candidate characters with the above-mentioned M4, the numbers “1”, “7”, “2”, “2”, which cannot be determined from the comparison values M1 and M2. 8 "
Can be read without being affected by the weight and thickness of the bars and spaces.

【0020】なお、上述の処理で使用される直前の1本
のバーの公称値Aは以下のようにして得られる。デコー
ドを行なうキャラクタパターンの直前のパターンには、
ガードバー、センターバー、キャラクタの3種類があ
る。以下に、直前のパターンの種類に応じて公称値を求
める処理を説明する。ここでは読取コード種をEAN−
13、デコード方向は左側のガードバーから右側のガー
ドバーへの1方向とする。もちろん、他のUPC、EA
Nコード、他のデコード方向についても同様な方法でデ
コードされる。
It should be noted that the nominal value A of one bar immediately before being used in the above processing is obtained as follows. The pattern immediately before the character pattern to be decoded includes
There are three types: guard bar, center bar, and character. In the following, a process for obtaining a nominal value according to the type of the immediately preceding pattern will be described. Here, the read code type is EAN-
13. The decoding direction is one direction from the left guard bar to the right guard bar. Of course, other UPC, EA
The N code and other decoding directions are decoded in the same manner.

【0021】図5に左ガードバー公称値設定処理ルーチ
ン、図6にキャラクタパターン公称値設定処理ルーチ
ン、図7にセンターバー公称値設定処理ルーチン、図8
に右ガードバー判別処理ルーチンのフローチャートを示
す。バーコード読取時には、デコード方向が左側から右
側への1方向であるため、まず、図5の左ガードバー公
称値設定処理ルーチンが起動される。
FIG. 5 shows a left guard bar nominal value setting processing routine, FIG. 6 shows a character pattern nominal value setting processing routine, FIG. 7 shows a center bar nominal value setting processing routine, and FIG.
9 shows a flowchart of the right guard bar determination processing routine. At the time of reading a barcode, since the decoding direction is one direction from the left side to the right side, first, the left guard bar nominal value setting processing routine of FIG. 5 is started.

【0022】該ルーチンを起動すると、最初にマージン
を探す(S300)。そして、マージンの次の2本のバ
ーとバーで挟まれた1本のスペースの各々の幅を測定
し、さらに、その測定値を加算し加算値を変数Jにセッ
トする(S310)。次に、ステップS310で測定し
た測定対象の直後にある2本のスペースと2本のバーの
各々の幅を測定し、その測定値を加算して加算値を変数
Kにセットする(S320)。
When the routine is started, a margin is searched first (S300). Then, the width of each of the next two bars of the margin and one space sandwiched between the bars is measured, and the measured values are added, and the added value is set as a variable J (S310). Next, the width of each of the two spaces and the two bars immediately after the measurement object measured in step S310 is measured, the measured values are added, and the added value is set as a variable K (S320).

【0023】次に、変数Kを所定式に代入して得られる
範囲に変数Jの値が収まるか否かを判断し(S33
0)、収まれば、最初の2本のバーとバーで挟まれた1
本のスペースとはガードバーであると判定する(S34
0)。そして、ガードバーの2本目のバーの公称値を1
モジュールとし(S350)、本ルーチンを終了する。
変数Jが上記所定範囲に収まらなければ(S330)、
EAN−13コードでないと判断して(S360)、本
ルーチンを終了する。
Next, it is determined whether or not the value of the variable J falls within a range obtained by substituting the variable K into a predetermined formula (S33).
0), if fit, 1 sandwiched between the first two bars
It is determined that the book space is a guard bar (S34)
0). Then, the nominal value of the second guard bar is set to 1
The module is set as a module (S350), and this routine ends.
If the variable J does not fall within the predetermined range (S330),
It is determined that the code is not the EAN-13 code (S360), and this routine ends.

【0024】以上のようにしてガードバーの2本目のバ
ーの公称値が得られる。得られた公称値は、既述したデ
コード処理ルーチン(図3)の実行時、ガードバーに続
く最初のキャラクタパターンのデコードの際に利用され
る。次に、最初のキャラクタに続く以降のキャラクタの
デコードの際、起動されるキャラクタパターン公称値設
定処理ルーチン(図6)を説明する。
As described above, the nominal value of the second guard bar is obtained. The obtained nominal value is used at the time of decoding the first character pattern following the guard bar when executing the above-described decoding processing routine (FIG. 3). Next, a description will be given of a character pattern nominal value setting processing routine (FIG. 6) which is activated when decoding a character subsequent to the first character.

【0025】該ルーチン(図6)を起動すると、まず、
先のデコード処理ルーチン(図4)の実行により決定し
たキャラクタを読み出す(S400)。そして、そのキ
ャラクタの最後の1本のバーの公称値をROMに予め格
納されたテーブル(表2,表3)から読み出し、次のキ
ャラクタデコード時の直前の1本のバーの公称値として
セットする(S410)。公称値は、表2,表3に示す
ようにキャラクタの位置(センターバーの左側か右側
か)、パリティの種類、キャラクタという3種の条件か
ら特定される。
When the routine (FIG. 6) is started, first,
The character determined by executing the preceding decoding process routine (FIG. 4) is read (S400). Then, the nominal value of the last bar of the character is read from the table (Tables 2 and 3) stored in the ROM in advance, and is set as the nominal value of the bar immediately before decoding the next character. (S410). As shown in Tables 2 and 3, the nominal value is specified from three types of conditions: the position of the character (left or right of the center bar), the type of parity, and the character.

【0026】[0026]

【表2】 [Table 2]

【0027】[0027]

【表3】 [Table 3]

【0028】以上のようにして今からデコードしようと
するキャラクタパターンの直前のキャラクタパターンの
最後のバーの公称値が得られる。得られた公称値は、既
述したデコード処理ルーチン(図4)の実行時、利用さ
れる。以上の各ルーチンの実行によりキャラクタの判別
が進む途中、6個目のキャラクタを判別した時点で、セ
ンターバー公称値設定処理ルーチン(図7)を起動す
る。センターバー公称値設定処理ルーチンを起動する
と、まず、6個目のキャラクタパターンの2本のスペー
スと、2本のバーの各々の幅の測定値を加算し、加算値
を変数Mにセットする(S500)。6個目のキャラク
タパターンに続く3本のスペースと2本のバーの各々の
幅を測定し、さらに、その測定値を加算し、加算値を変
数Nにセットする(S510)。
As described above, the nominal value of the last bar of the character pattern immediately before the character pattern to be decoded is obtained. The obtained nominal value is used at the time of executing the above-described decoding processing routine (FIG. 4). While the determination of the characters is progressing by executing the above-described routines, the center bar nominal value setting processing routine (FIG. 7) is started when the sixth character is determined. When the center bar nominal value setting processing routine is started, first, the two space values of the sixth character pattern and the measured values of the widths of the two bars are added, and the added value is set in a variable M ( S500). The width of each of the three spaces and the two bars following the sixth character pattern is measured, the measured values are added, and the added value is set as a variable N (S510).

【0029】次に、変数Nを所定式に代入して得られる
範囲に変数Mが収まるか否かを判断し(S520)、収
まれば、3本のスペースと2本のバーとはセンターバー
であると判定し(S530)、5本のうち最後のスペー
の公称値を1モジュールとし(S540)、本ルーチ
ンを終了する。変数Mが上記所定範囲に収まらなければ
(S520)、EAN−13コードでないと判断して
(S550)、本ルーチンを終了する。
Next, it is determined whether or not the variable M falls within a range obtained by substituting the variable N into a predetermined equation (S520). If the variable M falls within the range, the three spaces and the two bars are replaced by the center bar. It is determined that there is (S530), and the last space out of the five
The nominal value of the scan was a 1 module (S540), and terminates this routine. If the variable M does not fall within the predetermined range (S520), it is determined that the code is not an EAN-13 code (S550), and the routine ends.

【0030】以上のようにしてセンターバーの最後のス
ペースの公称値が得られる。得られた公称値は、既述し
たデコード処理ルーチン(図4)の実行時、利用され
る。以上の各ルーチンの実行によりキャラクタの判別が
進み、センターバーから6個目のキャラクタを判別した
時点で、右ガードバー判別処理ルーチン(図8)を起動
する。
As described above, the nominal value of the last space of the center bar is obtained. The obtained nominal value is used at the time of executing the above-described decoding processing routine (FIG. 4). The execution of each of the above-described routines advances the determination of the character. When the sixth character from the center bar is determined, the right guard bar determination processing routine (FIG. 8) is started.

【0031】最初に、センターバーから6個目のキャラ
クタパターンの2本のスペースと2本のバーとを測定
し、各測定値を加算した加算値を変数Xにセットする
(S600)。次に、センターバーから6個目のキャラ
クタパターンに続く2本のバーとその間の1本のスペー
スの各々を測定し、各測定値を加算した加算値を変数Y
にセットする(S610)。
First, two spaces and two bars of the sixth character pattern from the center bar are measured, and an added value obtained by adding the measured values is set as a variable X (S600). Next, two bars following the sixth character pattern from the center bar and one space between them are measured, and an added value obtained by adding the measured values is a variable Y
(S610).

【0032】次に、Yを所定式に代入して得られる範囲
にXの値が収まるか否かを判断し(S620)、収まれ
ば、2本のバーとその間の1本のスペースは右側のガー
ドバーであると判定し(S630)、本ルーチンを終了
する。変数Xが上記所定範囲に収まらなければ(S62
0)、EAN−13コードでないと判断して(S65
0)、本ルーチンを終了する。
Next, it is determined whether or not the value of X falls within a range obtained by substituting Y into a predetermined formula (S620). If it does, two bars and one space between them are located on the right. It is determined that it is a guard bar (S630), and this routine ends. If the variable X does not fall within the predetermined range (S62)
0), it is determined that the code is not the EAN-13 code (S65).
0), end this routine.

【0033】以上説明したバーコード読取装置よれば、
数字「1」,「7」、または数字「2」,「8」の判読
に際してバーおよびスペースの太りや細りがほとんど影
響しないから、誤読のおそれが極めて小さく、バーコー
ド読取装置の読取精度の向上を図ることができるという
効果を奏する。
According to the bar code reader described above,
When reading the numbers "1" and "7" or the numbers "2" and "8", the thickening or thinning of the bar and the space has almost no effect, so that the risk of erroneous reading is extremely small and the reading accuracy of the bar code reading device is improved. Is achieved.

【0034】以上実施例を説明したが、本発明は実施例
に何等限定されるものではなく、本発明の趣旨を逸脱し
ない範囲において種々なる態様で実施しえることは勿論
である。例えばバーコードに光を照射する光源として
は、レーザや白熱球を使用してもよい。充分明るい場所
で使用される構成においては、光源は必須でない。さら
に、光学的センサとしてはCCDイメージセンサのほか
にMOSセンサ等の一次元センサを使用してもよい。ま
た、ペンスキャナやレーザスキャナで用いられる1素子
のホトセンサでもよい。この場合バーコードを走査しな
ければならないが、その走査は手動でもよいし、モータ
等を用いて自動的に走査する構成としてもよい。さら
に、センサをバーコードに密着させたり、接近させる場
合には、光学系9は必須ではない。デコード順について
は、実施例では左ガードバーから右ガードバーに向かっ
て一方向に行なうが、センターバーからガードバーに向
かって順次行なってもよい。さらに、右側のガードバー
から左側のガードバーに向かって順次デコードする構成
としてもよい。減算値をしきい値と比較して(S21
0,220)、キャラクタを選択する構成以外にも、例
えば減算値を、候補のキャラクタの対応する公称値と比
べ、差の小さい公称値のキャラクタを選択する構成とし
てもよい。また、ガードバー、センターバーの判別方法
は、実施例以外にも種々あり、そのいずれを使用しても
よい。
Although the embodiment has been described above, the present invention is not limited to the embodiment at all, and it goes without saying that the present invention can be implemented in various modes without departing from the spirit of the present invention. For example, a laser or an incandescent bulb may be used as a light source for irradiating a bar code with light. In configurations used in sufficiently bright locations, the light source is not essential. Further, as the optical sensor, a one-dimensional sensor such as a MOS sensor may be used in addition to the CCD image sensor. Further, a one-element photosensor used in a pen scanner or a laser scanner may be used. In this case, the barcode must be scanned, but the scanning may be performed manually or may be automatically performed using a motor or the like. Further, when the sensor is brought into close contact with or close to the barcode, the optical system 9 is not essential. In the embodiment, the decoding order is performed in one direction from the left guard bar to the right guard bar. However, the decoding order may be sequentially performed from the center bar to the guard bar. Further, the decoding may be performed sequentially from the right guard bar to the left guard bar. The subtraction value is compared with a threshold value (S21).
0, 220), besides the configuration for selecting a character, for example, a configuration may be adopted in which a subtracted value is selected for a character having a nominal value that is smaller than the nominal value corresponding to a candidate character. There are various methods for determining the guard bar and the center bar other than the embodiment, and any of them may be used.

【0035】[0035]

【発明の効果】以上説明したバーコード読取装置によれ
ば、バーおよびスペースの太りや細りがほとんど判読に
影響しないから、誤読のおそれが極めて小さく、バーコ
ード読取装置の読取精度の向上を図ることができるとい
う効果を奏する。
According to the bar code reader described above, since the thickness and width of the bar and the space hardly affect the reading, the risk of erroneous reading is extremely small, and the reading accuracy of the bar code reader is improved. This has the effect that it can be performed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の基本的構成を例示するブロック図であ
る。
FIG. 1 is a block diagram illustrating a basic configuration of the present invention.

【図2】判読原理を説明するための説明図である。FIG. 2 is an explanatory diagram for explaining a reading principle.

【図3】本発明の一実施例のバーコード読取装置のブロ
ック図である。
FIG. 3 is a block diagram of a bar code reader according to one embodiment of the present invention.

【図4】バーコード読取装置の中央処理装置において実
行されるデコード処理ルーチンのフローチャートであ
る。
FIG. 4 is a flowchart of a decoding processing routine executed in a central processing unit of the barcode reading device.

【図5】中央処理装置において実行されるEAN−13
における左ガードバー公称値設定処理ルーチンのフロー
チャートである。
FIG. 5 shows EAN-13 executed in the central processing unit.
5 is a flowchart of a left guard bar nominal value setting processing routine in FIG.

【図6】中央処理装置において実行されるキャラクタパ
ターン公称値設定処理ルーチンである。
FIG. 6 is a character pattern nominal value setting processing routine executed in the central processing unit.

【図7】中央処理装置において実行されるEAN−13
におけるセンターバー公称値設定処理ルーチンのフロー
チャートである。
FIG. 7 shows EAN-13 executed in the central processing unit.
7 is a flowchart of a center bar nominal value setting processing routine in FIG.

【図8】中央処理装置において実行されるEAN−13
における右ガードバー判別処理ルーチンのフローチャー
トである。
FIG. 8 shows EAN-13 executed in the central processing unit.
9 is a flowchart of a right guard bar determination processing routine in FIG.

【符号の説明】[Explanation of symbols]

1…中央処理装置, 3…センサ出力信号
処理回路,5…CCDイメージセンサ, 9…光学
系,11…LED, B…バーコー
DESCRIPTION OF SYMBOLS 1 ... Central processing unit, 3 ... Sensor output signal processing circuit, 5 ... CCD image sensor, 9 ... Optical system, 11 ... LED, B ... Bar code

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 バーコード情報のバーおよびスペースの
パターンの幅を測定する測定手段と、該測定手段が測定
した結果に基づいて前記パターンの並びが構成する複数
のキャラクタパターンを順次解析し各キャラクタパター
ンが示すキャラクタを判読する解析手段と、該解析手段
が判読したキャラクタにより、前記バーコード情報を読
取る読取手段とを備えるバーコード読取装置において、 前記解析手段による解析の結果、デコード対象のキャラ
クタパターンに対して候補のキャラクタが複数挙げられ
た場合、該デコード対象のキャラクタパターンの最初の
1本のパターンの幅の測定値と、該デコード対象のキャ
ラクタパターンの直前の1本のパターンの幅の測定値と
を加算し、さらに該加算値から前記直前の1本のパター
ンの幅の公称値を減算した減算値を算出する減算値算出
手段と、 前記候補のキャラクタに対応する各キャラクタパターン
のうちで最初の1本のパターンの公称値が前記減算値と
近似するキャラクタパターンを選択し、該選択したキャ
ラクタパターンの対応キャラクタを前記デコード対象の
キャラクタパターンが示すキャラクタとして判読して、
前記読取手段へこの選択されたキャラクタを出力するキ
ャラクタ選択手段とを備えることを特徴とするバーコー
ド読取装置。
1. A measuring means for measuring the width of a bar and space pattern of bar code information, and a plurality of character patterns constituting the pattern arrangement are sequentially analyzed based on a result measured by the measuring means for each character. In a bar code reading apparatus comprising: analysis means for reading a character indicated by a pattern; and reading means for reading the bar code information by the character read by the analysis means, the result of the analysis by the analysis means, a character pattern to be decoded When a plurality of candidate characters are listed, the measured value of the width of the first pattern of the character pattern to be decoded and the measurement of the width of the single pattern immediately before the character pattern to be decoded And a nominal value of the width of the immediately preceding pattern is calculated from the added value. Subtraction value calculation means for calculating the calculated subtraction value; and selecting a character pattern in which the nominal value of the first one of the character patterns corresponding to the candidate character is similar to the subtraction value. The corresponding character of the character pattern is interpreted as a character indicated by the character pattern to be decoded,
A bar code reader comprising: a character selecting unit that outputs the selected character to the reading unit.
JP3220464A 1991-08-30 1991-08-30 Barcode reader Expired - Fee Related JP2903792B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3220464A JP2903792B2 (en) 1991-08-30 1991-08-30 Barcode reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3220464A JP2903792B2 (en) 1991-08-30 1991-08-30 Barcode reader

Publications (2)

Publication Number Publication Date
JPH0562005A JPH0562005A (en) 1993-03-12
JP2903792B2 true JP2903792B2 (en) 1999-06-14

Family

ID=16751530

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3220464A Expired - Fee Related JP2903792B2 (en) 1991-08-30 1991-08-30 Barcode reader

Country Status (1)

Country Link
JP (1) JP2903792B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2747922B1 (en) * 1996-04-26 1999-02-12 Codif International Sa USE OF NATURAL EXTRACTS OF ALGAE TO DEVELOP A PRODUCT FOR PREVENTING AND TREATING SKIN DISEASES
JP4539701B2 (en) 2007-09-26 2010-09-08 富士ゼロックス株式会社 Code reading apparatus and code reading program

Also Published As

Publication number Publication date
JPH0562005A (en) 1993-03-12

Similar Documents

Publication Publication Date Title
CA2255576C (en) High speed image acquisition system and method
EP0067414B1 (en) Method and apparatus for reading a bar code
JP2835274B2 (en) Image recognition device
JP4058529B2 (en) Optical information reader
US9230147B2 (en) Method and apparatus for optically reading out information stored in a barcode
JP3115003B2 (en) Method and apparatus for decoding barcode symbols using module size ratio analysis
JPH07105304A (en) Bar code scanning and link method
JPH0612515A (en) Method and apparatus for decoding two-dimensional bar code using ccd/cmd camera
JP3550807B2 (en) Barcode decoding method
JP2903792B2 (en) Barcode reader
US7007847B2 (en) Bar-code reader and method of reading bar-code
US7077322B2 (en) Bar-code reader
JP2949958B2 (en) Barcode reader
JPH0731717B2 (en) Optical reader
JP2953143B2 (en) Barcode reading device and barcode reading method
JP3842992B2 (en) Character string reading apparatus and character string reading method
JP4951745B2 (en) Bar code reader
JP3891072B2 (en) Bar code reading method and bar code reading apparatus
JP2004234553A (en) Bar code reader
JP2754915B2 (en) Optical reader
JP2604922B2 (en) Length measuring machine
JP3131866B2 (en) Bar code reading method and apparatus
JPH0311484A (en) Method and device for reading data
JPH01290092A (en) Bar width discriminating method for bar code
JP2839836B2 (en) Barcode reader

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110326

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees