JPH0786904B2 - Bar code demodulation method - Google Patents
Bar code demodulation methodInfo
- Publication number
- JPH0786904B2 JPH0786904B2 JP61301683A JP30168386A JPH0786904B2 JP H0786904 B2 JPH0786904 B2 JP H0786904B2 JP 61301683 A JP61301683 A JP 61301683A JP 30168386 A JP30168386 A JP 30168386A JP H0786904 B2 JPH0786904 B2 JP H0786904B2
- Authority
- JP
- Japan
- Prior art keywords
- bar
- modules
- black
- value
- white
- 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 - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 20
- 238000006243 chemical reaction Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008719 thickening Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000000740 bleeding effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004584 weight gain Effects 0.000 description 1
- 235000019786 weight gain Nutrition 0.000 description 1
Description
【発明の詳細な説明】 〔概要〕 本発明は、モジュール数の異なる複数の黒、白バーから
なるバーコードを復調するバーコード復調方式におい
て、黒、白バーのそれぞれについて、各バー毎に順次修
正された最適な基本モジュール値を用いて得られたモジ
ュール数に基づいて上記バーコードを文字に変換すると
共に、上記モジュール数が不適当で上記文字変換が不可
能な場合は、1文字中に含まれる各バーのモジュール数
を、各黒、白バー同志の差のモジュール数の組合せに基
づいて補正した後に、上記文字変換を行うようにしたこ
とにより、バーコード自体の印刷精度の悪さ、或いはバ
ーコードペンで走査する際の走査速度変化等に起因する
黒バーの太り、細りの影響をなくし、読取り率の著しい
向上及び誤読率の著しい低減を可能にしたものである。DETAILED DESCRIPTION OF THE INVENTION [Outline] The present invention relates to a bar code demodulation system for demodulating a bar code composed of a plurality of black and white bars having different numbers of modules. The bar code is converted into characters based on the number of modules obtained by using the corrected optimal basic module value, and if the number of modules is inappropriate and the above character conversion is impossible, one character By correcting the number of modules of each bar included based on the combination of the number of modules of the difference between each black and white bar, by performing the above character conversion, poor printing accuracy of the bar code itself, or Eliminating the effects of thick and thin black bars caused by changes in scanning speed when scanning with a barcode pen, it is possible to significantly improve the reading rate and significantly reduce the misreading rate. Than it is.
本発明は、バーコード読取り装置に使用されるバーコー
ド復調方式に係り、特にはUPC/EAN/JANコード等のよう
に、モジュール数の異なる複数の黒、白バーからなるバ
ーコードを復調するバーコード復調方式に関する。The present invention relates to a bar code demodulation method used in a bar code reader, and particularly to a bar code demodulating bar code composed of a plurality of black and white bars having different numbers of modules such as UPC / EAN / JAN code. It relates to a code demodulation method.
例えば、上記UPC/EAN/JANコードを構成する黒、白バー
幅は、基本モジュール(単一のモジュール)の1,2,3,4
倍の4種類あるため、バーコード印刷時のインクのにじ
み等によるバー幅の誤差が生じているような場合、これ
を手操作のバーコードペンで正確に読取って復調するこ
とは大変困難であり、読取り率の向上及び誤読率の低減
は大きな技術的課題となっている。For example, the black and white bar widths that make up the above UPC / EAN / JAN code are 1,2,3,4 of the basic module (single module).
Since there are four types, it is very difficult to accurately read and demodulate this with a manual barcode pen if there is an error in the bar width due to ink bleeding during barcode printing. The improvement of read rate and the reduction of erroneous read rate are major technical issues.
上記UPC/EAN/JANコードに対して適用された従来のバー
コード復調方式において、上記誤差の影響をなくすため
の手段としては、ある1文字に対応するバー群の復調が
終了したら、上記バー群の合計黒バー幅とその標準値と
をレジスタに記憶しておき、次のバー群の各黒バー幅を
上記レジスタの内容に基づいて修正し、この修正された
黒バー幅に従って上記次のバー群の復調を行うようにし
たものが提案されている(特開昭57−191783参照)。In the conventional bar code demodulation method applied to the UPC / EAN / JAN code, as a means for eliminating the influence of the above error, after demodulating the bar group corresponding to a certain character, the bar group The total black bar width of and the standard value thereof are stored in a register, each black bar width of the next bar group is corrected based on the contents of the above register, and the next black bar width is corrected according to the corrected black bar width. A device for demodulating a group has been proposed (see Japanese Patent Application Laid-Open No. 57-191783).
上記従来のバーコード方式であっても、黒バーの太り、
細りの影響を十分になくすことはできず、よって読取率
が少し劣ったり、或いは誤読の問題を生じていた。Even with the above conventional bar code method, the fatness of the black bar,
It was not possible to sufficiently eliminate the influence of thinning, so that the reading rate was slightly inferior or the problem of erroneous reading occurred.
本発明は上記問題点に鑑み、読取り率の著しい向上と誤
読率の著しい低減を可能にしたバーコード復調方式を提
供することを目的とする。SUMMARY OF THE INVENTION In view of the above problems, it is an object of the present invention to provide a bar code demodulation system capable of significantly improving the reading rate and significantly reducing the erroneous reading rate.
本発明のバーコード復調方式は、まず第1の復調を実行
し、これが不可能な場合に第2の復調を実行するように
している。即ち、まず黒バー、白バーのそれぞれについ
て1つ前のバーから得られた基本モジュール値(基本と
なる単一モジュールの幅)に基づいてモジュール数(バ
ーに含まれる上記基本モジュールの数)を得る。そし
て、このモジュール数と実際に読取られたバー幅とに基
づき上記基本モジュール値を修正して新たな基本モジュ
ール値を求め、この新たな基本モジュール値に基づいて
次のバーのモジュール数を得るようにする。このように
して、順次各バーのモジュール数を求めていき、これら
のモジュール数に基づいてバーコードを文字に変換す
る。In the bar code demodulation method of the present invention, first the first demodulation is executed, and when this is impossible, the second demodulation is executed. That is, first, the number of modules (the number of the basic modules included in the bar) is calculated based on the basic module value (width of a basic single module) obtained from the previous bar for each of the black bar and the white bar. obtain. Then, the basic module value is corrected based on this module number and the bar width actually read to obtain a new basic module value, and the module number of the next bar is obtained based on this new basic module value. To In this way, the number of modules of each bar is sequentially obtained, and the bar code is converted into a character based on the number of modules.
ここまでが第1の復調であり、もし上記のようにして得
られたモジュール数が不適当で上記文字変換が不可能な
場合には、以下の第2の復調を実行する。The above is the first demodulation, and if the number of modules obtained as described above is inappropriate and the character conversion cannot be performed, the following second demodulation is executed.
まず、1文字を構成する黒バー、白バーのそれぞについ
て各バー同志の差のモジュール数を得る。そして、この
ような差のモジュール数の組合せに基づいて各バーのモ
ジュール数を判断し、これらのモジュール数に基づいて
上記文字変換を行う。First, for each of the black bar and the white bar that make up one character, the module number of the difference between the bars is obtained. Then, the number of modules of each bar is determined based on the combination of such difference module numbers, and the character conversion is performed based on these module numbers.
上記第1の復調において、黒バー、白バーのそれぞれに
ついて、各バー毎に得られる順次修正された新たな基本
モジュール値は、黒バーの太り、細りの状態を考慮に入
れた最適な基本モジュール値となる。従って、このよう
な最適な基本モジュール値に基づいて得られる各バーの
モジュール数は非常に正確なものとなり、よってこのよ
うな正確なモジュール数に基づいて復調が行われるの
で、読取り率は向上し、誤読率は低減する。In the first demodulation, for each of the black bar and the white bar, the sequentially corrected new basic module value obtained for each bar is the optimum basic module considering the thick and thin states of the black bar. It becomes a value. Therefore, the number of modules of each bar obtained based on such an optimum basic module value is very accurate, and demodulation is performed based on such an accurate number of modules, so that the reading rate is improved. , The misreading rate is reduced.
また、第2の復調において、1文字中の黒、白バーのそ
れぞれについて各バー同志の差のモジュール数を得るよ
うにしたので、バーの太り、細りの誤差が相殺されてゼ
ロになり、上記差のモジュール数にはバーの太り、細り
の影響は全く現れない。また、1文字に含まれ得る黒、
白バーのモジュール数の組合せは決まっているため、上
記差のモジュール数の黒白の組合せが決まれば、黒、白
バーのそれぞれのモジュール数が決り、このモジュール
数から各バーのモジュール数を知ることができる。この
ようにして得られる各バーのモジュール数も、上記差の
モジュール数と同じくバーの太り、細りの影響のない、
非常に正確なものとなる。Further, in the second demodulation, since the number of modules of the difference between each bar is obtained for each of the black bar and the white bar in one character, the error of the fatness and the thinness of the bar is canceled and becomes zero. The difference in the number of modules is not affected by the thick or thin bar. Also, black that can be included in one character,
Since the combination of the number of modules of the white bar is fixed, if the combination of black and white of the number of modules of the above difference is determined, the number of each module of black and white bar is determined, and the number of modules of each bar should be known from this You can The number of modules of each bar obtained in this way is also the same as the number of modules of the above difference, without the influence of the thick and thin bars,
It will be very accurate.
このように本発明では、第1の復調だけでも読取り率を
高く、かつ誤読率を低くできるわけであるが、第1の復
調ができない時には、不適当なモジュール数を修正して
第2の復調を実行することによる、読取り率の著しい向
上と誤読率の著しい低減が可能になる。As described above, according to the present invention, the read rate can be increased and the misread rate can be reduced by only the first demodulation. However, when the first demodulation cannot be performed, an inappropriate number of modules is corrected and the second demodulation is performed. By executing the above, it is possible to significantly improve the read rate and significantly reduce the misread rate.
以下、本発明の実施例について、図面を参照しながら説
明する。Hereinafter, embodiments of the present invention will be described with reference to the drawings.
第1図は、本発明の一実施例に係るバーコード復調方式
を適用したバーコードリーダの内部構成を示すブロック
図である。FIG. 1 is a block diagram showing an internal configuration of a bar code reader to which a bar code demodulating method according to an embodiment of the present invention is applied.
同図において、光電変換部1は例えばバーコードペン等
からなり、バーコード上を走査して光信号を得、これを
電気信号に変換する手段である。アナログデジタル変換
部2は、光電変換部1から出力されたアナログ信号をデ
ジタル信号に変換する手段である。このデジタル信号
は、上記バーコードを構成する各黒、白バーの幅に対応
した長さを持つ、それぞれ「1」、「0」のステップ状
の信号となっている。信号変換部3は、上記黒、白に対
応する「1」、「0」のデジタル信号における「1」、
「0」の変化点でパルス信号を作成すると共に、それぞ
れに対応する黒白信号を出力する手段である。ここで得
られたパルス信号の時間間隔は、上記黒、白バーの幅に
対応する。In the figure, the photoelectric conversion unit 1 is composed of, for example, a bar code pen or the like, and is means for scanning the bar code to obtain an optical signal and converting the optical signal into an electric signal. The analog-digital conversion unit 2 is a unit that converts the analog signal output from the photoelectric conversion unit 1 into a digital signal. This digital signal is a step-like signal of "1" and "0", respectively, having a length corresponding to the width of each black and white bar which constitutes the above bar code. The signal conversion unit 3 uses “1” in the digital signals of “1” and “0” corresponding to the black and white,
It is a means for producing a pulse signal at a change point of "0" and outputting a black and white signal corresponding to each. The time interval of the pulse signal obtained here corresponds to the width of the black and white bars.
このようにしてパルス信号及び黒白信号に変換されたバ
ーコードは、データバス4を介して、復調が実行され
る。この復調は、タイマカウンタ部5及びメモリ部(RA
M)6を用い、メモリ部(ROM)7内のマイクロプログラ
ムに基づき、主制御部(CPU)8の制御によって行う。
なお、回線制御部9によってバーコード読取データは外
部の親機へ送信されると共に、電源部10によって各ブロ
ックへの電源供給を行っている。The bar code converted into the pulse signal and the black and white signal in this way is demodulated via the data bus 4. This demodulation is performed by the timer counter unit 5 and the memory unit (RA
M) 6 and is controlled by the main control unit (CPU) 8 based on the microprogram in the memory unit (ROM) 7.
The line control unit 9 transmits the bar code read data to an external parent device, and the power supply unit 10 supplies power to each block.
以下に、本実施例に係るバーコード復調方式を具体的に
説明する。本実施例では、まず第1の復調(第2図)を
実行し、これが不可能な時には第2の復調(第3図)を
実行するようにしている。なおここでは、第7図に示し
たようなバーコード(例えばUPCコード)が、光電変換
部1の走査に従って順次入力された場合について述べ
る。The bar code demodulation method according to this embodiment will be specifically described below. In this embodiment, the first demodulation (Fig. 2) is first executed, and when this is impossible, the second demodulation (Fig. 3) is executed. Note that, here, a case will be described in which the bar codes (for example, UPC code) shown in FIG. 7 are sequentially input according to the scanning of the photoelectric conversion unit 1.
第2図において、第1の復調を具体的に説明する。まず
ステップa1において、上記バーコードの先頭部分にある
レフトガードバーを構成する単一モジュールの白、黒バ
ーW0,B0の幅(実際は、タイマカウント部5によって時
間値に換算されている)を、それぞれ白、黒の基本モジ
ュール値WM0,BM0とする。そして、次の1文字(例えば
「9」)を構成している最初の白バーW1のモジュール数
m1(整数)を、上記基本モジュール値WM0に基づいて求
める(ステップa2)。具体的には、白バーW1の幅TW1を
基本モジュール値WM0で割り、これによって得られた値
(TW1/WM0)に最も近い整数値を上記モジュール数m1と
する。例えばTW1/WM0の値が2.5以上3.5未満であれば、
モジュール数m1を3と判断する。続いて、このようにし
て得られたモジュール数m1と実際に読取られた白バーW1
の幅TW1とに基づいて、上記(1つ前のバー)の基本モ
ジュール値WM0を修正し、新たな基本モジュール値WM1を
求める(ステップa3)。具体的には、以下の式に基づい
て行う。The first demodulation will be specifically described with reference to FIG. First, in step a 1 , the width of the white and black bars W 0 and B 0 of the single module that constitutes the left guard bar at the beginning of the bar code (actually, it is converted into a time value by the timer count section 5). Are the basic module values WM 0 and BM 0 for white and black, respectively. And the number of modules of the first white bar W 1 that makes up the next 1 character (for example, “9”)
m 1 (an integer) is obtained based on the basic module value WM 0 (step a 2 ). Specifically, the width T W1 of the white bar W 1 is divided by the basic module value WM 0 , and the integer value closest to the value (T W1 / WM 0 ) obtained by this is taken as the module number m 1 . For example, if the value of T W1 / WM 0 is 2.5 or more and less than 3.5,
The number of modules m 1 is judged to be 3. Then, the number of modules m 1 thus obtained and the white bar W 1 actually read
On the basis of the width T W1 of the above, the basic module value WM 0 of the above (one bar before) is corrected to obtain a new basic module value WM 1 (step a 3 ). Specifically, it is performed based on the following formula.
次に、次の白バーW2のモジュール数m2(整数)を1つ前
の白バーW1から得られた基本モジュール値WM1に基づい
て上記ステップa2と同様にして求める(ステップa4)。
続いて上記ステップa3と同様に、モジュール数m2と白バ
ーW2の幅Tw2とに基づき、1つ前のバーの基本モジュー
ル値WM1を修正し、新たな基本モジュール値WM2を求める
(ステップa5)。 Next, the module number m 2 (integer) of the next white bar W 2 is obtained based on the basic module value WM 1 obtained from the previous white bar W 1 in the same manner as in step a 2 above (step a 4 ).
Subsequently in the same manner as in step a 3, based on the width Tw 2 module number m 2 and white bars W 2, and correction of the previous one bar basic module value WM 1 of the new basic module value WM 2 seek (step a 5).
上記の処理によって、1文字中の白バーW1,W2のそれぞ
れのモジュール数m1,m2が得られたら、次は黒バーB1,B2
についても、黒バーに関するデータを基に上記ステップ
a2〜a5と同様の処理を実行することにより、それぞれの
モジュール数を求める(ステップa6)。When the number of modules m 1 and m 2 of the white bars W 1 and W 2 in one character is obtained by the above processing, the black bars B 1 and B 2 are next.
Also for the above, based on the data on the black bar
By performing the same processing as a 2 ~a 5, obtains the number of each module (step a 6).
このようにして、1文字中の白バーW1,W2及び黒バーB1,
B2のそれぞれのモジュール数が全て得られたら、これら
のモジュール数が適当かどうか、例えば上記それぞれの
モジュール数の合計が所定のモジュール数(例えば7モ
ジュール)になっているかどうか等を判断する(ステッ
プa7)。なお、UPC/EAN/JANコードのような4値レベル
のバーコードは、1文字当りそれぞれ2本の黒、白バー
からなり、各バーは1〜4モジュールで、全体で7モジ
ュールとなるように構成されているので、上記モジュー
ル数が適当かどうかの判断は、上記の例に限らず色々と
考えられる。ステップa7においてモジュール数が適当で
あると判断されたときには、バーW1,B1,W2,B2からなる
コードを上記モジュール数に基づき既知の方法で文字に
変換し、一方、不適当であると判断されたときには、後
述する第2の復調を実行する。In this way, the white bars W 1 , W 2 and the black bar B 1 ,
When all the numbers of the respective modules of B 2 are obtained, it is judged whether or not the numbers of these modules are appropriate, for example, whether or not the total number of the respective modules is a predetermined number of modules (for example, 7 modules) ( Step a 7 ). A four-level bar code such as the UPC / EAN / JAN code consists of two black and white bars for each character, and each bar has 1 to 4 modules, making a total of 7 modules. Since it is configured, the determination as to whether the number of modules is appropriate is not limited to the above example, but various determinations can be made. When the number of modules is determined to be appropriate in step a 7, a code consisting of bars W 1, B 1, W 2 , B 2 is converted to a character in a known manner based on the number of the module, whereas, unsuitable If it is determined that, the second demodulation described below is executed.
以上のような1文字毎の復調を、バーコードの左側のデ
ータ(センターコードよりも左側のデータ)が終了する
まで、順次繰返し行う(ステップa2〜a8)。また、セン
ターガードバーとバーコードの右側のデータについて
も、順次計算して得られる基本モジュール値をひきつづ
き用いて同様な方式にて復調を行っていく。1 demodulation of each character as described above, to the left of the data of the bar code (the left of the data than the center cord) is finished, sequentially repeated (Step a 2 ~a 8). The center guard bar and the data on the right side of the bar code are also demodulated in the same manner by continuously using the basic module value obtained by sequential calculation.
次に、第3図に基づき、第2の復調を具体的に説明す
る。なおここでは、第7図に示した1文字(黒バーB1,B
2及び白バーW1,W2)の復調について述べる。Next, the second demodulation will be specifically described with reference to FIG. In addition, here, one character shown in FIG. 7 (black bar B 1 , B
2 and white bar W 1 , W 2 ) demodulation is described.
まずステップb1において、1文字中に存在する黒バー
B1,B2のそれぞれの幅TB1,TB2同志の差DB(=|TB1−T
B2|)を求める。それと共に、上記の幅TB1,TB2の和AB
(=TB1+TB2)と幅TW1,TW2の和AW(=TW1+TW2)も求
めておく(これらの和は、後述するステップc9〜c12で
使用される)。続いてステップb2に進み、上記の幅TB1,
TB2,TW1,TW2を全て加え、これを1文字中の全モジュー
ル数(例えば「7」)で割ることにより、上記1文字に
ついての基本モジュール値RM0を求める。次のステップb
3では、上記ステップb1で得られた黒、白バー同志の差D
B,DWを、上記ステップb2でえられた基本モジュール値RM
0で割ることにより、上記の差DB,DWのそれぞれのモジュ
ール数mB,mW(整数)を得る。First, in step b 1 , the black bar present in one character
Width of B 1 and B 2 T B1 and T B2 Difference DB (= | T B1 −T
B2 |). At the same time, the sum AB of the above widths T B1 and T B2
(= T B1 + T B2 ) and the sum AW (= T W1 + T W2 ) of the widths T W1 and T W2 are also obtained (these sums are used in steps c 9 to c 12 described later). Proceeding to step b 2, the upper width T B1,
All of T B2 , T W1 and T W2 are added, and this is divided by the total number of modules in one character (for example, “7”) to obtain the basic module value RM 0 for the one character. Next step b
In 3 , the difference D between the black and white bars obtained in step b 1 above
B and DW are the basic module values RM obtained in step b 2 above.
By dividing by 0 , the numbers of modules m B and m W (integers) of the above differences DB and DW are obtained.
ここで、1文字に含まれるそれぞれ2本ずつの黒、白バ
ーのモジュール数(1〜4)には特定の組合せしかない
ので、それらの差のモジュール数mB,mWも特定の組合せ
しか持たない。この組合せの一例を第5図に示す。同図
において、四角で囲まれた数が差のモジュール数を示
し、( )内の数が黒もしくは白毎の各バーの合計のモ
ジュール数を示しており、黒バーと白バーとの間で結ば
れたそれぞれの線は、互いに可能な組合せを表してい
る。同図を見れば、上記差のモジュール数「mB,mW」の
組合せが「0,3」,「1,2」,「2,1」,「3,0」の場合
に、黒、白毎の合計のモジュール数「2,5」,「3,4」,
「4,3」,「5,2」とそれぞれ1対1に対応しているのが
わかる。ただし、差のモジュールの組合せが「0,1」,
「1,0」の場合には、合計のモジュール数「4,3」もしく
は「2,5」のいずれか、「3,4」もしくは「5,2」のいず
れかにそれぞれ対応し、1対1には対応しない。これら
の対応関係を第6図に示した。Here, since there are only specific combinations for the number of modules (1 to 4) of two black and white bars included in one character, respectively, the number of modules m B and m W of those differences is also a specific combination. do not have. An example of this combination is shown in FIG. In the figure, the number surrounded by a square indicates the number of modules of difference, and the number in () indicates the total number of modules of each bar for each black or white, and between the black bar and the white bar. Each line connected represents a possible combination with each other. As shown in the figure, when the combination of the number of modules “m B , m W ” of the difference is “0,3”, “1,2”, “2,1”, “3,0”, black, Total number of modules for each white "2,5", "3,4",
It can be seen that there is a one-to-one correspondence with "4,3" and "5,2". However, the combination of difference modules is "0,1",
In the case of "1,0", it corresponds to either "4,3" or "2,5" of the total number of modules, or "3,4" or "5,2" respectively. Does not correspond to 1. The correspondence between these is shown in FIG.
そこで、上記の組合せ及び対応関係に基づき、ステップ
b4で黒バー、白バー毎の基本モジュール値MB,MWを求め
る。このステップb4における具体的な処理の一例を、第
4図に基づき以下に説明する。Therefore, based on the above combination and correspondence, step
At b 4 , basic module values M B and M W for each black bar and white bar are obtained. An example of a specific process in step b 4, described below based on Figure 4.
まず、ステップc1において、上記差のモジュール数
「mB,mW」の組合せを判断し、第6図に基づき以後のス
テップを決定する。First, in step c 1 , the combination of the difference module numbers “m B , m W ” is determined, and the subsequent steps are determined based on FIG. 6.
上記組合せが「3,0」,「0,3」,「1,2」,「2,1」の場
合には、それぞれステップc9,c10,c11,c12に進む。ステ
ップC9では、第6図に示したように差のモジュール数
「3,0」の組合せに対応して得られる黒、白毎の合計の
モジュール数5,2で、前述したステップb1において予め
求められた黒、白毎の幅の和AB,AWをそれぞれ割ること
により、黒、白毎の基本モジュール値MB,MWを求める。
ステップc10〜c12においても、第6図に基づき、各組合
せに従って上記ステップc9と同様な処理を行うことによ
り、基本モジュール値MB,MWを得る。The combination is "3,0", the case of "0,3", "1,2", "2,1", respectively proceeds to step c 9, c 10, c 11 , c 12. In step C 9, black obtained corresponding to combinations of the number of modules "3,0" of the difference as shown in Figure 6, the module number 5,2 of the total of each white, in step b 1 described above The basic module values M B , M W for each black and white are obtained by dividing the sum AB, AW of the widths for each black and white obtained in advance.
Also in step c 10 to c 12, on the basis of FIG. 6, by performing the same processing as that in step c 9 according each combination to obtain the basic module value M B, M W.
一方、ステップc1において差のモジュール数「mB,mW」
の組合せが「0.1」もしくは「1,0」の場合には、いずれ
もステップc2に進む。ステップc2では、上記差のモジュ
ール数が「0」である方のバー(黒バーもしくは白バ
ー)を選び、これらのバーの幅を見て太り気味か否かを
調べる(ステップc3)。バーが太り気味であればステッ
プc4に進み、バーが太り気味でなければステップc5に進
む。ステップc4では2本のバーの中から、より細い方
(すなわち太りの影響の少ない方)のバーを選び出し、
ステップc5では2本のバーの中から、より太い方(すな
わち細りの影響の少ない方)のバーを選び出す。このよ
うにして得られた1本の黒バーもしくは白バーのモジュ
ール数は、第5図から明らかなように、1か2である。
そこで、1か2を判断するために、上記バーの幅を基本
モジュール値RM0(ステップb2参照)と比較し、変化が
ないかどうかで判断する(ステップc6)。変化がなけれ
ば(すなわちモジュール数が1であれば)ステップc7に
進み、ここでバーが黒か否かを知るとによって、上記
黒、白毎の合計のモジュール数が「2,5」か「5,2」かが
わかるので、この結果の応じて上述したステップc10,c9
に進む。一方、ステップc6において変化があれば(すな
わちモジュール数が2であれば)ステップc8に進み、こ
こでバーが白か否かを知ることによって、同様に黒、白
毎の合計のモジュール数が「3,4」か「4,3」かがわかる
ので、この結果に応じてステップc11,c12に進む。On the other hand, in step c 1 , the difference module number "m B , m W "
If the combination is “0.1” or “1,0”, the process proceeds to step c 2 . In step c 2, select bar (black bar or white bars) towards the number of modules of the difference is "0", it is checked whether overweight watching the width of these bars (step c 3). If the bar is overweight, go to step c 4 , and if the bar is not overweight, go to step c 5 . In step c 4 , select the thinner bar (that is, the one with less influence of weight gain) from the two bars,
In step c 5 , the thicker bar (that is, the one with less influence of thinning) is selected from the two bars. The number of modules of one black bar or white bar thus obtained is 1 or 2, as is clear from FIG.
Therefore, in order to judge 1 or 2, the width of the bar is compared with the basic module value RM 0 (see step b 2 ) to judge whether there is any change (step c 6 ). If there is no change (i.e. the number of modules it if 1) the process proceeds to step c 7, wherein the the bar know whether black or the black, the number of modules in total for each white "2,5" since "5,2" Kagawakaru, step c 10, c 9 described above in accordance with the result
Proceed to. On the other hand, if there is a change in step c 6 (that is, if the number of modules is 2), the process proceeds to step c 8 , where it is also known whether the bar is white or not. Since it is known whether is “3,4” or “4,3”, the process proceeds to steps c 11 and c 12 according to this result.
このようにして、上記ステップc1〜c12により、1文字
中の黒バー、白バー毎の基本モジュール値MB,MWが得ら
れる。次に第3図に戻り、ステップb5において、上記基
本モジュール値MB,MWを、1つ前の文字について得られ
た古い基本モジュール値(旧MB,旧MW)と比べて、互い
に連続性があるかどうか(例えば1.6倍以内かどうか)
をチェックする。連続性がなければ復調エラーとしてエ
ラー処理を行い、連続性があれば次のステップb6〜b9に
移る。ステップb6,b7では、上記白バーの基本モジュー
ル値MWに基づいて、それぞれ白バーW1,W2のモジュール
数を求める。具体的には、それぞれ白バーW1,W2の幅
TW1,TW2を基本モジュール値MWで割り、その値に最も近
い整数値をそれぞれ白バーW1,W2のモジュール数とす
る。なおこの時第1の復調のような基本モジュール値の
修正のための計算は行わない。ステップb8,b9でも、黒
バーの基本モジュール値MBに基づいて、上記ステップ
b6,b7と同様にして黒バーB1,B2のそれぞれのモジュール
数を求める。最後に、これらのモジュール数が適当かど
うかを、前述したステップa7と同様にして判断し(ステ
ップb10)、不適当な場合はエラー処理に移り、適当で
あると判断された場合は、バーW1,B1,W2,B2からなるコ
ードを上記モジュール数に基づき既知の方法で文字に変
換する。その後は、第2図に戻って次の文字に復調に移
る。In this way, the basic module values M B and M W for each black bar and white bar in one character are obtained by the above steps c 1 to c 12 . Next, returning to FIG. 3, in step b 5 , the basic module values M B and M W are compared with the old basic module values (old M B , old M W ) obtained for the preceding character, Whether or not they are continuous (for example, within 1.6 times)
Check. Without continuity error processing is performed as a demodulation error, and proceeds to the next step b 6 ~b 9 if there is continuity. In step b 6, b 7, based on the basic module value M W of the white bar, respectively determine the number of modules white bar W 1, W 2. Specifically, the width of each white bar W 1 , W 2
T W1 and T W2 are divided by the basic module value M W , and the integer values closest to that value are taken as the module numbers of the white bars W 1 and W 2 , respectively. At this time, the calculation for correcting the basic module value like the first demodulation is not performed. Also in steps b 8 and b 9 , the above steps are performed based on the basic module value M B of the black bar.
The module numbers of the black bars B 1 and B 2 are calculated in the same manner as b 6 and b 7 . Finally, it is judged whether the number of these modules is appropriate in the same manner as in step a 7 described above (step b 10 ). If not, the error process is started. A code consisting of bars W 1 , B 1 , W 2 , B 2 is converted into a character by a known method based on the number of modules. After that, returning to FIG. 2, the demodulation is started for the next character.
以上のようにして、本実施例では第1の復調、もしくは
それに加えて第2の復調が行われる。第1の復調におい
て、黒バー、白バーのそれぞれについて、順次修正され
た新たな基本モジュール値が各バー毎に得られるので
(ステップa1,a3,a5)、この基本モジュール値は黒バー
の太り、細りの状態を考慮に入れた最適な値となる。よ
って、このような最適な基本モジュール値に基づいて得
られる各バーのモジュール数(ステップa2,a4)は、非
常に正確なものとなる。従って、このような正確なモジ
ュール数に基づいた復調が可能になるので、読取り率の
向上と誤読率の低減を実現することができる。As described above, the first demodulation or the second demodulation in addition to the first demodulation is performed in this embodiment. In the first demodulation, a new basic module value that is sequentially corrected for each of the black bar and the white bar is obtained for each bar (steps a 1 , a 3 , a 5 ), so this basic module value is black. It is the optimal value that takes into consideration the fatness and thinness of the bar. Therefore, the number of modules of each bar (steps a 2 and a 4 ) obtained based on such an optimum basic module value becomes very accurate. Therefore, demodulation based on such an accurate number of modules becomes possible, so that the reading rate can be improved and the erroneous reading rate can be reduced.
また、第2の復調において、ステップb1で各黒、白バー
同志の差DB,DWを求めているが、このようにすることに
より、各バーの太り、細りの誤差を互いに相殺すること
ができるので、上記の差は太り、細りの影響を全く受け
ない。更に、ステップb2で1文字中の黒バーと白バーと
を全て加えているので、ここでもやはり黒、白の太り細
りが相殺された基本モジュール値RM0が得られる。これ
らのことから、これらの値に基づいてステップb3で得ら
れる差のモジュール数mB,mWも、バーの太り、細りの影
響を全く受けることがない。よって、これら差のモジュ
ール数に基づいて得られる各バーのモジュール数も、バ
ーの太り、細りの影響のない非常に正確なものとなる。
従って、このような非常に正確なモジュール数に基づい
た復調により、読取り率の一層の向上と誤読率の一層の
低減を実現することができる。Also, in the second demodulation, the difference DB, DW between the black and white bars is obtained in step b 1 , but by doing so, the fat and thin errors of the bars can be canceled out from each other. Therefore, the above difference is not affected by the fatness and the thinness at all. Furthermore, since all added the black bar and white bar 1 in the character in step b 2, Again black, the basic module value RM 0 to thickening thinning was offset white obtained. From these facts, the module numbers m B and m W of the difference obtained in step b 3 based on these values are not affected by the thickening or thinning of the bar at all. Therefore, the number of modules of each bar obtained based on the number of modules of these differences is also very accurate without the influence of the thick or thin bar.
Therefore, by the demodulation based on such a very accurate number of modules, it is possible to further improve the reading rate and further reduce the erroneous reading rate.
このように本実施例では、まず第1の復調を実行し、も
しこの復調がバーコードペン走査速度変化等の影響によ
り不可能である場合には、リトライ処理により各バーの
モジュール数を補正して第2の復調を実行するようにし
たことにより、読取り率を著しく向上させることができ
ると共に、誤読率を著しく低減させることができる。As described above, in this embodiment, first, the first demodulation is executed, and if this demodulation is impossible due to the influence of the change in the scanning speed of the barcode pen, the number of modules of each bar is corrected by the retry process. By executing the second demodulation by using the second demodulation, the reading rate can be remarkably improved and the erroneous reading rate can be remarkably reduced.
本発明のバーコード復調方式によれば、バーコード自体
の印刷精度の悪さ、或いはバーコードペンで走査する際
の走査速度変化等に起因する、黒バーの太り、細りの影
響をなくし、読取り率の著しい向上と誤読率の著しい低
減とが可能になる。According to the bar code demodulation method of the present invention, the influence of the thick and thin black bars due to the poor printing accuracy of the bar code itself or the change in the scanning speed when scanning with the bar code pen is eliminated, and the reading rate is reduced. Can be significantly improved and the misreading rate can be significantly reduced.
第1図は本発明の一実施例を適用したバーコードリーダ
の内部構成を示すブロック図、 第2図は同実施例に係る第1の復調を示すフローチャー
ト、 第3図は同実施例に係る第2の復調を示すフローチャー
ト、 第4図は第3図中のステップb4の具体例を示すフローチ
ャート、 第5図は第3図中のステップb3で得られた差のモジュー
ル数の組合せの一例を示す図、 第6図は上記差のモジュール数の組合せと、黒、白毎の
合計のモジュール数との対応関係を示す図、 第7図はモジュール数の異なる複数の黒、白バーからな
るバーコード(例えばUPCコード)の一例を示す図であ
る。 W0,W1,W2……白バー、 B0,B1,B2……黒バー、 WM0,WM1,WM2……白バーの基本モジュール値、 m1,m2……白バーのモジュール数、 mB……黒バー同志の差のモジュール数、 mW……白バー同志の差のモジュール数、 MB……黒バーの基本モジュール値、 MW……白バーの基本モジュール値.1 is a block diagram showing an internal configuration of a bar code reader to which an embodiment of the present invention is applied, FIG. 2 is a flow chart showing a first demodulation according to the embodiment, and FIG. 3 is related to the embodiment. FIG. 4 is a flow chart showing a second demodulation, FIG. 4 is a flow chart showing a specific example of step b 4 in FIG. 3, and FIG. 5 is a combination of the number of modules of the difference obtained in step b 3 in FIG. FIG. 6 is a diagram showing an example, FIG. 6 is a diagram showing a correspondence relationship between the combination of the number of modules having the above difference and the total number of modules for each black and white, and FIG. It is a figure which shows an example of the bar code (for example, UPC code). W 0 , W 1 , W 2 …… White bar, B 0 , B 1 , B 2 …… Black bar, WM 0 , WM 1 , WM 2 …… Basic module value of white bar, m 1 , m 2 …… Number of modules in white bar, m B …… Number of modules in difference between black bars, m W …… Number of modules in difference between white bars, M B …… Basic module value of black bar, M W …… of white bar Basic module value.
Claims (5)
らなるバーコードを読取って得られた各バーのモジュー
ル数に基づいて前記バーコードを文字に変換するバーコ
ード復調方式において、 黒バー、白バーのそれぞれについて、1つ前のバーから
得られた基本モジュール値に基づいてモジュール数を
得、該モジュール数及び実際に読取られたバー幅に基づ
き前記基本モジュール値を修正して新たな基本モジュー
ル値を求め、該新たな基本モジュール値に基づいて次の
バーのモジュール数を得るようにして、前記各バーのモ
ジュール数を順次得ていき、 該モジュール数が不適当で前記文字変換が不可能な場合
には、1文字を構成する黒バー、白バーのそれぞれにつ
いて各バー同志の差のモジョール数を得、該差のモジュ
ール数の組合せに基づいて前記各バーのモジュール数を
求め、該モジュール数に基づいて前記文字変換すること
を特徴とするバーコード復調方式。1. A bar code demodulation system for converting a bar code into a character based on the number of modules of each bar obtained by reading a bar code composed of a plurality of black and white bars having different numbers of modules. For each of the white bars, the number of modules is obtained based on the basic module value obtained from the previous bar, and the basic module value is modified based on the module number and the bar width actually read to obtain a new basic value. The module value is obtained, and the module number of the next bar is obtained based on the new basic module value. The module number of each bar is sequentially obtained. If possible, obtain the number of modules of the difference between each bar for each of the black bar and the white bar that form one character, and use the module number combination of the difference as the basis. There obtains the number of modules of each bar, the bar code demodulation method, wherein the character conversion based on the number of the module.
に読取られたバー幅を前記モジュール数で割った値を、
前記1つ前のバーから得られた基本モジュール値に加算
し、該加算値を2で割ることによって行うことを特徴と
する特許請求の範囲第1項記載のバーコード復調方式。2. The correction of the basic module value is a value obtained by dividing the bar width actually read by the number of modules,
The bar code demodulation system according to claim 1, wherein the basic module value obtained from the preceding bar is added and the added value is divided by two.
記各バー同志の幅の差を求めると共に、前記1文字中の
全ての黒及び白バーの幅の加算値を前記1文字中の所定
の全モジュール数で割って基本モジュール値を求め、該
基本モジュール値で前記幅の差を割って得ることを特徴
とする特許請求の範囲第1項または第2項記載のバーコ
ード復調方式。3. The number of modules of the difference between the bars is obtained by calculating the difference between the widths of the bars, and the added value of the widths of all the black and white bars in the one character is calculated in the one character. The bar code demodulation method according to claim 1 or 2, wherein the basic module value is obtained by dividing by a predetermined total number of modules, and the difference in the width is divided by the basic module value.
得られる前記各バーのモジュール数は、前記組合せに基
づいて黒、白バーのそれぞれの基本モジュール値を得、
該基本モジュール値で前記各バーの幅を割って求めるこ
とを特徴とする特許請求の範囲第1項乃至第3項のいず
れか1つに記載のバーコード復調方式。4. The number of modules of each bar obtained based on the combination of the number of modules of the difference obtains respective basic module values of black and white bars based on the combination,
The bar code demodulation method according to any one of claims 1 to 3, wherein the bar width is calculated by dividing the width of each bar by the basic module value.
バーのそれぞれの基本モジュール値が、1つ前の文字に
ついて得られた基本モジュール値と連続性がある場合だ
け、前記各バーのモジュール数を求めるようにしたこと
を特徴とする特許請求の範囲第4項記載のバーコード復
調方式。5. The bar module of each of the black and white bars obtained based on the combination is continuous only with the base module value of the preceding character. The bar code demodulating system according to claim 4, wherein the number of modules is obtained.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61301683A JPH0786904B2 (en) | 1986-12-19 | 1986-12-19 | Bar code demodulation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61301683A JPH0786904B2 (en) | 1986-12-19 | 1986-12-19 | Bar code demodulation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63155381A JPS63155381A (en) | 1988-06-28 |
| JPH0786904B2 true JPH0786904B2 (en) | 1995-09-20 |
Family
ID=17899878
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61301683A Expired - Fee Related JPH0786904B2 (en) | 1986-12-19 | 1986-12-19 | Bar code demodulation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0786904B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5800525B2 (en) | 2011-02-21 | 2015-10-28 | 株式会社オプトエレクトロニクス | Optical information reading apparatus, optical information reading method, computer-readable program, and recording medium |
| JP5341951B2 (en) * | 2011-05-30 | 2013-11-13 | 東芝テック株式会社 | Code reader and program |
| JP6114320B2 (en) * | 2015-02-16 | 2017-04-12 | 株式会社ウェルキャット | Code reading learning system |
-
1986
- 1986-12-19 JP JP61301683A patent/JPH0786904B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63155381A (en) | 1988-06-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA1101556A (en) | Label find method and circuit | |
| US4153897A (en) | Method and device for detecting the similarity between standard and unknown patterns | |
| EP0062777A2 (en) | OCR and bar code reader using area array | |
| US5537431A (en) | Method and apparatus for bar code reading and decoding | |
| US5451761A (en) | Bar code demodulating method | |
| CN110765804B (en) | Bar code hardware decoding IP core and decoding method | |
| JPS6224836B2 (en) | ||
| JPH0762858B2 (en) | Bar code reading method and device | |
| JP3548025B2 (en) | Barcode reader and method | |
| JPH0786904B2 (en) | Bar code demodulation method | |
| US5325398A (en) | Pulse count mode communication system | |
| CA2454308C (en) | Reading unit and marking card for optical mark reader | |
| AU2002324341A1 (en) | Reading unit and marking card for optical mark reader | |
| JPH07230522A (en) | Bar code demodulating method and apparatus | |
| CN201927043U (en) | One-dimensional barcode decoding chip | |
| JPH0239824B2 (en) | ||
| CN114527832A (en) | Pulse signal edge measuring method and device, storage medium and micro control unit | |
| JPH0470667B2 (en) | ||
| JPS5892066A (en) | Serial signal correcting system | |
| JPS58221467A (en) | Bar code reading system | |
| SU1181141A1 (en) | Analog-to-digital converter operating in residual class system | |
| JPS63155380A (en) | Bar code demodulating system | |
| JP3592432B2 (en) | Amplitude correction method of sine wave signal in encoder | |
| CN201927044U (en) | Bar code decoding chip | |
| JP2001005907A (en) | Barcode reader and storage medium |
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 |
|
| LAPS | Cancellation because of no payment of annual fees |