JP2009181347A - Image-processing device, pen device, and program - Google Patents

Image-processing device, pen device, and program Download PDF

Info

Publication number
JP2009181347A
JP2009181347A JP2008019875A JP2008019875A JP2009181347A JP 2009181347 A JP2009181347 A JP 2009181347A JP 2008019875 A JP2008019875 A JP 2008019875A JP 2008019875 A JP2008019875 A JP 2008019875A JP 2009181347 A JP2009181347 A JP 2009181347A
Authority
JP
Japan
Prior art keywords
unit
synchronization
image
dot
angle
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.)
Pending
Application number
JP2008019875A
Other languages
Japanese (ja)
Inventor
Kenji Onishi
健司 大西
Takashi Sonoda
隆志 園田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2008019875A priority Critical patent/JP2009181347A/en
Publication of JP2009181347A publication Critical patent/JP2009181347A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Position Input By Displaying (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To make it possible to synchronize unit images constituting a pattern image even if there is distortion in a read-out image. <P>SOLUTION: An image-processing device is provided with: a detection part which scans an image taken by an image pickup device and detects unit images to identify positions; a line synchronization part 233 which draws grid lines, following to the axis of coordinates sequentially from a synchronous origin point on the basis of the unit image position information detected by the detection part, to generate grids for synchronization; and a bit sequence-generating part 234 which generates a bit sequence, according to the presence or absence of the unit images at prescribed positions on the image, on the basis of the grids generated by the line synchronization part 233. The line synchronization part 233 makes each grid line adaptable to the unit image position correlated with the grid line. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置、ペン・デバイスおよびプログラムに関する。   The present invention relates to an image processing apparatus, a pen device, and a program.

印刷用紙等の媒体上にコード化された情報を表すパターン画像や特定の意味を付与されたパターン画像を埋め込み、読み取り装置で読み取ってコード情報を復号したり付与された意味に応じて装置を制御したりすることが、従来から行われている。パターン画像により表される情報としては、パターン画像が埋め込まれた媒体自体の識別情報や媒体に記録された文書の識別情報、媒体上の位置を表す位置情報などがある。   Embed a pattern image representing information coded on a medium such as printing paper or a pattern image with a specific meaning, read it with a reading device, decode the code information, and control the device according to the given meaning It has been performed conventionally. Information represented by the pattern image includes identification information of the medium itself in which the pattern image is embedded, identification information of a document recorded on the medium, position information indicating a position on the medium, and the like.

パターン画像で記述されたコード情報を復号するためには、読み取り画像から検出されたパターン画像をビット列に同期化することが必要である。特許文献1に開示された従来技術では、仮想されたラスターにしたがって、マークを順に辿りながら、マークの座標およびラスター点の座標を決定していくことで同期化が行われる。   In order to decode the code information described by the pattern image, it is necessary to synchronize the pattern image detected from the read image with the bit string. In the prior art disclosed in Patent Document 1, synchronization is performed by determining the coordinates of a mark and the coordinates of a raster point while sequentially tracing the mark according to a virtual raster.

特表2003−511763号公報Japanese translation of PCT publication No. 2003-511863

ペン・デバイスのように使用者が手に持って操作する読み取り装置等では、媒体に対する読み取り装置の向きや角度によって、読み取られた画像に歪みが生じる場合がある。
本発明は、以上のような課題に鑑みてなされたものであり、その目的は、読み取った画像に歪みがある場合でも、パターン画像を構成する単位画像の同期化を可能とすることにある。
In a reading device or the like that a user operates with a hand such as a pen device, the read image may be distorted depending on the direction and angle of the reading device with respect to the medium.
The present invention has been made in view of the above problems, and an object thereof is to enable synchronization of unit images constituting a pattern image even when the read image has distortion.

請求項1に係る発明は、撮像装置により撮像された画像を走査し、単位画像を検出して位置を特定する検出部と、前記検出部により検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成するライン同期部と、前記ライン同期部により生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成するビット配列生成部とを備えることを特徴とする画像処理装置である。
請求項2に係る発明は、前記ライン同期部が、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させることを特徴とする請求項1に記載の画像処理装置である。
請求項3に係る発明は、前記ライン同期部が、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項2記載の画像処理装置である。
請求項4に係る発明は、前記ライン同期部が、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項2に記載の画像処理装置である。
請求項5に係る発明は、前記ライン同期部により用いられる格子線の傾きおよび間隔の初期値が、前記単位画像のうち最も近い位置にある2つの単位画像の組み合わせにおける当該2つの単位画像の位置関係に基づいて決定されることを特徴とする請求項1に記載の画像処理装置である。
請求項6に係る発明は、前記単位画像の組み合わせにおける2つの単位画像がなす角度を、前記同期原点を含む一定の範囲の前記単位画像の位置関係に基づいて補正することで、前記格子線の傾きの基準となる基準角度を決定する基準角度決定部をさらに備え、前記ライン同期部は、前記基準角度決定部により決定された基準角度を前記格子線の傾きの初期値として用いることを特徴とする請求項5に記載の画像処理装置である。
請求項7に係る発明は、単位画像が形成された媒体表面を撮像する撮像部と、前記撮像部により撮像された画像から前記単位画像を検出して位置を特定する検出部と、前記検出部により検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成するライン同期部と、前記ライン同期部により生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成するビット配列生成部とを備えることを特徴とするペン・デバイスである。
請求項8に係る発明は、前記ライン同期部が、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させることを特徴とする請求項7に記載のペン・デバイスである。
請求項9に係る発明は、前記ライン同期部が、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項8に記載のペン・デバイスである。
請求項10に係る発明は、前記ライン同期部が、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項8に記載のペン・デバイスである。
請求項11に係る発明は、コンピュータに、撮像装置により撮像された画像を走査し、単位画像を検出して位置を特定する機能と、検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成する機能と、生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成する機能とを実現させるためのプログラムである。
請求項12に係る発明は、前記格子を生成する機能で、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させて引く処理を、前記コンピュータに実行させることを特徴とする請求項11に記載のプログラムである。
請求項13に係る発明は、前記格子を生成する機能で、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正する処理を、前記コンピュータに実行させることを特徴とする請求項12に記載のプログラムである。
請求項14に係る発明は、前記格子を生成する機能で、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正する処理を、前記コンピュータに実行させることを特徴とする請求項12に記載のプログラムである。
The invention according to claim 1 is based on a detection unit that scans an image captured by an imaging apparatus and detects a unit image to identify a position, and based on position information of the unit image detected by the detection unit. A line synchronization unit that generates a lattice for synchronization by sequentially drawing lattice lines according to the coordinate axes from the origin, and the unit image at a predetermined position on the image based on the lattice generated by the line synchronization unit. An image processing apparatus comprising: a bit array generation unit that generates a bit array according to presence or absence.
The invention according to claim 2 is characterized in that the line synchronization unit individually adapts each grid line to the position of the unit image associated with the grid line. Device.
The invention according to claim 3 is characterized in that the line synchronization unit corrects the inclination of each grid line in accordance with the position of the unit image associated with the grid line. It is a processing device.
The invention according to claim 4 is characterized in that the line synchronization unit corrects the interval between the grid lines in accordance with the position of the unit image associated with the grid line. An image processing apparatus.
The invention according to claim 5 is the position of the two unit images in the combination of the two unit images in which the initial values of the grid line inclination and interval used by the line synchronization unit are closest to each other among the unit images. The image processing apparatus according to claim 1, wherein the image processing apparatus is determined based on a relationship.
In the invention according to claim 6, the angle formed by the two unit images in the combination of the unit images is corrected based on the positional relationship of the unit images in a certain range including the synchronization origin. A reference angle determination unit that determines a reference angle that serves as a reference for the inclination is further provided, wherein the line synchronization unit uses the reference angle determined by the reference angle determination unit as an initial value of the inclination of the grid line. The image processing apparatus according to claim 5.
According to a seventh aspect of the present invention, there is provided an imaging unit that images the surface of a medium on which a unit image is formed, a detection unit that detects the unit image from the image captured by the imaging unit, and identifies the position, and the detection unit A line synchronization unit that generates a synchronization grid by sequentially drawing grid lines according to the coordinate axis from the synchronization origin based on the position information of the unit image detected by the step, and the grid generated by the line synchronization unit. And a bit array generation unit that generates a bit array in accordance with the presence / absence of the unit image at a predetermined position on the image.
The invention according to claim 8 is characterized in that the line synchronization unit individually adapts each grid line to the position of the unit image associated with the grid line. It is a device.
The invention according to claim 9 is characterized in that the line synchronization unit corrects the inclination of each grid line in accordance with the position of the unit image associated with the grid line. It is a pen device.
The invention according to claim 10 is characterized in that the line synchronization section corrects the interval between the respective grid lines in accordance with the position of the unit image associated with the grid line. It is a pen device.
According to an eleventh aspect of the present invention, a computer scans an image picked up by an image pickup device, detects a unit image and specifies a position, and based on the detected position information of the unit image, the synchronization origin is used. A function for generating a synchronization grid by sequentially drawing grid lines according to coordinate axes, and generating a bit array based on the presence of the unit image at a predetermined position on the image based on the generated grid This is a program for realizing the functions.
The invention according to claim 12 is a function of generating the grid, and causes the computer to execute a process of drawing each grid line individually adapted to the position of the unit image associated with the grid line. The program according to claim 11.
The invention according to claim 13 is a function for generating the grid, and causing the computer to execute a process of correcting the inclination of each grid line according to the position of the unit image associated with the grid line. The program according to claim 12, wherein:
The invention according to claim 14 is a function for generating the grid, and causing the computer to execute a process of correcting an interval between the grid lines in accordance with a position of the unit image associated with the grid line. The program according to claim 12, wherein:

請求項1に係る発明によれば、格子線を順次引きながら格子を生成することにより、固定的な格子を用いる場合に比べて、画像の歪みに柔軟に適応させることができる。
請求項2に係る発明によれば、各格子線を実際の単位画像の位置に適合させることで、画像の歪みに適切に対応させることができる。
請求項3に係る発明によれば、格子線の傾きを個別に補正して、画像の歪みに適応させることができる。
請求項4に係る発明によれば、格子線の間隔を個別に補正して、画像の歪みに適応させることができる。
請求項5に係る発明によれば、実際の単位画像の位置に基づいて格子線の傾きおよび間隔の初期値を定めるため、画像の歪みへの対応が容易になる。
請求項6に係る発明によれば、格子線の傾きを、複数の単位画像の位置を用いてさらに精度良く定めることができる。
請求項7に係る発明によれば、ペン・デバイスにおいて、格子線を順次引きながら格子を生成することにより、固定的な格子を用いる場合に比べて、画像の歪みに柔軟に適応させることができる。
請求項8に係る発明によれば、ペン・デバイスにおいて、各格子線を実際の単位画像の位置に適合させることで、画像の歪みに適切に対応させることができる。
請求項9に係る発明によれば、ペン・デバイスにおいて、格子線の傾きを個別に補正して、画像の歪みに適応させることができる。
請求項10に係る発明によれば、ペン・デバイスにおいて、格子線の間隔を個別に補正して、画像の歪みに適応させることができる。
請求項11に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、格子線を順次引きながら格子を生成することにより、固定的な格子を用いる場合に比べて、画像の歪みに柔軟に適応させることができる。
請求項12に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、各格子線を実際の単位画像の位置に適合させることで、画像の歪みに適切に対応させることができる。
請求項13に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、格子線の傾きを個別に補正して、画像の歪みに適応させることができる。
請求項14に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、格子線の間隔を個別に補正して、画像の歪みに適応させることができる。
According to the first aspect of the present invention, by generating a grid while sequentially drawing grid lines, it is possible to flexibly adapt to image distortion compared to the case of using a fixed grid.
According to the second aspect of the present invention, it is possible to appropriately cope with image distortion by adapting each grid line to the actual position of the unit image.
According to the third aspect of the present invention, it is possible to individually adjust the inclination of the lattice lines and adapt to the distortion of the image.
According to the fourth aspect of the present invention, it is possible to individually adjust the interval between the lattice lines and adapt to the distortion of the image.
According to the fifth aspect of the present invention, since the initial values of the inclination and interval of the grid lines are determined based on the actual position of the unit image, it is easy to cope with image distortion.
According to the invention which concerns on Claim 6, the inclination of a grid line can be determined still more accurately using the position of a some unit image.
According to the invention of claim 7, by generating a lattice while sequentially drawing lattice lines in the pen device, it is possible to flexibly adapt to image distortion as compared with the case of using a fixed lattice. .
According to the invention according to claim 8, in the pen device, it is possible to appropriately cope with the distortion of the image by adapting each grid line to the actual position of the unit image.
According to the invention of claim 9, in the pen device, the inclination of the grid lines can be individually corrected to adapt to the distortion of the image.
According to the tenth aspect of the present invention, in the pen device, the interval between the grid lines can be individually corrected to adapt to the distortion of the image.
According to the eleventh aspect of the invention, in the computer that realizes the function of the image processing apparatus, the lattice is generated while sequentially drawing the lattice lines, so that the distortion of the image is more flexible than when a fixed lattice is used. Can be adapted to.
According to the twelfth aspect of the present invention, in the computer that realizes the function of the image processing apparatus, it is possible to appropriately cope with image distortion by adapting each grid line to the actual position of the unit image.
According to the thirteenth aspect of the present invention, in the computer that realizes the function of the image processing apparatus, the inclination of the grid lines can be individually corrected to adapt to the image distortion.
According to the fourteenth aspect of the present invention, in the computer that realizes the function of the image processing apparatus, the lattice line interval can be individually corrected to adapt to the image distortion.

以下、添付図面を参照して、本発明の実施形態について詳細に説明する。
本実施形態は、紙等の媒体に印刷されたパターン画像を読み取り、このパターン画像によって記録された情報(コード情報等)を復号する処理に関するものである。本実施形態の前提として、まず、パターン画像の構成例について説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The present embodiment relates to a process of reading a pattern image printed on a medium such as paper and decoding information (code information or the like) recorded by the pattern image. As a premise of the present embodiment, first, a configuration example of a pattern image will be described.

<パターン画像の構成例>
本実施形態では、媒体である紙面全体または紙面の特定の領域に、特定の情報を表す情報ブロックが配置される。情報ブロックは、意味のある情報を表現するパターンの最小単位である。この情報ブロックは、複数のパターンブロックの集合で構成され、このパターンブロックには、単位符号パターンが配置される。単位符号パターンは、情報を記録するための符号を表すものであり、パターン画像の最小単位である。
<Configuration example of pattern image>
In the present embodiment, an information block representing specific information is arranged in the entire paper surface as a medium or in a specific area on the paper surface. An information block is a minimum unit of a pattern expressing meaningful information. This information block is composed of a set of a plurality of pattern blocks, and a unit code pattern is arranged in this pattern block. The unit code pattern represents a code for recording information and is the minimum unit of the pattern image.

図1は、単位符号パターン、情報ブロック、紙面(媒体)の関係を示す図である。
図1において、単位符号パターンP1の集合により、情報ブロックP2が構成されている。そして、情報ブロックP2の集合により、紙面の太枠で囲まれた領域P3に情報が記録されている。次に、この単位符号パターンおよび情報ブロックの具体的な構成例について、詳細に説明する。
FIG. 1 is a diagram showing the relationship between unit code patterns, information blocks, and paper (medium).
In FIG. 1, an information block P2 is configured by a set of unit code patterns P1. Information is recorded in a region P3 surrounded by a thick frame on the paper surface by a set of information blocks P2. Next, a specific configuration example of the unit code pattern and the information block will be described in detail.

本実施の形態では、m(m≧3)箇所から選択したn(1≦n<m)箇所に単位画像を配置してなるパターン画像によってmCn(=m!/{(m−n)!×n!})通りの情報を表現する。このパターン画像を、単位符号パターンとする。つまり、1つの単位画像を情報に対応させるのではなく、複数の単位画像を情報に対応させている。仮に1つの単位画像を情報に対応させたとすると、単位画像が欠損したり、ノイズが加わったりした場合に、誤った情報を表現してしまうという欠点がある。これに対して、例えば2つの単位画像を情報に対応させたとすると、単位画像が1つであったり3つであったりした場合に、容易に誤りであることが分かる。さらに、1つの単位画像で1ビット、または、高々2ビットを表現する方法では、情報を表現するパターンと視覚的に似たパターンで、情報パターンの読出しを制御する同期パターンを表現することができない。このようなことから、本実施形態では、上記のような符号化方式を採用している。以下では、このような符号化方式をmCn方式と称する。
ここで、単位画像としては、いかなる形状のものを用いてもよいが、本実施の形態では、単位画像の一例としてドット画像(以下、単に「ドット」という)を用いている。
In the present embodiment, mCn (= m! / {(Mn)! ×) by a pattern image in which unit images are arranged at n (1 ≦ n <m) locations selected from m (m ≧ 3) locations. n!}) Represents street information. This pattern image is a unit code pattern. That is, instead of associating one unit image with information, a plurality of unit images are associated with information. Assuming that one unit image is associated with information, there is a drawback in that erroneous information is expressed when the unit image is lost or noise is added. On the other hand, for example, if two unit images are associated with information, it can be easily understood that there is an error when the number of unit images is one or three. Further, in the method of expressing 1 bit or 2 bits at most in one unit image, it is not possible to express a synchronous pattern that controls reading of the information pattern with a pattern visually similar to the pattern that represents information. . For this reason, in the present embodiment, the above encoding method is adopted. Hereinafter, such an encoding method is referred to as an mCn method.
Here, the unit image may have any shape, but in the present embodiment, a dot image (hereinafter simply referred to as “dot”) is used as an example of the unit image.

図2は、mCn方式における単位符号パターンの例を示す図である。
図2に示す例では、黒色の領域と斜線の領域をドット配置可能な領域としている。このドット配置可能な領域の間にある白色の領域は、個々のドットを識別するための隙間(空白)を形成するドット配置不可能な領域である。ドット配置可能な領域のうち、黒色の領域にドットが配置され、斜線の領域にはドットが配置されていないことを示している。すなわち、図2は、縦3ドット、横3ドットの合計9ドットを配置可能な領域を設けた例を示しており、(a)は、ドット配置可能な領域に2ドットを配置する9C2方式における単位符号パターンであり、(b)は、ドット配置可能な領域に3ドットを配置する9C3方式における単位符号パターンである。
FIG. 2 is a diagram illustrating an example of a unit code pattern in the mCn system.
In the example shown in FIG. 2, the black area and the hatched area are areas where dots can be arranged. The white area between the dot-placeable areas is a non-dot-placeable area that forms a gap (blank) for identifying individual dots. Of the areas where dots can be arranged, dots are arranged in black areas and dots are not arranged in hatched areas. That is, FIG. 2 shows an example in which a region where a total of 9 dots of 3 dots in the vertical direction and 3 dots in the horizontal direction can be arranged is provided. FIG. FIG. 6B shows a unit code pattern, and FIG. 5B shows a unit code pattern in the 9C3 system in which 3 dots are arranged in a dot arrangementable area.

ところで、図2で配置されるドット(黒色の領域)は、あくまで情報表現のためのドットであり、画像を構成する最小単位であるドット(図2の最小の四角)とは必ずしも一致しない。本実施形態において、「ドット」というときは前者のドットを指し、後者のドットは「ピクセル」と呼ぶことにすれば、ドットは、600dpiにおける2ピクセル×2ピクセルの大きさを有することになる。600dpiにおける1ピクセルの大きさは0.0423mmなので、ドットの一辺は、84.6μm(=0.0423mm×2)である。ドットは、大きくなればなるほど目に付きやすくなるため、できるだけ小さいほうが好ましい。ところが、あまり小さくすると、プリンタで印刷できなくなってしまう。そこで、ドットの大きさとして、50μmより大きく100μmより小さい上記の値を採用している。ただし、上記の値84.6μmは、あくまで計算上の数値であり、実際に印刷されたトナー像では100μm程度になる。   By the way, the dots (black areas) arranged in FIG. 2 are only for information representation, and do not necessarily match the dots (minimum squares in FIG. 2) which are the minimum units constituting the image. In the present embodiment, when “dot” refers to the former dot and the latter dot is referred to as “pixel”, the dot has a size of 2 pixels × 2 pixels at 600 dpi. Since the size of one pixel at 600 dpi is 0.0423 mm, one side of the dot is 84.6 μm (= 0.0423 mm × 2). The larger the dot, the more likely it will be noticeable, so it is preferable to make it as small as possible. However, if it is too small, printing with a printer becomes impossible. Therefore, the above value is adopted as the dot size, which is larger than 50 μm and smaller than 100 μm. However, the above value 84.6 μm is a numerical value to the last, and is about 100 μm in the actually printed toner image.

図3は、図2に示した単位符号パターンの種類を網羅的に示した図である。なお、この図では、表示の簡略化のためドット間の空白を省略している。
図3(a)は、図2(a)に示した9C2方式における全ての単位符号パターンを示している。9C2方式では、これらの単位符号パターンを用いて、36(=)通りの情報を表現する。また、図3(b)は、図2(b)に示した9C3方式における全ての単位符号パターンを示している。9C3方式では、これらの単位符号パターンを用いて、84(=)通りの情報を表現する。
FIG. 3 is a diagram comprehensively showing the types of unit code patterns shown in FIG. In this figure, a space between dots is omitted for simplification of display.
FIG. 3A shows all unit code patterns in the 9C2 system shown in FIG. In the 9C2 system, 36 (= 9 C 2 ) types of information are expressed using these unit code patterns. FIG. 3B shows all unit code patterns in the 9C3 system shown in FIG. In the 9C3 system, 84 (= 9 C 3 ) types of information are expressed using these unit code patterns.

なお、単位符号パターンは、m=9の場合に限定されるものではなく、mの値として、例えば、4、16等の値を採用してもよい。また、nの値も1≦n<mを満たしていればいかなる値を採用してもよい。
また、mの値としては、平方数(整数の2乗)だけでなく、異なる2つの整数の積を採用してもよい。つまり、ドットを配置可能な領域は、3ドット×3ドットを配置する場合のような正方形の領域に限らず、3ドット×4ドットを配置する場合のような長方形の領域であってもよい。なお、本明細書において、長方形とは、隣り合う2辺の長さが等しくない矩形のことをいうものとする。
Note that the unit code pattern is not limited to m = 9, and a value such as 4, 16 may be employed as the value of m. Any value of n may be adopted as long as 1 ≦ n <m is satisfied.
Further, as the value of m, not only a square number (the square of an integer) but also a product of two different integers may be adopted. That is, the area in which dots can be arranged is not limited to a square area as in the case of arranging 3 dots × 3 dots, but may be a rectangular area as in the case of arranging 3 dots × 4 dots. In the present specification, the rectangle means a rectangle in which the lengths of two adjacent sides are not equal.

ところで、mCn方式における全ての単位符号パターンには、各単位符号パターンを識別するための番号であるパターン値が付されている。
図4に、9C2方式における単位符号パターンとパターン値との対応を示す。9C2方式における単位符号パターンは36個であるので、パターン値としては0〜35が用いられる。ただし、図4に示した対応はあくまで一例であり、どの単位符号パターンにどのパターン値を割り当ててもよい。なお、9C3方式については、図示しないが、各単位符号パターンに0〜83のパターン値が付されることになる。
By the way, all unit code patterns in the mCn system are assigned pattern values that are numbers for identifying each unit code pattern.
FIG. 4 shows the correspondence between unit code patterns and pattern values in the 9C2 system. Since there are 36 unit code patterns in the 9C2 system, 0 to 35 are used as pattern values. However, the correspondence shown in FIG. 4 is merely an example, and any pattern value may be assigned to any unit code pattern. In addition, although not shown in the figure for the 9C3 method, each unit code pattern is assigned a pattern value of 0 to 83.

このように、m箇所からn箇所を選択することでmCn種類の単位符号パターンを用意しているが、本実施形態では、これらの単位符号パターンのうち、特定のパターンを情報パターンとして利用し、残りを同期パターンとして利用する。ここで、情報パターンとは、媒体に埋め込む情報を表現するパターンである。また、同期パターンとは、媒体に埋め込まれた情報パターンを取り出すために用いられるパターンである。例えば、情報パターンの位置を特定したり、画像の回転を検出したりするために用いられる。なお、媒体としては、画像を印刷することが可能であれば、いかなるものを用いてもよい。紙が最も一般的に用いられるので、以下では媒体を紙として説明するが、金属、プラスチック、繊維等であってもよい。   In this way, mCn types of unit code patterns are prepared by selecting n locations from m locations, but in this embodiment, a specific pattern is used as an information pattern among these unit code patterns, Use the rest as a synchronization pattern. Here, the information pattern is a pattern representing information to be embedded in the medium. The synchronization pattern is a pattern used for extracting an information pattern embedded in the medium. For example, it is used for specifying the position of the information pattern or detecting the rotation of the image. Any medium may be used as long as an image can be printed. Since paper is most commonly used, the medium will be described as paper in the following, but it may be metal, plastic, fiber, or the like.

ここで、同期パターンについて説明する。
図5は、9C2方式における同期パターンの例である。
図5に示すように、単位符号パターンが正方形(縦横のドット数が同じ)である場合は、画像の回転の検出のために4種類の単位符号パターンを同期パターンとして用意する必要がある。ここでは、パターン値32の単位符号パターンを正立した同期パターンとしている。また、パターン値33の単位符号パターンを右に90度回転した同期パターン、パターン値34の単位符号パターンを右に180度回転した同期パターン、パターン値35の単位符号パターンを右に270度回転した同期パターンとしている。この場合、36種類の単位符号パターンからこの4種類の同期パターンを除いた残りを情報パターンとし、5ビットの情報を表現するとよい。ただし、36種類の単位符号パターンの情報パターンと同期パターンへの振り分け方は、これには限らない。例えば、4種類で1組を構成する同期パターンの組を5つ用意し、残りの16種類の情報パターンで4ビットの情報を表現してもよい。
Here, the synchronization pattern will be described.
FIG. 5 is an example of a synchronization pattern in the 9C2 system.
As shown in FIG. 5, when the unit code pattern is a square (the same number of vertical and horizontal dots), it is necessary to prepare four types of unit code patterns as synchronization patterns in order to detect image rotation. Here, the unit code pattern of the pattern value 32 is an upright synchronization pattern. In addition, the unit code pattern of the pattern value 33 is rotated 90 degrees to the right, the synchronization pattern of the pattern value 34 is rotated 180 degrees to the right, and the unit code pattern of the pattern value 35 is rotated 270 degrees to the right. The synchronization pattern is used. In this case, 5-bit information may be expressed by using the remainder obtained by removing these four types of synchronization patterns from 36 types of unit code patterns as an information pattern. However, the method of assigning 36 types of unit code patterns to information patterns and synchronization patterns is not limited to this. For example, five sets of synchronization patterns that constitute one set of four types may be prepared, and the remaining 16 types of information patterns may represent 4-bit information.

一方、特に図示しないが、単位符号パターンが長方形(縦横のドット数が異なる)である場合は、画像の回転の検出のために2種類の単位符号パターンを同期パターンとして用意すればよい。例えば、縦3ドット×横4ドットを配置可能な領域が検出されるべきなのに、縦4ドット×横3ドットを配置可能な領域が検出された場合は、その時点で画像が90度または270度回転していることが分かるからである。   On the other hand, although not particularly illustrated, when the unit code pattern is a rectangle (different in the number of vertical and horizontal dots), two types of unit code patterns may be prepared as synchronization patterns in order to detect image rotation. For example, when an area in which 3 dots in the vertical direction and 4 dots in the horizontal direction should be detected but an area in which 4 dots in the vertical direction and 3 dots in the horizontal direction can be arranged is detected, the image is 90 degrees or 270 degrees at that time. It is because it turns out that it is rotating.

次に、上記の符号パターンを配置して識別情報と座標情報を表現する方法を述べる。
まず、単位符号パターンにより構成される情報ブロックについて説明する。
図6は、情報ブロックの構成例を示す図である。
図6に示す例では、9C2方式における単位符号パターンを使用していることも同時に示している。すなわち、36種類の単位符号パターンを、例えば、同期パターンとして使用する4パターンと、情報パターンとして使用する32パターンとに分け、各パターンをレイアウトに従って配置する。
Next, a method for expressing the identification information and the coordinate information by arranging the above code patterns will be described.
First, an information block composed of unit code patterns will be described.
FIG. 6 is a diagram illustrating a configuration example of an information block.
In the example shown in FIG. 6, it is shown at the same time that the unit code pattern in the 9C2 system is used. That is, 36 types of unit code patterns are divided into, for example, 4 patterns used as synchronization patterns and 32 patterns used as information patterns, and each pattern is arranged according to a layout.

また、図6に示す例では、情報ブロックのレイアウトとして、3ドット×3ドットの単位符号パターンを配置可能なパターンブロックを5個×5個の25個並べたものを採用している。そして、この25個のパターンブロックのうち、左上の1ブロックに同期パターンを配置している。また、同期パターンの右の4ブロックに紙面上のX方向の座標を特定するX座標情報を表す情報パターンを配置し、同期パターンの下の4ブロックに紙面上のY方向の座標を特定するY座標情報を表す情報パターンを配置している。さらに、これらの座標情報を表す情報パターンで囲まれた16ブロックに、紙面または紙面に印刷される文書の識別情報を表す情報パターンを配置している。
なお、上述した9C2方式における単位符号パターンは例示に過ぎず、図の左下に示すように、9C3方式における単位符号パターンを使用してもよい。
Further, in the example shown in FIG. 6, a layout in which 25 pattern blocks in which 5 × 5 unit code patterns of 3 × 3 dots can be arranged is arranged is used as the information block layout. Of the 25 pattern blocks, a synchronization pattern is arranged in one block at the upper left. In addition, an information pattern representing X coordinate information that specifies coordinates in the X direction on the paper surface is arranged in the four blocks to the right of the synchronization pattern, and the Y direction coordinates on the paper surface are specified in the four blocks below the synchronization pattern. An information pattern representing coordinate information is arranged. Furthermore, an information pattern representing the identification information of the document printed on the paper surface or the paper surface is arranged in 16 blocks surrounded by the information pattern representing the coordinate information.
The unit code pattern in the 9C2 system described above is merely an example, and the unit code pattern in the 9C3 system may be used as shown in the lower left of the figure.

次に、本実施形態における識別情報と座標情報を表現するためのレイアウトについて説明する。
図7に、このようなレイアウトの一部を示す。
図7に示すレイアウトでは、図6に示した情報ブロックを基本単位とし、この情報ブロックを紙面全体に周期的に配置する。図では、同期パターンを「S」で表し、X座標を表すパターンを「X1」、「X2」、…で表し、Y座標を表すパターンを「Y1」、「Y2」、…で表している。座標情報は、例えば紙面の縦及び横に渡ってM系列で表現する。また、識別情報の符号化には、幾つかの方法の利用が考えられるが、本実施形態では、RS符号化が適している。RS符号は多値の符号法であり、この場合、ブロックの表現をRS符号の多値に対応させるとよいからである。図7では、識別情報を表すパターンを「IXY」(X=1〜4,Y=1〜4)で表している。
Next, a layout for expressing identification information and coordinate information in the present embodiment will be described.
FIG. 7 shows a part of such a layout.
In the layout shown in FIG. 7, the information block shown in FIG. 6 is used as a basic unit, and this information block is periodically arranged on the entire sheet. In the figure, the synchronization pattern is represented by “S”, the pattern representing the X coordinate is represented by “X1”, “X2”,..., And the pattern representing the Y coordinate is represented by “Y1”, “Y2”,. The coordinate information is expressed in M series over, for example, the vertical and horizontal directions of the page. Further, although some methods can be used for encoding the identification information, RS encoding is suitable in this embodiment. This is because the RS code is a multi-level coding method, and in this case, the block representation should correspond to the multi-value of the RS code. In FIG. 7, the pattern representing the identification information is represented by “IXY” (X = 1 to 4, Y = 1 to 4).

ここで、座標情報を表現するのに用いるM系列について説明する。
M系列とは、その部分列が、他の部分列と一致することがない系列である。例えば、11次のM系列は、2047ビットのビット列である。そして、この2047ビットのビット列の中から取り出された11ビット以上の部分列と同じ並びは、この2047ビットのビット列の中に自身以外には存在しない。本実施形態では、16個の単位符号パターンを4ビットに対応付ける。すなわち、2047ビットのビット列を4ビットごとに10進数で表し、図4に示したような数値対応に従って単位符号パターンを決定し、座標符号として紙面の横と縦に渡って表現する。したがって、復号の際は、3つの連続する単位符号パターンを特定することにより、ビット列上の位置が特定されることになる。
Here, the M series used for expressing the coordinate information will be described.
The M sequence is a sequence whose partial sequence does not match other partial sequences. For example, the eleventh order M-sequence is a bit string of 2047 bits. The same sequence as the partial sequence of 11 bits or more extracted from the 2047-bit bit string does not exist in the 2047-bit bit string other than itself. In the present embodiment, 16 unit code patterns are associated with 4 bits. That is, a 2047-bit bit string is represented in decimal notation for every 4 bits, a unit code pattern is determined according to the numerical value correspondence as shown in FIG. 4, and is expressed as a coordinate code across the paper in the horizontal and vertical directions. Therefore, at the time of decoding, the position on the bit string is specified by specifying three consecutive unit code patterns.

図8に、M系列を用いた座標情報の符号化の例を示す。
(a)は、11次のM系列の例として、「0111000101011010000110010…」というビット列を示している。本実施の形態では、これを4ビットずつに区切り、1つ目の部分列「0111」をパターン値7の単位符号パターンとして、2つ目の部分列「0001」をパターン値1の単位符号パターンとして、3つ目の部分列「0101」をパターン値5の単位符号パターンとして、4つ目の部分列「1010」をパターン値10の単位符号パターンとして、それぞれ紙面上に配置する。
FIG. 8 shows an example of encoding coordinate information using an M sequence.
(A) shows a bit string “0111000101011010000110010...” As an example of the 11th order M-sequence. In the present embodiment, this is divided into 4 bits, and the first partial sequence “0111” is a unit code pattern of pattern value 7 and the second partial sequence “0001” is a unit code pattern of pattern value 1. As a result, the third partial sequence “0101” is arranged as a unit code pattern with a pattern value of 5, and the fourth partial sequence “1010” is arranged as a unit code pattern of a pattern value of 10, respectively.

このように、4ビットずつ区切って単位符号パターンに割り当てると、(b)に示すように、4周期で全てのパターン列を表現できる。すなわち、11次のM系列は、2047ビットなので、この系列を4ビットごとに切り出し、単位符号パターンで表現していくと、最後に3ビットあまることになる。この3ビットに、M系列の最初の1ビットを加えて4ビットとし単位符号パターンで表す。さらに、M系列の2ビット目から4ビットごとに切り出し単位符号パターンで表す。すると、次の周期は、M系列の3ビット目から始まり、その次の周期は、M系列の4ビット目から始まる。さらに、5周期目は、5ビット目からとなるが、これは最初の周期と一致する。したがって、M系列の4周期を4ビットごとに切り出していくと、2047個の単位符号パターンで全てを尽くすことができる。M系列は11次であるので、3つの連続する単位符号パターンは、他のどの位置の連続する符号パターンとも一致することはない。そこで、読出し時には3つの単位符号パターンを読み出せば、復号が可能である。ただし、本実施形態では、誤りの発生を考慮し、4つの単位符号パターンで座標情報を表現している。   As described above, when 4 bits are divided and assigned to the unit code pattern, all pattern strings can be expressed in 4 cycles as shown in FIG. That is, since the 11th order M-sequence is 2047 bits, if this sequence is cut out every 4 bits and expressed by a unit code pattern, 3 bits will be added at the end. The first 1 bit of the M sequence is added to these 3 bits to form 4 bits, which are represented by a unit code pattern. Further, the unit code pattern is cut out every 4 bits from the second bit of the M sequence. Then, the next cycle starts from the third bit of the M sequence, and the next cycle starts from the fourth bit of the M sequence. Furthermore, the 5th cycle starts from the 5th bit, which coincides with the first cycle. Therefore, if four cycles of the M sequence are cut out every 4 bits, it is possible to use all 2047 unit code patterns. Since the M sequence is 11th order, the three consecutive unit code patterns do not match the continuous code pattern at any other position. Therefore, decoding can be performed by reading three unit code patterns at the time of reading. However, in the present embodiment, coordinate information is expressed by four unit code patterns in consideration of occurrence of errors.

ところで、このような符号化を行った場合、4周期のM系列は2047個のブロックに分割して格納される。そして、図7のようなレイアウトでは、同期パターンを配置したブロックが間に挟まれるので、4周期のM系列で2558個(≒2047個×5/4)のブロック分の長さをカバーすることになる。1つのブロックの一辺の長さは、0.508mm(600dpiで12ピクセル)なので、2558個のブロックの長さは1299.5mmである。つまり、1299.5mmの長さが符号化されることになる。A0サイズの長辺が1188.0mmであるので、本実施の形態では、A0サイズの用紙上の座標を符号化することになる。   By the way, when such encoding is performed, the M sequence of 4 periods is divided into 2047 blocks and stored. In the layout as shown in FIG. 7, since the blocks where the synchronization pattern is arranged are sandwiched between them, the length of 2558 blocks (≈2047 × 5/4) is covered with the M sequence of 4 cycles. become. Since the length of one side of one block is 0.508 mm (12 pixels at 600 dpi), the length of 2558 blocks is 1299.5 mm. That is, a length of 1299.5 mm is encoded. Since the long side of the A0 size is 1188.0 mm, in this embodiment, the coordinates on the A0 size paper are encoded.

以上のように構成されるパターン画像は、例えば電子写真方式を用いて、Kトナー(カーボンを含む赤外光吸収トナー)、または、特殊トナーにより、媒体である紙面上に形成される。
ここで、特殊トナーとしては、可視光領域(400nm〜700nm)における最大吸収率が7%以下であり、近赤外領域(800nm〜1000nm)における吸収率が30%以上の不可視トナーが例示される。ここで、「可視」及び「不可視」は、目視により認識できるかどうかとは関係しない。印刷された紙面に形成された画像が可視光領域における特定の波長の吸収に起因する発色性の有無により認識できるかどうかで「可視」と「不可視」とを区別している。また、可視光領域における特定の波長の吸収に起因する発色性が若干あるが、人間の目で認識し難いものも「不可視」に含める。
The pattern image configured as described above is formed on a sheet of paper, which is a medium, using K toner (infrared light absorbing toner containing carbon) or special toner, for example, using an electrophotographic system.
Here, as the special toner, an invisible toner having a maximum absorption rate of 7% or less in the visible light region (400 nm to 700 nm) and an absorption rate of 30% or more in the near infrared region (800 nm to 1000 nm) is exemplified. . Here, “visible” and “invisible” are not related to whether they can be recognized visually. “Visible” and “invisible” are distinguished based on whether or not an image formed on the printed paper can be recognized by the presence or absence of color development due to absorption of a specific wavelength in the visible light region. Further, “invisible” includes those that have some color developability due to absorption of a specific wavelength in the visible light region but are difficult to recognize with human eyes.

<画像処理装置の構成および動作>
次に、紙面上に印刷された(媒体上に形成された)パターン画像を読み取る画像処理装置について説明する。
図9は、画像処理装置の機能構成例を示す図である。
図9に示すように、画像処理装置10は、パターン画像を撮像する撮像部100と、パターン画像を形成するドットを検出するドット解析部200と、検出されたドットにより単位符号パターンや情報ブロックを復元し情報を復号する復号部300とを備える。
<Configuration and Operation of Image Processing Device>
Next, an image processing apparatus that reads a pattern image printed on a paper surface (formed on a medium) will be described.
FIG. 9 is a diagram illustrating a functional configuration example of the image processing apparatus.
As illustrated in FIG. 9, the image processing apparatus 10 includes an imaging unit 100 that captures a pattern image, a dot analysis unit 200 that detects dots forming the pattern image, and a unit code pattern and an information block based on the detected dots. A decoding unit 300 for restoring and decoding the information.

撮像部100は、CCD(Charge Coupled Devices)やCMOS(Complementary Metal Oxide Semiconductor)等の撮像素子を用いて構成され、紙面上に形成されたパターン画像を、連続的な画像フレームとして読み取る。そして、読み取ったパターン画像を、8ビットの画像データとしてドット解析部200に送る。撮像部100により読み取られる画像のサイズは、特に限定されないが、ここでは156画素×156画素とする。   The imaging unit 100 is configured using an imaging device such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS), and reads a pattern image formed on a paper surface as a continuous image frame. Then, the read pattern image is sent to the dot analysis unit 200 as 8-bit image data. The size of the image read by the imaging unit 100 is not particularly limited, but is 156 pixels × 156 pixels here.

ドット解析部200は、プログラム制御されたCPUおよびメモリ等で実現され、撮像部100により撮像された画像からドットを検出し、2次元のビット列を生成する。このドット解析部200は、画像データを解析する機能として、位置検出部210と、角度検出部220と、同期化部230とを備える。   The dot analysis unit 200 is realized by a program-controlled CPU, memory, and the like, detects dots from the image captured by the imaging unit 100, and generates a two-dimensional bit string. The dot analysis unit 200 includes a position detection unit 210, an angle detection unit 220, and a synchronization unit 230 as functions for analyzing image data.

位置検出部210は、撮像部100から受け取った8ビットの画像からドットの位置を検出する。具体的には、取得した画像フレームからドットを検出し、さらに検出したドットの画像フレーム上での位置情報(座標値)を算出する。したがって、位置検出部210は、単位画像であるドットを検出する単位画像検出手段である。   The position detection unit 210 detects a dot position from the 8-bit image received from the imaging unit 100. Specifically, dots are detected from the acquired image frame, and position information (coordinate values) of the detected dots on the image frame is calculated. Therefore, the position detection unit 210 is a unit image detection unit that detects dots that are unit images.

角度検出部220は、位置検出部210により検出された画像上のドットの整列角度を検出する。ドットの整列角度とは、画像におけるドットの整列方向の傾きであり、ドット本来の配列に対する回転角度である。ドット本来の配列とは、例えば、図3に示したような単位符号パターンにおける縦横のドットの並びである。   The angle detection unit 220 detects the alignment angle of dots on the image detected by the position detection unit 210. The dot alignment angle is an inclination of the dot alignment direction in the image, and is a rotation angle with respect to the original arrangement of dots. The original arrangement of dots is, for example, an arrangement of vertical and horizontal dots in a unit code pattern as shown in FIG.

同期化部230は、位置検出部210および角度検出部220の検出結果として得られたドットの配列を、2次元のビット配列に変換する。この変換を同期化と呼び、得られたビット配列における各ビットの並びを同期ラインと呼ぶ。得られたビット配列と、同期ラインの角度および間隔の情報は、復号部300に送られる。   The synchronization unit 230 converts the dot arrangement obtained as a detection result of the position detection unit 210 and the angle detection unit 220 into a two-dimensional bit arrangement. This conversion is called synchronization, and the arrangement of each bit in the obtained bit arrangement is called a synchronization line. The obtained bit arrangement and information on the angle and interval of the synchronization line are sent to the decoding unit 300.

復号部300は、プログラム制御されたCPUおよびメモリ等で実現される。この復号部300は、ドット解析部200から受け取ったビット配列、同期ラインの角度および間隔の情報に基づいて、3ドット×3ドットのパターンブロックを検出する。そして、得られたパターンブロックを回転補正し、情報ブロックを復元した後、この情報ブロックにより記録された情報を復号する。また、画像処理装置10が、パターン画像が形成された用紙上に筆記しながらパターン画像を読み取るペン・デバイス(ペン・デバイスの詳細な構成については後述)である場合、ペン先の位置と撮像部100により撮像される位置との間には、一定のずれがある。そこで、復号部300は、同期ラインの角度および間隔の情報に基づいて、画像から得られた座標をペン先の座標に変換する。   Decoding section 300 is realized by a program-controlled CPU, memory, and the like. The decoding unit 300 detects a pattern block of 3 dots × 3 dots based on the bit arrangement received from the dot analysis unit 200, the synchronization line angle and interval information. The obtained pattern block is rotationally corrected to restore the information block, and then the information recorded by the information block is decoded. Further, when the image processing apparatus 10 is a pen device that reads a pattern image while writing on a sheet on which the pattern image is formed (the detailed configuration of the pen device will be described later), the position of the pen tip and the imaging unit There is a certain deviation from the position imaged by 100. Therefore, the decoding unit 300 converts the coordinates obtained from the image into the coordinates of the pen tip based on the information on the angle and interval of the synchronization line.

また、図9に示すように、ドット解析部200の位置検出部210、角度検出部220および同期化部230には、復号部300における復号の成否についての情報がフィードバックされる。位置検出部210、角度検出部220および同期化部230は、この復号の成否の情報に基づいて、各々の処理において使用するパラメータを決定する。具体的には、所定のパラメータを使用して処理を行った結果、復号に成功した(正しい復号結果が得られた)場合は、次の画像フレームに対しても同じパラメータを使用して処理を行うこととする。一方、復号に失敗した場合は、次の画像フレームに対しては、過去の処理履歴を参照し、成功率が最も高かったパラメータを選択して使用することとする。   Also, as shown in FIG. 9, information about the success or failure of decoding in the decoding unit 300 is fed back to the position detection unit 210, angle detection unit 220, and synchronization unit 230 of the dot analysis unit 200. The position detection unit 210, the angle detection unit 220, and the synchronization unit 230 determine parameters to be used in each process based on the information on the success or failure of the decoding. Specifically, as a result of processing using predetermined parameters, if decoding is successful (a correct decoding result is obtained), processing is performed using the same parameters for the next image frame. I will do it. On the other hand, when decoding fails, the parameter with the highest success rate is selected and used for the next image frame with reference to the past processing history.

また、画像処理装置10が後述するペン・デバイスである場合、画像処理装置10には、ペンによる筆記が行われているか否かを認識する機能が設けられる。そして、ドット解析部200の位置検出部210、角度検出部220および同期化部230と、復号部300には、ペンによる筆記が開始されたことを示すストローク開始信号が供給される。ストローク開始信号が供給されると、これらの機能ブロックは、各設定を初期化する。さらにまた、画像処理装置10がペン・デバイスである場合、復号部300には、復号結果からペン先を補正するための、ペン先から撮像面までの相対距離情報(ペン−チップ距離情報)が供給される。   When the image processing apparatus 10 is a pen device to be described later, the image processing apparatus 10 is provided with a function for recognizing whether writing with a pen is performed. The position detection unit 210, the angle detection unit 220, the synchronization unit 230, and the decoding unit 300 of the dot analysis unit 200 are supplied with a stroke start signal indicating that writing with a pen has started. When a stroke start signal is supplied, these function blocks initialize their settings. Furthermore, when the image processing apparatus 10 is a pen device, the decoding unit 300 has relative distance information (pen-tip distance information) from the pen tip to the imaging surface for correcting the pen tip from the decoding result. Supplied.

図10は、ドット解析部200および復号部300による処理の流れを示すフローチャートである。
初期動作として、撮像部100により媒体である紙面の撮像が行われたものとする。
図10に示すように、まず、位置検出部210が、メモリにおけるドットの座標格納領域を初期化し(ステップ1001)、ドットの位置を検出する(ステップ1002)。位置検出に成功したならば(ステップ1003でYes)、次に、角度検出部220が、メモリにおけるドットの整列角度格納領域を初期化し(ステップ1004)、ドットの整列角度を検出する(ステップ1005)。角度検出に成功したならば(ステップ1006でYes)、次に、同期化部230が、メモリのビット配列格納領域を初期化し(ステップ1007)、ドット配列をビット配列に同期させる(ステップ1008)。ドット配列の同期に成功したならば(ステップ1009でYes)、次に、復号部300が、メモリの復号結果格納領域を初期化し(ステップ1010)、復号処理を行う(ステップ1011)。復号に成功したならば(ステップ1012でYes)、復号部300は、復号に成功したことを示す信号を位置検出部210、角度検出部220および同期化部230に送信し(ステップ1013)、復号結果を出力する(ステップ1014)。
FIG. 10 is a flowchart showing the flow of processing performed by the dot analysis unit 200 and the decoding unit 300.
As an initial operation, it is assumed that the imaging unit 100 has captured a sheet of paper as a medium.
As shown in FIG. 10, first, the position detection unit 210 initializes the dot coordinate storage area in the memory (step 1001), and detects the dot position (step 1002). If the position detection is successful (Yes in Step 1003), the angle detection unit 220 then initializes the dot alignment angle storage area in the memory (Step 1004) and detects the dot alignment angle (Step 1005). . If the angle detection is successful (Yes in Step 1006), the synchronization unit 230 then initializes the bit array storage area of the memory (Step 1007) and synchronizes the dot array with the bit array (Step 1008). If the dot array synchronization is successful (Yes in Step 1009), the decoding unit 300 then initializes the decoding result storage area of the memory (Step 1010) and performs the decoding process (Step 1011). If the decoding is successful (Yes in Step 1012), the decoding unit 300 transmits a signal indicating that the decoding is successful to the position detection unit 210, the angle detection unit 220, and the synchronization unit 230 (Step 1013). The result is output (step 1014).

位置検出部210によるドットの位置の検出、角度検出部220によるドットの整列角度の検出、同期化部230によるドット配列の同期のいずれかに失敗した場合(ステップ1003、1006、1009でNo)は、失敗したステップ以後の処理は行われない。これらの場合、および復号部300による復号に失敗した場合(ステップ1012でNo)は、復号部300が、復号に失敗したことを示す信号を、位置検出部210、角度検出部220および同期化部230に送信し(ステップ1015)、かつ復号結果として出力する(ステップ1014)。   When detection of the position of the dot by the position detection unit 210, detection of the dot alignment angle by the angle detection unit 220, or synchronization of the dot arrangement by the synchronization unit 230 fails (No in steps 1003, 1006, and 1009) No processing after the failed step is performed. In these cases, and when decoding by the decoding unit 300 fails (No in step 1012), the position detection unit 210, the angle detection unit 220, and the synchronization unit transmit signals indicating that the decoding unit 300 has failed in decoding. 230 (step 1015) and output as a decoding result (step 1014).

<角度検出および同期化における画像の歪みの影響>
ここで、角度検出および同期化における画像の歪みの影響について説明する。
図11乃至図13は、撮像部100により撮像された画像(以下、撮像画像と呼ぶ)の例を示す図である。
図11−1は、ドットの整列角度が0度の場合の撮像画像の例であり、図11−2は、ドットの整列角度が45度の場合の撮像画像の例である。これらの図において、撮像画像に対して直交するXY座標系を設定し、横方向をX軸、縦方向をY軸とする。そして、ドットの整列方向がX軸およびY軸に沿っている場合を角度0度とする。
<Influence of image distortion in angle detection and synchronization>
Here, the influence of image distortion in angle detection and synchronization will be described.
11 to 13 are diagrams illustrating examples of images captured by the imaging unit 100 (hereinafter referred to as captured images).
FIG. 11A is an example of a captured image when the dot alignment angle is 0 degree, and FIG. 11B is an example of a captured image when the dot alignment angle is 45 degrees. In these figures, an XY coordinate system orthogonal to the captured image is set, and the horizontal direction is the X axis and the vertical direction is the Y axis. The case where the dot alignment direction is along the X axis and the Y axis is defined as an angle of 0 degree.

図11−1および図11−2では、撮像部100の撮像面とドットが形成された紙面とは並行である。これらの図に示す状態では、各ドットは互いに直交する2方向に並んでいる(図中、実線および破線で示した方向がドットの整列方向)。また、隣り合う4つのドットで形成される四角形が正方形をなしている。これらの場合は、近接する2つのドットの位置関係を調べることにより、ドットの整列方向を特定し、ドット本来の配列に対する整列角度を検出することは容易である。   In FIGS. 11A and 11B, the imaging surface of the imaging unit 100 and the paper surface on which dots are formed are parallel. In the state shown in these drawings, the dots are arranged in two directions orthogonal to each other (in the drawings, the directions indicated by the solid line and the broken line are the dot alignment directions). A quadrangle formed by four adjacent dots forms a square. In these cases, it is easy to specify the alignment direction of the dots by examining the positional relationship between two adjacent dots and to detect the alignment angle with respect to the original arrangement of the dots.

また、検出されたドットをビット配列に同期させる手法として、ドット配列に沿った格子を画像フレームに当てはめ、格子のマス目ごとに、ドットの有無に応じてビット値(0または1)を特定する手法が考えられる。図11−1および図11−2に示すように、ドットが直交する2方向に沿って並ぶ場合、直交格子が当てはめられることとなる。図11−2の場合は、ドットの整列角度に合わせて格子を回転させて当てはめれば良い。   As a method of synchronizing the detected dots with the bit arrangement, a grid along the dot arrangement is applied to the image frame, and a bit value (0 or 1) is specified for each grid cell according to the presence or absence of dots. A method can be considered. As shown in FIGS. 11A and 11B, when the dots are arranged along two orthogonal directions, an orthogonal lattice is applied. In the case of FIG. 11B, the lattice may be rotated and applied in accordance with the dot alignment angle.

ところで、画像処理装置10が後述するペン・デバイス等である場合、紙面に対するペン・デバイスの角度によって、撮像部100の撮像面が紙面に対して傾き、撮像画像に歪みが生じてしまう。この場合、図11−1および図11−2の場合のように、ドットの整列角度を検出したり、固定的な格子を用いて同期化したりすることが容易ではなくなる。   When the image processing apparatus 10 is a pen device or the like, which will be described later, the imaging surface of the imaging unit 100 is inclined with respect to the paper surface depending on the angle of the pen device with respect to the paper surface, and the captured image is distorted. In this case, as in FIGS. 11A and 11B, it is not easy to detect the dot alignment angle or to synchronize using a fixed grid.

図12は、図11−1に対して画像の上方が奥に、下方が手前に傾いた状態の撮像画像である。この状態では、撮像画像におけるドットの間隔が上方で短く、下方で長くなるので、隣り合う4つのドットで形成される四角形は台形等になる。図12のように撮像画像が歪むと、ドット間隔やドットの整列角度が場所によって異なってしまうため、直交格子のような固定的な格子を当てはめることができない。   FIG. 12 is a captured image in a state in which the upper part of the image is inclined to the back and the lower part is inclined to the front with respect to FIG. In this state, the interval between the dots in the captured image is short at the top and long at the bottom, so that a quadrangle formed by four adjacent dots becomes a trapezoid or the like. When the captured image is distorted as shown in FIG. 12, the dot interval and the dot alignment angle vary depending on the location, and thus a fixed lattice such as an orthogonal lattice cannot be applied.

図13は、図11−2に対して画像の上方が奥に、下方が手前に傾いた状態の撮像画像である。この状態では、撮像画像におけるドットの2方向の並びが直交していないので、隣り合う4つのドットで形成される四角形は菱形や平行四辺形となる。図13のように撮像画像が歪むと、隣り合う4つのドットで形成される四角形において、短い対角線の長さが2辺の長さに近づくため、正しいドットの整列方向を検出することが困難になる。図13に示す例では、ドットは、実線で示した方向、破線で示した方向、一点鎖線で示した方向の3方向にドットが並んでいるように認められる。   FIG. 13 is a captured image in a state in which the upper part of the image is inclined to the back and the lower part is inclined to the front with respect to FIG. In this state, since the arrangement in the two directions of the dots in the captured image is not orthogonal, a quadrangle formed by four adjacent dots is a rhombus or a parallelogram. When the captured image is distorted as shown in FIG. 13, in a quadrangle formed by four adjacent dots, the length of a short diagonal line approaches the length of two sides, making it difficult to detect the correct dot alignment direction. Become. In the example shown in FIG. 13, the dots are recognized as being arranged in three directions: a direction indicated by a solid line, a direction indicated by a broken line, and a direction indicated by a one-dot chain line.

そこで、本実施形態において、角度検出部220は、まず、位置検出部210により撮像画像から検出された各ドットに関して、近接ドット対を検出する。近接ドット対は、所定のドットに注目し多場合に、そのドットとそのドットに最も近い位置にあるドットとで構成される。次に、検出された近接ドット対の角度の度数分布に基づき、3つの角度を抽出し、抽出された3つの角度の関係等に基づいて、ドットの整列角度を特定する。   Therefore, in the present embodiment, the angle detection unit 220 first detects a neighboring dot pair for each dot detected from the captured image by the position detection unit 210. The proximity dot pair is composed of a dot and a dot closest to the dot when a predetermined dot is noticed in many cases. Next, three angles are extracted based on the detected frequency distribution of the angles of adjacent dot pairs, and the dot alignment angle is specified based on the relationship between the extracted three angles and the like.

また、同期化部230は、画像フレームの中心付近で同期原点を特定し、この同期原点から外側へ順に、実際のドットの位置に応じて補正しながら、格子線(同期ライン)を引いていくことで同期用の格子を設定する。   In addition, the synchronization unit 230 specifies a synchronization origin near the center of the image frame, and draws a grid line (synchronization line) while performing correction in accordance with the actual dot position in order from the synchronization origin to the outside. This sets the grid for synchronization.

<角度検出部の機能>
次に、角度検出部220の機能についてさらに詳細に説明する。
図14は、角度検出部220の機能構成を示す図である。
角度検出部220は、近接ドット対を検出する近接ドット対検出部221と、検出された近接ドット対の度数分布データを生成する度数分布生成部222とを備える。そして、生成された度数分布データに基づいて3つの角度を抽出する第1軸角度抽出部223、第2軸角度抽出部224および第3軸角度抽出部225と、抽出された3つの角度からドットの整列角度を選択し特定する角度特定部226とを備える。図示の構成において、度数分布生成部222、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225および角度特定部226(図中、破線で囲まれた部分)は、ドットの整列角度を特定する角度特定手段である。
<Function of angle detector>
Next, the function of the angle detection unit 220 will be described in more detail.
FIG. 14 is a diagram illustrating a functional configuration of the angle detection unit 220.
The angle detection unit 220 includes a proximity dot pair detection unit 221 that detects a proximity dot pair, and a frequency distribution generation unit 222 that generates frequency distribution data of the detected proximity dot pair. Then, a first axis angle extracting unit 223, a second axis angle extracting unit 224, and a third axis angle extracting unit 225 that extract three angles based on the generated frequency distribution data, and dots from the extracted three angles And an angle specifying unit 226 for selecting and specifying the alignment angle. In the configuration shown in the figure, the frequency distribution generation unit 222, the first axis angle extraction unit 223, the second axis angle extraction unit 224, the third axis angle extraction unit 225, and the angle specification unit 226 (the part surrounded by a broken line in the figure). Is an angle specifying means for specifying the dot alignment angle.

近接ドット対検出部221は、位置検出部210により検出されたドットの画像フレーム上での位置情報(座標値)を取得し、近接ドット対を検出する。言い換えれば、近接ドット対検出部221は、位置検出部210の出力であるドット座標値から最も近い位置にあるドット座標値の組み合わせを検出する手段である。近接ドット対の詳細な検出方法については後述する。   The proximity dot pair detection unit 221 acquires position information (coordinate values) on the image frame of the dots detected by the position detection unit 210, and detects a proximity dot pair. In other words, the proximity dot pair detection unit 221 is means for detecting a combination of dot coordinate values that are closest to the dot coordinate value that is the output of the position detection unit 210. A detailed method for detecting the adjacent dot pair will be described later.

度数分布生成部222は、近接ドット対検出部221により検出された近接ドット対がなす角度の度数分布データを生成する。ここで、近接ドット対がなす角度とは、近接ドット対を構成する2つのドットを結ぶ直線が、位置検出部210の出力であるドット位置情報の基準となる所定の方向(例えば、撮像画像に設定されたXY座標のX軸方向)に対してなす角度である。   The frequency distribution generation unit 222 generates frequency distribution data of the angle formed by the adjacent dot pair detected by the adjacent dot pair detection unit 221. Here, the angle formed by the adjacent dot pair is a predetermined direction (for example, in the captured image) in which a straight line connecting the two dots constituting the adjacent dot pair serves as a reference for the dot position information output from the position detection unit 210. This is an angle formed with respect to the set XY coordinate (X-axis direction).

第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225は、度数分布生成部222により生成された度数分布データに基づいて、ドットの整列方向の候補となる3方向の角度(第1軸角度、第2軸角度、第3軸角度)を抽出する。各々の角度の詳細な検出方法については後述する。   The first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225 are candidates for dot alignment directions based on the frequency distribution data generated by the frequency distribution generation unit 222. The direction angle (first axis angle, second axis angle, third axis angle) is extracted. A detailed method of detecting each angle will be described later.

角度特定部226は、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225により抽出された第1軸角度、第2軸角度、第3軸角度に基づいて、ドット本来の配列の方向に対応するドットの整列方向の角度(整列角度)を特定し出力する。例えば、図3に示したような単位符号パターンの場合、ドットは縦横の2方向に並んでいるので、この縦横2方向に対応する2方向の整列角度が特定される。図14では、この2方向をX軸およびY軸と記載している。整列角度の詳細な特定方法については後述する。   The angle specifying unit 226 is based on the first axis angle, the second axis angle, and the third axis angle extracted by the first axis angle extracting unit 223, the second axis angle extracting unit 224, and the third axis angle extracting unit 225. The angle (alignment angle) of the dot alignment direction corresponding to the direction of the original dot arrangement is specified and output. For example, in the case of the unit code pattern as shown in FIG. 3, since the dots are arranged in two vertical and horizontal directions, the alignment angles in two directions corresponding to the two vertical and horizontal directions are specified. In FIG. 14, these two directions are described as an X axis and a Y axis. A detailed method for specifying the alignment angle will be described later.

また、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225は、抽出した角度に沿って並ぶ近接ドット対のドット間の距離に基づいて、この方向でのドット間の基準間隔を算出する。そして、角度特定部226は、2方向の整列角度におけるドット間の基準間隔を特定する。すなわち、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225、角度特定部226は、撮像画像から検出されたドット配列におけるドット間隔を特定する間隔特定手段としても機能する。基準間隔の検出方法については後述する。   Further, the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225 are based on the distance between dots of adjacent dot pairs arranged along the extracted angle in this direction. A reference interval between dots is calculated. Then, the angle specifying unit 226 specifies a reference interval between dots at two alignment angles. In other words, the first axis angle extracting unit 223, the second axis angle extracting unit 224, the third axis angle extracting unit 225, and the angle specifying unit 226 serve as an interval specifying unit that specifies the dot interval in the dot arrangement detected from the captured image. Also works. A method for detecting the reference interval will be described later.

<近接ドット対の検出方法>
次に、近接ドット対検出部221による近接ドット対の検出方法について詳細に説明する。
図15は、ドットが検出された画像から、近接ドット対が検出された様子を示す図である。図15(a)は位置検出部210により検出されたドット位置の一例であり、図15(b)は図15(a)に対して近接ドット対の検出が行われた状態を示す。図15(b)では、近接ドット対を、線で結んで表現している。この場合、あるドットAから最も近いドットBが、他のドットCと近接ドット対を成している場合は、ドットAは他のどのドットとも近接ドット対を成していない(A、B、Cは特に図示していない)。
<Detection method of adjacent dot pairs>
Next, a method for detecting a proximity dot pair by the proximity dot pair detection unit 221 will be described in detail.
FIG. 15 is a diagram illustrating a state in which a pair of adjacent dots is detected from an image in which dots are detected. FIG. 15A shows an example of the dot position detected by the position detection unit 210, and FIG. 15B shows a state in which the proximity dot pair is detected with respect to FIG. 15A. In FIG. 15B, adjacent dot pairs are represented by connecting lines. In this case, when the dot B closest to a certain dot A forms a close dot pair with another dot C, the dot A does not form a close dot pair with any other dot (A, B, C is not particularly shown).

図16は、近接ドット対の検出方法の具体例を示す図である。
図16において、例えば、番号1から4までのドットに対して近接ドット対を検出するものとする。
近接ドット対検出部221は、まず、位置検出部210が検出した番号1から4までのドットの位置を認識する。そして、番号1のドットを基準に他の番号のドットまでの距離をスキャンしていく。その結果、番号1のドットに最も近いドットは番号3のドットであり、両者の距離(PD)は20と認識される。そして、近接ドット対検出部221は、番号1のドットに関して、番号3のドットが近接ドットであることを示す情報“Pair[1]=3”と、番号3のドットまでの距離が20であることを示す情報“MPD[1]=20”とを生成する。同様に、番号3のドットに関して、“Pair[3]=1”と“MPD[3]=20”の情報(以下、属性情報)を生成する。
FIG. 16 is a diagram illustrating a specific example of a method for detecting a neighboring dot pair.
In FIG. 16, for example, it is assumed that adjacent dot pairs are detected for dots numbered 1 to 4.
The proximity dot pair detection unit 221 first recognizes the positions of dots numbered 1 to 4 detected by the position detection unit 210. Then, the distance to the dots of other numbers is scanned based on the dot of number 1. As a result, the dot closest to the number 1 dot is the number 3 dot, and the distance (PD) between them is recognized as 20. Then, the proximity dot pair detection unit 221 has information “Pair [1] = 3” indicating that the number 3 dot is a proximity dot for the number 1 dot, and the distance to the number 3 dot is 20. Information “MPD [1] = 20” is generated. Similarly, information (hereinafter, attribute information) of “Pair [3] = 1” and “MPD [3] = 20” is generated for the dot of number 3.

ここで、Pair[ ]の[ ]内の番号は自らのドットの番号を示し、Pair[ ]=で定義される値は、現時点で近接ドット対となっている相手のドットの番号を示す。また、MPD[ ]の[ ]内の番号は自らのドットの番号を示し、MPD[ ]の値は、現時点での近接ドット対となっている相手のドットまでの距離を示す。   Here, the number in [] of Pair [] indicates the number of its own dot, and the value defined by Pair [] = indicates the number of the partner dot that is currently a close dot pair. Further, the number in [] of MPD [] indicates the number of its own dot, and the value of MPD [] indicates the distance to the partner dot that is the adjacent dot pair at the present time.

次に、近接ドット対検出部221は、番号2のドットを基準に、番号1以外のドットまでの距離をスキャンしていく。先に番号1のドットをスキャンした時点で、番号1のドットは番号2のドットから最も近いドットではないと判断されているため、番号1のドットをスキャンの対象から外している。
このスキャンの結果、番号2のドットに最も近いドットは番号3のドットであり、両者の距離(PD)は15と認識される。この距離は、番号1と番号3とのドットの距離(20)よりも短い。したがって、位置検出部210は、番号2のドットに関して“Pair[2]=3”と“MPD[2]=15”の属性情報を生成し、番号3のドットに関して“Pair[3]=2”と“MPD[3]=15”の属性情報を生成する。そして、この時点で番号1のドットは、番号2のドットに番号3のドットを奪われたため、属性情報が“Pair[1]=−1”と“MPD[1]=−1”に変更され、番号1のドットはどの番号のドットとも近接ドット対を成していない状態になる。
Next, the proximity dot pair detection unit 221 scans the distance to dots other than number 1 with reference to the number 2 dot. When the dot number 1 is scanned first, it is determined that the dot number 1 is not the closest dot to the number 2 dot, so the dot number 1 is excluded from the scan target.
As a result of this scan, the dot closest to the number 2 dot is the number 3 dot, and the distance (PD) between them is recognized as 15. This distance is shorter than the dot distance (20) between number 1 and number 3. Therefore, the position detection unit 210 generates attribute information “Pair [2] = 3” and “MPD [2] = 15” for the dot of number 2 and “Pair [3] = 2” for the dot of number 3. And attribute information “MPD [3] = 15” is generated. At this time, since the dot of number 1 is deprived of the dot of number 3 by the dot of number 2, the attribute information is changed to “Pair [1] = − 1” and “MPD [1] = − 1”. , The dot of number 1 is in a state of not forming a close dot pair with any number of dots.

同様にして、近接ドット対検出部221は、番号3のドットを基準に、番号が1と2以外のドットまでの距離をスキャンしていく。その結果、番号3のドットに最も近いドットは番号4のドットであり、両者の間隔(PD)は10と認識される。この距離は、番号2と番号3とのドットの距離(15)よりも短い。したがって、位置検出部210は、番号3のドットに関して“Pair[3]=4”と“MPD[3]=10”の属性情報を生成し、番号4のドットに関して“Pair[4]=3”と“MPD[4]=10”の属性情報を生成する。そして、この時点で番号2のドットは、番号4のドットに番号3のドットを奪われたため、属性情報が“Pair[2]=−1”と“MPD[2]=−1”に変更され、番号2のドットはどの番号のドットとも近接ドット対を成していない状態になる。   Similarly, the proximity dot pair detection unit 221 scans the distance to dots other than the numbers 1 and 2 with the number 3 as a reference. As a result, the dot closest to the number 3 dot is the number 4 dot, and the distance (PD) between them is recognized as 10. This distance is shorter than the dot distance (15) between number 2 and number 3. Therefore, the position detection unit 210 generates attribute information “Pair [3] = 4” and “MPD [3] = 10” for the dot of number 3, and “Pair [4] = 3” for the dot of number 4. And “MPD [4] = 10” attribute information is generated. At this time, since the dot of number 2 is deprived of the dot of number 3 by the dot of number 4, the attribute information is changed to “Pair [2] = − 1” and “MPD [2] = − 1”. , The dot of number 2 is in a state that does not form a close dot pair with any of the dots of any number.

この時点で、スキャンしていないドットは番号4のドットだけであるが、このドットは既に番号3のドットと近接ドット対を成しているため、改めてスキャンされることはなく処理は終了する。なお、ここでは一例としてドットの数が4個の場合を取り上げたが、ドットの数が5個以上ある場合も上述したスキャンの手順を繰り返していくことで近接ドット対が順次検出される。   At this time, the dot that has not been scanned is only the dot with the number 4, but since this dot has already formed a close dot pair with the dot with the number 3, the process is finished without being scanned again. Although the case where the number of dots is four is taken as an example here, even when the number of dots is five or more, adjacent dot pairs are sequentially detected by repeating the scanning procedure described above.

図17は、近接ドット対検出部221による近接ドット対の検出処理の流れを説明するフローチャートである。
近接ドット対の検出は、図16を参照して説明したように、複数のドットの各々を順次基準とし、他のドットとの位置関係を調べることによって行われる。この基準となるドットを基準ドット、他のドットを対象ドットと呼ぶ。図17に示すように、近接ドット対検出部221は、各ドットを順次基準ドットとしながら、以下のループ処理を実行する。
FIG. 17 is a flowchart for explaining the flow of proximity dot pair detection processing by the proximity dot pair detection unit 221.
As described with reference to FIG. 16, the proximity dot pair is detected by sequentially examining each of the plurality of dots as a reference and examining the positional relationship with other dots. This reference dot is called a reference dot, and the other dots are called target dots. As shown in FIG. 17, the proximity dot pair detection unit 221 performs the following loop processing while sequentially setting each dot as a reference dot.

まず、近接ドット対検出部221は、基準ドットとして選んだドットの座標値を取得し(ステップ1701)、ドット対番号(PairIndex)を生成して基準ドットに付与する(ステップ1702)。ここでは、基準ドットの座標値を(Xs,Ys)とする。次に、近接ドット対検出部221は、基準ドット以外の各ドットを順次対象ドットとしながら、以下のループ処理を実行する。   First, the proximity dot pair detection unit 221 acquires the coordinate value of the dot selected as the reference dot (step 1701), generates a dot pair number (PairIndex), and assigns it to the reference dot (step 1702). Here, the coordinate value of the reference dot is (Xs, Ys). Next, the proximity dot pair detection unit 221 executes the following loop processing while sequentially setting each dot other than the reference dot as a target dot.

まず、近接ドット対検出部221は、対象ドットとして選んだドットの座標値を取得する(ステップ1703)。ここでは、対象ドットの座標値を(Xe,Ye)とする。次に、近接ドット対検出部221は、基準ドットと対象ドットの間の距離((Xs,Ys)−(Xe,Ye))を計算する(ステップ1704)。そして、算出されたドット間距離が、現在の基準ドットに関するドット間距離のうちで最小値である場合は(ステップ1705でYes)、その対象ドットと基準ドットとの関係を表すドット対情報(例えば、図16に示したPair[ ]およびMPD[ ])を生成し保存する(ステップ1706)。このとき、他のドットを対象ドットとするドット対情報があれば、そのドット対情報は消去される。   First, the proximity dot pair detection unit 221 acquires the coordinate value of the dot selected as the target dot (step 1703). Here, the coordinate value of the target dot is (Xe, Ye). Next, the proximity dot pair detection unit 221 calculates the distance ((Xs, Ys) − (Xe, Ye)) between the reference dot and the target dot (step 1704). When the calculated inter-dot distance is the minimum value among the inter-dot distances regarding the current reference dot (Yes in step 1705), dot pair information (for example, the relationship between the target dot and the reference dot) , Pair [] and MPD [] shown in FIG. 16 are generated and stored (step 1706). At this time, if there is dot pair information that uses other dots as target dots, the dot pair information is deleted.

一方、ステップ1704で算出されたドット間距離が現在の基準ドットに関するドット間距離のうちで最小値でない場合(ステップ1705でNo)、言い換えれば、ドット間距離がより短い他のドットに関するドット対情報が既に保存されている場合は、既に保存されているドット対情報がそのまま保持される。   On the other hand, when the inter-dot distance calculated in step 1704 is not the minimum value among the inter-dot distances regarding the current reference dot (No in step 1705), in other words, dot pair information regarding other dots with shorter inter-dot distances. Is already stored, the already stored dot pair information is retained as it is.

基準ドット以外の全てのドットを対象ドットとしてステップ1703〜1706のループ処理が行われると、その基準ドットに最も近い位置にある1つのドットを対象ドットとして、この対象ドットと基準ドットとの関係を表すドット対情報が保存されることとなる。この後、近接ドット対検出部221は、この基準ドットおよび対象ドットに関して、ステップ1706で保存されたドット対情報に基づいて、近接ドット対か否かを判別する処理を行う(ステップ1707)。図18は、ステップ1707に示す近接ドット対の判別処理の詳細を説明するフローチャートである。   When the loop processing of steps 1703 to 1706 is performed with all the dots other than the reference dots as the target dots, the relationship between the target dots and the reference dots is determined by setting one dot closest to the reference dot as the target dot. The dot pair information to be represented is saved. Thereafter, the proximity dot pair detection unit 221 performs processing for determining whether the reference dot and the target dot are proximity dot pairs based on the dot pair information stored in Step 1706 (Step 1707). FIG. 18 is a flowchart for explaining the details of the proximity dot pair discrimination processing shown in step 1707.

図18を参照すると、近接ドット対検出部221は、まず、対象ドットが他のドットとリンクされているか否かを調べる。すなわち、対象ドットが他のドットと既に対をなしているか否かを、図16で説明した属性情報(Pair[]およびMPD[])を参照して調べる。対象ドットに属性情報が設定されていれば、それは対象ドットが他のドットとリンクされており、対象ドットに属性情報が設定されていなければ、対象ドットは他のドットとリンクしていない。対象ドットと他のドットとの間のリンクが存在する場合(ステップ1801でYes)、次に近接ドット対検出部221は、対象ドットと基準ドットとの間のドット間距離と、対象ドットとリンク先の他のドットとの間のドット間距離とを比較する。そして、基準ドットとの間のドット間距離の方が短い場合(ステップ1802でNo)、近接ドット対検出部221は、対象ドットと他のドットとの間のリンクを削除する(ステップ1803)。   Referring to FIG. 18, the proximity dot pair detection unit 221 first checks whether or not the target dot is linked to another dot. That is, it is checked with reference to the attribute information (Pair [] and MPD []) described with reference to FIG. 16 whether or not the target dot is already paired with another dot. If the attribute information is set for the target dot, the target dot is linked to another dot. If the attribute information is not set for the target dot, the target dot is not linked to another dot. If there is a link between the target dot and another dot (Yes in step 1801), the adjacent dot pair detection unit 221 next determines the inter-dot distance between the target dot and the reference dot, and the target dot and link. The inter-dot distance between the other dots is compared. If the inter-dot distance between the reference dot and the reference dot is shorter (No in step 1802), the proximity dot pair detection unit 221 deletes the link between the target dot and another dot (step 1803).

対象ドットと他のドットとの間のリンクが存在しない場合(ステップ1801でNo)、またはステップ1803で対象ドットと他のドットとの間のリンクを削除した後、近接ドット対検出部221は、基準ドットが他のドットとリンクされているか否かを調べる。基準ドットと他のドットとの間のリンクが存在する場合(ステップ1804でYes)、次に近接ドット対検出部221は、基準ドットと対象ドットとの間のドット間距離と、基準ドットとリンク先の他のドットとの間のドット間距離とを比較する。そして、対象ドットとの間のドット間距離の方が短い場合(ステップ1805でNo)、近接ドット対検出部221は、基準ドットと他のドットとの間のリンクを削除する(ステップ1806)。   When there is no link between the target dot and another dot (No in Step 1801), or after deleting the link between the target dot and another dot in Step 1803, the proximity dot pair detection unit 221 Check whether the reference dot is linked to other dots. If there is a link between the reference dot and another dot (Yes in step 1804), the adjacent dot pair detection unit 221 then determines the inter-dot distance between the reference dot and the target dot, and the reference dot and link. The inter-dot distance between the other dots is compared. If the inter-dot distance to the target dot is shorter (No in Step 1805), the proximity dot pair detection unit 221 deletes the link between the reference dot and other dots (Step 1806).

この後、近接ドット対検出部221は、基準ドットと対象ドットとをリンクさせる(ステップ1807)。これにより、基準ドットと対象ドットとは近接ドット対となる。
一方、基準ドットと対象ドットとの間のドット間距離よりも、対象ドットとリンク先の他のドットとの間のドット間距離の方が短い場合(ステップ1802でYes)、または、基準ドットとリンク先の他のドットとの間のドット間距離の方が短い場合(ステップ1805でYes)は、近接ドット対検出部221は、基準ドットと対象ドットとをリンクさせない。したがって、これらの組み合わせは近接ドット対とはならない。
Thereafter, the proximity dot pair detection unit 221 links the reference dot and the target dot (step 1807). Thereby, the reference dot and the target dot form a close dot pair.
On the other hand, when the inter-dot distance between the target dot and the other linked dots is shorter than the inter-dot distance between the reference dot and the target dot (Yes in step 1802), or When the inter-dot distance between other linked dots is shorter (Yes in step 1805), the proximity dot pair detection unit 221 does not link the reference dot and the target dot. Therefore, these combinations do not form adjacent dot pairs.

<第1軸角度、第2軸角度、第3軸角度の抽出方法>
次に、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225による第1軸角度、第2軸角度、第3軸角度の抽出方法について詳細に説明する。
まず、前処理として、度数分布生成部222が、近接ドット対検出部221により検出された近接ドット対がなす角度の度数分布データを生成する。この度数分布データは、近接ドット対がなす角度の値ごとに、その出現度数を積算したデータである。
<Method for extracting first axis angle, second axis angle, and third axis angle>
Next, a method for extracting the first axis angle, the second axis angle, and the third axis angle by the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225 will be described in detail.
First, as preprocessing, the frequency distribution generation unit 222 generates frequency distribution data of angles formed by adjacent dot pairs detected by the adjacent dot pair detection unit 221. The frequency distribution data is data obtained by integrating the appearance frequency for each angle value formed by the adjacent dot pair.

図19は、度数分布生成部222により生成される近接ドット対がなす角度の度数分布の例を視覚的に表現したヒストグラムである。
度数分布データは、180度の範囲(図19の例では、−90度から+90度まで)で生成される。この度数分布データを用いて、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225が、第1軸角度、第2軸角度、第3軸角度をそれぞれ抽出する。
FIG. 19 is a histogram that visually represents an example of the frequency distribution of angles formed by pairs of adjacent dots generated by the frequency distribution generation unit 222.
The frequency distribution data is generated in a range of 180 degrees (in the example of FIG. 19, from −90 degrees to +90 degrees). Using this frequency distribution data, the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225 extract the first axis angle, the second axis angle, and the third axis angle, respectively. To do.

第1軸角度抽出部223は、度数分布生成部222により生成された度数分布データに基づき、最大頻度の角度を第1軸角度として抽出する。最大頻度の角度は、次のようにして求まる。
第1軸角度抽出部223は、まず、出現度数が最大である角度を検出する。そして、検出した角度を中心とする一定の範囲(以下、対象範囲)で、出現度数に基づく平均角度を計算する。算出された角度が最大頻度の角度であり、第1軸角度となる。平均角度は、対象範囲の角度ごとに出現度数を乗算した値を加算し、総出現度数(対象範囲内の出現度数を全て加算した値)で除算した値である。
The first axis angle extraction unit 223 extracts the angle of the maximum frequency as the first axis angle based on the frequency distribution data generated by the frequency distribution generation unit 222. The angle of the maximum frequency is obtained as follows.
The first axis angle extraction unit 223 first detects an angle having the maximum appearance frequency. Then, an average angle based on the appearance frequency is calculated in a certain range centered on the detected angle (hereinafter, target range). The calculated angle is the angle with the highest frequency and is the first axis angle. The average angle is a value obtained by adding a value obtained by multiplying the appearance frequency for each angle of the target range and dividing by the total appearance frequency (a value obtained by adding all the appearance frequencies in the target range).

例えば、出現度数が最大の角度を10度、対象範囲を−2度から+2度までの範囲とすると、8度から12度の範囲で平均角度の計算が行われる。また例えば、この範囲において、8度の出現度数を10、9度の出現度数を20、10度の出現度数を100、11度の出現度数を50、12度の出現度数を40とすると、平均角度は、下記の計算により10.4度となる。

(8×10+9×20+10×100+11×50+12×40)/(10+20+100+50+40)=10.4
For example, assuming that the angle having the highest appearance frequency is 10 degrees and the target range is a range from −2 degrees to +2 degrees, the average angle is calculated in the range of 8 degrees to 12 degrees. Also, for example, in this range, if the appearance frequency of 8 degrees is 10, the appearance frequency of 9 degrees is 20, the appearance frequency of 10 degrees is 100, the appearance frequency of 11 degrees is 50, and the appearance frequency of 12 degrees is 40, the average The angle is 10.4 degrees according to the following calculation.

(8 × 10 + 9 × 20 + 10 × 100 + 11 × 50 + 12 × 40) / (10 + 20 + 100 + 50 + 40) = 10.4

第2軸角度抽出部224は、第1軸角度抽出部223により抽出された第1軸角度から一定の角度だけ遷移(オフセット)させた角度(以下、基準角度)を想定し、その基準角度を中心とする一定の範囲内で最大頻度の角度を第2軸角度として抽出する。そして、第1軸角度の算出と同様に、所定の対象範囲で出現頻度に基づく平均角度を算出し、それを第2軸角度とする。ここで、第1軸角度と基準角度とがなす遷移角度は、ドット本来の配列に基づいて設定される。例えば、図3に示した単位符号パターンの場合、90度である。最大頻度の角度の計算方法は、第1軸角度の場合と同様である。基準角度を含む一定の範囲は、任意に定めて良いが、第2軸角度の検出可否や復号部300による復号成否の履歴に基づいて定めても良い。   The second axis angle extraction unit 224 assumes an angle (hereinafter referred to as a reference angle) obtained by making a transition (offset) by a certain angle from the first axis angle extracted by the first axis angle extraction unit 223, and determines the reference angle. The angle with the highest frequency is extracted as the second axis angle within a certain range as the center. Then, similarly to the calculation of the first axis angle, an average angle based on the appearance frequency is calculated in a predetermined target range, and is set as the second axis angle. Here, the transition angle formed by the first axis angle and the reference angle is set based on the original arrangement of dots. For example, the unit code pattern shown in FIG. 3 is 90 degrees. The calculation method of the maximum frequency angle is the same as in the case of the first axis angle. The fixed range including the reference angle may be arbitrarily determined, but may be determined based on whether or not the second axis angle can be detected and the history of decoding success / failure by the decoding unit 300.

第3軸角度抽出部225は、基準角度に対して第2軸角度と対称な角度を中心とする一定の範囲内で、最大頻度の角度を第3軸角度として抽出する。そして、所定の対象範囲で出現頻度に基づく平均角度を算出し、それを第3軸角度とする。例えば、基準角度が100度、第2軸角度が80度である場合、基準角度に対して第2軸角度と対称な角度は、120度である。この角度を含む一定の範囲は、任意に定めて良いが、第2軸角度の検出可否や復号部300による復号成否の履歴に基づいて定めても良い。また、最大頻度の角度の計算方法は、第1軸角度の場合と同様である。   The third axis angle extraction unit 225 extracts the angle with the highest frequency as the third axis angle within a certain range centered on an angle symmetrical to the second axis angle with respect to the reference angle. Then, an average angle based on the appearance frequency is calculated in a predetermined target range, and is set as the third axis angle. For example, when the reference angle is 100 degrees and the second axis angle is 80 degrees, the angle symmetrical to the second axis angle with respect to the reference angle is 120 degrees. The fixed range including this angle may be arbitrarily determined, but may be determined based on whether or not the second axis angle can be detected and the history of decoding success / failure by the decoding unit 300. The calculation method of the maximum frequency angle is the same as in the case of the first axis angle.

図20は、度数分布生成部222、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225による第1軸角度、第2軸角度、第3軸角度の抽出処理の流れを説明するフローチャートである。
図20に示すように、まず、度数分布生成部222が、各近接ドット対を順次対象として、以下のループ処理を実行する。
FIG. 20 illustrates extraction of the first axis angle, the second axis angle, and the third axis angle by the frequency distribution generation unit 222, the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225. It is a flowchart explaining the flow of a process.
As shown in FIG. 20, first, the frequency distribution generation unit 222 executes the following loop processing for each adjacent dot pair sequentially.

度数分布生成部222は、まず、近接ドット対の2つのドットの座標(X1,Y1)、(X2,Y2)を取得し(ステップ2001)、この近接ドット対がなす角度θを、下式により計算する(ステップ2002)。そして、得られた角度θの、度数分布データの度数を1加算する(ステップ2003)。

θ=tan-1{(Y1−Y2)/(X1−X2)}
First, the frequency distribution generation unit 222 acquires the coordinates (X1, Y1) and (X2, Y2) of the two dots of the adjacent dot pair (step 2001), and calculates the angle θ formed by the adjacent dot pair by the following equation: Calculate (step 2002). Then, 1 is added to the frequency of the frequency distribution data of the obtained angle θ (step 2003).

θ = tan −1 {(Y1-Y2) / (X1-X2)}

全ての近接ドット対に対してステップ2001〜2003の処理が行われると、次に第1軸角度抽出部223が、生成された度数分布データに基づいて、第1軸角度を抽出する(ステップ2004)。また、第1軸角度に沿ったドット間の基準間隔を算出する(ステップ2005)。なお、基準間隔およびその検出方法の詳細は後述する。   Once the processing of steps 2001 to 2003 has been performed for all adjacent dot pairs, the first axis angle extraction unit 223 next extracts the first axis angle based on the generated frequency distribution data (step 2004). ). Further, a reference interval between dots along the first axis angle is calculated (step 2005). The details of the reference interval and its detection method will be described later.

次に、第2軸角度抽出部224が、度数分布データおよび第1軸角度に基づいて、第2軸角度を抽出し(ステップ2006)、第2軸角度に沿ったドット間の基準間隔を算出する(ステップ2007)。さらに、第3軸角度抽出部225が、度数分布データ、基準角度および第2軸角度に基づいて、第3軸角度を抽出し(ステップ2008)、第3軸角度に沿ったドット間の基準間隔を算出する(ステップ2009)。   Next, the second axis angle extraction unit 224 extracts the second axis angle based on the frequency distribution data and the first axis angle (step 2006), and calculates a reference interval between dots along the second axis angle. (Step 2007). Further, the third axis angle extraction unit 225 extracts the third axis angle based on the frequency distribution data, the reference angle, and the second axis angle (step 2008), and the reference interval between dots along the third axis angle. Is calculated (step 2009).

図21は、抽出された3方向の角度のイメージを示す図である。
図21(a)に示すように並ぶドットが検出され、図21(b)に示すように第1軸角度が抽出されたものとする。この第1軸角度に対して90度オフセットした基準角度を挟んで、第2軸角度と第3軸角度とが抽出されている。
FIG. 21 is a diagram showing an image of the extracted angles in the three directions.
Assume that the dots arranged as shown in FIG. 21A are detected and the first axis angle is extracted as shown in FIG. The second axis angle and the third axis angle are extracted with a reference angle offset by 90 degrees with respect to the first axis angle.

<整列角度の特定方法>
次に、角度特定部226による整列角度の特定方法について詳細に説明する。
角度特定部226は、度数分布生成部222、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225により抽出された第1軸角度、第2軸角度、第3軸角度に基づき、ドットの整列角度を特定し出力する。具体的には、ドット本来の配列の方向に対応する2方向のドットの整列方向(図14ではX軸およびY軸と記載)の角度が特定される。この整列角度の特定は、以下の手順で行われる。
<Identification method of alignment angle>
Next, a method for specifying the alignment angle by the angle specifying unit 226 will be described in detail.
The angle specifying unit 226 includes a first axis angle, a second axis angle, a first axis angle extracted by the frequency distribution generation unit 222, the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225. Based on the triaxial angle, the dot alignment angle is specified and output. Specifically, the angles of the two dot alignment directions (referred to as X axis and Y axis in FIG. 14) corresponding to the original dot arrangement direction are specified. This alignment angle is specified by the following procedure.

角度特定部226は、まず、第1軸角度、第2軸角度、第3軸角度と、直前の画像フレーム(以下、前フレームと呼ぶ)に対する復号部300による復号の成否の情報を取得する。前フレームに対する復号が成功した場合、角度特定部226は、第1軸角度、第2軸角度、第3軸角度のうち、前フレームにおいて特定した整列角度に近い2つを選んで整列角度とする。前フレームと現フレームとは連続的に読み取られているため、適切な整列角度は大きく変わらないと考えられる。ただし、画像処理装置10がペン・デバイスである場合、撮像部100と紙面との位置関係が随時変化する。そこで、前フレームにおいて特定した整列角度と同一ではなく、近い角度が選ばれる。   First, the angle specifying unit 226 acquires the first axis angle, the second axis angle, the third axis angle, and information on the success or failure of decoding by the decoding unit 300 with respect to the immediately preceding image frame (hereinafter referred to as the previous frame). When decoding for the previous frame is successful, the angle specifying unit 226 selects two of the first axis angle, the second axis angle, and the third axis angle that are close to the alignment angle specified in the previous frame as the alignment angle. . Since the previous frame and the current frame are read continuously, it is considered that the appropriate alignment angle does not change greatly. However, when the image processing apparatus 10 is a pen device, the positional relationship between the imaging unit 100 and the paper surface changes as needed. Therefore, a close angle is selected that is not the same as the alignment angle specified in the previous frame.

前フレームに対する復号が失敗した場合、角度特定部226は、例えば次のようにして2方向の整列角度を特定する。
第1軸角度、第2軸角度、第3軸角度の全てが抽出されている場合、第1軸角度と、第2軸角度または第3軸角度のうちで基準角度に近い方とを選び、整列角度とする。
第3軸角度が抽出されなかった場合、角度特定部226は、第1軸角度と第2軸角度とを選び、整列角度とする。第3軸角度が抽出されない場合とは、度数分布データにおいて、基準角度に対して第2軸角度と対称な角度を中心とする一定の範囲内に出現度数の多い角度が存在しない場合、第2軸角度と基準角度とが一致している場合などである。
また、第2軸角度も抽出されなかった場合、角度特定部226は、第1軸角度と、第1軸角度に対して一定角度オフセットした基準角度とを整列角度とする。第2軸角度が抽出されない場合とは、度数分布データにおいて、基準角度を中心とする一定の範囲に出現度数の多い角度が存在しない場合などである。
When decoding for the previous frame fails, the angle specifying unit 226 specifies the alignment angle in two directions as follows, for example.
If all of the first axis angle, the second axis angle, and the third axis angle have been extracted, select the first axis angle and the second axis angle or the third axis angle that is closer to the reference angle, The alignment angle.
When the third axis angle is not extracted, the angle specifying unit 226 selects the first axis angle and the second axis angle and sets it as the alignment angle. The case where the third axis angle is not extracted means that, in the frequency distribution data, when there is no angle having a high appearance frequency within a certain range centered on an angle symmetrical to the second axis angle with respect to the reference angle, This is the case when the shaft angle and the reference angle are the same.
When the second axis angle is not extracted, the angle specifying unit 226 sets the first axis angle and a reference angle offset by a certain angle with respect to the first axis angle as the alignment angle. The case where the second axis angle is not extracted is a case where, in the frequency distribution data, there is no angle having a high appearance frequency in a certain range centered on the reference angle.

さらに、角度特定部226は、所定の画像フレームで復号に失敗した場合に、次の画像フレームにおける整列角度として、復号に失敗した画像フレームとは異なる角度を選ぶようにしても良い。具体的には例えば、第1軸角度と第2軸角度を整列角度として復号に失敗した場合に、次の画像フレームでは、第1軸角度と第3軸角度とを整列角度とする、第2軸角度と第3軸角度とを整列角度とする、等である。   Furthermore, when decoding fails in a predetermined image frame, the angle specifying unit 226 may select an angle different from that of the image frame that has failed in decoding as the alignment angle in the next image frame. Specifically, for example, when decoding fails using the first axis angle and the second axis angle as the alignment angles, in the next image frame, the first axis angle and the third axis angle are set as the alignment angles. The axis angle and the third axis angle are set as the alignment angle, and so on.

<基準間隔の算出方法>
次に、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225による基準間隔の算出方法について説明する。
基準間隔とは、一定の方向に沿って並ぶ近接ドット対におけるドット間距離の平均値である。ただし、ドット間距離が突出して大きい近接ドット対を排除するため、一定の閾値(最大ドット間距離)を設け、ドット間距離がこの閾値以下である近接ドット対に関して、平均値を計算する。この閾値は、例えば、次のようにして決定される。
<Calculation method of reference interval>
Next, a method for calculating a reference interval by the first axis angle extraction unit 223, the second axis angle extraction unit 224, and the third axis angle extraction unit 225 will be described.
The reference interval is an average value of inter-dot distances in adjacent dot pairs arranged along a certain direction. However, in order to eliminate the proximity dot pairs with a large inter-dot distance protruding, a certain threshold value (maximum inter-dot distance) is provided, and an average value is calculated for the proximity dot pairs whose inter-dot distance is equal to or less than this threshold value. This threshold is determined as follows, for example.

まず、度数分布生成部222が、近接ドット対検出部221により検出された近接ドット対のドット間距離の度数分布データを生成する。この度数分布データは、近接ドット対のドット間距離の値ごとに、その出現度数を積算したデータである。そして、出現度数が最大であるドット間距離よりも若干長い距離を閾値とする。図22に、ドット間距離の度数分布の例を視覚的に表現したヒストグラムを示す。図22において、出現頻度最大のドット間距離よりも若干長い距離に閾値が設定されている。   First, the frequency distribution generation unit 222 generates frequency distribution data of the inter-dot distances of the adjacent dot pairs detected by the adjacent dot pair detection unit 221. The frequency distribution data is data obtained by integrating the appearance frequency for each value of the inter-dot distance of the adjacent dot pair. A distance slightly longer than the inter-dot distance where the appearance frequency is the maximum is set as a threshold value. FIG. 22 shows a histogram that visually represents an example of the frequency distribution of the inter-dot distance. In FIG. 22, the threshold is set to a distance slightly longer than the inter-dot distance with the maximum appearance frequency.

第1軸角度抽出部223は、第1軸角度に沿って並ぶ近接ドット対のうち、ドット間距離が上記のようにして求めた閾値以下のものを抽出する。そして、ドット間距離の平均値を計算し、第1軸方向のドットの基準間隔とする。なお、各種の誤差を考慮し、近接ドット対がなす角度は、第1軸角度に対して一定の幅(−α度から+α度)を含むものとする。すなわち、近接ドット対がなす角度が第1基準角度±αである近接ドット対が、第1軸角度に沿って並ぶ近接ドット対である。   The first axis angle extraction unit 223 extracts a pair of adjacent dots arranged along the first axis angle that has an inter-dot distance equal to or less than the threshold value obtained as described above. Then, the average value of the inter-dot distance is calculated and set as the reference interval of the dots in the first axis direction. In consideration of various errors, the angle formed by the adjacent dot pair includes a certain width (−α degrees to + α degrees) with respect to the first axis angle. That is, the adjacent dot pair whose angle formed by the adjacent dot pair is the first reference angle ± α is the adjacent dot pair arranged along the first axis angle.

同様にして、第2軸角度抽出部224は、第2軸角度に沿って並ぶ近接ドット対のうち、ドット間距離が上記のようにして求めた閾値以下のものを抽出し、第2軸方向のドットの基準間隔を算出する。また、第3軸角度抽出部225は、第3軸角度に沿って並ぶ近接ドット対のうち、ドット間距離が上記のようにして求めた閾値以下のものを抽出し、第3軸方向のドットの基準間隔を算出する。   Similarly, the second axis angle extraction unit 224 extracts a pair of adjacent dots arranged along the second axis angle, in which the inter-dot distance is equal to or less than the threshold obtained as described above, and the second axis direction The dot reference interval is calculated. Further, the third axis angle extraction unit 225 extracts a pair of adjacent dots arranged along the third axis angle that has a dot-to-dot distance equal to or less than the threshold value obtained as described above. The reference interval is calculated.

角度特定部226は、第1軸角度抽出部223、第2軸角度抽出部224、第3軸角度抽出部225から各々の方向の基準間隔を取得する。そして、整列角度として特定された方向(図14のX軸およびY軸)の基準間隔を選択し、整列角度と共に出力する。この整列角度および整列角度における基準間隔の情報は、同期化部230において同期化を行うための同期ラインの特定に用いられる。   The angle specifying unit 226 acquires a reference interval in each direction from the first axis angle extracting unit 223, the second axis angle extracting unit 224, and the third axis angle extracting unit 225. Then, a reference interval in the direction (X axis and Y axis in FIG. 14) specified as the alignment angle is selected and output together with the alignment angle. The alignment angle and the information on the reference interval at the alignment angle are used by the synchronization unit 230 to specify a synchronization line for synchronization.

<同期化部の機能>
次に、同期化部230の機能についてさらに詳細に説明する。
図23は、同期化部230の機能構成を示す図である。
同期化部230は、前処理として同期原点および同期基準角度を決定する同期原点決定部231および同期基準角度決定部232と、決定された同期原点および同期基準角度に基づいて同期化処理を行うライン同期部233とを備える。また、同期化部230は、同期結果に基づいて2次元ビット配列を生成するビット配列生成部234を備える。図23に示すように、同期化部230には、位置検出部210により検出されたドットの画像フレーム上での位置情報(XY座標値)と、角度検出部220により検出されたドットの整列角度(X軸およびY軸)および基準間隔とが供給される。
<Function of the synchronization unit>
Next, the function of the synchronization unit 230 will be described in more detail.
FIG. 23 is a diagram illustrating a functional configuration of the synchronization unit 230.
The synchronization unit 230 performs synchronization processing based on the determined synchronization origin and synchronization reference angle, and the synchronization origin determination unit 231 and the synchronization reference angle determination unit 232 that determine the synchronization origin and the synchronization reference angle as preprocessing. And a synchronization unit 233. The synchronization unit 230 includes a bit array generation unit 234 that generates a two-dimensional bit array based on the synchronization result. As illustrated in FIG. 23, the synchronization unit 230 includes position information (XY coordinate values) on the image frame of the dots detected by the position detection unit 210 and the dot alignment angle detected by the angle detection unit 220. (X axis and Y axis) and a reference interval are supplied.

同期原点決定部231は、位置検出部210により検出されたドットの画像フレーム上での位置情報(XY座標値)に基づき、同期を開始する同期原点を決定する。同期原点には、位置検出部210により検出された実際のドットの1つが割り当てられる。そして、同期原点は、2次元ビット配列の中心となる。同期原点の具体的な決定方法については後述する。   The synchronization origin determining unit 231 determines a synchronization origin for starting synchronization based on the position information (XY coordinate values) of the dots detected by the position detection unit 210 on the image frame. One of the actual dots detected by the position detector 210 is assigned to the synchronization origin. The synchronization origin is the center of the two-dimensional bit array. A specific method for determining the synchronization origin will be described later.

同期基準角度決定部232は、角度検出部220により検出されたドットの整列角度(X軸およびY軸)および基準間隔に基づき、同期基準角度を決定する。同期基準角度とは、同期原点で交差するX軸およびY軸の回転角度である。X軸およびY軸の方向は、理想的には角度検出部220により検出されたドットの整列角度に一致する。しかし、角度検出部220では、近接ドット対のドット間隔という微小な距離を用いて角度を検出した。そこで、同期基準角度決定部232は、この整列角度に対して、さらに多くのドットの位置関係を用いた巨視的なスケールでの補正を行う。これにより、X軸およびY軸の回転角度の精度が向上する。同期基準角度としてのX軸およびY軸の回転角度の具体的な決定方法については後述する。   The synchronization reference angle determination unit 232 determines the synchronization reference angle based on the dot alignment angles (X axis and Y axis) detected by the angle detection unit 220 and the reference interval. The synchronization reference angle is the rotation angle of the X axis and the Y axis that intersect at the synchronization origin. The directions of the X axis and the Y axis ideally coincide with the dot alignment angle detected by the angle detection unit 220. However, the angle detection unit 220 detects the angle using a minute distance that is a dot interval between adjacent dot pairs. Therefore, the synchronization reference angle determination unit 232 performs correction on a macroscopic scale using the positional relationship of more dots with respect to the alignment angle. Thereby, the accuracy of the rotation angle of the X axis and the Y axis is improved. A specific method for determining the rotation angle of the X axis and the Y axis as the synchronization reference angle will be described later.

ライン同期部233は、同期原点から外側へ、ライン(格子線)ごとの同期を取りながら順に格子線を引くことにより、同期用の格子を生成する。これにより、予め用意された固定的な格子ではなく、撮像画像の歪みにも個別に対応した格子が動的に生成される。格子の具体的な生成方法については後述する。   The line synchronization unit 233 generates a synchronization grid by sequentially drawing grid lines while synchronizing each line (lattice line) from the synchronization origin to the outside. As a result, not a fixed grid prepared in advance, but a grid that individually corresponds to the distortion of the captured image is dynamically generated. A specific method for generating the lattice will be described later.

ビット配列生成部234は、ライン同期部233により生成された格子に基づき、2次元のビット配列を生成する。具体的には、ビット配列は、格子点上にドットが有る場合には1を、ドットが無い場合には0を配置することにより生成される。なお、撮像部100の光学系において、光を誘導する鏡の数によっては、撮像画像が反転(いわゆる鏡像反転)している場合がある。この場合、ビット配列生成部234は、生成したビット配列を反転させて出力する。   The bit array generation unit 234 generates a two-dimensional bit array based on the lattice generated by the line synchronization unit 233. Specifically, the bit arrangement is generated by arranging 1 when there is a dot on the grid point and 0 when there is no dot. In the optical system of the imaging unit 100, the captured image may be inverted (so-called mirror image inversion) depending on the number of mirrors that guide light. In this case, the bit array generation unit 234 inverts the generated bit array and outputs the result.

図24は、同期化部230による処理の全体的な流れを示すフローチャートである。
図24に示すように、同期化部230において、まず同期原点決定部231が、同期原点を決定する(ステップ2401)。次に、決定された同期原点に基づいて、同期基準角度決定部232が、2方向(X軸方向およびY軸方向)の同期基準角度を決定する(ステップ2402、2403)。なお、2方向の同期基準角度の決定順は、図24に示す順番に限定されない。
FIG. 24 is a flowchart showing the overall flow of processing by the synchronization unit 230.
As shown in FIG. 24, in the synchronization unit 230, the synchronization origin determining unit 231 first determines the synchronization origin (step 2401). Next, based on the determined synchronization origin, the synchronization reference angle determination unit 232 determines synchronization reference angles in two directions (X-axis direction and Y-axis direction) (steps 2402 and 2403). Note that the order of determining the synchronization reference angles in the two directions is not limited to the order shown in FIG.

次に、決定された同期原点および同期基準角度に基づいて、ライン同期部233が、4方向(X軸のプラス方向およびマイナス方向、Y軸のプラス方向およびマイナス方向)にライン同期を行う(ステップ2404〜2407)。なお、4方向のライン同期の実行順は、図24に示す順番に限定されない。
最後に、ビット配列生成部234が、ライン同期によって生成された同期用の格子を用いて、ドット配列から2次元のビット配列を生成する(ステップ2408)。
Next, on the basis of the determined synchronization origin and synchronization reference angle, the line synchronization unit 233 performs line synchronization in four directions (X-axis positive and negative directions, Y-axis positive and negative directions) (steps). 2404-1407). Note that the execution order of line synchronization in the four directions is not limited to the order shown in FIG.
Finally, the bit array generation unit 234 generates a two-dimensional bit array from the dot array using the synchronization grid generated by line synchronization (step 2408).

<同期原点の決定>
次に、同期原点決定部231による同期原点の決定方法および同期基準角度決定部232による同期基準角度の決定方法について詳細に説明する。
図25は、同期原点決定部231による同期原点の決定方法を説明する図である。
同期原点決定部231は、まず、位置検出部210から取得した位置情報に基づき、検出された複数のドットの重心位置の座標を計算する。重心位置の座標は、全てのドットの座標値を、X座標およびY座標についてそれぞれ加算し、ドットの数で除算することによって得られる。図25(a)において、白丸(○)で示した場所が重心位置であるものとする。
<Determining the synchronization origin>
Next, a method for determining the synchronization origin by the synchronization origin determination unit 231 and a method for determining the synchronization reference angle by the synchronization reference angle determination unit 232 will be described in detail.
FIG. 25 is a diagram for explaining a method of determining the synchronization origin by the synchronization origin determination unit 231.
First, the synchronization origin determination unit 231 calculates the coordinates of the barycentric positions of a plurality of detected dots based on the position information acquired from the position detection unit 210. The coordinates of the barycentric position are obtained by adding the coordinate values of all the dots for the X coordinate and the Y coordinate, respectively, and dividing by the number of dots. In FIG. 25A, the location indicated by a white circle (◯) is the center of gravity.

次に、同期原点決定部231は、重心位置から各ドットまでの距離を計算し、重心位置に最も近いドットを同期原点とする。図25(b)において、実線の矢印で指示したドットが、白丸(○)で示した重心位置から最も近い位置に存在する。したがって、このドットが同期原点となる。   Next, the synchronization origin determining unit 231 calculates the distance from the center of gravity position to each dot, and sets the dot closest to the center of gravity position as the synchronization origin. In FIG. 25B, the dot indicated by the solid line arrow is present at a position closest to the center of gravity indicated by a white circle (◯). Therefore, this dot becomes the synchronization origin.

図26は、同期原点決定部231による同期原点の決定処理を説明するフローチャートである。
図26を参照すると、同期原点決定部231は、まず、複数のドットの重心位置の座標を算出する(ステップ2601)。そして、各ドットを順次対象として、以下のループ処理を行う。
FIG. 26 is a flowchart for explaining the synchronization origin determination processing by the synchronization origin determination unit 231.
Referring to FIG. 26, the synchronization origin determining unit 231 first calculates the coordinates of the barycentric positions of a plurality of dots (step 2601). Then, the following loop processing is performed for each dot sequentially.

同期原点決定部231は、重心位置からドットまでの距離(dist)を算出する(ステップ2602)。そして、それまでに算出されている重心位置からドットまでの最小距離(dist_min)とステップ2602で算出した距離(dist)とを比較する。そして、距離(dist)の方が小さい場合は(ステップ2603でYes)、同期原点決定部231は、最小距離(dist_min)を距離(dist)の値に更新し、ドットの座標を保存する(ステップ2604)。一方、距離(dist)の方が大きい場合は(ステップ2603でNo)、現在の最小距離(dist_min)が、そのまま保持される。   The synchronization origin determination unit 231 calculates the distance (dist) from the center of gravity position to the dot (step 2602). Then, the minimum distance (dist_min) from the center of gravity position calculated so far to the dot is compared with the distance (dist) calculated in step 2602. If the distance (dist) is smaller (Yes in step 2603), the synchronization origin determination unit 231 updates the minimum distance (dist_min) to the value of the distance (dist) and stores the dot coordinates (step). 2604). On the other hand, when the distance (dist) is larger (No in step 2603), the current minimum distance (dist_min) is maintained as it is.

<同期基準角度の決定>
図27は、同期基準角度決定部232による同期基準角度の決定方法を説明する図である。
同期基準角度決定部232は、まず、ドットの座標値を、同期原点を原点とする相対座標に変換する(図27(a)参照)。そして、変換された座標値を、角度検出部220により検出された整列角度のうち、Y軸に関する整列角度にしたがって回転させる(図27(b)参照)。次に、同期基準角度決定部232は、同期原点を通る線を中心とする5本の縦格子線を生成し、図27(b)で得られた座標空間に重ねる(図27(c)参照)。ここで、縦格子線の間隔は、角度検出部220により検出されたドットの基準間隔である。縦格子線を5本としたのは、X軸方向へもある程度の幅を持たせてサンプルを得るためである。なお、生成する縦格子線の数は、5本に限定するものではない。
<Determination of synchronization reference angle>
FIG. 27 is a diagram for explaining a method for determining the synchronization reference angle by the synchronization reference angle determination unit 232.
First, the synchronization reference angle determination unit 232 converts the coordinate value of the dot into a relative coordinate having the synchronization origin as the origin (see FIG. 27A). Then, the converted coordinate value is rotated according to the alignment angle with respect to the Y axis among the alignment angles detected by the angle detection unit 220 (see FIG. 27B). Next, the synchronization reference angle determination unit 232 generates five vertical lattice lines centered on a line passing through the synchronization origin, and superimposes them on the coordinate space obtained in FIG. 27B (see FIG. 27C). ). Here, the interval between the vertical grid lines is a reference interval of dots detected by the angle detection unit 220. The reason for using five vertical grid lines is to obtain a sample with a certain width in the X-axis direction. Note that the number of vertical grid lines to be generated is not limited to five.

次に、同期基準角度決定部232は、5本の縦格子線の範囲内に存在するドットに関して、縦格子線からのずれ量を計算する。そして、縦格子線ごとに分散を計算し、算出値を積算する(図27(d)参照)。さらに、同期基準角度決定部232は、各ドットの座標値を、同期原点を中心として一定の範囲で回転させながら、所定の角度ごとに、同様の処理を行う。具体的には例えば、図27(b)で用いた整列角度に対して、−8度から+8度の範囲で0.5度ずつ回転させ、各角度において、縦格子線ごとの分散を求め、積算する。そして、分散の積算値が最小となるときの角度を、同期基準角度としてのY軸の回転角度とする。   Next, the synchronization reference angle determination unit 232 calculates the amount of deviation from the vertical grid lines for the dots existing within the range of the five vertical grid lines. Then, the variance is calculated for each vertical grid line, and the calculated values are integrated (see FIG. 27D). Further, the synchronization reference angle determination unit 232 performs the same processing for each predetermined angle while rotating the coordinate value of each dot within a certain range around the synchronization origin. Specifically, for example, the alignment angle used in FIG. 27B is rotated by 0.5 degrees within a range of −8 degrees to +8 degrees, and the dispersion for each vertical grid line is obtained at each angle. Accumulate. Then, the angle at which the integrated value of the dispersion becomes the minimum is set as the rotation angle of the Y axis as the synchronization reference angle.

同期基準角度決定部232は、X軸に対しても同様の処理を行い、同期基準角度としてのX軸の回転角度を決定する。なお、Y軸の回転角度とX軸の回転角度は、どちらを先に求めても良いし、並列に処理を行っても良い。また、X軸またはY軸のいずれかの処理を行う場合に、予め整列角度に90度を加算しておけば、処理が行われる座標空間を共通させることができるため、処理が軽くなる。   The synchronization reference angle determination unit 232 performs the same process on the X axis, and determines the rotation angle of the X axis as the synchronization reference angle. Note that either the Y-axis rotation angle or the X-axis rotation angle may be obtained first, or the processes may be performed in parallel. In addition, when processing for either the X axis or the Y axis is performed, if 90 degrees is added to the alignment angle in advance, the coordinate space in which the processing is performed can be made common, and the processing becomes light.

図28は、同期基準角度決定部232による同期基準角度の決定処理を説明するフローチャートである。なお、ここでは、角度検出部220により検出された整列角度のうちの1つに対する処理の動作を説明する。上述したように、他の整列角度に対しても同様の動作により同期基準角度が決定される。
同期基準角度決定部232は、角度検出部220により検出された所定の整列角度に対して一定の範囲で回転させながら、各々の角度(θ)を対象として、図28に示すループ処理を行う。このループ処理において、同期基準角度決定部232は、まず、ドット情報取得処理を行う(ステップ2801)。そして、得られたドット情報に基づき、分散積算処理を行う(ステップ2802)。
FIG. 28 is a flowchart for explaining the synchronization reference angle determination processing by the synchronization reference angle determination unit 232. Here, the processing operation for one of the alignment angles detected by the angle detection unit 220 will be described. As described above, the synchronization reference angle is determined by the same operation for other alignment angles.
The synchronization reference angle determination unit 232 performs the loop process shown in FIG. 28 for each angle (θ) while rotating within a certain range with respect to the predetermined alignment angle detected by the angle detection unit 220. In this loop processing, the synchronization reference angle determination unit 232 first performs dot information acquisition processing (step 2801). Based on the obtained dot information, a dispersion integration process is performed (step 2802).

図29は、ドット情報取得処理の詳細を説明するフローチャートである。
同期基準角度決定部232は、各ドットを順次対象として、図29に示すループ処理を実行する。このループ処理において、同期基準角度決定部232は、まず同期原点を中心として角度(θ)だけ回転させたドットのX座標(RotX)を取得する(ステップ2901)。次に、X座標(RotX)の縦格子線に対するずれ量(diff)を取得する(ステップ2902)。そして、得られたずれ量(diff)を保存し(ステップ2903)、処理対象となったドット(図27の例では5本の縦格子線の範囲内に存在するドット)の数を1加算する(ステップ2904)。
FIG. 29 is a flowchart illustrating details of the dot information acquisition process.
The synchronization reference angle determination unit 232 executes the loop process shown in FIG. 29 for each dot sequentially. In this loop process, the synchronization reference angle determination unit 232 first obtains the X coordinate (RotX) of the dot rotated by the angle (θ) about the synchronization origin (step 2901). Next, a shift amount (diff) with respect to the vertical lattice line of the X coordinate (RotX) is acquired (step 2902). Then, the obtained shift amount (diff) is stored (step 2903), and 1 is added to the number of dots to be processed (dots existing within the range of five vertical grid lines in the example of FIG. 27). (Step 2904).

図30は、分散積算処理の詳細を説明するフローチャートである。
同期基準角度決定部232は、各縦格子線を順次対象として、図30に示すループ処理を実行する。このループ処理において、同期基準角度決定部232は、まず、図29のステップ2904で加算されて最終的に得られたドット数(cnt)を取得する(ステップ3001)。そして、ドット数(cnt)が2未満である場合は、当該縦格子線に対する処理を終了する(ステップ3002でNo)。
FIG. 30 is a flowchart illustrating the details of the dispersion integration process.
The synchronization reference angle determination unit 232 executes the loop process shown in FIG. 30 for each vertical grid line sequentially. In this loop process, the synchronization reference angle determination unit 232 first acquires the number of dots (cnt) that is finally obtained by addition in step 2904 in FIG. 29 (step 3001). If the number of dots (cnt) is less than 2, the process for the vertical grid line ends (No in step 3002).

一方、ドット数(cnt)が2以上であった場合(ステップ3002でYes)、同期基準角度決定部232は、当該縦格子線に対応する各ドットを順次対象としながら、次のループ処理を実行する。まず、図29のステップ2902、2903で得られたドットのずれ量(diff)を取得し(ステップ3003)、積算する(ステップ3004)。また、ずれ量(diff)を二乗した値を積算する(ステップ3005)。   On the other hand, when the number of dots (cnt) is 2 or more (Yes in step 3002), the synchronization reference angle determination unit 232 executes the next loop process while sequentially targeting each dot corresponding to the vertical grid line. To do. First, the dot shift amounts (diff) obtained in steps 2902 and 2903 in FIG. 29 are acquired (step 3003) and integrated (step 3004). Further, a value obtained by squaring the deviation amount (diff) is integrated (step 3005).

ステップ3003〜3005のループ処理が済んだ後、同期基準角度決定部232は、当該縦格子線に関するずれ量の分散(var)を、下式により計算し(ステップ3006)、積算する(ステップ3007)。

var=(cnt×Sdiff2−Sdiff×Sdiff)/(cnt×cnt)

ただし、Sdiff2はステップ3005で求めたずれ量(diff)の二乗の積算値、Sdiffはステップ3004で求めたずれ量(diff)の積算値である。
After the loop processing in steps 3003 to 3005 is completed, the synchronization reference angle determination unit 232 calculates the variance (var) of the deviation amount related to the vertical grid line by the following equation (step 3006) and integrates (step 3007). .

var = (cnt × Sdiff 2 −Sdiff × Sdiff) / (cnt × cnt)

However, Sdiff 2 is an integrated value of the square of the deviation amount (diff) obtained in Step 3005, and Sdiff is an integrated value of the deviation amount (diff) obtained in Step 3004.

再び図28を参照すると、同期基準角度決定部232は、ステップ2802の分散積算処理によって得られた縦格子線に対するドットのずれ量の分散の積算値(Svar)と、それまでに得られた最小分散積算値(Svar_min)とを比較する。そして、分散積算値(Svar)の方が小さい場合は(ステップ2803でYes)、最小分散積算値(Svar_min)の値を分散積算値(Svar)の値に更新し(ステップ2804)、同期基準角度(θest)をこのときの角度(θ)に更新する(ステップ2805)。一方、分散積算値(Svar)が最小分散積算値(Svar_min)以上である場合は(ステップ2803でNo)、現在の最小分散積算値(Svar_min)および同期基準角度(θest)が、そのまま保持される。   Referring to FIG. 28 again, the synchronization reference angle determination unit 232 includes the integrated value (Svar) of the dispersion of the dot shift amount with respect to the vertical grid line obtained by the dispersion integration process in step 2802 and the minimum value obtained so far. The dispersion integrated value (Svar_min) is compared. If the dispersion integrated value (Svar) is smaller (Yes in step 2803), the value of the minimum dispersion integrated value (Svar_min) is updated to the value of the dispersion integrated value (Svar) (step 2804), and the synchronization reference angle (Θest) is updated to the angle (θ) at this time (step 2805). On the other hand, when the variance integrated value (Svar) is equal to or greater than the minimum variance integrated value (Svar_min) (No in step 2803), the current minimum variance integrated value (Svar_min) and the synchronization reference angle (θest) are held as they are. .

<ライン同期および格子の生成>
次に、ライン同期部233によるライン同期および格子の生成方法について詳細に説明する。
図31は、ライン同期部233によるライン同期の概念を説明する図である。
図31に示すように、ライン同期部233は、同期原点から、X軸のプラス方向およびマイナス方向、Y軸のプラス方向およびマイナス方向の合計4方向に、ライン(格子線)ごとの同期を取りながら順に格子線を引くことにより、同期用の格子を生成する。
<Line synchronization and grid generation>
Next, a line synchronization and lattice generation method by the line synchronization unit 233 will be described in detail.
FIG. 31 is a diagram for explaining the concept of line synchronization by the line synchronization unit 233.
As shown in FIG. 31, the line synchronization unit 233 performs synchronization for each line (lattice line) from the synchronization origin in a total of four directions including the plus and minus directions of the X axis and the plus and minus directions of the Y axis. A grid for synchronization is generated by drawing grid lines in order.

図32は、画像フレームに対して同期用のドットを重ねた様子を示す図である。
図32(a)のように画像に歪みがない場合は、直交格子のマス目が各ドットの位置に合うため、正常に同期化を行うことができる。一方、図32(b)のように画像に歪みがある場合は、予め設定された固定的な格子では、マス目が各ドットの位置に対応しないため、同期化を行うことができない。
そこで、本実施形態のライン同期部233は、同期原点から順に、実際のドットの位置に応じて傾きおよび間隔を補正しながらライン同期を行うことにより、画像に歪みがある場合でも対応可能な格子を動的に生成する。
FIG. 32 is a diagram illustrating a state in which synchronization dots are superimposed on an image frame.
When there is no distortion in the image as shown in FIG. 32A, since the grid of the orthogonal lattice matches the position of each dot, synchronization can be performed normally. On the other hand, when the image is distorted as shown in FIG. 32 (b), the grid cannot correspond to the position of each dot in the fixed grid set in advance, so that synchronization cannot be performed.
Therefore, the line synchronization unit 233 according to the present embodiment performs grid synchronization while correcting the inclination and the interval in accordance with the actual dot position in order from the synchronization origin, so that it is possible to cope with a case where the image is distorted. Is generated dynamically.

図33は、ライン同期部233による格子線の生成方法を説明する図である。
ライン同期部233は、まず、ドットの座標値を、所定の同期基準点を原点とする相対座標に変換する(図33(a)参照)。そして、変換された座標値を、Y軸に関する同期線角度にしたがって回転させる(図33(b)参照)。次に、ライン同期部233は、格子境界の内側に存在するドットを検出し(図33(c)参照)、格子線の位置と格子境界内のドットの座標値とを保存する(図33(d)参照)。
FIG. 33 is a diagram for explaining a method of generating a lattice line by the line synchronization unit 233.
First, the line synchronization unit 233 converts the coordinate value of the dot into a relative coordinate having a predetermined synchronization reference point as the origin (see FIG. 33A). Then, the converted coordinate values are rotated in accordance with the synchronization line angle with respect to the Y axis (see FIG. 33B). Next, the line synchronization unit 233 detects dots existing inside the lattice boundary (see FIG. 33C), and stores the positions of the lattice lines and the coordinate values of the dots within the lattice boundary (FIG. 33 ( d)).

ここで、同期基準点とは、個々の格子線を生成する際の位置の基準となる点である。初期的には同期原点決定部231により決定された同期原点が同期基準点となり、格子線が生成されるのに伴って、次の格子線のための同期基準点が生成される。この同期基準点は、例えばY軸に沿った格子線が生成される際には、同期原点を通るX軸上に生成される(すなわち、同期基準点は、格子線の切片である)。新たに生成される同期基準点の位置は、直前に生成された格子線の最終的な位置に応じて決定される。   Here, the synchronization reference point is a point serving as a position reference when generating each lattice line. Initially, the synchronization origin determined by the synchronization origin determination unit 231 becomes the synchronization reference point, and as the grid line is generated, the synchronization reference point for the next grid line is generated. For example, when a grid line along the Y axis is generated, the synchronization reference point is generated on the X axis passing through the synchronization origin (that is, the synchronization reference point is an intercept of the grid line). The position of the newly generated synchronization reference point is determined according to the final position of the grid line generated immediately before.

新たに生成された同期基準点と直前に生成された格子線における同期基準点との間の距離を同期間隔と呼ぶ。同期間隔は、初期的には角度検出部220により算出された基準間隔が用いられる。そして、格子線が生成されるたびに、最後に生成された格子線における同期基準点と直前に生成された格子線における同期基準点との間隔に更新される。   The distance between the newly generated synchronization reference point and the synchronization reference point in the lattice line generated immediately before is called a synchronization interval. Initially, the reference interval calculated by the angle detector 220 is used as the synchronization interval. Each time a grid line is generated, the interval is updated to the interval between the synchronization reference point in the last generated grid line and the synchronization reference point in the grid line generated immediately before.

また、同基線角度とは、現在の同期基準点に対して生成される格子線の傾きである。初期的には同期基準角度決定部232により決定された同期基準角度が同基線角度となり、新たに格子線が生成される際には、直前に生成された格子線の最終的な傾きが新たに生成される格子線の同基線角度となる。   The baseline angle is an inclination of a grid line generated with respect to the current synchronization reference point. Initially, the synchronization reference angle determined by the synchronization reference angle determination unit 232 becomes the same baseline angle, and when a new grid line is generated, the final inclination of the grid line generated immediately before is newly updated. This is the same baseline angle of the generated grid line.

また、格子境界とは、生成された格子線に対応するドットとその他のドットとを区切る仮想的な線である。図33(c)、(d)に示したように、格子境界に挟まれた帯状領域に存在するドットが、格子線に対応するドットとなる。格子線から格子境界までの距離は、直前に生成された格子線とその前に生成された格子線の位置に応じて決定される。   The grid boundary is a virtual line that divides a dot corresponding to the generated grid line from other dots. As shown in FIGS. 33 (c) and 33 (d), the dots present in the band-like region sandwiched between the lattice boundaries are the dots corresponding to the lattice lines. The distance from the lattice line to the lattice boundary is determined according to the lattice line generated immediately before and the position of the lattice line generated before that.

ライン同期部233は、上記のようにして格子線を生成した後、格子境界内のドットの位置に基づいて、生成した格子線の傾きおよび同期基準点の位置を補正する。同期基準点が補正されることにより、同期間隔も変更されることとなる。また、補正された最終的な格子線の傾きおよび同期基準点の位置(格子線の位置)に基づいて、上述したように、次に生成される格子線に関する同基線角度および同期間隔と、格子境界とが決定される。   After generating the grid lines as described above, the line synchronization unit 233 corrects the tilt of the generated grid lines and the position of the synchronization reference point based on the positions of the dots within the grid boundaries. By correcting the synchronization reference point, the synchronization interval is also changed. Further, based on the corrected inclination of the final grid line and the position of the synchronization reference point (grid line position), as described above, the same baseline angle and synchronization interval for the next generated grid line, and the grid A boundary is determined.

ライン同期部233は、格子線の位置と格子境界内のドットの位置とに基づいて回帰直線を計算し、格子線の補正を行う。本実施形態では、回帰直線の計算にRMA(Reduced Major Axis)回帰を用いることとする。RMA回帰によれば、回帰直線は、次式によって求められる。   The line synchronization unit 233 calculates a regression line based on the position of the grid line and the position of the dot within the grid boundary, and corrects the grid line. In the present embodiment, RMA (Reduced Major Axis) regression is used for calculating the regression line. According to RMA regression, the regression line is obtained by the following equation.

Figure 2009181347
ここで、σxは格子境界内のドットにおけるX座標の標準偏差であり、σyはY座標の標準偏差である。この回帰直線の傾きの符号は、相関関数の符号によって判定される。相関関数Rxyは、次式によって求められる。
Figure 2009181347
Here, σ x is the standard deviation of the X coordinate at the dots in the lattice boundary, and σ y is the standard deviation of the Y coordinate. The sign of the slope of the regression line is determined by the sign of the correlation function. The correlation function R xy is obtained by the following equation.

Figure 2009181347
なお、実際には、Rxyの分母(Sxy)は常に正なので、分子(Sxy)の符号によって回帰直線の傾きが判定されることとなる。
Figure 2009181347
In practice, since the denominator (S x S y ) of R xy is always positive, the slope of the regression line is determined by the sign of the numerator (S xy ).

図34は、格子線の補正によって同期基準点が変更され、同期間隔が補正される様子を示す図である。また、図34には、格子境界の決定方法も示されている。
まず、直前に生成された格子線における同期基準点A0から同期間隔P0の位置に同期基準点A1が生成され、この同期基準点A1を通る格子線および格子境界B1が設定される(図34(a))。この格子境界内のドットの位置に基づいて格子線が補正される。次に、格子線が補正されたことにより同期基準点A1が移動し、同期基準点A1’となる(図34(b))。このとき、同期基準点A0と補正後の同期基準点A1’との間の距離が、補正された新たな同期間隔P1である(図34(c))。
FIG. 34 is a diagram illustrating how the synchronization reference point is changed by correcting the grid line and the synchronization interval is corrected. FIG. 34 also shows a method for determining a lattice boundary.
First, the synchronization reference point A1 is generated at the position of the synchronization interval P0 from the synchronization reference point A0 in the lattice line generated immediately before, and the lattice line and the lattice boundary B1 passing through the synchronization reference point A1 are set (FIG. 34 ( a)). The grid lines are corrected based on the positions of the dots within the grid boundaries. Next, when the grid line is corrected, the synchronization reference point A1 moves to become the synchronization reference point A1 ′ (FIG. 34 (b)). At this time, the distance between the synchronization reference point A0 and the corrected synchronization reference point A1 ′ is the corrected new synchronization interval P1 (FIG. 34 (c)).

次に、同期基準点A0と補正前の同期基準点A1の中間点M1が計算され、補正後の同期基準点A1’から点M1までの距離が新たな格子境界B2とされる(図34(d))。そして、同期基準点A1’から同期間隔P1の位置に、次の同期基準点A2が生成され(図34(e))、この同期基準点A2を通る格子線および格子境界B2が設定される(図34(f))。   Next, an intermediate point M1 between the synchronization reference point A0 and the uncorrected synchronization reference point A1 is calculated, and the distance from the corrected synchronization reference point A1 ′ to the point M1 is set as a new grid boundary B2 (FIG. 34 ( d)). Then, the next synchronization reference point A2 is generated at the position of the synchronization interval P1 from the synchronization reference point A1 ′ (FIG. 34 (e)), and the lattice line and the lattice boundary B2 passing through the synchronization reference point A2 are set ( FIG. 34 (f)).

図35は、ライン同期部233の動作を示すフローチャートである。
ライン同期部233は、新たな格子線を引くたびに、この新たな格子線を対象として、図35に示すループ処理を実行する。このループ処理において、ライン同期部233は、まず格子境界内のドットの同期化処理を実行する(ステップ3501)。そして、格子境界内でドットが検出されたならば、同期線角度および同期間隔を補正し、次の格子線における格子境界を設定する(ステップ3502、3503)。
FIG. 35 is a flowchart showing the operation of the line synchronization unit 233.
Each time the line synchronization unit 233 draws a new grid line, the line synchronization unit 233 executes a loop process shown in FIG. 35 for the new grid line. In this loop processing, the line synchronization unit 233 first executes synchronization processing of dots within the lattice boundary (step 3501). If a dot is detected within the lattice boundary, the synchronization line angle and the synchronization interval are corrected, and the lattice boundary in the next lattice line is set (steps 3502 and 3503).

図36は、ドット同期化処理の詳細を説明するフローチャートである。
ライン同期部233は、各ドットを順次対象として、図36に示すループ処理を実行する。このループ処理において、ライン同期部233は、まず同期基準点(座標:(BaseX,BaseY))とドットとの間の距離(diffX,diffY)を計算する(ステップ3601)。次に、ライン同期部233は、同期基準点を中心として同期線角度だけ回転させたドットの位置(X軸方向同期時:RotX、Y軸方向同期時:RotY)を取得する(ステップ3602)。
FIG. 36 is a flowchart for explaining details of the dot synchronization processing.
The line synchronization unit 233 executes the loop process shown in FIG. 36 for each dot sequentially. In this loop process, the line synchronization unit 233 first calculates the distance (diffX, diffY) between the synchronization reference point (coordinates: (BaseX, BaseY)) and the dot (step 3601). Next, the line synchronization unit 233 obtains the position of the dot (X-axis direction synchronization: RotX, Y-axis direction synchronization: RotY) rotated by the synchronization line angle around the synchronization reference point (step 3602).

次に、ライン同期部233は、回転後のドットの位置が格子境界内か否かを判断する。格子境界内である場合(ステップ3603でYes)、ライン同期部233は、格子線番号(格子線の識別情報)および回転前のドットの座標(x,y)を保存し(ステップ3604、3605)、格子境界内に入ったドットの数をカウントアップする(ステップ3606)。一方、回転後のドットの位置が格子境界の外である場合(ステップ3603でNo)、ライン同期部233は、このドットを現在の格子線に関する処理から除外する。   Next, the line synchronization unit 233 determines whether the position of the dot after rotation is within the lattice boundary. If within the grid boundary (Yes in step 3603), the line synchronization unit 233 stores the grid line number (grating line identification information) and the coordinates (x, y) of the dot before rotation (steps 3604 and 3605). Then, the number of dots entering the grid boundary is counted up (step 3606). On the other hand, when the position of the dot after rotation is outside the grid boundary (No in step 3603), the line synchronization unit 233 excludes the dot from the process related to the current grid line.

図37は、同期線角度と同期間隔の補正処理および格子境界の設定処理の詳細を説明するフローチャートである。
ライン同期部233は、まず、格子境界内のドットの回転前の座標の平均(AveX,AveY)および分散(VarX,VarY)を取得する(ステップ3701)。そして、格子線の傾きである同期線角度(LineSlope)を下式により補正する(ステップ3702)。

LineSlope=sqrt(VarY/VarX)) (sqrtは平方根)

ここで、相関係数が負である場合は、同期線角度の傾きの符号を負に反転する(ステップ3703、3704)。
FIG. 37 is a flowchart for explaining the details of the synchronization line angle and synchronization interval correction processing and the lattice boundary setting processing.
First, the line synchronization unit 233 obtains the average (AveX, AveY) and variance (VarX, VarY) of the coordinates before the rotation of the dots in the lattice boundary (step 3701). Then, the synchronization line angle (LineSlope) that is the inclination of the lattice line is corrected by the following equation (step 3702).

LineSlope = sqrt (VarY / VarX)) (sqrt is the square root)

If the correlation coefficient is negative, the sign of the slope of the synchronization line angle is inverted to negative (steps 3703 and 3704).

次に、ライン同期部233は、格子線の切片である同期基準点(LineIntercept)を下式により補正する(ステップ3705)。

LineIntercept=AveY−LineSlope・AveX
Next, the line synchronization unit 233 corrects the synchronization reference point (LineIntercept) that is the intercept of the lattice line by the following equation (step 3705).

LineIntercept = AveY-LineSlope · AveX

次に、ライン同期部233は、次の格子線に関するライン同期処理における回転角度(図36のステップ3602参照)を、tan-1(LineSlope)により算出する(ステップ3706)。また、同期線角度の絶対値(IfAbsLineSlope)を求める(ステップ3707)。そして、ライン同期部233は、現在の処理がX軸方向の同期化であれば、同期基準点のX座標を補正し、Y軸方向の同期化であれば、同期基準点のY座標を補正する(ステップ3708、3709、3710)。同期基準点の補正は、下記の計算による。

X座標:BaseXnew=(y−LineIntercept)/LineSlope
Y座標:BaseYnew=LineSlope・X+LineIntercept
Next, the line synchronization unit 233 calculates a rotation angle (see step 3602 in FIG. 36) in the line synchronization process for the next lattice line by tan −1 (LineSlope) (step 3706). Further, the absolute value (IfAbsLineSlope) of the synchronization line angle is obtained (step 3707). The line synchronization unit 233 corrects the X coordinate of the synchronization reference point if the current process is synchronization in the X axis direction, and corrects the Y coordinate of the synchronization reference point if synchronization is in the Y axis direction. (Steps 3708, 3709, 3710). The correction of the synchronization reference point is based on the following calculation.

X coordinate: BaseX new = (y-LineIntercept) / LineSlope
Y coordinate: BaseY new = LineSlope · X + LineIntercept

次に、ライン同期部233は、補正した同期基準点の変位(diffX,diffY)を、次のように計算する(ステップ3711)。

diffX=BaseXnew−BaseX
diffY=BaseYnew−BaseY
Next, the line synchronization unit 233 calculates the corrected displacement (diffX, diffY) of the synchronization reference point as follows (step 3711).

diffX = BaseX new -BaseX
diffY = BaseY new −BaseY

さらに、ライン同期部233は、同期間隔(Pitch)を更新する(ステップ3712)。

Pitchnew=sqrt(diffX2+diffY2

また、次の格子線に関するライン同期処理における格子境界(BoundaryLimit)を補正する(ステップ3713)。

BoundaryLimit=Pitchnew−Pitch/2
Further, the line synchronization unit 233 updates the synchronization interval (Pitch) (step 3712).

Pitch new = sqrt (diffX 2 + diffY 2 )

In addition, the lattice boundary (BoundaryLimit) in the line synchronization processing for the next lattice line is corrected (step 3713).

BoundaryLimit = Pitch new -Pitch / 2

再び図35を参照すると、ライン同期部233は、図37で詳細を説明したステップ3503により補正され、更新された各値を用いて、次の格子線における同期基準点の位置(BaseXnext,BaseYnext)を算出する(ステップ3504)。

BaseXnext=BaseX+(Pitchnew・Cosθy+Pitchnew・Sinθy
BaseYnext=BaseY−(Pitchnew・Sinθx−Pitchnew・Cosθy

Referring to FIG. 35 again, the line synchronization unit 233 corrects the position of the synchronization reference point (BaseX next , BaseY on the next grid line) using each value corrected and updated in step 3503 described in detail in FIG. next ) is calculated (step 3504).

BaseX next = BaseX + (Pitch new · Cosθ y + Pitch new · Sinθ y )
BaseY next = BaseY− (Pitch new · Sinθ x −Pitch new · Cosθ y )

<ペン・デバイスの構成>
次に、本実施の形態における画像処理装置10の具体的なハードウェア構成について説明する。ここでは、画像処理装置10を実現するペン・デバイスの構成例について説明する。
図38は、ペン・デバイスの機構を示した図である。
図示するように、ペン・デバイス60は、ペン全体の動作を制御する制御回路61を備える。制御回路61は、入力画像から検出した符号画像を処理する画像処理部61aと、そこでの処理結果から識別情報及び座標情報を抽出するデータ処理部61bとを含む。また、特に図示しないが、制御回路61は、これら画像処理部61aおよびデータ処理部61bを動作させるためのプログラムを格納する不揮発性メモリとを含む。この制御回路61には、ペン・デバイス60による筆記動作をペンチップ69に加わる圧力によって検出する圧力センサ62が接続されている。また、媒体上に赤外光を照射する赤外LED63と、画像を入力する赤外CMOS64も接続されている。さらに、識別情報及び座標情報を記憶するための情報メモリ65と、外部装置と通信するための通信回路66と、ペンを駆動するためのバッテリ67と、ペンの識別情報(ペンID)を記憶するペンIDメモリ68も接続されている。
<Configuration of pen device>
Next, a specific hardware configuration of the image processing apparatus 10 in the present embodiment will be described. Here, a configuration example of a pen device that realizes the image processing apparatus 10 will be described.
FIG. 38 shows the mechanism of the pen device.
As illustrated, the pen device 60 includes a control circuit 61 that controls the operation of the entire pen. The control circuit 61 includes an image processing unit 61a that processes a code image detected from an input image, and a data processing unit 61b that extracts identification information and coordinate information from the processing result there. Although not particularly shown, the control circuit 61 includes a non-volatile memory that stores programs for operating the image processing unit 61a and the data processing unit 61b. The control circuit 61 is connected to a pressure sensor 62 that detects a writing operation by the pen device 60 by a pressure applied to the pen tip 69. Further, an infrared LED 63 that irradiates infrared light onto the medium and an infrared CMOS 64 that inputs an image are also connected. Further, an information memory 65 for storing identification information and coordinate information, a communication circuit 66 for communicating with an external device, a battery 67 for driving the pen, and pen identification information (pen ID) are stored. A pen ID memory 68 is also connected.

図9に示した画像処理装置10において、撮像部100は、例えば、図38の赤外CMOS64にて実現される。また、ドット解析部200は、例えば、図38の画像処理部61aにて実現される。さらに、復号部300は、例えば、図38のデータ処理部61bにて実現される。なお、画像処理装置10は、図38に示すようなペン・デバイス60の他、画像処理部61a又はデータ処理部61bにて実現される機能を、例えば、汎用のコンピュータで実現しても良い。   In the image processing apparatus 10 illustrated in FIG. 9, the imaging unit 100 is realized by, for example, the infrared CMOS 64 in FIG. 38. The dot analysis unit 200 is realized by, for example, the image processing unit 61a in FIG. Furthermore, the decoding unit 300 is realized by, for example, the data processing unit 61b in FIG. In addition to the pen device 60 as shown in FIG. 38, the image processing apparatus 10 may realize functions realized by the image processing unit 61a or the data processing unit 61b by, for example, a general-purpose computer.

画像処理部61aおよびデータ処理部61bの機能を実現するプログラムは、通信手段を介して提供したり、CD−ROM等の記録媒体に格納して提供したりすることができる。また、制御回路61に含まれる上述した不揮発性メモリに格納して提供しても良い。   Programs that realize the functions of the image processing unit 61a and the data processing unit 61b can be provided via communication means or stored in a recording medium such as a CD-ROM. Further, it may be provided by being stored in the above-described nonvolatile memory included in the control circuit 61.

本実施形態で用いられる単位符号パターン、情報ブロック、紙面(媒体)の関係を示す図である。It is a figure which shows the relationship between the unit code pattern used by this embodiment, an information block, and a paper surface (medium). mCn方式における単位符号パターンの例を示す図である。It is a figure which shows the example of the unit code pattern in a mCn system. 図2に示した単位符号パターンの種類を網羅的に示した図である。FIG. 3 is a diagram comprehensively showing types of unit code patterns shown in FIG. 2. 9C2方式における単位符号パターンとパターン値との対応を示す図である。It is a figure which shows a response | compatibility with the unit code pattern and pattern value in 9C2 system. 9C2方式における同期パターンの例を示す図である。It is a figure which shows the example of the synchronous pattern in 9C2 system. 情報ブロックの構成例を示す図である。It is a figure which shows the structural example of an information block. 本実施形態における識別情報と座標情報を表現するためのレイアウトの例を示す図である。It is a figure which shows the example of the layout for expressing the identification information and coordinate information in this embodiment. M系列を用いた座標情報の符号化の例を示す図である。It is a figure which shows the example of the encoding of the coordinate information using M series. 本実施形態の画像処理装置の機能構成例を示す図である。It is a figure which shows the function structural example of the image processing apparatus of this embodiment. 本実施形態のドット解析部および復号部による処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process by the dot analysis part and decoding part of this embodiment. 撮像画像の例を示す図であり、ドットの整列角度が0度の場合の撮像画像の例である。It is a figure which shows the example of a captured image, and is an example of a captured image in case the alignment angle of a dot is 0 degree | times. 撮像画像の例を示す図であり、ドットの整列角度が45度の場合の撮像画像の例である。It is a figure which shows the example of a captured image, and is an example of a captured image in case the alignment angle of a dot is 45 degree | times. 図11−1に対して画像の上方が奥に、下方が手前に傾いた状態の撮像画像を示す図である。It is a figure which shows the picked-up image of the state where the upper part of the image leaned back and the lower part leaned forward. 図11−2に対して画像の上方が奥に、下方が手前に傾いた状態の撮像画像を示す図である。It is a figure which shows the picked-up image of the state in which the upper part of the image leans back and FIG. 本実施形態の角度検出部の機能構成を示す図である。It is a figure which shows the function structure of the angle detection part of this embodiment. ドットが検出された画像から、近接ドット対が検出された様子を示す図である。It is a figure which shows a mode that the proximity | contact dot pair was detected from the image from which the dot was detected. 本実施形態における近接ドット対の検出方法の具体例を示す図である。It is a figure which shows the specific example of the detection method of the proximity | contact dot pair in this embodiment. 本実施形態の近接ドット対検出部による近接ドット対の検出処理の流れを説明するフローチャートである。It is a flowchart explaining the flow of the detection process of the proximity dot pair by the proximity dot pair detection part of this embodiment. 図17のステップ1707に示す近接ドット対の判別処理の詳細を説明するフローチャートである。FIG. 18 is a flowchart illustrating details of proximity dot pair determination processing shown in step 1707 of FIG. 17. FIG. 本実施形態の度数分布生成部により生成される近接ドット対がなす角度の度数分布の例を視覚的に表現したヒストグラムである。It is the histogram which expressed visually the example of the frequency distribution of the angle which the close dot pair produced | generated by the frequency distribution production | generation part of this embodiment makes. 本実施形態の度数分布生成部、第1軸角度抽出部、第2軸角度抽出部、第3軸角度抽出部による第1軸角度、第2軸角度、第3軸角度の抽出処理の流れを説明するフローチャートである。Flow of extraction processing of the first axis angle, the second axis angle, and the third axis angle by the frequency distribution generation unit, the first axis angle extraction unit, the second axis angle extraction unit, and the third axis angle extraction unit of the present embodiment. It is a flowchart to explain. 本実施形態で抽出された3方向の角度のイメージを示す図である。It is a figure which shows the image of the angle of 3 directions extracted by this embodiment. 本実施形態におけるドット間距離の度数分布の例を視覚的に表現したヒストグラムである。It is the histogram which expressed the example of frequency distribution of the distance between dots in this embodiment visually. 本実施形態の同期化部の機能構成を示す図である。It is a figure which shows the function structure of the synchronization part of this embodiment. 同期化部による処理の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of the process by a synchronizer. 本実施形態の同期原点決定部による同期原点の決定方法を説明する図である。It is a figure explaining the determination method of the synchronous origin by the synchronous origin determination part of this embodiment. 同期原点決定部による同期原点の決定処理を説明するフローチャートである。It is a flowchart explaining the determination process of the synchronous origin by a synchronous origin determination part. 本実施形態の同期基準角度決定部による同期基準角度の決定方法を説明する図である。It is a figure explaining the determination method of the synchronous reference angle by the synchronous reference angle determination part of this embodiment. 同期基準角度決定部による同期基準角度の決定処理を説明するフローチャートである。It is a flowchart explaining the determination process of the synchronous reference angle by a synchronous reference angle determination part. 同期基準角度決定部によるドット情報取得処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of the dot information acquisition process by a synchronous reference angle determination part. 同期基準角度決定部による分散積算処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of the dispersion | distribution integration process by a synchronous reference angle determination part. 本実施形態のライン同期部によるライン同期の概念を説明する図である。It is a figure explaining the concept of the line synchronization by the line synchronization part of this embodiment. 画像フレームに対して同期用のドットを重ねた様子を示す図である。It is a figure which shows a mode that the dot for a synchronization was piled up with respect to the image frame. ライン同期部による格子線の生成方法を説明する図である。It is a figure explaining the production | generation method of the lattice line by a line synchronizing part. 格子線の補正によって同期基準点が変更され、同期間隔が補正される様子を示す図である。It is a figure which shows a mode that a synchronous reference point is changed by correction | amendment of a lattice line, and a synchronous space | interval is correct | amended. ライン同期部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a line synchronizer. ドット同期化処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a dot synchronization process. 同期線角度と同期間隔の補正処理および格子境界の設定処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of the correction process of a synchronous line angle and a synchronous space | interval, and the setting process of a lattice boundary. 画像処理装置であるペン・デバイスの機構を示した図である。It is the figure which showed the mechanism of the pen device which is an image processing apparatus.

符号の説明Explanation of symbols

10…画像処理装置、100…撮像部、200…ドット解析部、210…位置検出部、220…角度検出部、230…同期化部、231…同期原点決定部、232…同期基準角度決定部、233…ライン同期部、234…ビット配列生成部、300…復号部 DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 100 ... Imaging part, 200 ... Dot analysis part, 210 ... Position detection part, 220 ... Angle detection part, 230 ... Synchronization part, 231 ... Synchronization origin determination part, 232 ... Synchronization reference angle determination part, 233: Line synchronization unit, 234: Bit array generation unit, 300: Decoding unit

Claims (14)

撮像装置により撮像された画像を走査し、単位画像を検出して位置を特定する検出部と、
前記検出部により検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成するライン同期部と、
前記ライン同期部により生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成するビット配列生成部と
を備えることを特徴とする画像処理装置。
A detection unit that scans an image captured by the imaging device, detects a unit image, and identifies a position;
Based on the position information of the unit image detected by the detection unit, a line synchronization unit that generates a synchronization grid by sequentially drawing grid lines from the synchronization origin according to the coordinate axis;
An image processing apparatus comprising: a bit array generation unit configured to generate a bit array based on the presence or absence of the unit image at a predetermined position on the image based on the lattice generated by the line synchronization unit.
前記ライン同期部は、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the line synchronization unit individually adapts each grid line to a position of the unit image associated with the grid line. 前記ライン同期部は、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項2記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the line synchronization unit corrects the inclination of each grid line according to the position of the unit image associated with the grid line. 前記ライン同期部は、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the line synchronization unit corrects the interval between the grid lines in accordance with the position of the unit image associated with the grid line. 前記ライン同期部により用いられる格子線の傾きおよび間隔の初期値は、前記単位画像のうち最も近い位置にある2つの単位画像の組み合わせにおける当該2つの単位画像の位置関係に基づいて決定されることを特徴とする請求項1に記載の画像処理装置。   The initial values of the grid line inclination and interval used by the line synchronization unit are determined based on the positional relationship between the two unit images in the combination of the two unit images located closest to the unit image. The image processing apparatus according to claim 1. 前記単位画像の組み合わせにおける前記2つの単位画像がなす角度を、前記同期原点を含む一定の範囲の前記単位画像の位置関係に基づいて補正することで、前記格子線の傾きの基準となる基準角度を決定する基準角度決定部をさらに備え、
前記ライン同期部は、前記基準角度決定部により決定された基準角度を前記格子線の傾きの初期値として用いることを特徴とする請求項5に記載の画像処理装置。
By correcting the angle formed by the two unit images in the unit image combination based on the positional relationship of the unit images in a certain range including the synchronization origin, a reference angle serving as a reference for the inclination of the grid line A reference angle determination unit for determining
The image processing apparatus according to claim 5, wherein the line synchronization unit uses the reference angle determined by the reference angle determination unit as an initial value of the inclination of the grid line.
単位画像が形成された媒体表面を撮像する撮像部と、
前記撮像部により撮像された画像から前記単位画像を検出して位置を特定する検出部と、
前記検出部により検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成するライン同期部と、
前記ライン同期部により生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成するビット配列生成部と
を備えることを特徴とするペン・デバイス。
An imaging unit for imaging the surface of the medium on which the unit image is formed;
A detection unit that detects the unit image from the image captured by the imaging unit and identifies the position;
Based on the position information of the unit image detected by the detection unit, a line synchronization unit that generates a synchronization grid by sequentially drawing grid lines from the synchronization origin according to the coordinate axis;
A pen device comprising: a bit array generation unit that generates a bit array in accordance with the presence or absence of the unit image at a predetermined position on the image based on the lattice generated by the line synchronization unit.
前記ライン同期部は、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させることを特徴とする請求項7に記載のペン・デバイス。   The pen device according to claim 7, wherein the line synchronization unit individually adapts each grid line to a position of the unit image associated with the grid line. 前記ライン同期部は、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項8に記載のペン・デバイス。   The pen device according to claim 8, wherein the line synchronization unit corrects the inclination of each grid line in accordance with the position of the unit image associated with the grid line. 前記ライン同期部は、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正することを特徴とする請求項8に記載のペン・デバイス。   The pen device according to claim 8, wherein the line synchronization unit corrects the interval between the grid lines in accordance with the position of the unit image associated with the grid line. コンピュータに、
撮像装置により撮像された画像を走査し、単位画像を検出して位置を特定する機能と、
検出された前記単位画像の位置情報に基づき、同期原点から座標軸に従って順に格子線を引いていくことで同期用の格子を生成する機能と、
生成された前記格子に基づき、前記画像上の所定の位置における前記単位画像の有無に応じてビット配列を生成する機能と
を実現させるためのプログラム。
On the computer,
A function of scanning an image picked up by an image pickup device, detecting a unit image, and specifying a position;
Based on the detected position information of the unit image, a function of generating a grid for synchronization by sequentially drawing grid lines from the synchronization origin according to the coordinate axis;
A program for realizing a function of generating a bit arrangement according to the presence or absence of the unit image at a predetermined position on the image based on the generated lattice.
前記格子を生成する機能では、各格子線を、当該格子線に対応付けられた前記単位画像の位置に個別に適合させて引く処理を、前記コンピュータに実行させることを特徴とする請求項11に記載のプログラム。   12. The function of generating the grid causes the computer to execute a process of drawing each grid line by individually adapting the grid line to the position of the unit image associated with the grid line. The listed program. 前記格子を生成する機能では、各格子線の傾きを、当該格子線に対応付けられた前記単位画像の位置に応じて補正する処理を、前記コンピュータに実行させることを特徴とする請求項12に記載のプログラム。   The function for generating the grid causes the computer to execute a process of correcting the inclination of each grid line according to the position of the unit image associated with the grid line. The listed program. 前記格子を生成する機能では、各格子線の間隔を、当該格子線に対応付けられた前記単位画像の位置に応じて補正する処理を、前記コンピュータに実行させることを特徴とする請求項12に記載のプログラム。   The function of generating the grid causes the computer to execute a process of correcting the interval between the grid lines in accordance with the position of the unit image associated with the grid line. The listed program.
JP2008019875A 2008-01-30 2008-01-30 Image-processing device, pen device, and program Pending JP2009181347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008019875A JP2009181347A (en) 2008-01-30 2008-01-30 Image-processing device, pen device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008019875A JP2009181347A (en) 2008-01-30 2008-01-30 Image-processing device, pen device, and program

Publications (1)

Publication Number Publication Date
JP2009181347A true JP2009181347A (en) 2009-08-13

Family

ID=41035282

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008019875A Pending JP2009181347A (en) 2008-01-30 2008-01-30 Image-processing device, pen device, and program

Country Status (1)

Country Link
JP (1) JP2009181347A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012043014A (en) * 2010-08-12 2012-03-01 Fuji Xerox Co Ltd Information processor, imaging apparatus and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012043014A (en) * 2010-08-12 2012-03-01 Fuji Xerox Co Ltd Information processor, imaging apparatus and program

Similar Documents

Publication Publication Date Title
US6959866B2 (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
US7543753B2 (en) Reconstruction of virtual raster
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
JP4894451B2 (en) Image processing apparatus and program
US9734443B2 (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
JP2007518158A (en) Method, apparatus, computer program and storage medium for recording movement of user unit
JP5145833B2 (en) Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium
JP5609469B2 (en) Image processing apparatus, identification apparatus, electronic writing instrument, and program
JP2009175845A (en) Image processor, pen device, and program
JP2009181347A (en) Image-processing device, pen device, and program
US8657205B2 (en) Image processing apparatus, identification apparatus, method for determining bit sequence and computer readable medium
JP4985436B2 (en) Position detection apparatus and program
JP2009181346A (en) Image processor, pen device, and program
JP4397866B2 (en) Two-dimensional pattern reading device, two-dimensional pattern reading method
JP2009181341A (en) Position detection device and program
JP2009182823A (en) Image processor and program
JP4765894B2 (en) Image generating apparatus, information reading apparatus, and recording medium
JP2012043015A (en) Information processor, imaging apparatus and program
JP2006106906A (en) Character reading device
JP5098441B2 (en) Image processing apparatus and program
JP2005070980A (en) Bar code reading device, method and program
JP2009175931A (en) Image processor, pen device, and program
JP2009175986A (en) Image processor and program
JP5521883B2 (en) Information processing apparatus, imaging apparatus, and program
JP2008299442A (en) Image processing device and program