JPH07319992A - Bar code reader - Google Patents

Bar code reader

Info

Publication number
JPH07319992A
JPH07319992A JP6109908A JP10990894A JPH07319992A JP H07319992 A JPH07319992 A JP H07319992A JP 6109908 A JP6109908 A JP 6109908A JP 10990894 A JP10990894 A JP 10990894A JP H07319992 A JPH07319992 A JP H07319992A
Authority
JP
Japan
Prior art keywords
data
bar code
scan
address
bar
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
JP6109908A
Other languages
Japanese (ja)
Other versions
JP2839836B2 (en
Inventor
Hironobu Kitaoka
広宣 北岡
Masahiro Iida
正広 飯田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Toyota Central R&D Labs Inc
Original Assignee
Toyota Central R&D Labs Inc
NipponDenso 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 Toyota Central R&D Labs Inc, NipponDenso Co Ltd filed Critical Toyota Central R&D Labs Inc
Priority to JP6109908A priority Critical patent/JP2839836B2/en
Publication of JPH07319992A publication Critical patent/JPH07319992A/en
Application granted granted Critical
Publication of JP2839836B2 publication Critical patent/JP2839836B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To read out a bar code even when relative moving speed between a scanning line and the bar code changes. CONSTITUTION:When relative speed between a bar code and a scanner head is constant, data (b) corresponding to the data (a) of previous data exists on the reference position of current data found out by adding a moving distance to the coordinates of the previous data obtained one scanning before. Since the moving distance at the time of acceleration is longer than that of at a fixed speed and a moving distance at the time of deceleration is shorter than that of at a fixed speed, the corresponding data (b) are located before and after the reference position found out from the moving distance of the fixed speed. Thereby, a prescribed range around the reference position found out by adding a moving distance obtained by preceding measurement to the coordinates of previous data is set up as a retrieving range, the address of data of a bar existing in the retrieving range is retrieved and the positioning of data extracted as the same part is executed to synthesize extracting data.

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 reading device, and more particularly, it scans a bar code at a predetermined cycle by relatively moving a bar code and a sensor, and considers the degree of coincidence of scan data of each scanning line. The present invention relates to a bar code reader which combines bar code information by sequentially combining scan data and reads the bar code information.

【0002】[0002]

【従来の技術及び発明が解消しようとする課題】1本の
走査ラインでバーコードを読取るバーコードリーダー
(1ラインスキャン方式リーダー)は、1つのセンサを
用いるため光学系が単純になり、スキャナを小型、安価
にできる利点がある。しかしながら、この1ラインスキ
ャン方式リーダーでは、走査ラインとバーコードの傾き
が大きい場合には、1回の走査ではバーコードの断片的
なデータしか得ることができないので、複数回走査し、
それらの走査データを合成して全体のコードを得る必要
がある。このため、バーコードとセンサとを相対移動さ
せ所定周期でバーコードを走査して、各走査データの一
致度を考慮して合成することにより、バーコードを読取
る次のようなバーコード読取装置が知られている。
2. Description of the Related Art A bar code reader (one line scan type reader) which reads a bar code with one scanning line uses a single sensor and therefore has a simple optical system. It has the advantage of being small and inexpensive. However, in this 1-line scanning type reader, when the inclination between the scanning line and the bar code is large, only one fragmentary data of the bar code can be obtained in one scanning, so the scanning is performed plural times.
It is necessary to combine the scan data to obtain the entire code. Therefore, the bar code and the sensor are moved relative to each other to scan the bar code in a predetermined cycle, and the bar code is read by combining the scan data in consideration of the degree of coincidence. Are known.

【0003】特開平1−86284号公報で示される従
来の1ラインスキャン方式リーダーは、バーコードの読
取を行なう時に、スキャナとバーコードとの相対移動速
度を一定に保持することで走査データ同士が対応するよ
うにしている。このため、スキャナとバーコードとの相
対移動速度が変化した場合にはバーコードを読取ること
ができない、という問題点がある。
In the conventional 1-line scanning type reader disclosed in Japanese Patent Laid-Open No. 1-86284, when scanning a bar code, the relative moving speed between the scanner and the bar code is kept constant, so that the scan data are exchanged with each other. I am trying to respond. Therefore, there is a problem that the bar code cannot be read when the relative movement speed between the scanner and the bar code changes.

【0004】また、特開平3−204790号公報で示
される技術では、データの信頼性を確保するため、走査
データを復号化した後に合成を行っている。このため、
復号化できる部分のみが有効なデータとなり、走査ライ
ンに対する傾きが大きいバーコードは有効なデータが少
ないため、読取が困難になる、という問題点がある。
Further, in the technique disclosed in Japanese Patent Application Laid-Open No. 3-204790, in order to ensure the reliability of data, scan data is decoded and then combined. For this reason,
Only a decodable part has valid data, and a bar code having a large inclination with respect to a scanning line has a small amount of valid data, which makes it difficult to read.

【0005】本発明は上記問題点を解消するために成さ
れたもので、バーコードの合成を行う1ラインスキャン
方式のバーコード読取装置において、スキャナのセンサ
とバーコードとの相対的な移動速度が変化してもバーコ
ードの読取が行えると共に、走査ラインに対するバーコ
ードの傾きが大きい場合においてもバーコードの読取を
可能とし、かつ走査データから信頼性の高いデータを読
取ることができるバーコード読取装置を提供することを
目的とする。
The present invention has been made to solve the above problems, and in a 1-line scan type bar code reader for synthesizing bar codes, the relative movement speed between the sensor of the scanner and the bar code. The bar code can be read even when the bar code changes, and even if the inclination of the bar code to the scanning line is large, the bar code can be read and highly reliable data can be read from the scan data. The purpose is to provide a device.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に本発明は、バーコードとセンサとを相対移動させて所
定周期でバーコードを走査し、各走査ラインの走査デー
タの一致度を考慮して走査データを逐次結合させること
によりバーコード情報を合成して読取るバーコード読取
装置において、前後の走査ラインの走査データを比較し
て各走査データからデータの同一部分を抽出すると共
に、該同一部分の対応するバー又はスペースの座標の差
に基づいて前記相対移動速度に応じた移動量を算出する
データ抽出手段と、後の走査ラインにおける前の走査ラ
インの座標に前記移動量を加算して求めた基準位置を含
む所定範囲内の領域を検索して前の走査ラインのバー又
はスペースに対応する後の走査ラインのバー又はスペー
スを抽出することにより前記同一部分の位置合わせを行
うと共に、合成データに前記同一部分を結合して新たな
合成データとするコード結合手段と、を設けたことを特
徴とする。
In order to achieve the above object, according to the present invention, a bar code and a sensor are relatively moved to scan the bar code at a predetermined cycle, and the degree of coincidence of the scan data of each scan line is considered. In a bar code reader that combines bar code information by sequentially combining scan data and reads the same, the scan data of preceding and following scan lines are compared to extract the same portion of the data from each scan data, and the same data is extracted. Data extraction means for calculating a movement amount according to the relative movement speed based on the difference in the coordinates of the corresponding bar or space of the part, and adding the movement amount to the coordinates of the previous scanning line in the subsequent scanning line. To search a region within a predetermined range including the determined reference position and extract a bar or space of a subsequent scan line corresponding to a bar or space of a previous scan line. Ri performs positioning of the same parts, and a code combining means for the combined data newly by combining the same parts in the synthetic data, characterized in that the provided.

【0007】[0007]

【作用】本発明では、バーコードとセンサとを相対移動
させて所定周期でバーコードを走査し、各走査ラインの
走査データの一致度を考慮して走査データを逐次結合さ
せることによりバーコード情報を合成してバーコード読
取る。データ抽出手段は、前後の走査ラインの走査デー
タを比較して各走査データからデータの同一部分を抽出
すると共に、抽出した同一部分の対応するバー又はスペ
ースの座標の差に基づいて相対移動速度に応じた移動量
を算出する。コード抽出手段は、後の走査ラインにおけ
る前の走査ラインの座標に移動量を加算して求めた基準
位置を含む所定範囲内の領域を検索することにより、前
の走査ラインのバー又はスペースに対応する後の走査ラ
インのバー又はスペースを抽出し、同一部分の位置合わ
せを行う。このように本発明では、前の走査ラインの走
査データと後の走査ラインの走査データとの位置合わせ
を行っているため、バーコードとセンサとの相対移動速
度が変化した場合においてもバーコードの読取が行え
る。また、コード結合手段は、合成データに抽出した同
一部分を結合して新たな合成データとする。
According to the present invention, the bar code and the sensor are moved relative to each other to scan the bar code at a predetermined cycle, and the bar code information is sequentially combined in consideration of the degree of coincidence of the scan data of each scan line. Combine and scan the barcode. The data extraction means compares the scan data of the preceding and following scan lines to extract the same portion of the data from each scan data, and determines the relative movement speed based on the difference in the coordinates of the corresponding bar or space of the extracted same portion. The corresponding movement amount is calculated. The code extracting means corresponds to the bar or space of the previous scanning line by searching for an area within a predetermined range including the reference position obtained by adding the movement amount to the coordinates of the previous scanning line in the subsequent scanning line. After that, the bar or space of the scanning line is extracted, and the same portion is aligned. As described above, in the present invention, since the scan data of the previous scan line and the scan data of the subsequent scan line are aligned, even when the relative movement speed between the barcode and the sensor changes, the barcode Can be read. Further, the code combining means combines the same extracted portion with the combined data to obtain new combined data.

【0008】コード結合手段では、同一部分として抽出
した抽出データと合成データとの同一部分を抽出し、合
成データの抽出データと同一部分に抽出データの合成デ
ータと非同一部分を結合することで新たな合成データと
することができる。
The code combining means extracts the same part of the extracted data extracted as the same part and the combined data, and combines the same part as the extracted data of the combined data with the non-identical part of the combined data of the extracted data. It can be set to various synthetic data.

【0009】なお、抽出データと合成データとの同一部
分の抽出においても、上記移動量を用いた位置あわせを
行うこともできる。
It should be noted that even in the extraction of the same portion of the extracted data and the synthetic data, it is possible to perform the alignment using the above-mentioned movement amount.

【0010】また、上記前後の走査ラインとは、連続す
る2つの走査ラインであっても、所定の数隔たった2つ
の走査ラインであってもよい。
The front and rear scanning lines may be two continuous scanning lines or two scanning lines separated by a predetermined number.

【0011】[0011]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。図1に本実施例のバーコード読取装置の全
体的な構成を示す。バーコード読取装置は、スキャナ1
0、マイクロコンピュータ等で構成された復号器12及
びインタフェース14を備えている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 shows the overall configuration of the bar code reader of this embodiment. The barcode reader is the scanner 1
0, a decoder 12 including a microcomputer and an interface 14.

【0012】光学的なセンサとしてのスキャナ10は、
半導体レーザ及びレーザビームを走査するポリゴンミラ
ーまたはガルバノミラー等の走査装置で構成されたレー
ザビーム走査装置と、レーザビームが走査された部位か
らの反射レーザビームを検出する光電変換素子とを含ん
で構成されたスキャナヘッド10Aを備えている。な
お、スキャナヘッド10Aとしてはバーコード面上を照
射する光源と、その光源によって生じた反射光を集光す
るレンズ系と、このレンズ系により集光された反射光を
検出する光電変換素子を1列に複数個配列して構成した
ラインセンサとを含んで構成したものを用いてもよい。
この場合、ラインセンサは1走査ライン分のデータを一
度に検出することができる。また、上記光源として、シ
リンドリカルレンズ等を用いたスリット光源を用いて
も、さらには、そのスリット光源をパルス発光させて用
いてもよい。
The scanner 10 as an optical sensor is
A laser beam scanning device including a semiconductor laser and a scanning device such as a polygon mirror or a galvano mirror that scans the laser beam, and a photoelectric conversion element that detects a reflected laser beam from a portion scanned by the laser beam The scanner head 10A is provided. The scanner head 10A includes a light source that illuminates the barcode surface, a lens system that collects the reflected light generated by the light source, and a photoelectric conversion element that detects the reflected light that is collected by the lens system. You may use what was comprised including the line sensor comprised by arranging a plurality in rows.
In this case, the line sensor can detect data for one scanning line at a time. A slit light source using a cylindrical lens or the like may be used as the light source, or the slit light source may be pulsed and used.

【0013】スキャナヘッド10Aは、増幅器10Bを
介して、増幅器10Bで増幅されたアナログ信号を2値
信号であるデジタル信号に変換するA/D変換器10C
に接続されている。A/D変換器10Cは、デジタル信
号の立ち上がりから立ち下がりまで、及びデジタル信号
の立ち下がりから立ち上がりまでをカウントして黒色の
バーや白色のスペースの幅を表すカウント値、すなわち
ランレングスに相当するカウント値を走査データとして
出力するカウンタ10Dに接続されている。
The scanner head 10A, via the amplifier 10B, converts an analog signal amplified by the amplifier 10B into a digital signal which is a binary signal, and an A / D converter 10C.
It is connected to the. The A / D converter 10C corresponds to a count value representing the width of a black bar or a white space by counting the rising edge to the falling edge of the digital signal and the falling edge to the rising edge of the digital signal, that is, a run length. It is connected to a counter 10D that outputs a count value as scan data.

【0014】復号器12には、カウンタ10Dからの走
査データが図示しない入出力装置を介して入力されると
共に、スキャナ10に入出力装置を介してスキャナ制御
信号を出力するCPU12A、以下で説明するバーコー
ド読取ルーチンのプログラム等を記憶したROM12
B、1走査前の走査データを記憶するプリビアスデータ
メモリエリア(以下、PDM)、現在の走査データを一
時的に記憶するカレントデータメモリエリア(以下、C
DM)、合成したデータを記憶する合成データメモリエ
リア(以下、SDM)、抽出データを記憶する抽出デー
タメモリエリア(以下、EDM)を備えたRAM12
C、及びこれらを接続するデータバス等のバスを含んで
構成されている。
The decoder 12 receives the scan data from the counter 10D via an input / output device (not shown) and outputs a scanner control signal to the scanner 10 via the input / output device. The CPU 12A will be described below. ROM 12 storing a program for a bar code reading routine
B, a previous data memory area (hereinafter, PDM) that stores scan data before one scan, a current data memory area (hereinafter, C) that temporarily stores current scan data
RAM 12 including a DM), a combined data memory area (hereinafter, SDM) for storing combined data, and an extracted data memory area (hereinafter, EDM) for storing extracted data.
C, and a bus such as a data bus for connecting these to each other.

【0015】このバーコード読取装置によれば、レーザ
ビームによってバーコードシンボルが表示されている表
示物を走査すると、スキャナヘッド10Aの光電変換素
子によって表示物の反射率に応じたアナログ信号が得ら
れる。このアナログ信号は、A/D変換器10Cにより
順次デジタル信号に変換されて走査ラインの走査データ
として出力され、カウンタ10Dによってバーやスペー
スの幅を表すカウント値に変換され、復号器12で復号
され、コードが得られた場合には復号したデータがイン
ターフェイス14に出力される。
According to this bar code reading device, when the display object on which the bar code symbol is displayed is scanned by the laser beam, the photoelectric conversion element of the scanner head 10A obtains an analog signal corresponding to the reflectance of the display object. . This analog signal is sequentially converted into a digital signal by the A / D converter 10C and output as scan data of a scan line, converted by the counter 10D into a count value representing the width of a bar or space, and decoded by the decoder 12. When the code is obtained, the decoded data is output to the interface 14.

【0016】次に、図2を参照して復号器12の処理内
容を詳細に説明する。ステップ100ではフラグFをリ
セットし、ステップ102において1走査前の走査デー
タを記憶するPDMに最初の走査ラインの走査データを
記憶すると共に、ステップ104において、この最初の
走査ラインの走査データを、現在の走査データを一時的
に記憶するCDMに記憶する。
Next, the processing contents of the decoder 12 will be described in detail with reference to FIG. In step 100, the flag F is reset, and in step 102, the scan data of the first scan line is stored in the PDM that stores the scan data of the previous scan, and in step 104, the scan data of the first scan line is currently stored. The scan data of is stored in the CDM which is temporarily stored.

【0017】なお、本実施例は、バーコードとスキャナ
との相対移動速度の変化に追従できるので、後述の処理
において走査データが類似している、すなわち、走査間
隔が密であると判断された場合には、このステップ10
4において走査データを破棄して次の走査まで待機し、
必要な走査データが入力された場合にのみCDMに記憶
することも可能である。これにより、移動速度が小さい
場合、後述のデータ合成において合成のために必要最小
限の走査データのみを用いることができ、処理の効率化
を図ることができる。
In this embodiment, since it is possible to follow the change in the relative moving speed between the bar code and the scanner, it is determined that the scan data are similar, that is, the scanning intervals are close, in the processing described later. If this step 10
Discard the scan data in 4 and wait until the next scan,
It is also possible to store in the CDM only when the necessary scan data is input. Thereby, when the moving speed is low, only the minimum necessary scan data for combining can be used in the data combining described later, and the efficiency of the processing can be improved.

【0018】カウンタ10Dから出力される走査データ
は、バーのランレングスに相当するカウント値、スペー
スのランレングスに相当するカウント値、バーのランレ
ングスに相当するカウント値、・・・の順になるため、
これらのランレングスに相当するカウント値が1つのア
ドレスに対応して記憶される。
The scan data output from the counter 10D has a count value corresponding to the run length of the bar, a count value corresponding to the run length of the space, a count value corresponding to the run length of the bar, and so on. ,
Count values corresponding to these run lengths are stored in correspondence with one address.

【0019】次のステップ106ではフラグFがセット
されているか否かを判断し、リセットされている場合は
ステップ108において後述する合成開始判定処理を行
い、合成開始判定処理が成功した場合にはステップ11
0でフラグFをセットし、一方合成開始判定処理が失敗
した場合にはステップ112でフラグFをリセットした
後、ステップ114においてCDMに記憶されている走
査データをPDMに記憶する。そして、ステップ104
において次の走査ラインの走査データをCDMに記憶す
る。
In the next step 106, it is determined whether or not the flag F is set. If the flag F is reset, the synthesis start determination process described later is performed in step 108, and if the synthesis start determination process is successful, the step is performed. 11
If the flag F is set to 0 and the combination start determination process fails, the flag F is reset in step 112, and then the scan data stored in the CDM is stored in the PDM in step 114. And step 104
At, the scan data of the next scan line is stored in the CDM.

【0020】一方、ステップ106でフラグFがセット
されていると判断されたとき、すなわち合成開始判定処
理が成功した場合には、ステップ116で後述するデー
タ抽出処理を実行し、データ抽出処理が成功した場合に
はステップ118で後述するコード結合処理を実行し、
コード結合処理が成功した場合にはステップ120で後
述するコード判定処理を実行する。データ抽出処理及び
コード結合処理が失敗した場合にはステップ122でフ
ラグFをリセットし、ステップ124においてCDMに
記憶されている走査データをPDMに記憶する。また、
コード判定処理が失敗した場合には、すなわち1つのバ
ーコードの最後まで復号化できない場合には、ステップ
124においてCDMに記憶されている走査データをP
DMに記憶する。なお、1つのバーコードの全体が復号
化された場合には、成功としてこのルーチンを終了す
る。また、上記のステップ104〜120の処理はレー
ザービームによる走査に同期して実行される。
On the other hand, when it is determined in step 106 that the flag F is set, that is, when the synthesis start determination process is successful, the data extraction process described later is executed in step 116 and the data extraction process is successful. If so, the code combining process described below is executed in step 118,
If the code combining process is successful, a code determining process to be described later is executed at step 120. If the data extraction process and the code combination process have failed, the flag F is reset in step 122, and the scan data stored in the CDM is stored in the PDM in step 124. Also,
If the code determination process fails, that is, if the decoding cannot be completed up to the end of one bar code, the scan data stored in the CDM is converted to P in step 124.
Store in DM. It should be noted that if one bar code is entirely decoded, this routine is regarded as successful and this routine is ended. Further, the processes of steps 104 to 120 described above are executed in synchronization with the scanning by the laser beam.

【0021】以上の結果,CDMには後の走査ラインに
おける走査データである現在の走査データが記憶され、
PDMには前の走査ラインにおける走査データである1
走査前の走査データが記憶されることになる。
As a result of the above, the CDM stores the current scan data which is the scan data in the subsequent scan line,
The scan data in the previous scan line is stored in the PDM as 1
Scan data before scanning will be stored.

【0022】次に、ステップ108の合成開始判定処理
について図3を参照して詳細に説明する。この合成開始
判定処理は、フラグFがリセットされている場合、すな
わち走査開始時やバーコードのデータが検出されていな
い場合に実行される。この合成開始判定処理は、バーコ
ードの合成処理の効率化を図るため、判定対象の走査デ
ータがバーコードのデータを含んでいるか否かを判定
し、かつ走査データの中からバーコードのデータを含ん
でいる部分を選択するものである。
Next, the synthesis start determination processing in step 108 will be described in detail with reference to FIG. This synthesis start determination processing is executed when the flag F is reset, that is, when scanning is started or when barcode data is not detected. This synthesis start determination process determines whether or not the scan data to be determined includes barcode data, and scans the barcode data from the scan data in order to improve the efficiency of the barcode synthesis process. This is to select the included part.

【0023】バーコードシンボルが最初の走査ラインを
通過し始める場合は、バーコードシンボルの右上角、左
上角、右下角、左下角のいずれかから走査が開始される
ため、走査ラインは必ずバーコードシンボルの右端又は
左端を横切ることになる。以下では、左から右へ走査し
た場合であって、バーコードシンボルの左下角から走査
が開始された場合について説明する。
When the bar code symbol begins to pass through the first scan line, the scan line always starts from the upper right corner, the upper left corner, the lower right corner, or the lower left corner of the bar code symbol. It will cross the right or left edge of the symbol. Hereinafter, a case where scanning is performed from left to right, and the case where scanning is started from the lower left corner of the barcode symbol will be described.

【0024】図3のステップ130ではPDMに記憶さ
れている走査データからバーコードシンボルの右端又は
左端に存在するパターンを開始パターンとして検索する
ことによりバーコードのデータ部分を選択すると共に、
ステップ132において選択した開始パターンの位置座
標を示すオフセットを演算する。また、ステップ134
において上記と同様にCDMに記憶されている走査デー
タから開始パターンを検索し、ステップ136において
検索した開始パターンのオフセットを演算する。
In step 130 of FIG. 3, the data portion of the bar code is selected by searching the scan data stored in the PDM for a pattern existing at the right end or the left end of the bar code symbol as a start pattern.
In step 132, an offset indicating the position coordinate of the start pattern selected is calculated. Also, step 134
At step 136, the start pattern is retrieved from the scan data stored in the CDM, and the offset of the retrieved start pattern is calculated at step 136.

