JP4126721B2 - Face area extraction method and apparatus - Google Patents
Face area extraction method and apparatus Download PDFInfo
- Publication number
- JP4126721B2 JP4126721B2 JP2002355017A JP2002355017A JP4126721B2 JP 4126721 B2 JP4126721 B2 JP 4126721B2 JP 2002355017 A JP2002355017 A JP 2002355017A JP 2002355017 A JP2002355017 A JP 2002355017A JP 4126721 B2 JP4126721 B2 JP 4126721B2
- Authority
- JP
- Japan
- Prior art keywords
- face
- skin color
- area
- region
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Closed-Circuit Television Systems (AREA)
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は顔領域抽出方法及び装置に係り、特にデジタルカメラ等により取得したカラー画像中に存在する人物の顔に相当する領域を抽出するための方法及び装置に関する。
【0002】
【従来の技術】
人物写真を鑑賞するときに最も注目される部位は人物の顔である。人物の顔が適正な明るさ及び色で再現されるように、画像内の人物の顔に相当する領域を自動的に検出する技術が提案されている(特許文献1)。特許文献1に開示された方法によれば、原画像から肌色領域を抽出するとともに、画像中のエッジを検出し、エッジで囲まれる肌色領域を顔領域として抽出している。
【0003】
【特許文献1】
特開平9−101579号公報
【0004】
【発明が解決しようとする課題】
しかしながら、特許文献1に開示された方法では、撮影時の光の加減によって、顔のエッジが閉曲線にならないケースも存在し、顔領域を誤検出することがある。また、顔抽出の処理において問題になるのは、肌色と類似した色相の物体(例えば、砂、地面、木、レンガなど)である。更に、タングステン光源下で撮影を行った場合には、オートホワイトバランス(AWB)のロバスト性から完全にはホワイトバランスがとれず、光源色が残る(完全に補正せずに、電球特有の光源の雰囲気を残すような設定となっている)。したがって、タングステン光源下で白い物体を撮影すると、肌色に類似の赤黄色となり、顔領域検出の障害となる。
【0005】
本発明はこのような事情に鑑みてなされたもので、上述のような撮影状況下においても顔と類似色相の物体を排除して、正しく顔領域を抽出することができる顔領域抽出方法及び装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
前記目的を達成するために本発明に係る顔領域抽出方法は、画像内から人物の顔に相当する領域を抽出する方法であって、撮影時の焦点距離情報を取得する情報取得工程と、前記情報取得工程で取得した焦点距離情報に基づき画像内における顔領域として想定される最大値を求める最大値予測工程と、画像データを解析して当該画像内から肌色の色相を有する領域を検出する肌色領域検出工程であって、肌色の色相を検出する肌色検出工程と、前記肌色検出工程で検出される肌色部分を更に彩度によって分割する彩度分割工程と、を含む肌色領域検出工程と、前記肌色領域検出工程で検出された肌色領域のうち前記彩度分割工程で分割された彩度別の肌色領域について、前記最大値予測工程で見積られた最大値から設定される判定基準値と比較し、該判定基準値よりも大きい領域について顔領域である可能性が低いものとして取り扱う処理を行う処理工程と、を含むことを特徴としている。
【0007】
本発明によれば、撮影光学系の焦点距離を示す情報を取得し、その焦点距離で実際に撮影して得られる人物の顔の最大サイズを見積る。その一方、画像データを解析して画像内の肌色領域を検出する。検出された肌色領域は顔領域の候補となり得るが、本発明では焦点距離情報を基に見積られた最大値から定められた判定基準値よりも大きな肌色領域については顔領域である可能性が低いものとして取り扱う。例えば、判定基準値よりも大きな領域については顔領域でないとして顔領域の候補から排除する態様、或いは、顔領域である可能性の低い領域について演算上の重み付け係数を変更するなどの態様がある。
【0008】
このように、撮影時の焦点距離情報から顔領域として妥当な大きさを見積り、極端に大きな領域部分については顔領域である確度が低いと判断するようにしたので、より高い確度で顔領域を判定することが可能になる。また、画像内で肌色の色相を有する領域(肌色領域)を更に彩度によって細かく領域分けして、その形状や大きさを認識することにより、顔領域の判定が容易になる。
【0009】
なお、焦点距離情報は、撮影に使用するカメラから取得してもよいし、画像データに付加された付属情報(タグ情報)などから読み込んでもよい。
【0010】
本発明の一態様によれば、前記処理工程は、前記肌色領域検出工程で検出された肌色領域のうち、前記最大値予測工程で見積られた最大値から設定される判定基準値よりも大きい領域を顔領域の候補から排除し、前記判定基準値よりも小さい領域の中から顔領域を決定する顔領域決定工程と、を含むことを特徴としている。
【0011】
かかる態様においては、判定基準値よりも大きな肌色領域については顔領域ではないものとして顔領域の候補から排除し、判定基準値よりも小さな肌色領域の中から顔領域を決定している。このようなアルゴリズム構成にしたことにより、タングステン光源下の背景や地面など肌色の色相に類似する対象の影響を排除でき、より確度ある顔領域の抽出が可能となる。
【0014】
また、判定基準値よりも小さい領域とされた顔領域候補の中から真の顔領域を特定するには、その領域の形状に基づいて顔領域を絞り込むことが好ましい。例えば、人物の顔はおよそ円形或いは楕円形に近いものと考えられ、顔領域か否かを判別するための縦横比を定めておくことができる。顔領域の各候補について規定の縦横比から極端に外れるもの(極端に細長いものなど)は、顔でないものとして排除され、規定の縦横比に近いものについて顔であると判断される。
【0015】
本発明の顔領域抽出方法において、更に、被写体の距離情報を取得する距離情報取得工程と、前記距離情報取得工程で取得した距離情報に基づき画像内における顔領域として想定される大きさを求める顔サイズ予測工程と、付加する態様もある。
【0016】
焦点距離の情報に加えて被写体距離の情報が得られると、実際に撮影される人物の顔の大きさをより正確に見積ることができるため、その予測値に基づいて顔領域の候補を絞り込むことができ、顔抽出の精度を上げることができる。
【0017】
上記方法発明を具現化する装置を提供するため、本発明にかかる顔領域抽出装置は、画像内から人物の顔に相当する領域を抽出する装置であって、撮影時の焦点距離情報を取得する情報取得手段と、前記情報取得手段を介して取得した焦点距離情報に基づき画像内における顔領域として想定される最大値を求める最大値予測手段と、画像データを解析して当該画像内から肌色の色相を有する領域を検出する肌色領域検出手段であって、肌色の色相を検出する肌色検出手段と、前記肌色検出工程で検出される肌色部分を更に彩度によって分割する彩度分割手段と、を含む肌色領域検出手段と、前記肌色領域検出手段で検出された肌色領域のうち前記彩度分割手段で分割された彩度別の肌色領域について、前記最大値予測手段で見積られた最大値から設定される判定基準値と比較し、該判定基準値よりも大きい領域について顔領域の候補から削除し、前記判定基準値よりも小さい領域の中から顔領域を決定する顔領域決定手段と、を備えたことを特徴とする。
【0018】
本発明の顔領域抽出装置は、デジタルカメラやビデオカメラなどの電子撮影装置(電子カメラ)の信号処理部に組み込むことが可能であるとともに、電子カメラで記録した画像データを再生表示又はプリント出力する画像処理装置などに組み込むことが可能である。
【0019】
また、本発明の顔領域抽出装置は、コンピュータによって実現することが可能であり、上述した顔領域抽出方法の各工程をコンピュータによって実現させるためのプログラムをCD−ROMや磁気ディスクその他の記録媒体に記録し、記録媒体を通じて当該プログラムを第三者に提供したり、インターネットなどの通信回線を通じて当該プログラムのダウンロードサービスを提供することも可能である。
【0020】
【発明の実施の形態】
以下添付図面に従って本発明に係る顔領域抽出方法及び装置の好ましい実施の形態について詳説する。
【0021】
図1は本発明の実施形態に係る電子カメラの構成を示すブロック図である。このカメラ10は、被写体の光学像をデジタル画像データに変換して記録メディア12に記録するデジタルカメラであり、撮影により得られた画像信号を処理する信号処理手段の一部に本発明の顔領域抽出装置が用いられている。
【0022】
カメラ10全体の動作は、カメラ内蔵の中央処理装置(CPU)14によって統括制御される。 CPU14は、所定のプログラムに従って本カメラシステムを制御する制御手段として機能するとともに、自動露出(AE)演算、自動焦点調節(AF)演算、及びオートホワイトバランス(AWB)制御、顔領域抽出演算など各種演算を実施する演算手段として機能する。
【0023】
CPU14はバス16を介してROM20及びメモリ(RAM)22と接続されている。ROM20にはCPU14が実行するプログラム及び制御に必要な各種データ等が格納されている。メモリ22はプログラムの展開領域及びCPU14の演算作業用領域として利用されるとともに、画像データの一時記憶領域として利用される。
【0024】
また、CPU14にはEEPROM24が接続されている。EEPROM24は、顔領域抽出処理に必要なテーブルデータ(肌色データや顔サイズの最大値データなどテーブル)、AE、AF及びAWB等の制御に必要なデータ或いはユーザが設定したカスタマイズ情報などを記憶している不揮発性の記憶手段であり、電源OFF時においても記憶内容が保持される。CPU14は必要に応じてEEPROM24のデータを参照して演算等を行う。なお、ROM20は書換不能なものであってもよいし、EEPROMのように書換可能なものでもよい。
【0025】
カメラ10にはユーザが各種の指令を入力するための操作部30が設けられている。操作部30は、マクロボタン31、シャッターボタン32、ズームスイッチ33など各種操作部を含む。
【0026】
マクロボタン31は、近距離撮影に適したマクロモードの設定(ON)/解除(OFF)を行う操作手段である。マクロモードは、被写界深度を比較的浅くして背景を美しくぼかしたクローズアップ写真を撮影できる。マクロボタン31の押下によってカメラ10がマクロモードに設定されると、近距離撮影に適したフォーカス制御が行われ、被写体距離が約20cm〜80cmの範囲で撮影が可能となる。
【0027】
シャッターボタン32は、撮影開始の指示を入力する操作手段であり、半押し時にONするS1 スイッチと、全押し時にONするS2 スイッチとを有する二段ストローク式のスイッチで構成されている。S1 オンにより、AE及びAF処理が行われ、S2 オンによって記録用の露光が行われる。ズームスイッチ33は、撮影倍率や再生倍率を変更するための操作手段である。
【0028】
また、図示しないが、操作部30には、撮影モードと再生モードとを切り換えるためのモード選択手段、液晶モニタ40にメニュー画面を表示させるメニューボタン、メニュー画面から所望の項目を選択する十字ボタン(カーソル移動操作手段)、選択項目の確定や処理の実行を指令するOKボタン、選択項目など所望の対象の消去や指示内容の取消し、或いは1つ前の操作状態に戻らせる指令を入力するキャンセルボタンなどの操作手段も含まれる。なお、操作部30の中には、プッシュ式のスイッチ部材、ダイヤル部材、レバースイッチなどの構成によるものに限らず、メニュー画面から所望の項目を選択するようなユーザインターフェースによって実現されるものも含まれている。
【0029】
操作部30からの信号はCPU14に入力される。CPU14は操作部30からの入力信号に基づいてカメラ10の各回路を制御し、例えば、レンズ駆動制御、撮影動作制御、画像処理制御、画像データの記録/再生制御、液晶モニタ40の表示制御などを行う。
【0030】
液晶モニタ40は、撮影時に画角確認用の電子ファインダーとして使用できるとともに、記録済み画像を再生表示する手段として利用される。また、液晶モニタ40は、ユーザインターフェース用表示画面としても利用され、必要に応じてメニュー情報や選択項目、設定内容などの情報が表示される。なお、液晶ディスプレイに代えて、有機ELなど他の方式の表示装置(表示手段)を用いることも可能である。
【0031】
次に、カメラ10の撮影機能について説明する。
【0032】
カメラ10は撮影光学系としての撮影レンズ42とCCD固体撮像素子(以下、CCDという。)44とを備えている。なお、CCD44に代えて、MOS型固体撮像素子など他の方式の撮像素子を用いることも可能である。撮影レンズ42は、電動式のズームレンズで構成されており、詳細な光学構成については図示しないが、主として倍率変更(焦点距離可変)作用をもたらす変倍レンズ群及び補正レンズ群と、フォーカス調整に寄与するフォーカスレンズとを含む。
【0033】
撮影者によってズームスイッチ33が操作されると、そのスイッチ操作に応じてCPU14からズーム駆動部46に対して制御信号が出力される。ズーム駆動部46は、動力源となるモータ(ズームモータ)とその駆動回路とを含む電動駆動手段である。ズーム駆動部46のモータ駆動回路は、CPU14からの制御信号に基づいてレンズ駆動用の信号を生成し、ズームモータに与える。こうして、モータ駆動回路から出力されるモータ駆動電圧によってズームモータが作動し、撮影レンズ42内の変倍レンズ群及び補正レンズ群が光軸に沿って前後移動することにより、撮影レンズ42の焦点距離(光学ズーム倍率)が変更される。
【0034】
本例では、ワイド(広角)端からテレ(望遠)端までのズーム動作範囲内において撮影レンズ42の焦点距離を10段階で可変できるものとする。撮影者は撮影目的に応じて所望の焦点距離を選択して撮影を行うことができる。
【0035】
撮影レンズ42のズーム位置(焦点距離に相当)は、ズーム位置検出センサ48によって検出され、その検出信号はCPU14に通知される。CPU14はズーム位置検出センサ48からの信号によって現在のズーム位置(すなわち、焦点距離)を把握できる。ズーム位置検出センサ48は、ズームモータ等の回転によりパルスを発生する回路であってもよいし、レンズ鏡胴の外周に位置検出エンコード板を配置した構成などであってもよく、本発明の実施に際しては、特に限定されるものではない。
【0036】
撮影レンズ42を通過した光は、図示せぬ絞り機構を介して光量が調節された後、CCD44に入射する。CCD44の受光面には多数のフォトセンサ(受光素子)が平面的に配列され、各フォトセンサに対応して赤(R)、緑(G)、青(B)の原色カラーフィルタが所定の配列構造(ベイヤー、Gストライプなど)で配置されている。
【0037】
CCD44の受光面に結像された被写体像は、各フォトセンサによって入射光量に応じた量の信号電荷に変換される。CCD44は、シャッターゲートパルスのタイミングによって各フォトセンサの電荷蓄積時間(シャッタースピード)を制御する電子シャッター機能を有している。
【0038】
CCD44の各フォトセンサに蓄積された信号電荷は、CCDドライバ50から与えられるパルスに基づいて信号電荷に応じた電圧信号(画像信号)として順次読み出される。CCD44から出力された画像信号は、アナログ処理部52に送られる。アナログ処理部52は、CDS(相関二重サンプリング)回路及びゲイン調整回路を含む先行処理部であり、このアナログ処理部52において、サンプリング処理並びにR,G,Bの各色信号に色分離処理され、各色信号の信号レベルの調整(プリホワイトバランス処理)が行われる。
【0039】
アナログ処理部52から出力された画像信号はA/D変換器54によってデジタル信号に変換された後、信号処理部56を介してメモリ22に格納される。このときメモリ22に記憶される画像データは、CCD44から出力された画像信号のA/D変換出力をそのまま(未加工のまま)記録したものであり、ガンマ変換や同時化などの信号処理が行われていない画像データである。(以下、CCDRAWデータという。)ただし、「未加工のデータ」といっても、一切の信号処理を排除するものではなく、例えば、撮像素子の欠陥画素(キズ)のデータを補間する欠陥画素補正処理を行って得られた画像データなどについては汎用フォーマットに展開されていないという点でCCDRAWデータの概念に含まれるものとする。
【0040】
タイミングジェネレータ(TG)58は、CPU14の指令に従ってCCDドライバ50、アナログ処理部52及びA/D変換器54に対してタイミング信号を与えており、このタイミング信号によって各回路の同期がとられている。
【0041】
信号処理部56は、メモリ22の読み書きを制御するメモリコントローラを兼ねたデジタル信号処理ブロックである。信号処理部56は、AE/AF/AWB処理を行うオート演算部と、同時化回路(単板CCDのカラーフィルタ配列に伴う色信号の空間的なズレを補間して各点の色を計算する処理回路)、ホワイトバランス回路、ガンマ変換回路、輝度・色差信号生成回路、輪郭補正回路、コントラスト補正回路等を含む画像処理手段であり、CPU14からのコマンドに従ってメモリ22を活用しながら画像信号を処理する。
【0042】
メモリ22に格納されたCCDRAWデータは、バス16を介して信号処理部56に送られる。信号処理部56に入力された画像データは、ホワイトバランス調整処理、ガンマ変換処理、輝度信号(Y信号)及び色差信号(Cr,Cb 信号)への変換処理(YC処理)など、所定の信号処理が施された後、メモリ22に格納される。
【0043】
撮影画像をモニタ出力する場合、メモリ22から画像データが読み出され、表示回路60に転送される。表示回路60に送られた画像データは表示用の所定方式の信号(例えば、NTSC方式のカラー複合映像信号)に変換された後、液晶モニタ40に出力される。CCD44から出力される画像信号によってメモリ22内の画像データが定期的に書き換えられ、その画像データから生成される映像信号が液晶モニタ40に供給されることにより、撮像中の映像(スルー画)がリアルタイムに液晶モニタ40に表示される。撮影者は液晶モニタ40に表示される映像(いわゆるスルームービー)によって画角(構図)を確認できる。
【0044】
撮影者が画角を決めてシャッターボタン32を押下すると、CPU14はこれを検知し、シャッターボタン32の半押し(S1 ON)に応動してAE処理及びAF処理を行い、シャッターボタン32の全押し(S2=ON)に応動して記録用の画像を取り込むためのCCD露光及び読み出し制御を開始する。
【0045】
本カメラ10におけるAF制御は、例えば映像信号のG信号の高周波成分が極大になるようにフォーカスレンズ(撮影レンズ42を構成するレンズ光学系のうちフォーカス調整に寄与する移動レンズ)を移動させるコントラストAFが適用される。すなわち、AF演算部は、G信号の高周波成分のみを通過させるハイパスフィルタ、絶対値化処理部、画面内(例えば、画面中央部)に予め設定されているフォーカス対象エリア内の信号を切り出すAFエリア抽出部、及びAFエリア内の絶対値データを積算する積算部から構成される。
【0046】
AF演算部で求めた積算値のデータはCPU14に通知される。CPU14は、AFモータを含むフォーカス駆動部62を制御してフォーカスレンズを移動させながら、複数のAF検出ポイントで焦点評価値(AF評価値)の演算を行い、各AF検出ポイントで算出されたAF評価値からその値が極大となるレンズ位置を合焦位置として決定する。そして、求めた合焦位置にフォーカスレンズを移動させるようにフォーカス駆動部62を制御する。
【0047】
また、AE制御に関連して、AE演算部は1画面を複数のエリア(例えば、8×8)に分割し、分割エリアごとにRGB信号を積算する回路を含み、その積算値をCPU14に提供する。CPU14は、AE演算部から得た積算値に基づいて被写体の明るさ(被写体輝度)を検出し、撮影に適した露出値(撮影EV値)を算出する。求めた露出値と所定のプログラム線図に従い、絞り値とシャッタースピードが決定される。そして、アイリスモータを含む不図示の駆動部及びCCD44の電子シャッターを制御して最適な露光量を得る。
【0048】
シャッターボタン32の全押し(S2 =ON)に応動して取り込まれた画像データは、信号処理部56においてYC処理その他の所定の信号処理を経た後、圧縮伸張回路64において所定の圧縮フォーマット(例えば、JPEG方式) に従って圧縮される。圧縮された画像データは、メディアインターフェース部66を介して記録メディア12に記録される。圧縮形式はJPEGに限定されず、MPEGその他の方式を採用してもよい。
【0049】
画像データを保存する手段は、スマートメディア(商標)、コンパクトフラッシュ(商標)などで代表される半導体メモリカード、磁気ディスク、光ディスク、光磁気ディスクなど、種々の媒体を用いることができる。また、リムーバブルメディアに限らず、カメラ10に内蔵された記録媒体(内部メモリ)であってもよい。
【0050】
モード選択手段によって再生モードが選択されると、記録メディア12に記録されている最終の画像ファイル(最後に記録したファイル)が読み出される。記録メディア12から読み出された画像ファイルのデータは、圧縮伸張回路64によって伸張処理され、表示回路60を介して液晶モニタ38に出力される。
【0051】
再生モードの一コマ再生時に十字ボタンを操作することにより、順方向又は逆方向にコマ送りすることができ、コマ送りされた次のファイルが記録メディア12から読み出され、上記と同様にして画像が再生される。
【0052】
図2は、本例のカメラ10における顔抽出処理に関係する要部ブロック図である。図2中図1で説明した構成と共通する部分には同一の符号を付し、その説明は省略する。
【0053】
図2において、上段の積算回路70とホワイトバランス回路72は、通常のオートホワイトバランス処理に使用している処理系である。また、その下段に示した、積算回路74、ホワイトバランス回路76及び同時化回路78は、顔抽出アルゴリズムの前処理を実施するための処理部(以下、前処理系という。)である。
【0054】
A/D変換器54にてデジタル信号に変換されたCCDRAWデータはメモリ22に格納され、メモリ22から積算回路70に送られる。積算回路70は、1画面内を複数のエリア(例えば、8×8の64ブロック)に分割し、エリアごとにRGB信号の色別の平均積算値を算出する回路を含み、その算出結果は基準光源(デイライト)を想定したホワイトバランス回路72に送られる。ホワイトバランス回路72でゲイン調整された信号はCPU14に提供される。
【0055】
CPU14は、Rの積算値、Bの積算値、Gの積算値を得て、R/G、B/Gの比を求め、これらR/G、B/Gの値と、AE演算による撮影EV値の情報に基づいてシーン判別(光源種の判別)を行い、シーンに適した所定のホワイトバランス調整値(光源の雰囲気を残すような設定)に従って、信号処理部56内のホワイトバランス回路80及び前処理系のホワイトバランス回路76のアンプゲインを制御し、各色チャンネルの信号に補正をかける。光源種の判別方法及び光源の雰囲気を残すホワイトバランス制御については、特開2000−224608号公報等に開示された手法を用いることができる。なお、シーン判別においては、R/G、B/Gの値を利用するのに代えて、R−Y、B−Yなど色温度情報を用いてもよい。
【0056】
その後、シャッターボタン32の全押し(S2 ON)に応動して記録用の画像を取り込む。S2 ONに応じて取得されたCCDRAWデータは一旦メモリ22に格納され、その後、信号処理部56及び顔抽出用の前処理系の積算回路74に送られる。
【0057】
前処理系の積算回路74は、1画面を例えば、130×190のエリアに分割し、エリアごとに積算値を算出する。積算回路74の算出結果は、ホワイトバランス回路76に送られ、ここでAWBを反映させたホワイトバランス処理が行われる。AWBを効かせたデータは、同時化回路78に送られ、ここでR,G,Bについてそれぞれ同画素数のデータ(3面データ)が生成される。
【0058】
CPU14は、同時化回路78で生成されたRGBの3面データに基づいて、肌色検出、彩度分割、顔候補抽出、並びに顔候補の領域の形状に基づく顔領域の特定の処理を実行する。顔抽出のアルゴリズムについて詳細は後述する。
【0059】
その一方、メモリ22から信号処理部56に送られたCCDRAWデータは、ホワイトバランス回路80によりAWBを反映させた処理が行われた後、ガンマ変換回路82に送られる。ガンマ変換回路82は、ホワイトバランス調整されたRGB信号が所望のガンマ特性となるように入出力特性を変更し、輝度/色差信号生成回路84に出力する。
【0060】
輝度/色差信号生成回路84は、ガンマ補正されたR、G、B信号から輝度信号Yとクロマ信号Cr、Cbとを作成する。これらの輝度信号Yとクロマ信号Cr、Cb(YC信号)は、圧縮伸張回路64によってJPEGその他の所定のフォーマットで圧縮され、記録メディア12に記録される。
【0061】
次に、本実施形態に係るカメラ10に搭載されている顔抽出機能について説明する。
【0062】
図3は、撮影光学系における被写体とその像の関係を示した図である。同図に示したように、撮影距離Dと視野角L(この焦点距離で撮影できる全範囲)の比は、撮影レンズ42の焦点距離DFとCCDサイズHの比に等しい。
【0063】
【数1】
撮影距離D:視野角L=焦点距離DF:CCDサイズH …(1)
すなわち、視野角L内に包含される人物の顔の実サイズAとCCD受光面上における像サイズaとの間には、次式の関係が成り立つ。
【0064】
【数2】
撮影距離D:実サイズA=焦点距離DF:像サイズa …(2)
撮影距離Dは、カメラ10によって撮影可能な最短距離(最至近距離)とする。マクロモードOFFの場合ならば、カメラ10までの最短距離は60cm程度である。なお、マクロモードONの場合、最短距離は20cm程度であるが、マクロモードONのときには、人物を写す可能性が低いため、顔抽出の処理は行わないものとする。
【0065】
人物の顔の実サイズAは、多少のばらつきがあるにせよ、およそ顔の大きさというものは、ある大きさの範囲にあるとして規定値を設定できる。
【0066】
したがって、上記の式(2)の関係からCCD44面上での像サイズ(人物の顔がCCD44面に結像するときの画素数)を割り出すことができる。こうして、各焦点距離における顔のサイズを求めることができる。
【0067】
本例のカメラ10は、ワイド端からテレ端までの間で10段階の焦点距離を選択できる構成になっているため、各焦点距離についてCCD44面上での顔サイズの最大値がテーブルデータとしてカメラ10内のEEPROM24(データ格納手段)に記憶されている。
【0068】
図4は、顔抽出におけるシーケンスを示すフローチャートである。
【0069】
まず、シャッターボタン32のS1 =ON及びS2 =ONを経て、CCDRAWデータをメモリ22に記録する(ステップS110)。その後、CPU14は、撮影時の焦点距離情報及びマクロのON/OFF情報を入手する(ステップS112)。マクロモードがONのときには、顔抽出処理を実施しないものとする。
【0070】
その一方、マクロモードがOFFのときには、図2で説明した前処理系(74、76、78)による処理を行い、記録したCCDRAWデータから積算処理、ホワイトバランス処理及び同時化処理を行う(図4のステップS114)。
【0071】
次いで、CPU14は、EEPROM24から肌色テーブルを取得する(ステップS116)。肌色テーブルは、所定の色空間において「肌色」として認識される色相の範囲を定めたデータである。CPU14は、前処理系の同時化回路78から取得したRGBの3面データ(リニアな系のデータ)を基に、肌色テーブル内の色相を検出する(ステップS118)。
【0072】
図5は、肌色として抽出されるべき色相の範囲(肌色抽出エリア)を例示した図である。図示した色空間はガンマをかける前のリニアな系であり、横軸をR/G、縦軸をB/Gとした座標系である。
【0073】
図5において、符号88の矩形枠で囲まれた範囲が肌色抽出エリアとして設定されている。すなわち、Gに対してRが少し多く、また、BはGに対して少し低い値を示す範囲を「肌色」と定めておき、この範囲内に入ったものを肌色として判定する。
【0074】
更に、肌色抽出エリア88は、彩度によって更に複数のエリアに分割されている。図5において、「彩度」は原点O(1,1)からの距離によって表され、原点Oから離れるほど彩度が高くなる。同図の例では、原点を中心とする同心円状の境界線(破線により図示)によって肌色検出エリア88が6つの領域に区分けされている。
【0075】
CPU14は、前処理系の同時化回路78から取得したRGBの三面データから肌色領域を検出した後、更に、当該肌色検出された部分を彩度を基準に領域分割する(図4のステップS118)。
【0076】
図6に、肌色検出された領域を更に彩度によって区分けした例を示す。画像内で対象物が異なるとその彩度も異なり、一般に人物の顔の肌色は、タングステン光源下の白色物や机などの木よりも彩度が高い傾向がある。したがって、肌色検出された領域を彩度によって細かく分けてその領域形状を把握することにより顔領域であるか、顔以外の領域であるかを判別することが容易になる。
【0077】
図4のステップS120において彩度による領域分割を行った後は、ステップS122に進む。ステップS122では、ステップS112で入手した焦点距離情報に従い、EEPROM24から顔領域の最大値テーブルを入手し、当該焦点距離における顔領域の予測最大値を求め、この最大値を顔領域判定の判定基準値として設定する。もちろん、カメラ10で撮影可能な最短撮影距離よりも近くで撮影される可能性等にも配慮して予測最大値に所定のマージンを付加して判定基準値を設定するか、或いは、判定にマージンをもたせることが好ましい。
【0078】
そして、彩度によって分割された肌色領域と予測した最大値とを比較し、最大値よりも極端に大きい領域は顔ではないと判断して顔領域の候補から排除し、残りの領域を顔領域の候補として抽出する(ステップS124)。これにより、実際に「顔」であり得ない大きいサイズの領域が排除される。
【0079】
ステップS124で絞り込まれた顔領域候補の中から、更に各領域について形状検出を行い、形状から顔領域を特定する(ステップS126)。すなわち、顔として妥当なモデル形状(楕円や円)から定められた縦横比の規定値と、顔候補の形状とを対比し、検出された形状の縦横比が規定値から大きく外れるものについては、顔以外の領域であると判断する。この形状判定によって顔候補が更に絞り込まれ、所定の縦横比を有する形状の領域部分が「顔」として判定される。
【0080】
こうして、顔領域が抽出され、その抽出結果は明るさ補正、ホワイトバランス補正、肌色をベストの色(目標値)に近づける色補正、赤目補正などに利用される。
【0081】
上述した実施形態によれば、カメラ情報である焦点距離情報を利用して顔領域の大きさを見積る一方、画像内を肌色検出して得られた肌色エリアを彩度によって領域分割して各エリアの大きさを認識し、見積もった最大値と比較して極端に大きなエリアは顔領域の候補から排除する構成にしたので、顔領域の候補を絞り込むことができる。そして、残ったエリアについて形状認識を行い、最終的な顔を判定するようにしたので、高い確度で正しい顔領域を抽出できる。
【0082】
例えば、図7に示したシーンは、電球90の照明下で白い布92を背景に人物94を撮影したものであるが、背景の布92や木の机96など、肌色と類似の色相を有する物体を排除して、人物94の顔を正確に抽出することができる。
【0083】
〔変形例1〕
上述の実施形態では、撮影画像の中から顔領域を完全に特定する例を述べたが、本発明の実施に際しては、最終的に顔領域を特定しない態様も可能である。
【0084】
例えば、人物の顔を重視した明るさ補正を行う場合などについては、肌色検出によって抽出された肌色エリアについて、顔領域の候補を絞りこむ代わりに、又はこれと併用して、明るさ演算における重みを付け係数を焦点距離情報に可変する態様がある。
【0085】
図8のように、肌色検出によって画面内に複数の肌色エリアが検出された場合に、焦点距離情報に基づき実際に顔である可能性の高低に応じた重み付けwi(i =1,2,3 …) を設定して、次式(3)に従い明るさYを計算する。
【0086】
【数3】
Y=Σ (wi ×Yi)/Σwi …(3)
ただし、Yi は各顔領域の明るさを示す。
【0087】
重み付けwi については、顔である可能性の低いエリアの重み付けを軽くする(「0」又は「0」に近い値にする)ことにより、顔である可能性の高いエリアの情報が強く反映された値となる。こうして求めた明るさYを所定の目標値に近づけるように補正処理を行う。
【0088】
〔変形例2〕
図1で説明した焦点距離情報を利用する態様に代えて、又はこれと併用して被写体の距離情報を利用する態様がある。
【0089】
図9に本発明の他の実施形態に係る電子カメラのブロック図を示す。図9中図1と同一又は類似の部分には同一の符号を付し、その説明は省略する。
【0090】
図9に示したカメラ10は、被写体距離(撮影距離)を測定する手段としての測距センサ102を備えている。測距センサ102から得られる信号はCPU14に入力され、CPU14は被写体の距離情報を取得する。
【0091】
なお、被写体距離を検出する手段は、三角測量の原理を利用したアクティブ方式やパッシブ方式で代表される測距方式のAF機構や位相法によるAF機構など、周知のAF機構を利用することが可能である。また、測距センサ102を省略したカメラ(図1の構成)においても、コントラストAFなどによりフォーカスレンズを合焦位置に移動させたときに、フォーカス位置検出手段からフォーカスレンズの位置情報(フォーカス位置情報)を取得し、この情報に基づいてカメラ10と被写体の距離(被写体距離)を計算することも可能である。
【0092】
こうして、被写体の距離情報を取得することにより、その距離で実際に撮影される顔の大きさを見積ることができる。顔サイズの算出に際しては、被写体距離に対応した顔の大きさを示すテーブルデータをEEPROM24内に格納しておいてもよいし、演算式を利用して計算してよい。
【0093】
被写体の距離情報に基づいて算出された顔サイズよりも極端に大きい肌色エリア又は極端に小さい肌色エリアについては顔候補から除外することにより、より正確に顔領域を抽出できる。
【0094】
図10に距離情報を利用する顔抽出のシーケンスを示す。同図中、図4のフローチャートと同一又は類似の工程には同一の符号を付してある。
【0095】
図10に示したフローチャートではステップS112において、測距センサ102の情報を読み込み、被写体の距離情報を入手する処理が追加されている。
【0096】
焦点距離情報に加えて被写体距離情報を得ることにより、顔サイズを一層正確に予測できるため、その予測に基づいて顔領域として許容される妥当な数値範囲を設定することが可能となり、顔領域の抽出精度が向上する。
【0097】
具体的には、図10のステップS122において、焦点距離に基づいて最大値テーブルを入手するとともに、被写体距離に基づいて顔領域の最小値テーブルを入手し、これらのテーブルで規定される数値範囲を基に顔領域の候補を絞り込む(ステップS124)。或いは、ステップS122において、焦点距離と被写体距離とに基づいて顔領域の最大値と最小値とを考慮した判定基準値(又は判定基準範囲)を定め、この判定基準値にしたがって、顔領域の候補を絞り込む(ステップS124)などの態様がある。
【0098】
図9及び図10では、測距センサ102から被写体距離情報を取得したが、被写体の距離情報は、撮影に使用するカメラから取得する態様に限らず、画像データに付加された付属情報(タグ情報)などから読み込むことも可能である。
【0099】
上述の実施形態では、光学ズーム機能を有するデジタルカメラを説明したが、単焦点レンズを用いるカメラについては、そのレンズの焦点距離の値を利用して顔サイズを判定すればよい。また、画像信号を電子的に処理して拡大画像を得る電子ズーム(デジタルズーム)機能を備えたカメラについても、画角全体の画像を撮影して、電子ズーム処理前の全体の画像データから顔領域を検出することにより、上述の実施形態と同様の手法を適用できる。
【0100】
上述の実施形態では、デジタルカメラを例示したが、本発明の適用範囲はこれに限定されず、カメラ付き携帯電話機、カメラ付きPDA、カメラ付きモバイルパソコンなど、電子撮像機能を備えた他の情報機器についても本発明を適用できる。この場合、撮像部は携帯電話機等の本体から分離可能な着脱式(外付けタイプ)のものであってもよい。
【0101】
また、上述のような電子撮像機能付き機器で記録した画像データを再生表示する画像再生装置、或いはプリント出力するプリント装置などについても本発明を適用することが可能である。
【0102】
【発明の効果】
本発明によれば、撮影光学系の焦点距離情報から人物の顔の最大値を予測し、その最大値から設定される判定基準値よりも大きな肌色領域については顔領域である可能性が低いものとして取り扱う構成にしたので、より高い確度で顔領域を判定することが可能である。
【0103】
また、焦点距離の情報に加えて被写体距離の情報を取得することにより、実際に撮影される人物の顔の大きさをより正確に見積ることができ、顔抽出の精度を上げることができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る電子カメラの構成を示すブロック図
【図2】本例のカメラにおける顔抽出処理に関係する要部ブロック図
【図3】撮影光学系における被写体とその像の関係を示した図
【図4】顔抽出処理のシーケンスを示すフローチャート
【図5】肌色として抽出する色相の範囲(肌色抽出エリア)と彩度分割の例を示す図
【図6】肌色検出された領域を更に彩度によって区分けした例を示す図
【図7】撮影シーンの一例を示す図
【図8】画面内に複数の肌色エリアが存在する場合の明るさ演算の例を示す図
【図9】本発明の他の実施形態に係る電子カメラのブロック図
【図10】被写体距離情報を利用した顔抽出処理のシーケンスを示すフローチャート
【符号の説明】
10…カメラ、14…CPU、24…EEPROM、42…撮影レンズ、44…CCD、48…ズーム位置検出センサ、74…積算回路、76…ホワイトバランス回路、78…同時化回路、88…肌色抽出エリア、102…測距センサ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a face area extraction method and apparatus, and more particularly to a method and apparatus for extracting an area corresponding to a human face existing in a color image acquired by a digital camera or the like.
[0002]
[Prior art]
The most noticeable part when appreciating a portrait is the face of the person. There has been proposed a technique for automatically detecting a region corresponding to a human face in an image so that the human face is reproduced with appropriate brightness and color (Patent Document 1). According to the method disclosed in Patent Document 1, a skin color area is extracted from an original image, an edge in the image is detected, and a skin color area surrounded by the edge is extracted as a face area.
[0003]
[Patent Document 1]
JP-A-9-101579
[0004]
[Problems to be solved by the invention]
However, in the method disclosed in Patent Document 1, there are cases where the edge of the face does not become a closed curve due to the amount of light at the time of shooting, and the face area may be erroneously detected. A problem in face extraction processing is an object having a hue similar to the skin color (for example, sand, ground, wood, brick, etc.). Furthermore, when shooting under a tungsten light source, the white balance cannot be completely achieved due to the robustness of auto white balance (AWB), and the light source color remains (without complete correction, Setting to leave an atmosphere). Therefore, when a white object is photographed under a tungsten light source, it becomes reddish yellow similar to the skin color, which hinders face area detection.
[0005]
The present invention has been made in view of such circumstances, and a face area extraction method and apparatus capable of correctly extracting a face area by eliminating an object having a hue similar to that of the face even in the above-described shooting situation. The purpose is to provide.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, a face region extraction method according to the present invention is a method for extracting a region corresponding to a human face from an image, and includes an information acquisition step of acquiring focal length information at the time of shooting, A maximum value predicting step for obtaining a maximum value assumed as a face region in the image based on the focal length information acquired in the information acquiring step, and a skin color for analyzing the image data and detecting a region having a skin color hue from the image Region detection processA skin color area detecting step including: a skin color detecting step for detecting a hue of skin color; and a saturation dividing step for further dividing the skin color portion detected in the skin color detecting step according to saturation.And among the skin color areas detected in the skin color area detection stepAbout the skin color area by saturation divided in the saturation division stepThe criterion value set from the maximum value estimated in the maximum value prediction stepCompared to the criterion valueAnd a processing step of performing processing for treating a region larger than that as a face region having a low possibility of being a face region.
[0007]
According to the present invention, the information indicating the focal length of the photographing optical system is acquired, and the maximum size of the human face obtained by actually photographing at the focal length is estimated. On the other hand, the skin tone region in the image is detected by analyzing the image data. Although the detected skin color area can be a face area candidate, in the present invention, a skin color area that is larger than the criterion value determined from the maximum value estimated based on the focal length information is unlikely to be a face area. Treat as a thing. For example, there is an aspect in which an area larger than the determination reference value is excluded from the face area candidates as not being a face area, or an arithmetic weighting coefficient is changed in an area that is unlikely to be a face area.
[0008]
In this way, the appropriate size as the face area is estimated from the focal length information at the time of shooting, and it is determined that the accuracy of the face area is low for extremely large areas, so the face area can be determined with higher accuracy. It becomes possible to judge.In addition, a region having a flesh-colored hue (skin-colored region) in an image is further divided into fine regions according to saturation, and the shape and size thereof are recognized, thereby facilitating the determination of a face region.
[0009]
The focal length information may be acquired from a camera used for shooting, or may be read from attached information (tag information) added to the image data.
[0010]
According to an aspect of the present invention, the processing step is a region that is larger than a determination reference value set from the maximum value estimated in the maximum value prediction step among the skin color regions detected in the skin color region detection step. And a face area determination step of determining a face area from areas smaller than the determination reference value.
[0011]
In this aspect, the skin color area larger than the determination reference value is excluded from the face area candidates as not being a face area, and the face area is determined from the skin color areas smaller than the determination reference value. By adopting such an algorithm configuration, it is possible to eliminate the influence of an object similar to a flesh-colored hue such as a background or ground under a tungsten light source, and to extract a more accurate face region.
[0014]
In order to identify a true face area from face area candidates that are smaller than the determination reference value, it is preferable to narrow down the face area based on the shape of the area. For example, a person's face is considered to be approximately circular or elliptical, and an aspect ratio for determining whether or not the face is a face region can be determined. Those that are extremely different from the specified aspect ratio (extremely long and narrow) for each candidate for the face area are excluded as non-faces, and those that are close to the specified aspect ratio are determined to be faces.
[0015]
In the face region extraction method of the present invention, a distance information acquisition step for acquiring subject distance information, and a face for obtaining a size assumed as a face region in the image based on the distance information acquired in the distance information acquisition step There is also a mode for adding a size prediction step.
[0016]
When the subject distance information is obtained in addition to the focal length information, the size of the face of the person actually photographed can be estimated more accurately, so the face area candidates are narrowed down based on the predicted value. And the accuracy of face extraction can be improved.
[0017]
In order to provide an apparatus that embodies the above method invention, a face area extraction apparatus according to the present invention is an apparatus that extracts an area corresponding to a human face from an image, and acquires focal length information at the time of shooting. An information acquisition means, a maximum value prediction means for obtaining a maximum value assumed as a face region in the image based on the focal length information acquired through the information acquisition means, and analyzing the image data to determine the skin color from the image. Skin color area detecting means for detecting an area having a hueA skin color area detecting means including a skin color detecting means for detecting a hue of the skin color, and a saturation dividing means for further dividing the skin color portion detected in the skin color detecting step by saturation.And among the skin color areas detected by the skin color area detection meansAbout the skin color area by saturation divided by the saturation dividing meansThe criterion value set from the maximum value estimated by the maximum value predicting meansCompared to the criterion valueA face area determining unit that deletes a larger area from the face area candidates and determines a face area from areas smaller than the determination reference value.
[0018]
The face area extraction apparatus of the present invention can be incorporated in a signal processing unit of an electronic photographing apparatus (electronic camera) such as a digital camera or a video camera, and reproduces or displays or prints out image data recorded by the electronic camera. It can be incorporated into an image processing apparatus or the like.
[0019]
The face area extraction apparatus of the present invention can be realized by a computer, and a program for realizing the steps of the above-described face area extraction method by a computer is stored on a CD-ROM, a magnetic disk, or other recording medium. The program can be recorded and provided to a third party through a recording medium, or the program download service can be provided through a communication line such as the Internet.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of a face area extracting method and apparatus according to the present invention will be described in detail with reference to the accompanying drawings.
[0021]
FIG. 1 is a block diagram showing a configuration of an electronic camera according to an embodiment of the present invention. This
[0022]
The overall operation of the
[0023]
The
[0024]
Further, an
[0025]
The
[0026]
The
[0027]
The
[0028]
Although not shown, the
[0029]
A signal from the
[0030]
The liquid crystal monitor 40 can be used as an electronic viewfinder for checking the angle of view at the time of shooting, and is used as a means for reproducing and displaying a recorded image. The liquid crystal monitor 40 is also used as a user interface display screen, and displays information such as menu information, selection items, and setting contents as necessary. Instead of a liquid crystal display, other types of display devices (display means) such as an organic EL can be used.
[0031]
Next, the shooting function of the
[0032]
The
[0033]
When the photographer operates the
[0034]
In this example, it is assumed that the focal length of the photographing
[0035]
The zoom position (corresponding to the focal length) of the
[0036]
The light that has passed through the photographing
[0037]
The subject image formed on the light receiving surface of the
[0038]
The signal charges accumulated in the photosensors of the
[0039]
The image signal output from the
[0040]
A timing generator (TG) 58 provides timing signals to the
[0041]
The
[0042]
The CCDRAW data stored in the
[0043]
When the captured image is output to the monitor, the image data is read from the
[0044]
When the photographer determines the angle of view and presses the
[0045]
The AF control in the
[0046]
The integrated value data obtained by the AF calculation unit is notified to the
[0047]
In relation to the AE control, the AE calculation unit includes a circuit that divides one screen into a plurality of areas (for example, 8 × 8) and integrates the RGB signals for each divided area, and provides the integrated value to the
[0048]
The image data captured in response to the full press of the shutter button 32 (S2 = ON) undergoes YC processing and other predetermined signal processing in the
[0049]
As a means for storing image data, various media such as a semiconductor memory card represented by SmartMedia (trademark), compact flash (trademark), a magnetic disk, an optical disk, and a magneto-optical disk can be used. Further, the recording medium (internal memory) built in the
[0050]
When the playback mode is selected by the mode selection means, the last image file (last recorded file) recorded on the
[0051]
By operating the cross button during single-frame playback in the playback mode, it is possible to advance the frame in the forward direction or in the reverse direction, and the next file after the frame advance is read from the
[0052]
FIG. 2 is a principal block diagram related to face extraction processing in the
[0053]
In FIG. 2, an
[0054]
The CCDRAW data converted into a digital signal by the A /
[0055]
The
[0056]
Thereafter, a recording image is captured in response to the full press of the shutter button 32 (S2 ON). The CCDRAW data acquired in response to S2 ON is temporarily stored in the
[0057]
The
[0058]
Based on the RGB three-plane data generated by the
[0059]
On the other hand, the CCDRAW data sent from the
[0060]
The luminance / chrominance
[0061]
Next, the face extraction function installed in the
[0062]
FIG. 3 is a diagram showing the relationship between the subject and its image in the photographing optical system. As shown in the figure, the ratio of the photographing distance D and the viewing angle L (the entire range that can be photographed at this focal length) is equal to the ratio of the focal length DF of the photographing
[0063]
[Expression 1]
Shooting distance D: viewing angle L = focal length DF: CCD size H (1)
That is, the following relationship is established between the actual size A of the human face included in the viewing angle L and the image size a on the CCD light receiving surface.
[0064]
[Expression 2]
Shooting distance D: actual size A = focal length DF: image size a (2)
The shooting distance D is the shortest distance (closest distance) that can be shot by the
[0065]
Although the actual size A of the person's face has some variation, a prescribed value can be set assuming that the size of the face is within a certain size range.
[0066]
Therefore, the image size on the
[0067]
Since the
[0068]
FIG. 4 is a flowchart showing a sequence in face extraction.
[0069]
First, CCDRAW data is recorded in the
[0070]
On the other hand, when the macro mode is OFF, processing by the preprocessing system (74, 76, 78) described in FIG. 2 is performed, and integration processing, white balance processing, and synchronization processing are performed from the recorded CCDRAW data (FIG. 4). Step S114).
[0071]
Next, the
[0072]
FIG. 5 is a diagram illustrating a hue range (skin color extraction area) to be extracted as a skin color. The illustrated color space is a linear system before gamma is applied, and is a coordinate system in which the horizontal axis is R / G and the vertical axis is B / G.
[0073]
In FIG. 5, a range surrounded by a rectangular frame denoted by
[0074]
Further, the skin
[0075]
After detecting the skin color area from the RGB three-surface data acquired from the preprocessing
[0076]
FIG. 6 shows an example in which the skin color detected area is further divided by saturation. Different objects in the image have different saturations, and generally the skin color of a person's face tends to be higher in saturation than white objects or trees such as desks under a tungsten light source. Therefore, it becomes easy to discriminate whether it is a face region or a region other than the face by finely dividing the skin color detected region according to the saturation and grasping the shape of the region.
[0077]
After performing the area division by saturation in step S120 of FIG. 4, the process proceeds to step S122. In step S122, in accordance with the focal length information obtained in step S112, a face area maximum value table is obtained from the
[0078]
Then, the skin color area divided by the saturation is compared with the predicted maximum value, and an area extremely larger than the maximum value is determined not to be a face, and is excluded from the face area candidates, and the remaining area is excluded from the face area. Are extracted as candidates (step S124). This eliminates large sized regions that cannot actually be “faces”.
[0079]
From the face area candidates narrowed down in step S124, shape detection is further performed for each area, and the face area is specified from the shape (step S126). That is, the aspect ratio determined from the model shape (ellipse or circle) appropriate for the face is compared with the shape of the face candidate, and the aspect ratio of the detected shape greatly deviates from the specified value. It is determined that the region is other than the face. Face candidates are further narrowed down by this shape determination, and an area portion having a shape having a predetermined aspect ratio is determined as a “face”.
[0080]
Thus, the face area is extracted, and the extraction result is used for brightness correction, white balance correction, color correction for bringing the skin color close to the best color (target value), red-eye correction, and the like.
[0081]
According to the above-described embodiment, the size of the face area is estimated by using the focal length information that is camera information, while the skin color area obtained by detecting the skin color in the image is divided into areas by saturation and each area is divided. Since the area that is extremely large compared to the estimated maximum value is excluded from the face area candidates, the face area candidates can be narrowed down. Since the shape of the remaining area is recognized and the final face is determined, a correct face area can be extracted with high accuracy.
[0082]
For example, the scene shown in FIG. 7 is a photograph of a
[0083]
[Modification 1]
In the above-described embodiment, the example in which the face area is completely specified from the captured image has been described. However, when the present invention is implemented, an aspect in which the face area is not finally specified is possible.
[0084]
For example, when performing brightness correction with an emphasis on the face of a person, for the skin color area extracted by skin color detection, the weight in brightness calculation is used instead of or in combination with the face area candidates. There is a mode in which the coefficient is changed to the focal length information.
[0085]
As shown in FIG. 8, when a plurality of skin color areas are detected in the screen by skin color detection, weights w i (i = 1, 2, 3) corresponding to the level of the possibility that the face is actually a face based on the focal length information. ...) is set, and brightness Y is calculated according to the following equation (3).
[0086]
[Equation 3]
Y = Σ (wi × Yi) / Σwi (3)
Yi indicates the brightness of each face area.
[0087]
As for the weighting w i, the information of the area that is likely to be a face is strongly reflected by reducing the weighting of the area that is not likely to be a face (a value close to “0” or “0”). Value. Correction processing is performed so that the brightness Y thus obtained approaches a predetermined target value.
[0088]
[Modification 2]
There is an aspect in which the distance information of the subject is used instead of or in combination with the aspect using the focal length information described in FIG.
[0089]
FIG. 9 shows a block diagram of an electronic camera according to another embodiment of the present invention. 9, parts that are the same as or similar to those in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted.
[0090]
The
[0091]
As the means for detecting the subject distance, it is possible to use a well-known AF mechanism such as an AF mechanism using a ranging method represented by an active method or a passive method using the principle of triangulation, or an AF mechanism using a phase method. It is. Also in a camera (configuration shown in FIG. 1) in which the
[0092]
Thus, by acquiring the distance information of the subject, it is possible to estimate the size of the face actually photographed at that distance. When calculating the face size, table data indicating the size of the face corresponding to the subject distance may be stored in the
[0093]
By excluding the skin color area that is extremely larger or smaller than the face size calculated based on the distance information of the subject from the face candidates, the face area can be extracted more accurately.
[0094]
FIG. 10 shows a face extraction sequence using distance information. In the figure, the same or similar steps as those in the flowchart of FIG.
[0095]
In the flowchart shown in FIG. 10, in step S112, a process of reading information from the
[0096]
By obtaining subject distance information in addition to focal length information, the face size can be predicted more accurately, so it is possible to set a reasonable numerical range that is allowed as a face area based on the prediction, Extraction accuracy is improved.
[0097]
Specifically, in step S122 of FIG. 10, the maximum value table is obtained based on the focal length, the minimum value table of the face area is obtained based on the subject distance, and the numerical range defined in these tables is obtained. Based on this, the face area candidates are narrowed down (step S124). Alternatively, in step S122, a determination reference value (or determination reference range) that considers the maximum value and the minimum value of the face area is determined based on the focal length and the subject distance, and a face area candidate is determined according to the determination reference value. There are modes such as narrowing down (step S124).
[0098]
9 and 10, the subject distance information is acquired from the
[0099]
In the above-described embodiment, the digital camera having the optical zoom function has been described. However, for a camera using a single focus lens, the face size may be determined using the value of the focal length of the lens. Also, for a camera equipped with an electronic zoom (digital zoom) function that electronically processes an image signal to obtain an enlarged image, an image of the entire angle of view is captured and the face area is determined from the entire image data before the electronic zoom processing. By detecting this, it is possible to apply the same technique as in the above-described embodiment.
[0100]
In the above-described embodiment, a digital camera has been exemplified, but the scope of application of the present invention is not limited to this, and other information devices having an electronic imaging function such as a camera-equipped mobile phone, a camera-equipped PDA, and a camera-equipped mobile personal computer. The present invention can also be applied to. In this case, the imaging unit may be a detachable (external type) that is separable from a main body such as a mobile phone.
[0101]
Further, the present invention can also be applied to an image reproducing apparatus that reproduces and displays image data recorded by the device with the electronic imaging function as described above, or a printing apparatus that performs print output.
[0102]
【The invention's effect】
According to the present invention, the maximum value of a person's face is predicted from the focal length information of the photographing optical system, and a skin color region that is larger than the criterion value set from the maximum value is less likely to be a face region. Therefore, it is possible to determine the face area with higher accuracy.
[0103]
Further, by acquiring subject distance information in addition to focal length information, it is possible to more accurately estimate the size of a person's face that is actually photographed, and to improve face extraction accuracy.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an electronic camera according to an embodiment of the present invention.
FIG. 2 is a principal block diagram related to face extraction processing in the camera of this example.
FIG. 3 is a diagram showing the relationship between a subject and its image in a photographic optical system.
FIG. 4 is a flowchart showing a sequence of face extraction processing;
FIG. 5 is a diagram illustrating an example of a hue range (skin color extraction area) to be extracted as a skin color and saturation division;
FIG. 6 is a diagram showing an example in which a region where skin color is detected is further divided by saturation;
FIG. 7 is a diagram showing an example of a shooting scene
FIG. 8 is a diagram showing an example of brightness calculation when there are a plurality of skin color areas in the screen.
FIG. 9 is a block diagram of an electronic camera according to another embodiment of the present invention.
FIG. 10 is a flowchart showing a sequence of face extraction processing using subject distance information.
[Explanation of symbols]
DESCRIPTION OF
Claims (5)
撮影時の焦点距離情報を取得する情報取得工程と、
前記情報取得工程で取得した焦点距離情報に基づき画像内における顔領域として想定される最大値を求める最大値予測工程と、
画像データを解析して当該画像内から肌色の色相を有する領域を検出する肌色領域検出工程であって、肌色の色相を検出する肌色検出工程と、前記肌色検出工程で検出される肌色部分を更に彩度によって分割する彩度分割工程と、を含む肌色領域検出工程と、
前記肌色領域検出工程で検出された肌色領域のうち前記彩度分割工程で分割された彩度別の肌色領域について、前記最大値予測工程で見積られた最大値から設定される判定基準値と比較し、該判定基準値よりも大きい領域について顔領域である可能性が低いものとして取り扱う処理を行う処理工程と、
を含むことを特徴とする顔領域抽出方法。A method for extracting an area corresponding to a human face from an image,
An information acquisition step of acquiring focal length information at the time of shooting;
A maximum value prediction step for obtaining a maximum value assumed as a face region in the image based on the focal length information acquired in the information acquisition step;
A skin color region detection step of analyzing image data to detect a region having a skin color hue from within the image, further comprising: a skin color detection step of detecting a skin color hue; and a skin color portion detected in the skin color detection step A skin color region detection step including a saturation division step of dividing by saturation ,
Compared with the reference value set from the maximum value estimated in the maximum value prediction step for the skin color region classified by saturation among the skin color regions detected in the skin color region detection step. And a processing step of performing processing that treats an area larger than the determination reference value as a face area that is unlikely to be a face area;
A facial region extraction method characterized by comprising:
前記距離情報取得工程で取得した距離情報に基づき画像内における顔領域として想定される大きさを求める顔サイズ予測工程と、
を含むことを特徴とする請求項1乃至3の何れか1項記載の顔領域抽出方法。A distance information acquisition step of acquiring subject distance information;
A face size prediction step for obtaining a size assumed as a face region in the image based on the distance information acquired in the distance information acquisition step;
Face region extraction method according to any one of claims 1 to 3, characterized in that it comprises a.
撮影時の焦点距離情報を取得する情報取得手段と、
前記情報取得手段を介して取得した焦点距離情報に基づき画像内における顔領域として想定される最大値を求める最大値予測手段と、
画像データを解析して当該画像内から肌色の色相を有する領域を検出する肌色領域検出手段であって、肌色の色相を検出する肌色検出手段と、前記肌色検出工程で検出される肌色部分を更に彩度によって分割する彩度分割手段と、を含む肌色領域検出手段と、
前記肌色領域検出手段で検出された肌色領域のうち前記彩度分割手段で分割された彩度別の肌色領域について、前記最大値予測手段で見積られた最大値から設定される判定基準値と比較し、該判定基準値よりも大きい領域について顔領域の候補から削除し、前記判定基準値よりも小さい領域の中から顔領域を決定する顔領域決定手段と、
を備えたことを特徴とする顔領域抽出装置。An apparatus for extracting an area corresponding to a human face from an image,
Information acquisition means for acquiring focal length information at the time of shooting;
Maximum value predicting means for obtaining a maximum value assumed as a face area in the image based on focal length information acquired via the information acquiring means;
Skin color area detecting means for analyzing image data and detecting an area having a flesh-colored hue from the image, further comprising: a flesh-color detecting means for detecting a flesh-colored hue; and a flesh-color portion detected in the flesh-color detecting step. A skin color area detecting means including a saturation dividing means for dividing by saturation ;
Of the skin color areas detected by the skin color area detecting means, the skin color areas classified by saturation divided by the saturation dividing means are compared with a criterion value set from the maximum value estimated by the maximum value predicting means. A face area determining unit that deletes an area larger than the determination reference value from the face area candidates and determines a face area from areas smaller than the determination reference value;
A face area extracting apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002355017A JP4126721B2 (en) | 2002-12-06 | 2002-12-06 | Face area extraction method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002355017A JP4126721B2 (en) | 2002-12-06 | 2002-12-06 | Face area extraction method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004185555A JP2004185555A (en) | 2004-07-02 |
JP4126721B2 true JP4126721B2 (en) | 2008-07-30 |
Family
ID=32755830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002355017A Expired - Fee Related JP4126721B2 (en) | 2002-12-06 | 2002-12-06 | Face area extraction method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4126721B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9824261B2 (en) | 2014-12-24 | 2017-11-21 | Samsung Electronics Co., Ltd. | Method of face detection, method of image processing, face detection device and electronic system including the same |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4006415B2 (en) * | 2004-06-03 | 2007-11-14 | キヤノン株式会社 | Image capturing apparatus, control method therefor, and control program |
JP4284448B2 (en) | 2005-01-28 | 2009-06-24 | 富士フイルム株式会社 | Image processing apparatus and method |
JP4581730B2 (en) * | 2005-02-15 | 2010-11-17 | 株式会社ニコン | Digital camera |
US20060182433A1 (en) | 2005-02-15 | 2006-08-17 | Nikon Corporation | Electronic camera |
JP4745724B2 (en) * | 2005-06-08 | 2011-08-10 | キヤノン株式会社 | Image processing method and image processing apparatus |
JP4217698B2 (en) | 2005-06-20 | 2009-02-04 | キヤノン株式会社 | Imaging apparatus and image processing method |
RU2006104311A (en) * | 2006-02-14 | 2007-09-20 | Самсунг Электроникс Ко. | FACE DETECTION METHOD ON DIGITAL IMAGES |
JP4971785B2 (en) * | 2006-12-28 | 2012-07-11 | キヤノン株式会社 | Image processing apparatus and method, and imaging apparatus |
JP4571617B2 (en) | 2006-12-28 | 2010-10-27 | 三星デジタルイメージング株式会社 | Imaging apparatus and imaging method |
JP4894661B2 (en) | 2007-07-24 | 2012-03-14 | 株式会社ニコン | Imaging device |
JP5315666B2 (en) * | 2007-10-31 | 2013-10-16 | 株式会社ニコン | Focus detection device, camera |
JP5003529B2 (en) * | 2008-02-25 | 2012-08-15 | 株式会社ニコン | Imaging apparatus and object detection method |
JP2009223524A (en) * | 2008-03-14 | 2009-10-01 | Seiko Epson Corp | Image processor, image processing method, and computer program for image processing |
JP2009223523A (en) * | 2008-03-14 | 2009-10-01 | Seiko Epson Corp | Image processor, image processing method, and computer program by image processing |
JP2009239368A (en) * | 2008-03-25 | 2009-10-15 | Seiko Epson Corp | Image processing method, image processor, image processing program, and printing device |
JP2010055468A (en) * | 2008-08-29 | 2010-03-11 | Nikon Corp | Image processing apparatus, and camera |
JP4726251B2 (en) * | 2008-09-18 | 2011-07-20 | キヤノン株式会社 | Imaging apparatus and image processing method |
JP5359150B2 (en) * | 2008-09-22 | 2013-12-04 | 株式会社ニコン | Imaging device |
JP2011008716A (en) * | 2009-06-29 | 2011-01-13 | Noritsu Koki Co Ltd | Image processing apparatus, image processing method and image processing program |
EP2602692A1 (en) * | 2011-12-05 | 2013-06-12 | Alcatel Lucent | Method for recognizing gestures and gesture detector |
JP6331566B2 (en) * | 2014-03-27 | 2018-05-30 | 株式会社リコー | Human head detection device and posture estimation device |
JP7346051B2 (en) | 2019-03-27 | 2023-09-19 | キヤノン株式会社 | Image processing device, image processing method, and program |
CN113592592B (en) * | 2021-07-28 | 2023-11-07 | 严沛熙 | Method for generating glasses frame fitting effect diagram and glasses frame virtual fitting system |
-
2002
- 2002-12-06 JP JP2002355017A patent/JP4126721B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9824261B2 (en) | 2014-12-24 | 2017-11-21 | Samsung Electronics Co., Ltd. | Method of face detection, method of image processing, face detection device and electronic system including the same |
Also Published As
Publication number | Publication date |
---|---|
JP2004185555A (en) | 2004-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4126721B2 (en) | Face area extraction method and apparatus | |
US7796831B2 (en) | Digital camera with face detection function for facilitating exposure compensation | |
JP4284448B2 (en) | Image processing apparatus and method | |
JP4730553B2 (en) | Imaging apparatus and exposure control method | |
JP4200428B2 (en) | Face area extraction method and apparatus | |
JP2006259688A (en) | Image capture device and program | |
US20090002518A1 (en) | Image processing apparatus, method, and computer program product | |
JP2009060195A (en) | Imaging apparatus, method, and program | |
JP4796007B2 (en) | Imaging device | |
JP2009048136A (en) | Focusing device and focusing method | |
JP2004201228A (en) | Method and device for extracting face area | |
JP2012194568A (en) | Imaging apparatus and program | |
JP4683337B2 (en) | Image display device and image display method | |
US7570294B2 (en) | Digital camera | |
JP4178017B2 (en) | Image processing method and digital camera | |
US8760527B2 (en) | Extending a digital camera focus range | |
JP2010141609A (en) | Imaging apparatus | |
KR101613617B1 (en) | Apparatus and method for digital picturing image | |
JP2010177731A (en) | Image reproducing device and imaging apparatus | |
JP2005033255A (en) | Image processing method of digital image, digital camera and print system | |
JP2008172395A (en) | Imaging apparatus and image processing apparatus, method, and program | |
JP4081609B2 (en) | Imaging device | |
JP2008005248A (en) | Imaging apparatus | |
JP2004274344A (en) | Image processing apparatus and method | |
US8754953B2 (en) | Digital camera providing an extended focus range |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050318 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20061211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080128 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080327 |
|
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: 20080421 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080504 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110523 Year of fee payment: 3 |
|
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: 20110523 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120523 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130523 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140523 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |