JP6672389B2 - Imaging device and control method thereof - Google Patents
Imaging device and control method thereof Download PDFInfo
- Publication number
- JP6672389B2 JP6672389B2 JP2018125534A JP2018125534A JP6672389B2 JP 6672389 B2 JP6672389 B2 JP 6672389B2 JP 2018125534 A JP2018125534 A JP 2018125534A JP 2018125534 A JP2018125534 A JP 2018125534A JP 6672389 B2 JP6672389 B2 JP 6672389B2
- Authority
- JP
- Japan
- Prior art keywords
- subject
- focus detection
- determined
- cpu
- focus
- 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
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Description
本発明は、焦点調節の対象となる被写体の決定に関する。 The present invention relates to determining a subject to be focused.
従来、焦点検出領域の焦点状態に基づいてオートフォーカス(AFとも称する)を行う撮像装置が知られている。 2. Description of the Related Art Conventionally, an imaging apparatus that performs autofocus (also referred to as AF) based on a focus state of a focus detection area is known.
特許文献1では、複数の焦点検出領域から焦点調節に用いる1つの焦点検出領域を撮像装置が自動的に選択する技術が開示されている。 Patent Literature 1 discloses a technique in which an imaging device automatically selects one focus detection area used for focus adjustment from a plurality of focus detection areas.
特許文献1によれば、撮影者が手動で焦点検出領域を選択する必要がないため、撮影時の操作手順を簡略化できるという利点がある。しかしながら、特許文献1では、動体への撮影を対象として、常時AFし続ける場合に、次の課題がある。ピントを合わせ続けるべき主被写体として追尾している被写体がユーザの意図する主被写体と異なっている場合にも、誤検出した主被写体でピントを合わせ続けてしまう。また、主被写体が正しい場合においても、主被写体が動的に変化して追尾している被写体がユーザの意図する主被写体ではなくなってしまった場合に、ユーザの意図する主被写体にピントを合わせ続けることができない場合があった。 According to Patent Literature 1, there is an advantage that an operation procedure at the time of photographing can be simplified because the photographer does not need to manually select a focus detection area. However, in Patent Literature 1, there is the following problem in a case where AF is continuously performed for photographing a moving object. Even when the subject being tracked as the main subject to be kept in focus is different from the main subject intended by the user, the focus is continued on the erroneously detected main subject. Also, even when the main subject is correct, if the main subject dynamically changes and the tracked subject is no longer the main subject intended by the user, the focus is continued on the main subject intended by the user. There were times when I could not do that.
本発明は上記課題を鑑みてなされたものであり、ユーザが意図する主被写体に対してより精度良くピントを合わせることができる撮像装置及びその制御方法を提供することを目的とする。 The present invention has been made in view of the above problems, and has as its object to provide an imaging apparatus and a control method thereof that can more accurately focus on a main subject intended by a user.
上記目的を達成するために、本発明は、撮像素子から出力された信号に基づいて焦点検出を行う焦点検出手段と、フォーカスレンズの駆動を制御する制御手段と、前記制御手段が前記焦点検出の結果に基づいて検出された被写体に合焦させるよう前記フォーカスレンズの駆動を制御してから、フォーカスレンズを追従させるべき第1の被写体を決定する第1の決定手段であって、前記被写体に対応する位置との焦点検出結果の差分が閾値以上である場合には、顕著度に基づいて前記第1の被写体を決定し、前記被写体に対応する位置との焦点検出結果の差分が閾値未満である場合には、前記顕著度によらず、前記被写体を前記第1の被写体として決定する第1の決定手段を有するよう構成したことを特徴とする。 In order to achieve the above object, the present invention provides a focus detection unit that performs focus detection based on a signal output from an image sensor, a control unit that controls driving of a focus lens, and the control unit controls the focus detection. after controlling the driving of the focus lens so focuses the detected object based on the results, a first determining means for determining a first object to be follow the focus lens, corresponding to the subject when the difference of the focus detection result of the position that is equal to or greater than a threshold, and determining the first object based on the saliency, the difference of the focus detection result of the position corresponding to the object is less than the threshold value case, the irrespective of the prominence, characterized by being configured to have a first determination means for determining the object as the first object.
本発明によれば、ユーザが意図する主被写体に対してより精度良くピントを合わせることができる。 According to the present invention, it is possible to more accurately focus on a main subject intended by a user.
以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[実施例1]
(撮像システム)
図2は、本発明による撮像装置を含むカメラの実施例1を示す断面図である。
[Example 1]
(Imaging system)
FIG. 2 is a sectional view showing Embodiment 1 of a camera including an imaging device according to the present invention.
図1は、実施例1のカメラの撮像装置に関する部分の機能ブロック図である。 FIG. 1 is a functional block diagram of a portion related to an imaging device of the camera according to the first embodiment.
一般にカメラには、ある時刻における被写体の像面に対してレンズを駆動するモード(ワンショット撮影モード)と、将来の被写体の像面を予測しながらレンズを駆動するモード(サーボ撮影モード)の2種類がある。実施例1ではカメラがサーボ撮影モードに設定されたときの動きを示す。 Generally, a camera has two modes: a mode in which a lens is driven with respect to an image plane of a subject at a certain time (one-shot shooting mode), and a mode in which a lens is driven while predicting the image plane of a subject in the future (servo shooting mode). There are types. The first embodiment shows the movement when the camera is set to the servo shooting mode.
本実施例のカメラは、撮像素子103を有するカメラ本体100と、撮影光学系を有する撮像レンズ120とを組み合わせて使用するレンズ交換式のデジタルスチルカメラである。
The camera of this embodiment is a digital still camera of an interchangeable lens type that uses a combination of a
カメラ本体100は、撮像素子103、表示器105、CPU110、撮像制御回路102、メモリ回路101、インターフェース回路106、画像処理手段107、電気接点104を備えている。
The
撮像素子103は、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサ、CCD(Charge Coupled Device)イメージセンサ等により形成されており、カメラ本体100の撮影レンズ120の予定結像面に配置されている。撮像素子103の詳細については後述する。
The
表示器105は、LCD(Liquid Crystal Display)パネル等により形成され、撮影画像の表示や撮影情報等の情報表示を行う。また表示器105は、ライブビューモード時には、撮影予定の領域をリアルタイム動画表示する。ここで、ライブビューモードとは、撮影レンズ120からの被写体像を撮像素子103による撮像して、プレビュー用の低画素動画像を表示器105にリアルタイムで表示するモードである。このライブビューモード時には、後述する撮像面における位相差AFを実行することができる。さらに、連写撮影中には各連写時の低画素静止画像を表示器105に表示する。
The
CPU110は、カメラ全体を統括的に制御するとともに、各種演算や判定を行う。CPU110は、被写体検出部111、位相差検出手段112、第1の被写体決定処理部113、第2の被写体決定処理部114、乗り移り判定処理部115、焦点調節部116を備えている。また、撮影レンズ120の焦点状態の検出(焦点検出とも称する)と当該検出の結果に基づいてフォーカスレンズ126の駆動指示を行う。なお、焦点検出を複数の領域に対して行った場合には、その選択処理も行う。
The
被写体検出部111は、撮像素子103から得た画像信号に基づいて被写体を検出する処理を行う。被写体を検出する処理には、顔を検出する顔検出処理も含まれる。また、被写体を検出する方法の1つとして、後述の顕著度を算出する。また、撮像素子103から得た画像信号の特徴に基づき被写体を検出し追跡位置を算出する。被写体検出部111のよりは、公知のテンプレートマッチング処理やヒストグラムマッチング処理によって行っても良い。
The subject detection unit 111 performs a process of detecting a subject based on an image signal obtained from the
位相差検出手段112は、撮像素子103から得た一対の像信号の位相差を検出する。
The phase difference detector 112 detects a phase difference between a pair of image signals obtained from the
第1の被写体決定処理部113はどの被写***置に焦点位置を移動させるかを決定する。言い換えると、主被写体(第1の被写体とも称する)とすべき被写体を決定する。
The first subject
第2の被写体決定処理部114は第1の被写体となり得る第2の被写体の候補を決定する。
The second subject
乗り移り判定処理部115はその時点で決定されている第1の被写体よりも、第2の被写体に焦点位置を合わせるべきかどうか、すなわち、第2の被写体が主被写体であるかどうかを判定する。
The transfer
焦点調節部116は、第1の被写***置における位相差検出手段112で検出した位相差信号から換算したデフォーカス量に基づいて焦点位置を移動させるようにレンズCPU122に指示を行う。
The focus adjustment unit 116 instructs the
撮像素子制御回路102は、CPU110の指示に従い、撮像素子103を駆動制御する。メモリ回路101は、撮像素子103により撮像された画像信号を記憶する。また、メモリ回路101は、撮像素子103の受光分布を記憶する。
The image
インターフェース回路106は、画像処理手段107により画像処理された画像信号をカメラ外部に出力する。
The
画像処理手段107は、撮像素子103による撮像した画像信号を画像処理する。
The
電気接点104は、撮影レンズ120の電気接点124と接触して電力及び各種信号の通信に用いられる。
The
撮影レンズ120は、カメラ本体100に対して着脱可能な交換レンズである。
The taking
撮影レンズ120は撮影光学系、レンズCPU122、フォーカスレンズ駆動機構121、絞り駆動機構123、絞り125、電気接点124を備えている。撮影光学系は、フォーカスレンズ126を含んでいる。
The photographing
撮影光学系は、撮影する被写体の光学像を撮像素子103上に結像させる。撮影光学系は、複数のレンズ群からなり、撮像素子103の撮像面付近にある焦点位置をZ方向に沿って移動させるようにフォーカスレンズ駆動機構121により駆動される。なお、本実施例では焦点位置を被写体に合わせる動作を、ピントを合わせる、とも称する。
The photographing optical system forms an optical image of a subject to be photographed on the
レンズCPU122は、カメラ本体100のCPU110から送られてくる焦点調節情報を、電気接点124を介して受信し、その焦点調節情報に基づいてフォーカスレンズ駆動機構121を駆動する。
The
絞り駆動機構123は、絞り125を駆動する機構及びそのアクチュエータを有し、レンズCPU110の指示に従い絞り125を駆動する。
The
(撮像素子の構造)
続いて図3を参照して、本実施例における撮像素子103の画素構造について説明する。図3は、撮像素子103の画素構造を示す図である。図3(A)は撮像素子103の画素配列の説明図、図3(B)は画素210GのZ−X平面による断面図を示している。
(Structure of imaging device)
Subsequently, a pixel structure of the
図3(A)は、撮像素子103(2次元CMOSセンサ)の画素配列を、4行×4列の画素範囲で示している。画素210の配列は、ベイヤー配列が採用されている。対角方向の2画素として、G(緑)の分光感度を有する画素210Gが配置されている。また、他の2画素として、R(赤)の分光感度を有する画素210R、および、B(青)の分光感度を有する画素210Bがそれぞれ配置されている。画素210R、210G、210Bは、それぞれ、瞳分割用の2つの副画素201a、201bを有する。また、副画素201aは、撮像光学系の第1瞳強領域を通過した光束を受光する第1画素である。また、副画素201bは、撮像光学系の第2瞳領域を通過した光束を受光する第2画素である。各画素は、撮像用画素および焦点検出用画素として機能する。
FIG. 3A shows a pixel array of the image sensor 103 (two-dimensional CMOS sensor) in a pixel range of 4 rows × 4 columns. The Bayer array is adopted as the array of the pixels 210. As two pixels in the diagonal direction, a pixel 210G having a spectral sensitivity of G (green) is arranged. Further, as the other two pixels, a
図3(A)中のX、Y、Zで示される座標軸に関し、X−Y平面は図3(A)の紙面内に位置し、Z軸は紙面に対して垂直な軸である。副画素201a、201bは、X軸に平行な方向に沿って配置されている。 Regarding the coordinate axes indicated by X, Y, and Z in FIG. 3A, the XY plane is located in the plane of FIG. 3A, and the Z axis is an axis perpendicular to the plane of the paper. The sub-pixels 201a and 201b are arranged along a direction parallel to the X axis.
図3(B)中のX、Y、Zで示される座標軸に関し、X−Z平面は図3(B)の紙面内に位置し、Y軸は紙面に対して垂直な軸である。検出部はp型層200およびn型層から構成されるフォトダイオードを有する。マイクロレンズ202は、受光面からZ軸方向に所定の距離だけ離れた位置に配置されている。マイクロレンズ202は、カラーフィルタ203上に形成されている。
Regarding coordinate axes indicated by X, Y, and Z in FIG. 3B, the XZ plane is located in the plane of FIG. 3B, and the Y axis is an axis perpendicular to the plane of the paper. The detector has a photodiode composed of a p-
本実施例において、撮像素子103の全ての画素210R、210G、210Bに、瞳分割用の副画素201a、201bが設けられている。副画素201a、201は、焦点検出用画素として用いられる。ただし、本実施例はこれに限定されるものではなく、瞳分割可能な焦点検出用画素が全画素のうちの一部の画素にのみ設けられている構成であってもよい。
In this embodiment, all the
(撮像素子による瞳分割機能の概念)
続いて図4を参照して、撮像素子103の瞳分割機能について説明する。図4は、撮像素子103の瞳分割機能の説明図であり、1つの画素部における瞳分割の様子を示している。
(Concept of pupil division function by image sensor)
Subsequently, the pupil division function of the
図4中の下方に示される画素部の座標軸(X、Y、Z)に関し、X−Z平面は図4の紙面内に位置し、Y軸は紙面に対して垂直な軸である。画素は、p型層300およびn型層301a、301bを備えている。p型層300およびn型層301aは図3中の副画素201aを構成し、また、p型層300およびn型層301bは副画素201bを構成する。マイクロレンズ304は、Z軸上に配置されている。
Regarding the coordinate axes (X, Y, Z) of the pixel unit shown in the lower part of FIG. 4, the XZ plane is located in the plane of the paper of FIG. 4, and the Y axis is an axis perpendicular to the plane of the paper. The pixel includes a p-
また、図4の上方には、射出瞳302、および、枠303(例えば、絞り枠やレンズ枠)がそれぞれ示されている。図4の上方に示される座標軸(X、Y、Z)に関し、X−Y平面は図4の紙面内に位置し、Z軸は紙面に対して垂直な軸である。
In addition, an
1つの画素には、p型層300に埋め込まれたn型層301a、301bが設けられていることにより、2つの副画素が形成されている。2つの副画素は、x方向に沿って規則的に配置されている。また、2つの副画素は、+X方向および−X方向にそれぞれ偏芯しているため、1つのマイクロレンズ304を用いて瞳分割を行うことが可能である。図4において、射出瞳302として、像信号Aの瞳302a、および、像信号Bの瞳302bが示されている。像信号Aは、−X方向に偏芯したn型層301aに対応する副画素で取得される第1の像信号である。また、像信号Bは、+X方向に偏芯したn型層301bに対応する副画素で取得される第2の像信号である。
Since one pixel is provided with n-
このように本実施例において、像信号A(第1の信号)は、図3(A)に示されるように複数の副画素301aをX方向に規則的に配列し、複数の副画素301aから得られた信号である。すなわち像信号Aは、結像光学系の異なる射出瞳領域を通過し、絞り値に応じて基線長が異なる対の光束から得られた像信号の一方である。また、像信号B(第2の信号)は、図3(A)に示されるように複数の副画素301bをX方向に規則的に配列し、複数の副画素301bから得られた信号である。すなわち像信号Bは、結像光学系の異なる射出瞳領域を通過し、絞り値に応じて基線長が異なる対の光束から得た像信号の他方である。
As described above, in this embodiment, the image signal A (first signal) is obtained by arranging a plurality of
CPU110は、位相差検出手段111によって像信号Aと像信号Bの相対的な像ずれ量を算出し、デフォーカス量換算手段112によってデフォーカス量を算出する。なお本実施例では、X方向の輝度分布を有する被写体に対応した構成について説明した。ただし、本実施例は、同様の構成をY方向にも展開することにより、Y方向に輝度分布を有する被写体にも対応した構成を採用することも可能である。
The
(自動選択サーボAFの全体フロー)
続いて自動選択サーボAFの全体フローについて図5のフローチャートを用いて説明する。なお、本実施例の自動選択サーボAFは、主に動体の撮影のために、複数の焦点検出領域から焦点調節に用いる1つの焦点検出領域を撮像装置が自動的に選択して当該焦点検出領域を用いた焦点調節を行う処理を繰り返すモードである。
(Overall flow of automatic selection servo AF)
Next, the entire flow of the automatic selection servo AF will be described with reference to the flowchart of FIG. In the automatic selection servo AF according to the present embodiment, the imaging apparatus automatically selects one focus detection area to be used for focus adjustment from a plurality of focus detection areas, mainly for photographing a moving object, and Is a mode in which the process of performing focus adjustment using is repeated.
本実施例の自動選択サーボAFの概要は次の通りである。まず、第1の被写体決定処理(後述)によって、ある被写体を主被写体として決定する。また、別途行われる第2の被写体決定処理(後述)において、当該主被写体とは異なる被写体を、主被写体の候補である被写体(第2の被写体とも称する)として決定する。そして、乗り移り判定処理(後述)において、その時点で決定されている第1の被写体よりも、第2の被写体に焦点位置を合わせるべきかどうか、すなわち、第2の被写体が主被写体であるかどうかを判断する。この判断結果に応じた被写体を主被写体としてピントを合わせ続ける処理を行う。 The outline of the automatic selection servo AF of this embodiment is as follows. First, a certain subject is determined as a main subject by a first subject determination process (described later). In a second subject determination process (described later) that is separately performed, a subject different from the main subject is determined as a subject that is a candidate for the main subject (also referred to as a second subject). Then, in the transfer determination process (described later), whether the focus position should be adjusted to the second object rather than the first object determined at that time, that is, whether the second object is the main object Judge. A process is performed in which the subject according to this determination result is kept in focus with the main subject as the main subject.
まず、S101において、CPU110は、撮像素子103から画像信号を取得する。
First, in S101, the
次にS102において、CPU110は、S101で取得した画像信号をもとに、CPU110が全画面の各枠の焦点検出を行う。
Next, in S102, based on the image signal acquired in S101, the
S103において、CPU110は、S102で行った各枠の焦点検出の中から至近の位置を選択し、CPU110が至近被写***置にAF枠を設定する。ただし既に至近被写***置にAF枠を設定済みの場合は、前回と同じAF枠に固定しても良いし、前回と至近被写***置が明らかに変わっている場合は別の至近被写***置にAF枠を設定し直してもよい。
In S103, the
S104では、CPU110が算出したAF枠位置の焦点検出結果が合焦範囲内かどうかを判定する。合焦範囲内であればS108に進み、合焦範囲外であればS105に進む。
In S104, it is determined whether the focus detection result of the AF frame position calculated by the
S105では、CPU110が算出したAF枠位置の焦点検出結果を焦点調節部116でレンズ駆動量に換算し、レンズ120の焦点調節を行う。
In S105, the focus detection result of the AF frame position calculated by the
S108では、CPU110が第1の被写体決定処理を行い、どこの領域に対して追尾処理を開始させるかを決定する。この処理の詳細は後述の(第1の被写体決定処理1)で述べる。
In S108, the
S109では、CPU110は、S108で決定した第一の被写***置でAF枠を設定する。
In S109, the
S110では、CPU110は、撮像素子103から画像信号を取得する。
In S110, the
S111では、CPU110は、S110で取得した画像信号をもとに、追尾処理を行う。追尾を行う被写体は第1の被写体および第2の被写体候補である。
In S111, the
S112では、S110で撮像素子103から取得した画像信号をもとにCPU110が焦点検出処理を行う。
In S112, the
S113では、CPU110は、S111で検出した第2の被写体候補から第2の被写体決定処理を行う。この処理の詳細は後述の(第2の被写体決定処理)で述べる。
In S113, the
S114では、第2の被写体を第1の被写体として乗り移りかどうかの判定をCPU110が行う。この処理の詳細は後述の(乗り移り判定処理)で述べる。
In S114, the
S115では、CPU110は、S114で行った乗り移り判定の結果、乗り移ると判断した場合はS116に進み、乗り移らないと判定した場合はS118に進む。
In S115, as a result of the transfer determination performed in S114, the
S116では、CPU110は、第2の被写体を新たな第1の被写体として決定する。
In S116,
S117では、CPU110は、第2の被写体決定処理を行う。
In S117, the
S118では、CPU110が算出したAF枠位置の焦点検出結果を焦点調節部116でレンズ駆動量に換算し、レンズ120の焦点調節を制御する。
In S118, the focus detection result of the AF frame position calculated by the
なお、第2の被写体を新たな第1の被写体として決定した場合においては、AF枠位置を設定し直して、再度焦点検出結果を算出し直した結果を用いて、焦点調節部116でレンズ駆動量に換算し、レンズ120の焦点調節を行ってもよい。
When the second subject is determined as a new first subject, the AF frame position is reset and the focus detection result is calculated again. The focus may be adjusted for the
S119では、CPU110は、レリーズスイッチ(SW2)が押されているかどうかを判定し、レリーズスイッチ(SW2)が押されているならS120に進み、押されていないならS121へ進む。
In S119, the
S120で、メモリ回路101は、撮像素子103で取得した画像信号を記録する。
In S120, the
S121では、CPU110は、AFスイッチ(SW1)が押されているかどうかを判定し、押下中なら、S109へ進み、押下されていなければ自動選択サーボAFの全体フローを終了する。
In S121, the
前述したとおり、本実施例の自動選択サーボAFでは、まずある被写体を第1の被写体として決定する。また、第2の被写体決定処理によって、当該第1の被写体とは異なる被写体を、主被写体の候補として決定する。そして、第1の被写体よりも第2の被写体にピントを合わせるべきと判断した場合には、第2の被写体を主被写体である第1の被写体とする。これにより、決定された主被写体がユーザの意図した被写体と異なる場合や、被写体の動きに応じて主被写体として決定すべき被写体が変化した場合であっても、適切な被写体を主被写体として決定することができる。 As described above, in the automatic selection servo AF of the present embodiment, first, a certain subject is determined as the first subject. In the second subject determination process, a subject different from the first subject is determined as a main subject candidate. If it is determined that the second subject should be focused more than the first subject, the second subject is set as the first subject which is the main subject. Accordingly, even when the determined main subject is different from the subject intended by the user, or when the subject to be determined as the main subject changes according to the movement of the subject, an appropriate subject is determined as the main subject. be able to.
(第1の被写体決定処理1)
ここでは図5のフローチャートにおける第1の被写体決定処理1(S114)の詳細について図9のフローチャートを用いて説明する。前述のように、第1の被写体決定処理は主被写体である第1の被写体を決定する処理である。S901において、CPU110は、撮像素子103から取得した画像信号から被写体検出を行う。
(First subject determination processing 1)
Here, the details of the first subject determination processing 1 (S114) in the flowchart of FIG. 5 will be described with reference to the flowchart of FIG. As described above, the first subject determination process is a process of determining the first subject that is the main subject. In step S <b> 901, the
S902において、CPU110は、S901で被写体として顔が検出されたか否かを判断する。顔が検出された場合はS903に進み、顔が検出されなかった場合はS904に進む。
In S902, the
S903で、CPU110は、S901で顔があると判断した場合に、合焦位置のデフォーカス量と顔に対応する位置のデフォーカス量との差分を、第1の閾値と比較する。観客席の顔など一度合焦に合わせた位置から急に後ろの被写体に乗り移らせないようにするため、合焦位置のデフォーカス量と顔に対応する位置のデフォーカス量との差分が第1の閾値未満であればS909へ進み、第1の閾値以上であればS904へ進む。
In S903, if the
なお、この閾値は広くするほど顔被写体へ焦点を合わせやすくなるが、例えば背景の観客などユーザの意図しない顔被写体へ焦点を合わせてしまう可能性もある。そのため、この時の閾値は合焦位置から無限側も至近側も同一の閾値で設定しても良いし、無限側を狭く至近側を広く設定しても良い。 Note that the wider the threshold, the easier it is to focus on the face subject, but there is also a possibility of focusing on a face subject not intended by the user, such as a background audience. Therefore, the threshold at this time may be set to the same threshold on the infinity side and the closest side from the in-focus position, or may be set narrower on the infinity side and wider on the closest side.
S904は、CPU110は、撮像素子103から取得した画像信号から顕著度を算出し、当該顕著度に基づいて、顕著な特徴を有した被写体(顕著被写体とも称する)が存在するか否かの判定を行う。本実施例の顕著度は特徴の顕著さの程度であり、背景に対する区別がはっきりとして目立っているほど、顕著度が高いとする。顕著度が所定の第2の閾値以上である場合に、顕著被写体が存在すると判定する。
In step S904, the
本実施例では色相、彩度、輝度に基づいて顕著度を判定している。例えば緑色の葉に囲まれた中でのピンク色の花のシーンでは花の位置が主被写体であり、顕著度の判別によって花が主被写体と推測できる。また、海上の船や空を飛ぶ鳥なども同様の理由により顕著度の判別によって主被写体と推測できる。このように、顕著度は、主被写体を決定するにあたって有力な指標の一つとなり得るものであるので、本実施例では、顕著被写体を、第1の被写体を決定するにあたっての候補とする。S904で顕著度の算出処理方法については後述する。 In this embodiment, the saliency is determined based on hue, saturation, and luminance. For example, in a scene of a pink flower surrounded by green leaves, the position of the flower is the main subject, and it can be inferred that the flower is the main subject by determining the saliency. In addition, a ship at sea, a bird flying in the sky, and the like can be guessed to be the main subject by determining the saliency for the same reason. As described above, the saliency can be one of the influential indices in determining the main subject. Therefore, in the present embodiment, the salient subject is set as a candidate for determining the first subject. The method of calculating the saliency in S904 will be described later.
S905では、CPU110は、S904で顕著被写体があったかどうかを判定し、顕著被写体が見つかった場合はS906へ進み、見つからなかった場合はS907へ進む。
S906では、CPU110は、合焦位置のデフォーカス量と顕著被写体のデフォーカス量との差分が第3の閾値と比較し、かつ、合焦位置に対して顕著被写体が近傍であるかどうかを判定する。これは看板などユーザが主被写体とさせたくないが顕著度が高い被写体が背景や平面端にいることがあるため、現在の合焦位置から大きく外れる位置の顕著被写体は除外させたいからである。合焦位置のデフォーカス量と顕著被写体のデフォーカス量との差分が第3の閾値未満、かつ、顕著被写体の平面上の位置が合焦位置の平面上の位置の近傍である場合には、S908へと進む。ここでは、デフォーカス方向(奥行方向)をZ軸方向とした場合のXY軸平面上の顕著被写体の中心座標の位置と合焦位置の座標位置との距離が第4の閾値未満である場合に、近傍であると判断する。また、複数の顕著被写体が閾値範囲に存在する場合は最も顕著度の高い被写体を選択しS908へと進む。合焦位置のデフォーカス量と顕著被写体のデフォーカス量との差分が第3の閾値以上、もしくは顕著被写体の平面上の位置と合焦位置の平面上の位置の近傍ではない、または両方を充たす場合には、S907へと進む。
In S905, the
In step S906, the
S907では、CPU110は、第1の被写体をS103で行った焦点検出結果が最至近を示している位置に決定する。
In S907, the
S908では、CPU110は、第1の被写体をS904で判定した顕著被写体に決定する。
In S908, the
S909では、CPU110は、第1の被写体を顔に決定する。
In S909, the
(色顕著度算出処理)
図6、図7及び図8を参照して、画像信号による色顕著度算出処理について説明する。
(Color saliency calculation processing)
The color saliency calculation processing based on the image signal will be described with reference to FIGS.
まず図6のS601において、CPU110は、画像信号の評価を行う評価領域を決定する。評価領域は、顕著度を評価する対象である被写体に相当する領域である。図7では、701は入力画像、702は評価画素、703は評価領域候補である。各評価領域候補は図7(a)から図7(c)に示すように、複数サイズで算出する。評価領域候補のサイズは所定値をn倍した値で算出し、例えば16画素、32画素、64画素とする。評価画素は入力画像の全画素からラスタ処理で順次選択する。
First, in S601 of FIG. 6, the
次に、図6のS602において、CPU110は、評価領域に対する外側評価領域を決定する。外側評価領域は、背景に相当する領域である。図8では、801が入力画像、802が評価画素、803が評価領域、804が外側評価領域である。図8に示すように、外側評価領域は中心位置が評価領域と同一であり、外径サイズが評価領域のサイズに所定値加算した値であり、評価領域を除いたドーナツ状の領域とする。加算する所定値は入力画像の割合で決定し、例えば入力画像の水平サイズの10%とする。
Next, in S602 of FIG. 6, the
次に、図6のS603において、CPU110は、評価領域と外側評価領域に対応する画像信号の相違度を色顕著度評価値として算出する。相違度Dは下記式により算出される。
Next, in S603 of FIG. 6, the
dHは評価領域及び外側評価領域の色相情報から算出された相違度であり、pHiは評価領域の色相情報がiの画素数を表し、qHiは外側評価領域の内、色相情報がiの画素数を表す。dS、pSi、qSiは彩度情報に関する同様の値であり、dV、pVi、qViは輝度情報に関する同様の値である。またmは色相情報、彩度情報、輝度情報が取り得る最大値である。 d H is the degree of difference calculated from the hue information of the evaluation area and the outer evaluation area, p Hi represents the number of pixels whose hue information of the evaluation area is i, and q Hi is the hue information of i of the outer evaluation area. Represents the number of pixels. d S , p Si , and q Si are similar values for chroma information, and d V , p Vi , and q Vi are similar values for luminance information. M is a maximum value that can be taken by hue information, saturation information, and luminance information.
次に、図6のS604において、CPU110は、未処理の評価領域があるか否か判定を行う。未処理の評価領域があれば図6のS601に戻って一連の処理を繰り返し、なければ本処理を終了する。
Next, in S604 of FIG. 6, the
以上の処理により、被写体領域は評価領域と外側評価領域の画像信号の相違度が高くなるという仮定に基づく色顕著度を算出できる。 Through the above processing, the color saliency can be calculated based on the assumption that the difference between the image signals of the evaluation area and the outer evaluation area of the subject area is high.
(第2の被写体決定処理)
ここでは図5のフローチャートにおける第2の被写体決定処理(S113およびS117)の詳細について図10を参照して説明する。前述のように、第2の被写体決定処理は、主被写体の候補として第2の被写体を決定する処理である。
(Second subject determination processing)
Here, details of the second subject determination processing (S113 and S117) in the flowchart of FIG. 5 will be described with reference to FIG. As described above, the second subject determination process is a process of determining a second subject as a main subject candidate.
まず、S1001では、CPU110は、撮像素子103から取得した画像信号から被写体検出部111を用いて被写体検出を行う。
First, in step S <b> 1001, the
次に、S1002では、CPU110は、S1001で検出した結果、第1の被写体とは異なる被写体であって、顔である被写体があるかどうかを判定する。
Next, in S1002, as a result of the detection in S1001, the
S1002において第1の被写体とは異なる被写体であって、顔である被写体があると判定された場合は、CPU110は、S1003で顔を第2の被写体に決定する。そして、第2の被写体は検出された状態として、第2の被写体決定処理を終了する。このように、主被写体である可能性が高い顔である被写体を主被写体の候補として決定する。これにより、第1の被写体がユーザの意図する主被写体でなかった場合や、第1の被写体とは異なる被写体のほうが主被写体にふさわしい場面に、より主被写体にふさわしい別の被写体を1の被写体として決定することができる。
If it is determined in S1002 that there is a subject that is different from the first subject and is a face, the
S1002において第1の被写体とは異なる被写体であって、顔である被写体があると判定されなかった場合は、CPU110は、S1004で、第2の被写体は決定せず、第2の被写体は非検出状態として、第2の被写体決定処理を終了する。第1の被写体とは異なる被写体として顔が検出されなかった場合には第1の被写体以外に主被写体にふさわしい被写体は存在しないと推測される。このため、主被写体の候補である被写体を決定しないことで、より主被写体にふさわしい被写体にピントを合わせ続けることができる。
If it is not determined in S1002 that there is a subject that is different from the first subject and is a face, the
(乗り移り判定処理)
ここでは図5のフローチャートにおける乗り移り判定処理S114の詳細について図11を参照して説明する。前述のように、乗り移り判定処理は、その時点での第1の被写体ではなく第2の被写体がピントを合わせるべき被写体であるかを判断する処理である。
(Transfer judgment processing)
Here, the details of the transfer determination processing S114 in the flowchart of FIG. 5 will be described with reference to FIG. As described above, the transfer determination process is a process of determining whether the second subject, not the first subject at that time, is a subject to be focused.
S1101では、CPU110は、S108の第1の被写体決定処理で決定された被写体が顔であるかを判定する。
In S1101, the
S1101において第1の被写体が顔であると判定された場合には、CPU110は、S1102で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in step S1101 that the first subject is a face, the
第1の被写体が顔である場合において、第1の被写体を変更しない理由は、現在追従している被写体が顔である場合は、主被写体である可能性が高く、被写体を変更しない方がよいためである。 When the first subject is a face, the reason why the first subject is not changed is that if the subject that is currently following is a face, it is highly likely that the first subject is the main subject, and it is better not to change the subject. That's why.
S1101において第1の被写体が顔でないと判定された場合には、CPU110は、S1103に進み、S113の第2の被写体決定処理で第2の被写体が検出されたかどうかを判定する。
If it is determined in S1101 that the first subject is not a face, the
S1103において第2の被写体が検出されていないと判定された場合は、CPU110は、乗り移り対象が存在しないため、S1102で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1103 that the second subject has not been detected, the
S1103において第2の被写体が検出されたと判定された場合は、CPU110は、S1104で第2の被写体が第1の被写体より至近側の被写体であるかを判定する。
If it is determined in S1103 that the second subject has been detected, the
S1104において第2の被写体が第1の被写体より至近側の被写体であると判定された場合は、CPU110は、S1106で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1104 that the second subject is a subject closer to the first subject, the
この場合において、第2の被写体を第1の被写体に変更する理由は、第2の被写体が第1の被写体より至近側の被写体である場合に、第1の被写体が背景となっているときに至近側の被写体が主被写体である可能性が高いためである。 In this case, the reason why the second subject is changed to the first subject is that when the second subject is a subject closer to the first subject and when the first subject is in the background. This is because there is a high possibility that the closest subject is the main subject.
S1104において第2の被写体が第1の被写体より至近側の被写体ではないと判定された場合は、CPU110は、S1105で第2の被写体が第1の被写体より所定デフォーカス内の無限側の被写体であるかを判定する。
If it is determined in S1104 that the second subject is not a subject closer to the first subject, the
S1105において、第2の被写体と第1の被写体とのデフォーカス量の差分が第5の閾値未満かつ、第2の被写体が第1の被写体より無限側の被写体であると判定された場合は、CPU110は、S1106で乗り移り判定結果をTRUEにする。そして、乗り移り判定処理を終了する。
In S1105, when it is determined that the difference between the defocus amounts of the second subject and the first subject is less than the fifth threshold value and the second subject is a subject on the infinite side of the first subject, The
S1105において、第2の被写体と第1の被写体とのデフォーカス量の差分が第5の閾値以上、第2の被写体が第1の被写体より至近側、又はこれら両方のいずれかを充たすと判定された場合には、S1102で乗り移り判定結果をFALSEにする。そして、乗り移り判定処理を終了する。 In step S <b> 1105, it is determined that the difference between the defocus amounts of the second subject and the first subject is equal to or greater than the fifth threshold value, and the second subject satisfies either the closest side of the first subject or both of them. In this case, the transfer determination result is set to FALSE in S1102. Then, the transfer determination processing ends.
ここで、第2の被写体を第1の被写体に変更する理由以下の通りである。第2の被写体と第1の被写体とのデフォーカス量の差分が第5の閾値未満かつ、第2の被写体が第1の被写体より無限側の被写体である場合において、例えば第1の被写体が地面等の人物よりも至近側である場合が考えられる。このような場合には、第2の被写体である顔が主被写体である可能性が高いためである。 Here, the reason for changing the second subject to the first subject is as follows. When the difference between the defocus amounts of the second subject and the first subject is less than a fifth threshold value and the second subject is a subject on the infinity side of the first subject, for example, if the first subject is on the ground It is conceivable that the person is closer than the person. This is because, in such a case, the face as the second subject is likely to be the main subject.
一方で第2の被写体と第1の被写体とのデフォーカス量の差分が第5の閾値以上でありかつ第2の被写体が第1の被写体の無限側の被写体である場合は、背景等にいる主被写体ではない顔である可能性が高いためである。 On the other hand, when the difference between the defocus amounts of the second subject and the first subject is equal to or greater than the fifth threshold value and the second subject is a subject on the infinite side of the first subject, the subject is in the background or the like. This is because there is a high possibility that the face is not the main subject.
なお、S1104およびS1105における処理では、CPU110がS112の焦点検出処理において算出した焦点検出結果から、第1の被写***置および第2の被写***置に該当するそれぞれの焦点検出結果を用いることで判定する。
In the processing in S1104 and S1105, the
以上のように、本実施例では、種々の工夫により主被写体誤検出を減らすことができるので、正しい主被写体へピントを合わせ続けることができる。また、さらには、焦点検出結果動的に主被写体を選び直すことで、正しい主被写体へピントを合わせ続けることができる。 As described above, in the present embodiment, erroneous detection of the main subject can be reduced by various measures, so that it is possible to keep focusing on the correct main subject. Further, by dynamically re-selecting the main subject as a result of the focus detection, it is possible to keep focusing on the correct main subject.
[実施例2]
以下、本発明の実施例2について図面を参照して説明する。本実施例は、例えば焦点検出処理において被写体が動体か否かを判定し、乗り移り判定において当該判定の結果を考慮する点で実施例1と異なる。また、例えば、第2の被写体決定処理において、顕著度を考慮している点で実施例1と異なる。なお、実施例1と同じ構成については説明を省略し、以下では実施例1と異なる部分を中心に説明する。本実施例では、CPU110が実施例1で説明した処理の他に、後述の動体予測処理及び動体判定処理(動体検出とも称する)を行うよう構成されている。
[Example 2]
Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. This embodiment is different from the first embodiment in that, for example, it is determined whether or not the subject is a moving object in a focus detection process, and the result of the determination is taken into account in a transfer determination. Further, for example, the second embodiment differs from the first embodiment in that saliency is taken into consideration in the second subject determination process. The description of the same configuration as that of the first embodiment will be omitted, and the following description will focus on portions different from the first embodiment. In the present embodiment, the
(焦点検出処理)
ここでは図5のフローチャートにおける実施例2の焦点検出処理S112の詳細について図12を参照して説明する。
(Focus detection processing)
Here, details of the focus detection processing S112 of the second embodiment in the flowchart of FIG. 5 will be described with reference to FIG.
S1201では、S110で撮像素子103から取得した画像信号をもとにCPU110が焦点検出処理を行う。
In step S1201, the
S1202では、S1201で取得される焦点検出結果をもとに、CPU110が第1の被写***置に該当する焦点検出結果を選択する。
In step S1202, the
S1203では、S1202選択される第1の被写***置に該当する焦点検出結果をもとに、CPU110が第1の動体判定処理を行う。
In step S1203, the
第1の動体判定処理では、第1の被写***置に該当する焦点検出結果を履歴として記憶し、その変化から動体であるかどうかを判定する。当該判定の結果を第1の動体検出結果とも称する。 In the first moving object determination process, the focus detection result corresponding to the first subject position is stored as a history, and it is determined whether the object is a moving object based on the change. The result of the determination is also referred to as a first moving object detection result.
なお、動体判定処理は、被写体が動体であるか否かがわかる方法であればどのような方法を採用しても良い。例えば、焦点検出結果が一定期間以上同じ方向に変化し、その変化量が所定値を超えたときに動体と判定することができる。 Note that the moving object determination process may employ any method as long as it is a method for determining whether or not the subject is a moving object. For example, when the focus detection result changes in the same direction for a certain period or more and the amount of change exceeds a predetermined value, it can be determined that the object is a moving object.
S1204において第1の被写体が動体であると判定された場合には、S1205では、S1202選択される第1の被写***置に該当する焦点検出結果をもとに、CPU110が第1の動体予測処理を行う。
If it is determined in step S1204 that the first object is a moving object, in step S1205, the
第1の動体予測処理では、第1の被写***置に該当する焦点検出結果の履歴から、任意時刻における第1の被写体の合焦位置を予測することが可能であり、ここでは撮像素子103の次の蓄積時刻における第1の被写体の合焦位置を予測する。 In the first moving object prediction process, it is possible to predict the in-focus position of the first subject at an arbitrary time from the history of the focus detection results corresponding to the first subject position. The in-focus position of the first subject at the accumulation time is predicted.
なお、動体予測処理の方法は、任意時刻における被写体の合焦位置を予測することができる方法であればどのような方法を採用しても良い。例えば特開2001−21794号公報に開示されている統計演算を用いて予測を行うことができる。 In addition, as a method of the moving object prediction processing, any method may be adopted as long as the method can predict the in-focus position of the subject at an arbitrary time. For example, the prediction can be performed using a statistical operation disclosed in Japanese Patent Application Laid-Open No. 2001-21794.
S1206では、第2の被写体決定処理S113の結果、第2の被写体が決定されているか判定する。 In S1206, it is determined whether the second subject has been determined as a result of the second subject determination processing S113.
S1206において第2の被写体が決定されている場合には、S1207で、S1201で取得される焦点検出結果をもとに、CPU110が第2の被写***置に該当する焦点検出結果を選択する。
If the second subject has been determined in S1206, the
S1208では、S1207で選択される第2の被写***置に該当する焦点検出結果をもとに、CPU110が第2の動体判定処理を行う。
In S1208, the
第2の動体判定処理では、第2の被写***置に該当する焦点検出結果を履歴として記憶し、その変化から動体であるかどうかを判定する。当該判定の結果を第2の動体検出結果とも称する。 In the second moving object determination process, the focus detection result corresponding to the second subject position is stored as a history, and it is determined whether the object is a moving object based on the change. The result of the determination is also referred to as a second moving object detection result.
S1209において第2の被写体が動体であると判定された場合には、S1210では、S1207選択される第2の被写***置に該当する焦点検出結果をもとに、CPU110が第2の動体予測処理を行う。
If it is determined in S1209 that the second object is a moving object, in S1210, the
第2の動体予測処理では、第2の被写***置に該当する焦点検出結果を履歴から、任意時刻における第2の被写体の合焦位置を予測することが可能であり、ここでは現時刻における第2の被写体の合焦位置を予測する。 In the second moving object prediction process, it is possible to predict the in-focus position of the second object at an arbitrary time from the history of the focus detection result corresponding to the second object position. The in-focus position of the subject is predicted.
(第2の被写体決定処理)
ここでは図5のフローチャートにおける実施例2の第2の被写体決定処理(S113およびS117)の詳細について図13を参照して説明する。前述のように、実施例2の第2の被写体決定処理では、顕著度も考慮している。
(Second subject determination processing)
Here, details of the second subject determination processing (S113 and S117) of the second embodiment in the flowchart of FIG. 5 will be described with reference to FIG. As described above, in the second subject determination processing according to the second embodiment, the degree of saliency is also considered.
まず、S1301では、CPU110は、撮像素子103から取得した画像信号から被写体検出部111を用いて被写体検出を行う。
First, in step S1301, the
次に、S1302では、CPU110は、S1301で検出した結果、顔が検出されたか否かを判定する。
Next, in S1302, the
S1302において顔があると判定された場合は、S1303で、CPU110は、第1の被写体のデフォーカス量と顔位置のデフォーカス量とを比較する。差分が第5の閾値未満であれば、S1304で顔を第2の被写体に決定し、第2の被写体は検出した状態として、第2の被写体決定処理を終了する。
If it is determined in S1302 that there is a face, in S1303, the
第1の被写体のデフォーカス量と顔位置のデフォーカス量との差分が第5の閾値以上のデフォーカス差であれば、検出された顔を第2の被写体として決定せず、S1305へ進む。 If the difference between the defocus amount of the first subject and the defocus amount of the face position is equal to or larger than the fifth threshold, the detected face is not determined as the second subject, and the process proceeds to S1305.
この閾値は広くするほど顔被写体へ焦点を合わせやすくなるが、例えば背景の観客などユーザの意図しない顔被写体へ焦点を合わせてしまう可能性もある。そのため、この時の閾値は合焦位置から無限側も至近側も同一の閾値で設定しても良いし、無限側を狭く至近側を広く設定しても良い。 The wider this threshold value is, the easier it is to focus on the face subject, but there is also a possibility that the focus will be on a face subject not intended by the user such as a background audience. Therefore, the threshold at this time may be set to the same threshold on the infinity side and the closest side from the in-focus position, or may be set narrower on the infinity side and wider on the closest side.
S1302において顔があると判定されなかった場合は、CPU110は、S1305で、撮像素子103から取得した画像信号から顕著度判定を行う。
If it is not determined in S1302 that there is a face, the
S1306では、CPU110は、S1305で顕著被写体があったかどうかを判定し、顕著被写体が見つかった場合はS1307へ進み、見つからなかった場合はS1309へ進む。
In S1306, the
S1307では、CPU110は、第1の被写体のデフォーカス量と顕著被写体のデフォーカス量とを比較する。差分が第6の閾値未満であれば、S1308で顕著被写体を第2の被写体に決定し、第2の被写体は検出した状態として、第2の被写体決定処理を終了する。
In S1307, the
第1の被写体と顕著被写体の焦点検出結果とを比較し、第6の閾値以上のデフォーカス差であれば、顕著被写体を第2の被写体には決定しない。 The focus detection results of the first subject and the prominent subject are compared, and if the defocus difference is equal to or greater than a sixth threshold, the prominent subject is not determined as the second subject.
この閾値は広くするほど顕著被写体へ焦点を合わせやすくなるが、例えば背景の目立った看板などユーザの意図しない被写体へ焦点を合わせてしまう可能性もある。 The wider this threshold value is, the easier it is to focus on a prominent subject, but there is also a possibility of focusing on a subject that the user does not intend, such as a signboard with a prominent background.
そのため、この時の閾値は第1の被写体から無限側も至近側も同一の閾値で設定しても良いし、無限側を狭く至近側を広く設定しても良い。 Therefore, the threshold at this time may be set to the same threshold on the infinity side and the closest side from the first subject, or may be set narrower on the infinity side and wider on the closest side.
S1309では、CPU110は、第1の被写体が画面内の中央領域に存在するかを判定する。
In S1309,
S1309において第1の被写体が画面内の中央領域に存在すると判定された場合は、S1310において、CPU110は、焦点検出結果が最至近を示している位置を第2の被写体に決定する。そして、第2の被写体は検出した状態として、第2の被写体決定処理を終了する。
If it is determined in S1309 that the first subject exists in the center area of the screen, in S1310, the
これは、第1の被写体が中央領域に存在する場合には、それ以外の領域に至近被写体が存在すれば主被写体である可能性があるためである。 This is because when the first subject is located in the central area, if the first subject is located close to other areas, it may be the main subject.
S1309において第1の被写体が画面内の中央領域に存在しないと判定された場合は、S1311において、CPU110は、画面中央位置を第2の被写体に決定し、第2の被写体は検出した状態として、第2の被写体決定処理を終了する。
If it is determined in S1309 that the first subject does not exist in the center area of the screen, in S1311, the
これは、第1の被写体が中央領域に存在しない場合には、中央領域に主被写体が存在する可能性があるためである。 This is because when the first subject does not exist in the central area, the main subject may exist in the central area.
ここで、中央領域の範囲に応じて、画面中央を第2の被写体として決定しやすさが変えるために、中央領域の範囲を狭くしても、広くしてもよい。 Here, in order to change the ease of determining the center of the screen as the second subject according to the range of the central region, the range of the central region may be narrowed or widened.
(乗り移り判定処理)
ここでは図5のフローチャートにおける実施例2の乗り移り判定処理S114の詳細について図14を参照して説明する。実施例2では、前述のように、焦点検出処理における動体判定の結果に基づいて乗り移り判定を行う。
(Transfer judgment processing)
Here, the details of the transfer determination processing S114 of the second embodiment in the flowchart of FIG. 5 will be described with reference to FIG. In the second embodiment, as described above, the transfer determination is performed based on the result of the moving body determination in the focus detection processing.
S1401では、CPU110は、S1203の第1の動体判定処理の結果、第1の被写体が動体であるかどうかを判定する。
In S1401, the
S1401において第1の被写体が動体であると判定された場合には、CPU110は、S1402で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in step S1401 that the first subject is a moving object, the
第1の被写体が動体である場合において、第1の被写体を変更しない理由は、現在追従している被写体が動体である場合は、主被写体である可能性が高く、被写体を変更しない方がよいためである。 When the first subject is a moving body, the reason why the first subject is not changed is that if the currently followed subject is a moving body, it is highly likely that the first subject is the main subject, and it is better not to change the subject. That's why.
S1401において第1の被写体が動体でないと判定された場合には、CPU110は、S1403に進み、S1208の第2の動体判定処理の結果、第2の被写体が動体であるかどうかを判定する。
If it is determined in S1401 that the first subject is not a moving object, the
S1403において第2の被写体が動体であると判定された場合には、CPU110は、S1404で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1403 that the second subject is a moving object, the
S1403において第2の被写体が動体ではないと判定された場合には、CPU110は、S1402で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1403 that the second subject is not a moving object, the
この場合おいて、第2の被写体を第1の被写体に変更する理由は、現在追従している被写体が動体ではなく、第2の被写体が動体である場合、第2の被写体が主被写体である可能性が高いためである。 In this case, the reason for changing the second subject to the first subject is that the second subject is the main subject if the subject that is currently following is not a moving subject and the second subject is a moving subject. This is because the possibility is high.
実施例2におけるS118では、CPU110が算出した第1の被写体として選択されている被写体のAF枠位置の合焦位置を用いて焦点調節部116でレンズ駆動量に換算し、フォーカスレンズ126を駆動することで焦点調節を行う。
In S118 according to the second embodiment, the focus adjustment unit 116 converts the focus position of the AF frame position of the subject selected as the first subject calculated by the
以上のように、本発明によれば、焦点検出結果から動体を判定し、動体と判定された被写体に対し、動的に主被写体を選び直すことで、正しい主被写体へピントを合わせ続けることができる。 As described above, according to the present invention, it is possible to continuously focus on the correct main subject by determining the moving subject from the focus detection result and dynamically reselecting the main subject for the subject determined to be the moving subject. it can.
[実施例3]
以下、本発明の実施例3について図面を参照して説明する。なお、実施例2と同じ構成については説明を省略し、以下では実施例2と異なる部分を中心に説明する。
[Example 3]
Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. The description of the same configuration as that of the second embodiment will be omitted, and the following description will focus on the differences from the second embodiment.
(乗り移り判定処理)
ここでは図5のフローチャートにおける実施例3の乗り移り判定処理S114の詳細について図15を参照して説明する。
(Transfer judgment processing)
Here, details of the transfer determination processing S114 of the third embodiment in the flowchart of FIG. 5 will be described with reference to FIG.
S1501では、CPU110は、S1203の第1の動体判定処理の結果、第1の被写体が動体であるかどうかを判定する。
In S1501, the
S1501において第1の被写体が動体であると判定された場合には、S1502で、CPU110は、S108の第1の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1501 that the first subject is a moving object, in S1502, the
S1502において第1の被写体が顔であると判定された場合には、S1503で、CPU110は、S1208の第2の動体判定処理の結果、第2の被写体が動体であるかどうかを判定する。
If it is determined in S1502 that the first subject is a face, in S1503, the
S1503において第2の被写体が動体であると判定された場合には、S1504で、CPU110は、S113の第2の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1503 that the second subject is a moving object, in S1504, the
S1503において第2の被写体が動体ではないと判定された場合には、CPU110は、S1507で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1503 that the second subject is not a moving object, the
S1504において第2の被写体が顔であると判定された場合には、S1505で、CPU110は、第2の被写体のデフォーカス量と第2の被写体のデフォーカス量を比較することで、第2の被写体が第1の被写体より至近側であるかを判定する。 S1504において第2の被写体が顔ではないと判定された場合には、CPU110は、S1507で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in step S1504 that the second subject is a face, in step S1505, the
なお、第2の被写体が第1の被写体より至近側であるかを判定する際には、それぞれのし被写体の位置の焦点検出結果を用いて行うこともできるが、それぞれの動体予測処理で求めた合焦位置から判定してもよい。また、以降の処理における判定においても焦点検出結果であるデフォーカス量の代わりに、動体予測処理で求めた合焦位置を用いて判定してもよい。 In addition, when determining whether the second subject is closer to the first subject, it can be performed using the focus detection result of the position of each subject, but it is determined by each moving object prediction process. The determination may be made from the in-focus position. Also in the determination in the subsequent processing, the determination may be made using the in-focus position obtained in the moving object prediction processing instead of the defocus amount which is the focus detection result.
S1505において、第2の被写体が第1の被写体より至近側であると判定された場合には、CPU110は、S1506で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1505 that the second subject is closer than the first subject, the
S1505において第2の被写体が第1の被写体より至近側ではないと判定された場合には、CPU110は、S1506で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1505 that the second subject is not closer than the first subject, the
この場合において、第2の被写体を第1の被写体に変更する理由は、第2の被写体が第1の被写体より至近側である場合に、手前の被写体の方が主被写体である可能性が高いためである。 In this case, the reason for changing the second subject to the first subject is that when the second subject is closer to the first subject, the subject in front is more likely to be the main subject. That's why.
S1502において第1の被写体が顔ではないと判定された場合には、CPU110は、S1508で、S1208の第2の動体判定処理の結果、第2の被写体が動体であるかどうかを判定する。
If it is determined in step S1502 that the first subject is not a face, the
S1508において第2の被写体が動体であると判定された場合には、S1509で、CPU110は、S113の第2の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1508 that the second subject is a moving object, in S1509, the
S1508において第2の被写体が動体ではないと判定された場合には、CPU110は、S1513で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1508 that the second subject is not a moving object, the
S1509において第2の被写体が顔であると判定された場合には、CPU110は、S1510で、第2の被写体のデフォーカス量と第1の被写体のデフォーカス量の差分が第7の閾値未満であるかを判定する。
If it is determined in S1509 that the second subject is a face, the
S1509において第2の被写体が顔ではないと判定された場合には、CPU110は、S1513で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1509 that the second subject is not a face, the
S1510において第2の被写体のデフォーカス量と第1の被写体のデフォーカス量の差分が第7の閾値未満であると判定された場合には、CPU110は、S1511で第2の被写体が第1の被写体の所定より近傍領域に存在するかを判定する。
If it is determined in S1510 that the difference between the defocus amount of the second subject and the defocus amount of the first subject is smaller than the seventh threshold, the
S1505において第2の被写体のデフォーカス量と第1の被写体のデフォーカス量の差分が第7の閾値以上であると判定された場合には、CPU110は、S1513で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in step S1505 that the difference between the defocus amount of the second subject and the defocus amount of the first subject is equal to or greater than the seventh threshold, the
S1511において第2の被写体の平面上の位置が第1の被写体の平面上の位置に対して近傍領域に存在すると判定された場合には、CPU110は、S1512で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。ここでは、デフォーカス方向(奥行方向)をZ軸方向とした場合のXY軸平面上の第1の被写体の中心座標の位置と第1の被写体の中心座標の位置との距離が第8の閾値未満である場合に、第2の被写体の平面上の位置が第1の被写体の平面上の位置に対して近傍領域に存在すると判断する。
If it is determined in S1511 that the position of the second object on the plane is in the vicinity of the position of the first object on the plane, the
この場合において、第2の被写体を第1の被写体に変更する理由は、第2の被写体と第1の被写体は同一被写体である可能性が高く、その場合は顔にピントを合わせた方が良いためである。 In this case, the reason why the second subject is changed to the first subject is that the second subject and the first subject are likely to be the same subject, and in that case, it is better to focus on the face. That's why.
S1501において第1の被写体が動体ではないと判定された場合には、S1514で、CPU110は、S108の第1の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1501 that the first subject is not a moving object, in S1514, the
S1514において第1の被写体が顔であると判定された場合には、S1515で、CPU110は、S1208の第2の動体判定処理の結果、第2の被写体が動体であるかどうかを判定する。
If it is determined in S1514 that the first subject is a face, in S1515, the
S1515において第2の被写体が動体であると判定された場合には、S1516で、CPU110は、S113の第2の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1515 that the second subject is a moving object, in S1516, the
S1515において第2の被写体が動体ではないと判定された場合には、CPU110は、S1519で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1515 that the second subject is not a moving object, the
S1516において第2の被写体が顔であると判定された場合には、CPU110は、S1517で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1516 that the second subject is a face, the
この場合において、第2の被写体を第1の被写体に変更する理由は、第2の被写体と第1の被写体が両方顔である場合に、動体である顔の方が主被写体である可能性が高いためである。 In this case, the reason why the second subject is changed to the first subject is that when both the second subject and the first subject are faces, the face that is a moving object may be the main subject. Because it is expensive.
S1516において第2の被写体が顔ではないと判定された場合には、CPU110は、S1518で顔優先設定がONになっているかについて判定する。
If it is determined in S1516 that the second subject is not a face, the
なお、顔優先設定とは、ユーザの指定に応じてメモリ回路101に保存されているカメラ設定値である。顔優先設定がONになっている場合は、被写体として顔が検出された場合に、顔を優先してピントを合わせるようCPU110が制御する。
Note that the face priority setting is a camera setting value stored in the
顔優先設定がONの場合には、被写体検出部111によって顔を検出した際に、表示器105に顔の位置を示す枠を表示することも可能である。
When the face priority setting is ON, it is also possible to display a frame indicating the position of the face on the
S1518において顔優先設定がONになっていると判定された場合には、CPU110は、S1519で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1518 that the face priority setting is ON, the
S1518において顔優先設定がONになっていないと判定された場合には、CPU110は、S1517で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1518 that the face priority setting is not ON, the
この場合において、第2の被写体を第1の被写体に変更する理由は、顔優先設定がONでなければ、顔ではあるが動体ではない被写体よりも顔ではない動体の方が主被写体である可能性が高いためである。 In this case, the reason why the second subject is changed to the first subject is that if the face priority setting is not ON, a moving object that is not a face is a main subject than a subject that is a face but is not a moving object. This is because the nature is high.
S1514において第1の被写体が顔ではないと判定された場合には、S1520で、CPU110は、S1208の第2の動体判定処理の結果、第2の被写体が動体であるかどうかを判定する。
If it is determined in S1514 that the first subject is not a face, in S1520, the
S1520において第2の被写体が動体であると判定された場合には、CPU110は、S1521で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1520 that the second subject is a moving object, the
この場合において、第2の被写体を第1の被写体に変更する理由は、動体ではない被写体よりも動体の方が主被写体である可能性が高いためである。 In this case, the reason why the second subject is changed to the first subject is that the moving subject is more likely to be the main subject than the non-moving subject.
S1520において第2の被写体が動体ではないと判定された場合には、S1522で、CPU110は、S113の第2の被写体決定処理で決定された被写体が顔であるかを判定する。
If it is determined in S1520 that the second subject is not a moving object, in S1522, the
S1522において第2の被写体が顔であると判定された場合には、CPU110は、S1523で顔優先設定がONになっているかについて判定する。
If it is determined in S1522 that the second subject is a face, the
S1523において顔優先設定がONになっていると判定された場合には、CPU110は、S1521で乗り移り判定結果をTRUEにし、乗り移り判定処理を終了する。
If it is determined in S1523 that the face priority setting is ON, the
この場合において、第2の被写体を第1の被写体に変更する理由は、顔優先設定がONである場合は、顔ではない被写体より顔の方が主被写体である可能性が高いためである。 In this case, the reason why the second subject is changed to the first subject is that when the face priority setting is ON, the face is more likely to be the main subject than the non-face subject.
S1523において顔優先設定がONになっていないと判定された場合には、CPU110は、S1524で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1523 that the face priority setting is not ON, the
S1522において第2の被写体が顔ではないと判定された場合には、CPU110は、S1524で乗り移り判定結果をFALSEにし、乗り移り判定処理を終了する。
If it is determined in S1522 that the second subject is not a face, the
以上のように、本発明によれば、焦点検出結果から動体を判定し、動体と判定された被写体に対し、動的に主被写体を選び直すことで、正しい主被写体へピントを合わせ続けることができる。 As described above, according to the present invention, it is possible to continuously focus on the correct main subject by determining the moving subject from the focus detection result and dynamically reselecting the main subject for the subject determined to be the moving subject. it can.
また、被写体が顔であるかどうかに応じて、主被写体を選び直すか否かを判定することで、誤って主被写体を選び直してしまうことを防ぐことができる。 Further, by determining whether or not to reselect the main subject depending on whether or not the subject is a face, it is possible to prevent the main subject from being reselected by mistake.
[その他の実施例]
なお、上述の実施例では主にデフォーカス量を用いた判定を行う例を説明したが、焦点検出結果に対応していればこれに限らない。例えば像ずれ量や距離に対応する情報で代用しても良い。
[Other Examples]
Note that, in the above-described embodiment, an example in which the determination is mainly performed using the defocus amount is described. However, the embodiment is not limited to this as long as the determination corresponds to the focus detection result. For example, information corresponding to the image shift amount and the distance may be used instead.
また、上述の実施例では顔を検出する例を説明したが、追尾処理により検出される所定の被写体であれば顔に限らない。例えば撮影の対象としたいモノに対応して予め追尾のためのテンプレートを設定しておき、本実施例の顔に代えてモノを検出するようにしても良い。 Further, in the above-described embodiment, an example in which a face is detected has been described. However, the present invention is not limited to a face as long as it is a predetermined subject detected by tracking processing. For example, a template for tracking may be set in advance corresponding to an object to be photographed, and an object may be detected instead of the face in the present embodiment.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program for realizing one or more functions of the above-described embodiments to a system or an apparatus via a network or a storage medium, and one or more processors in a computer of the system or the apparatus read and execute the program. This processing can be realized. Further, it can also be realized by a circuit (for example, an ASIC) that realizes one or more functions.
100 カメラ本体
103 撮像素子
110 CPU
111 被写体検出部
112 位相差検出手段
113 第1の被写体決定処理部
114 第2の被写体決定処理部
115 乗り移り判定処理部
116 焦点調節部
121 フォーカスレンズ駆動機構
Reference Signs List 111 subject detection unit 112 phase
Claims (7)
フォーカスレンズの駆動を制御する制御手段と、
前記制御手段が前記焦点検出の結果に基づいて検出された被写体に合焦させるよう前記フォーカスレンズの駆動を制御してから、フォーカスレンズを追従させるべき第1の被写体を決定する第1の決定手段であって、
前記被写体に対応する位置との焦点検出結果の差分が閾値以上である場合には、顕著度に基づいて前記第1の被写体を決定し、前記被写体に対応する位置との焦点検出結果の差分が閾値未満である場合には、前記顕著度によらず、前記被写体を前記第1の被写体として決定する第1の決定手段を有することを特徴とする撮像装置。 Focus detection means for performing focus detection based on a signal output from the image sensor,
Control means for controlling driving of the focus lens;
First determining means for controlling the driving of the focus lens such that the control means focuses on the object detected based on the result of the focus detection, and then determining the first object to be followed by the focus lens And
If the difference between the focus detection result and the position corresponding to the subject is equal to or greater than a threshold, the first subject is determined based on the saliency, and the difference between the focus detection result and the position corresponding to the subject is determined. An imaging apparatus comprising: a first determination unit that determines the subject as the first subject regardless of the saliency when the difference is less than a threshold value.
フォーカスレンズの駆動を制御する制御ステップと、
前記制御ステップで前記焦点検出の結果に基づいて検出された被写体に合焦させるよう前記フォーカスレンズの駆動を制御してから、フォーカスレンズを追従させるべき第1の被写体を決定する第1の決定ステップであって、
前記被写体に対応する位置との焦点検出結果の差分が閾値以上である場合には、顕著度に基づいて前記第1の被写体を決定し、前記被写体に対応する位置との焦点検出結果の差分が閾値未満である場合には、前記顕著度によらず、前記被写体を前記第1の被写体として決定する第1の決定ステップを有することを特徴とする撮像装置の制御方法。 A focus detection step of performing focus detection based on a signal output from the image sensor,
A control step of controlling driving of the focus lens;
A first determining step of controlling the driving of the focus lens to focus on a subject detected based on the result of the focus detection in the control step, and then determining a first subject to be followed by the focus lens And
If the difference between the focus detection result and the position corresponding to the subject is equal to or greater than a threshold, the first subject is determined based on the saliency, and the difference between the focus detection result and the position corresponding to the subject is determined. A control method for an imaging device, comprising: a first determination step of determining the subject as the first subject regardless of the saliency when the difference is less than a threshold value.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018125534A JP6672389B2 (en) | 2018-06-29 | 2018-06-29 | Imaging device and control method thereof |
US16/446,380 US11115583B2 (en) | 2018-06-29 | 2019-06-19 | Apparatus and method for determination of a focus detection target |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018125534A JP6672389B2 (en) | 2018-06-29 | 2018-06-29 | Imaging device and control method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020003740A JP2020003740A (en) | 2020-01-09 |
JP6672389B2 true JP6672389B2 (en) | 2020-03-25 |
Family
ID=69099897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018125534A Active JP6672389B2 (en) | 2018-06-29 | 2018-06-29 | Imaging device and control method thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6672389B2 (en) |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8253800B2 (en) * | 2006-06-28 | 2012-08-28 | Nikon Corporation | Tracking device, automatic focusing device, and camera |
JP5167750B2 (en) * | 2006-10-03 | 2013-03-21 | 株式会社ニコン | TRACKING DEVICE, IMAGING DEVICE, AND TRACKING METHOD |
JP5474528B2 (en) * | 2009-12-25 | 2014-04-16 | 富士フイルム株式会社 | Auto focus system |
JP5879736B2 (en) * | 2011-04-21 | 2016-03-08 | 株式会社ニコン | Image tracking device and imaging device |
JP2013012940A (en) * | 2011-06-29 | 2013-01-17 | Olympus Imaging Corp | Tracking apparatus and tracking method |
JP2014235224A (en) * | 2013-05-31 | 2014-12-15 | 株式会社ニコン | Imaging device and control program |
JP5871196B2 (en) * | 2014-10-29 | 2016-03-01 | 株式会社ニコン | Focus adjustment device and imaging device |
JP6529315B2 (en) * | 2015-04-09 | 2019-06-12 | キヤノン株式会社 | Main subject detection method, main subject detection device and program |
JP2017016592A (en) * | 2015-07-06 | 2017-01-19 | キヤノン株式会社 | Main subject detection device, main subject detection method and program |
JP6602081B2 (en) * | 2015-07-24 | 2019-11-06 | キヤノン株式会社 | Imaging apparatus and control method thereof |
-
2018
- 2018-06-29 JP JP2018125534A patent/JP6672389B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2020003740A (en) | 2020-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9258545B2 (en) | Stereoscopic imaging apparatus | |
JP4582212B2 (en) | Imaging apparatus and program | |
US8773509B2 (en) | Imaging device, imaging method and recording medium for adjusting imaging conditions of optical systems based on viewpoint images | |
JP6512810B2 (en) | Image pickup apparatus, control method and program | |
JP5247003B2 (en) | Imaging device | |
US8648961B2 (en) | Image capturing apparatus and image capturing method | |
US9462252B2 (en) | Single-eye stereoscopic imaging device, imaging method and recording medium | |
US11317013B2 (en) | Focus adjustment operation detection device, focus adjustment operation detection method, focus adjustment operation detection program, imaging device main body, and imaging device | |
CN107645632B (en) | Focus adjustment apparatus, focus adjustment method, image pickup apparatus, and storage medium | |
JP4122865B2 (en) | Autofocus device | |
US9380200B2 (en) | Image pickup apparatus and control method in which object searching based on an image depends on pixel combining on the image | |
KR102638565B1 (en) | Image processing device, output information control method, and program | |
EP3125037B1 (en) | Lens control device, lens control method, and recording medium | |
WO2019146419A1 (en) | Image processing device, image processing method, and program | |
JP6672389B2 (en) | Imaging device and control method thereof | |
JP2013113857A (en) | Imaging device, and control method therefor | |
US11115583B2 (en) | Apparatus and method for determination of a focus detection target | |
JP7191552B2 (en) | Control device, imaging device, program, and storage medium | |
JP2020003741A (en) | Image capturing device and control method therefor | |
JP6971694B2 (en) | Image pickup device and its control method | |
JP2020003742A (en) | Image capturing device and control method therefor | |
JP6859388B2 (en) | Imaging device, focus adjustment device, and its control method | |
JP5397502B2 (en) | Imaging apparatus and program | |
JP5200534B2 (en) | Imaging apparatus and program | |
JP7421008B2 (en) | Imaging device, imaging method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181227 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190619 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190723 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190920 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191112 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200110 |
|
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: 20200204 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200304 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6672389 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |