JP2011054056A - Face position detector, face position detection method, and program - Google Patents

Face position detector, face position detection method, and program Download PDF

Info

Publication number
JP2011054056A
JP2011054056A JP2009204056A JP2009204056A JP2011054056A JP 2011054056 A JP2011054056 A JP 2011054056A JP 2009204056 A JP2009204056 A JP 2009204056A JP 2009204056 A JP2009204056 A JP 2009204056A JP 2011054056 A JP2011054056 A JP 2011054056A
Authority
JP
Japan
Prior art keywords
face
pixel group
pixel
contour
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009204056A
Other languages
Japanese (ja)
Other versions
JP5397103B2 (en
Inventor
Takashi Hiramaki
崇 平槙
Tsugunori Morita
貢規 森田
Atsushi Adachi
淳 足立
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.)
Aisin Corp
Original Assignee
Aisin Seiki 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 Aisin Seiki Co Ltd filed Critical Aisin Seiki Co Ltd
Priority to JP2009204056A priority Critical patent/JP5397103B2/en
Publication of JP2011054056A publication Critical patent/JP2011054056A/en
Application granted granted Critical
Publication of JP5397103B2 publication Critical patent/JP5397103B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To detect the face of a driver who drives a vehicle. <P>SOLUTION: Pixel groups consisting of pixels arranged to be aligned with a contour curve determined in advance to meet the contour of the face are sequentially selected from among pixels constituting an image obtained by imaging the face of the driver. Likelihood of the selected pixel groups constituting the contour of the face of the driver is computed. The position of the face of the driver is detected, on condition that the pixels constituting the pixel groups determined based on the likelihood constitute the contour of the face. Since linear edges which do not constitute the contour of the face are not thereby extracted as the contour of the face, the contour of the face can be accurately detected. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、顔位置検出装置、顔位置検出方法及びプログラムに関し、更に詳しくは、画像に写る顔の位置を検出する顔位置検出装置、画像に写る顔の位置を検出するための顔位置検出方法及びプログラムに関する。   The present invention relates to a face position detection device, a face position detection method, and a program, and more particularly, a face position detection device that detects the position of a face that appears in an image, and a face position detection method that detects the position of a face that appears in an image. And the program.

交通事故を誘発する原因は様々であるが、運転者が漫然とした状態で車両の運転を行うことも、事故を誘発する原因の1つである。漫然とした状態とは、運転中の会話や、携帯電話の使用など、運転者が運転以外の行動を行うことにより、運転に対する注意力が散漫になった状態や、疲労や眠気などによって運転者の注意力が低下した状態をいう。そこで、車両を運転する運転者の状態を随時観察し、運転者が漫然な状態に至った場合に、運転者に警告を発するシステムが提案されている。   There are various causes for inducing traffic accidents, but driving a vehicle in a vague state by a driver is one of the causes for inducing an accident. The ridiculous state means that the driver's attention is distracted due to the driver's actions other than driving, such as conversation while driving or the use of a mobile phone, or the driver's attention due to fatigue or sleepiness. A state of reduced attention. In view of this, a system has been proposed in which the state of the driver who drives the vehicle is observed at any time, and a warning is given to the driver when the driver reaches an ambiguous state.

この種のシステムでは、モニタカメラなどの視野内にある運転者を正確に認識するために種々の方法が用いられている(例えば特許文献1及び2参照)。   In this type of system, various methods are used for accurately recognizing a driver in the field of view such as a monitor camera (see, for example, Patent Documents 1 and 2).

特開2005−011097号公報JP 2005-011097 A 特開2007−72628号公報JP 2007-72628 A

特許文献1に記載された装置は、人の顔を撮像して得られた画像から、各画素の輝度の変化に基づいて、顔の中心を通る中心線の候補となる複数の直線を検出する。そして、顔の輪郭などを表す画素の対象性を利用して、候補となる直線の中から、最も確からしい直線を選択し、選択した当該直線に関する確からしさに基づいて、運転者の顔の有無を判定する。   The apparatus described in Patent Document 1 detects a plurality of straight lines that are candidates for a center line passing through the center of a face, based on a change in luminance of each pixel, from an image obtained by imaging a human face. . Then, the most probable straight line is selected from the candidate straight lines using the target of the pixel representing the contour of the face, and the presence or absence of the driver's face is determined based on the probability related to the selected straight line. Determine.

しかしながら、この装置は、車両の移動などにより運転者の顔に影ができると、顔の輪郭に一致する画素をうまく特定することができなくなることがある。このため、正確に顔の有無を判定することが困難となる場合がある。   However, in this apparatus, if a shadow is formed on the driver's face due to movement of the vehicle or the like, pixels matching the face outline may not be identified well. For this reason, it may be difficult to accurately determine the presence or absence of a face.

また、特許文献2に記載された装置は、人の顔を含む所定領域を撮像して得られる画像に対して、ソーベルフィルタを用いた画像処理を実行する。次に、当該処理後の画像を構成する画素のエッジ値に基づくヒストグラムを生成する。そして、ヒストグラムのピークに対応する位置を顔の輪郭として検出する。しかしながら、ヒストグラムのピークが現れる位置は、運転者の顔にできる影の影響を受けて変動する。このため、この装置では、正確に顔の位置を検出することが困難となる場合がある。   Moreover, the apparatus described in Patent Document 2 performs image processing using a Sobel filter on an image obtained by imaging a predetermined area including a human face. Next, a histogram based on the edge values of the pixels constituting the processed image is generated. Then, the position corresponding to the peak of the histogram is detected as the face outline. However, the position where the peak of the histogram appears fluctuates due to the influence of the shadow formed on the driver's face. For this reason, in this apparatus, it may be difficult to accurately detect the position of the face.

本発明は、上述の事情の下になされたもので、顔に現れる影などの影響を受けることなく、顔の両端を正確に検出することを目的とする。   The present invention has been made under the above-described circumstances, and an object thereof is to accurately detect both ends of a face without being affected by shadows appearing on the face.

上記目的を達成するために、本発明の顔位置検出装置は、人の顔を撮像する撮像手段と、撮像手段によって撮像された画像を構成する画素のうち、顔の輪郭に沿う輪郭曲線状に配置される画素からなる画素群を順次選択する選択手段と、選択手段に選択された画素群ごとに、各画素における画像に含まれるエッジの向きを検出するエッジ方向検出手段と、画素群ごとに、画素相互間の位置関係と、各画素それぞれにおけるエッジの向きに基づいて、画素群を構成する画素が顔の輪郭を構成する尤度を算出する演算手段と、を備える。   In order to achieve the above object, a face position detection device according to the present invention has an imaging means for imaging a human face and a contour curve shape that follows the outline of the face among pixels constituting an image captured by the imaging means. A selection unit that sequentially selects a pixel group including arranged pixels, an edge direction detection unit that detects an orientation of an edge included in an image in each pixel for each pixel group selected by the selection unit, and a pixel group Computing means for calculating a likelihood that the pixels constituting the pixel group constitute the face contour based on the positional relationship between the pixels and the direction of the edge of each pixel.

演算手段は、画素それぞれの座標と、エッジの向きとによって規定される点の分布に基づいて尤度を算出することとしてもよい。   The calculation means may calculate the likelihood based on a distribution of points defined by the coordinates of each pixel and the direction of the edge.

また、演算手段は、画素群を構成する画素それぞれの座標と、当該座標における輪郭曲線の法線の向きとを示す基準曲線に対する点の分布に基づいて尤度を算出することとしてもよい。   The computing means may calculate the likelihood based on the distribution of points with respect to a reference curve indicating the coordinates of each pixel constituting the pixel group and the direction of the normal line of the contour curve at the coordinates.

また、演算手段は、統計に基づいて設定された範囲内にある点の数に基づいて尤度を算出することとしてもよい。   Further, the calculation means may calculate the likelihood based on the number of points within a range set based on statistics.

顔位置検出装置は、尤度に基づいて画素群を特定し、特定した画素群の画素を顔の輪郭の少なくとも一部を構成する画素であるとして、画像から顔の位置を検出する顔位置検出手段を更に備えていてもよい。   The face position detection device identifies a pixel group based on likelihood, and detects the position of the face from the image, assuming that the pixel of the identified pixel group is a pixel constituting at least a part of the contour of the face Means may be further provided.

画素群は、顔の右側の輪郭に沿う第1の輪郭曲線状に配置される画素からなる画素群と、顔の左側の輪郭に沿う第2の輪郭曲線状に配置される画素からなる画素群と、を含み、顔位置検出手段は、第1の輪郭曲線状に配置される画素からなる画素群の中から、尤度に基づいていずれかの画素群を第1画素群として抽出するとともに、第2の輪郭曲線状に配置される画素からなる画素群の中から、尤度に基づいていずれかの画素群を第2画素群として抽出し、第1画素群及び第2画素群を構成する画素を、顔の輪郭の少なくとも一部を構成する画素であるとして、画像に含まれる顔の位置を検出することとしてもよい。   The pixel group is a pixel group composed of pixels arranged in a first contour curve shape along the right contour of the face and a pixel group composed of pixels arranged in a second contour curve shape along the left contour of the face. And the face position detection means extracts one of the pixel groups as a first pixel group based on the likelihood from a pixel group consisting of pixels arranged in a first contour curve shape, One pixel group is extracted as a second pixel group based on likelihood from the pixel group composed of pixels arranged in the second contour curve, and the first pixel group and the second pixel group are configured. The position of the face included in the image may be detected by assuming that the pixel is a pixel constituting at least a part of the contour of the face.

顔位置検出手段は、尤度が最も高いときの画素群を抽出することとしてもよい。   The face position detecting means may extract a pixel group when the likelihood is the highest.

また、顔位置検出手段は、第1画素群及び第2画素群を、第1画素群を構成する画素におけるエッジの方向と、第2画素群を構成する画素におけるエッジの方向との対称性に基づいて抽出することとしてもよい。   In addition, the face position detection means makes the first pixel group and the second pixel group symmetrical with respect to the edge direction in the pixels constituting the first pixel group and the edge direction in the pixels constituting the second pixel group. It is good also as extracting based on.

また、顔位置検出手段は、第1画素群及び第2画素群を、第1画素群を構成する画素と、第2画素群を構成する画素との、顔の上下方向に関する相対位置関係に基づいて抽出することとしてもよい。   In addition, the face position detection unit determines the first pixel group and the second pixel group based on a relative positional relationship in the vertical direction of the face between the pixels constituting the first pixel group and the pixels constituting the second pixel group. It is good also as extracting.

上記目的を達成するために、本発明の顔位置検出方法は、人の顔が写る画像を構成する画素のうち、顔の輪郭に沿う輪郭曲線状に配置される画素からなる画素群を順次選択する工程と、選択した画素群ごとに、各画素における画像に含まれるエッジの向きを検出する工程と、画素群ごとに、画素それぞれの座標と、エッジの向きとによって規定される点の分布に基づいて、画素群を構成する画素が顔の輪郭を構成する尤度を算出する工程と、尤度に基づいて画素群を特定し、特定した画素群の画素を顔の輪郭の少なくとも一部を構成する画素であるとして、画像に含まれる顔の位置を検出する工程と、を含む。   In order to achieve the above object, the face position detection method of the present invention sequentially selects a pixel group composed of pixels arranged in a contour curve along the face contour from among pixels constituting an image showing a human face. For each selected pixel group, detecting the direction of the edge included in the image in each pixel, and for each pixel group, the distribution of points defined by the coordinates of each pixel and the edge direction Based on the step of calculating the likelihood that the pixels constituting the pixel group constitute the contour of the face, identifying the pixel group based on the likelihood, and replacing the pixel of the identified pixel group with at least a part of the contour of the face And detecting a position of a face included in the image as a constituent pixel.

上記目的を達成するために、本発明のプログラムは、コンピュータを、人の顔が写る画像を構成する画素のうち、顔の輪郭に沿う輪郭曲線状に配置される画素からなる画素群を順次選択する手段と、選択した画素群ごとに、各画素における画像に含まれるエッジの向きを検出する手段と、画素群ごとに、画素それぞれの座標と、エッジの向きとによって規定される点の分布に基づいて、画素群を構成する画素が顔の輪郭を構成する尤度を算出する手段と、尤度に基づいて画素群を特定し、特定した画素群の画素を顔の輪郭の少なくとも一部を構成する画素であるとして、画像に含まれる顔の位置を検出する手段と、として機能させる。   In order to achieve the above object, the program of the present invention sequentially selects a pixel group consisting of pixels arranged in a contour curve along the outline of a face from among pixels constituting an image showing a human face. For each selected pixel group, a means for detecting the direction of the edge included in the image in each pixel, and for each pixel group, a distribution of points defined by the coordinates of each pixel and the edge direction. Based on the means for calculating the likelihood that the pixels constituting the pixel group constitute the face contour, the pixel group is identified based on the likelihood, and the pixel of the identified pixel group is determined as at least a part of the face contour. It is assumed that the pixel is a constituent pixel and functions as means for detecting the position of the face included in the image.

本発明によれば、顔の両端を正確に検出することができる。   According to the present invention, both ends of the face can be accurately detected.

第1の実施形態に係る顔位置検出装置のブロック図である。It is a block diagram of the face position detection apparatus concerning a 1st embodiment. 撮像装置によって撮像された画像を示す図である。It is a figure which shows the image imaged by the imaging device. 輪郭曲線を説明するための図である。It is a figure for demonstrating a contour curve. 第1のテンプレートを示す図である。It is a figure which shows a 1st template. 第2のテンプレートを示す図である。It is a figure which shows a 2nd template. 選択部の動作を説明するための図である。It is a figure for demonstrating operation | movement of a selection part. y−θ座標系にプロットされた点を示す図(その1)である。FIG. 3 is a diagram (part 1) illustrating points plotted in a y-θ coordinate system. 第1のテンプレートに規定された輪郭曲線の法線ベクトルを示す図である。It is a figure which shows the normal vector of the outline curve prescribed | regulated to the 1st template. 画像上の輪郭曲線の位置を示す図である。It is a figure which shows the position of the outline curve on an image. y−θ座標系にプロットされた点を示す図(その2)である。FIG. 6 is a diagram (part 2) illustrating points plotted in the y-θ coordinate system. y−θ座標系にプロットされた点を示す図(その3)である。FIG. 10 is a diagram (part 3) illustrating points plotted in the y-θ coordinate system. 第2のテンプレートに規定された輪郭曲線の法線ベクトルを示す図である。It is a figure which shows the normal vector of the contour curve prescribed | regulated to the 2nd template. 第2の実施形態に係る顔位置検出装置のブロック図である。It is a block diagram of the face position detection apparatus which concerns on 2nd Embodiment. 画像処理装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of an image processing apparatus.

《第1の実施形態》
以下、本発明の第1の実施形態を、図1〜図12を参照しつつ説明する。図1は本実施形態にかかる顔位置検出装置10の概略的な構成を示すブロック図である。顔位置検出装置10は、画像に写った人の顔を検出する装置である。この顔位置検出装置10は、図1に示されるように、撮像装置20と、撮像装置20によって撮像された画像から人の顔を検出する画像処理装置30とを有している。
<< First Embodiment >>
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a schematic configuration of a face position detection apparatus 10 according to the present embodiment. The face position detection device 10 is a device that detects a human face in an image. As illustrated in FIG. 1, the face position detection device 10 includes an imaging device 20 and an image processing device 30 that detects a human face from an image captured by the imaging device 20.

撮像装置20は、被写体を撮像することにより取得した画像を電気信号に変換して出力する装置である。例えば図2に示される画像IMを参照するとわかるように、この撮像装置20は、車両の運転席に着座したときの運転者100の顔Fが撮像されるように、例えば車両のフロントガラスや、ダッシュボードに取り付けられている。そして、運転者100を所定の周期で撮像し、撮像して得た画像に関する情報を画像処理装置30へ出力する。   The imaging device 20 is a device that converts an image acquired by imaging a subject into an electrical signal and outputs the electrical signal. For example, as can be seen by referring to the image IM shown in FIG. 2, the imaging device 20 is configured so that the face F of the driver 100 when seated in the driver's seat of the vehicle is imaged, for example, the windshield of the vehicle, Attached to the dashboard. Then, the driver 100 is imaged at a predetermined cycle, and information related to the image obtained by imaging is output to the image processing device 30.

図1に戻り、画像処理装置30は、選択部31、エッジ角度検出部32、演算部33及び顔位置検出部34を含んで構成されている。   Returning to FIG. 1, the image processing apparatus 30 includes a selection unit 31, an edge angle detection unit 32, a calculation unit 33, and a face position detection unit 34.

選択部31は、撮像装置20によって撮像された画像から、予め設定された輪郭曲線に沿って配置された複数の画素からなる画素群を順次選択し出力する。   The selection unit 31 sequentially selects and outputs a pixel group composed of a plurality of pixels arranged along a preset contour curve from the image captured by the imaging device 20.

図3には、運転者100の顔Fの輪郭に沿う輪郭曲線L1及び輪郭曲線L2が示されている。輪郭曲線L1及び輪郭曲線L2は、車両の運転席に着座した複数人の被験者を、撮像装置20によって、予め撮像して得た画像データに基づいて規定された曲線である。これらの輪郭曲線L1及び輪郭曲線L2それぞれは、運転者100の顔Fの右側(+X側)及び左側(−X側)の輪郭に沿って滑らかに湾曲した形状を有している。   FIG. 3 shows a contour curve L1 and a contour curve L2 along the contour of the face F of the driver 100. The contour curve L <b> 1 and the contour curve L <b> 2 are curves defined based on image data obtained by imaging a plurality of subjects seated in the driver's seat of the vehicle in advance by the imaging device 20. Each of the contour curve L1 and the contour curve L2 has a smoothly curved shape along the right (+ X side) and left (−X side) contours of the face F of the driver 100.

選択部31は、図4に示されるように、輪郭曲線L1に一致する40の画素が着色して示されたテンプレートT1と、図5に示されるように、輪郭曲線L2に一致する40の画素が着色して示されたテンプレートT2とを有している。これらのテンプレートT1及びテンプレートT2それぞれは、40行10列のマトリクス状に配置された400の画素a(m,n)からなり、左下のコーナーを原点とするテンプレート座標系(xy座標系)が規定されている。また、テンプレートT1及びテンプレートT2では、説明の便宜上、輪郭曲線L1或いは輪郭曲線L2に一致する画素のうち、Y座標が最も小さいものを画素aと表示し、Y座標が1画素分増加する毎に画素a、画素a、…画素a40と表示するものとする。 As shown in FIG. 4, the selection unit 31 includes a template T1 in which 40 pixels matching the contour curve L1 are colored, and 40 pixels matching the contour curve L2 as shown in FIG. Has a template T2 colored. Each of these templates T1 and T2 is composed of 400 pixels a (m, n) arranged in a matrix of 40 rows and 10 columns, and a template coordinate system (xy coordinate system) with the lower left corner as the origin is defined. Has been. Further, the template T1 and template T2, for convenience of explanation, among the pixels that match the contour curve L1 or profile curve L2, what Y coordinate smallest displayed as pixels a 1, every time the Y coordinate is increased by one pixel Are displayed as pixel a 2 , pixel a 3 ,..., Pixel a 40 .

選択部31は、一例として図6に示されるように、テンプレートT1を画像IM上でX軸方向或いはY軸方向へ移動させながら、画像IMを構成する画素の中から、テンプレートT1の着色された画素に重なる40個の画素(対応画素)からなる画素群を順次選択する。そして、選択した画素群に関する情報をエッジ角度検出部32へ順次出力する。   As shown in FIG. 6 as an example, the selection unit 31 moves the template T1 in the X-axis direction or the Y-axis direction on the image IM, and the template T1 is colored from the pixels constituting the image IM. A pixel group consisting of 40 pixels (corresponding pixels) overlapping the pixels is sequentially selected. Then, information regarding the selected pixel group is sequentially output to the edge angle detection unit 32.

次に、選択部31は、テンプレートT2を画像IM上でX軸方向或いはY軸方向へ移動させながら、画像IMを構成する画素の中から、テンプレートT2の着色された画素に重なる40個の対応画素からなる画素群を順次選択する。そして、選択した画素群に関する情報をエッジ角度検出部32へ順次出力する。   Next, the selection unit 31 moves the template T2 on the image IM in the X-axis direction or the Y-axis direction, and selects 40 correspondences that overlap the colored pixels of the template T2 from the pixels that form the image IM. A pixel group consisting of pixels is sequentially selected. Then, information regarding the selected pixel group is sequentially output to the edge angle detection unit 32.

エッジ角度検出部32は、選択部31から出力された画素群を構成する対応画素それぞれにおける、画像IMのエッジの向きを検出する。   The edge angle detection unit 32 detects the direction of the edge of the image IM in each of the corresponding pixels that form the pixel group output from the selection unit 31.

具体的には、エッジ角度検出部32は、以下の式(1)で示されるオペレータを用いて、選択部31から出力された画素群を構成する40の対応画素それぞれにおける、画像IMのX軸方向の輝度の勾配の大きさAX〜AX40を検出する。 Specifically, the edge angle detection unit 32 uses the operator represented by the following expression (1), and the X axis of the image IM in each of the 40 corresponding pixels constituting the pixel group output from the selection unit 31. Magnitude gradient magnitudes AX 1 to AX 40 in the direction are detected.

Figure 2011054056
Figure 2011054056

次に、エッジ角度検出部32は、以下の式(2)で示されるオペレータを用いて、選択部31から出力された画素群を構成する40の対応画素それぞれにおける、画像IMのY軸方向の輝度の勾配の大きさAY〜AY40を検出する。 Next, the edge angle detection unit 32 uses the operator expressed by the following expression (2), and the Y-axis direction of the image IM in each of the 40 corresponding pixels that form the pixel group output from the selection unit 31. The brightness gradient magnitudes AY 1 to AY 40 are detected.

Figure 2011054056
Figure 2011054056

次に、エッジ角度検出部32は、画素群を構成する40の対応画素それぞれにおけるエッジの向きを、以下の式(3)で示される角度θ(N=1,2,…,40)として検出する。そして、エッジ角度検出部32は、検出した角度θに関する情報を、演算部33へ出力する。 Next, the edge angle detection unit 32 sets the direction of the edge in each of the 40 corresponding pixels constituting the pixel group as an angle θ N (N = 1, 2,..., 40) represented by the following expression (3). To detect. The edge angle detecting unit 32, the information about the detected angle theta N, and outputs it to the arithmetic unit 33.

θ=tan−1(AY/AX)…(3) θ N = tan −1 (AY N / AX N ) (3)

演算部33は、テンプレートT1の画素a〜a40についての対応画素のテンプレート座標系におけるy座標と、対応画素におけるエッジの向きとしての角度θとで規定される点を、y−θ座標系にプロットする。 The computing unit 33 determines the point defined by the y coordinate in the template coordinate system of the corresponding pixel for the pixels a 1 to a 40 of the template T1 and the angle θ N as the edge direction of the corresponding pixel as the y-θ coordinate. Plot into the system.

一例として、図7には、基準曲線S1とともにy−θ座標系にプロットされた点が示されている。また、図8には、テンプレートT1を構成する画素a(m,n)のうちの曲線L1と重なる画素a〜a40を始点とする曲線L1の法線ベクトルNが示されている。図7における基準曲線S1は、テンプレートT1の画素a〜a40のテンプレート座標系におけるy座標と、各法線ベクトルNとx軸とのなす角度とによって規定されるy−θ座標系上の点を通る曲線である。演算部33は、この基準曲線S1に対するy−θ座標系にプロットされた点との位置関係に基づいて、選択部31によって画像IMから選択された画素群が、例えば図2に示される運転者100の顔Fの輪郭OPである尤度を算出する。 As an example, FIG. 7 shows points plotted in the y-θ coordinate system together with the reference curve S1. FIG. 8 shows a normal vector N N of the curve L1 starting from the pixels a 1 to a 40 that overlap the curve L1 among the pixels a (m, n) constituting the template T1. The reference curve S1 in FIG. 7 is on the y-θ coordinate system defined by the y coordinate in the template coordinate system of the pixels a 1 to a 40 of the template T1 and the angle formed between each normal vector N N and the x axis. It is a curve that passes through the points. Based on the positional relationship between the calculation unit 33 and the points plotted in the y-θ coordinate system with respect to the reference curve S1, the pixel group selected from the image IM by the selection unit 31 is, for example, the driver shown in FIG. The likelihood that is the contour OP of 100 faces F is calculated.

上述したようにy−θ座標系にプロットされる点は、例えば図9に示されるように、テンプレートT1の画素a〜a40によって規定される輪郭曲線L1が、顔Fの輪郭OPにほぼ一致する位置Pにあるときには、図7に白抜きの四角で示されるように、ほぼすべての点が基準曲線S1に沿って分布する。 As described above, the points plotted in the y-θ coordinate system are such that the contour curve L1 defined by the pixels a 1 to a 40 of the template T1 is almost the contour OP of the face F as shown in FIG. when in matching position P 2 to, as indicated by the white squares in FIG. 7, almost all the points are distributed along a reference curve S1.

一方、y−θ座標系にプロットされる点は、例えば図9に示されるように、輪郭曲線L1が、顔Fの輪郭OPから少し顔Fの内側の位置Pにあるときには、図10に着色された四角で示されるように、大部分の点が基準曲線S1に沿って分布するが、一部の点が基準曲線S1から離間して分布する。基準曲線S1から上方に離間した領域C1に現れた点は、画像IMの眉毛付近の画素に対応する点である。また、基準曲線S1から下方に離間した領域C2に現れた点は、画像IMの目尻付近に対応する点である。 Meanwhile, the point to be plotted on y-theta coordinate system, for example as shown in FIG. 9, the contour curve L1 is, when in the position P 1 of the inner bit face F from the outline OP of the face F is in FIG. 10 As indicated by the colored squares, most of the points are distributed along the reference curve S1, but some points are distributed away from the reference curve S1. A point appearing in a region C1 spaced upward from the reference curve S1 is a point corresponding to a pixel near the eyebrows of the image IM. A point appearing in a region C2 spaced downward from the reference curve S1 is a point corresponding to the vicinity of the corner of the eye of the image IM.

また、輪郭曲線L1が、顔Fの輪郭OPから著しく顔Fから離れた位置Pにあるときには、図10に白抜きの丸で示されるように、ほぼ全部の点が基準曲線S1とは位置的に無関係に分布する。 Further, contour curve L1 is, when in the position P 3 away from the remarkable face F from the outline OP of the face F, as indicated by white circles in FIG. 10, the position and the reference curve S1 is a point of substantially all Distributed independently.

演算部33は、例えば図7及び図10に示されるように、基準曲線S1を含む領域A1を統計などに基づいて設定し、選択部31によって画像IMから選択された画素群ごとにプロットした40の点の中から、領域A1に含まれる点を検出する。そして、検出した点の数を、すべての点の数(40)で除して、その結果を尤度として順次算出し出力する。   For example, as illustrated in FIGS. 7 and 10, the calculation unit 33 sets the area A1 including the reference curve S1 based on statistics and the like, and plots each pixel group selected from the image IM by the selection unit 31. From these points, the points included in the area A1 are detected. Then, the number of detected points is divided by the number of all points (40), and the result is sequentially calculated and output as likelihood.

次に、演算部33は、テンプレートT2の画素a〜a40についての対応画素のテンプレート座標系におけるy座標と、対応画素におけるエッジの向きとしての角度θとで規定される点を、y−θ座標系にプロットする。 Next, the calculation unit 33 determines a point defined by the y coordinate in the template coordinate system of the corresponding pixel for the pixels a 1 to a 40 of the template T2 and the angle θ N as the edge direction of the corresponding pixel, as y Plot in the -θ coordinate system.

一例として、図11には、基準曲線S2とともにy−θ座標系にプロットされた点が示されている。また、図12には、テンプレートT2を構成する画素a(m,n)のうちの曲線L2と重なる画素a〜a40を始点とする曲線L2の法線ベクトルNが示されている。図11における基準曲線S2は、テンプレートT2の画素a〜a40のテンプレート座標系におけるy座標と、各法線ベクトルNとx軸とのなす角度とによって規定されるy−θ座標系上の点を通る曲線である。演算部33は、この基準曲線S2に対するy−θ座標系にプロットされた点との位置関係に基づいて、選択部31によって画像IMから選択された画素群が、図2に示される運転者100の顔Fの輪郭OPである尤度を算出する。具体的には、演算部33は、例えば図11に示されるように、基準曲線S2を含む領域A2を統計などに基づいて設定し、選択部31によって画像IMから選択された画素群ごとにプロットした40の点の中から、領域A2に含まれる点を検出する。そして、検出した点の数を、すべての点の数(40)で除して、その結果を尤度として順次算出し出力する。 As an example, FIG. 11 shows points plotted in the y-θ coordinate system together with the reference curve S2. FIG. 12 shows a normal vector N N of the curve L2 starting from the pixels a 1 to a 40 that overlap the curve L2 among the pixels a (m, n) constituting the template T2. The reference curve S2 in FIG. 11 is on the y-θ coordinate system defined by the y coordinate in the template coordinate system of the pixels a 1 to a 40 of the template T2 and the angle formed between each normal vector N N and the x axis. It is a curve that passes through the points. Based on the positional relationship between the calculation unit 33 and the points plotted in the y-θ coordinate system with respect to the reference curve S2, the pixel group selected from the image IM by the selection unit 31 is the driver 100 shown in FIG. The likelihood that is the contour OP of the face F is calculated. Specifically, for example, as illustrated in FIG. 11, the calculation unit 33 sets an area A2 including the reference curve S2 based on statistics, and plots each pixel group selected from the image IM by the selection unit 31. The points included in the area A2 are detected from the 40 points. Then, the number of detected points is divided by the number of all points (40), and the result is sequentially calculated and output as likelihood.

顔位置検出部34は、テンプレートT1によって選択された画素群の中から、最も値が大きい尤度が算出されたときの画素群を特定する。次に、テンプレートT2によって選択された画素群の中から、最も値が大きい尤度が算出されたときの画素群を特定する。そして、特定した1組の画素群によって運転者100の顔Fの輪郭OPが構成されているものとして、運転者100の顔Fの位置情報を検出し出力する。   The face position detection unit 34 specifies a pixel group when the likelihood having the largest value is calculated from the pixel group selected by the template T1. Next, the pixel group when the likelihood having the largest value is calculated from the pixel group selected by the template T2 is specified. Then, the position information of the face F of the driver 100 is detected and output on the assumption that the contour OP of the face F of the driver 100 is constituted by the specified set of pixels.

以上説明したように、本第1の実施形態では、運転者100の顔Fを撮像して得られる画像IMを構成する画素の中から、顔Fの輪郭OPに沿うように予め規定された輪郭曲線L1,L2に一致するように配置された画素からなる画素群が順次選択される。次に、選択された画素群が、運転者100の顔Fの輪郭OPを構成する尤度が算出される。そして、この尤度に基づいて決定された画素が顔Fの輪郭OPを構成するものとして、顔Fの画像IMにおける位置が検出される。   As described above, in the first embodiment, the contour defined in advance along the contour OP of the face F from the pixels constituting the image IM obtained by imaging the face F of the driver 100. A pixel group composed of pixels arranged so as to coincide with the curves L1 and L2 is sequentially selected. Next, the likelihood that the selected pixel group constitutes the contour OP of the face F of the driver 100 is calculated. And the position in the image IM of the face F is detected as the pixel determined based on this likelihood comprises the outline OP of the face F. FIG.

これによれば、顔Fの輪郭を構成しない直線状のエッジが、顔Fの輪郭として抽出されることがなくなるので、顔Fの右端及び左端の輪郭OPを正確に検出することができる。具体的には、顔Fに影が形成されることにより、顔Fの画像に直線状のエッジが現れたとしても、画像IMを構成する画素が、予め統計等により決定された滑らかにカーブする輪郭曲線L1,L2に基づいて選択され、選択された画素が顔Fの輪郭OPを構成するか否かが判断される。したがって、顔Fに現れる影等の影響を受けることなく、運転者100の顔Fを正確に検出することができる。   According to this, since straight edges that do not constitute the contour of the face F are not extracted as the contour of the face F, the right and left contours OP of the face F can be accurately detected. Specifically, when a shadow is formed on the face F, even if a straight edge appears in the image of the face F, the pixels constituting the image IM curve smoothly as determined in advance by statistics or the like. It is selected based on the contour curves L1 and L2, and it is determined whether or not the selected pixel constitutes the contour OP of the face F. Therefore, it is possible to accurately detect the face F of the driver 100 without being affected by a shadow or the like appearing on the face F.

《第2の実施形態》
次に、本発明の第2の実施形態を、図13及び図14を参照しつつ説明する。なお、第1の実施形態と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。
<< Second Embodiment >>
Next, a second embodiment of the present invention will be described with reference to FIGS. In addition, about the structure same or equivalent to 1st Embodiment, while using an equivalent code | symbol, the description is abbreviate | omitted or simplified.

本実施形態にかかる顔位置検出装置10は、画像処理装置30が、一般的なコンピュータ、又はマイクロコンピュータなどの装置と同様の構成によって実現されている点で、第1の実施形態にかかる顔位置検出装置10と相違している。   The face position detection device 10 according to the present embodiment is the face position according to the first embodiment in that the image processing device 30 is realized by the same configuration as a general computer or a device such as a microcomputer. This is different from the detection device 10.

図13は、顔位置検出装置10の物理的な構成を示すブロック図である。図13に示されるように、顔位置検出装置10は、撮像装置20と、コンピュータからなる画像処理装置30とから構成されている。   FIG. 13 is a block diagram illustrating a physical configuration of the face position detection apparatus 10. As illustrated in FIG. 13, the face position detection device 10 includes an imaging device 20 and an image processing device 30 including a computer.

画像処理装置30は、CPU(Central Processing Unit)30a、主記憶部30b、補助記憶部30c、表示部30d、入力部30e、インターフェイス部30f、及び上記各部を相互に接続するシステムバス30gを含んで構成されている。   The image processing apparatus 30 includes a central processing unit (CPU) 30a, a main storage unit 30b, an auxiliary storage unit 30c, a display unit 30d, an input unit 30e, an interface unit 30f, and a system bus 30g that interconnects the above units. It is configured.

CPU30aは、補助記憶部30cに記憶されているプログラムに従って、撮像装置20によって取得された画像に後述する処理を実行する。   CPU30a performs the process mentioned later to the image acquired by the imaging device 20 according to the program memorize | stored in the auxiliary storage part 30c.

主記憶部30bは、RAM(Random Access Memory)等を含んで構成され、CPU30aの作業領域として用いられる。   The main storage unit 30b includes a RAM (Random Access Memory) and the like, and is used as a work area for the CPU 30a.

補助記憶部30cは、ROM(Read Only Memory)、磁気ディスク、半導体メモリ等の不揮発性メモリを含んで構成されている。この補助記憶部30cは、CPU30aが実行するプログラム、及び各種パラメータなどを記憶している。また、撮像装置20から出力される画像に関する情報、及びCPU30aによる処理結果などを含む情報を順次記憶する。   The auxiliary storage unit 30c includes a nonvolatile memory such as a ROM (Read Only Memory), a magnetic disk, and a semiconductor memory. The auxiliary storage unit 30c stores programs executed by the CPU 30a, various parameters, and the like. In addition, information about an image output from the imaging device 20 and information including a processing result by the CPU 30a are sequentially stored.

表示部30dは、CRT(Cathode Ray Tube)またはLCD(Liquid Crystal Display)などを含んで構成され、CPU30aの処理結果などを表示する。   The display unit 30d includes a CRT (Cathode Ray Tube), an LCD (Liquid Crystal Display), or the like, and displays a processing result of the CPU 30a.

入力部30eは、キーボードやマウス等のポインティングデバイスを含んで構成されている。オペレータの指示は、この入力部30eを介して入力され、システムバス30gを経由してCPU30aに通知される。   The input unit 30e includes a pointing device such as a keyboard and a mouse. The operator's instruction is input via the input unit 30e and notified to the CPU 30a via the system bus 30g.

インターフェイス部30fは、シリアルインターフェイスまたはLAN(Local Area Network)インターフェイス等を含んで構成されている。撮像装置20は、インターフェイス部30fを介してシステムバス30gに接続される。   The interface unit 30f includes a serial interface or a LAN (Local Area Network) interface. The imaging device 20 is connected to the system bus 30g via the interface unit 30f.

図14のフローチャートは、CPU30aによって実行されるプログラムの一連の処理アルゴリズムに対応している。以下、図14を参照しつつ、画像処理装置30が実行する処理について説明する。なお、この処理は、顔位置検出装置10が起動され、撮像装置20によって撮像された画像IMに関する情報が出力された後に実行される。   The flowchart in FIG. 14 corresponds to a series of processing algorithms of a program executed by the CPU 30a. Hereinafter, the process executed by the image processing apparatus 30 will be described with reference to FIG. This process is executed after the face position detection device 10 is activated and information related to the image IM captured by the imaging device 20 is output.

最初のステップS101では、CPU30aは、一例として図6に示されるように、テンプレートT1を画像IM上でX軸方向或いはY軸方向へ移動させながら、画像IMを構成する画素の中から、テンプレートT1の着色された画素に重なる40個の対応画素からなる画素群を順次選択する。   In the first step S101, as shown in FIG. 6 as an example, the CPU 30a moves the template T1 on the image IM in the X-axis direction or the Y-axis direction, and selects the template T1 from the pixels constituting the image IM. A pixel group composed of 40 corresponding pixels overlapping with the colored pixels is sequentially selected.

次のステップS102では、CPU30aは、テンプレートT2を画像IM上でX軸方向或いはY軸方向へ移動させながら、画像IMを構成する画素の中から、テンプレートT2の着色された画素に重なる40個の対応画素からなる画素群を順次選択する。   In the next step S102, the CPU 30a moves the template T2 on the image IM in the X-axis direction or the Y-axis direction, and from among the pixels constituting the image IM, the 40 pixels that overlap the colored pixels of the template T2. A pixel group consisting of corresponding pixels is sequentially selected.

次のステップS103では、CPU30aは、ステップS101及びステップS102で選択した画素群を構成する画素それぞれにおける、画像IMのエッジの向きを検出する。   In the next step S103, the CPU 30a detects the direction of the edge of the image IM in each of the pixels constituting the pixel group selected in steps S101 and S102.

具体的には、CPU30aは、上記式(1)で示されるオペレータを用いて、画素群を構成する40の画素それぞれにおける、画像IMのX軸方向の輝度の勾配の大きさAX〜AX40を検出する。次に、上記式(2)で示されるオペレータを用いて、画素群を構成する40の画素それぞれにおける、画像IMのY軸方向の輝度の勾配の大きさAY〜AY40を検出する。そして、CPU30aは、画素群を構成する40の画素それぞれにおけるエッジの向きを、上記式(3)で示される角度θ(N=1,2,…,40)として検出する。 Specifically, the CPU 30a uses the operator represented by the above formula (1), and the luminance gradient magnitudes AX 1 to AX 40 in the X-axis direction of the image IM in each of the 40 pixels constituting the pixel group. Is detected. Next, using the operator represented by the above equation (2), the magnitudes of the luminance gradients AY 1 to AY 40 in the Y-axis direction of the image IM in each of the 40 pixels constituting the pixel group are detected. Then, the CPU 30a detects the edge direction in each of the 40 pixels constituting the pixel group as an angle θ N (N = 1, 2,..., 40) expressed by the above equation (3).

次のステップS104では、CPU30aは、テンプレートT1の画素a〜a40についての対応画素のテンプレート座標系におけるy座標と、対応画素におけるエッジの向きとしての角度θとで規定される点を、y−θ座標系にプロットする。これにより、y−θ座標系には、例えば図7に示されるように、白抜きの四角で示される点がプロットされる。次に、CPU30aは、テンプレートT2の画素a〜a40についての対応画素のテンプレート座標系におけるy座標と、対応画素におけるエッジの向きとしての角度θとで規定される点を、y−θ座標系にプロットする。 In the next step S104, the CPU 30a determines a point defined by the y coordinate in the template coordinate system of the corresponding pixel for the pixels a 1 to a 40 of the template T1 and the angle θ N as the edge direction in the corresponding pixel, Plot in the y-θ coordinate system. Thereby, in the y-θ coordinate system, for example, as shown in FIG. 7, points indicated by white squares are plotted. Next, the CPU 30a determines a point defined by the y coordinate in the template coordinate system of the corresponding pixel for the pixels a 1 to a 40 of the template T2 and the angle θ N as the edge direction of the corresponding pixel as y−θ. Plot in the coordinate system.

次のステップS105では、CPU30aは、y−θ座標系に示された基準曲線S1,S2と、y−θ座標系にプロットされた点との位置関係に基づいて、ステップS101及びステップS102で選択された画素群が、例えば図2に示される運転者100の顔Fの輪郭OPである尤度を算出する。   In the next step S105, the CPU 30a selects in steps S101 and S102 based on the positional relationship between the reference curves S1 and S2 shown in the y-θ coordinate system and the points plotted in the y-θ coordinate system. The likelihood that the obtained pixel group is, for example, the contour OP of the face F of the driver 100 shown in FIG. 2 is calculated.

上述したようにy−θ座標系にプロットされる点は、例えば図9に示されるように、テンプレートT1の画素a〜a40によって規定される輪郭線L1が、顔Fの輪郭OPにほぼ一致する位置Pにあるときには、図7に白抜きの四角で示されるように、ほぼすべての点が基準曲線S1に沿って分布する。 As described above, the points plotted in the y-θ coordinate system are such that the contour line L1 defined by the pixels a 1 to a 40 of the template T1 is almost the contour OP of the face F as shown in FIG. when in matching position P 2 to, as indicated by the white squares in FIG. 7, almost all the points are distributed along a reference curve S1.

一方、y−θ座標系にプロットされる点は、例えば図9に示されるように、輪郭線L1が、顔Fの輪郭OPから少し顔Fの内側の位置Pにあるときには、図10に着色された四角で示されるように、大部分の点が基準曲線S1に沿って分布するが、一部の点が基準曲線S1から離間して分布する。基準曲線S1から上方に離間した領域C1に現れた点は、画像IMの眉毛付近の画素に対応する点である。また、基準曲線S1から下方に離間した領域C2に現れた点は、画像IMの目尻付近に対応する点である。 Meanwhile, the point to be plotted on y-theta coordinate system, for example as shown in FIG. 9, the contour line L1, when in the position P 1 of the inner bit face F from the outline OP of the face F is in FIG. 10 As indicated by the colored squares, most of the points are distributed along the reference curve S1, but some points are distributed away from the reference curve S1. A point appearing in a region C1 spaced upward from the reference curve S1 is a point corresponding to a pixel near the eyebrows of the image IM. A point appearing in a region C2 spaced downward from the reference curve S1 is a point corresponding to the vicinity of the corner of the eye of the image IM.

また、輪郭線L1が、顔Fの輪郭OPから著しく顔Fから離れた位置Pにあるときには、図10に白抜きの丸で示されるように、ほぼ全部の点が基準曲線S1とは位置的に無関係に分布する。 Also, the contour line L1, when in the position P 3 away from the remarkable face F from the outline OP of the face F, as indicated by white circles in FIG. 10, the position and the reference curve S1 is a point of substantially all Distributed independently.

CPU30aは、図7及び図10に示されるように、基準曲線S1を含む領域A1を設定するとともに、図11に示されるように、基準曲線S2を含む領域A2を設定する。そして、画像IMから選択された画素群ごとにプロットした40の点の中から、領域A1或いは領域A2に含まれる点を検出する。そして、検出した点の数を、すべての点の数(40)で除して、その結果を尤度として順次算出し出力する。   The CPU 30a sets a region A1 including the reference curve S1 as shown in FIGS. 7 and 10, and sets a region A2 including the reference curve S2 as shown in FIG. And the point contained in area | region A1 or area | region A2 is detected from 40 points plotted for every pixel group selected from the image IM. Then, the number of detected points is divided by the number of all points (40), and the result is sequentially calculated and output as likelihood.

次のステップS106では、CPU30aは、テンプレートT1によって選択された画素群の中から、最も値が大きい尤度が算出されたときの画素群を特定する。次に、CPU30aは、テンプレートT2によって選択された画素群の中から、最も値が大きい尤度が算出されたときの画素群を特定する。   In the next step S106, the CPU 30a specifies the pixel group when the likelihood having the largest value is calculated from the pixel group selected by the template T1. Next, the CPU 30a specifies the pixel group when the likelihood with the largest value is calculated from the pixel group selected by the template T2.

次のステップS107では、CPU30aは、ステップS106で特定した1組の画素群によって運転者100の顔Fの輪郭OPが構成されているものとして、顔Fの位置情報を検出し出力する。   In the next step S107, the CPU 30a detects and outputs the position information of the face F, assuming that the contour OP of the face F of the driver 100 is constituted by the set of pixels specified in step S106.

以上説明したように、本第2の実施形態では、運転者100の顔Fを撮像して得られる画像IMを構成する画素の中から、顔Fの輪郭OPに沿うように予め規定された輪郭曲線L1,L2に一致するように配置された画素からなる画素群が順次選択される。次に、選択された画素群が、運転者100の顔Fの輪郭OPを構成する尤度が算出される。そして、この尤度に基づいて決定された画素が顔Fの輪郭OPを構成するものとして、顔Fの画像IMにおける位置が検出される。   As described above, in the second embodiment, the contour defined in advance along the contour OP of the face F from the pixels constituting the image IM obtained by imaging the face F of the driver 100. A pixel group composed of pixels arranged so as to coincide with the curves L1 and L2 is sequentially selected. Next, the likelihood that the selected pixel group constitutes the contour OP of the face F of the driver 100 is calculated. And the position in the image IM of the face F is detected as the pixel determined based on this likelihood comprises the outline OP of the face F. FIG.

これによれば、顔Fの輪郭を構成しない直線状のエッジが、顔Fの輪郭として抽出されることがなくなるので、顔Fの右端及び左端の輪郭OPを正確に検出することができる。具体的には、顔Fに影が形成されることにより、顔Fの画像に直線状のエッジが現れたとしても、画像IMを構成する画素が、予め統計等により決定された滑らかにカーブする輪郭曲線L1,L2に基づいて選択され、選択された画素が顔Fの輪郭OPを構成するか否かが判断される。したがって、顔Fに現れる影等の影響を受けることなく、運転者100の顔Fを正確に検出することができる。   According to this, since straight edges that do not constitute the contour of the face F are not extracted as the contour of the face F, the right and left contours OP of the face F can be accurately detected. Specifically, when a shadow is formed on the face F, even if a straight edge appears in the image of the face F, the pixels constituting the image IM curve smoothly as determined in advance by statistics or the like. It is selected based on the contour curves L1 and L2, and it is determined whether or not the selected pixel constitutes the contour OP of the face F. Therefore, it is possible to accurately detect the face F of the driver 100 without being affected by a shadow or the like appearing on the face F.

以上、本発明の実施形態について説明したが、本発明は上記実施形態によって限定されるものではない。   As mentioned above, although embodiment of this invention was described, this invention is not limited by the said embodiment.

例えば、上記各実施形態では、40行10列のマトリクス状に配置された400の画素からなるテンプレートを用いたが、これに限らず、画面の解像度、画面のサイズに見合った適当な大きさのテンプレートを用いることとしてもよい。   For example, in each of the above embodiments, a template composed of 400 pixels arranged in a matrix of 40 rows and 10 columns is used. However, the present invention is not limited to this, and an appropriate size corresponding to the screen resolution and the screen size is used. A template may be used.

また、上記各実施形態では、y−θ座標系に設けられた領域A1或いは領域A2に含まれる点の数を、点の総数で除することで尤度を算出した。しかしながら、本発明はこれに限定されるものではなく、例えば、領域A1或いは領域A2に含まれる点の数と、領域A1或いは領域A2に含まれない点の数との比に基づいて尤度を算出してもよい。また、領域A1或いは領域A2に含まれる点の数から、領域A1或いは領域A2に含まれない点の数を減じた値を尤度として算出してもよい。また、上述の尤度は、基準曲線S1或いは基準曲線S2と各点との距離を、誤差として算出し、各点の誤差の総和に基づいて決定することとしてもよい。   In each of the above embodiments, the likelihood is calculated by dividing the number of points included in the region A1 or the region A2 provided in the y-θ coordinate system by the total number of points. However, the present invention is not limited to this. For example, the likelihood is calculated based on the ratio between the number of points included in the region A1 or the region A2 and the number of points not included in the region A1 or the region A2. It may be calculated. Further, a value obtained by subtracting the number of points not included in the region A1 or the region A2 from the number of points included in the region A1 or the region A2 may be calculated as the likelihood. Further, the likelihood described above may be determined based on the sum of errors at each point by calculating the distance between the reference curve S1 or the reference curve S2 and each point as an error.

また、上記各実施形態では、尤度に基づいて顔Fの右側の輪郭OPを構成する画素群と、左側の輪郭OPを構成する画素群とを特定したが、顔Fの右側及び左側の輪郭OPを構成するそれぞれの画素群を、輪郭OPの対象性を考慮して特定してもよい。例えば、顔Fの右側の輪郭OPを構成する画素群と、左側の輪郭OPを構成する画素群とを、エッジの角度の対称性、すなわち、y−θ座標系にプロットされた点の分布のy軸に関する対称性などを考慮して特定してもよい。これによれば、例えば上下方向(Y軸方向)に著しくずれた一組の画素群が、左右の輪郭OPを構成する画素群として特定されることがなくなるため、顔位置の検出精度を向上させることが可能となる。   In the above embodiments, the pixel group constituting the right outline OP of the face F and the pixel group constituting the left outline OP are specified based on the likelihood, but the right and left outlines of the face F are specified. Each pixel group constituting the OP may be specified in consideration of the objectivity of the contour OP. For example, the symmetry of the angle of the edge, that is, the distribution of the points plotted in the y-θ coordinate system, between the pixel group constituting the right outline OP of the face F and the pixel group constituting the left outline OP. You may specify in consideration of the symmetry about ay axis. According to this, for example, a set of pixel groups that are significantly deviated in the vertical direction (Y-axis direction) is not specified as a pixel group that constitutes the left and right outlines OP, so that the detection accuracy of the face position is improved. It becomes possible.

また、顔Fの右側の輪郭を構成する第1の画素群と、左側の輪郭OPを構成する第2の画素群とを、各画素群を構成する画素間のy軸方向の相対位置関係に基づいて決定してもよい。具体的には、第1の画素群を構成する画素と、この画素に対応する第2の画素群を構成する画素との、y軸方向の距離が所定の閾値以下となるように、第1の画素群と第2の画素群とをそれぞれ決定してもよい。この場合にも、例えば上下方向(Y軸方向)に著しくずれた一組の画素群が、左右の輪郭OPを構成する画素群として特定されることがなくなるため、顔位置の検出精度を向上させることが可能となる。   In addition, the first pixel group that forms the right contour of the face F and the second pixel group that forms the left contour OP are in a relative positional relationship in the y-axis direction between the pixels that form each pixel group. You may decide based on. Specifically, the first axis is set such that the distance in the y-axis direction between the pixels constituting the first pixel group and the pixels constituting the second pixel group corresponding to the pixel is equal to or less than a predetermined threshold. The pixel group and the second pixel group may be respectively determined. Also in this case, for example, a set of pixel groups that are significantly deviated in the vertical direction (Y-axis direction) is not specified as a pixel group that constitutes the left and right outlines OP, so that the detection accuracy of the face position is improved. It becomes possible.

また、上記各実施形態では、一組の輪郭曲線L1,L2に基づくテンプレートT1,T2を用いて画素群を選択したが、輪郭曲線L1,L2以外の複数の輪郭曲線を予め設定しておき、例えば算出された尤度が所定の閾値以下の場合には、他の輪郭曲線に基づくテンプレートを用いて画素群を選択してもよい。これによれば、輪郭の個人差に基づく検出誤差が小さくなるため、顔位置の検出精度を向上させることが可能となる。   In each of the above embodiments, the pixel group is selected using the templates T1 and T2 based on the set of contour curves L1 and L2. However, a plurality of contour curves other than the contour curves L1 and L2 are set in advance. For example, when the calculated likelihood is equal to or less than a predetermined threshold, a pixel group may be selected using a template based on another contour curve. According to this, since the detection error based on the individual difference in the contour is reduced, it is possible to improve the detection accuracy of the face position.

また、上記各実施形態では、図6を参照するとわかるように、テンプレートT1,T2を画像IMのすべての領域に重ね併せて画素群を選択した。しかしながら、本発明はこれに限定されるものではなく、例えば、一度運転者の顔の位置を検出した後は、過去の顔位置の検出結果などに基づいて、画像IMにテンプレートT1,T2をマッチングさせる領域を規定してもよい。これにより、顔位置を検出する際に取り扱うデータ量が少なくなるため、顔位置の検出を迅速に行うことが可能となる。   Further, in each of the above embodiments, as can be seen with reference to FIG. 6, the pixel groups are selected by superimposing the templates T <b> 1 and T <b> 2 on all the regions of the image IM. However, the present invention is not limited to this. For example, once the position of the driver's face is detected, the templates IM and T2 are matched with the image IM based on the detection result of the past face position. An area to be made may be defined. Thereby, since the amount of data handled when detecting the face position is reduced, the face position can be detected quickly.

また、上記各実施形態に係る画像処理装置30の機能は、専用のハードウェアによっても、通常のコンピュータシステムによっても実現することができる。   The functions of the image processing apparatus 30 according to each of the above embodiments can be realized by dedicated hardware or by a normal computer system.

また、第2の実施形態において画像処理装置30の補助記憶部30cに記憶されているプログラムは、フレキシブルディスク、CD−ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto-Optical disk)等のコンピュータで読み取り可能な記録媒体に格納して配布し、そのプログラムをコンピュータにインストールすることにより、上述の処理を実行する装置を構成することとしてもよい。   In the second embodiment, programs stored in the auxiliary storage unit 30c of the image processing apparatus 30 are a flexible disk, a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), an MO (Magneto). A device that executes the above-described processing may be configured by storing and distributing in a computer-readable recording medium such as -Optical disk) and installing the program in the computer.

また、プログラムをインターネット等の通信ネットワーク上の所定のサーバ装置が有するディスク装置等に格納しておき、例えば、搬送波に重畳させて、コンピュータにダウンロード等するようにしても良い。   Further, the program may be stored in a disk device or the like included in a predetermined server device on a communication network such as the Internet, and may be downloaded onto a computer by being superimposed on a carrier wave, for example.

また、プログラムは、通信ネットワークを介して転送しながら起動実行することとしてもよい。   Further, the program may be activated and executed while being transferred via a communication network.

また、プログラムは、全部又は一部をサーバ装置上で実行させ、その処理に関する情報を通信ネットワークを介して送受信しながら、上述の画像処理を実行することとしてもよい。   The program may be executed entirely or partially on the server device, and the above-described image processing may be executed while transmitting / receiving information regarding the processing via the communication network.

なお、上述の機能を、OS(Operating System)が分担して実現する場合又はOSとアプリケーションとの協働により実現する場合等には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロード等しても良い。   Note that when the above functions are realized by sharing an OS (Operating System) or when the functions are realized by cooperation between the OS and an application, only the part other than the OS may be stored in a medium and distributed. It may also be downloaded to a computer.

なお、本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。   It should be noted that the present invention can be variously modified and modified without departing from the broad spirit and scope of the present invention. Further, the above-described embodiment is for explaining the present invention, and does not limit the scope of the present invention.

本発明の顔位置検出装置、顔位置検出方法及びプログラムは、運転者の顔の位置を検出するのに適している。   The face position detection device, the face position detection method, and the program according to the present invention are suitable for detecting the position of the driver's face.

10 顔位置検出装置
20 撮像装置
30 画像処理装置
30a CPU
30b 主記憶部
30c 補助記憶部
30d 表示部
30e 入力部
30f インターフェイス部
30g システムバス
31 選択部
32 エッジ角度検出部
33 演算部
34 顔位置検出部
100 運転者
F 顔
OP 輪郭
IM 画像
L1,L2 輪郭曲線
S1,S2 基準曲線
T1,T2 テンプレート
DESCRIPTION OF SYMBOLS 10 Face position detection apparatus 20 Imaging apparatus 30 Image processing apparatus 30a CPU
30b Main storage unit 30c Auxiliary storage unit 30d Display unit 30e Input unit 30f Interface unit 30g System bus 31 Selection unit 32 Edge angle detection unit 33 Calculation unit 34 Face position detection unit 100 Driver F Face OP Contour IM image L1, L2 Contour curve S1, S2 reference curve T1, T2 template

Claims (11)

人の顔を撮像する撮像手段と、
前記撮像手段によって撮像された画像を構成する画素のうち、前記顔の輪郭に沿う輪郭曲線状に配置される前記画素からなる画素群を順次選択する選択手段と、
前記選択手段に選択された前記画素群ごとに、前記画素における前記画像に含まれるエッジの向きを検出するエッジ方向検出手段と、
前記画素群ごとに、前記画素相互間の位置関係と、前記画素それぞれにおける前記エッジの向きに基づいて、前記画素群を構成する前記画素が前記顔の輪郭を構成する尤度を算出する演算手段と、
を備える顔位置検出装置。
Imaging means for imaging a human face;
A selection unit that sequentially selects a pixel group including the pixels arranged in a contour curve along the outline of the face among the pixels constituting the image captured by the imaging unit;
Edge direction detection means for detecting the direction of the edge included in the image at the pixel for each pixel group selected by the selection means;
Calculation means for calculating a likelihood that the pixels constituting the pixel group constitute the contour of the face based on the positional relationship between the pixels and the direction of the edge of each pixel for each pixel group When,
A face position detecting device.
前記演算手段は、前記画素それぞれの座標と、前記エッジの向きとによって規定される点の分布に基づいて前記尤度を算出する請求項1に記載の顔位置検出装置。   The face position detection apparatus according to claim 1, wherein the calculation unit calculates the likelihood based on a distribution of points defined by coordinates of the pixels and an orientation of the edge. 前記演算手段は、前記画素群を構成する前記画素それぞれの前記座標と、前記座標における前記輪郭曲線の法線の向きとを示す基準曲線に対する前記点の分布に基づいて前記尤度を算出する請求項2に記載の顔位置検出装置。   The calculation means calculates the likelihood based on a distribution of the points with respect to a reference curve indicating the coordinates of each of the pixels constituting the pixel group and a direction of a normal line of the contour curve at the coordinates. Item 3. The face position detection device according to Item 2. 前記演算手段は、統計に基づいて設定された範囲内にある前記点の数に基づいて前記尤度を算出する請求項2に記載の顔位置検出装置。   The face position detection apparatus according to claim 2, wherein the calculation unit calculates the likelihood based on the number of the points within a range set based on statistics. 前記尤度に基づいて前記画素群を特定し、特定した前記画素群の前記画素を前記顔の輪郭の少なくとも一部を構成する前記画素であるとして、前記画像に含まれる前記顔の位置を検出する顔位置検出手段を更に備える請求項1乃至4のいずれか一項に記載の顔位置検出装置。   The pixel group is identified based on the likelihood, and the position of the face included in the image is detected assuming that the pixel of the identified pixel group is the pixel constituting at least part of the contour of the face The face position detection device according to claim 1, further comprising a face position detection unit that performs the operation. 前記画素群は、
前記顔の右側の輪郭に沿う第1の輪郭曲線状に配置される前記画素からなる前記画素群と、
前記顔の左側の輪郭に沿う第2の輪郭曲線状に配置される前記画素からなる前記画素群と、
を含み、
前記顔位置検出手段は、
前記第1の輪郭曲線状に配置される前記画素からなる前記画素群の中から、前記尤度に基づいていずれかの前記画素群を第1画素群として抽出するとともに、
前記第2の輪郭曲線状に配置される前記画素からなる前記画素群の中から、前記尤度に基づいていずれかの前記画素群を第2画素群として抽出し、
前記第1画素群及び前記第2画素群を構成する前記画素を、前記顔の輪郭の少なくとも一部を構成する前記画素であるとして、前記画像に含まれる前記顔の位置を検出する請求項5に記載に顔位置検出装置。
The pixel group is:
The pixel group consisting of the pixels arranged in a first contour curve shape along the right contour of the face;
The pixel group consisting of the pixels arranged in a second contour curve along the left contour of the face;
Including
The face position detecting means includes
Extracting one of the pixel groups as the first pixel group based on the likelihood from the pixel group consisting of the pixels arranged in the first contour curve shape,
From the pixel group consisting of the pixels arranged in the second contour curve shape, any one of the pixel groups is extracted as a second pixel group based on the likelihood,
6. The position of the face included in the image is detected by assuming that the pixels constituting the first pixel group and the second pixel group are the pixels constituting at least a part of the outline of the face. 2. A face position detecting device.
前記顔位置検出手段は、前記尤度が最も高いときの前記画素群を抽出する請求項5又は6に記載の顔位置検出装置。   The face position detection device according to claim 5, wherein the face position detection unit extracts the pixel group when the likelihood is the highest. 前記顔位置検出手段は、前記第1画素群及び前記第2画素群を、前記第1画素群を構成する前記画素におけるエッジの方向と、前記第2画素群を構成する前記画素におけるエッジの方向との対称性に基づいて抽出する請求項6に記載の顔位置検出装置。   The face position detection means includes the first pixel group and the second pixel group, the edge direction in the pixels constituting the first pixel group, and the edge direction in the pixels constituting the second pixel group. The face position detection device according to claim 6, wherein the face position detection device extracts the images based on the symmetry with respect to. 前記顔位置検出手段は、前記第1画素群及び前記第2画素群を、前記第1画素群を構成する前記画素と前記第2画素群を構成する前記画素との、前記顔の上下方向に関する相対位置関係に基づいて抽出する請求項6に記載の顔位置検出装置。   The face position detection unit relates the first pixel group and the second pixel group to the vertical direction of the face between the pixels constituting the first pixel group and the pixels constituting the second pixel group. The face position detection apparatus according to claim 6, wherein extraction is performed based on a relative positional relationship. 人の顔が写る画像を構成する画素のうち、前記顔の輪郭に沿う輪郭曲線状に配置される前記画素からなる画素群を順次選択する工程と、
選択した前記画素群ごとに、前記画素における前記画像に含まれるエッジの向きを検出する工程と、
前記画素群ごとに、前記画素それぞれの座標と、前記エッジの向きとによって規定される点の分布に基づいて、前記画素群を構成する前記画素が前記顔の輪郭を構成する尤度を算出する工程と、
前記尤度に基づいて前記画素群を特定し、特定した前記画素群の前記画素を前記顔の輪郭の少なくとも一部を構成する前記画素であるとして、前記画像に含まれる前記顔の位置を検出する工程と、
を含む顔位置検出方法。
A step of sequentially selecting a pixel group composed of the pixels arranged in a contour curve along the outline of the face, among pixels constituting an image of a human face;
Detecting a direction of an edge included in the image in the pixel for each of the selected pixel groups;
For each pixel group, the likelihood that the pixels constituting the pixel group constitute the contour of the face is calculated based on the distribution of points defined by the coordinates of the pixels and the direction of the edge. Process,
The pixel group is identified based on the likelihood, and the position of the face included in the image is detected assuming that the pixel of the identified pixel group is the pixel constituting at least part of the contour of the face And a process of
A face position detection method including:
コンピュータを、
人の顔が写る画像を構成する画素のうち、前記顔の輪郭に沿う輪郭曲線状に配置される前記画素からなる画素群を順次選択する手段と、
選択した前記画素群ごとに、前記画素における前記画像に含まれるエッジの向きを検出する手段と、
前記画素群ごとに、前記画素それぞれの座標と、前記エッジの向きとによって規定される点の分布に基づいて、前記画素群を構成する前記画素が前記顔の輪郭を構成する尤度を算出する手段と、
前記尤度に基づいて前記画素群を特定し、特定した前記画素群の前記画素を前記顔の輪郭の少なくとも一部を構成する前記画素であるとして、前記画像に含まれる前記顔の位置を検出する手段と、
として機能させるプログラム。
Computer
Means for sequentially selecting a pixel group composed of the pixels arranged in a contour curve along the outline of the face, among pixels constituting an image showing a human face;
Means for detecting an orientation of an edge included in the image in the pixel for each of the selected pixel groups;
For each pixel group, the likelihood that the pixels constituting the pixel group constitute the contour of the face is calculated based on the distribution of points defined by the coordinates of the pixels and the direction of the edge. Means,
The pixel group is identified based on the likelihood, and the position of the face included in the image is detected assuming that the pixel of the identified pixel group is the pixel constituting at least part of the contour of the face Means to
Program to function as.
JP2009204056A 2009-09-03 2009-09-03 Face position detection device, face position detection method, and program Expired - Fee Related JP5397103B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009204056A JP5397103B2 (en) 2009-09-03 2009-09-03 Face position detection device, face position detection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009204056A JP5397103B2 (en) 2009-09-03 2009-09-03 Face position detection device, face position detection method, and program

Publications (2)

Publication Number Publication Date
JP2011054056A true JP2011054056A (en) 2011-03-17
JP5397103B2 JP5397103B2 (en) 2014-01-22

Family

ID=43942968

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009204056A Expired - Fee Related JP5397103B2 (en) 2009-09-03 2009-09-03 Face position detection device, face position detection method, and program

Country Status (1)

Country Link
JP (1) JP5397103B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016162075A (en) * 2015-02-27 2016-09-05 Kddi株式会社 Object track method, device and program
CN114694386A (en) * 2020-12-31 2022-07-01 博泰车联网科技(上海)股份有限公司 Information pushing method and device, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002044489A (en) * 2000-07-19 2002-02-08 Konica Corp System and method for photographing facial picture information and automatic photography device
JP2004170315A (en) * 2002-11-21 2004-06-17 Nissan Motor Co Ltd Range index detector
JP2004185019A (en) * 1999-08-26 2004-07-02 Nano Geometry Kenkyusho:Kk Pattern inspection apparatus, pattern inspection method, and recording medium
JP2008210239A (en) * 2007-02-27 2008-09-11 Nissan Motor Co Ltd Line-of-sight estimation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004185019A (en) * 1999-08-26 2004-07-02 Nano Geometry Kenkyusho:Kk Pattern inspection apparatus, pattern inspection method, and recording medium
JP2002044489A (en) * 2000-07-19 2002-02-08 Konica Corp System and method for photographing facial picture information and automatic photography device
JP2004170315A (en) * 2002-11-21 2004-06-17 Nissan Motor Co Ltd Range index detector
JP2008210239A (en) * 2007-02-27 2008-09-11 Nissan Motor Co Ltd Line-of-sight estimation device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016162075A (en) * 2015-02-27 2016-09-05 Kddi株式会社 Object track method, device and program
CN114694386A (en) * 2020-12-31 2022-07-01 博泰车联网科技(上海)股份有限公司 Information pushing method and device, electronic device and storage medium
CN114694386B (en) * 2020-12-31 2023-07-07 博泰车联网科技(上海)股份有限公司 Information pushing method and device, electronic device and storage medium

Also Published As

Publication number Publication date
JP5397103B2 (en) 2014-01-22

Similar Documents

Publication Publication Date Title
TWI419081B (en) Method and system for providing augmented reality based on marker tracing, and computer program product thereof
US8401247B2 (en) Image processing apparatus, biometric authentication apparatus, image processing method and recording medium
US10296803B2 (en) Image display apparatus, image display method, and computer program product
US9390310B2 (en) Striped pattern image examination support device, striped pattern image examination support method and program
CN104239909B (en) A kind of recognition methods of image and device
US20240071129A1 (en) Matching result display device, matching result display method, program, and recording medium
JP5454737B2 (en) Wrinkle detection device, wrinkle detection method and program
US20140204120A1 (en) Image processing device and image processing method
EP3142045B1 (en) Predicting accuracy of object recognition in a stitched image
JP2011238228A (en) Screen area detection method and system
US9916513B2 (en) Method for processing image and computer-readable non-transitory recording medium storing program
JP2018152081A (en) System and method for determining clutter in an acquired image
US20200334801A1 (en) Learning device, inspection system, learning method, inspection method, and program
US9542602B2 (en) Display control device and method
JP2011089784A (en) Device for estimating direction of object
JP6658188B2 (en) Image processing apparatus, image processing method, and image processing program
JP5772675B2 (en) Gray image edge extraction method, edge extraction device, and gray image edge extraction program
JP2013149228A (en) Position detector and position detection program
JP5397103B2 (en) Face position detection device, face position detection method, and program
JP5365408B2 (en) Mobile object recognition apparatus, mobile object recognition method, and program
JP2017207910A (en) Character recognition device, character recognition program and character recognition method
JP2014016710A (en) Object detection device and program
JP2007188407A (en) Image processing device and image processing program
JP5010627B2 (en) Character recognition device and character recognition method
JP2007219899A (en) Personal identification device, personal identification method, and personal identification program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130723

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130904

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: 20130924

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131007

R151 Written notification of patent or utility model registration

Ref document number: 5397103

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees