JP4397866B2 - Two-dimensional pattern reading device, two-dimensional pattern reading method - Google Patents

Two-dimensional pattern reading device, two-dimensional pattern reading method Download PDF

Info

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
Application number
JP2005235075A
Other languages
Japanese (ja)
Other versions
JP2007052471A (en
JP2007052471A5 (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2005235075A priority Critical patent/JP4397866B2/en
Publication of JP2007052471A publication Critical patent/JP2007052471A/en
Publication of JP2007052471A5 publication Critical patent/JP2007052471A5/ja
Application granted granted Critical
Publication of JP4397866B2 publication Critical patent/JP4397866B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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次元ドットパターンをカメラのついたペンで筆記中に読み取り、該パターンを読み取ることにより、現在どの文書のどの位置に筆記中であるかを取得する技術が開示されている。
特開2000−293303公報 米国特許第5661506号 WO00/73981 特開2004−94907公報
A technique is known in which a two-dimensional code including encoded coordinate information is arranged on a print medium such as paper to specify the position and content of image information formed on the print medium. The conventional one-dimensional barcode has information only in the horizontal (horizontal) direction, whereas the two-dimensional code has information in two directions, horizontal and vertical, and therefore can represent more complicated information.
As a prior document, in Patent Document 1, optically readable code symbols are arranged in a matrix on the paper surface, and the code symbols are read by the camera at the same time as writing on the paper surface with a pen equipped with a small camera. A technique related to a system that reads writing information in real time by associating it with each other and associates the paper information before the writing with the writing information is disclosed.
Patent Document 2 is composed of a pattern representing the X-coordinate, Y-coordinate, and code direction, and a pattern that is larger than other patterns called homing patterns and arranged at the center of the code. Techniques have been proposed to prevent it from being visible.
Patent Document 3 discloses a two-dimensional code that can have information of 2 bits or more per dot by shifting the dot from a predetermined position. Such a two-dimensional code has coordinate information in the horizontal and vertical directions, and dots are continuously printed on the entire paper. By reading this, it is possible to determine what coordinate information the two-dimensional code has. The technology to acquire is disclosed.
Further, in Patent Document 4, a coordinate and document information are encoded, and a two-dimensional dot pattern printed on paper is read while writing with a pen with a camera. A technique for acquiring whether or not there is a medium is disclosed.
JP 2000-293303 A US Pat. No. 5,661,506 WO00 / 73981 JP 2004-94907 A

ところで、上記特許文献1では、文書に固有の情報と座標位置を同時に白黒のパターンに変換し、紙に印刷して、紙上の文書に光学ペンで加筆した情報を、白黒のパターンを読み取ることにより取得し、文書固有の情報と紙上の座標位置を取得し、元の文書に加筆情報を追加するようにしている。このような特許文献1の技術では白黒のパターンに誤り訂正機能を有する2次元コードを利用し、光学ペンによる読み取りが不安定な場合でも文書固有の情報と座標情報を取得できるような機能を有しているため、特開平7−141104号公報の技術において読み取りが不可能な場合でも読み取りが可能になっている。
しかしながら、この場合は2次元コードの大きさが大きくなるため、広い範囲の紙面を光学ペンで撮影しなければならず、被写界深度などの問題で読み取った画像の品質が良くなく、2次元コードを連続的に読み取ることが難しくなる。また、当該2次元コードは筆記中の紙面をカメラで撮像し、デコードするために作られたわけではなく、汎用の2次元コードであるため、デコード処理に時間がかかり、リアルタイムで処理を行うことが難しい。この技術の目的のひとつは連続的な加筆情報を取得するということであるため、2次元コードを読み取り、座標位置を連続的に取得できなければ、加筆情報の不連続点が発生し、正しい加筆情報が得られなくなるという欠点があった。
また上記した特許文献2は、一般の印刷装置を使用してコードを印刷することは事実上不可能であり、予め特殊な印刷装置において不可視インクを使用してコードを印刷する必要があり、ユーザが印刷したい文書の情報を印刷時に印刷媒体に埋め込むためには別のバーコードを重畳して印刷するなりの手段が必要となるばかりか、文書に加筆する前に必ずそのバーコードを読ませる必要があり、ユーザにとって不便になる。
仮に、バーコードを読む作業を忘れて別の文書に加筆を行うならば加筆情報と電子文書とのリンクが矛盾を起こして重大な問題となる。また、仮に可視インクで印刷したとしても他のパターンより大きいパターン(マーク)を使用しており、人の目につきやすく、文書や加筆の可読性が損なわれるという欠点があった。
By the way, in Patent Document 1, information unique to a document and coordinate positions are converted into a monochrome pattern at the same time, printed on paper, and information added to the document on paper with an optical pen is read from the monochrome pattern. It acquires the information unique to the document and the coordinate position on the paper, and adds the additional information to the original document. Such a technique of Patent Document 1 uses a two-dimensional code having an error correction function for a black and white pattern, and has a function for acquiring document-specific information and coordinate information even when reading with an optical pen is unstable. Therefore, even when reading is impossible in the technique of Japanese Patent Laid-Open No. 7-141104, reading is possible.
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 Patent Document 2 described above, it is practically impossible to print a code using a general printing apparatus, and it is necessary to print a code using invisible ink in a special printing apparatus in advance. In order to embed information on the document that the user wants to print in the print medium, it is necessary not only to have another means of printing with another barcode superimposed, but also to read the barcode before adding it to the document. This is inconvenient for the user.
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 Patent Document 3, two-dimensional information having a code position information of 6 × 6 dots is obtained by placing two or more bits of information on one dot by disposing dots from two-dimensionally spaced points. The code is disclosed. With this technology, the amount of position shift is as small as 30 μm, and with the resolution (1200 dpi) of a laser printer that is generally popular, it is possible to reproduce the correct amount of shift due to paper feeding accuracy, unevenness of the rotational speed of the photoreceptor, and the like. difficult.
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 Patent Document 3 occurs. there were.
Patent Document 4 discloses a method for reading a two-dimensional code pattern without using the peripheral portion of the read image. Although a certain degree of improvement can be expected in speeding up, the processing speed is dramatically improved. Cannot be achieved.
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画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする
請求項に記載の発明は、前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用する請求項1記載の2次元パターン読み取り装置を特徴とする。
請求項に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出手段と、該ドット検出手段において検出されたドットからコード枠を検出するコード枠検出手段と、前記コード枠内のドットを読み取ってデータを復号するデータ復号手段とを備える2次元パターン読み取り装置において、前記ドット検出手段は、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定手段と、該ドット探索領域判定手段によりドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出手段と、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出手段により検出されたドット候補近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定手段と、該最小輝度画素判定手段で最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索手段と、からなることを特徴とする。
To achieve the above object, an invention according to claim 1, the two-dimensional pattern composed of a plurality of dots inputs the captured image captured, the dot detecting means for detecting the dots in the dot detecting means code frame detection means for detecting a code frame from the detected dots, in a two-dimensional pattern reading apparatus and a data decoding means for decoding data read dot of the code frame, the dot detecting unit, the pixel of interest When a difference in luminance between the pixel and its neighboring pixels is equal to or greater than a predetermined value, a dot candidate is detected using a 7 × 7 pixel region centered on the pixel of interest among dots and noise included in the image. a dot candidate detecting means, in an area smaller than the area where the dot candidate is detected, a dot candidate and neighboring image detected by the dot candidate detecting means And the minimum luminance pixel determination means for determining a dot having the minimum luminance by comparing the preparative, no pixels which previously determined the dots adjacent pixels Dots candidates that have a minimum brightness in said minimum brightness pixel determining means In this case, it is characterized by comprising surrounding dot searching means for determining the dot candidate as a dot pixel .
The invention according to claim 2 is characterized in that the minimum dot luminance pixel determining means uses a 5 × 5 pixel area centered on the target pixel.
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.

請求項に記載の発明は、前記ドット探索領域判定手段は、水平1画素垂直1画素おきに小領域を設定する請求項記載の2次元パターン読み取り装置を特徴とする。
請求項に記載の発明は、前記ドット探索領域は、3×3画素からなる小領域である請求項記載の2次元パターン読み取り装置を特徴とする。
請求項に記載の発明は、前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用する請求項記載の2次元パターン読み取り装置を特徴とする。
請求項に記載の発明は、請求項1乃至6の何れか一項記載の2次元パターン読み取り装置において、前記データ復号手段により復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出手段を備え、前記座標算出手段は、前記コード枠の所定の位置に存在するドットの正確な座標を推定するドット中心検出手段と、該ドット中心検出手段により検出されたドットの中心座標と、復号された位置情報とから射影変換パラメータを算出する射影パラメータ算出手段と、該射影パラメータ算出手段により算出された射影パラメータを用いて画像座標中の所定の座標に演算を加える座標変換手段と、からなることを特徴とする。
The invention according to claim 4 is the two-dimensional pattern reading device according to claim 3 , wherein the dot search area determination means sets a small area every other horizontal pixel and vertical pixel.
The invention according to claim 5, wherein the dot searching area is characterized dimensional pattern reading apparatus according to claim 3, wherein a small region consisting of 3 × 3 pixels.
The invention according to claim 6, wherein the dot minimum luminance pixel determination means is characterized dimensional pattern reading apparatus according to claim 3, wherein the use of the region of 5 × 5 pixels centered on the pixel of interest.
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.

請求項に記載の発明は、前記ドット中心検出手段は、ドットを含む小領域において最小輝度を有する画素を検出するドット座標補正手段と、該ドット座標補正手段により検出された画素を中心とした小領域で所定の演算を行うことによりドットの正確な位置を推定するドット位置推定手段と、からなる請求項記載の2次元パターン読み取り装置を特徴とする。
請求項に記載の発明は、複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出ステップと、該ドット検出ステップにおいて検出されたドットからコード枠を検出するコード枠検出ステップと、前記コード枠内のドットを読み取ってデータを復号するデータ復号ステップとからなる2次元パターン読み取り方法において、前記ドット検出ステップは、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする7×7画素の領域を使用してドットの候補を検出するドット候補検出ステップと、前記ドット候補が検出される領域よりも小さな領域において、前記ドット候補検出ステップにより検出されたドット候補近傍画素とを比較して最小輝度を有するドットを判定する最小輝度画素判定ステップと、該最小輝度画素判定ステップで最小輝度を有するドット候補の隣接画素に既にドットと判定された画素がない場合に、前記ドット候補をドット画素と判定する周囲ドット探索ステップとからなることを特徴とする。
請求項10に記載の発明は、前記ドット最小輝度画素判定ステップは、注目画素を中心とする5×5画素の領域を使用する請求項記載の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 claim 7 , further comprising dot position estimating means for estimating an accurate position of a dot by performing a predetermined calculation in a small area.
The invention according to claim 9, the two-dimensional pattern composed of a plurality of dots enter the captured image captured, the dot detection step of detecting the dot code frame from the detected dots in the dot detecting step In a two-dimensional pattern reading method comprising: a code frame detection step for detecting an image; and a data decoding step for reading the dots in the code frame and decoding the data, the dot detection step includes the luminance of the pixel of interest and its neighboring pixels if the difference is equal to or greater than a predetermined value, among the dots and noise included in the image, and the dot candidate detection step of detecting a candidate of dots using an area of 7 × 7 pixels centered on the pixel of interest, the in an area smaller than the area where the dot candidate is detected, the dot candidate detection candidate dots and near detected by the step And the minimum luminance pixel determination step of determining a dot having the minimum luminance by comparing the pixel, the pixel that has already been determined that the dot in the adjacent pixel of Dots candidates that have a minimum brightness in said minimum brightness pixel determination step If no, the surrounding dots search step of determining the dot candidate dot pixel, characterized in that it consists of.
The invention according to claim 10, wherein the dot minimum luminance pixel determination step is characterized dimensional pattern reading method of claim 9 wherein using an area of 5 × 5 pixels centered on the pixel of interest.
The invention according to claim 11, the two-dimensional pattern composed of a plurality of dots enter the captured image captured, the dot detection step of detecting the dot code frame from the detected dots in the dot detecting step In a two-dimensional pattern reading method comprising a code frame detecting step for detecting the data and a data decoding step for reading the dots in the code frame and decoding the data, the dot detecting step is configured to search for a dot in a predetermined small region. A dot search region determination step for determining whether or not the region is to be performed, and a pixel of interest and its neighboring pixels for each pixel in the region determined as the dot search region determined in the dot search region determination step If the difference in luminance between is equal to or greater than a predetermined value, among the dots and noise included in the image, centered on the pixel of interest 7 A dot candidate detecting step of detecting a dot candidate using an area of 7 pixels in an area smaller than the area where the dot candidate is detected, the detected dot candidate and neighboring pixels in the dot candidate detecting step and the minimum luminance pixel determination step of determining a dot having the minimum luminance comparison, if no pixel is already determined dot adjacent pixels dots candidates that have a minimum brightness in said minimum brightness pixel determination step And a surrounding dot searching step for determining the dot candidate as a dot pixel.

請求項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 claim 12, the dot search area determination step is characterized dimensional pattern reading method according to claim 11, wherein setting a small region in the horizontal one pixel vertically every other pixel.
The invention according to claim 13, wherein the dot searching area is characterized dimensional pattern reading method according to claim 11, wherein a small region consisting of 3 × 3 pixels.
The invention according to claim 14 is characterized by the two-dimensional pattern reading method according to claim 11 , wherein the dot minimum luminance pixel determination step uses a 5 × 5 pixel area centered on the target pixel.
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 claim 15, further comprising a dot position estimating step for estimating an accurate position of the dot by performing an operation.

本発明によれば、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-dimensional code 22 is an optically readable code composed of a plurality of black dots, arranged in a matrix with black dots regularly arranged in the vertical and horizontal directions as a boundary. When the document 21 is printed, the pattern of the document and the two-dimensional code 22 are printed simultaneously. The two-dimensional code 22 includes, for example, identification (ID) information of an electronic document that is the original of the printed document on the surface of the printed document 21 on which the two-dimensional code 22 is printed, and information that indicates the coordinates of the two-dimensional code 22 Is encoded. In FIG. 1, for the sake of explanation, the document is not shown, and only a two-dimensional code such as a line spacing or a margin is printed.
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-dimensional code 22b. “Coordinate = 10, document ID = 10”, the two-dimensional code 22c has “horizontal coordinate = 95, vertical coordinate = 11, document ID = 10”, and the two-dimensional code 22d has “horizontal coordinate = 96, vertical coordinate = 11, “Document ID = 10” is encoded.

図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-dimensional code 22 and the dots 23 constituting the boundary are printed in 2 × 2 units of the minimum dots 24 of the printer. In the case of a 1200 dpi printer, since the minimum dot diameter of the printer is 21 μm, the dot diameter of the two-dimensional code 22 is ideally 42 μm. Actually, the diameter is a little larger due to the dot gain. The positions where the dots 23 are arranged in the horizontal and vertical directions are determined with an interval of 6 times the dot diameter. In this case, even when all the dots are present at the dot arrangement position, the area ratio occupied by the dots is ideally 2.8%, and even if a dot gain of about 50% is expected, it is less than 5%. This area ratio looks light gray to the human eye, so there are no problems such as being difficult to see the document due to the dots being obstructed or being difficult to see the added text.
When the code arrangement is determined as described above, the two-dimensional code 22 has a horizontal size of 2 mm and a vertical size of 3 mm, and the horizontal coordinate = 95 means that the upper left corner of the two-dimensional code has the upper left corner of the page as the origin. It means that it is at a position of 190 mm in the horizontal direction. As will be described in detail later, the horizontal 2 mm and vertical 3 mm square sizes are similar to A4 size paper, and the data length for storing the horizontal / vertical coordinate information can be used effectively.
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-dimensional code 22, the upper left corner (the intersection of the vertical line H1 and the horizontal line V1) is located at a position of 190 mm horizontally and 30 mm vertically from the upper left of the page, and the ID of the printed document is “10”. Information.

図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-dimensional code 22 will be described using this figure. The two-dimensional code 22a has 7 × 11 cells surrounded by H1, H2, V1, and V2 constituting a code frame. A cell is a unit in which dots can be hit, and includes a maximum of 77 dots.
An area 31 is an area for arranging data representing horizontal coordinates, and has 4 × 2 cells. Since one cell corresponds to one bit, the area 31 has a capacity of 1 byte.
The area 32 is an area in which data representing vertical coordinates is arranged, and has a capacity of 1 byte like the horizontal coordinates. A4 size paper has a horizontal size of 210 mm and a vertical size of 297 mm. One size of the two-dimensional code 22 is horizontal 2 mm and vertical 3 mm, so that data in 105 levels in the horizontal direction and 99 levels in the vertical direction are required, but 1 byte has sufficient capacity. Yes. When the paper size is A3, the size is 297 mm horizontally and 420 mm vertically, and therefore, data in 148 steps in the horizontal direction and 120 steps in the vertical direction are required. In this case, a data capacity of 1 byte is sufficient. Similarly, even in the case of the A2 size, since the size is 420 mm in the horizontal direction and 594 mm in the vertical direction, data in 210 steps in the horizontal direction and 198 steps in the vertical direction are necessary. In this way, when the vertical and horizontal lengths of the two-dimensional code are determined according to the difference in vertical and horizontal lengths of the paper, even if the data length representing the horizontal and vertical coordinates is fixed to the same fixed size, a wide range of paper sizes can be handled. It is like that.
The area 33 is an area for arranging data representing a document ID, and has a capacity of 4 × 6 24 bits (= 3 bytes). Regions 34 to 37 are regions for arranging codes for error correction and each have a capacity of 1 byte. Therefore, the error correction code is composed of a total of 4 bytes. The areas 38 and 39 are patterns for representing the vertical direction of the code. The area 38 is used to determine the top and bottom of the code with a pattern of 3 × 1 black dots and the area 39 is a pattern without 2 × 1 dots.

図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 areas 31 to 37 in FIG. 3 indicates the MSB, and “8” indicates the LSB.
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 printer 1, a copier 2, a scanner 3, an information processing device 4, a storage device 5, a document management database 6, a pen-type coordinate input device 7, a portable information terminal 8, an information processing device 9, The two-dimensional code creation device 10 is configured and connected via a network.
The printer 1 is a printing device that performs printing, the scanner 3 is a reading device that reads an image, and the copier 2 is a multifunction device having functions such as a copy, a scanner, a fax machine, and a printer. The information processing device 4 controls the pen-type coordinate input device 7 and the portable information terminal 8, and the information processing device 9 controls the storage device 5. The configuration of the pen-type coordinate input device 7 will be described later.
Next, in the document management system shown in FIG. 5, the above-described two-dimensional code 22 is created and used as print data to be superimposed on the document to be printed, and the procedure until the document is printed will be described with reference to FIG. The creation of the two-dimensional code 22 is executed by the printer driver in the information processing apparatuses 4 and 9 when the information processing apparatuses 4 and 9 shown in FIG.
In this case, the printer driver first asks the document management database 6 in the storage device 5 to issue a document ID for each page of the document 11 to be printed (S1). When the document ID is issued, the data to be encoded is acquired by combining it with the coordinate information on the document (S2). For example, the document ID shown in FIG. 7A is “123456”, and the coordinate information (X, Y) is in mm units (24, 123). Next, the data is encoded (S3). As a result, the document ID converts a 6-digit number into a 3-byte binary value as shown in FIG. Also, the horizontal coordinate is 24/2 = 12, the vertical coordinate is 123/3 = 41, and conversion is performed so that each horizontal and vertical can be accommodated by 1 byte. The coordinate information is thus converted into a 2-byte binary value and combined with the document ID, for a total of 5-byte data. After encoding, an error correction code is added based on the encoded data (S4). In the example shown in FIG. 7C, a 4-byte error correction code is added to 5-byte data. A Reed-Solomon code is adopted as the error correction code. The Reed-Solomon code is a powerful error correction method that can correct an error in byte units, and can correct an error that is less than half of the error correction code length. The details of Reed-Solomon error correction codes are described in many books such as Shogodo “Code Theory (Computer Fundamental Course 18)” by Miyagawa, Iwabuchi, and Imai. In the case of this embodiment, as shown in FIG. 7C, the error correction code length is 4 bytes, so that 2-byte error correction is possible.

このようにして作成されたエンコードデータおよび誤り訂正符号データは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 printer 1 or the copying machine 2. When printing is completed normally, information such as a document, page, document ID, etc., that has been normally printed is registered in the ID management table in the document management database 6.
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 document 11 stored in the storage device 5 of the document management system shown in FIG. 5 is edited (S11), a print command is issued, and printing of the document is executed by the printer 1 or the copying machine 2 (S11). S12). If printing is completed normally (S13), the document ID that has been successfully printed is registered in the ID management table in the document management database 6 (S14).
FIG. 9 is a diagram showing an example of a document printed with a two-dimensional code. A print document 21 shown in FIG. 9A is a form document having a predetermined format, for example, and a two-dimensional background. The code 22 is printed. FIG. 8B is an enlarged view of a part of the print document 21, which shows alignment dots that also serve as a code frame of the two-dimensional code 22 and data dots that are arranged in the frame. Two-dimensional codes 22 are regularly arranged.

さて、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 input device 7 that performs writing next, captures an image of the paper, decodes the two-dimensional code, and obtains coordinate information is shown in FIG. This will be described with reference to the block diagram shown.
The pen-type coordinate input device 7 shown in FIG. 5 includes a writing instrument-like device main body 61 that can be held by a person and perform a writing operation. A writing tool 63, that is, a tip of a ballpoint pen, a mechanical pencil, or the like is attached to the tip 62 of the apparatus main body 61 so that the document can be added. The image reading device 64 provided on the apparatus main body 61 side includes a photoelectric conversion element 64a such as a CCD and an optical system 64b including a lens, and reads an image on the print document 21. The image reading device 64 can be provided with illumination as necessary. The reading resolution of the CCD is 320 × 240 pixels.
A microcomputer 65 is mounted on the apparatus main body 61, and an image reading device 64 is connected to the microcomputer 65. The microcomputer 65 performs various processes based on the image on the print document 21 read by the image reading device 64. That is, the read two-dimensional code 22 is decoded, and coordinates on the paper surface of the two-dimensional code are detected (details will be described later). The microcomputer 65 can be connected to the information processing apparatus 4 such as a PC outside the apparatus main body 61, and can output data stored in the microcomputer 65 to the information processing apparatus 4. In FIG. 6, the image reading device 64, a power source that supplies power to the microcomputer 65, and the interface between the microcomputer 65 and the information processing device 4 are not shown.

マイコン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 microcomputer 65 is connected to a CPU 71, a ROM 72, a RAM 73, and a two-dimensional code reader 74 via a bus 70. That is, the CPU 71 is connected to various external devices via the bus 70. In the ROM 72, a program for controlling the operation of the pen-type coordinate input device 7 shown in FIG. The RAM 73 temporarily stores an image read from the image reading device 64, intermediate data generated during code reading, a document ID and coordinates obtained when a two-dimensional code is decoded, and the like.
The two-dimensional code reading device 74 is configured as shown in FIG. 11, and detects the two-dimensional code from the image stored in the RAM 73 and reads it to detect the document ID and coordinates. The two-dimensional code reader 74 will be described later.
Further, an LCD display device 66, an LED 67, or a buzzer 68 is connected to the microcomputer 65 shown in FIG. Thereby, the microcomputer 65 displays the information received from the information processing device 4 on the LCD display device 66, or when specific information is received, blinks the LED 67 or sounds the buzzer 68 to the outside. You can be notified.
The apparatus main body 61 is provided with a pressure sensor 69 that detects whether or not the tip end portion 62 of the pen-type coordinate input device 7 is in contact with the writing surface. The pressure sensor 69 senses the pressure transmitted through the writing tool 63 when the tip end portion 62 comes into contact with the writing surface, and transmits the sensed information to the microcomputer 65.
If the position of the front end 62 on the print document 21 is continuously detected using the pen-type coordinate input device 7 configured as described above, the movement locus of the front end 62 on the print document 21 can be obtained. it can. Moreover, the writing locus when writing on the paper surface can be obtained faithfully by the pressure sensor 69 that detects whether the tip 62 of the pen-type coordinate input device 7 is in contact with the writing surface. If a document that does not have a two-dimensional code is added to a document that is not to be read by the pen-type coordinate input device 7, an unreadable display is displayed on the LCD display device because the code cannot be read despite writing. 66 or LED 67 is used to notify the user.

次に、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-dimensional code reader 74. As described above, the two-dimensional code reader 74 is built in the microcomputer 65 in the pen-type coordinate input device 7 shown in FIG. 5 (see FIG. 10).
In the two-dimensional code reading device 74 shown in FIG. 11, the image (8-bit image) on the paper surface read by the image reading device 64 is input to the dot detector 81, and the dot detector 81 detects the dot of the two-dimensional code 22. To do. The code frame detector 82 detects a frame of one two-dimensional code 22 and its position from a plurality of two-dimensional codes 22 in the image from the dots detected by the dot detector 81. An example of the read image is shown in FIG.
When the code frame detector 82 can detect the position of the two-dimensional code 22, the data acquisition unit 83 acquires “0” or “1” data according to each monochrome cell of the two-dimensional code 22. The data is rearranged according to the data arrangement rule of the dimension code 22.
The data replacer 84 reads the known document ID from the known information memory 88 based on the signal indicating whether or not the continuous writing is output from the continuous writing detector 91 with respect to the acquired data. The part corresponding to the document ID of the data acquired from the two-dimensional code 22 is replaced with a known document ID.
Detection information of the writing detector 92 is input to the continuous writing detector 91. The writing detector 92 receives an output signal of a pressure sensor 69 that detects a pressure felt at the pen tip when writing by the pen-type coordinate input device 7, and determines whether writing is in progress. When the writing state continues for a predetermined time or more, it is determined that continuous writing is being performed, and otherwise, it is determined that continuous writing is not being performed, and the detection result is output to the continuous writing detector 91.

誤り訂正器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 error corrector 85 performs error correction on the output of the data replacer 84. The error corrector 85 outputs determination information as to whether or not error correction has been successful and data after error correction. This error-corrected data is a document ID and coordinate information.
The error correction determination information output from the error corrector 85 is input to the data decoder 86, the nib coordinate calculator 87, and the known information memory 88, and is used to control each device.
In the data decoder 86, if the error correction determination information is error correction success, the data decoder 86 operates. If the error correction fails, the data decoder 86 does not operate. The nib coordinate calculator 87 calculates and outputs the nib coordinates if the error correction determination information indicates that the error correction is successful, and the output of the writing detector 92 is in writing. If it is not in writing, a coordinate value (-1, -1) or the like which is impossible in reality is output. Further, in the known information memory 88, when the error correction is successful, a part corresponding to the document ID of the error-corrected information is newly stored.
Here, a specific example of data replacement in the data replacer 84 is shown in FIG.
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-dimensional code 22 from the image and reconstructing the data from the two-dimensional code dots. Here, if there is an error in the Y coordinate of the observation data and the first and second ID information, there are three errors in this case, and the error corrector 85 in the subsequent stage cannot perform error correction. End up.
Therefore, in order to prevent the error corrector 85 from performing error correction, the document ID is replaced with known information stored in the known information memory 88 as shown in the third row. As a result, there is no error in the part of the ID information, and only one byte of the Y coordinate becomes an error, so that error correction is possible and correct coordinate information and ID information can be obtained.
The data that has been successfully corrected is decoded by the data decoder 86 into coordinate information and document ID on the paper. The ID on the paper is horizontal coordinate = 24 mm, vertical coordinate 123 mm, and document ID = 23. Using the coordinates and the coordinates on the image of the two-dimensional code 22 that has been successfully decoded, the pen tip coordinate calculator 87 calculates the coordinates of the pen tip on the paper (details will be described later). Thereby, the position of the front-end | tip part 62 of the pen-type coordinate input device 7 is decided.

次に、図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 area 102 in FIG. Area 101 is the entire image area (320 × 240 pixels), and area 102 is an area of 280 × 220 pixels. In the outermost area, the image quality is not good and it may be difficult to perform correct dot detection, and we do not want to perform as wasted processing as possible for real-time processing. Dot detection is performed.
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 dot candidate detector 101 detects a dot candidate when the difference in luminance between the target pixel Z and its neighboring pixels is greater than or equal to a predetermined value.
The minimum luminance pixel determination unit 102 determines whether the dot candidate detected by the dot candidate detector 101 has the minimum luminance as compared with the neighboring pixels.
The peripheral dot search unit 103 checks whether there is a pixel already determined to be a dot around the dot candidate determined to be the minimum luminance pixel by the minimum luminance pixel determination unit 102, and if there is no dot in the periphery, the dot candidate is a dot It is finally determined that
The dot candidate detector 101 determines that the pixel Z is a dot candidate when the following eight expressions (1) to (8) are satisfied simultaneously. Th is a threshold value having a predetermined value, and for the sake of simplicity, each alphabet indicating the pixel position in FIG. 16 represents a pixel value. The input image represents black = 0 and white = 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)

次に上記の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 pixel determination unit 102 to determine whether or not it has the minimum luminance. When the determination criteria satisfy all the following 12 formulas (9) to (20), it is determined that the dot candidate has 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 pixel determination unit 102, whether or not there is a pixel already determined to be a dot by the dot detector in the surroundings U, V, W, and X. Is detected by the surrounding dot searcher 103, and if there is no dot in the surroundings U, V, W, and X, it is first determined that the pixel Z is a dot.
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 small area 3 × 3 pixels for searching for dots. A dot candidate detector 101 for a 7 × 7 pixel window centered on each pixel in a 3 × 3 pixel region, and a pixel Z detected as a dot candidate by the dot candidate detector 101 is compared to surrounding pixels. A minimum luminance pixel determining unit 102 that determines whether or not the luminance is low, and a peripheral dot searcher 103 that checks whether there is a pixel that has already been determined to be a dot around a dot candidate that has been determined to be the minimum luminance pixel; The dot candidate is finally determined to be a dot if there is no dot in the vicinity by the peripheral dot searcher 103.
The dot search area determination unit 104 determines whether or not a dot search area is to be searched every other pixel in the horizontal and vertical directions. As shown in FIG. 16, when all the expressions (1) to (8) are satisfied with 7 × 7 pixels centered on the Z pixel, an area of 3 × 3 pixels centered on the Z pixel is obtained. It is determined that the region is to search for dots.
The dot candidate detector 101 and the minimum luminance pixel determiner 102 perform processing on each pixel in the 3 × 3 pixel region centered on the Z pixel. This processing has already been described.
Finally, the peripheral dot searcher 103 searches for a pixel already determined to be a dot around the pixel Z (U, V, W, X, Y). In the method of this embodiment, since there are pixels that are determined whether or not they are dots, it is necessary to determine whether or not dots have already been detected for the pixel Y as well.

次に、図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 code frame detector 82 includes a first corner detector 111 that determines whether a certain dot X is a corner of a code from an image in which dots are detected, and the first corner detector 111. A first dot tracker 112 that detects eight pixels of a code frame composed of dots in four directions and detects a second corner candidate pixel (B, D). Then, a second corner detector 113 for detecting whether or not the second corner candidate pixel detected by the first dot tracker 112 is the second corner, and 12 of a code frame composed of dots from the second corner. A second dot tracker 114 that detects the third corner candidate pixel (G, E) by tracking pixels in the dot tracking direction (clockwise direction) of the first dot tracker 112; Further, a third corner detector 115 for detecting whether or not the third corner candidate pixel detected by the second dot tracker 114 is the third corner, and the eight pixels of the code frame from the third corner are converted into the first number. A third dot tracker 116 that detects the fourth corner candidate pixel (C, A) by tracking in the dot tracking direction (clockwise direction) of the two-dot tracker 114, and the third dot tracker 116 detected by the third dot tracker 116. A fourth corner detector 117 for detecting whether or not the four corner candidate pixels are the fourth corner pixels, and a fourth dot tracking for detecting a dot constituting a code frame between the first corner and the fourth corner. Instrument 118. By this code frame detector 82, a maximum of two code frames of the two-dimensional code 22 can be detected, and the coordinates of the dots constituting the code frame on the image can be detected.

ここで、第一コーナー検出器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 dot detector 121 that detects whether or not there are four or more dots around a pixel of interest where dots are present, and the detected surroundings. It is composed of a point-symmetric pair detector 122 for detecting two sets of dot pairs whose target is a target pixel from the dots.
The surrounding dot detector 121 detects dots existing around the pixel of interest N among 17 × 17 pixels centering on the pixel of interest N shown in FIG. In the case of FIG. 21B, there are six pixels A to F. This is detected as a surrounding dot pixel. Among these A to F, two sets are detected that are close to N and whose intermediate point is close to N. For example, in the case of FIG. 21B, two sets of (B, D) and (C, F) correspond to it. A and E are judged to be noise and are removed. When the dot N of the target pixel and two surrounding point-symmetric pairs are detected in this way, the target pixel N is detected as the first corner. The area to be detected by the first corner detector 111 is an area 103 of 180 × 120 pixels shown in FIG. 14, and has approximately half the size of the image area 101 in the vertical and horizontal directions. Further, the direction of searching for dots is not normal raster scanning, but spiral scanning from the inside to the outside as shown in FIG. The reason for this is that the vicinity of the center of the image has better image quality than the surroundings and the probability of reliable dot detection is high, so detecting the code pattern from or near the center of the image takes less time. The possibility that it can be detected is increased. Therefore, it is very advantageous for real-time processing.
The reason why the area 103 in which the first corner detector 111 operates is smaller than the area 101 of the entire image or the operation area 102 of the dot detector 81 is that, when the code pattern exists in the area 102, the innermost part of the code pattern inside the image This is because the area 103 is the existence range of the corners existing in FIG.

次に、ドット追跡器の詳細を図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 fourth dot tracker 118 has the same configuration as that of the second dot tracker 114. The fourth dot tracker 118 tracks 11 times in the directions of C → X and A → X shown in FIG. Since X is already known to be the first corner, the code frame is detected by the tracking path (1) and tracking path (2) shown in FIG. In this way, the code frame of the two-dimensional code is detected. As for which code is used when decoding a two-dimensional code, the one with the larger horizontal coordinate of the code center on the image is given priority. If this code cannot be decoded, the other code is used for decoding.
The image area tracked by the first dot tracker 112, the second dot tracker 114, the third dot tracker 116, and the fourth dot tracker 118 is the area 104 (260 × 200 pixels) in FIG. An area used for corner detection in the first, second, third, and fourth corner detectors 111, 113, 115, and 117 is slightly smaller than the area 102 where the dots are detected. This is because a point-symmetric pair dot is detected in the range using the pixel region.

次に、図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 data acquisition unit 83 shown in FIG. 11 will be described with reference to FIG.
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 calculator 87 shown in FIG. 11 will be described.
The nib coordinate calculator 87 includes a dot center detector 130, a projection parameter calculator 131, and a nib coordinate converter 132, as shown in FIG. The code center coordinates on the image, the corresponding code corner coordinates on the paper surface, and the captured gray scale image are input to the dot center detector 130, and the center position of the dot used for projection parameter calculation is estimated from them.
FIG. 26 is a diagram showing the configuration of the dot center detector 130.
As shown in FIG. 26, the dot center detector 130 includes a dot coordinate correction unit 133 that detects a pixel having the minimum luminance in a small region including dots, and a pixel detected by the dot coordinate correction unit 133 as a center. The dot position estimation unit 134 estimates the exact position of the dot by performing a predetermined calculation in the small area.
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)

Figure 0004397866
(式22)
Figure 0004397866
上記式(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 dot detector 11 is detected in the original grayscale input image. To do. This pixel position is assumed to be (i, j). Further, the value of each pixel in the 3 × 3 pixel window centered on the pixel position (i, j) is represented by v (x, y) (where i−1 ≦ x) as shown in FIG. ≦ i + 1, j−1 ≦ y ≦ j + 1), and the center coordinates (ic, jc) are estimated using the following calculation formula.
(Formula 21)
Figure 0004397866
(Formula 22)
Figure 0004397866
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 input device 7. The coordinates of Ps are always constant. This is because in the pen-type coordinate input device 7, the image reading device 64 and the tip 62 are fixed. Depending on the configuration of the pen-type coordinate input device 7, the distal end portion 62 may be inside an image captured by the image reading device 64 or may be outside the image. If it is outside the image, its coordinates will exceed a negative value or maximum image 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 input device 7. Since Ar is determined by decoding the code, Br to Dr which are adjacent corners are automatically determined. What is to be calculated is the coordinates of Pr. The projection conversion formula is converted from image coordinates to paper plane coordinates by the formula shown in FIG. Although the conversion coefficients b1 to b8 are unknown numbers, eight linear equations are created according to the relationship of the corner coordinates. The parameters b1 to b8 are calculated by solving the simultaneous equations.
The nib coordinate converter uses this parameter to convert Ps to Pr to determine the coordinates of the tip 62 on the paper surface.
The nib coordinate converter 132 uses this parameter to convert Ps to Pr to determine the coordinates of the tip 62 on the paper surface.

次に、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 first error corrector 141, a second error corrector 142, and a selector 143 are provided. It is said.
The functions of the first error corrector 141 and the second error corrector 142 have the same functions as the error corrector 85 shown in FIG. The selector 143 always selects the output of the second error corrector 142 when the continuous writing detector 91 determines that continuous writing is in progress, and performs the same operation as the two-dimensional code reader shown in FIG. I do.
On the other hand, when it is determined from the output of the writing detector 92 that writing is in progress but not continuous writing, that is, at the start of writing, the selector 143 performs the following operation. When the error correction determination information of the first error corrector 141 is error correction success, the output of the first error corrector 141 is selected. When the error correction determination information of the first error corrector 141 is error correction failure, the output of the second error corrector 142 is selected.
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 code reading device 74 described so far reads the code by hardware, but it may be performed by software. In this case, a program for realizing the two-dimensional code reading method is a microcomputer 65 (see FIG. 5). ) ROM 72 (see FIG. 10). Then, the instructions of the program are sequentially loaded into the CPU 71, the instructions are executed, and the reading process of the two-dimensional code 22 is performed. The processing procedure will be described with reference to the flowcharts shown in FIGS.

まず、画像入力を行った後、図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 tip 62 of the pen-type coordinate input device 7 is always pressed against the paper surface. Data replacement is performed using (document ID). After data replacement, error correction is performed in step S33. If it is determined in step S34 that the error correction has been successful, the known information (document ID) decoded in step S35 is stored and the error correction process is completed. Thereafter, the process proceeds to step S26 shown in FIG. 31A, the original data (coordinate information) is restored, and the coordinates on the paper surface of the tip end portion 62 of the pen-type coordinate input device 7 are calculated in the subsequent step S27.
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 tip end portion 62 of the pen-type coordinate input device 7 may be calculated.
The steps of dot detection, code frame detection, data acquisition, error correction, coordinate / document ID reconstruction, and pen tip coordinate calculation are the dot detector 81, code frame detector 82, and data acquirer shown in FIG. 83, the error corrector 85, the data decoder 86, and the nib coordinate calculator 87 are realized by software.

また図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 small region 3 × 3 pixels for searching for dots is set. Hereinafter, in the same manner as described above, in step S71, dot candidates are detected for a 3 × 3 pixel area centered on the pixel Z, and in subsequent 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 may be determined whether there is a pixel already determined to be a dot around the dot candidate determined to be the minimum luminance pixel.

また図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 calculator 87 shown in FIG. 25 is realized by software.
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 input device 7 is used for writing on the document, as described above, the two-dimensional code 22 on the document is read, and the document ID and coordinate information are acquired by the pen-type coordinate input device 7. (S51). Details of the code symbol reading will be described later. The document ID and coordinate information read in real time along with the writing are transmitted to the information processing apparatus 4. When the information processing apparatus 4 receives the document ID and the coordinate information, it transfers the document ID to the information processing apparatus 9 that manages the document management database 6 (S52).
Based on the received document ID, the information processing apparatus 9 identifies the page of the document currently being added from the document management database 6 (S53). Here, for example, it is assumed that the specified document is page 1 of “patent.doc” having the identification number (ID) “123456” shown in FIG. This document information is transmitted to the pen-type coordinate input device 7, and the received document information is displayed on the LCD display device 66 of the pen-type coordinate input device 7. Since the file entity can be identified in this way, the information processing apparatus 4 opens “patent.doc” with an application (for example, word processing software) associated with the file, and for example, is connected to the information processing apparatus 4 (not shown). It is displayed on the display to be in an editing state (S54).

編集状態とされた文書「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 input device 7 is drawn on the document “patent.doc” in the edited state. The drawing method can be realized by opening a new drawing object in a document window and drawing the received coordinates by connecting them with a line (S55 to S58).
When the writing is finished (S59 “Y”), the pen-type coordinate input device 7 transmits a signal for finishing writing to the information processing device 4, and the information processing device 4 that has received the signal for finishing writing draws on the window. Exit. In this way, one object is added to the document “patent.doc” (S60). In the present embodiment, the added information is displayed on a computer display in real time, and it is possible to immediately check whether the actually added information is correctly processed, which is a great merit for the user. The information processing apparatus 4 stores the received coordinate information as a separate text file as a sequence of text. This is useful because it is possible to display and check only the added data when it is impossible to check it quickly when the user wants to check the added data by opening the application later, such as when the document is huge. is there.
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.

本発明の実施の形態に係る印刷文書の平面図。FIG. 3 is a plan view of a printed document according to the embodiment of the present invention. 2次元コードのドットの大きさ、及びドットの間隔を示す図。The figure which shows the magnitude | size of the dot of a two-dimensional code, and the space | interval of a dot. 2次元コードのデータ配置領域を示す図。The figure which shows the data arrangement | positioning area | region of a two-dimensional code. 2次元コードへのデータの配置順序を示す図。The figure which shows the arrangement | positioning order of the data to a two-dimensional code. 本発明の実施の形態に係る文書管理システムの構成図。1 is a configuration diagram of a document management system according to an embodiment of the present invention. 2次元コードのエンコード処理を示したフローチャート。The flowchart which showed the encoding process of the two-dimensional code. データのエンコード処理と誤り訂正符号の付加処理の説明図。Explanatory drawing of the encoding process of data, and the addition process of an error correction code. 文書印刷とデータベースへの登録方法を示す図。The figure which shows the document printing and the registration method to a database. 2次元コードを付して印刷した文書の一例を示す図。The figure which shows an example of the document which attached and printed the two-dimensional code. マイコンの構成を示す図。The figure which shows the structure of a microcomputer. 2次元コード読取装置の構成を示したブロック図。The block diagram which showed the structure of the two-dimensional code reader. 2次元コードを読み取った画像の一例を示す図。The figure which shows an example of the image which read the two-dimensional code. 文書ID置き換えによる誤り訂正の可否を説明する図。The figure explaining the possibility of error correction by document ID replacement. 画像全体の領域と各検出器の処理領域を示す図。The figure which shows the area | region of the whole image, and the process area | region of each detector. ドット検出器の構成を示した図。The figure which showed the structure of the dot detector. ドット検出器の説明図。Explanatory drawing of a dot detector. 文書IDの置き換えによる座標取得率の変化を示す図。The figure which shows the change of the coordinate acquisition rate by replacement of document ID. ドット検出器の他の構成を示した図。The figure which showed the other structure of the dot detector. コード枠検出器の説明図。Explanatory drawing of a code frame detector. コード枠の追跡経路の説明図。Explanatory drawing of the tracking route of a code frame. コーナー検出器の説明図。Explanatory drawing of a corner detector. 渦巻き走査の一例を示す図。The figure which shows an example of a spiral scan. ドット追跡器の説明図。Explanatory drawing of a dot tracker. データ取得器の説明図。Explanatory drawing of a data acquisition device. ペン先座標算出器の構成を示す図。The figure which shows the structure of a nib coordinate calculator. ドット中心検出器の構成を示す図。The figure which shows the structure of a dot center detector. ペン先座標算出の説明図。Explanatory drawing of nib coordinate calculation. ドット中心の位置と画素の関係を示した図。The figure which showed the relationship between the position of a dot center, and a pixel. 画素位置の説明図。Explanatory drawing of a pixel position. 2次元コード読取装置の他の構成を示したブロック図。The block diagram which showed the other structure of the two-dimensional code reader. 2次元コードの読み取り処理の一例を示したフローチャート。The flowchart which showed an example of the reading process of a two-dimensional code. ドット検出処理を示したフローチャート。The flowchart which showed the dot detection process. ドット検出処理の他の例を示したフローチャート。The flowchart which showed the other example of the dot detection process. ドット中心検出処理を示したフローチャート。The flowchart which showed the dot center detection process. 2次元コードの読み取り処理の他の例を示したフローチャート。The flowchart which showed the other example of the reading process of a two-dimensional code. 文書加筆時の文書更新、データベースの更新方法を示す図。The figure which shows the document update at the time of document addition, and the update method of a database. 文書管理データベースに登録されている項目を示す図。The figure which shows the item registered into the document management database.

符号の説明Explanation of symbols

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 SYMBOLS 1 ... Printer, 2 ... Copy machine, 3 ... Scanner, 4 ... Information processing apparatus, 5 ... Memory | storage device, 6 ... Document management database, 7 ... Pen type coordinate input device, 8 ... Portable information terminal, 9 ... Information processing apparatus, DESCRIPTION OF SYMBOLS 10 ... Two-dimensional code production apparatus, 21 ... Print document, 22 ... Two-dimensional code, 23 ... Dot, 24 ... Minimum dot, 61 ... Apparatus main body, 62 ... Tip part, 63 ... Writing instrument, 64 ... Image reader, 64a ... Photoelectric conversion element, 64b ... optical system, 65 ... microcomputer, 66 ... LCD display device, 67 ... LED, 68 ... buzzer, 69 ... pressure sensor, 70 ... bus, 71 ... CPU, 72 ... ROM, 73 ... RAM, 74 ... Two-dimensional code reader 81 ... dot detector 82 ... code frame detector 83 ... data acquisition device 84 ... data replacement device 85 ... error corrector 86 ... data decoder 87 ... nib coordinate calculator , DESCRIPTION OF SYMBOLS 8 ... Known information memory, 91 ... Continuous writing detector, 92 ... Writing detector, 101 ... Dot candidate detector, 102 ... Minimum brightness pixel determination device, 103 ... Peripheral dot search device, 104 ... Dot search area determination device, 11 ... dot detector, 111 ... first corner detector, 112 ... first dot tracker, 113 ... second corner detector, 114 ... second dot tracker, 115 ... third corner detector, 116 ... third dot Tracker, 117 ... fourth corner detector, 118 ... fourth dot tracker, 121 ... ambient dot detector, 122 ... point symmetry pair detector, 130 ... dot center detector, 131 ... projection parameter calculator, 132 ... Nib coordinate converter, 133 ... dot coordinate correction means, 134 ... dot position estimation means, 141 ... first error corrector, 142 ... second error corrector, 143 ... selector

Claims (16)

複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出手段と、該ドット検出手段において検出されたドットからコード枠を検出するコード枠検出手段と、前記コード枠内のドットを読み取ってデータを復号するデータ復号手段とを備える2次元パターン読み取り装置において、
前記ドット検出手段は、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする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.
前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用することを特徴とする請求項1記載の2次元パターン読み取り装置。  2. The two-dimensional pattern reading apparatus according to claim 1, wherein the dot minimum luminance pixel determination unit uses a 5 × 5 pixel area centered on the target pixel. 複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出手段と、該ドット検出手段において検出されたドットからコード枠を検出するコード枠検出手段と、前記コード枠内のドットを読み取ってデータを復号するデータ復号手段とを備える2次元パターン読み取り装置において、  A dot detection unit that inputs a captured image obtained by capturing a two-dimensional pattern composed of a plurality of dots, detects the dot, a code frame detection unit that detects a code frame from the dots detected by the dot detection unit, In a two-dimensional pattern reading device comprising data decoding means for reading the dots in the code frame and decoding the data,
前記ドット検出手段は、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定手段と、該ドット探索領域判定手段によりドット探索領域と判定された領域内の各画素に対して注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする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.
前記ドット探索領域判定手段は、水平1画素垂直1画素おきに小領域を設定することを特徴とする請求項3記載の2次元パターン読み取り装置。  4. The two-dimensional pattern reading apparatus according to claim 3, wherein the dot search area determination means sets a small area every other horizontal pixel and vertical pixel. 前記ドット探索領域は、3×3画素からなる小領域であることを特徴とする請求項3記載の2次元パターン読み取り装置。  4. The two-dimensional pattern reading apparatus according to claim 3, wherein the dot search area is a small area composed of 3 × 3 pixels. 前記ドット最小輝度画素判定手段は、注目画素を中心とする5×5画素の領域を使用することを特徴とする請求項3記載の2次元パターン読み取り装置。  4. The two-dimensional pattern reading apparatus according to claim 3, wherein the dot minimum luminance pixel determination means uses a 5 × 5 pixel area centered on the target pixel. 請求項1乃至6の何れか一項記載の2次元パターン読み取り装置において、  The two-dimensional pattern reading device according to any one of claims 1 to 6,
前記データ復号手段により復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出手段を備え、  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記載の2次元パターン読み取り装置。  The dot center detection means performs a predetermined calculation in a dot coordinate correction means for detecting a pixel having the minimum luminance in a small area including a dot, and a small area centered on the pixel detected by the dot coordinate correction means. The two-dimensional pattern reading device according to claim 7, further comprising: a dot position estimating unit that estimates an accurate position of the dot. 複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出ステップと、該ドット検出ステップにおいて検出されたドットからコード枠を検出するコード枠検出ステップと、前記コード枠内のドットを読み取ってデータを復号するデータ復号ステップとからなる2次元パターン読み取り方法において、  A captured image obtained by capturing a two-dimensional pattern composed of a plurality of dots, a dot detection step for detecting the dot, and a code frame detection step for detecting a code frame from the dots detected in the dot detection step; In a two-dimensional pattern reading method comprising a data decoding step of reading the dots in the code frame and decoding the data,
前記ドット検出ステップは、注目画素とその近傍画素との輝度の差が所定値以上ある場合に、前記画像に含まれるドットとノイズのうち、注目画素を中心とする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.
前記ドット最小輝度画素判定ステップは、注目画素を中心とする5×5画素の領域を使用することを特徴とする請求項9記載の2次元パターン読み取り方法。  10. The two-dimensional pattern reading method according to claim 9, wherein the dot minimum luminance pixel determination step uses a 5 × 5 pixel area centered on the target pixel. 複数のドットで構成される2次元パターンを撮像した撮影画像を入力し、前記ドットを検出するドット検出ステップと、該ドット検出ステップにおいて検出されたドットからコード枠を検出するコード枠検出ステップと、前記コード枠内のドットを読み取ってデータを復号するデータ復号ステップとからなる2次元パターン読み取り方法において、  A captured image obtained by capturing a two-dimensional pattern composed of a plurality of dots, a dot detection step for detecting the dot, and a code frame detection step for detecting a code frame from the dots detected in the dot detection step; In a two-dimensional pattern reading method comprising a data decoding step of reading the dots in the code frame and decoding the data,
前記ドット検出ステップは、所定の小領域がドットの探索を行うための領域であるか否かを判定するドット探索領域判定ステップと、  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.
前記ドット探索領域判定ステップは、水平1画素垂直1画素おきに小領域を設定することを特徴とする請求項11記載の2次元パターン読み取り方法。  12. The two-dimensional pattern reading method according to claim 11, wherein the dot search area determination step sets a small area every other horizontal pixel and vertical pixel. 前記ドット探索領域は、3×3画素からなる小領域であることを特徴とする請求項11記載の2次元パターン読み取り方法。  The two-dimensional pattern reading method according to claim 11, wherein the dot search area is a small area composed of 3 × 3 pixels. 前記ドット最小輝度画素判定ステップは、注目画素を中心とする5×5画素の領域を使用することを特徴とする請求項11記載の2次元パターン読み取り方法。  12. The two-dimensional pattern reading method according to claim 11, wherein the dot minimum luminance pixel determination step uses a 5 × 5 pixel area centered on the target pixel. 請求項9乃至14の何れか一項記載の2次元パターン読み取り方法において、  The two-dimensional pattern reading method according to any one of claims 9 to 14,
前記データ復号ステップにより復号されたデータの位置情報および画像中のコード枠の座標に基づいて画像座標中の所定の座標に演算を行う座標算出ステップを有し、  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.
前記ドット中心検出ステップは、ドットを含む小領域において最小輝度を有する画素を検出するドット座標補正ステップと、前記検出された画素を中心とした小領域で所定の演算を行うことによりドットの正確な位置を推定するドット位置推定ステップとからなることを特徴とする請求項15記載の2次元パターン読み取り方法。  The dot center detection step includes a dot coordinate correction step for detecting a pixel having a minimum luminance in a small area including a dot, and an accurate dot calculation by performing a predetermined calculation in the small area centered on the detected pixel. The two-dimensional pattern reading method according to claim 15, further comprising a dot position estimating step for estimating a position.
JP2005235075A 2005-08-12 2005-08-12 Two-dimensional pattern reading device, two-dimensional pattern reading method Expired - Fee Related JP4397866B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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