JP3685403B2 - Face image processing device - Google Patents
Face image processing device Download PDFInfo
- Publication number
- JP3685403B2 JP3685403B2 JP2002237854A JP2002237854A JP3685403B2 JP 3685403 B2 JP3685403 B2 JP 3685403B2 JP 2002237854 A JP2002237854 A JP 2002237854A JP 2002237854 A JP2002237854 A JP 2002237854A JP 3685403 B2 JP3685403 B2 JP 3685403B2
- Authority
- JP
- Japan
- Prior art keywords
- filter
- length
- pixel
- image
- level extraction
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は顔画像処理装置に関し、特に撮影された人物の顔画像より目を抽出するための顔画像処理装置に関するものである。
【0002】
【従来の技術】
従来より、車両運転者の脇見、居眠り運転等の運転状態を検出するため、運転者の顔を車両室内に設けられたカメラで撮影し、得られた顔画像を処理して顔の特徴点である目を抽出する顔画像の処理装置が提案されている。
【0003】
図34乃至図36は特開平6-32154号公報に開示された従来の顔画像処理装置を示す図であって、図34は従来の顔画像処理装置の構成図であり、図35は従来の顔画像処理装置における運転者の状態を検出するためのフローチャート、図36は従来装置における顔画像とその2値画像である。
【0004】
以下、図34乃至図36を用いてかかる従来例について説明する。
【0005】
図34において、Aは顔画像撮像部を示しており、この顔画像撮像部Aは、カメラ101と、撮像対象を照射するための光源102と、その光源102を駆動する光源駆動回路103とからなる。カメラ101は、CCD等よりなる2次元撮像素子101aと、映像信号処理回路101bと、撮像レンズ101cと、その撮像レンズ101cの前面光軸上に配置された可視光カットフィルタ101とを有する。光源駆動回路103は映像信号処理回路101bの出力側に接続され、その明暗出力が入力される。光源102は近赤外光源で、高輝度の近赤外LEDを多数個並べた光源やハロゲンランプやキセノンランプの前に可視光カットフィルタが設けられている。光源駆動回路103及び近赤外光源102は一体化されてカメラ部1とは別に配置されている。
【0006】
Bは顔画像処理部を示し、この顔画像処理部Bは、映像信号処理回路101bの出力側に入力されてその映像出力が入力されるA/D変換器100と、そのA/D変換器の出力側に接続された画像メモリ110と、映像信号処理回路101bのCCD撮像タイミング信号が入力される入力インタフェース(I/F)120と、中央演算素子(CPU)130と、リードオンリメモリ(ROM)140と、ランダムアクセスメモリ(RAM)150と、出力インタフェース(I/F)160とを有する。A/D変換器100、画像メモリ110、入力インタフェース120、ROM140、RAM150、出力インタフェース160はCPU130とバス11030で接続されている。CPU130は、ROM140に内蔵された制御プログラムを実行して、後述する2値化手段、眼球存在領域設定手段、眼球検出手段、瞬目検出手段、居眠り判定手段等の機能を果たすものである。pは撮像対象の運転者を示している。
【0007】
次に上記従来例の動作について説明する。
カメラ101のCCD101aは日中は太陽光の可視光カットフィルタ101を通過する太陽光の近赤外成分で運転者pの顔画像を撮像し、映像信号処理回路101bで映像信号に変換する。映像信号処理回路101bは画像輝度を積分して平均画像輝度を求め、運転者pの周囲が暗くなって平均画像輝度が所定値以下に低下した場合に、暗状態出力を光源駆動回路103に送出して近赤外光源102を点灯させて運転者の顔面周辺を照明することにより、カメラ101により同様に運転者pの顔画像を撮像する。
【0008】
カメラ部1で撮像された運転者pの顔画像の映像信号は、図35において、先ず、ステップST100でA/D変換器100によりA/D変換されてデジタル階調画像に変換され、ステップ110で画像メモリ110に記憶される。
【0009】
次に、ステップST120で2値化手段は画像メモリ110に記憶した画像データを読み出して適当な2値化閾値で2値化して2値画像に変換し、ステップST130で眼球存在領域設定手段は顔の左右横方向に白色画素を検索して連続白色画素領域の端部より顔の横幅輪郭線を特定し、特定された顔の横幅輪郭線より眼球存在領域の座標を設定し、ステップST140で眼球検出手段は前記眼球存在領域内で黒色画素が連続した黒色画素領域を検索し、検索した黒色画素領域の位置関係や縦方向の黒色画素数に基づき眼球領域を検出する。
【0010】
最後に、ステップST150で瞬目検出手段は検出された眼球領域内での縦方向黒色画素数に基づき目の開閉を検出し、ステップST160で居眠り判定手段は検出した目の開閉状態に基づき居眠りを判定し、居眠り状態と判定された場合に出力インタフェース160より外部に警報信号を送出して運転者pに警報する。
【0011】
これら一連の動作は入力インタフェース120より入力されたCCD撮像タイミング信号にあわせて、ROM140に記憶された命令によりCPU130で制御され、RAM150は制御、演算中の一時的なデータの記憶に用いられる。
【0012】
一方、図示しないが、論文「視線検出のための瞳孔撮影光学系の設計法」(電子情報通信学会誌D-II Vol.J74D-II No.6)で示されるように、カメラ101の撮像軸に同軸な放射軸を持つ近赤外光源をカメラ101に近接して配置して、この近赤外光源により照明しつつ顔を撮像することにより、弱い照明でも網膜反射によって人物の瞳孔が顕著に明るく撮影でき、2値化後の白色画素を簡単な画像処理で検索して目の位置を検出することができる。
【0013】
【発明が解決しようとする課題】
しかしながら、かかる従来装置においては、日中に太陽光により顔を撮影する場合には、太陽光による外乱、即ち太陽の高度や向き、木漏れ日下走行時等の周囲環境等によっては顔に陰影が生じ、2値化がうまくいかず目抽出が困難になるという問題点があった。
【0014】
例えば、図36は太陽光が運転席の斜め上方から当たっており、顔の上半分が車体、あるいはサンバイザの陰になっているような状態の運転者顔画像4103を従来の方法で2値化した例を示しており、かかる状態では顔の上下で画素レベルが大きく異なるため、明るい部分の影響を受けて2値化閾値が上昇し、かかる2値化閾値での2値化後の2値画像4102では鼻孔、口裂は抽出されるが目、髪、眉を含む顔の上半分全体は一つの黒色領域となってしまい目領域を分離して抽出することができない。
【0015】
また、目領域を分離できた場合でも、顔輪郭や個人により大きく異なる髪の領域が存在する顔画像から目領域を特定しなければならず、画像処理アルゴリズムが複雑で時間がかかるという問題点があった。
【0016】
また、夜間等の暗状態では光量の大きな近赤外光源102を点灯して運転者pの顔面周辺を照明して顔を撮像しなければならないため、光源が大型となり装置が大型且つ高価になるとともに、装置の消費電力が大きいという問題点があった。
【0017】
また、上述の開示論文のように、カメラに近接して弱い近赤外光源を設けて瞳孔を撮像するものにおいては、日中は太陽光の近赤外成分により顔全体が映ってしまうため瞳孔を分離して撮影することができず、目抽出が困難になるという問題点があった。
【0018】
この発明は上記問題点を解決するために成されたものであり、車載条件下など周囲の明るさや周囲環境による光外乱に左右されることなく、人物の目領域を簡単な画像処理アルゴリズムを用いて短時間で検出できる、小型且つ安価で低消費電力の顔画像処理装置を得ることを目的としている。
【0019】
【課題を解決するための手段】
この発明に係る顔画像処理装置は、人物の顔面を含む所定領域を撮像する2次元撮像手段と、前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、前記レベル抽出フィルタは、所定の最大フィルタ長及びその最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長となるように画素数を規則的に間引きし、間引いた後の画素の画素レベルをトーナメント形式で比較し、そのトーナメント最終階層より比較値を出力するフィルタからなり、前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する画素長となるように画素間引き数を選択するものであることを特徴とする。
また、人物の顔面を含む所定領域を撮像する2次元撮像手段と、前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、前記レベル抽出フィルタは、所定の最大フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するとともに、前記最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長に対応した各々のトーナメント階層より比較値を出力するフィルタからなり、前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する前記レベル抽出フィルタのトーナメント階層よりの出力を選択するようにしたことを特徴とする。
さらに、人物の顔面を含む所定領域を撮像する2次元撮像手段と、前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、前記レベル抽出フィルタは、所定の最大フィルタ長及び前記最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するフィルタからなり、前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する画素長に対応した各々のトーナメント階層以下のトーナメント階層の出力を無視して、トーナメントに参加する画素数を前記設定フィルタ長に相当する画素長となるようフィルタ端部より制限するようにしたことを特徴とする。
【0030】
【発明の実施の形態】
以下、本発明の実施の形態を添付図面により説明する。
【0031】
実施の形態1.
図1乃至図7はこの発明の顔画像処理装置の一実施の形態を示すものであり、車両運転者の居眠り運転等の運転状態の検出に応用した顔画像処理装置の実施の形態を示している。図1はこの実施の形態による顔画像処理装置を含む運転者の状態検出装置の概略構成図、図2はこの顔画像処理装置を用いた運転者状態検出のフローチャート、図3は画像処理回路の回路ブロック図、図4は黒レベル抽出フィルタの作用説明図、図5は黒レベル抽出フィルタ処理した2値顔画像、図6は夜間撮影時の入力顔画像と白レベル抽出フィルタ処理した2値顔画像、図7は最大値(MAX)フィルタの回路構成図である。
【0032】
以下、この実施の形態による顔画像処理装置の構成について説明する。
図1において、aは撮像部、bは画像処理部、pは撮像対象としての運転者を示している。撮像部aは、運転者pの顔面を含む所定領域を撮像するカメラ1と、夜間等運転者pの周囲が暗状態の場合に運転者pの顔面を含む所定領域を照明する照明手段としての近赤外照明2と、後述する中央演算素子(CPU)からの出力を受け近赤外照明2を点灯あるいは消灯する照明制御手段3と、運転者pの撮像領域近傍の明るさを検出する明暗検出手段としての照度センサとから構成される。カメラ1は、X軸方向(水平走査軸方向)768×Y軸方向(垂直走査軸方向)493の計38万画素を有する2次元撮像手段としてのCCD1aと、映像信号処理回路1bと、撮像レンズ1cと、その撮像レンズ1cの前面光軸上に配置された可視光カットフィルタ1dとを有する。カメラ1はダッシュボード上あるいはインスツルメントパネル部等に配置して、前方より運転者pの顔を顔縦方向がX軸方向となる向きで撮影する。撮影角度は顔の正面やや斜め下からが目領域抽出のために最も有利である。近赤外照明2は、照明の放射軸がカメラ1の撮像軸に略同軸状に配置され、且つカメラ1に近接して配置されている。近赤外照明2は、光出力が数mW以下の小型の近赤外LEDをカメラ1に前述のごとく近接して数個設けて運転者pを照明する。あるいは、図示しないが照明手段として、カメラ1の撮像軸上にハーフミラーを設けて光軸を2分し、一方の光軸上に近赤外LEDを配置してハーフミラーを介して撮像軸と略同軸状に運転者pを照明するような同軸照射照明手段を用いることもできる。照度センサ4は車両のダッシュボードや後部窓下部等車両周囲の明るさを判定できる場所に設置される。
【0033】
画像処理部bは、映像信号処理回路1bや照度センサ4の出力側に接続され、映像信号処理回路1bのCCD撮像タイミング信号や照度センサ4の出力が入力される入力インタフェース(I/F)10と、映像信号処理回路1bの出力側に接続され、その映像出力が入力されるA/D変換器11と、そのA/D変換器11の出力に接続されたゲートアレイやディジタルシグナルプロセッサ(DSP)等からなる画像処理回路20と、その画像処理回路20に接続された画像メモリ12と、照明制御手段3に制御信号を送出する出力インタフェース(I/F)13と、中央演算素子(CPU)14と、各種のプログラムあるいは数値が記憶されているリードオンリメモリ(ROM)15と、演算中の値を一時的に記憶保持するランダムアクセスメモリ(RAM)16と、後段の種々の機器に接続される出力インタフェース(I/F)17とから構成される。入力インタフェース(I/F)10、A/D変換器11、画像処理回路20、画像メモリ12、出力インタフェース(I/F)13、ROM15、RAM16、出力インタフェース(I/F)17はCPU14とバス18により接続されている。
【0034】
尚、カメラ1及びA/D変換器11は本発明の画像入力手段を構成する。また、CPU14はROM15に記憶された制御プログラムを実行して、後述する明暗検出手段、目領域検出手段、瞬目検出手段、居眠り判定手段等の機能を果たすものである。
【0035】
図2は運転者状態検出のフローチャートであり、本図を基に実施の形態1の動作につき説明する。
先ず、ステップST10で画像入力手段はカメラ1で撮影された顔画像(例えば顔画像47)の映像信号を顔画像処理装置bのA/D変換器11によりA/D変換しディジタル階調画像に変換して、画像処理回路20に出力する。かかる顔画像の撮像時の初期状態においては近赤外照明2は消灯されている。
【0036】
次に、ステップST11においてノイズ除去手段としての画像処理回路20によりX軸方向の隣接した3画素の画素レベルを平均化し、高空間周波数のノイズを除去して、画像のざらつきを少なくした後、ステップST12で明暗検出手段は入力インタフェース10より照度センサ4の出力を読みとり、ステップST13で運転者の周囲環境が夜間、トンネル内等暗い状態即ち前記出力が暗状態であるか否かを判定する。ここで、暗状態でなければ、ステップST14で後述する黒レベル抽出フィルタ23(図3)は画像中よりX軸方向の所定画素長以下の領域の黒レベルを抽出するとともに、ステップST15で近赤外照明2が点灯されていれば、次のサイクルの撮像に備えて出力インタフェース13より照明制御手段3に消灯信号を送出して近赤外照明2を消灯し、暗状態であれば、ステップST16で同じく後述する白レベル抽出フィルタ24(図3)は画像中よりX軸方向の所定画素長以下の領域の白レベルを抽出するとともに、ステップST17で近赤外照明2が消灯されていれば、次のサイクルの撮像に備えて同様に照明制御手段3に点灯信号を送出して近赤外照明2を点灯する。
【0037】
続いて、ステップST18において2値化手段は黒レベル抽出フィルタ23あるいは白レベル抽出フィルタ24通過後の画像を浮動2値化して2値画像に変換する。上記の黒レベル抽出フィルタ23、白レベル抽出フィルタ24及び2値化手段は、後述のごとく画像処理回路20内にハードウェアにより構成されている。
【0038】
次に、ステップST19において、画像処理回路20から出力された2値画像は2値形式のフレームメモリとして画像メモリ12に記憶される。ステップST20において、目領域検出手段はかかる画像メモリ12に記憶された画像データを処理して画像中より目領域を検出し、ステップST21において、瞬目検出手段は目領域検出手段により検出された目領域の画像データにより目の開閉を判定する。ステップST22において、居眠り判定手段は、瞬目検出手段により検出された目の開閉パターンから居眠り状態の有無を判定し、居眠り状態と判定した場合、出力インタフェース17に信号を送り出し、例えば出力インタフェース17に接続した図示しない警報手段で運転者に警報を発するようにする。
【0039】
これら一連の動作はCCD撮像タイミング信号にあわせて、ROM15に記憶された命令によりCPU14で制御され、RAM16は制御、演算中の一時的なデータの記憶、保持に用いられる。
【0040】
次に、レベル抽出フィルタにつき図3以降を用いてさらに詳細に説明する。
図3は画像処理回路20のブロック図であり、21は3画素平均化フィルタで、前述のごとく高周波ノイズ成分を除去して入力画像のざらつきをなくし、22はレベル抽出フィルタの切り換え手段であり、明暗検出手段の出力でスイッチSW1によりフィルタを黒レベル抽出フィルタ23と白レベル抽出フィルタ24のいずれかに切り換える。
【0041】
黒レベル抽出フィルタ23は最大値(MAX)フィルタ201a、最小値(MIN)フィルタ202a、引き算器203aよりなる。先ず、最大値フィルタ201aは画像走査軸に沿ってある着目画素の前後のフィルタ長である所定画素長の各画素の画素レベルの最大値を前記着目画素の値とし、次に最小値フィルタ202aは最大値フィルタ201aの出力画像より、ある着目画素の左右の前記フィルタ長の各画素の画素レベルの最小値を前記着目画素の値とし、最後に引き算器203aで最小値フィルタ202aの出力画像より入力画像を引き算することにより、入力画像中より前記所定画素長以下の黒レベルのみを抽出する。
【0042】
他方、白レベル抽出フィルタ24は最小値フィルタ202b、最大値フィルタ201b、引き算器203bよりなる。先ず、最小値フィルタ202bで同様にフィルタ長である所定画素長の各画素の画素レベルの最小値をとり、次に最大値フィルタ201bで最小値フィルタ202bの出力画像より前記フィルタ長の各画素の画素レベルの最大値をとり、最後に入力画像より最大値フィルタ201bの出力画像を引き算するようにして、入力画像中より前記所定画素長以下の白レベルのみを抽出する。
【0043】
かかる黒、白レベル抽出フィルタ23、24の出力画像は、2値化手段26と2値化閾値演算手段25とに入力され、画像レベルより2値化閾値演算手段25により2値化閾値SHLが算出され、かかる2値化閾値SHLにより2値化手段26で2値化されて2値画像に変換される。
【0044】
ここで、黒レベルの抽出フィルタ23のフィルタ長は、画像上での平均的な目の上下幅に余裕度を掛けた画素長とし、本実施の形態では30画素長の値を用いている。また、白レベル抽出フィルタ24のフィルタ長は、画像上での平均的な瞳孔直径に同様に余裕度を掛けた画素長とし、本実施の形態では20画素長の値を用いている。
【0045】
図4は、従来例では2値化に失敗した日中の顔画像47の同一部分(線AOA'上)の画素レベルを、本実施の形態において黒レベル抽出フィルタ23を通過後、2値化するまでの各段階での変化を示している。3画素平均化フィルタ21を通過した画像f1の画素レベルは、最大値フィルタ201a、最小値フィルタ202aを通過後の画像f2では、フィルタ長以下の画素レベルがフィルタ長で切ったレベルに固定され、さらに画像f2から引き算器203aで画像f1の画素レベルを引くと、画像f3に示すように前記フィルタ長以下の領域の黒レベルのみが抽出される。従って、2値化閾値演算手段25により演算された閾値で2値化手段26により画像f3を2値化して得られた2値画像f4は、図5の2値画像40にも示すように、入力顔画像中より眉、目、鼻孔、口裂のみが抽出された2値画像となる。
【0046】
従って、太陽光による外乱即ち、太陽の高度や向き、木漏れ日下走行時等の周囲環境等によっては顔に陰影が生じるような場合でも、画像40のように眉、目、鼻孔、口裂という顔の特徴領域がはっきり抽出されるという利点がある。また、前記目の上下幅により設定したフィルタ長に対して顔縦方向に広い黒領域は抽出されないため、髪形等個人差の大きな頭髪部をはじめから除去でき、顔の個人差の影響を受けにくいという利点もある。
また、前述のごとく個人差の大きな頭髪部を除いて顔の特徴領域がはっきり抽出されるため、比較的簡単なアルゴリズムで顔画像より目を短時間で検出できる。
さらに、画像状態に応じてレベル抽出フィルタを切り換えて目を精度良く検出する。
【0047】
図6は運転者pの周囲が暗い状態で近赤外照明2を点灯させて運転者pを撮像した顔画像であり、近赤外照明2の出力が小さいため顔は撮像されないが、瞳孔は網膜反射により図のごとく明るく撮像される。このような場合には、図2のステップST12において明暗検出手段の出力によりフィルタ切り換え手段でスイッチSW1が白レベル抽出フィルタ24の側に切り換えられ、前記設定フィルタ長より上述のように白レベル抽出処理が行われて2値画像42に示すように瞳孔のみが抽出され、かかる瞳孔がステップST20で目領域検出手段により目として検出される。
【0048】
従って、夜間等の暗状態でも光量の小さな近赤外照明2のみで運転者pの顔面周辺を照明して顔を撮像すればよいため、光源が小型で且つ安価になるとともに、消費電力が小さいという利点がある。
【0049】
図7は最大値フィルタ201の回路構成図である。最大値フィルタ201は、1画素ずつ画素を遅延する画素遅延回路30(図では遅延回路30の一部を略している)と、遅延後の画素と遅延前の画素のレベルを比較して大きいレベルを出力する比較回路31とからなっている。入力端子DATA INからの画像入力信号を画素遅延回路30により制御端子CLOCKからの制御信号のタイミングで1画素遅延しつつ、比較回路31により隣接する画素レベルを順次トーナメント形式で比較していき、最終的にフィルタ出力FLT OUTから、図では遅延回路31の両端の節の数である20画素長の最大値が出力される。最小値フィルタ202も最大値フィルタ201と同様の回路で構成されているが、比較回路31は遅延後の画素と遅延前の画素のレベルを比較して小さいレベルを出力するものであり、最終的にフィルタ出力FLT OUTから、同じく20画素長の最小値が出力される。即ち、最大値フィルタ201及び最小値フィルタ202は、上記のように簡単な回路構成のハードウエアであり、また、引き算器203及び2値化手段26もハードウエアで構成され画像の走査と同一制御タイミングで処理されるため、目の検出のための顔の特徴領域抽出が安価にできるとともに、レベル抽出フィルタ処理、2値化処理がリアルタイムで高速に実行できる。
【0050】
実施の形態2.
上記実施の形態1においては、レベル抽出フィルタの切り換えに用いる明暗検出手段として照度センサ4を用いた場合を示したが、照度センサ4のような運転者pの周囲の明るさを検知する検知手段を用いずに、撮像した顔画像自体の明るさより明暗判定を行ってもよい。
【0051】
例えば、顔画像の映像信号をA/D変換したディジタル階調画像の画像レベルを全画素あるいは所定画素範囲にわたって積分して画像平均輝度を求め、かかる画像平均輝度で明暗判定をしてもよいし、図示しないが、カメラ1の映像信号処理回路1bに一般的に具備されている、画像輝度を基に映像信号の利得を制御する自動利得制御(AGC)回路の制御信号やCCD1aの画像蓄積時間を制御する電子シャッター回路の出力を、A/D変換器11や入力インタフェース10に入力して画像処理部bに取り込み、これらの信号より、例えばシャッター速度が1/60秒即ち開放状態で且つAGC制御信号が制御範囲を逸脱して高利得側に張り付いている場合を暗状態とし、それ以外の状態を明状態とする明暗判定を行ってもよい。
かかる場合においても実施の形態1と同等の効果を奏する。
【0052】
実施の形態3.
上記実施の形態1においては黒レベル抽出フィルタ23と白レベル抽出フィルタ24を各々別回路で構成した例を示したが、最大値フィルタ201及び最小値フィルタ202を各1回路配置し、かかる回路の接続順序を切り換えて上記2種類のレベル抽出フィルタを構成することもできる。
【0053】
図8は本発明の実施の形態3の画像処理回路の回路ブロック図であり、フィルタ切り換え手段22によってスイッチSW1、SW2を切り換えると共に引き算器203の引き算順序を切り換えることにより、黒レベル抽出フィルタ23と白レベル抽出フィルタ24とを構成する。図8のスイッチSW1、SW2の位置は黒レベル抽出フィルタ23を構成した場合を示しており、図示するごとく3画素平均化フィルタ21の出力画像即ちレベル抽出フィルタへの入力画像が、最大値フィルタ201、最小値フィルタ202の順に処理され、引き算器203で前記入力画像より最小値フィルタ202の出力画像が引き算されることにより黒レベル抽出フィルタとして機能する。フィルタ切り換え手段22によりスイッチSW1、SW2を反転させ、引き算順序を上記と切り換えれば、入力画像は最小値フィルタ202、最大値フィルタ201の順に処理され、引き算器203で最大値フィルタ201の出力画像より前記入力画像が引き算されて白レベル抽出フィルタ24として機能する。
【0054】
かかる実施の形態によれば、最大値フィルタ201、最小値フィルタ202、引き算器203を各々1ずつ省略できるため、回路規模が簡略化され装置をより安価に製造できるという利点がある。
【0055】
実施の形態4.
上記実施の形態3では、最大値フィルタ201及び最小値フィルタ202の接続順序を切り換えることにより2種類のレベル抽出フィルタを構成した場合を示したが、最大値フィルタ201、最小値フィルタ202の回路構成が同等であることに着目して、1種類のフィルタ回路で前記2種類のレベル抽出フィルタを構成ですることもきる。
【0056】
図9は本発明の実施の形態4の画像処理回路の回路ブロック図、図10は最大最小値(MAX/MIN)フィルタ204の回路構成図である。
図10においては、実施の形態1の図7と異なり、最大最小値フィルタ204の各比較回路32には、遅延回路30の入出力画素レベルの大小のいずれをとるかを選択する制御信号MAX/MINが入力されている。図10において、制御信号MAX/MINがMAX側にある場合には、各比較回路32は遅延回路30の入出力画素レベルの大きな方を選択するため、トーナメント比較階層の最終段出力であるフィルタ出力FLT OUTからはフィルタ長の画素レベルの最大値が出力される。逆に、制御信号MAX/MINがMIN側にある場合には、各比較回路32は遅延回路30の入出力画素レベルの小さな方を選択するため、出力FLT OUTからはフィルタ長の画素レベルの最小値が出力される。即ち最大最小値フィルタ204は制御信号MAX/MINの切り換えにより最大値フィルタ、最小値フィルタの双方の機能を持つ。
【0057】
図9に示すように、この実施の形態4の画像処理回路20aでは、かかる最大最小値フィルタ204を2つ直列に接続し、フィルタ切り換え手段22で制御信号MAX/MIN及び引き算器203の引き算順序を切り換えて黒レベル抽出フィルタ23と白レベル抽出フィルタ24とを構成する。即ち、黒レベル抽出フィルタ23として機能させたい場合は、1段目の最大最小値フィルタ204をMAX側に、2段目の最大最小値フィルタ204をMIN側にし、白レベル抽出フィルタ24として機能させたい場合は各段の最大最小値フィルタ204を各々逆側に切り換える。このとき引き算器203の引き算順序も実施の形態2と同様に切り換える。
【0058】
即ち、かかる実施の形態においても実施の形態3と同様の効果が得られるとともに、フィルタ切り換え用のスイッチSW1、SW2が省略でき、また同一の回路を使用するためより回路を簡略化できる。
【0059】
実施の形態5.
図11乃至図16は本発明の実施の形態5を表しており、この実施の形態5は2種類のレベル抽出フィルタのフィルタ切り換えを運転者pの顔画像からの目検出結果を基に行うようにしたものである。図11はこの実施の形態5の顔画像処理装置を用いた運転者状態検出のフローチャート、図12はレベル抽出フィルタを黒レベル抽出あるいは白レベル抽出に切り換えるフィルタ型切換判定手段のフローチャート、図13は目領域検出手段のフローチャートであり、図14乃至図16は目領域検出の画像での説明図で、図14は黒レベル抽出フィルタ処理した2値顔画像のX、Y軸ヒストグラム、図15は目の候補領域のX軸ヒストグラム、図16は白レベル抽出フィルタ処理した2値顔画像のX、Y軸ヒストグラムを各々示している。
【0060】
以下、本実施の形態について上記各図を用いて説明する。
図11において、先ずステップST30で装置起動時の初期設定状態であるか否かを判定し、初期設定状態であれば、ステップST31でレベル抽出フィルタを先ず黒レベル抽出フィルタ23とし、ステップST32で近赤外照明2を消灯しておく。初期設定状態でなければ、ステップST33で後述するフィルタ型切換判定手段のルーチンにおいて設定されるフィルタ切り換えフラグ(FLAG)が立っている(ON)か否(OFF)かを判定し、フィルタ切り換えFLAGがONであれば、ステップST34でレベル抽出フィルタをもう一方に切り換えるとともに、ステップST35で近赤外照明2の点灯、消灯を切り換える。フィルタ切り換えFLAGがOFFであれば、上記ステップST34、ステップST35を省略する。
【0061】
次に、図2と同様のステップST10からステップST11まで及びステップST18からステップST19までの処理を行った後、ステップST20において、後述する目領域検出手段がレベル抽出フィルタ処理後の2値顔画像より目を検出し、ステップST36でフィルタ型切換判定手段が目の検出結果に基づきレベル抽出フィルタを切り換えるべきか否かを判定してフィルタ切り換えFLAGを出力する。最後に、図2と同様にステップST21からステップST22までを実行する。
【0062】
フィルタ型切換判定手段の処理ルーチンは以下の通りである。
図12において、先ず、ステップST360で目領域検出手段により判定された目検出FLAGの状態を調べ、目検出FLAGがONであればステップST361でFLAG状態数NEFを1インクリメントし、OFFであればステップST362でNEFを1デクリメントする。即ち、FLAG状態数NEFは2値顔画像における所定の画像数Nでの目の検出成績を表しており、NEF=Nが検出確率100%、NEF=0が検出確率50%を示す。
【0063】
次に、ステップST363で所定期間経過したか否かを画像数で判定し、所定画像数N以上となった場合には、ステップST364でFLAG状態数NEFが最低許容目検出確率に相当するMINNEF以下であるか否かを判定し、MINNEF以下であった場合には、目の検出上現状のレベル抽出フィルタ処理が適合していないとして、ステップST365でフィルタ切り換えFLAGをONにする。NEFがMINNEFを越えていた場合には、現状のレベル抽出フィルタ処理が適合しているとして、ステップST366でフィルタ切り換えFLAGをONにする。最後に、ステップST367でFLAG状態数NEFを0にリセットする。ステップST363において所定画像数Nを経過していない場合には、ステップST364からステップST367までを省略してメインルーチンへ戻る。
【0064】
2値顔画像よりの目検出は以下のように行われる。
図13において、先ず、画像メモリ13に記憶された2値画像データを読み出し、ステップST200で各画像軸X、Y方向に沿った画素を画像軸Y、Xの各位置について積算したX軸ヒストグラムSUMX、Y軸ヒストグラムSUMYをそれぞれ求め、ステップST201で、
[式1] XFC=ΣiXiSUMX(Xi)/ΣiSUMX(Xi)
YFC=ΣjYjSUMX(Yj)/ΣjSUMX(Yj)
として顔重心FCの位置座標(XFC,YFC)を算出する。ここでΣiSUMX(Xi)=ΣjSUMX(Yj)であり、ΣjSUMX(Yj)は実際には計算を要しない。図14に黒レベル抽出フィルタ23で処理した2値画像40、図16に白レベル抽出フィルタ23で処理した2値画像42の各々SUMX、SUMY、顔重心FC401を示している。
【0065】
次に、ステップST202でレベル抽出フィルタ処理が明状態処理即ち黒レベル抽出フィルタ処理であるか否かを調べ、明状態処理の場合には、ステップST203以降を実行する。
【0066】
図14に示すように、黒レベル抽出フィルタ23で処理された2値画像40においては、頭髪を除いた眉、目、鼻孔、口裂という顔の特徴領域が抽出されるため、顔重心FC401の近くに略左右対称に目領域が存在する。そこで、ステップST203で顔重心位置座標(XFC,YFC)を基に一組の矩形の候補存在領域402を設定して目の候補の検索領域を限定し、ステップST204で候補存在領域402内のY軸ヒストグラムSUMYが所定の閾値SHL以上の領域EABを候補領域403として設定する。図では眉領域に相当するEAB1と目領域に相当するEAB2が設定される。
【0067】
続いて、ステップST205で候補領域EAB403中に目領域が存在するか否かを判定する。目領域の判定方法は、図15に示すように、候補存在領域402内の各候補領域EAB403のX軸ヒストグラムSUMXを求め、その最大値SUMXMAXと半値幅EAWを基に目領域を判定する。目領域は、図示のごとく、顔の他の特徴領域に比べ最大値SUMXMAXが大きく、半値幅EAWが小さいという特徴があり、かかる特徴に着目して目領域を判定している。他方の候補存在領域402内の各候補領域EAB403についても同様の判定が行われる。
【0068】
最後に、ステップST205で目領域が存在すると判定した場合には、ステップST206で目検出FLAGをONにし、逆に目領域が存在しないと判定した場合には、ステップST207で目検出FLAGをOFFにして処理をメインルーチンに戻す。
【0069】
他方、ステップST202でレベル抽出フィルタ処理が明状態処理でない場合、即ち白レベル抽出フィルタ処理の場合には、ステップST208以降を実行する。図16に示すように、白レベル抽出フィルタ24で処理された2値画像42においては、殆ど瞳孔領域のみが抽出されており、やはり顔重心FC401の近くに略左右対称に瞳孔領域が存在する。そこで、ステップST208で前述と同様に顔重心FC401を基に一組の矩形の候補存在領域402を設定して瞳孔の候補の検索領域を限定し、ステップST209で同様に候補領域EAB403を設定し、ステップST210で候補領域EAB403中より瞳孔領域を判定する。瞳孔領域は、候補領域EAB403のX軸ヒストグラムSUMXの幅と、Y軸ヒストグラムSUMYの幅と、その比及び一組の候補存在領域402内のX軸ヒストグラムSUMXのピーク位置YPR、YPL間の距離DOEより判定している。
【0070】
最後に、ステップST210で瞳孔領域が存在すると判定した場合には、同様にステップST206で目検出FLAGをONにし、逆に瞳孔領域が存在しないと判定した場合には、同様にステップST207で目検出FLAGをOFFにして処理をメインルーチンに戻す。
【0071】
かかる実施の形態においても、実施の形態1と同様の効果があるとともに、2種類のレベル抽出フィルタのフィルタ切り換えをその結果である顔画像よりの目検出結果でフィードバックして行うようにしたため、レベル抽出フィルタの選定が的確にでき、より確実に目が検出できるという利点がある。
【0072】
実施の形態6.
実施の形態5では2種類のレベル抽出フィルタのフィルタ切り換えを顔画像よりの目検出結果を基に行うようにしたが、目検出の前段階でフィルタ切り換えの判定が可能である。
【0073】
図17及び図18は本発明の実施の形態6を表しており、この実施の形態6はレベル抽出フィルタの出力顔画像中の抽出画素領域の割合によりレベル抽出フィルタの切り換えを行うようにしたものである。図17は実施の形態6の顔画像処理を用いた運転者状態検出のフローチャート、図18は図17のフィルタ切換型判定手段のフローチャートである。
【0074】
図17において、図11のステップST30からステップST35まで、ステップST10からステップST11まで及びステップST18からステップST19までの処理を行った後、ステップST40で後述するフィルタ型切換判定手段が、レベル抽出フィルタの出力顔画像中の抽出画素領域の割合によりレベル抽出フィルタを切り換えるべきか否かを判定してフィルタ切り換えFLAGを出力する。
【0075】
フィルタ型切換判定手段の処理ルーチンは以下のようである。
図18において、先ず、ステップST400で2値画像データを読み出し、2値画像のX軸ヒストグラムSUMX、Y軸ヒストグラムSUMYを求め、ステップST401でX軸ヒストグラムSUMX、Y軸ヒストグラムSUMYにおける極大ピークの内各々極大値が所定の閾値SHLX、SHLY(図示せず)を越える極大ピークの数NPX、NPYを求める。かかるピーク数NPX、NPYは後述のごとくレベル抽出フィルタ処理した2値画像の複雑さを示すものである。
【0076】
次に、ステップST402でレベル抽出フィルタ処理が明状態処理か否かを調べ、明状態処理の場合はステップST403以降でピーク数NPX、NPYの数を調べる。日中の明るい状態で黒レベル抽出フィルタ23処理された2値画像では、図14に示すように、顔の各特徴領域に相当する黒画素領域が多数抽出され、ヒストグラムSUMX、SUMYの大きな極大ピークが4カ所以上存在する。しかしながら、周囲が暗くなると入力画像のコントラストが極めて悪化するため、全体に幅の広い黒領域となって、黒レベル抽出フィルタ23の処理では、全く黒画素領域が抽出されないか、黒画素領域が抽出されても抽出画像のコントラストが極めて小さく2値化ができないため、抽出領域の数が少なくなる。従って、ヒストグラムSUMX、SUMYの大きな極大ピークは出現しないか、出現しても極めて数が少なくなる。
【0077】
そこでステップST403において、先ずX軸ヒストグラムSUMXのピーク数NPXが所定値NPXB以下か否かを調べ、NPXB以下であれば、ステップST404でY軸ヒストグラムSUMYのピーク数NPYが所定値NPYB以下か否かを調べ、NPYB以下であれば、レベル抽出フィルタが画像状態に適合していないとしてステップST405でフィルタ切り換えFLAGをONにし、これ以外の場合には、ステップST406でフィルタ切り換えFLAGをOFFにして、メインルーチンに戻す。
【0078】
他方、ステップST402でレベル抽出フィルタ処理が明状態処理でない場合には、ステップST407以降でピーク数NPX、NPYの数を調べる。夜間等の暗い状態で白レベル抽出フィルタ24により処理された2値画像では、図16に示すように、殆ど瞳孔領域の白画素領域のみが抽出され、ヒストグラムSUMX、SUMYの大きな極大ピークの数は極めて少ない。しかしながら、周囲が明るくなると太陽光により顔の造作が映る状態となり、瞳孔領域が相対的に暗く撮像され、白レベル抽出フィルタ24の処理では額や頬の一部、鼻頭、白目領域等の白画素領域が抽出されるようになって、抽出領域の数が増え、SUMX、SUMYは多数のピークを持つ複雑なヒストグラムとなる。
【0079】
そこでステップST407において、先ずX軸ヒストグラムSUMXのピーク数NPXが所定値NPXD以上か否かを調べ、NPXD以上であれば、ステップST408でY軸ヒストグラムSUMYのピーク数NPYが所定値NPYD以上か否かを調べ、NPYD以上であれば、レベル抽出フィルタがやはり画像状態に適合していないとしてステップST405でフィルタ切り換えFLAGをONにし、これ以外の場合は、ステップST406でフィルタ切り換えFLAGをOFFにして、メインルーチンに戻す。
【0080】
次に、図17のメインルーチン上のステップST41でフィルタ切り換えFLAGがONか否かを調べ、ONであれば画像状態が前述のごとく目検出に適合していないため、ステップST20の目領域検出手段を省略してステップST42で目検出FLAGをOFFにして後処理に移る。フィルタ切り換えFLAGがOFFであれば、ステップST20の目領域検出手段を実行後、後処理に移る。
【0081】
かかる実施の形態においても、実施の形態5と同様の効果があるとともに、レベル抽出フィルタ処理が目の検出に適合していない場合には、目領域検出手段を省略して処理するようにするとともに、ハードウエア化による高速処理が容易なヒストグラム演算の結果でレベル抽出フィルタの切り換え判定を行うようにしたため、顔画像処理がより高速化されるという利点がある。
【0082】
実施の形態7.
尚、上記実施の形態においては、X軸ヒストグラムSUMX、Y軸ヒストグラムSUMYの各所定閾値SHLX、SHLY以上の極大ピークのピーク数NPX、NPYによりレベル抽出フィルタの切り換え判定をするようにしたが、前記極大ピークのピーク数NPX、NPYと各極大値PXi、PYiの双方で評価関数を作成し、かかる評価関数で切り換え判定をするようにしてもよい。図示しないが、例えば評価関数EFとして、k1、k2を所定の重み係数とした、
[式2] EF=k1*(NPX+NPY)+k2*Σi(Pxi+Pyi)
を用いて、明状態処理時には、前記EFが所定値以下であればフィルタ切り換えFLAGをONにし、暗状態処理時には、前記EFが所定値以上であればフィルタ切り換えFLAGをONにする。
【0083】
さらに、レベル抽出フィルタ処理後の2値画像において、画像の全画素数NTに対する画像中の2値レベルの和ΣNの比ΣN/NTの大小、即ち画像中における抽出領域の面積の割合SDにより、前記SDが明状態処理時には所定値以下、暗状態処理時には所定値以上であれば、フィルタ切り換えFLAGをONにするようにしてもよい。また、抽出領域の数をラベリング等他の画像処理手段を用いて算出して切り換え判定するようにしてもよい。
かかる実施の形態においても、実施の形態6と同様の効果を奏する。
【0084】
実施の形態8.
図19乃至図23は本発明の実施の形態8を表しており、この実施の形態8は、レベル抽出フィルタのフィルタ長を運転者pとカメラ1との距離に応じて可変にすることにより目をより精度良く抽出する顔画像処理装置の例を示すものである。図19は実施の形態8の顔画像処理を用いた運転者状態検出のフローチャート、図20は図19におけるフィルタ長設定手段のフローチャート、図21は運転者pと撮像部a’との距離検出部の構成図、図22は可変長フィルタを含む画像処理回路の回路ブロック図、図23はフィルタ長可変MAXあるいは最小値フィルタの回路構成図である。
【0085】
以下、本実施の形態を上記各図を用いて説明する。
図19において、最初に、ステップST50でフィルタ長設定手段によりレベル抽出フィルタのフィルタ長を設定する。
【0086】
画面中での顔画像の大きさは運転者pと撮像部a’との距離Lに反比例することから、レベル抽出フィルタ長が一定の場合には、距離Lが近い場合、目領域の画面での大きさがフィルタ長より大きくなって目領域が抽出されなくなる。
【0087】
そこで図20に示すように、フィルタ長設定手段は、先ずステップST500で運転者pと撮像部a’との距離Lを検出し、ステップST501で黒レベル抽出フィルタ長BFL、白レベル抽出フィルタ長DFLを、予め記憶された平均的運転姿勢から求めた基準距離L0、その基準距離L0での平均的顔画像より求めた各レベル抽出フィルタの基準長BFL0、DFL0を基にして、各々
[式3] BFL=BFL0*L0/L
DFL=DFL0*L0/L
により算出し、ステップST502で前記フィルタ長BFL、DFLに最も近いフィルタ長に設定されるよう、後述するマルチプレクサの制御コードであるフィルタナンバーBN、DNを選定するとともに、ステップST503でフィルタ長切り換えFLAGをONにしてメインルーチンに戻す。
【0088】
運転者pと撮像部a’との距離Lは、図21に示すように、撮像部a’に設けられた距離検出部5により検出される。距離検出部5は近赤外光源51、バンドパスフィルタ52、レンズ53、一次元光位置検知素子(PSD)54、距離演算回路55からなっている。ここで、一次元光位置検知素子(PSD)54は素子上への光の入射位置に応じた電気出力を生じる受光素子であり、バンドパスフィルタ52は近赤外光源51の波長に合わせた透過帯を持ち、近赤外光源51とレンズ53の光軸は平行で基準長DBだけ離れている。
【0089】
かかる構成にて、近赤外光源51の放射光を運転者pに当て、運転者pからの拡散反射光をバンドパスフィルタ52を介してレンズ53により一次元光位置検知素子(PSD)54上に集光させる。距離Lは一次元光位置検知素子(PSD)54上の集光位置DXより、三角測量の原理を用いて距離演算回路55で、
[式4] L=f*DB/DX
として求めて、実施の形態1と同様の画像処理部b(図1)に距離Lのデータを送出する。
【0090】
図19において、ステップST50で上述のごとくレベル抽出フィルタのフィルタ長を設定し、図2と同様のステップST10からステップST12までを実行した後、ステップST51で運転者の周囲環境が暗状態であるか否かを判定し、暗状態でなければ、ステップST52でフィルタ長切り換えFLAGがONか否かを調べる。ONであれば、ステップST53で黒レベル抽出フィルタ23をフィルタ長設定手段で設定したフィルタ長BFL対応のフィルタナンバーBNに切り換え、ONでなければ、ステップST53を省略して以前の設定フィルタ長のままとし、ステップST54で黒レベル抽出フィルタ23により画像中より前記フィルタ長BFL以下の領域の黒レベルを抽出し、ステップST55で近赤外照明2を消灯する。
【0091】
ステップST51で暗状態と判定された場合は、同様にステップST56でフィルタ長切り換えFLAGがONか否かを調べ、ONであれば、ステップST57で白レベル抽出フィルタ24をフィルタ長DFL対応のフィルタナンバーDNに切り換え、ONでなければ、ステップST57を省略して以前の設定フィルタ長のままとし、ステップST58で白レベル抽出フィルタ24により画像中より前記フィルタ長DFL以下の領域の白レベルを抽出し、ステップST59で近赤外照明2を点灯する。この後、実施の形態1のステップST18以下と同じ処理を行ってメインルーチンを終了する。
【0092】
図22に示すように、この実施の形態の画像処理回路20bの黒レベル抽出フィルタ23a及び白レベル抽出フィルタ24aは上記各実施の形態と同様にハードウエアで構成されており、黒レベル抽出フィルタ23aは、フィルタ長BFL切り換え手段27aの出力側に接続された最大値フィルタ205a及び最小値フィルタ206aと引き算器203aとよりなり、白レベル抽出フィルタ24aは、同じくフィルタ長BFL切り換え手段27bの出力側に接続された最小値フィルタ206b及び最大値フィルタ205bと引き算器203bとよりなる。
【0093】
黒レベル抽出フィルタ23aは、先ず最大値フィルタ205aによりフィルタ長BFL切り換え手段27aで指定されたフィルタナンバーBNに相当する画素長の画素レベルの最大値をとり、次に最小値フィルタ206aにより最大値フィルタ205aの出力画像より、同様にフィルタナンバーBNに相当する画素長の画素レベルの最小値をとり、最後に引き算器203aで最小値フィルタ206aの出力画像より入力画像を引き算するようにして、入力画像中より前記フィルタナンバーBNで指定した画素長以下の黒レベルのみを抽出する。
【0094】
他方、白レベル抽出フィルタ24aは、最小値フィルタ206bで同様にフィルタ長DFL切り換え手段27bで指定されたフィルタナンバーDNに相当する画素長の画素レベルの最小値をとり、次に最大値フィルタ205bで最小値フィルタ206bの出力画像より、フィルタナンバーDNに相当する画素長の画素レベルの最大値をとり、最後に入力画像より最大値フィルタ205bの出力画像を引き算するようにして、入力画像中より前記フィルタナンバーDNで指定した画素長以下の白レベルのみを抽出する。
【0095】
この実施の形態の画像処理回路20bの上記以外の構成、作用は実施の形態1の画像処理部20の構成と同様である。
【0096】
図23はかかるフィルタ長可変のMAXあるいは最小値フィルタの回路構成図を示しており、33はマルチプレクサで、ここでは5つの画素遅延回路30の内の3つの画素遅延回路30の入出力4つの内より1つを選択して出力するマルチプレクサ33を6回路用いた最大値フィルタの例を示している。各マルチプレクサ33には、フィルタ長をフィルタナンバーとして指定する制御信号MPCNTが入力されており、比較回路31は各5つの画素遅延回路30の入力とマルチプレクサ33の出力をトーナメント形式で比較して大きい側の画素レベルを出力する。
【0097】
かかる回路において、制御信号MPCNTがフィルタナンバー1を指示した場合には、先ず1段目のマルチプレクサ33は最初の画素より5画素遅延した画素レベルを出力し、1段目の比較回路31は前記最初の画素と前記5画素遅延した画素とを比較して大きい方の画素レベルを出力し、2段目の比較回路31は1段目の比較結果とさらに5画素遅延した2段目のマルチプレクサ33の出力を比較し、このような具合に順次トーナメント形式で比較していって最終的に出力FLT OUTより5画素飛びに比較した31画素長の最大値が出力される。例えば、フィルタナンバー3を指示した場合には、3画素飛びに比較した19画素長の最大値が出力される。即ち、かかる最大値フィルタでは制御信号MPCNTによりフィルタ長が13画素長より31画素長まで6画素長おきに4段階に可変される。
【0098】
尚、フィルタ長可変の最小値フィルタも比較回路31で小さい側の画素レベルを出力するようにして、同様に構成される。
【0099】
かかる実施の形態においては、運転者pと撮像部a’との距離Lに応じ画面中での顔画像の大きさに合わせてレベル抽出フィルタのフィルタ長を変化させるようにしたため、運転者の運転姿勢に係わらず目を確実に検出できるという利点がある。
【0100】
尚、上記実施の形態においては、フィルタ長可変の黒レベル抽出フィルタ23a、白レベル抽出フィルタ24aをフィルタ長制御信号MP CNTを設けた別々の最大値フィルタ205a、205b、最小値フィルタ206a、206bを用いて構成した場合を示したが、実施の形態3の図8の最大値フィルタ201、最小値フィルタ202あるいは、実施の形態4の図9の最大最小値フィルタ204をフィルタ長制御信号MP CNTを設けたフィルタで構成して黒レベル抽出と白レベル抽出を切り換えるようにしてもよい。
【0101】
実施の形態9.
上記各実施の形態においては、運転者pと撮像部a、a’との距離Lを距離センサを用いて直接検出する場合につき示したが、距離Lを間接的に求めるようにしても良い。
【0102】
図24は運転席の模式図、図25は距離L算出のフローチャートであり、6は距離検出部で、運転席のシート座部61の前後方向位置Xがシート座部61に内蔵された変位センサ62で求められ、シート背もたれ部63の角度θがシート座部61とシート背もたれ部63のピボット部に内蔵された角度センサ64により求められて、画像処理装置bに送出されて距離Lが演算される。
【0103】
画像処理部bでは、図25に示す距離L演算ルーチンにおいて、ステップST5000で変位センサ62よりシート位置Xを、ステップST5001で角度センサ64よりシート角度θを読み込み、ステップST5002で運転者pと撮像部aとの距離Lが、予め記憶されているシート座部61の基準位置X0、シート背もたれ部63のヘッドレスト部までの長さHL、人の頭の平均的な前後厚HD、撮像装置aの仰角φを用いて、
[式5] L=(X+X0+HL*sinθ−HD)/cosφ
で算出される。
かかる実施の形態においても、実施の形態8と同様の効果を奏する。
【0104】
実施の形態10.
図26及び図27は本発明の実施の形態10を表しており、この実施の形態10はレベル抽出フィルタのフィルタ長を画像中での目領域あるいは瞳孔領域の大きさに応じて可変にすることにより、目をより精度良く抽出する顔画像処理装置の例を示すものである。図26は実施の形態10のフィルタ長設定手段のフローチャート、図27はフィルタ長設定手段におけるフィルタ長学習手段のフローチャートである。
【0105】
以下、本実施の形態を上記各図を用いて説明する。
図26において、先ずステップST510で顔画像処理装置が起動直後状態であるか否かを調べ、起動直後であればステップST511で黒レベル抽出フィルタ23、白レベル抽出フィルタ24のフィルタ長を予め記憶している各初期値FL0に設定する。初期値FL0は黒レベル抽出フィルタ23、白レベル抽出フィルタ24につき顔画像上での各々人の平均的な開眼時の目領域の上下幅、瞳孔の直径に相当する画素長に各々所定の係数を掛けた値に設定する。
【0106】
装置が起動直後でなければ、ステップST512で装置起動後所定時間経過しているか否かを調べる。運転者の覚醒が低下すると、開眼時においても次第に上瞼が下がって目領域の上下幅が小さくなるが、これに合わせてフィルタ長を短くしていくと、何らかの刺激で一時的に運転者の覚醒水準が上がり、目領域の上下幅が突然大きくなった場合には、レベル抽出フィルタでの目の抽出ができなくなる。そこで、レベル抽出フィルタ長の設定を装置起動後の運転者の覚醒状態において行い、装置起動後から所定時間経過した時、ステップST513でフィルタ長切り換えFLAGをOFFにし、これ以降のフィルタ長の更新を禁止する。装置起動後所定時間経過していなければ、ステップST520で後述するフィルタ長学習手段の処理ルーチンを行う。
【0107】
次に、ステップST521で所定の画像数N処理したか否かを判定し、画像処理数がNに達していない場合には、ステップST522で一つ前の画像での目検出手段ST20における目検出FLAGがONであるか否かを判定し、ONである場合には、ステップST523で目検出FLAG状態数NEFを1インクリメントし、ONでない場合には、ステップST524でNEFを1デクリメントした後、ステップST513でフィルタ長切り換えFLAGをOFFしてメインルーチンに戻す。
【0108】
画像処理数がNに達した場合には、ステップST525で所定画像数N内での目の検出成績を表す目検出FLAG状態数NEFを前回のFLAG状態数NEFOLDと比較し、NEFがNEFOLDより大ならば、フィルタ長切り換えによる効果が見られるものとして、より検出成績が向上することを期待してステップST526で前記フィルタ長学習手段で求めたフィルタ長FLに対応するフィルタナンバーFNを選択し、ステップST527でフィルタ長切り換えFLAGをONにしてフィルタ長を変え、逆にNEFがNEFOLD以下ならば、ステップST528でフィルタ長切り換えFLAGをOFFにする。最後に、ステップST529でNEFをNEFOLDに代入してNEFOLDを更新するとともに、NEFをクリアしてメインルーチンに戻す。
【0109】
フィルタ長学習手段の処理ルーチンは図27に示す通りであり、ここでは黒レベル抽出フィルタ23により処理した画像につき説明する。
先ず、ステップST5200で目検出FLAGがONか否か、ステップST5201で目領域が開眼状態であるか否かを調べ、目検出FLAGがONで目領域が開眼状態である場合のみ以下の処理を実行し、そうでない場合にはファイル長設定手段のルーチンに戻す。
【0110】
ステップST5202では、目領域検出手段によりST20で検出された2値顔画像の目領域の内、開眼状態の目領域の顔縦方向のヒストグラム、即ちX軸ヒストグラムSUMXの最大値SUMXMAXの最新の記憶値MSUMXMAXを読み出す。図15に示すように、SUMXMAXは開眼時の目領域の上下幅の画素長に等しい。次に、ステップST5203で同様に最新の開眼状態の目領域のSUMXMAXを読み出し、ステップST5204でSUMXMAXより記憶値MSUMXMAXを引き算し、ステップST5205でSUMXMAXが記憶値MSUMXMAXより大ならば、ステップST5206でMSUMXMAXをSUMXMAXで更新する。
【0111】
最後に、ステップST5207で画像数が所定の画像数Nに達したか否かを調べ、上記画像数がN以上である場合には、ステップST5208で画像数Nにおける開眼状態の目の上下幅の画素長の最大値を示すMSUMXMAXに所定の余裕幅FLOを加えた画素長FLを黒レベル抽出フィルタ23のフィルタ長FLとして設定し、ステップST5209でMSUMXMAXをクリアする。画像数がNに達しない場合には、ファイル長設定手段のルーチンに戻す。画像数Nは学習の効果を見ながら数百から千程度の任意の値に設定しておけばよい。
【0112】
前述したごとく、上記においては黒レベル抽出フィルタ23にて処理した目領域の検出結果より黒レベル抽出フィルタ23のフィルタ長FLを設定する場合につき示したが、白レベル抽出フィルタ24のフィルタ長FLについても、白レベル抽出フィルタ24で処理した画像につき上記と同じ処理を行って、開眼と判定された瞳孔領域のヒストグラムの画像数Nでの最大値MSUMXMAXを用いて全く同様に設定できる。
【0113】
かかる実施の形態においては、レベル抽出フィルタのフィルタ長を目領域検出手段で検出された目領域の上下幅あるいは瞳孔領域の大きさの関数値として設定したため、運転者の目の大きさの個人差による影響を排除して目を確実に検出できるという利点がある。
【0114】
また、前記関数値を目領域検出手段で検出された目領域の上下幅あるいは瞳孔領域の大きさの所定期間における最大値を基に設定したため、運転者の目の動きに拘わらず目をより確実に検出できるという利点がある。
【0115】
また、目検出の頻度の向上、低下を学習しフィルタ長の設定の更新を決定するようにしたため、目検出の頻度が最も高くなる最適なフィルタ長の設定が可能となる。
【0116】
さらに、顔画像処理装置の起動後の運転者の覚醒度の高い所定期間のみフィルタ長の更新を行い、以後は最新の更新フィルタ長を用いるようにしたため、運転者の覚醒が低下した状態でも、誤り無く目を確実に検出できるという利点がある。
【0117】
尚、上記実施の形態においては、フィルタ長FLを目領域の上下幅あるいは瞳孔領域の大きさの所定期間における最大値に所定値を加えた値としたが、前記最大値に所定係数を掛けた値等、前記最大値を基にした他の関数形を用いても良い。
【0118】
実施の形態11.
図28は本発明の実施の形態11を表しており、この実施の形態11は、目領域の上下幅あるいは瞳孔領域の大きさの所定期間における最大頻度値を基にレベル抽出フィルタのフィルタ長FLを設定する場合を示している。
【0119】
図28は、実施の形態11におけるフィルタ長学習手段のフローチャートであり、先ず実施の形態10と同様に、ステップST5220で目検出FLAGがONか否か、ステップST5221で目領域が開眼状態であるか否かを調べ、目検出FLAGがONで目領域が開眼状態である場合のみ、ステップST5223で目領域あるいは瞳孔領域のX軸ヒストグラムSUMXの最大値SUMXMAXを読み出す。次いで、ステップST5223でSUMXMAXの度数分布HIST(SUMXMAX)を演算し、ステップST5224で画像数がNに達したことを判定する。ステップST5225で所定画像数N内でのSUMXMAXの度数分布HISTの最大値をMHISTとし、度数分布HISTの標準偏差をSHISTとして、ステップST5226でレベル抽出フィルタのフィルタ長FLを、所定の重み係数K1、K2を用いて、
[式6] FL=K1*MHIST+K2*SHIST
により設定する。最後に、ステップST5227で度数分布HISTをクリアしておく。
かかる実施の形態においても、実施の形態10と同等の効果を奏する。
【0120】
上記実施の形態では、フィルタ長FLを所定期間における目領域の上下幅あるいは瞳孔領域の大きさの最大頻度値及び標準偏差を基に設定した場合を示したが、最大頻度値のみを用いて設定しても良いし、最大頻度値の代わりに度数分布HISTの平均値あるいは中央値を、標準偏差の代わりに分散を用いても良い。この場合、重み係数K1、K2は当然、用いる特性値により変更される。
【0121】
上記実施の形態10、11においては、レベル抽出フィルタのフィルタ長を目の検出結果による画像中での目領域あるいは瞳孔領域の大きさに応じて可変にするようにしたが、運転者pとカメラ1との距離Lに応じて先ずフィルタ長を変更させた後、前記目の検出結果によるフィルタ長の可変を行うようにしてもよい。
【0122】
実施の形態12.
図29はレベル抽出フィルタのフィルタ長を可変する他の構成の可変MAXあるいは最小値フィルタの回路構成図である。最大値フィルタとするか最小値フィルタとするかは、前述のごとく、比較回路31で大きい側の画素レベルを出力させるか、小さい側の画素レベルを出力させるかにより変更されるが、以下最大値フィルタとして説明する。
【0123】
図29では、全画素長20の最大値を出力するよう19階層の二つの入力の大きい側の画素レベルを出力する比較回路31を設け、比較回路31の9、11、13、15、17、19階層目の出力をマルチプレクサ33に入力して、マルチプレクサ33よりかかる6入力の内の一つをFLT OUTとして出力する最大値フィルタの例を示している。
【0124】
かかる回路において、制御信号MPCNTが例えばフィルタナンバー4を指示した場合には、13階層目の比較回路31の出力が選択され14階層目以降は無視されるため、出力FLT OUTより連続した14画素長の最大値が出力される。また、フィルタナンバー1では、最高階層の比較出力が選択されて連続した20画素長の最大値が出力される。即ち、かかる可変長フィルタでは制御信号MPCNTによりフィルタ長が10画素長より20画素長まで2画素長おきに6段階に可変される。
【0125】
かかる実施の形態においても、実施の形態8と同じように可変フィルタ長のレベル抽出フィルタを構成できるのみでなく、実施の形態8の図23に示される可変MAXあるいは最小値フィルタに比較し、連続した画素の最大あるいは最小を検出するため画像分解能が落ちず、また、回路構成の複雑なマルチプレクサ33が一つで済むため全体の回路構成を簡略化でき、フィルタ回路を安価に構成できるという利点がある。
【0126】
実施の形態13.
図30はレベル抽出フィルタのフィルタ長を可変にするさらに他の構成の可変MAXあるいは最小値フィルタの回路構成図である。
図30において、スイッチ34には、比較回路31の出力信号と比較回路31の後側の入力信号とが接続され、デコーダ35の1ビット制御信号に応じて、制御信号が1であれば前記比較回路31の後側の入力信号を、0であれば前記比較回路31の出力信号を出力する。即ち、デコーダ35の制御信号が1であれば、かかる制御信号が入力されたスイッチ34以前の比較結果が無視される構成となっている。図30では、かかる比較回路31とスイッチ34の組が4層積層されている。デコーダ35には、フィルタ制御コード信号CODEが入力され、コード信号CODEに従って4つのスイッチ34の一つに1を出力する。
【0127】
かかる回路において、例えばコード信号CODEが2層目のスイッチ34を1とした場合、4層目の比較回路31の出力が無視されるため、最初の画素より4画素遅延した画素がフィルタの入力画素となり、これ以降の遅延画素で比較が行われるため、フィルタ長は16画素長となる。即ち、かかる可変長フィルタでは、コード信号CODEによりフィルタ長が12画素長より18画素長まで2画素長おきに4段階に可変される。
【0128】
かかる実施の形態においても、実施の形態12と同様の効果を奏するのみでなく、回路構成の複雑なマルチプレクサ33を使用しないため全体の回路構成をさらに簡略化でき、フィルタ回路をさらに安価に構成できるという利点がある。
【0129】
実施の形態14.
図31及び図32は本発明の実施の形態14を表しており、この実施の形態14は顔画像の画像軸の両方にレベル抽出フィルタ処理を行って目を検出する顔画像処理装置の例を示すもので、図31は実施の形態14の顔画像処理を用いた運転者状態検出のフローチャート、図32は実施の形態14の顔画像処理の画像での説明図である。以下、本実施の形態を上記各図と前述の図を援用して説明する。
【0130】
図31において、先ず、ステップST10よりステップST12を実行後、ステップST13で明暗検出手段の出力が暗状態であるか否かを判定し、暗状態でなければ階調画像信号は2分されて、一方の階調画像信号は、ステップST60で画像上での目の上下幅より広い所定画素長のフィルタ長を有する第一の黒レベル抽出フィルタ23で画像中よりX軸方向の前記フィルタ長以下の領域の黒レベルを抽出するとともに、ステップST15で近赤外照明2を消灯し、ステップST18において2値化手段で前記第一の黒レベル抽出フィルタ23通過後の画像を浮動2値化して2値画像に変換し、ステップST19において、2値画像は2値画像フレームメモリに記憶される。他方の階調画像信号は、ステップST61において画像フレームメモリに一旦記憶され、ステップST62で前記画像フレームメモリをX軸に垂直なY軸方向に走査して、画像上での黒目領域の直径より広い所定画素長のフィルタ長を有する第二の黒レベル抽出フィルタ23で画像中よりY軸方向の前記フィルタ長以下の領域の黒レベルを抽出し、ステップST15で近赤外照明2を消灯し、ステップST18において2値化手段で前記第二の黒レベル抽出フィルタ23通過後の画像を浮動2値化して2値画像に変換する。
【0131】
次に、ステップST63で画像論理積演算手段により、前記2値画像フレームメモリに記憶されたX軸方向のレベル抽出処理後の2値画像を、前記Y軸方向のレベル抽出処理後の2値画像のY軸方向に同期走査して、これら二つの2値画像の画像論理積を演算し、かかる演算結果によりステップST19で前記2値画像フレームメモリの内容を更新する。
【0132】
ステップST13で明暗検出手段の出力が暗状態であれば、ステップST16で画像上での瞳孔直径により広い所定画素長のフィルタ長を有する白レベル抽出フィルタ24で画像中よりX軸方向の前記フィルタ長以下の領域の白レベルを抽出するとともに、ステップST17で近赤外照明2を点灯し、ステップST18において2値化手段で白レベル抽出フィルタ24通過後の画像を浮動2値化して2値画像に変換し、ステップST19において2値画像フレームメモリに記憶する。
【0133】
続いて、ステップST20において、目領域検出手段は更新された2値画像フレームメモリに記憶された画像データを処理して画像中より目領域を検出し、目領域検出結果に基づき実施の形態1と同様にステップST21、22が処理され、運転者の居眠り状態の有無を判定して運転者に警報を発する。
【0134】
図32は眼鏡を着装した運転者pの明状態での顔画像の、画像処理の各段階での変化を示したものである。ステップST60において第一の黒レベル抽出フィルタ処理されステップST18で2値化された2値顔画像44は、入力画像である原画43に対しX軸方向に目の上下幅よりかなり広い黒領域である髪、眼鏡の横枠部分等が除去される。これに対して、ステップST62で第二の黒レベル抽出フィルタ処理されステップST18で2値化された2値顔画像45は、Y軸方向に黒目幅よりかなり広い黒領域である髪、眉、口裂、眼鏡の縦枠部分等が除去されている。ステップST63においてかかる二つの2値顔画像44、45を論理積演算した差分画像46は、図32に示すように、二つの2値顔画像44、45の黒領域の共通部分である目の黒目領域の部分、眼鏡枠の一部、鼻孔のみが残る単純な画像となる。
【0135】
かかる実施の形態においても、実施の形態1と同様の効果が得られるとともに、顔画像の2軸方向に各々レベル抽出フィルタ処理を施すことにより、眼鏡を着装した顔画像等においても、目を含む顔の特徴領域をより単純な形で抽出できるため、簡単なアルゴリズムで顔画像から目をより短時間で精度良く検出できる。
【0136】
また、上記実施の形態においては、明暗検出手段の出力により黒あるいは白レベル抽出フィルタに切り換えたが、実施の形態5と同様に運転者pの顔画像よりの目検出結果を基にフィルタの切り換えを行うようにしてもよいし、実施の形態6と同様レベル抽出フィルタの出力顔画像中の抽出画素領域の割合によりフィルタの切り換えを行うようにしてもよい
【0137】
実施の形態15.
上記実施の形態14においては、目領域検出手段の検出結果に応じて2軸方向の各レベル抽出フィルタのフィルタ長を所定の一定長としたが、実施の形態10、11等に示すように、前記フィルタ長を目領域検出手段の検出結果に応じて可変にしてもよい。
【0138】
図33は、このような例を示す本発明の実施の形態15を表しており、この実施の形態15におけるレベル抽出フィルタのフィルタ長の設定を説明する目の候補存在領域402のX、Y軸ヒストグラムである。
【0139】
ステップST20において、目領域検出手段は画像フレームメモリに記憶された2値画像46を実施の形態5と同様に処理して、目の候補存在領域402を設定する。次に、候補存在領域402中でX軸方向及びY軸方向に各々画素レベルを積算してX軸ヒストグラムSUMX及びY軸ヒストグラムSUMYを求め、SUMX、SUMYが所定閾値SHL以上の領域を目の候補領域404とする。目領域は、実施の形態5における瞳孔領域の抽出と同様に、候補領域404のX軸ヒストグラムSUMXとY軸ヒストグラムSUMYを求め、SUMX、SUMYの幅とその比、及び一組の候補存在領域402内のX軸ヒストグラムSUMXのピーク位置とその間の距離より判定する。
【0140】
続いて、目領域と判定された候補領域404の前記SUMX及びSUMYの各最大値SUMXMAX及びSUMYMAXを求め、SUMXMAXを用いて実施の形態10と同様にして第一の黒レベル抽出フィルタのフィルタ長を目領域の上下幅の学習値に基づいて設定し、SUMYMAXを用いて同様にして第二の黒レベル抽出フィルタのフィルタ長を目領域の左右幅即ち黒目領域の直径の学習値に基づいて設定して、かかる可変長レベル抽出フィルタによる抽出画像より目を検出する。白レベル抽出フィルタに関しても、実施の形態10と同様にして瞳孔の大きさの学習値に基づいてフィルタ長を設定する。
【0141】
かかる実施の形態においては、レベル抽出フィルタのフィルタ長を目検出手段で検出された目領域の上下幅、左右幅あるいは瞳孔領域の大きさの関数値として設定したため、実施の形態10と同様、運転者の目の大きさの個人差、運転者の目の動きに拘わらず目を確実に検出できるという利点がある。
【0142】
上記実施の形態においては、レベル抽出フィルタのフィルタ長を目の検出結果を基に変更するようにしたが、運転者pとカメラ1との距離Lに応じて先ずフィルタ長を変更させた後、前記目の検出結果によるフィルタ長の可変を行うようにしてもよい。
【0143】
尚、上記各実施の形態においてはカメラにCCD固体撮像素子を用いた場合を示したが、他の固体撮像素子あるいは撮像管を用いても良く、また本発明を自動車の運転者状態の検出用の顔画像処理装置につき示したが、撮影された人物の顔画像より目を抽出するための他の顔画像処理装置にも適用できる。
【0144】
【発明の効果】
この発明は以上説明したように構成されているため、以下に示すような効果を奏する。
【0145】
距離相当量算出手段により2次元撮像手段と撮像される人物との距離を求めて、フィルタ長設定手段により前記距離に比例して黒レベルあるいは白レベルを抽出するレベル抽出フィルタの所定画素長を設定するようにしたので、撮像装置と人物との距離に拘わらず目を確実に検出することができる。
【0146】
また、フィルタ長設定手段により、黒レベルを抽出するレベル抽出フィルタの所定画素長を、該レベル抽出フィルタの出力顔画像を基にして目検出手段により検出された目領域の顔縦方向の長さの関数値とし、あるいは白レベルを抽出するレベル抽出フィルタの所定画素長を、該レベル抽出フィルタの出力顔画像を基にして目領域検出手段により検出された瞳孔領域の大きさの関数値として各々設定するようにしたので、撮像する人物の個人差による影響を排除して目を確実に検出することができる。
【0147】
また、フィルタ長設定手段により第一の黒レベル抽出フィルタの所定画素長と第二の黒レベル抽出フィルタの所定画素長とを、前記二つの黒レベル抽出フィルタの出力顔画像を基にして目領域検出手段により検出された各々目領域の顔縦方向の長さの関数値と目領域中での顔横方向の黒目領域の長さの関数値として設定するようにしたので、撮像する人物の個人差による影響を排除して目を確実に検出することができる。
【0148】
また、目領域の顔縦方向の長さの関数値、目領域中での顔横方向の黒目領域の長さの関数値、瞳孔領域の大きさの関数値を、所定期間内の各々前記目領域の顔縦方向の長さの最大値、目領域中での顔横方向の黒目領域の長さの最大値、瞳孔領域の大きさの最大値、の関数としたので、人物の目の動きに拘わらず目をより確実に検出できる。
【0149】
また、目領域の顔縦方向の長さの関数値、目領域中での顔横方向の黒目領域の長さの関数値、瞳孔領域の大きさの関数値を、所定期間における前記目領域の顔縦方向の長さ、目領域中での顔横方向の黒目領域の長さ、瞳孔領域の大きさの各々の度数分布の少なくとも最大頻度値の関数としたので、人物の目の動きに拘わらず目をより確実に検出することができる。
【0150】
また、目領域の顔縦方向の長さの関数値、目領域中での顔横方向の黒目領域の長さの関数値、瞳孔領域の大きさの関数値を、所定期間における前記目領域の顔縦方向の長さ、目領域中での顔横方向の黒目領域の長さ、瞳孔領域の大きさの各々の度数分布の平均値あるいは中央値及び分散あるいは標準偏差の関数としたので、人物の目の動きに拘わらず目をより確実に検出することができる。
【0151】
また、目検出頻度算出手段により目領域検出手段による目領域の検出頻度を求めて、前記目検出頻度により現状のフィルタ長の設定の更新、非更新を決定するようにしたので、目検出の頻度が最も高くなる最適なフィルタ長の設定が可能となる。
【0152】
また、フィルタ長の設定の更新を顔画像処理装置の起動後の所定期間のみ行い、以後は最新の更新フィルタ長を用いるようにしたので、人物の覚醒状態に拘わらず目を確実に検出することができる。
【0153】
また、レベル抽出フィルタを、所定の最大フィルタ長及びその最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長となるよう画素数を規則的に間引き、間引いた後の画素の画素レベルをトーナメント形式で比較してそのトーナメント最終階層より比較値を出力するフィルタにより構成し、設定フィルタ長に相当する画素長となるよう画素間引き数を選択することによりフィルタ長の設定を変えるようにしたので、フィルタのハードウエア化が容易になり、レベル抽出処理を高速に行うことができる。
【0154】
また、レベル抽出フィルタを、所定の最大フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するとともに、最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長に対応した各々のトーナメント階層より比較値を出力するフィルタにより構成し、前記設定フィルタ長に相当する前記レベル抽出フィルタのトーナメント階層からの出力を選択することによりフィルタ長の設定を変えるようにしたので、回路構成を簡略化できレベル抽出処理を高速に行えるとともにフィルタ回路が安価になる。
【0155】
また、レベル抽出フィルタを、所定の最大フィルタ長及び前記最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するフィルタにより構成し、前記設定フィルタ長に相当する画素長に対応した各々のトーナメント階層以下のトーナメント階層の出力を無視して、トーナメントに参加する画素数を前記設定フィルタ長に相当する画素長となるようフィルタ端部より制限することによりフィルタ長の設定を変えるようにしたので、回路構成をより簡略化でき、レベル抽出処理を高速に行えるとともにフィルタ回路がより安価になる。
【図面の簡単な説明】
【図1】 この発明の実施の形態1の顔画像処理装置を含む運転者の状態検出装置の概略構成図である。
【図2】 この実施の形態1の顔画像処理を用いた運転者状態検出のフローチャートである。
【図3】 図2に示す画像処理回路の回路ブロック図である。
【図4】 図3に示す黒レベル抽出フィルタの作用説明図である。
【図5】 この実施の形態1の黒レベル抽出フィルタ処理した2値顔画像である。
【図6】 この実施の形態1の夜間撮影時の入力顔画像と白レベル抽出フィルタ処理した2値顔画像である。
【図7】 図3に示す最大値フィルタの回路構成図である。
【図8】 本発明の実施の形態3の画像処理回路の回路ブロック図である。
【図9】 本発明の実施の形態4の画像処理回路の回路ブロック図である。
【図10】 図9に示す最大最小値フィルタ204の回路構成図である。
【図11】 本発明の実施の形態5による顔画像処理を用いた運転者状態検出のフローチャートである。
【図12】 図11に示すフィルタ切り換え判定手段のフローチャートである。
【図13】 この実施の形態5による目領域検出のフローチャートである。
【図14】 この実施の形態5による目の検出を説明する黒レベル抽出フィルタ処理した2値顔画像のX、Y軸ヒストグラムである。
【図15】 この実施の形態5による目の検出を説明する目の候補領域のX軸ヒストグラムである。
【図16】 この実施の形態5による目の検出を説明する白レベル抽出フィルタ処理した2値顔画像のX、Y軸ヒストグラムである。
【図17】 本発明の実施の形態6による顔画像処理を用いた運転者状態検出のフローチャートである。
【図18】 図17に示すフィルタ型切り換え判定手段のフローチャートである。
【図19】 本発明の実施の形態8による顔画像処理を用いた運転者状態検出のフローチャートである。
【図20】 図19に示すフィルタ長設定手段のフローチャートである。
【図21】 この実施の形態8による運転者pと撮像部aとの距離検出部の構成図である。
【図22】 この実施の形態8の画像処理回路の回路ブロック図である。
【図23】 図22に示すフィルタ長可変MAXあるいは最小値フィルタの回路構成図である。
【図24】 本発明の実施の形態9による運転者とカメラとの距離検出を説明する運転席の模式図である。
【図25】 図24における距離L算出のフローチャートである。
【図26】 本発明の実施の形態10のフィルタ長設定手段のフローチャートである。
【図27】 図26に示すフィルタ長学習手段のフローチャートである。
【図28】 本発明の実施の形態11のフィルタ長学習手段のフローチャートである。
【図29】 本発明の実施の形態12のフィルタ長可変MAXあるいは最小値フィルタの回路構成図である。
【図30】 本発明の実施の形態13のフィルタ長可変MAXあるいは最小値フィルタの回路構成図である。
【図31】 本発明の実施の形態14の顔画像処理を用いた運転者状態検出のフローチャートである。
【図32】 この実施の形態14の顔画像処理の画像での説明図である。
【図33】 本発明の実施の形態15によるフィルタ長の設定を説明する目の候補存在領域402のX、Y軸ヒストグラムである。
【図34】 従来の顔画像処理装置の構成図である。
【図35】 従来の顔画像処理装置における運転者の状態検出のフローチャートである。
【図36】 従来装置における顔画像とその2値画像である。
【符号の説明】
a,a’ 撮像部、b 画像処理部、p 撮像対象(運転者)、1 カメラ、1a CCD、1b 映像信号処理回路、1c 撮像レンズ、1d 可視光カットフィルタ、2 近赤外照明、3 照明制御手段、4 照度センサ、5,6 距離検出部、10 入力インタフェース、11 A/D変換器、12 画像メモリ、13,17 出力インタフェース、14 CPU、15 ROM、16 RAM、18 バス、20,20a,20b 画像処理回路、22 フィルタ切り換え手段、23,23a 黒レベル抽出フィルタ、24,24a 白レベル抽出フィルタ、201,201a,201b,205a,205b 最大値フィルタ、202,202a,202b,206a,206b 最小値フィルタ、203,203a,203b 引き算器、204 最大最小値フィルタ、26 2値化手段、27 フィルタ長切り換え手段、30 遅延回路、31,32 比較回路、33 マルチプレクサ、34 スイッチ、35 デコーダ、40,42,44,45,46 2値顔画像、401 顔重心、402 候補存在領域、403,404 候補領域。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a face image processing apparatus, and more particularly to a face image processing apparatus for extracting eyes from a face image of a photographed person.
[0002]
[Prior art]
Conventionally, in order to detect driving conditions such as a driver's side aside and doze driving, the driver's face is photographed with a camera provided in the vehicle interior, and the obtained face image is processed to obtain facial feature points. A face image processing apparatus for extracting an eye has been proposed.
[0003]
34 to 36 are diagrams showing a conventional face image processing apparatus disclosed in Japanese Patent Laid-Open No. 6-32154. FIG. 34 is a block diagram of a conventional face image processing apparatus, and FIG. FIG. 36 is a flowchart for detecting the state of the driver in the face image processing apparatus, and FIG. 36 is a face image and its binary image in the conventional apparatus.
[0004]
Such a conventional example will be described below with reference to FIGS.
[0005]
In FIG. 34, A indicates a face image capturing unit. The face image capturing unit A includes a camera 101, a
[0006]
B denotes a face image processing unit. The face image processing unit B is an A /
[0007]
Next, the operation of the conventional example will be described.
The
[0008]
In FIG. 35, the video signal of the driver p's face image captured by the
[0009]
Next, in step ST120, the binarizing means reads the image data stored in the
[0010]
Finally, in step ST150, the blink detection unit detects opening / closing of the eyes based on the number of black pixels in the vertical direction in the detected eyeball region, and in step ST160, the dozing determination unit detects dozing based on the detected opening / closing state of the eyes. If it is determined, and it is determined that it is a doze state, an alarm signal is sent to the outside from the
[0011]
A series of these operations is controlled by the
[0012]
On the other hand, although not shown in the drawing, as shown in the paper “Design method of pupil imaging optical system for eye gaze detection” (D-II Vol. J74D-II No. 6), the imaging axis of the camera 101 By placing a near-infrared light source having a radiation axis coaxial to the camera 101 and photographing the face while illuminating with the near-infrared light source, the pupil of the person is noticeable by retinal reflection even with weak illumination A bright image can be taken, and the binarized white pixel can be searched by simple image processing to detect the eye position.
[0013]
[Problems to be solved by the invention]
However, in such a conventional apparatus, when a face is photographed by sunlight during the day, shadows may occur on the face depending on the disturbance caused by sunlight, that is, the altitude and direction of the sun, the surrounding environment such as when driving under sunlight. There was a problem that binarization was not successful and eye extraction was difficult.
[0014]
For example, in FIG. 36, the driver's face image 4103 in a state where sunlight hits from the diagonally upper side of the driver's seat and the upper half of the face is behind the vehicle body or sun visor is binarized by the conventional method. In this state, since the pixel level is greatly different between the upper and lower faces, the binarization threshold rises due to the influence of the bright part, and the binary after binarization with the binarization threshold In the image 4102, the nostril and cleft are extracted, but the entire upper half of the face including the eyes, hair, and eyebrows becomes a single black region, and the eye region cannot be separated and extracted.
[0015]
Even if the eye area can be separated, the eye area must be specified from the face image in which the hair contour and the hair area that varies greatly depending on the individual exist, and the image processing algorithm is complicated and takes time. there were.
[0016]
Further, in a dark state such as at night, the near-
[0017]
In addition, in a case where a weak near-infrared light source is provided close to the camera and the pupil is imaged as in the above-mentioned disclosed paper, the entire face is reflected by the near-infrared component of sunlight during the day. In this case, it is difficult to extract the eyes and it is difficult to extract the eyes.
[0018]
The present invention has been made to solve the above-mentioned problems, and uses a simple image processing algorithm for the human eye area without being affected by ambient light such as in-vehicle conditions or light disturbance due to the surrounding environment. An object of the present invention is to obtain a small, inexpensive and low power consumption face image processing apparatus that can be detected in a short time.
[0019]
[Means for Solving the Problems]
The face image processing apparatus according to the present invention includes a two-dimensional image pickup unit that picks up a predetermined region including a human face, and at least one of the face images of the person obtained by the two-dimensional image pickup unit that is close to the vertical direction of the face. A level extraction filter for extracting a black level or a white level in a region of a predetermined pixel length or less in the axis (X-axis) direction, a filter length setting means for setting the predetermined pixel length of any one of the level extraction filters, and 2 A distance equivalent amount calculating means corresponding to the distance between the two-dimensional imaging means and the person, wherein the filter length setting means sets the predetermined pixel length in proportion to the calculated distance of the distance equivalent amount calculating means.The level extraction filter regularly thins out the number of pixels so that the pixel length corresponds to a predetermined maximum filter length and a predetermined set filter length shorter than the maximum filter length. It consists of a filter that compares pixel levels in a tournament format and outputs a comparison value from the final tournament hierarchy. The filter length setting in the filter length setting means is such that the pixel length is reduced to a pixel length corresponding to the set filter length. Characteristic for selecting numbers.
Also, a two-dimensional imaging unit that captures a predetermined region including the face of a person, and a predetermined image axis (X-axis) direction that is at least close to the vertical direction of the face image of the person obtained by the two-dimensional imaging unit A level extraction filter that extracts a black level or a white level in an area of a pixel length or less, a filter length setting unit that sets the predetermined pixel length of any one of the level extraction filters, and a distance between the two-dimensional imaging unit and a person A distance equivalent amount calculation unit corresponding to the distance equivalent amount calculation unit, the filter length setting unit sets the predetermined pixel length in proportion to a calculation distance of the distance equivalent amount calculation unit, and the level extraction filter includes a predetermined maximum filter Compare the pixel levels of adjacent pixels with a pixel length corresponding to the length in a tournament format, and output a comparison value from the final tournament hierarchy, and the maximum filter Each filter is configured to output a comparison value from each tournament hierarchy corresponding to a pixel length corresponding to each predetermined set filter length, and the filter length setting in the filter length setting means corresponds to the set filter length. The output from the tournament hierarchy of the level extraction filter is selected.
Furthermore, a two-dimensional imaging unit that captures a predetermined area including the face of the person, and a predetermined image axis (X-axis) direction that is at least close to the vertical direction of the face image of the person obtained by the two-dimensional imaging unit A level extraction filter that extracts a black level or a white level in an area of a pixel length or less, a filter length setting unit that sets the predetermined pixel length of any one of the level extraction filters, and a distance between the two-dimensional imaging unit and a person A distance equivalent amount calculation unit corresponding to the distance equivalent amount calculation unit, the filter length setting unit sets the predetermined pixel length in proportion to a calculation distance of the distance equivalent amount calculation unit, and the level extraction filter includes a predetermined maximum filter The pixel levels of adjacent pixels each having a pixel length corresponding to a predetermined set filter length shorter than the maximum filter length and the maximum filter length are compared in a tournament format, and the tournament It consists of a filter that outputs a comparison value from the final hierarchy, and the filter length setting means ignores the output of the tournament hierarchy below each tournament hierarchy corresponding to the pixel length corresponding to the set filter length. The number of pixels participating in the tournament is limited from the filter end so as to be a pixel length corresponding to the set filter length.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the accompanying drawings.
[0031]
1 to 7 show an embodiment of a face image processing apparatus according to the present invention, showing an embodiment of a face image processing apparatus applied to detection of a driving state such as a drowsy driving of a vehicle driver. Yes. FIG. 1 is a schematic configuration diagram of a driver state detection apparatus including a face image processing apparatus according to this embodiment, FIG. 2 is a flowchart of driver state detection using the face image processing apparatus, and FIG. 3 is an image processing circuit. FIG. 4 is a diagram illustrating the operation of the black level extraction filter, FIG. 5 is a binary face image subjected to black level extraction filter processing, and FIG. 6 is an input face image during night photography and a binary face subjected to white level extraction filter processing. FIG. 7 is a circuit configuration diagram of the maximum value (MAX) filter.
[0032]
Hereinafter, the configuration of the face image processing apparatus according to this embodiment will be described.
In FIG. 1, a indicates an imaging unit, b indicates an image processing unit, and p indicates a driver as an imaging target. The imaging unit a serves as a
[0033]
The image processing unit b is connected to the output side of the video signal processing circuit 1b and the
[0034]
The
[0035]
FIG. 2 is a flowchart of the driver state detection, and the operation of the first embodiment will be described based on this figure.
First, in step ST10, the image input means A / D-converts the video signal of the face image (for example, face image 47) taken by the
[0036]
Next, in step ST11, the
[0037]
Subsequently, in step ST18, the binarizing means converts the image after passing through the black level extraction filter 23 or the white
[0038]
Next, in step ST19, the binary image output from the
[0039]
A series of these operations is controlled by the
[0040]
Next, the level extraction filter will be described in more detail with reference to FIG.
FIG. 3 is a block diagram of the
[0041]
The black level extraction filter 23 includes a maximum value (MAX) filter 201a, a minimum value (MIN) filter 202a, and a
[0042]
On the other hand, the white
[0043]
The output images of the black and white level extraction filters 23 and 24 are input to the binarization means 26 and the binarization threshold value calculation means 25, and the binarization threshold value SHL is set by the binarization threshold value calculation means 25 from the image level. It is calculated and binarized by the binarization means 26 by the binarization threshold value SHL and converted into a binary image.
[0044]
Here, the filter length of the black level extraction filter 23 is a pixel length obtained by multiplying the average eye vertical width on the image by a margin, and in the present embodiment, a value of 30 pixel length is used. The filter length of the white
[0045]
FIG. 4 shows the binarization of the pixel level of the same portion (on line AOA ′) of the
[0046]
Therefore, even if the face is shaded by disturbance due to sunlight, that is, the altitude and direction of the sun, the surrounding environment such as when driving under sunlight, the face of eyebrows, eyes, nostrils, clefts as in the
Further, as described above, since the facial feature region is clearly extracted except for the hair portion having a large individual difference, the eyes can be detected from the face image in a short time with a relatively simple algorithm.
Further, the eyes are detected with high accuracy by switching the level extraction filter according to the image state.
[0047]
FIG. 6 is a face image obtained by imaging the driver p by turning on the near-
[0048]
Therefore, it is only necessary to illuminate the periphery of the face of the driver p with only the near-
[0049]
FIG. 7 is a circuit configuration diagram of the
[0050]
In the first embodiment, the case where the
[0051]
For example, the image level of the digital gradation image obtained by A / D converting the video signal of the face image may be integrated over all pixels or a predetermined pixel range to obtain the image average luminance, and the light / dark judgment may be performed with the image average luminance. Although not shown, the control signal of the automatic gain control (AGC) circuit that controls the gain of the video signal based on the image luminance and the image storage time of the CCD 1a, which are generally provided in the video signal processing circuit 1b of the
Even in such a case, the same effect as in the first embodiment can be obtained.
[0052]
In the first embodiment, an example in which the black level extraction filter 23 and the white
[0053]
FIG. 8 is a circuit block diagram of the image processing circuit according to the third embodiment of the present invention. By switching the switches SW1 and SW2 by the filter switching means 22 and switching the subtraction order of the
[0054]
According to such an embodiment, one each of the
[0055]
In the third embodiment, the case where two types of level extraction filters are configured by switching the connection order of the
[0056]
FIG. 9 is a circuit block diagram of an image processing circuit according to the fourth embodiment of the present invention, and FIG. 10 is a circuit configuration diagram of a maximum / minimum value (MAX / MIN)
In FIG. 10, unlike FIG. 7 of the first embodiment, each
[0057]
As shown in FIG. 9, in the image processing circuit 20a of the fourth embodiment, two such maximum / minimum value filters 204 are connected in series, and the filter switching means 22 uses the control signal MAX / MIN and the subtraction order of the
[0058]
That is, in this embodiment, the same effect as in the third embodiment can be obtained, the filter switching switches SW1 and SW2 can be omitted, and the circuit can be further simplified because the same circuit is used.
[0059]
11 to 16 show a fifth embodiment of the present invention. In the fifth embodiment, two types of level extraction filters are switched based on the eye detection result from the driver p's face image. It is a thing. FIG. 11 is a flowchart of driver state detection using the face image processing apparatus of the fifth embodiment, FIG. 12 is a flowchart of filter type switching determination means for switching the level extraction filter to black level extraction or white level extraction, and FIG. FIGS. 14 to 16 are explanatory diagrams of eye area detection images, FIG. 14 is an X- and Y-axis histogram of a binary face image subjected to black level extraction filtering, and FIG. FIG. 16 shows an X-axis histogram and a Y-axis histogram of a binary face image subjected to white level extraction filtering.
[0060]
Hereinafter, the present embodiment will be described with reference to the above drawings.
In FIG. 11, first, in step ST30, it is determined whether or not an initial setting state at the time of starting the apparatus. If it is in the initial setting state, in step ST31, the level extraction filter is first set to the black level extraction filter 23, and in step ST32 The
[0061]
Next, after performing the processing from step ST10 to step ST11 and from step ST18 to step ST19 similar to FIG. 2, in step ST20, the eye area detection means described later uses the binary face image after the level extraction filter processing. In step ST36, the filter type switching determination means determines whether or not to switch the level extraction filter based on the detection result of the eye, and outputs a filter switching FLAG. Finally, step ST21 to step ST22 are executed as in FIG.
[0062]
The processing routine of the filter type switching determination means is as follows.
In FIG. 12, first, the state of the eye detection FLAG determined by the eye region detection means in step ST360 is checked. If the eye detection FLAG is ON, the FLAG state number NEF is incremented by 1 in step ST361, and if it is OFF, the step Decrement the NEF by 1 in ST362. That is, the FLAG state number NEF represents the detection result of the eye at a predetermined image number N in the binary face image, NEF = N indicates a detection probability of 100%, and NEF = 0 indicates a detection probability of 50%.
[0063]
Next, in step ST363, whether or not a predetermined period has elapsed is determined by the number of images. If the number of images is equal to or greater than N, the number of FLAG states NEF is equal to or less than MINNEF corresponding to the minimum allowable eye detection probability in step ST364. If it is equal to or less than MINENF, it is determined that the current level extraction filter processing is not suitable for eye detection, and the filter switching FLAG is turned ON in step ST365. If NEF exceeds MINENF, it is determined that the current level extraction filter processing is suitable, and the filter switching FLAG is turned ON in step ST366. Finally, in step ST367, the FLAG state number NEF is reset to zero. If the predetermined number N of images has not elapsed in step ST363, steps ST364 to ST367 are omitted, and the process returns to the main routine.
[0064]
Eye detection from a binary face image is performed as follows.
In FIG. 13, first, binary image data stored in the
[Formula 1] XFC = ΣiXiSUMX (Xi) / ΣiSUMX (Xi)
YFC = ΣjYjSUMX (Yj) / ΣjSUMX (Yj)
As described above, the position coordinates (XFC, YFC) of the face center of gravity FC are calculated. Here, ΣiSUMX (Xi) = ΣjSUMX (Yj), and ΣjSUMX (Yj) does not actually require calculation. FIG. 14 shows SUMX, SUMY, and the face center of gravity FC401 of the
[0065]
Next, in step ST202, it is checked whether or not the level extraction filter process is a bright state process, that is, a black level extraction filter process. If the level extraction filter process is a bright state process, step ST203 and subsequent steps are executed.
[0066]
As shown in FIG. 14, in the
[0067]
Subsequently, in step ST205, it is determined whether or not an eye area exists in the candidate area EAB403. As shown in FIG. 15, the eye region determination method obtains an X-axis histogram SUMX of each candidate region EAB403 in the
[0068]
Finally, if it is determined in step ST205 that the eye area exists, the eye detection FLAG is turned ON in step ST206. Conversely, if it is determined that the eye area does not exist, the eye detection FLAG is turned OFF in step ST207. Return the processing to the main routine.
[0069]
On the other hand, if the level extraction filter process is not a bright state process in step ST202, that is, if it is a white level extraction filter process, step ST208 and subsequent steps are executed. As shown in FIG. 16, in the
[0070]
Finally, if it is determined in step ST210 that the pupil region exists, the eye detection FLAG is similarly turned ON in step ST206. Conversely, if it is determined that the pupil region does not exist, the eye detection is similarly performed in step ST207. Turn FLAG OFF and return to the main routine.
[0071]
In this embodiment, the same effect as in the first embodiment is obtained, and the filter switching of the two types of level extraction filters is performed by feedback based on the result of eye detection from the resulting face image. There is an advantage that an extraction filter can be selected accurately and eyes can be detected more reliably.
[0072]
In the fifth embodiment, the filter switching of the two types of level extraction filters is performed based on the eye detection result from the face image. However, it is possible to determine the filter switching before the eye detection.
[0073]
17 and 18 show the sixth embodiment of the present invention. In the sixth embodiment, the level extraction filter is switched according to the ratio of the extraction pixel area in the output face image of the level extraction filter. It is. FIG. 17 is a flowchart of driver state detection using the face image processing of the sixth embodiment, and FIG. 18 is a flowchart of the filter switching type determination means of FIG.
[0074]
In FIG. 17, after performing the processing from step ST30 to step ST35 in FIG. 11, from step ST10 to step ST11 and from step ST18 to step ST19, the filter type switching determination means described later in step ST40 It is determined whether or not the level extraction filter should be switched based on the ratio of the extraction pixel area in the output face image, and the filter switching FLAG is output.
[0075]
The processing routine of the filter type switching determination means is as follows.
In FIG. 18, first, binary image data is read in step ST400, X-axis histogram SUMX and Y-axis histogram SUMY of the binary image are obtained, and in step ST401, each of the maximum peaks in X-axis histogram SUMX and Y-axis histogram SUMY is obtained. The number of maximum peaks NPX and NPY where the maximum values exceed predetermined thresholds SHLX and SHLY (not shown) are obtained. The peak numbers NPX and NPY indicate the complexity of the binary image subjected to the level extraction filter processing as described later.
[0076]
Next, in step ST402, it is checked whether or not the level extraction filter process is a bright state process. In the case of the bright state process, the number of peaks NPX and NPY is checked after step ST403. In the binary image that has been processed by the black level extraction filter 23 in a bright state during the day, as shown in FIG. 14, a large number of black pixel regions corresponding to the feature regions of the face are extracted, and the maximum peaks of the histograms SUMX and SUMY are large. There are four or more places. However, since the contrast of the input image is extremely deteriorated when the surroundings become dark, the entire black area becomes wide, and the black pixel area is not extracted at all by the processing of the black level extraction filter 23 or the black pixel area is extracted. However, the contrast of the extracted image is extremely small and cannot be binarized, so the number of extraction areas is reduced. Therefore, the large maximum peaks of the histograms SUMX and SUMY do not appear, or even if they appear, the number is extremely small.
[0077]
Therefore, in step ST403, first, it is checked whether or not the number of peaks NPX of the X-axis histogram SUMX is equal to or smaller than a predetermined value NPXB. If the level extraction filter is not suitable for the image state, the filter switching FLAG is turned ON in step ST405, and in other cases, the filter switching FLAG is turned OFF in step ST406. Return to routine.
[0078]
On the other hand, if the level extraction filter process is not a bright state process in step ST402, the number of peaks NPX and NPY is examined after step ST407. In the binary image processed by the white
[0079]
In step ST407, first, it is checked whether or not the number of peaks NPX of the X-axis histogram SUMX is greater than or equal to a predetermined value NPXD. If it is equal to or greater than NPYD, it is determined that the level extraction filter is still not suitable for the image state. In step ST405, the filter switching FLAG is turned ON, and in other cases, the filter switching FLAG is turned OFF in step ST406. Return to routine.
[0080]
Next, in step ST41 on the main routine of FIG. 17, it is checked whether or not the filter switching FLAG is ON. If it is ON, the image state is not suitable for eye detection as described above. Is omitted and the eye detection FLAG is turned OFF in step ST42 and the process proceeds to post-processing. If the filter switching FLAG is OFF, after executing the eye area detection means in step ST20, the process proceeds to post-processing.
[0081]
In this embodiment, the same effect as in the fifth embodiment is obtained, and when the level extraction filter process is not suitable for eye detection, the eye area detection means is omitted and the process is performed. Since the determination of switching of the level extraction filter is performed based on the result of the histogram calculation that can be easily performed at high speed by hardware, there is an advantage that the face image processing is further speeded up.
[0082]
Embodiment 7 FIG.
In the above embodiment, the level extraction filter switching determination is performed based on the number of maximum peaks NPX, NPY of the respective maximum threshold values SHLX, SHLY of the X-axis histogram SUMX and the Y-axis histogram SUMY. An evaluation function may be created using both the maximum peak numbers NPX and NPY and the respective maximum values PXi and PYi, and the switching determination may be performed using such an evaluation function. Although not shown, for example, as the evaluation function EF, k1 and k2 are set as predetermined weighting factors.
[Formula 2] EF = k1 * (NPX + NPY) + k2 * Σi (Pxi + Pyi)
In the bright state processing, the filter switching FLAG is turned ON if the EF is equal to or smaller than a predetermined value, and in the dark state processing, the filter switching FLAG is turned ON if the EF is equal to or larger than the predetermined value.
[0083]
Further, in the binary image after the level extraction filter processing, the ratio ΣN / NT of the sum ΣN of the binary levels in the image to the total number of pixels NT of the image, that is, the ratio SD of the area of the extraction region in the image, The filter switching FLAG may be turned on if the SD is below a predetermined value during the bright state process and above a predetermined value during the dark state process. Alternatively, the number of extraction regions may be calculated by using another image processing means such as labeling to determine switching.
Also in this embodiment, the same effects as in the sixth embodiment are obtained.
[0084]
Embodiment 8 FIG.
FIGS. 19 to 23 show an eighth embodiment of the present invention. This eighth embodiment is achieved by making the filter length of the level extraction filter variable according to the distance between the driver p and the
[0085]
Hereinafter, the present embodiment will be described with reference to the respective drawings.
In FIG. 19, first, in step ST50, the filter length setting means sets the filter length of the level extraction filter.
[0086]
Since the size of the face image on the screen is inversely proportional to the distance L between the driver p and the imaging unit a ′, when the level extraction filter length is constant, if the distance L is short, Becomes larger than the filter length and the eye region is not extracted.
[0087]
Therefore, as shown in FIG. 20, the filter length setting means first detects the distance L between the driver p and the imaging unit a ′ in step ST500, and in step ST501, the black level extraction filter length BFL and the white level extraction filter length DFL. Is based on the reference distance L0 obtained from the average driving posture stored in advance and the reference lengths BFL0 and DFL0 of each level extraction filter obtained from the average face image at the reference distance L0.
[Formula 3] BFL = BFL0 * L0 / L
DFL = DFL0 * L0 / L
In step ST502, filter numbers BN and DN which are control codes of a multiplexer to be described later are selected so that the filter length closest to the filter lengths BFL and DFL is selected in step ST502, and the filter length switching FLAG is set in step ST503. Turn it on and return to the main routine.
[0088]
The distance L between the driver p and the imaging unit a ′ is detected by a
[0089]
With this configuration, the light emitted from the near-infrared
[Formula 4] L = f * DB / DX
And the data of the distance L is sent to the image processing unit b (FIG. 1) similar to that of the first embodiment.
[0090]
In FIG. 19, after setting the filter length of the level extraction filter as described above in step ST50 and executing steps ST10 to ST12 similar to FIG. 2, is the driver's surrounding environment dark in step ST51? If it is not a dark state, it is checked in step ST52 whether the filter length switching FLAG is ON. If it is ON, the black level extraction filter 23 is switched to the filter number BN corresponding to the filter length BFL set by the filter length setting means in step ST53, and if not ON, step ST53 is omitted and the previous set filter length remains unchanged. In step ST54, the black level extraction filter 23 extracts the black level in the area of the filter length BFL or less from the image, and the near
[0091]
If the dark state is determined in step ST51, it is similarly checked in step ST56 whether or not the filter length switching FLAG is ON. If it is ON, in step ST57, the white
[0092]
As shown in FIG. 22, the black level extraction filter 23a and the white level extraction filter 24a of the image processing circuit 20b of this embodiment are configured by hardware as in the above embodiments, and the black level extraction filter 23a. Comprises a maximum value filter 205a and a minimum value filter 206a connected to the output side of the filter length BFL switching means 27a and a
[0093]
The black level extraction filter 23a first takes the maximum value of the pixel level corresponding to the filter number BN designated by the filter length BFL switching means 27a by the maximum value filter 205a, and then takes the maximum value filter by the minimum value filter 206a. Similarly, the minimum value of the pixel level of the pixel length corresponding to the filter number BN is taken from the output image of 205a, and finally the input image is subtracted from the output image of the minimum value filter 206a by the
[0094]
On the other hand, the white level extraction filter 24a takes the minimum value of the pixel level of the pixel length corresponding to the filter number DN designated by the filter length DFL switching means 27b in the minimum value filter 206b, and then takes the maximum value filter 205b. The maximum value of the pixel level of the pixel length corresponding to the filter number DN is taken from the output image of the minimum value filter 206b, and finally, the output image of the maximum value filter 205b is subtracted from the input image. Extracts only the white level below the pixel length specified by the filter number DN.
[0095]
Other configurations and operations of the image processing circuit 20b of this embodiment are the same as those of the
[0096]
FIG. 23 shows a circuit configuration diagram of such a filter length variable MAX or minimum value filter.
[0097]
In such a circuit, when the control signal MPCNT indicates the
[0098]
Note that the minimum filter with variable filter length is similarly configured so that the
[0099]
In this embodiment, the filter length of the level extraction filter is changed according to the size of the face image on the screen according to the distance L between the driver p and the imaging unit a ′. There is an advantage that the eyes can be reliably detected regardless of the posture.
[0100]
In the above-described embodiment, the filter length variable black level extraction filter 23a and white level extraction filter 24a are provided as separate maximum value filters 205a and 205b and minimum value filters 206a and 206b provided with a filter length control signal MPCNT. In the case of using the
[0101]
Embodiment 9 FIG.
In each of the above-described embodiments, the distance L between the driver p and the imaging units a and a ′ is directly detected using a distance sensor. However, the distance L may be obtained indirectly.
[0102]
24 is a schematic diagram of the driver's seat, FIG. 25 is a flowchart for calculating the distance L, 6 is a distance detector, and a displacement sensor in which the position X in the front-rear direction of the seat seat 61 of the driver's seat is built in the seat seat 61. 62, the angle θ of the seat back portion 63 is obtained by the angle sensor 64 built in the pivot portion of the seat seat portion 61 and the seat back portion 63, and sent to the image processing apparatus b to calculate the distance L. The
[0103]
In the distance L calculation routine shown in FIG. 25, the image processing unit b reads the seat position X from the
[Formula 5] L = (X + X0 + HL * sinθ−HD) / cosφ
Is calculated by
In this embodiment, the same effect as in the eighth embodiment can be obtained.
[0104]
26 and 27 show the tenth embodiment of the present invention. In this tenth embodiment, the filter length of the level extraction filter is made variable according to the size of the eye region or pupil region in the image. Thus, an example of a face image processing apparatus that extracts eyes more accurately is shown. FIG. 26 is a flowchart of the filter length setting means of the tenth embodiment, and FIG. 27 is a flowchart of the filter length learning means in the filter length setting means.
[0105]
Hereinafter, the present embodiment will be described with reference to the respective drawings.
In FIG. 26, first, in step ST510, it is checked whether or not the face image processing apparatus is in a state immediately after activation. If it is immediately after activation, the filter lengths of the black level extraction filter 23 and the white
[0106]
If the apparatus is not immediately after startup, it is checked in step ST512 whether a predetermined time has elapsed since the apparatus was started. When the driver's arousal decreases, the upper eyelid gradually lowers even when the eyes are opened, and the vertical width of the eye area decreases, but if the filter length is shortened accordingly, the driver's awakening temporarily When the arousal level rises and the vertical width of the eye area suddenly increases, it becomes impossible to extract eyes with the level extraction filter. Therefore, the level extraction filter length is set in the driver's awakening state after starting up the device, and when a predetermined time has elapsed since the start of the device, the filter length switching FLAG is turned OFF in step ST513, and the filter length is updated thereafter. Ban. If the predetermined time has not elapsed since the apparatus was activated, a processing routine of the filter length learning means described later is performed in step ST520.
[0107]
Next, it is determined whether or not the predetermined number of images N has been processed in step ST521. If the number of image processing has not reached N, the eye detection in the eye detection means ST20 in the previous image is performed in step ST522. It is determined whether or not FLAG is ON. If it is ON, the eye detection FLAG state number NEF is incremented by 1 in step ST523, and if it is not ON, NEF is decremented by 1 in step ST524, and then step In ST513, the filter length switching FLAG is turned OFF to return to the main routine.
[0108]
When the number of image processing reaches N, in step ST525, the eye detection FLAG state number NEF representing the eye detection result within the predetermined image number N is compared with the previous FLAG state number NEFOLD, and NEF is larger than NEFOLD. Then, assuming that the effect of switching the filter length can be seen, the filter number FN corresponding to the filter length FL obtained by the filter length learning means is selected in step ST526 in the hope of further improving the detection result. In ST527, the filter length switching FLAG is turned ON to change the filter length. Conversely, if NEF is equal to or less than NEFOLD, the filter length switching FLAG is turned OFF in Step ST528. Finally, in step ST529, NEF is substituted into NEFOLD to update NEFOLD, and NEF is cleared and returned to the main routine.
[0109]
The processing routine of the filter length learning means is as shown in FIG. 27. Here, the image processed by the black level extraction filter 23 will be described.
First, whether or not the eye detection FLAG is ON in step ST5200 and whether or not the eye region is in an open state are checked in step ST5201 and the following processing is executed only when the eye detection FLAG is ON and the eye region is in an open state. If not, return to the routine of the file length setting means.
[0110]
In step ST5202, the latest stored value of the maximum vertical value SUMXMAX of the face vertical direction histogram of the eye area in the open eye state among the eye areas of the binary face image detected in ST20 by the eye area detection means. Read MSUMXMAX. As shown in FIG. 15, SUMXMAX is equal to the pixel length of the vertical width of the eye area when the eyes are opened. Next, in step ST5203, the latest SUMXMAX of the eye area in the open eye state is read out. In step ST5204, the stored value MSUMXMAX is subtracted from SUMXMAX. If SUMXMAX is larger than the stored value MSUMXMAX in step ST5205, Update with SUMXMAX.
[0111]
Finally, in step ST5207, it is checked whether or not the number of images has reached a predetermined number of images N. If the number of images is equal to or greater than N, in step ST5208, the upper and lower widths of the eyes in the open state in the number of images N are determined. A pixel length FL obtained by adding a predetermined margin width FLO to MSUMXMAX indicating the maximum pixel length is set as the filter length FL of the black level extraction filter 23, and MSUMXMAX is cleared in step ST5209. If the number of images does not reach N, the process returns to the file length setting means routine. The number N of images may be set to an arbitrary value of about several hundred to a thousand while looking at the learning effect.
[0112]
As described above, the case where the filter length FL of the black level extraction filter 23 is set based on the detection result of the eye region processed by the black level extraction filter 23 has been described above. In addition, the same processing as described above is performed on the image processed by the white
[0113]
In such an embodiment, the filter length of the level extraction filter is set as a function value of the vertical width of the eye area or the size of the pupil area detected by the eye area detecting means, and thus individual differences in the driver's eye size There is an advantage that the eyes can be reliably detected by eliminating the influence of.
[0114]
In addition, since the function value is set based on the maximum value in the predetermined period of the vertical width of the eye area or the size of the pupil area detected by the eye area detecting means, the eyes are more sure regardless of the driver's eye movements. There is an advantage that it can be detected.
[0115]
In addition, since the update of the filter length setting is determined by learning the improvement or decrease in the eye detection frequency, it is possible to set the optimal filter length that maximizes the eye detection frequency.
[0116]
Furthermore, since the filter length is updated only for a predetermined period when the driver's arousal level is high after the start of the face image processing device, and the latest updated filter length is used thereafter, even in a state where the driver's arousal is reduced, There is an advantage that eyes can be detected without error.
[0117]
In the above embodiment, the filter length FL is a value obtained by adding a predetermined value to the maximum value in a predetermined period of the vertical width of the eye region or the size of the pupil region, but the maximum value is multiplied by a predetermined coefficient. Other function forms based on the maximum value such as a value may be used.
[0118]
FIG. 28 shows an eleventh embodiment of the present invention. In the eleventh embodiment, the filter length FL of the level extraction filter based on the maximum frequency value in a predetermined period of the vertical width of the eye region or the size of the pupil region. Shows the case of setting.
[0119]
FIG. 28 is a flowchart of the filter length learning unit according to the eleventh embodiment. First, similarly to the tenth embodiment, whether or not the eye detection FLAG is ON in step ST5220, and whether or not the eye region is in an open state in step ST5221. In step ST5223, the maximum value SUMXMAX of the X-axis histogram SUMX of the eye region or the pupil region is read out only when the eye detection FLAG is ON and the eye region is in the open state. Next, a frequency distribution HIST (SUMXMAX) of SUMXMAX is calculated in step ST5223, and it is determined in step ST5224 that the number of images has reached N. In step ST5225, the maximum value of the SUMXMAX frequency distribution HIST within the predetermined number N of images is MHIST, and the standard deviation of the frequency distribution HIST is SHIST. Using K2,
[Formula 6] FL = K1 * MHIST + K2 * SHIST
Set by. Finally, the frequency distribution HIST is cleared in step ST5227.
This embodiment also has the same effect as the tenth embodiment.
[0120]
In the above embodiment, the filter length FL is set based on the maximum frequency value and the standard deviation of the vertical width of the eye region or the size of the pupil region in a predetermined period. However, the filter length FL is set using only the maximum frequency value. Alternatively, the average value or median value of the frequency distribution HIST may be used instead of the maximum frequency value, and the variance may be used instead of the standard deviation. In this case, the weighting factors K1 and K2 are naturally changed depending on the characteristic values used.
[0121]
In
[0122]
FIG. 29 is a circuit configuration diagram of another variable MAX or minimum value filter that varies the filter length of the level extraction filter. As described above, the maximum value filter or the minimum value filter is changed depending on whether the
[0123]
In FIG. 29, a
[0124]
In such a circuit, when the control signal MPCNT indicates, for example,
[0125]
In this embodiment, not only can a variable filter length level extraction filter be configured in the same way as in the eighth embodiment, but also in comparison with the variable MAX or minimum value filter shown in FIG. The image resolution is not lowered because the maximum or minimum of the detected pixels is detected, and the entire circuit configuration can be simplified because only one
[0126]
FIG. 30 is a circuit configuration diagram of a variable MAX or minimum value filter of still another configuration that makes the filter length of the level extraction filter variable.
In FIG. 30, an output signal of the
[0127]
In such a circuit, for example, when the code signal CODE has the
[0128]
In this embodiment, not only the same effects as in the twelfth embodiment are obtained, but also the entire circuit configuration can be further simplified and the filter circuit can be configured at a lower cost because the
[0129]
FIGS. 31 and 32 show a fourteenth embodiment of the present invention. This fourteenth embodiment is an example of a face image processing apparatus that detects eyes by performing level extraction filter processing on both image axes of a face image. FIG. 31 is a flowchart of driver state detection using face image processing according to the fourteenth embodiment, and FIG. 32 is an explanatory diagram showing images of face image processing according to the fourteenth embodiment. Hereinafter, the present embodiment will be described with reference to the above-described drawings and the above-described drawings.
[0130]
In FIG. 31, first, after executing step ST12 from step ST10, it is determined in step ST13 whether or not the output of the light / darkness detection means is in a dark state. One gradation image signal is equal to or smaller than the filter length in the X-axis direction from the image by the first black level extraction filter 23 having a filter length of a predetermined pixel length wider than the vertical width of the eye on the image in step ST60. The black level of the region is extracted, the near-
[0131]
Next, in step ST63, the binary image after the level extraction process in the X-axis direction stored in the binary image frame memory by the image logical product calculation means is converted into the binary image after the level extraction process in the Y-axis direction. The Y-axis direction is synchronously scanned to calculate the logical product of these two binary images, and the contents of the binary image frame memory are updated in step ST19 based on the calculation result.
[0132]
If the output of the light / darkness detection means is dark at step ST13, the filter length in the X-axis direction from the image is detected by the white
[0133]
Subsequently, in step ST20, the eye area detecting means processes the image data stored in the updated binary image frame memory to detect an eye area from the image, and based on the eye area detection result, the first embodiment and the first embodiment. Similarly, steps ST21 and ST22 are processed to determine whether or not the driver is in a dozing state and issue a warning to the driver.
[0134]
FIG. 32 shows changes in the face image of the driver p wearing glasses in the bright state at each stage of image processing. The
[0135]
Also in this embodiment, the same effect as in the first embodiment can be obtained, and eyes are also included in a face image wearing glasses by performing level extraction filter processing in each of the biaxial directions of the face image. Since the feature region of the face can be extracted in a simpler form, the eyes can be detected from the face image in a shorter time with a simple algorithm.
[0136]
In the above embodiment, the black or white level extraction filter is switched according to the output of the light / dark detection means. However, as in the fifth embodiment, the filter switching is performed based on the eye detection result from the face image of the driver p. As in the sixth embodiment, the filter may be switched according to the ratio of the extracted pixel area in the output face image of the level extraction filter.
[0137]
Embodiment 15 FIG.
In the
[0138]
FIG. 33 shows the fifteenth embodiment of the present invention showing such an example, and the X and Y axes of the eye
[0139]
In step ST20, the eye area detecting means processes the
[0140]
Subsequently, the maximum values SUMXMAX and SUMYMAX of the SUMX and SUMY of the
[0141]
In this embodiment, since the filter length of the level extraction filter is set as a function value of the vertical and horizontal widths of the eye area detected by the eye detection means or the size of the pupil area, the operation is performed as in the tenth embodiment. There is an advantage that the eyes can be reliably detected regardless of individual differences in the size of the driver's eyes and movements of the driver's eyes.
[0142]
In the above embodiment, the filter length of the level extraction filter is changed based on the detection result of the eyes, but first the filter length is changed according to the distance L between the driver p and the
[0143]
In each of the above embodiments, the case where a CCD solid-state image sensor is used for the camera is shown. However, another solid-state image sensor or an image pickup tube may be used, and the present invention is used for detecting the driver state of an automobile. However, the present invention can also be applied to other face image processing devices for extracting eyes from a photographed person's face image.
[0144]
【The invention's effect】
Since the present invention is configured as described above, the following effects can be obtained.
[0145]
The distance equivalent amount calculation means obtains the distance between the two-dimensional imaging means and the person to be imaged, and the filter length setting means sets a predetermined pixel length of a level extraction filter that extracts a black level or a white level in proportion to the distance As a result, the eyes can be reliably detected regardless of the distance between the imaging device and the person.
[0146]
The predetermined length of the level extraction filter for extracting the black level by the filter length setting means is set to the length of the face in the vertical direction of the eye area detected by the eye detection means based on the output face image of the level extraction filter. Or a predetermined pixel length of the level extraction filter for extracting the white level as a function value of the size of the pupil region detected by the eye region detection means based on the output face image of the level extraction filter. Since the setting is made, it is possible to reliably detect the eyes by eliminating the influence of individual differences in the person to be imaged.
[0147]
Further, the filter region setting means determines the predetermined pixel length of the first black level extraction filter and the predetermined pixel length of the second black level extraction filter based on the output face images of the two black level extraction filters. Since the function value of the length of the face in the vertical direction of each eye area detected by the detection means and the function value of the length of the black eye area in the lateral direction of the face in the eye area are set, It is possible to reliably detect the eyes by eliminating the influence of the difference.
[0148]
In addition, a function value of the length of the eye region in the vertical direction of the face, a function value of the length of the black eye region in the lateral direction of the face in the eye region, and a function value of the size of the pupil region are respectively set within the predetermined period. It is a function of the maximum length of the area in the vertical direction of the face, the maximum length of the black eye area in the horizontal direction in the eye area, and the maximum size of the pupil area. Regardless of whether the eye can be detected more reliably.
[0149]
In addition, a function value of the length of the eye region in the vertical direction of the face, a function value of the length of the black eye region in the lateral direction of the face in the eye region, and a function value of the size of the pupil region are obtained. It is a function of at least the maximum frequency value of the frequency distribution of the length of the face in the vertical direction, the length of the black eye area in the lateral direction in the eye area, and the size of the pupil area. The eyes can be detected more reliably.
[0150]
In addition, a function value of the length of the eye region in the vertical direction of the face, a function value of the length of the black eye region in the lateral direction of the face in the eye region, and a function value of the size of the pupil region are obtained. As a function of the average or median and variance or standard deviation of the length distribution in the vertical direction of the face, the length of the black eye area in the horizontal direction in the eye area, and the size of the pupil area. Regardless of the movement of the eyes, the eyes can be detected more reliably.
[0151]
In addition, the eye detection frequency calculation means obtains the eye region detection frequency by the eye region detection means, and the update or non-update of the current filter length setting is determined based on the eye detection frequency. It is possible to set an optimum filter length that gives the highest value.
[0152]
In addition, the filter length setting is updated only for a predetermined period after the start of the face image processing apparatus, and thereafter the latest updated filter length is used, so that eyes can be reliably detected regardless of the person's arousal state. Can do.
[0153]
In addition, the level extraction filter regularly thins out the number of pixels so as to have a predetermined maximum filter length and a pixel length corresponding to each predetermined set filter length shorter than the maximum filter length, and sets the pixel level of the pixel after thinning out. Because it is configured with a filter that compares in the tournament format and outputs the comparison value from the final level of the tournament, the filter length setting is changed by selecting the pixel thinning number so that the pixel length corresponds to the set filter length The filter can be easily implemented in hardware, and the level extraction process can be performed at high speed.
[0154]
Further, the level extraction filter compares pixel levels of adjacent pixels having a pixel length corresponding to a predetermined maximum filter length in a tournament format, outputs a comparison value from the final tournament layer, and is shorter than the maximum filter length. A filter that outputs a comparison value from each tournament hierarchy corresponding to a pixel length corresponding to a predetermined set filter length, and selecting an output from the tournament hierarchy of the level extraction filter corresponding to the set filter length; Since the setting of the filter length is changed, the circuit configuration can be simplified, the level extraction process can be performed at a high speed, and the filter circuit can be made inexpensive.
[0155]
Further, the level extraction filter compares the pixel levels of adjacent pixels having a pixel length corresponding to a predetermined maximum filter length and a predetermined set filter length shorter than the maximum filter length in a tournament format, and from the final tournament hierarchy Consists of a filter that outputs a comparison value, and ignores the output of the tournament hierarchy below each tournament hierarchy corresponding to the pixel length corresponding to the set filter length, and the number of pixels participating in the tournament corresponds to the set filter length Since the setting of the filter length is changed by restricting the pixel length from the filter end, the circuit configuration can be further simplified, the level extraction process can be performed at a high speed, and the filter circuit becomes cheaper.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of a driver state detection apparatus including a face image processing apparatus according to
FIG. 2 is a flowchart of driver state detection using face image processing according to the first embodiment.
3 is a circuit block diagram of the image processing circuit shown in FIG. 2. FIG.
4 is an operation explanatory diagram of a black level extraction filter shown in FIG. 3. FIG.
FIG. 5 is a binary face image that has been subjected to black level extraction filter processing according to the first embodiment;
FIG. 6 shows an input face image at the time of night photographing according to the first embodiment and a binary face image subjected to white level extraction filtering.
7 is a circuit configuration diagram of a maximum value filter shown in FIG. 3; FIG.
FIG. 8 is a circuit block diagram of an image processing circuit according to a third embodiment of the present invention.
FIG. 9 is a circuit block diagram of an image processing circuit according to a fourth embodiment of the present invention.
10 is a circuit configuration diagram of a maximum /
FIG. 11 is a flowchart of driver state detection using face image processing according to
12 is a flowchart of filter switching determination means shown in FIG.
FIG. 13 is a flowchart of eye area detection according to the fifth embodiment.
FIG. 14 is an X- and Y-axis histogram of a binary face image that has been subjected to black level extraction filtering and explains eye detection according to the fifth embodiment;
FIG. 15 is an X-axis histogram of eye candidate regions for explaining eye detection according to the fifth embodiment;
FIG. 16 is an X- and Y-axis histogram of a binary face image that has undergone white level extraction filtering and explains eye detection according to the fifth embodiment;
FIG. 17 is a flowchart of driver state detection using face image processing according to
18 is a flowchart of the filter type switching determination unit shown in FIG.
FIG. 19 is a flowchart of driver state detection using face image processing according to Embodiment 8 of the present invention;
20 is a flowchart of a filter length setting unit shown in FIG.
FIG. 21 is a configuration diagram of a distance detection unit between a driver p and an imaging unit a according to the eighth embodiment.
FIG. 22 is a circuit block diagram of an image processing circuit according to the eighth embodiment.
23 is a circuit configuration diagram of the filter length variable MAX or minimum value filter shown in FIG.
FIG. 24 is a schematic diagram of a driver's seat for explaining distance detection between a driver and a camera according to Embodiment 9 of the present invention.
FIG. 25 is a flowchart for calculating a distance L in FIG. 24;
FIG. 26 is a flowchart of filter length setting means according to the tenth embodiment of the present invention.
FIG. 27 is a flowchart of the filter length learning unit shown in FIG.
FIG. 28 is a flowchart of filter length learning means according to the eleventh embodiment of the present invention.
FIG. 29 is a circuit configuration diagram of a filter length variable MAX or minimum value filter according to the twelfth embodiment of the present invention.
FIG. 30 is a circuit configuration diagram of a variable filter length MAX or minimum value filter according to the thirteenth embodiment of the present invention.
FIG. 31 is a flowchart of driver state detection using face image processing according to
FIG. 32 is an explanatory diagram showing images of face image processing according to the fourteenth embodiment.
FIG. 33 is an X- and Y-axis histogram of a candidate
FIG. 34 is a block diagram of a conventional face image processing apparatus.
FIG. 35 is a flowchart of driver state detection in a conventional face image processing apparatus.
FIG. 36 is a face image and its binary image in the conventional apparatus.
[Explanation of symbols]
a, a ′ imaging unit, b image processing unit, p imaging target (driver), 1 camera, 1a CCD, 1b video signal processing circuit, 1c imaging lens, 1d visible light cut filter, 2 near infrared illumination, 3 illumination Control means, 4 Illuminance sensor, 5, 6 Distance detector, 10 input interface, 11 A / D converter, 12 Image memory, 13, 17 Output interface, 14 CPU, 15 ROM, 16 RAM, 18 bus, 20, 20a , 20b Image processing circuit, 22 Filter switching means, 23, 23a Black level extraction filter, 24, 24a White level extraction filter, 201, 201a, 201b, 205a, 205b Maximum value filter, 202, 202a, 202b, 206a, 206b Minimum Value filter, 203, 203a, 203b subtractor, 204 maximum / minimum value filter, 6 binarization means, 27 filter length switching means, 30 delay circuit, 31, 32 comparison circuit, 33 multiplexer, 34 switch, 35 decoder, 40, 42, 44, 45, 46 binary face image, 401 face center of gravity, 402 Candidate existence area, 403, 404 Candidate area.
Claims (3)
前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、
前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、
前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、
前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、
前記レベル抽出フィルタは、所定の最大フィルタ長及びその最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長となるように画素数を規則的に間引きし、間引いた後の画素の画素レベルをトーナメント形式で比較し、そのトーナメント最終階層より比較値を出力するフィルタからなり、
前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する画素長となるように画素間引き数を選択するものであることを特徴とする顔画像処理装置。Two-dimensional imaging means for imaging a predetermined area including a human face;
A level extraction filter for extracting a black level or a white level of a region having a predetermined pixel length or less in at least one image axis (X-axis) direction close to the vertical direction of the face image of the person obtained by the two-dimensional imaging means; ,
Filter length setting means for setting the predetermined pixel length of any of the level extraction filters;
A distance equivalent amount calculating means corresponding to the distance between the two-dimensional imaging means and a person,
The filter length setting means sets the predetermined pixel length in proportion to a calculation distance of the distance equivalent amount calculation means ;
The level extraction filter regularly thins out the number of pixels so as to have a predetermined maximum filter length and a pixel length corresponding to a predetermined set filter length shorter than the maximum filter length, and the pixel level of the pixel after thinning out Consists of a filter that compares in the tournament format and outputs the comparison value from the final tournament hierarchy.
The face image processing apparatus according to claim 1, wherein the filter length setting means selects a pixel thinning number so that a pixel length corresponding to the set filter length is set .
前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、
前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、
前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、
前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、
前記レベル抽出フィルタは、所定の最大フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するとともに、前記最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長に対応した各々のトーナメント階層より比較値を出力するフィルタからなり、
前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する前記レベル抽出フィルタのトーナメント階層よりの出力を選択するようにしたことを特徴とする顔画像処理装置。 Two-dimensional imaging means for imaging a predetermined area including a human face;
A level extraction filter for extracting a black level or a white level of a region having a predetermined pixel length or less in at least one image axis (X-axis) direction close to the vertical direction of the face image of the person obtained by the two-dimensional imaging means; ,
Filter length setting means for setting the predetermined pixel length of any of the level extraction filters;
A distance equivalent amount calculating means corresponding to the distance between the two-dimensional imaging means and a person,
The filter length setting means sets the predetermined pixel length in proportion to a calculation distance of the distance equivalent amount calculation means;
The level extraction filter compares pixel levels of adjacent pixels having a pixel length corresponding to a predetermined maximum filter length in a tournament format, outputs a comparison value from the final tournament layer, and is shorter than the maximum filter length. It consists of a filter that outputs a comparison value from each tournament hierarchy corresponding to a pixel length corresponding to a predetermined set filter length,
The face length image processing apparatus according to claim 1, wherein the filter length setting means selects an output from a tournament hierarchy of the level extraction filter corresponding to the set filter length .
前記2次元撮像手段により得られた前記人物の顔画像の少なくとも顔縦方向に近い一方の画像軸(X軸)方向の所定画素長以下の領域の黒レベルあるいは白レベルを抽出するレベル抽出フィルタと、
前記レベル抽出フィルタのいずれかの前記所定画素長を設定するフィルタ長設定手段と、
前記2次元撮像手段と人物との距離に相当する距離相当量算出手段とを備え、
前記フィルタ長設定手段は、前記距離相当量算出手段の算出距離に比例して前記所定画素長を設定し、
前記レベル抽出フィルタは、所定の最大フィルタ長及び前記最大フィルタ長より短い各々所定の設定フィルタ長に相当する画素長の隣接した画素の画素レベルをトーナメント形式で比較して、そのトーナメント最終階層より比較値を出力するフィルタからなり、
前記フィルタ長設定手段におけるフィルタ長の設定は、前記設定フィルタ長に相当する画素長に対応した各々のトーナメント階層以下のトーナメント階層の出力を無視して、トーナメントに参加する画素数を前記設定フィルタ長に相当する画素長となるようフィルタ端部より制限するようにしたことを特徴とする顔画像処理装置。 Two-dimensional imaging means for imaging a predetermined area including a human face;
A level extraction filter for extracting a black level or a white level of a region having a predetermined pixel length or less in at least one image axis (X-axis) direction close to the vertical direction of the face image of the person obtained by the two-dimensional imaging means; ,
Filter length setting means for setting the predetermined pixel length of any of the level extraction filters;
A distance equivalent amount calculating means corresponding to the distance between the two-dimensional imaging means and a person,
The filter length setting means sets the predetermined pixel length in proportion to a calculation distance of the distance equivalent amount calculation means;
The level extraction filter compares the pixel levels of adjacent pixels having a pixel length corresponding to a predetermined maximum filter length and a predetermined filter length shorter than the maximum filter length in a tournament format, and compares them from the final tournament hierarchy. It consists of a filter that outputs a value,
The filter length setting means sets the number of pixels participating in the tournament by ignoring the output of the tournament hierarchy below each tournament hierarchy corresponding to the pixel length corresponding to the set filter length. A face image processing apparatus characterized in that the pixel length corresponding to is limited from the filter end .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002237854A JP3685403B2 (en) | 2002-08-19 | 2002-08-19 | Face image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002237854A JP3685403B2 (en) | 2002-08-19 | 2002-08-19 | Face image processing device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP23728395A Division JP3355076B2 (en) | 1995-09-14 | 1995-09-14 | Face image processing device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005112202A Division JP3905544B2 (en) | 2005-04-08 | 2005-04-08 | Face image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003115043A JP2003115043A (en) | 2003-04-18 |
JP3685403B2 true JP3685403B2 (en) | 2005-08-17 |
Family
ID=19196416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002237854A Expired - Fee Related JP3685403B2 (en) | 2002-08-19 | 2002-08-19 | Face image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3685403B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4765008B2 (en) * | 2004-03-16 | 2011-09-07 | 国立大学法人静岡大学 | A method to detect head direction using pupil and nostril |
JP2007004448A (en) * | 2005-06-23 | 2007-01-11 | Honda Motor Co Ltd | Line-of-sight detecting apparatus |
KR102119898B1 (en) * | 2018-12-03 | 2020-07-06 | 김영천 | Camera device for monitoring driver's cellular phone |
-
2002
- 2002-08-19 JP JP2002237854A patent/JP3685403B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2003115043A (en) | 2003-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3316725B2 (en) | Face image pickup device | |
JP2937030B2 (en) | Image processing device and person state determination device | |
JP4853389B2 (en) | Face image capturing device | |
JP3355076B2 (en) | Face image processing device | |
JP3905544B2 (en) | Face image processing device | |
JP2541688B2 (en) | Eye position detection device | |
JP4347599B2 (en) | Personal authentication device | |
JP5366028B2 (en) | Face image capturing device | |
JP2012156661A (en) | Face imaging system | |
US20070110285A1 (en) | Apparatus and methods for detecting the presence of a human eye | |
JP2000139878A (en) | Device for recognizing iris pattern | |
US10891479B2 (en) | Image processing method and system for iris recognition | |
KR20060035620A (en) | Biometric identification device, authentication device using same, and biometric identification method | |
JP2007025758A (en) | Face image extracting method for person, and device therefor | |
JP2004030564A (en) | Personal identification method, personal identification apparatus, and photographing device | |
JP2011066809A (en) | Imaging apparatus | |
JP3685403B2 (en) | Face image processing device | |
JP3465336B2 (en) | Face image capturing device | |
EP2218398A1 (en) | Person recognition method and device incorporating the anatomic location of the retina as a biometric constant, corresponding to the physiological location of the projection of the visual axis | |
KR100293468B1 (en) | optical imager | |
KR100254030B1 (en) | Process apparatus for face image | |
WO2002035452A1 (en) | Eye image obtaining method, iris recognizing method, and system using the same | |
JP2688527B2 (en) | Gaze direction detection method | |
JP3296119B2 (en) | Gaze direction measuring device for vehicles | |
JP3342810B2 (en) | Iris image acquisition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050204 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050208 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050408 |
|
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: 20050524 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050526 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080610 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090610 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100610 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100610 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110610 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120610 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |