JP5267695B2 - Imaging apparatus, face recognition method and program thereof - Google Patents

Imaging apparatus, face recognition method and program thereof Download PDF

Info

Publication number
JP5267695B2
JP5267695B2 JP2012045142A JP2012045142A JP5267695B2 JP 5267695 B2 JP5267695 B2 JP 5267695B2 JP 2012045142 A JP2012045142 A JP 2012045142A JP 2012045142 A JP2012045142 A JP 2012045142A JP 5267695 B2 JP5267695 B2 JP 5267695B2
Authority
JP
Japan
Prior art keywords
face
face recognition
image data
dimensional
subject
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
Application number
JP2012045142A
Other languages
Japanese (ja)
Other versions
JP2012157016A (en
Inventor
一記 喜多
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2012045142A priority Critical patent/JP5267695B2/en
Publication of JP2012157016A publication Critical patent/JP2012157016A/en
Application granted granted Critical
Publication of JP5267695B2 publication Critical patent/JP5267695B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To realize an imaging device which can improve face recognition accuracy, and to realize its program. <P>SOLUTION: An imaging device determines whether or not a human face detection mode is set (S31), and if it is determined that the human face detection mode is set, the imaging device performs processing for detecting a human face by two-dimensional face detection processing (S32). If it is determined that there is no human face by the two-dimensional face detection processing, the imaging device performs the processing for detecting the human face by three-dimensional face detection processing (S35 and S36). On the other hand, if an animal face detection mode is set, the imaging device performs processing for detecting an animal-type face in the configured detection mode by the three-dimensional face detection processing (S36). <P>COPYRIGHT: (C)2012,JPO&amp;INPIT

Description

本発明は、撮像装置、顔認識方法及びそのプログラムに係り、詳しくは、顔を認識する機能有した撮像装置、顔認識方法及びそのプログラムに関する。 The present invention relates to an imaging device , a face recognition method, and a program thereof, and more particularly, to an imaging device having a function of recognizing a face, a face recognition method, and a program thereof.

近年、電子カメラ等の撮像装置においては、被写体の顔を認識する技術が登場したことにより、該認識された顔に対してピントを合わせたり、顔が適正露出となるように露出条件を設定する技術がある(特許文献1)。   In recent years, in imaging devices such as electronic cameras, a technique for recognizing the face of a subject has appeared, so that the recognized face is focused and exposure conditions are set so that the face is properly exposed. There is technology (Patent Document 1).

公開特許公報 特開2007−081991JP Patent Publication No. 2007-081991

しかしながら、従来の顔認識は、人間の顔、それも正面の顔などある特定の向きから撮像された場合のみを対象としており、横顔やサングラスの装着時などは認識することができなかった。また、人間以外の顔、例えば、猫や犬などの顔は認識することができなかった。   However, the conventional face recognition is intended only when the human face is taken from a specific direction such as a front face, and cannot be recognized when wearing a side face or sunglasses. Further, faces other than humans, such as cats and dogs, could not be recognized.

そこで本発明は、かかる従来の問題点に鑑みてなされたものであり、顔認識の精度を向上させることができる撮像装置、顔認識方法及びそのプログラムを提供することを目的とする。 Therefore, the present invention has been made in view of such conventional problems, and an object thereof is to provide an imaging apparatus , a face recognition method, and a program thereof that can improve the accuracy of face recognition .

上記目的達成のため、請求項1記載の発明による撮像装置は、被写体を撮像する撮像手段と、被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数顔認識モード備え、複数顔認識モードの中から何れか顔認識モードを設定する顔認識モード設定手段と、前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定され顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識手段と、を備え、前記顔認識モード設定手段は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、前記顔認識手段は、前記撮像手段により撮像される画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とする。 For the purposes achieved, the imaging apparatus according to a first aspect of the present invention, comprises imaging means for imaging an object, a plurality of face recognition mode, the contents of each of the different face recognition processing to be executed when recognizing the face of a subject a face recognition mode setting means for setting one of the face recognition mode from a said plurality of facial recognition mode, the image data captured by the imaging unit, set by the facial recognition mode setting means face Face recognition means for recognizing a face in the captured image data by executing face recognition processing according to the recognition mode, and the face recognition mode setting means is a settable face recognition mode. A plurality of face recognition modes corresponding to a combination of a difference in the type of subject to be recognized and a difference in conditions other than the type of subject, and the face recognition unit captures an image by the imaging unit And selects the face recognition process performed to identify the differences between automatically the non kinds of kinds of differences between the object of the subject condition based on image data.

また、例えば、請求項2に記載されているように、前記被写体の種類以外の条件の違いは、顔認識処理の条件の違いであり、前記顔認識手段は、前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定された顔認識モードに対応する条件で顔認識処理を実行することにより、該撮像された画像データ内にある顔の中で、該顔認識モードに対応する種類の被写体の顔を認識するようにしてもよい。 Further, for example, as described in claim 2, the difference in conditions other than the type of the subject is a difference in conditions of face recognition processing, and the face recognition unit is an image captured by the imaging unit. to the data, by executing the face recognition mode setting means by the setting face recognition mode to the face recognition processing in the corresponding conditions, in the face in the image pickup has been the image data, said pigment recognition mode It is also possible to recognize the face of the type of subject corresponding to.

また、例えば、請求項3に記載されているように、前記顔認識処理の条件は、2次元的に顔を認識する2次元顔認識処理と、3次元的に顔を認識する3次元顔認識処理を含むようにしてもよい。 Further, for example, as described in claim 3, the condition for the face recognition processing includes two-dimensional face recognition processing for two-dimensional face recognition and three-dimensional face recognition for three-dimensional face recognition. Processing may be included.

また、例えば、請求項4に記載されているように、前記顔認識モード設定手段は、ユーザによって選択され顔認識モードを設定するようにしてもよい。 Further, for example, as described in claim 4, wherein the face recognition mode setting means may set the face recognition mode selected by the user.

また、例えば、請求項5に記載されているように、前記顔認識モード設定手段は、顔認識モードを自動的に選択して設定するようにしてもよい。 For example, as described in claim 5, the face recognition mode setting means may automatically select and set the face recognition mode .

また、例えば、請求項6に記載されているように、前記被写体の種類の違いは、人の顔と人以外の顔であり、前記顔認識手段は、前記顔認識モード設定手段により人の顔を対象とした第1の顔認識モードが設定された場合は、人の顔を認識する顔認識処理実行することにより、前記撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により人以外の顔を対象とした第2の顔認識モードが設定された場合は、人以外の種類の顔を認識するようにしてもよい。 Further, for example, as described in claim 6, the difference in the type of the subject is a human face and a face other than a person, and the face recognition means uses the face recognition mode setting means to When the first face recognition mode for the target is set, a face recognition process for recognizing a person's face is executed to recognize a person's face in the captured image data, and the face recognition When the second face recognition mode for a face other than a person is set by the mode setting means, a face other than a person may be recognized .

また、例えば、請求項7に記載されているように、前記顔認識処理の条件は、2次元的に顔を認識する条件と、3次元的に顔を認識する条件とを含み、前記顔認識手段は、前記顔認識モード設定手段により2次元的に顔を認識する条件に対応した第3の顔認識モードが設定された場合は、2次元的に顔を認識する2次元顔認識処理を実行することにより、前記撮像された画像データ内にある顔を認識し、前記顔認識モード設定手段により3次元的に顔を認識する条件に対応した第4の顔認識モードが設定された場合は、3次元的に顔を認識する3次元顔認識処理を実行することにより、前記撮像された画像データ内にある顔を認識するようにしてもよい。 Further, for example, as described in claim 7, the face recognition processing conditions include a condition for recognizing a face in two dimensions and a condition for recognizing a face in three dimensions, The means executes a two-dimensional face recognition process for two-dimensionally recognizing the face when the third face recognition mode corresponding to the condition for recognizing the face two-dimensionally is set by the face recognition mode setting means. When a fourth face recognition mode corresponding to a condition for recognizing a face in three dimensions is set by the face recognition mode setting means by recognizing a face in the captured image data, You may make it recognize the face in the said imaged image data by performing the three-dimensional face recognition process which recognizes a face three-dimensionally .

また、例えば、請求項8に記載されているように、前記複数の顔認識モードは、顔認識処理を切り換えて実行する第5の顔認識モードを含み、前記顔認識手段は、前記顔認識モード設定手段により前記第5の顔認識モードが設定された場合は、人の顔を認識する顔認識処理を実行することにより、前記撮像された画像データ内にある人の顔を認識し、この顔認識処理により人の顔が認識されなかった場合に、人以外の種類の顔を認識する顔認識処理に切り換えて実行することにより、前記撮像された画像データ内にある人以外の種類の顔を認識するようにしてもよい。 Further, for example, as described in claim 8, the plurality of face recognition modes includes a fifth face recognition mode for switching and executing face recognition processing, and the face recognition means includes the face recognition mode. When the fifth face recognition mode is set by the setting unit, a face recognition process for recognizing a person's face is executed to recognize a person's face in the captured image data. When a face of a person is not recognized by the recognition process, a face other than a person in the captured image data is changed to a face recognition process for recognizing a face other than a person. You may make it recognize .

また、例えば、請求項9に記載されているように、前記複数の顔認識モードは、顔認識処理を切り換えて実行する第6の顔認識モードを含み、前記顔認識手段は、前記顔認識モード設定手段により前記第6の顔認識モードが設定された場合は、2次元顔認識処理を実行することにより、前記撮像された画像データ内にある人の顔を認識し、この顔認識処理により人の顔が認識されなかった場合に、3次元顔認識処理に切り換えて実行することにより、前記撮像された画像データ内にある人以外の種類の顔を認識するようにしてもよい。 Further, for example, as described in claim 9, the plurality of face recognition modes includes a sixth face recognition mode for switching and executing face recognition processing, and the face recognition means includes the face recognition mode. When the sixth face recognition mode is set by the setting means, a two-dimensional face recognition process is executed to recognize a person's face in the captured image data. If the face is not recognized, a face other than a person in the captured image data may be recognized by switching to and executing the three-dimensional face recognition process .

また、例えば、請求項10に記載されているように、前記顔認識手段は、前記顔認識モード設定手段により前記第1の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに対して、2次元顔認識処理を実行して、該撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により前記第2の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある前記顔認識モード設定手段により設定された顔認識モードの種類の顔を認識するようにしてもよい。 Further, for example, as described in claim 10, when the first face recognition mode is set by the face recognition mode setting unit, the face recognition unit is an image captured by the imaging unit. for the data, by performing a two-dimensional face recognition processing to recognize a human face in the image pickup has been the image data, if the second face recognition mode is set by the face recognition mode setting means Performs a three-dimensional face recognition process based on the image data picked up by the image pickup means, and sets the type of the face recognition mode set by the face recognition mode setting means in the picked-up image data. You may make it recognize a face.

また、例えば、請求項11に記載されているように、前記第2の顔認識モードは、更に、人以外の複数種類の被写体の各々を認識対象とする複数の顔認識モードに分割され、前記顔認識手段は、前記顔認識モード設定手段により前記第1の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに対して、2次元顔認識処理を実行して、該撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により前記第2の顔認識モードが設定された場合は、該設定された種類の顔検出モードに応じて、実行させる顔認識処理を、2次元顔認識処理と3次元顔認識処理とに切り替えることにより、前記撮像手段により撮像された画像データ内にある前記顔認識モード設定手段により設定された顔認識モードの種類の顔を認識するようにしてもよい。 Further, for example, as described in claim 11, the second face recognition mode is further divided into a plurality of face recognition modes in which each of a plurality of types of subjects other than a person is a recognition target, When the first face recognition mode is set by the face recognition mode setting means, the face recognition means performs a two-dimensional face recognition process on the image data picked up by the image pickup means, When a face of a person in the captured image data is recognized and the second face recognition mode is set by the face recognition mode setting means, execution is performed according to the set type of face detection mode. By switching the face recognition processing to be performed between two-dimensional face recognition processing and three-dimensional face recognition processing, the type of face recognition mode set by the face recognition mode setting means in the image data picked up by the image pickup means You may recognize the face.

また、例えば、請求項12に記載されているように、前記顔認識手段は、
2次元顔認識処理の実行により顔を認識することができなかった場合は、前記撮像手段により撮像された画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある顔を認識するようにしてもよい。
For example, as described in claim 12, the face recognition unit includes:
If the face cannot be recognized by the execution of the two-dimensional face recognition process, the three-dimensional face recognition process is executed based on the image data picked up by the image pickup means, and the inside of the picked-up image data You may make it recognize the face which exists in.

また、例えば、請求項13に記載されているように、前記顔認識手段は、
前記撮像手段により撮像された画像データの全領域、又は、画像データの画角の中央領域、又は、ユーザによって指定された領域の画像データに基づいて、顔認識処理を実行して、該撮像された画像データ内にある顔を認識するようにしてもよい。
For example, as described in claim 13, the face recognition unit includes:
Based on the image data of the entire area of the image data imaged by the imaging means, the central area of the angle of view of the image data, or the area specified by the user, the face recognition process is executed and the image is captured. A face in the image data may be recognized.

また、例えば、請求項14に記載されているように、前記顔認識手段は、
2次元顔認識処理の実行により、顔を認識することができなかったが、顔らしきものが認識できた場合は、前記撮像手段により撮像された画像データの該顔らしきものがあると認識された領域の画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある顔を認識するようにしてもよい。
For example, as described in claim 14, the face recognition means includes
Although the face could not be recognized by the execution of the two-dimensional face recognition process, but the face-like object could be recognized, it was recognized that there was the face-like image data captured by the imaging means. Based on the image data of the area, a three-dimensional face recognition process may be executed to recognize a face in the captured image data.

また、例えば、請求項15に記載されているように、前記顔認識手段は、
前記撮像手段により撮像された画像データ内にある顔を検出するようにしてもよい。
For example, as described in claim 15, the face recognition unit includes:
You may make it detect the face in the image data imaged by the said imaging means.

また、例えば、請求項16に記載されているように、前記顔認識手段は、
前記撮像手段により撮像された画像データ内にある顔が何であるかを具体的に識別するようにしてもよい。
Further, for example, as described in claim 16, the face recognition means includes:
You may make it identify specifically what the face is in the image data imaged by the said imaging means.

また、例えば、請求項17に記載されているように、前記撮像手段により撮像された画像データ内にある顔を検出する2次元顔検出手段を備え、
前記顔認識手段は、
前記2次元顔検出手段により顔が検出された場合は、前記撮像手段により撮像された画像データの前記2次元顔検出手段により検出された顔領域の画像データに基づいて、3次元顔認識処理を実行することにより、該撮像された画像データ内にある顔を識別するようにしてもよい。
Further, for example, as described in claim 17, two-dimensional face detection means for detecting a face in the image data imaged by the imaging means is provided,
The face recognition means
When a face is detected by the two-dimensional face detection means, a three-dimensional face recognition process is performed based on the image data of the face area detected by the two-dimensional face detection means of the image data picked up by the image pickup means. By executing, a face in the captured image data may be identified.

また、例えば、請求項18に記載されているように、前記顔認識モード設定手段は、
前記顔認識手段により顔が認識されると、前記撮像手段により撮像された画像データに基づいて、前記顔認識手段により認識された顔が画像データ内のどこにあるかを2次元的に検出していくことにより、該認識された顔に対して追従していく追従顔認識モードに切り替えて設定するようにしてもよい。
Further, for example, as described in claim 18, the face recognition mode setting means includes:
When the face is recognized by the face recognition means, based on the image data picked up by the image pickup means, two-dimensionally detecting where the face recognized by the face recognition means is in the image data is detected. By going, the following face recognition mode may be set to follow the recognized face.

また、例えば、請求項19に記載されているように、前記顔認識モード設定手段は、
前記顔認識手段による追従顔認識モードに応じた顔認識処理により人の顔が認識されなくなった場合は、前記追従顔認識モードが設定される前に設定されていた顔認識モードを再設定するようにしてもよい。
Further, for example, as described in claim 19, the face recognition mode setting means includes:
When a human face is no longer recognized by the face recognition process according to the following face recognition mode by the face recognition means, the face recognition mode set before the following face recognition mode is set is reset. It may be.

上記目的達成のため、請求項20記載の発明による顔認識方法は、コンピュータに、被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数の顔認識モードを備え、該複数の顔認識モードの中から何れかの顔認識モードを設定する顔認識モード設定処理と、画像データに対して、前記顔認識モード設定処理により設定された顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識処理と、を実行させる顔認識方法であって、前記顔認識モード設定処理は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、前記顔認識処理は、前記画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とする。
上記目的達成のため、請求項21記載の発明によるプログラムは、撮像手段を備えたコンピュータを、被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数の顔認識モードを備え、該複数の顔認識モードの中から何れかの顔認識モードを設定する顔認識モード設定手段、前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定された顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識手段、として機能させ、前記顔認識モード設定手段は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、前記顔認識手段は、前記撮像手段により撮像される画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とする。
In order to achieve the above object, a face recognition method according to a twentieth aspect of the invention is provided with a plurality of face recognition modes, each of which includes different face recognition processes executed when recognizing the face of a subject. A face recognition mode setting process for setting any one of the face recognition modes from among the face recognition modes and a face recognition process corresponding to the face recognition mode set by the face recognition mode setting process are performed on the image data. A face recognition method for recognizing a face in the imaged image data, wherein the face recognition mode setting process includes a recognition target as a settable face recognition mode. A plurality of face recognition modes according to a combination of a difference in subject type and a difference in conditions other than the subject type, and the face recognition processing is automatically performed based on the image data. And selects the face recognition process performed to identify the differences between conditions other than the type of the object and the difference type of subject.
To achieve the above object, a program according to the invention described in claim 21 includes a plurality of face recognition modes, each of which includes different face recognition processes executed when a computer including an imaging unit recognizes the face of a subject. Face recognition mode setting means for setting any one of the plurality of face recognition modes, and the face recognition mode set by the face recognition mode setting means for the image data picked up by the image pickup means By executing face recognition processing according to the function, it is made to function as a face recognition unit that recognizes a face in the captured image data, and the face recognition mode setting unit recognizes as a settable face recognition mode. A plurality of face recognition modes corresponding to a combination of a difference in the type of the subject to be processed and a difference in conditions other than the type of the subject, and the face recognition means includes the imaging hand And selects the face recognition process performed to identify the differences between automatically the non kinds of kinds of differences between the object of the subject condition based on image data captured by.

本願発明によれば、顔認識の精度を向上させることができる。   According to the present invention, the accuracy of face recognition can be improved.

本発明の実施の形態のデジタルカメラのブロック図である。1 is a block diagram of a digital camera according to an embodiment of the present invention. メモリ12に記録されている顔データテーブルの様子を示す図である。It is a figure which shows the mode of the face data table currently recorded on the memory. 第1の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 1st Embodiment. 第1の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 1st Embodiment. 設定された顔検出モードの種類に応じた顔検出処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the face detection process according to the kind of set face detection mode. 1つ目の3次元の顔検出処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 1st three-dimensional face detection process. 生成された被写体(ここでは猫科の顔のみ)の3次元モデルを3角形ポリゴンで表したときの様子を示す図である。It is a figure which shows a mode when the generated three-dimensional model of the to-be-photographed object (here only a cat department face) is represented by the triangular polygon. 2つ目の3次元の顔検出処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 2nd three-dimensional face detection process. 第2の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 2nd Embodiment. 第2の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 2nd Embodiment. 設定された顔識別モードの種類に応じた顔識別処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the face identification process according to the kind of set face identification mode.

以下、本実施の形態について、本発明の撮像装置をデジタルカメラに適用した一例として図面を参照して詳細に説明する。
[第1の実施の形態]
A.デジタルカメラの構成
図1は、本発明の撮像装置を実現するデジタルカメラ1の電気的な概略構成を示すブロック図である。
デジタルカメラ1は、撮影レンズ2、レンズ駆動ブロック3、絞り4、CCD5、ドライバ6、TG(timing generator)7、ユニット回路8、画像生成部9、CPU10、キー入力部11、メモリ12、DRAM13、フラッシュメモリ14、画像表示部15、バス16を備えている。
Hereinafter, the present embodiment will be described in detail with reference to the drawings as an example in which the imaging apparatus of the present invention is applied to a digital camera.
[First embodiment]
A. Configuration of Digital Camera FIG. 1 is a block diagram showing a schematic electrical configuration of a digital camera 1 that implements the imaging apparatus of the present invention.
The digital camera 1 includes a photographing lens 2, a lens driving block 3, an aperture 4, a CCD 5, a driver 6, a TG (timing generator) 7, a unit circuit 8, an image generation unit 9, a CPU 10, a key input unit 11, a memory 12, a DRAM 13, A flash memory 14, an image display unit 15, and a bus 16 are provided.

撮影レンズ2は、図示しない複数のレンズ群から構成されるフォーカスレンズ、ズームレンズ等を含む。そして、撮影レンズ2にはレンズ駆動ブロック3が接続されている。レンズ駆動ブロック3は、フォーカスレンズ、ズームレンズをそれぞれ光軸方向に沿って駆動させるフォーカスモータ、ズームモータと、CPU10から送られてくる制御信号にしたがって、フォーカスモータ、ズームモータを駆動させるフォーカスモータドライバ、ズームモータドライバから構成されている(図示略)。   The photographing lens 2 includes a focus lens, a zoom lens, and the like that are constituted by a plurality of lens groups (not shown). A lens driving block 3 is connected to the photographing lens 2. The lens driving block 3 includes a focus motor and a zoom motor that drive the focus lens and the zoom lens along the optical axis direction, respectively, and a focus motor driver that drives the focus motor and the zoom motor according to a control signal sent from the CPU 10. And a zoom motor driver (not shown).

絞り4は、図示しない駆動回路を含み、駆動回路はCPU10から送られてくる制御信号にしたがって絞り4を動作させる。
絞り4とは、撮影レンズ2から入ってくる光の量を制御する機構のことをいう。
The diaphragm 4 includes a drive circuit (not shown), and the drive circuit operates the diaphragm 4 in accordance with a control signal sent from the CPU 10.
The diaphragm 4 is a mechanism that controls the amount of light that enters from the photographing lens 2.

CCD5は、ドライバ6によって駆動され、一定周期毎に被写体像のRGB値の各色の光の強さを光電変換して撮像信号としてユニット回路8に出力する。このドライバ6、ユニット回路8の動作タイミングはTG7を介してCPU10により制御される。なお、CCD5はベイヤー配列の色フィルターを有しており、電子シャッタとしての機能も有する。この電子シャッタのシャッタ速度は、ドライバ6、TG7を介してCPU10によって制御される。   The CCD 5 is driven by the driver 6 and photoelectrically converts the intensity of light of each color of the RGB value of the subject image for every fixed period and outputs it to the unit circuit 8 as an imaging signal. The operation timing of the driver 6 and the unit circuit 8 is controlled by the CPU 10 via the TG 7. The CCD 5 has a Bayer color filter and also functions as an electronic shutter. The shutter speed of the electronic shutter is controlled by the CPU 10 via the driver 6 and TG7.

ユニット回路8には、TG7が接続されており、CCD5から出力される撮像信号を相関二重サンプリングして保持するCDS(Correlated Double Sampling)回路、そのサンプリング後の撮像信号の自動利得調整を行なうAGC(Automatic Gain Control)回路、その自動利得調整後のアナログの撮像信号をデジタル信号に変換するA/D変換器から構成されており、CCD5から出力された撮像信号はユニット回路8を経てデジタル信号として画像生成部9に送られる。   A TG 7 is connected to the unit circuit 8, a CDS (Correlated Double Sampling) circuit that holds the imaged signal output from the CCD 5 by correlated double sampling, and an AGC that performs automatic gain adjustment of the imaged signal after the sampling. An (Automatic Gain Control) circuit and an A / D converter that converts an analog image pickup signal after the automatic gain adjustment into a digital signal, the image pickup signal output from the CCD 5 passes through the unit circuit 8 as a digital signal. It is sent to the image generator 9.

画像生成部9は、ユニット回路8から送られてきた画像データに対してγ補正処理、ホワイトバランス処理などの処理を施すとともに、輝度色差信号(YUVデータ)を生成し、該生成された輝度色差信号の画像データはDRAM13(バッファメモリ)に記憶される。つまり、画像生成部9は、CCD5から出力された画像データに対して画像処理を施す。   The image generation unit 9 performs processing such as γ correction processing and white balance processing on the image data sent from the unit circuit 8, generates a luminance color difference signal (YUV data), and generates the generated luminance color difference. The image data of the signal is stored in the DRAM 13 (buffer memory). That is, the image generation unit 9 performs image processing on the image data output from the CCD 5.

CPU10は、CCD5への撮像制御、画像データの圧縮・伸張処理、フラッシュメモリ14への記録処理、画像データの表示処理を行う機能を有するとともに、デジタルカメラ1の各部を制御するワンチップマイコンである。また、CPU10はクロック回路を含み、タイマーとしての機能も有する。   The CPU 10 is a one-chip microcomputer that has functions of performing imaging control on the CCD 5, image data compression / expansion processing, recording processing on the flash memory 14, and image data display processing, and controls each part of the digital camera 1. . Further, the CPU 10 includes a clock circuit and has a function as a timer.

特に、CPU10は、複数種類の顔検出モードの中から何れかの顔検出モードを設定する顔検出モード設定部101と、画像データ内にある顔を認識する顔認識部102とを有する。
この顔検出モード設定部101は、設定する顔検出モードの種類を記憶する記憶領域を備え、最新に設定された顔検出モードのみが記憶される。
また、この顔認識部102は、2次元のデータのみを用いて顔を認識する機能(2次元の顔認識処理)と、3次元のデータを用いて顔を認識する機能(3次元の顔認識処理)とを有する。また、この顔認識とは、画像データ内にある顔を検出したり、画像データ内にある顔が誰なのか?何であるか?を具体的に識別したりすることをいう。つまり、顔検出、顔識別を総称して顔認識という。
In particular, the CPU 10 includes a face detection mode setting unit 101 that sets any one of a plurality of face detection modes and a face recognition unit 102 that recognizes a face in the image data.
The face detection mode setting unit 101 includes a storage area for storing the type of face detection mode to be set, and stores only the most recently set face detection mode.
Further, the face recognition unit 102 has a function of recognizing a face using only two-dimensional data (two-dimensional face recognition processing) and a function of recognizing a face using three-dimensional data (three-dimensional face recognition). Processing). In addition, this face recognition detects a face in the image data and who is the face in the image data? What is it? Is specifically identified. That is, face detection and face identification are collectively referred to as face recognition.

キー入力部11は、半押し全押し可能なシャッタボタン、モード切替キー、十字キー、SETキー、被写体追従On/Offキー等の複数の操作キーを含み、ユーザのキー操作に応じた操作信号をCPU10に出力する。   The key input unit 11 includes a plurality of operation keys such as a shutter button that can be half-pressed and fully pressed, a mode switching key, a cross key, a SET key, a subject tracking On / Off key, and an operation signal corresponding to a user's key operation. It outputs to CPU10.

メモリ12には、CPU10が各部を制御するのに必要な制御プログラム、及び必要なデータ(被写体の種類毎(人、犬、猫等)の顔データを設定した顔データテーブル)が記録されており、CPU10は、該プログラムに従い動作する。なお、このメモリ12は書き換え可能な不揮発性メモリである。   The memory 12 stores a control program necessary for the CPU 10 to control each unit and necessary data (a face data table in which face data is set for each type of subject (person, dog, cat, etc.)). The CPU 10 operates according to the program. The memory 12 is a rewritable nonvolatile memory.

図2は、メモリ12に記録されている顔データテーブルの様子を示すものである。
図2を見ると分かるように、被写体の種類を大まかに人と動物に分け、更に、動物は、犬、猫、馬・・・、というように種類毎に分かれている。そして、各被写体の種類毎に顔データが記録されている。また、顔データは、2次元(平面)と3次元(立体)と2種類有り、該被写体の種類毎に、2次元、又は/及び3次元の顔データが設定されている。ここでは、人の顔データは、2次元と3次元ともに設定されており、動物の顔データは3次元のみである。つまり、動物の場合は2次元の顔データが設定されていない。動物の顔は見る角度によって極端に変わり、立体的であるためである。
FIG. 2 shows the face data table recorded in the memory 12.
As can be seen from FIG. 2, the types of subjects are roughly divided into humans and animals, and the animals are further divided into types such as dogs, cats, horses, and so on. Face data is recorded for each type of subject. There are two types of face data, two-dimensional (plane) and three-dimensional (solid), and two-dimensional and / or three-dimensional face data is set for each type of subject. Here, human face data is set for both 2D and 3D, and animal face data is only 3D. That is, in the case of animals, two-dimensional face data is not set. This is because the animal's face changes extremely depending on the viewing angle and is three-dimensional.

DRAM13は、CCD5によって撮像された後、CPU10に送られてきた画像データを一時記憶するバッファメモリとして使用されるとともに、CPU10のワーキングメモリとして使用される。
フラッシュメモリ14は、圧縮された画像データを保存する記録媒体である。
The DRAM 13 is used as a buffer memory for temporarily storing image data sent to the CPU 10 after being imaged by the CCD 5 and also as a working memory for the CPU 10.
The flash memory 14 is a recording medium that stores compressed image data.

画像表示部15は、カラーLCDとその駆動回路を含み、撮影待機状態にあるときには、CCD5によって撮像された被写体をスルー画像として表示し、記録画像の再生時には、フラッシュメモリ14から読み出され、伸張された記録画像を表示させる。   The image display unit 15 includes a color LCD and its driving circuit, and displays the subject imaged by the CCD 5 as a through image when in a shooting standby state, and is read out from the flash memory 14 and decompressed when a recorded image is reproduced. The recorded image is displayed.

B.デジタルカメラ1の動作
第1の実施の形態におけるデジタルカメラ1の動作を図3及び図4のフローチャートに従って説明する。
ユーザのモード切替キーの操作により、顔検出静止画撮影モードに設定されると、ステップS1で、CPU10は、複数種類の顔検出モードを画像表示部15に一覧表示させる。
B. Operation of Digital Camera 1 The operation of the digital camera 1 according to the first embodiment will be described with reference to the flowcharts of FIGS.
When the face detection still image shooting mode is set by the user's operation of the mode switching key, the CPU 10 causes the image display unit 15 to display a list of a plurality of types of face detection modes in step S1.

ここで、複数種類の顔検出モードは、大きく分けて、人の顔を検出する顔検出モード(人用の顔検出モード)と動物(犬、猫、馬等)の顔を検出する顔検出モード(動物用の顔検出モード)とに分かれ、更に、動物用の顔検出モードは、犬の顔を検出する顔検出モード(犬用の顔検出モード)、猫の顔を検出する顔検出モード(猫用の顔検出モード)、馬の顔を検出する顔検出モード(馬用の顔検出モード)というように動物の種類毎に分かれる。つまり、複数種類の顔検出モードは、顔検出の対象となる被写体の種類毎にあり、これらの顔検出モードが画像表示部15に一覧表示される。このとき、カーソルを所定の種類の顔検出モードに合わせて表示させる。   Here, the plurality of types of face detection modes are roughly divided into a face detection mode for detecting a human face (face detection mode for humans) and a face detection mode for detecting the face of an animal (dog, cat, horse, etc.). (Face detection mode for animals). Furthermore, the face detection mode for animals includes a face detection mode for detecting the face of a dog (face detection mode for dog), and a face detection mode for detecting the face of a cat ( Cat face detection mode) and horse detection face detection mode (horse face detection mode). That is, there are a plurality of types of face detection modes for each type of subject to be face-detected, and these face detection modes are displayed in a list on the image display unit 15. At this time, the cursor is displayed in accordance with a predetermined type of face detection mode.

次いで、ステップS2で、CPU10は、ユーザによって何れかの顔検出モードが選択されたか否かを判断する。この判断はSETキーの操作に対応する操作信号がキー入力部11から送られてきたか否かにより判断する。
このとき、ユーザは十字キーを操作することにより、選択したい種類の顔検出モードにカーソルを合わせることができ、該カーソルが合わさっている種類の顔検出モードでOKと思う場合はSETキーの操作を行なう。
ステップS2で、顔検出モードが選択されたと判断すると、ステップS3に進み、CPU10の顔検出モード設定部101は、該SETキーの操作が行なわれたときにカーソルが合わさっている種類の顔検出モードに設定する。
Next, in step S2, the CPU 10 determines whether any face detection mode has been selected by the user. This determination is made based on whether or not an operation signal corresponding to the operation of the SET key is sent from the key input unit 11.
At this time, the user can move the cursor to the type of face detection mode to be selected by operating the cross key, and if the user is satisfied with the type of face detection mode in which the cursor is set, press the SET key. Do.
If it is determined in step S2 that the face detection mode has been selected, the process proceeds to step S3, where the face detection mode setting unit 101 of the CPU 10 selects the type of face detection mode in which the cursor is positioned when the SET key is operated. Set to.

顔検出モードの設定を行なうと、ステップS4に進み、CPU10は、CCD5に所定のフレームレートで被写体を撮像させる処理を開始させ、CCD5により順次撮像され画像生成部9によって生成された輝度色差信号のフレーム画像データ(YUVデータ)をバッファメモリ(DRAM13)に記憶させていき、該記憶されたフレーム画像データに基づく画像を順次画像表示部15に表示させていくという、いわゆるスルー画像表示を開始する。   When the face detection mode is set, the process proceeds to step S4, where the CPU 10 starts the process of causing the CCD 5 to image a subject at a predetermined frame rate, and sequentially captures the luminance and color difference signals generated by the image generation unit 9 after being sequentially imaged by the CCD 5. The frame image data (YUV data) is stored in the buffer memory (DRAM 13), and so-called through image display is started in which images based on the stored frame image data are sequentially displayed on the image display unit 15.

次いで、ステップS5で、CPU10は、被写体追従On/Offキーの操作が行なわれたか否かを判断する。
ステップS5で、被写体追従キーの操作が行われたと判断すると、ステップS6に進み、CPU10は、現在の被写体追従モードがOnであるか否かを判断する。
Next, in step S5, the CPU 10 determines whether or not the subject tracking On / Off key has been operated.
If it is determined in step S5 that the subject tracking key has been operated, the process proceeds to step S6, and the CPU 10 determines whether or not the current subject tracking mode is On.

ステップS6で、現在の被写体追従モードがOnでない、つまり、Offであると判断すると、ステップS7に進み、CPU10は、被写体追従モードをOffからOnに切り替えて、ステップS9に進む。
一方、ステップS6で、現在の被写体追従モードがOnであると判断すると、ステップS8に進み、CPU10は、被写体追従モードをOnからOffに切り替えて、ステップS9に進む。
また、ステップS5で、被写体追従On/Offキーの操作が行なわれていないと判断すると、そのままステップS9に進む。
If it is determined in step S6 that the current subject tracking mode is not On, that is, it is Off, the process proceeds to step S7, and the CPU 10 switches the subject tracking mode from Off to On and proceeds to step S9.
On the other hand, if it is determined in step S6 that the current subject tracking mode is On, the process proceeds to step S8, and the CPU 10 switches the subject tracking mode from On to Off, and proceeds to step S9.
If it is determined in step S5 that the subject tracking On / Off key is not operated, the process proceeds to step S9.

ステップS9に進むと、CPU10は、ユーザによってシャッタボタンが半押しされたか否かを判断する。この判断は、シャッタボタンの半押し操作に対応する操作信号がキー入力部11から送られてきたか否かにより判断する。
このとき、ユーザは、撮影したい被写体(メイン被写体)を画角内に収めて構図を決めてから撮影の準備を指示するためシャッタボタンを半押し操作する。
In step S9, the CPU 10 determines whether or not the shutter button is half-pressed by the user. This determination is made based on whether or not an operation signal corresponding to a half-press operation of the shutter button is sent from the key input unit 11.
At this time, the user half-presses the shutter button in order to instruct preparation for photographing after placing the subject (main subject) to be photographed within the angle of view and determining the composition.

ステップS9で、シャッタボタンが半押しされていないと判断するとステップS5に戻り、シャッタボタンが半押しされたと判断すると、ステップS10に進み、CPU10の顔認識部102は、ステップS3で設定された顔検出モードの種類に応じた顔検出処理を行う。この顔検出処理は後で詳細に説明する。この顔検出処理により設定された顔検出モードの種類の顔が検出されることになる。例えば、人用の顔検出モードが設定されている場合は、顔検出処理により人の顔が検出され、馬用の顔検出モードが設定されている場合は、顔検出処理により馬の顔が検出される。   If it is determined in step S9 that the shutter button is not half-pressed, the process returns to step S5. If it is determined that the shutter button is half-pressed, the process proceeds to step S10, where the face recognition unit 102 of the CPU 10 sets the face set in step S3. Face detection processing according to the type of detection mode is performed. This face detection process will be described in detail later. The face of the face detection mode type set by this face detection process is detected. For example, when the human face detection mode is set, the human face is detected by the face detection process, and when the horse face detection mode is set, the horse face is detected by the face detection process. Is done.

顔検出処理を行うと、ステップS11に進み、CPU10は、現在の被写体追従モードがOnであるか否かを判断する。
ステップS11で、被写体追従モードがOnでない、つまり、Offであると判断すると、ステップS12に進み、CPU10は、ステップS10の顔検出処理により顔を検出することができたか否かを判断する。
When face detection processing is performed, the process proceeds to step S11, and the CPU 10 determines whether or not the current subject tracking mode is On.
If it is determined in step S11 that the subject tracking mode is not On, that is, it is Off, the process proceeds to step S12, and the CPU 10 determines whether or not the face can be detected by the face detection process in step S10.

ステップS12で、顔を検出することができたと判断すると、ステップS13に進み、CPU10は、該検出した顔に対してコントラスト検出方式によるAF処理を行って、ステップS15に進む。このコントラスト検出方式によるAF処理とは、周知技術なので詳しく説明しないが、フォーカス対象となる領域の画像データの高周波成分が最も大きくなるレンズ位置に、フォーカスレンズを合わせることにより、該フォーカス対象となる領域の画像のピントを合わせるというものである。   If it is determined in step S12 that a face has been detected, the process proceeds to step S13, and the CPU 10 performs an AF process using the contrast detection method on the detected face, and then proceeds to step S15. The AF processing by the contrast detection method is a well-known technique and will not be described in detail. However, by focusing the focus lens on the lens position where the high-frequency component of the image data in the focus target area is the largest, the focus target area This is to adjust the focus of the image.

一方、ステップS12で、顔を検出することができなかったと判断すると、ステップS14に進み、CPU10は、所定の領域(例えば、画角の中央領域)に対してコントラスト検出方式によるAF処理を行って、ステップS15に進む。
なお、ステップS13、ステップS14では、コントラスト検出方式によるAF処理を行うようにしたが、他の方式(例えば、位相差方式)によってAF処理を行うようにしてもよい。要は、ピントを合わせたい領域に対してAF処理を行うことができればよい。
On the other hand, if it is determined in step S12 that the face could not be detected, the process proceeds to step S14, where the CPU 10 performs AF processing by a contrast detection method on a predetermined area (for example, the center area of the angle of view). The process proceeds to step S15.
In step S13 and step S14, the AF process is performed by the contrast detection method, but the AF process may be performed by another method (for example, a phase difference method). In short, it suffices if AF processing can be performed on an area to be focused.

ステップS15に進むと、CPU10は、シャッタボタンが全押しされたか否かを判断する。この判断は、シャッタボタンの全押し操作に対応する操作信号がキー入力部11から送られてきたか否かにより判断する。
ステップS15で、シャッタボタンが全押しされていないと判断すると、シャッタボタンが全押しされるまでステップS15に留まり、シャッタボタンが全押しされたと判断すると、ステップS16に進み、CPU10は、静止画撮影処理を行い、該撮影処理により得られた静止画像データを圧縮してフラッシュメモリ14に記録する処理を行う。
In step S15, the CPU 10 determines whether or not the shutter button has been fully pressed. This determination is made based on whether or not an operation signal corresponding to the full pressing operation of the shutter button is sent from the key input unit 11.
If it is determined in step S15 that the shutter button is not fully pressed, the process stays in step S15 until the shutter button is fully pressed. If it is determined that the shutter button is fully pressed, the process proceeds to step S16, and the CPU 10 captures a still image. Processing is performed, and still image data obtained by the photographing processing is compressed and recorded in the flash memory 14.

一方、ステップS11で、被写体追従モードがOnであると判断すると、図4のステップS21に進み、CPU10は、ステップS10の顔検出処理により顔を検出することができたか否かを判断する。   On the other hand, if it is determined in step S11 that the subject tracking mode is On, the process proceeds to step S21 in FIG. 4, and the CPU 10 determines whether or not the face can be detected by the face detection process in step S10.

ステップS21で、顔を検出することができたと判断すると、ステップS22に進み、CPU10の顔認識部102は、該検出された顔を2次元的に検出していくことにより、該検出された顔に対して追従していく追従処理を開始して、ステップS23に進む。ここで、2次元的に顔を検出するとは、2次元のデータのみを用いて顔検出することを指し、このステップS22での、2次元的に顔を検出する処理は、前述のステップS10の顔検出処理により検出された顔領域の2次元画像から抽出した特徴データを登録し、ブロックマッチング法などを用いて該登録した特徴データを有する顔を検出していく。このブロックマッチング法は、周知技術なので詳しく説明しないが、2枚の画像データを用いて、一方の画像データのある領域の画像データと最も相関度が高くなる他方の画像データの領域を検出する方法のことをいう。
一方、ステップS21で、顔を検出することができないと判断すると、そのままステップS23に進む。
If it is determined in step S21 that the face has been detected, the process proceeds to step S22, and the face recognition unit 102 of the CPU 10 detects the detected face by two-dimensionally detecting the detected face. Is started, and the process proceeds to step S23. Here, detecting a face in two dimensions means detecting a face using only two-dimensional data, and the process of detecting a face in two dimensions in step S22 is performed in step S10 described above. Feature data extracted from the two-dimensional image of the face area detected by the face detection process is registered, and a face having the registered feature data is detected using a block matching method or the like. Since this block matching method is a well-known technique, it will not be described in detail. However, a method of detecting the area of the other image data having the highest correlation with the image data of a certain area of one image data using two pieces of image data. I mean.
On the other hand, if it is determined in step S21 that a face cannot be detected, the process proceeds to step S23.

ステップS23に進むと、CPU10は、シャッタボタンが全押しされたか否かを判断する。
ステップS23で、シャッタボタンが全押しされていないと判断すると、ステップS24に進み、CPU10は、該追従している顔を見失ったか否かを判断する。つまり、ステップS22の2次元的に顔を検出する処理により顔を検出することができなくなったか否かを判断する。なお、ステップS21で顔が検出できないと判断された場合、つまり、図3のステップS10の顔検出処理により追従元となる顔がそもそも検出できないと判断された場合も顔を見失ったと判断する。
In step S23, the CPU 10 determines whether or not the shutter button has been fully pressed.
If it is determined in step S23 that the shutter button is not fully pressed, the process proceeds to step S24, and the CPU 10 determines whether or not the face being followed is lost. That is, it is determined whether the face cannot be detected by the two-dimensional face detection process in step S22. If it is determined in step S21 that the face cannot be detected, that is, if the face detection process in step S10 of FIG. 3 determines that the follow-up face cannot be detected in the first place, it is determined that the face has been lost.

ステップS24で、顔を見失っていないと判断するとステップS23に戻り、ステップS24で、顔を見失ったと判断すると、図3のステップS10に戻る。これにより、顔を見失った場合は再びステップS3で設定された顔検出モードの種類に応じた顔検出処理を行うことになる。   If it is determined in step S24 that the face is not lost, the process returns to step S23. If it is determined in step S24 that the face is lost, the process returns to step S10 in FIG. As a result, when the face is lost, face detection processing corresponding to the type of face detection mode set in step S3 is performed again.

一方、ステップS23で、シャッタボタンが全押しされたと判断すると、ステップS25に進み、CPU10は、該追従している顔に対してコントラスト検出方式によるAF処理を行う。つまり、シャッタボタンが全押しされた直前に2次元的に検出された顔に対してAF処理を行う。
次いで、ステップS26で、CPU10は、静止画撮影処理を行い、該撮影処理により得られた静止画像データを圧縮してフラッシュメモリ14に記録する処理を行う。
On the other hand, if it is determined in step S23 that the shutter button has been fully pressed, the process proceeds to step S25, and the CPU 10 performs an AF process using the contrast detection method on the following face. That is, AF processing is performed on a face that is two-dimensionally detected immediately before the shutter button is fully pressed.
Next, in step S <b> 26, the CPU 10 performs still image shooting processing, and performs processing for compressing still image data obtained by the shooting processing and recording it in the flash memory 14.

C.設定された顔検出モードの種類に応じた顔検出処理について
次に、設定された顔検出モードの種類に応じた顔検出処理の動作を図5のフローチャートにしたがって説明する。
図3のステップS10に進むと、図5のステップS31に進み、CPU10の顔認識部102は、現在、人用の顔検出モードが設定されているか否かを判断する。
C. Next, the face detection process according to the set face detection mode will be described with reference to the flowchart of FIG.
When the process proceeds to step S10 in FIG. 3, the process proceeds to step S31 in FIG. 5, and the face recognition unit 102 of the CPU 10 determines whether or not the human face detection mode is currently set.

ステップS31で、人用の顔検出モードが設定されていると判断すると、ステップS32に進み、CPU10の顔認識部102は、2次元の顔検出処理により人の顔を検出する。
ここでの、2次元の顔検出処理は、直近に撮像されたフレーム画像データから全被写体の特徴データ(2次元の特徴データ)を算出し、該算出した被写体の特徴データと、図2に示す顔データテーブルに設定されている人の2次元の顔データとを比較照合することにより、人の顔がどこにあるかを検出する。
If it is determined in step S31 that the human face detection mode is set, the process proceeds to step S32, and the face recognition unit 102 of the CPU 10 detects a human face by two-dimensional face detection processing.
In this two-dimensional face detection process, feature data (two-dimensional feature data) of all subjects is calculated from frame image data captured most recently, and the calculated feature data of the subject is shown in FIG. The person's face is detected by comparing and collating with the two-dimensional face data of the person set in the face data table.

また、「全被写体」とは、CCD5によって撮像された全ての被写体のことを指す。例えば、建物の前に立っているメイン被写体である人を撮像した場合は、全被写体は建物と人ということになる。つまり、画像データの全領域から被写体の特徴データを算出する。
また、全被写体の特徴データとは、例えば、撮影された全被写体が建物とその前に立っている人の場合は、建物及び人の特徴点を複数抽出し、該抽出した特徴点の座標位置や相対位置関係等を数値化したデータのことをいう。この特徴点の抽出により、目、鼻、口、顔の輪郭等から顔の特徴点も複数抽出される。つまり、全被写体の特徴データは、顔だけではなく撮像された全ての被写体の特徴点に基づいて数値化されたデータである。
また、この比較照合は、生成した全被写体の特徴データの中に顔データと一致する部分かあるか否かを判断するためのものである。したがって、この比較照合は、生成された全被写体の特徴データの各部と顔データとを比較照合していく(サーチしていく)ことにより、各部との一致度を得る。
“All subjects” refers to all subjects imaged by the CCD 5. For example, when a person who is a main subject standing in front of a building is imaged, all the subjects are a building and a person. That is, subject feature data is calculated from the entire area of the image data.
Further, the feature data of all subjects is, for example, in the case where all photographed subjects are a building and a person standing in front of it, a plurality of building and person feature points are extracted, and the coordinate positions of the extracted feature points are extracted. Or the relative positional relationship. By extracting the feature points, a plurality of facial feature points are also extracted from the eyes, nose, mouth, face outline, and the like. That is, the feature data of all subjects is data that is digitized based on the feature points of not only the face but all of the captured subjects.
This comparison and collation is for determining whether or not the generated feature data of all the subjects is a portion that matches the face data. Therefore, in this comparison and collation, the degree of coincidence with each part is obtained by comparing and collating (searching) each part of the generated feature data of all subjects with the face data.

ステップS33で、CPU10の顔認識部102は、画像内に人の顔があるか否かを判断する。つまり、2次元の顔検出処理により人の顔を検出することができたか否かを判断する。つまり、算出した全被写体の特徴データの中に、顔データと所定値以上で(所定の範囲内で)一致する部分があるか否かを判断する。
ステップS33で、人の顔があると判断すると、ステップS38に進み、CPU10の顔認識部102は、顔を検出することができたと判断する。
In step S33, the face recognition unit 102 of the CPU 10 determines whether or not there is a human face in the image. That is, it is determined whether or not a human face can be detected by the two-dimensional face detection process. That is, it is determined whether or not the calculated feature data of all subjects includes a portion that matches the face data at a predetermined value or more (within a predetermined range).
If it is determined in step S33 that there is a human face, the process proceeds to step S38, and the face recognition unit 102 of the CPU 10 determines that the face has been detected.

一方、ステップS33で、人の顔がないと判断すると、ステップS34に進み、CPU10の顔認識部102は、顔らしきものがあるか否かを判断する。この顔らしきものとは、ステップS32の全被写体の特徴データと、人の2次元の顔データとの比較照合により、口と鼻はあるが片目、若しくは両目が検出されなかったり(人が横を向いている場合、サングラスをしている場合)、目があるが鼻と口が検出されなかったり場合(マスクをしている場合)のことである。つまり、顔データに基づく顔のパーツが一部検出されなかった場合のことである。   On the other hand, if it is determined in step S33 that there is no human face, the process proceeds to step S34, and the face recognition unit 102 of the CPU 10 determines whether there is something that looks like a face. This face-like thing is the result of the comparison between the feature data of all the subjects in step S32 and the two-dimensional face data of the person, but there is a mouth and nose but one eye or both eyes are not detected (the person moves sideways). (If you are facing, wearing sunglasses), if you have eyes but nose and mouth are not detected (if you are wearing a mask). In other words, this is a case where some face parts based on the face data are not detected.

ステップS34で、顔らしきものがあると判断されると、ステップS35に進み、CPU10の顔認識部102は、該検出された顔らしきものがある領域に基づいて3次元の顔検出処理により人の顔を検出する処理を行って、ステップS37に進む。この3次元の顔検出処理については後で説明する。これにより、3次元の顔検出処理による処理負担を軽減することができる。
一方、ステップS31で、人用の顔検出モードが設定されていないと判断した場合、又は、ステップS34で、顔らしきものがないと判断した場合は、ステップS36に進み、CPU10の顔認識部102は、フレーム画像データの全領域に基づいて3次元の顔検出処理により、現在設定されている顔検出モードの種類の顔を検出する処理を行って、ステップS37に進む。この3次元の顔検出処理については後で説明する。ここで、ステップS34で顔らしきものがないと判断されることによりステップS36に進んだ場合は、ステップS36において、フレーム画像データの全領域に基づいて3次元の顔検出処理により人の顔を検出する処理が行われることになる。
If it is determined in step S34 that there is something that looks like a face, the process proceeds to step S35, and the face recognition unit 102 of the CPU 10 performs human face detection processing by three-dimensional face detection processing based on the detected area that appears to be a face. Processing for detecting a face is performed, and the process proceeds to step S37. This three-dimensional face detection process will be described later. Thereby, the processing load by the three-dimensional face detection process can be reduced.
On the other hand, if it is determined in step S31 that the human face detection mode is not set, or if it is determined in step S34 that there is no human face detection mode, the process proceeds to step S36, where the face recognition unit 102 of the CPU 10 is processed. Performs a process for detecting a face of the currently set face detection mode type by a three-dimensional face detection process based on the entire region of the frame image data, and the process proceeds to step S37. This three-dimensional face detection process will be described later. If it is determined in step S34 that there is no face-like object, the process proceeds to step S36. In step S36, a human face is detected by three-dimensional face detection processing based on the entire area of the frame image data. Will be performed.

ステップS37に進むと、CPU10の顔検出部102は、画像内に人の顔があるか否かを判断する。つまり、3次元の顔検出処理により顔を検出することができたか否かを判断する。
ステップS37で、画像内に顔があると判断すると、ステップS38に進み、顔認識部102は、顔を検出することができたと判断し、ステップS37で、顔がないと判断すると、ステップS39に進み、CPU10の顔認識部102は、顔を検出することができないと判断する。
In step S37, the face detection unit 102 of the CPU 10 determines whether or not there is a human face in the image. That is, it is determined whether or not a face can be detected by the three-dimensional face detection process.
If it is determined in step S37 that there is a face in the image, the process proceeds to step S38. The face recognition unit 102 determines that a face has been detected. If it is determined in step S37 that there is no face, the process proceeds to step S39. The face recognition unit 102 of the CPU 10 determines that the face cannot be detected.

このステップS38で、顔を検出することができたと判断すると、図3のステップS12、図4のステップS21で顔を検出することができたと判断し、ステップS39で、顔を検出することができないと判断すると、図3のステップS12、図4のステップS21で顔を検出することができないと判断する。   If it is determined in step S38 that a face has been detected, it is determined that a face has been detected in step S12 in FIG. 3 and step S21 in FIG. 4, and a face cannot be detected in step S39. If it is determined that the face cannot be detected in step S12 in FIG. 3 and step S21 in FIG.

D.3次元の顔検出処理について
次に、3次元の顔検出処理の動作を説明する。2次元の顔検出処理は、2次元的に顔を検出するが、つまり、撮像されたフレーム画像データに基づく2次元の被写体の特徴データと2次元の顔データとを比較照合することにより、該フレーム画像データ内にある顔を検出していたが、3次元の顔検出処理は、3次元のデータを用いて顔を検出するというものである。
ここでは、3次元のデータを用いて顔を検出する動作を2つ紹介するが、これに限られるものではなく、要は、3次元データを用いて被写体の顔を検出するものであればよい。
D. Next, the operation of the three-dimensional face detection process will be described. The two-dimensional face detection process detects a face two-dimensionally, that is, by comparing and comparing feature data of a two-dimensional subject based on captured frame image data and two-dimensional face data, The face in the frame image data is detected, but the three-dimensional face detection process is to detect a face using three-dimensional data.
Here, two operations for detecting a face using three-dimensional data are introduced. However, the present invention is not limited to this, and any operation may be used as long as it detects a face of a subject using three-dimensional data. .

D−1.1つ目の3次元の顔検出処理について
まず、3次元の顔検出処理の動作を図6のフローチャートにしたがって説明する。
図5のステップS35及びステップS36で、3次元の顔検出処理を行うことにより顔を検出する場合は、図6のステップS51に進み、CPU10の顔認識部102は、異なる撮影角度でメイン被写体の撮影を促す表示を行なう。例えば、「撮影したい被写体を異なる角度から撮影してください。」というような表示を行う。これにしたがって、ユーザは撮影角度を変えてメイン被写体を撮像することになる。なお、このときユーザは、メイン被写体となる顔の画像内での位置を変えずに撮影角度を変えることが好ましい。
D-1.1 First Three-dimensional Face Detection Process First, the operation of the three-dimensional face detection process will be described with reference to the flowchart of FIG.
When the face is detected by performing the three-dimensional face detection process in step S35 and step S36 in FIG. 5, the process proceeds to step S51 in FIG. 6, and the face recognition unit 102 of the CPU 10 determines the main subject at different shooting angles. Display to prompt shooting. For example, a display such as “Please photograph the subject to be photographed from different angles” is performed. In accordance with this, the user changes the shooting angle and images the main subject. At this time, the user preferably changes the shooting angle without changing the position in the image of the face that is the main subject.

次いで、ステップS52で、CPU10の顔認識部102は、異なる撮影角度でのメイン被写体の撮影を促す表示を行なってから所定時間(例えば、1秒)が経過したか否かを判断する。このとき、CPU10は、スルー画像表示用に撮像された複数枚のフレーム画像データをバッファメモリに保持させておく。   Next, in step S52, the face recognition unit 102 of the CPU 10 determines whether or not a predetermined time (for example, 1 second) has elapsed since the display for prompting the main subject to be photographed at a different photographing angle. At this time, the CPU 10 holds a plurality of frame image data captured for through image display in the buffer memory.

ステップS52で、所定時間が経過していないと判断すると所定時間が経過するまでステップS52に留まり、所定時間が経過したと判断すると、ステップS53に進み、CPU10の顔認識部102は、撮像された複数枚のフレーム画像データから、被写体の特徴データをそれぞれ算出する。
このとき、図5のステップS36での3次元の顔検出処理の場合は、撮像されたフレーム画像データの全領域に基づいて被写体の特徴データ(全被写体の特徴データ)を算出する。
また、図5のステップS35での3次元の顔検出処理の場合は、撮像された各フレーム画像データのうち、顔らしきものがあると判断された領域の画像データに基づいて被写体の特徴データ(顔らしき被写体の特徴データ)を算出する。
If it is determined in step S52 that the predetermined time has not elapsed, the process stays in step S52 until the predetermined time elapses. If it is determined that the predetermined time has elapsed, the process proceeds to step S53, and the face recognition unit 102 of the CPU 10 captures the image. Characteristic data of the subject is calculated from a plurality of frame image data.
At this time, in the case of the three-dimensional face detection processing in step S36 of FIG. 5, subject feature data (feature data of all subjects) is calculated based on the entire area of the captured frame image data.
Further, in the case of the three-dimensional face detection process in step S35 of FIG. 5, the subject feature data (based on the image data of the area determined to be a face among the captured frame image data). (Feature data of a subject that looks like a face) is calculated.

ここで、フレーム画像データから算出される全被写体の特徴データとは、例えば、撮影された全被写体が建物とその前に立っている人の場合は、建物及び人の特徴点を複数抽出し、該抽出した特徴点の座標位置や相対位置関係等を数値化したデータのことをいう。この特徴点の抽出により、目、鼻、口、顔の輪郭等から顔の特徴点も複数抽出される。つまり、全被写体の特徴データは、顔だけではなく撮像された全ての被写体の特徴点に基づいて数値化されたデータのことである。
また、顔らしき被写体の特徴データとは、顔らしきものがあると判断された領域内で撮像されている全ての被写体の特徴データに基づいて数値化されたデータのことである。
Here, the feature data of all subjects calculated from the frame image data is, for example, in the case where all the photographed subjects are a building and a person standing in front of it, extract a plurality of building and person feature points, This is data obtained by quantifying the coordinate positions and relative positional relationships of the extracted feature points. By extracting the feature points, a plurality of facial feature points are also extracted from the eyes, nose, mouth, face outline, and the like. That is, the feature data of all subjects is data that is digitized based on the feature points of not only the face but all of the captured subjects.
The feature data of a subject that looks like a face is data that has been digitized based on the feature data of all the subjects that have been imaged in an area where it is determined that there is something that looks like a face.

なお、ここでは、顔らしきものがあると判断された領域の位置、大きさを撮像された全てのフレーム画像データに対して同じにするようにしたが、所定時間が経過するまで各フレーム画像データに対して2次元の顔検出処理を行い続けることにより、各フレーム画像データ毎に顔らしき領域を検出し、各フレーム画像データ毎に該検出された領域の画像データから被写体の特徴データ(顔らしき被写体の特徴データ)を算出するようにしてもよい。この場合は、この2次元の顔検出処理により顔が検出された場合は、もはや3次元の顔検出処理を行う必要がないので図5のステップS38に進むようにしてもよい。   Here, the position and size of the area determined to have a facial appearance are the same for all the captured frame image data, but each frame image data until a predetermined time elapses. By continuing to perform the two-dimensional face detection processing on the image, a face-like area is detected for each frame image data, and subject feature data (face-like data) is detected from the image data of the detected area for each frame image data. Subject feature data) may be calculated. In this case, if a face is detected by this two-dimensional face detection process, it is no longer necessary to perform the three-dimensional face detection process, and the process may proceed to step S38 in FIG.

各フレーム画像データから被写体の特徴データを算出すると、ステップS54に進み、CPU10の顔認識部102は、該算出された各フレーム画像データの被写体の特徴データに基づいて、被写体の3次元モデルを生成する。
この3次元モデルの生成は、既に周知技術なので詳しく説明しないが、ある画像の特徴点と、該特徴点に対応する他の画像の特徴点とに基づいて、三角測量演算によって被写体の3次元モデルを生成する(モデリング処理)。
When the subject feature data is calculated from each frame image data, the process proceeds to step S54, and the face recognition unit 102 of the CPU 10 generates a three-dimensional model of the subject based on the calculated subject feature data of each frame image data. To do.
The generation of this three-dimensional model is already well-known technology and will not be described in detail. However, based on the feature points of a certain image and the feature points of another image corresponding to the feature points, the three-dimensional model of the subject is obtained by triangulation calculation. Is generated (modeling process).

また、図7は、生成された被写体(ここでは猫科の動物の顔のみ)の3次元モデルをサーフェスモデルの一種である多角形ポリゴン(ここでは、3角形ポリゴン)で表したときの様子を示す図である。
なお、サーフェスモデルでなく、ワイヤーフレームモデルやソリッドモデル等他の方法によって表すようにしてもよい。
FIG. 7 shows a state in which the generated three-dimensional model of the subject (here, only a cat face) is represented by a polygon polygon (here, a triangular polygon) which is a kind of surface model. FIG.
In addition, you may make it represent with other methods, such as a wire frame model and a solid model, instead of a surface model.

次いで、ステップS55で、CPU10の顔認識部102は、該生成した被写体の3次元モデルと、図2に示す顔データテーブルに記録されている現在設定されている顔検出モードの種類の立体顔データ(3次元の顔データ)とを比較照合する。
例えば、図5のステップS35の場合は、該生成した被写体の3次元モデルと、図2に示す顔データテーブルに設定されている人の立体顔データとを比較照合し、図5のステップS36の場合は、たとえば、犬用の顔検出モードが設定されている場合は、該生成した被写体の3次元モデルと、図2に示す顔データテーブルに設定されている犬の立体顔データとを比較照合する。
Next, in step S55, the face recognition unit 102 of the CPU 10 generates the three-dimensional model of the generated subject and the three-dimensional face data of the currently set face detection mode type recorded in the face data table shown in FIG. (3D face data) is compared and collated.
For example, in the case of step S35 in FIG. 5, the generated three-dimensional model of the subject is compared and collated with the human three-dimensional face data set in the face data table shown in FIG. 2, and in step S36 in FIG. In this case, for example, when the face detection mode for dogs is set, the three-dimensional model of the generated subject is compared with the three-dimensional face data of the dog set in the face data table shown in FIG. To do.

また、この比較照合は、生成した被写体の3次元モデルの中に立体顔データと一致する部分があるか否かを判断するためのものである。したがって、この比較照合は、生成された3次元モデルの各部と立体顔データとを比較照合していく(サーチしていく)ことにより、各部との一致度を得る。   This comparison and collation is for determining whether or not there is a portion that matches the stereoscopic face data in the generated three-dimensional model of the subject. Therefore, in this comparison and collation, each part of the generated three-dimensional model is compared and collated with the 3D face data (searching) to obtain a degree of coincidence with each part.

次いで、ステップS56で、CPU10の顔認識部102は、該生成した被写体の3次元モデルの中に、該比較照合を行なった立体顔データと所定値以上で一致する部分があるか否かを判断する。つまり、所定の範囲内で立体顔データと一致する部分があるか否かを判断することになる。この一致する部分とは、被写体の3次元モデルの中の1部であってもよいし、被写体の3次元モデルの全部であってもよい。要は、立体顔データと所定値以上で一致するものがあるかを判断できればよい。   Next, in step S56, the face recognition unit 102 of the CPU 10 determines whether or not there is a portion in the generated three-dimensional model of the subject that matches the stereoscopic face data subjected to the comparison and collation with a predetermined value or more. To do. That is, it is determined whether there is a portion that matches the stereoscopic face data within a predetermined range. The matching part may be a part of the three-dimensional model of the subject or the whole of the three-dimensional model of the subject. In short, it suffices if it is possible to determine whether there is a solid face data that matches a predetermined value or more.

ステップS56で、所定値以上で一致する部分があると判断した場合は、ステップS57に進み、CPU10の顔認識部102は、所定値以上で一致する部分を顔と判断し、該所定値以上で一致した部分に対応する撮像されたフレーム画像データ上の領域を顔領域とする。つまり、フレーム画像データ上の顔領域を検出する。   When it is determined in step S56 that there is a matching part with a predetermined value or more, the process proceeds to step S57, where the face recognition unit 102 of the CPU 10 determines that the matching part has a predetermined value or more as a face, An area on the captured frame image data corresponding to the matched portion is set as a face area. That is, the face area on the frame image data is detected.

この所定値以上で一致した部分に対応するフレーム画像データ上の領域とは、被写体の3次元モデルの中で、一致する部分(顔部分)の特徴データに対応するフレーム画像データ上の領域であり、該特徴データに対応するフレーム画像データは複数あるので(複数枚のフレーム画像データに基づいて被写体モデルを生成したため)、所定値以上で一致した部分に対応する、生成元となった複数のフレーム画像データのうち、直近に撮像されたフレーム画像データ上の領域であってもよいし、所定値以上で一致した部分に対応する生成元となった全てのフレーム画像データ上の領域から構成される領域であってもよい。   The area on the frame image data corresponding to the matching part at a predetermined value or more is the area on the frame image data corresponding to the feature data of the matching part (face part) in the three-dimensional model of the subject. Since there are a plurality of frame image data corresponding to the feature data (because a subject model is generated based on a plurality of frame image data), a plurality of frames that are the generation sources corresponding to portions that match at a predetermined value or more Of the image data, it may be an area on the most recently captured frame image data, or it may be composed of all the areas on the frame image data that are the generation sources corresponding to portions that match at a predetermined value or more. It may be a region.

一方、ステップS56で、所定値以上で一致する部分がないと判断すると、ステップS58に進み、CPU10の顔認識部102は、撮像されたフレーム画像データ内に顔がないと判断する。
このステップS57で顔領域を検出すると、図5のステップS38で顔を検出することができたと判断し、図3のステップS12、図4のステップS21で顔を検出できたと判断する。また、ステップS58で顔がないと判断すると、図5のステップS39で顔を検出することができないと判断し、図3のステップS12、図4のステップS21で顔を検出できないと判断する。
On the other hand, if it is determined in step S56 that there is no matching portion equal to or greater than the predetermined value, the process proceeds to step S58, and the face recognition unit 102 of the CPU 10 determines that there is no face in the captured frame image data.
When the face area is detected in step S57, it is determined that the face can be detected in step S38 of FIG. 5, and it is determined that the face can be detected in step S12 of FIG. 3 and step S21 of FIG. If it is determined in step S58 that there is no face, it is determined that a face cannot be detected in step S39 in FIG. 5, and a face cannot be detected in steps S12 in FIG. 3 and step S21 in FIG.

このように、1つ目の3次元の顔検出処理は、同一被写体を撮像した複数のフレーム画像データから、該被写体の3次元モデルを生成し、立体顔データと比較照合することにより顔を検出するので、顔検出の精度を向上させることができる。
例えば、被写体の顔が横を向いていたり、サングラスを装着している場合であっても検出することができる。
また、立体顔データと生成した3次元モデルとを比較照合するので、人の顔に限らず、犬や猫等の動物の顔等も検出することができる。例えば、馬など動物の顔は、見る角度が違うと極端に顔の形が変わってしまうが、3次元とすることにより、精度よく顔を検出することができる。
In this way, the first three-dimensional face detection process detects a face by generating a three-dimensional model of the subject from a plurality of frame image data obtained by imaging the same subject and comparing and comparing with the three-dimensional face data. Therefore, the accuracy of face detection can be improved.
For example, it can be detected even when the face of the subject is facing sideways or wearing sunglasses.
Further, since the three-dimensional face data and the generated three-dimensional model are compared and collated, it is possible to detect not only human faces but also animal faces such as dogs and cats. For example, the face of an animal such as a horse changes its shape extremely if the viewing angle is different, but the face can be detected with high accuracy by using three dimensions.

D−2.2つ目の3次元の顔検出処理について
次に、2つ目の3次元の顔検出処理の動作を図8のフローチャートにしたがって説明する。
図5のステップS35及びステップS36で、3次元の顔検出処理を行うことにより顔を検出する場合は、図8のステップS61に進み、CPU10の顔認識部102は、顔の向きを正面と設定する。
D-2.2 Second Three-dimensional Face Detection Process Next, the operation of the second three-dimensional face detection process will be described with reference to the flowchart of FIG.
When the face is detected by performing the three-dimensional face detection process in step S35 and step S36 in FIG. 5, the process proceeds to step S61 in FIG. 8, and the face recognition unit 102 of the CPU 10 sets the face direction to the front. To do.

次いで、ステップS62で、CPU10の顔認識部102は、図2の顔データテーブルに記録されている現在設定されている顔検出モードの種類の立体顔データに基づいて、現在設定されている向きから見た顔の平面(2次元)画像データを生成する(レンダリング処理)。ここでは、設定されている向きは正面なので、設定された顔検出モードの種類の顔を正面から見た顔の平面画像データを生成することになる。この立体的なものから平面画像データを生成する技術は周知技術なので詳しく説明しないが、陰面消去や陰線消去などを行なうことによって行なわれる。   Next, in step S62, the face recognition unit 102 of the CPU 10 starts from the currently set orientation based on the currently set face detection mode type of three-dimensional face data recorded in the face data table of FIG. Plane (two-dimensional) image data of the viewed face is generated (rendering process). Here, since the set direction is the front, plane image data of the face when the face of the set face detection mode type is viewed from the front is generated. The technology for generating planar image data from this three-dimensional image is well known and will not be described in detail, but is performed by performing hidden surface removal, hidden line removal, or the like.

たとえば、設定されている顔検出モードが人用である場合は、図2に記録されている人の立体顔データから現在設定されている向きから見た平面画像データを生成し、設定されている顔検出モードが猫用である場合は、図2に記録されている猫の立体顔データから現在設定されている向きからみた平面画像データを生成することになる。   For example, when the set face detection mode is for human use, plane image data viewed from the currently set direction is generated from the person's stereoscopic face data recorded in FIG. 2 and set. When the face detection mode is for cats, plane image data viewed from the currently set direction is generated from the cat's three-dimensional face data recorded in FIG.

次いで、ステップS63で、CPU10の顔認識部102は、該生成した顔の平面画像データから顔特徴データを算出する。これにより、現在設定されている向きから見た、該設定されている顔検出モードの種類の顔特徴データが算出される。   Next, in step S63, the face recognition unit 102 of the CPU 10 calculates face feature data from the generated plane image data of the face. Thereby, the face feature data of the type of the set face detection mode as seen from the currently set direction is calculated.

次いで、ステップS64で、CPU10の顔認識部102は、直近にスルー画像表示用に撮像されたフレーム画像データから被写体の特徴データを算出する。
このとき、図5のステップS36での3次元の顔検出処理の場合は、撮像されたフレーム画像データの全領域に基づいて被写体の特徴データ(全被写体の特徴データ)を算出する。
また、図5のステップS35での3次元の顔検出処理の場合は、撮像されたフレーム画像データのうち、顔らしきものがあると判断された領域の画像データに基づいて被写体の特徴データ(顔らしき被写体の特徴データ)を算出する。
Next, in step S64, the face recognition unit 102 of the CPU 10 calculates subject feature data from the frame image data recently captured for through image display.
At this time, in the case of the three-dimensional face detection processing in step S36 of FIG. 5, subject feature data (feature data of all subjects) is calculated based on the entire area of the captured frame image data.
Further, in the case of the three-dimensional face detection process in step S35 of FIG. 5, subject feature data (face data) based on image data of an area determined to have a facial appearance in the captured frame image data. Characteristic data of the subject).

次いで、ステップS65で、CPU10の顔認識部102は、ステップS63で算出された顔特徴データと、ステップS64で算出された被写体の特徴データとを比較照合する。この比較照合は、生成した被写体の特徴データの中に顔特徴データと一致する部分かあるか否かを判断するためのものである。したがって、この比較照合は、生成された被写体の特徴データの各部と顔特徴データとを比較照合していく(サーチしていく)ことにより、各部との一致度を得る。   Next, in step S65, the face recognition unit 102 of the CPU 10 compares and compares the face feature data calculated in step S63 with the subject feature data calculated in step S64. This comparison and collation is for determining whether or not the generated feature data of the subject is a portion that matches the facial feature data. Therefore, in this comparison and collation, each part of the generated feature data of the subject and the face feature data are compared and collated (searched) to obtain a degree of coincidence with each part.

ステップS66で、CPU10の顔認識部102は、ステップS64で算出された被写体の特徴データの中に、ステップS63で算出した顔特徴データと所定値以上で一致する部分があるか否かを判断する。つまり、所定の範囲内で顔特徴データと一致する部分があるか否かを判断することになる。この一致する部分とは、被写体の特徴データの中の1部であってもよいし、被写体の特徴データ全部であってもよい。要は、顔特徴データと所定値以上で一致するものがあるかを判断できればよい。   In step S66, the face recognition unit 102 of the CPU 10 determines whether or not the subject feature data calculated in step S64 has a portion that matches the face feature data calculated in step S63 at a predetermined value or more. . That is, it is determined whether or not there is a portion that matches the facial feature data within a predetermined range. This matching part may be a part of the feature data of the subject or all of the feature data of the subject. In short, it is only necessary to be able to determine whether there is a match with the face feature data at a predetermined value or more.

ステップS66で、所定値以上で一致する部分があると判断した場合は、ステップS67に進み、CPU10の顔認識部102は、該所定値以上で一致する部分を顔と判断し、該部分に対応する、被写体の特徴データの生成元となったフレーム画像データ上の領域を顔領域とする。つまり、フレーム画像データ上の顔領域を検出する。   If it is determined in step S66 that there is a matching part with a predetermined value or more, the process proceeds to step S67, and the face recognition unit 102 of the CPU 10 determines the matching part with the predetermined value or more as a face, and corresponds to the part. An area on the frame image data from which the subject feature data is generated is defined as a face area. That is, the face area on the frame image data is detected.

一方、ステップS66で、所定値以上で一致する部分がないと判断すると、ステップS68に進み、CPU10の顔認識部102は、現在設定されている向きが最後の向きであるか否かを判断する。つまり、予め決められた全ての向きが設定されたか否かを判断する。
ステップS68で、設定されている向きが最後の向きでないと判断すると、ステップS69に進み、CPU10の顔認識部102は、次の向きに設定してステップS62に戻る。この「次の向き」とは、たとえば、現在設定されている向きから5度、右方向又は左方向に回転させた向きである。ここで、左、右とは、頭の天辺を上とし、顎や喉を下としたときを基準とする。なお、ここでは左右の方向に向きを回転させたが上下方向にも回転させるようにしてもよいし、左右方向と上下方向ともに回転させるようにしてもよい。
On the other hand, if it is determined in step S66 that there is no matching part equal to or greater than the predetermined value, the process proceeds to step S68, and the face recognition unit 102 of the CPU 10 determines whether or not the currently set direction is the last direction. . That is, it is determined whether all predetermined directions are set.
If it is determined in step S68 that the set orientation is not the last orientation, the process proceeds to step S69, where the face recognition unit 102 of the CPU 10 sets the next orientation and returns to step S62. The “next direction” is, for example, a direction rotated rightward or leftward by 5 degrees from the currently set direction. Here, “left” and “right” are based on the top of the head as the upper side and the chin and throat as the lower side. Although the direction is rotated in the left-right direction here, it may be rotated in the up-down direction, or may be rotated in both the left-right direction and the up-down direction.

一方、ステップS68で、設定されている向きが最後の向きであると判断すると、ステップS70に進み、顔認識部102は、撮像されたフレーム画像データ内に顔がないと判断する。
このステップS67で顔領域を検出すると、図5のステップS38で顔を検出することができたと判断し、図3のステップS12、図4のステップS21で顔を検出できたと判断する。また、ステップS70で顔がないと判断すると、図5のステップS39で顔を検出することができないと判断し、図3のステップS12、図4のステップS21で顔を検出できないと判断する。
On the other hand, if it is determined in step S68 that the set direction is the last direction, the process proceeds to step S70, and the face recognition unit 102 determines that there is no face in the captured frame image data.
When the face area is detected in step S67, it is determined that the face can be detected in step S38 of FIG. 5, and it is determined that the face can be detected in step S12 of FIG. 3 and step S21 of FIG. If it is determined in step S70 that there is no face, it is determined that a face cannot be detected in step S39 in FIG. 5, and a face cannot be detected in steps S12 in FIG. 3 and step S21 in FIG.

このように、2つ目の3次元の顔検出処理は、被写体を撮像した1枚のフレーム画像データから算出された被写体の特徴データと、予め記録されている立体顔データから異なる向きから見た被写体の顔の平面画像データを生成していき、該生成された平面画像データから算出された被写体の特徴データと、を比較照合することにより顔を検出するので、顔検出の精度を向上させることができる。
例えば、被写体が犬や猫等の動物であったり、被写体が横を向いている場合であっても検出することができる。
また、1つ目の3次元の顔検出処理のように、撮像された複数のフレーム画像データから被写体の3次元モデルを生成する必要は無いので処理負担を軽減させることができる。
As described above, the second three-dimensional face detection process is viewed from different directions from the subject feature data calculated from one frame image data obtained by imaging the subject and the pre-recorded stereoscopic face data. Since the face is detected by generating the plane image data of the face of the subject and comparing the feature data of the subject calculated from the generated plane image data, the accuracy of face detection is improved. Can do.
For example, even if the subject is an animal such as a dog or a cat, or the subject is facing sideways, it can be detected.
Further, unlike the first three-dimensional face detection process, it is not necessary to generate a three-dimensional model of a subject from a plurality of captured frame image data, so that the processing load can be reduced.

なお、最初は、顔の向きを正面に設定し(ステップS61)、その後、顔が検出されるまで顔の向きを変えて設定するようにしたが(ステップS69)、最初に設定する顔の向きは正面でなくてもよい。要は、顔が検出されるまで異なる向きに設定していくものであればよい。   Initially, the face orientation is set to the front (step S61), and then the face orientation is changed until the face is detected (step S69). May not be the front. In short, it is only necessary to set different orientations until a face is detected.

以上のように第1の実施の形態においては、ユーザによって設定された顔検出モードの種類に応じて、異なる顔検出処理を行うようにしたので、被写体の種類や撮影状況に適した顔検出処理を行うことができ、顔認識の精度を向上させることができる。
さらに、第1の実施の形態においては、ユーザによって設定された顔検出モードの種類に応じて、2次元の顔検出処理を行ったり、3次元の顔検出処理を行うようにしたので、処理負担の大きい3次元の顔検出処理を不必要に行うことがなく、また顔検出の精度を向上させることができる。たとえば、人の顔は平面的なので2次元の顔検出処理を行い、犬等の動物は一般的に立体的な顔なので2次元の顔検出処理では顔を検出することは難しいが、3次元の顔検出を行うことにより、動物の顔も検出することができる。
As described above, in the first embodiment, different face detection processing is performed according to the type of face detection mode set by the user, so that face detection processing suitable for the type of subject and the shooting situation is performed. And the accuracy of face recognition can be improved.
Furthermore, in the first embodiment, the two-dimensional face detection process or the three-dimensional face detection process is performed according to the type of the face detection mode set by the user. The three-dimensional face detection process having a large size is not performed unnecessarily, and the accuracy of face detection can be improved. For example, since a human face is flat, a two-dimensional face detection process is performed, and since an animal such as a dog is generally a three-dimensional face, it is difficult to detect a face by a two-dimensional face detection process. By performing face detection, an animal's face can also be detected.

また、2次元の顔検出処理により人の顔が検出されない場合は、3次元の顔検出処理を行うようにしたので、たとえば、人が横を向いていたり、マスクやサングラス等を装着している場合であっても人の顔を検出することができる。
また、ユーザが顔検出モードを設定するので、検出したい種類の被写体の顔のみを検出することができる。
In addition, when a human face is not detected by the two-dimensional face detection process, the three-dimensional face detection process is performed. For example, the person is facing sideways or wearing a mask or sunglasses. Even in such a case, a human face can be detected.
In addition, since the user sets the face detection mode, only the face of the type of subject to be detected can be detected.

また、被写体追従モードがOnの場合は、設定された顔検出モードの種類に応じて、2次元の顔検出処理や3次元の顔検出処理を行い、該顔が検出されると、2次元的な顔検出処理により該検出された顔を検出していき、追従している顔を見失うと再び、設定された顔検出モードの種類に応じて、2次元の顔検出処理や3次元の顔検出処理を行うので、追従処理の負担を軽減することができると共に、追従処理の精度を向上させることができる。   When the subject tracking mode is On, two-dimensional face detection processing or three-dimensional face detection processing is performed according to the set face detection mode type. If the detected face is detected by a simple face detection process and the face being followed is lost, a two-dimensional face detection process or a three-dimensional face detection is performed again according to the type of the set face detection mode. Since the processing is performed, it is possible to reduce the load of the tracking process and improve the accuracy of the tracking process.

[第2の実施の形態]
次に第2の実施の形態について説明する。
第1の実施の形態においては、ユーザによって選択された顔検出モードの種類に設定するようにしたが、第2の実施の形態においては、自動的に顔検出モードの種類を設定するというものである。
[Second Embodiment]
Next, a second embodiment will be described.
In the first embodiment, the type of the face detection mode selected by the user is set. However, in the second embodiment, the type of the face detection mode is automatically set. is there.

E.デジタルカメラ1の動作
第2の実施の形態も、図1に示したものと同様の構成を有するデジタルカメラ1を用いることにより本発明の撮像装置を実現する。
E. Operation of Digital Camera 1 In the second embodiment, the image pickup apparatus of the present invention is realized by using the digital camera 1 having the same configuration as that shown in FIG.

以下、第2の実施の形態のデジタルカメラ1の動作を図9及び図10のフローチャートにしたがって説明する。
ユーザのモード切替キーの操作により、顔検出静止画撮影モードに設定されると、ステップS101で、CPU10の顔検出モード設定部101は、人用の顔検出モードに設定する。
次いで、ステップS102で、CPU10は、CCD5による撮像を開始して、スルー画像表示を開始させる。
次いで、ステップS103で、CPU10は、被写体追従On/Offキーの操作が行なわれたか否かを判断する。
Hereinafter, the operation of the digital camera 1 according to the second embodiment will be described with reference to the flowcharts of FIGS. 9 and 10.
When the face detection still image shooting mode is set by the user's operation of the mode switching key, the face detection mode setting unit 101 of the CPU 10 sets the human face detection mode in step S101.
Next, in step S102, the CPU 10 starts imaging by the CCD 5 and starts through image display.
Next, in step S103, the CPU 10 determines whether or not the subject tracking On / Off key has been operated.

ステップS103で、被写体追従キーの操作が行われたと判断すると、ステップS104に進み、CPU10は、現在の被写体追従モードがOnであるか否かを判断する。
ステップS104で、現在の被写体追従モードがOnでない、つまり、Offであると判断すると、ステップS105に進み、CPU10は、被写体追従モードをOffからOnに切り替えて、ステップS107に進む。
If it is determined in step S103 that the subject tracking key has been operated, the process proceeds to step S104, and the CPU 10 determines whether or not the current subject tracking mode is On.
If it is determined in step S104 that the current subject tracking mode is not On, that is, it is Off, the process proceeds to step S105, and the CPU 10 switches the subject tracking mode from Off to On and proceeds to step S107.

一方、ステップS104で、現在の被写体追従モードがOnであると判断すると、ステップS106に進み、CPU10は、被写体追従モードをOnからOffに切り替えて、ステップS107に進む。
また、ステップS103で、被写体追従On/Offキーの操作が行なわれていないと判断すると、そのままステップS107に進む。
On the other hand, if it is determined in step S104 that the current subject tracking mode is On, the process proceeds to step S106, and the CPU 10 switches the subject tracking mode from On to Off and proceeds to step S107.
If it is determined in step S103 that the subject tracking On / Off key is not operated, the process directly proceeds to step S107.

ステップS107に進むと、CPU10は、ユーザによってシャッタボタンが半押しされたか否かを判断する。
ステップS107で、シャッタボタンが半押しされていないと判断するとステップS103に戻る。
In step S107, the CPU 10 determines whether or not the shutter button is half-pressed by the user.
If it is determined in step S107 that the shutter button is not half-pressed, the process returns to step S103.

一方、ステップS107で、シャッタボタンが半押しされたと判断すると、ステップS108に進み、CPU10の顔認識部102は、現在設定されている顔検出モードの種類に応じた顔検出処理を行う。
このステップS108の動作は、上記第1の実施の形態で説明した、図3のステップS10の動作、つまり、図5に示す動作と同様の動作を行なう。この顔検出処理により設定された顔検出モードの種類の顔が検出されることになる。ここで、ステップS101で人用の顔検出モードが設定されているので、顔検出処理により人の顔が検出されることになる。
On the other hand, if it is determined in step S107 that the shutter button has been half-pressed, the process proceeds to step S108, where the face recognition unit 102 of the CPU 10 performs face detection processing according to the type of the currently set face detection mode.
The operation in step S108 is the same as the operation in step S10 in FIG. 3 described in the first embodiment, that is, the operation shown in FIG. The face of the face detection mode type set by this face detection process is detected. Here, since the human face detection mode is set in step S101, a human face is detected by the face detection process.

顔検出処理を行うと、ステップS109に進み、CPU10は、ステップS108の顔検出処理より顔を検出することができたか否かを判断する。
ステップS109で、顔を検出することができなかったと判断すると、ステップS110に進み、CPU10は、顔検出モード設定部101により未だ設定されていない顔検出モードがあるか否かを判断する。
When face detection processing is performed, the process proceeds to step S109, and the CPU 10 determines whether or not a face has been detected by the face detection processing in step S108.
If it is determined in step S109 that a face could not be detected, the process proceeds to step S110, and the CPU 10 determines whether there is a face detection mode that has not yet been set by the face detection mode setting unit 101.

ステップS110で、設定されていない顔検出モードがあると判断すると、ステップS111に進み、CPU10の顔検出モード設定部101は、未だ設定されていない種類の顔検出モードに設定して、ステップS108に戻る。
ここでは、まだ人用の顔検出モードしか設定されていないので、動物用の顔検出モード(犬用の顔検出モード、猫用の顔検出モード等のうち何れかの動物用の顔検出モード)が設定されることになる。
If it is determined in step S110 that there is a face detection mode that has not been set, the process proceeds to step S111, where the face detection mode setting unit 101 of the CPU 10 sets a face detection mode of a type that has not yet been set, and the process proceeds to step S108. Return.
Here, since only the face detection mode for humans is set, the face detection mode for animals (the face detection mode for any one of the face detection mode for dogs, the face detection mode for cats, etc.) Will be set.

一方、ステップS109で、顔を検出することができたと判断すると、ステップS112に進み、CPU10は、現在の被写体追従モードがOnであるか否かを判断する。
ステップS112で、被写体追従モードがOnでない、つまり、Offであると判断すると、ステップS113に進み、CPU10は、該検出した顔に対してコントラスト検出方式によるAF処理を行って、ステップS115に進む。
一方、ステップS110で、設定されていない顔検出モードがないと判断すると、ステップS114に進み、CPU10は、所定の領域に対してコントラスト検出方式によるAF処理を行って、ステップS115に進む。
On the other hand, if it is determined in step S109 that the face has been detected, the process proceeds to step S112, and the CPU 10 determines whether or not the current subject tracking mode is On.
If it is determined in step S112 that the subject tracking mode is not On, that is, it is Off, the process proceeds to step S113, and the CPU 10 performs an AF process using the contrast detection method on the detected face, and then proceeds to step S115.
On the other hand, if it is determined in step S110 that there is no face detection mode that has not been set, the process proceeds to step S114, and the CPU 10 performs an AF process using a contrast detection method on a predetermined area, and then proceeds to step S115.

ステップS115に進むと、CPU10は、ユーザによってシャッタボタンが全押しされたか否かを判断する。
ステップS115で、シャッタボタンが全押しされていないと判断すると、全押しされるまでステップS115に留まり、シャッタボタンが全押しされたと判断すると、ステップS116に進み、CPU10は、静止画撮影処理を行い、該撮影処理により得られた静止画像データを圧縮してフラッシュメモリ14に記録する処理を行う。
In step S115, the CPU 10 determines whether or not the shutter button has been fully pressed by the user.
If it is determined in step S115 that the shutter button is not fully pressed, the process stays in step S115 until the shutter button is fully pressed. If it is determined that the shutter button is fully pressed, the process proceeds to step S116, and the CPU 10 performs still image shooting processing. Then, a process of compressing the still image data obtained by the photographing process and recording it in the flash memory 14 is performed.

また、ステップS112で、被写体追従モードがOnであると判断すると、図10のステップS121に進み、CPU10の顔認識部102は、該検出された顔を2次元的に検出していくことにより、該検出された顔に対して追従していく追従処理を開始する。こで、2次元的に顔を検出するとは、2次元のデータのみを用いて顔検出することを指し、このステップS121での、2次元的に顔を検出する処理は、ブロックマッチング法などを用いて該検出された顔を検出していく。   If it is determined in step S112 that the subject tracking mode is On, the process proceeds to step S121 in FIG. 10, and the face recognition unit 102 of the CPU 10 detects the detected face two-dimensionally. A follow-up process for following the detected face is started. Here, detecting a face two-dimensionally means detecting a face using only two-dimensional data, and the process of detecting a face two-dimensionally in this step S121 uses a block matching method or the like. The detected face is used for detection.

次いで、ステップS122で、CPU10は、ユーザによってシャッタボタンが全押しされたか否かを判断する。
ステップS122で、シャッタボタンが全押しされていないと判断すると、ステップS123に進み、CPU10は、該追従している顔を見失ったか否かを判断する。つまり、ステップS121の2次元的に顔を検出する処理により顔を検出することができなくなったか否かを判断する。
Next, in step S122, the CPU 10 determines whether or not the shutter button has been fully pressed by the user.
If it is determined in step S122 that the shutter button has not been fully pressed, the process proceeds to step S123, and the CPU 10 determines whether or not the face being followed has been lost. That is, it is determined whether the face cannot be detected by the two-dimensional face detection process in step S121.

ステップS123で、顔を見失っていないと判断するとステップS122に戻り、ステップS123で、顔を見失ったと判断すると、図9のステップS108に戻る。これにより、顔を見失った場合は再び現在設定されている顔検出モードの種類に応じた顔検出処理を行うことになる。   If it is determined in step S123 that the face is not lost, the process returns to step S122. If it is determined in step S123 that the face is lost, the process returns to step S108 in FIG. As a result, when the face is lost, face detection processing corresponding to the type of the currently set face detection mode is performed again.

一方、ステップS122で、シャッタボタンが全押しされたと判断すると、ステップS124に進み、CPU10は、該追従している顔に対してコントラスト検出方式によるAF処理を行う。つまり、シャッタボタンが全押しされた直前に2次元的に検出された顔に対してAF処理を行う。
次いで、ステップS125で、CPU10は、静止画撮影処理を行い、該撮影処理により得られた静止画像データを圧縮してフラッシュメモリ14に記録する処理を行う。
On the other hand, if it is determined in step S122 that the shutter button has been fully pressed, the process proceeds to step S124, and the CPU 10 performs an AF process using the contrast detection method on the following face. That is, AF processing is performed on a face that is two-dimensionally detected immediately before the shutter button is fully pressed.
Next, in step S <b> 125, the CPU 10 performs still image shooting processing, and performs processing for compressing still image data obtained by the shooting processing and recording it in the flash memory 14.

以上のように、第2の実施の形態においては、自動的に顔検出モードを設定するので、ユーザの手間が省ける。また、撮影したい被写体の種類が具体的にわからない場合(例えば、猫なのか狐なのかわからない場合)であっても、該被写体の顔を検出することができ、顔検出の精度を向上させることができる。
また、設定された顔検出モードの種類に応じて、2次元の顔検出処理を行ったり、3次元の顔検出処理を行うようにしたので、処理負担の大きい3次元の顔検出処理を不必要に行うことがなく、また顔検出の精度を向上させることができる。たとえば、人の顔は平面的なので2次元の顔検出処理を行い、犬等の動物は一般的に立体的な顔なので2次元の顔検出処理では顔を検出することは難しいが、3次元の顔検出を行うことにより、動物の顔も検出することができる。
As described above, in the second embodiment, since the face detection mode is automatically set, the user's trouble can be saved. Further, even when the type of subject to be photographed is not specifically known (for example, when it is not known whether the subject is a cat or not), the face of the subject can be detected, and the accuracy of face detection can be improved. it can.
Further, since the two-dimensional face detection process or the three-dimensional face detection process is performed according to the set face detection mode type, the three-dimensional face detection process with a large processing load is unnecessary. Therefore, the accuracy of face detection can be improved. For example, since a human face is flat, a two-dimensional face detection process is performed, and since an animal such as a dog is generally a three-dimensional face, it is difficult to detect a face by a two-dimensional face detection process. By performing face detection, an animal's face can also be detected.

また、2次元の顔検出処理により人の顔が検出されない場合は、3次元の顔検出処理を行うようにしたので、たとえば、人が横を向いていたり、マスクやサングラス等を装着している場合であっても人の顔を検出することができる。   In addition, when a human face is not detected by the two-dimensional face detection process, the three-dimensional face detection process is performed. For example, the person is facing sideways or wearing a mask or sunglasses. Even in such a case, a human face can be detected.

また、被写体追従モードがOnの場合は、設定された検出モードの種類に応じて、2次元の顔検出処理や3次元の顔検出処理を行い、該顔が検出されると、2次元的な顔検出処理により該検出された顔を検出していき、追従している顔を見失うと再び、設定された検出モードの種類に応じて、2次元の顔検出処理や3次元の顔検出処理を行うので、追従処理の負担を軽減することができると共に、追従処理の精度を向上させることができる。   Further, when the subject tracking mode is On, a two-dimensional face detection process or a three-dimensional face detection process is performed according to the set detection mode type. If the detected face is detected by the face detection process and the face being followed is lost, a two-dimensional face detection process or a three-dimensional face detection process is performed again according to the set detection mode type. As a result, the burden of the tracking process can be reduced, and the accuracy of the tracking process can be improved.

なお、顔検出静止画撮影モードに設定すると、最初に人用の顔検出モードを設定するようにしたが(ステップS101)、他の種類(動物の種類)の顔検出モードに設定するようにしてもよい。
また、最初はユーザが任意の種類の顔検出モードを設定し、該設定した顔検出モードの種類の顔が検出されない場合に、自動的に設定されていない種類の顔検出モードに設定するようにしてもよい。
When the face detection still image shooting mode is set, the human face detection mode is set first (step S101), but the face detection mode is set to another type (animal type). Also good.
In addition, when a user sets an arbitrary type of face detection mode at first and a face of the set face detection mode is not detected, the face detection mode is not automatically set. May be.

[第3の実施の形態]
次に第3の実施の形態について説明する。
上記第1、2の実施の形態においては、単に顔を検出するというものであったが、第3の実施の形態においては、顔検出を、撮影された顔が誰であるか?何であるか具体的に識別する顔識別の場合に適用するというものである。
顔検出処理では、たとえば、人の顔であっても具体的に誰の顔であるかを識別することはできず、また、動物、たとえば、猫の顔であっても、ペルシャ猫、三毛猫等、猫の種類は様々であり、また、同じ種類の猫であっても猫毎に微妙に顔が異なる場合もある。したがって、顔検出では、自分の友達や子供のみ、自分が飼っているペットのみを検出して欲しいのに(たとえば、フォーカス対象としたいのに)、他の人や動物の顔まで検出されてしまうからである。
[Third Embodiment]
Next, a third embodiment will be described.
In the first and second embodiments, the face is simply detected. In the third embodiment, who is the photographed face in the face detection? This method is applied to the case of face identification that specifically identifies what is.
In the face detection process, for example, it is not possible to identify the face of a person even if it is a person's face, and even if it is an animal, for example, the face of a cat, a Persian cat, a calico There are various types of cats such as cats, and even a cat of the same type may have a slightly different face. Therefore, in face detection, I want to detect only my friends and children, and only my pets (for example, I want to focus), but it also detects faces of other people and animals Because.

この顔識別は、予め記録されている人物の顔、動物の顔が撮像されたフレーム画像データの中にあるかを識別することになる。
この人物や動物の顔は、登録モード等においてユーザが任意の人物、任意の種類の動物の顔を登録することができる。立体顔データ(3次元の顔データ)を登録する場合は、登録したい顔を異なる角度から複数撮影し、該撮影された複数のフレーム画像データから3次元モデルを生成して登録する。また、2次元の顔データを登録する場合は、登録したい顔を撮影し、該撮影されたフレーム画像データから該顔の特徴データ(顔特徴データ)を算出して登録する。
In this face identification, it is identified whether the face of a person and the face of an animal recorded in advance are in the captured frame image data.
As for the face of the person or animal, the user can register the face of any person or any kind of animal in the registration mode or the like. When registering three-dimensional face data (three-dimensional face data), a plurality of faces to be registered are photographed from different angles, and a three-dimensional model is generated and registered from the plurality of photographed frame image data. When registering two-dimensional face data, the face to be registered is photographed, and the feature data (face feature data) of the face is calculated and registered from the photographed frame image data.

ここで、登録される立体顔データや2次元の顔データは、人や犬、猫等の種類の顔であることが大まかに識別できる程度の情報量ではなく、誰であるか等具体的に識別できる程度の情報量が必要である。この登録により、被写体の種類毎に図2に示すような顔識別用の顔データテーブルが作成される。ここでも、図2と同様に、人の顔データは2次元と3次元の両方が登録されており、動物の顔データは3次元のみが登録されているものとする。なお、顔識別用の顔データテーブルには、被写体の種類毎に複数の顔データが登録可能である。たとえば、複数人の2次元の顔データ、立体顔データを記録することができるし、複数匹の猫の立体顔データを記録することも可能である。   Here, the registered three-dimensional face data and two-dimensional face data are not the amount of information that can roughly identify the type of face such as a person, a dog, or a cat. An amount of information that can be identified is necessary. By this registration, a face data table for face identification as shown in FIG. 2 is created for each type of subject. Here, as in FIG. 2, it is assumed that both two-dimensional and three-dimensional human face data are registered, and only three-dimensional animal face data is registered. In the face data table for face identification, a plurality of face data can be registered for each type of subject. For example, two-dimensional face data and three-dimensional face data of a plurality of persons can be recorded, and three-dimensional face data of a plurality of cats can be recorded.

この顔検出処理の動作を顔識別処理に適用した場合の動作は、上記各実施の形態で説明した動作とほぼ同じであるが異なる点だけを説明する。
まず、ここでは、顔検出モードに代えて顔識別モードを備え、この顔識別モードも顔検出モードと同様に、被写体の種類毎にある。たとえば、人用の顔識別モード、犬用の顔識別モード、猫用の顔識別モードといった具合である。
The operation when this face detection processing operation is applied to the face identification processing is substantially the same as the operation described in each of the above embodiments, but only the differences will be described.
First, here, a face identification mode is provided instead of the face detection mode, and this face identification mode is provided for each type of subject as in the face detection mode. For example, the face identification mode for humans, the face identification mode for dogs, and the face identification mode for cats.

F.顔識別静止画撮影モードの動作について
F−1.図3及び図4に示す顔検出静止画撮影モードの動作を、顔識別静止画撮影モードに適用したときの動作について
このときの顔識別静止画撮影モードの動作を、図3及び図4を引用し、異なる部分だけを説明する。
F. Operation in face identification still image shooting mode F-1. Operation when the face detection still image shooting mode operation shown in FIGS. 3 and 4 is applied to the face identification still image shooting mode The operation of the face identification still image shooting mode at this time is cited with reference to FIGS. Only the different parts will be explained.

まず、図3のステップS1は複数種類の顔識別モードを一覧表示させ、ステップS2で、顔識別モードが選択されたと判断すると、ステップS3で、該選択された顔識別モードに設定する。また、ステップS10は、設定されている顔識別モードに応じた顔識別処理を行い、ステップS12は、顔が識別できたか否かを判断し、顔が識別できたと判断すると、ステップS13で、該識別した顔に対してAF処理を行い、顔が識別できていないと判断すると、ステップS14で所定の領域に対してAF処理を行う。この設定されている顔識別モードに応じた顔識別処理は後で説明する。   First, step S1 in FIG. 3 displays a list of a plurality of types of face identification modes. If it is determined in step S2 that the face identification mode is selected, the selected face identification mode is set in step S3. Step S10 performs face identification processing according to the set face identification mode. Step S12 determines whether or not the face has been identified. If it is determined that the face has been identified, step S13 AF processing is performed on the identified face, and if it is determined that the face cannot be identified, AF processing is performed on a predetermined area in step S14. The face identification process according to the set face identification mode will be described later.

なお、顔識別処理により顔も検出することできるようにする場合は、ステップS12で、顔が識別できないと判断した場合であって、顔が検出されたと判断した場合は、該検出された顔に対してAF処理を行い、顔も検出できていないと判断された場合は、ステップS14に進み、所定の領域に対してAF処理を行うようにしてもよい。この顔識別処理による顔検出は後で説明する。   If the face can be detected by the face identification process, it is determined in step S12 that the face cannot be identified, and if it is determined that the face has been detected, the detected face is changed to the detected face. On the other hand, if it is determined that the AF process is performed and the face cannot be detected, the process may proceed to step S14 to perform the AF process on a predetermined area. Face detection by this face identification process will be described later.

また、ステップS21は、顔が識別できたか否かを判断し、顔が識別できない場合はステップS23に進み、顔が識別できた場合は、ステップS22に進み、該識別された顔に対して追従処理を開始して、ステップS23に進む。この追従処理は上記第1の実施の形態で説明したように、該識別された顔を2次元的に検出していくことにより、該検出された顔に対して追従していく。   In step S21, it is determined whether or not the face can be identified. If the face cannot be identified, the process proceeds to step S23. If the face can be identified, the process proceeds to step S22 and follows the identified face. The process is started and the process proceeds to step S23. As described in the first embodiment, this follow-up process follows the detected face by detecting the identified face two-dimensionally.

F−2.図9及び図10に示す顔検出静止画撮影モードの動作を、顔識別静止画撮影モードに適用したときの動作について
このときの顔識別静止画撮影モードの動作を、図9及び図10を引用し、異なる部分だけを説明する。
F-2. Operation when the face detection still image shooting mode operation shown in FIGS. 9 and 10 is applied to the face identification still image shooting mode The operation of the face identification still image shooting mode at this time is cited with reference to FIGS. Only the different parts will be explained.

図9のステップS101は、人用の顔識別モードに設定する。また、ステップS108は、設定されている顔識別モードに応じた顔識別処理を行い、ステップS109は、顔が識別できたか否かを判断する。ステップS109で、顔が識別できていないと判断すると、ステップS110で、設定されていない顔識別モードがあるか否かを判断する。ステップS110で、設定されていない顔識別モードがあると判断すると、ステップS111で、設定されていない種類の顔識別モードに設定してステップS108に戻る。また、ステップS109で、顔が識別できたと判断し、ステップS112で被写体追従モードがOnでないと判断すると、ステップS113で、該顔識別した顔に対してAF処理を行い、一方、ステップS110で、設定されていない顔識別モードがないと判断すると、ステップS114で所定の領域に対してAF処理を行う。この設定されている顔識別モードに応じた顔識別処理は後で説明する。   Step S101 in FIG. 9 sets the human face identification mode. Further, step S108 performs face identification processing according to the set face identification mode, and step S109 determines whether or not a face has been identified. If it is determined in step S109 that the face cannot be identified, it is determined in step S110 whether there is a face identification mode that is not set. If it is determined in step S110 that there is a face identification mode that is not set, in step S111, the face identification mode is set to a type that is not set, and the process returns to step S108. If it is determined in step S109 that the face has been identified and it is determined in step S112 that the subject tracking mode is not On, AF processing is performed on the face identified in step S113, while in step S110, If it is determined that there is no face identification mode that has not been set, AF processing is performed on a predetermined area in step S114. The face identification process according to the set face identification mode will be described later.

なお、顔識別処理により顔も検出することできるようにする場合は、ステップS110で、設定されていない顔識別モードがないと判断した場合は、顔が検出されたか否かを判断し、顔が検出された場合は該検出された顔に対してAF処理を行い、顔も検出できていないと判断された場合は、ステップS114に進み、所定の領域に対してAF処理を行うようにしてもよい。この顔識別処理による顔検出は後で説明する。   If it is determined that there is no face identification mode that is not set in step S110, it is determined whether or not a face has been detected. If it is detected, AF processing is performed on the detected face. If it is determined that no face is detected, the process proceeds to step S114, and AF processing is performed on a predetermined area. Good. Face detection by this face identification process will be described later.

また、ステップS112で被写体追従がOnであると判断して、図10のステップS121に進むと、該識別された顔に対して追従処理を開始する。この追従処理は上記第1の実施の形態で説明したように、該識別された顔を2次元的に検出していくことにより、該検出された顔に対して追従していく。   If it is determined in step S112 that the subject tracking is On and the process proceeds to step S121 in FIG. 10, a tracking process is started for the identified face. As described in the first embodiment, this follow-up process follows the detected face by detecting the identified face two-dimensionally.

G.設定されている顔識別モードに応じた顔識別処理の動作について
G−1.図5に示す設定されている顔検出モードに応じた顔検出処理の動作を、設定されている顔識別モードに応じた顔識別処理に適用したときの動作について
このときの顔識別処理の動作を、図5を引用し、異なる部分だけを説明する。
まず、図5のステップS31は、人用の顔識別モードが設定されているか否かを判断し、人用の顔識別モードが設定されていると判断すると、ステップS32に進み、2次元の顔識別処理により人の顔を検出する。この2次元の顔識別処理は、撮像されたフレーム画像データから2次元の全被写体の特徴データを算出し、該算出した被写体の特徴データと、顔識別用の顔データテーブルに登録されている人の2次元の顔データとを比較照合することにより、撮像されたフレーム画像データ内に登録されている人物の顔があるか顔識別する。
G. Regarding the operation of face identification processing according to the set face identification mode G-1. About the operation when the face detection processing operation according to the set face detection mode shown in FIG. 5 is applied to the face identification processing according to the set face identification mode The operation of the face identification processing at this time is Referring to FIG. 5, only the different parts will be described.
First, in step S31 in FIG. 5, it is determined whether or not the human face identification mode is set. If it is determined that the human face identification mode is set, the process proceeds to step S32, and the two-dimensional face is determined. A human face is detected by the identification process. In this two-dimensional face identification process, feature data of all two-dimensional subjects is calculated from the captured frame image data, and the subject feature data calculated and the person registered in the face data table for face identification are calculated. The two-dimensional face data is compared and collated to identify whether there is a person's face registered in the captured frame image data.

そして、ステップS33で、2次元の顔識別処理により登録されている人物の顔が識別されたか否かを判断する。ステップS33で顔を識別することができたと判断すると、ステップS38に進み、顔が識別できたと判断する。一方、ステップS33で顔が識別できないと判断した場合、ステップS31で人用の顔識別モードが設定されていないと判断した場合は、ステップS36に進み、全領域に基づいて3次元の顔識別処理により現在設定されている顔識別モードの種類の顔を顔識別する処理を行って、ステップS37に進む。   In step S33, it is determined whether or not the registered human face has been identified by the two-dimensional face identification process. If it is determined in step S33 that the face has been identified, the process proceeds to step S38, and it is determined that the face has been identified. On the other hand, if it is determined in step S33 that the face cannot be identified, or if it is determined in step S31 that the human face identification mode is not set, the process proceeds to step S36, and a three-dimensional face identification process is performed based on the entire region. Thus, the face identification mode currently set is performed, and the process proceeds to step S37.

そして、ステップS37では3次元の顔識別処理により登録された顔があるか、つまり、3次元の顔識別により顔識別できたか否かを判断する。ステップS37で登録された顔があると判断するとステップS38で顔識別することができたと判断し、ステップS37で登録された顔がないと判断するとステップS39で顔識別することができないと判断する。
このステップS38で顔識別できたと判断すると、図3のステップS12、図4のステップS21、図9のステップS109で顔識別できたと判断し、ステップS39で顔識別することができないと判断するとステップS12、ステップS21、ステップS109で顔識別することができないと判断する。
このときは、図5のステップS34、ステップS35は不要ということになる。
In step S37, it is determined whether there is a face registered by the three-dimensional face identification process, that is, whether the face can be identified by the three-dimensional face identification. If it is determined in step S37 that there is a registered face, it is determined in step S38 that the face can be identified. If it is determined in step S37 that there is no registered face, it is determined in step S39 that the face cannot be identified.
If it is determined that the face can be identified in step S38, it is determined that the face can be identified in step S12 in FIG. 3, step S21 in FIG. 4, and step S109 in FIG. 9, and if it is determined in step S39 that the face cannot be identified, step S12. In step S21 and step S109, it is determined that the face cannot be identified.
In this case, step S34 and step S35 in FIG. 5 are not necessary.

G−2.他の方法による設定されている顔識別モードに応じた顔識別処理の動作について
このときの顔識別処理の動作を、図11のフローチャートにしたがって説明する。なお、この場合は、顔識別用の顔データテーブルの他に、顔検出用の人の2次元の顔データがメモリ12に記録されている。
図3のステップS10、図9のステップS108に進むと、図11のステップS151に進み、CPU10の顔認識部102は、現在人用の顔識別モードが設定されている否かを判断する。
G-2. Operation of face identification processing according to the face identification mode set by another method The operation of face identification processing at this time will be described with reference to the flowchart of FIG. In this case, in addition to the face data table for face identification, two-dimensional face data of a person for face detection is recorded in the memory 12.
When the process proceeds to step S10 in FIG. 3 and step S108 in FIG. 9, the process proceeds to step S151 in FIG. 11, and the face recognition unit 102 of the CPU 10 determines whether or not the face identification mode for humans is currently set.

ステップS151で、人用の顔識別モードが設定されている判断すると、ステップS152に進み、CPU10の顔認識部102は、撮像されたフレーム画像データの全領域に基づいて2次元の顔検出処理により人の顔を検出する。
ここでの、2次元の顔検出処理は、撮像されたフレーム画像データから被写体の2次元の特徴データ(全被写体の2次元の特徴データ)を算出し、該算出した被写体の特徴データと、メモリ12に記録されている顔検出用の人の2次元の顔データとを比較照合することにより、画像内にある人の顔を検出する。ここで、記録されている顔検出用の顔特徴データは、人の顔であることが検出できれば十分なので、具体的に誰の顔であるかを識別できる程度の情報量は必要ない。また、算出される全被写体の特徴データも同様に、人の顔を検出するのに必要な情報量でよい。
If it is determined in step S151 that the human face identification mode is set, the process proceeds to step S152, where the face recognition unit 102 of the CPU 10 performs two-dimensional face detection processing based on the entire area of the captured frame image data. Detect human faces.
In this two-dimensional face detection process, two-dimensional feature data of the subject (two-dimensional feature data of all subjects) is calculated from the captured frame image data, and the calculated feature data of the subject and the memory The face of the person in the image is detected by comparing and collating the two-dimensional face data of the person for face detection recorded in FIG. Here, it is sufficient that the recorded face feature data for face detection can be detected as a human face, and therefore it is not necessary to have an amount of information that can specifically identify who the face is. Similarly, the calculated feature data of all subjects may be the amount of information necessary to detect a human face.

ステップS153で、CPU10の顔認識部102は、画像内に人の顔があるか否かを判断する。つまり、2次元の顔検出処理により人の顔を検出することができたか否かを判断する。即ち、算出した全被写体の特徴データの中に、顔データと所定値以上で(所定の範囲内で)一致する部分があるか否かを判断する。   In step S153, the face recognition unit 102 of the CPU 10 determines whether there is a human face in the image. That is, it is determined whether or not a human face can be detected by the two-dimensional face detection process. That is, it is determined whether or not the calculated feature data of all subjects includes a portion that matches the face data at a predetermined value or more (within a predetermined range).

ステップS153で、人の顔があると判断すると、ステップS154に進み、CPU10の顔認識部102は、該検出された顔領域に基づいて2次元の顔識別処理を行う。つまり、撮像されたフレーム画像データのうち、該検出された顔領域の画像データから被写体の2次元の特徴データ(顔特徴データ)を算出し、該算出した顔特徴データと、顔識別用の顔データテーブルに登録されている人の2次元の顔データとを比較照合することにより、該登録されている人物であるかを顔識別する。なお、この登録されている人物の顔データは、人の顔であることが大まかに識別できる程度の情報量ではなく、具体的に誰の顔であるかを識別できる程度の情報量であることはもちろんのこと、算出される被写体の特徴データ(顔特徴データ)も誰の顔であるか具体的に識別できる程度の情報量である。
この検出された顔領域に基いて2次元の顔識別処理を行うので、処理負担を軽減させることができるとともに、顔識別の精度を向上させることができる。
If it is determined in step S153 that there is a human face, the process proceeds to step S154, and the face recognition unit 102 of the CPU 10 performs a two-dimensional face identification process based on the detected face area. That is, of the captured frame image data, two-dimensional feature data (face feature data) of the subject is calculated from the image data of the detected face region, and the calculated face feature data and the face for face identification are calculated. By comparing and collating with the two-dimensional face data of a person registered in the data table, it is identified whether the person is a registered person. The registered face data of a person is not the amount of information that can roughly identify a person's face, but the amount of information that can be used to specifically identify who the face is. Needless to say, the calculated feature data (face feature data) of the subject is an amount of information that can specifically identify the face of the subject.
Since the two-dimensional face identification process is performed based on the detected face area, the processing burden can be reduced and the accuracy of the face identification can be improved.

次いで、ステップS155で、CPU10の顔認識部102は、登録された顔があるか否かを判断する。つまり、2次元の顔識別処理により登録されている人物の顔が識別できたか否かを判断する。
ステップS155で、登録された顔があると判断すると、ステップS161に進み、CPU10の顔認識部102は、顔を識別することができたと判断する。
一方、ステップS155で、登録された顔がないと判断すると、ステップS156に進み、顔認識部102は、該検出された顔領域に基づいて、3次元の顔識別処理により人の顔を識別する処理を行って、ステップS160に進む。この3次元の顔識別処理は後で説明する。
この検出された顔領域に基いて3次元の顔識別処理を行うので、処理負担を軽減させることができるとともに、顔識別の精度を向上させることができる。
Next, in step S155, the face recognition unit 102 of the CPU 10 determines whether there is a registered face. That is, it is determined whether or not the registered person's face can be identified by the two-dimensional face identification process.
If it is determined in step S155 that there is a registered face, the process proceeds to step S161, and the face recognition unit 102 of the CPU 10 determines that the face has been identified.
On the other hand, if it is determined in step S155 that there is no registered face, the process proceeds to step S156, where the face recognition unit 102 identifies a human face by three-dimensional face identification processing based on the detected face area. Processing is performed, and the process proceeds to step S160. This three-dimensional face identification process will be described later.
Since the three-dimensional face identification process is performed based on the detected face area, the processing burden can be reduced and the accuracy of the face identification can be improved.

一方、ステップS153で、人の顔がないと判断すると、ステップS157に進み、顔らしきものがあるか否かを判断する。この顔らしきものとは、上記第1の実施の形態で説明したように、ステップS152の2次元の顔検出処理による全被写体の特徴データと、人の2次元の顔データとの比較照合により、口と鼻はあるが片目、若しくは両目が検出されなかったり(人が横を向いている場合、サングラスをしている場合)、目があるが鼻と口が検出されなかったり場合(マスクをしている場合)のことである。つまり、顔データに基づく顔のパーツが一部検出されなかった場合のことである。   On the other hand, if it is determined in step S153 that there is no human face, the process proceeds to step S157, and it is determined whether or not there is something that looks like a face. As described in the first embodiment, this face-like object is obtained by comparing and comparing the feature data of all subjects by the two-dimensional face detection processing in step S152 and the two-dimensional face data of a person. If there is a mouth and nose but one or both eyes are not detected (if a person is looking sideways or wearing sunglasses), or if there is an eye but the nose and mouth are not detected (masked) If you are). In other words, this is a case where some face parts based on the face data are not detected.

ステップS157で、顔らしきものがあると判断すると、ステップS158に進み、CPU10の顔認識部102は、該検出された顔らしきものがある領域に基づいて3次元の顔識別処理により人の顔を識別する処理を行って、ステップS160に進む。顔らしき領域に基いて3次元の顔識別処理を行うので処理負担を軽減することができ、顔識別の精度を向上させることができる。この3次元の顔識別処理については後で説明する。
一方、ステップS157で、顔らしきものがないと判断した場合、ステップS151で人用の顔識別モードが設定されていないと判断した場合は、ステップS159に進み、フレーム画像データの全領域に基づいて3次元の顔識別処理により現在設定されている顔識別モードの種類の顔を識別する処理を行って、ステップS160に進む。この3次元の顔識別処理については後で説明する。
If it is determined in step S157 that there is something that looks like a face, the process proceeds to step S158, where the face recognition unit 102 of the CPU 10 identifies a human face by three-dimensional face identification processing based on the detected area that seems to be a face. The identification process is performed, and the process proceeds to step S160. Since the three-dimensional face identification process is performed based on the face-like area, the processing load can be reduced and the accuracy of the face identification can be improved. This three-dimensional face identification process will be described later.
On the other hand, if it is determined in step S157 that there is no face-like object, or if it is determined in step S151 that the human face identification mode is not set, the process proceeds to step S159, and based on the entire area of the frame image data. The process of identifying the face of the currently set face identification mode type is performed by the three-dimensional face identification process, and the process proceeds to step S160. This three-dimensional face identification process will be described later.

