JP7130521B2 - IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM - Google Patents

IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM Download PDF

Info

Publication number
JP7130521B2
JP7130521B2 JP2018196750A JP2018196750A JP7130521B2 JP 7130521 B2 JP7130521 B2 JP 7130521B2 JP 2018196750 A JP2018196750 A JP 2018196750A JP 2018196750 A JP2018196750 A JP 2018196750A JP 7130521 B2 JP7130521 B2 JP 7130521B2
Authority
JP
Japan
Prior art keywords
defocus amount
focusing
filter
images
predetermined threshold
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
Application number
JP2018196750A
Other languages
Japanese (ja)
Other versions
JP2020064212A (en
Inventor
広明 栗栖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018196750A priority Critical patent/JP7130521B2/en
Publication of JP2020064212A publication Critical patent/JP2020064212A/en
Application granted granted Critical
Publication of JP7130521B2 publication Critical patent/JP7130521B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像から抽出する信号の周波数成分が異なる2つのフィルタを用いて合焦を行う撮像装置、撮像装置の制御方法及びプログラムに関する。 The present invention relates to an imaging apparatus that performs focusing using two filters with different frequency components of signals extracted from an image, a control method for the imaging apparatus, and a program.

従来、電子スチルカメラ等の撮像装置では、フォーカスレンズを移動させて被写体に合焦するための制御として、撮像素子から出力された撮像信号を用いて自動的に合焦を行うオートフォーカス制御が用いられる。オートフォーカス制御における合焦方法としては、位相差検出方式とコントラスト検出方式が知られている。例えば、位相差検出方式では、撮像光学系の互いに異なる射出瞳領域を通過した被写体からの光束を撮像素子上に結像させ、撮像素子に配置された測距用のセンサから得られる一対の視差信号の位相差に基づいてデフォーカス量を計算する。さらに、フォーカスレンズを、計算されたデフォーカス量に相当する移動量だけ移動させることにより、素早く撮像光学系の合焦状態を得ることができる(例えば、特許文献1参照。)。 2. Description of the Related Art Conventionally, in an imaging device such as an electronic still camera, autofocus control, which automatically focuses using an imaging signal output from an imaging device, is used as control for moving a focus lens to focus on a subject. be done. A phase difference detection method and a contrast detection method are known as focusing methods in autofocus control. For example, in the phase difference detection method, light beams from a subject that pass through mutually different exit pupil areas of an imaging optical system are imaged on an imaging device, and a pair of parallax sensors obtained from distance measurement sensors arranged in the imaging device. A defocus amount is calculated based on the signal phase difference. Furthermore, by moving the focus lens by a movement amount corresponding to the calculated defocus amount, the in-focus state of the imaging optical system can be quickly obtained (see, for example, Patent Document 1).

ところで、画像の複数の被写体が含まれる場合、位相差検出方式では、画像から低周波数成分の信号を抽出する低域フィルタと、画像から高周波数成分の信号を抽出する高域フィルタとを用いる。低域フィルタを用いて抽出した信号には複数の被写体の信号成分が含まれ、高域フィルタを用いて抽出した信号には比較的合焦状態に近い被写体の信号成分が含まれる。そこで、まず、低域フィルタを用いて算出したデフォーカス量(以下、「低域デフォーカス量」という。)を用いて複数の被写体の中間位置への合焦を行う。その後、低域デフォーカス量と高域フィルタを用いて算出したデフォーカス量(以下、「高域デフォーカス量」という。)との差が所定値以下となったとき、高域デフォーカス量を用いて合焦状態に近い被写体への合焦を行う。 By the way, when a plurality of objects are included in an image, the phase difference detection method uses a low-pass filter for extracting low-frequency component signals from the image and a high-pass filter for extracting high-frequency component signals from the image. A signal extracted using a low-pass filter contains signal components of a plurality of objects, and a signal extracted using a high-pass filter contains signal components of an object that is relatively in focus. Therefore, first, a defocus amount calculated using a low-pass filter (hereinafter referred to as a "low-pass defocus amount") is used to focus on an intermediate position of a plurality of subjects. After that, when the difference between the low-frequency defocus amount and the defocus amount calculated using the high-pass filter (hereinafter referred to as "high-frequency defocus amount") becomes equal to or less than a predetermined value, the high-frequency defocus amount is Focusing is performed on an object that is close to the in-focus state.

特開平09-54242号公報JP-A-09-54242

しかしながら、高域デフォーカス量を用いて合焦状態に近い被写体への合焦を行った場合、低域デフォーカス量と高域デフォーカス量との差(以下、「デフォーカス量差」という。)が大きくなることがある。デフォーカス量差が所定値よりも大きくなると、再び、低域デフォーカス量を用いた合焦が行われる。その結果、低域デフォーカス量を用いた合焦と高域デフォーカス量を用いた合焦とが繰り返され、合焦に時間を要することがある。 However, when the high-frequency defocus amount is used to focus on a subject that is close to being in focus, the difference between the low-frequency defocus amount and the high-frequency defocus amount (hereinafter referred to as "defocus amount difference"). ) can be large. When the defocus amount difference becomes larger than the predetermined value, focusing is performed again using the low-range defocus amount. As a result, focusing using the low-frequency defocus amount and focusing using the high-frequency defocus amount are repeated, and it may take time to focus.

本発明の目的は、短時間に合焦を行うことができる撮像装置、撮像装置の制御方法及びプログラムを提供することにある。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an imaging device capable of focusing in a short time, a control method for the imaging device, and a program.

上記目的を達成するために、本発明の撮像装置は、フォーカスレンズの互いに異なる瞳領域を通過した被写体からの一対の光束のそれぞれに対応する二画像の信号を生成する信号生成手段と、前記二画像から第1の周波数成分の信号を抽出する第1のフィルタ及び前記二画像から前記第1の周波数成分よりも高域の周波数成分である第2の周波数成分の信号を抽出する第2のフィルタを有する信号抽出手段と、前記第1のフィルタによって前記二画像から抽出された信号の位相差に基づいて第1のデフォーカス量を算出するとともに、前記第2のフィルタによって前記二画像から抽出された信号の位相差に基づいて第2のデフォーカス量を算出するデフォーカス量算出手段と、前記第1のデフォーカス量及び前記第2のデフォーカス量の差に基づいて、前記第1のデフォーカス量及び前記第2のデフォーカス量のいずれかを合焦に用いるデフォーカス量として選択する選択手段と、前記合焦に用いるデフォーカス量が、前記第1のデフォーカス量から前記第2のデフォーカス量へ、又は前記第2のデフォーカス量から前記第1のデフォーカス量へ切り替わった切り替わり回数を確認する確認手段と、を備え、前記切り替わり回数が所定の閾値以上である場合、前記選択手段は前記合焦に用いるデフォーカス量の選択方法を変更することを特徴とする。 In order to achieve the above object, the image pickup apparatus of the present invention includes signal generation means for generating signals of two images respectively corresponding to a pair of light fluxes from a subject that have passed through mutually different pupil regions of a focus lens; A first filter for extracting a signal of a first frequency component from an image, and a second filter for extracting a signal of a second frequency component, which is a higher frequency component than the first frequency component, from the two images. and calculating a first defocus amount based on the phase difference between the signals extracted from the two images by the first filter, and extracting from the two images by the second filter defocus amount calculation means for calculating a second defocus amount based on the phase difference of the signals obtained; and the first defocus amount based on the difference between the first defocus amount and the second defocus amount. selecting means for selecting one of the focus amount and the second defocus amount as the defocus amount to be used for focusing; confirmation means for confirming the number of times of switching to the defocus amount or from the second defocus amount to the first defocus amount; The means is characterized by changing a method of selecting a defocus amount used for focusing.

本発明によれば、短時間に合焦を行うことができる。 According to the present invention, focusing can be performed in a short time.

本発明の第1の実施の形態に係る撮像装置としての電子スチルカメラの構成を概略的に示す図である。1 is a diagram schematically showing the configuration of an electronic still camera as an imaging device according to a first embodiment of the present invention; FIG. 図1における画素アレイの構成を示す図である。2 is a diagram showing the configuration of a pixel array in FIG. 1; FIG. 図1の電子スチルカメラが実行する撮影処理を示すフローチャートである。2 is a flowchart showing shooting processing executed by the electronic still camera of FIG. 1; 図3のS304におけるオートフォーカス処理を示すフローチャートである。FIG. 4 is a flowchart showing autofocus processing in S304 of FIG. 3; FIG. 図4のS401における焦点検出処理を示すフローチャートである。FIG. 5 is a flowchart showing focus detection processing in S401 of FIG. 4; FIG. 一般的なフィルタ処理を説明するための図である。FIG. 10 is a diagram for explaining general filtering; 通常の合焦について説明するためのグラフである。7 is a graph for explaining normal focusing; 本発明の第1の実施の形態に係る撮像装置の制御方法としてのフィルタ決定処理を示すフローチャートである。4 is a flow chart showing filter determination processing as a control method of the imaging apparatus according to the first embodiment of the present invention; 図8のS803において保持される選択履歴のデータ構造を示す図である。FIG. 9 is a diagram showing the data structure of a selection history held in S803 of FIG. 8; 図8のS802におけるフィルタ選択処理を示すフローチャートである。FIG. 9 is a flowchart showing filter selection processing in S802 of FIG. 8. FIG. 本発明の第2の実施の形態における撮像装置の制御方法としてのフィルタ決定処理を示すフローチャートである。10 is a flow chart showing filter determination processing as a control method of an imaging device according to a second embodiment of the present invention;

以下、本発明の実施の形態について図面を参照しながら詳細に説明する。しかしながら、以下の実施の形態に記載される構成はあくまで例示に過ぎず、本発明の範囲は実施の形態に記載される構成によって限定されることはない。まず、本発明の第1の実施の形態について説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. However, the configurations described in the following embodiments are merely examples, and the scope of the present invention is not limited by the configurations described in the embodiments. First, a first embodiment of the present invention will be described.

図1は、本発明の第1の実施の形態に係る撮像装置としての電子スチルカメラの構成を概略的に示す図である。 FIG. 1 is a diagram schematically showing the configuration of an electronic still camera as an imaging device according to the first embodiment of the invention.

図1において、電子スチルカメラ101は撮影レンズ111を備える。撮影レンズ111は、固定レンズ112、絞り113及びフォーカスレンズ114を有する。フォーカスレンズ114は、焦点調節用レンズであり、通常は複数のレンズで構成される。なお、図1では、フォーカスレンズ114が単レンズとして簡略的に示されている。 In FIG. 1, an electronic still camera 101 has a photographing lens 111 . The photographing lens 111 has a fixed lens 112 , a diaphragm 113 and a focus lens 114 . The focus lens 114 is a lens for focus adjustment and is normally composed of a plurality of lenses. Note that FIG. 1 schematically shows the focus lens 114 as a single lens.

また、電子スチルカメラ101は、絞り制御部115、フォーカス制御部116及びレンズ制御部117を備える。絞り制御部115は、絞り113を駆動することにより、絞り113の開口径を調整して撮影時の光量調節を行う。フォーカス制御部116は、撮影レンズ111のピント方向のずれ量に基づいてフォーカスレンズ114の駆動量を決定し、フォーカスレンズ114を駆動することにより、焦点を調節する。特に、本実施の形態では、フォーカス制御部116によるフォーカスレンズ114の移動制御により、自動焦点調節が実現される。絞り制御部115やフォーカス制御部116はレンズ制御部117によって制御される。 The electronic still camera 101 also includes an aperture control unit 115 , a focus control unit 116 and a lens control unit 117 . A diaphragm control unit 115 drives the diaphragm 113 to adjust the aperture diameter of the diaphragm 113 and adjust the amount of light during photographing. The focus control unit 116 determines the driving amount of the focus lens 114 based on the amount of deviation of the photographing lens 111 in the focus direction, and drives the focus lens 114 to adjust the focus. In particular, in the present embodiment, automatic focus adjustment is realized by movement control of focus lens 114 by focus control unit 116 . A diaphragm control unit 115 and a focus control unit 116 are controlled by a lens control unit 117 .

さらに、電子スチルカメラ101は、画素アレイ200、タイミングジェネレータ122、CDS/AGC/ADコンバータ123、撮像信号処理部124、焦点検出用信号処理部125及びカメラ制御部141を備える。また、電子スチルカメラ101は、表示制御部132、表示部133、記録媒体制御部134、記録媒体135、SDRAM136、ROM137、フラッシュROM138、第1のSW139及び第2のSW140を備える。なお、本実施の形態において、カメラ制御部141は、信号抽出手段、デフォーカス量算出手段、選択手段、確認手段初期化手段や変更手段等に該当する。 Further, the electronic still camera 101 includes a pixel array 200 , a timing generator 122 , a CDS/AGC/AD converter 123 , an imaging signal processing section 124 , a focus detection signal processing section 125 and a camera control section 141 . The electronic still camera 101 also includes a display control unit 132, a display unit 133, a recording medium control unit 134, a recording medium 135, an SDRAM 136, a ROM 137, a flash ROM 138, a first SW139 and a second SW140. In this embodiment, the camera control unit 141 corresponds to signal extraction means, defocus amount calculation means, selection means, confirmation means initialization means, change means, and the like.

電子スチルカメラ101において、撮影レンズ111を介して入射した光束(入射光)は画素アレイ200の各撮像素子(単位画素)121の受光面上に結像し、撮像素子121によって電気信号に変換される。撮像素子121(信号生成手段)は、被写体像(光学像)を信号電荷へ光電変換する光電変換素子であり、CCDやCMOSセンサによって構成される。各光電変換素子に蓄積された信号電荷は、タイミングジェネレータ122が出力する駆動パルスに従い、信号電荷に応じた電気信号(撮像信号及び焦点検出用信号)として撮像素子121から順次読みだされる。 In the electronic still camera 101, a luminous flux (incident light) incident through the photographing lens 111 forms an image on the light receiving surface of each imaging element (unit pixel) 121 of the pixel array 200, and is converted into an electric signal by the imaging element 121. be. The imaging element 121 (signal generating means) is a photoelectric conversion element that photoelectrically converts a subject image (optical image) into signal charges, and is configured by a CCD or CMOS sensor. The signal charges accumulated in each photoelectric conversion element are sequentially read out from the image sensor 121 as electric signals (imaging signal and focus detection signal) corresponding to the signal charges according to the drive pulse output by the timing generator 122 .

CDS/AGC/ADコンバータ123は、撮像素子121から読み出された撮像信号及び焦点検出用信号に対し、リセットノイズを除去するための相関二重サンプリング、センサゲインの調節やデジタル化処理を施す。CDS/AGC/ADコンバータ123は、撮像信号を撮像信号処理部124に出力し、撮像面位相差方式の焦点検出用信号を焦点検出用信号処理部125に出力する。なお、本実施の形態では、焦点検出の方式として撮像面位相差方式を用いる場合について説明するが、焦点検出の方式はこれに限られず、どのような位相差方式を用いてもよい。 The CDS/AGC/AD converter 123 performs correlated double sampling for removing reset noise, sensor gain adjustment, and digitization processing on the imaging signal and focus detection signal read from the imaging device 121 . The CDS/AGC/AD converter 123 outputs the imaging signal to the imaging signal processing unit 124 and outputs the imaging plane phase difference method focus detection signal to the focus detection signal processing unit 125 . In this embodiment, a case of using an imaging plane phase difference method as a focus detection method will be described, but the focus detection method is not limited to this, and any phase difference method may be used.

焦点検出用信号処理部125は、撮像画面内における焦点検出領域の設定を行う。また、焦点検出用信号処理部125はCDS/AGC/ADコンバータ123から出力された焦点検出用の2つの像信号に対して相関演算を施し、像ずれ量、信頼性情報(二像一致度、二像急峻度)を評価し、デフォーカス量やデフォーカス量の信頼性を出力する。撮像信号処理部124は、CDS/AGC/ADコンバータ123から出力された撮像信号をバス131を介してSDRAM136に格納する。SDRAM136に格納された撮像信号は、バス131を介して表示制御部132によって読み出され、表示部133に表示される。また、撮像信号の記録を行う動作モードでは、SDRAM136に格納された撮像信号が記録媒体制御部134によって記録媒体135に記録される。 The focus detection signal processing unit 125 sets the focus detection area within the imaging screen. Further, the focus detection signal processing unit 125 performs a correlation operation on the two image signals for focus detection output from the CDS/AGC/AD converter 123, and obtains image shift amount, reliability information (degree of coincidence between two images, image steepness) is evaluated, and the defocus amount and the reliability of the defocus amount are output. The imaging signal processing unit 124 stores the imaging signal output from the CDS/AGC/AD converter 123 in the SDRAM 136 via the bus 131 . The imaging signal stored in the SDRAM 136 is read by the display control section 132 via the bus 131 and displayed on the display section 133 . Also, in the operation mode for recording the imaging signal, the imaging signal stored in the SDRAM 136 is recorded in the recording medium 135 by the recording medium control unit 134 .

ROM137はカメラ制御部141が実行する制御プログラム及び制御に必要な各種データ等を格納し、フラッシュROM138は、ユーザ設定情報等の電子スチルカメラ101の動作に関する各種設定情報等を格納する。また、第1のSW139はAFやAE等の撮影スタンバイ動作を行うためのスイッチであり、第2のSW140は第1のSW139の操作後に撮影を行うための撮影スイッチである。 The ROM 137 stores control programs executed by the camera control unit 141 and various data necessary for control, and the flash ROM 138 stores various setting information related to the operation of the electronic still camera 101 such as user setting information. The first SW 139 is a switch for performing shooting standby operations such as AF and AE, and the second SW 140 is a shooting switch for shooting after the first SW 139 is operated.

カメラ制御部141は、焦点検出用信号処理部125から出力されるデフォーカス量とデフォーカス量の信頼性に基づいてレンズ駆動量を決定する。決定されたレンズ駆動量はレンズ制御部117に伝達され、さらに、フォーカス制御部116に伝達されることにより、自動焦点調節が実現される。また、カメラ制御部141は、操作者からの指示、又は、一時的にSDRAM136に蓄積された撮像信号の大きさに基づき、撮像素子121の蓄積時間を決定する。さらに、カメラ制御部141は、同様に、CDS/AGC/ADコンバータ123のゲインの設定値やタイミングジェネレータ122の設定値を決定する。 The camera control unit 141 determines the lens drive amount based on the defocus amount output from the focus detection signal processing unit 125 and the reliability of the defocus amount. The determined lens drive amount is transmitted to the lens control unit 117 and further transmitted to the focus control unit 116, thereby realizing automatic focus adjustment. Also, the camera control unit 141 determines the accumulation time of the image sensor 121 based on an instruction from the operator or the magnitude of the imaging signal temporarily accumulated in the SDRAM 136 . Furthermore, the camera control unit 141 similarly determines the set value of the gain of the CDS/AGC/AD converter 123 and the set value of the timing generator 122 .

図2は、図1における画素アレイ200の構成を示す図である。図2において、画素アレイ200は、行列方向に配された複数の撮像素子121を有する。各撮像素子121は2つの光電変換手段としてのフォトダイオード(PD)202a、202bを有し、PD202a、202bは単一マイクロレンズ201によって覆われる。単一マイクロレンズ201は同一被写体からの入射光を互いに異なる瞳領域に通過させ、2つの異なる位相差を有する2つの像に分光する。そして、分光された同一被写体からの異なる位相差を有する2つの像がPD202a、202bへそれぞれ入射される。以下、本実施の形態では、同一被写体からの異なる位相差を有する2つの像をそれぞれA像、B像と称呼する。PD202aはA像を光電変換して信号を生成し、PD202bはB像を光電変換して信号を生成する。 FIG. 2 is a diagram showing the configuration of the pixel array 200 in FIG. 1. As shown in FIG. In FIG. 2, the pixel array 200 has a plurality of imaging elements 121 arranged in rows and columns. Each imaging element 121 has two photodiodes (PDs) 202 a and 202 b as photoelectric conversion means, and the PDs 202 a and 202 b are covered with a single microlens 201 . A single microlens 201 passes incident light from the same object through different pupil regions and separates the light into two images having two different phase differences. Then, two images having different phase differences from the same subject which are spectroscopically separated are incident on the PDs 202a and 202b, respectively. Hereinafter, in the present embodiment, two images having different phase differences from the same object will be referred to as an A image and a B image, respectively. The PD 202a photoelectrically converts the A image to generate a signal, and the PD 202b photoelectrically converts the B image to generate a signal.

次に、電子スチルカメラ101における撮影処理について説明する。図3は、図1の電子スチルカメラ101が実行する撮影処理を示すフローチャートである。図3の処理は、レンズ制御部117やカメラ制御部141がROM137等に格納された所定のプログラムに従って実行する。 Next, shooting processing in the electronic still camera 101 will be described. FIG. 3 is a flow chart showing shooting processing executed by the electronic still camera 101 in FIG. The processing in FIG. 3 is executed by the lens control unit 117 and the camera control unit 141 according to a predetermined program stored in the ROM 137 or the like.

まず、第1のSW139の状態を判別する(S301)。第1のSW139が押下されている場合(ONの場合)、S302へ進む一方、第1のSW139が押下されていない場合(OFFの場合)、S301へ戻る。次いで、後述する図8のフィルタ決定処理に備え、各種パラメータの初期化を行う(S302)。S302の処理の内容については後述する。その後、撮像信号処理部124から出力された撮像信号に基づいて、自動露出処理を行う(S303)。S303の自動露出処理では、続くオートフォーカス処理の露出条件(シャッター速度、絞り、感度)を決定する。 First, the state of the first SW 139 is determined (S301). If the first SW 139 is pressed (ON), the process proceeds to S302. If the first SW 139 is not pressed (OFF), the process returns to S301. Next, various parameters are initialized in preparation for filter determination processing in FIG. 8, which will be described later (S302). The details of the processing of S302 will be described later. After that, automatic exposure processing is performed based on the imaging signal output from the imaging signal processing unit 124 (S303). In automatic exposure processing in S303, the exposure conditions (shutter speed, aperture, sensitivity) for subsequent autofocus processing are determined.

次いで、オートフォーカス処理を行う(S304)。S304の処理の内容については後述する。その後、第2のSW140の状態を判別する(S305)。第2のSW140が押下されている場合(ONの場合)、S307に進む一方、第2のSW140が押下されていない場合(OFFの場合)、S306に進む。次いで、S306では、第1のSW139の状態を判別する。第1のSW139が押下されている場合(ON)の場合、S305に戻る一方、第1のSW139が押下されていない場合、S301に戻る。その後、撮影時の露出を決定し(S307)、さらに、本露光用の露出制御を行い(S308)、次いで、撮影動作を行い(S309)、本処理を終了する。 Next, autofocus processing is performed (S304). The details of the processing of S304 will be described later. After that, the state of the second SW 140 is determined (S305). If the second SW 140 is pressed (ON), the process proceeds to S307. If the second SW 140 is not pressed (OFF), the process proceeds to S306. Next, in S306, the state of the first SW 139 is determined. If the first SW 139 is pressed (ON), the process returns to S305. If the first SW 139 is not pressed, the process returns to S301. After that, the exposure at the time of photographing is determined (S307), exposure control for the main exposure is performed (S308), then the photographing operation is performed (S309), and this processing ends.

図4は、図3のS304におけるオートフォーカス処理を示すフローチャートである。図4では、まず、焦点検出処理を行い(S401)、デフォーカス量を検出するとともに当該デフォーカス量の信頼性を評価する。焦点検出処理の詳細については後述する。 FIG. 4 is a flowchart showing autofocus processing in S304 of FIG. In FIG. 4, focus detection processing is first performed (S401), the defocus amount is detected, and the reliability of the defocus amount is evaluated. Details of the focus detection process will be described later.

次いで、焦点検出処理で評価されたデフォーカス量の信頼性が、予め設定されている第2の信頼性閾値よりも高いか否かを判別する(S402)。デフォーカス量の信頼性が第2の信頼性閾値よりも高ければ、S403へ進み、デフォーカス量の信頼性が第2の信頼性閾値よりも高くなければ、S409へ進む。ここで、デフォーカス量の信頼性が第2の信頼性閾値よりも高くない場合とは、最終的な合焦に用いるほどには当該デフォーカス量の信頼性が高くないものの、ピント位置方向を定めるには当該デフォーカス量が十分な信頼性を有する場合に該当する。なお、ピント位置方向とは、合焦においてレンズを駆動すべき方向である。 Next, it is determined whether or not the reliability of the defocus amount evaluated in the focus detection process is higher than a preset second reliability threshold (S402). If the reliability of the defocus amount is higher than the second reliability threshold, the process proceeds to S403, and if the reliability of the defocus amount is not higher than the second reliability threshold, the process proceeds to S409. Here, the case where the reliability of the defocus amount is not higher than the second reliability threshold means that the defocus amount is not reliable enough to be used for final focusing, but the focus position direction is It corresponds to the case where the defocus amount has sufficient reliability to be defined. Note that the focus position direction is the direction in which the lens should be driven for focusing.

次いで、焦点検出処理で検出されたデフォーカス量が、予め設定されている第2のデフォーカス量閾値以下か否かを判別する(S403)。デフォーカス量が第2のデフォーカス量閾値以下であれば、S404へ進み、デフォーカス量が第2のデフォーカス量閾値以下でなければ、S408へ進む。ここで、デフォーカス量が第2のデフォーカス量閾値以下である場合とは、当該デフォーカス量に応じてフォーカスレンズ114を駆動する場合、所定回数(例えば、3回)以内の駆動で焦点深度内にフォーカスレンズ114を移動させることができる場合である。第2のデフォーカス量閾値としては、例えば、焦点深度の5倍の値が設定される。 Next, it is determined whether or not the defocus amount detected by the focus detection process is equal to or less than a preset second defocus amount threshold (S403). If the defocus amount is equal to or less than the second defocus amount threshold, the process proceeds to S404, and if the defocus amount is not equal to or less than the second defocus amount threshold, the process proceeds to S408. Here, when the defocus amount is equal to or less than the second defocus amount threshold, when the focus lens 114 is driven according to the defocus amount, the depth of focus can be reduced by driving within a predetermined number of times (for example, three times). This is the case where the focus lens 114 can be moved within. As the second defocus amount threshold, for example, a value five times the depth of focus is set.

次いで、焦点検出処理で評価されたデフォーカス量の信頼性が、予め設定されている第1の信頼性閾値よりも高いか否かを判別する(S404)。デフォーカス量の信頼性が第1の信頼性閾値よりも高ければ、S405へ進み、デフォーカス量の信頼性が第1の信頼性閾値よりも高くなければ、S408へ進む。ここで、デフォーカス量の信頼性が第1の信頼性閾値よりも高い場合とは、デフォーカス量の精度ばらつきが所定範囲内(例えば、焦点深度内)に納まる場合に該当する。 Next, it is determined whether or not the reliability of the defocus amount evaluated in the focus detection process is higher than a preset first reliability threshold (S404). If the reliability of the defocus amount is higher than the first reliability threshold, the process proceeds to S405, and if the reliability of the defocus amount is not higher than the first reliability threshold, the process proceeds to S408. Here, the case where the reliability of the defocus amount is higher than the first reliability threshold corresponds to the case where the accuracy variation of the defocus amount is within a predetermined range (for example, within the depth of focus).

次いで、焦点検出処理で検出されたデフォーカス量が、予め設定されている第1のデフォーカス量閾値以下か否かを判別する(S405)。デフォーカス量が第1のデフォーカス量閾値以下であれば、S406へ進み、デフォーカス量が第1のデフォーカス量閾値以下でなければ、S407へ進む。ここで、デフォーカス量が第1のデフォーカス量閾値以下である場合とは、焦点深度内にフォーカスレンズ114が位置する場合に該当する。その後、S406では、被写体が合焦状態にあると判断し、本処理を終了する。 Next, it is determined whether or not the defocus amount detected by the focus detection process is equal to or less than a preset first defocus amount threshold (S405). If the defocus amount is equal to or less than the first defocus amount threshold, the process proceeds to S406, and if the defocus amount is not equal to or less than the first defocus amount threshold, the process proceeds to S407. Here, the case where the defocus amount is equal to or less than the first defocus amount threshold corresponds to the case where the focus lens 114 is positioned within the depth of focus. After that, in S406, it is determined that the subject is in focus, and the process ends.

S407では、S401で検出されたデフォーカス量に相当する駆動量ほどフォーカスレンズ114を駆動させ、その後、S401へ戻る。S408では、S401で検出されたデフォーカス量に対する所定割合の駆動量ほどフォーカスレンズ114を駆動させ、その後、S401へ戻る。S408の所定割合は、デフォーカス量よりもフォーカスレンズ114の駆動量が小さくなる割合(例えば、8割)である。また、このときのフォーカスレンズ114の駆動速度は、例えば、1フレームに相当する時間でフォーカスレンズ114が移動できる距離に相当する移動速度よりも低く設定される。これにより、例えば、検出されたデフォーカス量が正しくない場合において、フォーカスレンズ114の駆動中にフォーカスレンズ114が合焦位置を越えてしまうことを防止することができる。 In S407, the focus lens 114 is driven by a drive amount corresponding to the defocus amount detected in S401, and then the process returns to S401. In S408, the focus lens 114 is driven by a drive amount of a predetermined ratio to the defocus amount detected in S401, and then the process returns to S401. The predetermined ratio in S408 is a ratio (for example, 80%) at which the drive amount of the focus lens 114 is smaller than the defocus amount. Further, the driving speed of the focus lens 114 at this time is set lower than the moving speed corresponding to the distance that the focus lens 114 can move in the time corresponding to one frame, for example. As a result, for example, when the detected defocus amount is incorrect, it is possible to prevent the focus lens 114 from exceeding the in-focus position while the focus lens 114 is being driven.

S409では、非合焦条件が満たされているか否かを判別し、非合焦条件が満たされていれば、S410へ進み、非合焦条件が満たされていなければ、S411へ進む。ここで、非合焦条件とは合焦すべき被写体が存在しないと判断される条件であり、例えば、フォーカスレンズ114が可動範囲の全てにおいて駆動されて遠側及び近側の両方のレンズ端を検出した後に初期位置に戻った場合が該当する。その後、S410では、被写体が非合焦状態にあると判断し、本処理を終了する。 In S409, it is determined whether or not the out-of-focus condition is satisfied. If the out-of-focus condition is satisfied, the process proceeds to S410, and if the out-of-focus condition is not satisfied, the process proceeds to S411. Here, the out-of-focus condition is a condition under which it is determined that there is no object to be focused. This corresponds to the case of returning to the initial position after detection. After that, in S410, it is determined that the subject is out of focus, and the process ends.

S411では、フォーカスレンズ114が遠側又は近側のレンズ端に到達したか否かを判別し、フォーカスレンズ114が遠側又は近側のレンズ端に到達していれば、S412へ進む。一方、フォーカスレンズ114が遠側又は近側のレンズ端に未だ到達していなければ、S413へ進む。S412では、フォーカスレンズ114の駆動方向を反転させ、その後、S401へ戻る。S413では、フォーカスレンズ114の駆動方向を維持し、その後、S401へ戻る。このときのフォーカスレンズ114の駆動速度としては、例えば、デフォーカス量が検出できるようになったときにフォーカスレンズ114が合焦位置を越えることがないフォーカスレンズ114の駆動速度の上限が設定される。 In S411, it is determined whether or not the focus lens 114 has reached the far side or near side lens end. If the focus lens 114 has reached the far side or near side lens end, the process proceeds to S412. On the other hand, if the focus lens 114 has not yet reached the far side or near side lens end, the process proceeds to S413. In S412, the driving direction of the focus lens 114 is reversed, and then the process returns to S401. In S413, the drive direction of the focus lens 114 is maintained, and then the process returns to S401. As the drive speed of the focus lens 114 at this time, for example, the upper limit of the drive speed of the focus lens 114 is set so that the focus lens 114 does not exceed the in-focus position when the defocus amount becomes detectable. .

図5は、図4のS401における焦点検出処理を示すフローチャートである。図5では、まず、撮像素子121の画素アレイ200において任意の範囲の焦点検出領域を設定し(S501)、焦点検出領域の各撮像素子121から焦点検出用の一対の像信号としてA像の信号及びB像の信号(二画像の信号)を取得する(S502)。 FIG. 5 is a flowchart showing focus detection processing in S401 of FIG. In FIG. 5, first, an arbitrary range of focus detection areas is set in the pixel array 200 of the image pickup device 121 (S501), and a pair of image signals for focus detection from each of the image pickup devices 121 in the focus detection region is an A image signal. and B image signals (two-image signals) are acquired (S502).

次いで、取得された各一対の像信号へ垂直方向の行加算平均処理を施す(S503)。行加算平均処理を施すことにより、各像信号におけるノイズの影響を軽減することができる。その後、行加算平均処理が施された信号から所定の周波数帯域の成分(以下、「周波数成分」という。)を抽出するフィルタ処理を行う(S504)。本実施の形態では、S504のフィルタ処理において、低域の周波数成分(第1の周波数成分)を抽出する低域フィルタ(第1のフィルタ)と、高域の周波数成分(第2の周波数成分)を抽出する高域フィルタ(第2のフィルタ)とのいずれか用いる。しかしながら、低域と高域の中間(中域)の周波数成分を抽出する中域フィルタを加え、都合、3種類のフィルタのいずれかを用いてもよい。 Next, vertical row averaging processing is performed on each pair of acquired image signals (S503). By performing the row averaging process, the influence of noise on each image signal can be reduced. After that, filter processing is performed to extract components in a predetermined frequency band (hereinafter referred to as "frequency components") from the row-averaged signal (S504). In the present embodiment, in the filtering process of S504, a low-pass filter (first filter) for extracting a low-frequency component (first frequency component) and a high-frequency component (second frequency component) and a high-pass filter (second filter) that extracts . However, for convenience, any one of the three types of filters may be used by adding a mid-range filter for extracting a frequency component in the middle (middle range) between the low range and the high range.

次いで、フィルタ処理によって取得された信号から相関量を算出し(S505)、算出された相関量から相関変化量を算出し(S506)、さらに、算出された相関変化量から像ずれ量を算出する(S507)。その後、算出された像ずれ量に変換係数を乗算してデフォーカス量を算出する(S508)。変換係数は、ズームレンズの位置、絞り値や撮像面の像高に応じて予め設定され、電子スチルカメラ101が保持している。 Next, the amount of correlation is calculated from the signal acquired by the filtering process (S505), the amount of correlation change is calculated from the calculated amount of correlation (S506), and the amount of image shift is calculated from the calculated amount of correlation change. (S507). Thereafter, the defocus amount is calculated by multiplying the calculated image shift amount by the conversion coefficient (S508). The conversion coefficient is set in advance according to the position of the zoom lens, the aperture value, and the image height of the imaging plane, and is held by the electronic still camera 101 .

次いで、算出されたデフォーカス量がどれだけ信頼できるのかを示す信頼性を評価し(S509)、全てのフィルタ(低域フィルタと高域フィルタ)についてデフォーカス量の信頼性を評価したか否かを判別する(S510)。全てのフィルタについてデフォーカス量の信頼性を評価した場合、S512へ進む一方、全てのフィルタについてデフォーカス量の信頼性を評価していない場合、S511に進む。S511では、処理に用いるフィルタを、それまでにデフォーカス量の信頼性の評価に用いていないフィルタへ変更し(S511)、その後、S504へ戻る。 Next, the reliability indicating how reliable the calculated defocus amount is is evaluated (S509), and whether or not the reliability of the defocus amount is evaluated for all filters (low-pass filter and high-pass filter). is determined (S510). If the reliability of the defocus amount has been evaluated for all filters, the process advances to S512. If the reliability of the defocus amount has not been evaluated for all the filters, the process advances to S511. In S511, the filter used in the process is changed to a filter that has not been used in evaluating the reliability of the defocus amount (S511), and then the process returns to S504.

S512では、S504で用いたフィルタから、フォーカスレンズ駆動量の変換に用いるデフォーカス量を算出するためのフィルタを決定する。その後、本処理を終了する。 In S512, a filter for calculating the defocus amount used for conversion of the focus lens drive amount is determined from the filters used in S504. After that, this process is terminated.

ところで、図6(A)に示すように、例えば、表示部133に映し出されるライブビュー画像601において、焦点検出領域602内に複数の被写体である花の画像603と犬の画像604が存在する場合を考える。このとき、花の画像603の方が犬の画像604よりも合焦状態に近いと、焦点検出領域602内の任意の行の水平成分を示す像信号として図6(B)に示すような入力信号611が得られる。入力信号611の左半分は合焦状態に近い花の画像603に該当し、花の画像603の詳細形状(例えば、花びら)の成分に該当する比較的細かく変動する信号が現れる。また、入力信号611の右半分は合焦状態から遠い犬の画像604に該当し、犬の画像604の全体の形状の成分に該当する比較的大まかに変動する信号が現れる。 By the way, as shown in FIG. 6A, for example, in a live view image 601 displayed on the display unit 133, when an image 603 of a flower and an image 604 of a dog, which are a plurality of subjects, exist within a focus detection area 602. think of. At this time, if the flower image 603 is closer to the focused state than the dog image 604, the image signal representing the horizontal component of any row in the focus detection area 602 is input as shown in FIG. A signal 611 is obtained. The left half of the input signal 611 corresponds to a flower image 603 that is close to being in focus, and a relatively finely fluctuating signal corresponding to the components of the detailed shape (for example, petals) of the flower image 603 appears. The right half of the input signal 611 corresponds to the far-out-of-focus dog image 604, and a relatively roughly fluctuating signal corresponding to the overall shape component of the dog image 604 appears.

入力信号611へ低域フィルタを用いてフィルタ処理を施すと、入力信号611から合焦状態に近い花の画像603の詳細形状に該当する成分が除去され、花の画像603や犬の画像604の全体の形状の成分を主に含む低域成分612が抽出される。一方、入力信号611へ高域フィルタを用いてフィルタ処理を施すと、入力信号611から花の画像603や犬の画像604の全体の形状に該当する成分が除去される。その結果、被写体の詳細形状の成分、特に図6(B)では花の画像603の詳細形状の成分を主に含む高域成分613が抽出される。 When the input signal 611 is filtered using a low-pass filter, the component corresponding to the detailed shape of the flower image 603 close to the focused state is removed from the input signal 611, and the flower image 603 and the dog image 604 are removed. A low frequency component 612 that mainly contains the overall shape component is extracted. On the other hand, when the input signal 611 is filtered using a high-pass filter, components corresponding to the overall shapes of the flower image 603 and the dog image 604 are removed from the input signal 611 . As a result, a high-frequency component 613 that mainly includes the detailed shape component of the subject, particularly the detailed shape component of the flower image 603 in FIG. 6B, is extracted.

したがって、低域フィルタを用いると、花の画像603や犬の画像604へ大まかに合焦できる反面、いずれかの被写体へ高精度に合焦するのは困難である。一方、高域フィルタを用いると、いずれかの被写体、特に図6(B)では花の画像603へ高精度に合焦することができる。そこで、従来の合焦方法では、まず、低域フィルタを用いて抽出された低域成分612のデフォーカス量を用いて大まかな合焦を行い、その後、高域フィルタを用いて抽出された高域成分613のデフォーカス量を用いて高精度な合焦を最終的に行う。 Therefore, the use of the low-pass filter makes it possible to roughly focus on the flower image 603 and the dog image 604, but it is difficult to precisely focus on any subject. On the other hand, if a high-pass filter is used, it is possible to precisely focus on any subject, especially the flower image 603 in FIG. 6B. Therefore, in the conventional focusing method, first, rough focusing is performed using the defocus amount of the low-pass component 612 extracted using the low-pass filter, and then the high-pass filter extracted using the high-pass filter. High-precision focusing is finally performed using the defocus amount of the area component 613 .

図7は、通常の合焦について説明するためのグラフである。図7において、縦軸はデフォーカス量を示し、横軸はフォーカスレンズ114の位置(以下、単に「フォーカスレンズ位置」という。)を示す。 FIG. 7 is a graph for explaining normal focusing. In FIG. 7, the vertical axis indicates the defocus amount, and the horizontal axis indicates the position of the focus lens 114 (hereinafter simply referred to as "focus lens position").

図7では、低域フィルタを用いて算出されたデフォーカス量とフォーカスレンズ位置の関係701と、高域フィルタを用いて算出されたデフォーカス量とフォーカスレンズ位置の関係702とが示される。 FIG. 7 shows a relationship 701 between the defocus amount calculated using the low-pass filter and the focus lens position, and a relationship 702 between the defocus amount calculated using the high-pass filter and the focus lens position.

上述したように、低域フィルタを用いると、花の画像603や犬の画像604へ大まかに合焦できる。したがって、関係701において、低域フィルタを用いて算出されたデフォーカス量(以下、「低域デフォーカス量」という。)(第1のデフォーカス量)が「0」となるフォーカスレンズ位置704は、花の画像603と犬の画像604の中間が合焦状態となる位置である。 As mentioned above, the low pass filter allows the flower image 603 and the dog image 604 to be roughly focused. Therefore, in the relationship 701, the focus lens position 704 at which the defocus amount calculated using the low-pass filter (hereinafter referred to as "low-pass defocus amount") (first defocus amount) is "0" is , the center between the flower image 603 and the dog image 604 is the in-focus position.

また、高域フィルタを用いると、各被写体へ高精度に合焦することができる。したがって、関係702において、高域フィルタを用いて算出されたデフォーカス量(以下、「高域デフォーカス量」という。)(第2のデフォーカス量)が「0」となるフォーカスレンズ位置703は花の画像603が合焦状態となる位置である。また、関係702において、高域デフォーカス量が「0」となる他のフォーカスレンズ位置705は犬の画像604が合焦状態となる位置である。なお、関係702も、フォーカスレンズ位置704において「0」となる。 Also, by using a high-pass filter, each subject can be focused with high accuracy. Therefore, in the relationship 702, the focus lens position 703 at which the defocus amount calculated using the high-pass filter (hereinafter referred to as "high-frequency defocus amount") (second defocus amount) is "0" is This is the position where the flower image 603 is in focus. In the relationship 702, another focus lens position 705 at which the high-frequency defocus amount is "0" is a position where the dog image 604 is in focus. Note that the relationship 702 also becomes “0” at the focus lens position 704 .

従来の合焦方法では、上述したように、まず、低域フィルタを用いて抽出された低域成分612のデフォーカス量を用いて大まかな合焦を行い、その後、高域フィルタを用いて抽出された高域成分613のデフォーカス量を用いて高精度な合焦を最終的に行う。 In the conventional focusing method, as described above, first, rough focusing is performed using the defocus amount of the low-pass component 612 extracted using the low-pass filter, and then extraction is performed using the high-pass filter. High-precision focusing is finally performed using the defocus amount of the high-frequency component 613 thus obtained.

次に、図7において、従来の合焦方法を用い、最初にフォーカスレンズ位置710においてS401の焦点検出処理を行う場合について説明する。焦点検出処理では、上述したように、低域フィルタを用いて低域デフォーカス量が算出され、高域フィルタを用いて高域デフォーカス量が算出される。ここで、フォーカスレンズ位置710(関係701における点706)の低域デフォーカス量はdef1であり、フォーカスレンズ位置710(関係702における点709)の高域デフォーカス量はdef3である。 Next, referring to FIG. 7, the case where the conventional focusing method is used and the focus detection processing of S401 is first performed at the focus lens position 710 will be described. In the focus detection process, as described above, the low-pass defocus amount is calculated using the low-pass filter, and the high-pass defocus amount is calculated using the high-pass filter. Here, the low-frequency defocus amount at the focus lens position 710 (point 706 in the relationship 701) is def1, and the high-frequency defocus amount at the focus lens position 710 (point 709 in the relationship 702) is def3.

従来の合焦方法では、低域デフォーカス量と高域デフォーカス量の差(def1-def3)が所定値よりも大きい場合、まず、低域デフォーカス量を用いて大まかな合焦を行う。具体的には、低域デフォーカス量が小さくなるようにフォーカスレンズ114を駆動する。 In the conventional focusing method, when the difference (def1-def3) between the low-frequency defocus amount and the high-frequency defocus amount is larger than a predetermined value, first, rough focusing is performed using the low-frequency defocus amount. Specifically, the focus lens 114 is driven so that the low-frequency defocus amount becomes small.

その後、フォーカスレンズ114がフォーカスレンズ位置711(関係701における点707、関係702における点708)まで駆動されると、低域デフォーカス量はdef2に変化し、高域デフォーカス量はdef4に変化する。ここで、低域デフォーカス量と高域デフォーカス量の差(def2-def4)が所定値以下となった場合、従来の合焦方法では、その後、高域デフォーカス量を用いて大まかな合焦を行う。具体的には、高域デフォーカス量が小さくなるようにフォーカスレンズ114を駆動する。高域デフォーカス量が小さくなるようにフォーカスレンズ114を駆動する場合、図7では、フォーカスレンズ114をフォーカスレンズ位置704へ向けて駆動するか、フォーカスレンズ位置703へ向けて駆動するかのいずれかが考えられる。しかしながら、上述したように、フォーカスレンズ位置704は、花の画像603と犬の画像604の中間が合焦状態となる位置であるため、フォーカスレンズ114はフォーカスレンズ位置703へ向けて駆動される。 After that, when the focus lens 114 is driven to the focus lens position 711 (the point 707 in the relationship 701 and the point 708 in the relationship 702), the low-frequency defocus amount changes to def2, and the high-frequency defocus amount changes to def4. . Here, when the difference between the low-frequency defocus amount and the high-frequency defocus amount (def2-def4) is equal to or less than a predetermined value, the conventional focusing method can then perform rough alignment using the high-frequency defocus amount. do the charcoal. Specifically, the focus lens 114 is driven so that the high-frequency defocus amount becomes small. When driving the focus lens 114 so as to reduce the high-frequency defocus amount, in FIG. 7, the focus lens 114 is driven either toward the focus lens position 704 or toward the focus lens position 703. can be considered. However, as described above, since the focus lens position 704 is a position where the center between the flower image 603 and the dog image 604 is in focus, the focus lens 114 is driven toward the focus lens position 703 .

その後、フォーカスレンズ114がフォーカスレンズ位置710(関係701における点706、関係702における点709)まで駆動されると、低域デフォーカス量と高域デフォーカス量の差(def1-def3)が所定値よりも大きくなる。その場合、従来の合焦方法では、再び、低域デフォーカス量を用いて大まかな合焦を行う。 After that, when the focus lens 114 is driven to the focus lens position 710 (the point 706 in the relationship 701 and the point 709 in the relationship 702), the difference (def1-def3) between the low-frequency defocus amount and the high-frequency defocus amount becomes a predetermined value. be larger than In that case, the conventional focusing method performs rough focusing again using the low-frequency defocus amount.

すなわち、従来の合焦方法では、撮影画像に複数の被写体が含まれ、一方の被写体がより合焦状態に近い場合(いわゆる、「遠近競合」が発生する場合)、合焦において、低域デフォーカス量を用いる合焦と、高域デフォーカス量を用いる合焦とが繰り返される。その結果、最終的な合焦状態に至らず、いずれかの被写体の位置が変化するまで、フォーカスレンズ114が駆動され続け、短時間に合焦を行うことができない。本実施の形態では、これに対応して、低域デフォーカス量を用いる合焦と高域デフォーカス量を用いる合焦との繰り返しを抑制する。 That is, in the conventional focusing method, when a photographed image includes a plurality of subjects and one of the subjects is closer to being in focus (when so-called "far and near competition" occurs), low-frequency defocusing is performed during focusing. Focusing using the focus amount and focusing using the high-frequency defocus amount are repeated. As a result, the final focused state is not achieved, and the focus lens 114 continues to be driven until the position of any subject changes, making it impossible to focus for a short period of time. In this embodiment, in response to this, repetition of focusing using the low-frequency defocus amount and focusing using the high-frequency defocus amount is suppressed.

図8は、本実施の形態に係る撮像装置の制御方法としてのフィルタ決定処理を示すフローチャートである。図8の処理は、上述したように、図5の焦点検出処理のS512において実行される。 FIG. 8 is a flow chart showing filter determination processing as a control method for the imaging apparatus according to the present embodiment. The processing in FIG. 8 is executed in S512 of the focus detection processing in FIG. 5, as described above.

図8において、まず、フラグENKIN_FLAGがTRUEかFALSEかを判別する(S801)。フラグENKIN_FLAGは、遠近競合が発生しているか否かを示すフラグであり、TRUEであれば、遠近競合が発生していることを示し、FALSEであれば、遠近競合が発生していないことを示す。フラグENKIN_FLAGがFALSEであると判別された場合、S802に進む。 In FIG. 8, first, it is determined whether the flag ENKIN_FLAG is TRUE or FALSE (S801). The flag ENKIN_FLAG is a flag indicating whether or not a near-far conflict has occurred. If it is TRUE, it indicates that a near-far conflict has occurred. If it is FALSE, it indicates that a near-far conflict has not occurred. . If it is determined that the flag ENKIN_FLAG is FALSE, the process proceeds to S802.

次いで、S802では、合焦に低域デフォーカス量を用いるか、高域デフォーカス量を用いるかを選択するフィルタ選択処理を行う。フィルタ選択処理の詳細は後述する。その後、フィルタ選択処理においていずれのデフォーカス量、すなわち、合焦に用いるデフォーカス量を算出するためにいずれのフィルタが選択されたかの選択履歴(履歴情報)をSDRAM136(保持手段)に保持する(S803)。 Next, in S802, filter selection processing for selecting whether to use the low-frequency defocus amount or the high-frequency defocus amount for focusing is performed. Details of the filter selection process will be described later. After that, in the filter selection process, the selection history (history information) of which filter was selected to calculate the defocus amount used for focusing is held in the SDRAM 136 (holding means) (S803). ).

図9は、図8のS803において保持される選択履歴のデータ構造を示す図である。本実施の形態では、図9(A)に示すデータ構造901と図9(B)に示すデータ構造902のいずれを用いてもよい。データ構造901では、過去N回ほどフィルタ選択処理が実行された際に、各フィルタ選択処理が実行される度に当該フィルタ選択処理において選択されたフィルタが履歴データとして保持される。なお、データ構造901では、高域フィルタが「HIGH_FILTER」で示され、低域フィルタが「LOW_FILTER」で示される。 FIG. 9 is a diagram showing the data structure of the selection history held in S803 of FIG. In this embodiment, either the data structure 901 shown in FIG. 9A or the data structure 902 shown in FIG. 9B may be used. In the data structure 901, when the filter selection process has been executed N times in the past, the filter selected in the filter selection process is held as history data each time the filter selection process is executed. Note that in data structure 901, the high pass filter is indicated by "HIGH_FILTER" and the low pass filter is indicated by "LOW_FILTER".

また、データ構造902では、過去N回ほどフィルタ選択処理が実行された際に、今回のフィルタ選択処理において選択されたフィルタが、前回のフィルタ選択処理において選択されたフィルタと同じか否かが履歴データとして保持される。なお、データ構造902では、前回のフィルタ選択処理において選択されたフィルタと同じである場合が「SAME_FILTER」で示され、前回のフィルタ選択処理において選択されたフィルタと異なる場合が「SWITCH_FILTER」で示される。 Also, in the data structure 902, when the filter selection process has been executed about N times in the past, whether or not the filter selected in the current filter selection process is the same as the filter selected in the previous filter selection process is stored in the history. Retained as data. In the data structure 902, "SAME_FILTER" indicates that the filter is the same as the filter selected in the previous filter selection process, and "SWITCH_FILTER" indicates that it is different from the filter selected in the previous filter selection process. .

以下、本実施の形態では、データ構造901を用いる場合について説明する。なお、データ構造901やデータ構造902では、保持される履歴データの個数がN個より多くなると、最新の履歴データをN番目の履歴データとして保持し、他の履歴データの順番を1つずつ減じ、再過去の履歴データを削除する。 In this embodiment, the case where the data structure 901 is used will be described below. Note that in the data structures 901 and 902, when the number of history data to be held exceeds N, the latest history data is held as the N-th history data, and the order of the other history data is decremented by one. , re-delete past historical data.

図8に戻り、データ構造901が保持する履歴データの個数がN(Nは自然数)以上であるか否かを判別する(S804)。保持する履歴データの個数がN未満である場合、遠近競合が発生しているか否かを判別するための情報が十分に揃っていないと判断し、フィルタ決定処理を終了する。保持する履歴データの個数がN以上である場合、S805に進み、フィルタの切り替わりを確認する。具体的には、データ構造901を参照し、一のフィルタ選択処理において選択されたフィルタが続くフィルタ選択処理において変更されているか否かを確認する。例えば、データ構造901のK-1番目の履歴データとK番目の履歴データを比較する。なお、2≦K≦Nである。これにより、過去N回ほどフィルタ選択処理においてフィルタが切り替わった回数をカウントする。 Returning to FIG. 8, it is determined whether or not the number of pieces of history data held by the data structure 901 is N (N is a natural number) or more (S804). If the number of pieces of history data to be held is less than N, it is determined that there is not enough information for determining whether or not a near-far conflict has occurred, and the filter determination process ends. If the number of history data to be held is N or more, the process advances to S805 to confirm filter switching. Specifically, the data structure 901 is referenced to check whether the filter selected in one filter selection process is changed in the subsequent filter selection process. For example, the K−1th history data and the Kth history data in the data structure 901 are compared. Note that 2≦K≦N. As a result, the number of times the filter has been switched in the filter selection process for the past N times is counted.

次いで、S806において、カウントしたフィルタ切り替わり回数が所定値以上であるか否かを判別する。カウントしたフィルタ切り替わり回数が所定値以上である場合、遠近競合が発生していると判別し、フラグENKIN_FLAGにTRUEを設定する(S807)。一方、カウントしたフィルタ切り替わり回数が所定値より少ない場合、遠近競合が発生していないと判別し、フィルタ決定処理を終了する。 Next, in S806, it is determined whether or not the counted number of times of filter switching is equal to or greater than a predetermined value. If the counted number of filter switching times is equal to or greater than a predetermined value, it is determined that a near-far conflict is occurring, and the flag ENKIN_FLAG is set to TRUE (S807). On the other hand, if the counted number of filter switching times is less than the predetermined value, it is determined that near-far conflict has not occurred, and the filter determination process is terminated.

S801において、フラグENKIN_FLAGがTRUEであり、遠近競合が発生していると判別された場合、S808に進む。S808では高域フィルタの信頼性を判別する。具体的には、高域デフォーカス量の信頼性が所定値以上であり、且つ、高域デフォーカス量が所定値以下であるか否かを判別する。 If it is determined in S801 that the flag ENKIN_FLAG is TRUE and near-far conflict is occurring, the process proceeds to S808. In S808, the reliability of the high-pass filter is determined. Specifically, it is determined whether the reliability of the high-frequency defocus amount is equal to or greater than a predetermined value and whether the high-frequency defocus amount is equal to or less than a predetermined value.

高域デフォーカス量の信頼性が所定値以上であり、且つ、高域デフォーカス量が所定値以下である場合、高域フィルタの信頼性があると判別し、最終的に行う合焦に用いるデフォーカス量として、高域デフォーカス量を選択する(S809)。その後、フィルタ決定処理を終了する。一方、高域デフォーカス量の信頼性が所定値未満であるか、若しくは、高域デフォーカス量が所定値より大きい場合、高域フィルタの信頼性が無いと判別し、最終的に行う合焦に用いるデフォーカス量として、低域デフォーカス量を選択する(S810)。その後、フィルタ決定処理を終了する。 When the reliability of the high-frequency defocus amount is equal to or higher than a predetermined value and the high-frequency defocus amount is equal to or lower than the predetermined value, it is determined that the high-pass filter is reliable and used for final focusing. A high-frequency defocus amount is selected as the defocus amount (S809). After that, the filter determination process is terminated. On the other hand, if the reliability of the high-frequency defocus amount is less than the predetermined value, or if the high-frequency defocus amount is greater than the predetermined value, it is determined that the high-pass filter is unreliable, and final focusing is performed. A low-frequency defocus amount is selected as the defocus amount used for (S810). After that, the filter determination process is terminated.

なお、上述したS302の各種パラメータの初期化では、フラグENKIN_FLAGが初期化されてフラグENKIN_FLAGにFALSEが設定されるとともに、データ構造901も初期化される。 Note that in the initialization of various parameters in S302 described above, the flag ENKIN_FLAG is initialized to set FALSE, and the data structure 901 is also initialized.

図10は、図8のS802におけるフィルタ選択処理を示すフローチャートである。図10において、まず、低域デフォーカス量と高域デフォーカス量の差(以下、「デフォーカス量差」という。)を算出し、当該差が閾値以下か否かを判別する(S1001)。デフォーカス量差が閾値以下である場合、高域デフォーカス量の信頼性を判別する(S1002)。 FIG. 10 is a flowchart showing filter selection processing in S802 of FIG. In FIG. 10, first, the difference between the low-frequency defocus amount and the high-frequency defocus amount (hereinafter referred to as "defocus amount difference") is calculated, and it is determined whether or not the difference is equal to or less than a threshold value (S1001). If the defocus amount difference is equal to or less than the threshold, the reliability of the high-frequency defocus amount is determined (S1002).

S1002では、具体的に、高域デフォーカス量の信頼性が低域デフォーカス量の信頼性以上であり、且つ、高域デフォーカス量の信頼性が不可レベルで無いかを判別する。高域デフォーカス量の信頼性が低域デフォーカス量の信頼性以上であり、且つ、高域デフォーカス量の信頼性が不可レベルで無い場合、合焦に用いるデフォーカス量として高域デフォーカス量を選択する(S1003)。一方、低域デフォーカス量の信頼性に対して高域デフォーカス量の信頼性が同等未満であるか、若しくは、高域デフォーカス量の信頼性が不可レベルである場合、合焦に用いるデフォーカス量として低域デフォーカス量を選択する(S1004)。その後、フィルタ選択処理を終了する。 Specifically, in S1002, it is determined whether or not the reliability of the high-frequency defocus amount is higher than or equal to the reliability of the low-frequency defocus amount and the reliability of the high-frequency defocus amount is not at the impossible level. If the reliability of the high-range defocus amount is greater than or equal to the reliability of the low-range defocus amount, and the reliability of the high-range defocus amount is not at the impossible level, the high-range defocus amount is used for focusing. Quantity is selected (S1003). On the other hand, if the reliability of the high-frequency defocus amount is less than the same as the reliability of the low-frequency defocus amount, or if the reliability of the high-frequency defocus amount is at an impossible level, the defocus used for focusing A low-frequency defocus amount is selected as the focus amount (S1004). After that, the filter selection process ends.

本実施の形態では、撮影画像に複数の被写体が含まれる場合、フォーカスレンズ114を駆動しながら合焦を行うが、この合焦では、例えば、フォーカスレンズ114が所定量ほど移動する度に、図4のオートフォーカス処理が実行される。図4のオートフォーカス処理が実行される度に、図8のフィルタ決定処理が実行され、フィルタ切り替わり回数が閾値未満の場合、デフォーカス量差に応じて合焦に用いられるデフォーカス量が変更される。一方、フィルタ切り替わり回数が閾値以上となった以降、デフォーカス量差が閾値未満から閾値以上に変化し、若しくは閾値以上から閾値未満に変化しても、S802のフィルタ選択処理が実行されず、合焦に用いられるデフォーカス量が変更されない。すなわち、合焦に用いるデフォーカス量の選択方法が変更され、図7の点706~709で示される、低域デフォーカス量を用いる合焦と、高域デフォーカス量を用いる合焦との繰り返しが発生しない。これにより、フォーカスレンズ114が駆動され続けるのを防止し、短時間に合焦を行うことができる。 In the present embodiment, when a photographed image includes a plurality of subjects, focusing is performed while driving the focus lens 114. In this focusing, for example, each time the focus lens 114 moves by a predetermined amount, 4 autofocus processing is executed. Each time the autofocus process of FIG. 4 is executed, the filter determination process of FIG. 8 is executed, and if the number of filter switching times is less than the threshold, the defocus amount used for focusing is changed according to the defocus amount difference. be. On the other hand, even if the defocus amount difference changes from less than the threshold to more than the threshold after the number of times of filter switching becomes equal to or more than the threshold, or changes from more than the threshold to less than the threshold, the filter selection process of S802 is not executed. The defocus amount used for focus is not changed. That is, the method of selecting the defocus amount used for focusing is changed, and the repetition of focusing using the low-range defocus amount and focusing using the high-range defocus amount, indicated by points 706 to 709 in FIG. does not occur. This prevents the focus lens 114 from being continuously driven, and allows focusing in a short period of time.

なお、S806で用いられるフィルタ切り替わり回数の閾値は、電子スチルカメラ101の撮像状態に応じて変更されてもよい。例えば、当該閾値が小さい場合、フィルタ切り替わり回数が低下するが、電子スチルカメラ101が合焦状態を得にくい場合、フィルタ切り替わり回数が低下すると、余り適切でないデフォーカス量に基づいて最終的な合焦が行われるおそれがある。そこで、電子スチルカメラ101が合焦状態を得にくい場合、カメラ制御部141はフィルタ切り替わり回数の閾値を大きくし、フィルタ切り替わり回数が必要以上に少なくなるのを防止する。例えば、被写体の画像の輝度が所定値以下である場合、被写体の画像のコントラストが所定値以下である場合や撮像素子121が一対の像信号を生成する際の絞り値が所定値よりも小さい場合、カメラ制御部141はフィルタ切り替わり回数の閾値を大きくする。また、例えば、撮影画像における焦点検出領域が光軸中心から所定量以上離れている場合や被写体が動体である場合にも、カメラ制御部141はフィルタ切り替わり回数の閾値を大きくする。 Note that the threshold for the number of filter switching times used in S<b>806 may be changed according to the imaging state of the electronic still camera 101 . For example, when the threshold value is small, the number of filter switching times decreases. is likely to occur. Therefore, when it is difficult for the electronic still camera 101 to obtain an in-focus state, the camera control unit 141 increases the threshold for the number of filter switching times to prevent the number of filter switching times from becoming smaller than necessary. For example, when the brightness of the subject image is less than or equal to a predetermined value, when the contrast of the subject image is less than or equal to a predetermined value, or when the aperture value when the imaging device 121 generates a pair of image signals is smaller than a predetermined value. , the camera control unit 141 increases the threshold for the number of filter switching times. Also, for example, when the focus detection area in the captured image is away from the center of the optical axis by a predetermined amount or more, or when the subject is a moving object, the camera control unit 141 increases the threshold for the number of filter switching times.

次に、本発明の第2の実施の形態について説明する。第2の実施の形態は、その構成、作用が上述した第1の実施の形態と基本的に同じであるので、重複した構成、作用については説明を省略し、以下に異なる構成、作用についての説明を行う。第2の実施の形態では、遠近競合が発生しているか否かに応じて、デフォーカス量差の閾値を変更するとともに、フィルタ切り替わり回数が閾値以上となったとしても、フィルタ選択処理をスキップしない点で第1の実施の形態と異なる。 Next, a second embodiment of the invention will be described. The second embodiment is basically the same as the above-described first embodiment in terms of its configuration and action, so the duplicated configuration and action will be omitted, and the different configuration and action will be described below. Give an explanation. In the second embodiment, the threshold value of the defocus amount difference is changed depending on whether or not the near-far conflict occurs, and even if the number of filter switching times exceeds the threshold value, the filter selection process is not skipped. It differs from the first embodiment in that respect.

図11は、本実施の形態における撮像装置の制御方法としてのフィルタ決定処理を示すフローチャートである。図11の処理も、図8の処理と同様に、図5の焦点検出処理のS512において実行される。 FIG. 11 is a flow chart showing filter determination processing as a control method of the imaging apparatus according to the present embodiment. The process of FIG. 11 is also executed in S512 of the focus detection process of FIG. 5, like the process of FIG.

図11において、まず、フラグENKIN_FLAGがTRUEかFALSEかを判別する(S801)。フラグENKIN_FLAGがFALSEであると判別された場合、デフォーカス量差の閾値(基準)をTH1に設定してS802へ進む(S1101)。一方、フラグENKIN_FLAGがTRUEであると判別された場合、デフォーカス量差の閾値(基準)をTH2に設定してS802へ進む(S1102)。本実施の形態では、閾値TH1<閾値TH2の関係が設定される。すなわち、遠近競合が発生している場合、合焦において高域デフォーカス量が優先的に用いられる。これにより、合焦を高精度に行うことができる。また、遠近競合が発生している場合、高域フィルタから低域フィルタへの切り替えが抑制されるため、結果として、フォーカスレンズ114が駆動され続けるのを抑制し、短時間に合焦を行うことができる。 In FIG. 11, first, it is determined whether the flag ENKIN_FLAG is TRUE or FALSE (S801). If it is determined that the flag ENKIN_FLAG is FALSE, the threshold (reference) of the defocus amount difference is set to TH1, and the process proceeds to S802 (S1101). On the other hand, if it is determined that the flag ENKIN_FLAG is TRUE, the threshold (reference) of the defocus amount difference is set to TH2, and the process proceeds to S802 (S1102). In the present embodiment, a relationship of threshold TH1<threshold TH2 is set. That is, when a near-far conflict occurs, the high-frequency defocus amount is preferentially used in focusing. Thereby, focusing can be performed with high precision. Further, when a near-far conflict occurs, switching from the high-pass filter to the low-pass filter is suppressed. As a result, continuous driving of the focus lens 114 is suppressed, and focusing can be performed in a short time. can be done.

以上、本発明の好ましい実施の形態について説明したが、本発明は上述した実施の形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、本発明は、上述の実施の形態の1以上の機能を実現するプログラムを、ネットワークや記憶媒体を介してシステムや装置に供給し、そのシステム又は装置のコンピュータの1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Although preferred embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various modifications and changes are possible within the scope of the gist thereof. For example, the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors of a computer of the system or device executes the program. It is also possible to implement the process of reading and executing the The invention can also be implemented by a circuit (eg, an ASIC) that implements one or more functions.

101 電子スチルカメラ
117 レンズ制御部
121 撮像素子
141 カメラ制御部
202a,202b フォトダイオード
901,902 データ構造
101 Electronic still camera 117 Lens control unit 121 Image sensor 141 Camera control units 202a, 202b Photodiodes 901, 902 Data structure

Claims (16)

フォーカスレンズの互いに異なる瞳領域を通過した被写体からの一対の光束のそれぞれに対応する二画像の信号を生成する信号生成手段と、
前記二画像から第1の周波数成分の信号を抽出する第1のフィルタ及び前記二画像から前記第1の周波数成分よりも高域の周波数成分である第2の周波数成分の信号を抽出する第2のフィルタを有する信号抽出手段と、
前記第1のフィルタによって前記二画像から抽出された信号の位相差に基づいて第1のデフォーカス量を算出するとともに、前記第2のフィルタによって前記二画像から抽出された信号の位相差に基づいて第2のデフォーカス量を算出するデフォーカス量算出手段と、
前記第1のデフォーカス量及び前記第2のデフォーカス量の差に基づいて、前記第1のデフォーカス量及び前記第2のデフォーカス量のいずれかを合焦に用いるデフォーカス量として選択する選択手段と、
前記合焦に用いるデフォーカス量が、前記第1のデフォーカス量から前記第2のデフォーカス量へ、又は前記第2のデフォーカス量から前記第1のデフォーカス量へ切り替わった切り替わり回数を確認する確認手段と、を備え、
前記切り替わり回数が所定の閾値以上である場合、前記選択手段は前記合焦に用いるデフォーカス量の選択方法を変更することを特徴とする撮像装置。
signal generating means for generating signals of two images respectively corresponding to a pair of light beams from a subject that have passed through mutually different pupil regions of a focus lens;
A first filter for extracting a signal of a first frequency component from the two images, and a second filter for extracting a signal of a second frequency component, which is a higher frequency component than the first frequency component, from the two images. a signal extraction means having a filter of
A first defocus amount is calculated based on the phase difference between the signals extracted from the two images by the first filter, and based on the phase difference between the signals extracted from the two images by the second filter. defocus amount calculation means for calculating a second defocus amount by
Either the first defocus amount or the second defocus amount is selected as a defocus amount to be used for focusing based on a difference between the first defocus amount and the second defocus amount. a selection means;
Checking the number of times the defocus amount used for focusing is switched from the first defocus amount to the second defocus amount or from the second defocus amount to the first defocus amount. and a confirmation means for
The image pickup apparatus, wherein the selection means changes a selection method of the defocus amount used for the focusing when the number of times of switching is equal to or greater than a predetermined threshold.
前記第2のデフォーカス量の信頼性が前記第1のデフォーカス量の信頼性以上であり、且つ前記第1のデフォーカス量及び前記第2のデフォーカス量の差が所定値以下である場合、前記選択手段は、前記第2のデフォーカス量を前記合焦に用いるデフォーカス量として選択することを特徴とする請求項1に記載の撮像装置。 When the reliability of the second defocus amount is equal to or higher than the reliability of the first defocus amount, and the difference between the first defocus amount and the second defocus amount is equal to or less than a predetermined value. 2. The imaging apparatus according to claim 1, wherein said selection means selects said second defocus amount as the defocus amount used for said focusing. 前記切り替わり回数が所定の閾値以上であって、前記第2のデフォーカス量の信頼性が所定値以上であり、且つ前記第2のデフォーカス量が所定値以下である場合、前記選択手段は、前記第2のデフォーカス量を前記合焦に用いるデフォーカス量として選択することを特徴とする請求項1又は2に記載の撮像装置。 When the number of times of switching is equal to or greater than a predetermined threshold, the reliability of the second defocus amount is equal to or greater than a predetermined value, and the second defocus amount is equal to or less than a predetermined value, the selecting means 3. The imaging apparatus according to claim 1, wherein the second defocus amount is selected as the defocus amount used for the focusing. 前記切り替わり回数が所定の閾値以上であって、前記第2のデフォーカス量の信頼性が所定値未満であるか、若しくは、前記第2のデフォーカス量が所定値より大きい場合、前記選択手段は、前記第1のデフォーカス量を前記合焦に用いるデフォーカス量として選択することを特徴とする請求項1乃至3のいずれか1項に記載の撮像装置。 If the number of times of switching is equal to or greater than a predetermined threshold and the reliability of the second defocus amount is less than a predetermined value, or if the second defocus amount is greater than a predetermined value, the selecting means 4. The imaging apparatus according to any one of claims 1 to 3, wherein said first defocus amount is selected as a defocus amount used for said focusing. 合焦を行う前に、前記合焦に用いるデフォーカス量の選択に関する履歴情報を初期化する初期化手段をさらに備えることを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。 5. The imaging apparatus according to any one of claims 1 to 4, further comprising initialization means for initializing history information regarding selection of a defocus amount used for said focusing before focusing. . 前記合焦に用いるデフォーカス量を、前記第1のデフォーカス量から前記第2のデフォーカス量へ、又は前記第2のデフォーカス量から前記第1のデフォーカス量へ切り替えるか否かの判別を行った回数を保持する保持手段をさらに備え、
前記保持手段が保持する前記判別を行った回数が所定値以上である場合、前記確認手段は前記切り替わり回数を確認することを特徴とする請求項1乃至5のいずれか1項に記載の撮像装置。
Determining whether to switch the defocus amount used for focusing from the first defocus amount to the second defocus amount or from the second defocus amount to the first defocus amount Further comprising holding means for holding the number of times the
6. The imaging apparatus according to any one of claims 1 to 5, characterized in that, when the number of said determinations held by said holding means is equal to or greater than a predetermined value, said confirmation means confirms said number of times of switching. .
前記保持手段は、前記合焦に用いられたデフォーカス量が前記第1のデフォーカス量であるか又は前記第2のデフォーカス量であるかに基づいて、前記第1のフィルタと前記第2のフィルタのいずれかが前記合焦に用いられたかの履歴を保持することを特徴とする請求項6に記載の撮像装置。 The holding means holds the first filter and the second defocus amount based on whether the defocus amount used for the focusing is the first defocus amount or the second defocus amount. 7. The image pickup apparatus according to claim 6, wherein a history of whether any one of the filters of 1 is used for said focusing is held. 前記保持手段は、前回の合焦に用いられたフィルタが、今回の合焦に用いられたフィルタと同じか否かの履歴を保持することを特徴とする請求項7に記載の撮像装置。 8. The imaging apparatus according to claim 7, wherein said holding means holds a history indicating whether or not the filter used for previous focusing is the same as the filter used for focusing this time. 前記所定の閾値を変更する変更手段をさらに備え、
前記被写体の画像の輝度が所定値以下である場合、前記変更手段は前記所定の閾値を大きくすることを特徴とする請求項1乃至8のいずれか1項に記載の撮像装置。
Further comprising changing means for changing the predetermined threshold,
9. The imaging apparatus according to any one of claims 1 to 8, wherein when the brightness of the image of the subject is equal to or less than a predetermined value, the changing unit increases the predetermined threshold value.
前記所定の閾値を変更する変更手段をさらに備え、
前記被写体の画像のコントラストが所定値以下である場合、前記変更手段は前記所定の閾値を大きくすることを特徴とする請求項1乃至9のいずれか1項に記載の撮像装置。
Further comprising changing means for changing the predetermined threshold,
10. The imaging apparatus according to any one of claims 1 to 9, wherein when the contrast of the image of the subject is equal to or less than a predetermined value, the changing means increases the predetermined threshold value.
前記所定の閾値を変更する変更手段をさらに備え、
前記信号生成手段が前記二画像の信号を生成する際の絞り値が所定値よりも小さい場合、前記変更手段は前記所定の閾値を大きくすることを特徴とする請求項1乃至10のいずれか1項に記載の撮像装置。
Further comprising changing means for changing the predetermined threshold,
11. The changing unit increases the predetermined threshold value when the aperture value at which the signal generation unit generates the signals of the two images is smaller than a predetermined value. 10. The image pickup device according to claim 1.
前記所定の閾値を変更する変更手段をさらに備え、
前記二画像における焦点検出領域が光軸中心から所定量以上離れている場合、前記変更手段は前記所定の閾値を大きくすることを特徴とする請求項1乃至11のいずれか1項に記載の撮像装置。
Further comprising changing means for changing the predetermined threshold,
12. The imaging according to any one of claims 1 to 11, wherein when the focus detection areas in the two images are separated from the center of the optical axis by a predetermined amount or more, the changing means increases the predetermined threshold value. Device.
前記所定の閾値を変更する変更手段をさらに備え、
前記被写体が動体である場合、前記変更手段は前記所定の閾値を大きくすることを特徴とする請求項1乃至12のいずれか1項に記載の撮像装置。
Further comprising changing means for changing the predetermined threshold,
13. The imaging apparatus according to any one of claims 1 to 12, wherein when the subject is a moving body, the changing unit increases the predetermined threshold.
前記切り替わり回数が所定の閾値以上である場合、前記選択手段は、
前記第1のデフォーカス量及び前記第2のデフォーカス量のいずれかを合焦に用いるかを選択するための基準となる前記第1のデフォーカス量及び前記第2のデフォーカス量の差を変更することを特徴とする請求項1乃至13のいずれか1項に記載の撮像装置。
When the number of times of switching is equal to or greater than a predetermined threshold, the selection means
A difference between the first defocus amount and the second defocus amount, which is a reference for selecting which one of the first defocus amount and the second defocus amount is used for focusing. 14. The image pickup apparatus according to any one of claims 1 to 13, wherein the image pickup apparatus is changed.
フォーカスレンズの互いに異なる瞳領域を通過した被写体からの一対の光束のそれぞれに対応する二画像の信号を生成する信号生成工程と、
前記二画像から第1の周波数成分の信号を抽出する第1のフィルタ、及び前記二画像から前記第1の周波数成分よりも高域の周波数成分である第2の周波数成分の信号を抽出する第2のフィルタによって前記二画像から信号を抽出する信号抽出工程と、
前記第1のフィルタによって前記二画像から抽出された信号の位相差に基づいて第1のデフォーカス量を算出するとともに、前記第2のフィルタによって前記二画像から抽出された信号の位相差に基づいて第2のデフォーカス量を算出するデフォーカス量算出工程と、
前記第1のデフォーカス量及び前記第2のデフォーカス量の差に基づいて、前記第1のデフォーカス量及び前記第2のデフォーカス量のいずれかを合焦に用いるデフォーカス量として選択する選択工程と、
前記合焦に用いるデフォーカス量が、前記第1のデフォーカス量から前記第2のデフォーカス量へ、又は前記第2のデフォーカス量から前記第1のデフォーカス量へ切り替わった切り替わり回数を確認する確認工程と、有し、
前記切り替わり回数が所定の閾値以上である場合、前記選択工程では前記合焦に用いるデフォーカス量の選択方法を変更することを特徴とする撮像装置の制御方法。
a signal generating step of generating signals of two images respectively corresponding to a pair of light beams from a subject that have passed through mutually different pupil regions of a focus lens;
A first filter for extracting a signal of a first frequency component from the two images, and a second filter for extracting a signal of a second frequency component, which is a higher frequency component than the first frequency component, from the two images. a signal extraction step of extracting signals from said two images by means of a filter of 2;
A first defocus amount is calculated based on the phase difference between the signals extracted from the two images by the first filter, and based on the phase difference between the signals extracted from the two images by the second filter. a defocus amount calculation step of calculating a second defocus amount with
Either the first defocus amount or the second defocus amount is selected as a defocus amount to be used for focusing based on a difference between the first defocus amount and the second defocus amount. a selection step;
Checking the number of times the defocus amount used for focusing is switched from the first defocus amount to the second defocus amount or from the second defocus amount to the first defocus amount. and a confirmation step to
A control method for an imaging device, wherein when the number of times of switching is equal to or greater than a predetermined threshold, in the selecting step, a method of selecting a defocus amount used for focusing is changed.
撮像装置の制御方法をコンピュータに実行させるプログラムであって、
前記撮像装置の制御方法は、
フォーカスレンズの互いに異なる瞳領域を通過した被写体からの一対の光束のそれぞれに対応する二画像の信号を生成する信号生成工程と、
前記二画像から第1の周波数成分の信号を抽出する第1のフィルタ、及び前記二画像から前記第1の周波数成分よりも高域の周波数成分である第2の周波数成分の信号を抽出する第2のフィルタによって前記二画像から信号を抽出する信号抽出工程と、
前記第1のフィルタによって前記二画像から抽出された信号の位相差に基づいて第1のデフォーカス量を算出するとともに、前記第2のフィルタによって前記二画像から抽出された信号の位相差に基づいて第2のデフォーカス量を算出するデフォーカス量算出工程と、
前記第1のデフォーカス量及び前記第2のデフォーカス量の差に基づいて、前記第1のデフォーカス量及び前記第2のデフォーカス量のいずれかを合焦に用いるデフォーカス量として選択する選択工程と、
前記合焦に用いるデフォーカス量が、前記第1のデフォーカス量から前記第2のデフォーカス量へ、又は前記第2のデフォーカス量から前記第1のデフォーカス量へ切り替わった切り替わり回数を確認する確認工程と、有し、
前記切り替わり回数が所定の閾値以上である場合、前記選択工程では前記合焦に用いるデフォーカス量の選択方法を変更することを特徴とするプログラム。
A program for causing a computer to execute a control method for an imaging device,
The control method of the imaging device includes:
a signal generating step of generating signals of two images respectively corresponding to a pair of light beams from a subject that have passed through mutually different pupil regions of a focus lens;
A first filter for extracting a signal of a first frequency component from the two images, and a second filter for extracting a signal of a second frequency component, which is a higher frequency component than the first frequency component, from the two images. a signal extraction step of extracting signals from said two images by means of a filter of 2;
A first defocus amount is calculated based on the phase difference between the signals extracted from the two images by the first filter, and based on the phase difference between the signals extracted from the two images by the second filter. a defocus amount calculation step of calculating a second defocus amount with
Either the first defocus amount or the second defocus amount is selected as a defocus amount to be used for focusing based on a difference between the first defocus amount and the second defocus amount. a selection step;
Checking the number of times the defocus amount used for focusing is switched from the first defocus amount to the second defocus amount or from the second defocus amount to the first defocus amount. and a confirmation step to
A program characterized in that, in the selecting step, a method of selecting a defocus amount used for focusing is changed when the number of times of switching is equal to or greater than a predetermined threshold.
JP2018196750A 2018-10-18 2018-10-18 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM Active JP7130521B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018196750A JP7130521B2 (en) 2018-10-18 2018-10-18 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018196750A JP7130521B2 (en) 2018-10-18 2018-10-18 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2020064212A JP2020064212A (en) 2020-04-23
JP7130521B2 true JP7130521B2 (en) 2022-09-05

Family

ID=70387209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018196750A Active JP7130521B2 (en) 2018-10-18 2018-10-18 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7130521B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011253193A (en) 2011-07-13 2011-12-15 Fujifilm Corp Imaging device and search method for focal position
JP2012123317A (en) 2010-12-10 2012-06-28 Canon Inc Imaging apparatus and control method thereof
JP2017032874A (en) 2015-08-04 2017-02-09 キヤノン株式会社 Focus detection device and method, and imaging apparatus
JP2017187564A (en) 2016-04-04 2017-10-12 キヤノン株式会社 Controller, imaging apparatus, control method, program, and storage medium
JP2018036628A (en) 2016-08-24 2018-03-08 キヤノン株式会社 Control device, imaging apparatus, control method, program, and storage medium
JP2018091977A (en) 2016-12-02 2018-06-14 キヤノン株式会社 Focus controller, imaging apparatus, focus control method, and focus control program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012123317A (en) 2010-12-10 2012-06-28 Canon Inc Imaging apparatus and control method thereof
JP2011253193A (en) 2011-07-13 2011-12-15 Fujifilm Corp Imaging device and search method for focal position
JP2017032874A (en) 2015-08-04 2017-02-09 キヤノン株式会社 Focus detection device and method, and imaging apparatus
JP2017187564A (en) 2016-04-04 2017-10-12 キヤノン株式会社 Controller, imaging apparatus, control method, program, and storage medium
JP2018036628A (en) 2016-08-24 2018-03-08 キヤノン株式会社 Control device, imaging apparatus, control method, program, and storage medium
JP2018091977A (en) 2016-12-02 2018-06-14 キヤノン株式会社 Focus controller, imaging apparatus, focus control method, and focus control program

Also Published As

Publication number Publication date
JP2020064212A (en) 2020-04-23

Similar Documents

Publication Publication Date Title
KR101580545B1 (en) Image processing apparatus, image sensing apparatus, control method, and recording medium
JP5388544B2 (en) Imaging apparatus and focus control method thereof
US10264173B2 (en) Image capturing apparatus and control method thereof, and storage medium
JP2013145314A5 (en)
JP5402298B2 (en) Focus detection device and camera
EP2166408B1 (en) Imaging device and imaging method using the same
JP6682319B2 (en) Focus detection apparatus and method, imaging apparatus, program, storage medium
JP7086551B2 (en) Imaging device and its control method
JP2019095594A (en) Focus detection device and method, and imaging apparatus
JP5832153B2 (en) Imaging apparatus, control method thereof, and program
JP7130521B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD AND PROGRAM
JP2020181147A (en) Focusing apparatus, image pickup apparatus, focusing method, and program
JP6399140B2 (en) Imaging device
JP6987524B2 (en) Control device, image pickup device, control method, program, and storage medium
JP2016156950A (en) Automatic focus adjustment device and control method of the same
JP7023673B2 (en) Focus control device, focus control method, and image pickup device
US10911660B2 (en) Control apparatus, imaging apparatus, control method, and storage medium
JP6127730B2 (en) Imaging device
JP6305016B2 (en) FOCUS CONTROL DEVICE, FOCUS CONTROL DEVICE CONTROL METHOD, AND IMAGING DEVICE
JP2018045105A (en) Imaging device and control method of the same, information processing device as well as information processing method
JP2018010245A (en) Signal processor and control method therefor
JP6530610B2 (en) Focusing device, imaging device, control method of focusing device, and program
JP7079161B2 (en) Imaging device and its control method
JP2016018034A (en) Imaging device, control method of the same, program and recording medium
JP6902921B2 (en) Imaging equipment, control methods, and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220712

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220824

R151 Written notification of patent or utility model registration

Ref document number: 7130521

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151