JP4159948B2 - Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium - Google Patents

Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium Download PDF

Info

Publication number
JP4159948B2
JP4159948B2 JP2003297825A JP2003297825A JP4159948B2 JP 4159948 B2 JP4159948 B2 JP 4159948B2 JP 2003297825 A JP2003297825 A JP 2003297825A JP 2003297825 A JP2003297825 A JP 2003297825A JP 4159948 B2 JP4159948 B2 JP 4159948B2
Authority
JP
Japan
Prior art keywords
corner
dot
dots
dimensional code
corner dot
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
JP2003297825A
Other languages
Japanese (ja)
Other versions
JP2005070980A (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 JP2003297825A priority Critical patent/JP4159948B2/en
Publication of JP2005070980A publication Critical patent/JP2005070980A/en
Application granted granted Critical
Publication of JP4159948B2 publication Critical patent/JP4159948B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、画像の読み取りに関し、特にバーコードを読み取るバーコード読み取り装置、バーコード読み取り方法及びバーコード読み取りプログラムに関する。   The present invention relates to image reading, and more particularly, to a barcode reading apparatus, a barcode reading method, and a barcode reading program for reading a barcode.

業務の電子化やパソコンの普及と共に、文書を電子化しいわゆる電子文書として取り扱う機会が増大している。一方、CRT、LCDなどのディスプレイの文書表示品質は紙への印刷品質に劣る点も多いため、電子的に作成された電子文書を紙文書として紙に印刷する機会も多い。   With the digitization of business and the spread of personal computers, opportunities to digitize documents and handle them as so-called electronic documents are increasing. On the other hand, since the document display quality of a display such as a CRT or LCD is often inferior to the print quality on paper, there are many opportunities to print electronically created electronic documents on paper as paper documents.

こうした印刷された紙文書に手書きで加筆することは日常的に行われているが、元の電子文書と加筆された内容とは何ら関連づけられておらず、印刷された紙文書に加筆された内容を電子文書に反映させるには、電子文書をパソコンなどで開き再度編集する必要がある。このため、印刷された紙文書に対して行われた手書き作業を有効に利用できるよう、元の電子文書と関連づけられた形で加筆情報を電子化する手段が必要とされている。   Although it is a daily routine to manually write on such a printed paper document, the original electronic document is not associated with the added content at all, and the content added to the printed paper document Is reflected in the electronic document, it is necessary to open the electronic document on a personal computer or the like and edit it again. Therefore, there is a need for means for digitizing the added information in a form associated with the original electronic document so that the handwriting work performed on the printed paper document can be used effectively.

これに対して、光学的に読取可能なコードシンボル(2次元コード)を紙面上にマトリックス状に並べ、紙面へペンで加筆するのと同時に、ペンに設けたカメラで2次元コードを読み取る発明が開示されている(例えば、特許文献1参照。)。特許文献1記載の発明によれば、カメラが読み取った2次元コードにより加筆している位置の座標情報を取得することができ、加筆情報をリアルタイムに読み取りながら加筆前の紙面情報と加筆情報を関連付けることができる。特許文献1記載の発明では、文書を特定する文書固有の情報と紙上の座標位置を同時に白黒のパターンに変換し、紙に印刷する。白黒のパターンに誤り訂正機能を有する2次元コードを利用し、光学ペンによる読み取りが不安定な場合でも文書固有の情報と座標情報を取得できるような機能を有しているため、読み取りが不安定な場合でも読み取りが可能になっている。   On the other hand, there is an invention in which optically readable code symbols (two-dimensional codes) are arranged in a matrix on a paper surface, and the two-dimensional code is read with a camera provided on the pen at the same time as writing on the paper surface with a pen. (For example, refer to Patent Document 1). According to the invention described in Patent Document 1, it is possible to acquire coordinate information of a position where writing is performed using a two-dimensional code read by the camera, and associate the page information before writing with the writing information while reading the writing information in real time. be able to. In the invention described in Patent Document 1, document-specific information for specifying a document and coordinate positions on paper are simultaneously converted into a monochrome pattern and printed on paper. Even if reading with an optical pen is unstable using a two-dimensional code that has an error correction function for black and white patterns, it has a function that can acquire document-specific information and coordinate information, so reading is unstable Even in such cases, reading is possible.

また、2次元コードとして、X座標、Y座標、コードの方向を表すパターン及びホーミングパターンと呼ばれるコードの中心に配置されたその他のパターンより大きいパターンとを用いた加筆情報の電子化に関する発明が開示されている(例えば、特許文献2参照。)。特許文献2記載の発明では、2次元コードは不可視インクで印刷されるため肉眼では見られないが、所定のカメラを備えたペンを用いて紙面に加筆するのと同時に2次元コードを読み込むことができる。したがって、文書内容の判別を損なわずに加筆情報をリアルタイムに読み取りながら加筆前の紙面情報と加筆情報を関連付けることができる。   Also disclosed is an invention relating to digitization of writing information using a two-dimensional code using a X coordinate, a Y coordinate, a pattern indicating the direction of the code, and a pattern larger than other patterns arranged at the center of the code called a homing pattern. (For example, see Patent Document 2). In the invention described in Patent Document 2, since the two-dimensional code is printed with invisible ink, it cannot be seen with the naked eye, but the two-dimensional code can be read at the same time as writing on the paper surface using a pen equipped with a predetermined camera. it can. Therefore, it is possible to associate the page information before the writing with the writing information while reading the writing information in real time without impairing the determination of the document content.

更に、2次元コードとして、ドットを所定の位置からずらすことにより、1ドットで2ビット以上の情報を有することのできる2次元コードを用いた加筆情報の電子化に関する発明が開示されている(例えば、特許文献3。)。該2次元コードは水平及び垂直方向の座標情報を有しており、紙全体に連続的にドットが印刷されている。特許文献3記載の発明においても、小型カメラを備えたペンで紙面へ加筆するのと同時に2次元コードを読み取ることにより、加筆情報をリアルタイムに読み取りながら加筆前の紙面情報と加筆情報を関連付けることができる。
特開平2000−293303号公報 USP5661506 WO 00/73981 A1
Further, an invention relating to digitization of retouched information using a two-dimensional code that can have information of 2 bits or more in one dot by shifting a dot from a predetermined position as a two-dimensional code is disclosed (for example, , Patent Document 3). The two-dimensional code has horizontal and vertical coordinate information, and dots are continuously printed on the entire paper. In the invention described in Patent Document 3, it is possible to associate the page information before the writing with the writing information while reading the writing information in real time by reading the two-dimensional code at the same time as the writing with the pen provided with the small camera. it can.
JP 2000-293303 A USP 5661506 WO 00/73981 A1

しかしながら、特許文献1記載の2次元コードは、サイズが大きくなるため、広い範囲の紙面を光学ペンで撮影しなければならない。このため、被写界深度などの問題で読み取った画像の品質が落ちるため、2次元コードを連続的に読み取ることが難しくなる。更に、当該2次元コードは筆記中にカメラで撮影され且つデコードするために作られたわけではなく、汎用の2次元コードを用いているため、デコード処理に時間がかかりリアルタイムで処理を行うことが難しい。連続的な加筆情報を取得しながら、2次元コードを読み取り座標位置を連続的に取得できなければ、加筆情報の不連続点が発生するので、正しい加筆情報が得られない。   However, since the two-dimensional code described in Patent Document 1 has a large size, a wide range of paper must be photographed with an optical pen. For this reason, since the quality of the image read by problems, such as depth of field, falls, it becomes difficult to read a two-dimensional code continuously. In addition, the two-dimensional code is not captured and decoded by the camera during writing, but because a general-purpose two-dimensional code is used, the decoding process takes time and is difficult to perform in real time. . If the two-dimensional code is read and the coordinate position cannot be acquired continuously while acquiring continuous writing information, discontinuous points of the writing information are generated, so that correct writing information cannot be obtained.

また、特許文献2記載の発明では、不可視インクで2次元コードを印刷するため、一般の印刷装置を使用して2次元コードを印刷することは事実上不可能である。すなわち、この2次元コードを利用するためには、予め特殊な印刷装置において不可視インクを使用して2次元コードを印刷する必要がある。したがって、ユーザが印刷したい文書の情報を印刷時に印刷媒体に埋め込むためには別のバーコードを重畳して印刷するなどの手段が必要となるばかりか、文書に加筆する前に必ずそのバーコードを読ませる必要があり、利便性が損なわれる。仮に、バーコードを読む作業を忘れて別の文書に加筆を行ってしまうと、加筆情報と電子文書とのリンクが矛盾を起こす。また、可視インクで2次元コードを印刷することも考えられるが、特許文献2記載の2次元コードは他のパターンより大きいパターンを使用しているため、文書や加筆された内容の可読性が損なわれる。   In the invention described in Patent Document 2, since the two-dimensional code is printed with invisible ink, it is practically impossible to print the two-dimensional code using a general printing apparatus. That is, in order to use this two-dimensional code, it is necessary to print the two-dimensional code in advance using a non-visible ink in a special printing apparatus. Therefore, in order to embed the information of the document that the user wants to print in the print medium at the time of printing, not only a means such as printing with another barcode superimposed is necessary, but the barcode must be added before adding to the document. It is necessary to read, and convenience is impaired. If you forget to read the barcode and add another document, the link between the added information and the electronic document will be inconsistent. Although it is conceivable to print a two-dimensional code with visible ink, the two-dimensional code described in Patent Document 2 uses a pattern larger than other patterns, so that the readability of the document and the added content is impaired. .

また、特許文献3記載の発明では、2次元的に等間隔な点からわずかにドットをずらして配置することにより、1ドットに2ビット以上の座標情報を乗せることを可能とした2次元コードを開示している。しかしながら、位置をずらす量が30μmと非常に小さいため、一般に普及しているレーザープリンタ(解像度1200dpi程度)では、紙送りの精度、感光体の回転速度のむら等により正しいずれ量を再現することが難しい。したがって特許文献3記載の2次元コードの場合も、予めオフセット印刷等の印刷技術を利用して2次元コードを印刷した紙を用意する必要があるため、特許文献2と同様の問題がある。   Further, in the invention described in Patent Document 3, a two-dimensional code that makes it possible to place coordinate information of 2 bits or more on one dot by arranging dots slightly shifted from two-dimensionally equidistant points. Disclosure. However, since the amount of position shift is as small as 30 μm, it is difficult to reproduce a correct shift amount due to accuracy of paper feeding, unevenness of the rotation speed of the photosensitive member, and the like in a widely used laser printer (resolution of about 1200 dpi). . Therefore, in the case of the two-dimensional code described in Patent Document 3, 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.

本発明は、上記問題点に鑑み、高速で汎用性の高いバーコード読み取り装置、バーコード読み取り方法及びバーコード読み取りプログラムを提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a barcode reading apparatus, a barcode reading method, and a barcode reading program that are fast and versatile.

上記課題を解決するため、複数のドットにより構成される矩形のコード枠により囲まれ、矩形の頂点にコーナードットが配置される2次元コードが撮影された射影画像から、2次元コードを構成するドットを検出するドット検出手段を有し、ドット検出手段により検出されたドットに基づき2次元コードが表す情報を読み取る2次元コード読み取り装置において、ドット検出手段により検出された注目ドットNから所定範囲にある複数の他のドットを探索し、注目ドットNの周囲に存在する複数のドットのうち、注目ドットNに関して点対称となる二組のドットのペアが検出された場合に注目ドットNがコーナードットに相当することを検出するコーナードット検出手段と、コーナードット検出手段により検出されたコーナードットのうち所定の第一のコーナードットの位置から他のコーナードットの位置を、第一のコーナードットに対し点対称となるドットのペアの位置及び予め設定されたコーナ間のドット数に基づき推定するコーナードット位置推定手段と、コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナードット候補を探索し、複数のコーナードット候補のうち、コーナードット候補に関して点対称となる二組のドットのペアが検出された場合にコーナードット候補が他のコーナードットに相当することを判定するコーナードット判定手段と、第一のコーナードットと他の3つのコーナードットの位置から2次元コードのコード枠を検出するコード枠検出手段と、を有することを特徴とする。
To solve the above problems, is surrounded by the code frame rectangle formed by a plurality of dots, the projection image two-dimensional code corner dots are arranged in a rectangular vertex is photographed, dots constituting the two-dimensional code In a two-dimensional code reading device that has dot detection means for detecting a dot and that reads information represented by a two-dimensional code based on the dots detected by the dot detection means, it is within a predetermined range from the target dot N detected by the dot detection means When a plurality of other dots are searched and two pairs of dots that are point-symmetric with respect to the target dot N are detected among the plurality of dots existing around the target dot N, the target dot N becomes the corner dot. The corner dot detection means for detecting the equivalent and the corner dot detected by the corner dot detection means A corner dot that estimates the position of another corner dot from the position of a fixed first corner dot based on the position of a pair of dots that are point-symmetric with respect to the first corner dot and a preset number of dots between corners A plurality of corner dot candidates in the vicinity of the estimated position of the other corner dot estimated by the position estimation means and the corner dot position estimation means are searched for, and two of the plurality of corner dot candidates are point-symmetric with respect to the corner dot candidate. Corner dot determination means for determining that a corner dot candidate corresponds to another corner dot when a pair of dots is detected, and a two-dimensional code from the positions of the first corner dot and the other three corner dots And a code frame detecting means for detecting the code frame .

本発明によれば2次元コードのコード枠のコーナードットを検出し、コーナードットに基づきコード枠を検出できるので、高速な2次元コードの読み取りができる。
また、第一のコーナードットに基づいて検出された他のコーナードットのうち所定のコーナードットから、逆に第一のコーナードットの位置を推定することで、第一のコーナードットの検出結果を検証することができる。第一のコーナードットの位置が検証されれば他のコーナードットの位置も検証される。2次元コードのコード枠は、コーナードットを直線で結ぶことで検出できるので、コード枠を構成するドットが、文字、罫線、汚れなどで検出困難であっても、コーナードットさえ検出できれば2次元コードを検出できる。
According to the present invention, to detect the corner dot code frame of the two-dimensional code, it is possible to detect the code frame based on the corner dot, it can be read fast two-dimensional code.
Also, the first corner dot detection result is verified by estimating the position of the first corner dot from a predetermined corner dot among other corner dots detected based on the first corner dot. can do. If the position of the first corner dot is verified, the positions of the other corner dots are also verified. Since the code frame of a two-dimensional code can be detected by connecting corner dots with straight lines, even if the dots that make up the code frame are difficult to detect due to characters, ruled lines, dirt, etc., the two-dimensional code can be detected. Can be detected.

また、本発明の一形態において、コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、コーナードット位置推定手段が推定した第一のコーナードットの位置と、コーナードット検出手段により検出された第一のコーナードットの位置と、が一致する場合に、コード枠を形成するコーナードットが検出されたと判定するコーナードット一致判定手段を有することを特徴とする。
In one embodiment of the present invention, the position of the first corner dot estimated by the corner dot position estimating means based on the position of the corner dot determined by the corner dot determining means to be a corner dot, and the corner dot detecting means When the position of the first corner dot detected by (1) coincides with the first corner dot , it has a corner dot coincidence judging means for judging that the corner dot forming the code frame has been detected .

本発明によれば、第一のコーナードットが検出されれば残りのコーナードットは位置を推定された後に、その推定位置の近傍で検出されるので、2次元コードのコード枠を構成するドットを全て検出しなくともよい。
According to the present invention, if the first corner dot is detected, the remaining corner dots are detected in the vicinity of the estimated position after the position is estimated. Therefore, the dots constituting the code frame of the two-dimensional code are detected. all may even without it detects.

また、本発明の一形態において、コーナードット位置推定手段は、コーナードット検出手段により検出されたコーナードットの位置、コーナードットに対し点対称となるペアのドットの位置、を適当な原点を始点としたベクトルで表し、ペアのドットの一方と原点を結ぶ第1ベクトルからペアの他方のドットと原点を結ぶ第2ベクトルを減じて得られる方向に、他のコーナードットの位置を推定する、ことを特徴とする。
Further, in one aspect of the present invention, the corner dot position estimating means sets the position of the corner dot detected by the corner dot detecting means and the position of a pair of dots that are point-symmetric with respect to the corner dot, starting from an appropriate origin. The position of the other corner dot is estimated in the direction obtained by subtracting the second vector connecting the origin and the other dot of the pair from the first vector connecting the origin and the one of the pair of dots. Features.

本発明によれば、コーナーを構成するコーナードット及びコーナードットに隣接するコード枠を構成するドットが生成する直線の延長方向に、他のコーナードットの方向を定めることができる。
According to the present invention, it is possible to determine the direction of another corner dot in the extending direction of a straight line generated by the corner dot constituting the corner and the dot constituting the code frame adjacent to the corner dot.

また、本発明の一形態において、コーナードット位置推定手段は、第1ベクトルから第2ベクトルを減じたベクトルを2で割って、それに予め設定されたコーナ間のドット数をかけ、その距離だけコーナードット検出手段により検出されたコーナードットから離れた位置に、他のコーナードットの位置を推定する。
In one embodiment of the present invention, the corner dot position estimating means divides a vector obtained by subtracting the second vector from the first vector by 2, and multiplies the preset number of dots between the corners to obtain a corner by that distance. The positions of other corner dots are estimated at positions away from the corner dots detected by the dot detection means.

本発明によれば、コーナーを構成するコーナードット及びコーナードットに隣接するコード枠を構成するドットが生成する直線の延長方向に、他のコーナードットの方向を定めることができる。
According to the present invention, it is possible to determine the direction of another corner dot in the extending direction of a straight line generated by the corner dot constituting the corner and the dot constituting the code frame adjacent to the corner dot.

また、本発明の一形態において、コーナードット判定手段は、コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナードット候補を、推定された位置の注目画素を中心とする所定範囲を推定された位置を起点に渦巻状に走査して検出する、ことを特徴とする。
Further, in one aspect of the present invention, the corner dot determination unit is configured to center a plurality of corner dot candidates near the estimated position of the other corner dots estimated by the corner dot position estimation unit, with the target pixel at the estimated position as the center. The predetermined range is detected by scanning in a spiral manner from the estimated position as a starting point .

本発明によれば、所定のドットから走査することで、高速にドットを検出できる。また、コーナードットと推定されるドットに対し点対称なドットを検出することでコーナードットを検出できる。
According to the present invention, a dot can be detected at high speed by scanning from a predetermined dot. In addition, corner dots can be detected by detecting dots that are point-symmetric with respect to dots estimated as corner dots.

また、本発明の一形態において、コーナードット一致判定手段は、コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、コーナードット位置推定手段が推定した第一のコーナードットの位置と、コーナードット検出手段により検出された第一のコーナードットの位置と、の距離が所定の閾値内の場合にコーナードットが一致したと判定する、ことを特徴とする。
In one embodiment of the present invention, the corner dot coincidence determining unit is configured to determine the first corner dot estimated by the corner dot position estimating unit based on the position of the corner dot determined to be a corner dot by the corner dot determining unit. When the distance between the position and the position of the first corner dot detected by the corner dot detection means is within a predetermined threshold, it is determined that the corner dot matches.

本発明によれば、検出された第一のコーナードットの位置と、他のコーナードットから推定された第一のコーナードットの位置との距離が、所定の閾値内に入っていればコーナー枠が検出されたと判定できる。
According to the present invention, if the distance between the detected position of the first corner dot and the position of the first corner dot estimated from the other corner dots is within a predetermined threshold, the corner frame is It can be determined that it has been detected.

高速で汎用性の高いバーコード読み取り装置、バーコード読み取り方法及びバーコード読み取りプログラムを提供できた。   A high-speed and versatile barcode reader, barcode reading method and barcode reading program could be provided.

以下、本発明を実施するための最良の形態について、図を参照しながら実施例を上げて説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

〔2次元バーコード〕
始めに本実施例で用いる2次元バーコード(以下、単に2次元コードという)について説明する。図1は、本実施例で用いる印刷された文書の所定領域の一部が拡大された例を示す。点線で囲まれた領域2a、2b、2c及び2dは、それぞれが1つの2次元コードである。2次元コードは、光学的に読み取り可能な複数の黒ドットで構成されており、各2次元コードは縦横にマトリクス状に並べられている。図1の連続したドットで構成されたH1、H2及びH3のラインとV1、V2及びV3のラインは、各2次元コードの縦横の境界となる。なお、垂直線H1と水平線V1の交点、例えばドット15を2次元コードのコーナー(角)と称す。
[2D barcode]
First, a two-dimensional barcode (hereinafter simply referred to as a two-dimensional code) used in the present embodiment will be described. FIG. 1 shows an example in which a part of a predetermined area of a printed document used in this embodiment is enlarged. Each of the regions 2a, 2b, 2c, and 2d surrounded by the dotted line is one two-dimensional code. The two-dimensional code is composed of a plurality of optically readable black dots, and each two-dimensional code is arranged in a matrix form vertically and horizontally. The lines of H1, H2, and H3 and the lines of V1, V2, and V3 that are composed of continuous dots in FIG. 1 are the vertical and horizontal boundaries of each two-dimensional code. The intersection of the vertical line H1 and the horizontal line V1, for example, the dot 15 is referred to as a corner (corner) of the two-dimensional code.

2次元コード及び境界(以下、単に2次元パターンという)は、文書印刷時に文書の内容と同時に印刷される。2次元コード2a等には、印刷された文書の原本となる電子文書の識別(ID)情報と各2次元コードの位置する座標を表す情報がエンコードされている。   A two-dimensional code and a boundary (hereinafter simply referred to as a two-dimensional pattern) are printed simultaneously with the contents of the document when the document is printed. The two-dimensional code 2a and the like are encoded with identification (ID) information of an electronic document that is an original of a printed document and information indicating coordinates where each two-dimensional code is located.

例えば、2次元コード2aには「水平座標=95、垂直座標=10、文書ID=10」がエンコードされ、2次元コード2bには「水平座標=96、垂直座標=10、文書ID=10」、2次元コード2cには「水平座標=95、垂直座標=11、文書ID=10」、2次元コード2dには「水平座標=96、垂直座標=11、文書ID=10」とエンコードされている。   For example, “horizontal coordinate = 95, vertical coordinate = 10, document ID = 10” is encoded in the two-dimensional code 2a, and “horizontal coordinate = 96, vertical coordinate = 10, document ID = 10” is encoded in the two-dimensional code 2b. The two-dimensional code 2c is encoded with “horizontal coordinates = 95, vertical coordinates = 11, document ID = 10”, and the two-dimensional code 2d is encoded with “horizontal coordinates = 96, vertical coordinates = 11, document ID = 10”. Yes.

ここで、2次元コードを構成するドットおよび2次元コードの大きさに関して図2を用いて説明する。ドット201は、2次元パターンを構成する1つのドットの一例を、セル202は、使用するプリンタで印刷できる最小ドットの大きさの一例を示す。   Here, the dots constituting the two-dimensional code and the size of the two-dimensional code will be described with reference to FIG. The dot 201 is an example of one dot constituting the two-dimensional pattern, and the cell 202 is an example of the size of the minimum dot that can be printed by the printer to be used.

2次元パターンを構成するドット201は、使用するプリンタの最小ドット202の2×2単位で印字される。例えば1200dpiのプリンタならば、プリンタの最小ドット径は約21μmであるので、2次元コードのドットの直径は理想的には約42μmとなる。実際にはドットゲインがあるため直径はもう少し大きくなる。本実施例では、各ドットをドットの直径の6倍の間隔を置いて水平・垂直方向に配置する。この場合、ドット配置位置にすべてのドットが存在する場合でもドットの占める面積率は理想的には2.8%、50%程度のドットゲインを見込んでも面積占有率は5%に満たない。5%程度の黒色の占有率では、人の目には明るい灰色に見えるのでドットに邪魔されて文書や加筆した文字が読みにくいなどという問題は起こらない。   The dots 201 constituting the two-dimensional pattern are printed in 2 × 2 units of the minimum dots 202 of the printer to be used. For example, in the case of a 1200 dpi printer, the minimum dot diameter of the printer is about 21 μm, so the dot diameter of the two-dimensional code is ideally about 42 μm. Actually, the diameter is a little larger due to the dot gain. In this embodiment, the dots are arranged in the horizontal and vertical directions with an interval 6 times the diameter of the dots. In this case, even when all 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, the area ratio is less than 5%. At a black occupancy rate of about 5%, it looks light gray to the human eye, so there is no problem that it is difficult to read a document or a written character by being disturbed by dots.

以上のようにドットの配置を決定すると、本実施例では各2次元コードは、縦11個、横7個のドットにより構成されているため、各2次元コードの大きさは、横(水平)2mm、縦(垂直)3mm角となる。2次元コードの各位置を、例えば、紙面の左上の角の位置を原点として表す。例えば水平座標=95ということは、水平方向に95番目の2次元コードとなり、原点から水平方向に190mmの位置にあるということを意味する。同様に垂直座標=10は、垂直方向に10番目の2次元コードとなり、紙面の左上の原点から、垂直方向に30mmの位置にあるということを意味する。   When the dot arrangement is determined as described above, in the present embodiment, each two-dimensional code is composed of eleven vertical dots and seven horizontal dots, so the size of each two-dimensional code is horizontal (horizontal). It becomes 2 mm and a vertical (vertical) 3 mm square. Each position of the two-dimensional code is represented by using, for example, the position of the upper left corner of the page as the origin. For example, the horizontal coordinate = 95 means that it is the 95th two-dimensional code in the horizontal direction and is at a position of 190 mm in the horizontal direction from the origin. Similarly, the vertical coordinate = 10 is the tenth two-dimensional code in the vertical direction, and means that the position is 30 mm in the vertical direction from the upper left origin on the paper surface.

なお、詳しくは後述するが、水平2mm、垂直3mm角の大きさは、A4サイズの用紙と相似の形状であり、水平・垂直座標情報を有効に格納することが可能になる。   Although details will be described later, the size of the horizontal 2 mm and vertical 3 mm square is similar to that of the A4 size paper, and the horizontal / vertical coordinate information can be stored effectively.

文書IDについて説明する。文書IDとは、元の電子文書の固有情報、例えば電子文書が格納されているデータベースの識別IDである。すなわち、2次元コード2aは文書IDが10であるので、2次元コード2aは、その左上の角(垂直線H1と水平線V1の交点)が、「紙面左上から水平190mm、垂直30mmの位置にあり、印刷されている文書はそのIDが10の文書である」、という情報を有する。   The document ID will be described. 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, since the document ID of the two-dimensional code 2a is 10, the upper left corner (the intersection of the vertical line H1 and the horizontal line V1) of the two-dimensional code 2a is “position of 190 mm horizontally and 30 mm vertically from the upper left of the page. , The printed document is a document whose ID is 10. "

続いて、2次元コードに配置するデータの詳細を図3を用いて説明する。図3は、図2の2次元コード2aを示す図である。2次元コード2aはコード枠を構成するH1、H2、V1、V2に囲まれた7×11のセルを有する。セルとはドットが配置され得る場所をいう。したがって、本実施例の2次元コードは最大77個のドットを含み得る。   Next, details of data arranged in the two-dimensional code will be described with reference to FIG. FIG. 3 is a diagram showing the two-dimensional code 2a of FIG. The two-dimensional code 2a has 7 × 11 cells surrounded by H1, H2, V1, and V2 constituting a code frame. A cell refers to a place where dots can be placed. Therefore, the two-dimensional code of this embodiment can include a maximum of 77 dots.

本実施例では、2次元コードをいくつかの領域に分割し、各領域に所定の情報を配置する。領域401は、水平座標を表すデータを配置する領域であり、4×2のセルを有する。1セル1ビットに相当するので1バイトの容量を有する。領域402は、垂直座標を表すデータを配置する場所である。水平座標の領域と同様に1バイトの容量を有する。   In this embodiment, the two-dimensional code is divided into several areas, and predetermined information is arranged in each area. An area 401 is an area for arranging data representing horizontal coordinates, and has 4 × 2 cells. Since it corresponds to 1 bit per cell, it has a capacity of 1 byte. An area 402 is a place where data representing vertical coordinates is arranged. Similar to the horizontal coordinate area, it has a capacity of 1 byte.

A4サイズの用紙は水平210mm、垂直297mmの大きさであるので、2次元コードの1つの大きさが、水平2mm、垂直3mmであることから、水平方向には105個、垂直方向には99個の2次元コードを配置できる。1バイトで表現できる数は2=256であるので、1バイトでA4サイズの用紙における位置情報を表示できる。用紙サイズがA3の場合には、水平297mm、垂直420mmの大きさであるので、水平方向に148個、垂直方向に120個の2次元コードが配置される。この場合も1バイトのデータ容量があれば十分である。A2サイズの場合は、水平420mm、垂直594mmの大きさであるので、水平方向に210個、垂直方向に198個の2次元コードが配置できるが、この場合も1バイトのデータ容量で十分である。 Since A4 size paper is 210mm horizontally and 297mm vertically, one size of the two-dimensional code is 2mm horizontally and 3mm vertically, so 105 in the horizontal direction and 99 in the vertical direction. Can be arranged. Since the number that can be expressed in 1 byte is 2 8 = 256, the position information on A4 size paper can be displayed in 1 byte. When the paper size is A3, the size is 297 mm horizontally and 420 mm vertically, so 148 codes are arranged in the horizontal direction and 120 two-dimensional codes in the vertical direction. In this case, a data capacity of 1 byte is sufficient. In the case of the A2 size, the size is 420 mm in the horizontal direction and 594 mm in the vertical direction, so 210 two-dimensional codes can be arranged in the horizontal direction and 198 in the vertical direction. In this case, a data capacity of 1 byte is sufficient. .

このように紙の縦横の長さの違いに応じて2次元コードの縦横の長さを適切に決定すると、水平・垂直座標を表すビット数(データ長)を一定サイズに固定しても幅広いサイズの用紙に対応できる。   In this way, if the vertical and horizontal lengths of the two-dimensional code are appropriately determined according to the vertical and horizontal lengths of the paper, a wide range of sizes can be achieved even if the number of bits representing the horizontal and vertical coordinates (data length) is fixed to a fixed size. Can be used with any paper.

次に、領域403は文書IDを表すデータを配置する場所である。4×6の24ビット(=3バイト)の容量を有する。領域404乃至407は、誤り訂正用の符号を配置する場所である。それぞれ、1バイトずつの容量を有し、誤り訂正用符号は合計4バイトで構成される。領域408及び409は、2次元コードの上下方向を表すためのパターンで、領域408は3×1の黒ドット、領域409は2×1のドット無しのパターンで、2次元コードの上下を判別するために使用される。   Next, an area 403 is a place where data representing a document ID is arranged. It has a capacity of 4 × 6 24 bits (= 3 bytes). Regions 404 to 407 are places where codes for error correction are arranged. Each has a capacity of 1 byte, and the error correction code is composed of a total of 4 bytes. Regions 408 and 409 are patterns for representing the vertical direction of the two-dimensional code, the region 408 is a 3 × 1 black dot, and the region 409 is a pattern without a 2 × 1 dot, and the upper and lower sides of the two-dimensional code are discriminated. Used for.

次に、各領域に配置されるビット列について説明する。図4は、各領域に水平座標など各データのビット列がどのように配列されるかを示す。領域401から407において、1はMSB(最上位ビット)、8はLSB(最下位ビット)を示す。   Next, the bit string arranged in each area will be described. FIG. 4 shows how bit strings of data such as horizontal coordinates are arranged in each area. In the areas 401 to 407, 1 indicates the MSB (most significant bit) and 8 indicates the LSB (least significant bit).

〔文書管理システム〕
続いて、2次元コードを用いた文書管理システムについて説明する。図5は、2次元コードを用いた文書管理システムの概略構成図を示す。図5の文書管理システムは、プリンタ601、複写機602、スキャナ603、パソコンなど情報処理装置604及び609、記憶装置605、携帯情報端末608、ペン型座標入力装置607、を有し、ネットワークを介しそれぞれが接続されている。また、記憶装置605は、文書管理データベース606及び印刷される文書を有する。文書管理データベース606は、各文書に識別のためのIDを付加するなど、各文書を管理するためのデータベースである。
[Document Management System]
Next, a document management system using a two-dimensional code will be described. FIG. 5 shows a schematic configuration diagram of a document management system using a two-dimensional code. The document management system in FIG. 5 includes a printer 601, a copier 602, a scanner 603, information processing devices 604 and 609 such as a personal computer, a storage device 605, a portable information terminal 608, and a pen-type coordinate input device 607 via a network. Each is connected. The storage device 605 includes a document management database 606 and a document to be printed. The document management database 606 is a database for managing each document such as adding an ID for identification to each document.

本実施例では、2次元コードを読み取り、現在手書きしている文書のID番号及び位置を情報処理装置などへ出力する。この2次元コードを読み取るための装置として、図5のペン型座標入力装置607について説明する。   In this embodiment, the two-dimensional code is read, and the ID number and position of the currently handwritten document are output to an information processing apparatus or the like. A pen-type coordinate input device 607 in FIG. 5 will be described as a device for reading this two-dimensional code.

ペン型座標入力装置607は、人が手に持って筆記動作を行うことができる筆記具状の装置本体807を備えている。この装置本体807の先端部805には、筆記具813、すなわち、ボールペン、シャープペンシルの先端部分等が取り付けられており、文書に加筆可能である。装置本体807の側部に設けられた画像読取装置806は、CCDなどの光電変換素子806aと、レンズなどからなる光学系806bとから構成されていて、印刷文書上の画像を読み取る装置である。なお、画像読取装置806には、必要に応じて照明を設けてもよい。   The pen-type coordinate input device 607 includes a writing instrument-like device main body 807 that can be held by a person and perform a writing operation. A writing instrument 813, that is, a tip end portion of a ballpoint pen, a mechanical pencil, or the like is attached to the leading end portion 805 of the apparatus main body 807 so that writing can be performed on a document. An image reading device 806 provided on the side of the apparatus main body 807 is configured by a photoelectric conversion element 806a such as a CCD and an optical system 806b including a lens, and reads an image on a print document. Note that the image reading device 806 may be provided with illumination as necessary.

装置本体807には、マイコン808が搭載されていて、このマイコン808には、画像読取装置806が電気的に接続されている。画像読取装置806で読み取った印刷文書の画像に基づいた各種処理がマイコン808でなされる。すなわち、読み取った2次元コードをデコードし、2次元コードの紙面上の座標及び文書IDを検出する。2次元コードの読み取り方法については後述する。また、マイコン808は装置本体807とは別の外部のパソコンなどの情報処理装置604と接続可能であり、マイコン808内に蓄積したデータを情報処理装置604に出力可能である。なお、図5では、画像読取装置806、マイコン808などに電力を供給する電源や、マイコン808と情報処理装置604とのインターフェースなどは図示を省略している。   A microcomputer 808 is mounted on the apparatus main body 807, and an image reading apparatus 806 is electrically connected to the microcomputer 808. Various processes based on the image of the printed document read by the image reading device 806 are performed by the microcomputer 808. That is, the read two-dimensional code is decoded and the coordinates of the two-dimensional code on the paper surface and the document ID are detected. A method for reading the two-dimensional code will be described later. Further, the microcomputer 808 can be connected to an information processing apparatus 604 such as an external personal computer other than the apparatus main body 807, and data stored in the microcomputer 808 can be output to the information processing apparatus 604. In FIG. 5, illustrations of a power source for supplying power to the image reading device 806, the microcomputer 808, and the interface between the microcomputer 808 and the information processing device 604 are omitted.

図6は、マイコン808の構成図を示す。マイコン808では、バス880を介してCPU(中央処理装置)881、ROM(リードオンリーメモリ)882、RAM(ランダムアクセスメモリ)883、2次元コード読み取り装置884が電気的に接続されている。各種外部装置とはバス880を介して電気的に接続されている。ROM882には、ペン型座標入力装置607の動作を制御するプログラムやマイコン808を動作させるプログラムがあらかじめ内蔵されている。RAM883は画像読み取り装置806から読み取った画像や、コード読み取り中に生成される中間データ、2次元コードをデコードした際に得られる文書IDや座標を一時的に保存する。2次元コード読み取り装置884については後述するが、RAM883に記憶された画像から2次元コードを検出し、読み取った文書IDや座標を検出する作業を行う。
さらに、マイコン808には、LCD表示装置809、LED810、あるいはブザー811が接続され、情報処理装置604から受信した情報をLCD表示装置809に表示したり、あるいは特定の情報を受信した場合にはLED810を点滅させたり、ブザー811を鳴らしたりして外部に通知することが可能である。
FIG. 6 shows a configuration diagram of the microcomputer 808. In the microcomputer 808, a CPU (central processing unit) 881, a ROM (read only memory) 882, a RAM (random access memory) 883, and a two-dimensional code reading device 884 are electrically connected via a bus 880. Various external devices are electrically connected via a bus 880. The ROM 882 contains a program for controlling the operation of the pen-type coordinate input device 607 and a program for operating the microcomputer 808 in advance. The RAM 883 temporarily stores images read from the image reading device 806, intermediate data generated during code reading, and document IDs and coordinates obtained when decoding a two-dimensional code. Although the two-dimensional code reading device 884 will be described later, the two-dimensional code is detected from the image stored in the RAM 883 and the read document ID and coordinates are detected.
Further, the microcomputer 808 is connected to an LCD display device 809, an LED 810, or a buzzer 811. When the information received from the information processing device 604 is displayed on the LCD display device 809 or specific information is received, the LED 810 is displayed. Can be flashed or a buzzer 811 can be sounded to notify the outside.

装置本体807には、先端部805の部分が筆記面に接触しているかどうかを検出する圧力センサ812が設けられている。すなわち、先端部805が筆記面に接触することにより先端部805に加わる圧力が筆記具813を介して圧力センサ812に伝達される。圧力センサ812はこの圧力を感知し、感知した情報をマイコン808に伝送する。

ペン型座標入力装置607を用いることで、印刷文書上での先端部805の位置検出を連続的に行えば、印刷文書上での先端部805の移動軌跡を求めることができる。また、前述のように先端部805が筆記面に接触しているかどうかを検出する圧力センサによって、紙面上に筆記を行ったときの筆記軌跡を忠実に求めることができる。
The apparatus main body 807 is provided with a pressure sensor 812 that detects whether the tip portion 805 is in contact with the writing surface. That is, the pressure applied to the tip 805 when the tip 805 contacts the writing surface is transmitted to the pressure sensor 812 via the writing tool 813. The pressure sensor 812 senses this pressure and transmits the sensed information to the microcomputer 808.

By using the pen-type coordinate input device 607, if the position of the leading end 805 on the printed document is continuously detected, the movement locus of the leading end 805 on the printed document can be obtained. Further, as described above, the writing trajectory when writing on the paper surface can be obtained faithfully by the pressure sensor that detects whether or not the tip portion 805 is in contact with the writing surface.

仮に、2次元コードが存在しない文書に加筆するような場合、筆記中にもかかわらずコードを読み取ることが不可能であるので読み取り不能の表示をLCD809あるいはLED810を用いて行いユーザに通知する。   If a document that does not have a two-dimensional code is added to the document, the code cannot be read although writing is in progress, and an unreadable display is made using the LCD 809 or the LED 810 to notify the user.

〔2次元コードが印刷された文書の印刷〕
続いて、2次元コードが印刷された文書の印刷例について図5及び図7を用いて説明する。図7は、2次元コードを作成し、生成された2次元コードを印刷すべき文書に重畳し、文書を印刷するまでの処理のフローチャート図を示す。
[Printing a document with a two-dimensional code printed]
Next, an example of printing a document on which a two-dimensional code is printed will be described with reference to FIGS. 5 and 7. FIG. 7 shows a flowchart of processing from creating a two-dimensional code, superimposing the generated two-dimensional code on a document to be printed, and printing the document.

2次元コードは、情報処理装置604又は609において、文書の印刷命令が実行された場合に、情報処理装置604又は609が有するプリンタドライバで作成される。プリンタドライバはまず、記憶装置605内の文書管理データベース606に問い合わせて印刷しようとする文書のページ毎の文書IDを発行してもらう(S501)。   The two-dimensional code is created by a printer driver included in the information processing apparatus 604 or 609 when a document print command is executed in the information processing apparatus 604 or 609. First, the printer driver makes an inquiry to the document management database 606 in the storage device 605 and issues a document ID for each page of a document to be printed (S501).

次に、紙面のサイズに応じて座標情報を意味する座標データが決定される(S502)。文書IDと座標データを発行してもらったら、文書IDと文書上の座標情報とをあわせ、エンコードすべきデータを作成する。例えば、文書IDは123456、座標情報はmm単位で(24、123)という具合である。   Next, coordinate data indicating coordinate information is determined according to the size of the paper (S502). When the document ID and coordinate data are issued, the document ID and the coordinate information on the document are combined to create data to be encoded. For example, the document ID is 123456, the coordinate information is in mm units (24, 123), and so on.

次にデータをエンコード(符号化)する。データのエンコード処理(S503)及び誤り訂正符号追加(S504)の処理を図8に基づき説明する。文書IDは6桁の数字が3バイトのバイナリ値に変換される。また、水平座標は、紙面左上の原点からmm単位で表すと24mmであるので、2次元コードの水平方向の長さ2mmで割って24/2=12、垂直座標は、座標情報では123mmであるので、2次元コードの水平方向の長さ3mmで割って123/3=41となる。前記の通り、水平・垂直座標が、それぞれ1バイトずつに収まる。   Next, the data is encoded. Data encoding processing (S503) and error correction code addition (S504) processing will be described with reference to FIG. The document ID is converted from a 6-digit number to a binary value of 3 bytes. Further, since the horizontal coordinate is 24 mm when expressed in mm from the origin at the upper left of the paper surface, it is divided by the horizontal length 2 mm of the two-dimensional code 24/2 = 12, and the vertical coordinate is 123 mm in the coordinate information. Therefore, it is 123/3 = 41 divided by the horizontal length of 3 mm of the two-dimensional code. As described above, the horizontal and vertical coordinates each fit in one byte.

座標情報はこのように2バイトのバイナリ値に変換し、文書IDとあわせて計5バイトのデータとする(図7及び図8のS503)。   The coordinate information is thus converted into a 2-byte binary value and is combined with the document ID into a total of 5 bytes of data (S503 in FIGS. 7 and 8).

データをエンコードした後、エンコードデータに基づき誤り訂正符号を追加する(図7及び図8のS504)。図8の例では5バイトのデータに対して4バイトの誤り訂正符号を付加している。この誤り訂正符号には、リードソロモン符号を採用する。リードソロモン符号は、バイト単位の誤りを訂正できる強力な誤り訂正方式であり、誤り訂正符号長の半分以下の誤りを訂正することができる。リードソロモン誤り訂正符号の詳細については、昭晃堂「符号理論(コンピュータ基礎講座18)」宮川、岩垂、今井共著など、多数の書籍に記されている。本発明の場合には、誤り訂正符号長が4バイトの場合、2バイトまでの誤り訂正が可能である。   After the data is encoded, an error correction code is added based on the encoded data (S504 in FIGS. 7 and 8). In the example of FIG. 8, a 4-byte error correction code is added to 5-byte data. A Reed-Solomon code is used for this 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 the present invention, when the error correction code length is 4 bytes, error correction of up to 2 bytes is possible.

このようにして作成されたエンコードデータおよび誤り訂正符号データは図3で説明した2次元コードの各領域に割り当てられ、2次元コードがページ全体に配置されたマトリクスの画像ができあがる(S505)。これで1ページ分の処理が終了したので(S506のはい)、全ページが終了するまで処理を繰り返す(S507)。   The encoded data and error correction code data created in this way are assigned to each area of the two-dimensional code described with reference to FIG. 3, and a matrix image in which the two-dimensional code is arranged on the entire page is created (S505). Since the processing for one page is completed (Yes in S506), the processing is repeated until all pages are completed (S507).

その後、プリンタ601や複写機602のプリンタ部を使用して印刷を行う。印刷が正常に終了したら、プリンタドライバは、文書管理データベース606に正常に印刷された文書、ページ数、文書IDの情報の登録を行う。   Thereafter, printing is performed using the printer unit of the printer 601 or the copying machine 602. When the printing is normally completed, the printer driver registers information of the document, the number of pages, and the document ID that are normally printed in the document management database 606.

図9は、図7の処理を背景に2次元コードが印刷された文書を作業者が印刷する流れを示したフローチャート図である。まず、作業者は、図5の記憶装置605に保存されている文書を必要に応じ編集する(S901)。作業者が、文書の印刷を所望する場合は印刷命令を出す(S902)。この時点で、図7で説明した処理が行われ、2次元コードが配置された紙面に、S901で編集した文書が重畳されて、プリンタ601や複写機602で文書の印刷が実行される。印刷が正常に終了したならば(S903のはい)、プリンタドライバは、印刷に成功した文書IDを文書管理データベース606に登録する(S904)。   FIG. 9 is a flowchart showing a flow in which an operator prints a document on which a two-dimensional code is printed against the background of the process of FIG. First, the operator edits a document stored in the storage device 605 in FIG. 5 as necessary (S901). When the operator desires to print the document, it issues a print command (S902). At this point, the processing described with reference to FIG. 7 is performed, and the document edited in S901 is superimposed on the sheet on which the two-dimensional code is arranged, and the document is printed by the printer 601 or the copier 602. If printing has been completed normally (Yes in S903), the printer driver registers the document ID that has been successfully printed in the document management database 606 (S904).

図10は、2次元コードが重畳され印刷された文書の一例を示す。印刷文書1001は所定のフォーマットを有する帳票文書の一例であり、背景には2次元パターンが印刷されている。拡大部分1003は、印刷文書1001の一部1002を拡大したものである。拡大部分1003において、ドット1004は図3の領域408に相当し、上下の方法を示す。ドット1004以外の黒いドットはコード枠を、白いドットはデータドットの一例である。   FIG. 10 shows an example of a document on which a two-dimensional code is superimposed and printed. A print document 1001 is an example of a form document having a predetermined format, and a two-dimensional pattern is printed on the background. The enlarged part 1003 is an enlarged part 1002 of the print document 1001. In the enlarged portion 1003, the dot 1004 corresponds to the region 408 in FIG. Black dots other than the dot 1004 are examples of code frames, and white dots are examples of data dots.

ここまでで、2次元コードが印刷された文書の印刷が行われたので、続いて、2次元コードの読み取りについて詳述する。   Up to this point, since the document on which the two-dimensional code is printed has been printed, the reading of the two-dimensional code will be described in detail.

〔2次元コード読み取り装置〕
図11は、図6で説明した2次元コード読み取り装置884の機能構成図を示す。まず、図5の画像読み取り装置806で読み取られた紙面の画像(白黒8ビット画像)が入力され、コード位置検出器1101で、画像内にある複数の2次元コードから一つの2次元コードの枠を検出する。詳細は後述する。撮影された画像の一例を図12に示す。図12においては、ドットで構成される複数の2次元コードが撮影されている。
[2D code reader]
FIG. 11 is a functional configuration diagram of the two-dimensional code reading device 884 described in FIG. First, a paper image (monochrome 8-bit image) read by the image reading device 806 in FIG. 5 is input, and a code position detector 1101 selects one two-dimensional code frame from a plurality of two-dimensional codes in the image. Is detected. Details will be described later. An example of the photographed image is shown in FIG. In FIG. 12, a plurality of two-dimensional codes composed of dots are photographed.

2次元コードの位置を検出できたら、データ取得器1102において、2次元コードの各白黒セル(ドットが配置されるべき位置)に応じて0または1のデータを取得し、2次元コードのデータ配置規則に従ってデータの並べ替えが行われる。次に、データ置換器1106は、取得したデータに対して、連続筆記検出器1105から出力される連続筆記中であるか否かを示す信号に応じ、連続筆記中である場合には、既知情報メモリ1108から既知の文書IDを読み出し、データ置換器において2次元コードから取得したデータの文書IDに相当する部分を既知の文書IDで置き換える。ここで、連続筆記検出器1105は、ペン型座標入力装置807には不図示であるが、加筆時にペン先に感じる圧力を検出する圧力センサの出力信号を入力して筆記中かいなかを判定する筆記検出器の出力を入力し、筆記の状態が所定時間以上続くと連続筆記中であると判断し、それ以外の場合を連続筆記中ではないと判断して、その信号を出力する。   If the position of the two-dimensional code can be detected, the data acquisition unit 1102 acquires 0 or 1 data according to each monochrome cell (position where the dot is to be arranged) of the two-dimensional code, and the data arrangement of the two-dimensional code Data is sorted according to the rules. Next, the data replacement unit 1106 responds to the signal indicating whether or not the continuous writing is output from the continuous writing detector 1105 with respect to the acquired data. A known document ID is read from the memory 1108, and the data replacer replaces a portion corresponding to the document ID of the data acquired from the two-dimensional code with the known document ID. Here, although not shown in the pen-type coordinate input device 807, the continuous writing detector 1105 inputs an output signal of a pressure sensor that detects pressure felt at the pen tip when writing, and determines whether writing is in progress. The output of the writing detector is input, and if the writing state continues for a predetermined time or longer, it is determined that continuous writing is in progress, and otherwise it is determined that continuous writing is not in progress, and the signal is output.

文書IDに基づきデータが置換される例を図13に示す。図13の表では、第一行目は正しいデータ、すなわち読み取られる前のエンコードされ誤り訂正符号が付加されたデータである。第二行目は画像から2次元コードを抽出してコードのドットからデータを再構成したものである。Y座標とID情報の1、2番目に誤りがある。この場合三つの誤りがあるため、誤り訂正は不可能である。しかしながら、3行目のように、既知情報として文書IDを置き換えることにより、IDの部分の誤りがなくなり、誤りはY座標の1バイトだけとなり、誤り訂正が可能となって正しい座標情報、ID情報が得られる。   An example in which data is replaced based on the document ID is shown in FIG. In the table of FIG. 13, the first row is correct data, that is, data that has been encoded and added with an error correction code before being read. In the second line, a two-dimensional code is extracted from the image and data is reconstructed from the code dots. There is an error in the first and second Y coordinates and ID information. In this case, since there are three errors, error correction is impossible. However, as shown in the third line, by replacing the document ID as the known information, the error of the ID portion is eliminated, and the error is only 1 byte of the Y coordinate. Is obtained.

続いて、データ置換器1106は、誤り訂正器1107に置換されたデータを出力し訂正処理を行う。誤り訂正器1107からは、誤り訂正が成功したか否かの判定情報と誤り訂正後のデータが出力される。この誤り訂正されたデータは文書IDと座標情報である。出力された誤り訂正の判定情報はデータ復号器1109、ペン先座標算出器1110、既知情報メモリ1108へ入力され、それぞれの機器の制御に使用される。データ復号器1109は、誤り訂正の判定情報が誤り訂正の成功の場合に動作する。誤り訂正失敗であればデータ復号器は動作しない。   Subsequently, the data replacer 1106 outputs the data replaced by the error corrector 1107 and performs correction processing. The error corrector 1107 outputs determination information as to whether error correction has been successful and data after error correction. This error-corrected data is a document ID and coordinate information. The output error correction determination information is input to the data decoder 1109, the nib coordinate calculator 1110, and the known information memory 1108, and is used to control each device. The data decoder 1109 operates when the error correction determination information indicates successful error correction. If error correction fails, the data decoder does not operate.

ペン先座標算出器1110は、誤り訂正の判定情報が誤り訂正成功であり、かつ筆記検出器の出力が筆記中であれば、ペン先座標を算出して出力する。誤り訂正失敗の場合や筆記中でない場合ならば現実にはありえない座標値((−1、−1)等)を出力する。また、既知情報メモリ1108では、誤り訂正が成功である場合、誤り訂正された情報の文書IDに相当する部分を新たに保存する。   The nib coordinate calculator 1110 calculates and outputs nib coordinates when the error correction determination information indicates that the error correction is successful and the output of the writing detector is writing. If the error correction is unsuccessful or not being written, a coordinate value ((-1, -1), etc.) that is impossible in reality is output. Further, in the known information memory 1108, when the error correction is successful, a portion corresponding to the document ID of the error-corrected information is newly stored.

誤り訂正に成功したデータはデータ復号器1109により、紙面上の座標情報と文書IDに復号される。紙面上のIDは、図13の例では、水平座標=24mm、垂直座標123mm、文書ID=23となる。この座標およびデコードに成功した2次元コードの画像を用いて、ペン先座標算出器はペン先の紙面上での座標を算出する(詳細は後述する)。これによりペン型座標入力装置607の先端部805の位置が確定する。以上により、文書ID、ペン先の紙面上での座量が取得される。   Data that has been successfully corrected is decoded by the data decoder 1109 into coordinate information and document ID on the page. In the example of FIG. 13, the ID on the paper is horizontal coordinate = 24 mm, vertical coordinate 123 mm, and document ID = 23. Using the coordinates and the image of the two-dimensional code that has been successfully decoded, the pen tip coordinate calculator calculates coordinates on the paper surface of the pen tip (details will be described later). As a result, the position of the tip 805 of the pen-type coordinate input device 607 is determined. As described above, the document ID and the sitting amount of the nib on the paper surface are acquired.

(コード位置検出器)
コード位置検出器1101の詳細を説明する。コード位置検出器1101の機能構成図の一例を図14に示す。コード位置検出器1101は、図14に示すように、入力画像からドットおよびその位置を検出するドット検出器1401と、検出したドット画像からコード枠を構成するドットを検出し、コードの位置を決定するコード枠検出器1402とからなる。
(Code position detector)
Details of the code position detector 1101 will be described. An example of a functional configuration diagram of the code position detector 1101 is shown in FIG. As shown in FIG. 14, the code position detector 1101 detects a dot and its position from the input image, and detects a dot constituting the code frame from the detected dot image, and determines the code position. Code frame detector 1402 for

・ドット検出器1401
ドット検出器1401がドットを検出する方法を図15を用いて説明する。撮影された画像の中から所定の画素を決定し、該画素を注目画素Zとする。注目画素Zにドットが存在するか否かは、次のように判定する。
Dot detector 1401
A method in which the dot detector 1401 detects dots will be described with reference to FIG. A predetermined pixel is determined from the photographed image, and the pixel is set as a target pixel Z. Whether or not a dot exists in the target pixel Z is determined as follows.

注目画素Zの周囲画素、図15では斜線で記された画素(A〜H)にすでに検出されたドットが存在せず、且つ、注目画素Zの画素値が周囲画素(I〜X)のどの画素値よりも所定の値(Th)以上に小さい場合に注目画素Zに2次元コードのドットがあると検出する(画素値は、黒=0、白=255で表すとする)。すなわち、
画素(A〜H)にすでに検出されたドットが存在しない
且つ
Zの画素値<周囲画素(I〜X)− 所定の値(Th)
の場合に注目画素Zに2次元コードのドットがあると検出する。
There are no dots already detected in the surrounding pixels of the pixel of interest Z, the pixels (A to H) indicated by hatching in FIG. 15, and the pixel value of the pixel of interest Z is any of the surrounding pixels (I to X). When the pixel value is smaller than a predetermined value (Th), it is detected that there is a two-dimensional code dot in the target pixel Z (the pixel value is represented by black = 0 and white = 255). That is,
There is no already detected dot in pixel (AH)
and
Pixel value of Z <peripheral pixel (I to X) −predetermined value (Th)
In this case, it is detected that there is a two-dimensional code dot in the target pixel Z.

所定の値(Th)の設定について説明する。Thが小さければ小さいほどドットを検出しやすくなるが、同時にノイズもドットとして検出してしまい、検出したデータに誤りが起きる可能性がある。また、Thが大きければノイズを検出せずにドットを検出する確率が高くなるが、ドットが連続するコード枠を検出することが難しくなり座標取得率が小さくなる。図16にThの大きさと座標取得率の関係を示す。文書IDを置き換えた場合と置き換えない場合との両方のデータを記載した。   The setting of the predetermined value (Th) will be described. The smaller Th is, the easier it is to detect dots, but at the same time, noise is also detected as dots, which may cause errors in the detected data. If Th is large, the probability of detecting dots without detecting noise increases, but it becomes difficult to detect a code frame in which dots are continuous, and the coordinate acquisition rate is reduced. FIG. 16 shows the relationship between the magnitude of Th and the coordinate acquisition rate. Both the data when the document ID is replaced and the case where the document ID is not replaced are described.

・コード枠検出器1402
続いて、コード枠検出器1402について説明する。コード枠検出器1402は図17のように構成されている。図17は、コード枠検出器1402の機能構成図の一例を示す。
Code frame detector 1402
Next, the code frame detector 1402 will be described. The code frame detector 1402 is configured as shown in FIG. FIG. 17 shows an example of a functional configuration diagram of the code frame detector 1402.

コード枠検出器1402は、ドット画像およびドット位置を入力しその画像中のあるドットがコーナーであるかいなかを検出する第一コーナー検出器1701、第一コーナーとともにコード枠の短辺の一端を成す第二コーナーの位置を推定する第二コーナー位置推定器1702、推定された第二コーナー位置近傍で真の第二コーナーを検出する第二コーナー検出器1703、第二コーナーとともにコード枠の長辺の一端を成す第三コーナーの位置を推定する第三コーナー位置推定器1704、推定された第三コーナー位置近傍で真の第三コーナーを検出する第三コーナー検出器1705、第三コーナーとともにコード枠の他の短辺の一端を成す第四コーナーの位置を推定する第四コーナー位置推定器1706、推定された第四コーナー位置近傍で真の第四コーナーを検出する第四コーナー検出器1707、第四コーナーとともにコード枠の他の長辺の一端を成す第一コーナーの位置を推定する第一コーナー位置推定器1708、推定された第一コーナー位置が最初に検出された第一コーナーの近傍にあり、且つ、検出した各コーナーが一つのコード枠であるかいなかを判定する第一コーナー一致判定器1709とからなる。   The code frame detector 1402 inputs a dot image and a dot position and detects whether a dot in the image is a corner or not, and forms one end of the short side of the code frame together with the first corner. A second corner position estimator 1702 for estimating the position of the second corner, a second corner detector 1703 for detecting a true second corner in the vicinity of the estimated second corner position, and the second corner of the long side of the code frame A third corner position estimator 1704 that estimates the position of the third corner that forms one end, a third corner detector 1705 that detects a true third corner in the vicinity of the estimated third corner position, and a code frame together with the third corner A fourth corner position estimator 1706 for estimating the position of the fourth corner forming one end of the other short side, near the estimated fourth corner position A fourth corner detector 1707 for detecting the true fourth corner, and a first corner position estimator 1708 for estimating the position of the first corner that forms one end of the other long side of the code frame together with the fourth corner. The first corner coincidence determination unit 1709 determines whether the first corner position is in the vicinity of the first detected first corner and each detected corner is one code frame.

なお、説明のため、コーナーに第一〜第四の名称をつけているが、第一のコーナードットは、二次元コードのコード枠のいずれのコーナーであってもよい。   For explanation, the first to fourth names are given to the corners, but the first corner dot may be any corner of the code frame of the two-dimensional code.

図18は、コード枠検出器1402がコーナーを検出する手順を示す図である。第一コーナー検出器1701は、ドットが検出された画像の中で、あるドット(X)が2次元コードのコーナーであるかいなかを判定する(詳細は後述する)。第二コーナー位置推定器1702は、第一コーナーと判定されたコーナーから、ドットで構成されるコード枠の方向(X→B、X→D)に、8ドット離れたドットの位置を推定する。そして、推定された位置のうち、第二コーナードット(B、D)の近傍位置を検出する。第二コーナー検出器1703は、第二コーナー位置推定器1702で推定された第二コーナー位置の近傍に第二コーナーがあるかいなかを検出する。第三コーナー位置推定器1704は、第二コーナーB又はDから、ドットで構成されるコード枠の方向に(B→G、D→E)12ドット離れた位置を時計回り方向に推定する。そして、第三コーナードット(G、E)の近傍位置を検出する。第三コーナー検出器1705は、第三コーナー位置推定器1704で推定された第三コーナー位置の近傍に第三コーナーがあるかいなかを検出する。第四コーナー位置推定器1706は、第三コーナー(G又はE)からコード枠の8ドット離れた位置を時計回り方向に追跡し第四コーナードット(G→C、E→A)の近傍位置を検出する。第四コーナー検出器1707は、第四コーナー位置推定器1706で推定された第四コーナー位置の近傍に第四コーナーがあるかいなかを検出する。第一コーナー位置推定器1708は、第四コーナー(C又はA)からドットで構成されるコード枠の12ドット離れた位置を時計回り方向に推定し(C→X、A→X)、第一コーナードット(X)の近傍位置を検出する。そして、第一コーナー一致判定器1709は、第一コーナー検出器1701で検出された真の第一コーナーと第一コーナー位置推定器1708で推定された位置とが近傍にあるか否かにより、検出した4つのコーナーが一つのコード枠を形成するかいなかを判定する。   FIG. 18 is a diagram illustrating a procedure in which the code frame detector 1402 detects a corner. The first corner detector 1701 determines whether or not a certain dot (X) is a corner of a two-dimensional code in an image in which dots are detected (details will be described later). The second corner position estimator 1702 estimates the position of a dot that is 8 dots away from the corner determined as the first corner in the direction of the code frame composed of dots (X → B, X → D). And the vicinity position of the 2nd corner dot (B, D) is detected among the estimated positions. The second corner detector 1703 detects whether or not there is a second corner in the vicinity of the second corner position estimated by the second corner position estimator 1702. The third corner position estimator 1704 estimates a position 12 dots away from the second corner B or D in the direction of the code frame composed of dots (B → G, D → E) in the clockwise direction. Then, the position near the third corner dot (G, E) is detected. The third corner detector 1705 detects whether there is a third corner in the vicinity of the third corner position estimated by the third corner position estimator 1704. The fourth corner position estimator 1706 tracks the position of the code frame 8 dots away from the third corner (G or E) in the clockwise direction, and determines the position near the fourth corner dot (G → C, E → A). To detect. The fourth corner detector 1707 detects whether there is a fourth corner in the vicinity of the fourth corner position estimated by the fourth corner position estimator 1706. The first corner position estimator 1708 estimates the position 12 dots away from the fourth corner (C or A) of the code frame composed of dots in the clockwise direction (C → X, A → X), A position near the corner dot (X) is detected. The first corner coincidence determination unit 1709 detects whether the true first corner detected by the first corner detector 1701 and the position estimated by the first corner position estimator 1708 are in the vicinity. It is determined whether or not the four corners form one code frame.

以上の手順により、図14のコード枠検出器1402は、図18の(1)または(2)のどちらか一方の2次元コードのコード枠を検出する。コード枠が検出されるとそれを構成するドットの画像上の座標を検出できる。(1)と(2)のどちらが先の処理対象になるかは、ドットXに最も近いドットを持つ方向により決定する。また、一方が検出できればそれでコード枠検出は終了するが、一方のコード枠検出ができなかった場合、他方のコード枠検出を行うことになる。   Through the above procedure, the code frame detector 1402 in FIG. 14 detects the code frame of the two-dimensional code of either (1) or (2) in FIG. When the code frame is detected, the coordinates of the dots constituting the code frame can be detected. Which of (1) and (2) is to be processed earlier is determined by the direction having the dot closest to the dot X. If one of the code frames can be detected, the code frame detection ends. If one of the code frames cannot be detected, the other code frame is detected.

次に、第一コーナー検出器1701による第一コーナー検出の動作を図19を用いて説明する。図19(a)は、第一コーナー検出器1701の機能構成図の一例を、図19(b)は、注目画素を中心にした17×17の画素を表す図を示す。第一コーナー検出器1701は、図19(a)に示すように、2次元コードが撮影された画像のなかで注目ドットの周囲で4つ以上のドットが存在するかいなかを検出する周囲ドット検出器1901と、検出された周囲ドットから、注目ドットに関して点対称となる二組のドットのペアを検出する点対称ペア検出器1902から構成される。   Next, the first corner detection operation by the first corner detector 1701 will be described with reference to FIG. FIG. 19A shows an example of a functional configuration diagram of the first corner detector 1701, and FIG. 19B shows a diagram showing 17 × 17 pixels centered on the target pixel. As shown in FIG. 19A, the first corner detector 1701 detects surrounding dots in the image in which the two-dimensional code is photographed to detect whether there are four or more dots around the dot of interest. And a point-symmetric pair detector 1902 for detecting two pairs of dots that are point-symmetric with respect to the target dot from the detected surrounding dots.

・周囲ドット検出器1901
図19(b)を用いて、周囲ドット検出器1901と点対称ペア検出器1902について説明する。図19(b)は、ドットが検出された画像であり、画素Nに当該ドットが検出されている。画素Nのドットを注目ドットNと称し、画素A〜Fには他のドットが存在する。
Ambient dot detector 1901
The surrounding dot detector 1901 and the point symmetric pair detector 1902 will be described with reference to FIG. FIG. 19B is an image in which dots are detected, and the dots are detected in the pixel N. A dot of the pixel N is referred to as a noticed dot N, and other dots exist in the pixels A to F.

周囲ドット検出では、注目ドットNを中心とする所定長のLen
x Len画素の中で、注目ドットNから渦巻状に他のドットを探索し、注目ドットNの周囲に存在するドットを最大6つ検出する。Lenの典型的な値は17である。ノイズをドットとして誤検出する場合もあるので、二組のペアを作成するために必要となる4つのドットを検出するだけでなく、最大6つのドットを検出するようにする。三つ以下のドットしか検出できなかった場合はこのドットNはコーナードットではないと判定し、処理を終了する。図19(b)の例では、A〜Fの6ドットが存在する。これが周囲ドットとして検出される。
In surrounding dot detection, a predetermined length of Len centered on the target dot N
Among the x Len pixels, other dots are searched in a spiral shape from the target dot N, and a maximum of six dots existing around the target dot N are detected. A typical value for Len is 17. Since noise may be erroneously detected as a dot, not only the four dots necessary to create two pairs are detected, but a maximum of six dots are detected. If only three or less dots can be detected, it is determined that the dot N is not a corner dot, and the process is terminated. In the example of FIG. 19B, 6 dots A to F exist. This is detected as a surrounding dot.

・点対称ペア検出器1902
続いて、点対称ペア検出器1902では、ドットA〜Fのうちで、注目ドットNとの距離が近く、その中間点がNに近く、かつ両ドット間の距離が小さいものを二組検出する。図19(b)の場合、(A、C)、(B、D)の二組がそれに相当する。EおよびFはノイズまたはコーナー最近傍のドットではないと判断される。このようにして注目ドットNおよび周囲の二組の点対称ペアが検出されると、注目ドットNは第一コーナーとして検出される。
Point symmetrical pair detector 1902
Subsequently, the point-symmetric pair detector 1902 detects two pairs of dots A to F that are close to the target dot N, have an intermediate point close to N, and have a small distance between the two dots. . In the case of FIG. 19B, two sets of (A, C) and (B, D) correspond to it. E and F are determined not to be noise or corner nearest dots. When the target dot N and two surrounding point symmetrical pairs are detected in this way, the target dot N is detected as the first corner.

・第二〜第四及び第一コーナー位置推定器
次に、図17の第二コーナー位置推定器1702の詳細を図20に基づき説明する。ここで、第一、第二、第三、第四コーナー位置推定器はコーナー名が変わるだけで、一部のパラメータ以外は同じ構成であるので、他のコーナーの位置推定器うち重複する部分の説明は省略する。図20は、2次元コードのコーナー付近を構成するドットを示す図である。Xは第一コーナー検出器1701より検出された第一コーナードットであり、A〜Iはコード枠を構成するドットである。このうちA〜Dは、図19の点対称ペア検出器1902により検出されているため既知である。ドットYは、第二コーナードットの推定位置、ドットY’は真の第二コーナードットである。
-2nd-4th and 1st corner position estimator Next, the detail of the 2nd corner position estimator 1702 of FIG. 17 is demonstrated based on FIG. Here, the first, second, third, and fourth corner position estimators only change the corner name, and have the same configuration except for some parameters. Description is omitted. FIG. 20 is a diagram illustrating dots that form the vicinity of a corner of a two-dimensional code. X is a first corner dot detected by the first corner detector 1701, and A to I are dots constituting a code frame. Among these, A to D are known because they are detected by the point-symmetric pair detector 1902 of FIG. The dot Y is the estimated position of the second corner dot, and the dot Y ′ is the true second corner dot.

第二コーナー位置推定器1702は、XからドットDEFの方向にあるコーナーの位置を推定する。コーナー位置の推定処理の説明のため、適当な原点を始点とし、ドットA〜I及びXを終端とする座標ベクトルを用いる。   The second corner position estimator 1702 estimates the position of a corner in the direction from X to the dot DEF. For the description of the corner position estimation processing, a coordinate vector starting from an appropriate origin and ending with dots A to I and X is used.

第二コーナー位置は、第一コーナーから8ドット離れた位置にあるため、
第二コーナー位置推定器では、
Y= (D − B)8/2 + X
を計算する。ベクトルDからベクトルBを減算することで、XからY方向を向くベクトルが得られる。このベクトルは長さが2ドット分あるため2で除算し、これにベクトルXを加算することでXから8ドット分離れた第二コーナードットYを推定する。したがって、ベクトルYは、第二または第四コーナードットYの推定ベクトルである。
Because the second corner position is 8 dots away from the first corner,
In the second corner position estimator,
Y = (D−B) 8/2 + X
Calculate By subtracting vector B from vector D, a vector pointing in the Y direction from X can be obtained. Since this vector has a length of 2 dots, it is divided by 2, and the vector X is added to this to estimate the second corner dot Y separated by 8 dots from X. Therefore, the vector Y is an estimated vector of the second or fourth corner dot Y.

また、第一、第三コーナー位置推定器では、縦方向のドット数12を用いて、
Y= (D − B)12/2 + X
で計算される。Yは第一または第三コーナードットYの推定ベクトルである。
In the first and third corner position estimators, using the number of dots 12 in the vertical direction,
Y = (D−B) 12/2 + X
Calculated by Y is an estimated vector of the first or third corner dot Y.

・第二〜第四コーナー検出器
第二コーナーの位置が推定されたので、次に、第二コーナー検出器1703について説明する。図21は、第二コーナー検出器1703の機能構成図の一例を示す。第二コーナー検出器1703は、第二コーナー位置推定器で推定された画素位置(従って位置が推定されたドットYのある画素)を中心として、その周囲にある一つ以上のドットを検出するコーナードット候補検出器2101、及び、検出されたコーナードット候補がコーナーであるか否かを判定するコーナー判定器2102とからなる。なお、第三、第四コーナー検出器については、第二コーナー検出器1703と同様であるので説明は省略する。
Second to Fourth Corner Detector Since the position of the second corner has been estimated, the second corner detector 1703 will be described next. FIG. 21 shows an example of a functional configuration diagram of the second corner detector 1703. The second corner detector 1703 is a corner for detecting one or more dots around the pixel position estimated by the second corner position estimator (therefore, the pixel having the dot Y whose position is estimated). It comprises a dot candidate detector 2101 and a corner determiner 2102 for determining whether or not the detected corner dot candidate is a corner. The third and fourth corner detectors are the same as those of the second corner detector 1703, and thus description thereof is omitted.

コーナードット候補検出器2101の詳細を図22に基づき説明する。図22は、位置が推定されたコーナードットYを有する画素を中心としたSlen × Slen 画素の大きさの領域である。Slenの典型的な大きさは12である。図22の領域の中心にある斜線で表された画素は、推定されたコーナー位置である。ここを中心として外側へ向かって渦巻状(図22の点線)にドットを探索する。ここでも、図19の周囲ドット検出と同様に、領域内の6つのドット(番号1〜6)を検出する。   Details of the corner dot candidate detector 2101 will be described with reference to FIG. FIG. 22 shows an area having a size of Slen × Slen pixels centered on a pixel having a corner dot Y whose position is estimated. The typical size of Slen is 12. A pixel represented by diagonal lines in the center of the region in FIG. 22 is an estimated corner position. A dot is searched for in a spiral shape (dotted line in FIG. 22) outward from this center. In this case as well, six dots (numbers 1 to 6) in the region are detected in the same manner as the surrounding dot detection in FIG.

次に、図21のコーナー判定器2102が、コーナードット候補検出器2101で検出されたドットがコーナードットか否かを判定する。図23は、コーナー判定器2102の機能構成図の一例を示す。コーナー判定器2102は、コーナードット候補検出器2101で検出されたドット候補の位置を記憶しておくFIFOの記憶装置2301とコーナードット候補がある画素位置のドットがコーナードットか否かを判定するコーナードット判定器2302とからなる。コーナードット判定器2302でコーナーと判定されたドットがあれば、その位置が出力されるとともに、FIFOの記憶装置2301に残っているドット位置情報は破棄される。コーナードット判定器2302でコーナーと判定されなかった場合は、FIFOから次のドット位置が読み出され、コーナードット判定器2302はそのドット位置がコーナーであるか否かを判定する動作をする。コーナードット判定器2302は、図19の第一コーナー検出器1701と同等の構成で行われる。すなわち、図22のドット1がコーナードット候補検出器2101で検出されたら、ドット1を図19における注目ドットNとして、周囲ドットの検出及び点対称ペア検出を行う。コーナードット判定器2302の判定の結果、コーナードットと判定されたら第二コーナーの位置情報を出力する。   Next, the corner determination unit 2102 in FIG. 21 determines whether or not the dot detected by the corner dot candidate detector 2101 is a corner dot. FIG. 23 shows an example of a functional configuration diagram of the corner determiner 2102. A corner determination unit 2102 is a FIFO storage device 2301 for storing the positions of dot candidates detected by the corner dot candidate detector 2101 and a corner for determining whether or not a dot at a pixel position where a corner dot candidate is a corner dot. A dot determination unit 2302. If there is a dot determined as a corner by the corner dot determination unit 2302, the position is output and the dot position information remaining in the FIFO storage device 2301 is discarded. If the corner dot determination unit 2302 does not determine that the corner is a corner, the next dot position is read from the FIFO, and the corner dot determination unit 2302 operates to determine whether the dot position is a corner. The corner dot determiner 2302 is performed with the same configuration as the first corner detector 1701 in FIG. That is, when the dot 1 in FIG. 22 is detected by the corner dot candidate detector 2101, the surrounding dot detection and the point-symmetric pair detection are performed with the dot 1 as the target dot N in FIG. 19. If the result of determination by the corner dot determiner 2302 is a corner dot, the position information of the second corner is output.

同様の処理の結果、順次、第二〜第四の各コーナーの位置を検出したら、図17の第一コーナー位置推定器1708は、第四コーナーの位置から第一コーナーの位置を推定する。そして、図17の第一コーナー一致判定器1709は、第一コーナー位置推定器1708により推定された第一コーナーの位置と、最初に第一コーナー検出器1701で検出された第一コーナーとが所定の距離にあるかいなかを判定し、今回判定された各コーナーが一つのコード枠を形成するコーナーであるかいなかを判定する。   When the positions of the second to fourth corners are sequentially detected as a result of the same processing, the first corner position estimator 1708 in FIG. 17 estimates the position of the first corner from the position of the fourth corner. The first corner coincidence determination unit 1709 shown in FIG. 17 has a predetermined first corner position estimated by the first corner position estimator 1708 and a first corner first detected by the first corner detector 1701. It is determined whether each corner determined this time is a corner that forms one code frame.

・第一コーナー一致判定器1709
第一コーナー位置推定器1708により推定された第一コーナーと、第一コーナー検出器1701によりあらかじめ検出された第一コーナーとが所定の距離にあるか否かの判定には、式(1)または式(2)を用いる。
・ First corner coincidence determination unit 1709
To determine whether or not the first corner estimated by the first corner position estimator 1708 and the first corner detected in advance by the first corner detector 1701 are at a predetermined distance, the equation (1) or Equation (2) is used.

|Y'−Y|
< Dth1 …(1)
又は
|Y'x −Yx|
<Dth1 且つ |Y'y−Yy| <Dth2 …(2)
ただし、|Y’−Y|は推定された第一コーナーベクトルYと第一コーナーベクトルY'の距離。Y'x、Y'y
はそれぞれベクトルY'のx成分、y成分であり、Yx、YyはそれぞれベクトルYのx成分、y成分である。Dth1、DTH2は所定の閾値を表す。典型的な値は10である。従って、第一コーナー位置推定器1708により推定された第一コーナーと、第一コーナー検出器1701によりあらかじめ検出された第一コーナーとが所定の閾値(距離)よりも近い場合に、第一コーナー一致判定器1709は、2次元コードのコード枠が検出されたと判定する。
| Y'-Y |
<Dth1 (1)
Or
| Y'x -Yx |
<Dth1 and | Y'y-Yy | <Dth2 (2)
However, | Y′−Y | is the estimated distance between the first corner vector Y and the first corner vector Y ′. Y'x, Y'y
Are the x component and y component of the vector Y ′, respectively, and Yx and Yy are the x component and y component of the vector Y, respectively. Dth1 and DTH2 represent predetermined threshold values. A typical value is 10. Therefore, if the first corner estimated by the first corner position estimator 1708 and the first corner detected in advance by the first corner detector 1701 are closer than a predetermined threshold (distance), the first corner coincides. The determiner 1709 determines that the code frame of the two-dimensional code has been detected.

以上で、図11のコード位置検出器1101により2次元コードのコード位置が検出された。次に図11のデータ取得器1102の説明を図24に基づき行う。   Thus, the code position of the two-dimensional code is detected by the code position detector 1101 of FIG. Next, the data acquisition unit 1102 of FIG. 11 will be described with reference to FIG.

(データ取得器)
図24(a)は、ドットで構成された2次元コード及びコード枠を示す。図24(b)は2次元コードの各ドットの位置を仮想座量で表す図を示す。図24(c)は、2次元コードのデータを取得する処理の一例を表すフローチャート図を示す。図24(d)は、2次元コードのデータを取得する処理の別の例を表すフローチャート図を示す。
(Data acquisition device)
FIG. 24A shows a two-dimensional code composed of dots and a code frame. FIG. 24B shows a diagram representing the position of each dot of the two-dimensional code as a virtual locus. FIG. 24C is a flowchart illustrating an example of processing for acquiring two-dimensional code data. FIG. 24D is a flowchart illustrating another example of processing for acquiring two-dimensional code data.

以下、図24(c)に従って、2次元コードのデータを取得する方法を説明する。図24(a)では、コード枠のコーナーをそれぞれa0、b0、c0、d0とし、コード枠のうち、コーナーの4点を除いたドットをa1〜a7、b1〜b11、c1〜c7、d1〜d11、とする。2次元コードのデータを取得するには、a1〜a7とc1〜c7とを結ぶ垂直線、b1〜b11とd1〜d11とを結ぶ水平線を引き、垂直線と水平線との交点を検出する。該交点が、2次元コードのデータドットの存在位置となる。   Hereinafter, a method for acquiring data of a two-dimensional code will be described with reference to FIG. In FIG. 24 (a), the corners of the code frame are a0, b0, c0, and d0, and the dots excluding the four corners of the code frame are a1 to a7, b1 to b11, c1 to c7, and d1. d11. In order to acquire data of the two-dimensional code, a vertical line connecting a1 to a7 and c1 to c7 and a horizontal line connecting b1 to b11 and d1 to d11 are drawn, and an intersection of the vertical line and the horizontal line is detected. The intersection is the position where the data dot of the two-dimensional code exists.

垂直線と水平線との交点を検出するためのひとつの方法として、射影変換を用いる。図24(b)は、2次元コードの各ドットの仮想座標を示す。4つのコーナーの位置は既知であるので、これらに対応する座標、a0とAv0(0、0)、b0とBv0(8、0)、c0とCv0(8、12)、d0とDv0(0、12)は既知である。射影変換について詳しくは後述するが、これらの対応する4点からa0=f(Av0)、
b0=f(Bv0)、 c0=f(Cv0)、d0=f(Dv0)を満たす8元1次連立方程式を作り、これを解くことで各データドットの画像座標が求められる(S2401)。
Projective transformation is used as one method for detecting the intersection of a vertical line and a horizontal line. FIG. 24B shows virtual coordinates of each dot of the two-dimensional code. Since the positions of the four corners are known, the coordinates corresponding to them are a0 and Av0 (0, 0), b0 and Bv0 (8, 0), c0 and Cv0 (8, 12), d0 and Dv0 (0, 12) is known. The projective transformation will be described in detail later. From these four corresponding points, a0 = f (Av0),
An 8-ary linear simultaneous equation that satisfies b0 = f (Bv0), c0 = f (Cv0), and d0 = f (Dv0) is created and solved to obtain the image coordinates of each data dot (S2401).

f(x)は未知パラメータが8つの関数であるので、連立方程式を解くことにより、図24(b)の仮想座標から画像座標への変換が可能になる。仮想座標から画像座標への変換が可能になると、仮想座標(1、1)〜(7、11)から画像座標への射影変換が可能になり、データドットの存在位置を検出することができる(S2402)。しかしながら、データドットの存在位置は理想の位置であるので、必ずしも実際のドットがその位置にあるわけではなく、1画素程度ずれて存在していることもある。したがって、データドットの検出は、射影変換により得られたデータドットの存在位置を中心として3x3画素領域を探索してドットの有無を検出する(S2403)。この領域にドットが存在すれば、その位置のデータは"1"となり、存在しなければ"0"とする。これを2次元コード内の77個の仮想座量に対して行ってコードデータを取得する。   Since f (x) is a function having eight unknown parameters, by solving the simultaneous equations, conversion from virtual coordinates to image coordinates in FIG. 24B becomes possible. When conversion from the virtual coordinates to the image coordinates becomes possible, projective conversion from the virtual coordinates (1, 1) to (7, 11) to the image coordinates becomes possible, and the presence position of the data dot can be detected ( S2402). However, since the position where the data dot exists is an ideal position, the actual dot does not necessarily exist at that position, and the data dot may be shifted by about one pixel. Therefore, the detection of data dots is performed by searching for a 3 × 3 pixel area centering on the existence position of the data dots obtained by projective transformation (S2403). If there is a dot in this area, the data at that position is “1”, otherwise it is “0”. This is performed for 77 virtual seats in the two-dimensional code to obtain code data.

2次元コードのデータが取得されたら、図4で説明したデータ配置規則に従ってデータを再構成する(S2404)。この際2次元コードの上下方向の判定は、図4の領域408と領域409を参照して、領域408に存在するデータは全て“1”、領域409に存在するデータは全て”0”であるはずとの前提の下、取得したデータとの一致度が高い向きに合わせる。   When the data of the two-dimensional code is acquired, the data is reconfigured according to the data arrangement rule described with reference to FIG. 4 (S2404). At this time, the determination of the vertical direction of the two-dimensional code refers to the areas 408 and 409 in FIG. 4, all the data existing in the area 408 is “1”, and all the data existing in the area 409 is “0”. Based on the assumption that it should be, it matches the direction with the high degree of coincidence with the acquired data.

データドットの存在位置の検出は、射影変換を行う以外にも方法はある。例えば、図24(d)のフローチャートに示したように、a0-b0間を8等分する点をそれぞれa1〜a7、 b0-c0間を12等分する点をそれぞれb1〜b11、d0-c0間を8等分する点をそれぞれc1〜c7、a0-d0間を12等分する点をそれぞれd1〜d11とし、各データドットの存在位置は、線分axcxと線分bydy(ただし、x=1、…、7、y=1、…、11)との交点から求められる。該交点の座標を中心に3x3画素の領域でドットが存在するかいなかを検出すれば、2次元コードのデータドットが得られる。   There are other methods for detecting the existence position of the data dot besides performing projective transformation. For example, as shown in the flowchart of FIG. 24D, points a1 to a7 are divided into 8 equally between a0 and b0, and points b1 to b11 and d0 to c0 are divided into 12 equally between b0 and c0. The points that divide the space into eight equal parts are c1 to c7, the points that divide a0-d0 into 12 parts are respectively d1 to d11, and the positions of the data dots are the line segment axcx and the line segment bydy (where x = 1,..., 7, y = 1,. If it is detected whether or not a dot exists in a 3 × 3 pixel area around the coordinates of the intersection, a data dot of a two-dimensional code can be obtained.

(ペン先座標の算出)
ペンに備えられたカメラで撮影された2次元コードのデータドットが得られたので、次に、ペン先の座標の算出について説明する。
(Calculation of nib coordinates)
Since the data dot of the two-dimensional code photographed with the camera provided in the pen was obtained, calculation of the coordinates of the pen tip will be described next.

図25は、図11で説明したペン先座標算出器1110の機能構成図を示す。ペン先座標算出器1110は、図25に示すとおり、射影パラメータ算出器2501とペン先座標変換器2502とからなる。まず、射影パラメータ算出器2501に、画像上の2次元コードのコーナー座標と、それに対応する紙面上の2次元コードのコーナー座標を入力する。それらから射影パラメータを算出する。射影パラメータの算出方法を、図26を用いて詳述する。   FIG. 25 shows a functional block diagram of the nib coordinate calculator 1110 described in FIG. The pen tip coordinate calculator 1110 includes a projection parameter calculator 2501 and a pen tip coordinate converter 2502 as shown in FIG. First, the two-dimensional code corner coordinates on the image and the corresponding two-dimensional code corner coordinates on the paper surface are input to the projection parameter calculator 2501. Projective parameters are calculated from them. A method for calculating the projection parameters will be described in detail with reference to FIG.

図26は、射影パラメータの算出方法を示す図である。図26(a)は、撮影された画像における2次元コードのコーナー(As〜Ds)とペン型座標入力装置607の先端部805の座標(Ps)を示す。ペン型入力装置607では画像読取装置806と先端部805は固定されているため、座標Psは常に一定である。先端部805はペン型座標入力装置607の構成により画像読取装置806で撮像される画像内にある場合もあれば画像外である場合もありうる。画像外にある場合は、その座標は負の値あるいは画像の座標の最大値を越えることになる。   FIG. 26 is a diagram illustrating a method for calculating projection parameters. FIG. 26A shows the corners (As to Ds) of the two-dimensional code and the coordinates (Ps) of the tip end portion 805 of the pen-type coordinate input device 607 in the photographed image. In the pen-type input device 607, since the image reading device 806 and the tip portion 805 are fixed, the coordinate Ps is always constant. Depending on the configuration of the pen-type coordinate input device 607, the distal end portion 805 may be inside the image captured by the image reading device 806 or may be outside the image. If it is outside the image, its coordinates will exceed a negative value or maximum image coordinate.

図26(b)は、紙面における2次元コードのコーナー(Ar〜Dr)とペン型座標入力装置607の先端部805の座標(Pr)である。2次元コードのデコードによりArが決定されるのでその隣接コーナーであるBr〜Drは自動的に決まる。ここで、座標As〜Ds、及び、座標Ar〜Drが求められと、両者の関係から変換式が求められる。   FIG. 26B shows the corners (Ar to Dr) of the two-dimensional code on the paper surface and the coordinates (Pr) of the tip 805 of the pen-type coordinate input device 607. Since Ar is determined by decoding the two-dimensional code, Br to Dr which are adjacent corners are automatically determined. Here, when the coordinates As to Ds and the coordinates Ar to Dr are obtained, a conversion formula is obtained from the relationship between the two.

Figure 0004159948
変換係数b1〜b8は未知数であるが、コーナー座標の関係により8つの一次方程式が作られる。この連立方程式を解く事によりb1〜b8のパラメータが算出される。このパラメータを用いることで、ペンの先端部805の画像座標Psを紙面上の座標Prに変換する。
Figure 0004159948
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. By using this parameter, the image coordinates Ps of the pen tip 805 are converted into coordinates Pr on the paper.

以上を要約すると、画像上の2次元コードのコーナー座標As〜Dsは図11のコード位置枠検器1101により算出され、ペン先座標Psは固定されているので既知であり、紙面上の2次元コードのコーナー座標Arは2次元コードのデコードにより求められ、Br〜DrはArに隣接する座標であるので算出できる。Prは数式1により求められる。   To summarize the above, the corner coordinates As to Ds of the two-dimensional code on the image are calculated by the code position frame detector 1101 in FIG. 11, and the pen point coordinates Ps are known because they are fixed. The code corner coordinates Ar are obtained by decoding the two-dimensional code, and Br to Dr can be calculated because they are adjacent to Ar. Pr is obtained by Equation 1.

〔上記実施例の変形例〕
次に、2次元コード読取装置の変形例について説明する。図27は、本変形例における2次元コード読み取り装置の機能構成図を示す。図27の2次元コード読み取り装置は、2つの誤り訂正器(第1誤り訂正器1107a、第2誤り訂正器1107b)がある点と、それに伴い選択器1111がある点で図11と異なる。なお、図11と同一構成部分には同一符号を付し、その説明は省略する。第1誤り訂正器1107a及び第2誤り訂正器1107bの機能は図11の誤り訂正器1107と同一である。
[Modification of the above embodiment]
Next, a modification of the two-dimensional code reader will be described. FIG. 27 is a functional configuration diagram of the two-dimensional code reading device in the present modification. The two-dimensional code reader of FIG. 27 differs from FIG. 11 in that there are two error correctors (first error corrector 1107a and second error corrector 1107b) and a selector 1111 accordingly. In addition, the same code | symbol is attached | subjected to the same component as FIG. 11, and the description is abbreviate | omitted. The functions of the first error corrector 1107a and the second error corrector 1107b are the same as those of the error corrector 1107 in FIG.

選択器1111の機能を説明する。連続筆記検出器1105において連続筆記中であると判断された場合は、常に第2誤り訂正器1107bの出力を選択し、図11の2次元コード読み取り装置と同一の動作を行う。筆記検出器の出力が筆記中であり、かつ連続筆記中でない場合、すなわち筆記の開始時には、選択器1111は次のような動作を行う。第1誤り訂正器1107aが出力する誤り訂正判定情報が誤り訂正成功の場合には第1誤り訂正器の出力が選択される。第1誤り訂正器が出力する誤り訂正判定情報が誤り訂正失敗の場合には、第2誤り訂正器の出力が選択される。   The function of the selector 1111 will be described. When the continuous writing detector 1105 determines that continuous writing is in progress, the output of the second error corrector 1107b is always selected, and the same operation as that of the two-dimensional code reader of FIG. 11 is performed. When the output of the writing detector is writing and not writing continuously, that is, at the start of writing, the selector 1111 performs the following operation. When the error correction determination information output from the first error corrector 1107a is error correction success, the output of the first error corrector is selected. When the error correction determination information output from the first error corrector is an error correction failure, the output of the second error corrector is selected.

このような処理を行うと、新しい加筆が行われる際に、同一の文書への加筆ならば装置としての誤り訂正率が向上するので図11の装置より有利である。   When such processing is performed, when new writing is performed, if the same document is added, the error correction rate as the device is improved, which is more advantageous than the device of FIG.

〔ソフトウェアによる2次元コード読み取り〕
これまで説明してきた図6の2次元コードの読み取り装置884はハードウェアでコードの読み取りを行っているが、ソフトウェアで行ってもよい。この場合は2次元コード読み取り方法を実現するプログラムがマイコン808のROM882に格納されており、そのプログラムの命令が順次CPUにロードされて命令の実行が行われ、2次元コードの読み取り処理がなされる。
[2D code reading by software]
The two-dimensional code reader 884 in FIG. 6 described so far reads the code by hardware, but it may be performed by software. In this case, a program that realizes the two-dimensional code reading method is stored in the ROM 882 of the microcomputer 808, and instructions of the program are sequentially loaded into the CPU and executed to execute the two-dimensional code reading process. .

図28は、ソフトウェアによる処理手順を示すフローチャート図である。図28(a)は、2次元コードのデコードの処理を、図28(b)は誤り訂正手順の処理を示す図である。まず、画像入力を行った後、S2801において2次元コードの位置を検出する。   FIG. 28 is a flowchart showing a processing procedure by software. FIG. 28A shows a process for decoding a two-dimensional code, and FIG. 28B shows a process for an error correction procedure. First, after inputting an image, the position of the two-dimensional code is detected in S2801.

S2801のコード位置検出ステップの詳細を図29のコード位置検出処理のフローチャート図に示す。図29のフローチャート図は、画像からドットを検出するドット検出ステップ(S2901)と検出したドットからコード枠を検出するコード枠検出ステップ(S2902)とからなる。ドット検出ステップ(S2901)におけるドットの検出方法は、図15において説明したドット検出の方式と同じである。また、コード枠検出ステップ(S2902)の処理を示すフローチャート図を図30に示す。図30のフローチャート図の各ステップは、図17に示したコード枠検出器の各ブロックと対応した機能を実現するように構成されている。すなわち、S3001は第一コーナー検出器1701の機能を実現し、S3002は第二コーナー位置推定器1702の機能を実現し、S3003は第二コーナー検出器1703の機能を実現し、S3004は第三コーナー位置推定器1704の機能を実現し、S3005は第三コーナー検出器1705の機能を実現し、S3006は第四コーナー位置推定器1706の機能を実現し、S3007は第四コーナー検出器1707の機能を実現し、S3008は第一コーナー位置推定器1708の機能を実現し、S3009は第一コーナー一致判定器1709の機能を実現する。   Details of the code position detection step of S2801 are shown in the flowchart of the code position detection process of FIG. The flowchart in FIG. 29 includes a dot detection step (S2901) for detecting dots from an image and a code frame detection step (S2902) for detecting a code frame from the detected dots. The dot detection method in the dot detection step (S2901) is the same as the dot detection method described in FIG. FIG. 30 is a flowchart showing the process of the code frame detection step (S2902). Each step in the flowchart of FIG. 30 is configured to realize a function corresponding to each block of the code frame detector shown in FIG. That is, S3001 implements the function of the first corner detector 1701, S3002 implements the function of the second corner position estimator 1702, S3003 implements the function of the second corner detector 1703, and S3004 implements the third corner. The function of the position estimator 1704 is realized, S3005 realizes the function of the third corner detector 1705, S3006 realizes the function of the fourth corner position estimator 1706, and S3007 realizes the function of the fourth corner detector 1707. In step S3008, the function of the first corner position estimator 1708 is realized. In step S3009, the function of the first corner coincidence determination unit 1709 is realized.

図29及び30の処理が終了し図28のコード位置の検出(S2801)が終了すると、データ取得ステップ(S2802)において、2次元コードの白黒に応じて0または1のデータを取得し、取得したデータの並べ替えを行う。データ取得ステップ(S2802)は図24(c)又は(d)に示したフローチャート図に従って実行される。したがって処理内容は図11又は27のデータ取得器1102の機能が実現するものと同等である。   When the processing of FIGS. 29 and 30 is finished and the detection of the code position (S2801) of FIG. 28 is finished, in the data acquisition step (S2802), 0 or 1 data is acquired according to the black and white of the two-dimensional code. Sort the data. The data acquisition step (S2802) is executed according to the flowchart shown in FIG. 24 (c) or (d). Therefore, the processing content is equivalent to that realized by the function of the data acquisition unit 1102 in FIG.

続いて、S2802で取得したデータの誤り訂正を行う(S2803)。まず、取得したデータが連続筆記中(図5のペン型座標入力装置先端部805が常に紙面に押し付けられている)であるかどうかを判定し(S2811)、連続取得中ならば(S2811のはい)、データ置換ステップ(S2812)において既知情報(文書ID)でデータ置換を行う。データ置換を行った後、誤り訂正ステップ(S2813)で誤り訂正を行う。誤り訂正が成功した場合には(S2814のはい)、文書IDを保存するステップ(既知情報保存ステップS2815)においてデコードされた既知情報(文書ID)を保存する。   Subsequently, error correction of the data acquired in S2802 is performed (S2803). First, it is determined whether or not the acquired data is being continuously written (the pen-type coordinate input device tip 805 in FIG. 5 is always pressed against the paper surface) (S2811). ), Data replacement is performed with the known information (document ID) in the data replacement step (S2812). After data replacement, error correction is performed in an error correction step (S2813). If the error correction is successful (Yes in S2814), the known information (document ID) decoded in the step of saving the document ID (known information saving step S2815) is saved.

続いて、データ復元ステップ(S2805)において元のデータ(座標情報)を復元し、ペン先座標算出ステップ(S2806)において、ペン型座標入力装置607の先端部805の紙面上の座標を求める。   Subsequently, the original data (coordinate information) is restored in the data restoration step (S2805), and the coordinates on the paper surface of the tip 805 of the pen-type coordinate input device 607 are obtained in the pen tip coordinate calculation step (S2806).

S2811において、取得したデータが連続筆記中でなかった(初めての加筆である)場合(S2811のいいえ)、データの置換は行わず、誤り訂正ステップ(S2813)で誤り訂正を行う。誤り訂正が成功した場合は(S2814のはい)、文書IDを保存するステップ(既知情報保存ステップS2815)で文書ID(既知情報)を保存し、データ復元ステップ(S2805)で元のデータ(座標情報)を復元し、ペン先座標算出ステップ(2806)でペン型座標入力装置607の先端部805の紙面上の座標を求める。   In S2811, if the acquired data is not in continuous writing (the first addition) (No in S2811), the data is not replaced and error correction is performed in the error correction step (S2813). If the error correction is successful (Yes in S2814), the document ID (known information) is saved in the step of saving the document ID (known information saving step S2815), and the original data (coordinate information) is saved in the data restoring step (S2805). ) And the coordinates on the paper surface of the tip end portion 805 of the pen-type coordinate input device 607 are obtained in the pen tip coordinate calculation step (2806).

以上の処理により、コード位置の検出(S2801)、データ取得(S2802)、誤り訂正(S2803)、座標・文書ID復元(S2805)、ペン先座標算出(S2806)の各ステップは、図11のコード位置検出器、データ取得器、誤り訂正器、データ復号器、ペン先座標算出器の各機能をソフトウェアで実現した。   With the above processing, the steps of code position detection (S2801), data acquisition (S2802), error correction (S2803), coordinate / document ID restoration (S2805), and nib coordinate calculation (S2806) are performed as shown in FIG. The functions of the position detector, data acquisition unit, error correction unit, data decoder, and nib coordinate calculator were realized by software.

〔ソフトウェアによる2次元コード読み取りの他の例〕
ソフトウェアによる2次元コード読み取りの他の例として図31にそのフローチャート図を示す。図31において、図28と同一ステップには同一の番号を付し、その説明は省略する。図28のフローチャート図と異なるのは、筆記中であって連続検出中でない場合は(S3101のはい且つS2811のいいえ)、筆記開始時に文書IDを置き換えずに誤り訂正を行う(S2813b)点である。誤り訂正ができなかった場合には(S2814bのいいえ)、文書ID部分の置き換えを行って誤り訂正を行う処理を行う(S2812、S2813)。この処理により、同一文書への加筆時には、図31の方法を使用することで図28の方法よりも誤り訂正率が向上する。
[Other examples of 2D code reading by software]
FIG. 31 is a flowchart showing another example of two-dimensional code reading by software. In FIG. 31, the same steps as those in FIG. 28 are denoted by the same reference numerals, and the description thereof is omitted. The difference from the flowchart of FIG. 28 is that, when writing is in progress and continuous detection is not being performed (Yes in S3101 and No in S2811), error correction is performed without replacing the document ID at the start of writing (S2813b). . If error correction cannot be performed (No in S2814b), processing for error correction is performed by replacing the document ID portion (S2812, S2813). By this process, when adding to the same document, the error correction rate is improved by using the method of FIG. 31 compared to the method of FIG.

〔加筆した情報の取得、原文書への重畳方法〕
これまでで、2次元コードを読むことにより加筆座標を取得する装置・システム、方法、ソフトウェアについて述べたので、その加筆した情報を取得し、原文書に重畳する装置等について述べる。使用するシステムは図5に記載したものを使用し、その制御の流れを図32のフローチャート図に示す。
[Acquisition of added information, superimposing method on original document]
So far, the apparatus, system, method, and software for acquiring the added coordinates by reading the two-dimensional code have been described. An apparatus for acquiring the added information and superimposing it on the original document will be described. The system used is the one shown in FIG. 5, and the control flow is shown in the flowchart of FIG.

所定の文書が2次元コード付きで印刷されているとする。ペン型座標入力装置607で、その文書に加筆する。すると、前述したように、文書上の2次元コードが読み取られ、文書IDと座標情報がペン型座標入力装置607で取得される(S3201)。加筆とともにリアルタイムで読み取られた文書IDや座標情報が図5の情報処理装置604へ転送される(S3202)。情報処理装置604は文書IDと座標情報を受け取ると、その文書IDを文書管理データベース606を管理する情報処理装置609へ転送する。情報処理装置609は受信した文書IDを元に、文書管理データベース606から現在加筆されている文書(のページ)を特定する(S3203)。   Assume that a predetermined document is printed with a two-dimensional code. The pen-type coordinate input device 607 is used to write on the document. Then, as described above, the two-dimensional code on the document is read, and the document ID and coordinate information are acquired by the pen-type coordinate input device 607 (S3201). The document ID and coordinate information read in real time with the addition are transferred to the information processing apparatus 604 in FIG. 5 (S3202). When the information processing apparatus 604 receives the document ID and the coordinate information, the information processing apparatus 604 transfers the document ID to the information processing apparatus 609 that manages the document management database 606. Based on the received document ID, the information processing apparatus 609 identifies the currently added document (page) from the document management database 606 (S3203).

図33は、文書管理データベース606の登録項目の一例を示す。図33のデータベースは、識別番号(ID)、文書名、パス名、作成者、更新日時、ページ、総ページ数、座標列ファイル、の各項目を有する。一例として、識別番号により特定された文書は、図33の識別番号(ID)123456の「PATENT.DOC」のページ1であるとする。この文書情報は、ペン型座標入力装置607へ送信され、ペン型入力装置607のLCD表示装置809には受信した文書情報が表示される。   FIG. 33 shows an example of registered items in the document management database 606. The database in FIG. 33 includes items of identification number (ID), document name, path name, creator, update date, page, total number of pages, and coordinate string file. As an example, it is assumed that the document specified by the identification number is page 1 of “PATENT.DOC” having the identification number (ID) 123456 of FIG. This document information is transmitted to the pen-type coordinate input device 607, and the received document information is displayed on the LCD display device 809 of the pen-type input device 607.

ファイル名、ページ番号などの電子文書(ファイル)の実体が特定できたので、情報処理装置604は「PATENT.DOC」をそれが関連付けられているアプリケーション(例えばワープロソフト)で開き、情報処理装置604に接続された不図示のディスプレイに表示し、編集状態とする(S3204)。編集状態とされた文書「PATENT.DOC」に、ペン型座標入力装置607から次々送信されてくる座標情報が描画されることになる(S3205〜S3208)。描画する方法としては、文書のウィンドウに新たな描画オブジェクトを開き、受信した座標を線でつないで描画することで実現することができる。加筆が終了した時点で(S3209のはい)、ペン型座標入力装置607は加筆終了の信号を情報処理装置604へ送信し、加筆終了の信号を受け取った情報処理装置604は、ウィンドウへの描画を終了し、加筆情報、該当文書の更新・保存を行う(S3210)。このようにして文書「PATENT.DOC」に一つのオブジェクトが加えられる。   Since the entity of the electronic document (file) such as the file name and page number has been specified, the information processing apparatus 604 opens “PATENT.DOC” with an application (for example, word processing software) associated with the information processing apparatus 604, Is displayed on a display (not shown) connected to the screen, and the editing state is set (S3204). The coordinate information sequentially transmitted from the pen-type coordinate input device 607 is drawn on the document “PATENT.DOC” in the edited state (S3205 to S3208). A 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. At the time of completion of writing (Yes in S3209), the pen-type coordinate input device 607 transmits a signal for completion of writing to the information processing device 604, and the information processing device 604 that has received the signal for completion of writing draws in the window. Then, the update information and the corresponding document are updated / saved (S3210). In this way, one object is added to the document “PATENT.DOC”.

以上説明した実施例では、加筆した情報をリアルタイムでコンピュータのディスプレイ上に表示し、実際に加筆した情報が正しく処理されているかどうかがすぐに確認できるので、後から加筆した内容の訂正が必要になることが少なく、ユーザにとって大きなメリットになる。   In the embodiment described above, the added information is displayed on the computer display in real time, and it can be confirmed immediately whether the actually added information is processed correctly, so it is necessary to correct the contents added later. This is a great advantage for the user.

また、本実施例における二次元コードのコード枠の検出方法は,コーナードットを検出しそれらコーナードットを直線で結ぶこと行うので、文書の文字、罫線や、汚れ、画像の質が悪い等でコード枠上のドットの検出が困難であっても、すぐにコード枠が検出できなくなることがない。そのため、二次元コードの検出(座標データなどの取得)の確率が増す。   Also, the detection method of the code frame of the two-dimensional code in the present embodiment is to detect corner dots and connect the corner dots with straight lines, so that the character code, ruled lines, dirt, image quality is poor, etc. Even if it is difficult to detect dots on the frame, the code frame cannot be detected immediately. Therefore, the probability of detecting the two-dimensional code (acquisition of coordinate data etc.) increases.

また、情報処理装置604では受信した座標情報を数列テキストとして同時に、図33の座標列ファイルに別ファイルとして保存する。文書が巨大な場合など、ユーザが後にアプリケーションを開いて加筆されたデータを確認したい場合や素早く確認することが不可能な場合に、加筆されたデータのみを表示・確認させることができるので有効である。   In addition, the information processing apparatus 604 stores the received coordinate information as a number sequence text and at the same time as a separate file in the coordinate sequence file of FIG. This is useful because it is possible to display and check only the added data when the user wants to check the added data by opening the application later, such as when the document is huge, or when it is impossible to check it quickly. is there.

本実施例における2次元コードの一例である。It is an example of the two-dimensional code in a present Example. 本実施例における2次元コードを構成するドットおよび2次元コードの大きさを示す図である。It is a figure which shows the magnitude | size of the dot which comprises the two-dimensional code in a present Example, and a two-dimensional code. 1つの2次元コードを示す図である。It is a figure which shows one two-dimensional code. 2次元コードのデータ配列を示す図である。It is a figure which shows the data array of a two-dimensional code. 文書管理システムの概略構成図である。It is a schematic block diagram of a document management system. マイコンの構成図の一例である。It is an example of the block diagram of a microcomputer. 2次元コードが重畳された文書を印刷する処理を示すフローチャート図である。It is a flowchart figure which shows the process which prints the document on which the two-dimensional code was superimposed. データの符号化及び誤り訂正符号付加の処理を示す図である。It is a figure which shows the process of data encoding and error correction code addition. 作業者が2次元コードが重畳された文書を印刷する流れを示すフローチャート図である。It is a flowchart figure which shows the flow which an operator prints the document on which the two-dimensional code was superimposed. 2次元コードが重畳され印刷された文書の一例である。It is an example of the document on which the two-dimensional code was superimposed and printed. 2次元コード読み取り装置の機能構成図である。It is a functional block diagram of a two-dimensional code reader. 2次元コードが撮影された画像の一例である。It is an example of the image by which the two-dimensional code was image | photographed. 文書IDに基づきデータが置換される例を示す図である。It is a figure which shows the example by which data is replaced based on document ID. コード位置検出器の機能構成図の一例である。It is an example of a functional block diagram of a code position detector. ドット検出の方法を説明するための図である。It is a figure for demonstrating the method of a dot detection. Th(閾値)と座標取得率の関係を示す図である。It is a figure which shows the relationship between Th (threshold) and a coordinate acquisition rate. コード枠検出器の機能構成図の一例である。It is an example of a functional block diagram of a code frame detector. コード枠検出器がコーナーを検出する手順を示す図である。It is a figure which shows the procedure in which a code frame detector detects a corner. 第一コーナーの検出方法を説明するための図である。It is a figure for demonstrating the detection method of a 1st corner. 第二コーナーの位置を推定する方法を説明するための図である。It is a figure for demonstrating the method of estimating the position of a 2nd corner. 第二コーナー検出器の機能構成図の一例である。It is an example of the functional block diagram of a 2nd corner detector. コーナードットを有する画素を中心としたSlen × Slen画素の大きさの領域を示す図である。It is a figure which shows the area | region of the magnitude | size of SlenxSlen pixel centering on the pixel which has a corner dot. コーナー判定器の機能構成図の一例である。It is an example of the functional block diagram of a corner determination device. データ取得器のデータ取得の方法を説明するための図である。It is a figure for demonstrating the data acquisition method of a data acquisition device. ペン先座標算出器の機能構成図の一例である。It is an example of a functional block diagram of a nib coordinate calculator. 射影パラメータの算出方法を説明するための図である。It is a figure for demonstrating the calculation method of a projection parameter. 変形例における2次元コード読み取り装置の機能構成図の一例である。It is an example of the function block diagram of the two-dimensional code reader in a modification. ソフトウェアによる2次元コード読み取りの処理を示すフローチャート図である。It is a flowchart figure which shows the process of the two-dimensional code reading by software. コード位置検出処理のフローチャート図である。It is a flowchart figure of a code position detection process. コード枠検出ステップの処理を示すフローチャート図である。It is a flowchart figure which shows the process of a code frame detection step. ソフトウェアによる2次元コード読み取りの他の処理を示すフローチャート図である。It is a flowchart figure which shows the other process of the two-dimensional code reading by software. 文書加筆時の文書及び文書管理データベースの更新処理を示すフローチャート図である。It is a flowchart figure which shows the update process of the document at the time of document addition and a document management database. 文書管理データベースの登録項目の一例を示す図である。It is a figure which shows an example of the registration item of a document management database.

符号の説明Explanation of symbols

2a 2次元コード
15 コーナードット
604 情報処理装置
606 文書管理データベース
607 ペン型座標入力装置
806 画像読み取り装置
808 マイコン
884 2次元コード読み取り装置
1101 コード位置検出器
1102 データ取得器
1103 圧力センサ
1104 筆記検出器
1105 連続筆記検出器
1106 データ置換器
1107 誤り訂正器
1108 既知情報メモリ
1109 データ複合器
1110 ペン先座標検出器
1111 選択器
1401 ドット検出器
1402 コード枠検出器
1701 第一コーナー検出器
1702 第二コーナー位置推定器
1709 第一コーナー一致判定器
1901 周囲ドット検出器
1902 点対称ペア検出器
2101 コーナードット候補検出器
2102 コーナー判定器
2301 FIFO記憶装置
2302 コーナードット判定器
2501 射影パラメータ算出器
2502 ペン先座標変換器
2a 2D code 15 corner dot 604 information processing device 606 document management database 607 pen type coordinate input device 806 image reading device 808 microcomputer 884 2D code reading device 1101 code position detector 1102 data acquisition device 1103 pressure sensor 1104 writing detector 1105 Continuous writing detector 1106 Data replacer 1107 Error corrector 1108 Known information memory 1109 Data compounder 1110 Nib coordinate detector 1111 Selector 1401 Dot detector 1402 Code frame detector 1701 First corner detector 1702 Second corner position estimation 1709 First corner coincidence determination unit 1901 Surrounding dot detector 1902 Point symmetrical pair detector 2101 Corner dot candidate detector 2102 Corner determination unit 2301 F FO memory device 2302 corner dot judgment unit 2501 projection parameter calculator 2502 pen coordinate converter

Claims (14)

複数のドットにより構成される矩形のコード枠により囲まれ、矩形の頂点にコーナードットが配置される2次元コードが撮影された射影画像から、2次元コードを構成するドットを検出するドット検出手段を有し、前記ドット検出手段により検出されたドットに基づき2次元コードが表す情報を読み取る2次元コード読み取り装置において、
前記ドット検出手段により検出された注目ドットNから所定範囲にある複数の他のドットを探索し、注目ドットNの周囲に存在する複数のドットのうち、注目ドットNに関して点対称となる二組のドットのペアが検出された場合に注目ドットNがコーナードットに相当することを検出するコーナードット検出手段と、
前記コーナードット検出手段により検出されたコーナードットのうち所定の第一のコーナードットの位置から他のコーナードットの位置を、第一のコーナードットに対し点対称となるドットのペアの位置及び予め設定されたコーナ間のドット数に基づき推定するコーナードット位置推定手段と、
前記コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナードット候補を探索し、複数のコーナードット候補のうち、コーナードット候補に関して点対称となる二組のドットのペアが検出された場合にコーナードット候補が他のコーナードットに相当することを判定するコーナードット判定手段と、
第一のコーナードットと他の3つのコーナードットの位置から2次元コードのコード枠を検出するコード枠検出手段と、
を有することを特徴とする2次元コード読み取り装置。
A dot detection means for detecting dots constituting a two-dimensional code from a projected image obtained by photographing a two-dimensional code surrounded by a rectangular code frame composed of a plurality of dots and having corner dots arranged at the vertices of the rectangle A two-dimensional code reading device that reads information represented by a two-dimensional code based on the dots detected by the dot detection means;
A plurality of other dots within a predetermined range are searched for from the target dot N detected by the dot detection means, and two sets that are point-symmetric with respect to the target dot N among the plurality of dots existing around the target dot N Corner dot detection means for detecting that the dot of interest N corresponds to a corner dot when a pair of dots is detected ;
Among the corner dots detected by the corner dot detection means, the positions of other corner dots from the position of the predetermined first corner dot are set in advance and the position of a pair of dots that are point-symmetric with respect to the first corner dot. Corner dot position estimating means for estimating based on the number of dots between the corners ,
The plurality of corner dot candidates in the vicinity of the estimated position of the other corner dots estimated by the corner dot position estimating means are searched, and among the plurality of corner dot candidates, two sets of dots that are point-symmetric with respect to the corner dot candidate Corner dot determination means for determining that a corner dot candidate corresponds to another corner dot when a pair is detected;
Code frame detection means for detecting a code frame of a two-dimensional code from the positions of the first corner dot and the other three corner dots;
A two-dimensional code reading device comprising:
前記コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、前記コーナードット位置推定手段が推定した第一のコーナードットの位置と、
前記コーナードット検出手段により検出された前記第一のコーナードットの位置と、が一致する場合に、コード枠を形成するコーナードットが検出されたと判定するコーナードット一致判定手段を有する
ことを特徴とする請求項1記載の2次元コード読み取り装置。
Based on the position of the corner dot determined by the corner dot determination means to be a corner dot, the position of the first corner dot estimated by the corner dot position estimation means;
A corner dot match determination unit that determines that a corner dot forming a code frame is detected when the position of the first corner dot detected by the corner dot detection unit matches ;
The two-dimensional code reader according to claim 1.
前記コーナードット位置推定手段は、
前記コーナードット検出手段により検出されたコーナードットの位置、コーナードットに対し点対称となるペアのドットの位置、を適当な原点を始点としたベクトルで表し、
ペアのドットの一方と原点を結ぶ第1ベクトルからペアの他方のドットと原点を結ぶ第2ベクトルを減じて得られる方向に、他のコーナードットの位置を推定する、
ことを特徴とする請求項1又は2記載の2次元コード読み取り装置。
The corner dot position estimating means includes
The position of the corner dot detected by the corner dot detection means, the position of a pair of dots that are point-symmetric with respect to the corner dot, is represented by a vector starting from an appropriate origin.
Estimating the position of another corner dot in a direction obtained by subtracting the second vector connecting the other dot of the pair and the origin from the first vector connecting one of the pair of dots and the origin;
The two-dimensional code reader according to claim 1 or 2.
前記コーナードット位置推定手段は、
第1ベクトルから第2ベクトルを減じたベクトルを2で割って、それに予め設定されたコーナ間のドット数をかけ、その距離だけ前記コーナードット検出手段により検出されたコーナードットから離れた位置に、他のコーナードットの位置を推定する、
請求項3記載の2次元コード読み取り装置。
The corner dot position estimating means includes
Dividing the vector obtained by subtracting the second vector from the first vector by 2 and multiplying it by the number of dots between the corners set in advance, the distance away from the corner dot detected by the corner dot detection means, Estimate the position of other corner dots,
The two-dimensional code reader according to claim 3.
前記コーナードット判定手段は、
前記コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナードット候補を、推定された位置の注目画素を中心とする所定範囲を推定された位置を起点に渦巻状に走査して検出する、
ことを特徴とする請求項2記載の2次元コード読み取り装置。
The corner dot determination means includes
A plurality of corner dot candidates in the vicinity of the estimated position of the other corner dots estimated by the corner dot position estimating means are spirally shaped starting from a position where a predetermined range centered on the target pixel of the estimated position is estimated. Scan to detect
The two-dimensional code reading device according to claim 2.
前記コーナードット一致判定手段は、
前記コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、前記コーナードット位置推定手段が推定した第一のコーナードットの位置と、
前記コーナードット検出手段により検出された前記第一のコーナードットの位置と、の距離が所定の閾値内の場合にコーナードットが一致したと判定する、
ことを特徴とする請求項記載の2次元コード読み取り装置。
The corner dot coincidence determining means is
Based on the position of the corner dot determined by the corner dot determination means to be a corner dot, the position of the first corner dot estimated by the corner dot position estimation means;
When the distance between the first corner dot position detected by the corner dot detection means is within a predetermined threshold, it is determined that the corner dot matches.
The two-dimensional code reading device according to claim 2 .
複数のドットにより構成される矩形のコード枠により囲まれ、矩形の頂点にコーナードットが配置される2次元コードが撮影された射影画像から、2次元コードを構成するドットを検出するドット検出手段を有し、前記ドット検出手段により検出されたドットに基づき2次元コードが表す情報を読み取る2次元コード読み取り装置の2次元コード読み取り方法において、
コーナードット検出手段が、前記ドット検出手段により検出された注目ドットNから所定範囲にある複数の他のドットを探索し、注目ドットNの周囲に存在する複数のドットのうち、注目ドットNに関して点対称となる二組のドットのペアが検出された場合に注目ドットNがコーナードットに相当することを検出するステップと、
コーナードット位置推定手段が、前記コーナードット検出手段により検出されたコーナードットのうち所定の第一のコーナードットの位置から他のコーナードットの位置を、第一のコーナードットに対し点対称となるドットのペアの位置及び予め設定されたコーナ間のドット数に基づき推定するステップと、
コーナードット判定手段が、前記コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナドット候補を探索し、複数のコーナードット候補のうち、コーナードット候補に関して点対称となる二組のドットのペアが検出された場合にコーナードット候補が他のコーナードットに相当することを判定するステップと、
コード枠検出手段が、第一のコーナードットと他の3つのコーナードットの位置から2次元コードのコード枠を検出するステップと、
を有することを特徴とする2次元コード読み取り方法。
A dot detection means for detecting dots constituting a two-dimensional code from a projected image obtained by photographing a two-dimensional code surrounded by a rectangular code frame composed of a plurality of dots and having corner dots arranged at the vertices of the rectangle A two-dimensional code reading method of a two- dimensional code reading device for reading information represented by a two-dimensional code based on the dots detected by the dot detection means;
The corner dot detection unit searches for a plurality of other dots within a predetermined range from the target dot N detected by the dot detection unit , and among the plurality of dots existing around the target dot N, a point related to the target dot N Detecting that the target dot N corresponds to a corner dot when a pair of two symmetric dots is detected ;
A dot in which the corner dot position estimating means is point-symmetric with respect to the first corner dot from the predetermined first corner dot position among the corner dots detected by the corner dot detecting means. Estimating based on the position of the pair of and the number of dots between preset corners ;
The corner dot determination means searches for a plurality of corner dot candidates in the vicinity of the estimated position of the other corner dots estimated by the corner dot position estimation means , and among the plurality of corner dot candidates, the corner dot candidate is point symmetric. Determining that a corner dot candidate corresponds to another corner dot when two pairs of dots are detected;
A step of detecting a code frame of a two-dimensional code from the positions of the first corner dot and the other three corner dots;
A two-dimensional code reading method comprising:
コーナードット一致判定手段が、
前記コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、前記コーナードット位置推定手段が推定した第一のコーナードットの位置と、
前記コーナードット検出手段により検出された前記第一のコーナードットの位置と、が一致する場合に、コード枠を形成するコーナードットが検出されたと判定するステップ、
を有することを特徴とする請求項記載の2次元コード読み取り方法。
The corner dot match determination means
Based on the position of the corner dot determined by the corner dot determination means to be a corner dot, the position of the first corner dot estimated by the corner dot position estimation means;
A step of determining that a corner dot forming a code frame has been detected when the position of the first corner dot detected by the corner dot detection means coincides ;
The two-dimensional code reading method according to claim 7, further comprising :
前記コーナードット位置推定手段は、
前記コーナードット検出手段により検出されたコーナードットの位置、コーナードットに対し点対称となるペアのドットの位置、を適当な原点を始点としたベクトルで表し、
ペアのドットの一方と原点を結ぶ第1ベクトルからペアの他方のドットと原点を結ぶ第2ベクトルを減じて得られる方向に、他のコーナードットの位置を推定する、
ことを特徴とする請求項7又は8記載の2次元コード読み取り方法。
The corner dot position estimating means includes
The position of the corner dot detected by the corner dot detection means, the position of a pair of dots that are point-symmetric with respect to the corner dot, is represented by a vector starting from an appropriate origin.
Estimating the position of another corner dot in a direction obtained by subtracting the second vector connecting the other dot of the pair and the origin from the first vector connecting one of the pair of dots and the origin;
9. The two-dimensional code reading method according to claim 7, wherein the two-dimensional code is read.
前記コーナードット位置推定手段は、
第1ベクトルから第2ベクトルを減じたベクトルを2で割って、それに予め設定されたコーナ間のドット数をかけ、その距離だけ前記コーナードット検出手段により検出されたコーナードットから離れた位置に、他のコーナードットの位置を推定する、
請求項記載の2次元コード読み取り方法。
The corner dot position estimating means includes
Dividing the vector obtained by subtracting the second vector from the first vector by 2 and multiplying it by the number of dots between the corners set in advance, the distance away from the corner dot detected by the corner dot detection means, Estimate the position of other corner dots,
The two-dimensional code reading method according to claim 9 .
前記コーナードット判定手段は、
前記コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナードット候補を、推定された位置の注目画素を中心とする所定範囲を推定された位置を起点に渦巻状に走査して検出する、
ことを特徴とする請求項記載の2次元コード読み取り方法。
The corner dot determination means includes
A plurality of corner dot candidates in the vicinity of the estimated position of the other corner dots estimated by the corner dot position estimating means are spirally shaped starting from a position where a predetermined range centered on the target pixel of the estimated position is estimated. Scan to detect
The two-dimensional code reading method according to claim 8 .
前記コーナードット一致判定手段は、
前記コーナードット判定手段がコーナードットであると判別したコーナードットの位置に基づいて、前記コーナードット位置推定手段が推定した第一のコーナードットの位置と、
前記コーナードット検出手段により検出された前記第一のコーナードットの位置と、の距離が所定の閾値内の場合にコーナードットが一致したと判定する、
ことを特徴とする請求項記載の2次元コード読み取り方法。
The corner dot coincidence determining means is
Based on the position of the corner dot determined by the corner dot determination means to be a corner dot, the position of the first corner dot estimated by the corner dot position estimation means;
When the distance between the first corner dot position detected by the corner dot detection means is within a predetermined threshold, it is determined that the corner dot matches.
The two-dimensional code reading method according to claim 8 .
複数のドットにより構成される矩形のコード枠により囲まれ、矩形の頂点にコーナードットが配置される2次元コードが撮影された射影画像から、2次元コードを構成するドットを検出するドット検出手段を有し、前記ドット検出手段により検出されたドットに基づき2次元コードが表す情報を読み取る2次元コード読み取り装置が有するコンピューターに、
コーナードット検出手段が、前記ドット検出手段により検出された注目ドットNから所定範囲にある複数の他のドットを探索し、注目ドットNの周囲に存在する複数のドットのうち、注目ドットNに関して点対称となる二組のドットのペアが検出された場合に注目ドットNがコーナードットに相当することを検出するステップと、
コーナードット位置推定手段が、前記コーナードット検出手段により検出されたコーナードットのうち所定の第一のコーナードットの位置から他のコーナードットの位置を、第一のコーナードットに対し点対称となるドットのペアの位置及び予め設定されたコーナ間のドット数に基づき推定するステップと、
コーナードット判定手段が、前記コーナードット位置推定手段により推定された、他のコーナードットの推定位置近傍の複数のコーナドット候補を探索し、複数のコーナードット候補のうち、コーナードット候補に関して点対称となる二組のドットのペアが検出された場合にコーナードット候補が他のコーナードットに相当することを判定するステップと、
コード枠検出手段が、第一のコーナードットと他の3つのコーナードットの位置から2次元コードのコード枠を検出するステップと、
を実行させることを特徴とする2次元コード読み取りプログラム。
A dot detection means for detecting dots constituting a two-dimensional code from a projected image obtained by photographing a two-dimensional code surrounded by a rectangular code frame composed of a plurality of dots and having corner dots arranged at the vertices of the rectangle A computer having a two-dimensional code reading device that reads information represented by the two-dimensional code based on the dots detected by the dot detection means;
The corner dot detection unit searches for a plurality of other dots within a predetermined range from the target dot N detected by the dot detection unit , and among the plurality of dots existing around the target dot N, a point related to the target dot N Detecting that the target dot N corresponds to a corner dot when a pair of two symmetric dots is detected ;
A dot in which the corner dot position estimating means is point-symmetric with respect to the first corner dot from the predetermined first corner dot position among the corner dots detected by the corner dot detecting means. Estimating based on the position of the pair of and the number of dots between preset corners ;
The corner dot determination means searches for a plurality of corner dot candidates in the vicinity of the estimated position of the other corner dots estimated by the corner dot position estimation means , and among the plurality of corner dot candidates, the corner dot candidate is point symmetric. Determining that a corner dot candidate corresponds to another corner dot when two pairs of dots are detected;
A step of detecting a code frame of a two-dimensional code from the positions of the first corner dot and the other three corner dots;
A two-dimensional code reading program characterized in that
請求項13記載の2次元コード読み取りプログラムを記憶した記憶媒体。 A storage medium storing the two-dimensional code reading program according to claim 13.
JP2003297825A 2003-08-21 2003-08-21 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium Expired - Fee Related JP4159948B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003297825A JP4159948B2 (en) 2003-08-21 2003-08-21 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003297825A JP4159948B2 (en) 2003-08-21 2003-08-21 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium

Publications (2)

Publication Number Publication Date
JP2005070980A JP2005070980A (en) 2005-03-17
JP4159948B2 true JP4159948B2 (en) 2008-10-01

Family

ID=34403545

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003297825A Expired - Fee Related JP4159948B2 (en) 2003-08-21 2003-08-21 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium

Country Status (1)

Country Link
JP (1) JP4159948B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5251419B2 (en) * 2008-10-22 2013-07-31 日産自動車株式会社 Distance measuring device and distance measuring method
JP5287485B2 (en) * 2009-05-11 2013-09-11 富士ゼロックス株式会社 Information expression image, printed matter, image processing apparatus, and image processing program
JP5016723B2 (en) * 2011-02-24 2012-09-05 任天堂株式会社 Image recognition program, image recognition apparatus, image recognition system, and image recognition method

Also Published As

Publication number Publication date
JP2005070980A (en) 2005-03-17

Similar Documents

Publication Publication Date Title
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
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
JP4557765B2 (en) Image processing apparatus and method
JP4854491B2 (en) Image processing apparatus and control method thereof
US7359094B1 (en) Image processing apparatus and image forming medium
JP4502385B2 (en) Image processing apparatus and control method thereof
JP3727971B2 (en) Document processing apparatus and document processing method
US8520006B2 (en) Image processing apparatus and method, and program
US20060082557A1 (en) Combined detection of position-coding pattern and bar codes
JP2004265384A (en) Image processing system, information processing device, control method, computer program, and computer-readable storage medium
US20090324080A1 (en) Image processing device, image processing method and storage medium
EP0549505A2 (en) Method of and apparatus for optical character recognition based on geometric and color attribute hypothesis testing
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
JP2007122500A (en) Character recognition device, character recognition method and character data
JP2007133550A (en) Information management system, and information management method
KR20130139225A (en) Dot code pattern for absolute position and other information using an optical pen, process of printing the dot code, process of reading the dot code
JP4159948B2 (en) Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and storage medium
JP2008028716A (en) Image processing method and apparatus
JP2003046746A (en) Method and apparatus for processing image
JP4741363B2 (en) Image processing apparatus, image processing method, and image processing program
JP2006020144A (en) Document processing system
JP2008021120A (en) Writing information processing system, writing information processing method, and program
JP5387086B2 (en) Information collation support system and program
US20240062567A1 (en) Learning Image Generation Apparatus, Learning Image Generation Method, And Non-Transitory Computer-Readable Recording Medium
JP2000331117A (en) Document reading system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060515

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080304

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080502

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

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130725

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees