JP2017187726A - Imaging apparatus and method for driving imaging element - Google Patents

Imaging apparatus and method for driving imaging element Download PDF

Info

Publication number
JP2017187726A
JP2017187726A JP2016078433A JP2016078433A JP2017187726A JP 2017187726 A JP2017187726 A JP 2017187726A JP 2016078433 A JP2016078433 A JP 2016078433A JP 2016078433 A JP2016078433 A JP 2016078433A JP 2017187726 A JP2017187726 A JP 2017187726A
Authority
JP
Japan
Prior art keywords
focus
focus detection
read
row
predetermined
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.)
Pending
Application number
JP2016078433A
Other languages
Japanese (ja)
Inventor
俊彦 友定
Toshihiko Tomosada
俊彦 友定
誠 横関
Makoto Yokozeki
誠 横関
本田 公文
Kimifumi Honda
公文 本田
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 JP2016078433A priority Critical patent/JP2017187726A/en
Publication of JP2017187726A publication Critical patent/JP2017187726A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce the decrease of focus detection performance, when an area where focus detection is possible is limited in an imaging area.SOLUTION: An imaging apparatus includes: an imaging element which can switch first read-out control for reading out a signal so as to obtain a pair of focus detection signals and second read-out control for adding an electric charge for each pixel and reading out an addition signal, to perform read-out; setting means which sets a row read out by the first read-out control among the plurality of rows of a plurality of photoelectric conversion parts including a focus detection area; and focus detection means which performs the detection of a focus state by a phase difference system by using the pair of focus detection signals obtained from a partial range of the row read out by the first read-out control. When the reliability of the focus state detected by first focus detection means is lower than a first threshold, the setting means changes the row read out by the first read-out control to the row not read out by the first read-out control.SELECTED DRAWING: Figure 10

Description

本発明は、撮像装置および撮像素子の駆動方法に関し、更に詳しくは、撮像素子から得られた画像信号を用いて焦点検出を行う撮像装置および撮像素子の駆動方法に関する。   The present invention relates to an imaging apparatus and an imaging element driving method, and more particularly to an imaging apparatus that performs focus detection using an image signal obtained from an imaging element and an imaging element driving method.

撮像装置で行われる焦点検出方法の1つに、撮像素子に形成された焦点検出画素により位相差方式の焦点検出を行う撮像面位相差方式がある。撮像面位相差方式の焦点検出においては、撮像素子に形成された焦点検出画素により、デフォーカス方向とデフォーカス量を同時に検出することが可能である。従って、画像信号のコントラスト状態に基づいて焦点検出を行う、いわゆるコントラスト方式と比較して、高速に焦点調節を行うことができる。また、撮像素子とは別に焦点検出用のセンサを用いる場合とは違い、撮像用と焦点検出用の光学系が同じであるため、視差(パララックス)の影響が無く、更には撮像装置の小型化にもつながる。   As one of focus detection methods performed in the imaging apparatus, there is an imaging plane phase difference method in which focus detection by a phase difference method is performed by focus detection pixels formed on an image sensor. In focus detection using the imaging surface phase difference method, it is possible to detect the defocus direction and the defocus amount at the same time by using focus detection pixels formed on the image sensor. Accordingly, the focus adjustment can be performed at a higher speed than the so-called contrast method in which focus detection is performed based on the contrast state of the image signal. Unlike the case where a focus detection sensor is used in addition to the image sensor, the imaging and focus detection optical systems are the same, so there is no influence of parallax, and the imaging device is compact. It also leads to

従来、撮像画素の間に焦点検出画素を離散的に配置する方法が提案されているが、以下のような課題があった。まず、撮像領域に対して焦点検出が可能な領域が固定位置となり限られるため、焦点検出領域の設定に制約ができる。また、焦点検出画素は画像を得る場合には欠陥画素扱いとなり、焦点検出画素の出力信号を周りの撮像画素の出力信号で補間する必要があるため、画質が低下する。そこで、特許文献1および2参照には、撮像素子上の全ての画素を2つ以上の独立して読み出し可能なフォトダイオードを用いて形成し、1つの画素が撮像機能と焦点検出機能を兼ね備えることで、撮像用の読み出しと同時に焦点検出を行う方法が提案されている。   Conventionally, a method of discretely arranging focus detection pixels between imaging pixels has been proposed, but there are the following problems. First, since a region where focus detection is possible with respect to the imaging region is limited to a fixed position, setting of the focus detection region can be restricted. Further, the focus detection pixel is treated as a defective pixel when an image is obtained, and the output signal of the focus detection pixel needs to be interpolated with the output signal of the surrounding imaging pixels, so that the image quality is deteriorated. Therefore, in Patent Documents 1 and 2, all the pixels on the image sensor are formed using two or more independently readable photodiodes, and one pixel has both an imaging function and a focus detection function. Thus, a method of performing focus detection simultaneously with readout for imaging has been proposed.

特開2001−250931号公報JP 2001-250931 A 特開2015−43026号公報Japanese Unexamined Patent Publication No. 2015-43026

しかしながら、特許文献1および特許文献2いずれの方法においても、近年の4K、8Kカメラなどのように高解像度化や、高速度撮影が可能なハイスピードカメラなどのようにフレームレートの高速化が進むにつれて、次のような課題が発生していた。即ち、所定時間で読み出せる焦点検出画素数に限りがあったり、読み出した焦点検出信号を用いて行う位相差方式の演算処理時間にも限りがあるため、撮像領域に対して一部の限られた領域のみでしか焦点検出ができないという制約が発生していた。   However, in both methods of Patent Document 1 and Patent Document 2, the resolution is increased as in recent 4K and 8K cameras, and the frame rate is increased as in a high-speed camera capable of high-speed shooting. As a result, the following problems occurred. In other words, the number of focus detection pixels that can be read out in a predetermined time is limited, and the phase difference calculation processing time that is performed using the read focus detection signal is also limited. There has been a restriction that focus detection can be performed only in a certain area.

一般的なカメラでは、焦点検出枠は撮像領域に対して所定の割合の大きさで設定されるが、上記の制約により設定される焦点検出枠の大きさによっては、焦点検出枠内に焦点検出ができない領域が存在してしまう。この場合、例えば、焦点検出枠内に被写体が存在しても、焦点検出ができない領域に被写体があると、正しい焦点検出結果(デフォーカス方向とデフォーカス量)が得られず、意図した焦点調節ができないといった問題がある。また、焦点検出ができない領域に被写体がある場合に、むやみにレンズを動かし続けたり、レンズを止めたりしてしまうと、動画としての品位が落ちてしまうという問題もある。   In a general camera, the focus detection frame is set at a predetermined ratio with respect to the imaging area. However, depending on the size of the focus detection frame set by the above-mentioned restrictions, focus detection is performed within the focus detection frame. There is an area that cannot be used. In this case, for example, if there is a subject in an area where focus detection is not possible even if the subject exists within the focus detection frame, the correct focus detection result (defocus direction and defocus amount) cannot be obtained, and the intended focus adjustment is performed. There is a problem that can not be. In addition, when there is a subject in a region where focus detection cannot be performed, if the lens is moved continuously or stopped, there is a problem that the quality of the moving image is deteriorated.

本発明は上記問題点を鑑みてなされたものであり、撮像領域の内、焦点検出が可能な領域が限られている場合に、焦点検出性能の低下を軽減することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to reduce a decrease in focus detection performance when a region where focus detection is possible is limited.

上記目的を達成するために、本発明の撮像装置は、行列状に配置された複数のマイクロレンズそれぞれに対して複数の光電変換部を有し、前記複数の光電変換部から、対の焦点検出信号を得られるように信号を読み出す第1の読み出し制御と、各マイクロレンズごとに対応する前記複数の光電変換部に蓄積された電荷を加算して加算信号を読み出す第2の読み出し制御とを、切り替えて読み出し可能な撮像素子と、予め決められた第1の焦点検出領域を含む前記第2の読み出し制御により読み出す複数の行のうち、前記第1の読み出し制御により読み出す行を設定する設定手段と、前記第1の読み出し制御により読み出された行のうち、一部の範囲から得られた対の焦点検出信号を用いて位相差方式による焦点状態の検出を行う第1の焦点検出手段と、を有し、前記設定手段は、予め決められた条件に基づいて、前記第1の読み出し制御により読み出す行の設定を変更する。   In order to achieve the above object, an imaging apparatus of the present invention has a plurality of photoelectric conversion units for each of a plurality of microlenses arranged in a matrix, and a pair of focus detections from the plurality of photoelectric conversion units. A first readout control for reading out the signal so as to obtain a signal, and a second readout control for reading out the added signal by adding the charges accumulated in the plurality of photoelectric conversion units corresponding to each microlens, An image sensor that can be switched and read, and a setting unit that sets a row to be read by the first read control among a plurality of rows to be read by the second read control including a predetermined first focus detection region. First focus detection for detecting a focus state by a phase difference method using a pair of focus detection signals obtained from a part of the rows read by the first read control. A means, wherein the setting means, based on a predetermined condition, changes the setting of the row reading by said first reading control.

本発明によれば、撮像領域の内、焦点検出が可能な領域が限られている場合に、焦点検出性能の低下を軽減することができる。   According to the present invention, it is possible to reduce a decrease in focus detection performance when a region where focus detection is possible is limited in the imaging region.

本発明の実施の形態に係る撮像装置の概略構成図。1 is a schematic configuration diagram of an imaging apparatus according to an embodiment of the present invention. 実施の形態における撮像素子の画素配列の概略図。Schematic of the pixel arrangement | sequence of the image pick-up element in embodiment. 実施の形態における画素の概略平面図と概略断面図。FIG. 2 is a schematic plan view and a schematic cross-sectional view of a pixel in an embodiment. 実施の形態における画素構造と瞳分割の概略説明図。Schematic explanatory drawing of the pixel structure and pupil division in the embodiment. 実施の形態における撮像光学系と撮像素子における瞳分割の概略説明図。FIG. 2 is a schematic explanatory diagram of pupil division in an imaging optical system and an imaging element in an embodiment. 実施の形態における第1焦点検出信号と第2焦点検出信号のデフォーカス量と像ずれ量との概略関係図。FIG. 6 is a schematic relationship diagram between a defocus amount and an image shift amount of a first focus detection signal and a second focus detection signal in the embodiment. 第1の実施形態における撮像面位相差方式の焦点検出処理を示すフローチャート。5 is a flowchart illustrating focus detection processing using an imaging surface phase difference method according to the first embodiment. 第1の実施形態における焦点検出領域の設定処理を示すフローチャート。5 is a flowchart illustrating focus detection area setting processing according to the first embodiment. 従来の撮像面位相差方式による焦点検出処理の課題を説明するための図。The figure for demonstrating the subject of the focus detection process by the conventional imaging surface phase difference system. 第1の実施形態における焦点検出領域の設定例を示す図。FIG. 5 is a diagram illustrating an example of setting a focus detection area in the first embodiment. 第1の実施形態における焦点検出領域の配置変更中のコントラストAF制御について説明するための図。The figure for demonstrating contrast AF control during arrangement | positioning change of the focus detection area | region in 1st Embodiment. 第2の実施形態におけるコントラスト方式による焦点検出処理を示すフローチャート。9 is a flowchart illustrating focus detection processing by a contrast method according to the second embodiment. 第2の実施形態における焦点検出領域の設定処理を示すフローチャート。10 is a flowchart illustrating focus detection area setting processing according to the second embodiment.

以下、添付図面を参照して本発明を実施するための形態を詳細に説明する。ただし、本形態において例示される構成部品の寸法、形状、それらの相対配置などは、本発明が適用される装置の構成や各種条件により適宜変更されるべきものであり、本発明がそれらの例示に限定されるものではない。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings. However, the dimensions, shapes, relative arrangements, and the like of the components exemplified in the present embodiment should be changed as appropriate according to the configuration of the apparatus to which the present invention is applied and various conditions. It is not limited to.

●全体構成
図1は、本実施形態における焦点調節装置を含むビデオカメラ(撮像装置)の構成を示す。なお、本実施形態では、後述するように、撮像素子から得られた位相差を有する信号に基づいて、撮像面位相差方式の焦点検出結果に応じて焦点検出領域を変更し、焦点調節動作を行うビデオカメラについて説明する。なお、本実施形態における撮像装置は、デジタルカメラ、デジタルビデオカメラのようなカメラはもとより、カメラ機能付き携帯電話、カメラ付きコンピュータなど、カメラ機能を備える任意の電子機器であっても良い。
Overall Configuration FIG. 1 shows a configuration of a video camera (imaging device) including a focus adjustment device in the present embodiment. In this embodiment, as will be described later, based on a signal having a phase difference obtained from the image sensor, the focus detection region is changed according to the focus detection result of the imaging surface phase difference method, and the focus adjustment operation is performed. A video camera to be performed will be described. Note that the imaging apparatus according to the present embodiment may be any electronic device having a camera function such as a mobile phone with a camera function, a computer with a camera, as well as a camera such as a digital camera or a digital video camera.

図1において、第1固定レンズ101、変倍レンズ102、絞り103、第2固定レンズ104、及びフォーカスコンペンセータレンズ105により、被写体からの光を結像するための撮像光学系が構成されている。変倍レンズ102は光軸方向に移動して変倍動作を行う。また、フォーカスコンペンセータレンズ(以下、フォーカスレンズ)105は変倍に伴う焦点面の移動を補正する機能と焦点調節機能とを兼ね備えている。   In FIG. 1, the first fixed lens 101, the variable magnification lens 102, the diaphragm 103, the second fixed lens 104, and the focus compensator lens 105 constitute an imaging optical system for imaging light from a subject. The variable power lens 102 moves in the optical axis direction and performs a variable power operation. A focus compensator lens (hereinafter referred to as a focus lens) 105 has both a function of correcting the movement of the focal plane accompanying zooming and a focus adjustment function.

フォーカシング駆動部111は、焦点調節のためにフォーカスレンズ105を光軸方向に移動させるための駆動部であり、ステッピングモータ、DCモータ、振動型モータ、及びボイスコイルモータ等のアクチュエータにより構成される。   The focusing drive unit 111 is a drive unit for moving the focus lens 105 in the optical axis direction for focus adjustment, and includes an actuator such as a stepping motor, a DC motor, a vibration motor, and a voice coil motor.

撮像素子106は、CCDセンサやCMOSセンサ等の光電変換素子と周辺部とを備えて構成され、撮像光学系を通過した光が結像して形成された被写体像を光電変換して電気信号を出力する。なお、詳細は後述するが、本実施形態の撮像素子106は、2次元に配列された複数のマイクロレンズそれぞれに対して2つの光電変換部を備えている。そして、2つの光電変換部それぞれに対応する一対の焦点検出信号を生成可能に読み出す読み出し方法(第1の読み出し方法)と、2つの光電変換部の出力を加算した画素信号のみを読み出す読み出し方法(第2の読み出し方法)とにより駆動することができる。   The image sensor 106 includes a photoelectric conversion element such as a CCD sensor or a CMOS sensor, and a peripheral portion. The image sensor 106 photoelectrically converts an object image formed by forming an image of light that has passed through the image pickup optical system to generate an electrical signal. Output. Although details will be described later, the image sensor 106 of the present embodiment includes two photoelectric conversion units for each of a plurality of microlenses arranged in two dimensions. Then, a reading method (first reading method) for reading out a pair of focus detection signals corresponding to each of the two photoelectric conversion units (a first reading method) and a reading method for reading out only a pixel signal obtained by adding the outputs of the two photoelectric conversion units ( It can be driven by the second reading method.

位相差AF用画素読み出し設定部117は、撮像素子106の全画素のうち、行単位で第1の読み出し方法により読み出す画素群(あるいはライン)の設定を行う。これにより、撮影領域(撮像素子106の全画素)のうち、どの領域を位相差AF用に読み出すかを任意に指定することができる。   The phase difference AF pixel readout setting unit 117 sets a pixel group (or line) to be read out by the first readout method in units of rows among all the pixels of the image sensor 106. As a result, it is possible to arbitrarily specify which region of the imaging region (all pixels of the image sensor 106) is read for phase difference AF.

CDS/AGC回路107は、撮像素子106の出力をサンプリングし、ゲインを調整する。カメラ信号処理回路108は、CDS/AGC回路107からの出力信号に対して各種の画像処理を施し、画像信号を生成する。モニタ109は、LCD等により構成され、カメラ信号処理回路108からの画像信号に加え、撮像装置の撮影モードに関する情報や、設定された焦点検出領域の目安となる焦点検出枠(AF枠)等の各種情報を表示する。記録装置110は、カメラ信号処理回路108からの画像信号を、磁気テープ、光ディスク、半導体メモリ等の記録媒体に記録する。   The CDS / AGC circuit 107 samples the output of the image sensor 106 and adjusts the gain. The camera signal processing circuit 108 performs various kinds of image processing on the output signal from the CDS / AGC circuit 107 to generate an image signal. The monitor 109 is configured by an LCD or the like, and in addition to the image signal from the camera signal processing circuit 108, information on the shooting mode of the imaging apparatus, a focus detection frame (AF frame) that serves as a guide for the set focus detection area, and the like. Displays various information. The recording device 110 records the image signal from the camera signal processing circuit 108 on a recording medium such as a magnetic tape, an optical disk, or a semiconductor memory.

位相差AF用ゲート112は、CDS/AGC回路107により画像処理され、第1の読み出し方法により読み出された画像信号のうち、後述する複数の焦点検出領域に対応する焦点検出信号を通す。位相差AF信号処理部113は、位相差AF用ゲート112を通過した一対の焦点検出信号を基に相関演算を行い、各焦点検出領域毎に、像ずれ量と信頼性情報(二像一致度、二像急峻度、コントラスト情報、飽和情報、キズ情報等)を算出する。そして、算出した像ずれ量と信頼性情報をカメラマイコン114へ出力する。カメラマイコン114は、後述する位相差方式の焦点検出方法に基づいて、位相差AF信号処理部113にて算出された像ずれ量から、撮像面上での現在の焦点位置と合焦位置とのずれ量、いわゆるデフォーカス量を算出する。また、カメラマイコン114は、算出したデフォーカス量をフォーカスレンズ105の駆動量に変換し、フォーカシング駆動部111を制御してフォーカスレンズ105を駆動する。以下、上述した撮像面位相差方式のAF制御を「位相差AF」と呼ぶ。   The phase difference AF gate 112 passes a focus detection signal corresponding to a plurality of focus detection areas, which will be described later, out of the image signal processed by the CDS / AGC circuit 107 and read by the first reading method. The phase difference AF signal processing unit 113 performs correlation calculation based on the pair of focus detection signals that have passed through the phase difference AF gate 112, and the image shift amount and reliability information (two-image coincidence degree) for each focus detection region. 2 image steepness, contrast information, saturation information, scratch information, etc.). Then, the calculated image shift amount and reliability information are output to the camera microcomputer 114. The camera microcomputer 114 calculates the current focal position on the imaging surface and the in-focus position from the image shift amount calculated by the phase difference AF signal processing unit 113 based on a phase difference type focus detection method described later. A deviation amount, a so-called defocus amount is calculated. Further, the camera microcomputer 114 converts the calculated defocus amount into a drive amount of the focus lens 105, and controls the focusing drive unit 111 to drive the focus lens 105. Hereinafter, the above-described AF control of the imaging surface phase difference method is referred to as “phase difference AF”.

コントラストAF用ゲート115は、CDS/AGC回路107からの全画素の出力信号のうち、コントラスト方式のAFによる焦点検出に用いられる領域(コントラストAF領域)の信号のみを後段のコントラストAF信号処理部116に供給する。なお、コントラストAF領域については、後述する。   The contrast AF gate 115 outputs only the signal in the region (contrast AF region) used for focus detection by contrast AF among the output signals of all pixels from the CDS / AGC circuit 107, and the contrast AF signal processing unit 116 in the subsequent stage. To supply. The contrast AF area will be described later.

コントラストAF信号処理部116は、コントラストAF用ゲート115から供給されるコントラストAF領域の画像信号に対して、例えばフィルタを適用して予め定められた周波数帯域の成分を抽出し、コントラストAF評価値を生成する。抽出するのは、コントラストAF用ゲート115を通過した信号の、例えば高周波成分や、輝度レベルの最大値と最小値との差分(輝度差成分)等である。コントラストAF評価値は、撮像素子106からの出力信号に基づいて生成される映像の鮮鋭度(コントラストの程度)を表す値であるが、ピントが合った映像の鮮鋭度は高く、ぼけた映像の鮮鋭度は低いので、撮像光学系の焦点状態を表す値として利用できる。生成されたコントラストAF評価値は、カメラマイコン114に出力される。   The contrast AF signal processing unit 116 extracts, for example, a component of a predetermined frequency band by applying a filter to the image signal in the contrast AF area supplied from the contrast AF gate 115, and obtains a contrast AF evaluation value. Generate. What is extracted is, for example, a high-frequency component of the signal that has passed through the contrast AF gate 115, a difference (luminance difference component) between the maximum value and the minimum value of the luminance level, and the like. The contrast AF evaluation value is a value representing the sharpness (degree of contrast) of the video generated based on the output signal from the image sensor 106, but the sharpness of the focused video is high, and the blurred video Since the sharpness is low, it can be used as a value representing the focus state of the imaging optical system. The generated contrast AF evaluation value is output to the camera microcomputer 114.

カメラマイコン114は、コントラストAF信号処理部116から与えられるコントラストAF評価値に基づいて、フォーカシング駆動部111を制御してフォーカスレンズ105を駆動する。以下、上述したコントラスト方式のAF制御を「コントラストAF」と呼ぶ。   The camera microcomputer 114 drives the focus lens 105 by controlling the focusing drive unit 111 based on the contrast AF evaluation value given from the contrast AF signal processing unit 116. Hereinafter, the contrast AF control described above is referred to as “contrast AF”.

●撮像素子
図2は、本実施形態における撮像素子106の画素配列の概略を示す図である。図2は、本実施形態で撮像素子106として用いられる2次元CMOSセンサの画素配列を、撮像画素の4列×4行の範囲で(焦点検出画素の配列としては8列×4行の範囲)で示したものである。
Image Sensor FIG. 2 is a diagram showing an outline of the pixel array of the image sensor 106 in the present embodiment. FIG. 2 shows a pixel array of a two-dimensional CMOS sensor used as the image sensor 106 in the present embodiment in a range of 4 columns × 4 rows of imaging pixels (a range of 8 columns × 4 rows as an array of focus detection pixels). It is shown by.

本実施形態において、画素群200は2列×2行の画素からなる。そして、各画素群200において、R(赤)の分光感度を有する画素200Rが左上の位置に、G(緑)の分光感度を有する画素200Gが右上と左下の位置に、B(青)の分光感度を有する画素200Bが右下の位置に配置されている。さらに、各画素は、行列状に配された複数のマイクロレンズそれぞれに対して、2列×1行に配列された第1焦点検出画素201と第2焦点検出画素202により構成されている。撮像素子106は、図2に示す4列×4行の撮像画素(8列×4行の焦点検出画素)からなる画素群200を撮像面上に多数配置し、画素信号及び焦点検出信号の取得を可能としている。   In the present embodiment, the pixel group 200 includes pixels of 2 columns × 2 rows. In each pixel group 200, a pixel 200R having an R (red) spectral sensitivity is located at the upper left position, a pixel 200G having a G (green) spectral sensitivity is located at the upper right and lower left positions, and a B (blue) spectrum. A pixel 200B having sensitivity is arranged at a lower right position. Further, each pixel includes a first focus detection pixel 201 and a second focus detection pixel 202 arranged in 2 columns × 1 row for each of a plurality of microlenses arranged in a matrix. The image sensor 106 arranges a large number of pixel groups 200 made up of 4 columns × 4 rows of imaging pixels (8 columns × 4 rows of focus detection pixels) shown in FIG. 2 on the imaging surface, and acquires pixel signals and focus detection signals. Is possible.

図2に示す撮像素子106の1つの画素200Gを、撮像素子106の受光面側(+z側)から見た平面図を図3(a)に示し、図3(a)のa−a断面を−y側から見た断面図を図3(b)に示す。図3に示すように、本実施形態の画素200Gでは、各画素の受光面側に入射光を集光するためのマイクロレンズ305が形成され、x方向にNH分割(2分割)、y方向にNV分割(1分割)された光電変換部301及び302が形成される。光電変換部301及び302が、それぞれ、第1焦点検出画素201と第2焦点検出画素202に対応する。各画素には、マイクロレンズ305と、光電変換部301及び302との間に、カラーフィルタ306が形成される。また、必要に応じて、各焦点検出画素毎にカラーフィルタの分光透過率を変えても良いし、カラーフィルタを省略しても良い。   2A is a plan view of one pixel 200G of the image sensor 106 shown in FIG. 2 as viewed from the light receiving surface side (+ z side) of the image sensor 106, and FIG. 3A is a cross-sectional view taken along line aa. A cross-sectional view seen from the −y side is shown in FIG. As shown in FIG. 3, in the pixel 200G of the present embodiment, a microlens 305 for condensing incident light is formed on the light receiving surface side of each pixel, and NH division (two divisions) is performed in the x direction, and in the y direction. The photoelectric conversion units 301 and 302 that are divided into NVs (one division) are formed. The photoelectric conversion units 301 and 302 correspond to the first focus detection pixel 201 and the second focus detection pixel 202, respectively. In each pixel, a color filter 306 is formed between the microlens 305 and the photoelectric conversion units 301 and 302. Further, as necessary, the spectral transmittance of the color filter may be changed for each focus detection pixel, or the color filter may be omitted.

図3に示した画素200Gに入射した光は、マイクロレンズ305により集光され、カラーフィルタ306で分光されたのち、光電変換部301,302で受光される。光電変換部301及び302では、光電変換により、受光量に応じて電子とホールが対生成し、空乏層で分離された後、負電荷の電子はn型層(不図示)に蓄積される。一方、ホールは定電圧源(不図示)に接続されたp型層を通じて撮像素子106の外部へ排出される。光電変換部301及び302のn型層(不図示)に蓄積された電子は、転送ゲートを介して、静電容量部(FD)(不図示)に転送され、電圧信号に変換されて出力される。   Light incident on the pixel 200 </ b> G illustrated in FIG. 3 is collected by the microlens 305, dispersed by the color filter 306, and then received by the photoelectric conversion units 301 and 302. In the photoelectric conversion units 301 and 302, a pair of electrons and holes are generated by photoelectric conversion according to the amount of received light and separated by a depletion layer, and then negatively charged electrons are accumulated in an n-type layer (not shown). On the other hand, the holes are discharged to the outside of the image sensor 106 through a p-type layer connected to a constant voltage source (not shown). Electrons accumulated in the n-type layers (not shown) of the photoelectric conversion units 301 and 302 are transferred to a capacitance unit (FD) (not shown) via a transfer gate, converted into a voltage signal, and output. The

図3に示した本実施形態の画素構造と瞳分割との対応関係を図4を参照して説明する。図4は、図3(a)に示した第1の実施形態の画素構造のa−a断面を+y側から見た断面図と撮像光学系の射出瞳面を示す図である。なお、図4では、射出瞳面の座標軸と対応を取るために、断面図のx軸とy軸を図3に対して反転させている。また、図4において、図3と同様の部分は同じ符号を付して示す。   The correspondence relationship between the pixel structure of this embodiment shown in FIG. 3 and pupil division will be described with reference to FIG. FIG. 4 is a cross-sectional view of the pixel structure of the first embodiment shown in FIG. 3A as viewed from the + y side and a view showing an exit pupil plane of the imaging optical system. In FIG. 4, the x-axis and y-axis of the cross-sectional view are inverted with respect to FIG. 3 in order to correspond to the coordinate axis of the exit pupil plane. In FIG. 4, the same parts as those in FIG. 3 are denoted by the same reference numerals.

図4に示すように、第1焦点検出画素201の第1の瞳部分領域401は、重心が−x方向に偏心している光電変換部301の受光面と、マイクロレンズ305によって概ね共役関係になっており、第1焦点検出画素201で受光可能な瞳領域を表している。第1焦点検出画素201の第1の瞳部分領域401は、瞳面上で+X側に重心が偏心している。また、第2焦点検出画素202の第2の瞳部分領域402は、重心が+x方向に偏心している光電変換部302の受光面と、マイクロレンズ305によって、概ね共役関係になっており、第2焦点検出画素202で受光可能な瞳領域を表している。第2焦点検出画素202の第2の瞳部分領域402は、瞳面上で−X側に重心が偏心している。また、瞳領域400は、光電変換部301と光電変換部302(第1焦点検出画素201と第2焦点検出画素202)とを合わせた際の画素200G全体で受光可能な瞳領域である。   As shown in FIG. 4, the first pupil partial region 401 of the first focus detection pixel 201 is substantially conjugate with the light receiving surface of the photoelectric conversion unit 301 whose center of gravity is decentered in the −x direction and the microlens 305. This represents a pupil region that can be received by the first focus detection pixel 201. In the first pupil partial region 401 of the first focus detection pixel 201, the center of gravity is decentered on the + X side on the pupil plane. In addition, the second pupil partial region 402 of the second focus detection pixel 202 is substantially conjugated with the light receiving surface of the photoelectric conversion unit 302 whose center of gravity is decentered in the + x direction and the microlens 305. A pupil region that can be received by the focus detection pixel 202 is shown. The center of gravity of the second pupil partial region 402 of the second focus detection pixel 202 is eccentric to the −X side on the pupil plane. The pupil region 400 is a pupil region that can receive light in the entire pixel 200G when the photoelectric conversion unit 301 and the photoelectric conversion unit 302 (first focus detection pixel 201 and second focus detection pixel 202) are combined.

本実施形態の撮像素子106とマイクロレンズ305による瞳分割との対応関係の概略を図5に示す。射出瞳410の第1の瞳部分領域401と第2の瞳部分領域402の異なる瞳部分領域を通過した光束は、撮像素子106の各画素にそれぞれ異なる角度で入射し、2×1に分割された第1焦点検出画素201と第2焦点検出画素202で受光される。なお、本実施形態では、瞳領域が水平方向に2つに瞳分割されている例を示しているが、必要に応じて、垂直方向に瞳分割を行っても良い。   FIG. 5 shows an outline of the correspondence between the image sensor 106 of this embodiment and pupil division by the microlens 305. Light beams that have passed through different pupil partial regions of the first pupil partial region 401 and the second pupil partial region 402 of the exit pupil 410 are incident on each pixel of the image sensor 106 at different angles and are divided into 2 × 1. The first focus detection pixel 201 and the second focus detection pixel 202 receive light. In the present embodiment, an example is shown in which the pupil region is divided into two pupils in the horizontal direction, but pupil division may be performed in the vertical direction as necessary.

なお、本実施形態の撮像素子106は、それぞれの撮像画素が第1焦点検出画素201と第2焦点検出画素202から構成されているが、本発明はこれに限るものではない。必要に応じて、撮像光学系の第1の瞳部分領域401と第2の瞳部分領域402とを合わせた瞳領域を通過した光束を受光する撮像画素と、第1焦点検出画素201及び第2焦点検出画素202を個別の画素構成としてもよい。その場合、撮像画素による配列の一部に、第1焦点検出画素と第2焦点検出画素を部分的に配置する構成としても良い。   In the imaging device 106 of the present embodiment, each imaging pixel includes the first focus detection pixel 201 and the second focus detection pixel 202, but the present invention is not limited to this. If necessary, an imaging pixel that receives a light beam that has passed through a pupil region that is a combination of the first pupil partial region 401 and the second pupil partial region 402 of the imaging optical system, and the first focus detection pixel 201 and the second focus detection pixel 201. The focus detection pixel 202 may have an individual pixel configuration. In that case, the first focus detection pixel and the second focus detection pixel may be partially arranged in a part of the arrangement of the imaging pixels.

上述した構成を有する撮像素子106の各画素の第1焦点検出画素201の受光信号を集めて第1焦点検出信号を生成し、各画素の第2焦点検出画素202の受光信号を集めて第2焦点検出信号を生成して焦点検出を行う。また、撮像素子106の各マイクロレンズに対応する画素毎に、第1焦点検出画素201と第2焦点検出画素202の受光信号を加算することで、画像信号(加算信号)を生成することができる。   The first focus detection signal 201 is collected by collecting the light reception signals of the first focus detection pixels 201 of the respective pixels of the image sensor 106 having the above-described configuration, and the light reception signals of the second focus detection pixels 202 of the respective pixels are collected. A focus detection signal is generated to perform focus detection. Further, an image signal (addition signal) can be generated by adding the light reception signals of the first focus detection pixel 201 and the second focus detection pixel 202 for each pixel corresponding to each microlens of the image sensor 106. .

●デフォーカス量と像ずれ量の関係
次に、本実施形態の撮像素子106により取得される第1焦点検出信号と第2焦点検出信号の像ずれ量とデフォーカス量との関係について説明する。図6は、第1焦点検出信号と第2焦点検出信号のデフォーカス量と第1焦点検出信号と第2焦点検出信号間の像ずれ量との関係を示す図である。撮像面500に本実施形態の撮像素子106が配置され、図4、図5と同様に、撮像光学系の射出瞳410が、第1の瞳部分領域401と第2の瞳部分領域402に2分割される。なお、図6において、図3〜図5と同様の部分には同じ符号を付して示す。
Next, the relationship between the defocus amount and the image shift amount of the first focus detection signal and the second focus detection signal acquired by the image sensor 106 of the present embodiment will be described. FIG. 6 is a diagram illustrating the relationship between the defocus amounts of the first focus detection signal and the second focus detection signal and the image shift amount between the first focus detection signal and the second focus detection signal. The imaging device 106 of the present embodiment is disposed on the imaging surface 500, and the exit pupil 410 of the imaging optical system is divided into two in the first pupil partial region 401 and the second pupil partial region 402, as in FIGS. Divided. In FIG. 6, the same parts as those in FIGS.

デフォーカス量dは、被写体の結像位置から撮像面500までの距離を大きさ|d|としたとき、被写体の結像位置が撮像面より被写体側にある前ピン状態を負(d<0)、撮像面500より被写体の反対側にある後ピン状態を正(d>0)として定義される。被写体の結像位置が撮像面500(合焦位置)にある焦点状態はd=0である。図6で、被写体601は合焦状態(d=0)の例を示しており、被写体602は前ピン状態(d<0)の例を示している。前ピン状態(d<0)と後ピン状態(d>0)を合わせて、デフォーカス状態(|d|>0)と呼ぶ。   The defocus amount d is negative (d <0) when the distance from the imaging position of the subject to the imaging surface 500 is a magnitude | d |, where the imaging position of the subject is closer to the subject than the imaging surface. ), The rear pin state on the opposite side of the subject from the imaging surface 500 is defined as positive (d> 0). The focus state where the imaging position of the subject is on the imaging surface 500 (focus position) is d = 0. In FIG. 6, the subject 601 shows an example in a focused state (d = 0), and the subject 602 shows an example in a front pin state (d <0). The front pin state (d <0) and the rear pin state (d> 0) are collectively referred to as a defocus state (| d |> 0).

前ピン状態(d<0)では、被写体602からの光束のうち、第1の瞳部分領域401を通過した被写体光は、一度、集光した後、光束の重心位置G1を中心として幅Γ1に広がり、撮像面500でボケた像となる。第2の瞳部分領域402を通過した被写体光についても同様であり、重心位置G2を中心として幅Γ2に広がったボケた像を形成する。ボケた像は、撮像素子106に配列された各画素を構成する第1焦点検出画素201および第2焦点検出画素202により受光され、第1焦点検出信号および第2焦点検出信号が生成される。よって、第1焦点検出信号および第2焦点検出信号は、撮像面500上の重心位置G1およびG2に、被写体602が幅Γ1およびΓ2にボケた被写体像として記録される。被写体像のボケ幅Γ1,Γ2は、デフォーカス量dの大きさ|d|が増加するのに伴い、概ね、比例して増加していく。同様に、第1焦点検出信号と第2焦点検出信号間の被写体像の像ずれ量p(=光束の重心位置の差G1−G2)の大きさ|p|も、デフォーカス量dの大きさ|d|が増加するのに伴い、概ね、比例して増加していく。後ピン状態(d>0)でも、第1焦点検出信号と第2焦点検出信号間の被写体像の像ずれ方向が前ピン状態と反対となるが、同様である。   In the front pin state (d <0), the subject light that has passed through the first pupil partial region 401 out of the luminous flux from the subject 602 is once condensed and then has a width Γ1 with the center of gravity G1 of the luminous flux as the center. The image spreads and becomes a blurred image on the imaging surface 500. The same applies to the subject light that has passed through the second pupil partial region 402, and a blurred image having a width Γ2 around the center of gravity position G2 is formed. The blurred image is received by the first focus detection pixel 201 and the second focus detection pixel 202 constituting each pixel arranged in the image sensor 106, and a first focus detection signal and a second focus detection signal are generated. Therefore, the first focus detection signal and the second focus detection signal are recorded as subject images in which the subject 602 is blurred in the widths Γ1 and Γ2 at the gravity center positions G1 and G2 on the imaging surface 500. The blur widths Γ1 and Γ2 of the subject image generally increase in proportion as the magnitude | d | of the defocus amount d increases. Similarly, the magnitude | p | of the object image displacement amount p (= difference G1-G2 in the center of gravity of the light beam) between the first focus detection signal and the second focus detection signal is also the size of the defocus amount d. As | d | increases, it generally increases in proportion. Even in the rear pin state (d> 0), the image shift direction of the subject image between the first focus detection signal and the second focus detection signal is opposite to that in the front pin state, but the same.

このように、第1焦点検出信号と第2焦点検出信号、もしくは、第1焦点検出信号と第2焦点検出信号とを加算した撮像信号のデフォーカス量の大きさが増加するのに伴い、第1焦点検出信号と第2焦点検出信号間の像ずれ量の大きさが増加する。   Thus, as the magnitude of the defocus amount of the first focus detection signal and the second focus detection signal or the imaging signal obtained by adding the first focus detection signal and the second focus detection signal increases, The amount of image shift between the first focus detection signal and the second focus detection signal increases.

●焦点検出
本実施形態では、上述した第1焦点検出信号と第2焦点検出信号の像ずれ量とデフォーカス量との関連性を用いて、位相差AFを行う。位相差AFでは、第1焦点検出信号と第2焦点検出信号を相対的にシフトさせて信号の一致度を表す相関量を計算し、相関(信号の一致度)が良くなるシフト量から像ずれ量を検出する。画像信号のデフォーカス量の大きさが増加するのに伴い、第1焦点検出信号と第2焦点検出信号間の像ずれ量の大きさが増加する関連性から、像ずれ量を検出デフォーカス量に変換して焦点検出を行う。
Focus Detection In this embodiment, phase difference AF is performed using the relationship between the image shift amount and the defocus amount of the first focus detection signal and the second focus detection signal described above. In the phase difference AF, the first focus detection signal and the second focus detection signal are relatively shifted to calculate the correlation amount indicating the degree of coincidence of the signals, and the image shift from the shift amount that improves the correlation (signal coincidence). Detect the amount. As the magnitude of the defocus amount of the image signal increases, the amount of image shift between the first focus detection signal and the second focus detection signal increases. The focus is detected by converting to.

<第1の実施形態>
以下、上記構成を有する撮像装置を用いた本発明の第1の実施形態について説明する。
<First Embodiment>
Hereinafter, a first embodiment of the present invention using the imaging apparatus having the above configuration will be described.

[撮像面位相差方式の課題]
ここで、第1の実施形態における撮像面位相差方式の課題について、図9を用いて説明する。図9(a)は、撮影領域91に対する表示AF枠92と、位相差AF用画素読み出し設定部117で設定される、第1の読み出し方法で読み出す領域93a〜93dとの関係を示している。焦点検出信号は水平1画素ラインを最小単位として読み出されるが、S/N向上のために垂直方向に加算処理したものを1ラインとして処理するものとし、以下では、領域93a〜93dそれぞれを焦点検出ラインと呼ぶ。
[Issue of phase difference method on imaging surface]
Here, the problem of the imaging plane phase difference method in the first embodiment will be described with reference to FIG. FIG. 9A shows the relationship between the display AF frame 92 for the imaging region 91 and the regions 93 a to 93 d read by the first readout method set by the phase difference AF pixel readout setting unit 117. The focus detection signal is read out with one horizontal pixel line as a minimum unit. However, in the following, each of the regions 93a to 93d is detected as a focus detection signal that is added in the vertical direction to improve S / N. Called the line.

前述したように、4K、8Kカメラなどのように高解像度化や、フレームレートの高速化が進むにつれて、所定時間で読み出せる焦点検出ライン数に制約が出てくる。これは、一対の焦点検出信号を得るための第1の読み出し方法では、一般的に、次のような読み出し制御をするからである。即ち、まず、焦点検出用として、第1焦点検出画素201および第2焦点検出画素202のいずれか一方のみの読み出しを行う。次いで、撮影画像用として第1焦点検出画素201および第2焦点検出画素202の加算読み出しを行うか、または、第1焦点検出画素201および第2焦点検出画素202の他方のみの読み出しを行う。このように、1ラインについて2回の読み出しを行う必要が発生するため、読み出しに時間がかかり、1フレーム期間内で読み出せる焦点検出ライン数に制約ができてしまう。なお、加算読み出しを行った場合、第2焦点検出信号は、第1焦点検出画素201と第2焦点検出画素202を加算読み出しした信号と、第1焦点検出画素201のみの読み出し信号との差分から算出する。また、第1焦点検出画素201および第2焦点検出画素202からそれぞれ信号を読み出した場合は、読み出した信号を各マイクロレンズに対応する画素毎に加算して撮影画像用の信号を取得する。   As described above, as the resolution is increased and the frame rate is increased as in 4K and 8K cameras, the number of focus detection lines that can be read out in a predetermined time is limited. This is because the following readout control is generally performed in the first readout method for obtaining a pair of focus detection signals. That is, first, only one of the first focus detection pixel 201 and the second focus detection pixel 202 is read for focus detection. Subsequently, addition reading of the first focus detection pixel 201 and the second focus detection pixel 202 is performed for the captured image, or only the other of the first focus detection pixel 201 and the second focus detection pixel 202 is read. As described above, since it is necessary to read twice for one line, it takes time to read, and the number of focus detection lines that can be read within one frame period can be limited. When addition reading is performed, the second focus detection signal is based on the difference between the signal obtained by adding and reading the first focus detection pixel 201 and the second focus detection pixel 202 and the read signal of only the first focus detection pixel 201. calculate. Further, when signals are read from the first focus detection pixel 201 and the second focus detection pixel 202, the read signals are added for each pixel corresponding to each microlens to obtain a signal for a captured image.

一方、位相差AF信号処理部113での相関演算やカメラマイコン114でのデフォーカス量の算出処理は1ライン毎に行い、すべての焦点検出ラインで実施しなければならない。そのため、撮像素子106の全画素から第1および第2焦点検出信号を得られるように読み出せたとしても、1フレーム期間内で処理可能な焦点検出ライン数には限界がある。   On the other hand, the correlation calculation in the phase difference AF signal processing unit 113 and the calculation processing of the defocus amount in the camera microcomputer 114 must be performed for each line, and must be performed for all focus detection lines. Therefore, even if the first and second focus detection signals can be read from all the pixels of the image sensor 106, the number of focus detection lines that can be processed within one frame period is limited.

図9(b)は表示AF枠92を大きく設定した場合の焦点検出ライン93a〜93dの配置を示している。上述したように、1フレーム期間で読み出しおよび処理可能な焦点検出ライン数には限界があるため、表示AF枠92を大きくした場合、各焦点検出ライン93a〜93dの間隔を開ける構成がとられる。しかしながら、例えば、焦点検出ラインの間に被写体94があるような場合には、正しい焦点検出ができない。   FIG. 9B shows the arrangement of the focus detection lines 93a to 93d when the display AF frame 92 is set large. As described above, since there is a limit to the number of focus detection lines that can be read and processed in one frame period, when the display AF frame 92 is enlarged, the focus detection lines 93a to 93d are spaced apart. However, for example, when the subject 94 is between the focus detection lines, correct focus detection cannot be performed.

[焦点検出領域の決定方法]
第1の実施形態の撮像面位相差方式における焦点検出領域の設定処理について説明する。まず、以下の説明で用いる検出エリアフラグについて図10を参照しながら説明する。
[Focus detection area determination method]
A focus detection area setting process in the imaging surface phase difference method of the first embodiment will be described. First, the detection area flag used in the following description will be described with reference to FIG.

検出エリアフラグは焦点検出領域の設定状態に応じて4種類の状態を持ち、それぞれの状態に対応してフラグの数値が割り当てられている。4種類の状態とフラグの数値の関係は、1:通常状態、2:拡大状態、3:再配置期間中、4:再配置済み状態である。以下、図10を用いてそれぞれの状態を説明する。なお、図10において、図9と同様の構成には同じ参照番号を付す。   The detection area flag has four types of states according to the setting state of the focus detection area, and a flag value is assigned to each state. The relationship between the four types of states and the numerical values of the flags is 1: normal state, 2: enlarged state, 3: during rearrangement, and 4: rearranged state. Hereinafter, each state will be described with reference to FIG. In FIG. 10, the same components as those in FIG. 9 are denoted by the same reference numerals.

「1:通常状態」とは、図10(a)に示すように表示AF枠92に対して所定の大きさで焦点検出領域を設定した状態を表す。図9(b)を参照して説明したように、焦点検出ライン数には制限があるため、表示AF枠92全体に均等に焦点検出ラインが配置されるよう離散的な設定となっている。また、焦点検出領域95a〜95dは焦点検出ライン93a〜93dから読み出した焦点検出信号のうち、位相差AF信号処理部113での相関演算、およびカメラマイコン114でのデフォーカス量の算出処理を行う範囲を示している。従って、位相差AF用ゲート112は、この焦点検出領域95a〜95dに対応する画素から出力された信号を通す。第1の実施形態では、焦点検出領域95a〜95dは、位相差AF信号処理部113あるいはカメラマイコン114で設定する。なお、一般的にAF制御では、遠近が競合するような被写体において背景などに焦点が合ってしまうという問題があるため、焦点検出領域は小さい方が好ましい。そのため、第1の実施形態では、通常状態として、表示AF枠92に対して、焦点検出領域95a〜95dを水平方向に短く設定するものとして説明するが、これに限らず表示AF枠と同じ長さに設定してもよい。   “1: Normal state” represents a state in which the focus detection area is set with a predetermined size with respect to the display AF frame 92 as shown in FIG. As described with reference to FIG. 9B, since the number of focus detection lines is limited, the setting is discrete so that the focus detection lines are evenly arranged in the entire display AF frame 92. The focus detection areas 95a to 95d perform correlation calculation in the phase difference AF signal processing unit 113 and defocus amount calculation processing in the camera microcomputer 114 among focus detection signals read from the focus detection lines 93a to 93d. The range is shown. Therefore, the phase difference AF gate 112 passes signals output from the pixels corresponding to the focus detection areas 95a to 95d. In the first embodiment, the focus detection areas 95 a to 95 d are set by the phase difference AF signal processing unit 113 or the camera microcomputer 114. In general, in AF control, there is a problem that the background or the like is focused on a subject whose distance is competing, and therefore it is preferable that the focus detection area is small. Therefore, in the first embodiment, as a normal state, the focus detection areas 95a to 95d are described as being set short in the horizontal direction with respect to the display AF frame 92. However, the present invention is not limited to this, and the same length as the display AF frame is used. You may set it.

「2:拡大状態」とは、図10(b)に示すように、表示AF枠92に対して「1:通常状態」よりも大きい領域を焦点検出領域95a’〜95d’として設定した状態を表す。第1の実施形態では、図示するように「1:通常状態」の焦点検出領域95a〜95dに対して、水平方向に広げた状態を「2:拡大状態」とする。位相差方式による焦点検出において、大デフォーカス状態(大ボケ状態)になると、第1および第2焦点検出信号の急峻度がなだらかになる。そのため、相関演算において第1および第2焦点検出信号を相対的に瞳分割方向にシフトさせるシフト処理でのシフト量が小さいと、2つの焦点検出信号の相関が取りにくくなり、信頼度の高いデフォーカス量が算出できない。そこで、特に大ボケ状態の場合に、焦点検出領域を瞳分割方向(第1の実施形態では水平方向)に拡大し、シフト量を大きくすることで、より正確にデフォーカス量を得ることが可能となる。また、表示AF枠92内の焦点検出領域以外に被写体が存在する場合でも、水平方向に拡大することで被写体抜けの影響を軽減することができる。   “2: Enlarged state”, as shown in FIG. 10B, is a state in which areas larger than “1: normal state” with respect to the display AF frame 92 are set as focus detection areas 95a ′ to 95d ′. Represent. In the first embodiment, as shown in the drawing, a state where the focus detection areas 95a to 95d in the “1: normal state” are expanded in the horizontal direction is referred to as “2: enlarged state”. In focus detection by the phase difference method, when a large defocus state (large blur state) is reached, the steepness of the first and second focus detection signals becomes gentle. For this reason, if the shift amount in the shift processing for relatively shifting the first and second focus detection signals in the pupil division direction in the correlation calculation is small, it becomes difficult to correlate the two focus detection signals. The amount of focus cannot be calculated. Therefore, particularly in the case of large blurring, it is possible to obtain the defocus amount more accurately by enlarging the focus detection area in the pupil division direction (horizontal direction in the first embodiment) and increasing the shift amount. It becomes. Even when a subject is present outside the focus detection area in the display AF frame 92, the influence of the subject missing can be reduced by enlarging the subject in the horizontal direction.

「3:再配置期間中」とは、図10(c)に示すように、図10(a)および図10(b)で設定している焦点検出領域と異なる領域に焦点検出領域95e〜95gを再設定したが、デフォーカス検出結果が未だ出力されていない状態を表す。   “3: During the rearrangement period” means, as shown in FIG. 10C, focus detection areas 95e to 95g in areas different from the focus detection areas set in FIGS. 10A and 10B. Is set, but the defocus detection result has not been output yet.

「4:再配置済み状態」とは、再設定した焦点検出領域95e〜95gでのデフォーカス検出結果が出力されている状態を表す。これが、第1の実施形態の特徴とするところであり、図10(a)や図10(b)のように、被写体94が焦点検出領域の隙間に入ってしまう場合には、正しくデフォーカス量を取得することができない。そこで、図10(c)のように、設定されていた焦点検出領域95a’〜95d’の隙間を埋めるように焦点検出領域95e〜95gを再配置し、新たな焦点検出領域95e〜95gでデフォーカス演算を行うことで、上記課題を軽減する。   “4: rearranged state” represents a state in which defocus detection results are output in the reset focus detection areas 95e to 95g. This is a feature of the first embodiment. When the subject 94 enters the gap in the focus detection area as shown in FIGS. 10A and 10B, the defocus amount is correctly set. I can't get it. Therefore, as shown in FIG. 10C, the focus detection areas 95e to 95g are rearranged so as to fill the gaps between the set focus detection areas 95a ′ to 95d ′, and the new focus detection areas 95e to 95g By performing the focus calculation, the above problem is reduced.

なお、「3:再配置期間中」と「4:再配置済み状態」とを区別する理由は、焦点検出領域を再設定してからデフォーカス検出結果が出力されるまで、相関量演算やデフォーカス算出処理の結果出力を待っている状態を判別するためである。   Note that the reason for distinguishing between “3: during the rearrangement period” and “4: rearranged state” is that the correlation amount calculation and the deduplication are performed until the defocus detection result is output after the focus detection area is reset. This is to determine a state waiting for output as a result of the focus calculation process.

また、第1の実施形態では、焦点検出領域を通常状態から拡大状態(水平方向に拡大)に変更した場合には結果出力を待たず、拡大状態から再配置状態(垂直方向に再配置)した場合に結果出力を待つようにしている。しかしながら、水平方向に拡大した場合にも待つような構成としてもよい。   In the first embodiment, when the focus detection area is changed from the normal state to the enlarged state (enlarged in the horizontal direction), the result output is not waited, but the enlarged state is rearranged (rearranged in the vertical direction). If so, wait for the result output. However, it may be configured to wait even when enlarged in the horizontal direction.

次に、図7を参照して、第1の実施形態における撮像面位相差方式の焦点検出処理について説明する。なお、図7の動作は、撮像素子106、位相差AF信号処理部113と、それらを制御するカメラマイコン114によって実行され、後述する図8の処理と動作周期を合わせて動作してもよいし、独立して速い周期で動作するようにしてもよい。   Next, with reference to FIG. 7, the imaging surface phase difference type focus detection processing in the first embodiment will be described. 7 is executed by the image sensor 106, the phase difference AF signal processing unit 113, and the camera microcomputer 114 that controls them, and may operate in combination with the processing of FIG. 8 described later and the operation cycle. Alternatively, it may be operated independently at a fast cycle.

S101において、位相差AF信号処理部113は、位相差AFに用いる第1および第2焦点検出信号を取得する。より具体的には、位相差AF用画素読み出し設定部117により後述するようにして設定された焦点検出ラインから読み出された第1および第2焦点検出信号のうち、位相差AF用ゲート112を通過した焦点検出領域の第1および第2焦点検出信号を取得する。   In S101, the phase difference AF signal processing unit 113 acquires first and second focus detection signals used for the phase difference AF. More specifically, among the first and second focus detection signals read from the focus detection line set as described later by the phase difference AF pixel readout setting unit 117, the phase difference AF gate 112 is set. First and second focus detection signals of the focus detection area that has passed are acquired.

S102で、位相差AF信号処理部113は、第1焦点検出信号と第2焦点検出信号に、それぞれ列方向に画素加算処理を行い、信号のS/N比向上のための処理を実施し、さらに、RGB信号を輝度Y信号にするためにベイヤー(RGB)加算処理を行う。これら2つの加算処理を合わせて画素加算処理と呼ぶ。   In S102, the phase difference AF signal processing unit 113 performs pixel addition processing in the column direction on each of the first focus detection signal and the second focus detection signal, and performs processing for improving the S / N ratio of the signal, Further, a Bayer (RGB) addition process is performed to convert the RGB signal into a luminance Y signal. These two addition processes are collectively referred to as a pixel addition process.

S103では、画素加算処理された第1焦点検出信号と第2焦点検出信号(輝度Y信号)に、フィルタ処理を行う。例えば、大デフォーカス状態での焦点検出を行う場合は、フィルタ処理の通過帯域は低周波帯域を含むように構成する必要がある。必要に応じて、大デフォーカス状態から小デフォーカス状態まで焦点調節を行う際に、デフォーカス状態に応じて、フィルタ処理の通過帯域を調整しても良い。   In S103, filter processing is performed on the first focus detection signal and the second focus detection signal (luminance Y signal) that have been subjected to pixel addition processing. For example, when focus detection is performed in a large defocus state, it is necessary to configure the pass band of the filter process to include a low frequency band. If necessary, when performing focus adjustment from the large defocus state to the small defocus state, the pass band of the filter processing may be adjusted according to the defocus state.

S104では、フィルタ処理後の第1焦点検出信号と第2焦点検出信号(輝度Y信号)を相対的に瞳分割方向にシフトさせるシフト処理を行い、信号の一致度を表す相関量を算出する、相関演算を行う。この相関演算において、フィルタ処理後のk番目の第1焦点検出信号をA(k)、第2焦点検出信号をB(k)、焦点検出領域に対応する番号kの範囲をWとする。また、このシフト処理におけるシフト量をs、シフト量sのシフト範囲をΓ1とすると、相関量(第1の評価値)CORは、式(1)により算出される。 In S104, a shift process for relatively shifting the first focus detection signal and the second focus detection signal (luminance Y signal) after the filter process in the pupil division direction is performed, and a correlation amount representing the degree of coincidence of the signals is calculated. Perform correlation calculation. In this correlation calculation, the filtered k-th first focus detection signal is A (k), the second focus detection signal is B (k), and the range of number k corresponding to the focus detection area is W. Further, s 1 the shift amount in the shift processing, when the shift range of the shift amount s 1 and .GAMMA.1, correlation amounts (first evaluation value) COR is calculated by the equation (1).

Figure 2017187726
シフト量sのシフト処理により、k番目の第1焦点検出信号A(k)とk−s番目の第2焦点検出信号B(k−s)を対応させて減算し、シフト減算信号を生成する。そして、生成されたシフト減算信号の絶対値を計算し、焦点検出領域に対応する範囲W内で番号kの和を取り、相関量COR(s)を算出する。必要に応じて、各行毎に算出された相関量を、各シフト量毎に、複数行に亘って加算しても良い。
Figure 2017187726
By the shift process of the shift amount s 1 , the k-th first focus detection signal A (k) and the k-s first focus detection signal B (k-s 1 ) are subtracted in correspondence with each other, and the shift-subtract signal Is generated. Then, the absolute value of the generated shift subtraction signal is calculated, the number k is summed within the range W corresponding to the focus detection area, and the correlation amount COR (s 1 ) is calculated. If necessary, the correlation amount calculated for each row may be added over a plurality of rows for each shift amount.

S105では、相関量から、サブピクセル演算により、相関量が最小値となる実数値のシフト量を算出して、像ずれ量p1とする。像ずれ量p1に、焦点検出領域の像高と、撮像レンズ(撮像光学系)のF値、射出瞳距離に応じた第1の変換係数K1をかけて、デフォーカス量(Def)を算出する。   In S105, a real value shift amount at which the correlation amount is the minimum value is calculated from the correlation amount by sub-pixel calculation, and is set as an image shift amount p1. The defocus amount (Def) is calculated by multiplying the image shift amount p1 by the image height of the focus detection area, the F value of the imaging lens (imaging optical system), and the first conversion coefficient K1 corresponding to the exit pupil distance. .

S106では、S105で算出したデフォーカス量及びデフォーカス方向がどれだけ信頼できるのかを表す信頼性を算出する。なお、相関演算及びデフォーカス量の算出は各焦点検出領域毎に行われ、すべての焦点検出領域で実施されてから、処理を終了する。   In S106, a reliability representing how reliable the defocus amount and defocus direction calculated in S105 is calculated. The correlation calculation and the calculation of the defocus amount are performed for each focus detection area, and the process ends after being performed in all focus detection areas.

次に、上述した検出エリアフラグを用いた焦点検出領域の設定処理について、図8を参照して説明する。   Next, the focus detection area setting process using the above-described detection area flag will be described with reference to FIG.

まず、S201において、カメラマイコン114はカメラのシーン変化を判断し、シーン変化があると判断した場合は、S202に処理を移行し、シーン変化がないと判断した場合はS204に処理を移行する。S201では、具体的には、パンニングがされたか否かや、撮影モードが変更されたか否かなどの状態の変化を判断する。   First, in S201, the camera microcomputer 114 determines a scene change of the camera. If it is determined that there is a scene change, the process proceeds to S202, and if it is determined that there is no scene change, the process proceeds to S204. Specifically, in S201, it is determined whether the state has changed, such as whether panning has been performed or whether the shooting mode has been changed.

次に、S202では、焦点検出領域を図10(a)に示す焦点検出領域95a〜95dにし、S203において、検出エリアフラグを「1:通常状態」に設定した後、S204に処理を移行する。   Next, in S202, the focus detection areas are set to focus detection areas 95a to 95d shown in FIG. 10A, and in S203, the detection area flag is set to “1: normal state”, and then the process proceeds to S204.

S204では、カメラマイコン114は検出エリアフラグが焦点検出領域の再配置期間中を示す「3:再配置期間中」か否かを判断する。検出エリアフラグが「3:再配置期間中」の場合は処理をS205に進め、「3:再配置期間中」でない場合には処理をS210に進める。   In S204, the camera microcomputer 114 determines whether or not the detection area flag is “3: during the rearrangement period” indicating that the focus detection area is in the rearrangement period. If the detection area flag is “3: during the rearrangement period”, the process proceeds to S205. If the detection area flag is not “3: during the rearrangement period”, the process proceeds to S210.

次に、S205において、カメラマイコン114は再配置後の焦点検出領域95e〜95gで、図7を参照して上述したようにしてデフォーカス検出結果が出力されたか否かを判別する。出力された場合は処理をS207に進め、未だ出力されていない場合はS206に進める。   Next, in S205, the camera microcomputer 114 determines whether or not the defocus detection result is output in the focus detection areas 95e to 95g after the rearrangement as described above with reference to FIG. If it has been output, the process proceeds to S207, and if it has not been output, the process proceeds to S206.

S206では、カメラマイコン114はコントラストAF用ゲート115及びコントラストAF信号処理部116を通過して出力されるコントラストAF評価値を、前回出力されたコントラストAF評価値と比較し、変化量が第1の閾値以内であるか否かを判断する。   In S206, the camera microcomputer 114 compares the contrast AF evaluation value output through the contrast AF gate 115 and the contrast AF signal processing unit 116 with the previously output contrast AF evaluation value, and the change amount is the first. It is determined whether it is within the threshold.

ここで、S206で行われる処理について詳しく説明する。カメラマイコン114は、カメラの動作周期(フレームレートやシャッタースピード)に依存したタイミング(以下、「コントラストAF評価値出力タイミング」と呼ぶ。)でコントラストAF評価値を受信する。そして、受信したコントラストAF評価値をカメラマイコン114内にある不図示のRAMに履歴として格納する。カメラマイコン114は、受信した最新のコントラストAF評価値と、RAMに格納された過去のコントラストAF評価値とを比較する。比較の結果、「最新のコントラストAF評価値−過去のコントラストAF評価値>0」の場合に、「変化量が第1の閾値以内である」と判断する。   Here, the process performed in S206 will be described in detail. The camera microcomputer 114 receives the contrast AF evaluation value at a timing (hereinafter referred to as “contrast AF evaluation value output timing”) depending on the operation cycle (frame rate or shutter speed) of the camera. The received contrast AF evaluation value is stored as a history in a RAM (not shown) in the camera microcomputer 114. The camera microcomputer 114 compares the received latest contrast AF evaluation value with the past contrast AF evaluation value stored in the RAM. As a result of the comparison, if “the latest contrast AF evaluation value−the past contrast AF evaluation value> 0”, it is determined that “the amount of change is within the first threshold”.

また、さらに条件を加え、「第1の閾値>最新のコントラストAF評価値−過去のコントラストAF評価値>0」とし、第1の閾値以内のコントラストAF評価値の変動がある場合のみ「変化量が第1の閾値以内である」と判断してもよい。   Further, a condition is further added so that “first threshold> latest contrast AF evaluation value−past contrast AF evaluation value> 0”, and only when there is a change in contrast AF evaluation value within the first threshold, “change amount” May be within the first threshold ”.

なお、上述した「過去のコントラストAF評価値」は、前回のコントラストAF評価値出力タイミングで出力されたコントラストAF評価値でもよいし、所定回数前のコントラストAF評価値出力タイミングで出力されたコントラストAF評価値でもよい。さらに、過去の複数のコントラストAF評価値を加算、平均、重み付け加算などして加工したコントラストAF評価値でもよい。   The “past contrast AF evaluation value” described above may be the contrast AF evaluation value output at the previous contrast AF evaluation value output timing, or the contrast AF output at the contrast AF evaluation value output timing a predetermined number of times ago. It may be an evaluation value. Furthermore, a contrast AF evaluation value processed by adding, averaging, weighting addition, etc. a plurality of past contrast AF evaluation values may be used.

S206において、変化量が第1の閾値以内である場合は処理をS209に進め、変化量が第1の閾値を超えている場合は処理をS208に進める。   In S206, if the amount of change is within the first threshold, the process proceeds to S209, and if the amount of change exceeds the first threshold, the process proceeds to S208.

S209では、焦点検出領域を再配置する前に出力されていた、信頼度の高いデフォーカス量を用いてフォーカスレンズ105を駆動する。具体的には、S209で、フォーカスレンズ105を駆動するために使用するデフォーカス量Defに、後述するS211においてバックアップしておいたデフォーカス量(Def_bk)を代入し、S220に処理を移行する。   In step S209, the focus lens 105 is driven using a highly reliable defocus amount that was output before rearranging the focus detection area. Specifically, in S209, the defocus amount (Def_bk) backed up in S211 described later is substituted for the defocus amount Def used to drive the focus lens 105, and the process proceeds to S220.

一方、S208では、カメラマイコン114はフォーカシング駆動部111に対してフォーカスレンズ105を停止する指示を送り、処理を終了する。   On the other hand, in S208, the camera microcomputer 114 sends an instruction to stop the focus lens 105 to the focusing drive unit 111, and the process is terminated.

ここで、上述したS206の判断およびS208、S209の処理が行われている状態の例を、図11を参照して説明する。図11は、「2:拡大状態」でAF制御をしている状態で撮像面位相差方式によるデフォーカス量が検出できなくなり、「3:再配置期間中」となった場合のコントラストAF評価値の変化を示す図である。横軸はフォーカスレンズ105のレンズ位置、縦軸はコントラストAF評価値を表している。また、図中の×印は各レンズ位置において出力されたコントラストAF評価値を表しており、×印を線でつなぎ、×と×の間のコントラストAF評価値を仮想的に表現している。なお、本説明では、フォーカスレンズ105を一定速度で駆動しているものとし、これにより、横軸はレンズ位置を表すと同時に、時間も表していることになるため、ここではレンズ位置と時間をほぼ同等の意味で扱う。   Here, an example of a state in which the determination of S206 and the processing of S208 and S209 are performed will be described with reference to FIG. FIG. 11 shows the contrast AF evaluation value when the defocus amount by the imaging surface phase difference method cannot be detected in the state where AF control is performed in “2: Enlarged state” and becomes “3: During rearrangement period”. It is a figure which shows the change of. The horizontal axis represents the lens position of the focus lens 105, and the vertical axis represents the contrast AF evaluation value. Also, the x mark in the figure represents the contrast AF evaluation value output at each lens position, and the x mark is connected by a line to virtually express the contrast AF evaluation value between x and x. In this description, it is assumed that the focus lens 105 is driven at a constant speed, so that the horizontal axis represents the lens position and at the same time, so the lens position and time are represented here. Treat with almost equivalent meaning.

図11(a)は、「3:再配置期間中」に、コントラストAF評価値の変動が第1の閾値以内である場合を示す図である。まず、「2:拡大状態」でレンズ位置P1において検出したデフォーカス量に基づいてフォーカスレンズ105を駆動する。レンズ駆動中は所定の間隔で、上述した撮像面位相差方式の焦点検出によりデフォーカス量を検出しながら合焦方向(図11(a)では右方向)に向かって引き続きフォーカスレンズ105を駆動する。第1の実施形態においては、レンズ駆動中は上述したコントラストAF評価値取得タイミングでコントラストAF評価値を周期的に取得し、レンズ位置と対応付けながらコントラストAF評価値を記憶していく。ここでは、デフォーカス量が求められているため、基本的にコントラストAF評価値を用いずに、デフォーカス量に基づいてフォーカスレンズ105を駆動する。   FIG. 11A is a diagram illustrating a case where the change in the contrast AF evaluation value is within the first threshold during “3: during the rearrangement period”. First, the focus lens 105 is driven based on the defocus amount detected at the lens position P1 in “2: enlarged state”. While the lens is being driven, the focus lens 105 is continuously driven in the in-focus direction (right direction in FIG. 11A) while detecting the defocus amount by the above-described imaging surface phase difference type focus detection at a predetermined interval. . In the first embodiment, while driving the lens, the contrast AF evaluation value is periodically acquired at the above-described contrast AF evaluation value acquisition timing, and the contrast AF evaluation value is stored while being associated with the lens position. Here, since the defocus amount is obtained, the focus lens 105 is driven based on the defocus amount without using the contrast AF evaluation value basically.

次に、レンズ位置P2において、後述するように、デフォーカス量の信頼度が第2の閾値以下であると判定されたと仮定する。デフォーカス量の信頼度が低い場合は、上述したように焦点検出領域を再配置する。このように再配置した場合、再配置後の焦点検出領域に応じたデフォーカス量が所定期間出力されなくなる。ここでは、図11(a)の「×印」の3回分だけ出力されず、4回目で出力されるものとする。なお、回数や期間は各システムや設定状態(フレームレートやシャッタースピード等)、その他の条件によって変わるため、3回に限定されるものではない。   Next, it is assumed that the reliability of the defocus amount is determined to be equal to or less than the second threshold at the lens position P2, as will be described later. When the reliability of the defocus amount is low, the focus detection areas are rearranged as described above. When rearranged in this way, the defocus amount corresponding to the focus detection area after rearrangement is not output for a predetermined period. Here, it is assumed that the output is not performed for the three times “x” in FIG. Note that the number of times and the period are not limited to three because they vary depending on each system, the setting state (frame rate, shutter speed, etc.) and other conditions.

タイミングP2では、最新のコントラストAF評価値と、過去のコントラストAF評価値との差分aを計算する。図11(a)に示す例では、第1の閾値>差分a>0とであるため、被写体が変わっていないと判断し、再配置前に信頼度の高かったデフォーカス量(Def_bk)に基づいてフォーカスレンズ105を制御する。   At timing P2, the difference a between the latest contrast AF evaluation value and the past contrast AF evaluation value is calculated. In the example shown in FIG. 11A, since first threshold> difference a> 0, it is determined that the subject has not changed, and is based on the defocus amount (Def_bk) with high reliability before rearrangement. The focus lens 105 is controlled.

次に、タイミングP3において、前回(タイミングP2)取得したコントラストAF評価値との差分bを計算する。図11(a)に示す例では、第1の閾値>差分b>0となっており、再び、再配置前に信頼度の高かったデフォーカス量(Def_bk)に基づいてフォーカスレンズ105を制御する。   Next, at timing P3, a difference b from the contrast AF evaluation value acquired at the previous time (timing P2) is calculated. In the example shown in FIG. 11A, the first threshold> difference b> 0, and the focus lens 105 is controlled again based on the defocus amount (Def_bk) with high reliability before the rearrangement. .

以降、レンズ位置P4〜P6においても、前回取得したコントラストAF評価値との差分c〜差分eに基づいた同様の処理により、再配置前に信頼度の高かったデフォーカス量に基づいてフォーカスレンズ105を制御する。   Thereafter, at the lens positions P4 to P6, the focus lens 105 is based on the defocus amount with high reliability before the rearrangement by the same processing based on the difference c to the difference e from the previously acquired contrast AF evaluation value. To control.

以上の処理を行うことによって、焦点検出領域を再配置した場合に、再配置後の撮像面位相差方式によるデフォーカス量が出力されるまでの間も、コントラストAF評価値を参考にしてフォーカスレンズを制御することができる。このように、被写体が変わっていないと判断できる場合は、フォーカスレンズを駆動し続けることによって動画としての品位を損なうことなく、フォーカスレンズを制御することができる。   By performing the above processing, when the focus detection area is rearranged, the focus lens is referred to the contrast AF evaluation value until the defocus amount by the imaging surface phase difference method after the rearrangement is output. Can be controlled. Thus, when it can be determined that the subject has not changed, the focus lens can be controlled without deteriorating the quality of the moving image by continuing to drive the focus lens.

図11(b)は「3:再配置期間中」に、コントラストAF評価値の変動量が下がった(差分がマイナスとなる)場合を表す図である。なお、レンズ位置P2までは図11(a)と同様であるため説明を省略する。   FIG. 11B is a diagram illustrating a case where the amount of change in the contrast AF evaluation value decreases (the difference becomes negative) during “3: during the rearrangement period”. Since the lens position P2 is the same as that shown in FIG.

図11(b)に示す例では、タイミングP3において、コントラストAF評価値が前回取得したコントラストAF評価値よりも低い値となっており、前回のコントラストAF評価値との差分fがマイナスの値となるため、被写体が変わったと判断する。従って、再配置前に信頼度の高かったデフォーカス量は、被写体が変わる前のデフォーカス量であるため、使用することは不適切である。そのため、再配置後のデフォーカス量が得られるまでフォーカスレンズ105を停止することで、無駄なフォーカスレンズ105の駆動による動画の品位低下を防ぐことができる。   In the example shown in FIG. 11B, at the timing P3, the contrast AF evaluation value is lower than the previously acquired contrast AF evaluation value, and the difference f from the previous contrast AF evaluation value is a negative value. Therefore, it is determined that the subject has changed. Therefore, since the defocus amount with high reliability before the rearrangement is the defocus amount before the subject is changed, it is inappropriate to use it. Therefore, by stopping the focus lens 105 until the defocus amount after the rearrangement is obtained, it is possible to prevent the deterioration of the quality of the moving image due to unnecessary driving of the focus lens 105.

なお、上述した説明では、コントラストAF評価値の差分がマイナスの値となった場合に被写体が変わったと判断している。しかしながら、本発明はこれに限られるものではなく、コントラストAF評価値へのノイズの影響を考慮し、所定の閾値B(マイナスの値)を設けて差分が閾値B以下となった場合に被写体が変わったと判断しても良い。   In the above description, it is determined that the subject has changed when the difference in contrast AF evaluation value is a negative value. However, the present invention is not limited to this. Considering the influence of noise on the contrast AF evaluation value, a predetermined threshold value B (negative value) is provided, and the subject is detected when the difference is equal to or smaller than the threshold value B. You may judge that it has changed.

図11(c)は「3:再配置期間中」に、コントラストAF評価値の変動が閾値以上である(急激に増加する)場合を示す図である。なお、レンズ位置P2までは図11(a)と同様であるため説明を省略する。   FIG. 11C is a diagram illustrating a case where the variation of the contrast AF evaluation value is equal to or greater than a threshold (abrupt increase) during “3: during the rearrangement period”. Since the lens position P2 is the same as that shown in FIG.

図11(c)に示す例では、タイミングP3において、コントラストAF評価値が前回取得したよりも極端に高い値となっており、前回のコントラストAF評価値との差分gが第1の閾値を超える値となるため、被写体が変わったと判断する。従って、再配置前に信頼度の高かったデフォーカス量は被写体が変わる前の焦点検出結果であるため、使用することは不適切である。そのため、再配置後のデフォーカス量が得られるまでフォーカスレンズ105を停止することで、無駄なフォーカスレンズ105の駆動による動画の品位低下を防ぐことができる。   In the example shown in FIG. 11C, at the timing P3, the contrast AF evaluation value is extremely higher than the previously acquired value, and the difference g from the previous contrast AF evaluation value exceeds the first threshold value. Since it is a value, it is determined that the subject has changed. Therefore, since the defocus amount with high reliability before the rearrangement is a focus detection result before the subject is changed, it is inappropriate to use it. Therefore, by stopping the focus lens 105 until the defocus amount after the rearrangement is obtained, it is possible to prevent the deterioration of the quality of the moving image due to unnecessary driving of the focus lens 105.

なお、上述した説明では、第1の閾値を固定値としているが、第1の閾値の値はフレームレートやシャッタースピード等、コントラストAF評価値の取得タイミングが変わる条件で変更しても良いし、ズーム状態や明るさ状態などのカメラの状態で変更しても良い。   In the above description, the first threshold value is a fixed value. However, the first threshold value may be changed under conditions such as the frame rate and the shutter speed that change the acquisition timing of the contrast AF evaluation value. You may change with camera states, such as a zoom state and a brightness state.

また、第1の実施形態では、被写体が変わったと判断した場合にフォーカスレンズ105を停止するようにしているが、フォーカスレンズ105の駆動速度を落とすように制御しても良い。   In the first embodiment, the focus lens 105 is stopped when it is determined that the subject has changed. However, the drive speed of the focus lens 105 may be controlled to decrease.

また、上述の説明では、タイミングP2よりも時間的に後のタイミングP3でコントラストAF評価値が変動することを例に挙げて説明したが、タイミングP2でコントラストAF評価値が変動した場合も上述と同様の制御により被写体が変わったと判断できる。   In the above description, the contrast AF evaluation value fluctuates at timing P3 which is temporally later than timing P2. However, the case where the contrast AF evaluation value fluctuates at timing P2 is also described above. It can be determined that the subject has changed by similar control.

また、撮像面位相差方式によるデフォーカス量が出力されるタイミングが、コントラストAF評価値が出力されるタイミングよりも遅いことを考慮すると、次の可能性が考えられる。即ち、タイミングP2で焦点検出ができなくなる場合は、タイミングP2よりも前のタイミングでコントラストAF評価値が変動している可能性がある。従って、タイミングP2以降のコントラストAF評価値のみで被写体が変わったかどうかを判断するのではなく、タイミングP2よりも前のタイミングで取得したコントラストAF評価値を用いて被写体の変更を判断しても良い。   Considering that the timing at which the defocus amount by the imaging surface phase difference method is output is later than the timing at which the contrast AF evaluation value is output, the following possibilities are conceivable. In other words, when focus detection cannot be performed at timing P2, the contrast AF evaluation value may have fluctuated at a timing before timing P2. Therefore, instead of determining whether or not the subject has changed based on only the contrast AF evaluation value after timing P2, it is possible to determine whether to change the subject using the contrast AF evaluation value acquired at a timing before timing P2. .

次に、上記コントラストAF評価値を取得する領域(コントラストAF領域)について説明する。   Next, an area (contrast AF area) for acquiring the contrast AF evaluation value will be described.

コントラストAF領域は、図10に示されている表示AF枠92と略同じ領域に設定しても良いし、AF制御に使用しているデフォーカス量を検出した焦点検出ライン、及び水平の位置に応じて、表示AF枠92よりも小さい領域に設定しても良い。このように、再配置前にデフォーカス量を検出していた付近にコントラストAF領域を設定することで、再配置前の被写体と異なる被写体が表示AF枠92に出入りした場合に、誤ってレンズ駆動を停止したり、駆動を継続してしまうといったことを軽減できる。   The contrast AF area may be set to substantially the same area as the display AF frame 92 shown in FIG. 10, or the focus detection line that detects the defocus amount used for AF control, and the horizontal position. Accordingly, an area smaller than the display AF frame 92 may be set. In this way, by setting the contrast AF area in the vicinity where the defocus amount was detected before the rearrangement, when a subject different from the subject before the rearrangement enters and exits the display AF frame 92, the lens is erroneously driven. Can be reduced from stopping or continuing to drive.

また、コントラストAF領域を設定する際は、デフォーカス量を検出した焦点検出ラインと隣り合う再配置後の焦点検出ラインを含むようにコントラストAF領域を設定する。例えば、再配置前に焦点検出領域95b´でデフォーカス量を検出している場合、コントラストAF領域は少なくとも焦点検出領域95e及び95fを含むように設定する。焦点検出領域95e及び95fを含むように設定することで、焦点検出領域95eや95fに被写体が入ってきてからデフォーカス量を検出(算出)するまでのわずかなタイムラグによってレンズ制御を誤って停止したり、駆動を継続してしまうことを軽減できる。   Further, when setting the contrast AF area, the contrast AF area is set so as to include the rearranged focus detection line adjacent to the focus detection line where the defocus amount is detected. For example, when the defocus amount is detected in the focus detection area 95b ′ before the rearrangement, the contrast AF area is set to include at least the focus detection areas 95e and 95f. By setting to include the focus detection areas 95e and 95f, the lens control is erroneously stopped by a slight time lag from when the subject enters the focus detection areas 95e and 95f until the defocus amount is detected (calculated). Or continuing driving can be reduced.

以上の判断方法によって、「変化量が第1の閾値以内」である場合はコントラストAF領域内の被写体が変わっておらず、離散的に配置された焦点検出領域の隙間に被写体が入り込んだと判断する。一方、「変化量が第1の閾値を超える」場合は、コントラストAF領域内の被写体が変わっていると判断する。   According to the above determination method, when the amount of change is within the first threshold, it is determined that the subject in the contrast AF area has not changed and the subject has entered the gaps between the focus detection areas that are discretely arranged. To do. On the other hand, if “the amount of change exceeds the first threshold value”, it is determined that the subject in the contrast AF area has changed.

図8の説明に戻り、S205において、再配置後の焦点検出領域でデフォーカス量が出力されたと判断された場合、S207において、検出エリアフラグを「4:再配置済み」に設定し、S210に処理を移行する。   Returning to the description of FIG. 8, if it is determined in S205 that the defocus amount is output in the focus detection area after the rearrangement, the detection area flag is set to “4: rearranged” in S207, and the process proceeds to S210. Migrate processing.

S210では、カメラマイコン114は位相差AF信号処理部113から受信したデフォーカス量の信頼度が第2の閾値よりも高いか否かを判断する。第2の閾値よりも高いと判断した場合は、S211に処理を移行し、カメラマイコン114は受信したデフォーカス量を所定のRAMに格納して(デフォーカス量(Def_bk))、処理をS220に移行する。   In S210, the camera microcomputer 114 determines whether or not the reliability of the defocus amount received from the phase difference AF signal processing unit 113 is higher than the second threshold value. If it is determined that the value is higher than the second threshold value, the process proceeds to S211, the camera microcomputer 114 stores the received defocus amount in a predetermined RAM (defocus amount (Def_bk)), and the process proceeds to S220. Transition.

一方、S210において、デフォーカス量の信頼度が第2の閾値以下と判断した場合はS212に処理を移行する。S212では、カメラマイコン114は検出エリアフラグが「1:通常状態」、「2:拡大状態」、「4:再配置済み状態」の何れの状態であるのかを判定する。「1:通常状態」であると判定した場合は、S213に、「2:拡大状態」であると判定した場合はS214に、「4:再配置済み状態」であると判定した場合はS215に、それぞれ処理を移行する。   On the other hand, in S210, when it is determined that the reliability of the defocus amount is equal to or less than the second threshold, the process proceeds to S212. In S212, the camera microcomputer 114 determines whether the detection area flag is “1: normal state”, “2: enlarged state”, or “4: rearranged state”. If it is determined that the state is “1: normal state”, the process proceeds to S213. If it is determined that it is “2: enlarged state”, the process proceeds to S214. If it is determined that “4: rearranged state”, the process proceeds to S215. , Each process is transferred.

S213では、焦点検出領域を図10(b)に示す焦点検出領域95a’〜95d’に変更してS216に処理を移行し、検出エリアフラグを「2:拡大状態」に変更した後、S220に処理を移行する。   In S213, the focus detection area is changed to focus detection areas 95a ′ to 95d ′ shown in FIG. 10B, and the process proceeds to S216. After the detection area flag is changed to “2: enlarged state”, the process proceeds to S220. Migrate processing.

S214では、焦点検出領域を図10(c)に示す焦点検出領域95e〜95gに再配置してS217に処理を移行し、検出エリアフラグを「3:再配置期間中」に変更した後、S220に処理を移行する。   In S214, the focus detection areas are rearranged in the focus detection areas 95e to 95g shown in FIG. 10C, the process proceeds to S217, the detection area flag is changed to “3: during rearrangement period”, and then S220. The process is transferred to.

S215では、カメラマイコン114は、S106で算出されたデフォーカス方向の信頼度が第3の閾値よりも高いか否かを判断する。第3の閾値よりも高いと判断した場合はS218に処理を移行し、第3の閾値以下と判断した場合はS219に処理を移行する。   In S215, the camera microcomputer 114 determines whether or not the defocus direction reliability calculated in S106 is higher than the third threshold. If it is determined that the value is higher than the third threshold, the process proceeds to S218. If it is determined that the value is equal to or less than the third threshold, the process proceeds to S219.

S218では、カメラマイコン114は信頼度が閾値よりも高いと判断されたデフォーカス方向にフォーカスレンズ105を駆動するように、フォーカシング駆動部111に方向情報を設定する。S219では、カメラマイコン114は受信したデフォーカス量は利用できないと判断し、フォーカスレンズ105を所定方向に駆動するように、フォーカシング駆動部111に方向情報を設定し、S220に処理を移行する。なお、所定方向に関する一例として、フォーカスレンズ105の至近端又は無限端のうち現在のレンズ位置に対して遠い方の端に向かうように方向を設定する。   In S218, the camera microcomputer 114 sets direction information in the focusing drive unit 111 so as to drive the focus lens 105 in the defocus direction in which it is determined that the reliability is higher than the threshold value. In S219, the camera microcomputer 114 determines that the received defocus amount cannot be used, sets direction information in the focusing drive unit 111 so as to drive the focus lens 105 in a predetermined direction, and shifts the processing to S220. As an example of the predetermined direction, the direction is set so as to go to the far end or the infinite end of the focus lens 105 toward the end far from the current lens position.

S220では、上述した各処理に応じてフォーカスレンズ105を駆動する。   In S220, the focus lens 105 is driven according to each process described above.

なお、第1の実施形態では、S201〜S203において、シーン変化があったと判断された場合に焦点検出領域を「1:通常状態」に戻すようにしているが、本発明はこれに限られるものではない。例えば、再配置済みの場合においても信頼度の高いデフォーカス量が得られなかった場合に、拡大状態(あるいは通常状態)に戻して再度焦点検出するようにしてもよい。また、通常状態(あるいは拡大状態)で信頼度の高いデフォーカス量が得られなかった場合に、焦点検出領域を拡大状態(あるいは通常状態)と再配置状態を周期的に切り替え、それぞれの焦点検出結果に基づいて焦点検出を行うような構成にしてもよい。   In the first embodiment, the focus detection area is returned to “1: normal state” when it is determined in S201 to S203 that there is a scene change. However, the present invention is not limited to this. is not. For example, when a highly reliable defocus amount is not obtained even in the case of rearrangement, the focus detection may be performed again after returning to the enlarged state (or the normal state). In addition, when a highly reliable defocus amount cannot be obtained in the normal state (or the enlarged state), the focus detection area is periodically switched between the enlarged state (or the normal state) and the rearrangement state, and each focus detection is performed. You may make it a structure which performs a focus detection based on a result.

このような構成にすることで、焦点検出領域を再配置した状態において、カメラのブレや被写体の上下移動によって再び焦点検出ラインの隙間に被写体が入ってしまっても正しく焦点検出ができるため、さらに焦点検出性能の低下を軽減することが可能となる。ただし、カメラのブレや被写体の上下移動の周期と焦点検出領域の変更の周期が同じ場合に、焦点検出領域と被写体の位置が入れ違いになり、正しく焦点検出できない可能性がある。そのため、拡大状態(あるいは通常状態)と再配置状態を単純に交互に切り替えるのではなく、1周期の中で不均一となるように切り替えるようにすることが望ましい。   By adopting such a configuration, in the state where the focus detection area is rearranged, even if the subject enters the gap of the focus detection line again due to camera shake or vertical movement of the subject, focus detection can be performed correctly. It is possible to reduce a decrease in focus detection performance. However, when the period of camera shake and subject vertical movement is the same as the period of change of the focus detection area, the focus detection area and the position of the subject may be misplaced, and focus detection may not be performed correctly. For this reason, it is desirable not to simply switch between the enlarged state (or normal state) and the rearranged state, but to switch so as to be non-uniform in one cycle.

また、第1の実施形態では、焦点検出ラインをAF枠に対して一定間隔をあけて離散的に設定する場合について説明してきたが、これに限らず、まとまった領域を設定してもよいし、間隔を可変にする構成としてもよい。   Further, in the first embodiment, the case where the focus detection lines are discretely set with respect to the AF frame has been described. However, the present invention is not limited to this, and a grouped area may be set. The interval may be variable.

以上説明したように本第1の実施形態によれば、撮像領域に対して一部の限られた領域のみで焦点検出が可能な焦点調節装置において、予め設定された焦点検出領域から被写体が抜けることによる焦点検出性能の低下を軽減することができる。また、予め設定していた焦点検出領域とは異なる領域を設定したときに、新しく設定した領域における焦点検出結果の出力にタイムラグがある場合でも、レンズを動かし続けるべきか止めるべきかの判断を適切に行うことができる。   As described above, according to the first embodiment, in the focus adjustment apparatus capable of focus detection only in a limited area with respect to the imaging area, the subject comes out of the preset focus detection area. Therefore, it is possible to reduce the deterioration of the focus detection performance. Also, when an area different from the preset focus detection area is set, even if there is a time lag in the output of focus detection results in the newly set area, it is appropriate to determine whether to keep moving the lens or not Can be done.

<第2の実施形態>
次に、本発明の第2の実施形態について説明する。上述した第1の実施形態では、撮像面位相差方式における焦点検出で信頼性のあるデフォーカス量を求められない場合に、焦点検出領域の拡大、焦点検出ラインの配置を変更して焦点検出を継続する処理について説明した。
<Second Embodiment>
Next, a second embodiment of the present invention will be described. In the first embodiment described above, when a reliable defocus amount cannot be obtained by focus detection in the imaging surface phase difference method, focus detection is performed by expanding the focus detection area and changing the arrangement of the focus detection lines. The process to continue has been described.

これに対し、第2の実施形態では、焦点検出領域の拡大、焦点検出ラインの配置変更を実施しても、デフォーカス量が得られない場合の処理として、コントラストAFを継続することを特徴としている。以下に、コントラストAFへの切り替えに関して説明する。   In contrast, the second embodiment is characterized in that the contrast AF is continued as a process when the defocus amount cannot be obtained even if the focus detection area is expanded and the focus detection line is rearranged. Yes. Hereinafter, switching to contrast AF will be described.

ここではまず、第2の実施形態で実施されるコントラストAFに関して、図12のフローチャートを用いて説明する。なお、図12の処理は、撮像素子106、コントラストAF信号処理部116と、それらを制御するカメラマイコン114によって実行される。   Here, first, contrast AF performed in the second embodiment will be described with reference to the flowchart of FIG. 12 is executed by the image sensor 106, the contrast AF signal processing unit 116, and the camera microcomputer 114 that controls them.

まず、カメラマイコン114はS401において、第2の実施形態における後述する焦点検出領域の設定処理にて設定された駆動方向情報の有無を判定する。   First, in S401, the camera microcomputer 114 determines the presence / absence of drive direction information set in a focus detection area setting process described later in the second embodiment.

駆動方向情報がなければS402に進み、コントラストAF用ゲート115及びコントラストAF信号処理部116を通過して出力される、コントラストAF領域内の画像信号に基づいて算出されたコントラストAF評価値を取得する。   If there is no driving direction information, the process proceeds to S402, and a contrast AF evaluation value calculated based on an image signal in the contrast AF area output through the contrast AF gate 115 and the contrast AF signal processing unit 116 is acquired. .

次いでS403において、フォーカスレンズ105を予め決められた狭い範囲で反復駆動する微小駆動動作を行う。微小駆動動作を行いながらコントラストAF評価値を検出し、コントラストAF評価値が増加する方向を合焦方向とする。合焦方向が同一の状態が所定期間続くと、合焦方向を判定する。また合焦方向が同一エリアで所定回数往復する場合は、コントラストAF評価値のピークが検出されたとして合焦判定する。S403の微小駆動動作は、S404で合焦方向が判定されるまで繰り返し行われる。   Next, in S403, a minute driving operation for repeatedly driving the focus lens 105 within a predetermined narrow range is performed. The contrast AF evaluation value is detected while performing the minute driving operation, and the direction in which the contrast AF evaluation value increases is set as the in-focus direction. When the same in-focus direction continues for a predetermined period, the in-focus direction is determined. If the in-focus direction reciprocates a predetermined number of times in the same area, the in-focus determination is made assuming that the peak of the contrast AF evaluation value is detected. The minute driving operation in S403 is repeatedly performed until the in-focus direction is determined in S404.

S404で合焦方向が判定されると、引き続きS405で微小駆動動作における合焦判定を行う。S405で合焦判定されなかった場合は、S406に進み、山登り駆動動作を行う。   When the in-focus direction is determined in S404, the in-focus determination in the minute driving operation is subsequently performed in S405. If the focus is not determined in S405, the process proceeds to S406 and a hill-climbing driving operation is performed.

山登り駆動では、S404で判定された合焦方向、もしくはS401で判定された焦点検出領域の設定処理での駆動方向情報に基づき、コントラストAF評価値が大きくなる方向へ高速でフォーカスレンズ105を駆動させる。山登り駆動動作は、S407でコントラストAF評価値のピークを越えたと判定されるまで繰り返し行われる。S408では、山登り駆動中のコントラストAF評価値がピークとなるレンズ位置にフォーカスレンズ105を戻す。S409でピークに戻ったことが判定されるとS402に処理を戻し、再び微小駆動動作を行う。S409でピークのレンズ位置に戻っていないと判断された場合はS408へ戻り、ピークのレンズ位置に戻す動作を継続する。   In hill-climbing driving, the focus lens 105 is driven at high speed in a direction in which the contrast AF evaluation value increases based on the in-focus direction determined in S404 or the driving direction information in the focus detection area setting process determined in S401. . The hill-climbing driving operation is repeated until it is determined in S407 that the peak of the contrast AF evaluation value has been exceeded. In step S408, the focus lens 105 is returned to the lens position at which the contrast AF evaluation value during hill-climbing driving reaches a peak. If it is determined in S409 that the peak has been returned, the process returns to S402, and the minute driving operation is performed again. If it is determined in S409 that the lens position has not been returned to the peak lens position, the process returns to S408 to continue the operation of returning to the peak lens position.

次に、S410からの合焦動作について説明する。S410ではコントラストAF評価値を保持する。次にS411において、最新のコントラストAF評価値を取得する。S412では、S410で保持したコントラストAF評価値とS411で新たに取得したコントラストAF評価値とを比較する。コントラストAF評価値間の差が所定値以上あれば再起動と判定してS402に進み、微小駆動動作を再開する。S412で差が所定値より小さく、再起動と判定されなければS413へ進む。S413ではフォーカスレンズ105を停止し、S411へ戻り、再起動判定を継続する。   Next, the focusing operation from S410 will be described. In S410, the contrast AF evaluation value is held. In step S411, the latest contrast AF evaluation value is acquired. In S412, the contrast AF evaluation value held in S410 is compared with the contrast AF evaluation value newly acquired in S411. If the difference between the contrast AF evaluation values is greater than or equal to a predetermined value, it is determined that the operation has been restarted, and the process proceeds to S402 to restart the minute driving operation. If the difference is smaller than the predetermined value in S412 and it is not determined to restart, the process proceeds to S413. In S413, the focus lens 105 is stopped, the process returns to S411, and the restart determination is continued.

次に、第2の実施形態における焦点検出領域の設定処理について、図13のフローチャートを参照して説明する。なお、図13において図8と同じ符号で示す処理は、図8と同じ処理を示しており、ここでは説明を割愛する。   Next, focus detection area setting processing in the second embodiment will be described with reference to the flowchart of FIG. In FIG. 13, the process indicated by the same reference numeral as in FIG. 8 indicates the same process as in FIG. 8, and the description thereof is omitted here.

第2の実施形態では、焦点検出領域の拡大、および、焦点検出ラインの配置変更を実施しても、デフォーカス量が得られない場合にS502に処理が分岐し、コントラストAFへの切り替え処理が開始される。   In the second embodiment, if the defocus amount cannot be obtained even if the focus detection area is enlarged and the focus detection line is changed, the process branches to S502, and the process of switching to contrast AF is performed. Be started.

まずS502でフォーカスレンズ105が駆動中かを判定する。駆動中の場合はS503に処理を進め、駆動していなければ(停止状態)S507に処理を進める。   First, in S502, it is determined whether the focus lens 105 is being driven. If it is driven, the process proceeds to S503. If it is not driven (stopped), the process proceeds to S507.

S503では、コントラストAF信号処理部116にて検出されたコントラストAF評価値より、コントラストAF評価値の変動量を監視し、変動量が第4の閾値以内の時は、被写体を正しく捉え続けていると判断して、処理をS504に進める。S504では、コントラストAF信号処理部116でバックアップしたデフォーカス量(Def_bk)の信頼度を判定し、第5の閾値よりも信頼度が高いと判定されるとS505に進んで、位相差方式で前回判定された駆動方向に基づき駆動方向を設定する。前述したようにコントラストAFでは、この駆動方向を合焦方向の初期値として設定することで、合焦方向の判定処理をスキップして、合焦位置の検索に進むことができる。駆動方向が設定されるとS513に進み、コントラストAFの処理ルーチンを起動してコントラストAF制御を開始する。   In step S503, the amount of change in the contrast AF evaluation value is monitored from the contrast AF evaluation value detected by the contrast AF signal processing unit 116. If the amount of change is within the fourth threshold, the subject is correctly captured. The process proceeds to S504. In S504, the reliability of the defocus amount (Def_bk) backed up by the contrast AF signal processing unit 116 is determined. If it is determined that the reliability is higher than the fifth threshold value, the process proceeds to S505 and the previous phase difference method is used. A driving direction is set based on the determined driving direction. As described above, in contrast AF, by setting this driving direction as the initial value of the in-focus direction, it is possible to skip the in-focus direction determination process and proceed to search for the in-focus position. When the drive direction is set, the process proceeds to S513, where a contrast AF processing routine is activated to start contrast AF control.

一方、S503の判定で、コントラストAF評価値の変動量が第4の閾値を超え、被写体を捉え続けられていないと判断した場合、およびS504でバックアップしたデフォーカス量(Def_bk)の信頼性が低いと判断された場合は、S506に進む。S506では、駆動方向の情報はクリアされ、これによってコントラストAFでは、微小駆動による合焦方向の判定から処理を開始することになる。   On the other hand, in the determination of S503, when it is determined that the variation amount of the contrast AF evaluation value exceeds the fourth threshold and the subject has not been captured, and the reliability of the defocus amount (Def_bk) backed up in S504 is low. If it is determined, the process proceeds to S506. In S506, the information on the driving direction is cleared, and in contrast AF, the process is started from the determination of the focusing direction by minute driving.

次いでS502でフォーカスレンズが停止中と判定された場合について説明する。まず、S507でデフォーカス量のバックアップを確認する。バックアップが無い場合は位相差方式によるデフォーカス量の検出が全くできていないのでS509に進み、駆動方向をクリアする。駆動方向をクリアすることで、コントラストAF制御の微小駆動による合焦方向の判定から処理を開始する。   Next, the case where it is determined in S502 that the focus lens is stopped will be described. First, in step S507, the defocus amount backup is confirmed. If there is no backup, since the defocus amount is not detected at all by the phase difference method, the process proceeds to S509 and the drive direction is cleared. By clearing the drive direction, the process starts from determination of the focus direction by minute drive of contrast AF control.

また、バックアップがある場合で、かつS508でコントラストAF評価値に変化があったと判定された場合は、合焦状態から被写体が動いたと判断して、S509に進み駆動方向をクリアする。駆動方向をクリアすることでコントラストAF制御の微小駆動による合焦方向の判定から処理を開始する。S508でコントラストAF評価値に変化が無いと判定された場合は、合焦状態を維持し続けていると判断して、S510でフォーカスレンズ105の駆動を停止し、S511で駆動方向をクリアし、S512でコントラストAFを停止する。   If there is a backup and if it is determined in S508 that the contrast AF evaluation value has changed, it is determined that the subject has moved from the focused state, and the process proceeds to S509 to clear the drive direction. By clearing the driving direction, the processing is started from determination of the in-focus direction by minute driving of contrast AF control. If it is determined in S508 that there is no change in the contrast AF evaluation value, it is determined that the in-focus state is maintained, the driving of the focus lens 105 is stopped in S510, and the driving direction is cleared in S511. In step S512, the contrast AF is stopped.

なお、コントラストAF中にも位相差方式による焦点検出処理は継続して実施する。S210で位相差方式により計測されたデフォーカス量の信頼度が閾値以上と判定された場合はS211を経てS220に進み、位相差方式で計測されたデフォーカス量に基づきフォーカスレンズ105の合焦制御を実施する。また位相差方式での焦点調節処理の実施中は、S501でコントラストAFを停止する。   Note that the focus detection processing by the phase difference method is continuously performed even during contrast AF. If it is determined in S210 that the reliability of the defocus amount measured by the phase difference method is equal to or greater than the threshold value, the process proceeds to S220 via S211 and the focus control of the focus lens 105 is performed based on the defocus amount measured by the phase difference method. To implement. Further, during the focus adjustment process by the phase difference method, the contrast AF is stopped in S501.

また、S508の「コントラストAF評価値の変化」は、前回のコントラストAF評価値出力タイミングで出力されたコントラストAF評価値からの変化でも良いし、所定回数前のコントラストAF評価値からの変化でもよい。   Further, the “change in contrast AF evaluation value” in S508 may be a change from the contrast AF evaluation value output at the previous contrast AF evaluation value output timing or a change from the contrast AF evaluation value a predetermined number of times ago. .

以上説明したように本第2の実施形態によれば、第1の実施形態と同様の効果に加えて、以下の効果を得ることができる。即ち、焦点検出領域の拡大、焦点検出ラインの配置変更を実施しても、位相差方式で焦点検出できない場合には、コントラストAFに切り替えてAF制御を継続することで、焦点検出性能の低下を軽減することができる。   As described above, according to the second embodiment, the following effects can be obtained in addition to the same effects as those of the first embodiment. In other words, if focus detection cannot be performed using the phase difference method even if the focus detection area is enlarged or the focus detection line is changed, switching to contrast AF and continuing AF control will reduce the focus detection performance. Can be reduced.

(他の実施形態)
また、本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
Further, the present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus execute the program. It can also be realized by a process of reading and executing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

また、本発明はビデオカメラのような撮影を主目的とした機器に限定されず、携帯電話、パーソナルコンピュータ(ラップトップ型、デスクトップ型、タブレット型など)、ゲーム機など、焦点調節装置を内蔵もしくは外部接続する任意の機器に適用可能である。従って、本明細書における「焦点調節装置」は、焦点調節機能を備えた任意の電子機器を包含することが意図されている。以上、本発明の好ましい実施形態について説明したが、本発明は上記実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   In addition, the present invention is not limited to a device mainly intended for shooting such as a video camera, and has a built-in focusing device such as a mobile phone, personal computer (laptop type, desktop type, tablet type, etc.), game machine, or It can be applied to any device connected externally. Accordingly, the “focus adjustment device” in this specification is intended to include any electronic device having a focus adjustment function. As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to the said embodiment, A various deformation | transformation and change are possible within the range of the summary.

105:フォーカスコンペンセータレンズ、106:撮像素子、111:フォーカシング駆動部、112:位相差AF用ゲート、113:位相差AF信号処理部、114:カメラマイコン、115:コントラストAF用ゲート、116:コントラストAF信号処理部、117:位相差AF用画素読み出し設定部、200:画素、305:マイクロレンズ   105: Focus compensator lens, 106: Image sensor, 111: Focusing drive unit, 112: Phase difference AF gate, 113: Phase difference AF signal processing unit, 114: Camera microcomputer, 115: Contrast AF gate, 116: Contrast AF Signal processing unit, 117: phase difference AF pixel readout setting unit, 200: pixel, 305: microlens

Claims (23)

行列状に配置された複数のマイクロレンズそれぞれに対して複数の光電変換部を有し、前記複数の光電変換部から、対の焦点検出信号を得られるように信号を読み出す第1の読み出し制御と、各マイクロレンズごとに対応する前記複数の光電変換部に蓄積された電荷を加算して加算信号を読み出す第2の読み出し制御とを、切り替えて読み出し可能な撮像素子と、
予め決められた第1の焦点検出領域を含む前記第2の読み出し制御により読み出す複数の行のうち、前記第1の読み出し制御により読み出す行を設定する設定手段と、
前記第1の読み出し制御により読み出された行のうち、一部の範囲から得られた対の焦点検出信号を用いて位相差方式による焦点状態の検出を行う第1の焦点検出手段と、を有し、
前記設定手段は、予め決められた条件に基づいて、前記第1の読み出し制御により読み出す行の設定を変更することを特徴とする撮像装置。
A first readout control that has a plurality of photoelectric conversion units for each of the plurality of microlenses arranged in a matrix, and reads out signals from the plurality of photoelectric conversion units so as to obtain a pair of focus detection signals; A second readout control that reads out the addition signal by adding the charges accumulated in the plurality of photoelectric conversion units corresponding to each microlens, and an image sensor that can be read out by switching,
Setting means for setting a row to be read by the first readout control among a plurality of rows to be read by the second readout control including a predetermined first focus detection region;
First focus detection means for detecting a focus state by a phase difference method using a pair of focus detection signals obtained from a part of the rows read out by the first readout control; Have
The image pickup apparatus, wherein the setting unit changes a setting of a row to be read by the first read control based on a predetermined condition.
前記設定手段は、前記第1の焦点検出手段により検出された焦点状態の信頼度が予め決められた第1の閾値より低い場合に、前記第1の読み出し制御により読み出す行を、前記第1の読み出し制御により読み出ししていない行に設定を変更することを特徴とする請求項1に記載の撮像装置。   The setting unit reads a row read by the first read control when the reliability of the focus state detected by the first focus detection unit is lower than a predetermined first threshold. The imaging apparatus according to claim 1, wherein the setting is changed to a row that has not been read out by readout control. 前記第1の焦点検出手段は、前記検出した焦点状態の信頼度が予め決められた第2の閾値より低い場合に、前記焦点状態の検出に用いる対の焦点検出信号を得る範囲を拡大し、
前記設定手段は、前記対の焦点検出信号を得る範囲を拡大した後に前記第1の焦点検出手段により検出された焦点状態の信頼度が前記第1の閾値より低い場合に、前記第1の読み出し制御により読み出す行を変更することを特徴とする請求項2に記載の撮像装置。
The first focus detection means expands a range for obtaining a pair of focus detection signals used for detection of the focus state when the reliability of the detected focus state is lower than a predetermined second threshold,
The setting means performs the first reading when the reliability of the focus state detected by the first focus detection means is lower than the first threshold after expanding the range for obtaining the pair of focus detection signals. The imaging apparatus according to claim 2, wherein a row to be read is changed by control.
前記設定手段は、前記第1の読み出し制御により読み出す行を、周期的に変更することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the setting unit periodically changes a row read by the first read control. 前記設定手段は、予め決められた期間で前記撮像素子の予め決められた領域から信号を読み出し可能な範囲で、前記第1の読み出し制御により読み出す行を設定することを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。   The setting means sets a row to be read by the first read control within a range in which a signal can be read from a predetermined region of the image sensor in a predetermined period. 5. The imaging device according to any one of 4. 前記設定手段は、前記第1の焦点検出領域を含む前記複数の光電変換部の複数の行のうち、予め決められた数の行おきに前記第1の読み出し制御により読み出す行を設定することを特徴とする請求項3に記載の撮像装置。   The setting means sets a row to be read by the first read control every predetermined number of rows among the plurality of rows of the plurality of photoelectric conversion units including the first focus detection region. The imaging apparatus according to claim 3. 前記第1の焦点検出手段により検出された焦点状態に基づいて、フォーカスレンズの駆動量および駆動方向を決定する決定手段と、
予め決められた第2の焦点検出領域に含まれる前記複数の光電変換部から得られた加算信号に基づいて、コントラスト方式による焦点状態の検出を行う第2の焦点検出手段を更に有し、
前記決定手段は、前記設定手段により前記第1の読み出し制御により読み出す行を変更した後、前記第1の焦点検出手段により前記焦点状態の検出が終了するまで、前記第2の焦点検出手段により検出された焦点状態に基づいて、前記変更の前に前記第1の焦点検出手段により得られた焦点状態に応じて前記フォーカスレンズを駆動するか否かを決定することを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。
Determining means for determining a driving amount and a driving direction of the focus lens based on the focus state detected by the first focus detecting means;
Further comprising second focus detection means for detecting a focus state by a contrast method based on the addition signals obtained from the plurality of photoelectric conversion units included in the predetermined second focus detection region;
The determination means detects the second focus detection means until the detection of the focus state is completed by the first focus detection means after the row read by the first read control is changed by the setting means. 2. The method according to claim 1, further comprising: determining whether to drive the focus lens according to the focus state obtained by the first focus detection unit before the change based on the focus state. The imaging device according to any one of 6.
前記決定手段は、前記設定手段により前記第1の読み出し制御により読み出す行を変更する時に、前記第2の焦点検出手段により検出された焦点状態の変動量が予め決められた閾値以内である場合に、前記変更の前に前記第1の焦点検出手段により得られた焦点状態に応じて前記フォーカスレンズを駆動すると決定することを特徴とする請求項7に記載の撮像装置。   The determination unit is configured to change the focus state detected by the second focus detection unit within a predetermined threshold when changing the row read by the first read control by the setting unit. The imaging apparatus according to claim 7, wherein the focus lens is determined to be driven according to a focus state obtained by the first focus detection unit before the change. 前記決定手段は、前記設定手段により前記第1の読み出し制御により読み出す行を変更する時に、前記第2の焦点検出手段により検出された焦点状態の変動量が前記予め決められた閾値を超える場合に、前記フォーカスレンズの駆動を停止すると決定することを特徴とする請求項8に記載の撮像装置。   The determining unit is configured to change the focus state detected by the second focus detecting unit when the row to be read by the first reading control is changed by the setting unit when the amount of variation in the focus state exceeds the predetermined threshold. The imaging apparatus according to claim 8, wherein it is determined to stop driving the focus lens. 前記第2の焦点検出領域は、前記変更の前に前記第1の焦点検出手段により前記焦点状態を検出していた領域を含むことを特徴とする請求項7乃至9のいずれか1項に記載の撮像装置。   The said 2nd focus detection area | region contains the area | region which detected the said focus state by the said 1st focus detection means before the said change, The any one of Claim 7 thru | or 9 characterized by the above-mentioned. Imaging device. 前記変更した後に前記第1の焦点検出手段により検出された焦点状態の信頼度が予め決められた第3の閾値以下の場合に、前記決定手段は、前記第2の焦点検出手段により得られた焦点状態に基づいて、前記フォーカスレンズの駆動量および駆動方向を決定することを特徴とする請求項7乃至10のいずれか1項に記載の撮像装置。   The determination means is obtained by the second focus detection means when the reliability of the focus state detected by the first focus detection means after the change is equal to or less than a predetermined third threshold value. The imaging apparatus according to claim 7, wherein a driving amount and a driving direction of the focus lens are determined based on a focus state. 前記フォーカスレンズを駆動中であって、前記第2の焦点検出手段により検出された焦点状態の変動量が予め決められた第4の閾値以内、且つ、前記変更の前に前記第1の焦点検出手段により得られた信頼度が予め決められた第5の閾値より高い焦点状態がある場合に、前記決定手段は、前記駆動方向の初期値として、当該第1の焦点検出手段により得られた焦点状態に基づいて、前記フォーカスレンズの方向を決定することを特徴とする請求項11に記載の撮像装置。   While the focus lens is being driven, the amount of change in the focus state detected by the second focus detection means is within a predetermined fourth threshold value, and the first focus detection before the change When there is a focus state in which the reliability obtained by the means is higher than a predetermined fifth threshold, the determination means uses the focus obtained by the first focus detection means as the initial value of the driving direction. The imaging apparatus according to claim 11, wherein a direction of the focus lens is determined based on a state. 前記第2の焦点検出手段により検出された焦点状態の変動量が予め決められた第6の閾値を超える場合に、前記決定手段は、前記駆動方向を決定するために、前記フォーカスレンズを予め決められた範囲で反復駆動すると決定することを特徴とする請求項11または12に記載の撮像装置。   When the fluctuation amount of the focus state detected by the second focus detection unit exceeds a predetermined sixth threshold, the determination unit determines the focus lens in advance in order to determine the drive direction. The imaging apparatus according to claim 11, wherein it is determined that the driving is repeated within a specified range. 前記フォーカスレンズが停止中であって、前記変更の前に前記第1の焦点検出手段により得られた信頼度が予め決められた第7の閾値より高い焦点状態が無い場合に、前記決定手段は、前記駆動方向を決定するために、前記フォーカスレンズを予め決められた範囲で反復駆動すると決定することを特徴とする請求項11乃至13のいずれか1項に記載の撮像装置。   When the focus lens is stopped and there is no focus state in which the reliability obtained by the first focus detection means before the change is higher than a predetermined seventh threshold, the determination means The imaging apparatus according to claim 11, wherein, in order to determine the driving direction, it is determined that the focus lens is repeatedly driven within a predetermined range. 前記決定手段は、前記変更の後に前記第1の焦点検出手段により検出された焦点状態の信頼度が前記第1の閾値より高くなった場合に、前記第1の焦点検出手段により得られた焦点状態に基づいて、前記フォーカスレンズの駆動量および駆動方向を決定することを特徴とする請求項11乃至14のいずれか1項に記載の撮像装置。   The determination unit is configured to detect the focus obtained by the first focus detection unit when the reliability of the focus state detected by the first focus detection unit is higher than the first threshold after the change. The imaging apparatus according to claim 11, wherein a driving amount and a driving direction of the focus lens are determined based on a state. 行列状に配置された複数のマイクロレンズそれぞれに対して複数の光電変換部を有する撮像素子の駆動方法であって、
設定手段が、予め決められた第1の焦点検出領域を含む前記複数の光電変換部の複数の行のうち、前記複数の光電変換部から、対の焦点検出信号を得られるように信号を読み出す第1の読み出し制御により読み出す行と、各マイクロレンズごとに対応する前記複数の光電変換部に蓄積された電荷を加算して加算信号を読み出す第2の読み出し制御により読み出す行を、行単位で設定する設定工程と、
読み出し手段が、前記複数の光電変換部から、前記設定手段により設定された前記第1の読み出し制御と前記第2の読み出し制御とを、切り替えて読み出す読み出し工程と、
第1の焦点検出手段が、前記第1の読み出し制御により読み出された行のうち、一部の範囲から得られた対の焦点検出信号を用いて位相差方式による焦点状態の検出を行う第1の焦点検出工程と、を有し、
前記設定工程では、予め決められた条件に基づいて、前記第1の読み出し制御により読み出す行の設定を変更することを特徴とする撮像素子の駆動方法。
A driving method of an image sensor having a plurality of photoelectric conversion units for each of a plurality of microlenses arranged in a matrix,
The setting unit reads signals so as to obtain a pair of focus detection signals from the plurality of photoelectric conversion units among the plurality of rows of the plurality of photoelectric conversion units including the predetermined first focus detection region. A row to be read by the first read control and a row to be read by the second read control for adding the charges accumulated in the plurality of photoelectric conversion units corresponding to the respective microlenses and reading the addition signal are set in units of rows. A setting process to
A reading step in which a reading unit switches and reads the first reading control and the second reading control set by the setting unit from the plurality of photoelectric conversion units;
A first focus detection unit detects a focus state by a phase difference method using a pair of focus detection signals obtained from a part of a range of rows read by the first read control. 1 focus detection step, and
In the setting step, the setting of a row to be read by the first read control is changed based on a predetermined condition, and the image sensor driving method is characterized in that:
前記設定工程では、前記第1の焦点検出工程で検出された焦点状態の信頼度が予め決められた第1の閾値より低い場合に、前記第1の読み出し制御により読み出す行を、前記第1の読み出し制御により読み出ししていない行に設定を変更することを特徴とする請求項16に記載の撮像素子の駆動方法。   In the setting step, when the reliability of the focus state detected in the first focus detection step is lower than a predetermined first threshold, a row read by the first read control is set as the first read control. The image sensor driving method according to claim 16, wherein the setting is changed to a row that has not been read out by readout control. 前記第1の焦点検出手段が、前記検出した焦点状態の信頼度が予め決められた第2の閾値より低い場合に、前記焦点状態の検出に用いる対の焦点検出信号を得る範囲を拡大する拡大工程と、
前記設定手段が、前記対の焦点検出信号を得る範囲を拡大した後に前記第1の焦点検出工程で検出された焦点状態の信頼度が前記第1の閾値より低い場合に、前記第1の読み出し制御により読み出す行を変更することを特徴とする請求項17に記載の撮像素子の駆動方法。
The first focus detection unit expands a range for obtaining a pair of focus detection signals used for detection of the focus state when the reliability of the detected focus state is lower than a predetermined second threshold. Process,
When the setting means expands the range for obtaining the pair of focus detection signals and the reliability of the focus state detected in the first focus detection step is lower than the first threshold value, the first reading is performed. The method for driving an image sensor according to claim 17, wherein a row to be read is changed by control.
前記設定工程では、前記第1の読み出し制御により読み出す行を、周期的に変更することを特徴とする請求項16に記載の撮像素子の駆動方法。   The image sensor driving method according to claim 16, wherein, in the setting step, a row to be read by the first read control is periodically changed. 決定手段が、前記第1の焦点検出工程で検出された焦点状態に基づいて、フォーカスレンズの駆動量および駆動方向を決定する決定工程と、
第2の焦点検出手段が、予め決められた第2の焦点検出領域に含まれる前記複数の光電変換部から得られた加算信号に基づいて、コントラスト方式による焦点状態の検出を行う第2の焦点検出工程を更に含み、
前記決定工程では、前記設定工程で前記第1の読み出し制御により読み出す行を変更した後、前記第1の焦点検出工程で前記焦点状態の検出が終了するまで、前記第2の焦点検出工程で検出された焦点状態に基づいて、前記変更の前に前記第1の焦点検出工程で得られた焦点状態に応じて前記フォーカスレンズを駆動するか否かを決定することを特徴とする請求項16乃至19のいずれか1項に記載の撮像素子の駆動方法。
A determining step for determining a driving amount and a driving direction of the focus lens based on the focus state detected in the first focus detection step;
A second focus for detecting a focus state by a contrast method based on an addition signal obtained from the plurality of photoelectric conversion units included in the predetermined second focus detection region; Further comprising a detection step,
In the determination step, after the row read by the first read control is changed in the setting step, detection is performed in the second focus detection step until detection of the focus state is completed in the first focus detection step. 17. The method according to claim 16, further comprising: determining whether to drive the focus lens according to the focus state obtained in the first focus detection step before the change based on the focused state. The image sensor driving method according to any one of 19.
前記変更した後に前記第1の焦点検出工程で検出された焦点状態の信頼度が予め決められた第3の閾値以下の場合に、前記決定工程において、前記第2の焦点検出工程で得られた焦点状態に基づいて、前記フォーカスレンズの駆動量および駆動方向を決定することを特徴とする請求項20に記載の撮像素子の駆動方法。   Obtained in the second focus detection step in the determination step when the reliability of the focus state detected in the first focus detection step after the change is equal to or less than a predetermined third threshold value. 21. The image sensor driving method according to claim 20, wherein a driving amount and a driving direction of the focus lens are determined based on a focus state. コンピュータに、請求項16乃至21のいずれか1項に記載の撮像素子の駆動方法の各工程を実行させるためのプログラム。   The program for making a computer perform each process of the drive method of the image pick-up element of any one of Claims 16 thru | or 21. 請求項22に記載のプログラムを記憶したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 22.
JP2016078433A 2016-04-08 2016-04-08 Imaging apparatus and method for driving imaging element Pending JP2017187726A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016078433A JP2017187726A (en) 2016-04-08 2016-04-08 Imaging apparatus and method for driving imaging element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016078433A JP2017187726A (en) 2016-04-08 2016-04-08 Imaging apparatus and method for driving imaging element

Publications (1)

Publication Number Publication Date
JP2017187726A true JP2017187726A (en) 2017-10-12

Family

ID=60046419

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016078433A Pending JP2017187726A (en) 2016-04-08 2016-04-08 Imaging apparatus and method for driving imaging element

Country Status (1)

Country Link
JP (1) JP2017187726A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123930A (en) * 2019-01-31 2020-08-13 キヤノン株式会社 Imaging device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123930A (en) * 2019-01-31 2020-08-13 キヤノン株式会社 Imaging device
JP7218193B2 (en) 2019-01-31 2023-02-06 キヤノン株式会社 Imaging device

Similar Documents

Publication Publication Date Title
US7920781B2 (en) Image capturing apparatus and control method therefor
JP6249825B2 (en) Imaging device, control method thereof, and control program
KR20170137633A (en) Image processing apparatus, image capturing apparatus, image processing method, and computer-readable storage medium
US9160919B2 (en) Focus adjustment unit and camera system
JP6239857B2 (en) Imaging apparatus and control method thereof
JP2016038414A (en) Focus detection device, control method thereof, and imaging apparatus
JP2015215371A (en) Focus adjustment unit and control method therefor
US9300862B2 (en) Control apparatus and control method
JP6548437B2 (en) Focusing apparatus, control method therefor, control program, and imaging apparatus
JP7007871B2 (en) Imaging device and its control method, program, storage medium
US10362214B2 (en) Control apparatus, image capturing apparatus, control method, and non-transitory computer-readable storage medium
US10497102B2 (en) Imaging apparatus, control method and non-transitory storage medium
JP2015194736A (en) Imaging device and method for controlling the same
US20170034426A1 (en) Control apparatus, image pickup apparatus, control method, and non-transitory computer-readable storage medium for performing focus detection
US10412330B2 (en) Image capture apparatus and method for controlling the same
JP2018132613A (en) Focus detection device and imaging device
JP2017187726A (en) Imaging apparatus and method for driving imaging element
JP2016095416A (en) Focus adjustment device, imaging apparatus, method for controlling focus adjustment device, and program
JP7309383B2 (en) Imaging device
JP7019337B2 (en) Image stabilization device, lens device and their control method
JP2017194656A (en) Image capturing device, control method therefor, program, and storage medium
JP2020057017A (en) Image-capturing device and method for controlling the same
JP2016009024A (en) Focus detector, control method of the same, and imaging apparatus
JP6929140B2 (en) Control device, image pickup device, control method, program, and storage medium
JP2020067489A (en) Imaging apparatus and control method for the same