JP2013165321A - Image processor and image processing method - Google Patents
Image processor and image processing method Download PDFInfo
- Publication number
- JP2013165321A JP2013165321A JP2012026143A JP2012026143A JP2013165321A JP 2013165321 A JP2013165321 A JP 2013165321A JP 2012026143 A JP2012026143 A JP 2012026143A JP 2012026143 A JP2012026143 A JP 2012026143A JP 2013165321 A JP2013165321 A JP 2013165321A
- Authority
- JP
- Japan
- Prior art keywords
- main subject
- subject
- list
- detected
- feature portion
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、被写体画像の顔部分等の特徴部分を検出し、その中から主被写体を特定してカメラ制御等を行う画像処理装置及び方法に関する。 The present invention relates to an image processing apparatus and method for detecting a characteristic portion such as a face portion of a subject image, specifying a main subject from the detected feature portion, and performing camera control or the like.
近年、撮影している画像から顔部分を特徴部分として検出し、それを予め登録保持している個人情報と比較して、その顔部分が誰であるかを特定する個人認証が可能なスチルカメラ、監視用カメラ、ビデオカメラ等の撮影装置が登場している。このような撮影装置では、検出した顔の器官(目や鼻、口等)の位置や肌色等の容貌を表す情報(特徴量)を抽出する。また、登録される個人情報には、人物(特徴部分)の特徴量や名前等が記録されている。さらに、登録されている人物を主被写体として選択する際に用いる優先度を設定することができるスチルカメラもある。 In recent years, a still camera that can detect a face part as a feature part from a photographed image and compare it with personal information registered and held in advance to identify who the face part is. Cameras such as surveillance cameras and video cameras have appeared. In such a photographing apparatus, information (feature amount) representing the position of the detected facial organ (eyes, nose, mouth, etc.) and appearance such as skin color is extracted. In addition, in the registered personal information, a feature amount and a name of a person (feature portion) are recorded. In addition, there is a still camera that can set a priority used when a registered person is selected as a main subject.
特許文献1では、個人情報が登録されている人物を撮影画像から同時に複数検出した場合に、個人情報において設定されている優先度が最も高く設定されている人物に、焦点や露出を合わせるデジタルカメラについて記述されている。
In
また、このような個人情報において設定されている優先度が最も高く設定されている人物を主対象とする処理は、上述した撮影装置においてのみ実施されるものではなく、パーソナルコンピュータ上のアプリケーションにおいても実施される。例えば、優先度が最も高く設定されている人物が適正値となるように、画像全体に対して輝度補正やホワイトバランス補正を行ったり、優先度が最も高く設定されている人物の画像におけるサイズや座標を、その画像に付随させて記憶させたりすることがあげられる。 In addition, such a process mainly targeting a person set with the highest priority in personal information is not performed only in the above-described photographing apparatus, but also in an application on a personal computer. To be implemented. For example, brightness correction or white balance correction is performed on the entire image so that the person with the highest priority is set to an appropriate value, or the size or the size of the person with the highest priority is set. The coordinates may be stored in association with the image.
しかしながら、ユーザにとっては、登録されている人物ごとに優先度を設定するのは非常に手間がかかる作業となる。また、登録人物を増やした場合や、優先度を設定し直す場合にも、個別に優先度を変更する必要があり、ユーザの手間がかかる。 However, for the user, setting the priority for each registered person is a very laborious operation. Also, when the number of registered persons is increased or when the priority is reset, it is necessary to individually change the priority, which takes time for the user.
本発明は上記従来技術の問題を解決するためになされたものであり、その目的は、手間をかけることなく、ユーザが意図する被写体を学習により推測して自動的に主被写体として決定することができる画像処理装置及び方法を提供することにある。 The present invention has been made to solve the above-described problems of the prior art, and its purpose is to automatically determine a subject intended by the user as a main subject by estimating the subject intended by learning without taking time and effort. An object of the present invention is to provide an image processing apparatus and method.
上記目的を達成するために本発明は、特徴部分を登録する登録手段と、画像から特徴部分を検出する検出手段と、前記検出手段により検出された特徴部分の中から主被写体を決定する決定手段と、前記登録手段により登録された特徴部分の各々について、前記決定手段により主被写体として決定された累積回数及び主被写体とされた累積時間の少なくとも一方を個別情報として蓄積する蓄積手段とを有し、前記決定手段は、前記検出手段により検出された特徴部分の中に前記登録手段により登録された特徴部分と同一の特徴部分が存在する場合は、前記蓄積手段により蓄積されている前記同一の特徴部分に関する個別情報に基づいて主被写体を決定することを特徴とする。 In order to achieve the above object, the present invention provides a registration means for registering a feature portion, a detection means for detecting a feature portion from an image, and a determination means for determining a main subject from the feature portions detected by the detection means. Storage means for storing at least one of the cumulative number determined as the main subject and the cumulative time determined as the main subject as individual information for each of the feature parts registered by the registration means. The determining means has the same feature stored by the storage means when the same feature part as the feature part registered by the registration means exists in the feature part detected by the detection means. The main subject is determined based on the individual information regarding the portion.
本発明によれば、手間をかけることなく、ユーザが意図する被写体を学習により推測して自動的に主被写体として決定することができる。 According to the present invention, a subject intended by a user can be estimated by learning and automatically determined as a main subject without taking time and effort.
以下、本発明の実施の形態を図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施の形態)
図1は、本発明の画像処理装置の一例としての、第1の実施形態に係る撮影装置の構成を示すブロック図である。以下、撮影装置として、動画像を記録するデジタルビデオカメラ100を例示するが、これに限るものでなく、デジタルスチルカメラ、監視用カメラ等であってもよい。
(First embodiment)
FIG. 1 is a block diagram showing a configuration of a photographing apparatus according to the first embodiment as an example of an image processing apparatus of the present invention. Hereinafter, although the
まず、ビデオカメラ100の構成について説明する。
First, the configuration of the
ビデオカメラ100は、図中の符号101〜105で示す制御系ブロックを備える。CPU(決定手段)101は、内部バス105により、RAM102、ROM103及びその他の各ブロックに接続され、ROM103に格納された制御プログラムを元に、各ブロックの制御を行う。ここで、ROM103はFLASH等の書き換え可能なROMである。CPU101は動作時の一時的なデータの格納場所としてRAM102を用いる。また、CPU101に接続された操作部104は、ユーザによる各種の操作レバーやボタン等の入力を受け付け、CPU101はユーザの指示に応じて、各種処理を行うことができる。
The
また、ビデオカメラ100は図中の符号110〜115で示すカメラ系ブロックを備える。変倍レンズ110、フォーカスレンズ111を通過した光は、撮影手段であるCCDイメージセンサ114の撮影面上に結像し、撮影面の光学像が電気信号に変換される。レンズドライバ113は、CPU101の制御により、変倍レンズ110、フォーカスレンズ111及び絞り112を駆動して、光学ズーム倍率、フォーカス及び絞り量の調整を行う。AFE(アナログフロントエンド)115は、CPU101から指示されたシャッタ速度に基づきCCDイメージセンサ114を駆動して、1/60秒毎に1フレーム分の画像信号を読み出す。そして、その画像信号のサンプル・ホールドと増幅、デジタル信号への変換を行う。
The
また、ビデオカメラ100は、図中の符号120〜128で示す画像処理系ブロックを備える。CPU101の制御により、画像処理部120はAFE115から画像信号を入力し、色変換処理を行い、バッファメモリ123に画像信号を出力する。露出評価部121及びフォーカス評価部122は、画像処理部120から得た画像信号に含まれる複数の領域に対して、露出及びフォーカスの状態をそれぞれ評価する。特徴検出部(検出手段)124は、1フレーム毎にバッファメモリ123から画像信号を読み出す。そして、画像に含まれる特徴部分である人物の顔(顔部分)の数を検出すると共に、それらの撮影画像における位置、大きさを「被写体情報」として検出する。その検出周期は1/60秒となる。
The
また、CPU101は、特徴検出部124が検出した顔部分の位置と大きさをRAM102に検出結果リストL2として格納する。検出結果リストL2に関しては図2(b)で後述する。特徴抽出部125は、バッファメモリ123から画像信号を読み出し、検出結果リストL2から特徴検出部124が検出した顔部分に対して特徴量を抽出する。ここで、特徴量とは、その人物の顔の器官(目、鼻、口等)の顔部品の形状や相対的な配置、肌色等の容貌を表す情報である。
In addition, the
ここで、個人を特定するための特徴量をリスト化したものを個人情報リストL1(図2(a)で後述)と呼ぶ。この個人情報リストL1はROM103に格納され、特徴抽出部125で抽出された被写体の特徴量と比較されるものである。
Here, a list of feature amounts for specifying an individual is called a personal information list L1 (described later with reference to FIG. 2A). This personal information list L1 is stored in the
個人認証部126は、特徴抽出部125で抽出された特徴量と、個人情報リストL1に登録されている各人物の特徴量h(図2(a))とを比較する。個人認証部126は検出された顔部分と類似する(同一と判定できる)人物がいるかどうかを認証する。CPU101は認証結果により検出結果リストL2を更新する。描画部127は被写体リストL3より画像の顔部分の位置に合わせて枠の描画を行い合成部128に出力する。被写体リストL3については図2(c)で後述する。
The
合成部128はバッファメモリ123から画像信号を読み出しながら、描画部127より出力される枠を合成し、出力部130に出力する。また、ビデオカメラ100は出力部130を備え、合成部128が合成した画像信号を出力する。
The synthesizing
図2(a)、(b)、(c)は、それぞれ個人情報リストL1、検出結果リストL2、被写体リストL3の一例を示す概念図である。 2A, 2B, and 2C are conceptual diagrams showing examples of the personal information list L1, the detection result list L2, and the subject list L3, respectively.
図2(a)に示す個人情報リストL1とは、ユーザにより登録される特徴部分のリストであり、本実施の形態では、人物の顔部分の特徴量等の情報が格納され、ROM103に格納される。
The personal information list L1 shown in FIG. 2A is a list of feature parts registered by the user. In the present embodiment, information such as the feature amount of the face part of a person is stored in the
個人情報リストL1には、ユーザが登録した人物の顔の画像(登録画像)、名前、番号n、特徴量hのほか、「個人情報」(個別情報)として主被写体回数c及び主被写体時間tが格納されている。ここで主被写体とは、被写体の中でも最も重要な被写体であり、ユーザが意図している可能性が高い被写体である。ビデオカメラ100はこの主被写体に合わせて絞りやフォーカス等のカメラ制御を行う。
In the personal information list L1, in addition to the face image (registered image), name, number n, feature amount h registered by the user, the number of main subjects c and main subject time t as “personal information” (individual information) Is stored. Here, the main subject is the most important subject among subjects, and is a subject that is highly likely to be intended by the user. The
個人情報リストL1において、1つの要素に関する登録画像、名前、番号n等の情報は1行に並び、登録される数だけ列方向に要素が並ぶ。番号nは、その要素がリスト内で何番目の要素かを示す情報である。以下、リスト内のn番目の要素を要素[n]と記述する。 In the personal information list L1, information such as a registered image, name, and number n regarding one element is arranged in one line, and elements are arranged in the column direction by the number registered. The number n is information indicating the element number in the list. Hereinafter, the n-th element in the list is described as an element [n].
主被写体回数cは、その人物が個人情報リストL1に登録されてから、撮影中に主被写体として設定された累積回数であり、主被写体時間tは、その人物が個人情報リストL1に登録されてから、撮影中に主被写体として撮影された累積時間である。ROM103は、これらを個人情報(個別情報)として蓄積する蓄積手段として機能する。
The main subject count c is the cumulative number set as the main subject during shooting since the person was registered in the personal information list L1, and the main subject time t is the person registered in the personal information list L1. To the cumulative time taken as the main subject during shooting. The
個人情報リストL1に、ある人物の個人情報を追加登録するには、ユーザが事前にその人物の顔が写った画像とその人物の名前をROM103に登録する必要がある。ユーザが画像を入力すると、特徴検出部124は入力された画像から特徴検出を行い、特徴抽出部125は検出された顔部分の特徴量を求める。ユーザは操作部104の所定のボタン操作によりその人物の名前を入力する。CPU101は、名前の入力と、入力された画像の特徴量の抽出が終わると、それらを個人情報リストL1に新たな要素として登録する(登録手段)。このときCPU101は、新たな要素の番号nには、既に登録されている要素数に1を加算した値を設定すると共に、主被写体回数c、主被写体時間tにはいずれも0を設定する。ユーザはまた、操作部104の所定のボタン操作により、個人情報リストL1から所望の要素を削除することができる。
In order to additionally register personal information of a person in the personal information list L1, the user needs to register in advance in
次に、検出結果リストL2について説明する。図2(b)に示す検出結果リストL2とは、CPU101が特徴検出部124の検出結果と個人認証部126の認証結果を管理するためのリストであり、RAM102に格納される。
Next, the detection result list L2 will be described. The detection result list L2 illustrated in FIG. 2B is a list for the
図2(b)に示すように、検出結果リストL2には、撮影画像から検出された特徴部分の被写体情報(撮影画像における位置、大きさ)のリストに認証結果aが対応して格納される。すなわち、検出結果リストL2には、検出された顔部分の番号(n)、顔部分の中心位置(水平位置xと垂直位置y)、及び顔部分の大きさ(幅w)、認証結果aが格納される。検出結果リストL2における番号nは、その要素がリスト内で何番目の要素であるかを示す情報である。 As shown in FIG. 2B, the detection result list L2 stores the authentication result a corresponding to the list of subject information (position and size in the photographed image) of the characteristic part detected from the photographed image. . That is, the detection result list L2 includes the number (n) of the detected face part, the center position of the face part (horizontal position x and vertical position y), the size of the face part (width w), and the authentication result a. Stored. The number n in the detection result list L2 is information indicating the element number in the list.
検出結果リストL2の更新手続きについて説明する。検出結果リストL2は、特徴検出部124の検出結果が出る毎に更新される。まず、CPU101は、検出結果が出ると検出結果リストL2内の全要素を削除する。そして、検出結果として検出されたすべての顔部分の位置と大きさを検出結果リストL2に格納する。そのとき、各要素の番号nに連番を設定し、認証結果aには0を設定する。
A procedure for updating the detection result list L2 will be described. The detection result list L2 is updated every time the detection result of the
そして、設定した検出結果リストL2の各要素に対して、特徴抽出部125による特徴抽出と、個人認証部126による認証処理とが行われる。CPU101は検出結果リストL2の認証結果を設定する。ここで個人認証部126は各要素が個人情報リストL1に登録されたいずれかの人物と同一であると認証された場合は、その人物の個人情報リストL1における番号nの値を認証結果aの値として設定する。また、いずれの人物とも認証されなかった場合には、認証結果aに0を設定する。
Then, feature extraction by the
認証結果aが正の整数である場合(a≠0)は、その人物は個人情報リストL1に登録されていることを表しており、主被写体回数cや主被写体時間t等の個人情報を持っていることを示す。認証結果が0の場合は、その人物は個人情報リストL1に登録されていないことを示す。 If the authentication result a is a positive integer (a ≠ 0), it indicates that the person is registered in the personal information list L1, and has personal information such as the main subject count c and the main subject time t. Indicates that If the authentication result is 0, it indicates that the person is not registered in the personal information list L1.
図3のフローチャートを用いて、特徴抽出部125、個人認証部126が検出結果リストL2より特徴抽出、認証処理を行い、CPU101が認証結果より検出結果リストL2を更新する処理を説明する。
A process in which the
図3は、検出結果リスト更新処理のフローチャートである。まず、ステップS301で、CPU101は、検出結果リストL2の要素数I1を取得する。ステップS302で、CPU101は、検出結果リストL2の処理中の要素の番号nを示すカウンタiを1に初期化する。ステップS303では、CPU101は、検出結果リストL2で未処理の要素があるか否か(i≦I1)を判別する。そして、未処理の要素がない場合は、CPU101は、本処理を終了させる。一方、未処理の要素がある場合は、CPU101は、ステップS304に処理を進め、検出結果リストL2の要素[i]の顔部分に対して、特徴抽出部125が特徴量を抽出する。
FIG. 3 is a flowchart of the detection result list update process. First, in step S301, the
続いて、ステップS305では、個人認証部126が、特徴抽出部125により抽出された特徴量とROM103に格納された個人情報リストL1の特徴量hとを比較して個人認証処理を行う。すなわち、個人認証部126は、特徴量の比較により、処理中の要素と同一と判定できる要素が個人情報リストL1に登録されていることの認証を行う。
In step S305, the
そしてステップS306では、CPU101は、ステップS305での認証結果から、検出結果リストL2の要素[i]の認証結果aを更新する。つまり、認証された場合は、個人情報リストL1に登録されている要素の番号nの値を要素[i]の認証結果aに設定するが、そうでない場合は、認証結果aに0を設定する。次に、ステップS307では、CPU101は、カウンタiに1を加え、処理をステップS303に戻す。
In step S306, the
図3の処理によれば、検出結果リストL2は、1/60秒毎に更新され、個人情報リストL1の要素と一致する要素については認証結果aに正の値が設定される。 According to the processing of FIG. 3, the detection result list L2 is updated every 1/60 seconds, and positive values are set in the authentication result a for elements that match the elements of the personal information list L1.
以降に説明するように、図3の検出結果リスト更新処理が終了すると、更新した検出結果リストL2に基づいて、被写体リストL3を更新する被写体リスト更新処理(図4)に移行する。その後、更新した被写体リストL3から検出されなくなった顔部分の情報を削除するリスト削除処理(図5)に移行し、さらに、リスト削除処理が終わると主被写体選択処理(図6)に移行する。なお、図4〜図6の各処理の終了時には、変数やカウンタの値はリセットされる。 As will be described later, when the detection result list update process of FIG. 3 is completed, the process proceeds to a subject list update process (FIG. 4) for updating the subject list L3 based on the updated detection result list L2. Thereafter, the process proceeds to a list deletion process (FIG. 5) for deleting information of the face portion that is no longer detected from the updated subject list L3, and further to the main subject selection process (FIG. 6) when the list deletion process is completed. Note that the values of the variables and counters are reset at the end of each process in FIGS.
図2(c)に示す被写体リストL3とは、CPU101が特徴検出部124により毎フレームに検出される顔部分の相関関係をとり、連続的に顔部分の情報を保持しているリストであり、RAM102に格納される。
The subject list L3 shown in FIG. 2C is a list in which the
被写体リストL3には、特徴検出部124が検出した顔部分に対する番号n、中心位置(水平位置xと垂直位置y)、及び顔部分の大きさ(幅w)、認証結果a、主被写体情報m、主被写体回数c2、主被写体時間t2、消失フレーム数fが格納される。主被写体回数c2は、その顔部分が被写体リストL3に追加されてから撮影中に主被写体として設定された回数であり、主被写体時間t2は、その顔部分が被写体リストL3に追加されてから撮影中に主被写体として撮影された撮影時間を示す情報である。
In the subject list L3, the number n for the face part detected by the
CPU101は、検出結果リストL2が更新される毎に被写体リストL3を更新する。検出結果リストL2に格納されている顔部分と被写体リストL3に格納されている顔部分の位置及び大きさの相関関係から、同一被写体であるか否かが判定される。同一被写体と判定された顔部分は、その位置と大きさを検出結果リストL2より取得し、被写体リストL3を更新する。同一被写体と判定されなかった顔部分については、新しい顔部分として被写体リストL3に要素を追加する。
The
消失フレーム数fは、各要素について、検出結果リストL2との相関関係がなく顔部分の情報が更新されなかった場合に1ずつ増加する値である。消失フレーム数fは、何フレーム連続でその顔部分が検出されていないかを示す情報であり、フレームアウトしてから何フレーム目であるかを示す値でもある。 The number of lost frames f is a value that increases by 1 when each element has no correlation with the detection result list L2 and the face part information is not updated. The number of lost frames f is information indicating how many consecutive frames the face portion has not been detected, and is also a value indicating how many frames have passed since frame out.
消失フレーム数fが所定数以上になった時、撮影中の画角から該当人物がフレームアウトしたと認識して被写体リストL3から削除する。本実施の形態では一例として所定数を3とし、3フレーム連続で検出されなかったときに消失フレーム数fが3となり、被写体リストL3から対応する要素の情報が削除されるとする。 When the number of lost frames f becomes equal to or greater than a predetermined number, it is recognized that the person is out of frame from the angle of view during shooting and is deleted from the subject list L3. In the present embodiment, as an example, it is assumed that the predetermined number is 3, and the number of lost frames f is 3 when 3 frames are not detected consecutively, and the corresponding element information is deleted from the subject list L3.
主被写体情報mは、被写体リストL3内の顔部分の中で最も優先順位の高い顔部分か否かを示す情報である。m=1で、その要素(顔部分)が最も優先順位の高いことを示し、m=0で、そうでないことを示す。主被写体情報mの値は、被写体リスト更新処理(図4)、及びリスト削除処理(図5)の終了後において、CPU101による主被写体選択処理(図6)により更新される。主被写体に選択された顔部分の主被写体情報mが1に設定され、それ以外の顔部分の主被写体情報mは0に設定される。
The main subject information m is information indicating whether the face portion has the highest priority among the face portions in the subject list L3. m = 1 indicates that the element (face part) has the highest priority, and m = 0 indicates that it is not. The value of the main subject information m is updated by main subject selection processing (FIG. 6) by the
ここで、図5で後述する主被写体の選択方法について略説しておく。 Here, a method of selecting a main subject, which will be described later with reference to FIG. 5, will be briefly described.
ユーザは、操作部104のボタン操作によって、検出されている顔部分の中から所望の被写体を選択することで主被写体の設定が可能である(指定手段)。CPU101は、被写体リストL3においてユーザにより選択された顔部分の要素の主被写体情報mを1とし、RAM102に格納される被写体指示情報dを1とする。
The user can set the main subject by selecting a desired subject from the detected face parts by operating the buttons on the operation unit 104 (designating means). The
ここで被写体指示情報dとは、被写体リストL3における要素において、ユーザが主被写体として指定した要素があることを「1」で示し、ないことを「0」で示す情報である。また、ユーザ指定された顔部分が検出され続けている間は、被写体指示情報dはその値を保持し続けるものとし、3フレーム続けて顔部分が検出されなくなった場合、被写体指示情報dは0にリセットされる。一方、ユーザが主被写体を指定していない場合は、主被写体選択処理(図6)によって自動的に主被写体が選択・決定される。 Here, the subject instruction information d is information indicating by “1” that there is an element designated as the main subject by the user among the elements in the subject list L3, and “0” indicating that there is no element. Further, while the face portion designated by the user continues to be detected, the subject instruction information d keeps its value, and when the face portion is not detected continuously for three frames, the subject instruction information d is 0. Reset to. On the other hand, when the user has not designated the main subject, the main subject is automatically selected and determined by the main subject selection process (FIG. 6).
図4は、被写体リスト更新処理のフローチャートである。 FIG. 4 is a flowchart of subject list update processing.
まず、ステップS401〜S405で、CPU101は、被写体リストL3の全要素の消失フレーム数fに1を加える。すなわち、ステップS401では、被写体リストL3の要素数Jを取得する。次にステップS402において、CPU101は、被写体リストL3における処理中の要素の番号nを示すカウンタjを1に初期化する。ステップS403では、CPU101は、j≦Jが成立するか否か、すなわち被写体リストL3において未処理の要素があるか否かを判別する。
First, in steps S401 to S405, the
その判別の結果、未処理の要素がある場合(j≦J)は、CPU101は、ステップS404で、被写体リストL3の要素[j]の消失フレーム数fに1を加え、ステップS405でカウンタjに1を加える。その後、CPU101は、処理をステップS403に戻す。ステップS403で、未処理の要素がなくなると、CPU101は処理をステップS406に進める。
If there is an unprocessed element as a result of the determination (j ≦ J), the
次にステップS406〜S414で、CPU101は、検出結果リストL2に基づき、被写体リストL3に格納されている要素の情報を更新し、新規検出された顔部分があればそれを追加する。
Next, in steps S406 to S414, the
まず、ステップS406では、CPU101は、検出結果リストL2の要素数I1を取得する。ステップS407では、CPU101は、検出結果リストL2における処理中の要素の番号nを示すカウンタiを1に初期化する。ステップS408では、CPU101は、i≦I1が成立するか否か、すなわち検出結果リストL2において未処理の要素があるか否かを判別する。
First, in step S406, the
その判別の結果、未処理の要素がある場合(i≦I1)は、CPU101は、ステップS409で、同一被写体判定を実行する。ここで同一被写体判定として、被写体リストL3のいずれかの要素が検出結果リストL2の要素[i]と比較して位置及び大きさの相関関係があるかどうかを判定する。そしてステップS410では、ステップS409で同一と判定された要素があれば、その要素の被写体リストL3における番号nを、変数k1に格納する。一方、同一と判定された要素がない場合は、変数k1に0を格納する。
If there is an unprocessed element as a result of the determination (i ≦ I1), the
次に、ステップS411では、CPU101は、変数k1≠0が成立するか否かを判別する。その判別の結果、変数k1が0でない場合は、CPU101は、ステップS412で、被写体リストL3の番号[k1]の要素の顔部分の中心位置及び大きさ、さらには認証結果aの値を、検出結果リストL2の要素[i]における各値にて更新する。また要素の更新を行ったので、続くステップS413では、CPU101は、被写体リストL3の要素[k1]の消失フレーム数fを0にクリアする。
Next, in step S411, the
一方、ステップS411で変数k1が0であった場合は、処理中の要素[i]は新たな要素であるので、CPU101は、ステップS414で被写体リストL3にその要素を追加する。その際、要素の顔部分の中心位置及び大きさ、さらには認証結果aの値に、検出結果リストL2の当該要素[i]の各値を格納する。
On the other hand, if the variable k1 is 0 in step S411, since the element [i] being processed is a new element, the
ステップS412またはステップS414の処理後は、CPU101は、ステップS413でカウンタiに1を加える。ステップS408で、未処理の要素がなくなると、CPU101は本処理を終了させる。
After the process of step S412 or step S414, the
図5は、リスト削除処理のフローチャートである。 FIG. 5 is a flowchart of the list deletion process.
まず、ステップS501で、CPU101は、被写体リストL3の要素数Jを取得する。ステップS502では、CPU101は、被写体リストL3における処理中の要素の番号nを示すカウンタjを1に初期化する。ステップS503では、CPU101は、j≦Jが成立するか、すなわち被写体リストL3において未処理の要素があるか否かを判別する。
First, in step S501, the
そして、未処理の要素がある場合(j≦J)には、CPU101は、ステップS504で、被写体リストL3の要素[j]の消失フレーム数fが3である(f=3)か否かを判別する。その判別の結果、消失フレーム数が3である、すなわち3フレーム連続で検出されなくなった顔部分がある場合は、被写体リストL3内の対応する要素を、ステップS505〜S512にて削除する。
If there is an unprocessed element (j ≦ J), the
まず、ステップS505では、CPU101は、被写体リストL3の要素[j]の主被写体情報mが1であるか否かを判別する。そして、m=1であった場合は、要素[j]が主被写体として設定されているので、CPU101は、ステップS506で、被写体指示情報dが1であるか否かを判別する。その判別の結果、CPU101は、被写体指示情報dが0であれば処理をステップS508に進める一方、被写体指示情報dが1である場合は、ステップS507で、被写体指示情報dを0にクリアしてから処理をステップS508に進める。これにより、ユーザ指定が解除される。
First, in step S505, the
ステップS508では、CPU101は、被写体リストL3の要素[j]の認証結果a≠0が成立するか否かを判別する。その判別の結果、a≠0である場合は、削除しようとする要素[j]が個人情報を持っているので、個人情報リストL1の情報を更新する。すなわち、CPU101は、ステップS509で、変数k2に、被写体リストL3の要素[j]の認証結果aを格納する。そしてステップS510、S511で、CPU101は、個人情報リストL1の要素[k2]の主被写体回数c、主被写体時間tに、被写体リストL3の要素[j]の主被写体回数c2、主被写体時間t2をそれぞれ加えることで値を更新する。これにより個人情報が蓄積されていく。その後、CPU101は、処理をステップS512に進める。
In step S508, the
一方、ステップS508で認証結果a=0である場合は、削除しようとする要素[j]が個人情報を持っていないので、CPU101は、個人情報リストL1の情報を更新することなく、処理をステップS512に進める。
On the other hand, if the authentication result a = 0 in step S508, since the element [j] to be deleted does not have personal information, the
CPU101は、ステップS512で、要素[j]を被写体リストL3から削除し、ステップS513で、カウンタjに1を加えて、処理をステップS503に戻す。ステップS503で、未処理の要素がない場合(j>J)は、CPU101は、本処理を終了させる。ステップS504で、消失フレーム数が3でない場合は、3フレーム連続で検出されなくなった顔部分がないので、CPU101は、ステップS513に処理を進める。ステップS505で、主被写体情報mが1でない場合は、要素[j]が主被写体として設定されていないので、CPU101は、ステップS508に処理を進める。
In step S512, the
図4、図5の処理をまとめて略説すると次のようになる。図4の処理によれば、被写体リストL3は、検出結果リストL2が更新される毎に更新される。検出結果リストL2にあるが被写体リストL3にない要素については被写体リストL3に新規に追加される。検出結果リストL2にも被写体リストL3にもある同一判定の要素については、検出結果リストL2の値にて被写体リストL3が更新される。 The processing in FIGS. 4 and 5 is briefly summarized as follows. According to the process of FIG. 4, the subject list L3 is updated every time the detection result list L2 is updated. Elements that are in the detection result list L2 but not in the subject list L3 are newly added to the subject list L3. For the same determination element in both the detection result list L2 and the subject list L3, the subject list L3 is updated with the value of the detection result list L2.
また、図5の処理によれば、被写体リストL3にあるが検出結果リストL2にない(同一判定でない)状態が、3回続くと(消失フレーム数が3)、その要素は被写体リストL3から削除される。その際、ユーザ指定されていれば指定が解除される。また、削除される要素が個人情報リストL1に登録されている要素である場合は、個人情報リストL1における主被写体回数c、主被写体時間tに、被写体リストL3における主被写体回数c2、主被写体時間t2がそれぞれ加算され、累積されていく。 Further, according to the process of FIG. 5, when the state that is in the subject list L3 but not in the detection result list L2 (not the same determination) continues three times (the number of lost frames is 3), the element is deleted from the subject list L3. Is done. At this time, if the user has designated, the designation is canceled. When the element to be deleted is an element registered in the personal information list L1, the main subject count c and the main subject time t in the personal information list L1, and the main subject count c2 and the main subject time in the subject list L3. Each t2 is added and accumulated.
図6は、主被写体選択処理のフローチャートである。 FIG. 6 is a flowchart of the main subject selection process.
ステップS601では、CPU101は、被写体指示情報dが1(d=1)であるか否かを判別する。その判別の結果、d=0である場合は、ユーザによって主被写体が指定されていないので、ステップS602〜S609で、CPU101は、主被写体に設定する顔部分の要素を選択する処理を実行する。
In step S601, the
CPU101は、まず、ステップS602では、被写体リストL3において認証結果aが0でない(a≠0となる)要素の要素数I2を取得する。そして、CPU101は、ステップS603で、要素数I2≧1が成立するか否かを判別し、要素数I2≧1である場合は、ステップS604で、要素数I2≧2が成立するか否かを判別する。要素数I2=0である場合は、CPU101は、ステップS603からステップS605に処理を進める。
First, in step S602, the
ステップS605では、CPU101は、個人情報を持つ顔部分が検出されていないので、被写体リストL3における各要素について、顔部分の中心位置及び大きさによって優先順位付けを行う。優先度は、顔部分の位置が画像中心に近いほど高く、しかも顔部分の大きさが大きいほど高くなるものとする。例えば、被写体情報(顔部分の中心位置(x、y)、及び顔部分の大きさ(幅w))から、下記数式1によって優先度を求める。ここで特徴検出部124が検出に使う画像の中心位置を(Xmid、Ymid)とする。
In step S605, since the face portion having personal information is not detected, the
[数1]
優先度=顔の大きさ+(中心位置Xmid−|中心位置Xmid−位置x|)+(中心位置Ymid−|中心位置Ymid−位置y|)
これは、個人情報リストL1に登録されている人物がいない場合には、撮影画角において優位性のある人物(中心に近く大きい被写体)がユーザの撮りたいと意図する人物であると考えられるためである。
[Equation 1]
Priority = face size + (center position Xmid− | center position Xmid−position x |) + (center position Ymid− | center position Ymid−position y |)
This is because, when there is no person registered in the personal information list L1, it is considered that a person who is superior in shooting angle of view (a large subject close to the center) is a person intended to be taken by the user. It is.
その後、ステップS606では、CPU101は、被写体リストL3において最も優先度が高かった要素の番号nを変数k3に格納する。
Thereafter, in step S606, the
要素数I2=1である(個人情報をもつ顔部分が1つだけ検出されている)場合は、CPU101は、ステップS604からステップS607に処理を進める。ステップS607では、被写体リストL3において認証結果aが0でない1つの要素の番号nを変数k3に格納する。これは、個人情報リストL1に登録されている人物を優先的に選択するためである。
If the number of elements I2 = 1 (only one face portion having personal information is detected), the
要素数I2≧2である(個人情報をもつ顔部分が2つ以上検出された)場合は、CPU101は、ステップS604からステップS608に処理を進める。ステップS608では、CPU101は、被写体リストL3において認証結果aが0でない2以上の要素に対して優先順位付けを行う。すなわち、CPU101は、被写体リストL3において認証結果aが0でない各要素の認証結果aと同値の認証結果aを有する個人情報リストL1内の各要素[a]の、主被写体回数c、主被写体時間tを取得する。そして、主被写体回数cが多く主被写体時間tが長い要素ほど優先度が高くなるように優先順位付けをする。下記数式2により優先度を求める。
If the number of elements is I2 ≧ 2 (two or more face portions having personal information are detected), the
[数2]
優先度=主被写体回数c×主被写体時間t
これは、個人情報リストL1に登録されている人物が画面に複数写っている場合、これまでの撮影の中で主被写体として多数回、また長く撮られている人物の方がユーザの撮りたいと意図する人物であると考えられるためである。ステップS609では、CPU101は、ステップS608で優先順位付けを行った結果、最も優先度が高かった被写体リストL3内の要素の番号nを変数k3に格納する。
[Equation 2]
Priority = number of main subjects c × main subject time t
This is because when a plurality of persons registered in the personal information list L1 are displayed on the screen, the user wants to shoot a person who has been taken many times as a main subject and has taken a long time. This is because it is considered to be an intended person. In step S609, the
被写体リストL3における要素[k3]が、これから主被写体となるべき要素である。ステップS606、S607、S609の処理後は、CPU101は、処理をステップS610に進める。
The element [k3] in the subject list L3 is an element to be the main subject from now on. After the processes in steps S606, S607, and S609, the
ステップS610では、CPU101は、被写体リストL3の要素[k3]の主被写体情報mが1であるか否かを判別する。その判別の結果、要素[k3]の主被写体情報mが1である場合は、要素[k3]が既に主被写体に設定されているので、CPU101は、処理をステップS616に進める。
In step S610, the
一方、要素[k3]の主被写体情報mが1でない場合は、CPU101は、ステップS611で、被写体リストL3内で主被写体情報mが1である要素の番号nを変数k4に格納する。また、いずれの要素も主被写体情報が1でない場合には、変数k4に0を格納する。
On the other hand, if the main subject information m of the element [k3] is not 1, the
次に、ステップS612では、CPU101は、変数k4=0であるか否かを判別する。その判別の結果、CPU101は、変数k4=0である場合は、処理をステップS614に進める一方、変数k4=0でない場合は、被写体リストL3における要素[k4]の主被写体情報mを0にクリアしてから処理をステップS614に進める。
Next, in step S612, the
ステップS614では、CPU101は、被写体リストL3の要素[k3]の主被写体情報mを1に設定する。これにより要素[k3]が主被写体として新たに選択・決定されたことになる。そこで、ステップS615で、CPU101は、要素[k3]の主被写体回数c2に1を加える(c2←c2+1)。さらに、ステップS616で、CPU101は、被写体リストL3の要素[k3]の主被写体時間t2に検出周期を加える(t2←t2+検出周期)。ここで、検出周期とは特徴検出部124が検出処理を行う周期であり、1/60秒である。
In step S614, the
ステップS601で被写体指示情報dが1であった場合には、CPU101は、ステップS617で、主被写体に指定されている被写体リストL3の要素の番号nを変数k3に格納し、ステップS616の処理を実行する。ステップS616の処理後、主被写体選択処理が終了する。
If the subject instruction information d is 1 in step S601, the
このような図6の主被写体選択処理を略説すると次のようになる。まず、ユーザ指定がある場合は、その指定を最優先として主被写体を選択する(ステップS617)。ユーザ指定がない場合において、被写体リストL3の中に個人情報リストL1に登録されている要素があるとき、その要素が1つであれば、それを主被写体として決定する(ステップS607)。しかしそのような要素が複数存在するときは、それらの要素に関する個人情報(主被写体回数c及び主被写体時間t)に基づいて優先順位を決め、優先順位が最も高いものを主被写体として決定する(ステップS608、S609)。 The main subject selection process in FIG. 6 is briefly described as follows. First, if there is a user designation, the main subject is selected with the designation as the highest priority (step S617). When there is no user designation and there is an element registered in the personal information list L1 in the subject list L3, if there is one element, it is determined as the main subject (step S607). However, when there are a plurality of such elements, the priority order is determined based on the personal information (the main subject count c and the main subject time t) regarding these elements, and the one with the highest priority order is determined as the main subject ( Steps S608 and S609).
ユーザ指定がない場合において、被写体リストL3の中に個人情報リストL1に登録されている要素がないときは、被写体リストL3内の要素の中から主被写体を決定する。その際、個人情報を用いることができないので、専ら被写体情報(顔部分の中心位置(x、y)、及び顔部分の大きさ(幅w))に基づいて主被写体を決定する(ステップS605、S606)。 When there is no user designation, and there is no element registered in the personal information list L1 in the subject list L3, the main subject is determined from the elements in the subject list L3. At this time, since personal information cannot be used, the main subject is determined exclusively based on subject information (center position (x, y) of face portion and size (width w) of face portion) (step S605, S606).
また、ステップS610〜616では、被写体リストL3において優先度が最も高いとされた要素[k3]が、既に主被写体となっていれば、主被写体回数c2の加算はしないで主被写体時間t2だけ加算する。要素[k3]が主被写体となっていない場合は、要素[k3]を新たに主被写体とし、その際、それまで主被写体となっている要素があった場合はその主被写体情報mを0にリセットする。主被写体に選択されている要素は、図6の処理の度に主被写体時間t2が増加していく。 In Steps S610 to S616, if the element [k3] having the highest priority in the subject list L3 is already the main subject, the main subject count c2 is not added and the main subject time t2 is added. To do. If the element [k3] is not the main subject, the element [k3] is newly set as the main subject. If there is an element that has been the main subject at that time, the main subject information m is set to 0. Reset. For the element selected as the main subject, the main subject time t2 increases every time the processing of FIG. 6 is performed.
次に、ビデオカメラ100で複数の被写体を撮影した場合の、上記した図3〜図6の処理を反映させた動作例について説明する。
Next, an example of an operation reflecting the above-described processes of FIGS. 3 to 6 when a plurality of subjects are photographed by the
図7(a)は、撮影開始時の画像の例である。このときユーザは主被写体を指定しておらず(d=0)、また、CPU101によっても主被写体が自動設定されていないものとする。
FIG. 7A shows an example of an image at the start of photographing. At this time, it is assumed that the user does not designate the main subject (d = 0) and the main subject is not automatically set by the
画像900には人物910、920、930が写っている。またROM103に格納されている個人情報リストL1は図2(a)に示すものと同様とする。画像900において、人物910、920は、個人情報リストL1の番号2、3の人物であり、人物930は、個人情報リストL1に登録されていないとする。
In the
特徴検出部124は、人物910、920、930の顔部分を検出し、また個人認証部126は、人物910、920を個人情報リストL1における番号2、3の人物(要素)であると認証する(図3のステップS305)。人物930はいずれの人物とも認証されない。
The
CPU101は、検出結果と認証結果から検出結果リストL2を更新する(図4)。まず、検出結果リストL2より、被写体リストL3における人物910、920、930の顔の位置、大きさを更新する(図4のステップS412)。次に、被写体リストL3における人物910、920の認証結果aをそれぞれ2、3に設定し、また人物930の認証結果aを0に設定する。
The
次にCPU101は、被写体リストL3の削除処理を行う(図5)。この例では、人物910、920、930のいずれも顔部分が検出されているため、削除対象となる被写体リストL3の要素はない。
Next, the
次にCPU101は主被写体選択処理を行う(図6)。この例では、被写体リストL3において主被写体が決定されていない。さらに、既に個人情報リストL1に登録済みの人物は、人物910、920と2人いるため、上記数式2により、主被写体回数c、主被写体時間tに基づき優先順位付けを行う(図6のステップS608)。すなわち、CPU101は、図2(a)に示す個人情報リストL1を参照し、人物910(番号2)を主被写体として選択する。これは、人物910の方が人物920に比べて主被写体回数cが多く、主被写体時間tも長いためである。
Next, the
そして、CPU101は、被写体リストL3において人物910の主被写体回数c2に1を加える(ステップS615)。また、撮影中であるため主被写体時間t2に検出周期1/60秒を加える(ステップS616)。
Then, the
図7(b)は、図7(a)に示す撮影状態から、ビデオカメラを左側にパンし、人物910の特徴検出ができなくなってから3フレーム目の画像を表す図である。 FIG. 7B is a diagram illustrating an image of the third frame after the video camera is panned to the left from the shooting state illustrated in FIG.
図7(b)に示す画像1000においては、人物910の消失フレーム数fは2となっている。このとき消失フレーム数fは3未満であるため、被写体リストL3から削除されていない。また引き続き人物920、930の顔が検出され続けているものとする。被写体リストL3における人物910の主被写体時間t2は1分であるとする。
In the
人物910は消失フレーム数が3となると、被写体リストL3から削除される(図5のステップS512)。その際、人物910は認証結果aとして2をもつため、個人情報リストL1における番号nが2である人物の主被写体回数cに、人物910の被写体リストL3での主被写体回数c2の値(ここでは1)を加える(ステップS510)。さらに、個人情報リストL1の番号nが2である人物の主被写体時間tに、人物910の被写体リストL3における主被写体時間t2の値(ここでは1分)を加える(ステップS511)。
When the number of lost frames becomes 3, the
次にCPU101は主被写体選択処理を行う(図6)。人物910の要素が削除され、主被写体情報mをもつ被写体がいなくなっている。このとき認証結果aをもつ被写体として人物920のみが検出されているため、CPU101は、人物920を主被写体として選択する(図6のステップS607)。
Next, the
そして、CPU101は、被写体リストL3において人物920の主被写体回数c2に1を加え、また撮影中なので主被写体時間t2に検出周期1/60秒を加える(ステップS615、S616)。
Then, the
このように、顔部分が画面に新たに登場(フレームイン)すると、その顔部分が要素として被写体リストL3に追加される(図4のステップS414)。その顔部分が画面内に位置している間、被写体リストL3において主被写体時間t2が累積される(図6のステップS616)。そして、その顔部分が画面から3フレーム続けて消えると、そのときの被写体リストL3における主被写体回数c2、主被写体時間t2が個人情報リストL1における主被写体回数c、主被写体時間tに加算される(図5のステップS510、S511)。被写体リストL3における各要素の主被写体回数c2は、当該要素が新たに主被写体になる毎にカウントアップされる(図6のステップS615)。 Thus, when a new face portion appears on the screen (frame-in), the face portion is added as an element to the subject list L3 (step S414 in FIG. 4). While the face portion is located in the screen, the main subject time t2 is accumulated in the subject list L3 (step S616 in FIG. 6). When the face portion disappears from the screen for three frames in succession, the main subject count c2 and main subject time t2 in the subject list L3 at that time are added to the main subject count c and main subject time t in the personal information list L1. (Steps S510 and S511 in FIG. 5). The main subject count c2 of each element in the subject list L3 is counted up each time the element becomes a new main subject (step S615 in FIG. 6).
このような動作、構成によって、ユーザ指定がなくても、撮りたいであろう人物を主被写体として自動的に選択し、撮影していく過程で、登録されている人物の主被写体となる優先度を自動学習することができる。それによって個人情報を持つ被写体が複数存在する場合でも、ユーザが撮りたい可能性の高い人物を自動で優先して、その人物を撮るのに適切なカメラ制御を行うことができる。ビデオカメラのユーザは、個人情報が登録されている人物ごとに主被写体となる優先度をいちいち設定しなくてもよい。 With this operation and configuration, even if there is no user designation, the person who would like to shoot is automatically selected as the main subject, and in the process of shooting, the priority to become the main subject of the registered person is set. Can learn automatically. As a result, even when there are a plurality of subjects having personal information, it is possible to automatically prioritize a person who is likely to be photographed by the user and to perform camera control appropriate for taking the person. The user of the video camera does not have to set the priority to be the main subject for each person whose personal information is registered.
よって、本実施の形態によれば、手間をかけることなく、ユーザが意図する被写体を学習により推測して自動的に主被写体として決定することができる。 Therefore, according to the present embodiment, the subject intended by the user can be estimated by learning and automatically determined as the main subject without taking time and effort.
また、被写体リストL3において認証結果aが0でない要素が存在しない場合は、被写体リストL3における各要素について、顔部分の中心位置及び大きさによって優先順位付けを行う。これにより、撮影画像中に登録された顔部分がない場合であっても、撮影画像中の被写体の中から自動的に主被写体を決定することができる。 If there is no element in the subject list L3 whose authentication result a is not 0, each element in the subject list L3 is prioritized according to the center position and size of the face portion. Thereby, even when there is no registered face portion in the captured image, the main subject can be automatically determined from the subjects in the captured image.
(第2の実施の形態)
第1の実施の形態では、個人情報リストL1に登録された人物をより優先的に主被写体にする構成であり、被写体が少数の場合には有効である。しかし、多人数を同時に撮影するような場合には、特定の人物のみが優先されてしまう傾向がある。画角に写る多人数全体を撮影したいというユーザの意図がある場合に、第1の実施の形態のビデオカメラでは適切に主被写体を自動決定して撮影することが困難となる場合も想定される。
(Second Embodiment)
The first embodiment has a configuration in which a person registered in the personal information list L1 is more preferentially used as a main subject, and is effective when the number of subjects is small. However, when a large number of people are photographed at the same time, only a specific person tends to be prioritized. When there is a user's intention to capture the entire group of people in the angle of view, it may be difficult for the video camera of the first embodiment to automatically determine the main subject appropriately and capture it. .
そこで、本発明の第2の実施の形態では、登録の有無に拘わらずすべての被写体に対して優先順位付けを行い、検出人数に応じて優先度を変化させる構成を説明する。第2の実施の形態では、第1の実施の形態に対し、CPU101が主被写体を自動選択する方法が異なり、図6に代えて図8を用いて説明する。
Therefore, in the second embodiment of the present invention, a configuration will be described in which priorities are assigned to all subjects regardless of whether or not they are registered, and the priorities are changed according to the number of detected people. The second embodiment differs from the first embodiment in the method in which the
図8は、主被写体選択処理のフローチャートである。 FIG. 8 is a flowchart of the main subject selection process.
ステップS801、S811、S810の処理は、図6のステップS601、S617、S616の処理と同様である。ステップS801の判別の結果、被写体指示情報dが0である場合は、ユーザによって主被写体が指定されていないので、ステップS802、S803で、CPU101は、主被写体に設定する顔部分の要素を選択するための優先順位付けを実行する。
The processes in steps S801, S811, and S810 are the same as the processes in steps S601, S617, and S616 in FIG. As a result of the determination in step S801, if the subject instruction information d is 0, the main subject has not been designated by the user, so in steps S802 and S803, the
ステップS802で、CPU101は特徴検出部124により検出された顔部分の数(検出人数)と被写体情報(顔部分の位置(x、y)及び顔部分の大きさ(幅w))と個人情報(主被写体回数c及び主被写体時間t)とに基づき優先順位付けを行う。優先度は下記数式3により求められる。ただし、被写体の数に応じて適切に主被写体を決めることができれば、優先度を求める式はこれ以外であってもよい。
In step S802, the
[数3]
優先度=(個人情報による優先度)/検出人数+(顔の位置及び大きさによる優先度)×検出人数
ここで「個人情報による優先度」は主被写体回数cが多いほど、また主被写体時間tが長いほど高い値となり、ここでは、第1の実施の形態で用いた数式2と同様の式で求められる。また「顔の位置及び大きさによる優先度」は、顔部分の位置が画像中心に近いほど、また顔部分の大きさが大きいほど高い値となり、ここでは第1の実施の形態で用いた数式1と同様の式で求められる。
[Equation 3]
Priority = (priority based on personal information) / number of detected persons + (priority based on face position and size) × number of detected persons Here, “priority based on personal information” indicates that the main subject count c increases and the main subject time increases. The longer t is, the higher the value is, and here, it is obtained by the same expression as
「個人情報による優先度」を「検出人数」で除し、「顔の位置及び大きさによる優先度」を「検出人数」で乗じている。これにより、検出人数が多くなるほど、個人情報リストL1における個人情報(主被写体回数c、主被写体時間t)よりも被写体リストL3における被写体情報(顔の位置及び大きさ)の重み付けを重くして主被写体が決定される。 “Priority based on personal information” is divided by “number of detected persons”, and “priority based on face position and size” is multiplied by “number of detected persons”. As a result, as the number of detected persons increases, the subject information (face position and size) in the subject list L3 is weighted more heavily than the personal information (main subject count c, main subject time t) in the personal information list L1. The subject is determined.
このようにする理由は、画像に写っている被写体人数が多い場合は、主被写体となった回数や時間の実績が大きい人物だけを意図しているわけではないと考えられるからである。平易に言い換えれば、検出人数が多くなるほど、過去の実績よりも現在の撮影状態に重きをおくためである。従って、被写体人数が多い場合は、個人情報リストL1から得られる優先度よりも被写体リストL3から得られる優先度に重点をおく。反対に、被写体人数が少ない場合は、被写体リストL3から得られる優先度よりも個人情報リストL1から得られる優先度に重点をおく。 The reason for this is that when there are a large number of subjects in the image, it is considered that not only a person with a large record of the number of times and time of being a main subject is intended. In other words, this is because as the number of detected people increases, the current shooting state is more weighted than the past results. Therefore, when the number of subjects is large, priority is given to the priority obtained from the subject list L3 rather than the priority obtained from the personal information list L1. On the contrary, when the number of subjects is small, priority is given to the priority obtained from the personal information list L1 rather than the priority obtained from the subject list L3.
ところで、「個人情報による優先度」と「顔の位置及び大きさによる優先度」は、被写体の数に応じて適切な値となるよう調整しておく。例えば、各顔部分の優先度の値を比率で表し、検出人数全員の合計が1となるように、各顔部分の優先度の値を決め、値が大きい方が優先度が高いとする。 By the way, “priority based on personal information” and “priority based on face position and size” are adjusted to be appropriate values according to the number of subjects. For example, the priority value of each face part is represented by a ratio, and the priority value of each face part is determined so that the total number of detected persons is 1, and the higher the value, the higher the priority.
次に、ステップS803では、被写体リストL3における最も優先度が高かった要素の番号nを変数k3に格納する。続くステップS804〜ステップS809の処理は、図6のステップS610〜S615の処理と同様である。 In step S803, the number n of the element having the highest priority in the subject list L3 is stored in the variable k3. The subsequent steps S804 to S809 are the same as the steps S610 to S615 of FIG.
次に、ビデオカメラ100で複数の被写体を撮影した場合の、図3〜図5、図8の処理を反映させた具体的な動作例について説明する。
Next, a specific operation example in which the processing of FIGS. 3 to 5 and FIG. 8 is reflected when a plurality of subjects are photographed by the
図9(a)は、撮影開始時の画像の例である。 FIG. 9A shows an example of an image at the start of shooting.
このときユーザは主被写体を指定しておらず、またCPU101によっても主被写体が自動設定されていないものとする。撮影画像1200には人物1210、1220、1230、1240、1250が写っている。またROM103に格納されている個人情報リストL1は図2(a)に示すものと同様とする。撮影画像1200において人物1210、1220は個人情報リストL1における番号2、3の人物であるとする。
At this time, it is assumed that the user has not designated the main subject and the main subject has not been automatically set by the
図9(b)は、撮影画像1200における各人物の検出人数を考慮しない場合の個人情報による優先度と顔の位置及び大きさによる優先度とを示す図である。図中のグラフが長いほど優先度が高い。図9(b)に示すように、顔の位置及び大きさによる優先度をP(P1〜P5)で示す。人物1210、1220、1230、1240、1250における顔の位置及び大きさによる優先度はそれぞれP1、P2、P3、P4、P5となる。
FIG. 9B is a diagram showing the priority based on personal information and the priority based on the position and size of the face when the number of detected persons in the captured
顔の位置及び大きさでは人物1240が画像中心に近く、大きく写っているため優先度P4の長さが一番長くなっている。逆に人物1220や人物1230は撮影画角の端に近く、顔の大きさが小さいため優先度P2、P3が短い。またQ(Q1〜Q5)は、個人情報による優先度であり、人物1210、1220は個人情報が登録されているので個人情報による優先度Q1、Q2を有する。図2(a)の番号2、3に示すように、人物1210の方が人物1220と比べて主被写体回数cが多く、主被写体時間tも長いため、優先度Q1の方が優先度Q2よりも長くなっている。
In terms of the position and size of the face, the
この状態での主被写体が選択されるまでの処理について説明する。始めに、特徴検出部124は人物1210、1220、1230、1240、1250の顔部分を検出する。個人認証部126は人物1210、1220を個人情報リストL1における番号2、3の人物であると認証し、人物1230、1240、1250は個人情報なしと認証する。CPU101は検出結果と認証結果から検出結果リストL2を更新する(図3)。そして、検出結果リストL2より、被写体リストL3における人物1210、1220、1230、1240、1250の顔の位置及び大きさを更新する(図4)。その際、人物1210、1220の認証結果aをそれぞれ2、3に設定し、人物1230、1240、1250の認証結果aをいずれも0に設定する。
Processing until the main subject is selected in this state will be described. First, the
次にCPU101は、被写体リストL3の削除処理を行う(図5)。この場合、人物1210、1220、1230、1240、1250のいずれも顔が検出されているため、削除対象となる顔部分はない。
Next, the
次にCPU101は、主被写体の選択処理を行う(図8)。まず検出された各人物の優先度を求める。ここで検出人数は5人であるため、図9(b)における各人物の優先度を求めるに際し、上記数式3により、顔の位置及び大きさによる優先度Pを5倍し、個人情報による優先度Qを1/5倍にする。その結果を図10に示す。
Next, the
図10は、撮影画像1200における各人物の検出人数を考慮した場合の優先度P及び優先度Qを示す図である。図10に示すように、検出人数が多い場合には個人情報の有無よりも、撮影画角での優位性のある人物が優先されるようになる。優先度が最大となるのは人物1240であるため、CPU101は人物1240を主被写体として選択する。そして、CPU101は被写体リストL3において人物1240の主被写体回数c2に1を加える。また撮影中であるため主被写体時間t2に検出周期1/60秒を加える。
FIG. 10 is a diagram illustrating the priority P and the priority Q when the number of detected persons in the captured
図11(a)は、図9(a)に示す状態から人物1220、1230が同時にフレームアウトし、人物1220、1230が検出できなくなって3フレーム目の撮影画像を表す図である。この撮影画像1500では、人物1220、1230の消失フレーム数は2となっている。また人物1210、1240、1250は移動しておらず、検出され続けているものとする。このとき主被写体は人物1240のままであり、変更はないものとする。
FIG. 11A shows a photographed image of the third frame when the
特徴検出部124は人物1210、1240、1250の顔部分を検出する。個人認証部126は人物1210を個人情報リストL1における番号2の人物であると認証し、人物1240、1250はいずれも個人情報なしと認証する。CPU101は検出結果と認証結果から検出結果リストL2を更新する(図3)。そして、検出結果リストL2より、被写体リストL3における人物1210、1240、1250の位置及び大きさを更新する(図4)。その際、人物1210の認証結果aを2に設定し、人物1240、1250の認証結果aを0に設定する。
The
人物1220、1230は、検出されなくなって3フレーム目が過ぎ、消失フレーム数が3となると、被写体リストL3から削除される(図5)。このとき、人物1220は主被写体になっておらず、また人物1230は個人情報をもたないため、個人情報リストL1は更新されない。
The
次にCPU101は主被写体の選択処理を行う(図8)。まず検出された各人物の優先度を求める。ここで検出人数は3人であるため、図9(b)における各人物の優先度を求めるに際し、上記数式3により、顔の位置及び大きさによる優先度Pを3倍し、個人情報による優先度Qを1/3倍にする。その結果を図11(b)に示す。
Next, the
図11(b)は、撮影画像1500における各人物の検出人数を考慮した場合の優先度P及び優先度Qを示す図である。
FIG. 11B is a diagram illustrating the priority P and the priority Q when the number of detected persons in the captured
図11(b)に示すように、検出人数が3人と少ない場合には、個人情報による優先度Pは下がるものの、検出人数が5人の場合と比べれば高い優先度を保ち、個人情報が登録されている人物が優先される度合いが比較的高くなっている。優先度が最大となるのは人物1210であるので、CPU101は、人物1210を主被写体として選択する。そして、CPU101は被写体リストL3において人物1210の主被写体回数c2に1を加え、また撮影中なので主被写体時間t2に検出周期1/60秒を加える。
As shown in FIG. 11 (b), when the number of detected people is as small as three, the priority P based on the personal information is lowered, but the priority is kept higher than when the number of detected people is five, and the personal information is The degree of priority of registered persons is relatively high. Since the
続いて図11(a)に示す状態から人物1240、1250は移動せず、人物1210のみフレームアウトした場合を考える。人物1210がフレームアウトし、顔検出できなくなって3フレーム目が過ぎると、CPU101は人物1210を被写体リストL3から削除する。このとき、人物1210は主被写体であり、認証結果aが2であるため、CPU101は個人情報リストL1の番号2の主被写体回数cに、人物1210の被写体リストL3での主被写体回数c2の値である1を加える。また同様に個人情報リストL1の番号2の主被写体時間tに、人物1210の被写体リストL3での主被写体時間t2を加える。
Next, consider a case where the
次にCPU101は主被写体選択処理を行う(図8)。人物1210は既に削除されており、主被写体情報mを持つ被写体がいない。このとき、人物1240、1250が被写体である。人物1240、1250はいずれも個人情報を持たないので、CPU101は、上記数式3に基づき、顔の位置及び大きさによる優先度Pが高い人物1240を主被写体に選択する。そして、CPU101は被写体リストL3において人物1240の主被写体回数c2に1を加え、また撮影中なので主被写体時間t2に検出周期1/60秒を加える。
Next, the
本実施の形態によれば、個人情報(主被写体回数c、主被写体時間t)、検出人数、及び被写体情報(顔の位置及び大きさ)に基づいて主被写体を決定する。特に、被写体が複数の場合でも、検出人数が多くなるほど、個人情報よりも被写体情報の重み付けを重くして主被写体を決定する。これにより、手間をかけることなく、ユーザが意図する被写体を学習により推測して自動的に主被写体として決定することに関し、第1の実施の形態と同様の効果を奏することができる。それだけでなく、特徴部分の数に応じて意図する被写体をより適切に推測することができる。 According to the present embodiment, the main subject is determined based on the personal information (main subject count c, main subject time t), the number of detected people, and subject information (face position and size). In particular, even when there are a plurality of subjects, the main subject is determined by weighting subject information more heavily than personal information as the number of detected people increases. As a result, the same effect as that of the first embodiment can be achieved with respect to automatically deciding the subject intended by the user by learning and automatically determining it as the main subject without taking time and effort. In addition, the intended subject can be estimated more appropriately according to the number of characteristic portions.
なお、上記各実施の形態において、優先度を求める際に、個人情報(個別情報)として主被写体回数c及び主被写体時間tの双方の情報を用いたが、これらのいずれか一方のみを用いるようにしてもよい。また同様に、被写体情報として、顔の位置及び大きさの双方の情報を用いたが、これらのいずれか一方のみを用いるようにしてもよい。 In each of the above embodiments, when obtaining the priority, information on both the main subject count c and the main subject time t is used as personal information (individual information), but only one of them is used. It may be. Similarly, both the face position and size information are used as the subject information, but only one of them may be used.
また、優先度を求めるうえで上記数式1〜3に例示する算出式を用いたが、これに限るものではなく、マップやテーブルを用いて優先度を求めてもよい。 Moreover, when calculating | requiring a priority, although the calculation formula illustrated to said Numerical formula 1-3 was used, it is not restricted to this, You may obtain | require a priority using a map or a table.
なお、登録や検出の対象となる特徴部分として、人物の顔部分を例示したが、これに限るものではなく、撮影画像中で特徴となる部分であればよい。例えば、特定の文字、図形、模様等でもよく、部品検査や、画像中から特定の対象物を探し出すような撮影装置にも適用可能である。 In addition, although the face part of a person was illustrated as a characteristic part used as the object of registration or detection, it is not restricted to this, What is necessary is just a part which becomes a characteristic in a picked-up image. For example, it may be a specific character, figure, pattern, or the like, and can also be applied to a part inspection or an imaging apparatus that searches for a specific object from an image.
さらに、決定した主被写体に合わせて絞りやフォーカス等の撮影制御を行う撮影装置を例にあげて説明を行ったが、これに限られるものではない。例えば、パーソナルコンピュータやネットワークサーバー等で、取得した画像に対し、決定した主被写体が適正値となるように輝度や彩度を補正したり、主被写体における光学収差が最も小さくなるように画像を変形させたりする処理を実行してもよい。あるいは、主被写体が中心となるように画像を切り出したり、主被写体のサイズや座標に関する情報を画像に付随させて記憶させたりする処理を実行してもよい。 Furthermore, although the description has been given by taking as an example a photographing apparatus that performs photographing control such as an aperture and a focus in accordance with the determined main subject, the present invention is not limited to this. For example, with a personal computer or network server, the brightness and saturation of the acquired image are corrected so that the determined main subject has an appropriate value, or the image is deformed so that the optical aberration in the main subject is minimized. Or may be executed. Alternatively, a process may be executed in which an image is cut out so that the main subject is at the center, or information related to the size and coordinates of the main subject is attached to the image and stored.
このように、複数の人物が検出された場合に、主被写体回数c及び主被写体時間tの少なくとも一方を用いて主被写体を決定することができる画像処理装置であればよく、主被写体に関する情報をどのような処理に用いるかについては限定されるものではない。 As described above, when a plurality of persons are detected, any image processing apparatus that can determine the main subject using at least one of the main subject count c and the main subject time t may be used. The type of processing used is not limited.
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。 Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. A part of the above-described embodiments may be appropriately combined.
101 CPU
103 ROM
104 操作部
114 CCDイメージセンサ
124 特徴検出部
L1 個人情報リスト
L2 検出結果リスト
L3 被写体リスト
c、c2 主被写体回数
t、t2 主被写体時間
101 CPU
103 ROM
104
Claims (6)
画像から特徴部分を検出する検出手段と、
前記検出手段により検出された特徴部分の中から主被写体を決定する決定手段と、
前記登録手段により登録された特徴部分の各々について、前記決定手段により主被写体として決定された累積回数及び主被写体とされた累積時間の少なくとも一方を個別情報として蓄積する蓄積手段とを有し、
前記決定手段は、前記検出手段により検出された特徴部分の中に前記登録手段により登録された特徴部分と同一の特徴部分が存在する場合は、前記蓄積手段により蓄積されている前記同一の特徴部分に関する個別情報に基づいて主被写体を決定することを特徴とする画像処理装置。 A registration means for registering the characteristic part;
Detecting means for detecting a characteristic portion from the image;
Determining means for determining a main subject from the characteristic portions detected by the detecting means;
Storage means for storing, as individual information, at least one of the cumulative number determined as the main subject and the cumulative time determined as the main subject for each feature portion registered by the registration means,
The determination means includes the same feature portion stored by the storage means when the same feature portion as the feature portion registered by the registration means exists in the feature portion detected by the detection means. An image processing apparatus, wherein a main subject is determined based on individual information relating to an image.
前記決定手段は、前記検出手段により検出された特徴部分の中に前記登録手段により登録された特徴部分と同一の特徴部分が存在する場合は、前記蓄積手段により蓄積されている前記同一の特徴部分に関する個別情報、前記検出された特徴部分の数、及び前記検出された被写体情報に基づいて主被写体を決定することを特徴とする請求項1または2に記載の画像処理装置。 The detection means detects a feature portion from the image, and detects at least one of a size of the detected feature portion and a position of the detected feature portion in the image as subject information,
The determination means includes the same feature portion stored by the storage means when the same feature portion as the feature portion registered by the registration means exists in the feature portion detected by the detection means. 3. The image processing apparatus according to claim 1, wherein a main subject is determined based on the individual information relating to the information, the number of detected feature portions, and the detected subject information.
画像から特徴部分を検出する検出工程と、
前記検出工程により検出された特徴部分の中から主被写体を決定する決定工程と、
前記登録工程により登録された特徴部分の各々について、前記決定工程により主被写体として決定された累積回数及び主被写体とされた累積時間の少なくとも一方を個別情報として蓄積する蓄積工程とを有し、
前記決定工程は、前記検出工程により検出された特徴部分の中に前記登録工程により登録された特徴部分と同一の特徴部分が存在する場合は、前記蓄積工程により蓄積されている前記同一の特徴部分に関する個別情報に基づいて主被写体を決定することを特徴とする画像処理方法。 A registration process for registering the feature part;
A detection step of detecting a feature from the image;
A determination step of determining a main subject from the characteristic portions detected by the detection step;
An accumulation step of accumulating at least one of the cumulative number determined as the main subject and the cumulative time determined as the main subject as individual information for each of the feature parts registered in the registration step;
In the determination step, if the same feature portion as the feature portion registered by the registration step exists in the feature portion detected by the detection step, the same feature portion accumulated by the accumulation step An image processing method comprising: determining a main subject based on individual information relating to
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012026143A JP5921236B2 (en) | 2012-02-09 | 2012-02-09 | Image processing apparatus and method, photographing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012026143A JP5921236B2 (en) | 2012-02-09 | 2012-02-09 | Image processing apparatus and method, photographing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013165321A true JP2013165321A (en) | 2013-08-22 |
JP5921236B2 JP5921236B2 (en) | 2016-05-24 |
Family
ID=49176447
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012026143A Expired - Fee Related JP5921236B2 (en) | 2012-02-09 | 2012-02-09 | Image processing apparatus and method, photographing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5921236B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084295A1 (en) * | 2015-11-17 | 2017-05-26 | 华为技术有限公司 | Automatic focusing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007006033A (en) * | 2005-06-22 | 2007-01-11 | Omron Corp | Object determining apparatus, imaging device, and supervisory apparatus |
JP2009017038A (en) * | 2007-07-02 | 2009-01-22 | Fujifilm Corp | Digital camera |
JP2011039797A (en) * | 2009-08-11 | 2011-02-24 | Sony Ericsson Mobile Communications Ab | Apparatus, method and program for automatically adding title, and mobile terminal apparatus |
-
2012
- 2012-02-09 JP JP2012026143A patent/JP5921236B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007006033A (en) * | 2005-06-22 | 2007-01-11 | Omron Corp | Object determining apparatus, imaging device, and supervisory apparatus |
JP2009017038A (en) * | 2007-07-02 | 2009-01-22 | Fujifilm Corp | Digital camera |
JP2011039797A (en) * | 2009-08-11 | 2011-02-24 | Sony Ericsson Mobile Communications Ab | Apparatus, method and program for automatically adding title, and mobile terminal apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084295A1 (en) * | 2015-11-17 | 2017-05-26 | 华为技术有限公司 | Automatic focusing method and device |
Also Published As
Publication number | Publication date |
---|---|
JP5921236B2 (en) | 2016-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6101397B2 (en) | Photo output method and apparatus | |
EP1737216B1 (en) | Object determination device, imaging device and monitor | |
JP2010010936A (en) | Image recording apparatus, image recording method, image processing apparatus, image processing method, and program | |
JP2011147109A (en) | Image capturing apparatus and image processing apparatus | |
JP2009017223A (en) | Imaging device, image processing device, and their image processing method and program | |
JP2015128259A (en) | Image processing device, photographing device, photographing system, image processing method, and computer program | |
JP6594666B2 (en) | Imaging auxiliary device, imaging device, and imaging auxiliary method | |
JP6410427B2 (en) | Information processing apparatus, information processing method, and program | |
JP5921236B2 (en) | Image processing apparatus and method, photographing apparatus | |
KR20180075506A (en) | Information processing apparatus, information processing method, and program | |
JP2010263550A (en) | Image processing apparatus | |
JP5484129B2 (en) | Imaging device | |
US10970901B2 (en) | Single-photo generating device and method and non-volatile computer-readable media thereof | |
JP6157238B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP7182893B2 (en) | Image processing device, imaging device, image processing method, and program | |
JP5675922B2 (en) | Shooting display device | |
JP2008098739A (en) | Imaging apparatus, image processing method used for imaging apparatus and program making computer execute same image processing method | |
JP5995610B2 (en) | Subject recognition device and control method therefor, imaging device, display device, and program | |
TW201015983A (en) | Image processing device and recording medium | |
JP5967422B2 (en) | Imaging apparatus, imaging processing method, and program | |
JP2010154323A (en) | Image processing apparatus, image extraction method, and, program | |
JP6319981B2 (en) | Imaging apparatus, information processing method, and program | |
JP2012244249A (en) | Imaging apparatus and imaging method | |
JP2020043544A (en) | Imaging device, control method therefor, program, and storage medium | |
WO2017208423A1 (en) | Image processing device, image processing method, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150202 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20151019 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151027 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151228 |
|
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: 20160315 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160412 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5921236 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |