JP6489150B2 - Image processing apparatus and imaging apparatus - Google Patents
Image processing apparatus and imaging apparatus Download PDFInfo
- Publication number
- JP6489150B2 JP6489150B2 JP2017088041A JP2017088041A JP6489150B2 JP 6489150 B2 JP6489150 B2 JP 6489150B2 JP 2017088041 A JP2017088041 A JP 2017088041A JP 2017088041 A JP2017088041 A JP 2017088041A JP 6489150 B2 JP6489150 B2 JP 6489150B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- mask
- subject
- area
- region
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 118
- 238000003384 imaging method Methods 0.000 title claims description 69
- 230000003287 optical effect Effects 0.000 claims description 38
- 238000001514 detection method Methods 0.000 claims description 16
- 238000006243 chemical reaction Methods 0.000 claims description 12
- 238000011156 evaluation Methods 0.000 description 97
- 238000000034 method Methods 0.000 description 65
- 230000008569 process Effects 0.000 description 57
- 238000000605 extraction Methods 0.000 description 12
- 230000008859 change Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Description
本発明は、画像処理装置及び撮像装置に関する。 The present invention relates to an image processing apparatus and an imaging apparatus .
従来、被写体の動きに合わせて、焦点調節時に用いるフォーカスエリアを追従させる、所謂追尾に関して様々な技術が考案されている。この追尾に関する技術として、カメラに近づく、或いはカメラから離れる方向に移動する被写体の形状や大きさ等に応じて、AF測距枠を変化させる技術がある(特許文献1参照)。 Conventionally, various techniques have been devised for so-called tracking in which a focus area used for focus adjustment is followed in accordance with the movement of a subject. As a technique related to this tracking, there is a technique for changing an AF distance measurement frame in accordance with the shape or size of a subject that moves toward or away from the camera (see Patent Document 1).
上述した特許文献1は、カメラに近づく又はカメラから離れる方向に移動する被写体に対して焦点調節を行う場合に効果的な技術である。しかしながら、被写体の動きはカメラに近づく又はカメラから離れる方向に移動するばかりではない。このため、追尾対象となる被写体が撮影範囲(画角)から外れてしまう場合や、他の被写体が入り込む場合など、画角内における被写体の変化に応じて、追尾対象となる被写体を切り替える技術については考慮されていない。
本発明は、上述した課題を鑑みて発明されたものであり、追尾対象とする被写体の切り替えを、容易且つ的確に行うことを目的とする。 The present invention has been invented in view of the above-described problems, and an object thereof is to easily and accurately switch a subject to be tracked.
本発明の画像処理装置は、特定の被写体を追尾対象とする画像処理装置であって、第1画像に含まれている被写体と前記第1画像よりも後に生成される第2画像に含まれている被写体とを検出する検出部と、前記検出部により、前記第1画像の中心部分を含む第1領域において追尾対象になっている第1被写体が検出され、かつ、前記第2画像の中心部分を含み、前記第1領域よりも面積の大きい第2領域において前記第1被写体が検出されず、前記第2画像の中心部分を含み、前記第2領域よりも面積の小さい第3領域において前記第1被写体とは異なる第2被写体が検出されると、前記第1被写体から切り替えて前記第2被写体を前記特定の被写体として設定する設定部と、を備え、前記第3領域は、前記第2画像において前記第2領域に含まれ、前記第1画像の前記第1領域と面積、形状及び位置が対応する。
また、本発明の画像処理装置は、特定の被写体を追尾対象とする画像処理装置であって、第1画像に含まれている被写体と前記第1画像よりも後に生成される第2画像に含まれている被写体とを検出する検出部と、前記検出部により前記第1画像の中心部分を含む第1領域において検出された、追尾対象になっている第1被写体が、前記検出部により、前記第2画像の中心部分を含み、前記第1領域よりも面積の大きい第2領域において検出されず、かつ、前記第2画像の中心部分を含み、前記第2領域よりも面積の小さい第3領域において第2被写体が検出されると、前記第1被写体から切り替えて前記第2被写体を前記特定の被写体として設定する設定部と、を備え、前記第3領域は、前記第2画像において前記第2領域に含まれ、前記第1画像の前記第1領域と面積、形状及び位置が対応する。
また、本発明の撮像装置は、上述した画像処理装置を備える。
The image processing apparatus of the present invention is an image processing apparatus that targets a specific subject as a tracking target, and is included in a subject included in the first image and a second image generated after the first image. A detection unit that detects a subject that is present, and the detection unit detects a first subject that is a tracking target in a first region that includes a central portion of the first image, and a central portion of the second image The first subject is not detected in the second region having a larger area than the first region , and includes the central portion of the second image, and the third region having a smaller area than the second region. When a different second object is detected as 1 subject, and a setting unit that sets the second object as the specific object is switched from the first object, the third region, the second image In the second region Included, the first region and the area of the first image, the shape and position corresponding.
The image processing apparatus according to the present invention is an image processing apparatus for tracking a specific subject, and is included in a subject included in the first image and a second image generated after the first image. A detection unit that detects a subject that is being tracked, and a first subject that is detected in a first region including a central portion of the first image by the detection unit, A third region including a central portion of the second image and not detected in a second region having a larger area than the first region, and including a central portion of the second image and having a smaller area than the second region; When the second object is detected in, and a setting unit that sets the second object as the specific object is switched from the first object, the third region, said in the second image a second Included in the region, said Wherein the first region and the area of one image, shape and position correspond.
The imaging apparatus of the present invention includes the above-described image processing apparatus.
本発明によれば、追尾対象とする被写体の切り替えを、容易且つ的確に行うことができる。 According to the present invention, it is possible to easily and accurately switch the subject to be tracked.
以下、撮像装置の一形態について、図1を用いて説明する。この撮像装置10は、装置本体11、レンズ鏡筒12から構成される。ここで、レンズ鏡筒12は、装置本体11に一体であってもよいし、着脱できるものであってもよい。
Hereinafter, an embodiment of the imaging device will be described with reference to FIG. The
装置本体11は、撮像部21、画像処理回路22、表示部23、バッファメモリ部24、記憶部25、CPU26、操作部27及び通信部28を備えている。撮像部21、画像処理回路22、表示部23、バッファメモリ部24、記憶部25、CPU26、操作部27及び通信部28は、バスを介して電気的に接続される。なお、本発明の画像処理装置は、CPU26及び画像処理回路22からなる。
The apparatus main body 11 includes an
撮像部21は、撮像素子29、A/D(Analog/Digital)変換部30を有している。撮像部21は、設定された撮像条件(例えば露出値、シャッタ速度等)に従って、CPU26により、その動作が制御される。
The
撮像素子29は、光電変換面を備え、レンズ鏡筒12により光電変換面に結像された光学像を電気信号に変換して、A/D変換部30に出力する。撮像素子29は、例えば、CMOS(Complementary Metal Oxide Semiconductor)などの光電変換素子で構成される。ここで、撮像素子29は、光電変換面の全領域において光学像を電気信号に変換してもよいし、光電変換面の一部領域において光学像を電気信号に変換するようにしてもよい。この撮像素子29から出力される電気信号が画像データとなる。
The imaging device 29 includes a photoelectric conversion surface, converts an optical image formed on the photoelectric conversion surface by the lens barrel 12 into an electric signal, and outputs the electric signal to the A /
A/D変換部30は、撮像素子29から出力される画像データをデジタル化して、デジタル化した画像データをバッファメモリ部24等に出力する。
The A /
画像処理回路22は、記憶部25に記憶されている画像処理条件に基づいて、バッファメモリ部24に一時的に記憶されている画像データに対する画像処理を行う。ここで、画像処理としては、ホワイトバランス調整、補間処理、色調補正処理、階調変換処理などが挙げられる。画像処理回路22にて画像処理が施された画像データは、バッファメモリ部24に一次記憶される他、通信部28を介して記憶媒体31に記憶される。
The
また、画像処理回路22は、撮影指示が行われていない状態で撮像部21にて連続して得られる画像データを用いて、主要被写体領域を設定する処理を実行する。ここで、撮影指示が行われていない状態で撮像部21にて連続して得られる画像データを、スルー画像データと称する。なお、主要被写体領域を設定する処理については、後述する。
In addition, the
表示部23は、例えば液晶ディスプレイが挙げられる。この表示部23は制御部を有し、この制御部により表示部23における画像の表示制御が行われる。ここで、表示部23に表示される画像としては、撮像部21により得られた画像データに基づく画像や、各種設定を行う際に表示する画像が挙げられる。バッファメモリ部24は、撮像部21によって生成された画像データや画像処理回路22によって画像処理が施された画像データを一時的に記憶する。記憶部25は、撮像条件や、各種判定の際にCPU26によって参照される判定条件などを記憶する。
An example of the
CPU26は、画像処理回路22や記憶部25などから取得した情報や、操作部27の操作状態などに基づいて、装置本体11の各部を統括的に制御する。CPU26による制御には、焦点調整(AF)の設定、露出調整(AE)の設定、ホワイトバランス調整(AWB)の設定、閃光の発光量の変更の設定、被写体追尾の設定、各種撮影モードの設定、各種画像処理の設定、各種表示の設定、ズーム倍率に連動した明るさの最適化の設定などが含まれる。
The
操作部27は、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーから構成される。なお、表示部23がタッチパネルを備えた表示部23となる場合、タッチパネルも操作部27として機能する。この操作部27は、ユーザの操作入力を受け付け、操作入力に応じた信号をCPU26に出力する。
The operation unit 27 includes a power switch, a shutter button, a multi selector (cross key), or other operation keys. When the
通信部28は、不揮発性メモリからなるメモリカード等、装置本体11に対して着脱することができる記憶媒体31と電気的に接続される。通信部28は、装置本体11に装着された記憶媒体31にデータ(画像データ、領域の情報など)を書き込む、記憶媒体31に記憶されたデータを消去する。また、通信部28は、必要に応じて、記憶媒体31に記憶されたデータの読み出しを行う。
The
レンズ鏡筒12は、撮像光学系35、レンズ駆動部36、エンコーダ37、鏡筒制御部38を有している。撮像光学系35はフォーカスレンズやズームレンズなどの複数のレンズを有している。この撮像光学系35の各レンズは、レンズ駆動部36により、その位置が光軸方向に移動するように制御される。撮像光学系35は、装置本体11に設けられた撮像素子29の受光面(光電変換面)に取り込まれた光学像を導く。
The lens barrel 12 includes an imaging
レンズ駆動部36は、例えば駆動モータや、ギヤ機構又はヘリコイド機構などの駆動機構を有し、撮像光学系35の各レンズを光軸方向に移動させる。エンコーダ37は、撮像光学系35のズームレンズやフォーカスレンズが光軸方向に移動したときに、その移動に伴う位置や移動方向を検出し、鏡筒制御部38に出力する。
The
鏡筒制御部38は、装置本体11のCPU26から入力される駆動制御信号に応じて、レンズ駆動部36を制御する。ここで、駆動制御信号とは、撮像光学系35の各レンズを光軸方向に移動させる制御信号である。鏡筒制御部38は、駆動制御信号に応じて、レンズ駆動部36に出力するパルス電圧のステップ数を制御する。また、鏡筒制御部38は、撮像光学系の各レンズの移動量に応じた信号に基づいて、フォーカスレンズの位置(フォーカスポジション)を、装置本体11のCPU26に出力する。
The lens
次に、画像処理回路22の構成について説明する。上述したように、画像処理回路22は、画像処理条件に基づいて画像データに対する画像処理を実行する他に、スルー画像データを用いて、主要被写体領域を設定する処理を実行する。図2に示すように、画像処理回路22は、検出部41、判定部42、追尾部43、評価部44及び設定部45の機能を有している。
Next, the configuration of the
検出部41は、撮像部21にて取得されるスルー画像データを用いて、該スルー画像データに基づいた画像に含まれる被写体の領域を検出する。以下、スルー画像データに基づく画像をスルー画像と称する。ここで、被写体の領域を検出する処理としては、画像から得られる特徴量に基づいて被写体の領域を検出するための一手法であるマスク抽出処理が挙げられる。このマスク抽出処理を行うことで、検出部41は、スルー画像に含まれる被写体の領域を検出する。検出部41は、検出された被写体の領域をマスクとした上で、該マスクに係る情報(以下、マスク情報)を記憶部25に記憶する。ここで、マスク情報としては、マスク抽出処理の抽出条件(色区分やマスク区分など)、マスクの位置、マスクの大きさや形状、マスクの動き(移動方向、移動ベクトル)、マスクに該当する被写体までの距離の情報が含まれる。
The
判定部42は、複数のスルー画像のそれぞれから得られるマスク情報を用いて、同一のマスクがn回(nフレーム)以上連続して検出されるか否かを判定する。この判定を行うことで、同一のマスクが安定しているか否かが判定される。
The
例えば、図示を省略した撮像光学系35における光学ズーム倍率が一定の場合には、対象となるマスクと同色で、且つ同一サイズとなるマスクが、連続するnフレーム以上のスルー画像データのそれぞれで検出されているか否かを判定する。この場合、被写体自体が動いていても、静止していてもよい。 For example, when the optical zoom magnification in the imaging optical system 35 (not shown) is constant, a mask having the same color and the same size as the target mask is detected in each of the through image data of n or more consecutive frames. It is determined whether or not it has been done. In this case, the subject itself may be moving or may be stationary.
また、撮像光学系35における光学ズーム倍率を変更する場合や、撮像光学系35における光学ズーム倍率が一定で被写体又は撮影者が撮像光学系35の光軸方向に変化する場合もある。このような場合、連続して得られるスルー画像においては検出される被写体の領域の大きさが変化する。よって、対象となるマスクと同色となり、且つ光学ズーム倍率に合わせた拡大率又は縮小率でサイズが変化しているマスクが、連続するnフレーム以上のスルー画像のそれぞれで検出されているか否かを判定すればよい。
In some cases, the optical zoom magnification in the imaging
なお、判定部42においては、同一のマスクがn回(nフレーム)以上連続して検出されるか否かを判定するようにしているが、少なくとも2回(2フレーム)以上連続して検出される場合に、マスクが安定していると判定することができる。なお、マスクが安定しているか否かの判定として用いるスルー画像については、撮像部21から出力される全てのスルー画像を対象としてもよいし、撮像部21から出力されるスルー画像のうち、例えば3フレームおき等、所定フレーム間隔を空けて得られるスルー画像を対象のスルー画像として、対象となるスルー画像を用いて上記判定を行うことも可能である。
In the
追尾部43は、主要被写体領域が設定された以降に得られるスルー画像に対して、例えば主要被写体領域として設定されたマスクを用いたテンプレートマッチングの手法を用い、取得されるスルー画像に含まれる主要被写体領域の位置を特定する。この処理をスルー画像のそれぞれに対して行うことで、主要被写体を追尾することが可能となる。
The
評価部44は、判定部42において、n回(nフレーム)以上連続して検出されるマスク(主要被写体領域として設定されるマスクも含む)に対する評価を実行する。ここで、評価部44は、記憶部25に記憶されたマスク情報を用いて、マスクに対する評価を行う。
The
設定部45は、評価部44における評価結果に基づいて主要被写体領域を設定する。ここで、主要被写体領域を設定する処理としては、主要被写体領域が設定されていないときに、新規に主要被写体領域を設定する場合の他に、主要被写体領域が設定されているときに、主要被写体領域となる被写体の領域を切り替える(再設定する)処理が含まれる。設定部45は、主要被写体領域を設定したときに、該設定した情報を記憶部25に書き込む。なお、この情報は、マスク情報に対応付けて記憶してもよいし、個別に記憶してもよい。
The setting
次に、評価部44における評価について説明する。以下、評価部44の評価において使用するマスク情報として、各マスクの位置情報を用いる場合について説明する。
Next, evaluation in the
評価部44は、n回(nフレーム)以上連続して検出されるマスクに対して評価値を求める。この評価値は、対象となるマスクの位置がスルー画像の中心から近いほど、評価値が高く、スルー画像の周縁部に近いほど、評価値が低くなる。対象となるマスクの評価値を求めた後、評価部44は、対象となるマスクの評価値に対する評価を行う。この評価の結果を用いて、設定部45は、主要被写体領域を設定する。
The
上述した評価は、各マスクに対して求められる評価値と、スルー画像TIに対して設定される領域A及び領域Bのそれぞれに対する値(後述する閾値Ta及びTb)とを比較することで実行される。 The above-described evaluation is executed by comparing the evaluation value obtained for each mask with the values (thresholds Ta and Tb described later) for the areas A and B set for the through image TI. The
図3に示すように、領域Aは、その横方向の長さW1及び縦方向の長さH1がスルー画像TIの横方向の長さW0及び縦方向の長さH0のα(α=0.5〜0.6)倍に設定される。この領域Aは、対象となるマスクに該当する被写体が主要被写体であれば、画角の中央の領域に位置するという概念に基づき設定される領域である。よって、上述した閾値Taは、領域Aにマスクが含まれると評価できる該マスクの評価値の最小値となる。 As shown in FIG. 3, the region A has a horizontal length W 1 and a vertical length H 1 that are α (the horizontal length W 0 and the vertical length H 0 of the through image TI. α = 0.5 to 0.6) times. This area A is an area set based on the concept that if the subject corresponding to the target mask is the main subject, it is located in the center area of the angle of view. Therefore, the above-described threshold value Ta is the minimum value of the evaluation value of the mask that can be evaluated when the region A includes the mask.
また、領域Bは、その横方向の長さW2及び縦方向の長さH2がスルー画像の横方向の長さW0及び縦方向の長さH0のβ(β=0.8〜0.9)倍に設定される。ここで、領域Bは必ずしも設定する必要はないが、撮像光学系35におけるレンズ収差等、撮像光学系35のレンズ性能を考慮して設定される。この領域Bは、主要被写体が画角から外れたか否かを評価する際に用いる領域となる。つまり、閾値Tbは、領域Bにマスクが含まれると評価できる該マスクの評価値の最小値となる。
The area B, the horizontal length W 2 and vertical length H 2 of lateral through-image length W 0 and vertical length H 0 β (β = 0.8~ 0.9) times. Here, the region B is not necessarily set, but is set in consideration of lens performance of the imaging
なお、閾値Taや閾値Tbの値は、マスクの形状や大きさ等によって変動するものであってもよいし、固定であってもよい。また、上述したα及びβの値は、上記に限定されるものではなく、適宜設定してよい。 Note that the values of the threshold value Ta and the threshold value Tb may vary depending on the shape and size of the mask, or may be fixed. Further, the values of α and β described above are not limited to the above, and may be set as appropriate.
本実施形態では、評価部44の評価において使用するマスク情報として、各マスクの位置情報を用いる場合について説明するが、マスクの動き情報や、マスクに該当する被写体までの距離情報のいずれかを用いてもよい。例えばマスクの動き情報や距離情報を用いる場合には、上述した領域Aに含まれる被写体のうち、評価の高いマスクを主要被写体として設定すればよい。さらに、マスク情報として記憶されるマスクの位置情報、マスクの動き情報又はマスクに該当する被写体までの距離情報の少なくとも2つの情報、或いはこれら全ての情報を用いて評価値を算出することも可能である。
In the present embodiment, a case where position information of each mask is used as mask information used in the evaluation by the
次に、撮影時の処理の流れについて、図4及び図5のフローチャートを用いて説明する。なお、このフローチャートは、撮像装置が撮影を行うことが可能な動作モードとなる場合に実行される。 Next, the flow of processing during shooting will be described with reference to the flowcharts of FIGS. This flowchart is executed when the imaging apparatus is in an operation mode in which shooting can be performed.
ステップS101は、スルー画像データを取得する処理である。CPU26は、撮像部21を制御して、スルー画像データの取得を開始する。取得されたスルー画像データの画像情報はバッファメモリ部24に一時的に記憶される。このスルー画像データは、所定の時間間隔で連続して取得される。
Step S101 is processing for obtaining through image data. The
ステップS102は、画像処理である。CPU26は、画像処理回路22に対して画像処理を行う指示を行う。この指示を受けて、画像処理回路22は、バッファメモリ部24に記憶されたスルー画像データを読み出す。そして、画像処理回路22は、読み出したスルー画像データに対して、ホワイトバランス調整、補間処理、色調補正処理、階調変換処理などの画像処理を実行する。これら画像処理が実行された後、画像処理回路22は、スルー画像データをバッファメモリ部24に一時記憶する。
Step S102 is image processing. The
ステップS103は、スルー画像を表示する処理である。このステップS103の処理において、CPU26は、バッファメモリ部24に一時記憶されたスルー画像データを読み出し、表示部23に出力する。これを受けて、表示部23は読み出したスルー画像データに基づく画像を表示する。これにより、スルー画像が表示される。
Step S103 is processing to display a through image. In the process of step S <b> 103, the
ステップS104は、マスク抽出処理である。CPU26は、画像処理回路22に対して、主要被写体領域を設定する指示を行う。この指示を受けて、画像処理回路22は、バッファメモリ部24からスルー画像データを読み出す。そして、画像処理回路22は、読み出したスルー画像データを用いてマスク抽出処理を行う。マスク抽出処理が実行されることで被写体の領域が検出され、検出された被写体の領域がマスクとして抽出される。
Step S104 is a mask extraction process. The
ステップS105は、マスクが抽出できたか否かを判定する処理である。ステップS104の処理により、被写体の領域が検出され、該被写体の領域がマスクとして抽出されている場合には、CPU26は、ステップS105の判定結果をYesとする。この場合、ステップS106に進む。一方、ステップS104の処理において被写体の領域が検出できないときにはマスクは抽出されないので、CPU26は、ステップS105の判定結果をNoとする。この場合、ステップS112に進む。
Step S105 is processing to determine whether or not a mask has been extracted. If the subject area is detected by the processing in step S104 and the subject area is extracted as a mask, the
ステップS106は、マスク情報を記録する処理である。CPU26は、ステップS104により抽出したマスクに係る情報をマスク情報として記憶部25等に記録する。
Step S106 is processing to record mask information. The
ステップS107は、n回以上連続して抽出されたマスクがあるか否かを判定する処理である。このステップS107における判定は、ステップS104のマスク抽出処理により抽出されたマスクが安定しているか否かを判定するためのものである。よって、n回以上連続して同一のマスクを抽出した場合、CPU26は抽出されたマスクが安定していると判定する。つまり、主要被写体領域を正しく検出していると判断することができる。この場合、CPU26は、ステップS107の判定結果をYesとし、ステップS108に進む。一方、n回以上連続して同一のマスクを抽出していない場合は、CPU26は、ステップS104のマスク抽出処理により抽出されたマスクが安定していないと判定する。この場合、CPU26は、ステップS107の判定結果をNoとし、ステップS112に進む。CPU26は、ステップS107の判定結果を記憶部25に記録する。
Step S107 is processing for determining whether or not there is a mask extracted n times or more continuously. The determination in step S107 is for determining whether or not the mask extracted by the mask extraction process in step S104 is stable. Therefore, if the same mask is extracted n times or more consecutively, the
ステップS108は、抽出したマスクを評価する処理である。画像処理回路22は、n回(nフレーム)以上連続して抽出されたマスクを主要被写体領域の候補となるマスクとする。そして、画像処理回路22は、主要被写体領域の候補となるマスクに対応したマスク情報を記憶部25から読み出す。そして、画像処理回路22は、読み出したマスク情報に基づき、対象となるマスクに対する評価値を求める。画像処理回路22は、求めた評価値と、閾値Taと比較することで、対象となるマスクを評価する。
Step S108 is processing for evaluating the extracted mask. The
ステップS109は、主要被写体領域を設定する処理である。画像処理回路22は、ステップS108における評価結果を用いて、主要被写体領域を設定する。
Step S109 is processing for setting a main subject area. The
ステップS110は、主要被写体領域に係る情報を記憶する処理である。画像処理回路22は、主要被写体領域の情報を記憶部25等に記録する。主要被写体領域の情報には、用いられたマスクに関するマスク情報、主要被写体領域の位置、主要被写体領域の大きさや形状などの情報が含まれる。
Step S110 is processing for storing information relating to the main subject area. The
ステップS111は、主要被写体領域情報を表示する処理である。CPU26は、主要被写体領域の情報を表示部23に出力する。表示部23は、出力された主要被写体領域の情報に基づいた表示をスルー画像に重畳して表示する。主要被写体領域の情報に基づいた表示としては、例えば主要被写体領域であることを示す枠が挙げられる。なお、この枠は、主要被写体領域の形状に応じた枠であってもよいし、矩形や円形など所定の形状の枠であってもよい。このような表示を行うことにより、ユーザは、自動で検出される主要被写体領域の位置や形状がどのようなものであるかを、容易に把握することができる。
Step S111 is processing for displaying main subject area information. The
ステップS112は、撮影指示があるか否かを判定する処理である。操作部27を用いた入力操作が行われた場合、CPU26には、操作部27における入力操作に基づく信号が入力される。CPU26は、この入力される信号が撮影指示を示す信号であるか否かを判定する。入力される信号が撮影指示を示す信号であれば、CPU26は、ステップS112の判定結果をYesとする。この場合、ステップS113に進む。一方、入力される信号が撮影指示を示す信号でない場合には、CPU26は、ステップS112の判定結果をNoとする。この場合、ステップS120に進む。
Step S112 is processing to determine whether or not there is a shooting instruction. When an input operation using the operation unit 27 is performed, a signal based on the input operation in the operation unit 27 is input to the
ステップS113は、撮像処理である。例えばステップS109で主要被写体領域を設定した場合、CPU26は、設定した主要被写体領域の情報に基づいて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行うとともに、画像処理回路22における各種画像処理の条件等を決定する。また、ステップS113で主要被写体領域を設定していない場合、CPU26は、例えば中央の領域など特定の領域を用いて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行うとともに、画像処理回路22における各種画像処理の条件等を決定する。そして、CPU26は、上述した処理の結果に基づいて、撮像処理を実行する。
Step S113 is an imaging process. For example, when the main subject area is set in step S109, the
ステップS114は、画像を記録する処理である。CPU26は、ステップS113による撮像処理により取得された画像データを、通信部28を介して記憶媒体31に記録して一連の処理を終了する。
Step S114 is processing to record an image. CPU26 records the image data acquired by the imaging process by step S113 to the
上述したステップS112の判定処理において、撮影指示がないと判定された場合には、ステップS120に進む。 If it is determined in the determination process of step S112 described above that there is no shooting instruction, the process proceeds to step S120.
ステップS120は、スルー画像データを取得する処理である。このステップS120の処理は、ステップS101と同一の処理である。 Step S120 is processing for acquiring through image data. The process of step S120 is the same process as step S101.
ステップS121は、画像処理である。このステップS121の処理は、ステップS102と同一の処理である。 Step S121 is image processing. The process of step S121 is the same process as step S102.
ステップS122はスルー画像を表示する処理である。このステップS122の処理は、ステップS103と同一の処理である。 Step S122 is processing to display a through image. The process of step S122 is the same process as step S103.
ステップS123は、主要被写体領域の設定があるか否かを判定する処理である。CPU26は、記憶部25を参照する。そして、主要被写体領域の情報が記憶部25に記憶されていれば、CPU26はステップS123の判定結果をYesとする。この場合、ステップS124及びステップS125の処理と、ステップS126からステップS128の処理とが同時並行にて実行される。
Step S123 is processing for determining whether or not a main subject area is set. The
一方、主要被写体領域の情報が記憶部25に記憶されていない場合、CPU26はステップS123の判定結果をNoとする。この場合、ステップS104に戻る。つまり、この場合には、主要被写体領域を設定するためのマスク抽出処理が再度実行される。
On the other hand, if the information on the main subject area is not stored in the
ステップS124は、追尾処理である。CPU26は、画像処理回路22に対して追尾処理を指示する。これを受けて、画像処理回路22は、バッファメモリ部24からスルー画像データを読み出す。また、画像処理回路22は、記憶部25から主要被写体領域の情報を読み出す。そして、画像処理回路22は、読み出した画像データ及び情報を用いて、例えばテンプレートマッチングなどの手法により、主要被写体領域を特定する。
Step S124 is a tracking process. The
ステップS125は、主要被写体領域の情報を更新する処理である。画像処理回路22は、ステップS124により特定した主要被写体領域に係る情報を、新たな主要被写体領域の情報として記憶部25に記憶する。ここで、ステップS124により新たに得られた主要被写体領域の情報は、先に記憶された主要被写体領域の情報と置き換えて記憶するものであってもよいし、ステップS124により新たに得られた主要被写体領域の情報を先に記憶された主要被写体領域の情報に書き加えるものであってもよい。
Step S125 is processing to update information on the main subject area. The
上述したように、ステップS124及びステップS125の処理と同時並行にて、ステップS126からステップS128の処理が実行される。 As described above, the processing from step S126 to step S128 is executed concurrently with the processing of step S124 and step S125.
ステップS126は、マスク抽出処理である。なお、このステップS126の処理は、ステップS104の処理と同一の処理である。 Step S126 is a mask extraction process. Note that the process of step S126 is the same as the process of step S104.
ステップS127は、新たなマスクが抽出されたか否かを判定する処理である。CPU26は、記憶部25に記憶されたマスク情報を読み出し、ステップS126におけるマスク抽出処理により得られたマスクのうち、新たに抽出したマスクがあるか否かを判定する。新たに抽出されたマスクがあるときには、CPU26は、ステップS128の判定結果をYesとする。この場合、ステップS128に進む。一方、新たに抽出されたマスクがないときには、CPU26は、ステップS128の判定結果をNoとする。この場合、ステップS129に進む。
Step S127 is processing for determining whether or not a new mask has been extracted. The
ステップS128は、新たなマスク情報を記録する処理である。CPU26は、ステップS126にて取得された新たなマスクに係る情報を記憶部25に記録する。
Step S128 is a process for recording new mask information. The
ステップS129は、主要被写体領域に設定されたマスクの他に、n回以上連続して抽出されたマスクがあるか否かを判定する処理である。n回以上連続して同一のマスクを抽出した場合、CPU26はステップS129の判定結果をYesとする。この場合、ステップS130に進む。一方、n回以上連続して同一のマスクを抽出していない場合は、CPU26はステップS129の判定結果をNoとする。この場合、ステップS131に進む。
Step S129 is processing for determining whether or not there is a mask extracted continuously n times or more in addition to the mask set in the main subject area. When the same mask is extracted n times or more continuously, the
ステップS130は、主要被写体領域として設定されたマスクを含む、対象となるマスクを評価する処理である。画像処理回路22は、記憶部25から対象となるマスク情報を読み出す。そして、画像処理回路22は、読み出したマスク情報を用いて、対象となるマスクのそれぞれに対する評価を行う。なお、ステップS130における評価においては、主要被写体領域として設定される被写体の領域に対応するマスクに対しては閾値Tbを用いた評価を行う。また、その他の被写体の領域に対応するマスクに対しては閾値Taを用いた評価を行う。
Step S130 is processing for evaluating a target mask including the mask set as the main subject region. The
上述したステップS129の判定処理でNoとなる場合、ステップS131に進む。 If the determination result in step S129 is No, the process proceeds to step S131.
ステップS131は、主要被写体領域として設定されたマスクに対する評価を行う処理である。画像処理回路22は、記憶部25に記憶された主要被写体領域の情報を読み出す。そして、画像処理回路22は、読み出した主要被写体領域の情報を用いて、主要被写体領域となるマスクの評価を行う。この場合、画像処理回路22は、閾値Tbを用いて評価を行う。
Step S131 is processing for evaluating the mask set as the main subject region. The
ステップS132は、主要被写体領域の再設定を行うか否かを判定する処理である。画像処理回路22は、ステップS130又はステップS131のいずれかにおいて実行されたマスクの評価結果を用いて、主要被写体領域を再設定するか否かを判定する。例えば、ステップS130において、主要被写体領域に設定されたマスク及び他のマスクに対する評価を行っている場合、主要被写体領域に設定されたマスクの評価結果と、他のマスクの評価結果とから、主要被写体領域として設定されたマスクの再設定を行うか否かを判定する。なお、この場合のマスクの再設定とは、マスクを切り替えることを指す。主要被写体領域として設定されたマスクの再設定を行う場合、画像処理回路22は、ステップS132の判定結果をYesとする。この場合、ステップS133に進む。一方、主要被写体領域として設定されたマスクの再設定を行う必要がない場合には、画像処理回路22は、ステップS132の判定結果をNoとする。この場合、ステップS135に進む。
Step S132 is processing for determining whether or not to reset the main subject area. The
一方、ステップS131において、主要被写体領域に設定されたマスクに対する評価を行っている場合、主要被写体領域に設定されたマスクの評価から、主要被写体領域として設定されたマスクの再設定を行うか否かを判定する。この場合の再設定は、主要被写体領域となるマスクの設定を解除することを指す。この場合も、主要被写体領域として設定されたマスクの再設定を行う場合、画像処理回路22は、ステップS132の判定結果をYesとする。この場合、ステップS133に進む。一方、主要被写体領域として設定されたマスクの再設定を行う必要がない場合には、画像処理回路22は、ステップS132の判定結果をNoとする。この場合、ステップS135に進む。
On the other hand, if the mask set in the main subject area is evaluated in step S131, whether or not the mask set as the main subject area is reset based on the evaluation of the mask set in the main subject area. Determine. The resetting in this case refers to canceling the setting of the mask that becomes the main subject area. Also in this case, when resetting the mask set as the main subject region, the
ステップS133は、主要被写体領域を再設定する処理である。画像処理回路22は、主要被写体領域を再設定する。例えばステップS130において、主要被写体領域に設定されたマスク及び他のマスクに対して評価を行っている場合、画像処理回路22は、主要被写体領域となるマスク設定を解除し、他のマスクに対して主要被写体領域を設定する。また、ステップS131において、主要被写体領域に設定されたマスクの評価を行っている場合、画像処理回路22は、主要被写体領域となるマスク設定を解除する。
Step S133 is processing for resetting the main subject area. The
ステップS134は、主要被写体情報を更新する処理である。画像処理回路22は、ステップS133により実行された主要被写体領域を再設定した結果に基づいて、記憶部25に記録された主要被写体領域情報を更新する。
Step S134 is processing to update main subject information. The
ステップS135は、主要被写体に設定されたマスクがあるか否かを判定する処理である。CPU26は、記憶部25を参照する。記憶部25に主要被写体領域情報があれば、CPU26は、ステップS135の判定結果をYesとする。この場合、ステップS136に進む。一方、記憶部25に主要被写体領域情報がない場合、CPU26は、ステップS135の判定結果をNoとする。この場合、ステップS112に戻る。なお、記憶部25に主要被写体領域情報がない場合としては、例えばステップS133における主要被写体領域の再設定において、主要被写体領域に対する設定が解除された場合が挙げられる。
Step S135 is processing for determining whether or not there is a mask set for the main subject. The
ステップS136は、主要被写体情報を表示する処理である。このステップS111の処理と同一の処理である。このステップS136の処理が実行されると、ステップS112に戻る。 Step S136 is processing for displaying main subject information. This is the same process as that in step S111. When the process of step S136 is executed, the process returns to step S112.
このようにして、主要被写体領域が設定されていない場合には、取得されたスルー画像データから求めた特徴量に基づいて検出された被写体の領域をマスクとして抽出する。この処理を複数のスルー画像データに対して行い、複数のスルー画像データから抽出されたマスクを比較する。この比較により、検出されたマスクが安定しているかが判定される。そして、マスクが安定していると判定された場合、そのマスクに対する評価を行い、評価が良いマスクに該当する被写体の領域を主要被写体領域として設定する。 In this way, when the main subject region is not set, the subject region detected based on the feature amount obtained from the acquired through image data is extracted as a mask. This process is performed on a plurality of through image data, and masks extracted from the plurality of through image data are compared. This comparison determines whether the detected mask is stable. When it is determined that the mask is stable, the mask is evaluated, and the subject area corresponding to the mask with good evaluation is set as the main subject area.
一般に被写体を撮影する場合、被写体が画角の中央部分に位置するように撮像装置10を構える。よって、図6(a)に示すように、撮像装置10により得られるスルー画像TIからは、中央部分(例えば領域A)に位置する被写体の領域がマスク51として抽出される。ここで、静止する被写体を撮影する場合、撮像装置10の位置や向きが変化しない、又は撮像装置10の撮像光学系35における撮影倍率(光学ズーム倍率)を変更しない限りは、画角が固定される。よって、画角に対する被写体の位置は同一の位置となる。つまり、連続して得られる複数のスルー画像TIからは、常に同一のマスク51が検出され、したがって、マスク51は安定していると判定される。また、マスク51は領域Aの内部に位置しているので、マスク51に対する評価値Tは一定の値で、且つ閾値Taを超過する(図6(b)参照)。よって、このような場合には、マスク51に該当する被写体の領域が主要被写体領域として設定される。
In general, when photographing a subject, the
一方、構図によっては、静止する被写体を画角の中央部分ではなく、画角の周縁部に位置して撮影する場合もある。図7(a)に示すように、撮像装置10により得られるスルー画像TIからは、中央部分からずれた位置にある被写体の領域がマスク52として抽出される。この場合、抽出されたマスク52は、複数のスルー画像TIのそれぞれから検出されることから、安定するマスクとして判定される。しかしながら、このマスク52は、領域Aから外れた位置にある。したがって、マスク52に対する評価値Tは一定の値となるが、閾値Ta以下となる(図7(b)参照)。よって、マスク52に該当する被写体の領域は、主要被写体領域として設定されることがない。
On the other hand, depending on the composition, a stationary subject may be photographed not at the center of the angle of view but at the periphery of the angle of view. As shown in FIG. 7A, from the through image TI obtained by the
一方、移動する被写体が撮像装置10における画角内に入り込む場合や、撮像装置10における画角内から外れる場合もある。
On the other hand, there are cases where the moving subject enters within the angle of view of the
まず、移動する被写体が画角内に入り込む場合について考慮する。図8(a)に示すように、移動する被写体を撮影する場合、複数のスルー画像TIから検出される被写体の領域、言い換えれば抽出されるマスク53は、図中X1方向に移動し、画角の中央部分に到達する。ここで、複数のスルー画像TIから得られるマスク53は、同一のマスクであるとして抽出されるので、マスク53は安定していると判定される。
First, consider a case where a moving subject enters an angle of view. As shown in FIG. 8A, when shooting a moving subject, the region of the subject detected from the plurality of through images TI, in other words, the extracted
ここで、図8(b)に示すように、マスク53に対する評価値は、徐々に高くなる。そして、マスク53がスルー画像TIの中央部分に到達する、言い換えれば領域Aに入り込むいと、その評価値Tは閾値Taを超過する。よって、マスク53がスルー画像TIの中央部分(領域A)に入り込む以降に、このマスク53に該当する被写体の領域が主要被写体領域として設定される。
Here, as shown in FIG. 8B, the evaluation value for the
次に、画角の中央部分に位置する被写体が移動する場合もある。この場合、図9(a)に示すように、被写体が画角の中央部分に位置している場合には、複数のスルー画像TIから、該被写体が検出され、被写体の領域がそれぞれマスク54として検出される。ここで、マスクはスルー画像TIの領域Aに位置しているので、このマスク54に対する評価値Tは、それぞれ一定の値となり、閾値Taを超過する。よって、マスク54に対応する被写体の領域が主要被写体領域として設定される。
Next, the subject located at the center of the angle of view may move. In this case, as shown in FIG. 9A, when the subject is located at the center of the angle of view, the subject is detected from a plurality of through images TI, and the subject areas are respectively used as masks 54. Detected. Here, since the mask is located in the region A of the through image TI, the evaluation value T for the
その後、被写体が移動すると、複数のスルー画像TIから抽出されるマスク54の位置は、それぞれX2方向に変化する。上述したように、マスクに対する評価値は、スルー画像TIの周辺部に近づくほど、その値が低くなる。よって、図9(b)に示すように、X2方向に移動するマスク54に対する評価値Tは、徐々に低くなる。よって、この評価値Tは、画角から外れたことを示す閾値Tb以下となる。この評価値Tが、閾値Tb以下となる場合に、マスク54に該当する被写体の領域に対する主要被写体領域の設定が解除される。
Thereafter, when the subject moves, the position of the
例えば主要被写体領域が設定された後、撮影操作が実行されない場合には、引き続きスルー画像TIが取得される。この場合も、スルー画像TIから抽出されたマスクに対して、安定しているか否かの判定、及びマスクに対する評価が行われる。この過程で、新たにスルー画像TIから抽出されたマスクがあれば、新たに抽出されたマスクのそれぞれに対して、安定しているか否かの判定、及びマスクに対する評価を行う。なお、主要被写体領域として設定される被写体の領域に基づくマスクに対しては、追尾処理が実行された後、追尾処理により検出されたマスクに対する評価が実行される。したがって、これら評価に基づき、必要に応じて、主要被写体領域の再設定が実行される。 For example, when the photographing operation is not executed after the main subject area is set, the through image TI is continuously acquired. Also in this case, it is determined whether the mask extracted from the through image TI is stable and the mask is evaluated. In this process, if there is a mask newly extracted from the through image TI, it is determined whether or not each newly extracted mask is stable and the mask is evaluated. For a mask based on the subject area set as the main subject area, the tracking process is executed, and then the mask detected by the tracking process is evaluated. Therefore, based on these evaluations, resetting of the main subject area is executed as necessary.
例えば、画角の中心部分に位置している被写体が移動し、同時に、他の被写体が画角の中心部分に向けて移動する場合について説明する。この場合、図10(a)に示すように、主要被写体領域に設定された被写体の領域に基づくマスク55は、図中X3方向に移動する。これに併せて、他の被写体の領域に基づくマスク56が、図中X3方向に移動する。よって、図10(b)に示すように、主要被写体領域に設定されるマスク55は、スルー画像TIから徐々に消えていき、他の被写体の領域に基づいたマスク56が徐々にスルー画像TIの中央部分に近づく。そして、図10(c)に示すように、他の被写体の領域に基づくマスク56のみが、スルー画像TIの内部に含まれることになる。
For example, a case will be described in which a subject located at the center portion of the angle of view moves while another subject moves toward the center portion of the angle of view. In this case, as shown in FIG. 10A, the
図11は、マスク55に対する評価値T1と、マスク56に対する評価値T2とのそれぞれの評価値の変化を示すグラフである。なお、マスク55に対する評価値T1を「○」で示し、マスク56に対する評価値T2を図中「△」で示している。
FIG. 11 is a graph showing changes in evaluation values of the evaluation value T1 for the
図11中「t1」にて示す各マスクの評価値T1,T2が、図10(a)に示すスルー画像TIにおけるマスクの評価値である。つまり、図10(a)に示すスルー画像TIにおいては、マスク55に対する評価値T1のみが求められる。ここで、マスク55は、スルー画像TIにおける領域A内に位置することから、マスク55に対する評価値T1は閾値Taを超過している。よって、マスク55に該当する被写体の領域が主要被写体領域として設定される。
Evaluation values T1 and T2 of the respective masks indicated by “t1” in FIG. 11 are the evaluation values of the masks in the through image TI illustrated in FIG. That is, in the through image TI shown in FIG. 10A, only the evaluation value T1 for the
図11中「t2」にて示す各マスクの評価値T1,T2が、図10(b)に示すスルー画像TIにおけるマスクの評価値である。つまり、図10(b)に示すスルー画像TIにおいては、マスク55の他に、マスク56も抽出されている。よって、これらマスクに対する評価値がそれぞれ求められる。この場合、マスク55に対する評価値T1は、閾値Tb以下となり、また、マスク56に対する評価値T2は、閾値Taを超過している。この場合、主要被写体領域として、マスク55に該当する被写体の領域の設定を解除する。同時に、マスク56に該当する被写体の領域を主要被写体領域として設定する。よって、主要被写体領域として設定される被写体の領域が切り替えられる。
Evaluation values T1 and T2 of the respective masks indicated by “t2” in FIG. 11 are mask evaluation values in the through image TI shown in FIG. That is, in the through image TI shown in FIG. 10B, in addition to the
図11中「t3」にて示すマスクの評価値T1,T2が、図10(c)に示すスルー画像TIにおけるマスクの評価値である。図10(c)に示すスルー画像TIにおいては、マスク56に対する評価値T2のみが求められる。ここで、マスク56は、スルー画像TIにおける領域A内に位置することから、マスク56に対する評価値T2は閾値Taを超過している。よって、以降に得られるスルー画像TIにおいて、マスク56の評価値T2が閾値Tbを越えていれば、マスク56に該当する被写体の領域が、引き続き、主要被写体領域となる。このように、スルー画像TIから検出される被写体が異なる被写体に入れ替わる場合であっても、主要被写体領域を容易に且つ的確に再設定することが可能となる。
Mask evaluation values T1 and T2 indicated by “t3” in FIG. 11 are mask evaluation values in the through image TI shown in FIG. In the through image TI shown in FIG. 10C, only the evaluation value T2 for the
ここで、図10(d)に示すように、スルー画像TI(画角)から検出されなくなった被写体の領域(図10においてはマスク55)が、所定時間経過後に得られるスルー画像TIにより再度検出される場合がある。このような場合には、主要被写体領域として設定される被写体の領域を、評価値に関係なく変更する(切り替える)ようにしてもよいし、そのときに主要被写体領域として設定される被写体の領域と、再度検出された被写体の領域との両方の領域を主要被写体領域としてもよい。これら場合、主要被写体領域として設定された被写体の領域に基づくマスク情報を消去せずに、記憶部25に保持しておけばよい。
Here, as shown in FIG. 10 (d), the region of the subject that is not detected from the through image TI (view angle) (the
また、スルー画像TIから抽出される被写体の領域が複数検出される場合もある。このような場合には、評価値が閾値Taを超過するマスクのうち、最も評価値の高いマスクに該当する被写体の領域が主要被写体領域として設定される。図12(a)に示すように、スルー画像TIからマスク58,59,60が抽出される場合について説明する。このとき、図12(b)に示すように、マスク58に該当する被写体は画角から外れる方向(図中X4方向に)に移動し、マスク59に該当する被写体は図中X5方向に移動し、画角の中央部分で停止すると仮定する。また、マスク60に該当する被写体は、静止していると仮定する。
In some cases, a plurality of subject areas extracted from the through image TI are detected. In such a case, the area of the subject corresponding to the mask having the highest evaluation value among the masks whose evaluation value exceeds the threshold value Ta is set as the main subject area. A case where masks 58, 59, and 60 are extracted from the through image TI as shown in FIG. At this time, as shown in FIG. 12B, the subject corresponding to the
図13は、各マスク58,59,60に対する評価値の変化を示すグラフである。ここで、図13中「○」はマスク58に対する評価値T3、「△」はマスク59に対する評価値T4、「◇」はマスク60に対する評価値T5をそれぞれ示す。
FIG. 13 is a graph showing changes in evaluation values for the
図13に示すように、マスク58に対する評価値T3は、時間経過とともに低下し、画角から外れることで評価値が算出されなくなる。また、マスク59に対する評価値T4は、画角の中央部分に移動することで、その評価値T4が高くなる。一方、マスク60は、静止している被写体に該当することから、その評価値T5は一定の値となる。
As shown in FIG. 13, the evaluation value T3 for the
この場合、閾値Taを超過する評価値となるマスク58及びマスク59において、マスク58に対する評価値T3がマスク59に対する評価値T4よりも高いことから、この場合、マスク58に該当する被写体の領域が主要被写体領域として設定される。
In this case, in the
上述したように、マスク58は、該当する被写体が画角から外れる方向に移動しているので、マスク58に対する評価値T3は低くなる。一方、マスク59は、該当する被写体が画角の中央に向けて移動することから、マスク59に対する評価値T4は高くなる。マスク58に対する評価値T3が閾値Tb以下となるときには、マスク59に対する評価値T5は閾値Taを超過しているので、主要被写体領域に設定される被写体の領域が切り替わる。つまり、主要被写体領域に設定される被写体の領域が、マスク58に該当する被写体の領域から、マスク59に該当する被写体の領域に切り替わる。
As described above, the
このように、複数の被写体が画角内で移動する場合であっても、主要被写体領域の再設定を容易に、かつ的確に行うことが可能となる。 Thus, even when a plurality of subjects move within the angle of view, the main subject region can be reset easily and accurately.
本実施形態においては、撮像光学系35における光学ズーム倍率を一定にした場合について説明しているが、これに限定される必要はなく、撮像光学系35における光学ズーム倍率を変更した場合であっても、本発明を適用することができる。つまり、光学ズーム倍率を変更した場合、画角が変化する。例えば、光学ズーム倍率を高くした場合には、画角に含まれる実際の撮影範囲が狭くなる。よって、意図する主要被写体領域に設定した被写体の領域が画角から外れる場合がある。この場合、ユーザが意図していなくとも、画角に含まれる他の被写体の領域が主要被写体領域として自動的に設定される。
In this embodiment, the case where the optical zoom magnification in the imaging
一方、光学ズーム倍率を低くした場合には、画角に含まれる実際の撮影範囲が広くなることから、ユーザが意図する被写体だけでなく、他の被写体も画角に含まれる。この場合意図する被写体の領域を主要被写体領域として設定していても、他の被写体の領域に対する評価が高くなるときがある。このようなときには、主要被写体領域は、ユーザの意図する被写体の領域から、他の被写体の領域に再設定される。このように、スルー画像TIにおける主要被写体領域切り替えを、容易に、且つ的確に行うことができる。なお、主要被写体領域の再設定により、ユーザが意図していない被写体の領域が主要被写体領域となる場合には、撮像装置における画角や向きなどを調整すればよい。 On the other hand, when the optical zoom magnification is lowered, the actual shooting range included in the angle of view is widened, so that not only the subject intended by the user but also other subjects are included in the angle of view. In this case, even if the intended subject area is set as the main subject area, the evaluation of other subject areas may be high. In such a case, the main subject area is reset from the subject area intended by the user to another subject area. In this way, the main subject area switching in the through image TI can be easily and accurately performed. Note that, when the main subject area is changed to a main subject area by resetting the main subject area, the angle of view, orientation, and the like of the imaging apparatus may be adjusted.
本実施形態では、安定していると判定されたマスクに対する評価を行うことで、主要被写体領域を設定している。しかしながら、これに限定される必要はない。例えば表示部として、タッチパネルを備えた表示部を備えた撮像装置の場合には、操作部としてタッチパネルが機能する。この場合、取得されるスルー画像TIから被写体の検出を行い、その結果をスルー画像TIに重畳させて表示する。この表示は、例えば検出された被写体の領域に対して枠などを用いて表示すればよい。そして、表示されるスルー画像TIにユーザが意図する被写体がある場合に、該被写体の領域に対応する箇所へのタッチ操作をタッチパネルに対して実行する。このタッチパネルへのタッチ操作が行われたときに、その操作された位置にある被写体の領域を主要被写体領域として設定すればよい。 In the present embodiment, the main subject region is set by performing an evaluation on a mask determined to be stable. However, it is not necessary to be limited to this. For example, in the case of an imaging apparatus including a display unit including a touch panel as the display unit, the touch panel functions as the operation unit. In this case, the subject is detected from the acquired through image TI, and the result is superimposed on the through image TI and displayed. This display may be performed using a frame or the like for the detected subject area, for example. Then, when there is a subject intended by the user in the displayed through image TI, a touch operation on a portion corresponding to the region of the subject is performed on the touch panel. When the touch operation on the touch panel is performed, the area of the subject at the operated position may be set as the main subject area.
また、タッチパネルを備えていない表示部の場合には、重畳表示される枠のうち、選択候補の被写体の領域に対する枠を他の枠とは異なる表示にて表示する。そして、十字キーなどの操作により、選択候補となる被写体の領域に対する枠の表示を他の被写体の領域に切り替えながら表示する。そして、意図する被写体の領域に、選択候補の被写体の領域に対する枠を移動させたときに、選択を意図する操作を行うことで、主要被写体領域を設定することも可能である。 Further, in the case of a display unit that does not include a touch panel, the frame for the subject region of the selection candidate is displayed with a display different from the other frames among the superimposed frames. Then, the display of the frame for the subject area to be selected is switched to another subject area by an operation of the cross key or the like. It is also possible to set the main subject region by performing an operation intended to be selected when the frame for the subject region of the selection candidate is moved to the intended subject region.
本実施形態では、撮像装置を例に取り上げているが、これに限定される必要はなく、例えばカメラ機能を備えた携帯電話機やスマートフォンなどの携帯型情報端末機や、カメラとコンピュータとからなるカメラシステムであっても、本発明を適用することが可能である。また、この他に、取得された画像データを入力することで、図4及び図5のフローチャートの処理を実行する画像処理装置であってもよい。この場合、ステップS101及びステップS120の処理は省略すればよい。 In this embodiment, the imaging apparatus is taken as an example, but the present invention is not limited to this. For example, a portable information terminal such as a mobile phone or a smartphone having a camera function, or a camera including a camera and a computer. The present invention can be applied even to a system. In addition, an image processing apparatus that executes the processes of the flowcharts of FIGS. 4 and 5 by inputting the acquired image data may be used. In this case, the processing of step S101 and step S120 may be omitted.
また、この他に、図4及び図5におけるフローチャートの処理をコンピュータに実行させることが可能な画像処理プログラムであってもよい。この場合、画像処理プログラムは、メモリカード、光学ディスク、磁気ディスクなど、コンピュータにより読み取ることが可能な記憶媒体に記憶されていることが好ましい。 In addition, an image processing program capable of causing a computer to execute the processes of the flowcharts in FIGS. 4 and 5 may be used. In this case, the image processing program is preferably stored in a computer-readable storage medium such as a memory card, an optical disk, or a magnetic disk.
10…撮像装置、21…撮像部、22…画像処理回路、23…表示部、26…CPU、41…検出部、42…判定部、43…追尾部、44…評価部、45…設定部
DESCRIPTION OF
Claims (10)
第1画像に含まれている被写体と前記第1画像よりも後に生成される第2画像に含まれている被写体とを検出する検出部と、
前記検出部により、前記第1画像の中心部分を含む第1領域において追尾対象になっている第1被写体が検出され、かつ、前記第2画像の中心部分を含み、前記第1領域よりも面積の大きい第2領域において前記第1被写体が検出されず、前記第2画像の中心部分を含み、前記第2領域よりも面積の小さい第3領域において前記第1被写体とは異なる第2被写体が検出されると、前記第1被写体から切り替えて前記第2被写体を前記特定の被写体として設定する設定部と、を備え、
前記第3領域は、前記第2画像において前記第2領域に含まれ、前記第1画像の前記第1領域と面積、形状及び位置が対応する画像処理装置。 An image processing apparatus for tracking a specific subject,
A detection unit for detecting a subject included in the first image and a subject included in the second image generated after the first image;
The detection unit detects a first subject that is a tracking target in a first region that includes a central portion of the first image, and includes a central portion of the second image and has an area larger than that of the first region. The first subject is not detected in the second region having a large size, and a second subject different from the first subject is detected in the third region including the central portion of the second image and having a smaller area than the second region. Once, and a setting unit that sets the second object as the specific object is switched from the first object,
The third area is included in the second area in the second image, and the area, shape, and position of the first area correspond to the first area of the first image .
第1画像に含まれている被写体と前記第1画像よりも後に生成される第2画像に含まれている被写体とを検出する検出部と、
前記検出部により前記第1画像の中心部分を含む第1領域において検出された、追尾対象になっている第1被写体が、前記検出部により、前記第2画像の中心部分を含み、前記第1領域よりも面積の大きい第2領域において検出されず、かつ、前記第2画像の中心部分を含み、前記第2領域よりも面積の小さい第3領域において第2被写体が検出されると、前記第1被写体から切り替えて前記第2被写体を前記特定の被写体として設定する設定部と、を備え、
前記第3領域は、前記第2画像において前記第2領域に含まれ、前記第1画像の前記第1領域と面積、形状及び位置が対応する画像処理装置。 An image processing apparatus for tracking a specific subject,
A detection unit for detecting a subject included in the first image and a subject included in the second image generated after the first image;
The first subject to be tracked , detected in the first region including the central part of the first image by the detection unit , includes the central part of the second image by the detection unit , and the first not detected in a large second region area than the area, and comprises a central portion of the second image, the second object is detected in the small third region area than the second region, the second the second object is switched from 1 object and a setting unit configured to set as the specific subject,
The third area is included in the second area in the second image, and the area, shape, and position of the first area correspond to the first area of the first image .
前記検出部は、前記撮像素子から出力された第1画像データにより生成される前記第1画像に含まれる被写体と、前記第1画像データよりも後に前記撮像素子から出力された第2画像データにより生成される前記第2画像に含まれる被写体と、を検出する請求項4に記載の撮像装置。 The detection unit includes a subject included in the first image generated by the first image data output from the image sensor, and a second image data output from the image sensor after the first image data. The imaging apparatus according to claim 4, wherein a subject included in the generated second image is detected.
前記設定部により前記特定の被写体として設定された前記第2被写体の情報に基づいて前記フォーカスレンズを駆動させる制御部を備える請求項5に記載の撮像装置。 The imaging element has a photoelectric conversion element that converts light from an optical system including a focus lens into electric charge,
The imaging apparatus according to claim 5, further comprising a control unit that drives the focus lens based on information about the second subject set as the specific subject by the setting unit .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017088041A JP6489150B2 (en) | 2017-04-27 | 2017-04-27 | Image processing apparatus and imaging apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017088041A JP6489150B2 (en) | 2017-04-27 | 2017-04-27 | Image processing apparatus and imaging apparatus |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013113858A Division JP6136583B2 (en) | 2013-05-30 | 2013-05-30 | Image processing apparatus, imaging apparatus, and image processing program |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019035938A Division JP2019134438A (en) | 2019-02-28 | 2019-02-28 | Image processing apparatus, imaging apparatus, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017192131A JP2017192131A (en) | 2017-10-19 |
JP6489150B2 true JP6489150B2 (en) | 2019-03-27 |
Family
ID=60085101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017088041A Active JP6489150B2 (en) | 2017-04-27 | 2017-04-27 | Image processing apparatus and imaging apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6489150B2 (en) |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5309490B2 (en) * | 2007-07-26 | 2013-10-09 | カシオ計算機株式会社 | Imaging device, subject tracking zooming method, and subject tracking zooming program |
JP4544282B2 (en) * | 2007-09-14 | 2010-09-15 | ソニー株式会社 | Data processing apparatus, data processing method, and program |
JP5207918B2 (en) * | 2008-10-27 | 2013-06-12 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, and image processing method |
JP5127686B2 (en) * | 2008-12-11 | 2013-01-23 | キヤノン株式会社 | Image processing apparatus, image processing method, and imaging apparatus |
JP5144487B2 (en) * | 2008-12-15 | 2013-02-13 | キヤノン株式会社 | Main face selection device, control method thereof, imaging device, and program |
JP2011124614A (en) * | 2009-12-08 | 2011-06-23 | Panasonic Corp | Subject tracking device and subject tracking method |
JP5864938B2 (en) * | 2011-07-25 | 2016-02-17 | キヤノン株式会社 | Imaging apparatus and control method thereof |
JP6136583B2 (en) * | 2013-05-30 | 2017-05-31 | 株式会社ニコン | Image processing apparatus, imaging apparatus, and image processing program |
-
2017
- 2017-04-27 JP JP2017088041A patent/JP6489150B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017192131A (en) | 2017-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5380784B2 (en) | Autofocus device, imaging device, and autofocus method | |
US9906708B2 (en) | Imaging apparatus, imaging method, and non-transitory storage medium storing imaging program for controlling an auto-focus scan drive | |
US10148889B2 (en) | Image processing apparatus and control method thereof, image capturing apparatus and storage medium | |
US10477101B2 (en) | Focus detection apparatus, control method and storage medium | |
EP3125037B1 (en) | Lens control device, lens control method, and recording medium | |
US9781330B2 (en) | Focus detection apparatus and control method for focus detection apparatus | |
JP6136583B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
US11178337B2 (en) | Image capturing apparatus, method of controlling the same, and non-transitory computer readable storage medium for calculating a depth width for an object area based on depth information | |
JP2014078826A (en) | Imaging apparatus, control method therefor, control program, and recording medium | |
JP2019134438A (en) | Image processing apparatus, imaging apparatus, and image processing program | |
WO2013094551A1 (en) | Imaging device, method for controlling same, and program | |
WO2013094552A1 (en) | Imaging device, method for controlling same, and program | |
US20180309932A1 (en) | Image stabilization apparatus, image stabilization method, image capturing apparatus, image capturing system and non-transitory storage medium | |
JP6431429B2 (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
US9264603B2 (en) | Imaging apparatus and imaging method | |
JP6489150B2 (en) | Image processing apparatus and imaging apparatus | |
JP5062095B2 (en) | Imaging device | |
JP2015111226A (en) | Subject tracking device and control method of the same, imaging device, program, and storage medium | |
JP5871196B2 (en) | Focus adjustment device and imaging device | |
JP6858065B2 (en) | Imaging device and its control method | |
US11050923B2 (en) | Imaging apparatus and control method | |
US10681274B2 (en) | Imaging apparatus and control method thereof | |
WO2016157569A1 (en) | Imaging device and focus evaluation device | |
JP5938268B2 (en) | Imaging apparatus and control method thereof | |
JP5040669B2 (en) | Imaging device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A132 Effective date: 20180227 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180412 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180925 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20181122 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190116 |
|
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: 20190129 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190211 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6489150 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 |