JP2017225192A - Main subject estimation device, program and information processing device - Google Patents
Main subject estimation device, program and information processing device Download PDFInfo
- Publication number
- JP2017225192A JP2017225192A JP2017176679A JP2017176679A JP2017225192A JP 2017225192 A JP2017225192 A JP 2017225192A JP 2017176679 A JP2017176679 A JP 2017176679A JP 2017176679 A JP2017176679 A JP 2017176679A JP 2017225192 A JP2017225192 A JP 2017225192A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- main subject
- size
- main
- captured image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000010365 information processing Effects 0.000 title description 6
- 238000001514 detection method Methods 0.000 claims abstract description 38
- 230000006870 function Effects 0.000 description 106
- 238000012545 processing Methods 0.000 description 54
- 238000000034 method Methods 0.000 description 31
- 238000010586 diagram Methods 0.000 description 25
- 230000008569 process Effects 0.000 description 17
- 230000008859 change Effects 0.000 description 16
- 230000007423 decrease Effects 0.000 description 14
- 238000003384 imaging method Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 9
- 230000006854 communication Effects 0.000 description 9
- 238000013459 approach Methods 0.000 description 8
- 240000006829 Ficus sundaica Species 0.000 description 6
- 238000012937 correction Methods 0.000 description 5
- 238000010295 mobile communication Methods 0.000 description 5
- 238000010606 normalization Methods 0.000 description 5
- 230000007175 bidirectional communication Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004091 panning Methods 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000007717 exclusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000011514 reflex Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、主要被写体推定装置及びプログラム並びに情報処理装置に関する。 The present invention relates to a main subject estimation device, a program, and an information processing device.
ジャイロセンサ等により検出されたカメラ本体のパンニング又はチルティング動作に基づいて主要被写体を変更しようとする撮影者の意図を推定し、この推定結果から主要被写体を判定する技術が知られている(例えば、下記特許文献1)。 A technique is known in which a photographer's intention to change a main subject is estimated based on a panning or tilting operation of the camera body detected by a gyro sensor or the like, and the main subject is determined from the estimation result (for example, Patent Document 1) below.
しかし、特許文献1の技術では、主要被写体を判定するためにパンニング又はチルティング動作を検出する必要があるため、種々の撮影状況に応じて主要被写体を設定する上で制約があった。
However, in the technique of
本発明は、上記事実に鑑みなされたもので、種々の撮影状況に応じて主要被写体を推定することを可能にした、主要被写体推定装置及びプログラム並びに情報処理装置を提供することを、その目的とする。 The present invention has been made in view of the above-described facts, and its object is to provide a main subject estimation device, a program, and an information processing device that can estimate a main subject according to various shooting situations. To do.
第1の態様によると、主要被写体推定装置は、複数の画像を取得する画像取得部と、前記画像取得部が取得した撮像画像から被写体を検出する被写体検出部と、前記被写体検出部が検出した被写体の前記撮像画像内での大きさに関する被写体情報を検出する被写体情報検出部と、前記被写体情報に基づいて、前記複数の撮像画像から主要被写体を推定する主要被写体推定部と、を備え、前記被写体推定部は、第1画像内で主要被写体とされた第1の被写体の前記被写体情報が、前記第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、前記第1の被写体と異なる第2の被写体の前記被写体情報が、前記第1条件と異なる第2条件を満たした時に主要被写体を前記第2の被写体に変更する。 According to the first aspect, the main subject estimation device includes an image acquisition unit that acquires a plurality of images, a subject detection unit that detects a subject from the captured image acquired by the image acquisition unit, and the subject detection unit A subject information detection unit that detects subject information related to the size of the subject in the captured image, and a main subject estimation unit that estimates a main subject from the plurality of captured images based on the subject information, The subject estimation unit does not satisfy the first condition in the second image acquired after the first image, the subject information of the first subject that is the main subject in the first image, and The main subject is changed to the second subject when the subject information of the second subject different from the first subject satisfies a second condition different from the first condition.
本発明によれば、種々の撮影状況に応じて主要被写体を推定することが可能となる。 According to the present invention, it is possible to estimate a main subject according to various shooting situations.
以下、図面を参照して本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1には、本発明の各実施形態に係る主要被写体推定装置及びプログラムが適用されるデジタルカメラの概略構成図が示されている。 FIG. 1 is a schematic configuration diagram of a digital camera to which a main subject estimation device and a program according to each embodiment of the present invention are applied.
図1に示されるデジタルカメラ10は、カメラボディ11と、カメラボディ11に交換可能に装着される撮影レンズ12と、を備えている。撮影レンズ12は、カメラボディ11に固定されたものであってもよいが、本実施形態では撮影レンズ12を交換可能なレンズとして説明する。
カメラボディ11は、デジタルカメラ10全体を制御する制御部1と、画像処理ユニット2と、CCDやCMOS等で構成される撮像素子5と、撮像素子5により撮影された画像、撮影情報、撮影メニューなどを表示するディスプレイ6と、無線通信部9とを備えている。
デジタルカメラ10は、被写体に対する焦点調整を自動的に行う自動合焦(AF)動作が可能な構成とされている。この自動合焦動作を行うため、撮影レンズ12は、合焦レンズ群15を備えている。合焦方式としては、例えば、コントラスト式AF、位相差検出式AF、或いは両者を併用した合焦方式が採用される。コントラスト式AFは撮像素子5の出力に基づいて実行される。位相差検出式AFは、図示しないAFセンサモジュール、或いは、撮像素子5に埋め込まれた位相差検出AFセンサを用いて実行される。
A
The
The
図2には、デジタルカメラ10の各構成要素の接続態様を示す回路ブロック図が示されている。同図に示されるように、前述した制御部1、画像処理ユニット2、撮像素子5、ディスプレイ6、無線通信部9及び撮像レンズ12は、双方向に通信可能にシステムバス3に接続されている。更に、デジタルカメラ10(カメラボディ11)は、操作インターフェース部7及びメモリカードアクセス部8を備えている。これらの構成要素も、上記した構成要素と共に双方向に通信可能にシステムバス3に接続されている。
FIG. 2 is a circuit block diagram showing a connection mode of each component of the
制御部1は、少なくとも、CPU1a、RAM1b、ROM1c、及び、フラッシュメモリ1dを備えている。これらの構成要素は、内部バス1eを介して双方向に通信可能に接続されている。内部バス1eは、システムバス3に接続されている。CPU1aは、ROM1c又はフラッシュメモリ1dに予め格納されているプログラムに基づいて所定の処理、例えば後述する被写体追尾を実行する。CPU1aは、内部バス1e及びシステムバス3を介して他の構成要素にコマンドを送信することによって、当該他の構成要素を制御する。また、当該他の構成要素からのデータ、例えば画像処理ユニット2から送信された画像データは、システムバス3及び内部バス1eを介してRAM1b、或いはフラッシュメモリ1dに送られ、RAM1b或いはフラッシュメモリ1dに格納される。CPU1aは、RAM1b、或いはフラッシュメモリ1dに記憶された画像データに対して、演算処理を実行することもできる。また、ROM1cは、例えば、デジタルカメラ10に関する情報も格納している。
画像処理ユニット2は、撮像素子5で撮像された画像に対応する画像データに対して所定の画像処理、例えばホワイトバランス処理、ガンマ補正処理、レンズ収差の補正処理、ノイズ低減処理、ダイナミックレンジの拡大処理、画像データのリサイズ処理、RAWデータからJPEG等の圧縮データへの変換処理などを実行する。
撮像素子5は、静止画撮影に加え、所定のフレームレートでの連写撮影及び動画撮影が可能である。撮影された画像のデータは、システムバス3を介して画像処理ユニット2及びディスプレイ6に転送される。
ディスプレイ6は、撮影された静止画または動画をリアルタイムに表示できる他、後述するメモリカードなどの記憶媒体に記憶された静止画または動画を再生表示することもできる。さらにディスプレイ6は、タッチパネルセンサを備えていてもよく、撮影者がディスプレイ6に表示された画面上の一部をタッチするだけで、合焦させたい部分を指定できるようにしてもよい。
操作インターフェース部7は、デジタルカメラ10に備えられたダイヤル、ボタン、タッチパネル等の不図示の操作部材の操作による撮影者の操作情報をシステムバス3を介して制御部1に伝達する。制御部1のCPU1aは、操作インターフェース部7から伝達された操作情報に応じて、各構成要素を制御する。また、操作インターフェース部7は、撮影者により指定されたクロップ領域の位置とサイズをシステムバス3及び内部バス1eを介してCPU1aに伝達する。
メモリカードアクセス部8は、デジタルカメラ10に挿入されたメモリカード13に記憶されている画像データ、プログラム、ファームウェアなどを読み取ったり、撮像素子5により撮影され、画像処理ユニット2により画像処理された画像データをメモリカード13に書き込むための処理を実行する。また、メモリカードアクセス部8は、制御部1の指令により、メモリカード13に記憶されているプログラムやファームウェアを、システムバス3を介して制御部1のRAM1b或いはフラッシュメモリ1dに転送することもできる。CPU1aは、更新されたプログラムやファームウェアにより、所定の処理、例えば後述する主要被写体推定処理を実行する。
無線通信部9は、例えばWiFi(登録商標)機能を備えており、この機能により、デジタルカメラ10は無線でインターネット接続することが可能となる。例えば、無線通信部9は、制御部1の指令により、インターネット上で提供されるプログラムやファームウェア或いは画像データ等をダウンロードする際の通信を実行するようにしてもよい。ダウンロードされたプログラム等は、システムバス3を介して制御部1に転送される。制御部1のCPU1aは、転送されてきたプログラム等をフラッシュメモリ1dに書き込む。CPU1aは、更新されたプログラムやファームウェアにより、所定の処理、例えば後述する主要被写体推定処理を実行する。或いは、CPU1aは、ダウンロードした画像データを、RAM1bに撮像画像として記憶したり、ディスプレイ6に表示させたり、メモリカード13に書き込んだりしてもよい。逆に、CPU1aは、デジタルカメラ10により撮像された撮像画像をインターネットの所定サイトやブログにアップロードすることもできる。
また、無線通信部9は、スマートフォンやタブレット型端末などの携帯通信端末との間の双方向の通信を制御する。例えば制御部1は、無線通信部9を介して、画像処理ユニット2により画像処理された画像データを携帯通信端末に送信したり、携帯通信端末からの画像データを受信して画像処理ユニット2やディスプレイ6に転送することができる。また、無線通信部9は、携帯通信端末から送られてきたコマンドやプログラムを受信して制御部1に転送する。制御部1は、携帯通信端末から送られてきたコマンドやプログラムに基づいてデジタルカメラ10を制御することもできる。
The
The
In addition to still image shooting, the
The
The operation interface unit 7 transmits to the
The memory
The
The
撮影レンズ12は、制御部1からの指令に応じて撮影レンズ12の後述する各構成要素を制御するレンズCPU12aと、撮影レンズ12の焦点距離(撮影レンズ12が単焦点レンズの場合)、開放F値及び収差情報などのレンズ情報を記憶するレンズROM12bと、撮影レンズ12の各構成要素が接続された内部バス12kと、を備えている。レンズROM12bに記憶されたレンズ情報は、内部バス12k及びシステムバス3を介して制御部1及び画像処理ユニット2に送られる。制御部1は、撮影レンズ12の焦点距離の情報に基づいて所定の処理、例えば後述する被写体追尾処理を実行する。また、画像処理ユニット2は、当該レンズ情報を、所定の画像処理に用いると共に、コマ毎の画像データ撮影情報領域に記憶させる。
The
また、撮影レンズ12は、合焦モータ12cと、防振レンズ群16(図1)を駆動させるための防振駆動部12dと、を備えている。レンズCPU12aは、制御部1からの指令に従って、合焦レンズ群15(図1)を合焦位置まで移動させるように合焦モータ12cを制御する。
更に、撮影レンズ12は、撮像素子5から被写体までの距離を検出するための距離エンコーダ12eと、撮影レンズ12がズームレンズの場合、撮影レンズ12の焦点距離に対応するズームリングの位置を検出する焦点距離エンコーダ12fとを備えている。検出された被写体までの距離及び焦点距離に関する情報は、内部バス12k及びシステムバス3を介して制御部1に送られる。制御部1は、検出された被写体までの距離及び焦点距離に基づいて所定の処理、例えば後述する主要被写体推定処理を実行する。
Further, the photographing
Further, the
また、デジタルカメラ10は、光学式手振れ補正機能及び電子式手触れ補正の少なくともいずれかを有していてもよい。この場合、撮影レンズ12は、撮影者の手振れ量を検出するための手振れ検出センサ12gを備えている。また、光学式手触れ補正機能を備える場合には、撮影レンズ12は、手振れを防止するように駆動制御される防振レンズ群16を備えている。
手振れ検出センサ12gにより検出された手振れ量を示す信号は、内部バス12k及びシステムバス3を介して制御部1に送られる。制御部1は、検出された手振れ量を打ち消すための防振レンズ群16の駆動量を計算し、当該駆動量をレンズCPU12aに伝達する。レンズCPU12aは、防振駆動部12dを制御することにより、手振れ量を打ち消すように防振レンズ群16を駆動させる。
The
A signal indicating the amount of camera shake detected by the camera
手振れ検出センサ12gは、デジタルカメラ10の角速度を手振れ(角度振れ)として検出する角速度センサ17a、17b(図1)を含む。また、手振れ検出センサ12gは、直線方向の振れ(所謂「シフト振れ」)を防止するための加速度センサ18a、18b(図1)も含んでいてもよい。
The camera
本発明の実施形態が適用されるデジタルカメラは、図1に示すようなミラーレスのカメラには限定されず、一眼レフカメラや、ビデオカメラにも同様に適用可能である。また、携帯電話、スマートフォン、多機能情報通信端末等に備えられたデジタルカメラやビデオカメラにも適用可能である。
(第1の実施形態)
図3には、デジタルカメラ10の制御部1が第1の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図が示されている。
The digital camera to which the embodiment of the present invention is applied is not limited to the mirrorless camera as shown in FIG. 1, and can be similarly applied to a single-lens reflex camera or a video camera. Further, the present invention can be applied to a digital camera or a video camera provided in a mobile phone, a smartphone, a multi-function information communication terminal, or the like.
(First embodiment)
FIG. 3 shows a functional block diagram when the
図3に示すように、制御部1は、画像処理ユニット2から転送されてきた、時間的に連続する撮像画像を取得する画像取得部21と、これらの複数の撮像画像から被写体を検出する被写体検出部23と、を備えている。本実施形態では、画像取得部21は、例えば、画像処理ユニット2から転送されてきた撮像画像を一時的に記憶する図2のRAM1bによって構成される。被写体検出部23は、RAM1bに記憶された撮像画像を読み取り、読み取った撮像画像内の被写体の画像から特徴(例えば人物の顔の特徴)を抽出することにより被写体(被写体領域)を検出する。検出される被写体の領域は、撮影対象の全体でもその一部分(例えば、人物の「顔」部分)のいずれであってもよい。
また、制御部1は、検出された被写体から、被写体情報(撮像画像内での被写体の大きさ、位置等)を検出するための被写体情報検出部24と、検出された被写体情報から撮像画像の主要被写体を推定する主要被写体推定部31と、を備えている。
さらに、制御部1は、スコア関数Sを記憶するスコア関数メモリ22と、判定条件メモリ26と、を備えている。スコア関数メモリ22及び判定条件メモリ26は、図2のRAM1b、ROM1c、及び、フラッシュメモリ1dの少なくともいずれかで実現することができる。スコア関数Sは、被写体情報を変数として、当該被写体情報を与える被写体が主要被写体である確率の高さをスコアとして与える関数である。判定条件メモリ26に記憶される判定条件には、少なくとも、主要被写体とされている被写体を主要被写体から解除するため必要となる解除条件J1、及び画像中のある被写体を新たな主要被写体として設定するため必要となる設定条件J2が含まれている。主要被写体推定部31は、スコア関数S、解除条件J1及び設定条件J2に基づいて、当該撮像画像内の主要被写体を推定する。
また、制御部1は、追尾制御部33を備えている。追尾制御部33は、主要被写体推定部31により推定された主要被写体を追尾するため主要被写体情報を含む追尾制御信号を生成する。例えば、制御部1は、追尾制御信号によって、ディスプレイ6上の主要被写体の領域にAF枠を重畳表示させたり、合焦モータ12cを駆動させて、撮影レンズ12に、主要被写体に対しての合焦動作を実行させたりする。或いは、制御部1は、主要被写体の情報に基づいて、主要被写体に露出を合わせるためデジタルカメラのシャッター速度、撮影レンズ12の絞り、ISO感度を制御したりすることができる。追尾制御部33は、上記追尾制御信号を生成しなくともよく、追尾制御部33自体が上記制御を行ってもよい。主要被写体の情報は、この例の使用に限定されるものではなく、例えば主要被写体を含む領域の画像データをクロップする等、他の用途にも用いることができる。
なお、上述の被写体検出部23、被写体情報検出部24、主要被写体推定部31及び追尾制御部33は、制御部1のROM1cやフラッシュメモリ1d等に記録されたプログラムをCPU1aが実行することによって実現することができる。
ここで、スコア関数メモリ22に記憶されているスコア関数Sについて説明する。なお、以下では、スコア関数の値が被写体Oi(添え字iは、各被写体につけた番号であり、i=1,2,...n(nは被写体の個数)である。)に関するものであることを示したいときには、スコアSをS(Oi)と表記する。スコア関数が撮像画像内での被写体Oiの大きさL(Oi)の関数として示したいときには、スコア関数をS(L(Oi))と表記し、大きさLだけでなく被写体Oiの位置P(Oi)の関数としても示したいときには、スコア関数をS(L(Oi),P(Oi))と表記する。なお、被写体Oiを特定する必要のない場合は、単にS(L)或いはS(L,P)と省略表記する。
As illustrated in FIG. 3, the
The
The
Further, the
The
Here, the score function S stored in the
スコア関数Sは、少なくとも被写体Oiの撮像画像内での大きさL又は大きさに関する値の関数であり、本実施形態では、被写体が主要被写体である確率が高いほどスコア値が大きくなる関数として設定されている。通常、撮像画像内での被写体の大きさLが大きいほど、主要被写体である確率が高いと考えられるため、スコア関数S(Oi)は、被写体Oiの大きさLが大きいほどスコア値が大きくなるように設定されている。この場合、スコア関数S(Oi)は、被写体Oiの大きさLの単調増加関数である。或いはスコア関数Sは、被写体の通常の大きさの範囲内で、大きさLの増加関数としてもよく、それ以外の範囲では、一定値を取ったり或いは大きさLの減少関数(大きすぎる被写体を排除)とすることもできる。
次に、判定条件メモリ26に記憶されている解除条件J1及び設定条件J2について説明する。解除条件J1は、主要被写体とされている被写体がこの条件J1を満たすとき、当該被写体の主要被写体らしさの確率が減少して主要被写体でないと判定するための必要条件(ただし十分条件ではない)が満たされたことを示す条件である。一方、設定条件J2は、ある被写体がこの条件J2を満たすとき、当該被写体の主要被写体らしさの確率が増大して、新たな主要被写体であると判定するための条件が満たされたことを示す条件である。ここで、設定条件J2は、解除条件J1が成立しない条件(すなわち被写体O1を主要被写体に維持する)よりもきびしい条件として設定される。換言すれば、設定条件J2が成立する被写体情報(被写体の大きさ、位置、又はスコアS)の集合は、解除条件J1が成立しない条件を満たす被写体情報の集合に含まれている。
被写体が主要被写体であるかを推定するため、本実施形態のように1次元的なスコア関数を用いる場合には、解除条件J1及び設定条件J2は、閾値或いは数値範囲で示される。主要被写体である確率が上がるほどスコア値も大きくなる関数Sを用いた場合、設定条件J2が、解除条件J1が成立しない条件よりもきびしい条件であるとは、設定条件J2の閾値が解除条件J1の閾値よりも大きいことを意味している。換言すれば、設定条件J2が成立するスコア値の集合(S>ThB)は、解除条件J1が成立しない条件を満たすスコア値の集合(S>ThA)に含まれている(ThA<ThBより明らか)。
逆に、主要被写体である確率が上がるほどスコア値が小さくなるスコア関数を用いた場合には、設定条件J2が、解除条件J1が成立しない条件よりもきびしい条件であるとは、設定条件J2の閾値が解除条件J1の閾値よりも小さいことを意味している。
以上のように、主要被写体として設定されていなかった第2の被写体を主要被写体として新たに設定するよりも、主要被写体として設定された第1の被写体を主要被写体として継続して維持しようとする傾向がある点で、本発明の主要被写体推定の処理は、ヒステリシス特性を有しているといえる。
The score function S is a function of at least the size L in the captured image of the subject O i or a value related to the size. In this embodiment, the score function S is a function that increases as the probability that the subject is the main subject increases. Is set. In general, the larger the subject size L in the captured image, the higher the probability that the subject is the main subject. Therefore, the score function S (O i ) has a score value that increases as the subject L i size L increases. It is set to be large. In this case, the score function S (O i ) is a monotonically increasing function of the size L of the subject O i . Alternatively, the score function S may be an increase function of the size L within the range of the normal size of the subject. In the other range, the score function S may take a constant value or a decrease function of the size L (a subject that is too large). Exclusion).
Next, the cancellation condition J 1 and the setting condition J 2 stored in the
When a one-dimensional score function is used as in the present embodiment in order to estimate whether the subject is a main subject, the cancellation condition J 1 and the setting condition J 2 are indicated by threshold values or numerical ranges. When using the function S also increases as the score value the probability that the main subject is increased, setting condition J 2 is a release condition J 1 is severe conditions than the conditions not satisfied, the threshold setting condition J 2 which means that greater than the threshold of release conditions J 1. In other words, the set (S> ThB) score values established setting condition J 2 are included in the set condition is satisfied score value which the cancellation condition J 1 is not satisfied (S> ThA) (ThA < ThB More obvious).
Conversely, when a score function is used in which the score value decreases as the probability of being a main subject increases, the setting condition J 2 is more severe than the condition in which the cancellation condition J 1 is not satisfied. This means that the threshold value of J 2 is smaller than the threshold value of release condition J 1 .
As described above, a tendency to continue to maintain the first subject set as the main subject as the main subject rather than newly setting the second subject that was not set as the main subject as the main subject. Therefore, it can be said that the main subject estimation process of the present invention has hysteresis characteristics.
次に、本発明の第1の実施形態に係る主要被写体推定装置の処理の流れを、図6乃至図8を用いて説明する。このうち図6乃至図7は、制御部1の処理手順の一例を示すフローチャートである。図6乃至図7に示す処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。
Next, the processing flow of the main subject estimation apparatus according to the first embodiment of the present invention will be described with reference to FIGS. Among these, FIGS. 6 to 7 are flowcharts showing an example of the processing procedure of the
図6に示すように、画像取得部21が、時間的に最初に入力される撮像画像fk(k=1)、即ち撮像画像f1を取得する(ステップ100)。次に、被写体検出部23が、撮像画像f1内の被写体Oiを検出する(i=1,2,…)(ステップ101)。例えば、図8に示すように、撮像画像f1において人物1、2、3が存在した場合、被写体検出部23は、人物1、2、3の顔領域を夫々被写体O1、O2、O3として検出する。このとき、被写体情報検出部24が、撮像画像f1内の被写体O1、O2、O3の被写体情報(被写体の大きさL1(Oi))を検出する。被写体情報検出部24は、被写体の大きさL1(Oi)に追加して被写体の位置P1(Oi)或いは位置P1(Oi)のみを検出してもよい。
As shown in FIG. 6, the
図6に戻り、制御部1は、撮像画像f1において検出された被写体の中から、特定の被写体(この例では、O1(第1の被写体))を主要被写体として指定する(ステップ102)。以後、主要被写体をOmと表す(現時点では、Om=O1である)。主要被写体の指定方法に関しては、例えば、主要被写体推定部31が、検出された被写体の中から最も大きい被写体を自動的に主要被写体と推定してもよい。或いは、制御部1は、撮影者が指定した被写体を主要被写体とすることもできる。例えば、制御部1は、撮影者が、図示しない操作部材やディスプレイ6にタッチすることにより指定した被写体を最初の主要被写体と認識してもよい。
Returning to FIG. 6, the
次に、画像取得部21は、画像番号kを1つ増分し、次の撮像画像fkを取得する(ステップ104)。次に、被写体検出部23が、撮像画像fk内の被写体Oiを継続的に検出する(i=1,2,…)(ステップ106)。例えば、図8に示すように、撮像画像fkにおいて、撮像画像f1で検出された人物1、2、3と同じ人物であると推定される被写体O1、O2、O3を検出する。同一被写体であるか否かの判定は、例えば、制御部1が、現在の撮像画像において、一つ前に入力された撮像画像における被写体の位置に対応する位置の周辺の領域をサーチし、当該被写体の画像データとのマッチング演算等により類似した画像特徴を有する被写体を検出することによって可能となる。
Next, the
次に、被写体情報検出部24が、撮像画像fk内の被写体Oi(i=1,2,..)の被写体情報を検出する(ステップ108)。被写体情報検出部24は、被写体情報として、少なくとも撮像画像内の被写体の大きさLk(Oi)又は大きさに関する値を検出する。また被写体情報検出部24は、被写体の大きさ以外に或いは被写体の大きさに代えて、撮像画像内での被写体の位置Pk(Oi)又は位置に関する値を検出してもよい。なお、撮像画像内の被写体の大きさLk(Oi)は、図8に示すように、例えば、撮像画像内で被写体として検出された領域の一辺や対角線の長さ又は当該領域の面積を用いることができる。撮像画像内での被写体の位置Pk(Oi)は、撮像画像内で被写体として検出された領域の中心位置、或いは重心位置などを用いることができる。
Next, the subject
次に、主要被写体推定部31は、Lk(Oi)及びPk(Oi) (i=1,2,…)の少なくともいずれかに関するスコア関数S(Oi)の値に基づいて撮像画像fkにおける主要被写体Omを推定する(ステップ110)。撮像画像fkにおける主要被写体Omを推定した後、制御部1は、ステップ104に戻り、次に入力された撮像画像fkについて、同様の処理を実行することにより、撮像画像fkにおける主要被写体Omを推定する。
Next, the main
次にステップ110の工程の処理の流れについて、図7を用いて説明する。
Next, the process flow of
図7に示すように、主要被写体推定部31は、スコア関数Sメモリ22からスコア関数Sを呼び出し、判定条件メモリ26から主要被写体の解除条件J1及び主要被写体の設定条件J2を読み込む(ステップ150)。
次に、主要被写体推定部31は、現時点での主要被写体Om(1回目のループでは、Om=O1)の被写体情報をスコア関数に代入することにより、主要被写体のスコア値S(Om)を求める。主要被写体推定部31は、スコア値S(Om)が解除条件J1を満足しているか否かを判定する(ステップ152)。
スコア値S(Om)が解除条件J1を満足していない場合(ステップ152の否定判定)、主要被写体推定部31は、主要被写体を維持すると判断し(Om=O1)、本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
As shown in FIG. 7, the main
Next, the main
When the score value S (O m ) does not satisfy the release condition J 1 (negative determination in step 152), the main
一方、スコア値S(Om)が解除条件J1を満足している場合(ステップ152の肯定判定)、主要被写体推定部31は、Om以外の全ての被写体のスコア値S(Oj)の中から最大のスコア値Smaxを与える第2の被写体Onを検索する(ステップ154)。ここで被写体Onの被写体情報をスコア関数に代入することにより第2の被写体のスコア値S(On)を求める。
スコア値S(On)が設定条件J2を満足しているか否かを判定する(ステップ156)。スコア値S(On)が設定条件J2を満足していない場合(ステップ156の否定判定)、主要被写体推定部31は、主要被写体を維持するべきと判断し(Om=O1)、本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
On the other hand, when the score value S (O m ) satisfies the cancellation condition J 1 (affirmative determination in step 152), the main
It is determined whether or not the score value S (O n ) satisfies the setting condition J 2 (step 156). When the score value S (O n ) does not satisfy the setting condition J 2 (negative determination in step 156), the main
一方、スコア値S(On)が設定条件J2を満足している場合(ステップ156の肯定判定)、主要被写体推定部31は、第2の被写体Onを主要被写体とする(ステップ158)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Onを主要被写体として追尾する。図6のメインルーチンでは、制御部1は、次に入力された撮像画像について同様の処理を繰り返す。
On the other hand, if the score value S (O n) satisfies the setting condition J 2 (affirmative determination in step 156), the main
第1の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体のスコア関数Sの値が解除条件J1を満足し、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体のスコア関数Sの値が設定条件J2を満足した場合、制御部1は、第2の被写体が主要被写体であると推定する。設定条件J2は解除条件J1が成立せず第1の被写体を主要被写体に維持する条件よりもきびしいため、先に主要被写体とされた第1の被写体は、主要被写体との推定(又は指定)を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々非常に大きい第2の被写体が撮像画像内に入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。さらに第1の実施形態によれば、少なくとも撮像画像内での被写体の大きさに基づいて主要被写体を推定するため、撮影者がデジタルカメラ10をパンニング若しくはチルティングしていなくとも、或いは、その操作の途中であったとしても、主要被写体を正確に推定することができる。
なお、上記では、スコア関数Sが、撮像画像内での被写体Oiの大きさL(Oi)の関数である例を挙げたが、被写体の大きさに関する値をスコア関数Sの変数として用いてもよい。大きさに関する値として、例えば、時間的に連続する所定フレーム数に亘る同一被写体の大きさL1,L2,L3,…の平均値Lave、それらの分散値Lv、Lの変化ΔL(時間的に離れた撮像画像における同一被写体の大きさの変化)などが挙げられる。スコア関数の変数として、これらの値やこれらの値の組み合わせ等を使用することもできる。例えば、スコア関数として、S(Lave)、S(L,Lv)、S(Lave,Lv)、S(L,ΔL)、S(Lave,Lv、ΔL)等を使用することができる。
また、スコア関数S(Oi)の変数として、被写体Oiの大きさL(Oi)だけではなく、撮像画像内での被写体Oiの位置P(Oi)又は位置に関する値を、単独で或いは大きさLと組み合わせて使用することもできる。大きさLと位置Pとを用いた場合、スコア関数はS(L,P)となる。このとき、S(L,P)は、位置P(Oi)が撮像画像内で主要被写体が存在する確率が高い位置であるほど、スコア値が大きくなるように設定されている。しかし、スコア関数Sは大きさLの関数でもあるので、被写体が主要被写体の存在確率の高い位置に位置していたとしても、被写体の大きさLが小さければ、スコア値は大きくならない。逆もまた然りである。
また、位置に関する値としては、例えば、時間的に連続する所定フレーム数に亘る同一被写体の位置P1,P2,P3,…の平均値Pave、それらの分散値Pv、Pの変化ΔP(時間的に離れた撮像画像における同一被写体の位置の変化)、主要被写体が存在する確率が最も高いと考えられる位置P0(撮像画像の中央位置)との距離|P−P0|、位置P0への接近傾向等が挙げられる。接近傾向の例として、所定フレーム数に亘る被写体位置の評価の結果、被写体の位置が、画面内の所定の位置(例えば撮像画像の中央位置)に近づいている場合には、スコア値を大きくし、遠ざかっていればスコア値を小さくする。スコア関数の変数として、これらの値やこれらの値の組み合わせ等を使用することもできる。例えば、スコア関数として、S(L,Pave)、S(L,Pv)、S(Lave,Pv)、S(L,ΔP)、S(Lave,|P−P0|)、S(L,Δ(P-P0))等を使用することができる。
上記考察より、第1の実施形態では、例えば、スコア関数Sを、次式のように一般的に表すことができる。
According to the first embodiment, previously designated as a main subject (or estimated) by the value of the score function S of the first object satisfies the cancellation condition J 1 was, and the main object other than the first object If the value of the score function S of the second object which probability is considered to be high is satisfies a setting condition J 2, the
In the above example, the score function S is a function of the size L (O i ) of the subject O i in the captured image, but a value related to the size of the subject is used as a variable of the score function S. May be. As the value relating to the size, for example, the average value L ave of the same subject size L 1 , L 2 , L 3 ,... Over a predetermined number of temporally continuous frames, their variance values L v , L change ΔL (Changes in the size of the same subject in captured images that are separated in time). These values, combinations of these values, and the like can also be used as variables of the score function. For example, S (L ave ), S (L, L v ), S (L ave , L v ), S (L, ΔL), S (L ave , L v , ΔL), etc. are used as the score function. be able to.
Further, as a variable of the score function S (O i), of the subject O i not only the size L (O i), the value relating to the position P (O i) or position of the object O i in the captured image, alone Or in combination with the size L. When the size L and the position P are used, the score function is S (L, P). At this time, S (L, P) is set so that the score value increases as the position P (O i ) has a higher probability that the main subject exists in the captured image. However, since the score function S is also a function of the size L, the score value does not increase if the size L of the subject is small even if the subject is located at a position where the existence probability of the main subject is high. The reverse is also true.
Further, as the value related to the position, for example, the average value P ave of the positions P 1 , P 2 , P 3 ,... Of the same subject over a predetermined number of temporally continuous frames, and changes in their variance values P v , P ΔP (change in position of the same subject in a captured image separated in time), a distance | P−P 0 |, a position P 0 (center position of the captured image) that is considered to have the highest probability that the main subject exists An approach tendency to the position P 0 can be mentioned. As an example of the approach tendency, if the position of the subject is approaching a predetermined position on the screen (for example, the center position of the captured image) as a result of evaluating the subject position over a predetermined number of frames, the score value is increased. If it is far away, the score value is decreased. These values, combinations of these values, and the like can also be used as variables of the score function. For example, as a score function, S (L, P ave ), S (L, P v ), S (L ave , P v ), S (L, ΔP), S (L ave , | P−P 0 |) , S (L, Δ (P−P 0 )) and the like can be used.
From the above consideration, in the first embodiment, for example, the score function S can be generally expressed as the following equation.
S(x1,x2,x3,…)=w1・x1+w2・x2+w3・x3+….. (1)
ここで、変数x1、x2、x3,…は、上記例に挙げた、被写体の大きさ又は大きさに関する値、被写体の位置又は位置に関する値である。w1、w2、w3,...は、各変数x1,x2,x3,…の重み係数であり、これらの重み係数w1,w2.w3,...は、正負の値、0の値を取り得る。例えば大きさLの重み係数は正である。すなわち、被写体の大きさLが大きいほど、主要被写体であるスコア値(確率)が増加することを示している。逆に位置P0(撮像画像の中央位置)との距離|P−P0|の重み係数は負である。すなわち、当該距離が大きいほど主要被写体であるスコア値(確率)が減少することを示している。特に主要被写体推定に使用しない変数については、その重み係数を0とすればよい。
様々な撮影状況やシーンに応じて、主要被写体の変数x1、x2、x3,…を解析し、主要被写体のスコア関数の値がより大きくなるように、適切な重み係数w1,w2.w3,...を予め選択或いは学習等によって決定しておく。このように重み係数を適宜調節することによって、様々な撮影状況において主要被写体を推定することが可能となる。勿論、スコア関数の表現は(1)式に限定されるものではない。
(第2の実施形態)
次に、第2の実施の形態について説明する。図4には、デジタルカメラ10の制御部1が第2の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図が示されている。
S (x 1 , x 2 , x 3 ,...) = W 1 · x 1 + w 2 · x 2 + w 3 · x 3 +... (1)
The variables x 1 , x 2 , x 3 ,. w 1 , w 2 , w 3 ,. . . Is a weighting coefficient of each variable x 1 , x 2 , x 3 ,..., And these weighting coefficients w 1 , w 2 . w 3 ,... can take positive and negative values and 0 values. For example, the weighting factor of the size L is positive. That is, as the subject size L increases, the score value (probability) that is the main subject increases. Conversely, the weighting coefficient of the distance | P−P 0 | with respect to the position P 0 (the center position of the captured image) is negative. That is, as the distance increases, the score value (probability) that is the main subject decreases. In particular, for a variable that is not used for main subject estimation, the weighting coefficient may be set to zero.
Depending on various shooting situations and scenes, variables x 1 , x 2 , x 3 ,... Of the main subject are analyzed, and appropriate weighting factors w 1 , w are set so that the score function value of the main subject becomes larger. 2 . w 3 ,. . . Are determined in advance by selection or learning. In this way, by appropriately adjusting the weighting factor, it is possible to estimate the main subject in various shooting situations. Of course, the expression of the score function is not limited to the expression (1).
(Second Embodiment)
Next, a second embodiment will be described. FIG. 4 shows a functional block diagram when the
図4に示すように、制御部1は、図3に示したスコア関数メモリ22及び判定条件メモリ26の代わりに、所定範囲設定部25と、判定条件設定部27とを備えている。所定範囲設定部25は、撮像画像内のうちある特定の領域である所定範囲を設定する。また、判定条件設定部27は、着目する被写体が主要被写体であるか否かを判定するための判定条件を、閾値メモリ30に記憶された閾値から設定する。なお、図4において第1の実施形態と同様の機能を有する構成要素に関しては、図3と同一の参照番号を付与し、それらの詳細な説明を省略する。なお、所定範囲設定部25及び判定条件設定部27は、制御部1のROM1cやフラッシュメモリ1d等に記録されたプログラムをCPU1aが実行することによって実現することができる。
所定範囲設定部25により設定される所定範囲は、主要被写体が存在する確率が高いと予想される撮像画像内の特定領域(一例として後述する図13の撮像画像55a、b内の所定範囲51a、b参照)である。当該所定範囲は、例えば、固定位置(例えば撮像画像の中心位置)を中心として所定の大きさを持つ所定形状の領域として設定される。この例の場合、所定範囲設定部25は、例えば、当該所定範囲を記憶したROM1c(図2)の特定メモリ領域に記憶されている固定位置の位置情報、所定範囲の形状及び大きさの情報に基づいて所定範囲を設定する。また、当該所定範囲の中心位置が先に主要被写体とされた被写体の位置又は撮影者が指定した位置に合致するように、当該所定範囲の中心位置を調整可能としてもよい。さらに、当該所定範囲が、撮影者の操作指令により、その大きさを調整されるようにしてもよい。また、所定範囲は、図13の所定範囲51a、51bのような矩形の他、円や楕円など、主要被写体の存在確率が高い領域を表すことができる他の形状を持つことができる。
第2の実施形態の主要被写体推定部31は、所定範囲及び判定条件に基づいて、撮像画像内に存在する被写体の中から主要被写体を推定する。
As illustrated in FIG. 4, the
The predetermined range set by the predetermined
The main
次に、本発明の第2の実施形態に係る主要被写体推定装置の処理の流れを、図9及び図10を用いて説明する。図9及び図10は、制御部1の処理手順の一例を示すフローチャートである。当該処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。
Next, a processing flow of the main subject estimation apparatus according to the second embodiment of the present invention will be described with reference to FIGS. 9 and 10. 9 and 10 are flowcharts illustrating an example of a processing procedure of the
図9に示すように、画像取得部21が、時間的に最初に入力される撮像画像fk(k=1)、即ち撮像画像f1を取得する(ステップ200)。次に、被写体検出部23が、撮像画像f1内の被写体Oiを検出する(i=1,2,…)(ステップ201)。
As shown in FIG. 9, the
次に、制御部1は、撮像画像f1において検出された被写体の中から、特定の被写体(この例では、O1を主要被写体とする)を主要被写体として指定する(ステップ202)。主要被写体の指定方法に関しては、第1の実施形態と同様である。
Next, the
次に、画像取得部21は、画像番号kを1つ増分し、次の撮像画像fkを取得する(ステップ204)。次に、被写体検出部23が、撮像画像fk内の被写体Oiを継続的に検出する(i=1,2,…)(ステップ206)。撮像画像内の被写体を継続的に検出する方法に関しては、第1の実施形態と同様である。
Next, the
次に、被写体情報検出部24が、撮像画像fk内の被写体Oi(i=1,2,..)の被写体情報を検出する(ステップ208)。被写体情報検出部24は、被写体情報として、少なくとも被写体の大きさL1(Oi)又は大きさに関する値を検出する。また被写体情報検出部24は、被写体の大きさ以外に或いは大きさに代えて、被写体の位置P1(Oi)又は位置に関する値を検出する。
Next, the subject
次に、主要被写体推定部31は、Lk(Oi) 又は位置P1(Oi)(i=1,2,…) に基づいて撮像画像fkにおける主要被写体Omを推定する(ステップ210)。撮像画像fkにおける主要被写体Omを推定した後、制御部1は、ステップ204に戻り、次に入力された撮像画像fk+1について、同様の処理を実行することにより、撮像画像fk+1における主要被写体Omを推定する。
Next, the main
次にステップ210の工程の処理の流れを図10を用いて説明する。
Next, the process flow of
図10に示すように、判定条件設定部27は、閾値メモリ30から閾値ThA及びThB(ThA<ThB)を読み込む(ステップ250)。判定条件設定部27は、閾値ThA及びThBを主要被写体推定部31に伝達する。
As shown in FIG. 10, the determination
次に、主要被写体推定部31は、現時点で主要被写体であるとされている被写体Om(1回目のループでは、Om=O1)の大きさL(Om)が閾値ThA以下であるか否かを判定する(ステップ252)。L(Om)が閾値ThAより大きい場合(ステップ252の否定判定)、主要被写体推定部31は、主要被写体を維持するべきである(Om=O1)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
一方、L(Om)が閾値ThA以下である場合(ステップ252の肯定判定)、主要被写体推定部31は、Om以外の全ての被写体の大きさL(Oj)のうち最大の大きさLmaxを与える第2の被写体Onを検索する(ステップ254)。
Next, the main
On the other hand, when L (O m ) is equal to or smaller than the threshold value ThA (positive determination in step 252), the main
第2の被写体Onが検索されると、主要被写体推定部31は、第2の被写体Onの位置P(On)が所定範囲設定部25により設定された所定範囲内にあるか否かを判定する(ステップ255)。第2の被写体Onの位置P(On)が所定範囲内にない場合(ステップ255の否定判定)、主要被写体推定部31は、第2の被写体Onが主要被写体ではないとみなし、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
一方、第2の被写体Onの位置P(On)が所定範囲内にある場合(ステップ255の肯定判定)、主要被写体推定部31は、第2の被写体の大きさL(On)がThB以上であるか否かを判定する(ステップ256)。L(On)がThBより小さい場合(ステップ256の否定判定)、主要被写体推定部31は、主要被写体を維持するべきである(Om=O1)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
When the second object O n is retrieved, the main
On the other hand, when the position P of the second object O n (O n) is within a predetermined range (affirmative determination in Step 255), the main
L(On)がThB以上の場合(ステップ256の肯定判定)、主要被写体推定部31は、第2の被写体Onを主要被写体とする(ステップ258)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Onを主要被写体として追尾する。図9のメインルーチンでは、制御部1は、次の撮像画像について同様の処理を繰り返す。
第2の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体の大きさLがThA以下となり、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体が撮像画面内の所定範囲内に存在し、その大きさLがThB以上となった場合に、制御部1は、第2の被写体を主要被写体であると推定する。閾値ThBは、閾値ThAよりも大きいため、先に主要被写体と推定された第1の被写体は、主要被写体との推定を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。すなわち、主要被写体推定は、被写体の大きさの評価に関してヒステリシス特性を有している。
これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々非常に大きい第2の被写体が撮像画像内に入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。
If L (O n) is equal to or greater than ThB (affirmative determination in step 256), the main
According to the second embodiment, when the size L of the first subject previously designated (or estimated) as the main subject is equal to or less than ThA, and there is a high probability of being the main subject other than the first subject. When a possible second subject exists within a predetermined range in the imaging screen and the size L is equal to or greater than ThB, the
As a result, even if the score value of the subject fluctuates abruptly for some reason that the main subject should not be switched (for example, when a very large second subject accidentally enters the captured image), it is stable. Thus, it is possible to continue to estimate the main subject.
図8の例では、撮像画像f1において被写体O1が主要被写体と指定若しくは自動検出されている。その後、撮像画像fkにおいて、撮像画像f1と比べて、被写体O1の大きさLk(O1)が小さくなり、被写体O2の大きさLk(O2)が大きくなり、被写体O3の大きさLk(O3)が更に小さくなる。ここで、Lk(O1)がThA以下となり、Lk(O2)がThB以上となった場合には、主要被写体は、O1からO2に切り替わったと判断する。
また、第2の実施形態によれば、撮像画像内での被写体の大きさに基づいて主要被写体を推定するため、撮影者がデジタルカメラ10をパンニング若しくはチルティングしていなくとも、或いは、その操作の途中であったとしても、主要被写体を正確に推定することができる。
In the example of FIG. 8, the subject O 1 is designated or automatically detected as the main subject in the captured image f 1 . Thereafter, the captured image f k, as compared with the captured image f 1, size L k (O 1) is reduced in the subject O 1, size L k (O 2) of the object O 2 is increased, the object O 3 of size L k (O 3) is further reduced. Here, when L k (O 1 ) is equal to or less than ThA and L k (O 2 ) is equal to or greater than ThB, it is determined that the main subject has been switched from O 1 to O 2 .
Further, according to the second embodiment, since the main subject is estimated based on the size of the subject in the captured image, the photographer does not pan or tilt the
さらに第2の実施形態では、第2の被写体に対して、所定範囲内にあるか否かの判定も行う(図10のステップ255)。このように第2の実施形態では、被写体の大きさだけでなく被写体の位置の情報も、主要被写体推定に用いることを可能にしたため、より正確な主要被写体の推定が可能となる。
Further, in the second embodiment, it is also determined whether or not the second subject is within a predetermined range (
なお、第2の実施形態において、所定範囲設定部25を省略した態様も可能である。この場合、図10のステップ255も省略される。
In the second embodiment, a mode in which the predetermined
第2の実施形態において、所定範囲設定部25を省略した態様は、第1の実施形態において、スコア関数Sを被写体の大きさLのみの関数とした態様に対応する。この態様の一例は、スコア関数S(L)=w・L(wは正の定数)とし、更に、解除条件J1をL≦ThAとし、設定条件J2をL≧ ThBとしたものである。
In the second embodiment, an aspect in which the predetermined
第2の実施形態において、所定範囲設定部25を追加した態様は、第1の実施形態において、スコア関数Sを被写体の大きさLと位置Pとの関数としたものに対応する。この態様の一例は、位置Pが所定範囲内にあるときスコア関数S(L、P)=w・L(wは正の定数)とし、位置Pが所定範囲外にあるときスコア関数S(L、P)=0としたものである。
(第3の実施形態)
次に、第3の実施の形態について説明する。第2の実施形態が被写体の大きさに基づいて主要被写体を推定したのに対して、第3の実施形態は、被写体の位置に基づいて主要被写体を推定する。第3の実施形態の機能ブロック図は、図4において、所定範囲設定部25が省略され、閾値メモリ30が閾値ThA,ThBの代わりに後述する閾領域(第1の領域RA、第2の領域)の情報を記憶するものである。
In the second embodiment, an aspect in which the predetermined
(Third embodiment)
Next, a third embodiment will be described. The second embodiment estimates the main subject based on the size of the subject, whereas the third embodiment estimates the main subject based on the position of the subject. In the functional block diagram of the third embodiment, in FIG. 4, the predetermined
次に、本発明の第3の実施形態に係る主要被写体推定装置の処理の流れを、図9及び図11を用いて説明する。図9及び図11は、制御部1の処理手順の一例を示すフローチャートである。当該処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。
Next, the processing flow of the main subject estimation apparatus according to the third embodiment of the present invention will be described with reference to FIGS. 9 and 11 are flowcharts illustrating an example of a processing procedure of the
第3の実施形態では、図9に示すステップ200〜206を第2の実施形態に関して上述した通り実行する。次にステップ208において、撮像画像fk内の被写体Oi(i=1,2,..)の被写体情報として被写体Oiの位置P1(Oi)を検出する。次に、ステップ210において、主要被写体推定部31は、被写体Oiの位置P1(Oi)(i=1,2,…) に基づいて撮像画像fkにおける主要被写体Omを推定する。
In the third embodiment, steps 200 to 206 shown in FIG. 9 are performed as described above with respect to the second embodiment. Next, at
次にステップ210の工程の処理の流れを図11を用いて説明する。
Next, the process flow of
図11に示すように、判定条件設定部27は、閾値メモリ30から、撮像画像内の第1の領域RA及び第2の領域RBを画定するため必要な情報を読み込む(ステップ300)。ここで、第1の領域RAは第2の領域RBを包含している(後述する図12参照)。また、ステップ300において、判定条件設定部27は、領域RA、RB内の代表位置P0の座標値を読み込んでもよい。位置P0は、主要被写体が存在する確率の高い位置であり、撮像画像の中心位置、或いは、主要被写体の位置として最初に指定された位置などである(後述する図12参照)。領域RA、RBは、この位置を中心として画定されてもよい。判定条件設定部27は、領域RA、RB、位置P0の情報を主要被写体推定部31に伝達する。
As shown in FIG. 11, the determination
次に、主要被写体推定部31は、現時点で主要被写体であるとされている被写体Om(1回目のループでは、Om=O1)の位置P(Om)が第1の領域RA内の位置であるか否かを判定する(ステップ302)。P(Om)が第1の領域RA内の位置である場合(ステップ302の肯定判定)、主要被写体推定部31は、主要被写体を維持するべきである(Om=O1)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
一方、位置P(Om)が第1の領域RA内の位置ではない場合(ステップ302の否定判定)、主要被写体推定部31は、Om以外の全ての被写体の位置P(Oj)のうち位置P0に最も近い距離にある第2の被写体Onを検索する(ステップ304)。
Next, the main
On the other hand, when the position P (O m ) is not a position in the first region RA (No determination in step 302), the main
第2の被写体Onが検索されると、主要被写体推定部31は、第2の被写体Onの位置P(On)が第2の領域RB内の位置であるか否かを判定する(ステップ306)。第2の被写体Onの位置P(On)が第2の領域RB内の位置ではない場合(ステップ306の否定判定)、主要被写体推定部31は、第2の被写体Onが主要被写体ではないとみなし、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Omとして追尾する。
一方、第2の被写体Onの位置P(On)が第2の領域RB内の位置である場合(ステップ306の肯定判定)、主要被写体推定部31は、第2の被写体Onを主要被写体とする(ステップ308)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Onを主要被写体として追尾する。図9のメインルーチンでは、制御部1は、次の撮像画像について同様の処理を繰り返す。
次に図12を用いて第3の実施形態を説明する。
図12(A)は、撮像画像55において、主要被写体が存在する確率の高い第1の領域RA内に第1の被写体81が存在し、第2の被写体82が、第1の領域RAの領域外に存在している状況を示している。このとき、第1の被写体81が主要被写体と認識されている。次に、図12(B)は、第1の被写体81が第1の領域RAの領域外に移動し、第2の被写体82が第1の領域RA内に移動する状況を示している。この場合、第1の被写体が第1の領域RAの領域外に存在し、第2の被写体82が第1の領域RA内に存在しているのにも関わらず、第2の被写体82は主要被写体とはされず、依然として第1の被写体が主要被写体とされている。最後に図12(C)は、第1の被写体81が第1の領域RAの領域外に存在したままで、第2の被写体82が第2の領域RB内に移動する状況を示している。この場合、第2の被写体82が主要被写体として推定される。
第3の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体81の位置が第1のRAの領域外の位置となり、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体82の位置が、第1の領域RA内に含まれる第2の領域RB内の位置となった場合に、制御部1は、第2の被写体を主要被写体であると推定する。第2の領域RBは第1の領域RA内に含まれるため、先に主要被写体と推定された第1の被写体は、主要被写体との推定を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。すなわち、主要被写体推定は、ヒステリシス特性を有している。
これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々ある被写体が撮像画像内の主要被写体である確率の高い位置へと入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。
(第4の実施形態)
次に、第4の実施形態について説明する。撮像画像内の被写体の大きさは、被写体の実際の大きさ、撮影状況、被写体の種類や形状、デジタルカメラから被写体までの撮影距離、撮影レンズの焦点距離に応じて変化する。例えば、人物の顔と、飛行機等の乗り物とでは、実際の大きさや形状の違い等に起因して、撮影画像内で検出された大きさも様々に異なり得る。また同じ人物撮影でも、背景を広く取り入れて人物を撮影する場合と、人物を大きくクローズアップする場合とでは、検出する顔領域の大きさは、後者の方が前者よりも大きくなる。一方、第2の実施形態で用いられる閾値は、メモリに記憶された固定値である。
本発明の第4の実施形態は、撮像画像内の被写体の大きさのばらつきに対応するため、固定値としての閾値を最初に主要被写体とされた被写体の大きさに応じて正規化するものである。第4の実施形態の構成は、図4に示された第2の実施形態の構成と実質的に同様である。また、第4の実施形態の処理の流れは、図9及び図10に示されている第2の実施形態と実質的に同様である。第4の実施形態の以下の説明において、第2の実施形態と同様の構成要素及び処理に関しては、詳細な説明を省略する。
本発明の第4の実施形態は、図4の判定条件設定部27が、図10のステップ252、256で使用される閾値ThA、ThBを、主要被写体の大きさに応じて正規化する。この正規化の方法は、例えば以下の通りとなる。
ThAnormal(正規化された閾値ThA) → ThA・Lq(Om)
ThBnormal(正規化された閾値ThB) → ThB・Lq(Om)
ここで、Lqは、現在の主要被写体が初めて主要被写体と推定されたときの被写体の大きさである。閾値メモリ30に記憶されているThA、ThBは、大きさの次元を持つ値としてではなく、無次元の値として与えられる。上記正規化の結果、ThAnormal及びThBnormalは、被写体の大きさと比較され得る大きさの次元を持つに至る。
第4の実施形態の正規化方法によれば、図10のステップ252で、主要被写体推定部31が、現在の主要被写体の大きさが、その最初の大きさに応じて正規化された閾値ThA以下であると判定すれば、ステップ254に進む。また、図10のステップ256で、主要被写体推定部31が、主要被写体の候補である第2の被写体の大きさが、現在の主要被写体の最初の大きさに応じて正規化された閾値ThB以上であると判定すれば、ステップ258に進む。
第4の実施形態の他の例では、閾値を正規化する代わりに、主要被写体推定部31が、検出された被写体の大きさを次の通り、Lq(Om)で正規化してもよい。
L(Om)normal(正規化された第1の被写体の大きさ)→L(Om)/Lq(Om)
L(On)normal(正規化された第2の被写体の大きさ)→L(On)/Lq(Om)
閾値メモリ30に記憶されているThA、ThBは、大きさの次元を持つ値としてではなく、無次元の値として与えられ、これらと比較されるL(Om)normal及びL(On)normalも無次元量となる。
第4の実施形態のこの正規化方法によれば、図10のステップ252で、主要被写体推定部31が、現在の主要被写体がその最初の大きさからどのくらいの比率で小さくなったかを監視し、当該比率がThA以下であると判定すれば、ステップ254に進む。また、図10のステップ256で、主要被写体推定部31が、主要被写体の候補である第2の被写体が現在の主要被写体の最初の大きさと比べてどのくらいの比率で大きくなったかを監視し、当該比率がThB以上であると判定すれば、ステップ258に進む。
例えば、最初の撮影では、背景を広く撮影範囲に取り入れた状態で複数の人物の中から主要被写体推定を行っていたとする。このとき、人物の大きさは小さいため、主要被写体の大きさに応じて上述のように正規化された閾値は、比較的小さく設定される。本実施形態では、各人物の大きさが小さい状態において、比較的小さい閾値を用いるため、主要被写体推定を的確に行うことができる。次に複数人物の中から少人数に絞ってクローズアップしたい場合、焦点距離を大きくするか或いは人物に近づいたりする。この場合、撮像画像内での人物の大きさは大きくなる。本実施形態では、大きくなった被写体の大きさに応じて閾値も大きく正規化されるため、被写体が大きくなった状況においても、主要被写体推定を的確に行うことができる。
また、焦点距離や撮影距離が異なる場合だけではなく、被写体の種類によっても、被写体の大きさは異なってくる。例えば飛行機等の乗り物を撮影する場合、被写体の輪郭抽出のアルゴリズムにもよるが、人物の顔領域よりも被写体の大きさは大きくなり得る。この場合においても、本実施形態は、その大きさに応じて閾値を正規化するため、被写体の種類に依らず、的確な主要被写体の推定を行うことが可能となる。
なお、上記例では、Lq(Om)で閾値又は被写体の大きさを正規化したが、本発明は、この例に限定されない。例えば、他の時点の被写体の大きさ等を用いることも可能である。
以上の通り第4の実施形態によれば、閾値又は被写体の大きさを、被写体の実際の大きさ、デジタルカメラから被写体までの撮影距離、撮影レンズの焦点距離等に応じて変化するLq(Om)で正規化するため、より正確な主要被写体推定が可能となる。
(第5の実施形態)
次に第5の実施形態について説明する。図5は、デジタルカメラ10の制御部1が第5の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図である。なお、図5において第2及び第4の実施形態と同様の機能を有する構成要素に関しては、図4と同一の参照番号を付与し、それらの詳細な説明を省略する。第5の実施形態の処理の流れは、図9及び図10に示されている第2の実施形態と実質的に同様であるので、第5の実施形態の以下の説明において、第2の実施形態と同様の処理に関しては、詳細な説明を省略し、異なる部分のみを説明する。
When the second object O n is retrieved, the main
On the other hand, when the position P of the second object O n (O n) is a position in the second region RB (affirmative determination in Step 306), the main
Next, a third embodiment will be described with reference to FIG.
In FIG. 12A, in the captured
According to the third embodiment, the position of the first subject 81 previously designated (or estimated) as the main subject is a position outside the first RA area, and the main subject is other than the first subject. When the position of the
As a result, in a situation where the score value of the subject fluctuates rapidly due to some reason that the main subject should not be switched (for example, when a certain subject accidentally enters a position with a high probability of being the main subject in the captured image) Even in this case, it is possible to stably estimate the main subject.
(Fourth embodiment)
Next, a fourth embodiment will be described. The size of the subject in the captured image varies depending on the actual size of the subject, the shooting situation, the type and shape of the subject, the shooting distance from the digital camera to the subject, and the focal length of the shooting lens. For example, a person's face and a vehicle such as an airplane may have different sizes detected in the captured image due to differences in actual size and shape. In the same person shooting, the size of the face area to be detected is larger in the latter than in the former when shooting a person with a wide background and when the person is greatly close-up. On the other hand, the threshold value used in the second embodiment is a fixed value stored in the memory.
The fourth embodiment of the present invention normalizes the threshold value as a fixed value in accordance with the size of the subject that is initially set as the main subject in order to cope with variations in the size of the subject in the captured image. is there. The configuration of the fourth embodiment is substantially the same as the configuration of the second embodiment shown in FIG. The processing flow of the fourth embodiment is substantially the same as that of the second embodiment shown in FIGS. In the following description of the fourth embodiment, detailed description of the same components and processes as those of the second embodiment will be omitted.
In the fourth embodiment of the present invention, the determination
ThA normal (normalized threshold ThA) → ThA · L q (O m )
ThB normal (normalized threshold ThB) → ThB · L q (O m )
Here, L q is the size of the subject when the current main subject is estimated as the main subject for the first time. ThA and ThB stored in the
According to the normalization method of the fourth embodiment, in
In another example of the fourth embodiment, instead of normalizing the threshold value, the main
L (O m ) normal (normalized first subject size) → L (O m ) / L q (O m )
L (O n ) normal (normalized second subject size) → L (O n ) / L q (O m )
The ThA and ThB stored in the
According to this normalization method of the fourth embodiment, at
For example, in the first shooting, it is assumed that the main subject is estimated from a plurality of persons with the background widely included in the shooting range. At this time, since the size of the person is small, the threshold value normalized as described above according to the size of the main subject is set to be relatively small. In the present embodiment, since a relatively small threshold is used in a state where each person is small, main subject estimation can be performed accurately. Next, when it is desired to focus on a small number of people from a plurality of persons, the focal length is increased or the person is approached. In this case, the size of the person in the captured image increases. In this embodiment, since the threshold value is greatly normalized according to the size of the enlarged subject, the main subject can be accurately estimated even when the subject is large.
In addition, the size of the subject varies depending not only on the focal length and shooting distance but also on the type of subject. For example, when shooting a vehicle such as an airplane, the size of the subject can be larger than the face area of the person, depending on the algorithm for extracting the contour of the subject. Even in this case, the present embodiment normalizes the threshold according to the size thereof, so that it is possible to accurately estimate the main subject regardless of the type of subject.
In the above example, the threshold value or the size of the subject is normalized by L q (O m ), but the present invention is not limited to this example. For example, it is possible to use the size of the subject at another time point.
According to the above as the fourth embodiment, the magnitude of the threshold or object, the actual size of the object, shooting distance from the digital camera to the subject will vary depending on the focal length of the taking lens L q ( Since normalization is performed using O m ), more accurate main subject estimation is possible.
(Fifth embodiment)
Next, a fifth embodiment will be described. FIG. 5 is a functional block diagram when the
撮影レンズ12の焦点距離やクロップ領域の大きさが変化すると、この変化に応じて、得られる画像の画角も変化する。画角が広角のときと望遠のときとでは、被写体がデジタルカメラに対して相対的に位置若しくは角度が変化するときの撮像画角内の移動距離は異なってくる。
また、画角が広角のときと望遠のときとでは、撮像画像内で被写体が一定の大きさであったとしても、デジタルカメラから被写体までの撮影距離が異なるため、被写体の大きさの変化は、広角のときと望遠のときとで異なってくる。すなわち、デジタルカメラから被写体までの撮影距離が一定距離だけ変化したとき、画角が広角のときの被写体の大きさの変化は、望遠のときと比べて、より大きくなる。このように広角では遠近感が強調され、望遠では遠近感が圧縮される。
When the focal length of the taking
In addition, when the field angle is wide and telephoto, even if the subject is a certain size in the captured image, the shooting distance from the digital camera to the subject is different, so the change in the subject size is It is different between wide angle and telephoto. That is, when the shooting distance from the digital camera to the subject changes by a certain distance, the change in the size of the subject when the angle of view is wide is greater than when the telephoto is wide. In this way, the perspective is emphasized at the wide angle, and the perspective is compressed at the telephoto.
上記事実に鑑み、第5の実施形態は、第2の実施形態及び第4の実施形態において、画角の相違による被写体の撮像画像内の移動距離の変化の相違、並びに、画角の相違による被写体の大きさの変化の相違を補償するものである。 In view of the above fact, the fifth embodiment is different from the second embodiment and the fourth embodiment in the difference in the change in the moving distance in the captured image of the subject due to the difference in the angle of view and the difference in the angle of view. This compensates for differences in the size of the subject.
図5に示すように、制御部1は、図4に示した構成要素の他に、撮像画像が撮像されたときの画角を取得する画角取得部28を更に備えている。画角取得部28は、撮影レンズ12から送られてきた焦点距離情報、及び/又は、操作インターフェース部7を介して伝達された、撮影者による撮像領域の大きさの指定操作(例えば、35mmフルサイズ、APS−Cサイズ、1.2倍、或いは、1.3倍等の切り替え操作等)に基づいて、撮像画像が撮像されたときの画角を取得する。画角取得部28は、取得した画角の情報を、所定範囲設定部25及び判定条件設定部27に伝達する。デジタルカメラ10がクロップ機能を有していない場合や、クロップ機能を使用しない場合には、画角取得部28は、撮影レンズ12からの焦点距離情報を、所定範囲設定部25及び判定条件設定部27に直接送ることができる。
As shown in FIG. 5, the
第5の実施形態に係る所定範囲設定部25の作用に関して図13を用いて説明する。
The operation of the predetermined
図13には、撮影レンズの焦点距離が広角の場合と望遠の場合との画角の相違が示されている。被写体50が同一の撮影距離D1において矢印58の方向に同じ移動量で相対的に移動する場合(矢印58の長さが移動量を表すものとする)を想定する(デジタルカメラ10が被写体に対する向きを変えて被写体が画面内で移動する場合も含まれる)。
広角レンズで撮影した場合、広い画角により撮影距離D1における撮影範囲60が広くなるため、当該撮影範囲60に対する被写体移動距離の比は望遠の場合よりも小さくなる。これに対して望遠レンズで撮影した場合、狭い画角により撮影距離D1における撮影範囲62が狭くなるため、当該撮影範囲62に対する被写体移動距離の比は広角の場合よりも大きくなる。この状況は、撮影レンズの焦点距離が同一であっても撮影領域の一部をクロップすることにより望遠効果をもたせる場合にも当てはまる。
従って、撮像画像内において、主要被写体が存在する確率の高い領域は、広角で撮影したときよりも望遠で撮影したときの方が、より広くなる。この状況に対応するため、所定範囲設定部25は、画角が大きく(小さくなる)なるほど、所定範囲を小さく(大きく)設定する。例えば図13に示すように、広角での撮影時に撮像画像55aに対して所定範囲51aを設定した場合、より望遠での撮影時では、撮像画像55bに対して、所定範囲51aよりも広い所定範囲51bを設定する。これによって、図10のステップ255の判定精度を向上させることができる。なお、第3の実施形態の第1の領域RA及び第2の領域RBに関しても、画角に応じた領域変更を適用することができる。
なお、図13において、被写体50までの撮影距離がD2(<D1)となった場合、撮影範囲61、63は、各々、撮影範囲60、62よりも小さくなる。従って、被写体50までの撮影距離を検出できる場合には、所定範囲設定部25は、撮影距離が小さい(大きい)ほど、所定範囲を大きく(小さく)するようにしてもよい。
FIG. 13 shows the difference in the angle of view between when the focal length of the photographic lens is wide and when it is telephoto.
When taken with a wide-angle lens, for
Accordingly, in the captured image, an area where the main subject is highly likely to be present is wider when taken at a telephoto position than when taken at a wide angle. In order to cope with this situation, the predetermined
In FIG. 13, when the shooting distance to the subject 50 is D 2 (<D 1 ), the shooting ranges 61 and 63 are smaller than the shooting ranges 60 and 62, respectively. Therefore, when the shooting distance to the subject 50 can be detected, the predetermined
次に、第5の実施形態に係る判定条件設定部27の作用に関して図14を用いて説明する。
図14(A)には、カメラ91が広角レンズで被写体O1及びO2を同一の撮影距離l1から撮影し、カメラ92が望遠レンズで被写体O1及びO2を同一の撮影距離l2から撮影している撮影状況が示されている。ここで、カメラ91及び92のいずれにおいても被写体O1が主要被写体とされているとする。また、説明を簡単にするため、カメラ92の望遠レンズの焦点距離がカメラ91の広角レンズの焦点距離のl2/l1倍であり、被写体O1及びO2の実際の大きさが同一と仮定すると、カメラ91及び92の撮像画像内における被写体O1及びO2の大きさは、等しくなる。
図14(B)には、図14(A)の撮影状況から被写体O2がカメラ91及び92に距離l3だけ接近した状況が示されている。図14(B)の場合、カメラ91における撮像画像内での被写体O2の大きさL1k(O2)及びカメラ92における撮像画像内での被写体O2の大きさL2k(O2)は、図14(A)の状況での被写体O2の大きさをL1(O2)とすると、以下の通りとなる。
カメラ91:L1k(O2)=(l1/(l1−l3))・L1(O2)
カメラ92:L2k(O2)=(l2/(l2−l3))・L1(O2)
l2>l1であるためL1k(O2)>L2k(O2)となる。すなわち、図14(B)の状況では、カメラ91での被写体O2の大きさは、カメラ92での被写体O2の大きさよりも大きくなる。
被写体O1の大きさL1(O2)がThA以下となっており、L2k(O2)>ThB>L1k(O2)となる場合を想定する。この場合、同じ図14(B)の状況で撮影しているにも関わらず、カメラ91では、被写体O2を主要被写体とするのに対し、カメラ92では、被写体O2を主要被写体としないことがおこり得る。第5の実施形態では、広角と望遠とで主要被写体の検出率を同一或いは近づけるため、判定条件設定部27が、撮影時の画角が大きく(焦点距離が小さく)なるほど、閾値比ThB/ThA(或いは差ThB−ThA)を大きくする。また、撮影時の画角が小さく(焦点距離が大きく)なるほど、閾値比ThB/ThA(或いは差ThB−ThA)を小さくする。このように主要被写体検出のヒステリシス特性を、画角によって変更することで、撮影時の画角の相違による主要被写体の推定精度のばらつきを減少させることができる。
Next, the operation of the determination
In FIG. 14A, the
FIG. 14B shows a situation in which the subject O 2 approaches the
Camera 91: L 1k (O 2 ) = (l 1 / (l 1 −l 3 )) · L 1 (O 2 )
Camera 92: L 2k (O 2 ) = (l 2 / (l 2 −l 3 )) · L 1 (O 2 )
Since l 2 > l 1 , L 1k (O 2 )> L 2k (O 2 ). That is, in the situation of FIG. 14B, the size of the subject O 2 at the
Assume that the size L 1 (O 2 ) of the subject O 1 is equal to or smaller than ThA, and L 2k (O 2 )>ThB> L 1k (O 2 ). In this case, the
例えば、焦点距離100mmのレンズを持つカメラ92でl2=10mの距離から被写体O1を撮影する場合と、焦点距離50mmのレンズを持つカメラ91で5mの距離から同一被写体O1を撮影する場合とを考えると、いずれのカメラでも、撮像画面内での被写体O1の大きさは同じとなる。ここで、被写体O1と同じ撮影距離に存在していた被写体O2が被写体O1を1m抜いてカメラ91及び92に接近する状況を想定すると、被写体O2はカメラ92から9m、カメラ91から4mの距離となる。被写体O1、O2の実際の大きさが同じとすると、カメラ92の撮像画面内では、被写体O2は被写体O1の10/9=約1.1倍、カメラ91の撮像画面内では、被写体O2は被写体O1の5/4=1.25倍となる。そこで、判定条件設定部27は、撮像時の画角が広角になるほど、ThBを増大させ(或いは/及びThAを減少させ)、撮像時の画角が望遠になるほど、ThBを減少させ(或いは/及びThAを増大させ)ることにより、カメラ91及び92のいずれにおいても、被写体O2を主要被写体と推定することができる。
For example, when shooting a subject O 1 from a distance of l 2 = 10 m with a
被写体O1、O2までの撮影距離を検出できる場合には、判定条件設定部27は、撮影距離が減少するほど、ThBを増大させ、撮影距離が増大するほど、ThBを減少させる制御を行うこともできる。
以上が本発明の各実施形態であるが、本発明は上記例にのみ限定されるものではなく、本発明の範囲内で任意好適に変更可能である。
When the shooting distances to the subjects O 1 and O 2 can be detected, the determination
The embodiments of the present invention have been described above. However, the present invention is not limited to the above-described examples, and can be arbitrarily modified within the scope of the present invention.
例えば、本発明の主要被写体推定装置をデジタルカメラ10を例にして説明したが、本発明は、デジタルカメラへの応用には限定されない。例えば、コンピュータ、専用の画像解析装置、携帯型情報処理端末(携帯電話、スマートフォン、タブレット型端末などを含む)等を始めとした情報処理装置にも、カメラ機能の有無によらず広く適用可能である。本発明には、カメラ機能を有していないか或いはカメラ機能を使用しない場合でも、連続する複数の撮像画像を入力することによって主要被写体の推定を実行可能な全ての装置が含まれる。
For example, the main subject estimation apparatus of the present invention has been described using the
また、本発明は、主要被写体の推定を上記画像情報処理装置に実行させるためのプログラムの形態で提供されてもよい。当該プログラムは、インターネット等からダウンロードする電子データの形態、記憶媒体に記憶された形態、ソースコードで記述された形態のいずれでも本発明の範囲内に含まれる。
制御部1は、デジタルカメラ10により静止画として連続撮影若しくは動画撮影されて画像処理ユニット2から送られてきたデータだけではなく、媒体に記憶され若しくはダウンロードされた複数の撮影画像を使用してもよい。また、制御部1は、後の処理の演算省力化のために、撮影時よりも小さい画像サイズにリサイズされた撮像画像を用いてもよい。撮像画像f1、f2、...fk,...は、古い順(即ち、フレーム番号が大きいほど後の時刻で撮影されたもの)でも、新しい順(即ち、フレーム番号が大きいほど、以前の時刻に遡って撮影されたものである)のいずれの順で並べられていてもよい。後者の場合は、撮像画像は撮影済であり、時間的に過去に遡って主要被写体を推定することになる。
The present invention may be provided in the form of a program for causing the image information processing apparatus to execute estimation of a main subject. The program is included in the scope of the present invention in any form of electronic data downloaded from the Internet or the like, a form stored in a storage medium, or a form described in source code.
The
図6、図7、図9及び図10のフローチャートの処理の流れは任意好適に変更可能である。例えば、図7のステップ154及び図10のステップ254では、ステップ152、252の判定が成立した後に、主要被写体とされている第1の被写体以外で最も大きいか又は最も大きいスコア値を与える被写体を第2の被写体とした。しかし、本発明は、この例に限らず、最初の撮像画像f1において主要被写体以外で最も大きいか又は最も大きいスコア値を与える被写体を第2の被写体とし、当該被写体を後の撮像画像においてもそのまま継続的に第2の被写体として追尾してもよい。
The processing flow in the flowcharts of FIGS. 6, 7, 9 and 10 can be arbitrarily changed. For example, in
図5の画角取得部28により取得される「画角」は、「対角線画角」で表すことができるが、状況に応じて「水平画角」又は「垂直画角」を使用することができる。また、クロップしない場合は、撮像素子のサイズは一定なので、撮影レンズの「焦点距離値」そのものを画角として使用することができる(この場合、「画角が大きくなる」とは「焦点距離が小さくなる」ことに対応し、「画角が小さくなる」とは「焦点距離が大きくなる」ことに対応する)。クロップする場合は、クロップしないときの元の撮影面積をクロップ領域の面積で除算した値の平方根(クロップによる拡大率)を撮影レンズの焦点距離に乗算した値(換算焦点距離)を画角として使用してもよい(この場合、「画角が大きくなる」とは「換算焦点距離が小さくなる」ことに対応し、「画角が小さくなる」とは「換算焦点距離が大きくなる」ことに対応する)。
The “view angle” acquired by the view
第1の実施形態では、(1)式において、スコア関数Sの変数として、被写体の大きさ又は大きさに関する値と、被写体の位置又は位置に関する値とを様々に組み合わせて用いることが可能であることを示した。以下では、それらの組み合わせの例を第1乃至第6の実施例として、図15乃至図20を用いて説明する。 In the first embodiment, in the equation (1), as the variable of the score function S, it is possible to use various combinations of the value related to the size or size of the subject and the value related to the location or position of the subject. Showed that. Hereinafter, examples of such combinations will be described as first to sixth embodiments with reference to FIGS. 15 to 20.
なお、図15乃至図20の各々には、撮像画像内において、先に主要被写体と推定されている第1の被写体(丸で表示)と、第2の被写体(四角で表示)が示されている。また、図中の矢印は、第1及び第2の被写体の大きさ或いは位置の推移を示すものである。
(第1の実施例)
まず、第1の実施例について説明する。第1の実施例は、スコア関数Sの変数として被写体の大きさLとその大きさの安定度を用いて主要被写体推定を行うものである。図15は、第1の実施例が適用される撮影状況を説明する図である。図15の撮影状況は、主要被写体がほぼ同じ大きさとなるように、撮影者が撮影レンズをズーミングしたり、被写体に接近したり、遠ざかったりして追従する場合などに相当している。このため、第1の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、大きさの安定度を用い、大きさLが大きいほど、また大きさLの安定度が大きいほどスコア関数Sの値を大きくするようにしている。
大きさの安定度として、大きさLの平均値Lave(所定フレームに亘る被写体の大きさLの平均値)や、所定フレームに亘って演算される大きさLの偏差若しくは分散値Lvを用いることができる。大きさLの偏差若しくは分散値Lvは、その値が大きいほど大きさLのばらつきが大きいため安定度が小さいものとみなされる。従って、Lvの重み係数Wは負となり、Lvが大きいほどスコアSが小さくなる。
Each of FIG. 15 to FIG. 20 shows a first subject (displayed in a circle) and a second subject (displayed in a square) that have been estimated as the main subject in the captured image. Yes. Moreover, the arrows in the figure indicate the transition of the size or position of the first and second subjects.
(First embodiment)
First, the first embodiment will be described. In the first embodiment, main subject estimation is performed using the size L of the subject and the stability of the size as variables of the score function S. FIG. 15 is a diagram illustrating a shooting situation to which the first embodiment is applied. The shooting situation in FIG. 15 corresponds to the case where the photographer zooms the shooting lens, approaches the subject, or moves away from the subject so that the main subject has almost the same size. For this reason, in the first embodiment, the stability of the size is used in addition to the size L of the subject in the captured image as a variable of the score function. The larger the size L, the more stable the size L. The score function S is increased as the degree increases.
As the stability of the size, an average value L ave of the size L (average value of the size L of the subject over a predetermined frame) or a deviation or variance value Lv of the size L calculated over the predetermined frame is used. be able to. The deviation of the magnitude L or the variance Lv is considered to be less stable because the larger the value, the greater the variation in the magnitude L. Therefore, the weight coefficient W of Lv becomes negative, and the score S decreases as Lv increases.
スコア関数Sとして、S(L,Lv)、S(L,Lave)又はS(L,Lv,Lave)等を用いることができる。 As the score function S, S (L, Lv), S (L, L ave ), S (L, Lv, L ave ), or the like can be used.
図15の例では、先に主要被写体と推定された同図中○で示される第1の被写体は、L(O1)がほとんど変化しない。一方、同図中□で示される第2の被写体は、L(O2)が大きく変化する。最初の段階では、第1の被写体と第2の被写体とで大きさはほぼ同じであるが、次の段階では、第2の被写体が急激に大きくなり、第1の被写体よりも大きくなる。しかし、第3の段階では、第2の被写体が急激に小さくなり、第1の被写体よりも小さくなる。従って、第2の被写体のスコア関数では、第2の被写体のLaveは、第1の被写体のLaveと比べてスコアに寄与できない。或いは、第2の被写体の分散値Lvが、第1の被写体の分散値Lvと比べて大きいため、その負の重み係数により第2の被写体のスコアを第1の被写体のスコアと比べて減少させる。その結果、大きさLだけに着目したとき第2段階でL(O1)がThA以下となり、L(O2)がThB以上となったときでも、大きさLの安定度を加えた主要被写体の推定では、図15の例のように、主要被写体をO1に維持することが起こり得る。勿論、大きさの変動状況によっては、主要被写体をO2に変更することもあり得る。 In the example of FIG. 15, L (O 1 ) hardly changes in the first subject indicated by a circle in FIG. On the other hand, in the second subject indicated by □ in the figure, L (O 2 ) changes greatly. In the first stage, the first subject and the second subject have almost the same size, but in the next stage, the second subject becomes abruptly larger and larger than the first subject. However, in the third stage, the second subject becomes abruptly smaller and smaller than the first subject. Therefore, in the score function of the second subject, L ave of the second subject cannot contribute to the score as compared to L ave of the first subject. Alternatively, since the variance value Lv of the second subject is larger than the variance value Lv of the first subject, the score of the second subject is reduced compared to the score of the first subject by the negative weighting factor. . As a result, when focusing only on the size L, in the second stage, L (O 1 ) is equal to or less than ThA, and even when L (O 2 ) is equal to or greater than ThB, the main subject to which stability of size L is added. In this estimation, it is possible to maintain the main subject at O 1 as in the example of FIG. Of course, the main subject may be changed to O 2 depending on the variation of the size.
なお、大きさLの平均値Laveは、単なる大きさの加算平均だけではなく、例えば短時間内での大きさの急激な変化分を遮断することによって求められてもよい。
(第2の実施例)
次に、第2の実施例について説明する。第2の実施例は、スコア関数Sの変数として被写体の大きさLとその大きさの変化を用いて主要被写体推定を行うものである。図16は、第2の実施例が適用される撮影状況を示す。図16の撮影状況は、例えばレース中などにおいて、先に主要被写体と推定された同図中○で示される第1の被写体が、第2の被写体に追い越されて、大きさが逆転する状況を示している。
Note that the average value L ave of the magnitude L is not limited to a simple average of magnitudes, but may be obtained, for example, by blocking a sudden change in magnitude within a short time.
(Second embodiment)
Next, a second embodiment will be described. In the second embodiment, main subject estimation is performed using a subject size L and a change in the size as a variable of the score function S. FIG. 16 shows a shooting situation to which the second embodiment is applied. The shooting situation in FIG. 16 is a situation in which, for example, during a race, the size of the first subject, which was previously estimated as the main subject, is overtaken by the second subject and reversed in size. Show.
スコア関数Sの変数として、大きさL及び大きさLの変化ΔLを用い、スコア関数としてS(L,ΔL)等を用いることができる。ΔLは、時間的に後に入力された撮像画像内の当該被写体の大きさから時間的に先に入力された撮像画像内の当該被写体の大きさを引いた値とすることができる。或いは、ΔLは、所定フレームに亘る撮像画像内の当該被写体の大きさの分布から最小二乗法などで求められた大きさLの平均変化率とすることができる。
ΔLは、被写体の大きさが減少する場合は負値であり、被写体の大きさが増加する場合は正値となる。従って、スコア関数Sは、被写体の大きさが減少する場合はより急激に減少し、被写体の大きさが増加する場合はより急激に増加する。図16の撮影状況では、大きさLのみの関数であるスコア関数S(L)を用いたとしても、いずれは第2の被写体を主要被写体と推定する。しかし第2の実施例では、S(L,ΔL)を用い、主要被写体である兆候(ΔL>0)をスコアに反映させるようにしたので、スコア関数S(L)を用いる場合と比べて、より迅速に主要被写体を推定することが可能となる。
(第3の実施例)
次に、第3の実施例について説明する。第3の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の位置の安定度を用いて主要被写体推定を行うものである。図17は、第3の実施例が適用される撮影状況を示す図である。図17の撮影状況は、主要被写体が撮像画像内でほぼ同じ位置を維持するように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。このため、第3の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の位置の安定度を用い、スコア関数Sとして、S(L,Pv)等が設定されている。スコア関数Sの値は、被写体の大きさLが大きいほど、また被写体の位置Lの安定度が大きいほど大きくなるように設定されている。ここで、位置Lの安定度を反映するものとしては、被写体の位置の分散値Pvが用いられ、その重み係数が負に設定されている。
As a variable of the score function S, the magnitude L and the change ΔL of the magnitude L can be used, and S (L, ΔL) or the like can be used as the score function. ΔL can be a value obtained by subtracting the size of the subject in the captured image input earlier in time from the size of the subject in the captured image input later in time. Alternatively, ΔL can be an average rate of change of the size L obtained by the least square method or the like from the size distribution of the subject in the captured image over a predetermined frame.
ΔL has a negative value when the size of the subject decreases, and has a positive value when the size of the subject increases. Therefore, the score function S decreases more rapidly when the size of the subject decreases, and increases more rapidly when the size of the subject increases. In the shooting situation of FIG. 16, even if the score function S (L) that is a function of only the size L is used, the second subject is estimated as the main subject. However, in the second embodiment, since S (L, ΔL) is used and the sign of the main subject (ΔL> 0) is reflected in the score, compared with the case where the score function S (L) is used, It becomes possible to estimate the main subject more quickly.
(Third embodiment)
Next, a third embodiment will be described. In the third embodiment, main subject estimation is performed using the subject size L and the subject position stability as variables of the score function S. FIG. 17 is a diagram illustrating a shooting situation to which the third embodiment is applied. The shooting situation in FIG. 17 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject maintains the substantially same position in the captured image. For this reason, in the third embodiment, the stability of the position of the subject is used in addition to the size L of the subject in the captured image as a variable of the score function, and S (L, Pv) or the like is used as the score function S. Is set. The value of the score function S is set so as to increase as the subject size L increases and as the stability of the subject position L increases. Here, as a reflection of the stability of the position L, the variance value Pv of the position of the subject is used, and its weight coefficient is set to be negative.
図17の例では、同図中○で示される第1の被写体の位置の分散値Pvが、同図中□で示される第2の被写体の位置の分散値Pvよりも大きくなっている。このため、第1の被写体のスコアが減少され、主要被写体が第2の被写体に変更されている。Pvの代わりに或いはPvに加えて、所定フレームに亘る被写体の位置の変化であるΔPを用いてもよい。
(第4の実施例)
次に、第4の実施例について説明する。
図18には、第4の実施例が示されている。第4の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の所定位置からの距離とを用いて主要被写体推定を行うものである。図18は、第4の実施例が適用される撮影状況を示す図である。図18の撮影状況は、主要被写体を撮像画像内の所定位置P0の近傍に維持させるように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。ここで、所定位置P0は、撮像画像の中心位置や、撮影者が指定したAFフレームの位置等、主要被写体が存在する確率が高いと想定される位置である。
第4の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の現在の位置Pと所定位置P0との間の距離|P−P0|を用いるので、スコア関数Sとして、S(L,|P−P0|)等が設定されている。スコア関数Sは、被写体の大きさLが大きいほど、また被写体が所定位置P0に近いほど大きくなるように設定されている。従って、スコア関数Sにおいて|P−P0|の重み係数が負に設定されている。
In the example of FIG. 17, the variance value Pv of the position of the first subject indicated by ◯ in the figure is larger than the variance value Pv of the position of the second subject indicated by □ in the figure. For this reason, the score of the first subject is reduced, and the main subject is changed to the second subject. Instead of Pv or in addition to Pv, ΔP that is a change in the position of the subject over a predetermined frame may be used.
(Fourth embodiment)
Next, a fourth embodiment will be described.
FIG. 18 shows a fourth embodiment. In the fourth embodiment, main subject estimation is performed using a subject size L and a distance from a predetermined position of the subject as variables of the score function S. FIG. 18 is a diagram illustrating a shooting situation to which the fourth embodiment is applied. The shooting situation in FIG. 18 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject is maintained in the vicinity of the predetermined position P 0 in the captured image. Here, the predetermined position P 0 is a position that is assumed to have a high probability that the main subject exists, such as the center position of the captured image and the position of the AF frame specified by the photographer.
In the fourth embodiment, as a variable of the score function, a distance | P−P 0 | between the current position P of the subject and the predetermined position P 0 is used in addition to the size L of the subject in the captured image. Therefore, S (L, | P−P 0 |) or the like is set as the score function S. Score function S is, the larger the size L of the object, also subject is set to be larger closer to the predetermined position P 0. Therefore, in the score function S, the weighting factor of | P−P 0 | is set to be negative.
図18の例では、同図中○で示される第1の被写体の大きさが小さくなり、同図中□で示される第2の被写体の大きさが大きくなっている。しかし、第1の被写体は、所定位置P0の近傍の位置にあるが、第2の被写体は、依然として所定位置P0から離れた位置にある。これにより、第2の被写体のスコアは、その大きさLが大きくなったにも関わらず、それほど増加せず、主要被写体は第1の被写体に維持される。
(第5の実施例)
次に、第5の実施例について説明する。
図19には、第5の実施例が示されている。第5の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の所定位置への接近傾向とを用いて主要被写体推定を行うものである。図19は、第5の実施例が適用される撮影状況を示す図である。図19の撮影状況は、主要被写体を撮像画像内の所定位置P0に近づけるように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。ここで、所定位置P0は、撮像画像の中心位置や、撮影者が指定したAFフレームの位置等、主要被写体が存在する確率が高いと想定される位置である。
第5の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の現在の位置Pと所定位置P0との間の距離|P−P0|の時間変化分を示すΔ|P−P0|を用いるので、スコア関数Sとして、S(L,Δ|P−P0|)等が設定されている。スコア関数Sは、被写体の大きさLが大きいほど、また被写体の位置が所定位置P0に近くなるように変化するほど大きくなるように設定されている。
In the example of FIG. 18, the size of the first subject indicated by ◯ in the figure is small, and the size of the second subject indicated by □ in the figure is large. However, the first subject is at a position near the predetermined position P 0 , but the second subject is still at a position away from the predetermined position P 0 . As a result, the score of the second subject does not increase so much despite the increase in the size L, and the main subject is maintained as the first subject.
(Fifth embodiment)
Next, a fifth embodiment will be described.
FIG. 19 shows a fifth embodiment. In the fifth embodiment, main subject estimation is performed using the size L of the subject and the tendency of the subject to approach a predetermined position as variables of the score function S. FIG. 19 is a diagram illustrating a shooting situation to which the fifth embodiment is applied. The shooting situation in FIG. 19 corresponds to the case where the photographer frames the digital camera and follows the main subject so that the main subject approaches the predetermined position P 0 in the captured image. Here, the predetermined position P 0 is a position that is assumed to have a high probability that the main subject exists, such as the center position of the captured image and the position of the AF frame specified by the photographer.
In the fifth embodiment, as a variable of the score function, in addition to the size L of the subject in the captured image, a time of a distance | P−P 0 | between the current position P of the subject and the predetermined position P 0 Since Δ | P−P 0 | indicating the amount of change is used, S (L, Δ | P−P 0 |) or the like is set as the score function S. Score function S is set such as the size L is large subject, and the position of the object becomes larger as changes to be close to the predetermined position P 0.
図19の例では、同図中○で示される第1の被写体は、その大きさLは変化しないが、所定位置P0から遠ざかるようにその位置が変化したので、第1の被写体のスコアは減少される。これに対して、同図中□で示される第2の被写体は、その大きさLが増加すると共に、所定位置P0に接近するようにその位置が変化したので、第2の被写体のスコアは増加される。これによって、主要被写体が第1の被写体から第2の被写体に変更される。
(第6の実施例)
次に、第6の実施例について説明する。第6の実施例は、スコア関数Sの変数として被写体の位置とその位置の安定度を用いて主要被写体推定を行うものである。図20は、第6の実施例が適用される撮影状況を説明する図である。図20の撮影状況は、主要被写体を撮像画像内のほぼ同じ位置(例えばAF枠)に維持するように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。このため、第6の実施例では、スコア関数の変数として、撮像画像内の被写体と所定位置P0(例えば、上述のAF枠又は画像中央位置)と、被写体の位置の安定度を用いる。スコア関数Sとして、S(|P−P0|,Pv)等が設定されている。スコア関数Sの値は、被写体が所定位置P0に近いほど、また被写体の位置の安定度が大きいほど大きくなるように設定されている。ここで、位置Lの安定度を反映するものとしては、被写体の位置の分散値Pvが用いられ、その重み係数が負に設定されている。
In the example of FIG. 19, the size of the first subject indicated by a circle in FIG. 19 does not change, but its position changes so as to move away from the predetermined position P 0 , so the score of the first subject is Will be reduced. In contrast, the second object indicated in FIG □, along with their size L is increased, since its position to approach the predetermined position P 0 is changed, the score of the second subject Will be increased. As a result, the main subject is changed from the first subject to the second subject.
(Sixth embodiment)
Next, a sixth embodiment will be described. In the sixth embodiment, the main subject is estimated using the position of the subject and the stability of the position as a variable of the score function S. FIG. 20 is a diagram for explaining a shooting situation to which the sixth embodiment is applied. The shooting situation in FIG. 20 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject is maintained at substantially the same position (for example, an AF frame) in the captured image. For this reason, in the sixth embodiment, the subject in the captured image, the predetermined position P 0 (for example, the above-described AF frame or the image center position), and the stability of the position of the subject are used as variables of the score function. As the score function S, S (| P−P 0 |, Pv) or the like is set. The value of the score function S is subject is set closer to the predetermined position P 0, and as the larger stability of the position of the subject is large. Here, as a reflection of the stability of the position L, the variance value Pv of the position of the subject is used, and its weight coefficient is set to be negative.
図20の例では、同図中○で示される第1の被写体が、当初は同図中□で示される第2の被写体よりも所定位置P0よりも近く、先に主要被写体であると推定された。しかし、次に第1の被写体は、所定位置P0から急激に離れ、最後にまた位置P0に近づいた。これに対して、同図中□で示される第2の被写体は、所定位置P0に安定的に近づいた。このため、位置の分散値Pvに関して、第1の被写体は第2の被写体よりも大きくなり、第1の被写体のスコアSが減少された。その結果、図20の例では、主要被写体が第2の被写体に変更された。 In the example of FIG. 20, the first subject indicated by a circle in the figure is initially closer to the predetermined position P 0 than the second subject indicated by a square in the figure, and is estimated to be the main subject first. It was done. However, the first subject then moved away from the predetermined position P 0 rapidly and finally approached the position P 0 again. In contrast, the second object indicated in FIG □ approached stably in position P 0. For this reason, with respect to the position variance value Pv, the first subject is larger than the second subject, and the score S of the first subject is reduced. As a result, in the example of FIG. 20, the main subject is changed to the second subject.
以上が第1の実施形態の実施例であるが、上記例以外にも様々な変数の組み合わせが存在することはいうまでもない。また、上記に説明した各実施形態、実施例を組み合わせて用いるものも本発明に含まれる。 The above is an example of the first embodiment, but it goes without saying that there are various combinations of variables in addition to the above example. Further, the present invention includes a combination of the above-described embodiments and examples.
1 制御部
2 画像処理ユニット
5 撮像素子
6 ディスプレイ
10 デジタルカメラ
12 撮影レンズ
12a レンズCPU
15 合焦レンズ群
21 画像取得部
22 スコア関数メモリ
23 被写体検出部
24 被写体情報検出部
25 所定範囲設定部
26 判定条件メモリ
27 判定条件設定部
28 画角取得部
30 閾値メモリ
31 主要被写体推定部
50 被写体
55a、55b 撮像画像
51a、51b 所定範囲
DESCRIPTION OF
DESCRIPTION OF
Claims (1)
前記画像取得部が取得した撮像画像から被写体を検出する被写体検出部と、
前記被写体検出部が検出した被写体の前記撮像画像内での大きさに関する被写体情報を検出する被写体情報検出部と、
前記被写体情報に基づいて、前記複数の撮像画像から主要被写体を推定する主要被写体推定部と、を備え、
前記被写体推定部は、第1画像内で主要被写体とされた第1の被写体の前記被写体情報が、前記第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、前記第1の被写体と異なる第2の被写体の前記被写体情報が、前記第1条件と異なる第2条件を満たした時に主要被写体を前記第2の被写体に変更する、主要被写体推定装置。 An image acquisition unit for acquiring a plurality of images;
A subject detection unit for detecting a subject from a captured image acquired by the image acquisition unit;
A subject information detection unit for detecting subject information related to the size of the subject detected by the subject detection unit in the captured image;
A main subject estimation unit that estimates a main subject from the plurality of captured images based on the subject information,
The subject estimation unit does not satisfy the first condition in the second image acquired after the first image, the subject information of the first subject that is the main subject in the first image; and A main subject estimation device that changes a main subject to the second subject when the subject information of a second subject different from the first subject satisfies a second condition different from the first condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017176679A JP6565991B2 (en) | 2017-09-14 | 2017-09-14 | Electronic device, subject detection method and program. |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017176679A JP6565991B2 (en) | 2017-09-14 | 2017-09-14 | Electronic device, subject detection method and program. |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013248592A Division JP6210214B2 (en) | 2013-11-29 | 2013-11-29 | Main subject estimation apparatus, program, and information processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017225192A true JP2017225192A (en) | 2017-12-21 |
JP6565991B2 JP6565991B2 (en) | 2019-08-28 |
Family
ID=60687101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017176679A Active JP6565991B2 (en) | 2017-09-14 | 2017-09-14 | Electronic device, subject detection method and program. |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6565991B2 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010141849A (en) * | 2008-12-15 | 2010-06-24 | Canon Inc | Main face selecting device, control method therefor, imaging device, and program |
JP2015106849A (en) * | 2013-11-29 | 2015-06-08 | 株式会社ニコン | Main subject estimation device, program, and information processing apparatus |
-
2017
- 2017-09-14 JP JP2017176679A patent/JP6565991B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010141849A (en) * | 2008-12-15 | 2010-06-24 | Canon Inc | Main face selecting device, control method therefor, imaging device, and program |
JP2015106849A (en) * | 2013-11-29 | 2015-06-08 | 株式会社ニコン | Main subject estimation device, program, and information processing apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP6565991B2 (en) | 2019-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11012614B2 (en) | Image processing device, image processing method, and program | |
US10827127B2 (en) | Zoom control device, imaging apparatus, control method of zoom control device, and recording medium | |
TWI419552B (en) | Imaging apparatus, subject tracking method and storage medium | |
EP1998558B1 (en) | Image pickup apparatus equipped with function of detecting image shaking | |
US10270978B2 (en) | Zoom control device with scene composition selection, and imaging apparatus, control method of zoom control device, and recording medium therewith | |
US20160191809A1 (en) | Zoom control device, imaging apparatus, control method of zoom control device, and recording medium | |
CN110941076B (en) | Control apparatus, image pickup apparatus, control method, and storage medium | |
US10901174B2 (en) | Camera for limiting shifting of focus adjustment optical system | |
JP6210214B2 (en) | Main subject estimation apparatus, program, and information processing apparatus | |
JP4807582B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
JP2018033013A (en) | Control device, imaging apparatus, control method, program, and memory medium | |
JP2015111226A (en) | Subject tracking device and control method of the same, imaging device, program, and storage medium | |
JP6565991B2 (en) | Electronic device, subject detection method and program. | |
JP2014216830A (en) | Image tracking device, image tracking method and program | |
JP6087536B2 (en) | Imaging apparatus and control method thereof | |
KR101421940B1 (en) | Apparatus for photographing and method of photographing | |
CN113014796B (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
JP2011234310A (en) | Imaging apparatus | |
JP2018180372A (en) | Imaging apparatus and control method thereof | |
JP2010060657A (en) | Focus adjustment device and focus adjustment method | |
JP2021124671A (en) | Image processing device, imaging apparatus, image processing method, and program | |
JP2024064185A (en) | Imaging system, device and controlling method | |
JP2020101730A (en) | Imaging device and control method for the same | |
JP2019201399A (en) | Control device, imaging device, control method, and program | |
JP2019161540A (en) | Imaging apparatus, control method of the same, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20171013 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180703 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180710 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20180907 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181108 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20181108 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181211 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20190208 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190409 |
|
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: 20190702 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190715 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6565991 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |