JP2020003693A - Imaging device and control method for imaging device - Google Patents

Imaging device and control method for imaging device Download PDF

Info

Publication number
JP2020003693A
JP2020003693A JP2018124091A JP2018124091A JP2020003693A JP 2020003693 A JP2020003693 A JP 2020003693A JP 2018124091 A JP2018124091 A JP 2018124091A JP 2018124091 A JP2018124091 A JP 2018124091A JP 2020003693 A JP2020003693 A JP 2020003693A
Authority
JP
Japan
Prior art keywords
defocus
signal
reliability
focus
def
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018124091A
Other languages
Japanese (ja)
Other versions
JP7179509B2 (en
Inventor
乃亜 角田
Noa Sumida
乃亜 角田
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 JP2018124091A priority Critical patent/JP7179509B2/en
Publication of JP2020003693A publication Critical patent/JP2020003693A/en
Application granted granted Critical
Publication of JP7179509B2 publication Critical patent/JP7179509B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

To provide an imaging device with which it is possible to reduce non-focusing and blurred focusing even in the case where an image includes a low-contrast subject.SOLUTION: The imaging device comprises: acquisition means for acquiring a first signal and a second signal that correspond to beams passing through mutually different pupil areas of an imaging optical system; calculation means for performing a plurality of filtering processes mutually differing in band on the first and second signals and calculating a plurality of defocus amounts and a plurality of degrees of reliability on the basis of the first and second signals after filtering processes; and determination means for determining a defocus amount used in focus adjustment from among the plurality of defocus amounts on the basis of a difference in the plurality of defocus amounts and at least one of the plurality of degrees of reliability. At least one or more of the plurality of defocus amounts respectively are assigned the priority of selection by the determination means.SELECTED DRAWING: Figure 13

Description

本発明は、撮像装置及び撮像装置の制御方法に関し、特に撮像装置で用いられる焦点調節方法に関する。   The present invention relates to an imaging device and a control method of the imaging device, and particularly to a focus adjustment method used in the imaging device.

デジタルカメラ等の撮像装置には、一対の視差画像信号の位相差を検出することで焦点検出及び焦点調節を行う、位相差検出方式のオートフォーカスを行うものがある。特に、被写体像を撮像する撮像素子からの出力信号を用いた位相差検出方式の焦点検出方式を、撮像面位相差検出方式と呼ぶ。撮像面位相差検出方式では、撮像素子の各画素の2つ(一対)の像信号にバンドパスフィルタ処理をした後、所定の領域に関して2像の相関演算を行うことにより像ずれ量を算出し、像ずれ量に基づいてデフォーカス量を算出する。デフォーカス量の特性は、像信号に施されるバンドパスフィルタの周波数帯域に応じて異なる。例えば、周波数帯域が低域(低帯域フィルタ)の場合、大ボケ状態でもデフォーカス量を検出することができるが、合焦位置近傍でのデフォーカス量の精度が低くなる。一方、周波数帯域が高域(高帯域フィルタ)の場合、合焦位置近傍でのデフォーカス量の精度は高いが、大ボケ状態においてデフォーカス量を検出することができない。   2. Description of the Related Art Some imaging devices such as digital cameras perform a phase difference detection type autofocus that performs focus detection and focus adjustment by detecting a phase difference between a pair of parallax image signals. In particular, a focus detection method of a phase difference detection method using an output signal from an imaging element that captures a subject image is referred to as an imaging surface phase difference detection method. In the imaging surface phase difference detection method, after performing band-pass filter processing on two (one pair) image signals of each pixel of the imaging device, an image shift amount is calculated by performing a correlation operation of two images in a predetermined area. The defocus amount is calculated based on the image shift amount. The characteristics of the defocus amount differ depending on the frequency band of the band-pass filter applied to the image signal. For example, when the frequency band is a low band (low-band filter), the defocus amount can be detected even in a large blur state, but the accuracy of the defocus amount near the in-focus position decreases. On the other hand, when the frequency band is a high band (high band filter), the accuracy of the defocus amount near the in-focus position is high, but the defocus amount cannot be detected in a large blur state.

特許文献1では、複数の周波数帯域のバンドバスフィルタで相関演算を実施し、さらにそれぞれの相関演算の対の像信号の形状の一致度、コントラストから信頼度を算出する。そして、それらを低周波帯域から高周波帯域へ順に比較選択(フィルタ帯域引き継ぎ)を行うことで、焦点調節に用いるデフォーカス量を選択し、精度よく高速に焦点検出できる技術が開示されている。   In Patent Literature 1, a correlation operation is performed using bandpass filters of a plurality of frequency bands, and reliability is calculated from the degree of matching and contrast of the shape of the image signal of each pair of the correlation operations. Then, a technique is disclosed in which the comparison and selection (filter band inheritance) are performed in order from a low-frequency band to a high-frequency band to select a defocus amount to be used for focus adjustment, thereby enabling accurate and high-speed focus detection.

また、特許文献2では、複数の焦点検出領域から自動的に焦点検出領域(焦点検出枠)を選択する自動選択モードにおいて、それぞれの焦点検出枠における相関演算時の信頼度を算出して、周辺の焦点検出枠を含め重みづけ信頼性を算出・比較する。これにより、より正確な焦点検出枠の選択すなわち被写体選択を実施できる技術が開示されている。   Further, in Patent Document 2, in an automatic selection mode in which a focus detection area (focus detection frame) is automatically selected from a plurality of focus detection areas, reliability at the time of correlation calculation in each focus detection frame is calculated, and Calculate and compare the weighted reliability including the focus detection frame. Thus, a technique has been disclosed that allows more accurate focus detection frame selection, that is, subject selection.

特開2018−036628号公報JP 2018-036628A 特開2017−223760号公報JP 2017-223760 A

しかしながら、信頼度のみを比較してフィルタ帯域引き継ぎや焦点検出枠の選択をすると、コントラストの低い被写体を含む画像の焦点検出を行う際、低周波帯域のバンドパスフィルタでの演算結果の信頼度が良くなるために選択されやすくなる。従って、適正でないフィルタ帯域引き継ぎや焦点検出枠の選択により非合焦やボケ合焦が生じる場合がある。すなわち、コントラストの低い被写体では、低帯域フィルタの演算結果の信頼度が高帯域フィルタの信頼度と同等以上になり、数フレームごとに焦点調節に用いるデフォーカス量が切り替わってしまうことがある。合焦位置近傍では、低帯域フィルタのデフォーカス量の精度が低いため、レンズが反転を繰り返すことで所定の反転回数をオーバーして非合焦になる不具合が生じる。   However, when the filter band is taken over or the focus detection frame is selected by comparing only the reliability, when the focus detection of an image including a low-contrast subject is performed, the reliability of the calculation result by the band-pass filter in the low-frequency band is reduced. It is easier to be selected to be better. Accordingly, out-of-focus or blur focus may occur due to improper handover of the filter band or selection of the focus detection frame. That is, for a subject having a low contrast, the reliability of the calculation result of the low-band filter becomes equal to or higher than the reliability of the high-band filter, and the defocus amount used for focus adjustment may be switched every several frames. In the vicinity of the in-focus position, the accuracy of the defocus amount of the low-band filter is low, so that a problem occurs in which the lens is repeatedly inverted and exceeds a predetermined number of times of inversion and becomes out of focus.

さらに、自動選択モードにおいて、焦点検出領域内にコントラストの低い被写体を含む場合、その焦点検出枠での低帯域フィルタの演算結果の信頼度が上がってしまうことで誤った枠選択を行ってしまうことがある。そのため、本来撮影者が焦点調節を行いたいコントラストの高い被写体の焦点検出枠を選択できず、ボケ合焦になる不具合が生じる。   Furthermore, in the automatic selection mode, when a low-contrast subject is included in the focus detection area, an erroneous frame selection may be performed because the reliability of the calculation result of the low-band filter in the focus detection frame is increased. There is. For this reason, a focus detection frame of a high-contrast subject that the photographer originally wants to perform the focus adjustment cannot be selected, and there is a problem that the image is out of focus.

本発明は、上記課題を鑑みて、コントラストの低い被写体を含む場合であっても、非合焦やボケ合焦を軽減できる撮像装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and has as its object to provide an imaging apparatus capable of reducing out-of-focus or out-of-focus even when a low-contrast subject is included.

上記の課題を解決するために、本発明の撮像装置は、撮像光学系の互いに異なる瞳領域を通過する光束に対応する第1信号および第2信号を取得する取得手段と、前記第1信号および前記第2信号に対して帯域が互いに異なる複数のフィルタ処理を行い、各々のフィルタ処理後の第1信号および第2信号に基づいて複数のデフォーカス量および複数の信頼度を算出する算出手段と、前記複数のデフォーカス量の差と、前記複数の信頼度の少なくとも一つとに基づいて、前記複数のデフォーカス量の中から焦点調節に用いられるデフォーカス量を決定する決定手段とを備え、前記決定手段は、前記複数のデフォーカス量の少なくとも一つ以上に、選択の優先度を各々付加することを特徴とする。   In order to solve the above-described problems, an imaging apparatus according to the present invention includes: an acquisition unit configured to acquire a first signal and a second signal corresponding to a light beam passing through different pupil regions of an imaging optical system; Calculating means for performing a plurality of filtering processes having different bands on the second signal, and calculating a plurality of defocus amounts and a plurality of reliability based on the first signal and the second signal after the respective filtering processes; Determining means for determining a defocus amount used for focus adjustment from among the plurality of defocus amounts, based on a difference between the plurality of defocus amounts and at least one of the plurality of degrees of reliability, The determining means may add a selection priority to at least one of the plurality of defocus amounts.

本発明によれば、コントラストの低い被写体を含む場合であっても、非合焦やボケ合焦を軽減できる。   According to the present invention, even when a low-contrast subject is included, out-of-focus and blur focus can be reduced.

第1実施形態に係る撮像装置のブロック図である。It is a block diagram of an imaging device concerning a 1st embodiment. 非撮像面位相差方式および撮像面位相差方式の画素構成例を示す図である。FIG. 3 is a diagram illustrating a pixel configuration example of a non-imaging plane phase difference method and an imaging plane phase difference method. 第1本実施形態に係る撮像装置の動作を示すフローチャートである。5 is a flowchart illustrating an operation of the imaging device according to the first embodiment. 第1実施形態に係るAF動作を示すフローチャートである。5 is a flowchart illustrating an AF operation according to the first embodiment. 第1実施形態に係るAF動作を示すフローチャートである。5 is a flowchart illustrating an AF operation according to the first embodiment. 第1実施形態に係る焦点検出処理を示すフローチャートである。5 is a flowchart illustrating a focus detection process according to the first embodiment. 第1実施形態に係る焦点検出領域の説明図である。FIG. 3 is an explanatory diagram of a focus detection area according to the first embodiment. 第1実施形態に係るAF用信号(一対の像信号)の説明図である。FIG. 3 is an explanatory diagram of an AF signal (a pair of image signals) according to the first embodiment. 第1実施形態に係るAF用信号のシフト量と相関量との関係の説明図である。FIG. 4 is an explanatory diagram of a relationship between a shift amount of an AF signal and a correlation amount according to the first embodiment. AF用信号のシフト量と相関変化量との関係の説明図である。FIG. 7 is an explanatory diagram of a relationship between a shift amount of an AF signal and a correlation change amount. 第1実施形態に係るデフォーカス量の選択を示すフローチャートである。6 is a flowchart illustrating selection of a defocus amount according to the first embodiment. 大Defから中Defへの引き継ぎ判定を示すフローチャートである。It is a flowchart which shows the handover determination from large Def to middle Def. 中Defから小Defへの引き継ぎ判定を示すフローチャートである。It is a flowchart which shows the transfer determination from medium Def to small Def. 第2実施形態に係る自動選択時のAF処理を示すフローチャートである。It is a flow chart which shows AF processing at the time of automatic selection concerning a 2nd embodiment. 撮影範囲内の焦点検出領域の例を示す図である。FIG. 4 is a diagram illustrating an example of a focus detection area in a shooting range. 第2実施形態に係る枠選択処理を示すフローチャートである。It is a flowchart which shows the frame selection process concerning 2nd Embodiment.

以下、図面を参照しながら本発明の例示的な実施形態について説明する。   Hereinafter, exemplary embodiments of the present invention will be described with reference to the drawings.

(第1実施形態)
まず、図1を参照して、本実施形態に係る撮像装置の構成について説明する。図1は、撮像装置10(レンズ交換式カメラシステム)のブロック図である。撮像装置10は、カメラ本体200(撮像装置本体)と、カメラ本体200に着脱可能なレンズ装置100(交換レンズ)とを備えて構成されている。レンズ装置100は、電気接点ユニットを有する不図示のマウント部を介して、カメラ本体200に着脱可能(交換可能)に取り付けられている。なお本実施形態は、レンズ装置とカメラ本体とが一体的に構成された撮像装置にも適用可能である。
(1st Embodiment)
First, the configuration of the imaging device according to the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram of an imaging device 10 (interchangeable lens camera system). The imaging device 10 includes a camera body 200 (imaging device body) and a lens device 100 (interchangeable lens) that is detachable from the camera body 200. The lens device 100 is detachably (exchangeably) attached to the camera body 200 via a mount (not shown) having an electric contact unit. Note that the present embodiment is also applicable to an imaging device in which a lens device and a camera body are integrally configured.

レンズ装置100は、撮影レンズ101と、絞り及びシャッター102と、フォーカスレンズ103と、モータ104と、レンズコントローラ105とを備える。撮影レンズ101は、ズーム機構を含む。絞り及びシャッター102は、光量を制御する。フォーカスレンズ103は、後述する撮像素子201上に焦点を合わせるためのレンズである。モータ104は、フォーカスレンズ103を駆動する。レンズコントローラ105は、レンズ装置100の全体を制御し、通信バス106を介してカメラ本体200と接続する。   The lens device 100 includes a photographing lens 101, an aperture and a shutter 102, a focus lens 103, a motor 104, and a lens controller 105. The taking lens 101 includes a zoom mechanism. The aperture and shutter 102 control the amount of light. The focus lens 103 is a lens for focusing on an image sensor 201 described later. The motor 104 drives the focus lens 103. The lens controller 105 controls the entire lens device 100 and connects to the camera body 200 via the communication bus 106.

カメラ本体200は、撮像素子201と、A/D変換部202と、画像処理部203と、AF信号処理部204と、フォーマット変換部205とを備える。撮像素子201は、被写体からの反射光を電気信号に変換する受光手段(光電変換手段)として機能する。A/D変換部202は、撮像素子201の出力ノイズを除去するCDS回路やA/D変換前に行う非線形増幅回路を含む。本実施形態において、AF信号処理部204は、取得手段204aおよび算出手段204bを有する。また、カメラ本体200は、ランダムアクセスメモリ(RAM)などの高速な内蔵メモリ(DRAM)206を備え、一時的な画像記憶手段としての高速バッファとして、または、画像の圧縮伸張における作業用メモリとして用いる。   The camera body 200 includes an image sensor 201, an A / D converter 202, an image processor 203, an AF signal processor 204, and a format converter 205. The imaging element 201 functions as a light receiving unit (photoelectric conversion unit) that converts reflected light from a subject into an electric signal. The A / D converter 202 includes a CDS circuit for removing output noise of the image sensor 201 and a non-linear amplifier circuit for performing A / D conversion. In the present embodiment, the AF signal processing unit 204 has an acquisition unit 204a and a calculation unit 204b. The camera body 200 includes a high-speed internal memory (DRAM) 206 such as a random access memory (RAM), and is used as a high-speed buffer as a temporary image storage unit or as a work memory in image compression / decompression. .

さらに、カメラ本体200は、画像記録部207と、システム制御部209と、レンズ通信部210と、AE処理部211と、画像表示用メモリ(VRAM)212と、画像表示部213とを備える。画像記録部207は、メモリーカードなどの記録媒体とそのインターフェースとを備えて構成される。システム制御部209は、撮影シーケンスなどシステムを制御する。レンズ通信部210は、通信バス106を介してレンズコントローラ105と接続されることで、カメラ本体200とレンズ装置100との通信を行う。画像表示部213は、画像の表示、操作補助のための表示、およびカメラ状態の表示に加え、撮影の際に撮影画面および焦点検出領域を表示する。   Further, the camera body 200 includes an image recording unit 207, a system control unit 209, a lens communication unit 210, an AE processing unit 211, an image display memory (VRAM) 212, and an image display unit 213. The image recording unit 207 includes a recording medium such as a memory card and an interface thereof. A system control unit 209 controls the system such as a shooting sequence. The lens communication unit 210 performs communication between the camera body 200 and the lens device 100 by being connected to the lens controller 105 via the communication bus 106. The image display unit 213 displays a shooting screen and a focus detection area at the time of shooting, in addition to displaying an image, a display for assisting operation, and displaying a camera state.

また、カメラ本体200は、カメラ本体200をユーザが操作するための操作部214を備え、撮像装置10の撮影機能や画像再生の際の設定などの各種設定を行うメニュースイッチ、および撮影モードと再生モードの動作モード切換えスイッチなどを含む。撮影モードスイッチ215は、マクロモードやスポーツモードなどの撮影モードを選択するためのスイッチである。メインスイッチ216は、システム(撮像装置10)に電源を投入するためのスイッチである。スイッチ(SW1)217は、自動焦点調節(AF)や自動露出(AE)などの撮影スタンバイ動作を行うためのスイッチであり、スイッチ(SW2)218は、スイッチSW1の操作後に撮影を行うためのスイッチである。   Further, the camera body 200 includes an operation unit 214 for a user to operate the camera body 200, a menu switch for performing various settings such as a shooting function of the imaging apparatus 10 and settings for image playback, and a shooting mode and playback mode. It includes a mode operation mode changeover switch and the like. The shooting mode switch 215 is a switch for selecting a shooting mode such as a macro mode and a sports mode. The main switch 216 is a switch for turning on power to the system (imaging device 10). A switch (SW1) 217 is a switch for performing a shooting standby operation such as an automatic focus adjustment (AF) and an automatic exposure (AE), and a switch (SW2) 218 is a switch for performing a shooting after the switch SW1 is operated. It is.

撮像素子201は、CCDセンサやCMOSセンサなどを備え、レンズ装置100の撮像光学系を介して形成された被写体像(光学像)を光電変換して画素信号(画像データ)を出力する。すなわち、撮像光学系から入射した光束は、撮像素子201の受光面上に結像し、撮像素子201において配列された画素(フォトダイオード)により、入射光量に応じた信号電荷に変換される。各フォトダイオードに蓄積された信号電荷は、システム制御部209の指令に従い、タイミングジェネレータ208から出力される駆動パルスに基づいて、信号電荷に応じた電圧信号として撮像素子201から順次読み出される。   The imaging element 201 includes a CCD sensor, a CMOS sensor, and the like, and photoelectrically converts a subject image (optical image) formed via the imaging optical system of the lens device 100 to output a pixel signal (image data). That is, the light beam incident from the imaging optical system forms an image on the light receiving surface of the imaging element 201, and is converted into signal charges corresponding to the amount of incident light by pixels (photodiodes) arranged in the imaging element 201. The signal charges stored in each photodiode are sequentially read from the image sensor 201 as a voltage signal corresponding to the signal charges based on a drive pulse output from the timing generator 208 in accordance with a command from the system control unit 209.

本実施形態で用いられる撮像素子201の各画素は、2つ(一対)のフォトダイオードA、Bとこれら一対のフォトダイオードA、Bに対して設けられた(フォトダイオードA、Bを共有する)1つのマイクロレンズとを備えて構成されている。すなわち、撮像素子201は、1つのマイクロレンズに対し一対のフォトダイオード(第1光電変換部および第2光電変換部)を有し、複数のマイクロレンズが2次元状に配列されている。各画素は、入射する光をマイクロレンズで分割して一対のフォトダイオードA、B上に一対の光学像を形成し、この一対のフォトダイオードA、Bから後述するAF用信号に用いられる一対の画素信号(A像信号およびB像信号)を出力する。また、一対のフォトダイオードA、Bの出力を加算することにより、撮像用信号(A+B像信号)を得ることができる。   Each pixel of the image sensor 201 used in the present embodiment is provided for two (a pair) of photodiodes A and B and for the pair of photodiodes A and B (the photodiodes A and B are shared). It is configured to include one micro lens. That is, the imaging element 201 has a pair of photodiodes (a first photoelectric conversion unit and a second photoelectric conversion unit) for one microlens, and a plurality of microlenses are two-dimensionally arranged. Each pixel divides incident light with a microlens to form a pair of optical images on a pair of photodiodes A and B. The pair of photodiodes A and B form a pair of optical images used for AF signals described later. It outputs pixel signals (A image signal and B image signal). Further, by adding the outputs of the pair of photodiodes A and B, an imaging signal (A + B image signal) can be obtained.

そして、複数の画素から出力された複数のA像信号と複数のB像信号とをそれぞれ合成することにより、撮像面位相差検出方式によるAF(撮像面位相差AF)に用いられるAF用信号(焦点検出用信号)としての一対の像信号が得られる。後述するAF信号処理部204は、一対の像信号に対する相関演算を行って、一対の像信号のずれ量である位相差(像ずれ量)を算出し、さらに像ずれ量から撮像光学系のデフォーカス量(およびデフォーカス方向)を算出する。   Then, by synthesizing a plurality of A image signals and a plurality of B image signals output from a plurality of pixels, respectively, an AF signal (AF for imaging plane phase difference AF) using the imaging plane phase difference detection method (imaging plane phase difference AF) is used. A pair of image signals as a focus detection signal) is obtained. An AF signal processing unit 204, which will be described later, performs a correlation operation on the pair of image signals to calculate a phase difference (image shift amount) which is a shift amount of the pair of image signals, and further calculates a data of the imaging optical system from the image shift amount. The focus amount (and the defocus direction) is calculated.

このように、撮像素子201は、レンズ装置100の撮像光学系を通過した光束を受光して形成された光学像を電気信号に光電変換して画像データ(像信号)を出力する。本実施形態の撮像素子201は、1つのマイクロレンズに対して2つのフォトダイオードが設けられており、撮像面位相差AF方式による焦点検出に用いる像信号を生成可能である。なお、1つのマイクロレンズに対して4つのフォトダイオードを設けるなど、1つのマイクロレンズを共有するフォトダイオードの個数を変更してもよい。   As described above, the imaging element 201 photoelectrically converts an optical image formed by receiving a light beam that has passed through the imaging optical system of the lens device 100 into an electric signal, and outputs image data (image signal). The image sensor 201 according to the present embodiment is provided with two photodiodes for one microlens, and can generate an image signal used for focus detection by the imaging surface phase difference AF method. Note that the number of photodiodes sharing one microlens may be changed, such as providing four photodiodes for one microlens.

次に、図2(A)は、撮像面位相差AF方式に対応していない画素の構成例を模式的に示し、図2(B)は、撮像面位相差AF方式に対応した画素の構成例を模式的に示している。図2(A)、(B)のいずれの画素構成でも、ベイヤー配列が用いられており、Rは赤のカラーフィルタを、Bは青のカラーフィルタを、Gr、Gbは緑のカラーフィルタをそれぞれ示している。撮像面位相差AFに対応する図2(B)の画素構成では、図2(A)に示される撮像面位相差AF方式に非対応の画素構成における1画素(実線で示される画素)内に、図2(B)の水平方向に2分割された2つのフォトダイオードA、Bが設けられている。フォトダイオードA、B(第1光電変換部、第2光電変換部)は、撮像光学系の互いに異なる瞳領域を通過した光束を受光する。   Next, FIG. 2A schematically illustrates a configuration example of a pixel that does not support the imaging surface phase difference AF method, and FIG. 2B illustrates a configuration of a pixel that supports the imaging surface phase difference AF method. An example is shown schematically. In each of the pixel configurations of FIGS. 2A and 2B, a Bayer array is used, where R is a red color filter, B is a blue color filter, and Gr and Gb are green color filters. Is shown. In the pixel configuration of FIG. 2B corresponding to the imaging plane phase difference AF, one pixel (pixel indicated by a solid line) in the pixel configuration that is not compatible with the imaging plane phase difference AF method illustrated in FIG. , Two photodiodes A and B divided in the horizontal direction in FIG. 2B are provided. The photodiodes A and B (the first photoelectric conversion unit and the second photoelectric conversion unit) receive light beams that have passed through mutually different pupil regions of the imaging optical system.

このように、フォトダイオードAとフォトダイオードBは、撮影光学系の射出瞳の異なる領域を通過した光束を受光するため、B像信号はA像信号に対して視差を有している。また、上述の撮像用信号(A+B像信号)と一対の視差画像信号のうち、一方の像信号(A像又はB像信号)も視差を有する。なお、図2(B)に示される画素の分割方法は一例であり、図2(B)の垂直方向に分割した構成や、水平方向および垂直方向に2分割ずつ(合計4分割)した構成などの他の構成を採用してもよい。また、同じ撮像素子内において互いに異なる分割方法で分割された複数種類の画素が含まれてもよい。   As described above, since the photodiodes A and B receive light beams that have passed through different areas of the exit pupil of the imaging optical system, the B image signal has parallax with the A image signal. In addition, one of the image signal (A + B image signal) and one of the pair of parallax image signals has a parallax. Note that the pixel dividing method illustrated in FIG. 2B is an example, and the pixel is divided in the vertical direction in FIG. 2B, or divided into two in the horizontal and vertical directions (total of four). Other configurations may be adopted. In addition, a plurality of types of pixels divided by different division methods may be included in the same image sensor.

なお、本実施形態では、1つのマイクロレンズに対して複数の光電変換部が配置され、瞳分割された光束が各光電変換部に入射される構成を示したが、本発明はこれに限定されるものではない。例えば、焦点検出用画素の構成は、マイクロレンズ下に1つのフォトダイオードを有し、遮光層により左右または上下を遮光することで瞳分割を行う構成でもよい。また、複数の撮像用画素の配列の中に一対の焦点検出用画素を離散的に配置し、その一対の焦点検出用画素から一対の像信号を取得する構成でもよい。   Note that, in the present embodiment, a configuration in which a plurality of photoelectric conversion units are arranged for one microlens and a pupil-divided light beam is incident on each photoelectric conversion unit has been described, but the present invention is not limited to this. Not something. For example, the focus detection pixel may have a configuration in which one photodiode is provided below the microlens and pupil division is performed by shielding the light from left and right or up and down by a light shielding layer. Alternatively, a configuration may be adopted in which a pair of focus detection pixels are discretely arranged in an array of a plurality of imaging pixels, and a pair of image signals are acquired from the pair of focus detection pixels.

撮像素子201から読み出された撮像用信号およびAF用信号は、A/D変換部202に入力される。A/D変換部202は、撮像用信号およびAF用信号に対して、リセットノイズを除去するための相関二重サンプリング、ゲインの調節、およびデジタル化を行う。A/D変換部202は、撮像用信号を画像処理部203に出力し、AF用信号をAF信号処理部204に出力する。   The imaging signal and the AF signal read from the imaging element 201 are input to the A / D converter 202. The A / D converter 202 performs correlated double sampling, gain adjustment, and digitization of the imaging signal and the AF signal to remove reset noise. The A / D converter 202 outputs the imaging signal to the image processing unit 203 and outputs the AF signal to the AF signal processing unit 204.

AF信号処理部204(取得手段204a)は、A/D変換部202から出力されたAF用信号(一対の像信号としての第1信号(A像信号)および第2信号(B像信号))を取得する。またAF信号処理部204(算出手段204b)は、AF用信号に基づいて相関演算を行って像ずれ量を算出し、像ずれ量に基づいてデフォーカス量を算出する。また、AF信号処理部204(算出手段204b)は、AF用信号の信頼性情報(2像の一致度、2像の急峻度、コントラスト情報、飽和情報、およびキズ情報など)により信頼度をランク付けする。AF信号処理部204により算出されたデフォーカス量および信頼性情報(信頼度)は、システム制御部209へ出力される。なお、AF信号処理部204による相関演算の詳細については後述する。   The AF signal processing unit 204 (the acquisition unit 204a) outputs the AF signal (a first signal (A image signal) and a second signal (B image signal) as a pair of image signals) output from the A / D conversion unit 202. To get. Further, the AF signal processing unit 204 (calculating unit 204b) calculates an image shift amount by performing a correlation operation based on the AF signal, and calculates a defocus amount based on the image shift amount. The AF signal processing unit 204 (calculation unit 204b) ranks the reliability based on the reliability information of the AF signal (the coincidence of two images, the steepness of two images, contrast information, saturation information, and flaw information). Attach it. The defocus amount and the reliability information (reliability) calculated by the AF signal processing unit 204 are output to the system control unit 209. The details of the correlation calculation by the AF signal processing unit 204 will be described later.

次に、図3を参照して、本実施形態における撮像装置10の動作について説明する。図3は、撮像装置10の動作を示すフローチャートである。図3の各ステップは、主にシステム制御部209の指令に基づいて各部により実行される。   Next, an operation of the imaging device 10 according to the present embodiment will be described with reference to FIG. FIG. 3 is a flowchart illustrating the operation of the imaging device 10. Each step in FIG. 3 is mainly executed by each unit based on a command from the system control unit 209.

まず、ステップS301において、システム制御部209は、画像処理部203の出力信号に対してAE処理を行うようにAE処理部211を制御する。次に、ステップS302において、システム制御部209は、スイッチ217(SW1)がオンであるか否かを判定する。スイッチ217(SW1)がオンの場合(Yes)、ステップS303へ進む。一方、スイッチ217(SW1)がオフの場合(No)、ステップS301へ戻る。   First, in step S301, the system control unit 209 controls the AE processing unit 211 to perform AE processing on an output signal of the image processing unit 203. Next, in step S302, the system control unit 209 determines whether the switch 217 (SW1) is on. If the switch 217 (SW1) is on (Yes), the process proceeds to step S303. On the other hand, if the switch 217 (SW1) is off (No), the process returns to step S301.

次に、ステップS303において、システム制御部209は、AF動作を行う。なお、AF動作の詳細については後述する。次に、ステップS304において、システム制御部209は、スイッチ217(SW1)がオンであるか否かを判定する。スイッチ217(SW1)がオンの場合(Yes)、ステップS305へ進む。一方、スイッチ217(SW1)がオフの場合(No)、ステップS301へ戻る。   Next, in step S303, the system control unit 209 performs an AF operation. The details of the AF operation will be described later. Next, in step S304, the system control unit 209 determines whether the switch 217 (SW1) is on. If the switch 217 (SW1) is on (Yes), the process proceeds to step S305. On the other hand, if the switch 217 (SW1) is off (No), the process returns to step S301.

次に、ステップS305において、システム制御部209は、スイッチ218(SW2)がオンであるか否かを判定する。スイッチ218(SW2)がオフの場合(No)、ステップS304へ戻る。一方、スイッチ218(SW2)がオンの場合(Yes)、ステップS306へ進む。ステップS306において、システム制御部209は撮影動作を行う。その後、ステップS301へ戻る。   Next, in step S305, the system control unit 209 determines whether the switch 218 (SW2) is on. If the switch 218 (SW2) is off (No), the process returns to step S304. On the other hand, if the switch 218 (SW2) is on (Yes), the process proceeds to step S306. In step S306, the system control unit 209 performs a shooting operation. Then, the process returns to step S301.

次に、図4及び図5を参照して、本実施形態におけるAF動作(図3のステップS303)について詳述する。図4及び図5は、AF動作を示すフローチャートである。図4及び図5の各ステップは、主に、AF信号処理部204およびシステム制御部209により実行される。   Next, the AF operation (step S303 in FIG. 3) in the present embodiment will be described in detail with reference to FIGS. 4 and 5 are flowcharts showing the AF operation. 4 and 5 are mainly executed by the AF signal processing unit 204 and the system control unit 209.

まず、ステップS401において、システム制御部209は、画像処理部203の出力信号に対してAE処理を行うようにAE処理部211を制御する。次に、ステップS402において、AF信号処理部204は、一対の像信号を用いて焦点検出処理を行い、デフォーカス量および信頼度を算出する。なお、焦点検出処理の詳細については後述する。   First, in step S401, the system control unit 209 controls the AE processing unit 211 to perform AE processing on an output signal of the image processing unit 203. Next, in step S402, the AF signal processing unit 204 performs focus detection processing using the pair of image signals, and calculates the defocus amount and the reliability. The details of the focus detection processing will be described later.

次に、ステップS403において、システム制御部209は、ステップS402にて算出された信頼度(焦点検出結果の信頼度)が予め設定されている第2信頼度閾値よりも高いか否かを判定する。信頼度が第2信頼度閾値よりも高い場合(Yes)、ステップS404へ進む。一方、信頼度が第2信頼度閾値未満である場合(No)、ステップS413へ進む。なお、第2信頼度閾値は、信頼度が第2信頼度閾値未満であれば、デフォーカス量の精度の保証はできないが被写体の合焦位置方向は保証できる値に設定される。   Next, in step S403, the system control unit 209 determines whether or not the reliability calculated in step S402 (the reliability of the focus detection result) is higher than a preset second reliability threshold. . When the reliability is higher than the second reliability threshold (Yes), the process proceeds to step S404. On the other hand, if the reliability is less than the second reliability threshold (No), the process proceeds to step S413. If the reliability is less than the second reliability threshold, the accuracy of the defocus amount cannot be guaranteed, but the direction of the in-focus position of the subject can be guaranteed if the reliability is lower than the second reliability threshold.

次に、ステップS404において、システム制御部209は、ステップS402にて算出したデフォーカス量(検出デフォーカス量)が予め設定されている第2Def量閾値以下であるか否かを判定する。検出デフォーカス量が第2Def量閾値以下である場合(Yes)、ステップS405へ進む。一方、検出デフォーカス量が第2Def量閾値よりも大きい場合(No)、ステップS412へ進む。第2Def量閾値は、デフォーカス量が第2Def量閾値以下の場合、その後、該デフォーカス量だけレンズ駆動を所定回数(例えば3回)以内で焦点深度内にフォーカスレンズ103を移動するように制御可能な値(例えば焦点深度の5倍の量)に設定される。   Next, in step S404, the system control unit 209 determines whether or not the defocus amount (the detected defocus amount) calculated in step S402 is equal to or less than a preset second Def amount threshold. If the detected defocus amount is equal to or smaller than the second Def amount threshold (Yes), the process proceeds to step S405. On the other hand, if the detected defocus amount is larger than the second Def amount threshold (No), the process proceeds to step S412. The second Def amount threshold is controlled such that when the defocus amount is equal to or less than the second Def amount threshold, the focus lens 103 is moved within the depth of focus within a predetermined number of times (for example, three times) by the defocus amount. It is set to a possible value (e.g., five times the depth of focus).

次に、ステップS405において、システム制御部209は、フォーカスレンズ103が停止状態(停止中)であるか否かを判定する。フォーカスレンズ103が停止中である場合(Yes)、ステップS406へ進む。一方、フォーカスレンズ103が停止中でない場合(No)、ステップS410へ進む。   Next, in step S405, the system control unit 209 determines whether the focus lens 103 is in a stopped state (during stop). If the focus lens 103 is stopped (Yes), the process proceeds to step S406. On the other hand, if the focus lens 103 is not stopped (No), the process proceeds to step S410.

