JP2009175845A - Image processor, pen device, and program - Google Patents
Image processor, pen device, and program Download PDFInfo
- Publication number
- JP2009175845A JP2009175845A JP2008011430A JP2008011430A JP2009175845A JP 2009175845 A JP2009175845 A JP 2009175845A JP 2008011430 A JP2008011430 A JP 2008011430A JP 2008011430 A JP2008011430 A JP 2008011430A JP 2009175845 A JP2009175845 A JP 2009175845A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- unit
- image
- value
- threshold
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
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および特許文献2には、光学的に読み取った画像を、二値化回路によって二値化し、画像に記録されているドットコードを検出する技術が開示されている。
特許文献1では、二値化を行う際の閾値は、画面毎もしくは画面内のブロック毎のヒストグラムの値などを利用して決定される。すなわち、ドットコード上の染みや紙の歪み、内蔵クロックの精度などに応じて、閾値が決定される。
特許文献2では、前の画像フレームに対するドットコードの検出処理で得られる統計データに基づいて、現在の画像フレームに対して二値化を行う際の閾値を決定することについて開示されている。
In this type of technology, it is very important to correctly detect the pattern image.
In
Japanese Patent Application Laid-Open No. 2004-228688 discloses determining a threshold value for binarization of the current image frame based on statistical data obtained by dot code detection processing for the previous image frame.
また、ドットのような微小な画像を検出する方法として、クオイト・フィルタ(Quoit Filter)を用いる方法が知られている。
特許文献3には、画像を撮像する光学系の点広がり関数からQフィルタ(クオイト・フィルタ)を生成し、画像に対して適用することで微小な画像を検出する技術が開示されている。
As a method for detecting a minute image such as a dot, a method using a quat filter is known.
処理能力が制限されるペン・デバイスのような画像処理装置でパターン画像の検出を行うためには、パターン画像の検出のための処理は、パターン画像を正しく検出することが要求されるとともに、プロセッサの負荷ができるだけ軽い処理であることが望ましい。 In order to detect a pattern image with an image processing apparatus such as a pen device whose processing capability is limited, it is required that the pattern image detection process correctly detects the pattern image and the processor. It is desirable that the load be as light as possible.
本発明は、以上のような課題に鑑みてなされたものであり、装置への負荷が軽い処理で、かつパターン画像を正確に検出できるようにすることを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to make it possible to accurately detect a pattern image by processing with a light load on the apparatus.
請求項1に係る発明は、撮像装置により撮像された画像を走査し、単位画像を検出する検出部と、前記検出部により検出された単位画像のうち、ノイズを検出し、除去するノイズ除去部とを備え、前記検出部は、一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して前記画像を走査し、当該ディスク要素の画素値の平均値とリング要素の画素値の平均値との差分および注目画素の画素値に基づいて、当該注目画素が単位画像を形成する画素か否かを判断することを特徴とする画像処理装置である。
請求項2に係る発明は、前記検出部は、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第1の閾値以上であり、かつ前記注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することを特徴とする請求項1に記載の画像処理装置である。
請求項3に係る発明は、前記検出部で用いられる前記第1の閾値を動的に設定する閾値設定部をさらに備えることを特徴とする請求項2に記載の画像処理装置である。
請求項4に係る発明は、前記ノイズ除去部は、前記画像を被う格子状領域を生成し、当該格子状領域の各小領域に対応する当該画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消すことを特徴とする請求項1に記載の画像処理装置である。
請求項5に係る発明は、前記ノイズ除去部は、前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消すことを特徴とする請求項1に記載の画像処理装置である。
請求項6に係る発明は、単位画像が形成された媒体表面を撮像する撮像部と、前記撮像部により撮像された画像を走査し、前記単位画像を検出する検出部とを備え、前記検出部は、一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して前記画像を走査し、当該フィルタにおける当該ディスク要素の画素値の平均値と当該リング要素の画素値の平均値との差分および注目画素の画素値に基づいて、当該注目画素が単位画像を形成する画素か否かを判断することを特徴とするペン・デバイスである。
請求項7に係る発明は、前記検出部は、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第1の閾値以上であり、かつ前記注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することを特徴とする請求項6に記載のペン・デバイスである。
請求項8に係る発明は、前記画像を被う格子状領域を生成し、当該格子状領域の各小領域に対応する当該画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消す、ノイズ除去部をさらに備えることを特徴とする請求項6に記載のペン・デバイスである。
請求項9に係る発明は、前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消す、ノイズ除去部をさらに備えることを特徴とする請求項6に記載のペン・デバイスである。
請求項10に係る発明は、コンピュータに、撮像装置により撮像された画像を、一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して走査する機能と、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第1の閾値以上であり、かつ注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することにより、単位画像を検出する機能とを実現させるためのプログラムである。
請求項11に係る発明は、前記コンピュータに、前記画像を被う格子状領域を生成し、当該格子状領域の各小領域に対応する当該画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該単位画像の検出を取り消す機能をさらに実現させる、請求項10に記載のプログラムである。
請求項12に係る発明は、前記コンピュータに、前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消す機能をさらに実現させる、請求項10に記載のプログラムである。
The invention according to
In the invention according to
The invention according to
According to a fourth aspect of the present invention, the noise removing unit generates a grid area that covers the image, and the disk element in the filter for each area of the image corresponding to each small area of the grid area. A contrast threshold is set based on the difference between the average value of the pixel values of the pixel and the average value of the pixel values of the ring elements, the pixel threshold is set based on the difference and the pixel value of each pixel, and is detected by the detection unit For the pixel forming the unit image, the difference obtained by applying the filter using the pixel as a target pixel is lower than the contrast threshold, or the pixel value of the pixel is lower than the pixel threshold. 2. The image processing apparatus according to
According to a fifth aspect of the present invention, the noise removing unit has a predetermined difference between an average value of pixel values of the disk elements and an average value of pixel values of the ring elements in the filter based on a detection result of the detection unit. The detection of the unit image by the detection unit is canceled when the pixel value of the pixel of interest is lower than the average value of the pixel values of the ring element. This is an image processing apparatus.
The invention according to
In the invention according to
According to an eighth aspect of the present invention, a grid area that covers the image is generated, and an average value of pixel values of the disk elements in the filter for each area of the image corresponding to each small area of the grid area. A contrast threshold is set based on the difference between the pixel value of the ring element and the average value of the ring elements, a pixel threshold is set based on the difference and the pixel value of each pixel, and the unit image detected by the detection unit is Regarding the pixel to be formed, when the difference obtained by applying the filter with the pixel as a target pixel is lower than the contrast threshold, or when the pixel value of the pixel is lower than the pixel threshold, The pen device according to
In the invention according to
According to a tenth aspect of the present invention, a function of scanning a computer with an image captured by an imaging device by applying a filter including a disk element including a certain area and a ring element provided around the disk element. And the difference between the average value of the pixel values of the disk element and the average value of the pixel values of the ring element in the filter is greater than or equal to the first threshold value, and the pixel value of the target pixel is greater than or equal to the second threshold value. In this case, it is a program for realizing a function of detecting a unit image by determining that the target pixel is a pixel forming the unit image.
According to an eleventh aspect of the present invention, in the computer, a grid area that covers the image is generated, and the pixel of the disk element in the filter is generated for each area of the image corresponding to each small area of the grid area. A contrast threshold is set based on the difference between the average value of the values and the average value of the pixel values of the ring elements, a pixel threshold is set based on the difference and the pixel value of each pixel, and the detected unit image is Regarding the pixel to be formed, when the difference obtained by applying the filter with the pixel as a target pixel is lower than the contrast threshold, or when the pixel value of the pixel is lower than the pixel threshold, The program according to
According to a twelfth aspect of the present invention, a difference between an average value of pixel values of the disk element and an average value of pixel values of the ring element in the filter is determined based on a detection result of the detection unit. The function of canceling the detection of the unit image by the detection unit when the pixel value of the pixel of interest is lower than the average value of the pixel values of the ring element. It is a program.
請求項1に係る発明によれば、フィルタにおける平均値の計算および差分の計算により単位画像を検出するため、負荷の軽い処理で単位画像を検出することができる。
請求項2に係る発明によれば、フィルタにより得られる値と注目画素の画素値とを独立に評価することで、単位画像を正確に検出することができる。
請求項3に係る発明によれば、第1の閾値を動的に変更することができる。
請求項4に係る発明によれば、検出部による検出結果からノイズである可能性の高いものを取り消すことにより、単位画像の検出の精度を向上させることができる。
請求項5に係る発明によれば、正反射のノイズを除去することにより、単位画像の検出の精度を向上させることができる。
請求項6に係る発明によれば、ペン・デバイスにおいて、負荷の軽い処理で単位画像を検出することができる。
請求項7に係る発明によれば、ペン・デバイスにおいて、負荷の軽い処理で単位画像を正確に検出することができる。
請求項8に係る発明によれば、ペン・デバイスにおいて、負荷の軽い処理で、ノイズを除去することにより、単位画像の検出の精度を向上させることができる。
請求項9に係る発明によれば、ペン・デバイスにおいて、負荷の軽い処理で、正反射のノイズを除去することにより、単位画像の検出の精度を向上させることができる。
請求項10に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、負荷の軽い処理で単位画像を検出することができる。
請求項11に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、ノイズを除去することにより、単位画像の検出の精度を向上させることができる。
請求項12に係る発明によれば、画像処理装置の機能を実現するコンピュータにおいて、正反射のノイズを除去することにより、単位画像の検出の精度を向上させることができる。
According to the first aspect of the present invention, since the unit image is detected by calculating the average value and calculating the difference in the filter, the unit image can be detected by a process with a light load.
According to the second aspect of the invention, the unit image can be accurately detected by independently evaluating the value obtained by the filter and the pixel value of the target pixel.
According to the invention of
According to the fourth aspect of the present invention, it is possible to improve the accuracy of unit image detection by canceling the detection result of the detection unit that has a high possibility of being a noise.
According to the fifth aspect of the present invention, the accuracy of unit image detection can be improved by removing regular reflection noise.
According to the invention which concerns on
According to the invention which concerns on
According to the invention which concerns on
According to the ninth aspect of the present invention, in the pen device, it is possible to improve the accuracy of unit image detection by removing specular reflection noise with light load processing.
According to the tenth aspect of the present invention, in a computer that realizes the function of the image processing apparatus, a unit image can be detected by a process with a light load.
According to the eleventh aspect of the present invention, it is possible to improve the accuracy of unit image detection by removing noise in a computer that implements the function of the image processing apparatus.
According to the twelfth aspect of the present invention, in the computer that realizes the function of the image processing apparatus, the accuracy of unit image detection can be improved by removing regular reflection noise.
以下、添付図面を参照して、本発明の実施形態について詳細に説明する。
本実施形態は、紙等の媒体に印刷されたパターン画像を読み取り、このパターン画像によって記録された情報(コード情報等)を復号する処理に関するものである。本実施形態の前提として、まず、パターン画像の構成例について説明する。
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(=9C2)通りの情報を表現する。また、図3(b)は、図2(b)に示した9C3方式における全ての単位符号パターンを示している。9C3方式では、これらの単位符号パターンを用いて、84(=9C3)通りの情報を表現する。
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
一方、特に図示しないが、単位符号パターンが長方形(縦横のドット数が異なる)である場合は、画像の回転の検出のために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
このように、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
撮像部100は、CCD(Charge Coupled Devices)やCMOS(Complementary Metal Oxide Semiconductor)等の撮像素子を用いて構成され、紙面上に形成されたパターン画像を、連続的な画像フレームとして読み取る。そして、読み取ったパターン画像を、8ビットの画像データとしてドット解析部200に送る。撮像部100により読み取られる画像のサイズは、特に限定されないが、ここでは156画素×156画素とする。
The
ドット解析部200は、プログラム制御されたCPUおよびメモリ等で実現され、撮像部100により撮像された画像からドットを検出し、2次元のビット列を生成する。このドット解析部200は、画像データを解析する機能として、位置検出部210と、角度検出部220と、同期化部230とを備える。
位置検出部210は、撮像部100から受け取った8ビットの画像からドットの位置を検出する。
角度検出部220は、位置検出部210により検出された画像上のドットの整列角度を検出する。
同期化部230は、位置検出部210および角度検出部220の検出結果として得られたドットの配列を、2次元のビット配列に変換する。この変換を同期化と呼び、得られたビット配列における各ビットの並びを同期ラインと呼ぶ。この同期化により、8ビットの画像の画像は2値データとなる。また、角度検出部220により検出されたドットの整列角度はビット列(同期ライン)の角度となる。
得られたビット配列と、同期ラインの角度および間隔の情報は、復号部300に送られる。
The
The
The
The
The obtained bit arrangement and information on the angle and interval of the synchronization line are sent to the
復号部300は、プログラム制御されたCPUおよびメモリ等で実現される。この復号部300は、ドット解析部200から受け取ったビット配列、同期ラインの角度および間隔の情報に基づいて、3ドット×3ドットのパターンブロックを検出する。そして、得られたパターンブロックを回転補正し、情報ブロックを復元した後、この情報ブロックにより記録された情報を復号する。また、画像処理装置10が、パターン画像が形成された用紙上に筆記しながらパターン画像を読み取るペン・デバイス(ペン・デバイスの詳細な構成については後述)である場合、ペン先の位置と撮像部100により撮像される位置との間には、一定のずれがある。そこで、復号部300は、同期ラインの角度および間隔の情報に基づいて、画像から得られた座標をペン先の座標に変換する。
Decoding
また、図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
また、画像処理装置10が後述するペン・デバイスである場合、画像処理装置10には、ペンによる筆記が行われているか否かを認識する機能が設けられる。そして、ドット解析部200の位置検出部210、角度検出部220および同期化部230と、復号部300には、ペンによる筆記が開始されたことを示すストローク開始信号が供給される。ストローク開始信号が供給されると、これらの機能ブロックは、各設定を初期化する。さらにまた、画像処理装置10がペン・デバイスである場合、復号部300には、復号結果からペン先を補正するための、ペン先から撮像面までの相対距離情報(ペン−チップ距離情報)が供給される。
When the
図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
As an initial operation, it is assumed that the
As shown in FIG. 10, first, the
位置検出部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
<位置検出部の機能>
次に、ドット解析部200の位置検出部210の機能についてさらに詳細に説明する。
図11は、位置検出部210の機能構成を示す図である。
位置検出部210は、撮像部100により撮像された画像からドットの画像を抽出する機能と、検出されたドットの座標を計算する機能とを備える。具体的には、図11に示すように、ドット検出機能として、検出部211と、閾値設定部212と、ノイズ除去部213と、第1統計データ生成部214と、第2統計データ生成部215とを備える。また、座標計算機能として、座標計算部216を備える。
<Function of position detector>
Next, the function of the
FIG. 11 is a diagram illustrating a functional configuration of the
The
検出部211は、撮像部100により撮像された画像を解析し、ドットの画像を検出する。撮像部100により撮像された画像は多値画像であるが、検出部211によりドットが検出されることで、2値画像に変換される。本実施形態では、画像の解析にクオイト・フィルタ(Quoit Filter)が用いられる。検出部211によるドットの検出処理の詳細については後述する。閾値設定部212は、検出部211によるドットの検出に用いられる閾値を設定する。言い換えれば、閾値設定部212、画像からドットを検出するための判断基準を設定する判断基準設定部として機能する。この閾値は、固定値であっても良いが、復号処理の成否等に応じて動的に設定するようにしても良い。
The
ノイズ除去部213は、検出部211によるドットの検出結果からノイズを検出し、除去する。第1統計データ生成部214および第2統計データ生成部215は、ノイズ除去部213によるノイズ除去の処理に用いられる統計データを生成する。ノイズ除去部によるノイズの除去処理の詳細については後述する。
The
座標計算部216は、上記のドット検出機能により検出されたドットの画像(撮像部100により撮像された画像)上の位置を表す座標値を計算する。これにより、各ドットの位置関係が特定されるため、複数のドットにより構成される単位符号パターン(図2乃至図4参照)が認識され、単位符号パターンにより記録された情報の復号が可能となる。
The coordinate
<クオイト・フィルタおよびドット検出処理>
次に、本実施形態によるドットの検出および座標計算に用いられるクオイト・フィルタについて説明する。
クオイト・フィルタは、Morphologicalフィルタの一種であり、ディスク要素とその周囲に設けられるリング要素とで構成される。そして、ディスク要素とリング要素による演算結果の差が、フィルタ処理の出力値となる。検出部211は、このクオイト・フィルタを用いて撮像部100により撮像された画像を走査し、ディスク要素の画素値とリング要素の画素値との差分(高低差)を評価することにより、ドットの有無を判断する。
<Quit filter and dot detection processing>
Next, a quantit filter used for dot detection and coordinate calculation according to the present embodiment will be described.
The quat filter is a kind of Morphological filter, and is composed of a disk element and a ring element provided around the disk element. The difference between the calculation results of the disk element and the ring element becomes the output value of the filter process. The
図12は、クオイト・フィルタを用いたドット検出の概念を説明する図である。
図12に示すように、クオイト・フィルタを、上から押し当てるようにして画像上を走査する。なお、図12では、画像における画素値を3次元の高さとして表現している。このとき、図12(a)に示すように、ディスク要素Dを越える領域で画素値が近似している場所では、ディスク要素Dとリング要素Rの画素値がほぼ一定となる(すなわち、高低差が小さい)。一方、図12(b)に示すように、ディスク要素Dに含まれる小領域の画素値が周囲の画素値に比べて突出している場合、この小領域とディスク要素Dの位置が一致すると、リング要素Rのみが落ち込む(すなわち、大きな高低差が生じる)。
FIG. 12 is a diagram for explaining the concept of dot detection using a quantile filter.
As shown in FIG. 12, the image is scanned on the image by pressing the quantile filter from above. In FIG. 12, the pixel value in the image is expressed as a three-dimensional height. At this time, as shown in FIG. 12A, the pixel values of the disk element D and the ring element R are substantially constant (that is, the height difference) in a place where the pixel values are approximated in a region exceeding the disk element D. Is small). On the other hand, as shown in FIG. 12B, when the pixel value of the small area included in the disk element D protrudes compared to the surrounding pixel values, if the position of this small area and the disk element D coincides, Only the element R falls (that is, a large height difference occurs).
撮像部100により撮像された画像において、ドットは、その周囲に比べて画素値が高い。そのため、ディスク要素Dとドットの位置が一致すると、クオイト・フィルタの出力であるディスク要素Dの画素値とリング要素Rの画素値の高低差が大きく、かつディスク要素Dの画素値が高くなる。そこで、検出部211は、画像を走査して得られる画素値にクオイト・フィルタを適用し、ディスク要素Dの画素値とリング要素Rの画素値の高低差が大きく、かつディスク要素Dの画素値が高いような出力(検出結果)が得られた場合に、ドットが検出されたと判断する。
In the image imaged by the
図13は、本実施形態で用いられるクオイト・フィルタの構成例を示す図である。図13(a)にディスク要素Dを、図13(b)にリング要素Rを、図13(c)に検出部211の出力のデータ構造の例を、それぞれ示す。
図13(a)に示すように、ディスク要素Dは、3画素×3画素の正方形の領域である。このディスク要素Dから、9画素の画素値の平均値(DiskAvg)および最大値(DiskMax)が取得される。図13(b)に示すように、リング要素Rは、7画素×7画素の正方形の範囲のうち、中心の3画素×3画素と四隅の3画素(合計12画素)を除いた28画素(=49−9−12)の領域である。中心の3画素×3画素は、ディスク要素Dに対応している。このリング要素Rから、28画素の画素値の平均値(RingAvg)が取得される。また、ディスク要素Dの中央の画素(図中、太線で表示)が、クオイト・フィルタを用いた処理における注目画素である。
FIG. 13 is a diagram illustrating a configuration example of a quantile filter used in the present embodiment. FIG. 13A shows the disk element D, FIG. 13B shows the ring element R, and FIG. 13C shows an example of the data structure of the output of the
As shown in FIG. 13A, the disk element D is a square area of 3 pixels × 3 pixels. From this disk element D, an average value (DiskAvg) and a maximum value (DiskMax) of the pixel values of nine pixels are acquired. As shown in FIG. 13B, the ring element R has 28 pixels (excluding the
図13(c)に示すように、検出部211の出力は8ビットのデータとする。このうち、最下位ビット(LSB)から7ビット目までで、クオイト・フィルタの出力である、ディスク要素Dの平均値(DiskAvg)とリング要素Rの平均値(RingAvg)の差分(QuoitDiff)を記録する。最上位ビット(MSB)は、注目画素がドットであると判断されたことを表すタグ(以下、ドットタグと呼ぶ)として用いられる。
As shown in FIG. 13C, the output of the
図14は、図13に示したクオイト・フィルタを用いて画像を走査する様子を示す図である。
検出部211は、クオイト・フィルタの中心を注目画素に合わせ、画像の左上隅から右下隅まで走査しながら、ドットを検出する。ドットの検出は、2段階の処理によって行われる。
FIG. 14 is a diagram illustrating a state in which an image is scanned using the quantit filter illustrated in FIG.
The
まず、ディスク要素とリング要素の平均値の差分(QuoitDiff)が算出され、得られた値と第1の閾値とが比較される。ここでは、ディスク要素の平均値が高い場合を正の値とする。そして、差分の値が第1の閾値よりも大きいならば、その値が出力データに記録される。第1の閾値は、閾値設定部212により設定される。閾値設定部212による第1の閾値の設定方法の詳細については後述する。
First, a difference (QuitDiff) between the average values of the disk element and the ring element is calculated, and the obtained value is compared with the first threshold value. Here, a case where the average value of the disk elements is high is taken as a positive value. If the difference value is larger than the first threshold value, the value is recorded in the output data. The first threshold is set by the
注目画素に関して差分の値が第1の閾値以上であった場合、次に、この注目画素の画素値と第2の閾値とが比較される。そして、注目画素の画素値が第2の閾値以上であるならば、ドットタグに割り当てられたビットの値がドットであることを表す値となる。第2の閾値は、任意に設定され、固定値であっても可変値であっても良い。固定値の場合、例えば、クオイト・フィルタのディスク要素における最大値(DiskMax)としても良い。また、可変値の場合、例えば、ディスク要素の最大値(DiskMax)から所定のパラメータを減算して求めても良い。パラメータは、例えば、ディスク要素とリング要素の差分(QuoitDiff)のR%(Rは任意の値)というように設定される。 If the difference value for the target pixel is equal to or greater than the first threshold value, the pixel value of the target pixel is then compared with the second threshold value. If the pixel value of the target pixel is equal to or greater than the second threshold, the value of the bit assigned to the dot tag is a value indicating that it is a dot. The second threshold value is arbitrarily set, and may be a fixed value or a variable value. In the case of a fixed value, for example, the maximum value (DiskMax) in the disk element of the quantile filter may be used. In the case of a variable value, for example, a predetermined parameter may be subtracted from the maximum value (DiskMax) of the disk element. The parameter is set, for example, as R% (R is an arbitrary value) of the difference (QuitDiff) between the disk element and the ring element.
また、検出部211は、注目画素に関して差分の値が第1の閾値以下であった場合、この注目画素における反転レベル(RevDiff)を算出する。ここで、反転レベルとは、リング要素の平均値(RingAvg)から注目画素の画素値を減算して得られる差分である。したがって、注目画素の画素値の方が低い場合に反転レベルの値は正となる。検出部211は、得られた反転レベルが第3の閾値よりも大きい場合(すなわち、注目画素の画素値がリング要素の平均値よりも一定以上低い場合)、その注目画素に正反射が起こっていると判断する。
In addition, when the difference value regarding the target pixel is equal to or less than the first threshold, the
図15は、検出部211によるドット検出処理を説明するフローチャートである。
画像フレームに対する検出部211による処理に先立って、まず閾値設定部212により、第1の閾値(TH(1))が設定される(ステップ1501)。第1の閾値の設定方法については後述する(図17参照)。第1の閾値(TH(1))が設定された後、検出部211は、撮像部100により撮像された画像(画像フレーム)を、クオイト・フィルタを適用して走査しながら、以下のループ処理を画素ごとに画像全体にわたって繰り返す。
FIG. 15 is a flowchart for explaining dot detection processing by the
Prior to the processing by the
検出部211は、まず画像から7画素×7画素の領域を切り出して、画素値を取得する(ステップ1502)。7画素×7画素は、図13に示したクオイト・フィルタが収まるサイズである。検出部211は、取得した画素値にクオイト・フィルタを適用し、ディスク要素に対応する画素の画素値の平均値(DiskAvg)および最大値(DiskMax)を計算する(ステップ1503)。また、検出部211は、クオイト・フィルタのリング要素に対応する画素の画素値の平均値(RingAvg)を計算する(ステップ1504)。そして、検出部211は、クオイト・フィルタのディスク要素の画素値の平均値とリング要素の画素値の平均値との差分(QuoitDiff=DiskAvg−RingAvg)を計算し(ステップ1505)、得られた値と第1の閾値(TH(1))とを比較する。
First, the
差分値(QuoitDiff)が第1の閾値(TH(1))よりも大きい場合(ステップ1506でYes)、検出部211は、図13(c)に示した8ビットの出力データのうち下位7ビットを用いて、差分値(QuoitDiff)を記録する(ステップ1507)。次に、検出部211は、ステップ1502で取得した画素値から、クオイト・フィルタの中心に位置する注目画素の画素値Vと第2の閾値(TH(2))とを比較する。第2の閾値(TH(2))が差分値(QuoitDiff)に基づいて定まる可変値である場合は、ステップ1506の判断の後に計算しておく。
When the difference value (QuitDiff) is larger than the first threshold value (TH (1)) (Yes in Step 1506), the
注目画素の画素値が第2の閾値(TH(2))以上である場合(ステップ1508でYes)、検出部211は、図13(c)に示した8ビットの出力データの最上位ビット(ドットタグ)を、ドットであることを示す値にする(ステップ1509)。そして、この8ビットの出力データを第1統計データ生成部214へ送信する(ステップ1510)。第1統計データ生成部214では、取得した出力データにしたがって、後述する統計データが生成される。注目画素の画素値が第2の閾値(TH(2))よりも小さい場合は(ステップ1508でNo)、この画素はドットを形成しないと判断されるので、検出部211は、この出力データを第1統計データ生成部214には送信しない。
When the pixel value of the target pixel is equal to or greater than the second threshold (TH (2)) (Yes in Step 1508), the
一方、差分値(QuoitDiff)が第1の閾値(TH(1))以下であった場合(ステップ1506でNo)、検出部211は、注目画素における反転レベル(RevDiff=RingAvg−注目画素の画素値V)を計算する(ステップ1511)。そして、得られた値が第3の閾値(TH(3))よりも大きい場合は、正反射ノイズと判断し、このノイズを検出したことを第2統計データ生成部215に通知する(ステップ1512、1513)。第2統計データ生成部215では、取得した正反射ノイズの検出通知にしたがって、後述する統計データが生成される。
On the other hand, when the difference value (QuitDiff) is equal to or less than the first threshold value (TH (1)) (No in step 1506), the
以上のようにして、画像フレームに対してドットの検出が行われ、統計データが生成された後、ノイズ除去部213によるノイズ除去処理に移行する(ステップ1514)。ノイズ除去処理の詳細については後述する(図22参照)。 As described above, after dot detection is performed on the image frame and statistical data is generated, the process proceeds to noise removal processing by the noise removal unit 213 (step 1514). Details of the noise removal processing will be described later (see FIG. 22).
<第1の閾値の設定方法>
ここで、閾値設定部212による第1の閾値の設定方法について詳細に説明する。
図11を参照すると、閾値設定部212には、復号部300による復号結果と、ストローク開始信号とが供給されている。閾値設定部212は、画像フレームごとの復号結果に含まれる復号の成否の情報を受け付け、蓄積される復号履歴に基づいて、上述した第1の閾値を動的に設定する。また、閾値設定部212は、ストローク開始信号を受け付けた場合に、復号履歴を初期化する。
<First threshold setting method>
Here, the setting method of the 1st threshold value by the threshold
Referring to FIG. 11, the
画像処理装置10が後述するペン・デバイスである場合、媒体である紙面上を画像処理装置10で走査する際の走査位置や走査状態によって画像の状態が大きく変動することが想定される。そこで、本実施形態では、実際の復号の成否に基づいて、ドット検出に用いられる上記の第1の閾値を動的に変化させることで、このような画像の状態の変動に対応する。なお、ストローク開始信号により復号履歴が初期化されるので、この第1の閾値の動的な設定は、ペン・デバイスを用いた筆記のストロークごとに個別に行われることとなる。
When the
閾値設定部212により設定される閾値に関しては、予め上限(設定上限)、下限(設定下限)、初期値が定められる。閾値設定部212は、直前の画像フレームに対する復号が成功している場合、現在の画像フレームからのドット検出に用いる第1の閾値として、直前の画像フレームからのドット検出に用いた値をそのまま用いる(すなわち、閾値を変更しない)。一方、直前の画像フレームに対する復号が失敗した場合、現在の画像フレームからのドット検出に用いる第1の閾値を、復号履歴に基づき直前の画像フレームとは異なる値に設定する。
Regarding the threshold value set by the threshold
閾値設定部212は、復号履歴として、取得した復号結果に基づき、閾値に対する復号の成功頻度に関する度数分布のデータを生成する。図16は、この度数分布の例を視覚的に表現したヒストグラムである。ここで、復号の成功頻度とは、単に復号が成功した回数ではなく、所定の閾値において、復号が成功した回数から復号が失敗した回数を減算した値(ただし、最小値は0)である。
The
図16を参照すると、閾値設定部212は、まず、第1の閾値を初期値に設定する。そして、復号が成功するまで、画像フレームごとに第1の閾値を順次下げていく。復号が成功したならば、そのときの第1の閾値における成功頻度の度数を1加算する。成功頻度の度数が0でない所定の第1の閾値において、復号が失敗した場合は、その第1の閾値における成功頻度の度数を1減算する。
Referring to FIG. 16, the
度数分布のデータが空の場合(例えば、ストローク開始から1度も復号が成功していない場合)、第1の閾値を下げていって設定下限に達したならば、次は設定上限の値とし、同様に復号が成功するまで繰り返す。一方、成功頻度の度数が0でない第1の閾値が存在する場合、直前の画像フレームに対する復号が失敗したならば、現在の画像フレームからのドット検出に用いる第1の閾値として、成功頻度の度数が最大である値を用いる。また、第1の閾値として成功頻度の度数が最大である値を用いてドット検出を行った画像フレームで復号が失敗した場合は、次の画像フレームからのドット検出に用いる第1の閾値として、成功頻度の度数が最大である値よりも1つ小さい値を用いる。 When the frequency distribution data is empty (for example, when decoding has never been successful since the start of the stroke), if the first threshold is lowered and the set lower limit is reached, then the next set upper limit value is set. Similarly, it repeats until decoding succeeds. On the other hand, if there is a first threshold whose success frequency is not 0, if the decoding for the previous image frame fails, the success frequency is used as the first threshold used for dot detection from the current image frame. Use the value where is the maximum. In addition, when decoding fails in an image frame in which dot detection has been performed using a value with the highest frequency of success frequency as the first threshold, as a first threshold used for dot detection from the next image frame, A value smaller by one than the value having the highest frequency of success frequency is used.
図17は、閾値設定部212による第1の閾値の設定動作を説明するフローチャートであり、図15に示したステップ1501の処理の詳細な内容を示す。
閾値設定部212は、検出部211による処理対象の画像フレームが、ペン・デバイスによる筆記のストロークにおける先頭の画像フレームである場合(ステップ1701でYes)、復号の成功頻度に関する度数分布データ(復号履歴)を初期化する(ステップ1702)。そして、第1の閾値を初期値に設定する(ステップ1703)。画像フレームがストロークの先頭の画像フレームか否かは、ストローク開始信号を受信したか否かによって識別される。
FIG. 17 is a flowchart for explaining the first threshold value setting operation by the threshold
When the image frame to be processed by the
検出部211による処理対象の画像フレームが、ペン・デバイスによる筆記のストロークにおける先頭の画像フレームでない場合(ステップ1701でNo)、閾値設定部212は、直前の画像フレームからのドット検出に用いられた第1の閾値(THprev)の度数分布データにおけるインデックスを取得する(ステップ1704)。そして、復号部300からフィードバックされる復号結果に基づき、直前の画像フレームに対する復号が成功したか否かを調べる。
When the image frame to be processed by the
直前の画像フレームの復号が成功した場合(ステップ1705でYes)、閾値設定部212は、取得したインデックスの度数分布データの度数を1加算する(ステップ1706)。この場合、画像フレームからのドット検出に用いる第1の閾値は変更せず、直前の画像フレームからのドット検出に用いられた第1の閾値がそのまま用いられる。
When decoding of the immediately preceding image frame is successful (Yes in Step 1705), the
一方、直前の画像フレームの復号が失敗した場合(ステップ1705でNo)、度数分布データに基づいて第1の閾値が設定される。閾値設定部212は、まず、取得したインデックスの度数分布データの度数が0か否かを調べ(ステップ1707)、0でなければ、度数を1減算する(ステップ1708)。ステップ1707で度数が0である場合は、度数の最小値を0としているため、減算はしない。
On the other hand, if the decoding of the previous image frame has failed (No in step 1705), the first threshold is set based on the frequency distribution data. The
次に、閾値設定部212は、度数分布データにおいて度数が最大のインデックス(Idx_Max)を取得する(ステップ1709)。度数分布データが空でなければ(ステップ1710でNo)、最大度数インデックス(Idx_Max)が得られるので、そのインデックスの閾値(THmax)を求める(ステップ1711)。そして、この閾値(THmax)と、ステップ1704で求めた直前の画像フレームからのドット検出に用いられた第1の閾値(THprev)とを比較する。
Next, the threshold
THmax≠THprevである場合(ステップ1712でNo)、閾値設定部212は、最大度数インデックスの閾値(THmax)を、現在の画像フレームからのドット検出に用いる第1の閾値に設定する(ステップ1713)。これに対し、THmax=THprevである場合(ステップ1712でYes)、次に閾値設定部212は、THmaxが設定下限(下限値)か否かを調べる。そして、THmaxが設定下限でなければ(ステップ1714でNo)、THmaxよりも1つ小さい値(THmax−1)を、現在の画像フレームからのドット検出に用いる第1の閾値に設定する(ステップ1715)。一方、THmaxが設定下限であるならば(ステップ1714でYes)、最大度数インデックスの閾値(THmax)を、現在の画像フレームからのドット検出に用いる第1の閾値に設定する(ステップ1713)。
When THmax ≠ THprev (No in step 1712), the
ストロークが開始されてから復号が成功しておらず、度数分布データが空である場合(ステップ1710でYes)、次に閾値設定部212は、直前の画像フレームからのドット検出に用いられた第1の閾値(THprev)と設定下限(下限値)とを比較する。そして、THprevが設定下限よりも大きい場合は(ステップ1716でYes)、THprevから一定値分下げた値(THdet)を算出する(ステップ1717)。算出された値(THdet)が設定下限よりも小さい場合は、THdetを設定下限に設定する(ステップ1718、1719)。そして、得られた値(THdet)を、現在の画像フレームからのドット検出に用いる第1の閾値に設定する(ステップ1720)。また、THprevが設定下限であった場合(ステップ1716でNo)、閾値設定部212は、設定上限の値(上限値)を、現在の画像フレームからのドット検出に用いる第1の閾値に設定する(ステップ1721)。
If the decoding has not succeeded since the start of the stroke and the frequency distribution data is empty (Yes in step 1710), the
なお、本実施形態では、ドットの検出にクオイト・フィルタを使用するため、クオイト・フィルタのディスク要素における画素値の平均値とリング要素における画素値の平均値との差分を評価するための第1の閾値を閾値設定部212により設定することとした。しかし、クオイト・フィルタを用いるか否かに関わらず、一般に、特定のドットを画像から検出する手法としては、ドットに該当する画素またはその画素を含む一定の領域と画像の他の部分との画素値の差分を所定の閾値と比較して評価することが行われる。そして、そのような他の手法においても、走査位置や走査状態によって生じる画像の状態の変動に対応する必要がある。したがって、実際の復号の成否に基づいて、ドット検出に用いられる閾値を動的に変化させる手法は、他の種々のドット検出の手法においても適用して良い。
In this embodiment, since a quantit filter is used for dot detection, a first for evaluating the difference between the average value of the pixel values in the disk element of the quantile filter and the average value of the pixel values in the ring element. Is set by the
<ノイズ除去処理>
本実施形態では、ノイズ除去処理として、通常のノイズを除去する処理と、正反射を除去する処理とを行う。正反射とは、画像の読み取りの際に、トナー等で紙面上に形成された画像が、照射された光を全反射し、撮像部100において画像が飽和レベルに近くなる現象である。全反射は、1ドット単位で発生する。
<Noise removal processing>
In the present embodiment, normal noise removal processing and regular reflection removal processing are performed as noise removal processing. Regular reflection is a phenomenon in which, when an image is read, an image formed on a paper surface with toner or the like totally reflects irradiated light, and the image is close to a saturation level in the
まず、通常のノイズ除去について説明する。
この処理では、撮像部100により撮像された画像に対して、32画素幅の小領域(部分領域)を5個×5個の25領域分並べた格子状領域(5×5マトリクス)が設定される。そしてさらに、この5×5マトリクスが、10個×10個の100領域を並べた格子状領域(10×10マトリクス)に変換される。この10×10マトリクスの部分領域ごとに閾値が設定され、ノイズが検出され除去される。本実施形態では、撮像部100により撮像される画像のサイズは、上述したように156画素×156画素なので、以上のように生成された10×10マトリクスで画像全体が被われることとなる。
First, normal noise removal will be described.
In this process, a grid-like region (5 × 5 matrix) in which small regions (partial regions) each having a width of 32 pixels are arranged by 25 × 5 × 5 regions is set for the image captured by the
まず、第1統計データ生成部214が、上記の5×5マトリクスを設定し、3種類の統計データを生成して5×5マトリクスの各部分領域に登録する。統計データは、コントラストの積算値と、ディスク要素の最大値(9画素の画素値の最大値)と、検出ドット数である。ここで、コントラストとは、クオイト・フィルタによるディスク要素とリング要素の差分(QuoitDiff)である。この統計データの生成は、検出部211の出力を順次受け付けることにより、検出部211による検出処理と並行して行って良い。
First, the first statistical
図18は、5×5マトリクスおよび統計データの例を示す図である。
第1統計データ生成部214は、5×5マトリクスを構成する部分領域ごとに、その部分領域に含まれる各画素に関して得られた差分(QuoitDiff)の値を積算し、コントラストの統計データ(図18のSc00〜Sc44)を生成する。また、5×5マトリクスを構成する部分領域ごとに、その部分領域に含まれる各画素に関するクオイト・フィルタのディスク要素の画素値の最大値(DiskMax)を選択し、最大値の統計データ(図18のMax00〜Max44)を生成する。また、5×5マトリクスを構成する部分領域ごとに、検出されたドットの数を数え、検出ドット数の統計データ(図18のCnt00〜Cnt44)を生成する。ここで、検出ドット数は、その部分領域に含まれる各画素に関するクオイト・フィルタの出力データのうちで、ドットタグがドットであることを表す値となっているものの数である。生成されたこれらの統計データは、ノイズ除去部213に送られる。
FIG. 18 is a diagram illustrating an example of a 5 × 5 matrix and statistical data.
The first statistical
ノイズ除去部213は、第1統計データ生成部214から取得した統計データを用いて、コントラストの閾値および画素値の閾値を生成する。そして、検出部211によりドットとして検出された位置における元画像(撮像部100により撮像された画像)とこれらの閾値とを比較する。元画像の画素値が閾値より低い場合、または元画像における当該画素を注目画素としたときのコントラスト(QuoitDiff)が閾値より低い場合、ノイズ除去部213は、検出されたドットがノイズであると判断し、検出部211によるこのドットの検出を取り消す。これにより、ノイズが除去される。
The
ここで、コントラストおよび画素値の閾値の生成方法について詳細に説明する。
ノイズ除去部213は、まず、5×5マトリクスを構成する各部分領域に関して、コントラストの平均値および最大値を求める。平均値は、第1統計データ生成部214から取得したコントラストの積算値を検出ドット数で割ることによって得られる。なお、所定の部分領域に関して検出ドット数が0である場合は、隣接する部分領域の平均値を用いて線形補間する。
Here, a method of generating threshold values for contrast and pixel values will be described in detail.
First, the
次に、ノイズ除去部213は、5×5マトリクスの各部分領域を4分割して10個×10個の100領域で構成される10×10マトリクスとする。第1統計データ生成部214から取得した統計データやノイズ除去部213が求めたコントラストの平均値および最大値は、この4分割された小領域ごとのデータに変換される。このデータは、例えば、5×5マトリクスにおける部分領域のデータを隣接する部分領域との間で線形補間することで得られる。
Next, the
図19は、部分領域の分割の様子を示す図である。
図19に示すように、5×5マトリクスにおける部分領域Aを分割して小領域A−1、A−2、A−3、A−4が得られるものとする。このとき、左上の小領域A−1のデータは、元の部分領域A、左に隣接する部分領域B、上に隣接する部分領域Cのデータの平均値とする。同様に、右上の小領域A−2のデータは、元の部分領域A、上に隣接する部分領域C、右に隣接する部分領域Dのデータの平均値とする。左下の小領域A−3のデータは、元の部分領域A、左に隣接する部分領域B、下に隣接する部分領域Eのデータに基づき線形補間して得られる。右下の小領域A−4のデータは、元の部分領域A、右に隣接する部分領域D、下に隣接する部分領域Eのデータの平均値とする。なお、線形補間の具体的な手法は、以上の方法に限定されない。
FIG. 19 is a diagram showing a state of partial area division.
As shown in FIG. 19, it is assumed that the small areas A-1, A-2, A-3, and A-4 are obtained by dividing the partial area A in the 5 × 5 matrix. At this time, the data in the upper left small area A-1 is the average value of the data in the original partial area A, the left adjacent partial area B, and the upper adjacent partial area C. Similarly, the data of the upper right small area A-2 is the average value of the data of the original partial area A, the upper adjacent partial area C, and the right adjacent partial area D. The data of the lower left small area A-3 is obtained by linear interpolation based on the original partial area A, the left adjacent partial area B, and the lower adjacent partial area E data. The data in the lower right small area A-4 is the average value of the data in the original partial area A, the right adjacent partial area D, and the lower adjacent partial area E. A specific method of linear interpolation is not limited to the above method.
次に、ノイズ除去部213は、この10×10マトリクスのコントラスト閾値を算出する。図20(a)に、コントラスト閾値の例を示す(Ctr00〜Ctr99)。コントラスト閾値(Ctr)は、10×10マトリクスの各小領域に対して求めたコントラストの最大値を用いて、例えば、最大値の25%等のように定める。コントラストの最大値に基づいて定めることにより、コントラスト閾値は、撮像部100により撮像された画像全体のシャープさに応じて変動することとなる。
Next, the
また、ノイズ除去部213は、10×10マトリクスの画素閾値を算出する。図20(b)に、画素閾値の例を示す(Px00〜Px99)。画素閾値(Px)は、例えば、10×10マトリクスの小領域のデータにそれぞれ変換された、コントラストの平均値Ctおよびディスク要素の画素値の最大値Mxを用いて、
Px=(Mx−Ct)/k (ただし、kは2〜4程度の値)
等のように求められる。
In addition, the
Px = (Mx−Ct) / k (where k is a value of about 2 to 4)
And so on.
次に、正反射によるノイズ(以下、正反射ノイズ)の除去について説明する。
この処理では、撮像部100により撮像された画像に対して、4画素幅の小領域(部分領域)を39個×39個の1521領域分並べた格子状領域(39×39マトリクス)が設定される。そして、この39×39マトリクスの部分領域ごとに正反射ノイズが検出され除去される。本実施形態では、撮像部100により撮像される画像のサイズは、上述したように156画素×156画素なので、以上のように生成された39×39マトリクスで画像全体が被われることとなる。
Next, removal of noise due to regular reflection (hereinafter, regular reflection noise) will be described.
In this process, a grid-like region (39 × 39 matrix) in which 39 × 39 1521 regions of a small region (partial region) having a width of 4 pixels are arranged for the image captured by the
まず、第2統計データ生成部215が、上記の39×39マトリクスを設定する。そして、この39×39マトリクスの部分領域ごとに、検出部211において正反射が起こっていると判断された画素(以下、濃度反転画素と呼ぶ)の数をカウントする。この処理は、検出部211の出力を順次受け付けることにより、検出部211による検出処理と並行して行って良い。そして、得られたデータは、ノイズ除去部213に送られる。
First, the second statistical
図21は、39×39マトリクスの例を示す図である。
ノイズ除去部213は、39×39マトリクスの各部分領域に順次着目し、着目した部分領域およびこの部分領域の周囲に隣接する8個の部分領域のいずれかに濃度反転画素が存在する場合、着目した部分領域における検出部211によるドットの検出を取り消す。例えば、図21において、グレーの部分領域に着目している場合、太枠で囲まれた9個の部分領域のいずれかに濃度反転画素が存在するならば、斜線を付した部分領域におけるドットの検出が取り消される。これにより、正反射ノイズが除去される。
FIG. 21 is a diagram illustrating an example of a 39 × 39 matrix.
The
図22は、ノイズ除去部213によるノイズ除去の動作を説明するフローチャートであり、図15に示したステップ1514の処理の詳細な内容を示す。
ノイズ除去部213は、まず、第1統計データ生成部214から取得した統計データに基づいて、5×5マトリクスの各部分領域におけるコントラスト(QuoitDiff)の平均値および最大値を算出する(ステップ2201、2202)。次に、ノイズ除去部213は、得られたデータを、10×10マトリクスのデータに変換する(ステップ2203)。そして、コントラスト閾値を算出する(ステップ2204)。
FIG. 22 is a flowchart for explaining the operation of noise removal by the
First, the
また、ノイズ除去部213は、第1統計データ生成部214から取得したクオイト・フィルタにおけるディスク要素の最大値の統計データを、10×10マトリクスのデータに変換する(ステップ2205)。そして、画素閾値を算出する(ステップ2206)。
Further, the
この後、ノイズ除去部213は、画像(画像フレーム)を走査しながら、以下のループ処理を画素ごとに画像全体にわたって繰り返す。ただし、検出部211によるドットの検出結果からノイズを除去する処理であるから、実際には、検出部211の出力におけるドットタグがドットであることを表す値となっている画素のみについて処理が行われる。また、各ループにおいて処理対象となっている画素を対象画素と呼ぶ。
Thereafter, the
ノイズ除去部213は、まず検出部211によるドット検出の結果から、対象画素の画素値と当該対象画素を注目画素としたときのコントラスト(QuoitDiff)とを取得する(ステップ2207)。そして、コントラストの値がコントラスト閾値よりも小さい場合、または画素値が画素閾値よりも小さい場合は、ノイズ除去部213は、対象画素におけるドットタグの値を変更し、検出部211によるドットの検出を取り消す(ステップ2208、2209、2210)。
The
次に、ノイズ除去部213は、第2統計データ生成部215から取得した統計データに基づいて、対象画素を含む39×39マトリクスの部分領域に関して、その部分領域と周囲の8個の部分領域(合計9個の部分領域)のいずれかに濃度反転画素が存在するか否かを調べる。そして、濃度反転画素が存在する場合は、ノイズ除去部213は、対象画素におけるドットタグの値を変更し、検出部211によるドットの検出を取り消す(ステップ2211、2212)。
Next, on the basis of the statistical data acquired from the second statistical
なお、本実施形態では、5×5マトリクスおよび39×39マトリクスを用いて統計データを生成しノイズ除去に用いたが、各マトリクスのサイズおよび各マトリクスにおける部分領域のサイズは、上記の実施形態に限定されない。撮像部100により撮像される元画像のサイズおよび解像度、検出部210の処理能力などに応じて、適切なサイズを選択すれば良い。
In this embodiment, statistical data is generated using 5 × 5 matrix and 39 × 39 matrix and used for noise removal. However, the size of each matrix and the size of the partial area in each matrix are the same as those in the above embodiment. It is not limited. An appropriate size may be selected according to the size and resolution of the original image captured by the
<ペン・デバイスの構成>
次に、本実施の形態における画像処理装置10の具体的なハードウェア構成について説明する。ここでは、画像処理装置10を実現するペン・デバイスの構成例について説明する。
図23は、ペン・デバイスの機構を示した図である。
図示するように、ペン・デバイス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
FIG. 23 shows the mechanism of the pen device.
As illustrated, the
図9に示した画像処理装置10において、撮像部100は、例えば、図23の赤外CMOS64にて実現される。また、ドット解析部200は、例えば、図23の画像処理部61aにて実現される。さらに、復号部300は、例えば、図23のデータ処理部61bにて実現される。なお、画像処理装置10は、図23に示すようなペン・デバイス60の他、画像処理部61a又はデータ処理部61bにて実現される機能を、例えば、汎用のコンピュータで実現しても良い。
In the
画像処理部61aおよびデータ処理部61bの機能を実現するプログラムは、通信手段を介して提供したり、CD−ROM等の記録媒体に格納して提供したりすることができる。また、制御回路61に含まれる上述した不揮発性メモリに格納して提供しても良い。
Programs that realize the functions of the
10…画像処理装置、100…撮像部、200…ドット解析部、210…位置検出部、211…検出部、212…閾値設定部、213…ノイズ除去部、214…第1統計データ生成部、215…第2統計データ生成部、216…座標計算部、220…角度検出部、230…同期化部、300…復号部
DESCRIPTION OF
Claims (12)
前記検出部により検出された単位画像のうち、ノイズを検出し、除去するノイズ除去部とを備え、
前記検出部は、
一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して前記画像を走査し、当該ディスク要素の画素値の平均値とリング要素の画素値の平均値との差分および注目画素の画素値に基づいて、当該注目画素が単位画像を形成する画素か否かを判断することを特徴とする画像処理装置。 A detection unit that scans an image captured by the imaging device and detects a unit image;
Among the unit images detected by the detection unit, a noise removing unit that detects and removes noise,
The detector is
The image is scanned by applying a filter including a disk element having a certain area and a ring element provided around the disk element, and an average value of pixel values of the disk element and an average value of pixel values of the ring element An image processing apparatus that determines whether or not a target pixel is a pixel that forms a unit image based on a difference from the value and a pixel value of the target pixel.
前記画像を被う格子状領域を生成し、
前記格子状領域の各小領域に対応する前記画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、
前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消すことを特徴とする請求項1に記載の画像処理装置。 The noise removing unit
Generating a grid area covering the image;
For each area of the image corresponding to each small area of the grid area, a contrast threshold is set based on the difference between the average value of the pixel values of the disk elements and the average value of the pixel values of the ring elements in the filter And setting a pixel threshold based on the difference and the pixel value of each pixel,
Regarding the pixel forming the unit image detected by the detection unit, the difference obtained by applying the filter using the pixel as a target pixel is lower than the contrast threshold, or the pixel value of the pixel The image processing apparatus according to claim 1, wherein the detection of the unit image by the detection unit is canceled when is lower than the pixel threshold.
前記撮像部により撮像された画像を走査し、前記単位画像を検出する検出部とを備え、
前記検出部は、
一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して前記画像を走査し、当該フィルタにおける当該ディスク要素の画素値の平均値と当該リング要素の画素値の平均値との差分および注目画素の画素値に基づいて、当該注目画素が単位画像を形成する画素か否かを判断することを特徴とするペン・デバイス。 An imaging unit for imaging the surface of the medium on which the unit image is formed;
A detection unit that scans an image captured by the imaging unit and detects the unit image;
The detector is
The image is scanned by applying a filter including a disk element having a certain area and a ring element provided around the disk element, and an average value of pixel values of the disk element in the filter and the ring element A pen device that determines, based on a difference from an average value of pixel values and a pixel value of a target pixel, whether the target pixel is a pixel that forms a unit image.
前記格子状領域の各小領域に対応する前記画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、
前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消す、
ノイズ除去部をさらに備えることを特徴とする請求項6に記載のペン・デバイス。 Generating a grid area covering the image;
For each area of the image corresponding to each small area of the grid area, a contrast threshold is set based on the difference between the average value of the pixel values of the disk elements and the average value of the pixel values of the ring elements in the filter And setting a pixel threshold based on the difference and the pixel value of each pixel,
Regarding the pixel forming the unit image detected by the detection unit, the difference obtained by applying the filter using the pixel as a target pixel is lower than the contrast threshold, or the pixel value of the pixel Cancels the detection of the unit image by the detection unit when is lower than the pixel threshold,
The pen device according to claim 6, further comprising a noise removing unit.
撮像装置により撮像された画像を、一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して走査する機能と、
前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第1の閾値以上であり、かつ注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することにより、単位画像を検出する機能と
を実現させるためのプログラム。 On the computer,
A function of scanning an image picked up by the image pickup device by applying a filter including a disk element having a certain area and a ring element provided around the disk element;
When the difference between the average value of the pixel values of the disk elements and the average value of the pixel values of the ring elements in the filter is equal to or greater than a first threshold value, and the pixel value of the target pixel is equal to or greater than a second threshold value A program for realizing a function of detecting a unit image by determining that the target pixel is a pixel forming the unit image.
前記画像を被う格子状領域を生成し、
前記格子状領域の各小領域に対応する前記画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、
検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該単位画像の検出を取り消す機能をさらに実現させる、請求項10に記載のプログラム。 In the computer,
Generating a grid area covering the image;
For each area of the image corresponding to each small area of the grid area, a contrast threshold is set based on the difference between the average value of the pixel values of the disk elements and the average value of the pixel values of the ring elements in the filter And setting a pixel threshold based on the difference and the pixel value of each pixel,
Regarding the pixel forming the detected unit image, if the difference obtained by applying the filter with the pixel as a target pixel is lower than the contrast threshold, or the pixel value of the pixel is the pixel threshold The program according to claim 10, further realizing a function of canceling the detection of the unit image when the value is lower.
前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消す機能をさらに実現させる、請求項10に記載のプログラム。 In the computer,
Based on the detection result of the detection unit, the difference between the average value of the pixel values of the disk elements and the average value of the pixel values of the ring elements in the filter is equal to or greater than a predetermined threshold, and the pixel value of the target pixel is The program according to claim 10, further realizing a function of canceling the detection of the unit image by the detection unit when the pixel value of the ring element is lower than an average value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008011430A JP2009175845A (en) | 2008-01-22 | 2008-01-22 | Image processor, pen device, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008011430A JP2009175845A (en) | 2008-01-22 | 2008-01-22 | Image processor, pen device, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009175845A true JP2009175845A (en) | 2009-08-06 |
Family
ID=41030894
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008011430A Pending JP2009175845A (en) | 2008-01-22 | 2008-01-22 | Image processor, pen device, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009175845A (en) |
Cited By (4)
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 |
JP2017124300A (en) * | 2017-04-24 | 2017-07-20 | 株式会社東芝 | Image processing apparatus, therapeutic system and medical image processing method |
EP2650826A4 (en) * | 2010-12-09 | 2018-02-14 | YOSHIDA, Kenji | Display format using display device for machine-readable dot patterns |
WO2018079765A1 (en) * | 2016-10-31 | 2018-05-03 | 国立大学法人九州大学 | Image processing device, fundus imaging system, image processing method, and program |
-
2008
- 2008-01-22 JP JP2008011430A patent/JP2009175845A/en active Pending
Cited By (5)
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 |
EP2650826A4 (en) * | 2010-12-09 | 2018-02-14 | YOSHIDA, Kenji | Display format using display device for machine-readable dot patterns |
WO2018079765A1 (en) * | 2016-10-31 | 2018-05-03 | 国立大学法人九州大学 | Image processing device, fundus imaging system, image processing method, and program |
JPWO2018079765A1 (en) * | 2016-10-31 | 2019-09-19 | 国立大学法人九州大学 | Image processing apparatus, fundus imaging system, image processing method, and program |
JP2017124300A (en) * | 2017-04-24 | 2017-07-20 | 株式会社東芝 | Image processing apparatus, therapeutic system and medical image processing method |
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 | |
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 | |
JP5971098B2 (en) | Information processing apparatus and information processing program | |
JP3930502B2 (en) | Quality adjustment system and watermark quality inspection device | |
US7911653B2 (en) | Device using low visibility encoded image to manage copy history | |
JP2009175845A (en) | Image processor, pen device, and program | |
JP4670740B2 (en) | Image generating apparatus, image processing system, and program | |
JP5609469B2 (en) | Image processing apparatus, identification apparatus, electronic writing instrument, and program | |
JP5379626B2 (en) | Stack bar code information reading method and stack bar code information reading device | |
JP4985436B2 (en) | Position detection apparatus and program | |
US8657205B2 (en) | Image processing apparatus, identification apparatus, method for determining bit sequence and computer readable medium | |
JP2009175986A (en) | Image processor and program | |
JP2009175931A (en) | Image processor, pen device, and program | |
JP4973316B2 (en) | Image processing apparatus and program | |
JP4462322B2 (en) | Image processing apparatus, image forming apparatus, and program | |
JP5098441B2 (en) | Image processing apparatus and program | |
JP5125547B2 (en) | Image generating apparatus, image processing apparatus, program, and print medium | |
JP2009181346A (en) | Image processor, pen device, and program | |
JP4973317B2 (en) | Image processing apparatus and program | |
JP5434273B2 (en) | Image processing apparatus and image processing program | |
JP5115213B2 (en) | Image generating apparatus, image processing apparatus, program, and print medium | |
JP2009181347A (en) | Image-processing device, pen device, and program | |
JP2007213358A (en) | Two-dimensional code detection system and two-dimensional code detection program | |
JP2009176251A (en) | Image processing device and program | |
JP5028955B2 (en) | Image processing apparatus and program |