JP2007139535A - Face end detection device and method, and program - Google Patents
Face end detection device and method, and program Download PDFInfo
- Publication number
- JP2007139535A JP2007139535A JP2005332404A JP2005332404A JP2007139535A JP 2007139535 A JP2007139535 A JP 2007139535A JP 2005332404 A JP2005332404 A JP 2005332404A JP 2005332404 A JP2005332404 A JP 2005332404A JP 2007139535 A JP2007139535 A JP 2007139535A
- Authority
- JP
- Japan
- Prior art keywords
- face
- contour
- value
- face image
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、顔画像から、より正確な顔の両端を検出することが可能な顔端検出装置、顔端検出方法、及び、プログラムに関する。 The present invention relates to a face edge detection apparatus, a face edge detection method, and a program capable of detecting both ends of a face more accurately from a face image.
顔画像に基づいて顔の両端、もしくは、輪郭を正確に検出することは、顔画像の画像処理において重要な課題である。 Accurate detection of both ends or contours of a face based on the face image is an important issue in the image processing of the face image.
特許文献1には、人の顔を撮影した画像を処理し、人の動きや背景に影響されること無く高精度に顔の位置を検出する手法が開示されている。
また、特許文献2には、ドライバーが存在可能な領域を撮影して得られた画像を取り込み、取り込んだ画像から縦エッジ画像(顔の両側端)を検出し、検出した縦エッジ画像に基づいて、複数の顔中心候補線を設定すると共に各顔中心候補線各々に対して、該顔中心候補線が顔の中心線である確からしさを表す値に基づいて、顔の有無の判定精度を向上する技術が開示されている。
車両の走行環境は様々に変化し、カメラが捉えるドライバーの画像も様々に変化する。例えば、夜間では、顔の両端付近での輝度値の差がはっきりせずに、正確な顔の両端位置を検出することができないことが多い。また、例えば、ドライバーが女性の場合、髪型や化粧の影響により、顔の両端付近での輝度値の差がはっきりせずに、正確な顔の両端位置を検出することができないことが多い。
この顔の両端位置の検出に誤りが生ずると、以後の処理を正確に行うことができない。
The driving environment of the vehicle changes variously, and the driver's image captured by the camera also changes variously. For example, at night, the difference between the brightness values near the both ends of the face is not clear, and it is often impossible to detect the exact positions of both ends of the face. For example, when the driver is a woman, due to the influence of the hairstyle and makeup, the difference between the brightness values in the vicinity of both ends of the face is not clear, and it is often impossible to detect the exact positions of both ends of the face.
If an error occurs in the detection of both end positions of the face, the subsequent processing cannot be performed accurately.
本発明は上記の問題点に鑑みてなされたものであり、夜間に撮影された画像や女性の顔画像といった顔の両端位置を実際よりも内側に誤検出する虞のあった顔画像においても、顔の両端位置を検出することが可能とする顔端検出装置、顔端検出方法、及び、プログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and even in a face image that may be erroneously detected on the inner side than the actual position of both ends of the face, such as an image photographed at night or a female face image, It is an object of the present invention to provide a face edge detection device, a face edge detection method, and a program capable of detecting both end positions of a face.
上記目的を達成するため、この発明の第1の観点に係る顔端検出装置は、顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、前記顔画像記憶手段に記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定手段と、前記輪郭候補位置決定手段により決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正手段と、を備える、ことを特徴とする。 In order to achieve the above object, a face edge detection device according to a first aspect of the present invention stores a face image storage means for storing a face image obtained by photographing a face and the face image storage means. Process the pixel data of the face image to detect a temporary contour position in the left-right direction of the face, and based on the pixel data located around the detected temporary contour position, a plurality of contour candidates that are candidates for the contour position A contour candidate position determining unit that determines a position; and a contour position correcting unit that uses a position extracted from the plurality of contour candidate positions determined by the contour candidate position determining unit as a contour position. .
また、前記顔位置検出装置において、前記輪郭候補位置決定手段は、前記顔画像記憶手段に記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出する仮輪郭位置検出手段と、前記仮輪郭位置検出手段で検出した前記仮の輪郭位置の左右方向の隣りに位置する画素データと、前記隣りに位置する画素の上下に位置する二つの画素データに基づいて、前記仮の輪郭位置を前記隣に位置する画素の位置に変更するか否かを決定する決定手段と、前記決定手段で前記仮の輪郭位置を変更することを決定した場合に、前記仮の輪郭位置を変更する変更手段と、前記決定手段と、前記変更手段と、を繰り返し動作させて、前記決定手段が前記仮の輪郭位置を変更しないと決定したときの仮の輪郭位置を前記輪郭候補位置とする手段と、を備えることを特徴とするようにしてもよい。 Further, in the face position detection device, the contour candidate position determination unit processes the pixel data of the face image stored in the face image storage unit, and detects a temporary contour position in the horizontal direction of the face. Based on position detection means, pixel data located adjacent to the temporary contour position in the left-right direction detected by the temporary contour position detection means, and two pixel data located above and below the pixels located adjacent to each other, Determining means for determining whether or not to change the temporary contour position to the position of the pixel located next to the temporary contour position, and when the determination means determines to change the temporary contour position, The changing means for changing the position, the determining means, and the changing means are repeatedly operated so that the temporary contour position when the determining means determines not to change the temporary contour position is the contour candidate position. Hand When, may be characterized in that it comprises a.
さらに、前記顔位置検出装置において、前記輪郭位置補正手段は、前記輪郭候補位置決定手段により決定された前記複数の輪郭候補位置のヒストグラムを作成するヒストグラム作成手段と、前記ヒストグラム作成手段で作成したヒストグラムに基づいて、前記輪郭候補位置の標準偏差を算出する標準偏差算出手段と、前記標準偏差算出手段で算出した標準偏差内の輪郭候補位置の内、顔画像の最も外側に位置する輪郭候補位置を輪郭位置とする手段と、を備えることを特徴とするようにしてもよい。 Further, in the face position detecting device, the contour position correcting means creates a histogram of the plurality of contour candidate positions determined by the contour candidate position determining means, and a histogram created by the histogram creating means. A standard deviation calculating means for calculating a standard deviation of the contour candidate position, and a contour candidate position located on the outermost side of the face image among the contour candidate positions within the standard deviation calculated by the standard deviation calculating means. And means for setting the contour position.
また、この発明の第2の観点に係る顔端検出方法は、顔を撮影して得られた顔画像を記憶する顔画像記憶ステップと、前記顔画像記憶ステップで記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定ステップと、前記輪郭候補位置決定ステップで決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正ステップと、を備える、ことを特徴とする。 The face edge detection method according to the second aspect of the present invention includes a face image storage step for storing a face image obtained by photographing a face, and pixel data of the face image stored in the face image storage step. To detect a temporary contour position in the left-right direction of the face, and determine a plurality of contour candidate positions that are candidates for the contour position based on pixel data located around the detected temporary contour position A candidate position determining step; and a contour position correcting step using a position extracted from the plurality of contour candidate positions determined in the contour candidate position determining step as a contour position.
また、この発明の第3の観点に係るプログラムは、コンピュータに、顔を撮影して得られた顔画像を記憶する顔画像記憶手順と、前記顔画像記憶手順で記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定手順と、前記輪郭候補位置決定手順で決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正手順と、を実行させる。 According to a third aspect of the present invention, there is provided a program for storing a face image obtained by photographing a face in a computer, and pixel data of the face image stored in the face image storing procedure. To detect a temporary contour position in the left-right direction of the face, and determine a plurality of contour candidate positions that are candidates for the contour position based on pixel data located around the detected temporary contour position A candidate position determination procedure and a contour position correction procedure in which positions extracted from the plurality of contour candidate positions determined in the contour candidate position determination procedure are used as a contour position are executed.
この発明によれば、夜間に撮影した顔画像や女性の顔画像といった顔の両端位置を実際よりも内側に誤検出する虞のあった顔画像においても、顔の両端位置をより正確に検出することができる。 According to the present invention, both end positions of a face can be detected more accurately even in a face image such as a face image photographed at night or a face image of a woman that may misdetect both ends of the face inside. be able to.
以下、本発明の実施形態に係る顔端検出装置について説明する。 Hereinafter, a face edge detection 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 edge detection device of this embodiment includes a
カメラ10は例えばCCDカメラ等から構成され、ドライバーの顔の階調画像を取得する。カメラ10によって生成される顔画像は、ドライバーの顔だけでなく、その背景なども含まれている。
The
表示装置16は、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)などから構成され、カメラ10で撮影された顔画像から生成された二値化画像などを表示する。
The
コンピュータ14は、カメラ10により取得された顔画像を処理して顔の左右の両端位置を検出する装置である。しかし、夜間に撮影された顔画像や女性の顔画像において最初に検出した顔の両端位置は、誤って顔の中央よりに検出されることが多い。そこで、コンピュータ14は、最初に検出した左右の両端位置に基づいて、誤って検出され得る部分に対して、顔の両端位置を補正してから、最終的な顔の左右の両端位置を求める。また、コンピュータ14は、図2に示すように、画像キャプチャ装置21と、画像メモリ22と、ROM23と、CPU24と、RAM25と、表示制御装置27と、光源制御装置28と、を備える。
The
画像キャプチャ装置21は、カメラ10で撮影されたアナログ画像信号をディジタル信号に変換する。
画像メモリ22は、カメラ10により生成され、画像キャプチャ装置21でディジタル化された画像データを記憶する。
The
The
ROM23は、CPU24の動作を制御するためのプログラムを記憶する。また、ROM23は、後述する画像処理を実行するための様々な固定データを記憶する。
The
CPU24は、ROM23に格納されているプログラムを実行することにより、カメラ10により取得された顔画像を処理して顔の両端位置を検出する。そして、CPU24は、この検出した両端位置に基づいて、その両端位置を補正し、再度、顔の左右の両端位置を求める。
The
RAM25は、CPU24のワークエリアとして機能する。
表示制御装置27は、CPU24の制御下に、表示装置16を制御する。
光源制御装置28は、照明光源12の点灯・消灯を制御する。
The
The
The light
次に、ROM23に格納される固定データの例を図3を参照して説明する。まず、ROM23は、図3(a)、(b)、(c)に示すような、順・逆方向の縦エッジ検出用と横エッジ検出用ソーベルフィルタのオペレータを格納する。図3(a)、(b)、(c)に示す、順・逆方向の縦エッジ検出用ソーベルフィルタと横エッジ検出用のソーベルフィルタとは、それぞれ、図3(d)、(e)、(f)に示すような縦方向の濃淡差、横方向の濃淡差を強調するためのオペレータである。
Next, an example of fixed data stored in the
また、ROM23は、顔の両端位置を検出するプログラムや、顔の両端位置を補正するプログラムや、統計処理を行うプログラムといった各種プログラムが格納される。また、図3(g)に示すように、RAM25に格納される顔画像のうち、目や眉の画像が存在すると想定される位置を特定するデータ、及び、顔の両端位置が存在すると想定される位置を特定するデータ等を格納しておいてもよい。具体的には、顔の右端位置の座標値i、顔の左端位置の座標値j、目や眉の上の位置の座標値m、口の下の位置の座標値nが格納される。
さらに、ROM23は、図3(h)に示すような、固定値であるパラメータを格納しておく。具体的には、顔の両端位置を横方向に補正する最大移動画素数を5として記憶する。また、縦エッジ検出用のソーベルフィルタを用いて処理した各画素の輝度値から、縦エッジか否かを判別するための縦ソーベル閾値を8として記憶する。さらに、縦方向に並ぶ所定の画素数に対する補正候補の画素数の割合に応じて、補正するか否かを判別するための境界値データ数割合を40%として記憶する。
The
Furthermore, the
次に、上記構成を有する顔端検出装置の動作を説明する。
電源が投入されると、コンピュータ14内のCPU24は、図4に示す処理を繰り返して実行する。
Next, the operation of the face edge detection apparatus having the above configuration will be described.
When the power is turned on, the
即ち、CPU24は、前処理(ステップS01)と顔位置検出処理(ステップS02)と補正処理(ステップS03)とから構成される処理を繰り返して実行する。
That is, the
図4に示す処理を構成する前処理(ステップS01)と顔位置検出処理(ステップS02)とは、ドライバーの左右方向及び上下方向の顔の位置(座標値)を求めるための処理である。 The pre-processing (step S01) and face position detection processing (step S02) constituting the processing shown in FIG. 4 are processing for obtaining the position (coordinate values) of the driver in the horizontal direction and vertical direction.
補正処理(ステップS03)は、ステップS02で求めたドライバーの左右の顔両端位置を補正して、より正確な左右の顔両端位置を求めるための処理である。 The correction process (step S03) is a process for correcting the left and right face end positions of the driver obtained in step S02 to obtain more accurate left and right face end positions.
前処理(ステップS01)は、図5に示すように、キャプチャ処理(ステップS011)と、座標変換処理(ステップS012)と、ソーベルフィルタ処理(ステップS013)とから構成される。 As shown in FIG. 5, the preprocessing (step S01) includes a capture process (step S011), a coordinate conversion process (step S012), and a Sobel filter process (step S013).
キャプチャ処理(ステップS011)は、カメラ10の撮影したドライバーの1フレーム分の顔画像を画像キャプチャ装置21を介して取り込み、画像メモリ22に格納する処理である。
The capture process (step S011) is a process of capturing a face image for one frame of the driver photographed by the
座標変換処理(ステップ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 process (step S013) emphasizes the vertical edges in the face image by processing the face image after coordinate conversion using the vertical edge detection operator (FIG. 3A) stored in the
図4の顔位置検出処理(ステップS02)は、前処理済みの顔画像を用いて顔の左右両端位置と上下位置を検出する処理であり、図6に示すように、顔両端検出処理(ステップS021)と顔上下位置検出処理(ステップS022)とから構成される。 The face position detection process (step S02) in FIG. 4 is a process for detecting the left and right end positions and the vertical position of the face using the preprocessed face image. As shown in FIG. 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.
顔の両端を構成するラインを特定するために、例えば、図7に示すように、顔両端検出用のヒストグラム作成処理を行う(ステップS0211)。続いて、このヒストグラムのピーク値の高いものを所定数抽出して、これをソートし(ステップS0212)、ヒストグラム値に基づく、端点の抽出を行う(ステップS0213)。例えば、ヒストグラム値の上位1又は2つが他と比較して極端に値が大きい場合には、その点を端点とする。 In order to identify the lines constituting the both ends of the face, for example, as shown in FIG. 7, a histogram creation process for detecting both ends of the face is performed (step S0211). Subsequently, a predetermined number of high histogram peak values are extracted and sorted (step S0212), and end points are extracted based on the histogram values (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)。2つ抽出されていれば(ステップS0214;Yes)、処理をステップS0216に移行する。端点が2つ抽出できていなければ(ステップS0214;No)、2点の距離が、人の顔幅としてもっともらしい間隔を有する組み合わせを抽出することにより、端点を決定し(ステップS0215)、最終的に、顔面の両端(x座標値)を決定する処理を行う(ステップS0216)。 Next, it is determined whether or not two end points (both ends) have been extracted (step S0214). If two are extracted (step S0214; Yes), the process proceeds to step S0216. If two end points have not been extracted (step S0214; No), the end point is determined by extracting a combination in which the distance between the two points has a plausible interval as a human face width (step S0215). Then, a process for determining both ends (x coordinate values) of the face is performed (step S0216).
また、特許文献1に開示されているように、撮影画像の時間微分を算出し、さらに、この画素値時間微分画像の画素値を縦方向に投影してヒストグラムを作成し、エッジ部抽出画像のヒストグラムと画素値時間微分画像のヒストグラムとを合計して、ヒストグラムのピーク値の高いものを抽出すると共に人の顔幅としてもっともらしい点を決定し、顔端位置を検出するようにしてもよい。
Further, as disclosed in
次に、図6のステップS022の顔上下位置検出処理は、上述と同様の処理を横エッジについて行って、顔のほぼ眉の位置(上端)と口の位置(下端)を検出する処理であり、例えば、図8に示すように、ヒストグラム作成処理(ステップ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 eyebrow (upper end) and the position of the mouth (lower end) by performing the same process as described above for the horizontal edge. For example, as shown in FIG. 8, the process includes a histogram creation process (step S 0221), a current candidate detection process (step S 0222), and a face vertical position calculation process (step S 0233).
ヒストグラム作成処理(ステップ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)は、ヒストグラム値に基づいて、目・眉、口などに対応するヒストグラム値の候補を選択する処理である。
顔上下位置算出処理(ステップS0223)は、選択した候補から、顔の上下端位置(y座標値)(例えば、目・眉の位置)を検出する処理である。なお、顔上端位置(y座標値)は、例えば、検出した眉から所定の画素数分(例えば、3画素分)上の位置とし、下端位置は検出した口から所定の画素数分(例えば、3画素分)下の位置(口と顎の間)などに設定される。
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 S0223) is a process for detecting the upper and lower end positions (y coordinate values) (for example, the positions of eyes and eyebrows) from the selected candidates. The face upper end position (y coordinate value) is, for example, a position above a detected eyebrow by a predetermined number of pixels (for example, 3 pixels), and the lower end position is a predetermined number of pixels from the detected mouth (for example, for example, It is set to a lower position (between mouth and chin) or the like.
CPU24は、このようにしてステップS021とS022で求めた、顔の両端(左右側端)位置(x座標値)と、顔の上下位置(y座標値)をRAM25に記憶する。具体的には、図9に示すように、ステップS021で求めた顔の右端のx座標値を右端初期値aとし、ステップS022で求めた顔の左端のx座標値を左端初期値bとして記憶する。また、ステップS022で求めた顔の上下位置の上端のy座標値を下限値cとし、ステップS022で求めた顔の下端のy座標値を上限値dとして記憶する。この右端初期値a、左端初期値b、下限値c、上限値d、の位置を一例として女性の顔画像に示すと、図9に示す位置になる。
図9は、女性の顔画像に縦エッジ検出用オペレータを用いて処理し、二値化処理した後の図である。図3(a)に示した順方向の縦検出用オペレータを用いて処理した場合と、図3(b)に示した逆方向の縦検出用オペレータを用いて処理した場合とで、それぞれ濃い灰色と、薄い灰色とで区別し、重ね合わせた二値化画像である。
The
FIG. 9 is a diagram after a female face image is processed using a vertical edge detection operator and binarized. The case where the processing is performed using the forward direction vertical detection operator shown in FIG. 3A and the case where the processing is performed using the reverse direction vertical detection operator shown in FIG. And binarized images that are distinguished from light gray and superimposed.
次に、図4の補正処理(ステップS03)は、例えば、図10の補正処理1、図11の補正処理2にそれぞれ示す構成を有する。補正処理は、夜間に撮影された顔画像や女性の顔画像等において、顔の両端の縦エッジが顔の内側に検出されることが多いため、その縦エッジの位置を補正する処理である。補正処理1は、顔画像の顔の右端位置に係る補正処理であり、補正処理2は、顔画像の顔の左端位置に係る補正処理である。補正処理1、補正処理2は、並列に処理してもよいし、逐次的に補正処理1の終了後に、補正処理2を開始してもよい。
Next, the correction process (step S03) in FIG. 4 has a configuration shown in, for example, the
顔の右端位置に係る補正処理1の動作を図10に示すフローチャートを参照して説明する。まず、CPU24は、顔画像における処理対象の画素のy座標値(以後、検索y座標値とよぶ)を0に設定して処理を開始する(ステップS031)。
The operation of the
続いて、CPU24は、ステップS021で求めた顔の両端位置(x座標値)の右端初期値aをRAM25から読み出し、顔画像における処理対象の画素のx座標値(以後、検索x座標値とよぶ)をaに設定し、検索y座標値をインクリメントして、検索座標値を(a、1)とする(ステップS032)。
Subsequently, the
さらに、CPU24は、ステップS02で求めた顔の上下位置(y座標値)の下限値cをRAM25から読み出し、検索y座標値がこの下限値c以上か否かを判別する(ステップS033)。検索y座標値が下限値c以上でなければ(ステップS033;No)、ステップS032に処理を戻し、検索y座標値をインクリメントする。これにより、顔画像中で、図3(f)に示すy座標値が下限値c以上、上限値d以下の範囲である縦検索範囲外の画素での無駄な処理を省く。
Further, the
一方、CPU24は、ステップS033で、検索y座標値が下限値c以上であると判別した場合(ステップS033;Yes)、次に、ステップS02で求めた顔の上下位置(y座標値)の上限値dをRAM25から読み出す。そして、CPU24は、検索y座標値がこの上限値d以上か否かを判別する(ステップS034)。
On the other hand, if the
ステップS034で検索y座標値がd以上であると判別した場合の処理は、後述する。ステップS034で検索y座標値がd以上でないと判別した場合(ステップS034;Yes)、CPU24は、検索x座標値が、RAM25から読み出した右端初期値aから5を減算した値以上か否かを判別する(ステップS035)。これは、ステップS021で求めた顔の両端位置の右端初期値aから補正する範囲(x座標方向)を、5ピクセル分に制限するためである。この制限範囲は、図3(h)に示すように、横検索範囲のパラメータとして予めROM25等に記憶する。なお、この制限範囲は5ピクセル分である必要はなく、任意の値でよい。
Processing in a case where it is determined in step S034 that the search y coordinate value is greater than or equal to d will be described later. If it is determined in step S034 that the search y-coordinate value is not greater than or equal to d (step S034; Yes), the
ステップS035で、CPU24は、検索x座標値が右端初期値aから5を減算した値(a−5)以上であると判別した場合(ステップS035;Yes)、検索座標値を(x,y)としたときの(x−1,y−1)、(x−1,y)、(x−1,y+1)の座標の画素における縦エッジ検出用オペレータで処理後の輝度値(以後、縦ソーベル値とよぶ)を参照する。この座標の位置関係を図12(A)に示す。そして、CPU24は、この3つの座標の全ての縦ソーベル値が、図3(h)に示すようなROM23に予め記憶された縦ソーベル閾値である8よりも大きいか否か判別する(ステップS036)。これは、この3つの座標の画素における縦ソーベル値が縦ソーベル閾値よりも大きければ、現在の検索座標位置よりも、(x−1,y)座標の位置が縦エッジである可能性が高いからである。
If the
ステップS036で、CPU24は、参照した3つの座標の縦ソーベル値が縦ソーベル閾値より大きいと判別した場合(ステップS036;Yes)、検索x座標値をx−1にし(ステップS037)、ステップS035の処理に戻る。
If the
以上のステップS035、ステップS036、ステップS037の処理を繰り返すことで、CPU24は、顔の両端位置(x座標値)を補正するべきか否か判別しながら、顔の外側に向かって画像を走査している。
顔の両端位置(x座標値)を補正すべきか否かの判断基準は、(x−1,y−1)、(x−1,y)、(x−1,y+1)の3つの座標に位置する画素の縦ソーベル値に基づく必要はなく、任意である。
By repeating the processes in steps S035, S036, and S037, the
The criteria for determining whether or not to correct both end positions (x coordinate values) of the face are three coordinates (x-1, y-1), (x-1, y), and (x-1, y + 1). It is not necessary to be based on the vertical Sobel value of the pixel located, and is arbitrary.
一方、ステップS035で、CPU24は、検索x座標値が右端初期値aから5を減算した値(a−5)以上であると判別した場合(ステップS035;No)、現在の検索x座標値を顔の右端位置(x座標値)の境界値データ(右端候補値)として、RAM25に記憶する(ステップS038)。ここで境界値データ(右端候補値)とは、顔の右端位置の候補となる座標値のことであり、これら境界値データ(右端候補値)の中から、最終的に顔の右端位置を決定する。
On the other hand, if the
また、ステップS036で、参照した3つの座標の縦ソーベル値が縦ソーベル閾値より大きくないと判別した場合にも(ステップS036;No)、現在の検索x座標値を顔の右端位置(x座標値)の境界値データ(右端候補値)として、RAM25に記憶する(ステップS038)。ステップS038での検索x座標値は、例えば図13(A)に示すような境界値記録配列A(以後、配列Aとよぶ)に記憶する。配列を検索y座標毎に用意し、検索x座標値を境界値データ(右端候補値)として記憶する。 Even when it is determined in step S036 that the vertical sobel values of the three coordinates referred to are not larger than the vertical sobel threshold value (step S036; No), the current search x-coordinate value is used as the right edge position of the face (x-coordinate value). ) Is stored in the RAM 25 (step S038). The retrieved x-coordinate values in step S038 are stored in a boundary value recording array A (hereinafter referred to as array A) as shown in FIG. An array is prepared for each search y coordinate, and the search x coordinate value is stored as boundary value data (right end candidate value).
CPU24は、ステップS038でRAM25に記憶した境界値データ(右端候補値)が、ステップS021で検出した顔の両端位置(x座標値)の右端初期値aであるか否かを判別する(ステップS039)。ここで、CPU24は、境界値データ(右端候補値)が、右端初期値aであると判別した場合(ステップS039;Yes)、顔の両端位置(x座標値)の右端初期値aは変更しなかったので、そのまま、処理をステップS032に移行させる。
The
一方、ステップS039で、CPU24は、境界値データ(右端候補値)が、右端初期値aではないと判別した場合(ステップS039;No)、ステップS021で検出した顔の両端位置(x座標値)の右端初期値aから変更した境界値データ(右端候補値)の総数をカウントするための境界値データ数Nをインクリメントする(ステップS0310)。
On the other hand, when the
CPU24は、以上のステップS032〜ステップS0310までの処理を繰り返し、検索y座標値が下限値c以上d以下の範囲で、顔の右端位置(x座標値)の境界値データ(右端候補値)をRAM25に記憶していく。
The
そして、CPU24は、ステップS034で検索y座標値がd以上であると判別した時点で(ステップS034;Yes)、処理を、図14のフローチャートで説明する処理に移行させる。
Then, when the
図14のフローチャートで説明する処理は、以上までの処理でRAM25に記憶してきた顔の右端位置(x座標値)の境界値データ(右端候補値)に基づいて、統計処理を行い、顔の右端位置を決定する処理である。
The processing described in the flowchart of FIG. 14 performs statistical processing based on the boundary value data (right end candidate value) of the right end position (x coordinate value) of the face stored in the
図10のステップS0310で加算してきた境界値データ数Nが少ない場合、その少ないデータに基づいて統計処理を行っても、その処理結果の信頼性は低い。そこで、CPU24は、まず、図3(h)に示すようなROM23に予め記憶しておいた境界値データ数割合(例えば、40%)を読み出す。CPU24は、その境界値データ数割合に、顔画像におけるy座標値がc以上d以下の範囲にある画素数(d−c+1)を乗算する。続いて、CPU24は、境界値データ数Nが、その乗算した結果の値以上であるか否かを判別する(ステップS051)。そこで、CPU24は、境界値データ数Nが、乗算した結果の値以上ではないと判別した場合は(ステップS051;No)、CPU24は、顔の両端位置(x座標値)の右端初期値aを変更せずに(ステップS057)、補正処理1を終了する。
When the number N of boundary value data added in step S0310 in FIG. 10 is small, the reliability of the processing result is low even if statistical processing is performed based on the small data. Therefore, the
一方、CPU24は、境界値データ数Nが、乗算した結果の値以上であると判別した場合(ステップS051;Yes)、統計処理を行う。具体的には、CPU24は、RAM25に記憶してきた全ての境界値データ(右端候補値)のヒストグラムを作成し、その平均値及び標準偏差を求め(ステップS052)、この両値をRAM25に記憶する。
On the other hand, if the
続いて、CPU24は、以降の処理で、RAM25に記憶された境界値データ(右端候補値)の平均値及び標準偏差を参照して、図9に示す最終的な顔の右端位置(x座標値)αを決定するための最小境界値(最小の境界値データ(右端候補値))を求める。
この最小境界値を求める処理の終了条件は、整数値である境界値カウンタがRAM25に記憶された境界値データ数Nと等しくなったことを条件とする。
そこで、まず、CPU24は、この境界値カウンタの初期値を0として、この境界値カウンタが境界値データ数Nより小さいか否かを判別する(ステップS053)。
Subsequently, the
An end condition for the process of obtaining the minimum boundary value is that the boundary value counter, which is an integer value, is equal to the number N of boundary value data stored in the
Therefore, first, the
CPU24は、境界値カウンタが境界値データ数Nより小さいと判別した場合(ステップS053;Yes)、図13(A)に示すような、境界値カウンタと一致する引数をもつ配列Aの境界値データ(右端候補値)をRAM25から読み出す。CPU24は、読み出した境界値データ(右端候補値)が、i)標準偏差以内であり、かつ、ii)最小境界値(初期値は右端初期値aとする)より小さいか否かを判別する(ステップS054)。
When the
CPU24は、ステップS054で、i)、ii)の条件を共に満たしていると判別した場合(ステップS054;Yes)、その配列Aの境界値データ(右端候補値)を最小境界値とし、その値をRAM25に更新して記憶する(ステップS055)。これにより、CPU24は、境界値データ(右端候補値)の中から、標準偏差を超えるようなはずれ値を除外し、その時点までの最小境界値より小さい値の境界値データ(右端候補値)を選択して、新たな最小境界値とする。
If the
一方、CPU24は、ステップS054で、i)、ii)の条件のいずれか、或いは、共に満たしていないと判別した場合(ステップS054;No)、RAM25に記憶された最小境界値を更新せずに、次の処理に移行させる。
On the other hand, if the
続いて、CPU24は、境界値カウンタをインクリメントさせ(ステップS056)、処理を、ステップS053の処理に戻す。
Subsequently, the
以上のステップS053〜ステップS056の処理を、CPU24は、境界値カウンタがRAM25に記憶された境界値データ数Nと等しくなるまで繰り返す。これにより、CPU24は、RAM25に記憶された顔の右端位置(x座標値)の全ての境界値データ(右端候補値)の中から、最小の最小境界値を抽出する。
The
CPU24は、ステップS053で、境界値カウンタが境界値データ数Nと等しいと判別した場合(ステップS053;No)、最小境界値を求める処理を終了し、RAM25に記憶された最小境界値を参照する。そして、CPU24は、この最小境界値を、顔の右端位置(x座標値)αとして、RAM25に記憶し(ステップS058)、補正処理1を終了する。この顔の右端位置(x座標値)αを、一例として図9の顔画像に示す。
If the
以上の処理により、顔の右端位置に係る補正を行い、夜間に撮影された顔画像や女性の顔画像等においても、より正確な顔の右端位置を検出することができる。 Through the above processing, correction relating to the right end position of the face is performed, and a more accurate right end position of the face can be detected even in a face image photographed at night, a female face image, or the like.
次に、顔の左端位置に係る補正処理2の動作を図11に示すフローチャートを参照して説明する。まず、CPU24は、検索y座標値を0に設定して処理を開始する(ステップS041)。
Next, the operation of the
続いて、CPU24は、ステップS02で求めた顔の両端位置(x座標値)の左端初期値bをRAM25から読み出し、顔画像における検索x座標値をbに設定し、検索y座標値をインクリメントして、検索座標値を(b、1)とする(ステップS042)。
Subsequently, the
さらに、CPU24は、ステップS02で求めた顔の上下位置(y座標値)の下限値cをRAM25から読み出し、検索y座標値がこの下限値c以上か否かを判別する(ステップS043)。検索y座標値が下限値c以上でなければ(ステップS043;No)、ステップS042に処理を戻し、検索y座標値をインクリメントする。これにより、顔画像中で、図3(f)に示すy座標値が下限値c以上、上限値d以下の範囲である縦検索範囲外の画素での無駄な処理を省く。
Further, the
一方、CPU24は、ステップS043で、検索y座標値が下限値c以上であると判別した場合(ステップS043;Yes)、次に、ステップS02で求めた顔の上下位置(y座標値)の上限値dをRAM25から読み出す。そして、CPU24は、検索y座標値がこの上限値d以上か否かを判別する(ステップS044)。
On the other hand, if the
ステップS044で検索y座標値がd以上であると判別した場合(ステップS044;Yes)の処理は、後述する。ステップS044で検索y座標値がd以上でないと判別した場合(ステップS044;No)、CPU24は、検索x座標値が、RAM25から読み出した左端初期値bに5を加算した値以下か否かを判別する(ステップS045)。これは、ステップS021で求めた顔の両端位置の左端初期値bから補正する範囲(x座標方向)を、5ピクセル分に制限するためである。この制限範囲は、図3(h)に示すように、横検索範囲のパラメータとして予めROM25等に記憶する。なお、この制限範囲は5ピクセル分である必要はなく、任意の値でよい。
Processing in the case where it is determined in step S044 that the search y coordinate value is equal to or greater than d (step S044; Yes) will be described later. If it is determined in step S044 that the search y-coordinate value is not greater than or equal to d (step S044; No), the
ステップS045で、CPU24は、検索x座標値が左端初期値bに5を加算した値(b+5)以下であると判別した場合(ステップS045;Yes)、検索座標値が(x,y)としたときの(x+1,y−1)、(x+1,y)、(x+1,y+1)の座標の画素における縦ソーベル値を参照する。この座標の位置関係を図12(B)に示す。そして、CPU24は、この3つの座標の全ての縦ソーベル値が、図3(h)に示すようなROM23に予め記憶された縦ソーベル閾値である8よりも大きいか否か判別する(ステップS046)。これは、この3つの座標の画素における縦ソーベル値が縦ソーベル閾値よりも大きければ、現在の検索座標位置よりも、(x+1,y)座標の位置の方が縦エッジである可能性が高いからである。
In step S045, if the
ステップS046で、CPU24は、参照した3つの座標の縦ソーベル値が縦ソーベル閾値より大きいと判別した場合(ステップS046;Yes)、検索x座標値をx+1にし(ステップS047)、ステップS045の処理に戻る。
In step S046, if the
以上のステップS045、ステップS046、ステップS047の処理を繰り返すことで、CPU24は、顔の両端位置(x座標値)を補正するべきか否か判別しながら、顔の外側に向かって画像を走査している。
顔の両端位置(x座標値)を補正すべきか否かの判別は、(x+1,y−1)、(x+1,y)、(x+1,y+1)の3つの座標に位置する画素の縦ソーベル値に基づく必要はなく、任意である。
By repeating the processes in steps S045, S046, and S047 described above, the
The determination as to whether or not the positions of both ends of the face (x coordinate value) should be corrected is based on the vertical Sobel values of the pixels located at the three coordinates (x + 1, y−1), (x + 1, y), and (x + 1, y + 1). It is not necessary to be based on and is arbitrary.
一方、ステップS045で、CPU24は、検索x座標値が左端初期値bに5を加算した値(b+5)より大きいと判別した場合(ステップS045;No)、現在の検索x座標値を顔の左端位置(x座標値)の境界値データ(左端候補値)として、RAM25に記憶する(ステップS048)。ここで境界値データ(左端候補値)とは、顔の左端位置の候補となる座標値のことであり、これら境界値データ(左端候補値)の中から、最終的に顔の左端位置を決定する。
On the other hand, if the
また、ステップS046で、参照した3つの座標の縦ソーベル値が縦ソーベル閾値より大きくないと判別した場合にも(ステップS046;No)、現在の検索x座標値を顔の左端位置(x座標値)の境界値データ(左端候補値)として、RAM25に記憶する(ステップS048)。ステップS048での検索x座標値は、例えば図13(B)に示すような境界値記録配列B(以後、配列Bとよぶ)に記憶する。配列を検索y座標毎に用意し、検索x座標値を境界値データ(左端候補値)として記憶する。 Even when it is determined in step S046 that the vertical sobel values of the three coordinates referred to are not larger than the vertical sobel threshold value (step S046; No), the current search x-coordinate value is set to the left edge position (x-coordinate value) of the face. ) Is stored in the RAM 25 (step S048). The search x-coordinate value in step S048 is stored in a boundary value recording array B (hereinafter referred to as array B) as shown in FIG. An array is prepared for each search y-coordinate, and the search x-coordinate value is stored as boundary value data (left end candidate value).
CPU24は、ステップS048でRAM25に記憶した境界値データ(左端候補値)が、ステップS021で検出した顔の両端位置(x座標値)の左端初期値bであるか否かを判別する(ステップS049)。ここで、CPU24は、境界値データ(左端候補値)が、左端初期値bであると判別した場合(ステップS049;Yes)、顔の両端位置(x座標値)の左端初期値bは変更しなかったので、そのまま、処理をステップS042に移行させる。
The
一方、ステップS049で、CPU24は、左端候補値が、左端初期値bではないと判別した場合(ステップS049;No)、ステップS021で検出した顔の両端位置(x座標値)の左端初期値bから変更した境界値データ(左端候補値)の総数をカウントするための境界値データ数Mをインクリメントする(ステップS0410)。
On the other hand, if the
CPU24は、以上のステップS042〜ステップS0410までの処理を繰り返し、検索y座標値が下限値c以上、上限値d以下の範囲で、顔の左端位置(x座標値)の境界値データ(左端候補値)をRAM25に記憶していく。
The
そして、CPU24は、ステップS044で検索y座標値がd以上であると判別した時点で(ステップS044;Yes)、処理を、図14のフローチャートで説明する処理に移行させる。
When the
図14のフローチャートで説明する処理は、以上までの処理でRAM25に記憶してきた顔の左端端位置(x座標値)の境界値データ(左端候補値)に基づいて、統計処理を行い、顔の左端位置を決定する処理である。
The processing described in the flowchart of FIG. 14 performs statistical processing based on the boundary value data (left end candidate value) of the left end position (x coordinate value) of the face that has been stored in the
図11のステップS0410で加算してきた境界値データ数Mが少ない場合、その少ないデータに基づいて統計処理を行っても、その処理結果の信頼性は低い。そこで、CPU24は、まず、図3(h)に示すようなROM23に予め記憶しておいた境界値データ数割合(例えば、40%)を読み出す。CPU24は、その境界値データ数割合に、顔画像におけるy座標値がc以上d以下の範囲にある画素数(d−c+1)を乗算する。続いて、CPU24は、境界値データ数Mが、その乗算した結果の値以上であるか否かを判別する(ステップS051)。そこで、CPU24は、境界値データ数Mが、乗算した結果の値以上ではないと判別した場合は(ステップS051;No)、CPU24は、顔の両端位置(x座標値)の左端初期値bを変更せずに(ステップS057)、補正処理2を終了する。
When the number M of boundary value data added in step S0410 in FIG. 11 is small, the reliability of the processing result is low even if statistical processing is performed based on the small amount of data. Therefore, the
一方、CPU24は、境界値データ数Mが、乗算した結果の値以上であると判別した場合(ステップS051;Yes)、統計処理を行う。具体的には、CPU24は、RAM25に記憶してきた全ての境界値データ(左端候補値)のヒストグラムを作成し、その平均値及び標準偏差を求め(ステップS052)、この両値をRAM25に記憶する。
On the other hand, when the
続いて、CPU24は、以降の処理で、RAM25に記憶された境界値データ(左端候補値)の平均値及び標準偏差を参照して、図9に示す最終的な顔の左端位置(x座標値)βを決定するための最大境界値(最大の境界値データ(左端候補値)を求める。
この最大境界値を求める処理の終了条件は、整数値である境界値カウンタがRAM25に記憶された境界値データ数Mと等しくなったことを条件とする。
そこで、まず、CPU24は、この境界値カウンタの初期値を0として、この境界値カウンタが境界値データ数Mより小さいか否かを判別する(ステップS053)。
Subsequently, in the subsequent processing, the
The condition for ending the process of obtaining the maximum boundary value is that the boundary value counter, which is an integer value, is equal to the number M of boundary value data stored in the
Therefore, first, the
CPU24は、境界値カウンタが境界値データ数Mより小さいと判別した場合(ステップS053;Yes)、図13(B)に示すような、境界値カウンタと一致する引数をもつ配列Bの境界値データ(左端候補値)をRAM25から読み出す。CPU24は、読み出した境界値データ(左端候補値)が、i)標準偏差以内であり、かつ、ii)最大境界値(初期値は左端初期値bとする)より大きいか否かを判別する(ステップS054)。
When the
CPU24は、ステップS054で、i)、ii)の条件を共に満たしていると判別した場合(ステップS054;Yes)、その配列Bの境界値データ(左端候補値)を最大境界値とし、その値をRAM25に更新して記憶する(ステップS055)。これにより、CPU24は、境界値データ(左端候補値)の中から、標準偏差を超えるようなはずれ値を除外し、その時点までの最大境界値より大きい値の境界値データ(左端候補値)を選択して、新たな最大境界値とする。
When the
一方、CPU24は、ステップS054で、i)、ii)の条件のいずれか、或いは、共に満たしていないと判別した場合(ステップS054;No)、RAM25に記憶された最大境界値を更新せずに、次の処理に移行させる。
On the other hand, if the
続いて、CPU24は、境界値カウンタをインクリメントさせ(ステップS056)、処理を、ステップS053の処理に戻す。
Subsequently, the
以上のステップS053〜ステップS056の処理を、CPU24は、境界値カウンタがRAM25に記憶された境界値データ数Mと等しくなるまで繰り返す。これにより、CPU24は、RAM25に記憶された顔の左端位置(x座標値)の全ての境界値データ(上点候補値)の中から、最大の最大境界値を抽出する。
The
CPU24は、ステップS053で、境界値カウンタが境界値データ数Mと等しいと判別した場合(ステップS053;No)、最大境界値を求める処理を終了し、RAM25に記憶された最大境界値を参照する。そして、CPU24は、この最大境界値を、顔の左端位置(x座標値)βとして、RAM25に記憶し(ステップS058)、補正処理2を終了する。この顔の左端位置(x座標値)βを、一例として図9の顔画像に示す。
If the
以上の処理により、顔の左端位置に係る補正を行い、夜間及び女性の顔画像においても、より正確な顔の左端位置を検出することができる。 Through the above processing, correction related to the left end position of the face can be performed, and a more accurate left end position of the face can be detected at night and in a female face image.
図4に戻って、補正処理ステップS03を終了した後、CPU24は、図4の処理を繰り返し実行し、ドライバーの顔の両端位置(x座標値)を求め続ける。また、求めた顔の両端位置(x座標値)は、RAM25に記憶され、その後、所望の処理に利用することができる。
以上の処理により、本実施形態に係る顔端検出装置は、夜間に撮影された顔画像や女性の顔画像等においても、顔の両端位置をより正確に検出することができる。
Returning to FIG. 4, after completing the correction processing step S <b> 03, the
Through the above processing, the face edge detection device according to the present embodiment can more accurately detect the positions of both ends of a face even in a face image photographed at night, a female face image, or the like.
なお、この発明は上記実施形態に限定されず、種々の変形及び応用が可能である。 In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.
例えば、上記実施形態では、顔画像の横エッジ、縦エッジを検出するために、ソーベルフィルタを適用したが、これに限定されず、例えば、プレウィットフィルタや、ロバーツフィルタを適用して、横エッジ、縦エッジを検出してもよい。 For example, in the above embodiment, the Sobel filter is applied to detect the horizontal edge and the vertical edge of the face image. However, the present invention is not limited to this. For example, a pre-witt filter or a Roberts filter is applied to Edges and vertical edges may be detected.
また、上記実施形態では、眉(又は目)と、口の階調画像から顔の上下位置(下限値c、上限値d)を求めたが、上下位置の判別に使用する顔の部分(パーツ)は任意である。例えば、耳や、ほお、頭髪などを加えて、顔の上下位置を求めても良い。 In the above embodiment, the vertical position (lower limit c, upper limit d) of the face is obtained from the eyebrows (or eyes) and the tone image of the mouth, but the part of the face (parts) used to determine the vertical position ) Is optional. For example, the vertical position of the face may be obtained by adding ears, cheeks, hair, or the like.
また、顔の上下位置(y座標値)を求めるために、眉(又は目)と、口の階調画像を利用せずに、予めROM等に記憶しておいた目や眉の画像が存在すると想定される顔の上下位置(y座標値)を特定するデータを利用してもよい。 In addition, in order to obtain the vertical position (y coordinate value) of the face, there is an eye or eyebrow image stored in advance in a ROM or the like without using the eyebrow (or eyes) and the tone image of the mouth. Then, data for specifying the assumed vertical position (y coordinate value) of the face may be used.
図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 an infrared camera that captures an image with the near-infrared ray or the like is used for the
また、上述のフローチャートも同様の機能が実現できるならば、任意に変更可能である。
例えば、境界値データ数割合を50%へ変更したり、縦ソーベル閾値を10へ変更してもよい。
The above-described flowchart can be arbitrarily changed as long as the same function can be realized.
For example, the boundary value data number ratio may be changed to 50%, or the vertical Sobel threshold value may be changed to 10.
上記各実施形態においては、ドライバーを撮影して顔の両端位置を検出する場合にこの発明を適用したが、この発明はこれに限定されず、任意の場面で人間、動物、人形、ロボット等の輪郭を検出する処理に広く適用可能である。 In each of the above embodiments, the present invention is applied when detecting the positions of both ends of a face by photographing a driver. However, the present invention is not limited to this, and humans, animals, dolls, robots, etc. can be used in any scene. The present invention can be widely applied to processing for detecting a contour.
また、上記実施形態では、統計処理に平均値や標準偏差を用いていたが、この発明はこれに限定されず、顔の両端位置の補正に用いるデータとして信頼できるデータを選択できるのであれば、任意の方法でよい。 Further, in the above embodiment, the average value and the standard deviation are used for the statistical processing, but the present invention is not limited to this, as long as reliable data can be selected as data used for correction of both end positions of the face. Any method may be used.
本発明は、カメラで画像を取得しながら処理する場合に限定されず、例えば、他所で撮影した1又は複数の顔画像のそれぞれについて、顔の両端位置などを判別する為に使用可能である。 The present invention is not limited to processing while acquiring an image with a camera, and can be used, for example, to determine the positions of both ends of a face for each of one or a plurality of face images photographed elsewhere.
また、コンピュータに上述の処理を実行させるためのコンピュータプログラムを、任意の記録媒体やネットワークを介して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.
10 カメラ
22 画像メモリ (顔画像記憶手段)
23 ROM (輪郭候補位置決定手段、輪郭位置補正手段)
24 CPU (輪郭候補位置決定手段、輪郭位置補正手段)
10
23 ROM (contour candidate position determining means, contour position correcting means)
24 CPU (contour candidate position determining means, contour position correcting means)
Claims (5)
前記顔画像記憶手段に記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定手段と、
前記輪郭候補位置決定手段により決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正手段と、
を備えることを特徴とする顔端検出装置。 Face image storage means for storing a face image obtained by photographing a face;
The face image pixel data stored in the face image storage means is processed to detect a temporary contour position in the horizontal direction of the face, and based on the pixel data located around the detected temporary contour position, Contour candidate position determining means for determining a plurality of candidate contour positions that are position candidates;
A contour position correcting unit that uses a position extracted from the plurality of contour candidate positions determined by the contour candidate position determining unit as a contour position;
A face edge detection device comprising:
前記仮輪郭位置検出手段で検出した前記仮の輪郭位置の左右方向の隣りに位置する画素データと、前記隣りに位置する画素の上下に位置する二つの画素データに基づいて、前記仮の輪郭位置を前記隣に位置する画素の位置に変更するか否かを決定する決定手段と、
前記決定手段で前記仮の輪郭位置を変更することを決定した場合に、前記仮の輪郭位置を変更する変更手段と、
前記決定手段と、前記変更手段とを繰り返し動作させて、前記決定手段が前記仮の輪郭位置を変更しないと決定したときの仮の輪郭位置を前記輪郭候補位置とする手段と、
を備えることを特徴とする請求項1に記載の顔端検出装置。 The contour candidate position determining means processes the pixel data of the face image stored in the face image storage means, and detects a temporary contour position in the horizontal direction of the face;
The temporary contour position based on the pixel data located adjacent to the temporary contour position in the left-right direction detected by the temporary contour position detection means and the two pixel data located above and below the neighboring pixel. Determining means for determining whether or not to change to the position of the pixel located next to,
A changing means for changing the temporary contour position when the determining means determines to change the temporary contour position;
Means for repeatedly operating the determining means and the changing means, and setting the temporary contour position when the determining means determines not to change the temporary contour position as the contour candidate position;
The face edge detection device according to claim 1, further comprising:
前記ヒストグラム作成手段で作成したヒストグラムに基づいて、前記輪郭候補位置の標準偏差を算出する標準偏差算出手段と、
前記標準偏差算出手段で算出した標準偏差内の輪郭候補位置の内、顔画像の最も外側に位置する輪郭候補位置を輪郭位置とする手段と、
を備えることを特徴とする請求項1に記載の顔端検出装置。 The contour position correcting means creates a histogram of the plurality of contour candidate positions determined by the contour candidate position determining means,
A standard deviation calculating means for calculating a standard deviation of the candidate contour position based on the histogram created by the histogram creating means;
Means for setting the contour candidate position located on the outermost side of the face image out of the contour candidate positions within the standard deviation calculated by the standard deviation calculating means;
The face edge detection device according to claim 1, further comprising:
前記顔画像記憶ステップで記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定ステップと、
前記輪郭候補位置決定ステップで決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正ステップと、
を備えることを特徴とする顔端検出方法。 A face image storing step for storing a face image obtained by photographing a face;
The face image pixel data stored in the face image storage step is processed to detect a temporary contour position in the horizontal direction of the face, and based on the pixel data located around the detected temporary contour position, A contour candidate position determining step for determining a plurality of contour candidate positions that are position candidates;
A contour position correcting step in which a position extracted from the plurality of contour candidate positions determined in the contour candidate position determining step is a contour position;
A method for detecting a face edge.
顔を撮影して得られた顔画像を記憶する顔画像記憶手順と、
前記顔画像記憶手順で記憶された顔画像の画素データを処理して、顔の左右方向の仮の輪郭位置を検出し、検出した仮の輪郭位置の周辺に位置する画素データに基づいて、輪郭位置の候補となる複数の輪郭候補位置を決定する輪郭候補位置決定手順と、
前記輪郭候補位置決定手順で決定された前記複数の輪郭候補位置から抽出した位置を輪郭位置とする輪郭位置補正手順と、
を実行させるプログラム。 On the computer,
A face image storing procedure for storing a face image obtained by photographing a face;
The face image pixel data stored in the face image storage procedure is processed to detect a temporary contour position in the left-right direction of the face, and based on the pixel data located around the detected temporary contour position, A contour candidate position determination procedure for determining a plurality of contour candidate positions to be position candidates;
A contour position correction procedure in which a position extracted from the plurality of contour candidate positions determined in the contour candidate position determination procedure is a contour position;
A program that executes
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005332404A JP4664805B2 (en) | 2005-11-17 | 2005-11-17 | Face edge detection device, face edge detection method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005332404A JP4664805B2 (en) | 2005-11-17 | 2005-11-17 | Face edge detection device, face edge detection method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007139535A true JP2007139535A (en) | 2007-06-07 |
JP4664805B2 JP4664805B2 (en) | 2011-04-06 |
Family
ID=38202599
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005332404A Expired - Fee Related JP4664805B2 (en) | 2005-11-17 | 2005-11-17 | Face edge detection device, face edge detection method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4664805B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7898592B2 (en) | 2007-09-05 | 2011-03-01 | Seiko Epson Corporation | Image processing apparatus, image processing method, and image processing system |
US7961230B2 (en) | 2007-08-30 | 2011-06-14 | Seiko Epson Corporation | Image processing device, image processing program, image processing system, and image processing method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07271989A (en) * | 1994-03-31 | 1995-10-20 | Toshiba Corp | Boundary detecting method of background and object area, contour extracting method of object and object contour extracting device |
JPH08272979A (en) * | 1995-03-31 | 1996-10-18 | Toshiba Corp | Method and device for extracting face image outline |
JPH09259284A (en) * | 1996-03-22 | 1997-10-03 | Nissan Motor Co Ltd | Detecting device for face position and eye position of vehicle driver |
JP2004310396A (en) * | 2003-04-07 | 2004-11-04 | Toyota Central Res & Dev Lab Inc | Image processing apparatus |
-
2005
- 2005-11-17 JP JP2005332404A patent/JP4664805B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07271989A (en) * | 1994-03-31 | 1995-10-20 | Toshiba Corp | Boundary detecting method of background and object area, contour extracting method of object and object contour extracting device |
JPH08272979A (en) * | 1995-03-31 | 1996-10-18 | Toshiba Corp | Method and device for extracting face image outline |
JPH09259284A (en) * | 1996-03-22 | 1997-10-03 | Nissan Motor Co Ltd | Detecting device for face position and eye position of vehicle driver |
JP2004310396A (en) * | 2003-04-07 | 2004-11-04 | Toyota Central Res & Dev Lab Inc | Image processing apparatus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7961230B2 (en) | 2007-08-30 | 2011-06-14 | Seiko Epson Corporation | Image processing device, image processing program, image processing system, and image processing method |
US7898592B2 (en) | 2007-09-05 | 2011-03-01 | Seiko Epson Corporation | Image processing apparatus, image processing method, and image processing system |
Also Published As
Publication number | Publication date |
---|---|
JP4664805B2 (en) | 2011-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4307496B2 (en) | Facial part detection device and program | |
JP6125188B2 (en) | Video processing method and apparatus | |
CN107948517B (en) | Preview picture blurring processing method, device and equipment | |
JP4445454B2 (en) | Face center position detection device, face center position detection method, and program | |
JP5538909B2 (en) | Detection apparatus and method | |
JP4317465B2 (en) | Face identification device, face identification method, and face identification program | |
CN107016348B (en) | Face detection method and device combined with depth information and electronic device | |
JP4597391B2 (en) | Facial region detection apparatus and method, and computer-readable recording medium | |
JP4825473B2 (en) | Face orientation discrimination device | |
JP2007272435A (en) | Face feature extraction device and face feature extraction method | |
KR20160115663A (en) | Image processing apparatus and image processing method | |
CN112712059A (en) | Living body face recognition method based on infrared thermal image and RGB image | |
JP3952460B2 (en) | Moving object detection apparatus, moving object detection method, and moving object detection program | |
KR20100121817A (en) | Method for tracking region of eye | |
KR101908785B1 (en) | Tongue region extraction method and image processing apparatus for performing the method | |
JP4664805B2 (en) | Face edge detection device, face edge detection method, and program | |
JP2010237976A (en) | Light source information obtaining device, shading detection device, shading removal device, and those methods and programs | |
JP5203271B2 (en) | Display information forming apparatus and system | |
JPH11306348A (en) | Method and device for object detection | |
JP2008084109A (en) | Eye opening/closing determination device and eye opening/closing determination method | |
JP5128454B2 (en) | Wrinkle detection device, wrinkle detection method and program | |
JP3627249B2 (en) | Image processing device | |
JP6350331B2 (en) | TRACKING DEVICE, TRACKING METHOD, AND TRACKING PROGRAM | |
JP2005165983A (en) | Method for detecting jaw of human face, jaw detection system, and jaw detection program | |
JP5172995B2 (en) | Face orientation discrimination device and computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080313 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100709 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100720 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100921 |
|
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: 20101221 |
|
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: 20110107 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4664805 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: 20140114 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |