JP2500859B2 - Bar code reader - Google Patents

Bar code reader

Info

Publication number
JP2500859B2
JP2500859B2 JP61261557A JP26155786A JP2500859B2 JP 2500859 B2 JP2500859 B2 JP 2500859B2 JP 61261557 A JP61261557 A JP 61261557A JP 26155786 A JP26155786 A JP 26155786A JP 2500859 B2 JP2500859 B2 JP 2500859B2
Authority
JP
Japan
Prior art keywords
bar
width
code
bar code
reading
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
JP61261557A
Other languages
Japanese (ja)
Other versions
JPS63115282A (en
Inventor
達也 山本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
NipponDenso Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP61261557A priority Critical patent/JP2500859B2/en
Publication of JPS63115282A publication Critical patent/JPS63115282A/en
Application granted granted Critical
Publication of JP2500859B2 publication Critical patent/JP2500859B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は所定の記号を符号化し、光学反射率の異なる
線分を交互に並べ、各線分の幅の組合せで記録したバー
コードを読取るバーコード読取装置に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION [Industrial application] The present invention is a bar for encoding a predetermined symbol, alternately arranging line segments having different optical reflectances, and reading a bar code recorded in a combination of widths of the line segments. The present invention relates to a code reader.

〔従来の技術〕[Conventional technology]

従来より、光の反射率が異なる線分、例えば黒線と白
線とを交互に並べ、各黒線、白線の幅を変えて、その組
合せにより、符号化された記号を記録したバーコードな
るものが一般に知られている。
Conventionally, a line segment having different light reflectance, for example, a black line and a white line are alternately arranged, the width of each black line and a white line is changed, and the combination of them forms a bar code in which an encoded symbol is recorded. Is generally known.

そして、このバーコードを電子走査型や、手動走査
型、レーザースキャン型などの読取センサによって、そ
のバーコードの各バーの反射率と幅とに応じた電気信号
に変換し、この電気信号を処理することで、バーコード
に記録されている符号を読取るバーコード読取装置も一
般に知られている。
Then, this bar code is converted into an electric signal corresponding to the reflectance and width of each bar of the bar code by a scanning sensor such as an electronic scanning type, a manual scanning type, or a laser scanning type, and the electric signal is processed. By doing so, a bar code reading device for reading the code recorded in the bar code is also generally known.

このようなものの例として、NW−7と一般にいわれる
バーコード体系について述べる。NW−7では、特殊な例
として、第4図(a)に示すようにスタートコードの後
のキャラクタ間に、任意長さの空白を許容するセパレー
トタイプのものがある。これはスタートコード以後のデ
ータコードを、新たなデータコードを印刷したシールを
貼付することで任意に替えることができるように考慮さ
れたものである。第4図(a)の破線のようにシール4b
を貼付すると、そのシール4bの反射率が、シールを貼ら
れた表面の反射率より低いと、読取センサの出力波形、
およびこれを2値化した波形は、それぞれ第4図
(b),(c)のようになる。
As an example of such a thing, the bar code system generally called NW-7 is described. As a special example of NW-7, there is a separate type that allows a blank of an arbitrary length between characters after the start code as shown in FIG. 4 (a). This is so that the data code after the start code can be arbitrarily replaced by attaching a sticker on which a new data code is printed. Seal 4b as shown by the broken line in Fig. 4 (a)
If the reflectance of the sticker 4b is lower than the reflectance of the surface pasted with the sticker, the output waveform of the reading sensor,
Further, the binarized waveforms are as shown in FIGS. 4 (b) and 4 (c), respectively.

第4図(a),(b),(c)に示す如く、シール上
の最初の細黒バーが、ラベルの境界もしくは途中から始
まるような2値化波形が得られている。
As shown in FIGS. 4 (a), (b), and (c), a binarized waveform is obtained in which the first thin black bar on the seal starts at the label boundary or in the middle.

つまり、本来細黒バーとして検出されるべきところ
を、太黒バーとして検出してしまうのである。
In other words, what should be originally detected as a thin black bar is detected as a thick black bar.

さて、従来のバーコード読取装置で、太バーと細バー
との識別のためのしきい値は、2値化波形から得られる
各バーの幅のデータのうち、ひとつのキャラクタを表す
本数のデータと、あらかじめ定められた比率とに基づい
てしきい値を定めている。ここで、第4図(a),
(b),(c)に示すように、1本のバーが異常に太い
ものとして検出されると、前述のしきい値が本来定めら
れるべき値にならず、本来太バーとして認識されるべき
バーを細バーとして認識してしまうことがある。
Now, in the conventional bar code reader, the threshold value for distinguishing between the thick bar and the thin bar is the data of the number of one character representing the width of each bar obtained from the binarized waveform. And the threshold value is determined based on a predetermined ratio. Here, in FIG.
As shown in (b) and (c), when one bar is detected as an abnormally thick bar, the above-described threshold value does not reach the originally set value and should be recognized as a thick bar originally. Sometimes the bar is recognized as a thin bar.

NW−7の場合、特殊文字および数字のコード化はあら
かじめ、決められている。このうち、数字を表わすバー
コードの先頭のバーが前述の理由から異常に太くなる
と、従来の幅認識のしきい値では、先頭の黒バーのみを
太バーと判定してしまい、後の本来の太バーを細バーと
判定してしまう。このしきい値で、各バーの幅をデコー
ドすると、本来の数字とは異なる数字と対応するコード
となってしまう。
For NW-7, the encoding of special characters and numbers is predetermined. If the bar at the beginning of the bar code representing a number becomes abnormally thick for the above-mentioned reason, only the black bar at the beginning is judged to be a thick bar by the conventional width recognition threshold value, and the original bar after that is detected. The thick bar is judged as a thin bar. When the width of each bar is decoded with this threshold value, a code corresponding to a number different from the original number will be obtained.

例えば、第4図(a),(b),(c)の場合、本来
は、先頭バーが細バーで“0000011"となり、数字の“0"
と対応しているが、先頭バーが異常に太いバーとなる
と、“1000010"とデコードしてしまい、数字の“5"と対
応してしまう。
For example, in the case of FIGS. 4 (a), (b), and (c), originally, the leading bar is a thin bar, "0000011", and the number "0".
However, if the top bar becomes an abnormally thick bar, it will be decoded as "1000010" and will correspond to the number "5".

このような例は、NW−7に限らず、他のバーコード体
系についても起こることである。
Such an example occurs not only in NW-7 but also in other bar code systems.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

前述の従来の技術では、NW−7といわれるバーコード
体系のしかもセパレートタイプについて述べた。しか
し、ラベルを貼付したり、ラベルが汚れたりして、本来
のバー幅より太いバーとして電気信号化され、読取不良
となることは、NW−7に限らず、他のバーコード体系、
例えば2of5、3of9、JANなどでも起こり得ることであ
る。
In the above-mentioned conventional technique, the bar code system called NW-7 and the separate type has been described. However, it is not limited to NW-7 that a label is affixed or the label becomes dirty, and it becomes an electric signal as a bar thicker than the original bar width, resulting in a reading failure.
For example, 2of5, 3of9, and JAN can happen.

つまり、通常のバーコード体系では、スタートコード
とストップコードとが定められており、これらが認識さ
れなければ読取不良と判定される。しかし、従来の技術
で述べたように、セパレートタイプや、ラベルの貼替え
などのように、バーコードの使用法が多様化するにつ
れ、読取不良が発生することがある。
That is, in the normal bar code system, the start code and the stop code are defined, and if they are not recognized, it is determined that the reading is defective. However, as described in the related art, as the usage of the barcode is diversified, such as the separate type or the label replacement, the reading failure may occur.

前述の従来の技術で述べたように、本来記録されてい
る数字と異なる数字が認識されることは、バーコード読
取装置の信頼性を著しく低下させると共に、このバーコ
ード読取装置により、データ入力を行なうシステムの信
頼性をも低下させてしまう。
As described in the above-mentioned conventional technique, the recognition of a number different from the number originally recorded significantly deteriorates the reliability of the bar code reading device, and the bar code reading device allows data input. It also reduces the reliability of the system in place.

本発明は、このような読取不良による問題点に鑑み、
本来バー幅より太く検出されてしまうという原因に着目
して、この原因から発生する読取不良を充分な確かさで
検出することができるバーコード読取位置を提供し、バ
ーコード読取装置の読取結果の信頼性を向上しようとす
るものである。
The present invention has been made in view of the problems caused by such poor reading.
Focusing on the cause that it is originally detected to be thicker than the bar width, we provide a bar code reading position that can detect the reading failure that occurs due to this cause with sufficient certainty, and check the reading result of the bar code reading device. It aims to improve reliability.

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

本発明は、前述の目的を達成するために、第1図にそ
の構成を示すように、 複数のバーと該バーとバーとの隙間にできた複数のス
ペースとによって構成されたバーコードを、各バーの幅
と各スペースの幅とに応じた電気信号に変換する光電変
換手段と、 前記電気信号に変換された前記各バーの幅と前記各ス
ペースの幅とに応じて、前記バーコードを解読する読取
手段とを備えるバーコード読取装置において、 前記電気信号によって示される最小幅のバーの幅を求
め、この幅より若干大きい値を第1のしきい値とする演
算を行い、前記電気信号によって示されるスペースの幅
から第2のしきい値を演算する演算手段と、 前記第1のしきい値と比較して、第1のしきい値以下
の幅を有する前記バーの本数を検出する第1の検出手段
と、 前記第2のしきい値と比較して、第2のしきい値以上
の幅を有する前記スペースの本数を検出する第2の検出
手段と、 前記第1の検出手段及び前記第2の検出手段で検出さ
れた前記各本数が、バーコードの特定の規格に基づいて
設定された基準となる本数と一致するか否かを判定し、
前記各本数が共に前記基準となる本数と一致するとき前
記読取手段にて前記バーコードを解読させ、否のとき読
取不良信号を出力する判定手段とを備えるという技術的
手段を採用する。
In order to achieve the above-mentioned object, the present invention, as shown in the configuration in FIG. 1, includes a bar code composed of a plurality of bars and a plurality of spaces formed between the bars, Photoelectric conversion means for converting into an electric signal according to the width of each bar and the width of each space, according to the width of each bar converted into the electric signal and the width of each space, the bar code In a bar code reading device including a reading means for decoding, the width of the bar having the minimum width indicated by the electric signal is obtained, and a calculation is performed with a value slightly larger than this width as a first threshold value. Calculating means for calculating a second threshold value from the width of the space indicated by, and comparing with the first threshold value to detect the number of the bars having a width equal to or smaller than the first threshold value. A first detecting means; Second detection means for detecting the number of the spaces having a width equal to or larger than the second threshold, and detected by the first detection means and the second detection means. It is determined whether or not each of the above-mentioned numbers matches the number of reference lines set based on the specific standard of the barcode,
The technical means is provided which comprises: a determining means for causing the reading means to decode the bar code when both of the respective numbers match the reference number, and for outputting a reading failure signal when the bar code is negative.

〔作用〕[Action]

まず、バーコードは、あらかじめ定められた体系によ
り、そのバーの本数、バーの幅の比率、記号の符号化、
符号と対応するバーの種類、および、幅の種類の本数な
どが決められている。例えば、従来周知のものとして
は、2of5、NW−7(2of7)、code39(3of9)、JAN(PO
S)などと呼ばれるものがあり、それぞれ異なる体系で
ある。
First, the bar code is based on a predetermined system, the number of the bar, the ratio of the width of the bar, the encoding of the symbol,
The type of bar corresponding to the code and the number of types of width are determined. For example, as well-known ones, 2of5, NW-7 (2of7), code39 (3of9), JAN (PO
There is something called S), etc., and each has a different system.

本発明の構成を、第1図に示し、その作用を説明す
る。
The structure of the present invention is shown in FIG. 1 and its operation will be described.

本発明は、読取手段にて解読する前に、例えば従来技
術で述べたように、本来のバー幅より太いバーとしてノ
イズが検出されることによる読取不良を低減すべく、光
電変換手段からの電気信号のうち、上記ノイズを含まな
い最小幅のバーのみから第1のしきい値を演算により求
め、さらに、この第1のしきい値と比較して、第1のし
きい値以下の幅を有するバーの本数を検出し、この本数
がバーコードの特定の規格に基づいて設定された本数と
一致するか否かを判定する。これにより、バーが1本で
も本来の幅より太く検出されれば、それが読取不良の原
因となるノイズと判定して解読しないため、読取精度は
確実に向上する。
The present invention, before the decoding by the reading means, for example, as described in the prior art, in order to reduce the reading failure due to the detection of noise as a bar thicker than the original bar width, the electric power from the photoelectric conversion means is reduced. Of the signal, the first threshold value is calculated from only the bar having the minimum width not including the noise, and further compared with the first threshold value to determine the width equal to or smaller than the first threshold value. The number of bars that it has is detected, and it is determined whether or not this number matches the number set based on a specific bar code standard. As a result, if even one bar is detected thicker than the original width, it is determined that it is noise that causes reading failure and is not decoded, so the reading accuracy is reliably improved.

また一方で、バーとバーとの隙間にできたスペースに
関しても、スペースの電気信号から第2のしきい値を演
算により求め、この第2のしきい値と比較して、第2の
しきい値以上の幅を有する本数を検出して、これが特定
の規格に基づいて設定された本数と一致するか否かを判
定し解読の可否を判断する。そのため、読取精度はさら
に向上する。
On the other hand, regarding the space formed between the bars, the second threshold value is calculated from the electric signal of the space, and the second threshold value is compared with this second threshold value. The number of lines having a width equal to or larger than the value is detected, and it is determined whether or not this matches the number set based on a specific standard to determine whether or not decoding is possible. Therefore, the reading accuracy is further improved.

〔効果〕〔effect〕

以上述べたように本発明によれば、光電変換手段から
の電気信号中に本来のバー、スペースの幅と異なるバ
ー、スペースを示すような電気信号が誤って含まれたと
しても、読取性能を向上させることができるという優れ
た効果がある。
As described above, according to the present invention, even if the electric signal from the photoelectric conversion unit includes an original bar, a bar different from the width of the space, or an electric signal indicating the space by mistake, the reading performance is improved. It has an excellent effect that it can be improved.

〔実施例〕〔Example〕

以下、本発明を適用した一実施例について説明する。 An embodiment to which the present invention is applied will be described below.

本実施例は、NW−7(2of7)といわれるバーコード体
系のバーコードを読取るバーコード読取装置であり、し
かも、スタートコードとストップコードとの間の、キャ
ラクタコードの間に、任意の長さの空白部を許すセパレ
ートタイプをも読取るものである。
This embodiment is a bar code reading device for reading a bar code system bar code called NW-7 (2of7), and has an arbitrary length between character codes between a start code and a stop code. It also reads the separate type that allows the blank part of.

NW−7と呼ばれるバーコード体系では、0〜9の数字
の他、スタート、ストップコードとなる文字や、いくつ
かの特殊文字をキャラクタとして扱う。ひとつのキャラ
クタは、7bitのバイナリコードに符号化され、奇数bit
にはバー(B)が偶数ビットはスペース(S)が割当て
られ、“0"は細く(N)、“1"は太く(W)記録され
る。この太細の比率は、約1:2.5程度である。
In the bar code system called NW-7, in addition to the numbers 0 to 9, characters that are start and stop codes and some special characters are treated as characters. One character is encoded into a 7-bit binary code and odd-numbered bit
A space (S) is assigned to an even bit of a bar (B), and "0" is recorded thinly (N) and "1" is recorded thickly (W). This thick and thin ratio is about 1: 2.5.

数字キャラクタは、7bit中2bitを“1"として符号化さ
れ、太いバー(WB)は1本、細いバー(NB)は3本、太
いスペース(WS)は1本、細いスペース(NS)は2本で
記録される。
Numeric characters are coded with 2 bits out of 7 bits as "1". One thick bar (WB), three thin bars (NB), one thick space (WS), and two thin spaces (NS). Recorded in a book.

そして、各キャラクタの間には、細いスペース(NS)
あるいは、太いスペース(WS)のキャラクタギャップが
設けられる。
And a narrow space (NS) between each character
Alternatively, a thick space (WS) character gap is provided.

なお、以下の説明の中で、バーコードを構成するバー
とスペース、およびそれぞれの細いと太いは、上記の括
弧内の記号で述べる。
In the following description, the bar and the space that make up the bar code, and the thinness and the thickness of each, will be described by the symbols in the above parentheses.

なお、この実施例では、バーコードを構成するバー
は、上記のBとSとの双方である。
In this embodiment, the bar that constitutes the bar code is both B and S described above.

以下、実施例の構成を図面に基づいて説明する。 Hereinafter, the configuration of the embodiment will be described with reference to the drawings.

第2図は手持ち式のバーコード読取装置のセンサ部の
構成と、信号処理の流れとを示す構成図である。
FIG. 2 is a configuration diagram showing the configuration of the sensor unit of the handheld bar code reader and the flow of signal processing.

1はセンサ部であり、以下に述べる構成を備える。2
は光源に使用する高輝度の10個の赤色発光ダイオードか
らなる照明光源である。3は光散乱材で、赤色発光ダイ
オード2よりの照明光を散乱させて所定範囲にわたって
均一化している。4は記録媒体のラベルで、光学的情報
のバーコード5を印刷したものである。
Reference numeral 1 denotes a sensor unit, which has a configuration described below. Two
Is an illumination light source consisting of 10 high-intensity red light emitting diodes used for the light source. A light scattering material 3 scatters the illumination light from the red light emitting diode 2 to make it uniform over a predetermined range. Reference numeral 4 is a recording medium label, on which a bar code 5 of optical information is printed.

6は平面反射鏡で、バーコードラベル4よりの反射光
を反射して方向を変えるものである。7はレンズでバー
コードラベル4からの反射光を集光し、絞り部材8を通
って所定位置にバーコード映像を結像させている。9は
読取センサとしてのシリコン系のイメージセンサで、多
数のフォト素子を線状に並べた一次元の2048ビットの分
解能を有しており、照明光源2の発光スペクトル付近に
分光感度のピーク領域をもつものである。10は手持ちケ
ースであり、その内部と外部との各種電気信号の授受を
行なう信号ケーブルを介して信号処理部11に接続してい
る。信号処理部11は2値化回路12と、マイクロコンピュ
ータ13とから成り、イメージセンサ9の出力波形aを2
値化回路12により2値化出力bに整形し、マイクロコン
ピュータ13で所定の処理、読取不良判定などを行って、
デジタル信号cとして出力する。
A plane reflecting mirror 6 reflects the light reflected from the barcode label 4 and changes its direction. A lens 7 collects the reflected light from the bar code label 4 and passes the diaphragm member 8 to form a bar code image at a predetermined position. Reference numeral 9 denotes a silicon-based image sensor as a reading sensor, which has a one-dimensional resolution of 2048 bits in which a large number of photo elements are arranged linearly, and has a spectral sensitivity peak region near the emission spectrum of the illumination light source 2. It has. Reference numeral 10 denotes a handheld case, which is connected to the signal processing unit 11 via a signal cable for exchanging various electric signals between the inside and the outside. The signal processing unit 11 includes a binarization circuit 12 and a microcomputer 13, and outputs the output waveform a of the image sensor 9 to 2
The binarizing circuit 12 shapes the binarized output b, and the microcomputer 13 performs predetermined processing, read failure determination, and the like.
Output as a digital signal c.

この実施例では、マイクロコンピュータ13はバーコー
ドから読取ったキャラクタを、ASCIIコードに変換して
デジタル信号Cとして出力する。
In this embodiment, the microcomputer 13 converts the character read from the bar code into an ASCII code and outputs it as a digital signal C.

第3図に、2値化回路12の構成を示す。12aは、イメ
ージセンサ9からの出力を、若干遅延し、減衰させる遅
延減衰部であり、12bはこの遅延減衰部12aの出力と、イ
メージセンサ9の出力とを比較し、これらが交差したこ
とをもって出力を反転するコンパレータである。
FIG. 3 shows the configuration of the binarization circuit 12. Reference numeral 12a denotes a delay attenuator that slightly delays and attenuates the output from the image sensor 9, and 12b compares the output of the delay attenuator 12a with the output of the image sensor 9 and finds that they intersect. It is a comparator that inverts the output.

第4図(a)にセパレートタイプのNW−7バーコード
の一例を示す。バーコード5aがあらかじめ印刷されたラ
ベル4aの上に、バーコード5bが印刷されたシール4bを貼
付した場合を示している。
FIG. 4A shows an example of a separate type NW-7 barcode. It shows a case where a sticker 4b having a bar code 5b printed thereon is attached onto a label 4a having a bar code 5a printed in advance.

シール4bの白地の反射率は、その紙質の違いによりラ
ベル4aより若干低い。このバーコードの上に、Lに示す
ようにイメージセンサ9の読取線が掛かるとする。
The reflectance of the white background of the sticker 4b is slightly lower than that of the label 4a due to the difference in paper quality. It is assumed that the reading line of the image sensor 9 is placed on the bar code as indicated by L.

この読取線上のL1からL2までのイメージセンサ9の出
力波形(実線)と遅延減衰回路12aの出力(破線)とを
同図(b)に、2値化回路12の出力を同図(c))に示
す。
The output waveform (solid line) of the image sensor 9 from L 1 to L 2 on this read line and the output (broken line) of the delay attenuating circuit 12a are shown in the same figure (b), and the output of the binarization circuit 12 is shown in the same figure ( c)).

これらの第4図(a),(b),(c)から、ラベル
4aとシール4bとの境界でイメージセンサ9の出力波形が
落込み、A点から2値化出力が立上がってしまっている
ことがわかる。このため、本来のNBが検出されるべきB
点では、すでに、2値化出力は黒レベルとなっており、
NBが異常に太いBとして検出されていることがわかる。
From these FIG. 4 (a), (b), (c), the label
It can be seen that the output waveform of the image sensor 9 drops at the boundary between 4a and the seal 4b, and the binarized output has risen from point A. Therefore, the original NB should be detected as B
At that point, the binarized output is already at the black level,
It can be seen that NB is detected as an abnormally thick B.

次に、本実施例の作動を、図面に基づいて説明する。 Next, the operation of this embodiment will be described with reference to the drawings.

第5図に、マイクロコンピュータ13によるバーコード
読取作動のフローチャートを示す。
FIG. 5 shows a flowchart of the bar code reading operation by the microcomputer 13.

まず、ステップ110では、イメージセンサ9の1回の
読取作動から得られた、2値化出力から、BおよびSの
幅をデータとして、マイクロコンピュータ13に内蔵され
たメモリに格納する。
First, in step 110, the widths of B and S are stored as data in the memory incorporated in the microcomputer 13 from the binarized output obtained from one reading operation of the image sensor 9.

ステップ120では、所定値以上のSであるレフトマー
ジンを検出する。
In step 120, a left margin that is S equal to or larger than a predetermined value is detected.

ステップ130では、レフトマージンのSの次のBから
スタートコードを検出する。このスタートコードはあら
かじめ決められており、第4図(a)の場合、キャラク
タ“a"が用いられている。ステップ120とステップ130と
で、レフトマージンとスタートコードとが検出される
と、次のキャラクタギャップであるSに続いて、データ
キャラクタが記録されていることがわかる。
In step 130, a start code is detected from B following S of the left margin. This start code is predetermined, and in the case of FIG. 4 (a), the character "a" is used. When the left margin and the start code are detected in step 120 and step 130, it is understood that the data character is recorded following S which is the next character gap.

ステップ140では、このデータキャラクタをデータコ
ードにデコードする。
In step 140, this data character is decoded into a data code.

この作動は後でさらに詳述する。 This operation will be described in more detail later.

ステップ150では、ストップコードの検出を行い、デ
ータコードが終了したことを確認する。
In step 150, a stop code is detected and it is confirmed that the data code is completed.

ステップ160では、所定値以上の長さのSであるライ
トマージンの検出を行なう。
In step 160, a write margin of S having a length equal to or longer than a predetermined value is detected.

ステップ170では、ステップ140でデコードされたデー
タコードに対応するキャラクタをASCIIコードに変換し
て、出力する。
In step 170, the character corresponding to the data code decoded in step 140 is converted into an ASCII code and output.

これで、バーコードの一連の読取作動を終了し、操作
者に読取終了を知らせる。これらステップ110からステ
ップ170の処理を終えると、再びイメージセンサ9の読
取作動を指令し、ステップ110からステップ170の処理を
繰り返す。
This completes a series of bar code reading operations and notifies the operator of the end of reading. When the processes of steps 110 to 170 are completed, the reading operation of the image sensor 9 is commanded again, and the processes of steps 110 to 170 are repeated.

第1表に、第4図(a)に示すバーコードを読取った
ときのメモリ内での格納状態を示す。
Table 1 shows the storage state in the memory when the bar code shown in FIG. 4 (a) is read.

第1表は、各データを光学反射率のちがい、つまり2
値化出力のレベルのちがいで交互に並べ、7bit毎に整理
したものを示しており、マイクロコンピュータ13のステ
ップ120の作動により、所定値以上のSはレフトマージ
ンとして並べられている。
Table 1 shows that each data has different optical reflectance, that is, 2
It is shown that the levels of digitized outputs are alternately arranged and arranged every 7 bits. By the operation of step 120 of the microcomputer 13, S having a predetermined value or more is arranged as a left margin.

第6図に、第5図に示したステップ140のさらに詳細
なフローチャートを示す。
FIG. 6 shows a more detailed flowchart of step 140 shown in FIG.

ステップ141では、キャラクタひとつ分、つまりNW−
7では、B,Sあわせて7本分のデータをメモリから読出
す。
In step 141, one character, that is, NW-
In 7, the data for 7 lines including B and S are read from the memory.

ステップ142では、B,Sの本数チェックを行なう。この
ステップは、本発明の要部であり、さらに後述する。
In step 142, the number of B and S is checked. This step is an essential part of the present invention and will be described later.

ステップ143では、下記の(1)式、および(2)式
からNBとWB,NSとWSを識別するしきい値TB,TSを演算す
る。
In step 143, thresholds TB and TS for identifying NB and WB and NS and WS are calculated from the following equations (1) and (2).

ステップ144では、ステップ143で求めたしきい値に基
づいて、NとWを識別し、バイナリコードに変換する。
そして、NW−7のバーコード体系に従ってキャラクタと
対応をとり、ASCIIコードに変換する。このASCIIコード
をメモリに記憶して、ステップ170でデータコードとし
て出力するのである。
In step 144, N and W are identified based on the threshold value obtained in step 143 and converted into a binary code.
Then, in accordance with the bar code system of NW-7, it is associated with a character and converted into an ASCII code. This ASCII code is stored in the memory and output as a data code in step 170.

このステップ144で、デコードしたバイナリコード
が、ストップコードであれば、ステップ145でYESに分岐
し、ステップ150に進む。ストップコードでなければ、
ステップ141からステップ145の作動を繰り返す。
If the decoded binary code is the stop code in step 144, the process branches to YES in step 145, and proceeds to step 150. If it is not a stop code,
The operations from step 141 to step 145 are repeated.

TB=(B1+B2+B3+B4)/3 …(1) TS={(S1,S2,S3)max+(S1,S2,S3)min}/2…(2) なお、(1),(2)式において1/3,1/2の係数はNW
−7のNとWとの比率がほぼ1:2.5であり、数字キャラ
クタは、NB3本とWB1本と、NS2本とWS1本とからバーコー
ド化されていることなどを考慮して、導いた値である。
TB = (B1 + B2 + B3 + B4) / 3 (1) TS = {(S1, S2, S3) max + (S1, S2, S3) min} / 2 (2) In addition, 1 in the equations (1) and (2) 3,1 / 2 coefficient is NW
The ratio of N to W of -7 is approximately 1: 2.5, and it was derived in consideration of the fact that the numerical characters are bar coded from 3 NB, 1 WB, 2 NS, and 1 WS. It is a value.

第1表のバーデータの3段目を例にとると、 TB=(38+6+5+13)/3≒20.6 …(1′) TS=(13+3)/2≒8 …(2′) となり、このTB,TSより大なる値を“1"、小なる値を
“0"とすると、バイナリコードは“1000010"となり、NW
−7の場合は、数字キャラクタの“5"となる。
Taking the third row of bar data in Table 1 as an example, TB = (38 + 6 + 5 + 13) /3≈20.6 ... (1 ') TS = (13 + 3) / 2≈8 ... (2') If the larger value is “1” and the smaller value is “0”, the binary code becomes “1000010”.
In the case of -7, the numerical character is "5".

しかし、本来この部分のバーコードは“0"という数字
キャラクタを表わしており、第4図のような誤った2値
化により“0"が“5"として読まれてしまう。つまり、ス
テップ143とステップ144との処理のみでは、NBをWBとし
て認識してしまい、WBをNBとして認識してしまってい
る。
However, the bar code in this portion originally represents the numeric character "0", and "0" is read as "5" due to incorrect binarization as shown in FIG. That is, the NB is recognized as the WB and the WB is recognized as the NB only by the processes of step 143 and step 144.

そこでこの実施例では、本発明の要部であるステップ
142の処理を追加した。第7図に、ステップ142のさらに
詳細なフローチャートを示す。
Therefore, in this embodiment, the steps that are the main part of the present invention are performed.
Added 142 processes. FIG. 7 shows a more detailed flowchart of step 142.

ステップ142−1では、下記の(3)式、(4)式に
よって、しきい値T1,T2を演算する。
In step 142-1, the threshold values T1 and T2 are calculated by the following equations (3) and (4).

T1=(B1,B2,B3,B4)min×1.6+2 …(3) なお、+2という定数は、Bが若干細く検出されるこ
との補正である。
T1 = (B1, B2, B3, B4) min × 1.6 + 2 (3) The constant of +2 is a correction that B is detected to be slightly thin.

ステップ142−2では、しきい値T1に基づいて、T1以
下のBの本数を検出し、C1とする。(3)式とステップ
142−2とによって、そのキャラクタを構成するBのう
ちNBの本数を、最も小さい幅のBから検出しているので
ある。つまり、ひとつのキャラクタの中には2本以上の
NBが含まれており、そのうち1本は正しく検出されてい
ることが前提となっている。
In step 142-2, the number of Bs equal to or less than T1 is detected based on the threshold value T1 and set as C1. Equation (3) and step
142-2, the number of NBs among the Bs forming the character is detected from the B having the smallest width. In other words, one character has two or more
NB is included, and it is assumed that one of them is correctly detected.

ステップ142−3では、しきい値T2以上のSの本数を
検出し、C2とする。(4)式とステップ142−3とによ
って、そのキャラクタを構成するSのうちWSの本数を最
も太い幅のSから検出しているのである。
In step 142-3, the number of S equal to or greater than the threshold value T2 is detected and set as C2. By the equation (4) and step 142-3, the number of WS's among the S's constituting the character is detected from the thickest S.

ステップ142−4では、NW−7の数字キャラクタはNB
が3本であるので、C1が3と等しいか否かを判定し、等
しければ、ステップ142−5へ、否であればステップ142
−6へ進む。
At step 142-4, the numerical character of NW-7 is NB.
Since there are three, it is determined whether or not C1 is equal to 3, and if equal, to step 142-5, and if not, to step 142.
Go to -6.

ステップ142−5では、NW−7の数字キャラクタは、W
Sが1本であるので、C2が1と等しいか否かを判定し、
等しければ、ステップ143に、否であればステップ142−
6へ進む。
At step 142-5, the numerical character of NW-7 is W
Since there is only one S, determine whether C2 is equal to 1,
If they are equal to each other, step 143 is performed. If not, step 142-
Go to 6.

ステップ142−6では、読取不良対策の処理を行な
う。この実施例ではステップ110で入力したすべてのバ
ーデータをキャンセルし、イメージセンサ9に再び読取
作動を指令し、ステップ110からの作動を再開する。
In step 142-6, a read failure countermeasure process is performed. In this embodiment, all the bar data input in step 110 are canceled, the reading operation is instructed to the image sensor 9 again, and the operation from step 110 is restarted.

これらの第7図に示したフローチャートにより、第4
図のように誤った2値化がされたことを検出できる。
According to the flow chart shown in FIG.
As shown in the figure, it can be detected that the binarization is incorrect.

つまり、第4図の例の場合、(3)式のしきい値T1
は、下記の(3′)式となり T1=(38,6,5,13)min×1.6=8 …(3′) ステップ142−2の処理により、C1=2となるから、ス
テップ142−4の処理によって、ステップ142−6に分岐
し、読取不良対策処理が行われる。
That is, in the case of the example of FIG. 4, the threshold value T1 of the equation (3) is
Becomes the following equation (3 ′), T1 = (38,6,5,13) min × 1.6 = 8 (3 ′) C1 = 2 by the process of step 142-2, so step 142-4 The process branches to step 142-6 and the read failure countermeasure process is performed.

(4)式、ステップ142−3、ステップ142−5による
Sの本数チェックは、ラベル4aに印刷されたバーコード
がシール4bを透かしてイメージセンサ9の出力に現われ
た場合に有効となる。
The check of the number of S in Steps 142-3 and 142-5 in the equation (4) is effective when the barcode printed on the label 4a appears in the output of the image sensor 9 through the sticker 4b.

以上に説明した構成および作動により、本実施例はバ
ーコードを正しく読取るのである。
With the configuration and operation described above, the present embodiment reads the bar code correctly.

以上に説明した実施例では、ラベル4aに貼付されたシ
ール4bの光学反射率による問題についてのみ述べたが、
シール4bが薄いものであれば、ラベル4aに印刷されてい
たバーコードが透けるために、上述の実施例で述べた如
き問題点が発生することもある。しかし、本実施例では
この場合にも読取不良を検出することができる。
In the embodiment described above, only the problem due to the optical reflectance of the seal 4b attached to the label 4a was described,
If the sticker 4b is thin, the bar code printed on the label 4a is transparent, which may cause problems as described in the above-mentioned embodiment. However, in this embodiment, the reading failure can be detected in this case as well.

また、前述の実施例でステップ142−6に示した読取
不良対策処理としては、種々のものが考えられる。例え
ば、本実施例で述べたように、先頭のNBが太く検出され
たことのみが問題となるのであれば、このステップ142
−6で、先頭のBをNBと見做すような処理を行って、ス
テップ143、ステップ144でデコードするように構成して
もよい。こうすれば、読取不良を訂正できるため、再び
イメージセンサ9の読取作動から再開する必要がなく、
読取作業の効率が向上する。さらに、すべての種類のバ
ーについて本数チェックを行なうことで、どの種類のバ
ーが誤って検出されたかを特定することもできる。
Further, as the read failure countermeasure processing shown in step 142-6 in the above-described embodiment, various kinds can be considered. For example, as described in the present embodiment, if only the head NB being thickly detected is a problem, this step 142
In -6, a process may be performed in which the leading B is regarded as an NB, and the decoding is performed in steps 143 and 144. By doing so, since the reading failure can be corrected, it is not necessary to restart the reading operation of the image sensor 9 again.
The efficiency of reading work is improved. Furthermore, by checking the number of bars for all types of bars, it is possible to specify which type of bar was erroneously detected.

また、前述の実施例では、セパレートタイプのバーコ
ードを読取る場合のデータコードについてのみ、本発明
による読取不良判定を述べた。しかし、シールにスター
トコードからストップコードまでが印刷されている場
合、同様に先頭のバーがより太く検出されることが起こ
る。この場合は、スタートコードはあらかじめ決められ
ているため、デコード結果がそのスタートコードと一致
しなければ、読取不良対策処理がされる。しかし、もし
そのデコード結果がそのバーコード体系のスタートコー
ド、ストップコードと偶然に一致することが起り得る。
そこでスタートコード、ストップコードについても本数
チェックを行ってもよく、この結果から読取不良の訂正
をしてもよい。
Further, in the above-described embodiment, the read failure determination according to the present invention is described only for the data code when the separate type barcode is read. However, if the start code to the stop code are printed on the sticker, the top bar may be similarly detected to be thicker. In this case, since the start code is predetermined, if the decoding result does not match the start code, read failure countermeasure processing is performed. However, if the decoding result coincides with the start code and stop code of the bar code system, it may happen.
Therefore, the number of start codes and stop codes may be checked, and the reading error may be corrected based on the result.

また、前述の実施例は曲面のバーコードや、キャラク
タ毎の大きさが異なるバーコードを読取るために、各キ
ャラクタ毎に本数チェックを行なうものについて述べ
た。しかし、本数チェックをスタートコードからストッ
プコードまでの全体について、一括して行ってもよい。
Further, in the above-described embodiment, the number of characters is checked for each character in order to read a curved bar code or a bar code having a different size for each character. However, the number of lines may be checked collectively for the whole from the start code to the stop code.

また、前述の実施例では、デコードのためのしきい値
TB,TSと、本数チェックのためのしきい値T1,T2とを演算
した。しかし、しきい値TB,TSに本数チェックのための
しきい値T1,T2を用いてもよい。
Also, in the above embodiment, the threshold for decoding
TB and TS and thresholds T1 and T2 for checking the number of lines were calculated. However, thresholds T1 and T2 for checking the number may be used as the thresholds TB and TS.

また、前述の実施例ではNW−7と呼ばれる2種(N,
W)の幅をもつバーコード体系について説明した。しか
し、JAN(POS)と呼ばれるバーコード体系では、4種の
幅をもっている。この場合に本発明を適用し、最も小さ
い幅のBに基づいてしきい値を演算するようにしてもよ
い。
Further, in the above-described embodiment, two types (N, 7) called NW-7 are used.
W) width bar code system was explained. However, the bar code system called JAN (POS) has four widths. In this case, the present invention may be applied to calculate the threshold value based on B having the smallest width.

また、前述の実施例では、白地に黒いBを印刷した
が、黒地に白いBを印刷してもよい。
Further, in the above-described embodiment, the black B is printed on the white background, but the white B may be printed on the black background.

以上に述べたような実施例では、本来のバーより太く
検出されてしまって生じる読取不良を発見することがで
き、この読取不良のデータは出力しないため、バーコー
ド読取装置の読取結果の信頼性を向上することができ
る。さらに、このバーコード読取装置からデータを入力
されるシステム、例えば在庫管理システムや、売上管理
システムの信頼性をも向上することができ、これらを操
作する者への負担を著しく軽減できる。さらに、この実
施例では、Bのみならず、Sについても本数チェックを
行なうため、信頼性がさらに向上する。
In the embodiment as described above, it is possible to detect a reading failure caused by being detected thicker than the original bar, and since the data of this reading failure is not output, the reliability of the reading result of the bar code reading device can be improved. Can be improved. Further, it is possible to improve the reliability of a system for inputting data from the bar code reader, for example, an inventory management system or a sales management system, and it is possible to remarkably reduce the burden on an operator who operates them. Further, in this embodiment, not only B but also S is checked for the number of lines, so that the reliability is further improved.

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

第1図は、本発明のブロック構成図、第2図は一実施例
であるバーコード読取装置の構成図、第3図は一実施例
の2値化回路の構成図、第4図(a)はバーコードの一
例を示す平面図、第4図(b)はイメージセンサの出力
波形図、第4図(c)は2値化回路の出力波形図、第5
図、第6図、第7図はマイクロコンピュータの作動を示
すフローチャートである。 1……センサ部,2……照明光源,3……光散乱材,4……バ
ーコードラベル,5……バーコード,6……平面反射鏡,7…
…レンズ,8……絞り部材,9……イメージセンサ,10……
手持ちケース,11……信号処理部,12……2値化回路,13
……マイクロコンピュータ。
FIG. 1 is a block configuration diagram of the present invention, FIG. 2 is a configuration diagram of a bar code reading apparatus according to one embodiment, FIG. 3 is a configuration diagram of a binarization circuit according to one embodiment, and FIG. ) Is a plan view showing an example of a bar code, FIG. 4 (b) is an output waveform diagram of the image sensor, FIG. 4 (c) is an output waveform diagram of the binarization circuit, and FIG.
FIG. 6, FIG. 7 and FIG. 7 are flowcharts showing the operation of the microcomputer. 1 ... Sensor, 2 ... Illumination light source, 3 ... Light scattering material, 4 ... Bar code label, 5 ... Bar code, 6 ... Flat reflector, 7 ...
… Lens, 8 …… Aperture member, 9 …… Image sensor, 10 ……
Handheld case, 11 …… Signal processing unit, 12 …… Binarization circuit, 13
…… Microcomputer.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のバーと該バーとバーとの隙間にでき
た複数のスペースとによって構成されたバーコードを、
各バーの幅と各スペースの幅とに応じた電気信号に変換
する光電変換手段と、 前記電気信号に変換された前記各バーの幅と前記各スペ
ースの幅とに応じて、前記バーコードを解読する読取手
段とを備えるバーコード読取装置において、 前記電気信号によって示される最小幅のバーの幅を求
め、この幅より若干大きい値を第1のしきい値とする演
算を行い、前記電気信号によって示されるスペースの幅
から第2のしきい値を演算する演算手段と、 前記第1のしきい値と比較して、第1のしきい値以下の
幅を有する前記バーの本数を検出する第1の検出手段
と、 前記第2のしきい値と比較して、第2のしきい値以上の
幅を有する前記スペースの本数を検出する第2の検出手
段と、 前記第1の検出手段及び前記第2の検出手段で検出され
た前記各本数が、バーコードの特定の規格に基づいて設
定された基準となる本数と一致するか否かを判定し、前
記各本数が共に前記基準となる本数と一致するとき前記
読取手段にて前記バーコードを解読させ、否のとき読取
不良信号を出力する判定手段とを備えることを特徴とす
るバーコード読取装置。
1. A bar code composed of a plurality of bars and a plurality of spaces formed between the bars,
Photoelectric conversion means for converting into an electric signal according to the width of each bar and the width of each space, according to the width of each bar converted into the electric signal and the width of each space, the bar code In a bar code reading device including a reading means for decoding, the width of the bar having the minimum width indicated by the electric signal is obtained, and a calculation is performed with a value slightly larger than this width as a first threshold value. Calculating means for calculating a second threshold value from the width of the space indicated by, and comparing with the first threshold value to detect the number of the bars having a width equal to or smaller than the first threshold value. A first detecting means; a second detecting means for detecting the number of the spaces having a width equal to or larger than a second threshold by comparing with the second threshold; and the first detecting means. And the above-mentioned detected by the second detecting means It is determined whether or not the number of lines coincides with a standard number set based on a specific standard of the barcode, and when both of the respective numbers coincide with the standard number, the bar is read by the reading means. A bar code reading device, comprising: a determination unit that decodes a code and outputs a read failure signal when the code is denied.
JP61261557A 1986-11-01 1986-11-01 Bar code reader Expired - Lifetime JP2500859B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61261557A JP2500859B2 (en) 1986-11-01 1986-11-01 Bar code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61261557A JP2500859B2 (en) 1986-11-01 1986-11-01 Bar code reader

Publications (2)

Publication Number Publication Date
JPS63115282A JPS63115282A (en) 1988-05-19
JP2500859B2 true JP2500859B2 (en) 1996-05-29

Family

ID=17363551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61261557A Expired - Lifetime JP2500859B2 (en) 1986-11-01 1986-11-01 Bar code reader

Country Status (1)

Country Link
JP (1) JP2500859B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4873426A (en) * 1988-08-03 1989-10-10 Image Business Systems Corporation Technique for reading bar codes
JPH02135581A (en) * 1988-11-16 1990-05-24 Japan Steel Works Ltd:The Signal processor for bar code reader
JPH04268984A (en) * 1991-02-25 1992-09-24 Alps Electric Co Ltd Optical reader
JPWO2004055713A1 (en) * 2002-12-17 2006-04-20 シャープ株式会社 Bar code recognition device
KR100791705B1 (en) 2005-06-16 2008-01-03 샤프 가부시키가이샤 Barcode recognition apparatus
JP2007172347A (en) * 2005-12-22 2007-07-05 Toshiba Tec Corp Code reading apparatus and program
JP5470734B2 (en) * 2007-06-28 2014-04-16 富士ゼロックス株式会社 Image processing apparatus and image processing program
KR100791704B1 (en) * 2007-10-16 2008-01-07 샤프 가부시키가이샤 Barcode recognition apparatus
JP5026475B2 (en) * 2009-07-10 2012-09-12 東芝テック株式会社 Code symbol reader and its control program
WO2011034107A1 (en) * 2009-09-17 2011-03-24 株式会社オプトエレクトロニクス Optical information reader and control method therefor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58175084A (en) * 1982-04-07 1983-10-14 Matsushita Electric Ind Co Ltd Bar code reader
JPS60100272A (en) * 1983-11-04 1985-06-04 Toppan Printing Co Ltd Bar code reader

Also Published As

Publication number Publication date
JPS63115282A (en) 1988-05-19

Similar Documents

Publication Publication Date Title
US5184005A (en) Non-decoded type bar code reading apparatus
US5389770A (en) Method and apparatus for decoding unresolved bar code profiles
US5270525A (en) Non-decoded type bar code reading apparatus
US5539191A (en) Method and apparatus for decoding unresolved bar code profiles using edge finding circuitry
US5553084A (en) Error correction enhancement for code one and other machine-readable symbologies
US6547142B1 (en) Method of scanning indicia using selective sampling
EP0067414A2 (en) Method and apparatus for reading a bar code
JP2500859B2 (en) Bar code reader
EP0385783A2 (en) Bar code reading apparatus
JP3324374B2 (en) Barcode demodulation method and barcode reader
US5471041A (en) Bar-code reader device
US6474555B1 (en) Optical reader, optical reading method and optical reading system
US5393968A (en) Method and device for reading bar code
JPH07104904B2 (en) Bar code reader
US5979765A (en) Bar-code reader and bar-code reading method for detecting various possible reproducible bar code combinations and synthesizing information therefrom
US6330972B1 (en) Error correction enhancement for code 93i and other machine-readable symbologies
JP4188104B2 (en) Bar code reader
JP2007102386A (en) Symbol information reading method and symbol information reading device
US5637853A (en) Reading indicia by analysis of different light reflecting portions based on signal-to-noise ratios
EP0063243B1 (en) Ocr and bar code reader with optimized sensor
JPH10111904A (en) Bar code reader and recording medium
JP2576370B2 (en) ID mark reading device
JP2766768B2 (en) Barcode decoder decoding method
EP0734557B1 (en) Method and apparatus for decoding unresolved bar code profiles
JP2971636B2 (en) Barcode symbol reader

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term