JP2009175845A - Image processor, pen device, and program - Google Patents

Image processor, pen device, and program Download PDF

Info

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
Application number
JP2008011430A
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 JP2008011430A priority Critical patent/JP2009175845A/en
Publication of JP2009175845A publication Critical patent/JP2009175845A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To accurately detect a pattern image by processing to reduce any labor on a device. <P>SOLUTION: This image processor is provided with: a detection part 211 for scanning an image picked up by an image pickup part, and for detecting a unit image (dot); and a noise removal part 213 for detecting and removing any noise in the unit image detected by the detection part 211. The detection part 211 scans the image by applying a filter equipped with disk elements configured of a fixed region and ring elements set in the circumference of the disk elements, and determines whether or not the pixel under consideration is a pixel forming the unit image on the basis of a 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 and the pixel value of the pixel under consideration. <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および特許文献2には、光学的に読み取った画像を、二値化回路によって二値化し、画像に記録されているドットコードを検出する技術が開示されている。
特許文献1では、二値化を行う際の閾値は、画面毎もしくは画面内のブロック毎のヒストグラムの値などを利用して決定される。すなわち、ドットコード上の染みや紙の歪み、内蔵クロックの精度などに応じて、閾値が決定される。
特許文献2では、前の画像フレームに対するドットコードの検出処理で得られる統計データに基づいて、現在の画像フレームに対して二値化を行う際の閾値を決定することについて開示されている。
In this type of technology, it is very important to correctly detect the pattern image.
Patent Documents 1 and 2 disclose a technique for binarizing an optically read image by a binarization circuit and detecting a dot code recorded in the image.
In Patent Document 1, a threshold value for binarization is determined using a histogram value for each screen or each block in the screen. That is, the threshold is determined according to the stain on the dot code, paper distortion, the accuracy of the built-in clock, and the like.
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.
Patent Document 3 discloses a technique for detecting a minute image by generating a Q filter (quant filter) from a point spread function of an optical system that captures an image and applying it to the image.

特開平6−231466号公報JP-A-6-231466 国際公開第03/001450号パンフレットInternational Publication No. 03/001450 Pamphlet 特開2005−164446号公報JP 2005-164446 A

処理能力が制限されるペン・デバイスのような画像処理装置でパターン画像の検出を行うためには、パターン画像の検出のための処理は、パターン画像を正しく検出することが要求されるとともに、プロセッサの負荷ができるだけ軽い処理であることが望ましい。   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 claim 1 is a detection unit that scans an image captured by an imaging device and detects a unit image, and a noise removal unit that detects and removes noise from the unit image detected by the detection unit. The detection unit scans the image by applying a filter including a disk element having a certain area and a ring element provided around the disk element, and averages the pixel values of the disk element. An image processing apparatus that determines whether or not a target pixel is a pixel forming a unit image based on a difference between a value and an average value of pixel values of ring elements and a pixel value of the target pixel.
In the invention according to claim 2, the detection unit is configured such that a 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 is equal to or more than a first threshold, and the attention is paid to The image processing apparatus according to claim 1, wherein when the pixel value of the pixel is equal to or greater than a second threshold value, the target pixel is determined to be a pixel that forms a unit image.
The invention according to claim 3 is the image processing apparatus according to claim 2, further comprising a threshold value setting unit that dynamically sets the first threshold value used in the detection unit.
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 claim 1, wherein the detection of the unit image by the detection unit is canceled when the detection unit is low.
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 claim 6 includes an imaging unit that captures the surface of the medium on which the unit image is formed, and a detection unit that scans the image captured by the imaging unit and detects the unit image. Scans the image 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 The pen device is characterized in that, based on a difference from an average value of pixel values of elements and a pixel value of a target pixel, it is determined whether or not the target pixel is a pixel forming a unit image.
In the invention according to claim 7, the detection unit is configured such that a 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 is equal to or more than a first threshold value, and the attention is made. The pen device according to claim 6, wherein when the pixel value of the pixel is equal to or greater than a second threshold value, the target pixel is determined to be a pixel that forms a unit image.
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 claim 6, further comprising a noise removing unit that cancels the detection of the unit image by the detecting unit.
In the invention according to claim 9, based on the detection result of the detection unit, a difference between an average value of the pixel values of the disk elements and an average value of the pixel values of the ring elements in the filter is a predetermined threshold value or more, And a noise removal unit that cancels 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. The pen device described.
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 claim 10, further realizing a function of canceling detection of a unit image.
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 claim 3, the first threshold value can be dynamically changed.
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 Claim 6, in a pen device, a unit image can be detected by a light load process.
According to the invention which concerns on Claim 7, in a pen device, a unit image can be correctly detected by the process with a light load.
According to the invention which concerns on Claim 8, the precision of a unit image detection can be improved by removing a noise in a pen device by a light load process.
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(=)通りの情報を表現する。また、図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とを備える。
位置検出部210は、撮像部100から受け取った8ビットの画像からドットの位置を検出する。
角度検出部220は、位置検出部210により検出された画像上のドットの整列角度を検出する。
同期化部230は、位置検出部210および角度検出部220の検出結果として得られたドットの配列を、2次元のビット配列に変換する。この変換を同期化と呼び、得られたビット配列における各ビットの並びを同期ラインと呼ぶ。この同期化により、8ビットの画像の画像は2値データとなる。また、角度検出部220により検出されたドットの整列角度はビット列(同期ライン)の角度となる。
得られたビット配列と、同期ラインの角度および間隔の情報は、復号部300に送られる。
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.
The position detection unit 210 detects a dot position from the 8-bit image received from the imaging unit 100.
The angle detection unit 220 detects the alignment angle of dots on the image detected by the position detection unit 210.
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. By this synchronization, an 8-bit image becomes binary data. The dot alignment angle detected by the angle detector 220 is the angle of the bit string (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).

<位置検出部の機能>
次に、ドット解析部200の位置検出部210の機能についてさらに詳細に説明する。
図11は、位置検出部210の機能構成を示す図である。
位置検出部210は、撮像部100により撮像された画像からドットの画像を抽出する機能と、検出されたドットの座標を計算する機能とを備える。具体的には、図11に示すように、ドット検出機能として、検出部211と、閾値設定部212と、ノイズ除去部213と、第1統計データ生成部214と、第2統計データ生成部215とを備える。また、座標計算機能として、座標計算部216を備える。
<Function of position detector>
Next, the function of the position detection unit 210 of the dot analysis unit 200 will be described in more detail.
FIG. 11 is a diagram illustrating a functional configuration of the position detection unit 210.
The position detection unit 210 has a function of extracting a dot image from an image captured by the imaging unit 100 and a function of calculating the coordinates of the detected dot. Specifically, as shown in FIG. 11, as a dot detection function, a detection unit 211, a threshold setting unit 212, a noise removal unit 213, a first statistical data generation unit 214, and a second statistical data generation unit 215 are provided. With. In addition, a coordinate calculation unit 216 is provided as a coordinate calculation function.

検出部211は、撮像部100により撮像された画像を解析し、ドットの画像を検出する。撮像部100により撮像された画像は多値画像であるが、検出部211によりドットが検出されることで、2値画像に変換される。本実施形態では、画像の解析にクオイト・フィルタ(Quoit Filter)が用いられる。検出部211によるドットの検出処理の詳細については後述する。閾値設定部212は、検出部211によるドットの検出に用いられる閾値を設定する。言い換えれば、閾値設定部212、画像からドットを検出するための判断基準を設定する判断基準設定部として機能する。この閾値は、固定値であっても良いが、復号処理の成否等に応じて動的に設定するようにしても良い。   The detection unit 211 analyzes the image captured by the imaging unit 100 and detects a dot image. The image picked up by the image pickup unit 100 is a multi-valued image, but is converted into a binary image by detecting dots by the detecting unit 211. In the present embodiment, a quit filter is used for image analysis. Details of the dot detection processing by the detection unit 211 will be described later. The threshold setting unit 212 sets a threshold used for dot detection by the detection unit 211. In other words, the threshold setting unit 212 functions as a determination criterion setting unit that sets a determination criterion for detecting dots from an image. This threshold value may be a fixed value, but may be set dynamically according to the success or failure of the decoding process.

ノイズ除去部213は、検出部211によるドットの検出結果からノイズを検出し、除去する。第1統計データ生成部214および第2統計データ生成部215は、ノイズ除去部213によるノイズ除去の処理に用いられる統計データを生成する。ノイズ除去部によるノイズの除去処理の詳細については後述する。   The noise removal unit 213 detects and removes noise from the dot detection result by the detection unit 211. The first statistical data generation unit 214 and the second statistical data generation unit 215 generate statistical data used for noise removal processing by the noise removal unit 213. Details of the noise removal processing by the noise removal unit will be described later.

座標計算部216は、上記のドット検出機能により検出されたドットの画像(撮像部100により撮像された画像)上の位置を表す座標値を計算する。これにより、各ドットの位置関係が特定されるため、複数のドットにより構成される単位符号パターン(図2乃至図4参照)が認識され、単位符号パターンにより記録された情報の復号が可能となる。   The coordinate calculation unit 216 calculates a coordinate value representing the position on the dot image (the image captured by the imaging unit 100) detected by the dot detection function. Thereby, since the positional relationship of each dot is specified, a unit code pattern (see FIGS. 2 to 4) composed of a plurality of dots is recognized, and information recorded by the unit code pattern can be decoded. .

<クオイト・フィルタおよびドット検出処理>
次に、本実施形態によるドットの検出および座標計算に用いられるクオイト・フィルタについて説明する。
クオイト・フィルタは、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 detection unit 211 scans the image captured by the image capturing unit 100 using this quantile filter, and evaluates the difference (height difference) between the pixel value of the disk element and the pixel value of the ring element. Judgment is made.

図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 imaging unit 100, the dot has a higher pixel value than the surrounding area. For this reason, when the positions of the disk element D and the dot coincide with each other, the difference in level between the pixel value of the disk element D and the pixel value of the ring element R, which is the output of the quoting filter, is large, and the pixel value of the disk element D is high. Therefore, the detection unit 211 applies a quoting filter to the pixel value obtained by scanning the image, and the difference in height between the pixel value of the disk element D and the pixel value of the ring element R is large, and the pixel value of the disk element D It is determined that a dot has been detected when an output (detection result) such that is high is obtained.

図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 detection unit 211.
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 center 3 pixels × 3 pixels and the four corners 3 pixels (12 pixels in total) in the 7 pixel × 7 pixel square range). = 49-9-12). The center 3 pixels × 3 pixels correspond to the disk element D. From this ring element R, an average value (RingAvg) of 28 pixel values is acquired. In addition, the center pixel of the disk element D (indicated by a bold line in the figure) is a pixel of interest in the process using the quantile filter.

図13(c)に示すように、検出部211の出力は8ビットのデータとする。このうち、最下位ビット(LSB)から7ビット目までで、クオイト・フィルタの出力である、ディスク要素Dの平均値(DiskAvg)とリング要素Rの平均値(RingAvg)の差分(QuoitDiff)を記録する。最上位ビット(MSB)は、注目画素がドットであると判断されたことを表すタグ(以下、ドットタグと呼ぶ)として用いられる。   As shown in FIG. 13C, the output of the detection unit 211 is 8-bit data. Of these, the difference filter (QuitDiff) between the average value (DiskAvg) of the disk element D and the average value (RingAvg) of the ring element R, which is the output of the quantile filter, is recorded from the least significant bit (LSB) to the seventh bit. To do. The most significant bit (MSB) is used as a tag (hereinafter referred to as a dot tag) indicating that the target pixel is determined to be a dot.

図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 detection unit 211 detects dots while scanning from the upper left corner to the lower right corner of the image by aligning the center of the quantile filter with the target pixel. Dot detection is performed by a two-step process.

まず、ディスク要素とリング要素の平均値の差分(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 threshold setting unit 212. Details of the first threshold value setting method by the threshold value setting unit 212 will be described later.

注目画素に関して差分の値が第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 detection unit 211 calculates an inversion level (RevDiff) for the target pixel. Here, the inversion level is a difference obtained by subtracting the pixel value of the target pixel from the average value (RingAvg) of the ring elements. Therefore, the inversion level value is positive when the pixel value of the target pixel is lower. When the obtained inversion level is greater than the third threshold (that is, when the pixel value of the target pixel is lower than the average value of the ring element), the detection unit 211 causes regular reflection to occur in the target pixel. Judge that

図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 detection unit 211.
Prior to the processing by the detection unit 211 for the image frame, first, the threshold value setting unit 212 sets a first threshold value (TH (1)) (step 1501). A method for setting the first threshold will be described later (see FIG. 17). After the first threshold (TH (1)) is set, the detection unit 211 scans the image (image frame) captured by the imaging unit 100 by applying a quantile filter and performs the following loop processing. Is repeated over the entire image for each pixel.

検出部211は、まず画像から7画素×7画素の領域を切り出して、画素値を取得する(ステップ1502)。7画素×7画素は、図13に示したクオイト・フィルタが収まるサイズである。検出部211は、取得した画素値にクオイト・フィルタを適用し、ディスク要素に対応する画素の画素値の平均値(DiskAvg)および最大値(DiskMax)を計算する(ステップ1503)。また、検出部211は、クオイト・フィルタのリング要素に対応する画素の画素値の平均値(RingAvg)を計算する(ステップ1504)。そして、検出部211は、クオイト・フィルタのディスク要素の画素値の平均値とリング要素の画素値の平均値との差分(QuoitDiff=DiskAvg−RingAvg)を計算し(ステップ1505)、得られた値と第1の閾値(TH(1))とを比較する。   First, the detection unit 211 cuts out an area of 7 pixels × 7 pixels from the image, and acquires a pixel value (step 1502). The size of 7 pixels × 7 pixels is a size that can accommodate the quantile filter shown in FIG. The detection unit 211 applies a quoting filter to the acquired pixel value, and calculates an average value (DiskAvg) and a maximum value (DiskMax) of the pixel values corresponding to the disk elements (step 1503). In addition, the detection unit 211 calculates an average value (RingAvg) of pixel values of pixels corresponding to the ring element of the quantile filter (Step 1504). Then, the detection unit 211 calculates a difference (QuitDiff = DiskAvg−RingAvg) between the average value of the pixel values of the disk elements of the quoting filter and the average value of the pixel values of the ring elements (Step 1505). And the first threshold value (TH (1)).

差分値(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 detection unit 211 detects the lower 7 bits of the 8-bit output data shown in FIG. Is used to record the difference value (QuitDiff) (step 1507). Next, the detection unit 211 compares the pixel value V of the target pixel located at the center of the quantile filter with the second threshold value (TH (2)) from the pixel value acquired in Step 1502. When the second threshold value (TH (2)) is a variable value determined based on the difference value (QuitDiff), it is calculated after the determination in step 1506.

注目画素の画素値が第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 detection unit 211 detects the most significant bit (8 bits of output data illustrated in FIG. 13C). The dot tag is set to a value indicating that it is a dot (step 1509). Then, the 8-bit output data is transmitted to the first statistical data generation unit 214 (step 1510). The first statistical data generation unit 214 generates statistical data to be described later according to the acquired output data. If the pixel value of the pixel of interest is smaller than the second threshold value (TH (2)) (No in step 1508), it is determined that this pixel does not form a dot. It is not transmitted to the first statistical data generation unit 214.

一方、差分値(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 detection unit 211 determines the inversion level (RevDiff = RingAvg−the pixel value of the target pixel) in the target pixel. V) is calculated (step 1511). If the obtained value is larger than the third threshold (TH (3)), it is determined as regular reflection noise, and the second statistical data generation unit 215 is notified that this noise has been detected (step 1512). 1513). The second statistical data generation unit 215 generates statistical data to be described later in accordance with the acquired regular reflection noise detection notification.

以上のようにして、画像フレームに対してドットの検出が行われ、統計データが生成された後、ノイズ除去部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 value setting part 212 is demonstrated in detail.
Referring to FIG. 11, the threshold setting unit 212 is supplied with a decoding result by the decoding unit 300 and a stroke start signal. The threshold value setting unit 212 receives information on the success or failure of decoding included in the decoding result for each image frame, and dynamically sets the first threshold value described above based on the accumulated decoding history. Moreover, the threshold value setting part 212 initializes a decoding log | history, when a stroke start signal is received.

画像処理装置10が後述するペン・デバイスである場合、媒体である紙面上を画像処理装置10で走査する際の走査位置や走査状態によって画像の状態が大きく変動することが想定される。そこで、本実施形態では、実際の復号の成否に基づいて、ドット検出に用いられる上記の第1の閾値を動的に変化させることで、このような画像の状態の変動に対応する。なお、ストローク開始信号により復号履歴が初期化されるので、この第1の閾値の動的な設定は、ペン・デバイスを用いた筆記のストロークごとに個別に行われることとなる。   When the image processing apparatus 10 is a pen device, which will be described later, it is assumed that the state of the image varies greatly depending on the scanning position and the scanning state when the image processing apparatus 10 scans the paper surface that is a medium. Therefore, in the present embodiment, the first threshold value used for dot detection is dynamically changed based on the success or failure of actual decoding to cope with such a change in the image state. Since the decoding history is initialized by the stroke start signal, the dynamic setting of the first threshold value is individually performed for each writing stroke using the pen device.

閾値設定部212により設定される閾値に関しては、予め上限(設定上限)、下限(設定下限)、初期値が定められる。閾値設定部212は、直前の画像フレームに対する復号が成功している場合、現在の画像フレームからのドット検出に用いる第1の閾値として、直前の画像フレームからのドット検出に用いた値をそのまま用いる(すなわち、閾値を変更しない)。一方、直前の画像フレームに対する復号が失敗した場合、現在の画像フレームからのドット検出に用いる第1の閾値を、復号履歴に基づき直前の画像フレームとは異なる値に設定する。   Regarding the threshold value set by the threshold value setting unit 212, an upper limit (setting upper limit), a lower limit (setting lower limit), and an initial value are determined in advance. When the decoding for the immediately preceding image frame is successful, the threshold setting unit 212 uses the value used for dot detection from the immediately preceding image frame as it is as the first threshold used for dot detection from the current image frame. (Ie, do not change the threshold). On the other hand, when the decoding for the immediately preceding image frame fails, the first threshold used for dot detection from the current image frame is set to a value different from the immediately preceding image frame based on the decoding history.

閾値設定部212は、復号履歴として、取得した復号結果に基づき、閾値に対する復号の成功頻度に関する度数分布のデータを生成する。図16は、この度数分布の例を視覚的に表現したヒストグラムである。ここで、復号の成功頻度とは、単に復号が成功した回数ではなく、所定の閾値において、復号が成功した回数から復号が失敗した回数を減算した値(ただし、最小値は0)である。   The threshold setting unit 212 generates, as a decoding history, frequency distribution data related to the successful decoding frequency with respect to the threshold based on the acquired decoding result. FIG. 16 is a histogram that visually represents an example of the frequency distribution. Here, the successful decoding frequency is not simply the number of successful decodings, but a value obtained by subtracting the number of successful decodings from the number of successful decodings at a predetermined threshold (however, the minimum value is 0).

図16を参照すると、閾値設定部212は、まず、第1の閾値を初期値に設定する。そして、復号が成功するまで、画像フレームごとに第1の閾値を順次下げていく。復号が成功したならば、そのときの第1の閾値における成功頻度の度数を1加算する。成功頻度の度数が0でない所定の第1の閾値において、復号が失敗した場合は、その第1の閾値における成功頻度の度数を1減算する。   Referring to FIG. 16, the threshold setting unit 212 first sets the first threshold to an initial value. Then, the first threshold value is sequentially lowered for each image frame until decoding is successful. If the decoding is successful, 1 is added to the frequency of the success frequency at the first threshold value at that time. When decoding fails at a predetermined first threshold value where the frequency of success frequency is not 0, 1 is subtracted from the frequency of success frequency at the first threshold value.

度数分布のデータが空の場合(例えば、ストローク開始から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 value setting unit 212, and shows the detailed contents of the processing in step 1501 shown in FIG.
When the image frame to be processed by the detection unit 211 is the head image frame in the writing stroke by the pen device (Yes in Step 1701), the threshold setting unit 212 performs frequency distribution data (decoding history) regarding the decoding success frequency. ) Is initialized (step 1702). Then, the first threshold value is set to an initial value (step 1703). Whether or not the image frame is the first image frame of the stroke is identified by whether or not a stroke start signal is received.

検出部211による処理対象の画像フレームが、ペン・デバイスによる筆記のストロークにおける先頭の画像フレームでない場合(ステップ1701でNo)、閾値設定部212は、直前の画像フレームからのドット検出に用いられた第1の閾値(THprev)の度数分布データにおけるインデックスを取得する(ステップ1704)。そして、復号部300からフィードバックされる復号結果に基づき、直前の画像フレームに対する復号が成功したか否かを調べる。   When the image frame to be processed by the detection unit 211 is not the first image frame in the writing stroke by the pen device (No in step 1701), the threshold setting unit 212 is used for dot detection from the immediately preceding image frame. An index in the frequency distribution data of the first threshold (THprev) is acquired (step 1704). Then, based on the decoding result fed back from the decoding unit 300, it is checked whether or not the decoding for the immediately preceding image frame has succeeded.

直前の画像フレームの復号が成功した場合(ステップ1705でYes)、閾値設定部212は、取得したインデックスの度数分布データの度数を1加算する(ステップ1706)。この場合、画像フレームからのドット検出に用いる第1の閾値は変更せず、直前の画像フレームからのドット検出に用いられた第1の閾値がそのまま用いられる。   When decoding of the immediately preceding image frame is successful (Yes in Step 1705), the threshold setting unit 212 adds 1 to the frequency of the frequency distribution data of the acquired index (Step 1706). In this case, the first threshold value used for dot detection from the image frame is not changed, and the first threshold value used for dot detection from the immediately preceding image frame is used as it is.

一方、直前の画像フレームの復号が失敗した場合(ステップ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 threshold setting unit 212 first checks whether the frequency of the frequency distribution data of the acquired index is 0 (step 1707), and if not, subtracts 1 from the frequency (step 1708). If the frequency is 0 in step 1707, the minimum value of the frequency is set to 0, and no subtraction is performed.

次に、閾値設定部212は、度数分布データにおいて度数が最大のインデックス(Idx_Max)を取得する(ステップ1709)。度数分布データが空でなければ(ステップ1710でNo)、最大度数インデックス(Idx_Max)が得られるので、そのインデックスの閾値(THmax)を求める(ステップ1711)。そして、この閾値(THmax)と、ステップ1704で求めた直前の画像フレームからのドット検出に用いられた第1の閾値(THprev)とを比較する。   Next, the threshold value setting unit 212 acquires the index (Idx_Max) having the highest frequency in the frequency distribution data (step 1709). If the frequency distribution data is not empty (No in step 1710), the maximum frequency index (Idx_Max) is obtained, and the threshold value (THmax) of the index is obtained (step 1711). Then, the threshold value (THmax) is compared with the first threshold value (THprev) used for dot detection from the immediately preceding image frame obtained in step 1704.

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 threshold setting unit 212 sets the threshold (THmax) of the maximum frequency index to the first threshold used for dot detection from the current image frame (step 1713). . On the other hand, if THmax = THprev (Yes in step 1712), then the threshold setting unit 212 checks whether THmax is a set lower limit (lower limit). If THmax is not the setting lower limit (No in step 1714), a value (THmax-1) that is one smaller than THmax is set as the first threshold used for dot detection from the current image frame (step 1715). ). On the other hand, if THmax is the setting lower limit (Yes in step 1714), the threshold value (THmax) of the maximum frequency index is set to the first threshold value used for dot detection from the current image frame (step 1713).

ストロークが開始されてから復号が成功しておらず、度数分布データが空である場合(ステップ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 threshold setting unit 212 then uses the first used for dot detection from the previous image frame. The threshold value (THprev) of 1 is compared with the set lower limit (lower limit value). If THprev is larger than the set lower limit (Yes in step 1716), a value (THdet) obtained by lowering THprev by a certain value is calculated (step 1717). If the calculated value (THdet) is smaller than the set lower limit, THdet is set to the set lower limit (steps 1718 and 1719). Then, the obtained value (THdet) is set as a first threshold used for dot detection from the current image frame (step 1720). When THprev is the setting lower limit (No in step 1716), the threshold setting unit 212 sets the setting upper limit value (upper limit) as the first threshold used for dot detection from the current image frame. (Step 1721).

なお、本実施形態では、ドットの検出にクオイト・フィルタを使用するため、クオイト・フィルタのディスク要素における画素値の平均値とリング要素における画素値の平均値との差分を評価するための第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 threshold setting unit 212. However, regardless of whether or not a quantile filter is used, in general, as a technique for detecting a specific dot from an image, a pixel corresponding to a dot or a pixel between a certain region including the pixel and another part of the image is used. Evaluation is performed by comparing a difference between values with a predetermined threshold value. Even in such other methods, it is necessary to cope with fluctuations in the image state caused by the scanning position and the scanning state. Therefore, the method of dynamically changing the threshold value used for dot detection based on the success or failure of actual decoding may be applied to other various dot detection methods.

<ノイズ除去処理>
本実施形態では、ノイズ除去処理として、通常のノイズを除去する処理と、正反射を除去する処理とを行う。正反射とは、画像の読み取りの際に、トナー等で紙面上に形成された画像が、照射された光を全反射し、撮像部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 imaging unit 100. Total reflection occurs in units of one dot.

まず、通常のノイズ除去について説明する。
この処理では、撮像部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 imaging unit 100. The Further, this 5 × 5 matrix is converted into a grid-like region (10 × 10 matrix) in which 10 × 10 100 regions are arranged. A threshold is set for each partial region of the 10 × 10 matrix, and noise is detected and removed. In the present embodiment, since the size of the image captured by the imaging unit 100 is 156 pixels × 156 pixels as described above, the entire image is covered with the 10 × 10 matrix generated as described above.

まず、第1統計データ生成部214が、上記の5×5マトリクスを設定し、3種類の統計データを生成して5×5マトリクスの各部分領域に登録する。統計データは、コントラストの積算値と、ディスク要素の最大値(9画素の画素値の最大値)と、検出ドット数である。ここで、コントラストとは、クオイト・フィルタによるディスク要素とリング要素の差分(QuoitDiff)である。この統計データの生成は、検出部211の出力を順次受け付けることにより、検出部211による検出処理と並行して行って良い。   First, the first statistical data generation unit 214 sets the 5 × 5 matrix, generates three types of statistical data, and registers them in each partial region of the 5 × 5 matrix. The statistical data includes the integrated value of the contrast, the maximum value of the disk element (the maximum value of the pixel values of 9 pixels), and the number of detected dots. Here, the contrast is a difference (QuitDiff) between a disk element and a ring element by a quantile filter. The generation of the statistical data may be performed in parallel with the detection process by the detection unit 211 by sequentially receiving the output of the detection unit 211.

図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 data generation unit 214 integrates the value of the difference (QuitDiff) obtained for each pixel included in the partial area for each partial area constituting the 5 × 5 matrix, and generates statistical statistical data (FIG. 18). Of Sc00 to Sc44). Further, for each partial area constituting the 5 × 5 matrix, the maximum value (DiskMax) of the disk element of the quart filter for each pixel included in the partial area is selected, and the statistical data of the maximum value (FIG. 18). Of Max00 to Max44). Further, the number of detected dots is counted for each partial area constituting the 5 × 5 matrix, and statistical data (Cnt00 to Cnt44 in FIG. 18) of the detected dot number is generated. Here, the number of detected dots is the number of output data of the quoting filter relating to each pixel included in the partial area, the value indicating that the dot tag is a dot. The generated statistical data is sent to the noise removing unit 213.

ノイズ除去部213は、第1統計データ生成部214から取得した統計データを用いて、コントラストの閾値および画素値の閾値を生成する。そして、検出部211によりドットとして検出された位置における元画像(撮像部100により撮像された画像)とこれらの閾値とを比較する。元画像の画素値が閾値より低い場合、または元画像における当該画素を注目画素としたときのコントラスト(QuoitDiff)が閾値より低い場合、ノイズ除去部213は、検出されたドットがノイズであると判断し、検出部211によるこのドットの検出を取り消す。これにより、ノイズが除去される。   The noise removal unit 213 uses the statistical data acquired from the first statistical data generation unit 214 to generate a contrast threshold value and a pixel value threshold value. Then, the original image (image captured by the image capturing unit 100) at the position detected as a dot by the detection unit 211 is compared with these threshold values. When the pixel value of the original image is lower than the threshold, or when the contrast (QuitDiff) when the pixel in the original image is the target pixel is lower than the threshold, the noise removing unit 213 determines that the detected dot is noise. Then, the detection of the dots by the detection unit 211 is canceled. Thereby, noise is removed.

ここで、コントラストおよび画素値の閾値の生成方法について詳細に説明する。
ノイズ除去部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 noise removal unit 213 obtains the average value and the maximum value of the contrast for each partial region constituting the 5 × 5 matrix. The average value is obtained by dividing the integrated value of contrast acquired from the first statistical data generation unit 214 by the number of detected dots. When the number of detected dots is 0 for a predetermined partial area, linear interpolation is performed using the average value of adjacent partial areas.

次に、ノイズ除去部213は、5×5マトリクスの各部分領域を4分割して10個×10個の100領域で構成される10×10マトリクスとする。第1統計データ生成部214から取得した統計データやノイズ除去部213が求めたコントラストの平均値および最大値は、この4分割された小領域ごとのデータに変換される。このデータは、例えば、5×5マトリクスにおける部分領域のデータを隣接する部分領域との間で線形補間することで得られる。   Next, the noise removing unit 213 divides each partial region of the 5 × 5 matrix into four to form a 10 × 10 matrix composed of 10 × 10 100 regions. The statistical data acquired from the first statistical data generation unit 214 and the average value and maximum value of the contrast obtained by the noise removal unit 213 are converted into data for each of the four small areas. This data can be obtained, for example, by linearly interpolating partial area data in a 5 × 5 matrix between adjacent partial areas.

図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 noise removing unit 213 calculates a contrast threshold value of the 10 × 10 matrix. FIG. 20A shows an example of the contrast threshold (Ctr00 to Ctr99). The contrast threshold (Ctr) is determined to be, for example, 25% of the maximum value by using the maximum value of the contrast obtained for each small region of the 10 × 10 matrix. By determining based on the maximum contrast value, the contrast threshold value varies according to the sharpness of the entire image captured by the imaging unit 100.

また、ノイズ除去部213は、10×10マトリクスの画素閾値を算出する。図20(b)に、画素閾値の例を示す(Px00〜Px99)。画素閾値(Px)は、例えば、10×10マトリクスの小領域のデータにそれぞれ変換された、コントラストの平均値Ctおよびディスク要素の画素値の最大値Mxを用いて、

Px=(Mx−Ct)/k (ただし、kは2〜4程度の値)

等のように求められる。
In addition, the noise removing unit 213 calculates a pixel threshold value of a 10 × 10 matrix. FIG. 20B shows an example of the pixel threshold (Px00 to Px99). For example, the pixel threshold (Px) is obtained by using the average value Ct of the contrast and the maximum value Mx of the pixel value of the disk element respectively converted into data of a small area of a 10 × 10 matrix.

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 image capturing unit 100 is set. The Then, regular reflection noise is detected and removed for each partial region of the 39 × 39 matrix. In the present embodiment, since the size of the image captured by the imaging unit 100 is 156 pixels × 156 pixels as described above, the entire image is covered with the 39 × 39 matrix generated as described above.

まず、第2統計データ生成部215が、上記の39×39マトリクスを設定する。そして、この39×39マトリクスの部分領域ごとに、検出部211において正反射が起こっていると判断された画素(以下、濃度反転画素と呼ぶ)の数をカウントする。この処理は、検出部211の出力を順次受け付けることにより、検出部211による検出処理と並行して行って良い。そして、得られたデータは、ノイズ除去部213に送られる。   First, the second statistical data generation unit 215 sets the 39 × 39 matrix. Then, for each partial region of the 39 × 39 matrix, the number of pixels (hereinafter referred to as density inversion pixels) determined to be regular reflection in the detection unit 211 is counted. This process may be performed in parallel with the detection process by the detection unit 211 by sequentially receiving the output of the detection unit 211. The obtained data is sent to the noise removal unit 213.

図21は、39×39マトリクスの例を示す図である。
ノイズ除去部213は、39×39マトリクスの各部分領域に順次着目し、着目した部分領域およびこの部分領域の周囲に隣接する8個の部分領域のいずれかに濃度反転画素が存在する場合、着目した部分領域における検出部211によるドットの検出を取り消す。例えば、図21において、グレーの部分領域に着目している場合、太枠で囲まれた9個の部分領域のいずれかに濃度反転画素が存在するならば、斜線を付した部分領域におけるドットの検出が取り消される。これにより、正反射ノイズが除去される。
FIG. 21 is a diagram illustrating an example of a 39 × 39 matrix.
The noise removing unit 213 sequentially pays attention to each partial area of the 39 × 39 matrix, and when there is a density inversion pixel in any of the focused partial area and eight partial areas adjacent to this partial area, The detection of the dots by the detection unit 211 in the partial area is canceled. For example, in FIG. 21, when attention is paid to a gray partial area, if there is a density inversion pixel in any of the nine partial areas surrounded by a thick frame, the dot in the hatched partial area is displayed. Detection is canceled. Thereby, regular reflection noise is removed.

図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 noise removing unit 213, and shows the detailed contents of the processing of step 1514 shown in FIG.
First, the noise removal unit 213 calculates the average value and the maximum value of the contrast (QuitDiff) in each partial region of the 5 × 5 matrix based on the statistical data acquired from the first statistical data generation unit 214 (Step 2201, 2202). Next, the noise removing unit 213 converts the obtained data into 10 × 10 matrix data (step 2203). Then, a contrast threshold value is calculated (step 2204).

また、ノイズ除去部213は、第1統計データ生成部214から取得したクオイト・フィルタにおけるディスク要素の最大値の統計データを、10×10マトリクスのデータに変換する(ステップ2205)。そして、画素閾値を算出する(ステップ2206)。   Further, the noise removing unit 213 converts the statistical data of the maximum value of the disk element in the quantile filter acquired from the first statistical data generating unit 214 into 10 × 10 matrix data (step 2205). Then, a pixel threshold value is calculated (step 2206).

この後、ノイズ除去部213は、画像(画像フレーム)を走査しながら、以下のループ処理を画素ごとに画像全体にわたって繰り返す。ただし、検出部211によるドットの検出結果からノイズを除去する処理であるから、実際には、検出部211の出力におけるドットタグがドットであることを表す値となっている画素のみについて処理が行われる。また、各ループにおいて処理対象となっている画素を対象画素と呼ぶ。   Thereafter, the noise removing unit 213 repeats the following loop processing for each pixel over the entire image while scanning the image (image frame). However, since it is a process of removing noise from the detection result of dots by the detection unit 211, in actuality, the process is performed only for pixels whose dot tag in the output of the detection unit 211 has a value indicating that it is a dot. Is called. A pixel that is a processing target in each loop is referred to as a target pixel.

ノイズ除去部213は、まず検出部211によるドット検出の結果から、対象画素の画素値と当該対象画素を注目画素としたときのコントラスト(QuoitDiff)とを取得する(ステップ2207)。そして、コントラストの値がコントラスト閾値よりも小さい場合、または画素値が画素閾値よりも小さい場合は、ノイズ除去部213は、対象画素におけるドットタグの値を変更し、検出部211によるドットの検出を取り消す(ステップ2208、2209、2210)。   The noise removing unit 213 first obtains the pixel value of the target pixel and the contrast (QuitDiff) when the target pixel is the target pixel from the result of dot detection by the detection unit 211 (step 2207). When the contrast value is smaller than the contrast threshold, or when the pixel value is smaller than the pixel threshold, the noise removing unit 213 changes the dot tag value in the target pixel, and the detection unit 211 detects the dot. Cancel (steps 2208, 2209, 2210).

次に、ノイズ除去部213は、第2統計データ生成部215から取得した統計データに基づいて、対象画素を含む39×39マトリクスの部分領域に関して、その部分領域と周囲の8個の部分領域(合計9個の部分領域)のいずれかに濃度反転画素が存在するか否かを調べる。そして、濃度反転画素が存在する場合は、ノイズ除去部213は、対象画素におけるドットタグの値を変更し、検出部211によるドットの検出を取り消す(ステップ2211、2212)。   Next, on the basis of the statistical data acquired from the second statistical data generation unit 215, the noise removal unit 213 relates to the partial region of the 39 × 39 matrix including the target pixel and eight surrounding partial regions ( It is checked whether or not density inversion pixels exist in any of a total of nine partial areas). If there is a density inversion pixel, the noise removal unit 213 changes the value of the dot tag in the target pixel and cancels the dot detection by the detection unit 211 (steps 2211 and 2122).

なお、本実施形態では、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 imaging unit 100, the processing capability of the detection unit 210, and the like.

<ペン・デバイスの構成>
次に、本実施の形態における画像処理装置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 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. 23 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は、例えば、図23の赤外CMOS64にて実現される。また、ドット解析部200は、例えば、図23の画像処理部61aにて実現される。さらに、復号部300は、例えば、図23のデータ処理部61bにて実現される。なお、画像処理装置10は、図23に示すようなペン・デバイス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. 23. 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. 23, the image processing apparatus 10 may realize functions realized by the image processing unit 61a or the data processing unit 61b with, 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. 本実施形態の位置検出部の機能構成を示す図である。It is a figure which shows the function structure of the position detection part of this embodiment. 本実施形態におけるクオイト・フィルタを用いたドット検出の概念を説明する図である。It is a figure explaining the concept of the dot detection using the quantum filter in this embodiment. 本実施形態で用いられるクオイト・フィルタの構成例を示す図である。It is a figure which shows the structural example of the quantile filter used by this embodiment. 図13に示したクオイト・フィルタを用いて画像を走査する様子を示す図である。It is a figure which shows a mode that an image is scanned using the quantit filter shown in FIG. 本実施形態の検出部によるドット検出処理を説明するフローチャートである。It is a flowchart explaining the dot detection process by the detection part of this embodiment. 復号の成功頻度に関する度数分布の例を視覚的に表現したヒストグラムである。It is the histogram which expressed the example of the frequency distribution regarding the success frequency of decoding visually. 本実施形態の閾値設定部による第1の閾値の設定動作を説明するフローチャートである。It is a flowchart explaining the setting operation | movement of the 1st threshold value by the threshold value setting part of this embodiment. 本実施形態で用いられる5×5マトリクスおよび統計データの例を示す図である。It is a figure which shows the example of 5 * 5 matrix and statistical data which are used by this embodiment. 部分領域の分割の様子を示す図である。It is a figure which shows the mode of the division | segmentation of a partial area. 本実施形態で用いられるコントラスト閾値および画素閾値の例を示す図である。It is a figure which shows the example of the contrast threshold value and pixel threshold value which are used by this embodiment. 本実施形態で用いられる39×39マトリクスおよび統計データの例を示す図である。It is a figure which shows the example of the 39 * 39 matrix and statistical data which are used by this embodiment. 本実施形態のノイズ除去部によるノイズ除去の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement of the noise removal by the noise removal part of this embodiment. 画像処理装置であるペン・デバイスの機構を示した図である。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…位置検出部、211…検出部、212…閾値設定部、213…ノイズ除去部、214…第1統計データ生成部、215…第2統計データ生成部、216…座標計算部、220…角度検出部、230…同期化部、300…復号部 DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 100 ... Imaging part, 200 ... Dot analysis part, 210 ... Position detection part, 211 ... Detection part, 212 ... Threshold setting part, 213 ... Noise removal part, 214 ... First statistical data generation part, 215 ... 2nd statistical data generation part, 216 ... Coordinate calculation part, 220 ... Angle detection part, 230 ... Synchronization part, 300 ... Decoding part

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の閾値以上であり、かつ前記注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することを特徴とする請求項1に記載の画像処理装置。   In the detection unit, 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 equal to or greater than a first threshold value, and a pixel value of the target pixel is a second value The image processing apparatus according to claim 1, wherein the pixel of interest is determined to be a pixel that forms a unit image when the threshold is equal to or greater than a threshold value. 前記検出部で用いられる前記第1の閾値を動的に設定する閾値設定部をさらに備えることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, further comprising a threshold setting unit that dynamically sets the first threshold used in the detection unit. 前記ノイズ除去部は、
前記画像を被う格子状領域を生成し、
前記格子状領域の各小領域に対応する前記画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、
前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消すことを特徴とする請求項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.
前記ノイズ除去部は、前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消すことを特徴とする請求項1に記載の画像処理装置。   The noise removing unit is based on a detection result of the detection unit, and a difference between an average value of the pixel values of the disk elements and an average value of the pixel values of the ring elements in the filter is equal to or greater than a predetermined threshold value, and The image processing apparatus according to claim 1, wherein when the pixel value of the target pixel is lower than an average value of pixel values of the ring element, the detection of the unit image by the detection unit is canceled. 単位画像が形成された媒体表面を撮像する撮像部と、
前記撮像部により撮像された画像を走査し、前記単位画像を検出する検出部とを備え、
前記検出部は、
一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して前記画像を走査し、当該フィルタにおける当該ディスク要素の画素値の平均値と当該リング要素の画素値の平均値との差分および注目画素の画素値に基づいて、当該注目画素が単位画像を形成する画素か否かを判断することを特徴とするペン・デバイス。
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.
前記検出部は、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第1の閾値以上であり、かつ前記注目画素の画素値が第2の閾値以上である場合に、当該注目画素が単位画像を形成する画素であると判断することを特徴とする請求項6に記載のペン・デバイス。   The detection unit is configured such that 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 equal to or greater than a first threshold value, and a pixel value of the target pixel is a second value The pen device according to claim 6, wherein the pixel of interest is determined to be a pixel that forms a unit image when the threshold is equal to or greater than a threshold value. 前記画像を被う格子状領域を生成し、
前記格子状領域の各小領域に対応する前記画像の領域ごとに、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分に基づいてコントラスト閾値を設定し、当該差分および各画素の画素値に基づいて画素閾値を設定し、
前記検出部により検出された前記単位画像を形成する画素に関して、当該画素を注目画素として前記フィルタを適用して得られた前記差分が前記コントラスト閾値よりも低い場合か、または、当該画素の画素値が前記画素閾値よりも低い場合に、当該検出部による当該単位画像の検出を取り消す、
ノイズ除去部をさらに備えることを特徴とする請求項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.
前記検出部の検出結果に基づき、前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が所定の閾値以上であり、かつ前記注目画素の画素値が当該リング要素の画素値の平均値よりも低い場合に、当該検出部による前記単位画像の検出を取り消す、ノイズ除去部をさらに備えることを特徴とする請求項6に記載のペン・デバイス。   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 pen device according to claim 6, further comprising: a noise removing unit that cancels the detection of the unit image by the detecting unit when the pixel value of the ring element is lower than an average value. コンピュータに、
撮像装置により撮像された画像を、一定の領域からなるディスク要素と当該ディスク要素の周囲に設けられたリング要素とを備えるフィルタを適用して走査する機能と、
前記フィルタにおける前記ディスク要素の画素値の平均値と前記リング要素の画素値の平均値との差分が第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.
JP2008011430A 2008-01-22 2008-01-22 Image processor, pen device, and program Pending JP2009175845A (en)

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)

* 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
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

Cited By (5)

* 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
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
US7911653B2 (en) Device using low visibility encoded image to manage copy history
JP4670740B2 (en) Image generating apparatus, image processing system, and program
JP2009175845A (en) Image processor, pen device, and program
US8019181B2 (en) Image generation apparatus, image processing apparatus, computer readable medium and computer data signal
JP5609469B2 (en) Image processing apparatus, identification apparatus, electronic writing instrument, 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
JP2011076208A (en) Method and device for reading stacked bar code information
JP2009175986A (en) Image processor and program
JP2009175931A (en) Image processor, pen device, and program
JP4973316B2 (en) Image processing apparatus and program
JP4905767B2 (en) Two-dimensional code detection system and two-dimensional code detection program
JP5098441B2 (en) Image processing apparatus and program
JP5125547B2 (en) Image generating apparatus, image processing apparatus, program, and print medium
JP4462322B2 (en) Image processing apparatus, image forming apparatus, and program
JP2009181346A (en) Image processor, pen device, and program
JP4973317B2 (en) Image processing apparatus and program
JP5115213B2 (en) Image generating apparatus, image processing apparatus, program, and print medium
JP2009181341A (en) Position detection device and program
JP2009176251A (en) Image processing device and program
JP6268888B2 (en) Information processing apparatus and information processing program
JP5028955B2 (en) Image processing apparatus and program