JP2010055575A - Image processor, image processing program, computer-readable recording medium, electronic device, and image processing method - Google Patents

Image processor, image processing program, computer-readable recording medium, electronic device, and image processing method Download PDF

Info

Publication number
JP2010055575A
JP2010055575A JP2008222873A JP2008222873A JP2010055575A JP 2010055575 A JP2010055575 A JP 2010055575A JP 2008222873 A JP2008222873 A JP 2008222873A JP 2008222873 A JP2008222873 A JP 2008222873A JP 2010055575 A JP2010055575 A JP 2010055575A
Authority
JP
Japan
Prior art keywords
pixel
matching
image
edge
image processing
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.)
Granted
Application number
JP2008222873A
Other languages
Japanese (ja)
Other versions
JP4964849B2 (en
Inventor
Akira Fujiwara
晶 藤原
Ryoji Yoshimoto
良治 吉本
Daisuke Yamashita
大輔 山下
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2008222873A priority Critical patent/JP4964849B2/en
Publication of JP2010055575A publication Critical patent/JP2010055575A/en
Application granted granted Critical
Publication of JP4964849B2 publication Critical patent/JP4964849B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor capable of specifying an instruction position on a pick up image by an object for imaging with high accuracy using image data of the pick up image which is picked up. <P>SOLUTION: The image processor 1 is provided with: vertical and horizontal gradient amount calculation parts 3a, 3b which calculate feature quantity for every pixel on the image data; a first edge extraction part 4 which extracts first edge pixels whose feature quantities are equal to or more than a first threshold; a score calculation part 10 which calculates a matching degree indicating a degree of matching between a collation area and a model pattern based on the specification results of the first edge pixels; a second edge extraction part 15 which extracts second edge pixels whose feature quantities are equal to or more than a second threshold which is larger than the first threshold; and a position specific part 11 which specifies the instruction position on the pick up image by the object for imaging from a position of the collation area in which ratio of the number of second edge pixels to the number of first edge pixels exceeds a predetermined value and the matching degree is the maximum. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する機能を備えた画像処理装置に関する。   The present invention relates to an image processing apparatus having a function of specifying an instruction position on a captured image by an imaging target using image data of a captured image.

携帯電話やPDA(Personal Digital Assistants)などの各種機器に、画像表示部として液晶ディスプレイを備えた画像表示装置(以下、「液晶表示装置」と呼ぶ。)が幅広く利用されていることは周知の通りである。特に、PDAでは、古くからタッチセンサーを備えることにより、直接指などを液晶ディスプレイに接触させることによって情報を入力するタッチ入力が可能となっている。また、携帯電話やその他の機器においても、タッチセンサーを備える液晶表示装置の普及が期待されている。   As is well known, image display devices (hereinafter referred to as “liquid crystal display devices”) having a liquid crystal display as an image display unit are widely used in various devices such as mobile phones and PDAs (Personal Digital Assistants). It is. In particular, PDAs have been equipped with a touch sensor for a long time, enabling touch input to input information by directly bringing a finger or the like into contact with a liquid crystal display. In addition, liquid crystal display devices including a touch sensor are expected to spread in mobile phones and other devices.

このようなタッチセンサーを備える液晶表示装置の一例として特許文献1に開示された技術がある。   As an example of a liquid crystal display device including such a touch sensor, there is a technique disclosed in Patent Document 1.

この従来の液晶表示装置は、主としてエッジ検出回路、接触判定回路及び座標計算回路を備えている。エッジ検出回路は、撮影された画像のエッジを検出して、エッジ画像を得るようになっている。   This conventional liquid crystal display device mainly includes an edge detection circuit, a contact determination circuit, and a coordinate calculation circuit. The edge detection circuit detects an edge of the photographed image and obtains an edge image.

また、接触判定回路は、エッジ検出回路によって得られたエッジ画像を用いて物体が表示画面に接触したか否かを判定するようになっている。この接触判定回路は、エッジ毎にその移動方向(エッジの座標の時間変化)を調べ、互いに逆方向に移動するエッジがある場合に物体が表示画面に接触したと判定するようになっている。これは、物体が接触しない限りはエッジが互いに逆方向に移動することはないという原理を利用したものである。具体的には、逆方向への移動量が所定の閾値以上の場合に接触したと判定することで、判定の精度を高めるようになっている。   Further, the contact determination circuit determines whether or not the object has touched the display screen using the edge image obtained by the edge detection circuit. The contact determination circuit checks the moving direction (time change of edge coordinates) for each edge, and determines that the object has touched the display screen when there is an edge moving in the opposite direction. This is based on the principle that the edges do not move in opposite directions unless the object is in contact. Specifically, the determination accuracy is improved by determining that the contact is made when the amount of movement in the reverse direction is equal to or greater than a predetermined threshold.

さらに、座標計算回路は、物体が接触したと判定されたときに、エッジの重心を物体の座標位置として計算するようになっている。これにより、物体が接触する前に座標位置を計算しないようにして、位置算出の精度の向上を図ることを可能としている。
特開2006−244446号公報(平成18年9月14日公開)
Further, the coordinate calculation circuit calculates the center of gravity of the edge as the coordinate position of the object when it is determined that the object has touched. This makes it possible to improve the accuracy of position calculation by not calculating the coordinate position before the object comes into contact.
JP 2006-244446 A (published September 14, 2006)

しかしながら、従来の液晶表示装置では、接触判定回路が表示画面全体において接触判定を行なっているため、エッジ画像におけるノイズ、表示画面の画素欠陥、画面傷等があった場合に、接触判定回路がこのようなノイズの発生、画素欠陥の存在等によりエッジ移動があったと誤認識し、その結果、接触判定回路による接触判定精度を低下させてしまうという課題があった。   However, in the conventional liquid crystal display device, since the contact determination circuit performs contact determination on the entire display screen, when there is noise in the edge image, pixel defects on the display screen, screen scratches, etc., the contact determination circuit performs this determination. There is a problem that an edge movement is erroneously recognized due to the occurrence of such noise, the presence of a pixel defect, and the like, and as a result, the contact determination accuracy by the contact determination circuit is lowered.

また、上記のようなノイズ等があった場合では、エッジの重心と物体の位置が異なって判定されてしまう可能性があるため、表示画面上に複数の物体が接触したことを判定しようとしても、各エッジの重心と各物体の座標位置との対応付けを正確に行なうことができないという課題もあった。   Also, if there is noise such as the above, it may be determined that the center of gravity of the edge and the position of the object are different, so even if you try to determine that multiple objects have touched the display screen Further, there is a problem that it is not possible to accurately associate the center of gravity of each edge with the coordinate position of each object.

上記課題に鑑み、本発明は、撮像された撮像画像の画像データを用いて撮像対象による撮像画像上の指示位置を高精度に特定可能な画像処理装置、画像処理プログラム、コンピュータ読み取り可能な記録媒体、電子機器及び画像処理方法を提供することを目的とする。   In view of the above-described problems, the present invention provides an image processing apparatus, an image processing program, and a computer-readable recording medium that can specify an instruction position on a captured image by an imaging target with high accuracy using image data of a captured image. An object is to provide an electronic device and an image processing method.

上記目的を達成するために、本発明における画像処理装置は、撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する機能を備えた画像処理装置であって、前記画像データ上の画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出手段と、前記特徴量算出手段により算出された特徴量が第1閾値以上である第1エッジ画素を特定する第1エッジ特定手段と、前記第1エッジ画素の特定結果に基づいて、前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出手段と、前記第1エッジ画素のうち、前記特徴量が前記第1閾値よりも大きい第2閾値以上である第2エッジ画素を特定する第2エッジ特定手段と、第1エッジ画素数と第2エッジ画素数との比率及び前記合致度算出手段により算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定手段とを備えている。   In order to achieve the above object, an image processing apparatus according to the present invention is an image processing apparatus having a function of specifying an instruction position on a captured image by an imaging target using image data of a captured image. Then, for each pixel on the image data, a feature amount calculation unit that calculates a feature amount according to a pixel value difference with an adjacent pixel, and the feature amount calculated by the feature amount calculation unit is a first threshold value or more. A first edge specifying means for specifying a certain first edge pixel, a collation area included in a partial area on the image data based on a result of specifying the first edge pixel, a predetermined model pattern, And a degree-of-matching calculating means for calculating a degree of matching indicating the degree of matching between the matching area and the model pattern, and the feature amount of the first edge pixel is less than the first threshold value. Based on a second edge specifying means for specifying a second edge pixel that is equal to or greater than a threshold second threshold, a ratio between the number of first edge pixels and the number of second edge pixels, and the degree of matching calculated by the degree of matching calculating means. And position specifying means for specifying the indicated position on the captured image by the imaging target.

そして、前記位置特定手段は、例えば、第1エッジ画素数に対する第2エッジ画素数の割合があらかじめ定められた値を超えており、且つ、前記合致度算出手段により算出された合致度が前記画像データ上の部分領域内で最大である照合領域の位置から、撮像対象による前記撮像画像上の指示位置を特定する。   The position specifying unit, for example, has a ratio of the number of second edge pixels to the number of first edge pixels exceeding a predetermined value, and the degree of coincidence calculated by the degree of coincidence calculating unit is the image. The designated position on the captured image by the imaging target is specified from the position of the collation area that is the maximum in the partial area on the data.

上記の画像処理装置では、画像データ上における第1エッジ画素の特定結果に基づいて照合領域とモデルパターンとのマッチングを行なうと共に、第1エッジ画素を特定する第1閾値よりも大きい第2閾値を用いて第2エッジ画素を特定するので、第1エッジ画素数に対する第2エッジ画素数の割合があらかじめ定められた値を超えており、且つ、合致度が最大である照合領域の位置から、撮像対象による撮像画像上の指示位置を特定することができる。   In the above image processing device, matching between the matching region and the model pattern is performed based on the identification result of the first edge pixel on the image data, and a second threshold value larger than the first threshold value for identifying the first edge pixel is set. Since the second edge pixel is specified by using, the ratio of the number of second edge pixels to the number of first edge pixels exceeds a predetermined value, and imaging is performed from the position of the matching region where the degree of matching is the maximum. The designated position on the captured image by the object can be specified.

すなわち、上記の画像処理装置では、第1エッジ画素の特定結果に基づいてモデルパターンとのマッチングを行ない、マッチングされた照合領域について第1エッジ画素数のうち第2エッジ画素数の割合があらかじめ定められた値を超えたものを用いて、撮像対象による撮像画像上の指示位置を特定することができる。   That is, in the above-described image processing apparatus, matching with the model pattern is performed based on the identification result of the first edge pixel, and the ratio of the second edge pixel number among the first edge pixel number is determined in advance for the matching region to be matched. The indicated position on the captured image by the imaging target can be specified using a value exceeding the obtained value.

このため、撮像された撮像画像の画像データを用いて撮像対象による撮像画像上の指示位置を高精度に特定することが可能となる。   For this reason, it becomes possible to specify the designated position on the captured image by the imaging target with high accuracy using the image data of the captured image.

前記画像処理装置の利用空間における明るさの変化に応じて前記第2閾値を調節する閾値調節手段をさらに備えていることが好ましい。   It is preferable that the image processing apparatus further includes a threshold adjustment unit that adjusts the second threshold according to a change in brightness in a use space of the image processing apparatus.

この場合、画像処理装置の利用空間における明るさの変化に起因して画像データ上の画素ごとの特徴量が変化する場合でも、利用空間における明るさの変化に応じて第2閾値を調節し、第2エッジ画素を精度良く特定することができる。   In this case, even when the feature amount for each pixel on the image data changes due to the change in brightness in the usage space of the image processing apparatus, the second threshold is adjusted according to the change in brightness in the usage space, The second edge pixel can be specified with high accuracy.

前記閾値調節手段は、前記画像処理装置の利用空間における明るさの変化に応じて撮像画像上の背景画像がとりうる画素値ごとにあらかじめテーブル形式で記憶されている複数の第2閾値のうち、前記撮像画像上における背景画像の画素値に対応する第2閾値を選択することが好ましい。   The threshold adjustment means includes a plurality of second threshold values stored in advance in a table format for each pixel value that can be taken by the background image on the captured image in accordance with a change in brightness in the usage space of the image processing apparatus. It is preferable to select a second threshold value corresponding to the pixel value of the background image on the captured image.

この場合、利用空間における明るさの変化に応じて第2閾値を調節する際に、複数の第2閾値のうちから選択すればよく、第2閾値の調節を効率よく行なうことができる。   In this case, when the second threshold value is adjusted according to the change in brightness in the usage space, the second threshold value may be selected from a plurality of second threshold values, and the second threshold value can be adjusted efficiently.

前記テーブル形式で記憶されている複数の第2閾値は、撮像画像の画像データを撮像する撮像センサーの感度が第1感度を持つ場合に利用されるものであり、前記閾値調節手段は、前記撮像センサーの感度が前記第1感度から前記第1感度とは異なる第2感度に変化し、撮像センサーの感度が前記第2感度を持つ場合に利用されるべき第2閾値を選択する場合には、前記第1感度での撮像画像上の指示位置と背景画像との画素値差が前記第2感度での撮像画像上の指示位置と背景画像との画素値差であったと仮定した場合において前記第1感度での撮像画像上の背景画像がとるべき画素値を算出し、前記算出された撮像画像上の背景画像の画素値に対応する第2閾値を選択することが好ましい。   The plurality of second threshold values stored in the table format are used when the sensitivity of an imaging sensor that captures image data of a captured image has the first sensitivity, and the threshold adjustment unit is configured to capture the imaging When the sensitivity of the sensor changes from the first sensitivity to a second sensitivity different from the first sensitivity, and the second threshold to be used when the sensitivity of the imaging sensor has the second sensitivity, In the case where it is assumed that the pixel value difference between the designated position on the captured image at the first sensitivity and the background image is the pixel value difference between the designated position on the captured image at the second sensitivity and the background image. It is preferable to calculate a pixel value to be taken by the background image on the captured image with one sensitivity and select a second threshold value corresponding to the calculated pixel value of the background image on the captured image.

この場合、撮像センサーの感度が第1感度から第2感度に変化する場合でも、撮像センサーの感度が第1感度を持つ場合に利用される第2閾値と第2感度を持つ場合に利用される第2閾値とを別々に記憶しておく必要がないので、第2閾値を記憶するための記憶装置等の容量を低減することができる。   In this case, even when the sensitivity of the imaging sensor changes from the first sensitivity to the second sensitivity, it is used when the imaging sensor has the second threshold and the second sensitivity that are used when the sensitivity of the imaging sensor has the first sensitivity. Since it is not necessary to store the second threshold separately, the capacity of a storage device or the like for storing the second threshold can be reduced.

前記特徴量は、大きさと方向を持つベクトル量であることが好ましい。   The feature amount is preferably a vector amount having a size and a direction.

この場合、スカラー量でパターンマッチングする場合に比べ、情報量が多く、より正確にパターンマッチングを行なうことができる。   In this case, the amount of information is larger than in the case of pattern matching with a scalar amount, and pattern matching can be performed more accurately.

前記特徴量は、画素の輝度の勾配量であることが好ましい。   The feature amount is preferably a gradient amount of pixel luminance.

この場合、画素の輝度の勾配量に基づいてパターンマッチングを行なうことによって、位置検出の精度を向上できる。   In this case, the accuracy of position detection can be improved by performing pattern matching based on the gradient amount of the luminance of the pixel.

本発明における電子機器は、上記の画像処理装置を備えている。   An electronic apparatus according to the present invention includes the above-described image processing apparatus.

上記の電子機器では、上記の画像処理装置を備えている電子機器が実現される。   In the above electronic device, an electronic device including the above image processing apparatus is realized.

本発明における画像処理方法は、撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する画像処理方法であって、前記画像データ上の画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出工程と、前記特徴量算出工程において算出された特徴量が第1閾値以上である第1エッジ画素を特定する第1エッジ特定工程と、前記第1エッジ画素の特定結果に基づいて、前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出工程と、前記第1エッジ画素のうち、前記特徴量が前記第1閾値よりも大きい第2閾値以上である第2エッジ画素を特定する第2エッジ特定工程と、第1エッジ画素数と第2エッジ画素数との比率及び前記合致度算出工程において算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定工程とを備えている。   An image processing method according to the present invention is an image processing method for specifying an instruction position on a captured image by an imaging target using image data of a captured image that is adjacent to each pixel on the image data. A feature amount calculation step of calculating a feature amount according to a pixel value difference from the pixel to be performed, and a first edge specification that specifies a first edge pixel whose feature amount calculated in the feature amount calculation step is equal to or greater than a first threshold value A verification area included in a partial area on the image data and a predetermined model pattern based on a step and the identification result of the first edge pixel, and the verification area and the model pattern A degree-of-match calculation step of calculating a degree of matching indicating the degree of matching of the first edge pixel, and among the first edge pixels, the second edge image having the feature amount equal to or greater than a second threshold value greater than the first threshold value. Based on the ratio of the first edge pixel number to the second edge pixel number and the degree of coincidence calculated in the degree of coincidence calculation step, the designated position on the captured image by the imaging target And a position specifying step for specifying.

そして、前記位置特定工程においては、例えば、第1エッジ画素数に対する第2エッジ画素数の割合があらかじめ定められた値を超えており、且つ、前記合致度算出手段により算出された合致度が前記画像データ上の部分領域内で最大である照合領域の位置から、撮像対象による前記撮像画像上の指示位置を特定する。   In the position specifying step, for example, the ratio of the number of second edge pixels to the number of first edge pixels exceeds a predetermined value, and the degree of coincidence calculated by the degree of coincidence calculating means is The designated position on the captured image by the imaging target is specified from the position of the collation area that is the maximum in the partial area on the image data.

上記の画像処理方法では、画像データ上における第1エッジ画素の特定結果に基づいて照合領域とモデルパターンとのマッチングを行なうと共に、第1エッジ画素を特定する第1閾値よりも大きい第2閾値を用いて第2エッジ画素を特定するので、第1エッジ画素数に対する第2エッジ画素数の割合があらかじめ定められた値を超えており、且つ、合致度が最大である照合領域の位置から、撮像対象による撮像画像上の指示位置を特定することができる。   In the above image processing method, matching between the matching region and the model pattern is performed based on the identification result of the first edge pixel on the image data, and a second threshold value larger than the first threshold value for identifying the first edge pixel is set. Since the second edge pixel is specified by using, the ratio of the number of second edge pixels to the number of first edge pixels exceeds a predetermined value, and imaging is performed from the position of the matching region where the degree of matching is the maximum. The designated position on the captured image by the object can be specified.

すなわち、上記の画像処理方法では、第1エッジ画素の特定結果に基づいてモデルパターンとのマッチングを行ない、マッチングされた照合領域について第1エッジ画素数のうち第2エッジ画素数の割合があらかじめ定められた値を超えたものを用いて、撮像対象による撮像画像上の指示位置を特定することができる。   That is, in the above image processing method, matching with the model pattern is performed based on the identification result of the first edge pixel, and the proportion of the second edge pixel number in the first edge pixel number is determined in advance for the matching region to be matched. The indicated position on the captured image by the imaging target can be specified using a value exceeding the obtained value.

このため、撮像された撮像画像の画像データを用いて撮像対象による撮像画像上の指示位置を高精度に特定することが可能となる。   For this reason, it becomes possible to specify the designated position on the captured image by the imaging target with high accuracy using the image data of the captured image.

本発明における画像処理装置は、撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する機能を備えた画像処理装置であって、前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出手段と、前記合致度算出手段による照合においてモデルパターンにマッチした画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出手段と、前記特徴量算出手段により算出された特徴量が所定の閾値以上であるエッジ画素を特定するエッジ特定手段と、マッチした画素数とエッジ画素数との比率及び前記合致度算出手段により算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定手段とを備えている。   An image processing apparatus according to the present invention is an image processing apparatus having a function of specifying an instruction position on a captured image by an imaging target using image data of a captured image. A matching degree calculation means for matching a matching area included in a part area with a predetermined model pattern and calculating a matching degree indicating a degree of matching between the matching area and the model pattern; and the degree of matching calculation A feature amount calculating unit that calculates a feature amount according to a pixel value difference with an adjacent pixel for each pixel that matches the model pattern in the matching by the unit, and the feature amount calculated by the feature amount calculating unit is a predetermined threshold value The edge specifying means for specifying the edge pixels as described above, the ratio between the number of matched pixels and the number of edge pixels, and the matching degree calculated by the matching degree calculating means Zui and, and a position specifying means for specifying an indication position on the image captured by the imaging object.

そして、前記位置特定手段は、例えば、マッチした画素数に対するエッジ画素数の割合があらかじめ定められた値を超えており、且つ、前記合致度算出手段により算出された合致度が前記画像データ上の部分領域内で最大である照合領域の位置から、撮像対象による前記撮像画像上の指示位置を特定する。   Then, the position specifying unit, for example, the ratio of the number of edge pixels to the number of matched pixels exceeds a predetermined value, and the degree of match calculated by the degree of match calculating unit is on the image data The designated position on the captured image by the imaging target is specified from the position of the collation area that is the maximum in the partial area.

上記の画像処理装置では、照合領域とモデルパターンとのマッチングを行ない、モデルパターンとマッチした画素数に対するエッジ画素数の割合があらかじめ定められた値を超えており、且つ、合致度が最大である照合領域の位置から、撮像対象による撮像画像上の指示位置を特定することができる。   In the above image processing apparatus, matching is performed between the matching region and the model pattern, the ratio of the number of edge pixels to the number of pixels matching the model pattern exceeds a predetermined value, and the degree of matching is maximum. The designated position on the captured image by the imaging target can be specified from the position of the collation area.

すなわち、上記の画像処理方法では、マッチングされた照合領域についてマッチした画素数のうちエッジ画素数の割合があらかじめ定められた値を超えたものを用いて、撮像対象による撮像画像上の指示位置を特定することができる。   That is, in the image processing method described above, the indicated position on the captured image by the imaging target is determined by using the number of matched pixels in the matching region and the ratio of the number of edge pixels exceeding a predetermined value. Can be identified.

このため、撮像された撮像画像の画像データを用いて撮像対象による撮像画像上の指示位置を高精度に特定することが可能となる。   For this reason, it becomes possible to specify the designated position on the captured image by the imaging target with high accuracy using the image data of the captured image.

なお、上記の画像処理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記各手段として動作させることにより上記の画像処理装置をコンピュータにて実現させる画像処理プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   The image processing apparatus may be realized by a computer. In this case, an image processing program for causing the image processing apparatus to be realized by a computer by causing the computer to operate as the above-described means, and A recorded computer-readable recording medium also falls within the scope of the present invention.

本発明の画像処理装置は、以上のように、前記第1エッジ画素のうち、前記特徴量が前記第1閾値よりも大きい第2閾値以上である第2エッジ画素を特定する第2エッジ特定手段と、第1エッジ画素数と第2エッジ画素数との比率及び前記合致度算出手段により算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定手段とを備えている。   As described above, the image processing apparatus of the present invention specifies, from the first edge pixels, the second edge specifying means for specifying the second edge pixels having the feature amount equal to or larger than the second threshold larger than the first threshold. And position specifying means for specifying the indicated position on the captured image by the imaging target based on the ratio between the number of first edge pixels and the number of second edge pixels and the degree of coincidence calculated by the degree of coincidence calculating means. I have.

それゆえ、撮像された撮像画像の画像データを用いて撮像対象による撮像画像上の指示位置を高精度に特定可能な画像処理装置を提供することができるという効果を奏する。   Therefore, there is an effect that it is possible to provide an image processing apparatus that can specify the designated position on the captured image by the imaging target with high accuracy using the image data of the captured image.

以下、本発明の実施の形態について、図面を参照しながら説明する。なお、同一部分には同一符号を付し、図面で同一の符号が付いたものは、説明を省略する場合もある。なお、本実施の形態では、画像表示部の例として液晶ディスプレイを採用した場合について説明するが、液晶ディスプレイ以外の画像表示部を採用する場合も本発明の適用範囲に含まれる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the same code | symbol is attached | subjected to the same part, and what attached the same code | symbol in drawing may abbreviate | omit description. In the present embodiment, a case where a liquid crystal display is employed as an example of the image display unit will be described. However, a case where an image display unit other than the liquid crystal display is employed is also included in the scope of the present invention.

(1.画像処理装置の構成)
図1は、本発明の実施の形態における画像処理装置1の構成を示すブロック図である。まず、本発明の実施の形態における画像処理装置1の構成及びその撮像画像の例について説明する。以下では、便宜上、画像処理装置1について説明するが、図1に示すように、本発明の実施の形態における画像処理装置1の機能を必要とする電子機器20であれば、一般の電子機器に対して適用可能である。
(1. Configuration of image processing apparatus)
FIG. 1 is a block diagram showing a configuration of an image processing apparatus 1 according to an embodiment of the present invention. First, the configuration of the image processing apparatus 1 according to the embodiment of the present invention and an example of the captured image will be described. Hereinafter, for convenience, the image processing apparatus 1 will be described. However, as shown in FIG. 1, as long as the electronic apparatus 20 requires the function of the image processing apparatus 1 in the embodiment of the present invention, the general electronic apparatus is used. It is applicable to.

最初に、画像処理装置1の構成の概要及び画像処理装置1の撮像原理について説明する。画像処理装置1は、表示機能を有しており、複数の画素から構成される液晶ディスプレイ(ディスプレイ)及び該液晶ディスプレイに光を照射するバックライトを備えている点は、通常の液晶ディスプレイと同様である。   First, the outline of the configuration of the image processing apparatus 1 and the imaging principle of the image processing apparatus 1 will be described. The image processing apparatus 1 has a display function, and includes a liquid crystal display (display) composed of a plurality of pixels and a backlight for irradiating light to the liquid crystal display in the same manner as a normal liquid crystal display. It is.

そして、画像処理装置1における液晶ディスプレイは、各画素内に光センサー(撮像センサー)が内蔵され、該光センサーによって液晶ディスプレイの表示画面に近接してきた外部の物体等(撮像対象)を撮像し、画像データ(撮像センサーによって撮像された画像データ)として取り込むことが可能となっている点が、通常の液晶ディスプレイと異なっている。   The liquid crystal display in the image processing apparatus 1 includes a photosensor (imaging sensor) in each pixel, and images an external object or the like (imaging target) that has approached the display screen of the liquid crystal display by the photosensor, It differs from a normal liquid crystal display in that it can be captured as image data (image data captured by an image sensor).

なお、液晶ディスプレイは、複数の画素のうち、所定数の画素ごとに光センサーが内蔵されているものであっても良いが、光センサーによる撮像画像の解像度の観点から、光センサーは全画素に内蔵されていることが好ましい。   Note that the liquid crystal display may have a built-in photosensor for each of a predetermined number of pixels, but from the viewpoint of the resolution of an image captured by the photosensor, the photosensor is provided for all pixels. It is preferably built in.

また、画像処理装置1の液晶ディスプレイは、通常の液晶ディスプレイと同様に、複数の走査線と複数の信号線とが交差するように配線され、この各交差部に画素が配置され、薄膜トランジスタ、及び各種容量を有する画素を備えた表示部と、走査線を駆動する駆動回路と、信号線を駆動する駆動回路とを備えているものである。   The liquid crystal display of the image processing apparatus 1 is wired so that a plurality of scanning lines and a plurality of signal lines intersect with each other, as in a normal liquid crystal display, and pixels are arranged at each intersection, A display portion including pixels having various capacitors, a driving circuit for driving a scanning line, and a driving circuit for driving a signal line are provided.

さらに、画像処理装置1の液晶ディスプレイは、例えば各画素内に光センサーとしてフォトダイオードを内蔵する構成となっている。このフォトダイオードには、キャパシタが接続され、表示画面から入射された光のフォトダイオードでの受光量の変化に応じてキャパシタの電荷量を変化させる構成となっている。そして、このキャパシタの両端の電圧を検出することにより画像データを生成し、画像の撮像(取り込み)を行なうようになっている。これが画像処理装置1の液晶ディスプレイによる撮像原理である。   Furthermore, the liquid crystal display of the image processing apparatus 1 has a configuration in which, for example, a photodiode is built in each pixel as an optical sensor. A capacitor is connected to the photodiode, and the charge amount of the capacitor is changed in accordance with a change in the amount of light incident on the photodiode from the display screen. Image data is generated by detecting the voltage across the capacitor, and an image is captured (captured). This is the imaging principle of the image processing apparatus 1 using the liquid crystal display.

なお、光センサーとしては、フォトダイオードに限られず、光電効果を動作原理とし、液晶ディスプレイ等の各画素に内蔵できるものであれば良い。   Note that the optical sensor is not limited to a photodiode, and any optical sensor may be used as long as it can be built in each pixel of a liquid crystal display or the like based on the photoelectric effect.

以上の構成により、画像処理装置1は、液晶ディスプレイ本来の画像を表示する表示機能に加え、表示画面に近接してきた外部の物体の画像(撮像対象)を撮像する撮像機能を備える構成となっている。それゆえ、ディスプレイの表示画面でのタッチ入力が可能な構成とすることができる。   With the above configuration, the image processing apparatus 1 includes a display function for displaying an original image of the liquid crystal display and an imaging function for capturing an image of an external object (imaging target) that has come close to the display screen. Yes. Therefore, it is possible to adopt a configuration that allows touch input on the display screen of the display.

ここで、図2(a)〜(h)に基づき、画像処理装置1の液晶ディスプレイの各画素に内蔵されたフォトダイオードによって撮像される撮像対象について説明する。ここでは、「指の腹(以下、「指腹」と呼ぶ場合もある。)」及び「ペン先」の例を挙げ、それぞれの撮像画像(又は画像データ)の特徴の概要について説明する。   Here, based on FIGS. 2A to 2H, an imaging target to be imaged by a photodiode built in each pixel of the liquid crystal display of the image processing apparatus 1 will be described. Here, an example of “finger belly (hereinafter also referred to as“ finger belly ”)” and “pen tip” will be given and an outline of the characteristics of each captured image (or image data) will be described.

図2(a)は、周囲が暗い場合における指腹の撮像画像の様子を示す概要図であり、図2(b)は、周囲が暗い場合における指腹の撮像画像の特徴を示す概要図である。図2(a)に示すように、ユーザが、暗い部屋で液晶ディスプレイの表示画面65に、人差し指の腹を接触させた場合について考える。   FIG. 2A is a schematic diagram illustrating a captured image of the finger pad when the surrounding is dark, and FIG. 2B is a schematic diagram illustrating the characteristics of the captured image of the finger pad when the surrounding is dark. is there. As shown in FIG. 2A, a case is considered where the user touches the display screen 65 of the liquid crystal display in the dark room with the forefinger of the index finger.

この場合、図2(b)の撮像画像61は、バックライトが撮像対象(指腹)に反射して得られる画像であり、白い円形状がぼやけたような画像となる。なお、各画素における勾配方向は、おおよそ、撮像画像におけるエッジ部分からエッジ部分に囲まれた領域の中心付近に向かう傾向を示している(ここでは、勾配方向は暗い部分から明るい部分に向かう向きを正としている。)。   In this case, the captured image 61 in FIG. 2B is an image obtained by reflecting the backlight to the imaging target (finger pad), and is an image in which the white circular shape is blurred. Note that the gradient direction in each pixel has a tendency toward the center of the region surrounded by the edge portion from the edge portion in the captured image (here, the gradient direction is a direction from the dark portion to the bright portion). It is positive.)

次に、図2(c)は、周囲が明るい場合における指腹の撮像画像の様子を示す概要図であり、図2(d)は、周囲が明るい場合における指腹の撮像画像の特徴を示す概要図である。図2(c)に示すように、ユーザが、明るい部屋で液晶ディスプレイの表示画面65に、人差し指の腹を接触させた場合について考える。   Next, FIG. 2C is a schematic diagram illustrating a captured image of the finger pad when the surrounding is bright, and FIG. 2D illustrates the characteristics of the captured image of the finger pad when the surrounding is bright. FIG. As shown in FIG. 2C, consider a case where the user touches the display finger 65 of the index finger in the bright room in a bright room.

この場合、図2(d)の撮像画像62は、外光66が液晶ディスプレイの表示画面65に入射することによって得られる画像(接触した場合は、バックライトによる反射光も混じる。)であり、人差し指で外光が遮られることによって生じた指の影と、液晶ディスプレイの表示画面に接触した指の腹にバックライトの光が反射してできた白い円形状がぼやけた部分とからなる。これらのうち白い円形状の部分における勾配方向は、上述した暗い部屋で指の腹を接触させた場合と同様の傾向を示すが、その周囲を囲む影は暗く、周囲が外光66で明るいので、各画素における勾配方向は、白い円形状の部分における勾配方向と逆向きの傾向を示している。   In this case, the captured image 62 in FIG. 2D is an image obtained by the external light 66 entering the display screen 65 of the liquid crystal display (when touched, the reflected light from the backlight is also mixed). It consists of the shadow of the finger caused by the external light being blocked by the index finger, and the portion where the white circular shape formed by the reflection of the light from the backlight on the belly of the finger in contact with the display screen of the liquid crystal display is blurred. Among these, the gradient direction in the white circular portion shows the same tendency as the case where the belly of the finger is brought into contact in the dark room described above, but the shadow surrounding the periphery is dark and the surrounding is bright with the external light 66. The gradient direction in each pixel shows a tendency opposite to the gradient direction in the white circular portion.

図2(e)は、周囲が暗い場合におけるペン先の撮像画像の様子を示す概要図であり、図2(f)は、周囲が暗い場合におけるペン先の撮像画像の特徴を示す概要図である。図2(e)に示すように、ユーザが、暗い部屋で液晶ディスプレイの表示画面65に、ペン先を接触させた場合について考える。   FIG. 2E is a schematic diagram illustrating a captured image of the pen tip when the surrounding is dark, and FIG. 2F is a schematic diagram illustrating characteristics of the captured image of the pen tip when the periphery is dark. is there. As shown in FIG. 2E, consider a case where the user touches the display screen 65 of the liquid crystal display with a pen tip in a dark room.

この場合、図2(f)の撮像画像63は、バックライトが撮像対象(ペン先)に反射して得られる画像であり、小さな白い円形状がぼやけたような画像となる。なお、各画素における勾配方向は、おおよそ、撮像画像におけるエッジ部分からエッジ部分に囲まれた領域の中心付近に向かう傾向を示している。   In this case, the captured image 63 in FIG. 2F is an image obtained by reflecting the backlight to the imaging target (pen tip), and is an image in which a small white circular shape is blurred. The gradient direction in each pixel shows a tendency toward the vicinity of the center of the area surrounded by the edge portion from the edge portion in the captured image.

次に、図2(g)は、周囲が明るい場合におけるペン先の撮像画像の様子を示す概要図であり、図2(h)は、周囲が明るい場合におけるペン先の撮像画像の特徴を示す概要図である。図2(g)に示すように、ユーザが、明るい部屋で液晶ディスプレイの表示画面65に、ペン先を接触させた場合について考える。   Next, FIG. 2G is a schematic diagram showing a state of a picked-up image of the pen tip when the surrounding is bright, and FIG. 2H shows the characteristics of the picked-up image of the pen tip when the surrounding is bright. FIG. As shown in FIG. 2G, consider a case where the user touches the display screen 65 of the liquid crystal display with a pen tip in a bright room.

この場合、図2(h)の撮像画像64は、外光66が液晶ディスプレイの表示画面65に入射することによって得られる画像(接触した場合は、バックライトによる反射光も混じる。)であり、ペンで外光が遮られることによって生じたペンの影と、液晶ディスプレイの表示画面65に接触したペン先にバックライトの光が反射してできた小さな白い円形状がぼやけた部分とからなる。これらのうち小さな白い円形状の部分における勾配方向は、上述した暗い部屋でペン先を接触させた場合と同様の傾向を示すが、その周囲を囲む影は暗く、周囲が外光で明るいので、各画素における勾配方向は、小さな白い円形状の部分における勾配方向と逆向きの傾向を示している。   In this case, the captured image 64 in FIG. 2H is an image obtained when the external light 66 is incident on the display screen 65 of the liquid crystal display (when touched, the reflected light from the backlight is also mixed). It consists of the shadow of the pen caused by the outside light being blocked by the pen and the portion where the small white circular shape formed by the reflection of the light of the backlight reflected on the pen tip in contact with the display screen 65 of the liquid crystal display is blurred. Among these, the gradient direction in the small white circular portion shows the same tendency as when the pen tip is contacted in the dark room described above, but the shadow surrounding it is dark and the surrounding is bright with external light. The gradient direction in each pixel shows a tendency opposite to the gradient direction in the small white circular portion.

以上のような、各勾配方向の分布は、例えば、指のように表面が柔らかく、面に接触することにより接触面が円形になる場合、または先が丸いペンのように表面が固くても接触面が円形になるような場合には、撮像画像におけるエッジ部分からエッジ部分に囲まれた領域の中心付近に向かうか、或いは、該中心付近から放射状にエッジ部分に向かうかのいずれかの傾向を示す。   The distribution in each gradient direction as described above is, for example, when the surface is soft like a finger and the contact surface becomes circular by touching the surface, or even when the surface is hard like a pen with a round tip When the surface is circular, the tendency is either from the edge part in the captured image to the vicinity of the center of the region surrounded by the edge part, or from the vicinity of the center to the edge part radially. Show.

また、接触面がその他の形状であっても、撮像画像におけるエッジ部分からエッジ部分に囲まれた領域の中に向かうか、或いは、エッジ部分に囲まれた領域の中からその領域の外側に向かうかのいずれかの傾向を示す。さらに、これらの傾向は、撮像対象の状況等に応じて、大きく変わることは無い。したがって、勾配方向は、パターンマッチングに適した量である。   Moreover, even if the contact surface has other shapes, it goes from the edge part in the captured image to the area surrounded by the edge part, or from the area surrounded by the edge part to the outside of the area. One of the trends. Further, these tendencies do not change greatly depending on the situation of the imaging target. Therefore, the gradient direction is an amount suitable for pattern matching.

次に、図1を用いて、本実施の形態における画像処理装置1の構成の詳細について説明する。   Next, details of the configuration of the image processing apparatus 1 according to the present embodiment will be described with reference to FIG.

画像処理装置1は、図1に示すように、撮像された撮像画像の画像データを用いて、撮像対象による撮像画像上の指示位置を特定する機能を備えたものであり、低解像度化部2と、縦勾配量算出部(特徴量算出手段)3aと、横勾配量算出部(特徴量算出手段)3bと、第1エッジ抽出部(第1エッジ特定手段)4と、方向特定部5と、効率化部6と、一致画素数算出部7と、モデルパターン・比較用一致パターン格納部8と、パターン合致度算出部9と、スコア算出部(合致度算出手段)10と、位置特定部(位置特定手段)11と、第2エッジ抽出部(第2エッジ特定手段)15と、閾値調節部(閾値調節手段)16と、閾値格納部17と、を備えている。   As shown in FIG. 1, the image processing apparatus 1 has a function of specifying an instruction position on a captured image by an imaging target using image data of a captured image. A vertical gradient amount calculating unit (feature amount calculating unit) 3a, a lateral gradient amount calculating unit (feature amount calculating unit) 3b, a first edge extracting unit (first edge specifying unit) 4, and a direction specifying unit 5 , Efficiency improvement unit 6, matching pixel number calculation unit 7, model pattern / comparison matching pattern storage unit 8, pattern matching degree calculation unit 9, score calculation unit (matching degree calculation means) 10, position specifying unit (Position specifying unit) 11, second edge extracting unit (second edge specifying unit) 15, threshold adjusting unit (threshold adjusting unit) 16, and threshold storing unit 17.

低解像度化部2は、液晶ディスプレイに内蔵されている光センサーを用いて撮像された撮像画像の画像データを低解像度化する。   The resolution reduction unit 2 reduces the resolution of image data of a captured image captured using an optical sensor built in the liquid crystal display.

縦勾配量算出部3a及び横勾配量算出部3bは、画像データ上の画素ごとに、注目画素の画素値と複数の隣接画素の画素値とから注目画素の画素値の縦方向勾配量及び横方向勾配量を算出する。具体的には、Sobel(ソベル)オペレータ、Prewitt(プリウイット)オペレータ等の公知のエッジ抽出オペレータを用いれば良い。   The vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b, for each pixel on the image data, calculate the vertical gradient amount and the horizontal direction of the pixel value of the target pixel from the pixel value of the target pixel and the pixel values of a plurality of adjacent pixels. The amount of directional gradient is calculated. Specifically, a known edge extraction operator such as a Sobel operator or a Prewit operator may be used.

例えば、Sobelオペレータについて説明すると、各画素の画素位置x(i,j)における局所的な縦方向勾配Sy及び横方向勾配Sxは、次式(1)のように求められる。   For example, the Sobel operator will be described. The local vertical gradient Sy and the horizontal gradient Sx at the pixel position x (i, j) of each pixel are obtained by the following equation (1).

=xi+1j−1−xi―1j−1+2xi+1j−2xi―1j+xi+1j+1−xi―1j+1
=xi−1j+1−xi−1j−1+2xij+1−2xij−1+xi+1j+1−xi+1j−1
・・・(1)
ここで、xijは画素位置x(i,j)における画素値を表し、iは水平方向に沿った画素の位置を、jは垂直方向に沿った画素の位置をそれぞれ表す。ここに、i及びjは正の整数である。
S x = x i + 1j−1 −x i−1j−1 + 2x i + 1j −2x i−1j + x i + 1j + 1 −x i−1j + 1
S y = x i−1j + 1 −x i−1j−1 + 2x ij + 1 −2x ij−1 + x i + 1j + 1 −x i + 1j−1
... (1)
Here, x ij represents the pixel value at the pixel position x (i, j), i represents the position of the pixel along the horizontal direction, and j represents the position of the pixel along the vertical direction. Here, i and j are positive integers.

ここで、式(1)は、次式(2)及び(3)の3×3のSobelオペレータ(行列演算子Sx及びSy)を、画素位置x(i,j)を注目画素とする3×3画素に適用することと等価である。   Here, the expression (1) is a 3 × 3 Sobel operator (matrix operators Sx and Sy) of the following expressions (2) and (3), and the pixel position x (i, j) is the pixel of interest 3 × 3. This is equivalent to applying to 3 pixels.

Figure 2010055575
Figure 2010055575

ここで、画素位置x(i,j)における勾配の大きさABS(S)及び勾配方向ANG(S)は、縦方向勾配Sy及び横方向勾配Sxに基づいて、次のように与えられる。なお、以下では、演算子としての縦方向勾配Sy及び横方向勾配Sxを各画素に適用することによって得られた縦方向勾配量及び横方向勾配量のそれぞれを、便宜上、縦方向勾配量Sy及び横方向勾配量Sxと記載する場合がある。   Here, the gradient magnitude ABS (S) and gradient direction ANG (S) at the pixel position x (i, j) are given as follows based on the vertical gradient Sy and the horizontal gradient Sx. In the following description, for the sake of convenience, the vertical gradient amount Sy and the horizontal gradient amount obtained by applying the vertical gradient Sy and the horizontal gradient Sx as the operators to the respective pixels will be referred to as the vertical gradient amount Sy and the horizontal gradient amount, respectively. It may be described as a lateral gradient amount Sx.

ABS(S)=(Sx2+Sy21/2 ・・・(4)
ANG(S)=tan-1(Sy/Sx) ・・・(5)
第1エッジ抽出部4は、縦勾配量算出部3a及び横勾配量算出部3bが算出した各画素の縦方向勾配量Sy及び横方向勾配量Sxの算出結果から、撮像画像のエッジ部分の画素である第1エッジ画素を抽出(特定)する。
ABS (S) = (Sx 2 + Sy 2 ) 1/2 (4)
ANG (S) = tan −1 (Sy / Sx) (5)
The first edge extraction unit 4 calculates the pixels of the edge portion of the captured image from the calculation results of the vertical gradient amount Sy and the horizontal gradient amount Sx of each pixel calculated by the vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b. The first edge pixel is extracted (specified).

ここで、第1エッジ画素とは、画像データを構成する各画素のうち、明るさが急激に変化する部分(エッジ)における画素である。具体的には、縦方向勾配量Sy及び横方向勾配量Sxのそれぞれ、又は、勾配の大きさABS(S)が所定の第1閾値以上である画素のことである。   Here, a 1st edge pixel is a pixel in the part (edge) where brightness changes rapidly among each pixel which comprises image data. Specifically, it is a pixel in which each of the vertical gradient amount Sy and the horizontal gradient amount Sx, or the gradient magnitude ABS (S) is equal to or greater than a predetermined first threshold value.

なお、この第1エッジ画素を抽出する目的は、方向特定部5が、抽出された複数の第1エッジ画素については勾配方向を特定し、第1エッジ画素以外の画素については一律無方向と看做して特定するようにする点にある。   The purpose of extracting the first edge pixels is that the direction specifying unit 5 specifies the gradient direction for the plurality of extracted first edge pixels and regards the pixels other than the first edge pixels as non-uniform directions. It is in the point to hesitate and specify.

パターンマッチングにおいて重要な情報は、エッジ部分の第1エッジ画素における勾配方向である。   The important information in pattern matching is the gradient direction in the first edge pixel of the edge portion.

したがって、あまり重要でない画素における勾配方向を一律無方向と看做すことで、パターンマッチングの効率化をさらに向上させることができる。また、以下で説明する撮像対象による撮像画像上の指示位置を検出する際のメモリ容量を少量化し、処理時間を短縮化することを可能とし、指示位置の検出処理のコストをさらに削減することができる。   Therefore, the efficiency of pattern matching can be further improved by regarding the gradient direction in the less important pixels as a uniform direction. In addition, it is possible to reduce the memory capacity when detecting the indicated position on the captured image by the imaging target described below, shorten the processing time, and further reduce the cost of the indicated position detection process. it can.

方向特定部5は、上述したように、縦勾配量算出部3a及び横勾配量算出部3bが算出した縦方向勾配量Sy及び横方向勾配量Sxから、画素ごとの勾配方向ANG(S)と、縦方向勾配量Sy及び横方向勾配量Sxのそれぞれ、又は、勾配の大きさABS(S)が第1閾値未満である無方向とのいずれかを特定するものである。   As described above, the direction specifying unit 5 determines the gradient direction ANG (S) for each pixel from the vertical gradient amount Sy and the horizontal gradient amount Sx calculated by the vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b. Each of the vertical gradient amount Sy and the horizontal gradient amount Sx, or the non-direction in which the gradient magnitude ABS (S) is less than the first threshold value is specified.

ここでは、無方向を第1閾値未満であると定義しているが、第1閾値以下と定義しても良い。   Here, the non-direction is defined as being less than the first threshold, but may be defined as being equal to or less than the first threshold.

あらかじめ無方向を設定しておくことで、ノイズ等により不要な多数の勾配方向が発生することを抑制することができる。また、エッジ近傍の勾配方向に照合対象を絞りこむことが可能となり、照合の効率化を図ることができる。   By setting the non-direction in advance, it is possible to suppress the occurrence of many unnecessary gradient directions due to noise or the like. In addition, it is possible to narrow down the object to be collated in the gradient direction in the vicinity of the edge, and the efficiency of collation can be improved.

なお、方向特定部5は、第1エッジ抽出部4によって特定された複数の第1エッジ画素の勾配方向を特定し、第1エッジ画素以外の画素を無方向と看做して特定することが好ましい。パターンマッチングにおいて重要な情報は、エッジ部分の第1エッジ画素における勾配方向であると言える。   The direction specifying unit 5 may specify the gradient direction of the plurality of first edge pixels specified by the first edge extracting unit 4, and specify the pixels other than the first edge pixel as non-directional. preferable. It can be said that the important information in the pattern matching is the gradient direction in the first edge pixel of the edge portion.

したがって、パターンマッチングにおいてあまり重要でない画素における勾配方向を一律無方向と看做すことで、パターンマッチングの効率化をさらに向上させることができる。   Therefore, the efficiency of pattern matching can be further improved by regarding the gradient direction in pixels that are not so important in pattern matching as uniform directions.

ここで、勾配方向ANG(S)は、0rad〜2πradの範囲で変化する連続量であるから、本実施の形態においては、これを例えば8方向に量子化したものを勾配方向としてパターンマッチングに使用する特徴的な量(以下、「特徴量」と呼ぶことがある。)とする。   Here, since the gradient direction ANG (S) is a continuous amount that changes in the range of 0 rad to 2π rad, in the present embodiment, for example, the quantized direction is used in pattern matching as a gradient direction. Characteristic amount (hereinafter, also referred to as “feature amount”).

なお、より精度の高いパターンマッチングを行なうために、16方位等に量子化しても良い。具体的な方向の量子化の詳細な手順については後述する。また、方向の量子化とは、勾配方向ANG(S)が所定の範囲内にある方向を一律にある特定の方向の勾配方向であると看做して取り扱うことを言う。   In order to perform pattern matching with higher accuracy, it may be quantized into 16 directions. A detailed procedure of quantization in a specific direction will be described later. In addition, direction quantization means that a direction in which the gradient direction ANG (S) is within a predetermined range is treated as a uniform gradient direction in a specific direction.

効率化部6は、注目画素の周囲で所定の画素数を含む領域である照合領域と、あらかじめ定められたモデルパターンとの照合(以下、「パターンマッチング」と呼ぶこともある。)を行なう場合に、照合領域とモデルパターンとの照合の効率化を行なう。   The efficiency improving unit 6 performs matching between a matching area that includes a predetermined number of pixels around the target pixel and a predetermined model pattern (hereinafter, also referred to as “pattern matching”). In addition, the collation between the collation area and the model pattern is made efficient.

一致画素数算出部7は、例えば、照合領域と、モデルパターンとの照合を行って、照合領域に含まれる勾配方向と、モデルパターンに含まれる勾配方向とが一致する画素数(以下、「一致画素数」と呼ぶ。)を算出する。   For example, the matching pixel number calculation unit 7 performs matching between the matching region and the model pattern, and the number of pixels in which the gradient direction included in the matching region matches the gradient direction included in the model pattern (hereinafter referred to as “matching”). Called the “number of pixels”).

モデルパターン・比較用一致パターン格納部8は、モデルパターンと、比較用一致パターンとを格納する。比較用一致パターンは、照合領域に含まれる画素ごとの勾配方向とモデルパターンに含まれる画素ごとの勾配方向との一致パターンを分析することによってあらかじめ定めたパターンである。モデルパターン・比較用一致パターン格納部8は、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやコンパクトディスク−ROM/MO/MD/デジタルビデオデイスク/コンパクトディスク−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系等を用いることができる。   The model pattern / comparison match pattern storage unit 8 stores a model pattern and a comparison match pattern. The comparison matching pattern is a pattern determined in advance by analyzing a matching pattern between the gradient direction for each pixel included in the matching region and the gradient direction for each pixel included in the model pattern. The model pattern / comparison pattern storage unit 8 for comparison includes, for example, a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and a compact disk-ROM / MO / MD / digital video disk / A disk system including an optical disk such as a compact disk-R, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM can be used.

パターン合致度算出部9は、照合領域に含まれる画素ごとの勾配方向とモデルパターンに含まれる画素ごとの勾配方向との一致パターンと、あらかじめ定められた比較用一致パターンとが類似する度合いを示すパターン合致度を算出する。   The pattern matching degree calculation unit 9 indicates the degree of similarity between the matching pattern between the gradient direction for each pixel included in the matching region and the gradient direction for each pixel included in the model pattern, and a predetermined comparison matching pattern. The pattern matching degree is calculated.

画素値の勾配はベクトル量であり、大きさ(勾配の大きさABS(S))と向き(勾配方向ANG(S))とを持つものである。ここで、特に、勾配方向(向き)は、例えば8方向に量子化したりすることによって、1つの画素がとり得る状態を8(無方向を含めると9)という極めて少ない状態に離散化することでき、さらにそれぞれの状態には、方向が異なるという識別が容易な特徴を持たせる事ができる。   The gradient of the pixel value is a vector quantity, and has a magnitude (gradient magnitude ABS (S)) and a direction (gradient direction ANG (S)). Here, in particular, the gradient direction (orientation) can be discretized from 8 possible states (e.g., 9 if no direction is included) to a very small state by quantizing in 8 directions, for example. In addition, each state can have a feature that allows easy identification of different directions.

また、勾配方向は、上述したような傾向がある。また、これらの傾向は、撮像対象の状況等に応じて、大きく変わることは無い。したがって、勾配方向は、パターンマッチングに適した量である。   The gradient direction tends to be as described above. Also, these tendencies do not change greatly depending on the situation of the imaging target. Therefore, the gradient direction is an amount suitable for pattern matching.

スコア算出部10は、一致画素数算出部7が算出した一致画素数、及びパターン合致度算出部9が算出したパターン合致度から、照合領域とモデルパターンとのマッチングの度合いを示す合致度を算出する。なお、スコア算出部10は、一致画素数算出部7が算出した一致画素数、及びパターン合致度算出部9が算出したパターン合致度のいずれか1つを使用するよう構成しても良い。   The score calculation unit 10 calculates a matching degree indicating the degree of matching between the matching region and the model pattern from the matching pixel number calculated by the matching pixel number calculation unit 7 and the pattern matching degree calculated by the pattern matching degree calculation unit 9. To do. Note that the score calculation unit 10 may be configured to use any one of the matching pixel number calculated by the matching pixel number calculation unit 7 and the pattern matching degree calculated by the pattern matching degree calculation unit 9.

また、スコア算出部10は、照合領域内において合致する勾配方向の種類数が、あらかじめ定められた規定種類数以上の場合に、合致度を算出するようにしても良い。   In addition, the score calculation unit 10 may calculate the degree of matching when the number of types of gradient directions that match in the collation region is equal to or greater than a predetermined number of types.

上述のように、勾配方向は、おおよその傾向がある。また、これらの傾向は、撮像対象の状況等に応じて、大きく変わることは無い。よって、例えば、勾配方向の種類数が8方向の場合、パターンマッチングで一致する勾配方向の種類数は8に近いものとなるはずである。したがって、上記の照合領域内において合致する勾配方向の種類数が、あらかじめ定められた規定種類数以上の場合に、合致度を算出するようにすれば、指示位置の検出処理のメモリ容量を少量化すること及び処理時間を短縮化することを可能とし、指示位置の検出処理のコストをさらに削減させることができる。   As described above, the gradient direction tends to be approximate. Also, these tendencies do not change greatly depending on the situation of the imaging target. Therefore, for example, when the number of types of gradient directions is 8, the number of types of gradient directions that match in pattern matching should be close to 8. Therefore, if the matching degree is calculated when the number of types of gradient directions that match in the matching area is equal to or greater than a predetermined number of types, the memory capacity of the indicated position detection process can be reduced. And the processing time can be shortened, and the cost of the indicated position detection process can be further reduced.

さらに、スコア算出部10は、自身が算出した合致度が所定の値以上である場合には、後述する第2エッジ抽出部15から、その合致度に対応する照合領域についての、第1エッジ抽出部4により抽出された第1エッジ画素数及び第2エッジ抽出部15により抽出された第2エッジ画素数を取得する。そして、スコア算出部10は、第1エッジ画素のうち第2エッジ画素が占める割合が所定の値を超えているか否かを判断し、超えているとの判断結果に基づいて自身が算出した合致度を位置特定部11に出力する。一方、スコア算出部10は、超えていないとの判断に基づいて自身が算出した合致度は、位置特定部11に利用されることが回避されることになる。   Further, when the degree of coincidence calculated by the score calculation unit 10 is equal to or greater than a predetermined value, the score calculation unit 10 extracts a first edge from a second edge extraction unit 15 described later for a matching region corresponding to the degree of coincidence. The first edge pixel number extracted by the unit 4 and the second edge pixel number extracted by the second edge extraction unit 15 are acquired. Then, the score calculation unit 10 determines whether or not the ratio of the second edge pixel among the first edge pixels exceeds a predetermined value, and the match calculated by itself based on the determination result that it exceeds The degree is output to the position specifying unit 11. On the other hand, the score calculation unit 10 avoids using the degree of coincidence calculated by the score calculation unit 10 based on the determination that it has not exceeded the position specifying unit 11.

要は、スコア算出部10が、自身が算出する合致度のうち、それぞれに対応する、第1エッジ画素のうち第2エッジ画素が占める割合が所定の値を超えているものに限り、位置特定部11に出力するように構成されていればよい。   The point is that the score calculation unit 10 specifies the position only when the proportion of the first edge pixel that the second edge pixel occupies exceeds a predetermined value corresponding to the degree of match calculated by itself. What is necessary is just to be comprised so that it may output to the part 11. FIG.

位置特定部11は、スコア算出部10が算出した合致度が最大となる画素(以下、「ピーク画素」と呼ぶ。)の位置から、撮像対象による撮像画像上の指示位置を特定する。位置特定部11は、ピーク探索部(ピーク画素特定手段、位置特定手段)12と、座標算出判定部(座標算出判定手段、位置特定手段)13と、座標算出部(座標算出手段、位置特定手段)14と、を有している。   The position specifying unit 11 specifies the indicated position on the captured image by the imaging target from the position of the pixel (hereinafter referred to as “peak pixel”) having the highest degree of matching calculated by the score calculation unit 10. The position specifying unit 11 includes a peak searching unit (peak pixel specifying unit, position specifying unit) 12, a coordinate calculation determining unit (coordinate calculation determining unit, position specifying unit) 13, and a coordinate calculating unit (coordinate calculating unit, position specifying unit). 14).

ピーク探索部12は、注目画素の周囲で所定の画素数を含む探索領域(以下、「第1領域」と呼ぶ場合がある。)内で、スコア算出部10が算出した合致度が最大値をとる画素であるピーク画素を探索する。   The peak search unit 12 has a maximum matching value calculated by the score calculation unit 10 in a search region including a predetermined number of pixels around the target pixel (hereinafter, sometimes referred to as “first region”). A peak pixel which is a pixel to be taken is searched.

座標算出判定部13は、探索領域の画素数よりも少ない所定の画素数を有すると共に、探索領域内に完全に包含される小領域(以下、「第2領域」と呼ぶ場合がある。)内に、ピーク探索部12が発見したピーク画素が存在することを判定した場合に、座標算出部14に撮像対象による撮像画像上の指示位置を算出させる。   The coordinate calculation determination unit 13 has a predetermined number of pixels smaller than the number of pixels in the search area, and is within a small area (hereinafter sometimes referred to as “second area”) that is completely included in the search area. In addition, when it is determined that the peak pixel discovered by the peak search unit 12 exists, the coordinate calculation unit 14 is caused to calculate the indicated position on the captured image by the imaging target.

座標算出部14は、ピーク探索部12が発見したピーク画素を中心とする所定の画素数を含む領域であるピーク画素領域内の、画素ごとの合致度を用いて、撮像対象による撮像画像上の指示位置を算出するものである。   The coordinate calculation unit 14 uses the degree of match for each pixel in the peak pixel region, which is a region including a predetermined number of pixels centered on the peak pixel found by the peak search unit 12, on the captured image by the imaging target. The indicated position is calculated.

第2エッジ抽出部15は、縦勾配量算出部3a及び横勾配量算出部3bが算出した各画素の縦方向勾配量Sy及び横方向勾配量Sxの算出結果から、撮像画像のエッジ部分の画素である第2エッジ画素を抽出(特定)する。   The second edge extraction unit 15 calculates the pixel of the edge portion of the captured image from the calculation result of the vertical gradient amount Sy and the horizontal gradient amount Sx of each pixel calculated by the vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b. The second edge pixel is extracted (specified).

ここで、第2エッジ画素は、第1エッジ抽出部4により抽出される第1エッジ画素と同様、画像データを構成する各画素のうち、明るさが急激に変化する部分(エッジ)における画素である。そして、この第2エッジ画素は、第1エッジ抽出部4により先に抽出された第1エッジ画素のうち、縦方向勾配量Sy及び横方向勾配量Sxのそれぞれ、又は、勾配の大きさABS(S)が第1閾値よりも大きい第2閾値以上である画素のことである。   Here, like the first edge pixel extracted by the first edge extraction unit 4, the second edge pixel is a pixel in a portion (edge) where the brightness changes abruptly among the pixels constituting the image data. is there. The second edge pixel is the first edge pixel previously extracted by the first edge extraction unit 4, and each of the vertical gradient amount Sy and the horizontal gradient amount Sx or the gradient magnitude ABS ( S) is a pixel that is greater than or equal to a second threshold that is greater than the first threshold.

画像処理装置1の表示画面に近接して来る外部の物体である指腹、ペン等が表示画面に実際に接触した場合、表示画面に直接接触したエッジにおける明るさの変化幅、つまり、そのエッジ強さは、表示画面に近接するものの直接は接触しないエッジと比較して、大きくなる傾向にある。例えば、表示画面に接触したタッチ指と浮いている非タッチ指との間では、指先のエッジの強さ、つまり、指先と背景との画素値差は異なるものとなる。タッチ指の撮像画像はくっきりするため、そのエッジは強いが、非タッチ指は撮像画像がぼけるため、そのエッジは弱くなる。   When a finger pad, pen, or the like, which is an external object that comes close to the display screen of the image processing apparatus 1 actually touches the display screen, the brightness change width at the edge that directly touches the display screen, that is, the edge The strength tends to increase compared to an edge that is close to the display screen but not in direct contact. For example, the strength of the edge of the fingertip, that is, the pixel value difference between the fingertip and the background is different between the touch finger touching the display screen and the floating non-touch finger. Since the captured image of the touch finger is clear, the edge is strong, but the non-touch finger has a blurred edge because the captured image is blurred.

そこで、第2エッジ抽出部15は、第1エッジ抽出部4により抽出された第1エッジ画素のうち、第1閾値よりも大きい第2閾値以上である、縦方向勾配量Sy及び横方向勾配量Sxのそれぞれ、又は、勾配の大きさABS(S)を持つ第2エッジ画素を抽出する。   Therefore, the second edge extraction unit 15 has a vertical gradient amount Sy and a horizontal gradient amount that are equal to or larger than a second threshold value larger than the first threshold value among the first edge pixels extracted by the first edge extraction unit 4. A second edge pixel having each of Sx or gradient magnitude ABS (S) is extracted.

そして、第1エッジ画素のうち第2エッジ画素が占める割合が所定の値を超えていれば表示画面に近接する外部の物体が実際に表示画面に接触しているものとする。   If the ratio of the second edge pixel to the first edge pixel exceeds a predetermined value, it is assumed that an external object close to the display screen is actually in contact with the display screen.

このことが第2エッジ画素を抽出する目的である。   This is the purpose of extracting the second edge pixel.

閾値調節部16は、第2エッジ抽出部15が第2エッジ画素を抽出する際に利用する第2閾値を調節する。   The threshold adjustment unit 16 adjusts the second threshold used when the second edge extraction unit 15 extracts the second edge pixel.

上述したように、画像処理装置1の表示画面に近接して来る外部の物体のエッジ強さは、画像処理装置1の利用空間の明るさに応じて変化してしまう。そこで、閾値調節部16は、画像処理装置1の利用空間の明るさを取得し、その利用空間の明るさに応じて第2閾値を調節する。   As described above, the edge strength of an external object that comes close to the display screen of the image processing apparatus 1 changes according to the brightness of the usage space of the image processing apparatus 1. Therefore, the threshold adjustment unit 16 acquires the brightness of the usage space of the image processing apparatus 1 and adjusts the second threshold according to the brightness of the usage space.

また、閾値調節部16は、画像処理装置1の利用空間の明るさを取得する際、例えば、画像処理装置1の利用空間に配置された照度計の測定結果から利用空間の明るさを取得すればよい。また、表示画面に利用空間の明るさを検知するための専用の光センサーを配置し、その光センサーの検知結果から利用空間の明るさを取得してもよい。   In addition, when the threshold adjustment unit 16 acquires the brightness of the usage space of the image processing device 1, for example, the threshold adjustment unit 16 acquires the brightness of the usage space from the measurement result of the illuminometer arranged in the usage space of the image processing device 1. That's fine. Alternatively, a dedicated optical sensor for detecting the brightness of the usage space may be arranged on the display screen, and the brightness of the usage space may be acquired from the detection result of the optical sensor.

閾値格納部17は、画像処理装置1の利用空間の明るさに応じて第2エッジ抽出部15が利用すべき第2閾値をテーブル形式であらかじめ格納している。閾値格納部17は、例えば、撮像画像上における背景画像の画素値に一対一に対応する、複数の第2閾値をあらかじめ格納している。撮像画像が256階調で表示される場合であれば、閾値格納部17は、背景画素が0〜255階調の各々の場合についての第2閾値を格納していることになる。   The threshold storage unit 17 stores in advance a second threshold to be used by the second edge extraction unit 15 in a table format according to the brightness of the usage space of the image processing apparatus 1. The threshold storage unit 17 stores, for example, a plurality of second threshold values corresponding to the pixel values of the background image on the captured image on a one-to-one basis. If the captured image is displayed with 256 gradations, the threshold storage unit 17 stores the second threshold for each case where the background pixel has 0 to 255 gradations.

また、閾値格納部17は、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやコンパクトディスク−ROM/MO/MD/デジタルビデオデイスク/コンパクトディスク−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系等を用いることができる。   The threshold storage unit 17 is, for example, a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, or a compact disk-ROM / MO / MD / digital video disk / compact disk-R. A disk system including an optical disk such as an IC card, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM can be used.

(2.画像処理装置の動作の概要)
次に、画像処理装置1の動作の概要について説明する。
(2. Outline of operation of image processing apparatus)
Next, an outline of the operation of the image processing apparatus 1 will be described.

図3は画像処理装置1の全体的な動作の概要を示すフローチャートである。ステップS101では、図1の低解像度化部2が画像データを低解像度化し、S102に進む。例えば、320×240画素の画像データであれば、160×120画素(低解像度化率1/2)、又は80×60画素(低解像度化率1/4)等のようにバイリニア縮小させる。ここで、バイリニア縮小とは、例えば2×2の各画素が持つ画素値の平均値をとり、2×2画素のデータを、該平均値を持った1×1画素のデータに置き換えることにより、全体として1/4の情報圧縮を行なうことを言う。   FIG. 3 is a flowchart showing an outline of the overall operation of the image processing apparatus 1. In step S101, the resolution reduction unit 2 in FIG. 1 reduces the resolution of the image data, and the process proceeds to S102. For example, in the case of image data of 320 × 240 pixels, bilinear reduction is performed such as 160 × 120 pixels (lower resolution ratio 1/2) or 80 × 60 pixels (lower resolution ratio 1/4). Here, bilinear reduction is, for example, by taking an average value of pixel values of each 2 × 2 pixel and replacing 2 × 2 pixel data with 1 × 1 pixel data having the average value. This means that 1/4 information compression is performed as a whole.

なお、高速処理の観点からは、できるだけ低解像度化することが好ましいが、必要なエッジ情報等を得るためには、例えば320×240画素(150dpi)の画像データの場合であれば、80×60画素(低解像度化率1/4)を低解像度化の限度とすることが好ましい。また、高精度処理の観点からは、低解像度化を全く行なわないか、低解像度化するとしても、160×120画素(低解像度化率1/2)に留めることが好ましい。   From the viewpoint of high-speed processing, it is preferable to reduce the resolution as much as possible. However, in order to obtain necessary edge information and the like, for example, in the case of image data of 320 × 240 pixels (150 dpi), 80 × 60. It is preferable to set the pixel (lower resolution ratio 1/4) as the limit of lower resolution. From the viewpoint of high-precision processing, it is preferable that the resolution is not reduced at all or even if the resolution is reduced, it is limited to 160 × 120 pixels (reduction ratio 1/2).

以上の画像データの低解像度化により、パターンマッチングの処理コストやメモリ容量の少量化、及び処理時間の短縮化を図ることがきる。   By reducing the resolution of the image data as described above, it is possible to reduce the pattern matching processing cost, the memory capacity, and the processing time.

S102では、縦勾配量算出部3a及び横勾配量算出部3bが、画像データ上の画素ごとに、縦方向勾配量Sy及び横方向勾配量Sxを算出してから、方向特定部5が、画素ごとの勾配方向と無方向とのいずれかを特定するまでの過程(勾配方向・無方向特定過程)を経た上で、S103に進む。   In S102, the vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b calculate the vertical gradient amount Sy and the horizontal gradient amount Sx for each pixel on the image data, and then the direction specifying unit 5 After passing through a process (gradient direction / non-direction specifying process) until specifying any one of the gradient direction and the non-direction, the process proceeds to S103.

S103では、効率化部6で、照合領域と、モデルパターンとの照合を行なう場合に、照合領域とモデルパターンとの照合の効率化を図るか否か、つまり、照合効率化の要否を選択する。照合効率化を行なう場合(Yes)には、S104に進み、効率化部6で照合効率化を行った上でS105に進み、照合効率化を行なわない場合(No)にはS108に進み、効率化部6は何もせず、そのままの情報(画像データ、但し、低解像度化部2で、低解像度化している場合には、低解像度化後の画像データ)でS105に進む。   In S103, when the collation area and the model pattern are collated by the efficiency improving unit 6, whether or not the collation area and the model pattern should be collated efficiently, that is, whether or not the collation efficiency is required is selected. To do. When the collation efficiency is to be improved (Yes), the process proceeds to S104, the collation efficiency is increased by the efficiency improvement unit 6, and then the process proceeds to S105. When the collation efficiency is not to be performed (No), the process proceeds to S108, and the efficiency The conversion unit 6 does nothing, and proceeds to S105 with the information as it is (image data, but if the resolution is reduced by the resolution reduction unit 2, the image data after the resolution is reduced).

S105では、一致画素数算出部7が、照合領域とモデルパターンとの照合を行って、一致画素数を算出し、パターン合致度算出部9が、パターン合致度を算出してから、スコア算出部10が、一致画素数算出部7が算出した一致画素数、及び、パターン合致度算出部9が算出したパターン合致度から、合致度を算出するまでの過程(パターンマッチング過程)を経た上で、S106に進む。   In S105, the matching pixel number calculation unit 7 performs matching between the matching region and the model pattern to calculate the number of matching pixels, and the pattern matching degree calculation unit 9 calculates the pattern matching degree, and then the score calculation unit. 10 through the process (pattern matching process) until the matching degree is calculated from the matching pixel number calculated by the matching pixel number calculating unit 7 and the pattern matching degree calculated by the pattern matching degree calculating unit 9. The process proceeds to S106.

S106では、第2エッジ抽出部15が、第2エッジ画素を抽出してから、スコア算出部10が、自身が算出した合致度を位置特定部11に出力するまでの過程(接触・非接触判定過程)を経た上で、S107に進む。   In S <b> 106, a process (contact / non-contact determination) from when the second edge extraction unit 15 extracts the second edge pixel to when the score calculation unit 10 outputs the degree of coincidence calculated by itself to the position specifying unit 11. The process proceeds to step S107.

S107では、位置特定部11が、スコア算出部10が算出した合致度が最大となる画素(以下、「ピーク画素」と呼ぶ。)の位置から、撮像対象による撮像画像上の指示位置を特定して「エンド」となる(ポインティング位置特定過程)。   In S <b> 107, the position specifying unit 11 specifies the designated position on the captured image by the imaging target from the position of the pixel (hereinafter referred to as “peak pixel”) having the highest degree of matching calculated by the score calculation unit 10. "End" (pointing position identification process).

以上が、画像処理装置1の全体の動作概要である。以下では、勾配方向・無方向特定過程、照合効率化、パターンマッチング過程、接触・非接触特定過程及びポインティング位置特定過程における画像処理装置1の各動作について説明する。   The above is the overall operation overview of the image processing apparatus 1. In the following, each operation of the image processing apparatus 1 in the gradient direction / non-direction specifying process, collation efficiency improvement, pattern matching process, contact / non-contact specifying process, and pointing position specifying process will be described.

(3.勾配方向・無方向特定過程)
まず、図1、図4、図5(a)及び図5(b)に基づいて、勾配方向・無方向特定過程における画像処理装置1の動作について説明する。
(3. Gradient direction / non-directional identification process)
First, the operation of the image processing apparatus 1 in the gradient direction / non-direction specifying process will be described with reference to FIGS. 1, 4, 5A and 5B.

図4は、画像処理装置1の動作のうち、勾配方向・無方向特定過程の動作を示すフローチャートである。図5(a)は、勾配方向・無方向特定過程において参照されるテーブルの一例であり、図5(b)は、勾配方向・無方向特定過程において参照されるテーブルの他の例である。   FIG. 4 is a flowchart showing the operation of the gradient direction / non-direction specifying process among the operations of the image processing apparatus 1. FIG. 5A is an example of a table referred to in the gradient direction / non-direction specifying process, and FIG. 5B is another example of a table referred to in the gradient direction / non-direction specifying process.

図4のフローチャートでは、まず、縦勾配量算出部3a及び横勾配量算出部3bがそれぞれ、縦方向勾配量Sy及び横方向勾配量Sxを算出してからスタートする。   In the flowchart of FIG. 4, the process starts after the vertical gradient amount calculation unit 3a and the horizontal gradient amount calculation unit 3b calculate the vertical gradient amount Sy and the horizontal gradient amount Sx, respectively.

S201では、第1エッジ抽出部4が、各画素における勾配の大きさABS(S)が第1閾値以上か否かを判定し、ABS(S)≧第1閾値ならば(Yes)、S202に進み、ABS(S)<第1閾値ならば(No)、S210に進む。なお、本実施の形態では、ABS(S)=Sx×Sx+Sy×Syとして計算しているが、この量は、上式(4)における厳密な意味で勾配の大きさと異なる。しかし、実装上はこのように勾配の大きさを定義しても問題は無い。   In S201, the first edge extraction unit 4 determines whether or not the gradient magnitude ABS (S) in each pixel is equal to or greater than the first threshold. If ABS (S) ≧ first threshold (Yes), the process proceeds to S202. If ABS (S) <the first threshold (No), the process proceeds to S210. In the present embodiment, calculation is made as ABS (S) = Sx × Sx + Sy × Sy, but this amount is different from the magnitude of the gradient in the strict sense in the above equation (4). However, in terms of implementation, there is no problem even if the magnitude of the gradient is defined in this way.

S210に進んだ場合には、方向特定部5は、対象となっている画素、つまり、第1エッジ画素以外の画素を無方向と設定(特定)し、次の画素へ進んで、S201に戻る。なお、S202に進んだ場合には、対象となっている画素は、無論、第1エッジ画素である。   When the process proceeds to S210, the direction specifying unit 5 sets (specifies) the target pixel, that is, the pixel other than the first edge pixel as non-directional, proceeds to the next pixel, and returns to S201. . If the process proceeds to S202, the target pixel is, of course, the first edge pixel.

S202では、方向特定部5が、横方向勾配量Sxが0であるか否かを判定し、Sx≠0ならば、S203(Yes)に進み、Sx=0ならば、S206(No)に進む。   In S202, the direction specifying unit 5 determines whether or not the lateral gradient amount Sx is 0. If Sx ≠ 0, the process proceeds to S203 (Yes), and if Sx = 0, the process proceeds to S206 (No). .

S203では、方向特定部5は、横方向勾配量Sxが正の値をとるか否かを判定し、Sx>0ならば、S204(Yes)に進み、方向特定部5は、図5(a)のテーブルにしたがって、該当画素について、勾配方向ANG(S)に応じて量子化された勾配方向を設定する。   In S203, the direction specifying unit 5 determines whether or not the lateral gradient amount Sx takes a positive value. If Sx> 0, the process proceeds to S204 (Yes), and the direction specifying unit 5 ), The gradient direction quantized according to the gradient direction ANG (S) is set for the corresponding pixel.

一方、Sx<0ならば、S205に進み、方向特定部5は、図5(b)のテーブルにしたがって、該当画素について、勾配方向ANG(S)に応じて量子化された勾配方向を設定する。   On the other hand, if Sx <0, the process proceeds to S205, and the direction specifying unit 5 sets the gradient direction quantized according to the gradient direction ANG (S) for the corresponding pixel according to the table of FIG. 5B. .

次に、S206では、方向特定部5は、縦方向勾配量Syが0か否かを判定し、Sy≠0ならば、S207(Yes)に進み、Sy=0ならば、S210(No)に進み、該当画素を無方向と設定し、次の画素へ進んでS201に戻る。   Next, in S206, the direction identifying unit 5 determines whether or not the vertical gradient amount Sy is 0. If Sy ≠ 0, the process proceeds to S207 (Yes), and if Sy = 0, the process proceeds to S210 (No). Proceed, set the corresponding pixel as non-directional, proceed to the next pixel, and return to S201.

S207では、方向特定部5は、縦方向勾配量Syが正の値をとるか否かを判定し、Sy>0ならば、S208(Yes)に進み、該当画素の勾配方向を上向きに設定して、S201に戻る。   In S207, the direction specifying unit 5 determines whether or not the vertical gradient amount Sy takes a positive value. If Sy> 0, the process proceeds to S208 (Yes) and sets the gradient direction of the corresponding pixel upward. Then, the process returns to S201.

一方、Sy<0ならば、S209(No)に進み、該当画素の勾配方向を下向きに設定して、次の画素へ進んでS201に戻る。   On the other hand, if Sy <0, the process proceeds to S209 (No), the gradient direction of the corresponding pixel is set downward, the process proceeds to the next pixel, and the process returns to S201.

以上の工程は、すべての画素の勾配方向・無方向の設定が終わるまで繰り返される。   The above process is repeated until the setting of the gradient direction / non-direction of all pixels is completed.

パターンマッチングにおいて重要な情報は、エッジ部分の画素である第1エッジ画素における勾配方向である。   The important information in pattern matching is the gradient direction in the first edge pixel that is the pixel of the edge portion.

したがって、上記の動作により、あまり重要でない第1エッジ画素以外の画素における勾配方向を一律無方向と看做すことで、パターンマッチングの効率化をさらに向上させることができる。また、撮像対象による撮像画像上の指示位置の検出を可能としてメモリ容量を少量化すること及び処理時間を短縮化することを可能とし、指示位置の検出処理のコストをさらに削減させることができる。   Therefore, by considering the gradient direction in the pixels other than the first edge pixel that is not so important as a uniform direction by the above operation, the efficiency of pattern matching can be further improved. In addition, it is possible to detect the designated position on the picked-up image by the imaging target, to reduce the memory capacity and the processing time, and to further reduce the cost of the designated position detection process.

(4.照合効率化)
次に、画像処理装置1のおける照合効率化について説明する。
(4. Verification efficiency improvement)
Next, collation efficiency improvement in the image processing apparatus 1 will be described.

図1に示す効率化部6は、照合領域を、複数の同一画素数の分割領域に分割すると共に、分割領域ごとに、分割領域に含まれる画素ごとの勾配方向及び無方向の情報を、分割領域に含まれる勾配方向及び前記無方向の情報に置き換えることで、照合領域とモデルパターンとの照合の効率化を図る。   The efficiency improving unit 6 shown in FIG. 1 divides the collation area into a plurality of divided areas having the same number of pixels and divides the gradient direction and non-directional information for each pixel included in the divided area for each divided area. By replacing the gradient direction included in the region and the non-directional information, the collation region and the model pattern are efficiently collated.

また、スコア算出部10は、効率化部6によって照合の効率化が行なわれた照合領域とモデルパターンとの照合を行なって、照合領域内のそれぞれの分割領域に含まれる勾配方向と、モデルパターンにおける勾配方向との一致数を、前記合致度として算出する。   In addition, the score calculation unit 10 performs collation between the collation region and the model pattern that have been collated efficiently by the efficiency unit 6, and the gradient direction included in each divided region in the collation region and the model pattern The number of matches with the gradient direction is calculated as the degree of match.

上述のように、勾配方向は、おおよその傾向がある。また、これらの傾向は、撮像対象の状況等に応じて、大きく変わることは無い。したがって、分割領域の画素数をあまり大きくしなければ、該分割領域内における勾配方向の画素の位置は、勾配方向を用いたパターンマッチングにおいてあまり重要な情報ではない。   As described above, the gradient direction tends to be approximate. Also, these tendencies do not change greatly depending on the situation of the imaging target. Therefore, unless the number of pixels in the divided region is increased too much, the position of the pixel in the gradient direction in the divided region is not very important information in pattern matching using the gradient direction.

そこで、分割領域ごとに、分割領域に含まれる画素ごとの勾配方向及び無方向の情報を、分割領域に含まれる勾配方向及び無方向の情報に置き換えることにより、パターンマッチングの照合精度を維持しつつ、照合効率化が可能となる。また、この効率化に伴い、撮像対象による前記撮像画像上の指示位置の検出処理に要するコストを削減することもできる。   Therefore, for each divided region, by replacing the gradient direction and non-directional information for each pixel included in the divided region with the gradient direction and non-directional information included in the divided region, while maintaining the matching accuracy of pattern matching Thus, collation efficiency can be improved. Further, with this efficiency improvement, it is possible to reduce the cost required for the detection processing of the designated position on the captured image by the imaging target.

以上より、パターンマッチングの照合精度を維持しつつ、照合効率化を可能とし、撮像対象による撮像画像上の指示位置の検出処理に要するコストを削減することができる画像処理装置1を提供することができる。   As described above, it is possible to provide the image processing apparatus 1 that can improve the matching efficiency while maintaining the matching accuracy of the pattern matching and can reduce the cost required for the detection process of the designated position on the captured image by the imaging target. it can.

ここで、図6(a)及び図6(b)に基づき、画像処理装置1における照合効率化の具体例について説明する。   Here, based on FIG. 6A and FIG. 6B, a specific example of collation efficiency improvement in the image processing apparatus 1 will be described.

まず、図6(a)に示すように、周囲が暗い場合における画像データの各画素における勾配方向の分布の特徴は、中央にほぼ円形状である、無方向の画素の領域があり、その回りをとり囲むようにして該無方向の領域に向かう向きの勾配方向を持つ画素が多数分布している。   First, as shown in FIG. 6A, the characteristic of the distribution in the gradient direction of each pixel of the image data in the case where the surrounding is dark is a non-directional pixel region having a substantially circular shape at the center. A large number of pixels having a gradient direction directed toward the non-directional region are distributed.

次に、図6(b)は、図6(a)の画像データについて照合効率化を行った後の様子を示す概要図である。   Next, FIG. 6B is a schematic diagram showing a state after the collation efficiency is improved for the image data of FIG.

図6(a)に示すように、14×14画素の領域(照合領域)を、複数の2×2画素の領域(分割領域)に分割すると共に、2×2画素の領域ごとに、2×2画素の領域に含まれる画素ごとの勾配方向及び無方向の情報を、2×2画素の領域に含まれる勾配方向及び無方向の情報に置き換えることで、14×14画素の領域とモデルパターン(モデルパターンの例については後に詳しく説明する。)との照合の効率化が行われる。   As shown in FIG. 6A, a 14 × 14 pixel region (collation region) is divided into a plurality of 2 × 2 pixel regions (divided regions) and 2 × 2 pixel regions are divided into 2 × 2 pixels. By replacing the gradient direction and non-direction information for each pixel included in the 2-pixel area with the gradient direction and non-direction information included in the 2 × 2-pixel area, the 14 × 14-pixel area and the model pattern ( An example of the model pattern will be described in detail later).

たとえば、図6(a)に示す14×14画素の領域を分割した複数の2×2画素領域のうち、上から2つめ、左から1つめの2×2画素の領域には、左上の画素が「無方向」、右上の画素が「右下向き(勾配方向)」、左下の画素が「右向き(勾配方向)」、及び右下の画素が「右下向き(勾配方向)」となっている。この2×2画素の領域について各勾配方向の存在位置に関する情報を省略したものが、図6(b)の上から2つめ、左から1つめのブロック(以下、便宜上「画素」と呼ぶ場合がある。)である。他のブロックも同様にして生成することができる。結果として、図6(a)に示す14×14画素領域は、合計7×7=49個の2×2画素領域に分割される。   For example, among the plurality of 2 × 2 pixel regions obtained by dividing the 14 × 14 pixel region shown in FIG. 6A, the upper left pixel is the second 2 × 2 pixel region from the top and the first 2 × 2 pixel region from the left. Is “no direction”, the upper right pixel is “right downward (gradient direction)”, the lower left pixel is “rightward (gradient direction)”, and the lower right pixel is “right downward (gradient direction)”. In this 2 × 2 pixel region, information regarding the existence position in each gradient direction is omitted. The second block from the top in FIG. 6B and the first block from the left (hereinafter, referred to as “pixel” for convenience). Yes.) Other blocks can be generated in the same manner. As a result, the 14 × 14 pixel region shown in FIG. 6A is divided into a total of 7 × 7 = 49 2 × 2 pixel regions.

次に、図7(a)〜図9(b)に基づき、照合領域と照合されるモデルパターンの具体例について説明する。   Next, a specific example of the model pattern to be collated with the collation area will be described based on FIGS. 7 (a) to 9 (b).

図7(a)は、周囲が暗い場合における照合効率化前の画像データと照合されるモデルパターンの一例を示す概要図である。また、図7(a)のモデルパターンは、図6(a)に示す14×14画素の領域とパターンマッチングを行なう場合を想定したものである。また、撮像対象としては、指腹を想定している。   FIG. 7A is a schematic diagram showing an example of a model pattern that is collated with image data before collation efficiency improvement when the surroundings are dark. In addition, the model pattern in FIG. 7A is assumed to perform pattern matching with the 14 × 14 pixel region shown in FIG. In addition, a finger pad is assumed as an imaging target.

ところで、図7(a)のモデルパターンは、13×13画素のモデルパターンとなっている。この場合、図6(a)に示す14×14画素の領域と全画素数が異なっているが、この例のように照合領域とモデルパターンとの画素数は必ずしも一致しなくても良い。   By the way, the model pattern of FIG. 7A is a 13 × 13 pixel model pattern. In this case, although the total number of pixels is different from the 14 × 14 pixel area shown in FIG. 6A, the number of pixels in the collation area and the model pattern does not necessarily match as in this example.

また、奇数×奇数(13×13)としているのは、中心の画素が1つとなるようにするためである。この中心の画素を画像データ上の着目画素にあわせて1画素づつ、ずらせてパターンマッチングを行なう。   The reason why the odd number × odd number (13 × 13) is set is that the center pixel is one. Pattern matching is performed by shifting the center pixel by one pixel in accordance with the pixel of interest on the image data.

この場合の一致画素数は、1画素ごとに照合されて算出されるので、13×13=169画素の照合が必要となる。   Since the number of matching pixels in this case is collated and calculated for each pixel, it is necessary to collate 13 × 13 = 169 pixels.

一方、図7(b)は、周囲が明るい場合における照合効率化前の画像データと照合されるモデルパターンの一例を示す概要図である。図7(a)のモデルパターンと比較すると各画素の勾配方向が逆向きになっている。図7(a)は、バックライトの光の反射光を基礎として撮像された画像データを想定したものであり、中央に向かうほど明るくなっている様子を示している。一方、図7(b)は、外光を基礎として撮像された画像データを想定したものであり、画像のエッジ部分に向けて明るくなっている様子を示している。   On the other hand, FIG. 7B is a schematic diagram illustrating an example of a model pattern that is collated with image data before collation efficiency improvement when the surroundings are bright. Compared with the model pattern of FIG. 7A, the gradient direction of each pixel is reversed. FIG. 7A assumes image data picked up based on the reflected light of the backlight, and shows a state of becoming brighter toward the center. On the other hand, FIG. 7B assumes image data captured on the basis of external light, and shows a state in which the image data becomes brighter toward the edge portion of the image.

次に、図8(a)は、周囲が暗い場合における照合効率化後の画像データと照合されるモデルパターンの一例を示す概要図である。図8(a)のモデルパターンは、図6(b)の照合効率化後の照合領域とのパターンマッチングを想定したものである。この例のように、照合領域とモデルパターンとデータ形式は必ずしも同一でなくても良い。この例では、2×2画素の領域を1画素(与えられる勾配方向は1つ)と看做してモデルパターンを簡略化することにより、さらなる照合の効率化を図っている。   Next, FIG. 8A is a schematic diagram illustrating an example of a model pattern that is collated with image data after collation efficiency in the case where the surrounding is dark. The model pattern in FIG. 8A assumes pattern matching with the collation area after the collation efficiency in FIG. 6B. As in this example, the collation area, the model pattern, and the data format are not necessarily the same. In this example, a 2 × 2 pixel region is regarded as one pixel (one gradient direction is given), and the model pattern is simplified to further improve the efficiency of matching.

図8(b)は、周囲が明るい場合における照合効率化後の画像データと照合されるモデルパターンの一例を示す概要図である。図8(a)は、バックライトの光の反射光を基礎として撮像された画像データを想定したものであり、中央に向かうほど明るくなっている様子を示している。一方、図8(b)は、外光を基礎として撮像された画像データを想定したものであり、画像のエッジ部分に向けて明るくなっている様子を示している。   FIG. 8B is a schematic diagram illustrating an example of a model pattern that is collated with the image data after the collation efficiency is improved when the surroundings are bright. FIG. 8A assumes image data picked up based on the reflected light of the backlight, and shows a state of becoming brighter toward the center. On the other hand, FIG. 8B assumes image data captured on the basis of external light, and shows a state in which the image is brightened toward the edge portion of the image.

図9(a)は、周囲が暗い場合における照合効率化後の画像データと照合されるモデルパターンの他の例を示す概要図である。図8(a)のモデルパターンとの違いは、2×2画素分が1つの領域に纏められているが、該1つの領域ごとに、2つの勾配方向(又は無方向)の自由度が与えられている点である。このようなモデルパターンを工夫することにより、照合の効率化を図りつつ、照合精度を高めることができる。   FIG. 9A is a schematic diagram illustrating another example of a model pattern that is collated with image data after collation efficiency improvement when the surrounding is dark. The difference from the model pattern in FIG. 8A is that 2 × 2 pixels are grouped in one area, but each one area gives two degrees of freedom in the gradient direction (or no direction). This is the point. By devising such a model pattern, it is possible to improve collation accuracy while improving collation efficiency.

図9(b)は、周囲が明るい場合における照合効率化後の画像データと照合されるモデルパターンの他の例を示す概要図である。図9(a)は、バックライトの光の反射光を基礎として撮像された画像データを想定したものであり、中央に向かうほど明るくなっている様子を示している。一方、図9(b)は、外光を基礎として撮像された画像データを想定したものであり、画像のエッジ部分に向けて明るくなっている様子を示している。   FIG. 9B is a schematic diagram showing another example of a model pattern that is collated with the image data after the collation efficiency is improved when the surroundings are bright. FIG. 9A assumes image data picked up based on the reflected light of the backlight, and shows a state where the image data becomes brighter toward the center. On the other hand, FIG. 9B assumes image data picked up based on outside light, and shows a state in which the image data becomes brighter toward the edge portion of the image.

(5.パターンマッチング過程)
次に、画像処理装置1におけるパターンマッチングの過程について説明する。
(5. Pattern matching process)
Next, a pattern matching process in the image processing apparatus 1 will be described.

図10は、図1に示す画像処理装置1の動作のうち、パターンマッチング過程の動作を示すフローチャートである。   FIG. 10 is a flowchart showing the operation of the pattern matching process among the operations of the image processing apparatus 1 shown in FIG.

S301では、一致画素数算出部7が、照合領域とモデルパターンとの照合を行って、照合領域に含まれる勾配方向と、モデルパターンに含まれる勾配方向とが一致する画素数(一致画素数)を算出してS302に進む。   In S301, the matching pixel number calculation unit 7 performs matching between the matching region and the model pattern, and the number of pixels (matching pixel number) in which the gradient direction included in the matching region matches the gradient direction included in the model pattern. Is calculated and the process proceeds to S302.

S302では、効率化部6を備えていない場合には、方向特定部5が、効率化部6を備えている場合には、効率化部6が、勾配方向のパターン合致度も算出するかどうかを決定し、パターン合致度の算出を決定した場合には、パターン合致度算出部9に通知してS303(Yes)に進む。一方、パターン合致度の算出を行なわないことを決定した場合には、スコア算出部10に通知してS304に進む。   In S <b> 302, if the efficiency specifying unit 6 is not provided, the direction specifying unit 5 determines whether the efficiency determining unit 6 also calculates the pattern matching degree in the gradient direction if the efficiency specifying unit 6 is provided. When the calculation of the pattern matching degree is determined, the pattern matching degree calculation unit 9 is notified and the process proceeds to S303 (Yes). On the other hand, if it is determined not to calculate the pattern matching degree, the score calculation unit 10 is notified and the process proceeds to S304.

なお、ここでは、一致画素数が必ず算出される場合について説明しているが、このような場合に限られず、パターン合致度のみを算出する構成を採用しても良い。   Although the case where the number of matching pixels is always calculated has been described here, the present invention is not limited to such a case, and a configuration for calculating only the pattern matching degree may be employed.

また、パターン合致度とは、照合領域に含まれる画素ごとの勾配方向とモデルパターンに含まれる画素ごとの勾配方向との一致パターンと、あらかじめ定められ、モデルパターン・比較用一致パターン格納部8に記録されている比較用一致パターンとが類似する度合いを示す量である。   The pattern matching degree is determined in advance in the matching pattern between the gradient direction of each pixel included in the matching region and the gradient direction of each pixel included in the model pattern, and is stored in the model pattern / comparison matching pattern storage unit 8. This is an amount indicating the degree of similarity with the recorded comparison matching pattern.

S303では、パターン合致度算出部9が、方向特定部5又は効率化部6からパターン合致度の算出を決定した旨の通知を受けて、パターン合致度を算出し、S304に進む。   In S303, the pattern matching degree calculation unit 9 receives a notification that the calculation of the pattern matching degree has been determined from the direction specifying unit 5 or the efficiency improving unit 6, calculates the pattern matching degree, and proceeds to S304.

S304では、パターン合致度算出部9が、パターン合致度の算出を行っていない場合には、一致画素数算出部7が算出した一致画素数を、照合領域と前記モデルパターンとのマッチングの度合いを示す合致度として算出する。一方、パターン合致度算出部9が、パターン合致度の算出を行っている場合には、一致画素数算出部7が算出した一致画素数及びパターン合致度算出部9が算出したパターン合致度を、合算した量を照合領域とモデルパターンとのマッチングの度合いを示す合致度として算出する。   In S304, when the pattern matching degree calculation unit 9 has not calculated the pattern matching degree, the matching pixel number calculated by the matching pixel number calculating unit 7 is used as the matching degree between the matching region and the model pattern. Calculated as the degree of match shown. On the other hand, when the pattern matching degree calculation unit 9 is calculating the pattern matching degree, the matching pixel number calculated by the matching pixel number calculating unit 7 and the pattern matching degree calculated by the pattern matching degree calculating unit 9 are The total amount is calculated as the degree of matching indicating the degree of matching between the matching area and the model pattern.

次に、パターンマッチング過程におけるスコア算出部10の具体的なスコア(合致度)算出方法について説明する。   Next, a specific score (matching degree) calculation method of the score calculation unit 10 in the pattern matching process will be described.

図11(a)は、照合効率化前の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングを説明するための概要図であり、図11(b)は、その合致度算出方法の一例を示す図である。   FIG. 11A is a schematic diagram for explaining pattern matching between a matching region and a model pattern in the case where the surroundings before darkening efficiency is dark, and FIG. It is a figure which shows an example.

図11(a)は、図6(a)の照合領域と、図7(a)のモデルパターンとのパターンマッチングを行ったものを示している。ここで、図の中央の7行7列(以下では、横方向に並ぶ画素を「列」、縦方向に並ぶ画素を「行」と呼ぶ。また、上から行、左から列を数える。)にある1×1画素はスコアが付与される注目画素の位置である。網掛けされた部分は、照合領域とモデルパターンとで、勾配方向が一致している画素を示している。   FIG. 11A shows the result of pattern matching between the collation region of FIG. 6A and the model pattern of FIG. 7A. Here, 7 rows and 7 columns in the center of the figure (hereinafter, pixels arranged in the horizontal direction are called “columns”, and pixels arranged in the vertical direction are called “rows”. Further, the rows are counted from the top and the columns from the left). 1 × 1 pixel is the position of the target pixel to which a score is assigned. The shaded portion indicates pixels in which the gradient directions match in the matching region and the model pattern.

図11(b)に示す、一致パターンは、一致した方向の種類数を見る場合のテーブルを示している。本例では、8方向のすべてについて一致した画素が存在していることを示している。   The matching pattern shown in FIG. 11B shows a table when the number of types in the matching direction is viewed. In this example, it is shown that there is a matching pixel in all eight directions.

次に、図11(b)に示す、一致画素数の計算は、上記網掛けの部分を左上の1行1列の画素から、右下の13行13列の画素までの一致画素数を算出する方法の一例を示すものである。ここでは、勾配方向が与えられている画素で、モデルパターンの勾配方向と一致した画素を「1」とし、無方向及びモデルパターンの勾配方向と一致していない画素は「0」として計算している。なお、無方向と判定された画素は、最初から計算に含めない構成としても良い。ここでは、網掛けで示された一致画素数は「85」であるとの算出結果を得ている。なお、この一致画素数をスコア(合致度)として用いても良いが、以下で説明するような正規化一致画素数(合致度)を用いても良い。   Next, the number of matching pixels shown in FIG. 11B is calculated by calculating the number of matching pixels from the pixel in the upper left 1 row 1 column to the pixel in the lower right 13 row 13 column in the shaded portion. An example of the method of doing is shown. Here, a pixel that has a gradient direction and that matches the gradient direction of the model pattern is calculated as “1”, and a pixel that does not match the gradient direction of the model pattern and the model pattern is calculated as “0”. Yes. Note that the pixel determined to be non-directional may not be included in the calculation from the beginning. Here, the calculation result that the number of matching pixels indicated by shading is “85” is obtained. The number of matching pixels may be used as a score (matching degree), but a normalized matching pixel number (matching degree) as described below may be used.

次に、図11(b)に示す、正規化一致画素数について説明する。この正規化一致画素数は、例えば、照合精度を高めるためモデルパターンを複数種類用意してパターンマッチングを行なう場合(例えば、21×21、13×13、及び7×7画素の3種類のモデルパターン)に、モデルパターンのサイズに依存しない量として一致画素数を正規化するものである。   Next, the number of normalized matching pixels shown in FIG. The number of normalized matching pixels is, for example, when pattern matching is performed by preparing a plurality of model patterns in order to improve matching accuracy (for example, three types of model patterns of 21 × 21, 13 × 13, and 7 × 7 pixels). ) Normalizes the number of matched pixels as an amount independent of the size of the model pattern.

ここでは、正規化一致画素数を、次式(6)で定義する。   Here, the number of normalized matching pixels is defined by the following equation (6).

正規化一致画素数=適当な定数×(一致画素数/モデル中の方向成分が存在する要素数) ・・・・(6)
なお、「適当な定数」は、計算の便宜等を考慮して適宜定めれば良い。ここでは、正規化一致画素数が0〜10の範囲となるように、適当な定数=10と設定している。なお、以下で説明するパターンマッチングの例においても正規化一致画素数を使用しているが、説明は省略する。
Number of normalized matching pixels = appropriate constant × (number of matching pixels / number of elements having a direction component in the model) (6)
The “appropriate constant” may be appropriately determined in consideration of the convenience of calculation. Here, an appropriate constant = 10 is set so that the number of normalized matching pixels is in the range of 0-10. In the pattern matching example described below, the number of normalized matching pixels is used, but the description thereof is omitted.

(6)式から、図11(a)の場合の正規化一致画素数を求めると以下のようになる。   From the equation (6), the normalized coincidence pixel number in the case of FIG. 11A is obtained as follows.

正規化一致画素数=10×(85/136)=6.25≒6
次に、図12(a)は、照合効率化後の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングを説明するための概要図であり、図11(b)は、その合致度算出方法の一例を示す図である。
Number of normalized matching pixels = 10 × (85/136) = 6.25≈6
Next, FIG. 12A is a schematic diagram for explaining pattern matching between a matching region and a model pattern in the case where the surroundings after darkening the matching efficiency are dark, and FIG. It is a figure which shows an example of the calculation method.

図12(a)は、図6(b)の照合効率化後の照合領域と、図8(a)のモデルパターンとのパターンマッチングを行ったものを示している。ここで、図の中央の4行4列にある1×1画素(2×2画素に相当するものであるが、便宜上「画素」と言う。)は、スコアが付与される注目画素の位置である。網掛けされた部分は、照合領域とモデルパターンとで、勾配方向が一致している場合がある画素を示している。   FIG. 12A shows a result of pattern matching between the collation area after collation efficiency in FIG. 6B and the model pattern in FIG. 8A. Here, 1 × 1 pixel (corresponding to 2 × 2 pixels, but referred to as “pixel” for convenience) in 4 rows and 4 columns in the center of the figure is the position of the target pixel to which a score is assigned. is there. The shaded portion indicates pixels that may have the same gradient direction in the matching region and the model pattern.

図12(b)に示す、一致パターンは、一致した方向の種類数を見る場合のテーブルを示している。本例では、8方向のすべてについて一致した画素が存在していることを示している。   The matching pattern shown in FIG. 12B shows a table when the number of types in the matching direction is viewed. In this example, it is shown that there is a matching pixel in all eight directions.

次に、図12(b)に示す、一致画素数の計算は、上記網掛けの部分を左上の1行1列の画素から、右下の7行7列の画素までの一致画素数を算出する方法の一例を示すものである。ここでは、例えば、1行2列では、照合領域では、勾配方向が「右下」の画素が「3つ」存在しており、一方、モデルパターンの勾配方向は、1つであるが、「右下」である。従って、この場合の一致画素数は、「3」と計算する。   Next, the number of matching pixels shown in FIG. 12B is calculated by calculating the number of matching pixels from the pixel in the upper left 1 row 1 column to the pixel in the lower right 7 row 7 column in the shaded portion. An example of the method of doing is shown. Here, for example, in the first row and the second column, there are “three” pixels having the gradient direction “lower right” in the matching region, while the gradient direction of the model pattern is one, "Lower right". Therefore, the number of matching pixels in this case is calculated as “3”.

他の例では、2行1列では、照合領域では、勾配方向が「右下」の画素が「2つ」と、「右」が「1つ」存在しており、一方、モデルパターンの勾配方向は、1つであるが、「右下」である。勾配方向は、「右下」が「2つ」一致しているが、「右」は一致していない。従って、この場合の一致画素数は、「2」と計算する。なお、ここでは、無方向と判定された画素は、最初から計算に含めない構成としている。   In another example, in 2 rows and 1 column, in the matching region, there are “two” pixels having a gradient direction “lower right” and “one” “right”, while the gradient of the model pattern is There is one direction, but “bottom right”. As for the gradient direction, “bottom right” matches “two”, but “right” does not match. Therefore, the number of matching pixels in this case is calculated as “2”. Here, the pixel determined to be non-directional is not included in the calculation from the beginning.

以上の計算をすべての画素について行なえば、網掛けで示された部分の一致画素数は「91」であるとの算出結果を得ている。なお、この一致画素数をスコア(合致度)として用いても良いが、以下で説明するような正規化一致画素数を用いても良い。   If the above calculation is performed for all the pixels, a calculation result is obtained that the number of matching pixels in the shaded portion is “91”. The number of matching pixels may be used as a score (matching degree), but a normalized matching pixel number as described below may be used.

ここでは、正規化一致画素数を、次式(7)で定義する。   Here, the number of normalized matching pixels is defined by the following equation (7).

正規化一致画素数=適当な定数×(一致画素数/モデル中の方向成分が存在する要素数を4倍した値) ・・・・(7)
適当な定数=10と設定している。
Number of normalized matching pixels = appropriate constant × (number of matching pixels / value obtained by multiplying the number of elements having a direction component in the model by four) (7)
Appropriate constant = 10 is set.

(7)式から、図11(a)の場合の正規化一致画素数を求めると以下のようになる。   From the equation (7), the number of normalized matching pixels in the case of FIG. 11A is obtained as follows.

正規化一致画素数=10×(91/176)=5.17≒5
次に、図13(a)は、照合効率化後の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングを説明するための概要図であり、図13(b)は、その合致度算出方法の一例を示す図である。
Number of normalized matching pixels = 10 × (91/176) = 5.17≈5
Next, FIG. 13A is a schematic diagram for explaining pattern matching between a matching region and a model pattern in the case where the surroundings after darkening is dark, and FIG. 13B shows the degree of matching. It is a figure which shows an example of the calculation method.

図13(a)は、図6(b)の照合効率化後の照合領域と、図9(a)のモデルパターンとのパターンマッチングを行ったものを示している。ここで、図の中央の4行4列にある1×1画素(2×2画素に相当するものであるが、便宜上「画素」と言う。)は、スコアが付与される注目画素の位置である。網掛けされた部分は、照合領域とモデルパターンとで、勾配方向が一致している場合がある画素を示している。   FIG. 13A shows the result of pattern matching between the collation area after collation efficiency in FIG. 6B and the model pattern in FIG. 9A. Here, 1 × 1 pixel (corresponding to 2 × 2 pixels, but referred to as “pixel” for convenience) in 4 rows and 4 columns in the center of the figure is the position of the target pixel to which a score is assigned. is there. The shaded portion indicates pixels that may have the same gradient direction in the matching region and the model pattern.

図13(b)に示す、一致パターンは、一致した方向の種類数を見る場合のテーブルを示している。本例では、8方向のすべてについて一致した画素が存在していることを示している。   The matching pattern shown in FIG. 13B is a table when the number of types in the matching direction is viewed. In this example, it is shown that there is a matching pixel in all eight directions.

次に、図13(b)に示す、一致画素数の計算は、上記網掛けの部分を左上の1行1列の画素から、右下の7行7列の画素までの一致画素数を算出方法の一例を示すものである。ここでは、例えば、1行2列では、照合領域では、勾配方向が「右下」の画素が「3つ」存在しており、一方、モデルパターンの勾配方向は、2つであり、「右下」が「1つ」に「下」が「1つ」である。従って、「右下」が一致しているので、この場合の一致画素数は、「3」と計算する。   Next, the number of matching pixels shown in FIG. 13B is calculated by calculating the number of matching pixels from the pixel in the upper left 1 row 1 column to the pixel in the lower right 7 row 7 column in the shaded portion. An example of the method is shown. Here, for example, in the first row and the second column, there are “three” pixels having the gradient direction “lower right” in the matching region, while the model pattern has two gradient directions, “right “Lower” is “one” and “Lower” is “one”. Therefore, since “lower right” matches, the number of matching pixels in this case is calculated as “3”.

他の例では、2行1列では、照合領域では、勾配方向が「右下」の画素が「2つ」と、「右」が「1つ」存在しており、一方、モデルパターンの勾配方向は、2つであるが、「右」が「1つ」と「右下」が「1つ」である。勾配方向は、「右」が「1つ」と「右下」が「2つ」一致している。従って、この場合の一致画素数は、「3」と計算する。なお、ここでは、無方向と判定された画素は、最初から計算に含めない構成としている。   In another example, in 2 rows and 1 column, in the matching region, there are “two” pixels having a gradient direction “lower right” and “one” “right”, while the gradient of the model pattern is There are two directions, but “right” is “one” and “lower right” is “one”. Regarding the gradient direction, “one” for “right” and “two” for “lower right” coincide. Therefore, the number of matching pixels in this case is calculated as “3”. Here, the pixel determined to be non-directional is not included in the calculation from the beginning.

ここで、下線を引いた数字と、引いてない数字とが記載されているが、下線を引いた数字は、図12(a)の場合と比較して、一致画素数が増加しているものを示している。   Here, numbers underlined and numbers not underlined are described, but the numbers underlined are those in which the number of matching pixels is increased compared to the case of FIG. Is shown.

この結果は、図8(a)のモデルパターンよりも図9(a)のモデルパターンを使用した場合の方が、より変形に強い(円形からの歪に対するロバスト性の高い)パターンマッチングが行なえることを示している。   As a result, pattern matching that is more resistant to deformation (higher robustness against distortion from a circle) can be performed when the model pattern of FIG. 9A is used than the model pattern of FIG. 8A. It is shown that.

以上の計算をすべての画素について行なえば、網掛けで示された部分の一致画素数は「119」であるとの算出結果を得ている。なお、この一致画素数をスコア(合致度)として用いても良いが、以下で説明するような正規化一致画素数を用いても良い。   If the above calculation is performed for all the pixels, a calculation result is obtained that the number of matching pixels in the shaded portion is “119”. The number of matching pixels may be used as a score (matching degree), but a normalized matching pixel number as described below may be used.

(7)式から、図13(a)の場合の正規化一致画素数を求めると以下のようになる。   From the equation (7), the number of normalized coincidence pixels in the case of FIG. 13A is obtained as follows.

正規化一致画素数=10×(119/176)=6.76≒7
次に、図14〜図17(b)に基づき、図1のスコア算出部10が、一致画素数と合致パターンとを併用して、スコア(合致度)を算出する場合について説明する。
Number of normalized matching pixels = 10 × (119/176) = 6.76≈7
Next, a case where the score calculation unit 10 in FIG. 1 calculates a score (matching degree) by using both the number of matching pixels and the matching pattern will be described with reference to FIGS.

図14は、画像処理装置1におけるパターンマッチングにおいて一致画素数とパターン合致度とを併用する場合について説明するためのフローチャートである。   FIG. 14 is a flowchart for explaining a case where the number of matching pixels and the degree of pattern matching are used together in pattern matching in the image processing apparatus 1.

図14のS401では、一致画素数算出部7が、一致画素数を初期化して、S402に進む。S402では、パターン合致度算出部9が一致パターンの初期化を行ってS403に進む。ここでは、勾配方向の種類数を初期化している様子を示している。すべての勾配方向が「無」と表示されているのは、このことを示している。   In S401 of FIG. 14, the coincidence pixel number calculation unit 7 initializes the coincidence pixel number, and proceeds to S402. In S402, the pattern matching degree calculation unit 9 initializes the matching pattern and proceeds to S403. Here, a state in which the number of types in the gradient direction is initialized is shown. This is indicated by the fact that all gradient directions are displayed as “none”.

S403では、一致画素数算出部7とパターン合致度算出部9とが1画素ごとに(照合効率化後の画素も含む)勾配方向の照合等を行って、S404に進む。   In S403, the coincidence pixel number calculation unit 7 and the pattern coincidence degree calculation unit 9 perform collation in the gradient direction for each pixel (including pixels after collation efficiency improvement), and the process proceeds to S404.

S404では、方向が一致すれば(Yes)S405に進み、一致画素数算出部7が一致画素数に一致した方向の要素数(効率化処理なしの場合は「1」)を加えてS406に進み、一方、方向が一致する画素が全くなければ、(No)S401に戻る。   In S404, if the directions match (Yes), the process proceeds to S405, and the matching pixel number calculation unit 7 adds the number of elements in the direction matching the number of matching pixels (“1” in the case of no efficiency process) and proceeds to S406. On the other hand, if there are no pixels whose directions match (No), the process returns to S401.

S406では、パターン合致度算出部9が一致した勾配方向を「有」と更新して、S407に進む。   In S406, the pattern coincidence degree calculation unit 9 updates the matched gradient direction as “present”, and the process proceeds to S407.

S407では、一致画素数算出部7及びパターン合致度算出部9がモデルパターンの全要素(画素)について照合が終了した場合には、(Yes)S408に進み、照合が終了していない場合には、(No)S403に戻る。   In S407, when the matching pixel number calculation unit 7 and the pattern matching degree calculation unit 9 complete collation for all the elements (pixels) of the model pattern (Yes), the process proceeds to S408, and in the case where the collation has not ended. , (No) Return to S403.

S408では、パターン合致度算出部9が一致パターンのチェックを行ない、S409に進む。この一致パターンのチェックの詳細については、後に説明する。   In S408, the pattern matching degree calculation unit 9 checks the matching pattern, and the process proceeds to S409. The details of checking the matching pattern will be described later.

S409では、パターン合致度算出部9が、モデルパターン・比較用一致パターン格納部8を参照して、「許可パターン」に該当するか否かを判定し、許可パターンに該当する場合は、(Yes)S410に進む。一方、許可パターンに該当しない場合は、(No)S404に戻る。   In S409, the pattern matching degree calculation unit 9 refers to the model pattern / comparison matching pattern storage unit 8 to determine whether or not it corresponds to the “permitted pattern”. ) Go to S410. On the other hand, when it does not correspond to a permission pattern, it returns to (No) S404.

なお、パターン合致度算出部9は、「許可パターン」に該当する場合にはパターン合致度を「1」とし、「許可パターン」に該当しない場合にはパターン合致度を「0」とし、スコア算出部10は、一致画素数算出部7が算出した一致画素数にこれらの数値を掛ける構成が考えられる。   Note that the pattern matching degree calculation unit 9 sets the pattern matching degree to “1” when it corresponds to “permitted pattern”, and sets the pattern matching degree to “0” when it does not correspond to “permitted pattern”. The unit 10 may be configured to multiply the number of coincidence pixels calculated by the coincidence pixel number calculation unit 7 by these numerical values.

S410では、スコア算出部10が、一致画素数算出部7が算出した一致画素数から正規化一致画素数を算出してパターンマッチングのスコア(合致度)とする。   In S410, the score calculation unit 10 calculates the normalized matching pixel number from the matching pixel number calculated by the matching pixel number calculation unit 7 to obtain a pattern matching score (matching degree).

次に、図15(a)及び図15(b)に基づき、上記パターンマッチングにおける一致パターンのチェックの一例について説明する。   Next, an example of matching pattern check in the pattern matching will be described with reference to FIGS. 15 (a) and 15 (b).

図15(a)は、パターン合致度算出過程の一例を示すフローチャートであり、図15(b)は、パターン合致度算出過程の他の例を示すフローチャートである。   FIG. 15A is a flowchart showing an example of the pattern matching degree calculation process, and FIG. 15B is a flowchart showing another example of the pattern matching degree calculation process.

なお、ここでは、勾配方向の種類は8方向あり、勾配方向種類数の閾値(DN)を5に設定した場合について説明する。   Here, there are eight types of gradient directions, and a case where the threshold value (DN) of the number of types of gradient directions is set to 5 will be described.

図15(a)に示すように、S501では、パターン合致度算出部9が、一致パターンの「有」の数が5以上の場合には、S502に進み、一致パターンの許可を行なう。   As shown in FIG. 15A, in S501, when the number of “matched” in the matching pattern is 5 or more, the pattern matching degree calculation unit 9 proceeds to S502 and permits the matching pattern.

一方、パターン合致度算出部9は、一致パターンの「有」の数(勾配方向種類数)が5未満の場合には、S503に進み、一致パターンの不許可を行なう。   On the other hand, if the number of matching patterns “exist” (number of types in the gradient direction) is less than 5, the pattern matching degree calculation unit 9 proceeds to S503 and rejects the matching pattern.

同様に、図15(b)には、パターン合致度算出部9が、一致パターン中の最大連接数(連続一致数)を算出し、一致パターン中の最大連接数(連続一致数)の閾値(DN)を上記と共通の5に設定した場合が異なること以外は、S601〜S603のフローは、図15(a)のS501〜S503のフローと同様であるので、ここでは、説明を省略する。   Similarly, in FIG. 15B, the pattern matching degree calculation unit 9 calculates the maximum number of consecutive connections (number of consecutive matches) in the matching pattern, and a threshold ( The flow from S601 to S603 is the same as the flow from S501 to S503 in FIG. 15A except that the case where DN) is set to 5 which is the same as the above, and the description thereof is omitted here.

次に、図16(a)〜図16(c)に基づき、一致パターンのチェックにおける第1の例を説明する。   Next, based on FIG. 16A to FIG. 16C, a first example in the matching pattern check will be described.

図16(a)は、パターン合致度算出過程の一例を示す概要図であり、図16(b)は、パターン合致度算出過程の他の例を示す概要図であり、図16(c)は、パターン合致度算出過程のさらに他の例を示す概要図である。   FIG. 16A is a schematic diagram showing an example of the pattern matching degree calculation process, FIG. 16B is a schematic diagram showing another example of the pattern matching degree calculation process, and FIG. FIG. 10 is a schematic diagram showing still another example of a pattern matching degree calculation process.

図16(a)では、一致画素数は「24」と算出している。また、勾配方向の一致パターンは、「8」方向がすべて存在しているので、閾値の5を超えており、図15(a)のフローでは、「許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「8」となり、閾値の5を超えており、図15(b)のフローでも、「許可パターン」と判定される。したがって、図16(a)の場合には、パターン合致度算出部9は、パターン合致度として「1」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「24」と「1」とを掛け算したのち、正規化一致画素数を算出してスコアとする。   In FIG. 16A, the number of matching pixels is calculated as “24”. Further, since all the “8” directions exist in the matching pattern in the gradient direction, the threshold value exceeds 5, and is determined as the “permitted pattern” in the flow of FIG. 15A. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated, is “8”, which exceeds the threshold value of 5, and is determined as “permitted pattern” in the flow of FIG. Is done. Accordingly, in the case of FIG. 16A, the pattern matching degree calculation unit 9 calculates “1” as the pattern matching degree, and the score calculation unit 10 calculates the number of matching pixels calculated by the matching pixel number calculation unit 7. After multiplying “24” and “1”, the number of normalized matching pixels is calculated as a score.

図16(b)では、一致画素数は「24」と算出している。また、勾配方向の一致パターンは、「6」方向が存在しているので、閾値の5を超えており、図15(a)のフローでは、「許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「6」となり、閾値の5を超えており、図15(b)のフローでも、「許可パターン」と判定される。したがって、図16(b)の場合には、パターン合致度算出部9は、パターン合致度として「1」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「24」と「1」とを掛け算したのち、正規化一致画素数を算出してスコアとする。   In FIG. 16B, the number of matching pixels is calculated as “24”. Further, since the “6” direction exists in the matching pattern in the gradient direction, the threshold value exceeds 5, and is determined as the “permitted pattern” in the flow of FIG. 15A. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated, is “6”, which exceeds the threshold value of 5, and is determined as “permitted pattern” in the flow of FIG. Is done. Therefore, in the case of FIG. 16B, the pattern matching degree calculation unit 9 calculates “1” as the pattern matching degree, and the score calculation unit 10 calculates the number of matching pixels calculated by the matching pixel number calculation unit 7. After multiplying “24” and “1”, the number of normalized matching pixels is calculated as a score.

図16(c)では、一致画素数は「24」と算出している。また、勾配方向の一致パターンは、「6」方向が存在しているので、閾値の5を超えており、図15(a)のフローでは、「許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「6」となり、閾値の5を超えており、図15(b)のフローでも、「許可パターン」と判定される。なお、この例のように、一致パターンのテーブルの左端と右端とは、繋がっている(周期的境界条件)ものとして、一致パターン中の最大連接数を算出する。   In FIG. 16C, the number of matching pixels is calculated as “24”. Further, since the “6” direction exists in the matching pattern in the gradient direction, the threshold value exceeds 5, and is determined as the “permitted pattern” in the flow of FIG. 15A. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated, is “6”, which exceeds the threshold value of 5, and is determined as “permitted pattern” in the flow of FIG. Is done. As in this example, assuming that the left end and the right end of the matching pattern table are connected (periodic boundary condition), the maximum number of connections in the matching pattern is calculated.

以上の結果、図16(c)の場合には、パターン合致度算出部9は、パターン合致度として「1」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「24」と「1」とを掛け算したのち、正規化一致画素数を算出してスコアとする。   As a result of the above, in the case of FIG. 16C, the pattern matching degree calculation unit 9 calculates “1” as the pattern matching degree, and the score calculation unit 10 calculates the coincidence calculated by the matching pixel number calculation unit 7. After multiplying the number of pixels “24” and “1”, the number of normalized matching pixels is calculated and used as a score.

次に、図17(a)〜図17(c)に基づき、一致パターンのチェックにおける第2の例を説明する。   Next, a second example in the matching pattern check will be described with reference to FIGS.

図17(a)は、パターン合致度算出過程のさらに他の例を示す概要図であり、図17(b)は、パターン合致度算出過程のさらに他の例を示す概要図であり、図17(c)は、パターン合致度算出過程のさらに他の例を示す概要図である。   17A is a schematic diagram showing still another example of the pattern matching degree calculation process, and FIG. 17B is a schematic diagram showing still another example of the pattern matching degree calculation process. (C) is a schematic diagram showing still another example of the pattern matching degree calculation process.

図17(a)では、一致画素数は「24」と算出している。また、勾配方向の一致パターンは、「6」方向が存在しているので、閾値の5を超えており、図15(a)のフローでは、「許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「4」となり、閾値の5以下であり、図15(b)のフローでは、「不許可パターン」と判定される。   In FIG. 17A, the number of matching pixels is calculated as “24”. Further, since the “6” direction exists in the matching pattern in the gradient direction, the threshold value exceeds 5, and is determined as the “permitted pattern” in the flow of FIG. 15A. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated is “4”, which is 5 or less of the threshold value, and is determined as “non-permitted pattern” in the flow of FIG. Is done.

したがって、図17(a)の場合には、図15(a)のフローを用いた場合、パターン合致度算出部9は、パターン合致度として「1」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「24」と「1」とを掛け算したのち、正規化一致画素数を算出してスコアとする。   Therefore, in the case of FIG. 17A, when using the flow of FIG. 15A, the pattern matching degree calculation unit 9 calculates “1” as the pattern matching degree, and the score calculation unit 10 After multiplying the number of matching pixels “24” and “1” calculated by the pixel number calculation unit 7, the number of normalized matching pixels is calculated and used as a score.

一方、図15(b)のフローを用いた場合、パターン合致度算出部9は、パターン合致度として「0」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「24」と「0」とを掛け算して「0」をスコアとする。   On the other hand, when the flow of FIG. 15B is used, the pattern matching degree calculation unit 9 calculates “0” as the pattern matching degree, and the score calculation unit 10 calculates the coincidence calculated by the matching pixel number calculation unit 7. The number of pixels “24” is multiplied by “0” to obtain “0” as a score.

図17(b)では、一致画素数は「22」と算出している。また、勾配方向の一致パターンは、「4」方向が存在しているので、閾値の5以下であり、図15(a)のフローでは、「不許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「2」となり、閾値の5以下であり、図15(b)のフローでも、「不許可パターン」と判定される。   In FIG. 17B, the number of matching pixels is calculated as “22”. The matching pattern in the gradient direction is equal to or less than the threshold value 5 because the “4” direction exists, and is determined as a “non-permitted pattern” in the flow of FIG. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated, is “2”, which is 5 or less of the threshold, and is determined as “non-permitted pattern” in the flow of FIG. Is done.

したがって、図17(b)の場合には、パターン合致度算出部9は、パターン合致度として「0」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「22」と「0」とを掛け算して「0」をスコアとする。   Accordingly, in the case of FIG. 17B, the pattern matching degree calculation unit 9 calculates “0” as the pattern matching degree, and the score calculation unit 10 calculates the number of matching pixels calculated by the matching pixel number calculation unit 7. Multiplying “22” and “0” gives “0” as the score.

図17(c)では、一致画素数は「22」と算出している。また、勾配方向の一致パターンは、「4」方向が存在しているので、閾値の5以下であり、図15(a)のフローでは、「不許可パターン」と判定される。一方、一致パターン中の最大連接数、「有」が連接して存在する数は、「4」となり、閾値の5を超えており、図15(b)のフローでも、「不許可パターン」と判定される。   In FIG. 17C, the number of matching pixels is calculated as “22”. The matching pattern in the gradient direction is equal to or less than the threshold value 5 because the “4” direction exists, and is determined as a “non-permitted pattern” in the flow of FIG. On the other hand, the maximum number of concatenations in the matching pattern, the number of “existing” concatenated is “4”, which exceeds the threshold value of 5, and is also “non-permitted pattern” in the flow of FIG. Determined.

以上の結果、図17(c)の場合には、パターン合致度算出部9は、パターン合致度として「0」を算出し、スコア算出部10は、一致画素数算出部7が算出した、一致画素数「22」と「0」とを掛け算して「0」をスコアとする。   As a result of the above, in the case of FIG. 17C, the pattern matching degree calculation unit 9 calculates “0” as the pattern matching degree, and the score calculation unit 10 matches the matching pixel number calculation unit 7. The number of pixels “22” is multiplied by “0” to obtain “0” as a score.

以上のように、スコア算出部10は、照合領域と、モデルパターンとの照合を行って、照合領域に含まれる勾配方向と、モデルパターンに含まれる勾配方向とが一致する画素数(一致画素数)、及び、照合領域に含まれる画素ごとの勾配方向とモデルパターンに含まれる画素ごとの勾配方向との一致パターンと、あらかじめ定められた比較用一致パターンとが類似する度合いを示すパターン合致度から、スコア(合致度)を算出する。   As described above, the score calculation unit 10 performs matching between the matching area and the model pattern, and the number of pixels (the number of matching pixels) in which the gradient direction included in the matching area matches the gradient direction included in the model pattern. ), And the pattern matching degree indicating the degree of similarity between the matching pattern between the gradient direction for each pixel included in the matching region and the gradient direction for each pixel included in the model pattern, and a predetermined comparison matching pattern. The score (degree of match) is calculated.

(6.接触・非接触特定過程)
次に、画像処理装置1における接触・非接触特定過程について説明する。
(6. Contact / non-contact identification process)
Next, a contact / non-contact identification process in the image processing apparatus 1 will be described.

図18は、画像処理装置1の動作のうち、接触・非接触特定過程の動作を示すフローチャートである。   FIG. 18 is a flowchart showing the operation of the contact / non-contact identification process among the operations of the image processing apparatus 1.

図18においては、S701では、スコア算出部10が、自身が算出した合致度が所定の値以上である場合には(Yes)、S702に進む。一方、自身が算出した合致度が所定の値以上でない場合には(No)、本接触・非接触特定過程の動作が終了する。   In FIG. 18, in S701, the score calculation unit 10 proceeds to S702 when the degree of match calculated by itself is equal to or greater than a predetermined value (Yes). On the other hand, when the degree of coincidence calculated by itself is not equal to or greater than the predetermined value (No), the operation of the contact / non-contact identification process is ended.

S702では、第2エッジ抽出部15は、合致度が所定の値以上であるとのスコア算出部10の判断に基づいて、第2エッジ画素を抽出して、S703に進む。   In S702, the second edge extraction unit 15 extracts the second edge pixel based on the determination of the score calculation unit 10 that the degree of match is equal to or greater than a predetermined value, and the process proceeds to S703.

S703では、スコア算出部10が、第2エッジ抽出部15から第1エッジ画素数及び第2エッジ画素数を取得し、第1エッジ画素のうち第2エッジ画素が占める割合が所定の値を超えているか否かを判断する。そして、所定の値を超えていれば(Yes)、S704に進む。一方、所定の値を超えていなければ(No)、本接触・非接触特定過程の動作が終了する。   In S703, the score calculation unit 10 acquires the first edge pixel number and the second edge pixel number from the second edge extraction unit 15, and the proportion of the first edge pixels occupied by the second edge pixels exceeds a predetermined value. Judge whether or not. If it exceeds the predetermined value (Yes), the process proceeds to S704. On the other hand, if the predetermined value is not exceeded (No), the operation of the present contact / non-contact identification process ends.

S704では、スコア算出部10が、第1エッジ画素のうち第2エッジ画素が占める割合が所定の値を超えているとの自身の判断に基づいて、今回自身が算出した合致度を位置特定部11に出力する。   In S <b> 704, the score calculation unit 10 calculates the degree of coincidence calculated by itself this time based on its own determination that the proportion of the first edge pixels occupied by the second edge pixels exceeds a predetermined value. 11 is output.

このようにして、図18に示す接触・非接触特定過程の動作が実行されることになる。   In this way, the operation of the contact / non-contact identification process shown in FIG. 18 is executed.

ここで、この動作の効果について具定例を用いて説明する。図2(c)及び図2(d)に示したように、周囲の明るさが一定以上になると表示画面に近接する指以外の部分の画素値は、指の画素値よりも明るくなる。指が表示画面に接触している時には、例えば図19に示すような撮像画像が得られる。   Here, the effect of this operation will be described using a specific example. As shown in FIGS. 2C and 2D, when the surrounding brightness becomes a certain level or more, the pixel values of the portions other than the finger that are close to the display screen become brighter than the pixel values of the finger. When the finger is in contact with the display screen, for example, a captured image as shown in FIG. 19 is obtained.

この場合、第1エッジ抽出部4により抽出された第1エッジ画素の勾配方向は図20に示すような配置となる。そして、図中のA部においてパターンマッチングが行なわれることになる。   In this case, the gradient directions of the first edge pixels extracted by the first edge extraction unit 4 are arranged as shown in FIG. Then, pattern matching is performed at the portion A in the figure.

また、第2エッジ抽出部15により抽出された第2エッジ画素は図21に示すような配置となる。   Further, the second edge pixels extracted by the second edge extraction unit 15 are arranged as shown in FIG.

一方、図22は指が表示画面に接近しているが接触していないときの撮像画像である。そして、第1エッジ抽出部4により抽出された第1エッジ画素の勾配方向は図23に示すような配置となる場合がある。この場合、図中のB部においてパターンマッチングが行なわれてしまう可能性がある。   On the other hand, FIG. 22 is a captured image when the finger is approaching the display screen but is not in contact. And the gradient direction of the 1st edge pixel extracted by the 1st edge extraction part 4 may become arrangement | positioning as shown in FIG. In this case, there is a possibility that pattern matching will be performed at the portion B in the figure.

しかしながら、図22に示す撮像画像においては、図24に示すように、第2エッジ抽出部15により第2エッジ画素が抽出されることがない。なぜなら、縦方向勾配量Sy及び横方向勾配量Sxのそれぞれ、又は、勾配の大きさABS(S)が第2閾値以上である第2エッジ画素が第1エッジ画素のうちに存在しないからである。   However, in the captured image shown in FIG. 22, the second edge extraction unit 15 does not extract the second edge pixel as shown in FIG. 24. This is because there is no second edge pixel in the first edge pixel in which the vertical gradient amount Sy and the horizontal gradient amount Sx or the gradient magnitude ABS (S) is equal to or greater than the second threshold value. .

したがって、仮に、非接触の指の画像データに対してパターンマッチングが行なわれたとしても、第2エッジ画素を抽出することにより、接触・非接触の特定をより精度良く行なうことができる。   Therefore, even if pattern matching is performed on image data of a non-contact finger, it is possible to specify contact / non-contact with higher accuracy by extracting the second edge pixel.

次に、画像処理装置1の利用空間の明るさが変化する場合について説明する。上述したように、周囲の明るさが一定以上になると表示画面に近接する指以外の部分の画素値は、指の画素値よりも明るくなる。そして、周囲が明るくなると指以外の背景部分の画素値と指の画素値との差が広がる、すなわち、指先のエッジ強度が周囲の明るさに応じて変化する。   Next, a case where the brightness of the usage space of the image processing apparatus 1 changes will be described. As described above, when the surrounding brightness becomes a certain level or higher, the pixel values of portions other than the finger that are close to the display screen become brighter than the pixel value of the finger. When the surroundings become bright, the difference between the pixel value of the background portion other than the finger and the pixel value of the finger increases, that is, the edge strength of the fingertip changes according to the surrounding brightness.

ここで、第2エッジ抽出部15が利用する第2閾値は、注目画素の画素値と隣接画素の画素値との差、つまり、背景部分の画素値と指の画素値との差に対して設定されるものである。このため、指先のエッジ強度が周囲の明るさに応じて変化する場合において、第2閾値を一律に設定してしまうと、第2エッジ画素の抽出を精度良く行なうことができない。   Here, the second threshold value used by the second edge extraction unit 15 is the difference between the pixel value of the target pixel and the pixel value of the adjacent pixel, that is, the difference between the pixel value of the background portion and the pixel value of the finger. Is set. For this reason, when the edge strength of the fingertip changes according to the surrounding brightness, if the second threshold value is set uniformly, the second edge pixel cannot be extracted with high accuracy.

そこで、画像処理装置1の利用空間の明るさが変化する場合においては、周囲の明るさに応じて第2閾値を調節することにより、周囲の明るさが変化しても第2エッジ画素の抽出を高精度に実行する。   Therefore, when the brightness of the usage space of the image processing apparatus 1 changes, the second threshold value is adjusted according to the surrounding brightness, so that the second edge pixel is extracted even if the surrounding brightness changes. Is executed with high accuracy.

具体的には、本実施の形態における画像処理装置1は、図1に示したように、閾値調節部16が利用空間の明るさを取得し、その明るさに応じて第2閾値を調節し、第2エッジ抽出部15に出力する。   Specifically, in the image processing apparatus 1 according to the present embodiment, as illustrated in FIG. 1, the threshold adjustment unit 16 acquires the brightness of the usage space, and adjusts the second threshold according to the brightness. And output to the second edge extraction unit 15.

閾値調節部16は、例えば、撮像画像における背景画像の画素値を取得する。例えば、撮像画像のヒストグラムを生成し、ヒストグラム上で明るい部分の画素値を背景画像の画素値とする。   For example, the threshold adjustment unit 16 acquires the pixel value of the background image in the captured image. For example, a histogram of the captured image is generated, and a pixel value of a bright part on the histogram is set as a pixel value of the background image.

また、所定の大きさの矩形を撮像画像上で走査したときの、矩形内の平均画素値の最大値を背景画像の画素値としてもよい。   Further, the maximum value of the average pixel value in the rectangle when a rectangle having a predetermined size is scanned on the captured image may be used as the pixel value of the background image.

さらに、モデルパターンと照合する際に、モデルパターンの外側の複数画素を用いてヒストグラムを生成し、ヒストグラム上で明るい部分の画素値を背景画像の画素値としてもよい。   Furthermore, when collating with the model pattern, a histogram may be generated using a plurality of pixels outside the model pattern, and the pixel value of a bright part on the histogram may be used as the pixel value of the background image.

そして、閾値調節部16は、このように取得した背景画像の画素値に応じた第2閾値を閾値格納部17から取得し、第2エッジ抽出部15に出力する。   Then, the threshold adjustment unit 16 acquires a second threshold corresponding to the pixel value of the background image acquired in this way from the threshold storage unit 17 and outputs the second threshold to the second edge extraction unit 15.

このようにして、周囲の明るさの変化に応じて第2閾値を調節することにより、周囲の明るさが変化する場合でも、第2エッジ画素を精度良く抽出することができる。   In this way, by adjusting the second threshold according to the change in ambient brightness, the second edge pixel can be extracted with high accuracy even when the ambient brightness changes.

次に、画像処理装置1の利用空間が明るくなりすぎた場合について説明する。周囲が明るくなりすぎると、指に対する光の周り込みなどの影響により、指の画素値が上昇してしまう。その結果、光センサーの感度が指の画素値を検知するのに十分ではないと、光センサーが指の画像を認識することができない場合が起こり得る。   Next, a case where the use space of the image processing apparatus 1 becomes too bright will be described. If the surroundings become too bright, the pixel value of the finger will increase due to the influence of light wrapping around the finger. As a result, if the sensitivity of the photosensor is not sufficient to detect the pixel value of the finger, the photosensor may not be able to recognize the finger image.

このような場合に指を認識するためには、光センサーの感度を低下させることが必要となる。しかし、光センサーの感度を変化させてしまうと、背景画像の画素値と指腹の画素値と差も同時に変化してしまうことになる。このため、上述した周囲の明るさが変化する場合と同様、光線センサーの感度を変化させた場合においても、その変化に応じて第2閾値を調節しなければならない。以下、この場合における第2閾値の調節について説明する。   In order to recognize a finger in such a case, it is necessary to reduce the sensitivity of the optical sensor. However, if the sensitivity of the optical sensor is changed, the difference between the pixel value of the background image and the pixel value of the finger pad also changes at the same time. For this reason, similarly to the case where the ambient brightness changes, the second threshold value must be adjusted in accordance with the change even when the sensitivity of the light sensor is changed. Hereinafter, the adjustment of the second threshold value in this case will be described.

図25に、背景画像及び指腹画像の各々の画素値と利用空間の明るさの照度との関係を示す。図25では、光センサーの感度が標準感度である場合における背景画像の画素値及び指腹画像の画素値、並びに、光センサーの感度が標準感度の1/2の感度(以下、「1/2感度」と呼ぶ。)である場合における背景画像の画素値及び指腹画像の画素値が示されている。   FIG. 25 shows the relationship between the pixel values of the background image and the finger pad image and the illuminance of the brightness of the usage space. In FIG. 25, when the sensitivity of the optical sensor is the standard sensitivity, the pixel value of the background image and the pixel value of the finger pad image, and the sensitivity of the optical sensor is 1/2 the standard sensitivity (hereinafter referred to as “1/2”). In this case, the pixel value of the background image and the pixel value of the finger pad image are shown.

図25に示すように、光センサーの感度を標準感度から1/2感度に低下させた場合、利用空間の照度に対して、画素値の傾きは背景画像、指腹画像のいずれにおいても、光センサー感度が標準感度である場合の1/2となっている。また、指腹画像の画素値については、利用空間の照度が0、つまり、0Luxにおける画素値についても、光センサー感度が標準感度である場合の1/2となっている。   As shown in FIG. 25, when the sensitivity of the optical sensor is reduced from the standard sensitivity to ½ sensitivity, the inclination of the pixel value with respect to the illuminance in the usage space is the light in both the background image and the finger pad image. The sensor sensitivity is ½ of the standard sensitivity. Further, the pixel value of the finger pad image is ½ of the case where the illuminance of the use space is 0, that is, the pixel value at 0 Lux, when the optical sensor sensitivity is the standard sensitivity.

ここで、標準感度での背景画像の画素値及び指腹画像の画素値、並びに、標準感度の1/nの感度(以下、「1/n感度」と呼ぶ。)での背景画像の画素値及び指腹画像の画素値の各々を、照度に対する数式で表わすと以下のようになる。   Here, the pixel value of the background image at the standard sensitivity and the pixel value of the finger pad image, and the pixel value of the background image at the sensitivity of 1 / n of the standard sensitivity (hereinafter referred to as “1 / n sensitivity”). Each of the pixel values of the finger pad image is represented by the following equation with respect to illuminance.

標準感度での背景画像の画素値:
vb=avbx ・・・・(8)
x:照度、avb:定数
1/n感度での背景画像の画素値:
vb=(avb/n)x ・・・・(9)
n:感度
標準感度での指腹画像の画素値:
vf=avfx+b ・・・・(10)
vf:定数、b:定数
1/n感度での指腹画像の画素値:
vf=(avf/n)x+(1/n)b ・・・・(11)
そして、閾値調節部16は、上記の式(8)〜(11)において用いられている各定数をあらかじめ保持している。また、閾値格納部17は、撮像画像上における背景画像の画素値に一対一に対応する、複数の第2閾値をあらかじめ格納している。そして、閾値格納部17が格納している第2閾値は、光センサーの感度が上記の標準感度をとる場合を想定して、あらかじめ設定されたものである。
Pixel value of background image at standard sensitivity:
vb 1 = a vb x (8)
x: Illuminance, a vb : Constant Pixel value of the background image at 1 / n sensitivity:
vb n = (a vb / n) x (9)
n: Sensitivity Pixel value of finger pad image at standard sensitivity:
vf 1 = a vf x + b (10)
a vf : Constant, b: Constant Pixel value of finger pad image at 1 / n sensitivity:
vf n = (a vf / n) x + (1 / n) b (11)
The threshold adjustment unit 16 holds in advance each constant used in the above formulas (8) to (11). In addition, the threshold storage unit 17 stores a plurality of second threshold values corresponding to the pixel values of the background image on the captured image on a one-to-one basis. The second threshold stored in the threshold storage unit 17 is set in advance on the assumption that the sensitivity of the optical sensor takes the standard sensitivity described above.

閾値調節部16は、光センサーの感度が標準感度から1/n感度に変化した場合には、背景画像の画素値及び光センサーの感度を取得し、それらを用いて第2閾値を調節する。   When the sensitivity of the optical sensor changes from the standard sensitivity to the 1 / n sensitivity, the threshold adjustment unit 16 acquires the pixel value of the background image and the sensitivity of the optical sensor, and adjusts the second threshold using them.

具体的には、閾値調節部16は、利用空間の明るさを取得すると、その明るさから現在の背景画像の画素値を特定する。そして、閾値調節部16は、指腹画像の画素値と背景画像の画素値との差分を求め、光センサーの感度が標準感度とした場合に同じ差分となるように、標準感度の背景画像の画素値を上記の式(8)〜(11)を用いて算出する。   Specifically, when the threshold adjustment unit 16 acquires the brightness of the usage space, the threshold value adjustment unit 16 specifies the pixel value of the current background image from the brightness. Then, the threshold adjustment unit 16 obtains a difference between the pixel value of the finger pad image and the pixel value of the background image, so that the same difference is obtained when the sensitivity of the optical sensor is the standard sensitivity. Pixel values are calculated using the above equations (8) to (11).

標準感度の背景画像の画素値は、数式(8)〜(11)を以下のように変換することにより、現在の背景画素値より算出される。   The pixel value of the standard-sensitivity background image is calculated from the current background pixel value by converting Equations (8) to (11) as follows.

すなわち、式(8)及び(10)から以下の式が与えられる。   That is, the following equations are given from equations (8) and (10).

vf=(avf/avb)vb+b ・・・・(12)
また、式(9)及び(11)から以下の式が与えられる。
vf 1 = (a vf / a vb ) vb 1 + b (12)
Moreover, the following formulas are given from formulas (9) and (11).

vf=(avf/avb)vb+(1/n)b
vb−vf=(1−(avf/avb))vb−(1/n)b ・・・・(13)
現在の背景画像と指腹画像との画素値の差分を求め、標準感度で同じ差分となるように標準感度の背景画像の画素値を算出するため、上記の式(12)及び(13)を用いて、以下の順に変換を実行する。
vf n = (a vf / a vb ) vb n + (1 / n) b
vb n −vf n = (1− (a vf / a vb )) vb n − (1 / n) b (13)
In order to obtain the difference between the pixel values of the current background image and the finger pad image and calculate the pixel value of the background image with the standard sensitivity so that the same difference is obtained with the standard sensitivity, the above equations (12) and (13) are used. And perform the conversion in the following order:

(a)vb−vf=vb−vf
(b)vb=vb−vf+vf
(c)vb=(1−(avf/avb))vb−(1/n)b+(avf/avb)vb+b
(d)(1−(avf/avb))vb=(1−(avf/avb))vb+((n−1)/n)b
(e)vb=vb+((n−1)/n)b/(1−(avf/avb))
このようにして、閾値調節部16は、標準感度の背景画像の画素値を算出し、それに対応する第2閾値を閾値格納部17から取得し、第2エッジ抽出部15に出力する。そして、第2エッジ抽出部15は、光センサーの感度の変化に応じて調節された第2閾値を閾値調節部16から取得することができるので、第2エッジ画素の抽出を高精度に行なうことができる。
(A) vb 1 −vf 1 = vb n −vf n
(B) vb 1 = vb n −vf n + vf 1
(C) vb 1 = (1- (a vf / a vb)) vb n - (1 / n) b + (a vf / a vb) vb 1 + b
(D) (1- (a vf / a vb )) vb 1 = (1- (a vf / a vb )) vb n + ((n−1) / n) b
(E) vb 1 = vb n + ((n−1) / n) b / (1− (a vf / a vb ))
In this way, the threshold adjustment unit 16 calculates the pixel value of the standard sensitivity background image, acquires the second threshold corresponding to the pixel value from the threshold storage unit 17, and outputs the second threshold to the second edge extraction unit 15. And since the 2nd edge extraction part 15 can acquire the 2nd threshold value adjusted according to the change of the sensitivity of an optical sensor from the threshold value adjustment part 16, it extracts a 2nd edge pixel with high precision. Can do.

ところで、上述した図18の動作の効果は、図2(c)及び図2(d)に示したように、周囲の明るさが一定以上になると表示画面に近接する指以外の部分の画素値は、指の画素値よりも明るくなる場合に限り、有効となるものである。したがって、図2(a)及び(b)に示したような、表示画面に近接する指以外の部分の画素値が指の画素値よりも暗くなる場合では、上記の動作を用いることができない。   By the way, as shown in FIGS. 2C and 2D, the effect of the above-described operation of FIG. 18 is that the pixel values of the portions other than the finger that are close to the display screen when the surrounding brightness becomes a certain level or more. Is effective only when it becomes brighter than the pixel value of the finger. Therefore, as shown in FIGS. 2A and 2B, the above operation cannot be used when the pixel value of the portion other than the finger close to the display screen is darker than the finger pixel value.

そこで、このような場合においては、画像処理装置1の液晶ディスプレイの構成を工夫することにより、常に、背景画像の画素値が指腹画像の画素値よりも明るい状況を作り出すことが可能である。   Therefore, in such a case, it is possible to always create a situation in which the pixel value of the background image is brighter than the pixel value of the finger pad image by devising the configuration of the liquid crystal display of the image processing apparatus 1.

例えば、液晶ディスプレイの表面に透明基板と弾性フィルムを設ければよい。透明基板と弾性フィルムとの間の空気層により、液晶ディスプレイの表面に圧力がかかっていないとき光の反射がおこる。一方、圧力がかかっているときは空気層での反射がなくなるために、反射率が低くなる。   For example, a transparent substrate and an elastic film may be provided on the surface of the liquid crystal display. The air layer between the transparent substrate and the elastic film reflects light when no pressure is applied to the surface of the liquid crystal display. On the other hand, when the pressure is applied, since the reflection in the air layer is lost, the reflectance becomes low.

図26に、液晶ディスプレイの表面に透明基板と弾性フィルムを設けた場合における、背景画像及び指腹画像の各々の画素値と利用空間の明るさの照度との関係を示す。図26では、光センサーの感度が標準感度である場合における背景画像の画素値及び指腹画像の画素値、並びに、光センサーの感度が1/2感度である場合における背景画像の画素値及び指腹画像の画素値が示されている。   FIG. 26 shows the relationship between the pixel value of each of the background image and finger pad image and the illuminance of the brightness of the use space when a transparent substrate and an elastic film are provided on the surface of the liquid crystal display. In FIG. 26, the pixel value of the background image and the finger pad image when the sensitivity of the optical sensor is the standard sensitivity, and the pixel value of the background image and the finger when the sensitivity of the optical sensor is ½ sensitivity. A pixel value of the abdomen image is shown.

この場合、図26に示すように、光センサーの感度が標準感度及び1/2感度のいずれに場合においても、常に、背景画像の画素値が指腹画像の画素値よりも明るい状況を作り出すことができる。   In this case, as shown in FIG. 26, a situation where the pixel value of the background image is always brighter than the pixel value of the finger pad image regardless of whether the sensitivity of the photosensor is the standard sensitivity or the half sensitivity. Can do.

したがって、図2(a)及び(b)に示したような、表示画面に近接する指以外の部分の画素値が指の画素値よりも暗くなる場合でも、図18の動作の効果を有効なものとすることができる。その結果、このような場合であっても、第2エッジ抽出部15は、光センサーの感度の変化に応じて調節された第2閾値を閾値調節部16から取得することができるので、第2エッジ画素の抽出を高精度に行なうことができる。   Therefore, even when the pixel value of the portion other than the finger close to the display screen becomes darker than the finger pixel value as shown in FIGS. 2A and 2B, the effect of the operation of FIG. 18 is effective. Can be. As a result, even in such a case, the second edge extraction unit 15 can acquire the second threshold value adjusted according to the change in the sensitivity of the optical sensor from the threshold value adjustment unit 16, so that the second Edge pixels can be extracted with high accuracy.

(7.ポインティング位置特定過程)
次に、画像処理装置1におけるポインティング位置特定過程について説明する。
(7. Pointing position identification process)
Next, a pointing position specifying process in the image processing apparatus 1 will be described.

図27は、画像処理装置1の動作のうち、ポインティング位置座標算出過程の動作を示すフローチャートである。   FIG. 27 is a flowchart showing the operation of the pointing position coordinate calculation process among the operations of the image processing apparatus 1.

S801では、ピーク探索部12が、注目画素の周囲で所定の画素数を含む第1領域(探索領域)内で、スコア算出部10が算出した合致度が最大値をとる画素であるピーク画素を探索して、ピーク画素を発見したらS802に進む。なお、図示していないが、ピーク探索部12が、ピーク画素を発見できない場合には、注目画素を所定数(例えば、第1領域の注目画素から端の画素までの最短コース(第2領域の一辺のサイズ))ずらしてS801に戻る。   In S <b> 801, the peak search unit 12 selects a peak pixel that is a pixel having a maximum matching value calculated by the score calculation unit 10 in a first region (search region) including a predetermined number of pixels around the target pixel. If a peak pixel is found by searching, the process proceeds to S802. Although not shown, if the peak searching unit 12 cannot find the peak pixel, the pixel of interest has a predetermined number of pixels (for example, the shortest course from the pixel of interest in the first region to the end pixel (in the second region). The size of one side)) is shifted and the process returns to S801.

S802では、座標算出判定部13が、第1領域と共通の注目画素をもち、第1領域の画素数よりも少ない所定の画素数を有すると共に、第1領域に完全に包含される第2領域(小領域)内に、ピーク探索部12が発見したピーク画素が存在することを判定した場合には、S803に進み、座標算出判定部13は、「ピーク画素あり」と判定し、S804に進む。一方、座標算出判定部13が、第2領域(小領域)内に、ピーク探索部12が発見したピーク画素が存在しなかった場合には、S805に進み、座標算出判定部13は、「ピーク画素なし」と判定し、注目画素を所定数(例えば、第1領域の注目画素から端の画素までの最短コース(第2領域の一辺のサイズ))ずらしてS801に戻る。   In S802, the coordinate calculation determination unit 13 has a pixel of interest common to the first area, has a predetermined number of pixels smaller than the number of pixels in the first area, and is completely included in the first area. If it is determined that the peak pixel discovered by the peak search unit 12 exists in (small region), the process proceeds to S803, and the coordinate calculation determination unit 13 determines that “there is a peak pixel” and proceeds to S804. . On the other hand, when the coordinate calculation determination unit 13 does not include the peak pixel found by the peak search unit 12 in the second region (small region), the process proceeds to S805, where the coordinate calculation determination unit 13 It is determined that there is no pixel, and the target pixel is shifted by a predetermined number (for example, the shortest course (the size of one side of the second region) from the target pixel to the end pixel in the first region), and the process returns to S801.

以上の手順は、座標算出部14がポインティング(補間)位置を算出するまで繰り返される。   The above procedure is repeated until the coordinate calculation unit 14 calculates a pointing (interpolation) position.

S804では、座標算出部14が、ピーク探索部12が発見したピーク画素を中心とする所定の画素数を含む領域であるピーク画素領域内の、画素ごとのスコアを用いて、撮像対象による撮像画像上の指示位置を算出して「END」となる。   In S804, the coordinate calculation unit 14 uses the score for each pixel in the peak pixel region, which is a region including a predetermined number of pixels centered on the peak pixel found by the peak search unit 12, and the captured image by the imaging target The upper indicated position is calculated to be “END”.

なお、上述の説明では、座標算出部14がポインティング(補間)位置を算出するまで処理を繰り返す場合について説明したが、複数のポインティング(補間)位置を算出可能な構成としてもよく、この場合、画像全体に対して処理を終了するまで、第1・第2領域を移動して、図27に示すフローチャートの処理を実行すればよい。   In the above description, the case where the processing is repeated until the coordinate calculation unit 14 calculates the pointing (interpolation) position has been described. However, a configuration in which a plurality of pointing (interpolation) positions can be calculated may be used. It is only necessary to move the first and second areas and execute the processing of the flowchart shown in FIG.

次に、図28(a)及び図28(b)を用いて、ピーク画素の有無の判定について説明する。   Next, determination of the presence / absence of a peak pixel will be described with reference to FIGS. 28 (a) and 28 (b).

図28(a)は、画像処理装置1における座標算出判定部13が、ピーク画素が無いと判定する場合を説明するための概要図であり、(b)は、座標算出判定部13が、ピーク画素が有ると判定する場合を説明するための概要図である。   FIG. 28A is a schematic diagram for explaining a case where the coordinate calculation determination unit 13 in the image processing apparatus 1 determines that there is no peak pixel, and FIG. It is a schematic diagram for demonstrating the case where it determines with having a pixel.

図28(a)に示す実線が第1領域であり、破線が第2領域である。第1領域の画素数は、9×9画素であり、第2領域の画素数は、5×5画素である。それぞれ、奇数×奇数としているのは、中央の注目画素が1画素となるようにするためである。   The solid line shown in FIG. 28A is the first area, and the broken line is the second area. The number of pixels in the first region is 9 × 9 pixels, and the number of pixels in the second region is 5 × 5 pixels. The reason why each of them is odd number × odd number is to make the center pixel of interest one pixel.

図28(a)の例では、第1領域内にピーク画素である「9」が存在しているが、該ピーク画素は、第2領域内には存在していない。したがって、この場合は、座標算出判定部13は、「ピーク画素なし」と判定する。   In the example of FIG. 28A, the peak pixel “9” exists in the first region, but the peak pixel does not exist in the second region. Therefore, in this case, the coordinate calculation determination unit 13 determines “no peak pixel”.

一方、図28(b)の例では、第1領域内にピーク画素である「9」が存在しており、かつ、第2領域内にも存在している。したがって、この場合は、座標算出判定部13は、「ピーク画素あり」と判定する。   On the other hand, in the example of FIG. 28B, the peak pixel “9” exists in the first region and also exists in the second region. Therefore, in this case, the coordinate calculation determination unit 13 determines that “there is a peak pixel”.

なお、上述の例では、第1領域にピーク画素が存在している場合において、第2領域内にピーク画素が無い場合には、第1領域の注目画素から端の画素までの最短コース(第2領域の一辺のサイズ)である「5画素」だけ、第1領域及び第2領域を動かせば、必ず、ピーク画素が第2領域内に入ってくるように、第1領域と第2領域との画素数との差が設定されている。   In the above example, when there is a peak pixel in the first region, and there is no peak pixel in the second region, the shortest course (the first course) from the target pixel to the end pixel in the first region. If the first region and the second region are moved by “5 pixels” which is the size of one side of the two regions), the first region, the second region, The difference from the number of pixels is set.

次に、図29(a)及び図29(b)に基づき、座標算出部14のポインティング(補間)座標(撮像対象による撮像画像上の指示位置)算出方法について説明する。   Next, a method for calculating the pointing (interpolation) coordinates (indicated position on the captured image by the imaging target) of the coordinate calculation unit 14 will be described with reference to FIGS.

図29(a)は、画像処理装置1における撮像対象による撮像画像上における指示位置の算出のために使用されるピーク画素領域について説明するための概要図であり、図29(b)は、画像処理装置1におけるポインティング(補間)座標の座標算出方法を説明するための概要図である。   FIG. 29A is a schematic diagram for explaining the peak pixel region used for calculating the designated position on the captured image by the imaging target in the image processing apparatus 1, and FIG. FIG. 3 is a schematic diagram for explaining a coordinate calculation method of pointing (interpolation) coordinates in the processing device 1;

図29(a)は、座標算出判定部13が「ピーク座標あり」と判定した場合であり、図28(b)の場合と同じである。   FIG. 29A illustrates a case where the coordinate calculation determination unit 13 determines that “there are peak coordinates”, which is the same as in FIG. 28B.

なお、図29(a)は第1領域及び第2領域とも破線の領域で示されている。一方、実線で示した5×5画素の領域が、ピーク画素を中心とする所定の画素数を含む領域であるピーク画素領域である。   In FIG. 29A, both the first area and the second area are indicated by broken line areas. On the other hand, a 5 × 5 pixel region indicated by a solid line is a peak pixel region that is a region including a predetermined number of pixels centered on the peak pixel.

図29(a)に示す例では、このピーク画素領域も第2領域と同様に、第1領域に完全に包含されている。この場合は、ピーク画素領域内のスコアをあらためて調べる必要が無い。このように、第2領域の端にピーク画素が存在する場合でも、ピーク画素領域が第1領域内に包含されるように構成することが好ましい。   In the example shown in FIG. 29A, this peak pixel region is also completely included in the first region, like the second region. In this case, there is no need to examine the score in the peak pixel region again. Thus, it is preferable that the peak pixel region is included in the first region even when the peak pixel exists at the end of the second region.

次に、図29(b)に基づき、座標算出部14のポインティング座標算出方法について説明する。   Next, a pointing coordinate calculation method of the coordinate calculation unit 14 will be described with reference to FIG.

本例では、画像データの画素数が、320×240画素である場合に、図1の低解像度化部2が、バイリニア縮小を2回行ない、さらに、効率化部6が、2×2画素について照合効率化を行ない、スコア画像(スコアのデータを画素ごとに付与したもの)のサイズが40×30画素になっている場合を想定している。   In this example, when the number of pixels of the image data is 320 × 240 pixels, the resolution reducing unit 2 in FIG. 1 performs bilinear reduction twice, and the efficiency improving unit 6 performs the processing for 2 × 2 pixels. It is assumed that collation efficiency is improved and the size of the score image (score data assigned to each pixel) is 40 × 30 pixels.

したがって、スコア画像の全領域を8倍に拡大したものが、画像データの全領域に相当する。したがって、補間量(スケール拡大量)=8となっている。   Accordingly, the entire area of the score image enlarged by 8 times corresponds to the entire area of the image data. Therefore, the interpolation amount (scale enlargement amount) = 8.

具体的な計算方法は、以下のとおりである。まず、ピーク画素領域における行ごとのスコアの和を計算する(図29(b)の19、28、33、24、及び11)。   The specific calculation method is as follows. First, the sum of scores for each row in the peak pixel region is calculated (19, 28, 33, 24, and 11 in FIG. 29B).

次に、ピーク画素領域における列ごとのスコアの和を計算する(図29(b)の16、24、28、26、及び21)。また、ピーク画素領域内(5×5画素)のスコアの総和を求める(図29(b)の115)。   Next, the sum of scores for each column in the peak pixel region is calculated (16, 24, 28, 26, and 21 in FIG. 29B). Also, the sum of the scores in the peak pixel region (5 × 5 pixels) is obtained (115 in FIG. 29B).

次に、ピーク画素領域内のスコアの値が質量分布に相当するものとして、スコア画像の全領域における重心座標を求め、スケールを8倍に拡大すると、次式(14)及び(15)の座標を得る。   Next, assuming that the score value in the peak pixel region corresponds to the mass distribution, the center-of-gravity coordinates in the entire region of the score image are obtained, and when the scale is expanded eight times, the coordinates of the following equations (14) and (15) are obtained. Get.

Figure 2010055575
Figure 2010055575

Figure 2010055575
Figure 2010055575

次に、画素のサイズを考慮して目盛り位置の調整を行なうと、ポインティング座標(X,Y)は、次式(16)となる。   Next, when the scale position is adjusted in consideration of the pixel size, the pointing coordinates (X, Y) are expressed by the following equation (16).

Figure 2010055575
Figure 2010055575

以上によれば、ピーク探索部12は、第1領域(探索領域)内で探索するので、全画素数を含む画像データ領域において、ピーク画素を探索するよりも処理コストを低減、及びメモリ容量を少量化させることができる。   According to the above, since the peak search unit 12 searches in the first area (search area), the processing cost is reduced and the memory capacity is reduced compared to searching for the peak pixel in the image data area including the total number of pixels. Can be made small.

例えば、第1領域の画素数が小さいということは、データ画像(スコア画像)全体(=全画素)のスコアをバッファに保存しておく必要がなく、ピーク探索を実行する第1領域に必要なメモリ容量(例えば9×9画素の第1領域の場合、9ライン分のラインバッファ)があればよい、ということになる。   For example, the fact that the number of pixels in the first region is small means that it is not necessary to store the score of the entire data image (score image) (= all pixels) in the buffer, and it is necessary for the first region to execute the peak search. This means that it is sufficient to have a memory capacity (for example, in the case of the first area of 9 × 9 pixels, a line buffer for 9 lines).

このように、ラインバッファで実装することにより、メモリ容量を少量化できる効果は、ピーク探索に限らず、縦横の各勾配量の一時保存や、勾配方向の一時保存等、後段処理に受け渡す際にバッファメモリが介在するような実装を行なう場合には、全て共通して言えることである。   In this way, the effect of reducing the memory capacity by implementing with a line buffer is not limited to peak search, but when transferring to subsequent processing such as temporary storage of vertical and horizontal gradient amounts, temporary storage of gradient directions, etc. This is the same in all cases where the implementation includes a buffer memory.

さらに、座標算出部14は、ピーク探索部12が発見したピーク画素を中心とする所定の画素数を含む領域であるピーク画素領域内の、画素ごとのスコアを用いて、ポインティング位置を算出する。例えば、エッジ画像を用いてその重心位置からポインティング位置を求める場合、撮像画像が歪な形に変形するほど算出が困難になると考えられる。   Furthermore, the coordinate calculation unit 14 calculates a pointing position using a score for each pixel in a peak pixel region that is a region including a predetermined number of pixels centered on the peak pixel found by the peak search unit 12. For example, when the pointing position is obtained from the position of the center of gravity using an edge image, it is considered that the calculation becomes more difficult as the captured image is deformed into a distorted shape.

しかし、画像処理装置1では、ピーク画素領域内の、画素ごとのパターンマッチングによるスコアを用いて、ポインティング位置を算出する。このパターンマッチングにおけるスコアの最大値近傍は、撮像画像が歪な形に変形したとしても、該最大値近傍を中心として、放射状に合致度が減少していくという、ほぼ変形前と同様の分布傾向を示すものと考えられる。   However, the image processing apparatus 1 calculates the pointing position using a score obtained by pattern matching for each pixel in the peak pixel region. In the vicinity of the maximum value of the score in this pattern matching, even if the captured image is deformed into a distorted shape, the degree of coincidence decreases radially, with the vicinity of the maximum value being the center. It is thought that it shows.

したがって、撮像画像が歪な形に変形するか否かに関係なく、所定の手順(例えば、ピーク画素領域内でスコアの重心を算出する等)で、ポインティング位置を算出することができる。それゆえ、座標位置の検出精度の維持との両立を図りつつ、ポインティング位置を算出するための画像処理量の軽減、処理コストの低減、及びメモリ容量の少量化が可能となる。   Therefore, regardless of whether or not the captured image is deformed into a distorted shape, the pointing position can be calculated by a predetermined procedure (for example, calculating the center of gravity of the score in the peak pixel region). Therefore, it is possible to reduce the image processing amount for calculating the pointing position, to reduce the processing cost, and to reduce the memory capacity while achieving both the maintenance of the coordinate position detection accuracy.

以上より、撮像対象の撮像画像へのタッチ・非タッチの検出に関係なく、1フレームの画像データのみを用いたパターンマッチングを行なうことで、ポインティング位置の検出を可能としてメモリ容量を少量化し、及び処理時間を短縮化しつつ、ポインティング位置の算出において、画像処理量の軽減とポインティング位置の検出精度の維持との両立、及びメモリ容量の少量化を実現することができる画像処理装置1を提供することができる。   As described above, by performing pattern matching using only one frame of image data regardless of detection of touch / non-touch on the captured image of the imaging target, the pointing position can be detected, the memory capacity can be reduced, and To provide an image processing apparatus 1 capable of realizing both reduction in image processing amount and maintenance of pointing position detection accuracy and reduction in memory capacity in calculation of a pointing position while reducing processing time. Can do.

また、座標算出判定部13は、第1領域と共通の注目画素をもち、第1領域の画素数よりも少ない所定の画素数を有すると共に、第1領域内に完全に包含される第2領域(小領域)内に、ピーク探索部12が発見したピーク画素が存在することを判定した場合に、座標算出部14にポインティング位置を算出させることが好ましい。   In addition, the coordinate calculation determination unit 13 has a target pixel common to the first region, has a predetermined number of pixels smaller than the number of pixels in the first region, and is a second region that is completely included in the first region. When it is determined that the peak pixel discovered by the peak search unit 12 exists in (small region), it is preferable to cause the coordinate calculation unit 14 to calculate the pointing position.

ピーク画素領域は、第2領域内に存在するピーク画素を注目画素としてその周囲に広がる領域であるので、第1領域と共通する画素が多数存在することになる。また、ピーク画素領域と第1領域との共通の画素のスコアは既に算出されているので、非共通の画素のスコアを調べれば、座標算出部14にポインティング位置を算出させることができる。   Since the peak pixel area is an area spreading around the peak pixel existing in the second area as a target pixel, there are many pixels in common with the first area. Further, since the score of the common pixel between the peak pixel region and the first region has already been calculated, the pointing position can be calculated by the coordinate calculation unit 14 by examining the score of the non-common pixel.

また、ピーク画素領域と第1領域とのそれぞれの画素数を調整すれば、ピーク画素領域を第1領域に包含させることも可能である。この場合、ピーク画素領域の各画素のスコアは既に判明しているので、ポインティング位置算出のためにあらためて判明していない各画素のスコアを調べる必要が無い。   Further, the peak pixel region can be included in the first region by adjusting the number of pixels of the peak pixel region and the first region. In this case, since the score of each pixel in the peak pixel region is already known, there is no need to examine the score of each pixel that is not yet known for the calculation of the pointing position.

以上より、ポインティング位置の算出において、さらに画像処理量の軽減及びメモリ容量の少量化を実現することができる。また、ピーク座標判定時に第1領域の外側に向けてスコアの上昇が連接している場合への対応と、ハードウェア実装等において各処理モジュールをパイプライン処理する際等に、参照すべきスコアの保持バッファ容量を少量化(例えば画像全体ではなく9ラインのみ)できる。   As described above, in the calculation of the pointing position, it is possible to further reduce the image processing amount and the memory capacity. In addition, when the peak coordinates are determined, the score to be referred to when pipeline processing is performed for each processing module in response to a case where the increase in score is contiguous toward the outside of the first region, and hardware implementation, etc. The holding buffer capacity can be reduced (for example, only 9 lines, not the entire image).

なお、画像処理装置1の各ブロック、特に低解像度化部2、縦勾配量算出部3a、横勾配量算出部3b、第1エッジ抽出部4、方向特定部5、効率化部6、一致画素数算出部7、パターン合致度算出部9、スコア算出部10、位置特定部11、第2エッジ抽出部15、及び、閾値調節部16は、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   In addition, each block of the image processing apparatus 1, in particular, the resolution reduction unit 2, the vertical gradient amount calculation unit 3 a, the lateral gradient amount calculation unit 3 b, the first edge extraction unit 4, the direction identification unit 5, the efficiency improvement unit 6, and the matching pixel The number calculating unit 7, the pattern matching degree calculating unit 9, the score calculating unit 10, the position specifying unit 11, the second edge extracting unit 15, and the threshold adjusting unit 16 may be configured by hardware logic, Thus, it may be realized by software using a CPU.

すなわち、画像処理装置1は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)等を備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである画像処理装置1の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記画像処理装置1に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   That is, the image processing apparatus 1 includes a CPU (central processing unit) that executes instructions of a control program that realizes each function, a ROM (read only memory) that stores the program, and a RAM (random access memory) that expands the program. And a storage device (recording medium) such as a memory for storing the program and various data. An object of the present invention is a recording medium on which a program code (execution format program, intermediate code program, source program) of a control program of the image processing apparatus 1 which is software that realizes the above-described functions is recorded so as to be readable by a computer. This can also be achieved by supplying the image processing apparatus 1 and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやコンパクトディスク−ROM/MO/MD/デジタルビデオデイスク/コンパクトディスク−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系等を用いることができる。   Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and a compact disk-ROM / MO / MD / digital video disk / compact disk-R. A disk system including an optical disk, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM can be used.

また、画像処理装置1を通信ネットワークと接続可能に構成し、その通信ネットワークを介して上記プログラムコードを画像処理装置1に供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The image processing apparatus 1 may be configured to be connectable to a communication network, and the program code may be supplied to the image processing apparatus 1 via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication. A net or the like is available. Also, the transmission medium constituting the communication network is not particularly limited. For example, even in the case of wired such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL line, etc., infrared rays such as IrDA and remote control, Bluetooth ( (Registered trademark), 802.11 wireless, HDR, mobile phone network, satellite line, terrestrial digital network, and the like can also be used. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope shown in the claims. That is, embodiments obtained by combining technical means appropriately modified within the scope of the claims are also included in the technical scope of the present invention.

本発明の画像処理装置は、例えば携帯電話やPDA等のように、液晶等の表示装置のディスプレイにタッチすることにより、操作や指示を行なうような装置に適用することができる。具体的には、表示装置として、例えば、アクティブマトリクス型の液晶表示装置に用いることができると共に、電気泳動型ディスプレイ、ツイストボール型ディスプレイ、微細なプリズムフィルムを用いた反射型ディスプレイ、デジタルミラーデバイス等の光変調素子を用いたディスプレイの他、発光素子として、有機EL発光素子、無機EL発光素子、LED(Light Emitting Diode)等の発光輝度が可変の素子を用いたディスプレイ、フィールドエミッションディスプレイ(FED)、プラズマディスプレイにも利用することができる。   The image processing apparatus of the present invention can be applied to an apparatus that performs operations and instructions by touching a display of a display device such as a liquid crystal display, such as a mobile phone or a PDA. Specifically, as a display device, for example, it can be used for an active matrix liquid crystal display device, and an electrophoretic display, a twist ball display, a reflective display using a fine prism film, a digital mirror device, etc. In addition to displays using light modulation elements, organic EL light-emitting elements, inorganic EL light-emitting elements, displays using variable-light-emitting elements such as LEDs (Light Emitting Diodes), and field emission displays (FED) It can also be used for plasma displays.

本発明の実施の形態における画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus in embodiment of this invention. (a)は、周囲が暗い場合における指腹の撮像画像の様子を示す概要図、(b)は、周囲が暗い場合における指腹の撮像画像の特徴を示す概要図、(c)は、周囲が明るい場合における指腹の撮像画像の様子を示す概要図、(d)は、周囲が明るい場合における指腹の撮像画像の特徴を示す概要図、(e)は、周囲が暗い場合におけるペン先の撮像画像の様子を示す概要図、(f)は、周囲が暗い場合におけるペン先の撮像画像の特徴を示す概要図、(g)は、周囲が明るい場合におけるペン先の撮像画像の様子を示す概要図、(h)は、周囲が明るい場合におけるペン先の撮像画像の特徴を示す概要図である。(A) is a schematic diagram showing the state of a captured image of the finger pad when the surrounding is dark, (b) is a schematic diagram showing the characteristics of the captured image of the finger pad when the surrounding is dark, and (c) is the surrounding FIG. 4D is a schematic diagram showing a captured image of the finger pad when the surrounding is bright, FIG. 4D is a schematic diagram showing the characteristics of the captured image of the finger pad when the surrounding is bright, and FIG. (F) is a schematic diagram illustrating the characteristics of a captured image of the pen tip when the surrounding is dark, and (g) is a captured image of the pen tip when the surrounding is bright. (H) is a schematic diagram illustrating characteristics of a captured image of the pen tip when the surroundings are bright. 画像処理装置の全体的な動作の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the whole operation | movement of an image processing apparatus. 画像処理装置の動作のうち、勾配方向・無方向特定過程の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of a gradient direction / non-direction specific process among operation | movement of an image processing apparatus. (a)は、勾配方向・無方向特定過程において参照されるテーブルの一例であり、(b)は、勾配方向・無方向特定過程において参照されるテーブルの他の例である。(A) is an example of the table referred in the gradient direction / non-direction specifying process, and (b) is another example of the table referred in the gradient direction / non-direction specifying process. (a)は、周囲が暗い場合における画像データの勾配方向の特徴を示す概要図であり、(b)は、同図について照合効率化を行った後の様子を示す概要図である。(A) is a schematic diagram showing the characteristics of the gradient direction of image data when the surroundings are dark, and (b) is a schematic diagram showing a state after performing collation efficiency improvement for the same figure. (a)は、周囲が暗い場合における照合効率化前のモデルパターンの一例を示す概要図であり、(b)は、周囲が明るい場合における照合効率化前のモデルパターンの一例を示す概要図である。(A) is a schematic diagram showing an example of a model pattern before collation efficiency improvement when the surroundings are dark, and (b) is a schematic diagram showing an example of a model pattern before collation efficiency improvement when the surroundings are bright. is there. (a)は、周囲が暗い場合における照合効率化後のモデルパターンの一例を示す概要図であり、(b)は、周囲が明るい場合における照合効率化後のモデルパターンの一例を示す概要図である。(A) is a schematic diagram showing an example of a model pattern after collation efficiency improvement when the surroundings are dark, and (b) is a schematic diagram showing an example of a model pattern after collation efficiency improvement when the surroundings are bright. is there. (a)は、周囲が暗い場合における照合効率化後のモデルパターンの他の例を示す概要図であり、(b)は、周囲が明るい場合における照合効率化後のモデルパターンの他の例を示す概要図である。(A) is a schematic diagram showing another example of a model pattern after collation efficiency improvement when the surroundings are dark, and (b) is another example of a model pattern after collation efficiency improvement when the surroundings are bright. FIG. 画像処理装置の動作のうち、パターンマッチング過程の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a pattern matching process among operation | movement of an image processing apparatus. (a)は、照合効率化前の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングを説明するための概要図であり、(b)は、その合致度算出方法の一例を示す図である。(A) is a schematic diagram for explaining pattern matching between a matching region and a model pattern in the case where the surroundings before darkening is dark, and (b) is a diagram showing an example of the matching degree calculation method It is. (a)は、照合効率化後の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングの一例を説明するための概要図であり、(b)は、その合致度算出方法の一例を示す図である。(A) is a schematic diagram for explaining an example of pattern matching between a matching area and a model pattern in the case where the surrounding after darkening is dark, and (b) is an example of the matching degree calculation method. FIG. (a)は、照合効率化後の周囲が暗い場合における照合領域と、モデルパターンとのパターンマッチングの他の例を説明するための概要図であり、(b)は、その合致度算出方法の一例を示す図である。(A) is a schematic diagram for explaining another example of pattern matching between a matching region and a model pattern in the case where the surroundings after darkening the matching efficiency are dark, and (b) It is a figure which shows an example. 画像処理装置におけるパターンマッチングにおいて一致画素数とパターン合致度とを併用する場合について説明するためのフローチャートである。It is a flowchart for demonstrating the case where a matching pixel number and a pattern matching degree are used together in the pattern matching in an image processing apparatus. (a)は、パターン合致度算出過程の一例を示すフローチャートであり、(b)は、パターン合致度算出過程の他の例を示すフローチャートである。(A) is a flowchart which shows an example of a pattern matching degree calculation process, (b) is a flowchart which shows the other example of a pattern matching degree calculation process. (a)は、パターン合致度算出過程の一例を示す概要図であり、(b)は、パターン合致度算出過程の他の例を示す概要図であり、(c)は、パターン合致度算出過程のさらに他の例を示す概要図である。(A) is a schematic diagram showing an example of a pattern matching degree calculation process, (b) is a schematic diagram showing another example of the pattern matching degree calculation process, and (c) is a pattern matching degree calculation process. It is a schematic diagram which shows another example of these. (a)は、パターン合致度算出過程のさらに他の例を示す概要図であり、(b)は、パターン合致度算出過程のさらに他の例を示す概要図であり、(c)は、パターン合致度算出過程のさらに他の例を示す概要図である。(A) is a schematic diagram showing still another example of the pattern matching degree calculation process, (b) is a schematic diagram showing still another example of the pattern matching degree calculation process, and (c) is a pattern. It is a schematic diagram which shows the further another example of a coincidence degree calculation process. 画像処理装置の動作のうち、接触・非接触特定過程の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a contact / non-contact specific process among operation | movement of an image processing apparatus. 周囲が明るい場合における指腹の撮像画像の様子を示す概要図である(接触時)。It is a schematic diagram which shows the mode of the captured image of a finger pad when the circumference | surroundings are bright (at the time of contact). 周囲が明るい場合における指腹の撮像画像についての第1エッジ画素の勾配方向を示す概要図である(接触時)。It is a schematic diagram which shows the gradient direction of the 1st edge pixel about the captured image of the finger pad when the surrounding is bright (at the time of contact). 周囲が明るい場合における指腹の撮像画像についての第2エッジ画素の様子を示す概要図である(接触時)。It is a schematic diagram which shows the mode of the 2nd edge pixel about the captured image of the finger pad when the circumference | surroundings are bright (at the time of contact). 周囲が明るい場合における指腹の撮像画像の様子を示す概要図である(非接触時)。It is a schematic diagram which shows the mode of the captured image of a finger pad when the circumference | surroundings are bright (at the time of non-contact). 周囲が明るい場合における指腹の撮像画像についての第1エッジ画素の勾配方向を示す概要図である(非接触時)。It is a schematic diagram which shows the gradient direction of the 1st edge pixel about the captured image of the finger pad when the periphery is bright (at the time of non-contact). 周囲が明るい場合における指腹の撮像画像についての第2エッジ画素の様子を示す概要図である(非接触時)。It is a schematic diagram which shows the mode of the 2nd edge pixel about the captured image of the finger pad when the circumference | surroundings are bright (at the time of non-contact). 背景画像及び指腹画像の各々の画素値と利用空間の明るさの照度との関係を示すグラフ図である。It is a graph which shows the relationship between each pixel value of a background image and a finger pad image, and the illumination intensity of the brightness of use space. 背景画像及び指腹画像の各々の画素値と利用空間の明るさの照度との他の関係を示すグラフ図である。It is a graph which shows the other relationship between each pixel value of a background image and a finger pad image, and the illumination intensity of the brightness of use space. 画像処理装置の動作のうち、ポインティング位置座標算出過程の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the pointing position coordinate calculation process among operation | movement of an image processing apparatus. (a)は、画像処理装置における座標算出判定部のピーク画素が無いと判定する場合を説明するための概要図であり、(b)は、画像処理装置における座標算出判定部のピーク画素が有ると判定する場合を説明するための概要図である。(A) is a schematic diagram for explaining a case where it is determined that there is no peak pixel of the coordinate calculation determination unit in the image processing apparatus, and (b) is a peak pixel of the coordinate calculation determination unit in the image processing apparatus. It is a schematic diagram for demonstrating the case where it determines with. (a)は、画像処理装置における撮像対象による撮像画像上の指示位置を算出するために使用されるピーク画素領域について説明するための概要図であり、(b)は、画像処理装置における前記指示位置の座標算出方法を説明するための概要図である。(A) is a schematic diagram for explaining a peak pixel region used for calculating an instruction position on a captured image by an imaging target in the image processing apparatus, and (b) is an instruction for the instruction in the image processing apparatus. It is a schematic diagram for demonstrating the coordinate calculation method of a position.

符号の説明Explanation of symbols

1 画像処理装置
2 低解像度化部
3a 縦勾配量算出部(特徴量算出手段)
3b 横勾配量算出部(特徴量算出手段)
4 第1エッジ抽出部(第1エッジ特定手段)
5 方向特定部
6 効率化部
7 一致画素数算出部
8 モデルパターン・比較用一致パターン格納部
9 パターン合致度算出部
10 スコア算出部(合致度算出手段)
11 位置特定部(位置特定手段)
12 ピーク探索部
13 座標算出判定部
14 座標算出部
15 第2エッジ抽出部(第2エッジ特定手段)
16 閾値調節部(閾値調節手段)
17 閾値格納部
20 電子機器
61、62、63、64 撮像画像
65 表示画面
66 外光
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Resolution reduction part 3a Vertical gradient amount calculation part (feature amount calculation means)
3b Lateral gradient amount calculation unit (feature amount calculation means)
4 1st edge extraction part (1st edge specific means)
DESCRIPTION OF SYMBOLS 5 Direction identification part 6 Efficiency improvement part 7 Matching pixel number calculation part 8 Model pattern and comparison matching pattern storage part 9 Pattern matching degree calculation part 10 Score calculation part (matching degree calculation means)
11 position specifying part (position specifying means)
12 peak search unit 13 coordinate calculation determination unit 14 coordinate calculation unit 15 second edge extraction unit (second edge specifying means)
16 Threshold adjustment unit (threshold adjustment means)
17 Threshold storage unit 20 Electronic device 61, 62, 63, 64 Captured image 65 Display screen 66 External light

Claims (13)

撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する機能を備えた画像処理装置であって、
前記画像データ上の画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出手段と、
前記特徴量算出手段により算出された特徴量が第1閾値以上である第1エッジ画素を特定する第1エッジ特定手段と、
前記第1エッジ画素の特定結果に基づいて、前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出手段と、
前記第1エッジ画素のうち、前記特徴量が前記第1閾値よりも大きい第2閾値以上である第2エッジ画素を特定する第2エッジ特定手段と、
第1エッジ画素数と第2エッジ画素数との比率及び前記合致度算出手段により算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定手段と
を備えていることを特徴とする画像処理装置。
An image processing apparatus having a function of specifying an instruction position on the captured image by an imaging target using image data of a captured image,
For each pixel on the image data, a feature amount calculating means for calculating a feature amount according to a pixel value difference with an adjacent pixel;
First edge specifying means for specifying a first edge pixel whose feature value calculated by the feature value calculating means is not less than a first threshold;
Based on the identification result of the first edge pixel, a matching area included in a part of the image data is matched with a predetermined model pattern, and matching between the matching area and the model pattern is performed. A degree-of-match calculation means for calculating a degree of match indicating the degree;
Among the first edge pixels, a second edge specifying means for specifying a second edge pixel whose feature value is equal to or greater than a second threshold value that is larger than the first threshold value;
Position specifying means for specifying the indicated position on the captured image by the imaging target based on the ratio between the first edge pixel number and the second edge pixel number and the matching degree calculated by the matching degree calculating means. An image processing apparatus.
前記位置特定手段は、第1エッジ画素数に対する第2エッジ画素数の割合があらかじめ定められた値を超えており、且つ、前記合致度算出手段により算出された合致度が前記画像データ上の部分領域内で最大である照合領域の位置から、撮像対象による前記撮像画像上の指示位置を特定することを特徴とする請求項1に記載の画像処理装置。   The position specifying means has a ratio of the number of second edge pixels to the number of first edge pixels exceeding a predetermined value, and the degree of match calculated by the degree of match calculation means is a portion on the image data. The image processing apparatus according to claim 1, wherein an instruction position on the captured image by an imaging target is specified from a position of a collation area that is the largest in the area. 前記画像処理装置の利用空間における明るさの変化に応じて前記第2閾値を調節する閾値調節手段をさらに備えていることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, further comprising a threshold adjustment unit that adjusts the second threshold according to a change in brightness in a use space of the image processing apparatus. 前記閾値調節手段は、前記画像処理装置の利用空間における明るさの変化に応じて撮像画像上の背景画像がとりうる画素値ごとにあらかじめテーブル形式で記憶されている複数の第2閾値のうち、前記撮像画像上における背景画像の画素値に対応する第2閾値を選択することを特徴とする請求項3に記載の画像処理装置。   The threshold adjustment means includes a plurality of second threshold values stored in advance in a table format for each pixel value that can be taken by the background image on the captured image in accordance with a change in brightness in the usage space of the image processing apparatus. The image processing apparatus according to claim 3, wherein a second threshold value corresponding to a pixel value of a background image on the captured image is selected. 前記テーブル形式で記憶されている複数の第2閾値は、撮像画像の画像データを撮像する撮像センサーの感度が第1感度を持つ場合に利用されるものであり、
前記閾値調節手段は、前記撮像センサーの感度が前記第1感度から前記第1感度とは異なる第2感度に変化し、撮像センサーの感度が前記第2感度を持つ場合に利用されるべき第2閾値を選択する場合には、
前記第1感度での撮像画像上の指示位置と背景画像との画素値差が前記第2感度での撮像画像上の指示位置と背景画像との画素値差であったと仮定した場合において前記第1感度での撮像画像上の背景画像がとるべき画素値を算出し、
前記算出された撮像画像上の背景画像の画素値に対応する第2閾値を選択することを特徴とする請求項4に記載の画像処理装置。
The plurality of second threshold values stored in the table format is used when the sensitivity of the image sensor that captures image data of a captured image has the first sensitivity.
The second threshold value adjusting means is to be used when the sensitivity of the imaging sensor changes from the first sensitivity to a second sensitivity different from the first sensitivity, and the sensitivity of the imaging sensor has the second sensitivity. When selecting a threshold,
In the case where it is assumed that the pixel value difference between the designated position on the captured image at the first sensitivity and the background image is the pixel value difference between the designated position on the captured image at the second sensitivity and the background image. Calculate the pixel value to be taken by the background image on the captured image with one sensitivity,
The image processing apparatus according to claim 4, wherein a second threshold value corresponding to the pixel value of the background image on the calculated captured image is selected.
前記特徴量は、大きさと方向を持つベクトル量であることを特徴とする請求項1〜5のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is a vector amount having a size and a direction. 前記特徴量は、画素の輝度の勾配量であることを特徴とする請求項1〜6のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is a gradient amount of luminance of a pixel. 請求項1〜7のいずれか1項に記載の画像処理装置における各手段としてコンピュータを動作させるための画像処理プログラム。   The image processing program for operating a computer as each means in the image processing apparatus of any one of Claims 1-7. 請求項8に記載の画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 8 is recorded. 請求項1〜7のいずれか1項に記載の画像処理装置を備えていることを特徴とする電子機器。   An electronic apparatus comprising the image processing apparatus according to claim 1. 撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する画像処理方法であって、
前記画像データ上の画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出工程と、
前記特徴量算出工程において算出された特徴量が第1閾値以上である第1エッジ画素を特定する第1エッジ特定工程と、
前記第1エッジ画素の特定結果に基づいて、前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出工程と、
前記第1エッジ画素のうち、前記特徴量が前記第1閾値よりも大きい第2閾値以上である第2エッジ画素を特定する第2エッジ特定工程と、
第1エッジ画素数と第2エッジ画素数との比率及び前記合致度算出工程において算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定工程と
を備えていることを特徴とする画像処理方法。
An image processing method for specifying an instruction position on the captured image by an imaging target using image data of a captured image,
For each pixel on the image data, a feature amount calculating step for calculating a feature amount according to a pixel value difference with an adjacent pixel;
A first edge specifying step of specifying a first edge pixel whose feature amount calculated in the feature amount calculating step is equal to or greater than a first threshold;
Based on the identification result of the first edge pixel, a matching area included in a part of the image data is matched with a predetermined model pattern, and matching between the matching area and the model pattern is performed. A degree-of-match calculation step for calculating a degree of match indicating the degree;
A second edge specifying step of specifying, from among the first edge pixels, a second edge pixel whose feature value is equal to or greater than a second threshold value that is greater than the first threshold value;
A position specifying step of specifying the indicated position on the captured image by the imaging target based on the ratio between the first edge pixel number and the second edge pixel number and the matching degree calculated in the matching degree calculating step. An image processing method characterized by comprising:
撮像された撮像画像の画像データを用いて、撮像対象による前記撮像画像上の指示位置を特定する機能を備えた画像処理装置であって、
前記画像データ上の一部の領域に含まれる照合領域と、あらかじめ定められたモデルパターンとを照合し、前記照合領域と前記モデルパターンとのマッチングの度合いを示す合致度を算出する合致度算出手段と、
前記合致度算出手段による照合においてモデルパターンにマッチした画素ごとに、隣接する画素との画素値差に応じた特徴量を算出する特徴量算出手段と、
前記特徴量算出手段により算出された特徴量が所定の閾値以上であるエッジ画素を特定するエッジ特定手段と、
マッチした画素数とエッジ画素数との比率及び前記合致度算出手段により算出された合致度に基づいて、撮像対象による前記撮像画像上の指示位置を特定する位置特定手段と
を備えていることを特徴とする画像処理装置。
An image processing apparatus having a function of specifying an instruction position on the captured image by an imaging target using image data of a captured image,
Matching degree calculation means for matching a matching area included in a partial area on the image data with a predetermined model pattern and calculating a matching degree indicating a degree of matching between the matching area and the model pattern When,
A feature amount calculating unit that calculates a feature amount according to a pixel value difference with an adjacent pixel for each pixel that matches a model pattern in the matching by the matching degree calculating unit;
Edge specifying means for specifying an edge pixel whose feature value calculated by the feature value calculating means is equal to or greater than a predetermined threshold;
Position specifying means for specifying the indicated position on the captured image by the imaging target based on the ratio between the number of matched pixels and the number of edge pixels and the matching degree calculated by the matching degree calculating means. A featured image processing apparatus.
前記位置特定手段は、マッチした画素数に対するエッジ画素数の割合があらかじめ定められた値を超えており、且つ、前記合致度算出手段により算出された合致度が前記画像データ上の部分領域内で最大である照合領域の位置から、撮像対象による前記撮像画像上の指示位置を特定することを特徴とする請求項12に記載の画像処理装置。   In the position specifying means, the ratio of the number of edge pixels to the number of matched pixels exceeds a predetermined value, and the degree of matching calculated by the degree of matching calculating means is within a partial area on the image data. The image processing apparatus according to claim 12, wherein an instruction position on the captured image by the imaging target is specified from the position of the collation area that is the maximum.
JP2008222873A 2008-08-29 2008-08-29 Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method Expired - Fee Related JP4964849B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008222873A JP4964849B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008222873A JP4964849B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method

Publications (2)

Publication Number Publication Date
JP2010055575A true JP2010055575A (en) 2010-03-11
JP4964849B2 JP4964849B2 (en) 2012-07-04

Family

ID=42071377

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008222873A Expired - Fee Related JP4964849B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method

Country Status (1)

Country Link
JP (1) JP4964849B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016177343A (en) * 2015-03-18 2016-10-06 株式会社トヨタIt開発センター Signal processing apparatus, input device, signal processing method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04111085A (en) * 1990-08-30 1992-04-13 Glory Ltd Pattern recognizing device
JPH0528273A (en) * 1991-05-13 1993-02-05 Nikon Corp Method and device for processing picture
JP2007183706A (en) * 2006-01-04 2007-07-19 Epson Imaging Devices Corp Touch sensor system
JP2008250951A (en) * 2007-03-30 2008-10-16 Sharp Corp Image processor, control program, computer-readable recording medium, electronic equipment, and control method of image processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04111085A (en) * 1990-08-30 1992-04-13 Glory Ltd Pattern recognizing device
JPH0528273A (en) * 1991-05-13 1993-02-05 Nikon Corp Method and device for processing picture
JP2007183706A (en) * 2006-01-04 2007-07-19 Epson Imaging Devices Corp Touch sensor system
JP2008250951A (en) * 2007-03-30 2008-10-16 Sharp Corp Image processor, control program, computer-readable recording medium, electronic equipment, and control method of image processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016177343A (en) * 2015-03-18 2016-10-06 株式会社トヨタIt開発センター Signal processing apparatus, input device, signal processing method, and program

Also Published As

Publication number Publication date
JP4964849B2 (en) 2012-07-04

Similar Documents

Publication Publication Date Title
JP4727614B2 (en) Image processing apparatus, control program, computer-readable recording medium, electronic apparatus, and control method for image processing apparatus
JP4790653B2 (en) Image processing apparatus, control program, computer-readable recording medium, electronic apparatus, and control method for image processing apparatus
JP4727615B2 (en) Image processing apparatus, control program, computer-readable recording medium, electronic apparatus, and control method for image processing apparatus
JP2008250949A5 (en)
JP2008250950A5 (en)
JP2008250951A5 (en)
KR101758537B1 (en) Image element brightness adjustment
US9245193B2 (en) Dynamic selection of surfaces in real world for projection of information thereon
JP2006244446A (en) Display device
JP5015097B2 (en) Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method
CN110941981B (en) Mobile fingerprint identification method and apparatus using display
CN112825130A (en) Method and apparatus for reference imaging and optical object recognition
JP2011118466A (en) Difference noise replacement device, difference noise replacement method, difference noise replacement program, computer readable recording medium, and electronic equipment with difference noise replacement device
JP2006243927A (en) Display device
EP2924610A2 (en) Flesh color detection condition determining apparatus, and flesh color detection condition determining method
US10002291B2 (en) Method and system of identifying fillable fields of an electronic form
JP6011885B2 (en) Code reading apparatus and code reading method
JP4964849B2 (en) Image processing apparatus, image processing program, computer-readable recording medium, electronic apparatus, and image processing method
JP4964850B2 (en) Image analysis apparatus, image analysis method, imaging apparatus, image analysis program, and recording medium
US10379677B2 (en) Optical touch device and operation method thereof
US20130162601A1 (en) Optical touch system
JP5128524B2 (en) Image processing apparatus, control method therefor, image processing program, and computer-readable recording medium
US10380463B2 (en) Image processing device, setting support method, and non-transitory computer-readable media
JP2010211326A (en) Image processing device, control method for image processing device, image processing program, and computer-readable recording medium
CN112929559A (en) Method of performing half shutter function and method of capturing image using the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100826

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111110

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120228

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120328

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150406

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees