JP2017084302A - Iris position detection device, electronic apparatus, program, and iris position detection method - Google Patents

Iris position detection device, electronic apparatus, program, and iris position detection method Download PDF

Info

Publication number
JP2017084302A
JP2017084302A JP2015215173A JP2015215173A JP2017084302A JP 2017084302 A JP2017084302 A JP 2017084302A JP 2015215173 A JP2015215173 A JP 2015215173A JP 2015215173 A JP2015215173 A JP 2015215173A JP 2017084302 A JP2017084302 A JP 2017084302A
Authority
JP
Japan
Prior art keywords
luminance value
image
gradation
eye
black
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
JP2015215173A
Other languages
Japanese (ja)
Inventor
孝文 後藤
Takafumi Goto
孝文 後藤
晃司 橋本
Koji Hashimoto
晃司 橋本
浩章 古本
Hiroaki Furumoto
浩章 古本
至宏 門藤
Yoshihiro Mondo
至宏 門藤
澄雄 打田
Sumio Uchida
澄雄 打田
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.)
Hiroshima Prefecture
Original Assignee
Hiroshima Prefecture
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 Hiroshima Prefecture filed Critical Hiroshima Prefecture
Priority to JP2015215173A priority Critical patent/JP2017084302A/en
Publication of JP2017084302A publication Critical patent/JP2017084302A/en
Pending legal-status Critical Current

Links

Landscapes

  • Eye Examination Apparatus (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To accurately detect a horizontal iris position of an object person.SOLUTION: An iris position detection device (1) comprises a gradation processing unit (13) for generating a reference image, a brightness value data generation unit (brightness value graph generation unit 16) for generating brightness value data, an inner/outer conner-of-the-eye detection unit (reference point detection unit 17) for extracting a position of the reference image in which a vertical luminance value shows a steep change and an iris center detection unit (18) for extracting the centers of horizontal two points in the reference image.SELECTED DRAWING: Figure 1

Description

本発明は、対象者の黒目位置を検出する黒目位置検出装置、当該黒目位置検出装置を備えた電子機器、プログラムおよび黒目位置検出方法に関する。   The present invention relates to a black eye position detection device that detects a black eye position of a subject, an electronic device including the black eye position detection device, a program, and a black eye position detection method.

従来から、対象者の眼をカメラで撮影した画像を解析することにより瞳孔中心を検出し、当該瞳孔中心の位置に基づいて対象者の視線方向を検出する技術の開発が進められている。例えば、特許文献1には、投光手段により使用者の眼球を照明し、該眼球よりの反射光束を受光するセンサの各画素の信号を読み出して瞳孔中心位置を推定し、その位置より瞳孔エッジを抽出して使用者の視線を検出する視線検出装置が開示されている。また、特許文献2には、明瞳孔画像と暗瞳孔画像とから、画像差分により瞳孔部を検出することで、被験者の2つの瞳孔等を抽出する演算手段を備えた三次元視点計測装置が開示されている。   2. Description of the Related Art Conventionally, a technique for detecting the center of a pupil by analyzing an image obtained by photographing a subject's eye with a camera and detecting the direction of the subject's line of sight based on the position of the center of the pupil has been developed. For example, Patent Document 1 illuminates a user's eyeball with a light projecting means, reads a signal of each pixel of a sensor that receives a reflected light beam from the eyeball, estimates a pupil center position, and determines a pupil edge from the position. A gaze detection device that detects a gaze of a user by extracting the gaze is disclosed. Further, Patent Document 2 discloses a three-dimensional viewpoint measurement apparatus including a calculation unit that extracts two pupils and the like of a subject by detecting a pupil part based on an image difference from a bright pupil image and a dark pupil image. Has been.

特開2003−144388号公報(2003年5月20日公開)JP 2003-144388 A (published on May 20, 2003) 特許第4500992号明細書(2010年7月14日発行)Patent No. 4,500,992 (issued July 14, 2010) 特開2014−52758号公報(2014年3月20日公開)JP 2014-52758 A (published March 20, 2014)

しかしながら、特許文献1に開示された視線検出装置は、カメラの他に、投光手段としてIRLED(赤外発光ダイオード)等の専用の機器が別途必要となる。したがって、上記視線検出装置は、簡易な構成で使用者の視線方向を検出することができないという問題点があった。また、特許文献2に開示された三次元視点検出装置についても、専用の機器として第1および第2のカメラ、第1および第2の光源が必要であり、上記の視線検出装置と同様、簡易な構成で使用者の視線方向を検出することができないという問題点があった。   However, the line-of-sight detection apparatus disclosed in Patent Document 1 requires a dedicated device such as an IRLED (infrared light emitting diode) as a light projecting unit in addition to the camera. Therefore, the line-of-sight detection device has a problem in that it cannot detect the user's line-of-sight direction with a simple configuration. The 3D viewpoint detection device disclosed in Patent Document 2 also requires the first and second cameras and the first and second light sources as dedicated devices, and is as simple as the above-described line-of-sight detection device. There is a problem that the user's line-of-sight direction cannot be detected with a simple configuration.

本発明は、上記の問題点を解決するためになされたものであり、その目的は、タブレット等に内蔵されたカメラを用いて、対象者の横方向の黒目位置を簡易な構成で精度高く検出することにある。   The present invention has been made to solve the above-mentioned problems, and its purpose is to detect the position of the black eye in the horizontal direction of the subject with high accuracy with a simple configuration using a camera built in a tablet or the like. There is to do.

上記の課題を解決するために、本発明の一態様に係る黒目位置検出装置は、
複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像に対して、上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する基本グラデーション処理を施すことにより、基準画像を生成するグラデーション処理部と、
上記グラデーション処理部にて生成された上記基準画像において縦方向に並ぶ複数の画素の輝度値の積算を示す縦方向輝度値と、上記基準画像の横方向の位置との関係を表す輝度値データを生成する輝度値データ生成部と、
上記輝度値データから、上記縦方向輝度値が急峻な変化を示す上記基準画像の端部付近の位置を抽出し、その抽出された位置を上記対象者の目頭または目尻の位置として検出する目頭/目尻検出部と、
上記輝度値データにおいて連続的に変化する各縦方向輝度値と、上記目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域について、上記基準画像の横方向の2点を抽出し、その抽出された2点の中心を上記対象者の黒目の中心として検出する黒目中心検出部と、を備えている。
In order to solve the above problem, a black-eye position detection device according to one aspect of the present invention includes:
Emphasizes the difference between the brightness value at the center of the input image and the brightness value at the periphery of the input image for the input image that represents the subject's eyes by the brightness value of each pixel in the plurality of pixels A gradation processing unit that generates a reference image by performing basic gradation processing,
Luminance value data representing the relationship between the vertical luminance value indicating the integration of the luminance values of a plurality of pixels arranged in the vertical direction in the reference image generated by the gradation processing unit and the horizontal position of the reference image. A luminance value data generation unit to generate;
From the luminance value data, a position near the end of the reference image showing a steep change in the vertical luminance value is extracted, and the extracted position is detected as the position of the eye or the eye corner of the subject. An eye corner detection unit;
For the region where the difference between each vertical luminance value continuously changing in the luminance value data and the vertical luminance value corresponding to the position of the eye or the corner of the eye continuously decreases from the maximum value, A black eye center detection unit that extracts two horizontal points and detects the center of the two extracted points as the center of the subject's black eye.

上記構成によれば、グラデーション処理部は、入力画像の中央部における輝度値と周辺部における輝度値との差が強調された基準画像を生成する。したがって、グラデーション処理部は、基準画像中の黒目を入力画像中の黒目よりも強調させることができる。また、本発明に係る黒目位置検出装置は、輝度値データ生成部によって生成された輝度値データを用いて対象者の横方向の黒目位置を検出することから、当該黒目位置を検出する際に処理すべき基準画像のデータ量を少なくすることができる。   According to the above configuration, the gradation processing unit generates the reference image in which the difference between the luminance value in the central portion and the luminance value in the peripheral portion of the input image is emphasized. Therefore, the gradation processing unit can emphasize the black eyes in the reference image more than the black eyes in the input image. Further, the black eye position detection device according to the present invention detects the black eye position in the horizontal direction of the subject using the luminance value data generated by the luminance value data generation unit, so that the processing when detecting the black eye position is performed. The amount of reference image data to be reduced can be reduced.

また、上記構成によれば、本発明に係る黒目位置検出装置は、輝度値データから対象者の目頭または目尻の位置を検出する目頭/目尻検出部と、輝度値データから対象者の黒目の中心を検出する黒目中心検出部と、を備えている。したがって、本発明に係る黒目位置検出装置は、目頭/目尻検出部によって検出された目頭または目尻の位置と、黒目中心検出部によって検出された黒目の中心とを用いることにより、対象者の横方向の黒目位置として、例えば、対象者の目頭または目尻から黒目の中心までの距離を算出することができる。   Further, according to the above configuration, the black eye position detection device according to the present invention includes an eye / eye corner detection unit that detects the position of the eyes or corners of the subject from the luminance value data, and the center of the subject's black eyes from the luminance value data And a black eye center detection unit for detecting. Therefore, the black eye position detection device according to the present invention uses the position of the eye or eye corner detected by the eye / eye corner detection unit and the center of the black eye detected by the black eye center detection unit, so that the lateral direction of the subject As the black eye position, for example, the distance from the eye or the corner of the subject to the center of the black eye can be calculated.

以上より、本発明に係る黒目位置検出装置は、例えばカメラ機能付きタブレット等の比較的低性能の電子機器に内蔵された場合でも、対象者の横方向の黒目位置を精度高く検出することができる。   As described above, the black-eye position detection device according to the present invention can accurately detect the black-eye position in the lateral direction of the subject even when incorporated in a relatively low-performance electronic device such as a tablet with a camera function. .

また、上記の課題を解決するために、本発明の一態様に係る黒目位置検出装置において、
(i)上記入力画像に対して、上記複数の画素における各画素の輝度値の高低の差を強調する強調処理、(ii)上記複数の画素における各画素に最小値フィルタまたは最大値フィルタをかけるフィルタ処理、および(iii)上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する準備グラデーション処理の少なくともいずれかの処理を施すことにより、前処理画像を生成する前処理部をさらに備えており、
上記グラデーション処理部は、上記前処理画像を、複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像として、上記基本グラデーション処理の対象画像とすることが好ましい。
In order to solve the above problem, in the black eye position detection device according to one aspect of the present invention,
(I) enhancement processing for emphasizing a difference in brightness value of each pixel in the plurality of pixels with respect to the input image, and (ii) applying a minimum value filter or a maximum value filter to each pixel in the plurality of pixels. A pre-processed image by performing at least one of a filtering process and (iii) a preparatory gradation process that emphasizes a difference between a luminance value at a central portion of the input image and a luminance value at a peripheral portion of the input image Is further provided with a preprocessing unit for generating
The gradation processing unit preferably uses the pre-processed image as the target image of the basic gradation process as an input image representing the eye of the subject based on the brightness value of each pixel in a plurality of pixels.

上記構成によれば、グラデーション処理部は、(i)入力画像を構成する各画素に対してそれらの輝度値の高低の差を強調する強調処理、(ii)最小値フィルタまたは最大値フィルタをかけるフィルタ処理、および(iii)入力画像の中央部における輝度値と、入力画像の周辺部における輝度値との差を強調する準備グラデーション処理のいずれかの処理が施された前処理画像に対して、基本グラデーション処理を施す。   According to the above configuration, the gradation processing unit applies (i) enhancement processing that emphasizes the difference between the luminance values of each pixel constituting the input image, and (ii) applies a minimum value filter or a maximum value filter. For the preprocessed image that has been subjected to any of the filtering process and (iii) the preparation gradation process that emphasizes the difference between the luminance value in the central portion of the input image and the luminance value in the peripheral portion of the input image, Apply basic gradation processing.

ここで、前処理画像は、入力画像に比べて当該画像中の黒目がより強調されていることから、グラデーション処理部によって生成された基準画像についても、当該画像中の黒目がより強調されることとなる。それゆえ、本発明に係る黒目位置検出装置は、対象者の横方向の黒目位置をより精度高く検出することができる。   Here, since the black eye in the image is more emphasized in the preprocessed image than the input image, the black eye in the image is more emphasized in the reference image generated by the gradation processing unit. It becomes. Therefore, the black eye position detection device according to the present invention can detect the black eye position in the lateral direction of the subject with higher accuracy.

また、上記の課題を解決するために、本発明の一態様に係る黒目位置検出装置において、
上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する準備グラデーション処理を行い、当該準備グラデーション処理後の準備画像における輝度値分布の略中心位置を算出する略中心位置算出部をさらに備え、
上記グラデーション処理部は、上記略中心位置を上記基本グラデーション処理に係る輝度値強調の起点に設定することが好ましい。
In order to solve the above problem, in the black eye position detection device according to one aspect of the present invention,
Perform a preparatory gradation process that emphasizes the difference between the luminance value at the center of the input image and the luminance value at the periphery of the input image, and calculate the approximate center position of the luminance value distribution in the preparatory image after the preparatory gradation process An approximate center position calculation unit,
Preferably, the gradation processing unit sets the substantially center position as a starting point of luminance value enhancement related to the basic gradation processing.

上記構成によれば、本発明に係る黒目位置検出装置は、準備グラデーション処理後の準備画像における輝度値分布の略中心位置を算出する略中心位置算出部をさらに備える。また、グラデーション処理部は、略中心位置を基本グラデーション処理に係る輝度値強調の起点に設定する。   According to the above configuration, the black eye position detection device according to the present invention further includes a substantially center position calculation unit that calculates a substantially center position of the luminance value distribution in the prepared image after the preparation gradation process. In addition, the gradation processing unit sets the approximate center position as the starting point of the luminance value enhancement related to the basic gradation processing.

ここで、準備画像における輝度値分布の略中心位置は、対象者の黒目の中心位置、すなわち準備画像中の黒目部分の中心位置と略一致する。したがって、準備画像中の黒目部分の中心位置、または当該中心位置の近傍の位置を基本グラデーション処理に係る輝度値強調の起点とすることができ、黒目がより強調された基準画像を生成することができる。それゆえ、本発明に係る黒目位置検出装置は、対象者の横方向の黒目位置をより精度高く検出することができる。   Here, the approximate center position of the luminance value distribution in the preparation image substantially coincides with the center position of the subject's black eye, that is, the center position of the black eye portion in the preparation image. Therefore, the center position of the black eye portion in the prepared image or a position in the vicinity of the center position can be used as a starting point for luminance value enhancement related to the basic gradation process, and a reference image with more emphasized black eyes can be generated. it can. Therefore, the black eye position detection device according to the present invention can detect the black eye position in the lateral direction of the subject with higher accuracy.

また、上記の課題を解決するために、本発明の一態様に係る電子機器は、上記各態様のいずれかの黒目位置検出装置を備えている。   In order to solve the above problems, an electronic apparatus according to one aspect of the present invention includes the black-eye position detection device according to any one of the above aspects.

上記構成によれば、対象者の横方向の黒目位置を精度高く検出することが可能な電子機器を実現することができる。   According to the above configuration, it is possible to realize an electronic apparatus that can detect the black eye position in the lateral direction of the subject with high accuracy.

また、上記の課題を解決するために、本発明の一態様に係る黒目位置検出方法は、
複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像に対して、上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する基本グラデーション処理を施すことにより、基準画像を生成するグラデーション処理工程と、
上記グラデーション処理工程にて生成された上記基準画像において、縦方向に並ぶ複数の画素の輝度値の積算を示す縦方向輝度値と、上記基準画像の横方向の位置との関係を表す輝度値データを生成する輝度値データ生成工程と、
上記輝度値データ生成工程にて生成された上記輝度値データから、上記縦方向輝度値が急峻な変化を示す上記基準画像の端部付近の位置を抽出し、その抽出された位置を上記対象者の目頭または目尻の位置として検出する目頭/目尻検出工程と、
上記輝度値データ生成工程にて生成された上記輝度値データにおいて連続的に変化する各縦方向輝度値と、上記目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域について、上記基準画像の横方向の2点を抽出し、その抽出された2点の中心を上記対象者の黒目の中心として検出する黒目中心検出工程と、を含む。
In order to solve the above problem, a black eye position detection method according to an aspect of the present invention includes:
Emphasizes the difference between the brightness value at the center of the input image and the brightness value at the periphery of the input image for the input image that represents the subject's eyes by the brightness value of each pixel in the plurality of pixels A gradation processing step for generating a reference image by performing basic gradation processing,
In the reference image generated in the gradation processing step, luminance value data representing a relationship between a vertical luminance value indicating integration of luminance values of a plurality of pixels arranged in the vertical direction and a horizontal position of the reference image. Luminance value data generation step for generating
From the luminance value data generated in the luminance value data generation step, a position near the end of the reference image where the vertical luminance value shows a sharp change is extracted, and the extracted position is extracted from the target person. An eye / eye corner detection process for detecting the position of the eye's eye or the eye corner;
The difference between each vertical luminance value that continuously changes in the luminance value data generated in the luminance value data generation step and the vertical luminance value corresponding to the position of the top or bottom of the eye is continuously from the maximum value. And a black eye center detecting step of extracting two points in the horizontal direction of the reference image and detecting the center of the two extracted points as the center of the subject's black eye.

上記構成によれば、例えばカメラ機能付きタブレット等の比較的低性能の電子機器等においても、対象者の横方向の黒目位置を精度高く検出することが可能な黒目位置検出方法を実現することができる。   According to the above configuration, it is possible to realize a black eye position detection method capable of accurately detecting the black eye position in the lateral direction of the subject even in a relatively low-performance electronic device such as a tablet with a camera function. it can.

また、本発明の各態様に係る黒目位置検出装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記黒目位置検出装置が備える各部として動作させることにより上記黒目位置検出装置をコンピュータにて実現させるためのプログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   The black eye position detection device according to each aspect of the present invention may be realized by a computer. In this case, the black eye position detection device is operated by operating the computer as each unit included in the black eye position detection device. A program for realizing the above and a computer-readable recording medium on which the program is recorded also fall within the scope of the present invention.

本発明の一態様によれば、各画素の輝度値の高低により対象者の眼を表した入力画像を利用して、対象者の横方向の黒目位置を簡易な構成で精度高く検出することができる。   According to one aspect of the present invention, it is possible to accurately detect a black eye position in a lateral direction of a subject with a simple configuration using an input image that represents the subject's eyes based on the brightness value of each pixel. it can.

本発明の実施形態1および2に係る黒目位置検出装置の主要部を示すブロック図である。It is a block diagram which shows the principal part of the black-eye position detection apparatus which concerns on Embodiment 1 and 2 of this invention. 本発明に係る黒目位置検出装置を備えたタブレット端末による対象者の視線検出の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of a subject's eyes | visual_axis detection by the tablet terminal provided with the black-eye position detection apparatus which concerns on this invention. (a)は、入力画像を示す図である。(b)は、強調処理前の画像全体のヒストグラムである。(c)は、強調処理前の画像中央水平線上のヒストグラムである。(d)は、強調処理後の画像を示す図である。(e)は、強調処理後の画像全体のヒストグラムである。(f)は、強調処理後の画像中央水平線上のヒストグラムである。(g)は、前処理画像を示す図である。(A) is a figure which shows an input image. (B) is a histogram of the entire image before enhancement processing. (C) is a histogram on the horizontal center line of the image before enhancement processing. (D) is a figure which shows the image after an emphasis process. (E) is a histogram of the entire image after enhancement processing. (F) is a histogram on the horizontal center line of the image after the enhancement processing. (G) is a figure which shows a pre-processing image. (a)は、グラデーション倍率決定処理におけるグラデーション倍率の決定方法の概略を示す図である。(b)は、グラデーション倍率決定処理にて決定したグラデーション倍率を用いて基本グラデーション処理を施した場合の、基準画像を示す図である。(A) is a figure which shows the outline of the determination method of the gradation magnification in a gradation magnification determination process. (B) is a figure which shows a reference | standard image at the time of performing a basic gradation process using the gradation magnification determined by the gradation magnification determination process. (a)〜(c)は、基本グラデーション処理の処理方法の概略を示す図である。(A)-(c) is a figure which shows the outline of the processing method of a basic gradation process. (a)は、入力画像の一例を示す図である。(b)は、前記の入力画像に対して横方向の基本グラデーション処理を施すことにより生成された画像を示す図である。(c)は、上記の入力画像に対して縦方向の基本グラデーション処理を施すことにより生成された画像を示す図である。(A) is a figure showing an example of an input picture. (B) is a figure which shows the image produced | generated by performing the horizontal basic gradation process with respect to the said input image. (C) is a figure which shows the image produced | generated by performing the basic gradation process of the vertical direction with respect to said input image. (a)は、入力画像の一例を示す図である。(b)は、前記の入力画像に対して、縦方向および横方向に1.5倍のグラデーション倍率を乗じた場合に生成される基準画像を示す図である。(c)は、上記の入力画像に対して、縦方向および横方向に2.0倍のグラデーション倍率を乗じた場合に生成される基準画像を示す図である。(d)は、上記の入力画像に対して、縦方向および横方向に2.5倍のグラデーション倍率を乗じた場合に生成される基準画像を示す図である。(A) is a figure showing an example of an input picture. (B) is a diagram showing a reference image generated when the input image is multiplied by a gradation magnification of 1.5 times in the vertical and horizontal directions. (C) is a figure which shows the reference | standard image produced | generated when said input image is multiplied by the gradation magnification of 2.0 times in the vertical direction and the horizontal direction. (D) is a figure which shows the reference | standard image produced | generated when said input image is multiplied by the gradation magnification of 2.5 times in the vertical direction and the horizontal direction. (a)は、入力画像の一例を示す図である。(b)は、前記の入力画像に対して、縦方向および横方向にそれぞれ異なるグラデーション倍率を乗じた場合に生成される各基準画像を示す図である。(A) is a figure showing an example of an input picture. (B) is a figure which shows each reference | standard image produced | generated when the gradation magnification which each differs in the vertical direction and the horizontal direction with respect to the said input image. (a)は、図中の入力画像を特定の閾値で二値化処理した場合に生成される画像の状態を示す図面代用写真である。(b)は、縦方向および横方向のグラデーション倍率が1.5倍の基準画像を、特定の閾値で二値化処理した場合に生成される画像の状態を示す図面代用写真である。(c)は、縦方向および横方向のグラデーション倍率が3.0倍の基準画像を、特定の閾値で二値化処理した場合に生成される画像の状態を示す図面代用写真である。(A) is drawing substitute photograph which shows the state of the image produced | generated when the input image in a figure is binarized with a specific threshold value. (B) is a drawing-substituting photograph showing the state of an image generated when a reference image having a vertical and horizontal gradation magnification of 1.5 times is binarized with a specific threshold value. (C) is a drawing-substituting photograph showing the state of an image generated when a reference image having a vertical and horizontal gradation magnification of 3.0 times is binarized with a specific threshold value. (a)は、図中の基準画像から縦方向輝度値データテーブルを生成する生成方法の概略を示す図である。(b)は、縦方向輝度値データテーブルの一例を示す図である。(A) is a figure which shows the outline of the production | generation method which produces | generates a vertical direction luminance value data table from the reference | standard image in a figure. (B) is a figure which shows an example of the vertical direction luminance value data table. (a)は、縦方向輝度値の生成範囲を矢印Aの範囲に設定した場合の輝度値グラフを示す図である。(b)は、縦方向輝度値の生成範囲を矢印Bの範囲に設定した場合の輝度値グラフを示す図である。(c)は、縦方向輝度値の生成範囲を矢印Cの範囲に設定した場合の輝度値グラフを示す図である。(A) is a figure which shows the luminance value graph at the time of setting the production | generation range of a vertical direction luminance value to the range of the arrow A. FIG. (B) is a figure which shows the luminance value graph at the time of setting the production | generation range of a vertical direction luminance value to the range of the arrow B. FIG. (C) is a figure which shows a luminance value graph at the time of setting the production | generation range of a vertical direction luminance value to the range of the arrow C. FIG. (a)は、基準画像の一例を示す図である。(b)は、前記の基準画像から生成された縦方向輝度値の分布グラフを示す図である。(A) is a figure showing an example of a standard image. (B) is a figure which shows the distribution graph of the vertical direction luminance value produced | generated from the said reference | standard image. 対象者の黒目位置の算出方法の概略を示す図である。It is a figure which shows the outline of the calculation method of a subject's black eye position. 輝度値グラフの一例、および黒目位置検出用の閾値の設定と当該閾値設定による入力画像中の捕捉領域との対応関係を示す図である。It is a figure which shows an example of a brightness | luminance value graph, and the correspondence of the setting of the threshold value for black eye position detection, and the capture area | region in the input image by the said threshold value setting. 上記黒目位置の算出方法の他の例を示す図である。It is a figure which shows the other example of the calculation method of the said black eye position. 本発明の実施形態1に係る黒目位置検出装置による黒目位置検出方法を示すフローチャートである。It is a flowchart which shows the black-eye position detection method by the black-eye position detection apparatus which concerns on Embodiment 1 of this invention. (a)は、入力画像の一例を示す図である。(b)は、前記の入力画像に対して準備グラデーション処理を施すことにより生成された準備画像を示す図である。(c)は、上記の準備画像を特定の閾値で二値化処理した場合に生成される画像の一例を示す図面代用写真である。(d)は、上記の準備画像に対して縦方向の輝度値グラフおよび横方向の輝度値グラフを用いることによって生成される画像の一例を示す図である。(A) is a figure showing an example of an input picture. (B) is a figure which shows the preparation image produced | generated by performing a preparation gradation process with respect to the said input image. (C) is a drawing-substituting photograph showing an example of an image generated when the above-mentioned prepared image is binarized with a specific threshold. (D) is a figure which shows an example of the image produced | generated by using the luminance value graph of a vertical direction, and the luminance value graph of a horizontal direction with respect to said preparation image. (a)および(b)は、多段グラデーション処理の処理方法の概略を示す図である。(c)は、多段グラデーション処理の処理方法の概略を示す図面代用写真である。(A) And (b) is a figure which shows the outline of the processing method of a multistage gradation process. (C) is a drawing-substituting photograph showing an outline of a processing method of multistage gradation processing. グラデーション起点を順次設定する場合における、グラデーション倍率の決定方法の概略を示す図である。It is a figure which shows the outline of the determination method of the gradation magnification in the case of setting a gradation starting point sequentially. 本発明の実施形態2に係る黒目位置検出装置による黒目位置検出方法を示すフローチャートである。It is a flowchart which shows the black-eye position detection method by the black-eye position detection apparatus which concerns on Embodiment 2 of this invention.

〔実施形態1〕
以下、本発明の実施の形態について、図1〜図16を参照しながら、詳細に説明する。ここで、本実施形態以下の各実施形態においては、説明の便宜上、紙面向かって上側を上方、下側を下方、右側を右方および左側を左方とする。また、本実施形態以下の各実施形態においては、一例として、図1に示すようなタブレット端末100および200に黒目位置検出装置1および2を内蔵する場合について説明する。
Embodiment 1
Hereinafter, embodiments of the present invention will be described in detail with reference to FIGS. Here, in each of the following embodiments, for convenience of explanation, the upper side is the upper side, the lower side is the lower side, the right side is the right side, and the left side is the left side for the convenience of explanation. In each of the following embodiments, the case where the black eye position detection devices 1 and 2 are built in the tablet terminals 100 and 200 as shown in FIG. 1 will be described as an example.

タブレット端末100および200は、板状の筐体における片面の略全体に、表示部54(図2参照)として、タッチパネルを備えたLCD(Liquid crystal display:液晶ディスプレイ)が設けられたコンピュータ製品である。なお、本発明に係る黒目位置検出装置は、タブレット端末の他、携帯型ゲーム機器、各種医療福祉機器、自動車運転中の視線計測、防犯カメラをはじめとするセキュリティ機器等の様々な電子機器に適用することができる。   The tablet terminals 100 and 200 are computer products in which an LCD (Liquid crystal display) provided with a touch panel is provided as a display unit 54 (see FIG. 2) on almost the entire surface of one side of a plate-shaped housing. . The black-eye position detection device according to the present invention is applied to various electronic devices such as portable game devices, various medical welfare devices, gaze measurement while driving a car, security devices such as security cameras in addition to tablet terminals. can do.

<タブレット端末による対象者の視線検出の全体的な流れ>
まず、図1を用いて、タブレット端末100および200による対象者の視線検出の全体的な流れについて説明する。図1に示すように、まず、ユーザが、タブレット端末100および200に内蔵されたカメラ部51で対象者の顔を撮影する(ステップ100;以下、S100と略記する;対象者撮影工程)。
<Overall flow of target gaze detection using tablet devices>
First, with reference to FIG. 1, the overall flow of subject eye gaze detection by the tablet terminals 100 and 200 will be described. As shown in FIG. 1, first, the user captures the face of the subject with the camera unit 51 built in the tablet terminals 100 and 200 (step 100; hereinafter abbreviated as S100; subject photography step).

次に、タブレット端末100および200に内蔵された黒目位置検出装置1および2が備える、OpenCV(Open Source Computer Vision Library)等の入力画像生成部11(図1参照)は、カメラ部51によって撮影された対象者の顔の画像から複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像を生成する(S101;入力画像生成工程)。なお、入力画像は、対象者の右眼または左眼のいずれか一方を表す画像となっている。入力画像を前述のいずれの画像とするかは、タブレット端末100および200に予め設定しておいてもよいし、ユーザが任意に選択できるようにしておいてもよい。   Next, an input image generation unit 11 (see FIG. 1) such as an OpenCV (Open Source Computer Vision Library) included in the black eye position detection devices 1 and 2 incorporated in the tablet terminals 100 and 200 is photographed by the camera unit 51. An input image representing the eye of the subject is generated based on the brightness value of each pixel in the plurality of pixels from the face image of the subject (S101; input image generation step). The input image is an image representing either the right eye or the left eye of the subject. Which of the above-mentioned images is used as the input image may be set in advance in the tablet terminals 100 and 200, or may be arbitrarily selected by the user.

次に、黒目位置検出装置1および2は、入力画像に基づいて対象者の横方向の黒目の位置(以下、「対象者の黒目位置」と略記する)を検出する(S102;黒目位置検出工程)。ここで、対象者の黒目位置とは、対象者の目頭から黒目の中心までの横方向の直線距離を示す(図12参照)。なお、対象者の目尻から黒目の中心までの横方向の直線距離を対象者の黒目位置としてもよい。また、「黒目の中心」の定義については後述する。   Next, the black eye position detection devices 1 and 2 detect the position of the subject's lateral black eyes (hereinafter abbreviated as “subject's black eye position”) based on the input image (S102; black eye position detection step). ). Here, the black eye position of the subject indicates a linear distance in the horizontal direction from the eye of the subject to the center of the black eye (see FIG. 12). The horizontal distance from the subject's eye corner to the center of the black eye may be the subject's black eye position. The definition of “black eye center” will be described later.

