JP4567151B2 - 2D code creation method and paper with 2D code - Google Patents

2D code creation method and paper with 2D code Download PDF

Info

Publication number
JP4567151B2
JP4567151B2 JP2000200802A JP2000200802A JP4567151B2 JP 4567151 B2 JP4567151 B2 JP 4567151B2 JP 2000200802 A JP2000200802 A JP 2000200802A JP 2000200802 A JP2000200802 A JP 2000200802A JP 4567151 B2 JP4567151 B2 JP 4567151B2
Authority
JP
Japan
Prior art keywords
modulation
column
matrix
row
code
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
JP2000200802A
Other languages
Japanese (ja)
Other versions
JP2002024781A (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.)
Japan Cash Machine Co Ltd
Original Assignee
Japan Cash Machine 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 Japan Cash Machine Co Ltd filed Critical Japan Cash Machine Co Ltd
Priority to JP2000200802A priority Critical patent/JP4567151B2/en
Publication of JP2002024781A publication Critical patent/JP2002024781A/en
Application granted granted Critical
Publication of JP4567151B2 publication Critical patent/JP4567151B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、2進コードで表示されるデータを2次元のマトリックスとして配置した、いわゆる2次元コードの作成方法および2次元コードを備えた用紙に関するものである。
【0002】
【従来の技術】
従来、図6に示すような2次元コード100が知られている。この2次元コード100は、カード形式からなる各種の有価証券(例えば商品券や入場券)や帳票類等の用紙Pに印刷表示されるものであり、用紙Pを、読取り装置に供給して読み取らせることによりコードに付与された情報が認識される。1次元で直線的に情報を表示するバーコードと比較して平面的な広がりを持っているため、より多くの情報を付与することができることから、今後2次元コード100は利用が進むと考えられる。
【0003】
かかる2次元コード100は、行Niおよび列Mjに区切られた各区画(セルSij)に、「0」を示す白色と、「1」を示す黒色との内のいずれか一方が印刷されることにより形成されている。因みに、白色については用紙の地色を当てるのが一般的であるから、実際は「1」を示す黒色のみが印刷されて2次元コード100が形成されている。
【0004】
このような2次元コードを読み取る読取り装置は、用紙Pを装置内部に送り込む送込み手段と、この送込み手段の駆動で移動しつつある用紙に対し進行方向に直交する方向に走査して各行NiのセルSijの値を読み取る走査手段とを備えて構成されている。従って、用紙Pを読取り装置に通すことにより、走査手段が各行Niについて各列Mjの値(「0」または「1」)を順次読み取っていき、用紙Pが走査手段を通過したき、各セルSijの値(「0」または「1」)が全て読み取られることになる。
【0005】
ところで、走査手段による走査の時間間隔(行Niと行Ni+1との間の走査の時間間隔)は、予め設定されているため、この時間間隔と送込み手段の送込み速度とを同期させることにより(例えば1行の走査毎に1行分だけ用紙Pを送り込むようにする等)、隣接する行間で混同が生じないように各行Niを区切った形で各行Niにおける各列Mjの値を正確に読み取っていくことができるが、送込み手段による送込み速度は、負荷の変動や電圧の変動等によって必ずしも一定しないため、走査手段が読み取った行Niのデータが必ずしもその行のデータであるとは確定されない。
【0006】
そこで、従来、このような不都合の生じることがないように、2次元コード100の幅方向の両側部にそれぞれ1列に亘った合計2列の位置決めコード101が設けられ、この位置決めコード101に各行Niに対応するように位置決めセルCSiが設定されている。そして、各位置決めセルCSiには黒色(「1」)、白色(「0」)が交互に印刷され、走査手段がこの位置決めセルCSiを読み取ることによって、この値の変わり目がつぎの行Niであると認識されるようになされている。こうすることによってたとえ用紙Pの送り込み速度が変動しても、行毎のデータが混同するような不都合は起こらない。
【0007】
【発明が解決しようとする課題】
しかしながら、2次元コード100の両側部に位置決めセルCSiを設ける従来の方式にあっては、用紙Pにおける2次元コード100のための全体的な領域面積が制限されているときは位置決めセルCSiの存在によって2次元コード100の容量がその分小さくなる一方、2次元コード100の容量を確保しようとすれば用紙Pの全体的な領域面積を大きくしなければならなくなるという問題点を有している。
【0008】
また、読取り装置は、2次元コード100の読み取りとは別に位置決めコード101を読み取って行変わりが行われたか否かを常にチェックしなければならず、この処理のためにアクセス時間が長引き、2次元コード100を高速で読み取ることが困難になるという問題点も存在する。
【0009】
さらに、従来の2次元コード100は、元データを単純に2進数変換して「0」を白色に、「1」を黒色にしているだけであるため、各色を「0」、「1」に戻すだけで元データが2進数で得られ、データの内容を極めて容易に解読することができることからデータの秘密保持に関しセキュリティ上も問題がある。
【0010】
本発明は、上記のような問題点を解消するためになされたものであり、2次元コードに隣接して位置決めコードを設けることなく2次元コードの各セルの値を正しく読み取ることが可能であり、かつ、セキュリティ上の対策もなされた2次元コードの作成方法および2次元コードを備えた用紙を提供することを目的としている。
【0011】
【課題を解決するための手段】
請求項1記載の発明は、n行、m列の行列の各要素に異なる2色のいずれか一方が付与されてなる2次元コードの作成方法であって、元データを2進数化した複数の2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)の各要素について各行毎に要素の第1列から第m−1列に対応するように所定の手順で得られる変調要素を、変調要素の第1列を除いて第2列から順次割り当てるとともに、変調要素の第1列は所定の要素として設定することにより上記2次元コードに対応した2進数の要素からなる変調コード行列|Aij|(i=1〜n、j=1〜m)を作成し、この変調コード行列|Aij|の各要素に対応した着色を所定の用紙に施すことにより2次元コードを作成するものであり、上記所定の手順として、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について、2進数元データ行列|Bij|の各行毎に変調要素と対応した2進数元データ行列|Bij|の対応列の要素が「0」であるか「1」であるかを判別し、対応列の要素が「0」のときはその変調要素をつぎの列の変調要素とする一方、対応列の要素が「1」のときはつぎの列の変調要素をその変調要素と異なる変調要素に変える変調処理を行なうとともに、第1列目の変調要素を「0」とした場合と「1」とした場合のいずれかの変調処理を選択することとし、第2行目以降の各行についての上記変調処理の選択としては、当該行と前の行との各列間の変調要素の差の絶対値の合計が大きくなる方の変調処理を選択することを特徴とする2次元コードの作成方法。である。
【0012】
請求項3記載の発明は、n行、m列の行列の各要素に異なる2色のいずれか一方が付与されてなる2次元コードを備えた用紙であって、元データを2進数化した複数の2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)の各要素について各行毎に要素の第1列から第m−1列に対応するように所定の手順で得られる変調要素を、変調要素の第1列を除いて第2列から順次割り当てるとともに、変調要素の第1列は所定の要素として設定することにより上記2次元コードに対応した2進数の要素からなる変調コード行列|Aij|(i=1〜n、j=1〜m)を作成し、この変調コード行列|Aij|の各要素に対応した着色が施されてなるものであり、上記所定の手順は、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について、2進数元データ行列|Bij|の各行毎に変調要素と対応した2進数元データ行列|Bij|の対応列の要素が「0」であるか「1」であるかを判別し、対応列の要素が「0」のときはその変調要素をつぎの列の変調要素とする一方、対応列の要素が「1」のときはつぎの列の変調要素をその変調要素と異なる変調要素に変える変調処理を行なうとともに、第1列目の変調要素を「0」とした場合と「1」とした場合のいずれかの変調処理を選択することとし、第2行目以降の各行についての上記変調処理の選択としては、当該行と前の行との各列間の変調要素の差の絶対値の合計が大きくなる方の変調処理を選択したものであることを特徴とする2次元コードを備えた用紙である。
【0013】
これらの発明によれば、所定の手順によって形成された変調コード行列|Aij|(i=1〜n、j=1〜m)は、2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)に比べて1列分のコード桁の増加があるが、各行の両端に位置決めコードを追加する従来のコード行列に比べて1列分だけ列数を少なくすることができるため、2次元コードのための全体的な領域面積が制限されているときは変調コード行列|Aij|の情報量を従来のものより多くすることができる一方、所定の情報量を確保するためには変調コード行列|Aij|用の用紙全体に占める領域面積を小さくすることができる。
【0014】
また、所定の手順を適切に設定することにより、位置決めコードを設けることなく変調コード行列|Aij|の各行そのものを互いに区別され得るものにすることが可能であり、2次元コードの読み取りとは別に位置決めコードを読み取って行変わりが行われたか否かを常にチェックしなければならない従来の不都合が解消され、アクセス時間の短縮化が実現するため、2次元コードは従来に比べて高速で読み取り得るものになる。
【0015】
さらに、変調コード行列|Aij|は、元データを単純に2進数変換したものではなく、所定の手順で2進数元データ行列|Bij|の要素を逐一調整要素に変換したものであるため、白色を「0」に、黒色を「1」に当て嵌めただけでは元データを再現することはできず、データの秘密保持を行う上で有効であり、セキュリティ上の問題が解消する。
【0018】
また、上記所定の手順では、2進数元データ行列|Bij|に対する上記変調処理によって変調コード行列|Aij|が得られる。この変調コード行列|Aij|において、各行の隣り合う要素を互いに比較して同一のときは「0」を設定する一方、同異なるときは「1」を設定し、このような処理を順次行うことで得られた行列は元の2進数元データ行列|Bij|になる。
【0019】
また、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について上記変調処理を行なうとともに、第1列目の変調要素を「0」とした場合と「1」とした場合のいずれかの変調処理を選択することとし、第2行目以降の各行についての上記変調処理の選択としては、当該行と前の行との各列間の変調要素の差の絶対値の合計が大きくなる方の変調処理を選択するようにしているため、2次元コードとして行間の差を顕著に表現し得る変調コード行列|Aij|が形成される。従って、従来のように位置決めコードを設けることなく、変調コード行列|Aij|の各行を順次読み込んでいくことにより、上記偏りに基づいて列の区別が容易に認識される。
【0020】
【発明の実施の形態】
図1は、本発明に係る2次元コードの一実施形態を示す図であり、(イ)は、コード行列の要素が白色および黒色に色分けされた状態、(ロ)は、白色を「0」、黒色を「1」に置き換えて2進数によるコード行列に変換した状態をそれぞれ示している。
【0021】
図1の(イ)に示すように、2次元コード100は、商品券や入場券等の用紙Pの所定領域に変調処理された各種の情報(例えば、年月日、整理番号、販売場所、金額、有効期限等)が印刷されるものであり、正方形状の複数の桝目が縦横で得られるように縦線および横線によって区切ることにより形成されている。なお、図1の(イ)に示す例では、図示の都合上、用紙Pの略全域に亘って2次元コード100が形成されているが、本発明は、2次元コード100が用紙Pの全域に亘って形成されることに限定されるものではなく、用紙Pの使用目的に応じた印字レイアウトに従って、隅部や中央部等の任意の位置に設定することができる。
【0022】
この2次元コード100は、上記複数の桝目(セル)によるn行の行Niと、m列の列Mjとの行列を備えて形成され、i行およびj列(但し、i=1〜n、j=1〜m)の桝目の位置、すなわちセルSijに白色または黒色が印刷されてその組み合わせで各種の情報が表示されるようになっている。白色については用紙Pの地色がそのまま採用されるのが一般的であるため、実際は所定のセルSijに黒色のみが印刷されて2次元コード100ができあがっている。因みに図1においては、2次元コード100は、図示の都合上、4行6列(n=4、m=6)のものを示しているが、本発明は2次元コード100が4行6列であることに限定されるものではない。
【0023】
そして、このような2次元コード100は、白色のセルSijが「0」、黒色のセルSijが「1」と決められている。従って、2次元コード100には、図1の(ロ)に示すように、各行毎に2進数の数字が記述された変調コード行列|Aij|と対応しているのである。
【0024】
因みに、図1に示す例では、(イ)に示すように、2次元コード100の第1行、第1列が白色になっているため、これに対応して変調コード行列|Aij|の第1行、第1列には、図1の(ロ)に示すように、「0」が設定されており、同様に2次元コード100の第1行、第2列の黒色に対応して変調コード行列|Aij|の第1行、第2列には「1」が設定されている。そして、変調コード行列|Aij|の第1行目には「011000」、第2行目には「000111」、第3行目には「110001」、第4行目には「100111」という2進数の数字情報がそれぞれ設定されていることになる。
【0025】
このような2次元コード100(すなわち変調コード行列|Aij|)は、年月日や整理番号等の生データを2進数化処理した元データ(2進数元データ行列|Bij|)に、さらに所定の変調処理を施すことによって形成されている。以下、この変調処理について、図2を基に説明する。
【0026】
図2は、図1の変調コード行列|Aij|に対応した2進数元データ行列|Bij|を示す図である。この図に示すように、2進数元データ行列|Bij|(i=1〜n(n=4)、j=1〜m−1(m−1=5))は、4行5列であり、変調後の変調コード行列|Aij|が4行6列であるのに対して1行少ない。逆の言い方をすれば、2進数元データ行列|Bij|を変調処理することにより、行の数が1つ増加して変調コード行列|Aij|になるのである。すなわち、2進数元データ行列|Bij|は、各行N′i毎に各列M′jの値が所定の変調処理で変調コード行列|Aij|の各行Ni毎の各列Mjの値に変えられて変調コード行列|Aij|が形成されている。図1および図2の具体例では、2進数元データ行列|Bij|(図2)の第1行目〜第4行目の「10100」、「00100」、「01001」および「10100」が、変調コード行列|Aij|(図1の(ロ))の「011000」、「000111」、「110001」、および「100111」に変調されているのである。
【0027】
図3は、変調処理を説明するための説明図である。この図を参照しながら、まず、2進数元データ行列|Bij|の第1行N′1(「10100」)を変調コード行列|Aij|の第1行N1(「011000」)に変調する場合を詳細に説明し、引き続き第2行N′2以下の変調について説明する。
【0028】
図3に示すように、変調を行うに当っては、変調コード行列|Aij|の第1行N1の第1列M1に「0」を設定して変調処理を施す変調処理▲1▼、および同「1」を設定して変調処理を施す変調処理▲2▼を行う。
【0029】
そして、上記各変調処理は、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合(変調処理▲1▼)および「1」とした場合(変調処理▲2▼)の各々について変調要素Aijの値を、同一列の2進数元データ行列|Bij|の要素Bijの値に応じて設定し、次の列の変調要素Aijを順次決定していくのである。そして、変調要素Aijの対応列の2進数元データ行列|Bij|の要素Bijが「0」のときはその列の変調要素Aijをつぎの列の変調要素Ai(j+1)とすることにより行う。すなわち、2進数元データ行列|Bij|の各要素Bijは、変調コード行列|Aij|の変調要素Aijを設定するときの制御信号(コマンド)としての役割を担っているのである。
【0030】
図3の具体例では、変調処理▲1▼の場合、2進数元データ行列|Bij|の第1行、第1列(要素B11)が「0」であるから、変調コード行列|Aij|の第1行、第1列(変調要素A11)の「0」が変調コード行列|Aij|の第1行、第2列(変調要素A12)に設定され、順次同様の処理が繰り返されることによって変調コード行列|Aij|の第1行N1は「011000」となる。同様に変調処理▲2▼の場合、変調コード行列|Aij|の第1行N1は「100111」となる。
【0031】
そして、変調コード行列|Aij|の第1行N1を決めるに際し、変調処理▲1▼および変調処理▲2▼のいずれの変調結果を採用するかは任意である。本実施形態においては、変調処理▲1▼の結果を採用している。
【0032】
つぎに、変調コード行列|Aij|の第2行N2を求めるに当っては、上記同様の変調処理▲1▼および変調処理▲2▼が実行され、変調処理▲1▼の結果として「000111」が、変調処理▲2▼の結果として「111000」が得られる。そして、変調コード行列|Aij|の第2行N2以下については、この行の各列と、直上の行の各列との差が逐一演算され、それらの絶対値の合計が多い方の変調処理結果が選択される。図3に示す例では、変調コード行列|Aij|の第1行N1と第2行N2の候補である変調処理▲1▼および▲2▼を併記すると、
第1行 「011000」
変調処理▲1▼ 「000111」
変調処理▲2▼ 「111000」
となる。
【0033】
そして、変調処理▲1▼の各列と、変調コード行列|Aij|の第1行N1の各列との差を逐一計算してそれらの絶対値を合計すると「6」になる。同様に、変調処理▲2▼の各列と、変調コード行列|Aij|の第1行N1の各列との差を逐一計算してそれらの絶対値を合計すると「1」になる。従って、絶対値の合計の大きい変調処理▲1▼の結果が変調コード行列|Aij|の第2行N2として選択されるのである。
【0034】
このような変調処理が、変調コード行列|Aij|の第3行N3以下についても同様に実行され、その結果として図1の(ロ)に示すような変調コード行列|Aij|を得ることができる。そして、このような処理で得られた変調コード行列|Aij|は、隣り合った行と行との間における同一の列間が異なった値になっている確率が非常に大きくなっているため、図1の(イ)に示すように、行間で黒白が極めて明確に区分されており、行の境界の視認が極めて容易であるばかりか、読取り装置で2次元コード100を読み取った場合も、装置内での行の区分処理を確実に行うことができる。
【0035】
以下、図4および図5を基に、2次元コード100の読み取りについて説明する。図4は、2次元コード100を読み取る読取り装置を説明するための読取り装置の模式的斜視図であり、図5は、CISによる読取り走査を説明するための説明図である。まず、図4に示すように、読取り装置1は、用紙Pを装置内に所定の送り速度で送り込む上下一対の送込みローラ2と、この送込みローラ2によって送り込まれつつある用紙Pの2次元コード100を読み取るCIS(contact image senser(接触式イメージラインセンサ))3と、このCIS3が読み取った各セルSijの値に所定の処理を施して各行Ni毎に区分する制御装置4とを備えて構成されている。
【0036】
上記CIS3は、用紙Pに対する対向面に、各列Mjに対応して設けられた複数の接物センサ3j(i=1〜m(本実施形態ではm=6(実際の接物センサ3jの数は6個より相当多いが先に説明した変調コード行列|Aij|の規模に合わせて6個としている))を有しており、これらの接物センサ3jに2次元コード100の紙面からの反射光が入光されるようになっている。そして、各接物センサ3jはこの入光を入光量に比例した電流値に変換して制御装置4に向けて出力するようになっている。かかるCIS3による2次元コード100の読み取りは予め設定された数μsec毎に間欠的に行われ、用紙Pが所定の速度で移動していることにより、2次元コード100の各行NiのセルSijを対象として1行当り数点のデータが採取されるようになされている。なお、2次元コード100の1行当りの接物センサ3jによるデータ採取点数は、用紙Pの移動速度が変動することによって変動するため、必ずしも一定にはなっていない。
【0037】
上記制御装置4は、CIS3の接物センサ3jが読み取った1組ずつのデータ(ラインデータ)から変調コード行列|Aij|の各行の区切りを判別して各変調要素Aijの値を確定するとともに、各変調要素Aij値を2進数元データ行列|Bij|の要素Bijに復元するように機能するものであり、データ変換部41と、ラインデータ比較部42と、行データ設定部43と、元データ復元部44と、適否判別部45とを備えている。適否判別部45による判別結果は出力装置46へ出力され、出力装置46が備えた機能により判別結果に基づく所定のアクション(例えば、変調コード行列|Aij|が入場券に付与されている場合に期限切れで不適と判別されたときは入場ゲートが閉止される等のアクション)が行われるようになっている。
【0038】
上記データ変換部41は、CIS3の接物センサ3jが2次元コード100から読み取った反射光の強弱に基づくアナログ量である電流値を「0」または「1」のディジタル値に変換するものである。2次元コード100をデータに変換するデータ変換部41内には予め設定された電流の閾値が入力されており、接物センサ3jからの電流値がこの閾値と比較されるようになされている。この閾値は、セルSijが白色のときの接物センサ3jからの電流値と、セルSijが黒色のときの接物センサ3jからの電流値との中間の電流値が採用されている。そして、電流値が閾値より大きいときは「0」(白色)と判別される一方、電流値が閾値より小さいときは「1」(黒色)と判別される。
【0039】
また、データ変換部41は、CIS3からの電流値をそのまま数値変換して記憶する機能をも有している。この数値変換された値は、つぎのラインデータ比較部42で2次元コード100の行区画を決定するときに使用される。
【0040】
上記ラインデータ比較部42は、CIS3の接物センサ3jによって逐一読み取られた2次元コード100の各列の電流値について、前回の値と今回の値とを比較し、どの時点で電流値が大きく変動しているかを見つけ出して行の区画を判別するものである。電流値としては、用紙PのセルSijが完全な黒体である場合を「0」、同完全な白色である場合を「10」とし、反射光の明るさに応じて0以上、10以下の値を付与したものが採用されている。
【0041】
以下、図5に示す例を基に行区画の判別方法について説明する。図5では、一点鎖線でCIS3による走査を表現するとともに、各セルSijに検出されたそのセルSijの電流値を記入している。すなわち、実際には用紙Pが図5の上方に向かって移動することにより静止しているCIS3によって2次元コード100の各セルSijの明るさ(すなわち電流値)が検出されるのであるが、図5では説明の便宜上、静止している用紙Pに対してCIS3が移動するようにしている。
【0042】
図5に示すように、まず第1回目の走査では、接物センサ31、32…3j…36がセルS11、S12…S1j…S16の反射光を読み取ってその強さを電流に変換し、データ変換部41に向けて出力する。データ変換部41は、この電流値をその大きさに応じて0〜10のいずれかの数値に変換する。図5の例では、2次元コード100のセルS11〜S16は、「白、黒、黒、白、白、白」であるから、電流値は「8、0、0、8、8、8」となる。なお、白色を「8」としたのは、用紙Pの地色が必ずしも完全な白色ではないからである。
【0043】
ついで、所定のインターバル時間の経過後、第2回目の操作が行われ、このときもS1j(j=1〜6)が読み取られ、検出される電流値は上記同様に「8、0、0、8、8、8」となる。そして、第2回目の検出が行われた直後に列毎の電流値の差がそれぞれ計算されたのち各差の絶対値の合計が以下の計算式により計算される。
【0044】
X=Σ|Xkj−X(k-1)j
(k=1〜12、j=1〜6)
但し、X:各列毎の今回電流値と前回電流値との差の合計
k:走査回数
j:2次元コード100の列数
kj:今回の走査におけるj列のセルの電流値
(k-1)j:前回の走査におけるj列のセルの電流値
そして、図5に示す例では、k=1およびk=2を対象として、
X=|8−8|+|0−0|+|0−0|+|8−8|+|8−8|+|8−8|=0
と「0」になるため、これによって第1回目の走査と第2回目の走査とは2次元コード100のセルSijにおいて同一列であると判別されるのである。なお、Xの値に基づく同一列であるか否かの判定は、今回の走査と前回の走査とで全ての列が白黒反転している場合のXの値の1/2を閾値として採用し、この閾値と等しいか大きいときに列が変わったと判別するようにしている。図5の例では閾値は、白を「8」、黒を「0」として「24」((8×6)/2)となる。
【0045】
第2回目の走査と第3回目の走査とを対象として得られるXの値も「0」になるため、第3回目の走査は第1行のものであることが判る。
【0046】
ついで、第3回目の走査の結果と第4回目の走査の結果とが比較される。この場合、第3回目の走査は第2回目と同様にセルSijの第1行目(i=1)を対象としているのに対し、第4回目の走査は、セルSijの第2行目(i=2)に掛かっているため、接物センサ3jによる電流の検出結果は「888000」になる。この第4回目の走査結果と、第3回目の走査結果とを比較してXを計算すると、
X=|8−8|+|8−0|+|8−0|+|0−8|+|0−8|+|0−8|=40
となり、閾値の「24」より大きいことによって第4回目の走査は、セルSijの第2行目のものが対象にされたと判別される。これによって第1回目〜第3回目までのCIS3による検出結果がセルSijの第1行目のものであったことが確定される。CIS3による同様の走査が以後も継続され、全部で12回繰り返されることにより全てのセルSijの値が確定する。
【0047】
なお、上記Xに代えて列間の差の自乗和Y、すなわち
Y=Σ(Xkj−X(k-1)j2
(k=1〜12、j=1〜6)
を採用してもよい。
【0048】
上記行データ設定部43は、上記ラインデータ比較部42によって比較された結果、セルSijの行が変わったと判別された時点で、前の行における各列の変調要素Aijの値を設定する働きをする。すなわち、図5の例では、第3回目の走査結果と、第4回目の走査結果とに基づいてセルSijの行が第1行から第2行に変わったと判別されたのであるから、各列の第1回から第3回までの検出結果の平均値が演算され、この平均値が第1行のデータとされるのである。具体的には、
セルS1j(j=1〜6)=「011000」
セルS2j(j=1〜6)=「000111」
セルS3j(j=1〜6)=「110001」
セルS4j(j=1〜6)=「100111」
となる。この変調コード行列|Aij|が、CIS3が2次元コード100から読み取り、ラインデータ比較部42が変換した値であり、この行列は行データ設定部43に記憶される。
【0049】
上記元データ復元部44は、行データ設定部43が記憶している変調コード行列|Aij|を2進数元データ行列|Bij|に復元する役割を果たすものである。ここでは、変調コード行列|Aij|において同一行内で変調要素Aijにつき互いに隣り合ったもの同士が順次比較され、同一であれば「0」が、異なっておれば「1」が設定されて行列が作られる。この行列が、2進数元データ行列|Bij|になるのである。
【0050】
例えば、変調要素A1j(j=1〜6)の場合は上記セルS1jの値であるから、「011000」であり、第1列目と第2列目とを比べると値が「0」と「1」とで異なっているため、要素B11=1である。第2列目と第3列目とを比べると値が「1」と「1」とで同じであるから要素B12=0である。以下同様に要素Bijを求めていくことにより、
要素B1j(j=1〜5)=「10100」となる。
【0051】
上記適否判別部45は、元データ復元部44によって復元された2進数元データ行列|Bij|を予め設定された適否の設定値と比較し、適否を判別するように構成されている。この判別結果は、出力装置46に向けて出力され、所定の処理が行われる。
【0052】
【発明の効果】
請求項1および3記載の発明によれば、所定の手順によって形成された変調コード行列|Aij|(i=1〜n、j=1〜m)は、2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)に比べてコード桁が1列増加するが、各行の両端に位置決めコードを追加する従来のコード行列に比べて1列分だけ列数を少なくすることができるため、2次元コードのための全体的な領域面積が制限されているときは変調コード行列|Aij|の情報量を従来のものより多くすることができる一方、所定の情報量を確保するためには変調コード行列|Aij|用の用紙全体に占める領域面積を小さくすることができる。
【0053】
また、所定の手順を適切に設定することにより、位置決めコードを設けることなく変調コード行列|Aij|の各行そのものを互いに区別され得るものにすることが可能であり、2次元コードの読み取りとは別に位置決めコードを読み取って行変わりが行われたか否かを常にチェックしなければならない従来の不都合が解消され、アクセス時間の短縮化が実現、従来に比べて2次元コードをより高速で読み取ることができる。
【0054】
さらに、変調コード行列|Aij|は、元データを単純に2進数変換したものではなく、所定の手順で2進数元データ行列|Bij|の要素を逐一調整要素に変換したものであるため、白色を「0」に、黒色を「1」に当て嵌めただけでは元データを再現することはできず、データの秘密保持を行う上で有効であり、セキュリティ性をさらに向上させることができる。
【0055】
請求項2および4記載の発明によれば、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について2進数元データ行列|Bij|の各行毎に変調要素と2進数元データ行列|Bij|の対応列の要素とを比較し、対応列の要素が「0」のときはその変調要素をつぎの列の変調要素とするとともに、変調コード行列|Aij|の各行における第1列目の変調要素は、得られる変調コード行列|Aij|の隣接する行において各列間の差の絶対値の合計が大きくなる方を選択して変調コード行列|Aij|を得るようにしたため、このようにして得られた変調コード行列|Aij|は、第1行目が「0」であるか「1」であるかの選定に際し、隣接する行において各列間の差の絶対値の合計が大きくなる方を選択することにより、2次元コードとしての行間の差を顕著に表現し得る変調コード行列|Aij|を形成することができる。従って、従来のように位置決めコードを設けることなく、変調コード行列|Aij|の各行を順次読み込んでいくことにより、上記偏りに基づいて列の区別を容易に認識することができる。
【図面の簡単な説明】
【図1】本発明に係る2次元コードの一実施形態を示す図であり、(イ)は、コード行列の要素が白色および黒色に色分けされた状態、(ロ)は、白色を「0」、黒色を「1」に置き換えて2進数によるコード行列に変換した状態をそれぞれ示している。
【図2】図1の変調コード行列|Aij|の基になる2進数元データ行列|Bij|を示す図である。
【図3】変調処理を説明するための説明図である。
【図4】2次元コードを読み取る読取り装置を説明するための読取り装置の模式的斜視図である。
【図5】CISによる読取り走査を説明するための説明図である。
【図6】従来の2次元コードの一例を示す説明図である。
【符号の説明】
1 読取り装置
2 送込みローラ
3 CIS
4 制御装置
41 データ変換部
42 ラインデータ比較部
43 行データ設定部
44 元データ復元部
45 適否判別部
46 出力装置
100 2次元コード
|Aij| 変調コード行列
Aij 変調要素
|Bij| 2進数元データ行列
Bij 要素
Sij セル
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a so-called two-dimensional code creation method in which data displayed in a binary code is arranged as a two-dimensional matrix and a sheet having a two-dimensional code.
[0002]
[Prior art]
Conventionally, a two-dimensional code 100 as shown in FIG. 6 is known. The two-dimensional code 100 is printed and displayed on various types of securities in the form of cards (for example, gift certificates and admission tickets) and forms P. The sheet P is supplied to a reader and read. To recognize the information given to the code. Compared with a bar code that displays information linearly in one dimension, it has a broader plane and can be given more information, so the two-dimensional code 100 will be used in the future. .
[0003]
In the two-dimensional code 100, either one of white indicating “0” and black indicating “1” is printed in each section (cell Sij) divided into the row Ni and the column Mj. It is formed by. Incidentally, since it is common to apply the background color of the paper for white, only the black indicating “1” is actually printed to form the two-dimensional code 100.
[0004]
Such a reading device for reading a two-dimensional code has a feeding means for feeding the paper P into the apparatus, and a sheet Ni moving in the direction perpendicular to the traveling direction with respect to the paper moving by the driving of the feeding means. Scanning means for reading the value of the cell Sij. Accordingly, by passing the paper P through the reading device, the scanning means sequentially reads the value (“0” or “1”) of each column Mj for each row Ni, and the paper P passes through the scanning means, and each cell. All the values of Sij (“0” or “1”) are read.
[0005]
By the way, the time interval of scanning by the scanning means (the time interval of scanning between the row Ni and the row Ni + 1) is set in advance, so that the time interval is synchronized with the feeding speed of the feeding means. (For example, the paper P is fed by one line for each scanning of one line), and the value of each column Mj in each line Ni is accurately determined in such a way that each line Ni is separated so as not to cause confusion between adjacent lines. Although the feeding speed by the feeding means is not necessarily constant due to load fluctuations, voltage fluctuations, and the like, the data of the row Ni read by the scanning means is not necessarily the data of that line. Not confirmed.
[0006]
Therefore, conventionally, in order not to cause such inconvenience, a total of two columns of positioning codes 101 over one column are provided on both sides in the width direction of the two-dimensional code 100, and each row of the positioning code 101 is provided in each row. The positioning cell CSi is set so as to correspond to Ni. Then, black (“1”) and white (“0”) are alternately printed on each positioning cell CSi, and the scanning means reads this positioning cell CSi, and the change of this value is the next row Ni. It is made to be recognized. By doing so, even if the feeding speed of the paper P fluctuates, there is no inconvenience that the data for each line is confused.
[0007]
[Problems to be solved by the invention]
However, in the conventional system in which the positioning cells CSi are provided on both sides of the two-dimensional code 100, the presence of the positioning cells CSi is present when the overall area for the two-dimensional code 100 on the paper P is limited. As a result, the capacity of the two-dimensional code 100 is reduced correspondingly, but if the capacity of the two-dimensional code 100 is to be secured, the entire area of the sheet P has to be increased.
[0008]
In addition to reading the two-dimensional code 100, the reading device must always check whether or not a line change has been made by reading the positioning code 101, and this process prolongs the access time. There is also a problem that it is difficult to read the code 100 at high speed.
[0009]
Furthermore, since the conventional two-dimensional code 100 simply converts the original data into a binary number and converts “0” to white and “1” to black, each color is changed to “0” and “1”. Since the original data can be obtained in binary numbers simply by returning it, the contents of the data can be decrypted very easily.
[0010]
The present invention has been made to solve the above problems, and can correctly read the value of each cell of a two-dimensional code without providing a positioning code adjacent to the two-dimensional code. An object of the present invention is to provide a method for creating a two-dimensional code and a sheet provided with the two-dimensional code, in which security measures are taken.
[0011]
[Means for Solving the Problems]
  The invention described in claim 1 is a method of creating a two-dimensional code in which either one of two different colors is given to each element of a matrix of n rows and m columns, and a plurality of binary data of the original data For each element of the binary number original data matrix | Bij | (i = 1 to n, j = 1 to m−1), a predetermined procedure is performed so as to correspond to the first to m−1th columns of the elements for each row. The obtained modulation elements are sequentially assigned from the second column excluding the first column of the modulation elements, and the first column of the modulation elements is set as a predetermined element, so that the binary elements corresponding to the two-dimensional code are set. A modulation code matrix | Aij | (i = 1 to n, j = 1 to m) is created, and coloring corresponding to each element of the modulation code matrix | Aij | Is to createAs the predetermined procedure, each row of the binary original data matrix | Bij | for each of the case where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”. For each binary element data matrix | Bij | corresponding to the modulation element, it is determined whether the element of the corresponding column is “0” or “1”. If the element of the corresponding column is “0”, the modulation is performed. While the element is the modulation element of the next column, and the element of the corresponding column is “1”, the modulation process of changing the modulation element of the next column to a modulation element different from the modulation element is performed, and the modulation of the first column One of the modulation processes when the element is set to “0” and “1” is selected, and the selection of the modulation process for each of the second and subsequent lines includes the current line and the previous line. The sum of the absolute values of the differences in the modulation elements between the columns is larger. To select the tone processingA method of creating a two-dimensional code characterized by the above. It is.
[0012]
  The invention according to claim 3 is a sheet provided with a two-dimensional code in which either one of two different colors is given to each element of a matrix of n rows and m columns, and a plurality of binary data of the original data A predetermined procedure for each element of the binary original data matrix | Bij | (i = 1 to n, j = 1 to m−1) so as to correspond to the first to m−1th columns of the elements for each row. Are sequentially assigned from the second column excluding the first column of the modulation elements, and the first column of the modulation elements is set as a predetermined element, thereby providing a binary element corresponding to the two-dimensional code. A modulation code matrix | Aij | (i = 1 to n, j = 1 to m) is created and colored corresponding to each element of the modulation code matrix | Aij |The predetermined procedure is as follows. For each of the cases where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”, each row of the binary original data matrix | Bij | For each binary element data matrix | Bij | corresponding to the modulation element, it is determined whether the element of the corresponding column is “0” or “1”. If the element of the corresponding column is “0”, the modulation While the element is the modulation element of the next column, and the element of the corresponding column is “1”, the modulation process of changing the modulation element of the next column to a modulation element different from the modulation element is performed, and the modulation of the first column One of the modulation processes when the element is set to “0” and “1” is selected, and the selection of the modulation process for each of the second and subsequent lines includes the current line and the previous line. Modulation with the larger absolute value of the difference in modulation elements between each column One in which you select the physicalA sheet having a two-dimensional code characterized by the above.
[0013]
According to these inventions, the modulation code matrix | Aij | (i = 1 to n, j = 1 to m) formed by a predetermined procedure is represented by a binary original data matrix | Bij | (i = 1 to n, There is an increase in code digits for one column compared to j = 1 to m−1), but the number of columns may be reduced by one column compared to a conventional code matrix in which positioning codes are added to both ends of each row. Therefore, when the entire area of the area for the two-dimensional code is limited, the information amount of the modulation code matrix | Aij | can be made larger than that of the conventional one, while the predetermined information amount is secured. In this case, the area of the modulation code matrix | Aij | in the entire sheet can be reduced.
[0014]
Further, by appropriately setting a predetermined procedure, each row of the modulation code matrix | Aij | can be distinguished from each other without providing a positioning code, which is separate from reading a two-dimensional code. 2D code can be read at a higher speed than before because the conventional inconvenience of having to always check whether the line change has been performed by reading the positioning code is solved and the access time is shortened. become.
[0015]
Furthermore, the modulation code matrix | Aij | is not obtained by simply converting the original data into binary numbers, but instead converting the elements of the binary original data matrix | Bij | The original data cannot be reproduced simply by fitting “0” to “0” and black to “1”, which is effective in maintaining the confidentiality of the data and solves the security problem.
[0018]
  In the predetermined procedure,Binary data matrix | Bij |Against aboveModulation code matrix | Aij |Is obtained. This modulation code matrix | Aij |In this case, the adjacent elements in each row are compared with each other and set to “0” when they are the same, and set to “1” when they are the same, and the matrix obtained by sequentially performing such processing is the original matrix The binary number original data matrix | Bij |
[0019]
  Further, the above modulation processing is performed for each of the case where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”, and the modulation element in the first column is One of the modulation processes in the case of “0” and “1” is selected, and the selection of the modulation process for each of the second and subsequent lines is as follows. Modulation process in which the sum of absolute values of differences in modulation elements between columns is largerIs selected, a modulation code matrix | Aij | that can significantly express a difference between rows as a two-dimensional code is formed. Accordingly, by sequentially reading each row of the modulation code matrix | Aij | without providing a positioning code as in the prior art, the distinction between columns can be easily recognized based on the above bias.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a diagram showing an embodiment of a two-dimensional code according to the present invention. (A) is a state where elements of a code matrix are color-coded into white and black, and (b) is white indicating “0”. , Black is replaced with “1” and converted into a binary code matrix.
[0021]
As shown in FIG. 1A, the two-dimensional code 100 is a variety of information (for example, date, reference number, sales location, etc.) that has been modulated into a predetermined area of paper P such as a gift certificate or admission ticket. (Amount of money, expiration date, etc.) are printed, and are formed by dividing a plurality of square-shaped squares by vertical and horizontal lines so that they can be obtained vertically and horizontally. In the example shown in FIG. 1A, the two-dimensional code 100 is formed over substantially the entire area of the paper P for convenience of illustration. However, in the present invention, the two-dimensional code 100 is the entire area of the paper P. The sheet P is not limited to be formed, and can be set at an arbitrary position such as a corner or a center in accordance with a print layout corresponding to the purpose of use of the paper P.
[0022]
The two-dimensional code 100 is formed by including a matrix of n rows by a plurality of cells (cells) and m columns Mj, i rows and j columns (where i = 1 to n, j = 1 to m), that is, white or black is printed on the cell Sij, and various types of information are displayed in combination. For white, the background color of the paper P is generally adopted as it is, and therefore, actually, only the black color is printed in a predetermined cell Sij, and the two-dimensional code 100 is completed. Incidentally, in FIG. 1, the two-dimensional code 100 is shown in the form of 4 rows and 6 columns (n = 4, m = 6) for convenience of illustration, but in the present invention, the 2D code 100 is 4 rows and 6 columns. It is not limited to being.
[0023]
In such a two-dimensional code 100, the white cell Sij is determined to be “0” and the black cell Sij is determined to be “1”. Accordingly, as shown in FIG. 1B, the two-dimensional code 100 corresponds to a modulation code matrix | Aij | in which binary numbers are described for each row.
[0024]
Incidentally, in the example shown in FIG. 1, the first row and the first column of the two-dimensional code 100 are white as shown in (a), and accordingly the modulation code matrix | Aij | As shown in (b) of FIG. 1, “0” is set in the first row and the first column, and similarly, modulation corresponding to the black color in the first row and the second column of the two-dimensional code 100 is performed. “1” is set in the first row and the second column of the code matrix | Aij |. The first row of the modulation code matrix | Aij | is “011000”, the second row is “000111”, the third row is “110001”, and the fourth row is “100111”. The numerical information of the decimal number is set respectively.
[0025]
Such a two-dimensional code 100 (that is, modulation code matrix | Aij |) is further added to original data (binary number original data matrix | Bij |) obtained by binarizing raw data such as date and reference number. It is formed by performing the modulation process. Hereinafter, this modulation processing will be described with reference to FIG.
[0026]
FIG. 2 is a diagram showing a binary original data matrix | Bij | corresponding to the modulation code matrix | Aij | of FIG. As shown in this figure, the binary original data matrix | Bij | (i = 1 to n (n = 4), j = 1 to m-1 (m-1 = 5)) is 4 rows and 5 columns. The modulated code matrix | Aij | after the modulation is 4 rows and 6 columns, but one row less. In other words, by modulating the binary original data matrix | Bij |, the number of rows is increased by 1 to become the modulation code matrix | Aij |. That is, in the binary original data matrix | Bij |, the value of each column M'j for each row N'i is changed to the value of each column Mj for each row Ni of the modulation code matrix | Aij | by a predetermined modulation process. Thus, a modulation code matrix | Aij | is formed. In the specific examples of FIGS. 1 and 2, “10100”, “00100”, “01001” and “10100” in the first to fourth rows of the binary original data matrix | Bij | It is modulated to “011000”, “000111”, “110001”, and “100111” of the modulation code matrix | Aij | ((b) in FIG. 1).
[0027]
FIG. 3 is an explanatory diagram for explaining the modulation processing. Referring to this figure, first, when the first row N′1 (“10100”) of the binary original data matrix | Bij | is modulated to the first row N1 (“011000”) of the modulation code matrix | Aij | Will be described in detail, and the modulation after the second row N′2 will be described.
[0028]
As shown in FIG. 3, when performing modulation, a modulation process {circle over (1)} that performs modulation processing by setting “0” in the first column M1 of the first row N1 of the modulation code matrix | Aij | A modulation process {circle over (2)} is performed in which “1” is set and the modulation process is performed.
[0029]
In each modulation process, the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” (modulation process (1)) and “1” (modulation process (2)). The value of the modulation element Aij is set for each of ▼) according to the value of the element Bij of the binary original data matrix | Bij | in the same column, and the modulation element Aij in the next column is sequentially determined. When the element Bij of the binary number original data matrix | Bij | of the corresponding column of the modulation element Aij is “0”, the modulation element Aij of that column is set as the modulation element Ai (j + 1) of the next column. That is, each element Bij of the binary number original data matrix | Bij | plays a role as a control signal (command) when setting the modulation element Aij of the modulation code matrix | Aij |.
[0030]
In the specific example of FIG. 3, in the case of the modulation process {circle around (1)}, the first row and the first column (element B11) of the binary original data matrix | Bij | are “0”, so the modulation code matrix | Aij | “0” in the first row and first column (modulation element A11) is set in the first row and second column (modulation element A12) of the modulation code matrix | Aij |, and modulation is performed by sequentially repeating the same processing. The first row N1 of the code matrix | Aij | is “011000”. Similarly, in the case of the modulation process (2), the first row N1 of the modulation code matrix | Aij | is “100111”.
[0031]
In determining the first row N1 of the modulation code matrix | Aij |, it is arbitrary which of the modulation results (1) and (2) is used. In the present embodiment, the result of the modulation process (1) is adopted.
[0032]
Next, in obtaining the second row N2 of the modulation code matrix | Aij |, the same modulation processing (1) and modulation processing (2) are executed, and “000111” is obtained as a result of the modulation processing (1). However, “111000” is obtained as a result of the modulation process (2). For the second and lower rows N2 and below of the modulation code matrix | Aij |, the difference between each column in this row and each column in the row immediately above is calculated one by one, and the modulation processing with the larger sum of their absolute values is performed. The result is selected. In the example shown in FIG. 3, when modulation processes {circle around (1)} and {circle around (2)} that are candidates for the first row N1 and the second row N2 of the modulation code matrix | Aij |
1st line "011000"
Modulation process (1) “000111”
Modulation process (2) “111000”
It becomes.
[0033]
Then, the difference between each column of the modulation process {circle around (1)} and each column of the first row N1 of the modulation code matrix | Aij | Similarly, the difference between each column of the modulation process {circle around (2)} and each column of the first row N1 of the modulation code matrix | Aij | is calculated one by one and the absolute value thereof is summed to be “1”. Therefore, the result of the modulation process (1) having a large absolute value is selected as the second row N2 of the modulation code matrix | Aij |.
[0034]
Such a modulation process is similarly executed for the third and lower rows N3 of the modulation code matrix | Aij |, and as a result, a modulation code matrix | Aij | as shown in FIG. . The modulation code matrix | Aij | obtained by such processing has a very high probability that the same column between adjacent rows has a different value. As shown in FIG. 1 (a), the black and white are very clearly divided between the lines, and the boundary between the lines is very easy to see, and also when the two-dimensional code 100 is read by the reader, the apparatus In this way, it is possible to reliably perform the line segmentation process.
[0035]
Hereinafter, reading of the two-dimensional code 100 will be described with reference to FIGS. 4 and 5. FIG. 4 is a schematic perspective view of a reading device for explaining a reading device that reads the two-dimensional code 100, and FIG. 5 is an explanatory diagram for explaining reading scanning by CIS. First, as shown in FIG. 4, the reading device 1 includes a pair of upper and lower feed rollers 2 that feed the paper P into the device at a predetermined feed speed, and a two-dimensional paper P that is being fed by the feed roller 2. A CIS (contact image sensor (contact image line sensor)) 3 that reads the code 100 and a control device 4 that performs a predetermined process on the value of each cell Sij read by the CIS 3 and classifies the value for each row Ni. It is configured.
[0036]
The CIS 3 has a plurality of contact sensors 3j (i = 1 to m (m = 6 in the present embodiment, the actual number of contact sensors 3j) provided on the surface facing the paper P corresponding to each row Mj. Has a modulation code matrix | Aij |, which is considerably larger than six, and is set to six according to the scale of the modulation code matrix | Aij |) described above, and the reflection of the two-dimensional code 100 from the paper surface to these contact sensors 3j. Each contact sensor 3j converts the incident light into a current value proportional to the amount of incident light and outputs it to the control device 4. The reading of the two-dimensional code 100 by the CIS 3 is intermittently performed every preset several μsec, and the sheet P moves at a predetermined speed, so that the cells Sij in each row Ni of the two-dimensional code 100 are targeted. Several data points per line It should be noted that the number of data collection points by the contact sensor 3j per line of the two-dimensional code 100 varies depending on the movement speed of the paper P, and therefore is not necessarily constant. Absent.
[0037]
The control device 4 determines the delimiter of each row of the modulation code matrix | Aij | from each set of data (line data) read by the contact sensor 3j of the CIS 3, and determines the value of each modulation element Aij. It functions to restore each modulation element Aij value to the element Bij of the binary original data matrix | Bij |. The data conversion unit 41, the line data comparison unit 42, the row data setting unit 43, and the original data A restoration unit 44 and a suitability determination unit 45 are provided. The determination result by the suitability determination unit 45 is output to the output device 46 and expires when a predetermined action based on the determination result (for example, the modulation code matrix | Aij | is given to the admission ticket) by the function of the output device 46 If it is determined that the entrance gate is not suitable, an action such as closing the entrance gate) is performed.
[0038]
The data converter 41 converts a current value, which is an analog amount based on the intensity of reflected light read from the two-dimensional code 100 by the contact sensor 3j of the CIS 3, into a digital value of “0” or “1”. . A preset current threshold value is input into the data conversion unit 41 that converts the two-dimensional code 100 into data, and the current value from the contact sensor 3j is compared with this threshold value. As this threshold value, an intermediate current value between the current value from the contact sensor 3j when the cell Sij is white and the current value from the contact sensor 3j when the cell Sij is black is employed. When the current value is larger than the threshold value, it is determined as “0” (white), while when the current value is smaller than the threshold value, it is determined as “1” (black).
[0039]
The data conversion unit 41 also has a function of converting the current value from the CIS 3 into a numerical value as it is and storing it. The numerically converted value is used when the next line data comparison unit 42 determines the row section of the two-dimensional code 100.
[0040]
The line data comparison unit 42 compares the previous value with the current value for the current value of each column of the two-dimensional code 100 read by the contact sensor 3j of the CIS 3 one by one. It finds out whether it is changing or not and determines the partition of the row. The current value is “0” when the cell Sij of the paper P is a complete black body, “10” when the cell Sij is completely white, and is 0 or more and 10 or less depending on the brightness of the reflected light. A value is given.
[0041]
In the following, a method for determining a row segment will be described based on the example shown in FIG. In FIG. 5, scanning by CIS3 is expressed by a one-dot chain line, and the detected current value of the cell Sij is written in each cell Sij. That is, the brightness (that is, the current value) of each cell Sij of the two-dimensional code 100 is detected by the CIS 3 that is stationary by actually moving the sheet P upward in FIG. In FIG. 5, for convenience of explanation, the CIS 3 moves with respect to the stationary paper P.
[0042]
As shown in FIG. 5, in the first scan, the contact sensors 31, 32... 3j... 36 read the reflected light of the cells S11, S12. Output to the conversion unit 41. The data converter 41 converts this current value into a numerical value of 0 to 10 according to the magnitude. In the example of FIG. 5, since the cells S11 to S16 of the two-dimensional code 100 are “white, black, black, white, white, white”, the current value is “8, 0, 0, 8, 8, 8”. It becomes. The reason why white is set to “8” is that the ground color of the paper P is not necessarily completely white.
[0043]
Next, after a predetermined interval time has elapsed, the second operation is performed, and S1j (j = 1 to 6) is read at this time, and the detected current value is “8, 0, 0, 8, 8, 8 ". Then, immediately after the second detection is performed, the difference between the current values for each column is calculated, and then the absolute value of each difference is calculated according to the following calculation formula.
[0044]
X = Σ | Xkj-X(k-1) j
(K = 1-12, j = 1-6)
X: Total difference between current and previous current values for each column
k: Number of scans
j: Number of columns of the two-dimensional code 100
Xkj: Current value of cells in column j in this scan
X(k-1) j: Current value of cells in column j in the previous scan
In the example shown in FIG. 5, for k = 1 and k = 2,
X = | 8-8 | + | 0-0 | + | 0-0 | + | 8-8 | + | 8-8 | + | 8-8 | = 0
Therefore, it is determined that the first scan and the second scan are in the same column in the cell Sij of the two-dimensional code 100. Whether or not they are the same column based on the value of X is determined by using 1/2 as the threshold value when X and all columns are reversed in black and white in the current scan and the previous scan. When it is equal to or larger than this threshold, it is determined that the column has changed. In the example of FIG. 5, the threshold value is “24” ((8 × 6) / 2) where “8” is white and “0” is black.
[0045]
Since the value of X obtained for the second scan and the third scan is also “0”, it can be seen that the third scan is for the first row.
[0046]
Next, the result of the third scan is compared with the result of the fourth scan. In this case, the third scan is for the first row (i = 1) of the cell Sij as in the second scan, while the fourth scan is for the second row ( Since i = 2), the current detection result by the contact sensor 3j is “888000”. When X is calculated by comparing the result of the fourth scan with the result of the third scan,
X = | 8-8 | + | 8-0 | + | 8-0 | + | 0-8 | + | 0-8 | + | 0-8 | = 40
Thus, when the threshold value is greater than “24”, it is determined that the fourth scan is for the second row of the cells Sij. Thereby, it is determined that the detection results by the CIS3 from the first to the third time are those of the first row of the cell Sij. The same scanning by CIS3 is continued thereafter, and the values of all the cells Sij are determined by repeating 12 times in total.
[0047]
Note that the square sum Y of the difference between columns instead of the above X, that is,
Y = Σ (Xkj-X(k-1) j)2
(K = 1-12, j = 1-6)
May be adopted.
[0048]
The row data setting unit 43 functions to set the value of the modulation element Aij of each column in the previous row when it is determined that the row of the cell Sij has changed as a result of the comparison by the line data comparison unit 42. To do. That is, in the example of FIG. 5, it is determined that the row of the cell Sij has changed from the first row to the second row based on the third scan result and the fourth scan result. The average value of the detection results from the first time to the third time is calculated, and this average value becomes the data of the first row. In particular,
Cell S1j(J = 1-6) = “011000”
Cell S2j(J = 1-6) = “000111”
Cell S3j(J = 1-6) = “110001”
Cell S4j(J = 1-6) = “100111”
It becomes. This modulation code matrix | Aij | is a value that is read by the CIS 3 from the two-dimensional code 100 and converted by the line data comparison unit 42, and this matrix is stored in the row data setting unit 43.
[0049]
The original data restoration unit 44 plays a role of restoring the modulation code matrix | Aij | stored in the row data setting unit 43 into a binary original data matrix | Bij |. Here, in the modulation code matrix | Aij |, adjacent ones of the modulation elements Aij in the same row are sequentially compared. If they are the same, “0” is set, and if they are different, “1” is set and the matrix is set. Made. This matrix becomes the binary original data matrix | Bij |.
[0050]
For example, modulation element A1jIn the case of (j = 1 to 6), the cell S1jSince the value is “011000” and the first column and the second column are compared, the value is different between “0” and “1”.11= 1. When the second column and the third column are compared, the value is the same for “1” and “1”, so element B12= 0. Similarly, by obtaining the element Bij in the same manner,
Element B1j(J = 1 to 5) = “10100”.
[0051]
The suitability determination unit 45 is configured to compare the binary original data matrix | Bij | restored by the original data restoration unit 44 with a preset value of suitability to determine suitability. The determination result is output to the output device 46, and a predetermined process is performed.
[0052]
【The invention's effect】
According to the first and third aspects of the invention, the modulation code matrix | Aij | (i = 1 to n, j = 1 to m) formed by a predetermined procedure is represented by a binary original data matrix | Bij | (i = 1 to n, j = 1 to m-1), the code digit is increased by one column, but the number of columns is reduced by one column compared to a conventional code matrix in which positioning codes are added to both ends of each row. Therefore, when the total area area for the two-dimensional code is limited, the information amount of the modulation code matrix | Aij | can be made larger than the conventional one, while a predetermined amount of information is secured. In order to achieve this, the area of the modulation code matrix | Aij |
[0053]
Further, by appropriately setting a predetermined procedure, each row of the modulation code matrix | Aij | can be distinguished from each other without providing a positioning code, which is separate from reading a two-dimensional code. The conventional inconvenience of having to constantly check whether or not the line change has been performed by reading the positioning code is solved, the access time is shortened, and the two-dimensional code can be read at a higher speed than before. .
[0054]
Further, the modulation code matrix | Aij | is not obtained by simply binary conversion of the original data, but is obtained by converting the elements of the binary original data matrix | Bij | The original data cannot be reproduced simply by fitting “0” to “0” and black to “1”, which is effective in maintaining confidentiality of data, and can further improve security.
[0055]
According to the second and fourth aspects of the invention, the binary original data matrix for each of the case where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”. For each row of | Bij |, the modulation element is compared with the element of the corresponding column of the binary original data matrix | Bij |. When the element of the corresponding column is “0”, the modulation element is compared with the modulation element of the next column. In addition, the modulation element in the first column in each row of the modulation code matrix | Aij | is selected so that the sum of the absolute values of the differences between the columns in the adjacent row of the obtained modulation code matrix | Aij | Since the modulation code matrix | Aij | is obtained, the modulation code matrix | Aij | obtained in this way is selected when the first row is “0” or “1”. Sum of absolute values of differences between columns in adjacent rows By selects whichever larger, 2-dimensional code as the line spacing significantly expressed to be modulated code matrix of | Aij | can be formed. Accordingly, by sequentially reading each row of the modulation code matrix | Aij | without providing a positioning code as in the prior art, it is possible to easily recognize the column distinction based on the above-described bias.
[Brief description of the drawings]
1A and 1B are diagrams showing an embodiment of a two-dimensional code according to the present invention, in which FIG. 1A is a state in which elements of a code matrix are color-coded into white and black, and FIG. , Black is replaced with “1” and converted into a binary code matrix.
FIG. 2 is a diagram illustrating a binary original data matrix | Bij | that is a basis of the modulation code matrix | Aij | of FIG. 1;
FIG. 3 is an explanatory diagram for explaining a modulation process;
FIG. 4 is a schematic perspective view of a reading device for explaining a reading device that reads a two-dimensional code.
FIG. 5 is an explanatory diagram for explaining reading scanning by CIS.
FIG. 6 is an explanatory diagram showing an example of a conventional two-dimensional code.
[Explanation of symbols]
1 Reader
2 Feed roller
3 CIS
4 Control device
41 Data converter
42 Line data comparator
43 Line data setting part
44 Original data restoration part
45 Appropriateness judgment part
46 Output device
100 2D code
| Aij | Modulation code matrix
Aij modulation element
| Bij | Binary data matrix
Bij element
Sij cell

Claims (2)

n行、m列の行列の各要素に異なる2色のいずれか一方が付与されてなる2次元コードの作成方法であって、元データを2進数化した複数の2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)の各要素について各行毎に要素の第1列から第m−1列に対応するように所定の手順で得られる変調要素を、変調要素の第1列を除いて第2列から順次割り当てるとともに、変調要素の第1列は所定の要素として設定することにより上記2次元コードに対応した2進数の要素からなる変調コード行列|Aij|(i=1〜n、j=1〜m)を作成し、この変調コード行列|Aij|の各要素に対応した着色を所定の用紙に施すことにより2次元コードを作成するものであり、
上記所定の手順として、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について、2進数元データ行列|Bij|の各行毎に変調要素と対応した2進数元データ行列|Bij|の対応列の要素が「0」であるか「1」であるかを判別し、対応列の要素が「0」のときはその変調要素をつぎの列の変調要素とする一方、対応列の要素が「1」のときはつぎの列の変調要素をその変調要素と異なる変調要素に変える変調処理を行なうとともに、第1列目の変調要素を「0」とした場合と「1」とした場合のいずれかの変調処理を選択することとし、第2行目以降の各行についての上記変調処理の選択としては、当該行と前の行との各列間の変調要素の差の絶対値の合計が大きくなる方の変調処理を選択することを特徴とする2次元コードの作成方法。
A method for creating a two-dimensional code in which one of two different colors is assigned to each element of an n-row, m-column matrix, and a plurality of binary original data matrices | Bij | For each element of (i = 1 to n, j = 1 to m−1), a modulation element obtained by a predetermined procedure so as to correspond to the first column to m−1th column of each element for each row Are sequentially assigned from the second column except for the first column, and the first column of modulation elements is set as a predetermined element, whereby a modulation code matrix | Aij | (consisting of binary elements corresponding to the two-dimensional code is set. i = 1 to n, j = 1 to m), and a two-dimensional code is created by applying coloring corresponding to each element of the modulation code matrix | Aij |
As the predetermined procedure, each row of the binary original data matrix | Bij | for each of the case where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”. For each binary element data matrix | Bij | corresponding to the modulation element, it is determined whether the element of the corresponding column is “0” or “1”. If the element of the corresponding column is “0”, the modulation is performed. While the element is the modulation element of the next column, and the element of the corresponding column is “1”, the modulation process of changing the modulation element of the next column to a modulation element different from the modulation element is performed, and the modulation of the first column One of the modulation processes when the element is set to “0” and “1” is selected, and the selection of the modulation process for each of the second and subsequent lines includes the current line and the previous line. The sum of the absolute values of the differences in the modulation elements between the columns is larger. How to create two-dimensional code and selects the halftone processing.
n行、m列の行列の各要素に異なる2色のいずれか一方が付与されてなる2次元コードを備えた用紙であって、元データを2進数化した複数の2進数元データ行列|Bij|(i=1〜n、j=1〜m−1)の各要素について各行毎に要素の第1列から第m−1列に対応するように所定の手順で得られる変調要素を、変調要素の第1列を除いて第2列から順次割り当てるとともに、変調要素の第1列は所定の要素として設定することにより上記2次元コードに対応した2進数の要素からなる変調コード行列|Aij|(i=1〜n、j=1〜m)を作成し、この変調コード行列|Aij|の各要素に対応した着色が施されてなるものであり、
上記所定の手順は、変調コード行列|Aij|の各行の第1列目の変調要素を「0」とした場合および「1」とした場合の各々について、2進数元データ行列|Bij|の各行毎に変調要素と対応した2進数元データ行列|Bij|の対応列の要素が「0」であるか「1」であるかを判別し、対応列の要素が「0」のときはその変調要素をつぎの列の変調要素とする一方、対応列の要素が「1」のときはつぎの列の変調要素をその変調要素と異なる変調要素に変える変調処理を行なうとともに、第1列目の変調要素を「0」とした場合と「1」とした場合のいずれかの変調処理を選択することとし、第2行目以降の各行についての上記変調処理の選択としては、当該行と前の行との各列間の変調要素の差の絶対値の合計が大きくなる方の変調処理を選択したものであることを特徴とする2次元コードを備えた用紙。
A plurality of binary original data matrices | Bij, which is a sheet having a two-dimensional code in which either one of two different colors is given to each element of a matrix of n rows and m columns, and the original data is binarized For each element of | (i = 1 to n, j = 1 to m−1), a modulation element obtained by a predetermined procedure is modulated for each row so as to correspond to the first column to the m−1th column of the element. A modulation code matrix | Aij | composed of binary elements corresponding to the two-dimensional code is set by sequentially assigning elements from the second column excluding the first column of elements and setting the first column of modulation elements as a predetermined element. (I = 1 to n, j = 1 to m), and coloring corresponding to each element of the modulation code matrix | Aij |
The predetermined procedure is as follows. For each of the cases where the modulation element in the first column of each row of the modulation code matrix | Aij | is “0” and “1”, each row of the binary original data matrix | Bij | For each binary element data matrix | Bij | corresponding to the modulation element, it is determined whether the element of the corresponding column is “0” or “1”. If the element of the corresponding column is “0”, the modulation While the element is the modulation element of the next column, and the element of the corresponding column is “1”, the modulation process of changing the modulation element of the next column to a modulation element different from the modulation element is performed, and the modulation of the first column One of the modulation processes when the element is set to “0” and “1” is selected, and the selection of the modulation process for each of the second and subsequent lines includes the current line and the previous line. Modulation with the larger absolute value of the difference in modulation elements between each column Paper having a two-dimensional code, characterized in that is obtained by selecting a sense.
JP2000200802A 2000-07-03 2000-07-03 2D code creation method and paper with 2D code Expired - Lifetime JP4567151B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000200802A JP4567151B2 (en) 2000-07-03 2000-07-03 2D code creation method and paper with 2D code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000200802A JP4567151B2 (en) 2000-07-03 2000-07-03 2D code creation method and paper with 2D code

Publications (2)

Publication Number Publication Date
JP2002024781A JP2002024781A (en) 2002-01-25
JP4567151B2 true JP4567151B2 (en) 2010-10-20

Family

ID=18698610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000200802A Expired - Lifetime JP4567151B2 (en) 2000-07-03 2000-07-03 2D code creation method and paper with 2D code

Country Status (1)

Country Link
JP (1) JP4567151B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007021185B4 (en) 2007-05-05 2012-09-20 Ziehm Imaging Gmbh X-ray diagnostic device with a plurality of coded marks and a method for determining the position of device parts of the X-ray diagnostic device
CN106156823B (en) * 2016-06-23 2019-03-22 安徽易泰格智能技术有限公司 A kind of colorful number sequence two dimensional code and its method for anti-counterfeit
KR102583928B1 (en) * 2021-03-04 2023-09-27 주식회사 한컴위드 Business card making service providing server to provide the business card making service that makes the business card with the two-dimensional code that includes the access information about the web page on which the user's introduction information is posted inserted and operating method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302471A (en) * 1994-05-02 1995-11-14 Olympus Optical Co Ltd Modulation system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302471A (en) * 1994-05-02 1995-11-14 Olympus Optical Co Ltd Modulation system

Also Published As

Publication number Publication date
JP2002024781A (en) 2002-01-25

Similar Documents

Publication Publication Date Title
US5477045A (en) Dynamically variable machine readable binary code and method for reading and producing thereof
US5568555A (en) Multi-color information encoding system
US5124536A (en) Dynamically variable machine readable binary code and method for reading and producing thereof
US20110053639A1 (en) Methods and devices for authenticating a product and a two-dimensional code and novel application of a two-dimensional code
CN100469097C (en) Method for abstracting graph and text infromation utilizing half-hue image networking hiding
US5471549A (en) Method of detecting and correcting a direction of image data and document image filing system employing the same
US3870865A (en) Method and apparatus for optical reading of recorded data
JPH08185492A (en) Digital information recording carrier, method and device for recording digital information, and method and device for converting digital information into plain one
JPS58160152A (en) Method and device for controlling state of register of operation of printing
GB2277223A (en) Image forming apparatus
JP4152463B2 (en) Glyph detection system
JP4567151B2 (en) 2D code creation method and paper with 2D code
JPH0792820B2 (en) Character recognition method
JPS62162181A (en) Optical reader
US6400834B1 (en) Method for detecting photocopied or laser-printed documents
GB1558676A (en) Symbol recognition enhancing apparatus
JPH07134757A (en) Display body provided with two-dimensional code and two-dimensional code reader
KR101905416B1 (en) System and method for management of electronic fingerprint for preventing forgery or alteration of art pieces, method for detecting forgery or alteration of art pieces and computer program for the same
JPH0367381A (en) Character recognition device
JPH07134758A (en) Display body provided with two-dimensional code and two-dimensional code reader
JPH1139447A (en) Bar code and its reader
JP3559596B2 (en) Image processing apparatus and method
JPH07134756A (en) Display body provided with two-dimensional code and method for giving two-dimensional code
KR20180109808A (en) System and method for management of electronic fingerprint for preventing forgery or alteration of art pieces, method for detecting forgery or alteration of art pieces and computer program for the same
JP2001273470A (en) Bar code and bar code reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100427

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100628

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: 20100713

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: 20100805

R150 Certificate of patent or registration of utility model

Ref document number: 4567151

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130813

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term