JP4825473B2 - Face orientation discrimination device - Google Patents

Face orientation discrimination device Download PDF

Info

Publication number
JP4825473B2
JP4825473B2 JP2005257175A JP2005257175A JP4825473B2 JP 4825473 B2 JP4825473 B2 JP 4825473B2 JP 2005257175 A JP2005257175 A JP 2005257175A JP 2005257175 A JP2005257175 A JP 2005257175A JP 4825473 B2 JP4825473 B2 JP 4825473B2
Authority
JP
Japan
Prior art keywords
face
reliability
orientation
determined
determination means
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.)
Active
Application number
JP2005257175A
Other languages
Japanese (ja)
Other versions
JP2007072628A (en
Inventor
純也 春日井
剛 内藤
博 石黒
重康 魚住
健一 大上
道則 安藤
伸征 白木
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.)
Toyota Motor Corp
Toyota Central R&D Labs Inc
Aisin Corp
Original Assignee
Aisin Seiki Co Ltd
Toyota Motor Corp
Toyota Central R&D Labs Inc
Aisin Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisin Seiki Co Ltd, Toyota Motor Corp, Toyota Central R&D Labs Inc, Aisin Corp filed Critical Aisin Seiki Co Ltd
Priority to JP2005257175A priority Critical patent/JP4825473B2/en
Publication of JP2007072628A publication Critical patent/JP2007072628A/en
Application granted granted Critical
Publication of JP4825473B2 publication Critical patent/JP4825473B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、顔画像から顔向き(横向き角度)を判別すると共にその信頼度(確度)を判別することが可能な顔向き判別装置に関する。   The present invention relates to a face orientation discriminating apparatus capable of discriminating a face orientation (lateral angle) from a face image and discriminating its reliability (accuracy).

顔画像に基づいて人を識別したり、表情を読み取ったりするためには、顔の位置や顔の中心位置、向きなどを検出することが重要となる。   In order to identify a person or read a facial expression based on a face image, it is important to detect the face position, the face center position, the orientation, and the like.

例えば、特許文献1には、人の顔を撮影した画像を処理し、人の動きや背景に影響されること無く高精度に顔の位置を検出する手法が開示されている。   For example, Patent Document 1 discloses a technique for processing an image obtained by photographing a human face and detecting the position of the face with high accuracy without being affected by the movement or background of the person.

また、特許文献2には、ドライバーが存在可能な領域を撮影して得られた画像を取り込み、取り込んだ画像から横エッジ画像(顔の両側端)を検出し、検出した横エッジ画像に基づいて、複数の顔中心候補線を設定すると共に各顔中心候補線各々に対して、該顔中心候補線が顔の中心線である確からしさを表す値に基づいて、顔の有無の判定精度を向上する技術が開示されている。
特開2004−310396号公報 特開2005−011097号公報
Further, Patent Document 2 captures an image obtained by photographing an area where a driver can exist, detects a lateral edge image (both side edges of the face) from the captured image, and based on the detected lateral edge image. In addition to setting a plurality of face center candidate lines, for each face center candidate line, the accuracy of determining the presence or absence of a face is improved based on a value representing the likelihood that the face center candidate line is the face center line. Techniques to do this are disclosed.
JP 2004-310396 A JP 2005-011097 A

車両の走行環境は様々に変化し、カメラが捉えるドライバーの画像も様々に変化する。例えば、あるタイミングでは、顔に直射日光があたって全体が明るい画像となり、車両の向きが変化することに伴ってカメラに向かう面が陰になって、全体が暗くなったり、或いは、顔の一部が明るく、残りが暗くなる等の事態が生ずる。このため、顔の両側端位置の検出なども困難であり、画像取得時の環境・条件、例えば、光のあたり方(あたる方向、外光の強度)などにより、顔の輪郭線や中央線の検出を誤ってしまうこともある。
これらの情報の検出に誤りが生ずると、横向き角度の判定など、以後の判定にずれが生じてしまう。
このような場合に、環境や条件による検出位置の精度に指標が与えられれば有効であり、以後の、処理に活用可能である。
The driving environment of the vehicle changes variously, and the driver's image captured by the camera also changes variously. For example, at a certain timing, the face is exposed to direct sunlight and the entire image becomes bright, and as the direction of the vehicle changes, the surface facing the camera becomes shaded and the entire image becomes dark or A situation occurs such that the part is bright and the rest is dark. For this reason, it is difficult to detect the positions of both sides of the face, and depending on the environment and conditions at the time of image acquisition, for example, how the light strikes (direction of light, intensity of outside light), etc. Detection may be wrong.
If an error occurs in the detection of these pieces of information, there will be a shift in subsequent determinations such as determination of the lateral angle.
In such a case, it is effective if an index is given to the accuracy of the detection position depending on the environment and conditions, and it can be used for the subsequent processing.

本発明は上記の問題点に鑑みてなされたものであり、顔の向きなどを判別する場合に、その信頼度を判別することを可能とすることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to make it possible to determine the reliability when determining the orientation of a face.

上記目的を達成するため、この発明の第1の観点にかかる顔向き判別装置は、顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段と、を備え、
前記信頼度判別手段は、従前に判別された顔の位置と今回検出された顔の位置とのずれの大きさに基づいて、顔向きの信頼度を求める。
In order to achieve the above object, a face orientation determination device according to a first aspect of the present invention is stored in a face image storage means for storing a face image obtained by photographing a face, and the face image storage means. Based on the face image, a face position determining means for determining a face position and a center position of the face, and a face position based on the face position and the face center position obtained by the face position determining means. A face orientation determining means for outputting the orientation, a reliability determining means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determining means, and a face orientation determined by the face orientation determining means If, Bei example and output means for outputting in association with the confidence that has been judged by the reliability judging means,
The reliability determination unit obtains the reliability of the face orientation based on the magnitude of the deviation between the previously determined face position and the currently detected face position.

上記目的を達成するため、この発明の第2の観点にかかる顔向き判別装置は、In order to achieve the above object, a face orientation determination device according to the second aspect of the present invention is provided:
顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、  Face image storage means for storing a face image obtained by photographing a face;
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、  Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、  A face orientation determining means for outputting the orientation of the face based on the face position and the center position of the face determined by the face position determining means;
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、  Reliability determination means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determination means;
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを出力する出力手段と、  An output means for outputting the orientation of the face determined by the face orientation determining means and the reliability determined by the reliability determining means;
を備え、  With
前記信頼度判別手段は、顔画像を複数の領域に分割し、各領域の重心を求め、求めた重心位置に基づいて、顔向きの信頼度を求める。  The reliability determination unit divides the face image into a plurality of regions, obtains the center of gravity of each region, and obtains the reliability of the face orientation based on the obtained center of gravity position.

上記目的を達成するため、この発明の第3の観点にかかる顔向き判別装置は、In order to achieve the above object, a face orientation determination device according to a third aspect of the present invention is:
顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、Face image storage means for storing a face image obtained by photographing a face;
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、  Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、  A face orientation determining means for outputting the orientation of the face based on the face position and the center position of the face determined by the face position determining means;
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、  Reliability determination means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determination means;
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを出力する出力手段と、  An output means for outputting the orientation of the face determined by the face orientation determining means and the reliability determined by the reliability determining means;
を備え、  With
前記信頼度判別手段は、顔画像を複数の領域に分割し、各領域の輝度を求め、求めた輝度に基づいて、顔位置の信頼度を求める。  The reliability determination unit divides the face image into a plurality of regions, calculates the luminance of each region, and calculates the reliability of the face position based on the calculated luminance.

前記顔位置判別手段と前記顔向き判別手段と前記信頼度判別手段とは、例えば、前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の水平方向の位置と向きを判別する処理と、判別した水平方向の向きの信頼度を求める1単位の処理を繰り返して実行し、The face position determination unit, the face orientation determination unit, and the reliability determination unit are, for example, a process of determining a horizontal position and orientation of a face based on the face image stored in the face image storage unit And repeatedly execute a unit of processing for determining the reliability of the determined horizontal direction,
顔の垂直方向の位置を判別する処理を複数の処理ステップに区分して、各1単位の処理内でいずれかの区分ステップを実行し、前記区分ステップの実行を複数回繰り返すことにより、顔の垂直方向の位置を求める。  By dividing the process of determining the position of the face in the vertical direction into a plurality of processing steps, executing one of the dividing steps within each unit of processing, and repeating the execution of the dividing step a plurality of times, Find the vertical position.

上記目的を達成するため、この発明の第4の観点にかかるコンピュータプログラムは、In order to achieve the above object, a computer program according to the fourth aspect of the present invention provides:
コンピュータを、Computer
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、  Face image storage means for storing a face image obtained by photographing a face;
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、  Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、  Face orientation determining means for outputting the orientation of the face based on the position of the face determined by the face position determining means and the position of the center of the face;
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、  Reliability determination means for obtaining reliability indicating the certainty of the face orientation determined by the face orientation determination means;
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、  An output means for outputting the face orientation determined by the face orientation determination means and the reliability determined by the reliability determination means in association with each other;
として機能させるコンピュータプログラムであって、  A computer program that functions as
前記コンピュータに、前記信頼度判別手段として、従前に判別された顔の位置と今回検出された顔の位置とのずれの大きさに基づいて、顔向きの信頼度を求める処理を実行させる。The computer causes the reliability determination means to execute a process for determining the reliability of the face orientation based on the magnitude of the deviation between the previously determined face position and the currently detected face position.

上記目的を達成するため、この発明の第5の観点にかかるコンピュータプログラムは、  In order to achieve the above object, a computer program according to the fifth aspect of the present invention provides:
コンピュータを、  Computer
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、  Face image storage means for storing a face image obtained by photographing a face;
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、  Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、  Face orientation determining means for outputting the orientation of the face based on the position of the face determined by the face position determining means and the position of the center of the face;
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、  Reliability determination means for obtaining reliability indicating the certainty of the face orientation determined by the face orientation determination means;
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、  An output means for outputting the face orientation determined by the face orientation determination means and the reliability determined by the reliability determination means in association with each other;
として機能させるコンピュータプログラムであって、  A computer program that functions as
前記コンピュータに、前記信頼度判別手段として、顔画像を複数の領域に分割し、各領域の重心を求め、求めた重心位置に基づいて、顔向きの信頼度を求める処理を実行させる。  The computer causes the face image to be divided into a plurality of areas as the reliability determination means, obtains a center of gravity of each area, and executes a process of obtaining a face orientation reliability based on the obtained center of gravity position.

上記目的を達成するため、この発明の第6の観点にかかるコンピュータプログラムは、コンピュータを、顔を撮影して得られた顔画像を記憶する顔画像記憶手段、前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、として機能させるコンピュータプログラムであって、
前記コンピュータに、前記信頼度判別手段として、顔画像を複数の領域に分割し、各領域の輝度を求め、求めた輝度に基づいて、顔位置の信頼度を求める処理を実行させる。
In order to achieve the above object, a computer program according to a sixth aspect of the present invention is stored in a face image storage means for storing a face image obtained by photographing a face of a computer, the face image storage means. Face position determining means for determining the position of the face and the position of the center of the face based on the face image, the direction of the face based on the position of the face and the position of the center of the face obtained by the face position determining means For the face orientation determined by the face orientation determining means, a reliability determining means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determining means, the face orientation determined by the face orientation determining means, A computer program that functions as an output means that outputs the reliability determined in association with the reliability determined by the reliability determination means ,
The computer causes the face image to be divided into a plurality of areas as the reliability determination means, obtains the brightness of each area, and executes a process of obtaining the reliability of the face position based on the obtained brightness.

この発明によれば、顔画像から顔の向きを判別すると共にその信頼度を判別することができる。   According to the present invention, it is possible to determine the face orientation from the face image and to determine its reliability.

以下、本発明の実施形態に係る顔向き判別装置について説明する。   Hereinafter, a face orientation determination device according to an embodiment of the present invention will be described.

本実施形態の顔向き判別装置は、図1に示すように、ドライバーの顔を撮影して顔画像を生成するカメラ10と、ドライバーの顔を照明する照明光源12と、ドライバーの顔中心位置を検出するコンピュータ14と、コンピュータ14に接続された表示装置16とを備える。   As shown in FIG. 1, the face orientation determination device of the present embodiment captures a driver's face and generates a face image, a camera 10, an illumination light source 12 that illuminates the driver's face, and the driver's face center position. The computer 14 to detect and the display apparatus 16 connected to the computer 14 are provided.

カメラ10は例えばCCDカメラ等から構成され、ドライバーの顔の階調画像を取得する。カメラ10によって生成される顔画像は、ドライバーの顔だけでなく、その背景なども含まれている。   The camera 10 is composed of a CCD camera, for example, and acquires a gradation image of the driver's face. The face image generated by the camera 10 includes not only the driver's face but also its background.

表示装置16は、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)などから構成され、カメラ10で撮影された顔画像から抽出された二値化画像などを表示する。   The display device 16 includes an LCD (Liquid Crystal Display), a CRT (Cathode Ray Tube), or the like, and displays a binarized image extracted from a face image taken by the camera 10.

コンピュータ14は、カメラ10により取得された顔画像を処理して顔の両端の位置を検出し、この検出した両端位置に基づいて、顔の横向き確度を求め、さらに、顔の両端の検出位置のずれを数値化して検出された横向き角度の信頼度を求める装置である。コンピュータ14は、図2に示すように、A/D変換器21と、画像メモリ22と、ROM23と、CPU24と、RAM25と、表示制御装置27と、光源制御装置28と、を備える。   The computer 14 processes the face image acquired by the camera 10 to detect the positions of both ends of the face, obtains the lateral accuracy of the face based on the detected both ends, and further detects the detection positions of the both ends of the face. This is a device for obtaining the reliability of the detected lateral angle by digitizing the deviation. As shown in FIG. 2, the computer 14 includes an A / D converter 21, an image memory 22, a ROM 23, a CPU 24, a RAM 25, a display control device 27, and a light source control device 28.

A/D(アナログ/ディジタル)変換器21は、カメラ10で撮影されたアナログ画像信号をディジタル信号に変換する。
画像メモリ22は、カメラ10により生成され、A/D変換器21でディジタル化された画像データを記憶する。
An A / D (analog / digital) converter 21 converts an analog image signal photographed by the camera 10 into a digital signal.
The image memory 22 stores image data generated by the camera 10 and digitized by the A / D converter 21.

ROM23は、CPUの動作を制御するためのプログラムを記憶する。また、ROM23は、後述する画像処理を実行するための様々な固定データを記憶する。   The ROM 23 stores a program for controlling the operation of the CPU. Further, the ROM 23 stores various fixed data for executing image processing to be described later.

CPU24は、ROM23に格納されているプログラムを実行することにより、カメラ10により取得された顔画像を処理して顔の両端の位置を検出し、この検出した両端位置に基づいて、顔の横向き角度を求め、さらに、顔の両端の検出位置のずれを数値化して検出された向き(横向き角度)の信頼度を求める装置である。   The CPU 24 executes the program stored in the ROM 23 to process the face image acquired by the camera 10 to detect the positions of both ends of the face, and based on the detected both ends positions, the lateral angle of the face Is obtained, and the reliability of the detected direction (lateral angle) is obtained by digitizing the deviation of the detection positions at both ends of the face.

RAM25は、CPU24のワークリアとして機能する。
表示制御装置27は、CPU24の制御下に、表示装置16を制御する。
光源制御装置28は、照明光源12の点灯・消灯を制御する。
The RAM 25 functions as a work rear for the CPU 24.
The display control device 27 controls the display device 16 under the control of the CPU 24.
The light source control device 28 controls turning on / off of the illumination light source 12.

次に、ROM23に格納される固定データの例を図3を参照して説明する。まず、ROM23は、図3(a)、(b)に示すような、縦エッジ検出用と横エッジ検出用ソーベルフィルタのオペレータを格納する。図3(a)、(b)に示す、縦エッジ検出用ソーベルフィルタと横エッジ検出用のソーベルフィルタとは、それぞれ、図3(c)、(d)に示すような縦方向の濃淡差、横方向の濃淡差を強調するためのオペレータである。   Next, an example of fixed data stored in the ROM 23 will be described with reference to FIG. First, the ROM 23 stores operators of vertical edge detection and horizontal edge detection Sobel filters as shown in FIGS. The vertical edge detection Sobel filter and the horizontal edge detection Sobel filter shown in FIGS. 3 (a) and 3 (b) are respectively shades in the vertical direction as shown in FIGS. 3 (c) and 3 (d). This is an operator for emphasizing the difference and the contrast in the horizontal direction.

また、ROM23は、図3(e)に示すように、RAM25に格納される顔画像のうち、目や眉の画像が存在すると想定される位置を特定するデータが格納されている。
また、ROM23は、図3(f)に示すように、サングラスを検出するために、サングラスの縦横のサイズを格納する。
また、ROM23は、図3(g)に示すように、標準的な目の画像を格納する。
Further, as shown in FIG. 3E, the ROM 23 stores data for specifying a position where it is assumed that an image of an eye or an eyebrow exists among the face images stored in the RAM 25.
Further, as shown in FIG. 3F, the ROM 23 stores the vertical and horizontal sizes of the sunglasses in order to detect the sunglasses.
The ROM 23 stores a standard eye image as shown in FIG.

次に、上記構成を有する顔向き判別装置の動作を説明する。
電源が投入されると、コンピュータ14内のCPU24は、図4に示す処理を繰り返して実行する。
Next, the operation of the face orientation determination apparatus having the above configuration will be described.
When the power is turned on, the CPU 24 in the computer 14 repeatedly executes the process shown in FIG.

即ち、CPU24は、前処理(ステップS01)と顔位置判別(検出)処理(ステップS02)とから構成される初期処理を実行し、続いて、第1の処理〜第nの処理を繰り返して実行する。nは2以上の自然数である。   That is, the CPU 24 executes an initial process including a preprocess (step S01) and a face position determination (detection) process (step S02), and then repeatedly executes the first process to the nth process. To do. n is a natural number of 2 or more.

初期処理を構成する前処理(ステップS01)と顔位置判別処理(ステップS02)とは、ドライバーの左右方向及び上下方向の顔の位置の初期値を求めるための処理である。   The pre-processing (step S01) and the face position determination process (step S02) constituting the initial process are processes for obtaining initial values of the driver's left and right and vertical face positions.

第1処理〜第n処理は、電源投入中は繰り返して実行され、それぞれ、ドライバーの顔の左右方向の顔の位置を求め、さらに、その信頼度と共に出力する。また、第1処理〜第n処理は、全体として、ドライバーの上下方向の顔の位置を1回求める。これにより、定常動作状態では、ドライバーの顔の左右方向の位置をn回求めている間に、ドライバーの顔の上下方向の位置を1回求めることになる。一般に、人間の顔の上下方向の動きは、左右方向の動きに比べて小さいため、このような検出手法を採用することにより、顔の位置の検出の精度と処理効率との両立を図ることができる。   The first process to the n-th process are repeatedly executed while the power is turned on, and the position of the driver's face in the left-right direction is obtained and output together with the reliability. In the first process to the n-th process, the face position in the vertical direction of the driver is obtained once as a whole. As a result, in the steady operation state, the vertical position of the driver's face is obtained once while the horizontal position of the driver's face is obtained n times. In general, since the vertical movement of a human face is small compared to the horizontal movement, it is possible to achieve both the detection accuracy of the face position and the processing efficiency by adopting such a detection method. it can.

初期処理を構成する前処理S01は、図5に示すように、キャプチャ処理(ステップS011)と、座標変換処理(ステップS012)と、ソーベルフィルタ処理(ステップS013)とから構成される。   As shown in FIG. 5, the pre-process S01 that constitutes the initial process includes a capture process (step S011), a coordinate conversion process (step S012), and a Sobel filter process (step S013).

キャプチャ処理(ステップS011)は、カメラ10の撮影したドライバーの1フレーム文の顔画像をA/D変換器21を介して取り込み、画像メモリ22に格納する処理である。   The capture process (step S011) is a process of capturing a face image of a one-frame sentence of the driver imaged by the camera 10 via the A / D converter 21 and storing it in the image memory 22.

座標変換処理(ステップS012)は、処理可能な程度に画素を間引く処理である。   The coordinate conversion process (step S012) is a process of thinning out pixels to the extent that they can be processed.

ソーベルフィルタ処理(ステップS013)は、ROM23に格納されている縦エッジ検出用ソーベルフィルタ(図3(a))を用いて座標変換後の顔画像を処理して、顔画像内の縦エッジを強調する処理を行い、また、横エッジ検出用ソーベルフィルタ(図3(b))を用いて座標変換後の顔画像を処理して、顔画像内の横エッジを強調する処理を行う処理である。   The Sobel filter processing (step S013) processes the face image after coordinate conversion using the vertical edge detection Sobel filter (FIG. 3A) stored in the ROM 23, and the vertical edge in the face image is processed. And a process of processing the face image after the coordinate conversion using the horizontal edge detection Sobel filter (FIG. 3B) and enhancing the horizontal edge in the face image. It is.

図4の顔位置判別処理(ステップS02)は、前処理済みの顔画像を用いて顔の両端位置と上下位置を検出する処理であり、図6に示すように、顔両端検出処理(ステップS021)と顔上下位置検出処理(ステップS022)とから構成される。   The face position determination process (step S02) in FIG. 4 is a process for detecting both end positions and top and bottom positions of a face using a preprocessed face image. As shown in FIG. 6, face both end detection process (step S021). ) And face vertical position detection processing (step S022).

顔両端検出処理(ステップS021)は、顔画像を縦エッジ検出用のオペレータで操作した顔画像について、顔の両端を構成するラインを特定する処理であり、既知の任意の手法を採用することができる。   The face both ends detection process (step S021) is a process for identifying lines constituting both ends of the face of the face image operated by the operator for detecting the vertical edge, and any known method can be adopted. it can.

例えば、図10に示すように、顔両端検出用のヒストグラム作成処理を行い(ステップS0211)、続いて、このヒストグラムのピーク値の高いものを所定数抽出して、これをソートし(ステップS0212)、ヒストグラム値に基づく、端点の抽出を行う(ステップS0213)。例えば、ヒストグラム値の上位1又は2つが他と比較して極端に値が大きい場合には、その点を端点とする。   For example, as shown in FIG. 10, a histogram creation process for detecting both ends of the face is performed (step S0211), and then a predetermined number of high histogram peak values are extracted and sorted (step S0212). Then, end points are extracted based on the histogram value (step S0213). For example, if the top one or two of the histogram values are extremely large compared to the other, that point is set as the end point.

次に、端点が2つ(両端)抽出されたか否かを判別し(ステップS0214)、判別されていれば(ステップS0214;Yes)、処理を終了し、端点が2つ抽出できていなければ(ステップS0214;No)、ヒストグラム値同士の距離が、人の顔幅としてもっともらしい間隔を有する組み合わせを抽出することにより、端点を決定し(ステップS0215)、最終的に、顔面の両端を決定する処理を行う(ステップS0216)。   Next, it is determined whether or not two end points (both ends) have been extracted (step S0214). If they have been determined (step S0214; Yes), the process ends, and if two end points have not been extracted ( Step S0214; No), a process in which the endpoints are determined by extracting a combination in which the distance between the histogram values is likely to be a human face width (step S0215), and finally the both ends of the face are determined Is performed (step S0216).

また、特許文献1に開示されているように、撮影画像の時間微分を算出し、さらに、この画素値時間微分画像の画素値を縦方向に投影してヒストグラムを作成し、エッジ部抽出画像のヒストグラムと画素値時間微分画像のヒストグラムとを合計して、ヒストグラムのピーク値の高いものを抽出すると共に人の顔幅としてもっともらしい点を決定し、顔端位置を検出するようにしてもよい。   Further, as disclosed in Patent Document 1, the time derivative of the captured image is calculated, and the pixel value of the pixel value time derivative image is projected in the vertical direction to create a histogram. The histogram and the histogram of the pixel value time-differential image may be summed to extract the one having a high peak value of the histogram, determine a plausible point as a human face width, and detect the face edge position.

次に、図6のステップS022の顔上下位置検出処理は、上述と同様の処理を横エッジについて行って、顔のほぼ目の位置(上端)と口の位置(下端)を検出する処理であり、例えば、図11に示すように、ヒストグラム作成処理(ステップS0221)と、目下候補検出処理(ステップS0222)と、顔上下位置算出処理(ステップS0233)と、から構成される。   Next, the face vertical position detection process in step S022 of FIG. 6 is a process for detecting the position of the eyes (upper end) and the position of the mouth (lower end) of the face by performing the same process as described above for the horizontal edge. For example, as shown in FIG. 11, the process includes a histogram creation process (step S0221), a current candidate detection process (step S0222), and a face vertical position calculation process (step S0233).

ヒストグラム作成処理(ステップS0221)は、横エッジ検出用ソーベルフィルタを用いたソーベルフィルタ処理後の各画素の値を横方向に投影してヒストグラムを作成する処理である。   The histogram creation process (step S0221) is a process of creating a histogram by projecting the value of each pixel after the Sobel filter process using the horizontal edge detection Sobel filter in the horizontal direction.

目下候補検出処理(ステップS0222)は、ヒストグラム値に基づいて、目・眉、口などに対応するヒストグラム値の候補を選択する処理である。
顔上下位置算出処理(ステップS0233)は、選択した候補から、顔の上下端位置(例えば、目・眉の位置)を検出する処理である。なお、顔上端位置は、例えば、眉の上、下端位置は口と顎の間などに設定される。
The current candidate detection process (step S0222) is a process of selecting a histogram value candidate corresponding to the eyes, eyebrows, mouth, and the like based on the histogram value.
The face vertical position calculation process (step S0233) is a process for detecting the upper and lower end positions of the face (for example, the positions of eyes and eyebrows) from the selected candidates. For example, the upper end position of the face is set above the eyebrows, and the lower end position is set between the mouth and the chin.

CPU24は、このようにしてステップS021とS022で求めた、顔両端(左右側端)位置と、顔の上下位置をRAM25に記憶する。   The CPU 24 stores the face end (left and right side end) positions and the face vertical position obtained in steps S021 and S022 in this manner in the RAM 25.

以上で、図4の初期処理が終了し、続いて、CPU24は、第1処理〜第n処理のループ処理を開始する。   Thus, the initial process in FIG. 4 is completed, and then the CPU 24 starts a loop process from the first process to the n-th process.

第1から第nの周期処理は、それぞれ、前処理(ステップS11〜Sn1)と、基本処理(ステップS12〜Sn2)と、後処理(ステップS13〜Sn3)と、分割処理(ステップS14〜Sn4)と、から構成される。   The first to n-th periodic processes are respectively pre-process (steps S11 to Sn1), basic process (steps S12 to Sn2), post-process (steps S13 to Sn3), and split process (steps S14 to Sn4). And.

前処理(ステップS11〜Sn1)は、ステップS01の前処理と同一であり、図5に示すように、顔画像をキャプチャするキャプチャ処理(ステップS011)、画素を間引く座標変換処理(ステップS012)、ソーベルフィルタで顔画像を処理するソーベルフィルタ処理(ステップS013)を含む。ただし、ここでのソーベルフィルタ処理は、縦エッジ検出用のソーベルフィルタ処理のみである。   The preprocessing (steps S11 to Sn1) is the same as the preprocessing of step S01, and as shown in FIG. 5, a capture process for capturing a face image (step S011), a coordinate conversion process for thinning out pixels (step S012), It includes Sobel filter processing (Step S013) for processing the face image with the Sobel filter. However, the Sobel filter processing here is only the Sobel filter processing for vertical edge detection.

図4の第1処理〜第n処理を構成する基本処理(ステップS12〜Sn2)は、それぞれ、顔の両端を検出し、顔中心を検出する処理であり、図7に示すように、顔両端検出処理(ステップS121)と顔中心検出処理(ステップS122)と、から構成される。   The basic processes (steps S12 to Sn2) constituting the first process to the nth process in FIG. 4 are processes for detecting both ends of the face and detecting the center of the face. As shown in FIG. It comprises a detection process (step S121) and a face center detection process (step S122).

顔両端検出処理(ステップS121)は、前述の図10に示す処理と同様の処理で実現可能である。即ち、前述したように、顔両端の検出用ヒストグラムを作成する(ステップS0211)。続いて、顔の両端の位置の候補データをヒストグラムの順に並べ変える(ステップS0212)。次に、ヒストグラムのうち、値が抜き出たものが存在するか否かを判別し、値が抜き出たものがある場合には、それを顔両端の候補として採用する(ステップS0213)。ステップS0213で、顔の両端が検出できたか否かを判別する(ステップS0214)。顔の両端が検出できていない場合には(ステップS0214;No)、ヒストグラムに基づいて複数の端候補を選択して、顔の両端の距離などから相対的にマッチするものを検出し(ステップS0215)、最終的に、顔面の両端を決定する処理を行う(ステップS0216)。   The face both ends detection process (step S121) can be realized by the same process as the process shown in FIG. That is, as described above, the detection histograms at both ends of the face are created (step S0211). Subsequently, the candidate data at the positions of both ends of the face are rearranged in the order of the histogram (step S0212). Next, it is determined whether there is a value extracted from the histogram, and if there is a value extracted, it is adopted as a candidate for both ends of the face (step S0213). In step S0213, it is determined whether or not both ends of the face have been detected (step S0214). If both ends of the face cannot be detected (step S0214; No), a plurality of end candidates are selected based on the histogram, and a relatively matching one is detected based on the distance between the ends of the face (step S0215). ) Finally, a process for determining both ends of the face is performed (step S0216).

一方、図7の顔中心検出処理(ステップS122)は、例えば、図12に示す構成を有する。   On the other hand, the face center detection process (step S122) in FIG. 7 has, for example, the configuration shown in FIG.

まず、CPU24は、任意の閾値を基準として、RAM25に格納されている顔画像を構成する各画素の階調を二値化する(ステップS1221)。閾値としては、例えば、顔画像を形成する全画素の平均値を使用できる。これにより、例えば、図18(a)に例示するようなドライバーの二値化画像が生成される。   First, the CPU 24 binarizes the gradation of each pixel constituting the face image stored in the RAM 25 with an arbitrary threshold as a reference (step S1221). As the threshold value, for example, an average value of all the pixels forming the face image can be used. Thereby, for example, a binary image of the driver as illustrated in FIG. 18A is generated.

続いて、CPU24は、二値化画像に、白黒白画像生成処理を実行する(ステップS1222)。
この白黒白画像生成処理において、CPU24は、まず、二値画像のうち、目の存在が予定されている領域を定義する領域指定データ(図3(e)に示すy1,y2)をROM23から読み出し、二値化画像の目領域を図18(b)に示すように切り出す。
Subsequently, the CPU 24 executes a monochrome white image generation process on the binarized image (step S1222).
In this monochrome white image generation process, the CPU 24 first reads from the ROM 23 area designation data (y1, y2 shown in FIG. 3 (e)) that defines the area where the eye is expected to be present in the binary image. Then, the eye region of the binarized image is cut out as shown in FIG.

続いて、切り出した二値化画像について、白黒白横エッジを検出する。
ここで、白黒白エッジとは、単に白と黒の境界となるエッジではなく、白から黒へ、さらに黒から白へと変化し、所定の幅を有するエッジのことである。このうち、白黒白横エッジとは、横方向にのびる境界の意味であり、このうち、白黒白縦エッジとは、縦方向にのびる境界の意味である。
Subsequently, a black-and-white white horizontal edge is detected for the cut binary image.
Here, the black-and-white white edge is not an edge that merely becomes a boundary between white and black, but an edge that changes from white to black and from black to white and has a predetermined width. Among them, the black and white white horizontal edge means a boundary extending in the horizontal direction, and among these, the black and white white vertical edge means a boundary extending in the vertical direction.

CPU24は、まず、白黒白横エッジ検出処理を開始し、図3(f)に示す設定に従って、目領域画像中で、サングラスのサイズに従って縦方向に6〜12画素(通常の目は、2〜4画素)の幅の黒い画素列を検出する。   First, the CPU 24 starts black and white white horizontal edge detection processing, and according to the setting shown in FIG. 3F, in the eye area image, 6 to 12 pixels in the vertical direction according to the size of sunglasses (normal eyes are 2 to 2). A black pixel row having a width of (4 pixels) is detected.

白黒白横エッジを検出する手法自体は任意である。例えば、座標値yを順次更新しつつ、画素(x、y)の輝度を判別し、輝度が白から黒に変化すると、黒の連続する数をカウントし、黒が白に変わった時点で黒の連続数が6〜12であるか否かを判別し、連続数が6〜12であれば、その画素を維持し、それ以外であれば、それらの画素を白に変換するという手法を採用できる。   The technique itself for detecting the black-and-white white horizontal edge is arbitrary. For example, while sequentially updating the coordinate value y, the luminance of the pixel (x, y) is discriminated, and when the luminance changes from white to black, the number of consecutive blacks is counted, and when black changes to white, black It is determined whether or not the continuous number is 6 to 12, and if the continuous number is 6 to 12, the pixel is maintained, otherwise, the pixel is converted to white. it can.

次に、白黒白横エッジ検出処理と同様の動作により白黒白縦エッジを検出する。白黒白縦エッジ検出処理は、処理済みの目領域の画像から、図3(f)の設定に従って、横方向に10〜18(通常の目は6〜10)画素の幅の黒の画素列を検出する処理である。   Next, a monochrome white vertical edge is detected by the same operation as the monochrome white horizontal edge detection process. The black-and-white white vertical edge detection process is performed by applying a black pixel column having a width of 10 to 18 (6 to 10 for normal eyes) in the horizontal direction from the processed image of the eye area in accordance with the setting of FIG. It is a process to detect.

このような構成とすることにより、例えば、抽出した目領域の画像が図18(b)に例示する画像であった場合に、連続数がx方向に1〜9及び19以上、y方向に1〜5及び13以上連続する黒画素が、白画素に変換される。これにより、サングラスのレンズを構成しない、横方向に短い黒画素列や、長すぎる黒画素列が図18(c)に示すように除去される。   By adopting such a configuration, for example, when the extracted image of the eye region is the image illustrated in FIG. 18B, the continuous number is 1 to 9 and 19 or more in the x direction, and 1 in the y direction. ˜5 and 13 or more consecutive black pixels are converted into white pixels. As a result, the black pixel rows that are short in the lateral direction and the black pixel rows that are not too long, which do not constitute sunglasses lenses, are removed as shown in FIG.

次に、CPU24は、図12のステップS1223で、サングラスの有無を判別する処理を行う。CPU24は、処理後の目領域の画像に、縦方向に6〜12画素で、横方向に10〜18画素の黒領域が2つ得られている場合には、サングラスが検出されたと判別する。   Next, CPU24 performs the process which discriminate | determines the presence or absence of sunglasses by step S1223 of FIG. The CPU 24 determines that sunglasses have been detected when two black regions of 6 to 12 pixels in the vertical direction and 10 to 18 pixels in the horizontal direction are obtained in the processed eye region image.

サングラスがあると判別した場合(ステップS1224;Yes)、予め用意されている標準的な目領域の画像、例えば、図18(d)に示す処理後の目領域の画像を、図18(e)に示す元の二値画像から目領域を除去した画像と合成して、図18(f)に示す中心位置測定用の顔画像を生成する(ステップS1225)。なお、サングラスの位置を判別して、合成する目の位置を調整してもよい。   When it is determined that there is sunglasses (step S1224; Yes), an image of a standard eye area prepared in advance, for example, an image of the eye area after processing shown in FIG. Is synthesized with an image obtained by removing the eye region from the original binary image shown in FIG. 18 to generate a face image for center position measurement shown in FIG. 18F (step S1225). The position of the eye may be adjusted by determining the position of the sunglasses.

続いて、顔画像を用いて、顔の中心位置(顔の位置、重心位置)を求める(ステップS1226)。中心の測定手法自体は任意であるが、例えば、次式から顔の中心(重心)位置の座標を求めることができる。
顔の中心のx座標=Σxi/n xi:i番目の黒画素のx座標の値
顔の中心のy座標=Σyi/n yi:i番目の黒画素のy座標の値
i:1〜n nは黒画素の総数
Subsequently, using the face image, the center position of the face (face position, barycentric position) is obtained (step S1226). Although the center measurement method itself is arbitrary, for example, the coordinates of the center (center of gravity) position of the face can be obtained from the following equation.
X-coordinate of the center of the face = Σxi / n xi: x-coordinate value of the i-th black pixel y-coordinate of the center of the face = Σyi / n yi: y-coordinate value of the i-th black pixel i: 1 to n n Is the total number of black pixels

なお、重心を求める範囲を、顔の両側端とその時点で求められている顔の上端位置と下端位置の間等に限定してもよい。或いは、顔の主要パーツの(眉、目、鼻、口)の画像のみから重心を求めてもよい。   Note that the range for obtaining the center of gravity may be limited to, for example, between both side edges of the face and the upper and lower positions of the face obtained at that time. Or you may obtain | require a gravity center only from the image of the main parts (eyebrows, eyes, nose, mouth) of the face.

なお、ステップS1224でサングラスが検出されなかった場合(ステップS1224;No)には、ステップS1225の合成処理をスキップする。   In addition, when sunglasses are not detected by step S1224 (step S1224; No), the synthetic | combination process of step S1225 is skipped.

以上で顔の中心位置が求められ、図7の顔中心検出処理(ステップS122)が終了する。即ち、この処理により、顔の水平方向の位置と顔の中心位置とが求められ、図4の基本処理(ステップS12,S22,...Sn2)が終了する。   Thus, the center position of the face is obtained, and the face center detection process (step S122) in FIG. 7 ends. That is, by this process, the horizontal position of the face and the center position of the face are obtained, and the basic process (steps S12, S22,... Sn2) in FIG.

その後、処理は図4の後処理(ステップS13、S23,...,Sn3)に進む。   Thereafter, the processing proceeds to post-processing (steps S13, S23,..., Sn3) in FIG.

後処理(ステップS13、S23,...,Sn3)は、直前の基本処理(ステップS12、S22,...,Sn2)で求めた両端位置と顔の中心位置に基づいて、顔の向きをとその信頼度を求める処理である。   Post-processing (steps S13, S23,..., Sn3) determines the face orientation based on both end positions and the face center position obtained in the immediately preceding basic processing (steps S12, S22,..., Sn2). And the process of obtaining the reliability.

この後処理(ステップS13、S23,...,Sn3は、図8に示すように、直前の基本処理(ステップS12、S22,...,Sn2)で求めた両端位置と顔の中心位置に基づいて顔の向きの角度(向き;横向き角度)を計算する処理(ステップS131)と、その信頼度を求める処理(ステップS132)と、顔向き角と信頼度とを対応付けて出力する処理(ステップS133)を備える。   As shown in FIG. 8, the post-processing (steps S13, S23,..., Sn3 is performed at both end positions and the face center position obtained in the immediately preceding basic processing (steps S12, S22,..., Sn2). A process of calculating a face orientation angle (orientation; a lateral angle) based on the process (step S131), a process for obtaining the reliability (step S132), and a process of outputting the face orientation angle and the reliability in association with each other (step S132). Step S133) is provided.

顔向き角度計算処理(ステップS131)は、直前の基本処理(ステップS12、S22,...,Sn2)で求めた顔の両端位置と、直前の基本処理(ステップS12、S22,...,Sn2)で求めた顔の中心位置とに基づいて、顔の向き(角度)を判別する。なお、顔の向きを求める計算手法自体は従来の既知の任意の手法を使用することができる。例えば、顔の両端位置の中央に顔の顔の中心位置が存在すれば、顔は正面を向いていると判別できる(カメラ10を向いた方向)にある。また、顔の中央位置が顔の両端位置の中央よりも左に存在していれば、カメラ10から見て左を向いていると判別でき、顔の中央位置が顔の両端位置の中央よりも右に存在していれば、カメラ10から見て右を向いていると判別できる。   The face orientation angle calculation process (step S131) includes both end positions of the face obtained in the immediately preceding basic process (steps S12, S22,..., Sn2) and the immediately preceding basic process (steps S12, S22,. The face orientation (angle) is determined based on the center position of the face obtained in Sn2). It should be noted that any conventionally known method can be used as the calculation method for obtaining the face orientation. For example, if the center position of the face of the face exists at the center of both end positions of the face, it can be determined that the face is facing the front (the direction facing the camera 10). If the center position of the face exists to the left of the center of both end positions of the face, it can be determined that the face is facing left as viewed from the camera 10, and the center position of the face is more than the center of both end positions of the face. If it is present on the right, it can be determined that the camera 10 is facing right when viewed from the camera 10.

続いて、CPU24は、計算した顔向き角の信頼度を求める信頼度計算処理を実行する(ステップS132)。
信頼度計算処理(ステップS132)は、図13に示すように、顔両端位置ずれ信頼度計算処理(ステップS1321)と、ヒストグラム信頼度計算処理(ステップS1322)と、重心バランス信頼度計算処理(ステップS1323)と、輝度バランス信頼度計算処理(ステップS1324)とを備える。
Subsequently, the CPU 24 executes a reliability calculation process for obtaining the reliability of the calculated face orientation angle (step S132).
As shown in FIG. 13, the reliability calculation process (step S132) includes a face end position displacement reliability calculation process (step S1321), a histogram reliability calculation process (step S1322), and a centroid balance reliability calculation process (step S1322). S1323) and luminance balance reliability calculation processing (step S1324).

顔両端位置ずれ信頼度計算処理(ステップS1321)の詳細を、図14に示す。
図示するように、CPU24は、信頼度={ t1−|R1−R2|)+(t1−|L1−L2|)+(t1−|W1−W2|)}/3 を計算する(ステップS13211)。
なお、 (t1−|R1−R2|)、(t1−|L1−L2|)、(t1−|W1−W2|)}の最小値を、それぞれ、0とする。
FIG. 14 shows details of the face both-end position deviation reliability calculation process (step S1321).
As shown in the figure, the CPU 24 calculates reliability = {t1− | R1−R2 |) + (t1− | L1−L2 |) + (t1− | W1−W2 |)} / 3 (step S13211). .
Note that the minimum values of (t1− | R1−R2 |), (t1− | L1−L2 |), and (t1− | W1−W2 |)} are set to 0, respectively.

t1は係数であり、
R1は、今回求められた顔の右端の位置、R2は顔の右端の基準値(初期値は初期処理の顔位置判別処理(ステップS02)で求められた値)、
L1は、今回求められた顔の左端の位置、L2は顔の左端の基準値(初期値は初期処理の顔位置判別処理(ステップS02)で求められた値)、
W1は、今回求められた顔の幅=|R1−L1|、W2は、顔の幅の基準値(初期値は初期処理の顔位置判別処理(ステップS02)で求められた右端と左端の距離値)、である。
t1 is a coefficient,
R1 is the position of the right edge of the face obtained this time, R2 is the reference value of the right edge of the face (the initial value is the value obtained in the face position determination process (step S02) of the initial process),
L1 is the position of the left edge of the face obtained this time, L2 is the reference value of the left edge of the face (the initial value is the value obtained in the face position determination process (step S02) of the initial process),
W1 is the face width obtained this time = | R1-L1 |, and W2 is a reference value of the face width (the initial value is the distance between the right end and the left end obtained in the face position determination process (step S02) of the initial process). Value).

この信頼度の技術的意味を図19(a)に模式的に示す。
今回得られた顔画像の両端位置(R1,L1)及び幅(W1)が基準となる顔画像(通常は、1つ前の処理で得られた顔画像)の両端位置(R2,L2)や幅(W2)と相対的に近い値ならば、高い評価を、相対的に遠い値ならば、低い評価を与えるものである。繰り返し処理の実行間隔が短いことから、これらの値に通常大きな変化は無いことを前提とする評価値である。
The technical meaning of this reliability is schematically shown in FIG.
Both end positions (R2, L2) of a face image (usually a face image obtained by the previous process) whose reference is the both end positions (R1, L1) and width (W1) of the face image obtained this time If the value is relatively close to the width (W2), a high evaluation is given, and if the value is relatively far, a low evaluation is given. Since the execution interval of the iterative process is short, these evaluation values are based on the assumption that there is usually no significant change in these values.

CPU24は、評価値が所定の閾値以上か否かを判別し(ステップS13212)、評価値が基準値以上である場合(ステップS13212;Yes)、即ち、今回の位置検出が比較的正確に行われていると評価できる場合には、図19(b)に模式的に示すように、今回取得したR1,L2,W1を次回評価用の基準値R2,L2,W2として記憶する(ステップS13213)。一方、評価値が閾値未満の場合(ステップS13212;No)、図19(c)に示すように基準値R2,L2,W2を変更しない(ステップS13214)。   The CPU 24 determines whether or not the evaluation value is greater than or equal to a predetermined threshold (step S13212). If the evaluation value is greater than or equal to the reference value (step S13212; Yes), that is, the current position detection is performed relatively accurately. If it can be evaluated, the R1, L2, and W1 acquired this time are stored as reference values R2, L2, and W2 for the next evaluation as schematically shown in FIG. 19B (step S13213). On the other hand, when the evaluation value is less than the threshold value (step S13212; No), the reference values R2, L2, and W2 are not changed as shown in FIG. 19C (step S13214).

次に、ヒストグラム信頼度計算処理(ステップS1322)の詳細を、図15を参照して説明する。
図示するように、CPU24は、信頼度={ P1/|P1+P2+P3+...Pm)}・t2 を計算する(ステップ13221)。
Next, details of the histogram reliability calculation process (step S1322) will be described with reference to FIG.
As shown in the figure, the CPU 24 determines the reliability = {P1 / | P1 + P2 + P3 +. . . Pm)} · t2 is calculated (step 13221).

t2は係数であり、
P1〜Pmは、ヒストグラム値のうちの閾値以上のものであり、P1をトップとする降順である。mは4〜7程度が望ましい。なお、ヒストグラム値の上位m個(この場合、mは固定数)を選択するようにしてもよい。
t2 is a coefficient,
P1 to Pm are equal to or higher than the threshold value among the histogram values, and are in descending order with P1 as the top. m is preferably about 4 to 7. Note that the top m histogram values (in this case, m is a fixed number) may be selected.

この信頼度の技術的意味を図20(a)〜(d)に模式的に示す。図20(a)と図20(b)とは、それぞれ、顔の左端と右端を正確に検出できている場合の検出された顔端とヒストグラム分布の例を示す図、図20(c)と図20(d)とは、それぞれ、顔の左端と右端を正確に検出できていない場合の検出された顔端とヒストグラム分布の例を示す図である。なお、ヒストグラムはピーク5つを抽出している。   The technical meaning of this reliability is schematically shown in FIGS. 20 (a) and 20 (b) are diagrams showing examples of detected face edges and histogram distributions when the left and right edges of the face can be accurately detected, and FIG. 20 (c) and FIG. FIG. 20D is a diagram showing an example of detected face edges and histogram distribution when the left edge and right edge of the face cannot be accurately detected, respectively. Note that five peaks are extracted from the histogram.

図20(a)、(b)に示すように、顔画素の左端と右端を決定したときのピーク値が他のピーク値に比べてきわめて大きいものであった場合、その左端又は右端は比較的信頼性が高い。これに対し、図20(c)、(d)に示すように、明確なピーク値が得られずに、顔の位置を決定した場合には、その信頼性は低い。   As shown in FIGS. 20A and 20B, when the peak value when the left edge and the right edge of the face pixel are determined is extremely larger than the other peak values, the left edge or the right edge is relatively High reliability. On the other hand, as shown in FIGS. 20C and 20D, when the face position is determined without obtaining a clear peak value, the reliability is low.

次に、重心バランス信頼度計算処理(ステップS1323)の詳細を、図16に示す。
まず、CPU24は、図21に模式的に示すように、重心検出領域を顔上端(FU)と顔中央(FC)からなる上部領域と、顔中央(FC)と顔下端(FD)からなる下部領域に分割する(ステップS13231)。
Next, details of the gravity center balance reliability calculation process (step S1323) are shown in FIG.
First, as schematically shown in FIG. 21, the CPU 24 has a center-of-gravity detection area as an upper area composed of the upper face face (FU) and the center of the face (FC), and a lower area composed of the face center (FC) and the lower face (FD). The area is divided (step S13231).

次に、CPU24は、直前の基本処理の顔中心検出処理で求めた重心位置(GL)を読み出し、上部領域における重心位置(UG)と下部領域による重心位置(DG)とを、計算する(ステップS13232)。   Next, the CPU 24 reads the gravity center position (GL) obtained by the face center detection process of the immediately preceding basic process, and calculates the gravity center position (UG) in the upper region and the gravity center position (DG) in the lower region (step). S13232).

次に、CPU24は、重心バランス信頼度={t3−(|GL−UG|+|GL−DG|)}×t4 を計算する(ステップS13233)。
なお、計算結果が0以下はすべて0とする。
ここで、
t3:係数,t4:係数
Next, the CPU 24 calculates the gravity center balance reliability = {t3- (| GL-UG | + | GL-DG |)} × t4 (step S13233).
It should be noted that all the calculation results are 0 or less.
here,
t3: coefficient, t4: coefficient

この信頼度の技術的意味を図21(a)に模式的に示す。
人間の顔は、図21(a)に示すように、左右対称であり、通常、基本処理で求めた中心検出領域の重心位置(GL)と、上部領域の画像の重心位置(UG)と、下部領域の画像の重心位置(DG)とは、x軸方向に関しては一致する。
The technical meaning of this reliability is schematically shown in FIG.
The human face is bilaterally symmetric as shown in FIG. 21 (a), and normally the center of gravity position (GL) of the center detection area obtained by the basic processing, and the center of gravity position (UG) of the image of the upper area, The barycentric position (DG) of the image in the lower region matches with the x-axis direction.

しかし、図21(b)に例示するように、眼帯の装着等により、顔のバランスが崩れている場合、各重心GL,UG、DGのX座標値は、互いにずれてしまう。そこで、このずれが大きい場合には、顔向き角の信頼度が低いと判断するものである。   However, as illustrated in FIG. 21B, when the balance of the face is lost due to the wearing of the eye patch or the like, the X coordinate values of the centroids GL, UG, and DG are shifted from each other. Therefore, when the deviation is large, it is determined that the reliability of the face direction angle is low.

次に、輝度バランス信頼度計算処理(ステップS1324)の詳細を、図17に示す。
まず、CPU24は、図22(a)に模式的に示すように、顔の中心検出領域を顔左上端(UL)と、顔右上端(UR)と、顔左下端(DL)と、顔右下端(DR)に分割する(ステップS13241)。
Next, details of the luminance balance reliability calculation process (step S1324) are shown in FIG.
First, as schematically shown in FIG. 22A, the CPU 24 determines the face center detection area as the upper left face of the face (UL), the upper right edge of the face (UR), the lower left face of the face (DL), and the right face of the face. It divides | segments into a lower end (DR) (step S13241).

次に、CPU24は、各領域(UL,UR,DL,DR)にて平均輝度(IUL,IUR,IDL,IDR)を算出する(ステップS13242)。   Next, the CPU 24 calculates an average luminance (IUL, IUR, IDL, IDR) in each region (UL, UR, DL, DR) (step S13242).

次に、CPU24は、次式に従って、輝度バランス信頼度を計算する(ステップS13243)。
輝度バランス信頼度
={t5−(|IUL−IUR|+|IUL−IDL|
+|IUL−IDR|+|IUR−IDL|
+|IUR−IDR|+|IDL−IDR|}×t6
t5:係数,t6:係数
計算結果が0以下はすべて0とする。
Next, the CPU 24 calculates the luminance balance reliability according to the following equation (step S13243).
Luminance balance reliability = {t5− (| IUL-IUR | + | IUL-IDL |
+ | IUL-IDR | + | IUR-IDL |
+ | IUR-IDR | + | IDL-IDR |} × t6
t5: Coefficient, t6: Coefficient calculation result is 0 or less for all results.

この信頼度の技術的意味を図22(a)に模式的に示す。
一般的に、人間の顔は、図22(a)に示すように、左右対称であり、左右対称に照明される。しかし、顔の向きや光源の位置によっては、図22(b)や22(c)に示すように、偏って照明され、顔上に位部分と明るい部分とが発生してしまう。
The technical meaning of this reliability is schematically shown in FIG.
In general, as shown in FIG. 22A, a human face is symmetric and is illuminated symmetrically. However, depending on the orientation of the face and the position of the light source, as shown in FIGS. 22 (b) and 22 (c), illumination is performed in a biased manner, and a portion and a bright portion are generated on the face.

このうち、図22(c)に示すような顔の左右方向の明るさが異なると、顔の左右方向の位置や向きの判別に悪影響を与える。そこで、上記評価式は、左右方向のバランスが悪くなるに従って評価が下がるように構成されている。   Among these, when the brightness of the face in the left-right direction as shown in FIG. 22C is different, the determination of the position and orientation of the face in the left-right direction is adversely affected. Therefore, the evaluation formula is configured so that the evaluation decreases as the balance in the left-right direction becomes worse.

以上説明したように、評価処理により、その直前の基本処理(ステップS1〜Sn2)で求められた顔の向きの信頼度が求められる。   As described above, the reliability of the face orientation obtained in the immediately preceding basic process (steps S1 to Sn2) is obtained by the evaluation process.

次に、CPU24は、ステップS131で求めた求めた顔向き角度とステップS132で求めた信頼度とを対応付けて出力する(ステップS133)。   Next, the CPU 24 outputs the face orientation angle obtained in step S131 and the reliability obtained in step S132 in association with each other (step S133).

以上で、第1処理〜第n処理のそれぞれで実行される前処理、基本処理、後処理が終了し、顔の左右方向の角度とその信頼度とが対応付けて出力される。   The pre-processing, basic processing, and post-processing executed in each of the first process to the n-th process are thus completed, and the angle in the horizontal direction of the face and the reliability thereof are output in association with each other.

続いて、CPU24は、分割処理(ステップS14〜Sn4)を開始する。
この分割処理(ステップS14〜Sn4)は、全体としては、図9に示すように、画像キャプチャ処理(ステップS141))、座標変換処理(ステップS142)、ソーベルフィルタ処理(ステップS143)、顔上下位置検出処理(ステップS144)、とから構成される。画像キャプチャ処理(ステップS141)、座標変換処理(ステップS142)、ソーベルフィルタ処理(ステップS143)は前述の前処理(ステップS01)における処理(ステップS011〜S013)と同一である。ただし、ここでの、ソーベルフィルタ処理は、横エッジ検出用のソーベルフィルタ処理のみで十分である。
Subsequently, the CPU 24 starts a dividing process (Steps S14 to Sn4).
As shown in FIG. 9, the division processing (steps S14 to Sn4) generally includes an image capture process (step S141), a coordinate conversion process (step S142), a Sobel filter process (step S143), a top and bottom face. And position detection processing (step S144). Image capture processing (step S141), coordinate conversion processing (step S142), and Sobel filter processing (step S143) are the same as the processing (steps S011 to S013) in the preprocessing (step S01) described above. However, for the Sobel filter processing here, only the Sobel filter processing for detecting the horizontal edge is sufficient.

また、顔上下位置検出処理(ステップS144)は、図6に示した、顔上下位置検出処理(ステップS022)と同様であり、第1分割処理(ステップSS14内の画像キャプチャ処理(ステップS141)で取得した顔画像に基づいて上下位置を判別する。   The face vertical position detection process (step S144) is the same as the face vertical position detection process (step S022) shown in FIG. 6, and is the first division process (image capture process in step SS14 (step S141)). The vertical position is determined based on the acquired face image.

なお、具体的な処理を実行する際には、CPU24は、分割処理(ステップS14〜Sn4)を開始する際に、種々のポインタやレジスタの値をRAM25に待避し、RAM25に待避しておいた先の分割処理の処理結果をリストア(再設定)する。続いて、CPU24は、リストアしたポインタ及びレジスタに従って動作を継続し、RAM25に格納されているデータを用いて、顔の上下位置を判別する処理の一部を行って、処理が終了すると、ポインタやレジスタの値をRAM25にセーブし、RAM25にセーブしておいた通常の処理のポインタ値やレジスタ値(分割処理を開始する直前の値)リストアして、処理を継続する。   When executing specific processing, the CPU 24 saved various pointers and register values in the RAM 25 and saved in the RAM 25 when starting the division processing (steps S14 to Sn4). Restore (reset) the processing result of the previous split processing. Subsequently, the CPU 24 continues the operation according to the restored pointer and register, performs a part of the process for determining the vertical position of the face using the data stored in the RAM 25, and when the process is completed, the pointer and the register The register value is saved in the RAM 25, and the pointer value and register value of the normal process saved in the RAM 25 (the value immediately before starting the division process) are restored, and the process is continued.

なお、各分割処理(ステップS14〜Sn4)は、一定量の処理を実行した段階で切り替えても、一定時間経過した段階で切り替えてもよい。   Each division process (steps S14 to Sn4) may be switched when a certain amount of processing is executed, or may be switched when a certain time has passed.

以上説明したように、この顔向き検出装置によれば、顔の位置や向きの判別値とその信頼度とを求めることができる。   As described above, according to this face direction detection device, it is possible to determine the discrimination value of the face position and orientation and its reliability.

この顔向き判別の出力信号の利用形態は任意であるが、例えば、顔向き検出装置からの出力に基づいて、ドライバーに脇見運転の警告を放音することができる。このとき、信頼度に応じて報知音を更新することができる。   The form of use of the output signal for the face orientation determination is arbitrary. For example, the driver can emit a warning for looking aside, based on the output from the face orientation detection device. At this time, the notification sound can be updated according to the reliability.

なお、この発明は上記実施の形態に限定されず、種々の変形及び応用が可能である。   In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.

上記実施の形態においては、4種類の信頼値を求めたが、これらの平均を求めたり、最上位点と最下位点の信頼度を除いた残りの2つの信頼度を出力対象としたり、これらの平均値を出力する等してもよい。   In the above embodiment, four types of confidence values have been obtained, but the average of these values is obtained, the remaining two degrees of reliability excluding the reliability of the highest point and the lowest point are output targets, Alternatively, the average value may be output.

また、図13のステップS1321の顔両端位置ずれ信頼度計算処理において、図14のステップS13211の信頼度の計算式は適宜変更・修正可能である。例えば、顔の左右端位置の基準位置とのずれを用いて、信頼度を計算したが、検出した顔の中心(重心)と基準中心位置との差異や、顔の中心及び両端位置と各基準位置とのずれに基づいて、信頼度を計算するなど、左右方向の位置ずれを検出し、そのずれ量から信頼度を検出できるならば、検出及び比較の対象、演算式は任意である。また、上下方向(上端位置、下端位置、中央)についても、検出位置と基準位置とのずれを検出し、信頼度を検出(判定)しても良い。さらに、顔画像の領域を複数に分割し、それぞれについてずれ量を求めて、信頼度を求める等してもよい。   Further, in the face both-end positional deviation reliability calculation process of step S1321 of FIG. 13, the calculation formula of the reliability of step S13211 of FIG. 14 can be changed and corrected as appropriate. For example, the reliability was calculated using the deviation of the left and right edge positions of the face from the reference position, but the difference between the detected face center (center of gravity) and the reference center position, the face center and both end positions, and each reference As long as the positional deviation in the left-right direction can be detected based on the deviation from the position, such as calculating the reliability, and the reliability can be detected from the deviation, the detection and comparison target and the arithmetic expression are arbitrary. In addition, in the vertical direction (upper position, lower position, center), the deviation between the detection position and the reference position may be detected to detect (determine) the reliability. Further, the face image area may be divided into a plurality of areas, and the amount of deviation may be obtained for each area to obtain the reliability.

同様に、図13のステップS1322のヒストグラム信頼度計算処理において、図15のステップS13221の計算式は適宜変更・修正可能である。例えば、ヒストグラムの第1と第2のピークの差(P1−P2)の大きさや全体に対する比に基づいて、信頼度を計算してもよい。その他、顔の側端の検出に使用したヒストグラムのピークの他のピークに対する優位度から信頼度を測定できるならば、その手法は任意である。また、顔の領域を複数に分割し、領域単位でヒストグラムを求めて信頼度を求めたり、求めた複数の信頼度を1つの信頼度に統合してもよい。   Similarly, in the histogram reliability calculation process in step S1322 in FIG. 13, the calculation formula in step S13221 in FIG. 15 can be changed or modified as appropriate. For example, the reliability may be calculated based on the magnitude of the difference (P1−P2) between the first and second peaks of the histogram and the ratio to the whole. In addition, if the reliability can be measured from the superiority of the peak of the histogram used for detecting the side edge of the face with respect to the other peak, the method is arbitrary. Further, the face area may be divided into a plurality of areas, and a histogram may be obtained for each area to obtain the reliability, or the obtained plurality of reliability may be integrated into one reliability.

また、図13のステップS1323の重心バランス信頼度計算処理において、図16のステップS13231での領域の分割数分割方法や、ステップS13233の計算式は適宜変更・修正可能である。例えば、信頼度を|UG−DG|の関数としてもよい。或いは、顔画像を上下5つの領域に分割し、それぞれについて重心位置を求め、5つの領域間の重心のずれ及び/又は全体の重心との差を求め、これらのずれから、信頼度を計算する等してもよい。   Further, in the center-of-gravity balance reliability calculation process in step S1323 in FIG. 13, the region division number division method in step S13231 in FIG. 16 and the calculation formula in step S13233 can be changed or modified as appropriate. For example, the reliability may be a function of | UG-DG |. Alternatively, the face image is divided into five upper and lower regions, the center of gravity position is obtained for each region, and the deviation of the center of gravity between the five regions and / or the difference from the overall center of gravity is obtained, and the reliability is calculated from these deviations. May be equal.

また、図13のステップS1324の輝度バランス信頼度計算処理において、図17のステップS13241での領域の分割数(縦方向の分割数及び横方向の分割数)や、ステップS13243の計算式は適宜変更・修正可能である。例えば、顔画像を上下3つ、左右4つの領域に分割し、それぞれについて輝度を求め、12個の領域間の輝度ばらつきから、信頼度を計算する等してもよい。また、各分割領域の平均輝度と全体の平均輝度との差やバランスに基づいて信頼度を判別するようにしてもよい。   In the brightness balance reliability calculation process in step S1324 in FIG. 13, the number of area divisions (vertical division number and horizontal division number) in step S13241 in FIG. 17 and the calculation formula in step S13243 are appropriately changed.・ Can be modified. For example, the face image may be divided into upper and lower three regions and right and left four regions, the luminance is obtained for each, and the reliability may be calculated from the luminance variation among the twelve regions. Further, the reliability may be determined based on the difference or balance between the average luminance of each divided region and the overall average luminance.

さらに、上記4種類の信頼度以外の信頼度を導入してもよい。例えば、ヒストグラム分布の時間軸上の変化、重心位置の時間軸上の変化、輝度の時間軸上の変化が急激すぎる場合に信頼度を低くする等の信頼度を設定してもよい。   Further, reliability other than the above four types of reliability may be introduced. For example, the reliability may be set such that the reliability is lowered when a change in the histogram distribution on the time axis, a change in the center of gravity position on the time axis, or a change in luminance on the time axis is too rapid.

また、上記実施の形態では、4つの信頼度を、ステップS131で判別した顔の向き角度(横向き角度)の信頼度として利用した。この発明は、これに限定されず、上記4つの信頼度及び他の任意の信頼度を、顔の位置の信頼度(例えば、ステップS121で判別した顔の両端位置の信頼度、ステップS122で判別した顔の中央位置の信頼度、ステップS144で判別した顔の上下位置の信頼度)、顔の存在の有無(顔の両端・中央が検出されれば存在、顔の両端・中央が検出されなければ不存在)の信頼度などとして使用してもよい。   Further, in the above embodiment, the four reliability levels are used as the reliability levels of the face orientation angle (lateral angle) determined in step S131. The present invention is not limited to this, and the above four reliability levels and other arbitrary reliability levels are determined based on the reliability level of the face position (for example, the reliability level of the both end positions of the face determined in step S121, step S122). The reliability of the center position of the detected face, the reliability of the vertical position of the face determined in step S144), the presence or absence of the face (exists if both ends and center of the face are detected, must detect both ends and center of the face) Such as non-existent) reliability.

例えば、上記実施の形態では、目領域を画像の特定の位置に固定したが、目領域を顔の画像のサイズや位置に応じて、目領域の位置を適宜設定しても良い。この場合、例えば、横エッジソーベルフィルタを適用し、顔の目や眉の位置を判別し、そのエリアを含む所定サイズのエリアを目領域とすればよい。   For example, in the above embodiment, the eye area is fixed at a specific position in the image, but the position of the eye area may be appropriately set according to the size and position of the face image. In this case, for example, a horizontal edge Sobel filter is applied, the positions of the eyes and eyebrows of the face are discriminated, and an area of a predetermined size including the area may be set as the eye area.

また、上記実施の形態では、目と眉(又は目)と、鼻、口の階調画像から顔の中心(重心)位置を求めたが、中心位置の判別に使用する顔の部分(パーツ)は任意である。例えば、耳や、ほお、頭髪などを加えて、中心を求めても良い。   In the above embodiment, the center (center of gravity) position of the face is obtained from the gradation images of the eyes, eyebrows (or eyes), nose, and mouth, but the face part (parts) used to determine the center position Is optional. For example, the center may be obtained by adding ears, cheeks, hair, and the like.

また、上記実施の形態では、サングラスが検出された場合に、目の画像を合成し、合成画像に基づいて顔の中心地位を求めたが、重心を求める手法は任意である。例えば、サングラスが検出された場合には、「目と眉」の画像を合成して中心を求めたり、サングラスのレンズの画像を構成する各画素に0.3〜0.5倍程度の重みを付けた上で、各部(レンズ、目、鼻、口...)の重心を求めて、顔画像の重心をもとめてもよい。目領域を除いた部分の顔画像から得られた重心に対し、目の画像が与える影響を予め考慮したオフセット値を加算するなどして重心を求めてもよい。   Moreover, in the said embodiment, when sunglasses were detected, the image of eyes was combined and the center position of the face was calculated | required based on the synthesized image, but the method of calculating | requiring a gravity center is arbitrary. For example, when sunglasses are detected, a center is obtained by combining the images of “eyes and eyebrows”, or a weight of about 0.3 to 0.5 times is applied to each pixel constituting the lens image of sunglasses. In addition, the center of gravity of each face (lens, eyes, nose, mouth,...) May be obtained to obtain the center of gravity of the face image. The centroid may be obtained by adding an offset value in consideration of the influence of the eye image in advance to the centroid obtained from the face image of the portion excluding the eye region.

上記実施の形態では、この発明を顔の中心位置を検出するために、サングラスの有無を検出する実施形態を示したが、サングラスを検出した後で、その結果をどのような処理に使用するかは任意である。例えば、サングラスを検出し、それにより、それにより照明の強度を変更したり、画面のバックライトの輝度を調整する等の場面に使用することも可能である。   In the above embodiment, the present invention has shown the embodiment in which the presence / absence of sunglasses is detected in order to detect the center position of the face. However, after detecting the sunglasses, what kind of processing is used for the result? Is optional. For example, it is possible to detect sunglasses, thereby changing the intensity of illumination and adjusting the brightness of the backlight of the screen.

図1,図2を参照して説明したシステム構成も一例であり、任意に変更可能である。例えば、カメラ10を遠赤外線等で画像をとらえる赤外線カメラを使用すれば、人種や肌や髪の色に影響されず比較的正確に顔の各パーツの画像を取得することが可能となる。   The system configuration described with reference to FIGS. 1 and 2 is also an example, and can be arbitrarily changed. For example, if the camera 10 is an infrared camera that captures an image with far infrared rays or the like, it is possible to acquire the image of each part of the face relatively accurately without being affected by the race, skin, or hair color.

また、上述のフローチャートも同様の機能が実現できるならば、任意に変更可能である。
例えば、所定回数以上にサングラスの画像が得られたときに、サングラス対応処理を行うようにしてもよい。
The above-described flowchart can be arbitrarily changed as long as the same function can be realized.
For example, the sunglasses handling process may be performed when images of sunglasses are obtained more than a predetermined number of times.

また、本発明において、白黒白エッジは階調の差異を表現するためのものであり、色としての白や黒に限定されるものではなく、色相はなんでもよい。カラー画像に関しては、各画素の色相を考慮してサングラスの有無を判別してもよい。   Further, in the present invention, the black and white white edge is for expressing a difference in gradation, and is not limited to white or black as a color, and any hue may be used. Regarding color images, the presence or absence of sunglasses may be determined in consideration of the hue of each pixel.

上記各実施の形態においては、ドライバーを撮影してサングラスを検出する場合にこの発明を適用したが、この発明はこれに限定されず、任意の場面で人間、動物、人形、ロボット等がサングラスをかけているか否かを判別する処理に広く適用可能である。   In each of the above embodiments, the present invention is applied to the case where sunglasses are detected by photographing a driver. However, the present invention is not limited to this, and humans, animals, dolls, robots, etc. wear sunglasses in any scene. The present invention can be widely applied to processing for determining whether or not it is applied.

本発明は、カメラで画像を取得しながら処理する場合に限定されず、例えば、他所で撮影した1又は複数の顔画像のそれぞれについて、サングラスの有無、顔の中心の位置、顔の向きなどを判別する為に使用可能である。   The present invention is not limited to processing while acquiring an image with a camera. For example, for each of one or a plurality of face images photographed elsewhere, the presence or absence of sunglasses, the position of the center of the face, the orientation of the face, etc. It can be used to determine.

また、コンピュータに上述の処理を実行させるためのコンピュータプログラムを、任意の記録媒体やネットワークを介してROMに格納するようにしてもよい。   Further, a computer program for causing a computer to execute the above-described processing may be stored in the ROM via an arbitrary recording medium or a network.

本発明の実施形態に係る顔向き判別装置のブロック図である。1 is a block diagram of a face orientation determination device according to an embodiment of the present invention. 図1に示すコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of the computer shown in FIG. ROMに格納されている各種データを説明するための図である。It is a figure for demonstrating the various data stored in ROM. 図1に示す顔向き判別装置の動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of the face orientation determination device shown in FIG. 1. 図4のフローチャートにおける前処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the pre-processing in the flowchart of FIG. 図4のフローチャートにおける顔位置判別処理の具体例を説明するためのフローチャートである。5 is a flowchart for explaining a specific example of face position determination processing in the flowchart of FIG. 4. 図4のフローチャートにおける基本処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the basic process in the flowchart of FIG. 図4のフローチャートにおける後処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the post-process in the flowchart of FIG. 図4のフローチャートにおける第1〜第nの分割処理の具体例を説明するためのフローチャートである。FIG. 5 is a flowchart for explaining a specific example of first to n-th division processes in the flowchart of FIG. 4. FIG. 図7の顔両端検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the face both ends detection process of FIG. 図7の顔上下位置検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the face up-and-down position detection process of FIG. 図8の顔中心検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the face center detection process of FIG. 図8の信頼度計算処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the reliability calculation process of FIG. 図8の顔両端位置ずれ信頼度計算処理の具体例を説明するためのフローチャートである。FIG. 9 is a flowchart for explaining a specific example of face both-end positional deviation reliability calculation processing of FIG. 8. FIG. 図8のヒストグラム信頼度計算処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the histogram reliability calculation process of FIG. 図8の重心バランス信頼度計算処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the gravity center balance reliability calculation process of FIG. 図8の輝度バランス信頼度計算処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the brightness | luminance balance reliability calculation process of FIG. サングラス検出処理を説明するための図である。It is a figure for demonstrating a sunglasses detection process. 顔両端位置ずれ信頼度の技術的意味を説明するための図である。It is a figure for demonstrating the technical meaning of a face both-ends position shift reliability. ヒストグラム信頼度の技術的意味を説明するための図である。It is a figure for demonstrating the technical meaning of a histogram reliability. 重心バランス信頼度の技術的意味を説明するための図である。It is a figure for demonstrating the technical meaning of a gravity center balance reliability. 輝度バランス信頼度の技術的意味を説明するための図である。It is a figure for demonstrating the technical meaning of brightness | luminance balance reliability.

符号の説明Explanation of symbols

10 カメラ
22 画像メモリ (顔画像記憶手段)
23 ROM (顔位置判別手段、顔向き判別手段、信頼度判別手段、出力手段)
24 CPU (顔位置判別手段、顔向き判別手段、信頼度判別手段、出力手段)
10 Camera 22 Image memory (Face image storage means)
23 ROM (face position determination means, face orientation determination means, reliability determination means, output means)
24 CPU (face position determination means, face orientation determination means, reliability determination means, output means)

Claims (7)

顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを出力する出力手段と、
を備え、
前記信頼度判別手段は、従前に判別された顔の位置と今回検出された顔の位置とのずれの大きさに基づいて、顔向きの信頼度を求める、ことを特徴とする顔向き判別装置。
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
A face orientation determining means for outputting the orientation of the face based on the face position and the center position of the face determined by the face position determining means;
Reliability determination means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the orientation of the face determined by the face orientation determining means and the reliability determined by the reliability determining means;
With
The reliability determination means obtains the reliability of the face orientation based on the magnitude of the deviation between the previously determined face position and the currently detected face position. .
顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを出力する出力手段と、
を備え、
前記信頼度判別手段は、顔画像を複数の領域に分割し、各領域の重心を求め、求めた重心位置に基づいて、顔向きの信頼度を求める、ことを特徴とする顔向き判別装置。
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
A face orientation determining means for outputting the orientation of the face based on the face position and the center position of the face determined by the face position determining means;
Reliability determination means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the orientation of the face determined by the face orientation determining means and the reliability determined by the reliability determining means;
With
The reliability determination unit divides a face image into a plurality of areas, calculates a centroid of each area, and calculates a reliability of the face direction based on the calculated centroid position.
顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段と、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段と、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段と、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを出力する出力手段と、
を備え、
前記信頼度判別手段は、顔画像を複数の領域に分割し、各領域の輝度を求め、求めた輝度に基づいて、顔位置の信頼度を求める、ことを特徴とする顔向き判別装置。
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
A face orientation determining means for outputting the orientation of the face based on the face position and the center position of the face determined by the face position determining means;
Reliability determination means for obtaining a reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the orientation of the face determined by the face orientation determining means and the reliability determined by the reliability determining means;
With
The reliability determination unit divides a face image into a plurality of areas, calculates the luminance of each area, and calculates the reliability of the face position based on the calculated luminance.
前記顔位置判別手段と前記顔向き判別手段と前記信頼度判別手段とは、前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の水平方向の位置と向きを判別する処理と、判別した水平方向の向きの信頼度を求める1単位の処理を繰り返して実行し、
顔の垂直方向の位置を判別する処理を複数の処理ステップに区分して、各1単位の処理内でいずれかの区分ステップを実行し、前記区分ステップの実行を複数回繰り返すことにより、顔の垂直方向の位置を求める、
ことを特徴とする請求項1乃至のいずれか1項に記載の顔向き判別装置。
The face position determining means, the face orientation determining means, and the reliability determining means determine a horizontal position and orientation of a face based on the face image stored in the face image storage means; Repeat the process of 1 unit to obtain the reliability of the determined horizontal direction,
By dividing the process of determining the position of the face in the vertical direction into a plurality of processing steps, executing one of the dividing steps within each unit of processing, and repeating the execution of the dividing step a plurality of times, Find the vertical position,
The face orientation discrimination device according to any one of claims 1 to 3 .
コンピュータを、
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、
として機能させるコンピュータプログラムであって、
前記コンピュータに、前記信頼度判別手段として、従前に判別された顔の位置と今回検出された顔の位置とのずれの大きさに基づいて、顔向きの信頼度を求める処理を実行させるコンピュータプログラム。
Computer
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
Face orientation determining means for outputting the orientation of the face based on the position of the face determined by the face position determining means and the position of the center of the face;
Reliability determination means for obtaining reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the face orientation determined by the face orientation determination means and the reliability determined by the reliability determination means in association with each other;
A computer program that functions as
A computer program for causing the computer to execute a process for determining the reliability of the face orientation based on the degree of deviation between the previously determined face position and the currently detected face position as the reliability determination means. .
コンピュータを、
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、
として機能させるコンピュータプログラムであって、
前記コンピュータに、前記信頼度判別手段として、顔画像を複数の領域に分割し、各領域の重心を求め、求めた重心位置に基づいて、顔向きの信頼度を求める処理を実行させるコンピュータプログラム。
Computer
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
Face orientation determining means for outputting the orientation of the face based on the position of the face determined by the face position determining means and the position of the center of the face;
Reliability determination means for obtaining reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the face orientation determined by the face orientation determination means and the reliability determined by the reliability determination means in association with each other;
A computer program that functions as
A computer program for causing the computer to execute a process of dividing a face image into a plurality of areas, obtaining a centroid of each area, and obtaining a face orientation reliability based on the obtained centroid position as the reliability determination unit.
コンピュータを、
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、
前記顔画像記憶手段に記憶された前記顔画像に基づいて、顔の位置と顔の中心の位置とを判別する顔位置判別手段、
前記顔位置判別手段により求められた顔の位置と顔の中心の位置とに基づいて顔の向きを出力する顔向き判別手段、
前記顔向き判別手段により判別された顔向きについて、その確からしさを示す信頼度を求める信頼度判別手段、
前記顔向き判別手段で判別された顔の向きと、前記信頼度判別手段により判別されたその信頼度とを対応付けて出力する出力手段、
として機能させるコンピュータプログラムであって、
前記コンピュータに、前記信頼度判別手段として、顔画像を複数の領域に分割し、各領域の輝度を求め、求めた輝度に基づいて、顔位置の信頼度を求める処理を実行させるコンピュータプログラム。
Computer
Face image storage means for storing a face image obtained by photographing a face;
Face position determination means for determining the position of the face and the position of the center of the face based on the face image stored in the face image storage means;
Face orientation determining means for outputting the orientation of the face based on the position of the face determined by the face position determining means and the position of the center of the face;
Reliability determination means for obtaining reliability indicating the certainty of the face orientation determined by the face orientation determination means;
An output means for outputting the face orientation determined by the face orientation determination means and the reliability determined by the reliability determination means in association with each other;
A computer program that functions as
A computer program for causing the computer to execute a process of dividing a face image into a plurality of areas, obtaining the brightness of each area, and obtaining the reliability of the face position based on the obtained brightness, as the reliability determination means.
JP2005257175A 2005-09-05 2005-09-05 Face orientation discrimination device Active JP4825473B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005257175A JP4825473B2 (en) 2005-09-05 2005-09-05 Face orientation discrimination device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005257175A JP4825473B2 (en) 2005-09-05 2005-09-05 Face orientation discrimination device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2011144992A Division JP5172995B2 (en) 2011-06-29 2011-06-29 Face orientation discrimination device and computer program

Publications (2)

Publication Number Publication Date
JP2007072628A JP2007072628A (en) 2007-03-22
JP4825473B2 true JP4825473B2 (en) 2011-11-30

Family

ID=37934026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005257175A Active JP4825473B2 (en) 2005-09-05 2005-09-05 Face orientation discrimination device

Country Status (1)

Country Link
JP (1) JP4825473B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210280A (en) * 2011-06-29 2011-10-20 Aisin Seiki Co Ltd Face direction discriminating device

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4771139B2 (en) * 2006-02-14 2011-09-14 オムロン株式会社 Anomaly detection apparatus and method, recording medium, and program
JP4910212B2 (en) * 2007-03-30 2012-04-04 アイシン精機株式会社 Eye position detection apparatus, method and program
JP4874914B2 (en) 2007-09-28 2012-02-15 富士フイルム株式会社 Jaw position calculation apparatus, image processing apparatus using the same, jaw position calculation method, and program
JP2009116742A (en) 2007-11-08 2009-05-28 Aisin Seiki Co Ltd Onboard image processor, image processing method, and program
JP5271742B2 (en) * 2009-02-10 2013-08-21 セコム株式会社 Sunglass wear detection device
KR101215751B1 (en) * 2009-07-16 2012-12-26 주식회사 만도 face rotation angle detection method and apparatus
JP5396287B2 (en) * 2010-01-14 2014-01-22 本田技研工業株式会社 Face orientation detection device
JP5396298B2 (en) * 2010-02-04 2014-01-22 本田技研工業株式会社 Face orientation detection device
FR3015092A1 (en) * 2013-12-17 2015-06-19 Scotler France CONTROLLING A POINTER ON A DIGITAL SCREEN
JP6452324B2 (en) * 2014-06-02 2019-01-16 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP6597467B2 (en) * 2016-04-20 2019-10-30 株式会社デンソー Face orientation measuring device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3375449B2 (en) * 1995-02-27 2003-02-10 シャープ株式会社 Integrated recognition dialogue device
JP3926507B2 (en) * 1999-05-28 2007-06-06 沖電気工業株式会社 Eye position and face position detection device
JP4198542B2 (en) * 2003-06-19 2008-12-17 株式会社豊田中央研究所 Face presence / absence determination device and face presence / absence determination program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210280A (en) * 2011-06-29 2011-10-20 Aisin Seiki Co Ltd Face direction discriminating device

Also Published As

Publication number Publication date
JP2007072628A (en) 2007-03-22

Similar Documents

Publication Publication Date Title
JP4825473B2 (en) Face orientation discrimination device
JP4445454B2 (en) Face center position detection device, face center position detection method, and program
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
JP4739870B2 (en) Sunglasses detection device and face center position detection device
JP4309927B2 (en) Eyelid detection device and program
JP4130820B2 (en) Face center position detection apparatus and method, and program
JP2004094491A (en) Face orientation estimation device and method and its program
JP2008234208A (en) Facial region detection apparatus and program
JP4625949B2 (en) Object tracking method, object tracking apparatus, and program
EP2976990B1 (en) Pupil detection device and pupil detection method
JP2015232482A (en) Inspection equipment, inspection method and program
JP2011165170A (en) Object detection device and program
JP5338762B2 (en) White balance coefficient calculation device and program
JP4198542B2 (en) Face presence / absence determination device and face presence / absence determination program
JP2007011490A (en) Device and method for detecting road parameter
JP5172995B2 (en) Face orientation discrimination device and computer program
JP2007241477A (en) Image processor
JPH11306348A (en) Method and device for object detection
JP2017204757A (en) Subject tracking device and program
JP4550768B2 (en) Image detection method and image detection apparatus
JP2015176252A (en) Image processor and image processing method
JP4475060B2 (en) Human detection device
JP2004110543A (en) Face image processing unit and program
JPH11283036A (en) Object detector and object detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080617

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110104

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110307

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110629

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20110812

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110906

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110912

R151 Written notification of patent or utility model registration

Ref document number: 4825473

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20140916

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

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

Free format text: PAYMENT UNTIL: 20140916

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250