JP2004102348A - Recognition method of two-dimensional code - Google Patents

Recognition method of two-dimensional code Download PDF

Info

Publication number
JP2004102348A
JP2004102348A JP2002259140A JP2002259140A JP2004102348A JP 2004102348 A JP2004102348 A JP 2004102348A JP 2002259140 A JP2002259140 A JP 2002259140A JP 2002259140 A JP2002259140 A JP 2002259140A JP 2004102348 A JP2004102348 A JP 2004102348A
Authority
JP
Japan
Prior art keywords
code
dark
cell
dimensional
bright
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002259140A
Other languages
Japanese (ja)
Inventor
Toshinori Kikuchi
菊池 利徳
Kazunori Notoya
能登谷 和則
Kenichi Kadota
門田 健一
Tetsuo Saito
斉藤 哲夫
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.)
KOSAIDO CO Ltd
NIPPON TECHNART Inc
Showa Information Systems Co Ltd
Original Assignee
KOSAIDO CO Ltd
NIPPON TECHNART Inc
Showa Information Systems 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 KOSAIDO CO Ltd, NIPPON TECHNART Inc, Showa Information Systems Co Ltd filed Critical KOSAIDO CO Ltd
Priority to JP2002259140A priority Critical patent/JP2004102348A/en
Publication of JP2004102348A publication Critical patent/JP2004102348A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a recognition method of two-dimensional codes for positively performing logical and integral light/dark discrimination without performing complicated processing. <P>SOLUTION: In printing the objective two-dimensional code 1, a determination code 2 composed of a combination of a dark code cells 10b and light code cells 10w whose array is known, is printed in a prescribed position in the printing region. The objective two-dimensional code 1 is read together with the determination code 2 by an optical reader, and the light-dark boundary value of the dark code cells and light code cells is obtained based on the optical characteristic value of the dark code cells and the optical characteristic value of the light code cells of the read determination code. The dark code cells and light code cells of the read objective two-dimensional code are recognized based on the obtained light-dark boundary value. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、コンピュータ等に情報を入力するための光学的読み取りが可能な二次元コードの認識方法に関し、特に2進コードで表されるデータをセル化して二次元マトリックス状にパターンとして配置した二次元コードの認識方法に関する。
【0002】
【従来の技術】
この種の二次元コード1をトナー方式またはインクジェット方式などのプリンタで印刷する場合、図5に示されるように、一つのコードセル10が、たとえば4列×4行のドット100で構成される。そして、4列×4行すべてのドット100を黒色に印刷することで、暗(黒)のコードセル10bが印刷され、4列×4行すべてのドット100を白色に印刷する(すなわち、インクを吐出しない。)ことで明(白)のコードセル10wが印刷される。このようにして、明暗(白黒)の2進コードで表される所望のデータを二次元マトリックス状に用紙に印刷することができる。
【0003】
【発明が解決しようとする課題】
しかしながら、従来の二次元コード1の黒色のコードセル10bを印刷する場合においては、印刷方式や用紙の影響によって、一つのドット100の周辺にインクが飛散したり、インクが用紙に滲んだりして黒色のコードセル10bが膨張する傾向にあった。このため、二次元コードにおいて、図6に示すように黒色のコードセル10bに囲まれた白のコードセル10wは、黒のコードセル10bの膨張によって面積が狭まり、これを光学的読み取り装置で読み込むと黒色に近い灰色として誤認識されることがあった。
【0004】
一方、黒色のコードセルにおいても用紙やプリンタの状況によっては濃淡差が生じるので、場合によっては灰色に近い黒色に印刷されることもあり、極端な場合には、白色のコードセル10wと黒色のコードセル10bとを区別できないといった問題があった。
【0005】
こうした問題を解決するため、たとえば特許第2867904号では、二次元画像の検出装置からの走査線信号の状態に応じて2値化のしきい値を調節したり、前回以前の二次元画像における2値化状態に応じて今回のしきい値を調節することが提案されている。
【0006】
しかしながら、前者の方法は、たとえば全体が黒っぽい場合は白の方向へ任意の量だけしきい値を下げ、全体が白っぽい場合は黒の方向へ任意の量だけしきい値を上げ、認識することができたしきい値のみを、求めるしきい値とする、いわゆる試行錯誤方式又は比較方式であるため、しきい値を調節するのに時間がかかるといった問題があった。
【0007】
また、後者の方法は、過去の2値化状態をフィードバックする経験的比較方式であることから、認識確率が安定するまでの立ち上がりに時間がかかるという問題があった。また、印刷状況が変化するとフィードバックしたしきい値が適切でなくなるといった問題もあった。
【0008】
【課題を解決するための手段】
本発明は、複雑な処理を行うことなく、論理的かつ一元的に明暗の識別を確実に行うことができる二次元コードの認識方法を提供することを目的とする。
【0009】
本発明によれば、明暗の2進コードで表されるデータをセル化して二次元マトリックス状にパターンとして配置された二次元コードを光学的読み取り装置を用いて認識する二次元コードの認識方法であって、目的とする二次元コードを印刷する際に、当該印刷領域内の所定位置に、暗コードセルと明コードセルとの組み合わせで構成され、その配列が既知である判定コードを印刷するステップと、前記目的とする二次元コードを前記判定コードとともに光学的読み取り装置で読み取るステップと、前記読み取られた目的とする二次元コードと判定コードから判定コードを抽出するステップと、前記抽出された判定コードの暗コードセルの光学特性値と明コードセルの光学特性値とに基づいて、暗コードセルと明コードセルとの明暗境界値を求めるステップと、前記求められた明暗境界値を基準にして前記読み取られた目的とする二次元コードの暗コードセルと明コードセルとを認識するステップとを有する二次元コードの認識方法が提供される。
【0010】
本発明の二次元コードの認識方法では、まず目的とする二次元コードを印刷する際に、当該印刷領域内の所定位置に、暗コードセルと明コードセルとの組み合わせで構成され、その配列が既知である判定コードを印刷しておく。
【0011】
そして、目的とする二次元コードを判定コードとともに光学的読み取り装置で読み取り、この読み取られた二次元画像データのうちの判定コードの暗コードセルの光学特性値と明コードセルの光学特性値とを検出し、これらの値に基づいて、暗コードセルと明コードセルとの明暗境界値を求める。この明暗境界値は、暗コードセルの光学特性値と明コードセルの光学特性値とによって一義的に定まるように論理化しておくことが望ましい。
【0012】
判定コードの読み取りデータにより明暗境界値が求められたら、これを基準にして、先に読み取られたデータの中の目的とする二次元コードの暗コードセルと明コードセルとを認識する。
【0013】
本発明では、同じ二次元コード内に、暗コードセルと明コードセルとの配列が既知である判定コードを印刷しておくので、インクの飛散や滲みといった印刷状況は、当該判定コードも目的とする二次元コードも等しくなる。そして、同時に読み取られた二次元画像データを用い、配列が既知である判定コードを用いて実際の暗コードセルの光学特性値と明コードセルの光学特性値を検出し、たとえばその中間値といった明暗境界値を一義的に決定する。こうして決定された明暗境界値は、今読み取られた二次元画像データに対しては最も実際の値に近い値となるので、これを用いて目的とする二次元コードの明暗認識を行う。
【0014】
このように、本発明では、認識しようとする目的の二次元コードと同じ印刷条件で判定コードを印刷しているので、一元的な認識方法となり、その結果、インクの飛散や滲みによって暗コードセルや明コードセルの光学特性値が変動しても、それに適した明暗境界値(しきい値)を簡単に設定することができ、認識精度が著しく向上する。
【0015】
また、本発明では、検出された暗コードセルの光学特性値と明コードセルの光学特性値から論理的に明暗境界値を決定するので、試行錯誤することなく即座に適切なしきい値を求めることができる。
【0016】
【発明の実施の形態】
以下、本発明の実施形態を図面に基づいて説明する。
【0017】
図1は本発明に係る二次元コードと判定コードの一例を示す図である。二次元コード1は、4列×4行の二次元マトリックスのドットで構成されたコードセル10を、14列×8行の二次元マトリックス状にパターンとして配置したデータである。この14列×8行のうちの左上の3列×3行の位置を後述する判定コード2の印刷領域として割り当てる。ただし、判定コード2の種類によっては3列×3行の割り当て領域に限定されず、任意のm列×n行を割り当てることができる。
【0018】
同図に示す例では、1行目には、左から、暗コードセル10b、暗コードセル10b、暗コードセル10b、暗コードセル10b、明コードセル10w、暗コードセル10b、明コードセル10w、明コードセル10w、暗コードセル10b、明コードセル10w、暗コードセル10b、暗コードセル10b、明コードセル10w、暗コードセル10bという14個の2進データが配列され(このうち1乃至3列の3つの暗コードセル10bは判定コード2のもの)、また2行目には、左から、暗コードセル10b、明コードセル10w、暗コードセル10b、明コードセル10w、明コードセル10w、明コードセル10w、明コードセル10w、暗コードセル10b、明コードセル10w、明コードセル10w、明コードセル10w、暗コードセル10b、暗コードセル10b、暗コードセル10bという14個の2進データが配列されている(このうち1乃至3列の2つの暗コードセル10bと1つの明コードセル10wとは判定コード2のもの)。このようなマトリックス方式の二次元コード1は、バーコード方式とは異なり狭小な面積で多くの情報をもつことができる。
【0019】
本例のコードセル10の一例を図2に示す。同図に示すコードセル10は、4列×4行の二次元マトリックスのドットパターンで構成され、一つのドットがプリンタのたとえば一つの画素に対応する。同図(A)に示すコードセルが暗コードセル10bであり、同図(B)に示すコードセルが明コードセル10wである。
【0020】
同図(A)に示す暗コードセル10bは、4列×4行の16個のドットすべてが暗ドット100bで構成されている。具体的には、印刷時に暗ドット100bの部分をインクONとすることで印刷される。
【0021】
これに対して、同図(B)に示す明コードセル10wは、すべてのドット100が明ドット100wで構成されたものであり、具体的には印刷時にインクの吐出をOFFすることで印刷される。
【0022】
図3(A)乃至(C)は、本発明に係る判定コード2の例を示す図であるが、本発明の判定コードはこれら3形態にのみ限定はされな久、それぞれの判定コードを複数組み合わせたものなども用いることができる。
【0023】
同図(A)に示す判定コード2は、3列×3行の9個のコードセル10から構成され、中心に位置するセルのみが明コードセル10wとされ、この明コードセル10を取り囲む8つのコードセルがすべて暗コードセル10bとされたものである。この判定コード2では、中心に位置する明コードセル10wが、周囲に配列された暗コードセル10bのインクの飛散や滲みの影響を受けて、最も黒色に近い灰色に認識される可能性がある。したがって、この判定コード2を用いることで、最も黒色に近い明コードセル10wの光学特性値を検出することができ、その光学特性値と、周囲の暗コードセル10bから検出された光学特性値との、たとえば中間値を明暗境界値(しきい値)とすることで、明コードセル10wを暗コードセル10bと誤認識したり、逆に暗コードセル10bを明コードセル10wと誤認識したりすることが防止できる。
【0024】
これに対して、同図(B)に示す判定コード2は、3列×3行の9個のコードセル10から構成され、中心に位置するコードセル及び四隅に位置するコードセルが明コードセル10wとされ、それ以外のコードセルが暗コードセル10bとされたものである。
【0025】
また、同図(C)に示す判定コード2は、6列×3行の18個のコードセル10から構成され、外周に位置するコードセルが暗コードセル10bとされ、中央に位置する4個のコードセルのうち3個が明コードセル10wとされたものである。
【0026】
特に同図(A)や(C)に例示された判定コード2は、最外周のコードセルをすべて暗コード10bで構成しているので、目的とする二次元コードとともに印刷されても当該二次元コードの影響を受けることがない。また、周りをすべて暗コードセル10bで囲まれた明コードセル10wが最も反射光強度が小さくなるのが一般的であることから、同図(A)や(C)に示される判定コード2を用いることがより好ましい。特に、暗コードセル10bに囲まれた明コードセル10wを判定コード2として採用する場合、同図(A)に示すように一つよりも同図(C)に示すように複数存在した方が読み取り精度を向上させることができるので好ましい。この場合、平均値又は小さい方の値を利用する。
【0027】
こうした判定コード2は、図1に示す二次元コード1の中の、予め決められた位置に目的とする二次元コードと同時に印刷される。
【0028】
次に、図4を参照しながら本実施形態の処理手順について説明する。
【0029】
まず同図のルーチンに入る前、すなわち目的とする2値化データをセル化した二次元コードを印刷する際に、その二次元コードの所定位置に上述した判定コード2も同時に印刷する。図1に示す例では、二次元コード1の左上の3列×3行の位置に判定コード2を印刷する。このように、読み取り対象となる二次元コード1の中に判定コード2を同時に印刷することで、そのプリンターのそのときの印刷条件で、インクの飛散、滲み、かすれなどの印刷条件の変動があってもその変動は判定コード2にも反映されることになる。
【0030】
次に、同図に示すステップ1にて、光学的読み取り装置を用いて二次元コード1を読み取る。この場合、本例のように二次元コード1の中に判定コード2を埋め込んでおけば、二次元コード1と同時に自動的に判定コード2も読み取られることになる。このように、光学的読み取り装置により二次元コード1と判定コード2とを同時に読み取ることで、光学的読み取り装置の読み取り条件の変動も極力抑えることができる。
【0031】
読み取られた二次元コード1と判定コード2の二次元画像データは、ステップ2でメモリなどに一時的に記憶されるが、次のステップ3にて、この二次元画像データから判定コード2のみを抽出する。この処理は、判定コード2の印刷位置が既知であることから、二次元画像データからその位置にある情報を抽出することにより行われる。そして、抽出された判定コード2の二次元画像データから暗コードセル10bと明コードセル10wの光学特性値を検出する。なお、光学特性値は光学的読み取り装置の反射光に応じたディジタルデータで得ることができる。これをたとえば0〜255の値で表す。
【0032】
次のステップ4では、図3(A)に示す例の判定コード2では、中心に位置する明コードセル10wの反射光強度をそのまま明コードセル10wの光学特性値とする一方で、その周囲に配置された8個の暗コードセル10bの反射光強度のうち最も白色に近い値(または平均値)を暗コードセル10bの光学特性値とする。そして、これら明コードセル10wの光学特性値と暗コードセル10bの光学特性値の中央値(平均値)を演算し、それをしきい値たる明暗境界値とする。判定コード2の二次元画像データから得られた明コードセル10wの反射光強度が180、暗コードセル10bの反射光強度が50であるとすると、明暗境界値は115となる。なお、明暗境界値の求め方は中央値(平均値)に限定されることはなく、論理的なものであればよい。たとえば、明コードセル10wまたは暗コードセル10bの光学特性値に所定値だけ減算又は加算して明暗境界値とするなど、種々の方向が考えられる。このように、明コードセル10wおよび暗コードセル10bの光学特性値から一義的かつ即座に求め得る論理式とすることで、以降のステップへ迅速に移行することができる。
【0033】
なお、判定コード2であるとする二次元画像データが、たとえばすべてのコードセルが暗コードセルであると認識されたり、あるいは明コードセルであるべき位置以外にも明コードセルがあったと認識された場合は、判定コード2がないデータとしてエラー処理する。
【0034】
ステップ4にて明暗境界値を求めたら、メモリに一時的に記憶している判定コード2以外の二次元画像データを読み出し、その明暗境界値をしきい値にして明暗の判定を行う(ステップ5)。
【0035】
上述したように、本例では同じ印刷条件で印刷された判定コード2を用いて明コードセル10wと暗コードセル10bの光学特性値を検出し、これに基づいて明暗境界値を設定しているので、実際の印刷条件に最も適合したしきい値となる。その結果、印刷条件が変動しても明コードセル10wと暗コードセル10bを誤認識することが防止され、認識精度が著しく向上する。
【0036】
ステップ5にて二次元コード1の二次元画像データの明暗判定が終了したら、次の二次元コードの判定に移行する(ステップ6)。ここで、ステップ4にて求められた明暗境界値は、ステップ1で読み込まれた二次元コード1のみに使用するものであり、ステップ6にて別の二次元コード1を別の機会に読み取ったときは、そのときの判定コード2の光学特性値が用いられる。つまり、本例では、明暗境界値を一元的に決定するので、試行錯誤方式やフィードバック方式のように立ち上がりの認識精度が低下することもない。
【0037】
なお、以上説明した実施形態は、本発明の理解を容易にするために記載されたものであって、本発明を限定するために記載されたものではない。したがって、上記の実施形態に開示された各要素は、本発明の技術的範囲に属する全ての設計変更や均等物をも含む趣旨である。
【0038】
【発明の効果】
以上述べたように本発明によれば、暗コードセルを明コードセルと誤認識したり、明コードセルを暗コードセルと誤認識したりすることがなくなり、複雑な処理を行わなくとも読み取り精度を高めることができる。
【図面の簡単な説明】
【図1】本発明に係る二次元コードと判定コードの一例を示す図である。
【図2】本発明に係る二次元コードに係る一つのコードセル(4列×4行)の一例を示す図である。
【図3】本発明に係る判定コードの例を示す図である。
【図4】本発明の処理手順を示すフローチャートある。
【図5】従来の二次元コードを示す図である。
【図6】従来の二次元コードの問題点を説明するための明コードセルを示す図である。
【符号の説明】
1…二次元コード
10…コードセル
10b…暗コードセル
10w…明コードセル
100…ドット
100b…暗ドット
100w…明ドット
2…判定コード
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for recognizing an optically readable two-dimensional code for inputting information to a computer or the like, and more particularly, to a method in which data represented by a binary code is converted into cells and arranged as a pattern in a two-dimensional matrix. The present invention relates to a method for recognizing a dimension code.
[0002]
[Prior art]
When printing this kind of two-dimensional code 1 with a printer of a toner system or an inkjet system, as shown in FIG. 5, one code cell 10 is constituted by dots 100 of, for example, 4 columns × 4 rows. Then, by printing all the dots 100 in 4 columns × 4 rows in black, the dark (black) code cell 10b is printed, and all the dots 100 in 4 columns × 4 rows are printed in white (that is, ink is No ejection is performed), thereby printing the light (white) code cell 10w. In this manner, desired data represented by a light-dark (black and white) binary code can be printed on a sheet in a two-dimensional matrix.
[0003]
[Problems to be solved by the invention]
However, in the case of printing the black code cell 10b of the conventional two-dimensional code 1, the ink scatters around one dot 100 or the ink spreads on the paper due to the printing method and the influence of the paper. The black code cell 10b tended to expand. For this reason, in the two-dimensional code, as shown in FIG. 6, the area of the white code cell 10w surrounded by the black code cell 10b is reduced by the expansion of the black code cell 10b, and the area is read by the optical reader. Was sometimes erroneously recognized as gray close to black.
[0004]
On the other hand, even in the case of a black code cell, a difference in shading occurs depending on the condition of the paper and the printer. In some cases, the black code cell may be printed in black close to gray. In an extreme case, the white code cell 10w and the black code cell may be used. There has been a problem that it cannot be distinguished from the code cell 10b.
[0005]
In order to solve such a problem, for example, in Japanese Patent No. 2867904, a threshold value for binarization is adjusted according to the state of a scanning line signal from a two-dimensional image detection device, It has been proposed to adjust the current threshold value according to the state of value.
[0006]
However, in the former method, for example, if the whole image is dark, the threshold value is decreased by an arbitrary amount in the white direction, and if the entire image is dark, the threshold value is increased by an arbitrary amount in the black direction. The so-called trial-and-error method or the comparison method uses only the threshold value obtained as the threshold value to be obtained, and thus it takes a long time to adjust the threshold value.
[0007]
Further, the latter method is an empirical comparison method in which the past binarized state is fed back, and thus has a problem that it takes time to start until the recognition probability is stabilized. There is also a problem that the threshold value fed back becomes inappropriate when the printing status changes.
[0008]
[Means for Solving the Problems]
SUMMARY OF THE INVENTION An object of the present invention is to provide a two-dimensional code recognition method capable of logically and unitarily distinguishing light and dark without performing complicated processing.
[0009]
According to the present invention, there is provided a two-dimensional code recognizing method for recognizing a two-dimensional code arranged as a pattern in a two-dimensional matrix by converting data represented by a light and dark binary code into cells using an optical reading device. A step of printing, at a predetermined position in the printing area, a determination code composed of a combination of a dark code cell and a bright code cell, the arrangement of which is known, when printing a target two-dimensional code; Reading the target two-dimensional code together with the determination code by an optical reading device; extracting a determination code from the read target two-dimensional code and the determination code; and A light / dark boundary value between the dark code cell and the light code cell is calculated based on the optical characteristic value of the dark code cell and the optical characteristic value of the light code cell. And a step of recognizing a dark code cell and a light code cell of the read target two-dimensional code based on the obtained light / dark boundary value. You.
[0010]
In the two-dimensional code recognition method of the present invention, first, when printing a target two-dimensional code, at a predetermined position in the printing area, it is configured by a combination of dark code cells and bright code cells, and the arrangement thereof is A known judgment code is printed.
[0011]
Then, the target two-dimensional code is read together with the determination code by an optical reader, and the optical characteristic value of the dark code cell and the optical characteristic value of the bright code cell of the determination code in the read two-dimensional image data are determined. Then, based on these values, a light / dark boundary value between the dark code cell and the light code cell is obtained. It is desirable that the light / dark boundary value be logically defined so as to be uniquely determined by the optical characteristic value of the dark code cell and the optical characteristic value of the bright code cell.
[0012]
When the light / dark boundary value is obtained from the read data of the judgment code, the dark code cell and the light code cell of the target two-dimensional code in the previously read data are recognized based on this.
[0013]
In the present invention, a determination code in which the arrangement of dark code cells and light code cells is known is printed in the same two-dimensional code. The two-dimensional code to be executed is also equal. Then, using the two-dimensional image data read at the same time, the actual optical characteristic value of the dark code cell and the optical characteristic value of the bright code cell are detected by using a determination code having a known arrangement, and for example, the light / dark value such as an intermediate value is detected. The boundary value is uniquely determined. Since the thus determined light / dark boundary value is a value closest to the actual value for the currently read two-dimensional image data, the light / dark recognition of the target two-dimensional code is performed using this.
[0014]
As described above, in the present invention, since the judgment code is printed under the same printing conditions as the two-dimensional code to be recognized, a unified recognition method is used. As a result, the dark code cell Even if the optical characteristic value of the bright code cell fluctuates, it is possible to easily set a light / dark boundary value (threshold) suitable for the fluctuation, and the recognition accuracy is remarkably improved.
[0015]
Further, in the present invention, since the light / dark boundary value is logically determined from the detected optical characteristic value of the dark code cell and the optical characteristic value of the bright code cell, an appropriate threshold value can be obtained immediately without trial and error. Can be.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0017]
FIG. 1 is a diagram showing an example of a two-dimensional code and a determination code according to the present invention. The two-dimensional code 1 is data in which code cells 10 formed of dots of a two-dimensional matrix of four columns × 4 rows are arranged as a pattern in a two-dimensional matrix of 14 columns × 8 rows. The position of 3 columns × 3 rows at the upper left of the 14 columns × 8 rows is assigned as a print area of a determination code 2 described later. However, depending on the type of the determination code 2, it is not limited to the allocation area of 3 columns × 3 rows, and any m columns × n rows can be allocated.
[0018]
In the example shown in the figure, in the first row, from the left, from the left, the dark code cell 10b, the dark code cell 10b, the dark code cell 10b, the dark code cell 10b, the bright code cell 10w, the dark code cell 10b, and the bright code cell 10w. , 14 binary data of bright code cell 10w, dark code cell 10b, bright code cell 10w, dark code cell 10b, dark code cell 10b, bright code cell 10w, and dark code cell 10b are arrayed (of these, 1 to 10). The three dark code cells 10b in the three columns are those of the judgment code 2), and in the second row, from the left, the dark code cell 10b, the bright code cell 10w, the dark code cell 10b, the bright code cell 10w, and the bright code cell. 10w, bright code cell 10w, bright code cell 10w, dark code cell 10b, bright code cell 10w, bright code cell 10w, bright code cell 10w, dark 14 binary data, ie, a dark cell 10b, a dark code cell 10b, and a dark code cell 10b (two dark code cells 10b in one to three rows and one bright code cell 10w are included in the judgment code 2). Stuff). The two-dimensional code 1 of such a matrix method can have a large amount of information in a small area unlike the bar code method.
[0019]
FIG. 2 shows an example of the code cell 10 of the present embodiment. The code cell 10 shown in FIG. 1 is composed of a two-dimensional matrix dot pattern of 4 columns × 4 rows, and one dot corresponds to, for example, one pixel of the printer. The code cell shown in FIG. 3A is a dark code cell 10b, and the code cell shown in FIG. 3B is a bright code cell 10w.
[0020]
In the dark code cell 10b shown in FIG. 3A, all 16 dots of 4 columns × 4 rows are constituted by dark dots 100b. Specifically, printing is performed by turning on the ink at the dark dot 100b during printing.
[0021]
On the other hand, in the bright code cell 10w shown in FIG. 3B, all the dots 100 are composed of the bright dots 100w. Specifically, the bright code cell 10w is printed by turning off the ink ejection during printing. You.
[0022]
FIGS. 3A to 3C are diagrams showing examples of the determination code 2 according to the present invention. However, the determination code of the present invention is not limited to only these three forms. Combinations and the like can also be used.
[0023]
The determination code 2 shown in FIG. 3A is composed of nine code cells 10 in 3 columns × 3 rows, and only the cell located at the center is a bright code cell 10w, and the bright code cell 10w surrounds the bright code cell 10w. One of the code cells is a dark code cell 10b. In this determination code 2, there is a possibility that the bright code cell 10w located at the center is recognized as gray closest to black due to the influence of the scattering or bleeding of the ink of the dark code cells 10b arranged around. . Therefore, by using the determination code 2, the optical characteristic value of the bright code cell 10w which is the closest to black can be detected, and the optical characteristic value and the optical characteristic value detected from the surrounding dark code cell 10b can be detected. For example, by setting the intermediate value as a light / dark boundary value (threshold), the light code cell 10w is erroneously recognized as the dark code cell 10b, and conversely, the dark code cell 10b is erroneously recognized as the light code cell 10w. Can be prevented.
[0024]
On the other hand, the judgment code 2 shown in FIG. 3B is composed of nine code cells 10 in three columns and three rows, and the code cell located at the center and the code cells located at the four corners are bright code cells. 10w, and the other code cells are dark code cells 10b.
[0025]
The determination code 2 shown in FIG. 3C is composed of 18 code cells 10 in 6 columns × 3 rows, the code cells located on the outer periphery are dark code cells 10b, and the four code cells located in the center are Are three bright code cells 10w.
[0026]
In particular, the judgment code 2 illustrated in FIGS. 7A and 7C includes the dark code 10b in all of the outermost code cells. Not affected by code. Since the bright code cell 10w, which is entirely surrounded by the dark code cells 10b, generally has the lowest reflected light intensity, the judgment code 2 shown in FIGS. It is more preferable to use. In particular, when the bright code cell 10w surrounded by the dark code cell 10b is used as the determination code 2, it is preferable that a plurality of the code cells exist as shown in FIG. This is preferable because reading accuracy can be improved. In this case, the average value or the smaller value is used.
[0027]
Such a determination code 2 is printed at a predetermined position in the two-dimensional code 1 shown in FIG. 1 at the same time as a target two-dimensional code.
[0028]
Next, the processing procedure of the present embodiment will be described with reference to FIG.
[0029]
First, before entering the routine of FIG. 2, that is, when printing a two-dimensional code obtained by converting the target binarized data into cells, the above-described determination code 2 is also printed at a predetermined position of the two-dimensional code. In the example shown in FIG. 1, the determination code 2 is printed at the position of 3 columns × 3 rows at the upper left of the two-dimensional code 1. As described above, by simultaneously printing the determination code 2 in the two-dimensional code 1 to be read, the printing conditions such as scattering, bleeding, and blurring of the ink in the printing conditions at that time of the printer are not affected. However, the change is also reflected in the determination code 2.
[0030]
Next, in step 1 shown in the figure, the two-dimensional code 1 is read using an optical reading device. In this case, if the judgment code 2 is embedded in the two-dimensional code 1 as in this example, the judgment code 2 is automatically read simultaneously with the two-dimensional code 1. As described above, by simultaneously reading the two-dimensional code 1 and the determination code 2 by the optical reading device, it is possible to minimize the fluctuation of the reading conditions of the optical reading device.
[0031]
The read two-dimensional image data of the two-dimensional code 1 and the determination code 2 are temporarily stored in a memory or the like in step 2, but in the next step 3, only the determination code 2 is extracted from the two-dimensional image data. Extract. This process is performed by extracting information at the position from the two-dimensional image data because the print position of the determination code 2 is known. Then, the optical characteristic values of the dark code cell 10b and the bright code cell 10w are detected from the extracted two-dimensional image data of the determination code 2. The optical characteristic value can be obtained as digital data corresponding to the reflected light of the optical reading device. This is represented by a value of 0 to 255, for example.
[0032]
In the next step 4, in the determination code 2 of the example shown in FIG. 3A, the reflected light intensity of the bright code cell 10w positioned at the center is directly used as the optical characteristic value of the bright code cell 10w, The value closest to white (or the average value) among the reflected light intensities of the eight arranged dark code cells 10b is set as the optical characteristic value of the dark code cell 10b. Then, the median value (average value) of the optical characteristic value of the bright code cell 10w and the optical characteristic value of the dark code cell 10b is calculated, and the calculated value is set as a light-dark boundary value as a threshold value. Assuming that the reflected light intensity of the bright code cell 10w obtained from the two-dimensional image data of the determination code 2 is 180 and the reflected light intensity of the dark code cell 10b is 50, the light / dark boundary value is 115. Note that the method of obtaining the light-dark boundary value is not limited to the median value (average value), but may be any logical one. For example, various directions are conceivable, such as subtracting or adding a predetermined value to or from the optical characteristic value of the light code cell 10w or the dark code cell 10b to obtain a light / dark boundary value. In this manner, by using a logical expression that can be uniquely and immediately obtained from the optical characteristic values of the bright code cell 10w and the dark code cell 10b, it is possible to quickly shift to the subsequent steps.
[0033]
It should be noted that the two-dimensional image data that is the determination code 2 is recognized as, for example, all code cells are recognized as dark code cells, or it is recognized that there is a bright code cell in a position other than the position where it should be a bright code cell. If it does, error processing is performed as data without the judgment code 2.
[0034]
When the light / dark boundary value is obtained in step 4, two-dimensional image data other than the judgment code 2 temporarily stored in the memory is read out, and the light / dark boundary value is used as a threshold to determine light / dark (step 5). ).
[0035]
As described above, in this example, the optical characteristic values of the bright code cell 10w and the dark code cell 10b are detected using the determination code 2 printed under the same printing conditions, and the light / dark boundary value is set based on the detected values. Therefore, the threshold value is most suitable for the actual printing conditions. As a result, erroneous recognition of the bright code cell 10w and the dark code cell 10b is prevented even if the printing conditions fluctuate, and the recognition accuracy is significantly improved.
[0036]
When the light / dark determination of the two-dimensional image data of the two-dimensional code 1 is completed in step 5, the process proceeds to the next two-dimensional code determination (step 6). Here, the light-dark boundary value obtained in step 4 is used only for the two-dimensional code 1 read in step 1, and another two-dimensional code 1 is read in another opportunity in step 6. At that time, the optical characteristic value of the judgment code 2 at that time is used. That is, in this example, since the light-dark boundary value is determined in a unified manner, the recognition accuracy of the rising edge does not decrease unlike the trial-and-error method or the feedback method.
[0037]
The embodiments described above are described for facilitating the understanding of the present invention, and are not described for limiting the present invention. Therefore, each element disclosed in the above embodiment is intended to include all design changes and equivalents belonging to the technical scope of the present invention.
[0038]
【The invention's effect】
As described above, according to the present invention, the erroneous recognition of a dark code cell as a bright code cell and the erroneous recognition of a bright code cell as a dark code cell are eliminated, and the reading accuracy is improved without performing complicated processing. Can be increased.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of a two-dimensional code and a determination code according to the present invention.
FIG. 2 is a diagram showing an example of one code cell (4 columns × 4 rows) according to a two-dimensional code according to the present invention.
FIG. 3 is a diagram showing an example of a determination code according to the present invention.
FIG. 4 is a flowchart showing a processing procedure of the present invention.
FIG. 5 is a diagram showing a conventional two-dimensional code.
FIG. 6 is a diagram showing a bright code cell for explaining a problem of a conventional two-dimensional code.
[Explanation of symbols]
1 2D code 10 code cell 10b dark code cell 10w bright code cell 100 dot 100b dark dot 100w bright dot 2 determination code

Claims (4)

明暗の2進コードで表されるデータをセル化して二次元マトリックス状にパターンとして配置された二次元コードを光学的読み取り装置を用いて認識する二次元コードの認識方法であって、
目的とする二次元コードを印刷する際に、当該印刷領域内の所定位置に、暗コードセルと明コードセルとの組み合わせで構成され、その配列が既知である判定コードを印刷するステップと、
前記目的とする二次元コードを前記判定コードとともに光学的読み取り装置で読み取るステップと、
前記読み取られた目的とする二次元コードと判定コードから判定コードを抽出するステップと、
前記抽出された判定コードの暗コードセルの光学特性値と明コードセルの光学特性値とに基づいて、暗コードセルと明コードセルとの明暗境界値を求めるステップと、
前記求められた明暗境界値を基準にして前記読み取られた目的とする二次元コードの暗コードセルと明コードセルとを認識するステップとを有する二次元コードの認識方法。
A two-dimensional code recognizing method for recognizing a two-dimensional code arranged as a pattern in a two-dimensional matrix by converting data represented by a light and dark binary code into a cell using an optical reading device,
When printing a two-dimensional code of interest, at a predetermined position in the print area, configured by a combination of dark code cells and bright code cells, the step of printing a determination code whose arrangement is known,
Reading the target two-dimensional code with the determination code by an optical reading device,
Extracting a determination code from the read target two-dimensional code and the determination code,
Based on the optical characteristic value of the dark code cell and the optical characteristic value of the bright code cell of the extracted determination code, a step of obtaining a light-dark boundary value between the dark code cell and the bright code cell,
Recognizing a dark code cell and a bright code cell of the read target two-dimensional code on the basis of the determined light / dark boundary value.
前記判定コードは、中央に明コードセルが配置され、この明コードセルの周囲が暗コードセルで囲まれた3列×3行の二次元コードである請求項1記載の二次元コードの認識方法。2. The two-dimensional code recognition method according to claim 1, wherein the determination code is a two-dimensional code having three columns and three rows, in which a bright code cell is arranged in the center, and the bright code cell is surrounded by dark code cells. . 前記判定コードは、中央及び四隅に明コードセルが配置され、その他の位置に暗コードセルが配置された3列×3行の二次元コードである請求項1記載の二次元コードの認識方法。2. The two-dimensional code recognition method according to claim 1, wherein the determination code is a three-column × three-row two-dimensional code in which bright code cells are arranged at the center and four corners, and dark code cells are arranged at other positions. 前記判定コードは、すべての外周に暗コードセルが配置され、中央の一部に明コードセルが配置された請求項1記載の二次元コードの認識方法。2. The two-dimensional code recognizing method according to claim 1, wherein the determination code has dark code cells arranged on all outer circumferences and bright code cells arranged at a part of the center.
JP2002259140A 2002-09-04 2002-09-04 Recognition method of two-dimensional code Pending JP2004102348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002259140A JP2004102348A (en) 2002-09-04 2002-09-04 Recognition method of two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002259140A JP2004102348A (en) 2002-09-04 2002-09-04 Recognition method of two-dimensional code

Publications (1)

Publication Number Publication Date
JP2004102348A true JP2004102348A (en) 2004-04-02

Family

ID=32260267

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002259140A Pending JP2004102348A (en) 2002-09-04 2002-09-04 Recognition method of two-dimensional code

Country Status (1)

Country Link
JP (1) JP2004102348A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070061A (en) * 2007-09-12 2009-04-02 Ricoh Co Ltd Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program and recording medium
CN113592513A (en) * 2021-07-28 2021-11-02 李映霆 Anti-counterfeiting method and system for combined use of light and shade codes

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070061A (en) * 2007-09-12 2009-04-02 Ricoh Co Ltd Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program and recording medium
CN113592513A (en) * 2021-07-28 2021-11-02 李映霆 Anti-counterfeiting method and system for combined use of light and shade codes
CN113592513B (en) * 2021-07-28 2024-04-09 李映霆 Anti-counterfeiting method and system for combined use of light and shade codes

Similar Documents

Publication Publication Date Title
US6438271B1 (en) Image reading apparatus
KR0145763B1 (en) Image forming apparatus
EP0621541B1 (en) Method and apparatus for automatic language determination
US6606396B1 (en) Method and apparatus for detecting forgery
US11001077B2 (en) System and methods for detecting malfunctioning nozzles in a digital printing press
US20080018951A1 (en) Image processing apparatus and control method thereof
US7957576B2 (en) Image processing apparatus, image processing method, and image processing program
JP2009230287A (en) Reading apparatus, written information processing system, controller for reading apparatus, and program
JP2004280334A (en) Image reading device
US8314972B2 (en) Image processing program, image processing apparatus, and image processing method for suppressing see-through photo-optical appearance
JP2004102348A (en) Recognition method of two-dimensional code
JP2004202795A (en) Image processor and its method
US8330997B2 (en) Image processing apparatus, image forming apparatus and image processing method
JP2004102350A (en) Two-dimensional code and its printing method
JP2812256B2 (en) Character recognition apparatus and method
JP4384791B2 (en) Print detection device
JP3636050B2 (en) Optical information reader
US6701013B1 (en) System for recognition of hand-written characters
US20240031495A1 (en) Image forming apparatus, control method for image forming apparatus, and storage medium
JP2004056181A (en) Image processor
US8155376B2 (en) Image processor, image forming apparatus, image processing method and computer readable medium
JP2716291B2 (en) Paper information input device
EP1178428A1 (en) Dot code and two-dimensional code
JP2000293644A (en) Dot code and two-dimensional code
JP2932387B1 (en) Optical reading form reading method and reading apparatus