JPH08185463A - Method for segmenting bar code - Google Patents

Method for segmenting bar code

Info

Publication number
JPH08185463A
JPH08185463A JP6339018A JP33901894A JPH08185463A JP H08185463 A JPH08185463 A JP H08185463A JP 6339018 A JP6339018 A JP 6339018A JP 33901894 A JP33901894 A JP 33901894A JP H08185463 A JPH08185463 A JP H08185463A
Authority
JP
Japan
Prior art keywords
bar
bar code
time data
margin
data
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.)
Pending
Application number
JP6339018A
Other languages
Japanese (ja)
Inventor
Shinya Kurita
真也 栗田
Kazunobu Nagai
和伸 永井
Kiichi Yokoyama
貴一 横山
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.)
Pentel Co Ltd
Original Assignee
Pentel 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 Pentel Co Ltd filed Critical Pentel Co Ltd
Priority to JP6339018A priority Critical patent/JPH08185463A/en
Publication of JPH08185463A publication Critical patent/JPH08185463A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To read even a bar code provided with a left margin or a right margin not based on a standard and to read a lot of bar codes by performing read once at the time of detecting the bar code. CONSTITUTION: By discriminating the inputted bar code to black bars and white bars and comparing a value for which the minimum value of the time data of the part of the plural white bars sampled from them is increased by several times with the respective white bar part and black bar part, the left margin and the right margin of the bar code are continuously specified. Thus, coping is made possible even for the bar code provided with the left margin or the right margin not based on the standard because of stains and printing errors, etc. Also, the read of a lot of continuous bar codes arranged with an interval below the standard is made possible.

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 used as a data input device such as a portable terminal device or an electronic cash register, in the data input from a bar code reading section. More unnecessary data is excluded and effective data as a bar code is extracted.

【0002】図1に示すように、携帯端末装置1の主要
部は、ROM2に格納されたプログラムに従い、処理及
びRAM2に格納されたアプリケ−ションプログラム等
の所定の処理を行なうものである。BUSには更に、バ
−コ−ドをCCD、スキャナ等で検出し入力するバ−コ
−ド読み取り部10、表示装置4、キ−入力部6、カレ
ンダ時計9、プリンタ部11、ブザ−部12及び外部の
ホストコンピュ−タ8と接続された通信部7とが接続さ
れている。
As shown in FIG. 1, the main part of the portable terminal device 1 performs processing according to a program stored in the ROM 2 and predetermined processing such as an application program stored in the RAM 2. The BUS further includes a bar code reading unit 10 for detecting and inputting a bar code with a CCD or a scanner, a display device 4, a key input unit 6, a calendar clock 9, a printer unit 11, and a buzzer unit. 12 and a communication unit 7 connected to an external host computer 8 are connected.

【0003】[0003]

【従来の技術】従来の処理では、携帯端末装置1のバ−
コ−ド読み取り部10より入力されるデ−タとしての信
号は、CPU5に入力される。このCPU5では、入力
されたデ−タ信号とこれ以降に入力されるデ−タ信号と
を比較して、規定で定められた細モジュ−ルのn倍(n
は規格で定められた数値で対象コ−ド毎に異なる。例え
ばJANの場合nは11である。)以上あるか否かでレ
フトマ−ジンであるか否かを決定する。レフトマ−ジン
であると決定された場合、CPU5は引き続いてデ−タ
を入力する。入力された時間デ−タと、この入力された
時間デ−タとこれ以前に入力されていた時間デ−タとを
比較し細モジュ−ルのm倍以上(mは規格で定められた
数値で対象コ−ド毎に異なる。例えばJANの場合mは
7である。)あるか否かでライトマ−ジンであるかどう
かを決定していた。
2. Description of the Related Art In the conventional processing, the bar code of the portable terminal device 1 is used.
A signal as data input from the code reading unit 10 is input to the CPU 5. In the CPU 5, the input data signal is compared with the data signals input thereafter, and the fine module is n times (n
Is a numerical value defined by the standard and differs for each target code. For example, in the case of JAN, n is 11. ) Whether or not it is a left margin is determined by the above. When the left margin is determined, the CPU 5 continuously inputs the data. The input time data is compared with the input time data and the time data input before this, and the time is more than m times the fine module (m is a value defined by the standard. It is different for each target code. For example, in the case of JAN, m is 7.) Whether or not it is a light margin is determined.

【0004】[0004]

【発明が解決しようとする課題】上述したように、従来
のバ−コ−ド読み取り装置ではバ−コ−ドを検出する
際、データ中の最小空白の規定値倍以上の空白をもって
レフトマージンを求め、その後ライトマージンを求めて
いた。そこで規格に準拠しない先頭または終端の余白を
有するバ−コ−ドは読むことができず、また、一度の読
み込みで一つのバーコードしか読みとることが出来なか
った。
As described above, in the conventional bar code reader, when a bar code is detected, a left margin is set with a blank space equal to or larger than a specified value of the minimum blank space in the data. I asked for it, and then I asked for the write margin. Therefore, bar codes having leading or trailing margins that do not comply with the standard cannot be read, and only one bar code can be read at one time.

【0005】[0005]

【課題を解決するための手段】本発明は、上述した従来
の問題点に鑑みなされたもので、入力されたバ−コ−ド
信号を黒バーと白バーとに弁別し、その中よりサンプリ
ングした複数本の白バー部の時間デ−タの最小値からな
る細モジュ−ルと、該細モジュ−ルの時間デ−タと比較
して、任意の規定値(規定モジュ−ル数)以上の時間デ
−タを有する白バ−、または異常に大きい時間デ−タを
有する黒バ−が前後にある白バ−をレフトマ−ジン、或
いはライトマ−ジンとするバ−コ−ド切り出し方法を提
案するものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned conventional problems, and discriminates an input bar code signal into a black bar and a white bar, and samples from them. Compared with the fine module consisting of the minimum value of the time data of the plurality of white bars and the time data of the fine module, an arbitrary specified value (specified number of modules) or more A bar code cutting method in which the white bar having the time data of the above, or the white bar having the black bar having the abnormally large time data before and after is used as the left margin or the right margin. It is a proposal.

【0006】[0006]

【作用】本発明の携帯端末装置では、バ−コ−ド読み取
り部より読み込まれたデ−タの中の一本の白バーの時間
データと、各データを比較することにより、マージンを
特定し、入力されたデータの中より不要なデータを除外
し、バーコードとして有効なデータを一度に多数のバー
コードに対して抽出する。
In the portable terminal device of the present invention, the margin is specified by comparing the time data of one white bar in the data read by the bar code reading unit with each data. , Excludes unnecessary data from the input data, and extracts valid data as a barcode for many barcodes at once.

【0007】[0007]

【実施例】本発明の一実施例を添付図面を参照して説明
する。図1の携帯端末装置1には、バ−コ−ド読み取り
部10としてCCD、或いはペン型のスキャナ、レ−ザ
−を利用したもの等が考えられるが、本実施例では説明
上CCDを使用するものとする。CCDのデ−タはデジ
タル変換され読み取り対象の白バーをHIGHに、黒バ
ーをLOWに出力するものとする。
An embodiment of the present invention will be described with reference to the accompanying drawings. The portable terminal device 1 shown in FIG. 1 may be a CCD or a pen type scanner or a laser as the bar code reading section 10, but in this embodiment, the CCD is used for the sake of explanation. It shall be. The CCD data is digitally converted and the white bar to be read is output to HIGH and the black bar is output to LOW.

【0008】CPU5では、バ−コ−ド読み取り部10
より入力された信号をLOWからHIGH、HIGHか
らLOWへ切り替わる間隔を時間デ−タとしてRAM2
に保存する。図3は図1のCPU5に入力された図2の
バ−コ−ドのサンプルデ−タを時間デ−タに変換したも
のである。又、図3に表記されている黒バ−(以下Bは
黒バ−を表わす。)B3よりB32までが実際に変換さ
れるべきバ−コ−ドデ−タであり、B1、B2、B6
3、B64はノイズを表わしている。
In the CPU 5, the bar code reading unit 10
RAM2 is used as the time data for the interval at which the input signal is switched from LOW to HIGH and HIGH to LOW.
Save to. FIG. 3 shows the sample data of the bar code of FIG. 2 input to the CPU 5 of FIG. 1 converted into time data. Further, black bar (hereinafter B represents black bar) B3 to B32 shown in FIG. 3 is bar code data to be actually converted, and B1, B2, B6.
3 and B64 represent noise.

【0009】次に、本発明のバ−コ−ド切り出し方法の
手順を図4のフロ−チャ−トを参照して説明する。CP
U5は、まず白バ−(Sで表わす)の時間デ−タの中の
一番左に位置しているデ−タ(S1)をレフトマ−ジン
であると仮定し、SLとする(ステップ1)。その後よ
り4個の白バ−(S2、S3、S4、S5)を取得し
(ステップ2)、その中から最小値、最大値を求め、各
々Smin、Smaxとする(ステップ3)。
Next, the procedure of the bar code cutting method of the present invention will be described with reference to the flowchart of FIG. CP
U5 first assumes that the leftmost data (S1) among the white bar (represented by S) time data is the left margin and sets it as SL (step 1). ). After that, four white bars (S2, S3, S4, S5) are acquired (step 2), the minimum value and the maximum value are obtained from them, and they are respectively set as Smin and Smax (step 3).

【0010】ここで、SLとSmaxとを比較し、SL
がSmaxより大きいことを確認する(ステップ4)。
条件を満たしていなければ、SmaxをSLとし、ステ
ップ2へ戻る(ステップ14)。条件を満たしていれ
ば、最初にレフトマ−ジンと仮定したデ−タ(SL)
が、その中の最小のデ−タ(Smin)の時間デ−タの
5倍以上あるか比較する(ステップ5)。SLがSmi
nの5倍以上あれば、ステップ8へ進む。
Here, SL and Smax are compared and SL
Is larger than Smax (step 4).
If the condition is not satisfied, Smax is set to SL and the process returns to step 2 (step 14). If the conditions are met, the data assumed to be the left margin first (SL)
However, it is compared whether the minimum data (Smin) is 5 times or more of the time data (step 5). SL is Smi
If it is at least 5 times n, the process proceeds to step 8.

【0011】SLがSminの5倍以上無ければ、入力
されたデ−タのうち、先頭デ−タ以外については(ステ
ップ6)SLの前にSminの14倍以上の黒バ−がな
いかチェックし(ステップ7)、どちらの条件も満たし
ていなければ、SLはレフトマ−ジンではないと判断
し、SLの次の白バ−をレフトマ−ジンであると仮定し
てSLとし(ステップ15)、レフトマ−ジンの条件を
満たすか、又はデ−タの最後になるまで(ステップ1
6)ステップ2から繰り返す。デ−タの最後である場合
は、バ−コ−ドの切り出しを終了する。又、そのどちら
かの条件を満たしていればSLは、レフトマ−ジンであ
る可能性があるとして、次にこのレフトマ−ジンに対応
するライトマ−ジンを検索する。
If SL is not more than 5 times Smin, it is checked whether there is a black bar of 14 times Smin or more before SL (step 6) except for the leading data among the input data. If neither condition is satisfied (step 7), it is determined that SL is not a left margin, and the white bar next to SL is assumed to be a left margin and set as SL (step 15). Until the left margin condition is satisfied or the end of the data is reached (Step 1
6) Repeat from step 2. If it is the end of the data, the cutting of the bar code is completed. If either of the conditions is satisfied, the SL may be a left margin, and then searches for a right margin corresponding to this left margin.

【0012】ステップ8では、SLより右に5番目の白
バ−をSRとし、Sminの7倍の時間デ−タと比較す
る(ステップ9)。SRがSminの7倍以上あれば、
これをライトマ−ジンであると仮定しステップ11へ進
む。SRが、Sminの7倍より小さければ、SRの右
隣の黒バ−(BR)と、Sminの14倍の時間デ−タ
と比較する(ステップ10)。BRがSminの14倍
より大きければ、ステップ11へ進む。BRがSmin
の14倍より小さければ、SRの次の白バ−をSRとし
て、ステップ9へ戻る。
In step 8, the fifth white bar to the right of SL is set as SR and compared with time data which is 7 times Smin (step 9). If SR is more than 7 times Smin,
This is assumed to be a light margin, and the process proceeds to step 11. If SR is smaller than 7 times Smin, the black bar (BR) on the right of SR is compared with the time data 14 times Smin (step 10). If BR is greater than 14 times Smin, the process proceeds to step 11. BR is Smin
If it is smaller than 14 times, the white bar next to SR is set as SR and the process returns to step 9.

【0013】ステップ11では、SLとSRとの間のデ
−タの数を調べ、各種バ−コ−ドの規格本数であるか調
べる(ステップ11)。条件を満たしていれば、SLと
SRは夫々ライトマ−ジンとレフトマ−ジンであると判
断し、その間のデ−タをバ−コ−ドとしてデコ−ドする
(ステップ12)。もし条件を満たしていなければ、S
LとSRはレフトマ−ジン及びライトマ−ジンではない
と判断し、SRをSLとしてステップ2へ戻る。図2の
例では、S1、S2間及びS2、S3間はデ−タ数がバ
−コ−ドを構成する条件を満たしていないために否定さ
れる。S3をレフトマ−ジン、S33をライトマ−ジン
とした時は、条件を満たすためバ−コ−ド1を認識する
ことができる。
In step 11, the number of data between SL and SR is checked to see if it is the standard number of various bar codes (step 11). If the conditions are satisfied, it is judged that SL and SR are right margin and left margin, respectively, and the data between them is decoded as a bar code (step 12). If the conditions are not met, S
It is determined that L and SR are not left margin or right margin, and SR is set as SL, and the process returns to step 2. In the example of FIG. 2, the numbers of data between S1 and S2 and between S2 and S3 do not satisfy the condition for composing the bar code, and therefore, it is denied. When S3 is a left margin and S33 is a right margin, the bar code 1 can be recognized because the condition is satisfied.

【0014】CPU5は、バ−コ−ドを認識した後も、
今度はライトマ−ジン(SR)を次のバ−コ−ドのレフ
トマ−ジン(SL)と仮定し(ステップ13)、ステッ
プ2へ戻り同様の動作を繰り返し、S33から始まりB
62で終わるバ−コ−ド2認識することができる。
Even after the CPU 5 recognizes the bar code,
This time, assume that the right margin (SR) is the left margin (SL) of the next bar code (step 13), return to step 2 and repeat the same operation, starting from S33 to B.
Barcode 2 ending at 62 can be recognized.

【0015】[0015]

【発明の効果】本発明は如上のような構成となしたの
で、汚れや印刷ミスなどのために規格に準拠していない
レフトマ−ジンまたはライトマ−ジンを持つバ−コ−ド
についても対応が可能となる。また、規格以下の間隔で
並ぶ連続した多数のバーコードの読みとりも可能とな
る。
Since the present invention has the above-described structure, it can also be applied to a bar code having a left margin or a right margin which does not conform to the standard due to stains or printing errors. It will be possible. Also, it is possible to read a large number of continuous barcodes arranged at intervals below the standard.

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

【図1】 携帯端末装置の電気的ブロック図FIG. 1 is an electrical block diagram of a mobile terminal device.

【図2】 バ−コ−ドのサンプルデ−タFig. 2 Bar code sample data

【図3】 サンプルデ−タの時間デ−タFIG. 3 Time data of sample data

【図4】 フロ−チャ−ト[Fig. 4] Flow chart

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

1 携帯端末装置 2 ROM 3 RAM 4 表示装置 5 CPU 6 キ−入力部 7 通信部 8 ホストコンピュ−タ 9 カレンダ時計 10 バ−コ−ド読み取り部 11 プリンタ部 12 ブザ−部 1 portable terminal device 2 ROM 3 RAM 4 display device 5 CPU 6 key input unit 7 communication unit 8 host computer 9 calendar clock 10 bar code reading unit 11 printer unit 12 buzzer unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 入力されたバ−コ−ド信号を黒バーと白
バーとに弁別し、その中よりサンプリングした複数本の
白バー部の時間デ−タの最小値からなる細モジュ−ル
と、該細モジュ−ルの時間デ−タと比較して、任意の規
定値以上の時間デ−タを有する白バ−、または異常に大
きい時間デ−タを有する黒バ−が前後にある白バ−をレ
フトマ−ジン、或いはライトマ−ジンとすることを特徴
とするバ−コ−ド切り出し方法。
1. A fine module consisting of a minimum value of the time data of a plurality of white bar portions sampled from the input bar code signal by discriminating it into a black bar and a white bar. In comparison with the time data of the fine module, a white bar having time data of an arbitrary specified value or more or a black bar having an abnormally large time data is located before and after. A bar code cutting method, wherein the white bar is a left margin or a right margin.
【請求項2】 連続する白バ−4本からの最小値を求
め、該最小値を細モジュ−ルとすることを特徴とする請
求項1記載のバ−コ−ド切り出し方法。
2. A bar code cutting method according to claim 1, wherein a minimum value is obtained from four consecutive white bars and the minimum value is used as a fine module.
【請求項3】 前記細モジュ−ルと比較する白バ−の時
間デ−タが5倍以上、又は白バ−の前にある黒バ−の時
間デ−タが細モジュ−ルの14倍以上であることでレフ
トマ−ジンを決定することを特徴とする請求項1記載の
バ−コ−ド切り出し方法。
3. The time data of the white bar compared with the fine module is 5 times or more, or the time data of the black bar in front of the white bar is 14 times the fine module. The bar code cutting method according to claim 1, wherein the left margin is determined by the above.
【請求項4】 前記細モジュ−ルと比較する白バ−の時
間デ−タが7倍以上、又は次の黒バ−が細モジュ−ルの
14倍以上あることでライトマ−ジンを決定することを
特徴とする請求項1記載のバ−コ−ド切り出し方法。
4. The light margin is determined when the time data of the white bar compared to the fine module is 7 times or more, or the next black bar is 14 times or more of the fine module. The bar code cutting method according to claim 1, wherein
JP6339018A 1994-12-28 1994-12-28 Method for segmenting bar code Pending JPH08185463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6339018A JPH08185463A (en) 1994-12-28 1994-12-28 Method for segmenting bar code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6339018A JPH08185463A (en) 1994-12-28 1994-12-28 Method for segmenting bar code

Publications (1)

Publication Number Publication Date
JPH08185463A true JPH08185463A (en) 1996-07-16

Family

ID=18323502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6339018A Pending JPH08185463A (en) 1994-12-28 1994-12-28 Method for segmenting bar code

Country Status (1)

Country Link
JP (1) JPH08185463A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001256431A (en) * 2000-03-08 2001-09-21 Roodo:Kk Bar code reader, method for detecting start margin candidate by the same and method for reading bar code
WO2008010513A1 (en) 2006-07-19 2008-01-24 B-Core Inc. Optical symbol, article to which the optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device, and related program
JP2008159084A (en) * 2008-03-25 2008-07-10 Denso Wave Inc Bar code reading method, bar code reader and computer program
JP2008159085A (en) * 2008-03-25 2008-07-10 Denso Wave Inc Bar code reading method, bar code reading device and computer program
WO2008146580A1 (en) 2007-05-29 2008-12-04 B-Core Inc. Optical recognition code recognized result displaying method
US9230147B2 (en) 2005-02-16 2016-01-05 Denso Wave Incorporated Method and apparatus for optically reading out information stored in a barcode

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001256431A (en) * 2000-03-08 2001-09-21 Roodo:Kk Bar code reader, method for detecting start margin candidate by the same and method for reading bar code
JP4555952B2 (en) * 2000-03-08 2010-10-06 株式会社オプトエレクトロニクス Bar code symbol reading apparatus, start margin candidate detection method using the same, and bar code symbol reading method
US9230147B2 (en) 2005-02-16 2016-01-05 Denso Wave Incorporated Method and apparatus for optically reading out information stored in a barcode
US10509933B2 (en) 2005-02-16 2019-12-17 Denso Wave Incorporated Method and apparatus for optically reading out information stored in a barcode
WO2008010513A1 (en) 2006-07-19 2008-01-24 B-Core Inc. Optical symbol, article to which the optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device, and related program
US8113432B2 (en) 2006-07-19 2012-02-14 B-Core Inc. Apparatus for recognizing an optical recognition code in which a code symbol of a 1-dimensional color bit code indicative of certain data is divided into a plurality of code symbols
WO2008146580A1 (en) 2007-05-29 2008-12-04 B-Core Inc. Optical recognition code recognized result displaying method
JP2008159084A (en) * 2008-03-25 2008-07-10 Denso Wave Inc Bar code reading method, bar code reader and computer program
JP2008159085A (en) * 2008-03-25 2008-07-10 Denso Wave Inc Bar code reading method, bar code reading device and computer program
JP4636105B2 (en) * 2008-03-25 2011-02-23 株式会社デンソーウェーブ Bar code reading method, bar code reading apparatus, and computer program
JP4636104B2 (en) * 2008-03-25 2011-02-23 株式会社デンソーウェーブ Bar code reading method, bar code reading apparatus, and computer program

Similar Documents

Publication Publication Date Title
US4542528A (en) OCR and bar code reader with optimized sensor
JP2616921B2 (en) Label identification device
US20200250469A1 (en) Methods for optical character recognition (ocr)
JPH01319884A (en) Code reader
US5245167A (en) Bar-code reading apparatus
US20050248471A1 (en) Method and apparatus for displaying a time-varying code to a handheld terminal, and method and apparatus for approval authentication processing by using the same
JPH08185463A (en) Method for segmenting bar code
JPH0354388B2 (en)
US5471041A (en) Bar-code reader device
JPS64744B2 (en)
JPH0238983B2 (en)
EP0063243B1 (en) Ocr and bar code reader with optimized sensor
US5917172A (en) Apparatus and method for bar code reading
JP2731610B2 (en) Barcode decoder and barcode decoding method
JP7021651B2 (en) Symbol boundary identification device, symbol boundary identification method and image processing program
JPS62256095A (en) Bar code reader
JPH04283885A (en) Automatic identification decoder
JP2001005907A (en) Bar code reader and storage medium
JPH08153155A (en) Bar code segmenting method
JP2778870B2 (en) Barcode decoder
JP4207367B2 (en) Bar code reader
KR20030018905A (en) Method of identifying body information for vehicles using a bar code
JP2817025B2 (en) Barcode reader
JPH08153156A (en) Bar code decoding method
JP2726214B2 (en) Image reading device