JP2019097807A - Pupil detector - Google Patents

Pupil detector Download PDF

Info

Publication number
JP2019097807A
JP2019097807A JP2017231029A JP2017231029A JP2019097807A JP 2019097807 A JP2019097807 A JP 2019097807A JP 2017231029 A JP2017231029 A JP 2017231029A JP 2017231029 A JP2017231029 A JP 2017231029A JP 2019097807 A JP2019097807 A JP 2019097807A
Authority
JP
Japan
Prior art keywords
image
pupil
detection
face
candidate
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.)
Withdrawn
Application number
JP2017231029A
Other languages
Japanese (ja)
Inventor
俊佑 梅村
Shunsuke Umemura
俊佑 梅村
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.)
Alps Alpine Co Ltd
Original Assignee
Alps Alpine Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alps Alpine Co Ltd filed Critical Alps Alpine Co Ltd
Priority to JP2017231029A priority Critical patent/JP2019097807A/en
Publication of JP2019097807A publication Critical patent/JP2019097807A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Eye Examination Apparatus (AREA)

Abstract

To improve robustness of pupil detection.SOLUTION: A pupil detector includes: an image acquisition unit for acquiring a first face image and a second face image of an object person; a template image setting unit for setting a portion of the first face image including the pupil of the object person to a template image; a score calculation unit for calculating a score according to a difference in brightness between a candidate image, which is a portion of the second face image, and the template image for a plurality of the candidate images; an image-for-detection selection unit for selecting an image for detection from a plurality of the candidate images based on the score; and a pupil detection unit for detecting the pupil of the object person based on the template image and the image for detection.SELECTED DRAWING: Figure 2

Description

本発明は、瞳孔検出装置に関する。   The present invention relates to a pupil detection device.

近年、対象者の顔を撮影した明瞳孔画像及び暗瞳孔画像から対象者の瞳孔を検出し、検出した瞳孔の座標に基づいて、対象者の視線方向を推定する視線検出技術が利用されている。この視線検出技術では、瞳孔をより確実に検出するために、撮影タイミングが異なる明瞳孔画像と暗瞳孔画像との位置ずれを補正することが重要となる。従来、位置ずれを補正する方法として、明瞳孔画像及び暗瞳孔画像からそれぞれ特徴点(鼻孔など)を検出し、検出した特徴点の位置ずれの分だけ、明瞳孔画像及び暗瞳孔画像の位置を補正する方法が提案されている。   In recent years, gaze detection technology has been used that detects the pupil of a subject from a bright pupil image and a dark pupil image of the subject's face and estimates the gaze direction of the subject based on the detected coordinates of the pupil. . In this gaze detection technology, in order to detect the pupil more reliably, it is important to correct the positional deviation between the bright pupil image and the dark pupil image which are different in imaging timing. Conventionally, as a method of correcting positional deviation, feature points (nostrils etc.) are respectively detected from the bright pupil image and the dark pupil image, and the positions of the bright pupil image and the dark pupil image are A method of correction has been proposed.

特開2007−268026号公報JP 2007-268026 A 特開2008−29702号公報JP, 2008-29702, A

しかしながら、上記従来の方法では、マスクなどにより特徴点(鼻孔など)が隠されていた場合、当該特徴点に基づいて明瞳孔画像及び暗瞳孔画像の位置ずれを補正できず、瞳孔を検出できないおそれがあった。すなわち、従来の方法では、瞳孔検出のロバスト性が低いという問題があった。   However, in the above-described conventional method, when a feature point (such as a nostril) is hidden by a mask or the like, positional deviation of the bright pupil image and the dark pupil image can not be corrected based on the feature point and the pupil may not be detected. was there. That is, the conventional method has a problem that the robustness of pupil detection is low.

本発明は、上記の課題に鑑みてなされたものであり、瞳孔検出のロバスト性を向上させることを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to improve the robustness of pupil detection.

一実施形態に係る瞳孔検出装置は、対象者の第1顔画像及び第2顔画像を取得する画像取得部と、前記第1顔画像の前記対象者の瞳孔を含む一部をテンプレート画像に設定するテンプレート画像設定部と、前記第2顔画像の一部である候補画像と、前記テンプレート画像と、の輝度差に応じたスコアを、複数の前記候補画像について算出するスコア算出部と、前記スコアに基づいて、複数の前記候補画像の中から検出用画像を選択する検出用画像選択部と、前記テンプレート画像及び前記検出用画像に基づいて、前記対象者の瞳孔を検出する瞳孔検出部と、を備える。   The pupil detection device according to one embodiment sets an image acquisition unit for acquiring a first face image and a second face image of a subject, and a part of the first face image including the pupil of the subject as a template image A score calculation unit that calculates, for a plurality of the candidate images, a score according to a luminance difference between the template image setting unit, the candidate image that is a part of the second face image, and the template image; A detection image selection unit that selects a detection image from among a plurality of candidate images based on the above, and a pupil detection unit that detects a pupil of the subject based on the template image and the detection image; Equipped with

本発明の各実施形態によれば、瞳孔検出のロバスト性の向上を実現できる。   According to each embodiment of the present invention, improvement in robustness of pupil detection can be realized.

瞳孔検出装置のハードウェア構成の一例を示す図。The figure which shows an example of the hardware constitutions of a pupil detection apparatus. 瞳孔検出装置の機能構成の一例を示す図。The figure which shows an example of a function structure of a pupil detection apparatus. 第1顔画像、第2顔画像、及びテンプレート画像の一例を示す図。The figure which shows an example of a 1st face image, a 2nd face image, and a template image. 瞳孔検出装置が実行する処理の一例を示すフローチャート。The flowchart which shows an example of the process which a pupil detection apparatus performs.

以下、本発明の各実施形態について、添付の図面を参照しながら説明する。なお、各実施形態に係る明細書及び図面の記載に関して、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重畳した説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the attached drawings. In addition, regarding the description of the specification and drawings according to each embodiment, the same reference numerals are given to components having substantially the same functional configuration, and the overlapping description will be omitted.

第1実施形態に係る瞳孔検出装置100について、図1〜図4を参照して説明する。本実施形態に係る瞳孔検出装置100は、対象者の顔を撮影した第1顔画像Im1及び第2顔画像Im2から対象者の瞳孔を検出する装置である。瞳孔検出装置100の検出結果は、瞳孔の座標を利用して対象者の視線を検出する視線検出装置で利用される。   The pupil detection device 100 according to the first embodiment will be described with reference to FIGS. 1 to 4. The pupil detection apparatus 100 according to the present embodiment is an apparatus for detecting the pupil of the subject from the first face image Im1 and the second face image Im2 obtained by photographing the face of the subject. The detection result of the pupil detection device 100 is used by a gaze detection device that detects the gaze of the subject using coordinates of the pupil.

以下、瞳孔検出装置100が、車両の運転者の瞳孔を検出する車載装置である場合を例に説明する。この場合、瞳孔検出装置100が搭載された車両の運転者が、瞳孔検出装置100の対象者に相当する。   Hereinafter, a case where the pupil detection device 100 is an on-vehicle device that detects a pupil of a driver of a vehicle will be described as an example. In this case, the driver of the vehicle on which the pupil detection device 100 is mounted corresponds to the subject of the pupil detection device 100.

まず、瞳孔検出装置100のハードウェア構成について説明する。図1は、瞳孔検出装置100のハードウェア構成の一例を示す図である。図1の瞳孔検出装置100は、撮影装置1と、制御装置2と、を備える。   First, the hardware configuration of pupil detection apparatus 100 will be described. FIG. 1 is a diagram showing an example of a hardware configuration of pupil detection apparatus 100. As shown in FIG. The pupil detection device 100 of FIG. 1 includes an imaging device 1 and a control device 2.

撮影装置1は、運転者の顔を撮影し、顔画像を取得する装置であり、制御装置2に接続される。撮影装置1は、運転者の顔を撮影可能な位置(運転席の前方)に配置される。図1の撮影装置1は、撮影部11L,11Rと、複数の光源12L,12Rと、を備える。   The photographing device 1 is a device for photographing a face of a driver and acquiring a face image, and is connected to the control device 2. The photographing device 1 is disposed at a position where the face of the driver can be photographed (in front of the driver's seat). The imaging device 1 of FIG. 1 includes imaging units 11L and 11R, and a plurality of light sources 12L and 12R.

撮影部11Lは、運転者の顔を撮影するカメラであり、図1における撮影装置1の左側に配置される。撮影部11Rは、運転者の顔を撮影するカメラであり、図1における撮影装置1の右側に配置される。以下、撮影部11L,11Rを区別しない場合、撮影部11と称する。   The photographing unit 11L is a camera for photographing the face of the driver, and is disposed on the left side of the photographing device 1 in FIG. The photographing unit 11R is a camera for photographing the face of the driver, and is disposed on the right side of the photographing device 1 in FIG. Hereinafter, when the imaging units 11L and 11R are not distinguished from one another, they are referred to as the imaging unit 11.

光源12Lは、運転者の顔を撮影する際に、運転者の顔に所定のタイミングで光を照射する光源であり、撮影部11Lの近傍に複数配置される。光源12Rは、運転者の顔を撮影する際に、運転者の顔に所定のタイミングで光を照射する光源であり、撮影部11Rの近傍に複数配置される。光源12L,12Rは、例えば、近赤外光を照射するLED(Light Emitting Diode)であるが、これに限られない。以下、光源12L,12Rを区別しない場合、光源12と称する。   The light source 12L is a light source that emits light to the driver's face at a predetermined timing when shooting the driver's face, and a plurality of light sources 12L are arranged in the vicinity of the imaging unit 11L. The light source 12R is a light source that emits light to the driver's face at a predetermined timing when shooting the driver's face, and a plurality of light sources 12R are arranged in the vicinity of the photographing unit 11R. The light sources 12L and 12R are, for example, LEDs (Light Emitting Diodes) that emit near infrared light, but are not limited thereto. Hereinafter, when the light sources 12L and 12R are not distinguished from one another, they are referred to as a light source 12.

なお、図1の例では、撮影装置1は、2つの撮影部11を備えるが、1つ又は3つの撮影部11を備えてもよい。撮影部11が1つの場合、撮影装置1は、撮影部11に対して略同軸の光源12と非同軸の光源12とをそれぞれ備えれば良い。また、図1の例では、撮影装置1は、それぞれ4つの光源12L,12Rを備えるが、光源12L,12Rの数は任意に設計可能である。   In the example of FIG. 1, although the imaging device 1 includes the two imaging units 11, the imaging device 1 may include one or three imaging units 11. In the case where one imaging unit 11 is provided, the imaging apparatus 1 may include the light source 12 substantially coaxial with the imaging unit 11 and the light source 12 non-coaxial. Further, in the example of FIG. 1, the imaging device 1 includes four light sources 12L and 12R, but the number of light sources 12L and 12R can be arbitrarily designed.

制御装置2は、撮影装置1を制御する装置であり、撮影装置1に接続される。具体的には、制御装置2は、撮影部11による撮影及び光源12の発光を制御する。また、制御装置2は、撮影装置1により取得された第1顔画像Im1及び第2顔画像Im2から運転者の瞳孔を検出する。   The control device 2 is a device that controls the imaging device 1 and is connected to the imaging device 1. Specifically, the control device 2 controls the photographing by the photographing unit 11 and the light emission of the light source 12. Further, the control device 2 detects the pupil of the driver from the first face image Im1 and the second face image Im2 acquired by the imaging device 1.

図1の制御装置2は、CPU(Central Processing Unit)201と、ROM(Read Only Memory)202と、RAM(Random Access Memory)203と、HDD(Hard Disk Drive)204と、入力装置205と、表示装置206と、を備える。また、制御装置2は、接続インタフェース207と、通信インタフェース208と、バス209と、を備える。   The control device 2 in FIG. 1 includes a central processing unit (CPU) 201, a read only memory (ROM) 202, a random access memory (RAM) 203, a hard disk drive (HDD) 204, an input device 205, and a display. And an apparatus 206. Further, the control device 2 includes a connection interface 207, a communication interface 208, and a bus 209.

CPU201は、プログラムを実行することにより、制御装置2の各ハードウェア構成を制御し、瞳孔検出装置100の機能を実現する。   The CPU 201 executes each program to control each hardware configuration of the control device 2 to realize the function of the pupil detection device 100.

ROM202は、CPU201が実行するプログラムや各種のデータを記憶する。   The ROM 202 stores programs executed by the CPU 201 and various data.

RAM203は、CPU201に作業領域を提供する。   The RAM 203 provides the CPU 201 with a work area.

HDD204は、CPU201が実行するプログラムや各種のデータを記憶する。   The HDD 204 stores programs executed by the CPU 201 and various data.

入力装置205は、運転者を含むユーザの操作に応じた情報を制御装置2に入力する。入力装置205は、例えば、タッチパネル、キーボード、マウス、ハードウェアボタンなどである。   The input device 205 inputs information to the control device 2 according to the operation of the user including the driver. The input device 205 is, for example, a touch panel, a keyboard, a mouse, a hardware button, or the like.

表示装置206は、運転者を含むユーザの操作に応じた画面を表示する。表示装置206は、例えば、液晶ディスプレイ、有機EL(Electro Luminescence)ディスプレイなどである。   The display device 206 displays a screen according to the operation of the user including the driver. The display device 206 is, for example, a liquid crystal display, an organic EL (Electro Luminescence) display, or the like.

接続インタフェース207は、制御装置2を撮影装置1に接続するためのインタフェースである。制御装置2は、接続インタフェース207を介して、撮影装置1を制御し、撮影装置1から画像(画像データ)を取得する。   The connection interface 207 is an interface for connecting the control device 2 to the imaging device 1. The control device 2 controls the imaging device 1 via the connection interface 207 and acquires an image (image data) from the imaging device 1.

通信インタフェース208は、制御装置2をCAN(Controller Area Network)、インターネット、LAN(Local Area Network)などのネットワークに接続するためのインタフェースである。制御装置2は、通信インタフェース208を介して、ネットワーク上の外部装置(ECU(Electronic Control Unit)など)と通信する。   The communication interface 208 is an interface for connecting the control device 2 to a network such as a controller area network (CAN), the Internet, or a local area network (LAN). The control device 2 communicates with an external device (such as an ECU (Electronic Control Unit)) on the network via the communication interface 208.

バス209は、CPU201、ROM202、RAM203、HDD204、入力装置205、表示装置206、接続インタフェース207、及び通信インタフェース208を相互に接続する。   The bus 209 mutually connects the CPU 201, the ROM 202, the RAM 203, the HDD 204, the input device 205, the display device 206, the connection interface 207, and the communication interface 208.

なお、図1の例では、制御装置2が車載のコンピュータにより構成される場合を想定している。しかしながら、制御装置2は、FPGA(Field Programmable Gate Array)やASIC(Application Specified Integrated Circuit)などのICにより、1チップで構成されてもよい。この場合、制御装置2は、HDD204、入力装置205、及び表示装置206を備えない。また、制御装置2は、車両に搭載された撮影装置1とネットワークを介して接続されたPC(Personal Computer)、サーバ、タブレット端末、スマートフォンなどのコンピュータにより構成されてもよい。   In addition, in the example of FIG. 1, the case where the control apparatus 2 is comprised by a vehicle-mounted computer is assumed. However, the control device 2 may be configured in one chip by an IC such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specified Integrated Circuit). In this case, the control device 2 does not include the HDD 204, the input device 205, and the display device 206. Further, the control device 2 may be configured by a computer such as a PC (Personal Computer), a server, a tablet terminal, a smartphone, etc. connected via a network to the imaging device 1 mounted on a vehicle.

次に、瞳孔検出装置100の機能構成について説明する。図2は、瞳孔検出装置100の機能構成の一例を示す図である。図2の瞳孔検出装置100は、画像取得部21と、画像記憶部22と、テンプレート画像設定部23と、スコア算出部24と、検出用画像選択部25と、瞳孔検出部26と、を備える。これらの各機能構成は、制御装置2のCPU201がプログラムを実行し、瞳孔検出装置100の各ハードウェア構成と協働することにより実現される。   Next, the functional configuration of pupil detection device 100 will be described. FIG. 2 is a diagram showing an example of a functional configuration of the pupil detection device 100. As shown in FIG. The pupil detection device 100 of FIG. 2 includes an image acquisition unit 21, an image storage unit 22, a template image setting unit 23, a score calculation unit 24, a detection image selection unit 25, and a pupil detection unit 26. . Each functional configuration is realized by the CPU 201 of the control device 2 executing a program and cooperating with each hardware configuration of the pupil detection device 100.

画像取得部21は、撮影装置1を制御し、異なる撮影タイミングで運転者の顔を撮影した第1顔画像Im1及び第2顔画像Im2を取得する。具体的には、画像取得部21は、撮影装置1に運転者の顔を所定の撮影間隔で撮影させ、当該撮影間隔で第1顔画像Im1及び第2顔画像Im2を取得する。撮影間隔は、例えば、1msec以上100msec以下である。第1顔画像Im1は、明瞳孔画像及び暗瞳孔画像の一方であり、第2顔画像Im2は、明瞳孔画像及び暗瞳孔画像の他方である。   The image acquisition unit 21 controls the imaging device 1 to acquire a first face image Im1 and a second face image Im2 obtained by imaging the driver's face at different imaging timings. Specifically, the image acquisition unit 21 causes the imaging device 1 to capture the face of the driver at a predetermined imaging interval, and acquires the first face image Im1 and the second face image Im2 at the imaging interval. The imaging interval is, for example, 1 msec or more and 100 msec or less. The first face image Im1 is one of a bright pupil image and a dark pupil image, and the second face image Im2 is the other of the bright pupil image and the dark pupil image.

明瞳孔画像は、運転者の瞳孔が明るく撮影された顔画像である。明瞳孔画像は、光源12から運転者の顔に光を照射した状態で、当該光源12と略同軸の撮影部11により運転者の顔を撮影することにより取得される。このように撮影することにより、光源12からの光が、運転者の網膜により、撮影部11の方向に反射するため、運転者の瞳孔が明るく撮影される。図1の撮影装置1では、光源12Lから運転者の顔に光を照射した状態で、撮影部11Lにより運転者の顔を撮影することにより、明瞳孔画像が取得される。また、光源12Rから運転者の顔に光を照射した状態で、撮影部11Rにより運転者の顔を撮影することにより、明瞳孔画像が取得される。   The bright pupil image is a face image in which the driver's pupil is photographed brightly. The bright pupil image is obtained by capturing an image of the driver's face with the imaging unit 11 substantially coaxial with the light source 12 in a state where the light is emitted from the light source 12 to the driver's face. By photographing in this manner, the light from the light source 12 is reflected in the direction of the photographing unit 11 by the retina of the driver, so that the pupil of the driver is photographed brightly. In the imaging device 1 of FIG. 1, a bright pupil image is obtained by imaging the driver's face with the imaging unit 11L in a state where light is emitted from the light source 12L to the driver's face. In addition, a light pupil image is acquired by photographing the driver's face with the imaging unit 11R in a state where light is emitted from the light source 12R to the driver's face.

暗瞳孔画像は、運転者の瞳孔が、明瞳孔画像に比べて暗く撮影された顔画像である。暗瞳孔画像は、光源12から運転者の顔に光を照射した状態で、当該光源12と非同軸の撮影部11により運転者の顔を撮影することにより取得される。このように撮影することにより、光源12からの光が、運転者の網膜により、撮影部11とは異なる方向に反射するため、運転者の瞳孔が暗く撮影される。図1の撮影装置1では、光源12Lから運転者の顔に光を照射した状態で、撮影部11Rにより運転者の顔を撮影することにより、暗瞳孔画像が取得される。また、光源12Rから運転者の顔に光を照射した状態で、撮影部11Lにより運転者の顔を撮影することにより、暗瞳孔画像が取得される。   The dark pupil image is a face image in which the driver's pupil is photographed darker than the bright pupil image. The dark pupil image is obtained by photographing the driver's face with the imaging unit 11 that is not coaxial with the light source 12 in a state in which light is emitted from the light source 12 to the driver's face. By photographing in this manner, the light from the light source 12 is reflected by the driver's retina in a direction different from that of the photographing unit 11, so that the pupil of the driver is photographed dark. In the imaging device 1 of FIG. 1, a dark pupil image is obtained by imaging the driver's face with the imaging unit 11R in a state where light is emitted from the light source 12L to the driver's face. In addition, a dark pupil image is obtained by photographing the driver's face with the imaging unit 11L in a state where the light is emitted from the light source 12R to the driver's face.

画像記憶部22は、第1顔画像Im1、第2顔画像Im2、テンプレート画像Imt、及び差分画像など画像を記憶する。   The image storage unit 22 stores images such as a first face image Im1, a second face image Im2, a template image Imt, and a difference image.

テンプレート画像設定部23は、画像記憶部22に記憶された第1顔画像Im1の一部を、テンプレート画像Imtに設定する。テンプレート画像Imtは、後述するテンプレートマッチングに利用される画像である。テンプレート画像設定部23は、第1顔画像Im1における、運転者の瞳孔を含む任意のサイズの部分をテンプレート画像Imtとして設定する。瞳孔を含むテンプレート画像Imtを設定する方法として、機械学習や顔の輪郭の検出により、第1顔画像Im1から顔を検出し、当該顔において瞳孔が含まれると考えられる部分(例えば、顔の上半分など)をテンプレート画像Imtとして設定する方法が考えられる。なお、テンプレート画像Imtは、サイズが小さい方が好ましい。これにより、テンプレートマッチングを高速化できる。   The template image setting unit 23 sets a part of the first face image Im1 stored in the image storage unit 22 as a template image Imt. The template image Imt is an image used for template matching described later. The template image setting unit 23 sets, as the template image Imt, a portion of the first face image Im1 that has an arbitrary size including the pupil of the driver. As a method of setting a template image Imt including a pupil, a face is detected from the first face image Im1 by machine learning or detection of the contour of a face, and a portion where the pupil is considered to be included in the face (for example, It is conceivable to set half) as the template image Imt. The template image Imt is preferably smaller in size. This can speed up template matching.

スコア算出部24は、テンプレートマッチングにより、複数の第2顔画像Im2の部分画像(以下「候補画像Imc」という。)について、テンプレート画像Imtとの間の輝度差に応じたスコアを算出する。候補画像Imcは、後述する検出用画像Imdの候補となる画像である。スコア算出部24は、第2顔画像Im2の中から、テンプレート画像Imtと同じサイズの部分画像を候補画像Imcとして選択し、選択した候補画像Imcと、テンプレート画像Imtと、の差分画像を生成し、生成した差分画像の輝度の平均値や積算値を、当該候補画像Imcのスコアとして算出する。候補画像Imcとテンプレート画像Imtとが類似するほど、差分画像の輝度は小さくなるため、スコアが小さくなる。すなわち、候補画像Imcとテンプレート画像Imtとが類似するほど、スコアは小さくなる。   The score calculation unit 24 calculates a score according to the luminance difference between the partial images of the plurality of second face images Im2 (hereinafter referred to as “candidate image Imc”) and the template image Imt by template matching. The candidate image Imc is an image to be a candidate for the detection image Imd described later. The score calculation unit 24 selects a partial image of the same size as the template image Imt as the candidate image Imc from the second face image Im2, and generates a difference image of the selected candidate image Imc and the template image Imt. The average value or the integrated value of the luminance of the generated difference image is calculated as the score of the candidate image Imc. As the candidate image Imc and the template image Imt are more similar, the brightness of the difference image is smaller, so the score is smaller. That is, the score is smaller as the candidate image Imc and the template image Imt are more similar.

差分画像は、明瞳孔画像から暗瞳孔画像を減算した画像である。明瞳孔画像が第1顔画像Im1であり、暗瞳孔画像が第2顔画像Im2である場合、差分画像は、テンプレート画像Imtから第2顔画像Im2の部分画像を減算した画像となる。逆に、暗瞳孔画像が第1顔画像Im1であり、明瞳孔画像が第2顔画像Im2である場合、差分画像は、暗瞳孔画像である第1顔画像Im1からテンプレート画像Imtを設定し、テンプレート画像Imtから第2顔画像Im2の部分画像を減算した画像となる。スコア算出部24は、生成した差分画像を、当該差分画像に対応する候補画像Imcの識別情報と対応付けて、画像記憶部22に保存する。候補画像Imcの識別情報は、当該候補画像Imcを特定する位置情報(座標)を含む。   The difference image is an image obtained by subtracting the dark pupil image from the bright pupil image. When the bright pupil image is the first face image Im1 and the dark pupil image is the second face image Im2, the difference image is an image obtained by subtracting the partial image of the second face image Im2 from the template image Imt. Conversely, when the dark pupil image is the first face image Im1 and the bright pupil image is the second face image Im2, the difference image sets the template image Imt from the first face image Im1, which is the dark pupil image, The partial image of the second face image Im2 is subtracted from the template image Imt. The score calculation unit 24 stores the generated difference image in the image storage unit 22 in association with identification information of the candidate image Imc corresponding to the difference image. The identification information of the candidate image Imc includes position information (coordinates) identifying the candidate image Imc.

スコア算出部24は、全ての候補画像Imcに対応する差分画像を画像記憶部22に保存してもよい。また、スコア算出部24は、最小のスコアを有する候補画像Imcに対応する差分画像だけを画像記憶部22に保存してもよいし、最小のスコアを有する候補画像Imc及びテンプレート画像Imtに対応する候補画像Imcに対応する差分画像だけを画像記憶部22に保存してもよい。テンプレート画像Imtに対応する候補画像Imcとは、テンプレート画像Imtと位置が同一の候補画像Imcのことである。このように、一部の候補画像Imcに対応する差分画像だけを保存することにより、画像記憶部22に要求される記憶容量を小さくすることができる。   The score calculation unit 24 may store the difference image corresponding to all the candidate images Imc in the image storage unit 22. In addition, the score calculation unit 24 may store only the difference image corresponding to the candidate image Imc having the smallest score in the image storage unit 22, or corresponds to the candidate image Imc having the smallest score and the template image Imt. Only the difference image corresponding to the candidate image Imc may be stored in the image storage unit 22. The candidate image Imc corresponding to the template image Imt is a candidate image Imc having the same position as the template image Imt. As described above, the storage capacity required for the image storage unit 22 can be reduced by storing only the difference image corresponding to a part of the candidate images Imc.

スコア算出部24は、候補画像Imcを、第1顔画像Im1におけるテンプレート画像Imtの位置を基準としたマッチング範囲R内で、所定ピクセル(1ピクセル又は複数ピクセル)ずつずらしながら選択し、各候補画像Imcのスコアを算出する。スコア算出部24は、候補画像Imcの識別情報と、当該候補画像Imcのスコアと、を対応付けて検出用画像選択部25に通知する。   The score calculation unit 24 selects the candidate image Imc while shifting each predetermined pixel (one pixel or a plurality of pixels) in the matching range R based on the position of the template image Imt in the first face image Im1, and selects each candidate image Calculate Imc's score. The score calculation unit 24 associates the identification information of the candidate image Imc with the score of the candidate image Imc, and notifies the detection image selection unit 25 of the correspondence.

図3は、第1顔画像Im1、第2顔画像Im2、及びテンプレート画像Imtの一例を示す図である。図3の例では、第1顔画像Im1における(n1,m1)から(n2,m2)までの矩形範囲がテンプレート画像Imtとして設定され、第2顔画像Im2における(n1−p,m1−q)から(n2+p,m2+q)までの矩形範囲がマッチング範囲Rとして設定されている。このように、マッチング範囲Rは、第1顔画像Im1におけるテンプレート画像Imtの位置を基準に設定される。   FIG. 3 is a diagram showing an example of the first face image Im1, the second face image Im2, and the template image Imt. In the example of FIG. 3, the rectangular range from (n1, m1) to (n2, m2) in the first face image Im1 is set as the template image Imt, and (n1-p, m1-q) in the second face image Im2 A rectangular range from to (n 2 + p, m 2 + q) is set as the matching range R. Thus, the matching range R is set based on the position of the template image Imt in the first face image Im1.

スコア算出部24は、マッチング範囲Rの中で、テンプレート画像Imtを所定ピクセルずつずらしながらスコアを算出する。言い換えると、スコア算出部24は、マッチング範囲Rの中で、候補画像Imcを所定ピクセルずつずらしながら選択し、選択した各候補画像Imcのスコアを算出する。図3の例では、p及びqが2ピクセルであり、所定ピクセルが1ピクセルである場合、スコア算出部24は、25個の候補画像Imcのスコアを算出することになる。   The score calculation unit 24 calculates a score while shifting the template image Imt by a predetermined number of pixels in the matching range R. In other words, the score calculation unit 24 selects the candidate image Imc in the matching range R while shifting each predetermined pixel, and calculates the score of each of the selected candidate images Imc. In the example of FIG. 3, when p and q are 2 pixels and the predetermined pixel is 1 pixel, the score calculation unit 24 calculates the scores of 25 candidate images Imc.

上述の通り、第1顔画像Im1及び第2顔画像Im2は、撮影タイミングが撮影間隔だけ異なるため、第1顔画像Im1及び第2顔画像Im2に含まれる運転者の顔は、図3の例のように、撮影間隔に応じてわずかに位置がずれる。瞳孔検出装置100は、第1顔画像Im1及び第2顔画像Im2に含まれる顔の位置ずれを補正するために、テンプレート画像Imtに最も類似する(スコアが最も小さい)候補画像Imcを探索する。これは、テンプレート画像Imtと、当該テンプレート画像Imtに最も類似する候補画像Imcと、の間の位置ずれが、第1顔画像Im1及び第2顔画像Im2に含まれる顔の位置ずれに相当すると考えられるためである。このため、マッチング範囲R(テンプレート画像Imtに最も類似する候補画像Imcの探索範囲)は、少なくとも顔の位置ずれの分だけ、テンプレート画像Imtより広く設定されるのが好ましい。一方、マッチング範囲Rが広いほど、テンプレートマッチングに要する時間が長くなる。したがって、テンプレートマッチングを高速化するためには、マッチング範囲Rが狭いのが好ましい。   As described above, since the first face image Im1 and the second face image Im2 differ in shooting timing by the shooting interval, the driver's face included in the first face image Im1 and the second face image Im2 is the example of FIG. The position slightly shifts depending on the shooting interval. The pupil detection apparatus 100 searches for a candidate image Imc most similar (smallest score) to the template image Imt in order to correct the positional deviation of the face included in the first face image Im1 and the second face image Im2. It is considered that the positional deviation between the template image Imt and the candidate image Imc most similar to the template image Imt corresponds to the positional deviation of the face included in the first face image Im1 and the second face image Im2. In order to For this reason, it is preferable that the matching range R (a search range of the candidate image Imc most similar to the template image Imt) is set wider than the template image Imt by at least the displacement of the face. On the other hand, the longer the matching range R, the longer the time required for template matching. Therefore, in order to accelerate template matching, it is preferable that the matching range R be narrow.

結果として、マッチング範囲Rは、テンプレート画像Imtより顔の位置ずれの分だけ広く、かつ、できるだけ狭く設定されるのが好ましい。このようなマッチング範囲Rの設定が可能となるように、マッチング範囲Rは、撮影間隔が長いほど広く設定され、撮影間隔が短いほど狭く設定されるのが好ましい。スコア算出部24は、撮影間隔に応じて、マッチング範囲Rを変更可能であってもよい。   As a result, it is preferable that the matching range R is set wider than the template image Imt by the displacement of the face and as narrow as possible. Preferably, the matching range R is set wider as the imaging interval is longer and smaller as the imaging interval is shorter so as to enable setting of the matching range R as described above. The score calculation unit 24 may be capable of changing the matching range R in accordance with the imaging interval.

検出用画像選択部25は、スコア算出部24が算出したスコアに基づいて、スコア算出部24がスコアを算出した候補画像Imcの中から、検出用画像Imdを選択する。検出用画像Imdは、運転者の瞳孔を検出するための画像である。検出用画像選択部25は、検出用画像Imdとして選択した候補画像Imcの識別情報を、瞳孔検出部26に通知する。   The detection image selection unit 25 selects the detection image Imd from the candidate images Imc for which the score calculation unit 24 has calculated the score, based on the score calculated by the score calculation unit 24. The detection image Imd is an image for detecting a driver's pupil. The detection image selection unit 25 notifies the pupil detection unit 26 of identification information of the candidate image Imc selected as the detection image Imd.

検出用画像Imdを選択する第1の選択方法として、最も小さいスコアを有する候補画像Imcを、検出用画像Imdとして選択する方法が考えられる。第1の選択方法によれば、テンプレート画像Imtと最も類似する候補画像Imcを簡便に選択することができる。   As a first selection method of selecting the detection image Imd, a method of selecting the candidate image Imc having the smallest score as the detection image Imd can be considered. According to the first selection method, the candidate image Imc most similar to the template image Imt can be easily selected.

検出用画像Imdを選択する第2の選択方法として、スコアが最も小さく、かつ、当該スコアが閾値未満である候補画像Imcを、検出用画像Imdとして選択する方法が考えられる。第2の選択方法によれば、最も小さいスコアが閾値以上である場合、テンプレート画像Imtに対応する候補画像Imcが、検出用画像Imdとして選択される。   As a second selection method of selecting the detection image Imd, a method of selecting a candidate image Imc having the smallest score and less than a threshold as the detection image Imd can be considered. According to the second selection method, when the smallest score is equal to or higher than the threshold, the candidate image Imc corresponding to the template image Imt is selected as the detection image Imd.

第2の選択方法によれば、第1の選択方法より、瞳孔の検出精度を向上させることができる。理由は、以下の通りである。   According to the second selection method, it is possible to improve the pupil detection accuracy more than the first selection method. The reason is as follows.

車両の振動や運転者の動作により、第1顔画像Im1及び第1顔画像Im2に含まれる顔の位置ずれが大きい場合、各候補画像Imcは、非類似のテンプレート画像Imtと比較されるため、スコアが全体的に大きくなる。しかしながら、第1の選択方法では、このような場合であっても、スコアが最小の候補画像Imcが検出用画像Imdとして選択されてしまう。テンプレート画像Imtと非類似の候補画像Imcに基づいて瞳孔を検出すると、当該候補画像Imcを利用せずに瞳孔を検出した場合より、かえって瞳孔の検出精度が低下するおそれがある。第2の選択方法によれば、スコアが最も小さい候補画像Imcであっても、そのスコアが閾値以上である場合には、検出用画像Imdとしては選択されないため、非類似の候補画像Imcに起因する瞳孔の検出精度の低下を抑制することができる。   When the positional deviation of the face included in the first face image Im1 and the first face image Im2 is large due to the vibration of the vehicle or the driver's action, each candidate image Imc is compared with the dissimilar template image Imt. Score increases overall. However, in the first selection method, even in such a case, the candidate image Imc with the smallest score is selected as the detection image Imd. If a pupil is detected based on the template image Imt and the dissimilar candidate image Imc, there is a possibility that the detection accuracy of the pupil may be lower than in the case where the pupil is detected without using the candidate image Imc. According to the second selection method, even if the candidate image Imc having the smallest score is not selected as the detection image Imd if the score is equal to or higher than the threshold, the non-similar candidate image Imc is caused It is possible to suppress a drop in pupil detection accuracy.

なお、第1顔画像Im1及び第1顔画像Im2に含まれる顔の位置ずれが小さい場合であっても、瞳孔の輝度差により、テンプレート画像Imtに最も類似する候補画像Imcのスコアが閾値より大きくなる場合が考えられる。この場合、第2の選択方法では、テンプレート画像Imtに最も類似する候補画像Imcが検出用画像Imdとして選択されず、テンプレート画像Imtに対応する候補画像Imcが選択されるため、瞳孔の検出精度が低下するおそれがある。しかしながら、この場合には、そもそも位置ずれが小さいため、テンプレート画像Imtに対応する候補画像Imcに基づいて、瞳孔を精度よく検出可能であるため、瞳孔の検出精度の低下は十分に小さいと考えられる。   Even when the positional deviation of the face included in the first face image Im1 and the first face image Im2 is small, the score of the candidate image Imc most similar to the template image Imt is larger than the threshold due to the difference in the luminance of the pupil. It is conceivable that In this case, in the second selection method, the candidate image Imc most similar to the template image Imt is not selected as the detection image Imd, and the candidate image Imc corresponding to the template image Imt is selected. It may decrease. However, in this case, since the pupil can be detected with high accuracy based on the candidate image Imc corresponding to the template image Imt because the positional deviation is small originally, it is considered that the decrease in the pupil detection accuracy is sufficiently small. .

結果として、第2の選択方法によれば、第1の選択方法に比べて、テンプレート画像Imtと非類似の候補画像Imcに起因する瞳孔の検出精度の低下が抑制されるため、瞳孔の検出精度を向上させることができる。   As a result, according to the second selection method, compared to the first selection method, a decrease in pupil detection accuracy due to the candidate image Imc that is dissimilar to the template image Imt is suppressed, so that the pupil detection accuracy Can be improved.

検出用画像選択部25は、第2の選択方法を採用する場合、撮影環境が明るいほど閾値を小さくし、撮影環境が暗いほど閾値を大きくするのが好ましい。これは、撮影環境が明るい場合、運転者の瞳孔が収縮し、テンプレート画像Imtに最も類似する候補画像Imcのスコアが小さくなると考えられるためである。検出用画像選択部25は、撮影環境の明るさとして、第1顔画像Im1及び第2顔画像Im2の輝度の平均値や積算値などを利用することができる。   When the second selection method is adopted, it is preferable that the detection image selection unit 25 make the threshold smaller as the imaging environment is brighter, and makes the threshold larger as the imaging environment is darker. This is because it is considered that when the imaging environment is bright, the driver's pupil contracts and the score of the candidate image Imc most similar to the template image Imt decreases. The detection image selection unit 25 can use an average value, an integrated value, or the like of the luminance of the first face image Im1 and the second face image Im2 as the brightness of the imaging environment.

なお、検出用画像Imdの選択方法は、第1の選択方法及び第2の選択方法に限られない。   Note that the method of selecting the detection image Imd is not limited to the first selection method and the second selection method.

瞳孔検出部26は、テンプレート画像Imt及び検出用画像Imdに基づいて、運転者の瞳孔を検出する。具体的には、瞳孔検出部26は、テンプレート画像Imtと検出用画像Imdとの差分画像を生成し、当該差分画像を2値化した2値化画像を生成し、当該2値化画像に基づいて、運転者の瞳孔の座標を検出する。   The pupil detection unit 26 detects the pupil of the driver based on the template image Imt and the detection image Imd. Specifically, the pupil detection unit 26 generates a difference image between the template image Imt and the detection image Imd, generates a binarized image obtained by binarizing the difference image, and generates a binarized image based on the binarized image. To detect the coordinates of the driver's pupil.

瞳孔検出部26は、検出用画像選択部25から通知された識別情報に基づいて、第2顔画像Im2から検出用画像Imdを取得し、画像記憶部22からテンプレート画像Imtを取得し、取得したテンプレート画像Imt及び検出用画像Imdに基づいて、2値化画像を生成することができる。   The pupil detection unit 26 acquires the detection image Imd from the second face image Im2 based on the identification information notified from the detection image selection unit 25 and acquires the template image Imt from the image storage unit 22. A binarized image can be generated based on the template image Imt and the detection image Imd.

また、瞳孔検出部26は、検出用画像選択部25から通知された識別情報に基づいて、画像記憶部22から、検出用画像Imdとして選択された候補画像Imcに対応する差分画像を取得してもよい。当該差分画像は、テンプレート画像Imt及び検出用画像Imdに基づいて生成された差分画像に相当する。瞳孔検出部26は、画像記憶部22から取得した差分画像に基づいて2値化画像を生成することにより、瞳孔検出処理を高速化できる。   In addition, the pupil detection unit 26 acquires a difference image corresponding to the candidate image Imc selected as the detection image Imd from the image storage unit 22 based on the identification information notified from the detection image selection unit 25. It is also good. The difference image corresponds to a difference image generated based on the template image Imt and the detection image Imd. The pupil detection unit 26 can speed up the pupil detection processing by generating a binarized image based on the difference image acquired from the image storage unit 22.

なお、検出用画像選択部25が第1の選択方法を採用している場合、最小のスコアを有する候補画像Imcに対応する差分画像だけを画像記憶部22に保存しておけばよい。また、検出用画像選択部25が第2の選択方法を採用している場合、最小のスコアを有する候補画像Imc及びテンプレート画像Imtに対応する候補画像Imcに対応する差分画像だけを画像記憶部22に保存しておけばよい。これにより、瞳孔検出処理を高速化しつつ、画像記憶部22に要求される記憶容量を小さくすることができる。   When the detection image selection unit 25 adopts the first selection method, only the difference image corresponding to the candidate image Imc having the minimum score may be stored in the image storage unit 22. In addition, when the detection image selection unit 25 adopts the second selection method, only the difference image corresponding to the candidate image Imc having the minimum score and the candidate image Imc corresponding to the template image Imt is stored in the image storage unit 22. You can save it to Thereby, the storage capacity required for the image storage unit 22 can be reduced while speeding up the pupil detection processing.

上述の通り、検出用画像選択部25により、テンプレート画像Imtと最も類似する候補画像Imcが検出用画像Imdとして選択されているため、テンプレート画像Imtにおける瞳孔の位置と、検出用画像Imdにおける瞳孔の位置と、は略一致する。このようなテンプレート画像Imt及び検出用画像Imdに基づいて2値化画像を生成することにより、瞳孔検出部26は、運転者の瞳孔が白く描画された2値化画像を生成することができる。瞳孔検出部26は、白く描画された瞳孔の重心などを、瞳孔の座標として検出すればよい。瞳孔検出部26が検出した瞳孔の座標は、後段の視線検出装置などで利用することができる。   As described above, since the candidate image Imc most similar to the template image Imt is selected as the detection image Imd by the detection image selection unit 25, the position of the pupil in the template image Imt and the pupil in the detection image Imd The position substantially matches. By generating a binarized image based on such a template image Imt and the detection image Imd, the pupil detection unit 26 can generate a binarized image in which the pupil of the driver is drawn white. The pupil detection unit 26 may detect the center of gravity of the pupil drawn white and the like as the coordinates of the pupil. The coordinates of the pupil detected by the pupil detection unit 26 can be used by a visual axis detection device or the like in the subsequent stage.

次に、瞳孔検出装置100が実行する処理について説明する。図4は、瞳孔検出装置100が実行する処理の一例を示すフローチャートである。瞳孔検出装置100は、図4の処理を所定の時間間隔で実行する。以下、検出用画像選択部25が、第2の選択方法を採用している場合を例に説明する。   Next, the process which the pupil detection apparatus 100 performs is demonstrated. FIG. 4 is a flowchart showing an example of processing executed by the pupil detection device 100. The pupil detection device 100 executes the process of FIG. 4 at predetermined time intervals. Hereinafter, the case where the detection image selection unit 25 adopts the second selection method will be described as an example.

処理の実行タイミングが到来すると、画像取得部21が、撮影装置1に所定の撮影間隔で運転者の明瞳孔画像及び暗瞳孔画像を撮影させ、第1顔画像Im1及び第2顔画像Im2を取得する(ステップS101)。画像取得部21は、取得した第1顔画像Im1及び第2顔画像Im2を画像記憶部22に保存する。   When the execution timing of the processing comes, the image acquisition unit 21 causes the imaging device 1 to capture the bright pupil image and the dark pupil image of the driver at predetermined imaging intervals, and acquires the first face image Im1 and the second face image Im2. (Step S101). The image acquisition unit 21 stores the acquired first face image Im1 and second face image Im2 in the image storage unit 22.

第1顔画像Im1及び第2顔画像Im2が画像記憶部22に保存されると、テンプレート画像設定部23が、画像記憶部22に保存された第1顔画像Im1の一部をテンプレート画像Imtに設定する(ステップS102)。テンプレート画像Imtの設定方法は上述の通りである。テンプレート画像設定部23は、設定したテンプレート画像Imtを画像記憶部22に保存する。   When the first face image Im1 and the second face image Im2 are stored in the image storage unit 22, the template image setting unit 23 converts part of the first face image Im1 stored in the image storage unit 22 into the template image Imt. It sets (step S102). The setting method of the template image Imt is as described above. The template image setting unit 23 stores the set template image Imt in the image storage unit 22.

テンプレート画像Imtが画像記憶部22に保存されると、スコア算出部24が、画像記憶部22に保存された第2顔画像Im2の一部を候補画像Imcとて選択する(ステップS103)。候補画像Imcの選択方法は上述の通りである。   When the template image Imt is stored in the image storage unit 22, the score calculation unit 24 selects a part of the second face image Im2 stored in the image storage unit 22 as a candidate image Imc (step S103). The method of selecting the candidate image Imc is as described above.

次に、スコア算出部24は、選択した候補画像Imcと、画像記憶部22に保存されたテンプレート画像Imtと、の差分画像を生成し、当該差分画像に基づいて、候補画像Imcのスコアを算出する(ステップS104)。スコアの算出方法は上述の通りである。スコア算出部24は、算出したスコアと、スコアを算出された候補画像Imcの識別情報と、を検出用画像選択部25に通知する。   Next, the score calculation unit 24 generates a difference image between the selected candidate image Imc and the template image Imt stored in the image storage unit 22, and calculates the score of the candidate image Imc based on the difference image. (Step S104). The method of calculating the score is as described above. The score calculation unit 24 notifies the detection image selection unit 25 of the calculated score and the identification information of the candidate image Imc for which the score is calculated.

続いて、スコア算出部24は、候補画像Imcがテンプレート画像Imtに対応するか、すなわち、テンプレート画像Imt及び候補画像Imcの位置が同一であるか確認する(ステップS105)。候補画像Imcがテンプレート画像Imtに対応する場合(ステップS105のYES)、スコア算出部24は、候補画像Imcから生成した差分画像を、テンプレート画像Imtに対応する候補画像Imcに対応する差分画像として、当該候補画像の識別情報と対応付けて、画像記憶部22に保存する(ステップS106)。   Subsequently, the score calculation unit 24 checks whether the candidate image Imc corresponds to the template image Imt, that is, the positions of the template image Imt and the candidate image Imc are the same (step S105). When the candidate image Imc corresponds to the template image Imt (YES in step S105), the score calculation unit 24 sets the difference image generated from the candidate image Imc as a difference image corresponding to the candidate image Imc corresponding to the template image Imt. The image information is stored in the image storage unit 22 in association with the identification information of the candidate image (step S106).

同様に、スコア算出部24は、候補画像Imcのスコアが、これまで算出したスコアの中で最小であるか確認する(ステップS107)。候補画像Imcのスコアが最小である場合(ステップS107のYES)、スコア算出部24は、候補画像Imcから生成した差分画像を、スコアが最小の候補画像Imcに対応する差分画像として、当該候補画像の識別情報と対応付けて、画像記憶部22に保存する(ステップS108)。スコアが最小の候補画像Imcに対応する差分画像が既に保存されている場合、スコア算出部24は、保存されている差分画像に新たな差分画像を上書き保存すればよい。なお、ステップS105,S107は順不同である。   Similarly, the score calculation unit 24 confirms whether the score of the candidate image Imc is the minimum among the scores calculated so far (step S107). When the score of the candidate image Imc is the smallest (YES in step S107), the score calculation unit 24 sets the difference image generated from the candidate image Imc as the difference image corresponding to the candidate image Imc with the smallest score, the candidate image In association with the identification information, and stored in the image storage unit 22 (step S108). When the difference image corresponding to the candidate image Imc having the smallest score is already stored, the score calculation unit 24 may overwrite and store the new difference image on the stored difference image. Steps S105 and S107 are in random order.

その後、スコア算出部24は、マッチング範囲R内で選択可能な全ての候補画像Imcを選択したか確認する(ステップS109)。未選択の候補画像Imcがある場合(ステップS109のNO)、処理はステップS103に戻る。一方、全ての候補画像Imcが選択済みの場合(ステップS109のYES)、処理はステップS110に進む。これにより、マッチング範囲R内で選択可能な全ての候補画像Imcのスコアが算出される。   Thereafter, the score calculation unit 24 confirms whether all the candidate images Imc selectable in the matching range R have been selected (step S109). If there is an unselected candidate image Imc (NO in step S109), the process returns to step S103. On the other hand, if all candidate images Imc have been selected (YES in step S109), the process proceeds to step S110. Thereby, the scores of all the candidate images Imc selectable in the matching range R are calculated.

マッチング範囲R内で選択可能な全ての候補画像Imcのスコアが算出されると、検出用画像選択部25は、スコア算出部24から通知された複数のスコアの中で最小のスコアが、閾値未満であるか判定する(ステップS110)。最小のスコアが閾値未満である場合(ステップS110のYES)、検出用画像選択部25は、当該最小のスコアを有する候補画像Imcを検出用画像Imdとして選択する(ステップS111)。一方、最小のスコアが閾値以上である場合(ステップS110のNO)、検出用画像選択部25は、テンプレート画像Imtに対応する候補画像Imcを検出用画像Imdとして選択する(ステップS112)。検出用画像選択部25は、選択した検出用画像Imdの識別情報を瞳孔検出部26に通知する。   When the scores of all the candidate images Imc selectable in the matching range R are calculated, the detection image selection unit 25 determines that the minimum score among the plurality of scores notified from the score calculation unit 24 is less than the threshold value. It is determined whether or not (step S110). If the minimum score is less than the threshold (YES in step S110), the detection image selecting unit 25 selects the candidate image Imc having the minimum score as the detection image Imd (step S111). On the other hand, when the minimum score is equal to or higher than the threshold (NO in step S110), the detection image selecting unit 25 selects the candidate image Imc corresponding to the template image Imt as the detection image Imd (step S112). The detection image selection unit 25 notifies the pupil detection unit 26 of identification information of the selected detection image Imd.

検出用画像Imdの識別情報を通知されると、瞳孔検出部26は、当該識別情報に基づいて、画像記憶部22から、検出用画像Imdとして選択された候補画像Imcに対応する差分画像を取得する(ステップS113)。   When notified of the identification information of the detection image Imd, the pupil detection unit 26 acquires a difference image corresponding to the candidate image Imc selected as the detection image Imd from the image storage unit 22 based on the identification information. (Step S113).

その後、瞳孔検出部26は、取得した差分画像に基づいて2値化画像を生成し、当該2値化画像に基づいて、運転者の瞳孔の座標を検出する(ステップS114)。   Thereafter, the pupil detection unit 26 generates a binarized image based on the acquired difference image, and detects the coordinates of the pupil of the driver based on the binarized image (step S114).

以上説明した通り、瞳孔検出装置100は、対象者の特徴点(鼻孔など)を利用することなく、テンプレート画像Imtと最も類似する検出用画像Imdを選択し、テンプレート画像Imt及び検出用画像Imdに基づいて対象者の瞳孔を検出することができる。テンプレート画像Imtと最も類似する検出用画像Imdを選択することは、第1顔画像Im1及び第2顔画像Im2の位置ずれを補正することに相当する。したがって、瞳孔検出装置100は、対象者の特徴点がマスクなどにより隠れている場合であっても、第1顔画像Im1及び第2顔画像Im2の位置ずれを補正し、対象者の瞳孔を検出することができる。言い換えると、本実施形態によれば、明瞳孔画像及び暗瞳孔画像に基づく瞳孔検出のロバスト性を向上させることができる。   As described above, the pupil detection apparatus 100 selects the detection image Imd most similar to the template image Imt without using the feature points (nostrils etc.) of the subject, and selects the template image Imt and the detection image Imd. The pupil of the subject can be detected based on that. Selecting the detection image Imd most similar to the template image Imt corresponds to correcting the positional deviation of the first face image Im1 and the second face image Im2. Therefore, even if the feature point of the subject is hidden by a mask or the like, the pupil detection device 100 corrects the positional deviation of the first face image Im1 and the second face image Im2 and detects the pupil of the subject. can do. In other words, according to the present embodiment, the robustness of pupil detection based on the bright pupil image and the dark pupil image can be improved.

また、本実施形態によれば、テンプレート画像Imtは、対象者の瞳孔を含めばよいため、そのサイズを小さく設定できる。また、マッチング範囲Rは撮影間隔に応じて狭く設定できる。このように、テンプレート画像Imtを小さくし、マッチング範囲Rを狭くすることにより、テンプレートマッチングを高速化できる。   Further, according to the present embodiment, the size of the template image Imt can be set small because it suffices to include the pupil of the subject. Further, the matching range R can be set narrow according to the imaging interval. Thus, template matching can be speeded up by reducing the template image Imt and narrowing the matching range R.

また、スコアを算出された候補画像Imcに対応する差分画像は、スコアの算出時点で画像記憶部22に保存されるため、瞳孔検出部26は、画像記憶部22に保存された差分画像を利用して瞳孔を検出することができる。言い換えると、瞳孔検出部26は、検出用画像Imdの選択後に改めて差分画像を生成する必要がない。したがって、本実施形態によれば、瞳孔検出処理を高速化できる。   In addition, since the difference image corresponding to the candidate image Imc for which the score is calculated is stored in the image storage unit 22 at the time of calculation of the score, the pupil detection unit 26 uses the difference image stored in the image storage unit 22. And the pupil can be detected. In other words, the pupil detection unit 26 does not have to generate a difference image again after the selection of the detection image Imd. Therefore, according to the present embodiment, the pupil detection process can be speeded up.

なお、上記実施形態に挙げた構成等に、その他の要素との組み合わせなど、ここで示した構成に本発明が限定されるものではない。これらの点に関しては、本発明の趣旨を逸脱しない範囲で変更可能であり、その応用形態に応じて適切に定めることができる。   Note that the present invention is not limited to the configurations shown here, such as combinations with other elements in the configurations and the like described in the above embodiments. These points can be changed without departing from the spirit of the present invention, and can be appropriately determined according to the application form.

1:撮影装置
2:制御装置
11:撮影部
12:光源
21:画像取得部
22:画像記憶部
23:テンプレート画像設定部
24:スコア算出部
25:検出用画像選択部
26:瞳孔検出部
100:瞳孔検出装置
Im1:第1顔画像
Im2:第2顔画像
Imt:テンプレート画像
Imc:候補画像
Imd:検出用画像
R:マッチング範囲
1: imaging device 2: control device 11: imaging unit 12: light source 21: image acquisition unit 22: image storage unit 23: template image setting unit 24: score calculation unit 25: detection image selection unit 26: pupil detection unit 100: Pupil detection device Im1: first face image Im2: second face image Imt: template image Imc: candidate image Imd: detection image R: matching range

Claims (7)

対象者の第1顔画像及び第2顔画像を取得する画像取得部と、
前記第1顔画像の前記対象者の瞳孔を含む一部をテンプレート画像に設定するテンプレート画像設定部と、
前記第2顔画像の一部である候補画像と、前記テンプレート画像と、の輝度差に応じたスコアを、複数の前記候補画像について算出するスコア算出部と、
前記スコアに基づいて、複数の前記候補画像の中から検出用画像を選択する検出用画像選択部と、
前記テンプレート画像及び前記検出用画像に基づいて、前記対象者の瞳孔を検出する瞳孔検出部と、
を備える瞳孔検出装置。
An image acquisition unit for acquiring a first face image and a second face image of a subject,
A template image setting unit configured to set a part of the first face image including the pupil of the subject as a template image;
A score calculation unit configured to calculate, for a plurality of candidate images, a score according to a luminance difference between a candidate image that is a part of the second face image and the template image;
A detection image selection unit that selects a detection image from among the plurality of candidate images based on the score;
A pupil detection unit that detects the pupil of the subject based on the template image and the detection image;
A pupil detection device comprising:
前記検出用画像選択部は、前記スコアが最も小さい前記候補画像を、前記検出用画像として選択する
請求項1に記載の瞳孔検出装置。
The pupil detection device according to claim 1, wherein the detection image selection unit selects the candidate image with the smallest score as the detection image.
前記検出用画像選択部は、前記スコアが最も小さく、かつ、前記スコアが閾値未満である前記候補画像を、前記検出用画像として選択する
請求項1に記載の瞳孔検出装置。
The pupil detection apparatus according to claim 1, wherein the detection image selection unit selects the candidate image having the smallest score and the score less than a threshold as the detection image.
前記検出用画像選択部は、最も小さい前記スコアが前記閾値以上である場合、前記テンプレート画像に対応する前記候補画像を、前記検出用画像として選択する
請求項1に記載の瞳孔検出装置。
The pupil detection apparatus according to claim 1, wherein the detection image selection unit selects the candidate image corresponding to the template image as the detection image when the smallest score is equal to or more than the threshold.
前記検出用画像選択部は、前記第1顔画像及び前記第2顔画像の輝度が高いほど、前記閾値を小さくする
請求項3又は請求項4に記載の瞳孔検出装置。
The pupil detection device according to claim 3 or 4, wherein the detection image selection unit reduces the threshold as the luminances of the first face image and the second face image increase.
前記瞳孔検出部は、前記テンプレート画像と前記検出用画像との差分画像を2値化した2値化画像に基づいて、前記瞳孔を検出する
請求項1から請求項5までのいずれか1項に記載の瞳孔検出装置。
The pupil detection unit according to any one of claims 1 to 5, wherein the pupil detection unit detects the pupil based on a binarized image obtained by binarizing a difference image between the template image and the detection image. A pupil detection device as described.
前記第1顔画像は、明瞳孔画像及び暗瞳孔画像の一方であり、前記第2顔画像は、前記明瞳孔画像及び前記暗瞳孔画像の他方である
請求項1から請求項6までのいずれか1項に記載の瞳孔検出装置。
The first face image is one of a bright pupil image and a dark pupil image, and the second face image is the other of the bright pupil image and the dark pupil image. The pupil detection device according to item 1.
JP2017231029A 2017-11-30 2017-11-30 Pupil detector Withdrawn JP2019097807A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017231029A JP2019097807A (en) 2017-11-30 2017-11-30 Pupil detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017231029A JP2019097807A (en) 2017-11-30 2017-11-30 Pupil detector

Publications (1)

Publication Number Publication Date
JP2019097807A true JP2019097807A (en) 2019-06-24

Family

ID=66974682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017231029A Withdrawn JP2019097807A (en) 2017-11-30 2017-11-30 Pupil detector

Country Status (1)

Country Link
JP (1) JP2019097807A (en)

Similar Documents

Publication Publication Date Title
US20200069230A1 (en) Evaluation device, evaluation method, and evaluation program
US11017218B2 (en) Suspicious person detection device, suspicious person detection method, and program
US10884488B2 (en) Electronic device and method for controlling display
US8942434B1 (en) Conflict resolution for pupil detection
US20180350257A1 (en) Information processing apparatus, method and non-transitory computer-readable storage medium
US11574399B2 (en) Abnormal state detection device, abnormal state detection method, and recording medium
JP6870474B2 (en) Gaze detection computer program, gaze detection device and gaze detection method
US11308321B2 (en) Method and system for 3D cornea position estimation
US9772679B1 (en) Object tracking for device input
US10860176B2 (en) Image control method and device
US10757337B2 (en) Information processing apparatus and information processing method to control exposure for imaging the eye
US20160063711A1 (en) Non-transitory storage medium encoded with computer readable image processing program, information processing system, information processing apparatus, and image processing method
US11937928B2 (en) Evaluation apparatus, evaluation method, and evaluation program
JP2019109689A (en) Visual line detection device
JP2019097807A (en) Pupil detector
CN108139203A (en) Information processing equipment and location information acquisition method
JP2017138645A (en) Sight-line detection device
JP2021039549A (en) Mobile terminal device
US20210173499A1 (en) Method of performing half-shutter function using optical object recognition and method of capturing image using the same
TW201715472A (en) Image segmentation determining method, gesture determining method, image sensing system and gesture determining system
JP2018163411A (en) Face direction estimation device and face direction estimation method
US10943109B2 (en) Electronic apparatus, method for controlling thereof and the computer readable recording medium
JP2018005543A (en) Image processing device, image processing system and image processing method
JP2005296383A (en) Visual line detector
JP2018180623A (en) Sight line direction estimation device and sight line direction estimation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200901

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20201216