次に、タブレット端末100および200に備えられた視線方向推定部(図示せず)は、対象者の横方向の黒目位置に基づいて、眼球回転中心位置、カメラ座標系から眼球座標系への回転行列、ターゲット平面および視線ベクトルの補正パラメータを決定し、対象者の視線方向を推定する(S103;視線方向推定工程、特許文献3参照)。   Next, a gaze direction estimation unit (not shown) provided in the tablet terminals 100 and 200 rotates the eyeball rotation center position from the camera coordinate system to the eyeball coordinate system based on the horizontal eye position of the subject. The matrix, target plane, and line-of-sight vector correction parameters are determined, and the line-of-sight direction of the subject is estimated (S103; line-of-sight direction estimation step, see Patent Document 3).

次に、ユーザは、推定された対象者の視線方向のデータを用いて、タブレット端末100および200にインストールされた各種の視線操作アプリケーションソフトを実行する(S104;アプリケーションソフト実行工程)。   Next, the user executes various gaze operation application software installed in the tablet terminals 100 and 200 using the estimated gaze direction data of the subject (S104; application software execution step).

<タブレット端末の具体的構成>
次に、図2を用いて、タブレット端末100の具体的構成について説明する。図1に示すように、タブレット端末100は、制御部50、カメラ部51、記憶部52、操作入力部53、表示部54、バッテリー部55、送受信部56およびアンテナ部57を備えている。
<Specific configuration of tablet terminal>
Next, a specific configuration of the tablet terminal 100 will be described with reference to FIG. As illustrated in FIG. 1, the tablet terminal 100 includes a control unit 50, a camera unit 51, a storage unit 52, an operation input unit 53, a display unit 54, a battery unit 55, a transmission / reception unit 56, and an antenna unit 57.

制御部50は、タブレット端末100を統括的に制御するものであり、黒目位置検出装置1を備えている。黒目位置検出装置1は、対象者の黒目位置を検出するための各種処理を統括するものであり、その詳細については後述する。   The control unit 50 comprehensively controls the tablet terminal 100 and includes the black eye position detection device 1. The black eye position detection device 1 controls various processes for detecting the black eye position of the subject, and details thereof will be described later.

カメラ部51は、被写体を撮像する撮像部であり、撮像した画像データを後述する入力画像生成部11に送信する。記憶部52は、制御部50が実行する各種の制御プログラム等を記憶するものであり、例えばハードディスク、フラッシュメモリなどの不揮発性の記憶装置によって構成される。記憶部52は、例えばタブレット端末100の外部に設けられてもよい。操作入力部53は、入力されたユーザ操作を取得するものであり、タブレット端末100においてはタッチパネルが用いられている。表示部54は、タブレット端末100に装備されている各種機能(アプリケーションソフト)が実行されることに起因する画像等の各種画像を表示する。バッテリー部55は、タブレット端末100を構成する各部に電力の供給を行う。送受信部56は、アンテナ部57を介して音声データ等の各種データの送受信を行う。   The camera unit 51 is an imaging unit that images a subject, and transmits the captured image data to the input image generation unit 11 described later. The storage unit 52 stores various control programs executed by the control unit 50, and includes a nonvolatile storage device such as a hard disk or a flash memory. The storage unit 52 may be provided outside the tablet terminal 100, for example. The operation input unit 53 acquires an input user operation. In the tablet terminal 100, a touch panel is used. The display unit 54 displays various images such as images resulting from the execution of various functions (application software) provided in the tablet terminal 100. The battery unit 55 supplies power to each unit constituting the tablet terminal 100. The transmission / reception unit 56 transmits / receives various data such as audio data via the antenna unit 57.

<本実施形態に係る黒目位置検出装置の具体的構成>
次に、図1を用いて、黒目位置検出装置1の具体的構成について説明する。図1に示すように、黒目位置検出装置1は、入力画像生成部11、前処理部12、グラデーション処理部14、輝度値グラフ生成部(輝度値データ生成部)16、基準点検出部(目頭/目尻検出部)17、黒目中心検出部18および黒目位置算出部19を備えている。
<Specific Configuration of Black Eye Position Detection Device According to this Embodiment>
Next, a specific configuration of the black eye position detection device 1 will be described with reference to FIG. As shown in FIG. 1, the black eye position detection device 1 includes an input image generation unit 11, a preprocessing unit 12, a gradation processing unit 14, a luminance value graph generation unit (luminance value data generation unit) 16, and a reference point detection unit (head). / Eye corner detection unit) 17, a black eye center detection unit 18, and a black eye position calculation unit 19.

ここで、本実施形態以下の各実施形態においては、入力画像は白黒画像であるとともに、当該入力画像をはじめとする各種画像を構成する各画素の輝度値の高低を、例えば、256階調で表す。また、前記の各画素における最も白い(明るい)画素の輝度値を「255」、最も黒い(暗い)画素の輝度値を「0」とする。但し、各画素における最も白い(明るい)画素の輝度値を「0」、最も黒い(暗い)画素の輝度値を「255」としてもよい。   Here, in each of the following embodiments, the input image is a black and white image, and the brightness value of each pixel constituting each image including the input image is set to, for example, 256 gradations. Represent. In addition, the luminance value of the whitest (brighter) pixel in each pixel is “255”, and the luminance value of the blackest (darkest) pixel is “0”. However, the luminance value of the whitest (bright) pixel in each pixel may be “0”, and the luminance value of the blackest (darkest) pixel may be “255”.

なお、入力画像は、白色および黒色以外の2色のカラー画像であってもよい。また、各画素の輝度値の高低を、例えば32階調で表してもよい。   The input image may be a color image of two colors other than white and black. Further, the brightness value of each pixel may be expressed by, for example, 32 gradations.

入力画像生成部11は、必ずしも黒目位置検出装置1に内蔵されている必要はなく、例えば黒目位置検出装置1の外部、あるいはタブレット端末100の外部に設けられていてもよい。   The input image generation unit 11 is not necessarily built in the black eye position detection device 1, and may be provided outside the black eye position detection device 1 or outside the tablet terminal 100, for example.

前処理部12は、入力画像生成部11から取得した入力画像に対して、当該入力画像を構成する複数の画素における、各画素の輝度値の高低の差を強調する強調処理、および前記の各画素に最小値フィルタをかけるフィルタ処理を施す。そして、前処理部12は、前記の2つの処理を行うことによって前処理画像を生成する。   The preprocessing unit 12 enhances the input image acquired from the input image generation unit 11 and emphasizes the difference in brightness value of each pixel in a plurality of pixels constituting the input image; A filter process for applying a minimum value filter to the pixel is performed. Then, the preprocessing unit 12 generates a preprocessed image by performing the above two processes.

グラデーション処理部14は、前処理部12から取得した前処理画像(複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像、対象画像)に対して、順次、グラデーション倍率決定処理および基本グラデーション処理を施すことによって、基準画像を生成する。グラデーション倍率決定処理および基本グラデーション処理の詳細については後述する。   The gradation processing unit 14 sequentially applies the gradation magnification to the preprocessed image acquired from the preprocessing unit 12 (the input image representing the eye of the subject by the level of the luminance value of each pixel in the plurality of pixels, the target image). A reference image is generated by performing determination processing and basic gradation processing. Details of the gradation magnification determination process and the basic gradation process will be described later.

輝度値グラフ生成部16は、グラデーション処理部14にて生成された基準画像から、縦方向の画素の列における各輝度値の平均値を示す縦方向輝度値と、基準画像の横方向の位置との関係を表す輝度値グラフ(輝度値データ)を生成する。輝度値グラフのY軸は、縦方向輝度値の最小値を「最大値1」に置換し、縦方向輝度値の最大値を「最小値0」に置換した簡易輝度値を表し、X軸は基準画像の左端からの横方向の距離を表す(図11、図12参照)。なお、縦方向輝度値は各輝度値の平均値である必要は必ずしもなく、例えば、各輝度値の合計値であってもよい。換言すれば、縦方向輝度値は、基準画像において縦方向に並ぶ複数の画素の輝度値の積算を示すもの(その中の最大値を1とした割合)であればよい。   The luminance value graph generation unit 16 determines, from the reference image generated by the gradation processing unit 14, the vertical luminance value indicating the average value of each luminance value in the vertical pixel row, and the horizontal position of the reference image. A luminance value graph (luminance value data) representing the relationship is generated. The Y axis of the luminance value graph represents a simple luminance value in which the minimum value of the vertical luminance value is replaced with “maximum value 1” and the maximum value of the vertical luminance value is replaced with “minimum value 0”. This represents the distance in the horizontal direction from the left end of the reference image (see FIGS. 11 and 12). Note that the vertical luminance value is not necessarily an average value of the luminance values, and may be a total value of the luminance values, for example. In other words, the vertical luminance value only needs to indicate an integration of luminance values of a plurality of pixels arranged in the vertical direction in the reference image (a ratio in which the maximum value is 1).

基準点検出部17は、輝度値グラフ生成部16にて生成された輝度値グラフから、簡易輝度値(縦方向輝度値)が急峻な変化を示す輝度値グラフ上の点(基準画像の端部付近の位置)を抽出し、その抽出された点(位置)のX座標を基準点、すなわち対象者の目頭の位置として検出する。なお、基準点検出部17は、対象者の目尻の位置を基準点として検出してもよい。   The reference point detection unit 17 uses a point on the luminance value graph (an end portion of the reference image) indicating a sharp change in the simple luminance value (vertical luminance value) from the luminance value graph generated by the luminance value graph generation unit 16. (Near position) is extracted, and the X coordinate of the extracted point (position) is detected as the reference point, that is, the position of the eye of the subject. The reference point detection unit 17 may detect the position of the subject's eye corner as a reference point.

黒目中心検出部18は、輝度値グラフ生成部16にて生成された輝度値グラフにおける、簡易輝度値(縦方向輝度値)の最大値を起点として当該簡易輝度値の減少が緩やかになる2点(基準画像の横方向の2点)を抽出し、その抽出された2点の中心のX座標を対象者の黒目の中心として検出する。   The black-eye center detection unit 18 has two points at which the simple luminance value gradually decreases starting from the maximum value of the simple luminance value (vertical luminance value) in the luminance value graph generated by the luminance value graph generation unit 16. (Two points in the horizontal direction of the reference image) are extracted, and the X coordinate of the center of the two extracted points is detected as the center of the subject's black eye.

黒目位置算出部19は、基準点検出部17にて検出された基準点および黒目中心検出部18にて検出された黒目の中心から、対象者の黒目位置を算出する。なお、黒目位置算出部19は黒目位置検出装置1に必須の構成要素ではなく、例えば、黒目中心検出部18が、黒目位置算出部19が行う対象者の黒目位置の算出を代わりに行ってもよい。   The black eye position calculation unit 19 calculates the black eye position of the subject from the reference point detected by the reference point detection unit 17 and the center of the black eye detected by the black eye center detection unit 18. Note that the black eye position calculation unit 19 is not an essential component of the black eye position detection device 1. For example, the black eye center detection unit 18 may instead calculate the black eye position of the subject performed by the black eye position calculation unit 19. Good.

<前処理部による前処理画像の生成>
次に、図3を用いて、前処理部12による前処理画像の生成について説明する。具体的には、前処理部12は、以下の(1)および(2)の処理工程を踏むことによって強調処理を行う。
(1) 図3の(a)に示すような入力画像を解析することにより、当該入力画像を構成する各画素の輝度値の分布を測定し、基準ヒストグラム(図3の(b))を生成する。なお、入力画像中央の水平線(図示せず)上に注目した場合、紙面向かって左端点を原点とした横方向の位置と、当該水平線上の輝度値分布との関係をグラフ化すると、図3の(c)に示すようなグラフとなる。
(2) 基準ヒストグラムを横軸方向に伸長させることにより、この例では、入力画像を構成する各画素のうち最も輝度値の低い(最も暗い)画素の輝度値を「0」に変換するとともに、最も輝度値の高い(最も明るい)画素の輝度値を「255」に変換する処理を行う。そして、図3の(d)に示すような前処理基準画像を生成する。なお、基準ヒストグラムを横軸方向に伸長させると、図3の(e)に示すようなヒストグラムとなる。なお、前処理基準画像中央線(図示せず)上の横方向の位置と輝度値との関係をグラフ化すると、図3の(f)に示すようなグラフとなる。
<Generation of Preprocessed Image by Preprocessing Unit>
Next, generation of a preprocessed image by the preprocessing unit 12 will be described with reference to FIG. Specifically, the preprocessing unit 12 performs enhancement processing by taking the following processing steps (1) and (2).
(1) By analyzing an input image as shown in FIG. 3A, the distribution of luminance values of each pixel constituting the input image is measured, and a reference histogram (FIG. 3B) is generated. To do. When attention is paid to the horizontal line (not shown) at the center of the input image, if the relationship between the horizontal position with the left end point at the origin as the origin and the luminance value distribution on the horizontal line is graphed, FIG. It becomes a graph as shown in (c).
(2) By expanding the reference histogram in the horizontal axis direction, in this example, the luminance value of the lowest (darkest) pixel among the pixels constituting the input image is converted to “0”, and A process of converting the luminance value of the pixel having the highest luminance value (brightest) to “255” is performed. Then, a preprocessing reference image as shown in FIG. 3D is generated. When the reference histogram is expanded in the horizontal axis direction, a histogram as shown in FIG. When the relationship between the horizontal position on the preprocess reference image center line (not shown) and the luminance value is graphed, a graph as shown in FIG.

このように、入力画像に対して強調処理を施すことにより、当該入力画像を構成する各画素の輝度値の高低の差をより強調させることができる。また、入力画像が複数ある場合に、入力画像毎の明るさのムラをなくし、均一化することができる。   As described above, by performing the enhancement process on the input image, it is possible to further enhance the difference in the brightness value of each pixel constituting the input image. Further, when there are a plurality of input images, it is possible to eliminate uneven brightness and make the input images uniform.

次に、前処理部12は、以下の(3)に示す処理内容のフィルタ処理を行うことにより、前処理画像を生成する。
(3) 前処理基準画像を構成する各画素について、順次注目画素に設定した上で、当該注目画素およびその周囲を取り囲む8個の画素の合計9個の画素のうち、最も輝度値の低い画素の輝度値を注目画素の輝度値に置換する。そして、図3の(g)に示すような前処理画像を生成する。
Next, the preprocessing unit 12 generates a preprocessed image by performing a filtering process with the processing content shown in (3) below.
(3) For each pixel constituting the preprocessing reference image, the pixel having the lowest luminance value is selected from the total of nine pixels of the target pixel and the eight pixels surrounding the target pixel after sequentially setting the target pixel. Is replaced with the luminance value of the target pixel. Then, a preprocessed image as shown in (g) of FIG. 3 is generated.

このように、前処理基準画像に対してフィルタ処理を施すことにより、外乱光の入力画像への映り込みを緩和することができるとともに、前処理基準画像中の黒目の部分をより強調させることができる。   In this way, by applying the filtering process to the preprocess reference image, it is possible to reduce the reflection of disturbance light in the input image and to further enhance the black eye portion in the preprocess reference image. it can.

なお、上述の強調処理およびフィルタ処理は、対象者の黒目位置をより精度高く検出するための処理であることから、入力画像に対して2つの処理が施される必要は必ずしもない。すなわち、2つの処理のいずれか一方のみがなされてもよいし、2つの処理ともになされなくてもよい。ここで、前処理部12が強調処理のみを行う場合には前処理基準画像がそのまま前処理画像となるとともに、フィルタ処理のみを行う場合には入力画像に対して直接フィルタ処理が施される。また、強調処理およびフィルタ処理をともに行わない場合、黒目位置検出装置1は前処理部12を備えていなくてもよい。   Note that the above-described enhancement process and filter process are processes for detecting the subject's black eye position with higher accuracy, and thus it is not always necessary to perform two processes on the input image. That is, only one of the two processes may be performed, or the two processes may not be performed. Here, when the preprocessing unit 12 performs only enhancement processing, the preprocessing reference image becomes the preprocessed image as it is, and when only filter processing is performed, the input image is directly filtered. Further, when neither the enhancement process nor the filter process is performed, the black eye position detection device 1 may not include the preprocessing unit 12.

さらに、各種画像を構成する各画素における最も白い画素の輝度値を「0」、最も黒い画素の輝度値を「255」で表す場合、前処理部12は、前処理基準画像に対して最大値フィルタをかけるフィルタ処理を施すことになる。   Further, when the luminance value of the whitest pixel in each pixel constituting each image is represented by “0” and the luminance value of the blackest pixel is represented by “255”, the preprocessing unit 12 determines the maximum value for the preprocessing reference image. A filtering process for applying a filter is performed.

<グラデーション処理部による基準画像の生成>
次に、図4〜図9を用いて、グラデーション処理部14による基準画像の生成について説明する。
<Generation of reference image by gradation processing unit>
Next, generation of a reference image by the gradation processing unit 14 will be described with reference to FIGS.

まず、グラデーション倍率決定処理として、グラデーション処理部14は、図4の(a)に示すような前処理画像における横方向Hの上端領域Suおよび下端領域Sd、縦方向Vの右端領域Srおよび左端領域Slの合計4か所について、それぞれの箇所に含まれる複数の画素の平均輝度値を算出する処理を行う。次に、グラデーション処理部14は、この例では、255(最も白い)を4つの平均輝度値でそれぞれ除した値に基づいて、前処理画像の最も上側に配置された横方向Hの画素の列(以下、「上端画素列」とする)、および前処理画像の最も下側に配置された横方向Hの画素の列(以下、「下端画素列」とする)のグラデーション倍率を決定する。また、前処理画像の最も右側に配置された縦方向Vの画素の列(以下、「右端画素列」とする)、および前処理画像の最も左側に配置された縦方向Vの画素の列(以下、「左端画素列」とする)のグラデーション倍率を決定する(図4の(b)参照)。   First, as gradation magnification determination processing, the gradation processing unit 14 includes an upper end region Su and a lower end region Sd in the horizontal direction H, a right end region Sr and a left end region in the vertical direction V in the preprocessed image as illustrated in FIG. For a total of four locations of Sl, a process of calculating an average luminance value of a plurality of pixels included in each location is performed. Next, in this example, the gradation processing unit 14 is a row of pixels in the horizontal direction H arranged on the uppermost side of the preprocessed image based on values obtained by dividing 255 (whitest color) by four average luminance values. (Hereinafter referred to as “upper end pixel column”) and a horizontal magnification H column (hereinafter referred to as “lower end pixel column”) arranged in the lowermost side of the preprocessed image are determined. In addition, a column of vertical V pixels arranged on the rightmost side of the preprocessed image (hereinafter referred to as “right end pixel column”) and a column of vertical V pixels arranged on the leftmost side of the preprocessed image ( Hereinafter, the gradation magnification of “leftmost pixel column” is determined (see FIG. 4B).

このグラデーション倍率決定処理で決定されたグラデーション倍率を用いて前処理画像に対して基本グラデーション処理を施すことにより、基準画像は、図4の(b)に示すような黒目部分の周辺領域(対象者の肌に対応する領域)が白飛びした画像となる。それゆえ、グラデーション倍率決定処理を行うことによって対象者の黒目位置の検出精度がより高まる。   By applying basic gradation processing to the preprocessed image using the gradation magnification determined in this gradation magnification determination processing, the reference image is a peripheral region (target person) of the black eye portion as shown in FIG. The area corresponding to the skin) is a white-out image. Therefore, the detection accuracy of the subject's black eye position is further increased by performing the gradation magnification determination process.

グラデーション倍率決定処理の一例として、横方向Hの上端領域Suの平均輝度値と下端領域Sdの平均輝度値とをさらに平均した値が130になり、縦方向Vの右端領域Srの平均輝度値と左端領域Slの平均輝度値とをさらに平均した値が100になった場合を例に挙げて説明する。この場合、例えば、上端画素列および下端画素列のグラデーション倍率を255/130の計算に基づいて2倍に決定することができ、右端画素列および左端画素列のグラデーション倍率を255/100の計算に基づいて2.5倍に決定することができる。   As an example of the gradation magnification determination process, a value obtained by further averaging the average luminance value of the upper end region Su in the horizontal direction H and the average luminance value of the lower end region Sd is 130, and the average luminance value of the right end region Sr in the vertical direction V is The case where the value obtained by further averaging the average luminance value of the left end region Sl is 100 will be described as an example. In this case, for example, the gradation magnification of the upper end pixel column and the lower end pixel column can be determined to be double based on the calculation of 255/130, and the gradation magnification of the right end pixel column and the left end pixel column can be calculated to 255/100. 2.5 times can be determined based on this.

なお、平均輝度値が255に近似する値であっても、元々暗い(輝度値が「0」に近い)画素については、グラデーション倍率決定処理を施したとしても暗いままで白飛びするとは限らない。したがって、より確実に白飛びさせるべく、決定したグラデーション倍率に1を加算した値を最終的なグラデーション倍率としてもよい。また、グラデーション倍率決定処理は、対象者の黒目位置の検出精度をより高めるための処理であることから、グラデーション処理部14においてグラデーション倍率決定処理が行われなくてもよい。当該処理を行わない場合、上端画素列および下端画素列のグラデーション倍率、右端画素列および左端画素列のグラデーション倍率は、例えば、記憶部52に所定の倍率値をあらかじめ記憶させておいてもよい。あるいは、ユーザが任意に設定できるようにしてもよい。   Even if the average luminance value is a value close to 255, pixels that are originally dark (the luminance value is close to “0”) are not necessarily dark and white out even if gradation magnification determination processing is performed. . Therefore, a value obtained by adding 1 to the determined gradation magnification may be used as the final gradation magnification in order to make the whiteout more sure. In addition, the gradation magnification determination process is a process for further improving the detection accuracy of the subject's black eye position, and therefore the gradation magnification determination process may not be performed in the gradation processing unit 14. When this processing is not performed, for the gradation magnification of the upper end pixel column and the lower end pixel column and the gradation magnification of the right end pixel column and the left end pixel column, for example, a predetermined magnification value may be stored in the storage unit 52 in advance. Or you may enable it to set arbitrarily by a user.

また、上記のグラデーション倍率決定処理の例では、上端画素列および下端画素列のグラデーション倍率を2倍に決定(上下対称)し、右端画素列および左端画素列のグラデーション倍率を2.5倍に決定(左右対称)しているが、この決定処理に限定されない。例えば、上端領域Suの平均輝度値から直接、上端画素列のグラデーション倍率を決定し、右端領域Srの平均輝度値から直接、右端画素列のグラデーション倍率を決定するというように、4つの端部画素列が全て異なるグラデーション倍率となるように決定してもよい。   Further, in the above example of the gradation magnification determination process, the gradation magnification of the upper end pixel column and the lower end pixel column is determined to be double (symmetrical in the vertical direction), and the gradation magnification of the right end pixel column and the left end pixel column is determined to be 2.5 times. (Symmetry), but is not limited to this determination process. For example, the four end pixels are determined such that the gradation magnification of the upper end pixel row is determined directly from the average luminance value of the upper end region Su and the gradation magnification of the right end pixel row is directly determined from the average luminance value of the right end region Sr. It may be determined so that all the columns have different gradation magnifications.

次に、グラデーション処理部14は、グラデーション倍率決定処理にて決定したグラデーション倍率を用いて、前処理画像の中央部における輝度値と周辺部における輝度値との差を強調する基本グラデーション処理を施すことにより、基準画像を生成する(図5の(c)参照)。なお、前処理画像の中央部は略円形、略楕円形、矩形、多角形、もしくは不定形の画像領域であり、その横幅は、対象者が真正面を見ている状態における当該対象者の黒目と、前処理画像の縦方向の中心線(図示せず)とが交差するような入力画像を想定した上で(図3の(a)参照)、対象者の黒目が最も目頭側に移動した場合における中心線から黒目の目頭側端点までの移動距離と、最も目尻側に移動した場合における中心線から黒目の目尻側端点までの移動距離との合計値と略同一になるように設定される。   Next, the gradation processing unit 14 performs basic gradation processing for emphasizing the difference between the luminance value at the central portion and the luminance value at the peripheral portion of the preprocessed image, using the gradation magnification determined in the gradation magnification determination processing. Thus, a reference image is generated (see FIG. 5C). The central portion of the preprocessed image is a substantially circular, substantially elliptical, rectangular, polygonal, or indeterminate image area, and the width of the preprocessed image is the black eye of the subject in a state where the subject is looking directly in front. Assuming an input image such that the vertical center line (not shown) of the preprocessed image intersects (see FIG. 3A), the subject's black eye has moved to the most eye side Is set to be substantially the same as the total distance of the moving distance from the center line to the eye-eye end point of the black eye and the moving distance from the center line to the eye-eye end point of the black eye when moving most toward the eye corner side.

具体的には、グラデーション処理部14は、基本グラデーション処理としてまず、前処理画像の横幅w(横方向の画素数)の数値と同数の要素を有する横方向グラデーション配列を生成する。この時、前処理画像における最も左側に配置された画素に対応する横方向グラデーション配列の要素が〔0〕、最も右側に配置された画素に対応する横方向グラデーション配列の要素が〔w−1〕となる。そして、グラデーション処理部14は、グラデーション倍率処理にて決定したグラデーション倍率を要素〔0〕および要素〔w−1〕に格納する。   Specifically, as the basic gradation process, the gradation processing unit 14 first generates a horizontal gradation array having the same number of elements as the numerical value of the horizontal width w (the number of pixels in the horizontal direction) of the preprocessed image. At this time, the element of the horizontal gradation array corresponding to the leftmost pixel in the preprocessed image is [0], and the element of the horizontal gradation array corresponding to the rightmost pixel is [w−1]. It becomes. Then, the gradation processing unit 14 stores the gradation magnification determined in the gradation magnification processing in the element [0] and the element [w−1].

次に、グラデーション処理部14は、横方向の画素数wが偶数の場合、前処理画像における左側から数えてw/2番目の画素に対応する要素〔w/2−1〕、w/2+1番目の画素に対応する要素〔w/2〕のそれぞれに1倍のグラデーション倍率を格納する。一方、横方向の画素数wが奇数の場合、前処理画像の中央に配置される画素が1つになることから、グラデーション処理部14は、w/2番目の画素に対応する要素〔w/2−1〕に1倍のグラデーション倍率を格納する。   Next, when the number of pixels w in the horizontal direction is an even number, the gradation processing unit 14 counts from the left side in the preprocessed image, the element [w / 2-1] corresponding to the w / 2th pixel, w / 2 + 1th A gradation magnification of 1 is stored in each of the elements [w / 2] corresponding to the pixels. On the other hand, when the number of pixels w in the horizontal direction is an odd number, the number of pixels arranged in the center of the preprocessed image is one, so the gradation processing unit 14 uses the element corresponding to the w / 2th pixel [w / 2-1.] Stores a 1 × gradation magnification.

次に、グラデーション処理部14は、横方向の画素数wが偶数の場合、上記の中心線を基準として左右対称に、前処理画像の両端に向けて直線的にグラデーション倍率が増加するように(図5の(a)のグラフ参照)、横方向グラデーション配列の要素〔w/2−2〕から要素〔1〕、および要素〔w/2+1〕から要素〔w−2〕に、順次グラデーション倍率を格納していく。一方、横方向の画素数wが奇数の場合、グラデーション処理部14は、横方向グラデーション配列の要素〔w/2−2〕から要素〔1〕、および要素〔w/2〕から要素〔w−2〕に、順次グラデーション倍率を格納していく。この場合、右方向のグラデーション倍率の増加率と左方向のグラデーション倍率の増加率とは、若干異なったものとなる。   Next, the gradation processing unit 14 increases the gradation magnification linearly toward both ends of the preprocessed image symmetrically with respect to the center line when the horizontal number of pixels w is an even number ( (See the graph in FIG. 5A), the gradation magnification is sequentially changed from the element [w / 2-2] to the element [1] and from the element [w / 2 + 1] to the element [w-2] in the horizontal gradation array. Store it. On the other hand, when the number of pixels w in the horizontal direction is an odd number, the gradation processing unit 14 converts the elements [w / 2-2] to elements [1] and elements [w / 2] to elements [w−] of the horizontal gradation array. 2] sequentially store gradation magnifications. In this case, the increase rate of the gradation magnification in the right direction and the increase rate of the gradation magnification in the left direction are slightly different.

そして、グラデーション処理部14は、全ての要素にグラデーション倍率が格納された横方向グラデーション配列を前処理画像における横方向Hの画素の各列に乗じる。   Then, the gradation processing unit 14 multiplies each column of pixels in the horizontal direction H in the preprocessed image by a horizontal gradation array in which gradation magnifications are stored in all elements.

このようにして、前処理画像の横方向Hについて、その中央部Chの輝度値と周辺部Ahの輝度値との高低差が強調されるような基本グラデーション処理を行う(図5の(a)参照)。   In this way, basic gradation processing is performed such that the height difference between the luminance value of the central portion Ch and the luminance value of the peripheral portion Ah is enhanced in the horizontal direction H of the preprocessed image ((a) in FIG. 5). reference).

グラデーション処理部14は、前処理画像の縦方向Vについても、上述と同様の方法で、前処理画像の縦方向Vについて、その中央部Cvの輝度値と周辺部Avの輝度値との高低差が強調されるような基本グラデーション処理を行う(図5の(b)参照)。   In the vertical direction V of the preprocessed image, the gradation processing unit 14 uses the same method as described above, and the height difference between the luminance value of the central portion Cv and the luminance value of the peripheral portion Av in the vertical direction V of the preprocessed image. A basic gradation process is performed such that the image is emphasized (see FIG. 5B).

なお、入力画像に対し、その中央部から周辺部にかけて徐々に輝度値を強調させるグラデーション倍率を乗じるのであれば、初期値、要素の値および方向毎の倍率は任意に設定することができる。また、前処理画像の中央部の形状についても、円形、楕円形、矩形(四角形)、多角形または不定形のいずれでもよく、換言すれば、黒目の存在確率に概略応じたパターンであればよい。   If the input image is multiplied by a gradation magnification that gradually enhances the luminance value from the center to the periphery, the initial value, the value of the element, and the magnification for each direction can be arbitrarily set. In addition, the shape of the central portion of the preprocessed image may be any of a circle, an ellipse, a rectangle (quadrangle), a polygon, or an indefinite shape. In other words, any pattern that roughly corresponds to the existence probability of black eyes may be used. .

ここで、グラデーション処理部14による基本グラデーション処理の一例として、横幅が50(横方向Hの画素数が50画素)の白黒画像(図示せず)に対して、上端画素列および下端画素列に1.5倍のグラデーション倍率を、右端画素列および左端画素列に1.5倍のグラデーション倍率をそれぞれ乗じる場合について説明する。   Here, as an example of the basic gradation processing by the gradation processing unit 14, 1 is added to the upper and lower pixel columns for a black and white image (not shown) having a horizontal width of 50 (the number of pixels in the horizontal direction H is 50 pixels). A case will be described in which a gradation magnification of .5 times is multiplied by a gradation magnification of 1.5 times each of the right end pixel row and the left end pixel row.

図5の(a)のグラフに示すように、グラデーション処理部14は、左側から数えて25番目の画素および26番目の画素(前処理画像の左端からの横方向の距離が25の位置に対応)に対して1倍のグラデーション倍率を乗じる。そして、グラデーション処理部14は、左側から数えて24番目の画素から2番目の画素にかけて、および左側から数えて27番目の画素から49番目の画素にかけてそれぞれに乗じるグラデーション倍率を直線的に増加させる。すなわち、グラデーション処理部14は、1画素当りグラデーション倍率を1.5/25=0.06増加させて、上記の24番目の画素から2番目の画素までの各画素、および上記の27番目の画素から49番目の画素までの各画素にグラデーション倍率を乗じる。   As shown in the graph of FIG. 5A, the gradation processing unit 14 corresponds to the position of the 25th pixel and the 26th pixel (the distance in the horizontal direction from the left end of the preprocessed image is 25) counted from the left side. ) Is multiplied by 1 × gradation magnification. The gradation processing unit 14 linearly increases the gradation magnifications to be multiplied from the 24th pixel to the 2nd pixel counted from the left side and from the 27th pixel to the 49th pixel counted from the left side, respectively. That is, the gradation processing unit 14 increases the gradation magnification per pixel by 1.5 / 25 = 0.06 to each pixel from the 24th pixel to the second pixel, and the 27th pixel. To the 49th pixel are multiplied by the gradation magnification.

このようにして横方向Hの画素の各列にグラデーション倍率を乗じることにより、図5の(a)に示すような、中央部Chがより黒く強調され、周辺部Ahがより白く強調された画像を生成することができる。   Thus, by multiplying each column of pixels in the horizontal direction H by the gradation magnification, an image in which the central portion Ch is emphasized in black and the peripheral portion Ah is emphasized in white as shown in FIG. Can be generated.

また、グラデーション処理部14は、白黒画像における縦方向Vの画素の各列に対しても上記と同様の方法でグラデーション倍率を乗じることにより、図5の(b)に示すような、中央部Cvがより黒く強調され、周辺部Avがより白く強調された画像を生成することができる。   In addition, the gradation processing unit 14 multiplies each column of pixels in the vertical direction V in the black and white image by the gradation magnification in the same manner as described above, so that the center portion Cv as shown in FIG. It is possible to generate an image in which is emphasized in black and the peripheral portion Av is emphasized in white.

このようにして、白黒画像の横方向Hおよび縦方向Vにそれぞれ基本グラデーション処理を施すことにより、グラデーション処理部14は、図5の(c)に示すような、中央部がより黒く強調され、周辺部がより白く強調された画像を生成する。   In this way, by performing basic gradation processing in the horizontal direction H and the vertical direction V of the monochrome image, the gradation processing unit 14 is emphasized in black at the center as shown in FIG. An image in which the peripheral portion is emphasized in white is generated.

なお、前処理部12による入力画像の処理は必須ではないことから、入力画像に対して直接、グラデーション倍率決定処理および基本グラデーション処理(入力画像の中央部における輝度値と、入力画像の周辺部における輝度値との差を強調する基本グラデーション処理)を施してもよい。例えば、図6の(a)に示すような入力画像に対して横方向Hの基本グラデーション処理を施した場合、図6の(b)に示すように、入力画像中の黒目部分を含む縦方向に伸長する領域が黒く強調され、当該領域の周辺領域が白く強調された画像が生成される。さらに、縦方向Vの基本グラデーション処理を施した場合、図6の(c)に示すように、入力画像中の黒目部分および目頭/目尻部分に対応する領域がより黒く強調され、その他の領域、特に画像中の肌部分に対応する領域がより白く強調された基準画像を生成することができる。   Since the processing of the input image by the preprocessing unit 12 is not essential, the gradation magnification determination process and the basic gradation process (the luminance value in the central part of the input image and the peripheral part of the input image are directly applied to the input image. Basic gradation processing for emphasizing the difference from the luminance value may be performed. For example, when the basic gradation process in the horizontal direction H is performed on the input image as shown in FIG. 6A, the vertical direction including the black eye portion in the input image is shown in FIG. 6B. An image is generated in which a region that is elongated in black is emphasized in black, and a peripheral region of the region is emphasized in white. Furthermore, when the basic gradation process in the vertical direction V is performed, as shown in FIG. 6C, the black eye part and the area corresponding to the eye / eye corner part in the input image are emphasized in black, and other areas, In particular, it is possible to generate a reference image in which a region corresponding to a skin portion in an image is emphasized in white.

(グラデーション倍率の設定/調整)
黒目位置検出装置1においては、上述の構成以外に、例えばグラデーション倍率をユーザが任意に設定できる構成、あるいはグラデーション倍率決定処理によって自動決定されたグラデーション倍率をユーザが適宜調整できる構成等を採用することができる。これらの構成を採用する場合、グラデーション倍率をどのように設定/調整するかは、倍率を上げることによるメリット/デメリットと、倍率を下げることによるメリット/デメリットとを比較考量することによって決定するのが好ましい。
(Setting / adjustment of gradation magnification)
In the black-eye position detection device 1, in addition to the above-described configuration, for example, a configuration in which the user can arbitrarily set the gradation magnification, or a configuration in which the user can appropriately adjust the gradation magnification automatically determined by the gradation magnification determination processing, etc. are adopted. Can do. When adopting these configurations, how to set / adjust the gradation magnification is determined by comparing the advantages / disadvantages of increasing the magnification and the advantages / disadvantages of decreasing the magnification. preferable.

上記の比較衡量の一例として、図7の(a)に示すような入力画像に対して、ユーザが設定したグラデーション倍率を用いて基本グラデーション処理を施す場合(前処理部12による処理はなし)を例に挙げて説明する。まず、図7の(b)に示すように、入力画像の上端画素列および下端画素列、右端画素列および左端画素列にそれぞれ1.5倍のグラデーション倍率を乗じた場合、基準画像(H×Vの画像)中の黒目部分および目頭/目尻部分は十分に黒く強調されるというメリットがある。一方で、基準画像中に上まぶた部分および下まぶた部分が黒く残ってしまい、画像中の肌部分が十分に白飛びしないというデメリットもある。   As an example of the above-described comparative balance, an example is shown in which basic gradation processing is performed on the input image as shown in FIG. 7A using the gradation magnification set by the user (no processing by the preprocessing unit 12). Will be described. First, as shown in FIG. 7B, when the upper end pixel row, the lower end pixel row, the right end pixel row, and the left end pixel row of the input image are respectively multiplied by a gradation magnification of 1.5, the reference image (H × There is an advantage that the black eye portion and the eye / eye corner portion in the image V) are sufficiently emphasized in black. On the other hand, there is a demerit that the upper eyelid portion and the lower eyelid portion remain black in the reference image, and the skin portion in the image is not sufficiently whitened.

次に、図7の(d)に示すように、上記の各画素列に2.5倍のグラデーション倍率を乗じた場合、基準画像(H×Vの画像)中の肌部分が十分に白飛びするというメリットがある。一方で、黒目位置検出の基準となる目頭/目尻部分が基準画像中にはっきり残らないというデメリットもある。   Next, as shown in FIG. 7D, when each of the pixel columns is multiplied by a gradation magnification of 2.5, the skin portion in the reference image (H × V image) is sufficiently whitened. There is a merit to do. On the other hand, there is also a demerit that the eye / eye corner portion that is a reference for detecting the black eye position does not remain clearly in the reference image.

したがって、上記の2つのケースにおけるメリット/デメリットを比較考量して、例えば図5の(c)に示すように、グラデーション倍率を、1.5倍と2.5倍との平均値である2.0倍に設定することが考えられる。グラデーション倍率をこのように設定することで、基準画像中の黒目部分および目頭/目尻部分を黒く強調しつつ、肌部分の大半を白飛びさせることができる。   Therefore, the merit / demerit in the above two cases is compared and weighed, for example, as shown in FIG. 5C, the gradation magnification is an average value of 1.5 times and 2.5 times. It is conceivable to set to 0 times. By setting the gradation magnification in this way, it is possible to whiten most of the skin portion while enhancing the black eye portion and the eye / eye corner portion in the reference image black.

また例えば、図8の(b)に示すように、入力画像(図8の(a))における上端画素列および下端画素列に乗じるグラデーション倍率と、右端画素列および左端画素列に乗じるグラデーション倍率とをそれぞれ異ならせていくことで、最も精度よく黒目位置検出ができる基準画像を選定することも考えられる。   Further, for example, as shown in FIG. 8B, gradation magnifications multiplied by the upper end pixel row and the lower end pixel row in the input image (FIG. 8A), and gradation magnifications multiplied by the right end pixel row and the left end pixel row, It is also conceivable to select a reference image that can detect the black eye position with the highest accuracy by differentiating each of them.

また、黒目位置検出装置1は、基準画像に対して、基本グラデーション処理としての二値化処理を施すことによって対象者の黒目位置を検出することができる(実施形態2参照)。この二値化処理による黒目位置検出においても、グラデーション倍率を適切に設定/調整したか否かが重要になってくる。   Further, the black eye position detection apparatus 1 can detect the black eye position of the subject by performing binarization processing as basic gradation processing on the reference image (see Embodiment 2). Whether or not the gradation magnification is appropriately set / adjusted is also important in detecting the black eye position by the binarization process.

例えば、基準画像を生成することなく入力画像に対して直接二値化処理を施した場合、図9の(a)に示すように、二値化処理の基準となる輝度値の閾値の設定が難しくなる。すなわち、閾値を低めに設定したとしても(閾値「44」)黒目部分の一部が消えた画像となる。したがって、二値化処理による黒目位置検出においても、グラデーション処理部14による基本グラデーション処理が施された基準画像を用いる必要がある。   For example, when the binarization process is directly performed on the input image without generating the reference image, as shown in FIG. 9A, the threshold value of the luminance value serving as the reference for the binarization process is set. It becomes difficult. That is, even if the threshold value is set low (threshold value “44”), an image in which a part of the black eye portion disappears is obtained. Therefore, it is necessary to use a reference image that has been subjected to basic gradation processing by the gradation processing unit 14 even in detection of the black eye position by binarization processing.

次に、図9の(b)に示すように、上端画素列および下端画素列のグラデーション倍率、右端画素列および左端画素列のグラデーション倍率がそれぞれ1.5倍の基準画像に対して二値化処理を施した場合、輝度値の閾値をやや高めに設定しても(閾値「65」)、入力画像に対して直接二値化処理を施す場合と比べて、より多くの黒目部分が残った画像となる。   Next, as shown in FIG. 9B, binarization is performed with respect to a reference image in which the gradation magnification of the upper end pixel row and the lower end pixel row, and the gradation magnification of the right end pixel row and the left end pixel row are 1.5 times, respectively. When the processing is performed, even if the threshold value of the luminance value is set slightly higher (threshold value “65”), more black-eye portions remain than when the binarization processing is performed directly on the input image. It becomes an image.

さらに、図9の(c)に示すように、上端画素列および下端画素列のグラデーション倍率、右端画素列および左端画素列のグラデーション倍率がそれぞれ3.0倍の基準画像に対して二値化処理を施した場合、輝度値の閾値を高めに設定しても(閾値「111」)、上記の2つの場合と比べて、黒目部分より確実に残るとともに黒目部分以外の他の部分がうまく消えた画像となる。しかし、基準画像中に目頭/目尻部分が十分に残っていないため、二値化処理を施した場合に目頭/目尻部分がうまく残らない。   Further, as shown in FIG. 9C, the binarization processing is performed on the reference image in which the gradation magnification of the upper end pixel row and the lower end pixel row and the gradation magnification of the right end pixel row and the left end pixel row are 3.0 times, respectively. , Even if the threshold value of the luminance value is set higher (threshold value “111”), it remains more reliably than the black eye part and other parts other than the black eye part disappeared better than the above two cases. It becomes an image. However, since the eye / eye corner portion does not remain sufficiently in the reference image, the eye / eye corner portion does not remain well when binarization processing is performed.

以上のことからも、黒目位置検出の精度を高める上で、グラデーション倍率を適切に設定/調整することが重要であることが判る。   From the above, it can be seen that it is important to appropriately set / adjust the gradation magnification in order to improve the accuracy of black eye position detection.

なお、本実施形態以下の各実施形態においては、前処理画像に対して、縦方向Vおよび横方向Eともに中央から両端にかけて直線的に増加するようにグラデーション倍率を決定しているが、例えば、2次関数のごとく曲線的に変化するようにグラデーション倍率を決定してもよい。また、前処理画像の中央に乗じるグラデーション倍率についても1倍である必要はなく、例えば、前処理画像の中央がより暗くなる0.8倍程度のグラデーション倍率を乗じてもよい。この場合、後述する略中心位置をグラデーション起点とする基本グラデーション処理において、当該起点がより暗くなることから、入力画像に写り込んだ外乱光を除去する効果が得られる。   In each of the following embodiments, the gradation magnification is determined so as to increase linearly from the center to both ends in both the vertical direction V and the horizontal direction E with respect to the preprocessed image. The gradation magnification may be determined so as to change in a curved manner like a quadratic function. Further, the gradation magnification multiplied by the center of the preprocessed image does not need to be 1. However, for example, a gradation magnification of about 0.8 times at which the center of the preprocessed image becomes darker may be multiplied. In this case, since the starting point becomes darker in the basic gradation process using the substantially center position described later as the starting point of gradation, an effect of removing disturbance light reflected in the input image can be obtained.

<輝度値グラフの生成および対象者の黒目位置の検出>
次に、図10〜図15を用いて、輝度値グラフの生成および対象者の黒目位置の検出について説明する。
<Generation of luminance value graph and detection of subject's black eye position>
Next, generation of a luminance value graph and detection of a subject's black eye position will be described with reference to FIGS.

(輝度値グラフの生成)
グラデーション処理部14から基準画像を取得した輝度値グラフ生成部16は、まず、図10の(a)に示すように、基準画像における縦方向Vの画素の列の縦方向輝度値を、当該列ごとに第1列から第n列まで求める。次に、輝度値グラフ生成部16は、前記の計算結果に基づいて、図10の(b)に示すような縦方向Vの画素の各列と縦方向輝度値との対応関係を示す縦方向輝度値データテーブル(輝度値データ)を生成する。
(Generation of luminance value graph)
The luminance value graph generation unit 16 that has acquired the reference image from the gradation processing unit 14 first calculates the vertical luminance value of the column of pixels in the vertical direction V in the reference image, as shown in FIG. Every 1st to nth columns are obtained. Next, the luminance value graph generation unit 16 shows the correspondence between each column of pixels in the vertical direction V as shown in FIG. 10B and the vertical luminance value based on the calculation result. A luminance value data table (luminance value data) is generated.

縦方向輝度値を算出するために必要な縦方向Vの画素の列を構成する各画素のうち、どの範囲の画素を縦方向輝度値算出の対象画素とするかについて、本実施形態以下の各実施形態では、グラデーション処理部14が以下の処理を行うことにより決定する。なお、縦方向輝度値の算出範囲は、対象画素における最上端の画素のY座標であるhRange0から、最下端の画素のY座標であるhRange1までであり、各列、hRange0からhRange1までの縦方向に連続する各画素の輝度値から縦方向輝度値を算出するものとする。   Regarding each pixel constituting the column of pixels in the vertical direction V necessary for calculating the vertical luminance value, which range of pixels is the target pixel for calculating the vertical luminance value, each of the following embodiments In the embodiment, the gradation processing unit 14 performs determination as follows. Note that the vertical luminance value calculation range is from hRange0, which is the Y coordinate of the uppermost pixel in the target pixel, to hRange1, which is the Y coordinate of the lowermost pixel, and in the vertical direction from each column, hRange0 to hRange1. It is assumed that the vertical luminance value is calculated from the luminance value of each pixel that is continuous.

具体的には、グラデーション処理部14はまず、横方向Eの画素の各列と横方向輝度値との対応関係を示す横方向輝度値データテーブル(輝度値データ;図示せず)を生成する。次に、グラデーション処理部14は、横方向輝度値データテーブルにおいて横方向輝度値が急峻に減少した直後の2つの値に対応する、縦方向Vの画素の列を構成する2つの画素を、それぞれ上端画素および下端画素として対象画素の範囲を暫定的に決定する(図10の(a)における矢印Cの範囲)。そして、グラデーション処理部14は、暫定的に決定した対象画素の範囲内にある各画素の中から、横方向輝度値が高い画素(白飛びしている部分に対応)を除外した残りの複数の画素を、最終的な対象画素として決定する。このようにして縦方向輝度値算出の対象画素を決定した場合、後述する輝度値グラフは、図11の(c)に示すようなグラフとなる。   Specifically, the gradation processing unit 14 first generates a horizontal luminance value data table (luminance value data; not shown) indicating the correspondence between each column of pixels in the horizontal direction E and the horizontal luminance value. Next, the gradation processing unit 14 determines two pixels constituting a column of pixels in the vertical direction V corresponding to the two values immediately after the horizontal luminance value sharply decreases in the horizontal luminance value data table, respectively. The range of the target pixel is tentatively determined as the upper end pixel and the lower end pixel (the range indicated by the arrow C in FIG. 10A). Then, the gradation processing unit 14 excludes pixels having a high horizontal luminance value (corresponding to a portion that is over-exposed) from each pixel within the range of the target pixel that is provisionally determined. The pixel is determined as the final target pixel. When the target pixel for calculating the vertical luminance value is determined in this way, a luminance value graph to be described later is a graph as shown in FIG.

縦方向輝度値算出の対象画素を上述のように決定することにより、縦方向輝度値の高低の差がより強調された縦方向輝度値データテーブルを生成することができる。それゆえ、前記の縦方向輝度値データテーブルに基づいて生成された輝度値グラフを用いて、対象者の横方向の黒目位置をより精度高く検出することができる。   By determining the target pixel for calculating the vertical luminance value as described above, it is possible to generate a vertical luminance value data table in which the difference between the vertical luminance values is more emphasized. Therefore, the black eye position in the horizontal direction of the subject can be detected with higher accuracy using the luminance value graph generated based on the vertical luminance value data table.

なお、縦方向輝度値算出の対象画素の決定方法として、例えば、縦方向Vの画素の列を構成する全ての画素(図10の(a)における第1行の画素から第h行の画素まで)を対象画素としてもよい(図10の(a)における矢印Aの範囲)。この場合、後述する輝度値グラフは、図11の(a)に示すようなグラフとなる。また例えば、基準画像の縦幅hを1/3ずつ分割し、縦方向Vの中央部に対応する範囲に含まれる複数の画素を対象画素としてもよい(図10の(a)における矢印Bの範囲)。この場合、後述する輝度値グラフは、図11の(b)に示すようなグラフとなる。   In addition, as a method of determining the target pixel for calculating the vertical luminance value, for example, all the pixels constituting the column of the pixels in the vertical direction V (from the pixels in the first row to the pixels in the h row in FIG. 10A) ) May be the target pixel (range of arrow A in FIG. 10A). In this case, the luminance value graph described later is a graph as shown in FIG. Further, for example, the vertical width h of the reference image may be divided by 1/3, and a plurality of pixels included in a range corresponding to the central portion in the vertical direction V may be set as target pixels (indicated by an arrow B in FIG. 10A). range). In this case, a luminance value graph to be described later is a graph as shown in FIG.

ここで、縦方向輝度値データテーブルを利用して、Y軸が縦方向輝度値を表し、X軸が基準画像の左端からの横方向Hの距離を表す縦方向輝度値の分布グラフを生成した場合、図12の(b)に示すようなグラフになる。このグラフでは、図12の(a)の基準画像における黒目部分に対応する暗い縦方向Vの画素の列ほど、Y座標の値が小さくなる。したがって、黒目部分が基準画像の左端から横方向Hのどの位置に存在するのかを視覚的に捉えやすくするため、輝度値グラフ生成部16は、縦方向輝度値データテーブルを利用して、図13の(b)に示すような輝度値グラフを生成する。   Here, using the vertical luminance value data table, a vertical luminance value distribution graph is generated in which the Y axis represents the vertical luminance value and the X axis represents the distance in the horizontal direction H from the left end of the reference image. In this case, the graph is as shown in FIG. In this graph, the value of the Y coordinate is smaller in the darker vertical V pixel row corresponding to the black eye portion in the reference image in FIG. Therefore, in order to make it easy to visually grasp the position in the horizontal direction H from the left end of the reference image, the luminance value graph generation unit 16 uses the vertical luminance value data table in FIG. A luminance value graph as shown in (b) of FIG.

(対象者の黒目位置の検出)
次に、基準点検出部17は、図13の(a)および(b)に示すように、簡易輝度値が急峻な変化を示す輝度値グラフ上の2点のうち、Y軸により近い方の1点を基準点P1として抽出する。そして、抽出された基準点P1のX座標を対象者の目頭の位置として検出する。なお、本実施形態では、簡易輝度値が急峻な変化を示す輝度値グラフ上の2点のうちY軸により近い方の1点が基準点P1となっているが、Y軸からより遠い方の1点が基準点P1になってもよい。簡易輝度値が急峻な変化を示す輝度値グラフ上の2点のどちらを基準点P1とするかは、入力画像に映し出された対象者の眼が右眼か左眼か、またはY軸が基準画像の右側に設定されているか左側に設定されているか等によって決まる。
(Detection of subject's black eye position)
Next, as shown in FIGS. 13A and 13B, the reference point detection unit 17, of the two points on the luminance value graph in which the simple luminance value shows a steep change, is closer to the Y axis. One point is extracted as a reference point P1. Then, the X coordinate of the extracted reference point P1 is detected as the position of the subject's eye. In the present embodiment, one of the two points on the luminance value graph showing a steep change in the simple luminance value is closer to the Y axis, which is the reference point P1, but the farther from the Y axis. One point may be the reference point P1. Which of the two points on the luminance value graph in which the simple luminance value shows a steep change is used as the reference point P1 is whether the eye of the subject displayed in the input image is the right eye or the left eye, or the Y axis is the reference It depends on whether it is set on the right or left side of the image.

次に、黒目中心検出部18は、図13の(a)および(b)に示すように、輝度値グラフにおける、簡易輝度値の最大値を起点として当該簡易輝度値の減少が緩やかになる2点を抽出することで、対象者の黒目の中心P2を検出する。   Next, as shown in FIGS. 13A and 13B, the black eye center detection unit 18 gradually decreases the simple luminance value starting from the maximum value of the simple luminance value in the luminance value graph 2. By extracting the points, the center P2 of the subject's black eye is detected.

具体的には、黒目中心検出部18は、まず、輝度値グラフ上の簡易輝度値が最大になる点(α)を探索する。そして、点(α)を起点として左右両方向に、輝度値グラフ上の隣り合う2つの簡易輝度値を比較しながら、簡易輝度値の減少が一旦緩和された後に簡易輝度値が急激に増加する箇所(以下、「極点」とする)を探索していく。極点を探索したか否かは、例えば、隣り合う2つの簡易輝度値を比較した場合における値の増加率が5%以上か否かで判断する(増加率の数値については5%に限定されない)。そして、極点を左右両側で1つずつ探索した黒目中心検出部18は、その直前に探索した、簡易輝度値の減少が緩やかになる2つの箇所を対象者の黒目の端点(β)として、2つの端点(β)を結んだ直線の中点(γ)を抽出する。そして、黒目中心検出部18は、抽出した中点(γ)のX座標を表すX軸上の点を対象者の黒目の中心P2として検出する。   Specifically, the black eye center detection unit 18 first searches for a point (α) at which the simple luminance value on the luminance value graph is maximized. Then, a point where the simple luminance value increases rapidly after the decrease in the simple luminance value is once relaxed while comparing two adjacent simple luminance values on the luminance value graph in both the left and right directions starting from the point (α) (Hereinafter referred to as “pole”). Whether or not the extreme point has been searched is determined, for example, based on whether or not the increase rate of the value when comparing two adjacent simple luminance values is 5% or more (the increase rate value is not limited to 5%). . Then, the black eye center detection unit 18 that searches for the extreme points one by one on both the left and right sides uses the two locations that have been searched immediately before the decrease in the simple luminance value as gradual as the end points (β) of the subject's black eyes. The midpoint (γ) of a straight line connecting two end points (β) is extracted. Then, the black eye center detection unit 18 detects a point on the X axis representing the X coordinate of the extracted middle point (γ) as the center P2 of the subject's black eye.

このように、極点探索の直前に探索される簡易輝度値の減少が緩やかになる箇所を対象者の黒目の端点と見做すことにより、基準画像中の黒目部分周辺の白飛びしている部分等をより確実に排除した上で、黒目中心検出を行うことができる。なお、黒目中心検出部18は、極点を対象者の黒目の端点と見做して黒目中心検出を行ってもよい。   In this way, a portion where the decrease in the simple luminance value searched immediately before the extreme point search is regarded as the end point of the subject's black eye is over-exposed around the black eye portion in the reference image. It is possible to detect the center of the black eye while more reliably eliminating the above. Note that the black eye center detection unit 18 may perform black eye center detection by regarding the pole as an end point of the subject's black eye.

また、黒目中心検出部18は、図15の(a)および(b)に示すように、簡易輝度値が黒目中心検出用の閾値と一致する輝度値グラフ上の2点を抽出した上で、さらにこの2点を結んだ直線の中点を抽出し、当該中点のX座標を表すX軸上の点を対象者の黒目の中心P2として検出してもよい。この方法を採用する場合、黒目の中心P2の検出に用いられる黒目中心検出用の閾値が適切に設定されることが重要になってくる。例えば、図14に示す入力画像を基準として黒目中心検出用の閾値を設定する場合、当該閾値の設定値を0.7にすると、輝度値グラフ上の簡易輝度値0.7に対応する2点間の直線距離が対象者の黒目の横幅に最も近似する。したがって、図14に示す入力画像に基づいて対象者の黒目位置を検出する場合、黒目中心検出用の閾値を0.7に設定するのが最も適切である。   Further, as shown in FIGS. 15A and 15B, the black eye center detection unit 18 extracts two points on the luminance value graph where the simple luminance value matches the threshold value for black eye center detection. Further, the midpoint of the straight line connecting the two points may be extracted, and a point on the X axis representing the X coordinate of the midpoint may be detected as the center P2 of the subject's black eye. When this method is adopted, it is important to appropriately set a black eye center detection threshold value used for detecting the black eye center P2. For example, when a threshold value for black eye center detection is set on the basis of the input image shown in FIG. 14, if the threshold value is set to 0.7, two points corresponding to the simple luminance value 0.7 on the luminance value graph The straight line distance between them is the closest to the subject's black eye width. Therefore, when detecting the black eye position of the subject based on the input image shown in FIG. 14, it is most appropriate to set the black eye center detection threshold to 0.7.

また、黒目中心検出部18は、まず、輝度値グラフ上の簡易輝度値の最大値を利用する方法で対象者の黒目の中心P2の検出を試みた上で、検出が不可能であった場合に、黒目中心検出用の閾値を用いる方法で改めて当該黒目の中心P2を検出してもよい。例えば、2つの極点の両方、またはいずれか一方が探索される前に比較対象の簡易輝度値が「0」なった場合、黒目中心検出部18は、上記の閾値を用いる方法に切り替えてもよい。   Also, the black eye center detection unit 18 first attempts to detect the center P2 of the subject's black eye by a method using the maximum value of the simple luminance value on the luminance value graph, and when the detection is impossible. In addition, the center P2 of the black eye may be detected again by a method using a threshold value for black center detection. For example, when the simple luminance value to be compared becomes “0” before both or one of the two extreme points is searched, the black eye center detection unit 18 may switch to the method using the above threshold value. .

このように、黒目中心検出部18は、上述した2つの方法の少なくともいずれか一方を採用して対象者の黒目の中心P2を検出する。換言すれば、黒目中心検出部18は、輝度値データにおいて連続的に変化する各縦方向輝度値と、対象者の目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域について、基準画像の横方向の2点を抽出し、その抽出された2点の中心を対象者の黒目の中心P2として検出する。   Thus, the black eye center detection unit 18 detects the center P2 of the subject's black eye by employing at least one of the two methods described above. In other words, the black-eye center detection unit 18 determines that the difference between each vertical luminance value that continuously changes in the luminance value data and the vertical luminance value corresponding to the position of the subject's eyes or corners from the maximum value. For the continuously decreasing area, two lateral points of the reference image are extracted, and the center of the extracted two points is detected as the center P2 of the subject's black eye.

ここで、輝度値グラフ上の簡易輝度値の最大値を利用する方法では、図13の(b)に示すように、輝度値グラフにおける、極点の一方から当該極点に近接する方の黒目の端点(β)、点(α)および黒目の端点(β)の他方を経由して極点の他方までの領域が、「輝度値データにおいて連続的に変化する各縦方向輝度値と、対象者の目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域」に対応する。また、黒目中心検出用の閾値を用いる方法では、図14および図15の(b)に示すように、輝度値グラフにおける、簡易輝度値が黒目中心検出用の閾値(0.7)と一致する輝度値グラフ上の2点の一方から簡易輝度値が最大値1になるグラフの頂点を経由して当該2点の他方までの領域が、「輝度値データにおいて連続的に変化する各縦方向輝度値と、対象者の目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域」に対応する。   Here, in the method of using the maximum value of the simple luminance value on the luminance value graph, as shown in FIG. 13B, the end point of the black eye that is closer to the extreme point from one of the extreme points in the luminance value graph. (Β), the point (α) and the end point (β) of the black eye through the other to the other of the extreme points are “the vertical luminance values that change continuously in the luminance value data and the subject's head. Alternatively, it corresponds to a “region where the difference from the vertical luminance value corresponding to the position of the corner of the eye continuously decreases from the maximum value”. Further, in the method using the black eye center detection threshold value, as shown in FIGS. 14 and 15B, the simple luminance value in the luminance value graph matches the black eye center detection threshold value (0.7). The area from one of the two points on the luminance value graph to the other of the two points via the vertex of the graph where the simple luminance value has the maximum value 1 is “each vertical luminance that changes continuously in the luminance value data. This corresponds to “a region where the difference between the value and the vertical luminance value corresponding to the position of the eye or the corner of the subject's eyes continuously decreases from the maximum value”.

黒目中心検出用の閾値の設定は、操作入力部53からの入力操作によってユーザが任意に設定することができる(図1参照)。なお、この閾値設定は、実験データ等に基づいて得られた値を記憶部52等に予め格納しておいてもよい。   The threshold value for detecting the center of black eye can be arbitrarily set by the user through an input operation from the operation input unit 53 (see FIG. 1). In this threshold setting, a value obtained based on experimental data or the like may be stored in advance in the storage unit 52 or the like.

次に、黒目位置算出部19は、図13の(a)および(b)に示すように、輝度値グラフにおける黒目の中心P2のX座標の値と基準点P1のX座標の値との差を計算する。そして、黒目位置算出部19は、計算結果である基準点P1から黒目の中心P2までの横方向の直線距離を、対象者の黒目位置として検出する。   Next, as shown in FIGS. 13A and 13B, the black eye position calculation unit 19 determines the difference between the X coordinate value of the center P2 of the black eye and the X coordinate value of the reference point P1 in the luminance value graph. Calculate Then, the black eye position calculation unit 19 detects a horizontal linear distance from the reference point P1 as a calculation result to the center P2 of the black eye as the black eye position of the subject.

<本実施形態に係る黒目位置検出装置による対象者の黒目位置の検出方法>
次に、図16を用いて、黒目位置検出装置1による対象者の黒目位置の検出方法について説明する。
<Method for Detecting Black Eye Position of Subject by Black Eye Position Detection Device According to this Embodiment>
Next, a method for detecting the black eye position of the subject by the black eye position detection device 1 will be described with reference to FIG.

図16に示すように、まず、入力画像生成部11は、カメラ部51によって撮影された対象者の顔の画像を取得して入力画像を生成する(S200;入力画像生成工程、S101と同様の処理工程)。次に、前処理部12は、入力画像生成部11から取得した入力画像に対して前処理(強調処理、フィルタ処理)を施すことにより、前処理画像を生成する(S201;前処理工程)。   As shown in FIG. 16, first, the input image generation unit 11 acquires an image of the face of the subject photographed by the camera unit 51 and generates an input image (S200; input image generation step, similar to S101). Processing step). Next, the preprocessing unit 12 generates a preprocessed image by performing preprocessing (enhancement processing, filter processing) on the input image acquired from the input image generation unit 11 (S201; preprocessing step).

次に、グラデーション処理部14は、前処理部12から取得した前処理画像に対してグラデーション倍率決定処理を施すことにより、前処理画像の上端画素列および下端画素列のグラデーション倍率、右端画素列および左端画素列のグラデーション倍率をそれぞれ決定する(S202;グラデーション倍率決定工程(グラデーション処理工程))。そして、グラデーション処理部14は、決定した各グラデーション倍率を用いて、前処理画像に対して基本グラデーション処理を施すことにより、基準画像を生成する(S203;基本グラデーション処理工程(グラデーション処理工程))。   Next, the gradation processing unit 14 performs gradation magnification determination processing on the preprocessed image acquired from the preprocessing unit 12, so that the gradation magnification of the upper end pixel row and the lower end pixel row of the preprocessed image, the right end pixel row, and The gradation magnification of the left end pixel column is determined (S202; gradation magnification determination step (gradation processing step)). Then, the gradation processing unit 14 generates a reference image by performing basic gradation processing on the preprocessed image using each determined gradation magnification (S203; basic gradation processing step (gradation processing step)).

次に、輝度値グラフ生成部16は、グラデーション処理部14から取得した基準画像における縦方向Vの画素の列の縦方向輝度値を算出することにより、縦方向輝度値データテーブルを生成する(S204;縦方向輝度値データテーブル生成工程(輝度値データ生成工程))。そして、輝度値グラフ生成部16は、縦方向輝度値データテーブルを用いて輝度値グラフを生成する(S205;輝度値グラフ生成工程(輝度値データ生成工程))。   Next, the luminance value graph generation unit 16 generates a vertical luminance value data table by calculating the vertical luminance value of the column of pixels in the vertical direction V in the reference image acquired from the gradation processing unit 14 (S204). ; Vertical direction luminance value data table generation step (luminance value data generation step)). Then, the luminance value graph generation unit 16 generates a luminance value graph using the vertical luminance value data table (S205; luminance value graph generation step (luminance value data generation step)).

次に、基準点検出部17は、輝度値グラフ生成部16によって生成された輝度値グラフを用いて基準点P1を抽出し、当該基準点P1のX座標を対象者の目頭の位置として検出する(S206;基準点検出工程(目頭/目尻検出工程))。次に、黒目中心検出部18は、輝度値グラフ生成部16によって生成された輝度値グラフにおける、簡易輝度値の最大値を起点として当該簡易輝度値の減少が緩やかになる2点を抽出し、当該2点の中心のX座標を表すX軸上の点を対象者の黒目の中心P2として検出する(S207;黒目中心検出工程)。   Next, the reference point detection unit 17 extracts the reference point P1 using the luminance value graph generated by the luminance value graph generation unit 16, and detects the X coordinate of the reference point P1 as the position of the subject's eye. (S206; reference point detection step (eye / eye corner detection step)). Next, the black eye center detection unit 18 extracts two points in the luminance value graph generated by the luminance value graph generation unit 16 from which the simple luminance value gradually decreases starting from the maximum simple luminance value, A point on the X axis representing the X coordinate of the center of the two points is detected as the black eye center P2 of the subject (S207; black eye center detection step).

次に、黒目位置算出部19は、黒目中心検出部18から取得した黒目の中心P2のX座標の値と、基準点検出部17から取得した基準点P1のX座標の値との差を算出することにより、対象者の黒目位置を検出する(S208;黒目位置検出工程)。   Next, the black eye position calculation unit 19 calculates the difference between the X coordinate value of the black eye center P2 acquired from the black eye center detection unit 18 and the X coordinate value of the reference point P1 acquired from the reference point detection unit 17. Thus, the black eye position of the subject is detected (S208; black eye position detection step).

〔実施形態2〕
本発明の他の実施形態について、図1、図17〜図20に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 2]
The following will describe another embodiment of the present invention with reference to FIGS. 1 and 17 to 20. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.

本実施形態に係る黒目位置検出装置2は、前処理部12が強調処理およびフィルタ処理に加えて準備グラデーション処理を行う点で、実施形態1に係る黒目位置検出装置1と異なる。また、本実施形態に係る黒目位置検出装置2は、グラデーション処理部14が、後述する略中心位置を基本グラデーション処理に係る輝度値強調の起点に設定した上で、所定の条件を満たすまで基本グラデーション処理を繰り返す点でも、実施形態1に係る黒目位置検出装置1と異なる。さらに、本実施形態に係る黒目位置検出装置2は、図1に示すように、略中心位置算出部13および条件判定部15をさらに備えている点でも、実施形態1に係る黒目位置検出装置1と異なる。なお、黒目位置検出装置2は、タブレット端末200に内蔵されている。   The black eye position detection device 2 according to the present embodiment is different from the black eye position detection device 1 according to the first embodiment in that the preprocessing unit 12 performs a preparation gradation process in addition to the enhancement process and the filter process. Further, in the black eye position detection device 2 according to the present embodiment, the gradation processing unit 14 sets an approximate center position, which will be described later, as a starting point of luminance value enhancement related to the basic gradation processing, and then the basic gradation until a predetermined condition is satisfied. Also in the point which repeats a process, it differs from the black eye position detection apparatus 1 which concerns on Embodiment 1. FIG. Further, as shown in FIG. 1, the black eye position detection device 2 according to the present embodiment also includes a substantially center position calculation unit 13 and a condition determination unit 15, so that the black eye position detection device 1 according to the first embodiment is also provided. And different. The black eye position detection device 2 is built in the tablet terminal 200.

本実施形態に係る前処理部12が行う準備グラデーション処理は、上記の略中心位置の算出を容易にするためになされる処理であり、その処理内容は、グラデーション処理部14が行う基本グラデーション処理と同様である。すなわち、準備グラデーション処理は、前処理画像の中央部における輝度値と、当該前処理画像の周辺部における輝度値との差を強調する処理のことを指す。   The preparatory gradation process performed by the pre-processing unit 12 according to the present embodiment is a process performed to facilitate the calculation of the above-described approximate center position, and the processing content includes the basic gradation process performed by the gradation processing unit 14 It is the same. That is, the preparatory gradation process refers to a process that emphasizes the difference between the luminance value in the central portion of the preprocessed image and the luminance value in the peripheral portion of the preprocessed image.

また、上記の前処理部12は、前処理画像に対して準備グラデーション処理を施すことにより準備画像を生成する。例えば、図17の(a)に示すような入力画像に対して、強調処理、フィルタ処理および準備グラデーション処理を施すと、図17の(b)に示すような準備画像が生成される。   Further, the preprocessing unit 12 generates a preparation image by performing a preparation gradation process on the preprocessed image. For example, when an enhancement process, a filter process, and a preparation gradation process are performed on an input image as shown in FIG. 17A, a preparation image as shown in FIG. 17B is generated.

略中心位置算出部13は、上記前処理部12から取得した準備画像における輝度値分布の略中心位置を算出する。ここで、「略中心」とは、基準画像の黒目中心に偏重した概略の中心のことであり、例えば、二値化手法が施された基準画像に基づいて検出する。この二値化手法(閾値決定法)としては、例えば、(i)黒目中心検出用の閾値を二値化処理用の閾値として用いる手法(図15の(a)および(b)参照)、(ii)基準画像全体のヒストグラムを生成し、そのピーク値を用いる手法、(iii)基準画像全体の輝度値の平均値を算出し、その平均値を用いる手法、および(i)〜(iii)の各手法で用いる値のいずれかを定数倍した値を用いる手法がある。また、その他の二値化手法を用いても構わない。なお、「略中心」の検出方法としては、二値化手法を用いることなく、例えば、後述する縦方向Vおよび横方向Eの輝度値グラフを用いて画像中の交点を算出する方法を用いて検出しても構わない(図17の(d)参照)。   The approximate center position calculation unit 13 calculates the approximate center position of the luminance value distribution in the preparation image acquired from the preprocessing unit 12. Here, the “substantially center” is an approximate center deviated from the center of the black eye of the reference image, and is detected based on, for example, a reference image on which a binarization method has been applied. As this binarization method (threshold determination method), for example, (i) a method using a black eye center detection threshold value as a threshold value for binarization processing (see (a) and (b) of FIG. 15), ( ii) A method of generating a histogram of the entire reference image and using the peak value, (iii) A method of calculating an average value of luminance values of the entire reference image and using the average value, and (i) to (iii) There is a method using a value obtained by multiplying any of the values used in each method by a constant. Also, other binarization methods may be used. As a method of detecting the “substantially center”, for example, a method of calculating an intersection point in an image using a luminance value graph in the vertical direction V and the horizontal direction E described later is used without using a binarization method. It may be detected (see FIG. 17D).

具体的には、略中心位置算出部13は、準備画像を構成する各画素の輝度値を所定の閾値で二値化処理する。そして、準備画像の略中心位置として、二値化処理によって生成された準備画像中の黒目部分に相当する領域(2次元図形)の図心を算出する。二値化処理の例として、図17の(b)の準備画像に対して二値化処理を施した場合、当該準備画像は、図17の(c)に示すような画像になる。そして、当該画像における最も面積が大きい赤色の領域が、準備画像中の黒目部分に相当する。   Specifically, the approximate center position calculation unit 13 binarizes the luminance value of each pixel constituting the preparation image with a predetermined threshold value. Then, the centroid of the region (two-dimensional figure) corresponding to the black eye portion in the preparation image generated by the binarization process is calculated as the approximate center position of the preparation image. As an example of the binarization process, when the binarization process is performed on the preparation image of FIG. 17B, the preparation image becomes an image as shown in FIG. The red area having the largest area in the image corresponds to the black eye portion in the preparation image.

なお、準備画像の略中心位置の算出方法は、二値化処理に限定されない。例えば、略中心位置算出部13は、準備画像を用いて、図17の(d)における画像の下側のグラフのような準備画像の縦方向Vの輝度値グラフを生成するとともに、当該画像の右側のグラフのような準備画像の横方向Eの輝度値グラフを生成してもよい。そして、図17の(d)に示すように、縦方向Vの輝度値グラフにおいて簡易輝度値が最大値1になる点を通る縦方向Vの直線と、横方向Eの輝度値グラフにおいて簡易輝度値が最大値1になる点を通る横方向Eの直線との交点を算出して、当該交点を略中心位置(図中の「略中心」)としてもよい。但し、この場合において、縦方向Vおよび横方向の簡易輝度値の最大値を「1」で表現する必要はなく、他の値を用いて最大値を表現してもよい。   The method for calculating the approximate center position of the prepared image is not limited to the binarization process. For example, the approximate center position calculation unit 13 uses the preparation image to generate a luminance value graph in the vertical direction V of the preparation image such as the lower graph of the image in FIG. You may produce | generate the luminance value graph of the horizontal direction E of a preparation image like the graph of the right side. Then, as shown in FIG. 17D, the vertical luminance line in the vertical direction V passing through the point where the simple luminance value reaches the maximum value 1 in the vertical direction luminance value graph and the simple luminance in the horizontal direction E luminance value graph. It is also possible to calculate an intersection with a straight line in the horizontal direction E that passes through a point where the value is the maximum value 1, and to set the intersection as a substantially center position (“substantially center” in the figure). However, in this case, it is not necessary to express the maximum value of the simple luminance values in the vertical direction V and the horizontal direction by “1”, and the maximum value may be expressed using other values.

ここで、横方向Eの輝度値グラフとは、横方向Eの画素の列における各輝度値の平均値(もしくは加算値)を示す横方向輝度値と、準備画像の縦方向Vの位置との関係を表すグラフである。横方向Eの輝度値グラフのY軸は、横方向輝度値の最小値を「最大値1」に置換し、横方向輝度値の最大値を「最小値0」に置換した簡易輝度値を表し、X軸は基準画像の下端からの縦方向Vの距離を表す。   Here, the luminance value graph in the horizontal direction E refers to the horizontal luminance value indicating the average value (or the added value) of the luminance values in the column of pixels in the horizontal direction E and the position in the vertical direction V of the preparation image. It is a graph showing a relationship. The Y axis of the luminance value graph in the horizontal direction E represents a simple luminance value in which the minimum value of the horizontal luminance value is replaced with “maximum value 1” and the maximum value of the horizontal luminance value is replaced with “minimum value 0”. The X axis represents the distance in the vertical direction V from the lower end of the reference image.

また、本実施形態では前処理部12が準備グラデーション処理を行っているが、前処理部12が当該処理を行わない場合、略中心位置算出部13が準備グラデーション処理を行ってもよい。   In the present embodiment, the preprocessing unit 12 performs the preparation gradation process. However, when the preprocessing unit 12 does not perform the process, the approximate center position calculation unit 13 may perform the preparation gradation process.

条件判定部15は、後述の多段グラデーション処理において、まず、基本グラデーション処理後の結果画像における右側端部付近または左側端部付近において、輝度値が急峻な変化を示す、第1条件判定用の閾値以下の領域が存在するかを検知する。換言すれば、条件判定部15は、まず基準点P1の検出が可能か否かを第1条件として判定する。条件判定部15は、一旦第1条件を充足すると判定して以降の多段グラデーション処理においては、第1条件を充足するか否かの判定を行わない。なお、第1条件判定用の閾値は、例えば、黒目中心検出部18による黒目中心検出に用いられる黒目位置検出用の閾値の設定と同様の方法で設定することができる。   In the multi-stage gradation process described later, the condition determination unit 15 first has a threshold value for determining a first condition that shows a sharp change in luminance value near the right end or the left end in the result image after the basic gradation process. It detects whether the following areas exist. In other words, the condition determination unit 15 first determines whether or not the reference point P1 can be detected as the first condition. The condition determination unit 15 does not determine whether or not the first condition is satisfied in the subsequent multistage gradation process after determining that the first condition is satisfied once. Note that the first condition determination threshold value can be set, for example, by the same method as the setting of the black eye position detection threshold value used for black eye center detection by the black eye center detection unit 18.

上記の領域の存在を検知した場合(基準点P1の検出が可能と判定した場合)、条件判定部15は、上記の結果画像の略中心位置と、その1回前の処理で生成された結果画像の略中心位置とを結ぶ直線距離を略中心位置の移動量として算出し、当該移動量が第2条件判定用の閾値以下になったか否かを、第2条件として判定する。なお、第2条件判定用の閾値としては、例えば、画像の横幅に対して5%程度の距離を設定することができる。また、第2条件として、多段グラデーション処理の繰り返し回数が所定の回数(例えば、5回)になったことを充足条件としてもよい。   When the presence of the region is detected (when it is determined that the reference point P1 can be detected), the condition determination unit 15 determines the approximate center position of the result image and the result generated by the previous process. A linear distance connecting the approximate center position of the image is calculated as a movement amount of the approximate center position, and it is determined as the second condition whether or not the movement amount is equal to or less than a second condition determination threshold value. As the second condition determination threshold value, for example, a distance of about 5% with respect to the horizontal width of the image can be set. Further, as the second condition, the satisfaction condition may be that the number of repetitions of the multi-stage gradation process is a predetermined number (for example, 5 times).

<本実施形態に係るグラデーション処理部が行う多段グラデーション処理>
本実施形態に係るグラデーション処理部14が行う多段グラデーション処理について、図18を用いて説明する。
<Multistage gradation processing performed by the gradation processing unit according to this embodiment>
The multistage gradation process performed by the gradation processing unit 14 according to the present embodiment will be described with reference to FIG.

まず、多段グラデーション処理の前準備として、図18の(a)に示すように、本実施形態に係る前処理部12が、元画像(入力画像)に対して強調処理、フィルタ処理および初期グラデーション(準備グラデーション処理)を施すことにより、第1結果画像(図中の結果画像1に対応、準備画像)が生成される。   First, as a preparation for multi-stage gradation processing, as shown in FIG. 18A, the preprocessing unit 12 according to the present embodiment performs enhancement processing, filtering processing, and initial gradation (initial gradation) on an original image (input image). By performing the preparation gradation process, a first result image (corresponding to the result image 1 in the figure, a preparation image) is generated.

次に、図18の(c)に示すように、略中心位置算出部13が第1結果画像に対して二値化処理を施すことにより、当該第1結果画像の略中心位置が算出される。そして、本実施形態に係るグラデーション処理部14によって、略中心位置算出部13にて算出された略中心位置を基本グラデーション処理に係る輝度値強調の起点(以下、「グラデーション起点」とする)とした、第1グラデーションパターン(図中のグラデーションパターンNにおけるN=1の場合に対応)が生成される。   Next, as shown in FIG. 18C, the approximate center position calculation unit 13 performs binarization processing on the first result image, thereby calculating the approximate center position of the first result image. . Then, the approximate center position calculated by the approximate center position calculation unit 13 by the gradation processing unit 14 according to the present embodiment is used as a starting point for luminance value enhancement related to basic gradation processing (hereinafter referred to as “gradation starting point”). A first gradation pattern (corresponding to N = 1 in gradation pattern N in the figure) is generated.

次に、図18の(b)に示すように、上記のグラデーション処理部14が、第1結果画像(図中の結果画像NにおけるN=1の場合に対応)に対して第1グラデーションパターンを適用する基本グラデーション処理を施すことにより、結果画像2が生成される。そして、略中心位置算出部13によって第2結果画像の略中心位置が算出される。   Next, as shown in FIG. 18B, the gradation processing unit 14 applies the first gradation pattern to the first result image (corresponding to N = 1 in the result image N in the figure). The result image 2 is generated by performing the applied basic gradation process. Then, the approximate center position of the second result image is calculated by the approximate center position calculation unit 13.

次に、条件判定部15によって第2結果画像からの基準点P1の検出が不可能と判定された場合、本実施形態に係るグラデーション処理部14によって第2グラデーションパターン(図中のグラデーションパターンNにおけるN=2の場合に対応)が生成され、第3結果画像が生成される。一方、条件判定部15によって第2結果画像からの基準点P1の検出が可能と判定された場合、条件判定部15によって第1結果画像の略中心位置から第2結果画像の略中心位置への移動量が算出される。   Next, when the condition determination unit 15 determines that the reference point P1 cannot be detected from the second result image, the gradation processing unit 14 according to the present embodiment uses the second gradation pattern (in the gradation pattern N in the drawing). Corresponding to the case of N = 2), and a third result image is generated. On the other hand, when the condition determination unit 15 determines that the reference point P1 can be detected from the second result image, the condition determination unit 15 changes the approximate center position of the first result image to the approximate center position of the second result image. A movement amount is calculated.

そして、当該移動量が第2条件判定用の閾値以下だった場合、略中心位置の算出、当該略中心位置をグラデーション起点とするグラデーションパターンの生成、および当該グラデーションパターンを用いた基本グラデーション処理は終了する。一方、上記の閾値よりも大きかった場合、上記のグラデーション処理部14によって第3結果画像が生成される。   When the movement amount is equal to or less than the second condition determination threshold value, the calculation of the approximate center position, the generation of the gradation pattern using the approximate center position as the gradation start point, and the basic gradation process using the gradation pattern are completed. To do. On the other hand, when it is larger than the threshold value, the gradation processing unit 14 generates a third result image.

このように、条件判定部15によって基準点P1の検出が可能と判定され、かつ、略中心位置の移動量が第2条件判定用の閾値以下であると判定されるまで、略中心位置の算出、グラデーションパターンの生成および基本グラデーション処理の一連の処理が複数回実行される。そして、前記の一連の処理の繰り返しが多段グラデーション処理となる。多段グラデーション処理によって最終的に生成された基準画像における黒目部分はより強調されたものとなっていることから、黒目位置検出をより精度高く行うことができる。   As described above, the approximate center position is calculated until it is determined by the condition determination unit 15 that the reference point P1 can be detected and the movement amount of the approximate center position is determined to be equal to or less than the second condition determination threshold. A series of processes of generating a gradation pattern and a basic gradation process are executed a plurality of times. The repetition of the series of processes is a multistage gradation process. Since the black eye portion in the reference image finally generated by the multistage gradation process is more emphasized, the black eye position can be detected with higher accuracy.

なお、略中心位置の算出、グラデーションパターンの生成および基本グラデーション処理の一連の処理はそれぞれ1回のみ行われてもよい。すなわち、準備グラデーション処理が施された準備画像に対してグラデーションパターンを適用した結果画像を基準画像としてもよい。この場合、条件判定部15は不要となる。   Note that a series of processes of the calculation of the approximate center position, the generation of the gradation pattern, and the basic gradation process may be performed only once. That is, a result image obtained by applying a gradation pattern to a preparation image that has been subjected to preparation gradation processing may be used as a reference image. In this case, the condition determination part 15 becomes unnecessary.

以上のことから、本実施形態に係るグラデーション処理部14によって実行される多段グラデーション処理では、1回ないし複数回の基本グラデーション処理が実行されることとなる。   From the above, in the multistage gradation process executed by the gradation processing unit 14 according to this embodiment, one or more basic gradation processes are executed.

また、グラデーションパターンの適用対象となる画像として、結果画像の代わりに入力画像を用いてもよい。このように、グラデーションパターンの適用対象となる画像を入力画像に固定することで、基本グラデーション処理を複数回繰り返しても、最終的に生成された基準画像に黒目位置検出の基準となる目頭部分を残しておくことができる。   Further, an input image may be used instead of the result image as an image to which the gradation pattern is applied. In this way, by fixing the image to which the gradation pattern is applied to the input image, even if the basic gradation process is repeated a plurality of times, the head portion that serves as a reference for detecting the black eye position is added to the finally generated reference image. Can be left.

<グラデーションパターンの生成とグラデーション倍率との関係>
次に、図19を用いて、グラデーションパターンの生成とグラデーション倍率との関係について説明する。
<Relationship between gradation pattern generation and gradation magnification>
Next, the relationship between the generation of the gradation pattern and the gradation magnification will be described with reference to FIG.

略中心位置の移動に伴って順次生成されるグラデーションパターンにおいては、生成されたグラデーションパターン毎に、グラデーション処理部14が生成する横方向グラデーション配列の各要素に格納されるグラデーション倍率の値が変動する。したがって、本実施形態に係るグラデーション処理部14は、略中心位置を通る縦方向Vの線を基準として、結果画像の両端に向けて、同じ増加率で直線的にグラデーション倍率が増加するような横方向グラデーション配列を生成する。   In the gradation pattern that is sequentially generated with the movement of the substantially central position, the value of the gradation magnification stored in each element of the horizontal gradation array generated by the gradation processing unit 14 varies for each generated gradation pattern. . Therefore, the gradation processing unit 14 according to the present embodiment uses a line in the vertical direction V that passes through the substantially center position as a reference, so that the gradation magnification increases linearly at the same increase rate toward both ends of the result image. Generate a directional gradient array.

例えば、図19に示すように、略中心位置を通る縦方向Vの線が結果画像の左端から横方向Eにmの位置を通る場合、上記のグラデーション処理部14は、まず、横方向グラデーション配列の要素〔m〕にg倍のグラデーション倍率を格納する。そして、結果画像の両端に向けて1画素当りtの増加率で、順次各要素にグラデーション倍率を格納していく。この場合、グラデーション倍率は、結果画像の中央からずれた位置にあるグラデーション起点から両側に向けて一定の増加率で増加していくことから、最終到達点の要素〔0〕と要素〔w−1〕にはそれぞれ異なる値のグラデーション倍率が格納されることとなる。   For example, as shown in FIG. 19, when a line in the vertical direction V passing through the approximate center position passes through the position m from the left end of the result image in the horizontal direction E, the gradation processing unit 14 first performs the horizontal gradation arrangement. The gradation magnification of g times is stored in the element [m]. Then, the gradation magnification is sequentially stored in each element at an increase rate of t per pixel toward both ends of the result image. In this case, since the gradation magnification increases at a constant increase rate from the gradation starting point at a position shifted from the center of the result image to both sides, the final arrival point element [0] and element [w−1] ], Gradation values of different values are stored.

<本実施形態に係る黒目位置検出装置による対象者の黒目位置の検出方法>
次に、図20を用いて、黒目位置検出装置2による対象者の黒目位置の検出方法について説明する。なお、図20におけるS300からS301まで、およびS308からS311までの各処理については、図16におけるS200からS201まで、およびS206からS208までの処理と同様の処理を行うため、その説明を省略する。
<Method for Detecting Black Eye Position of Subject by Black Eye Position Detection Device According to this Embodiment>
Next, a method for detecting the black eye position of the subject by the black eye position detection device 2 will be described with reference to FIG. Note that the processes from S300 to S301 and S308 to S311 in FIG. 20 are the same as the processes from S200 to S201 and from S206 to S208 in FIG.

図20に示すように、前処理部12は、入力画像に対して強調処理およびフィルタ処理を施した後、さらに準備グラデーション処理を施すことによって、準備画像を生成する(S302;準備画像生成工程)。次に、準備画像の画像データを取得した略中心位置算出部13は、当該準備画像の略中心位置を算出する。そして略中心位置の位置データを取得したグラデーション処理部14は、当該位置データに基づいてグラデーション起点を設定する(S303;グラデーション起点設定工程)。   As shown in FIG. 20, the pre-processing unit 12 generates a preparation image by performing an emphasis process and a filter process on the input image, and further performing a preparation gradation process (S302; preparation image generation step). . Next, the approximate center position calculation unit 13 that has acquired the image data of the preparation image calculates the approximate center position of the preparation image. And the gradation process part 14 which acquired the position data of a substantially center position sets a gradation starting point based on the said position data (S303; gradation starting point setting process).

次に、グラデーション処理部14は、設定したグラデーション起点に基づいてグラデーションパターンを生成し(S304;グラデーションパターン生成工程)、当該グラデーションパターンを準備画像(結果画像)に適用して結果画像を生成する(S305;結果画像生成工程)。   Next, the gradation processing unit 14 generates a gradation pattern based on the set gradation starting point (S304; gradation pattern generation step), and applies the gradation pattern to the preparation image (result image) to generate a result image ( S305: Result image generation step).

次に、結果画像の画像データを取得した条件判定部15は、まず、当該結果画像から基準点P1を検出することが可能か否かを判定する(S306;第1条件判定工程)。S306でNO(以下、「N」と略記する)と判定した場合、条件判定部15は、その旨の判定結果を略中心位置算出部13に送信する。この場合、黒目位置検出装置2は、再びS303からS306までの処理を行う。   Next, the condition determination unit 15 that has acquired the image data of the result image first determines whether or not the reference point P1 can be detected from the result image (S306; first condition determination step). If it is determined NO (hereinafter abbreviated as “N”) in S306, the condition determination unit 15 transmits a determination result to that effect to the approximate center position calculation unit 13. In this case, the black eye position detection device 2 performs the processing from S303 to S306 again.

一方、S306でYES(以下、「Y」と略記する)と判定した場合、条件判定部15はさらに、略中心位置の移動量が第2条件用の閾値以下か否かを判定する(S307第2条件判定工程)。S307でNと判定した場合、条件判定部15は、その旨の判定結果を略中心位置算出部13に送信する。そして、黒目位置検出装置2は、再びS303からS307までの処理を行う。   On the other hand, if it is determined as YES (hereinafter abbreviated as “Y”) in S306, the condition determination unit 15 further determines whether or not the movement amount of the approximate center position is equal to or less than the threshold value for the second condition (S307 No. 1). 2 condition determination process). If it is determined as N in S307, the condition determination unit 15 transmits a determination result to that effect to the approximate center position calculation unit 13. Then, the black eye position detection device 2 performs the processing from S303 to S307 again.

一方、S307でYと判定した場合、条件判定部15は、その旨の判定結果をグラデーション処理部14に送信する。判定結果を受信したグラデーション処理部14は、最終的に生成した結果画像を基準画像として、その画像データを輝度値グラフ生成部16に送信する。そして、黒目位置検出装置2は、輝度値グラフを生成した上でS308以下の各処理を実行する。   On the other hand, if it is determined as Y in S307, the condition determination unit 15 transmits a determination result to that effect to the gradation processing unit 14. The gradation processing unit 14 that has received the determination result uses the finally generated result image as a reference image, and transmits the image data to the luminance value graph generation unit 16. Then, the black eye position detection device 2 generates a luminance value graph and then executes each process from S308 onward.

〔実施形態3〕
黒目位置検出装置1および2の制御ブロック(特に制御部50)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
[Embodiment 3]
The control blocks (particularly the control unit 50) of the black-eye position detection devices 1 and 2 may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or a CPU (Central Processing Unit) may be realized. And may be realized by software.

後者の場合、黒目位置検出装置1および2は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、当該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。   In the latter case, the black-eye position detection devices 1 and 2 include a CPU that executes instructions of a program that is software that implements each function, and a ROM (Read Only Memory) or a storage device (these are referred to as “recording media”), a RAM (Random Access Memory) for expanding the program, and the like. And the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it. As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. The present invention can also be realized in the form of a data signal embedded in a carrier wave in which the program is embodied by electronic transmission.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   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.

1、2 黒目位置検出装置
12 前処理部
13 略中心位置算出部
14 グラデーション処理部
16 輝度値グラフ生成部(輝度値データ生成部)
17 基準点検出部(目頭/目尻検出部)
18 黒目中心検出部
100、200 タブレット端末(電子機器)
DESCRIPTION OF SYMBOLS 1, 2 Black eye position detection apparatus 12 Pre-processing part 13 Substantially center position calculation part 14 Gradation processing part 16 Luminance value graph generation part (luminance value data generation part)
17 Reference point detector (eye / eye corner detector)
18 Black eye center detection unit 100, 200 Tablet terminal (electronic equipment)

Claims (6)

複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像に対して、上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する基本グラデーション処理を施すことにより、基準画像を生成するグラデーション処理部と、
上記グラデーション処理部にて生成された上記基準画像において縦方向に並ぶ複数の画素の輝度値の積算を示す縦方向輝度値と、上記基準画像の横方向の位置との関係を表す輝度値データを生成する輝度値データ生成部と、
上記輝度値データから、上記縦方向輝度値が急峻な変化を示す上記基準画像の端部付近の位置を抽出し、その抽出された位置を上記対象者の目頭または目尻の位置として検出する目頭/目尻検出部と、
上記輝度値データにおいて連続的に変化する各縦方向輝度値と、上記目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域について、上記基準画像の横方向の2点を抽出し、その抽出された2点の中心を上記対象者の黒目の中心として検出する黒目中心検出部と、を備えていることを特徴とする黒目位置検出装置。
Emphasizes the difference between the brightness value at the center of the input image and the brightness value at the periphery of the input image for the input image that represents the subject's eyes by the brightness value of each pixel in the plurality of pixels A gradation processing unit that generates a reference image by performing basic gradation processing,
Luminance value data representing the relationship between the vertical luminance value indicating the integration of the luminance values of a plurality of pixels arranged in the vertical direction in the reference image generated by the gradation processing unit and the horizontal position of the reference image. A luminance value data generation unit to generate;
From the luminance value data, a position near the end of the reference image showing a steep change in the vertical luminance value is extracted, and the extracted position is detected as the position of the eye or the eye corner of the subject. An eye corner detection unit;
For the region where the difference between each vertical luminance value continuously changing in the luminance value data and the vertical luminance value corresponding to the position of the eye or the corner of the eye continuously decreases from the maximum value, A black-eye position detecting device, comprising: a black-eye center detecting unit that extracts two horizontal points and detects the center of the two extracted points as the center of the subject's black eye.
(i)上記入力画像に対して、上記複数の画素における各画素の輝度値の高低の差を強調する強調処理、(ii)上記複数の画素における各画素に最小値フィルタまたは最大値フィルタをかけるフィルタ処理、および(iii)上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する準備グラデーション処理の少なくともいずれかの処理を施すことにより、前処理画像を生成する前処理部をさらに備えており、
上記グラデーション処理部は、上記前処理画像を、複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像として、上記基本グラデーション処理の対象画像とすることを特徴とする請求項1に記載の黒目位置検出装置。
(I) enhancement processing for emphasizing a difference in brightness value of each pixel in the plurality of pixels with respect to the input image, and (ii) applying a minimum value filter or a maximum value filter to each pixel in the plurality of pixels. A pre-processed image by performing at least one of a filtering process and (iii) a preparatory gradation process that emphasizes a difference between a luminance value at a central portion of the input image and a luminance value at a peripheral portion of the input image Is further provided with a preprocessing unit for generating
The gradation processing unit sets the preprocessed image as a target image of the basic gradation process as an input image representing the eye of the subject by the brightness value of each pixel in a plurality of pixels. Item 2. The black eye position detection device according to Item 1.
上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する準備グラデーション処理を行い、当該準備グラデーション処理後の準備画像における輝度値分布の略中心位置を算出する略中心位置算出部をさらに備え、
上記グラデーション処理部は、上記略中心位置を上記基本グラデーション処理に係る輝度値強調の起点に設定することを特徴とする請求項1または2に記載の黒目位置検出装置。
Perform a preparatory gradation process that emphasizes the difference between the luminance value at the center of the input image and the luminance value at the periphery of the input image, and calculate the approximate center position of the luminance value distribution in the preparatory image after the preparatory gradation process An approximate center position calculation unit,
The black eye position detection apparatus according to claim 1, wherein the gradation processing unit sets the substantially center position as a starting point of luminance value enhancement related to the basic gradation process.
請求項1から3のいずれか1項に記載の黒目位置検出装置を備えていることを特徴とする電子機器。   An electronic apparatus comprising the black eye position detection device according to claim 1. コンピュータを、請求項1から3のいずれか1項に記載の黒目位置検出装置における各部として機能させるためのプログラム。   The program for functioning a computer as each part in the black-eye position detection apparatus of any one of Claim 1 to 3. 複数の画素における各画素の輝度値の高低により対象者の眼を表した入力画像に対して、上記入力画像の中央部における輝度値と、上記入力画像の周辺部における輝度値との差を強調する基本グラデーション処理を施すことにより、基準画像を生成するグラデーション処理工程と、
上記グラデーション処理工程にて生成された上記基準画像において、縦方向に並ぶ複数の画素の輝度値の積算を示す縦方向輝度値と、上記基準画像の横方向の位置との関係を表す輝度値データを生成する輝度値データ生成工程と、
上記輝度値データ生成工程にて生成された上記輝度値データから、上記縦方向輝度値が急峻な変化を示す上記基準画像の端部付近の位置を抽出し、その抽出された位置を上記対象者の目頭または目尻の位置として検出する目頭/目尻検出工程と、
上記輝度値データ生成工程にて生成された上記輝度値データにおいて連続的に変化する各縦方向輝度値と、上記目頭または目尻の位置に対応する縦方向輝度値との差分が、最大値から連続的に減少する領域について、上記基準画像の横方向の2点を抽出し、その抽出された2点の中心を上記対象者の黒目の中心として検出する黒目中心検出工程と、を含むことを特徴とする黒目位置検出方法。
Emphasizes the difference between the brightness value at the center of the input image and the brightness value at the periphery of the input image for the input image that represents the subject's eyes by the brightness value of each pixel in the plurality of pixels A gradation processing step for generating a reference image by performing basic gradation processing,
In the reference image generated in the gradation processing step, luminance value data representing a relationship between a vertical luminance value indicating integration of luminance values of a plurality of pixels arranged in the vertical direction and a horizontal position of the reference image. Luminance value data generation step for generating
From the luminance value data generated in the luminance value data generation step, a position near the end of the reference image where the vertical luminance value shows a sharp change is extracted, and the extracted position is extracted from the target person. An eye / eye corner detection process for detecting the position of the eye's eye or the eye corner;
The difference between each vertical luminance value that continuously changes in the luminance value data generated in the luminance value data generation step and the vertical luminance value corresponding to the position of the top or bottom of the eye is continuously from the maximum value. And a black eye center detecting step for extracting two points in the lateral direction of the reference image and detecting the center of the two extracted points as the center of the eye of the subject. The black eye position detection method.
JP2015215173A 2015-10-30 2015-10-30 Iris position detection device, electronic apparatus, program, and iris position detection method Pending JP2017084302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015215173A JP2017084302A (en) 2015-10-30 2015-10-30 Iris position detection device, electronic apparatus, program, and iris position detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015215173A JP2017084302A (en) 2015-10-30 2015-10-30 Iris position detection device, electronic apparatus, program, and iris position detection method

Publications (1)

Publication Number Publication Date
JP2017084302A true JP2017084302A (en) 2017-05-18

Family

ID=58710976

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015215173A Pending JP2017084302A (en) 2015-10-30 2015-10-30 Iris position detection device, electronic apparatus, program, and iris position detection method

Country Status (1)

Country Link
JP (1) JP2017084302A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019111421A1 (en) * 2017-12-04 2019-06-13 パナソニックIpマネジメント株式会社 Display device and reception terminal
CN110942043A (en) * 2019-12-02 2020-03-31 深圳市迅雷网络技术有限公司 Pupil image processing method and related device
JP2023509750A (en) * 2020-01-08 2023-03-09 シャンハイ センスタイム リンガン インテリジェント テクノロジー カンパニー リミテッド Facial expression identification method and device, equipment, computer-readable storage medium, and computer program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019111421A1 (en) * 2017-12-04 2019-06-13 パナソニックIpマネジメント株式会社 Display device and reception terminal
CN110942043A (en) * 2019-12-02 2020-03-31 深圳市迅雷网络技术有限公司 Pupil image processing method and related device
CN110942043B (en) * 2019-12-02 2023-11-14 深圳市迅雷网络技术有限公司 Pupil image processing method and related device
JP2023509750A (en) * 2020-01-08 2023-03-09 シャンハイ センスタイム リンガン インテリジェント テクノロジー カンパニー リミテッド Facial expression identification method and device, equipment, computer-readable storage medium, and computer program

Similar Documents

Publication Publication Date Title
US11948282B2 (en) Image processing apparatus, image processing method, and storage medium for lighting processing on image using model data
US10304164B2 (en) Image processing apparatus, image processing method, and storage medium for performing lighting processing for image data
US10002463B2 (en) Information processing apparatus, information processing method, and storage medium, for enabling accurate detection of a color
JP6257840B2 (en) System and method for liveness analysis
CN108537155B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US9750420B1 (en) Facial feature selection for heart rate detection
EP3896643A1 (en) Image processing apparatus and control method thereof
US8675970B2 (en) Image processing apparatus, image processing method, and image processing program
JP2020536457A (en) Image processing methods and devices, electronic devices, and computer-readable storage media
JP4739870B2 (en) Sunglasses detection device and face center position detection device
EP3113112A1 (en) Apparatus for and method of processing image based on object region
JP2008234208A (en) Facial region detection apparatus and program
US10839529B2 (en) Image processing apparatus and image processing method, and storage medium
US20150351682A1 (en) Wrinkle detection apparatus and wrinkle detection method
US9536172B2 (en) Image processing apparatus, image processing method, and storage medium for checking an exposure state of captured image data
US20160180514A1 (en) Image processing method and electronic device thereof
US9147115B2 (en) Method and device for detecting an object in an image
US20190025911A1 (en) Non-transitory computer-readable storage medium, information processing apparatus, and information processing method
JP2017084302A (en) Iris position detection device, electronic apparatus, program, and iris position detection method
US9367767B2 (en) Data processor and computer-readable non-volatile recording medium for storing program for data processing
US9323981B2 (en) Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored
US11250586B2 (en) Information processing apparatus and information processing method
JPWO2018011928A1 (en) Image processing apparatus, operation method of image processing apparatus, and operation program of image processing apparatus
US20230025743A1 (en) Runtime optimised artificial vision
KR101525626B1 (en) Apparatus and method for out-focasing