JP2005128626A - Barcode reader and barcode discriminating method - Google Patents
Barcode reader and barcode discriminating method Download PDFInfo
- Publication number
- JP2005128626A JP2005128626A JP2003360633A JP2003360633A JP2005128626A JP 2005128626 A JP2005128626 A JP 2005128626A JP 2003360633 A JP2003360633 A JP 2003360633A JP 2003360633 A JP2003360633 A JP 2003360633A JP 2005128626 A JP2005128626 A JP 2005128626A
- Authority
- JP
- Japan
- Prior art keywords
- character
- elements
- barcode
- subset
- ratio
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、隣接する2つのエレメントが夫々3種類以上の幅値を有し、1キャラクタが6エレメント以上で構成されるバーコードを読取るための、バーコード読取装置及びバーコード判別方法に関する。 The present invention relates to a barcode reading apparatus and a barcode discrimination method for reading a barcode in which two adjacent elements each have three or more types of width values and one character is composed of six or more elements.
図7は、バーコードの1種であるCODE128の一例を示すものである。CODE128は、隣接する2つのエレメントであるバー,スペースが夫々4種類の幅値を有し、1キャラクタを3つのバーと3つのスペースよりなる11モジュール(単位幅寸法)で表現する。また、スタートコードが3種類有り、各スタートコードと103種類のコードパターンとの対応によってアスキー128文字を表現可能であることから、CODE128と称されている。また、スタートコードCについては1キャラクタで2桁の数字を表現できるため、バーコードの印字密度を高めることが可能となっている。更に、バー,スペース夫々に用いるモジュール数の和は偶数パリティ,奇数パリティとなっており、エラーチェック機能も備えている。 FIG. 7 shows an example of the CODE 128, which is one type of barcode. In CODE 128, two adjacent elements, bar and space, each have four types of width values, and one character is expressed by 11 modules (unit width dimensions) including three bars and three spaces. Also, since there are three types of start codes and ASCII 128 characters can be expressed by correspondence between each start code and 103 types of code patterns, it is called CODE128. Further, since the start code C can express a 2-digit number with one character, it is possible to increase the printing density of the barcode. Furthermore, the sum of the number of modules used for each bar and space is even parity and odd parity, and an error check function is also provided.
そして、特許文献1には、CODE128のように隣接するエレメントが夫々4種類以下の幅値を有するバーコードについて、読取り器による走査速度に制限がなく、エレメントの幅に多少の増減が合ったとしても正確にコードを認識するための方法が開示されている。
ところで、近年、バーコードのサイズについてはより小さなものが要求されている。バーコードのサイズをより小さくすると、印刷の「にじみ」等に起因するバー,スペースの太り細りが発生した場合にはその影響が大きくなり、バー,スペースの幅を正確に特定できなくなってしまう。即ち、バーコードの読取り誤りが発生し易くなるという問題がある。また、バーコードは光学的に読取られるため、その読取り角度が傾斜していたり、或いはバーコードの設置面が平面となっていないような場合は、バーやスペースの幅が読取り方向において次第に太くなったり、或いは細くなる状態で読取られてしまうことも想定される。 By the way, in recent years, a smaller barcode is required. If the size of the bar code is made smaller, if the bar or space becomes thicker or thinner due to printing “smearing” or the like, the effect becomes larger, and the width of the bar or space cannot be specified accurately. That is, there is a problem that a barcode reading error is likely to occur. In addition, since the barcode is optically read, the width of the bar or space gradually increases in the reading direction when the reading angle is inclined or the barcode is not flat. Or may be read in a thinned state.
特許文献1に開示されている方法では、バー,スペースの幅を特定するために、以下のような手順によっている。バーコードを走査し、バー,スペースの各領域幅に相当する値を計数値として記憶し、各計数値に基づき1キャラクタ毎の合計値を算出する。それから、合計値と各計数値との商を求めて算出値とすると、その算出値と第一,第二,第三比較値とを比較した大小関係に従って各バー,スペースの幅値、即ち二進値を判定する。ここで、第一,第二,第三比較値は、以下のように設定される。
In the method disclosed in
<第一比較値>
合計値と1モジュール分のバー又はスペースの計数値との商と2モジュール分のバー又はスペースの計数値との商との略中間値。
<第二比較値>
合計値と2モジュール分のバー又はスペースの計数値との商と3モジュール分のバー又はスペースの計数値との商との略中間値。
<第三比較値>
合計値と3モジュール分のバー又はスペースの計数値との商と4モジュール分のバー又はスペースの計数値との商との略中間値。
即ち、これらの比較値は、バー,スペースの各領域幅に相当する計数値の総和である合計値と、1〜4モジュール分の計数値とに基づいて設定されている。
<First comparison value>
A substantially intermediate value between the quotient of the total value and the count value of the bar or space for one module and the count value of the bar or space for two modules.
<Second comparison value>
A substantially intermediate value between the quotient of the total value and the count value of the bar or space for 2 modules and the count value of the bar or space for 3 modules.
<Third comparison value>
A substantially intermediate value between the quotient of the total value and the count value of the bar or space for 3 modules and the count value of the bar or space for 4 modules.
That is, these comparison values are set based on the total value that is the sum of the count values corresponding to the widths of the bars and spaces, and the count values for 1 to 4 modules.
そして、上述したように、バーコードが湾曲面上に印刷されていたり、バーコードの印刷面に対して読取装置を傾けて読取り操作を行った等の理由により、バーやスペースの幅が読取り方向において次第に変化する状態で読取られてしまう場合、特許文献1で説明されている1キャラクタの構成がバー,スペース4本、合計幅が7モジュールのように、本数や合計幅が比較的小さいバーコード体系では、各バー,スペース夫々の計数値が変動してもその影響が顕著に現れにくい。
Then, as described above, the width of the bar or space is determined in the reading direction because the barcode is printed on the curved surface or the reading operation is performed by tilting the reader with respect to the printed surface of the barcode. If the barcode is read in a gradually changing state, the number and the total width of the bar code having a relatively small number and the total width, such as the structure of one character described in
ところが、CODE128のように、構成本数が6本で合計幅が11モジュールであるようなバーコード体系や、構成本数や合計幅がそれ以上となるような体系では、それら個別の計数値の和に基づいて判定される幅値に誤りが生じ易くなることが想定される。
本発明は上記事情に鑑みて成されたものであり、その目的は、バーコードの読み取り誤りをより発生し難くすることができるバーコード読取装置、及びバーコードの判別方法を提供することにある。
However, in the case of a barcode system such as CODE128 where the number of components is 6 and the total width is 11 modules, or a system where the number of components and the total width are more than that, the sum of these individual count values is added. It is assumed that an error is likely to occur in the width value determined based on this.
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a bar code reading apparatus and a bar code discriminating method capable of making bar code reading errors less likely to occur. .
請求項1記載のバーコード読取装置によれば、2以上で且つ1キャラクタを構成するエレメントの数よりも少ない数の連続したエレメントの組み合わせをデコード用のサブセットと定義する。そして、1キャラクタ中において、サブセットを所定のエレメント数だけずらしながら複数設定し、各サブセットに属するエレメントの幅値の合計を求め、各合計値の比に基づいて1キャラクタの判別を行なう。 According to the barcode reading apparatus of the first aspect, a combination of consecutive elements that is two or more and smaller than the number of elements constituting one character is defined as a decoding subset. A plurality of subsets are set while shifting by a predetermined number of elements in one character, the sum of the width values of the elements belonging to each subset is obtained, and one character is determined based on the ratio of the total values.
即ち、バーコードにおけるキャラクタは複数のエレメントの配列によって定義されるので、それらのエレメントの連続した組み合わせを複数設定すれば、キャラクタは、その組み合わせの幅値がなす比で特定できる。従って、1キャラクタ中において読み取られるエレメントの幅が様々な要因によって変動する場合でも、サブセットの幅値を比較評価することでその変動を吸収することができるので、従来技術に比較して、読み取りの信頼性を向上させることが可能となる。 That is, since a character in a barcode is defined by an array of a plurality of elements, if a plurality of consecutive combinations of these elements are set, the character can be specified by a ratio formed by the width value of the combination. Therefore, even if the width of an element read in one character varies due to various factors, the variation can be absorbed by comparing and evaluating the width value of the subset. Reliability can be improved.
請求項2記載のバーコード読取装置によれば、隣接する2つのエレメントが夫々4種類の幅値を有し、1キャラクタが6エレメントで構成され、サブセットは4エレメントで構成されると共に、1エレメントずつずらして設定されるバーコードを読取り対象とするので、CODE128と同様の規格よりなるバーコードの読み取り信頼性を向上させることができる。
According to the barcode reader of
請求項3記載のバーコード読取装置によれば、合計値の比に対応するキャラクタが複数存在する場合、当該キャラクタを構成するエレメントの幅値を夫々判定し、それらのエレメントの配列に基づいてキャラクタを判別する。即ち、バーコードの仕様によっては、サブセットの幅比の組み合わせが複数のキャラクタに対応する場合も考えられる。そのような場合でも、夫々のキャラクタ候補が有するエレメントの幅値を個別に判定すれば、キャラクタを確実に特定することができる。
According to the barcode reader of
請求項4記載のバーコード読取装置によれば、合計値の比に対応するキャラクタが複数存在する場合、当該キャラクタを構成するエレメントの内、隣接する2つ毎に対を設定し、各対をなすエレメントの幅値の合計を求め、それらの合計値の比に基づいてキャラクタを判別する。斯様な方式による場合も、請求項3と同様にキャラクタを確実に特定することができる。
According to the barcode reader of
請求項5記載のバーコード読取装置によれば、バーコードの判別に失敗した場合は、エレメントの逆方向の配列順に基づいて同一の判別処理を実行するので、単に最初のバーコードの読み取りが逆方向で行われた場合に、読取り失敗として処理されることを回避できる。 According to the barcode reading apparatus of the fifth aspect, when the barcode determination fails, the same determination processing is executed based on the arrangement order of the elements in the reverse direction, so that the first barcode reading is simply reversed. When it is performed in the direction, it is possible to avoid being processed as a read failure.
(第1実施例)
以下、本発明を4値幅バーコードであるCODE128に適用した場合の第1実施例について図1乃至図4を参照して説明する。図4は周知であるバーコードの読取装置10の電気的構成を示している。この読取装置10は、例えば手持ち式や定置式のものがあり、それぞれ共通して光学的な読取部とデータ処理部とから構成されている。光学的な読取部としては、読取対象となるバーコード1が記録されたシートなどの記録面Dに対して照明光を複数の方向から投光するLED11、12と記録面Dの画像を撮影するためのレンズ13およびCCD(Charge Coupled Device)撮像素子14とが設けられている。
(First embodiment)
A first embodiment in the case where the present invention is applied to CODE128, which is a four-value width barcode, will be described below with reference to FIGS. FIG. 4 shows the electrical configuration of a known
内部の全体の制御は制御部15により行われる。制御部15は、CPUを主体として内部メモリやインターフェースなどが設けられていると共に、読取処理のプログラムが記憶されている。上述したCCD撮像素子14の出力端子は、増幅回路16、A/D変換回路17を介してメモリ18に接続されている。加えて、A/D変換回路17の出力端子は、二値化回路19を介してメモリ18に接続されている。
The entire internal control is performed by the
CCD撮像素子14により撮影された画像信号は、アナログ的に増幅回路16にて増幅され、A/D変換回路17を経てデジタル信号に変換され、二値化された画像データとしてメモリ18に記憶される。
CCD撮像素子14、特定比検出回路19は同期信号発生回路20から同期信号が与えられるようになっている。同期信号発生回路20は、アドレス発生回路21にも同期信号を与えるようになっており、メモリ18にアドレス信号を与える。LED11,12、増幅回路16、A/D変換回路17、特定比検出回路19メモリ18および同期信号発生回路20は、制御部15から制御信号が与えられると共に情報の授受をおこなうように構成されている。
読取装置10には、各種の操作入力を行うための操作スイッチ22が設けられており制御部15により入力が受け付けられる。また、制御部15には、制御状態の表示や報知動作をするためのLED23、ブザー24、液晶表示器25などが配設されている。さらに、外部の機器との通信を行うための通信インターフェイス26が接続されている。
An image signal photographed by the CCD
The CCD
The
図1は、CODE128の一パターン例を示すものであり、4キャラクタで「スタートC」,「12」,「14(チェックコード:CHK)」,「ストップ」を示している。夫々がエレメントであるバー,スペースは、隣接して交互に配置されている。そして、各キャラクタのエレメントパターン(Bはバー,Sはスペースである)は、以下のように定義されている。尚、エレメントパターンの数値は、バー又はスペースの幅値である。
キャラクタ BSBSBSB
スタートC 211232
12 112232
14 122231
ストップ 2331112
ここで、キャラクタ「スタートC」を構成する第1〜第6エレメントについて、先頭から4つのエレメント(1,2,3,4)を含む群をデコード用のサブセットaと定義する。そして、サブセットaを1エレメント分ずらした4つのエレメント(2,3,4,5)を含む群をサブセットbと定義し、更に、サブセットbを1エレメント分ずらした4つのエレメント(3,4,5,6)を含む群をサブセットcと定義する。すると、各サブセットa〜cに含まれるエレメントの幅値の合計は、以下のようになる。
サブセットa:2+1+1+2=6
サブセットb:1+1+2+3=7
サブセットc:1+2+3+2=8
従って、サブセットa,b,cを構成するエレメント幅値の合計比は、6:7:8となっており、その比によってキャラクタ「スタートC」若しくはキャラクタ「03」の何れであることを特定することができる。そして、パターンの最初に位置するキャラクタ(スタートキャラクタ)という特徴から、「スタートC」と特定することができる。
FIG. 1 shows an example of a pattern of CODE 128, which indicates “start C”, “12”, “14 (check code: CHK)”, and “stop” with four characters. Bars and spaces, each of which is an element, are alternately arranged adjacent to each other. The element pattern of each character (B is a bar and S is a space) is defined as follows. The numerical value of the element pattern is a bar or space width value.
Character BSBSBSB
Start C 21232
12 112232
14 122231
Stop 2331112
Here, regarding the first to sixth elements constituting the character “start C”, a group including the four elements (1, 2, 3, 4) from the top is defined as a decoding subset a. Then, a group including four elements (2, 3, 4, 5) obtained by shifting subset a by one element is defined as subset b, and further, four elements (3,4, 4) obtained by shifting subset b by one element are defined. A group including (5, 6) is defined as a subset c. Then, the sum of the width values of the elements included in each of the subsets a to c is as follows.
Subset a: 2 + 1 + 1 + 2 = 6
Subset b: 1 + 1 + 2 + 3 = 7
Subset c: 1 + 2 + 3 + 2 = 8
Therefore, the total ratio of the element width values constituting the subsets a, b, and c is 6: 7: 8, and the ratio is specified as either the character “start C” or the character “03”. be able to. Then, it can be identified as “start C” from the feature of the character (start character) located at the beginning of the pattern.
同様にして、他のキャラクタ「12」,「14」,「ストップ」についても、サブセットa,b,cを構成するエレメント幅値の合計比を求めると、以下のようになる(図1(b)参照)。
キャラクタ a:b:c
12 6:8:9
14 7:9:8
ストップ 9:8:6
以上のようにして、CODE128における全てのエレメントパターンについてサブセットa,b,cを構成するエレメント幅値の合計比を求め、一覧としたものを図2に示す。しかしながら、斯様な合計比にキャラクタを対応させると、最大で4つまで重複が発生する。従って、その部分については、それらの内何れのキャラクタに対応するのかを別途特定する必要がある。尚、読取装置10の制御部15は、内蔵されている図示しないメモリに、図2の一覧をデータテーブルとして記憶している。
Similarly, regarding the other characters “12”, “14”, and “stop”, the total ratio of the element width values constituting the subsets a, b, and c is obtained as follows (FIG. 1 (b)). )reference).
Character a: b: c
12 6: 8: 9
14 7: 9: 8
Stop 9: 8: 6
As described above, the total ratio of the element width values constituting the subsets a, b, and c is obtained for all element patterns in the CODE 128, and a list is shown in FIG. However, when characters are made to correspond to such a total ratio, a maximum of four overlaps occur. Therefore, it is necessary to separately specify which character corresponds to the portion. Note that the
次に、本実施例の作用について図3をも参照して説明する。図3は、読取装置10の制御部15を中心として行われるバーコード読取り処理の制御内容を示すフローチャートである。但し、ステップS1〜S6は一般的な読取り処理である。即ち、読取装置10は、CCD撮像素子14により撮影された画像データをA/D変換回路17を介してメモリ18に取り込む(ステップS1)と、画像データの明レベル,暗レベルを検出し(ステップS2)、画像データを明,暗に二値化するためのしきい値を決定すると(ステップS3)、そのしきい値を用いて画像データを二値化する(ステップS4)。そして、メモリ18に取り込まれた画像データを明(スペース),暗(バー)のパターンデータに変換する(ステップS5)。
尚、二値化回路19を使用する場合、ステップS2〜S4の処理は二値化回路19によってハード的に実行され、メモリ18には、最初から二値化された画像データが書き込まれることになる。
Next, the operation of this embodiment will be described with reference to FIG. FIG. 3 is a flowchart showing the control content of the barcode reading process performed mainly by the
When the
続いて、制御部15は、明暗パターンデータをNキャラクタ分のキャラクタ候補に区切ると(ステップS6)、キャラクタ数をカウントするためのカウンタnを「1」に初期化する(ステップS7)。そして、第n(この場合、最初)のキャラクタについて、バー3本,スペース3本よりなる6エレメントの幅値の和を求め、その和を1キャラクタの総エレメント数である「11」で除して、基本最小エレメント幅「1」を決定する(ステップS8)。
Subsequently, when the light / dark pattern data is divided into character candidates for N characters (step S6), the
次に、制御部15は、第nキャラクタ候補についてデコード用のサブセットa,b,cを設定する(ステップS9)。即ち、上述したように、第nキャラクタ候補を構成する第1〜第6エレメントについて、第1〜第4エレメントを含む群をサブセットa,第2〜第5エレメントを含む群をサブセットb,第3〜第6エレメントを含む群をサブセットcとする。それから、各サブセットa,b,c夫々のエレメント幅の合計を基本最小エレメント幅に基づいて測定し、整数に丸める処理を行ない、a:b:cの比を求める(ステップS10)。
Next, the
次に、制御部15は、図2に示すデータテーブル(データテーブル1)を参照し、ステップS10で得た比a:b:cのパターンが、データテーブル中の何れのキャラクタ候補に該当するかを決定する(ステップS11)。ここで、該当するキャラクタ候補が1つだけであれば(ステップS12,「NO」)その時点でキャラクタは確定するので、カウンタnが全キャラクタ数に一致したか否かを判断する(ステップS13)。ステップS13において、両者が一致しなければ(「NO」)カウンタnをインクリメントして(ステップS14)ステップS8に戻り、両者が一致すれば(「YES」)処理を終了する。
Next, the
一方、ステップS12において、ステップS10で得た比a:b:cのパターンに該当するキャラクタ候補が複数ある場合(「YES」)、制御部15は、それらの候補の中からキャラクタを特定する。即ち、サブセットa,b,c夫々について明暗パターンの幅比を決定し、その明暗パターンに該当するのは何れのキャラクタ候補かを判定する(ステップS15)。
On the other hand, in step S12, when there are a plurality of character candidates corresponding to the pattern of the ratio a: b: c obtained in step S10 (“YES”), the
例えば、キャラクタ「ストップ」は、明暗パターンが「233111(2)」であり、サブセットa:b:cの幅比は9:8:6であるが、図2を参照すると、この幅比のパターンはキャラクタ「41」にも該当する。即ち、キャラクタ「41」の明暗パターンは、「231311」であるから、
サブセットa:2+3+1+3=9
サブセットb:3+1+3+1=8
サブセットc:1+3+1+1=6
となっている。
For example, the character “stop” has a light / dark pattern “233111 (2)” and the width ratio of the subset a: b: c is 9: 8: 6. Referring to FIG. Corresponds to the character “41”. That is, since the light and dark pattern of the character “41” is “231313”,
Subset a: 2 + 3 + 1 + 3 = 9
Subset b: 3 + 1 + 3 + 1 = 8
Subset c: 1 + 3 + 1 + 1 = 6
It has become.
この場合、サブセットaの明暗パターンを比較すれば、
「ストップ」:2311
「41」:2313
であるから、何れか一方を特定することが可能となる。従って、制御部15は、CODE128のコード表(データテーブル2)を参照して、第nキャラクタの候補の内、明暗パターンに該当するキャラクタを特定する(ステップS16)。「ストップ」,「41」の場合は、サブセットaのパターンのみの比較で特定が可能であるが、当該パターンが同一で区別できない組み合わせの場合は、サブセットb,cについて同様に比較を行なってキャラクタを特定する。それから、ステップS13に戻る。また、制御部15は、図2に示すテーブルの内少なくともキャラクタ候補が2以上となるものについてのみ、CODE128のコード表データを保持していれば良い。
In this case, if the light and dark patterns of subset a are compared,
"Stop": 2311
“41”: 2313
Therefore, either one can be specified. Accordingly, the
以上のように本実施例によれば、読取装置10は、バーコード1であるCODE128の1キャラクタ中において、連続する4つのエレメントよりなるデコード用のサブセットを1エレメント数だけずらしながら3つ設定し、各サブセットa,b,cに属するエレメントの幅値の合計を求め、各合計値の比に基づいて1キャラクタの判別を行なうようにした。
As described above, according to the present embodiment, the
従って、1キャラクタ中において読み取られるエレメントの幅が様々な要因によって変動する場合でも、サブセットの幅値を比較評価することでその変動を吸収することができる。また、1キャラクタにおいて3つのサブセットにつき夫々の幅比を整数値に丸めて判定を行うから、丸め誤差が生じる可能性もより低くなる。故に、従来技術に比較して、読み取りの信頼性を向上させることが可能となる。
また、読取装置10は、サブセットの幅比に対応するキャラクタが複数存在する場合、当該キャラクタを構成するエレメントの幅値を夫々判定し、それらのエレメントの配列に基づいてキャラクタを判別するので、キャラクタを確実に特定することができる。
Therefore, even when the width of an element read in one character varies due to various factors, the variation can be absorbed by comparing and evaluating the width values of the subsets. In addition, since the determination is performed by rounding the respective width ratios to the integer values for the three subsets in one character, the possibility of rounding errors is further reduced. Therefore, it is possible to improve reading reliability as compared with the prior art.
Further, when there are a plurality of characters corresponding to the width ratio of the subset, the
(第2実施例)
図5は本発明の第2実施例を示すものであり、第1実施例と同一部分には同一符号を付して説明を省略し、以下異なる部分についてのみ説明する。第2実施例は、第1実施例における図3に示すフローチャートのステップS15の処理を異なる方法で実行するものである。
(Second embodiment)
FIG. 5 shows a second embodiment of the present invention. The same parts as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted. Only different parts will be described below. In the second embodiment, the process of step S15 of the flowchart shown in FIG. 3 in the first embodiment is executed by a different method.
即ち、図5に示すように、バーコード1の1キャラクタを構成するエレメントの内、隣接する2つ(バー,スペース)毎に対を設定する。そして、各対をなすエレメントの幅値の合計を求める。キャラクタ「スタートC」の場合、3(2+1):3(1+2):5(3+2)となる。一方、キャラクタ「41」については、5(2+3):4(1+3):2(1+1)となる。従って、キャラクタ候補の幅比が何れの比に一致するかを比較判定すれば、該当するキャラクタを特定することができる。
That is, as shown in FIG. 5, a pair is set for every two adjacent elements (bar, space) among the elements constituting one character of the
以上のように第2実施例によれば、制御装置10の制御部15は、サブセットの幅比に対応するキャラクタが複数存在する場合、当該キャラクタを構成するエレメントの内、隣接する2つ毎に対を設定し、各対をなすエレメントの幅値の合計を求め、それらの合計値の比に基づいてキャラクタを判別する。従って、第1実施例と同様にキャラクタを確実に特定することができる。
As described above, according to the second embodiment, when there are a plurality of characters corresponding to the width ratio of the subset, the
(第3実施例)
図6は本発明の第3実施例を示すものであり、第1実施例と異なる部分についてのみ説明する。第3実施例は、バーコード1が正常に読み込めなかった場合の処理を示す。図6は、図3のフローチャートの一部分に対応するものである。制御部15は、ステップS12を実行した結果「NO」と判断すると、キャラクタ候補に該当するものがなかったか否かを判断する(ステップS20)。そして、キャラクタ候補に該当するものが1つ存在すればここでも「NO」と判断するので、後述する逆方向フラグをリセットする処理を行った後(ステップS21)ステップS13に移行する。
(Third embodiment)
FIG. 6 shows a third embodiment of the present invention, and only parts different from the first embodiment will be described. The third embodiment shows a process when the
また、ステップS20において、キャラクタ候補に該当するものがなかった場合(「YES」)、制御部15は、逆方向フラグがセットされているか否かを判断する(ステップS22)。セットされていなければ(「NO」)、ステップS9の処理に代えて、デコード用のサブセットを逆方向について設定する(ステップS23)。
例えば、キャラクタ「ストップ」のパターンは「2331112」であるが、これを読取装置10が逆方向に読み込んだ場合に、ステップS9にてサブセットを設定すると、以下のようになる。
サブセットa:2+1+1+1=5
サブセットb:1+1+1+3=6
サブセットc:1+1+3+3=8
すると、この場合のサブセットの幅比5:6:8は、キャラクタ「65」に該当するが、最初のキャラクタが「スタートA〜C」の何れでもないのは明らかに異常であるから、このようなケースでは、バーコード1を逆方向から読取ったことが想定される。従って、制御部15は、読取った明暗パターンについてサブセットを逆方向で設定し、逆方向フラグをワークエリアのフラグ格納領域にセットして(ステップS24)、ステップS10に移行する。
In step S20, when there is no character candidate (“YES”), the
For example, the pattern of the character “stop” is “2331112”, and when the
Subset a: 2 + 1 + 1 + 1 = 5
Subset b: 1 + 1 + 1 + 3 = 6
Subset c: 1 + 1 + 3 + 3 = 8
Then, the subset width ratio 5: 6: 8 in this case corresponds to the character “65”, but it is obviously abnormal that the first character is not “Start A to C”. In such a case, it is assumed that the
そして、単にバーコード1を逆方向から読取っただけであれば、次回はステップS12で「YES」若しくはステップS20で「NO」と判断されることになる。一方、次回においても該当するキャラクタ候補がなく、ステップS20で再び(「YES」)と判断した場合、今度は逆方向フラグがセットされているので、ステップS22でも「YES」と判断することになる。この場合、読取ったものは本来の読取り対象のバーコード1ではないことが想定されるので、その旨を報知するエラー報知処理を行ない(ステップS25)処理を終了する。
If the
以上のように第3実施例によれば、読取装置10の制御部15は、バーコード1の判別に失敗した場合は、エレメントの逆方向の配列順に基づいて同一の判別処理を実行するので、単に最初のバーコード1の読み取りが逆方向で行われた場合は、読取り失敗として処理されることを回避できる。
As described above, according to the third embodiment, when the
本発明は上記し且つ図面に記載した実施例にのみ限定されるものではなく、以下のような変形又は拡張が可能である。
バーコードは、CODE128に限ることなく、隣接する2つのエレメントが夫々3種類以上の幅値を有し、1キャラクタが6エレメント以上で構成されるバーコードであれば適用が可能である。
サブセットの幅比とキャラクタとが全て1対1で対応する場合、ステップS12,S15,S16の処理は不要である。
サブセットを設定する場合、1キャラクタを構成する総エレメント数によっては、エレメントを2以上ずらしても良い。
The present invention is not limited to the embodiments described above and shown in the drawings, and the following modifications or expansions are possible.
The bar code is not limited to CODE 128, but can be applied to any bar code in which two adjacent elements each have three or more width values and one character is composed of six or more elements.
When the subset width ratios and the characters all correspond one-to-one, the processes in steps S12, S15, and S16 are unnecessary.
When setting a subset, the elements may be shifted by 2 or more depending on the total number of elements constituting one character.
図面中、1はバーコード、10は読取装置を示す。 In the drawings, 1 is a bar code and 10 is a reader.
Claims (10)
2以上で且つ1キャラクタを構成するエレメントの数よりも少ない数のエレメントの連続した組み合わせをデコード用のサブセットと定義し、
1キャラクタ中において、前記サブセットを所定のエレメント数だけずらしながら複数設定し、
各サブセットに属するエレメントの幅値の合計を求め、
前記合計値の比に基づいて前記1キャラクタの判別を行なうことを特徴とするバーコード読取装置。 A bar code reader for reading a bar code in which two adjacent elements each have three or more width values, and one character is composed of six or more elements,
A consecutive combination of two or more elements less than the number of elements constituting one character is defined as a subset for decoding.
In one character, a plurality of the subsets are set while being shifted by a predetermined number of elements,
Find the sum of the width values of the elements belonging to each subset,
The bar code reader according to claim 1, wherein the character is discriminated based on the ratio of the total values.
隣接する2つのエレメントが夫々4種類の幅値を有し、
1キャラクタが6エレメントで構成され、
前記サブセットは4エレメントで構成されると共に、1エレメントずつずらして設定されるものを読取り対象とすることを特徴とする請求項1記載のバーコード読取装置。 The barcode is
Two adjacent elements each have four different width values,
1 character consists of 6 elements,
2. The barcode reading apparatus according to claim 1, wherein the subset is composed of four elements, and the subset is set to be shifted by one element.
2以上で且つ1キャラクタを構成するエレメントの数よりも少ない数のエレメントの連続した組み合わせをデコード用のサブセットと定義し、
1キャラクタ中において、前記サブセットを所定のエレメント数だけずらしながら複数設定し、
各サブセットに属するエレメントの幅値の合計を求め、
前記合計値の比に基づいて前記1キャラクタの判別を行なうことを特徴とするバーコード判別方法。 A barcode discriminating method for reading a barcode in which two adjacent elements each have three or more width values, and one character is composed of six or more elements,
A consecutive combination of two or more elements less than the number of elements constituting one character is defined as a subset for decoding.
In one character, a plurality of the subsets are set while being shifted by a predetermined number of elements,
Find the sum of the width values of the elements belonging to each subset,
A bar code discrimination method comprising: discriminating the one character based on the ratio of the total values.
隣接する2つのエレメントが夫々4種類の幅値を有し、
1キャラクタが6エレメントで構成され、
前記サブセットは4エレメントで構成されると共に、1エレメントずつずらして設定されることを特徴とする請求項6記載のバーコード判別方法。 The barcode is
Two adjacent elements each have four different width values,
1 character consists of 6 elements,
7. The barcode discriminating method according to claim 6, wherein the subset is composed of four elements and is set so as to be shifted by one element.
10. The barcode determination method according to claim 6, wherein when the determination of the barcode is unsuccessful, the same determination processing is executed based on the arrangement order of the elements in the reverse direction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003360633A JP4155156B2 (en) | 2003-10-21 | 2003-10-21 | Bar code reader and bar code discrimination method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003360633A JP4155156B2 (en) | 2003-10-21 | 2003-10-21 | Bar code reader and bar code discrimination method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005128626A true JP2005128626A (en) | 2005-05-19 |
JP4155156B2 JP4155156B2 (en) | 2008-09-24 |
Family
ID=34640885
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003360633A Expired - Fee Related JP4155156B2 (en) | 2003-10-21 | 2003-10-21 | Bar code reader and bar code discrimination method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4155156B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009044720A1 (en) * | 2007-10-02 | 2009-04-09 | B-Core Inc. | Optical recognition code reading method, device, and program, and printed object marked with optical recognition code |
WO2012115046A1 (en) * | 2011-02-21 | 2012-08-30 | 株式会社オプトエレクトロニクス | Optical information reading device, optical information reading method, computer-readable program, and recording medium |
-
2003
- 2003-10-21 JP JP2003360633A patent/JP4155156B2/en not_active Expired - Fee Related
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009044720A1 (en) * | 2007-10-02 | 2009-04-09 | B-Core Inc. | Optical recognition code reading method, device, and program, and printed object marked with optical recognition code |
WO2012115046A1 (en) * | 2011-02-21 | 2012-08-30 | 株式会社オプトエレクトロニクス | Optical information reading device, optical information reading method, computer-readable program, and recording medium |
JP2012173973A (en) * | 2011-02-21 | 2012-09-10 | Optoelectronics Co Ltd | Optical information reading device, optical information reading method, computer-readable program and recording medium |
US9361504B2 (en) | 2011-02-21 | 2016-06-07 | Optoelectronics Co., Ltd. | Optical information reading device, optical information reading method, computer-readable program and recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP4155156B2 (en) | 2008-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6685095B2 (en) | Apparatus and method for decoding damaged optical codes | |
US6802450B2 (en) | Guiding a scanning device to decode 2D symbols | |
EP1016027B1 (en) | Distortion resistant double-data correcting color transition barcode and method of generating and using same | |
US5553084A (en) | Error correction enhancement for code one and other machine-readable symbologies | |
JP2004234318A (en) | Two-dimension information code, and display method, generation method and reading method thereof | |
JP3115003B2 (en) | Method and apparatus for decoding barcode symbols using module size ratio analysis | |
US7077323B2 (en) | Bar code recognizing method and decoding apparatus for bar code recognition | |
JP2007079781A (en) | Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader | |
JP2023062139A (en) | Improved method for correcting errors in matrix symbols | |
CA2044935C (en) | Bar-code reading apparatus | |
US5471041A (en) | Bar-code reader device | |
US10460142B2 (en) | Barcode identification method for improving decoding reliability by correcting image distortion | |
JP5187383B2 (en) | Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus | |
JP4155156B2 (en) | Bar code reader and bar code discrimination method | |
US20060289661A1 (en) | Bi-directional readable two-dimensional bar code system and its reading method | |
JP5187382B2 (en) | Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus | |
JPS63115282A (en) | Bar code reader | |
JP2011076208A (en) | Method and device for reading stacked bar code information | |
JPH0238983B2 (en) | ||
JPH08263585A (en) | Bar code reading device | |
JP3690281B2 (en) | Information code | |
JP3636050B2 (en) | Optical information reader | |
US10223561B1 (en) | Barcode decoding method and barcode reader | |
JP2006134160A (en) | Optical information reading device | |
JPH08235300A (en) | Bar code reader |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051021 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070830 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070925 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071029 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080617 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080630 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110718 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4155156 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120718 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120718 Year of fee payment: 4 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120718 Year of fee payment: 4 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130718 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130718 Year of fee payment: 5 |
|
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 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |