JP4397866B2 - Two-dimensional pattern reading device, two-dimensional pattern reading method - Google Patents
Two-dimensional pattern reading device, two-dimensional pattern reading method Download PDFInfo
- Publication number
- JP4397866B2 JP4397866B2 JP2005235075A JP2005235075A JP4397866B2 JP 4397866 B2 JP4397866 B2 JP 4397866B2 JP 2005235075 A JP2005235075 A JP 2005235075A JP 2005235075 A JP2005235075 A JP 2005235075A JP 4397866 B2 JP4397866 B2 JP 4397866B2
- Authority
- JP
- Japan
- Prior art keywords
- dot
- pixel
- dots
- candidate
- dimensional pattern
- 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
Links
Images
Description
本発明は、文書の固有情報及び文書の位置情報を含む2次元パターンを読み取る2次元パターン読み取り装置と、2次元パターン読み取り方法に関するものである。 The present invention relates to a two-dimensional pattern reading apparatus and a two-dimensional pattern reading method for reading a two-dimensional pattern including document unique information and document position information.
紙などの印刷媒体上に、符号化した座標情報を含む2次元コードを配置することによって、その印刷媒体上に形成された画像情報の位置や内容を特定する技術が知られている。従来の1次元バーコードが横(水平)方向のみにしか情報を持たなかったのに対し、2次元コードは水平と垂直の2方向に情報を有するので、より複雑な情報を表すことができる。
先行文献としては、特許文献1に光学的に読取可能なコードシンボルを紙面上にマトリックス状に並べ、小型カメラを備えたペンで紙面への加筆と同時にカメラで前記コードシンボルを読み取り、座標情報を同時に取得することにより、加筆情報をリアルタイムに読み取り、加筆前の紙面情報と加筆情報を関連付けるシステムに関する技術が開示されている。
また特許文献2には、X座標、Y座標、コードの方向を表すパターンと、ホーミングパターンと呼ばれるその他のパターンより大きくて、コードの中心に配置されたパターンとからなり、それらは人の目にはみえないようにする技術が提案されている。
また特許文献3には、ドットを所定の位置からずらすことにより、1ドットで2ビット以上の情報を有することができる2次元コードが開示されている。このような2次元コードは、水平垂直方向の座標情報を有し、紙全体に連続的にドットが印刷されており、これを読み取ることにより、2次元コードがどの座標情報を有しているかを取得する技術が開示されている。
また特許文献4には、座標と文書情報を符号化し、紙上に印刷した2次元ドットパターンをカメラのついたペンで筆記中に読み取り、該パターンを読み取ることにより、現在どの文書のどの位置に筆記中であるかを取得する技術が開示されている。
As a prior document, in
Further, in
ところで、上記特許文献1では、文書に固有の情報と座標位置を同時に白黒のパターンに変換し、紙に印刷して、紙上の文書に光学ペンで加筆した情報を、白黒のパターンを読み取ることにより取得し、文書固有の情報と紙上の座標位置を取得し、元の文書に加筆情報を追加するようにしている。このような特許文献1の技術では白黒のパターンに誤り訂正機能を有する2次元コードを利用し、光学ペンによる読み取りが不安定な場合でも文書固有の情報と座標情報を取得できるような機能を有しているため、特開平7−141104号公報の技術において読み取りが不可能な場合でも読み取りが可能になっている。
しかしながら、この場合は2次元コードの大きさが大きくなるため、広い範囲の紙面を光学ペンで撮影しなければならず、被写界深度などの問題で読み取った画像の品質が良くなく、2次元コードを連続的に読み取ることが難しくなる。また、当該2次元コードは筆記中の紙面をカメラで撮像し、デコードするために作られたわけではなく、汎用の2次元コードであるため、デコード処理に時間がかかり、リアルタイムで処理を行うことが難しい。この技術の目的のひとつは連続的な加筆情報を取得するということであるため、2次元コードを読み取り、座標位置を連続的に取得できなければ、加筆情報の不連続点が発生し、正しい加筆情報が得られなくなるという欠点があった。
また上記した特許文献2は、一般の印刷装置を使用してコードを印刷することは事実上不可能であり、予め特殊な印刷装置において不可視インクを使用してコードを印刷する必要があり、ユーザが印刷したい文書の情報を印刷時に印刷媒体に埋め込むためには別のバーコードを重畳して印刷するなりの手段が必要となるばかりか、文書に加筆する前に必ずそのバーコードを読ませる必要があり、ユーザにとって不便になる。
仮に、バーコードを読む作業を忘れて別の文書に加筆を行うならば加筆情報と電子文書とのリンクが矛盾を起こして重大な問題となる。また、仮に可視インクで印刷したとしても他のパターンより大きいパターン(マーク)を使用しており、人の目につきやすく、文書や加筆の可読性が損なわれるという欠点があった。
By the way, in
However, in this case, since the size of the two-dimensional code becomes large, it is necessary to photograph a wide range of paper with an optical pen, and the quality of an image read due to problems such as depth of field is not good. It becomes difficult to read the code continuously. In addition, the two-dimensional code is not created to capture and decode the paper surface being written with a camera, but is a general-purpose two-dimensional code. Therefore, the decoding process takes time and can be processed in real time. difficult. One of the purposes of this technology is to acquire continuous writing information, so if the two-dimensional code is read and the coordinate position cannot be acquired continuously, discontinuities in the writing information will occur, and correct writing will occur. There was a drawback that information could not be obtained.
Further, in
If the user forgets to read the barcode and adds another document, the link between the added information and the electronic document causes a contradiction and becomes a serious problem. Moreover, even if it is printed with visible ink, a pattern (mark) larger than the other patterns is used, which is easily noticeable to humans, and has the disadvantage that the readability of documents and writings is impaired.
また特許文献3は、2次元的に等間隔な点からドットをずらして配置することにより、1ドットに2ビット以上の情報を乗せ、6×6のドットでそのコードの位置情報を有する2次元コードを開示している。この技術は、位置をずらす量が30μmと非常に小さく、一般に普及しているレーザープリンタの解像度(1200dpi)では、紙送りの精度、感光体の回転速度のむら等により正しいずれ量を再現することが難しい。
従って、この2次元コードの場合も、予めオフセット印刷等の印刷技術を利用して2次元コードを印刷した紙を用意する必要があるため、上記特許文献3と同等の問題が発生するという欠点があった。
また特許文献4は、読み取った画像の周辺部を使わないで2次元コードパターンの読み取り処理を行う方法について開示されており、高速化においてある程度の改良は見込めるものの、飛躍的に処理速度の向上は達成できない。
また、筆記を再現するための読み取りアルゴリズムの性能に問題があった。さらにドット検出の手法について、5×5画素のウィンドウを使ってその検出を行っているが5×5画素のウィンドウではノイズ成分をドットとして判定するという間違いを起こしやすかった。また、ペン先位置を推定する方法においては、読み取った画像から検出したコーナードットの座標とドットの中心とが一致しておらず、ペン先の正確な位置を推定する精度が良くないなどの欠点があった。
そこで、本発明は、上記したような点を鑑みてなされたものであり、紙上に印刷した文書に手書きで加筆した情報をより高速、より正確に取得し、元の電子文書にその情報を反映させることができる2次元パターン読み取り装置及び2次元パターン読み取り方法を提供することを目的とする。
Further, in
Therefore, even in the case of this two-dimensional code, it is necessary to prepare a paper on which the two-dimensional code is printed by using a printing technique such as offset printing in advance, so that there is a drawback that a problem equivalent to that of
In addition, there was a problem in the performance of the reading algorithm for reproducing the writing. Further, regarding the dot detection method, a 5 × 5 pixel window is used for the detection, but in the 5 × 5 pixel window, it is easy to make an error that a noise component is determined as a dot. Further, in the method of estimating the pen tip position, the coordinates of the corner dot detected from the read image do not match the center of the dot, and the accuracy of estimating the accurate position of the pen tip is not good. was there.
Therefore, the present invention has been made in view of the above-described points, and obtains information obtained by handwriting on a document printed on paper at higher speed and more accurately, and reflects the information in the original electronic document. An object of the present invention is to provide a two-dimensional pattern reading apparatus and a two-dimensional pattern reading method that can be performed.
上記目的を達成するため、請求項1に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出手段と、該ドット検出手段において検出されたドットからコード枠を検出するコード枠検出手段と、前記コード枠内のドットを読み取ってデータを復号するデータ復号手段とを備える2次元パターン読み取り装置において、前記ドット検出手段は、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする。
請求項2に記載の発明は、前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用する請求項1記載の2次元パターン読み取り装置を特徴とする。
請求項3に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出手段と、該ドット検出手段において検出されたドットからコード枠を検出するコード枠検出手段と、前記コード枠内のドットを読み取ってデータを復号するデータ復号手段とを備える2次元パターン読み取り装置において、前記ドット検出手段は、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定手段と、該ドット探索領域判定手段によりドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする。
To achieve the above object, an invention according to
The invention according to
According to a third aspect of the invention, a two-dimensional pattern composed of a plurality of dots enter the captured image captured, the dot detecting means for detecting the dot code frame from the detected dots in the dot detecting means code frame detection means for detecting, in a two-dimensional pattern reading apparatus and a data decoding means for decoding data read dot of the code frame, the dot detecting means, a predetermined small area is searched dot A dot search area determination unit that determines whether or not the pixel is an area to be performed, and the luminance of the pixel of interest and its neighboring pixels for each pixel in the area determined as the dot search area by the dot search area determination unit if the difference is equal to or greater than a predetermined value, the out of dots and noise included in the image, using the area of 7 × 7 pixels around the target pixel of dot candidate Minimum determining a dot candidate detection means for detecting, in an area smaller than the area where the dot candidate is detected, the dot having the minimum luminance by comparing the detected dot candidate and neighboring pixels by the dot candidate detecting means a luminance pixel determination unit, when no pixels which have already been determined that a dot in the adjacent pixel of dots candidates that have a minimum brightness in said minimum brightness pixel determining means, surrounding dots determines the dot candidate dot pixel And a search means.
請求項4に記載の発明は、前記ドット探索領域判定手段は、水平1画素垂直1画素おきに小領域を設定する請求項3記載の2次元パターン読み取り装置を特徴とする。
請求項5に記載の発明は、前記ドット探索領域は、3×3画素からなる小領域である請求項3記載の2次元パターン読み取り装置を特徴とする。
請求項6に記載の発明は、前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用する請求項3記載の2次元パターン読み取り装置を特徴とする。
請求項7に記載の発明は、請求項1乃至6の何れか一項記載の2次元パターン読み取り装置において、前記データ復号手段により復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出手段を備え、前記座標算出手段は、前記コード枠の所定の位置に存在するドットの正確な座標を推定するドット中心検出手段と、該ドット中心検出手段により検出されたドットの中心座標と、復号された位置情報とから射影変換パラメータを算出する射影パラメータ算出手段と、該射影パラメータ算出手段により算出された射影パラメータを用いて画像座標中の所定の座標に演算を加える座標変換手段と、からなることを特徴とする。
The invention according to
The invention according to
The invention according to
According to a seventh aspect of the present invention, in the two-dimensional pattern reading device according to any one of the first to sixth aspects, the position information of the data decoded by the data decoding means and the coordinates of the code frame in the image are used. includes a coordinate calculation unit for performing an operation on a given coordinate in the image coordinate Te, the coordinate calculation unit includes: a dot center detecting means for estimating the exact coordinates of the dots present in a given position of the code frame, the dot Projection parameter calculation means for calculating a projection transformation parameter from the center coordinates of the dot detected by the center detection means and the decoded position information, and using the projection parameter calculated by the projection parameter calculation means, And a coordinate conversion means for calculating a predetermined coordinate.
請求項8に記載の発明は、前記ドット中心検出手段は、ドットを含む小領域において最小輝度を有する画素を検出するドット座標補正手段と、該ドット座標補正手段により検出された画素を中心とした小領域で所定の演算を行うことによりドットの正確な位置を推定するドット位置推定手段と、からなる請求項7記載の2次元パターン読み取り装置を特徴とする。
請求項9に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出ステップと、該ドット検出ステップにおいて検出されたドットからコード枠を検出するコード枠検出ステップと、前記コード枠内のドットを読み取ってデータを復号するデータ復号ステップとからなる2次元パターン読み取り方法において、前記ドット検出ステップは、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出ステップと、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出ステップにより検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定ステップと、該最小輝度画素判定ステップで最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索ステップと、からなることを特徴とする。
請求項10に記載の発明は、前記ドット最小輝度画素判定ステップは、注目画素を中心とする5×5画素の領域を使用する請求項9記載の2次元パターン読み取り方法を特徴とする。
請求項11に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出ステップと、該ドット検出ステップにおいて検出されたドットからコード枠を検出するコード枠検出ステップと、前記コード枠内のドットを読み取ってデータを復号するデータ復号ステップとからなる2次元パターン読み取り方法において、前記ドット検出ステップは、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定ステップと、該ドット探索領域判定ステップで判定されたドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出ステップと、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出ステップで検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定ステップと、該最小輝度画素判定ステップで最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索ステップと、からなることを特徴とする。
According to an eighth aspect of the present invention, the dot center detecting means has a dot coordinate correcting means for detecting a pixel having a minimum luminance in a small region including a dot, and a pixel detected by the dot coordinate correcting means. 8. The two-dimensional pattern reading device according to
The invention according to
The invention according to
The invention according to
請求項12に記載の発明は、前記ドット探索領域判定ステップは、水平1画素垂直1画素おきに小領域を設定する請求項11記載の2次元パターン読み取り方法を特徴とする。
請求項13に記載の発明は、前記ドット探索領域は、3×3画素からなる小領域である請求項11記載の2次元パターン読み取り方法を特徴とする。
請求項14に記載の発明は、前記ドット最小輝度画素判定ステップは、注目画素を中心とする5×5画素の領域を使用する請求項11記載の2次元パターン読み取り方法を特徴とする。
請求項15に記載の発明は、請求項9乃至14の何れか一項記載の2次元パターン読み取り方法において、前記データ復号ステップにより復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出ステップを有し、前記座標算出ステップは、前記コード枠の所定の位置に存在するドットの正確な座標を推定するドット中心検出ステップと、該ドット中心検出ステップで検出された中心座標と、復号された位置情報とから射影変換パラメータを算出する射影パラメータ算出ステップと、該射影パラメータ算出ステップで算出された射影パラメータを用いて画像座標中の所定の座標に演算を加える座標変換ステップと、からなることを特徴とする。
請求項16に記載の発明は、前記ドット中心検出ステップは、ドットを含む小領域において最小輝度を有する画素を検出するドット座標補正ステップと、前記検出された画素を中心とした小領域で所定の演算を行うことによりドットの正確な位置を推定するドット位置推定ステップとからなる請求項15記載の2次元パターン読み取り方法を特徴とする。
The invention according to
The invention according to
The invention according to
A fifteenth aspect of the invention is the two-dimensional pattern reading method according to any one of the ninth to fourteenth aspects, based on position information of data decoded by the data decoding step and coordinates of a code frame in an image. A coordinate calculation step for performing an operation on a predetermined coordinate in the image coordinates, the coordinate calculation step including a dot center detection step for estimating an accurate coordinate of a dot present at a predetermined position of the code frame, A projection parameter calculation step for calculating a projection transformation parameter from the center coordinates detected in the dot center detection step and the decoded position information, and a predetermined parameter in the image coordinates using the projection parameter calculated in the projection parameter calculation step. And a coordinate conversion step for adding a calculation to the coordinates.
According to a sixteenth aspect of the present invention, the dot center detection step includes a dot coordinate correction step for detecting a pixel having a minimum luminance in a small region including a dot, and a predetermined region in the small region centered on the detected pixel. 16. The two-dimensional pattern reading method according to
本発明によれば、2次元パターンの読み取りを精度よく、効率的、高速に読み取ることができるようになるので、筆記した情報の再現品質の向上を図ることができる。 According to the present invention, it is possible to read a two-dimensional pattern with high accuracy, efficiency, and high speed, so that the reproduction quality of written information can be improved.
図1は、本発明の実施の形態に係る印刷文書の平面図である。
この図1において、2次元コード22は複数の黒ドットで構成される光学的に読み取り可能なコードであり、縦横に規則的に配列された黒ドットを境界としてマトリクス状に並べられており、印刷文書21の印刷時には文書と2次元コード22のパターンが同時に印刷される。2次元コード22には、例えば印刷文書21の2次元コード22が印刷されている面における印刷された文書の原本となる電子文書の識別(ID)情報と2次元コード22の座標を意味する情報がエンコードされている。なお、図1においては説明上、文書は図示せず、行間や余白などの2次元コードのみが印刷された部分を示している。
例えば、図1の左上のコードシンボル(2次元コード)22aには「水平座標=95、垂直座標=10、文書ID=10」がエンコードされ、2次元コード22bには「水平座標=96、垂直座標=10、文書ID=10」、2次元コード22cには「水平座標=95、垂直座標=11、文書ID=10」、2次元コード22dには「水平座標=96、垂直座標=11、文書ID=10」とエンコードされている。
FIG. 1 is a plan view of a print document according to an embodiment of the present invention.
In FIG. 1, a two-
For example, “horizontal coordinate = 95, vertical coordinate = 10, document ID = 10” is encoded in the upper left code symbol (two-dimensional code) 22a in FIG. 1, and “horizontal coordinate = 96, vertical” is encoded in the two-
図2は、2次元コードのドットの大きさ、及びドットの間隔を示した図であり、この図を用いて、2次元コードのドット及びコードの大きさについて説明する。2次元コード22及び境界を構成するドット23は、プリンタの最小ドット24の2×2単位で印字される。1200dpiのプリンタならば、プリンタの最小ドット径は21μmであるので、2次元コード22のドットの直径は理想的には42μmとなる。実際にはドットゲインがあるため直径はもう少し大きくなる。ドット直径の6倍の間隔を置いて水平・垂直方向にドット23を配置する位置を決定する。この場合、ドット配置位置にすべてのドットが存在する場合でもドットの占める面積率は理想的には2.8%、50%程度のドットゲインを見込んでも5%に満たない。この面積率は人の目には明るい灰色に見えるのでドットに邪魔されて文書が見えにくいとか、加筆した文字が見えにくいなどという問題は起こらない。
以上のようにコードの配置を決定すると2次元コード22は水平2mm、垂直3mm角の大きさを有し、水平座標=95ということは、2次元コードの左上の角が紙面の左上を原点として水平方向に190mmの位置にあるということを意味する。詳しくは後述するが、水平2mm、垂直3mm角の大きさは、A4サイズの用紙と相似の大きさであり、水平・垂直座標情報を格納するデータ長を有効に使うことが可能になる。
同様に垂直座標=10は、2次元コードの左上の角が紙面の左上を原点として垂直方向に30mmの位置にあるということを意味する。
文書IDは、元の電子文書の固有情報、例えば電子文書が格納されているデータベースの識別IDである。即ち、2次元コード22はその左上の角(垂直線H1と水平線V1の交点)が、紙面左上から水平190mm、垂直30mmの位置にあり、印刷されている文書はそのIDが「10」であるという情報を有する。
FIG. 2 is a diagram showing the dot size and the dot interval of the two-dimensional code. The two-dimensional code dot and code size will be described with reference to FIG. The two-
When the code arrangement is determined as described above, the two-
Similarly, the vertical coordinate = 10 means that the upper left corner of the two-dimensional code is at a position of 30 mm in the vertical direction with the upper left corner of the page as the origin.
The document ID is unique information of the original electronic document, for example, an identification ID of a database in which the electronic document is stored. That is, in the two-
図3は、2次元コードのデータ配置領域を示した図であり、この図を用いて2次元コード22に配置するデータの詳細に説明する。2次元コード22aはコード枠を構成するH1、H2、V1、V2に囲まれた7×11のセルを有する。セルとはドットを打つことのできる単位をいい、最大77個のドットを含む。
領域31は水平座標を表すデータを配置する領域であり4×2のセルを有する。1セルは1ビットに相当するので領域31は1バイトの容量を有する。
領域32は、垂直座標を表すデータを配置する領域であり、水平座標と同様に1バイトの容量を有する。A4サイズの用紙は水平210mm、垂直297mmの大きさがある。また2次元コード22の一つの大きさは、水平2mm、垂直3mmであるので水平方向には105段階、垂直方向には99段階のデータが必要になるが、1バイトで十分な容量を満たしている。用紙サイズがA3の場合には、水平297mm、垂直420mmの大きさであるので、水平方向に148段階、垂直方向に120段階のデータが必要になる。この場合も1バイトのデータ容量があれば十分である。同様にA2サイズの場合でも、水平420mm、垂直594mmの大きさであるので、水平方向に210段階、垂直方向に198段階のデータが必要であるが、この場合も1バイトのデータ容量で収まる。このように紙の縦横の長さの違いに応じて2次元コードの縦横の長さを決定すると水平・垂直座標を表すデータ長を同一の一定サイズに固定しても幅広いサイズの用紙に対応できるようになっている。
領域33は文書IDをあらわすデータを配置する領域であり、4×6の24ビット(=3バイト)の容量を有する。領域34〜37は誤り訂正用の符号を配置する領域であり、それぞれ1バイトずつの容量を有する。したがって誤り訂正用符号は合計4バイトで構成される。領域38、39はコードの上下方向を表すためのパターンで、領域38は3×1の黒ドット、領域39は2×1のドット無しのパターンでコードの上下を判別するのに使用される。
FIG. 3 is a diagram showing a data arrangement area of a two-dimensional code, and details of data arranged in the two-
An
The
The
図4は、各データのビット列がどのように配列されるかを示した図である。なお、この図3の領域31〜領域37に示されている「1」はMSB、「8」はLSBをそれぞれ示している。
図5は本実施の形態としての文書管理システムの構成を示した図である。
この図に示す文書管理システムは、プリンタ1、複写機2、スキャナ3、情報処理装置4、記憶装置5、文書管理データベース6、ペン型座標入力装置7、携帯情報端末8、情報処理装置9、2次元コード作成装置10より構成され、これらがネットワークを介して接続されている。
プリンタ1は印刷を行う印刷装置、スキャナ3は画像の読み取りを行う読取装置、複写機2は、例えばコピー、スキャナ、ファックス、プリンタなどの機能を備えた複合機とされる。情報処理装置4はペン型座標入力装置7及び携帯情報端末8の制御を行い、情報処理装置9は記憶装置5の制御を行う。なお、ペン型座標入力装置7の構成は後述する。
次に、図5に示した文書管理システムにおいて、上記した2次元コード22を作成し、印刷すべき文書に重畳する印刷データとし、文書を印刷するまでの手順を図6を用いて説明する。なお、2次元コード22の作成は、図5に示した情報処理装置4、9で文書11の印刷命令を実行したときに、情報処理装置4、9内のプリンタドライバで実行される。
この場合、プリンタドライバは、まず記憶装置5内の文書管理データベース6に問い合わせて印刷しようとする文書11のページ毎の文書IDを発行してもらう(S1)。文書IDを発行してもらったら、それと文書上の座標情報とを合わせてエンコードすべきデータを取得する(S2)。例えば、図7(a)に示す文書IDは「123456」、座標情報(X,Y)はmm単位(24,123)という具合である。次にデータをエンコードする(S3)。これにより、文書IDは、図7(b)に示すように、6桁の数字を3バイトのバイナリ値に変換する。また、水平座標は24/2=12、垂直座標は123/3=41と、水平・垂直それぞれ1バイトずつで収まるように変換する。座標情報はこのように2バイトのバイナリ値に変換し、文書IDと合わせて計5バイトのデータとする。そしてエンコードした後、エンコードデータを元に誤り訂正符号を追加する(S4)。図7(c)に示す例では、5バイトのデータに対して4バイトの誤り訂正符号を付加している。この誤り訂正符号にはリードソロモン符号を採用する。リードソロモン符号は、バイト単位の誤りを訂正できる強力な誤り訂正方式であり、誤り訂正符号長の半分以下の誤りを訂正することができる。なお、リードソロモン誤り訂正符号の詳細については、昭晃堂「符号理論(コンピュータ基礎講座18)」宮川、岩垂、今井共著など、多数の書籍に記されている。本実施の形態の場合には、図7(c)に示すように誤り訂正符号長が4バイトなので2バイトの誤り訂正が可能である。
FIG. 4 is a diagram showing how the bit strings of each data are arranged. Note that “1” shown in the
FIG. 5 is a diagram showing the configuration of the document management system as the present embodiment.
The document management system shown in this figure includes a
The
Next, in the document management system shown in FIG. 5, the above-described two-
In this case, the printer driver first asks the
このようにして作成されたエンコードデータおよび誤り訂正符号データは2次元コード22の各セルに割り当てられ(S5)、続くステップS6において、1ページ分の2次元コードの作成が終了したかどうかの判別を行う。そして、1ページ終了したら次のステップS7において、全ページ終了したかどうかの判別を行い、全ページ終了したら処理を終えることになる。なお、ステップS6において1ページ分の2次元コードの作成が終了していないと判別した場合は、ステップS2に戻って処理を行う。またステップS7において全ページ分の2次元コードの作成が終了していないと判別した場合、ステップS1に戻って処理を行うようにする。
これにより、2次元コードがページ全体に配置されたマトリクスの画像を作成することができる。その後、プリンタ1や複写機2のプリンタ部を使用して印刷を行う。印刷が正常に終了したら文書管理データベース6内のID管理テーブルに正常に印刷された文書、ページ、文書ID等の情報の登録を行うようにする。
図8は、上記2次元コードを作成し、印刷すべき文書に重畳する印刷データとし、文書を印刷するまでの一連の作業を作業者から見たフローである。
この場合、まず、図5に示す文書管理システムの記憶装置5に保存されている文書11を編集し(S11)、印刷命令を出して、プリンタ1や複写機2で文書の印刷を実行させる(S12)。印刷が正常に終了したならば(S13)、印刷に成功した文書IDを文書管理データベース6内のID管理テーブルに登録する(S14)。
図9は、2次元コード付きで印刷された文書の一例を示した図であり、図9(a)に示す印刷文書21は、例えば所定のフォーマットを有する帳票文書であり、背景には2次元コード22が印刷されている。印刷文書21の一部を拡大したものが図8(b)に示す図であり、2次元コード22のコード枠を兼ねるアライメントドットと、枠内に配置されるデータドットが示されている。また2次元コード22が規則的に並んでいる。
The encoded data and error correction code data created in this way are assigned to each cell of the two-dimensional code 22 (S5), and in the subsequent step S6, it is determined whether or not the creation of the two-dimensional code for one page has been completed. I do. When one page is completed, it is determined in the next step S7 whether or not all pages have been completed. When all pages have been completed, the process is terminated. If it is determined in step S6 that the creation of the two-dimensional code for one page has not been completed, the process returns to step S2 to perform processing. If it is determined in step S7 that the creation of two-dimensional codes for all pages has not been completed, the process returns to step S1 to perform processing.
As a result, a matrix image in which the two-dimensional code is arranged on the entire page can be created. Thereafter, printing is performed using the printer unit of the
FIG. 8 is a flow of creating a two-dimensional code and using the print data superimposed on the document to be printed as viewed from the operator until a document is printed.
In this case, first, the
FIG. 9 is a diagram showing an example of a document printed with a two-dimensional code. A
さて、2次元コードつきの文書は印刷できたので、次に筆記を行うとともに紙面の画像を撮像して2次元コードをデコードして座標情報を得るペン型座標入力装置7の概略構成を図5に示すブロック図を用いて説明する。
図5に示すペン型座標入力装置7は、人が手に持って筆記動作を行うことができる筆記具状の装置本体61を備えている。この装置本体61の先端部62には、筆記具63、即ち、ボールペン、シャープペンシルの先端部分等が取り付けられており、文書に加筆可能である。装置本体61側に設けられた画像読取装置64は、CCDなどの光電変換素子64aと、レンズなどからなる光学系64bとから構成され、印刷文書21上の画像を読み取るようにしている。なお、画像読取装置64には必要に応じて照明を設けることができる。CCDの読み取り解像度は320×240画素とする。
装置本体61には、マイコン65が搭載され、マイコン65には画像読取装置64が接続されている。マイコン65は、画像読取装置64で読み取った印刷文書21上の画像に基づいた各種処理を行う。即ち、読み取った2次元コード22をデコードし、2次元コードの紙面上の座標を検出する(詳細については後述する)。またマイコン65は、装置本体61の外部になるPCなどの情報処理装置4と接続可能であり、マイコン65内に蓄積したデータを情報処理装置4に出力可能である。なお、図6では画像読取装置64や、マイコン65などに電力を供給する電源、マイコン65と情報処理装置4とのインタフェースなどは図示を省略している。
Now that the document with the two-dimensional code has been printed, the schematic configuration of the pen-type coordinate
The pen-type coordinate
A
マイコン65は、図10に示すように、バス70を介してCPU71、ROM72、RAM73、2次元コード読取装置74が接続されている。即ち、CPU71はバス70を介して各種外部装置と接続されている。ROM72には、図5に示したペン型座標入力装置7の動作を制御するプログラムやマイコン65を動作させるプログラムが予め内蔵されている。RAM73は画像読取装置64から読み取った画像や、コード読み取り中に生成される中間データ、2次元コードをデコードした際に得られる文書IDや座標などを一時的に保存する。
2次元コード読取装置74は、図11に示すように構成され、RAM73に記憶された画像から2次元コードを検出し、読み取って文書IDや座標を検出する作業を行う。なお、2次元コード読取装置74については後述する。
さらに図5に示すマイコン65には、LCD表示装置66、LED67、あるいはブザー68が接続されている。これにより、マイコン65は、情報処理装置4から受信した情報をLCD表示装置66に表示したり、あるいは特定の情報を受信した場合にはLED67を点滅させたり、ブザー68を鳴らしたりして外部に通知することができるようになっている。
装置本体61には、ペン型座標入力装置7の先端部62が筆記面に接触しているかどうかを検出する圧力センサ69が設けられている。圧力センサ69は、先端部62が筆記面に接触することにより、筆記具63を介して伝達される圧力を感知し、感知した情報をマイコン65に伝送する。
このように構成されるペン型座標入力装置7を用い、印刷文書21上での先端部62の位置検出を連続的に行えば、印刷文書21上での先端部62の移動軌跡を求めることができる。また、ペン型座標入力装置7の先端部62が筆記面に接触しているかどうかを検出する圧力センサ69によって、紙面上に筆記を行ったときの筆記軌跡を忠実に求めることができる。もし2次元コードが存在しない文書にペン型座標入力装置7の読み取り対象ではない文書に加筆する場合、筆記中にもかかわらずコードを読み取ることが不可能であるので読み取り不能の表示をLCD表示装置66またはLED67を用いて行い、ユーザに通知する。
As shown in FIG. 10, the
The two-dimensional
Further, an
The apparatus
If the position of the
次に、2次元コードの読み取りの動作について詳述する。
図11は2次元コード読取装置74の構成を示した図である。この2次元コード読取装置74は、先にも述べたように、図5に示したペン型座標入力装置7の内部のマイコン65に内蔵されている(図10参照)。
この図11に示す2次元コード読取装置74では、画像読取装置64で読み取られた紙面の画像(8ビット画像)がドット検出器81に入力され、ドット検出器81において2次元コード22のドット検出を行うようにする。コード枠検出器82では、ドット検出器81において検出されたドットから画像内にある複数の2次元コード22から一つの2次元コード22の枠とその位置を検出する。読み取った画像例を図12に示す。
コード枠検出器82において2次元コード22の位置を検出できたときは、データ取得器83において、2次元コード22の各白黒セルに応じて「0」または「1」のデータを取得し、2次元コード22のデータ配置規則に従ってデータの並べ替えを行う。
データ置換器84は、取得したデータに対して、連続筆記検出器91から出力される連続筆記中であるか否かの信号により、既知情報メモリ88から既知の文書IDを読み出し、データ置換器84において2次元コード22から取得したデータの文書IDに相当する部分を既知の文書IDで置き換える。
連続筆記検出器91には、筆記検出器92の検出情報が入力される。筆記検出器92には、ペン型座標入力装置7による加筆時においてペン先に感じる圧力を検出する圧力センサ69の出力信号が入力され、筆記中か否かを判定する。そして筆記の状態が所定時間以上続いたときは連続筆記中であると判断し、それ以外の場合は連続筆記中ではないと判断して、その検出結果を連続筆記検出器91に出力する。
Next, the operation of reading the two-dimensional code will be described in detail.
FIG. 11 is a diagram showing the configuration of the two-
In the two-dimensional
When the
The data replacer 84 reads the known document ID from the known
Detection information of the writing
誤り訂正器85は、データ置換器84の出力に対して誤り訂正を行う。誤り訂正器85からは、誤り訂正が成功したか否かの判定情報と誤り訂正後のデータが出力される。この誤り訂正されたデータは文書IDと座標情報である。
誤り訂正器85から出力された誤り訂正の判定情報は、データ復号器86、ペン先座標算出器87、既知情報メモリ88へ入力され、それぞれの機器の制御に使用される。
データ復号器86では、誤り訂正の判定情報が誤り訂正成功であればデータ復号器86は動作する。誤り訂正失敗であればデータ復号器86は動作しない。ペン先座標算出器87は誤り訂正の判定情報が誤り訂正成功であり、且つ、筆記検出器92の出力が筆記中であれば、ペン先座標を算出して出力するが、誤り訂正失敗の場合や筆記中でない場合ならば現実にはありえない座標値(−1、−1)等を出力する。また、既知情報メモリ88では、誤り訂正が成功である場合、誤り訂正された情報の文書IDに相当する部分を新たに保存する。
ここで、データ置換器84におけるデータ置き換えの具体例を図13に示す。
この場合、第一行目には正しいデータをエンコードして誤り訂正符号を生成した時のデータが示されている。また第二行目には画像から2次元コード22を抽出して2次元コードのドットからデータを再構成した観測データが示されている。ここで、観測データのY座標と、ID情報の1、2番目に誤りがあるとすると、この場合は誤りが三つあるため、後段の誤り訂正器85で誤り訂正を行う事ができなくなってしまう。
そこで、誤り訂正器85において誤り訂正を行う事ができなくなるのを防止するため、第三行目に示すように文書IDを既知情報メモリ88に記憶されている既知情報に置き換えるようにしている。これにより、ID情報の部分の誤りがなくなり、Y座標の1バイトだけが誤りとなり、誤り訂正が可能となって正しい座標情報、ID情報が得られるようにしている。
誤り訂正に成功したデータは、データ復号器86により、紙面上の座標情報と文書IDに復号される。紙面上のIDは、水平座標=24mm、垂直座標123mm、文書ID=23となる。この座標及びデコードに成功した2次元コード22の画像上の座標を用いてペン先座標算出器87は、ペン先の紙面上での座標を算出する(詳細は後述)。これによりペン型座標入力装置7の先端部62の位置が確定する。
The
The error correction determination information output from the
In the
Here, a specific example of data replacement in the
In this case, the first line shows data when correct data is encoded to generate an error correction code. The second line shows observation data obtained by extracting the two-
Therefore, in order to prevent the
The data that has been successfully corrected is decoded by the
次に、図14を用いてドット検出器の動作を説明する。
ドット検出を行うために用いる領域は7×7画素のウィンドウである。従来技術の5×5画素よりもノイズに強い判定を行うことができる。ドット検出を行う領域は、図14の領域102である。領域101は画像領域全体(320×240画素)であり、領域102は280×220画素の領域である。最外周の領域では画像品質が良くなく正しいドット検出を行うことが難しい可能性があることと、リアルタイム処理のためにできるだけ無駄な処理をしたくないから、画像領域全体ではなくそれより小さい領域においてドット検出を行うようにしている。
図15はドット検出器の構成を示した図である。
この図15に示すドット検出器は、ドット候補検出器(ドット候補検出手段)101と、最小輝度画素判定器(最小輝度画素判定手段)102と、周辺ドット探索器(周囲ドット探索手段)103とから構成され、画素Zを中心とした7×7画素の領域においてドット検出が行われる。
ドット候補検出器101は、注目画素Zとその近傍画素との輝度の差が所定値以上ある場合にドットの候補を検出する。
最小輝度画素判定器102は、ドット候補検出器101により検出されたドット候補が近傍画素と比較して最小輝度を有するか否かを判定する。
周辺ドット探索器103は最小輝度画素判定器102において最小輝度画素であると判定されたドット候補の周囲にすでにドットと判定された画素があるかを調べ、周辺にドットがなければドット候補はドットであると最終的に判定する。
ドット候補検出器101は、次の8つの式(1)〜(8)を同時に満足するときに画素Zはドット候補と判定される。Thは所定の値をとる閾値、簡単のために図16の画素位置を示す各アルファベットが画素値を表すとする。また、入力画像は黒=0、白=255を表すとする。
Z<A−Th・・・(1)
Z<E−Th・・・(2)
Z<L−Th・・・(3)
Z<P−Th・・・(4)
Z<Q−Th・・・(5)
Z<R−Th・・・(6)
Z<S−Th・・・(7)
Z<T−Th・・・(8)
Next, the operation of the dot detector will be described with reference to FIG.
The area used for dot detection is a 7 × 7 pixel window. It is possible to make a determination that is more resistant to noise than the conventional 5 × 5 pixels. An area where dot detection is performed is an
FIG. 15 is a diagram showing the configuration of the dot detector.
The dot detector shown in FIG. 15 includes a dot candidate detector (dot candidate detection unit) 101, a minimum luminance pixel determination unit (minimum luminance pixel determination unit) 102, a peripheral dot searcher (surrounding dot search unit) 103, And dot detection is performed in a 7 × 7 pixel area centered on the pixel Z.
The
The minimum luminance
The peripheral
The
Z <A-Th (1)
Z <E-Th (2)
Z <L-Th (3)
Z <P-Th (4)
Z <Q-Th (5)
Z <R-Th (6)
Z <S-Th (7)
Z <T-Th (8)
次に上記の8つの式を満たしたドット候補が最小輝度画素判定器102で周囲の画素と比較して最小輝度を有するか否かを判定する。その判定基準は次の12の式(9)〜(20)を全て満足するときにドット候補は最小輝度を有すると判定する。
Z<B・・・(9)
Z<C・・・(10)
Z<D・・・(11)
Z<F・・・(12)
Z<G・・・(13)
Z<H・・・(14)
Z<I・・・(15)
Z<J・・・(16)
Z<K・・・(17)
Z<M・・・(18)
Z<N・・・(19)
Z<O・・・(20)
次に、最小輝度画素判定器102で最小輝度画素と判定された画素Zは、その周囲U、V、W、Xにすでにドット検出器でドットであると判定された画素が存在するか否かを周辺ドット探索器103で調査され、周囲U、V、W、Xにドットが存在しなければ画素Zはドットであると初めて判定される。
所定の値(Th)の設定であるが、Thが小さければ小さいほどドットを検出しやすくなるが、同時にノイズもドットとして検出してしまい、検出したデータに誤りが起きる可能性がある。また、Thが大きければノイズを検出せずに確実に誤りを減らすことができるがコード枠を検出することが難しくなり座標取得率が小さくなる。図17にThの大きさに応じた座標取得率の例を示す。文書IDを置き換えた場合と置き換えない場合との両方のデータを記載した。
Next, the dot candidate satisfying the above eight expressions is compared with surrounding pixels by the minimum luminance
Z <B (9)
Z <C (10)
Z <D (11)
Z <F (12)
Z <G (13)
Z <H (14)
Z <I (15)
Z <J (16)
Z <K (17)
Z <M (18)
Z <N (19)
Z <O (20)
Next, as for the pixel Z determined as the minimum luminance pixel by the minimum luminance
Although the predetermined value (Th) is set, the smaller the Th is, the easier it is to detect dots, but at the same time, noise is also detected as dots, and errors may occur in the detected data. Also, if Th is large, errors can be reliably reduced without detecting noise, but it is difficult to detect code frames, and the coordinate acquisition rate is reduced. FIG. 17 shows an example of the coordinate acquisition rate according to the size of Th. Both the data when the document ID is replaced and the case where the document ID is not replaced are described.
また、図18にドット検出器の他の構成を示す。
この図18に示すドット検出器は上記ドット検出をより高速に行う構成である。
ドット探索領域判定器(ドット探索領域判定手段)104でドットを探索する小領域3×3画素を設定する。3×3画素の領域内の各画素を中心とする7×7画素のウィンドウに対してドット候補検出器101と、このドット候補検出器101でドット候補と検出された画素Zが周囲の画素よりも輝度が低いか否かを判定する最小輝度画素判定器102と、最小輝度画素であると判定されたドット候補の周囲にすでにドットと判定された画素があるかを調べる周辺ドット探索器103とからなり、周辺ドット探索器103で周辺にドットがなければドット候補はドットであると最終的に判定される。
ドット探索領域判定器104は、水平、垂直それぞれ一画素おきにドットを探索すべき領域か否かを判定する。上記図16のようにZ画素を中心とした7×7画素で、式(1)〜式(8)のすべての式が満たされたとき、Z画素を中心とする3×3画素の領域がドットを探索すべき領域であると判定される。
そのZ画素を中心とする3×3画素の領域の各画素に対してドット候補検出器101、最小輝度画素判定器102が処理を行う。この処理はすでに述べたとおりである。
最後に周辺ドット探索器103で画素Zの周囲(U、V、W、X、Y)にすでにドットであると判定された画素が存在するか否かを探索する。本実施形態の方式では重複してドットであるか否かを判定される画素が存在するので画素Yに対してもすでにドットが検出されたか否かを判定する必要がある。
FIG. 18 shows another configuration of the dot detector.
The dot detector shown in FIG. 18 is configured to perform the dot detection at a higher speed.
A dot search area determination device (dot search area determination means) 104 sets a
The dot search
The
Finally, the
次に、図19〜図22を用いて、コード枠検出器の構成について説明しておく。
図19はコード枠検出器の構成を示した図である。また図20はコード枠検出器の検出経路を示した図である。
図19に示すように、コード枠検出器82は、ドットを検出した画像から、或るドットXがコードのコーナーであるか否かを判定する第一コーナー検出器111と、その第一コーナーからドットで構成されるコード枠の8画素分を4方向に追跡して第二コーナー候補画素(B,D)を検出する第一ドット追跡器112とを備える。そして、第一ドット追跡器112で検出された第二コーナー候補画素が第二コーナーであるか否かを検出する第二コーナー検出器113と、第二コーナーからドットで構成されるコード枠の12画素分を第一ドット追跡器112のドット追跡方向(時計回り方向)に追跡して、第三コーナー候補画素(G,E)を検出する第二ドット追跡器114とを備える。さらにこの第二ドット追跡器114で検出された第三コーナー候補画素が第三コーナーであるか否かを検出する第三コーナー検出器115と、その第三コーナーからコード枠の8画素分を第二ドット追跡器114のドット追跡方向(時計回り方向)に追跡し第四コーナー候補画素(C,A)を検出する第三ドット追跡器116と、この第三ドット追跡器116で検出された第四コーナー候補画素が第四コーナー画素であるか否かを検出する第四コーナー検出器117と、さらに第一コーナーと第四コーナーとの間のコード枠を構成するドットを検出する第四ドット追跡器118とを備える。このコード枠検出器82により、最大2つの2次元コード22のコード枠を検出し、それを構成するドットの画像上の座標を検出することができる。
Next, the configuration of the code frame detector will be described with reference to FIGS.
FIG. 19 is a diagram showing the configuration of the code frame detector. FIG. 20 is a diagram showing a detection path of the code frame detector.
As shown in FIG. 19, the
ここで、第一コーナー検出器111の動作を、図21を用いて説明する。
第一コーナー検出器111は、図21(a)で示すようにドットが存在する注目画素の周囲で4つ以上のドットが存在するか否か検出する周囲ドット検出器121と、検出された周囲ドットから注目画素を点対象とする二組のドットペアを検出する点対称ペア検出器122から構成される。
周囲ドット検出器121は、図21(b)に示す注目画素Nを中心とする17×17画素の中で注目画素Nの周囲に存在するドットを検出する。図21(b)の場合、A〜Fの6画素が存在する。これが周囲ドット画素として検出される。それらA〜Fのうちで、Nとの距離が近く、その中間点がNに近いものを二組検出する。例えば図21(b)の場合、(B,D)、(C,F)の二組がそれに相当する。A及びEはノイズであると判断され除去される。このようにして注目画素のドットN及び周囲の二組の点対称ペアが検出されると、注目画素Nは第一コーナーとして検出される。この第一コーナー検出器111が検出対象とする領域は、図14に示す180×120画素の領域103であり、画像領域101の縦横それぞれほぼ半分の大きさを有する。また、ドットを検索する方向は通常のラスター走査ではなく、図22に示すように内側から外側への渦巻き走査となる。この理由は、画像の中央付近が周囲と比較して画像の品質が優れていてドットの検出が確実に行われる確率が高いため、画像の中央またはその付近からコードパターンを検出するほうが短時間で検出できる可能性が高くなる。そのため、リアルタイム処理に非常に有利となる。
第一コーナー検出器111が動作する領域103が画像全体の領域101やドット検出器81の動作領域102より小さい理由は、コードパターンが領域102の中に存在する場合、コードパターンの最も画像の内側に存在するコーナーの存在範囲を領域103としているためである。
Here, the operation of the first corner detector 111 will be described with reference to FIG.
As shown in FIG. 21A, the first corner detector 111 includes a surrounding
The surrounding
The reason why the
次に、ドット追跡器の詳細を図23により説明する。まず、図23を用いて第一ドット追跡器112の詳細を説明する。図23は2次元コードのコーナー付近を構成するドットを示したものである。Xはコーナードット、その他のA〜Iはコード枠を構成するドットである。まず、XからDEFの方向へドットを追跡することにする。簡単のため、A〜I、Xをそれぞれ座標ベクトルとみなし、Y=2D−Xを計算する。
YはドットEの推定ベクトルである。A〜Dは第一コーナー検出器111で既に検出されているので既知である。Yの周囲5×5画素においてドットEを探索する。Eが存在すれば、Y=2E−Dを計算する。今度、YはドットFの推定ベクトルである。この追跡を7回繰り返して第二コーナー候補画素を検出する。
追跡方向は4方向(図20:X→A、X→B、X→C、X→D)存在し、検出された第二コーナー候補画素すべての情報を第二コーナー検出器に転送する。
第二コーナー検出器113は基本的な動作は第一コーナー検出器111と同一である。ただ、入力する注目画素となるドットが複数(最大4)存在する可能性があることである。その中で検出される第二コーナーは最大2である(図20:B、D)。
第二ドット追跡器114の基本的な動作は第一ドット追跡器112と同一である。異なるのは追跡を開始するドットは二つあり、各ドットあたり一つの方向の追跡を行う(図21:B→G、D→E)のと、各追跡あたりドット追跡操作を11回繰り返すことである。このようにして、第三コーナー候補画素(図20:G、E)を検出する。
第三コーナー検出器115は第二ドット追跡器114で追跡できた第三コーナー候補画素(図20:G、E)が第三コーナーであるか否かを検出する。基本的な動作は前記第一、第二コーナー検出器111、113と同一である。第三コーナー検出器115が図20に示すG、Eを第三コーナーであると検出したとする。
Next, details of the dot tracker will be described with reference to FIG. First, the details of the first dot tracker 112 will be described with reference to FIG. FIG. 23 shows the dots constituting the vicinity of the corner of the two-dimensional code. X is a corner dot, and other A to I are dots constituting a code frame. First, a dot is traced from X to DEF. For simplicity, A to I and X are regarded as coordinate vectors, and Y = 2D-X is calculated.
Y is an estimated vector of dot E. A to D are known because they are already detected by the first corner detector 111. The dot E is searched for in 5 × 5 pixels around Y. If E is present, calculate Y = 2E-D. This time, Y is an estimated vector of dot F. This tracking is repeated seven times to detect second corner candidate pixels.
There are four tracking directions (FIG. 20: X → A, X → B, X → C, and X → D), and the information of all the detected second corner candidate pixels is transferred to the second corner detector.
The basic operation of the second corner detector 113 is the same as that of the first corner detector 111. However, there is a possibility that a plurality of dots (up to 4) serving as the target pixel to be input exist. The maximum number of second corners detected is 2 (FIG. 20: B, D).
The basic operation of the second dot tracker 114 is the same as that of the first dot tracker 112. The difference is that there are two dots to start tracking. When tracking in one direction for each dot (FIG. 21: B → G, D → E), the dot tracking operation is repeated 11 times for each tracking. is there. In this way, the third corner candidate pixel (FIG. 20: G, E) is detected.
The third corner detector 115 detects whether or not the third corner candidate pixel (FIG. 20: G, E) tracked by the second dot tracker 114 is the third corner. The basic operation is the same as that of the first and second corner detectors 111 and 113. Assume that the third corner detector 115 detects G and E shown in FIG. 20 as being the third corner.
第三ドット追跡器116は二つの方向(図20:G→C、E→A)にドット追跡を行うことである。追跡回数は第一ドット追跡器112と同じ7回、第四コーナー候補画素として図20:C、Aを検出する。
第四ドット追跡器118は第二ドット追跡器114と同一構成であり、図20に示すC→X、A→Xの方向に11回追跡してXに至る。Xはすでに第一コーナーであることがわかっているので、図20に示す追跡経路(1)、追跡経路(2)によりコード枠が検出されたことになる。このようにして2次元コードのコード枠を検出する。2次元コードのデコードの際にどちらのコードを使うかは、画像上のコード中心の水平座標が大きい方を優先する。このコードがデコードできなかった場合はもう一方のコードを使用してデコードを実行する。
上記第一ドット追跡器112、第二ドット追跡器114、第三ドット追跡器116、第四ドット追跡器118が追跡する画像領域は図14の領域104(260×200画素)である。ドットを検出した領域102より少しだけ小さいのは、第一、第二、第三、第四コーナー検出器111、113、115、117においてコーナー検出に使用するアルゴリズムがコーナードットを中心として17×17画素の領域を使用して、その範囲で点対称ペアドットを検出するためである。
The third dot tracker 116 performs dot tracking in two directions (FIG. 20: G → C, E → A). The number of times of tracking is the same as that of the first dot tracker 112, and FIG. 20: C and A are detected as fourth corner candidate pixels.
The
The image area tracked by the first dot tracker 112, the second dot tracker 114, the third dot tracker 116, and the
次に、図11に示したデータ取得器83を図24により説明する。
図24では、コード枠のコーナーの4点を除いてa1〜a7、b1〜b11、c1〜c7、d1〜d11とする。コードのデータを取得するには、これらを結ぶ水平線と垂直線の交点を検出する。つまり、a1とc1を結ぶ直線とb2とd2を結ぶ直線の交点の座標を検出する。そして、この交点の座標を中心にして3×3がその領域においてドットの有無を検出する。図24の場合はドット無しとなり取得されるデータは「0」となる。これをコード全データに対して行ってコードデータを取得し、データ配置規則(図4)に従ってデータを再構成する。
次に、図11に示したペン先座標算出器87について説明する。
ペン先座標算出器87は、図25に示すように、ドット中心検出器130、射影パラメータ算出器131、ペン先座標変換器132とからなる。ドット中心検出器130へは画像上のコードコーナー座標、それに対応する紙面上のコードコーナー座標および撮像したグレースケール画像を入力し、それらから射影パラメータ算出に使用するドットの中心位置を推定する。
図26はドット中心検出器130の構成を示した図である。
この図26に示すように、ドット中心検出器130は、ドットを含む小領域において最小輝度を有する画素を検出するドット座標補正手段133と、このドット座標補正手段133により検出された画素を中心とした小領域で所定の演算を行うことによりドットの正確な位置を推定するドット位置推定手段134とにより構成される。
図27は射影パラメータ算出方法を説明する図である。なお、射影パラメータ算出方法は後述する。
図27(a)は画像におけるパターンのコーナー(As〜Ds)とペン先(Ps)の座標は、画像の各画素の位置を表す整数ではなく、画像におけるドットの中心、ペン先の紙に接する部分の中心の座標を表す。即ち、図28に示すようにドットの中心は必ずしも画素位置の中心に来るとは限らず、位置がずれる。ここで正確なドットの中心を推定することで、ペン先の紙面における座標の推定精度が向上する。
Next, the
In FIG. 24, it is set as a1-a7, b1-b11, c1-c7, d1-d11 except for the four points of the corner of a code frame. In order to acquire code data, the intersection of a horizontal line and a vertical line connecting them is detected. That is, the coordinates of the intersection of the straight line connecting a1 and c1 and the straight line connecting b2 and d2 are detected. Then, 3 × 3 detects the presence / absence of a dot in the area around the coordinates of the intersection. In the case of FIG. 24, there is no dot, and the acquired data is “0”. This is performed for all the code data to obtain the code data, and the data is reconstructed according to the data arrangement rule (FIG. 4).
Next, the nib coordinate
The nib coordinate
FIG. 26 is a diagram showing the configuration of the
As shown in FIG. 26, the
FIG. 27 is a diagram for explaining a projection parameter calculation method. The projection parameter calculation method will be described later.
In FIG. 27A, the coordinates of the pattern corners (As to Ds) and the pen tip (Ps) in the image are not integers representing the position of each pixel of the image, but are in contact with the center of the dot in the image and the pen tip paper. Represents the coordinates of the center of the part. That is, as shown in FIG. 28, the center of the dot does not necessarily come to the center of the pixel position, and the position is shifted. Here, by estimating the exact center of the dot, the accuracy of estimating the coordinates on the paper surface of the pen tip is improved.
次に、正確なドットの中心を推定するための方法について説明する。
図29(a)に示すように、元のグレースケールの入力画像において、ドット検出器11で検出したドットの画素位置を中心とする3×3画素近傍で最小の画素値を有する画素位置を検出する。この画素位置を(i、j)とする。また、画素位置(i、j)を中心とした3×3画素のウィンドウ内における各画素の値を、図29(b)で示すようにv(x、y)(但し、i−1≦x≦i+1、j−1≦y≦j+1)とし、下記の計算式を用いて、中心座標(ic、jc)を推定する。
(式21)
(式22)
上記式(21)、式(22)の二つの式を利用してAs〜Dsの4ドットの中心座標を決定する。そして、先に求めたAs〜Dsから射影パラメータを算出する。
図27を用いて射影パラメータの算出方法について詳述する。
図27(a)は画像におけるコードのコーナー(As〜Ds)とペン型座標入力装置7の先端部62(Ps)の座標である。Psの座標は常に一定である。なぜならばペン型座標入力装置7では画像読取装置64と先端部62は固定されているからである。先端部62はペン型座標入力装置7の構成により画像読取装置64で撮像される画像内にある場合もあれば画像外である場合もありうる。画像外にある場合は、その座標は負の値あるいは画像の座標の最大値を越えることになる。
図27(b)は紙面におけるコードのコーナー(Ar〜Dr)とペン型座標入力装置7の先端部62(Pr)の座標である。コードのデコードによりArが決定されるので、その隣接コーナーであるBr〜Drは自動的に決まる。算出したいのはPrの座標である。射影変換式は図27(c)に示す式により画像座標から紙面座標への変換が行われる。変換係数b1〜b8は未知数であるが、コーナー座標の関係により8つの一次方程式が作られる。この連立方程式を解く事によりb1〜b8のパラメータが算出される。
ペン先座標変換器はこのパラメータを用いてPsをPrに変換して紙面上の先端部62の座標を決定する。
ペン先座標変換器132はこのパラメータを用いてPsをPrに変換して紙面上の先端部62の座標を決定する。
Next, a method for estimating an accurate dot center will be described.
As shown in FIG. 29A, a pixel position having a minimum pixel value in the vicinity of a 3 × 3 pixel centered on the pixel position of the dot detected by the
(Formula 21)
(Formula 22)
The center coordinates of the four dots of As to Ds are determined using the two formulas (21) and (22). Then, a projection parameter is calculated from As to Ds obtained previously.
A method for calculating projection parameters will be described in detail with reference to FIG.
FIG. 27A shows the coordinates of the code corners (As to Ds) in the image and the tip 62 (Ps) of the pen-type coordinate
FIG. 27B shows the coordinates of the code corners (Ar to Dr) on the paper surface and the tip 62 (Pr) of the pen-type coordinate
The nib coordinate converter uses this parameter to convert Ps to Pr to determine the coordinates of the
The nib coordinate
次に、2次元コード読取装置の他の実施例を図30に示す。なお、図11と同一部位には同一符号を付して説明は省略する。この図30に示す2次元コード読取装置は、第1誤り訂正器141、第2誤り訂正器142、選択器143が設けられている点が、図14に示した2次元コード読取装置と異なるものとされる。
第1誤り訂正器141及び第2誤り訂正器142の機能は、図11に示した誤り訂正器85と同一の機能を有する。選択器143は、連続筆記検出器91において連続筆記中であると判断された場合は、常に第2誤り訂正器142の出力を選択し、図11に示した2次元コード読取装置と同一の動作を行う。
一方、筆記検出器92の出力から筆記中であるが連続筆記中でないと判断した場合、即ち筆記開始時においては、選択器143は次のような動作を行う。第1誤り訂正器141の誤り訂正判定情報が誤り訂正成功の場合には、第1誤り訂正器141の出力が選択される。第1誤り訂正器141の誤り訂正判定情報が誤り訂正失敗の場合には、第2誤り訂正器142の出力が選択される。
このような処理を行うと、新しい加筆が行われる際に同一の文書への加筆ならば装置としての誤り訂正率が向上するので、図11に示した2次元コード読取装置より有利である。
これまで説明してきた2次元コード読取装置74はハードウェアでコードの読み取りを行っているが、ソフトウェアで行ってもよく、この場合は2次元コード読取方法を実現するプログラムがマイコン65(図5参照)のROM72(図10参照)に格納される。そして、そのプログラムの命令が順次CPU71にロードされて命令の実行が行われ、2次元コード22の読み取り処理が行われることになる。その処理手順を図31(a)(b)に示すフローチャートに従って説明する。
Next, another embodiment of the two-dimensional code reader is shown in FIG. In addition, the same code | symbol is attached | subjected to the same site | part as FIG. 11, and description is abbreviate | omitted. The two-dimensional code reader shown in FIG. 30 is different from the two-dimensional code reader shown in FIG. 14 in that a
The functions of the
On the other hand, when it is determined from the output of the writing
When such a process is performed, the error correction rate as an apparatus is improved if the same document is added when a new writing is performed, which is advantageous over the two-dimensional code reading apparatus shown in FIG.
The two-dimensional
まず、画像入力を行った後、図31(a)に示すように、画像内のドットを検出する(S21)。次に、2次元コードの位置を抽出するコード枠の検出を行った後(S22)、2次元コードの白黒に応じて「0」または「1」のデータを取得してデータの並べ替えを行う(S23)。この後、ステップS24において誤り訂正を行い、ステップS25において誤り訂正に成功したと判別したときはステップS26に進み、誤り訂正に成功したと判別しなかったとき、つまり誤り訂正に失敗したと判別したときは2次元デコード処理を終了することになる。
破線で囲ったステップS24、S25の処理は、図31(b)に示すようになる。
まず、ステップS31において、取得したデータが連続検出中、即ち、ペン型座標入力装置7の先端部62が常に紙面に押し付けられているかどうかを判定し、連続検出中ならば、ステップS32において既知情報(文書ID)でデータ置き換えを行う。データ置き換えを行った後、ステップS33で誤り訂正を行う。ステップS34において誤り訂正が成功したと判別した場合は、ステップS35においてデコードされた既知情報(文書ID)を保存して誤り訂正処理を終えることになる。この後、図31(a)に示すステップS26に進み、元のデータ(座標情報)を復元し、続くステップS27においてペン型座標入力装置7の先端部62の紙面上における座標を算出する。
一方、図31(b)のステップS31において、取得したデータが連続検出中でなかった場合、つまり初めての加筆である場合、ステップS32のデータの置き換えは行わず、ステップS33において誤り訂正を行う。そしてステップS34において誤り訂正が成功したと判別した場合は、上記同様、ステップS35において文書ID(既知情報)を保存した後、図31(a)に示すステップS26において元のデータ(座標情報)を復元し、続くステップS27においてペン型座標入力装置7の先端部62の紙面上における座標を算出すればよい。
なお、ドットの検出、コード枠の検出、データ取得、誤り訂正、座標・文書ID復元、ペン先座標算出の各ステップは、図11に示すドット検出器81、コード枠検出器82、データ取得器83、誤り訂正器85、データ復号器86、ペン先座標算出器87の各機能をソフトウェアで実現している。
First, after inputting an image, as shown in FIG. 31A, dots in the image are detected (S21). Next, after detecting a code frame for extracting the position of the two-dimensional code (S22), data “0” or “1” is acquired and rearranged according to the black and white of the two-dimensional code. (S23). Thereafter, error correction is performed in step S24, and if it is determined in step S25 that the error correction has been successful, the process proceeds to step S26. If it is not determined that the error correction has been successful, it is determined that error correction has failed. In some cases, the two-dimensional decoding process ends.
The processes in steps S24 and S25 surrounded by a broken line are as shown in FIG.
First, in step S31, it is determined whether or not the acquired data is being continuously detected, that is, whether the
On the other hand, if the acquired data is not being continuously detected in step S31 of FIG. 31B, that is, if it is the first writing, the data in step S32 is not replaced, and error correction is performed in step S33. If it is determined in step S34 that the error correction has been successful, the document ID (known information) is stored in step S35, and the original data (coordinate information) is stored in step S26 shown in FIG. In the subsequent step S27, the coordinates on the paper surface of the
The steps of dot detection, code frame detection, data acquisition, error correction, coordinate / document ID reconstruction, and pen tip coordinate calculation are the
また図32は、上記図15に示したドット検出器の検出方法をソフトウェアで実現する場合のドット検出処理を示したフローチャートである。
この場合、先ず、ステップS71において、画素Zを中心とした7×7画素の領域に対してドット候補の検出を行い、続くステップS72において、ドット候補と検出された画素Zが周囲の画素よりも輝度が低いか否かを判定を行う。この後、ステップS73において、最小輝度画素であると判定されたドット候補の周囲にすでにドットと判定された画素があるかの判定を行うようにする。
また図33は、上記図18に示したドット検出器の検出方法をソフトウェアで実現する場合のドット検出処理を示したフローチャートである。
この場合は、先ずステップS70において、水平、垂直それぞれ一画素おきにドットを探索すべき領域か否かを判定して、ドットを探索する小領域3×3画素を設定する。以下、上記同様、ステップS71において、画素Zを中心とした3×3画素の領域に対してドット候補の検出を行い、続くステップS72において、ドット候補と検出された画素Zが周囲の画素よりも輝度が低いか否かを判定を行う。この後、ステップS73において、最小輝度画素であると判定されたドット候補の周囲にすでにドットと判定された画素があるかの判定を行うようにすれば良い。
FIG. 32 is a flowchart showing dot detection processing when the detection method of the dot detector shown in FIG. 15 is realized by software.
In this case, first, in step S71, a dot candidate is detected for a 7 × 7 pixel region centered on the pixel Z, and in step S72, the pixel Z detected as a dot candidate is more than the surrounding pixels. It is determined whether or not the luminance is low. Thereafter, in step S73, it is determined whether there is a pixel already determined to be a dot around the dot candidate determined to be the minimum luminance pixel.
FIG. 33 is a flowchart showing dot detection processing when the detection method of the dot detector shown in FIG. 18 is realized by software.
In this case, first, in step S70, it is determined whether or not it is a region where dots are to be searched every other pixel in the horizontal and vertical directions, and a
また図34は、上記図25に示したペン先座標算出器87におけるドット中心検出方法をソフトウェアで実現する場合のドット中心検出処理を示したフローチャートである。
この場合、先ず、ステップS81において、コード枠の所定の位置に存在するドットの正確な座標を推定する。続くステップS82において、ステップS81においてドット中心検出ステップで検出された中心座標と、復号された位置情報とから射影変換パラメータを算出し、ステップS83において算出された射影パラメータを用いて画像座標中の所定の座標に演算を加えてペン先の座標変換処理を行うようにすれば良い。
このようにドット検出方法をソフトウェアで実現すると非常に高速にドットの検出を行うことができるようになる。
また、2次元コード読み取り処理の他の処理手順を図35(a)(b)に示すフローチャートに従って説明する。
この図35に示すフローチャートが図31に示したフローチャートと異なる点は、筆記中であって連続検出中でない場合、即ち筆記開始時に文書IDを置き換えずに誤り訂正を行い、誤り訂正ができなかった場合に文書ID部分の置き換えを行って誤り訂正を行うようにしている点である。つまり、図35(b)に示すステップS41において筆記中であると判別し、続くステップS42において連続検出中でないと判別された場合、ステップS43において、筆記開始時に文書IDを置き換えずに誤り訂正を行い、ステップS44において誤り訂正ができなかった場合に、ステップS45において文書ID部分の置き換えを行って誤り訂正を行うようにしている。これにより、同一文書への加筆時には、図35に示すように2次元コード読み取り処理を行ったほうが誤り訂正率を向上させることができるようになる。
なお、図35(a)に示す処理、及び図35(b)に示すステップS45〜S48の処理は、それぞれ図31(a)に示す処理、及び図31(b)に示すステップS32〜S35の処理と同じとされるので説明は省略する。
FIG. 34 is a flowchart showing dot center detection processing when the dot center detection method in the pen point coordinate
In this case, first, in step S81, the accurate coordinates of the dot existing at a predetermined position of the code frame are estimated. In subsequent step S82, projective transformation parameters are calculated from the center coordinates detected in the dot center detecting step in step S81 and the decoded position information, and predetermined projections in the image coordinates are calculated using the projection parameters calculated in step S83. The coordinate conversion process of the pen tip may be performed by adding a calculation to the coordinates of.
As described above, when the dot detection method is realized by software, dots can be detected at a very high speed.
Further, another processing procedure of the two-dimensional code reading process will be described with reference to the flowcharts shown in FIGS.
The flowchart shown in FIG. 35 differs from the flowchart shown in FIG. 31 in that writing is not being performed and continuous detection is not being performed, that is, error correction is not performed without replacing the document ID at the start of writing, and error correction cannot be performed. In this case, error correction is performed by replacing the document ID portion. In other words, if it is determined in step S41 shown in FIG. 35B that writing is in progress and it is determined in step S42 that continuous detection is not being performed, error correction is performed without replacing the document ID at the start of writing in step S43. In step S44, if the error cannot be corrected, the document ID portion is replaced in step S45 to correct the error. As a result, when adding to the same document, the error correction rate can be improved by performing the two-dimensional code reading process as shown in FIG.
Note that the processing shown in FIG. 35A and the processing in steps S45 to S48 shown in FIG. 35B are the processing shown in FIG. 31A and the processing in steps S32 to S35 shown in FIG. Since it is the same as the processing, the description is omitted.
これまで2次元コードを読むことにより加筆座標を取得する装置、及びシステムについて述べた。そこで次に加筆した情報を取得し、原文書に重畳するシステム、及び方法を、図5に示した文書管理システムと図36に示すフローチャートを参照しながら説明する。なお、ここでは文書には2次元コードが付されて印刷されているものとする。
ここで、ペン型座標入力装置7で文書に加筆を行ったとすると、前述したように、文書上の2次元コード22が読み取られ、文書IDと座標情報がペン型座標入力装置7で取得される(S51)。コードシンボルの読み取りの詳細について後述する。加筆とともにリアルタイムで読み取られた文書IDや座標情報が情報処理装置4へ送信される。情報処理装置4は文書IDと座標情報を受け取ると、その文書IDを、文書管理データベース6を管理する情報処理装置9へ転送する(S52)。
情報処理装置9は受信した文書IDを元に、文書管理データベース6から現在加筆されている文書のページを特定する(S53)。ここで、例えば、特定された文書が図37に示す識別番号(ID)「123456」の「patent.doc」のページ1であるとする。この文書情報はペン型座標入力装置7へ送信され、ペン型座標入力装置7のLCD表示装置66には受信した文書情報が表示される。このようにしてファイルの実体が特定できたので、情報処理装置4は「patent.doc」をそれが関連付けられているアプリケーション(例えばワープロソフト)で開き、例えば情報処理装置4に接続された図示しないディスプレイに表示して編集状態とする(S54)。
So far, an apparatus and a system for acquiring a modified coordinate by reading a two-dimensional code have been described. Therefore, a system and method for acquiring the newly added information and superimposing it on the original document will be described with reference to the document management system shown in FIG. 5 and the flowchart shown in FIG. Here, it is assumed that the document is printed with a two-dimensional code.
Here, if the pen-type coordinate
Based on the received document ID, the
編集状態とされた文書「patent.doc」に、ペン型座標入力装置7から次々送信されてくる座標情報を描画することになる。描画する方法としては、文書のウィンドウに新たな描画オブジェクトを開き、受信した座標を線でつないで描画することで実現することができる(S55〜S58)。
加筆が終了した時点で(S59「Y」)、ペン型座標入力装置7は加筆終了の信号を情報処理装置4へ送信し、加筆終了の信号を受け取った情報処理装置4は、ウィンドウへの描画を終了する。このようにして文書「patent.doc」に一つのオブジェクトが加えられる(S60)。本実施形態では加筆した情報をリアルタイムでコンピュータのディスプレイ上に表示し、実際に加筆した情報が正しく処理されているかどうかをすぐに確認できるのでユーザにとって大きなメリットになる。また、情報処理装置4では受信した座標情報を数列テキストとして同時に別ファイルとして保存する。文書が巨大な場合など、ユーザが後にアプリケーションを開いて加筆されたデータを確認したいときに素早く確認することが不可能な場合に、加筆されたデータのみを表示・確認させることができるので有効である。
なお、これまで説明した本実施形態では、紙に2次元コードを印刷した場合について説明したが、この方法は紙に制限されるわけではなく、ペーパーライクディスプレイ、フィルム、ホワイトボード等、加筆を可能とするものならば有効に機能する事は言うまでもない。
The coordinate information sequentially transmitted from the pen-type coordinate
When the writing is finished (S59 “Y”), the pen-type coordinate
In the above-described embodiment, the case where a two-dimensional code is printed on paper has been described. However, this method is not limited to paper, and a paper-like display, film, whiteboard, or the like can be added. Needless to say, it works effectively.
1…プリンタ、2…複写機、3…スキャナ、4…情報処理装置、5…記憶装置、6…文書管理データベース、7…ペン型座標入力装置、8…携帯情報端末、9…情報処理装置、10…2次元コード作成装置、21…印刷文書、22…2次元コード、23…ドット、24…最小ドット、61…装置本体、62…先端部、63…筆記具、64…画像読取装置、64a…光電変換素子、64b…光学系、65…マイコン、66…LCD表示装置、67…LED、68…ブザー、69…圧力センサ、70…バス、71…CPU、72…ROM、73…RAM、74…2次元コード読取装置、81…ドット検出器、82…コード枠検出器、83…データ取得器、84…データ置換器、85…誤り訂正器、86…データ復号器、87…ペン先座標算出器、88…既知情報メモリ、91…連続筆記検出器、92…筆記検出器、101…ドット候補検出器、102…最小輝度画素判定器、103…周辺ドット探索器、104…ドット探索領域判定器、11…ドット検出器、111…第一コーナー検出器、112…第一ドット追跡器、113…第二コーナー検出器、114…第二ドット追跡器、115…第三コーナー検出器、116…第三ドット追跡器、117…第四コーナー検出器、118…第四ドット追跡器、121…周囲ドット検出器、122…点対称ペア検出器、130…ドット中心検出器、131…射影パラメータ算出器、132…ペン先座標変換器、133…ドット座標補正手段、134…ドット位置推定手段、141…第1誤り訂正器、142…第2誤り訂正器、143…選択器
DESCRIPTION OF
Claims (16)
前記ドット検出手段は、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする2次元パターン読み取り装置。 The two-dimensional pattern composed of a plurality of dots enter the captured image captured, the dot detecting means for detecting the dots, the code frame detection means for detecting a code frame from the detected dots in the dot detecting means; In a two-dimensional pattern reading device comprising data decoding means for reading the dots in the code frame and decoding the data,
The dot detection means uses a 7 × 7 pixel region centered on the pixel of interest among the dots and noise included in the image when the difference in luminance between the pixel of interest and a neighboring pixel is a predetermined value or more. a dot candidate detection means for detecting a candidate of dots and, in the region smaller than the region where the dot candidate is detected, the minimum luminance by comparing the detected dot candidate and neighboring pixels by the dot candidate detecting means dots and minimum luminance pixel determination means for determining a dot, if no pixel is already determined dot adjacent pixels dots candidates that have a minimum brightness in said minimum brightness pixel determining means, said dot candidate having A two-dimensional pattern reading device comprising: surrounding dot searching means for determining a pixel.
前記ドット検出手段は、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定手段と、該ドット探索領域判定手段によりドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする2次元パターン読み取り装置。 The dot detection means includes a dot search area determination means for determining whether or not a predetermined small area is an area for searching for dots, and an area within the area determined as a dot search area by the dot search area determination means. When the difference in luminance between the target pixel and its neighboring pixels is greater than or equal to a predetermined value for each pixel, a 7 × 7 pixel area centered on the target pixel is used among the dots and noise included in the image The dot candidate detection means for detecting the dot candidate and the dot candidate detected by the dot candidate detection means in the area smaller than the area where the dot candidate is detected are compared with the neighboring pixels to obtain the minimum luminance. The minimum luminance pixel determining means for determining the dot having, and when there is no pixel already determined to be a dot in the adjacent pixels of the dot candidate having the minimum luminance by the minimum luminance pixel determining means, Tsu preparative candidate dot pixel and the surrounding dots searching means for determining the two-dimensional pattern reading apparatus characterized by comprising a.
前記データ復号手段により復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出手段を備え、 Coordinate calculation means for calculating a predetermined coordinate in the image coordinates based on the position information of the data decoded by the data decoding means and the coordinates of the code frame in the image,
前記座標算出手段は、前記コード枠の所定の位置に存在するドットの正確な座標を推定するドット中心検出手段と、該ドット中心検出手段により検出されたドットの中心座標と、復号された位置情報とから射影変換パラメータを算出する射影パラメータ算出手段と、該射影パラメータ算出手段により算出された射影パラメータを用いて画像座標中の所定の座標に演算を加える座標変換手段と、からなることを特徴とする2次元パターン読み取り装置。 The coordinate calculation means includes a dot center detection means for estimating an accurate coordinate of a dot present at a predetermined position of the code frame, a dot center coordinate detected by the dot center detection means, and decoded position information A projection parameter calculation means for calculating a projection conversion parameter from the above, and a coordinate conversion means for calculating a predetermined coordinate in the image coordinates using the projection parameter calculated by the projection parameter calculation means. A two-dimensional pattern reading device.
前記ドット検出ステップは、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出ステップと、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出ステップにより検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定ステップと、該最小輝度画素判定ステップで最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索ステップと、からなることを特徴とする2次元パターン読み取り方法。 The dot detection step uses a 7 × 7 pixel area centered on the pixel of interest among the dots and noise included in the image when the difference in luminance between the pixel of interest and a neighboring pixel is a predetermined value or more. A dot candidate detection step for detecting a dot candidate, and comparing the dot candidate detected by the dot candidate detection step with a neighboring pixel in an area smaller than the area where the dot candidate is detected, A minimum luminance pixel determining step for determining a dot having a dot, and a dot candidate is determined to be a dot pixel when there is no pixel already determined to be a dot in an adjacent pixel of a dot candidate having the minimum luminance in the minimum luminance pixel determining step A two-dimensional pattern reading method comprising: a surrounding dot search step.
前記ドット検出ステップは、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定ステップと、 The dot detection step includes a dot search region determination step for determining whether or not the predetermined small region is a region for searching for dots,
該ドット探索領域判定ステップで判定されたドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出ステップと、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出ステップで検出されたドット候補と近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定ステップと、該最小輝度画素判定ステップで最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索ステップと、からなることを特徴とする2次元パターン読み取り方法。 The dots included in the image when the difference in luminance between the pixel of interest and its neighboring pixels is greater than or equal to a predetermined value for each pixel in the area determined as the dot search area determined in the dot search area determination step And a dot candidate detection step of detecting a dot candidate using a 7 × 7 pixel area centered on the target pixel, and the dot candidate in an area smaller than the area where the dot candidate is detected A minimum luminance pixel determination step for comparing the dot candidate detected in the detection step with neighboring pixels to determine a dot having the minimum luminance, and a dot already adjacent to the dot candidate having the minimum luminance in the minimum luminance pixel determination step And a surrounding dot search step for determining the dot candidate as a dot pixel when there is no pixel determined as a two-dimensional pattern. Over down reading method.
前記データ復号ステップにより復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出ステップを有し、 A coordinate calculation step for calculating a predetermined coordinate in the image coordinates based on the position information of the data decoded in the data decoding step and the coordinates of the code frame in the image;
前記座標算出ステップは、前記コード枠の所定の位置に存在するドットの正確な座標を推定するドット中心検出ステップと、該ドット中心検出ステップで検出された中心座標と、復号された位置情報とから射影変換パラメータを算出する射影パラメータ算出ステップと、該射影パラメータ算出ステップで算出された射影パラメータを用いて画像座標中の所定の座標に演算を加える座標変換ステップと、からなることを特徴とする2次元パターン読み取り方法。 The coordinate calculation step includes a dot center detection step for estimating an accurate coordinate of a dot existing at a predetermined position of the code frame, a center coordinate detected in the dot center detection step, and decoded position information. A projection parameter calculation step for calculating a projection conversion parameter; and a coordinate conversion step for calculating a predetermined coordinate in the image coordinates using the projection parameter calculated in the projection parameter calculation step. Dimensional pattern reading method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005235075A JP4397866B2 (en) | 2005-08-12 | 2005-08-12 | Two-dimensional pattern reading device, two-dimensional pattern reading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005235075A JP4397866B2 (en) | 2005-08-12 | 2005-08-12 | Two-dimensional pattern reading device, two-dimensional pattern reading method |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2007052471A JP2007052471A (en) | 2007-03-01 |
JP2007052471A5 JP2007052471A5 (en) | 2008-09-25 |
JP4397866B2 true JP4397866B2 (en) | 2010-01-13 |
Family
ID=37916912
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005235075A Expired - Fee Related JP4397866B2 (en) | 2005-08-12 | 2005-08-12 | Two-dimensional pattern reading device, two-dimensional pattern reading method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4397866B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6686694B2 (en) | 2016-05-19 | 2020-04-22 | 株式会社リコー | Information processing device, data allocation method, program |
CN110543798B (en) * | 2019-08-12 | 2023-06-20 | 创新先进技术有限公司 | Two-dimensional code identification method and device |
-
2005
- 2005-08-12 JP JP2005235075A patent/JP4397866B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007052471A (en) | 2007-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7712664B2 (en) | 2-dimensional code pattern, 2-dimensional code pattern supporting medium, 2-dimensional code pattern generating method, and 2-dimensional code reading apparatus and method | |
JP4198456B2 (en) | Two-dimensional code pattern, two-dimensional code pattern carrying medium, two-dimensional code pattern generation method, two-dimensional code reading apparatus and reading method | |
US7580576B2 (en) | Stroke localization and binding to electronic document | |
US7950589B2 (en) | Program, information storage medium, two-dimensional code generation system, image generation system and printed material | |
JP2006085679A (en) | Two-dimensional code pattern, two-dimensional code generating method, two-dimensional code generator and printing medium | |
KR101122822B1 (en) | Enhanced approach of m-array decoding and error correction | |
JP4996245B2 (en) | Method, apparatus, computer program and storage medium for position decoding | |
JP2007213359A (en) | Two-dimensional code detection system and two-dimensional code detection program | |
US20170039463A1 (en) | Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system | |
US7991191B2 (en) | Clustering-scheme-encoded interfaces providing orientation feedback | |
EP1697880B1 (en) | Method, apparatus, computer program and storage medium for recording a movement of a user unit | |
JP4198392B2 (en) | Two-dimensional code reading device, image input device, two-dimensional code reading method, image input method, program thereof, and recording medium recording the program | |
US8254693B2 (en) | Image processing apparatus, image processing method and program | |
JP4397866B2 (en) | Two-dimensional pattern reading device, two-dimensional pattern reading method | |
JP5145833B2 (en) | Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium | |
JP4793868B2 (en) | Writing medium, writing information detection device, writing information detection method, program, and recording medium | |
JP4910635B2 (en) | Image processing apparatus and image processing program | |
JP4314148B2 (en) | Two-dimensional code reader | |
JP4159948B2 (en) | Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium | |
JP2006020144A (en) | Document processing system | |
JP2001101399A (en) | Method for detecting image inclination, method for detecting margin, method for correcting image inclination and document image processor | |
JP2007213358A (en) | Two-dimensional code detection system and two-dimensional code detection program | |
JP5879858B2 (en) | WRITING INFORMATION GENERATION DEVICE, WRITING INFORMATION GENERATION SYSTEM, AND PROGRAM | |
JP5434272B2 (en) | Information processing apparatus and information processing program | |
JP2006261772A (en) | Image forming apparatus and image forming method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080807 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080807 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090206 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090303 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090430 |
|
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: 20091013 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20091021 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121030 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131030 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |