Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0470667B2 - - Google Patents
[go: Go Back, main page]

JPH0470667B2 - - Google Patents

Info

Publication number
JPH0470667B2
JPH0470667B2 JP62235916A JP23591687A JPH0470667B2 JP H0470667 B2 JPH0470667 B2 JP H0470667B2 JP 62235916 A JP62235916 A JP 62235916A JP 23591687 A JP23591687 A JP 23591687A JP H0470667 B2 JPH0470667 B2 JP H0470667B2
Authority
JP
Japan
Prior art keywords
bar
demodulation
determined
threshold value
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP62235916A
Other languages
Japanese (ja)
Other versions
JPS6478392A (en
Inventor
Genichi Mori
Toshiaki Kihara
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.)
Fujitsu Frontech Ltd
Original Assignee
Fujitsu Frontech 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 Fujitsu Frontech Ltd filed Critical Fujitsu Frontech Ltd
Priority to JP62235916A priority Critical patent/JPS6478392A/en
Publication of JPS6478392A publication Critical patent/JPS6478392A/en
Publication of JPH0470667B2 publication Critical patent/JPH0470667B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概要〕 本発明は、バーコードを読取つて得られたカウ
ント値を閾値に基づいてバー幅の判定を行うバー
コード復調方式において、各バー毎に順次修正さ
れた閾値に基づいてバー幅を判定する第1の方式
の復調を行い、この第1の方式の復調で読取誤り
が発生した場合には、各バーの合計を特定の数で
割つて新しい閾値を求め、この閾値の連続性が保
証されたときに、第2の方式の復調を行うように
したことにより走査速度変化に追従できるように
するとともに、異常な値を読取ることをなくし、
読取率の著しい向上及び誤読率の著しい低減を可
能にしたものである。
[Detailed Description of the Invention] [Summary] The present invention provides a bar code demodulation method in which bar width is determined based on a threshold value based on a count value obtained by reading a bar code. Demodulation is performed using a first method that determines the bar width based on the first method, and if a reading error occurs in the demodulation using the first method, a new threshold value is obtained by dividing the sum of each bar by a specific number, By performing demodulation using the second method when the continuity of this threshold value is guaranteed, it is possible to follow changes in scanning speed, and it is possible to prevent abnormal values from being read.
This makes it possible to significantly improve the reading rate and significantly reduce the misreading rate.

〔産業上の利用分野〕[Industrial application field]

本発明は、バーコード読取装置に使用されるバ
ーコード復調方式に係り、特に読取つたバーコー
ドのバー幅の大小を判定する際の基準となる閾値
を適正な値に設定することを可能としたバーコー
ド復調方式に関するものである。
The present invention relates to a barcode demodulation method used in a barcode reading device, and in particular makes it possible to set a threshold value, which is a standard for determining the bar width of a read barcode, to an appropriate value. This relates to a barcode demodulation method.

バーコードを構成する黒、白バー幅の大小の判
定は、バーコードを走査する速度に影響され、こ
れを手操作のバーコードのペンで正確に読取つて
復調することは大変困難であり、読取率の向上及
び誤読率の低減は大きな技術的課題となつてい
る。
Determining the width of the black and white bars that make up a barcode is affected by the speed at which the barcode is scanned, and it is extremely difficult to accurately read and demodulate this with a hand-operated barcode pen. Improving the reading rate and reducing the misreading rate are major technical challenges.

〔従来の技術〕[Conventional technology]

最近、スーパーマーケツト等において、品名コ
ード番号、値段等が棒状のバーコードで表示さ
れ、食品、雑貨等に印刷されたり、あるいはラベ
ルとして貼付されている。このバーコードは、短
時間で大量の買物客を処理する業種においては、
バーコード読取装置により読取られ、そこに記録
された情報が販売時点情報管理等の様々な目的に
使用されている。
Recently, in supermarkets and the like, product name code numbers, prices, etc. are displayed in the form of stick-shaped barcodes, which are printed on foods, miscellaneous goods, etc., or attached as labels. This barcode is used in industries that handle a large number of shoppers in a short period of time.
The information read by a barcode reader and recorded therein is used for various purposes such as point of sale information management.

通常バーコードの読取は、バーコードが表示さ
れた面上を光で走査し、該バーコードにより変調
された反射光からコード化されたデータを復調す
る方法が用いられている。現在、多くの種類のバ
ーコード・フオーマツトがあるが、バーには通常
黒バーと白バーの2種類があり、またこの黒バー
と白バーの幅には大小があつて、この黒及び白の
バー幅の組合せによつてデータ文字等を表わすコ
ードが構成されている。従つて、このバー幅を正
確に検出することはバーコードを復調する上でき
わめて重要であり、バーコードを走査する速度の
変動にも影響されないことが必要とされる。
Normally, barcodes are read by scanning a surface on which a barcode is displayed with light and demodulating coded data from reflected light modulated by the barcode. Currently, there are many types of barcode formats, but there are usually two types of bars: black bars and white bars, and the widths of the black and white bars vary in size. A code representing a data character etc. is constructed by a combination of bar widths. Therefore, accurate detection of this bar width is extremely important in demodulating the bar code, and is required to be unaffected by variations in the speed at which the bar code is scanned.

上記バーコード読取装置は、バーコードをバー
コードペン等で走査して得た電気信号からバー幅
に応じたカウント値を得、順次黒及び白バーの広
い幅(以後Wで表す)と狭い幅(以後Nで表す)
とを検出していき、1文字分の黒バーと白バーの
WとNとの組合せデータからビツトパターンが判
定され、データとして処理される。
The barcode reading device scans a barcode with a barcode pen, etc., obtains a count value corresponding to the bar width from an electrical signal, and sequentially scans the barcode with a barcode pen or the like to obtain a count value corresponding to the bar width, and sequentially scans the barcode with a wide width (hereinafter referred to as W) and a narrow width of the white bar. (hereinafter expressed as N)
The bit pattern is determined from the combination data of W and N of the black bar and white bar for one character, and is processed as data.

本出願人は特開昭61−180380号公報にて、バー
コードを走査する速度の変動に追従して、良好な
読取率を実現できるよう、まず第1の復調を実行
し、これで読取誤りが発生した場合に第2の復調
を実行するようにしたバーコード復調方式に関す
る従来の技術を開示している。即ち、第1の復調
方式では、スタートコード又はストツプコード付
近の最初のバー幅の狭いバーのカウント値Nと最
初のバー幅の広いバーのカウント値Wとを抽出
し、(N+W)/2を演算して閾値SHとし、該閾
値SHを用いて先頭のバーのバー幅を判定し、該
先頭のバー幅の判定結果に基づくカウント値
N′又はW′と前記カウント値N又はWとを用い
(N′+W)/2又は(N+W′)/2を演算して閾
値SH′となし、該閾値SH′を用いて(SH+
SH′)/2を演算して閾値SH″となし、該閾値
SH″を用いて次のバーのバー幅を判断し、以後の
バーのバー幅は該閾値SN″を演算して実施する動
作を黒バー及び白バーについて行う。次に、第2
の復調方式はもし第1の復調方式で読取誤りが発
生した場合は更に1文字分の黒バーの総ての前記
カウント値の合計を第1の特定の数で割る演算を
行つて新たな閾値として黒バーのバー幅を判定
し、1文字分の白バーの総ての前記カウント値の
合計を第2の特定の数で割る演算を行つた新たな
閾値として白バーのバー幅を判定する動作を行
う。
In Japanese Patent Application Laid-Open No. 180380/1983, the present applicant first performs first demodulation in order to follow fluctuations in barcode scanning speed and achieve a good reading rate. This discloses a conventional technique related to a barcode demodulation method in which a second demodulation is performed when a barcode demodulation occurs. That is, in the first demodulation method, the count value N of the first narrow bar near the start code or stop code and the count value W of the first wide bar are extracted, and (N+W)/2 is calculated. is set as a threshold value SH, the bar width of the first bar is determined using the threshold value SH, and a count value is calculated based on the determination result of the first bar width.
Using N' or W' and the count value N or W, calculate (N'+W)/2 or (N+W')/2 to determine the threshold value SH', and use the threshold value SH' to calculate (SH+
SH')/2 is calculated and set as the threshold SH'', and the threshold
SH'' is used to determine the bar width of the next bar, and the bar width of subsequent bars is calculated by calculating the threshold value SN''. This operation is performed for black bars and white bars. Next, the second
In the demodulation method, if a reading error occurs in the first demodulation method, a new threshold value is set by dividing the sum of the count values of all the black bars for one character by the first specific number. Determine the bar width of the black bar as , and determine the bar width of the white bar as a new threshold value by calculating the sum of all the count values of the white bar for one character by a second specific number. perform an action.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来のバーコード復調方式では、第1の復
調方式でバー幅のカウント値N又はWが出るたび
に閾値SHに訂正していくため、ライトペン等の
走査速度に追従して閾値が変化し読取率が向上す
るが、第2の復調方式に移つた場合、閾値の連続
性が保証されていないため、カウント値N及びW
がある数字に該当したときに、誤読することがあ
つた。すなわち、バーコードペンによるバーコー
ド上の走査を途中で戻したり、バーコード上に鉛
筆やボールペン等で線が書かれたり、あるいはバ
ーコードにシミ、スポツト等が存在しているとき
にバー幅のカウント値が異常な値になり、連続性
が保証されないことがある。
In the above-mentioned conventional barcode demodulation method, the first demodulation method corrects the bar width count value to the threshold value SH every time the bar width count value N or W appears, so the threshold value changes according to the scanning speed of a light pen, etc. Although the reading rate improves, when moving to the second demodulation method, the continuity of the threshold values is not guaranteed, so the count values N and W
When it corresponded to a certain number, there were cases where it was misread. In other words, when scanning a barcode with a barcode pen, it is returned midway, a line is drawn on the barcode with a pencil or ballpoint pen, or the barcode has a stain or spot. The count value may become abnormal and continuity may not be guaranteed.

本発明は、このような問題を解決するために成
されたもので、その目的とするところは読取率の
著しい向上と誤読率の著しい低減を可能にしたバ
ーコード復調方式を提供することを目的とする。
The present invention was made to solve these problems, and its purpose is to provide a barcode demodulation method that can significantly improve the reading rate and significantly reduce the misreading rate. shall be.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のバーコード復調方式は、まず走査速度
に応じた閾値を用いて第1の復調を実行し、これ
で読取誤りが発生した場合にバー幅のカウント値
の合計から求めた新しい閾値の連続性を判定し、
連続性が保証されたときに、この閾値を用いて第
2の方式の復調を実行するようにしている。すな
わち、まず最初の狭いバーのカウント値Nと広い
バーのカウント値Wの平均値を求めて閾値SHと
する。そして、この閾値SHを用いて先頭バーの
カウント値N′又はW′を求め、該カウント値N′,
W又はN,W′の平均値を求めて閾値SH′とする。
次に前記閾値SH,SH′の平均を求めて閾値SH1
とする。この閾値SH1を用いて次のバーのバー幅
を判定し、以後同様にして順次閾値SH1を求めて
判定して第1の方式の復調を行う。
The barcode demodulation method of the present invention first performs the first demodulation using a threshold value that corresponds to the scanning speed, and if a reading error occurs, a new threshold value determined from the total bar width count value is continuously applied. determine the gender,
When continuity is guaranteed, the second method of demodulation is performed using this threshold. That is, first, the average value of the count value N of the first narrow bar and the count value W of the wide bar is determined and set as the threshold value SH. Then, the count value N' or W' of the first bar is determined using this threshold value SH, and the count value N',
The average value of W or N and W' is determined and set as the threshold value SH'.
Next, calculate the average of the threshold values SH and SH′ and obtain the threshold value SH 1
shall be. This threshold value SH 1 is used to determine the bar width of the next bar, and thereafter, the threshold value SH 1 is sequentially determined and determined in the same manner, and demodulation of the first method is performed.

もし、第1の方式の復調で読取誤りが発生した
場合は、1文字分の黒バー、白バーのそれぞれの
カウント値の合計をそれぞれの特定の数で割るこ
とにより閾値SH2を求める。そして、上記二つの
閾値SH1,SH2の値1/1.6≦SH2/SH1≦1.6を
満足するとき閾値SH1,SH2に連続性があると判
定して該閾値SH2を用いてバー幅を判定して第2
の方式の復調を行う。
If a reading error occurs in demodulation using the first method, the threshold value SH 2 is determined by dividing the total count value of each black bar and white bar for one character by their respective specific numbers. Then, when the values of the above two thresholds SH 1 and SH 2 satisfy 1/1.6≦SH 2 /SH 1 ≦1.6, it is determined that the thresholds SH 1 and SH 2 have continuity, and the threshold SH 2 is used. Determine the bar width and
Perform demodulation using the following method.

〔作用〕[Effect]

上記第1の方式の復調において、黒バー、白バ
ーそれぞれについて、各バー毎に得られる順次修
正された閾値は、走査速度の変化に追従した最適
な値となる。従つて、このような最適な値に基づ
いて得られる各バー幅の判定は正確なものとな
り、この正確な判定に基づいて復調が行われるた
めに、読取率は向上し、該読取率は低減する。
In the demodulation of the first method, the sequentially corrected threshold values obtained for each black bar and white bar are optimal values that follow changes in scanning speed. Therefore, the determination of each bar width obtained based on such an optimal value is accurate, and demodulation is performed based on this accurate determination, so the reading rate improves and the reading rate decreases. do.

また、第2の方式の復調において、1文字中の
黒バー、白バーのそれぞれについてバー幅のカウ
ント値の合計をそれぞれの特定の数で割つた新し
い閾値SH2は、極端な走査速度変化があつた場合
でも、1文字分の各バー幅にほぼ対応した最適な
値となる。そして、この新しい閾値SH2は第1の
方式の復調の閾値SH1と比較され、連続性が保証
されたときに閾値SH2に基づいて第2の方式の復
調が行われる。従つて、連続性が保証された最適
な値に基づいて得られる各バー幅の判定は正確な
ものとなる。すなわち、バー幅のカウント値が異
常な値になる場合が除去されるため、更に読取率
は向上し、読取率は低減する。
In addition, in the demodulation of the second method, a new threshold value SH 2 , which is calculated by dividing the total bar width count value for each of the black bars and white bars in one character by a specific number, is used to prevent extreme changes in scanning speed. Even if there is a difference in width, it will be the optimum value that approximately corresponds to the width of each bar for one character. This new threshold SH 2 is then compared with the threshold SH 1 for demodulation of the first method, and when continuity is guaranteed, demodulation of the second method is performed based on the threshold SH 2 . Therefore, the determination of each bar width based on the optimal value with guaranteed continuity is accurate. That is, since cases where the bar width count value becomes an abnormal value are removed, the reading rate is further improved and the reading rate is reduced.

このように本発明では、第1の方式の復調だけ
でも走査速度に追従して読取率を高く、かつ誤読
率を低くできるものであるが、第1の方式の復調
ができないときには、連続性を保証した新しい閾
値を用いて第2の方式の復調を実行することによ
り、読取率の著しい向上と誤読率の著しい低減が
可能になる。
In this way, in the present invention, it is possible to follow the scanning speed and achieve a high reading rate and a low misreading rate by using only the first method of demodulation, but when the first method cannot be demodulated, continuity can be improved. By performing the second method of demodulation using the guaranteed new threshold, it is possible to significantly improve the reading rate and significantly reduce the misreading rate.

〔実施例〕〔Example〕

以下、本発明の実施例について、図面を参照し
ながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

第1図は、本発明の一実施例に係るバーコード
復調方式を適用したバーコードリーダの内部構成
を示すブロツク図である。
FIG. 1 is a block diagram showing the internal configuration of a barcode reader to which a barcode demodulation method according to an embodiment of the present invention is applied.

同図において、光電変換部1は例えばバーコー
ドペン等からなり、バーコード上を走査して光信
号を得、これを電気信号に変換する手段である。
アナログデジタル変換部2は、光電変換部1から
出力されたアナログ信号をデジタル信号に変換す
る手段である。このデジタル信号は、上記バーコ
ードを構成する各黒、白バーの幅に対応したパル
ス幅を持つ、それぞれ「1」、「0」のステツプ状
の信号となつている。信号変換部3は、上記黒、
白に対応する「1」、「0」のデジタル信号におけ
る「1」、「0」の変化点でパルス信号を作成する
と共に、それぞれに対応する黒白信号を出力する
手段である。ここで得られたパルス信号の時間間
隔は、上記黒、白バーの幅に対応する。
In the figure, a photoelectric conversion section 1 is composed of, for example, a barcode pen, and is a means for scanning a barcode to obtain an optical signal and converting it into an electrical signal.
The analog-to-digital converter 2 is a means for converting the analog signal output from the photoelectric converter 1 into a digital signal. This digital signal is a step-like signal of "1" and "0", each having a pulse width corresponding to the width of each black and white bar constituting the bar code. The signal converter 3 has the above-mentioned black,
This means creates a pulse signal at the change point of "1" and "0" in a digital signal of "1" and "0" corresponding to white, and outputs a black and white signal corresponding to each. The time interval of the pulse signals obtained here corresponds to the widths of the black and white bars.

このようにしてパルス信号及び黒白信号に変換
されたバーコードは、データバス4を介して、復
調が実行される。この復調は、タイマカンウタ部
5及びメモリ部(RAM)6を用い、メモリ部
(ROM)7内のマイクロプログラムに基づき、
主制御部(CPU)8の制御によつて行う。なお、
回線制御部9によつてバーコード読取データは外
部の親機へ送信されると共に電源部10によつて
各ブロツクへの電源供給を行なつている。
The barcode thus converted into a pulse signal and a black and white signal is demodulated via the data bus 4. This demodulation uses a timer counter section 5 and a memory section (RAM) 6, and is based on a microprogram in the memory section (ROM) 7.
This is done under the control of the main control unit (CPU) 8. In addition,
A line control section 9 transmits the barcode reading data to an external base unit, and a power supply section 10 supplies power to each block.

以下に、本実施例に係るバーコード復調方式を
具体的に説明する。
The barcode demodulation method according to this embodiment will be specifically explained below.

本実施例では、走査速度に追従する閾値を求め
て第1の方式の復調を実行し、これで読取誤りが
発生した場合に第2の新しい閾値を求め、この連
続性を判定してから第2の方式の復調を実行する
ようにしている。なお、ここでは第7図に示した
ようなバーコード(例えばインダストリアル2ア
ウト・オブ5)が、光電変換部1の走査に従つて
順次入力された場合について述べる。
In this embodiment, a threshold value that follows the scanning speed is determined and demodulation of the first method is performed, and if a reading error occurs with this, a new second threshold value is determined, and the continuity is determined. The second method of demodulation is performed. Here, a case will be described in which barcodes as shown in FIG.

第2図は本発明の一実施例に係る復調のメイン
フローチヤートである。同図において、まずステ
ツプa1でバーコードの入力を持ち、バーコードが
入力されたときステツa2でスタートコードの復調
を行う。次にステツプa3において、スタートコー
ドの復調が正常に終了したがどうか判別し、正常
に終了していないときにはステツプa1に戻りバー
コード入力を待ち、正常に終了したときは後述す
るステツプa4に進み、1文字の復調を実行する。
すなわち、ステツプa1〜a3において、入力された
バーコードのスタートコードが正常に復調された
ときに、以降のバーコードの復調が実行される。
次に、ステツプa5において、1文字の復調(ステ
ツプa4)が正常に終了したかどうか判別し、正常
に終了していないときにはステツプa1に戻りバー
コード入力を持ち、正常に終了したときにはステ
ツプa6に進む。このステツプa6では、ストツプコ
ードかどうかを判別し、ストツプコードでないと
きには上記ステツプa4に戻り再び1文字の復調を
繰り返し、ストツプコードのときには正常な読取
として終了する。
FIG. 2 is a main flowchart of demodulation according to an embodiment of the present invention. In the figure, first, a bar code is input in step a1 , and when the bar code is input, a start code is demodulated in step a2 . Next, in step a3 , it is determined whether or not demodulation of the start code has been completed normally.If it has not been completed normally, the process returns to step a1 to wait for barcode input, and if it has been completed normally, the process proceeds to step a4 , which will be described later. , and demodulates one character.
That is, in steps a1 to a3 , when the start code of the input barcode is successfully demodulated, demodulation of subsequent barcodes is executed.
Next, in step a5 , it is determined whether the demodulation of one character (step a4 ) has been completed normally.If it has not been completed normally, the process returns to step a1 to input the barcode, and if it has been successfully completed, Proceed to step a6 . In this step a6 , it is determined whether or not it is a stop code. If it is not a stop code, the process returns to step a4 and the demodulation of one character is repeated again. If it is a stop code, the reading ends as normal.

次に、第3図に基づき、1文字の復調(ステツ
プa4)を具体的に説明する。
Next, the demodulation of one character (step a 4 ) will be specifically explained based on FIG.

まず、ステツプb1において、第1の方式による
1文字の復調を行う。この第1の方式による復調
の詳細を第4図に示す。第4図において、まずス
テツプc1で上記バーコードのスタートコード付近
の最初のバー幅の狭いバーのカウント値(タイマ
カウント部5によるバー幅の計数値)Nと最初の
バー幅の広いバーのカウント値Wとが読み出さ
れ、このカウント値N,Wを用いて閾値SHを求
める。具体的には、SH=(N+W)/2の式に基
づいて行う。次に、ステツプc2において上記閾値
SHを用いて次の1文字(例えば「0」)を構成す
る先頭のバーのバー幅を判定し、その判定結果に
基づいて、バー幅の狭いバーであればカウント値
N′又はバー幅の広いバーであればカウント値
W′を読み出す。そして、ステツプc3において上
記カウント値N′又はW′を用いて閾値SH′を求め
る。具体的にはSH′=(N′+W)/2又は(N+
W′)/2の式に基づいて行う。次に、ステツプ
c4において、上記閾値SH及びSH′を用いて閾値
SH″=(SH+SH′)/2を求める。そして、ステ
ツプc5において、上記閾値SH″を用いて次のバー
のバー幅を判定する。以下、ステツプc6におい
て、黒バー、白バーについてステツプc2〜c5まで
の処理を順次繰返しを行う。そして、ステツプc7
において1文字分の黒バーと白バーのWとNとの
組合せデータから該当するビツトパターンに変換
される。ステツプc8において上記ビツトパターン
は対応する文字のビツトパターンとの照合を行
い、対応する文字を復調する。以下の各ステツプ
により第1の方式による1文字の復調が終了す
る。
First, in step b1 , one character is demodulated using the first method. Details of demodulation by this first method are shown in FIG. In FIG. 4, first, in step c1 , the count value N of the first narrow bar near the start code of the bar code (the counted value of the bar width by the timer counting section 5) and the count value N of the first wide bar near the start code of the bar code are determined. The count value W is read out, and the threshold value SH is determined using the count values N and W. Specifically, this is performed based on the formula SH=(N+W)/2. Next, in step c2 , the above threshold value is
Use SH to determine the bar width of the first bar that makes up the next character (for example, "0"), and based on the determination result, if the bar width is narrow, the count value will be
N′ or the count value if the bar is wide
Read W′. Then, in step c3 , the threshold value SH' is determined using the count value N' or W'. Specifically, SH'=(N'+W)/2 or (N+
This is done based on the formula W′)/2. Next, step
c 4 , use the above thresholds SH and SH′ to calculate the threshold
SH''=(SH+SH')/2 is determined. Then, in step c5 , the bar width of the next bar is determined using the threshold value SH''. Thereafter, in step c6 , the processes of steps c2 to c5 are sequentially repeated for the black bar and white bar. And step c 7
In the step, the combination data of W and N of a black bar and a white bar for one character is converted into a corresponding bit pattern. In step c8 , the bit pattern is compared with the bit pattern of the corresponding character, and the corresponding character is demodulated. Demodulation of one character by the first method is completed through the following steps.

次に、第3図のステツプb2において、上記第1
の方式による復調に読取誤りがなく正常に終了し
ているかどうか判定する。正常に終了していると
きにはステツプb3に進み、ストツプコードである
かどうか判定し、ストツプコードでなければステ
ツプb1へ戻り次の1文字の復調を行い、ストツプ
コードであるば正常復調として終了する。そし
て、正常に終了しないで読取誤りが発生した場合
には、ステツプb4へ進み第2の方式による新しい
閾値を求める。このステツプb4における新しい閾
値の求め方を第5図に示す。第5図において、ま
ず、ステツプd1において、1文字分の黒バー、白
バーのすべてのカウント値の合計X,Yを求め
る。そしてステツプd2において、合計X,Yをそ
れぞれ特定の数A,Bで割り、第2の復調の閾値
SH2を求める。具体的には、SH2=X/A、Y/
Bの式に基づいて行う。
Next, in step b2 of FIG.
Determine whether the demodulation using the method has been completed normally without any reading errors. If it has been completed normally, the process proceeds to step b3 , where it is determined whether or not it is a stop code.If it is not a stop code, the process returns to step b1 to demodulate the next character, and if it is a stop code, the demodulation ends as normal. If the process does not end normally and a reading error occurs, the process proceeds to step b4 to find a new threshold using the second method. FIG. 5 shows how to find the new threshold value in step b4 . In FIG. 5, first, in step d1 , the totals X and Y of all the count values of the black bar and white bar for one character are calculated. Then, in step d2 , the sums X and Y are divided by specific numbers A and B, respectively, and the second demodulation threshold is determined.
Find SH 2 . Specifically, SH 2 =X/A, Y/
This is done based on formula B.

上記特定の数A,Bは、例えばX/A≒(N+
W)/2、Y/B≒(N+W)/2で求まる第1
及び第2の特定の数A及びBである。
The above specific numbers A and B are, for example, X/A≒(N+
W)/2, Y/B≒(N+W)/2, the first
and second specific numbers A and B.

次に、第3図のステツプb5において、第1の方
式における1文字分の最後のバー幅を判定した閾
値SH2をSH1とし、この閾値SH1と第2の方式の
新しい閾値SH2とを比べて連続性があるかどうか
判定する。すなわち、第1の方式の閾値SH1に対
し第2の方式の閾値SH2が異常な値になつていな
いかどうかを見る。この異常な値の原因としては
バーコード上の走査ミス(例えば途中で戻すよう
な走査)、バーコード上のシミ、スポツト等があ
る。具体的な連続性の判定のためには、閾値SH1
とSH2との比が1.6倍程度以下であるかどうかで
行う。この比が1.6倍程度とするのは速度変化を
考慮した妥当な判定となり、1.5倍程度ではペン
コードが手動操作であるため速度変化が大きく、
厳しい判定となり、1.7倍程度では速度変化を考
慮しても判定が不充分になるからである。この連
続性の判定は以下の式に基づいて行う。
Next, in step b5 of FIG. 3, the threshold value SH 2 for determining the last bar width for one character in the first method is set as SH 1 , and this threshold value SH 1 and the new threshold value SH 2 of the second method are set as SH 1 . Compare with to determine whether there is continuity. That is, it is checked whether the threshold value SH 2 of the second method has become an abnormal value compared to the threshold value SH 1 of the first method. The causes of this abnormal value include a scanning error on the barcode (for example, a scan that returns halfway), a stain, a spot, etc. on the barcode. For specific continuity determination, the threshold SH 1
This is done depending on whether the ratio between SH2 and SH2 is about 1.6 times or less. Setting this ratio to about 1.6 times is a reasonable judgment considering the speed change, and at about 1.5 times, the speed change is large because the pen code is manually operated.
This is because the judgment is difficult, and at around 1.7 times, the judgment becomes insufficient even when speed changes are taken into account. This continuity determination is performed based on the following formula.

1/1.6≦SH2/SH1≦1.6 すなわち、閾値SH1,SH2が上記式を満足すれ
ば連続性ありと判定してステツプb6へ進み閾値
SH2を用いて1文字分のバーのバー幅を判定して
2度目の復調を行い、満足しないときには復調エ
ラーとして処理する。上記ステツプb6の2番目の
復調は閾値SH2を用いて1文字分の黒バーと白バ
ーのWとNとの組合せデータから該当するビツタ
パターンに変換し、このビツトパターンに対応す
る文字に復調する。次に、ステツプb7において、
上記第2の方式による復調に読取誤りがなく正常
に終了しているかどうか判定する。正常に終了し
ているときにはステツプb8に進み、ストツプコー
ドであるかどうか判定し、ストツプコードでなけ
ればステツプb1へ戻り再び第1の方式による復調
を行い、ストツプコードであれば正常復調として
終了する。
1/1.6≦SH 2 /SH 1 ≦1.6 In other words, if the thresholds SH 1 and SH 2 satisfy the above formula, it is determined that there is continuity, and the process proceeds to step b 6 and sets the thresholds.
A second demodulation is performed by determining the bar width of one character using SH 2 , and if it is not satisfied, it is treated as a demodulation error. The second demodulation in step b6 above converts the combination data of W and N of the black bar and white bar for one character into the corresponding bit pattern using the threshold value SH2 , and demodulates into the character corresponding to this bit pattern. do. Next, in step b7 ,
It is determined whether demodulation using the second method has been completed normally without any reading errors. If it has been completed normally, the process proceeds to step b8 , where it is determined whether or not it is a stop code.If it is not a stop code, the process returns to step b1 and demodulation is performed again using the first method, and if it is a stop code, the demodulation is completed as normal.

第6図は本実施例によるバー幅カウント値を説
明する図である。同図において、第1の方式に基
づいて1文字分のカウント値(例えばN,W,
N,N,W)が読み出される。ここで、第1方式
の閾値SH1は走査速度に追従して変化する。次
に、読取誤りが発生する場合に第2の方式の閾値
SH2を用いて判定する。この閾値SH2は1文字分
のバー幅のカウント値(例えばX,N,N,N,
W)の合計を特定の値A,Bで割つているため各
カウント値にほぼ対応した値になる。
FIG. 6 is a diagram illustrating the bar width count value according to this embodiment. In the figure, the count value for one character (for example, N, W,
N, N, W) are read out. Here, the threshold value SH 1 of the first method changes following the scanning speed. Next, when a reading error occurs, the threshold value of the second method is
Determine using SH 2 . This threshold value SH2 is the count value of the bar width for one character (for example, X, N, N, N,
Since the sum of W) is divided by the specific values A and B, the value almost corresponds to each count value.

以上のようにして、本実施例では第1の方式の
復調で読取誤りが発生した場合、第2の方式の復
調が行われる。このとき第1の方式の閾値SH1
第2の方式の閾値SH2とを連続性があるかどうか
判定される。第1の方式において、黒バー、白バ
ーのそれぞれについてバー幅カウント値に対応し
て順次修正された閾値SH1が得られるため、この
閾値SH1に基づいて行われるバー幅の判定はバー
コード上の走査速度の変化に追従し、正確なもの
となる。従つて、この正確なバー幅の判定に基づ
いた復調が可能となり、読取率の向上と誤読率の
低減を実現することができる。
As described above, in this embodiment, when a reading error occurs during demodulation using the first method, demodulation using the second method is performed. At this time, it is determined whether there is continuity between the threshold value SH 1 of the first method and the threshold value SH 2 of the second method. In the first method, a threshold value SH 1 is obtained that is sequentially corrected corresponding to the bar width count value for each of the black bar and white bar, so the bar width determination based on this threshold value SH 1 is based on the bar code It follows the change in scanning speed above and is accurate. Therefore, demodulation based on this accurate bar width determination becomes possible, and it is possible to improve the reading rate and reduce the misreading rate.

また、第2の方式において、黒バー、白バーに
ついてそれぞれのバー幅のカウント値の合計から
閾値SH2を求めているため、極端は走査速度の変
化があつても読取が行われる。さらに、第2の方
式のステツプb5において、第1の方式の復調に用
いる最後の閾値SH1(1文字分の最後のバー幅を
判定する閾値)と、第2の方式の復調に用いる閾
値SH2との間の連続性が保証されるため、異常な
値が読取られて誤つて復調されることがなくな
る。この連続性の判定としては、第1の方式の復
調に用いる閾値SH1に対して第2の方式の復調に
用いる閾値SH2が60%程度以内にあれば、読取率
の一層の向上と誤読率の一層の低減を実現できる
ことが確認されている。
Furthermore, in the second method, since the threshold value SH 2 is determined from the sum of the count values of the respective bar widths for the black bar and the white bar, reading is performed even if there is an extreme change in the scanning speed. Furthermore, in step b5 of the second method, the final threshold value SH 1 used for demodulation of the first method (threshold value for determining the final bar width for one character) and the threshold value used for demodulation of the second method are determined. Since continuity with SH 2 is guaranteed, abnormal values will not be read and erroneously demodulated. To determine this continuity, if the threshold value SH 2 used for the demodulation of the second method is within about 60% of the threshold value SH 1 used for the demodulation of the first method, the reading rate will further improve and misreading will occur. It has been confirmed that a further reduction in the ratio can be achieved.

なお、本発明においては閾値を用いてバー幅の
判定を行い、この判定結果に基づいて復調を行う
方式であればよく、バーコード・フオーマツトも
任意なものに適用される。又、上記実施例におい
て閾値SH1,SH2の連続性の保証のための判定と
しては、閾値SH1に対して閾値SH2が60%程度の
変化があるものとしているが、この例に限らず、
バーコード・フオーマツトの形式あるいは実験結
果等により種々の値にすることができる。
In the present invention, any method may be used as long as the bar width is determined using a threshold value and demodulation is performed based on the determination result, and any bar code format may be used. In addition, in the above embodiment, the determination to ensure the continuity of the threshold values SH 1 and SH 2 is based on the assumption that the threshold value SH 2 changes by about 60% with respect to the threshold value SH 1 , but this is not limited to this example. figure,
Various values can be set depending on the barcode format or experimental results.

〔発明の効果〕〔Effect of the invention〕

本発明のバーコード復調方式によれば、第1の
方式の閾値と第2の方式の閾値との間の連続性を
保証しているため、バーコードペンで走査する際
の走査速度に追従でき、かつ異常な値が読取られ
ることがなくなり、読取率の著しい向上と誤読率
の著しい低減とが可能になる。
According to the barcode demodulation method of the present invention, continuity between the threshold value of the first method and the threshold value of the second method is guaranteed, so it is possible to follow the scanning speed when scanning with a barcode pen. , and abnormal values are no longer read, making it possible to significantly improve the reading rate and significantly reduce the misreading rate.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を適用したバーコー
ドリーダの内部構成を示すブロツク図、第2図は
同実施例に係る復調を示すメインフローチヤー
ト、第3図は同実施例に係る1文字の復調を示す
フローチヤート、第4図は同実施例に係る第1の
方式の復調を示すフローチヤート、第5図は同実
施例に係る第2の方式の閾値を求めるフローチヤ
ート、第6図は同実施例に係るバー幅カウント値
を示す図、第7図はバーコード(例えばインダス
トリアル2アウト・オブ5)の一例を示す図であ
る。 1……光電変換部(バーコードペン)、2……
アナログデジタル変換部、3……信号変換部、4
……データバス、5……タイマカンウタ部、6,
7……メモリ部、8……主制御部、9……回線制
御部、10……電源部、N,W,N′W′……カウ
ント値、SH1,SH2……閾値、W,Y……カウン
ト値の合計、A,B……特定の数。
FIG. 1 is a block diagram showing the internal configuration of a barcode reader to which an embodiment of the present invention is applied, FIG. 2 is a main flowchart showing demodulation according to the embodiment, and FIG. FIG. 4 is a flowchart showing the demodulation of characters in the first method according to the same embodiment. FIG. 5 is a flowchart for determining the threshold value in the second method according to the same embodiment. The figure shows bar width count values according to the same embodiment, and FIG. 7 is a diagram showing an example of a bar code (for example, industrial 2 out of 5). 1...Photoelectric conversion unit (barcode pen), 2...
Analog-digital converter, 3...Signal converter, 4
...Data bus, 5...Timer counter section, 6,
7... Memory section, 8... Main control section, 9... Line control section, 10... Power supply section, N, W, N'W'... Count value, SH 1 , SH 2 ... Threshold value, W, Y...Total count value, A, B...Specific number.

Claims (1)

【特許請求の範囲】 1 複数の黒、白カバーからなるバーコードを読
取つて得られたカウント値を閾値に基づいてバー
幅の判定を行うバーコード復調方式において、 前記バーコードの読取られた各バーのカウント
値毎に順次補正された閾値SH1に基づいてバー幅
を判定する第1の方式の復調を行い、 該第1の方式の復調で読取誤りが発生した場合
は、更に1文字分の各バーのカウント値の合計を
特定の数で割ることにより新しい閾値SH2を求
め、前記二つの閾値SH1,SH2の値が1/1.6≦
SH2/SH1≦1.6を満足するとき前記修正された
閾値SH1及び新しい閾値SH2に連続性があると判
定して前記閾値SH2を用いてバー幅を判定する第
2の方式の復調を行うことを特徴とするバーコー
ド復調方式。 2 前記第1の方式の復調は、前記バーコードの
最初のバー幅の狭いバーのカウント値Nと最初の
バー幅の広いバーのカウント値Wとを読み出し、
該カウント値N,Wの平均値を求めて閾値SHと
し、該閾値SHを用いて先頭のバーのバー幅を判
定し、該先頭のバー幅の判定結果に基づくカウン
ト値N′又はW′と前記カウント値N又はWとを用
い該カウント値N′、W又はN,W′の平均値を求
めて閾値SH′とし、前記閾値SH,SH′の平均値
を求めて閾値SH1とし、該閾値SH1を用いて次の
バーのバー幅を判定し、以後のバーのバー幅は前
記と同様の閾値SH1を求めて順次判定して復調す
ることを特徴とする特許請求の範囲第1項記載の
バーコード復調方式。 3 前記第2の方式の復調の特定の数は、1文字
分の黒バーのすべてのカウント値の合計をXとす
ればX/A≒(N+W)/2で求まる第1の特定
の数Aであり、1文字分の白バーのすべてのカウ
ント値の合計をYとすればY/B≒(N+W)/
2で求まる第2の特定の数Bであることを特徴と
する特許請求の範囲第1項記載のバーコード復調
方式。
[Scope of Claims] 1. In a barcode demodulation method in which a bar width is determined based on a threshold value based on a count value obtained by reading a barcode consisting of a plurality of black and white covers, each of the barcodes read Demodulation is performed using the first method that determines the bar width based on the threshold value SH 1 that is sequentially corrected for each bar count value, and if a reading error occurs in the demodulation using the first method, one additional character is decoded. A new threshold SH 2 is obtained by dividing the total count value of each bar by a specific number, and the value of the two thresholds SH 1 and SH 2 is 1/1.6≦
Demodulation of a second method in which it is determined that the modified threshold SH 1 and the new threshold SH 2 have continuity when SH 2 /SH 1 ≦1.6, and the bar width is determined using the threshold SH 2 . A barcode demodulation method that performs the following. 2. The demodulation of the first method reads the count value N of the first narrow bar and the count value W of the first wide bar of the barcode,
The average value of the count values N and W is determined as a threshold value SH, the bar width of the leading bar is determined using the threshold value SH, and the count value N' or W' is determined based on the determination result of the leading bar width. Using the count value N or W, the average value of the count values N', W or N, W' is determined as a threshold value SH', the average value of the threshold values SH, SH' is determined as a threshold value SH1 , and the The bar width of the next bar is determined using the threshold value SH 1 , and the bar widths of subsequent bars are determined and demodulated sequentially by obtaining the same threshold value SH 1 as described above. Barcode demodulation method described in section. 3 The specific number of demodulations in the second method is the first specific number A, which is determined by X/A≒(N+W)/2, where X is the sum of all count values of the black bars for one character. If the sum of all count values of the white bar for one character is Y, then Y/B≒(N+W)/
2. The barcode demodulation method according to claim 1, wherein the second specific number B is determined by 2.
JP62235916A 1987-09-19 1987-09-19 System for demodulating bar code Granted JPS6478392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62235916A JPS6478392A (en) 1987-09-19 1987-09-19 System for demodulating bar code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62235916A JPS6478392A (en) 1987-09-19 1987-09-19 System for demodulating bar code

Publications (2)

Publication Number Publication Date
JPS6478392A JPS6478392A (en) 1989-03-23
JPH0470667B2 true JPH0470667B2 (en) 1992-11-11

Family

ID=16993139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62235916A Granted JPS6478392A (en) 1987-09-19 1987-09-19 System for demodulating bar code

Country Status (1)

Country Link
JP (1) JPS6478392A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03271989A (en) * 1990-03-22 1991-12-03 Tamura Electric Works Ltd Card reading system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6011973A (en) * 1983-07-01 1985-01-22 Nec Corp Bar code reader
JPS61180380A (en) * 1985-02-05 1986-08-13 Fuji Facom Corp Bar code demodulation system

Also Published As

Publication number Publication date
JPS6478392A (en) 1989-03-23

Similar Documents

Publication Publication Date Title
EP0390162B1 (en) An apparatus for reading a bar code
JP2616921B2 (en) Label identification device
US4973829A (en) Bar code reading method
US4488678A (en) Method and apparatus for reading a bar code
US4728784A (en) Apparatus and method of encoding and decoding barcodes
US6129278A (en) Detecting image cell position with subpixel accuracy
US4414468A (en) Systematic error correction in bar code scanner
JPH0157836B2 (en)
US5537431A (en) Method and apparatus for bar code reading and decoding
JPS61101880A (en) Barcode reading method and device
JPS6224836B2 (en)
JPH0354388B2 (en)
JP2001043308A (en) Barcode reading method and barcode reading system
JPH07101437B2 (en) Code reader
JP2000357205A (en) Barcode reading device and barcode reading method
JPS60129891A (en) Information processing method using bar code symbol
CN117521695A (en) Barcode decoding method, device and computer-readable medium
US5393968A (en) Method and device for reading bar code
JPH0470667B2 (en)
US6547143B2 (en) Bar-code reader and bar-code reading method providing display and correction of questionable characters
JP2718442B2 (en) Barcode demodulation method and apparatus
JP2729168B2 (en) Barcode, barcode reader, and method of reading the same
JPS61180380A (en) Bar code demodulation system
JP2677805B2 (en) Code reader
JPS6233630B2 (en)

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term