【0025】この開始パターンは、ガードバーとキャラ
クタ、スタートキャラクタ、ストップキャラクタ等のバ
ーコードの端であることを示すパターンであり、この開
始パターンを検索することでバーコードシンボルの走査
ライン通過開始に相当する部位を検出することができ、
この開始パターン以降のデータにバーコードのデータが
含まれることになる。例えば、コード種別がJANコー
ドの場合、最初の3つの要素は、バー、スペース、バー
からなりバーとスペースの幅の比は1:1:1になり、
この3つの要素に続く4つの要素は、例えば4を表すた
めバーとスペースの幅の比が1:1:3:2になる。こ
のため、1:1:1の部分に続いて1:1:3:2の部
分が連続しているか否かを判断することによって、開始
パターンを検出することができる。また、ガードバーが
3モジュールで表され、1キャラクタが7モジュールで
表されているため、3:7の部分が存在するか否かを判
断することで開始パターンを検出してもよい。そして、
このように検出された開始パターンの全てを候補とす
る。このため、検出された開始パターンの中には、実際
の開始パターンの他、文字等を開始パターンとして誤検
出したパターンも含まれることになる。
This start pattern is a pattern indicating the end of a bar code such as a guard bar, a character, a start character, and a stop character. By searching for this start pattern, it corresponds to the start of passing the scanning line of the bar code symbol. Can detect the part to
The data after this start pattern will include the barcode data. For example, when the code type is JAN code, the first three elements are bar, space, and bar, and the width ratio of bar and space is 1: 1: 1.
The four elements following the three elements represent, for example, 4 so that the width ratio of the bar and the space becomes 1: 1: 3: 2. Therefore, the start pattern can be detected by determining whether or not the 1: 1: 1 part is followed by the 1: 1: 3: 2 part. Further, since the guard bar is represented by 3 modules and one character is represented by 7 modules, the start pattern may be detected by determining whether or not a 3: 7 portion is present. And
All of the start patterns detected in this way are candidates. Therefore, the detected start pattern includes not only the actual start pattern but also a pattern in which a character or the like is erroneously detected as the start pattern.

【0026】また、アドレスPiにおける開始パターン
のオフセットFpiは、次の(1)式で与えられる。
The offset Fp i of the start pattern at the address Pi is given by the following equation (1).

【0027】[0027]

【数1】 ただし、MpK はPDMのアドレスkに記憶されている
データである。
[Equation 1] However, Mp K is the data stored at the address k of the PDM.

【0028】図4に、開始パターンとして検出された例
を示す。PDMでは、先頭アドレスがP0、Pi等のデ
ータが開始パターンとして検出され、CDMでは先頭ア
ドレスがC0、Cj等のデータが開始パターンとして検
出されている。
FIG. 4 shows an example detected as the start pattern. In the PDM, the data having the start address P0, Pi, etc. is detected as the start pattern, and in the CDM, the data having the start address C0, Cj, etc. is detected as the start pattern.

【0029】次のステップ138では、PDMの走査デ
ータから検出された開始パターンとCDMの走査データ
から検出された開始パターンとを比較して、コード種別
及びキャラクタが同じでかつオフセットの関係が正しい
組を検索する。このオフセットの関係が正しいかどうか
は、以下の2つの条件を満たすか否かで判断できる。
In the next step 138, the start pattern detected from the scan data of the PDM and the start pattern detected from the scan data of the CDM are compared, and the code type and the character are the same and the offset relationship is correct. To search. Whether or not this offset relationship is correct can be determined by whether or not the following two conditions are satisfied.

【0030】 ただし、CjはCDMの開始パターンの先頭アドレス、
NはCDMのCjの開始パターンのデータ数、McK
CDMのアドレスkに記憶されているデータ、Fcj
CDMの先頭アドレスCjの開始パターンのオフセッ
ト、Fpi はPDMの先頭アドレスPiの開始パターン
のオフセットである。
[0030] However, Cj is the start address of the CDM start pattern,
N is the number of data of the start pattern of Cj of CDM, Mc K is the data stored at address k of CDM, Fc j is the offset of the start pattern of the start address Cj of CDM, and Fp i is the start of the start address Pi of PDM. The offset of the pattern.

【0031】上記(2)、(3)式を満たすのは、PD
Mの開始パターンのオフセットすなわち先頭要素の座標
が、CDMの開始パターンの先頭要素の座標から終了要
素の座標までの間に存在する場合である。上記2式を満
たさない場合は、バーコードシンボル以外の部分を開始
パターンとして誤検出した場合、走査方向をバーコード
の向きとの関係が不適切(すなわち、走査方向に対しバ
ーコードの各シンボルが右上がり方向に配列された向
き)である場合、または、バーコードシンボルの走査ラ
インに対する傾きが読み取り不可となる程大きい場合の
いずれかである。
It is PD that satisfies the above expressions (2) and (3).
This is a case where the offset of the start pattern of M, that is, the coordinates of the head element exists between the coordinates of the head element and the coordinates of the end element of the CDM start pattern. When the above two expressions are not satisfied, when the portion other than the barcode symbol is erroneously detected as the start pattern, the scanning direction has an inappropriate relationship with the orientation of the barcode (that is, each symbol of the barcode is different from the scanning direction). 1) or a case where the inclination of the barcode symbol with respect to the scanning line is so large that it becomes unreadable.

【0032】図4では、PDMのアドレスPiの開始パ
ターンとCDMのアドレスCjの開始パターンとが、コ
ード種別及びキャラクタが同一でかつオフセットの関係
が正しい対応する組として検出される。
In FIG. 4, the start pattern of the address Pi of the PDM and the start pattern of the address Cj of the CDM are detected as a corresponding set having the same code type and character and a correct offset relationship.

【0033】ステップ140において対応する開始パタ
ーンの組が検出されたと判断されると、ステップ142
においてCDMに記憶されている開始パターンを合成デ
ータの最初の部分として合成データを記憶するSDMに
転送して記憶する。図5にCDMのデータをSDMに転
送した状態を示す。
If it is determined in step 140 that the corresponding set of start patterns has been detected, step 142.
In step S1, the start pattern stored in the CDM is transferred to and stored in the SDM storing the synthetic data as the first part of the synthetic data. FIG. 5 shows a state in which the CDM data is transferred to the SDM.

【0034】また、ステップ144〜ステップ150に
おいて最少のバー幅を単位モジュールとして記憶し、使
用したCDMのアドレスCjを比較開始アドレスSpと
して記憶し、CDMの開始パターンのオフセットFcj
を合成移動量Tsの初期値として記憶し、CDMの開始
パターンのオフセットFcjとPDMの開始パターンの
オフセットFpiとの差を移動量SHの初期値として記
憶し、開始パターンのデータ数(例えば、6)をコード
化できた部分の最終アドレスDpの初期値として記憶
し、この開始パターンのデータ数を同一部分として検出
された部分の長さLdとして記憶する。そして、ステッ
プ152で合成開始判定処理成功として次のステップに
進む。一方、ステップ140で対応する組が存在しない
と判断された場合にはステップ154で合成開始判定処
理失敗として次のステップに進む。
Further, in steps 144 to 150, the minimum bar width is stored as a unit module, the used CDM address Cj is stored as the comparison start address Sp, and the CDM start pattern offset Fc j.
Is stored as the initial value of the combined movement amount Ts, the difference between the offset Fc j of the start pattern of the CDM and the offset Fp i of the start pattern of the PDM is stored as the initial value of the movement amount SH, and the data number of the start pattern (for example, , 6) is stored as the initial value of the final address Dp of the coded portion, and the number of data of this start pattern is stored as the length Ld of the portion detected as the same portion. Then, in step 152, the synthesis start determination process is successful and the process proceeds to the next step. On the other hand, if it is determined in step 140 that the corresponding set does not exist, it is determined in step 154 that the synthesis start determination process has failed, and the process proceeds to the next step.

【0035】次にステップ116のデータ抽出処理につ
いて図6を参照して説明する。このデータ抽出処理は、
連続した走査でバーコードシンボルの部分は略同じパタ
ーンが得られることに着目し、SDMの走査データとC
DMの走査データとを比較し、同一部分、すなわちバー
のランレングスとスペースのランレングスが同一部分を
抽出することで、復号化することなくバーコード部分の
データを抽出するものである。走査データの比較は、処
理時間短縮のため必要な範囲内のみに限定している。
Next, the data extraction processing in step 116 will be described with reference to FIG. This data extraction process is
Paying attention to the fact that substantially the same pattern can be obtained in the bar code symbol portion by continuous scanning,
By comparing the scan data of DM and the same portion, that is, the portion having the same run length of the bar and the run length of the space, the data of the barcode portion is extracted without decoding. The comparison of scan data is limited to within a necessary range to shorten the processing time.

【0036】ステップ160ではオフセットと移動量S
Hとを使用してCDMの初期アドレスCsを計算する。
なおこの移動量SHは、同一部分に対応するバーの座標
であるオフセットの差に基づいて後述するステップ18
6で算出される。また、移動量SHの初期値は前述のよ
うに同一部分である開始パターンのオフセットの差から
算出されている。図7に示すように、バーコードとスキ
ャナヘッドとの相対速度が定速の時は、プリビアスデー
タのオフセットと相対速度に応じた移動量とを加算して
求めたカレントデータの基準位置に、プリビアスデータ
のデータaに対応するデータbが存在する。一方、加速
時の移動量は定速時の移動量よりも大きくなり、減速時
の移動量は定速時の移動量よりも小さくなるため、加減
速時には対応するデータbは定速時の移動量から求めた
基準位置の前後に位置することになる。
At step 160, the offset and the movement amount S
Calculate the initial address Cs of the CDM using H and.
It should be noted that this movement amount SH is based on the difference between the offsets which are the coordinates of the bars corresponding to the same portion, and will be described later in step 18
6 is calculated. Further, the initial value of the movement amount SH is calculated from the difference between the offsets of the start patterns that are the same portion as described above. As shown in FIG. 7, when the relative speed between the barcode and the scanner head is constant, the offset of the prior data and the movement amount according to the relative speed are added to the reference position of the current data, There is data b corresponding to the data a of the prior data. On the other hand, the amount of movement during acceleration is greater than the amount of movement during constant speed, and the amount of movement during deceleration is less than the amount of movement during constant speed. It will be located before and after the reference position obtained from the quantity.

【0037】このため、本実施例ではバーコードシンボ
ルとスキャナヘッドとが相対的に等速で移動しない場合
をも想定して、プリビアスデータのオフセットに前回求
めた移動量を加算して求めた基準位置を含む所定範囲
内、例えば基準位置を中心とする所定範囲内を検索範囲
とし、この検索範囲内に存在するバーのデータのアドレ
スをCDMの初期アドレスCsとする。この場合、検索
範囲内にバーのデータが複数個存在する場合には、最も
小さいアドレスを初期アドレスCsとする。この検索範
囲は、バーコードの1キャラクタを表すモジュールの数
をMとすると基準位置を中心として±M/2とするのが
好ましく、例えば、JANコードの場合1キャラクタが
7モジュールで表されているため、基準位置を中心とし
て±3.5モジュール幅とするのが好ましい。この場
合、対応できる移動速度の変化範囲は、その時のスキャ
ナとバーコードとの相対移動速度とバーコードシンボル
の走査ラインに対する傾き角との関係に依存する。すな
わち、相対移動速度が同じでも、傾き角が小さい場合の
方が、対応できる移動速度の変化の範囲は広くなる。な
お、この基準位置は検索範囲の中心に必ずしも位置させ
る必要はなく、加速時は検索範囲の右端、減速時は検索
範囲の左端に位置させるようにしてもよい。
For this reason, in the present embodiment, assuming that the bar code symbol and the scanner head do not move at a relatively constant speed, the moving amount obtained last time is added to the offset of the prior data to obtain it. A predetermined range including the reference position, for example, a predetermined range centered on the reference position is set as the search range, and the address of the bar data existing in this search range is set as the initial address Cs of the CDM. In this case, when there are a plurality of bar data within the search range, the smallest address is set as the initial address Cs. This search range is preferably ± M / 2 with the reference position as the center, where M is the number of modules that represent one character of the barcode. For example, in the case of the JAN code, one character is represented by seven modules. Therefore, it is preferable that the width is ± 3.5 module width around the reference position. In this case, the change range of the moving speed that can be handled depends on the relationship between the relative moving speed of the scanner and the bar code at that time and the inclination angle of the bar code symbol with respect to the scanning line. That is, even if the relative moving speed is the same, when the tilt angle is small, the range of change in the moving speed that can be handled becomes wider. The reference position does not necessarily have to be located at the center of the search range, but may be located at the right end of the search range during acceleration and the left end of the search range during deceleration.

【0038】ステップ162では、前回の同一部分とし
て検出された部分の長さLdに正の任意の数で表された
増加分kを加算して比較する比較範囲Lの初期値L0を
算出する。この比較範囲Lは、アドレス数で表され、最
小値は3(バー、スペース、バーに相当する)に定めら
れている。ステップ164では、初期値L0を比較範囲
Lとする。
In step 162, the initial value L0 of the comparison range L for comparison is calculated by adding the increment k represented by an arbitrary positive number to the length Ld of the portion detected as the same portion last time. The comparison range L is represented by the number of addresses, and the minimum value is set to 3 (corresponding to bar, space, and bar). In step 164, the initial value L0 is set as the comparison range L.

【0039】1走査前のデータであるプリビアスデータ
は、前回のカレントデータをPDMに記憶したものであ
るので、このデータ抽出処理では、PDMのアドレス
は、前回合成に使用した開始アドレスSpを用い、ステ
ップ166では、この開始アドレスSp(初期値は開始
パターンのアドレスCj)をプリビアスデータのアドレ
スPとする(図8参照)。
Since the previous data, which is the data one scan before, is the previous current data stored in the PDM, the start address Sp used in the previous synthesis is used as the PDM address in this data extraction process. In step 166, the start address Sp (the initial value is the address Cj of the start pattern) is set as the address P of the prior data (see FIG. 8).

【0040】次のステップ168ではアドレスPと比較
範囲Lとの和P+LがPDMに記憶した走査データの最
終アドレスPn以下か否かを判断することにより、比較
範囲Lの端部がプリビアスデータの終端に位置している
かを判断し、以下の場合にはステップ170において下
記の条件を判断する。
In the next step 168, it is determined whether the sum P + L of the address P and the comparison range L is less than or equal to the final address Pn of the scan data stored in the PDM, and the end of the comparison range L is the previous data. It is determined whether or not it is located at the end, and in the following cases, the following conditions are determined in step 170.

【0041】[0041]

【数2】P≦Dp≦P+L−1 ・・・・・・ (4) この条件は、コード化できた最終アドレスDpを含む範
囲、すなわち、ごみ等のノイズによりコード化できなか
った領域を含む領域を検索するための条件であり、過去
の走査でバーコード以外のノイズを走査データとして検
出した場合に、ノイズを含まない新たなデータでノイズ
部分のデータを更新するために必要である。すなわち、
ノイズはバーコードの一部分に存在し、バー又はスペー
スの一部分が欠如することになり1本のバー又はスペー
スの全体が欠如することは殆どまれであるため、複数回
の走査によって得られたノイズ周辺のノイズを含まない
走査データを用いることにより、ノイズを除去すること
ができる。
## EQU00002 ## P.ltoreq.Dp.ltoreq.P + L-1 (4) This condition includes a range including the final address Dp that can be coded, that is, a region that cannot be coded due to noise such as dust. This is a condition for searching an area, and is necessary to update the data of the noise portion with new data that does not include noise when noise other than the barcode is detected as scanning data in the past scanning. That is,
Noise is present in a portion of the bar code, and it is rare that a bar or space is lost in part, and a bar or space in its entirety is rare. The noise can be removed by using the scan data that does not include the noise.

【0042】ステップ172では、プリビアスデータの
アドレスPのオフセットFpを計算し、ステップ174
で初期値CsをカレントデータのアドレスCに設定し、
ステップ176でカレントデータのアドレスCのオフセ
ットFcを計算する。これらのオフセットFp、Fcは
それぞれ以下の(5)、(6)式で与えられる。
In step 172, the offset Fp of the address P of the prior data is calculated, and step 174
To set the initial value Cs to the address C of the current data,
In step 176, the offset Fc of the address C of the current data is calculated. These offsets Fp and Fc are given by the following equations (5) and (6), respectively.

【0043】[0043]

【数3】 ただし、Mpi はアドレスiのPDMのデータである。[Equation 3] However, Mp i is the PDM data of the address i.

【0044】[0044]

【数4】 ただし、MpK はアドレスjのCDMのデータである。[Equation 4] However, Mp K is the CDM data of the address j.

【0045】次のステップ178では次の(7)式で与
えられる条件を判断する。
At the next step 178, the condition given by the following equation (7) is judged.

【0046】[0046]

【数5】 |Fp−Fc+SH|≦N ・・・・・・ (7) なお、Nは所定範囲を示す。Nの値はCDMの初期アド
レスCsを求めた場合と同様に、バーコードの1キャラ
クタを表すモジュールの数に基づいて決定することがで
き、例えばJANコードでは±3.5モジュールの幅で
与えられる。この条件は、同一部分の位置関係が正しい
か否かを判定するための条件であり(なお、相対移動速
度が定速の場合はFp−Fc+SH=0になる)、ステ
ップ178の判断が否定の場合には比較する部分の位置
関係が不適当であると判断して、ステップ180の比較
を行うことなくステップ188に進んで位置関係が正し
くなるように比較部分をシフトする。
## EQU5 ## | Fp-Fc + SH | ≤N (7) Note that N represents a predetermined range. The value of N can be determined based on the number of modules representing one character of the bar code, as in the case of obtaining the initial address Cs of the CDM, and is given by a width of ± 3.5 modules in the JAN code, for example. . This condition is a condition for determining whether or not the positional relationship of the same portion is correct (note that Fp-Fc + SH = 0 when the relative movement speed is constant), and the determination in step 178 is negative. In this case, it is determined that the positional relationship of the compared portions is inappropriate, and the process proceeds to step 188 without performing the comparison in step 180 to shift the compared portions so that the positional relationship is correct.

【0047】ステップ180ではPDMのアドレスP〜
P+LのデータとCDMのアドレスC〜C+Lのデータ
とを比較する。ステップ182でこれらのデータが同一
であると判断された場合、すなわち対応するバー同士及
びスペース同士のカウント値(ランレングス)が等しい
場合には、ステップ184においてCDMのアドレスC
〜C+Lのデータを同一部分として抽出し、EDMに転
送して記憶する(図9参照)。また、ステップ186で
はCDMとPDMのオフセットの差Fc−Fpを次の移
動量SHとし、アドレスCを次の比較開始アドレスSp
とし、比較範囲Lを同一部分の長さLdとして記憶し、
ステップ190でデータ抽出成功として次のステップに
進む。
In step 180, the PDM address P ...
The data of P + L and the data of addresses C to C + L of CDM are compared. If it is determined in step 182 that these data are the same, that is, if the count values (run length) of the corresponding bars and spaces are equal, the address C of the CDM is determined in step 184.
The C to L data is extracted as the same portion, transferred to the EDM and stored (see FIG. 9). In step 186, the difference Fc-Fp between the offsets of the CDM and PDM is set as the next movement amount SH, and the address C is set as the next comparison start address Sp.
And the comparison range L is stored as the length Ld of the same portion,
In step 190, the data extraction is successful and the process proceeds to the next step.

【0048】一方、ステップ178及びステップ182
の判断が否定のときは、カレントデータの比較部分を単
位量ずつシフトし、シフトしたカレントデータとプレビ
アスデータとを比較するために、ステップ188でCD
MのアドレスCを2ずつインクルメントする。ここで、
アドレスCを2ずつインクルメントするのは、バーとス
ペースとの組を1単位として、すなわちデータ数2を1
単位としてシフトさせることにより、シフトしてもカレ
ントデータの比較範囲の先頭のデータを常にバーのデー
タにするためである。
On the other hand, steps 178 and 182
If the determination is negative, the comparison portion of the current data is shifted by a unit amount, and in order to compare the shifted current data and the prior data, the CD is added in step 188.
The address C of M is incremented by two. here,
The address C is incremented by 2 in units of a set of a bar and a space, that is, when the number of data 2 is 1.
This is because the data at the beginning of the comparison range of the current data is always bar data by shifting as a unit.

【0049】ステップ190でCDMのアドレスCを最
終アドレスCnまでシフトを繰り返して比較しても同一
部分が検出されない場合は、ステップ192でPDMの
アドレスPを2ずつインクルメントしてプレビアスデー
タの比較部分を単位量ずつシフトし、シフトしたプレビ
アスデータとカレントデータとを上記で説明したように
比較する。この場合、カレントデータのアドレスCはス
テップ174で初期値Csに戻しておく。
In step 190, if the same portion is not detected even after repeatedly comparing the address C of the CDM to the final address Cn and comparing, the address P of the PDM is incremented by 2 in step 192 to compare the preliminary data. The portions are shifted by a unit amount and the shifted previa data and the current data are compared as described above. In this case, the address C of the current data is returned to the initial value Cs in step 174.

【0050】PDMのアドレスPを最終アドレスPnま
でシフトを繰り返して比較しても同一部分が検出されな
い場合は、ステップ196で比較範囲Lを2デクリメン
トして比較部分を単位量ずつ狭めて上記で説明した同一
部分の検索を行う。この場合、プレビアスデータのアド
レスP及びカレントデータのアドレスCは、各々ステッ
プ166及びステップ174で初期値に戻しておく。比
較範囲Lが最小範囲である3に到達しても同一部分が検
索できないときにはデータ抽出失敗(ステップ199)
としてこのルーチンを終了する。そして、次の走査に移
行する。
If the same portion is not detected even after repeatedly comparing the address P of the PDM to the final address Pn and comparing, the comparison range L is decremented by 2 in step 196 and the comparison portion is narrowed by a unit amount. Search for the same part. In this case, the address P of the preliminary data and the address C of the current data are reset to the initial values in steps 166 and 174, respectively. If the same portion cannot be retrieved even if the comparison range L reaches the minimum range 3, the data extraction fails (step 199).
This routine ends. Then, the next scan is performed.

【0051】また、ステップ168の判断が否定の時、
すなわちプレビアスデータの比較部分の後端が最終アド
レスに到達したときは、ステップ196で比較範囲Lを
狭めて上記の処理を繰り返す。また、ステップ170の
判断が否定のとき、すなわちプレビアスデータの比較部
分内にアドレスDpが含まれていない場合には、ステッ
プ192でアドレスPを変更して、比較部分内にアドレ
スDpが含まれるように比較部分をシフトする。
When the determination in step 168 is negative,
That is, when the trailing end of the comparison portion of the previa data reaches the final address, the comparison range L is narrowed in step 196 and the above processing is repeated. Further, when the determination in step 170 is negative, that is, when the address Dp is not included in the comparison portion of the preliminary data, the address P is changed in step 192 to include the address Dp in the comparison portion. To shift the comparison part.

【0052】次に、ステップ118のコード結合処理の
詳細を説明する。この結合処理は、データ抽出処理で得
られた抽出データと、既に合成された合成パターンとを
比較・結合して、同一部分に非同一部分を結合して新た
な合成パターンとすることにより、合成パターンの更新
を行うものである。
Next, details of the code combining process in step 118 will be described. This combining process is performed by comparing and combining the extracted data obtained by the data extracting process and the already combined composition pattern, and combining the same part with the non-identical part to form a new composition pattern. The pattern is updated.

【0053】図10のステップ200において合成パタ
ーンの合成移動量Tsにコード結合処理で得られた移動
量SHを加算して新たな合成移動量Tsを求める。この
合成移動量TsはSDMのアドレス0のデータのオフセ
ットを表すもので、この合成移動量Tsから合成データ
のオフセットを求めることにより、抽出データとの位置
を比較することが可能となる。比較範囲Lの初期値はE
DMに記憶されている抽出データのデータ数Leとし、
EDMのアドレスEの初期値は0とし、SDMのアドレ
スSは前回検索した同一部分の先頭アドレスBp(初期
値は開始パターンの先頭アドレス)に設定する(ステッ
プ202、204、208)(図11参照)。
In step 200 of FIG. 10, a new combined movement amount Ts is obtained by adding the movement amount SH obtained by the code combining process to the combined movement amount Ts of the combined pattern. This combined movement amount Ts represents the offset of the data at address 0 of the SDM, and it is possible to compare the position with the extracted data by obtaining the offset of the combined data from this combined movement amount Ts. The initial value of the comparison range L is E
Let Le be the number of extracted data stored in DM,
The initial value of the EDM address E is set to 0, and the SDM address S is set to the start address Bp (the initial value is the start address of the start pattern) of the same portion searched previously (steps 202, 204, 208) (see FIG. 11). ).

【0054】ステップ206、210では、以下の
(8)、(9)式に従って抽出データのアドレスEのオ
フセットFe及び合成データのアドレスSのオフセット
Fsを演算する。
In steps 206 and 210, the offset Fe of the address E of the extracted data and the offset Fs of the address S of the combined data are calculated according to the following equations (8) and (9).

【0055】[0055]

【数6】 ただし、Mei はアドレスiのEDMのデータである。[Equation 6] However, Me i is the EDM data of the address i.

【0056】[0056]

【数7】 ただし、Msj はアドレスjのSDMのデータである。[Equation 7] However, Ms j is the SDM data of the address j.

【0057】ステップ212でオフセットFsとオフセ
ットFeとが等しいと判断された時には、すなわち抽出
データと合成データとの位置関係が正しい場合には、ス
テップ214でEDMのアドレスE〜E+Lのデータと
SDMのアドレスS〜S+Lとのデータを比較し、ステ
ップ216でこれらのデータが同一であると判断された
時には、すなわち抽出データと合成データとの位置関係
が正しくかつ比較範囲L内の内容が等しい場合には同一
部分であると判断し、各比較範囲Lの先頭アドレスが
E、Sであるので、ステップ218においてSDMのア
ドレスS+L以降のデータをEDMのアドレスE+L〜
Enのデータで更新する。すなわち、合成データの抽出
データと同一部分に抽出データの合成データと非同一部
分を結合することで新たな合成データとする(図12参
照)。また、ステップ220でSDMの先頭アドレスS
を同一部分の先頭アドレスBpとして記憶する。
When it is determined in step 212 that the offset Fs and the offset Fe are equal to each other, that is, when the positional relationship between the extracted data and the combined data is correct, in step 214, the data of the EDM addresses E to E + L and the SDM are compared. When the data of the addresses S to S + L are compared and it is determined in step 216 that these data are the same, that is, when the positional relationship between the extracted data and the composite data is correct and the contents within the comparison range L are the same. Are the same part, and the start addresses of the comparison ranges L are E and S, so that in step 218, the data after the SDM address S + L is transferred to the EDM address E + L to
Update with En data. That is, new synthetic data is obtained by combining the same portion as the extracted data of the synthetic data with the non-identical portion of the synthetic data of the extracted data (see FIG. 12). Also, in step 220, the SDM start address S
Is stored as the head address Bp of the same portion.

【0058】なお、ステップ224〜ステップ234で
は上記で説明したステップ188〜ステップ198と同
様に、抽出データと合成データとの比較部分、比較範囲
を単位量ずつシフトして同一部分が検出されるまで上記
の処理を繰り返す。アドレスS及びアドレスEが最終ア
ドレスになり、比較範囲が最小範囲になっても同一部分
が検出されない場合には、コード結合処理を失敗とする
のはコードデータ抽出処理の場合と同様である。
In steps 224 to 234, similarly to steps 188 to 198 described above, the comparison part between the extracted data and the composite data, the comparison range is shifted by a unit amount until the same part is detected. The above process is repeated. If the same part is not detected even if the address S and the address E become the final addresses and the comparison range becomes the minimum range, the code combining process is failed as in the case of the code data extracting process.

【0059】図11にコード結合の検索範囲を示し、図
12に合成データの更新状態を示す。
FIG. 11 shows the search range for code combination, and FIG. 12 shows the updated state of the combined data.

【0060】次に、ステップ120のコード判定処理に
ついて説明する。このコード判定処理は更新されかつ合
成されたデータメモリに記憶された合成データを復号
し、全データが揃ったか否かを判断するものである。全
データが揃った場合にはインターフェイス14を介して
コードを出力し、コード合成処理を終了する。
Next, the code determination process of step 120 will be described. This code judgment processing is to decode the combined data stored in the updated and combined data memory and judge whether all the data are prepared. When all the data are collected, the code is output via the interface 14 and the code synthesizing process ends.

【0061】一方、全データが揃わなかった場合には、
SDMの復号化できたデータの最後のアドレスからこの
復号化できたデータのもとになっているカレントメモリ
データのアドレスDpを求め、このアドレスDpを記憶
する。このアドレスDpは図13からも理解されるよう
に以下の(10)式によって与えられる。
On the other hand, if all the data are not available,
The address Dp of the current memory data which is the source of the decrypted data is obtained from the last address of the decrypted data of the SDM, and this address Dp is stored. This address Dp is given by the following equation (10) as understood from FIG.

【0062】[0062]

【数8】 Dp=m−S+E+C ・・・・・・ (10) ただし、m:復号化できた最後のSDMのアドレス S:コード結合処理時の同一部分のSDMの先頭アドレ
ス E:コード結合処理時の同一部分のEDMの先頭アドレ
ス C:データ抽出処理時の同一部分のCDMの先頭アドレ
ス) である。
[Equation 8] Dp = m−S + E + C (10) Here, m: address of the last SDM that can be decoded S: start address of SDM of the same part during code combining processing E: code combining processing EDM start address of the same portion at the time C: CDM start address of the same portion at the time of data extraction processing).

【0063】このデコード可能なアドレスDpが求めら
れることによってコード合成処理を継続する。
When the decodable address Dp is obtained, the code synthesizing process is continued.

【0064】上記実施例では、バーのデータのオフセッ
ト、すなわち座標に基づいて移動量を求め位置合わせを
する例について説明したが、スペースのオフセットすな
わち座標に基づいて移動量を求め位置合わせを行っても
よい。
In the above-described embodiment, the example in which the movement amount is determined based on the offset of the bar data, that is, the coordinate has been described, but the movement amount is determined based on the space offset, that is, the coordinate, and the position adjustment is performed. Good.

【0065】上記実施例では、一定の方向に走査した場
合について説明したが、その逆の方向に走査した場合で
も、または、走査データのランレングスを逆順にデータ
メモリエリアに記憶させる場合でも、図2に示すフロー
で処理できる。
In the above embodiment, the case of scanning in a fixed direction has been described, but the case of scanning in the opposite direction or storing the run length of scan data in the data memory area in reverse order is also possible. It can be processed by the flow shown in 2.

【0066】また、上記実施例ではランレングスの比較
および結合をバーから始まりバーで終わるランレングス
の例で説明したが、スペースで始まるランレングスで比
較・結合を行っても、またはスペースで終わるランレン
グスで比較・結合を行ってもよい。
Further, in the above embodiment, the run length comparison and combination are described with the example of the run length starting from the bar and ending at the bar. However, even if the comparison / combination is performed at the run length starting at the space, or the run ending at the space is performed. You may compare and combine by length.

【0067】[0067]

【発明の効果】以上説明したように、本発明によれば、
後の走査ラインの座標に移動量を加算して求めた基準位
置を含む所定範囲内の領域を検索することにより、前の
走査ラインのバー又はスペースと対応するバー又はスペ
ースを抽出して同一部分の位置合わせを行って同一部分
に非同一部分を結合して合成パターンを求めているの
で、センサとバーコードとの相対的な移動速度が変化し
てもバーコードの読取が行えると共に、走査ラインに対
するバーコードの傾きが大きい場合においてもバーコー
ドの読取が可能となり、かつ走査データから信頼性の高
いデータを読取ることができる、という効果が得られ
る。
As described above, according to the present invention,
The bar or space corresponding to the bar or space of the previous scan line is extracted by searching the area within the predetermined range including the reference position obtained by adding the movement amount to the coordinates of the subsequent scan line, and the same portion is extracted. Since the combined pattern is obtained by aligning the non-identical part with the same part, the bar code can be read even if the relative movement speed of the sensor and the bar code changes, and the scanning line can be read. It is possible to read the barcode even when the inclination of the barcode is large with respect to, and it is possible to obtain highly reliable data from the scan data.

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

【図1】本実施例の概略を示すブロック図である。FIG. 1 is a block diagram showing the outline of the present embodiment.

【図2】バーコード読取ルーチンを示す流れ図である。FIG. 2 is a flowchart showing a barcode reading routine.

【図3】合成開始判定処理ルーチンを示す流れ図であ
る。
FIG. 3 is a flowchart showing a combination start determination processing routine.

【図4】開始パターンの検索状態を示す説明図である。FIG. 4 is an explanatory diagram showing a search state of a start pattern.

【図5】開始パターンが検出されたときのSDMへの転
送状態を示す説明図である。
FIG. 5 is an explanatory diagram showing a transfer state to the SDM when a start pattern is detected.

【図6】データ抽出処理ルーチンを示す流れ図である。FIG. 6 is a flowchart showing a data extraction processing routine.

【図7】移動速度の変化と対応するバーとの位置関係を
示す線図である。
FIG. 7 is a diagram showing a positional relationship between a change in moving speed and a corresponding bar.

【図8】データ抽出処理の検索範囲を示す線図である。FIG. 8 is a diagram showing a search range of a data extraction process.

【図9】同一部分の抽出状態を説明するための線図であ
る。
FIG. 9 is a diagram for explaining an extraction state of the same portion.

【図10】コード結合処理ルーチンを示す流れ図であ
る。
FIG. 10 is a flowchart showing a code combination processing routine.

【図11】コード結合の検索範囲を示す線図である。FIG. 11 is a diagram showing a search range for code combination.

【図12】合成データの更新状態を示す線図である。FIG. 12 is a diagram showing an updated state of combined data.

【図13】各データとアドレスDpとの関係を示す線図
である。
FIG. 13 is a diagram showing a relationship between each data and an address Dp.

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

10 スキャナ 12 復号器 14 インターフェース 10 Scanner 12 Decoder 14 Interface

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 バーコードとセンサとを相対移動させて
所定周期でバーコードを走査し、各走査ラインの走査デ
ータの一致度を考慮して走査データを逐次結合させるこ
とによりバーコード情報を合成して読取るバーコード読
取装置において、 前後の走査ラインの走査データを比較して各走査データ
からデータの同一部分を抽出すると共に、該同一部分の
対応するバー又はスペースの座標の差に基づいて前記相
対移動速度に応じた移動量を算出するデータ抽出手段
と、 後の走査ラインにおける前の走査ラインの座標に前記移
動量を加算して求めた基準位置を含む所定範囲内の領域
を検索して前の走査ラインのバー又はスペースに対応す
る後の走査ラインのバー又はスペースを抽出することに
より前記同一部分の位置合わせを行うと共に、合成デー
タに前記同一部分を結合して新たな合成データとするコ
ード結合手段と、 を設けたことを特徴とするバーコード読取装置。
1. The bar code and the sensor are moved relative to each other to scan the bar code at a predetermined cycle, and the bar code information is combined by sequentially combining the scan data in consideration of the degree of coincidence of the scan data of each scan line. In the bar code reading device that reads the same, the scan data of the preceding and following scan lines are compared to extract the same portion of the data from each scan data, and based on the difference in the coordinates of the corresponding bar or space of the same portion, Data extraction means for calculating a movement amount according to the relative movement speed, and an area within a predetermined range including a reference position obtained by adding the movement amount to the coordinates of the previous scanning line in the subsequent scanning line are searched. The same portion is aligned by extracting the bar or space of the subsequent scan line corresponding to the bar or space of the previous scan line, and at the same time the composite data is aligned. Bar code reading device for a code combining means for a new combined data by combining the same parts in motor, characterized in that provided.
JP6109908A 1994-05-24 1994-05-24 Barcode reader Expired - Fee Related JP2839836B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6109908A JP2839836B2 (en) 1994-05-24 1994-05-24 Barcode reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6109908A JP2839836B2 (en) 1994-05-24 1994-05-24 Barcode reader

Publications (2)

Publication Number Publication Date
JPH07319992A true JPH07319992A (en) 1995-12-08
JP2839836B2 JP2839836B2 (en) 1998-12-16

Family

ID=14522206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6109908A Expired - Fee Related JP2839836B2 (en) 1994-05-24 1994-05-24 Barcode reader

Country Status (1)

Country Link
JP (1) JP2839836B2 (en)

Also Published As

Publication number Publication date
JP2839836B2 (en) 1998-12-16

Similar Documents

Publication Publication Date Title
US4973829A (en) Bar code reading method
JP4911340B2 (en) Two-dimensional code detection system and two-dimensional code detection program
US5444231A (en) Bar code scan stitching
JP3115003B2 (en) Method and apparatus for decoding barcode symbols using module size ratio analysis
US5550363A (en) Optical information reading apparatus
JPS60262284A (en) Image processing
EP0464713B1 (en) Bar-code reading apparatus
US5471041A (en) Bar-code reader device
JPH09161001A (en) Bar code reader
JPH07319992A (en) Bar code reader
KR19990023128A (en) Bar code readers, bar code reading methods and computer readable media
JP3234405B2 (en) Bar code reader and method
JP3018702B2 (en) Barcode demodulator
JPH06195497A (en) Bar code decoder
AU726678B2 (en) Bar code reader
JP2677007B2 (en) Line discrimination system
JP2741786B2 (en) Barcode data binarization method
KR940006119B1 (en) Deciphering method of barcode system
JP2751641B2 (en) Barcode reader
JP2826229B2 (en) Barcode label scanning position detection method
JP2849000B2 (en) Barcode label scanning interval determination method
JPH0581477A (en) Character segmenting method
JP2736729B2 (en) Barcode judgment method
JPH11161739A (en) Character recognizing device
JPH0340430B2 (en)

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees