JP2011118465A - Position detecting device, imaging apparatus, method and program for detecting position, and recording medium - Google Patents

Position detecting device, imaging apparatus, method and program for detecting position, and recording medium Download PDF

Info

Publication number
JP2011118465A
JP2011118465A JP2009272744A JP2009272744A JP2011118465A JP 2011118465 A JP2011118465 A JP 2011118465A JP 2009272744 A JP2009272744 A JP 2009272744A JP 2009272744 A JP2009272744 A JP 2009272744A JP 2011118465 A JP2011118465 A JP 2011118465A
Authority
JP
Japan
Prior art keywords
image
imaging
difference
position detection
smoothed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009272744A
Other languages
Japanese (ja)
Inventor
Ryoji Yoshimoto
良治 吉本
Yoichiro Hachiman
洋一郎 八幡
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 JP2009272744A priority Critical patent/JP2011118465A/en
Publication of JP2011118465A publication Critical patent/JP2011118465A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To accurately detect the position of an imaging object contacting an imaging surface even when the imaging object moves on an optical differential touch panel. <P>SOLUTION: A touch position detecting device 1 includes: an image adjustment part 2 which obtains lighting up images and lighting off images; first and second smoothing image generation parts 4a, 4b which generate smoothing images in which the lighting off images obtained by the image adjustment part 2 are more smoothed than the lighting up images; first and second differential image generation parts 5a, 5b which generate differential images indicating the differences between the lighting up images and the smoothing images; and first and second touch position detection parts 6a, 6b which detect the positions of the images of the imaging objects contacting the imaging panel included in the differential images. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、撮像パネルを指示する指示物体の位置を検出する位置検出装置、当該位置検出装置を備える撮像装置および位置検出方法に関するものである。   The present invention relates to a position detection device that detects the position of a pointing object that instructs an imaging panel, an imaging device including the position detection device, and a position detection method.

表示に加えて受光(撮像)もできる表示装置の表示画面(撮像面)を指などで触れることで入力操作が可能なタッチパネルが、例えば、特許文献1に開示されている。   For example, Patent Document 1 discloses a touch panel that allows an input operation by touching a display screen (imaging surface) of a display device that can receive light (capture) in addition to display with a finger or the like.

また、特許文献2に記載の表示装置では、外光の影響を除去するために、図23および図24に示すように、バックライトを点灯した状態での撮像と、バックライトを消灯した状態での撮像とを時間的に交互に繰り返して画像を取得し、点灯状態の画像(点灯画像)と消灯状態の画像(消灯画像)との差分をとることにより差分画像を生成している。図23は暗所において生成された差分画像を示す図である。図24は、明所において生成された差分画像を示す図である。   Further, in the display device described in Patent Document 2, in order to remove the influence of external light, as shown in FIGS. 23 and 24, in the state where the backlight is turned on and the backlight is turned off. An image is acquired by alternately repeating the imaging of the time, and a difference image is generated by taking a difference between an image in a lighting state (lighted image) and an image in a light-off state (light-off image). FIG. 23 is a diagram showing a difference image generated in a dark place. FIG. 24 is a diagram showing a difference image generated in a bright place.

これにより、表示画面に接触または近接した指などの撮像対象にバックライトが反射した部分が明るい像として残り、背景に相当する部分は暗くなる。このような差分画像を用いることにより、表示画面に指などの撮像対象が接触したかどうかの判定を、外光の影響を受けずに行うことができる。   As a result, a portion where the backlight is reflected on the imaging target such as a finger touching or close to the display screen remains as a bright image, and a portion corresponding to the background becomes dark. By using such a difference image, it is possible to determine whether or not an imaging target such as a finger has touched the display screen without being affected by external light.

しかし、特許文献2に記載の方法では、図25(b)に示すように、撮像対象が移動した場合には、点灯状態の撮像と消灯状態の撮像との間に時間的な差があるため、撮像対象の像の位置がずれる。位置がずれた状態で差分をとると、位置がずれた部分に差分ノイズが発生する。図25(a)および(b)は、タッチ状態の指が移動した場合の問題点を説明するための図である。同図(a)および(b)では、点灯画像を「on画像」と称し、消灯画像を「off画像」と称している。   However, in the method described in Patent Document 2, as shown in FIG. 25B, when the imaging target moves, there is a time difference between imaging in the lit state and imaging in the unlit state. The position of the image to be imaged is shifted. If the difference is taken with the position shifted, differential noise is generated at the position shifted position. FIGS. 25A and 25B are diagrams for explaining a problem when the touched finger moves. In FIGS. 2A and 2B, the lit image is referred to as “on image”, and the unlit image is referred to as “off image”.

このような差分ノイズは、図26(b)に示すように、指が表示画面に接触していない状態で、指を移動させた場合にも発生する。図26(a)および(b)は、非タッチ状態の指が移動した場合の問題点を説明するための図である。   Such differential noise also occurs when the finger is moved while the finger is not in contact with the display screen, as shown in FIG. FIGS. 26A and 26B are diagrams for explaining a problem when a finger in a non-touch state moves.

すなわち、差分画像において、実際よりも明るい部分および暗い部分が生じ、このような部分によって、表示画面に接触していない撮像対象を、接触していると誤判定する可能性が生じる。   That is, in the difference image, a brighter part and a darker part than the actual part are generated, and such a part may erroneously determine that an imaging target that is not in contact with the display screen is in contact.

そこで、特許文献3の表示撮像装置では、2枚の消灯画像を用いて補間画像を生成し、上記2枚の消灯画像の撮像タイミングの間に撮像された点灯画像と補間画像との差分をとることにより差分ノイズを低減している。   In view of this, in the display imaging device of Patent Document 3, an interpolation image is generated using two unlit images, and the difference between the lit image and the interpolated image captured during the imaging timing of the two unlit images is calculated. Thus, the differential noise is reduced.

特開2008−250949号公報(2008年10月16日公開)JP 2008-250949 A (published October 16, 2008) 特開2006−276223号公報(2006年10月12日公開)JP 2006-276223 A (released on October 12, 2006) 特開2009−205423号公報(2009年9月10日公開)JP 2009-205423 A (published September 10, 2009)

特許文献3の発明では、撮像タイミングのずれによる問題を解決するため、例えば、第1消灯画像、点灯画像、第2消灯画像の順に時間軸に沿って異なるタイミングの画像を撮像し、2枚の消灯画像から補間した新たな消灯画像を生成し、点灯画像との位置合わせをすることで、差分後に生じるノイズを軽減し、物体の位置を安定して検出できるようにしている。   In the invention of Patent Document 3, in order to solve the problem due to the difference in imaging timing, for example, images of different timings are taken along the time axis in the order of the first extinguished image, the illuminated image, and the second extinguished image. A new extinguished image interpolated from the extinguished image is generated and aligned with the illuminated image, so that noise generated after the difference is reduced and the position of the object can be detected stably.

しかし、この方法では差分画像を生成するのに、消灯画像が余分に1枚必要であり、消灯画像の補間処理も必要となるため、処理コストが増大してしまう。また、物体が等速直線運動をしない場合は、差分画像に差分ノイズが発生してしまう。   However, this method requires one extra extinguished image to generate the difference image, and also requires interpolation processing of the extinguished image, which increases the processing cost. In addition, if the object does not perform a constant velocity linear motion, differential noise is generated in the differential image.

本発明の目的は、点灯画像と消灯画像との差分をとる位置検出装置において、撮像対象が等速直線運動以外の移動をした場合でも、差分ノイズを軽減した差分画像を生成することができ、撮像面に接触した撮像対象の位置を精度高く検出できる位置検出装置および当該位置検出装置を備える撮像装置を提供することにある。   An object of the present invention is to generate a differential image with reduced differential noise even in the case where the imaging target moves other than the constant-velocity linear motion in the position detection device that takes the difference between the lit image and the unlit image, An object of the present invention is to provide a position detection device capable of accurately detecting the position of an imaging target in contact with an imaging surface and an imaging device including the position detection device.

本発明に係る位置検出装置は、上記の課題を解決するために、撮像画像における撮像対象の像の位置を検出する位置検出装置であって、撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得部と、上記取得部が取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成部と、上記点灯画像と上記平滑化画像生成部が生成した平滑化画像との差分を示す差分画像を生成する差分画像生成部と、上記差分画像生成部が生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出部とを備えることを特徴としている。   In order to solve the above problems, a position detection device according to the present invention is a position detection device that detects the position of an image to be picked up in a picked-up image. A lighting image that is an image obtained by imaging the imaging target with the imaging panel in a state where irradiation is performed, and an image obtained by imaging the imaging target with the imaging panel in a state where light irradiation is not performed, the lighting image and Is an acquisition unit that acquires an extinguished image captured with a predetermined time difference, and a smoothed image generation unit that generates a smoothed image obtained by smoothing the extinguished image acquired by the acquiring unit than the lighting image, A difference image generation unit that generates a difference image indicating a difference between the lighting image and the smoothed image generated by the smoothed image generation unit, and the imaging image included in the difference image generated by the difference image generation unit. It is characterized in that it comprises a position detector for detecting a position of the image of the imaging target in contact with Le.

本発明に係る位置検出方法は、上記の課題を解決するために、撮像画像における撮像対象の像の位置を検出する位置検出装置における位置検出方法であって、撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得工程と、上記取得工程において取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成工程と、上記点灯画像と上記平滑化画像生成工程において生成した平滑化画像との差分を示す差分画像を生成する差分画像生成工程と、上記差分画像生成工程において生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出工程とを含むことを特徴としている。   In order to solve the above problems, a position detection method according to the present invention is a position detection method in a position detection device that detects the position of an image to be captured in a captured image, and the imaging target from the side where the imaging panel is located A lighting image that is an image obtained by imaging the imaging target with the imaging panel in a state where light irradiation is performed on the image, and an image obtained by imaging the imaging target with the imaging panel in a state where the light irradiation is not performed, An acquisition step of acquiring a light-off image captured with a predetermined time difference from the lighting image, and a smoothed image that generates a smoothed image obtained by smoothing the light-off image acquired in the acquisition step from the lighted image A difference image generation step for generating a difference image indicating a difference between the generation step, the lighting image and the smoothed image generated in the smoothed image generation step, and the difference image generation Contained in the difference image generated in degree, it is characterized in that it comprises a position detection step of detecting a position of the image of the imaging target in contact with said imaging panel.

上記の構成によれば、取得部は、点灯画像と消灯画像とを取得する。点灯画像とは、撮像パネルが配置された側から撮像対象に対して光照射を行った状態で撮像対象を撮像パネルにより撮像した画像である。消灯画像とは、光照射を行わない状態で撮像対象を撮像パネルにより撮像した画像である。また、点灯画像と消灯画像とは所定の時間差を設けて撮像されている。   According to said structure, an acquisition part acquires a lighting image and a light extinction image. The lighting image is an image obtained by imaging the imaging target with the imaging panel in a state where light irradiation is performed on the imaging target from the side where the imaging panel is arranged. The extinguished image is an image obtained by imaging the imaging target with the imaging panel in a state where light irradiation is not performed. Further, the lit image and the unlit image are captured with a predetermined time difference.

平滑化画像生成部は、取得部が取得した消灯画像を、点灯画像よりも平滑化した平滑化画像を生成する。差分画像生成部は、点灯画像と平滑化画像生成部が生成した平滑化画像との差分を示す差分画像を生成する。位置検出部は、差分画像生成部が生成した差分画像に含まれる、撮像パネルに接触した撮像対象の像の位置を検出する。   The smoothed image generation unit generates a smoothed image obtained by smoothing the extinguished image acquired by the acquisition unit more than the lit image. The difference image generation unit generates a difference image indicating a difference between the lighting image and the smoothed image generated by the smoothed image generation unit. The position detection unit detects the position of the image to be imaged that is in contact with the imaging panel and is included in the difference image generated by the difference image generation unit.

点灯画像と消灯画像との差分をとることによって、撮像対象の背景の明るさを差し引いて、光照射された撮像対象の像を抽出できる。しかし、この場合には、点灯画像と消灯画像との撮像タイミングに差が生じ、その間に撮像対象が移動した場合には、点灯画像における撮像対象の像と消灯画像における当該像との間に位置ずれが生じる。   By taking the difference between the lit image and the unlit image, it is possible to subtract the brightness of the background of the imaging target and extract the image of the imaging target irradiated with light. However, in this case, when there is a difference in the imaging timing of the lit image and the unlit image, and the imaging target moves during that time, the position is between the image of the imaging target in the lit image and the image in the unlit image. Deviation occurs.

消灯画像を平滑化することにより、消灯画像に含まれる撮像対象の像の輪郭がぼける。そのため、点灯画像と平滑化した消灯画像(平滑化画像)との差分をとった場合には、位置ずれが生じている部分(像の外縁部分)における画素値の差が少なくなる。その結果、位置ずれによって画素値が大きくなる部分および画素値が小さくなる部分における画素値の変化を小さくすることができる。   By smoothing the extinguished image, the contour of the image to be imaged included in the extinguished image is blurred. For this reason, when the difference between the lit image and the smoothed unlit image (smoothed image) is taken, the difference in pixel values in the portion where the positional deviation occurs (outer edge portion of the image) is reduced. As a result, it is possible to reduce the change in the pixel value in the portion where the pixel value increases due to the positional deviation and the portion where the pixel value decreases.

従って、撮像対象が移動することによって生じる差分ノイズを低減でき、撮像パネルに接触した撮像対象の位置を精度高く検出できる。また、撮像対象が等速直線運動以外の移動をした場合でも、差分ノイズを軽減できる。   Therefore, differential noise caused by the movement of the imaging target can be reduced, and the position of the imaging target in contact with the imaging panel can be detected with high accuracy. Further, even when the imaging target moves other than the uniform linear motion, the differential noise can be reduced.

また、上記差分画像生成部は、生成した差分画像において、0より小さい画素値を有する画素の画素値を0に置換することが好ましい。   The difference image generation unit preferably replaces the pixel value of a pixel having a pixel value smaller than 0 with 0 in the generated difference image.

上記の構成によれば、差分画像に含まれる画素のうち、0より小さい画素値を有する画素の画素値が0に置換される。画素値がマイナスの場合でも、画素値の勾配によって撮像対象の像の輪郭(エッジ)を検出する場合には、マイナスの画素値を有する画素によってエッジが検出される。このようなマイナスの画素値に由来するエッジは、撮像対象の像が誤検出される原因となる。   According to said structure, the pixel value of the pixel which has a pixel value smaller than 0 among the pixels contained in a difference image is substituted by 0. Even when the pixel value is negative, when the contour (edge) of the image to be imaged is detected by the gradient of the pixel value, the edge is detected by the pixel having the negative pixel value. Such an edge derived from a negative pixel value causes the image to be imaged to be erroneously detected.

それゆえ、上記の構成により、マイナスの画素値を有する画素がなくなるため、撮像対象の像が誤検出される可能性を低減できる。   Therefore, with the above configuration, there is no pixel having a negative pixel value, so that the possibility of erroneous detection of an image to be captured can be reduced.

また、上記平滑化画像生成部は、平滑化フィルタとしての空間フィルタを用いて上記消灯画像を平滑化することが好ましい。   Moreover, it is preferable that the said smoothed image production | generation part smoothes the said light extinction image using the spatial filter as a smoothing filter.

上記の構成により、消灯画像は、空間フィルタによって平滑化される。この空間フィルタとは、例えば、平均値フィルタまたはメディアンフィルタである。それゆえ、空間フィルタを適切に選択することにより、消灯画像が平滑化される様式および程度を好ましいものに設定できる。   With the above configuration, the unlit image is smoothed by the spatial filter. This spatial filter is, for example, an average value filter or a median filter. Therefore, by appropriately selecting the spatial filter, it is possible to set a preferable manner and degree of smoothing the extinguished image.

また、上記平滑化画像生成部は、予め想定されている、上記撮像対象の上記撮像パネルとの接触部分の像の大きさよりも小さい平滑化フィルタを用いて上記消灯画像を平滑化することが好ましい。   Moreover, it is preferable that the said smoothed image production | generation part smoothes the said light extinction image using the smoothing filter smaller than the magnitude | size of the image of the contact part with the said imaging panel of the said imaging target assumed beforehand. .

上記の構成によれば、消灯画像を平滑化するために用いられる平滑化フィルタは、撮像対象が撮像パネルと接触する部分の像の大きさよりも小さいものである。撮像対象が撮像パネルと接触する部分の像の大きさは、予め想定されており、その大きさに基づいて、平滑化フィルタのサイズが予め設定されている。   According to said structure, the smoothing filter used in order to smooth a light extinction image is a thing smaller than the magnitude | size of the image of the part in which an imaging target contacts an imaging panel. The size of the image of the portion where the imaging target contacts the imaging panel is assumed in advance, and the size of the smoothing filter is set in advance based on the size.

接触部分の像の大きさよりも大きい平滑化フィルタを用いた場合には、当該像全体が顕著に平滑化され、その画素値が小さくなる。そのため、撮像パネルに接触している撮像対象の像が正常に検出されなくなる可能性が高まる。   When a smoothing filter larger than the size of the image of the contact portion is used, the entire image is significantly smoothed, and the pixel value becomes small. Therefore, the possibility that the image of the imaging target that is in contact with the imaging panel is not normally detected increases.

そこで、消灯画像を平滑化するために用いられる平滑化フィルタを、撮像対象が撮像パネルと接触する部分の像の大きさよりも小さくすることにより、消灯画像を平滑化することで生じる上述の副作用を低減することができる。   Therefore, the above-mentioned side effects caused by smoothing the extinguished image by making the smoothing filter used for smoothing the extinguished image smaller than the size of the image of the portion where the imaging target is in contact with the imaging panel. Can be reduced.

また、上記平滑化画像生成部は、予め想定されている複数種類の撮像対象に対応する複数段階の大きさの平滑化フィルタを用いて上記平滑化画像を生成することが好ましい。   Moreover, it is preferable that the said smoothed image production | generation part produces | generates the said smoothed image using the smoothing filter of the magnitude | size of several steps corresponding to the multiple types of imaging target assumed beforehand.

上記の構成によれば、消灯画像を平滑化するときに、予め想定されている複数種類の撮像対象に対応する複数段階の大きさの平滑化フィルタが用いられる。それゆえ、撮像対象ごとに適したレベルの平滑化を行うことができる。   According to said structure, when smoothing a light extinction image, the smoothing filter of the magnitude | size of the several step corresponding to the multiple types of imaging target assumed beforehand is used. Therefore, smoothing at a level suitable for each imaging target can be performed.

また、上記平滑化画像生成部は、予め想定されている複数種類の撮像対象に対応する複数段階の大きさの平滑化フィルタをそれぞれ用いて1つの消灯画像から複数の平滑化画像を生成し、上記差分画像生成部は、上記点灯画像と上記平滑化画像生成部が生成した複数の平滑化画像との差分をそれぞれ示す複数の差分画像を生成し、上記位置検出部は、上記差分画像生成部が生成した複数の差分画像ごとに、当該差分画像のもとになった平滑化画像の生成に用いられた平滑化フィルタのサイズに対応する、上記撮像対象の像を検出するためのパターンをそれぞれ用いて、各差分画像に含まれる撮像対象の像の位置を検出することが好ましい。   In addition, the smoothed image generation unit generates a plurality of smoothed images from one extinguished image using smoothing filters of a plurality of stages corresponding to a plurality of types of imaging targets assumed in advance, The difference image generation unit generates a plurality of difference images respectively indicating differences between the lighting image and the plurality of smoothed images generated by the smoothed image generation unit, and the position detection unit includes the difference image generation unit. For each of the plurality of difference images generated by the above, a pattern for detecting the image of the imaging target corresponding to the size of the smoothing filter used to generate the smoothed image that is the basis of the difference image It is preferable to detect the position of the image to be imaged included in each difference image.

上記の構成によれば、予め複数種類の撮像対象ごとに、対応する複数段階の大きさの平滑化フィルタが設定されている。平滑化画像生成部は、このような平滑化フィルタをそれぞれ1つずつ用いて、1つの消灯画像から、平滑化フィルタの数に対応する複数の平滑化画像を生成する。差分画像生成部は、点灯画像と平滑化画像生成部が生成した複数の平滑化画像のうちの1つとの差分をとるという処理を、複数の平滑化画像のそれぞれについて行う。   According to said structure, the smoothing filter of the magnitude | size corresponding to several steps is preset for every several types of imaging target. The smoothed image generation unit generates a plurality of smoothed images corresponding to the number of smoothing filters from one extinguished image using each of such smoothing filters. The difference image generation unit performs a process of obtaining a difference between the lighting image and one of the plurality of smoothed images generated by the smoothed image generation unit for each of the plurality of smoothed images.

平滑化画像生成部が用いた平滑化フィルタと、位置検出部が用いる撮像対象の像を検出するためのパターン(検出用パターン)とは互いに対応付けられている。位置検出部は、生成された複数の差分画像ごとに、差分画像のもとになった平滑化画像の生成に用いられた平滑化フィルタのサイズに対応する検出用パターンをそれぞれ用いて、各差分画像に含まれる撮像対象の像の位置を検出する。検出用パターンと合致しない像は、撮像対象の像として検出されないため、位置検出部は、撮像対象が1種類かつ1つであれば、最終的に1つの撮像対象の像の位置を検出する。   The smoothing filter used by the smoothed image generation unit and the pattern (detection pattern) for detecting the image to be imaged used by the position detection unit are associated with each other. For each of the plurality of generated difference images, the position detection unit uses each detection pattern corresponding to the size of the smoothing filter used to generate the smoothed image that is the basis of the difference image. The position of the image to be imaged included in the image is detected. Since an image that does not match the detection pattern is not detected as an image to be picked up, the position detecting unit finally detects the position of one image to be picked up if there is one kind of image pickup target.

この構成により、予め想定されている複数種類の撮像対象のうち、どの撮像対象が撮像されるかが分からない状況でも、複数種類の撮像対象のそれぞれに対応した位置検出処理を並行して行うことができる。それゆえ、撮像対象ごとの位置検出処理を直列的に行っていくよりも、位置検出にかかる処理量を低減できる。   With this configuration, position detection processing corresponding to each of a plurality of types of imaging targets can be performed in parallel even in a situation where it is not known which imaging target is to be imaged among a plurality of types of imaging targets assumed in advance. Can do. Therefore, it is possible to reduce the amount of processing for position detection rather than performing the position detection processing for each imaging target in series.

また、上記平滑化画像生成部は、上記点灯画像または上記消灯画像が撮像された時点における上記撮像対象の周囲の光の強度である外光強度を示す外光強度情報を取得し、当該外光強度情報が示す外光強度が所定の基準値を超えた場合にのみ上記消灯画像を平滑化することが好ましい。   In addition, the smoothed image generation unit acquires external light intensity information indicating external light intensity that is the intensity of light around the imaging target at the time when the lighting image or the extinguishing image is captured, and the external light It is preferable to smooth the extinguished image only when the external light intensity indicated by the intensity information exceeds a predetermined reference value.

外光強度が小さい場合には、消灯画像は全体的に暗いものであり、撮像対象の像ははっきり写らない。そのため、撮像対象が移動しても、点灯画像と消灯画像との差分をとることによって生じる差分ノイズは、顕著には発生しない。   When the external light intensity is low, the unlit image is entirely dark and the image to be imaged is not clearly visible. Therefore, even if the imaging target moves, the difference noise generated by taking the difference between the lit image and the unlit image does not occur remarkably.

上記の構成によれば、平滑化画像生成部は、点灯画像または消灯画像が撮像された時点の外光強度が所定の基準値を超えた場合にのみ消灯画像を平滑化する。換言すれば、平滑化画像生成部は、外光強度が所定の基準値以下の場合には消灯画像を平滑化しない。   According to the above configuration, the smoothed image generating unit smoothes the extinguished image only when the external light intensity at the time when the illuminated image or the extinguished image is captured exceeds a predetermined reference value. In other words, the smoothed image generation unit does not smooth the extinguished image when the external light intensity is equal to or less than the predetermined reference value.

それゆえ、消灯画像の平滑化が必ずしも必要でない、外光強度が小さい状況において、位置検出にかかる処理量を低減できる。   Therefore, it is possible to reduce the amount of processing for position detection in a situation where the smoothing of the extinguished image is not necessarily required and the external light intensity is low.

また、上記平滑化画像生成部は、上記点灯画像または上記消灯画像が撮像された時点における上記撮像対象の周囲の光の強度である外光強度を示す外光強度情報を取得し、当該外光強度情報が示す外光強度に応じたサイズの平滑化フィルタを用いて上記消灯画像を平滑化することが好ましい。   In addition, the smoothed image generation unit acquires external light intensity information indicating external light intensity that is the intensity of light around the imaging target at the time when the lighting image or the extinguishing image is captured, and the external light It is preferable to smooth the extinguished image using a smoothing filter having a size corresponding to the intensity of external light indicated by the intensity information.

外光強度が大きくなるに従って、点灯画像と消灯画像との差分をとることによって生じる差分ノイズが顕著に発生する。そのため、外光強度が大きくなるに従って、より平滑化の効果が大きい、サイズの大きい平滑化フィルタを用いることが好ましい。   As the external light intensity increases, the difference noise generated by taking the difference between the lit image and the unlit image becomes more prominent. For this reason, it is preferable to use a smoothing filter having a larger size and a greater smoothing effect as the external light intensity increases.

上記の構成によれば、平滑化画像生成部は、外光強度に応じたサイズの平滑化フィルタを用いて消灯画像を平滑化する。例えば、平滑化画像生成部は、外光強度の増加に伴い、使用する平滑化フィルタのサイズを段階的に大きくする。   According to said structure, a smoothed image generation part smoothes a light extinction image using the smoothing filter of the size according to external light intensity | strength. For example, the smoothed image generation unit increases the size of the smoothing filter to be used in a stepwise manner as the external light intensity increases.

それゆえ、外光強度に適した(すなわち、差分ノイズのレベルに適した)、消灯画像の平滑化を行うことができる。   Therefore, it is possible to smooth the unlit image suitable for the external light intensity (that is, suitable for the level of differential noise).

また、上記位置検出装置は、上記取得部が取得した点灯画像と消灯画像との差分を示す第2差分画像を生成し、生成した第2差分画像において、予め想定されている撮像対象の像の画素値よりも大きい画素値を有する画素の数が、所定の数以上であるかどうかを判定する差分画像判定部をさらに備え、上記平滑化画像生成部は、上記差分画像判定部が、上記画素の数が所定の数以上であると判定した場合にのみ上記消灯画像を平滑化することが好ましい。   Further, the position detection device generates a second difference image indicating a difference between the lit image and the unlit image acquired by the acquisition unit, and in the generated second difference image, an image of the imaging target assumed in advance is generated. A difference image determination unit that determines whether or not the number of pixels having a pixel value larger than the pixel value is equal to or greater than a predetermined number; and the smoothed image generation unit includes the difference image determination unit, It is preferable to smooth the unlit image only when it is determined that the number of images is equal to or greater than a predetermined number.

上記の構成によれば、差分画像判定部は、取得部が取得した点灯画像と消灯画像との差分を示す第2差分画像を生成し、この第2差分画像において、予め想定されている撮像対象の像の画素値よりも大きい画素値を有する画素の数が、所定の数以上であるかどうかを判定する。上記画素の数が、所定の数以上である場合には、差分ノイズが所定のレベル以上発生している可能性が高い。平滑化画像生成部は、その場合にのみ消灯画像を平滑化する。   According to said structure, a difference image determination part produces | generates the 2nd difference image which shows the difference of the lighting image and light extinction image which the acquisition part acquired, and in this 2nd difference image, the imaging target assumed beforehand It is determined whether or not the number of pixels having a pixel value larger than the pixel value of the image is equal to or greater than a predetermined number. If the number of pixels is equal to or greater than a predetermined number, there is a high possibility that differential noise is occurring at a predetermined level or higher. The smoothed image generating unit smoothes the extinguished image only in that case.

それゆえ、消灯画像の平滑化が必ずしも必要でない、差分ノイズの発生レベルが低い状況において、消灯画像の平滑化処理を省略することができる。   Therefore, the smoothing process of the unlit image can be omitted in a situation where the smoothing of the unlit image is not necessarily required and the generation level of the differential noise is low.

また、上記位置検出部は、上記差分画像生成部が生成した差分画像から所定の値以上の画素値を有する画素を抽出し、抽出した画素によって形成される像の位置を、上記撮像パネルに接触した撮像対象の像の位置として検出することが好ましい。   Further, the position detection unit extracts pixels having a pixel value greater than or equal to a predetermined value from the difference image generated by the difference image generation unit, and contacts the position of the image formed by the extracted pixels with the imaging panel. It is preferable to detect it as the position of the image to be imaged.

上記の構成によれば、差分画像から所定の値以上の画素値を有する画素が抽出される。差分画像に含まれる、撮像パネルに接触した撮像対象の像は、背景部分よりも明るいため、所定の値以上の画素値を有する画素を抽出することで、当該撮像対象の像を抽出できる。上記所定の値とは、例えば、差分画像における、撮像パネルに接触した撮像対象の像を形成する画素の画素値の下限値として予め想定された値である。そして、抽出した画素によって形成される像の位置が、撮像対象の像の位置として検出される。   According to said structure, the pixel which has a pixel value more than a predetermined value is extracted from a difference image. Since the image of the imaging target in contact with the imaging panel included in the difference image is brighter than the background portion, the image of the imaging target can be extracted by extracting pixels having pixel values greater than or equal to a predetermined value. The predetermined value is, for example, a value assumed in advance as a lower limit value of a pixel value of a pixel that forms an image to be imaged in contact with the imaging panel in the difference image. Then, the position of the image formed by the extracted pixels is detected as the position of the image to be imaged.

それゆえ、上記の構成により、撮像パネルに接触した撮像対象の像の位置を適切に検出することができる。   Therefore, with the above configuration, it is possible to appropriately detect the position of the image to be imaged in contact with the imaging panel.

また、上記位置検出部は、上記差分画像生成部が生成した差分画像を所定の値を境として二値化し、二値化した差分画像に含まれる像の位置を、上記撮像パネルに接触した撮像対象の像の位置として検出することが好ましい。   Further, the position detection unit binarizes the difference image generated by the difference image generation unit with a predetermined value as a boundary, and the position of the image included in the binarized difference image is captured in contact with the imaging panel. It is preferable to detect the position of the target image.

上記の構成によれば、差分画像を所定の値を境として二値化することによって、撮像パネルに接触した撮像対象の像が抽出される。上記所定の値とは、例えば、差分画像における、撮像パネルに接触した撮像対象の像を形成する画素の画素値の下限値として予め想定された値である。そして、二値化した差分画像に含まれる像の位置が、撮像対象の像の位置として検出される。   According to said structure, the image of the imaging target which contacted the imaging panel is extracted by binarizing a difference image on the basis of a predetermined value. The predetermined value is, for example, a value assumed in advance as a lower limit value of a pixel value of a pixel that forms an image to be imaged in contact with the imaging panel in the difference image. Then, the position of the image included in the binarized difference image is detected as the position of the image to be imaged.

それゆえ、上記の構成により、撮像パネルに接触した撮像対象の像の位置を適切に検出することができる。   Therefore, with the above configuration, it is possible to appropriately detect the position of the image to be imaged in contact with the imaging panel.

また、上記位置検出部は、上記差分画像生成部が生成した差分画像から所定の値以上のエッジ強度を有する画素を抽出し、抽出した画素の集合に対して、上記撮像対象の像を検出するためのパターンとのパターンマッチを行うことにより、上記撮像パネルに接触した撮像対象の像を検出することが好ましい。   In addition, the position detection unit extracts pixels having edge strengths greater than or equal to a predetermined value from the difference image generated by the difference image generation unit, and detects the image of the imaging target with respect to the set of extracted pixels. It is preferable to detect the image of the imaging target in contact with the imaging panel by performing pattern matching with the pattern for the purpose.

上記の構成によれば、差分画像から所定の値以上のエッジ強度を有する画素が抽出される。撮像パネルに接触した撮像対象の像は、撮像パネルに接触していない撮像対象の像よりも際立ったエッジを有している。それゆえ、所定の値以上のエッジ強度を有する画素を抽出することで、撮像パネルに接触した撮像対象の像が抽出される。上記所定の値とは、例えば、撮像パネルに接触した撮像対象の像が有するエッジ強度の下限値として予め想定された値である。   According to said structure, the pixel which has edge intensity more than predetermined value is extracted from a difference image. The image of the imaging target in contact with the imaging panel has a more prominent edge than the image of the imaging target that is not in contact with the imaging panel. Therefore, by extracting a pixel having an edge intensity equal to or greater than a predetermined value, an image of the imaging target that is in contact with the imaging panel is extracted. The predetermined value is, for example, a value assumed in advance as a lower limit value of the edge strength of the image to be imaged that is in contact with the imaging panel.

そして、抽出された画素の集合に対して、検出用パターンとのパターンマッチが行われる。この検出用パターンと合致した像が、撮像パネルに接触した撮像対象の像として認識される。   Then, pattern matching with the detection pattern is performed on the extracted set of pixels. An image that matches the detection pattern is recognized as an image to be imaged in contact with the imaging panel.

それゆえ、上記の構成により、撮像パネルに接触した撮像対象の像を適切に検出することができる。   Therefore, with the above configuration, it is possible to appropriately detect the image of the imaging target in contact with the imaging panel.

本発明に係る撮像装置は、上記位置検出装置と、撮像パネルとを備える撮像装置であって、上記撮像パネルは、上記撮像対象への光照射を所定の時間間隔で行う照明部と、上記照明部の光照射のタイミングに同期して、上記点灯画像および上記消灯画像を撮像する撮像センサとを備え、上記取得部は、上記撮像センサが撮像した上記点灯画像および上記消灯画像を取得することを特徴としている。   An imaging device according to the present invention is an imaging device including the position detection device and an imaging panel, and the imaging panel includes an illumination unit that performs light irradiation on the imaging target at predetermined time intervals, and the illumination. An imaging sensor that captures the lighting image and the extinguishing image in synchronization with the light irradiation timing of the imaging unit, and the acquisition unit acquires the lighting image and the extinguishing image captured by the imaging sensor. It is a feature.

上記の構成によれば、撮像パネルに備えられた照明部は、撮像対象への光照射を所定の時間間隔で行う。すなわち、照明部は、時間軸に沿って点灯と消灯とを交互に繰り返す。撮像センサは、この照明部の光照射のタイミングに同期して、点灯画像および消灯画像を撮像する。すなわち、照明部の点灯時の撮像と、照明部の消灯時の撮像とを行う。位置検出装置の取得部は、撮像センサが撮像した点灯画像および消灯画像を取得する。その後、平滑化画像生成部、差分画像生成部および位置検出部における処理が行われ、撮像パネルに接触した撮像対象の像の位置が検出される。   According to said structure, the illumination part with which the imaging panel was equipped performs light irradiation to an imaging target at a predetermined time interval. That is, the illumination unit repeats turning on and off alternately along the time axis. The imaging sensor captures a lit image and an unlit image in synchronization with the light irradiation timing of the illumination unit. That is, imaging is performed when the illumination unit is turned on and imaging is performed when the illumination unit is turned off. The acquisition unit of the position detection device acquires a lit image and an unlit image captured by the imaging sensor. Thereafter, processing in the smoothed image generation unit, the difference image generation unit, and the position detection unit is performed, and the position of the image to be imaged in contact with the imaging panel is detected.

それゆえ、撮像対象が移動した場合でも、撮像パネルに接触していない撮像対象を、接触していると誤判定する可能性を低減でき、撮像パネルに接触した撮像対象の位置を精度高く検出できる。   Therefore, even when the imaging target moves, the possibility of erroneously determining that the imaging target that is not in contact with the imaging panel is in contact can be reduced, and the position of the imaging target in contact with the imaging panel can be detected with high accuracy. .

また、上記撮像パネルは、表示用のバックライトを備えており、上記照明部は、上記表示用のバックライトとは別に設けられていることが好ましい。   The imaging panel preferably includes a display backlight, and the illumination unit is preferably provided separately from the display backlight.

上記の構成によれば、撮像パネルは、表示用のバックライトを備えている。この表示用のバックライトを点灯画像および消灯画像の撮像のために点灯/消灯させると、表示画面が暗い場合には、点灯状態でも十分な照明光が照射されず、点灯画像が真っ暗になり、その結果、差分画像が真っ暗になる可能性がある。また、表示用のバックライトを点灯/消灯させると、表示画面にちらつきが生じるという問題が生じる。照明部を表示用のバックライトとは別に設けることにより、この問題を解決できる。   According to the above configuration, the imaging panel includes the display backlight. When the display backlight is turned on / off to capture a lit image and an unlit image, if the display screen is dark, sufficient illumination light is not emitted even in the lit state, and the lit image becomes dark. As a result, the difference image may become completely dark. Further, when the display backlight is turned on / off, there is a problem that the display screen flickers. This problem can be solved by providing the illumination unit separately from the display backlight.

また、上記照明部は、近赤外または近紫外領域の波長の光を出射することが好ましい。   Moreover, it is preferable that the said illumination part radiate | emits the light of the wavelength of a near infrared region or a near ultraviolet region.

近赤外または近紫外領域の波長の光は、表示に与える影響が少ないとともに、指などの撮像対象に効率良く反射する。それゆえ、照明部を、近赤外または近紫外領域の波長の光を出射するものにすることにより、表示を見やすくできるとともに、撮像対象の検出精度を高めることができる。   Light having a wavelength in the near-infrared or near-ultraviolet region has little influence on the display and is efficiently reflected on an imaging target such as a finger. Therefore, by making the illumination unit emit light having a wavelength in the near-infrared or near-ultraviolet region, the display can be easily seen and the detection accuracy of the imaging target can be increased.

上記撮像センサは、近赤外または近紫外領域の波長の光を受光することが好ましい。   The imaging sensor preferably receives light having a wavelength in the near infrared or near ultraviolet region.

上記の構成により、近赤外または近紫外領域の波長の光を受光し、点灯画像および消灯画像を形成することができる。   With the above configuration, light having a wavelength in the near infrared or near ultraviolet region can be received, and a lighted image and a lighted image can be formed.

上記撮像センサは、太陽光照射下において飽和しない感度に設定されていることが好ましい。   The imaging sensor is preferably set to a sensitivity that does not saturate under sunlight irradiation.

外光強度が強い環境下で撮像センサが飽和する場合、シャッター速度(露光時間)を変更するなど複雑な処理が必要となる。   When the imaging sensor is saturated in an environment where the external light intensity is strong, complicated processing such as changing the shutter speed (exposure time) is required.

上記の構成により、太陽光照射下(約10万ルクス)では、撮像センサは、飽和しないため、シャッター速度(露光時間)の変更などの複雑な処理を省略できる。   With the above configuration, the imaging sensor does not saturate under sunlight irradiation (about 100,000 lux), so that complicated processing such as changing the shutter speed (exposure time) can be omitted.

また、上記位置検出装置を動作させる位置検出プログラムであって、コンピュータを上記各部として機能させるための位置検出プログラムおよび当該位置検出プログラムを記録したコンピュータ読み取り可能な記録媒体も本発明の技術的範囲に含まれる。   Further, a position detection program for operating the position detection device, a position detection program for causing a computer to function as each of the above-described units, and a computer-readable recording medium on which the position detection program is recorded are also within the technical scope of the present invention. included.

本発明に係る位置検出装置は、以上のように、撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得部と、上記取得部が取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成部と、上記点灯画像と上記平滑化画像生成部が生成した平滑化画像との差分を示す差分画像を生成する差分画像生成部と、上記差分画像生成部が生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出部とを備える構成である。   As described above, the position detection device according to the present invention is a lighting image that is an image obtained by imaging the imaging target with the imaging panel in a state where light irradiation is performed on the imaging target from the side on which the imaging panel is located; An acquisition unit that acquires an image of the imaging target captured by the imaging panel in a state where the light irradiation is not performed, and an unlit image captured with a predetermined time difference from the lighting image, and the acquisition unit A difference image indicating a difference between a smoothed image generation unit that generates a smoothed image obtained by smoothing the acquired extinguishing image than the lighting image, and a smoothed image generated by the lighting image and the smoothed image generation unit. And a position detection unit that detects a position of an image to be imaged that is in contact with the imaging panel and is included in the difference image generated by the difference image generation unit.

また、本発明に係る位置検出方法は、撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得工程と、上記取得工程において取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成工程と、上記点灯画像と上記平滑化画像生成工程において生成した平滑化画像との差分を示す差分画像を生成する差分画像生成工程と、
上記差分画像生成工程において生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出工程とを含む構成である。
Further, the position detection method according to the present invention includes a lighting image that is an image obtained by imaging the imaging target with the imaging panel in a state where the imaging target is irradiated with light from the side where the imaging panel is located, and the light irradiation. An acquisition process of acquiring an image of the imaging target captured by the imaging panel in a state in which the image is not captured, and an extinguished image captured with a predetermined time difference from the lighting image, and the extinguishing acquired in the acquisition process A smoothed image generating step for generating a smoothed image obtained by smoothing an image from the lighting image and a difference image indicating a difference between the lighting image and the smoothed image generated in the smoothed image generating step are generated. Difference image generation step;
And a position detection step of detecting the position of the image of the imaging target in contact with the imaging panel, which is included in the differential image generated in the differential image generation step.

それゆえ、撮像対象が移動することによって生じる差分ノイズを低減でき、撮像パネルに接触した撮像対象の位置を精度高く検出できるという効果を奏する。   Therefore, it is possible to reduce differential noise caused by the movement of the imaging target, and to obtain an effect that the position of the imaging target in contact with the imaging panel can be detected with high accuracy.

本発明の一実施形態に係るタッチ位置検出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the touch position detection apparatus which concerns on one Embodiment of this invention. 光センサ内蔵LCDの構成を示す断面図である。It is sectional drawing which shows the structure of LCD with a built-in optical sensor. 外光強度の変化と平滑化フィルタのサイズとの関係を示すグラフである。It is a graph which shows the relationship between the change of external light intensity, and the size of a smoothing filter. 外光強度の変化と平滑化フィルタのサイズとの別の関係を示すグラフである。It is a graph which shows another relationship between the change of external light intensity, and the size of a smoothing filter. (a)は、タッチ状態の指が静止している場合の差分画像の生成過程を示す図であり、(b)は、タッチ状態の指が移動した場合の差分画像の生成過程を示す図である。(A) is a figure which shows the production | generation process of the difference image when the finger of a touch state is stationary, (b) is a figure which shows the production | generation process of the difference image when the finger of a touch state moves. is there. (a)は、非タッチ状態の指が静止している場合の差分画像の生成過程を示す図であり、(b)は、非タッチ状態の指が移動した場合の差分画像の生成過程を示す図である。(A) is a figure which shows the production | generation process of a difference image when the finger | toe of a non-touch state is stationary, (b) shows the production | generation process of the difference image when the finger | toe of a non-touch state moves. FIG. 静止状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。A graph showing a detection result when an image of a finger pad is detected by generating a differential image without smoothing an extinguished image obtained by capturing a finger in a stationary state and extracting pixels having pixel values equal to or greater than a predetermined threshold It is. 移動状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。A graph showing a detection result when an image of a finger pad is detected by generating a differential image without smoothing an extinguished image obtained by capturing a moving finger and extracting a pixel having a pixel value equal to or greater than a predetermined threshold It is. 静止状態の指を撮像した消灯画像を平滑化して差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by smoothing the light-off image which imaged the finger of a stationary state, generating a difference picture, and extracting the pixel which has a pixel value more than a predetermined threshold. . 移動状態の指を撮像した消灯画像を平滑化して差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by smoothing the light extinction image which imaged the finger of a movement state, generating a difference image, and extracting the pixel which has a pixel value more than a predetermined threshold. . 図7〜図10に示すグラフを説明するための図である。It is a figure for demonstrating the graph shown in FIGS. 静止状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by producing | generating a difference image, without smoothing the light extinction image which image | photographed the finger | toe in a stationary state, and extracting an edge feature. 移動状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by producing | generating a difference image, without smoothing the light extinction image which imaged the finger of the movement state, and extracting an edge feature. 静止状態の指を撮像した消灯画像を平滑化して差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by smoothing the light-off image which image | photographed the finger | toe of a stationary state, producing | generating a difference image, and extracting an edge feature. 移動状態の指を撮像した消灯画像を平滑化して差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。It is a graph which shows the detection result at the time of detecting the image of a finger pad by smoothing the light extinction image which imaged the finger of the movement state, generating a difference image, and extracting an edge feature. 接触部分像のサイズと同じサイズの平滑化フィルタを用いて消灯画像を平滑化した例を示す図である。It is a figure which shows the example which smooth | blunted the light-off image using the smoothing filter of the same size as the size of a contact partial image. 指示物体に対応したサイズの平滑化フィルタを用いることの意義を説明するための図である。It is a figure for demonstrating the significance of using the smoothing filter of the size corresponding to a pointing object. (a)は、平均値フィルタの効果を説明するための図であり、(b)は、中間値フィルタの効果を説明するための図である。(A) is a figure for demonstrating the effect of an average value filter, (b) is a figure for demonstrating the effect of an intermediate value filter. 差分画像において、0より小さい画素値をクリッピングする理由を説明するための図である。It is a figure for demonstrating the reason for clipping the pixel value smaller than 0 in a difference image. 上記タッチ位置検出装置における処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a process in the said touch position detection apparatus. 本発明の別の実施形態に係るタッチ位置検出装置の構成を示す概略図である。It is the schematic which shows the structure of the touch position detection apparatus which concerns on another embodiment of this invention. 上記タッチ位置検出装置における処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a process in the said touch position detection apparatus. 暗所において生成された差分画像を示す図である。It is a figure which shows the difference image produced | generated in the dark place. 明所において生成された差分画像を示す図である。It is a figure which shows the difference image produced | generated in the bright place. (a)および(b)は、タッチ状態の指が移動した場合の問題点を説明するための図である。(A) And (b) is a figure for demonstrating a problem when the finger of a touch state moves. (a)および(b)は、非タッチ状態の指が移動した場合の問題点を説明するための図である。(A) And (b) is a figure for demonstrating a problem when the finger | toe of a non-touch state moves.

〔実施の形態1〕
本発明の実施の一形態について図1〜図20に基づいて説明すれば、以下のとおりである。ここでは、本発明の一例として、タッチパネル上の任意の位置を指示するユーザの指またはタッチペン等の指示部材(指示物体と総称する)の画像を撮像し、その画像を解析することにより、タッチパネルに接触した指示物体の、当該タッチパネルとの接触位置を検出するタッチ位置検出装置(光学差分方式タッチパネル)1について説明する。なお、タッチ位置検出装置1を表示装置、撮像装置、表示撮像装置、入力装置、情報機器または電子機器と表現することもできる。
[Embodiment 1]
The following describes one embodiment of the present invention with reference to FIGS. Here, as an example of the present invention, an image of an indication member (generally referred to as an indication object) such as a user's finger or a touch pen that designates an arbitrary position on the touch panel is captured, and the image is analyzed to be applied to the touch panel. A touch position detection device (optical difference type touch panel) 1 that detects a contact position of a pointing object that has touched the touch panel will be described. The touch position detection device 1 can also be expressed as a display device, an imaging device, a display imaging device, an input device, an information device, or an electronic device.

(タッチ位置検出装置1の構成)
図1は、本実施形態のタッチ位置検出装置1の構成を示すブロック図である。図1に示すように、タッチ位置検出装置(位置検出装置)1は、タッチパネル部(撮像パネル)10、主制御部20、記憶部30および一次記憶部31を備えている。
(Configuration of Touch Position Detection Device 1)
FIG. 1 is a block diagram illustrating a configuration of a touch position detection device 1 according to the present embodiment. As shown in FIG. 1, the touch position detection device (position detection device) 1 includes a touch panel unit (imaging panel) 10, a main control unit 20, a storage unit 30, and a primary storage unit 31.

(タッチパネル部10の構成)
タッチパネル部10は、撮像素子としての光センサ12を内蔵した光センサ内蔵LCD(液晶パネル/ディスプレイ)11、AD(analog/digital)コンバータ15、タイミング制御部16および感度調整部17を備えている。
(Configuration of touch panel unit 10)
The touch panel unit 10 includes an optical sensor built-in LCD (liquid crystal panel / display) 11, an AD (analog / digital) converter 15, a timing control unit 16, and a sensitivity adjustment unit 17.

光センサ内蔵LCD11は、光センサ(撮像センサ)12を内蔵しているため、表示だけではなく画像の撮像が可能である。それゆえ、光センサ内蔵LCD11は、タッチパネルとしての光センサ内蔵LCD11の表示画面に接触または近接した指などの指示物体の像を含む画像(以下、撮像画像と称する)を撮像する撮像画面として機能する。   Since the optical sensor built-in LCD 11 has a built-in optical sensor (imaging sensor) 12, it can capture not only a display but also an image. Therefore, the optical sensor built-in LCD 11 functions as an imaging screen that captures an image (hereinafter referred to as a captured image) including an image of a pointing object such as a finger that is in contact with or close to the display screen of the optical sensor built-in LCD 11 as a touch panel. .

ADコンバータ15は、光センサ12で取得した信号をデジタル化する。   The AD converter 15 digitizes the signal acquired by the optical sensor 12.

タイミング制御部16は、タッチパネル用バックライト14の点灯/消灯のタイミングと、光センサ12による撮像タイミングとを制御し、両者を同期させる。   The timing control unit 16 controls the timing for turning on / off the backlight 14 for the touch panel and the imaging timing by the optical sensor 12 to synchronize both.

光センサ12は、タッチパネル用バックライト14から指示物体に対して光照射を行った状態で当該指示物体を撮像した画像である点灯画像と、光照射を行わない状態で指示物体を撮像した画像である消灯画像とを撮像する受光素子である。そのとき、光センサ12は、タイミング制御部16から出力される同期信号に従い点灯画像の撮像および消灯画像の撮像を交互に所定の時間間隔で行う。すなわち、消灯画像は、点灯画像とは所定の時間差を設けて撮像されている。   The optical sensor 12 includes a lighting image that is an image of the pointing object in a state in which the pointing object is irradiated with light from the touch panel backlight 14 and an image in which the pointing object is captured in a state where no light irradiation is performed. It is a light receiving element that captures a certain unlit image. At that time, the optical sensor 12 alternately captures the lit image and the unlit image according to the synchronization signal output from the timing control unit 16 at predetermined time intervals. That is, the unlit image is taken with a predetermined time difference from the lit image.

例えば、光センサ内蔵LCD11における画像表示のフレーム期間ごとに、そのフレーム期間の前半期間においてタッチパネル用バックライト14が点灯し、そのフレーム期間の後半期間においてタッチパネル用バックライト14が消灯する。この場合、光センサ12は、前半期間に撮像した画像を点灯画像としてADコンバータ15を介して画像調整部2へ出力し、後半期間に撮像した画像を消灯画像としてADコンバータ15を介して画像調整部2へ出力する。これら同じフレーム期間において撮像された点灯画像と消灯画像とは、差分画像を生成するための1対の撮像画像として対応付けられている。すなわち、交互に撮像された点灯画像および消灯画像のうち、注目する点灯画像と、当該撮像画像の直後に撮像された消灯画像とから差分画像が生成される。   For example, for each frame period of image display in the optical sensor built-in LCD 11, the touch panel backlight 14 is turned on in the first half of the frame period, and the touch panel backlight 14 is turned off in the second half of the frame period. In this case, the optical sensor 12 outputs the image captured in the first half period as a lit image to the image adjustment unit 2 via the AD converter 15, and adjusts the image captured in the second half period as a extinguished image via the AD converter 15. Output to part 2. The lit image and the unlit image captured in the same frame period are associated as a pair of captured images for generating a difference image. That is, a difference image is generated from a noticed lighting image among the lighting images and the lighting images captured alternately and the lighting image captured immediately after the captured image.

感度調整部17は、各光センサ12の感度をユーザの指示または外光強度に応じて調整する。外光強度が強い環境下で光センサ12が飽和する場合、シャッター速度(露光時間)を変更するなど複雑な処理が必要となる。感度調整部17は、太陽光照射下(約10万ルクス)でも、光センサ12が飽和しないように光センサ12の感度を調整する。なお、感度調整部17の感度は、予め設定されていてもよい。また、外光強度とは、指示物体(撮像対象)の周囲の光の強度である。   The sensitivity adjustment unit 17 adjusts the sensitivity of each optical sensor 12 according to a user instruction or external light intensity. When the optical sensor 12 is saturated in an environment where the external light intensity is strong, complicated processing such as changing the shutter speed (exposure time) is required. The sensitivity adjustment unit 17 adjusts the sensitivity of the optical sensor 12 so that the optical sensor 12 is not saturated even under sunlight irradiation (about 100,000 lux). The sensitivity of the sensitivity adjustment unit 17 may be set in advance. The external light intensity is the intensity of light around the pointing object (imaging target).

(光センサ内蔵LCD11の詳細)
図2は、光センサ内蔵LCD11の構成を示す断面図である。図1および図2に示すように、光センサ内蔵LCD11は、複数の光センサ12、表示用バックライト13およびタッチパネル用バックライト(照明部)14を備えている。
(Details of LCD 11 with built-in optical sensor)
FIG. 2 is a cross-sectional view showing the configuration of the optical sensor built-in LCD 11. As shown in FIGS. 1 and 2, the LCD 11 with a built-in photosensor includes a plurality of photosensors 12, a display backlight 13, and a touch panel backlight (illumination unit) 14.

光センサ12は、例えば、光センサ内蔵LCD11のアクティブマトリクス基板上において、マトリクス状に配置されており、光センサ内蔵LCD11の各画素に対して1つずつ設けられている。光センサ12の配置様式および個数は、上述のものに限定されず、適宜変更してもよい。   For example, the photosensors 12 are arranged in a matrix on the active matrix substrate of the photosensor built-in LCD 11, and one photosensor 12 is provided for each pixel of the photosensor built-in LCD 11. The arrangement pattern and the number of the optical sensors 12 are not limited to those described above, and may be changed as appropriate.

この光センサ12は、近赤外(波長:約750〜2500nm)または近紫外(波長:約200〜380nm)領域の波長の光を主に受光するものである。その理由は、後述するようにタッチパネル用バックライト14が、近赤外または近紫外領域の波長の光を出射するからであり、このタッチパネル用バックライト14が出射する光を主に受光できるようになっている。光センサ12は、近赤外光または近紫外光のみに反応するわけではなく、他の波長の光にも多少は反応してもよい。   The optical sensor 12 mainly receives light having a wavelength in the near infrared (wavelength: about 750 to 2500 nm) or near ultraviolet (wavelength: about 200 to 380 nm) region. The reason is that, as will be described later, the touch panel backlight 14 emits light having a wavelength in the near-infrared or near-ultraviolet region, so that the light emitted from the touch panel backlight 14 can be mainly received. It has become. The optical sensor 12 does not react only to near-infrared light or near-ultraviolet light, and may react somewhat to light of other wavelengths.

光センサ12で取得した信号は、ADコンバータ15によりデジタル化された後、画像調整部2へ出力される。   The signal acquired by the optical sensor 12 is digitized by the AD converter 15 and then output to the image adjustment unit 2.

光センサ内蔵LCD11は、R(赤)・G(緑)・B(青)の絵素を有するカラーフィルタを備える液晶パネル(不図示)を備えている。表示用バックライト13は、この液晶パネルの背面から当該液晶パネルに光を照射する光源である。なお、R・G・Bの3つの絵素により1つの画素が形成されている。   The optical sensor built-in LCD 11 includes a liquid crystal panel (not shown) including a color filter having R (red), G (green), and B (blue) picture elements. The display backlight 13 is a light source that irradiates light to the liquid crystal panel from the back surface of the liquid crystal panel. One pixel is formed by three picture elements of R, G, and B.

タッチパネル用バックライト14は、指示物体に対して光を照射する照明装置であり、タイミング制御部16から出力される同期信号に従い所定の時間間隔で点灯/消灯を繰り返す。すなわち、タッチパネル用バックライト14は、指示物体への光照射を所定の時間間隔で行う。   The touch panel backlight 14 is an illuminating device that irradiates light to the pointing object, and repeats lighting / extinguishing at predetermined time intervals in accordance with a synchronization signal output from the timing control unit 16. That is, the touch panel backlight 14 irradiates the pointing object with light at predetermined time intervals.

このタッチパネル用バックライト14は、近赤外または近紫外領域の波長の光を出射する。近赤外または近紫外領域の波長の光は、可視光(波長:約380nm〜750nm)を利用する液晶パネルの表示に与える影響が少ないとともに、可視光と同様に指などの指示物体に効率良く反射する。それゆえ、近赤外または近紫外領域の波長の光を出射することにより、液晶パネルの表示を見やすくできるとともに、指示物体の検出精度を高めることができる。また、近赤外または近紫外光を用いることにより、蛍光灯(可視光)や太陽光(近紫外光、可視光および近赤外光の全てを含む)などの明るい環境で光センサ12をなるべく飽和せずに耐えられるようにすることができる。   The touch panel backlight 14 emits light having a wavelength in the near infrared or near ultraviolet region. Light in the near-infrared or near-ultraviolet region has little effect on the display of a liquid crystal panel that uses visible light (wavelength: about 380 nm to 750 nm), and is efficient for pointing objects such as fingers as well as visible light. reflect. Therefore, by emitting light having a wavelength in the near-infrared or near-ultraviolet region, the display on the liquid crystal panel can be easily seen and the detection accuracy of the pointing object can be increased. Further, by using near-infrared light or near-ultraviolet light, the optical sensor 12 is preferably used in a bright environment such as a fluorescent lamp (visible light) or sunlight (including all of near-ultraviolet light, visible light, and near-infrared light). It can be made to withstand without saturating.

表示用バックライト13およびタッチパネル用バックライト14の構成および配置は、公知のものでよい。例えば、表示用バックライト13およびタッチパネル用バックライト14の光源として冷陰極管またはLED(Light Emitting Diode)を用いることができる。導光板の側面にこれらの光源を配置し、導光板の上面から光をバックライト光として出射するエッジライト方式を用いてもよい。また、導光板の背面側に光源を配置し、導光板の上面から光をバックライト光として出射する直下型方式を用いてもよい。   The configuration and arrangement of the display backlight 13 and the touch panel backlight 14 may be known ones. For example, a cold cathode tube or an LED (Light Emitting Diode) can be used as the light source of the display backlight 13 and the touch panel backlight 14. You may use the edge light system which arrange | positions these light sources on the side surface of a light-guide plate, and radiate | emits light as backlight light from the upper surface of a light-guide plate. Further, a direct type system in which a light source is disposed on the back side of the light guide plate and light is emitted as backlight light from the upper surface of the light guide plate may be used.

表示用バックライト13およびタッチパネル用バックライト14を別々に形成し、これらのバックライトを、バックライト光の出射方向において重ねてもよい。   The display backlight 13 and the touch panel backlight 14 may be formed separately, and these backlights may be stacked in the emission direction of the backlight light.

また、表示用バックライト13およびタッチパネル用バックライト14の導光板を共有してもよい。例えば、表示用バックライト13用の光源として白色LEDを導光板の側面に沿って配列し、タッチパネル用バックライト14用の光源として近赤外LEDを導光板の背面側に2次元的に配置してもよい。また、逆に白色LEDを導光板の背面側に設け、近赤外LEDを導光板の側面側に設けてもよい。   Further, the light guide plates of the display backlight 13 and the touch panel backlight 14 may be shared. For example, white LEDs are arranged along the side of the light guide plate as a light source for the display backlight 13, and near infrared LEDs are two-dimensionally arranged on the back side of the light guide plate as a light source for the backlight 14 for the touch panel. May be. Conversely, a white LED may be provided on the back side of the light guide plate, and a near infrared LED may be provided on the side surface side of the light guide plate.

(主制御部20の構成)
主制御部20は、画像調整部2、外光強度算出部3、第1平滑化画像生成部4a、第2平滑化画像生成部4b、第1差分画像生成部5a、第2差分画像生成部5b、第1タッチ位置検出部6a、第2タッチ位置検出部6bおよびアプリケーション実行部7を備えている。
(Configuration of main control unit 20)
The main control unit 20 includes an image adjustment unit 2, an external light intensity calculation unit 3, a first smoothed image generation unit 4a, a second smoothed image generation unit 4b, a first difference image generation unit 5a, and a second difference image generation unit. 5b, a first touch position detection unit 6a, a second touch position detection unit 6b, and an application execution unit 7.

画像調整部2は、タッチパネル部10で撮像された撮像画像(点灯画像および消灯光画像)のゲインおよびオフセットを調整するキャリブレーション処理などを行い、調整した撮像画像を外光強度算出部3へ出力する。これ以降の説明では、8bit、256階調の精度でグレースケールの画像が出力されたものとして説明する。なお、画像調整部2はタッチパネル部10から点灯画像および消灯光画像を取得する取得部としても機能している。   The image adjustment unit 2 performs a calibration process for adjusting the gain and offset of the captured images (lighted image and extinguished light image) captured by the touch panel unit 10, and outputs the adjusted captured image to the external light intensity calculation unit 3. To do. In the following description, it is assumed that a grayscale image is output with an accuracy of 8 bits and 256 gradations. The image adjustment unit 2 also functions as an acquisition unit that acquires a lighting image and a light-off image from the touch panel unit 10.

外光強度算出部3は、画像調整部2から出力された点灯画像または消灯光画像を用いて、点灯画像または消灯画像が撮像された時点における指示物体の周囲の光強度である外光強度を算出する。例えば、外光強度算出部3は、光センサ12から出力された、受光量を示す出力値(画素値)の少なくとも一部の出力値を、その出力値が高い順に並べた場合の所定の順位にある出力値を外光強度として採用する。   The external light intensity calculation unit 3 uses the lighting image or the extinguishing light image output from the image adjustment unit 2 to calculate the external light intensity that is the light intensity around the pointing object when the lighting image or the extinguishing image is captured. calculate. For example, the external light intensity calculation unit 3 has a predetermined order when at least a part of output values (pixel values) output from the optical sensor 12 and indicating the amount of received light are arranged in descending order of the output values. The output value at is used as the external light intensity.

つまり、外光強度算出部3は、光センサ12が取得した撮像画像について、当該撮像画像が有する画素の画素値を大きい順に並べた場合の、画素値と当該画素値を有する画素の個数との関係を示すヒストグラムを作成する。このヒストグラムは、撮像画像の全画素の画素値から作成するのが好ましい。しかし、コストや処理速度の観点から、撮像画像を構成する全ての画素から求めるのではなく、撮像画像の画素値から、ある程度間隔をあけて等間隔に選択された画素を用いてもよい。   That is, the external light intensity calculation unit 3 calculates the pixel value and the number of pixels having the pixel value when the pixel values of the pixels of the captured image are arranged in descending order with respect to the captured image acquired by the optical sensor 12. Create a histogram showing the relationship. This histogram is preferably created from the pixel values of all the pixels of the captured image. However, from the viewpoint of cost and processing speed, instead of obtaining from all the pixels constituting the captured image, pixels selected at regular intervals from the pixel values of the captured image may be used.

また、外光強度算出部3は、撮像画像内のサンプル点をとる領域を限定し、限定された各領域内の画素の画素値の平均値を求めて、平均値が一番高い値を外光強度として採用するようにしてもよい。このように撮像画像から外光強度を算出する方法として、どのような方法を用いてもよい。   Further, the external light intensity calculation unit 3 limits the area where the sample point is taken in the captured image, obtains the average value of the pixel values of the pixels in each limited area, and sets the average value to the highest value. You may make it employ | adopt as light intensity. As described above, any method may be used as a method for calculating the external light intensity from the captured image.

なお、光センサ内蔵LCD11の内部または外部に照度センサを装備して外光強度を測定してもよいが、光センサ12に入射する光の強度を正確に算出するためには、光センサ12で取得した画像から算出することが好ましい。上記照度センサは、可視光の強さを測定するものであってもよいし、赤外光の強さを測定するものであってもよい。すなわち、外光強度は、可視光の強さであってもよいし、赤外光の強さであってもよい。   Note that the illuminance sensor may be provided inside or outside the LCD 11 with the optical sensor to measure the intensity of the external light. However, in order to accurately calculate the intensity of the light incident on the optical sensor 12, the optical sensor 12 may be used. It is preferable to calculate from the acquired image. The illuminance sensor may measure the intensity of visible light or may measure the intensity of infrared light. That is, the external light intensity may be the intensity of visible light or the intensity of infrared light.

ただし、撮像画像に影響を与える外光の強さを測定することが好ましいため、タッチパネル用バックライト14が出射する光(換言すれば、光センサ12が受光する光)と同じ波長領域を有する光の強さを外光強度として測定することが好ましい。すなわち、近赤外または近紫外領域の波長の光を外光強度として測定することが好ましい。   However, since it is preferable to measure the intensity of external light that affects the captured image, light having the same wavelength region as the light emitted from the touch panel backlight 14 (in other words, the light received by the optical sensor 12). It is preferable to measure the intensity as the external light intensity. That is, it is preferable to measure light having a wavelength in the near infrared or near ultraviolet region as the external light intensity.

第1平滑化画像生成部4aおよび第2平滑化画像生成部4bは、画像調整部2から出力された消灯画像を、平滑化フィルタとしての空間フィルタを用いて、点灯画像よりも平滑化した平滑化画像を生成する。画像調整のために点灯画像および消灯画像を平滑化することがあるが、このような平滑化とは別に消灯画像を平滑化する。そのため、消灯画像は点灯画像よりも顕著に平滑化される。   The first smoothed image generation unit 4a and the second smoothed image generation unit 4b are smoothed by smoothing the extinguished image output from the image adjustment unit 2 by using a spatial filter as a smoothing filter, rather than the lighting image. Generate a digitized image. Although the lit image and the unlit image may be smoothed for image adjustment, the unlit image is smoothed separately from such smoothing. Therefore, the unlit image is smoothed more significantly than the lit image.

このとき、第1・第2平滑化画像生成部4a・4bは、予め想定されている複数種類の指示物体に対応する複数段階の大きさの平滑化フィルタを用いて平滑化画像を生成する。各平滑化フィルタは、予め想定されている、指示物体の光センサ内蔵LCD11との接触部分の像(以下、接触部分像と称する)の大きさよりも小さい。この理由については後述する。   At this time, the first and second smoothed image generation units 4a and 4b generate a smoothed image using a plurality of stages of smoothing filters corresponding to a plurality of types of pointing objects assumed in advance. Each smoothing filter is smaller than the size of an image of a contact portion of the pointing object with the optical sensor built-in LCD 11 (hereinafter referred to as a contact portion image) that is assumed in advance. The reason for this will be described later.

また、第1・第2平滑化画像生成部4a・4bは、消灯画像における四隅のうちの一箇所から平滑化処理を開始し、1画素ずつ平滑化フィルタをずらしながら、消灯画像全体を平滑化する。   The first and second smoothed image generation units 4a and 4b start the smoothing process from one of the four corners of the unlit image, and smooth the entire unlit image while shifting the smoothing filter by one pixel. To do.

第1平滑化画像生成部4aと第2平滑化画像生成部4bとは、平滑化に用いる平滑化フィルタのサイズが互いに異なっている。それ以外は、同じ機能を有している。第1平滑化画像生成部4aは、指示物体が指であるとの想定のもとで、光センサ内蔵LCD11に接触した指腹の像よりも小さい平滑化フィルタを用いて消灯画像を平滑化する。第2平滑化画像生成部4bは、指示物体がペンであるとの想定のもとで、光センサ内蔵LCD11に接触したペン先の像よりも小さい平滑化フィルタを用いて消灯画像を平滑化する。   The first smoothed image generating unit 4a and the second smoothed image generating unit 4b are different from each other in the size of the smoothing filter used for smoothing. Other than that, it has the same function. The first smoothed image generating unit 4a smoothes the extinguished image using a smoothing filter smaller than the image of the finger pad touching the optical sensor built-in LCD 11 under the assumption that the pointing object is a finger. . Based on the assumption that the pointing object is a pen, the second smoothed image generating unit 4b smoothes the extinguished image using a smoothing filter smaller than the image of the pen tip in contact with the LCD 11 with a built-in optical sensor. .

すなわち、第1平滑化画像生成部4aと第2平滑化画像生成部4bとを1つの平滑化画像生成部として捉えた場合には、この平滑化画像生成部は、予め想定されている複数種類の指示物体に対応する複数段階の大きさの平滑化フィルタをそれぞれ用いて、1つの消灯画像から、予め想定されている指示物体の数に対応する数の平滑化画像を生成する。   That is, when the first smoothed image generating unit 4a and the second smoothed image generating unit 4b are regarded as one smoothed image generating unit, the smoothed image generating unit includes a plurality of types assumed in advance. Using the smoothing filters of a plurality of stages corresponding to each of the pointing objects, a number of smoothed images corresponding to the number of pointing objects assumed in advance are generated from one unlit image.

さらに、第1・第2平滑化画像生成部4a・4bは、外光強度を示す外光強度情報を外光強度算出部3から取得し、当該外光強度情報が示す外光強度に応じたサイズの平滑化フィルタを用いて消灯画像を平滑化する。図3は、外光強度(赤外強度)の変化と平滑化フィルタのサイズとの関係を示すグラフである。例えば、図3に示すように、指示物体として指が想定されている場合には、平滑化を行わないことも1段階として数えれば、0、3×3、5×5、7×7の4段階の平滑化フィルタを予め設定しておく。そして、第1平滑化画像生成部4aは、外光強度が増加するのに伴い、使用する平滑化フィルタのサイズを大きくする。この理由については後述する。   Further, the first and second smoothed image generation units 4a and 4b acquire the external light intensity information indicating the external light intensity from the external light intensity calculation unit 3, and according to the external light intensity indicated by the external light intensity information The extinguished image is smoothed using a size smoothing filter. FIG. 3 is a graph showing the relationship between the change in external light intensity (infrared intensity) and the size of the smoothing filter. For example, as shown in FIG. 3, when a finger is assumed as the pointing object, if smoothing is not counted as one step, 0, 3 × 3, 5 × 5, 7 × 7 4 A level smoothing filter is set in advance. Then, the first smoothed image generation unit 4a increases the size of the smoothing filter to be used as the external light intensity increases. The reason for this will be described later.

図4は、外光強度(赤外強度)の変化と平滑化フィルタのサイズとの別の関係を示すグラフである。なお、第1・第2平滑化画像生成部4a・4bは、図4に示すように、外光強度が所定の基準値を超えたかどうかを判定し、超えた場合にのみ所定のサイズの平滑化フィルタを用いて消灯画像を平滑化してもよい。同図では、赤外光の強度が中レベルを超えた場合に、7×7の平滑化フィルタを用いる例を示している。   FIG. 4 is a graph showing another relationship between the change in external light intensity (infrared intensity) and the size of the smoothing filter. As shown in FIG. 4, the first and second smoothed image generating units 4a and 4b determine whether or not the external light intensity exceeds a predetermined reference value. The extinguishing image may be smoothed using a smoothing filter. This figure shows an example in which a 7 × 7 smoothing filter is used when the intensity of infrared light exceeds a medium level.

同様に、指示物体としてペンが想定されている場合にも4段階の平滑化フィルタを予め設定しておく。ただし、各平滑化フィルタは、予め想定されている指示物体の接触部分像の大きさよりも小さいものであるため、この条件を満たすように平滑化フィルタの大きさを設定する。つまり、複数段階の平滑化フィルタのうち、最も大きい平滑化フィルタは、予め想定されている指示物体の接触部分像の大きさよりも小さい。なお、指の接触部分像の大きさは9×9、ペンの接触部分像の大きさは3×3であると想定されている。   Similarly, a four-stage smoothing filter is set in advance when a pen is assumed as the pointing object. However, since each smoothing filter is smaller than the size of the contact partial image of the pointing object assumed in advance, the size of the smoothing filter is set so as to satisfy this condition. That is, the largest smoothing filter among the smoothing filters in a plurality of stages is smaller than the size of the contact partial image of the pointing object that is assumed in advance. It is assumed that the size of the contact part image of the finger is 9 × 9, and the size of the contact part image of the pen is 3 × 3.

第1・第2平滑化画像生成部4a・4bは、平滑化した消灯画像と点灯画像との対応関係を示す情報を、生成した平滑化画像に付して、その平滑化画像を第1・第2差分画像生成部5a・5bへ出力する。   The first and second smoothed image generation units 4a and 4b attach information indicating the correspondence between the smoothed unlit image and the lit image to the generated smoothed image, and the smoothed image is displayed as the first and second smoothed images. It outputs to the 2nd difference image generation part 5a * 5b.

第1差分画像生成部5aおよび第2差分画像生成部5bは、点灯画像と第1・第2平滑化画像生成部4a・4bが生成した平滑化画像との差分を示す差分画像を生成する。具体的には、第1差分画像生成部5aは、画像調整部2から出力された点灯画像の各画素の画素値から、その点灯画像と対応付けられた平滑化画像(第1平滑化画像生成部4aによって平滑化された平滑化画像)における、点灯画像の各画素と対応する画素の画素値を差し引くことによって得られた画素値を各画素の画素値として有する差分画像を生成する。同様に、第2差分画像生成部5bは、画像調整部2から出力された点灯画像と第2平滑化画像生成部4bによって平滑化された平滑化画像とから差分画像を生成する。   The 1st difference image generation part 5a and the 2nd difference image generation part 5b generate | occur | produce the difference image which shows the difference of a lighting image and the smoothed image which the 1st, 2nd smoothed image generation part 4a * 4b produced | generated. Specifically, the first difference image generation unit 5a uses the pixel value of each pixel of the lighting image output from the image adjustment unit 2 to generate a smoothed image (first smoothing image generation) associated with the lighting image. In the smoothed image smoothed by the unit 4a), a difference image having a pixel value obtained by subtracting the pixel value of the pixel corresponding to each pixel of the lighting image as the pixel value of each pixel is generated. Similarly, the second difference image generation unit 5b generates a difference image from the lighting image output from the image adjustment unit 2 and the smoothed image smoothed by the second smoothed image generation unit 4b.

このとき、第1・第2差分画像生成部5a・5bは、生成した差分画像において、0より小さい画素値を有する画素の画素値を0に置換する。その理由については、後述する。   At this time, the first and second difference image generation units 5a and 5b replace the pixel value of the pixel having a pixel value smaller than 0 with 0 in the generated difference image. The reason will be described later.

第1差分画像生成部5aと第2差分画像生成部5bとを1つの機能ブロックとして捉えた場合には、この差分画像生成部は、点灯画像と、平滑化画像生成部が生成した複数の平滑化画像との差分をそれぞれ示す複数の差分画像を生成するといえる。   When the first difference image generation unit 5a and the second difference image generation unit 5b are regarded as one functional block, the difference image generation unit includes a lighting image and a plurality of smoothed images generated by the smoothed image generation unit. It can be said that a plurality of difference images each indicating a difference from the digitized image are generated.

第1タッチ位置検出部6aは、第1差分画像生成部5aが生成した差分画像に含まれる接触部分像の位置(タッチ位置)を検出する。第1平滑化画像生成部4aは、指示物体が指であるとの想定のもとで、光センサ内蔵LCD11に接触した指腹の像よりも小さい平滑化フィルタを用いて消灯画像を平滑化するため、第1タッチ位置検出部6aは、光センサ内蔵LCD11に接触した指腹の像を検出する処理を行う。   The first touch position detection unit 6a detects the position (touch position) of the contact partial image included in the difference image generated by the first difference image generation unit 5a. The first smoothed image generating unit 4a smoothes the extinguished image using a smoothing filter smaller than the image of the finger pad touching the optical sensor built-in LCD 11 under the assumption that the pointing object is a finger. Therefore, the first touch position detection unit 6a performs processing for detecting an image of the finger pad touching the optical sensor built-in LCD 11.

同様に第2タッチ位置検出部6bは、第2差分画像生成部5bが生成した差分画像に含まれる接触部分像の位置を検出する。第2平滑化画像生成部4bは、指示物体がペンであるとの想定のもとで、光センサ内蔵LCD11に接触したペン先の像よりも小さい平滑化フィルタを用いて消灯画像を平滑化するため、第2タッチ位置検出部6bは、光センサ内蔵LCD11に接触したペン先の像を検出する処理を行う。   Similarly, the second touch position detection unit 6b detects the position of the contact partial image included in the difference image generated by the second difference image generation unit 5b. Based on the assumption that the pointing object is a pen, the second smoothed image generating unit 4b smoothes the extinguished image using a smoothing filter smaller than the image of the pen tip in contact with the LCD 11 with a built-in optical sensor. Therefore, the second touch position detection unit 6b performs a process of detecting the image of the pen tip that is in contact with the optical sensor built-in LCD 11.

このように第1タッチ位置検出部6aと第2タッチ位置検出部6bとは、検出する対象が異なっている点を除けば、同じ機能を有している。光センサ内蔵LCD11に接触した指示物体が1種類の場合、第1タッチ位置検出部6aまたは第2タッチ位置検出部6bのいずれかがその像を検出することになる。それゆえ、第1タッチ位置検出部6aおよび第2タッチ位置検出部6bは、検出した像の位置を示す座標をアプリケーション実行部7へ出力するが、実際にアプリケーション実行部7へ出力される座標は、通常1つである。ただし、複数の指で光センサ内蔵LCD11がタッチされた場合には、複数の指腹の像の位置をそれぞれ示す複数の座標がアプリケーション実行部7へ出力される。   Thus, the 1st touch position detection part 6a and the 2nd touch position detection part 6b have the same function except the point from which the object to detect differs. When there is only one type of pointing object that touches the optical sensor built-in LCD 11, either the first touch position detection unit 6a or the second touch position detection unit 6b detects the image. Therefore, the first touch position detection unit 6a and the second touch position detection unit 6b output coordinates indicating the position of the detected image to the application execution unit 7, but the coordinates actually output to the application execution unit 7 are , Usually one. However, when the optical sensor built-in LCD 11 is touched with a plurality of fingers, a plurality of coordinates indicating the positions of the images of the plurality of finger pads are output to the application execution unit 7.

第1タッチ位置検出部6aおよび第2タッチ位置検出部6bにおけるタッチ位置検出方法として、公知の方法を用いればよい。その具体例については後述する。   A known method may be used as a touch position detection method in the first touch position detection unit 6a and the second touch position detection unit 6b. Specific examples thereof will be described later.

第1タッチ位置検出部6aと第2タッチ位置検出部6bとを1つの機能ブロックとして捉えた場合には、このタッチ位置検出部は、差分画像生成部が生成した複数の差分画像ごとに、当該差分画像のもとになった平滑化画像の生成に用いられた平滑化フィルタに対応する指示物体の接触部分像を検出するためのパターンをそれぞれ用いて、各差分画像に含まれる接触部分像の位置を検出するといえる。   When the first touch position detection unit 6a and the second touch position detection unit 6b are regarded as one functional block, the touch position detection unit performs the processing for each of the plurality of difference images generated by the difference image generation unit. Using the pattern for detecting the contact partial image of the pointing object corresponding to the smoothing filter used to generate the smoothed image that is the basis of the difference image, the contact partial image included in each difference image It can be said that the position is detected.

アプリケーション実行部7は、第1タッチ位置検出部6aまたは第2タッチ位置検出部6bが出力した座標を用いて、当該座標に対応したアプリケーションを実行するか、または、特定のアプリケーションにおいて、当該座標に対応した処理を行う。アプリケーション実行部7において実行されるアプリケーションはどのようなものであってもよい。   The application execution unit 7 executes an application corresponding to the coordinates using the coordinates output from the first touch position detection unit 6a or the second touch position detection unit 6b, or in a specific application, Perform the corresponding process. Any application executed in the application execution unit 7 may be used.

なお、予めどの種類の指示物体によって光センサ内蔵LCD11がタッチされるかを示す情報をユーザから受け付ける構成にする場合、または、指示物体の種類に応じた位置検出を行わない場合には、平滑化画像生成部、差分画像生成部およびタッチ位置検出部を、それぞれ1つずつ設ければよい。   In the case of the configuration that accepts information indicating whether the optical sensor built-LCD11 is touched by the advance which type of pointing object from the user, or, in the case of not performing the position detection in accordance with the type of pointing object is smoothed One image generation unit, one difference image generation unit, and one touch position detection unit may be provided.

また、予めどの種類の指示物体によって光センサ内蔵LCD11がタッチされるかを示す情報を取得しない場合でも、平滑化画像生成部、差分画像生成部およびタッチ位置検出部を1つずつ設け、これらの各部が、全種類の指示物体の像を検出するための処理を順次行ってもよい。ただし、この場合には処理時間がかかるため、本実施形態のように、指示物体の種類に応じた複数の処理を並行して行うことが好ましい。   Further, even if the light sensor-containing LCD11 in advance by any type of pointing object does not acquire information indicating whether the touch, smoothed image generating unit, one by one difference image generation unit and the touch position detection unit is provided, these Each unit may sequentially perform processing for detecting images of all types of pointing objects. However, in this case, since processing time is required, it is preferable to perform a plurality of processes according to the type of the pointing object in parallel as in the present embodiment.

(記憶部の詳細)
記憶部30は、主制御部20が実行する(1)各部の制御プログラム、(2)OSプログラム、(3)アプリケーションプログラム、および(4)これらプログラムを実行するときに読み出す各種データを記録するものである。記憶部30は、ハードディスク、フラッシュメモリなどの不揮発性の記憶装置によって構成される。
(Details of storage unit)
The storage unit 30 records (1) a control program for each unit, (2) an OS program, (3) an application program, and (4) various data to be read when the program is executed by the main control unit 20. It is. The storage unit 30 is configured by a nonvolatile storage device such as a hard disk or a flash memory.

一次記憶部31は、RAM(Random Access Memory)などの揮発性の記憶装置によって構成されるものであり、主制御部20が上述の各種プログラムを実行する過程でデータを一時的に保持するための作業領域として使用される。   The primary storage unit 31 is configured by a volatile storage device such as a RAM (Random Access Memory), and is used for temporarily holding data in the course of the main control unit 20 executing the various programs described above. Used as a work area.

(タッチ位置検出方法の例)
第1・第2タッチ位置検出部6a・6bにおけるタッチ位置検出処理の3つの具体例について説明する。
(Example of touch position detection method)
Three specific examples of the touch position detection processing in the first and second touch position detection units 6a and 6b will be described.

(第1の例)
第1の例では、特許文献1に記載されているように、第1・第2タッチ位置検出部6a・6bは、差分画像生成部が生成した差分画像から所定の値以上のエッジ強度を有する画素を抽出し、抽出した画素の集合が有する特徴とモデルパターンが示す特徴とを比較することにより、上記撮像パネルに接触した撮像対象の像の位置を検出する。
(First example)
In the first example, as described in Patent Document 1, the first and second touch position detection units 6a and 6b have edge strengths equal to or greater than a predetermined value from the difference image generated by the difference image generation unit. Pixels are extracted, and a feature of the extracted set of pixels is compared with a feature indicated by the model pattern, thereby detecting the position of the image of the imaging target in contact with the imaging panel.

具体的には、第1・第2タッチ位置検出部6a・6bは、注目画素の縦方向に隣接する画素の画素値と注目画素の画素値との勾配を示す縦方向勾配量および注目画素の横方向に隣接する画素の画素値と注目画素の画素値との勾配を示す横方向勾配量を算出する処理を差分画像の各画素について行う。そして、これら縦方向勾配量および横方向勾配量を用いて、明るさが急激に変化する部分であるエッジ画素を特定し、このエッジ画素における画素値の勾配を示すベクトルの集合を抽出する。このベクトルの集合が、上述の「所定の値以上のエッジ強度を有する画素の集合が有する特徴」に相当する。   Specifically, the first and second touch position detection units 6a and 6b are configured to detect the vertical gradient amount indicating the gradient between the pixel value of the pixel adjacent to the target pixel in the vertical direction and the pixel value of the target pixel and the target pixel. A process of calculating a horizontal gradient amount indicating the gradient between the pixel value of the pixel adjacent in the horizontal direction and the pixel value of the target pixel is performed for each pixel of the difference image. Then, by using the vertical gradient amount and the horizontal gradient amount, an edge pixel that is a portion where the brightness changes rapidly is specified, and a set of vectors indicating the gradient of the pixel value in the edge pixel is extracted. This set of vectors corresponds to the above-mentioned “features of a set of pixels having edge strengths equal to or greater than a predetermined value”.

各モデルパターンには、画素値の勾配を示すベクトルの情報(所定の特徴)が含まれており、第1・第2タッチ位置検出部6a・6bは、差分画像から抽出したベクトルの集合と、モデルパターンに含まれるベクトルの集合とをパターンマッチし、その一致度から検出対象の像が存在しているかどうかの判定を行う。具体的には、画素値の勾配方向が示された複数の画素からなる所定のモデルパターンと、差分画像から抽出した特徴量が示す勾配方向のパターンとをパターンマッチし、モデルパターンに含まれる勾配方向と一致した画素の数が所定数に達した領域を接触部分像として検出する。   Each model pattern includes vector information (predetermined features) indicating the gradient of the pixel value, and the first and second touch position detection units 6a and 6b include a set of vectors extracted from the difference image, Pattern matching is performed with a set of vectors included in the model pattern, and it is determined whether or not an image to be detected exists based on the degree of coincidence. Specifically, a predetermined model pattern composed of a plurality of pixels indicating the gradient direction of the pixel value and a pattern in the gradient direction indicated by the feature amount extracted from the difference image are pattern-matched, and the gradient included in the model pattern A region where the number of pixels matching the direction reaches a predetermined number is detected as a contact partial image.

この検出処理により、差分画像に含まれている像が、光センサ内蔵LCD11に接触した指示物体の像(タッチの像)なのか接触していない指示物体の像(非タッチの像)なのかの判定が行われていることになる。   By this detection processing, whether the image included in the difference image is the image of the pointing object that has touched the optical sensor built-in LCD 11 (touch image) or the image of the pointing object that has not touched (non-touch image) Judgment has been made.

また、各モデルパターンは、検出対象となる指示物体の大きさおよび形状に対応する形状および大きさを有している。指示物体が指およびペンである場合には、指腹検出用のモデルパターンと、ペン先検出用のモデルパターンとを予め記憶部30に格納しておく。   Each model pattern has a shape and size corresponding to the size and shape of the pointing object to be detected. When the pointing object is a finger and a pen, a model pattern for finger pad detection and a model pattern for pen tip detection are stored in the storage unit 30 in advance.

第1タッチ位置検出部6aは、指腹検出用のモデルパターンを用いてパターンマッチングを行い、指腹の像を検出する。一方、第2タッチ位置検出部6bは、ペン先検出用のモデルパターンを用いてパターンマッチングを行い、ペン先の像を検出する。   The first touch position detection unit 6a performs pattern matching using a model pattern for finger pad detection and detects a finger pad image. On the other hand, the second touch position detection unit 6b performs pattern matching using a model pattern for detecting the pen tip, and detects an image of the pen tip.

そして、第1・第2タッチ位置検出部6a・6bは、検出した像の重心座標(または中心座標)を算出し、その座標をタッチ位置としてアプリケーション実行部7へ出力する。   Then, the first and second touch position detection units 6a and 6b calculate barycentric coordinates (or center coordinates) of the detected images, and output the coordinates to the application execution unit 7 as touch positions.

(第2の例)
第2の例では、第1・第2タッチ位置検出部6a・6bは、差分画像から所定の値以上の画素値を有する画素を抽出し、抽出した画素によって形成される像の位置を、接触部分像の位置として検出する。具体的には、第1・第2タッチ位置検出部6a・6bは、差分画像に含まれる画素のうち、所定の閾値以上の画素値を有する画素を抽出する。差分画像における接触部分像は、背景よりもその画素値が大きいため、平均的な接触部分像を構成する画素の画素値の最低値を上記所定の閾値として設定することにより、接触部分像を抽出できる。
(Second example)
In the second example, the first and second touch position detection units 6a and 6b extract pixels having pixel values greater than or equal to a predetermined value from the difference image, and contact the positions of the images formed by the extracted pixels. It is detected as the position of the partial image. Specifically, the first and second touch position detection units 6a and 6b extract pixels having a pixel value equal to or greater than a predetermined threshold among the pixels included in the difference image. Since the contact partial image in the difference image has a larger pixel value than the background, the contact partial image is extracted by setting the minimum pixel value of the pixels constituting the average contact partial image as the predetermined threshold value. it can.

この抽出処理により、差分画像に含まれている像が、光センサ内蔵LCD11に接触した指示物体の像(タッチの像)なのか接触していない指示物体の像(非タッチの像)なのかの判定が行われていることになる。   By this extraction processing, whether the image included in the difference image is the image of the pointing object that has touched the LCD 11 with the optical sensor (touch image) or the image of the pointing object that has not touched (non-touch image) Judgment has been made.

そして、第1・第2タッチ位置検出部6a・6bは、抽出した画素によって形成される像の重心座標(または中心座標)を算出し、その座標をタッチ位置としてアプリケーション実行部7へ出力する。   Then, the first and second touch position detection units 6a and 6b calculate the barycentric coordinates (or center coordinates) of the image formed by the extracted pixels, and output the coordinates to the application execution unit 7 as touch positions.

(第3の例)
第3の例では、第1・第2タッチ位置検出部6a・6bは、特許文献2に記載されているように、差分画像を所定の値を境として二値化し、二値化した差分画像に含まれる像の位置を、接触部分像の位置として検出する。二値化のための閾値は、第2の例における閾値と同じものでよい。上記二値化とは、例えば、所定の閾値以上の画素値を有する画素を白にし、所定の閾値未満の画素値を有する画素を黒にすることである。
(Third example)
In the third example, as described in Patent Document 2, the first and second touch position detection units 6a and 6b binarize a difference image with a predetermined value as a boundary, and binarize the difference image. Is detected as the position of the contact partial image. The threshold for binarization may be the same as the threshold in the second example. The binarization means, for example, that a pixel having a pixel value equal to or greater than a predetermined threshold is white and a pixel having a pixel value less than the predetermined threshold is black.

この二値化処理により、差分画像に含まれている像が、光センサ内蔵LCD11に接触した指示物体の像(タッチの像)なのか接触していない指示物体の像(非タッチの像)なのかの判定が行われていることになる。   By this binarization processing, the image included in the difference image is an image of the pointing object that is in contact with the optical sensor built-in LCD 11 (touch image) or an image of the pointing object that is not in contact (non-touch image). It is determined whether or not.

第1・第2タッチ位置検出部6a・6bは、二値化した差分画像における白の領域を特定し、特定した白の領域の重心座標(または中心座標)を算出し、その座標をタッチ位置としてアプリケーション実行部7へ出力する。   The first and second touch position detection units 6a and 6b specify a white area in the binarized difference image, calculate barycentric coordinates (or center coordinates) of the specified white area, and use the coordinates as the touch position. To the application execution unit 7.

なお、第2・3の例では、指示物体の種類は判定できない。指示物体の種類を判定するためにモデルパターンを用いた像の検出を行ってもよい。具体的には、第1タッチ位置検出部6aは、差分画像から抽出した画素によって形成される像に対して、指腹検出用のモデルパターンを用いてパターンマッチングを行い、指腹の像を検出する。一方、第2タッチ位置検出部6bは、ペン先検出用のモデルパターンを用いてパターンマッチングを行い、ペン先の像を検出する。このとき使用するモデルパターンは、第1の例とは異なり、ベクトル情報は含まれておらず、像の形状および大きさを示すものである。   In the second and third examples, the type of the pointing object cannot be determined. Image detection using a model pattern may be performed in order to determine the type of the pointing object. Specifically, the first touch position detection unit 6a performs pattern matching on the image formed by the pixels extracted from the difference image using a model pattern for finger pad detection, and detects the finger pad image. To do. On the other hand, the second touch position detection unit 6b performs pattern matching using a model pattern for detecting the pen tip, and detects an image of the pen tip. Unlike the first example, the model pattern used at this time does not include vector information and indicates the shape and size of the image.

(差分画像を平滑化する理由)
次に、差分画像を平滑化する理由について説明する。図5(a)は、タッチ状態の指が静止している場合の差分画像の生成過程を示す図であり、図5(b)は、タッチ状態の指が移動した場合の差分画像の生成過程を示す図である。図6(a)は、非タッチ状態の指が静止している場合の差分画像の生成過程を示す図であり、図6(b)は、非タッチ状態の指が移動した場合の差分画像の生成過程を示す図である。
(Reason for smoothing the difference image)
Next, the reason for smoothing the difference image will be described. FIG. 5A is a diagram showing a difference image generation process when the touched finger is stationary, and FIG. 5B is a difference image generation process when the touched finger is moved. FIG. FIG. 6A is a diagram illustrating a difference image generation process when the finger in the non-touch state is stationary, and FIG. 6B is a diagram illustrating the difference image when the finger in the non-touch state is moved. It is a figure which shows a production | generation process.

指が光センサ内蔵LCD11に接触した状態(タッチ状態)で指が移動した場合には、差分画像に差分ノイズが発生するが、図5(b)に示すように、消灯画像(off画像)を平滑化した上で差分画像を生成すると差分ノイズが低減される。   When the finger moves while the finger is in contact with the optical sensor built-in LCD 11 (touched state), differential noise is generated in the differential image. However, as shown in FIG. 5B, the extinguished image (off image) is displayed. When the difference image is generated after smoothing, the difference noise is reduced.

指が光センサ内蔵LCD11に接触していない状態(非タッチ状態)で指が移動した場合にも、差分画像に差分ノイズが発生することがあるが、図6(b)に示すように、消灯画像(off画像)を平滑化した上で差分画像を生成すると差分ノイズが低減される。   Even when the finger moves in a state where the finger is not in contact with the optical sensor built-in LCD 11 (non-touch state), a difference noise may be generated in the difference image. However, as shown in FIG. When the difference image is generated after smoothing the image (off image), the difference noise is reduced.

ここで、この差分ノイズの低減効果を定量的に説明する。図7は、静止状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図8は、移動状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図9は、静止状態の指を撮像した消灯画像を平滑化して差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図10は、移動状態の指を撮像した消灯画像を平滑化して差分画像を生成し、所定の閾値以上の画素値を有する画素を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。   Here, the effect of reducing this differential noise will be described quantitatively. FIG. 7 shows the detection when the finger pad image is detected by generating a difference image without smoothing the extinguished image obtained by capturing the finger in a stationary state and extracting pixels having pixel values equal to or greater than a predetermined threshold. It is a graph which shows a result. FIG. 8 shows the detection when the image of the finger pad is detected by generating a differential image without smoothing the extinguished image obtained by capturing the moving finger and extracting pixels having pixel values equal to or greater than a predetermined threshold. It is a graph which shows a result. FIG. 9 shows a detection result when the image of the finger pad is detected by smoothing the extinguishing image obtained by capturing a finger in a stationary state and generating a differential image and extracting pixels having pixel values equal to or greater than a predetermined threshold. It is a graph to show. FIG. 10 shows a detection result when the image of the finger pad is detected by smoothing the extinguished image obtained by capturing the moving finger and generating a differential image and extracting pixels having pixel values equal to or greater than a predetermined threshold. It is a graph to show.

これらの図において、指が光センサ内蔵LCD11に接触している状態の結果(タッチ)と、指が光センサ内蔵LCD11に接触していない状態の結果(非タッチ)とを並べて示している。タッチおよび非タッチの結果において、「0lx」は、外光がない状態で点灯画像および消灯画像を撮像した場合の結果である。「低照度」は、外光強度が、タッチパネル用バックライト14の照明が指腹に反射した反射光の強度の1/2の場合の結果である。「中照度」は、外光強度が上記反射光の強度と等しい場合の結果である。「高照度」は、外光強度が上記反射光の強度の2倍の場合の結果である。   In these figures, a result (touch) in a state where the finger is in contact with the optical sensor built-in LCD 11 and a result (non-touch) in a state where the finger is not in contact with the optical sensor built-in LCD 11 are shown side by side. In the result of touch and non-touch, “0lx” is a result when a lit image and an unlit image are captured in the absence of external light. “Low illuminance” is a result when the external light intensity is ½ of the intensity of the reflected light reflected by the finger pad on the touch panel backlight 14. “Medium illuminance” is the result when the external light intensity is equal to the intensity of the reflected light. “High illuminance” is the result when the external light intensity is twice the intensity of the reflected light.

図11は、図7〜図10に示すグラフを説明するための図である。図7〜図10に示す各グラフにおいて、横軸は、図11に示すように、指腹の像を含む、差分画像の横方向の一列分の画素の列における各画素の位置を示している。縦軸は、各画素の画素値を示している。また、画素値「100」をタッチと非タッチとを判定するための閾値としている。すなわち、画素値が100以上の画素は、接触部分像を形成する画素として認識される。このタッチ位置の検出方法は、上述の第2の例に相当する。   FIG. 11 is a diagram for explaining the graphs shown in FIGS. 7 to 10. In each graph shown in FIGS. 7 to 10, the horizontal axis indicates the position of each pixel in the horizontal row of pixels of the difference image including the image of the finger pad as shown in FIG. 11. . The vertical axis indicates the pixel value of each pixel. Further, the pixel value “100” is set as a threshold value for determining whether touch or non-touch. That is, a pixel having a pixel value of 100 or more is recognized as a pixel that forms a contact partial image. This touch position detection method corresponds to the second example described above.

また、消灯画像に含まれる接触部分像のサイズは9×9であり、消灯画像の平滑化に用いられる平滑化フィルタのサイズは3×3である。すなわち、接触部分像のサイズよりも小さいサイズの平滑化フィルタが用いられている。また、使用した平滑化フィルタは、平均値フィルタである。   The size of the contact partial image included in the unlit image is 9 × 9, and the size of the smoothing filter used for smoothing the unlit image is 3 × 3. That is, a smoothing filter having a size smaller than the size of the contact partial image is used. The smoothing filter used is an average value filter.

図7および図9に示すように、指が静止状態であれば、外光強度にかかわらず、タッチ/非タッチの識別は問題なく行われる。しかし、図8に示すように、指が移動した場合には、高照度の場合に、実際には非タッチであるが、閾値を超える画素値を有する画素(高輝度画素)が発生する。この場合には、光センサ内蔵LCD11に接触していない指の像が、接触している指の像として認識されてしまう。   As shown in FIGS. 7 and 9, when the finger is stationary, touch / non-touch identification is performed without any problem regardless of the external light intensity. However, as shown in FIG. 8, when the finger moves, a pixel (high luminance pixel) having a pixel value exceeding the threshold value is generated, although it is actually non-touch in the case of high illuminance. In this case, an image of a finger not in contact with the optical sensor built-in LCD 11 is recognized as an image of a finger in contact.

これに対して、図10に示すように、消灯画像を平滑化すれば、指が移動した場合に発生する高輝度画素の数が、平滑化しない場合よりも抑制される。なお、図10に示す結果では、非タッチの場合の高輝度画素を0にはできていないが、これは本発明の効果を否定するものではない。高輝度画素が検出されても、その数が少ない場合には、高輝度画素からなる像が、重心座標算出処理の対象とはならないため、最終的にタッチ位置は算出されないからである。   On the other hand, as shown in FIG. 10, if the extinguished image is smoothed, the number of high-luminance pixels generated when the finger moves is suppressed as compared with the case where the finger is not smoothed. In the result shown in FIG. 10, the high-luminance pixel in the case of non-touch is not set to 0, but this does not deny the effect of the present invention. This is because, even if high-luminance pixels are detected, if the number is small, an image composed of the high-luminance pixels is not an object of the center-of-gravity coordinate calculation process, so that the touch position is not finally calculated.

同様の効果が、タッチ位置の検出方法の第1の例を採用した場合にも得られる。図12は、静止状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図13は、移動状態の指を撮像した消灯画像を平滑化せずに差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図14は、静止状態の指を撮像した消灯画像を平滑化して差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。図15は、移動状態の指を撮像した消灯画像を平滑化して差分画像を生成し、エッジ特徴を抽出することで指腹の像を検出した場合の検出結果を示すグラフである。   A similar effect can be obtained when the first example of the touch position detection method is adopted. FIG. 12 is a graph showing a detection result when a finger pad image is detected by generating a difference image without smoothing the extinguishing image obtained by capturing a finger in a stationary state and extracting an edge feature. FIG. 13 is a graph showing a detection result when a finger pad image is detected by generating a difference image without smoothing an extinguishing image obtained by capturing a moving finger and extracting an edge feature. FIG. 14 is a graph showing a detection result when a finger pad image is detected by smoothing an extinguished image obtained by capturing a finger in a stationary state, generating a difference image, and extracting an edge feature. FIG. 15 is a graph showing a detection result when a finger pad image is detected by smoothing an extinguished image obtained by capturing a moving finger and generating a difference image and extracting an edge feature.

図12〜図15に示した結果を得るに至った撮像条件および平滑化条件は、図7〜図10に示した結果を得るに至った撮像条件および平滑化条件と同じである。   The imaging conditions and smoothing conditions that resulted in the results shown in FIGS. 12 to 15 are the same as the imaging conditions and smoothing conditions that resulted in the results shown in FIGS.

図12〜図15に示す結果では、指腹の像の外縁部分を示す特徴量が抽出される。それゆえ、指腹を横切る画素の列を抽出すると、2つのピークが検出される。図12〜図15に示すグラフの縦軸は、エッジ強度(注目画素の画素値と注目画素に隣接する画素の画素値との勾配を示す値)である。   In the results shown in FIGS. 12 to 15, the feature quantity indicating the outer edge portion of the finger pad image is extracted. Therefore, when extracting a row of pixels across the finger pad, two peaks are detected. The vertical axis of the graphs shown in FIGS. 12 to 15 represents edge strength (a value indicating the gradient between the pixel value of the target pixel and the pixel value of a pixel adjacent to the target pixel).

図12および図14に示すように、指が静止状態であれば、外光強度にかかわらず、タッチ/非タッチの識別は問題なく行われる。しかし、図13に示すように、指が移動した場合には、中照度および高照度の場合に、実際には非タッチであるが、閾値を超えるエッジ強度を有する画素(エッジ画素)が発生する。この場合には、光センサ内蔵LCD11に接触していない指の像が、接触している指の像として認識されてしまう。   As shown in FIGS. 12 and 14, when the finger is stationary, touch / non-touch identification is performed without any problem regardless of the external light intensity. However, as shown in FIG. 13, when the finger moves, in the case of medium illuminance and high illuminance, pixels that are actually non-touched but have edge strength exceeding the threshold (edge pixels) are generated. . In this case, an image of a finger not in contact with the optical sensor built-in LCD 11 is recognized as an image of a finger in contact.

これに対して、図15に示すように、消灯画像を平滑化すれば、指が移動した場合に発生するエッジ画素の数が、平滑化しない場合よりも抑制される。なお、図15に示す結果では、非タッチの場合のエッジ画素を0にはできていないが、これは本発明の効果を否定するものではない。エッジ画素が検出されても、その数が少ない場合には、モデルパターンとの一致度が低くなるため、接触部分像とは認識されない。それゆえ、非タッチの場合のエッジ画素の数を低減することで、タッチ/非タッチの判別精度を高めることができる。   On the other hand, as shown in FIG. 15, if the extinguished image is smoothed, the number of edge pixels generated when the finger moves is suppressed as compared with the case where the finger is not smoothed. In the result shown in FIG. 15, the edge pixel in the case of non-touch is not set to 0, but this does not deny the effect of the present invention. Even if edge pixels are detected, if the number of edge pixels is small, the degree of coincidence with the model pattern is low, so that it is not recognized as a contact partial image. Therefore, touch / non-touch discrimination accuracy can be increased by reducing the number of edge pixels in the case of non-touch.

図8および図13の結果から分かるように、外光強度が小さい場合には、指が移動しても、閾値を超える差分ノイズが発生する可能性は低い。それゆえ、消灯画像を平滑化する処理を行うのは、外光強度が中照度以上になってからでよい。   As can be seen from the results of FIGS. 8 and 13, when the external light intensity is small, there is a low possibility that differential noise exceeding the threshold value is generated even if the finger moves. Therefore, the process of smoothing the extinguished image may be performed after the external light intensity becomes equal to or higher than the medium illuminance.

また、外光光度が大きくなると、それに伴って差分ノイズの発生も顕著になるため、外光強度の増加に伴って、使用する平滑化フィルタのサイズを大きくすることが好ましい。平滑化フィルタのサイズが大きくなれば、平滑化の効果は高まるからである。ただし、後述するように、平滑化フィルタのサイズは、接触部分像の大きさよりも小さいことが好ましい。   Further, since the occurrence of differential noise becomes conspicuous as the external light intensity increases, it is preferable to increase the size of the smoothing filter to be used as the external light intensity increases. This is because the smoothing effect increases as the size of the smoothing filter increases. However, as will be described later, the size of the smoothing filter is preferably smaller than the size of the contact partial image.

(平滑化フィルタを接触部分像よりも小さくする理由)
図16は、接触部分像のサイズと同じサイズの平滑化フィルタを用いて消灯画像を平滑化した例を示す図である。同図には、タッチの指示物体の像(接触部分像)が含まれている消灯画像の平滑化を行わずに生成した差分画像、接触部分像が含まれている消灯画像を平滑化フィルタを用いて平滑化した後に生成した差分画像、非タッチの指示物体の像が含まれている消灯画像の平滑化を行わずに生成した差分画像、非タッチの指示物体の像が含まれている消灯画像を平滑化した後に生成した差分画像が順に示されている。
(Reason for making the smoothing filter smaller than the contact partial image)
FIG. 16 is a diagram illustrating an example in which the extinguished image is smoothed using a smoothing filter having the same size as the size of the contact partial image. In the figure, a smoothing filter is applied to the difference image generated without smoothing the unlit image including the image of the touch pointing object (contact partial image), and the unlit image including the contact partial image. Difference image generated after smoothing using, non-touch pointed object image included non-touch pointed difference image generated without smoothing, non-touch pointed object image included Difference images generated after the image is smoothed are shown in order.

指示物体の像(接触部分像)のサイズは9×9であり、使用した平滑化フィルタのサイズも9×9である。また、同図の結果は、高照度の外光環境下で、移動した指を撮像した場合の結果である。各差分画像の下には、当該差分画像に対してタッチ位置検出処理を行った結果が示されている。   The size of the image of the pointing object (contact partial image) is 9 × 9, and the size of the smoothing filter used is 9 × 9. Moreover, the result of the same figure is a result at the time of image | photographing the moved finger | toe in a high illumination intensity external light environment. Below each difference image, the result of performing the touch position detection process on the difference image is shown.

消灯画像を平滑化すれば、差分ノイズが低減されるという効果が得られる反面、接触部分像の画素値が低下するという副作用が生じる。そのため、タッチ/非タッチの判定精度が高まるように、消灯画像を平滑化する程度(すなわち、平滑化フィルタのサイズ)を設定することが好ましい。   Smoothing the extinguished image has the effect of reducing differential noise, but has the side effect of reducing the pixel value of the contact partial image. Therefore, it is preferable to set the degree of smoothing the unlit image (that is, the size of the smoothing filter) so that the touch / non-touch determination accuracy is improved.

図16に示すように、接触部分像のサイズと同じサイズの平滑化フィルタを用いてタッチの消灯画像を平滑化した場合には、エッジ画素および高輝度画素ともに、その数がほぼ0になり、接触部分像の検出が困難な状態になる。   As shown in FIG. 16, when the touch-off image is smoothed using a smoothing filter having the same size as the size of the contact partial image, the number of edge pixels and high-luminance pixels is almost zero. It becomes difficult to detect the contact partial image.

一方、非タッチの指示物体の像が含まれている消灯画像を同じサイズの平滑化フィルタで平滑化すると、エッジ画素および高輝度画素ともに、その数が顕著に減少するが、エッジ画素については、その数が0にはなっていない。それゆえ、この例では、タッチの像は検出されず、非タッチの像がタッチの像として検出されることになる。   On the other hand, when the unlit image containing the image of the non-touch pointing object is smoothed with a smoothing filter of the same size, the number of both edge pixels and high luminance pixels is significantly reduced. The number is not zero. Therefore, in this example, a touch image is not detected, and a non-touch image is detected as a touch image.

このように、接触部分像のサイズと同じサイズの平滑化フィルタを用いて消灯画像を平滑化した場合には、タッチ/非タッチの判定精度が低下する可能性がある。そのため、接触部分像のサイズよりも小さいサイズの平滑化フィルタを用いて消灯画像を平滑化することが好ましい。   As described above, when the unlit image is smoothed using the smoothing filter having the same size as the size of the contact partial image, the touch / non-touch determination accuracy may be lowered. Therefore, it is preferable to smooth the extinguished image using a smoothing filter having a size smaller than the size of the contact partial image.

それゆえ、検出対象となる指示物体が複数想定されている場合には、各指示物体に対応したサイズの平滑化フィルタを予め用意しておくことが好ましい。図17は、指示物体に対応したサイズの平滑化フィルタを用いることの意義を説明するための図である。同図には、指腹の接触部分像とペン先の接触部分像とが含まれている消灯画像の平滑化を行わずに生成した差分画像、上記接触部分像が含まれている消灯画像の平滑化を行った後に生成した差分画像、非タッチの指腹の像と非タッチのペン先の像とが含まれている消灯画像の平滑化を行わずに生成した差分画像、上記非タッチの像が含まれている消灯画像の平滑化を行った後に生成した差分画像が順に示されている。   Therefore, when a plurality of pointing objects to be detected are assumed, it is preferable to prepare a smoothing filter having a size corresponding to each pointing object. FIG. 17 is a diagram for explaining the significance of using a smoothing filter having a size corresponding to the pointing object. The figure shows a difference image generated without smoothing the extinguishment image including the contact part image of the finger pad and the contact part image of the pen tip, and the extinguishing image containing the contact part image. The difference image generated after smoothing, the difference image generated without smoothing the unlit image containing the image of the non-touch finger pad and the image of the non-touch pen tip, the non-touch image The difference images generated after smoothing the extinguished image including the image are shown in order.

指腹の像のサイズは9×9であり、ペン先の像のサイズは3×3であり、使用した平滑化フィルタのサイズは3×3である。また、同図の結果は、高照度の外光環境下で、移動した指を撮像した場合の結果である。各差分画像の下には、当該差分画像に対してタッチ位置検出処理を行った結果が示されている。   The size of the finger pad image is 9 × 9, the size of the pen tip image is 3 × 3, and the size of the smoothing filter used is 3 × 3. Moreover, the result of the same figure is a result at the time of image | photographing the moved finger | toe in a high illumination intensity external light environment. Below each difference image, the result of performing the touch position detection process on the difference image is shown.

同図に示すように、ペン先の像を、当該像と同じサイズの平滑化フィルタで平滑化すると、タッチの像が検出されなくなる可能性が生じるとともに、非タッチの像がタッチの像として検出される可能性が高まる。それゆえ、複数の指示物体の像を検出する場合には、各指示物体に適したサイズの平滑化フィルタを使用することが好ましい。   As shown in the figure, if the pen tip image is smoothed with a smoothing filter of the same size as the image, there is a possibility that the touch image may not be detected, and the non-touch image is detected as the touch image. The possibility of being increased. Therefore, when detecting images of a plurality of pointing objects, it is preferable to use a smoothing filter having a size suitable for each pointing object.

ただし、上述の説明は、平均値フィルタおよびメディアンフィルタなど、平滑化フィルタ内の重み付けがほぼ一定の平滑化フィルタを用いた場合の説明である。中央部分の重み付けが極端に大きい平滑化フィルタを用いる場合には、平滑化の程度は低いため、接触部分像のサイズよりも大きなサイズであっても上記副作用が生じる可能性は低い。この場合には、差分ノイズが低減される効果も小さくなる。それゆえ、効果と副作用とのバランスを考慮して平滑化フィルタの種類およびサイズを設定すればよい。   However, the above description is a case where a smoothing filter having a substantially constant weight in the smoothing filter, such as an average value filter and a median filter, is used. When a smoothing filter having an extremely large weight at the center portion is used, the degree of smoothing is low, and therefore the possibility of the above side effects is low even if the size is larger than the size of the contact portion image. In this case, the effect of reducing the differential noise is also reduced. Therefore, the type and size of the smoothing filter may be set in consideration of the balance between effects and side effects.

(平滑化フィルタの例)
図18(a)は、平均値フィルタの効果を説明するための図であり、図18(b)は、中間値フィルタの効果を説明するための図である。第1・第2平滑化画像生成部4a・4bが使用する平滑化フィルタ(空間フィルタ)は、例えば、平均値フィルタまたは中間値(中央値)フィルタである。図18(a)に示すように、平均値フィルタは、フィルタ内の画素の画素値の平均値を算出し、フィルタ内の各画素の画素値を、算出した平均値に置き換える。図18(b)に示すように、中間値フィルタは、フィルタ内の画素の画素値の中間値を算出し、フィルタ内の各画素の画素値を、算出した中間値に置き換える。
(Example of smoothing filter)
FIG. 18A is a diagram for explaining the effect of the average value filter, and FIG. 18B is a diagram for explaining the effect of the intermediate value filter. The smoothing filter (spatial filter) used by the first and second smoothed image generation units 4a and 4b is, for example, an average value filter or an intermediate value (median value) filter. As shown in FIG. 18A, the average value filter calculates the average value of the pixel values of the pixels in the filter, and replaces the pixel value of each pixel in the filter with the calculated average value. As shown in FIG. 18B, the intermediate value filter calculates the intermediate value of the pixel values of the pixels in the filter, and replaces the pixel value of each pixel in the filter with the calculated intermediate value.

第1・第2平滑化画像生成部4a・4bが使用する平滑化フィルタは、その他の平滑化フィルタでもよく、上述のものに限定されない。   The smoothing filters used by the first and second smoothed image generation units 4a and 4b may be other smoothing filters and are not limited to the above.

(差分画像において、0より小さい画素値をクリッピングする理由)
図19は、差分画像において、0より小さい画素値をクリッピングする理由を説明するための図である。同図では、タッチ位置検出方法の第1の例を用いた場合の結果(「エッジ」)と、タッチ位置検出方法の第2の例を用いた場合の結果(「画素値」)とにおいて、クリッピングを行った場合の結果と行わなかった場合の結果とを示している。各グラフの見方は、図7〜図15のグラフの見方と同じである。図19の例では、移動状態の指腹を高照度の外光環境下で撮像しており、消灯画像の平滑化は行っていない。
(Reason for clipping pixel values less than 0 in the difference image)
FIG. 19 is a diagram for explaining the reason for clipping a pixel value smaller than 0 in the difference image. In the figure, in the result (“edge”) when using the first example of the touch position detection method and the result (“pixel value”) when using the second example of the touch position detection method, The result when the clipping is performed and the result when the clipping is not performed are shown. Each graph is viewed in the same way as the graphs in FIGS. In the example of FIG. 19, the finger pad in a moving state is imaged under a high illuminance outside light environment, and the unlit image is not smoothed.

差分画像において、0より小さい画素値をクリッピングすることの効果は、タッチ位置検出方法の第1の例を用いた場合に得られる。第1の例では、画素値の勾配を、エッジを示す特徴として用いている。そのため、0より小さい画素値が存在すると、その画素により画素値の勾配が形成される。点灯画像から消灯画像を引くことによって生じるマイナスの画素値を有する画素は、接触部分像を形成するものではないため、マイナスの画素値を有する画素は、第1の例において差分ノイズとなる。   The effect of clipping a pixel value smaller than 0 in the difference image is obtained when the first example of the touch position detection method is used. In the first example, the gradient of the pixel value is used as a feature indicating an edge. Therefore, when a pixel value smaller than 0 exists, a gradient of the pixel value is formed by the pixel. Since a pixel having a negative pixel value generated by subtracting the unlit image from the lit image does not form a contact partial image, the pixel having a negative pixel value becomes differential noise in the first example.

「0クリッピングなし」の非タッチの「エッジ」の結果では、エッジ強度の高い画素が検出されているが、0クリッピングすることによりエッジ強度の高い画素が減少することが、「0クリッピングあり」の非タッチの「エッジ」の結果から分かる。   In the result of non-touch “edge” of “no clipping”, pixels with high edge strength are detected. However, “0 clipping” indicates that pixels with high edge strength are reduced by 0 clipping. It can be seen from the result of non-touch “edge”.

(タッチ位置検出装置1における処理の流れ)
図20は、タッチ位置検出装置1における処理の流れの一例を示すフローチャートである。まず、光センサ内蔵LCD11の光センサ12は、タイミング制御部16の制御下で、時間的に連続している撮像タイミングのうち、タッチパネル用バックライト14が点灯している第1撮像タイミングにおいて指示物体を撮像し、その撮像画像(すなわち、点灯画像)を画像調整部2へ出力する(S1)。
(Processing flow in the touch position detection apparatus 1)
FIG. 20 is a flowchart illustrating an example of a process flow in the touch position detection apparatus 1. First, the optical sensor 12 of the optical sensor built-in LCD 11 indicates the pointing object at the first imaging timing when the touch panel backlight 14 is lit among temporally continuous imaging timings under the control of the timing control unit 16. And the captured image (that is, the lighting image) is output to the image adjustment unit 2 (S1).

第1撮像タイミングの次の撮像タイミングである第2撮像タイミングでは、タッチパネル用バックライト14は消灯する。この状態で光センサ12は、指示物体を撮像し、その撮像画像(すなわち、消灯画像)を画像調整部2へ出力する(S2)。   At the second imaging timing which is the imaging timing next to the first imaging timing, the touch panel backlight 14 is turned off. In this state, the optical sensor 12 images the pointing object and outputs the captured image (that is, the extinguished image) to the image adjustment unit 2 (S2).

画像調整部2は、受信した点灯画像および消灯画像を調整し、調整したこれらの撮像画像を互いに対応付けて一次記憶部31に格納する(S3)。   The image adjustment unit 2 adjusts the received lit image and unlit image, and stores the adjusted captured images in the primary storage unit 31 in association with each other (S3).

次に外光強度算出部3は、一次記憶部31に格納された点灯画像または消灯画像から、上述したように外光強度を算出し、算出した外光強度を示す外光強度情報を第1平滑化画像生成部4aおよび第2平滑化画像生成部4bへ出力する(S4)。外光強度を測定するセンサから外光強度情報を取得する場合には、この時点の外光強度情報を取得してもよいし、撮像画像の撮像時の外光強度情報を取得してもよい。   Next, the external light intensity calculation unit 3 calculates the external light intensity from the lighting image or the extinguishing image stored in the primary storage unit 31 as described above, and first sets the external light intensity information indicating the calculated external light intensity. It outputs to the smoothed image generation part 4a and the 2nd smoothed image generation part 4b (S4). When acquiring ambient light intensity information from a sensor that measures ambient light intensity, ambient light intensity information at this time may be acquired, or ambient light intensity information at the time of capturing a captured image may be acquired. .

第1・第2平滑化画像生成部4a・4bは、受信した外光強度情報を所定の複数段階の閾値と比較し、外光強度に応じた平滑化フィルタを決定する(S5a・5b)。換言すれば、第1・第2平滑化画像生成部4a・4bは、外光強度に応じて消灯画像を平滑化するアルゴリズムを選択する。   The first and second smoothed image generation units 4a and 4b compare the received external light intensity information with a predetermined plurality of threshold levels, and determine a smoothing filter according to the external light intensity (S5a and 5b). In other words, the first and second smoothed image generation units 4a and 4b select an algorithm for smoothing the extinguished image according to the external light intensity.

このとき、第1平滑化画像生成部4aは、指示物体が指である場合に適したサイズの平滑化フィルタを決定し、第2平滑化画像生成部4b、指示物体がペンである場合に適したサイズの平滑化フィルタを決定する。   At this time, the first smoothed image generating unit 4a determines a smoothing filter having a size suitable for the case where the pointing object is a finger, and the second smoothed image generating unit 4b is suitable for the case where the pointing object is a pen. A smoothing filter of a certain size is determined.

第1・第2平滑化画像生成部4a・4bは、決定した平滑化フィルタを用いて、一次記憶部31に格納されている消灯画像を平滑化する。第1平滑化画像生成部4aは、生成した平滑化画像を第1差分画像生成部5aへ、第2平滑化画像生成部4bは、生成した平滑化画像を第2差分画像生成部5bへ出力する(S6a・6b)。   The first and second smoothed image generating units 4a and 4b smooth the extinguished image stored in the primary storage unit 31 using the determined smoothing filter. The first smoothed image generation unit 4a outputs the generated smoothed image to the first difference image generation unit 5a, and the second smoothed image generation unit 4b outputs the generated smoothed image to the second difference image generation unit 5b. (S6a, 6b).

第1・第2差分画像生成部5a・5bは、受信した平滑化画像に対応する点灯画像を一次記憶部31から取得し、その点灯画像と、受信した平滑化画像との差分をとることによって差分画像を生成する(S7a・7b)。このとき、第1・第2差分画像生成部5a・5bは、生成した差分画像において0より小さい画素値を有する画素の画素値を0に設定する。第1差分画像生成部5aは、生成した差分画像を第1タッチ位置検出部6aへ、第2差分画像生成部5bは、生成した差分画像を第2タッチ位置検出部6bへ出力する。   The first and second difference image generation units 5a and 5b obtain a lighting image corresponding to the received smoothed image from the primary storage unit 31, and obtain a difference between the lighting image and the received smoothed image. A difference image is generated (S7a, 7b). At this time, the first and second difference image generation units 5a and 5b set the pixel value of a pixel having a pixel value smaller than 0 in the generated difference image to 0. The first difference image generation unit 5a outputs the generated difference image to the first touch position detection unit 6a, and the second difference image generation unit 5b outputs the generated difference image to the second touch position detection unit 6b.

第1タッチ位置検出部6aは、受信した差分画像に含まれる、指の接触部分像を検出し、その位置を算出するための処理を行い(S8a)、算出した位置を示す座標をアプリケーション実行部7へ出力する(S9a)。   The first touch position detection unit 6a detects a finger contact partial image included in the received difference image, performs a process for calculating the position (S8a), and uses the coordinates indicating the calculated position as an application execution unit. 7 (S9a).

また、第2タッチ位置検出部6bは、受信した差分画像に含まれる、ペン先の接触部分像を検出し、その位置を算出するための処理を行い(S8b)、算出した位置を示す座標をアプリケーション実行部7へ出力する(S9b)。   In addition, the second touch position detection unit 6b detects a contact partial image of the pen tip included in the received difference image, performs a process for calculating the position (S8b), and calculates coordinates indicating the calculated position. It outputs to the application execution part 7 (S9b).

アプリケーション実行部7は、第1タッチ位置検出部6aまたは第2タッチ位置検出部6bから受信した座標に基づいて、当該座標に対応する処理を行う(S10)。   The application execution unit 7 performs processing corresponding to the coordinates based on the coordinates received from the first touch position detection unit 6a or the second touch position detection unit 6b (S10).

(タッチ位置検出装置1の効果)
以上のようにタッチ位置検出装置1では、消灯画像を平滑化することにより、指示物体が移動することによって生じる差分ノイズを低減でき、光センサ内蔵LCD11に接触した指示物体を精度高く検出できる。換言すれば、タッチ/非タッチの判定を精度高く行うことができる。
(Effect of the touch position detection device 1)
As described above, the touch position detection apparatus 1 can reduce the differential noise caused by the movement of the pointing object by smoothing the extinguished image, and can accurately detect the pointing object in contact with the LCD 11 with the built-in optical sensor. In other words, touch / non-touch determination can be performed with high accuracy.

〔実施の形態2〕
本発明の他の実施形態について図21〜図22に基づいて説明すれば、以下のとおりである。なお、実施の形態1と同様の部材に関しては、同じ符号を付し、その説明を省略する。図21は、本実施形態のタッチ位置検出装置40の構成を示す概略図である。同図に示すように、タッチ位置検出装置40の主制御部21は、タッチ位置検出装置1が外光強度算出部3を備えているのとは異なり、差分ノイズ判定部(差分画像判定部)8を備えている。
[Embodiment 2]
The following will describe another embodiment of the present invention with reference to FIGS. In addition, about the member similar to Embodiment 1, the same code | symbol is attached | subjected and the description is abbreviate | omitted. FIG. 21 is a schematic diagram illustrating a configuration of the touch position detection device 40 according to the present embodiment. As shown in the figure, the main control unit 21 of the touch position detection device 40 is different from the touch position detection device 1 having the external light intensity calculation unit 3 in that a differential noise determination unit (differential image determination unit). 8 is provided.

差分ノイズ判定部8は、画像調整部2から出力された点灯画像と消灯画像とから差分画像(判定用差分画像と称する)を生成し、生成した判定用差分画像(第2差分画像)において、予め想定されている指示物体の像の画素値よりも大きい画素値を有する画素(高輝度画素と称する)の数が、所定の数以上であるかどうかを判定する。高輝度画素は、点灯画像と消灯画像との差分をとることによって発生した差分ノイズである可能性が高い。それゆえ、高輝度画素が判定用差分画像に所定の数以上存在している場合に、差分ノイズが発生していると判定する。   The difference noise determination unit 8 generates a difference image (referred to as a determination difference image) from the lit image and the unlit image output from the image adjustment unit 2, and in the generated determination difference image (second difference image), It is determined whether or not the number of pixels (referred to as high luminance pixels) having a pixel value larger than the pixel value of the image of the pointing object assumed in advance is equal to or greater than a predetermined number. The high luminance pixel is highly likely to be differential noise generated by taking the difference between the lit image and the unlit image. Therefore, when a predetermined number or more of high-luminance pixels are present in the determination difference image, it is determined that differential noise has occurred.

第1平滑化画像生成部4aおよび第2平滑化画像生成部4bは、差分ノイズ判定部8が、上記画素の数が所定の数以上であると判定した場合にのみ消灯画像を平滑化する。この構成により、差分ノイズが発生していない場合に消灯画像を平滑化するという無駄な処理を行う可能性を低減できる。   The first smoothed image generation unit 4a and the second smoothed image generation unit 4b smooth the unlit image only when the difference noise determination unit 8 determines that the number of pixels is equal to or greater than a predetermined number. With this configuration, it is possible to reduce the possibility of performing a useless process of smoothing the extinguished image when no differential noise occurs.

なお、第1平滑化画像生成部4aおよび第2平滑化画像生成部4bは、高輝度画素の数に応じて、使用する平滑化フィルタのサイズを変更してもよい。より具体的には、差分画像における高輝度画素の数が増えるに従って、使用する平滑化フィルタのサイズを段階的に大きくしてもよい。   The first smoothed image generation unit 4a and the second smoothed image generation unit 4b may change the size of the smoothing filter to be used according to the number of high luminance pixels. More specifically, the size of the smoothing filter to be used may be increased stepwise as the number of high luminance pixels in the difference image increases.

また、タッチ位置検出装置40にも外光強度算出部3を設け、差分ノイズ判定部8が、上記画素の数が所定の数以上であると判定した場合に、外光強度算出部3が算出した外光強度に応じて使用する平滑化フィルタのサイズを選択してもよい。   Further, the external light intensity calculation unit 3 is also provided in the touch position detection device 40, and the external light intensity calculation unit 3 calculates when the difference noise determination unit 8 determines that the number of pixels is equal to or greater than a predetermined number. The size of the smoothing filter to be used may be selected according to the outside light intensity.

(タッチ位置検出装置40における処理の流れ)
次に、タッチ位置検出装置40における処理の流れの一例について説明する。図22は、タッチ位置検出装置40における処理の流れの一例を示すフローチャートである。ステップS11〜S12は、上述のステップS1〜S3と同じため、その説明を省略する。
(Processing flow in the touch position detection device 40)
Next, an example of a processing flow in the touch position detection device 40 will be described. FIG. 22 is a flowchart illustrating an example of a process flow in the touch position detection device 40. Since steps S11 to S12 are the same as steps S1 to S3 described above, description thereof is omitted.

ステップS13において、画像調整部2は、点灯画像および消灯画像を調整し、調整した点灯画像および消灯画像を差分ノイズ判定部8へ送信するとともに、一次記憶部31に格納する(S13)。   In step S13, the image adjustment unit 2 adjusts the lit image and the unlit image, and transmits the adjusted lit image and unlit image to the differential noise determination unit 8 and stores them in the primary storage unit 31 (S13).

差分ノイズ判定部8は、点灯画像および消灯画像を受信すると、これらの画像の差分をとることにより判定用差分画像を生成し、一次記憶部31に格納する(S14)。   When the difference noise determination unit 8 receives the lit image and the unlit image, the difference noise determination unit 8 generates a determination difference image by taking the difference between these images, and stores it in the primary storage unit 31 (S14).

そして、差分ノイズ判定部8は、生成した判定用差分画像において、高輝度画素の数が、所定の数以上であるかどうかを判定する(S15)。   And the difference noise determination part 8 determines whether the number of high-intensity pixels is more than predetermined number in the produced | generated difference image for a determination (S15).

高輝度画素の数が、所定の数以上であると判定した場合(S15にて、YES)、差分ノイズ判定部8は、平滑化画像を生成するよう命じる平滑化画像生成命令を第1平滑化画像生成部4aおよび第2平滑化画像生成部4bへ出力する。   If it is determined that the number of high-luminance pixels is equal to or greater than the predetermined number (YES in S15), difference noise determination unit 8 performs first smoothing on a smoothed image generation command that instructs to generate a smoothed image. It outputs to the image generation part 4a and the 2nd smoothed image generation part 4b.

平滑化画像生成命令を受信すると、第1平滑化画像生成部4aおよび第2平滑化画像生成部4bは、それぞれ一次記憶部31から消灯画像を取得し、この消灯画像から上述のように平滑化画像を生成する(S16)。   When the smoothed image generation command is received, the first smoothed image generating unit 4a and the second smoothed image generating unit 4b each acquire the extinguished image from the primary storage unit 31, and smoothing from the extinguished image as described above An image is generated (S16).

これ以降のステップS17〜S20は、上述のステップS7a・b〜S10と同様である。   Subsequent steps S17 to S20 are the same as steps S7a · b to S10 described above.

一方、高輝度画素の数が、所定の数より小さいと判定した場合(S15にて、NO)、差分ノイズ判定部8は、タッチ位置を検出することを命じるタッチ位置検出命令を第1タッチ位置検出部6aおよび第2タッチ位置検出部6bへ出力する。   On the other hand, if it is determined that the number of high-luminance pixels is smaller than the predetermined number (NO in S15), difference noise determination unit 8 issues a touch position detection command that instructs to detect the touch position to the first touch position. It outputs to the detection part 6a and the 2nd touch position detection part 6b.

タッチ位置検出命令を受信すると、第1タッチ位置検出部6aおよび第2タッチ位置検出部6bは、それぞれ一次記憶部31から判定用差分画像を取得し、この判定用差分画像における接触部分像の位置を検出する(S21)。   When the touch position detection command is received, the first touch position detection unit 6a and the second touch position detection unit 6b each obtain a determination difference image from the primary storage unit 31, and the position of the contact partial image in the determination difference image Is detected (S21).

そして、第1タッチ位置検出部6aおよび第2タッチ位置検出部6bのうち、接触部分像を検出したタッチ位置検出部は、検出した接触部分像の判定用差分画像における位置を示す座標をアプリケーション実行部7へ出力する(S22)。   Of the first touch position detection unit 6a and the second touch position detection unit 6b, the touch position detection unit that detects the contact partial image executes the application of coordinates indicating the position of the detected contact partial image in the determination difference image. It outputs to the part 7 (S22).

(タッチ位置検出装置40の効果)
以上のように、タッチ位置検出装置40では、平滑化処理を行う前に、点灯画像と消灯画像とから差分画像を生成し、この差分画像において、予め想定されている指示物体の像の画素値よりも大きい画素値を有する画素の数が、所定の数以上であるかどうかを判定する。それゆえ、消灯画像の平滑化が必ずしも必要でない、差分ノイズの発生レベルが低い状況において、消灯画像の平滑化処理を省略することができる。
(Effect of the touch position detection device 40)
As described above, the touch position detection device 40 generates a difference image from the lit image and the unlit image before performing the smoothing process, and the pixel value of the image of the pointing object assumed in advance in the difference image. It is determined whether the number of pixels having a larger pixel value is equal to or greater than a predetermined number. Therefore, the smoothing process of the unlit image can be omitted in a situation where the smoothing of the unlit image is not necessarily required and the generation level of the differential noise is low.

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

例えば、タッチパネル部10は、光センサ12が撮像した点灯画像および消灯画像の全てを画像調整部2へ出力してもよいし、点灯画像または消灯画像に変化が生じたかどうかを判定し、所定の閾値より大きい変化が生じた場合に点灯画像および消灯画像を画像調整部2へ出力してもよい。   For example, the touch panel unit 10 may output all of the lit image and the unlit image captured by the optical sensor 12 to the image adjustment unit 2, and determines whether or not a change has occurred in the lit image or unlit image. When a change larger than the threshold value occurs, the lit image and the unlit image may be output to the image adjustment unit 2.

また、光センサ12として可視光(波長:約380nm〜750nm)を受光する光センサ(可視光センサ)を設け、可視光を出射する表示用バックライト13を点灯/消灯させて、可視光センサにより点灯画像および消灯画像を上述のように撮像してもよい。   Further, an optical sensor (visible light sensor) that receives visible light (wavelength: about 380 nm to 750 nm) is provided as the optical sensor 12, and the display backlight 13 that emits visible light is turned on / off, and the visible light sensor is used. You may image a lighting image and a light extinction image as mentioned above.

また、上述したタッチ位置検出装置1・40の各ブロック、特に主制御部20・21は、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   In addition, each block of the touch position detection devices 1 and 40 described above, in particular, the main control units 20 and 21 may be configured by hardware logic, or may be realized by software using a CPU as follows. .

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

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−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 an optical disk such as a CD-ROM / MO / MD / DVD / CD-R. Card system such as IC card, IC card (including memory card) / optical card, or semiconductor memory system such as mask ROM / EPROM / EEPROM / flash ROM.

また、タッチ位置検出装置1・40を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR(high data rate)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   Further, the touch position detection devices 1 and 40 may be configured to be connectable to a communication network, and the program code may be supplied 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. Further, 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 (high data rate), 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 can also be expressed as follows.

すなわち、本発明の表示装置は、画像の表示と受光を同時または交互に行う表示装置において、表示面の裏面に配置された発光素子の発光、消灯を時間的に交互に繰返し、表示面の裏面に配置された発光素子を発光させないときに受光した画像を取得し、前記発光させないときに受光した画像を発光させたときに受光した画像より平滑化し、前記発光させたときに受光した画像より平滑化し、前記発光させたときに受光した画像から前記平滑化した画像を減算し差分画像を生成し、前記差分画像から表示面に接触または近接した状態および位置を検出する検出部とを備えることを特徴としている。   That is, the display device of the present invention is a display device that performs image display and light reception simultaneously or alternately, and alternately repeats light emission and extinction of light emitting elements arranged on the back surface of the display surface in time. An image received when the light emitting element arranged in the light source is not emitted is acquired, and an image received when the light emitting element is not emitted is smoothed from an image received when the light is emitted, and smoother than an image received when the light is emitted. And a detection unit that generates a difference image by subtracting the smoothed image from an image received when the light is emitted, and detects a state and a position in contact with or close to a display surface from the difference image. It is a feature.

差分ノイズによる影響を軽減することにより、外部の光環境に影響されず、安定したポインタ操作、タッチ操作ができるため、タッチパネル、入力装置等に適用することができる。特に、タッチパッド機能付き液晶などの入力機能付表示装置や、この表示装置を搭載した携帯電話機、パーソナルコンピュータ、PDAなどの情報機器に好適に適用することができる。   By reducing the influence of differential noise, a stable pointer operation and touch operation can be performed without being affected by the external light environment, and therefore, it can be applied to a touch panel, an input device, and the like. In particular, the present invention can be suitably applied to display devices with an input function such as a liquid crystal with a touch pad function, and information devices such as a mobile phone, a personal computer, and a PDA equipped with the display device.

1 タッチ位置検出装置
2 画像調整部(取得部)
4a 第1平滑化画像生成部
4b 第2平滑化画像生成部
5a 第1差分画像生成部
5b 第2差分画像生成部
6a 第1タッチ位置検出部
6b 第2タッチ位置検出部
8 差分ノイズ判定部(差分画像判定部)
10 タッチパネル部(撮像パネル)
12 光センサ(撮像素子)
13 表示用バックライト
14 タッチパネル用バックライト(照明部)
40 タッチ位置検出装置
DESCRIPTION OF SYMBOLS 1 Touch position detection apparatus 2 Image adjustment part (acquisition part)
4a 1st smoothed image generation part 4b 2nd smoothed image generation part 5a 1st difference image generation part 5b 2nd difference image generation part 6a 1st touch position detection part 6b 2nd touch position detection part 8 Difference noise determination part ( Difference image determination unit)
10 Touch panel (imaging panel)
12 Optical sensor (image sensor)
13 Display backlight 14 Touch panel backlight (illumination unit)
40 Touch position detection device

Claims (20)

撮像画像における撮像対象の像の位置を検出する位置検出装置であって、
撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得部と、
上記取得部が取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成部と、
上記点灯画像と上記平滑化画像生成部が生成した平滑化画像との差分を示す差分画像を生成する差分画像生成部と、
上記差分画像生成部が生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出部とを備えることを特徴とする位置検出装置。
A position detection device for detecting a position of an image to be imaged in a captured image,
A lighting image that is an image obtained by imaging the imaging object with the imaging panel in a state where light irradiation is performed on the imaging object from a side where the imaging panel is located, and the imaging object that is captured without the light irradiation. An image captured by a panel, and an acquisition unit that acquires a light-off image captured with a predetermined time difference from the lighting image;
A smoothed image generating unit that generates a smoothed image obtained by smoothing the extinguishing image acquired by the acquiring unit from the lighting image;
A difference image generation unit that generates a difference image indicating a difference between the lighting image and the smoothed image generated by the smoothed image generation unit;
A position detection device comprising: a position detection unit that detects a position of an image to be imaged that is in contact with the imaging panel and is included in the difference image generated by the difference image generation unit.
上記差分画像生成部は、生成した差分画像において、0より小さい画素値を有する画素の画素値を0に置換することを特徴とする請求項1に記載の位置検出装置。   The position detection device according to claim 1, wherein the difference image generation unit replaces a pixel value of a pixel having a pixel value smaller than 0 with 0 in the generated difference image. 上記平滑化画像生成部は、平滑化フィルタとしての空間フィルタを用いて上記消灯画像を平滑化することを特徴とする請求項1または2に記載の位置検出装置。   The position detection device according to claim 1, wherein the smoothed image generation unit smoothes the unlit image using a spatial filter as a smoothing filter. 上記平滑化画像生成部は、予め想定されている、上記撮像対象の上記撮像パネルとの接触部分の像の大きさよりも小さい平滑化フィルタを用いて上記消灯画像を平滑化することを特徴とする請求項1〜3のいずれか1項に記載の位置検出装置。   The smoothed image generation unit smoothes the extinguished image using a smoothing filter that is smaller than a size of an image of a contact portion with the imaging panel of the imaging target that is assumed in advance. The position detection apparatus of any one of Claims 1-3. 上記平滑化画像生成部は、予め想定されている複数種類の撮像対象に対応する複数段階の大きさの平滑化フィルタを用いて上記平滑化画像を生成することを特徴とする請求項1〜4のいずれか1項に記載の位置検出装置。   5. The smoothed image generation unit generates the smoothed image using a plurality of stages of smoothing filters corresponding to a plurality of types of imaging targets assumed in advance. The position detection device according to any one of the above. 上記平滑化画像生成部は、予め想定されている複数種類の撮像対象に対応する複数段階の大きさの平滑化フィルタをそれぞれ用いて1つの消灯画像から複数の平滑化画像を生成し、
上記差分画像生成部は、上記点灯画像と上記平滑化画像生成部が生成した複数の平滑化画像との差分をそれぞれ示す複数の差分画像を生成し、
上記位置検出部は、上記差分画像生成部が生成した複数の差分画像ごとに、当該差分画像のもとになった平滑化画像の生成に用いられた平滑化フィルタのサイズに対応する、上記撮像対象の像を検出するためのパターンをそれぞれ用いて、各差分画像に含まれる撮像対象の像の位置を検出することを特徴とする請求項5に記載の位置検出装置。
The smoothed image generation unit generates a plurality of smoothed images from one extinguished image using smoothing filters of a plurality of stages corresponding to a plurality of types of imaging targets assumed in advance,
The difference image generation unit generates a plurality of difference images each indicating a difference between the lighting image and the plurality of smoothed images generated by the smoothed image generation unit,
For each of the plurality of difference images generated by the difference image generation unit, the position detection unit corresponds to the size of the smoothing filter used to generate the smoothed image that is the basis of the difference image. The position detection apparatus according to claim 5, wherein the position of the image of the imaging target included in each difference image is detected using a pattern for detecting the target image.
上記平滑化画像生成部は、上記点灯画像または上記消灯画像が撮像された時点における上記撮像対象の周囲の光の強度である外光強度を示す外光強度情報を取得し、当該外光強度情報が示す外光強度が所定の基準値を超えた場合にのみ上記消灯画像を平滑化することを特徴とする請求項1〜5のいずれか1項に記載の位置検出装置。   The smoothed image generation unit acquires external light intensity information indicating external light intensity that is the intensity of light around the imaging target at the time when the lighting image or the extinguishing image is captured, and the external light intensity information 6. The position detection device according to claim 1, wherein the extinguishing image is smoothed only when the external light intensity indicated by exceeds a predetermined reference value. 上記平滑化画像生成部は、上記点灯画像または上記消灯画像が撮像された時点における上記撮像対象の周囲の光の強度である外光強度を示す外光強度情報を取得し、当該外光強度情報が示す外光強度に応じたサイズの平滑化フィルタを用いて上記消灯画像を平滑化することを特徴とする請求項1〜7のいずれか1項に記載の位置検出装置。   The smoothed image generation unit acquires external light intensity information indicating external light intensity that is the intensity of light around the imaging target at the time when the lighting image or the extinguishing image is captured, and the external light intensity information The position detection device according to claim 1, wherein the extinguishing image is smoothed by using a smoothing filter having a size corresponding to the intensity of external light indicated by. 上記取得部が取得した点灯画像と消灯画像との差分を示す第2差分画像を生成し、生成した第2差分画像において、予め想定されている撮像対象の像の画素値よりも大きい画素値を有する画素の数が、所定の数以上であるかどうかを判定する差分画像判定部をさらに備え、
上記平滑化画像生成部は、上記差分画像判定部が、上記画素の数が所定の数以上であると判定した場合にのみ上記消灯画像を平滑化することを特徴とする請求項1〜8のいずれか1項に記載の位置検出装置。
A second difference image indicating a difference between the lit image and the unlit image acquired by the acquisition unit is generated. In the generated second difference image, a pixel value larger than a pixel value of an image of the imaging target that is assumed in advance is set. The image processing apparatus further includes a difference image determination unit that determines whether or not the number of pixels having the number is equal to or greater than a predetermined number,
The smoothed image generation unit smoothes the unlit image only when the difference image determination unit determines that the number of pixels is equal to or greater than a predetermined number. The position detection apparatus of any one of Claims.
上記位置検出部は、上記差分画像生成部が生成した差分画像から所定の値以上の画素値を有する画素を抽出し、抽出した画素によって形成される像の位置を、上記撮像パネルに接触した撮像対象の像の位置として検出することを特徴とする請求項1〜9のいずれか1項に記載の位置検出装置。   The position detection unit extracts a pixel having a pixel value equal to or greater than a predetermined value from the difference image generated by the difference image generation unit, and captures the position of an image formed by the extracted pixel in contact with the imaging panel. The position detection apparatus according to claim 1, wherein the position detection apparatus detects the position of the target image. 上記位置検出部は、上記差分画像生成部が生成した差分画像を所定の値を境として二値化し、二値化した差分画像に含まれる像の位置を、上記撮像パネルに接触した撮像対象の像の位置として検出することを特徴とする請求項1〜9のいずれか1項に記載の位置検出装置。   The position detection unit binarizes the difference image generated by the difference image generation unit with a predetermined value as a boundary, and the position of the image included in the binarized difference image of the imaging target in contact with the imaging panel The position detection apparatus according to claim 1, wherein the position detection apparatus detects the position as an image position. 上記位置検出部は、上記差分画像生成部が生成した差分画像から所定の値以上のエッジ強度を有する画素を抽出し、抽出した画素の集合に対して、上記撮像対象の像を検出するためのパターンとのパターンマッチを行うことにより、上記撮像パネルに接触した撮像対象の像を検出することを特徴とする請求項1〜9のいずれか1項に記載の位置検出装置。   The position detection unit extracts pixels having an edge intensity equal to or greater than a predetermined value from the difference image generated by the difference image generation unit, and detects an image of the imaging target with respect to the set of extracted pixels. The position detection apparatus according to claim 1, wherein an image of an imaging target in contact with the imaging panel is detected by performing pattern matching with a pattern. 請求項1〜12のいずれか1項に記載の位置検出装置と、
撮像パネルとを備える撮像装置であって、
上記撮像パネルは、
上記撮像対象への光照射を所定の時間間隔で行う照明部と、
上記照明部の光照射のタイミングに同期して、上記点灯画像および上記消灯画像を撮像する撮像センサとを備え、
上記取得部は、上記撮像センサが撮像した上記点灯画像および上記消灯画像を取得することを特徴とする撮像装置。
The position detection device according to any one of claims 1 to 12,
An imaging device comprising an imaging panel,
The imaging panel
An illumination unit that performs light irradiation on the imaging target at a predetermined time interval;
In synchronization with the light irradiation timing of the illuminating unit, an imaging sensor that captures the lighting image and the extinguishing image,
The said acquisition part acquires the said lighting image and the said light extinction image which the said imaging sensor imaged, The imaging device characterized by the above-mentioned.
上記撮像パネルは、表示用のバックライトを備えており、
上記照明部は、上記表示用のバックライトとは別に設けられていることを特徴とする請求項13に記載の撮像装置。
The imaging panel includes a display backlight,
The imaging apparatus according to claim 13, wherein the illumination unit is provided separately from the display backlight.
上記照明部は、近赤外または近紫外領域の波長の光を出射することを特徴とする請求項13または14に記載の撮像装置。   The imaging device according to claim 13, wherein the illumination unit emits light having a wavelength in a near infrared region or a near ultraviolet region. 上記撮像センサは、近赤外または近紫外領域の波長の光を受光することを特徴とする請求項15に記載の撮像装置。   The imaging device according to claim 15, wherein the imaging sensor receives light having a wavelength in a near infrared region or a near ultraviolet region. 上記撮像センサは、太陽光照射下において飽和しない感度に設定されていることを特徴とする請求項13〜16のいずれか1項に記載の撮像装置。   The imaging device according to any one of claims 13 to 16, wherein the imaging sensor is set to a sensitivity that does not saturate under sunlight irradiation. 請求項1〜12のいずれか1項に記載の位置検出装置を動作させる位置検出プログラムであって、コンピュータを上記各部として機能させるための位置検出プログラム。   A position detection program for operating the position detection device according to any one of claims 1 to 12, wherein the position detection program causes a computer to function as each unit. 請求項18に記載の位置検出プログラムを記録したコンピュータ読み取り可能な記録媒体。   The computer-readable recording medium which recorded the position detection program of Claim 18. 撮像画像における撮像対象の像の位置を検出する位置検出装置における位置検出方法であって、
撮像パネルが位置する側から撮像対象に対して光照射を行った状態で上記撮像対象を上記撮像パネルにより撮像した画像である点灯画像と、上記光照射を行わない状態で上記撮像対象を上記撮像パネルにより撮像した画像であって、上記点灯画像とは所定の時間差を設けて撮像した消灯画像とを取得する取得工程と、
上記取得工程において取得した消灯画像を、上記点灯画像よりも平滑化した平滑化画像を生成する平滑化画像生成工程と、
上記点灯画像と上記平滑化画像生成工程において生成した平滑化画像との差分を示す差分画像を生成する差分画像生成工程と、
上記差分画像生成工程において生成した差分画像に含まれる、上記撮像パネルに接触した撮像対象の像の位置を検出する位置検出工程とを含むことを特徴とする位置検出方法。
A position detection method in a position detection device for detecting the position of an image to be imaged in a captured image,
A lighting image that is an image obtained by imaging the imaging object with the imaging panel in a state where light irradiation is performed on the imaging object from a side where the imaging panel is located, and the imaging object that is captured without the light irradiation. An acquisition step of acquiring an image captured by a panel and acquiring an unlit image captured with a predetermined time difference from the lighting image;
A smoothed image generating step for generating a smoothed image obtained by smoothing the unlit image acquired in the acquiring step from the lighted image;
A difference image generation step for generating a difference image indicating a difference between the lighting image and the smoothed image generated in the smoothed image generation step;
A position detection method comprising: a position detection step of detecting a position of an image to be imaged in contact with the imaging panel, which is included in the difference image generated in the difference image generation step.
JP2009272744A 2009-11-30 2009-11-30 Position detecting device, imaging apparatus, method and program for detecting position, and recording medium Pending JP2011118465A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009272744A JP2011118465A (en) 2009-11-30 2009-11-30 Position detecting device, imaging apparatus, method and program for detecting position, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009272744A JP2011118465A (en) 2009-11-30 2009-11-30 Position detecting device, imaging apparatus, method and program for detecting position, and recording medium

Publications (1)

Publication Number Publication Date
JP2011118465A true JP2011118465A (en) 2011-06-16

Family

ID=44283756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009272744A Pending JP2011118465A (en) 2009-11-30 2009-11-30 Position detecting device, imaging apparatus, method and program for detecting position, and recording medium

Country Status (1)

Country Link
JP (1) JP2011118465A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016033814A (en) * 2014-05-29 2016-03-10 株式会社半導体エネルギー研究所 Program and information processing device
US11908227B2 (en) 2019-11-20 2024-02-20 Samsung Electronics Co., Ltd. Method and device for reference imaging and optical object recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016033814A (en) * 2014-05-29 2016-03-10 株式会社半導体エネルギー研究所 Program and information processing device
US11908227B2 (en) 2019-11-20 2024-02-20 Samsung Electronics Co., Ltd. Method and device for reference imaging and optical object recognition

Similar Documents

Publication Publication Date Title
JP4699536B2 (en) POSITION DETECTION DEVICE, CONTROL METHOD, CONTROL PROGRAM, AND RECORDING MEDIUM
US20190057237A1 (en) Method and apparatus for acquiring fingerprint image and terminal device
JP4831267B2 (en) Information processing apparatus, information processing method, program, and electronic apparatus
JP5438414B2 (en) Brightness detection system and lighting system using the same
US20100225618A1 (en) Image analysis device, image analysis method, image sensing device, and storage medium
JP2013525923A (en) Laser scanning projector for interactive screen applications
JP2010055573A (en) Imaging apparatus, image analyzing device, external light intensity calculation method, image analysis method, imaging program, image analysis program and recording medium
JP6861345B2 (en) Character figure recognition device, character figure recognition method, and character figure recognition program
CN112101194B (en) Electronic device and operation method thereof
CN101836180A (en) Detecting ambient light levels in a vision system
US20120274606A1 (en) Optical navigation system with object detection
US20200175902A1 (en) Method for detecting luminance uniformity of screen, storage medium, and electronic device
JP2008226031A (en) Eyelid detection apparatus and program therefor
US10348983B2 (en) Non-transitory storage medium encoded with computer readable image processing program, information processing system, information processing apparatus, and image processing method for determining a position of a subject in an obtained infrared image
TWI650534B (en) System and method for measuring luminance of light device
US10757337B2 (en) Information processing apparatus and information processing method to control exposure for imaging the eye
TWI638334B (en) Image processing method and electronic apparatus for foreground image extraction
JP4131097B2 (en) Image processing method, image processing apparatus, and image processing program
JP2011118465A (en) Position detecting device, imaging apparatus, method and program for detecting position, and recording medium
TWI522870B (en) Click event detection device
JP2013004235A (en) Illumination system
US20220147731A1 (en) Imaging device, authentication device, and biometric imaging method
CN108351684B (en) Operation detection device, operation detection method and image display system
TWI772892B (en) Electronic device having fingerprint sensing function and fingerprint sensing method
CN103576909B (en) Optical displacement detection device and method