JP2001256431A - Bar code reader, method for detecting start margin candidate by the same and method for reading bar code - Google Patents

Bar code reader, method for detecting start margin candidate by the same and method for reading bar code

Info

Publication number
JP2001256431A
JP2001256431A JP2000064031A JP2000064031A JP2001256431A JP 2001256431 A JP2001256431 A JP 2001256431A JP 2000064031 A JP2000064031 A JP 2000064031A JP 2000064031 A JP2000064031 A JP 2000064031A JP 2001256431 A JP2001256431 A JP 2001256431A
Authority
JP
Japan
Prior art keywords
data
start margin
count data
bar code
margin candidate
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.)
Granted
Application number
JP2000064031A
Other languages
Japanese (ja)
Other versions
JP4555952B2 (en
JP2001256431A5 (en
Inventor
Toshihiro Hirota
俊弘 廣田
Hitoshi Kichijima
仁 吉島
Hidefumi Morita
秀文 盛田
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.)
ROODO KK
TESCO CO Ltd
Original Assignee
ROODO KK
TESCO CO 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
Application filed by ROODO KK, TESCO CO Ltd filed Critical ROODO KK
Priority to JP2000064031A priority Critical patent/JP4555952B2/en
Publication of JP2001256431A publication Critical patent/JP2001256431A/en
Publication of JP2001256431A5 publication Critical patent/JP2001256431A5/ja
Application granted granted Critical
Publication of JP4555952B2 publication Critical patent/JP4555952B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To efficiently read a bar code by simple hardware. SOLUTION: This reader has an m-stage data buffer part 5 reading a bar code and temporarily stores count data showing the width of each part of a binarized signal due to the density difference of the bar code as much as the number of optional stages, an n-fold device 7 multiplying the count data by (n), a comparator 9 comparing a piece of data selected by a selector part 8 among pieces of the count data stored in the m-stage data buffer part with the count data multiplied by (n) by the device 7 to detect start margin candidates, and a start margin candidate storing part 10 storing the data of the detected start margin candidates time sequentially.

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 symbol reading device for reading a bar code symbol as bar code data by an optical reading means in a distribution system of articles or the like having the bar code symbol. The present invention relates to a start margin candidate detection method for detecting a start margin candidate for starting reading of a barcode symbol using a reading device, and a barcode symbol reading method using the detection result.

【0002】[0002]

【従来の技術】バーコード記号読取装置によってバーコ
ード記号の読み取りを行う場合、バーコード記号データ
のデコードを行う前処理として、スタートマージン候補
の検出を行う必要がある。そのスタートマージン候補を
検出する手段として、従来から広く用いられている方法
として、ソフトウェアによる処理によってこれに対応す
ることが知られている。ここで「スタートマージン候
補」とは、バーコード記号の先頭の候補と同義である。
2. Description of the Related Art When a bar code symbol is read by a bar code symbol reading device, it is necessary to detect a start margin candidate as preprocessing for decoding bar code symbol data. As a method of detecting the start margin candidate, it is known that a method widely used in the past corresponds to this by processing by software. Here, the “start margin candidate” is synonymous with the first candidate of the barcode symbol.

【0003】従来のバーコード記号読取装置における、
一般に知られているソフトウェアによりスタートマージ
ン候補を検出してバーコード記号を読み取る方法の例
を、図5に示すバーコード記号の各部の幅を示す時系列
データ例と、図6のフローチャートとによって説明す
る。
In a conventional bar code symbol reading device,
An example of a method of detecting a start margin candidate and reading a barcode symbol by generally known software will be described with reference to an example of time-series data indicating the width of each part of the barcode symbol shown in FIG. 5 and a flowchart of FIG. I do.

【0004】この方法によれば、図5に示す時系列デー
タから、ソフトウェアでスタートマージン候補の検出を
行うために、図6に示すように、読み取った記号の格納
データにおけるm番目のデータを読み出し、それが黒デ
ータであったとき、そのデータ値(バー幅)のn倍(こ
の例では3倍で、d=格納データm×3)と、その直前
のm−1番目の白データのデータ値とを比較演算し、前
者より後者の方が大きかったときにスタートマージン候
補と判別することによって実現している。ここで、上記
演算に使用する「n」の値は、一般的に3〜7程度とす
る。またmは読み終わった全データのうちの任意の場所
である。
According to this method, in order to detect a start margin candidate by software from the time-series data shown in FIG. 5, as shown in FIG. , When it is black data, the data value (bar width) is n times (in this example, 3 times, d = storage data m × 3) and the data of the (m−1) th white data immediately before it This is realized by performing a comparison operation with the value and determining that the latter is a start margin candidate when the latter is larger than the former. Here, the value of “n” used for the above calculation is generally about 3 to 7. In addition, m is an arbitrary place in all the read data.

【0005】このような、従来のソフトウェアを用いて
スタートマージン候補を検出する場合には、ソフトウェ
アはこのスタートマージン候補が検出されるまで、すな
わちバーコード記号の先頭の候補が検出されるまで、読
み取ったデータ値の全てに対して繰り返して上記の比較
演算を行い、その後にデコード処理に移行することによ
ってバーコード記号を読み取っている。
When a start margin candidate is detected using such conventional software, the software reads the start margin candidate until the start margin candidate is detected, that is, until the head candidate of the bar code symbol is detected. The above comparison operation is repeatedly performed for all of the data values obtained, and thereafter, the barcode symbol is read by shifting to the decoding process.

【0006】図5は、時系列的に格納されたバーコード
記号のm−2番目からm+3番目までのバー幅のデータ
例を示す。図6は、上記「n」を「3」にした場合のソ
フトウエアによるスタートマージン候補検出処理例を示
すフローチャートである。この例によれば、黒いバーの
3倍以上の幅の白いバーが直前にあった時に、その黒い
バーがスタートマージン候補であると判断する。また、
他の従来例として、バーコードの位置をマイクロプロセ
ッサ(CPU)を用いないで検出する方法もある。
FIG. 5 shows an example of data of bar widths from the (m−2) th to (m + 3) th bar code symbols stored in time series. FIG. 6 is a flowchart showing an example of the start margin candidate detection processing by software when the above “n” is set to “3”. According to this example, when a white bar having a width of three times or more the black bar is immediately before, it is determined that the black bar is a start margin candidate. Also,
As another conventional example, there is a method of detecting the position of a barcode without using a microprocessor (CPU).

【0007】例えば、特開平3−144787号公報に
見られるように、走査されたイメージを白と黒に対応す
る2つのレベルのデータとして読み取るスキャナから
“白”に対応するレベルのデータの連続入力期間を計測
する計測回路と、この計測回路によって計算された上記
連続入力期間と予め設定された期間とを比較する比較回
路と、この比較回路による比較の結果に基づいて、デー
タ処理を行うCPUに対してバーコード記号の認識処理
を起動させる起動回路とを備え、ハード的にバーコード
記号の開始位置を検出してバーコード記号の認識処理を
開始させる方法も提案されている。
For example, as disclosed in Japanese Patent Application Laid-Open No. 3-144787, a scanner which reads a scanned image as two levels of data corresponding to white and black continuously inputs data of a level corresponding to "white". A measuring circuit for measuring a period, a comparing circuit for comparing the continuous input period calculated by the measuring circuit with a preset period, and a CPU for performing data processing based on a result of the comparison by the comparing circuit. On the other hand, there has also been proposed a method including a starting circuit for starting a barcode symbol recognition process, and detecting a start position of the barcode symbol by hardware to start the barcode symbol recognition process.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上述し
たような従来のバーコード記号を読み取る方法におい
て、スタートマージン候補の検出をソフトウェアで行う
場合には、スタートマージン候補が検出されるまで、す
なわちバーコード記号の先頭の候補が検出されるまでデ
コード処理を開始することができない。従って読み取っ
たバーコード記号データに対し、スタートマージン候補
の検出が成されるまで繰り返し演算をしなければならな
い。よってバーコード記号データのデコード処理の前
に、スタートマージン候補を検出するためのある程度の
時間は必要不可欠であり、結果的にバーコード記号の読
み取り時間に影響を与えるものである。
However, in the above-described conventional bar code symbol reading method, when the start margin candidates are detected by software, the start margin candidates are not detected until the start margin candidates are detected. The decoding process cannot be started until the leading candidate of the symbol is detected. Therefore, it is necessary to repeatedly perform an operation on the read barcode symbol data until a start margin candidate is detected. Therefore, before decoding the barcode symbol data, a certain amount of time for detecting the start margin candidate is indispensable, and as a result, the reading time of the barcode symbol is affected.

【0009】また、上述したバーコード記号の開始位置
をハード的に検出してCPUにバーコード記号の認識処
理を開始させる方法も、その検出された黒バーの位置が
バーコード記号の先頭の候補であるという1つ(単独)
の検出信号をCPUに伝達し、その信号に基づいてCP
Uが処理することとなり、結果としてソフトウェアの処
理に頼らざるを得ないことになる。
The above-described method of detecting the start position of a barcode symbol by hardware and causing the CPU to start the recognition process of the barcode symbol also requires that the detected position of the black bar be a leading candidate of the barcode symbol. One that is (single)
Is transmitted to the CPU, and based on the signal, the CP
U will process, and as a result, will have to rely on software processing.

【0010】すなわち、この場合、スタートマージンレ
ジスタとマージンカウンタの値を比較するコンパレータ
(比較回路)の出力信号を、直接CPUが取り込むの
で、CPUは直ちに演算処理に入ることになり、仮に印
刷汚れその他の外的要因による汚れ等により、このスタ
ートマージン候補の検出に誤りがあった場合、ソフトウ
ェア処理で再度スタートマージン候補の頭出しをしなけ
ればならず、やはり検出時間がかかっていた。
That is, in this case, the CPU directly takes in the output signal of the comparator (comparing circuit) for comparing the value of the start margin register with the value of the margin counter. If there is an error in the detection of the start margin candidate due to dirt or the like due to an external factor, the start margin candidate must be found again by software processing, which also takes a long detection time.

【0011】この発明は、このような従来の問題を解決
するためになされたものであり、上述した従来例のよう
なソフトウェアを用いることなく、簡単なハードウェア
により、効率良くバーコード記号の読み取りを行うこと
ができるようにし、しかも、印刷されたバーコード記号
に印刷汚れその他の外的要因による汚れ等が存在した場
合でも、誤りなくスタートマージン候補の検出ができる
ようにすることを目的とする。それによって、バーコー
ド記号読取装置の製造コストの低減を図ることも目的と
する。
The present invention has been made to solve such a conventional problem, and it is possible to efficiently read bar code symbols with simple hardware without using software as in the above-described conventional example. And to detect a start margin candidate without error even when a printed barcode symbol is stained by printing stains or other external factors. . Thereby, it is another object to reduce the manufacturing cost of the bar code symbol reading device.

【0012】[0012]

【課題を解決するための手段】この発明は上記目的を達
成するために、バーコード記号を読み取ってその濃度差
により2値化した信号の各部の幅を示すカウントデータ
を、任意の段数分だけ一時格納しておくm段データバッ
ファ部と、上記カウントデータをn倍するn倍器と、上
記m段データバッファ部に格納されたカウントデータの
うちの選択したデータと、上記n倍器によりn倍された
カウントデータとを比較して、スタートマージン候補を
検出する比較器と、その比較器によって検出されたスタ
ートマージン候補のデータを時系列的に格納するスター
トマージン候補格納部とを有することを特徴とするバー
コード記号読取装置を提供する。
SUMMARY OF THE INVENTION In order to achieve the above object, according to the present invention, a bar code symbol is read, and count data indicating the width of each part of a signal binarized by a density difference is provided by an arbitrary number of stages. An m-stage data buffer for temporarily storing the data; an n-multiplier for multiplying the count data by n; a selected one of the count data stored in the m-stage data buffer; Comparing with the doubled count data, a comparator for detecting a start margin candidate, and a start margin candidate storage unit for storing data of the start margin candidate detected by the comparator in chronological order. A bar code symbol reading device is provided.

【0013】上記バーコード記号のカウントデータを任
意の段数分だけ一時格納するm段データバッファ部は、
フリップフロップ回路又はメモリ等の記憶回路で構成す
ることができる。また、上記バーコード記号のカウント
データをn倍するn倍器は、演算回路によって構成する
とよい。
An m-stage data buffer unit for temporarily storing the bar code symbol count data for an arbitrary number of stages includes:
A storage circuit such as a flip-flop circuit or a memory can be used. An n-multiplier for multiplying the bar code symbol count data by n may be constituted by an arithmetic circuit.

【0014】また、この発明によるスタートマージン候
補検出方法は、上記バーコード記号読取装置を用いて、
バーコード記号を読み取ってその濃度差により2値化し
た信号の各部の幅を示すカウントデータにおける黒バー
のカウントデータの設定値のn倍と、それ以前のバーの
設定値m段分との各カウントデータとを比較し、上記カ
ウントデータのn倍の値が、m段分の各カウントデータ
値のいずれよりも小さいとき、その黒バーのカンウント
データをスタートマージン候補として検出し、スタート
マージン候補格納部に時系列的に格納することを特徴と
する。
Further, a start margin candidate detecting method according to the present invention uses the bar code symbol reading device described above.
A bar code symbol is read, and n times the set value of the count data of the black bar in the count data indicating the width of each part of the signal binarized by the density difference, and m steps of the set value of the bar before that. The count data is compared with the count data, and when the value of n times the count data is smaller than each of the count data values of the m stages, the count data of the black bar is detected as a start margin candidate, and the start margin candidate is detected. It is characterized in that it is stored in a storage unit in a time-series manner.

【0015】さらに、この発明によるバーコード記号読
取方法は、上記スタートマージン検出方法によって上記
スタートマージン候補格納手段に時系列的に格納された
スタートマージン候補を、マイクロプロセッサが時系列
的に早い方から順次呼び出して、その呼び出したスター
トマージン候補に対応するカウントデータからバーコー
ド記号の認識処理を試みる。
Further, in the bar code symbol reading method according to the present invention, the start margin candidates stored in the start margin candidate storage means in time series by the start margin detecting method are read by the microprocessor in time series order. The bar code symbols are sequentially called and barcode symbol recognition processing is attempted from the count data corresponding to the called start margin candidate.

【0016】そして、バーコード記号データであると認
識できなかったときは次のスタートマージン候補に対応
するカウントデータからバーコード記号の認識処理を試
みることを繰り返し、バーコード記号データであると認
識しできた時系列的に最初のスタートマージン候補に対
応するカウントデータから開始したバーコード記号の認
識処理を最後まで行って、バーコード記号をデコードす
ることを特徴とする。
If the barcode symbol data cannot be recognized, the barcode symbol recognition process is repeated from the count data corresponding to the next start margin candidate, and the barcode symbol data is recognized. It is characterized in that the barcode symbol recognition processing started from the count data corresponding to the first start margin candidate in time series is performed to the end to decode the barcode symbol.

【0017】[0017]

【発明の実施の形態】以下、この発明の実施の形態を図
面を用いて具体的に説明する。図1は、この発明による
バーコード記号読取装置におけるバーコード記号のスタ
ートマージン候補の検出用ハードウェアのブロック図で
あり、この発明の特徴を最も良く表わす図である。
Embodiments of the present invention will be specifically described below with reference to the drawings. FIG. 1 is a block diagram of hardware for detecting a start margin candidate of a barcode symbol in a barcode symbol reading device according to the present invention, and is a diagram best representing the features of the present invention.

【0018】図1において、1は読み取り対象であるバ
ーコード記号、2はバーコード記号読取装置における光
学読取部、3はバーコードデータ値カウント部であり、
光学読取部2から出力されるバーコードデータを入力し
て、サンプリングクロック発生回路4からのサンプリン
グクロックによってカウント動作を行い、白データおよ
び黒データの幅を示すカウントデータ(数値)に変換す
る。
In FIG. 1, 1 is a bar code symbol to be read, 2 is an optical reading unit in a bar code symbol reading device, 3 is a bar code data value counting unit,
The barcode data output from the optical reading unit 2 is input, and a count operation is performed by the sampling clock from the sampling clock generation circuit 4 to convert the barcode data into count data (numerical values) indicating the width of white data and black data.

【0019】5はバーコードデータ値カウント部3から
出力されるカウントデータを、m段分(mは任意の整
数)だけ一時格納するm段データバッファ部であり、フ
リップフロップ回路やメモリ等の記憶回路で構成され
る。6はカウントデータ値格納部で、バーコードデータ
値カウント部3から順次出力されるカウントデータを、
時系列的にすべて格納して保存するフリップフロップ回
路やメモリのような記憶回路からなる。7はカウントデ
ータをn倍する演算回路によって構成されるn倍器であ
る。
Reference numeral 5 denotes an m-stage data buffer unit for temporarily storing the count data output from the barcode data value counting unit 3 for m stages (m is an arbitrary integer), such as a flip-flop circuit or a memory. It is composed of a circuit. Reference numeral 6 denotes a count data value storage unit, which stores count data sequentially output from the barcode data value count unit 3.
It consists of a storage circuit such as a flip-flop circuit or a memory that stores and saves all in time series. Reference numeral 7 denotes an n-multiplier constituted by an arithmetic circuit for multiplying the count data by n.

【0020】8はセレクタ部であり、m段データバッフ
ァ部5に一時格納されたm段分のカウントデータのう
ち、比較対象とするデータを選択する。9はセレクタ部
8からのデータとn倍器7からのデータとを比較する比
較器であり、比較の結果n倍器7側のデータの方が小さ
いときにスタートマージン候補検出フラグを出力する。
10はフリップフロップ回路のような記憶機能を有する
スタートマージン候補格納部であり、比較器9から出力
されるスタートマージン候補検出フラグSMFを、その
とき比較対象としたカウントデータ値と対応させて格納
する。
Reference numeral 8 denotes a selector unit, which selects data to be compared among the m-stage count data temporarily stored in the m-stage data buffer unit 5. Reference numeral 9 denotes a comparator for comparing the data from the selector unit 8 with the data from the n-multiplier 7, and outputs a start margin candidate detection flag when the result of the comparison indicates that the data on the n-multiplier 7 side is smaller.
Reference numeral 10 denotes a start margin candidate storage unit having a storage function such as a flip-flop circuit, and stores a start margin candidate detection flag SMF output from the comparator 9 in association with the count data value to be compared at that time. .

【0021】11はスタートマージン候補格納部10と
カウントデータ値格納部6の各データをマイクロプロセ
ッサ(CPU)12に入力させるためのインタフェイス部
である。CPU12は、インタフェイス部11を介して
入力されるスタートマージン候補検出フラグとカウント
データとによって、バーコードの認識処理を実行するマ
イクロプロセッサであるが、そのプログラムメモリであ
るROMおよびデータメモリであるRAM等を含むマイ
クロコンピュータであってもよい。
Reference numeral 11 denotes an interface unit for inputting each data of the start margin candidate storage unit 10 and the count data value storage unit 6 to the microprocessor (CPU) 12. The CPU 12 is a microprocessor that executes a barcode recognition process based on the start margin candidate detection flag and the count data input through the interface unit 11. The CPU 12 is a ROM as a program memory and a RAM as a data memory. And the like.

【0022】このバーコード読取装置は、上記の構成に
おいて、バーコード記号1に対して光学読取部2から、
発光ダイオード(LED)やレーザダイオード(LD)
等の光源による光を照射し、その反射光をフォトダイオ
ードやフォトトランジスタ等の受光素子で受光して電気
信号に変換し、その電気信号を2値化してバーコード記
号の濃淡すなわち黒色バー又は白色バーを示すデジタル
のバーコードデータに変換する。
In the above-described configuration, the bar code reading apparatus has the following features.
Light emitting diode (LED) and laser diode (LD)
Irradiate light from a light source such as a light source, and receive the reflected light with a light receiving element such as a photodiode or a phototransistor to convert it into an electric signal. It is converted to digital barcode data indicating a bar.

【0023】これをサンプリングクロック発生回路4に
よって発生されるサンプリングクロックによってカウン
ト動作するバーコードデータ値カウント部3に入力し、
CPU12が扱えるカウントデータに変換する。そのカ
ウントデータは、バーコード記号1における各白データ
および黒データの幅を示す数値データ列となる。そのカ
ウントデータは、カウントデータ値格納部6に保存され
るとともに、バーコード記号の印刷状態により「m段」
を任意に定めたm段データバッファ部5にも一時格納す
る。
This is input to the bar code data value counting section 3 which counts by the sampling clock generated by the sampling clock generating circuit 4,
The count data is converted into count data that can be handled by the CPU 12. The count data is a numerical data string indicating the width of each white data and black data in the barcode symbol 1. The count data is stored in the count data value storage unit 6 and “m steps” according to the printing state of the barcode symbol.
Is also temporarily stored in the arbitrarily determined m-stage data buffer unit 5.

【0024】スタートマージン候補を検出するにあたっ
ては、カウントデータ値格納部6に今まさに格納しよう
としているカウントデータと、先に一時保存しているm
段データバッファ部5のカウントデータとを比較する必
要がある。このm段分のデータのうち、どのデータを比
較するかを選択するのが、セレクタ部8である。
In detecting a start margin candidate, the count data that is about to be stored in the count data value storage unit 6 and the m that is temporarily stored first
It is necessary to compare the count data of the stage data buffer unit 5 with the count data. The selector unit 8 selects which data is to be compared among the m-stage data.

【0025】このセレクタ部8には、予めCPU12等
によりm段データバッファ部5中の何段目までのデータ
を比較対象とするかを、バーコード記号の印刷状態、印
刷汚れ、外的要因による汚れ等に準じて設定しておくこ
とができる。これを、この発明の説明においては設定値
mと定義する。
The selector section 8 determines in advance how many rows of data in the m-stage data buffer section 5 are to be compared by the CPU 12 or the like according to the printing state of barcode symbols, printing stains, and external factors. It can be set according to dirt or the like. This is defined as a set value m in the description of the present invention.

【0026】また、データを比較するにあたっては、m
段データバッファ部5からのカウントデータが、今バー
コードデータ値カウント部3から出力されたカウントデ
ータの値の何倍より大きいことをもってスタートマージ
ン候補とするかも、予め設定しておく必要がある。その
何倍かを示す「n」の設定及びそのn倍の演算を行うの
がn倍器7である。なお、このn倍器7においてカウン
トデータを何倍にするかの設定も、バーコード記号の印
刷状態等により、予めCPU12等により行っておく。
これを、この発明の説明においては設定値nと定義す
る。
In comparing data, m
It is also necessary to set in advance whether the count data from the row data buffer unit 5 is larger than the count data value output from the barcode data value count unit 3 and is used as a start margin candidate. It is the n-multiplier 7 that performs the setting of “n” indicating the multiple and the calculation of n times. The setting of how many times the count data is to be multiplied in the n-multiplier 7 is also set in advance by the CPU 12 or the like according to the printing state of the barcode symbol and the like.
This is defined as a set value n in the description of the present invention.

【0027】n倍器7から出力されるデータと、セレク
タ部8において選択して出力されたm段データバッファ
部5のデータを、比較器9において比較する。このと
き、n倍器7から出力されるデータの方が小さいとき
は、スタートマージン候補があったと判定し、スタート
マージン候補検出フラグSMFを出力する。そのフラグ
SMFは、スタートマージン候補格納部10に、どのカ
ウントデータによってスタートマージン候補となったか
も判るように、カウントデータ値格納部6に格納された
最新のカウントデータと対応させて保存される。
The comparator 9 compares the data output from the n-multiplier 7 with the data of the m-stage data buffer 5 selected and output by the selector 8. At this time, if the data output from the n multiplier 7 is smaller, it is determined that there is a start margin candidate, and a start margin candidate detection flag SMF is output. The flag SMF is stored in the start margin candidate storage unit 10 in association with the latest count data stored in the count data value storage unit 6 so as to determine which count data has become a start margin candidate.

【0028】スタートマージン候補は1つだけとは限ら
ないが、スタートマージン候補検出フラグSMFが発生
するたびに、そのフラグSMFとそのとき比較対象にな
ったカウントデータとが、スタートマージン候補格納部
10に対応して逐次格納される。ただし、スタートマー
ジン候補は、バーコード記号1における黒色バーの手前
に、ある一定以上の幅の白バーが存在しているときに発
生させるものである。
Although the number of start margin candidates is not limited to one, each time the start margin candidate detection flag SMF is generated, the flag SMF and the count data compared at that time are stored in the start margin candidate storage unit 10. Are sequentially stored. However, the start margin candidate is generated when a white bar having a certain width or more exists before the black bar in the barcode symbol 1.

【0029】また、このスタートマージン候補格納部1
0に格納されているスタートマージン候補検出フラグS
MFおよび、カウントデータ値格納部6に格納されてい
るカウントデータは、インタフェイス部11を介してC
PU12によって読み出し可能である。これらの構成は
全てハードウェアで構築されている。
The start margin candidate storage unit 1
Start margin candidate detection flag S stored in 0
The MF and the count data stored in the count data value storage 6 are transmitted to the C
It can be read by PU12. These components are all constructed by hardware.

【0030】この図1に示したバーコード記号読取装置
を用いたスタートマージン候補検出方法のいくつかの実
施例を、図2から図4によってそれぞれ説明する。図2
は、図1によって説明したこの発明によるスタートマー
ジン候補を検出するためのハードウェアにおけるバーコ
ードデータの流れと、スタートマージン候補を検出する
までの動作を説明するための図であり、第1の実施例を
示す。
Several embodiments of a method for detecting a start margin candidate using the bar code symbol reader shown in FIG. 1 will be described with reference to FIGS. FIG.
FIG. 4 is a diagram for explaining a flow of barcode data in hardware for detecting a start margin candidate according to the present invention described with reference to FIG. 1 and an operation until a start margin candidate is detected, according to the first embodiment; Here is an example.

【0031】図2において、(A)に示すバーコード記
号を光学読取部2によって読み取って、(B)に示すよ
うに2値のバーコードデータに変換する。この例では白
レベルを“0”に、黒レベルを“1”にしている。この
バーコードデータを、バーコードデータ値カウント部3
によって各レベル毎にその継続時間(幅)をサンプリン
グクロックの周期でカウントし、(C)に示すカウント
データに変換する。
In FIG. 2, the bar code symbol shown in FIG. 2A is read by the optical reading unit 2 and converted into binary bar code data as shown in FIG. In this example, the white level is "0" and the black level is "1". This barcode data is stored in a barcode data value
Thus, the duration (width) of each level is counted at the cycle of the sampling clock, and is converted into count data shown in FIG.

【0032】すなわち、このカウントデータが、バーコ
ード記号1における記号の濃淡(黒バーと白バー)の幅
を示しており、記号の幅が広い方がカウントデータの値
が大きい。すなわち、このカウントデータの値は、バー
コード記号1を構成する黒バー又は白バーの幅に比例す
る。なお、このカウントデータは、図1に示したサンプ
リングクロック発生回路4からのサンプリングクロック
のパルス数により、バーコード記号の各幅を表すように
している。
That is, the count data indicates the width of the shade (black bar and white bar) of the symbol in the bar code symbol 1, and the wider the symbol, the larger the value of the count data. That is, the value of the count data is proportional to the width of the black bar or the white bar constituting the barcode symbol 1. The count data represents each width of the barcode symbol by the number of pulses of the sampling clock from the sampling clock generating circuit 4 shown in FIG.

【0033】さらに、図2の(C)には、カウントデー
タのうち(a)部分から(h)部分のデータを記してい
るが、時系列的に(a)部分のデータが一番古く、
(h)部分のデータが一番新しいものである。すなわ
ち、このカウントデータは、図1に示したm段データバ
ッファ部5に時系列的に格納されている。
Further, FIG. 2C shows the data of the parts (a) to (h) of the count data, but the data of the part (a) is the oldest in time series.
(H) The data of the part is the newest. That is, the count data is stored in time series in the m-stage data buffer unit 5 shown in FIG.

【0034】この第1の実施例においては、予め図1の
セレクタ部8に、設定値mを「2」とし(m=2)、常
に2つ前までのデータと比較することがが人為的に設定
されている。また、図1のn倍器7には、予め設定値n
を「3」とし、常にカウントデータを3倍することが、
これも人為的に設定されている。図2に示す(C)のカ
ウントデータのうち、(a)部について説明すると、こ
こには白色のバー記号の幅に相当する「100」という
値が格納されている。
In the first embodiment, it is artificial to previously set the set value m to "2" (m = 2) in the selector unit 8 of FIG. 1 and always compare the set value m with the data up to two before. Is set to The set value n is previously stored in the n-multiplier 7 of FIG.
Is set to “3”, and the count data is always tripled.
This is also set artificially. The part (a) of the count data (C) shown in FIG. 2 will be described. Here, a value “100” corresponding to the width of a white bar symbol is stored.

【0035】次に(b)部に、上記白色のバー記号の直
後の黒色のバー記号の幅に相当した「20」という値が
格納されている場合、この第1の実施例では、設定値n
=3が予め設定されているので、この黒色のバー記号
が、n倍器7を通してカウントデータとして出力される
時、その出力値は「20×3=60」となる。この値
が、図1の比較器9において、カウントデータの(a)
部の時点で既にm段データバッファ部5に格納されてい
るデータ値である「100」と比較される(の比較
1)。
Next, when the value "20" corresponding to the width of the black bar symbol immediately after the white bar symbol is stored in the portion (b), the set value is set in the first embodiment. n
= 3 is set in advance, and when this black bar symbol is output as count data through the n-multiplier 7, the output value is “20 × 3 = 60”. This value is calculated by the comparator 9 shown in FIG.
The data value is compared with the data value “100” already stored in the m-stage data buffer unit 5 at the time of the copy (comparison 1).

【0036】その比較の結果、60<100となり、ス
タートマージン候補が検出され、(D)のスタートマー
ジン候補検出フラグが、カウントデータの(b)部に相
当する部分で“1”となる。なお、このスタートマージ
ン候補検出フラグは、“1”のとき検出あり、“0”の
ときは検出なしを示す。
As a result of the comparison, 60 <100, the start margin candidate is detected, and the start margin candidate detection flag of (D) becomes "1" in a portion corresponding to the (b) portion of the count data. The start margin candidate detection flag is "1" to indicate detection, and "0" indicates no detection.

【0037】次に、(C)に示すカウントデータの
(d)部に着目すると、この時のカウントデータは「2
0」である。ここで、設定値m=2であるので、時系列
でその2つ前までのデータ(b)部および(c)部が比
較の対象となる。またn倍器7の設定値n=3が設定さ
れており、この黒色のバー記号がカウントデータとして
出力されたとき、n倍器7の出力値は「20×3=6
0」となる。この値が、比較器9においてカウントデー
タの(b)部および(c)部と比較される(の比較
2)が、(b)部の20および(c)部の35よりも大
きいため、スタートマージン候補検出フラグは発生せ
ず、“0”となる。
Next, focusing on the part (d) of the count data shown in (C), the count data at this time is "2".
0 ". Here, since the set value m = 2, the data (b) and the data (c) up to the immediately preceding data in the time series are to be compared. Further, the set value n = 3 of the n-multiplier 7 is set, and when this black bar symbol is output as count data, the output value of the n-multiplier 7 is “20 × 3 = 6”.
0 ". This value is compared with the (b) and (c) parts of the count data in the comparator 9 (Comparison 2), which is larger than the (20) of the (b) part and the 35 of the (c) part. The margin candidate detection flag is not generated, and is set to “0”.

【0038】以下、これを繰り返し、スタートマージン
候補を逐次ハードウェアで自動検出し、そのスタートマ
ージン候補検出フラグを図1のスタートマージン候補格
納部10に保存していく。
Thereafter, this process is repeated, and the start margin candidates are automatically detected by the hardware sequentially, and the start margin candidate detection flag is stored in the start margin candidate storage unit 10 of FIG.

【0039】そして、図2の(C)に示すカウントデー
タの(h)部に着目すると、この時のカウントデータは
「20」であり、n倍器7の出力値は「(h)×3=2
0×3=60」となる。この値が、比較器9において、
カウントデータの(g)部および(f)部と比較される
(の比較4)。その結果、(g)部のカウントデータ
は「35」であるから(g)<(h)×3になるため、
時系列的にその1つ前の(f)部のカウントデータと比
較することになる。(f)部のカウントデータは「7
0」であるから、(f)>(h)×3となり、スタート
マージン候補が検出され、スタートマージン候補検出フ
ラグが(h)部に相当する部分で“1”となり、スター
トマージン候補格納部10に格納される。
Focusing on the (h) part of the count data shown in FIG. 2C, the count data at this time is "20", and the output value of the n-multiplier 7 is "(h) × 3". = 2
0 × 3 = 60 ”. This value is obtained by the comparator 9
It is compared with the (g) and (f) parts of the count data (comparison 4). As a result, since the count data of the portion (g) is “35”, (g) <(h) × 3, so that
The count data of the immediately preceding (f) part is compared in time series. The count data of the section (f) is “7
Since “0”, (f)> (h) × 3, the start margin candidate is detected, and the start margin candidate detection flag becomes “1” in a portion corresponding to the (h) portion, and the start margin candidate storage unit 10 Is stored in

【0040】かくして、検出されたスタートマージン候
補検出フラグは、図1のスタートマージン候補格納部1
0に、図2の(D)に示すように(C)のカウントデー
タの(a)部から(h)部……で示す時系列(カウント
データ値格納部6に格納されたカウントデータ列)と対
比できる形で格納される。
Thus, the detected start margin candidate detection flag is stored in the start margin candidate storage unit 1 shown in FIG.
0, the time series (a) to (h)... Of the count data of (C) as shown in (D) of FIG. 2 (the count data sequence stored in the count data value storage 6) It is stored in a form that can be compared with.

【0041】図1におけるCPU12は、予め定められ
たバーコード認識用のコード、例えばJANコードをメ
モリに記憶させており、このスタートマージン候補格納
部10からそこに格納されているデータを順次呼び出
し、その呼び出したスタートマージン候補からのカウン
トデータ列によってJANコードによるバーコード記号
の認識処理(デコード動作)を試み、バーコード記号デ
ータであると認識できなかったときは、次のスタートマ
ージン候補からのカウントデータ列によってバーコード
記号の認識処理を試みることを繰り返し、バーコード記
号データであると認識しできた時系列的に最初のスター
トマージン候補のカウントデータから開始したバーコー
ド記号の認識処理を、最後まで行ってバーコード記号を
読み取る。
The CPU 12 in FIG. 1 stores a predetermined bar code recognition code, for example, a JAN code, in a memory, and sequentially calls data stored therein from the start margin candidate storage unit 10. A bar code symbol recognition process (decoding operation) based on the JAN code is attempted based on the count data sequence from the called start margin candidate. If the bar code symbol data cannot be recognized, the count from the next start margin candidate is counted. The bar code symbol recognition process is repeated by repeating the data sequence, and the bar code symbol recognition process started from the count data of the first start margin candidate in chronological order that can be recognized as bar code symbol data is terminated. Go to and read the barcode symbol.

【0042】図3は、図1に示したバーコード記号読取
装置を用いたスタートマージン候補検出方法の第2の実
施例を示す。この第2の実施例は、バーコード記号の前
に印刷汚れあるいは手等外的要因による汚れが存在する
場合に、スタートマージン候補を検出するケースであっ
て、その汚れがバーコード記号の比較的前に存在する場
合の例を示す。
FIG. 3 shows a second embodiment of a start margin candidate detecting method using the bar code symbol reading apparatus shown in FIG. The second embodiment is a case in which a start margin candidate is detected when there is a print stain or a stain due to an external factor such as a hand before the barcode symbol. Here is an example of the case where it exists before.

【0043】この図3の(A)に示すバーコード記号を
図1の光学読取部2で読み取って、(B)に示す2値の
バーコードデータに変換し、さらにそれをバーコードデ
ータ値カウント部3によって(C)に示すでカウントデ
ータに変換し、それをm段データバッファ部5およびカ
ウントデータ値格納部6にそれぞれ時系列に格納するこ
とは、第1の実施例の場合と同様である。したがって、
そのプロセスの詳細な説明は省略する。
The bar code symbol shown in FIG. 3A is read by the optical reading section 2 in FIG. 1, converted into binary bar code data shown in FIG. 1B, and further converted to a bar code data value count. The conversion into count data as shown in (C) by the unit 3 and the storage of the count data in the m-stage data buffer unit 5 and the count data value storage unit 6 in time series are the same as in the first embodiment. is there. Therefore,
Detailed description of the process is omitted.

【0044】また、この第2の実施例においても、予め
図1のセレクタ部8に設定する設定値mは2(m=2)
で、n倍器7に設定する設定値nも3(n=3)であ
り、第1の実施例の場合と同じである。図3に示す、こ
の第2の実施例では、前記したようにバーコード記号の
前に幾つかの汚れがある場合の、スタートマージン候補
を検出する例であるので、その点に絞って以下に説明す
る。
Also in the second embodiment, the set value m previously set in the selector section 8 in FIG. 1 is 2 (m = 2).
Thus, the set value n set in the n-multiplier 7 is also 3 (n = 3), which is the same as in the first embodiment. The second embodiment shown in FIG. 3 is an example in which a start margin candidate is detected when there are several stains before the barcode symbol as described above. explain.

【0045】図3の(C)に示すカウントデータのう
ち、(a)部には白色のバー記号の幅に相当する「6
0」という値が格納されている。次に、(b)部には、
上記白色のバー記号の直後の黒色のバー記号の幅に相当
する「15」という値が格納されている。この第2の実
施例でも、第1の実施例と同様に、設定値n=3が設定
されているので、この黒色のバー記号に相当する汚れ
が、カウントデータとして出力されたとき、n倍器7の
出力値は、「15×3=45」となる。
In the count data shown in (C) of FIG. 3, (a) shows "6" corresponding to the width of the white bar symbol.
"0" is stored. Next, in part (b),
The value “15” corresponding to the width of the black bar symbol immediately after the white bar symbol is stored. Also in the second embodiment, since the set value n = 3 is set as in the first embodiment, when the stain corresponding to the black bar symbol is output as count data, it is increased by n times. The output value of the unit 7 is “15 × 3 = 45”.

【0046】この値が、図1に置ける比較器9によっ
て、カウントデータの(a)部の時点で既にm段データ
バッファ部5に格納されているデータ値である「60」
と比較される(の比較1)。その結果として、(a)
>(b)×3であるため、スタートマージン候補が検出
されたことになり、図3の(D)に示すスタートマージ
ン候補検出フラグが、カウントデータの(b)部に相当
する部分で1となる。この検出フラグがスタートマージ
ン候補格納部10に格納される。
This value is “60”, which is the data value already stored in the m-stage data buffer unit 5 at the time point (a) of the count data by the comparator 9 shown in FIG.
Is compared with (comparison 1). As a result, (a)
> (B) × 3, it means that a start margin candidate has been detected, and the start margin candidate detection flag shown in (D) of FIG. 3 is set to 1 at a portion corresponding to the (b) portion of the count data. Become. This detection flag is stored in the start margin candidate storage unit 10.

【0047】次に、図3の(C)に示すカウントデータ
の(d)部に着目すると、この時のカウントデータの値
は「8」であるから、n倍器7の出力値は、「8×3=
24」となる。ここで設定値mは2であるため、この値
と時系列で2つ前までのデータが比較の対象となる(
の比較2)が、この値「24」は、(b)部および
(c)部の時点で既に格納されているデータ値「15」
および「8」よりも大きい。そのため、スタートマージ
ン候補検出フラグは発生せず“0”である。
Next, focusing on the part (d) of the count data shown in FIG. 3 (C), the value of the count data at this time is “8”, and the output value of the n-multiplier 7 is “ 8 × 3 =
24 ". Here, since the set value m is 2, the data up to two values before this value in time series are to be compared (
The comparison 2) shows that the value “24” is the data value “15” already stored at the time of the parts (b) and (c).
And greater than "8". Therefore, the start margin candidate detection flag is not generated and is “0”.

