JP2004110543A - Face image processing unit and program - Google Patents

Face image processing unit and program Download PDF

Info

Publication number
JP2004110543A
JP2004110543A JP2002273689A JP2002273689A JP2004110543A JP 2004110543 A JP2004110543 A JP 2004110543A JP 2002273689 A JP2002273689 A JP 2002273689A JP 2002273689 A JP2002273689 A JP 2002273689A JP 2004110543 A JP2004110543 A JP 2004110543A
Authority
JP
Japan
Prior art keywords
center line
face
image
edge image
horizontal edge
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
JP2002273689A
Other languages
Japanese (ja)
Other versions
JP4172236B2 (en
Inventor
Michinori Ando
安藤 道則
Yoshiki Ninomiya
二宮 芳樹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Central R&D Labs Inc
Original Assignee
Toyota Central R&D Labs Inc
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 Toyota Central R&D Labs Inc filed Critical Toyota Central R&D Labs Inc
Priority to JP2002273689A priority Critical patent/JP4172236B2/en
Publication of JP2004110543A publication Critical patent/JP2004110543A/en
Application granted granted Critical
Publication of JP4172236B2 publication Critical patent/JP4172236B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a face image processing unit and program for accurately detecting the center line of the face even if light is not equally applied to the whole of the face. <P>SOLUTION: In the case of setting a window 20 at the left end of a cross edge image, the line bisecting the transverse segment of the window 20 is a straight line X=K. In the case where a horizontal edge point exists in both of coordinate positions line symmetrical with respect to the straight line, a preset point is added. The sum of points acquired by performing the operation for all of pixels in the window 20 expresses the degree of centerline-likeness of the straight line X=K. With the window 20 moved little by little rightward to the right end of the horizontal edge image, the score about the straight line determined by each window position is found. The straight line having the maximum score is selected as a centerline candidate of the face. When the score in the centerline candidate is larger than a preset threshold, the centerline candidate is determined to be the centerline. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、顔画像処理装置及びプログラムに関し、特に、横エッジ画像に基づいて顔の中心線を正確に検出することができる顔画像処理装置及びプログラムに関する。
【0002】
【従来の技術】
従来、入力された濃淡顔画像から、濃淡情報を利用し、顔の中心線を検出する方法が提案されている。この方法では、左右の画素の濃淡値が最も近い、即ち、対称性が高いことに基づいて中心線を算出している(特許文献1参照)。
【0003】
【特許文献1】
特開平9−171560号公報
【0004】
【発明が解決しようとする課題】
しかしながら、室内で顔画像を撮影する場合には、顔全体に均等に光が照射できるため、顔面の左右対称な点の濃淡値は近い値になるが、車室内環境を考えた場合には、顔全体に均等に光が照射されない場合が発生する。即ち、顔の側方から太陽光が当る場合には、太陽光が当る部分だけが明るくなる。従って、左右対称な座標点の濃淡値の差が大きくなり、顔の対称性の評価が正確に実行できない状況が発生する、という問題があった。
【0005】
本発明は上記問題を解決すべく成されたものであり、本発明の目的は、顔全体に均等に光が照射されない場合においても、顔の中心線を正確に検出することができる顔画像処理装置及びプログラムを提供することにある。
【0006】
【課題を解決するための手段】
上記目的を達成するために本発明の顔画像処理装置は、顔画像を入力する画像入力手段と、入力された顔画像から横エッジ画像を生成する横エッジ画像生成手段と、生成された横エッジ画像に基づいて顔の中心線を検出する中心線検出手段と、を備えたことを特徴としている。
【0007】
本発明の顔画像処理装置では、画像入力手段から顔画像が入力されると、横エッジ画像生成手段が、入力された顔画像から横エッジ画像を生成する。そして、中心線検出手段が、生成された横エッジ画像に基づいて顔の中心線を検出する。顔画像には目や眉、眼鏡等、横エッジを生じる部分が多い。従って、横エッジ画像の対称性を利用することで、顔全体に均等に光が照射されない場合においても、顔の中心線を正確に検出することができる。
【0008】
上記の顔画像処理装置において、中心線検出手段は、横エッジ画像に中心線候補を複数設定し、各中心線候補に対して左右対称な画素に共にエッジ点が存在すれば投票し、最も投票数が高い中心線候補を顔の中心線として検出するように構成することができる。
【0009】
また、中心線検出手段で検出された中心線の近傍領域の横エッジ画像に中心線候補を複数設定し、各中心線候補に対して左右対称な画素に共にエッジ点が存在しなければ投票し、最も投票数が高い中心線候補を顔の中心線として再検出する中心線再検出手段を更に備えていてもよい。
【0010】
また、上記の顔画像処理装置は、入力された顔画像から縦エッジ画像を生成する縦エッジ画像生成手段と、生成された縦エッジ画像に基づいて顔の左右両端を検出する両端検出手段と、検出された顔の左右両端と前記顔の中心線とから顔の向きを検出する顔方向検出手段と、を更に備えていてもよい。
【0011】
上記の顔画像処理は、コンピュータを、入力された顔画像から横エッジ画像を生成する横エッジ画像生成手段、及び生成された横エッジ画像に基づいて顔の中心線を検出する中心線検出手段として機能させる顔画像処理用のプログラムを用いて実現することができる。
【0012】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を詳細に説明する。
(第1の実施の形態)
本実施の形態に係る顔画像処理装置は、図1に示すように、ドライバの顔を撮影するカメラ10、ドライバの顔を照明する照明光源12、画像処理用のコンピュータ14、及びコンピュータ14に接続された表示装置16を備えている。表示装置16は、CRT等で構成され、カメラ10で撮影された顔画像から抽出された2値化画像等を表示する。
【0013】
画像処理用のコンピュータ14は、CPU、ROM、RAMの外に、カメラ10から入力された画像信号をディジタル信号に変換するA/D(アナログ/ディジタル)変換器、画像データを記憶する画像メモリ、及びこれらを接続するコントロールバスやデータバスで構成されている。ROMには、後述する中心線検出処理ルーチンを実行するプログラムが記憶されている。
【0014】
次に、図2を参照して、本実施の形態に係る中心線検出処理ルーチンについて説明する。カメラ10から入力された画像信号は、A/D変換器によってディジタルの画像データに変換されて画像メモリに記憶されている。
【0015】
ステップ100において、画像メモリに記憶されている顔画像を取り込み、ステップ102で、取り込んだ顔画像に対して所定の閾値を用いて横エッジを検出する。図3(A)に示す顔画像(グレー画像)を例に、横エッジを検出する例について説明する。まず、垂直方向に隣接する画素の輝度値の差を予め設定された閾値と比較し、輝度値の差が閾値を超える画素(横エッジ点)の出力値を0、輝度値の差が閾値を超えない画素の出力値を1とするようにラべリングを行い、顔画像をラベル0、1が付された2値画像に変換する。これにより、図3(B)に示すように、横エッジ点が白色で表示された白黒の横エッジ画像が得られる。
【0016】
ステップ104では、得られた横エッジ画像を用いて顔の中心線候補を選択する。図4に示すように、縦横のサイズがY1、X1の矩形状の横エッジ画像に対し、縦横のサイズが各々Y1、2K+1のウインドウ(斜線を付した矩形部分)20を想定する。横エッジ画像の左下端をXY座標の原点(0,0)とすると、ウインドウ20を横エッジ画像の左端に設定した場合には、ウインドウ20の横方向の線分を2等分する線はX=Kの直線になる。
【0017】
この直線に対して線対称な座標位置の両方に横エッジ点が存在する場合には予め設定した点数を加算する。例えば、画素aと画素bのように、X=Kの直線から左右にそれぞれ距離K1離れた位置に存在する画素の各々が共に横エッジ点になる場合には、点数が加算される。一方、線対称な座標位置の両方に横エッジ点が存在しない場合には、即ち、片方のみに存在する場合及び両方共に存在しない場合には、点数を加算しない。この演算をウインドウ20内の総ての画素に対して実施して獲得した点数の総和は、X=Kの直線の中心線らしさの度合を表している。即ち、得点が大きいほど、その直線に対するエッジ部分の対称性が高く、横エッジ画像の中心線である可能性が高いことになる。
【0018】
ウインドウ20を横エッジ画像の右端まで右方向に少しずつ移動させながら、各ウインドウ位置により定まる直線について得点を求める。そして、最も得点が大きい直線が顔の中心線候補として選択され、該中心線候補でのX座標と得点とが得られる。
【0019】
ステップ106では、選択された中心線候補が中心線として適切か否かを判定する。中心線候補での得点が予め設定された閾値よりも大きい場合には、中心線候補を中心線と判定し、ステップ108で中心線候補を中心線と決定する。一方、得点が予め設定された閾値よりも小さい場合には、中心線の検出は不可能と判定し、ステップ100に戻って中心線の検出をやり直す。また、ステップ108で中心線を決定した後も、ステップ100に戻って次の顔画像を取り込み、次の顔画像に対する中心線を検出する。
【0020】
以上の通り、本実施の形態では、横エッジ画像のエッジ部分の対称性が最も高くなるように中心線を決定する。顔画像には目や眉、眼鏡等、横エッジを生じる部分が多いので、横エッジ部分の対称性を利用することで、顔全体に均等に光が照射されない場合においても、顔の中心線を正確に検出することができる。
【0021】
(第2の実施の形態)
第1の実施の形態では横エッジ画像だけを用いて顔の中心線を検出したが、本実施の形態では横エッジ画像と縦エッジ画像の両方を用いて顔の中心線を検出する。この場合の中心線検出処理ルーチンを、図5を参照して説明する。
【0022】
ステップ200において、画像メモリに記憶されている顔画像を取り込み、ステップ202で、ステップ102と同様にして、取り込んだ顔画像に対して横エッジを検出する。これにより、例えば、図6(A)に示すように、白黒の横エッジ画像が得られる。ステップ204で、今度は取り込んだ顔画像に対して縦エッジを検出する。横エッジの検出の場合と同様に、顔画像について水平方向に隣接する画素の輝度値の差を予め設定された閾値と比較し、輝度値の差が閾値を超える画素(縦エッジ点)の出力値を0、輝度値の差が閾値を超えない画素の出力値を1とするようにラべリングを行い、顔画像をラベル0、1が付された2値画像に変換することにより縦エッジを検出する。これにより、例えば、図6(B)に示すように、縦エッジ点が白色で表示された白黒の縦エッジ画像が得られる。
【0023】
ステップ206では、ステップ104と同様にして、得られた横エッジ画像を用いて第1の中心線候補(中心線候補1)を選択する。次に、ステップ208で、得られた縦エッジ画像を用いて第1の中心線候補の近傍領域において第2の中心線候補を選択する。図6(B)に示すように、第1の中心線候補の近傍にウインドウ20より小さい矩形のウインドウ(近傍領域)30を設定する。ウインドウ30の横方向の線分を2等分する線に対して線対称な座標位置の両方に縦エッジ点が存在する場合には予め設定した点数を加算する。この演算をウインドウ30内の総ての画素に対して実施する。ウインドウ30を第1の中心線候補の近傍の所定範囲で少しずつ横方向に移動させながら、各ウインドウ位置により定まる直線について得点を求める。そして、最も得点が大きい直線が第2の中心線候補として選択され、第2の中心線候補でのX座標と得点とが得られる。
【0024】
ステップ210では、下記の3つの条件を組み合わせて、選択された第2の中心線候補が中心線として適切か否かを判定する。
(1)第1の中心線候補での得点が、予め設定された第1の閾値よりも大きい。
(2)第2の中心線候補での得点が、予め設定された第2の閾値よりも大きい。
(3)第1の中心線候補と第2の中心線候補との座標位置の差分が、予め設定された第3の閾値よりも小さい。
【0025】
(1)〜(3)の全条件が成立する場合、又は(1)及び(2)の条件が成立する場合には、第2の中心線候補を中心線と判定し、ステップ212で第2の中心線候補を中心線と決定する。一方、(1)又は(2)の条件が成立しない場合には、中心線の検出は不可能と判定し、ステップ200に戻って中心線の検出をやり直す。また、ステップ212で中心線を決定した後も、ステップ200に戻って次の顔画像を取り込み、次の顔画像に対する中心線を検出する。
【0026】
上述した通り、顔画像には横エッジを生じる部分が多いが、図6(B)から分かるように、顔の中心付近では鼻に起因して縦エッジ点が多くなる。従って、横エッジ画像のエッジ部分の対称性が最も高くなるように第1の中心線候補を検出した後、この第1の中心線候補の近傍において、縦エッジ画像のエッジ部分の対称性が最も高くなるように第2の中心線候補を選択することで、より正確に顔の中心線を検出することができる。
【0027】
なお、上記の例では、得られた横エッジ画像を用いて第1の中心線候補を検出した後に、縦エッジ画像を用いて第2の中心線候補を選択したが、縦エッジ画像に現れた顔の輪郭線の左右両端を表すエッジ部分の対称性から第1の中心線候補を検出した後に、横エッジ画像を用いて第2の中心線候補を選択してもよい。また、この場合、第1の中心線候補と第2の中心線候補との座標位置の差分から、顔の向き(例えば、斜め前方を向いている等)を検出することができる。
【0028】
(第3の実施の形態)
本実施の形態では、図8(A)に示すように、ドライバがマスクを装着しており、鼻がマスクで覆われている場合の顔の中心線検出例について説明する。この場合の中心線検出処理ルーチンを、図7を参照して説明する。
【0029】
ステップ300において、画像メモリに記憶されている顔画像を取り込み、ステップ302で、ステップ102と同様にして、取り込んだ顔画像に対して横エッジを検出する。これにより、図8(B)に示すように、白黒の横エッジ画像が得られる。ステップ304で、ステップ104と同様に、得られた横エッジ画像のエッジ部分の対称性に着目して第1の中心線候補を選択する。
【0030】
次に、ステップ306で、今度は横エッジ画像の非エッジ部分(エッジ点が存在しない部分)の対称性に着目して、第1の中心線候補(中心線候補1)の近傍領域において第2の中心線候補を選択する。図8(B)に示すように、第1の中心線候補の近傍にウインドウ20より小さい矩形のウインドウ(近傍領域)40を設定する。ウインドウ40の横方向の線分を2等分する線に対して線対称な座標位置の両方に横エッジ点が存在しない場合に、予め設定した点数を加算する。この点で、線対称な座標位置の両方にエッジ点が存在する場合に点数を加算する第1〜第3の実施の形態とは相違する。即ち、得点が大きいほど、その直線に対する非エッジ部分の対称性が高く、横エッジ画像の中心線である可能性が高いことになる。
【0031】
この演算をウインドウ40内の総ての画素に対して実施する。ウインドウ40を第1の中心線候補の近傍の所定範囲で少しずつ横方向に移動させながら、各ウインドウ位置により定まる直線について得点を求める。そして、最も得点が大きい直線が第2の中心線候補として選択され、第2の中心線候補でのX座標と得点とが得られる。
【0032】
ステップ308では、下記の3つの条件を組み合わせて、選択された第2の中心線候補が中心線として適切か否かを判定する。
(1)第1の中心線候補での得点が、予め設定された第1の閾値よりも大きい。
(2)第2の中心線候補での得点が、予め設定された第2の閾値よりも大きい。
(3)第1の中心線候補と第2の中心線候補との座標位置の差分が、予め設定された第3の閾値よりも小さい。
【0033】
(1)〜(3)の全条件が成立する場合、又は(1)及び(2)の条件が成立する場合には、第2の中心線候補を中心線と判定し、ステップ310で第2の中心線候補を中心線と決定する。一方、(1)又は(2)の条件が成立しない場合には、中心線の検出は不可能と判定し、ステップ300に戻って中心線の検出をやり直す。また、ステップ310で中心線を決定した後も、ステップ300に戻って次の顔画像を取り込み、次の顔画像に対する中心線を検出する。
【0034】
上述した通り、顔画像には横エッジを生じる部分が多いが、図8(B)から分かるように、顔の中心付近では横エッジ点が少なくなる。また、ドライバがマスクを装着した状態では、顔の中心付近の縦エッジを抽出することもできない。従って、横エッジ画像のエッジ部分の対称性が最も高くなるように第1の中心線候補を検出した後、第1の中心線候補の近傍において、横エッジ画像の非エッジ部分の対称性が最も高くなるように第2の中心線候補を選択することで、より正確に顔の中心線を検出することができる。
【0035】
(変形例)
上記第1乃至第3の実施の形態では、設定したウインドウ内の総ての線対称な座標位置について演算を実施したが、線対称な座標位置を探索する範囲を限定してもよい。例えば、図9に示すように、探索領域50を、眼、鼻等の顔部品が存在する領域に限定することで、顔部品の特徴を確実に捉えることができ、中心線候補の検出精度が向上する。
【0036】
また、上記第1乃至第3の実施の形態では、線対称な座標位置の両方にエッジ点が存在するか否かを基準に点数を加算したが、一方の座標位置に隣接する座標位置にエッジ点が存在する場合にも、点数を加算するようにしてもよい。例えば、図10に示すように、ウインドウ20の横方向の2等分線をX=Kの直線とすると、同じY座標上にある画素aと画素bの各々が横エッジ点になる場合に点数を加算する外、画素aが横エッジ点となり且つ画素bに対し垂直方向に隣接する画素c又は画素dが横エッジ点になる場合にも点数を加算する。このように、対応する画素を所定範囲内で縦方向に探索することで、顔の傾きに対してもある程度対応することができ、中心線候補の検出精度が向上する。
【0037】
また、上記第1乃至第3の実施の形態では、縦エッジ又は横エッジを検出する例について説明したが、エッジを縦方向成分と横方向成分とに分けて検出するソーベルフィルタを用いてエッジ角度をモニターすることで、種々の方向のエッジを検出できる。例えば、図11に示すように、縦エッジ画像と横エッジ画像を用いる代わりに、左45度のエッジ画像と右45度のエッジ画像を用いることもできる。なお、縦エッジ画像及び横エッジ画像以外のエッジ画像を用いる場合には、線対称な座標位置の両方に同じ角度方向のエッジ点が存在するか否かを基準に点数を加算する。
【0038】
【発明の効果】
以上説明したように本発明によれば、顔全体に均等に光が照射されない場合においても、顔の中心線を正確に検出することができる、という効果がある。
【図面の簡単な説明】
【図1】本実施の形態に係る顔画像処理装置の構成を示すブロック図である。
【図2】第1の実施の形態に係る中心線検出処理ルーチンを示すフローチャートである。
【図3】(A)は顔画像の原画像を示す図であり、(B)は(A)を2値化して得られた横エッジ画像である。
【図4】横エッジ画像に対して矩形のウインドウを設定した図である。
【図5】第2の実施の形態に係る中心線検出処理ルーチンを示すフローチャートである。
【図6】(A)は横エッジ画像であり、(B)は縦エッジ画像である。
【図7】第3の実施の形態に係る中心線検出処理ルーチンを示すフローチャートである。
【図8】(A)はマスクを装着したドライバの顔画像の原画像を示す図であり、(B)は(A)を2値化して得られた横エッジ画像である。
【図9】設定したウインドウ内で線対称な座標位置を探索する範囲を特定した図である。
【図10】一方の座標位置に対応する画素を所定範囲内で縦方向に探索する例を示す図である。
【図11】エッジ方向の置き換え例を示す図である。
【符号の説明】
10 カメラ
12 照明光源
14 画像処理用のコンピュータ
16 表示装置
20、30、40 ウインドウ
50 探索領域
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a face image processing apparatus and a program, and more particularly to a face image processing apparatus and a program that can accurately detect a center line of a face based on a horizontal edge image.
[0002]
[Prior art]
Conventionally, there has been proposed a method of detecting a center line of a face from input grayscale face images using grayscale information. In this method, the center line is calculated based on the fact that the grayscale values of the left and right pixels are closest, that is, the symmetry is high (see Patent Document 1).
[0003]
[Patent Document 1]
JP-A-9-171560
[Problems to be solved by the invention]
However, when photographing a face image indoors, since the light can be evenly applied to the entire face, the gray value of a symmetrical point on the face becomes a close value, but when considering the vehicle interior environment, There is a case where light is not evenly applied to the entire face. That is, when the sunlight shines from the side of the face, only the portion where the sunlight shines becomes bright. Therefore, there has been a problem that the difference between the grayscale values of the symmetric coordinate points becomes large, and a situation occurs in which the evaluation of the face symmetry cannot be performed accurately.
[0005]
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide a face image processing apparatus capable of accurately detecting the center line of a face even when light is not uniformly applied to the entire face. It is to provide an apparatus and a program.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, a face image processing apparatus of the present invention comprises: an image input unit for inputting a face image; a horizontal edge image generation unit for generating a horizontal edge image from the input face image; And a center line detecting means for detecting a center line of the face based on the image.
[0007]
In the face image processing device of the present invention, when a face image is input from the image input means, the horizontal edge image generation means generates a horizontal edge image from the input face image. Then, the center line detecting means detects the center line of the face based on the generated horizontal edge image. A face image often has a portion where a horizontal edge occurs, such as eyes, eyebrows, and glasses. Therefore, by utilizing the symmetry of the horizontal edge image, the center line of the face can be accurately detected even when the entire face is not uniformly irradiated with light.
[0008]
In the above-mentioned face image processing apparatus, the center line detecting means sets a plurality of center line candidates in the horizontal edge image, and votes if both the symmetrical pixels have edge points with respect to each center line candidate. It can be configured to detect a high number of center line candidates as the center line of the face.
[0009]
In addition, a plurality of center line candidates are set in the horizontal edge image of the area near the center line detected by the center line detecting means, and voting is performed if there is no edge point in both symmetrical pixels for each center line candidate. A center line re-detecting means for re-detecting a center line candidate having the highest number of votes as a face center line may be further provided.
[0010]
Further, the above-described face image processing apparatus includes a vertical edge image generating unit that generates a vertical edge image from an input face image, and both ends detecting unit that detects left and right ends of the face based on the generated vertical edge image, The image processing apparatus may further include face direction detecting means for detecting a face direction from both left and right ends of the detected face and the center line of the face.
[0011]
The above-described face image processing is performed by using a computer as a horizontal edge image generation unit that generates a horizontal edge image from an input face image, and a center line detection unit that detects a center line of a face based on the generated horizontal edge image. It can be realized by using a program for face image processing to be made to function.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(First Embodiment)
As shown in FIG. 1, the face image processing apparatus according to the present embodiment is connected to a camera 10 for photographing a driver's face, an illumination light source 12 for illuminating the driver's face, a computer 14 for image processing, and a computer 14. Display device 16 is provided. The display device 16 includes a CRT or the like, and displays a binarized image or the like extracted from the face image captured by the camera 10.
[0013]
An image processing computer 14 includes an A / D (analog / digital) converter for converting an image signal input from the camera 10 into a digital signal, an image memory for storing image data, in addition to the CPU, ROM, and RAM. And a control bus and a data bus connecting them. The ROM stores a program for executing a later-described center line detection processing routine.
[0014]
Next, a center line detection processing routine according to the present embodiment will be described with reference to FIG. An image signal input from the camera 10 is converted into digital image data by an A / D converter and stored in an image memory.
[0015]
In step 100, the face image stored in the image memory is fetched, and in step 102, a horizontal edge is detected from the fetched face image using a predetermined threshold. An example of detecting a horizontal edge will be described using the face image (gray image) shown in FIG. 3A as an example. First, the difference between the luminance values of the pixels adjacent in the vertical direction is compared with a preset threshold, and the output value of a pixel (horizontal edge point) whose luminance difference exceeds the threshold is set to 0, and the difference between the luminance values is set to the threshold. Labeling is performed so that the output value of a pixel that does not exceed 1 is set, and the face image is converted into a binary image with labels 0 and 1. Thereby, as shown in FIG. 3B, a black-and-white horizontal edge image in which the horizontal edge points are displayed in white is obtained.
[0016]
In step 104, a center line candidate of the face is selected using the obtained horizontal edge image. As shown in FIG. 4, it is assumed that a rectangular horizontal edge image having vertical and horizontal sizes of Y1 and X1 has windows (rectangular portions hatched) with vertical and horizontal sizes of Y1, 2K + 1, respectively. Assuming that the lower left end of the horizontal edge image is the origin (0, 0) of the XY coordinates, when the window 20 is set at the left end of the horizontal edge image, the line that bisects the horizontal line segment of the window 20 is X = K straight line.
[0017]
If there are lateral edge points at both coordinate positions symmetrical with respect to this straight line, a preset score is added. For example, in the case where each of the pixels existing at positions separated by a distance K1 to the left and right from the straight line of X = K, such as pixel a and pixel b, both become horizontal edge points, the points are added. On the other hand, if there are no horizontal edge points at both of the line-symmetric coordinate positions, that is, if there is only one of them and neither of them exists, no points are added. The sum of the scores obtained by performing this operation for all the pixels in the window 20 indicates the degree of the likelihood of the center line of the straight line of X = K. In other words, the higher the score, the higher the symmetry of the edge portion with respect to the straight line, and the higher the possibility of being the center line of the horizontal edge image.
[0018]
While moving the window 20 little by little rightward to the right end of the horizontal edge image, a score is obtained for a straight line determined by each window position. Then, the straight line having the highest score is selected as a center line candidate of the face, and the X coordinate and the score of the center line candidate are obtained.
[0019]
In step 106, it is determined whether or not the selected center line candidate is appropriate as the center line. If the score of the center line candidate is larger than a preset threshold, the center line candidate is determined to be the center line, and in step 108, the center line candidate is determined to be the center line. On the other hand, if the score is smaller than the preset threshold value, it is determined that the detection of the center line is impossible, and the process returns to step 100 to perform the detection of the center line again. After the center line is determined in step 108, the process returns to step 100 to fetch the next face image and detect the center line for the next face image.
[0020]
As described above, in the present embodiment, the center line is determined so that the symmetry of the edge portion of the horizontal edge image is the highest. Face images often have horizontal edges, such as eyes, eyebrows, and eyeglasses.Therefore, by utilizing the symmetry of the horizontal edges, even if the entire face is not evenly illuminated, the center line of the face can be detected. It can be detected accurately.
[0021]
(Second embodiment)
In the first embodiment, the center line of the face is detected using only the horizontal edge image, but in the present embodiment, the center line of the face is detected using both the horizontal edge image and the vertical edge image. The center line detection processing routine in this case will be described with reference to FIG.
[0022]
In step 200, the face image stored in the image memory is fetched, and in step 202, a horizontal edge is detected for the fetched face image in the same manner as in step 102. Thereby, for example, as shown in FIG. 6A, a black and white horizontal edge image is obtained. In step 204, a vertical edge is detected for the captured face image. As in the case of detecting the horizontal edge, the difference between the luminance values of the pixels adjacent to the face image in the horizontal direction is compared with a preset threshold value, and the output of the pixel (vertical edge point) whose luminance value difference exceeds the threshold value is output. Labeling is performed so that the output value of a pixel whose difference in luminance value does not exceed the threshold value is 0, and the face image is converted into a binary image labeled with labels 0 and 1 by a vertical edge. Is detected. Thereby, for example, as shown in FIG. 6B, a black and white vertical edge image in which the vertical edge points are displayed in white is obtained.
[0023]
In step 206, the first center line candidate (center line candidate 1) is selected using the obtained horizontal edge image in the same manner as in step 104. Next, in step 208, a second center line candidate is selected in a region near the first center line candidate using the obtained vertical edge image. As shown in FIG. 6B, a rectangular window (neighboring region) 30 smaller than the window 20 is set near the first center line candidate. If there are vertical edge points at both coordinate positions that are line-symmetric with respect to the line that bisects the horizontal line segment of the window 30, a preset score is added. This operation is performed for all the pixels in the window 30. While moving the window 30 in the horizontal direction little by little within a predetermined range near the first center line candidate, a score is obtained for a straight line determined by each window position. Then, the straight line having the highest score is selected as the second center line candidate, and the X coordinate and the score of the second center line candidate are obtained.
[0024]
In step 210, it is determined whether the selected second center line candidate is appropriate as the center line by combining the following three conditions.
(1) The score of the first center line candidate is larger than a preset first threshold value.
(2) The score of the second center line candidate is larger than a preset second threshold value.
(3) The difference between the coordinate positions of the first center line candidate and the second center line candidate is smaller than a third threshold value set in advance.
[0025]
If all of the conditions (1) to (3) are satisfied, or if the conditions (1) and (2) are satisfied, the second center line candidate is determined to be the center line, and the second center line candidate is determined as the center line in step 212. Is determined as the center line. On the other hand, if the condition of (1) or (2) is not satisfied, it is determined that the detection of the center line is impossible, and the process returns to step 200 to perform the detection of the center line again. After the center line is determined in step 212, the process returns to step 200 to capture the next face image and detect the center line for the next face image.
[0026]
As described above, the face image has many portions where horizontal edges occur, but as can be seen from FIG. 6B, the number of vertical edge points increases near the center of the face due to the nose. Therefore, after detecting the first center line candidate so that the symmetry of the edge portion of the horizontal edge image is the highest, the symmetry of the edge portion of the vertical edge image is the closest in the vicinity of the first center line candidate. By selecting the second center line candidate so as to be higher, the center line of the face can be detected more accurately.
[0027]
In the above example, after the first center line candidate is detected using the obtained horizontal edge image, the second center line candidate is selected using the vertical edge image. After detecting the first center line candidate from the symmetry of the edge portions representing the left and right ends of the face outline, the second center line candidate may be selected using the horizontal edge image. Further, in this case, the direction of the face (for example, facing diagonally forward) can be detected from the difference between the coordinate positions of the first center line candidate and the second center line candidate.
[0028]
(Third embodiment)
In the present embodiment, as shown in FIG. 8A, an example of detecting a center line of a face when a driver wears a mask and the nose is covered with the mask will be described. The center line detection processing routine in this case will be described with reference to FIG.
[0029]
In step 300, the face image stored in the image memory is fetched, and in step 302, a horizontal edge is detected for the fetched face image in the same manner as in step 102. As a result, a black-and-white horizontal edge image is obtained as shown in FIG. In step 304, as in step 104, a first center line candidate is selected by focusing on the symmetry of the edge portion of the obtained horizontal edge image.
[0030]
Next, in step 306, focusing on the symmetry of the non-edge portion (the portion where no edge point exists) of the horizontal edge image, the second edge region is positioned in the vicinity of the first center line candidate (center line candidate 1). Center line candidates are selected. As shown in FIG. 8B, a rectangular window (neighboring region) 40 smaller than the window 20 is set near the first center line candidate. If there are no horizontal edge points at both coordinate positions that are line-symmetric with respect to the line that bisects the horizontal line segment of the window 40, a preset score is added. This is different from the first to third embodiments in which points are added when edge points exist at both line-symmetric coordinate positions. In other words, the higher the score, the higher the symmetry of the non-edge portion with respect to the straight line, and the higher the possibility of being the center line of the horizontal edge image.
[0031]
This operation is performed for all the pixels in the window 40. While moving the window 40 in the horizontal direction little by little within a predetermined range near the first center line candidate, a score is obtained for a straight line determined by each window position. Then, the straight line having the highest score is selected as the second center line candidate, and the X coordinate and the score of the second center line candidate are obtained.
[0032]
In step 308, the following three conditions are combined to determine whether the selected second center line candidate is appropriate as a center line.
(1) The score of the first center line candidate is larger than a preset first threshold value.
(2) The score of the second center line candidate is larger than a preset second threshold value.
(3) The difference between the coordinate positions of the first center line candidate and the second center line candidate is smaller than a third threshold value set in advance.
[0033]
If all the conditions (1) to (3) are satisfied, or if the conditions (1) and (2) are satisfied, the second center line candidate is determined to be a center line, and the second center line candidate is determined in step 310. Is determined as the center line. On the other hand, if the condition (1) or (2) is not satisfied, it is determined that the detection of the center line is impossible, and the process returns to step 300 to perform the detection of the center line again. After the center line is determined in step 310, the process returns to step 300 to fetch the next face image and detect the center line for the next face image.
[0034]
As described above, the face image has many portions where horizontal edges occur, but as can be seen from FIG. 8B, the number of horizontal edge points decreases near the center of the face. Further, when the driver wears the mask, it is not possible to extract a vertical edge near the center of the face. Therefore, after detecting the first center line candidate so that the symmetry of the edge portion of the horizontal edge image is the highest, the non-edge portion of the horizontal edge image has the highest symmetry in the vicinity of the first center line candidate. By selecting the second center line candidate so as to be higher, the center line of the face can be detected more accurately.
[0035]
(Modification)
In the first to third embodiments, the calculation is performed for all the line-symmetric coordinate positions in the set window. However, the range in which the line-symmetric coordinate position is searched may be limited. For example, as shown in FIG. 9, by limiting the search area 50 to an area where face parts such as eyes and nose are present, the features of the face parts can be reliably captured, and the detection accuracy of the center line candidate is reduced. improves.
[0036]
In the first to third embodiments, the points are added based on whether or not the edge points exist at both of the line-symmetric coordinate positions. However, the edge points are added to the coordinate positions adjacent to one of the coordinate positions. Even when points exist, points may be added. For example, as shown in FIG. 10, when the horizontal bisector of the window 20 is a straight line of X = K, when each of the pixels a and b on the same Y coordinate is a horizontal edge point, the score is In addition to the above, the points are also added when the pixel a becomes the horizontal edge point and the pixel c or the pixel d adjacent in the vertical direction to the pixel b becomes the horizontal edge point. As described above, by searching for the corresponding pixel in the vertical direction within the predetermined range, it is possible to cope with the inclination of the face to some extent, and the detection accuracy of the center line candidate is improved.
[0037]
Further, in the first to third embodiments, an example in which a vertical edge or a horizontal edge is detected has been described. However, an edge is detected using a Sobel filter that detects the edge by dividing the edge into a vertical component and a horizontal component. By monitoring the angle, edges in various directions can be detected. For example, as shown in FIG. 11, instead of using a vertical edge image and a horizontal edge image, a left 45 ° edge image and a right 45 ° edge image can be used. When an edge image other than the vertical edge image and the horizontal edge image is used, the points are added based on whether or not edge points in the same angle direction exist at both line-symmetric coordinate positions.
[0038]
【The invention's effect】
As described above, according to the present invention, there is an effect that the center line of the face can be accurately detected even when the entire face is not uniformly irradiated with light.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a face image processing device according to the present embodiment.
FIG. 2 is a flowchart illustrating a center line detection processing routine according to the first embodiment.
3A is a diagram showing an original face image, and FIG. 3B is a horizontal edge image obtained by binarizing (A).
FIG. 4 is a diagram in which a rectangular window is set for a horizontal edge image.
FIG. 5 is a flowchart illustrating a center line detection processing routine according to a second embodiment.
6A is a horizontal edge image, and FIG. 6B is a vertical edge image.
FIG. 7 is a flowchart illustrating a center line detection processing routine according to a third embodiment.
8A is a diagram showing an original image of a face image of a driver wearing a mask, and FIG. 8B is a horizontal edge image obtained by binarizing (A).
FIG. 9 is a diagram that specifies a range for searching for a line-symmetric coordinate position in a set window.
FIG. 10 is a diagram illustrating an example in which a pixel corresponding to one coordinate position is searched for in a vertical direction within a predetermined range.
FIG. 11 is a diagram illustrating an example of replacement of an edge direction.
[Explanation of symbols]
Reference Signs List 10 Camera 12 Illumination light source 14 Computer 16 for image processing Display device 20, 30, 40 Window 50 Search area

Claims (5)

顔画像を入力する画像入力手段と、
入力された顔画像から横エッジ画像を生成する横エッジ画像生成手段と、
生成された横エッジ画像に基づいて顔の中心線を検出する中心線検出手段と、
を備えた顔画像処理装置。
Image input means for inputting a face image;
A horizontal edge image generating means for generating a horizontal edge image from the input face image,
Center line detecting means for detecting a center line of the face based on the generated horizontal edge image;
A face image processing device comprising:
前記中心線検出手段は、前記横エッジ画像に中心線候補を複数設定し、各中心線候補に対して左右対称な画素に共にエッジ点が存在すれば投票し、最も投票数が高い中心線候補を顔の中心線として検出する請求項1に記載の顔画像処理装置。The center line detection means sets a plurality of center line candidates in the horizontal edge image, and votes if both the symmetric pixels have an edge point with respect to each center line candidate. The face image processing apparatus according to claim 1, wherein the face image is detected as a center line of the face. 前記中心線検出手段で検出された前記中心線の近傍領域の横エッジ画像に中心線候補を複数設定し、各中心線候補に対して左右対称な画素に共にエッジ点が存在しなければ投票し、最も投票数が高い中心線候補を顔の中心線として再検出する中心線再検出手段を更に備えた請求項1又は2に記載の顔画像処理装置。A plurality of center line candidates are set in the horizontal edge image of the area near the center line detected by the center line detecting means, and voting is performed if there is no edge point in both left-right symmetric pixels for each center line candidate. 3. The face image processing apparatus according to claim 1, further comprising a center line re-detecting unit that re-detects a center line candidate having the highest number of votes as a center line of the face. 入力された顔画像から縦エッジ画像を生成する縦エッジ画像生成手段と、
生成された縦エッジ画像に基づいて顔の左右両端を検出する両端検出手段と、
検出された顔の左右両端と前記顔の中心線とから顔の向きを検出する顔方向検出手段と、
を更に備えた請求項1乃至3の何れか1項に記載の顔画像処理装置。
Vertical edge image generating means for generating a vertical edge image from the input face image,
Both ends detecting means for detecting both left and right ends of the face based on the generated vertical edge image,
Face direction detection means for detecting the direction of the face from both the left and right ends of the detected face and the center line of the face,
The face image processing apparatus according to any one of claims 1 to 3, further comprising:
コンピュータを、入力された顔画像から横エッジ画像を生成する横エッジ画像生成手段、及び生成された横エッジ画像に基づいて顔の中心線を検出する中心線検出手段として機能させる顔画像処理用のプログラム。A face image processing unit for causing a computer to function as a side edge image generation unit that generates a side edge image from an input face image and a center line detection unit that detects a center line of a face based on the generated side edge image program.
JP2002273689A 2002-09-19 2002-09-19 Facial image processing apparatus and program Expired - Fee Related JP4172236B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002273689A JP4172236B2 (en) 2002-09-19 2002-09-19 Facial image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002273689A JP4172236B2 (en) 2002-09-19 2002-09-19 Facial image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2004110543A true JP2004110543A (en) 2004-04-08
JP4172236B2 JP4172236B2 (en) 2008-10-29

Family

ID=32270381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002273689A Expired - Fee Related JP4172236B2 (en) 2002-09-19 2002-09-19 Facial image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4172236B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008256647A (en) * 2007-04-09 2008-10-23 Showa Aluminum Kan Kk Screw thread geometry inspection technique and screw thread geometry inspection device
WO2013146206A1 (en) * 2012-03-28 2013-10-03 株式会社メガチップス Object detection device and program
JP2016189135A (en) * 2015-03-30 2016-11-04 パイオニア株式会社 Recognition device, recognition method, and recognition program
CN110032955A (en) * 2019-03-27 2019-07-19 深圳职业技术学院 A kind of recognition of face new method based on deep learning
JP2020042842A (en) * 2019-11-22 2020-03-19 パイオニア株式会社 Recognition device, recognition method, and recognition program
CN111784660A (en) * 2020-06-29 2020-10-16 厦门市美亚柏科信息股份有限公司 Method and system for analyzing face correcting degree of face image

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008256647A (en) * 2007-04-09 2008-10-23 Showa Aluminum Kan Kk Screw thread geometry inspection technique and screw thread geometry inspection device
WO2013146206A1 (en) * 2012-03-28 2013-10-03 株式会社メガチップス Object detection device and program
JP2013228995A (en) * 2012-03-28 2013-11-07 Mega Chips Corp Object detection device and program
US9514545B2 (en) 2012-03-28 2016-12-06 Megachips Corporation Object detection apparatus and storage medium
JP2016189135A (en) * 2015-03-30 2016-11-04 パイオニア株式会社 Recognition device, recognition method, and recognition program
CN110032955A (en) * 2019-03-27 2019-07-19 深圳职业技术学院 A kind of recognition of face new method based on deep learning
JP2020042842A (en) * 2019-11-22 2020-03-19 パイオニア株式会社 Recognition device, recognition method, and recognition program
JP2021193624A (en) * 2019-11-22 2021-12-23 パイオニア株式会社 Recognition device, recognition method and recognition program
CN111784660A (en) * 2020-06-29 2020-10-16 厦门市美亚柏科信息股份有限公司 Method and system for analyzing face correcting degree of face image
CN111784660B (en) * 2020-06-29 2022-07-15 厦门市美亚柏科信息股份有限公司 Method and system for analyzing frontal face degree of face image

Also Published As

Publication number Publication date
JP4172236B2 (en) 2008-10-29

Similar Documents

Publication Publication Date Title
EP1970839B1 (en) Apparatus, method, and program for face feature point detection
JP3951984B2 (en) Image projection method and image projection apparatus
CN110678901A (en) Information processing apparatus, information processing method, and program
JP4825473B2 (en) Face orientation discrimination device
CN109409186B (en) Driver assistance system and method for object detection and notification
US20090110286A1 (en) Detection method
JP2000105829A (en) Method and device for face parts image detection
JP2012048484A (en) Image processing apparatus, image processing method, and program
KR20160128930A (en) Apparatus and method for detecting bar-type traffic sign in traffic sign recognition system
Ahmed et al. Traffic sign detection and recognition model using support vector machine and histogram of oriented gradient
JP4198542B2 (en) Face presence / absence determination device and face presence / absence determination program
US9727780B2 (en) Pedestrian detecting system
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2004110543A (en) Face image processing unit and program
JP2010136207A (en) System for detecting and displaying pedestrian
JP5128454B2 (en) Wrinkle detection device, wrinkle detection method and program
JPH07311833A (en) Human face detecting device
JP2007219899A (en) Personal identification device, personal identification method, and personal identification program
JP2010108138A (en) Person detection device and program
KR102248673B1 (en) Method for identificating traffic lights, device and program using the same
JP2015176252A (en) Image processor and image processing method
CN114359147A (en) Crack detection method, crack detection device, server and storage medium
JP2013029996A (en) Image processing device
JP5172995B2 (en) Face orientation discrimination device and computer program
JP2009059165A (en) Outline detection apparatus, sight line detection apparatus using the same, program for causing computer to remove false outline data, program for causing computer to detect sight line direction, and computer-readable recording medium with the program recorded

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080408

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080606

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

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

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

Free format text: PAYMENT UNTIL: 20110822

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130822

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees