JP2775734B2 - Barcode identification method - Google Patents

Barcode identification method

Info

Publication number
JP2775734B2
JP2775734B2 JP62245293A JP24529387A JP2775734B2 JP 2775734 B2 JP2775734 B2 JP 2775734B2 JP 62245293 A JP62245293 A JP 62245293A JP 24529387 A JP24529387 A JP 24529387A JP 2775734 B2 JP2775734 B2 JP 2775734B2
Authority
JP
Japan
Prior art keywords
barcode
information
bar code
line sensor
barcode information
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 - Lifetime
Application number
JP62245293A
Other languages
Japanese (ja)
Other versions
JPS6486283A (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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries Ltd
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
Priority to JP62245293A priority Critical patent/JP2775734B2/en
Application filed by Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to NO884274A priority patent/NO174944C/en
Priority to DE3854885T priority patent/DE3854885T2/en
Priority to EP88115905A priority patent/EP0310921B1/en
Priority to CA000578603A priority patent/CA1310417C/en
Priority to KR1019880012552A priority patent/KR910005389B1/en
Priority to US07/250,181 priority patent/US5045677A/en
Publication of JPS6486283A publication Critical patent/JPS6486283A/en
Application granted granted Critical
Publication of JP2775734B2 publication Critical patent/JP2775734B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、バーコードに対して一次元イメージセンサ
が一定以上傾くことにより、バーコード情報が断片的に
なる場合にこれを合成してバーコードを識別する方法に
関し、特に合成の前段で実行される前処理方法に特徴を
有するものである。 なお、本明細書においては上記の一次元イメージセン
サを「ラインセンサ」と称することとする。 〔従来の技術〕 バーコードを光学的に識別する手段として、従来から
ペン式識別装置、レーザ光を用いた定置式識別装置が知
られており、更に不定型な袋物、缶等の円筒形商品の場
合に操作性を向上させるため、ラインセンサを組入れた
ワンタッチスキャナを手で操作するいわゆるワンタッチ
式識別装置が近時POSシステムの主流になりつつある。 上記のごときワンタッチ式識別装置を用いてバーコー
ドを識別する際、スキャナがバーコードに対して一定以
上大きい傾き角をもって操作されると、ラインセンサも
同じ角度に傾くため、バーコードの一部がラインセンサ
の視野から外れることがある。このような状態にあるラ
インセンサを走査すると、走査によって得られたバーコ
ード情報は断片的になり、バーコードの全体を識別する
ことができないので、操作者に対し警報を出すか、又は
無応答とするなどして再操作を指令することになる。 再操作の煩わしさをできるだけ少なくするために、バ
ーコードの高さは従来一定以上大きいものに設定され、
また定置式識別装置の場合は一度に多方向(例えば、4
方向)に操作して読取るなどの手段が採用されている。 〔発明が解決しようとする課題〕 バーコードは値札等のメディアに印刷されるため、上
述の従来技術によると、メディアの大きさを一定以下に
小さくすることができず、また専用の印刷装置が必要と
なるなどの問題点があった。また、定置式識別装置にお
いては、一度に多方向に操作する必要がありそのために
ハードウェア、ソフトウェア共に複雑になる問題点があ
った。 上記のごとき問題点を解決するために、断片的なバー
コード情報をつなぎ合せによって合成して識別する手法
が、特開昭56−103768号公報に開示されている。 断片的なバーコード情報を合成する場合に問題となる
のは、読み出した全ての断片的なバーコード情報の中に
バーコード全体の情報が含まれているか否かの判断であ
る。その判断の基本的な考え方については、上記公報に
おいては各断片的なバーコード情報の長さを、例えば
l0、l1、l2、l3とし、バーコードの全長をlとし、走査
線とバーコードの相対的な傾き角をθとした場合に、l
=cosθ・(l0+l1+l2+l3)の関係が成立するか否か
によって判断している。 しかし、このような方法によると、バーコード情報の
合成の前に各バーコード情報の長さl0〜l3や傾き角θを
予め検出する処理が必要となる。上記公報に開示されて
いるごとき据置き式のバーコード識別装置の場合は、静
止状態にあるバーコードを一定の走査周期で読取るよう
になっているので、走査線相互間の間隔(△l)が一定
となる。このため、上記の処理は比較的簡単な演算によ
り行うことができる。これに対し、ワンタッチ式識別装
置のように、スキャナを手で操作する形式のものにおい
ては、スキャナ及びそれに組込まれたラインセンサの移
動速度は1回の操作中ではほぼ一定(従って前記の間隔
(△l)が一定)であるとみなされるので問題はない
が、次の操作では前回の速度と同じになるとは限らず、
また操作者が変わると尚さら一定しなくなる。このた
め、ワンタッチ式の場合は、前記公報に示されたごとき
方法を採用することはできない。 そこで、本発明は、バーコードに対してラインセンサ
の傾きが一定以上に大きいことでバーコード情報が断片
的になる場合に、ラインセンサの移動速度が前回の操作
と次回の操作で相違したり、或は操作者が変わることに
よって相違することがあっても、その相違の影響を受け
ることなく、合成に必要なバーコード情報を抜け落ちな
く獲得する前処理を行い、その後合成を行うようにした
バーコード識別方法を提供することを目的とする。 〔課題を解決するための手段〕 上記の目的を達成するために、本発明の方法において
は、ラインセンサを備えたバーコード識別装置をバーコ
ードに対して相対的に移動させ、バーコードの画像を光
学的に上記ラインセンサ上に結像させ、該ラインセンサ
を電気的に走査して得たバーコード情報に基づいてバー
コードを識別する方法であって、 最初に得られたバーコード情報と、所定周期後に得ら
れたバーコード情報との各々のラインセンサ上での一方
の端点の位置の移動量と他方の端点の移動量を比較し
て、両端点の移動量の間に大小関係がある場合に該バー
コード情報を第1のバーコード情報として記憶し、 その後に得られるバーコード情報のラインセンサ上で
の一方の端点の位置の移動量と他方の端点の移動量を比
較して、両端点の移動量が互いに等しい関係がある場合
に、前記所定周期毎に繰り返し得られるバーコード情報
を第2のバーコード情報として各々記憶し、 さらに前記所定周期をへだてて得られるバーコード情
報のラインセンサ上での両端点の移動量の大小関係が前
記と逆の大小関係にある場合に該バーコード情報を第3
のバーコード情報として記憶し、 以上記憶された第1から第3の一連のバーコード情報
に基づいてバーコードを識別するようにした。 次に、上記発明の内容を添付図面に基づいて具体的に
説明する。 第1図は、本発明における用語の説明図である。本発
明では、バーコード1の左端辺をL、右端辺をRで表わ
す。また、符号2の線は、ラインセンサの走査線を表わ
す。走査線2の傾き角θは、図のように左に傾く場合
(負の傾き角)と、右に傾く場合(正の傾き角)があ
る。 なお、傾き角θが小さく、走査線2がバーコード1の
左端Lから右端Rまで達する場合(即ち、両端共ライン
センサの視野内にある場合)は、バーコード情報の合成
は不要であり、従ってこの発明の対象とならない。 走査線2の傾き角θ、その移動速度及び走査周期は、
ラインセンサの1回の操作中は実質的に一定であること
を前提とする。 なお、バーコード1とラインセンサとはいずれか一方
が静止し、他方が移動する場合と、双方が相対的に移動
する場合があるが、この発明は、そのいずれの場合にも
適用される。 また、ラインセンサの手操作による移動速度が走査周
期に対して相対的に速すぎることなどにより走査線の間
隔が広くなりすぎると、先行する走査によるバーコード
情報と後続するバーコード情報との間に重複部分がなく
なり、合成に必要なバーコード情報に抜け落ちが生じ
る。従って、この発明においては、ラインセンサのバー
コードに対する相対的移動速度とラインセンサの走査周
期との関係が、先行するバーコード情報と後続するバー
コード情報との間に重複部分を有する関係にあることを
前提とする。 上記の前提の下においては、走査線2の傾き角θが負
の場合は、X、Y、Zの符号で代表例を示すように、走
査線2はバーコード1の左上隅から右下隅の方向に平行
に一定間隔で移動し、しかもXとY、YとZの走査線に
よって走査されたバーコード情報に重複部分がある。傾
き角θが正の場合は、右上隅から左下隅の方向に平行移
動する。 同図において、走査線2とバーコード1の左端辺Lと
の交点及び右端辺Rとの交点をそれぞれ符号aで示し、
また上端辺と下端辺との交点をそれぞれ符号bで示す。
a点及びb点は、いずれもラインセンサにより感知され
るバーコード情報の端点を示している。 いま、2回の走査により走査線2の位置がぞれぞれX
からX′、YからY′又はZからZ′へ一定距離移動し
た場合のa点とb点の移動量をxとyで表わすと、傾き
角θが45゜未満である場合はx<yであるから、各端点
のラインセンサ上での位置の移動量を算出し比較するこ
とにより、バーコード1と走査線2との位置関係を知る
ことができる。以下の説明においては、バーコード1の
左端辺L又は右端辺Rとの交点aのように、相対的に移
動量の小さい端点を固定端点、またバーコード1の上端
辺又は下端辺との交点bのように、相対的に移動量の大
きい端点を移動端点と称する。 なお、走査線2の傾き角θを45゜未満とするのは、45
゜では移動量(x、y)が等しいために移動量の大小を
判別することができず、また45゜を超えることは実際上
ありえないからである。 バーコード1と走査線2の位置関係を具体的に解析す
ると、第2図の(a)図及び(b)図の状態がある。 (a)図は、傾き角θが負の場合であり、当初の状態
B1において、Lが固定端点a、Rが移動端点(L=a、
R=b)である。状態B1においては、バーコード1の左
端近傍のバーコード情報を得るために少なくとも2回の
走査によって得られるバーコード情報のうち代表的なバ
ーコード情報(図中太線で示す。以下同じ)について識
別を行うべくそのバーコード情報と両端点のラインセン
サ上の位置情報を読取って記憶する。上記のごとく、一
方の端点が固定端点、他方の端点が移動端点となる状態
B1を第1遷移状態と称する。 次に、状態B1から状態B2(L=b、R=b)に遷移す
ると、中央部分のバーコード情報を得るため、そのバー
コード情報と両端点のラインセンサ上の位置情報を読取
って記憶する。上記のごとく、両方の端点が移動端点と
なる状態B2を第2遷移状態と称する。 更に、状態B3(L=b、R=a)に遷移すると、バー
コード1の右端近傍のバーコード情報を得るため、その
バーコード情報と両端点の位置情報とを読取って記憶す
る。上記のごとく、第1遷移状態と逆に、前記一方の端
点が移動端点、他方の端点が固定端点となる状態B3を第
3遷移状態と称する。 第1から第3遷移状態B1〜B3において得られるバーコ
ード情報は断片的であるが、相互に部分的に重複してお
り、バーコード1の左端Lから右端Rまでの全ての情報
を含んだものとなる。 (b)図は傾き角θが正の場合であり、C1からC3へ順
次状態が変化する。この場合は傾きの方向が相違する以
外他は(b)図の場合と同様であるので、図示するだけ
にとどめ、説明を省略する。 第3図は左端L及び右端Rにおける両方の端点の状態
(a又はb)の遷移を示すものである。S0は初期状態、
S1はバーコード1が出現した状態を意味し、S1の状態か
ら、上述の場合に従ってLとRの端点の状態が遷移し、
第1遷移状態B1、C1、第2遷移状態B2、C2及び第3遷移
状態B3、C3を経たのち、合成を行いデコードを行う。上
述の第1、第2及び第3の遷移状態を順次経る一連の処
理を前処理と称する。 第4図は、読出したバーコード情報の合成の一手法の
概念を示すものであり、バーコード1について第1遷移
状態B1から第3遷移状態B3に渡る間の走査により、X〜
Z位置で読出したバーコード情報とその両端点の位置情
報(ラインセンサ上の位置情報P0〜P5)を示している。
これらの各バーコード情報と位置情報はそれぞれ記憶装
置に記憶される。この場合、X位置の位置情報P1は、直
角方向に移動したY位置の位置情報P1と一致するが、X
位置のP0からP1までのバーコード情報とY位置のP1から
P3までのバーコード情報とを合成するだけでは、図示の
距離S間のバーコード情報が失われる。このため、Y位
置のバーコード情報は、P2′(即ちX位置のP1からバー
方向に引いた線と、Y位置の走査線との交点上にある位
置情報)からP3での間のバーコード情報と、P0からP1
でのバーコード情報とを合成する必要がある。 このためバーコード情報の合成の際には、Y位置にお
けるP1とP2′間のラインセンサ上の距離dが必要とな
る。この距離dは次のようにして求められる。即ち、第
5図に示すように、前述の第1遷移状態(B1又はC1)に
おける複数の走査線のうち、先行する走査線X0によって
得られるバーコード情報の左端(C1の場合は右端)の端
点(前述の固定端点a)のラインセンサ上の位置情報を
L1、これに後続する一周期後の走査線Xによって得られ
るバーコード情報の固定端点aのラインセンサ上の位置
情報をL2とすると、両方のラインセンサ上の距離dは、
L2−L1となる。 いま、第4図のX位置とY位置の走査線が一周期の差
をもつものとすると、Y位置上の距離dは、上述のよう
にL2−L1により求めることができる(但し、走査線が間
引かれているときは、dの倍数となる。)。また位置Y
とZにおけるP3とP4′間の距離dについても同様である
ので、結局、P0からP1、P2′からP3、P4′からP5間のバ
ーコード情報をつなぎ合せることにより、完全なバーコ
ード情報に合成することができ、その合成されたバーコ
ード情報を識別することができる。 なお、次の操作或いは操作者が変わった場合などにお
いて前回の操作とラインセンサの移動速度が変わること
があっても、前記の距離dは操作のたびに算出されるの
で、識別精度の上でラインセンサの移動速度の変化の影
響を受けることがない。 以上の説明は、1回の操作中ではラインセンサの移動
速度は一定であるとの前提により、Y位置上のP1とP2
間の距離も、Z位置上のP3とP4′間の距離も共にd=L2
−L1であるとしているが、移動速度に若干の変動がある
場合は、L2−L1で求められた上記の距離dは近似値とな
る。 〔実施例〕 第6図はこの発明に係るバーコードの識別方法を実施
するためのワンタッチ式スキャナ3及び前処理部4を有
するバーコード識別装置のブロック図であり、ワンタッ
チ式スキャナ3は前述のラインセンサを備えている。そ
のワンタッチ式スキャナ3及び前処理部4によって読取
られた断片的なバーコード情報は、合成部5において合
成され、合成されたバーコード情報はデコード部6にお
いて識別され、更にフォーマットチェック部7におい
て、所定の条件を満たしているかどうかチェックされ
る。所定の条件が満たされていると、インタフェース部
8を経て所要の上位装置に送り出される。 なお、例えば、メディアの変形が著しい場合など、合
成ができないか、又は合成ができたとしても所定の条件
を満たさない場合は、デコード部6及びフォーマットチ
ェック部7においてチェックされ、再び合成からやり直
しを行う。 第7図は上記のブロック図に示す機能を実行するため
のマイクロコンピュータのブロック図である。3はワン
タッチ式スキャナ、14はCPU、9はROM、10はRAM、11は
インターフェースを示す。 ワンタッチ式スキャナ3からは、バーコード情報・位
置情報12と同期信号13がCPU14に入力される。ROM9の内
容は、前処理アルゴリズム、合成アルゴリズム、バーコ
ードデコーダ、フォーマットチェック、インターフェー
ス制御等である。RAM10の内容は、各種プログラムの実
行バッファ、読取りデータレジスタなどである。 第8図はRAM10のデータレジスタのモデルであり、第
1ラインから第nライン(nは正の整数)までの各走査
により得られるバーコード情報が記憶される。一般に
「LxAdd Reg」にはxライン目の左端の黒(バー)の位
置情報が記憶され、「RxAdd Reg」にはxライン目の右
端の黒(バー)の位置情報が記憶される。また、Bxyに
は、xライン目のy番目の黒(バー)の長さ、Wxyには
xライン目のy番目の白(スペース)の長さがそれぞれ
記憶される。 第9図はバーコード合成のためのフローチャートの一
例を示すものである。まず、第2図の(a)図の場合
(第3図のS1→B1→B2→B3→合成→デコードの場合と同
じ)について順に説明する。 フローを開始して初期化したのち、バーが出現する
と、バーコード情報の左端L及び右端Rのバーの位置情
報を前述のデータレジスタの第1ラインの所定の位置に
記憶する(ステップ)。以下走査の周期に従って第2
ライン以下について同様の処理を行う(同)が、走査
周期が短い場合は適当に間引き(同)を行って不要な
情報は棄てる場合がある。 次に、最初の走査によって得られたバーコード情報
と、所定周期後に得られたバーコード情報のLとRの位
置情報の移動量の比較により、Lが固定端点か否かの判
別が行われ(同)、固定端点ならば、L=aの処理を
行いLF=1のフラグを立て、バーコードの左端から走査
が始まったことを示す。次にRが移動端点か否かの判別
が行われ(同)、移動端点の場合はR=bの処理を行
う。これにより、前述の第1遷移状態であることの判別
が行われ、このときのバーコード情報を読取る(同
)。ステップからまでの処理はRF=1(同)の
フラグが立つまで(即ち、走査がバーコードの右端に達
するまで)繰返し行う。 上記の繰返しルーチンの途中でLが固定端点でない
(移動端点である)と判別されると(同)、L=bの
処理(同)を行い、更にRが移動端点か否かの判別が
行われる(同)。Rが移動端点ならば、R=bの処理
を行う。即ち、第2遷移状態であることの判別が行われ
る。そしてこのときのバーコード情報を読取る(同
)。ステップからまでの処理は、RF=1(同)
となるまで繰返し行う。 更に、上記の繰返しルーチンの途中でRが移動端点で
ない(固定端点である)と判別されると(同)、R=
aの処理(同)を行う。即ち、第3遷移状態であるこ
との判別が行われる。そして、RF=1のフラグを立て、
バーコードの右端まで走査が行われたことを示す。次に
バーコード情報を読取る(同)。その後LF=1か否か
の判別(同)を行ったのち、LF=1であるならば、次
にL、Rの位置情報をクリアすると共に、LF=0、RF=
0の初期状態に戻し(同)、合成処理に移行する(同
)。合成が終わるとデコードを行い(同)、その後
終了する。ステップでLF=1でない場合はステップ
に戻る。 なお、ステップにおいてRが移動端点でない(固定
端点である)と判別されると、R=a(RF=1)の処理
が行われ(同)、その時のバーコード情報が読取られ
る(同)。この場合は、バーコード情報の合成が不要
であるので、L、Rの位置情報をクリアすると共に、LF
=0、RF=0の初期状態に戻したのち、デコードに移行
する。 第2図の(b)の場合も実質上同一のアルゴリズムで
あるので説明を省略する。 なお、合成に必要な前記の距離d(第5図参照)は、
第1遷移状態において2回の走査によって読取られたバ
ーコード情報の固定端点aの位置情報の差を算出するこ
とにより得られる。 〔発明の効果〕 以上のように、この発明は、ラインセンサとバーコー
ドとを相対的に移動させてバーコード情報を読取ってこ
れを識別する際に、ラインセンサの傾き角が一定以上に
大きいことによりバーコード情報が断片的になる場合で
も、バーコードと走査線との相対的な傾き角や、走査線
相互の間隔の数値を用いることなく、バーコードと走査
線の関係が順次3態様に遷移する間に、第1から第3の
バーコード情報を記憶する前処理を経ることにより、合
成処理に必要な情報を抜け落ち無く確実に獲得でき、し
かも操作ごとにラインセンサの移動速度に違いが生じて
もその影響を受けることがない。これによりバーコード
を正確に識別できる効果がある。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a method of synthesizing barcode information when the one-dimensional image sensor is tilted by a certain degree or more with respect to a barcode, and the barcode information is fragmented. The present invention has a feature in a method of identifying a code, particularly in a preprocessing method executed in a preceding stage of the synthesis. In the present specification, the one-dimensional image sensor is referred to as a “line sensor”. [Prior Art] As a means for optically identifying a barcode, a pen-type identification device and a stationary identification device using a laser beam have been conventionally known. Further, cylindrical products such as irregular shaped bags and cans are known. In order to improve the operability in the case of the above, a so-called one-touch type identification device which operates a one-touch scanner incorporating a line sensor by hand has recently become the mainstream of the POS system. When a barcode is identified using the one-touch identification device as described above, if the scanner is operated with a tilt angle larger than a certain value with respect to the barcode, the line sensor also tilts at the same angle, so that part of the barcode is It may be out of the field of view of the line sensor. When scanning the line sensor in such a state, the barcode information obtained by the scanning becomes fragmented and the entire barcode cannot be identified, so that an alarm is issued to the operator or no response is made. Then, a re-operation is commanded. In order to minimize the hassle of re-operation, the height of the barcode has been set to be larger than a certain height,
In the case of a stationary type identification device, it can be operated in multiple directions at a time (for example, 4 directions).
(Direction) for reading. [Problems to be Solved by the Invention] Since the barcode is printed on a medium such as a price tag, the size of the medium cannot be reduced to a certain size or less according to the above-described conventional technology. There were problems such as necessity. Further, in the stationary identification device, it is necessary to operate in multiple directions at a time, and there is a problem that both hardware and software are complicated. In order to solve the above-mentioned problems, a method of combining fragmented barcode information by combining and identifying it is disclosed in Japanese Patent Application Laid-Open No. Sho 56-103768. A problem in synthesizing fragmentary barcode information is determining whether or not all pieces of read fragmentary barcode information include information on the entire barcode. Regarding the basic idea of the determination, in the above publication, the length of each piece of barcode information is, for example,
When l 0 , l 1 , l 2 , l 3 , the total length of the bar code is l, and the relative inclination angle between the scanning line and the bar code is θ, l
= Cos θ · (l 0 + l 1 + l 2 + l 3 ). However, according to such a method, it is necessary to perform a process of detecting the lengths l 0 to l 3 and the inclination angle θ of each bar code information before combining the bar code information. In the case of a stationary bar code identification device as disclosed in the above publication, a bar code in a stationary state is read at a constant scanning cycle, so that the interval between scanning lines (△ l). Becomes constant. Therefore, the above processing can be performed by a relatively simple calculation. On the other hand, in a type in which the scanner is manually operated, such as a one-touch identification device, the movement speed of the scanner and the line sensor incorporated therein is substantially constant during one operation (therefore, the above-mentioned interval ( There is no problem because Δl) is considered to be constant), but in the next operation, the speed is not necessarily the same as the previous speed.
Further, when the operator changes, it becomes even less constant. For this reason, in the case of the one-touch type, the method shown in the above-mentioned publication cannot be adopted. Therefore, according to the present invention, when the inclination of the line sensor with respect to the bar code is greater than a certain value and the bar code information becomes fragmented, the moving speed of the line sensor may be different between the previous operation and the next operation. Or, even if there is a difference due to the change of the operator, the pre-processing for acquiring the barcode information necessary for the composition without falling off without being affected by the difference is performed, and then the composition is performed. An object of the present invention is to provide a barcode identification method. Means for Solving the Problems In order to achieve the above object, in the method of the present invention, a barcode identification device provided with a line sensor is moved relatively to a barcode, and an image of the barcode is displayed. Is optically imaged on the line sensor, and a bar code is identified based on bar code information obtained by electrically scanning the line sensor. By comparing the amount of movement of the position of one end point and the amount of movement of the other end point on each line sensor with the bar code information obtained after the predetermined period, the magnitude relationship between the amount of movement of both end points is In some cases, the barcode information is stored as first barcode information, and the amount of movement of one end point of the barcode information obtained thereafter on the line sensor is compared with the amount of movement of the other end point. , End point shift When the amounts are equal to each other, the barcode information repeatedly obtained in each of the predetermined periods is stored as second barcode information, and further, the barcode information obtained through the predetermined period is stored on a line sensor. If the magnitude relation of the movement amounts of the two end points is opposite to the magnitude relation described above, the bar code information is
And the barcode is identified based on the first to third series of barcode information stored above. Next, the contents of the above-described invention will be specifically described with reference to the accompanying drawings. FIG. 1 is an explanatory diagram of terms in the present invention. In the present invention, the left end of the bar code 1 is represented by L, and the right end is represented by R. The line denoted by reference numeral 2 represents a scanning line of the line sensor. The inclination angle θ of the scanning line 2 may be inclined to the left (negative inclination angle) or inclined to the right (positive inclination angle) as shown in the figure. Note that when the inclination angle θ is small and the scanning line 2 reaches from the left end L to the right end R of the barcode 1 (that is, when both ends are within the field of view of the line sensor at both ends), it is not necessary to combine the barcode information. Therefore, it is not an object of the present invention. The inclination angle θ of the scanning line 2, its moving speed and the scanning cycle are
It is assumed that it is substantially constant during one operation of the line sensor. It should be noted that there is a case where one of the barcode 1 and the line sensor is stationary and the other moves, and a case where both move relatively. The present invention is applied to both cases. Also, if the scanning line interval becomes too wide due to, for example, the moving speed of the line sensor being manually operated relatively high with respect to the scanning cycle, the barcode information between the preceding barcode information and the following barcode information will be lost. There is no overlapping part, and the barcode information necessary for the composition is omitted. Therefore, in the present invention, the relationship between the relative movement speed of the line sensor with respect to the bar code and the scanning cycle of the line sensor is such that there is an overlap between the preceding bar code information and the following bar code information. It is assumed that Under the above assumption, when the inclination angle θ of the scanning line 2 is negative, the scanning line 2 extends from the upper left corner to the lower right corner of the barcode 1 as shown by a representative example of X, Y, Z. The bar code information moves at a fixed interval in parallel with the scanning direction and is scanned by X and Y scanning lines and Y and Z scanning lines. When the tilt angle θ is positive, the parallel movement is performed from the upper right corner to the lower left corner. In the figure, the intersection between the scanning line 2 and the left end L of the barcode 1 and the intersection with the right end R are denoted by reference character a, respectively.
The intersection of the upper edge and the lower edge is indicated by the symbol b.
Points a and b both indicate the end points of the barcode information detected by the line sensor. Now, the positions of the scanning lines 2 are each X by the two scans.
X and y represent the amount of movement between points a and b when moving a certain distance from X to Y 'or from Y to Y' or from Z to Z '. If the inclination angle θ is less than 45 °, x <y Therefore, the positional relationship between the barcode 1 and the scanning line 2 can be known by calculating and comparing the amount of movement of the position of each end point on the line sensor. In the following description, an endpoint having a relatively small amount of movement, such as an intersection a with the left end L or the right end R of the bar code 1, is a fixed end, and an intersection with the upper end or the lower end of the bar code 1. An end point having a relatively large movement amount, such as b, is referred to as a movement end point. Note that the inclination angle θ of the scanning line 2 is set to less than 45 °
In the case of ゜, since the movement amounts (x, y) are equal, it is not possible to determine the magnitude of the movement amount, and it is practically impossible to exceed 45 °. When the positional relationship between the barcode 1 and the scanning line 2 is specifically analyzed, there are the states shown in FIGS. 2A and 2B. (A) The figure shows the case where the tilt angle θ is negative, and the initial state.
In B 1, L is a fixed end points a, R movement end point (L = a,
R = b). In the state B 1, the typical bar code information of the bar code information obtained by at least two scans in order to obtain bar code information of the vicinity of the left end of the bar code 1 (in the figure indicated by bold lines. Hereinafter the same) The barcode information and the position information of both end points on the line sensor are read and stored for identification. As described above, one end point is a fixed end point and the other end point is a moving end point
B 1 is referred to as a first transition state. Next, the state B 2 from the state B 1 (L = b, R = b) if a transition to, for obtaining bar code information of the central portion, by reading the position information on the line sensor of the bar code information and end points Remember. As indicated above, the state B 2 both endpoints is moving end point is referred to as a second transition state. Further, when the state transits to the state B 3 (L = b, R = a), in order to obtain barcode information near the right end of the barcode 1, the barcode information and the position information of both end points are read and stored. As indicated above, the first transition state opposite, referred the one end point is moving end point, a state B 3 where the other endpoint is fixed endpoints and third transition state. Although the bar code information obtained in the third transition state B 1 .about.B 3 from the first is a fragmentary, cross and partially overlap, all the information from the left edge L of the bar code 1 to the right R It is included. (B) drawing a case where the inclination angle θ is positive, the sequential state changes from C 1 to C 3. In this case, except that the direction of the inclination is different, it is the same as the case of FIG. 7B, so that it is only shown in the figure and the description is omitted. FIG. 3 shows the transition of the state (a or b) of both end points at the left end L and the right end R. S 0 is the initial state,
S 1 means the state in which the barcode 1 has appeared, and the state of the end points of L and R transits from the state of S 1 according to the above case,
After passing through the first transition state B 1 , C 1 , the second transition state B 2 , C 2 and the third transition state B 3 , C 3 , synthesis is performed and decoding is performed. A series of processes that sequentially go through the first, second, and third transition states described above is referred to as pre-processing. Figure 4 is illustrates a concept of A Method for the synthesis of the read barcode information by scanning between the bar code 1 over the first transition state B 1 to the third transition state B 3, X to
It indicates the position information of the read bar code information and its end points at the Z position (position information P 0 to P 5 on the line sensor).
Each of these barcode information and position information is stored in the storage device. In this case, the position information P 1 of the X position is consistent with the position information P 1 of the Y position shifted in a direction perpendicular, X
From P 1 barcode information and Y position of the P 0 position to P 1
Simply combining the bar code information to P 3, the bar code information distance S as shown is lost. For this reason, the bar code information at the Y position is between P 2 ′ (ie, the position information at the intersection of the line drawn from P 1 at the X position in the bar direction and the scanning line at the Y position) to P 3. and a bar code information, the need for combining the bar code information from P 0 to P 1. Thus in the synthesis of the bar code information, the distance d on the line sensor between P 1 and P 2 'in the Y position is required. This distance d is obtained as follows. That is, as shown in FIG. 5, among the plurality of scan lines in the first transition state of the aforementioned (B 1 or C 1), the left end of the bar code information obtained by the scanning lines X 0 the preceding (in C 1 Indicates the position information on the line sensor at the end point (the right end point)
Assuming that the position information on the line sensor of the fixed end point a of the bar code information obtained by L 1 and the subsequent scanning line X one cycle later is L 2 , the distance d on both line sensors is:
L 2 a -L 1. Now, assuming that the scanning lines at the X position and the Y position in FIG. 4 have a difference of one period, the distance d on the Y position can be obtained from L 2 −L 1 as described above (however, When the scanning line is thinned out, it becomes a multiple of d.). Position Y
The same applies to the distance d between P 3 and P 4 ′ in P and Z, so that the bar code information between P 0 and P 1 , P 2 ′ and P 3 , and P 4 ′ and P 5 is eventually connected. Thus, the barcode information can be combined with the complete barcode information, and the combined barcode information can be identified. Even if the moving speed of the line sensor changes from the previous operation when the next operation or the operator changes, the distance d is calculated for each operation. It is not affected by a change in the moving speed of the line sensor. The above description is based on the assumption that the moving speed of the line sensor is constant during one operation, and P 1 and P 2 ′ on the Y position
Both the distance between them and the distance between P 3 and P 4 ′ on the Z position are d = L 2
Although a is -L 1, if the moving speed there is some variation, the above distance d determined at L 2 -L 1 is an approximation. [Embodiment] FIG. 6 is a block diagram of a bar code identification device having a one-touch scanner 3 and a pre-processing unit 4 for implementing a bar code identification method according to the present invention. It has a line sensor. The fragmentary barcode information read by the one-touch scanner 3 and the preprocessing unit 4 is combined in a combining unit 5, the combined barcode information is identified in a decoding unit 6, and further in a format check unit 7. It is checked whether a predetermined condition is satisfied. When a predetermined condition is satisfied, the data is sent to a required host device via the interface unit 8. In addition, for example, when the composition is not possible or the predetermined condition is not satisfied even if the composition is possible, for example, when the deformation of the medium is remarkable, the decoding unit 6 and the format check unit 7 check it, and start again from the composition. Do. FIG. 7 is a block diagram of a microcomputer for executing the functions shown in the above block diagram. Reference numeral 3 denotes a one-touch scanner, 14 denotes a CPU, 9 denotes a ROM, 10 denotes a RAM, and 11 denotes an interface. From the one-touch scanner 3, bar code information / position information 12 and a synchronization signal 13 are input to the CPU. The contents of the ROM 9 are a preprocessing algorithm, a synthesis algorithm, a barcode decoder, a format check, an interface control, and the like. The contents of the RAM 10 are an execution buffer for various programs, a read data register, and the like. FIG. 8 shows a model of the data register of the RAM 10, in which barcode information obtained by each scan from the first line to the n-th line (n is a positive integer) is stored. Generally, "LxAdd Reg" stores the position information of the leftmost black (bar) on the xth line, and "RxAdd Reg" stores the position information of the rightmost black (bar) on the xth line. Bxy stores the length of the y-th black (bar) on the x-th line, and Wxy stores the length of the y-th white (space) on the x-th line. FIG. 9 shows an example of a flowchart for barcode synthesis. First, the case of FIG. 2A (the same as the case of S 1 → B 1 → B 2 → B 3 → synthesis → decode in FIG. 3 ) will be described in order. When a bar appears after the flow is started and initialized, the position information of the bar at the left end L and the right end R of the bar code information is stored in a predetermined position of the first line of the data register (step). In the following, the second
Similar processing is performed for the lines below the line (same as above). However, if the scanning cycle is short, unnecessary thinning may be performed (same as above) and unnecessary information may be discarded. Next, it is determined whether or not L is a fixed end point by comparing the bar code information obtained by the first scan with the movement amount of the L and R position information of the bar code information obtained after a predetermined period. (Same as above) If it is a fixed end point, the processing of L = a is performed and the flag of LF = 1 is set, indicating that the scanning has started from the left end of the bar code. Next, it is determined whether or not R is the moving end point (same as above). If R is the moving end point, processing of R = b is performed. As a result, the above-described first transition state is determined, and the barcode information at this time is read (same). The processing from the step to the step is repeated until the flag of RF = 1 (same) is set (that is, until the scanning reaches the right end of the bar code). If it is determined that L is not a fixed end point (is a moving end point) in the middle of the above-described repetition routine (same), processing of L = b (same) is performed, and it is further determined whether or not R is a moving end point. (Same) If R is the moving end point, the processing of R = b is performed. That is, it is determined that the state is the second transition state. Then, the barcode information at this time is read (same as above). Processing from step to RF is 1 (same as above)
Repeat until. Further, if it is determined that R is not a moving end point (is a fixed end point) during the above-mentioned repetition routine (same), then R =
The process (a) is performed. That is, it is determined that the state is the third transition state. Then, a flag of RF = 1 is set,
Indicates that scanning has been performed to the right end of the barcode. Next, the barcode information is read (same as above). Then, after determining whether or not LF = 1 (same as above), if LF = 1, then the position information of L and R is cleared, and LF = 0 and RF =
It returns to the initial state of 0 (the same), and shifts to the combining process (the same). When the synthesis is completed, decoding is performed (same as above), and then the process ends. If LF is not 1 in the step, the process returns to the step. When it is determined in step S that R is not the moving end point (is a fixed end point), the process of R = a (RF = 1) is performed (same), and the barcode information at that time is read (same). In this case, since it is not necessary to combine the barcode information, the position information of L and R is cleared and LF
After returning to the initial state of = 0 and RF = 0, the process proceeds to decoding. In the case of FIG. 2B, the algorithm is substantially the same, and a description thereof will be omitted. The distance d (see FIG. 5) required for the composition is
It is obtained by calculating the difference between the position information of the fixed end point a of the barcode information read by two scans in the first transition state. [Effect of the Invention] As described above, according to the present invention, when the line sensor and the barcode are relatively moved to read and identify the barcode information, the inclination angle of the line sensor is larger than a certain value. Even if the bar code information becomes fragmented, the relationship between the bar code and the scanning line is sequentially changed to three modes without using the relative inclination angle between the bar code and the scanning line and the numerical value of the interval between the scanning lines. During the transition to, the pre-processing of storing the first to third barcode information allows the information necessary for the synthesizing process to be reliably obtained without any omission, and the movement speed of the line sensor differs for each operation. Is not affected. This has the effect that the barcode can be accurately identified.

【図面の簡単な説明】 第1図はバーコードと走査線の関係の説明図、第2図の
(a)図及び(b)図はバーコードと走査線の関係の解
析図、第3図は両方の端点の状態の遷移図、第4図は画
像情報合成の原理図、第5図はバーコード情報合成の原
理図、第6図は実施例に係るバーコード識別装置のブロ
ック図、第7図はマイクロコンピュータの実施例のブロ
ック図、第8図はデータレジスタの説明図、第9図は前
処理のフローチャートを示す。 1……バーコード、2……走査線、3……ワンタッチ式
スキャナ、 4……前処理部、5……合成部。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is an explanatory diagram of the relationship between bar codes and scanning lines, FIGS. 2A and 2B are analysis diagrams of the relationship between bar codes and scanning lines, and FIG. Is a transition diagram of the state of both end points, FIG. 4 is a principle diagram of image information composition, FIG. 5 is a principle diagram of barcode information composition, FIG. 6 is a block diagram of a barcode identification device according to the embodiment, FIG. FIG. 7 is a block diagram of an embodiment of a microcomputer, FIG. 8 is an explanatory diagram of a data register, and FIG. 9 is a flowchart of preprocessing. 1 ... Barcode, 2 ... Scanning line, 3 ... One-touch scanner, 4 ... Preprocessing unit, 5 ... Synthesis unit.

Claims (1)

(57)【特許請求の範囲】 1.ラインセンサを備えたバーコード識別装置をバーコ
ードに対して相対的に移動させ、バーコードの画像を光
学的に上記ラインセンサ上に結像させ、該ラインセンサ
を電気的に走査して得たバーコード情報に基づいてバー
コードを識別する方法であって、 最初に得られたバーコード情報と、所定周期後に得られ
たバーコード情報との各々のラインセンサ上での一方の
端点の位置の移動量と他方の端点の移動量を比較して、
両端点の移動量の間に大小関係がある場合に該バーコー
ド情報を第1のバーコード情報として記憶し、 その後に得られるバーコード情報のラインセンサ上での
一方の端点の位置の移動量と他方の端点の移動量を比較
して、両端点の移動量が互いに等しい関係がある場合
に、前記所定周期毎に繰り返し得られるバーコード情報
を第2のバーコード情報として各々記憶し、 さらに前記所定周期をへだてて得られるバーコード情報
のラインセンサ上での両端点の移動量の大小関係が前記
と逆の大小関係にある場合に該バーコード情報を第3の
バーコード情報として記憶し、 以上記憶された第1から第3の一連のバーコード情報に
基づいてバーコードを識別するバーコード識別方法。
(57) [Claims] A bar code identification device having a line sensor was moved relative to the bar code, an image of the bar code was optically formed on the line sensor, and the line sensor was electrically scanned. A method of identifying a barcode based on barcode information, wherein the barcode information obtained first and the barcode information obtained after a predetermined period have the position of one end point on each line sensor. Compare the movement amount with the movement amount of the other end point,
When there is a magnitude relationship between the movement amounts of both end points, the barcode information is stored as first barcode information, and thereafter, the movement amount of one end point on the line sensor of the obtained barcode information And comparing the movement amounts of the other end points with each other, and when the movement amounts of the both end points are equal to each other, the barcode information repeatedly obtained at the predetermined cycle is stored as second barcode information, respectively. If the magnitude relationship between the movement amounts of the bar code information obtained by extending the predetermined period on the line sensor is opposite to the magnitude relationship described above, the bar code information is stored as third bar code information. A barcode identification method for identifying a barcode based on the first to third series of barcode information stored above.
JP62245293A 1987-09-28 1987-09-28 Barcode identification method Expired - Lifetime JP2775734B2 (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP62245293A JP2775734B2 (en) 1987-09-28 1987-09-28 Barcode identification method
DE3854885T DE3854885T2 (en) 1987-09-28 1988-09-27 Combine read bar code data
EP88115905A EP0310921B1 (en) 1987-09-28 1988-09-27 Combining bar code read data
CA000578603A CA1310417C (en) 1987-09-28 1988-09-27 Combining bar code read data
NO884274A NO174944C (en) 1987-09-28 1988-09-27 Method and apparatus for reading and combining bar code data
KR1019880012552A KR910005389B1 (en) 1987-09-28 1988-09-28 Method for processing bar code reading data synthesis and method for sythesizing bar code reading data
US07/250,181 US5045677A (en) 1987-09-28 1988-09-28 Combining bar code read data from a plurality of scanning lines formed from one-dimensional images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62245293A JP2775734B2 (en) 1987-09-28 1987-09-28 Barcode identification method

Publications (2)

Publication Number Publication Date
JPS6486283A JPS6486283A (en) 1989-03-30
JP2775734B2 true JP2775734B2 (en) 1998-07-16

Family

ID=17131511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62245293A Expired - Lifetime JP2775734B2 (en) 1987-09-28 1987-09-28 Barcode identification method

Country Status (1)

Country Link
JP (1) JP2775734B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56103768A (en) * 1980-01-21 1981-08-19 Sharp Corp Optical reader

Also Published As

Publication number Publication date
JPS6486283A (en) 1989-03-30

Similar Documents

Publication Publication Date Title
KR910005389B1 (en) Method for processing bar code reading data synthesis and method for sythesizing bar code reading data
USRE36581E (en) Character reader and recognizer with a specialized editing function
US6264105B1 (en) Bar code reader configured to read fine print barcode symbols
KR100263734B1 (en) Two-dimensional code symbol mark decoding method
US5365048A (en) Bar code symbol reading apparatus with double-reading preventing function
JP2835274B2 (en) Image recognition device
US7523866B2 (en) Bar code reading device having image processing mode
KR100309245B1 (en) Barcode Symbol Reading Device
JPH06309485A (en) Optical information reader
JP3716527B2 (en) 2D code reading method
JPH07120389B2 (en) Optical character reader
US5233672A (en) Character reader and recognizer with a specialized editing function
JP2775734B2 (en) Barcode identification method
US7203361B1 (en) Adaptive digitizer for optical reader
JP2775735B2 (en) Barcode identification method
JPH05233867A (en) Bar code reader
JPH08263585A (en) Bar code reading device
US5471536A (en) Figure digitizing system
JPH0469788A (en) Optical information reader
JP2576016Y2 (en) Barcode reader
JP3485592B2 (en) Bar code reading device and its reading test device
JPH0793451A (en) Bar code symbol reader
JP2798013B2 (en) Two-dimensional code reading method and apparatus
JP2000268122A (en) Two-dimensional code reader
JP3094708B2 (en) Form reading processor