【0048】以下このような動作を繰り返し、スタート
マージン候補を逐次図1に示したハードウェアで自動的
に検出し、その検出フラグをスタートマージン候補格納
部10に保存する。
Thereafter, the above operation is repeated, and the start margin candidates are automatically detected sequentially by the hardware shown in FIG. 1 and the detection flag is stored in the start margin candidate storage unit 10.

【0049】次に、図3の(C)に示すカウントデータ
における(h)部に着目すると、この時のカウントデー
タは「20」であり、従ってn倍器7の出力値は「20
×3=60」であり、直前の(g)部のデータは「6
5」であるから、それと比較すると(の比較4)、
(g)>(h)×3となるため、ここでもスタートマー
ジン候補が検出されたことになり、(D)に示すスター
トマージン候補検出フラグが、カウントデータの(h)
部に相当する部分で“1”となる。
Next, focusing on the part (h) in the count data shown in FIG. 3C, the count data at this time is “20”, and the output value of the n-multiplier 7 is “20”.
× 3 = 60 ”, and the data of the part (g) immediately before is“ 6 ”.
5 ", and when compared with it (comparison 4),
Since (g)> (h) × 3, the start margin candidate is detected again in this case, and the start margin candidate detection flag shown in FIG.
It becomes "1" in the part corresponding to the part.

【0050】このように、この第2の実施例において
も、スタートマージン候補を一度検出したという条件
で、スタートマージン候補検出動作を停止することはな
く、上述した比較演算をハードウェアで継続し、スター
トマージン候補をすべて逐次検出して保存をしていく。
このようにして検出されたスタートマージン候補検出フ
ラグは、図1のスタートマージン候補格納部10に、図
3の(D)に示すように(C)に示すカウントデータの
(a)部から(h)部……で示した時系列(カウントデ
ータ値格納部6に格納されたカウントデータ列)と、
1:1に対比できる形で格納されている。
As described above, also in the second embodiment, under the condition that the start margin candidate has been detected once, the operation of detecting the start margin candidate is not stopped, and the above-described comparison operation is continued by hardware. All the start margin candidates are sequentially detected and stored.
The start margin candidate detection flag detected in this manner is stored in the start margin candidate storage unit 10 of FIG. 1 from the (a) part of the count data shown in (C) to (h) as shown in (D) of FIG. ) Part (a count data string stored in the count data value storage part 6)
It is stored in a form that can be compared to 1: 1.

【0051】ところで、この第2の実施例の図3を観察
すると、(C)のカウントデータにおける(b)部に相
当する部分でスタートマージン候補が検出されている
が、図3を見て明らかなように、バーコードデータ上で
は黒バーに相当するように見える(b)部は、デコード
したいバーそのものではなく、黒色の汚れ部分である。
By the way, when observing FIG. 3 of the second embodiment, a start margin candidate is detected in a portion corresponding to the portion (b) in the count data of (C). Thus, the portion (b) that appears to correspond to a black bar on the barcode data is not the bar itself to be decoded but a black stained portion.

【0052】そのため、仮にCPU12がこの部分をバ
ーコード記号のスタートマージンとみなして、カウント
データ値格納部6から読み出したカウントデータ列のデ
コード処理を開始すると、正常なコードとはならないた
め、CPU12はこれを所定のバーコード記号であると
は認識しない。かかる場合、CPU12はそのデコード
処理を直ちに中止し、正常のバーコード記号をデコード
するために、次のスタートマージン候補検出フラグを探
す。
Therefore, if the CPU 12 considers this portion as a start margin of the bar code symbol and starts decoding the count data string read from the count data value storage section 6, the code does not become a normal code. This is not recognized as a predetermined bar code symbol. In such a case, the CPU 12 immediately stops the decoding process and searches for a next start margin candidate detection flag in order to decode a normal barcode symbol.

【0053】そして、CPU12は次の動作に移り、図
3の(D)に示すスタートマージン候補検出フラグの
(h)部を検出する。そして、CPU12は、カウント
データ値格納部6から読み出したカウントデータ列に対
して、この(h)部をバーコード記号のスタートとみな
してデコード処理を開始する。このデコード処理の過程
において、この場合は前回と異なり、CPU12はこの
スタートマージン候補検出フラグが対応する(h)部移
後のカウントデータ列をバーコードデータであると認識
し、デコード処理を最後まで続行してバーコードを読み
取る。
Then, the CPU 12 moves to the next operation, and detects the part (h) of the start margin candidate detection flag shown in (D) of FIG. Then, the CPU 12 regards the (h) portion as the start of the barcode symbol for the count data sequence read from the count data value storage 6 and starts the decoding process. In this decoding process, unlike in the previous case, the CPU 12 recognizes the count data sequence after the (h) copy shift corresponding to the start margin candidate detection flag as barcode data, and completes the decoding process to the end. Continue and read the barcode.

【0054】このように、図1に示したCPU12は、
スタートマージン候補格納部10から格納データを呼び
出し、第1の実施例の場合と同様に、どの時点でスター
トマージン候補があったかを認識し、バーコード記号デ
ータであると認識した時系列的に最初のスタートマージ
ン候補検出フラグを検知して、カウントデータ値格納部
6から読み出したカウントデータ列に対する認識(デコ
ード)処理を行って、バーコードを読み取る。
As described above, the CPU 12 shown in FIG.
The stored data is called from the start margin candidate storage unit 10 and, at the same time as in the first embodiment, the time at which the start margin candidate was found is recognized, and the first time-series data recognized as barcode symbol data is recognized. A start margin candidate detection flag is detected, and a barcode is read by performing recognition (decoding) processing on the count data sequence read from the count data value storage unit 6.

【0055】ここで、CPU12が図3の(C)におけ
る(b)部をスタートマージン候補として取り扱ってい
るにもかかわらず、バーコード記号データとして認識処
理しないのは、前述した第1の実施例おいて説明したよ
うに、CPU12には、予め定められた、例えばJAN
コードをメモリに記憶させており、このCPU12が
(b)部のデータも最初はスタートマージン候補として
扱うが、この(b)部のスタートマージン候補以降のカ
ウントデータ列(データ構成)に対して、それがバーコ
ード記号のデータであるか否かを認識(デコード)処理
する。
The reason why the CPU 12 does not recognize the bar code data as the bar code symbol data even though the CPU 12 handles the portion (b) in FIG. 3C as a start margin candidate is the first embodiment described above. As described above, the CPU 12, for example, JAN
The code is stored in the memory, and the CPU 12 initially treats the data of the part (b) as a start margin candidate. However, for the count data sequence (data configuration) after the start margin candidate of the part (b), It recognizes (decodes) whether or not the data is barcode symbol data.

【0056】すなわち、CPU12は、このようなスタ
ートマージン候補が正常なものか、又は汚れ等によるも
のなのかを、デコード処理において判断・処理する。
That is, the CPU 12 determines and processes whether or not such a start margin candidate is normal or due to dirt or the like in a decoding process.

【0057】次に、第3の実施例を図4によって説明す
る。この第3の実施例も前述の第2の実施例と同様、バ
ーコード記号の前に印刷汚れや油汚れ等のある場合のバ
ーコード記号のスタートマージン候補の検出に関する例
であるが、その汚れがバーコード記号の直前に存在する
場合の例である。
Next, a third embodiment will be described with reference to FIG. Similar to the second embodiment, the third embodiment is an example relating to detection of a start margin candidate of a barcode symbol in the case where there is a print stain or oil stain before the barcode symbol. Is present immediately before a bar code symbol.

【0058】かかる場合は、第2の実施例で説明したよ
うに比較段数mを2にしたのでは、バーコード記号のス
タートマージン候補の検出に不都合を生ずる。すなわ
ち、図4に示す第3の実施例において、第2の実施例の
場合と同様に、比較段数mを、m=2、n倍量のnをn
=3と設定すると、(C)に示すカウントデータの
(f)部のデータ値は「12」であるので、n倍量の出
力値は「12×3=36」となり、これがm段分即ち2
段分前のカウントデータの(e)部及び(d)部の「2
0」および「15」とそれぞれ比較され、それより大で
あるので、この(f)部ではスタートマージン候補検出
フラグは検出されない。このような場合にも、バーコー
ド記号の先頭のスタートマージン候補の検出を行えるよ
うにしたのが、この第3の実施例である。
In such a case, if the number m of comparison stages is set to 2 as described in the second embodiment, there is a problem in detecting a start margin candidate of a bar code symbol. That is, in the third embodiment shown in FIG. 4, similarly to the second embodiment, the number m of comparison stages is set to m = 2, and n times the amount of n is set to n.
= 3, the data value of the (f) part of the count data shown in (C) is “12”, so that the output value of the n-fold amount is “12 × 3 = 36”, which is equivalent to m stages, that is, 2
"2" in the part (e) and the part (d) of the count data before the stage.
The start margin candidate detection flag is not detected in this part (f) because it is compared with "0" and "15", respectively. In this case as well, in the third embodiment, the start margin candidate at the head of the bar code symbol can be detected.

【0059】そのため、この第3の実施例では、比較段
数mをm=4、n倍量のnはn=3とする。図4の
(C)に示すカウントデータのうち、(a)部には白色
バー記号の幅に相当する「60」という値が格納されて
いる。次いで(b)部分では、上記白色バーの直後に黒
色バーに相当する記号(汚れ)がカウントデータ「1
5」として出力され、n倍器7の出力値は「15×3=
45」となる。この値が、図3に示した第2の実施例と
同様に比較器9比較され、45<60であるため、
(a)>(b)×3である。したがって、スタートマー
ジン候補が検出されたことになり、(D)に示すスター
トマージン候補検出フラグが(b)部に相当する部分で
“1”となる。
Therefore, in the third embodiment, the number m of comparison stages is m = 4, and the number n of n times is n = 3. In the count data shown in FIG. 4C, a value of “60” corresponding to the width of the white bar symbol is stored in the part (a). Next, in the part (b), the symbol (dirt) corresponding to the black bar immediately after the white bar is counted data “1”.
5 ”, and the output value of the n-multiplier 7 is“ 15 × 3 =
45 ". This value is compared with the comparator 9 as in the second embodiment shown in FIG. 3, and since 45 <60,
(A)> (b) × 3. Therefore, the start margin candidate is detected, and the start margin candidate detection flag shown in (D) becomes “1” in a portion corresponding to the portion (b).

【0060】次に、バーコード記号の直前の黒い汚れ
(黒色バー)の幅に相当する(d)部に着目すると、こ
の時のカウントデータの値は「15」であり、n倍器7
の出力値は、設定値n=3であるので、「15×3=4
5」となる。ここで設定値m=4であるため、時系列的
に4つ前までのデータがn倍器7の出力値との比較の対
象となる。まず、このカウントデータの(d)部の直前
の(c)部の格納値「65」と比較され、45<65と
なり、ここでもスタートマージン候補が検出され、
(D)に示すスタートマージン候補検出フラグが、カウ
ントデータの(d)部に相当する部分で“1”となる。
Next, focusing on the portion (d) corresponding to the width of the black stain (black bar) immediately before the bar code symbol, the count data value at this time is "15",
Since the set value n = 3, the output value of “15 × 3 = 4
5 ". Here, since the set value m = 4, the data up to four data in time series is to be compared with the output value of the n-multiplier 7. First, the count data is compared with the stored value “65” of the part (c) immediately before the part (d), so that 45 <65.
The start margin candidate detection flag shown in (D) becomes “1” in a portion corresponding to the portion (d) of the count data.

【0061】次いで、カウントデータにおける(f)部
に着目すると、この時のカウントデータは「12」であ
り、n倍器7の出力値は「12×3=36」となる。こ
こでこの実施例では、比較段数mは、m=4(時系列で
4つ前までのカウントデータが比較対象)に設定されて
いるので、まず(e)部のカウントデータ「20」と比
較した時、20<36であるから(e)<(f)×3で
あり、スタートマージン候補は検出されない。
Next, focusing on the part (f) in the count data, the count data at this time is “12”, and the output value of the n-multiplier 7 is “12 × 3 = 36”. Here, in this embodiment, since the number m of comparison stages is set to m = 4 (count data up to four counts in time series are to be compared), first, the number of comparison stages is compared with the count data “20” in the part (e). Then, since 20 <36, (e) <(f) × 3, and no start margin candidate is detected.

【0062】次に、その前の(d)部のカウントデータ
「15」と比較した時、15<36であるから(d)<
(f)×3であり、やはりスタートマージン候補は検出
されない。さらに、その前の(c)部のカウントデータ
「65」と比較した時、65>36であるから(c)>
(f)×3となり、ここで初めてスタートマージン候補
が検出されたことになり、(D)に示すスタートマージ
ン候補検出フラグが、(C)に示すカウントデータの
(f)部に相当する部分で“1”となる。
Next, when compared with the count data "15" of the preceding (d) part, since 15 <36, (d) <
(F) × 3, and no start margin candidate is detected. Further, when compared with the count data “65” of the preceding part (c), 65> 36, so that (c)>
(F) × 3, where the start margin candidate is detected for the first time, and the start margin candidate detection flag shown in (D) is set in the part corresponding to the (f) part of the count data shown in (C). It becomes “1”.

【0063】また、この第3の実施例においても、図4
の(C)に示すカウントデータにおける(b)部および
(d)部でスタートマージン候補が検出されているが、
図4の(A)から明らかなように、バーコードデータ上
では黒バーに相当するように見える(b)部及び(d)
部は、デコードしたいバーそのものではなく、黒色の汚
れの部分である。
Also in the third embodiment, FIG.
Although start margin candidates are detected in the parts (b) and (d) in the count data shown in FIG.
As apparent from FIG. 4A, the bar code data appears to correspond to a black bar (b) and (d).
The part is not a bar itself to be decoded, but a black stained part.

【0064】そこで、この実施例でも前述した第2の実
施例の場合と同様に、図1におけるCPU12は、正常
なバーコード記号をデコードするために、スタートマー
ジン候補格納部10に格納されているスタートマージン
候補フラグを、時系列的に早い方から順次読み出して、
そのカウントデータからのカウントデータ列に対してデ
コード処理を試み、バーコード記号データであると認識
した時系列的に最初のスタートマージン候補検出フラ
グ、図4に示した例では(f)部のスタートマージン候
補検出フラグを検出する。そして、そのフラグに対応す
るカウントデータから開始したバーコード記号の認識
(デコード)動作を最後まで続行して、バーコード記号
を読み取る(デコードする)。
Therefore, in this embodiment, as in the case of the above-described second embodiment, the CPU 12 in FIG. 1 is stored in the start margin candidate storage section 10 in order to decode a normal bar code symbol. The start margin candidate flags are sequentially read out in chronological order,
A decoding process is attempted on the count data sequence from the count data, and a time-series first start margin candidate detection flag recognized as barcode symbol data. In the example shown in FIG. A margin candidate detection flag is detected. Then, the barcode symbol recognition (decoding) operation started from the count data corresponding to the flag is continued to the end to read (decode) the barcode symbol.

【0065】ところで、以上説明した3つの実施例にお
いて、比較段数mの設定値を2および4に設定した例を
説明したが、この設定値mは、バーコード記号の印刷状
態や汚れ等の状態により、人為的に任意に設定すること
が可能であり、その任意に設定するタイミングや方法に
は、次のような方法がある。
By the way, in the three embodiments described above, an example in which the set value of the number m of comparison stages is set to 2 and 4 has been described. Thus, it is possible to set it arbitrarily arbitrarily, and the timing and method for arbitrarily setting include the following methods.

【0066】1.バーコード記号読取開始前に、人間が
印刷状態や汚れの状態を見てCPU12を介して設定す
る方法。 2.バーコード記号の読取が不可能な場合には、人為的
操作によりCPU12を介して再設定する方法。 3.バーコード記号の読取が不可能であるとCPU12
が判断した時、CPU12自身が光学読取部1に次の読
取動作を行わせる前に再設定する方法。
1. A method in which a human observes a printing state and a stain state before starting reading a barcode symbol and sets the state via the CPU 12. 2. When the bar code symbol cannot be read, the bar code is reset via the CPU 12 by manual operation. 3. If the bar code symbol cannot be read, the CPU 12
Is determined by the CPU 12 itself before the optical reading unit 1 performs the next reading operation.

【0067】この発明を実施する際には、これらの何れ
の方法を用いて比較段数mを設定してもよい。また、n
倍器7の設定値nについても、上述の各実施例ではその
設定倍数を3とした場合についてのみ説明したが、バー
コード記号の特徴如何により、3〜7程度に設定すれば
よい。
In practicing the present invention, the number m of comparison stages may be set using any of these methods. Also, n
The setting value n of the multiplier 7 has been described in each of the above embodiments only when the setting multiple is 3, but may be set to about 3 to 7 depending on the characteristics of the bar code symbol.

【0068】なお、上述の各実施例におけるバーコード
記号を構成する各部のデータ幅(カウントデータ値)の
比率は、実際のバーコードのものではなく、あくまで実
施例の説明のためのものである。
The ratio of the data width (count data value) of each part constituting the barcode symbol in each of the above-described embodiments is not for the actual barcode, but is for the purpose of describing the embodiment. .

【0069】[0069]

【発明の効果】以上説明してきたように、この発明によ
れば。バーコード記号読取装置にm段データバッファ部
を設けたことにより、任意のm段前までのデータと、現
在のカウントデータとを比較することができるので、ス
タートマージン候補検出の範囲を大きく広げることがで
きる。またn倍器を設けたことにより、現在のカウント
データを任意のn倍の値にして比較することが可能であ
り、バーコードの種類等によって倍率を最適値に設定す
ることにより、スタートマージン候補の検出精度を高め
ることができる。
As described above, according to the present invention. By providing the m-stage data buffer unit in the bar code symbol reading device, the data up to an arbitrary m-stage before can be compared with the current count data, so that the range of start margin candidate detection can be greatly expanded. Can be. Further, by providing the n-multiplier, it is possible to compare the current count data to an arbitrary n-fold value, and to set the magnification to an optimum value according to the type of the bar code, etc. Detection accuracy can be improved.

【0070】さらに、スタートマージン候補を、カウン
トデータ格納時にハードウェアで自動検出して、その検
出フラグをスタートマージン候補格納部に格納すること
により、CPUによるスタートマージン候補検出処理
(演算)を省くことができ、また、スタートマージン候
補を複数格納することが可能なため、ある1つのスター
トマージン候補が誤りであった場合でも、すばやく次の
スタートマージン候補からCPUによるバーコードデー
タのデコード処理を再開できるので、ソフトウェアを簡
略化することが可能となり、且つバーコード記号読取時
間を短縮することができる。
Further, the start margin candidate is automatically detected by hardware when the count data is stored, and the detection flag is stored in the start margin candidate storage unit, thereby eliminating the start margin candidate detection processing (calculation) by the CPU. In addition, since a plurality of start margin candidates can be stored, even when one of the start margin candidates is erroneous, the decoding process of the barcode data by the CPU can be quickly restarted from the next start margin candidate. Therefore, the software can be simplified and the barcode symbol reading time can be reduced.

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

【図1】この発明によるバーコード記号読取装置におけ
るバーコード記号のスタートマージン候補を検出するハ
ードウェアのブロック図である。
FIG. 1 is a block diagram of hardware for detecting a start margin candidate of a barcode symbol in a barcode symbol reader according to the present invention.

【図2】図1のハードウエアを使用してバーコード記号
のスタートマージン候補を検出する第1の実施例を説明
するための説明図である。
FIG. 2 is an explanatory diagram for explaining a first embodiment for detecting a start margin candidate of a bar code symbol using the hardware of FIG. 1;

【図3】同じく第2の実施例を説明するための説明図で
ある。
FIG. 3 is an explanatory diagram for explaining a second embodiment.

【図4】同じく第3の実施例を説明するための説明図で
ある。
FIG. 4 is an explanatory diagram for explaining a third embodiment.

【図5】従来のバーコード記号のスタートマージン候補
検出方法を説明するための時系列に格納されたバーコー
ド記号のバー幅のカウントデータ列を示す図である。
FIG. 5 is a diagram showing a bar code symbol bar width count data string stored in time series for explaining a conventional bar code symbol start margin candidate detection method.

【図6】従来のソフトウエアによってスタートマージン
候補を検出するための処理のフローチャートである。
FIG. 6 is a flowchart of a process for detecting a start margin candidate using conventional software.

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

1:バーコード記号 2:光学読取部 3:バーコードデータ値カウント部 4:サンプリングクロック発生回路 5:m段データバッファ部 6:カウントデータ値格納部 7:n倍器 8:セレクタ部 9:比較器 10:スタートマージン候補格納部 11:インタフェイス部 12:マイクロプロセッサ(CPU) 1: bar code symbol 2: optical reading unit 3: bar code data value counting unit 4: sampling clock generation circuit 5: m-stage data buffer unit 6: count data value storage unit 7: n-folder 8: selector unit 9: comparison Unit 10: Start margin candidate storage unit 11: Interface unit 12: Microprocessor (CPU)

───────────────────────────────────────────────────── フロントページの続き (72)発明者 吉島 仁 埼玉県児玉郡上里町嘉美833−6 株式会 社式会社テスコ埼玉工場内 (72)発明者 盛田 秀文 埼玉県児玉郡上里町嘉美833−6 株式会 社式会社テスコ埼玉工場内 Fターム(参考) 5B072 AA01 CC24 DD01 FF00  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Jin Yoshishima 833-6, Kami Kamisato-cho, Kodama-gun, Saitama Prefecture Inside Tesco Saitama Plant, Ltd. (72) Inventor Hidefumi Morita 833-6, Kami Kamisato-cho, Kodama-gun, Saitama F-term (reference) in Tesco Saitama Plant of the stock company 5B072 AA01 CC24 DD01 FF00

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 バーコード記号を読み取ってその濃度差
により2値化した信号の各部の幅を示すカウントデータ
を、任意の段数分だけ一時格納しておくm段データバッ
ファ部と、 前記カウントデータをn倍するn倍器と、 前記m段データバッファ部に格納されたカウントデータ
のうちの選択したデータと、前記n倍器によりn倍され
たカウントデータとを比較して、スタートマージン候補
を検出する比較器と、 該比較器によって検出されたスタートマージン候補のデ
ータを時系列的に格納するスタートマージン候補格納部
とを有することを特徴とするバーコード記号読取装置。
An m-stage data buffer unit for temporarily storing, for an arbitrary number of stages, count data indicating the width of each unit of a signal obtained by reading a bar code symbol and binarizing the signal according to a density difference; N is multiplied by n, and the selected data of the count data stored in the m-stage data buffer unit is compared with the count data multiplied by n by the n-multiplier to determine a start margin candidate. A bar code symbol reading device comprising: a comparator for detecting; and a start margin candidate storage unit for storing data of the start margin candidate detected by the comparator in a time-series manner.
【請求項2】 前記m段データバッファ部をフリップフ
ロップ回路又はメモリ等の記憶回路で構成した請求項1
記載のバーコード記号読取装置。
2. The m-stage data buffer unit is configured by a storage circuit such as a flip-flop circuit or a memory.
The bar code symbol reader of the description.
【請求項3】 前記n倍器を演算回路によって構成した
請求項1記載のバーコード記号読取装置。
3. The bar code symbol reading device according to claim 1, wherein said n-folder is constituted by an arithmetic circuit.
【請求項4】 請求項1乃至3のいずれか一項に記載の
バーコード記号読取装置を用いて、バーコード記号を読
み取ってその濃度差により2値化した信号の各部の幅を
示すカウントデータにおける黒バーのカウントデータの
設定値のn倍と、それ以前のバーの設定値m段分との各
カウントデータとを比較し、前記カウントデータのn倍
の値が、m段分の各カウントデータ値のいずれよりも小
さいとき、その黒バーのカンウトデータをスタートマー
ジン候補として検出し、スタートマージン候補格納部に
時系列的に格納することを特徴とするバーコード記号の
スタートマージン候補検出方法。
4. Count data indicating the width of each part of a signal obtained by reading a barcode symbol using the barcode symbol reader according to claim 1 and binarizing the signal based on a density difference. Is compared with each count data of the set value of the count data of the black bar at m stages and the set value of the previous bar of m stages, and the value of n times of the count data is set at each count of the m stages. A bar code symbol start margin candidate detection method, wherein when the data value is smaller than any of the data values, the count data of the black bar is detected as a start margin candidate and stored in a start margin candidate storage unit in time series. .
【請求項5】 請求項4記載のバーコード記号のスター
トマージン検出方法によって前記スタートマージン候補
格納手段に時系列的に格納されたスタートマージン候補
を、マイクロプロセッサが時系列的に早い方から順次呼
び出して、その呼び出したスタートマージン候補に対応
するカウントデータからバーコード記号の認識処理を試
み、バーコード記号データであると認識できなかったと
きは次のスタートマージン候補に対応するカウントデー
タからバーコード記号の認識処理を試みることを繰り返
し、バーコード記号データであると認識しできた時系列
的に最初のスタートマージン候補に対応するカウントデ
ータから開始したバーコード記号の認識処理を最後まで
行って、バーコード記号をデコードすることを特徴とす
るバーコード記号読取方法。
5. The microprocessor sequentially calls the start margin candidates stored in the start margin candidate storage means in chronological order by the start margin detecting means according to claim 4. Then, the barcode symbol recognition process is attempted from the count data corresponding to the called start margin candidate, and if the barcode symbol data cannot be recognized as barcode symbol data, the barcode symbol is calculated from the count data corresponding to the next start margin candidate. The barcode symbol recognition process started from the count data corresponding to the first start margin candidate in chronological order, which was recognized as barcode symbol data, was repeated until the barcode symbol data was recognized as barcode symbol data. Bar code symbol reading characterized by decoding code symbols How to take.
JP2000064031A 2000-03-08 2000-03-08 Bar code symbol reading apparatus, start margin candidate detection method using the same, and bar code symbol reading method Expired - Fee Related JP4555952B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000064031A JP4555952B2 (en) 2000-03-08 2000-03-08 Bar code symbol reading apparatus, start margin candidate detection method using the same, and bar code symbol reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000064031A JP4555952B2 (en) 2000-03-08 2000-03-08 Bar code symbol reading apparatus, start margin candidate detection method using the same, and bar code symbol reading method

Publications (3)

Publication Number Publication Date
JP2001256431A true JP2001256431A (en) 2001-09-21
JP2001256431A5 JP2001256431A5 (en) 2007-06-07
JP4555952B2 JP4555952B2 (en) 2010-10-06

Family

ID=18583799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000064031A Expired - Fee Related JP4555952B2 (en) 2000-03-08 2000-03-08 Bar code symbol reading apparatus, start margin candidate detection method using the same, and bar code symbol reading method

Country Status (1)

Country Link
JP (1) JP4555952B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5800525B2 (en) 2011-02-21 2015-10-28 株式会社オプトエレクトロニクス Optical information reading apparatus, optical information reading method, computer-readable program, and recording medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263381A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Bar code reading device
JPH08185463A (en) * 1994-12-28 1996-07-16 Pentel Kk Method for segmenting bar code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263381A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Bar code reading device
JPH08185463A (en) * 1994-12-28 1996-07-16 Pentel Kk Method for segmenting bar code

Also Published As

Publication number Publication date
JP4555952B2 (en) 2010-10-06

Similar Documents

Publication Publication Date Title
US4488678A (en) Method and apparatus for reading a bar code
JP4117368B2 (en) Bar code reading apparatus and bar code reading method
JPH0844809A (en) Method and apparatus for decoding of multivalued-level bar code or binary-level bar code
US5393968A (en) Method and device for reading bar code
JPH09161001A (en) Bar code reader
WO1990014638A1 (en) Reading method and apparatus for bar code
JP2001256431A (en) Bar code reader, method for detecting start margin candidate by the same and method for reading bar code
JP4188104B2 (en) Bar code reader
US5196685A (en) Bar code reader
JP3448404B2 (en) Barcode reading device and barcode reading method
JPH09171537A (en) Bar code, bar code reader and reading method therefor
JPS6356587B2 (en)
JP2949958B2 (en) Barcode reader
JPH06195497A (en) Bar code decoder
JP3526370B2 (en) Barcode reading method and barcode reader
JP2677806B2 (en) Code reader
JPS61290577A (en) Bar code reader
KR930002341B1 (en) Bar code decoder using digital signal processing chip
JPH11184961A (en) Picture recognition device
JP2933927B2 (en) Pattern recognition method and information processing apparatus
JPH08235300A (en) Bar code reader
JP3891072B2 (en) Bar code reading method and bar code reading apparatus
JP2004234553A (en) Bar code reader
JP2753542B2 (en) Barcode detection device
JPH05108886A (en) Optical character reader

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20040422

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20040426

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040604

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20040604

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041029

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070302

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070412

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070412

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090709

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090811

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091013

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100525

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20100622

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20100622

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20100623

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130730

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees