JP2000235640A - Facial organ detecting device - Google Patents

Facial organ detecting device

Info

Publication number
JP2000235640A
JP2000235640A JP11035182A JP3518299A JP2000235640A JP 2000235640 A JP2000235640 A JP 2000235640A JP 11035182 A JP11035182 A JP 11035182A JP 3518299 A JP3518299 A JP 3518299A JP 2000235640 A JP2000235640 A JP 2000235640A
Authority
JP
Japan
Prior art keywords
face
template
center line
facial
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11035182A
Other languages
Japanese (ja)
Inventor
Kenji Okano
健治 岡野
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP11035182A priority Critical patent/JP2000235640A/en
Publication of JP2000235640A publication Critical patent/JP2000235640A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a high performance facial organ detecting device which is hard to be affected by the changes in skin color and illumination conditions. SOLUTION: A center line calculating means 2 calculates the center line of a face from an input image stored in an image storing means 1. A facial color estimating means 3 estimates facial skin color from the input image stored in the means 1 on the basis of the facial center line calculated by the means 2. A template producing means 5 applies facial color estimated by the means 3 to template generation rules of facial organs stored in a dictionary 4 for template production and produces a template for facial organs. A matching means 7 compares the template produced by the means 5 with an area in the image of an inputted facial image and performs position detection of the facial organs by finding an area where similarity to the template is the highest in the inputted image.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、顔の画像認識を行
い、例えば目や唇といった顔器官を検出する顔器官検出
装置に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a face organ detecting apparatus for recognizing a face image and detecting a face organ such as eyes or lips.

【0002】[0002]

【従来の技術】顔画像から得られる、目、鼻、口などの
顔器官の位置情報を利用した様々な技術が開発されてい
る。例えば、個人識別技術や顔の向きを判定する技術等
が挙げられる。
2. Description of the Related Art Various techniques have been developed which use positional information of facial organs such as eyes, nose, mouth, etc. obtained from a face image. For example, there are a personal identification technique and a technique for determining the direction of a face.

【0003】このような顔画像に関する技術としては、
例えば、 文献:「分散型2次元見え方モデルに基づく顔画像解
析」電子情報通信学会論文誌 D−II Vol.J77
−D−II No.12 PP.2342〜2352,1994.12等に示
されるものがあった。
[0003] Techniques for such face images include:
For example, literature: “Face image analysis based on distributed two-dimensional appearance model” IEICE Transactions D-II Vol. J77
-D-II No. 12 PP. 2342-2352, 1994.12.

【0004】上記文献では(p2344,右、下から9行目
〜)、顔器官を検出する方法として、各器官を代表する
画像(テンプレート)を予め作成し、入力画像中で最も
テンプレートにマッチする領域を見つけ出す方法を用い
ている。顔器官のテンプレートは予め数名の顔画像を撮
影し、顔器官領域を切り出して、位置と輝度に関する正
規化の後、各画素毎に平均を行って作成している。
In the above document (p2344, right, ninth line from the bottom), as a method for detecting a face organ, an image (template) representing each organ is created in advance, and the input image matches the template most. It uses a method to find the area. The face organ template is created by photographing several face images in advance, cutting out the face organ region, normalizing the position and luminance, and averaging each pixel.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記の
ような従来技術では、照明(色、明暗、位置)条件がテ
ンプレートを作成した時と異なった場合には、人の肌の
色や輝度が変化するため、テンプレートマッチングによ
る位置検出が失敗する場合があった。同様に、肌の色は
個人差もあり、更に化粧や日焼け、人種の違い等でも変
化してしまう。
However, in the prior art described above, if the illumination (color, lightness, darkness, position) conditions are different from those at the time of creating the template, the color and brightness of the human skin change. Therefore, position detection by template matching may fail. Similarly, the skin color varies depending on the individual, and also changes due to makeup, sunburn, race, and the like.

【0006】そのため、従来では、肌の色の変化に対応
するためには、肌の色の異なるテンプレートを複数用意
する必要があり、マッチングの性能を上げるためには、
テンプレートの記憶容量が増加し、更に処理量も増大す
るという問題点があった。
Therefore, conventionally, it is necessary to prepare a plurality of templates having different skin colors in order to cope with a change in skin color, and to improve matching performance,
There is a problem that the storage capacity of the template increases and the processing amount also increases.

【0007】このような点から、肌の色や照明条件の変
化の影響を受けにくい高性能な顔器官検出装置を実現す
ることが望まれていた。
[0007] From such a point, it has been desired to realize a high-performance face organ detecting apparatus which is hardly affected by changes in skin color and lighting conditions.

【0008】[0008]

【課題を解決するための手段】本発明は、前述の課題を
解決するため次の構成を採用する。 〈構成1〉入力された顔画像から顔の中心線を算出する
中心線算出手段と、中心線算出手段が算出した顔の中心
線に基づいて、入力された顔画像から顔の肌の色を推定
する顔色推定手段と、顔器官のテンプレートの生成規則
を記憶するテンプレート作成用辞書と、テンプレート作
成用辞書に記憶されている生成規則に対して、顔色推定
手段が推定した顔色を適用して顔器官のテンプレートを
作成するテンプレート作成手段と、テンプレート作成手
段で作成したテンプレートと、入力された顔画像の画像
中の領域とを比較して、最もテンプレートとの類似度が
高い領域を入力画像中から見つけることにより、顔器官
の位置検出を行うマッチング手段とを備えたことを特徴
とする顔器官検出装置。
The present invention employs the following structure to solve the above-mentioned problems. <Structure 1> A center line calculating unit that calculates the center line of the face from the input face image, and a skin color of the face is calculated from the input face image based on the center line of the face calculated by the center line calculating unit. A face color estimating means for estimating, a template creation dictionary for storing rules for generating facial organ templates, and a face color estimated by the face color estimating means applied to the generation rules stored in the template creation dictionary. A template creating unit that creates a template of an organ, a template created by the template creating unit, and a region in the image of the input face image are compared, and a region having the highest similarity with the template is extracted from the input image. A matching means for detecting the position of the face organ by finding the face organ.

【0009】〈構成2〉構成1に記載の顔器官検出装置
において、中心線算出手段は、顔の左右の対称性に基づ
いて中心線を算出することを特徴とする顔器官検出装
置。
<Structure 2> In the face organ detecting apparatus according to Structure 1, the center line calculating means calculates the center line based on the left-right symmetry of the face.

【0010】〈構成3〉構成1または2に記載の顔器官
検出装置において、マッチング手段は、中心線算出手段
の算出した顔の中心線情報に基づいて探索範囲を限定す
ることを特徴とする顔器官検出装置。
<Structure 3> In the face organ detecting apparatus according to structure 1 or 2, the matching means limits the search range based on the center line information of the face calculated by the center line calculating means. Organ detection device.

【0011】[0011]

【発明の実施の形態】本発明は、入力画像から顔の肌の
色を推定し、推定した肌色に基づいてテンプレートを作
成する。そして、このようにして作成したテンプレート
を用いてテンプレートマッチングを行う。従って、肌の
色の変化による性能低下を防ぐことが可能である。以
下、このような本発明の実施の形態を具体例を用いて詳
細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention estimates the skin color of a face from an input image and creates a template based on the estimated skin color. Then, template matching is performed using the template created in this way. Therefore, it is possible to prevent performance degradation due to a change in skin color. Hereinafter, embodiments of the present invention will be described in detail using specific examples.

【0012】《具体例》 〈構成〉図1は本発明の顔器官検出装置の具体例を示す
構成図である。図の装置は、画像記憶手段1、中心線算
出手段2、顔色推定手段3、テンプレート作成用辞書
4、テンプレート作成手段5、テンプレート記憶手段
6、マッチング手段7からなる。
<Specific Example><Configuration> FIG. 1 is a configuration diagram showing a specific example of a face organ detecting apparatus according to the present invention. The apparatus shown in the figure comprises an image storage unit 1, a center line calculation unit 2, a face color estimation unit 3, a template creation dictionary 4, a template creation unit 5, a template storage unit 6, and a matching unit 7.

【0013】画像記憶手段1は、顔画像を記憶する手段
である。顔画像の入力は、ビデオやVTR等の画像入力
装置から得られた信号をA/D変換する構成、あるいは
ネットワーク等を介して画像データを得る構成となって
いる。この画像記憶手段1は、半導体メモリや磁気ディ
スク等の補助記憶装置から構成されている。
The image storage means 1 is a means for storing a face image. The input of a face image is configured to A / D convert a signal obtained from an image input device such as a video or VTR, or to obtain image data via a network or the like. This image storage means 1 is composed of an auxiliary storage device such as a semiconductor memory or a magnetic disk.

【0014】中心線算出手段2は、画像記憶手段1に記
憶された画像データに基づいて、顔の中心線を算出する
手段である。顔色推定手段3は、中心線算出手段2が算
出した顔の中心線上の画素値に基づいて、入力画像中の
顔の色を推定する機能を有している。
The center line calculating means 2 is a means for calculating the center line of the face based on the image data stored in the image storing means 1. The face color estimating means 3 has a function of estimating the color of the face in the input image based on the pixel values on the center line of the face calculated by the center line calculating means 2.

【0015】テンプレート作成用辞書4は、顔器官のテ
ンプレートの生成規則を記憶しているテンプレート格納
部であり、半導体メモリや磁気ディスク等の補助記憶装
置から構成されている。テンプレート作成手段5は、テ
ンプレート作成用辞書4に記憶されている生成規則に対
して、顔色推定手段3が推定した顔色を適用して顔器官
のテンプレートを作成する機能を有している。また、テ
ンプレート記憶手段6は、このテンプレート作成手段5
が生成したテンプレートを記憶する手段であり、半導体
メモリや磁気ディスク等の補助記憶装置から構成されて
いる。
The template creation dictionary 4 is a template storage unit that stores rules for generating facial organ templates, and is composed of an auxiliary storage device such as a semiconductor memory or a magnetic disk. The template creating means 5 has a function of creating a face organ template by applying the face color estimated by the face color estimating means 3 to the generation rules stored in the template creating dictionary 4. The template storage means 6 stores the template creation means 5
Is a means for storing the generated template, and comprises an auxiliary storage device such as a semiconductor memory or a magnetic disk.

【0016】マッチング手段7は、テンプレート作成手
段5で作成したテンプレートと、画像記憶手段1に記憶
されている入力画像中の領域とを比較して、最もテンプ
レートとの類似度が高い領域を入力画像中から見つける
ことにより、顔器官の位置検出を行う機能を有してい
る。
The matching unit 7 compares the template created by the template creating unit 5 with an area in the input image stored in the image storage unit 1 and determines an area having the highest similarity with the template in the input image. It has the function of detecting the position of the face organ by finding it from inside.

【0017】尚、上記の中心線算出手段2、顔色推定手
段3、テンプレート作成手段5およびマッチング手段7
は、各機能に対応したプログラムと、これを実行するマ
イクロプロセッサによって実現されるか、あるいは専用
演算ハードウェアによって構成されている。
The above-mentioned center line calculating means 2, face color estimating means 3, template creating means 5, and matching means 7
Is realized by a program corresponding to each function and a microprocessor that executes the program, or is configured by dedicated arithmetic hardware.

【0018】〈動作〉以下、各機能部毎にその動作を説
明する。 [画像記憶手段1の動作]先ず、画像記憶手段1に記憶
された入力画像の幅と高さをW,Hとする(但し、画像
の左上を(0,0)、右下を(W,H)とする)。ま
た、座標(X,Y)に位置する画素の赤、緑、青成分は
R(X,Y)、G(X,Y)、B(X,Y)という変数
名で表す。尚、画像記憶手段1で記憶されたR,G,B
の値は、中心線算出手段2、顔色推定手段3、マッチン
グ手段7で使用される。
<Operation> The operation of each functional unit will be described below. [Operation of Image Storage Unit 1] First, the width and height of the input image stored in the image storage unit 1 are W and H (however, the upper left of the image is (0, 0) and the lower right is (W, H)). The red, green, and blue components of the pixel located at the coordinates (X, Y) are represented by variable names R (X, Y), G (X, Y), and B (X, Y). The R, G, B stored in the image storage unit 1
Is used by the center line calculating means 2, the face color estimating means 3, and the matching means 7.

【0019】[中心線算出手段2の動作]中心線算出手
段2は、画像記憶手段1に記憶されたデータに基づい
て、顔の中心線を算出する処理を行う。本処理では入力
画像の中で最も左右の対称性が高いX座標を求める。
[Operation of Center Line Calculating Unit 2] The center line calculating unit 2 performs a process of calculating the center line of the face based on the data stored in the image storage unit 1. In this processing, the X coordinate having the highest left-right symmetry in the input image is obtained.

【0020】図2は、中心線算出処理の説明図である。
中心線算出手段2は、図2の太線で示すように、入力画
像に対して、X=aという直線を設定し、この直線を中
心にして幅(CH×2)の矩形を考える。この矩形内
で、X=aに対して線対称な画素の、画素値同士のRG
B空間内での距離を求め、その距離の総和(dist)をX
=aにおける対称性の目安とする。そして、このような
処理をXの値をCHから(W−CH)まで変化させ、di
stが最小値を示すXを求める(図示例では、X=KXが
結果となる)。また、領域の幅を示すCHの値は(W/
2)よりも小さい値を設定し、この値は、入力画像に写
っている顔の大きさや位置により適宜決定する。
FIG. 2 is an explanatory diagram of the center line calculating process.
The center line calculating means 2 sets a straight line of X = a with respect to the input image as shown by a thick line in FIG. 2, and considers a rectangle having a width (CH × 2) around the straight line. Within this rectangle, the RG of the pixel values of the pixels line-symmetric with respect to X = a
Find the distance in B space, and sum the distance (dist) to X
= A is a measure of symmetry at a. Then, such processing is performed by changing the value of X from CH to (W-CH), and
X in which st indicates the minimum value is obtained (in the illustrated example, X = KX is the result). The value of CH indicating the width of the region is (W /
A value smaller than 2) is set, and this value is appropriately determined according to the size and position of the face shown in the input image.

【0021】次に、中心線算出手段2の動作をフローチ
ャートに沿って更に説明する。図3は、中心線算出手段
2の動作フローチャートである。先ず、図2で示したよ
うに、入力画像の幅をW、高さをHとする。よって、X
座標およびY座標の範囲はそれぞれ0≦X≦W、0≦Y
≦Hである。
Next, the operation of the center line calculating means 2 will be further described with reference to a flowchart. FIG. 3 is an operation flowchart of the center line calculating means 2. First, as shown in FIG. 2, the width of the input image is W and the height is H. Therefore, X
The range of the coordinate and the Y coordinate is 0 ≦ X ≦ W and 0 ≦ Y, respectively.
.Ltoreq.H.

【0022】最初に、ステップS101において、X座
標を初期化(X=CH)する。次に、ステップS102
において、Y座標の初期化を行い(Y=0)、かつ、左
右対称性の計算結果を記憶する変数distの初期化も行う
(dist=0)。
First, in step S101, the X coordinate is initialized (X = CH). Next, step S102
In, the Y coordinate is initialized (Y = 0), and the variable dist that stores the calculation result of the left-right symmetry is also initialized (dist = 0).

【0023】次にステップS103において、中心線と
の(X方向の)距離を表す変数iを初期化する(i=
1)。そして、ステップS104では、中心線に対して
線対称な座標(但し、中心線との距離をiとする)を求
める。ここで、求めた座標値をそれぞれX0、X1とす
る。ステップS105では、座標(X0,Y)に位置す
る画素と、座標(X1,Y)に位置する画素がどれぐら
い似通っているかを距離計算により求める。即ち、この
ステップS105では、それぞれの座標における赤、
緑、青成分の値の差分の2乗を加算し、平方根をとって
いる。ここで求めた距離はdistに加算する。
Next, in step S103, a variable i representing the distance (in the X direction) from the center line is initialized (i =
1). In step S104, coordinates that are line-symmetric with respect to the center line (where i is the distance from the center line) are obtained. Here, the obtained coordinate values are assumed to be X0 and X1, respectively. In step S105, how similar the pixel located at the coordinates (X0, Y) and the pixel located at the coordinates (X1, Y) are obtained by distance calculation. That is, in this step S105, red at each coordinate,
The square of the difference between the values of the green and blue components is added to take the square root. The distance obtained here is added to dist.

【0024】ステップS106ではiの値を更新する
(i=i+1)。次のステップS107では、iがCH
を超えたかを判定する。もしiがCHを超えていない場
合には、ステップS104に戻る。また、ステップS1
07で、iがCHを超えた場合はステップS108に処
理を移す。
In step S106, the value of i is updated (i = i + 1). In the next step S107, i is CH
Is determined. If i does not exceed CH, the process returns to step S104. Step S1
At 07, when i exceeds CH, the process proceeds to step S108.

【0025】ステップS108ではYの値を更新する
(Y=Y+1)。そして、ステップS109ではYがH
を超えたかを判定する。このステップS109で、Yが
Hを超えていない場合には、ステップS103に戻り、
YがHを超えた場合はステップS110に処理を移す。
このように、上記のステップS102〜ステップS10
9の一連の処理により、左右対称性distが求まる。即
ち、distが小さいほど左右対称性が高い。
In step S108, the value of Y is updated (Y = Y + 1). Then, in step S109, Y is H
Is determined. If Y does not exceed H in step S109, the process returns to step S103,
If Y exceeds H, the process proceeds to step S110.
Thus, the above-described steps S102 to S10
By the series of processing of No. 9, the left-right symmetry dist is obtained. That is, the smaller dist is, the higher the left-right symmetry is.

【0026】次に、ステップS110では、求めたdist
が、それ以前に求めたdistの中で最も小さい値かを判定
する。もし、最小値であった場合にはステップS111
において現在のXを記憶する(KX=X)。一方、その
distが最小値でなかった場合には、ステップS112に
処理を移す。ステップS112ではXの更新を行う(X
=X+1)。
Next, in step S110, the obtained dist is determined.
Is the smallest value among dist obtained before that. If it is the minimum value, step S111
Store the current X (KX = X). Meanwhile,
If dist is not the minimum value, the process moves to step S112. In step S112, X is updated (X
= X + 1).

【0027】そして、ステップS113において、Xが
(W−CH)を超えたかを判定する。もし超えていない
場合には、ステップS102に戻る。ここで、Xが(W
−CH)を超えた場合にはステップS114に処理を移
す。ステップS114では本処理の結果としてKXの値
を出力する。即ち、X=KXが顔の中心線となる。
Then, in step S113, it is determined whether X has exceeded (W-CH). If not, the process returns to step S102. Here, X is (W
If (−CH) is exceeded, the process proceeds to step S114. In step S114, the value of KX is output as a result of this processing. That is, X = KX is the center line of the face.

【0028】このように、中心線算出手段2は、顔の左
右の対称性に基づいて中心線を算出するようにしたの
で、例えば、まばたき等により目が閉じている場合やサ
ングラスをかけている場合であっても顔の中心線を正確
に決定することができる。
As described above, the center line calculating means 2 calculates the center line based on the symmetry of the face in the left and right directions. For example, when the eyes are closed due to blinking or when wearing sunglasses. Even in this case, the center line of the face can be accurately determined.

【0029】[顔色推定手段3の動作]顔色推定手段3
は、中心線算出手段2が算出した顔の中心線上の画素値
に基づいて入力画像中の顔の色を推定する。本具体例で
は、中心線上の予め決められた範囲の画素値の平均によ
り顔の色を求めている。
[Operation of Facial Color Estimating Means 3]
Estimates the color of the face in the input image based on the pixel values on the center line of the face calculated by the center line calculating means 2. In this specific example, the face color is determined by averaging the pixel values in a predetermined range on the center line.

【0030】図4は顔色推定手段3の処理説明図であ
る。図4に示すように、本具体例では、中心線算出手段
2により求めた顔の中心線X=KX上の、Y=startY
〜endYの範囲の画素を利用する。但し、startY,end
Yの値は、入力画像中の顔の大きさや位置等に応じて適
宜決定するものとする。以下、顔色推定手段3の動作を
フローチャートに沿って更に説明する。
FIG. 4 is an explanatory diagram of the processing of the face color estimating means 3. As shown in FIG. 4, in this specific example, Y = startY on the center line X = KX of the face obtained by the center line calculating means 2.
Pixels in the range of ~ endY are used. However, startY, end
The value of Y is determined as appropriate according to the size and position of the face in the input image. Hereinafter, the operation of the face color estimating means 3 will be further described with reference to a flowchart.

【0031】図5は、顔色推定手段3の処理フローチャ
ートである。先ず、画素値の合計を記憶する変数total
R、totalG、totalB、Nを初期化する(ステップS2
01)。尚、Nは画素数である。そして、YをstartY
に設定し(ステップS202)、画素値の合計を記憶す
る変数totalR、totalG、totalBにそれぞれ、画素値
R(KX,Y)、G(KX、Y)、B(KX,Y)の値
を加算し、画素値Nを+1する(ステップS203)。
FIG. 5 is a processing flowchart of the face color estimating means 3. First, a variable total that stores the sum of pixel values
Initialize R, totalG, totalB, and N (step S2)
01). Note that N is the number of pixels. And Y is startY
(Step S202), and add the values of the pixel values R (KX, Y), G (KX, Y), and B (KX, Y) to the variables totalR, totalG, and totalB for storing the sum of the pixel values, respectively. Then, the pixel value N is incremented by 1 (step S203).

【0032】そして、Yの値を+1して(ステップS2
04)、ステップS203、S204の処理を、ステッ
プS205においてY>endYの条件を満たすまで繰り
返す。即ち、ステップS202〜ステップS205で
は、中心線上で予め設定した範囲の画素値の合計を求め
る。合計の値は、赤、緑、青それぞれtotalR、total
G、totalBに記憶される。また、画素の数はNに記憶
される。
Then, the value of Y is incremented by 1 (step S2).
04), the processes of steps S203 and S204 are repeated until the condition of Y> endY is satisfied in step S205. That is, in steps S202 to S205, the sum of pixel values in a predetermined range on the center line is obtained. The total value is totalR, total for red, green, and blue respectively.
G and totalB are stored. The number of pixels is stored in N.

【0033】ステップS205において、Y>endYの
条件を満たした場合は、画素値の合計の値totalR、tot
alG、totalBをそれぞれ画素の数Nで除算し、推定し
た顔の色とする(ステップS206)。推定した顔の色
は赤、緑、青それぞれfaceR、faceG、faceBに記憶さ
れる。
In step S205, if the condition of Y> endY is satisfied, the total value of the pixel values totalR, tot
alG and totalB are each divided by the number N of pixels to obtain the estimated face color (step S206). The estimated face colors are stored in faceR, faceG, and faceB, respectively, for red, green, and blue.

【0034】[テンプレート作成用辞書4の説明]図6
は、テンプレート作成用辞書4の一例を示す説明図であ
る。図中、(a)に示すTDIC(x,y)は、テンプ
レート内の各画素の属性を示すものである。本具体例で
は、目のテンプレートであるから、0=肌、1=瞳、2
=白目と定義している。更に、それぞれの番号が何色な
のかを定義する色定義テーブルが、図中の(b)に示す
よう構成されている。本具体例では、番号0は顔色推定
手段3が推定した色、番号1は予め設定した色(dicR
[1],dicG[1],dicB[1])であり、番号2
は、予め設定した(dicR[2],dicG[2],dicB
[2])を利用するよう定義している。尚、本具体例で
は、各番号に対して一つの色を割り当てているが、利用
する環境に応じて複数の色を割り当てることも考えられ
る。
[Explanation of Template Creation Dictionary 4] FIG.
FIG. 4 is an explanatory diagram illustrating an example of the template creation dictionary 4. In the figure, TDIC (x, y) shown in (a) indicates the attribute of each pixel in the template. In this specific example, since it is an eye template, 0 = skin, 1 = pupil, 2
= Defined as white eye. Further, a color definition table for defining what color each number has is configured as shown in FIG. In this specific example, the number 0 is the color estimated by the face color estimating means 3, and the number 1 is a preset color (dicR
[1], dicG [1], dicB [1]), and number 2
Are preset (dicR [2], dicG [2], dicB
[2]) is defined. In this specific example, one color is assigned to each number, but a plurality of colors may be assigned according to the environment to be used.

【0035】[テンプレート作成手段5の動作]テンプ
レート作成手段5は、テンプレート作成用辞書4および
顔色推定手段3で推定した顔の色情報を用いて、テンプ
レートマッチング用のテンプレートを作成する。作成し
たテンプレートはTR(x,y)、TG(x,y)、T
B(x,y)に記憶するものとする。
[Operation of Template Creation Unit 5] The template creation unit 5 creates a template for template matching using the template creation dictionary 4 and the face color information estimated by the face color estimation unit 3. The created templates are TR (x, y), TG (x, y), T
B (x, y).

【0036】図7は、テンプレート作成手段5の動作フ
ローチャートである。先ず、Yの値とXの値を初期化し
(ステップS301、S302)、属性辞書TDIC
(x,y)の値をチェックする(ステップS303)。
ステップS303において、属性辞書TDIC(x,
y)が0の場合、テンプレート中の座標(x,y)の画
素値には顔色推定手段3の推定した顔の色(faceR,fa
ceG,faceB)を代入する(ステップS305)。一
方、ステップS303において、属性辞書TDIC
(x,y)の値が0でない場合は、色定義テーブルに定
義された色(dicR[no],dicG[no],dicB[n
o])を参照して画素値として代入する(ステップS3
04)。これらの処理を、幅TW、高さTHのテンプレ
ート内の全ての画素について行って処理を終了する。
FIG. 7 is an operation flowchart of the template creating means 5. First, the values of Y and X are initialized (steps S301 and S302), and the attribute dictionary TDIC is set.
The value of (x, y) is checked (step S303).
In step S303, the attribute dictionary TDIC (x,
When y) is 0, the pixel value of the coordinates (x, y) in the template includes the face color (faceR, fa) estimated by the face color estimating means 3.
ceG, faceB) (step S305). On the other hand, in step S303, the attribute dictionary TDIC
If the value of (x, y) is not 0, the colors (dicR [no], dicG [no], dicB [n
o]) and assigning it as a pixel value (step S3)
04). These processes are performed for all the pixels in the template having the width TW and the height TH, and the process ends.

【0037】即ち、ステップS306においてXの値を
+1し、ステップS307でXの値がテンプレートの幅
TW以上であるかを調べ、X<TWであった場合はステ
ップS303に戻る。一方、X≧TWであった場合は、
Xの値を+1する(ステップS308)。そして、ステ
ップS309でYの値がテンプレートの高さTH以上で
あるかを調べ、Y<THであった場合はステップS30
2に戻り、Y≧THであった場合は、テンプレート作成
処理を終了する。
That is, the value of X is incremented by 1 in step S306, and it is checked in step S307 whether the value of X is equal to or larger than the width TW of the template. If X <TW, the process returns to step S303. On the other hand, if X ≧ TW,
The value of X is incremented by 1 (step S308). Then, it is checked in step S309 whether the value of Y is equal to or greater than the height TH of the template, and if Y <TH, step S30
Returning to step 2, if Y ≧ TH, the template creation processing ends.

【0038】[テンプレート記憶手段6の処理]テンプ
レート記憶手段6はテンプレート作成手段5が生成した
テンプレートの赤成分TR(x,y)、緑成分TG
(x,y)、青成分TB(x,y)をそれぞれ記憶す
る。
[Processing of Template Storage Unit 6] The template storage unit 6 stores the red component TR (x, y) and the green component TG of the template generated by the template creation unit 5.
(X, y) and a blue component TB (x, y) are stored.

【0039】[マッチング手段7の処理]マッチング手
段7はテンプレート記憶手段6に記憶されたテンプレー
トと最もマッチする入力画像中の領域を見つけ出す処理
である。但し、カメラと顔との距離が変動するため、テ
ンプレートを予め定めた範囲で拡大縮小してマッチング
を行う。更に、処理量を軽減するため、顔の中心線を基
準にして探索範囲を制限している。
[Processing of Matching Means 7] The matching means 7 is a processing for finding a region in the input image that matches the template stored in the template storage means 6 most. However, since the distance between the camera and the face fluctuates, matching is performed by enlarging or reducing the template within a predetermined range. Further, in order to reduce the processing amount, the search range is limited based on the center line of the face.

【0040】図8は、マッチング手段7の探索範囲の説
明図である。図示のように、本具体例では、探索の範囲
のX座標を(KX+SX)〜(KX+EX)に制限して
いる。ここで、KXは中心線算出手段2が算出した顔の
中心線のX座標、SX,EXは探索範囲を決定するパラ
メータである。また、Y方向の探索範囲はSY〜EYで
表している。これらのSX,EX,SY,EYの値は、
入力画像の大きさや探索する顔器官の種類などの利用環
境に応じて適宜決定する。
FIG. 8 is an explanatory diagram of the search range of the matching means 7. As shown, in this specific example, the X coordinate of the search range is limited to (KX + SX) to (KX + EX). Here, KX is the X coordinate of the center line of the face calculated by the center line calculation means 2, and SX and EX are parameters for determining the search range. The search range in the Y direction is represented by SY to EY. These values of SX, EX, SY, EY are
It is appropriately determined according to the use environment such as the size of the input image and the type of the face organ to be searched.

【0041】次に、フローチャートを用いて更に説明す
る。図9および図10は、マッチング手段7の処理フロ
ーチャート(その1、その2)である。
Next, further explanation will be given using a flowchart. FIG. 9 and FIG. 10 are processing flowcharts (No. 1 and No. 2) of the matching means 7.

【0042】図9に示すステップS401〜ステップS
409は、探索する座標(x,y)および拡大縮小率Z
を予め定めた範囲で変化させる処理である。本具体例で
は、X=(KX+SX)〜(KX+EX)(刻み幅step
X)、Y=SY〜EY(刻み幅stepY)、Z=startZ
〜endZ(刻み幅stepZ)として処理を行っている。ま
た、図10に示すステップS501〜ステップS511
では、実際にテンプレートマッチングを行う処理であ
る。
Steps S401 to S401 shown in FIG.
409 is a coordinate (x, y) to be searched and a scaling ratio Z
Is changed within a predetermined range. In this specific example, X = (KX + SX) to (KX + EX) (step width step
X), Y = SY to EY (step width stepY), Z = startZ
The processing is performed as 〜endZ (step width stepZ). Steps S501 to S511 shown in FIG.
Here is the process of actually performing template matching.

【0043】先ず、Yの値、Xの値および拡大縮小率Z
を初期値とする(ステップS401、S402、S40
3)。そして、マッチング時の画素値同士のRGB空間
での距離の総和distの初期化(ステップS501)、テ
ンプレート内の座標NおよびMの初期化(ステップS5
02、S503)を行って、テンプレート内の座標
(M,N)を入力画像中での座標(X1,Y1)に変換
する(ステップS504)。
First, the value of Y, the value of X, and the scaling factor Z
As initial values (steps S401, S402, S40
3). Then, the sum dist of the distances in the RGB space between the pixel values at the time of matching is initialized (step S501), and the coordinates N and M in the template are initialized (step S5).
02, S503) to convert the coordinates (M, N) in the template into the coordinates (X1, Y1) in the input image (step S504).

【0044】次に、テンプレートの座標(M,N)の画
素のRGB値TR(M,N)、TG(M,N)、TB
(M,N)と、入力画像中の座標(X1,Y1)の画素
のRGB値R(X1,Y1)、G(X1,Y1)、B
(X1,Y1)とのRGB空間内での距離を求め、その
距離をdistに加算する(ステップS505)。
Next, the RGB values TR (M, N), TG (M, N), TB of the pixel at the coordinates (M, N) of the template
(M, N) and RGB values R (X1, Y1), G (X1, Y1), B of a pixel at coordinates (X1, Y1) in the input image
The distance to (X1, Y1) in the RGB space is obtained, and the distance is added to dist (step S505).

【0045】これらの処理をテンプレートの全ての画素
について求めてdistに加算する。そして、全ての画素に
ついて処理が終了したら、distがこれまでの最小値かを
判断する。即ち、ステップS506においてテンプレー
トの内の座標Mを+1し、ステップS507でMの値が
テンプレートの幅TW以上であるかを調べ、M<TWで
あった場合はステップS504に戻る。一方、M≧TW
であった場合は、Nの値を+1する(ステップS50
8)。そして、ステップS509でNの値がテンプレー
トの高さTH以上であるかを調べ、N<THであった場
合はステップS503に戻り、Y≧THであった場合
は、distがこれまでの最小値かを判断する(ステップS
510)。
These processes are obtained for all the pixels of the template and are added to dist. When the processing is completed for all pixels, it is determined whether dist is the minimum value so far. That is, in step S506, the coordinate M in the template is incremented by 1, and it is checked in step S507 whether the value of M is equal to or larger than the template width TW. If M <TW, the process returns to step S504. On the other hand, M ≧ TW
, The value of N is incremented by 1 (step S50).
8). In step S509, it is checked whether the value of N is equal to or greater than the height TH of the template. If N <TH, the process returns to step S503. If Y ≧ TH, dist is the minimum value so far. (Step S
510).

【0046】ここで、もし、distが最小値でない場合は
何も処理を行わない。それに対して、distが最小値であ
る場合は、その時のX,Y,ZをkeepX,keepY,keep
Zに代入する。これらの処理を設定した探索範囲に対し
て行って処理が終了した時点のkeepX,keepY,keepZ
が探索結果となる。
Here, if dist is not the minimum value, no processing is performed. On the other hand, when dist is the minimum value, X, Y and Z at that time are kept X, keepY and keep
Substitute Z. KeepX, keepY, keepZ at the time when these processes are performed on the set search range and the processes are completed.
Is the search result.

【0047】このようなステップS501〜ステップS
511の処理を、拡大縮小率Zの値を刻み幅stepZでen
dZの値になるまで変化させ(ステップS404、S4
05)、また、Xの値を刻み幅stepXで(KX+EX)
になるまで変化させ(ステップS406、S407)、
更に、Yの値を刻み幅stepYでEYになるまで変化させ
る(ステップS408、S409)。そして、全ての処
理が終了した時点のkeepX,keepY,keepZが探索結果
となる。
Steps S501 to S
The process of 511 is performed by enlarging the value of the enlargement / reduction ratio Z by the step width stepZ.
It is changed until it reaches the value of dZ (steps S404, S4
05) Also, the value of X is calculated by the step size stepX (KX + EX).
(Steps S406 and S407),
Further, the value of Y is changed in steps of step Y until EY is reached (steps S408 and S409). Then, keepX, keepY, and keepZ at the time when all processes are completed are search results.

【0048】つまり、テンプレートの左上を入力画像の
座標(keepX,keepY)に合わせて、更にテンプレート
をkeepZ倍拡大縮小した場合にテンプレートが最もマッ
チすることになる。
In other words, when the upper left corner of the template is adjusted to the coordinates (keepX, keepY) of the input image and the template is further scaled up and down by keepZ, the template is most matched.

【0049】〈効果〉以上のように本具体例によれば、
入力画像を用いて顔の色を推定し、推定した顔の色を用
いてテンプレートを作成するようにしたので、照明の変
化や人種等の肌の色の変化の影響を受けにくい高性能な
顔器官検出装置を得ることができる。
<Effects> As described above, according to this example,
Since the face color is estimated using the input image and the template is created using the estimated face color, a high-performance model that is not easily affected by changes in lighting or skin color such as race. A facial organ detection device can be obtained.

【0050】更に、マッチング手段では顔の中心線を基
準にして探索範囲を制限できるので処理量の削減が期待
できる。
Further, since the matching means can limit the search range based on the center line of the face, a reduction in the processing amount can be expected.

【0051】尚、上記具体例では、テンプレートの一例
として目の場合を説明したが、これに限定されるもので
はなく、口や鼻等、顔器官であれば同様に適用可能であ
る。また、顔色推定手段3では中心線上の直線を探査し
て顔の色を推定したが、X方向に幅を持たせて直線では
なく領域を仮定して顔の色を推定するようにしてもよ
い。
In the above-described specific example, the case of the eye is described as an example of the template. However, the present invention is not limited to this, and the present invention can be similarly applied to a facial organ such as a mouth and a nose. Further, the face color estimating means 3 estimates the face color by searching for a straight line on the center line. However, the face color may be estimated by giving a width in the X direction and assuming an area instead of a straight line. .

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の顔器官検出装置の具体例を示す構成図
である。
FIG. 1 is a configuration diagram showing a specific example of a face organ detection device of the present invention.

【図2】本発明の顔器官検出装置における中心線算出処
理の説明図である。
FIG. 2 is an explanatory diagram of a center line calculation process in the face organ detection device of the present invention.

【図3】本発明の顔器官検出装置における中心線算出手
段の動作フローチャートである。
FIG. 3 is an operation flowchart of a center line calculation unit in the face organ detection device of the present invention.

【図4】本発明の顔器官検出装置における顔色推定手段
の処理説明図である。
FIG. 4 is an explanatory diagram of processing of a face color estimating means in the facial organ detecting device of the present invention.

【図5】本発明の顔器官検出装置における顔色推定手段
の動作フローチャートである。
FIG. 5 is an operation flowchart of a face color estimating means in the face organ detecting device of the present invention.

【図6】本発明の顔器官検出装置におけるテンプレート
作成用辞書の一例を示す説明図である。
FIG. 6 is an explanatory diagram showing an example of a template creation dictionary in the facial organ detection device of the present invention.

【図7】本発明の顔器官検出装置におけるテンプレート
作成手段の動作フローチャートである。
FIG. 7 is an operation flowchart of a template creating unit in the facial organ detection device of the present invention.

【図8】本発明の顔器官検出装置におけるマッチング手
段の探索範囲の説明図である。
FIG. 8 is an explanatory diagram of a search range of a matching unit in the face organ detection device of the present invention.

【図9】本発明の顔器官検出装置におけるマッチング手
段の動作フローチャート(その1)である。
FIG. 9 is an operation flowchart (part 1) of the matching means in the facial organ detection device of the present invention.

【図10】本発明の顔器官検出装置におけるマッチング
手段の動作フローチャート(その2)である。
FIG. 10 is an operation flowchart (part 2) of the matching means in the facial organ detection device of the present invention.

【符号の説明】[Explanation of symbols]

2 中心線算出手段 3 顔色推定手段 4 テンプレート作成用辞書 5 テンプレート作成手段 7 マッチング手段 2 center line calculation means 3 face color estimation means 4 template creation dictionary 5 template creation means 7 matching means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 入力された顔画像から顔の中心線を算出
する中心線算出手段と、 前記中心線算出手段が算出した顔の中心線に基づいて、
入力された顔画像から顔の肌の色を推定する顔色推定手
段と、 顔器官のテンプレートの生成規則を記憶するテンプレー
ト作成用辞書と、 前記テンプレート作成用辞書に記憶されている生成規則
に対して、前記顔色推定手段が推定した顔色を適用して
顔器官のテンプレートを作成するテンプレート作成手段
と、 前記テンプレート作成手段で作成したテンプレートと、
入力された顔画像の画像中の領域とを比較して、最も当
該テンプレートとの類似度が高い領域を前記入力画像中
から見つけることにより、顔器官の位置検出を行うマッ
チング手段とを備えたことを特徴とする顔器官検出装
置。
1. A center line calculating unit that calculates a center line of a face from an input face image, and a center line of the face calculated by the center line calculating unit.
A face color estimating unit for estimating a skin color of a face from an input face image; a template creating dictionary for storing a face organ template creating rule; and a generating rule stored in the template creating dictionary. A template creating unit that creates a facial organ template by applying the face color estimated by the complexion estimating unit; and a template created by the template creating unit.
A matching unit that detects a position of a face organ by comparing a region in the image of the input face image with a region having the highest similarity to the template from the input image. A facial organ detection device characterized by the above-mentioned.
【請求項2】 請求項1に記載の顔器官検出装置におい
て、 中心線算出手段は、顔の左右の対称性に基づいて中心線
を算出することを特徴とする顔器官検出装置。
2. The face organ detecting apparatus according to claim 1, wherein the center line calculating means calculates the center line based on left-right symmetry of the face.
【請求項3】 請求項1または2に記載の顔器官検出装
置において、 マッチング手段は、中心線算出手段の算出した顔の中心
線情報に基づいて探索範囲を限定することを特徴とする
顔器官検出装置。
3. The face organ detecting apparatus according to claim 1, wherein the matching unit limits the search range based on the center line information of the face calculated by the center line calculating unit. Detection device.
JP11035182A 1999-02-15 1999-02-15 Facial organ detecting device Pending JP2000235640A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11035182A JP2000235640A (en) 1999-02-15 1999-02-15 Facial organ detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11035182A JP2000235640A (en) 1999-02-15 1999-02-15 Facial organ detecting device

Publications (1)

Publication Number Publication Date
JP2000235640A true JP2000235640A (en) 2000-08-29

Family

ID=12434717

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11035182A Pending JP2000235640A (en) 1999-02-15 1999-02-15 Facial organ detecting device

Country Status (1)

Country Link
JP (1) JP2000235640A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044837A (en) * 2001-07-30 2003-02-14 Digital Fashion Ltd Device for simulating makeup, method for controlling makeup simulation and computer-readable recording medium having makeup simulation program recorded thereon
CN1333370C (en) * 2003-06-18 2007-08-22 佳能株式会社 Image processing method and device
JP2010186274A (en) * 2009-02-10 2010-08-26 Secom Co Ltd Sunglasses wearing detection apparatus
JP2013058017A (en) * 2011-09-07 2013-03-28 Nippon Hoso Kyokai <Nhk> Specific area extraction device and specific area extraction program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044837A (en) * 2001-07-30 2003-02-14 Digital Fashion Ltd Device for simulating makeup, method for controlling makeup simulation and computer-readable recording medium having makeup simulation program recorded thereon
CN1333370C (en) * 2003-06-18 2007-08-22 佳能株式会社 Image processing method and device
JP2010186274A (en) * 2009-02-10 2010-08-26 Secom Co Ltd Sunglasses wearing detection apparatus
JP2013058017A (en) * 2011-09-07 2013-03-28 Nippon Hoso Kyokai <Nhk> Specific area extraction device and specific area extraction program

Similar Documents

Publication Publication Date Title
US11651797B2 (en) Real time video processing for changing proportions of an object in the video
US6879323B1 (en) Three-dimensional model generation device, three-dimensional model generation method, and recording medium for storing the three-dimensional model generation method
US8531484B2 (en) Method and device for generating morphing animation
US8331619B2 (en) Image processing apparatus and image processing method
KR100571115B1 (en) Method and system using a data-driven model for monocular face tracking
JP4234381B2 (en) Method and computer program product for locating facial features
WO2016011834A1 (en) Image processing method and system
US7369687B2 (en) Method for extracting face position, program for causing computer to execute the method for extracting face position and apparatus for extracting face position
CN109657583A (en) Face&#39;s critical point detection method, apparatus, computer equipment and storage medium
JP2000036052A (en) Robust tracking method for face of man when plural men exist
WO2012169251A1 (en) Image processing device, information generation device, image processing method, information generation method, control program, and recording medium
Wang et al. Automatic lip contour extraction from color images
CN107452049B (en) Three-dimensional head modeling method and device
US20190066311A1 (en) Object tracking
KR20060055064A (en) Method for tracking face based on template
US7492924B2 (en) Face tracking
WO2023273247A1 (en) Face image processing method and device, computer readable storage medium, terminal
JP2001250121A (en) Image recognition device and recording medium
JP2005071344A (en) Image processing method, image processor and recording medium recording image processing program
JP2000235640A (en) Facial organ detecting device
CN111488836A (en) Face contour correction method, device, equipment and storage medium
JPH10111946A (en) Image tracking device
US20220164963A1 (en) Information processing device, estimation method, and nontransitory computer readable medium
RU2295152C1 (en) Method for recognizing face of an individual on basis of video image
RU2703327C1 (en) Method of processing a two-dimensional image and a user computing device thereof