Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3568508B2 - Information reproduction system - Google Patents
[go: Go Back, main page]

JP3568508B2 - Information reproduction system - Google Patents

Information reproduction system Download PDF

Info

Publication number
JP3568508B2
JP3568508B2 JP2001377341A JP2001377341A JP3568508B2 JP 3568508 B2 JP3568508 B2 JP 3568508B2 JP 2001377341 A JP2001377341 A JP 2001377341A JP 2001377341 A JP2001377341 A JP 2001377341A JP 3568508 B2 JP3568508 B2 JP 3568508B2
Authority
JP
Japan
Prior art keywords
marker
dot
dots
pattern
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001377341A
Other languages
Japanese (ja)
Other versions
JP2002197410A (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.)
Olympus Corp
Original Assignee
Olympus Corp
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 Olympus Corp filed Critical Olympus Corp
Priority to JP2001377341A priority Critical patent/JP3568508B2/en
Publication of JP2002197410A publication Critical patent/JP2002197410A/en
Application granted granted Critical
Publication of JP3568508B2 publication Critical patent/JP3568508B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、音声,音楽等のオーディオ情報、カメラ,ビデオ機器等から得られる映像情報、及びパーソナルコンピュータ,ワードプロセッサ等から得られるディジタルコードデータ、等を含めた所謂マルチメディア情報を光学的に読み取り可能な2次元コードパターンとして記録した紙等の情報記録媒体から、上記コードパターンを光学的に読み取って元のマルチメディア情報を再生する情報再生システムに関する。
【0002】
【従来の技術】
従来より、音声や音楽等を記録する媒体として、磁気テープや光ディスク等、種々のものが知られている。しかしこれらの媒体は、大量に複製を作ったとしても単価はある程度高価なものとなり、またその保管にも多大な場所を必要としていた。さらには、音声を記録した媒体を、遠隔地にいる別の者に渡す必要ができた場合には、郵送するにしても、また直に持っていくにしても、手間と時間がかかるという問題もあった。また、オーディオ情報以外の、カメラ,ビデオ機器等から得られる映像情報、及びパーソナルコンピュータ,ワードプロセッサ等から得られるディジタルコードデータ、等をも含めた所謂マルチメディア情報全体に関しても同様であった。
【0003】
このような問題に対処するべきものとして、特開平6−231466号公報には、オーディオ情報,映像情報,ディジタルコードデータの少なくとも一つを含むマルチメディア情報を、ファクシミリ伝送が可能で、また大量の複製が安価に可能な画像情報即ち符号化情報としての複数のドットを2次元に配置してなる2次元コードの形で紙等の情報記録媒体に記録するシステム及びそれを再生するためのシステムが開示されている。
【0004】
この公報の情報再生システムでは、情報記録媒体上の2次元コードを光学的に読み取って再生する情報再生装置を、手で保持し、記録されている2次元コードに沿って記録媒体上を手動で走査することによって読み取る方法が開示されている。
【0005】
【発明が解決しようとする課題】
ところで、2次元コードパターン自体もさらに記録密度を向上できるような構造が研究されている段階であり、さらに高密度記録が達成されることが期待されている。
【0006】
しかしながら、上記公報には、そのような将来のより高密度記録されたコードパターンの読み取りについては、まだ十分な配慮がなされていない。
【0007】
本発明は、高密度記録されたコードパターンを読み取って、正しく情報を再生できる情報再生システムを提供することを目的とする。
【0008】
【課題を解決するための手段】
上記の目的を達成するために、本発明による情報再生システムは、再生されるべき情報のデータに相当するデータコードを含むブロックを複数個配置したコードが光学的に読み取り可能に記録された情報記録媒体から、上記コードを光学的に読み取って上記情報を再生する情報再生システムであって、
上記コードを撮像する画像入力手段と、
上記画像入力手段で撮像された画像から上記データを読み取るデータ読み取り手段と、
上記データ読み取り手段で読み取られたデータから上記情報を再生する再生手段と、
を具備し、
上記データ読み取り手段は、上記画像入力手段で撮像された画像における複数個の上記ブロックの中から光学的ディストーションの影響が小さいブロックを選択して読み取るように構成されたことを特徴とする。
【0009】
即ち、コードを撮像した画像は、光学的ディストーションにより歪んだものとなるが、この歪みによる影響は、コードが高密度になればなるほど大きくなり、データコードの読み取りエラーの可能性を大きくする。そこで、本発明の情報再生システムによれば、撮像された画像における複数個のブロックの中から光学的ディストーションの影響が小さいブロックを選択して読み取るようにしている。従って、読み取りエラーが発生する確率を低くすることができる。
【0010】
【発明の実施の形態】
以下、図面を参照して、本発明の実施の形態を説明する。
【0011】
図1の(A)乃至(C)は、情報記録媒体上に光学的に読み取り可能に記録される2次元コード(ドットコード)の例を示す図である。
【0012】
即ち、図1の(A)に示すように、ドットコードは、データコード10と、パターンコード12とからなる。データコード10は、実際のマルチメディア情報に相当する内容を示している。また、パターンコード12は、データコード10の読み取り基準点を決定するためのもので、パターンドット14とマーカ16とからなる。なおここで、パターンドット14とは、パターンコード12を構成するマーカ以外の1つ又は複数のドット群の個々のドットのことである。
【0013】
ここで、データコード10を構成するドット(以下、データドットと称す)は非常に高密度(例えばCCD等の撮像装置の解像限界近傍)で記録されているため、このデータコード10を正しく再生するためには、正確に各データドットを読み取らなくてはならない、つまり読み取り位置を正確に検出しなければならない。そこで、正確にCCDの画素とそのデータドットの相対位置関係を知るために、データコード10に関して予め決められた位置に配置され、予め決められたドットパターン(図では、黒を1、白を0とすれば、10101)を持つ、データドットに比べて若干大きなパターンドット14を使用している。しかしながら、このパターンドット14を何もないところから見つけることは難しいため、このパターンドット14に関して予め決められた位置に配置された、非常に大きなマーカ16を設けている。この例では、マーカ16は円形のものであり、その直径が(マーカ16)>(パターンドット14)>(データドット)という大きさ関係となっている。
【0014】
勿論、パターンドット14は、図1の(B)に示すように、データドットと同様の大きさや形状で記録されていても良い。また、マーカ16も、例えば同図に示す矢印形状のように、パターンドット14やデータドットとは別の特殊な形あるいは色や大きさで記録されていれば良い。
【0015】
また、図1の(C)に示すように、矩形の領域内にデータコード10を配し、その上下にパターンコード12を配置すると共に、両脇にアドレスドット18を配置して、ブロック化し、このようなブロックをマトリクス状に配置して2次元コードを構成するようにしても良い。ここで、パターンドット14は、例えば、黒ドットを1、白ドットを0で表せば、「100100100100100001001001001001」という30ドットのものとなる。また、アドレスドット18は、例えば、「1**********##########0」という22ドットで構成される。なお、「*」は1又は0を表し、この10個分でアドレスを示すものとし、また、「#」は1又は0を表し、この10個分でアドレスのエラー訂正符号を示すものとする。
【0016】
このように、再生されるべきマルチメディア情報の内容に相当するデータコード10と、その読み取り基準点を決定するためのパターンコード12とからなるドットコードの記録される情報記録媒体において、上記パターンコード12を、データコード10に関して予め決められた位置に配置されたパターンドット14と、このパターンドット14に関して予め決められた位置に配置された、上記パターンドット14を検出するために利用されるマーカ16とから構成するようにしているので、パターンドット14がデータコード10を形成するデータドットと同様のものでもマーカ16に基づいて検出することができるようになり、この検出されたパターンドット14から正確に読み取り基準点を求められるようになる。
【0017】
なお、図1の(C)に示したようにブロック化した場合、上記マーカ16はブロックの4隅に配置されていなくとも良く、例えば、図2の(A)乃至(E)に示すように、マーカ16を配置することができる。
【0018】
即ち、図2の(A)は、矩形のブロック20の各辺上にマーカ16を配置したものである。
【0019】
図2の(B)は、ブロック20が複数段に整列されて並んでいる場合、その一番上の段にだけ、マーカ16を配置した例である。
【0020】
図2の(C)は、ブロック20が複数段に整列しているときに、一部省略してマーカ16を記録した例を示している。
【0021】
図2の(D)は、マーカ16を正方形で記録した場合である。このように、マーカ16の形状が円形でない場合にも、図2の(A)乃至(C)に示したように、種々のマーカ配置を採ることができる。
【0022】
なお、好ましくは、マーカ16は、以下の理由から円形であるほうが良い。即ち、マーカ16の形状を円形にすると、ドットコードとCCD等の撮像素子(カメラ)の回転(スキュー)によって変形がないので、例えスキューした場合であっても、マーカ16を容易に抽出することができるからである。しかし、スキューがある程度の範囲内である場合、例えば、カメラとドットコードの相対的な関係が規定されるような状態で撮像するような場合であれば、マーカ16は四角形や六角形等の他の形状でも構わない。逆に、このような非等方性の形状にすると、一つのマーカ16が検出されれば、その形状を見るだけで、スキュー角が、つまりどちらの方にどの位傾いているかを求めることができるという利点もある。
【0023】
図2の(E)は、ブロック20を六角形の形状にし、マーカ16をその3個の頂点に配置した例を示している。このように、ブロックの形状としては、矩形に限定されるものではない。
【0024】
このように、複数のドットでなる上記データコード10を所定の領域に配置したブロックを複数個2次元に配置してドットコードを構成すると共に、マーカ16を、各ブロックの相対的位置関係が判るように、各ブロックの一部に配置しているので、これらマーカ16によってブロック境界の抽出が容易となる。
【0025】
また、詳細は後述するようにしてマーカ対から外挿でマーカ16の概中心を求めることができるので、ブロックの4隅全てにマーカ16は必要ではなく、従って、図2の(B)や(C)に示すように、一部省略することができる。この場合、この省略した位置には、点だけ又は全く何も無いようにする。
【0026】
図3の(A)及び(B)は、省略した位置に点22を記録した例である。この例では、第1方向に隣接するブロック間で異なる対辺をなす頂点で、且つ、第2方向に隣接するブロック間で同一の対辺をなす頂点にマーカ16を配置している。要するに、図において横方向に隣接する方向に対しては上側のマーカを記録し、一方、下方向に隣接するときには下側のマーカを記録し、その下に隣接するときは上側のマーカを記録する、というように交互に記録する、つまり縞状にマーカ16を記録(もしくは省略)している。
【0027】
このように、第1方向に隣接する矩形ブロック間で異なる対辺をなす頂点であり且つこの第1方向に直交する第2方向に隣接するブロック間で同一の対辺をなす頂点に、マーカ16を配置する、つまり縞状に配置することで、ブロック20の4隅にマーカ16を配置する場合に比べて、大きな面積を必要とするマーカ16が半分で済み、その省略されたマーカ位置にもデータドットを配置することができ、その分、記録容量を増大できるようになる。
【0028】
また、図4は、マーカ16を市松状に配置(もしくは省略)した場合の例である。
【0029】
このようにマーカ16を、隣接するブロック間で異なる対角をなす頂点に配置(つまり、市松状に配置)すれば、矩形状のブロックの4隅にマーカを配置する場合に比べて、大きな面積を必要とするマーカが半分で済み、その省略されたマーカ位置にもデータドットを配置することができ、その分、記録容量を増大できるようになる。また、1ライン上に少なくとも1組のマーカ16が必ず検出できるため、前述したようにマーカを縞状に配置する場合に比べて、歪に強いという効果もある。
【0030】
次に、パターンドット14につき説明する。
【0031】
このパターンドット14としては、例えば、図5の(A)に示すように、黒ドットを1、白ドットを0で表せば、「10101010100101010101」というように、隣り合う黒ドットが互いに分離可能となるように配置される必要がある。即ち、黒ドットが離隔して配置されるようにする。勿論、黒ドットと白ドットを交互に記録しなくとも、黒ドットと黒ドットの間にスペースがあれば構わない。同様に、データドットとパターンドットの間にも黒ドットが離隔して配置されるようにスペースを設ける。
【0032】
これは、パターンドット14を構成する黒ドットが例えば2個隣接してしまうと、詳細は後述するようなパターンドット14による読み取り基準点の決定処理において、2個の黒ドットを1個の黒ドットであるかのように検出してしまい、誤りの元になるということによる。即ち、読み取り基準点の決定処理においては、パターンドット14は黒ドット1つずつについてそのドットの中心座標を求め、それを利用して読み取り基準点を決定しているので、このパターンドット14は各ドットの中心点位置が求められる必要があり、黒ドットが2個隣接してしまうと、正しいドットの中心位置が求められなくなる。
【0033】
つまり、このようにパターンドットのフォーマットとして、隣り合うドットが互いに分離可能となるように配置したものとすることにより、重心や外接矩形の中心など比較的簡単な計算によりパターンドットを構成する各ドットの中心が正確に求められるようになる。また、パターンコード上に情報(アドレス情報、ヘッダ情報)を記録しても、黒ドットが連結して分離できなくなることがない。
【0034】
また、「1」「1」のような並びが出現しないように、何らかの変調をかけてやることによって、ドット記録位置が隣接して配置されていても、パターンドット14の中に、例えばアドレス情報やヘッダ情報のようになにかデータを重畳記録することもできる。
【0035】
例えば、図6の(A)に示すような、4ビット/6ビット変調をかければ良い。なお、この場合、入力信号0(つまり0000)は、0(つまり000000)に変換するのではなく、36(つまり100100)に変換している。これは、黒ドットが少なくとも1個はなければ、パターンドットとしての意味をなさないという理由による。
【0036】
このように、ドットコードを隣り合うドットが互いに分離可能となるように変調したコードとして記録することにより、パターンコード上に情報(アドレス情報、ヘッダ情報)を記録したとしても、黒ドットが連結して分離できなくなることをなくすことができる。
【0037】
また、パターンドット14のフォーマットとしては、その他、種々の態様が考えられるが、読み取り基準点の位置が推定できる位置関係もしくは構造を有している特殊なコードである必要がある。そのような特殊なコードとすれば、それを使って容易にその読み取り基準点を推定できる。
【0038】
例えば、図6の(B)に示すように、直線状のパターンドット14つまりパターンラインとしても良い。直線検出アルゴリズムとしては、画像処理において良く知られているような、直線をθ,ρのパラメータで表し、θ−ρ平面でカウントを行って直線を求める方法(直線検出アルゴリズム、例えばハフ変換)を用いることができ、この方法を用いて抽出された直線の交点を読み取り基準点とすることができる。
【0039】
あるいは、図5の(B)に示すように、パターンドット14として、少なくとも一部のパターンドットの記録点に位相ずれを設けたものとしても良い。このような位相ずれを設けることで、パターンドット14の検出条件が厳しくなるので、読み取り基準点推定精度を向上することができる。
【0040】
即ち、本来、パターンドット14やデータコード10のドットの記録位置というのはほぼ格子上に配置されるものであるが、あえてパターンドット14の場合は、この格子点から少しずらしてやる。これを位相ずれと呼ぶものとする。
【0041】
例えば、図7の(A)において、(1)は等ピッチ配列の場合であり、ドット内いずれの点で読み込んでも検出できるが、(2)の非等ピッチ配列の場合には、ドットをこの等ピッチ点で読み取ると、同図中の斜線部内に読み取り点がない限りは検出できないことになる。従って、全てのドットを検出することのできる読み取り基準点の存在範囲は、位相ずれを設けない場合に比べて狭くなり、読み取り基準点の推定精度を向上することができる。
【0042】
また、このように位相ずれを設けることで、未検出ドットの位置やその偏りから、読み取り基準点位置のずれを推定することができるようになる。
【0043】
例えば、位相ずれを設けてある場合、あるドットは検出できなかったが他のドットは検出できたという場合には、その検出できなかったドットがどのような位相ずれを持つものかは予め設定されたフォーマット情報より知ることができるので、それがどのような位相ずれを持つかにより、読み取り基準点位置のずれている方向を推定することができる。
【0044】
また、図7の(B)に示すように、パターンコード12として、各マーカ16間に、データコード10の読み取り基準点検出用のパターンドット14と、このパターンドット14の通常のドットよりサイズが小さく且つパターンドット14のドット位置基準点24に対して上下左右の位相ずれを付加したガイドコード26を設けるようにしても良い。
【0045】
このようなパターンコード12とした場合には、パターンドット14が読み取れた後、マーカ16の中心から上下1ドットずらした点同士を結んでガイドコード26が読み取れるように中心位置を近傍で移動させる。こうすることにより、パターンドット14の読み取り条件を厳しくすることなく、ガイドコード26の読み取り条件の厳しさから、読み取り基準点(この場合、マーカ中心位置)の推定精度を向上することができる。
【0046】
このように、少なくとも一部のパターンドットの径を小さく記録することにより、同じスペースに多くのパターンドットが記録でき、パターンドットの記録密度を上げることができる。また、パターンドットの検出条件がより厳しくなることで、読み取り基準点の推定精度を上げることができる。
【0047】
また、図5の(B)及び(C)に示すように、パターンドット14の中央よりの一部のドット14Bの径を大きく記録するようにしても良い。
【0048】
即ち、後述するようなマーカ対の概中心を結ぶ線上でパターンドット14を検出する場合に、最も検出されにくい中央よりのドット14Bを予め大きく記録しておくことにより、パターンドット14を見失うことをなくすことができ、また、中央よりのドット14Bを先に検出して、他のドットを粗検索することもできるようになる。
【0049】
次に、アドレスドット18について説明する。
【0050】
アドレスドット18は、例えば図8の(A)及び(B)に示すように、パターンドット14と直交する方向にマーカ16間に設けられ、当該ブロック20のアドレスを示す。
【0051】
このようなアドレスドット18を設けることにより、ブロックが順番に読み込まれない場合にも、読み込んだブロックをこのアドレスドット18で示されるアドレス順に並び代えることで、正しく再生されるようになる。
【0052】
また、図8の(C)に示すように、このアドレスドット18の両脇に、このアドレスドット18を反転した反転コード28を記録しておくようにすれば、これを使って、エラー訂正や読み取り位置の補正を行うことができるようになる。
【0053】
あるいは、図8の(D)に示すように、アドレスドット18の両脇に、エラー訂正用の訂正コード30を設けることにより、アドレスのエラー訂正を行うこともできる。つまり、アドレスドット18に加えて、この訂正コード30を読み取ることによって、アドレスの誤り訂正を行える。
【0054】
また、アドレスドット18の一部、例えば図9の(A)に示すように、真ん中に、どのようなアドレスの場合であっても常に黒ドットつまり「1」である固定パターン32を設けるようにしても良い。このようにすると、この固定パターン32の黒ドットを読み取ることで、位置のずれ検出やエラーの検出に利用することができる。
【0055】
あるいは、固定パターン32を、図9の(B)に示すように、両端に設けても良い。この場合は、固定パターン32としては、アドレスドット18の一端側を黒ドット、他端側を白ドットとしておくことにより、このアドレスドット18の読み取り方向を特定できるようになるので、たとえこのドットコードが上下逆さまにされて読み取られたとしても、正確にアドレスを読み取ることができるようになる。
【0056】
このように、アドレスドット18の少なくとも一部に固定パターン32を含めるようにすれば、この固定パターン32を利用して、位置合わせやエラー検出を行うことができ、あるいは、アドレスドット18の読み取り方向を特定できるようになる。
【0057】
なお、ブロック20がアドレス順に整列して記録されている場合、あるブロックのアドレスは周囲のブロックのアドレスから容易に推定することができるので、アドレスドット18を適宜省略することも可能である。
【0058】
例えば、図9の(C)に示すように、ブロック20が整列して順番にアドレスが付られている場合、第1ブロックと第3ブロックのアドレスが検出できれば、その間のブロックのアドレスは第2ブロックであると容易に推定することができる。従って、この第2ブロックのアドレスは記録せずとも良く、そこにもデータコード10を記録できるので、その分、記録容量を増加させることができる。
【0059】
なお、隣接するブロック間のアドレス関係が、例えば「+10」のように予め設定されていれば、この図のようにブロックアドレスが順番に並んでいなくても良い。
【0060】
このように、アドレスドット18を、少なくとも2つ以上のブロックのアドレスを同時に決定できるように適宜省略して記録すれば、この省略した部分にもデータコード10を記録できるので、その分、記録容量を増大させることが可能になる。
【0061】
次に、以上説明したようなドットコードを光学的に読み取って元のマルチメディア情報を再生する情報再生システムについて説明する。
【0062】
図10は、その構成を示す図である。
【0063】
即ち、紙などの情報記録媒体34上に記録されたドットコード36は、画像入力部38で撮像される。データ読み取り基準点決定部40は、この画像入力部38で撮像された画像から、データコード10を読み取るための読み取り基準点を決定する。データ読み取り部42は、このデータ読み取り基準点決定部40によって決定された読み取り基準点に基づいて、画像入力部38で得られた画像からデータコード10を読み取る。データ再生部44は、このデータ読み取り部42によって読み取られたデータを再生する。
【0064】
このような構成にすることで、ドットコードが高速且つ正確に読み取ることができるようになる。
【0065】
なお、上記再生部44は、読み取ったデータを必要に応じて復調やエラー訂正を行って再生するということも含む。ここで再生とは、画像であればモニタへの映像出力、音声であればスピーカへの音声出力のことであり、もし圧縮されている信号であれば、復号処理を施してから出力する。例えば、エラー訂正にリードソロモン3重積符号を用いれば、データは8−10変調されているので、10−8変調(8−10逆変調)を行うことになる。
【0066】
一方、上記画像入力部38は、CCDカメラ等の撮像部46と、この撮像部46の出力画像を等化並びに2値化する等化,2値化部48とを含む。即ち、この画像入力部38において、ドットコード36を撮像して得られた画像を2値化し、以降のデータ読み取り基準点決定部40からは、この2値化されたデータについてだけ処理を行うようにすることで、画像を保持しておくための不図示メモリを少なくすることができると共に、データ転送量も少なくなり、高速処理が可能になる。
【0067】
また、このような2値化したデータとすれば、データ読み取り基準点決定部40以降をパーソナルコンピュータ等の情報処理装置で構成することも可能になる。さらに、こうした場合、画像入力部38だけを収容する筐体が小さなもので済むため、操作者が走査を行う時に負担が小さくなる。
【0068】
一方、上記データ読み取り基準点決定部40は、例えば、パターンドット14の中点を読み取り基準点として検出するものであっても良いが、本実施の形態では、マーカ16の中心位置を読み取り基準点として決定するようにしている。
【0069】
即ち、このデータ読み取り基準点決定部40は、上記等化,2値化部48で2値化された画像データからマーカ16の存在するマーカ存在エリアを検出するマーカ抽出部50及びこの検出されたマーカ存在エリア中のマーカ16の概中心を求めるマーカ概中心算出部52よりなるマーカ検出部54と、このマーカ検出部54で求められたマーカ16の概中心を用いて上記パターンドット14を検出し、この検出したパターンドット14によりデータコード10及びアドレスドット18の読み取り基準点としてのマーカ16の真の中心座標を推定するマーカ中心検出部56とからなる。
【0070】
上記マーカ検出部54のマーカ抽出部50は、イロージョン処理並びにラベリング処理を行って、マーカ存在エリアを検出する。
【0071】
ここで、イロージョン処理自体は、画像処理で知られた処理であり、その処理を実行するためのハードウェアも種々存在しているものである。このイロージョン処理とは、注目画素に対して所定の大きさのマスク、例えば図11の(A)に示すような3×3画素分のマスクを掛けたときに、図11の(B)に示すようにマスク内の画素が全て黒画素(○で示す)であれば注目画素は黒画素に、また図11の(C)や(D)に示すようにマスク内で1つでも白画素(×で示す)であれば注目画素は白画素に変換していく処理である。
【0072】
このようなイロージョン処理をドットコード36に対して行うと、図12に示すように、小さなドットで構成されるデータコード10やパターンドット14、アドレスドット18は消えてしまい、これらのドットに比べて非常に大きなマーカ16に相当する画素のみを残すことができる。
【0073】
そして、残った画素をまとまり毎に順次ラベリングし、同一のラベルがふられている存在領域を求める。この存在領域にイロージョンによって縮退した分を拡大してマーカ存在エリア58となる。
【0074】
マーカ概中心算出部52は、各マーカ存在エリア58毎の黒画素の重心を算出し、これをマーカ概中心として、パターンドット14の読み取りの際の基準点とする。
【0075】
このように、イロージョン処理とラベリング処理とを行うことにより、既存のハードウェアを利用して簡単にマーカ16を検出でき、また、マーカ16付近のノイズの影響を受けにくくすることができる。
【0076】
また、上記マーカ抽出部50としては、前述したようなイロージョンや画像処理において知られているストリーク等の計算を必要とする処理を行わずにマーカ存在エリア58を求めることも可能である。
【0077】
例えば、図13の(A)に示すようなフレーム画像を考えると、撮像部46の不図示光学系の特性によりLPFがかかった状態で撮像されるため、図13の(B)に示すように、マーカ16のように黒画素が集まった部分では黒レベルが低く検出される。そこで、フレーム60の少なくとも1つ以上のマーカを含む領域をスキャンしながら輝度の最小値を求め、その値にオフセット(15〜20程度)をかけた値を閾値thとして、フレーム画像を2値化すると、図13の(C)に示すようにマーカ中心部62が容易に抽出できる。
【0078】
即ち、マーカ16は大きいため、画像として取り込んだ場合に、中心部の輝度値はかなり低い値をとる。これに対して、データコード10のドットやパターンドット14は、光学系により若干のボケがあるために、その回りの白情報が重畳されて、少し薄くなる。従って、図13の(B)に示すような輝度プロファイルが得られるので、所定の閾値thで2値化することで、マーカ16の中心部分だけを抽出できる。
【0079】
このように、少なくともフレーム60の一部について輝度の最小値を求め、これに所定のオフセットを加えた閾値を用いて2値化することにより、イロージョンやストリーク等の計算を必要とせずにマーカ中心部62を検出することができる。
【0080】
また、この場合、ローパスフィルタを掛けた後、この処理を行うようにすれば、さらにマーカ中心部62の検出が容易になる。即ち、図13の(A)に示すようなフレーム画像にローパスフィルタを掛けると、データドット等の小さなドットがさらにボケて薄くなり、大きなマーカ16の中心部のみが残るようになる。
【0081】
このように、ローパスフィルタを掛けることによって、マーカ16がデータコード10のデータドットやパターンドット14のような他のドットよりも大きいドットで記録されている場合、マーカ中心部62の検出がより確実に行える。
【0082】
また、画像処理分野で既知の技術であるストリーク処理と互いに接するストリークの数で中心算出範囲を求めるようにしても良い。
【0083】
即ち、フレーム毎に、図14の(A)に示すように、ストリーク(黒ランの連続数つまり黒画素の続いている数とその始点を求める)を行い、互いに接するストリーク(図の例では、ストリークS1〜S7)をひとまとめにする。そして、まとめられたストリークは属性データをコピーする。ここで、属性データとは、そのストリーク及びそれに接するストリークの上端と左右端の座標と、接したストリークの数のことである。そして、接するストリークが下方に存在しなくなった時に、それまでに接したストリークの数から、高さ方向の範囲を求める。
【0084】
このようにして、黒画素の始点とそこからの長さというデータに分解すると、データドット等の小さなドットは短いストリークデータしかとらないため、ある程度の大きさの塊で接しているストリークだけがマーカ16であると判定できる。
【0085】
従って、互いに接するストリークを一纏めにしてから、この纏めたストリークにおいてそれぞれ属性、即ち、始点と長さ(終点)の座標をそれぞれ下のストリークにコピーしていく。なお、接しているストリークがあると、下側のストリークは上側の属性をコピーするので上側の属性の始点と終点をコピーすることになる。こうして、左端、右端、上端、下端をコピーしていく。
【0086】
例えば、一番上側の小さなストリークS1は、下側のストリークS2に対してこの一番上のデータつまり上辺だけをコピーしてやり、下側のストリークS2は、左端と右端のデータを持つ。すると、最終的に一番下側のストリークS7まで処理を終わると、この一番下のストリークデータS7が持っている属性は、一番長いストリークS4の左端と右端と、一番上のストリークS1と一番下ストリークS7の属性が記録されていることになるので、この属性より、マーカ16の存在エリアが求められる。
【0087】
このように、ストリーク処理と互いに接するストリークの数で中心算出範囲を求めるようにすれば、イロージョン処理のように計算量の多い処理を行う必要がないため、処理が簡単になる。また、マーカ16内のスポット的な傷に強くなるという効果も有する。
【0088】
また、フレーム内すべてに対して上記のようなマーカ抽出処理を行わなくても、すべてのマーカを抽出することが可能である。
【0089】
即ち、図14の(B)に示すように、フレーム60内に9個のマーカ16(M1〜M9)がある場合を考えると、まず、マーカ16をフレームの中でラスタスキャンしていき、上記のようないずれかのマーカ抽出処理によってマーカ16を探し出す。こうしてマーカM1が見つかると、そのマーカM1に相対的に隣接するマーカM2,M4は、そのマーカM1からどの位の距離だけ離れているという情報が先見情報として与えられている場合、そのマーカM1からさらにラスタスキャンしていって次のマーカM2,M4を細かく捜す必要はなく、スキューの可能性を加味してその先見情報に従って決められるマーカの存在する可能性のある領域64に飛んで、その領域64内でのみ、マーカ16を探せば良いことになる。そして、マーカM2,M4が見つかれば、そこからまた逐次その先へと広げてマーカ16を探していけば良い。
【0090】
このように、少なくとも1つ以上のマーカを検出し、その検出されたマーカを基準としてその他のマーカの存在する可能性のある領域64内でのみマーカを探すようにしているので、フレーム全体に対してマーカ抽出のための計算を必要としなくなり、処理が高速になる。また、マーカ16間に例えば黒い塵等があると、上記イロージョンなどの処理ではそれもマーカ16の候補として抽出してしまうが、このようにマーカの存在する可能性のある領域64内のみを探す場合には、そのような塵をマーカ候補として抽出することはない。
【0091】
また、上記マーカの抽出処理において、例えば図15の(A)に示すように、フレーム60中に3個しかマーカが見つかっていない時には、ブロックを構成するマーカ組(この例では4隅)が得られないことがわかるので、このフレームの処理を中止するようにしても良い。
【0092】
即ち、四隅にマーカ16を配置してあるドットコードでは、イロージョン処理やストリーク処理の後でラベリングをしたラベルが3つまでしかふられなかった場合には、マーカ16が3個しかないということがその時点でわかる。従って、このようにフレーム内で検出されたマーカ数がブロックを形成するのに必要な数に満たない場合、そのフレームの処理を中止するようにすれば、無駄な処理を省くことができる。
【0093】
一方、上記マーカ概中心算出部52は、例えば、図15の(B)に示すように、上記マーカ存在エリア58内の全黒画素の重心を算出し、その重心66をパターンドット14の検出のための基準座標としてのマーカ概中心とする。
【0094】
このようにマーカ存在エリア58内の黒画素全ての重心をマーカ概中心とすることで、白抜けや黒いドット状、髭状のノイズがあっても、これを打ち消すことができる。
【0095】
あるいは、上記マーカ概中心算出部52は、例えば、図15の(C)に示すように、マーカ16の外接矩形68を求め、その中心点70を算出して、そこをマーカ概中心とするようにしても良い。こうすれば、上記重心を算出する場合に比べて、計算量が少なくて済む。
【0096】
ところで、上記マーカ概中心算出部52においては、例えば、図16の(A)に示すように、マーカ16がフレーム端72にかかってしまって欠損した場合には、フレーム60内に入っている同図に網掛けで示す残りの部分の概中心74が求められることになる。このように算出した概中心74が実際の正しいマーカ概中心76とずれてしまうと、その後、マーカ中心検出部56により行われるパターンドット14の検出において、この点を基準にしたのでは、パターンドット14がうまく検出されないことがある。つまり、マーカ16がフレーム端72にかかってしまうと、マーカ16の一部が欠損することにより、検出されるマーカ概中心位置がずれることがあり、こうした場合、パターンドット14の各ドットを正常に検出することができず、マーカ中心位置検出精度が低下してしまう。
【0097】
そこで、マーカ概中心算出部52においては、この算出された概中心の位置がフレーム端72からどの位の距離にあるかにより、そのマーカ16が欠けたかどうかを推定し、もし欠けている場合には、そのずれ量δを算出して、マーカ概中心位置を正しいマーカ概中心76に補正する処理を行うことが好ましい。
【0098】
この場合、マーカ16が欠けているかどうかは、図16の(B)に示すように、算出された概中心位置が概中心補正領域78内にあるかどうかにより判断することができる。
【0099】
この概中心補正領域78は、フレームの左右端に関しては、正しいマーカ概中心76のフレーム端72からの距離dがマーカ16の左右方向の大きさの半分aより小さい(即ち、d<a)ような幅を持ち、フレームの上下端に関しては、正しいマーカ概中心76のフレーム端72からの距離dがマーカ16の上下方向の大きさの半分bより小さい(即ち、d<b)ような高さを持つ領域である。
【0100】
また、概中心のずれ量δは、次式で与えられる。
【0101】
【数1】

Figure 0003568508
【0102】
なお、撮像部46のCCDの各画素が正方形ではなく、またCCDの画素ピッチも縦と横で違うということにより、これらの図16の(A)及(B)に示すように、円形のマーカ16を撮像して得られる画像は、このように楕円形になってしまう。そのため、マーカ16がフレーム左右端からはみ出した場合と、上下端からはみ出した場合とでは、ずれ量δの算出式が異なっている。
【0103】
このように、フレーム端で欠けている可能性のあるマーカの概中心位置を補正することにより、フレーム端にかかってしまったマーカについても、欠けていないとしたときの概中心位置を求めることができるため、パターンドットの検出をより確実にすることができる。
【0104】
また、上記ずれ量δつまり補正量を逐次計算して求めなくても、この計算式を、検出された概中心のフレーム端からの距離と補正量との関係を示すテーブルの形式で持つものとしても良い。
【0105】
例えば、マーカ概中心算出部52は、図16の(C)に示すように、検出された概中心のフレーム端からの距離と補正した概中心のフレーム端からの距離との関係を示すテーブルを有する。ただし、これらのテーブルは、マーカ16の直径を7ドット、撮像時の1ドットのサイズが横3.47画素(pixel)、縦2.70画素の場合を示している。
【0106】
このように、フレーム端からの距離に応じて所定の補正量を出力するテーブルを用いるようにすれば、補正量の計算が不要になる。
【0107】
また、上記概中心位置補正処理をフレーム全体のマーカに対して行う必要はなく、実際にデータドットを読み取るブロック20に係わるマーカのみに対して行えば良い。
【0108】
例えば、図17の(A)において、フレーム60内にそれぞれ「×」印で示すマーカ概中心M0〜M14が算出されたとき、概中心位置補正が必要なマーカ、つまりフレーム端で一部が欠落したマーカ80としては、M0,M9,M14の3つがある。しかしながら、実際に読み取るブロックつまり処理対象ブロック82は、4隅にマーカのある図中に網掛けして示す5個のブロックである(なお、マーカM7,M9,M11,M13を4隅に配したブロックについては、詳細は後述するような理由により除外される)。従って、この読み取りに係わる5個のブロックを構成するマーカ16について、その一部がフレーム端にかかって欠落したと判断された時に、そのマーカについてのみ補正を行い、それ以外のものについては行わない。つまり、同図の例では、フレーム端で一部が欠落したマーカ80の内、処理対象ブロック82に関与するものはマーカM14だけであるので、上記概中心位置補正処理は、このマーカM14についてのみ実施される(この場合、マーカM0,M9は、ブロックを構成する4隅のマーカの一つとなり得ないので、処理対象から除外する)。
【0109】
このように、処理対象となったマーカについてのみ選択的に補正を行う、つまり、フレーム全体について概中心位置の補正を必要とするマーカを検出して補正するのではなく、読み取りを行うブロックに関係するマーカについてのみ、この処理を行うようにしているので、計算量が少なくなる。
【0110】
なお、マーカM7,M9,M13,M11を4隅に配したブロックを除外するのは、詳細は後述するようなダブルハイトの場合には、マーカM5,M6,M10,M8を4隅に配したブロックとマーカM7,M9,M13,M11を4隅に配したブロックとは同じデータ内容を有しており、処理対象ブロック82として、前者のブロックを選択しているので、後者のブロックは除外されるということによる。
【0111】
次に、上記マーカ中心検出部56について詳細に説明する。
【0112】
このマーカ中心検出部56は、パターンドット14を検出するために、まず、2つのマーカ16つまりマーカ対を選択する。
【0113】
即ち、マーカ16を使ってパターンドット14を探す場合、マーカ16が1つだけでは、図17の(A)に示したようにドットコード36がスキューして撮像された場合には、パターンドット14がどこにあるかは判らない。それに対して、図17の(B)に示すように、2つのマーカ16がマーカ対84として検出されたならば、パターンドット14の存在する位置が例えばマーカ間であるというようにフォーマット情報として与えられていれば、そのマーカ対84の間を探せば良いのであるから、例えば、マーカ対84を構成する一方のマーカ16から他方のマーカ16へ順次1画素ずつ探索して行けばパターンドット14が見つかることになる。
【0114】
このように、マーカ対を選択することにより、パターンドット14の検出が確実になる。即ち、パターンドット14は、マーカ16から所定の位置関係を有して記録されるため、スキューした場合にも、少なくとも2つのマーカ位置が求められれば、パターンドット14を検出することができる。
【0115】
そこで、マーカ中心検出部56は、まず、図18に示すように、基準マーカ選択部86で処理対象となる基準マーカを一つ選択し、対マーカ存在領域算出部88にて仕様スキュー角とフォーマット情報とに従って対マーカ存在領域を算出して、対マーカ候補検出部90でこの対マーカ存在領域内を探索して、対になるマーカ候補全てを検出する。次に、ベースマーカ対選択部92で対をなす一組のマーカ候補を選択することによって処理対象のマーカを決定し、マーカ組選択部94によりそれら処理対象マーカを選択して処理対象ブロックを決定する。そして、この処理対象ブロックに係わるマーカ間のパターンドット14の検出へと進む。
【0116】
上記対マーカ存在領域算出部88は、以下のようにして対マーカ存在領域を算出する。即ち、図17の(C)に示すように、基準マーカ選択部86にて選択されたある1つの基準マーカ96と対になるべきマーカが存在する範囲つまり対マーカ存在領域98は、仕様スキュー角(図の例では20°)と、マーカ間距離つまりフォーマット情報とによって算出することができる。従って、図17の(D)に示すように、上記マーカ検出部54がノイズなどにより幾つかマーカ候補の概中心(図中×で示す)を検出したとしても、この対マーカ存在領域98の範囲内に入るものだけが、対になるべきマーカ(対マーカ100)であり、それ以外のものは誤マーカ102であることが判る。
【0117】
なお、仕様スキュー角とは、当該情報再生システムがどれだけ傾いてドットコード36を読む仕様になっているかを示すものである。例えば、画像入力部38が固定されていて、ドットコード36が自動的に搬送されてスキャンするような場合であれば、ほとんどスキューすることはなく、この仕様スキュー角は、1°以下の単位となる。これに対して、操作者が画像入力部38を手動でドットコード36上をスキャンさせるような場合には、20°位は傾く可能性がある。また、例えば、画像入力部38にローラ等によってある程度スキャン方向が規制されるような構造となっていれば、スキューが減らせる。このように、情報再生システムは、その構造によって、スキュー角が仕様により決まっている。
【0118】
このように、マーカ対を選択するに際して、仕様スキュー角とフォーマット情報とに従って対マーカ存在領域を算出し、この対マーカ存在領域内を探索してマーカ候補を検出するようにすれば、フレーム全体に対して対となるマーカ候補を検出する処理を必要としないため、探索効率が向上する。また、左右隣接マーカ存在領域を絞って探索するため、ノイズによるマーカの誤検出を軽減することができる。換言すれば、ノイズによりマーカ候補を誤検出しても、マーカ対を構成するフォーマット上の制限によりそれらを除去することができる。
【0119】
また、マーカ中心検出部56においては、外挿により対マーカ位置を算出するようにしても良い。
【0120】
例えば、既に1組のマーカ対が見付かっているような場合、例えば図19の(A)において、マーカM8とM10が既に何らかの形で検出されている場合には、次のマーカM11の位置は、上記のようにしてマーカM10から仕様スキュー角とフォーマット情報とによって対マーカ存在領域98を算出してその範囲を探すという処理をおこなわずとも、マーカM8とM10との位置関係により既にスキュー角度が判っており、またマーカ間距離も判っているので、それに従ってこのマーカM10から外挿ベクトル(exv)104を延ばしてやり、図19の(B)に示すように、その先端近傍の非常に狭い範囲の中で対マーカを探索してやれば良い。
【0121】
こうすることにより、非常に狭い範囲の中だけがマーカ探索領域106となるので、それ以外のところにあるマーカ候補を誤検出することはなくなる、つまりノイズに強くなる。特に、上記対マーカ存在領域98内に複数のマーカ候補が存在する場合であっても、正しいマーカ候補を対マーカ100として選び出すことが可能となる。
【0122】
また、このような外挿ベクトル104を用いることにより、マーカ16が適宜省略されたコードに対しても読み取り可能となる。例えば、上記の例において、マーカM11が省略されていたとしても、この外挿ベクトル104によりマーカM11があるべきおおよその位置が判り、そのマーカM10,M11間のパターンドット14を読み取ることができる。
【0123】
このように、外挿により対マーカ位置を算出すれば、ノイズによるマーカ欠落や、誤マーカ検出を起こしにくい。また、マーカ16が適宜省略されたコードに対しても読み取りが可能となる。
【0124】
この外挿ベクトル(exv)104は、縦方向隣接マーカを探索する際にも利用でき、これは先に検出された横方向マーカ対の位置関係から算出される。例えば、図19の(C)に×印で示すように2つのマーカ16が検出されている場合、そのx方向及びy方向の増分Δx,Δyより、次式により縦方向に隣接するマーカの位置が外挿される。
【0125】
exv.fx=35/43×RAT×Δy
exv.fy=35/43/RAT×Δx
ただし、RATは使用する撮像系の画素に対する縦横比であり、この例では、
RAT=3.47/2.70
である。
【0126】
このように、外挿によってマーカ位置を算出する場合、先に検出されたマーカ対の位置関係から外挿ベクトルを算出することにより、マーカ対に対応してブロックを構成するマーカ組を確実に検出することができる。
【0127】
また、この外挿ベクトル104は、次フレームの処理においても利用することができる。
【0128】
即ち、ドットコード36は、その全体が1枚の画面として撮像されるとは限らず、実際には、スキャンしてフレーム画像を連続して何枚も撮像する場合が多い。この場合、時間的に連続する2つのフレーム間では、スキュー角が急に変化するということはほとんど無いので、前のフレームで求めた外挿ベクトル104を次のフレームで使うことができる。
【0129】
このように、第2フレーム以降では直前のフレームの外挿ベクトル104を参照するようにすれば、計算によって外挿ベクトル104を求める必要がなくなる。つまり、対マーカ存在領域算出部88の処理を省略することができるようになる。
【0130】
また、外挿ベクトル104により求まるマーカ探索領域106の中で対応するマーカを探す場合、その時に、例えば歪みや傾きによって実際のマーカがこの外挿した位置ではなくて若干ずれることがある。そこで、このような場合には、図19の(B)に示すように、このマーカ探索領域106内で探索された対マーカ100の概中心を用いて外挿ベクトルを修正し、次の対マーカ100の探索時には、この修正された外挿ベクトルつまり修正外挿ベクトル108によりマーカ探索領域106を設定するのが好ましい。
【0131】
このように、外挿ベクトル104を基に検出されたマーカ中心位置を用いて、この外挿ベクトル104を修正することにより、即ち、外挿ベクトルを修正しながら処理を進めることにより、歪や傾きが存在する場合にもマーカを見失うことなく、確実に検出することができるようになる。
【0132】
以上のいずれかの手法によって対になるマーカ候補すべてが検出されたならば、マーカ中心検出部56では、ベースマーカ対選択部92により、2つのブロックにまたがる一連のマーカ対をベースマーカ対として選択する。
【0133】
例えば、図20の(A)に示すように、マーカM10とM11でなるマーカ対と、マーカM11とM13でなるマーカ対のように、2つのブロックにまたがる一連のマーカ対がある場合、それら3つのマーカM10,M11,M13をベースマーカ対として選択する。
【0134】
即ち、仕様スキュー角やフォーマット情報とによって基準マーカ(ntm)より隣接マーカの存在領域つまり対マーカ存在領域98を算出し、その対マーカ存在領域98内のマーカ候補を検出して、それらのうち対になるものを隣接マーカ(lmc,rmc)として抽出する。そして、この基準マーカと抽出したマーカとをベースマーカ対110として選択する。
【0135】
即ち、誤検出マーカが存在した場合、一列に並んでいるというフォーマット上の制限から、その誤検出マーカを含む3つのマーカ16を結んだ時に真ん中のマーカが丁度その中点になるような可能性はほとんどなく、従って、このように2ブロックにまたがるマーカ対をベースマーカ対として選択するものとすれば、そのような誤検出マーカは排斥されて、実際のマーカであるものしか選択されないことになる。つまり、ノイズによってマーカと誤検出されたものを排斥することができるようになる。
【0136】
また、ドットコード36がダブルハイトで記録されている場合、このような2ブロックにまたがるベースマーカ対というのを選択することで、そのどの2列を読むかをここで決めることができる。
【0137】
さらには、複数のブロックにまたがるので、それだけ多くのパターンドットを利用することができ、データ読み取り基準点の精度を高くすることができる。即ち、図の例では、マーカM10とM11との間のパターンドットを使って読み取り基準点を決めるというだけではなく、マーカM10からM13までの範囲のパターンドットを使って、読み取り基準点つまりマーカの真の中心座標を決めるようにすれば、それだけ精度を高くすることができる。
【0138】
また、複数のブロックにまたがって、同時にデータ読み取り基準点を決定することができるので、マーカM10とM11の真中心を求めて、次にマーカM11とM13の真中心を求めて、というように順次求めていく場合に比べて、計算量が少なくて済むといった利点もある。
【0139】
このように、少なくとも2つ以上のブロックにまたがる一連のマーカ対をベースマーカ対として選択するようにすれば、ベースマーカ対を構成するフォーマット上の制限(対が限定される)により、ノイズによるマーカの誤検出を軽減することができる。また、ダブルハイトで記録されたコードの場合、再生ブロック列にまたがるマーカ対をベースマーカ対として選択することで、2度読みをなくすことができる。さらに、複数のブロックにまたがることで、多くのパターンドットを読み取ることができ、データ読み取り基準点精度が高くなる。また、複数のブロックにまたがって同時にデータ読み取り基準点が決定できるため、計算量が少ないという効果も有する。
【0140】
なお、ここで、ダブルハイトについて説明する。
【0141】
ダブルハイトとは、図20の(B)に示すように、全く同一のコードを2段印刷することをいう(図中、A1,A2,…はブロックアドレスを示すものとする)。つまり、元のコードが2段(縦2ブロック)重ねになっている場合は、このダブルハイトでは、4段(縦4ブロック)重ねになる。そして、このドットコード36を画像入力部38で横方向にスキャンした場合、CCDカメラ等の撮像部46(撮像部視野112)によって得られるフレーム画像としては、図20の(C)に示すように、90°回転した画像が得られる。つまり、スキャンにつれて、ブロックが下からせり上がってくるように、順次ブロックが上方にスライドしたフレーム画像が得られることになる。
【0142】
この場合、ブロックの大きさとフレームの大きさの関係から、通常1フレームに横方向に3ブロック分が撮像されることになる。この3ブロックのうち、ダブルハイトの場合には、2つは同じデータ内容のブロックであるため、どちらか一方のみのブロックについてのみ処理を行えば良いことになる。従って、前述した図17の(A)の例では、マーカM5,M6,M10,M8を4隅に配したブロックとマーカM7,M9,M13,M11を4隅に配したブロックとは同じデータ内容を有しており、処理対象ブロック82として、前者のブロックを選択しているので、後者のブロックは除外されているものである。
【0143】
また、ベースマーカ対選択部92では、少なくとも左右の隣接マーカが検出できる範囲内でスキャン方向側のマーカ候補から基準マーカを選択し、これを基準としてベースマーカ対を選択する。
【0144】
即ち、あるマーカがみつかった時に、それに隣接するマーカがどの位置にあるかというのは、前述したように仕様スキュー角やフォーマットで規定することができる。この場合は更に傾きによる縮小率も関係してくるが、隣接マーカがフレーム60内に必ず入ってくるのは、当該マーカが、図21の(A)に示すような領域114内にあるときだけであるので、この領域114内で基準マーカntmを選択する。
【0145】
この領域114は、フレーム60よりも、フレーム上下端からは距離ACRY、左右端からは距離ACRX2だけ小さな領域である。ここで、ACRY及びACRX2は、図21の(B)に示すように、対マーカ存在領域98のY方向の1/2の長さと、当該マーカから対マーカ存在領域98の遠い側の端までのX方向の長さに該当し、同図に示すような数式によって算出される値である。
【0146】
つまり、このような領域114内で基準マーカを選択すれば、この領域114中のどのマーカを選択しても必ずその両隣には隣接マーカを検出する可能性があるということである。
【0147】
また、基準マーカをスキャン方向側のマーカ候補から選択するのは、後述するブロックの選択のためであり、このようにしてスキャン方向側からブロックを選択していくと、前のフレームで既に処理されているブロックが後から選択されて出てくることになるので、処理済みのブロックが検出されたならばそこで当該フレームの処理を中止するようにすれば、既に処理したブロックに対する無駄な処理を省くことができるようになる。
【0148】
なお、図示した例では、基準マーカは、ベースマーカ対110の中心のマーカを指し、なるべくフレームの下の方のマーカを基準マーカntmとするようにしているので、図では基準マーカntmとしてマーカM11が選択されることになる。
【0149】
このように、少なくとも左右の隣接マーカが検出できる範囲内でスキャン方向側のマーカ候補から基準マーカを選択し、これを基準としてベースマーカ対を選択することにより、本来検出されるはずの隣接マーカが検出されない場合、そのコードが画面から外れているか、もしくはアクシデントが起きていることが推定できる。また、スキャン方向側のマーカ候補から基準マーカを選択することにより、前のフレームでは未検出のマーカから処理がなされるため、重複した処理を防ぐことができる。
【0150】
また、ベースマーカ対選択部92では、基準マーカntmの片側にのみマーカ候補が見つかった場合、そのマーカを基準マーカとして再選択して、さらに隣接マーカを探索する。ただし、このマーカ探索の際には、外挿による存在領域の限定を行う。
【0151】
例えば、図21の(C)において、最初に基準マーカntmとしてマーカM10が選択され、対応するマーカlmcとrmcを対マーカ存在領域98から探した時、右側の対マーカ存在領域98からマーカが見つからず、左側の対マーカ存在領域98から左側隣接マーカlmcとしてマーカM9が見つかった場合には、マーカM10がドットコード36の端部にあるマーカであると判断する。そこで、この見つかったマーカM9を基準マーカntmにする。そして、既に検出されているマーカM10とから外挿ベクトルによりマーカ探索領域106を求め、その領域内で左側隣接マーカlmcを探す。こうして、マーカM8を検出して、マーカM8,M9,M10をベースマーカ対とする。
【0152】
このように、マーカに対して左右片側のマーカしか検出できない場合、基準マーカをその検出された隣接マーカに置き換え、外挿によってマーカを探索すれば、より多くのブロックを読み取ることかできる。即ち、基準マーカを基準としてブロックを読み取る構成であるため、コード端のマーカが基準マーカとして選択された場合、読めるブロックの数が減ってしまう。そこで選択された基準マーカがコード端である場合にはこれを選び直すことにより、より多くのブロックを読み取ることができる。また、外挿によって探索領域を絞っているため、ノイズによるマーカの誤検出を軽減することができる。
【0153】
なお、上記のようにして外挿したマーカ位置がフレーム60からはみ出してしまう場合には、ベースマーカ対選択部92は、この外挿した位置を仮想マーカの概中心として記憶する。
【0154】
例えば、図22の(A)において、マーカM8が基準マーカntmとして最初に設定されて、両側の対マーカ存在領域98を探したとき、右側隣接マーカrmcが見つからない場合、前述したように、基準マーカをマーカM7に移して、マーカM7,M8でなるマーカ対から外挿により左側隣接マーカlmcを探すことを行う。この時に、この外挿点がフレーム60からはみ出た場合には、この外挿点に仮想マーカを設ける。
【0155】
このようにすると、同図においてマーカM7と仮想マーカM10の間にあるパターンドット14を利用することができる。
【0156】
また、このような仮想マーカM10を設けなかった場合には、マーカM7とM8の組しか見つからず、このマーカM7,M8を含むブロックと同一の列のブロックしか読み取らないようになってしまう。しかし、このように仮想マーカM10を設けることで、マーカM1,M2,M5,M4を4隅に配置したブロックをも読み取るようになり、ブロックの欠落を防ぐことが可能になる。
【0157】
このように、外挿した時にマーカ探索領域が画面からはみ出た場合に、外挿点を仮想マーカとすることにより、マーカが画面からはみ出していても、画面内に残っているパターンドット14は利用することができるので、これらのパターンドット14を有効に利用することができるようになる。
【0158】
また、ブロックは基準マーカを基準にして順次外挿により読み取っていくが、基準マーカに隣接するマーカが画面から外れていたとしても、外挿により求めたブロックを構成するマーカは、スキューによりフレーム内に入ってくるときがあり、そのような場合に、それらのブロックが読めるようになる。
【0159】
また、ベースマーカ対選択部92は、2つ以上のベースマーカ対が選択できる場合には、より多くのブロックを読み取れる可能性の高いベースマーカ対を再選択する。
【0160】
即ち、ダブルハイトの場合、前述したように、全く同一のコードが2段印刷されている。フレーム画像としては、元のコードが横2ブロックからなるとき横4ブロック存在し、ブロックの大きさとフレーム60の大きさの関係から通常は1フレームに横3ブロックが撮像される。そこで、より多くのブロックを読み取れる可能性の高いベースマーカ対を再選択することにより、読み取りブロック数を増加することができる。
【0161】
例えば、図22の(B)の左側に示すように、マーカM10,M11,M13をベースマーカ対として選択すると、同図の右側に網掛けを付して示すように、読み取りブロックは、マーカM2,M4,M7,M6を4隅に配したブロックと、M6,M7,M11,M10のブロック、M7,M9,M13,M11のブロックの3ブロックとなる。
【0162】
これに対して、図22の(C)の左側に示すように、マーカM8,M10,M11をベースマーカ対として選択すると、同図の右側に網掛けを付して示すように、読み取りブロックは、マーカM1,M2,M6,M5を4隅に配したブロックと、M5,M6,M10,M8のブロック、M8,M10,M14,M12のブロック、M2,M4,M7,M6のブロック、M6,M7,M11,M10のブロックの5ブロックとなる。
【0163】
ここで、ダブルハイトの場合には、M5,M6,M10,M8のブロックと、M7,M9,M13,M11のブロックとは、全く同じデータが記録されているため、どちらのブロックを読み取っても得られるデータは同じである。そこで、なるべく読み取れるブロック数の多いM8,M10,M11をベースマーカ対として選択する。
【0164】
このように、2つ以上のベースマーカ対が選択できる場合には、より多くのブロックを読み取れる可能性の高いベースマーカ対を再選択することにより、1フレームからより多くの読み取りブロックが抽出できるようになる。
【0165】
なお、上記のようなベースマーカ対の再選択を行うとき、コードが左にスキューしている場合には右側のベースマーカ対を、また右にスキューしている場合には左側のベースマーカ対を再選択し、マーカの探索の際には、外挿による存在領域の限定を行う。
【0166】
例えば、図23の(A)に示すようにコードが右にスキューしている場合には、ベースマーカ対として左側のM8,M10,M11の組と、右側のM10,M11,M13の組を選択する可能性があるが、左側の組を選択すると5個のブロックを読み取ることができるが、右側の組を選択すると4個のブロックしか読み取ることができない。そこで、このようにコードが右にスキューしているときには、左側のマーカ対を選択する。
【0167】
ブロックを構成するマーカはベースマーカ対を基準にして順次外挿により求めていくが、このように、ベースマーカ対を再選択するとき、コードが右にスキューしている場合は左側のベースマーカ対を、左にスキューしている場合は右側のベースマーカ対を再選択することにより、スキューによって読み取りブロックを構成するマーカがフレーム外にはみ出てブロック欠損を生じるのを防ぐことができる(横方向)。
【0168】
あるいは、上記ベースマーカ対の再選択においては、中央よりのベースマーカ対を選択するようにしても良い。これは、左側マーカと基準マーカとの中点がフレーム中心より右側、もしくは右側マーカと基準マーカとの中点がフレーム中心より左側の場合に、中央に近いマーカ対を再選択することにより行われる。
【0169】
例えば、図23の(B)に示すように、コードが右にスキューしている場合、マーカM10,M11,M13をベースマーカ対として検出したとき、左側マーカM10と基準マーカM11の中点がフレーム60の中央よりも右側にあるので、このベースマーカ対がフレーム60の右側に寄っていることが判る。そこで、このような場合には、M11とM13でなるマーカ対よりも中央に近いM10とM11でなるマーカ対を再選択する。そして、外挿によりマーカM8を探索して、M8,M10,M11をベースマーカ対として選択する。
【0170】
コードが左にスキューしている場合には、右側マーカと基準マーカとの中点がフレーム中心より左側であるかどうかの判断により、再選択するかどうか決定できる。
【0171】
ブロックを構成するマーカはベースマーカ対を基準にして順次外挿により求めていくが、このように、左側マーカと基準マーカとの中点がフレーム中心より右側、もしくは右側マーカと基準マーカとの中点がフレーム中心より左側の場合、中央に近いマーカ対を再選択することにより、スキューにより、読み取りブロックを構成するマーカがフレームからはみ出てブロック欠損を生じるのを防ぐことができる。また、中央よりのブロックを選択するため、ディストーションの影響を小さくすることができる。
【0172】
また、マーカ組選択部94は、ブロックを構成するマーカのうち、全ての組み合わせ又は一部の組み合わせを選択する。
【0173】
即ち、一例として図24の(A)に示すようにブロック20が矩形状であり、その頂点にマーカが配置されている場合、ブロック20を構成する全ての4つのマーカ組を選択する。
【0174】
このように、ブロック20を構成するマーカ組を選択することにより、読み取るデータをブロック毎に分割して処理することができる。
【0175】
なお、マーカ組選択部94は、選択したブロック20を構成するマーカ組を全て不図示メモリに記憶する。
【0176】
例えば、図24の(A)の例の場合には、フォーマット情報により、マーカM0,M2,M6,M4が1つのブロックを構成するということが判ると、それを第1ブロックのマーカ組として、同図の(B)に示すように、左上がM0、右上がM2、右下がM6、左下がM4というようにメモリに記憶する。以下同様に、第2ブロックとしてM1,M3,M7,M5を、第3ブロックとしてM8,M10,M14,M12を、第4ブロックとしてM9,M11,M15,M13をそれぞれ記憶する。つまり、この例の場合は4つブロックがあるので、第1ブロックから第4ブロックまでをこのようにマーカ番号でメモリに記憶する。
【0177】
このように、概中心位置を基にブロック20を構成するマーカ組を全てメモリに記憶することにより、ブロック20が整列していない場合にもブロック毎にデータを読み取ることができる。
【0178】
あるいは、このように全てのマーカ組を記憶する代わりに、ブロック20を構成する所定の一つのマーカと、このマーカに対する他のマーカの関係を現す関係式とをメモリに記憶するようにしても良い。
【0179】
即ち、図24の(C)に網掛けして示すような処理対象ブロック82が整列されている場合には、ブロックを構成する4つのマーカの内の所定の一つ、例えば左上のマーカと、この左上のマーカと残りの3つのマーカとの関係式とが判っていれば、メモリに全てのマーカ組を記憶する必要はない。
【0180】
例えば、同図の例の場合、図24の(D)に示すように、関係式として右上のマーカは+1、左下のマーカは+3、右下のマーカは+4というように記憶しておけば、第1ブロックについては、左上のマーカM1を記憶するだけで、右上のマーカはそれに+1したM2、左下のマーカは+3したM4、右下のマーカは+4したM5であることが判るので、これらマーカM2,M4,M5をメモリに記憶する必要がなくなる。
【0181】
このように、ブロック20を構成するマーカの少なくとも一つと他のマーカとの関係が判っていれば、この少なくとも一つのマーカをメモリに記憶するだけで良く、メモリ容量を節約できる。
【0182】
また、マーカ組選択部94は、図25の(A)に示すように、フレーム60内に入ったブロック20を全て処理対象ブロック82とできるように、ブロック20を構成する全てのマーカ組を選択するものとしても良い。ただしこの場合は、ベースマーカ対選択部92を構成する必要はない。
【0183】
ダブルハイトの場合には、前述したように全く同一のコードが2段印刷されており、フレーム画像としては、元のコードが横2ブロックからなるとき横4ブロック存在し、ブロックの大きさとフレーム60の大きさの関係から通常は1フレームに横3ブロックが撮像される。そこで、このように、フレーム内のブロック20を構成する全てのマーカ組を選択すると、同一内容のブロックが重複して読み取られ、両方とも同じように読み取れたものを正しいデータとすることにより、データの信頼性を高めることができる。
【0184】
つまり、重複して選択されるブロックも全て処理対象とすることで、信頼性を高めることができる。
【0185】
また、マーカ組選択部94では、図25の(B)に示すように、フレーム内のスキャン方向側のブロックから処理対象ブロック82とできるように、スキャン方向側のブロックを構成するマーカ組から順次選択し、前フレームで処理済みのブロックが出現した場合、そこで処理を中止して、次フレームへ処理を移行するようにしても良い。
【0186】
例えば、前述したようなベースマーカ対選択部92においてスキャン方向側のマーカ候補から基準マーカを選択した場合、図26の(A)に示すように、ベースマーカ対としてマーカM8,M10,M11が選択されるが、下側のブロックから読み取るようにするために、ここからまず1回下方に外挿して、マーカを見つける処理を行う。これにより、マーカM12とM14がマーカとして検出され、これらは1つのブロックを構成するマーカ組であると見なされるので、このM8,M10,M14,M12のブロックを選択する。次に、今度は逆に上方のブロックを選択して処理していく。そして、ブロックアドレスにより既に処理したブロックであるか否かがわかるので、既に処理したブロックが見つかった時点で、このフレームについての処理を中止することにより、既に処理したブロックを再度処理するという無駄を省くことができる。
【0187】
このように、フレームのスキャン方向側のブロックを構成するマーカ組から順次選択することにより、処理済みのブロックは処理対象としないことができるので、重複した処理を省くことができる。
【0188】
また、撮像部46に光学的ディストーション等があった場合に、フレーム60の中央部よりは外側の方がディストーションが大きくかかってくるので、マーカ組選択手段94では、フレーム60の側端部のブロックを構成するマーカ組から順次選択するようにし、まず外側寄りのブロックのデータを読み、次に中央寄りのブロックのデータが読めれば、そのデータで上書きしていくものとすれば、データの信頼性をより高くすることができる。
【0189】
例えば、コードがダブルハイトで記録されている場合、図26の(B)に丸数字で示すように、1〜9の順番に処理対象ブロック82のデータを読んでいく。ここで、1のブロックと2のブロックとは同じデータが記録されているが、1のブロックはフレーム60の端に寄っているので、光学的ディストーションによって、読み取りエラーが発生する確率が高い。そこで、その後に、2のブロックのデータをもう1回読み取って上書きすれば、より正確なデータが得られる。また、例えば、この2のブロックがノイズ等によって読み取れなかったとしても、このブロックのデータは、先に1のブロックから読み取っているので、多少エラーが多いかもしれないが、このブロックのデータが全く読み取られないということを防ぐことができる。
【0190】
即ち、フレーム外側に近いブロックほどディストーションの影響を大きく受けてエラーが増えるため、このように、フレーム内のスキャン方向と直交する方向側の端部に近いブロックを構成するマーカ組から順次選択することにより、外側から順次ブロック内のデータを読み取って上書きしていけば、余計なメモリを必要とせずに信頼性の高いデータを得ることができる。
【0191】
あるいは、マーカ組選択部94は、選択されたブロックの読み取りに失敗した場合、同一のアドレスを有するブロックを再選択するものとしても良い。
【0192】
例えば、図27の(A)に示すように、ダブルハイトのコードにおいてベースマーカ対として真ん中の3つのマーカ(図示せず)を選択して処理対象ブロック82を順番に読んでいった場合に、アドレスA17のブロックが読み取り失敗ブロック116となったならば、これと同じデータ(同じアドレス)を持つブロックを再選択ブロック118として選択するようにマーカ組を選択し直す。
【0193】
なお、読み取りエラーが発生して、読み取り失敗ブロック116となるのは、例えば、ノイズ等によってアドレスドット18が読めなかった場合や、マーカが見つからなかった場合などである。
【0194】
このように、あるブロックの読み取りに失敗した場合には、同一のアドレスを持つ別のブロックを構成するマーカ組を選択し直すことにより、ブロック落ちによる読み取りエラーを減少させることができる。
【0195】
次に、データコード10の読み取り基準点の推定法について説明する。
【0196】
図27の(B)に示すように、マーカ16とパターンドット14とはコードライン120上に一直線に配置されている。つまり、データコード10の読み取り基準点としてのマーカ16の真中心と、パターンドット14の各ドット中心とがコードライン120上に配列されている。従って、この所定のフォーマットで記録されたパターンドット14を用いることで、読み取ったマーカの概中心が正しい真中心かどうかが直ちに判断できる。
【0197】
また、複数のパターンドット14を用いることで、求める読み取り基準点の精度を高めることができる。即ち、パターンドット14はフォーマットが決まっているため、このパターンドット14を検出したときに、本当にドットがあるべき位置にあったドットなのか、あるいはノイズなのかということを区別することができる。よって、このあるべき位置にあるパターンドット14のドットの中心を、全て求めることができ、これら複数のドットの中心位置を使用して、マーカ16の真の中心を求めることが可能になるので、読み取り基準点の位置の精度を上げることができる。
【0198】
例えば、図27の(C)に示すように、パターンドット14の各ドットの2値化処理後のパターン形状が得られたとすると、マーカ16の概中心間を結んだ読取ライン122上をフォーマット情報に従ったドット読取位置124でドットを検出する。そして、検出されたドットの中心位置126を算出し、これらの座標から一次回帰により、データコード10の読み取り基準点となるマーカ真中心を算出することができる。
【0199】
1ドット毎の中心位置検出精度は、誤差にしてコンマ数画素程度であるが、パターンドット14を1つのマーカ16に対して複数個用意することによって、精度を上げることができる。
【0200】
このように、所定のフォーマットで記録されたパターンドット14を用いてデータ読み取り基準点を推定する場合、所定のフォーマットと比較することにより、読み取った情報が正しいのかどうかが直ちに判定できる。また、少なくとも一つ以上のパターンドット14を用いることにより、基準点推定精度を高めることができる。
【0201】
なお、このようにパターンドット14を用いてデータ読み取り基準点つまりマーカ16の真中心を推定する場合、マーカ概中心から所定の位置関係を有するパターンドット14のみを利用して正確なデータ読み取り基準点を推定する。
【0202】
上記所定の位置関係を有するパターンドット14とは、例えば、図28の(A)に示すような隣接マーカ間のパターンドット14である。このマーカ真中心の推定は、歪みに対応するため、1ブロックずつ行う。例えば、マーカM8とM10のそれぞれの真中心を求める際には、それらの間のパターンドット14を用い、マーカM10とM11のそれぞれの真中心を求める際には、それらの間のパターンドット14を用いる。この場合、中心のマーカM10の真中心については、両側のパターンドット14からそれぞれ求まるので、図28の(B)に示すように、左右ブロックの平均を用いる。
【0203】
あるいは、上記所定の位置関係を有するパターンドット14としては、図28の(C)に示すように、ブロック外のパターンドット14を含む所定の範囲内にあるパターンドット14としても良い。この例では、M8,M10,M11の真中心をそれぞれL,M,Rの範囲のパターンドットを用いて求めている。
【0204】
この場合、例えば、求めたい1つのデータ読み取り基準点つまりマーカ16の真中心に対して、光学歪みがない場合には、できるだけパターンドット14のドット数を多く用いて求めた方が精度が良いので、そのように光学歪みのない場合には、図29の(A)に示すように、広い範囲のパターンドット14を用いてマーカ16の真中心を求めることが好ましい。
【0205】
これに対して、光学歪みがある場合には、マーカ16から離れるにつれて誤差が蓄積されて大きな誤差を生じるため、広い範囲のパターンドット14を利用せずに、図29の(B)に示すように、読み取るパターンドット14の範囲を限定する(マーカ近傍のパターンドット14のみを用いる)ことによって、求められたデータ読み取り基準点の信頼性を高くする。
【0206】
このように、マーカ概中心から所定の位置関係を有するパターンドット14のみを利用して正確なデータ読み取り基準点を推定することにより、歪みがない場合、範囲を広くしてドット数を多くすることにより推定精度を上げることができる。また、歪みがある場合、範囲を限定することにより推定精度を上げることができる。さらには、範囲をマーカ対間にすることにより処理が簡単になるという利点がある。
【0207】
また、マーカ間のパターンドット14を利用する場合、一般に広く用いられているツリー探索の手法を採用して、データ読み取り基準点を推定することができる。つまり、図29の(C)に示すように、マーカ対の概中心間を結んだ線上でパターンドット14を読み取るだけでなく、その概中心の8近傍それぞれを結んだ線上でパターンドット14を読み取る。つまりそれぞれの点について9回、読み取りを行う。こうした場合、ずれた位置ではパターンドット14のドット全てを読み取ることができず、正しい位置では全て読み取れることになるので、同図の(D)に示すように、パターンドット14を全て読み取れた回数の最も多かった点(図中○で示す)をデータ読み取り基準点とする。または、上述したように求めた基準点の近傍のさらにせまい範囲で8点を用いて同様に読み取りを行って求めた、より精度の高い読み取り基準点を用いても良い。
【0208】
このように、ツリー探索の手法を採用すると、複雑な計算を必要とせずに、データ読み取り基準点を決定することができる。
【0209】
さらにこの場合、総当たり的なツリー探索を行う代わりに、マーカ対の概中心間で一度パターンドット14を読み取り、その結果に従って限定的にツリー探索を行うことも可能である。
【0210】
例えば、図30の(A)に示すように、ドット1,10をマーカの概中心としたとき、ドット2,3,4,5が読み取れ、ドット6,7,8,9が読み取れなかった場合には、つまり、左寄りのドットだけが正しく読み取れている場合には、左側の概中心(ドット1)はほぼ正しい位置であり、右側の概中心(ドット10)がずれていると判断することができる。従って、左側の概中心はそのまま、右側の概中心だけを8近傍に振ってツリー探索を行えば良い。
【0211】
また、パターンドット14を、図30の(B)に示すように、右にずらしたドット2,6と、通常の位置のドット3,5,7と、左にずらしたドット4,8で構成し、これを読み取ったときに、左にずらしたドット4,8のみが読み取れなかった場合には、概中心の位置が右に寄っていたことが判る。つまり、左にずれたドット4,8が読み取りエラーが起きたということは、全体的に右に寄っていたということであるので、このような場合には、ドット1,9の概中心をずらしたツリー探索を続けるときに、それらの左側にずらした点を重点的に探索すれば良い。
【0212】
同様に、図7の(B)に示したような、上下方向にもずらしたドットをドットパターン14に入れておくことで、上下方向のずれも検出できるので、それに応じてツリー探索を限定的に行うことが可能になる。
【0213】
そして、パターンドット14の全ドットがほぼ一様に検出された時に、ほぼ確実なデータ読み取り基準点が検出されたことになる。
【0214】
このように、マーカ対の概中心とフォーマットで決定されるドット読み取り点でパターンドットを読み取り、読み取りエラーの発生したドットの位置及びその偏りによって概中心位置のずれ量及び方向を推定し、マーカ対の概中心を、その推定結果に基づいて近傍で移動させて、ツリー探索を行うことにより、総当たり的なツリー探索に比べて、探索回数を少なくできる。
【0215】
なお、パターンドット14は、必ずしもマーカ対間に直線状に並んでいる必要はなく、マーカ対とどういう位置関係にあるかがフォーマットとして決定されていれば良いものである。
【0216】
例えば、図30の(C)に示すように、図示しないマーカ間あるいはマーカの回りに、パターンドット14が円状に並んでいて、その中心をデータ読み取り基準点にするという場合、半径rでパターンドット14が並ぶフォーマットであれば、マーカ概中心よりそれぞれのドットを検出して、それぞれの中心(図中×で示す)を求める。そして、半径rの円の中心(x,y)を、この8個のドット中心と円との距離の2乗和が最小になるように、xとyを求めて、それをデータ読み取り基準点とする。これはつまり、イメージ的には、半径rの円を移動して、その求めたドットの中心がうまくこの円に嵌まるところを探し、見付かったならば、その円の中心(x,y)をデータ読み取り基準点とするということを意味している。さらに簡単には、これらドットの中心の重心を円の中心、即ちデータ読み取り基準点とするようにしても良い。
【0217】
このように、マーカ対のマーカ概中心とフォーマットで決定されるドット読み取り点でパターンドットを検出し、その検出されたパターンドットの中心を算出して、この算出されたドット中心とフォーマットの関係で定められる所定の誤差関数を最小化するように読み取り基準点を推定するようにしているので、複数のパターンドットの中心を利用してデータ読み取り基準点が推定され、精度が非常に高くなる。
【0218】
以上のように、マーカ中心検出部56では、図18に示すように、パターンドット検出部126にて、マーカ組選択部94で選択されたマーカ組の各マーカ間に配置されているパターンドット14を各マーカの概中心とフォーマットで決定されるドット読み取り点で検出し、ドット中心算出部128によって各検出されたドットの中心を算出する。そして、誤差最小化部130によって、この算出されたドット中心とフォーマットの関係で定められる所定の誤差関数を最小化するように、データコード10の各データドットの読み取り基準点を推定し、データ読み取り部42に出力する。
【0219】
次に、上記パターンドット検出部126について詳細に説明する。
【0220】
ドット検出部126は、マーカ対の概中心とフォーマットで決定されるドット読み取り点で黒ドットを検出する黒ドット検出部132を有している。この黒ドット検出部132は、図31の(A)に示すように、黒ドットが検出されるはずのドット読み取り点134で黒ドットが検出されなかった場合には、その近傍の4画素について、図中に1〜4で示す順番に黒画素を探索して、黒画素が有ればそれをドットとするように探索する。つまり、パターンドット14を形成する各ドットは、マーカ概中心から所定の位置関係を満たすドット読み取り点の画素値として検出される。そこで、黒ドットが検出されるべきドット読み取り点において黒ドットが検出されない場合、ドット読み取り点がずれていたものとみなして、上下左右1画素ずつずらしながらドットを探索する。
【0221】
このように、マーカ概中心がノイズ等によってずれて算出されていたり、歪みや傾きによって概中心間を所定の比で分割したドット読み取り点134がずれて算出されていたとしても、その近傍で黒ドットを探索することにより、確実にパターンドット14を検出できるため、検出ドットの減少による精度の低下がない。
【0222】
また、このようにしてドット読み取り点134の近傍画素でドットが検出された場合には、そのずらし量を記憶しておき、それを次のドット読み取り点134からオフセットとして加えることが好ましい。
【0223】
即ち、例えば図31の(B)において、同図中左側の黒丸で示すドットを計算により求めたドット読み取り点134とした場合に、そこには黒画素がないので、探索をする。そして、左側に1画素ずれたところでドットが検出された場合には、左側に1画素ずれた位置をオフセットとして記憶する。そして、次のドット読み取り点134が、当初の計算では図中白丸で示す点であったとしても、その点から左に1画素ずれた点をドット読み取り点134として読み取りを行う。
【0224】
つまり、あるドットがずれて検出された時は、その近傍のドットもずれて検出される可能性が非常に高いので、計算上のドット読み取り点134をまた同じように探索するよりも、最初からオフセットを加えた点を読み取りにいく方が、処理が少なくて済む。
【0225】
このように、パターンドット14のあるドットがずれた位置で検出された場合、その近くのドットも同じようにずれている場合が多く、そこで、計算上求められたドット読み取り点134からずれた位置でドットが検出された場合、そのずれをオフセットとして次のドット読み取り点134を予めシフトしておくことにより、探索効率を高めることができる。また、歪みによってドット検出点がずれていた場合、歪み量に応じてドット読み取り点134をシフトしていかないと、ずれが累積して、やがてドットの検出が不可能となるが、読み取り点をシフトしていくことにより、これを防ぐこともできる。
【0226】
また、図18に示すように、マーカ中心検出部56は、さらに、誤差最小化部130で求めたデータ読み取り基準点に基づいてマーカ概中心を算出し直すマーカ概中心再算出部136を有しても良い。
【0227】
即ち、パターンドット14を形成する各ドットは、マーカ概中心から所定の位置関係を満たすドット読み取り点134の画素値として検出される。そこで、ドットが数個しか検出されない場合、マーカ概中心がずれていたものとみなして、読み取ることができたドットのみを利用してマーカ概中心位置を再計算する。こうして求められたマーカ概中心から、再度所定の位置関係を満たすドット読み取り点134の画素値を読み取ることによりドットを検出する。
【0228】
例えば、図31の(C)の上側に×印で示すようにマーカ概中心が検出されて、パターンドット14の1回目の読み取りを行う。その時に、右側のマーカ概中心位置がずれて検出されていた場合には、左側のマーカ概中心に近い方のドットは読み取ることはできるが、右側のマーカ概中心に近い方のドットは欠落してしまう。このように読み取れたドットの中心位置をドット中心算出部128により算出し、誤差最小化部130にてデータ読み取り基準点を推定すると、その推定されたデータ読み取り基準点は、検出されたドットが少なかったために、誤差が多いものとなっている。そこで、マーカ概中心再算出部136は、このデータ読み取り基準点を新しいマーカ概中心として、パターンドット検出部126に再度パターンドット14の検出を行わせる。これにより、同図の下側に示すように、パターンドット14の全てが検出されるようになり、高精度にデータ読み取り基準点を推定できるようになる。
【0229】
このように、1回目の読み取りで検出された数個のパターンドットから概中心を再算出することにより、概中心の精度が上がり、再検出されるドットの数を増やすことができる。
【0230】
また、黒ドット検出部132では黒ドットを検出するだけなので、汚れ等により本来白であった点をも黒ドットと検出してしまう場合もある。そこで、パターンドット14を信号+エラー検出符号により構成し、検出された黒ドットの信号からエラー検出処理を行い、本来黒ドットであった点のみドット中心算出を行うようにすることも可能である。
【0231】
即ち、図18に示すように、パターンドット検出部126では、黒ドット検出部132での検出結果をバッファ138に入力し、信号の並びとする。つまり、黒ドットを「1」として、例えば、1,0,0,1,1,0,0というように並べ直すと、これは信号であるのでエラー検出が可能になる。そこで、エラー検出部140にてエラー検出を行い、間違って検出された黒ドットがあれば、それは使わないように、つまりドット中心算出部128に供給しないように、選択部142により、黒ドット検出部132の出力をドット中心算出部128に選択的に供給させる。
【0232】
このように、ドットを検出した後、それら検出したドットの中からエラー検出により正しいドットのみを選択することにより、パターンドット14に情報を持たせた場合にもドットが正しく検出された位置がわかるため、ノイズによるデータ読み取り基準点精度の低下を防ぐことができる。
【0233】
次に、ドット中心算出部128について説明する。
【0234】
円形に印刷されたドットをCCDカメラで粗く撮像し、2値化した場合、得られるパターンはもはや円形ではないので、簡単にドット中心を算出することができない。
【0235】
理想的な2値化が行われた場合、図32の(A)に示すように画素の半分がドットにかかればその画素はオンとなるため、ある画素がオンとなるためのドット中心位置の存在範囲が規定できる。即ち、画素の半分がドットにかかるときのドット中心の軌跡を臨界線としたとき、その内側(注目画素側)にドット中心がある時は画素はオンに、外側にある時は画素はオフになる。そこで、あるパターンが生じたとき、パターン中のオンとなった画素とその周囲のオフとなった画素についてドット中心位置の存在範囲を求めれば、その重複領域としてドット中心位置を推定することができる。
【0236】
例えば、1つのドットを縦2画素、横3画素程度の大きさで撮像した時に、理想的な2値化が行われた場合、表れる画素パターンは、同図の(B)に丸数字の1〜7で示すような7種類しかなく、それぞれ図示するようにドット中心位置の存在する領域が推定できる。
【0237】
ドット中心算出部128は、このようなパターン形状とドット中心存在領域との関係をテーブルとして保持している。
【0238】
このように、形状が既知のドットを2値化したときのパターン形状からその中心位置の存在領域を求めることができ、そこで、この領域内の点を中心代表点とすることで、粗いサンプリングでも超解像的にドット中心を推定することができるようになる。
【0239】
一方、上記のように1ドットを2画素×3画素で撮像する場合にはパターンは7通りしかないが、3画素×3画素や4画素×3画素とより高い解像度で撮像する場合には、解像度が高くなるにつれて表れるパターンは指数的に増大していくことになり、上記のようにテーブルを保持するためには、非常に大容量のメモリが必要になってくる。
【0240】
そこで、ドット中心算出部128は、撮像されたドットの重心を算出してドット中心とするようにしても良い。このようにすれば、ドット形状と代表点の関係をテーブルにして保持する必要がないので、メモリが不要となる。また、1つのドットを何画素×何画素で撮像するということが決まっていなくとも良いので、光学系の倍率が変動したり、ドットの径が変動したりしても対応できるというスケーラビリティを有するという効果もある。
【0241】
また、この重心算出を行う場合、図33の(A)に示すように、ドット読み取り点134に関して所定の大きさ、例えば4×4のマスク144をかけて、その中に入っている画素だけを用いて重心146の算出を行うようにしても良い。
【0242】
ここで、図33の(A)の例を用いて重心の計算を説明する。
【0243】
まず、同図ではマスク内に11個の黒画素が存在しており、これを行方向に見た場合、ドット読み取り点134の行より1行上に位置する行に黒画素が1画素あるので、この行の行重み係数「−1」を「1(画素)」にかけて一時記憶しておく。同様に、ドット読み取り点134の行より1行下に位置する行には黒画素が4画素あるので、行重み係数「1」と「4」をかけて、前述の一時記憶結果に加算する。さらに、2行下の行も同様に、3画素の黒画素に対して行重み係数「2」をかけて、結果の「6」を一時記憶結果に加算する。こうして得られた加算結果を黒画素数で除算して、「9/11」が得られ、これが重心146の読み取り点134からのy方向のずれに相当している。
【0244】
x方向に対しても同じように計算し、「(−1×3+1×3+2×1)/11=2/11」が、重心146の読み取り点134からのx方向のずれに相当する値である。
【0245】
このように、適当なサイズのマスク144によって中心算出に寄与する領域を制限すると、ノイズ(シミ)による誤差が読み取り基準点の推定に与える影響を小さくすることができる。
【0246】
なおこの場合、ノイズの影響を少なくするために、マスク144の大きさはドットの大きさに近ければ近いほど好ましいものであるが、マスク144の大きさをドットの大きさと同じにしてしまうと、ドット読み取り点134が重心に近い位置で検出されなかった場合には、偏った位置にマスクがかかり、重心算出に寄与する画素も偏ることになって、算出される重心の誤差が非常に大きなものになってしまう。
【0247】
そこで、図33の(B)に示すように、まずドット読み取り点134を基準とする位置でマスク144をかけて、マスク内でドットの偏りを検出し、図33の(C)に示すようにこの偏りをなくす方向にマスク144を移動してから重心算出を行うようにすれば、マスク144のサイズをドットのサイズに合わせたとしても、正確な重心算出が可能になる。
【0248】
ここで、横(縦)方向のマスク144の移動量は、列(行)中に黒画素が一つでも存在すれば「○」、存在しなければ「×」として、図33の(D)に示すようなテーブルを参照して算出する。
【0249】
以下に、図33の(B)、(C)、及び(D)を用いて具体的に説明する。
【0250】
図33の(B)は、読み取り点134が左下にずれていた場合の例で、マスク内に9個の黒画素が入っている。
【0251】
まず行方向で調べると、読み取り点134の行の1行上、1行下、及び2行下のそれぞれに3個、3個、及び0個の黒画素が検出される。この場合、2行下の行に黒画素が無いので、マスク位置を1行上へずらす。
【0252】
同様に、列方向で、読み取り点134の列の1列左、1列右、及び2列右のそれぞれに0個、3個、及び3個の黒画素が検出される。このときには、マスク144を1列右へずらすようにしている。
【0253】
これらの関係を表にまとめたのが図33の(D)である。
【0254】
このように、ドットの検出された位置を基準としてマスク144をかけてマスク内でドットの偏りを検出し、偏りをなくす方向にマスク144を移動してから中心を算出する、つまりマスク位置を2パスで決定することにより、マスクサイズをドットサイズに合わせて小さくすることができ、メモリが少なくて済むと共にノイズによる誤差がより小さくなる。
【0255】
また、上記のように形状が既知のドットを2値化したときのパターン形状からその中心位置の存在領域を求める場合、中心存在領域の広さはパターンによって大きく異なってくる。そこで、図32の(C)に示すように、中心代表点を中心存在領域の広さに応じて重み付けし、その確からしさをマーカ真中心検出に反映させるようにしても良い。
【0256】
例えば、図32の(B)に丸数字3で示すようなパターンの場合には、ドット中心存在領域は非常に小さな領域であり、よって非常に信頼性が高いが、同図に丸数字4で示すパターンの場合には、この領域が非常に大きいので信頼性は非常に低くなる。そこで、この中心存在領域の面積に対応して、それぞれ重みを付ける。例えば、丸数字4で示すパターンの場合の中心代表点の重みを「1」としたならば、1のパターンでは「2.5」、2のパターンでは「1.5」、3のパターンでは「5.0」、5のパターンでは「1.3」、6のパターンでは「1.3」、7のパターンでは「1.5」と重み付けをする。このように中心代表点を重み付けすることで、求められるデータ読み取り基準点の信頼性をこのドットの形状に対応した信頼性を持って計算することができるようになる。
【0257】
このように、検出されたドットのパターン形状によって異なるその中心代表点の信頼性を重みにしてデータ読み取り基準点を推定することにより、推定精度を高めることができる。
【0258】
また、誤差最小化部130は、図34の(A)に示すように、上記のようにしてマーカ概中心に基づいてドット中心検出部128により実際に算出されたドットの中心点(重心代表点位置150)と、推定されるデータ読み取り基準点(この場合、マーカ真中心152)と、フォーマットに基づいて定められるドットの推定中心点との誤差が最小になるように、データ読み取り基準点を決定するものであり、この場合に、最小自乗法を使うことで、非常に高精度にデータ読み取り基準点を算出することができる。
【0259】
ここで、この最小自乗法を使ったデータ読み取り基準点(この場合、マーカ真中心)の算出法につき簡単に説明する。
【0260】
今、図34の(B)に示すように、M1 ’を左側推定マーカ真中心、M2 ’を右側推定マーカ真中心、Di をパターンドット14のi番目のドット中心、di をパターンドット14のi番目のドットのマーカ間分割比とする。
【0261】
推定マーカ真中心M1 ’,M2 ’から求めたドット中心Di ’は、
【数2】
Figure 0003568508
【0262】
ドットパターン中心Di との推定誤差εi を用いて、誤差の2乗和Eは、
【数3】
Figure 0003568508
と表される。
【0263】
そこで、このEを最小化するM1 ’,M2 ’を求める。
【0264】
【数4】
Figure 0003568508
【0265】
ここで、
【数5】
Figure 0003568508
とおくと、
(1)より
Ax1 ’+Bx2 ’=P …(3)
(2)より
Bx1 ’+Cx2 ’=Q …(4)
(3)×C−(4)×Bより
【数6】
Figure 0003568508
(4)×A−(3)×Bより
【数7】
Figure 0003568508
【0266】
同様にして
【数8】
Figure 0003568508
とおくと、
【0267】
【数9】
Figure 0003568508
となり、推定マーカ真中心M1 ’及びM2 ’の位置座標(x1 ’,y1 ’)及び(x2 ’,y2 ’)が算出される。
【0268】
このように、算出された各パターンドットの中心位置の不確定性が、ずれ量の自乗の総和を最小自乗法によって最小化することにより相殺され、データ読み取り基準点の推定精度を高めることができる。
【0269】
さらに、数式を簡単にする方法として、以下に述べる方法もある。
【0270】
今、図35の(A)に示すように、記録媒体上の座標系において、Ddi(ui )を設計上のドット位置、Uを第一単位ベクトル、Oを原点位置とし、また、同図の(B)に示すように、撮像面上の座標系において、Doi(xi ,yi )を観測上のドット位置、U’(ux ’,uy ’)を第一推定単位ベクトル、O’(ox ’,oy ’)を推定原点位置、Doi’(xi ,yi )を推定ドット位置とする。
【0271】
ここで、設計上のドット位置と、推定される基準点位置、及び単位ベクトルによって求められる推定ドット位置Doi’は、次式によって与えられる。
【0272】
【数10】
Figure 0003568508
【0273】
また、観測上のドット位置Doiとの推定誤差εi を用いて、誤差の2乗和Eは、
【数11】
Figure 0003568508
と表される。
【0274】
そこで、このEを最小化するU’,O’を求める。
【0275】
【数12】
Figure 0003568508
【0276】
ここで、U’,O’を独立に求めるため、
【数13】
Figure 0003568508
とすると、(5)式及び(6)式は、次式のようになる。
【0277】
【数14】
Figure 0003568508
【0278】
同様にして、
【数15】
Figure 0003568508
【0279】
このように計算を少なくして、U’及びO’を求めることができる。
【0280】
ここで、マーカ対と10個のパターンドットが図36のような関係で並んでいた場合の例を説明する。
【0281】
まず、各パターンドットのドット読み取り点Ui は、左側のマーカ概中心から各々7,10,13,16,19,24,27,30,33,36であり、N=10であるから、
【数16】
Figure 0003568508
は、21.5となる。
【0282】
ところが、ドットの欠けや汚れ等の原因によって、パターンドット検出部126において、左から2番目(Ui =10)のドットが検出されなかったとすると、Nは9となり、Ui も7,13,16,19,24,27,30,33,36となる。従って、この場合、N=9であるから、上記(11)式の解は22.78となる。
【0283】
つまり、パターンドット検出部126において検出されるドットが10個全て検出された場合は、上記(7)式及び(9)式の分母に見られる
【数17】
Figure 0003568508
の計算は、値が902.5で固定となるが、いくつかのドットが検出されなかった場合には、その都度計算が必要である。
【0284】
一方、本ドットコードは、紙等の媒体に印刷されることが多く、印刷条件や、印刷後の扱われ方によってドットが欠けたりすることも考えられ、実際に10個全てのドットが検出されない可能性もある。
【0285】
従って、装置の中に、上記(12)式を計算させる手段が必要となっているのだが、この計算は、2乗の値を加算する処理であることから、各項の値が大きく、演算精度を考慮すると、レジスタのビット数をかなり大きくとらなければならず、実際に装置を構成する場合のハードウェアの規模も大きくなってしまう。
【0286】
そこで、ドット検出で検出されなかったドットがあった場合、ドット読み取り点をそのドットのドット中心とする。そして、全てのドットが検出されたとして処理を行うようにする。
【0287】
こうすることにより、常に、N=10となり、また上記(12)式の解も902.5となるので、上記(7)式乃至(10)式の分母は全て固定値とすることができる。
【0288】
つまり、(12)式の計算をさせる手段が不要となるだけでなく、(7)〜(10)式の除算は定数による除算で、逆数の乗算に置き換えることが可能となり、一層ハードウェア化に適したものとなる。
【0289】
以下、これを図37のフローチャートを参照して説明する。
【0290】
まず、マーカ対の概中心から10個のパターンドットの読み取り点をそれぞれ算出する(ステップST1)。但し、ここでは黒ドットだけでなく、その間にある白画素も読み取り点として加えている。そして、ドット検出カウンタnと検出エラーカウンタerrを「0」にリセットする(ステップST2)。
【0291】
次に、30個の各読み取り点を順次処理していくが、その点が黒ドット上の点であるかどうかを判断し(ステップST3)、そうでなかった場合、その画素が白か黒かを判断する(ステップST4)。もし黒であれば、ドットでない点を黒として読み取っているので、正しくないとして、検出エラーカウンタerrをカウントアップし(ステップST5)、また画素が白であればカウントアップしない。そして、読み取った画素数をインクリメントつまりドット検出カウンタnをカウントアップし(ステップST6)、全ての画素の読み取りが終わったかどうかを、このドット検出カウンタnが「30」となっているかどうかによって判断する(ステップST7)。処理画素数が30未満の時は、上記ステップST3へ戻って、次の読み取り点を処理する。
【0292】
一方、上記ステップST3において、黒ドット上の画素を読んだと判断された時には、読み取った画素が黒であるかどうか判断することにより、ドットが正しく読み取れたかどうか判断する(ステップST8)。ここで正しくドットが読み取れた時は、そのまま連結画素の重心算出を行う(ステップST9)。
【0293】
上記ステップST8でドットが正しく読み取れなかったと判断された場合には、読み取り点の4近傍画素で黒画素を探索し(ステップST10)、見つかった場合には(ステップST11)、上記ステップST9へ進んで、連結画素の算出を行う。また、見つからなかった場合には、ドット読み取り点をドット中心とし(ステップST12)、検出エラーカウンタerrをカウントアップする(ステップST13)。そして、上記ステップST6へ進んで、読み取った画素数を計数するドット検出カウンタnをカウントアップトした後、ステップST7で、全ての画素の読み取りが終わったかどうかを、ドット検出カウンタnが「30」となっているかどうかによって判断する。処理画素数が30未満の時は、上記ステップST3へ戻って、次の読み取り点を処理する。
【0294】
こうして、全ての画素の読み取りを終了したならば、ドットでない画素が黒であった場合の数と、ドット位置とその4近傍に黒画素が存在しなかった数との合計値、つまり検出エラーカウンタerrの値を閾値(MAX_ERR)と比較する(ステップST14)。ちなみに、閾値MAX_ERRは、25ぐらいが適当であることが判っている。
【0295】
そして、検出カウンタerrの値が閾値以下であれば、10個のドット中心を用いて最小自乗誤差法でデータ読み取り基準点の算出を行い(ステップST15)、また、閾値を越えたときは、そのパターンコードでは所望の精度でデータ読み取り基準点を検出できないと判断して、次のマーカ対の処理へ移る。
【0296】
以上のようにして、データ読み取り基準点が算出されたならば、データ読み取り部42は、図10に示すように、このデータ読み取り基準点に基づいて、まずアドレスドット読み込み部154でアドレスドット18を読み取ってブロックアドレスを求め、データ読み込み部156によってそのブロック20のデータドットを読み込む。そして、読み込んだデータを再生部44に供給して再生出力する。
【0297】
ここで、アドレスドット読み込み部154は、アドレスドット読み取り部158、エラー訂正部160、判定部162、及びアドレス決定部164から構成されている。
【0298】
アドレス読み取り部158は、上下隣接マーカの真中心間を分割してアドレスドット18を検出し、アドレスを読み取るものであり、この読み取ったアドレスが既に読み込んだブロックのアドレスであった場合には、処理を中止して、次フレームへ処理を移行する。なお、このアドレスドットの読み取りにおいても、前述したパターンドット14の読み取りと同様に、ツリー探索の手法を応用できる。
【0299】
また、エラー訂正部160は、アドレスドット18にCRC(エラー検出)符号やBCH(エラー訂正)符号等が付されている場合に、アドレスドット読み取り部158で正しいアドレスが読み取れたかどうかの判定や読み取られたアドレスの訂正を行う。
【0300】
判定部162は、アドレスがシステムで取り扱うデータのアドレスの範囲内であるかどうか判定する。例えば、アドレス0〜100までのデータしか扱わないシステムで、−5や200などのアドレスを排除する。あるいは、1つのフレームに10個のブロックしか入らないこと及びアドレスが順番に記録されていることが判っていれば、例えばアドレスとして2,3,5,6,25,9が得られたとき、連続性等からアドレス25が範囲外であることが判り、このアドレス25のブロックのデータを除外する。
【0301】
アドレス決定部164は、判定部162により正しいアドレスと判定されたアドレスを、データ読み込み部156に与える。
【0302】
なお、上記エラー訂正部160では、アドレスドット読み取り部158で読み取ったアドレスドット18にエラーが検出された場合、周囲のブロックのアドレスからそのブロックのアドレスを算出して訂正することができるが、この機能を利用して、上記アドレスドット読み取り部158で適宜アドレスを省略して読み取り、少なくとも2つ以上のブロックのアドレスを同時に決定するようにしても良い。即ち、ブロックがアドレス順に整列して記録されている場合、あるブロックのアドレスは周囲のブロックのアドレスから容易に推定することができるので、アドレスドット18を適宜省略して読み取っても問題はなく、その分、アドレスドットの読み取り処理を軽減することができる。さらには、図9の(C)に示すように、アドレスドット18を間引いて記録することができる。
【0303】
ところで、コードを形成する各ブロック20の左側アドレスドット18には、図38の(A)に示すように、そのブロックのアドレスが記録されている。そして、前述したようなダブルハイトで記録されたコードの一番右側のアドレスコードには、次のブロックのアドレスが記録されている。そこで、最終ブロック166の右側のアドレスドット18には、そのブロックのアドレスを記録しておくことにより、読み取り時にブロック20の左右のアドレスの内容を比較することによって最終ブロック166を検出することができる。
【0304】
あるいは、図38の(B)に示すように、読み取りブロック対のアドレス間に最終ブロックアドレスを示す相対関係を設け、読み取り時にブロック対のアドレスの内容を比較することにより最終ブロックを検出することもできる。
【0305】
例えば、68個のブロックをダブルハイトで記録する場合、アドレス1〜34を一列に並べ、アドレス35〜68を一列に並べて、これらを2重につまりダブルハイトで記録すると、最初に取り込まれるフレーム画像からアドレス1と35のブロックが隣り合って検出されるので、一列は35−1つまり34個のブロックからなり、二列分ということで、その倍の68個のブロックが存在することがすぐに判る。よって、メモリを確保すべき量や、どのブロックまで処理したら処理を終了して良いのかが最初に判るので、無駄な処理がなくなるという効果を奏することができる。
【0306】
勿論、これらはダブルハイトで記録されていない場合であっても、同様である。
【0307】
このように、アドレスドット18のフォーマットとして、隣接するブロックのアドレスがコード全体のブロック数と所定の関係を有するようなコードとし、隣接するアドレスから総ブロック数が求められることにより、必要なメモリを割り付けることができる。また、最終ブロックを検出することができるようになるため、無駄な処理を省くことができる。
【0308】
あるいは、アドレスドット18を、例えば1/68のように、ブロックの総数が判るようなフォーマットで記録しても良い。
【0309】
一方、データ読み込み部156は、4つのデータ読み取り基準点を結んで囲まれた領域の各辺を等分割してメッシュを切り、データ読み取り点としてデータコードを読み取っていくものであるが、この場合、図38の(C)に示すように、データ読み取り点168の画素がノイズ等によって実際のデータと異なって読み取られることがある。
【0310】
そこで、このデータ読み取り点168のデータをそのまま読み取りデータとするのではなく、そのデータ読み取り点168に対して回りの8近傍の画素を使い、全部で9画素について所定の計算式、例えば平均を求めて、この画素のデータを決定する。例えば、データ読み取り点168の画素が白抜けであっても、回りの8画素が黒になっていれば、このデータ読み取り点168のデータは8/9となり、これは0.5より大きいので、黒画素つまり「1」として読み取れる。
【0311】
また、所定の計算式としては、重み付け平均等であっても良い。例えば、もう少し大きい領域、近傍24画素を取って、内側の8画素のデータには×2倍して、外側の16画素のデータには×1倍にして、平均をとるというようにしても良い。
【0312】
このように、データ読み取り基準点から算出された読み取り点の近傍も同時に読み取り、所定の計算式によりデータ読み取り点の属性を決定することにより、劣化ドットの読み取りに強くなる。
【0313】
以上実施の形態に基づいて本発明を説明したが、本発明は上述した実施の形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形や応用が可能である。
【0314】
【発明の効果】
以上詳述したように、本発明によれば、撮像された画像における複数個のブロックの中から光学的ディストーションの影響が小さいブロックを選択して読み取るようにしているので、読み取りエラーが発生する確率を低くすることができる。従って、高密度記録されたコードパターンを読み取って、正しく情報を再生できる情報再生システムを提供することができる。
【図面の簡単な説明】
【図1】(A)乃至(C)はそれぞれ情報記録媒体上に光学的に読み取り可能に記録される2次元コード(ドットコード)の例を示す図である。
【図2】(A)乃至(E)はそれぞれ図1の(C)に示したようにブロック化した場合のマーカの配置例を示す図である。
【図3】(A)及び(B)はそれぞれマーカを縞状に省略した場合のコード例を示す図である。
【図4】マーカを市松状に省略した場合のコード例を示す図である。
【図5】(A)乃至(C)はそれぞれパターンドットの例を示す図である。
【図6】(A)はパターンドットの変調を説明するための図であり、(B)はパターンドットの別の例を示す図である。
【図7】(A)及び(B)はそれぞれ一部のパターンドットの記録点に位相ずれを設けた例を示す図である。
【図8】(A)及び(B)はアドレスドットの一例を示す図であり、(C)及び(D)はそれぞれ別の記録例を示す図である。
【図9】(A)乃至(C)はそれぞれアドレスドットのさらに別の記録例を示す図である。
【図10】実施の形態の情報再生システムのブロック構成図である。
【図11】(A)乃至(D)はイロージョン処理を説明するための図である。
【図12】イロージョン処理とラベリング処理を説明するための図である。
【図13】(A)乃至(C)はマーカ中心部の抽出方法を説明するための図である。
【図14】(A)はストリーク処理を説明するための図であり、(B)はマーカ抽出処理の別の手法を説明するための図である。
【図15】(A)はマーカ抽出処理におけるフレームの処理を中止する場合を説明するための図であり、(B)及び(C)はそれぞれマーカ概中心の算出法を説明するため図である。
【図16】(A)及び(B)はマーカがフレーム端にかかって欠損した場合の概中心の補正法を説明するための図であり、(C)はそのような補正の別の例において用いられるテーブルを示す図である。
【図17】(A)はフレーム中の概中心位置補正処理を行うマーカを説明するための図、(B)はマーカとパターンドットの関係を示す図であり、(C)及び(D)は対マーカ存在領域を説明するための図である。
【図18】図10中のマーカ中心検出部のブロック構成図である。
【図19】(A)乃至(C)はそれぞれ外挿による対マーカ位置の算出を説明するための図である。
【図20】(A)はベースマーカ対を説明するための図であり、(B)及び(C)はダブルハイトを説明するための図である。
【図21】(A)及び(B)はベースマーカ対の選択時の基準マーカの選択法を説明するための図であり、(C)は基準マーカの片側にのみマーカ候補が見つかった場合の隣接マーカの探索法を説明するための図である。
【図22】(A)は仮想マーカの概中心を説明するための図であり、(B)及び(C)はそれぞれ2つ以上のベースマーカ対が選択できる場合のベースマーカ対の再選択法を説明するための図である。
【図23】(A)及び(B)はそれぞれコードがスキューしているときのベースマーカ対の再選択法を説明するための図である。
【図24】(A)及び(B)はブロックが整列されていない場合の選択されたマーカ組及びそれらの記憶法を説明するための図であり、(C)及び(D)はブロックが整列されている場合の選択されたマーカ組及びそれらの記憶法を説明するための図である。
【図25】(A)及び(B)はそれぞれ処理対象ブロックを選択するためのマーカ組の選択法を説明するための図である。
【図26】(A)はスキャン方向側のマーカ候補から基準マーカを選択した場合のブロックの読取法を説明するための図であり、(B)は光学的ディストーション等があった場合のブロックの読み取り順を説明するための図である。
【図27】(A)は選択されたブロックの読み取りに失敗した場合のブロック再選択処理を説明するための図、(B)はマーカ16とパターンドット14の位置関係を示す図であり、(C)はドット読み取り位置とドットの中心位置との関係を示す図である。
【図28】(A)及び(B)はマーカ概中心からパターンドットを利用したデータ読み取り基準点の推定法を説明するための図であり、(C)は別の推定法を説明するための図である。
【図29】(A)及び(B)はそれぞれさらに別のデータ読み取り基準点推定法を説明するための図であり、(C)及び(D)はツリー探索法を説明するための図である。
【図30】(A)及び(B)はそれぞれ限定的なツリー探索を説明するための図であり、(C)はパターンドットの別の配列を説明するための図である。
【図31】(A)は黒ドット検出部の動作を説明するための図、(B)は黒ドット検出部の別の動作を説明するための図であり、(C)はマーカ概中心再算出部の動作を説明するための図である。
【図32】(A)及び(B)はドット中心算出部でのドット中心位置存在領域の推定動作を説明するための図であり、(C)はドット中心位置存在領域と中心代表点の信頼性を説明するための図である。
【図33】(A)はドット中心算出部でのさらに別の中心算出法としての重心算出を説明するための図であり、(B)乃至(D)は重心算出の別の手法を説明するための図である。
【図34】(A)及び(B)は最小自乗法を使ったデータ読み取り基準点の算出法を説明するための図である。
【図35】(A)は記録媒体上の座標系を示す図であり、(B)は撮像面上の座標系を示す図である。
【図36】マーカ対と10個のパターンドットの関係を示す図である。
【図37】ドット検出で検出されなかったドットがあった場合、ドット読み取り点をそのドットのドット中心とし、全てのドットが検出されたとして処理を行う場合の、動作フローチャートである。
【図38】(A)及び(B)はそれぞれブロックの並べ順並びにその際のブロックアドレスの記録内容の例を示す図であり、(C)はデータドットの読み取り動作を説明するための図である。
【符号の説明】
10…データコード、 12…パターンコード、 14…パターンドット、 16…マーカ、 18…アドレスドット、 20…ブロック、 22…点、 24…ドット位置基準点、 26…ガイドコード、 28…反転コード、 30…訂正コード、 32…固定パターン、 34…情報記録媒体、 36…ドットコード、 38…画像入力部、 40…データ読み取り基準点決定部、 42…データ読み取り部、 44…データ再生部、 46…撮像部、 48…等化,2値化部、 50…マーカ抽出部、 52…マーカ概中心算出部、 54…マーカ検出部、 56…マーカ中心検出部、 58…マーカ存在エリア、 60…フレーム、 62…マーカ中心部、 64…マーカの存在する可能性のある領域、 66…重心、 68…外接矩形、 70…外接矩形中心点、 72…フレーム端、74…欠損によりずれて検出されたマーカ概中心、 76…正しいマーカ概中心、 78…概中心補正領域、 80…フレーム端で一部が欠落したマーカ、 82…処理対象ブロック、 84…マーカ対、 86…基準マーカ選択部、 88…対マーカ存在領域算出部、 90…対マーカ候補検出部、 92…ベースマーカ対選択部、 94…マーカ組選択部、 96…基準マーカ、 98…対マーカ存在領域、 100…対マーカ、 102…誤マーカ、 104…外挿ベクトル(exv)、 106…マーカ探索領域、 108…修正拡張ベクトル、 110…ベースマーカ対、 112…撮像部視野、 114…領域、 116…読み取り失敗ブロック、 118…再選択ブロック、 120…コードライン、 122…読取ライン、 124…ドット読取位置、 126…ドット中心位置、128…ドット中心算出部、 130…誤差最小化部、 132…黒ドット検出部、 134…ドット読み取り点、 136…マーカ概中心再算出部、 138…バッファ、 140…エラー検出部、 142…選択部、 144…マスク、 146…マスク内黒画素重心、 150…重心代表点位置、 152…推定されるマーカ真中心、 154…アドレスドット読み込み部、 156…データ読み込み部、 158…アドレスドット読み取り部、 160…エラー訂正部、162…判定部、 164…アドレス決定部、 166…最終ブロック、 168…データ読み取り点。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention is capable of optically reading so-called multimedia information including audio information such as voice and music, video information obtained from cameras and video equipment, and digital code data obtained from personal computers and word processors. The present invention relates to an information reproducing system that optically reads the code pattern from an information recording medium such as paper recorded as a simple two-dimensional code pattern and reproduces the original multimedia information.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, various media such as a magnetic tape and an optical disk have been known as media for recording voice, music, and the like. However, even if these media are made in large quantities, the unit price is somewhat expensive, and a large space is required for storage. Furthermore, if it is necessary to hand over the recorded media to another person at a remote location, it takes time and effort to mail it or take it directly. There was also. In addition, the same applies to so-called multimedia information including video information obtained from a camera, a video device, and the like, and digital code data obtained from a personal computer, a word processor, and the like, in addition to audio information.
[0003]
To cope with such a problem, Japanese Patent Application Laid-Open No. 6-231466 discloses that multimedia information including at least one of audio information, video information, and digital code data can be transmitted by facsimile, and a large amount of multimedia information can be transmitted. A system for recording on an information recording medium such as paper in the form of a two-dimensional code in which a plurality of dots as image information that can be copied at low cost, that is, a plurality of dots as encoded information, and a system for reproducing the same are provided. It has been disclosed.
[0004]
In the information reproducing system of this publication, an information reproducing apparatus that optically reads and reproduces a two-dimensional code on an information recording medium is held by hand, and the information reproducing apparatus is manually moved on the recording medium along the recorded two-dimensional code. A method of reading by scanning is disclosed.
[0005]
[Problems to be solved by the invention]
By the way, the structure which can further improve the recording density of the two-dimensional code pattern itself has been studied, and it is expected that higher density recording will be achieved.
[0006]
However, the above-mentioned publication does not yet give sufficient consideration for reading such future high-density recorded code patterns.
[0007]
SUMMARY OF THE INVENTION It is an object of the present invention to provide an information reproducing system capable of reading a code pattern recorded at high density and reproducing information correctly.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, an information reproducing system according to the present invention provides an information recording system in which a code including a plurality of blocks including a data code corresponding to data of information to be reproduced is optically readable. An information reproduction system for reproducing the information by optically reading the code from a medium,
Image input means for capturing the code,
Data reading means for reading the data from the image captured by the image input means,
Reproducing means for reproducing the information from the data read by the data reading means;
With
The data reading means is configured to select and read a block having a small influence of optical distortion from a plurality of blocks in the image captured by the image input means.
[0009]
That is, an image obtained by capturing a code becomes distorted due to optical distortion. The effect of this distortion increases as the code density increases, and the possibility of a data code reading error increases. Therefore, according to the information reproducing system of the present invention, a block having a small influence of optical distortion is selected and read from a plurality of blocks in a captured image. Therefore, the probability of occurrence of a reading error can be reduced.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0011]
FIGS. 1A to 1C are diagrams showing examples of two-dimensional codes (dot codes) recorded optically readable on an information recording medium.
[0012]
That is, as shown in FIG. 1A, the dot code includes a data code 10 and a pattern code 12. The data code 10 indicates contents corresponding to actual multimedia information. The pattern code 12 is for determining a reference point for reading the data code 10 and includes pattern dots 14 and markers 16. Here, the pattern dot 14 is an individual dot of one or a plurality of dot groups other than the marker constituting the pattern code 12.
[0013]
Here, the dots constituting the data code 10 (hereinafter, referred to as data dots) are recorded at a very high density (for example, near the resolution limit of an imaging device such as a CCD). In order to perform this, each data dot must be read accurately, that is, the reading position must be accurately detected. Therefore, in order to accurately know the relative positional relationship between the pixels of the CCD and the data dots thereof, they are arranged at predetermined positions with respect to the data code 10 and have a predetermined dot pattern (in FIG. In this case, a pattern dot 14 having 10101), which is slightly larger than the data dot, is used. However, since it is difficult to find this pattern dot 14 from nothing, a very large marker 16 arranged at a predetermined position with respect to this pattern dot 14 is provided. In this example, the marker 16 is circular, and its diameter has a size relationship of (marker 16)> (pattern dot 14)> (data dot).
[0014]
Of course, the pattern dots 14 may be recorded in the same size and shape as the data dots as shown in FIG. Also, the marker 16 may be recorded in a special shape, color, or size different from the pattern dots 14 and the data dots, for example, like the arrow shape shown in FIG.
[0015]
Further, as shown in FIG. 1C, a data code 10 is arranged in a rectangular area, a pattern code 12 is arranged above and below the data code 10, and address dots 18 are arranged on both sides to form a block. Such blocks may be arranged in a matrix to form a two-dimensional code. Here, the pattern dots 14 are, for example, 30 dots of “100100100100100001001001001001” when a black dot is represented by 1 and a white dot is represented by 0. The address dots 18 are composed of, for example, 22 dots of “1 ************ ##############”. Note that "*" represents 1 or 0, and an address is represented by 10 of these, and "#" represents 1 or 0, and an error correction code of the address is represented by 10 of these. .
[0016]
As described above, in the information recording medium on which the dot code including the data code 10 corresponding to the content of the multimedia information to be reproduced and the pattern code 12 for determining the reading reference point is recorded, 12 is a pattern dot 14 arranged at a predetermined position with respect to the data code 10, and a marker 16 arranged at a predetermined position with respect to the pattern dot 14 and used for detecting the pattern dot 14. Therefore, even if the pattern dots 14 are the same as the data dots forming the data code 10, it can be detected based on the marker 16. The reading reference point can now be obtained.
[0017]
In the case where the block is formed as shown in FIG. 1C, the markers 16 do not have to be arranged at the four corners of the block. For example, as shown in FIGS. , Marker 16 can be arranged.
[0018]
That is, FIG. 2A shows the case where the markers 16 are arranged on each side of the rectangular block 20.
[0019]
FIG. 2B is an example in which, when the blocks 20 are arranged in a plurality of rows, the markers 16 are arranged only in the top row.
[0020]
FIG. 2C shows an example in which, when the blocks 20 are arranged in a plurality of rows, the markers 16 are recorded with some parts omitted.
[0021]
FIG. 2D shows a case where the marker 16 is recorded as a square. As described above, even when the shape of the marker 16 is not circular, various marker arrangements can be adopted as shown in FIGS.
[0022]
It is preferable that the marker 16 be circular for the following reasons. That is, if the shape of the marker 16 is circular, there is no deformation due to the rotation (skew) of the dot code and the imaging device (camera) such as a CCD, so that even if the skew occurs, the marker 16 can be easily extracted. Because it can be. However, when the skew is within a certain range, for example, when imaging is performed in a state where the relative relationship between the camera and the dot code is defined, the marker 16 may be a square or hexagon. The shape may be acceptable. Conversely, if such an anisotropic shape is used, if one marker 16 is detected, it is possible to determine the skew angle, that is, the direction in which the skew angle is, simply by looking at the shape. There is also the advantage of being able to do it.
[0023]
FIG. 2E shows an example in which the block 20 has a hexagonal shape and the markers 16 are arranged at three vertexes. Thus, the shape of the block is not limited to a rectangle.
[0024]
In this way, a plurality of blocks in which the data code 10 composed of a plurality of dots is arranged in a predetermined area are arranged two-dimensionally to form a dot code, and the marker 16 is used to determine the relative positional relationship between the blocks. As described above, since the markers 16 are arranged in a part of each block, the marker 16 facilitates the extraction of the block boundary.
[0025]
Further, since the approximate center of the marker 16 can be obtained by extrapolation from the marker pair as will be described later in detail, the marker 16 is not necessary at all four corners of the block. Therefore, FIG. As shown in C), some can be omitted. In this case, there is no point or nothing at all in the omitted position.
[0026]
FIGS. 3A and 3B are examples in which the point 22 is recorded at an omitted position. In this example, the markers 16 are arranged at vertices forming different opposite sides between blocks adjacent in the first direction and at vertices forming the same opposite side between blocks adjacent in the second direction. In short, the upper marker is recorded in the direction adjacent to the horizontal direction in the figure, while the lower marker is recorded when the image is adjacent in the downward direction, and the upper marker is recorded when the image is adjacent to the lower direction. Are recorded alternately, that is, the markers 16 are recorded (or omitted) in stripes.
[0027]
As described above, the marker 16 is arranged at the vertex forming the opposite side between the rectangular blocks adjacent in the first direction and at the vertex forming the same opposite side between the blocks adjacent in the second direction orthogonal to the first direction. In other words, by arranging the markers 16 in a stripe pattern, compared with the case where the markers 16 are arranged at the four corners of the block 20, only half of the markers 16 requiring a large area are required, and data dots are also provided at the omitted marker positions. Can be arranged, and the recording capacity can be increased accordingly.
[0028]
FIG. 4 shows an example in which the markers 16 are arranged in a checkered pattern (or omitted).
[0029]
By arranging the markers 16 at vertices at different diagonals between adjacent blocks (that is, in a checkerboard pattern), the area of the marker 16 is larger than when the markers are arranged at the four corners of a rectangular block. Need only half the number of markers, and data dots can be arranged at the omitted marker positions, thereby increasing the recording capacity. Also, since at least one set of markers 16 can always be detected on one line, there is also an effect that the markers 16 are more resistant to distortion than the case where the markers are arranged in a stripe pattern as described above.
[0030]
Next, the pattern dots 14 will be described.
[0031]
For example, as shown in FIG. 5A, if the black dots are represented by 1 and the white dots are represented by 0, the adjacent black dots can be separated from each other as "10101010100101010101". Need to be arranged as follows. That is, the black dots are arranged at a distance. Of course, the black dots and the white dots need not be recorded alternately, as long as there is a space between the black dots and the black dots. Similarly, a space is provided between the data dots and the pattern dots so that the black dots are spaced apart.
[0032]
This is because, for example, when two black dots constituting the pattern dot 14 are adjacent to each other, the two black dots are replaced with one black dot in the determination process of the reading reference point based on the pattern dot 14 described later in detail. Is detected as if it were a source of error. That is, in the process of determining the reading reference point, the pattern dot 14 obtains the center coordinates of each black dot and determines the reading reference point using the black dot center coordinates. It is necessary to find the center position of the dot. If two black dots are adjacent to each other, the center position of the correct dot cannot be found.
[0033]
In other words, by setting the pattern dots in such a manner that adjacent dots are separable from each other, each dot constituting the pattern dots by relatively simple calculation such as the center of gravity or the center of a circumscribed rectangle Is accurately determined. Further, even when information (address information, header information) is recorded on the pattern code, the black dots are not linked and cannot be separated.
[0034]
In addition, even if dot recording positions are arranged adjacent to each other by performing some kind of modulation so that an arrangement such as “1” and “1” does not appear, for example, the address information is stored in the pattern dots 14. Some data can be superimposed and recorded like header information.
[0035]
For example, 4-bit / 6-bit modulation as shown in FIG. In this case, the input signal 0 (that is, 0000) is not converted to 0 (that is, 000000), but is converted to 36 (that is, 100100). This is because, unless there is at least one black dot, it does not make sense as a pattern dot.
[0036]
In this way, by recording the dot code as a code modulated so that adjacent dots can be separated from each other, even if information (address information, header information) is recorded on the pattern code, black dots are connected. To prevent separation.
[0037]
In addition, the pattern dot 14 may be in a variety of other formats. However, the format of the pattern dot 14 must be a special code having a positional relationship or structure capable of estimating the position of the reading reference point. With such a special code, the reading reference point can be easily estimated using the special code.
[0038]
For example, as shown in FIG. 6B, a linear pattern dot 14, that is, a pattern line may be used. As a straight line detection algorithm, a method of obtaining a straight line by expressing a straight line by parameters of θ and ρ and performing counting on a θ-ρ plane (a straight line detection algorithm, for example, Hough transform), which is well known in image processing, is known. The intersection of the straight line extracted by using this method can be used as a reading reference point.
[0039]
Alternatively, as shown in FIG. 5B, the pattern dots 14 may be such that at least some of the recording dots of the pattern dots have a phase shift. By providing such a phase shift, the conditions for detecting the pattern dots 14 become strict, so that the accuracy of estimating the reading reference point can be improved.
[0040]
That is, originally, the recording positions of the pattern dots 14 and the dots of the data code 10 are substantially arranged on a lattice. However, in the case of the pattern dots 14, they are slightly shifted from the lattice points. This is called a phase shift.
[0041]
For example, in FIG. 7A, (1) shows a case of a uniform pitch arrangement, which can be detected by reading at any point within a dot. If reading is performed at the same pitch point, it cannot be detected unless there is a reading point in the hatched portion in FIG. Therefore, the range of the read reference points where all the dots can be detected is narrower than when no phase shift is provided, and the accuracy of estimating the read reference points can be improved.
[0042]
Further, by providing the phase shift in this way, it is possible to estimate the shift of the reading reference point position from the position of the undetected dot and its bias.
[0043]
For example, when a phase shift is provided, if a certain dot cannot be detected but another dot can be detected, the type of the phase shift of the undetectable dot is set in advance. Since it can be known from the format information, the direction in which the reading reference point position is shifted can be estimated based on the phase shift.
[0044]
As shown in FIG. 7B, the pattern code 12 has a pattern dot 14 for detecting a reference point for reading the data code 10 between the markers 16 and a size smaller than that of a normal dot of the pattern dot 14. It is also possible to provide a guide code 26 which is small and has a phase shift of up, down, left and right with respect to the dot position reference point 24 of the pattern dot 14.
[0045]
In the case of such a pattern code 12, after the pattern dot 14 is read, the center position is moved in the vicinity so that the guide code 26 can be read by connecting points shifted by one dot up and down from the center of the marker 16. By doing so, it is possible to improve the accuracy of estimating the reading reference point (in this case, the marker center position) from the strict reading conditions of the guide code 26 without making the reading conditions of the pattern dots 14 strict.
[0046]
Thus, by recording at least a part of the pattern dots with a small diameter, many pattern dots can be recorded in the same space, and the recording density of the pattern dots can be increased. In addition, as the conditions for detecting pattern dots become more stringent, the accuracy of estimating the reading reference point can be increased.
[0047]
Further, as shown in FIGS. 5B and 5C, the diameter of a part of the dots 14B from the center of the pattern dots 14 may be recorded to be large.
[0048]
That is, when the pattern dots 14 are detected on a line connecting the approximate centers of the marker pairs as described later, the dots 14B from the center where the detection is hardest are pre-recorded in a large size, so that the pattern dots 14 are lost. In addition, the dot 14B from the center can be detected first, and another dot can be roughly searched.
[0049]
Next, the address dots 18 will be described.
[0050]
The address dots 18 are provided between the markers 16 in a direction orthogonal to the pattern dots 14 as shown in FIGS. 8A and 8B, for example, and indicate the address of the block 20.
[0051]
By providing such address dots 18, even if the blocks are not read in order, the read blocks are rearranged in the order of the addresses indicated by the address dots 18 so as to be correctly reproduced.
[0052]
Further, as shown in FIG. 8C, if an inverted code 28 obtained by inverting the address dot 18 is recorded on both sides of the address dot 18, error correction and error correction can be performed using this. The reading position can be corrected.
[0053]
Alternatively, as shown in FIG. 8D, an error correction of an address can be performed by providing a correction code 30 for error correction on both sides of the address dot 18. That is, by reading the correction code 30 in addition to the address dot 18, the address error can be corrected.
[0054]
In addition, as shown in a part of the address dot 18, for example, as shown in FIG. 9A, a fixed pattern 32 which is always a black dot, that is, "1" is provided in the middle regardless of the address. May be. In this way, by reading the black dots of the fixed pattern 32, it can be used for detecting a position shift or an error.
[0055]
Alternatively, the fixed patterns 32 may be provided at both ends as shown in FIG. In this case, as the fixed pattern 32, by setting one end of the address dot 18 as a black dot and the other end as a white dot, the reading direction of the address dot 18 can be specified. Even if is read upside down, the address can be read accurately.
[0056]
As described above, if the fixed pattern 32 is included in at least a part of the address dot 18, the positioning and error detection can be performed using the fixed pattern 32, or the reading direction of the address dot 18 can be adjusted. Can be identified.
[0057]
When the blocks 20 are recorded in the order of the addresses, the addresses of a certain block can be easily estimated from the addresses of the surrounding blocks, so that the address dots 18 can be omitted as appropriate.
[0058]
For example, as shown in FIG. 9 (C), when the blocks 20 are aligned and sequentially assigned addresses, if the addresses of the first block and the third block can be detected, the address of the block between them is changed to the second block. It can be easily estimated that it is a block. Therefore, the address of the second block does not need to be recorded, and the data code 10 can be recorded there, so that the recording capacity can be increased accordingly.
[0059]
If the address relationship between adjacent blocks is set in advance such as “+10”, the block addresses do not have to be arranged in order as shown in FIG.
[0060]
As described above, if the address dots 18 are appropriately omitted and recorded so that the addresses of at least two or more blocks can be determined simultaneously, the data code 10 can be recorded even in the omitted portion, so that the recording capacity is correspondingly increased. Can be increased.
[0061]
Next, an information reproducing system for optically reading the dot code as described above and reproducing the original multimedia information will be described.
[0062]
FIG. 10 is a diagram showing the configuration.
[0063]
That is, the dot code 36 recorded on the information recording medium 34 such as paper is imaged by the image input unit 38. The data reading reference point determining unit 40 determines a reading reference point for reading the data code 10 from the image captured by the image input unit 38. The data reading unit 42 reads the data code 10 from the image obtained by the image input unit 38 based on the reading reference point determined by the data reading reference point determining unit 40. The data reproducing unit 44 reproduces the data read by the data reading unit 42.
[0064]
With this configuration, the dot code can be read quickly and accurately.
[0065]
Note that the reproducing unit 44 reproduces the read data by performing demodulation and error correction as necessary. Here, "reproduction" means video output to a monitor for an image, and audio output to a speaker for audio. If the signal is a compressed signal, the signal is decoded and then output. For example, if a Reed-Solomon triple product code is used for error correction, since data is 8-10 modulated, 10-8 modulation (8-10 inverse modulation) is performed.
[0066]
On the other hand, the image input unit 38 includes an imaging unit 46 such as a CCD camera and an equalization / binarization unit 48 for equalizing and binarizing an output image of the imaging unit 46. That is, in the image input unit 38, the image obtained by imaging the dot code 36 is binarized, and the subsequent data reading reference point determining unit 40 performs processing only on the binarized data. By doing so, not only the memory (not shown) for holding the image can be reduced, the data transfer amount also decreases, and high-speed processing becomes possible.
[0067]
In addition, if such binarized data is used, the data reading reference point determining unit 40 and subsequent units can be configured by an information processing device such as a personal computer. Further, in such a case, the size of the housing that accommodates only the image input unit 38 may be small, so that the burden on the operator when scanning is reduced.
[0068]
On the other hand, the data reading reference point determination unit 40 may detect, for example, the middle point of the pattern dot 14 as a reading reference point. However, in the present embodiment, the data reading reference point determining unit 40 determines the center position of the marker 16 as the reading reference point. As to decide.
[0069]
That is, the data reading reference point determining unit 40 includes a marker extracting unit 50 for detecting a marker existing area where the marker 16 is present from the image data binarized by the equalizing and binarizing unit 48, and the detected marker extracting unit 50. The pattern dot 14 is detected by using a marker detection unit 54 including a marker approximate center calculation unit 52 for calculating the approximate center of the marker 16 in the marker existing area, and the approximate center of the marker 16 determined by the marker detection unit 54. And a marker center detector 56 for estimating the true center coordinates of the marker 16 as a reference point for reading the data code 10 and the address dot 18 from the detected pattern dot 14.
[0070]
The marker extracting section 50 of the marker detecting section 54 performs an erosion process and a labeling process to detect a marker existing area.
[0071]
Here, the erosion process itself is a process known in image processing, and there are various types of hardware for executing the process. This erosion processing is shown in FIG. 11B when a mask of a predetermined size, for example, a mask of 3 × 3 pixels as shown in FIG. If all the pixels in the mask are black pixels (indicated by ○), the target pixel is a black pixel, and as shown in FIGS. 11C and 11D, even one white pixel (× If this is the case, the pixel of interest is converted into a white pixel.
[0072]
When such an erosion process is performed on the dot code 36, as shown in FIG. 12, the data code 10, the pattern dot 14, and the address dot 18 composed of small dots disappear, and as shown in FIG. Only pixels corresponding to very large markers 16 can be left.
[0073]
Then, the remaining pixels are sequentially labeled for each group, and an existing area having the same label is obtained. The marker contracted area 58 is obtained by enlarging the contracted area by the erosion into the existing area.
[0074]
The marker approximate center calculation unit 52 calculates the center of gravity of the black pixel for each marker existing area 58, and uses this as the reference point for reading the pattern dots 14 using the marker approximate center.
[0075]
As described above, by performing the erosion processing and the labeling processing, the marker 16 can be easily detected by using existing hardware, and the influence of noise near the marker 16 can be reduced.
[0076]
Further, the marker extracting section 50 can also obtain the marker existing area 58 without performing the above-described processing that requires calculation of erosion and streak known in image processing.
[0077]
For example, when a frame image as shown in FIG. 13A is considered, an image is captured in a state where an LPF is applied due to the characteristics of an optical system (not shown) of the imaging unit 46, and therefore, as shown in FIG. The black level is detected to be low in a portion where black pixels are gathered like the marker 16. Therefore, the minimum value of the luminance is obtained while scanning an area including at least one or more markers of the frame 60, and a value obtained by multiplying the value by an offset (about 15 to 20) is set as a threshold th, and the frame image is binarized. Then, the marker center part 62 can be easily extracted as shown in FIG.
[0078]
That is, since the marker 16 is large, the luminance value of the central portion takes a considerably low value when captured as an image. On the other hand, since the dots of the data code 10 and the pattern dots 14 have a slight blur due to the optical system, the surrounding white information is superimposed and becomes slightly thin. Therefore, since a luminance profile as shown in FIG. 13B is obtained, only the center portion of the marker 16 can be extracted by binarizing it with the predetermined threshold th.
[0079]
As described above, the minimum value of the luminance is obtained for at least a part of the frame 60, and the minimum value is binarized using a threshold obtained by adding a predetermined offset to the minimum value. The part 62 can be detected.
[0080]
Further, in this case, if this processing is performed after the low-pass filter is applied, the detection of the marker central portion 62 is further facilitated. That is, when a low-pass filter is applied to the frame image as shown in FIG. 13A, small dots such as data dots are further blurred and thin, and only the central portion of the large marker 16 remains.
[0081]
As described above, by applying the low-pass filter, when the marker 16 is recorded as a dot larger than other dots such as the data dot of the data code 10 and the pattern dot 14, the detection of the marker central portion 62 is more reliably performed. Can be done.
[0082]
Alternatively, the center calculation range may be obtained from the number of streaks that are in contact with the streak processing, which is a technique known in the image processing field.
[0083]
That is, as shown in FIG. 14A, a streak (determining the number of continuous black runs, that is, the number of continuous black pixels and its starting point) is performed for each frame, and the streaks that are in contact with each other (in the example of FIG. Streaks S1 to S7) are put together. Then, the combined streak copies the attribute data. Here, the attribute data refers to the coordinates of the upper end and the left and right ends of the streak and the streaks in contact with the streak, and the number of streaks in contact with the streak. Then, when the streaks that are in contact no longer exist below, the range in the height direction is determined from the number of streaks that have been in contact so far.
[0084]
In this way, when the data is decomposed into the data of the starting point of the black pixel and the length from it, small dots such as data dots take only short streak data. 16 can be determined.
[0085]
Therefore, the streaks that are in contact with each other are grouped together, and the attributes of the grouped streaks, that is, the coordinates of the start point and the length (end point) are copied to the lower streaks. If there is a streak in contact, the lower streak copies the upper attribute, so the start and end points of the upper attribute are copied. Thus, the left end, the right end, the upper end, and the lower end are copied.
[0086]
For example, the uppermost small streak S1 copies only the uppermost data, that is, only the upper side, to the lower streak S2, and the lower streak S2 has left end and right end data. Then, when the processing is finally completed up to the bottom streak S7, the attributes of the bottom streak data S7 are the left end and the right end of the longest streak S4 and the top streak S1. Since the attribute of the bottom streak S7 is recorded, the area where the marker 16 exists is obtained from this attribute.
[0087]
As described above, if the center calculation range is determined by the number of streaks that are in contact with the streak processing, processing that requires a large amount of calculation, unlike the erosion processing, does not need to be performed, so that the processing is simplified. In addition, there is an effect that the spot-like scratch in the marker 16 becomes strong.
[0088]
Further, it is possible to extract all markers without performing the above-described marker extraction processing on all of the frames.
[0089]
That is, as shown in FIG. 14B, when there are nine markers 16 (M1 to M9) in the frame 60, first, the markers 16 are raster-scanned in the frame. The marker 16 is searched for by any of the marker extraction processes as described above. When the marker M1 is found in this way, the markers M2 and M4 relatively adjacent to the marker M1 are provided with information indicating how far away from the marker M1 the information is given as the foresight information. Further, it is not necessary to perform a raster scan to search for the next marker M2 or M4 in detail. Instead of taking into account the possibility of skew, the marker jumps to an area 64 where a marker determined in accordance with the look-ahead information may exist, and Only in the area 64, the marker 16 needs to be searched. Then, when the markers M2 and M4 are found, the markers M2 and M4 may be expanded from there to the marker 16 to search for the markers 16.
[0090]
As described above, at least one or more markers are detected, and a marker is searched only in the area 64 where there is a possibility that another marker may exist based on the detected marker. This eliminates the need for calculation for marker extraction, thereby increasing the processing speed. If there is black dust between the markers 16, for example, the erosion or the like is also extracted as a candidate for the marker 16, but only the area 64 where the marker may exist is searched for. In such a case, such dust is not extracted as a marker candidate.
[0091]
In the marker extraction process, when only three markers are found in the frame 60, for example, as shown in FIG. 15A, a marker set (four corners in this example) constituting the block is obtained. Since it is known that the processing cannot be performed, the processing of this frame may be stopped.
[0092]
That is, in the dot code in which the markers 16 are arranged at the four corners, if up to three labeled labels are touched after the erosion process or the streak process, there are only three markers 16. I know at that point. Therefore, when the number of markers detected in a frame is less than the number necessary to form a block, the processing of the frame is stopped, so that unnecessary processing can be omitted.
[0093]
On the other hand, for example, as shown in FIG. 15B, the marker approximate center calculation unit 52 calculates the barycenter of all the black pixels in the marker area 58 and uses the barycenter 66 of the detection of the pattern dot 14. The approximate center of the marker as the reference coordinates for the marker.
[0094]
By setting the center of gravity of all the black pixels in the marker existing area 58 at the approximate center of the marker as described above, even if there is a white spot, a black dot, or a whisker-like noise, it can be canceled.
[0095]
Alternatively, the marker approximate center calculating unit 52 obtains a circumscribed rectangle 68 of the marker 16, calculates the center point 70, and sets the center point 70 as the marker approximate center, as shown in FIG. 15C, for example. You may do it. In this case, the amount of calculation can be reduced as compared with the case where the center of gravity is calculated.
[0096]
By the way, in the marker approximate center calculation unit 52, for example, as shown in FIG. 16A, when the marker 16 is lost due to the frame end 72, The approximate center 74 of the remaining part shown by hatching in the figure is determined. If the calculated approximate center 74 deviates from the actual correct approximate center 76 of the marker, the pattern dot 14 is detected by the marker center detecting unit 56. 14 may not be detected properly. In other words, when the marker 16 is over the frame end 72, a part of the marker 16 is lost, so that the detected approximate center position of the marker may be shifted. It cannot be detected, and the marker center position detection accuracy is reduced.
[0097]
Therefore, the marker approximate center calculating unit 52 estimates whether or not the marker 16 is missing based on how far the calculated approximate center position is from the frame end 72. If the marker 16 is missing, It is preferable to calculate the deviation amount δ and correct the marker approximate center position to the correct marker approximate center 76.
[0098]
In this case, whether or not the marker 16 is missing can be determined based on whether or not the calculated approximate center position is within the approximate center correction area 78, as shown in FIG.
[0099]
The approximate center correction area 78 is such that the distance d from the frame end 72 of the correct marker approximate center 76 to the left and right ends of the frame is smaller than half a of the size of the marker 16 in the left and right direction (that is, d <a). And the height of the upper and lower ends of the frame is such that the distance d from the frame end 72 of the correct marker approximate center 76 is smaller than half the vertical size b of the marker 16 (ie, d <b). Is an area with
[0100]
Further, the shift amount δ of the approximate center is given by the following equation.
[0101]
(Equation 1)
Figure 0003568508
[0102]
Since the pixels of the CCD of the imaging unit 46 are not square, and the pixel pitches of the CCD are different in the vertical and horizontal directions, as shown in FIG. 16A and FIG. The image obtained by imaging the image 16 is thus elliptical. Therefore, the formula for calculating the shift amount δ differs between the case where the marker 16 protrudes from the left and right ends of the frame and the case where the marker 16 protrudes from the upper and lower ends.
[0103]
As described above, by correcting the approximate center position of the marker that may be missing at the frame end, it is possible to obtain the approximate center position of the marker that has been applied to the frame end assuming that the marker is not missing. Therefore, it is possible to more reliably detect the pattern dots.
[0104]
Further, even if it is not necessary to sequentially calculate the deviation amount δ, that is, the correction amount, this calculation formula is assumed to be in the form of a table showing the relationship between the detected distance from the frame center of the approximate center and the correction amount. Is also good.
[0105]
For example, as illustrated in FIG. 16C, the marker approximate center calculation unit 52 stores a table indicating the relationship between the detected distance from the approximate center frame end and the corrected distance from the approximate center frame end. Have. However, these tables show the case where the diameter of the marker 16 is 7 dots, and the size of one dot at the time of imaging is 3.47 pixels (pixels) horizontally and 2.70 pixels vertically.
[0106]
As described above, if a table that outputs a predetermined correction amount according to the distance from the frame end is used, calculation of the correction amount becomes unnecessary.
[0107]
Further, it is not necessary to perform the above-described approximate center position correction processing on the markers of the entire frame, but only on the markers relating to the block 20 for actually reading the data dots.
[0108]
For example, in FIG. 17A, when the marker approximate centers M0 to M14 indicated by “x” marks are calculated in the frame 60, the markers requiring approximate center position correction, that is, a part is missing at the frame end. There are three markers 80, M0, M9, and M14. However, the blocks to be actually read, that is, the processing target blocks 82, are five blocks shaded in the figure with markers at the four corners (note that markers M7, M9, M11, and M13 are arranged at the four corners). The block is excluded for the reason described later in detail). Therefore, when it is determined that a part of the marker 16 constituting the five blocks involved in the reading is missing at the frame end, the correction is performed only on the marker and not performed on the other markers. . In other words, in the example shown in the figure, among the markers 80 that are partially missing at the end of the frame, only the marker M14 relates to the processing target block 82. (In this case, since the markers M0 and M9 cannot be one of the four corner markers constituting the block, they are excluded from the processing target).
[0109]
As described above, the correction is selectively performed only on the marker that has been processed, that is, the marker that needs correction of the approximate center position of the entire frame is not detected and corrected, but is related to the block that performs reading. Since this process is performed only for the marker to be changed, the calculation amount is reduced.
[0110]
It should be noted that the reason for excluding a block in which the markers M7, M9, M13, and M11 are arranged at the four corners is that markers M5, M6, M10, and M8 are arranged at the four corners in the case of double height as described in detail below. The block and the block in which the markers M7, M9, M13, and M11 are arranged at the four corners have the same data contents. Since the former block is selected as the processing target block 82, the latter block is excluded. It depends.
[0111]
Next, the marker center detecting section 56 will be described in detail.
[0112]
The marker center detection unit 56 first selects two markers 16, that is, a marker pair, in order to detect the pattern dots 14.
[0113]
That is, when the pattern dot 14 is searched using the marker 16, if the dot code 36 is skewed and captured as shown in FIG. I don't know where it is. On the other hand, as shown in FIG. 17B, if two markers 16 are detected as a marker pair 84, the pattern dot 14 is given as format information such that the position where the pattern dot 14 exists is between the markers, for example. If so, it is only necessary to search between the marker pairs 84. For example, if one pixel 16 is sequentially searched from one marker 16 constituting the marker pair 84 to the other marker 16, the pattern dot 14 is obtained. Will be found.
[0114]
Thus, by selecting the marker pair, the detection of the pattern dots 14 is ensured. In other words, since the pattern dots 14 are recorded with a predetermined positional relationship from the marker 16, even if the skew occurs, the pattern dots 14 can be detected if at least two marker positions are obtained.
[0115]
Therefore, as shown in FIG. 18, the marker center detection unit 56 first selects one reference marker to be processed by the reference marker selection unit 86, and the specification skew angle and the format The paired marker existence area is calculated according to the information, and the paired marker candidate detection unit 90 searches the paired marker existence area to detect all the paired marker candidates. Next, a marker to be processed is determined by selecting a pair of marker candidates forming a pair in the base marker pair selection unit 92, and the processing target marker is selected by the marker group selection unit 94 to determine a processing target block. I do. Then, the process proceeds to the detection of the pattern dots 14 between the markers related to the processing target block.
[0116]
The marker presence area calculation unit 88 calculates the marker existence area as follows. That is, as shown in FIG. 17C, the range in which the marker to be paired with one reference marker 96 selected by the reference marker selection unit 86, that is, the pair marker existing area 98 is the specification skew angle. (20 ° in the example in the figure) and the distance between the markers, that is, the format information. Therefore, as shown in (D) of FIG. 17, even if the marker detection unit 54 detects the approximate center (indicated by X in the figure) of some marker candidates due to noise or the like, the range of the It can be seen that only those that fall within are markers to be paired (paired marker 100), and the others are erroneous markers 102.
[0117]
The specification skew angle indicates how inclined the information reproducing system is to read the dot code 36. For example, if the image input unit 38 is fixed and the dot code 36 is automatically conveyed and scanned, there is almost no skew, and the specification skew angle is a unit of 1 ° or less. Become. On the other hand, when the operator manually causes the image input unit 38 to scan the dot code 36, there is a possibility that the image input unit 38 is inclined by about 20 °. Further, for example, if the image input unit 38 has a structure in which the scanning direction is regulated to some extent by rollers or the like, the skew can be reduced. As described above, in the information reproducing system, the skew angle is determined by the specification depending on the structure.
[0118]
As described above, when selecting a marker pair, a marker existence region is calculated in accordance with the specification skew angle and the format information, and a marker candidate is detected by searching within the marker existence region. Since it is not necessary to perform a process of detecting a marker candidate that forms a pair, the search efficiency is improved. Further, since the search is performed by narrowing the left and right adjacent marker existence areas, erroneous marker detection due to noise can be reduced. In other words, even if marker candidates are erroneously detected due to noise, they can be removed due to restrictions on the format of the marker pair.
[0119]
In addition, the marker center detection unit 56 may calculate the position of the marker by extrapolation.
[0120]
For example, if one marker pair has already been found, for example, if the markers M8 and M10 have already been detected in some way in FIG. 19A, the position of the next marker M11 is: As described above, the skew angle is already known from the positional relationship between the markers M8 and M10 without performing the process of calculating the marker presence area 98 from the marker M10 based on the specification skew angle and the format information and searching for the range. Since the distance between the markers is known, the extrapolated vector (exv) 104 is extended from the marker M10 according to the distance, and as shown in FIG. What is necessary is just to search for a pair marker in.
[0121]
By doing so, only a very narrow range becomes the marker search area 106, so that there is no possibility of erroneous detection of marker candidates in other places, that is, it is resistant to noise. In particular, even when a plurality of marker candidates exist in the pair marker existing area 98, it is possible to select a correct marker candidate as the marker pair 100.
[0122]
Further, by using such an extrapolated vector 104, it becomes possible to read even a code in which the marker 16 is omitted as appropriate. For example, in the above example, even if the marker M11 is omitted, the approximate position where the marker M11 should be located can be determined from the extrapolated vector 104, and the pattern dots 14 between the markers M10 and M11 can be read.
[0123]
As described above, if the position of the marker is calculated by extrapolation, the missing marker due to noise and the erroneous marker detection are less likely to occur. Further, it becomes possible to read a code in which the marker 16 is omitted as appropriate.
[0124]
The extrapolated vector (exv) 104 can also be used when searching for a vertically adjacent marker, which is calculated from the positional relationship between the previously detected horizontal marker pair. For example, when two markers 16 are detected as indicated by crosses in FIG. 19C, the positions of the vertically adjacent markers are calculated from the increments Δx and Δy in the x direction and the y direction by the following equation. Is extrapolated.
[0125]
exv. fx = 35/43 × RAT × Δy
exv. fy = 35/43 / RAT × Δx
Here, RAT is the aspect ratio with respect to the pixel of the imaging system to be used. In this example,
RAT = 3.47 / 2.70
It is.
[0126]
As described above, when the marker position is calculated by extrapolation, the extrapolation vector is calculated from the positional relationship of the previously detected marker pair, thereby reliably detecting the marker set constituting the block corresponding to the marker pair. can do.
[0127]
The extrapolated vector 104 can also be used in processing of the next frame.
[0128]
That is, the entire dot code 36 is not necessarily captured as a single screen, but in actuality, it is often the case that scanning is performed to capture multiple continuous frame images. In this case, since the skew angle hardly changes suddenly between two temporally consecutive frames, the extrapolated vector 104 obtained in the previous frame can be used in the next frame.
[0129]
As described above, if the extrapolation vector 104 of the immediately preceding frame is referred to in the second and subsequent frames, it is not necessary to obtain the extrapolation vector 104 by calculation. That is, it is possible to omit the process of the marker presence area calculation unit 88.
[0130]
When a corresponding marker is searched for in the marker search area 106 determined by the extrapolation vector 104, the actual marker may be slightly displaced at this time due to, for example, distortion or inclination, instead of the extrapolated position. In such a case, as shown in FIG. 19B, the extrapolated vector is corrected using the approximate center of the paired marker 100 searched in the marker search area 106, and the next paired marker is corrected. When searching 100, it is preferable to set the marker search area 106 using the corrected extrapolated vector, that is, the modified extrapolated vector 108.
[0131]
As described above, by correcting the extrapolated vector 104 using the marker center position detected based on the extrapolated vector 104, that is, by performing the processing while correcting the extrapolated vector, the distortion and the inclination are corrected. Can be reliably detected without losing sight of the marker even when exists.
[0132]
If all the marker candidates to be paired are detected by any of the above methods, the marker center detecting unit 56 selects a series of marker pairs over two blocks as the base marker pair by the base marker pair selecting unit 92. I do.
[0133]
For example, as shown in FIG. 20A, when there is a series of marker pairs extending over two blocks, such as a marker pair composed of markers M10 and M11 and a marker pair composed of markers M11 and M13, the three Two markers M10, M11, M13 are selected as a base marker pair.
[0134]
That is, the existence area of the adjacent marker, that is, the marker existence area 98 is calculated from the reference marker (ntm) based on the specification skew angle and the format information, and the marker candidates in the marker existence area 98 are detected. Are extracted as adjacent markers (lmc, rmc). Then, the reference marker and the extracted marker are selected as a base marker pair 110.
[0135]
In other words, if there is an erroneous detection marker, there is a possibility that, when three markers 16 including the erroneous detection marker are connected, the middle marker becomes exactly the middle point due to the format limitation that they are aligned. Therefore, if a marker pair extending over two blocks is selected as a base marker pair in this manner, such a false detection marker is rejected and only the actual marker is selected. . That is, it is possible to reject what is erroneously detected as a marker due to noise.
[0136]
When the dot code 36 is recorded in double height, by selecting such a base marker pair extending over two blocks, it is possible to determine which two columns to read here.
[0137]
Further, since the pattern is spread over a plurality of blocks, the number of pattern dots can be increased and the accuracy of the data reading reference point can be increased. That is, in the example of the drawing, not only is the reading reference point determined using the pattern dots between the markers M10 and M11, but also the reading reference point, that is, the marker is determined using the pattern dots in the range from the markers M10 to M13. By determining the true center coordinates, the accuracy can be increased accordingly.
[0138]
Further, since the data reading reference point can be determined simultaneously over a plurality of blocks, the true centers of the markers M10 and M11 are obtained, and then the true centers of the markers M11 and M13 are obtained. There is also an advantage that the amount of calculation can be reduced as compared with the case where it is obtained.
[0139]
As described above, if a series of marker pairs extending over at least two or more blocks is selected as a base marker pair, a marker due to noise is restricted due to a format limitation of the base marker pair (pairs are limited). Erroneous detection can be reduced. Further, in the case of a code recorded in double height, by selecting a marker pair extending over a reproduction block sequence as a base marker pair, double reading can be eliminated. Furthermore, by extending over a plurality of blocks, many pattern dots can be read, and the accuracy of the data reading reference point is increased. Further, since the data reading reference point can be determined simultaneously over a plurality of blocks, there is an effect that the amount of calculation is small.
[0140]
Here, the double height will be described.
[0141]
The double height means that exactly the same code is printed in two rows as shown in FIG. 20B (in the figure, A1, A2,... Indicate block addresses). That is, when the original code is overlapped in two steps (vertical two blocks), the double height is overlapped in four steps (vertical four blocks). When the dot code 36 is scanned in the horizontal direction by the image input unit 38, as a frame image obtained by the imaging unit 46 (the imaging unit visual field 112) such as a CCD camera, as shown in FIG. , 90 °. In other words, a frame image in which the blocks are sequentially slid upward is obtained such that the blocks rise from the bottom as the scanning is performed.
[0142]
In this case, from the relationship between the block size and the frame size, normally, three blocks are imaged in one frame in the horizontal direction. Of the three blocks, in the case of double height, two blocks have the same data content, so that only one of the blocks needs to be processed. Therefore, in the example of FIG. 17A described above, the block having the markers M5, M6, M10, and M8 at the four corners and the block having the markers M7, M9, M13, and M11 at the four corners have the same data content. Since the former block is selected as the processing target block 82, the latter block is excluded.
[0143]
The base marker pair selection unit 92 selects a reference marker from marker candidates in the scanning direction at least within a range in which the left and right adjacent markers can be detected, and selects a base marker pair based on the reference marker.
[0144]
That is, when a certain marker is found, the position of the marker adjacent thereto can be specified by the specification skew angle and format as described above. In this case, the reduction rate due to the inclination is also related, but the adjacent marker always enters the frame 60 only when the marker is in the area 114 as shown in FIG. Therefore, the reference marker ntm is selected in the area 114.
[0145]
The area 114 is an area smaller than the frame 60 by a distance ACRY from the upper and lower ends of the frame and a distance ACRX2 from the left and right ends. Here, ACRY and ACRX2 are, as shown in FIG. 21 (B), the length in the Y direction of the marker existence area 98 and the distance from the marker to the far end of the marker existence area 98. This value corresponds to the length in the X direction, and is a value calculated by a mathematical formula as shown in FIG.
[0146]
In other words, if a reference marker is selected in such an area 114, there is a possibility that adjacent markers are detected on both sides of the marker regardless of which marker in the area 114 is selected.
[0147]
The reason why the reference marker is selected from the marker candidates on the scan direction side is to select a block to be described later. When a block is selected from the scan direction side in this manner, the block is already processed in the previous frame. If a processed block is detected, the processing of the frame is stopped at that point, so that unnecessary processing on the already processed block is omitted. Will be able to do it.
[0148]
In the illustrated example, the reference marker indicates the marker at the center of the base marker pair 110, and the lower marker of the frame is set as the reference marker ntm as much as possible. Will be selected.
[0149]
In this way, by selecting a reference marker from the marker candidates in the scanning direction within at least the range where the left and right adjacent markers can be detected, and selecting a base marker pair based on the reference marker, the adjacent markers that should be detected can be detected. If not detected, it can be inferred that the code is off the screen or that an accident has occurred. Further, by selecting a reference marker from the marker candidates on the scanning direction side, processing is performed from an undetected marker in the previous frame, so that overlapping processing can be prevented.
[0150]
When a marker candidate is found only on one side of the reference marker ntm, the base marker pair selection unit 92 reselects the marker as a reference marker and searches for an adjacent marker. However, at the time of this marker search, the existence area is limited by extrapolation.
[0151]
For example, in FIG. 21C, when the marker M10 is first selected as the reference marker ntm and the corresponding markers lmc and rmc are searched from the paired marker existence area 98, the marker is found from the right paired marker existence area 98. On the other hand, when the marker M9 is found as the left adjacent marker lmc from the left pair marker existing area 98, it is determined that the marker M10 is the marker at the end of the dot code 36. Therefore, the found marker M9 is used as the reference marker ntm. Then, a marker search area 106 is obtained from the already detected marker M10 by an extrapolation vector, and a left adjacent marker lmc is searched in the area. Thus, the marker M8 is detected, and the markers M8, M9, and M10 are used as a base marker pair.
[0152]
As described above, when only the left and right markers can be detected with respect to the marker, more blocks can be read by replacing the reference marker with the detected adjacent marker and searching for the marker by extrapolation. That is, since the block is read based on the reference marker, when the marker at the code end is selected as the reference marker, the number of readable blocks is reduced. Therefore, if the selected reference marker is a code end, by reselecting it, more blocks can be read. Further, since the search area is narrowed by extrapolation, erroneous marker detection due to noise can be reduced.
[0153]
When the extrapolated marker position protrudes from the frame 60 as described above, the base marker pair selection unit 92 stores the extrapolated position as the approximate center of the virtual marker.
[0154]
For example, in FIG. 22A, when the marker M8 is first set as the reference marker ntm and the right adjacent marker rmc is not found when searching the paired marker existence area 98 on both sides, as described above, The marker is moved to the marker M7, and the left adjacent marker lmc is searched for by extrapolation from the marker pair consisting of the markers M7 and M8. At this time, if the extrapolated point is out of the frame 60, a virtual marker is provided at the extrapolated point.
[0155]
In this way, the pattern dots 14 between the marker M7 and the virtual marker M10 in the figure can be used.
[0156]
If such a virtual marker M10 is not provided, only a set of markers M7 and M8 is found, and only blocks in the same column as the block including the markers M7 and M8 will be read. However, by providing the virtual marker M10 in this manner, a block in which the markers M1, M2, M5, and M4 are arranged at the four corners can also be read, and it is possible to prevent a block from being lost.
[0157]
In this way, when the marker search area protrudes from the screen when extrapolated, the extrapolation point is used as a virtual marker, so that even if the marker protrudes from the screen, the pattern dots 14 remaining in the screen can be used. Therefore, these pattern dots 14 can be effectively used.
[0158]
The blocks are sequentially read out by extrapolation based on the reference marker, but even if a marker adjacent to the reference marker is off the screen, the marker constituting the block obtained by the extrapolation remains within the frame due to skew. Sometimes, you can read those blocks.
[0159]
When two or more base marker pairs can be selected, the base marker pair selection unit 92 reselects a base marker pair that has a high possibility of reading more blocks.
[0160]
That is, in the case of double height, as described above, exactly the same code is printed in two rows. As the frame image, when the original code is composed of two horizontal blocks, there are four horizontal blocks, and usually three horizontal blocks are captured in one frame due to the relationship between the block size and the frame 60 size. Therefore, the number of blocks to be read can be increased by reselecting a base marker pair that is more likely to be able to read more blocks.
[0161]
For example, as shown on the left side of FIG. 22B, when the markers M10, M11, and M13 are selected as a base marker pair, as shown by hatching on the right side of FIG. , M4, M7, and M6 at four corners, a block of M6, M7, M11, and M10, and a block of M7, M9, M13, and M11.
[0162]
On the other hand, when the markers M8, M10, and M11 are selected as the base marker pair as shown on the left side of FIG. 22C, the read block is shaded on the right side of FIG. , Markers M1, M2, M6, M5 at the four corners, blocks M5, M6, M10, M8, blocks M8, M10, M14, M12, blocks M2, M4, M7, M6, M6, There are five blocks of blocks M7, M11 and M10.
[0163]
Here, in the case of double height, since the blocks M5, M6, M10, and M8 and the blocks M7, M9, M13, and M11 have exactly the same data recorded, even if either block is read, The data obtained is the same. Therefore, M8, M10, and M11 with the largest number of blocks that can be read are selected as a base marker pair.
[0164]
As described above, when two or more base marker pairs can be selected, more read blocks can be extracted from one frame by reselecting a base marker pair that has a high possibility of reading more blocks. become.
[0165]
When reselecting a base marker pair as described above, the right base marker pair is displayed when the code is skewed to the left, and the left base marker pair is displayed when the code is skewed to the right. When re-selecting and searching for a marker, the existence area is limited by extrapolation.
[0166]
For example, when the code is skewed to the right as shown in FIG. 23A, a pair of M8, M10, M11 on the left and a pair of M10, M11, M13 on the right are selected as a base marker pair. If the left set is selected, five blocks can be read, but if the right set is selected, only four blocks can be read. Therefore, when the code is skewed to the right, the left marker pair is selected.
[0167]
The markers constituting the block are sequentially obtained by extrapolation based on the base marker pair. In this way, when the base marker pair is reselected, if the code is skewed to the right, the left base marker pair In the case of skew to the left, by reselecting the pair of base markers on the right, it is possible to prevent the markers constituting the read block from protruding outside the frame due to the skew and causing block loss (horizontal direction). .
[0168]
Alternatively, in the reselection of the base marker pair, a base marker pair from the center may be selected. This is performed by reselecting a marker pair near the center when the midpoint between the left marker and the reference marker is on the right side of the frame center, or when the midpoint between the right marker and the reference marker is on the left side of the frame center. .
[0169]
For example, as shown in FIG. 23B, when the code is skewed to the right, when the markers M10, M11, and M13 are detected as a base marker pair, the middle point of the left marker M10 and the reference marker M11 is set to the frame. Since the base marker pair is located on the right side of the center of the frame 60, it can be seen that this base marker pair is shifted to the right side of the frame 60. Therefore, in such a case, a marker pair consisting of M10 and M11 closer to the center than a marker pair consisting of M11 and M13 is reselected. Then, the marker M8 is searched by extrapolation, and M8, M10, and M11 are selected as a base marker pair.
[0170]
If the code is skewed to the left, it can be determined whether or not to reselect by determining whether the midpoint between the right marker and the reference marker is to the left of the frame center.
[0171]
The markers constituting the block are sequentially obtained by extrapolation with reference to the base marker pair. In this manner, the midpoint between the left marker and the reference marker is on the right side of the frame center or between the right marker and the reference marker. When the point is on the left side of the center of the frame, by reselecting the marker pair near the center, it is possible to prevent the markers constituting the read block from protruding from the frame and causing block loss due to skew. In addition, since a block from the center is selected, the influence of distortion can be reduced.
[0172]
Further, the marker set selection unit 94 selects all or some of the combinations of the markers constituting the block.
[0173]
That is, as an example, when the block 20 has a rectangular shape as shown in FIG. 24A and markers are arranged at its vertices, all four marker sets constituting the block 20 are selected.
[0174]
As described above, by selecting a marker set constituting the block 20, data to be read can be divided and processed for each block.
[0175]
Note that the marker set selection unit 94 stores all the marker sets constituting the selected block 20 in a memory (not shown).
[0176]
For example, in the case of the example of FIG. 24A, if it is determined from the format information that the markers M0, M2, M6, and M4 form one block, the marker is set as a marker set of the first block. As shown in FIG. 3B, the upper left is stored in a memory such as M0, the upper right is M2, the lower right is M6, and the lower left is M4. Similarly, M1, M3, M7, and M5 are stored as the second block, M8, M10, M14, and M12 are stored as the third block, and M9, M11, M15, and M13 are stored as the fourth block. That is, since there are four blocks in this example, the first to fourth blocks are stored in the memory with the marker numbers in this manner.
[0177]
As described above, by storing all the marker sets constituting the block 20 based on the approximate center position in the memory, data can be read for each block even when the blocks 20 are not aligned.
[0178]
Alternatively, instead of storing all the marker sets as described above, a predetermined one marker constituting the block 20 and a relational expression expressing a relation between the marker and another marker may be stored in the memory. .
[0179]
In other words, when the processing target blocks 82 are shaded as shown in FIG. 24C, a predetermined one of the four markers constituting the block, for example, an upper left marker, If the relational expression between the upper left marker and the remaining three markers is known, it is not necessary to store all marker sets in the memory.
[0180]
For example, in the case of the example shown in FIG. 24, as shown in FIG. 24 (D), as a relational expression, the upper right marker is stored as +1, the lower left marker is stored as +3, and the lower right marker is stored as +4. For the first block, only the upper left marker M1 is stored, and the upper right marker is M2 +1, the lower left marker is M4 +3, and the lower right marker is M4 +4. There is no need to store M2, M4, and M5 in the memory.
[0181]
As described above, if the relationship between at least one of the markers constituting the block 20 and another marker is known, it is only necessary to store the at least one marker in the memory, and the memory capacity can be saved.
[0182]
Further, as shown in FIG. 25A, the marker set selecting unit 94 selects all the marker sets constituting the block 20 so that all the blocks 20 included in the frame 60 can be processed blocks 82. It is good to do. However, in this case, it is not necessary to configure the base marker pair selection unit 92.
[0183]
In the case of double height, exactly the same code is printed in two rows as described above. As the frame image, when the original code is composed of two horizontal blocks, there are four horizontal blocks, and the block size and the frame 60 In general, three horizontal blocks are imaged in one frame because of the size of the image. Thus, when all the marker sets constituting the block 20 in the frame are selected as described above, the blocks having the same contents are read in duplicate, and the data read in the same manner in both of them is regarded as correct data. Reliability can be improved.
[0184]
In other words, the reliability can be improved by making all the blocks selected redundantly the processing target.
[0185]
In addition, as shown in FIG. 25B, the marker set selecting unit 94 sequentially starts from the marker set constituting the block on the scan direction side so that the block on the scan direction side in the frame can be changed to the processing target block 82. When a selected block appears in the previous frame and the processed block appears, the processing may be stopped there and the processing may be shifted to the next frame.
[0186]
For example, when the reference marker is selected from the marker candidates on the scanning direction side in the base marker pair selection unit 92 as described above, the markers M8, M10, and M11 are selected as the base marker pair as shown in FIG. However, in order to read from the lower block, a process of first extrapolating downward once to find a marker is performed. As a result, the markers M12 and M14 are detected as markers. Since these are regarded as a set of markers constituting one block, the blocks M8, M10, M14 and M12 are selected. Next, on the contrary, the upper block is selected and processed. Then, since it is known from the block address whether or not the block has already been processed, when the already processed block is found, the processing for this frame is stopped, so that the already processed block is not processed again. Can be omitted.
[0187]
As described above, by sequentially selecting from the marker set constituting the block on the scanning direction side of the frame, the processed block can be excluded from the processing target, so that the redundant processing can be omitted.
[0188]
Further, when the image pickup section 46 has an optical distortion or the like, the distortion is applied more to the outside than the center of the frame 60. Is selected in turn from the marker set that composes the data. First, the data of the block closer to the outer side is read, and then, if the data of the block closer to the center can be read, the data is overwritten. Can be higher.
[0189]
For example, when the code is recorded in double height, the data of the processing target block 82 is read in the order of 1 to 9 as indicated by the circled numbers in FIG. Here, the same data is recorded in the first block and the second block, but since the one block is located near the end of the frame 60, a reading error is highly likely to occur due to optical distortion. Then, after that, if the data of the second block is read again and overwritten, more accurate data can be obtained. Also, for example, even if the two blocks cannot be read due to noise or the like, the data of this block may have some errors since the data of the block is read from the first block first. It can be prevented from being read.
[0190]
In other words, since the closer to the outside of the frame, the greater the influence of distortion and the more the error increases, in this way, it is necessary to sequentially select from the marker set constituting the block near the end in the direction orthogonal to the scanning direction in the frame. Accordingly, if data in a block is sequentially read from the outside and overwritten, highly reliable data can be obtained without requiring an extra memory.
[0191]
Alternatively, when the reading of the selected block fails, the marker set selecting unit 94 may reselect a block having the same address.
[0192]
For example, as shown in FIG. 27A, when the middle three markers (not shown) are selected as a base marker pair in a double-height code and the processing target block 82 is read in order, When the block at the address A17 becomes the read failure block 116, the marker set is selected again so that the block having the same data (the same address) as the reselected block 118 is selected.
[0193]
A read error occurs and the read failure block 116 occurs, for example, when the address dot 18 cannot be read due to noise or when a marker cannot be found.
[0194]
As described above, when reading of a certain block has failed, by reselecting a marker set constituting another block having the same address, it is possible to reduce a reading error due to block omission.
[0195]
Next, a method of estimating the reading reference point of the data code 10 will be described.
[0196]
As shown in FIG. 27B, the markers 16 and the pattern dots 14 are arranged on the code line 120 in a straight line. That is, the true center of the marker 16 as a reading reference point of the data code 10 and the center of each dot of the pattern dot 14 are arranged on the code line 120. Therefore, by using the pattern dots 14 recorded in this predetermined format, it can be immediately determined whether or not the approximate center of the read marker is the correct true center.
[0197]
Further, by using a plurality of pattern dots 14, the accuracy of the required reading reference point can be improved. That is, since the format of the pattern dot 14 is determined, when the pattern dot 14 is detected, it can be discriminated whether the dot is really a dot at a position where the dot should be or a noise. Therefore, the center of all the dots of the pattern dot 14 at the desired position can be obtained, and the true center of the marker 16 can be obtained using the center positions of the plurality of dots. The accuracy of the position of the reading reference point can be improved.
[0198]
For example, as shown in FIG. 27C, if the pattern shape of each dot of the pattern dot 14 after the binarization processing is obtained, the format information is read on the read line 122 connecting the approximate centers of the markers 16. The dot is detected at the dot reading position 124 according to. Then, the center position 126 of the detected dot is calculated, and the true center of the marker serving as the reading reference point of the data code 10 can be calculated from these coordinates by linear regression.
[0199]
The accuracy of detecting the center position for each dot is about several pixels of an error, but the accuracy can be improved by preparing a plurality of pattern dots 14 for one marker 16.
[0200]
As described above, when estimating the data reading reference point using the pattern dots 14 recorded in the predetermined format, it is possible to immediately determine whether the read information is correct by comparing with the predetermined format. In addition, by using at least one or more pattern dots 14, the reference point estimation accuracy can be improved.
[0201]
When the data reading reference point, that is, the true center of the marker 16 is estimated using the pattern dots 14, an accurate data reading reference point using only the pattern dots 14 having a predetermined positional relationship from the approximate center of the marker is used. Is estimated.
[0202]
The pattern dots 14 having the predetermined positional relationship are, for example, pattern dots 14 between adjacent markers as shown in FIG. The estimation of the true center of the marker is performed one block at a time to deal with distortion. For example, when determining the true centers of the markers M8 and M10, the pattern dots 14 between them are used. When determining the true centers of the markers M10 and M11, the pattern dots 14 between them are determined. Used. In this case, since the true center of the center marker M10 is obtained from the pattern dots 14 on both sides, the average of the left and right blocks is used as shown in FIG.
[0203]
Alternatively, as shown in FIG. 28C, the pattern dots 14 having the predetermined positional relationship may be pattern dots 14 within a predetermined range including the pattern dots 14 outside the block. In this example, the true centers of M8, M10, and M11 are obtained using pattern dots in the ranges of L, M, and R, respectively.
[0204]
In this case, for example, if there is no optical distortion with respect to one data reading reference point to be obtained, that is, the true center of the marker 16, it is better to use as many pattern dots 14 as possible to obtain the accuracy. If there is no such optical distortion, it is preferable to obtain the true center of the marker 16 using the pattern dots 14 in a wide range as shown in FIG.
[0205]
On the other hand, in the case where there is optical distortion, errors accumulate as the distance from the marker 16 increases, and a large error occurs. Therefore, as shown in FIG. In addition, by limiting the range of the pattern dots 14 to be read (using only the pattern dots 14 near the marker), the reliability of the obtained data reading reference point is increased.
[0206]
As described above, by estimating an accurate data reading reference point using only the pattern dots 14 having a predetermined positional relationship from the approximate center of the marker, if there is no distortion, the range is increased and the number of dots is increased. Can improve the estimation accuracy. When there is distortion, estimation accuracy can be improved by limiting the range. Furthermore, there is an advantage that the processing is simplified by setting the range between the pair of markers.
[0207]
Further, when the pattern dots 14 between the markers are used, the data reading reference point can be estimated by employing a tree search technique that is widely used in general. That is, as shown in FIG. 29C, not only the pattern dots 14 are read on a line connecting the approximate centers of the marker pairs, but also the pattern dots 14 are read on a line connecting the eight neighborhoods of the approximate center. . That is, reading is performed nine times for each point. In such a case, all the dots of the pattern dots 14 cannot be read at the shifted position, and all of the dots can be read at the correct position. Therefore, as shown in FIG. The most frequent point (indicated by a circle in the figure) is defined as a data reading reference point. Alternatively, a more accurate reading reference point obtained by similarly performing reading using eight points in a narrower range near the reference point obtained as described above may be used.
[0208]
As described above, when the tree search method is employed, the data reading reference point can be determined without requiring complicated calculation.
[0209]
Further, in this case, instead of performing a brute force tree search, the pattern dots 14 may be read once between the approximate centers of the marker pairs, and the tree search may be limitedly performed according to the result.
[0210]
For example, as shown in FIG. 30A, when dots 1 and 10 are at the approximate center of the marker, dots 2, 3, 4, and 5 can be read, and dots 6, 7, 8, and 9 cannot be read. That is, when only the dots on the left side are correctly read, it can be determined that the approximate center (dot 1) on the left is a substantially correct position and the approximate center (dot 10) on the right is shifted. it can. Therefore, the tree search may be performed while leaving the approximate center on the left side as it is, and moving only the approximate center on the right side to the vicinity of eight.
[0211]
As shown in FIG. 30B, the pattern dots 14 are composed of dots 2, 6 shifted to the right, dots 3, 5, 7 at normal positions, and dots 4, 8 shifted to the left. However, when only the dots 4 and 8 shifted to the left cannot be read when these are read, it is understood that the approximate center position is shifted to the right. That is, the fact that the reading error has occurred in the dots 4 and 8 shifted to the left means that the dots 4 and 8 are shifted to the right as a whole. In such a case, the approximate centers of the dots 1 and 9 are shifted. When the tree search is continued, the points shifted to the left thereof may be intensively searched.
[0212]
Similarly, by inserting dots vertically displaced into the dot pattern 14 as shown in FIG. 7B, the displacement in the vertical direction can also be detected, so that the tree search is limited accordingly. It is possible to do.
[0213]
Then, when all the dots of the pattern dots 14 are detected almost uniformly, it means that the data reading reference point which is almost certain is detected.
[0214]
In this manner, the pattern dots are read at the dot read points determined by the approximate center of the marker pair and the format, and the amount and direction of the approximate center position are estimated based on the position of the dot where the reading error has occurred and its bias, and the marker pair is read. By performing a tree search by moving the approximate center of N in the vicinity based on the estimation result, the number of searches can be reduced as compared with a brute force tree search.
[0215]
Note that the pattern dots 14 do not necessarily have to be linearly arranged between the marker pairs, and it is only necessary that the positional relationship with the marker pairs be determined as a format.
[0216]
For example, as shown in FIG. 30C, when pattern dots 14 are arranged in a circle between or around markers (not shown) and the center thereof is used as a data reading reference point, a pattern r with a radius r If the format is such that the dots 14 are arranged, each dot is detected from the approximate center of the marker, and the center (indicated by x in the figure) is obtained. Then, the center (x, y) of the circle having the radius r is determined so that the sum of squares of the distances between the centers of these eight dots and the circle is minimized, and the obtained x and y are obtained. And This means that, in an image, a circle having a radius r is moved, and a position where the center of the obtained dot fits into the circle is searched for. If found, the center (x, y) of the circle is determined. This means that it is used as a data reading reference point. More simply, the center of gravity of these dots may be used as the center of a circle, that is, a data reading reference point.
[0219]
As described above, the pattern dot is detected at the dot reading point determined by the marker and the approximate center of the marker pair, the center of the detected pattern dot is calculated, and the relationship between the calculated dot center and the format is calculated. Since the reading reference point is estimated so as to minimize the determined predetermined error function, the data reading reference point is estimated using the centers of the plurality of pattern dots, and the accuracy is extremely high.
[0218]
As described above, in the marker center detecting section 56, as shown in FIG. 18, the pattern dot detecting section 126 selects the pattern dots 14 arranged between the markers of the marker set selected by the marker set selecting section 94. Is detected at the dot center determined by the approximate center of each marker and the format, and the center of each detected dot is calculated by the dot center calculation unit 128. Then, the error minimizing unit 130 estimates the reading reference point of each data dot of the data code 10 so as to minimize a predetermined error function determined by the relationship between the calculated dot center and the format, and reads the data. Output to the unit 42.
[0219]
Next, the pattern dot detection unit 126 will be described in detail.
[0220]
The dot detection unit 126 includes a black dot detection unit 132 that detects a black dot at a dot read point determined by the approximate center of the marker pair and the format. As shown in FIG. 31A, when a black dot is not detected at the dot reading point 134 at which the black dot should be detected, the black dot detection unit 132 In the drawing, black pixels are searched in the order indicated by 1 to 4, and if there is a black pixel, a search is performed so as to make it a dot. That is, each dot forming the pattern dot 14 is detected as a pixel value of a dot reading point satisfying the predetermined positional relationship from the approximate center of the marker. Therefore, when a black dot is not detected at a dot reading point at which a black dot is to be detected, it is regarded that the dot reading point has shifted, and the dot is searched while shifting one pixel at a time in the upper, lower, left, and right directions.
[0221]
As described above, even if the approximate center of the marker is calculated by shifting due to noise or the like, or the dot reading point 134 obtained by dividing the approximate center by a predetermined ratio due to distortion or inclination is calculated by shifting, the black in the vicinity is calculated. By searching for the dots, the pattern dots 14 can be reliably detected, and there is no decrease in accuracy due to a decrease in the number of detected dots.
[0222]
When a dot is detected in a pixel near the dot reading point 134 in this way, it is preferable to store the shift amount and add it as an offset from the next dot reading point 134.
[0223]
That is, for example, in FIG. 31B, when the dot indicated by the black circle on the left side in FIG. 31 is set as the calculated dot reading point 134, there is no black pixel, and therefore, a search is performed. When a dot is detected at a position shifted by one pixel to the left, the position shifted by one pixel to the left is stored as an offset. Then, even if the next dot reading point 134 is a point indicated by a white circle in the figure in the initial calculation, a point shifted by one pixel to the left from that point is read as the dot reading point 134.
[0224]
In other words, when a certain dot is detected with a shift, it is very likely that a neighboring dot is also detected with a shift. Reading the point to which the offset has been added requires less processing.
[0225]
As described above, when a certain dot of the pattern dot 14 is detected at a shifted position, a dot near the same is often shifted in the same manner, and therefore, a position shifted from the dot reading point 134 calculated. In the case where a dot is detected, the dot reading point 134 is shifted in advance using the deviation as an offset, thereby improving search efficiency. Also, if the dot detection point is shifted due to the distortion, unless the dot reading point 134 is shifted in accordance with the amount of distortion, the shift accumulates and eventually the dot cannot be detected. By doing so, this can be prevented.
[0226]
As shown in FIG. 18, the marker center detecting unit 56 further includes a marker center recalculating unit 136 that recalculates the marker center based on the data reading reference point obtained by the error minimizing unit 130. May be.
[0227]
That is, each dot forming the pattern dot 14 is detected as the pixel value of the dot reading point 134 that satisfies the predetermined positional relationship from the approximate center of the marker. Therefore, when only a few dots are detected, it is assumed that the approximate center of the marker is shifted, and the approximate center position of the marker is recalculated using only the dots that can be read. The dot is detected by reading the pixel value of the dot reading point 134 satisfying the predetermined positional relationship again from the approximate center of the marker thus obtained.
[0228]
For example, the approximate center of the marker is detected as indicated by a cross on the upper side of FIG. 31C, and the first reading of the pattern dot 14 is performed. At this time, if the right center marker is misaligned and detected, the dots closer to the left marker approximate center can be read, but the dots closer to the right marker approximate center are missing. Would. When the center position of the dot read in this way is calculated by the dot center calculation unit 128 and the data reading reference point is estimated by the error minimizing unit 130, the estimated data reading reference point has a small number of detected dots. Therefore, there are many errors. Therefore, the marker approximate center recalculation unit 136 causes the pattern dot detection unit 126 to detect the pattern dots 14 again using the data reading reference point as a new marker approximate center. As a result, as shown in the lower part of the figure, all of the pattern dots 14 are detected, and the data reading reference point can be estimated with high accuracy.
[0229]
As described above, by recalculating the approximate center from several pattern dots detected in the first reading, the accuracy of the approximate center is improved, and the number of dots to be redetected can be increased.
[0230]
Further, since the black dot detection unit 132 only detects black dots, a point that was originally white due to dirt or the like may be detected as a black dot. Therefore, it is also possible to configure the pattern dot 14 by a signal + error detection code, perform error detection processing from the detected black dot signal, and calculate the dot center only for the point that was originally a black dot. .
[0231]
That is, as shown in FIG. 18, in the pattern dot detection unit 126, the detection result of the black dot detection unit 132 is input to the buffer 138 and is arranged as a signal. That is, if the black dot is set to “1” and rearranged, for example, to 1,0,0,1,1,0,0, the error can be detected because it is a signal. Therefore, the error detection unit 140 performs an error detection, and if there is a black dot that is erroneously detected, the selection unit 142 determines that the black dot is not used, that is, is not supplied to the dot center calculation unit 128. The output of the unit 132 is selectively supplied to the dot center calculation unit 128.
[0232]
As described above, after the dots are detected, by selecting only correct dots from the detected dots by error detection, the position where the dots are correctly detected can be known even when the pattern dots 14 have information. Therefore, it is possible to prevent the accuracy of the data reading reference point from lowering due to noise.
[0233]
Next, the dot center calculation unit 128 will be described.
[0234]
When dots printed in a circle are roughly imaged by a CCD camera and binarized, the obtained pattern is no longer a circle, so that the dot center cannot be easily calculated.
[0235]
When ideal binarization is performed, as shown in FIG. 32A, if half of a pixel touches a dot, that pixel is turned on. Therefore, the dot center position for a certain pixel to be turned on is determined. Existence range can be defined. That is, when the trajectory of the dot center when half of the pixel touches the dot is defined as a critical line, the pixel is turned on when the dot center is inside (the target pixel side), and turned off when it is outside. Become. Therefore, when a certain pattern occurs, if the existence range of the dot center position is determined for the turned-on pixels in the pattern and the surrounding off-pixels, the dot center position can be estimated as the overlapping area. .
[0236]
For example, when one dot is imaged with a size of about two vertical pixels and three horizontal pixels, and ideal binarization is performed, the pixel pattern that appears is indicated by the circled number 1 in FIG. There are only seven types as indicated by .about.7, and the region where the dot center position exists can be estimated as shown in FIG.
[0237]
The dot center calculation unit 128 holds the relationship between such a pattern shape and the dot center existence region as a table.
[0238]
In this manner, the existence area of the center position can be obtained from the pattern shape when the dot whose shape is known is binarized. Therefore, by setting the point in this area as the center representative point, even in the case of coarse sampling, The dot center can be estimated in a super-resolution manner.
[0239]
On the other hand, when one dot is imaged with 2 pixels × 3 pixels as described above, there are only seven patterns, but when imaging with a higher resolution of 3 pixels × 3 pixels or 4 pixels × 3 pixels, As the resolution increases, the pattern that appears increases exponentially, and a very large capacity memory is required to hold the table as described above.
[0240]
Therefore, the dot center calculation unit 128 may calculate the center of gravity of the imaged dot and use the calculated center as the dot center. In this case, it is not necessary to hold the relationship between the dot shape and the representative point in a table, so that no memory is required. Also, since it is not necessary to decide how many pixels × how many pixels to image one dot, it has scalability that can cope with a change in the magnification of the optical system or a change in the diameter of the dot. There is also an effect.
[0241]
When calculating the center of gravity, as shown in FIG. 33 (A), a predetermined size, for example, a 4 × 4 mask 144 is applied to the dot read point 134, and only the pixels contained in the dot are read. The center of gravity 146 may be calculated by using this.
[0242]
Here, the calculation of the center of gravity will be described using the example of FIG.
[0243]
First, in the same figure, there are 11 black pixels in the mask, and when viewed in the row direction, there is one black pixel in a row located one row above the row of the dot reading points 134. The row weight coefficient “−1” of this row is multiplied by “1 (pixel)” and temporarily stored. Similarly, since there are four black pixels in the row located one row below the row of the dot reading point 134, the row weighting factors "1" and "4" are multiplied and added to the above temporary storage result. Further, the row below the second row is similarly multiplied by the row weighting factor “2” to the three black pixels, and the result “6” is added to the temporary storage result. By dividing the addition result obtained in this way by the number of black pixels, “9/11” is obtained, which corresponds to a shift in the y direction from the reading point 134 of the center of gravity 146.
[0244]
The same calculation is performed for the x direction, and “(−1 × 3 + 1 × 3 + 2 × 1) / 11 = 2/11” is a value corresponding to the displacement of the center of gravity 146 from the reading point 134 in the x direction. .
[0245]
As described above, by limiting the region contributing to the center calculation by the mask 144 having an appropriate size, the influence of the error due to noise (stain) on the estimation of the reading reference point can be reduced.
[0246]
In this case, in order to reduce the influence of noise, the size of the mask 144 is preferably as close as possible to the size of the dot. However, if the size of the mask 144 is the same as the size of the dot, If the dot reading point 134 is not detected at a position close to the center of gravity, the mask is applied to the biased position, and the pixels contributing to the calculation of the center of gravity are also biased, and the error of the calculated center of gravity is very large. Become.
[0247]
Therefore, as shown in FIG. 33B, first, a mask 144 is applied at a position based on the dot reading point 134 to detect dot deviation in the mask, and as shown in FIG. 33C. If the center of gravity is calculated after moving the mask 144 in a direction to eliminate the deviation, accurate calculation of the center of gravity becomes possible even if the size of the mask 144 is adjusted to the size of the dot.
[0248]
Here, the moving amount of the mask 144 in the horizontal (vertical) direction is “「 ”when at least one black pixel exists in a column (row), and is“ x ”when there is no black pixel in FIG. The calculation is performed with reference to a table as shown in FIG.
[0249]
This will be specifically described below with reference to FIGS. 33 (B), (C), and (D).
[0250]
FIG. 33B shows an example in which the reading point 134 is shifted to the lower left, and nine black pixels are included in the mask.
[0251]
First, in the row direction, three, three, and zero black pixels are detected one row above, one row below, and two rows below the row of the reading point 134, respectively. In this case, since there is no black pixel in the row two rows below, the mask position is shifted up one row.
[0252]
Similarly, in the column direction, 0, 3, and 3 black pixels are detected on the left, right, and right sides of the column of the reading point 134, respectively. At this time, the mask 144 is shifted to the right by one column.
[0253]
FIG. 33D summarizes these relationships in a table.
[0254]
In this way, the mask 144 is applied with the detected position of the dot as a reference to detect the bias of the dot in the mask, the mask 144 is moved in a direction to eliminate the bias, and then the center is calculated. By determining with a pass, the mask size can be reduced in accordance with the dot size, so that less memory is required and errors due to noise are further reduced.
[0255]
Further, as described above, when the existence region at the center position is obtained from the pattern shape obtained by binarizing a dot having a known shape, the width of the center existence region greatly differs depending on the pattern. Therefore, as shown in FIG. 32C, the center representative point may be weighted according to the size of the center existing area, and the certainty may be reflected in the marker true center detection.
[0256]
For example, in the case of the pattern indicated by the circled number 3 in FIG. 32B, the dot center existing area is a very small area, and thus has very high reliability. In the case of the pattern shown, the reliability is very low because this area is very large. Therefore, a weight is assigned to each area corresponding to the area of the center existence area. For example, if the weight of the center representative point in the case of the pattern indicated by the circle number 4 is “1”, “1” is “2.5”, “2” is “1.5”, and “3” is “3”. The weights are assigned to “5.0”, “1.3” for the 5 pattern, “1.3” for the 6 pattern, and “1.5” for the 7 pattern. By weighting the central representative point in this way, the reliability of the required data reading reference point can be calculated with reliability corresponding to the shape of this dot.
[0257]
As described above, the estimation accuracy can be improved by estimating the data reading reference point by weighting the reliability of the central representative point that differs depending on the detected dot pattern shape.
[0258]
In addition, as shown in FIG. 34A, the error minimizing unit 130 calculates the dot center point (centroid representative point) actually calculated by the dot center detecting unit 128 based on the approximate center of the marker as described above. The data reading reference point is determined so that an error between the position 150), the estimated data reading reference point (in this case, the marker true center 152) and the dot estimated center point determined based on the format is minimized. In this case, by using the least squares method, the data reading reference point can be calculated with extremely high accuracy.
[0259]
Here, a method of calculating the data reading reference point (in this case, the true center of the marker) using the least square method will be briefly described.
[0260]
Now, as shown in FIG. 34B, M1 'is the true center of the left estimated marker, M2' is the true center of the right estimated marker, Di is the i-th dot center of the pattern dot 14, and di is i of the pattern dot 14. This is the division ratio between the dots of the marker.
[0261]
The dot center Di ′ obtained from the estimated marker true centers M1 ′ and M2 ′ is
(Equation 2)
Figure 0003568508
[0262]
Using the estimated error εi with the dot pattern center Di, the sum of squares E of the error is
(Equation 3)
Figure 0003568508
It is expressed as
[0263]
Therefore, M1 ′ and M2 ′ that minimize this E are obtained.
[0264]
(Equation 4)
Figure 0003568508
[0265]
here,
(Equation 5)
Figure 0003568508
After all,
From (1)
Ax1 '+ Bx2' = P (3)
From (2)
Bx1 '+ Cx2' = Q (4)
From (3) × C- (4) × B
(Equation 6)
Figure 0003568508
From (4) × A- (3) × B
(Equation 7)
Figure 0003568508
[0266]
In the same way
(Equation 8)
Figure 0003568508
After all,
[0267]
(Equation 9)
Figure 0003568508
The position coordinates (x1 ′, y1 ′) and (x2 ′, y2 ′) of the estimated marker true centers M1 ′ and M2 ′ are calculated.
[0268]
In this manner, the uncertainty of the calculated center position of each pattern dot is canceled by minimizing the sum of the squares of the shift amounts by the least square method, and the estimation accuracy of the data reading reference point can be improved. .
[0269]
Further, as a method of simplifying the mathematical expression, there is a method described below.
[0270]
Now, as shown in FIG. 35A, in the coordinate system on the recording medium, Ddi (ui) is the designed dot position, U is the first unit vector, O is the origin position, and FIG. As shown in (B), in the coordinate system on the imaging plane, Doi (xi, yi) is the observed dot position, U ′ (ux ′, ui ′) is the first estimated unit vector, and O ′ (ox ′). , Oy ′) is the estimated origin position, and Doi ′ (xi, yi) is the estimated dot position.
[0271]
Here, the designed dot position, the estimated reference point position, and the estimated dot position Doi ′ obtained from the unit vector are given by the following equations.
[0272]
(Equation 10)
Figure 0003568508
[0273]
Using the estimated error εi with respect to the observed dot position Doi, the sum of squares E of the error is
(Equation 11)
Figure 0003568508
It is expressed as
[0274]
Therefore, U ′ and O ′ that minimize E are obtained.
[0275]
(Equation 12)
Figure 0003568508
[0276]
Here, in order to obtain U ′ and O ′ independently,
(Equation 13)
Figure 0003568508
Then, the expressions (5) and (6) are as follows.
[0277]
[Equation 14]
Figure 0003568508
[0278]
Similarly,
(Equation 15)
Figure 0003568508
[0279]
In this way, U ′ and O ′ can be obtained with a small number of calculations.
[0280]
Here, an example in which a marker pair and ten pattern dots are arranged in a relationship as shown in FIG. 36 will be described.
[0281]
First, the dot reading points Ui of each pattern dot are 7, 10, 13, 16, 19, 24, 27, 30, 33, and 36 from the approximate center of the left marker, respectively, and N = 10.
(Equation 16)
Figure 0003568508
Is 21.5.
[0282]
However, if the second dot from the left (Ui = 10) is not detected by the pattern dot detection unit 126 due to a missing or dirty dot, N is 9 and Ui is 7, 13, 16, and 19, 24, 27, 30, 33 and 36. Therefore, in this case, since N = 9, the solution of the above equation (11) is 22.78.
[0283]
That is, when all the ten dots detected by the pattern dot detection unit 126 are detected, the dot is found in the denominator of the above equations (7) and (9).
[Equation 17]
Figure 0003568508
Is fixed at 902.5, but when some dots are not detected, the calculation is required each time.
[0284]
On the other hand, the present dot code is often printed on a medium such as paper, and it is conceivable that dots may be missing depending on the printing conditions and handling after printing, so that not all 10 dots are actually detected. There is a possibility.
[0285]
Therefore, a means for calculating the above equation (12) is required in the apparatus. However, since this calculation is a process of adding a square value, the value of each term is large, and Considering the accuracy, the number of bits of the register must be considerably large, and the scale of the hardware when actually configuring the device also increases.
[0286]
Therefore, when there is a dot that is not detected by the dot detection, the dot read point is set as the dot center of the dot. Then, processing is performed assuming that all dots have been detected.
[0287]
By doing so, N = 10 and the solution of the above equation (12) is also 902.5, so that all the denominators of the above equations (7) to (10) can be fixed values.
[0288]
That is, not only is there no need for a means for performing the calculation of the expression (12), but also the division of the expressions (7) to (10) is division by a constant, which can be replaced by multiplication of the reciprocal. It will be suitable.
[0289]
Hereinafter, this will be described with reference to the flowchart in FIG.
[0290]
First, the reading points of the ten pattern dots are calculated from the approximate center of the marker pair (step ST1). Here, not only black dots but also white pixels between them are added as reading points. Then, the dot detection counter n and the detection error counter err are reset to "0" (step ST2).
[0291]
Next, each of the 30 reading points is sequentially processed. It is determined whether the point is a point on a black dot (step ST3). If not, whether the pixel is white or black is determined. Is determined (step ST4). If it is black, the non-dot point is read as black, so it is judged to be incorrect and the detection error counter err is counted up (step ST5). If the pixel is white, it is not counted up. Then, the number of read pixels is incremented, that is, the dot detection counter n is counted up (step ST6), and it is determined whether or not all the pixels have been read based on whether or not the dot detection counter n is "30". (Step ST7). If the number of pixels to be processed is less than 30, the process returns to step ST3 to process the next reading point.
[0292]
On the other hand, when it is determined in step ST3 that the pixel on the black dot has been read, it is determined whether the dot has been read correctly by determining whether the read pixel is black (step ST8). If the dot is read correctly, the center of gravity of the connected pixel is directly calculated (step ST9).
[0293]
If it is determined in step ST8 that the dot could not be read correctly, a black pixel is searched for in the four neighboring pixels of the reading point (step ST10). If it is found (step ST11), the process proceeds to step ST9. , Connected pixels are calculated. If no dot is found, the dot read point is set as the dot center (step ST12), and the detection error counter err is counted up (step ST13). Then, the process proceeds to step ST6, where the dot detection counter n for counting the number of read pixels is counted up. In step ST7, whether or not all the pixels have been read is determined by the dot detection counter n being “30”. Judgment is made according to whether or not. If the number of pixels to be processed is less than 30, the process returns to step ST3 to process the next reading point.
[0294]
When reading of all the pixels is completed in this way, the total value of the number of non-dot pixels that are black and the number of dot positions and the number of black pixels that did not exist in the vicinity of the dot position 4, ie, the detection error counter The value of err is compared with a threshold value (MAX_ERR) (step ST14). Incidentally, it has been found that the threshold value MAX_ERR is appropriately about 25.
[0295]
If the value of the detection counter err is equal to or smaller than the threshold, the data reading reference point is calculated by the least squares error method using the centers of the ten dots (step ST15). It is determined that the data reading reference point cannot be detected with the desired accuracy in the pattern code, and the process proceeds to the next marker pair.
[0296]
As described above, when the data reading reference point is calculated, the data reading unit 42 first assigns the address dot 18 to the address dot reading unit 154 based on the data reading reference point, as shown in FIG. The block address is obtained by reading, and the data dot of the block 20 is read by the data reading unit 156. Then, the read data is supplied to the reproducing unit 44 and reproduced and output.
[0297]
Here, the address dot reading unit 154 includes an address dot reading unit 158, an error correction unit 160, a determination unit 162, and an address determination unit 164.
[0298]
The address reading unit 158 detects the address dot 18 by dividing the true center between the upper and lower adjacent markers, and reads the address. If the read address is the address of a block that has already been read, the processing is performed. And the process proceeds to the next frame. Note that the tree search technique can be applied to the reading of the address dots as well as the reading of the pattern dots 14 described above.
[0299]
When a CRC (error detection) code, a BCH (error correction) code, or the like is attached to the address dot 18, the error correction unit 160 determines whether the address dot reading unit 158 has read a correct address or reads the address. Correct the address given.
[0300]
The determination unit 162 determines whether the address is within the range of the address of the data handled by the system. For example, in a system that handles only data from addresses 0 to 100, addresses such as -5 and 200 are excluded. Alternatively, if it is known that only 10 blocks are included in one frame and addresses are recorded in order, for example, when addresses 2, 3, 5, 6, 25, and 9 are obtained, From the continuity and the like, it is found that the address 25 is out of the range, and the data of the block at the address 25 is excluded.
[0301]
The address determining unit 164 provides the data reading unit 156 with the address determined to be correct by the determining unit 162.
[0302]
When an error is detected in the address dot 18 read by the address dot reading unit 158, the error correction unit 160 can calculate and correct the address of that block from the address of a surrounding block. By utilizing the function, the address dot reading unit 158 may read the address with arbitrarily omitting the address and determine the addresses of at least two or more blocks at the same time. That is, when the blocks are recorded in the order of the addresses, the address of a certain block can be easily estimated from the addresses of the surrounding blocks. Accordingly, the address dot reading process can be reduced. Furthermore, as shown in FIG. 9C, the address dots 18 can be thinned and recorded.
[0303]
By the way, in the left address dot 18 of each block 20 forming a code, the address of the block is recorded as shown in FIG. The address of the next block is recorded in the rightmost address code of the code recorded with the double height as described above. Therefore, by recording the address of the block in the address dot 18 on the right side of the last block 166, the last block 166 can be detected by comparing the contents of the left and right addresses of the block 20 at the time of reading. .
[0304]
Alternatively, as shown in FIG. 38B, a relative relationship indicating the last block address may be provided between the addresses of the read block pair, and the last block may be detected by comparing the contents of the address of the block pair during reading. it can.
[0305]
For example, when 68 blocks are recorded in double height, if the addresses 1 to 34 are arranged in a line and the addresses 35 to 68 are arranged in a line, and these are recorded in double, that is, in double height, the frame image to be captured first Since the blocks at addresses 1 and 35 are detected adjacent to each other, one row is composed of 35-1 blocks, that is, 34 blocks. I understand. Therefore, the amount of memory to be secured and the number of blocks to be processed before finishing the processing can be determined first, so that there is an effect that unnecessary processing is eliminated.
[0306]
Of course, these are the same even when they are not recorded in double height.
[0307]
As described above, the format of the address dot 18 is a code in which the address of the adjacent block has a predetermined relationship with the number of blocks of the entire code, and the total number of blocks is obtained from the adjacent address. Can be assigned. Further, since the last block can be detected, useless processing can be omitted.
[0308]
Alternatively, the address dots 18 may be recorded in a format such that the total number of blocks is known, for example, 1/68.
[0309]
On the other hand, the data reading unit 156 is configured to equally divide each side of a region surrounded by connecting four data reading reference points, cut a mesh, and read a data code as a data reading point. As shown in FIG. 38C, the pixel at the data reading point 168 may be read differently from the actual data due to noise or the like.
[0310]
Therefore, the data at the data reading point 168 is not used as read data as it is, but pixels around eight points around the data reading point 168 are used, and a predetermined calculation formula, for example, an average is calculated for all nine pixels. Then, the data of this pixel is determined. For example, even if the pixel at the data reading point 168 is blank, if the surrounding eight pixels are black, the data at the data reading point 168 is 8/9, which is larger than 0.5. It can be read as a black pixel, that is, “1”.
[0311]
Further, the predetermined calculation formula may be a weighted average or the like. For example, a slightly larger area, that is, 24 pixels in the vicinity, may be multiplied by 2 for the data of the inner 8 pixels, and multiplied by 1 for the data of the outer 16 pixels, and the average may be calculated. .
[0312]
As described above, the vicinity of the reading point calculated from the data reading reference point is also read at the same time, and the attribute of the data reading point is determined by a predetermined calculation formula.
[0313]
Although the present invention has been described based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications and applications are possible within the scope of the present invention.
[0314]
【The invention's effect】
As described above in detail, according to the present invention, a block in which the influence of optical distortion is small is selected from a plurality of blocks in a captured image and read, so that a reading error Can be lowered. Therefore, it is possible to provide an information reproducing system capable of reading a code pattern recorded at high density and reproducing information correctly.
[Brief description of the drawings]
FIGS. 1A to 1C are diagrams showing examples of two-dimensional codes (dot codes) recorded optically readable on an information recording medium.
FIGS. 2A to 2E are diagrams showing examples of marker arrangement when blocks are formed as shown in FIG. 1C;
FIGS. 3A and 3B are diagrams illustrating code examples when markers are omitted in stripes, respectively.
FIG. 4 is a diagram illustrating a code example when markers are omitted in a checkered pattern;
FIGS. 5A to 5C are diagrams showing examples of pattern dots, respectively.
FIG. 6A is a diagram for explaining pattern dot modulation, and FIG. 6B is a diagram showing another example of a pattern dot.
FIGS. 7A and 7B are diagrams showing examples in which recording points of some pattern dots are provided with a phase shift. FIG.
FIGS. 8A and 8B are diagrams illustrating an example of an address dot, and FIGS. 8C and 8D are diagrams illustrating different recording examples.
FIGS. 9A to 9C are diagrams illustrating still another example of recording of address dots.
FIG. 10 is a block diagram of an information reproducing system according to an embodiment.
11A to 11D are diagrams for explaining an erosion process.
FIG. 12 is a diagram for explaining an erosion process and a labeling process.
FIGS. 13A to 13C are diagrams for explaining a method of extracting a marker center part.
14A is a diagram for explaining a streak process, and FIG. 14B is a diagram for explaining another method of a marker extraction process.
FIG. 15A is a diagram for explaining a case in which processing of a frame in marker extraction processing is stopped, and FIGS. 15B and 15C are diagrams for explaining a method of calculating a marker approximate center. .
FIGS. 16A and 16B are diagrams for explaining a method of correcting the approximate center when a marker is lost at a frame end, and FIG. 16C is a diagram illustrating another example of such correction. It is a figure showing a table used.
17A is a diagram for explaining a marker for performing a process of correcting the approximate center position in a frame, FIG. 17B is a diagram showing a relationship between a marker and a pattern dot, and FIGS. It is a figure for explaining a marker existence field.
FIG. 18 is a block diagram of a marker center detection unit in FIG. 10;
FIGS. 19A to 19C are diagrams for explaining calculation of a marker position by extrapolation;
FIG. 20A is a diagram for explaining a base marker pair, and FIGS. 20B and 20C are diagrams for explaining a double height.
FIGS. 21A and 21B are diagrams for explaining a method of selecting a reference marker when a base marker pair is selected, and FIG. 21C is a diagram illustrating a case where a marker candidate is found on only one side of the reference marker. FIG. 9 is a diagram for explaining a method of searching for an adjacent marker.
22A is a diagram for explaining the approximate center of a virtual marker, and FIGS. 22B and 22C are diagrams illustrating a method of reselecting a base marker pair when two or more base marker pairs can be selected, respectively. FIG.
FIGS. 23A and 23B are diagrams illustrating a method of reselecting a base marker pair when a code is skewed.
FIGS. 24A and 24B are diagrams for explaining selected marker sets and their storage methods when blocks are not aligned, and FIGS. 24C and 24D are diagrams for explaining how the blocks are aligned; FIG. 9 is a diagram for explaining a selected marker set and a storage method of the selected marker set when the marker set is performed.
FIGS. 25A and 25B are diagrams for explaining a method of selecting a marker set for selecting a processing target block;
26A is a diagram for explaining a method of reading a block when a reference marker is selected from marker candidates on the scanning direction side, and FIG. 26B is a diagram for explaining a method of reading a block when there is optical distortion or the like; FIG. 9 is a diagram for explaining a reading order.
27A is a diagram for explaining block reselection processing when reading of a selected block has failed, and FIG. 27B is a diagram illustrating a positional relationship between a marker 16 and a pattern dot 14; (C) is a diagram showing the relationship between the dot reading position and the dot center position.
28A and 28B are diagrams for explaining a method of estimating a data reading reference point using a pattern dot from the approximate center of a marker, and FIG. 28C is a diagram for explaining another estimating method; FIG.
FIGS. 29A and 29B are diagrams for explaining still another data reading reference point estimation method, and FIGS. 29C and 29D are diagrams for explaining a tree search method; .
FIGS. 30A and 30B are diagrams for explaining a limited tree search, and FIG. 30C is a diagram for explaining another arrangement of pattern dots.
31A is a diagram for explaining the operation of the black dot detection unit, FIG. 31B is a diagram for explaining another operation of the black dot detection unit, and FIG. FIG. 5 is a diagram for explaining an operation of a calculation unit.
FIGS. 32A and 32B are diagrams for explaining an operation of estimating a dot center position existence region in a dot center calculation unit, and FIG. 32C is a diagram illustrating reliability of a dot center position existence region and a center representative point. It is a figure for explaining nature.
FIG. 33 (A) is a diagram for explaining the center of gravity calculation as still another center calculation method in the dot center calculation unit, and FIGS. 33 (B) to (D) explain another method of calculating the center of gravity. FIG.
34A and 34B are diagrams for explaining a method of calculating a data reading reference point using the least squares method.
35A is a diagram illustrating a coordinate system on a recording medium, and FIG. 35B is a diagram illustrating a coordinate system on an imaging surface.
FIG. 36 is a diagram illustrating a relationship between a marker pair and ten pattern dots.
FIG. 37 is an operation flowchart in a case where, when there is a dot that is not detected by dot detection, a dot read point is set as the dot center of the dot, and processing is performed assuming that all dots have been detected.
FIGS. 38A and 38B are diagrams showing an example of the arrangement order of blocks and recorded contents of block addresses at that time, and FIG. 38C is a diagram for explaining a data dot reading operation; is there.
[Explanation of symbols]
10: Data code, 12: Pattern code, 14: Pattern dot, 16: Marker, 18: Address dot, 20: Block, 22: Point, 24: Dot position reference point, 26: Guide code, 28: Inversion code, 30 ... Correction code, 32: Fixed pattern, 34: Information recording medium, 36: Dot code, 38: Image input unit, 40: Data reading reference point determination unit, 42: Data reading unit, 44: Data reproduction unit, 46: Imaging 48, equalizing and binarizing unit, 50: marker extracting unit, 52: marker approximate center calculating unit, 54: marker detecting unit, 56: marker center detecting unit, 58: marker existing area, 60: frame, 62 ... Central part of marker, 64 ... Area where marker may be present, 66 ... Center of gravity, 68 ... Circumscribed rectangle, 70 ... Center point of circumscribed rectangle, 72 ... Frame end, 74: Approximate center of marker detected by displacement due to loss, 76: Correct marker approximate center, 78: Approximate center correction area, 80: Marker partially missing at frame end, 82: Processing block, 84 ... Marker pairs, 86: Reference marker selection section, 88: Marker existence area calculation section, 90: Marker candidate detection section, 92: Base marker pair selection section, 94: Marker pair selection section, 96: Reference marker, 98: Pair Marker existing area, 100: paired marker, 102: false marker, 104: extrapolated vector (exv), 106: marker search area, 108: corrected extended vector, 110: base marker pair, 112: field of view of imaging unit, 114: area , 116: read failure block, 118: reselection block, 120: code line, 122: read line, 124: dot read position 126: dot center position, 128: dot center calculation unit, 130: error minimization unit, 132: black dot detection unit, 134: dot reading point, 136: marker approximate center recalculation unit, 138: buffer, 140: error Detecting unit, 142 selecting unit, 144, mask, 146, black pixel barycenter in mask, 150, barycentric representative point position, 152, estimated true center of marker, 154, address dot reading unit, 156, data reading unit, 158 .., An address dot reading unit, 160, an error correction unit, 162, a determination unit, 164, an address determination unit, 166, a last block, 168, a data reading point.

Claims (5)

再生されるべき情報のデータに相当するデータコードを含むブロックを複数個配置したコードが光学的に読み取り可能に記録された情報記録媒体から、前記コードを光学的に読み取って前記情報を再生する情報再生システムにおいて、
前記コードを撮像する画像入力手段と、
前記画像入力手段で撮像された画像から前記データを読み取るデータ読み取り手段と、
前記データ読み取り手段で読み取られたデータから前記情報を再生する再生手段と、
を具備し、
前記データ読み取り手段は、前記画像入力手段で撮像された画像における複数個の前記ブロックの中から光学的ディストーションの影響が小さいブロックを選択して読み取るように構成されたことを特徴とする情報再生システム。
Information for optically reading the code from an information recording medium on which a code including a plurality of blocks each including a data code corresponding to data of information to be reproduced is recorded so as to be optically readable, and reproducing the information; In the playback system,
Image input means for capturing the code,
Data reading means for reading the data from the image taken by the image input means,
Reproducing means for reproducing the information from the data read by the data reading means;
With
An information reproducing system configured to select and read a block having a small influence of optical distortion from a plurality of blocks in the image captured by the image input unit. .
前記データ読み取り手段は、前記画像入力手段で撮像された画像の中央よりのブロックを選択して読み取るように構成されたことを特徴とする請求項1に記載の情報再生システム。2. The information reproducing system according to claim 1, wherein said data reading means is configured to select and read a block from the center of an image taken by said image input means. 前記コードは、同じデータ内容を有する前記ブロックを複数個含んで構成され、前記画像入力手段で撮像される一つのフレームに、前記同じデータ内容を有するブロックが複数個含まれるとき、
前記データ読み取り手段は、前記同じデータ内容を有する複数個のブロックの中から光学的ディストーションの影響が小さいブロックを選択して読み取るように構成されたことを特徴とする請求項1又は2に記載の情報再生システム。
The code is configured to include a plurality of blocks having the same data content, and when one frame captured by the image input unit includes a plurality of blocks having the same data content,
3. The data reading unit according to claim 1, wherein the data reading unit is configured to select and read a block having a small influence of optical distortion from the plurality of blocks having the same data content. Information reproduction system.
前記データコードは、前記ブロックのアドレスを示すアドレスドットを更に含み、前記同じデータ内容を有するブロックは、前記ブロックのアドレスも同じであることを特徴とする請求項3に記載の情報再生システム。4. The information reproducing system according to claim 3, wherein the data code further includes an address dot indicating an address of the block, and the blocks having the same data content have the same address of the block. 前記画像入力手段は、手動でスキャンされる前記コードを連続して撮像するように構成されたことを特徴とする請求項1乃至4の何れかに記載の情報再生システム。The information reproducing system according to any one of claims 1 to 4, wherein the image input unit is configured to continuously capture the code that is manually scanned.
JP2001377341A 2001-12-11 2001-12-11 Information reproduction system Expired - Fee Related JP3568508B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001377341A JP3568508B2 (en) 2001-12-11 2001-12-11 Information reproduction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001377341A JP3568508B2 (en) 2001-12-11 2001-12-11 Information reproduction system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP11124853A Division JP2000030016A (en) 1999-04-30 1999-04-30 Information recording medium and information reproducing system

Publications (2)

Publication Number Publication Date
JP2002197410A JP2002197410A (en) 2002-07-12
JP3568508B2 true JP3568508B2 (en) 2004-09-22

Family

ID=19185340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001377341A Expired - Fee Related JP3568508B2 (en) 2001-12-11 2001-12-11 Information reproduction system

Country Status (1)

Country Link
JP (1) JP3568508B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8189923B2 (en) 2005-04-15 2012-05-29 Kenji Yoshida Information input output method using a dot pattern
KR101428054B1 (en) 2007-12-13 2014-08-07 주식회사 엘지씨엔에스 Media image detection apparatus and method, and media handling system using the same
JP5862623B2 (en) * 2013-08-08 2016-02-16 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
MX2020001107A (en) * 2017-07-28 2020-10-28 Coca Cola Co Method and apparatus for encoding and decoding circular symbolic codes.
JP2019144024A (en) * 2018-02-16 2019-08-29 アキュイティー株式会社 Motion capture method and motion capture system

Also Published As

Publication number Publication date
JP2002197410A (en) 2002-07-12

Similar Documents

Publication Publication Date Title
JP2952170B2 (en) Information reproduction system
US5898166A (en) Information reproduction system which utilizes physical information on an optically-readable code and which optically reads the code to reproduce multimedia information
US10636165B2 (en) Information processing apparatus, method and non-transitory computer-readable storage medium
US5825947A (en) Optical reproducing system for multimedia information recorded with code data having function for correcting image reading distortion
US9892300B2 (en) Two-dimensional code
KR101235226B1 (en) Image processor and image processing method and recording medium
JP5527213B2 (en) Image orientation determination apparatus, image orientation determination method, and image orientation determination program
CN104781835B (en) QR code
CN102714697A (en) Image processing device, image processing method, and program for image processing
US7380718B2 (en) Method for reading out symbol information and device for reading out symbol information
US9256792B2 (en) Image processing apparatus, image processing method, and program
JP4296617B2 (en) Image processing apparatus, image processing method, and recording medium
JP3568508B2 (en) Information reproduction system
JP2000030016A (en) Information recording medium and information reproducing system
JP6785546B2 (en) Two-dimensional code analysis method, two-dimensional code analysis device, and two-dimensional code analysis program
JP4197768B2 (en) Information reading system
JP3321936B2 (en) Moving object detection device
JP3519071B2 (en) Information reproduction system
JP2002197408A (en) Information reproduction system
JP2003050110A (en) Three-dimensional shape data producing system and method, program and recording medium
JP7263983B2 (en) Photography omission detection device and photography omission detection method
JP2003196588A (en) Information reproducer, and method of reproducing information
JP6952846B2 (en) Two-dimensional code
JP2006215655A (en) Motion vector detection method, motion vector detection device, motion vector detection program, and program recording medium
JP2010211699A (en) Image processor and image processing program

Legal Events

Date Code Title Description
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: 20040608

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040615

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

Free format text: PAYMENT UNTIL: 20080625

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees