JP2008199146A - Photographing apparatus, method and program - Google Patents
Photographing apparatus, method and program Download PDFInfo
- Publication number
- JP2008199146A JP2008199146A JP2007030076A JP2007030076A JP2008199146A JP 2008199146 A JP2008199146 A JP 2008199146A JP 2007030076 A JP2007030076 A JP 2007030076A JP 2007030076 A JP2007030076 A JP 2007030076A JP 2008199146 A JP2008199146 A JP 2008199146A
- Authority
- JP
- Japan
- Prior art keywords
- face
- candidate
- component
- image
- predetermined
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、撮影により画像を取得するデジタルカメラ等の撮影装置および方法並びに撮影方法をコンピュータに実行させるためのプログラムに関するものである。 The present invention relates to a photographing apparatus and method such as a digital camera for obtaining an image by photographing, and a program for causing a computer to execute the photographing method.
デジタルカメラによる撮影において、撮影により取得した画像から例えば顔等の対象物を検出し、その対象物の検出結果に応じて画像に施す画像処理の条件を変更したり、撮影時における撮影条件を変更したりすることが行われている。また、とくに対象物を顔とした場合において、検出した顔の数をカウントしたり、検出した顔をトリミングして記録することも行われている。 In shooting with a digital camera, for example, an object such as a face is detected from an image acquired by shooting, and the conditions of image processing applied to the image are changed according to the detection result of the object, or the shooting conditions at the time of shooting are changed. It has been done. In particular, when the object is a face, the number of detected faces is counted, or the detected faces are trimmed and recorded.
このように画像から対象物を検出して種々の処理を行うためには、画像から正確に対象物を検出する必要がある。このため、対象物を正確に検出するための各種手法が提案されている。例えば、認証対象者の顔画像を撮影し、顔画像から認証対象者の顔の特徴量を抽出し、抽出した特徴量と基準の特徴量との類似度を計算し、この計算により得られる類似度をしきい値と比較して、認証対象者が本人であるか否かを認証する際に、認証対象者の利用頻度の高い時間帯か否かに応じてしきい値を変更することにより、認証対象者の利用頻度の高い時間帯における認証率を向上させる手法が提案されている(特許文献1参照)。 Thus, in order to detect an object from an image and perform various processes, it is necessary to accurately detect the object from the image. For this reason, various methods for accurately detecting an object have been proposed. For example, a face image of a person to be authenticated is photographed, a feature amount of the face of the authentication target person is extracted from the face image, a similarity between the extracted feature amount and a reference feature amount is calculated, and the similarity obtained by this calculation By comparing the threshold with the threshold value and authenticating whether or not the person to be authenticated is the principal, by changing the threshold according to whether or not the authentication person is frequently used There has been proposed a technique for improving the authentication rate in a time zone where the use frequency of the authentication target person is high (see Patent Document 1).
また、画像から顔候補を検出し、顔候補の色の分散値が小さい場合、肌色領域の占有率が大きい場合等の所定の条件を満たさない顔候補を非顔として、検出した顔候補から排除する手法も提案されている(特許文献2参照)。
上記特許文献1,2に記載された手法により、顔の認証精度または顔の検出精度を向上することができるが、さらに精度を向上させることが望まれている。
Although the face authentication accuracy or the face detection accuracy can be improved by the methods described in
本発明は上記事情に鑑みなされたものであり、画像からの顔の検出精度をより向上させることを目的とする。 The present invention has been made in view of the above circumstances, and an object thereof is to further improve the accuracy of detecting a face from an image.
本発明による撮影装置は、連続した撮影により画像を連続して取得する撮影手段と、
所定サイズの検出枠を前記画像上において移動させ、移動した位置毎に該検出枠内の前記画像から特徴量を算出し、該特徴量とあらかじめ定められた顔特徴量とのマッチング度を算出し、該マッチング度が所定のしきい値以上となったときに前記検出枠の位置の画像を顔候補として検出する顔検出手段と、
前記顔候補に含まれる少なくとも1つの顔構成部品の候補を該顔構成部品毎に検出する顔構成部品検出手段と、
前記顔構成部品毎に検出された前記顔構成部品候補の数および位置の少なくとも一方に基づいて、前記顔候補が真の顔であるか否かを判定する判定手段と、
所定の撮影の際に取得された所定撮影時画像から前記顔候補を検出するに際には、前記所定のしきい値を第1の値に設定し、該所定の撮影以降の撮影により取得された画像から前記顔候補を検出する際には、前記所定撮影時画像から検出された前記顔候補であって前記真の顔であると判定された顔候補のうち、前記マッチング度が最も低い顔候補を検出可能な第2の値を前記所定のしきい値に設定するしきい値設定手段とを備えたことを特徴とするものである。
An imaging apparatus according to the present invention includes imaging means for continuously acquiring images by continuous imaging,
A detection frame of a predetermined size is moved on the image, a feature amount is calculated from the image in the detection frame for each moved position, and a matching degree between the feature amount and a predetermined face feature amount is calculated. , A face detection unit that detects an image at the position of the detection frame as a face candidate when the matching degree is equal to or greater than a predetermined threshold;
Face component detection means for detecting at least one face component candidate included in the face candidate for each face component;
Determining means for determining whether or not the face candidate is a true face based on at least one of the number and position of the face component candidates detected for each face component;
When the face candidate is detected from a predetermined shooting image acquired at the time of predetermined shooting, the predetermined threshold is set to a first value and acquired by shooting after the predetermined shooting. When detecting the face candidate from the captured image, the face candidate having the lowest matching degree among the face candidates detected from the predetermined photographing image and determined to be the true face Threshold setting means for setting a second value capable of detecting a candidate to the predetermined threshold value is provided.
「顔構成部品」とは、顔に含まれる構成部品のことであり、具体的には両目の目頭、両目の目尻、左右の鼻の穴の脇、左右の口元および口の中央部分等を顔構成部品とすることができる。ここで、顔候補が真の顔である場合、顔構成部品候補は、顔構成部品がある位置に1つのみ検出されるわけではなく、顔構成部品の周囲にばらつく形で複数検出されることが多い。このため、本願発明においては、1つの顔構成部品について1以上の顔構成部品候補が検出されるものである。 “Face components” refers to components included in the face, specifically the eyes of the eyes, the corners of the eyes, the sides of the left and right nostrils, the left and right mouths, and the center of the mouth. It can be a component. Here, when the face candidate is a true face, only one face component candidate is detected at a position where the face component is located, and a plurality of face component candidates are detected in a manner that varies around the face component. There are many. For this reason, in the present invention, one or more face component candidate candidates are detected for one face component.
「マッチング度が最も低い顔候補を検出可能な第2のしきい値」としては、例えば、所定撮影時画像から検出した真の顔と判定された顔候補のうち、マッチング度が最も低い顔候補を検出した際のそのマッチング度よりも小さく、所定撮影時画像において真の顔であると判定されなかった顔候補のうち、マッチング度が比較的大きい顔候補についてのそのマッチング度よりも大きい値とすればよい。 As the “second threshold value that can detect the face candidate with the lowest matching degree”, for example, the face candidate with the lowest matching degree among the face candidates determined as the true face detected from the predetermined shooting image A value that is smaller than the matching degree at the time of detecting the image and that is greater than the matching degree for a face candidate having a relatively high matching degree among face candidates that are not determined to be true faces in the predetermined shooting image. do it.
なお、本発明による撮影装置においては、前記所定の撮影は、最初の撮影であってもよく、あらかじめ定められた間隔での撮影であってもよい。 In the photographing apparatus according to the present invention, the predetermined photographing may be initial photographing or photographing at a predetermined interval.
また、本発明による撮影装置においては、前記判定手段を、前記位置に基づいて前記顔候補が前記真の顔であるか否かを判定するに際し、前記顔候補の領域内における前記各顔構成部品候補の、対応する前記顔構成部品に対する位置的な尤度を算出し、該位置的な尤度に基づいて前記顔候補が前記真の顔であるか否かを判定する手段としてもよい。 Further, in the photographing apparatus according to the present invention, when the determination unit determines whether or not the face candidate is the true face based on the position, each face component in the face candidate region is determined. It is good also as a means which calculates the positional likelihood with respect to the said corresponding face component of a candidate, and determines whether the said face candidate is the said true face based on this positional likelihood.
また、本発明による撮影装置においては、前記判定手段を、前記位置に基づいて前記顔候補が前記真の顔であるか否かを判定するに際し、前記顔候補の領域内における前記各顔構成部品候補の、対応する前記顔構成部品以外の他の顔構成部品に対する位置関係の尤度を算出し、該位置関係の尤度に基づいて前記顔候補が前記真の顔であるか否かを判定する手段としてもよい。 Further, in the photographing apparatus according to the present invention, when the determination unit determines whether or not the face candidate is the true face based on the position, each face component in the face candidate region is determined. The likelihood of the positional relationship with respect to other face components other than the corresponding face component is calculated, and it is determined whether or not the face candidate is the true face based on the likelihood of the positional relationship. It is good also as a means to do.
また、本発明による撮影装置においては、前記判定手段を、前記位置に基づいて前記顔候補が前記真の顔であるか否かを判定するに際し、前記顔候補の領域内において前記各顔構成部品を正規化し、該正規化した前記各顔構成部品の位置に基づいて、前記顔候補が前記真の顔であるか否かを判定する手段としてもよい。 In the photographing apparatus according to the present invention, when the determination unit determines whether or not the face candidate is the true face based on the position, each face component in the face candidate region is determined. And a means for determining whether or not the face candidate is the true face based on the normalized position of each face component.
「顔候補を正規化する」とは、顔構成部品候補を顔候補の領域内における本来あるべき位置に位置せしめることである。具体的には顔候補の領域内の画像をアフィン変換して、各顔構成部品を拡大縮小、平行移動および回転することにより、各顔構成部品候補の位置を本来あるべき位置に位置せしめることができる。 “Normalize a face candidate” means to position a face component candidate at a position where it should be in a face candidate region. Specifically, by performing an affine transformation on the image in the face candidate region, each face component can be scaled, translated, and rotated, so that the position of each face component candidate can be positioned as it should be. it can.
本発明による撮影方法は、連続した撮影により画像を連続して取得し、
所定サイズの検出枠を前記画像上において移動させ、移動した位置毎に該検出枠内の前記画像から特徴量を算出し、該特徴量とあらかじめ定められた顔特徴量とのマッチング度を算出し、該マッチング度が所定のしきい値以上となったときに前記検出枠の位置の画像を顔候補として検出し、
前記顔候補に含まれる少なくとも1つの顔構成部品の候補を該顔構成部品毎に検出し、
前記顔構成部品毎に検出された前記顔構成部品候補の数および位置の少なくとも一方に基づいて、前記顔候補が真の顔であるか否かを判定するに際し、
所定の撮影の際に取得された所定撮影時画像から前記顔候補を検出するに際には、前記所定のしきい値を第1の値に設定し、該所定の撮影以降の撮影により取得された画像から前記顔候補を検出する際には、前記所定撮影時画像から検出された前記顔候補であって前記真の顔であると判定された顔候補のうち、前記マッチング度が最も低い顔候補を検出可能な第2の値を前記所定のしきい値に設定することを特徴とするものである。
The shooting method according to the present invention continuously acquires images by continuous shooting,
A detection frame of a predetermined size is moved on the image, a feature amount is calculated from the image in the detection frame for each moved position, and a matching degree between the feature amount and a predetermined face feature amount is calculated. , Detecting the image at the position of the detection frame as a face candidate when the matching degree is equal to or greater than a predetermined threshold value,
Detecting at least one face component candidate included in the face candidate for each face component;
In determining whether or not the face candidate is a true face based on at least one of the number and position of the face component candidates detected for each face component,
When the face candidate is detected from a predetermined shooting image acquired at the time of predetermined shooting, the predetermined threshold is set to a first value and acquired by shooting after the predetermined shooting. When detecting the face candidate from the captured image, the face candidate having the lowest matching degree among the face candidates detected from the predetermined photographing image and determined to be the true face A second value capable of detecting a candidate is set to the predetermined threshold value.
なお、本発明による撮影方法をコンピュータに実行させるためのプログラムとして提供してもよい。 In addition, you may provide as a program for making a computer perform the imaging | photography method by this invention.
本発明の撮影装置および方法によれば、所定の撮影の際に取得した所定撮影時画像から顔候補を検出する際には、マッチング度を比較する所定のしきい値が第1の値に設定される。また、所定の撮影以降の撮影により取得された画像から顔候補を検出する際には、所定撮影時画像から検出された顔候補であって真の顔であると判定された顔候補のうち、マッチング度が最も低い顔候補を検出可能な第2の値が所定のしきい値に設定される。このため、所定の撮影以降の撮影により取得された画像から検出される顔候補の数を少なくすることができる。 According to the photographing apparatus and method of the present invention, when a face candidate is detected from a predetermined photographing image acquired at a predetermined photographing, a predetermined threshold value for comparing the matching degree is set to the first value. Is done. In addition, when detecting a face candidate from an image acquired by shooting after a predetermined shooting, among the face candidates detected from the image at the time of the predetermined shooting and determined to be a true face, The second value that can detect the face candidate with the lowest matching degree is set to a predetermined threshold value. For this reason, it is possible to reduce the number of face candidates detected from images acquired by photographing after predetermined photographing.
ここで、顔には、目、鼻および口等の顔構成部品が含まれており、顔候補が真の顔である場合には、1つの顔構成部品について検出される顔構成部品候補が多くなる。また、顔候補が真の顔である場合には、顔構成部品候補は対応する顔構成部品の位置に存在することとなる。したがって、顔候補に含まれる顔構成部品毎の顔構成部品候補の数および位置の少なくとも一方に基づいて顔候補が真の顔であるか否かを判定することにより、顔候補から真の顔を精度良く検出することができる。 Here, the face includes face components such as eyes, nose and mouth, and when the face candidate is a true face, there are many face component candidates detected for one face component. Become. In addition, when the face candidate is a true face, the face component candidate exists at the position of the corresponding face component. Therefore, by determining whether or not the face candidate is a true face based on at least one of the number and position of face component candidates for each face component included in the face candidate, the true face is determined from the face candidate. It can be detected with high accuracy.
しかしながら、顔構成部品候補の数および/または位置に基づく真の顔であるか否かの判定は演算に長時間を要するものとなる。 However, it takes a long time to calculate whether or not the face is a true face based on the number and / or positions of the face component candidate candidates.
本発明においては、所定の撮影以降の撮影により取得された画像については、演算量が多い判定の処理を行う顔候補の数を少なくすることができるため、演算量を低減しつつも精度良く顔候補から真の顔を検出することができる。 In the present invention, since the number of face candidates subjected to a determination process with a large amount of calculation can be reduced for images obtained by shooting after a predetermined shooting, the face can be accurately obtained while reducing the amount of calculation. A true face can be detected from the candidates.
なお、各顔構成部品候補の位置が対応する顔構成部品の位置となるように各顔候補を正規化することにより、より精度良く顔候補から真の顔を検出することができる。 Note that by normalizing each face candidate so that the position of each face component candidate becomes the position of the corresponding face component, a true face can be detected from the face candidate with higher accuracy.
以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による撮影装置を適用したデジタルカメラの構成を示す概略ブロック図である。図1に示すように本実施形態によるデジタルカメラ1は、動作モードスイッチ、ズームレバー、上下左右ボタン、レリーズボタンおよび電源スイッチ等の操作系2と、操作系2の操作内容をCPU40に伝えるためのインターフェース部分である操作系制御部3とを有している。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing the configuration of a digital camera to which the photographing apparatus according to the first embodiment of the present invention is applied. As shown in FIG. 1, the
撮像系6としては、撮影レンズ10を構成するフォーカスレンズ10aおよびズームレンズ10bを有している。各々のレンズは、モータとモータドライバとからなるフォーカスレンズ駆動部11およびズームレンズ駆動部12によって光軸方向に移動可能である。フォーカスレンズ駆動部11はAF処理部30から出力されるフォーカス駆動量データに基づいて、ズームレンズ駆動部12はズームレバーの操作量データに基づいて、各々のレンズの移動を制御する。
The imaging system 6 includes a
また、絞り14は、モータとモータドライバとからなる絞り駆動部15によって駆動される。この絞り駆動部15は、AE/AWB処理部31から出力される絞り値データに基づいて絞り径の調整を行う。
The
シャッタ16は、メカニカルシャッタであり、モータとモータドライバとからなるシャッタ駆動部17によって駆動される。シャッタ駆動部17は、レリーズボタンの押下により発生する信号と、AE/AWB処理部31から出力されるシャッタスピードデータとに応じて、シャッタ16の開閉の制御を行う。
The
光学系の後方には撮像素子であるCCD18を有している。CCD18は、多数の受光素子を2次元的に配列した光電面を有しており、光学系を通過した被写体光がこの光電面に結像し、光電変換される。光電面の前方には、各画素に光を集光するためのマイクロレンズアレイと、R,G,B各色のフィルタが規則的に配列されたカラーフィルタアレイとが配置されている。CCD18は、CCD制御部19から供給される垂直転送クロックおよび水平転送クロックに同期して、画素毎に蓄積された電荷を1ラインずつシリアルなアナログ撮影信号として出力する。各画素において電荷を蓄積する時間、すなわち、露光時間は、CCD制御部19から与えられる電子シャッタ駆動信号によって決定される。また、CCD18はCCD制御部19により、あらかじめ定められた大きさのアナログ撮像信号が得られるようにゲインが調整されている。
A
なお、撮影レンズ10、絞り14、シャッタ16およびCCD18が撮像系6を構成する。
Note that the photographing
CCD18から取り込まれたアナログ撮影信号は、アナログ信号処理部20に入力される。アナログ信号処理部20は、アナログ信号のノイズを除去する相関2重サンプリング回路(CDS)と、アナログ信号のゲインを調節するオートゲインコントローラ(AGC)と、アナログ信号をデジタル信号に変換するA/Dコンバータ(ADC)とからなる。なお、アナログ信号処理部20が行う処理をアナログ信号処理とする。このデジタル信号に変換された画像データは、画素毎にR,G,Bの濃度値を持つCCD−RAWデータである。
The analog photographing signal captured from the
タイミングジェネレータ21は、タイミング信号を発生させるものであり、このタイミング信号をシャッタ駆動部17、CCD制御部19、およびアナログ信号処理部20に供給することにより、レリーズボタンの操作、シャッタ16の開閉、CCD18の電荷の取込み、およびアナログ信号処理部20の処理の同期をとっている。
The timing generator 21 generates a timing signal. By supplying this timing signal to the
フラッシュ制御部23は、撮影時にフラッシュ24を発光させる。
The
画像入力コントローラ25は、アナログ信号処理部20から入力されたCCD−RAWデータをフレームメモリ26に書き込む。
The
フレームメモリ26は、画像データに対して後述の各種画像処理(信号処理)を行う際に使用する作業用メモリであり、例えば、一定周期のバスクロック信号に同期してデータ転送を行うSDRAM(Synchronous Dynamic Random Access Memory)が使用される。
The
表示制御部27は、フレームメモリ26に格納された画像データをスルー画像としてモニタ28に表示させたり、再生モード時に記録メディア35に保存されている画像データをモニタ28に表示させたりするためのものである。なお、スルー画像は、撮影モードが選択されている間、所定時間間隔でCCD18により連続して撮影される。
The
AF処理部30およびAE/AWB処理部31は、プレ画像に基づいて撮影条件を決定する。このプレ画像とは、レリーズボタンが半押しされることによって発生する半押し信号を検出したCPU40がCCD18にプレ撮影を実行させた結果、フレームメモリ26に格納された画像データにより表される画像である。
The
AF処理部30は、プレ画像に基づいて焦点位置を検出し、フォーカス駆動量データを出力する(AF処理)。焦点位置の検出方式としては、例えば、所望とする被写体にピントが合った状態では画像のコントラストが高くなるという特徴を利用して合焦位置を検出するパッシブ方式が考えられる。
The
AE/AWB処理部31は、プレ画像に基づいて被写体輝度を測定し、測定した被写体輝度に基づいてISO感度、絞り値およびシャッタスピード等を決定し、ISO感度データ、絞り値データおよびシャッタスピードデータを露出設定値として決定するとともに(AE処理)、撮影時のホワイトバランスを自動調整する(AWB処理)。なお、露出およびホワイトバランスについては、撮影モードがマニュアルモードに設定されている場合には、デジタルカメラ1の撮影者がマニュアル操作により設定可能である。また、露出およびホワイトバランスが自動で設定された場合にも、撮影者が操作系2から指示を行うことにより、露出およびホワイトバランスをマニュアル調整することが可能である。
The AE /
画像処理部32は、本画像の画像データに対して、階調補正、シャープネス補正、色補正等の画質補正処理、CCD−RAWデータを輝度信号であるYデータと、青色色差信号であるCbデータおよび赤色色差信号であるCrデータとからなるYCデータに変換するYC処理を行う。この本画像とは、レリーズボタンが全押しされることによって実行される本撮影によりCCD18から取り込まれ、アナログ信号処理部20、画像入力コントローラ25経由でフレームメモリ26に格納された画像データによる画像である。本画像の画素数の上限は、CCD18の画素数によって決定されるが、例えば、ファイン、ノーマル等の設定により、記録画素数を変更することができる。一方、スルー画像およびプレ画像の画像数は、本画像よりも少なく、例えば、本画像の1/16程度の画素数で取り込まれる。
The
圧縮/伸長処理部33は、画像処理部32によって補正・変換処理が行われた本画像の画像データに対して、例えば、JPEG等の圧縮形式で圧縮処理を行い、画像ファイルを生成する。この画像ファイルには、Exifフォーマット等に基づいて、撮影日時等の付帯情報が格納されたタグが付加される。また、圧縮/伸長処理部33は、再生モードの場合には、記録メディア35から圧縮された画像ファイルを読み出し、伸長処理を行う。伸長後の画像データはモニタ28に出力され、画像データの画像が表示される。
The compression /
メディア制御部34は、記録メディア35にアクセスして画像ファイルの書き込みと読み込みの制御を行う。
The
内部メモリ36は、デジタルカメラ1において設定される各種定数、およびCPU40が実行するプログラム等を記憶する。
The
顔検出部37は、撮影により取得された画像に含まれるすべての顔候補を検出する。なお、画像は、スルー画像、プレ画像および本画像のいずれであってもよいが、本実施形態においてはスルー画像から顔候補を検出するものとする。ここで、顔を検出する手法としては、あるサイズを有する検出枠を画像上少しずつ移動させ、移動した位置毎に検出枠内の画像から特徴量を算出し、あらかじめ定められていた顔特徴量とのマッチング度を算出し、マッチング度がしきい値Th0以上となる検出枠の位置を顔候補として検出する手法を用いる。なお、検出枠の大きさを変更することにより異なる大きさの顔候補の検出が可能となる。また、しきい値Th0は後述するしきい値設定部42により設定される。
The
そして顔検出部37により、図2に示すように画像G1から矩形の検出枠により囲まれる顔候補F1〜F5を検出することができる。なお、図2においては、検出されるのは顔の候補であるため、顔が存在しない部分においても検出枠により囲まれる領域が含まれている。
Then, the
顔構成部品検出部38は、顔候補に含まれる複数の顔構成部品についての候補である顔構成部品候補を検出する。本実施形態においては、両目の目尻K1,K2、両目の目頭K3,K4、左右の鼻の穴の脇K5,K6、左右の口元K7,K8および口の中央部分K9の9個の顔構成部品K1〜K9についての顔構成部品候補を検出するものとする。具体的には、矩形の各顔構成部品のパターンを、処理対象の顔候補の領域内の画像上を少しずつ移動させ、移動した位置毎にマッチング度を算出し、マッチング度があらかじめ定められたしきい値Th1以上となったパターンの位置の座標を顔構成部品候補として検出する。なお、座標は顔候補内の領域の左上隅を原点とした場合の顔候補内における座標である。
The face
ここで、顔候補が真の顔である場合、マッチング度がしきい値Th1以上となるパターンの位置を顔構成部品候補として検出すると、顔構成部品候補は対応する顔構成部品K1〜K9の位置において1つのみ検出されるものではなく、対応する顔構成部品K1〜K9の周囲に複数分布して検出されることが多い。このため、顔構成部品検出部38は、各顔構成部品毎に1以上の顔構成部品候補を検出する。
Here, when the face candidate is a true face, if a position of a pattern having a matching degree equal to or greater than the threshold Th1 is detected as a face component candidate, the face component candidates are positions of corresponding face components K1 to K9. Are often detected in a distributed manner around the corresponding face components K1 to K9. Therefore, the face
ここで、顔候補に9つの顔構成部品K1〜K9のすべてが含まれている場合、図3(a)に示すように両目の目尻K1,K2、両目の目頭K3,K4、左右の鼻の穴の脇K5,K6、左右の口元K7,K8および口の中央部分K9の9個の顔構成部品のそれぞれに対応する顔構成部品候補が検出される。また、例えば左目の目頭について、図3(b)の×印で示すように複数の顔構成部品候補が検出される。 Here, when all nine face components K1 to K9 are included in the face candidate, as shown in FIG. 3A, the corners K1 and K2 of the eyes, the heads K3 and K4 of the eyes, and the right and left nose Face component candidate candidates corresponding to the nine face component parts of the hole sides K5 and K6, the left and right mouths K7 and K8, and the center part K9 of the mouth are detected. Further, for example, a plurality of face component candidate candidates are detected for the left eye as indicated by the crosses in FIG.
なお、マッチング度がしきい値Th1以上となる顔構成部品候補が検出されない場合には、対応する顔構成部品の候補は検出されなかったものとする。 When no face component candidate with a matching degree equal to or greater than the threshold Th1 is detected, it is assumed that no corresponding face component candidate has been detected.
判定部39は、顔検出部37が検出したすべての顔候補について、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補の数に基づいて真の顔であるか否かを判定して、真の顔と判定された顔候補を真の顔として検出する。具体的には、すべての顔候補のうちの処理対象の顔候補について、上記9個の顔構成部品K1〜K9のそれぞれについての顔構成部品候補の総数N1〜N9を算出し、さらに総数N1〜N9の加算値であるNsumを算出する。そして加算値Nsumがしきい値Th2以上である場合に、処理対象の顔候補を真の顔であると判定し、その顔候補を真の顔として検出する。なお、加算値Nsumがしきい値Th2未満の場合は処理対象の顔候補を非顔と判定する。
The determination unit 39 determines whether or not all face candidates detected by the
なお、上記9個の顔構成部品K1〜K9のそれぞれについての顔構成部品候補の総数N1〜N9を9次元空間にプロットし、9次元空間においてしきい値を定める超平面または超曲面を設定し、プロットした総数N1〜N9がしきい値を定める超平面または超曲面のいずれの側にあるかに応じて、処理対象の顔候補が真の顔であるか否かを判定するようにしてもよい。ここで、簡単のために、判定に使用する顔構成部品を左右の口元K7,K8および口の中央部分K9のみとした場合、総数N7〜N9は3次元空間にプロットされる。図4は総数N7〜N9を3次元空間にプロットした状態を示す図である。まず、総数N7〜N9が図4(a)に示すようにプロットされたとすると、そのプロットの位置X1(N7,N8,N9)は、しきい値を設定する超平面A1よりも上側(すなわち値が大きい側)にある。したがって、図4(a)に示すようにプロットがなされた場合は、処理対象の顔候補を真の顔と判定する。 The total number N1 to N9 of face component candidates for each of the nine face component parts K1 to K9 is plotted in a 9-dimensional space, and a hyperplane or hypersurface that defines a threshold in the 9-dimensional space is set. Depending on whether the plotted total number N1 to N9 is on the side of the hyperplane or hypersurface that defines the threshold, it is determined whether the face candidate to be processed is a true face. Good. Here, for the sake of simplicity, when the face components used for the determination are only the left and right mouths K7 and K8 and the center part K9 of the mouth, the total number N7 to N9 is plotted in a three-dimensional space. FIG. 4 is a diagram showing a state in which the total number N7 to N9 is plotted in a three-dimensional space. First, if the total number N7 to N9 is plotted as shown in FIG. 4A, the position X1 (N7, N8, N9) of the plot is above the hyperplane A1 (that is, the value) On the larger side). Therefore, when a plot is made as shown in FIG. 4A, the face candidate to be processed is determined as a true face.
一方、総数N7〜N9が図4(b)に示すようにプロットされたとすると、そのプロットの位置X2(N7,N8,N9)は、しきい値を設定する超平面A1よりも下側(すなわち値が小さい側)にある。したがって、図4(b)に示すようにプロットがなされた場合は、処理対象の顔候補を真の顔でないと判定する。 On the other hand, if the total number N7 to N9 is plotted as shown in FIG. 4B, the position X2 (N7, N8, N9) of the plot is lower than the hyperplane A1 for setting the threshold (that is, The value is on the smaller side. Therefore, when a plot is made as shown in FIG. 4B, it is determined that the face candidate to be processed is not a true face.
なお、総数N1〜N9のそれぞれについてしきい値Th3を超えるか否かを判定し、しきい値Th3を超えた総数の数がさらにしきい値Th4を超えたときに、処理対象の顔候補を真の顔であると判定してもよい。 It is determined whether the total number N1 to N9 exceeds the threshold value Th3, and when the total number exceeding the threshold value Th3 further exceeds the threshold value Th4, the face candidates to be processed are determined. You may determine that it is a true face.
しきい値設定部42は、顔検出部37が顔候補を検出する際にマッチング度と比較するしきい値Th0を設定する。まず、1回目の撮影により取得された画像(スルー画像)から顔候補を検出する際には、より多くの顔候補が検出されるようにしきい値Th0を比較的低い値Z0に設定する。これにより、顔検出部37は、例えば図5(a)に示すように、画像G1から矩形の検出枠により囲まれる顔候補F1〜F10を検出することができる。なお、図5(a)においては、検出されるのは顔の候補であるため、顔が存在しない部分においても検出枠により囲まれる領域が含まれている。
The
一方、2回目以降の撮影により取得された画像から顔候補を検出する際には、1回目の撮影よりも検出される顔候補を少なくするために、しきい値Th0を値Z0よりも大きい値Z1に設定する。具体的には、1回目の撮影による取得した画像から検出した、真の顔と判定された顔候補のうち、マッチング度が最も低い顔候補を検出した際のそのマッチング度Z2よりも小さく、1回目の撮影により取得された画像から検出した、真の顔であると判定されなかった顔候補のうち、マッチング度が最も大きい顔候補についてのそのマッチング度Z3よりも大きい値Z1となるようにしきい値Th0を設定する。 On the other hand, when detecting face candidates from images acquired by the second and subsequent shootings, the threshold Th0 is set to a value larger than the value Z0 in order to reduce the number of face candidates detected compared to the first shooting. Set to Z1. Specifically, it is smaller than the matching degree Z2 when the face candidate with the lowest matching degree is detected from the face candidates determined as the true face detected from the image acquired by the first shooting. Among the face candidates that are detected from the image acquired by the second shooting and are not determined to be true faces, the threshold value is set to a value Z1 that is greater than the matching degree Z3 for the face candidate having the highest matching degree. Set the value Th0.
図6はしきい値Th0の設定を説明するための図である。図6において横軸は1回目の撮影により取得された画像から検出された顔候補F1〜F10を、縦軸はマッチング度を示す。図6に示すように顔候補F1〜F10のうち、真の顔と判定されたものは顔候補F1〜F3である。また、真の顔と判定された顔候補F1〜F3において、マッチング度が最も小さいのは顔候補F3であり、そのマッチング度はZ2である。一方、顔候補F4〜F10は非顔と判定され、非顔と判定された顔候補F4〜F10において、マッチング度が最も大きいのは顔候補F8であり、そのマッチング度はZ3である。 FIG. 6 is a diagram for explaining the setting of the threshold value Th0. In FIG. 6, the horizontal axis indicates the face candidates F1 to F10 detected from the image acquired by the first shooting, and the vertical axis indicates the matching degree. As shown in FIG. 6, among the face candidates F1 to F10, those determined as true faces are the face candidates F1 to F3. Of the face candidates F1 to F3 determined to be true faces, the face candidate F3 has the smallest matching degree, and the matching degree is Z2. On the other hand, the face candidates F4 to F10 are determined to be non-faces. Among the face candidates F4 to F10 determined to be non-faces, the face candidate F8 has the largest matching degree, and the matching degree is Z3.
したがって、しきい値設定部42は、顔検出部37が2回目以降の撮影により取得した画像から顔候補を検出する際には、顔候補F3のマッチング度Z2と顔候補F8のマッチング度Z3との中間の値Z1(例えばZ1=(Z2+Z3)/2)にしきい値Th0を設定する。このようにしきい値Th0を値Z1に設定することにより、1回目の撮影により取得された画像からは、顔候補F1〜F3のみが検出されることとなる。また、2回目以降の撮影により取得された画像からは、例えば図5(b)に示すように、図5(a)に示す顔候補F1〜F3に対応する顔候補F1′〜F3′が検出される。なお、顔候補F8に対応する顔候補F4′が検出される可能性もある。
Therefore, when the
なお、上記では非顔と判定された顔候補F4〜F10において、マッチング度が最も大きい顔候補F8のマッチング度Z3を用いてしきい値Th0の値Z1を設定しているが、非顔と判定された顔候補F4〜F10において、マッチング度が2または3番目に大きい顔候補F9,F10のマッチング度と顔候補F3のマッチング度Z2との中間の値にしきい値Th0を設定するようにしてもよい。 Note that, in the face candidates F4 to F10 determined as non-faces in the above, the threshold value Th0 of the threshold value Th0 is set using the matching degree Z3 of the face candidate F8 having the highest matching degree. In the obtained face candidates F4 to F10, the threshold value Th0 may be set to an intermediate value between the matching degrees of the face candidates F9 and F10 having the second or third largest matching degree and the matching degree Z2 of the face candidate F3. Good.
また、スルー画像の撮影中は、被写体が変更される可能性が高く、その場合、検出されるべき顔候補が変化する。本実施形態においては、しきい値設定部42は、1回目の撮影から所定撮影間隔経過する毎にしきい値Th0を値Z0に設定し、その撮影の次の撮影により取得される画像からの顔候補の検出のためのしきい値Th0の値を新たに設定し直す。例えば、スルー画像を1秒間に30撮影する場合には、30回の撮影毎にしきい値Th0を値Z0に設定して、次回の以降の撮影により取得される画像から顔候補を検出する際のしきい値Th0の値を設定し直す。
In addition, during shooting a through image, there is a high possibility that the subject is changed, and in this case, the face candidates to be detected change. In the present embodiment, the
CPU40は、操作系2およびAF処理部30等の各種処理部からの信号に応じてデジタルカメラ1の本体各部を制御する。また、CPU40は、スルー画像の撮影中に、各スルー画像から真の顔を検出するように、顔検出部37、顔構成部品検出部38および判定部39を制御する。なお、判定部39が真の顔を検出すると、CPU40は、図7に示すように検出した真の顔を矩形の領域A1〜A3で囲んでスルー画像を表示するように表示制御部27に指示を行う。なお、矩形の領域は顔検出部37が検出した顔候補の検出枠に相当するものである。
The
データバス41は、各種処理部、フレームメモリ26およびCPU40等に接続されており、デジタル画像データおよび各種指示等のやり取りを行う。
The
次いで、第1の実施形態において行われる処理について説明する。図8は第1の実施形態において行われる処理を示すフローチャートである。デジタルカメラ1の動作モードが撮影モードに設定されることによりCPU40が処理を開始し、スルー画像の撮影を行う(ステップST1)。そして、しきい値設定部42がしきい値設定処理を行う(ステップST2)。
Next, processing performed in the first embodiment will be described. FIG. 8 is a flowchart showing the processing performed in the first embodiment. When the operation mode of the
図9はしきい値設定処理のフローチャートである。まず、スルー画像の撮影が1回目であるか否かを判定し(ステップST11)、ステップST11が肯定されるとしきい値Th0を値Z0に設定し(ステップST12)、処理を終了する。ステップST11が否定されるとスルー画像の撮影が、前回しきい値Th0を値Z0に設定してから所定撮影間隔経過してからの撮影であるか否かを判定し(ステップST13)、ステップST13が肯定されると、ステップST12に進んでしきい値Th0を値Z0に設定し、処理を終了する。 FIG. 9 is a flowchart of the threshold setting process. First, it is determined whether or not a through image is captured for the first time (step ST11). If step ST11 is affirmed, a threshold value Th0 is set to a value Z0 (step ST12), and the process ends. If step ST11 is negative, it is determined whether or not the through image has been shot after a predetermined shooting interval has elapsed since the previous threshold Th0 was set to the value Z0 (step ST13). Is affirmed, the process proceeds to step ST12, the threshold value Th0 is set to the value Z0, and the process ends.
一方、ステップST13が否定されると、しきい値Th0を値Z1に設定し(ステップST14)、処理を終了する。 On the other hand, if step ST13 is negative, the threshold Th0 is set to the value Z1 (step ST14), and the process ends.
図8に戻り、ステップST2に続いて顔検出部37がスルー画像に含まれるすべての顔候補を検出する(ステップST3)。次いで、顔構成部品検出部38が、i番目の顔候補を処理対象の顔候補として、処理対象の顔候補から顔構成部品毎の顔構成部品候補を検出する(ステップST4)。なお、iの初期値は1である。また、処理の順序は、例えばスルー画像上における向かって左側に存在する顔候補から右側に向かって順に行うようにすればよい。
Returning to FIG. 8, following step ST2, the
そして、判定部39が、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補の総数の加算値Nsumがしきい値Th2以上であるか否かを判定し(ステップST5)、ステップST5が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST6)。一方、ステップST5が否定されると、処理対象の顔候補を非顔と判定する(ステップST7)。
Then, the determination unit 39 determines whether or not the addition value Nsum of the total number of face component candidates for each face component detected by the face
ステップST6,7に続いて、CPU40がすべての顔候補について判定部39が判定を終了したか否かを判定し(ステップST8)、ステップST8が否定されると、iに1を加算し(ステップST9)、ステップST4に戻る。ステップST8が肯定されると、真の顔を矩形領域で囲んだスルー画像をモニタ28に表示し(ステップST10)、ステップST1にリターンする。
Subsequent to steps ST6 and 7, the
このように、第1の実施形態においては、検出された顔構成部品候補の数に基づいて、顔候補から真の顔を検出するようにしたものである。ここで、顔には、目、鼻および口等の顔構成部品が含まれており、顔候補が真の顔である場合には、1つの顔構成部品について検出される顔構成部品候補が多くなる。したがって、顔候補に含まれる顔構成部品毎の顔構成部品候補の数に基づいて顔候補が真の顔であるか否かを判定することにより、顔候補から真の顔を精度良く検出することができる。 As described above, in the first embodiment, a true face is detected from face candidates based on the number of detected face component candidate candidates. Here, the face includes face components such as eyes, nose and mouth, and when the face candidate is a true face, there are many face component candidates detected for one face component. Become. Therefore, it is possible to accurately detect the true face from the face candidates by determining whether the face candidate is a true face based on the number of face component candidates for each face component included in the face candidate. Can do.
しかしながら、顔構成部品候補の数に基づく真の顔であるか否かの判定は演算に長時間を要するものとなる。第1の実施形態においては、1回目の撮影以降および所定撮影間隔経過する毎の撮影以降の撮影により取得された画像については、顔検出のためのしきい値Th0の値を大きくするようにしたため、検出される顔候補の数を少なくすることができる。したがって、演算量が多い判定の処理を行う顔候補の数を少なくすることができ、これにより、演算量を低減しつつも精度良く顔候補から真の顔を検出することができる。 However, it takes a long time to determine whether or not the face is a true face based on the number of face component candidates. In the first embodiment, the value of the threshold value Th0 for face detection is increased for images acquired by shooting after the first shooting and after shooting every time a predetermined shooting interval elapses. The number of detected face candidates can be reduced. Therefore, it is possible to reduce the number of face candidates that are subjected to a determination process with a large amount of calculation, and thereby it is possible to detect a true face with high accuracy while reducing the amount of calculation.
なお、上記第1の実施形態においては、両目の目尻K1,K2、両目の目頭K3,K4、左右の鼻の穴の脇K5,K6、左右の口元K7,K8および口の中央部分K9の9個の顔構成部品を検出しているが、これらをすべて検出する必要はなく、これらの顔構成部品のうちの1以上の顔構成部品の候補を検出するようにしてもよい。この場合、総数の加算値Nsumと比較するしきい値Th2は、検出する顔構成部品の数に応じて変更すればよい。なお、検出する顔構成部品が1つのみの場合は、両目の目尻および両目の目頭のうちのいずれか1つを検出することが好ましい。また、検出する顔構成部品は、両目の目尻、両目の目頭、左右の鼻の穴の脇、左右の口元および口の中央部分に限定されるものではなく、眉毛、両目の黒目部分等、顔を構成する部品であれば、任意の構成部品を用いることができる。
In the first embodiment, the corners K1 and K2 of the eyes, the eyes K3 and K4 of the eyes, the sides K5 and K6 of the right and left nostrils, the left and right mouths K7 and K8, and the
次いで、本発明の第2の実施形態について説明する。なお、第2の実施形態においては、判定部39が行う処理が第1の実施形態と異なるのみであるため、構成についての詳細な説明はここでは省略する。 Next, a second embodiment of the present invention will be described. In the second embodiment, the process performed by the determination unit 39 is only different from that in the first embodiment, and a detailed description of the configuration is omitted here.
第2の実施形態においては、判定部(第1の実施形態と異なるため39Aとする)が、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補の位置的な尤度を算出し、位置的な尤度に基づいて顔候補が真の顔であるか否かを判定する。ここで、位置的な尤度とは、顔候補の領域内において、検出された顔構成部品候補がどの程度対応する本来あるべき顔構成部品の位置に位置しているかを表す確率である。
In the second embodiment, the determination unit (39A because it is different from the first embodiment) determines the positional likelihood of the face component candidate for each face component detected by the face
ここで、本実施形態においては、9種類の顔構成部品について各顔構成部品の顔候補内における存在確率を表した確率分布があらかじめ求められている。 Here, in the present embodiment, probability distributions representing the existence probabilities in the face candidates of each face component for nine types of face components are obtained in advance.
図10は顔構成部品の存在確率を表す確率分布を示す図である。図10に示す確率分布は、顔候補を検出した検出枠をあらかじめ定められた一定のサイズに正規化した場合における、検出枠内での両目の目尻K1,K2、両目の目頭K3,K4、左右の鼻の穴の脇K5,K6、左右の口元K7,K8および口の中央部分K9の9個の顔構成部品の存在確率の確率分布を表すものである。なお、図10における丸印B1〜B9は、それぞれ顔候補の両目の目尻K1,K2、両目の目頭K3,K4、左右の鼻の穴の脇K5,K6、左右の口元K7,K8および口の中央部分K9の存在確率を表す確率分布であり、図10における紙面をXY平面とし、紙面に垂直な方向をZ方向とした場合、図11の確率分布のプロファイルに示すようにZ方向が各顔構成部品の存在確率を示すものとなる。したがって、図10における各丸印の中心に近いほど各顔構成部品の存在確率が高いものとなる。 FIG. 10 is a diagram showing a probability distribution representing the presence probability of a face component. The probability distribution shown in FIG. 10 shows that when the detection frame in which the face candidate is detected is normalized to a predetermined size, the eye corners K1 and K2, the eye heads K3 and K4 of the eyes in the detection frame, 9 represents the probability distribution of the existence probabilities of the nine face components of the nostril sides K5 and K6, the left and right mouths K7 and K8, and the central part K9 of the mouth. Note that the circles B1 to B9 in FIG. 10 are the eye corners K1 and K2 of the eyes of the face candidates, the eyes K3 and K4 of the eyes, the sides of the right and left nostrils K5 and K6, the left and right mouths K7 and K8, and the mouth. FIG. 10 is a probability distribution representing the existence probability of the central portion K9, and when the paper plane in FIG. 10 is the XY plane and the direction perpendicular to the paper plane is the Z direction, the Z direction indicates each face as shown in the probability distribution profile of FIG. It indicates the existence probability of the component. Therefore, the closer to the center of each circle in FIG. 10, the higher the probability of existence of each face component.
なお、確率分布は多数の顔のサンプル画像を用いてあらかじめ求めておけばよい。 The probability distribution may be obtained in advance using a large number of face sample images.
判定部39Aは、顔検出部37が検出した各顔候補を上記一定のサイズに正規化し、正規化した顔候補内の各顔構成部品毎の顔構成部品候補について、対応する顔構成部品の確率分布を参照して存在確率を位置的な尤度として算出する。具体的には、各顔構成部品候補について、対応する顔構成部品の存在確率を表す確率分布付近の位置を求め、その位置における存在確率を位置的な尤度として算出する。これにより、例えば左目目尻の候補1〜4が、図12に示す確率分布B1付近の位置C1〜C4にある場合には、図13に示すように、位置C1にある左目目尻候補1の尤度0%、位置C2にある左目目尻候補2の尤度2%、位置C3にある左目目尻候補3の尤度9%、位置C4にある左目目尻候補4の尤度17%というように、各顔構成部品候補の位置的な尤度が求められる。
The determination unit 39A normalizes each face candidate detected by the
さらに判定部39Aは、顔構成部品毎に顔構成部品候補の位置的な尤度の平均値を算出する。図14は2つの顔候補についての顔構成部品毎の顔構成部品候補の位置的な尤度の平均値を示す図である。そして、処理対象の顔候補について、位置的な尤度の平均値がしきい値Th5以上となる顔構成部品の数がしきい値Th6以上であるか否かを判定し、この判定が肯定された場合に処理対象の顔候補を真の顔であると判定して検出する。例えば、しきい値Th5として13%を、本実施形態においては9個の顔構成部品を用いているためしきい値Th6として5を用いるとすると、図14に示す顔候補1について、位置的な尤度の平均値がしきい値Th5以上となる顔構成部品は、左目目尻、左目目頭、右目目頭、左鼻脇、右鼻脇および右口元の6個となり、その数がしきい値Th6以上となるため、処理対象の顔候補1は真の顔と判定されて検出される。一方、顔候補2は尤度の平均値がしきい値Th5以上となる顔構成部品は0個であるため、顔候補2は真の顔とは判定されない。
Further, the determination unit 39A calculates an average value of the positional likelihood of the face component candidate for each face component. FIG. 14 is a diagram illustrating an average value of the positional likelihood of face component candidates for each face component for two face candidates. Then, for the face candidate to be processed, it is determined whether or not the number of face components whose average positional likelihood is equal to or greater than the threshold Th5 is equal to or greater than the threshold Th6, and this determination is affirmed. In such a case, the face candidate to be processed is determined to be a true face and detected. For example, if 13% is used as the threshold Th5 and 5 is used as the threshold Th6 since nine face components are used in the present embodiment, the
次いで、第2の実施形態において行われる処理について説明する。図15は第2の実施形態において行われる処理を示すフローチャートである。デジタルカメラ1の動作モードが撮影モードに設定されることによりCPU40が処理を開始し、スルー画像の撮影を行う(ステップST21)。そして、しきい値設定部42がしきい値設定処理を行う(ステップST22)。続いて、顔検出部37がスルー画像に含まれるすべての顔候補を検出する(ステップST23)。次いで、顔構成部品検出部38が、i番目の顔候補を処理対象の顔候補として、処理対象の顔候補から顔構成部品毎の顔構成部品候補を検出する(ステップST24)。
Next, processing performed in the second embodiment will be described. FIG. 15 is a flowchart showing processing performed in the second embodiment. When the operation mode of the
そして、判定部39Aが、顔構成部品毎に顔構成部品候補の位置的な尤度を算出し(ステップST25)、位置的な尤度の平均値がしきい値Th5以上となる顔構成部品の数がしきい値Th6以上であるか否かを判定する(ステップST26)。ステップST26が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST27)。一方、ステップST26が否定されると、処理対象の顔候補を非顔と判定する(ステップST28)。 Then, the determination unit 39A calculates the positional likelihood of the facial component candidate for each facial component (step ST25), and determines the facial component of which the average positional likelihood is equal to or greater than the threshold Th5. It is determined whether or not the number is greater than or equal to threshold value Th6 (step ST26). If step ST26 is affirmed, the face candidate to be processed is determined as a true face and detected (step ST27). On the other hand, if step ST26 is negative, the candidate face to be processed is determined as a non-face (step ST28).
ステップST27,28に続いて、CPU40がすべての顔候補について判定部39Aが判定を終了したか否かを判定し(ステップST29)、ステップST29が否定されると、iに1を加算し(ステップST30)、ステップST24に戻る。ステップST29が肯定されると、真の顔を矩形領域で囲んだスルー画像をモニタ28に表示し(ステップST31)、ステップST21にリターンする。
Subsequent to steps ST27 and 28, the
このように、第2の実施形態においては、検出された顔構成部品候補の位置、とくに位置的な尤度に基づいて、各顔候補から真の顔を検出するようにしたものである。ここで、顔には、目、鼻および口等の顔構成部品が含まれており、顔候補が真の顔である場合には、顔構成部品候補は対応する顔構成部品の位置に存在することとなる。したがって、顔候補に含まれる顔構成部品候補の位置に基づいて顔候補が真の顔であるか否かを判定することにより、精度良く顔候補から真の顔を検出することができる。 As described above, in the second embodiment, a true face is detected from each face candidate based on the position of the detected face component candidate, particularly the positional likelihood. Here, the face includes face components such as eyes, nose and mouth, and when the face candidate is a true face, the face component candidate exists at the position of the corresponding face component. It will be. Therefore, the true face can be detected from the face candidate with high accuracy by determining whether or not the face candidate is a true face based on the position of the face component candidate included in the face candidate.
また、第1の実施形態と同様に、演算量が多い判定の処理を行う顔候補の数を少なくすることができるため、演算量を低減しつつも精度良く顔候補から真の顔を検出することができる。 Further, as in the first embodiment, since the number of face candidates to be subjected to determination processing with a large amount of calculation can be reduced, a true face is detected from the face candidates with high accuracy while reducing the amount of calculation. be able to.
なお、上記第2の実施形態においては、判定部39Aが顔構成部品毎の顔構成部品候補の位置的な尤度を算出し、これに基づいて顔候補が真の顔であるか否かを判定しているが、顔構成部品毎の顔構成部品候補の位置関係の尤度を算出し、位置関係の尤度に基づいて顔候補が真の顔であるか否かを判定してもよい。以下、これを第3の実施形態として説明する。 In the second embodiment, the determination unit 39A calculates the positional likelihood of the face component candidate for each face component, and based on this, determines whether the face candidate is a true face. Although it is determined, the likelihood of the positional relationship of the facial component candidate for each facial component may be calculated, and it may be determined whether the facial candidate is a true face based on the likelihood of the positional relationship. . Hereinafter, this will be described as a third embodiment.
第3の実施形態においては、判定部(第1の実施形態と異なるため39Bとする)は、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補について、顔構成部品候補毎に他の顔構成部品の位置に対する存在確率を位置関係の尤度として算出し、算出した位置関係の尤度に基づいて顔候補が真の顔であるか否かを判定する。
In the third embodiment, the determination unit (39B because it is different from the first embodiment) sets the face component candidate for each face component detected by the face
図16は右目の目頭の、両目の目尻、左目の目頭、左右の鼻の穴の脇、左右の口元および口の中央部分の他の8個の顔構成部品に対する存在確率の確率分布を示す図である。なお、図16において確率分布B11〜B18は、それぞれ右目の目頭の、左目の目尻、右目の目尻、左目の目頭、左の鼻の穴の脇、右の鼻の穴の脇、左の口元、右の口元および口の中央部分に対する存在確率の確率分布を示す。 FIG. 16 is a diagram showing probability distributions of existence probabilities for the other eight face components of the right eye, the eyes of both eyes, the eyes of the left eye, the sides of the left and right nostrils, the left and right mouths, and the central part of the mouth. It is. In FIG. 16, probability distributions B11 to B18 are respectively the right eye corner, the left eye corner, the right eye corner, the left eye corner, the side of the left nostril, the side of the right nostril, the left mouth, The probability distribution of the probability of existence for the right mouth and the central part of the mouth is shown.
ここで、位置関係の尤度を算出する対象を右目目頭とした場合、第3の実施形態においては、判定部39Bは、顔検出部37が検出した各顔候補を第2の実施形態と同様に一定のサイズに正規化し、正規化した顔候補内において顔構成部品検出部38が検出した右目目頭候補毎に、確率分布B11〜B18を参照して存在確率を仮の位置関係の尤度として算出する。例えば、右目の目頭の、左目の目尻に対する仮の位置関係の尤度15%、右目の目尻に対する仮の位置関係の尤度12%、左目の目頭に対する仮の位置関係の尤度13%、左の鼻の穴の脇に対する仮の位置関係の尤度10%、右の鼻の穴の脇に対する仮の位置関係の尤度19%、左の口元に対する仮の位置関係の尤度13%、右の口元に対する仮の位置関係の尤度17%および口の中央部分に対する仮の位置関係の尤度15%というように仮の位置関係の尤度を算出する。
Here, when the target for calculating the likelihood of the positional relationship is the right eye, in the third embodiment, the determination unit 39B determines each face candidate detected by the
そして判定部39Bは、算出した8個の仮の位置関係の尤度の平均値を算出し、さらにこの平均値のすべての顔構成部品候補についての平均値を、その顔構成部品候補の最終的な位置関係の尤度として算出する。 Then, the determination unit 39B calculates an average value of the likelihoods of the eight calculated temporary positional relationships, and further calculates an average value for all face component candidate candidates of this average value as a final value of the face component component candidate. It is calculated as the likelihood of a correct positional relationship.
なお、第3の実施形態においては、右目の目頭のみならず、左目の目尻、右目の目尻、左目の目頭、左の鼻の穴の脇、右の鼻の穴の脇、左の口元、右の口元および口の中央部分についても、それぞれ他の顔構成部品に対する存在確率の確率分布が求められており、判定部39Bは、9個すべての顔構成部品の顔構成部品候補について位置関係の尤度を算出する。そして、判定部39Bは顔構成部品毎に算出した9個の顔構成部品候補の位置関係の尤度がしきい値Th7以上となる顔構成部品の数がしきい値Th8以上であるか否かを判定し、この判定が肯定された場合に処理対象の顔候補を真の顔であると判定して検出する。 In the third embodiment, not only the right eye corner, the left eye corner, the right eye corner, the left eye corner, the side of the left nostril, the side of the right nostril, the left mouth, the right The probability distributions of the existence probabilities with respect to the other face components are also obtained for each of the mouth and the central portion of the mouth, and the determination unit 39B determines the likelihood of the positional relationship for the face component candidates of all nine face components. Calculate the degree. Then, the determination unit 39B determines whether or not the number of face component parts for which the likelihood of the positional relationship of the nine face component parts calculated for each face component part is equal to or greater than the threshold value Th7 is equal to or greater than the threshold value Th8. If this determination is affirmative, the processing target face candidate is determined to be a true face and detected.
次いで、第3の実施形態において行われる処理について説明する。図17は第3の実施形態において行われる処理を示すフローチャートである。デジタルカメラ1の動作モードが撮影モードに設定されることによりCPU40が処理を開始し、スルー画像の撮影を行う(ステップST41)。そして、しきい値設定部42がしきい値設定処理を行う(ステップST42)。続いて、顔検出部37がスルー画像に含まれるすべての顔候補を検出する(ステップST43)。次いで、顔構成部品検出部38が、i番目の顔候補を処理対象の顔候補として、処理対象の顔候補から顔構成部品毎の顔構成部品候補を検出する(ステップST44)。なお、iの初期値は1である。
Next, processing performed in the third embodiment will be described. FIG. 17 is a flowchart showing processing performed in the third embodiment. When the operation mode of the
そして、判定部39Bが、顔構成部品毎に顔構成部品候補の位置関係の尤度を算出し(ステップST45)、位置関係の尤度がしきい値Th7以上となる顔構成部品の数がしきい値Th8以上であるか否かを判定する(ステップST46)。ステップST46が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST47)。一方、ステップST46が否定されると、処理対象の顔候補を非顔と判定する(ステップST48)。 Then, the determination unit 39B calculates the likelihood of the positional relationship between the facial component candidates for each facial component (step ST45), and determines the number of facial components whose positional relationship likelihood is equal to or greater than the threshold Th7. It is determined whether or not the threshold value is Th8 or more (step ST46). If step ST46 is affirmed, the face candidate to be processed is determined as a true face and detected (step ST47). On the other hand, if step ST46 is negative, the face candidate to be processed is determined as a non-face (step ST48).
ステップST47,48に続いて、CPU40がすべての顔候補について判定部39Bが判定を終了したか否かを判定し(ステップST49)、ステップST49が否定されると、iに1を加算し(ステップST50)、ステップST44に戻る。ステップST49が肯定されると、真の顔を矩形領域で囲んだスルー画像をモニタ28に表示し(ステップST51)、ステップST41にリターンする。
Subsequent to steps ST47 and 48, the
このように、第3の実施形態においては、検出された顔構成部品の位置、とくに位置関係の尤度に基づいて、各顔候補から真の顔を検出するようにしたものである。ここで、顔には、目、鼻および口等の顔構成部品が含まれており、顔候補が真の顔である場合には、顔構成部品候補は対応する顔構成部品の位置に存在することとなり、さらに顔構成部品間の位置関係は略決まっている。したがって、顔候補に含まれる顔構成部品候補の位置関係に基づいて顔候補が真の顔であるか否かを判定することにより、顔候補から真の顔を精度良く検出することができる。 As described above, in the third embodiment, a true face is detected from each face candidate based on the detected position of the face component, particularly the likelihood of the positional relationship. Here, the face includes face components such as eyes, nose and mouth, and when the face candidate is a true face, the face component candidate exists at the position of the corresponding face component. In addition, the positional relationship between the face components is substantially determined. Therefore, by determining whether or not the face candidate is a true face based on the positional relationship of the face component candidate included in the face candidate, the true face can be detected from the face candidate with high accuracy.
また、第1の実施形態と同様に、演算量が多い判定の処理を行う顔候補の数を少なくすることができるため、演算量を低減しつつも精度良く顔候補から真の顔を検出することができる。 Further, as in the first embodiment, since the number of face candidates to be subjected to determination processing with a large amount of calculation can be reduced, a true face is detected from the face candidates with high accuracy while reducing the amount of calculation. be able to.
なお、上記第3の実施形態においては、9種類の顔構成部品のすべての位置関係の尤度を算出し、位置関係の尤度がしきい値Th7以上となる顔構成部品がしきい値Th8以上であるか否かに基づいて顔候補が真の顔か否かを判定しているが、9種類の顔構成部品のすべてを用いる必要はなく、少なくとも1つの顔構成部品についての位置関係の尤度に基づいて顔候補が真の顔か否かを判定するようにしてもよい。 In the third embodiment, the likelihoods of all the positional relationships of the nine types of face components are calculated, and the facial components whose positional relationship likelihood is equal to or greater than the threshold value Th7 are threshold values Th8. Whether or not the face candidate is a true face is determined based on whether or not it is above, but it is not necessary to use all nine types of face components, and the positional relationship of at least one face component You may make it determine whether a face candidate is a true face based on likelihood.
また、上記第2および第3の実施形態においては、検出した顔候補の顔構成部品候補が、対応する各顔構成部品の確率分布上に位置していれば、精度よく位置的な尤度および位置関係の尤度を算出することができるが、図18に示すように顔候補の各顔構成部品候補の位置(図中×で示す)が本来あるべき顔構成部品の位置の確率分布とずれていると、尤度を精度よく算出することができず、その結果、顔候補が真の顔であるか否かを精度よく判定することができない。このため、検出した顔構成部品候補が確率分布内に位置するように、顔候補を正規化することが好ましい。以下、これを第4の実施形態として説明する。 In the second and third embodiments, if the face component candidate of the detected face candidate is located on the probability distribution of each corresponding face component, the positional likelihood and Although the likelihood of the positional relationship can be calculated, as shown in FIG. 18, the position of each face component candidate of the face candidate (indicated by x in the figure) is different from the probability distribution of the position of the face component that should be originally located. The likelihood cannot be calculated with high accuracy, and as a result, it cannot be accurately determined whether or not the face candidate is a true face. For this reason, it is preferable to normalize face candidates so that the detected face component candidate is located in the probability distribution. Hereinafter, this will be described as a fourth embodiment.
第4の実施形態において、顔候補を正規化するためには、顔候補内の顔構成部品候補のうちのいずれかの顔構成部品候補を対応する顔構成部品の確率分布の中心(すなわち最も確率が高い位置)と一致させるように、顔候補の画像をアフィン変換する。アフィン変換は、平面上の任意の3点を拡大縮小、平行移動および回転することにより任意の3点に移動させる変換であり、具体的には下記の式(1)により表される。 In the fourth embodiment, in order to normalize a face candidate, one of the face component candidates in the face candidate is set to the center of the probability distribution of the corresponding face component (that is, the most probable probability). Affine transformation is performed on the face candidate image so that the image matches the position of the face. The affine transformation is a transformation in which any three points on the plane are moved to any three points by enlarging / reducing, translating and rotating, and is specifically represented by the following formula (1).
x′=a1・x+b1・y+d1
y′=a2・x+b2・y+d2 (1)
式(1)より、アフィン変換の係数a1,a2,b1,b2,d1,d2を算出するためには、顔候補内および顔構成部品の確率分布内においてそれぞれ対応する3点の座標が必要となる。ここで、顔候補および顔構成部品の確率分布において、図18に示すように左下隅を原点とするXY座標系を考えると、顔構成部品候補P1〜P9が確率分布B1〜B9の中心に位置するようにアフィン変換の係数を設定する必要がある。第4の実施形態においては、顔構成部品毎に顔構成部品検出部38が検出した少なくとも1つの顔構成部品候補のうち、マッチング度が最も高い顔構成部品候補を顔構成部品候補を代表する顔構成部品候補P1〜P9として選択し、選択した9個の顔構成部品候補P1〜P9のうちマッチング度が大きい上位3個の顔構成部品候補を、対応する顔構成部品の確率分布の中心と一致させるようにアフィン変換の係数a1,a2,b1,b2,d1,d2を算出すればよい。
x ′ = a1 · x + b1 · y + d1
y ′ = a2 · x + b2 · y + d2 (1)
In order to calculate the coefficients a1, a2, b1, b2, d1, d2 of the affine transformation from the equation (1), the coordinates of three points corresponding to each other in the probability distribution of the face candidate and the face component are required. Become. Here, in the probability distribution of the face candidates and the face component parts, considering an XY coordinate system with the lower left corner as the origin as shown in FIG. 18, the face component candidate candidates P1 to P9 are positioned at the centers of the probability distributions B1 to B9. It is necessary to set the coefficient of affine transformation so that it does. In the fourth embodiment, the face component candidate with the highest matching degree among the at least one face component part detected by the face
例えば、図18に示す顔構成部品候補P1〜P9のマッチング度がP1>P2>P3>P4>P5…である場合には、顔構成部品候補P1,P2,P3を、対応する顔構成部品の確率分布B1,B2,B3の中心とそれぞれ一致させるようにアフィン変換の係数a1,a2,b1,b2,d1,d2を算出する。 For example, when the matching degrees of the face component candidate candidates P1 to P9 shown in FIG. 18 are P1> P2> P3> P4> P5..., The face component candidate candidates P1, P2, P3 are assigned to the corresponding face component parts. Affine transformation coefficients a1, a2, b1, b2, d1, d2 are calculated so as to coincide with the centers of the probability distributions B1, B2, B3, respectively.
なお、アフィン変換の係数を算出するためには3点の座標を用いるのみならず、4点以上の座標を用いてもよい。例えば、9個の顔構成部品候補P1〜P9のすべてを対応する顔構成部品の確率分布B1〜B9の中心と一致させるようにアフィン変換の係数を算出してもよい。この場合、変換後の9個の顔構成部品候補P1〜P9の座標と、確率分布B1〜B9の中心位置の座標との誤差が最小となるように、最小二乗法を用いてアフィン変換の係数を算出すればよい。 In order to calculate the coefficient of affine transformation, not only the coordinates of three points but also the coordinates of four or more points may be used. For example, the affine transformation coefficient may be calculated so that all nine face component candidate candidates P1 to P9 coincide with the centers of the corresponding face component probability distributions B1 to B9. In this case, the coefficient of the affine transformation using the least square method so that the error between the coordinates of the nine face component candidates P1 to P9 after the transformation and the coordinates of the center positions of the probability distributions B1 to B9 is minimized. May be calculated.
次いで、第4の実施形態において行われる処理について説明する。図19は第4の実施形態において行われる処理を示すフローチャートである。なお、ここでは、第4の実施形態を第2の実施形態に適用した場合の処理について説明するが、第3の実施形態に対しても同様に適用できるものである。 Next, processing performed in the fourth embodiment will be described. FIG. 19 is a flowchart showing processing performed in the fourth embodiment. In addition, although the process at the time of applying 4th Embodiment to 2nd Embodiment is demonstrated here, it can apply similarly also to 3rd Embodiment.
デジタルカメラ1の動作モードが撮影モードに設定されることによりCPU40が処理を開始し、スルー画像の撮影を行う(ステップST61)。そして、しきい値設定部42がしきい値設定処理を行う(ステップST62)。続いて、顔検出部37がスルー画像に含まれるすべての顔候補を検出する(ステップST63)。次いで、顔構成部品検出部38が、i番目の顔候補を処理対象の顔候補として、処理対象の顔候補から顔構成部品毎の顔構成部品候補を検出する(ステップST64)。なお、iの初期値は1である。
When the operation mode of the
そして、判定部39Aが処理対象の顔候補を正規化し(ステップST65)、正規化の後、顔構成部品毎に顔構成部品候補の位置的な尤度を算出し(ステップST66)、位置的な尤度の平均値がしきい値Th5以上となる顔構成部品の数がしきい値Th6以上であるか否かを判定する(ステップST67)。ステップST67が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST68)。一方、ステップST68が否定されると、処理対象の顔候補を非顔と判定する(ステップST69)。 Then, the determination unit 39A normalizes the face candidate to be processed (step ST65), and after normalization, calculates the positional likelihood of the face component candidate for each face component (step ST66). It is determined whether or not the number of face components whose average likelihood value is equal to or greater than threshold value Th5 is equal to or greater than threshold value Th6 (step ST67). If step ST67 is positive, the face candidate to be processed is determined as a true face and detected (step ST68). On the other hand, if step ST68 is negative, the face candidate to be processed is determined as a non-face (step ST69).
ステップST68,69に続いて、CPU40がすべての顔候補について判定部39Aが判定を終了したか否かを判定し(ステップST70)、ステップST70が否定されると、iに1を加算し(ステップST71)、ステップST64に戻る。ステップST70が肯定されると、真の顔を矩形領域で囲んだスルー画像をモニタ28に表示し(ステップST72)、ステップST61にリターンする。
Subsequent to steps ST68 and 69, the
このように、第4の実施形態においては、顔候補の領域内において各顔構成部品候補の位置が対応する顔構成部品の位置に位置するように顔候補をアフィン変換して正規化するようにしたため、より精度良く顔候補から真の顔を検出することができる。 Thus, in the fourth embodiment, face candidates are affine transformed and normalized so that the position of each face component candidate is located at the position of the corresponding face component in the face candidate region. Therefore, the true face can be detected from the face candidates with higher accuracy.
また、第1の実施形態と同様に、演算量が多い判定の処理を行う顔候補の数を少なくすることができるため、演算量を低減しつつも精度良く顔候補から真の顔を検出することができる。 Further, as in the first embodiment, since the number of face candidates to be subjected to determination processing with a large amount of calculation can be reduced, a true face is detected from the face candidates with high accuracy while reducing the amount of calculation. be able to.
なお、上記第4の実施形態においては、顔候補毎にアフィン変換の係数を算出してアフィン変換を行っているが、すべての顔候補について、各顔構成部品について選択した顔構成部品候補の平均位置を算出し、算出した平均位置が確率分布の中心と一致するようにアフィン変換の係数を算出してもよい。この場合においても、9個の顔構成部品から選択した顔構成部品候補のうちの3つの顔構成部品候補からアフィン変換の係数を算出してもよく、4以上の顔構成部品候補からアフィン変換の係数を算出してもよい。 In the fourth embodiment, the affine transformation coefficient is calculated for each face candidate and the affine transformation is performed. For all face candidates, the average of the face component candidate selected for each face component is selected. The position may be calculated, and the affine transformation coefficient may be calculated so that the calculated average position matches the center of the probability distribution. Even in this case, the coefficient of affine transformation may be calculated from three face component candidates among the face component candidates selected from the nine face component parts, and the affine transformation coefficient may be calculated from four or more face component candidates. A coefficient may be calculated.
また、上記第4の実施形態においては、正規化前に顔構成部品毎の顔構成部品候補について仮の位置的な尤度または仮の位置関係の尤度を算出し、仮の位置的な尤度または仮の位置関係の尤度が最も高い上位所定数の顔構成部品候補が、対応する顔構成部品の位置(すなわち存在確率がピークとなる位置)と一致するように、顔候補に対してアフィン変換を施すことにより正規化を行うようにしてもよい。 Further, in the fourth embodiment, the temporary positional likelihood or the temporary positional relationship likelihood is calculated for the face component candidate for each face component before normalization, and the temporary positional likelihood is calculated. Face candidates so that the top predetermined number of face component candidates with the highest likelihood of degree or tentative positional relationship match the position of the corresponding face component (that is, the position at which the existence probability peaks). Normalization may be performed by performing affine transformation.
次いで、本発明の第5の実施形態について説明する。なお、第5の実施形態においては、判定部39が行う処理が第1の実施形態と異なるのみであるため、構成についての詳細な説明はここでは省略する。 Next, a fifth embodiment of the present invention will be described. In the fifth embodiment, the process performed by the determination unit 39 is only different from that in the first embodiment, and a detailed description of the configuration is omitted here.
第5の実施形態においては、判定部(第1の実施形態と異なるため39Cとする)が、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補の数に基づいて、顔候補が真の顔、非顔および曖昧顔のいずれかであるかを判定することにより真の顔を検出する第1の判定処理を行い、第1の判定処理により曖昧顔と判定された顔候補について、第2、第3または第4の実施形態と同様に、顔構成部品候補の位置に基づいて顔候補が真の顔であるか否かを判定することにより真の顔を検出する第2の判定処理を行うようにした点が第1の実施形態と異なる。
In the fifth embodiment, the determination unit (39C because it is different from the first embodiment) determines the face based on the number of face component candidates for each face component detected by the face
第5の実施形態における判定部39Cは、第1の判定処理においては、第1の実施形態における判定部39と同様に9個の顔構成部品K1〜K9のそれぞれについての顔構成部品候補の総数N1〜N9を算出し、さらに総数N1〜N9の加算値であるNsumを算出する。そして加算値Nsumがしきい値Th9以上である場合に処理対象の顔候補を真の顔であると判定し、その顔候補を真の顔として検出する。また、加算値Nsumがしきい値Th10以上しきい値Th9未満である場合に処理対象の顔候補を曖昧顔と判定し、加算値Nsumがしきい値Th10未満である場合に処理対象の顔候補を非顔であると判定する。また、曖昧顔と判定された顔候補に対する上記第2、第3または第4の実施形態のいずれかの処理を第2の判定処理として行う。 In the first determination process, the determination unit 39C according to the fifth embodiment uses the total number of face component parts candidates for each of the nine face component parts K1 to K9 in the same manner as the determination unit 39 according to the first embodiment. N1 to N9 are calculated, and Nsum which is an added value of the total number N1 to N9 is calculated. When the addition value Nsum is equal to or greater than the threshold Th9, the face candidate to be processed is determined to be a true face, and the face candidate is detected as a true face. Further, when the addition value Nsum is greater than or equal to the threshold Th10 and less than the threshold Th9, the face candidate to be processed is determined to be an ambiguous face, and when the addition value Nsum is less than the threshold Th10, the face candidate to be processed. Is determined to be non-face. In addition, the process in the second, third, or fourth embodiment for the face candidate determined as an ambiguous face is performed as the second determination process.
次いで、第5の実施形態において行われる処理について説明する。図20は第5の実施形態において行われる処理を示すフローチャートである。デジタルカメラ1の動作モードが撮影モードに設定されることによりCPU40が処理を開始し、スルー画像の撮影を行う(ステップST81)。そして、しきい値設定部42がしきい値設定処理を行う(ステップST82)。続いて、顔検出部37がスルー画像に含まれるすべての顔候補を検出する(ステップST83)。次いで、顔構成部品検出部38が、i番目の顔候補を処理対象の顔候補として、処理対象の顔候補から顔構成部品毎の顔構成部品候補を検出する(ステップST84)。なお、iの初期値は1である。
Next, processing performed in the fifth embodiment will be described. FIG. 20 is a flowchart showing processing performed in the fifth embodiment. When the operation mode of the
そして、判定部39Cが第1の判定処理を行う(ステップST85)。まず、顔構成部品検出部38が検出した顔構成部品毎の顔構成部品候補の総数の加算値Nsumがしきい値Th9以上であるか否かを判定し(ステップST86)、ステップST86が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST87)。一方、ステップST86が否定されると、加算値Nsumがしきい値Th10以上しきい値Th9未満であるか否かを判定し(ステップST88)、ステップST88が否定されると、処理対象の顔候補を非顔と判定する(ステップST89)。ステップST88が肯定されると、処理対象の顔候補が曖昧顔であるとして、第2の判定処理を行う(ステップST90)。
Then, the determination unit 39C performs a first determination process (step ST85). First, it is determined whether or not the addition value Nsum of the total number of face component candidates for each face component detected by the face
まず、第2の実施形態と同様に、判定部39Cが、顔構成部品毎に顔構成部品候補の位置的な尤度を算出し(ステップST91)、顔構成部品毎に尤度の平均値がしきい値Th5以上となる顔構成部品の数がしきい値Th6以上であるか否かを判定する(ステップST92)。なお、ステップST91の前に第4の実施形態と同様に処理対象の顔候補を正規化してもよい。また、ステップST91,92の処理を第3の実施形態のステップST45,46の処理と同様に位置関係の尤度を用いて行ってもよい。ステップST92が肯定されると、処理対象の顔候補を真の顔と判定して検出する(ステップST93)。一方、ステップST92が否定されると、処理対象の顔候補を非顔と判定する(ステップST94)。 First, as in the second embodiment, the determination unit 39C calculates the positional likelihood of the face component candidate for each face component (step ST91), and the average likelihood value for each face component is calculated. It is determined whether or not the number of face components that are equal to or greater than threshold Th5 is equal to or greater than threshold Th6 (step ST92). Note that the candidate face to be processed may be normalized before step ST91 as in the fourth embodiment. Moreover, you may perform the process of step ST91,92 using the likelihood of positional relationship similarly to the process of step ST45,46 of 3rd Embodiment. If step ST92 is affirmed, the face candidate to be processed is determined as a true face and detected (step ST93). On the other hand, if step ST92 is negative, the face candidate to be processed is determined as a non-face (step ST94).
ステップST87,89,93,94に続いて、CPU40がすべての顔候補について判定部39Cが判定を終了したか否かを判定し(ステップST95)、ステップST95が否定されると、iに1を加算し(ステップST96)、ステップST84に戻る。ステップST95が肯定されると、真の顔を矩形領域で囲んだスルー画像をモニタ28に表示し(ステップST97)、ステップST81にリターンする。
Subsequent to steps ST87, 89, 93, and 94, the
ここで、顔構成部品候補の数に基づいて顔候補が真の顔であるか否かを判定する場合と、顔構成部品候補の位置に基づいて顔候補が真の顔であるか否かを判定する場合とでは、前者の方が演算量が少ない。また、暗いシーンや逆光の撮影時においては顔候補が暗くなるため、その顔候補が真の顔であっても検出される顔構成部品候補の数が少なくなり、その結果、第1の実施形態の処理を行うのみでは、真の顔を非顔と判定してしまうおそれがある。このため、第5の実施形態のように、顔構成部品候補の数に基づいて曖昧顔と判定された顔候補についてのみ、顔構成部品候補の位置に基づいて顔候補が真の顔であるか否かを判定することにより、さらに演算量を低減でき、かつ精度良く顔候補から真の顔を検出することができる。 Here, when determining whether or not the face candidate is a true face based on the number of face component candidate, and whether or not the face candidate is a true face based on the position of the face component candidate. In the case of determination, the former has less calculation amount. In addition, since face candidates become dark at the time of shooting a dark scene or backlight, the number of detected face component candidates is reduced even if the face candidate is a true face. As a result, the first embodiment If only the process is performed, the true face may be determined as a non-face. Therefore, as in the fifth embodiment, for only face candidates determined to be ambiguous based on the number of face component candidates, whether the face candidate is a true face based on the position of the face component candidate By determining whether or not, the amount of calculation can be further reduced, and the true face can be detected from the face candidates with high accuracy.
なお、上記第5の実施形態においては、第1の判定処理として、上記9個の顔構成部品K1〜K9のそれぞれについての顔構成部品候補の総数N1〜N9を9次元空間にプロットし、9次元空間においてしきい値を定める超平面または超曲面を設定し、プロットした総数N1〜N9がしきい値を定める超平面または超曲面のいずれの側にあるかに応じて、顔候補が真の顔、曖昧顔および非顔のいずれであるかを判定するようにしてもよい。 In the fifth embodiment, as the first determination process, the total number N1 to N9 of face component parts candidates for each of the nine face component parts K1 to K9 is plotted in a 9-dimensional space. A hyperplane or hypersurface that defines a threshold value is set in a dimensional space, and the face candidate is true depending on which side of the hyperplane or hypersurface that defines the threshold value the total number N1 to N9 is plotted. You may make it determine whether it is a face, an ambiguous face, and a non-face.
また、上記第5の実施形態においては、第1の判定処理および第2の判定処理を同一の判定部39Cにおいて行っているが、第1および第2の判定処理をそれぞれ行う2つの判定部を設けるようにしてもよい。 Moreover, in the said 5th Embodiment, although the 1st determination process and the 2nd determination process are performed in the same determination part 39C, two determination parts which respectively perform a 1st and 2nd determination process are provided. You may make it provide.
以上、本発明の実施形態に係るデジタルカメラについて説明したが、コンピュータを、上記の顔検出部37、顔構成部品検出部38、判定部39,39A〜39Cおよびしきい値設定部42に対応する手段として機能させ、図8,9,15,17,19,20に示すような処理を行わせるプログラムも本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。
The digital camera according to the embodiment of the present invention has been described above. The computer corresponds to the
1 デジタルカメラ
2 操作系
3 操作系制御部
6 撮像系
28 モニタ
35 記録メディア
37 顔検出部
38 顔構成部品検出部
39 判定部
40 CPU
42 しきい値設定部
DESCRIPTION OF
42 Threshold setting section
Claims (8)
所定サイズの検出枠を前記画像上において移動させ、移動した位置毎に該検出枠内の前記画像から特徴量を算出し、該特徴量とあらかじめ定められた顔特徴量とのマッチング度を算出し、該マッチング度が所定のしきい値以上となったときに前記検出枠の位置の画像を顔候補として検出する顔検出手段と、
前記顔候補に含まれる少なくとも1つの顔構成部品の候補を該顔構成部品毎に検出する顔構成部品検出手段と、
前記顔構成部品毎に検出された前記顔構成部品候補の数および位置の少なくとも一方に基づいて、前記顔候補が真の顔であるか否かを判定する判定手段と、
所定の撮影の際に取得された所定撮影時画像から前記顔候補を検出するに際には、前記所定のしきい値を第1の値に設定し、該所定の撮影以降の撮影により取得された画像から前記顔候補を検出する際には、前記所定撮影時画像から検出された前記顔候補であって前記真の顔であると判定された顔候補のうち、前記マッチング度が最も低い顔候補を検出可能な第2の値を前記所定のしきい値に設定するしきい値設定手段とを備えたことを特徴とする撮影装置。 Photographing means for continuously acquiring images by continuous photographing;
A detection frame of a predetermined size is moved on the image, a feature amount is calculated from the image in the detection frame for each moved position, and a matching degree between the feature amount and a predetermined face feature amount is calculated. , A face detection unit that detects an image at the position of the detection frame as a face candidate when the matching degree is equal to or greater than a predetermined threshold;
Face component detection means for detecting at least one face component candidate included in the face candidate for each face component;
Determining means for determining whether or not the face candidate is a true face based on at least one of the number and position of the face component candidates detected for each face component;
When the face candidate is detected from a predetermined shooting image acquired at the time of predetermined shooting, the predetermined threshold is set to a first value and acquired by shooting after the predetermined shooting. When detecting the face candidate from the captured image, the face candidate having the lowest matching degree among the face candidates detected from the predetermined photographing image and determined to be the true face An imaging apparatus, comprising: threshold value setting means for setting a second value capable of detecting a candidate to the predetermined threshold value.
所定サイズの検出枠を前記画像上において移動させ、移動した位置毎に該検出枠内の前記画像から特徴量を算出し、該特徴量とあらかじめ定められた顔特徴量とのマッチング度を算出し、該マッチング度が所定のしきい値以上となったときに前記検出枠の位置の画像を顔候補として検出し、
前記顔候補に含まれる少なくとも1つの顔構成部品の候補を該顔構成部品毎に検出し、
前記顔構成部品毎に検出された前記顔構成部品候補の数および位置の少なくとも一方に基づいて、前記顔候補が真の顔であるか否かを判定するに際し、
所定の撮影の際に取得された所定撮影時画像から前記顔候補を検出するに際には、前記所定のしきい値を第1の値に設定し、該所定の撮影以降の撮影により取得された画像から前記顔候補を検出する際には、前記所定撮影時画像から検出された前記顔候補であって前記真の顔であると判定された顔候補のうち、前記マッチング度が最も低い顔候補を検出可能な第2の値を前記所定のしきい値に設定することを特徴とする撮影方法。 Acquire images continuously by continuous shooting,
A detection frame of a predetermined size is moved on the image, a feature amount is calculated from the image in the detection frame for each moved position, and a matching degree between the feature amount and a predetermined face feature amount is calculated. , Detecting the image at the position of the detection frame as a face candidate when the matching degree is equal to or greater than a predetermined threshold value,
Detecting at least one face component candidate included in the face candidate for each face component;
In determining whether or not the face candidate is a true face based on at least one of the number and position of the face component candidates detected for each face component,
When the face candidate is detected from a predetermined shooting image acquired at the time of predetermined shooting, the predetermined threshold is set to a first value and acquired by shooting after the predetermined shooting. When detecting the face candidate from the captured image, the face candidate having the lowest matching degree among the face candidates detected from the predetermined photographing image and determined to be the true face A shooting method, wherein a second value capable of detecting a candidate is set to the predetermined threshold value.
所定サイズの検出枠を前記画像上において移動させ、移動した位置毎に該検出枠内の前記画像から特徴量を算出し、該特徴量とあらかじめ定められた顔特徴量とのマッチング度を算出し、該マッチング度が所定のしきい値以上となったときに前記検出枠の位置の画像を顔候補として検出する手順と、
前記顔候補に含まれる少なくとも1つの顔構成部品の候補を該顔構成部品毎に検出する手順と、
前記顔構成部品毎に検出された前記顔構成部品候補の数および位置の少なくとも一方に基づいて、前記顔候補が真の顔であるか否かを判定する手順と、
所定の撮影の際に取得された所定撮影時画像から前記顔候補を検出するに際には、前記所定のしきい値を第1の値に設定し、該所定の撮影以降の撮影により取得された画像から前記顔候補を検出する際には、前記所定撮影時画像から検出された前記顔候補であって前記真の顔であると判定された顔候補のうち、前記マッチング度が最も低い顔候補を検出可能な第2の値を前記所定のしきい値に設定する手順とを有することを特徴とする撮影方法をコンピュータに実行させるためのプログラム。 The procedure to acquire images continuously by continuous shooting,
A detection frame of a predetermined size is moved on the image, a feature amount is calculated from the image in the detection frame for each moved position, and a matching degree between the feature amount and a predetermined face feature amount is calculated. , A procedure for detecting an image at the position of the detection frame as a face candidate when the matching degree is equal to or greater than a predetermined threshold;
Detecting at least one face component candidate included in the face candidate for each face component;
Determining whether the face candidate is a true face based on at least one of the number and position of the face component candidates detected for each face component; and
When the face candidate is detected from a predetermined shooting image acquired at the time of predetermined shooting, the predetermined threshold is set to a first value and acquired by shooting after the predetermined shooting. When detecting the face candidate from the captured image, the face candidate having the lowest matching degree among the face candidates detected from the predetermined photographing image and determined to be the true face A program for causing a computer to execute an imaging method, comprising: setting a second value capable of detecting a candidate to the predetermined threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007030076A JP2008199146A (en) | 2007-02-09 | 2007-02-09 | Photographing apparatus, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007030076A JP2008199146A (en) | 2007-02-09 | 2007-02-09 | Photographing apparatus, method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008199146A true JP2008199146A (en) | 2008-08-28 |
Family
ID=39757726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007030076A Withdrawn JP2008199146A (en) | 2007-02-09 | 2007-02-09 | Photographing apparatus, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008199146A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102008053395A1 (en) * | 2008-10-21 | 2010-04-29 | Cognitec Systems Gmbh | Method and device for photographic image capture of the visual field of a person |
WO2023189195A1 (en) * | 2022-03-30 | 2023-10-05 | キヤノン株式会社 | Image processing device, image processing method, and program |
-
2007
- 2007-02-09 JP JP2007030076A patent/JP2008199146A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102008053395A1 (en) * | 2008-10-21 | 2010-04-29 | Cognitec Systems Gmbh | Method and device for photographic image capture of the visual field of a person |
WO2023189195A1 (en) * | 2022-03-30 | 2023-10-05 | キヤノン株式会社 | Image processing device, image processing method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4884251B2 (en) | Imaging apparatus, method, and program | |
US10733472B2 (en) | Image capture device with contemporaneous image correction mechanism | |
US8593542B2 (en) | Foreground/background separation using reference images | |
US8682097B2 (en) | Digital image enhancement with reference images | |
US8330831B2 (en) | Method of gathering visual meta data using a reference image | |
JP4819001B2 (en) | Imaging apparatus and method, program, image processing apparatus and method, and program | |
US8861806B2 (en) | Real-time face tracking with reference images | |
US8208690B2 (en) | Image-processing device and image-processing method, image-pickup device, and computer program | |
US8879802B2 (en) | Image processing apparatus and image processing method | |
US20110116720A1 (en) | Method and apparatus for image processing | |
KR20100124738A (en) | Automatic redeye detection | |
JP2011166442A (en) | Imaging device | |
JP5247338B2 (en) | Image processing apparatus and image processing method | |
JP2008199146A (en) | Photographing apparatus, method and program | |
JP2008197763A (en) | Photographing device, method, and program | |
JP5016999B2 (en) | Imaging apparatus, imaging method, and program | |
Rahman et al. | Real-time face-based auto-focus for digital still and cell-phone cameras | |
JP4799397B2 (en) | Dictionary data creation device, predetermined area detection device, and photographing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20100511 |