ステップS160に進むと、CPU10の顔認識部102は、登録された顔があるか否かを判断する。つまり、3次元の顔識別処理により登録されている人物の顔が識別できたか否かを判断する。
ステップS160で、登録された顔があると判断すると、ステップS161で、顔を識別することができたと判断し、ステップS160で、登録された顔がないと判断すると、ステップS162で、顔を識別することができないと判断する。
このステップS161で顔識別できたと判断すると図3のステップS12、図4のステップS21、図9のステップS109で顔識別できたと判断し、ステップS162で顔識別することができないと判断するとステップS12、ステップS21、ステップS109で顔識別することができないと判断する。
In step S160, the face recognition unit 102 of the CPU 10 determines whether there is a registered face. That is, it is determined whether or not the registered person's face can be identified by the three-dimensional face identification process.
If it is determined in step S160 that there is a registered face, it is determined in step S161 that the face can be identified. If it is determined in step S160 that there is no registered face, the face is identified in step S162. Judge that you can not.
If it is determined in step S161 that the face is identified, step S12 in FIG. 3, step S21 in FIG. 4, step S109 in FIG. In step S21 and step S109, it is determined that the face cannot be identified.

なお、図11では、人用の顔識別モードが設定されている場合は、2次元の顔検出処理と2次元の顔識別処理との両方を行うようにしたが、顔識別処理により人の顔を検出することができるようにする場合は、2次元の顔検出処理を行わずに、2次元の顔識別処理のみを行うようにしてもよい。この場合は、ステップS151で人用の顔識別モードが設定されていると判断すると、ステップS154に進み、全領域に基づいて2次元の顔識別処理を行って、ステップS155に進む。ステップS155で、登録された顔がないと判断すると、顔を検出することができたか否かを判断する。2次元の顔識別処理により顔を検出することができたと判断すると、ステップS156に進み、顔を検出することができないと判断すると、ステップS157に進む。この場合は、ステップS152、ステップS153の動作は不要ということになる。   In FIG. 11, when the human face identification mode is set, both the two-dimensional face detection process and the two-dimensional face identification process are performed. May be detected, only the two-dimensional face identification process may be performed without performing the two-dimensional face detection process. In this case, if it is determined in step S151 that the human face identification mode is set, the process proceeds to step S154, a two-dimensional face identification process is performed based on the entire area, and the process proceeds to step S155. If it is determined in step S155 that there is no registered face, it is determined whether or not a face has been detected. If it is determined that the face can be detected by the two-dimensional face identification process, the process proceeds to step S156. If it is determined that the face cannot be detected, the process proceeds to step S157. In this case, the operations in steps S152 and S153 are not necessary.

また、この2次元の顔識別処理による顔検出は、登録されている顔がフレーム画像データ内にあると識別された場合は、当然に顔も検出されていることになり、また、たとえ登録されている顔がフレーム画像データ内にないと判断された場合であっても、全被写体の2次元の特徴データと登録されている人の2次元の顔データとの比較照合の結果により、登録されている人物の顔ではないが人の顔であることを検出することは可能であるからである。例えば、人の2次元の顔データと第1の所定値以上で一致する部分がある場合は、該顔データに対応する人物の顔であると識別し、第1の所定値以上で一致しないが、第2の所定値(第1の所定値より小さい値)以上で一致する場合は人の顔であると検出する。
なお、3次元の顔識別処理による顔検出は後で説明する。
Further, in the face detection by the two-dimensional face identification process, when the registered face is identified as being in the frame image data, the face is naturally detected, and even if the registered face is registered. Even if it is determined that the face is not included in the frame image data, the registered face is registered based on the result of comparison and matching between the two-dimensional feature data of all subjects and the registered two-dimensional face data of the person. This is because it is possible to detect that the face of the person is not the face of the person. For example, if there is a portion that matches the human two-dimensional face data at a first predetermined value or more, the face is identified as a person corresponding to the face data, and does not match at the first predetermined value or more. If the values coincide with each other at a second predetermined value (a value smaller than the first predetermined value) or more, the face is detected.
Note that face detection by three-dimensional face identification processing will be described later.

H.3次元の顔識別処理の動作について
H−1.図6に示す3次元の顔検出処理の動作を、3次元の顔識別処理に適用したときの動作について
このときの3次元の顔識別処理の動作を、図6を引用し、異なる部分だけを説明する。
まず、ステップS53では、撮像された複数枚のフレーム画像データから被写体の特徴データをそれぞれ算出する。このときに算出される被写体の特徴データは、人や犬、猫等の種類の顔であることが大まかに識別できる程度の情報量ではなく、誰であるか等具体的に識別できる程度の情報量を有している。
H. Operation of 3D face identification processing H-1. About the operation when the operation of the three-dimensional face detection process shown in FIG. 6 is applied to the three-dimensional face identification process The operation of the three-dimensional face identification process at this time is shown in FIG. explain.
First, in step S53, subject feature data is calculated from a plurality of captured frame image data. The feature data of the subject calculated at this time is not the amount of information that can roughly identify whether it is a face of a person, a dog, or a cat, but information that can be specifically identified such as who it is Have quantity.

このとき、図5を顔識別処理に適用したときの図5のステップS36、図11のステップS159での3次元の顔識別処理の場合は、撮像されたフレーム画像データの全領域に基づいて被写体の2次元の特徴データ(全被写体の特徴データ)を算出する。
また、図11のステップS156の3次元の顔識別処理の場合は、撮像された各フレーム画像データの検出された顔領域の画像データから被写体の2次元の特徴データ(2次元の顔特徴データ)を算出する。ここで顔特徴データとは、検出された顔領域内で撮像されている全ての被写体の特徴データに基づいて数値化されたデータである。
また、図11のステップS158の3次元の顔識別処理の場合は、撮像された各フレーム画像データの顔らしきものがあると判断された領域の画像データから被写体の2次元の特徴データ(顔らしき被写体の2次元の特徴データ)を算出する。
At this time, in the case of the three-dimensional face identification process in step S36 in FIG. 5 and step S159 in FIG. 11 when FIG. 5 is applied to the face identification process, the subject is based on the entire area of the captured frame image data. 2D feature data (feature data of all subjects) is calculated.
In the case of the three-dimensional face identification process in step S156 of FIG. 11, the two-dimensional feature data (two-dimensional face feature data) of the subject is obtained from the image data of the detected face area of each captured frame image data. Is calculated. Here, the face feature data is data digitized based on the feature data of all the subjects imaged in the detected face area.
Further, in the case of the three-dimensional face identification process in step S158 in FIG. 11, the two-dimensional feature data of the subject (like the face) is obtained from the image data of the area where it is determined that there is a face-like thing in each captured frame image data. 2D feature data of the subject) is calculated.

そして、ステップS55では、ステップS54で各フレーム画像データの被写体特徴データから生成された被写体の3次元モデルと、顔識別用の顔データテーブルに登録されている、現在設定されている顔識別モードの種類の立体顔データとを比較照合する。
そして、ステップS56で、所定値以上で一致する部分があるか否かを判断し、所定値以上で一致する部分がある場合は、ステップS57で、該所定値以上で一致する部分に登録された顔があると判断し、顔領域を検出する。一方、ステップS56で、所定値以上で一致する部分がないと判断すると、ステップS58に進み、登録されている顔がないと判断する。
In step S55, the three-dimensional model of the subject generated from the subject feature data of each frame image data in step S54 and the currently set face identification mode registered in the face data table for face identification. Compare and collate with 3D face data.
Then, in step S56, it is determined whether or not there is a matching part with a predetermined value or more. If there is a matching part with a predetermined value or more, it is registered as a matching part with the predetermined value or more in step S57. It is determined that there is a face, and a face area is detected. On the other hand, if it is determined in step S56 that there is no matching part with a predetermined value or more, the process proceeds to step S58, and it is determined that there is no registered face.

このステップS57で顔領域を検出すると、図5のステップS38、図11のステップS161で顔を識別することができたと判断し、図3のステップS12、図4のステップS21、図9のステップS109で顔が識別できたと判断する。また、ステップS58で顔がないと判断すると、図5のステップS39、図11のステップS162で顔を識別することができないと判断し、図3のステップS12、図4のステップS21、図9のステップS109で顔が識別できないと判断する。   When the face area is detected in step S57, it is determined that the face can be identified in step S38 in FIG. 5 and step S161 in FIG. 11, and step S12 in FIG. 3, step S21 in FIG. 4, and step S109 in FIG. It is determined that the face can be identified. If it is determined in step S58 that there is no face, it is determined that the face cannot be identified in step S39 in FIG. 5 and step S162 in FIG. 11, and step S12 in FIG. 3, step S21 in FIG. In step S109, it is determined that the face cannot be identified.

なお、この3次元の顔識別処理においても顔を検出することできるようにすることは可能である。この3次元の顔識別処理は、登録されている顔がフレーム画像データ内にあると識別された場合は、当然に顔も検出されていることになり、また、たとえ登録されている顔がフレーム画像データ内にないと判断された場合であっても、被写体の3次元モデルと登録されている立体顔データとの比較照合の結果により、登録されている人物の顔ではないが人の顔であることを検出することは可能であるからである。例えば、立体顔データと第1の所定値以上で一致する部分がある場合は、該立体顔データに対応する顔であると識別し、第1の所定値以上で一致しないが、第2の所定値(第1の所定値より小さい値)以上で一致する場合は単に顔であると検出する。   Note that it is possible to detect a face also in this three-dimensional face identification process. In this three-dimensional face identification process, when a registered face is identified as being in the frame image data, the face is naturally detected, and even if the registered face is a frame Even if it is determined not to be in the image data, the result of the comparison of the 3D model of the subject and the registered 3D face data indicates that the face of the person is not a registered person's face. This is because it can be detected. For example, if there is a portion that matches the 3D face data with a first predetermined value or more, the face is identified as a face corresponding to the 3D face data. If the values match (a value smaller than the first predetermined value) or more, the face is simply detected.

H−2.図8に示す3次元の顔検出処理の動作を、3次元の顔識別処理に適用したときの動作について
このときの3次元の顔識別処理の動作を、図8を引用し、異なる部分だけを説明する。
H-2. About the operation when the operation of the three-dimensional face detection process shown in FIG. 8 is applied to the three-dimensional face identification process The operation of the three-dimensional face identification process at this time is shown in FIG. explain.

ステップS62では、顔識別用の顔データテーブルに設定されている被写体の種類毎の立体顔データのうち、現在設定されている顔識別モードの種類の立体顔データに基づいて、現在設定されている向きから見た顔の平面画像データを生成する。そして、ステップS63では、該生成した顔の平面画像データから2次元の顔特徴データを算出する。このとき、算出される顔特徴データは、人や犬、猫等の種類の顔であることが大まかに識別できる程度の情報量ではなく、誰であるか等具体的に識別できる程度の情報量を有している。
そして、ステップS64では、直近に撮像されたフレーム画像データに基づいて被写体の2次元の特徴データを算出する。このとき、算出される被写体の特徴データは、人や犬、猫等の種類の顔であることが大まかに識別できる程度の情報量ではなく、誰であるか等具体的に識別できる程度の情報量を有している。
In step S62, among the 3D face data for each type of subject set in the face data table for face identification, currently set based on the 3D face data of the currently set face identification mode. Planar image data of the face viewed from the direction is generated. In step S63, two-dimensional face feature data is calculated from the generated plane image data of the face. At this time, the calculated face feature data is not the amount of information that can roughly identify the type of face such as a person, dog, or cat, but the amount of information that can be specifically identified such as who the person is have.
In step S64, two-dimensional feature data of the subject is calculated based on the most recently captured frame image data. At this time, the calculated feature data of the subject is not an amount of information that can be roughly identified as a face of a kind such as a person, dog, or cat, but information that can be specifically identified such as who the person is. Have quantity.

また、ここで、図5を顔識別処理に適用したときの図5のステップS36、図11のステップS159での3次元の顔識別処理の場合は、撮像されたフレーム画像データの全領域に基づいて被写体の2次元の特徴データ(全被写体の特徴データ)を算出する。
また、図11のステップS156の3次元の顔識別処理の場合は、撮像された各フレーム画像データの検出された顔領域の画像データから2次元の被写体の特徴データ(2次元の顔特徴データ)を算出する。
また、図11のステップS158の3次元の顔識別処理の場合は、撮像された各フレーム画像データの顔らしきものがあると判断された領域の画像データから2次元の被写体の特徴データ(2次元の顔らしき被写体の特徴データ)を算出する。
Here, in the case of the three-dimensional face identification process in step S36 in FIG. 5 and step S159 in FIG. 11 when FIG. 5 is applied to the face identification process, it is based on the entire region of the captured frame image data. Then, two-dimensional feature data of the subject (feature data of all subjects) is calculated.
In the case of the three-dimensional face identification process in step S156 of FIG. 11, the feature data of the two-dimensional subject (two-dimensional face feature data) is obtained from the detected face area image data of each captured frame image data. Is calculated.
In the case of the three-dimensional face identification process in step S158 in FIG. 11, the feature data of the two-dimensional subject (two-dimensional) is obtained from the image data of the area where it is determined that there is a face-like image of each captured frame image data. (Feature data of a subject that looks like a face) is calculated.

そして、ステップS66で、所定値以上で一致する部分があると判断された場合は、ステップS67で、該所定値以上で一致する部分に登録された顔があると判断し、顔領域を検出する。また、ステップS68で、設定されている向きが最後の向きと判断された場合は、ステップS70に進み、登録されている顔がないと判断する。   If it is determined in step S66 that there is a matching part with a predetermined value or more, it is determined in step S67 that there is a registered face in the matching part with the predetermined value or more, and a face area is detected. . If it is determined in step S68 that the set orientation is the last orientation, the process proceeds to step S70, where it is determined that there is no registered face.

このステップS67で顔領域を検出すると、図5のステップS38、図11のステップS161で顔を識別することができたと判断し、図3のステップS12、図4のステップS21、図9のステップS109で顔が識別できたと判断する。また、ステップS70で顔がないと判断すると、図5のステップS39、図11のステップS162で顔を識別することができないと判断し、図3のステップS12、図4のステップS21、図9のステップS109で顔が識別できないと判断する。   When the face area is detected in step S67, it is determined that the face can be identified in step S38 in FIG. 5 and step S161 in FIG. 11, and step S12 in FIG. 3, step S21 in FIG. 4, and step S109 in FIG. It is determined that the face can be identified. If it is determined in step S70 that there is no face, it is determined that the face cannot be identified in step S39 in FIG. 5 and step S162 in FIG. 11, and step S12 in FIG. 3, step S21 in FIG. In step S109, it is determined that the face cannot be identified.

なお、この3次元の顔識別処理においても顔を検出することできるようにすることは可能である。この3次元の顔識別処理は、登録されている顔がフレーム画像データ内にあると識別された場合は、当然に顔も検出されていることになり、また、たとえ登録されている顔がフレーム画像データ内にないと判断された場合であっても、ステップS64で算出された2次元の被写体の特徴データと、ステップS63で算出された顔特徴データとの比較照合の結果により、登録されている人物の顔ではないが人の顔であることを検出することは可能であるからである。例えば、ステップS63で算出された顔特徴データと第1の所定値以上で一致する部分がある場合は、該顔特徴データの生成元となった立体顔データに対応する顔であると識別し、第1の所定値以上で一致しないが、第2の所定値(第1の所定値より小さい値)以上で一致する場合は単に顔であると検出する。   Note that it is possible to detect a face also in this three-dimensional face identification process. In this three-dimensional face identification process, when a registered face is identified as being in the frame image data, the face is naturally detected, and even if the registered face is a frame Even if it is determined that it is not in the image data, it is registered based on the result of comparison and matching between the feature data of the two-dimensional subject calculated in step S64 and the face feature data calculated in step S63. This is because it is possible to detect that the face is not the face of a certain person but the face of a person. For example, if there is a part that matches the face feature data calculated in step S63 at a first predetermined value or more, the face feature data is identified as a face corresponding to the stereoscopic face data from which the face feature data was generated, If the values do not match at the first predetermined value or more but match at the second predetermined value (a value smaller than the first predetermined value) or more, the face is simply detected.

H−3.他の方法による3次元の顔識別処理の動作について
まず、1つ目の他の方法による3次元の顔識別処理の動作は、上記「H−2」で説明した動作とほぼ同様であるが、上記「H−2」では、立体顔データから異なる向きの平面画像データを生成するようにしたが、ここでは、立体顔データから異なる表情(笑い、怒り、嫌悪等の異なる表情)の平面画像データを生成するというものである。このときは、立体顔データを正面から見たときの平面画像データを生成する。
H-3. Regarding the operation of the three-dimensional face identification process by another method First, the operation of the three-dimensional face identification process by the first other method is substantially the same as the operation described in the above “H-2”. In the above “H-2”, plane image data in different directions is generated from the stereoscopic face data, but here, the planar image data of different facial expressions (different facial expressions such as laughter, anger, and disgust) from the stereoscopic face data. Is generated. At this time, plane image data when the stereoscopic face data is viewed from the front is generated.

このときの動作を、図8を引用して説明する。
まず、ステップS61では、顔の表情を無表情に設定し、ステップS62では、現在設定されている顔識別モードの種類の立体顔データの顔の表情を認識し、該立体顔データから該設定された表情の立体顔データを生成する。そして、該生成した立体顔データに基づいて正面から見た顔の平面画像データを生成する。
The operation at this time will be described with reference to FIG.
First, in step S61, the facial expression is set to no expression, and in step S62, the facial expression of the 3D face data of the currently set face identification mode is recognized and set from the 3D face data. 3D face data of a certain expression is generated. Then, plane image data of the face viewed from the front is generated based on the generated stereoscopic face data.

そして、ステップS66で、所定値以上で一致する部分があると判断すると、ステップS67で、該所定値以上で一致する部分に登録されている顔があると判断し、顔領域を検出する。一方、ステップS66で、所定値以上で一致する部分がないと、ステップS68で、設定されている表情が最後の表情か否かを判断する。つまり、予め決められているすべての表情を設定したか否かを判断する。ステップS68で、設定されている表情が最後の表情でないと判断すると、ステップS69で次の表情に設定してステップS62に戻る。一方、ステップS68で設定されている表情が最後の表情であると判断すると、ステップS70に進み、登録されている顔がないと判断する。
これにより、顔識別の精度を向上させることができる。例えば、被写体が笑っていたり、怒っている場合等であっても、顔を識別することができる。
If it is determined in step S66 that there is a matching part with a predetermined value or more, it is determined in step S67 that there is a face registered in the matching part with the predetermined value or more, and a face area is detected. On the other hand, if it is determined in step S66 that there is no matching portion equal to or greater than the predetermined value, it is determined in step S68 whether the set facial expression is the last facial expression. That is, it is determined whether all predetermined facial expressions have been set. If it is determined in step S68 that the set facial expression is not the last facial expression, the next facial expression is set in step S69, and the process returns to step S62. On the other hand, if it is determined that the facial expression set in step S68 is the last facial expression, the process proceeds to step S70, and it is determined that there is no registered face.
Thereby, the accuracy of face identification can be improved. For example, even when the subject is laughing or angry, the face can be identified.

なお、立体顔データから異なる向きの平面画像データの生成に代えて、異なる表情の平面画像データを生成するようにしたが、各表情毎に異なる向きの平面画像データを生成するようにしてもよい。つまり、向きと表情とを変えて平面画像データを生成する。
また、3次元の顔識別処理について説明したが、3次元の顔検出処理にも適用することも可能である。また、この3次元の顔識別処理により顔を検出することができるようにすることも可能である。
In addition, instead of generating plane image data with different orientations from the three-dimensional face data, plane image data with different facial expressions are generated, but plane image data with different orientations may be generated for each facial expression. . That is, plane image data is generated by changing the direction and the expression.
Further, although the three-dimensional face identification process has been described, the present invention can also be applied to a three-dimensional face detection process. It is also possible to detect a face by this three-dimensional face identification process.

次に、2つ目の他の方法による3次元の顔識別処理の動作は、上記「H−1」と「H−2」で説明した動作を組み合わせたものであり、上記「H−2」では、登録されている立体顔データから異なる向きから見た平面画像データを生成するようにしたが、撮像された複数のフレーム画像データから被写体の3次元モデルを生成し、該生成した被写体の3次元モデルから異なる向きから見た平面画像データを生成するというものである。このときは、顔識別用の顔データテーブルには、被写体の種類にかかわらず2次元の顔データのみが登録されている。   Next, the operation of the three-dimensional face identification processing by the second other method is a combination of the operations described in the above “H-1” and “H-2”. In this case, planar image data viewed from different directions is generated from the registered three-dimensional face data. However, a three-dimensional model of a subject is generated from a plurality of captured frame image data, and 3 of the generated subject is generated. Planar image data viewed from different directions is generated from a dimensional model. At this time, only two-dimensional face data is registered in the face data table for face identification regardless of the type of subject.

このときの動作を、図6及び図8を引用して説明する。
まず、図6のステップS51、ステップS52の動作後、撮像された撮影角度の異なる複数毎のフレーム画像データ毎に被写体の特徴データを算出し(ステップS53)、該算出された各フレーム画像データ毎の被写体の特徴データから被写体の3次元モデルを生成する(ステップS54)。
The operation at this time will be described with reference to FIGS.
First, after the operations of step S51 and step S52 in FIG. 6, the feature data of the subject is calculated for each of the plurality of frame image data captured at different shooting angles (step S53), and for each calculated frame image data A three-dimensional model of the subject is generated from the feature data of the subject (step S54).

そして、図8のステップS61に進み、顔の向きを正面と設定し、ステップS62では、該生成された被写体の3次元モデルに基づいて、該設定された向きから見た被写体の平面画像データを生成する。次いで、ステップS63で、該生成した平面画像データから被写体の特徴データを算出して、ステップS65に進み、該算出した被写体の特徴データ(設定されている向きから見た被写体の特徴データ)と、顔識別用の顔データテーブルに登録されている現在設定されている顔識別モードの種類の2次元の顔データとを比較照合する。   Then, the process proceeds to step S61 in FIG. 8, where the face orientation is set to the front, and in step S62, the plane image data of the subject viewed from the set orientation is obtained based on the generated three-dimensional model of the subject. Generate. Next, in step S63, subject feature data is calculated from the generated plane image data, and the process proceeds to step S65, where the calculated subject feature data (subject feature data viewed from the set orientation), and The two-dimensional face data of the currently set face identification mode type registered in the face data table for face identification is compared and collated.

そして、ステップS66で、所定値以上で一致する部分があると判断すると、ステップS67進み、該所定値以上で一致する部分に登録されている顔があると判断し、顔領域を検出する。一方、ステップS66で、所定値以上で一致する部分がないと判断すると、ステップS68で、設定されている向きが最後の向きであるか否かを判断する。ステップS68で、設定されている向きが最後の向きでないと判断すると、ステップS69で次の向きに設定してステップS62に戻る。一方、ステップS68で設定されている向きが最後の向きであると判断すると、ステップS70に進み、登録されている顔がないと判断する。   If it is determined in step S66 that there is a matching part with a predetermined value or more, the process proceeds to step S67, where it is determined that there is a face registered in the matching part with the predetermined value or more, and a face area is detected. On the other hand, if it is determined in step S66 that there is no matching portion equal to or greater than the predetermined value, it is determined in step S68 whether the set direction is the last direction. If it is determined in step S68 that the set direction is not the last direction, the next direction is set in step S69, and the process returns to step S62. On the other hand, if it is determined that the orientation set in step S68 is the last orientation, the process proceeds to step S70, and it is determined that there is no registered face.

これにより、顔識別の精度を向上させることができる。例えば、人物が横を向いている場合やサングラスをしている場合であっても、該人物が登録されている顔であるかを識別することでできる。また、立体顔データではなく、2次元の顔データを登録しておけばよいので、記録容量を少なくすることができる。
なお、3次元の顔識別処理について説明したが、3次元の顔検出処理にも適用することも可能である。また、この3次元の顔識別処理により顔を検出することができるようにすることも可能である。
Thereby, the accuracy of face identification can be improved. For example, even when a person is facing sideways or wearing sunglasses, it is possible to identify whether the person is a registered face. Further, since it is only necessary to register two-dimensional face data instead of three-dimensional face data, the recording capacity can be reduced.
Although the three-dimensional face identification process has been described, the present invention can also be applied to a three-dimensional face detection process. It is also possible to detect a face by this three-dimensional face identification process.

また、図11のステップS156による3次元の顔識別処理では、顔領域の画像データに基づいて被写体の3次元モデルを生成するので、顔の3次元モデルが生成されるということになる。このように顔の3次元モデルが生成される場合は、生成された顔の3次元モデルの表情を認識して、上述したように顔の3次元モデルの表情を変えるようにしてもよい。また、この動作は、3次元の顔識別処理について説明したが、3次元の顔検出処理にも適用することも可能である。また、この3次元の顔識別処理により顔を検出することができるようにすることも可能である。   Further, in the three-dimensional face identification process in step S156 of FIG. 11, a three-dimensional model of the subject is generated based on the image data of the face area, and thus a three-dimensional model of the face is generated. When the three-dimensional model of the face is generated in this way, the expression of the generated three-dimensional model of the face may be recognized and the expression of the three-dimensional model of the face may be changed as described above. Moreover, although this operation | movement demonstrated 3D face identification processing, it is also possible to apply to 3D face detection processing. It is also possible to detect a face by this three-dimensional face identification process.

以上のように第3の実施の形態においては、設定された顔識別モードの種類に応じて、異なる顔識別処理を行うようにしたので、被写体の種類や撮影状況に適した顔識別処理を行うことができ、顔識別の精度を向上させることができる。
さらに、第3の実施の形態においては、設定された顔識別モードの種類に応じて、2次元の顔識別処理を行ったり、3次元の顔識別処理を行うようにしたので、処理負担の大きい3次元の顔識別処理を不必要に行うことがなく、また顔識別の精度を向上させることができる。たとえば、人の顔は平面的なので2次元の顔識別処理を行い、犬等の動物は一般的に立体的な顔なので2次元の顔識別処理では顔を識別することは難しいが、3次元の顔識別を行うことにより、動物の顔も識別することができる。
As described above, in the third embodiment, different face identification processing is performed according to the type of the set face identification mode, so that face identification processing suitable for the type of subject and the shooting situation is performed. And the accuracy of face identification can be improved.
Furthermore, in the third embodiment, since the two-dimensional face identification process or the three-dimensional face identification process is performed according to the set face identification mode, the processing load is large. The three-dimensional face identification process is not performed unnecessarily, and the accuracy of face identification can be improved. For example, since a human face is flat, a two-dimensional face identification process is performed. An animal such as a dog is generally a three-dimensional face, so it is difficult to identify a face by a two-dimensional face identification process. By performing face identification, an animal's face can also be identified.

また、2次元の顔識別処理により人の顔が識別されない場合は、3次元の顔識別処理を行うようにしたので、たとえば、人が横を向いていたり、マスクやサングラス等を装着している場合であっても人の顔を識別することができる。
また、ユーザが顔識別モードを設定する場合は、識別したい種類の被写体の顔のみを識別することができる。
自動的に顔識別モードを設定する場合は、ユーザの手間が省け、また、撮影したい被写体の種類が具体的にわからない場合(例えば、猫なのか狐なのかわからない場合)であっても、該被写体の顔を識別することができ、顔識別の精度を向上させることができる。
In addition, when the human face is not identified by the two-dimensional face identification process, the three-dimensional face identification process is performed. For example, the person is facing sideways or wearing a mask or sunglasses. Even in this case, a person's face can be identified.
Further, when the user sets the face identification mode, only the face of the type of subject to be identified can be identified.
When the face identification mode is automatically set, the user can save time and the subject even if the type of subject to be photographed is not specifically known (for example, whether the subject is a cat or not). Can be identified, and the accuracy of face identification can be improved.

また、被写体追従モードがOnの場合は、設定された顔識別モードの種類に応じて、2次元の顔識別処理や3次元の顔識別処理を行い、該顔が識別されると、2次元的な顔検出処理により該検出された顔を検出していき、追従している顔を見失うと再び、設定された顔識別モードの種類に応じて、2次元の顔識別処理や3次元の顔識別処理を行うので、追従処理の負担を軽減することができると共に、追従処理の精度を向上させることができる。   When the subject tracking mode is On, a two-dimensional face identification process or a three-dimensional face identification process is performed according to the type of the set face identification mode. If the detected face is detected by a simple face detection process, and the face being followed is lost, a two-dimensional face identification process or a three-dimensional face identification is performed again according to the type of the set face identification mode. Since the processing is performed, it is possible to reduce the load of the tracking process and improve the accuracy of the tracking process.

[変形例]
I.上記実施の形態は以下のような変形例も可能である。
[Modification]
I. The above-described embodiment can be modified as follows.

(01)上記各実施の形態において、被写体追従モードがOffの場合もOnの場合も、設定されている顔検出モードに応じた顔検出処理、顔識別処理を行うようにしたが、被写体追従モードがOnの場合は、設定されている顔検出モードの種類にかかわらず、3次元の顔検出処理、3次元の顔識別処理を行うようにしてもよい。この3次元の顔検出処理により検出された顔、3次元の顔識別処理により識別された顔を2次元的に顔を検出してくことにより、該検出された顔の追従処理を行い、シャッタボタンが全押しされるまでに該顔を見失った場合は、再び3次元の顔検出処理、3次元の顔識別処理を行うようにする。   (01) In each of the above embodiments, the face detection process and the face identification process corresponding to the set face detection mode are performed regardless of whether the subject tracking mode is Off or On. If is On, a three-dimensional face detection process and a three-dimensional face identification process may be performed regardless of the type of face detection mode that is set. The face detected by the three-dimensional face detection process is detected two-dimensionally from the face identified by the three-dimensional face identification process, thereby performing a tracking process of the detected face, and a shutter button If the face is lost before the button is fully pressed, the three-dimensional face detection process and the three-dimensional face identification process are performed again.

(02)また、上記各実施の形態においては、図3のステップS10、図9のステップS108の設定されている顔検出モードに応じた顔検出処理は、人用の顔検出モードが設定されている場合は、2次元の顔検出処理、2次元の顔識別処理を行い(図5のステップS32、図11のステップS152、ステップS154)、2次元の顔検出処理、2次元の顔識別処理により顔が検出されない場合に(図5のステップS33でNo、図11のステップS153、ステップS155でNo)、初めて3次元の顔検出処理を行うようにしたが(図5のステップS35、ステップS36、図11のステップS156、ステップS158、ステップS159)、3次元の顔検出処理、3次元の顔識別処理を行わないようにしてもよい。この場合は、図5のステップS33、図11のステップS153、ステップS155で、人の顔がない、登録された人物の顔がないと判断すると、図5のステップS39、図11のステップS162に進む。この場合は、図5のステップS34及びステップS35、図11のステップS156〜ステップS158の動作は不要ということになる。   (02) In the above-described embodiments, the face detection process corresponding to the face detection mode set in step S10 of FIG. 3 and step S108 of FIG. 9 is set to the human face detection mode. If so, a two-dimensional face detection process and a two-dimensional face identification process are performed (step S32 in FIG. 5, step S152 and step S154 in FIG. 11), a two-dimensional face detection process, and a two-dimensional face identification process. When a face is not detected (No in step S33 in FIG. 5, No in step S153 in FIG. 11, and No in step S155), the three-dimensional face detection process is performed for the first time (steps S35 and S36 in FIG. 5). The three-dimensional face detection process and the three-dimensional face identification process may not be performed in steps S156, S158, and S159 in FIG. In this case, if it is determined in step S33 in FIG. 5, step S153 in FIG. 11, or step S155 that there is no human face and no registered human face, the process proceeds to step S39 in FIG. 5 and step S162 in FIG. move on. In this case, the operations in steps S34 and S35 in FIG. 5 and steps S156 to S158 in FIG. 11 are unnecessary.

(03)また、上記各実施の形態において、図3のステップS10、図9のステップS108の設定されている顔検出モードに応じた顔検出処理、顔識別処理は、動物用の顔検出モード(たとえば、犬用の顔検出モード、猫用の顔検出モード等)、動物用の顔識別モードが設定されている場合は、一律に3次元の顔検出処理、3次元の顔識別処理より設定されている顔検出モードの動物の種類の顔を検出、識別するようにしたが(図5のステップS36、図11のステップS159)、ある種類の動物用の顔検出モード、顔識別モードが設定された場合は、人用の顔検出モード、人用の顔識別モードが設定されたときと同様の動作を行うようにしてもよい。つまり、該設定された種類の動物用の顔検出モード、顔識別モードに応じて2次元の顔検出処理を実行したり、3次元の顔検出処理のみを実行したりするようにしてもよい。たとえば、猫用の顔検出モードが設定された場合は人用の顔検出モードが設定されたときと同様の処理を行い、犬用の顔検出モードが設定された場合は3次元の顔検出処理のみを行う。すべての種類の動物の顔が立体的ではないからであり、平面的な顔の動物もあるからである。なお、このとき、2次元の顔検出処理を行った場合に、該2次元の顔検出処理により設定された顔検出モードの動物の種類の顔が検出できなかった場合は、3次元の顔検出処理を実行させるようにしてもよいし、実行させないようにしてもよい。
この場合は、図2に示すような顔データテーブルには、動物の種類毎に、2次元の顔データや3次元の顔データを設定しておく。
これにより、顔認識の精度を向上させることができる。
(03) In each of the above embodiments, the face detection process and face identification process corresponding to the set face detection mode in step S10 of FIG. 3 and step S108 of FIG. For example, when a face detection mode for dogs, a face detection mode for cats, etc., and a face identification mode for animals are set, they are uniformly set from a three-dimensional face detection process and a three-dimensional face identification process. The face of the animal type in the face detection mode is detected and identified (step S36 in FIG. 5, step S159 in FIG. 11), but the face detection mode and face identification mode for a certain type of animal are set. In such a case, the same operation as when the human face detection mode and the human face identification mode are set may be performed. That is, the two-dimensional face detection process may be executed or only the three-dimensional face detection process may be executed in accordance with the set face detection mode and face identification mode for animals. For example, when the face detection mode for cats is set, the same processing as when the face detection mode for humans is set is performed, and when the face detection mode for dogs is set, the three-dimensional face detection processing is performed. Only do. This is because the faces of all kinds of animals are not three-dimensional, and some animals have a flat face. At this time, if the face of the animal type in the face detection mode set by the two-dimensional face detection process is not detected when the two-dimensional face detection process is performed, the three-dimensional face detection is performed. The process may be executed or may not be executed.
In this case, two-dimensional face data and three-dimensional face data are set for each type of animal in the face data table as shown in FIG.
Thereby, the accuracy of face recognition can be improved.

(04)また、上記各実施の形態においては、図5のステップS32で、画像データの全領域に基づいて2次元の顔検出処理、2次元の顔識別処理を、図5のステップS36で、画像データの全領域に基づいて3次元の顔検出処理、3次元の顔識別処理を、図11のステップS152で、画像データの全領域に基づいて2次元の顔検出処理を、図11のステップS159で、画像データの全領域に基づいて3次元の顔識別処理を行うようにしたが、画像データの全領域ではなく、画角の中央領域、または、ユーザによって任意に指定された領域に基づいて行うようにしてもよい。これにより、顔検出処理、顔識別処理の処理負担を軽減させることができる。   (04) In each of the above embodiments, in step S32 in FIG. 5, two-dimensional face detection processing and two-dimensional face identification processing are performed in step S36 in FIG. The three-dimensional face detection process based on the entire area of the image data is performed in step S152 of FIG. 11, and the two-dimensional face detection process is performed on the basis of the entire area of the image data. In S159, the three-dimensional face identification process is performed based on the entire area of the image data. However, based on the central area of the angle of view or the area arbitrarily designated by the user, not the entire area of the image data. May be performed. Thereby, the processing load of face detection processing and face identification processing can be reduced.

また、顔検出モードの種類、顔識別モードの種類に対応して色成分を関連付けて記録しておき、図5のステップS32、図5のステップS36、図11のステップS152、ステップS159では、画像データの全領域ではなく、現在設定されている顔検出モード、顔識別モードの種類に対応する色成分を有する領域のみに基づいて行うようにしてもよい。この顔検出モード、顔識別モードの種類に対応した色成分とは、顔検出モード、顔識別モードの種類の被写体の顔の色成分である。たとえば、人用の顔識別モードの場合に対応する色成分は肌色ということになる。これにより、設定された顔検出モード、顔識別モードの種類の被写体の顔があると思われる領域のみに基づいて顔検出処理、顔識別処理を行うことができ、処理負担を軽減させることができる。   Further, color components are associated and recorded corresponding to the types of face detection mode and face identification mode, and in step S32 in FIG. 5, step S36 in FIG. 5, step S152 in FIG. You may make it carry out based not only on the whole area | region of data but only the area | region which has a color component corresponding to the kind of face detection mode currently set and face identification mode. The color components corresponding to the types of the face detection mode and the face identification mode are the color components of the face of the subject in the types of the face detection mode and the face identification mode. For example, the color component corresponding to the human face identification mode is skin color. As a result, the face detection process and the face identification process can be performed based only on the area where the face of the subject of the type of the face detection mode and the face identification mode set is considered to be present, and the processing burden can be reduced. .

(05)また、上記各実施の形態においては、被写体の特徴点や被写体の種類毎の特徴点を抽出して特徴データを抽出し、該抽出した特徴データに基づいて3次元モデルを生成したり、該抽出した特徴データを比較照合することにより顔を検出、識別するようにしたが、他の方法によって3次元モデルを生成したり、顔を検出、識別したりするようにしてもよい。
また、複数枚の画像データに基づいて被写体の3次元モデルを生成するようにしたが、1枚の画像データから被写体の3次元モデルを生成するようにしてもよい。
(05) In each of the above embodiments, feature data is extracted by extracting feature points of a subject and feature types for each subject type, and a three-dimensional model is generated based on the extracted feature data. Although the face is detected and identified by comparing and comparing the extracted feature data, a three-dimensional model may be generated or the face may be detected and identified by other methods.
Further, the three-dimensional model of the subject is generated based on a plurality of pieces of image data, but the three-dimensional model of the subject may be generated from one piece of image data.

(06)また、上記各実施の形態においては、静止画撮影処理により撮影された静止画像データのみを記録するようにしたが、顔検出処理により検出された顔の位置や顔の種類(設定された顔検出モードの種類)、顔識別処理により識別された顔の位置や名称(たとえば、人の場合は人物名、動物の場合は動物の名称若しくはペットの名前等)を静止画像データに関連付けて記録するようにしてもよい。   (06) In the above embodiments, only the still image data captured by the still image capturing process is recorded. However, the face position and the face type (set by the face detection process) are set. Type of face detection mode), the position and name of the face identified by the face identification process (for example, the name of a person in the case of a person, the name of an animal or the name of a pet in the case of an animal), and the like. It may be recorded.

(07)また、上記各実施の形態においては、検出した顔、識別した顔に基いてAF処理を行うようにしたが、検出された顔、識別した顔に基づいて露出制御を行なったり、トリミング処理を行うというように、検出された顔、識別された顔に基づいて所定の処理を行うようにしてもよい。   (07) In each of the above embodiments, the AF processing is performed based on the detected face and the identified face. However, exposure control is performed based on the detected face and the identified face, and trimming is performed. As in the case of performing the process, a predetermined process may be performed based on the detected face and the identified face.

(08)また、上記各実施の形態においては、人、犬、猫等大まかな被写体の種類毎の立体顔データや2次元の顔データを記録するようにしたが、被写体の種類さらに詳しく分類して立体顔データや2次元の顔データを記録するようにしてもよい。例えば、犬なら柴犬、秋田犬、・・・、猫なら、ペルシャ猫、三毛猫、・・というように詳しく分類するようにする。これにより、顔検出、顔識別の精度を向上させることができる。   (08) Further, in each of the above embodiments, the three-dimensional face data and the two-dimensional face data for each type of rough subject such as a person, dog, cat, etc. are recorded. Thus, three-dimensional face data and two-dimensional face data may be recorded. For example, Shiba-inu, Akita-inu, etc. for dogs, Persian cats, calico, etc. for cats. Thereby, the precision of face detection and face identification can be improved.

(09)また、図2に示す顔検出用の顔データテーブルは、被写体の種類毎に同じ次元の顔データは1つしか記録していなかったが、被写体の種類毎に同じ次元の顔データを複数記録しておくようにしてもよい。たとえば、同じ猫であってもその種類によっては極端に顔が変わる可能性もあり、すべての猫の顔が検出することができるように、複数の立体顔データを記録する。   (09) Although the face detection face data table shown in FIG. 2 records only one face data of the same dimension for each type of subject, face data of the same dimension is recorded for each type of subject. A plurality of records may be recorded. For example, even if the cat is the same, the face may change extremely depending on the type of the cat, and a plurality of three-dimensional face data is recorded so that all cat faces can be detected.

(10)また、上記各実施の形態においては、顔検出モード、顔識別モード(これらを総称して顔認識モードという)の種類を1つ設定するようにしたが、顔検出モード、顔識別モードの種類を複数同時に設定するができるようにし、該同時に設定されたすべての顔検出モード、顔識別モードの種類の顔を検出するようにしてもよい。なお、このとき、顔検出モード、顔識別モードの種類によっては顔検出処理、顔識別処理の動作が変わってしまうので(図5、図11参照)、動作が変わらない範囲内で複数の顔検出モード、顔識別モードを同時に設定するようにする。   (10) In the above embodiments, one type of face detection mode and face identification mode (collectively referred to as face recognition mode) is set, but the face detection mode and face identification mode are set. A plurality of types may be set at the same time, and all face detection mode and face identification mode types set at the same time may be detected. At this time, the operations of the face detection process and the face identification process change depending on the types of the face detection mode and the face identification mode (see FIGS. 5 and 11). Set the mode and face identification mode at the same time.

(11)また、上記各実施の形態においては、人用の顔認識モードと、動物用の顔認識モードを備えるようにしたが、これに限らず、他の種類の被写体、たとえば、昆虫の顔を検出する昆虫用の顔認識モードを備える(この場合は、カブトムシ用の顔認識モード、クワガタ用の顔認識モードというように昆虫の種類毎に顔認識モードを備える)ようにしてもよい。   (11) In the above embodiments, the human face recognition mode and the animal face recognition mode are provided. However, the present invention is not limited to this, and other types of subjects, for example, insect faces, are provided. May be provided with a face recognition mode for insects (in this case, a face recognition mode is provided for each type of insect such as a face recognition mode for beetles and a face recognition mode for stag beetles).

(12)また、上記第1、2の実施の形態における図5の動作においては、2次元の顔検出処理により人の顔が検出されない場合は(ステップS33でNo)、3次元の顔検出処理を行うようにしたが(ステップS35、ステップS36)、ステップS34で顔らしきものがあると判断された場合のみ3次元の顔検出処理を行うようにしてもよい。つまり、ステップS34で顔らしきものがないと判断するとそのままステップS39に進む。この場合は、ステップS36の動作は不要ということになる。   (12) In the operation of FIG. 5 in the first and second embodiments, when a human face is not detected by the two-dimensional face detection process (No in step S33), the three-dimensional face detection process (Step S35, step S36), but the three-dimensional face detection process may be performed only when it is determined in step S34 that there is something that looks like a face. That is, if it is determined in step S34 that there is no face-like object, the process proceeds to step S39 as it is. In this case, the operation in step S36 is unnecessary.

(13)また、上記第3の実施の形態における図11の動作においては、2次元の顔検出処理により人の顔が検出されないと(ステップS153でNo)、顔らしきものがあるか否かを判断し(ステップS157)、顔らしきものがある場合には、顔らしきものがある領域に基づいて3次元の顔識別処理を行い(ステップS158)、顔らしきものがない場合には全領域に基づいて3次元の顔識別処理を行うようにしたが(ステップS159)、ステップS157で顔らしきものがないと判断した場合は、そのままステップS162に進むようにしてもよい。   (13) Further, in the operation of FIG. 11 in the third embodiment, if a human face is not detected by the two-dimensional face detection process (No in step S153), it is determined whether there is something that looks like a face. Judgment is made (step S157), and if there is something that looks like a face, three-dimensional face identification processing is performed based on the area that looks like a face (step S158). The three-dimensional face identification process is performed (step S159), but if it is determined in step S157 that there is no face-like object, the process may proceed to step S162 as it is.

(14)また、本発明の特徴となる部分は、顔認識モード(顔検出モードと顔識別モードの総称)に応じて顔認識処理の動作を変えるという点にあるので、上記各実施の形態では、被写体の種類毎に顔認識モードというものを設けたが、被写体の種類毎でなくてもよい。
たとえば、顔認識モードを、2次元の顔認識処理により認識する2次元顔認識モード、3次元の顔認識処理により認識する3次元顔認識モードというように、顔認識処理の次元毎に設けてもよい。この場合は、人の顔を認識する場合は、まず、2次元顔認識モードに設定して顔認識処理を行い、顔が認識されない場合は3次元顔認識モードに設定するようにしてもよい。
また、動物の顔を認識する場合は、最初から3次元顔認識モードに設定するようにしてもよいし、動物の種類に応じて2次元顔認識モードに設定したり、3次元顔認識モードに設定したりするようにしてもよい。この場合、2次元顔認識モードに設定した場合であって、該2次元顔認識モードにより顔が認識できなかった場合は3次元顔認識モードに設定するようにしてもよい。
(14) The feature of the present invention is that the operation of the face recognition process is changed according to the face recognition mode (generic name for the face detection mode and the face identification mode). Although a face recognition mode is provided for each type of subject, it need not be for each type of subject.
For example, a face recognition mode may be provided for each dimension of the face recognition process, such as a two-dimensional face recognition mode that is recognized by a two-dimensional face recognition process, and a three-dimensional face recognition mode that is recognized by a three-dimensional face recognition process. Good. In this case, when recognizing a human face, first, the face recognition processing may be performed by setting the two-dimensional face recognition mode, and when the face is not recognized, the three-dimensional face recognition mode may be set.
When recognizing the face of an animal, the 3D face recognition mode may be set from the beginning, or the 2D face recognition mode may be set according to the type of animal, or the 3D face recognition mode may be set. You may make it set. In this case, when the 2D face recognition mode is set, and the face cannot be recognized by the 2D face recognition mode, the 3D face recognition mode may be set.

さらに、被写体の種類と顔認識の次元とを考慮して顔認識モードを設けるようにしてもよい。
たとえば、上記各実施の形態においては、人用の顔認識モードの中に、2次元の顔認識処理、3次元の顔認識処理が含まれるが、2次元の顔認識により人の顔を認識する人用の2次元顔認識モード、3次元の顔認識処理により人の顔を認識する人用の3次元顔認識モードというように、被写体の種類と顔認識の次元との組み合わせ毎に顔認識モードを備えるようにしてもよい。
たとえば、人用の2次元顔認識モードが設定された場合は、該設定された人用の2次元顔認識モードに対応する顔認識処理を行い、顔が検出されない場合は、人用の3次元顔認識モードに自動的に切り換え設定して顔認識処理を行うようにしてもよい。また、人の顔を認識する場合は、まず、人用の2次元顔認識モードを設定するようにしてもよい。
また、同じ種類の動物(たとえば、猫)の顔を認識するモードが、2次元顔認識モードと、3次元顔認識モードと2つある場合は、最初に2次元顔認識モードに設定して顔認識処理を行い、顔が認識されない場合に初めて、3次元顔認識モードに設定して顔認識処理を行うようにしてもよい。
Furthermore, a face recognition mode may be provided in consideration of the type of subject and the dimension of face recognition.
For example, in each of the above embodiments, the human face recognition mode includes a two-dimensional face recognition process and a three-dimensional face recognition process. The human face is recognized by the two-dimensional face recognition. Face recognition mode for each combination of the type of subject and the face recognition dimension, such as a human two-dimensional face recognition mode and a three-dimensional face recognition mode for humans that recognizes human faces through three-dimensional face recognition processing. You may make it provide.
For example, when the human two-dimensional face recognition mode is set, face recognition processing corresponding to the set human two-dimensional face recognition mode is performed. When no face is detected, the human three-dimensional face recognition mode is set. The face recognition processing may be performed by automatically switching to the face recognition mode. When recognizing a human face, first, a human two-dimensional face recognition mode may be set.
If there are two modes for recognizing the face of the same type of animal (for example, a cat), the two-dimensional face recognition mode and the three-dimensional face recognition mode, the two-dimensional face recognition mode is set first. When the recognition process is performed and the face is not recognized, the face recognition process may be performed by setting the three-dimensional face recognition mode for the first time.

また、上記各実施の形態で説明した被写体追従モードも顔認識モードの一種(追従顔認識モード)と考えることも可能であり、たとえば、図4のステップS22、図10のステップS121に進むと、追従顔認識モードに切り換えて設定し、該設定された追従顔認識モードに応じた顔認識処理を、つまり、図3のステップS10、図9のステップS108で直近に認識された顔を2次元的に検出することにより該顔を追従していく動作を行うことになる。また、図4のステップS24、図10のステップS123で該追従している顔を見失ったと判断すると、追従顔認識モードの直前に設定されていた顔認識モードに再設定して、図3のステップSステップS10、図9のステップS108に戻るということになる。   The subject tracking mode described in each of the above embodiments can also be considered as a kind of face recognition mode (following face recognition mode). For example, when the process proceeds to step S22 in FIG. 4 and step S121 in FIG. The face recognition processing is set by switching to the following face recognition mode, that is, the face most recently recognized in step S10 in FIG. 3 and step S108 in FIG. Thus, the movement of following the face is performed. If it is determined in step S24 in FIG. 4 or step S123 in FIG. 10 that the following face has been lost, the face recognition mode set immediately before the following face recognition mode is reset, and the step in FIG. That is, the process returns to step S10 and step S108 in FIG.

(15)また、上記変形例(01)乃至(14)を任意に組み合わせた態様であってもよい。   (15) Moreover, the aspect which combined the said modification (01) thru | or (14) arbitrarily may be sufficient.

(16)また、本発明の上記実施形態は、何れも最良の実施形態としての単なる例に過ぎず、本発明の原理や構造、動作等をより良く理解することができるようにするために述べられたものであって、添付の特許請求の範囲を限定する趣旨のものでない。
したがって、本発明の上記実施形態に対してなされ得る多種多様な変形ないし修正はすべて本発明の範囲内に含まれるものであり、添付の特許請求の範囲によって保護されるものと解さなければならない。
(16) The above embodiments of the present invention are merely examples as the best embodiments, and are described in order to better understand the principle, structure, operation, and the like of the present invention. And is not intended to limit the scope of the appended claims.
Therefore, it should be understood that all the various variations and modifications that can be made to the above-described embodiments of the present invention are included in the scope of the present invention and protected by the appended claims.

最後に、上記各実施の形態においては、本発明の撮像装置をデジタルカメラ1に適用した場合について説明したが、上記の実施の形態に限定されるものではなく、要は、撮像された画像データに基づいて顔を認識することができる機器であれば適用可能である。   Finally, in each of the above embodiments, the case where the imaging device of the present invention is applied to the digital camera 1 has been described. However, the present invention is not limited to the above embodiment, and the main point is that the captured image data Any device capable of recognizing a face based on the above can be applied.

1 デジタルカメラ
2 撮影レンズ
3 レンズ駆動ブロック
4 絞り
5 CCD
6 ドライバ
7 TG
8 ユニット回路
9 画像生成部
10 CPU
11 キー入力部
12 メモリ
13 DRAM
14 フラッシュメモリ
15 画像表示部
16 バス
1 Digital Camera 2 Shooting Lens 3 Lens Drive Block 4 Aperture 5 CCD
6 Driver 7 TG
8 Unit circuit 9 Image generator 10 CPU
11 Key input section 12 Memory 13 DRAM
14 Flash memory 15 Image display unit 16 Bus

Claims (21)

被写体を撮像する撮像手段と、
被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数顔認識モード備え、複数顔認識モードの中から何れか顔認識モードを設定する顔認識モード設定手段と、
前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定され顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識手段と、
を備え、
前記顔認識モード設定手段は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、
前記顔認識手段は、前記撮像手段により撮像される画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とする撮像装置。
Imaging means for imaging a subject;
Comprising a plurality of face recognition mode the contents of the face recognition processing to be executed is different each time to recognize the face of the subject, the face recognition mode setting means for setting one of the face recognition mode from a said plurality of face recognition mode ,
The image data captured by the imaging unit, by executing the face recognition mode setting means face recognition processing according to the set facial recognition mode, the face recognition in the imaging has been the image data Facial recognition means to
With
The face recognition mode setting means includes a plurality of face recognition modes corresponding to combinations of differences in the types of subjects to be recognized and differences in conditions other than the types of subjects as settable face recognition modes,
The face recognition unit automatically selects a face recognition process to be executed by identifying a difference in the type of the subject and a difference in conditions other than the type of the subject based on image data captured by the imaging unit. An imaging apparatus characterized by that.
前記被写体の種類以外の条件の違いは、顔認識処理の条件の違いであり、
前記顔認識手段は、
前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定された顔認識モードに対応する条件で顔認識処理を実行することにより、該撮像された画像データ内にある顔の中で、該顔認識モードに対応する種類の被写体の顔を認識することを特徴とする請求項1記載の撮像装置。
The difference in conditions other than the type of subject is a difference in face recognition processing conditions,
The face recognition means
The image data captured by the imaging unit, by executing the face under the condition corresponding to the set face recognition mode by the recognition mode setting means face recognition process, the face in the image pickup has been the image data The imaging apparatus according to claim 1, wherein a face of a subject corresponding to the face recognition mode is recognized.
前記顔認識処理の条件は、
2次元的に顔を認識する2次元顔認識処理と、3次元的に顔を認識する3次元顔認識処理を含むことを特徴とする請求項1又は2記載の撮像装置。
The condition of the face recognition process is
The imaging apparatus according to claim 1, comprising: a two-dimensional face recognition process for recognizing a face in two dimensions and a three-dimensional face recognition process for recognizing a face in three dimensions.
前記顔認識モード設定手段は、
ユーザによって選択され顔認識モードを設定することを特徴とする請求項1乃至3の何れかに記載の撮像装置。
The face recognition mode setting means includes
The imaging apparatus according to claim 1, wherein a face recognition mode selected by a user is set.
前記顔認識モード設定手段は、
顔認識モードを自動的に選択して設定することを特徴とする請求項1乃至3の何れかに記載の撮像装置。
The face recognition mode setting means includes
4. The imaging apparatus according to claim 1 , wherein the face recognition mode is automatically selected and set.
前記被写体の種類の違いは、人の顔と人以外の顔であり、
前記顔認識手段は、
前記顔認識モード設定手段により人の顔を対象とした第1の顔認識モードが設定された場合は、人の顔を認識する顔認識処理実行することにより、前記撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により人以外の顔を対象とした第2の顔認識モードが設定された場合は、人以外の種類の顔を認識することを特徴とする請求項1乃至5の何れかに記載の撮像装置。
The difference in the type of subject is a human face and a non-human face,
The face recognition means
When the first face recognition mode for the human face is set by the face recognition mode setting means, the face recognition process for recognizing the human face is executed, so that it is in the captured image data. A human face is recognized, and when a second face recognition mode for a face other than a person is set by the face recognition mode setting means, a face other than a person is recognized. Item 6. The imaging device according to any one of Items 1 to 5.
前記顔認識処理の条件は、2次元的に顔を認識する条件と、3次元的に顔を認識する条件とを含み、
前記顔認識手段は、
前記顔認識モード設定手段により2次元的に顔を認識する条件に対応した第3の顔認識モードが設定された場合は、2次元的に顔を認識する2次元顔認識処理を実行することにより、前記撮像された画像データ内にある顔を認識し、前記顔認識モード設定手段により3次元的に顔を認識する条件に対応した第4の顔認識モードが設定された場合は、3次元的に顔を認識する3次元顔認識処理を実行することにより、前記撮像された画像データ内にある顔を認識することを特徴とする請求項1乃至6の何れかに記載の撮像装置。
The face recognition processing conditions include a condition for recognizing a face in two dimensions and a condition for recognizing a face in three dimensions,
The face recognition means
When the third face recognition mode corresponding to the condition for recognizing a face in two dimensions is set by the face recognition mode setting means, a two-dimensional face recognition process for recognizing the face in two dimensions is executed. If a fourth face recognition mode corresponding to a condition for recognizing a face in three dimensions is set by the face recognition mode setting means when a face in the imaged image data is recognized, three-dimensional The imaging apparatus according to claim 1 , wherein a face in the imaged image data is recognized by executing a three-dimensional face recognition process for recognizing the face .
前記複数の顔認識モードは、顔認識処理を切り換えて実行する第5の顔認識モードを含み、
前記顔認識手段は、
前記顔認識モード設定手段により前記第5の顔認識モードが設定された場合は、人の顔を認識する顔認識処理を実行することにより、前記撮像された画像データ内にある人の顔を認識し、この顔認識処理により人の顔が認識されなかった場合に、人以外の種類の顔を認識する顔認識処理に切り換えて実行することにより、前記撮像された画像データ内にある人以外の種類の顔を認識することを特徴とする請求項1乃至7の何れかに記載の撮像装置。
The plurality of face recognition modes include a fifth face recognition mode for switching and executing face recognition processing,
The face recognition means
When the fifth face recognition mode is set by the face recognition mode setting means, a face recognition process for recognizing a person's face is executed to recognize a person's face in the captured image data. When a face of a person is not recognized by this face recognition process, it is switched to a face recognition process for recognizing a face of a type other than a person, so that a person other than the person in the captured image data is executed. The imaging apparatus according to claim 1 , wherein a type of face is recognized .
前記複数の顔認識モードは、顔認識処理を切り換えて実行する第6の顔認識モードを含み、
前記顔認識手段は、
前記顔認識モード設定手段により前記第6の顔認識モードが設定された場合は、2次元顔認識処理を実行することにより、前記撮像された画像データ内にある人の顔を認識し、この顔認識処理により人の顔が認識されなかった場合に、3次元顔認識処理に切り換えて実行することにより、前記撮像された画像データ内にある人以外の種類の顔を認識することを特徴とする請求項1乃至8の何れかに記載の撮像装置。
The plurality of face recognition modes include a sixth face recognition mode for switching and executing face recognition processing,
The face recognition means
When the sixth face recognition mode is set by the face recognition mode setting means, a face of a person in the captured image data is recognized by executing a two-dimensional face recognition process. When a person's face is not recognized by the recognition process, a face other than a person in the captured image data is recognized by switching to and executing the three-dimensional face recognition process. The imaging device according to claim 1 .
前記顔認識手段は、
前記顔認識モード設定手段により前記第1の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに対して、2次元顔認識処理を実行して、該撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により前記第2の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある前記顔認識モード設定手段により設定された顔認識モードの種類の顔を認識することを特徴とする請求項6記載の撮像装置。
The face recognition means
When the first face recognition mode is set by the face recognition mode setting means , a two-dimensional face recognition process is performed on the image data picked up by the image pickup means, and the picked-up image data When the second face recognition mode is set by the face recognition mode setting means, a three-dimensional face recognition process is performed based on the image data picked up by the image pickup means. 7. The imaging apparatus according to claim 6 , wherein the imaging apparatus executes and recognizes a face of the type of the face recognition mode set by the face recognition mode setting means in the captured image data.
前記第2の顔認識モードは、更に、人以外の複数種類の被写体の各々を認識対象とする複数の顔認識モードに分割され、
前記顔認識手段は、
前記顔認識モード設定手段により前記第1の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに対して、2次元顔認識処理を実行して、該撮像された画像データ内にある人の顔を認識し、前記顔認識モード設定手段により前記第2の顔認識モードが設定された場合は、該設定された種類の顔検出モードに応じて、実行させる顔認識処理を、2次元顔認識処理と3次元顔認識処理とに切り替えることにより、前記撮像手段により撮像された画像データ内にある前記顔認識モード設定手段により設定された顔認識モードの種類の顔を認識することを特徴とする請求項10に記載の撮像装置。
The second face recognition mode is further divided into a plurality of face recognition modes for recognizing each of a plurality of types of subjects other than humans,
The face recognition means
If the first face recognition mode by the face recognition mode setting means is set on the image data captured by the imaging means performs a 2-dimensional face recognition processing, image data which is image pickup When the second face recognition mode is set by the face recognition mode setting means, a face recognition process to be executed is performed according to the set type of face detection mode. By switching between the two-dimensional face recognition process and the three-dimensional face recognition process, the face of the type of face recognition mode set by the face recognition mode setting means in the image data picked up by the image pickup means is recognized. The imaging apparatus according to claim 10 .
前記顔認識手段は、
2次元顔認識処理の実行により顔を認識することができなかった場合は、前記撮像手段により撮像された画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある顔を認識することを特徴とする請求項10又は11記載の撮像装置。
The face recognition means
If the face cannot be recognized by the execution of the two-dimensional face recognition process, the three-dimensional face recognition process is executed based on the image data picked up by the image pickup means, and the inside of the picked-up image data The imaging apparatus according to claim 10, wherein a face in the area is recognized.
前記顔認識手段は、
前記撮像手段により撮像された画像データの全領域、又は、画像データの画角の中央領域、又は、ユーザによって指定された領域の画像データに基づいて、顔認識処理を実行して、該撮像された画像データ内にある顔を認識することを特徴とする請求項1乃至12の何れかに記載の撮像装置。
The face recognition means
Based on the image data of the entire area of the image data imaged by the imaging means, the central area of the angle of view of the image data, or the area specified by the user, the face recognition process is executed and the image is captured. 13. The imaging apparatus according to claim 1, wherein a face in the image data is recognized.
前記顔認識手段は、
2次元顔認識処理の実行により、顔を認識することができなかったが、顔らしきものが認識できた場合は、前記撮像手段により撮像された画像データの該顔らしきものがあると認識された領域の画像データに基づいて、3次元顔認識処理を実行して、該撮像された画像データ内にある顔を認識することを特徴とする請求項12記載の撮像装置。
The face recognition means
Although the face could not be recognized by the execution of the two-dimensional face recognition process, but the face-like object could be recognized, it was recognized that there was the face-like image data captured by the imaging means. 13. The imaging apparatus according to claim 12, wherein a three-dimensional face recognition process is executed based on the image data of the region to recognize a face in the captured image data.
前記顔認識手段は、
前記撮像手段により撮像された画像データ内にある顔を検出することを特徴とする請求項1乃至14の何れかに記載の撮像装置。
The face recognition means
The image pickup apparatus according to claim 1, wherein a face in the image data picked up by the image pickup means is detected.
前記顔認識手段は、
前記撮像手段により撮像された画像データ内にある顔が何であるかを具体的に識別することを特徴とする請求項1乃至14の何れかに記載の撮像装置。
The face recognition means
The imaging apparatus according to claim 1, wherein the imaging apparatus specifically identifies what face is in the image data captured by the imaging unit.
前記撮像手段により撮像された画像データ内にある顔を検出する2次元顔検出手段を備え、
前記顔認識手段は、
前記2次元顔検出手段により顔が検出された場合は、前記撮像手段により撮像された画像データの前記2次元顔検出手段により検出された顔領域の画像データに基づいて、3次元顔認識処理を実行することにより、該撮像された画像データ内にある顔を識別することを特徴とする請求項16記載の撮像装置。
Two-dimensional face detection means for detecting a face in the image data picked up by the image pickup means;
The face recognition means
When a face is detected by the two-dimensional face detection means, a three-dimensional face recognition process is performed based on the image data of the face area detected by the two-dimensional face detection means of the image data picked up by the image pickup means. The imaging apparatus according to claim 16, wherein a face in the captured image data is identified by executing.
前記複数の顔認識モードは、顔認識処理を切り換えて実行する第7の顔認識モードを含み、
前記顔認識手段は、
前記顔認識モード設定手段により前記第7の顔認識モードが設定された場合は、前記撮像手段により撮像された画像データに対して、前記顔認識処理を実行し、この顔認識処理により顔が認識された後は、この認識された顔が画像データ内で移動するのを追従していく被写体追従処理に切り換えて実行することを特徴とする請求項1乃至17の何れかに記載の撮像装置。
The plurality of face recognition modes include a seventh face recognition mode for switching and executing face recognition processing,
The face recognition means
When the seventh face recognition mode is set by the face recognition mode setting means, the face recognition processing is executed on the image data picked up by the image pickup means, and the face is recognized by this face recognition processing. The imaging apparatus according to claim 1, wherein after the recognition is performed, the detected face is switched to a subject tracking process that follows the movement of the recognized face in the image data.
前記顔認識手段は、
更に、前記被写体追従処理により人の顔が追従できなくなった場合は、前記被写体追従処理に切り換える前に設定されていた顔認識処理を再実行することを特徴とする請求項18記載の撮像装置。
The face recognition means
19. The image pickup apparatus according to claim 18, wherein when a human face cannot be tracked by the subject tracking process, the face recognition process set before switching to the subject tracking process is re-executed.
コンピュータに、On the computer,
被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数の顔認識モードを備え、該複数の顔認識モードの中から何れかの顔認識モードを設定する顔認識モード設定処理と、A face recognition mode setting process in which a plurality of face recognition modes each having different contents of face recognition processing executed when recognizing the face of the subject are provided, and any one of the plurality of face recognition modes is set. ,
画像データに対して、前記顔認識モード設定処理により設定された顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識処理と、A face recognition process for recognizing a face in the captured image data by executing a face recognition process corresponding to the face recognition mode set by the face recognition mode setting process on the image data;
を実行させる顔認識方法であって、A face recognition method for executing
前記顔認識モード設定処理は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、The face recognition mode setting process includes a plurality of face recognition modes corresponding to combinations of differences in types of subjects to be recognized and differences in conditions other than the types of subjects as settable face recognition modes,
前記顔認識処理は、前記画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とする顔認識方法。The face recognition process selects a face recognition process to be executed by automatically discriminating between a difference in type of the subject and a difference in conditions other than the type of subject based on the image data. Recognition method.
撮像手段を備えたコンピュータを、A computer equipped with an imaging means,
被写体の顔を認識する際に実行する顔認識処理の内容が各々異なる複数の顔認識モードを備え、該複数の顔認識モードの中から何れかの顔認識モードを設定する顔認識モード設定手段、Face recognition mode setting means for providing a plurality of face recognition modes with different contents of face recognition processing executed when recognizing the face of the subject, and setting any one of the plurality of face recognition modes;
前記撮像手段により撮像された画像データに対して、前記顔認識モード設定手段により設定された顔認識モードに応じた顔認識処理を実行することにより、該撮像された画像データ内にある顔を認識する顔認識手段、A face in the captured image data is recognized by executing face recognition processing corresponding to the face recognition mode set by the face recognition mode setting unit on the image data captured by the imaging unit. Facial recognition means,
として機能させ、Function as
前記顔認識モード設定手段は、設定可能な顔認識モードとして、認識対象となる被写体の種類の違いと、被写体の種類以外の条件の違いとの組み合わせに応じた複数の顔認識モードを含み、The face recognition mode setting means includes a plurality of face recognition modes corresponding to combinations of differences in the types of subjects to be recognized and differences in conditions other than the types of subjects as settable face recognition modes,
前記顔認識手段は、前記撮像手段により撮像される画像データに基づいて自動的に前記被写体の種類の違いと前記被写体の種類以外の条件の違いとを識別して実行する顔認識処理を選択することを特徴とするプログラム。The face recognition unit automatically selects a face recognition process to be executed by identifying a difference in the type of the subject and a difference in conditions other than the type of the subject based on image data captured by the imaging unit. A program characterized by that.
JP2012045142A 2012-03-01 2012-03-01 Imaging apparatus, face recognition method and program thereof Expired - Fee Related JP5267695B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012045142A JP5267695B2 (en) 2012-03-01 2012-03-01 Imaging apparatus, face recognition method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012045142A JP5267695B2 (en) 2012-03-01 2012-03-01 Imaging apparatus, face recognition method and program thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007225922A Division JP5099488B2 (en) 2007-08-31 2007-08-31 Imaging apparatus, face recognition method and program thereof

Publications (2)

Publication Number Publication Date
JP2012157016A JP2012157016A (en) 2012-08-16
JP5267695B2 true JP5267695B2 (en) 2013-08-21

Family

ID=46838202

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012045142A Expired - Fee Related JP5267695B2 (en) 2012-03-01 2012-03-01 Imaging apparatus, face recognition method and program thereof

Country Status (1)

Country Link
JP (1) JP5267695B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10885314B2 (en) * 2018-01-22 2021-01-05 Kneron Inc. Face identification system and face identification method with high security level and low power consumption
US10614292B2 (en) * 2018-02-06 2020-04-07 Kneron Inc. Low-power face identification method capable of controlling power adaptively
EP3864570A1 (en) * 2018-10-10 2021-08-18 DeLaval Holding AB Animal identification using vision techniques
CN111723709B (en) * 2020-06-09 2023-07-11 大连海事大学 Fly face recognition method based on deep convolutional neural network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007011970A (en) * 2005-07-04 2007-01-18 Fujifilm Holdings Corp Image processor, image processing method and program
JP4450799B2 (en) * 2006-03-10 2010-04-14 富士フイルム株式会社 Method for controlling target image detection apparatus

Also Published As

Publication number Publication date
JP2012157016A (en) 2012-08-16

Similar Documents

Publication Publication Date Title
JP5099488B2 (en) Imaging apparatus, face recognition method and program thereof
CN104243800B (en) Control device and storage medium
US8594390B2 (en) Composition determination device, composition determination method, and program
TWI393434B (en) Image capture device and program storage medium
WO2016016984A1 (en) Image pickup device and tracking method for subject thereof
JP5394296B2 (en) Imaging apparatus and image processing method
JP5251215B2 (en) Digital camera
KR101953813B1 (en) Smart image sensor with integrated memory and processor
JP4577275B2 (en) Imaging apparatus, image recording method, and program
JP4552997B2 (en) Imaging apparatus and program
JP2004320287A (en) Digital camera
JP2004320286A (en) Digital camera
JP4780205B2 (en) Imaging device, angle of view adjustment method, and program
JP5030022B2 (en) Imaging apparatus and program thereof
JP5267695B2 (en) Imaging apparatus, face recognition method and program thereof
JP4853707B2 (en) Imaging apparatus and program thereof
JP2008299784A (en) Object determination device and program therefor
JP4577445B2 (en) Imaging apparatus, image recording method, and program
JP5880135B2 (en) Detection apparatus, detection method, and program
KR101665175B1 (en) Image acquisition apparatus,image acquisition method and recording medium
JP2014033265A (en) Imaging device, imaging method, and program
JP2008288797A (en) Imaging apparatus
JP5448868B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP5088612B2 (en) Imaging apparatus, processing execution method of imaging apparatus, and program thereof
JP5126285B2 (en) Imaging apparatus and program thereof

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130318

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130422

R150 Certificate of patent or registration of utility model

Ref document number: 5267695

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees