JP2017016064A - Focus adjustment device, focus adjustment method, and imaging apparatus - Google Patents

Focus adjustment device, focus adjustment method, and imaging apparatus Download PDF

Info

Publication number
JP2017016064A
JP2017016064A JP2015135561A JP2015135561A JP2017016064A JP 2017016064 A JP2017016064 A JP 2017016064A JP 2015135561 A JP2015135561 A JP 2015135561A JP 2015135561 A JP2015135561 A JP 2015135561A JP 2017016064 A JP2017016064 A JP 2017016064A
Authority
JP
Japan
Prior art keywords
frame
focus adjustment
addition
focus detection
image
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
JP2015135561A
Other languages
Japanese (ja)
Inventor
山田 恵司
Keiji Yamada
恵司 山田
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 JP2015135561A priority Critical patent/JP2017016064A/en
Publication of JP2017016064A publication Critical patent/JP2017016064A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a highly accurate focus adjustment device suppressing noise of image signals and deterioration in resolution in a longitudinal direction, in a focus detection of an imaging element having a photoelectric conversion part provided with a pupil division function.SOLUTION: A focus adjustment device that performs a phase difference-based focus adjustment using focus detection signals output from an imaging element receiving a pair of light beams, having passed through pupil areas having different imaging optical systems, with a pair of photoelectric conversion parts includes ratio setting means that varies a line addition number calculated by line addition means and a frame addition number calculated by frame addition means and sets a ratio of the line addition number to the frame addition number. The ratio setting means varies the ratio on the basis of at least one of a luminance value and a contrast value.SELECTED DRAWING: Figure 2

Description

本発明は、撮像光学系の焦点状態を検出する焦点検出機能を備えた焦点調節装置に関するものである。焦点調節装置は、デジタルスチルカメラ、デジタルビデオカメラとしての撮像装置に搭載される。   The present invention relates to a focus adjustment device having a focus detection function for detecting a focus state of an imaging optical system. The focus adjustment device is mounted on an imaging device as a digital still camera or a digital video camera.

撮影レンズの焦点状態を検出する方式として、位相差検出方式(以下、位相差AFという)がある。位相差AF、撮影レンズの射出瞳を通過した光束を2分割し、2分割した光束を一組の焦点検出用センサによりそれぞれ受光する。   There is a phase difference detection method (hereinafter referred to as phase difference AF) as a method for detecting the focus state of the photographing lens. The light beam that has passed through the phase difference AF and the exit pupil of the photographing lens is divided into two, and the two divided beams are received by a set of focus detection sensors.

そして、その受光量に応じて出力される信号のずれ量、すなわち、光束の分割方向の相対的位置ずれ量を検出することで、合焦させるために必要な撮影レンズの駆動量を直接求めるものである。   Then, by detecting the amount of deviation of the output signal according to the amount of received light, that is, the amount of relative positional deviation in the beam splitting direction, the amount of driving of the photographing lens necessary for focusing is directly obtained. It is.

下記の特許文献1では、撮像素子の1ライン毎の明るさを検出し、予め設定された明るさよりも暗い場合には、ライン加算を行っている。   In Patent Document 1 below, the brightness of each line of the image sensor is detected, and line addition is performed when the brightness is lower than a preset brightness.

下記の特許文献2では、測距点の位置に応じて閾値を調整し、閾値を超えるまでフレーム加算を行っている。   In Patent Document 2 below, the threshold is adjusted according to the position of the distance measuring point, and frame addition is performed until the threshold is exceeded.

特開2010−271419号公報JP 2010-271419 A 特開2013−37143号公報JP 2013-37143 A

しかしながら、特許文献1では、画像信号に基づいてライン加算を行うことで焦点検出に用いる画像信号のノイズを低減しているが、ライン加算による被写体縦方向の分解能の低下については考慮されていない。   However, in Patent Document 1, noise in the image signal used for focus detection is reduced by performing line addition based on the image signal, but the reduction in resolution in the subject vertical direction due to line addition is not considered.

また、特許文献2では、加算した輝度値と閾値を比較してフレーム加算数を決定しているが、被写体のコントラストが高い場合はフレーム加算数を減らしても焦点検出は可能であるがそこが考慮されていない。   In Patent Document 2, the added luminance value is compared with the threshold value to determine the frame addition number. However, when the contrast of the subject is high, focus detection is possible even if the frame addition number is reduced. Not considered.

そこで、本発明では、瞳分割機能を付与された光電変換部を有する撮像素子における焦点検出において、画像信号のノイズと縦方向の分解能の低下を抑えた高精度な焦点検出装置、撮像装置、撮像システム、および、焦点検出方法を提供する。   Therefore, in the present invention, in focus detection in an image sensor having a photoelectric conversion unit provided with a pupil division function, a highly accurate focus detection device, imaging device, and imaging in which noise in an image signal and reduction in resolution in the vertical direction are suppressed. A system and a focus detection method are provided.

上記の課題を解決するために本発明では、撮像光学系の異なる瞳領域を通過した一対の光束を一対の光電変換部で受光する撮像素子から出力された焦点検出信号を用いて位相差方式の焦点調節を行う焦点調節装置であって、
焦点検出領域にある前記撮像素子を構成する複数の画素をライン方向に加算するライン加算手段と、前記ライン加算手段にて加算された加算値を用いて相関演算を行って相関量を算出する相関量算出手段と、フレーム毎に算出された前記相関値を加算するフレーム加算手段と、前記焦点検出領域の画像の輝度値及びコントラスト値の少なくとも一方の大きさを判定する判定手段と、前記ライン加算手段で算出されたライン加算数及び前記フレーム加算手段で算出されたフレーム加算数を可変するとともに、前記ライン加算数と前記フレーム加算数との比率を設定する比率設定手段と、を備え、
前記比率設定手段は、前記輝度値及び前記コントラスト値の少なくとも一方の大きさに基いて、前記比率を可変することを特徴とする。
In order to solve the above problems, in the present invention, a phase difference method is used by using a focus detection signal output from an image sensor that receives a pair of light beams that have passed through different pupil regions of an imaging optical system by a pair of photoelectric conversion units. A focus adjustment device for performing focus adjustment,
Correlation for calculating a correlation amount by performing a correlation operation using a line addition unit that adds a plurality of pixels constituting the image sensor in the focus detection area in a line direction, and an addition value added by the line addition unit. An amount calculating means; a frame adding means for adding the correlation values calculated for each frame; a determining means for determining at least one of a luminance value and a contrast value of an image in the focus detection area; and the line addition. A line addition number calculated by the means and a frame addition number calculated by the frame addition means, and a ratio setting means for setting a ratio between the line addition number and the frame addition number,
The ratio setting unit varies the ratio based on at least one of the luminance value and the contrast value.

本発明によれば、焦点検出領域の被写体に対して分解能の低下を抑え、かつノイズを抑えた画像信号を用いた焦点検出を行うことができ、高精度な焦点検出装置、撮像装置、撮像システム、および、焦点検出方法を提供することができる。   According to the present invention, it is possible to perform focus detection using an image signal in which a reduction in resolution is suppressed and noise is suppressed with respect to a subject in a focus detection region, and a highly accurate focus detection device, imaging device, and imaging system are provided. And a focus detection method can be provided.

本実施例におけるシステム構成図System configuration diagram in this embodiment 実施例1の加算割合決定方法を示すフローチャートFlowchart illustrating an addition ratio determination method according to the first embodiment. 本実施例における撮像素子の説明図Explanatory drawing of the image sensor in this embodiment 本実施例における撮像光学系の瞳を示す図The figure which shows the pupil of the imaging optical system in a present Example 本実施例における焦点検出領域の画素ライン加算を示す図The figure which shows the pixel line addition of the focus detection area | region in a present Example. 本実施例における信号および相関演算の説明図Illustration of signal and correlation calculation in this embodiment 本実施例における焦点検出領域を示す図The figure which shows the focus detection area | region in a present Example. 本実施例における光学系の説明図Illustration of the optical system in this example 焦点検出領域に対して斜めにかかる被写体の例を示す図The figure which shows the example of the to-be-photographed object inclined with respect to a focus detection area 本実施例における焦点検出方法を示すフローチャートFlowchart showing a focus detection method in this embodiment 実施例2の加算割合決定方法を示すフローチャートFlowchart illustrating an addition ratio determination method according to the second embodiment.

以下、本発明の実施例について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In each figure, the same members are denoted by the same reference numerals, and redundant description is omitted.

本発明の焦点調節装置は、撮像光学系の異なる瞳領域を通過した一対の光束を一対の光電変換部で受光する撮像素子から出力された焦点検出信号を用いて位相差方式の焦点調節を行う装置である。   The focus adjustment apparatus of the present invention performs phase difference type focus adjustment using a focus detection signal output from an image sensor that receives a pair of light beams that have passed through different pupil regions of an imaging optical system by a pair of photoelectric conversion units. Device.

<実施例1>
(図1のブロック図の説明)
まず、図1を参照して、本実施例における撮像装置の構成について説明する。図1は、撮像装置100の構成を示すブロック図である。
<Example 1>
(Explanation of the block diagram of FIG. 1)
First, with reference to FIG. 1, the structure of the imaging device in a present Example is demonstrated. FIG. 1 is a block diagram illustrating a configuration of the imaging apparatus 100.

撮像装置100は、被写体を撮影して、動画や静止画のデータを固体メモリや光ディスク、磁気ディスクなどの各種メディアに記録可能なビデオカメラやデジタルスチルカメラなどであるが、これらに限定されるものではない。   The imaging apparatus 100 is a video camera or a digital still camera that can shoot a subject and record moving image or still image data on various media such as a solid-state memory, an optical disk, and a magnetic disk, but is not limited thereto. is not.

撮像装置100内の各ユニットは、バス160を介して接続されている。また各ユニットは、メインCPU151(中央演算処理装置)により制御される。   Each unit in the imaging apparatus 100 is connected via a bus 160. Each unit is controlled by a main CPU 151 (central processing unit).

撮像装置100は、一つのマイクロレンズを共有する複数の光電変換素子(第1の光電変換素子および第2の光電変換素子)を備えた撮像素子を用いて撮像面位相差方式の焦点調節を行う焦点調節装置を搭載している。   The imaging apparatus 100 performs imaging surface phase difference type focus adjustment using an imaging element including a plurality of photoelectric conversion elements (a first photoelectric conversion element and a second photoelectric conversion element) sharing one microlens. It is equipped with a focus adjustment device.

なお、本実施例の焦点調節装置は、撮像光学系(撮影レンズ)を介して得られた光学像を取得可能に構成された撮像装置(撮像装置本体)と、撮像装置本体に着脱可能な撮像光学系とを備えて構成された撮像システムに適用される。   Note that the focus adjustment apparatus of the present embodiment includes an imaging apparatus (imaging apparatus body) configured to be able to acquire an optical image obtained via an imaging optical system (imaging lens), and an imaging device that can be attached to and detached from the imaging apparatus body. The present invention is applied to an imaging system that includes an optical system.

ただし、本実施例はこれに限定されるものではなく、撮像光学系が一体的に設けられた撮像装置にも適用可能である。   However, the present embodiment is not limited to this, and can also be applied to an imaging apparatus in which an imaging optical system is integrally provided.

撮影レンズ101(レンズユニット)は、固定1群レンズ102、ズームレンズ111、絞り103、固定3群レンズ121、および、フォーカスレンズ131を備えて構成される。   The photographing lens 101 (lens unit) includes a fixed first group lens 102, a zoom lens 111, a diaphragm 103, a fixed third group lens 121, and a focus lens 131.

絞り制御部105は、メインCPU151の指令に従い、絞りモータ104を介して絞り103を駆動することにより、絞り103の開口径を調整して撮影時の光量調節を行う。   The diaphragm control unit 105 adjusts the light amount at the time of shooting by adjusting the aperture diameter of the diaphragm 103 by driving the diaphragm 103 via the diaphragm motor 104 in accordance with a command from the main CPU 151.

ズーム制御部113は、ズームモータ112を介してズームレンズ111を駆動することにより、焦点距離を変更する。   The zoom control unit 113 changes the focal length by driving the zoom lens 111 via the zoom motor 112.

また、フォーカス制御部133は、フォーカスモータ132を介してフォーカスレンズ131を駆動することにより、焦点調節状態を制御する。フォーカスレンズ131は、焦点調節用レンズであり、図1には単レンズで簡略的に示されているが、通常複数のレンズで構成される。   The focus control unit 133 controls the focus adjustment state by driving the focus lens 131 via the focus motor 132. The focus lens 131 is a focus adjustment lens, and is simply shown as a single lens in FIG.

これらの光学部材(撮影レンズ101)を介して撮像素子141上に結像する被写体像は、撮像素子141により電気信号に変換される。   A subject image formed on the image sensor 141 via these optical members (the photographing lens 101) is converted into an electric signal by the image sensor 141.

撮像素子141は、被写体像(光学像)を電気信号に光電変換を行う光電変換素子である。   The imaging element 141 is a photoelectric conversion element that performs photoelectric conversion of a subject image (optical image) into an electrical signal.

撮像素子141は、横方向にm画素、縦方向にn画素の受光素子のそれぞれに、後述のように二つの光電変換素子(受光領域)が配置されている。   In the imaging device 141, two photoelectric conversion elements (light receiving regions) are arranged in each of the light receiving elements of m pixels in the horizontal direction and n pixels in the vertical direction as described later.

撮像素子141上に結像されて光電変換された画像は、撮像信号処理部142により画像信号(画像データ)として整えられる。   An image formed on the imaging element 141 and subjected to photoelectric conversion is arranged as an image signal (image data) by the imaging signal processing unit 142.

位相差AF処理部135は、二つの光電変換素子(第1の光電変換素子、第2の光電変換素子)から個別に(それぞれ独立して)出力された画像信号(信号値)を用い、被写体からの光を分割して得られた像の分割方向における像ずれ量を検出(算出)する。   The phase difference AF processing unit 135 uses image signals (signal values) output individually (independently) from two photoelectric conversion elements (first photoelectric conversion element and second photoelectric conversion element) The amount of image shift in the division direction of the image obtained by dividing the light from is detected (calculated).

すなわち、位相差AF処理部135は、第1の光電変換素子および第2の光電変換素子のそれぞれから独立して得られた信号値を用いた相関演算を行って像ずれ量を算出する像ずれ量算出手段である。   In other words, the phase difference AF processing unit 135 calculates the image shift amount by performing correlation calculation using signal values obtained independently from each of the first photoelectric conversion element and the second photoelectric conversion element. It is a quantity calculation means.

また、位相差AF処理部135は、検出した像ずれ量に基づいて撮影レンズ101のピント方向のずれ量(デフォーカス量)を算出するデフォーカス量算出手段である。   The phase difference AF processing unit 135 is a defocus amount calculation unit that calculates a shift amount (defocus amount) in the focus direction of the photographing lens 101 based on the detected image shift amount.

デフォーカス量は、像ずれ量に係数(換算係数)を掛けることにより算出される。   The defocus amount is calculated by multiplying the image shift amount by a coefficient (conversion coefficient).

なお、像ずれ量算出手段、デフォーカス量算出手段の各動作は、メインCPU151の指令に基づいて行われる。   Each operation of the image shift amount calculation unit and the defocus amount calculation unit is performed based on a command from the main CPU 151.

また、これらの動作の少なくとも一部をメインCPU151またはフォーカス制御部133で実行するように構成してもよい。   Further, at least a part of these operations may be executed by the main CPU 151 or the focus control unit 133.

位相差AF処理部135は、算出されたずれ量(デフォーカス量)をフォーカス制御部133へ出力する。   The phase difference AF processing unit 135 outputs the calculated shift amount (defocus amount) to the focus control unit 133.

フォーカス制御部133は、撮影レンズ101のピント方向のずれ量に基づいてフォーカスモータ132を駆動する駆動量を決定する。   The focus control unit 133 determines a drive amount for driving the focus motor 132 based on the shift amount of the photographing lens 101 in the focus direction.

フォーカス制御部133およびフォーカスモータ132によるフォーカスレンズ131の移動制御により、AF制御が実現される。   AF control is realized by the movement control of the focus lens 131 by the focus control unit 133 and the focus motor 132.

撮像信号処理部142から出力される画像データは、撮像制御部143に送られ、一時的にRAM154に蓄積される。   Image data output from the imaging signal processing unit 142 is sent to the imaging control unit 143 and temporarily stored in the RAM 154.

RAM154に蓄積された画像データは、画像圧縮解凍部153にて圧縮された後、画像記録媒体157に記録される。   The image data stored in the RAM 154 is compressed by the image compression / decompression unit 153 and then recorded on the image recording medium 157.

これと並行して、RAM154に蓄積された画像データは、画像処理部152に送られる。画像処理部152(画像処理手段)は、第1の光電変換素子および第2の光電変換素子の加算信号を用いて得られた画像信号を処理する。   In parallel with this, the image data stored in the RAM 154 is sent to the image processing unit 152. The image processing unit 152 (image processing means) processes an image signal obtained by using the addition signal of the first photoelectric conversion element and the second photoelectric conversion element.

画像処理部152は、例えば、画像データに対して最適なサイズへの縮小・拡大処理を行う。   For example, the image processing unit 152 performs reduction / enlargement processing to an optimum size for image data.

最適なサイズに処理された画像データは、モニタディスプレイ150に送られて画像表示される。   The image data processed to the optimum size is sent to the monitor display 150 and displayed as an image.

このため、操作者は、リアルタイムで撮影画像を観察することができる。なお、画像の撮影直後にはモニタディスプレイ150が所定時間だけ撮影画像を表示することで、操作者は撮影画像を確認することができる。   Therefore, the operator can observe the captured image in real time. Note that the monitor display 150 displays the captured image for a predetermined time immediately after the image is captured, so that the operator can check the captured image.

操作部156(操作スイッチ)は、操作者が撮像装置100への指示を行うために用いられる。操作部156から入力された操作指示信号は、バス160を介してメインCPU151に送られる。   The operation unit 156 (operation switch) is used for an operator to give an instruction to the imaging apparatus 100. An operation instruction signal input from the operation unit 156 is sent to the main CPU 151 via the bus 160.

撮像制御部143は、メインCPU151からの命令に基づき、撮像素子の制御を行う。   The imaging control unit 143 controls the imaging element based on a command from the main CPU 151.

これに先立ち、メインCPU151は、操作部156から入力された操作者からの指示に基づき、撮像素子141の蓄積時間、撮像素子141から撮像信号処理部142へ出力を行う際のゲインの設定値、レンズユニットの絞り値を決定する。   Prior to this, the main CPU 151, based on an instruction from the operator input from the operation unit 156, the accumulation time of the image sensor 141, the gain setting value when performing output from the image sensor 141 to the image signal processing unit 142, Determine the aperture value of the lens unit.

あるいは、一時的にRAM154に蓄積された画像データの画素信号の大きさに基づき、撮像素子141の蓄積時間、撮像素子141から撮像信号処理部142へ出力を行う際のゲインの設定値、レンズユニットの絞り値を決定する。   Alternatively, based on the magnitude of the pixel signal of the image data temporarily accumulated in the RAM 154, the accumulation time of the image sensor 141, the set value of the gain when performing output from the image sensor 141 to the image signal processor 142, the lens unit Determine the aperture value.

撮像制御部143は、メインCPUから蓄積時間、ゲインの設定値の指示を受け取り、撮像素子141を制御する。   The imaging control unit 143 receives an instruction of accumulation time and gain setting values from the main CPU, and controls the imaging element 141.

バッテリ159は、電源管理部158により適切に管理され、撮像装置100の全体に安定した電源供給を行う。フラッシュメモリ155は、撮像装置100の動作に必要な制御プログラムを記憶している。   The battery 159 is appropriately managed by the power management unit 158, and stably supplies power to the entire imaging apparatus 100. The flash memory 155 stores a control program necessary for the operation of the imaging apparatus 100.

操作者の操作により撮像装置100が起動すると(電源OFF状態から電源ON状態へ移行すると)、フラッシュメモリ155に格納された制御プログラムがRAM154の一部に読み込まれる(ロードされる)。   When the imaging apparatus 100 is activated by the operation of the operator (when the power supply is turned off from the power-off state), the control program stored in the flash memory 155 is read (loaded) into a part of the RAM 154.

メインCPU151は、RAM154にロードされた制御プログラムに従って撮像装置100の動作を制御する。   The main CPU 151 controls the operation of the imaging apparatus 100 according to a control program loaded in the RAM 154.

(図3〜図5の撮像面位相差方式の検出方法の説明)
次に、本実施例における撮像面位相差方式の検出方法について説明する。まず、図3を参照して、撮像素子141の構成について説明する。
(Description of detection method of imaging plane phase difference method of FIGS. 3 to 5)
Next, the detection method of the imaging surface phase difference method in the present embodiment will be described. First, the configuration of the image sensor 141 will be described with reference to FIG.

図3(a)は、瞳分割機能を有する撮像素子141の画素の構成図(断面図)である。   FIG. 3A is a configuration diagram (cross-sectional view) of pixels of the image sensor 141 having a pupil division function.

光電変換素子30は、一画素につき二つの光電変換素子30−1(第1の光電変換素子)および光電変換素子30−2(第2の光電変換素子)に分割されており、瞳分割機能を有する。   The photoelectric conversion element 30 is divided into two photoelectric conversion elements 30-1 (first photoelectric conversion element) and photoelectric conversion element 30-2 (second photoelectric conversion element) per pixel, and has a pupil division function. Have.

マイクロレンズ31(オンチップマイクロレンズ)は、光電変換素子30に効率よく光を集める機能を有し、光電変換素子30−1、30−2の境界に光軸が合うように配置されている。   The microlens 31 (on-chip microlens) has a function of efficiently collecting light on the photoelectric conversion element 30, and is arranged so that the optical axis is aligned with the boundary between the photoelectric conversion elements 30-1 and 30-2.

また、一つの画素の内部には、平坦化膜32、カラーフィルタ33、配線34、および、層間絶縁膜35が設けられている。   Further, a planarizing film 32, a color filter 33, a wiring 34, and an interlayer insulating film 35 are provided inside one pixel.

図3(b)は、撮像素子141の一部の構成図(平面図)である。撮像素子141は、図3(a)に示される構成を有する一画素を複数配列することで形成される。   FIG. 3B is a configuration diagram (plan view) of a part of the image sensor 141. The image sensor 141 is formed by arranging a plurality of pixels each having the configuration shown in FIG.

また、撮像を行うため、各画素にはR(赤色)、G(緑色)、B(青色)のカラーフィルタ33が交互に配置され、四画素で一組の画素ブロック40、41、42を配列することで、所謂ベイヤー配列が構成されている。   In order to capture an image, R (red), G (green), and B (blue) color filters 33 are alternately arranged in each pixel, and a set of pixel blocks 40, 41, and 42 is arranged with four pixels. As a result, a so-called Bayer array is formed.

なお、図3(b)において、R、G、Bのそれぞれの下に示される「1」または「2」は、光電変換素子30−1、30−2のそれぞれを表す数値である。   In FIG. 3B, “1” or “2” shown below each of R, G, and B is a numerical value that represents each of the photoelectric conversion elements 30-1 and 30-2.

図3(c)は、撮像素子141の光学原理図であり、図3(b)中のA−A線で切断して得られた断面図の一部を示す。   FIG. 3C is an optical principle diagram of the image sensor 141, and shows a part of a cross-sectional view obtained by cutting along the line AA in FIG.

撮像素子141は、撮影レンズ101の予定結像面に配置されている。   The image sensor 141 is disposed on the planned image plane of the photographic lens 101.

マイクロレンズ31の作用により、光電変換素子30−1、30−2はそれぞれ、撮影レンズ101の瞳(射出瞳)の異なる位置(領域)を通過した一対の光束を受光するように構成されている。   The photoelectric conversion elements 30-1 and 30-2 are configured to receive a pair of light beams that have passed through different positions (regions) of the pupil (exit pupil) of the photographing lens 101 by the action of the microlens 31. .

光電変換素子30−1は、主に、撮影レンズ101の瞳のうち図3(c)中の右側位置を透過する光束を受光する。   The photoelectric conversion element 30-1 mainly receives a light beam that passes through the right position in FIG.

一方、光電変換素子30−2は、主に、撮影レンズ101の瞳の図3(c)中の左側位置を透過する光束を受光する。   On the other hand, the photoelectric conversion element 30-2 mainly receives a light beam that passes through the left position of the pupil of the photographing lens 101 in FIG.

続いて、図4を参照して、撮像素子141の瞳について説明する。図4は、撮像素子141から見た場合の、撮影レンズ101の瞳50を示す図である。   Next, the pupil of the image sensor 141 will be described with reference to FIG. FIG. 4 is a diagram illustrating the pupil 50 of the photographing lens 101 when viewed from the image sensor 141.

51−1は光電変換素子30−1の感度領域(以下、「A像瞳」という。)、51−2は光電変換素子30−2の感度領域(以下、「B像瞳」という。)である。52−1、52−2は、それぞれ、A像瞳およびB像瞳の重心位置である。   51-1 is a sensitivity region (hereinafter referred to as “A image pupil”) of the photoelectric conversion element 30-1, and 51-2 is a sensitivity region of the photoelectric conversion element 30-2 (hereinafter referred to as “B image pupil”). is there. Reference numerals 52-1 and 52-2 indicate barycentric positions of the A image pupil and the B image pupil, respectively.

本実施例の撮像処理を行う場合、同一画素において同一色のカラーフィルタが配置された二つの光電変換素子の出力を加算することにより、画像信号を生成することが可能である。   When the imaging process of this embodiment is performed, an image signal can be generated by adding the outputs of two photoelectric conversion elements in which color filters of the same color are arranged in the same pixel.

一方、本実施例の焦点検出処理を行う場合、一画素ブロック内における光電変換素子30−1に対応する光電変換素子からの出力を積算することにより、一画素の焦点検出信号を取得する。   On the other hand, when performing the focus detection process of the present embodiment, the focus detection signal of one pixel is acquired by integrating the outputs from the photoelectric conversion elements corresponding to the photoelectric conversion element 30-1 in one pixel block.

そして、この信号を画素ブロック40、41、42のように横方向に連続して取得することによりA像信号を生成することが可能である。   Then, it is possible to generate an A image signal by continuously acquiring this signal in the horizontal direction as in the pixel blocks 40, 41, and 42.

同様に、一画素ブロック内における光電変換素子30−2に対応する光電変換素子からの出力を積算することにより、一画素の焦点検出信号を取得する。   Similarly, the focus detection signal of one pixel is acquired by integrating the outputs from the photoelectric conversion elements corresponding to the photoelectric conversion element 30-2 in one pixel block.

そして、この信号を横方向に連続して取得することによりB像信号を生成することが可能である。A像信号およびB像信号により、一対の位相差検出用信号が生成される。   A B image signal can be generated by continuously acquiring this signal in the horizontal direction. A pair of phase difference detection signals is generated from the A image signal and the B image signal.

なお、本実施例では図5に示すように、適度な範囲で図中縦方向に画素加算(以下、画素ライン加算とする)を行ったものをA像信号、B像信号の一画素信号として取得する。   In this embodiment, as shown in FIG. 5, a pixel that has undergone pixel addition in the vertical direction in the drawing (hereinafter referred to as pixel line addition) within an appropriate range as one pixel signal of the A image signal and the B image signal. get.

図5の例では、縦方向にベイヤー配列における2画素分を用いて、加算平均することにより、焦点検出に用いる画像信号を生成(以下、この場合を2ライン加算とする)している。画素ライン加算数の設定方法については、詳細を後述する。   In the example of FIG. 5, an image signal used for focus detection is generated by averaging the two pixels in the Bayer array in the vertical direction (hereinafter, this case is referred to as two-line addition). The method for setting the pixel line addition number will be described later in detail.

(図6の相関演算の説明)
続いて、図6を参照して、A像信号およびB像信号(以下、まとめて「像信号」という。)について説明する。
(Explanation of correlation calculation in FIG. 6)
Next, the A image signal and the B image signal (hereinafter collectively referred to as “image signal”) will be described with reference to FIG.

図6(a)は、像信号の説明図であり、縦軸は像信号のレベル、横軸は画素位置をそれぞれ示している。生成した一対の位相差検出用信号の像ずれ量Xは、撮影レンズ101の結像状態(合焦状態、前ピン状態、または、後ピン状態)に応じて変化する。   FIG. 6A is an explanatory diagram of an image signal, where the vertical axis indicates the level of the image signal and the horizontal axis indicates the pixel position. The image shift amount X of the generated pair of phase difference detection signals changes according to the imaging state (focused state, front pin state, or rear pin state) of the photographic lens 101.

撮影レンズ101が合焦状態の場合、二つの像信号の像ずれ量は無くなる。一方、前ピン状態または後ピン状態の場合、異なる方向の像ずれ量が生じる。   When the photographing lens 101 is in focus, the image shift amount between the two image signals is eliminated. On the other hand, in the front pin state or the rear pin state, image shift amounts in different directions occur.

また、像ずれ量は、撮影レンズ101により被写体像が結像している位置とマイクロレンズ上面との距離、いわゆるデフォーカス量と一定の関係を有する。   The image shift amount has a certain relationship with the distance between the position where the subject image is formed by the photographing lens 101 and the upper surface of the microlens, so-called defocus amount.

この像ずれ量Xを算出するため、相関演算を行う。相関演算では、A像信号およびB像信号の画素をシフトさせながら相関量が演算される。図6(b)は、像信号の画素をシフトさせていった時の相関量(以下、相関量波形という)を示す図である。   In order to calculate the image shift amount X, correlation calculation is performed. In the correlation calculation, the correlation amount is calculated while shifting the pixels of the A image signal and the B image signal. FIG. 6B is a diagram showing a correlation amount (hereinafter referred to as a correlation amount waveform) when pixels of the image signal are shifted.

図6(b)において、横軸は画素のシフト量、縦軸はその時のA像信号とB像信号の相関量それぞれ示している。   In FIG. 6B, the horizontal axis represents the pixel shift amount, and the vertical axis represents the correlation amount between the A image signal and the B image signal at that time.

相関量が最大になる位置同士の差が像ずれ量として算出される。相関量を算出する際、二つの像信号を重ねて、それぞれ対応する信号同士を比較し、小さい方の値の累積を取得する。   The difference between the positions where the correlation amount is maximum is calculated as the image shift amount. When calculating the correlation amount, the two image signals are overlapped, the corresponding signals are compared with each other, and the accumulation of the smaller value is acquired.

なお、大きい方の値の累積を取得しても良い。また、これらの値の差分を取得しても良い。累積は、相関を指し示す指標となり、小さい方の値の累積を取得した場合には、この値が最も大きいときが相関の高い時である。   The accumulation of the larger value may be acquired. Moreover, you may acquire the difference of these values. Accumulation is an index indicating correlation, and when the accumulation of the smaller value is acquired, the largest value is when the correlation is high.

なお、大きい方の値の累積を取得した場合、または差分を取得した場合、この値が最も小さい時が相関の高い時となる。   When the accumulation of the larger value is acquired or when the difference is acquired, the time when this value is the smallest is the time when the correlation is high.

相関量算出手段としてのCPU151は、後述するライン加算手段にて加算された加算値を用いて相関演算を行って相関量を算出する。   The CPU 151 as the correlation amount calculation means calculates a correlation amount by performing a correlation calculation using the addition value added by the line addition means described later.

(図7の焦点検出領域の説明)
続いて、図7を参照して、本実施例の焦点検出方法にて用いられる焦点検出領域について説明する。図7は、焦点検出領域を示す図である。図7に示されるように、撮像画角60に対して、適切な位置に、適切な大きさにて焦点検出領域61が設けられる。
(Description of the focus detection area in FIG. 7)
Next, a focus detection area used in the focus detection method of this embodiment will be described with reference to FIG. FIG. 7 is a diagram illustrating a focus detection area. As shown in FIG. 7, a focus detection region 61 is provided at an appropriate position and at an appropriate size with respect to the imaging field angle 60.

また、焦点検出領域61内には、それぞれ焦点検出領域61を図中の分割した焦点検出小エリアを有する。   Each focus detection area 61 has a focus detection small area obtained by dividing the focus detection area 61 in the drawing.

分割された焦点検出小エリアそれぞれにおいて、領域分の画素ライン加算がなされ、相関演算がなされる。全ての小エリアの相関演算がなされることにより、分割数分の図6(b)に示したような相関量波形を得る。   In each of the divided focus detection small areas, pixel lines for the areas are added, and a correlation calculation is performed. By performing correlation calculation for all the small areas, the correlation amount waveforms as shown in FIG.

この分割数分の相関量波形を加算(以下、相関量加算という)することにより、最終的な焦点検出領域61における相関量波形を取得する。この焦点検出領域61における相関量波形から相関量が最大になる像ずれ量Xを算出する。   A correlation amount waveform in the final focus detection region 61 is obtained by adding the correlation amount waveforms corresponding to the number of divisions (hereinafter referred to as correlation amount addition). An image shift amount X that maximizes the correlation amount is calculated from the correlation amount waveform in the focus detection area 61.

分割数は最も多い場合で、焦点検出領域61内に含まれる画素ライン数分であり、分割数をどうするか、つまり何ライン分加算するかは画像の明るさやその他条件に応じて切り替える。この制御方法については、詳細を後述する。   The number of divisions is the largest, which is the number of pixel lines included in the focus detection area 61, and the number of divisions, that is, how many lines are added, is switched according to the brightness of the image and other conditions. Details of this control method will be described later.

(図8の像ずれ量からデフォーカス量への変換の説明)
図8を参照して、相関演算により算出された像ずれ量からデフォーカス量への変換について説明する。
(Description of conversion from image shift amount to defocus amount in FIG. 8)
With reference to FIG. 8, the conversion from the image shift amount calculated by the correlation calculation to the defocus amount will be described.

図8は、撮影レンズ101および撮像素子141を含む光学系を示す図である。被写体70に対する予定結像面の位置p0の光軸OA上に焦点検出面の位置p1がある。   FIG. 8 is a diagram illustrating an optical system including the photographing lens 101 and the image sensor 141. The position p1 of the focus detection surface is on the optical axis OA at the position p0 of the planned imaging plane with respect to the subject 70.

像ずれ量とデフォーカス量との関係は、光学系に応じて決定される。デフォーカス量は、像ずれ量Xに所定の係数K(換算係数)を掛けることにより算出することができる。   The relationship between the image shift amount and the defocus amount is determined according to the optical system. The defocus amount can be calculated by multiplying the image shift amount X by a predetermined coefficient K (conversion coefficient).

係数Kは、A像瞳とB像瞳との重心位置に基づいて算出される。焦点検出面の位置p1が位置p2に移動した場合、位置p0、q2、q3の三角形と位置p0、q2’、q3’との三角形の相似に従って、像ずれ量が変化する。   The coefficient K is calculated based on the barycentric positions of the A image pupil and the B image pupil. When the position p1 of the focus detection surface moves to the position p2, the image shift amount changes according to the similarity between the triangles at the positions p0, q2, and q3 and the triangles at the positions p0, q2 ', and q3'.

このため、焦点検出面の位置p2でのデフォーカス量を算出することが可能である。メインCPU151は、デフォーカス量に基づいて、被写体に対して合焦状態を得るためのフォーカスレンズ131の位置を算出する。   Therefore, it is possible to calculate the defocus amount at the position p2 on the focus detection surface. Based on the defocus amount, the main CPU 151 calculates the position of the focus lens 131 for obtaining a focused state with respect to the subject.

(ライン加算の説明)
本実施例における、画素ライン加算数の詳細について説明する。本実施例における撮像素子は、焦点検出手段と撮像手段に用いる信号をともに出力するため、撮像に適した露出設定値に基づいて、撮像素子が制御される。画素のダイナミックレンジに対する露出目標値が小さくなる場合では、焦点検出に用いる画像信号は小さくなり、ノイズが増える場合がある。
(Explanation of line addition)
Details of the pixel line addition number in this embodiment will be described. Since the image sensor in the present embodiment outputs both signals used for the focus detection unit and the image capturing unit, the image sensor is controlled based on the exposure setting value suitable for imaging. When the exposure target value with respect to the dynamic range of the pixel becomes small, the image signal used for focus detection becomes small and noise may increase.

その結果、焦点検出の結果のばらつきも大きくなる。また、操作者が露出をマニュアルで設定した場合においても、撮像素子の蓄積時間やレンズの絞りを変えることにより、焦点検出に用いる画像信号は影響を受け、焦点検出が難しくなる場合がある。   As a result, the variation in focus detection results also increases. Even when the operator manually sets the exposure, the image signal used for focus detection may be affected by changing the accumulation time of the image sensor or the lens aperture, and it may be difficult to detect the focus.

そのため、焦点検出領域の一画素を生成する際には、画素ライン加算により焦点検出に用いる画像信号のノイズの低減が可能である。   Therefore, when generating one pixel of the focus detection area, it is possible to reduce noise of an image signal used for focus detection by pixel line addition.

しかし、一方で、図9に示すように、被写体が焦点検出領域に対して斜めにかかるような場合やコントラストが低い場合が問題となる。   However, on the other hand, as shown in FIG. 9, there is a problem when the subject is tilted with respect to the focus detection area or when the contrast is low.

その場合、画素ライン加算の数を増やしてしまうと、被写体の分解能が低下してしまう被写体つぶれといった現象がおき、結果的に検出精度が低下する可能性がある。   In this case, if the number of pixel line additions is increased, a phenomenon such as subject collapse that reduces the resolution of the subject occurs, and as a result, the detection accuracy may decrease.

ライン加算手段としてのCPU151は、焦点検出領域にある撮像素子を構成する複数の画素をライン方向(水平方向)に加算する。   The CPU 151 as line addition means adds a plurality of pixels constituting the image sensor in the focus detection area in the line direction (horizontal direction).

(フレーム加算の説明)
そこで、被写体つぶれによる検出精度の低下とノイズ成分による検出精度の低下を防ぐ方法として時系列に相関量を加算するフレーム加算を用いることが考えられる。
(Explanation of frame addition)
Therefore, it is conceivable to use frame addition for adding correlation amounts in time series as a method for preventing a decrease in detection accuracy due to subject crushing and a decrease in detection accuracy due to noise components.

本実施例においてはフレーム加算として、図7で示した焦点検出領域61の相関量波形を保持しておき、それを一定のフレーム期間分加算したものを最終的な相関量とする。   In this embodiment, as the frame addition, the correlation amount waveform of the focus detection area 61 shown in FIG. 7 is held, and the sum of the correlation amount waveform for a certain frame period is used as the final correlation amount.

フレーム加算であれば、被写体つぶれを起こさず、ノイズの低減が可能である。ただし、フレーム加算は時系列に加算をするため、フォーカス制御に用いる最終的な相関量結果が出るまでの所要時間が延びてしまう。   If the frame is added, the subject is not crushed and noise can be reduced. However, since frame addition is performed in time series, the time required until a final correlation amount result used for focus control is extended.

つまり、露出設定値が小さい場合などの低照度や低輝度な条件化ではノイズ成分が多く、画素ライン加算やフレーム加算を用いてノイズ低減を図る必要があるが、その際の被写体の状態に応じて各加算方法をどの程度用いるかを適切に制御する事が重要である。   In other words, low-illumination and low-brightness conditions such as when the exposure setting value is small have many noise components, and it is necessary to reduce noise using pixel line addition and frame addition, but depending on the state of the subject at that time It is important to appropriately control how much each addition method is used.

本実施例においては被写体の状態としては、具体的には被写体のコントラストを評価し、その評価値に応じて各加算方法の割合を切り替える。   In this embodiment, as the state of the subject, specifically, the contrast of the subject is evaluated, and the ratio of each addition method is switched according to the evaluation value.

コントラストは、画素値の隣接差分の二乗を算出し、これを焦点検出領域内の1ライン分について累積を算出したものを用いる。   The contrast is calculated by calculating the square of the adjacent difference of the pixel value and calculating the accumulation for one line in the focus detection area.

コントラストが高いほど、この累積した値が大きくなる。なお、算出するコントラストは、画素値の隣接差分の絶対値の総和であっても良い。   The higher the contrast, the larger this accumulated value. The calculated contrast may be the sum of absolute values of adjacent differences of pixel values.

フレーム加算手段としてのCPU151は、フレーム毎に算出された相関値を加算する。   The CPU 151 as a frame addition unit adds the correlation values calculated for each frame.

(図2のライン加算とフレーム加算の割合を決定する方法の説明)
図2は本実施例におけるライン加算とフレーム加算の割合を決定する方法を示すフローチャートである。図2の各ステップは、メインCPU151により実施される。
(Description of the method for determining the ratio of line addition and frame addition in FIG. 2)
FIG. 2 is a flowchart showing a method for determining the ratio of line addition and frame addition in this embodiment. Each step in FIG. 2 is performed by the main CPU 151.

まず、ステップS201において、焦点検出領域61内の画素値が読みだされる。ステップS202において読みだした画素値から、低輝度か否かを判定する。   First, in step S201, pixel values in the focus detection area 61 are read out. It is determined from the pixel value read in step S202 whether or not the luminance is low.

判定方法としては最初の1ライン分の画素値の平均値が所定値以下であれば低輝度であると判定する。判定方法はこれに限ったものでなく、サンプリングするラインやライン数を変更しても構わない。   As a determination method, if the average value of the pixel values for the first line is equal to or less than a predetermined value, it is determined that the luminance is low. The determination method is not limited to this, and the sampling line and the number of lines may be changed.

さらにはノイズ成分が多い条件であるかを判定できればよいので輝度値だけでなく、カメラのISO設定などから低照度条件であるか否かで判定してもよい。   Furthermore, since it is only necessary to determine whether or not the condition is that there are many noise components, the determination may be made not only based on the luminance value but also based on whether the camera is in a low illuminance condition or not.

ステップS203において、低輝度であった場合にはステップS204に進み、低輝度でなかった場合には、ノイズ成分の影響が少なくフレーム加算を併用する必要がないため、本フロー処理を終了する。   In step S203, if the brightness is low, the process proceeds to step S204. If the brightness is not low, the influence of the noise component is small and it is not necessary to use frame addition together.

ステップS204において、焦点検出領域61内のコントラスト値を算出する。   In step S204, the contrast value in the focus detection area 61 is calculated.

ステップS205において、算出したコントラスト値から画素加算ライン数を決定する。例えば基準加算ライン数を3としていた場合、コントラスト値が高ければ4とし、逆に低かった場合には2とする。   In step S205, the number of pixel addition lines is determined from the calculated contrast value. For example, when the number of reference addition lines is 3, it is 4 if the contrast value is high, and 2 if it is low.

ステップS206において、ステップS205で決定した画素加算ライン数からフレーム加算を何フレーム分実施するか決定する。   In step S206, it is determined how many frames are to be added from the number of pixel addition lines determined in step S205.

例えば、基準フレーム加算数を3フレーム分としていた場合、画素加算ライン数が基準の3より多ければフレーム加算は2フレーム分とし、逆に少ない場合には4フレーム分加算する。   For example, if the reference frame addition number is 3 frames, the frame addition is 2 frames if the number of pixel addition lines is larger than the reference 3, and conversely, 4 frames are added if the number is smaller.

以上が本実施例における画素ライン加算数とフレーム加算数との加算割合を決定する処理である。   The above is the processing for determining the addition ratio between the pixel line addition number and the frame addition number in this embodiment.

比率設定手段としてのCPU151は、ライン加算手段で算出されたライン加算数及びフレーム加算手段で算出されたフレーム加算数を可変するとともに、ライン加算数とフレーム加算数との比率を設定する。   The CPU 151 as the ratio setting means varies the line addition number calculated by the line addition means and the frame addition number calculated by the frame addition means, and sets the ratio between the line addition number and the frame addition number.

(図10の焦点検出方法を示すフローチャートの説明)
続いて、図10を参照して、本実施例における焦点検出方法について説明する。図10は、焦点検出方法を示すフローチャートである。図10の各ステップは、メインCPU151、位相差AF処理部135、および、フォーカス制御部133により実施される。
(Explanation of the flowchart showing the focus detection method of FIG. 10)
Subsequently, the focus detection method in the present embodiment will be described with reference to FIG. FIG. 10 is a flowchart showing the focus detection method. Each step in FIG. 10 is performed by the main CPU 151, the phase difference AF processing unit 135, and the focus control unit 133.

まず、ステップS1001において、撮像素子141は電荷を蓄積する。そしてステップS1002において、メインCPU151は、電荷の蓄積が完了したか否かを判定する。   First, in step S1001, the image sensor 141 accumulates electric charges. In step S1002, the main CPU 151 determines whether or not charge accumulation is completed.

撮像素子141の電荷蓄積終了時間に達していない場合、ステップS1001に戻り、撮像素子141は電荷の蓄積を継続する。   If the charge accumulation end time of the image sensor 141 has not been reached, the process returns to step S1001 and the image sensor 141 continues to accumulate charges.

一方、ステップS1002において、電荷の蓄積が完了している場合、ステップS1103において、焦点検出領域での画像信号の画素値読み出しを行う。   On the other hand, if the charge accumulation is completed in step S1002, the pixel value of the image signal in the focus detection area is read in step S1103.

ステップS1004において、メインCPU151は、焦点検出領域にある所定画素数分の読み出しが完了したか否かを判定する。   In step S1004, the main CPU 151 determines whether or not reading for a predetermined number of pixels in the focus detection area has been completed.

所定画素数分の読み出しが完了していない場合、ステップS1003に戻り、所定画素数分の読み出しが終了するまでステップS1003〜S1004を繰り返す。   If the reading for the predetermined number of pixels is not completed, the process returns to step S1003, and steps S1003 to S1004 are repeated until the reading for the predetermined number of pixels is completed.

続いてステップS1005において、図2に示した加算割合が決定されていないか、または決定したフレーム数分加算が行われて加算割合がリセットされている場合にはステップS1006に進み、加算割合を決定する。   Subsequently, in step S1005, when the addition ratio shown in FIG. 2 is not determined, or when the addition for the determined number of frames is performed and the addition ratio is reset, the process proceeds to step S1006 and the addition ratio is determined. To do.

加算割合が既に決定している場合にはステップS1007に進む。   If the addition ratio has already been determined, the process proceeds to step S1007.

ステップS1007において、図7に示した焦点検出小エリアの内の最初の1つ分について、設定されたライン加算数に基づいて、画素ライン加算を行う。   In step S1007, pixel line addition is performed for the first one of the focus detection small areas shown in FIG. 7 based on the set number of line additions.

ステップS1008において、メインCPU151(フォーカス制御部133または位相差AF処理部135)は相関演算を行い、図6に示したような相関量波形を算出する。   In step S1008, the main CPU 151 (the focus control unit 133 or the phase difference AF processing unit 135) performs a correlation calculation to calculate a correlation amount waveform as shown in FIG.

ステップS1009において、焦点検出領域内の全ライン分の相関演算を行ったか否かを判定し、まだ、全ライン分相関演算が完了していない場合、ステップS1007に戻り、次の焦点検出小エリアにおける画素ライン加算から相関演算までを行う。   In step S1009, it is determined whether or not the correlation calculation for all lines in the focus detection area has been performed. If the correlation calculation for all lines has not been completed yet, the process returns to step S1007 and the next focus detection small area is selected. From pixel line addition to correlation calculation.

以後、焦点検出領域61に含まれる全焦点検出小エリアの相関演算が完了するまでステップS1007〜ステップS1009を繰り返す。   Thereafter, steps S1007 to S1009 are repeated until the correlation calculation of the all focus detection small areas included in the focus detection region 61 is completed.

ステップS1009において、全ライン分相関演算を行ったと判定される場合、ステップS1010において、相関量加算を行う。   If it is determined in step S1009 that the correlation calculation has been performed for all lines, the correlation amount is added in step S1010.

ステップS1011において、加算割合の決定によりフレーム加算数が定められている場合にはステップS1012に進み、そうでない場合にはステップS1014に進む。   In step S1011, if the frame addition number is determined by determining the addition ratio, the process proceeds to step S1012. If not, the process proceeds to step S1014.

ステップS1012において、ステップS1010で算出された相関量をRAM154に格納されているこれまでのフレーム加算結果の相関量と加算し、再びRAM154に格納する。   In step S1012, the correlation amount calculated in step S1010 is added to the correlation amount of the previous frame addition result stored in the RAM 154, and is stored in the RAM 154 again.

ステップS1013において、所定期間分フレーム加算が行われたか判定し、行われていない場合には、フレーム加算を継続する必要があるため、本フロー処理を終了する。   In step S1013, it is determined whether the frame addition has been performed for a predetermined period. If the frame addition has not been performed, it is necessary to continue the frame addition, and thus this flow processing ends.

所定期間分フレーム加算が行われた場合にはステップS1014に進み、一度決定した加算割合をクリアする。   If frame addition has been performed for a predetermined period, the process proceeds to step S1014 to clear the addition ratio once determined.

ステップS1015において算出した相関量から、相関が最も高くなるシフト量を算出し、像ずれ量の算出を行う。   From the correlation amount calculated in step S1015, the shift amount with the highest correlation is calculated, and the image shift amount is calculated.

なお、ここでの像ずれ量算出には、相関が最も高くなるシフト量と前後のシフト量での相関値を用いて、補間演算を行い、1シフト以内の補間値の算出を含む。   Note that the calculation of the image shift amount here includes calculation of an interpolation value within one shift by performing an interpolation operation using the correlation value between the shift amount with the highest correlation and the previous and subsequent shift amounts.

このシフト量と補間値との和が像ずれ量Xとなる。このように、像ずれ量算出手段としてのメインCPU151、フォーカス制御部133、または、位相差AF処理部135は、第1の光電変換素子および第2の光電変換素子のそれぞれから独立して得られた信号値を用いた相関演算を行って像ずれ量を算出する。   The sum of the shift amount and the interpolation value is the image shift amount X. As described above, the main CPU 151, the focus control unit 133, or the phase difference AF processing unit 135 as the image shift amount calculation unit is obtained independently from each of the first photoelectric conversion element and the second photoelectric conversion element. An image shift amount is calculated by performing correlation calculation using the obtained signal values.

続いてステップS1016において、メインCPU151(フォーカス制御部133または位相差AF処理部135)は、算出された像ずれ量Xに補正後の係数Kを掛けることにより(Def=K×Xの関係式により)、デフォーカス量を算出する。   In step S1016, the main CPU 151 (focus control unit 133 or phase difference AF processing unit 135) multiplies the calculated image shift amount X by the corrected coefficient K (by the relational expression Def = K × X). ) Calculate the defocus amount.

以上のように、本実施例ではノイズ成分の多い低輝度等の条件時にフレーム加算を用いて、かつ被写体の状態に応じて、画素ライン加算数との割合を決定する。   As described above, in this embodiment, frame addition is used under conditions such as low luminance with many noise components, and the ratio with the pixel line addition number is determined according to the state of the subject.

よって、被写体の分解能低下を抑えながら、ノイズを抑えた画像信号を用いた焦点検出を行うことができる。   Therefore, it is possible to perform focus detection using an image signal in which noise is suppressed while suppressing a reduction in resolution of the subject.

<実施例2>
次に、本発明の実施例2における焦点検出領域の画素ライン加算、フレーム加算の割合決定方法について説明する。
<Example 2>
Next, a method for determining the ratio of pixel line addition and frame addition in the focus detection area according to the second embodiment of the present invention will be described.

実施例1では、コントラスト評価値から画素ライン加算数を決めて、それに応じてフレーム加算数を決めていた。   In the first embodiment, the pixel line addition number is determined from the contrast evaluation value, and the frame addition number is determined accordingly.

本実施例では、被写体の移動の影響を受けやすいか(以下、被写体移動条件)を考慮して、フレーム加算数に上限を設ける方法について説明する。なお、本実施例において、実施例1と同一の内容については、同一の符号を用いてその説明を省略する。   In the present embodiment, a method of setting an upper limit on the number of frame additions in consideration of whether the subject is easily affected by the movement of the subject (hereinafter referred to as subject movement condition) will be described. In the present embodiment, the same contents as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted.

本実施例における被写体移動条件はカメラのフレームレート設定によって判断する。   The subject movement condition in this embodiment is determined by the frame rate setting of the camera.

フレームレートが遅い場合にはフレーム間の間隔があき、被写体の移動の影響を受けやすくなる。   When the frame rate is slow, there is an interval between frames, and it is easy to be affected by the movement of the subject.

被写体が移動すると時系列に結果を加算していく中で小エリア内の検出対象が変化し、前に写っていた被写体の影響を受け、最新の画像に対する検出精度としては低下する可能性がある。   When the subject moves, the detection target in the small area changes as the results are added in time series, and the detection accuracy for the latest image may be reduced due to the influence of the subject that was previously captured. .

そこで、フレームレートに応じてフレーム加算数に上限値を設けることで、被写体の移動による検出精度低下を抑制する。   Therefore, by providing an upper limit value for the number of frames to be added according to the frame rate, a reduction in detection accuracy due to movement of the subject is suppressed.

本実施例においては、被写体移動条件であるフレームレートに応じたフレーム加算数の上限値としては、30fpsの場合は、3フレーム、60fpsであれば4フレーム、それ以上であれば5フレーム加算、15fps以下は2フレーム加算とする。   In the present embodiment, the upper limit value of the number of frames added according to the frame rate, which is the subject movement condition, is 3 frames for 30 fps, 4 frames for 60 fps, 5 frames added for more frames, and 15 fps. The following is 2-frame addition.

また、この被写体移動条件はズーム倍率から判断してもよい。ズーム倍率が高いほど、被写体の動きに対する画角内での移動量が大きくなるのでズーム倍率が高い場合は上限値を低くし、逆にズーム倍率が低い場合は上限値を上げるといったようである。   The subject movement condition may be determined from the zoom magnification. The higher the zoom magnification, the greater the amount of movement within the angle of view with respect to the movement of the subject. Therefore, the upper limit value is lowered when the zoom magnification is high, and conversely the upper limit value is raised when the zoom magnification is low.

(図11の画素ライン加算数とフレーム加算数の割合を決定する方法の説明)
図11は、本実施例における焦点検出領域の画素ライン加算数とフレーム加算数の割合を決定する方法を示すフローチャートである。図13の各ステップは、メインCPU151により実施される。
(Description of the method for determining the ratio between the pixel line addition number and the frame addition number in FIG. 11)
FIG. 11 is a flowchart showing a method for determining the ratio between the pixel line addition number and the frame addition number in the focus detection area in this embodiment. Each step of FIG. 13 is performed by the main CPU 151.

まず、ステップS1101において、焦点検出領域61内の画素値が読みだされる。ステップS1102において読みだした画素値から、低輝度か否かを判定する。ステップS1103において、低輝度であった場合にはステップS1104に進み、低輝度でなかった場合には、本フロー処理を終了する。   First, in step S1101, the pixel value in the focus detection area 61 is read out. It is determined from the pixel value read in step S1102 whether the luminance is low. In step S1103, if the luminance is low, the process proceeds to step S1104. If the luminance is not low, the flow processing is terminated.

ステップS1104において、焦点検出領域61内のコントラスト値を算出する。   In step S1104, the contrast value in the focus detection area 61 is calculated.

ステップS1105において、実施例1同様に画素ライン加算数を決定し、ステップS1106においてフレーム加算数を決定する。   In step S1105, the pixel line addition number is determined as in the first embodiment, and in step S1106, the frame addition number is determined.

ステップS1107においてフレーム加算上限値を算出する。前述の通り、本実施例ではフレームレート設定からこの上限値を決定する。   In step S1107, a frame addition upper limit value is calculated. As described above, in the present embodiment, this upper limit value is determined from the frame rate setting.

ステップS1108において、ステップS1106で決定したフレーム加算数が、フレーム上限値を超えていないか判定する。超えていない場合は本フロー処理を終了し、超えている場合にはステップS1109に進む。   In step S1108, it is determined whether or not the frame addition number determined in step S1106 exceeds the frame upper limit value. When it does not exceed, this flow processing is ended, and when it exceeds, the process proceeds to step S1109.

ステップS1109ではフレーム加算数をフレーム加算上限値に変更し、本フロー処理を終了する。これにより、被写体移動による検出精度低下を抑制する。   In step S1109, the number of frame additions is changed to the frame addition upper limit value, and this flow processing ends. This suppresses a decrease in detection accuracy due to subject movement.

以上が本実施例における画素ライン加算数とフレーム加算数との加算割合を決定する処理である。   The above is the processing for determining the addition ratio between the pixel line addition number and the frame addition number in this embodiment.

以上のように、本実施例ではノイズ成分の多い条件時にフレーム加算を用いて、かつ被写体の状態と動きを考慮し、画素ライン加算数との割合を決定することで、被写体の分解能低下を抑えながら、ノイズを抑えた画像信号を用いた焦点検出を行うことができる。   As described above, in this embodiment, frame addition is used in a condition with a lot of noise components, and the ratio of the pixel line addition number is determined in consideration of the state and movement of the subject, thereby suppressing reduction in the resolution of the subject. However, it is possible to perform focus detection using an image signal with reduced noise.

(他の実施形態)
本発明の目的は以下のようにしても達成できる。すなわち、前述した各実施形態の機能を実現するための手順が記述されたソフトウェアのプログラムコードを記録した記憶媒体を、システムまたは装置に供給する。そしてそのシステムまたは装置のコンピュータ(またはCPU、MPU等)が記憶媒体に格納されたプログラムコードを読み出して実行するのである。
(Other embodiments)
The object of the present invention can also be achieved as follows. That is, a storage medium in which a program code of software in which a procedure for realizing the functions of the above-described embodiments is described is recorded is supplied to the system or apparatus. The computer (or CPU, MPU, etc.) of the system or apparatus reads out and executes the program code stored in the storage medium.

この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体およびプログラムは本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium and program storing the program code constitute the present invention.

また、プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスクなどが挙げられる。また、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD−R、磁気テープ、不揮発性のメモリカード、ROM等も用いることができる。   Examples of the storage medium for supplying the program code include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. Further, a CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-R, magnetic tape, nonvolatile memory card, ROM, or the like can also be used.

また、コンピュータが読み出したプログラムコードを実行可能とすることにより、前述した各実施形態の機能が実現される。さらに、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した各実施形態の機能が実現される場合も含まれる。   Further, by making the program code read by the computer executable, the functions of the above-described embodiments are realized. Furthermore, when the OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, the functions of the above-described embodiments are realized by the processing. Is also included.

更に、以下の場合も含まれる。まず記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う。   Furthermore, the following cases are also included. First, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.

また、本発明はデジタルカメラのような撮影を主目的とした機器にかぎらず、携帯電話、パーソナルコンピュータ(ラップトップ型、デスクトップ型、タブレット型など)、ゲーム機など、撮像装置を内蔵もしくは外部接続する任意の機器に適用可能である。従って、本明細書における「撮像装置」は、撮像機能を備えた任意の電子機器を包含することが意図されている。   In addition, the present invention is not limited to devices such as digital cameras, but includes built-in or external connection of imaging devices such as mobile phones, personal computers (laptop type, desktop type, tablet type, etc.), game machines, etc. It can be applied to any device. Therefore, the “imaging device” in this specification is intended to include any electronic device having an imaging function.

Claims (9)

撮像光学系の異なる瞳領域を通過した一対の光束を一対の光電変換部で受光する撮像素子から出力された焦点検出信号を用いて位相差方式の焦点調節を行う焦点調節装置であって、
焦点検出領域にある前記撮像素子を構成する複数の画素をライン方向に加算するライン加算手段と、前記ライン加算手段にて加算された加算値を用いて相関演算を行って相関量を算出する相関量算出手段と、フレーム毎に算出された前記相関値を加算するフレーム加算手段と、前記焦点検出領域の画像の輝度値及びコントラスト値の少なくとも一方の大きさを判定する判定手段と、前記ライン加算手段で算出されたライン加算数及び前記フレーム加算手段で算出されたフレーム加算数を可変するとともに、前記ライン加算数と前記フレーム加算数との比率を設定する比率設定手段と、を備え、
前記比率設定手段は、前記輝度値及び前記コントラスト値の少なくとも一方の大きさに基いて、前記比率を可変することを特徴とする焦点調節装置。
A focus adjustment device that performs phase difference type focus adjustment using a focus detection signal output from an image sensor that receives a pair of light beams that have passed through different pupil regions of an imaging optical system with a pair of photoelectric conversion units,
Correlation for calculating a correlation amount by performing a correlation operation using a line addition unit that adds a plurality of pixels constituting the image sensor in the focus detection area in a line direction, and an addition value added by the line addition unit. An amount calculating means; a frame adding means for adding the correlation values calculated for each frame; a determining means for determining at least one of a luminance value and a contrast value of an image in the focus detection area; and the line addition. A line addition number calculated by the means and a frame addition number calculated by the frame addition means, and a ratio setting means for setting a ratio between the line addition number and the frame addition number,
The focus adjustment apparatus, wherein the ratio setting unit varies the ratio based on at least one of the luminance value and the contrast value.
前記比率設定手段は、前記輝度値が所定値よりも小さい場合、前記フレーム加算数を増やすことを特徴とする請求項1に記載の焦点調節装置。   The focus adjustment apparatus according to claim 1, wherein the ratio setting unit increases the frame addition number when the luminance value is smaller than a predetermined value. 前記比率設定手段は、前記コントラスト値が所定値よりも小さい場合、前記フレーム加算数を増やすことを特徴とする請求項1又は2に記載の焦点調節装置。   The focus adjustment apparatus according to claim 1, wherein the ratio setting unit increases the frame addition number when the contrast value is smaller than a predetermined value. フレームレートを設定するフレームレート設定手段を備え、
前記比率設定手段は、前記フレームレートが所定値よりも小さい場合、前記フレーム加算数を減らすことを特徴とする請求項1乃至3の何れか一項に記載の焦点調節装置。
A frame rate setting means for setting the frame rate;
4. The focus adjustment apparatus according to claim 1, wherein the ratio setting unit reduces the number of frame additions when the frame rate is smaller than a predetermined value. 5.
ズーム倍率を可変するズーム手段を有し、
前記比率設定手段は、前記ズーム倍率が所定値よりも高い場合、前記フレーム加算数を減らすことを特徴とする請求項1乃至4の何れか一項に記載の焦点調節装置。
Having zoom means for varying the zoom magnification;
5. The focus adjustment apparatus according to claim 1, wherein the ratio setting unit reduces the frame addition number when the zoom magnification is higher than a predetermined value. 6.
請求項1乃至5の何れか一項に記載の焦点調節装置と、前記撮像素子と、を有する撮像装置。   An imaging apparatus comprising: the focus adjustment apparatus according to any one of claims 1 to 5; and the imaging element. 撮像光学系の異なる瞳領域を通過した一対の光束を一対の光電変換部で受光する撮像素子から出力された焦点検出信号を用いて位相差方式の焦点調節を行う焦点調節方法であって、
焦点検出領域にある前記撮像素子を構成する複数の画素をライン方向に加算するライン加算工程と、前記ライン加算工程にて加算された加算値を用いて相関演算を行って相関量を算出する相関量算出工程と、フレーム毎に算出された前記相関値を加算するフレーム加算工程と、前記焦点検出領域の画像の輝度値及びコントラスト値の少なくとも一方の大きさを判定する判定工程と、前記ライン加算工程で算出されたライン加算数及び前記フレーム加算工程で算出されたフレーム加算数を可変するとともに、前記ライン加算数と前記フレーム加算数との比率を設定する比率設定工程と、を備え、
前記比率設定工程は、前記輝度値及び前記コントラスト値の少なくとも一方の大きさに基いて、前記比率を可変することを特徴とする焦点調節方法。
A focus adjustment method that performs phase difference focus adjustment using a focus detection signal output from an image sensor that receives a pair of light beams that have passed through different pupil regions of an imaging optical system with a pair of photoelectric conversion units,
A line addition step for adding a plurality of pixels constituting the image sensor in the focus detection area in the line direction, and a correlation for calculating a correlation amount using the addition value added in the line addition step. An amount calculating step, a frame adding step for adding the correlation values calculated for each frame, a determination step for determining at least one of a luminance value and a contrast value of an image in the focus detection area, and the line addition The line addition number calculated in the step and the frame addition number calculated in the frame addition step are varied, and a ratio setting step for setting a ratio between the line addition number and the frame addition number is provided.
The focus adjustment method, wherein the ratio setting step varies the ratio based on at least one of the luminance value and the contrast value.
請求項7に記載の焦点調節方法の手順が記述されたコンピュータで実行可能なプログラム。   A computer-executable program in which a procedure of the focus adjustment method according to claim 7 is described. コンピュータに、請求項7に記載の焦点調節方法の各工程を実行させるためのプログラムが記憶されたコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing a program for causing a computer to execute each step of the focus adjustment method according to claim 7.
JP2015135561A 2015-07-06 2015-07-06 Focus adjustment device, focus adjustment method, and imaging apparatus Pending JP2017016064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015135561A JP2017016064A (en) 2015-07-06 2015-07-06 Focus adjustment device, focus adjustment method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015135561A JP2017016064A (en) 2015-07-06 2015-07-06 Focus adjustment device, focus adjustment method, and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2017016064A true JP2017016064A (en) 2017-01-19

Family

ID=57829178

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015135561A Pending JP2017016064A (en) 2015-07-06 2015-07-06 Focus adjustment device, focus adjustment method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2017016064A (en)

Similar Documents

Publication Publication Date Title
JP6271952B2 (en) Imaging device
US9800772B2 (en) Focus adjustment device and focus adjustment method that detects spatial frequency of a captured image
JP6033038B2 (en) FOCUS DETECTION DEVICE, IMAGING DEVICE, IMAGING SYSTEM, AND FOCUS DETECTION METHOD
US9398206B2 (en) Focus adjustment apparatus, focus adjustment method and program, and imaging apparatus including focus adjustment apparatus
US20150078725A1 (en) Image capturing apparatus, image capturing system, and control method for the image capturing apparatus
US10313577B2 (en) Focus detection apparatus, focus detection method, and image capturing apparatus
JP6465562B2 (en) Imaging apparatus and imaging method
US20150109515A1 (en) Image pickup apparatus, image pickup system, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium
JP6228402B2 (en) Image reproducing apparatus, image reproducing method, program, and storage medium
JP6557499B2 (en) FOCUS DETECTION DEVICE, ITS CONTROL METHOD, IMAGING DEVICE, PROGRAM, AND STORAGE MEDIUM
US9451175B2 (en) Imaging apparatus, information processing device, image pickup method, and non-transitory computer-readable storage medium storing a program therefor for obtaining light field information
US10182186B2 (en) Image capturing apparatus and control method thereof
US10205870B2 (en) Image capturing apparatus and control method thereof
JP6395621B2 (en) Focus adjustment device, imaging device using the same, and focus adjustment method
US10003735B2 (en) Calculation device and image pickup device using calculation device and calculation method
JP2015114544A5 (en)
JP6347581B2 (en) Focus detection apparatus and control method thereof
JP2017016064A (en) Focus adjustment device, focus adjustment method, and imaging apparatus
US10382740B2 (en) Image processing apparatus, method for controlling the same, and image capture apparatus
JP2017021085A (en) Focus adjustment device, focus adjustment method, and imaging apparatus
US11463619B2 (en) Image processing apparatus that retouches and displays picked-up image, image processing method, and storage medium
JP2018045101A (en) Focus adjustment unit, focus adjustment method, and program
JPWO2015182021A1 (en) Imaging control apparatus, imaging apparatus, and imaging control method
JP2015061137A (en) Imaging apparatus, control method of the same, and program
JP2017161571A (en) Detection device, imaging device, focus detection method, program and recording medium