次に、ステップS406において、システム制御部209は、ステップS402にて算出された信頼度(焦点検出結果の信頼度)が予め設定されている第1信頼度閾値よりも高いか否かを判定する。信頼度が第1信頼度閾値よりも高い場合(Yes)、ステップS407へ進む。一方、信頼度が第1信頼度閾値未満である場合(No)、ステップS410へ進む。なお、第1信頼度閾値は、信頼度が第1信頼度閾値以上であれば、デフォーカス量の精度ばらつきが所定の範囲内(例えば、焦点深度内)となるように設定される。   Next, in step S406, the system control unit 209 determines whether or not the reliability calculated in step S402 (the reliability of the focus detection result) is higher than a preset first reliability threshold. . If the reliability is higher than the first reliability threshold (Yes), the process proceeds to step S407. On the other hand, if the reliability is less than the first reliability threshold (No), the process proceeds to step S410. The first reliability threshold is set such that the accuracy variation of the defocus amount is within a predetermined range (for example, within the depth of focus) when the reliability is equal to or more than the first reliability threshold.

次に、ステップS407において、システム制御部209は、ステップS402にて算出したデフォーカス量(検出デフォーカス量)が予め設定されている第1Def量閾値以下であるか否かを判定する。検出デフォーカス量が第1Def量閾値以下である場合(Yes)、ステップS408へ進む。一方、検出デフォーカス量が第1Def量閾値よりも大きい場合(No)、ステップS409へ進む。なお、第1Def量閾値は、検出デフォーカス量が第1Def量閾値以下であれば、焦点深度内にフォーカスレンズ103が制御されている値となるように設定される。   Next, in step S407, the system control unit 209 determines whether the defocus amount calculated in step S402 (the detected defocus amount) is equal to or less than a preset first Def amount threshold. If the detected defocus amount is equal to or smaller than the first Def amount threshold (Yes), the process proceeds to step S408. On the other hand, if the detected defocus amount is larger than the first Def amount threshold (No), the process proceeds to step S409. Note that the first Def amount threshold is set so that the focus lens 103 is controlled within the depth of focus if the detected defocus amount is equal to or less than the first Def amount threshold.

次に、ステップS408において、システム制御部209は、焦点状態が合焦状態であると判定し、本フローを終了する。一方、ステップS409において、システム制御部209は、ステップS402にて算出したデフォーカス量(検出デフォーカス量)だけフォーカスレンズ103を駆動させ、その後、ステップS402へ戻る。再度、ステップS405〜S409の一連の動作を行うことにより、ステップS402にて算出した信頼度が第1信頼度閾値よりも高い場合、システム制御部209は、フォーカスレンズ103を停止した状態で再度デフォーカス量を算出することができる。   Next, in step S408, the system control unit 209 determines that the focus state is the in-focus state, and ends this flow. On the other hand, in step S409, the system control unit 209 drives the focus lens 103 by the defocus amount calculated in step S402 (detected defocus amount), and then returns to step S402. By performing the series of operations in steps S405 to S409 again, if the reliability calculated in step S402 is higher than the first reliability threshold, the system control unit 209 again stops the focus lens 103 and stops decoding. The focus amount can be calculated.

次に、ステップS410において、システム制御部209は、ステップS402にて検出したデフォーカス量に対して所定割合だけフォーカスレンズ103を駆動する。次に、ステップS411において、システム制御部209は、フォーカスレンズ103の停止を指示して、ステップS402へ戻る。次に、ステップS412において、システム制御部209は、ステップS402にて検出したデフォーカス量に対してフォーカスレンズ103を駆動し、ステップS402へ戻る。   Next, in step S410, the system control unit 209 drives the focus lens 103 by a predetermined ratio with respect to the defocus amount detected in step S402. Next, in step S411, the system control unit 209 instructs the focus lens 103 to stop, and returns to step S402. Next, in step S412, the system control unit 209 drives the focus lens 103 for the defocus amount detected in step S402, and returns to step S402.

次に、ステップS413において、システム制御部209は、非合焦条件を満たしたか否かを判定する。非合焦条件を満たした場合(Yes)、ステップS414へ進む。一方、非合焦条件を満たしていない場合(No)、ステップS415へ進む。ここで、非合焦条件とは、システム制御部209が合焦すべき被写体がないと判定する条件である。非合焦条件として、例えば、フォーカスレンズ103の可動範囲の全てにおいてレンズ駆動が完了した場合、すなわちフォーカスレンズ103が遠側および近側の両方のレンズ端を検出して初期位置に戻った場合という条件が設定される。   Next, in step S413, the system control unit 209 determines whether the out-of-focus condition is satisfied. If the out-of-focus condition is satisfied (Yes), the process proceeds to step S414. On the other hand, if the out-of-focus condition is not satisfied (No), the process proceeds to step S415. Here, the out-of-focus condition is a condition that the system control unit 209 determines that there is no subject to be focused. As an out-of-focus condition, for example, a case where lens driving is completed in the entire movable range of the focus lens 103, that is, a case where the focus lens 103 detects both the far-side and near-side lens ends and returns to the initial position. The conditions are set.

次に、ステップS414において、システム制御部209は、焦点状態が非合焦状態であると判定し、本フローを終了する。一方、ステップS415において、システム制御部209は、フォーカスレンズ103が遠側または近側のレンズ端に到達したか否かを判定する。フォーカスレンズ103がレンズ端に到達した場合(Yes)、ステップS416へ進み、一方、フォーカスレンズ103がレンズ端に到達していない場合(No)、ステップS417へ進む。   Next, in step S414, the system control unit 209 determines that the focus state is out of focus, and ends this flow. On the other hand, in step S415, the system control unit 209 determines whether the focus lens 103 has reached the far or near lens end. If the focus lens 103 has reached the lens end (Yes), the process proceeds to step S416, while if the focus lens 103 has not reached the lens end (No), the process proceeds to step S417.

次に、ステップS416において、システム制御部209は、フォーカスレンズ103の駆動方向(レンズ駆動方向)を反転し、ステップS402へ戻る。次に、ステップS417において、システム制御部209は、フォーカスレンズ103を所定方向に駆動し、ステップS402へ戻る。フォーカスレンズ103の駆動速度(フォーカスレンズ速度)は、例えば、デフォーカス量が検出できるようになった時点でピント位置を通り過ぎることのないようなレンズ速度の範囲内で最も速い速度に設定される。   Next, in step S416, the system control unit 209 reverses the driving direction (lens driving direction) of the focus lens 103, and returns to step S402. Next, in step S417, the system control unit 209 drives the focus lens 103 in a predetermined direction, and returns to step S402. The drive speed (focus lens speed) of the focus lens 103 is set to, for example, the fastest speed within a range of lens speeds that does not pass the focus position when the defocus amount can be detected.

次に、図6を参照して、焦点検出処理(図4のステップS402)について詳述する。図6は、焦点検出処理を示すフローチャートである。図6の各ステップは、主に、システム制御部209、または、システム制御部209の指令に基づいてAF信号処理部204により実行される。   Next, the focus detection process (step S402 in FIG. 4) will be described in detail with reference to FIG. FIG. 6 is a flowchart showing the focus detection processing. Each step in FIG. 6 is mainly executed by the system control unit 209 or the AF signal processing unit 204 based on a command from the system control unit 209.

まず、ステップS501において、AF信号処理部204(システム制御部209)は、撮像素子201内の任意の範囲の焦点検出領域を設定する。次に、ステップS502において、AF信号処理部204は、ステップS501にて設定した焦点検出領域に関し、撮像素子201から焦点検出用の一対の像信号(A像信号およびB像信号)を取得する。次に、ステップS503において、AF信号処理部204は、ステップS502にて取得した一対の像信号に対して、垂直方向に行加算平均処理を行う。行加算平均処理により、像信号のノイズの影響を軽減することができる。次に、ステップS504において、AF信号処理部204は、ステップS503にて行加算平均処理を行った一対の像信号から、所定の周波数帯域の信号成分を取り出すフィルタ処理を行う。   First, in step S501, the AF signal processing unit 204 (system control unit 209) sets a focus detection area in an arbitrary range in the image sensor 201. Next, in step S502, the AF signal processing unit 204 acquires a pair of image signals for focus detection (A image signal and B image signal) from the image sensor 201 for the focus detection area set in step S501. Next, in step S503, the AF signal processing unit 204 performs row averaging processing on the pair of image signals acquired in step S502 in the vertical direction. The row averaging process can reduce the influence of noise in the image signal. Next, in step S504, the AF signal processing unit 204 performs a filter process of extracting a signal component in a predetermined frequency band from the pair of image signals on which the row averaging process has been performed in step S503.

次に、ステップS505において、AF信号処理部204は、ステップS504にてフィルタ処理後の一対の像信号に基づいて相関量を算出する。次に、ステップS506において、AF信号処理部204は、ステップS505にて算出した相関量に基づいて相関変化量を算出する。次に、ステップS507において、AF信号処理部204は、ステップS505にて算出した相関変化量に基づいて像ずれ量を算出する。次に、ステップS508において、AF信号処理部204は、ステップS507にて算出した像ずれ量の信頼度を算出する。次に、ステップS509において、AF信号処理部204は、像ずれ量をデフォーカス量に変換する。   Next, in step S505, the AF signal processing unit 204 calculates a correlation amount based on the pair of image signals after the filtering process in step S504. Next, in step S506, the AF signal processing unit 204 calculates a correlation change amount based on the correlation amount calculated in step S505. Next, in step S507, the AF signal processing unit 204 calculates an image shift amount based on the correlation change amount calculated in step S505. Next, in step S508, the AF signal processing unit 204 calculates the reliability of the image shift amount calculated in step S507. Next, in step S509, the AF signal processing unit 204 converts the image shift amount into a defocus amount.

次に、ステップS510において、システム制御部209は、ステップS504にて行われたフィルタ処理に関し、フィルタの種類分だけ演算したか否かを判定する。フィルタの種類分だけフィルタ処理の演算が完了している場合(Yes)、ステップS511へ進む。一方、フィルタの種類分だけフィルタ処理の演算が完了していない場合(No)、ステップS504へ戻る。本実施形態において、ステップS504のフィルタ処理では、例えば、行加算平均処理を行った一対の像信号に対して、帯域の異なる3つの周波数帯域(低域、中域、高域)のバンドパスフィルタを用いた処理(フィルタ処理)を水平方向に行う。但し、低域フィルタ、中域フィルタ、高域フィルタとは、各フィルタが取り出す周波数成分の相対的な高低を示すものであり、絶対的な高低を示すものではない。ステップS510において、システム制御部209は、ステップS504〜S509の一連の処理を3つの周波数帯域の全てに関して行ったか否かを判定する。   Next, in step S510, the system control unit 209 determines whether or not the filter processing performed in step S504 has been calculated by the number of filter types. If the calculation of the filter processing has been completed for the number of filter types (Yes), the process proceeds to step S511. On the other hand, if the calculation of the filter processing has not been completed for the number of filter types (No), the process returns to step S504. In the present embodiment, in the filter processing in step S504, for example, band-pass filters of three different frequency bands (low, middle, and high) with respect to a pair of image signals on which row averaging processing has been performed. (Filtering) is performed in the horizontal direction. However, the low-pass filter, the middle-pass filter, and the high-pass filter indicate relative heights of frequency components extracted by the respective filters, and do not indicate absolute heights. In step S510, the system control unit 209 determines whether the series of processes in steps S504 to S509 has been performed for all three frequency bands.

次に、ステップS511において、システム制御部209は、合焦判定を行うフィルタを用いて算出されたデフォーカス量を選択する。すなわち、システム制御部209(決定手段)は、ステップS504〜S509の一連の処理により算出された3つのデフォーカス量と信頼度との組み合わせのうち、いずれのデフォーカス量と信頼度との組み合わせを用いるかを選択(決定)する。本実施形態において、低域フィルタを用いて算出されたデフォーカス量を大Def、中域フィルタを用いて算出されたデフォーカス量を中Def、高域フィルタを用いて算出されたデフォーカス量を小Defと表現する。なお、デフォーカス量の選択については後述する。   Next, in step S511, the system control unit 209 selects a defocus amount calculated using a filter that performs focus determination. That is, the system control unit 209 (decision unit) determines which combination of the defocus amount and the reliability among the three combinations of the defocus amount and the reliability calculated by the series of processes of steps S504 to S509. Select (determine) whether to use. In the present embodiment, the defocus amount calculated using the low-pass filter is large Def, the defocus amount calculated using the middle-pass filter is medium Def, and the defocus amount calculated using the high-pass filter is Expressed as a small Def. The selection of the defocus amount will be described later.

次に、図7を参照して、図6のステップS501にて設定された焦点検出領域(AF領域)について詳述する。図7は、撮像素子201の画素アレイ601上での焦点検出領域602の説明図である。焦点検出領域602の両側のシフト領域603は、相関演算に必要な領域である。このため、焦点検出領域602とシフト領域603とを合わせた領域604が相関演算に必要な画素領域である。図7中のp、q、s、tはそれぞれ、水平方向(x軸方向)での座標であり、pとqはそれぞれ領域604(画素領域)の始点と終点のx座標、sとtはそれぞれ焦点検出領域602の始点と終点のx座標をそれぞれ示している。   Next, the focus detection area (AF area) set in step S501 in FIG. 6 will be described in detail with reference to FIG. FIG. 7 is an explanatory diagram of the focus detection area 602 on the pixel array 601 of the image sensor 201. The shift areas 603 on both sides of the focus detection area 602 are areas necessary for the correlation calculation. Therefore, an area 604 obtained by combining the focus detection area 602 and the shift area 603 is a pixel area necessary for the correlation calculation. 7, p, q, s, and t are coordinates in the horizontal direction (x-axis direction), respectively, where p and q are the x coordinates of the start point and end point of the area 604 (pixel area), respectively, and s and t are The x-coordinates of the start point and the end point of the focus detection area 602 are respectively shown.

図8は、図7の焦点検出領域602に含まれる複数の画素から取得したAF用信号(一対の像信号)の説明図である。図8において、実線701は、一対の像信号のうちの一方(A像信号)、破線702は、一対の像信号のうち他方(B像信号)である。図8(A)はシフト前のA像信号およびB像信号を示し、図8(B)、(C)はそれぞれ、A像信号およびB像信号を図8(A)の状態からプラス方向およびマイナス方向にシフトした状態を示している。一対の像信号(実線701で示されるA像信号、破線702で示されるB像信号)の相関量を算出する際には、A像信号およびB像信号の両方を矢印の方向に1ビットずつシフトする。   FIG. 8 is an explanatory diagram of AF signals (a pair of image signals) acquired from a plurality of pixels included in the focus detection area 602 in FIG. 8, a solid line 701 is one of the pair of image signals (A image signal), and a broken line 702 is the other of the pair of image signals (B image signal). FIG. 8A shows the A image signal and the B image signal before the shift, and FIGS. 8B and 8C show the A image signal and the B image signal, respectively, from the state of FIG. This shows a state shifted in the minus direction. When calculating the amount of correlation between a pair of image signals (A image signal indicated by a solid line 701 and B image signal indicated by a broken line 702), both the A image signal and the B image signal are bit-by-bit in the direction of the arrow. shift.

次に、相関量の算出方法について説明する。まず、図8(B)、(C)に示されるように、A像信号およびB像信号をそれぞれ1ビットずつシフトして、A像信号とB像信号との差の絶対値の和を算出する。相関量COR[i]は、以下の式(1)を用いて算出することができる。

Figure 2020003693
Next, a method of calculating the correlation amount will be described. First, as shown in FIGS. 8B and 8C, the A image signal and the B image signal are each shifted by one bit, and the sum of the absolute values of the differences between the A image signal and the B image signal is calculated. I do. The correlation amount COR [i] can be calculated using the following equation (1).
Figure 2020003693

式(1)において、iはシフト量、p−sはマイナス方向の最大シフト量、q−tはプラス方向の最大シフト量、xは焦点検出領域602の開始座標、yは焦点検出領域602の終了座標である。   In equation (1), i is the shift amount, ps is the maximum shift amount in the minus direction, qt is the maximum shift amount in the plus direction, x is the start coordinate of the focus detection area 602, and y is the coordinate of the focus detection area 602. End coordinates.

ここで、図9を参照して、シフト量と相関量CORとの関係について説明する。図9(A)、(B)は、シフト量と相関量CORとの関係の説明図である。図9(B)は図9(A)の領域802の拡大図である。図9(A)において、横軸はシフト量、縦軸は相関量CORをそれぞれ示している。シフト量とともに変化する相関量801における極値付近の領域802、803のうち、より小さい相関量に対応するシフト量において一対の像信号(A像信号、B像信号)の一致度が最も高くなる。   Here, the relationship between the shift amount and the correlation amount COR will be described with reference to FIG. FIGS. 9A and 9B are diagrams illustrating the relationship between the shift amount and the correlation amount COR. FIG. 9B is an enlarged view of a region 802 in FIG. In FIG. 9A, the horizontal axis represents the shift amount, and the vertical axis represents the correlation amount COR. Of the regions 802 and 803 near the extreme value in the correlation amount 801 that changes with the shift amount, the degree of coincidence between the pair of image signals (A image signal and B image signal) is the highest in the shift amount corresponding to the smaller correlation amount. .

次に、相関変化量の算出方法について説明する。本実施形態では、図9(A)に示される相関量801の波形における1シフトおきの相関量の差を相関変化量として算出する。相関変化量ΔCOR[i]は、以下の式(2)を用いて算出することができる。

Figure 2020003693
Next, a method of calculating the correlation change amount will be described. In the present embodiment, the difference between the correlation amounts at every other shift in the waveform of the correlation amount 801 shown in FIG. 9A is calculated as the correlation change amount. The correlation change amount ΔCOR [i] can be calculated using the following equation (2).
Figure 2020003693

ここで、図10を参照して、シフト量と相関変化量ΔCORとの関係について説明する。図10(A)、(B)は、シフト量と相関変化量ΔCORとの関係の説明図である。図10(B)は図10(A)の領域902の拡大図である。図10(A)において、横軸はシフト量、縦軸は相関変化量ΔCORをそれぞれ示している。シフト量とともに変化する相関変化量901は、領域902、903においてプラスからマイナスになる。相関変化量が0となる状態をゼロクロスと呼び、一対の像信号(A像信号、B像信号)の一致度が最も高くなる。このため、ゼロクロスを与えるシフト量が像ずれ量となる。   Here, the relationship between the shift amount and the correlation change amount ΔCOR will be described with reference to FIG. FIGS. 10A and 10B are diagrams illustrating the relationship between the shift amount and the correlation change amount ΔCOR. FIG. 10B is an enlarged view of a region 902 in FIG. In FIG. 10A, the horizontal axis represents the shift amount, and the vertical axis represents the correlation change amount ΔCOR. The correlation change amount 901 that changes with the shift amount changes from plus to minus in the regions 902 and 903. The state where the correlation change amount is 0 is called zero cross, and the degree of coincidence between a pair of image signals (A image signal and B image signal) is the highest. Therefore, the shift amount giving the zero cross is the image shift amount.

図10(B)において、904は相関変化量901の一部である。図10(B)を参照して、像ずれ量PRDの算出方法について説明する。ゼロクロスを与えるシフト量(k−1+α)は、整数部分β(=k−1)と小数部分αとに分けられる。小数部分αは、図10(B)中の三角形ABCと三角形ADEとの相似の関係から、以下の式(3)を用いて算出することができる。

Figure 2020003693
ここで、整数部分βは、図10(B)より、以下の式(4)を用いて算出することができる。
Figure 2020003693
In FIG. 10B, reference numeral 904 denotes a part of the correlation change amount 901. A method for calculating the image shift amount PRD will be described with reference to FIG. The shift amount (k−1 + α) that gives a zero cross is divided into an integer part β (= k−1) and a decimal part α. The decimal part α can be calculated from the similarity between the triangle ABC and the triangle ADE in FIG. 10B by using the following equation (3).
Figure 2020003693
Here, the integer part β can be calculated from FIG. 10B using the following equation (4).
Figure 2020003693

すなわち、小数部分αと整数部分βとの和から像ずれ量PRDを算出することができる。図10(A)に示されるように、相関変化量ΔCORのゼロクロスが複数存在する場合、その付近での相関変化量ΔCORの変化の急峻性がより大きい方を第1のゼロクロスとする。この急峻性はAFの行い易さを示す指標であり、その値が大きいほど高精度なAFを行い易い点であることを示す。急峻性maxderは、以下の式(5)を用いて算出することができる。

Figure 2020003693
本実施形態では、相関変化量のゼロクロスが複数存在する場合、その急峻性に基づいて第1のゼロクロスを決定し、第1のゼロクロスを与えるシフト量を像ずれ量とする。 That is, the image shift amount PRD can be calculated from the sum of the decimal part α and the integer part β. As shown in FIG. 10A, when there are a plurality of zero crosses of the correlation change amount ΔCOR, the one where the steepness of the change of the correlation change amount ΔCOR in the vicinity is larger is defined as the first zero cross. This steepness is an index indicating the ease of performing AF, and indicates that the larger the value, the easier it is to perform high-precision AF. The steepness maxder can be calculated using the following equation (5).
Figure 2020003693
In the present embodiment, when there are a plurality of zero crosses of the correlation change amount, the first zero cross is determined based on the steepness, and the shift amount that gives the first zero cross is defined as the image shift amount.

次に、像ずれ量の信頼性情報(信頼度)の算出方法について説明する。像ずれ量の信頼度は、一対の像信号(A像信号、B像信号)の一致度(2像の一致度)fnclvlと、前述の相関変化量ΔCORの急峻性とにより定義することができ、いずれの値から信頼度を取得してもよい。2像の一致度は、像ずれ量の精度を表す指標であり、ここではその値が小さいほど精度が良いことを意味する。図9(B)において、804は相関量801の一部である。2像の一致度fnclvlは、以下の式(6)を用いて算出することができる。

Figure 2020003693
Next, a method for calculating reliability information (reliability) of the image shift amount will be described. The reliability of the image shift amount can be defined by the coincidence degree (coincidence degree of two images) fnclvl of the pair of image signals (A image signal and B image signal) and the steepness of the correlation change amount ΔCOR described above. , The reliability may be obtained from any value. The coincidence between two images is an index indicating the accuracy of the amount of image shift. Here, a smaller value means higher accuracy. In FIG. 9B, reference numeral 804 denotes a part of the correlation amount 801. The coincidence fnclvl of the two images can be calculated using the following equation (6).
Figure 2020003693

次に、図11を参照して、デフォーカス量の選択(図6のステップS511)について説明する。図11は、デフォーカス量の選択を示すフローチャートである。図11の各ステップは、主にシステム制御部209により実行される。   Next, the selection of the defocus amount (step S511 in FIG. 6) will be described with reference to FIG. FIG. 11 is a flowchart showing the selection of the defocus amount. Each step in FIG. 11 is mainly executed by the system control unit 209.

まず、ステップS1001において、システム制御部209は、後述する大Def(第1デフォーカス量)から中Def(第2デフォーカス量)への引き継ぎ判定を行う。次に、ステップS1002において、システム制御部209は、大Defから中Defへの引き継ぎを行うことができたか否かを判定する。大Defから中Defへの引き継ぎを行うことができた場合(Yes)、ステップS1003へ進む。一方、大Defから中Defへの引き継ぎを行うことができなかった場合(No)、ステップS1007へ進む。   First, in step S1001, the system control unit 209 determines whether to switch from a large Def (first defocus amount) to a medium Def (second defocus amount) described later. Next, in step S1002, the system control unit 209 determines whether the handover from the large Def to the middle Def has been performed. If the transfer from the large Def to the middle Def has been performed (Yes), the process proceeds to step S1003. On the other hand, if the takeover from the large Def to the middle Def cannot be performed (No), the process proceeds to step S1007.

次に、ステップS1003において、システム制御部209は、後述する中def(第2デフォーカス量)から小def(第3デフォーカス量)への引き継ぎ判定を行う。次に、ステップS1004において、システム制御部209は、中Defから小Defへの引き継ぎを行うことができたか否かを判定する。中Defから小Defへの引き継ぎを行うことができた場合(Yes)、ステップS1005へ進む。一方、中Defから小Defへの引き継ぎを行うことができなかった場合(No)、ステップS1006へ進む。   Next, in step S1003, the system control unit 209 performs a transition determination from a below-described middle def (second defocus amount) to a small def (third defocus amount). Next, in step S1004, the system control unit 209 determines whether the takeover from the middle Def to the small Def has been performed. If the transfer from the middle Def to the small Def has been performed (Yes), the process proceeds to step S1005. On the other hand, if the transfer from the middle Def to the small Def cannot be performed (No), the process proceeds to step S1006.

ステップS1005において、システム制御部209は、フォーカスレンズ103の駆動(フォーカス制御)に用いるデフォーカス量として小defを選択し、本フローを終了する。また、ステップS1006において、システム制御部209は、フォーカス制御に用いるデフォーカス量として中Defを選択し、本フローを終了する。また、ステップS1007において、システム制御部209は、フォーカス制御に用いるデフォーカス量とし大Defを選択し、本フローを終了する。   In step S1005, the system control unit 209 selects small def as the defocus amount used for driving the focus lens 103 (focus control), and ends this flow. Also, in step S1006, the system control unit 209 selects medium Def as the defocus amount used for focus control, and ends this flow. In step S1007, the system control unit 209 selects the large Def as the defocus amount used for the focus control, and ends the present flow.

次に、図12を参照して、大Defから中Defへの引き継ぎ判定(図11のステップS1001)について説明する。図12の各ステップは、主にシステム制御部209により実行される。   Next, with reference to FIG. 12, a description will be given of the determination of the transition from the large Def to the middle Def (Step S1001 in FIG. 11). Each step in FIG. 12 is mainly executed by the system control unit 209.

まず、ステップS1101において、システム制御部209は、大Defと中Defのデフォーカス量の差が予め設定した第1深度閾値(第1閾値)以下であるか否かを判定する。大Defと中Defのデフォーカス量の差が第1深度閾値以下である場合(Yes)、ステップS1102へ進む。一方、この差が第1深度閾値よりも大きい場合(No)、ステップS1104へ進む。なお、第1深度閾値は、大Defから中Defへ適切に引き継ぐことができるように、例えば、焦点深度の9倍の量に設定される。また、第1深度閾値を、焦点深度を基準として設定する(焦点深度よりも大きくする)ことにより、F値や焦点検出領域が変化しても一律の閾値を設定することができる。   First, in step S1101, the system control unit 209 determines whether the difference between the defocus amounts of the large Def and the middle Def is equal to or less than a preset first depth threshold (first threshold). When the difference between the defocus amounts of the large Def and the middle Def is equal to or smaller than the first depth threshold (Yes), the process proceeds to step S1102. On the other hand, if the difference is larger than the first depth threshold (No), the process proceeds to step S1104. Note that the first depth threshold is set to, for example, nine times the depth of focus so that the large Def can be appropriately taken over from the middle Def. Also, by setting the first depth threshold based on the depth of focus (making it larger than the depth of focus), a uniform threshold can be set even if the F value or the focus detection area changes.

次に、ステップS1102において、システム制御部209は、中Defの信頼度(第2信頼度)が大Defの信頼度(第1信頼度)以上で、かつ中Defの信頼度が第2信頼度閾値(図4のステップS403の判定で用いる閾値)よりも高いか否かを判定する。これらの両方の条件を満たす場合(Yes)、ステップS1103へ進む。一方、少なくとも一方の条件を満たさない場合(No)、ステップS1104へ進む。   Next, in step S1102, the system control unit 209 determines that the reliability of the middle Def (second reliability) is equal to or greater than the reliability of the large Def (first reliability) and that the reliability of the middle Def is the second reliability. It is determined whether it is higher than a threshold value (threshold value used in the determination in step S403 in FIG. 4). If both of these conditions are satisfied (Yes), the process proceeds to step S1103. On the other hand, if at least one of the conditions is not satisfied (No), the process proceeds to step S1104.

ステップS1103において、システム制御部209は、大Defから中Defへの引き継ぎを行うことができると判定し、本フローを終了する。一方、ステップS1104において、システム制御部209は、大Defから中Defへの引き継ぎを行うことができないと判定し、本フローを終了する。これにより、大ボケ状態から小ボケ状態へフォーカスレンズ103を移動させる過程において、大Defと中Defのデフォーカス量の差とそれぞれの信頼度とに基づいて、大Defから中Defへの引き継ぎを行うことが可能か否かを判定することができる。   In step S1103, the system control unit 209 determines that the takeover from the large Def to the middle Def can be performed, and ends the flow. On the other hand, in step S1104, the system control unit 209 determines that the takeover from the large Def to the middle Def cannot be performed, and ends the flow. Thereby, in the process of moving the focus lens 103 from the large blur state to the small blur state, the transition from the large Def to the middle Def is performed based on the difference between the defocus amounts of the large Def and the middle Def and the respective reliability. It can be determined whether or not it is possible to do so.

次に、図13を参照して、中Defから小Defへの引き継ぎ判定(図11のステップS1003)について説明する。図13の各ステップは、主にシステム制御部209により実行される。まず、ステップS1201において、システム制御部209は、中Defが予め設定した第1のデフォーカス量閾値より大きいか否かを判断する。中Defが大きい場合(Yes)、ステップS1202へ進む。一方、中Defが小さい場合(No)、ステップS1203に進む。   Next, with reference to FIG. 13, a description will be given of the determination of the transition from the middle Def to the small Def (Step S1003 in FIG. 11). Each step in FIG. 13 is mainly executed by the system control unit 209. First, in step S1201, the system control unit 209 determines whether the middle Def is larger than a preset first defocus amount threshold. If the middle Def is large (Yes), the process proceeds to step S1202. On the other hand, if the middle Def is small (No), the process proceeds to step S1203.

なお、第1のデフォーカス量閾値は、中Defの大幅なずれ(誤測距)を検出できるように、例えば、焦点深度に設定される。これにより、特に合焦位置近傍での中Defの精度が低い場合を検出できる。また、第1のデフォーカス量閾値を、焦点深度を基準として設定することにより、F値や焦点検出領域が変化しても一律の閾値を設定することができる。   Note that the first defocus amount threshold is set to, for example, the depth of focus so that a large deviation (incorrect distance measurement) of the middle Def can be detected. This makes it possible to detect a case where the accuracy of the middle Def is low especially near the in-focus position. In addition, by setting the first defocus amount threshold with reference to the depth of focus, a uniform threshold can be set even when the F value or the focus detection area changes.

次に、ステップS1202において、システム制御部209は、中Defの信頼度を1ランク低くする処理を行い、ステップS1203へ進む。これにより、後述するステップS1204において判定される、中Defから小Defへの引き継ぎ条件を満たしやすくなり、小Defへの引き継ぎがされやすくなる。すなわち、中Defの信頼度を下げる処理(S1202)を入れることにより、中Defと小Defの選択に優先順位が付加され、合焦位置近傍で精度の低い中Defを選ばれにくくすることができる。   Next, in step S1202, the system control unit 209 performs a process of lowering the reliability of the middle Def by one rank, and proceeds to step S1203. As a result, the condition for taking over from the medium Def to the small Def, which is determined in step S1204 to be described later, is easily satisfied, and the takeover to the small Def becomes easy. That is, by adding the process of lowering the reliability of the middle Def (S1202), priority is added to the selection of the middle Def and the small Def, and it is possible to make it difficult to select the middle Def with low accuracy near the focus position. .

次に、ステップS1203において、システム制御部209は、中Defと小Defのデフォーカス量の差が予め設定した第2深度閾値(第2閾値)以下であるか否かを判定する。中Defと小Defのデフォーカス量の差が第2深度閾値以下である場合(Yes)、ステップS1204へ進む。一方、この差が第2深度閾値よりも大きい場合(No)、ステップS1206へ進む。   Next, in step S1203, the system control unit 209 determines whether the difference between the defocus amounts of the middle Def and the small Def is equal to or less than a preset second depth threshold (second threshold). If the difference between the defocus amounts of the middle Def and the small Def is equal to or smaller than the second depth threshold (Yes), the process proceeds to step S1204. On the other hand, if the difference is larger than the second depth threshold (No), the process proceeds to step S1206.

なお、第2深度閾値は、中Defから小Defへ適切に引き継ぐことができるように、例えば、焦点深度の3倍の量に設定される。また、第2深度閾値を、焦点深度を基準として設定する(焦点深度よりも大きくする)ことにより、F値や焦点検出領域が変化しても一律の閾値を設定することができる。また、第2深度閾値は、図12のステップS1101の判定にて用いられる第1深度閾値よりも小さい値に設定される。これは、小Def→中Def→大Defと変化するにつれて、デフォーカス量の検出ばらつきが大きくなる結果、小Defと中Defの差よりも中Defと大Defの差の方が大きくなるためである。   The second depth threshold is set to, for example, three times the depth of focus so that the medium Def can be appropriately taken over from the small Def. Also, by setting the second depth threshold based on the depth of focus (making it larger than the depth of focus), a uniform threshold can be set even if the F-number or the focus detection area changes. Further, the second depth threshold is set to a value smaller than the first depth threshold used in the determination in step S1101 of FIG. This is because the variation in the detection of the defocus amount increases as the change from small Def to middle Def to large Def occurs, so that the difference between the middle Def and the large Def becomes larger than the difference between the small Def and the middle Def. is there.

次に、ステップS1204において、システム制御部209は、小Defの信頼度が中Defの信頼度以上であり、かつ小Defの信頼度および中Defの信頼度の両方がそれぞれ第2信頼度閾値よりも高いか否かを判定する。これらの条件を全て満たす場合(Yes)、ステップS1205へ進む。一方、少なくとも一つの条件を満たさない場合(No)、ステップS1206へ進む。   Next, in step S1204, the system control unit 209 determines that the reliability of the small Def is greater than or equal to the reliability of the middle Def, and that both the reliability of the small Def and the reliability of the middle Def are greater than the second reliability threshold. Is also high. If all of these conditions are satisfied (Yes), the process proceeds to step S1205. On the other hand, if at least one condition is not satisfied (No), the process proceeds to step S1206.

次に、ステップS1205において、システム制御部209は、中Defから小Defへの引き継ぎを行うことができると判定し、本フローを終了する。一方、ステップS1206において、システム制御部209は、中Defから小Defへの引き継ぎを行うことができないと判定し、本フローを終了する。これにより、小ボケ状態から合焦位置へフォーカスレンズ103を移動させる過程において、中Defと小Defのデフォーカス量の差とそれぞれの信頼度とに基づいて、中Defから小Defへの引き継ぎを行うことが可能であるか否かを判定することができる。   Next, in step S1205, the system control unit 209 determines that the takeover from the middle Def to the small Def can be performed, and ends the flow. On the other hand, in step S1206, the system control unit 209 determines that it is not possible to take over from the middle Def to the small Def, and ends this flow. Thereby, in the process of moving the focus lens 103 from the small blur state to the in-focus position, the transition from the middle Def to the small Def is performed based on the difference between the defocus amounts of the middle Def and the small Def and the respective reliability. It can be determined whether it is possible to do so.

本実施形態では、低域フィルタ、中域フィルタ、高域フィルタを用いる場合について説明したが、フィルタの種類や数は限定されない。また、中Defと小Defの引き継ぎ判定時に、その選択に優先度を付加したが、その他の引き継ぎ判定時に優先度を付加してもよい。さらに、中Defの信頼度を低くすることで優先順位を付加したが、中Defと小Defの引き継ぎの閾値にヒステリシスを持たせることで、優先度を付加してもよい。   In the present embodiment, the case where the low-pass filter, the middle-pass filter, and the high-pass filter are used has been described, but the type and number of the filters are not limited. In addition, the priority is added to the selection when the medium Def and the small Def are determined to be taken over, but the priority may be added to other selections when determining the takeover. Further, the priority is added by lowering the reliability of the middle Def. However, the priority may be added by giving hysteresis to the threshold for taking over the middle Def and the small Def.

以上、本実施形態によれば、中Defが誤測距しているにも関わらず、信頼度が小Def信頼度と同等以上と算出された場合、中Def信頼度を1ランク下げた優先度を付加することで、選ばれにくくでき、安定した引き継ぎ判定ができる。つまり、コントラストの低い被写体で、低帯域フィルタの演算結果の信頼度が高帯域フィルタの信頼度と同等以上になった場合でも、その引き継ぎ判定時に、帯域に応じて優先度を付加することで、安定して高帯域フィルタに引き継ぐことができる。そして、レンズの反転を抑制し、合焦率を改善できる。   As described above, according to the present embodiment, when the reliability is calculated to be equal to or more than the small Def reliability even though the middle Def is erroneously measured, the priority of lowering the middle Def reliability by one rank Is added, the selection can be made difficult, and a stable handover determination can be made. In other words, even if the reliability of the calculation result of the low-band filter is equal to or higher than the reliability of the high-band filter in a subject having a low contrast, by adding the priority according to the band at the time of determining the handover, It can be taken over by a high-band filter stably. In addition, the inversion of the lens can be suppressed, and the focusing rate can be improved.

(第2実施形態)
次に、図14を参照して、本実施形態における自動選択時のAF動作について説明する。図14は、撮像装置の自動選択時の焦点検出処理を示すフローチャートである。この動作に関する制御プログラムは、AF信号処理部204によって実行される。AF信号処理部204は、AF動作を開始すると、まず、ステップS1301において、被写体に対する焦点調節を行うための焦点検出領域141を設定する。このステップS1301の処理では、図15に示すように縦横7×7の合計49個の焦点検出枠142が設定される。
(2nd Embodiment)
Next, an AF operation at the time of automatic selection according to the present embodiment will be described with reference to FIG. FIG. 14 is a flowchart illustrating a focus detection process when the imaging apparatus is automatically selected. A control program relating to this operation is executed by the AF signal processing unit 204. When the AF operation is started, first, in step S1301, the AF signal processing unit 204 sets a focus detection area 141 for performing focus adjustment on a subject. In the process of step S1301, as shown in FIG. 15, a total of 49 focus detection frames 142 (vertical and horizontal 7 × 7) are set.

次に、ステップS1302において、各焦点検出枠で、焦点検出に必要なAF用信号を取得する。具体的には、撮像素子201で露光を行った後、撮像面位相差AF用の焦点検出枠142の領域内の焦点検出用画素の像信号を取得する。次に、ステップS1303において、撮像面位相差AF用の各焦点検出枠について、得られた一対の像信号のずれ量からデフォーカス量を算出する。本実施形態では、算出されるデフォーカス量の信頼度も判定する。デフォーカス量と信頼度は、上述の第1実施形態と同様に算出できる。すなわち、デフォーカス量は、図6の焦点検出処理を行うことで得られ、信頼度は、AF用信号の信頼性情報(2像の一致度、2像の急峻度、コントラスト情報、飽和情報、およびキズ情報など)により算出できる。   Next, in step S1302, an AF signal necessary for focus detection is acquired in each focus detection frame. Specifically, after exposure is performed by the image sensor 201, an image signal of a focus detection pixel in the area of the focus detection frame 142 for the imaging surface phase difference AF is acquired. Next, in step S1303, a defocus amount is calculated from a shift amount of the obtained pair of image signals for each focus detection frame for the imaging surface phase difference AF. In the present embodiment, the reliability of the calculated defocus amount is also determined. The defocus amount and the reliability can be calculated in the same manner as in the first embodiment. That is, the defocus amount is obtained by performing the focus detection processing of FIG. 6, and the reliability is determined by the reliability information of the AF signal (the coincidence of two images, the steepness of two images, contrast information, saturation information, And flaw information).

本実施形態では、低域フィルタと高域フィルタを用いた場合について説明する。以下、低域フィルタを用いて算出したデフォーカス量まで引き継がれた焦点検出枠を低域フィルタ枠、高域フィルタ用いて算出したデフォーカス量まで引き継がれた焦点検出枠を高域フィルタ枠と表現する。また、算出されたデフォーカス量が所定の信頼度を有する場合に「デフォーカス量が算出された」と表現し、デフォーカス量が何らかの理由で算出できない、または、算出されたデフォーカス量の信頼度が低い場合に「デフォーカス量が算出できない」と表現する。   In the present embodiment, a case where a low-pass filter and a high-pass filter are used will be described. Hereinafter, the focus detection frame inherited up to the defocus amount calculated using the low-pass filter is expressed as a low-pass filter frame, and the focus detection frame inherited up to the defocus amount calculated using the high-pass filter is expressed as a high-pass filter frame. I do. Further, when the calculated defocus amount has a predetermined reliability, it is expressed as “the defocus amount has been calculated”, and the defocus amount cannot be calculated for some reason, or the calculated defocus amount is not reliable. When the degree is low, it is expressed as “the defocus amount cannot be calculated”.

次に、ステップS1304において、ステップS1301で設定した複数の焦点検出枠142の中から最も撮影者がピントを合わせたい被写体を選択する枠選択処理を行う。基本的には、最も至近側の被写体を示すデフォーカス量の焦点検出枠を選択するが、一般に、撮影者がピントを合わせたい被写体は、至近側に存在することが多いためである。この枠選択処理についての詳細は後述する。次に、ステップS1305において、枠選択された焦点検出枠142で算出されたデフォーカス量に基づきフォーカスレンズ103の駆動を行う(合焦制御)。   Next, in step S1304, frame selection processing is performed to select a subject to which the photographer wants to focus most from among the plurality of focus detection frames 142 set in step S1301. Basically, a focus detection frame with a defocus amount indicating the closest object is selected. However, in general, an object which a photographer wants to focus on is often present on the closest side. Details of this frame selection processing will be described later. Next, in step S1305, the focus lens 103 is driven based on the defocus amount calculated by the selected focus detection frame 142 (focus control).

次に、ステップS1306において、レンズ駆動に用いたデフォーカス量が算出された焦点検出枠に関して、表示部213に合焦表示を行い、焦点検出処理を終了する。合焦表示処理においては、選択した枠のみを表示してもよいし、選択した焦点検出枠とデフォーカス量の差分が所定内である焦点検出枠を全てもしくは一部を表示するようにしてもよい。   Next, in step S1306, a focus display is performed on the display unit 213 for the focus detection frame for which the defocus amount used for driving the lens has been calculated, and the focus detection processing ends. In the focus display processing, only the selected frame may be displayed, or all or a part of the focus detection frames whose difference between the selected focus detection frame and the defocus amount is within a predetermined range may be displayed. Good.

以下、ステップS1304で行う枠選択処理の詳細について図16を用いて説明する。まず、ステップS1501において、デフォーカス量が算出された焦点検出枠の中で、高域フィルタ枠の信頼度が予め設定した第3信頼度閾値以上の枠が存在するか否かを判定する。存在する場合(Yes)、信頼度が第3信頼度閾値以上の焦点検出枠を候補枠として設定し、ステップS1503へ進む。一方、存在しない場合(No)、ステップS1502へ進む。   Hereinafter, details of the frame selection process performed in step S1304 will be described with reference to FIG. First, in step S1501, it is determined whether or not there is a frame in which the reliability of the high-pass filter frame is equal to or greater than a third reliability threshold set in advance among the focus detection frames for which the defocus amount has been calculated. If it exists (Yes), a focus detection frame whose reliability is equal to or higher than the third reliability threshold is set as a candidate frame, and the process proceeds to step S1503. On the other hand, if it does not exist (No), the process proceeds to step S1502.

次に、ステップS1502において、デフォーカス量が算出された焦点検出枠の中で、低域フィルタ枠の信頼度が予め設定した第3信頼度閾値以上の枠が存在するか否かを判定する。存在する場合(Yes)、信頼度が第3信頼度閾値以上の焦点検出枠を候補枠として設定し、ステップS1503へ進む。一方、存在しない場合(No)、ステップS1505へ進み、選択枠「なし」と判定し、本フローを終了する。   Next, in step S1502, it is determined whether or not there is a frame in which the reliability of the low-pass filter frame is equal to or greater than a predetermined third reliability threshold among the focus detection frames for which the defocus amount has been calculated. If it exists (Yes), a focus detection frame whose reliability is equal to or higher than the third reliability threshold is set as a candidate frame, and the process proceeds to step S1503. On the other hand, if it does not exist (No), the process proceeds to step S1505, it is determined that the selection frame is "none", and the present flow ends.

このように、まず、高域フィルタ枠で信頼度の判定をして、条件を満たさなければ低域フィルタの枠の信頼度を判定する。これにより、高域フィルタ枠と低域フィルタ枠の選択に優先度が付加され、合焦位置近傍で精度の低い低帯域フィルタを用いて算出されたデフォーカス量を選ばれにくくすることができる。   As described above, first, the reliability is determined in the high-pass filter frame, and if the condition is not satisfied, the reliability of the low-pass filter frame is determined. Thereby, priority is added to the selection of the high-pass filter frame and the low-pass filter frame, and it is possible to make it difficult to select a defocus amount calculated using a low-accuracy low-band filter near the focus position.

次に、ステップS1503において、ステップS1501〜ステップS1502で候補枠として設定された枠の中で、最も至近の枠を選択枠として設定し、本フローを終了する。   Next, in step S1503, among the frames set as the candidate frames in steps S1501 to S1502, the closest frame is set as the selection frame, and this flow ends.

選択枠が「なし」となった場合では、図14のステップS1305においては、フォーカスレンズ103の駆動を行うことはせずに非合焦と判断し、表示部213に非合焦表示する処理を行ってもよい。また、信頼性の高い枠が選択されるまでフォーカスレンズ103を所定の方向へ駆動させ続けるサーチ駆動を行ってもよい。   When the selection frame is set to “none”, in step S1305 in FIG. 14, it is determined that the focus lens 103 is not in focus without driving, and the process of displaying out of focus on the display unit 213 is performed. May go. Further, a search drive in which the focus lens 103 is driven in a predetermined direction until a highly reliable frame is selected may be performed.

なお、本実施形態では、低域フィルタと高域フィルタを用いる場合について説明したが、フィルタの種類や数は限定されない。また、より低域のフィルタをより選ばれにくくすることで効果が得られるため、すべてのフィルタに優先度を付加してもよいし、少なくともひとつのフィルタに優先度を付加してもよい。   In the present embodiment, the case where the low-pass filter and the high-pass filter are used has been described, but the type and number of the filters are not limited. In addition, since an effect is obtained by making it harder to select a lower band filter, a priority may be added to all filters, or a priority may be added to at least one filter.

以上、本実施形態によれば、高帯域フィルタ枠と低帯域フィルタ枠の双方で選択枠に選ばれる条件を満たす焦点検出枠が存在した場合でも、高帯域フィルタ枠の判定から実施することで優先度を付加する。そして、より精度の高い高帯域フィルタを用いて算出したデフォーカス量を選択できる。つまり、自動選択モードにおいて、焦点検出領域141内にコントラストの低い被写体を含む場合でも、その枠選択時に、帯域に応じて優先度を付加する。これにより、より正確に撮影者が焦点調節を行いたいコントラストの高い被写体の焦点検出枠を選択でき、ボケ合焦を抑制できる。   As described above, according to the present embodiment, even when there is a focus detection frame that satisfies the condition selected as the selection frame in both the high-band filter frame and the low-band filter frame, priority is given by performing the determination from the high-band filter frame. Add degrees. Then, the defocus amount calculated using the higher-precision high-band filter can be selected. That is, in the automatic selection mode, even when a low-contrast subject is included in the focus detection area 141, the priority is added according to the band when the frame is selected. This makes it possible to more accurately select a focus detection frame of a high-contrast subject that the photographer wants to perform focus adjustment, thereby suppressing blurring.

このように、上述の実施形態では、フィルタ帯域引き継ぎや焦点検出枠の選択時に、バンドパスフィルタの周波数帯域に応じて優先度をつけることで、コントラストの低い被写体を含む場合の合焦率を改善できる。このことから、焦点検出時に、コントラストの低い被写体を含む場合であっても、非合焦やボケ合焦を軽減できる撮像装置を提供することができる。   As described above, in the above-described embodiment, when the filter band is taken over or the focus detection frame is selected, the priority is given according to the frequency band of the band-pass filter, thereby improving the focusing rate in a case where a low-contrast subject is included. it can. From this, it is possible to provide an imaging device that can reduce out-of-focus or blur focus even when a low-contrast subject is included in focus detection.

また、本発明の好ましい実施形態について説明したが、本発明は、これらの実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。   Although the preferred embodiments of the present invention have been described, the present invention is not limited to these embodiments, and various modifications and changes can be made within the scope of the gist.

10 撮影装置
204a 取得手段
204b 算出手段
204 AF信号処理部
209 システム制御部
Reference Signs List 10 photographing device 204a acquisition unit 204b calculation unit 204 AF signal processing unit 209 system control unit

Claims (8)

撮像光学系の互いに異なる瞳領域を通過する光束に対応する第1信号および第2信号を取得する取得手段と、
前記第1信号および前記第2信号に対して帯域が互いに異なる複数のフィルタ処理を行い、各々のフィルタ処理後の第1信号および第2信号に基づいて複数のデフォーカス量および複数の信頼度を算出する算出手段と、
前記複数のデフォーカス量の差と、前記複数の信頼度の少なくとも一つに基づいて、前記複数のデフォーカス量の中から焦点調節に用いられるデフォーカス量を決定する決定手段と
を備え、
前記決定手段は、前記複数のデフォーカス量の少なくとも一つ以上に、前記デフォーカス量の決定の優先度を各々付加する
ことを特徴とする撮影装置。
Acquiring means for acquiring a first signal and a second signal corresponding to a light beam passing through different pupil regions of the imaging optical system;
A plurality of filter processes having different bands are performed on the first signal and the second signal, and a plurality of defocus amounts and a plurality of reliability are determined based on the first signal and the second signal after the respective filter processes. Calculating means for calculating;
A determination unit that determines a defocus amount used for focus adjustment from among the plurality of defocus amounts, based on at least one of the difference between the plurality of defocus amounts and the plurality of degrees of reliability,
The image capturing apparatus according to claim 1, wherein the determining unit adds a priority of determining the defocus amount to at least one of the plurality of defocus amounts.
前記決定手段は、前記複数のデフォーカス量のうち、相対的に低い帯域のフィルタを用いて算出されたデフォーカス量の決定の優先度をより低く設定する
ことを特徴とする請求項1に記載の撮影装置。
2. The method according to claim 1, wherein the determining unit sets a lower priority for determining a defocus amount calculated using a filter having a relatively low band among the plurality of defocus amounts. 3. Shooting equipment.
前記決定手段は、前記複数のデフォーカス量のうち、相対的に最も低い帯域のフィルタを用いて算出されたデフォーカス量の信頼度を低く設定する
ことを特徴とする請求項1または2に記載の撮影装置。
3. The method according to claim 1, wherein the determining unit sets low reliability of the defocus amount calculated using a filter having a relatively lowest band among the plurality of defocus amounts. 4. Shooting equipment.
前記決定手段は、前記複数のデフォーカス量のうち、合焦判定を行うフィルタを用いて算出されたデフォーカス量を決定する際に前記優先度を付加する
ことを特徴とする請求項1〜3のいずれか1項に記載の撮影装置。
4. The method according to claim 1, wherein the determining unit adds the priority when determining a defocus amount calculated using a filter that performs focus determination among the plurality of defocus amounts. 5. The imaging device according to any one of the above.
前記決定手段は、前記複数のデフォーカス量の決定する条件である閾値にヒステリシスを持たせて、前記焦点調節に用いられるデフォーカス量を相対的に低い帯域のフィルタを用いて算出されたデフォーカス量から相対的に高い帯域のフィルタを用いて算出されたデフォーカス量へ切り替える
ことを特徴とする請求項1〜4のいずれか1項に記載の撮影装置。
The determining means sets a threshold value, which is a condition for determining the plurality of defocus amounts, to have a hysteresis, so that the defocus amount used for the focus adjustment is calculated using a filter having a relatively low band. The imaging apparatus according to any one of claims 1 to 4, wherein the amount is switched to a defocus amount calculated using a filter having a relatively high band from the amount.
前記決定手段は、前記複数のデフォーカス量のうち、相対的に低い帯域のフィルタを用いて算出されたデフォーカス量を、前記焦点調節に用いられるデフォーカス量として相対的に後に決定する
ことを特徴とする請求項1〜5のいずれか1項に記載の撮影装置。
The determining means may determine a defocus amount calculated using a filter of a relatively low band among the plurality of defocus amounts relatively later as a defocus amount used for the focus adjustment. The photographing apparatus according to claim 1, wherein:
前記決定手段は、前記複数のデフォーカス量のうち、相対的に最も低い帯域のフィルタを用いて算出されたデフォーカス量を、前記焦点調節に用いられるデフォーカス量として他のフィルタの後に決定する
ことを特徴とする請求項1〜6のいずれか1項に記載の撮影装置。
The determining means determines, after the other filters, a defocus amount calculated using a filter having a relatively lowest band among the plurality of defocus amounts as a defocus amount used for the focus adjustment. The photographing apparatus according to claim 1, wherein:
撮像光学系の互いに異なる瞳領域を通過する光束に対応する第1信号および第2信号を取得する取得工程と、
前記第1信号および前記第2信号に対して帯域が互いに異なる複数のフィルタ処理を行い、各々のフィルタ処理後の第1信号および第2信号に基づいて複数のデフォーカス量および複数の信頼度を算出する算出工程と、
前記複数のデフォーカス量の差と、前記複数の信頼度の少なくとも一つとに基づいて、前記複数のデフォーカス量の中から焦点調節に用いられるデフォーカス量を決定する決定工程と
を有し、
前記決定工程では、前記複数のデフォーカス量の少なくとも一つ以上に、選択の優先度を各々付加する
ことを特徴とするの撮像装置の制御方法。
An acquisition step of acquiring a first signal and a second signal corresponding to a light beam passing through different pupil regions of the imaging optical system;
A plurality of filter processes having different bands are performed on the first signal and the second signal, and a plurality of defocus amounts and a plurality of reliability are determined based on the first signal and the second signal after the respective filter processes. A calculating step of calculating;
Determining a defocus amount used for focus adjustment from among the plurality of defocus amounts, based on a difference between the plurality of defocus amounts and at least one of the plurality of degrees of reliability,
In the determining step, a priority of selection is added to at least one or more of the plurality of defocus amounts, respectively.
JP2018124091A 2018-06-29 2018-06-29 Imaging device and imaging device control method Active JP7179509B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018124091A JP7179509B2 (en) 2018-06-29 2018-06-29 Imaging device and imaging device control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018124091A JP7179509B2 (en) 2018-06-29 2018-06-29 Imaging device and imaging device control method

Publications (2)

Publication Number Publication Date
JP2020003693A true JP2020003693A (en) 2020-01-09
JP7179509B2 JP7179509B2 (en) 2022-11-29

Family

ID=69100026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018124091A Active JP7179509B2 (en) 2018-06-29 2018-06-29 Imaging device and imaging device control method

Country Status (1)

Country Link
JP (1) JP7179509B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111491105A (en) * 2020-04-24 2020-08-04 Oppo广东移动通信有限公司 Focusing method of mobile terminal, mobile terminal and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000147363A (en) * 1998-11-05 2000-05-26 Nikon Corp Focus detector
JP2006311058A (en) * 2005-04-27 2006-11-09 Olympus Imaging Corp Motion vector detection circuit and detection method thereof, and camera shake correction apparatus
JP2018031916A (en) * 2016-08-25 2018-03-01 キヤノン株式会社 Focus adjustment device, its control method, and program
JP2018036628A (en) * 2016-08-24 2018-03-08 キヤノン株式会社 Control device, imaging apparatus, control method, program, and storage medium
JP2018045102A (en) * 2016-09-14 2018-03-22 キヤノン株式会社 Focus adjustment device and imaging apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000147363A (en) * 1998-11-05 2000-05-26 Nikon Corp Focus detector
JP2006311058A (en) * 2005-04-27 2006-11-09 Olympus Imaging Corp Motion vector detection circuit and detection method thereof, and camera shake correction apparatus
JP2018036628A (en) * 2016-08-24 2018-03-08 キヤノン株式会社 Control device, imaging apparatus, control method, program, and storage medium
JP2018031916A (en) * 2016-08-25 2018-03-01 キヤノン株式会社 Focus adjustment device, its control method, and program
JP2018045102A (en) * 2016-09-14 2018-03-22 キヤノン株式会社 Focus adjustment device and imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111491105A (en) * 2020-04-24 2020-08-04 Oppo广东移动通信有限公司 Focusing method of mobile terminal, mobile terminal and computer storage medium
CN111491105B (en) * 2020-04-24 2021-07-27 Oppo广东移动通信有限公司 Focusing method of mobile terminal, mobile terminal and computer storage medium

Also Published As

Publication number Publication date
JP7179509B2 (en) 2022-11-29

Similar Documents

Publication Publication Date Title
JP6457776B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6506560B2 (en) Focus control device and method therefor, program, storage medium
US20140211050A1 (en) Imaging device, imaging method and recording medium
JP6548435B2 (en) Display control apparatus, control method therefor, and imaging apparatus
US10542202B2 (en) Control apparatus that performs focusing by imaging-plane phase difference AF, image capturing apparatus, control method, and non-transitory computer-readable storage medium
JP2014137468A (en) Imaging apparatus and imaging method
EP3125037B1 (en) Lens control device, lens control method, and recording medium
JP6808333B2 (en) Display control device and method, and imaging device
JP6971692B2 (en) Control device, image pickup device, control method, program, and storage medium
JP2019133026A (en) Imaging apparatus and focus adjustment method thereof, and program
JP6139960B2 (en) Imaging apparatus and control method thereof
US11323689B2 (en) Image processing device, imaging device, image processing method, and recording medium
JP6833405B2 (en) Focus detection device, focus adjustment device, imaging device and focus detection method
JP6087714B2 (en) Imaging apparatus and control method thereof
JP6234016B2 (en) Focus adjustment device, imaging device, and control method thereof
JP2013160991A (en) Imaging apparatus
JP7179509B2 (en) Imaging device and imaging device control method
US10747089B2 (en) Imaging apparatus and control method of the same
JP2016156950A (en) Automatic focus adjustment device and control method of the same
JP6238547B2 (en) Focus adjustment apparatus and control method thereof
CN106993110B (en) Image pickup apparatus and control method thereof
JP6859388B2 (en) Imaging device, focus adjustment device, and its control method
JP2018091977A (en) Focus controller, imaging apparatus, focus control method, and focus control program
JP6884582B2 (en) Imaging device, imaging method and imaging program
CN107454310B (en) Image pickup apparatus, control method thereof, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210628

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220506

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220517

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220719

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220809

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221004

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221116

R151 Written notification of patent or utility model registration

Ref document number: 7179509

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151