JP6222278B2 - Focus detection apparatus and imaging apparatus - Google Patents

Focus detection apparatus and imaging apparatus Download PDF

Info

Publication number
JP6222278B2
JP6222278B2 JP2016105305A JP2016105305A JP6222278B2 JP 6222278 B2 JP6222278 B2 JP 6222278B2 JP 2016105305 A JP2016105305 A JP 2016105305A JP 2016105305 A JP2016105305 A JP 2016105305A JP 6222278 B2 JP6222278 B2 JP 6222278B2
Authority
JP
Japan
Prior art keywords
focus detection
value
focus
data
integration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016105305A
Other languages
Japanese (ja)
Other versions
JP2016177314A (en
Inventor
日下 洋介
洋介 日下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2016105305A priority Critical patent/JP6222278B2/en
Publication of JP2016177314A publication Critical patent/JP2016177314A/en
Application granted granted Critical
Publication of JP6222278B2 publication Critical patent/JP6222278B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は焦点検出装置および撮像装置に関する。   The present invention relates to a focus detection apparatus and an imaging apparatus.

マイクロレンズとその背後に配置された一対の光電変換部からなる焦点検出画素を撮影レンズの予定焦点面上に配列する。これにより光学系を通る一対の焦点検出光束が形成する一対の像に応じた一対の像信号を生成する。この一対の像信号間の像ズレ量(位相差)を検出することによって撮影レンズの焦点調節状態(デフォーカス量)を検出する。このような動作を行なう、いわゆる瞳分割型位相差検出方式の焦点検出装置が知られている。   Focus detection pixels including a microlens and a pair of photoelectric conversion units arranged behind the microlens are arranged on a planned focal plane of the photographing lens. Thus, a pair of image signals corresponding to the pair of images formed by the pair of focus detection light beams passing through the optical system is generated. By detecting the image shift amount (phase difference) between the pair of image signals, the focus adjustment state (defocus amount) of the photographing lens is detected. A so-called pupil division type phase difference detection type focus detection apparatus that performs such an operation is known.

上記のような焦点検出画素と撮像画素とが混在した撮像素子(イメージセンサ)から一定フレーム時間間隔で焦点検出画素および撮像画素の信号を読み出してライブビュー表示と焦点検出とを並行して行なう。それとともに、フレーム毎の焦点検出画素の信号を過去複数フレームに亘って記憶する。最新フレームの焦点検出画素の信号のみでは出力レベルが不足して焦点検出が不能になる場合には、記憶した過去複数フレームに亘る焦点検出画素の信号を加算して時間積算する。こうすることにより、出力レベルが高まった焦点検出画素の信号を用いて焦点検出を行なう焦点検出装置が知られている(例えば、特許文献1参照)。   The signals of the focus detection pixels and the imaging pixels are read out at a fixed frame time interval from the imaging element (image sensor) in which the focus detection pixels and the imaging pixels are mixed, and live view display and focus detection are performed in parallel. At the same time, the focus detection pixel signal for each frame is stored over a plurality of past frames. If focus detection is impossible due to insufficient output level with only the focus detection pixel signal of the latest frame, the stored focus detection pixel signals over a plurality of past frames are added and time integration is performed. By doing so, there is known a focus detection device that performs focus detection using a signal of a focus detection pixel whose output level has increased (see, for example, Patent Document 1).

特開2008−85738号公報JP 2008-85738 A

上述したような焦点検出装置においては、移動する被写体に対して焦点検出結果に誤差を生じる場合があるという問題点があった。   The focus detection apparatus as described above has a problem that an error may occur in the focus detection result for a moving subject.

(1)本発明の第1の態様によると、焦点検出装置は、光学系を透過した光を検出し、第1の焦点検出信号と第2の焦点検出信号とを出力する第1の方向に配置された複数の焦点検出画素を有する焦点検出部が、前記第1の方向とは異なる第2の方向に第1の数だけ複数設けられる撮像素子と、前記第1の数の焦点検出部において前記第2の方向に配置された焦点検出画素から出力された前記第1の焦点検出信号同士を加算した第1の加算値と、前記第1の数の焦点検出部において前記第2の方向に配置された前記焦点検出画素から出力された前記第2の焦点検出信号同士を加算した第2の加算値とを算出する加算部と、前記第1の加算値と前記第2の加算値とにより前記光学系の合焦状態を検出する合焦状態検出部とを備え、前記加算部は、前記第1の加算値および前記第2の加算値に基づく第1積算値が閾値よりも大きくなるまで、前記第1の数を上限とする第2の数の前記第1の焦点検出信号同士および前記第2の数の前記第2の焦点検出信号同士を加算する。
(2)本発明の第2の態様によると、撮像装置は、第1〜第15のいずれか1態様の前記合焦状態検出部によって検出された前記合焦状態に基づき前記光学系を合焦位置に駆動させる駆動部と、前記光学系が前記合焦位置に位置するとき、前記光学系を通過する被写体からの撮影光束に基づき画像データを取得する取得部とを備える。
(1) According to the first aspect of the present invention, the focus detection device detects light transmitted through the optical system, and outputs the first focus detection signal and the second focus detection signal in the first direction. In the imaging device in which a first number of focus detection units having a plurality of arranged focus detection pixels are provided in a second direction different from the first direction, and the first number of focus detection units . a first addition value obtained by adding the first focus detection signals respectively outputted from the arranged focus detection pixels in the second direction, the second direction in the focus detection unit of the first number an adder for calculating a second sum value obtained by adding the outputted second focus detection signals with each other from the placed the focus detection pixel, by the first addition value and the second sum value and a focus state detection unit for detecting a focus state of the optical system, the addition unit Until the first integrated value based on the first addition value and the second addition value becomes larger than a threshold value, the second number of the first focus detection signals with the first number as an upper limit, and you adding the second focus detection signal between said second number.
(2) According to the second aspect of the present invention, the imaging apparatus focuses the optical system based on the in-focus state detected by the in-focus state detection unit according to any one of the first to fifteenth aspects. A driving unit that drives the lens to a position; and an acquisition unit that acquires image data based on a photographic light beam from a subject passing through the optical system when the optical system is positioned at the in-focus position.

本発明によれば、焦点検出装置は、高精度な焦点検出を行なうことが出来る。   According to the present invention, the focus detection apparatus can perform focus detection with high accuracy.

デジタルスチルカメラの構成を示す横断面図である。It is a cross-sectional view which shows the structure of a digital still camera. 撮像素子およびボディ駆動制御装置の関係を詳細に示すブロック図である。It is a block diagram which shows the relationship between an image pick-up element and a body drive control apparatus in detail. 撮影画面上における焦点検出位置を示す図である。It is a figure which shows the focus detection position on an imaging | photography screen. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. マイクロレンズを用いた瞳分割型位相差検出方式の焦点検出光学系の構成を示す図である。It is a figure which shows the structure of the focus detection optical system of the pupil division type phase difference detection system using a micro lens. 撮像素子の撮像画素が受光する撮影光束の様子を説明するための図である。It is a figure for demonstrating the mode of the imaging | photography light beam which the imaging pixel of an image pick-up element light-receives. デジタルスチルカメラの焦点検出動作を含む撮像動作を示すフローチャートである。It is a flowchart which shows the imaging operation including the focus detection operation | movement of a digital still camera. 焦点検出用データの生成の処理フローチャートである。It is a process flowchart of the production | generation of the data for focus detection. 空間積算処理の様子を示した図である。It is the figure which showed the mode of the space integration process. 時間積算処理の様子を示した図である。It is the figure which showed the mode of the time integration process. 焦点検出用データの生成の処理動作のタイミングチャートである。It is a timing chart of processing operation of generating data for focus detection. 焦点検出用データの生成の処理フローチャートである。It is a process flowchart of the production | generation of the data for focus detection. 時間積算処理の様子を示した図である。It is the figure which showed the mode of the time integration process. 焦点検出用データの生成の処理フローチャートである。It is a process flowchart of the production | generation of the data for focus detection. 空間積算回数と時間積算回数とを決定する処理の詳細を説明するためのグラフである。It is a graph for demonstrating the detail of the process which determines the frequency | count of space integration, and the frequency | count of time integration. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element.

<第1の実施の形態>
図1は本発明の第1の実施の形態における焦点検出装置を含む撮像装置としてのレンズ交換式デジタルスチルカメラ201の構成を示す横断面図である。デジタルスチルカメラ201は交換レンズ202とカメラボディ203とから構成される。種々の交換レンズ202がマウント部204を介してカメラボディ203に装着される。
<First Embodiment>
FIG. 1 is a cross-sectional view illustrating a configuration of a lens interchangeable digital still camera 201 as an imaging apparatus including a focus detection apparatus according to the first embodiment of the present invention. The digital still camera 201 includes an interchangeable lens 202 and a camera body 203. Various interchangeable lenses 202 are attached to the camera body 203 via the mount unit 204.

交換レンズ202は、レンズ209、ズーミング用レンズ208、フォーカシング用レンズ210、絞り211、レンズ駆動制御装置206などを有している。レンズ駆動制御装置206は、不図示のマイクロコンピューター、メモリ、駆動制御回路などから構成される。レンズ駆動制御装置206は、フォーカシング用レンズ210の焦点調節や絞り211の開口径調節のための駆動制御を行なうとともに、ズーミング用レンズ208、フォーカシング用レンズ210および絞り211の状態検出などを行なう。この他、レンズ駆動制御装置206は、後述するボディ駆動制御装置214との通信によりレンズ情報の送信およびカメラ情報の受信を行なう。絞り211は、光量およびボケ量調整のために光軸中心に開口径が可変な開口を形成する。   The interchangeable lens 202 includes a lens 209, a zooming lens 208, a focusing lens 210, a diaphragm 211, a lens drive control device 206, and the like. The lens drive control device 206 includes a microcomputer (not shown), a memory, a drive control circuit, and the like. The lens drive control device 206 performs drive control for adjusting the focus of the focusing lens 210 and adjusting the aperture diameter of the aperture 211, and detects the states of the zooming lens 208, the focusing lens 210, and the aperture 211, and the like. In addition, the lens drive control device 206 transmits lens information and receives camera information through communication with a body drive control device 214 described later. The aperture 211 forms an aperture having a variable aperture diameter at the center of the optical axis in order to adjust the amount of light and the amount of blur.

カメラボディ203は、撮像素子(イメージセンサ)212、ボディ駆動制御装置214、液晶表示素子駆動回路215、液晶表示素子216、接眼レンズ217、メモリカード219などを有している。撮像素子212には、複数の撮像画素が二次元状に配置されるとともに、焦点検出位置に対応した部分に複数の焦点検出画素が組み込まれている。この撮像素子212については詳細を後述する。   The camera body 203 includes an image sensor (image sensor) 212, a body drive control device 214, a liquid crystal display element drive circuit 215, a liquid crystal display element 216, an eyepiece lens 217, a memory card 219, and the like. In the image sensor 212, a plurality of image pickup pixels are two-dimensionally arranged, and a plurality of focus detection pixels are incorporated in a portion corresponding to the focus detection position. Details of the image sensor 212 will be described later.

ボディ駆動制御装置214は、マイクロコンピューター、メモリ、駆動制御回路などを含む。ボディ駆動制御装置214は、撮像素子212の駆動制御と、画像信号および焦点検出信号の読み出しと、焦点検出信号に基づく焦点検出演算および交換レンズ202の焦点調節とを繰り返し行うとともに、画像信号の処理および記録と、カメラの動作制御などとを行う。ボディ駆動制御装置214は、電気接点213を介してレンズ駆動制御装置206と通信を行い、レンズ情報の受信およびカメラ情報(デフォーカス量や絞り値など)の送信を行う。   The body drive control device 214 includes a microcomputer, a memory, a drive control circuit, and the like. The body drive control device 214 repeatedly performs drive control of the image sensor 212, readout of the image signal and focus detection signal, focus detection calculation based on the focus detection signal, and focus adjustment of the interchangeable lens 202, and processing of the image signal. Recording and camera operation control are performed. The body drive control device 214 communicates with the lens drive control device 206 via the electrical contact 213 to receive lens information and transmit camera information (defocus amount, aperture value, etc.).

液晶表示素子216は、電子ビューファインダー(EVF:Electronic View Finder)として機能する。液晶表示素子駆動回路215は撮像素子212によって得られる画像信号に基づきスルー画像を液晶表示素子216に表示する。撮影者は接眼レンズ217を介してそのスルー画像を観察することができる。メモリカード219は、撮像素子212により撮像された画像信号に基づいて生成される画像データを記憶する画像ストレージである。   The liquid crystal display element 216 functions as an electronic view finder (EVF). The liquid crystal display element driving circuit 215 displays a through image on the liquid crystal display element 216 based on the image signal obtained by the imaging element 212. The photographer can observe the through image through the eyepiece lens 217. The memory card 219 is an image storage that stores image data generated based on an image signal captured by the image sensor 212.

交換レンズ202を通過した光束により、撮像素子212の受光面上に被写体像が形成される。この被写体像は撮像素子212により光電変換され、画像信号と焦点検出信号とがボディ駆動制御装置214へ送られる。   A subject image is formed on the light receiving surface of the image sensor 212 by the light beam that has passed through the interchangeable lens 202. This subject image is photoelectrically converted by the image sensor 212, and an image signal and a focus detection signal are sent to the body drive control device 214.

ボディ駆動制御装置214は、撮像素子212の焦点検出画素からの焦点検出信号に基づいてデフォーカス量を算出し、このデフォーカス量をレンズ駆動制御装置206へ送る。また、ボディ駆動制御装置214は、撮像素子212からの画像信号を処理して画像データを生成し、メモリカード219に格納する。それとともに、ボディ駆動制御装置214は、撮像素子212からのスルー画像信号を液晶表示素子駆動回路215へ送り、スルー画像を液晶表示素子216に表示させる。さらに、ボディ駆動制御装置214は、レンズ駆動制御装置206へ絞り制御情報を送って絞り211の開口制御を行う。   The body drive control device 214 calculates the defocus amount based on the focus detection signal from the focus detection pixel of the image sensor 212 and sends the defocus amount to the lens drive control device 206. The body drive control device 214 processes image signals from the image sensor 212 to generate image data, and stores the image data in the memory card 219. At the same time, the body drive control device 214 sends a through image signal from the image sensor 212 to the liquid crystal display element drive circuit 215 and causes the liquid crystal display element 216 to display the through image. Further, the body drive control device 214 sends aperture control information to the lens drive control device 206 to control the aperture of the aperture 211.

レンズ駆動制御装置206は、フォーカシング状態、ズーミング状態、絞り設定状態、絞り開放F値などに応じてレンズ情報を更新する。具体的には、ズーミング用レンズ208とフォーカシング用レンズ210の位置と絞り211の絞り値とを検出し、これらのレンズ位置と絞り値とに応じてレンズ情報を演算したり、あるいは予め用意されたルックアップテーブルからレンズ位置と絞り値とに応じたレンズ情報を選択する。   The lens drive controller 206 updates the lens information according to the focusing state, zooming state, aperture setting state, aperture opening F value, and the like. Specifically, the positions of the zooming lens 208 and the focusing lens 210 and the aperture value of the aperture 211 are detected, and lens information is calculated according to these lens positions and aperture values, or prepared in advance. Lens information corresponding to the lens position and aperture value is selected from the look-up table.

レンズ駆動制御装置206は、受信したデフォーカス量に基づいてレンズ駆動量を算出し、レンズ駆動量に応じてフォーカシング用レンズ210を合焦位置へ駆動する。また、レンズ駆動制御装置206は受信した絞り値に応じて絞り211を駆動する。   The lens drive control device 206 calculates a lens drive amount based on the received defocus amount, and drives the focusing lens 210 to the in-focus position according to the lens drive amount. Further, the lens drive control device 206 drives the diaphragm 211 in accordance with the received diaphragm value.

図2は、本発明に関連する撮像素子212およびボディ駆動制御装置214の関係を詳細に示すブロック図である。図2に示すように、ボディ駆動制御装置214内には撮像素子制御部220、バッファメモリ221、CPU(マイクロコンピューター)222、内部メモリ223が収納される。撮像素子212は撮像素子制御部220の制御に従って撮像画素および焦点検出画素の電荷蓄積制御(電荷蓄積時間および電荷蓄積タイミング)と、画像信号および焦点検出信号の出力制御を行なう。撮像素子制御部220によって撮像素子212から読み出された被写体像に対応する画像信号および後述する一対の像に対応する焦点検出信号は、信号増幅やAD変換の前処理を受けた後、バッファメモリ221に1フレーム分のデータとして一時的に格納される。CPU222はバッファメモリ221に格納された1フレーム分のデータのうちの画像信号に対して周知の画像処理を行なって画像表示や画像記録を行なうとともに、バッファメモリ221に格納された1フレーム分のデータのうちの焦点検出信号に対して後述する焦点検出処理を行なう。内部メモリ223は過去の複数フレーム分の焦点検出信号を記憶するためのメモリである。CPU222は焦点検出処理において内部メモリ223に記憶された過去フレームの焦点検出信号を参照する。最新フレームの焦点検出信号に対する焦点検出処理が終了すると、バッファメモリ221に一時的に格納された最新フレームのデータのうちの焦点検出信号は内部メモリ223に移送される。内部メモリ223はFILO(first in last out)のスタック構造になっており、内部メモリ223において直近の過去の所定複数フレーム分の焦点検出信号が順次更新記録されることになる。
FIG. 2 is a block diagram showing in detail the relationship between the image sensor 212 and the body drive controller 214 related to the present invention. As shown in FIG. 2, an image sensor control unit 220, a buffer memory 221, a CPU (microcomputer) 222, and an internal memory 223 are housed in the body drive control device 214. The image sensor 212 performs charge accumulation control (charge accumulation time and charge accumulation timing) of the image pickup pixel and the focus detection pixel and output control of the image signal and the focus detection signal according to the control of the image sensor control unit 220. An image signal corresponding to a subject image read from the image sensor 212 by the image sensor control unit 220 and a focus detection signal corresponding to a pair of images described later are subjected to signal amplification and AD conversion preprocessing, and then buffer memory 221 is temporarily stored as data for one frame. The CPU 222 performs well-known image processing on the image signal of the data for one frame stored in the buffer memory 221 to perform image display and image recording, and data for one frame stored in the buffer memory 221. The focus detection process described later is performed on the focus detection signal. The internal memory 223 is a memory for storing focus detection signals for a plurality of past frames. The CPU 222 refers to the focus detection signal of the past frame stored in the internal memory 223 in the focus detection process. When the focus detection processing for the focus detection signal of the latest frame is completed, the focus detection signal of the latest frame data temporarily stored in the buffer memory 221 is transferred to the internal memory 223. The internal memory 223 has a FILO (first in last out) stack structure, and in the internal memory 223, the focus detection signals for the most recent predetermined frames in the past are sequentially updated and recorded.

図3は、撮影画面上における焦点検出位置を示す図であり、後述する撮像素子212上の焦点検出画素列による焦点検出の際に撮影画面上で像をサンプリングする領域(焦点検出エリア、焦点検出位置)の一例を示す。この例では、矩形の撮影画面100上の中央に焦点検出エリア101が配置される。長方形で示す焦点検出エリア101に対応して焦点検出画素が配列される。   FIG. 3 is a diagram showing a focus detection position on the shooting screen, and an area (focus detection area, focus detection) for sampling an image on the shooting screen at the time of focus detection by a focus detection pixel array on the image sensor 212 described later. An example of (position) is shown. In this example, the focus detection area 101 is arranged at the center on the rectangular shooting screen 100. Focus detection pixels are arranged corresponding to the focus detection area 101 indicated by a rectangle.

図4、図5は撮像素子212の詳細な構成を示す正面図であり、撮像素子212上の焦点検出エリア101内を拡大して示したものである。図4は撮像画素310および焦点検出画素311のレイアウトを示す。図4において、撮像素子212上で、撮像画素310および焦点検出画素311が混在して二次元正方格子状に稠密に配列される。水平方向に伸びる複数の画素列の各列に焦点検出画素311が1画素おきに配置されることによって、焦点検出画素列L1〜L8が形成される。図5は図4に示す撮像画素310および焦点検出画素311に配置される色フィルタの配列を示す。撮像画素310および焦点検出画素311には、ベイヤー配列の規則に従って色フィルタ、赤色フィルタR、緑色フィルタG、青色フィルタBが配置されている。赤色フィルタR、緑色フィルタG、および青色フィルタBは、それぞれ異なる波長において高い分光感度を示す。焦点検出画素311は緑色フィルタGを備えるとともに、水平方向の焦点検出画素列L1〜L8の各列に配置された複数の焦点検出画素311のデータ(焦点検出信号)に応じて水平方向の位相差検出が行なわれる。焦点検出画素列L1に配置された複数の焦点検出画素311のデータが通常の焦点検出に用いられるデータである。状況に応じて、焦点検出画素列L2〜L8のそれぞれに配置された複数の焦点検出画素311のデータが、それらに対応する焦点検出画素列L1に配置された複数の焦点検出画素311のデータに積算され、その積算値が焦点検出に用いられる。こうした積算は、互いに空間的に異なる位置に配置された焦点検出画素311のデータどうしの積算なので、こうした積算を以後空間積算という。   4 and 5 are front views showing the detailed configuration of the image sensor 212, and show an enlarged view of the focus detection area 101 on the image sensor 212. FIG. FIG. 4 shows a layout of the imaging pixel 310 and the focus detection pixel 311. In FIG. 4, on the image sensor 212, the imaging pixels 310 and the focus detection pixels 311 are mixed and densely arranged in a two-dimensional square lattice. Focus detection pixel rows L1 to L8 are formed by arranging focus detection pixels 311 every other pixel row in a plurality of pixel rows extending in the horizontal direction. FIG. 5 shows an arrangement of color filters arranged in the imaging pixel 310 and the focus detection pixel 311 shown in FIG. In the imaging pixel 310 and the focus detection pixel 311, a color filter, a red filter R, a green filter G, and a blue filter B are arranged according to the rules of the Bayer arrangement. The red filter R, the green filter G, and the blue filter B each exhibit high spectral sensitivity at different wavelengths. The focus detection pixel 311 includes a green filter G, and a horizontal phase difference according to data (focus detection signals) of a plurality of focus detection pixels 311 arranged in each of the horizontal focus detection pixel rows L1 to L8. Detection is performed. Data of a plurality of focus detection pixels 311 arranged in the focus detection pixel row L1 is data used for normal focus detection. Depending on the situation, the data of the plurality of focus detection pixels 311 arranged in each of the focus detection pixel rows L2 to L8 becomes the data of the plurality of focus detection pixels 311 arranged in the focus detection pixel row L1 corresponding to them. The accumulated value is used for focus detection. Since such integration is an integration of the data of the focus detection pixels 311 arranged at spatially different positions, such integration is hereinafter referred to as spatial integration.

撮像画素310は、矩形のマイクロレンズ10と、不図示の遮光マスクで受光領域を制限された光電変換部11とを有している。焦点検出画素311は、矩形のマイクロレンズ10と、撮像画素310の光電変換部11を垂直方向に延在する素子分離領域15により2分割して得られる一対の光電変換部13および14とから構成される。なお、簡潔のため、図4において色フィルタは不図示としている。   The imaging pixel 310 includes a rectangular microlens 10 and a photoelectric conversion unit 11 whose light receiving area is limited by a light shielding mask (not shown). The focus detection pixel 311 includes a rectangular microlens 10 and a pair of photoelectric conversion units 13 and 14 obtained by dividing the photoelectric conversion unit 11 of the imaging pixel 310 into two by an element isolation region 15 extending in the vertical direction. Is done. For simplicity, the color filter is not shown in FIG.

撮像画素310は、マイクロレンズ10によって最も明るい交換レンズ202の射出瞳径(例えばF1.0)を通過する撮影光束を、光電変換部11がすべて受光するような形状に設計される。また、焦点検出画素311は、マイクロレンズ10によって交換レンズ202の射出瞳のうちの、一対の光電変換部13および14の並び方向と平行に並ぶ一対の領域を通過する一対の焦点検出光束を、光電変換部13、14がそれぞれ受光するような形状に設計される。   The imaging pixel 310 is designed in such a shape that the photoelectric conversion unit 11 receives all the imaging light flux that passes through the exit pupil diameter (for example, F1.0) of the brightest interchangeable lens 202 by the microlens 10. Further, the focus detection pixel 311 includes a pair of focus detection light beams that pass through a pair of regions arranged in parallel with the arrangement direction of the pair of photoelectric conversion units 13 and 14 in the exit pupil of the interchangeable lens 202 by the microlens 10. The photoelectric conversion units 13 and 14 are designed to receive light.

図6は、マイクロレンズ10を用いた瞳分割型位相差検出方式の焦点検出光学系の構成を示す。図6は、焦点検出エリア101のうちの水平方向の焦点検出画素列L1に配置された撮影光軸91近傍の隣接する3つの焦点検出画素311および2つの撮像画素310を模式的に拡大して示す。図6において、射出瞳90は、交換レンズ202(図1参照)の予定結像面に配置されたマイクロレンズ10から前方に距離dの位置に設定されている。この距離dは、マイクロレンズ10の曲率および屈折率、マイクロレンズ10と光電変換部13、14との間の距離などに応じて決まる距離であって、この明細書では測距瞳距離と呼ぶ。図6には他に、交換レンズの光軸91、マイクロレンズ10、光電変換部13、14、焦点検出画素311、撮像画素310、焦点検出光束73、74が示されている。   FIG. 6 shows a configuration of a focus detection optical system of the pupil division type phase difference detection method using the microlens 10. FIG. 6 schematically expands three adjacent focus detection pixels 311 and two imaging pixels 310 in the vicinity of the photographing optical axis 91 arranged in the horizontal focus detection pixel row L1 in the focus detection area 101. Show. In FIG. 6, the exit pupil 90 is set at a position of a distance d forward from the microlens 10 disposed on the planned imaging plane of the interchangeable lens 202 (see FIG. 1). This distance d is a distance determined according to the curvature and refractive index of the microlens 10, the distance between the microlens 10 and the photoelectric conversion units 13 and 14, and is referred to as a distance measuring pupil distance in this specification. In addition, FIG. 6 shows an optical axis 91 of the interchangeable lens, the microlens 10, the photoelectric conversion units 13 and 14, the focus detection pixel 311, the imaging pixel 310, and the focus detection light beams 73 and 74.

測距瞳93は、遮光マスクの開口部により受光領域が制限された光電変換部13がマイクロレンズ10により投影されることによって形成される。同様に、測距瞳94は、遮光マスクの開口部により受光領域が制限された光電変換部14がマイクロレンズ10により投影されることによって形成される。一対の測距瞳93、94は光軸91を通る垂直線に対して線対称な形状となっている。一対の測距瞳93、94は上述した一対の領域に対応する。マイクロレンズ10により、一対の光電変換部13および14と上述した一対の領域、すなわち一対の測距瞳93および94とが互いに共役関係となる。   The distance measuring pupil 93 is formed by projecting the photoelectric conversion unit 13 whose light receiving area is limited by the opening of the light shielding mask by the microlens 10. Similarly, the distance measuring pupil 94 is formed by projecting the photoelectric conversion unit 14 whose light receiving area is limited by the opening of the light shielding mask by the microlens 10. The pair of distance measuring pupils 93 and 94 are symmetrical with respect to a vertical line passing through the optical axis 91. The pair of distance measuring pupils 93 and 94 correspond to the pair of regions described above. By the microlens 10, the pair of photoelectric conversion units 13 and 14 and the above-described pair of regions, that is, the pair of distance measuring pupils 93 and 94 are in a conjugate relationship with each other.

焦点検出エリア101の水平方向の焦点検出画素列L1〜L8に配置された全ての焦点検出画素311において、一対の光電変換部13、14は焦点検出画素列を構成する焦点検出画素と同一の水平方向に並んでいる。一対の光電変換部13、14は、それぞれに対応して一対の光電変換部13、14の並び方向と同一の方向に並ぶ一対の測距瞳93、94から各マイクロレンズに到来する一対の焦点検出光束73および74を受光する。各焦点検出画素列を構成する複数の焦点検出画素311の各々に含まれる一対の光電変換部13および14が、一対の焦点検出光束73および74を受光すると、光電変換により、一対の焦点検出光束73および74による一対の像に対応する一対の像信号を所定フレーム間隔毎に繰り返し出力する。   In all the focus detection pixels 311 arranged in the focus detection pixel rows L1 to L8 in the horizontal direction of the focus detection area 101, the pair of photoelectric conversion units 13 and 14 has the same horizontal as the focus detection pixels constituting the focus detection pixel row. Lined up in the direction. The pair of photoelectric conversion units 13 and 14 correspond to each other, and a pair of focal points arriving at each microlens from a pair of distance measuring pupils 93 and 94 arranged in the same direction as the arrangement direction of the pair of photoelectric conversion units 13 and 14. Detection light beams 73 and 74 are received. When the pair of photoelectric conversion units 13 and 14 included in each of the plurality of focus detection pixels 311 constituting each focus detection pixel row receive the pair of focus detection light beams 73 and 74, a pair of focus detection light beams is obtained by photoelectric conversion. A pair of image signals corresponding to the pair of images 73 and 74 are repeatedly output at predetermined frame intervals.

以上のような構成により、光電変換部13は、測距瞳93を通過して焦点検出画素311のマイクロレンズ10に向かう焦点検出光束73によりマイクロレンズ10上に形成される像の強度に対応した信号を出力する。また、光電変換部14は、測距瞳94を通過して焦点検出画素311のマイクロレンズ10に向う焦点検出光束74によりマイクロレンズ10上に形成される像の強度に対応した信号を出力する。   With the configuration described above, the photoelectric conversion unit 13 corresponds to the intensity of the image formed on the microlens 10 by the focus detection light beam 73 that passes through the distance measuring pupil 93 and travels toward the microlens 10 of the focus detection pixel 311. Output a signal. Further, the photoelectric conversion unit 14 outputs a signal corresponding to the intensity of the image formed on the microlens 10 by the focus detection light beam 74 that passes through the distance measuring pupil 94 and faces the microlens 10 of the focus detection pixel 311.

水平方向の焦点検出画素列L1に配列された焦点検出画素311において、各焦点検出画素311の光電変換部13、14の出力を測距瞳93および測距瞳94のそれぞれに対応した出力グループにまとめる。このことによって、測距瞳93および測距瞳94をそれぞれ通過する焦点検出用光束73、74が水平方向の焦点検出画素列L1に含まれる複数の焦点検出画素311の配列上に形成する一対の像の強度分布に関する情報が得られる。この情報に対して像ズレ検出演算処理(相関演算処理、位相差検出処理)を施すことによって、いわゆる瞳分割型位相差検出方式で水平方向の焦点検出画素列L1における水平方向の一対の像の像ズレ量が検出される。   In the focus detection pixels 311 arranged in the horizontal focus detection pixel row L1, the outputs of the photoelectric conversion units 13 and 14 of each focus detection pixel 311 are output groups corresponding to the distance measurement pupil 93 and the distance measurement pupil 94, respectively. To summarize. Accordingly, a pair of focus detection light beams 73 and 74 that pass through the distance measurement pupil 93 and the distance measurement pupil 94, respectively, are formed on the array of the plurality of focus detection pixels 311 included in the horizontal focus detection pixel row L1. Information about the intensity distribution of the image is obtained. By applying an image shift detection calculation process (correlation calculation process, phase difference detection process) to this information, a pair of horizontal images in the horizontal focus detection pixel array L1 in a so-called pupil division type phase difference detection method is obtained. An image shift amount is detected.

同様に水平方向の焦点検出画素列L2〜L8に配列された焦点検出画素311の光電変換部13、14の出力を用いて各焦点検出画素列における水平方向の一対の像の像ズレ量を検出することができる。   Similarly, using the outputs of the photoelectric conversion units 13 and 14 of the focus detection pixels 311 arranged in the horizontal focus detection pixel rows L2 to L8, an image shift amount of a pair of images in the horizontal direction in each focus detection pixel row is detected. can do.

さらに、像ズレ量に対して、一対の測距瞳93、94の重心間隔と測距瞳距離との比例関係に応じた変換演算を行うことによって、予定結像面に対する現在の結像面の偏差(デフォーカス量)が算出される。具体的には、光軸91に垂直な面内における像ズレ量に対し所定の変換係数を乗ずることによりデフォーカス量、すなわち光軸91の方向における結像面と予定結像面との偏差が算出されることになる。所定の変換係数は、測距瞳距離dを測距瞳93、94の重心間隔で除した値として得られる。   Further, by performing a conversion calculation according to the proportional relationship between the distance between the center of gravity of the pair of distance measurement pupils 93 and 94 and the distance measurement pupil distance with respect to the image shift amount, the current image plane relative to the planned image plane is determined. A deviation (defocus amount) is calculated. Specifically, by multiplying an image shift amount in a plane perpendicular to the optical axis 91 by a predetermined conversion coefficient, a defocus amount, that is, a deviation between the imaging plane and the planned imaging plane in the direction of the optical axis 91 is obtained. Will be calculated. The predetermined conversion coefficient is obtained as a value obtained by dividing the distance measuring pupil distance d by the center of gravity distance between the distance measuring pupils 93 and 94.

図7は、図4に示す撮像素子212の撮像画素310が受光する撮影光束の様子を図6と比較して説明するための図である。図7は、水平方向の焦点検出画素列L1に隣接する水平方向の撮像画素列に配置された撮影光軸91近傍の隣接する5つの撮像画素310を模式的に拡大して示す。なお図6と重複する部分の説明は省略する。   FIG. 7 is a diagram for explaining the state of the imaging light flux received by the imaging pixel 310 of the imaging device 212 shown in FIG. 4 in comparison with FIG. FIG. 7 schematically shows an enlarged view of five adjacent imaging pixels 310 in the vicinity of the imaging optical axis 91 arranged in the horizontal imaging pixel column adjacent to the horizontal focus detection pixel column L1. Note that description of portions overlapping those in FIG. 6 is omitted.

撮像画素310はマイクロレンズ10とその背後に配置された光電変換部11等から構成される。光電変換部11に近接して配置された遮光マスクの開口部の形状がマイクロレンズ10から測距瞳距離dだけ離間した射出瞳90上に投影される。その投影形状は測距瞳93、94に略外接する領域95を形成する。光電変換部11は、領域95を通過してマイクロレンズ10へ向かう撮影光束71によってマイクロレンズ10上に形成される像の強度に対応した信号を出力する。すなわち、複数の撮像画素310が、交換レンズ202を通過する被写体からの撮影光束71を受光して光電変換により被写体像に対応する被写体像信号を所定フレーム間隔毎に出力する。   The imaging pixel 310 includes the microlens 10 and the photoelectric conversion unit 11 disposed behind the microlens 10. The shape of the opening of the light shielding mask arranged in the vicinity of the photoelectric conversion unit 11 is projected onto the exit pupil 90 separated from the microlens 10 by the distance measurement pupil distance d. The projection shape forms a region 95 that is substantially circumscribed by the distance measuring pupils 93 and 94. The photoelectric conversion unit 11 outputs a signal corresponding to the intensity of the image formed on the microlens 10 by the imaging light beam 71 that passes through the region 95 and travels toward the microlens 10. That is, the plurality of imaging pixels 310 receive the imaging light beam 71 from the subject passing through the interchangeable lens 202 and output subject image signals corresponding to the subject image by photoelectric conversion at predetermined frame intervals.

図8は、本実施の形態の焦点検出装置を含むデジタルスチルカメラ(撮像装置)201の焦点検出動作を含む撮像動作を示すフローチャートである。ボディ駆動制御装置214は、ステップS100でデジタルスチルカメラ201の電源がオンされると、ステップS110以降の撮像動作を開始する。ステップS110において、ボディ駆動制御装置214の撮像素子制御部220は、全画素の画素データを読み出し、撮像画素310の画素データを、ボディ駆動制御装置214のCPU222が液晶表示素子216に表示させる。続くステップS120では、ボディ駆動制御装置214のCPU222は、焦点検出画素311の画素データに基づいて、焦点検出に用いる焦点検出用データを生成する。この焦点検出用データ生成処理については詳細に後述する。   FIG. 8 is a flowchart showing an imaging operation including a focus detection operation of the digital still camera (imaging apparatus) 201 including the focus detection apparatus of the present embodiment. When the power of the digital still camera 201 is turned on in step S100, the body drive control device 214 starts an imaging operation after step S110. In step S110, the image sensor control unit 220 of the body drive controller 214 reads out pixel data of all pixels, and the CPU 222 of the body drive controller 214 causes the liquid crystal display element 216 to display the pixel data of the image pixel 310. In the subsequent step S120, the CPU 222 of the body drive control device 214 generates focus detection data used for focus detection based on the pixel data of the focus detection pixel 311. The focus detection data generation process will be described in detail later.

ステップS130においては、ボディ駆動制御装置214のCPU222は、その焦点検出用データに基づき焦点検出エリア101における位相差検出演算(像ズレ検出演算)を行なう。ボディ駆動制御装置214のCPU222は、その位相差検出演算によって検出された位相差(像ズレ量)に基づきデフォーカス量を算出する。   In step S130, the CPU 222 of the body drive control device 214 performs a phase difference detection calculation (image shift detection calculation) in the focus detection area 101 based on the focus detection data. The CPU 222 of the body drive control device 214 calculates the defocus amount based on the phase difference (image shift amount) detected by the phase difference detection calculation.

ステップS140で、ボディ駆動制御装置214のCPU222は、合焦近傍か否か、すなわち算出したデフォーカス量の絶対値が所定値以内であるか否かを調べる。合焦近傍でないと判定された場合、本処理はステップS150へ進み、ボディ駆動制御装置214のCPU222は、デフォーカス量をレンズ駆動制御装置206へ送信し、交換レンズ202のフォーカシング用レンズ210を合焦位置に駆動させる。その後、本処理はステップS110へ戻って、上述した動作が繰り返される。   In step S140, the CPU 222 of the body drive control device 214 checks whether or not it is close to focusing, that is, whether or not the calculated absolute value of the defocus amount is within a predetermined value. If it is determined that the focus is not close, the process proceeds to step S150, and the CPU 222 of the body drive control device 214 transmits the defocus amount to the lens drive control device 206, and the focusing lens 210 of the interchangeable lens 202 is adjusted. Drive to the focal position. Thereafter, the process returns to step S110, and the above-described operation is repeated.

なお、焦点検出不能な場合も本処理はこのステップS150に分岐し、ボディ駆動制御装置214のCPU222は、レンズ駆動制御装置206へスキャン駆動命令を送信し、交換レンズ202のフォーカシング用レンズ210を無限遠位置から至近位置までの間でスキャン駆動させる。その後、本処理はステップS110へ戻って上述した動作が繰り返される。   Even when focus detection is impossible, the process branches to step S150, and the CPU 222 of the body drive control device 214 transmits a scan drive command to the lens drive control device 206, and the focusing lens 210 of the interchangeable lens 202 is infinite. Scan driving is performed from a far position to a close position. Thereafter, the process returns to step S110 and the above-described operation is repeated.

ステップS140で合焦近傍であると判定された場合、本処理はステップS160へ進む。ステップS160において、ボディ駆動制御装置214のCPU222は、シャッターボタン(不図示)の操作によりシャッターレリーズがなされたか否かを判別する。シャッターレリーズがなされていないと判定された場合、本処理はステップS110へ戻り、上述した動作が繰り返される。一方、シャッターレリーズがなされたと判定された場合、本処理はステップS170へ進む。ステップS170において、ボディ駆動制御装置214のCPU222は、レンズ駆動制御装置206へ絞り調整命令を送信し、交換レンズ202の絞り値を制御F値(撮影者により設定されたF値または自動的に設定されたF値)にする。絞り制御が終了した時点で、ボディ駆動制御装置214の撮像素子制御部220は、撮像素子212に撮像動作を行わせ、撮像素子212の撮像画素310および全ての焦点検出画素311から画素データを読み出す。   If it is determined in step S140 that the focus is close to the focus, the process proceeds to step S160. In step S160, the CPU 222 of the body drive control device 214 determines whether or not a shutter release has been performed by operating a shutter button (not shown). If it is determined that the shutter release has not been performed, the process returns to step S110, and the above-described operation is repeated. On the other hand, if it is determined that the shutter release has been performed, the process proceeds to step S170. In step S170, the CPU 222 of the body drive control device 214 transmits an aperture adjustment command to the lens drive control device 206, and sets the aperture value of the interchangeable lens 202 to the control F value (the F value set by the photographer or automatically set). F value). When the aperture control is completed, the image sensor control unit 220 of the body drive control device 214 causes the image sensor 212 to perform an imaging operation, and reads out pixel data from the imaging pixels 310 of the image sensor 212 and all the focus detection pixels 311. .

ステップS180において、ボディ駆動制御装置214のCPU222は、各焦点検出画素311の位置の画像データとしての画素データを、各焦点検出画素311の画素データに基づき、すなわち各焦点検出画素311に配置された一対の光電変換部13、14の出力データを加算することにより、算出する。続くステップS190では、ボディ駆動制御装置214のCPU222は、撮像画素310の画像データとして用いる画素データおよび焦点検出画素位置の画像データを取得し、メモリカード219に記憶させる。この画像データは、交換レンズ202のフォーカシング用レンズ210が合焦位置に位置するとき、交換レンズ202を通過する被写体からの撮影光束71に基づいて得られる。本処理は、ステップS110へ戻って、上述した動作が繰り返される。   In step S180, the CPU 222 of the body drive control device 214 arranges pixel data as image data at the position of each focus detection pixel 311 based on the pixel data of each focus detection pixel 311, that is, in each focus detection pixel 311. Calculation is performed by adding the output data of the pair of photoelectric conversion units 13 and 14. In subsequent step S190, the CPU 222 of the body drive control device 214 acquires pixel data used as image data of the imaging pixel 310 and image data of the focus detection pixel position, and stores them in the memory card 219. This image data is obtained based on the photographing light beam 71 from the subject passing through the interchangeable lens 202 when the focusing lens 210 of the interchangeable lens 202 is located at the in-focus position. This process returns to step S110 and the above-described operation is repeated.

なおステップS110〜ステップS160の繰り返し動作は、1フレーム分の画素データが撮像素子212から所定フレーム間隔で周期的に読み出されるフレーム読出し動作と連動して行なわれる。   Note that the repetitive operations in steps S110 to S160 are performed in conjunction with a frame reading operation in which pixel data for one frame is periodically read from the image sensor 212 at predetermined frame intervals.

図8のステップS130における像ズレ検出演算処理(相関演算処理、位相差検出処理)の詳細について以下説明する。焦点検出画素311が検出する一対の像は、測距瞳93、94がレンズの絞り開口によりけられて光量バランスが崩れている可能性がある。したがって、ステップS130において、ボディ駆動制御装置214のCPU222は、光量バランスに対して像ズレ検出精度を維持できるタイプの相関演算を施す。焦点検出用の一対の像信号A1(A1,・・・,A1:Mは信号数)、A2(A2,・・・,A2)に対し、例えば特開2007−333720号公報に開示された公知の相関演算式である下記(1)式を用いて、相関量C(k)を演算する。(1)式において、Σ演算は変数nについて累積される。変数nは、像ずらし量kに応じてA1、A1n+1、A2n+k、A2n+1+kのデータが存在する範囲に限定される。像ずらし量kは整数であり、一対の像信号を構成する信号列のデータ間隔を単位とした相対的シフト量である。
C(k)=Σ|A1・A2n+1+k−A2n+k・A1n+1| ・・・(1)
Details of the image shift detection calculation process (correlation calculation process, phase difference detection process) in step S130 of FIG. 8 will be described below. In the pair of images detected by the focus detection pixel 311, there is a possibility that the distance measurement pupils 93 and 94 are displaced by the aperture of the lens and the light quantity balance is lost. Therefore, in step S130, the CPU 222 of the body drive control device 214 performs a type of correlation calculation that can maintain the image shift detection accuracy with respect to the light amount balance. A pair of image signals A1 n for focus detection (A1 1, ···, A1 M : M is the number of signals), A2 n (A2 1, ···, A2 M) relative to, for example, JP 2007-333720 The correlation amount C (k) is calculated using the following equation (1) which is a well-known correlation equation disclosed in the publication. In equation (1), the Σ operation is accumulated for variable n. The variable n is limited to a range in which data of A1 n , A1 n + 1 , A2 n + k , A2 n + 1 + k exists according to the image shift amount k. The image shift amount k is an integer, and is a relative shift amount in units of the data interval of the signal sequence constituting the pair of image signals.
C (k) = Σ | A1 n · A2 n + 1 + k −A2 n + k · A1 n + 1 | (1)

上述した(1)式により演算される離散値である相関量C(k)に対応する連続的な相関量C(x)の極小値C(X)が得られたときは、以下の(2)式により、連続的な相関量C(x)の極小値C(X)を与えるずらし量Xが像ズレ量shftに換算される。(2)式において、係数PYは、焦点検出画素列L1〜L8を構成する焦点検出画素311の画素ピッチ、すなわち撮像素子212に配列された画素の画素ピッチの2倍の値となる。
shft=PY・X ・・・(2)
When the minimum value C (X) of the continuous correlation amount C (x) corresponding to the correlation amount C (k), which is a discrete value calculated by the above-described equation (1), is obtained, the following (2 ), The shift amount X that gives the minimum value C (X) of the continuous correlation amount C (x) is converted into the image shift amount shft. In the equation (2), the coefficient PY is a value twice the pixel pitch of the focus detection pixels 311 constituting the focus detection pixel rows L1 to L8, that is, the pixel pitch of the pixels arranged in the image sensor 212.
shft = PY · X (2)

図8のステップS120における焦点検出画素311の画素データに基づく焦点検出用データの生成の詳細について図9の処理フローチャートを用いて説明する。図4の焦点検出画素列L1〜L8の各焦点検出画素列においてN個の焦点検出画素311が配列されている。各焦点検出画素列Lp(p=1,2,・・・,8)を構成する各焦点検出画素311に水平方向の並び順に符号n(n=1〜N)を対応付ける。焦点検出画素列Lpのn番目の焦点検出画素311が有する一対の光電変換部13、14のうちのs(s=1,2)番目の光電変換部は、データB(s,n,p)を出力する。すなわち、一対の光電変換部13、14は、それぞれ一対のデータB(1,n,p)、B(2,n,p)を出力する。   Details of generation of focus detection data based on the pixel data of the focus detection pixel 311 in step S120 of FIG. 8 will be described using the processing flowchart of FIG. N focus detection pixels 311 are arranged in each focus detection pixel column of the focus detection pixel columns L1 to L8 in FIG. Symbols n (n = 1 to N) are associated with the focus detection pixels 311 constituting each focus detection pixel row Lp (p = 1, 2,..., 8) in the horizontal arrangement order. Of the pair of photoelectric conversion units 13 and 14 included in the nth focus detection pixel 311 of the focus detection pixel row Lp, the s (s = 1, 2) th photoelectric conversion unit includes data B (s, n, p). Is output. That is, the pair of photoelectric conversion units 13 and 14 output a pair of data B (1, n, p) and B (2, n, p), respectively.

ステップS200では、ボディ駆動制御装置214のCPU222は、図に示す焦点検出画素列L1を構成する焦点検出画素311の画素データの最大値が所定閾値T1を越えているか否か、すなわち(3)式を満足しているか否かをチェックする。焦点検出画素列L1を構成する焦点検出画素311の画素データの最大値が所定閾値T1を越えているとき、焦点検出画素311の出力レベルは焦点検出に十分なレベルに達している。(3)式においてMax()は最大値を求める関数である。
Max(B(s,n,1))>T1 ・・・(3)
In step S200, the CPU 222 of the body drive control device 214 determines whether or not the maximum value of the pixel data of the focus detection pixels 311 constituting the focus detection pixel row L1 shown in FIG. 4 exceeds a predetermined threshold T1, that is, (3) Check whether the expression is satisfied. When the maximum value of the pixel data of the focus detection pixels 311 constituting the focus detection pixel row L1 exceeds the predetermined threshold value T1, the output level of the focus detection pixels 311 reaches a level sufficient for focus detection. In the expression (3), Max () is a function for obtaining the maximum value.
Max (B (s, n, 1))> T1 (3)

ステップS200で、(3)式が満足される場合、本処理はステップS210に進む。ステップS210においては、ボディ駆動制御装置214のCPU222は、(4)式のように、焦点検出画素列L1(p=1)に配列された焦点検出画素311の画素データを焦点検出用データB0(s,n)として決定する。本処理は、ステップS310に進む。
B0(s,n)=B(s,n,1) s=1,2 n=1〜N ・・・(4)
If the expression (3) is satisfied in step S200, the process proceeds to step S210. In step S210, the CPU 222 of the body drive control device 214 converts the pixel data of the focus detection pixels 311 arranged in the focus detection pixel row L1 (p = 1) into focus detection data B0 ( s, n). The process proceeds to step S310.
B0 (s, n) = B (s, n, 1) s = 1, 2 n = 1 to N (4)

一方ステップS200で、(3)式が満足されない場合、本処理はステップS220に進む。ステップS220では、ボディ駆動制御装置214のCPU222は、焦点検出画素列L1の焦点検出画素311の画素データと、焦点検出画素列L1に隣接する焦点検出画素列L2の焦点検出画素311の画素データとを空間積算する。(5)式に示すように、水平方向の並び順に付された変数nが同一の位置に配置されている焦点検出画素どうしの同一種類の光電変換部どうしが出力するデータについて行なわれる空間積算によって、データB1(s,n,2)が算出される。
B1(s,n,2)=B1(s,n,1)+B(s,n,2) s=1,2 n=1〜N
・・・(5)
On the other hand, if the expression (3) is not satisfied in step S200, the process proceeds to step S220. In step S220, the CPU 222 of the body drive control device 214 performs pixel data of the focus detection pixel 311 of the focus detection pixel column L1, pixel data of the focus detection pixel 311 of the focus detection pixel column L2 adjacent to the focus detection pixel column L1, and Is spatially integrated. As shown in the equation (5), by the spatial integration performed on the data output by the photoelectric conversion units of the same type among the focus detection pixels in which the variables n assigned in the horizontal order are arranged at the same position. , Data B1 (s, n, 2) is calculated.
B1 (s, n, 2) = B1 (s, n, 1) + B (s, n, 2) s = 1, 2 n = 1 to N
... (5)

すなわち(5)式により垂直方向に隣接した焦点検出画素311の画素データが空間的に積算(空間積算)されることになり、こうして焦点検出画素列L1からLpまで空間積算された焦点検出画素311のデータB1(s,n,p)が得られる。なおデータB1(s,n,1)はデータB(s,n,1)と等しい。   That is, the pixel data of the focus detection pixels 311 adjacent in the vertical direction is spatially integrated (spatial integration) according to the equation (5), and thus the focus detection pixels 311 spatially integrated from the focus detection pixel rows L1 to Lp. Data B1 (s, n, p) is obtained. Note that the data B1 (s, n, 1) is equal to the data B (s, n, 1).

ステップS230では、ボディ駆動制御装置214のCPU222は、空間積算されたデータB1(s,n,p)(最初にこのステップに来た場合にはp=2)の最大値が所定閾値T1を越えているか否か、すなわち(6)式を満足しているか否かをチェックする。
Max(B1(s,n,p))>T1 s=1,2 n=1〜N ・・・(6)
In step S230, the CPU 222 of the body drive control device 214 causes the maximum value of the spatially integrated data B1 (s, n, p) (p = 2 when first coming to this step) to exceed the predetermined threshold T1. It is checked whether or not, that is, whether or not the expression (6) is satisfied.
Max (B1 (s, n, p))> T1 s = 1, 2 n = 1 to N (6)

ステップS230で、(6)式を満足した場合、本処理はステップS240に進む。ステップS240においては、ボディ駆動制御装置214のCPU222は、(7)式のように焦点検出画素列Lpまで空間積算された焦点検出画素311のデータB1(s,n,p)を焦点検出用データB0(s,n)と決定する。本処理はステップS310に進む。
B0(s,n)=B1(s,n,p) s=1,2 n=1〜N ・・・(7)
If the expression (6) is satisfied in step S230, the process proceeds to step S240. In step S240, the CPU 222 of the body drive control device 214 uses the data B1 (s, n, p) of the focus detection pixel 311 that is spatially integrated up to the focus detection pixel row Lp as shown in equation (7) as focus detection data. It is determined as B0 (s, n). The process proceeds to step S310.
B0 (s, n) = B1 (s, n, p) s = 1, 2 n = 1 to N (7)

一方ステップS230で、(6)式が満足されない場合、本処理はステップS250に進む。ステップS250において、ボディ駆動制御装置214のCPU222は、空間積算が焦点検出画素列L8まで行なわれたか否か、すなわち空間積算回数が最大積算回数7回に達しているか否かをチェックする。空間積算が焦点検出画素列L8まで達していない場合には本処理はステップS220に戻る。ステップS220では、ボディ駆動制御装置214のCPU222は、(8)式のように次の焦点検出画素列L(p+1)に配列された焦点検出画素311のデータB(s,n,p+1)を、それまでの空間積算された焦点検出画素311のデータB1(s,n,p)に空間積算する。
B1(s,n,p+1)=B1(s,n,p)+B(s,n,p+1)
s=1,2, n=1〜N ・・・(8)
Meanwhile step S230, the case where (6) is not satisfied, the procedure proceeds to step S 250. In step S 250, CPU 222 of the body drive control device 214, whether space integration is performed to the focus detection pixel row L8, i.e. spatial integration number is checked whether or not reached the maximum accumulation number 7 times. If the spatial integration has not reached the focus detection pixel row L8, the process returns to step S220. In step S220, the CPU 222 of the body drive control device 214 uses the data B (s, n, p + 1) of the focus detection pixels 311 arranged in the next focus detection pixel row L (p + 1) as shown in equation (8), The spatial integration is performed on the data B1 (s, n, p) of the focus detection pixel 311 that has been spatially integrated so far.
B1 (s, n, p + 1) = B1 (s, n, p) + B (s, n, p + 1)
s = 1, 2, n = 1 to N (8)

本処理がステップS220、ステップS230、ステップS250のループを回り、最後にステップS250で、空間積算回数が最大積算回数に達していると判断された場合、すなわちこれ以上焦点検出画素列が無いので空間積算できない場合には、本処理はステップS260に進む。このとき、最新フレームにおいて焦点検出画素列L1からL8まで空間積算されている焦点検出画素311のデータの空間積算データB2(s,n,0)が得られたことになる。ステップS260において、ボディ駆動制御装置214のCPU222は、内部メモリ223に記憶されている1フレーム前の焦点検出画素311の画素データを読み出し、焦点検出画素列L1〜L8に配列された焦点検出画素311のデータを(9)式のように空間積算する。このとき、最新フレームに対しvフレーム前(このステップS260に初めて入るときは、v=1)の焦点検出画素311のデータの空間積算データB2(s,n,v)が得られる。また、内部メモリ223には、10フレーム前(v=10)までの焦点検出画素のデータが記憶されているとする。
B2(s,n,、v)=ΣB(s,n,p) Σ演算はp=1〜8 ・・・(9)
This process step S220, step S230, the around the loop of steps S 250, Finally, in step S 250, if the spatial integration count is determined to have reached the maximum accumulation number, there is no i.e. more focus detection pixel row Therefore, if space integration cannot be performed, the process proceeds to step S260. At this time, spatial integration data B2 (s, n, 0) of the data of the focus detection pixels 311 that have been spatially integrated from the focus detection pixel rows L1 to L8 in the latest frame is obtained. In step S260, the CPU 222 of the body drive control device 214 reads the pixel data of the focus detection pixels 311 one frame before stored in the internal memory 223, and the focus detection pixels 311 arranged in the focus detection pixel rows L1 to L8. The data is spatially integrated as shown in equation (9). At this time, spatial integration data B2 (s, n, v) of the data of the focus detection pixel 311 before v frames with respect to the latest frame (v = 1 when entering step S260 for the first time) is obtained. In addition, it is assumed that focus detection pixel data up to 10 frames before (v = 10) is stored in the internal memory 223.
B2 (s, n, v) = ΣB (s, n, p) Σ operation is p = 1-8 (9)

ステップS270で、ボディ駆動制御装置214のCPU222は、(10)式に示すように、ステップS260で算出した1フレーム前の空間積算データB2(s,n,v)と、これまでのフレームまでの時間積算データB3(s,n,v−1)とを時間積算する。
B3(s,n,v)=B3(s,n,v−1)+B2(s,n,v)
s=1,2 n=1〜N ・・・(10)
In step S270, the CPU 222 of the body drive control device 214, as shown in equation (10), calculates the spatial integration data B2 (s, n, v) one frame before calculated in step S260 and the previous frames. Time integration data B3 (s, n, v-1) is integrated with time.
B3 (s, n, v) = B3 (s, n, v-1) + B2 (s, n, v)
s = 1, 2 n = 1 to N (10)

すなわち(10)式により時間的に隣接したフレームの空間積算データが過去に亘って時間的に積算(時間積算)され、時間積算データB3(s,n,v)が得られる。時間積算データB3(s,n,v)は、最新フレームからvフレーム前までの空間積算データB2(s,n,v)を時間積算した焦点検出画素のデータを表わす。ただし時間積算データB3(s,n,0)は空間積算データB2(s,n,0)およびデータB1(s,n,8)と等しい。   That is, spatial integration data of temporally adjacent frames is integrated temporally (time integration) over the past according to the equation (10), and time integration data B3 (s, n, v) is obtained. The time integration data B3 (s, n, v) represents the focus detection pixel data obtained by time integration of the space integration data B2 (s, n, v) from the latest frame to the previous v frame. However, the time integration data B3 (s, n, 0) is equal to the space integration data B2 (s, n, 0) and data B1 (s, n, 8).

ステップS280では、ボディ駆動制御装置214のCPU222は、時間積算されたデータB3(s,n,v)の最大値が所定閾値T1を越えているか否か、すなわち(11)式を満足しているか否かをチェックする。初めてステップS280おける判定処理が行われる際は、v=1である。
Max(B3(s,n,v))>T1 ・・・(11)
In step S280, the CPU 222 of the body drive control device 214 determines whether or not the maximum value of the time-integrated data B3 (s, n, v) exceeds a predetermined threshold value T1, that is, satisfies the expression (11). Check whether or not. When the determination process in step S280 is performed for the first time, v = 1.
Max (B3 (s, n, v))> T1 (11)

ステップS280で(11)式が満足される場合、本処理はステップS290に進む。ステップS290において、ボディ駆動制御装置214のCPU222は、(12)式のように、最新フレームからvフレーム前まで時間積算された焦点検出画素の時間積算データB3(s,n,v)を焦点検出用データB0(s,n)と決定する。本処理はステップS310に進む。
B0(s,n)=B3(s,n,v) s=1,2 n=1〜N ・・・(12)
If the expression (11) is satisfied in step S280, the process proceeds to step S290. In step S290, the CPU 222 of the body drive control device 214 performs focus detection on the time integration data B3 (s, n, v) of the focus detection pixel that has been time integrated from the latest frame to the previous v frame as shown in equation (12). Data B0 (s, n) is determined. The process proceeds to step S310.
B0 (s, n) = B3 (s, n, v) s = 1, 2 n = 1 to N (12)

一方ステップS280で、(11)式が満足されない場合、本処理はステップS300に進む。ステップS300において、ボディ駆動制御装置214のCPU222は、時間積算が10フレーム前まで行なわれたか否か、すなわち時間積算回数が最大積算回数10回に達しているか否かをチェックする。時間積算が10フレーム前まで達していない場合には本処理はステップS260に戻り、ボディ駆動制御装置214のCPU222は、これまで時間積算が行なわれたフレームの1つ前の過去フレームに対して空間積算を行なう。それとともに、ステップS260、ステップS270、ステップS280、ステップS300のループが繰り返される。   On the other hand, if the expression (11) is not satisfied in step S280, the process proceeds to step S300. In step S300, the CPU 222 of the body drive control device 214 checks whether or not the time integration has been performed up to 10 frames before, that is, whether or not the time integration count has reached the maximum integration count of 10. If the time integration has not reached 10 frames before, the process returns to step S260, and the CPU 222 of the body drive control device 214 performs space for the previous frame one frame before the time integration has been performed so far. Accumulate. At the same time, the loop of step S260, step S270, step S280, and step S300 is repeated.

ステップS300で時間積算回数が最大積算回数10回に達していると判定された場合は、ボディ駆動制御装置214のCPU222は、ステップS290で最新フレームから10フレーム前まで時間積算された焦点検出画素の時間積算データB3(s,n,10)を焦点検出用データB0(s,n)と決定する。本処理はステップS310に進む。   If it is determined in step S300 that the number of time integrations has reached the maximum number of integrations 10, the CPU 222 of the body drive control device 214 determines the focus detection pixels that have been time integrated from the latest frame to 10 frames before in step S290. The time integration data B3 (s, n, 10) is determined as focus detection data B0 (s, n). The process proceeds to step S310.

ステップS310では次回のフレームでの焦点検出演算処理に備えて、最新フレームの焦点検出画素311の画素データを内部メモリ223に記憶する。本処理は、図8のフローのステップS130に抜ける。この時焦点検出用データB0(s,n)が(1)式の焦点検出用の一対の像信号A1(A1,・・・,A1:Mはデータ数)、A2(A2、・・・、A2)に読み替えられることになる。 In step S310, the pixel data of the focus detection pixel 311 of the latest frame is stored in the internal memory 223 in preparation for the focus detection calculation process in the next frame. This process goes to step S130 in the flow of FIG. At this time, the focus detection data B0 (s, n) is a pair of focus detection image signals A1 n (A1 1 ,..., A1 M : M is the number of data) of the formula (1), A2 n (A2 1 ,..., A2 M ).

図9に示した処理フローチャートの動作を、データ処理の観点で示したものが図10、図11である。図10、図11に示すグラフにおいて縦軸がデータ値、横軸はデータ位置(水平方向の位置)である。図10において、焦点検出画素列L1から順次焦点検出画素データが空間積算されていくことにより空間積算データが生成される。なお図においては簡潔のため一対の像信号のうち一方(s=1)のみを代表して示している。図10は最新フレームの焦点検出画素311のデータに対する空間積算処理の様子を示した図である。図10において、焦点検出画素列L1の焦点検出画素311の画素データの最大値が所定閾値T1を越えない場合には、順次焦点検出画素列L2、L3・・・の焦点検出画素311のデータと空間積算され、焦点検出画素列L8まで焦点検出画素311の画素データを空間積算した段階でも空間積算データの最大値が所定閾値T1を越えない場合には、処理は図11に示す時間積算処理に進む。複数の焦点検出画素列どうしの空間積算処理は、各焦点検出画素列の水平方向の画素位置が同じn番目の焦点検出画素どうしが積算される。それらの積算される焦点検出画素は互いに垂直方向に隣接した位置に配置されている。   FIGS. 10 and 11 show the operation of the processing flowchart shown in FIG. 9 from the viewpoint of data processing. In the graphs shown in FIGS. 10 and 11, the vertical axis represents the data value, and the horizontal axis represents the data position (horizontal position). In FIG. 10, spatial integration data is generated by sequentially integrating the focus detection pixel data from the focus detection pixel row L1. In the figure, for simplicity, only one (s = 1) of the pair of image signals is shown as a representative. FIG. 10 is a diagram showing a state of spatial integration processing for the data of the focus detection pixel 311 of the latest frame. In FIG. 10, when the maximum value of the pixel data of the focus detection pixel 311 of the focus detection pixel row L1 does not exceed the predetermined threshold T1, the data of the focus detection pixels 311 of the focus detection pixel rows L2, L3. If the maximum value of the spatial integration data does not exceed the predetermined threshold value T1 even when the spatial integration is performed and the pixel data of the focus detection pixel 311 is spatially integrated up to the focus detection pixel row L8, the processing is the time integration processing shown in FIG. move on. In the spatial integration process between a plurality of focus detection pixel columns, nth focus detection pixels having the same pixel position in the horizontal direction of each focus detection pixel column are integrated. The integrated focus detection pixels are arranged at positions adjacent to each other in the vertical direction.

図11に示すように、最新フレームの空間積算データの最大値が所定閾値T1を越えない場合には順次1フレーム前、2フレーム前・・・の空間積算データが最新フレームから過去に向かって最大10フレーム前まで時間積算される。空間積算データを時間積算した時間積算データの最大値が所定閾値T1を越えた段階で時間積算は終了する。   As shown in FIG. 11, when the maximum value of the spatial integration data of the latest frame does not exceed the predetermined threshold value T1, the spatial integration data of one frame before, two frames before, etc. sequentially increases from the latest frame to the past. The time is accumulated up to 10 frames before. Time integration ends when the maximum value of the time integration data obtained by time integration of the space integration data exceeds a predetermined threshold T1.

図12は、図8で示した動作フローチャートの動作をタイミングチャートで表わした図である。図12において、撮像素子212から一定のフレームレート(例えば1/60秒)で撮像画素および焦点検出画素の画素データが読み出される。図12において、第(N−1)フレームから第(N+2)フレームまでの4フレームが例示されている。代表として第Nフレームの動作を説明する。まず撮像素子212から第(N−1)フレームにおいて第Nフレーム用に電荷蓄積された画像データ(撮像画素310の画素データおよび焦点検出画素311の画素データ)が読み出される。それとともに、撮像素子212において第(N+1)フレーム用の電荷蓄積が始まる。画像データの読出しが終了すると、読み出された撮像画素310の画素データに基づいてライブビュー表示画像が更新される。また第Nフレームの焦点検出画素311の画素データと第(N−1)フレームの生成時点で記憶された第(N−1)フレーム以前の焦点検出画素311の画素データ(信号)に基づいて焦点検出が行なわれ、第Nフレーム生成時点におけるデフォーカス量が算出される。デフォーカス量が算出されると、該デフォーカス量に応じて焦点調節がなされるとともに、第Nフレームの焦点検出画素311の画素データ(信号)が内部メモリ223に記憶される。以上の動作が毎フレーム繰り返される。   FIG. 12 is a timing chart showing the operation of the operation flowchart shown in FIG. In FIG. 12, pixel data of the imaging pixels and focus detection pixels are read from the imaging element 212 at a constant frame rate (for example, 1/60 seconds). FIG. 12 illustrates four frames from the (N−1) th frame to the (N + 2) th frame. The operation of the Nth frame will be described as a representative. First, image data (pixel data of the imaging pixel 310 and pixel data of the focus detection pixel 311) that has been stored for the Nth frame in the (N−1) th frame is read from the imaging device 212. At the same time, charge accumulation for the (N + 1) th frame starts in the image sensor 212. When the reading of the image data is completed, the live view display image is updated based on the read pixel data of the imaging pixel 310. The focus is based on the pixel data of the focus detection pixel 311 in the Nth frame and the pixel data (signal) of the focus detection pixel 311 before the (N-1) th frame stored at the time of generation of the (N-1) th frame. Detection is performed, and a defocus amount at the time of generating the Nth frame is calculated. When the defocus amount is calculated, focus adjustment is performed according to the defocus amount, and pixel data (signal) of the focus detection pixel 311 of the Nth frame is stored in the internal memory 223. The above operation is repeated every frame.

以上の説明においては、図4のように焦点検出画素列L1〜L8の8列に複数の焦点検出画素311が水平方向に配置され、空間積算は垂直方向の焦点検出画素311の画素データが最大7回まで積算されているが、これに限定されることなく焦点検出画素列Lpを8列以上配置することができる。その場合には空間積算回数の上限(最大積算回数)は、垂直方向の空間積算による像の高周波成分の低下による焦点検出精度の低下を来さないように、実験的に決めることができる。例えば図4のように焦点検出画素311が1行おきに配置されており、かつ画素ピッチがPaの場合、次式(13)を満たすように空間積算回数Nの上限Nmaxを決定することができる。
N≦Nmax=Ca/(2・Pa) ・・・(13)
In the above description, as shown in FIG. 4, a plurality of focus detection pixels 311 are arranged in the horizontal direction in eight rows of focus detection pixel rows L1 to L8, and the pixel data of the focus detection pixels 311 in the vertical direction is the maximum in spatial integration. Although integration is performed up to seven times, the focus detection pixel rows Lp can be arranged in eight or more rows without being limited to this. In this case, the upper limit (maximum number of integrations) of the number of spatial integrations can be determined experimentally so as not to cause a decrease in focus detection accuracy due to a reduction in high-frequency components of the image due to vertical spatial integration. For example, as shown in FIG. 4, when the focus detection pixels 311 are arranged every other row and the pixel pitch is Pa, the upper limit Nmax of the spatial integration count N can be determined so as to satisfy the following equation (13). .
N ≦ Nmax = Ca / (2 · Pa) (13)

ここで定数Caは実験的に定められ、予定焦点面上において焦点検出精度を維持できる最低空間周波数により決まる。空間周波数が高いほど焦点検出精度が高くなるので、定数Caは例えば最低空間周波数の逆数として定められる。例えば最低空間周波数が10本/mmの場合、定数Caは100μmとなる。画素ピッチPaが5μmとすれば、焦点検出画素の間隔はその2倍の10μmなので、(13)式にしたがって、Nmax=100μm/10μm=10回となる。また最低空間周波数を焦点検出精度に影響を与える撮影要因、例えば像の動き量、カメラのブレ量、撮影レンズの絞り値、被写界の輝度、カメラの撮影モード(静止被写体撮影モード/移動被写体撮影モードの別)などに応じて変更することにより、焦点検出に適した臨機応変な空間積算回数Nの上限Nmaxの設定が可能になる。   Here, the constant Ca is experimentally determined and is determined by the lowest spatial frequency that can maintain the focus detection accuracy on the planned focal plane. Since the focus detection accuracy increases as the spatial frequency increases, the constant Ca is determined, for example, as the reciprocal of the lowest spatial frequency. For example, when the minimum spatial frequency is 10 lines / mm, the constant Ca is 100 μm. If the pixel pitch Pa is 5 μm, the distance between the focus detection pixels is 10 μm, which is twice that, so that Nmax = 100 μm / 10 μm = 10 times according to the equation (13). Also, the shooting factor that affects the focus detection accuracy with the lowest spatial frequency, such as the amount of image movement, the amount of camera shake, the aperture value of the taking lens, the brightness of the field, the shooting mode of the camera (still subject shooting mode / moving subject) By changing according to the shooting mode, etc., it becomes possible to set the upper limit Nmax of the spatial integration number N suitable for focus detection.

以上の説明においては、内部メモリに各フレームの焦点検出画素のデータがそのまま記憶されるとして説明を行なった。しかし、最新フレーム以外の焦点検出画素のデータは空間積算されてから焦点検出用データの生成に用いられるので、内部メモリに記憶する段階の前に焦点検出画素のデータ空間積算(8列分)を行なってから、空間積算データを内部メモリに記憶するようにしてもよい。例えば図12において、各フレームの記憶信号更新処理の際に各フレームの焦点検出画素のデータを空間積算(8列分)し、空間積算されたデータ(第Nフレームにおいては第Nフレームの空間積算データ)が内部メモリに記憶される。次のフレームにおいては内部メモリに記憶された過去のフレームの空間積算データが焦点検出に用いられる。このようにすれば、過去のフレームの焦点検出画素のデータを焦点検出処理の際に毎回空間積算する必要がなくなるので、演算時間を短縮できるとともに、内部メモリの容量も節約することができる。   In the above description, the focus detection pixel data of each frame is stored as it is in the internal memory. However, since the data of the focus detection pixels other than the latest frame are used for the generation of focus detection data after being spatially integrated, the data space integration (eight columns) of the focus detection pixels is performed before the step of storing in the internal memory. After the operation, the spatial integration data may be stored in the internal memory. For example, in FIG. 12, the data of the focus detection pixels of each frame is spatially integrated (eight columns) during the storage signal update processing of each frame, and the spatially integrated data (spatial integration of the Nth frame in the Nth frame) Data) is stored in the internal memory. In the next frame, the spatially accumulated data of the past frame stored in the internal memory is used for focus detection. In this way, it is not necessary to spatially integrate the focus detection pixel data of the past frame every time in the focus detection process, so that the calculation time can be shortened and the capacity of the internal memory can be saved.

以上の説明では、空間積算処理においては垂直方向に1行ずつ焦点検出画素のデ−タを加算しながら、また時間積算処理においては過去に向かって1フレームずつ過去の空間積算データを積算しながら、積算後のデータの最大値が所定閾値を越えているか否かをチェックして積算処理の継続の要否を決定している。このような処理は、焦点検出画素列毎に異なる被写体パターンが焦点検出画素上に形成される場合や、被写界の明るさがフレーム間に急変する場合に対応可能であるという利点がある。また以上のような積算処理の制御においては積算データの最大値以外にも積算データの平均値やコントラスト値(最大値と最小値との差)などのデータ特性を表す評価値を用いることができる。   In the above description, in the spatial integration process, the data of the focus detection pixels are added one by one in the vertical direction, and in the time integration process, the past spatial integration data is integrated frame by frame toward the past. Then, it is checked whether or not the maximum value of the data after integration exceeds a predetermined threshold value, and it is determined whether or not to continue the integration process. Such processing has an advantage that it can be applied when a subject pattern different for each focus detection pixel column is formed on the focus detection pixel, or when the brightness of the object scene changes suddenly between frames. In addition, in the control of integration processing as described above, evaluation values representing data characteristics such as the average value of the integration data and the contrast value (difference between the maximum value and the minimum value) can be used in addition to the maximum value of the integration data. .

また空間積算を行なう焦点検出画素間の空間的距離が小さい場合(図4の場合、焦点検出画素列L1からL8まで空間積算した場合でも、空間的には垂直方向に最大14画素しか離れていないことになる)には空間積算する焦点検出画素がほぼ同一の被写体パターンを受光していると仮定しても大きな誤りは生じない。また図9のステップS300のように最大時間積算回数を10回程度に設定すれば、1フレームあたり1/60秒としても10回の時間積算時にも1/6秒間の時間積算となるので、フレーム間の明るさ変動がなく一様だと仮定しても大きな誤りは生じない。   In addition, when the spatial distance between focus detection pixels that perform spatial integration is small (in the case of FIG. 4, even when spatial integration is performed from focus detection pixel rows L1 to L8, only 14 pixels are separated in the vertical direction spatially. Therefore, even if it is assumed that the focus detection pixels for spatial integration receive substantially the same subject pattern, no large error occurs. Further, if the maximum number of times of integration is set to about 10 as in step S300 of FIG. 9, the time integration is 1/6 second even if 1/60 seconds per frame or 10 times of time integration. Even if it is assumed that there is no brightness fluctuation between them and it is uniform, no big error will occur.

このように空間的一様性および時間的一様性を仮定すれば、図9の処理をさらに図13のように簡潔にすることが可能である。なお内部メモリには各フレームの記憶信号更新処理の際に各フレームの焦点検出画素のデータが空間積算された空間積算データ、すなわち第vフレームの空間積算データB2(s、n、v)が記憶されているとする。   Assuming such spatial uniformity and temporal uniformity, the process of FIG. 9 can be further simplified as shown in FIG. The internal memory stores spatial integration data obtained by spatially integrating the data of the focus detection pixels of each frame during the storage signal update processing of each frame, that is, spatial integration data B2 (s, n, v) of the vth frame. Suppose that

ステップS400では、ボディ駆動制御装置214のCPU222は、焦点検出画素のデータの最大値が所定閾値T1を越えているか否か((3)式を満足しているか)をチェックする。   In step S400, the CPU 222 of the body drive control device 214 checks whether or not the maximum value of the focus detection pixel data exceeds a predetermined threshold T1 (whether the expression (3) is satisfied).

ステップS400で、(3)式を満足した場合、本処理はステップS410に進み、ボディ駆動制御装置214のCPU222は、(4)式のように焦点検出画素列L1に配列された焦点検出画素のデータを焦点検出用データと決定する。本処理はステップS450に進む。   If the expression (3) is satisfied in step S400, the process proceeds to step S410, and the CPU 222 of the body drive control device 214 determines the focus detection pixels arranged in the focus detection pixel row L1 as in expression (4). The data is determined as focus detection data. The process proceeds to step S450.

一方ステップS400で、()式を満足しない場合、本処理はステップS420に進み、ボディ駆動制御装置214のCPU222は、所定閾値T1を焦点検出画素のデータの最大値Max(B(s,n,1))で割った値の整数部Nsが最大空間積算回数8以下であるか否か((14)式を満足しているか否か)をチェックする。
Ns<8 ・・・(14)
On the other hand, if the expression ( 3 ) is not satisfied in step S400, the process proceeds to step S420, and the CPU 222 of the body drive control device 214 sets the predetermined threshold T1 to the maximum value Max (B (s, n) of the focus detection pixel data. , 1)), it is checked whether or not the integer part Ns of the value is equal to or less than the maximum space integration number 8 (whether or not the expression (14) is satisfied).
Ns <8 (14)

ステップS420で、(14)式を満足した場合、本処理はステップS430に進み、ボディ駆動制御装置214のCPU222は、(15)式のように焦点検出画素311のデータを(Ns+1)番目の焦点検出画素列L(Ns+1)まで空間積算する。ボディ駆動制御装置214のCPU222は、ステップS440で空間積算データB1(s,n,Ns+1)を焦点検出用データB0(s,n)と決定する。本処理はステップS450に進む。なお(15)式において、Σ演算は変数m=1〜Ns+1で行なわれる。
B0(s,n)=B1(s,n,Ns+1)=ΣB(s,n,m)
s=1,2 n=1〜N ・・・(15)
If the expression (14) is satisfied in step S420, the process proceeds to step S430, and the CPU 222 of the body drive control device 214 converts the data of the focus detection pixel 311 to the (Ns + 1) th focus as shown in the expression (15). We calculate the spatial volume to detection pixel row L (Ns + 1). In step S440, the CPU 222 of the body drive control device 214 determines the spatial integration data B1 (s, n, Ns + 1) as focus detection data B0 (s, n). The process proceeds to step S450. In the equation (15), the Σ operation is performed with variables m = 1 to Ns + 1.
B0 (s, n) = B1 (s, n, Ns + 1) = ΣB (s, n, m)
s = 1, 2 n = 1 to N (15)

ステップS450では、ボディ駆動制御装置214のCPU222は、内部メモリに格納するための空間積算データB4(s,n)を(16)式により計算する。本処理は、ステップS510に進む。なお(16)式において、Σ演算は変数m=1〜8で行なわれる。
B4(s,n)=B1(s,n,8)=ΣB(s,n,m)
s=1,2 n=1〜N ・・・(16)
In step S450, the CPU 222 of the body drive control device 214 calculates the spatial integration data B4 (s, n) to be stored in the internal memory using the equation (16). The process proceeds to step S510. In equation (16), the Σ operation is performed with variables m = 1-8.
B4 (s, n) = B1 (s, n, 8) = ΣB (s, n, m)
s = 1, 2 n = 1 to N (16)

一方ステップS420で、(14)式を満足しない場合、本処理はステップS460に進み、ボディ駆動制御装置214のCPU222は、所定閾値T1を焦点検出画素のデータの最大値Max(B(s,n,1))の8倍で割った値の整数部Ntが10以上か否か((17)式を満足しているか否か)をチェックする。
Nt>10・・・(17)
On the other hand, if the expression (14) is not satisfied in step S420, the process proceeds to step S460, and the CPU 222 of the body drive control device 214 sets the predetermined threshold T1 to the maximum value Max (B (s, n) of the focus detection pixel data. 1)), it is checked whether the integer part Nt of the value divided by 8 is 10 or more (whether or not the expression (17) is satisfied).
Nt> 10 (17)

ステップS460で(17)式を満足した場合、本処理はステップS470に進み、ボディ駆動制御装置214のCPU222は、Ntを10と決定する。本処理はステップS480に進む。ステップS460で(17)式を満足しない場合、本処理はそのままステップS480に進む。   If the expression (17) is satisfied in step S460, the process proceeds to step S470, and the CPU 222 of the body drive control device 214 determines Nt as 10. The process proceeds to step S480. If the expression (17) is not satisfied in step S460, the process proceeds to step S480 as it is.

ステップS480では、ボディ駆動制御装置214のCPU222は、ステップS450と同じように(16)式により最新フレームの焦点検出画素のデータを焦点検出画素列L1からL8まで空間積算して最新フレームの空間積算データB2(s,n,0)を算出する。   In step S480, the CPU 222 of the body drive control device 214 spatially integrates the data of the focus detection pixel of the latest frame from the focus detection pixel rows L1 to L8 by the equation (16) as in step S450, and spatially integrates the latest frame. Data B2 (s, n, 0) is calculated.

ステップS490では、ボディ駆動制御装置214のCPU222は、最新フレーム(第Naフレームとする)の空間積算データB2(s,n,0)と、内部メモリに記憶されているNtフレーム前までの空間積算データB2(s,n,1)〜B2(s,n,Nt)とを用い(18)式のように時間積算データB3(s,n,Nt)を算出する。ステップS500で、ボディ駆動制御装置214のCPU222は、時間積算データB3(s,n,Nt)を焦点検出用データB0(s,n)と決定する。本処理はステップS510に進む。なお(18)式において、Σ演算は変数m=0〜Ntで行なわれる。
B0(s,n)=B3(s,n,Nt)=ΣB2(s,n,m)
s=1,2 n=1〜N ・・・(18)
In step S490, the CPU 222 of the body drive control device 214 performs spatial integration up to Nt frames before the spatial integration data B2 (s, n, 0) of the latest frame (assumed to be the Nath frame) and the internal memory. Using the data B2 (s, n, 1) to B2 (s, n, Nt), the time integration data B3 (s, n, Nt) is calculated as in equation (18). In step S500, the CPU 222 of the body drive control device 214 determines the time integration data B3 (s, n, Nt) as focus detection data B0 (s, n). The process proceeds to step S510. In the equation (18), the Σ operation is performed with variables m = 0 to Nt.
B0 (s, n) = B3 (s, n, Nt) = ΣB2 (s, n, m)
s = 1, 2 n = 1 to N (18)

ステップS510では、ボディ駆動制御装置214のCPU222は、次回のフレームでの焦点検出演算処理に備えて、最新フレームの空間積算データを内部メモリに記憶する。本処理は、図8のフローのステップS130に抜ける。   In step S510, the CPU 222 of the body drive control device 214 stores the spatial integration data of the latest frame in the internal memory in preparation for the focus detection calculation process in the next frame. This process goes to step S130 in the flow of FIG.

図13の処理フローでは空間積算回数および時間積算回数を処理の最初の段階で決定しており、図9のフローと比較してループ処理毎の判定処理がないので処理時間の短縮を図ることができるとともに、フレーム毎に空間積算データを記憶するので内部メモリ容量を減少することができる。   In the processing flow of FIG. 13, the number of times of spatial integration and the number of time integration are determined at the initial stage of processing, and compared with the flow of FIG. 9, there is no determination processing for each loop processing, so the processing time can be shortened. In addition, since the spatial integration data is stored for each frame, the internal memory capacity can be reduced.

さらにフレーム毎に各フレームの空間積算データを内部メモリに記憶する代わりに、フレーム毎に10フレーム前までの時間積算データを計算し、該時間積算データを内部メモリに記憶するようにしてもよい。   Further, instead of storing the spatial integration data of each frame in the internal memory for each frame, the time integration data up to 10 frames before may be calculated for each frame, and the time integration data may be stored in the internal memory.

すなわち図12の各フレームの記憶信号更新処理の際に、最新フレームの空間積算データを1つ前のフレームに記憶された10フレーム分の時間積算データに対して時間積算して更新記憶する。これにより、内部メモリに記憶された時間積算データは、最新フレームからvフレーム前までの時間積算データとなる。このようにして内部メモリに記憶された時間積算データを焦点検出用データとして利用する場合の様子を図11に対応して図14で示す。最新フレームにおいて内部メモリには、1フレーム前の時間積算データ(空間積算データ)、1フレーム前から2フレーム前までの時間積算データ、1フレーム前から3フレーム前までの積算データ・・・(B2(s,n,1)、B2(s,n,1)+B2(s,n,2)、B2(s,n,1)+B2(s,n,2)+B2(s,n,3)、・・・)が記録されている。最新フレームからNtフレーム前までの時間積算した時間積算データB3(s,n,Nt)が必要な場合は、最新フレームの空間積算データB2(s,n,0)と1フレーム前からNtフレーム前までの時間積算データ(B2(s,n,1)+B2(s,n,2)+B2(s,n,3)+・・・+B2(s,n,Nt))とを直接時間積算すればよい。   That is, at the time of the storage signal update processing of each frame in FIG. 12, the spatial integration data of the latest frame is time-integrated and updated and stored with respect to the time integration data of 10 frames stored in the previous frame. Thereby, the time integration data stored in the internal memory becomes the time integration data from the latest frame to the previous v frame. FIG. 14 shows a state in which the time integration data stored in the internal memory in this way is used as focus detection data in correspondence with FIG. In the latest frame, the internal memory stores the time integration data one frame before (space integration data), the time integration data from one frame before to two frames before, the integration data from one frame before to three frames before (B2). (S, n, 1), B2 (s, n, 1) + B2 (s, n, 2), B2 (s, n, 1) + B2 (s, n, 2) + B2 (s, n, 3), ...) is recorded. When time integration data B3 (s, n, Nt) obtained by integrating the time from the latest frame to Nt frames before is required, spatial integration data B2 (s, n, 0) of the latest frame and Nt frames before 1 frame before Time integration data (B2 (s, n, 1) + B2 (s, n, 2) + B2 (s, n, 3) +... + B2 (s, n, Nt)) up to Good.

このようにすれば、焦点検出に用いる時間積算データの算出の際に内部メモリから1フレーム前からNtフレーム前までの時間積算が完了した時間積算データを読み出すだけでいいので、焦点検出演算の処理速度が向上する。また時間積算データの演算および内部メモリの更新記憶をCPUとは別途設けられた専用の演算回路を用いて行なうことにより、さらなる処理速度の向上を図ることができる。   In this way, when calculating the time integration data used for focus detection, it is only necessary to read out the time integration data for which the time integration from the previous frame to the previous Nt frame has been completed from the internal memory. Increases speed. Further, the processing speed can be further improved by calculating the time integration data and updating and storing the internal memory using a dedicated arithmetic circuit provided separately from the CPU.

上述した第1の実施の形態における焦点検出装置を含む撮像装置としてのデジタルスチルカメラ201は、撮像素子(イメージセンサ)212とボディ駆動制御装置214とを含む。   A digital still camera 201 as an imaging device including the focus detection device in the first embodiment described above includes an imaging device (image sensor) 212 and a body drive control device 214.

撮像素子212には、複数の焦点検出画素列L1〜L8が互いに並置される。複数の焦点検出画素列L1〜L8は各焦点検出画素列Lpで構成される。各焦点検出画素列Lpは、水平方向に配列される複数の焦点検出画素311から成る。各焦点検出画素列Lpを構成する複数の焦点検出画素311は、水平方向に配列され、交換レンズ202の射出瞳90のうちの複数の焦点検出画素311の並び方向である水平方向と平行に並ぶ一対の測距瞳93および94を通る一対の焦点検出光束73および74を受光する。撮像素子212は、各焦点検出画素列Lpが光電変換により一対の焦点検出光束73および74による一対の像に対応する一対の像信号A1およびA2を所定フレーム間隔毎に繰り返し出力する。 A plurality of focus detection pixel rows L1 to L8 are juxtaposed on the image sensor 212. The plurality of focus detection pixel rows L1 to L8 are configured by each focus detection pixel row Lp. Each focus detection pixel column Lp includes a plurality of focus detection pixels 311 arranged in the horizontal direction. The plurality of focus detection pixels 311 constituting each focus detection pixel row Lp are arranged in the horizontal direction, and are arranged in parallel with the horizontal direction that is the arrangement direction of the plurality of focus detection pixels 311 in the exit pupil 90 of the interchangeable lens 202. A pair of focus detection light beams 73 and 74 passing through the pair of distance measuring pupils 93 and 94 are received. The imaging device 212 repeatedly outputs a pair of image signals A1 n and A2 n corresponding to a pair of images by the pair of focus detection light beams 73 and 74 by photoelectric conversion by each focus detection pixel row Lp at predetermined frame intervals.

ボディ駆動制御装置214は、各焦点検出画素列Lpが一対の像信号A1およびA2を所定フレーム間隔毎に繰り返し出力するたびに、複数の焦点検出画素列L1〜L8のうちの焦点検出画素列L1とそれに隣接する1つまたは複数の焦点検出画素列とが出力する一対の像信号A1およびA2をそれぞれ積算することによって、空間積算データB2(s,n,v)を算出する。 The body drive control device 214 causes the focus detection pixels of the focus detection pixel rows L1 to L8 each time the focus detection pixel rows Lp repeatedly output a pair of image signals A1 n and A2 n at predetermined frame intervals. Spatial integration data B2 (s, n, v) is calculated by integrating the pair of image signals A1 n and A2 n output from the column L1 and one or more focus detection pixel columns adjacent thereto.

ボディ駆動制御装置214は、各焦点検出画素列Lpが一対の像信号A1およびA2を所定フレーム間隔毎に繰り返し出力するたびに空間積算データB2(s,n,v)が算出されて得られる最新フレームからvフレーム前までの空間積算データB2(s,n,v)を積算することによって、時間積算データB3(s,n,v)を算出する。 The body drive control device 214 calculates the spatial integration data B2 (s, n, v) each time each focus detection pixel column Lp repeatedly outputs a pair of image signals A1 n and A2 n at predetermined frame intervals. The time integration data B3 (s, n, v) is calculated by integrating the spatial integration data B2 (s, n, v) from the latest frame to the previous v frame.

ボディ駆動制御装置214は、空間積算データB2(s,n,v)と時間積算データB3(s,n,v)とのうちのいずれか一方に基づいて交換レンズ202の焦点状態を検出する。   The body drive control device 214 detects the focus state of the interchangeable lens 202 based on one of the space integration data B2 (s, n, v) and the time integration data B3 (s, n, v).

以上のような構成を有する本発明の第1の実施形態の焦点検出装置を含む撮像装置としてのデジタルスチルカメラ201では、焦点検出用データの生成において、空間積算(近接する複数の焦点検出画素のデータの積算)が優先され、空間積算のみでは焦点検出用データの有効性(最大値、平均値、またはコントラスト値が所定閾値以上)が確保できない場合に、時間積算(同一の焦点検出画素の過去フレームのデータとの積算)が行なわれる。そのため、時間積算に伴う不具合、例えば被写体像の時間変化や移動に伴う焦点検出精度の悪化を最低限のレベルに押さえ込むことができ、低輝度または低コントラスト時にも快適な自動焦点調節を行なえる。   In the digital still camera 201 as an imaging apparatus including the focus detection apparatus according to the first embodiment of the present invention having the above-described configuration, in the generation of focus detection data, spatial integration (of a plurality of adjacent focus detection pixels) is performed. Data integration) is prioritized, and time integration (past past pixels of the same focus detection pixel) is possible when the focus detection data validity (maximum value, average value, or contrast value is greater than or equal to a predetermined threshold) cannot be ensured by spatial integration alone. Integration with the frame data). For this reason, problems associated with time integration, for example, deterioration in focus detection accuracy due to temporal changes and movement of the subject image can be suppressed to a minimum level, and comfortable automatic focus adjustment can be performed even at low luminance or low contrast.

<第2の実施の形態>
第1の実施の形態においては、焦点検出画素のデータを積算する場合に常に空間積算を時間積算に対して優先していた。第2の実施形態においては、被写体の移動や手ブレなどの状況に応じて空間積算と時間積算を好適に組み合わせることにより、本発明の効果を奏するものである。
<Second Embodiment>
In the first embodiment, when integrating focus detection pixel data, spatial integration is always prioritized over time integration. In the second embodiment, the effects of the present invention are achieved by suitably combining space integration and time integration according to the situation of movement of the subject, camera shake, and the like.

第2の実施形態の構成は第1の実施形態と同じであり、大まかな動作フローも同じ(図8)であり、焦点検出用データの生成処理の部分が異なる。なお内部メモリには最新フレームから10フレーム前までの10フレーム分の各フレームの焦点検出画素のデータ(焦点検出画素列L1〜L8)が更新記憶されているとする。   The configuration of the second embodiment is the same as that of the first embodiment, the general operation flow is the same (FIG. 8), and the focus detection data generation process is different. It is assumed that the focus detection pixel data (focus detection pixel rows L1 to L8) of each frame for 10 frames from the latest frame to 10 frames before is updated and stored in the internal memory.

第2の実施形態の図8のステップS120における焦点検出画素のデータに基づく焦点検出用データの生成の詳細について図15の処理フローチャートを用いて説明する。   Details of generation of focus detection data based on focus detection pixel data in step S120 of FIG. 8 according to the second embodiment will be described with reference to a processing flowchart of FIG.

ステップS600では、ボディ駆動制御装置214のCPU222は、焦点検出画素のデータ(図の焦点検出画素列L1に配列された焦点検出画素311のデータ)の最大値が所定閾値T1を越えているか否か((3)式を満足しているか)をチェックする。
In step S600, the CPU 222 of the body drive control device 214 determines whether or not the maximum value of focus detection pixel data (data of the focus detection pixels 311 arranged in the focus detection pixel row L1 in FIG. 4 ) exceeds a predetermined threshold T1. (Whether (3) is satisfied) is checked.

ステップS600で、(3)式を満足した場合、本処理はステップS610に進み、ボディ駆動制御装置214のCPU222は、(4)式のように焦点検出画素列L1に配列された焦点検出画素のデータを焦点検出用データと決定する。本処理はステップS680に進む。   If the expression (3) is satisfied in step S600, the process proceeds to step S610, and the CPU 222 of the body drive control device 214 determines the focus detection pixels arranged in the focus detection pixel row L1 as in expression (4). The data is determined as focus detection data. The process proceeds to step S680.

一方ステップS600で、(3)式を満足しない場合、本処理はステップS620に進み、ボディ駆動制御装置214のCPU222は、所定閾値T1を焦点検出画素のデータの最大値Max(B(s,n,1))で割った値の整数部+1を総合的な積算回数Pとして算出する。   On the other hand, if the expression (3) is not satisfied in step S600, the process proceeds to step S620, and the CPU 222 of the body drive control device 214 sets the predetermined threshold T1 to the maximum value Max (B (s, n) of the focus detection pixel data. , 1)), the integral part +1 of the value divided by 1)) is calculated as the total number of integrations P.

ステップS630では、ボディ駆動制御装置214のCPU222は、最新フレームの画像データ(撮像画素のデータ)と1フレーム前の画像データに基づき周知の手法によりフレーム間の動きベクトルを求め、動きベクトルの絶対値を取ってフレーム間の動き量Mvを算出する。なお1フレーム前の画像データはバッファメモリまたは内部メモリに残されているものとする。   In step S630, the CPU 222 of the body drive control device 214 obtains a motion vector between frames based on the image data of the latest frame (imaging pixel data) and the image data of the previous frame by a known method, and the absolute value of the motion vector. And the amount of motion Mv between frames is calculated. It is assumed that the image data of the previous frame is left in the buffer memory or the internal memory.

ステップS640では、ボディ駆動制御装置214のCPU222は、積算回数Pと動き量Mvとに基づき、空間積算回数Psと時間積算回数Ptとを決定する。この処理の詳細については後述する。   In step S640, the CPU 222 of the body drive control device 214 determines the space integration count Ps and the time integration count Pt based on the integration count P and the motion amount Mv. Details of this processing will be described later.

ステップS650では、ボディ駆動制御装置214のCPU222は、空間積算回数Psに基づき、最新フレームから(Pt―1)フレーム前までの焦点検出画素データ(焦点検出画素列L1からL(Ps)までの焦点検出画素データ)を空間積算して、Ptフレーム分の空間積算データを算出する。   In step S650, the CPU 222 of the body drive control device 214 determines the focus detection pixel data (focus points from the focus detection pixel row L1 to L (Ps) from the latest frame to the previous (Pt-1) frame based on the spatial integration number Ps. Detection pixel data) is spatially integrated to calculate spatial integration data for Pt frames.

ステップS660では、ボディ駆動制御装置214のCPU222は、Ptフレーム分の空間積算データをさらに時間積算して最新フレームから(Pt−1)フレーム前までの時間積算データを算出する。   In step S660, the CPU 222 of the body drive control device 214 further time-integrates the spatial integration data for Pt frames to calculate time integration data from the latest frame to (Pt-1) frames before.

ステップ670では、ボディ駆動制御装置214のCPU222は、時間積算データを焦点検出用データと決定する。本処理は、ステップS680に進む。   In step 670, the CPU 222 of the body drive control device 214 determines the time integration data as focus detection data. The process proceeds to step S680.

ステップS680では、ボディ駆動制御装置214のCPU222は、次回のフレームでの焦点検出演算処理に備えて、最新フレームの焦点検出画素のデータを内部メモリに記憶する。本処理は、図8のフローのステップS130に抜ける。   In step S680, the CPU 222 of the body drive control device 214 stores the focus detection pixel data of the latest frame in the internal memory in preparation for the focus detection calculation process in the next frame. This process goes to step S130 in the flow of FIG.

図16は図15のステップS640における空間積算回数Psと時間積算回数Ptとを決定する処理の詳細を説明するためのグラフである。   FIG. 16 is a graph for explaining the details of the process of determining the spatial integration number Ps and the time integration number Pt in step S640 of FIG.

図16において横軸は空間積算回数を表わす変数Px、縦軸は時間積算回数を表わす変数Pyである。空間積算回数を表わす変数Pxは焦点検出画素列L1〜L8が8列であることから、1≦Px≦8に制限される。また時間積算回数Ptは内部メモリには10フレーム前までのデータが更新記憶されるので最新のフレームと合わせて最大11フレームまでしか時間積算できない。つまり、1≦Py≦11に制限される。従って空間積算回数Pxと時間積算回数Pyとの組み合わせは図16の斜線部の領域に囲まれた領域(許容範囲)に制限される。
In FIG. 16, the horizontal axis represents a variable Px representing the number of times of spatial integration, and the vertical axis represents a variable Py representing the number of times of time integration. The variable Px representing the number of times of spatial integration is limited to 1 ≦ Px ≦ 8 because the focus detection pixel columns L1 to L8 are 8 columns. In addition, since the data up to 10 frames before is updated and stored in the internal memory, the time integration count Pt can be integrated up to a maximum of 11 frames together with the latest frame. That is, it is limited to 1 ≦ Py ≦ 11. Therefore, the combination of the spatial integration number Px and the time integration number Py is limited to a region (allowable range) surrounded by the shaded region in FIG.

空間積算回数Pxと時間積算回数Pyとの積が総合的な積算回数Pである。すなわちP=Px・Pyである。このように互いに関数の関係にあるPxおよびPyを積算回数Pの値に応じて決定することができる。図16に、P=88、P0、1(1<P0<88)の場合の例を示す。   The product of the spatial integration count Px and the time integration count Py is the total integration count P. That is, P = Px · Py. In this way, Px and Py having a function relationship with each other can be determined according to the value of the number of integrations P. FIG. 16 shows an example in the case of P = 88, P0, 1 (1 <P0 <88).

一方動き量Mvに基づいて関数Py=K・Pxが決定される。ここで係数K=D/Mvであり、焦点検出画素列間のピッチD(例えば焦点検出画素列L1と隣接する焦点検出画素列L2との間の垂直方向の間隔)と動き量Mvとの比である。即ちピッチDに対して動き量Mvが大きい場合には、時間積算による像のボケ量が増大(コントラストが減少)し、空間積算による像のボケ量の増大(コントラストの減少)の影響を上回るとして、時間積算回数Pyを抑えるように係数Kが小さくなる。   On the other hand, the function Py = K · Px is determined based on the motion amount Mv. Here, the coefficient K = D / Mv, and the ratio between the pitch D between the focus detection pixel columns (for example, the vertical interval between the focus detection pixel column L1 and the adjacent focus detection pixel column L2) and the motion amount Mv. It is. That is, when the motion amount Mv is large with respect to the pitch D, the amount of blurring of the image due to time integration increases (contrast decreases), and exceeds the influence of the increase of the amount of image blurring due to spatial integration (decrease in contrast). The coefficient K is reduced so as to suppress the time integration number Py.

一方ピッチDに対して動き量Mvが小さい場合には、空間積算による像のボケ量が増大(コントラストが減少)し、時間積算による像のボケ量の増大(コントラストの減少)の影響を上回るとして、空間積算回数Pxを抑えるように係数Kが大きくなる。図16に係数Kが大きい場合(K=K0)と小さい場合(K=K1)とを示している。   On the other hand, when the motion amount Mv is smaller than the pitch D, the amount of blurring of the image due to space integration increases (contrast decreases), and exceeds the influence of the increase of the amount of image blurring due to time integration (decrease in contrast). The coefficient K is increased so as to suppress the number of times of spatial integration Px. FIG. 16 shows the case where the coefficient K is large (K = K0) and the case where it is small (K = K1).

例えば総合的な積算回数がP0であり、動き量Mvに応じた係数がK0である場合には、関数Px・Py=P0と関数Py=K0・Pxとの交点を求める。交点座標(Px0,Py0)が図16のように許容範囲内である場合には、交点座標(Px0,Py0)に対して最近接するとともに許容範囲内である整数の交点座標(Pxs,Pyt)を求め、空間積算回数をPs=Pxsとし、時間積算回数をPt=Pytとする。 For example, when the total number of times of integration is P0 and the coefficient corresponding to the motion amount Mv is K0, the intersection of the function Px · Py = P0 and the function Py = K0 · Px is obtained. When the intersection coordinates (Px0, Py0) are within the allowable range as shown in FIG. 16, integer intersection coordinates (Pxs, Pyt) that are closest to the intersection coordinates (Px0, Py0) and are within the allowable range are set. The space integration count is Ps = Pxs, and the time integration count is Pt = Pyt .

また総合的な積算回数がP0であり、動き量Mvに応じた係数がK1である場合には、関数Px・Py=P0と関数とPy=K1・Pxの交点座標(Px1,Py1)が許容範囲外になる。このような場合には交点座標(Px1,Py1)から関数Px・Py=P0に沿って許容範囲の方向に座標を移動した時に許容範囲内に入った時の座標(図16の場合は(8,P0/8))に対して最近接するとともに許容範囲内である整数の交点座標(Pxs,Pyt)を求め、空間積算回数をPs=Pxsとし、時間積算回数をPt=Pytとする。   When the total number of integrations is P0 and the coefficient corresponding to the motion amount Mv is K1, the function Px · Py = P0 and the intersection coordinates (Px1, Py1) of the function and Py = K1 · Px are allowed. Out of range. In such a case, when the coordinates are moved from the intersection coordinates (Px1, Py1) along the function Px · Py = P0 in the direction of the allowable range, the coordinates when entering the allowable range (in the case of FIG. 16, (8 , P0 / 8)) and the intersection coordinates (Pxs, Pyt) of integers that are closest to each other and within the allowable range are obtained, the number of spatial integrations is Ps = Pxs, and the number of time integrations is Pt = Pyt.

以上まとめると、空間積算回数と時間積算回数との積が一定(P0)という条件の下で、時間積算回数および空間積算回数の値が動き量に反比例した係数Kの値となるように、空間積算回数および時間積算回数を決定することになる。空間積算回数と時間積算回数との積である一定値P0は、焦点検出用データのデータ特性を表す評価値(最大値、平均値、またはコントラスト値など)が、第1の実施の形態で用いられた所定閾値T1を越えるように定められる。空間積算回数Pxおよび時間積算回数Pyは、空間積算回数Pxよりも時間積算回数Pyの方が小さくなるように、かつ空間積算回数Pxと時間積算回数Pyとの積がその一定値P0に略等しくなるように定められる。   In summary, under the condition that the product of the number of times of space integration and the number of times of time integration is constant (P0), the value of the coefficient K that is inversely proportional to the amount of motion is such that the value of the number of times of time integration and the number of times of space integration The number of integrations and the number of time integrations are determined. As the constant value P0 that is the product of the number of times of spatial integration and the number of time integrations, an evaluation value (maximum value, average value, contrast value, etc.) that represents the data characteristics of the focus detection data is used in the first embodiment. The predetermined threshold value T1 is set. The space integration number Px and the time integration number Py are set so that the time integration number Py is smaller than the space integration number Px, and the product of the space integration number Px and the time integration number Py is substantially equal to the constant value P0. It is determined to be.

図16においては係数KをピッチDと動き量Mvとの比で定義しているが、動き量Mvの複数フレームに亘る平均値をMv1として、ピッチDと動き量Mv1との比(K=D/Mv1)で定義するようにしてもよい。さらに動きベクトルの垂直方向の動き量をMv2として、係数KをピッチDと動き量Mv2との比(K=D/Mv2)で定義するようにしてもよい。さらに動きベクトルの水平方向の動き量をMv3として、係数KをピッチDと動き量Mv3との比(K=D/Mv3)で定義するようにしてもよい。   In FIG. 16, the coefficient K is defined as the ratio between the pitch D and the motion amount Mv. However, the average value of the motion amount Mv over a plurality of frames is Mv1, and the ratio between the pitch D and the motion amount Mv1 (K = D / Mv1). Furthermore, the motion amount in the vertical direction of the motion vector may be defined as Mv2, and the coefficient K may be defined by the ratio between the pitch D and the motion amount Mv2 (K = D / Mv2). Further, the horizontal motion amount of the motion vector may be Mv3, and the coefficient K may be defined by the ratio of the pitch D and the motion amount Mv3 (K = D / Mv3).

また動きベクトルの方向が水平に近づくほど、時間積算が焦点検出精度に与える影響は空間積算が焦点検出精度に与える影響に比較して大きくなるので、係数Kを垂直方向の動き量Mv2と水平方向の動き量Mv3の比(K=Mv2/Mv3)で定義するようにしてもよい。   Also, the closer the direction of the motion vector is to the horizontal, the greater the influence of time integration on the focus detection accuracy compared to the effect of spatial integration on the focus detection accuracy, so the coefficient K is set to the vertical motion amount Mv2 and the horizontal direction. May be defined by the ratio of the movement amount Mv3 (K = Mv2 / Mv3).

また動き量の検出はフレーム間の画像の動きベクトルの検出に限定されず、専用の動き検出装置を設けても良い。例えばボディ内に加速度センサを設け、加速度センサの出力をフレーム間隔に応じて時間積分することにより、1フレーム中のカメラの動き(画像ブレ)を検出するものであってもよい。   The detection of the motion amount is not limited to the detection of the motion vector of the image between frames, and a dedicated motion detection device may be provided. For example, an acceleration sensor may be provided in the body, and the movement (image blur) of the camera in one frame may be detected by time-integrating the output of the acceleration sensor according to the frame interval.

さらに上記係数Kは動き量に応じた値であることに限定されず、時間積算および空間積算に関連して焦点検出精度に影響を与える何らかの要因に応じた値であっても構わない。例えば像の水平方向の高周波数成分は時間積算により低減する可能性が高く、これに伴って焦点検出精度も低下するので、画像処理により像の水平方向の高周波数成分の量を求め、該高周波数成分の量に反比例した値として上述した係数Kを定義するようにしてもよい。   Furthermore, the coefficient K is not limited to a value according to the amount of motion, and may be a value according to some factor that affects the focus detection accuracy in relation to time integration and space integration. For example, the high-frequency component in the horizontal direction of the image is likely to be reduced by time integration, and the focus detection accuracy is also reduced accordingly. Therefore, the amount of the high-frequency component in the horizontal direction of the image is obtained by image processing, The above-described coefficient K may be defined as a value inversely proportional to the amount of frequency components.

またデフォーカス量が大きい場合は高周波数成分がボケにより小さくなっているので、該焦点検出時のデフォーカス量に比例した値として上述した係数Kを定義するようにしてもよい。   When the defocus amount is large, the high frequency component is reduced due to the blur. Therefore, the coefficient K described above may be defined as a value proportional to the defocus amount at the time of focus detection.

その他係数Kを焦点検出精度に影響を与える撮影要因、例えばレンズ駆動速度、撮影レンズの絞り値、被写界の輝度、カメラの撮影モード(静止被写体撮影モードまたは移動被写体撮影モードの別)などに応じて変更することにより、焦点検出に適した臨機応変な空間積算回数と時間積算回数の設定が可能になる。   Other factors K are used for shooting factors that affect the focus detection accuracy, such as lens driving speed, shooting lens aperture value, brightness of the field, camera shooting mode (separate shooting mode or moving subject shooting mode), etc. By changing accordingly, it is possible to set the number of spatial integration times and the number of time integration times that are suitable for focus detection.

以上本発明の第2の実施形態では焦点検出用データの生成において、空間積算回数(近接する複数の焦点検出画素のデータの積算回数)と時間積算回数(同一の焦点検出画素の過去フレームのデータとの積算回数)とを、データ特性を表す評価値(最大値、平均値、またはコントラスト値など)に応じて決定した総合的な積算回数が達成できるように、空間積算および時間積算によって生じる像のボケ(コントラスト低下)が出来る限り小さくなるように像の動き量などに基づいて決定する。したがって、データ積算に伴う不具合(コントラスト低下に伴う焦点検出精度の悪化)を最低限のレベルに押さえ込むことができ、低輝度または低コントラスト時にも快適な自動焦点調節を行なえる。   As described above, in the second embodiment of the present invention, in the generation of focus detection data, the number of times of spatial integration (the number of integration of data of a plurality of adjacent focus detection pixels) and the number of time integration (data of past frames of the same focus detection pixel). The total number of integrations determined according to the evaluation value (maximum value, average value, contrast value, etc.) representing the data characteristics, and the image generated by spatial integration and time integration. Is determined based on the amount of motion of the image so that the blur (contrast reduction) is minimized. Therefore, it is possible to suppress problems associated with data integration (deterioration of focus detection accuracy due to contrast reduction) to a minimum level, and comfortable automatic focus adjustment can be performed even at low luminance or low contrast.

図4に示す撮像素子212において、1画素に1対の光電変換部を備えた焦点検出画素311が配列されているが、1画素に1つの光電変換部(一対の光電変換部の一方)を備える第1の焦点検出画素と1画素に1つの光電変換部(一対の光電変換部の他方)を備える第2の焦点検出画素を交互に配列するような構成であってもよい。   In the imaging device 212 illustrated in FIG. 4, focus detection pixels 311 each having a pair of photoelectric conversion units are arranged in one pixel, but one photoelectric conversion unit (one of a pair of photoelectric conversion units) is provided in one pixel. The configuration may be such that the first focus detection pixels provided and the second focus detection pixels provided with one photoelectric conversion unit (the other of the pair of photoelectric conversion units) are alternately arranged.

上述した実施形態においては、図4に示す撮像素子212に配置される焦点検出画素列L1の焦点検出画素311の画素データと、焦点検出画素列L1に近接する順に1つまたは複数の焦点検出画素列L2〜Lpの焦点検出画素311の画素データとを空間積算する。図4に示す撮像素子212において、焦点検出画素列L2〜L8は、いずれも焦点検出画素列L1よりも下側に位置している。しかし、図17に示すように、焦点検出画素列L1の下側に近接する順に焦点検出画素列L2、L4、L6、L8が配置され、焦点検出画素列L1の上側に近接する順に焦点検出画素列L3、L5、L7が配置される撮像素子212であってもよい。この場合であっても、焦点検出画素列L1に近接する順、すなわち焦点検出画素列L2〜L8の順に空間積算が行なわれる。   In the embodiment described above, the pixel data of the focus detection pixel 311 of the focus detection pixel column L1 arranged in the image sensor 212 shown in FIG. 4 and one or more focus detection pixels in the order of proximity to the focus detection pixel column L1. The pixel data of the focus detection pixels 311 in the columns L2 to Lp is spatially integrated. In the image sensor 212 shown in FIG. 4, the focus detection pixel rows L2 to L8 are all located below the focus detection pixel row L1. However, as shown in FIG. 17, focus detection pixel rows L2, L4, L6, and L8 are arranged in the order of approaching the lower side of the focus detection pixel row L1, and the focus detection pixels in the order of approaching the upper side of the focus detection pixel row L1. The imaging device 212 in which the rows L3, L5, and L7 are arranged may be used. Even in this case, spatial integration is performed in the order of proximity to the focus detection pixel column L1, that is, in the order of the focus detection pixel columns L2 to L8.

上述した実施形態においては、図4に示す撮像素子212に配置される焦点検出画素列L1の焦点検出画素311の画素データと、焦点検出画素列L1に近接する順に1つまたは複数の焦点検出画素列L2〜Lpの焦点検出画素311の画素データとを空間積算する。このとき、(5)式に示すように、水平方向の並び順に付された変数nが同一の位置に配置されている焦点検出画素どうし、すなわち垂直方向に隣接した焦点検出画素311どうしの同一種類の光電変換部どうしが出力するデータについて行なわれる空間積算によって、データB1(s,n,p)が算出される。   In the embodiment described above, the pixel data of the focus detection pixel 311 of the focus detection pixel column L1 arranged in the image sensor 212 shown in FIG. 4 and one or more focus detection pixels in the order of proximity to the focus detection pixel column L1. The pixel data of the focus detection pixels 311 in the columns L2 to Lp is spatially integrated. At this time, as shown in Expression (5), the same type of focus detection pixels 311 adjacent to each other in the vertical direction, that is, the variables n assigned in the horizontal order are arranged at the same position. Data B1 (s, n, p) is calculated by spatial integration performed on the data output by the photoelectric conversion units.

しかし、(19)式に示すように、焦点検出画素列L1に近接する順に空間積算される焦点検出画素列Lpが焦点検出画素列L1から離れるにつれて、すなわち変数pが大きくなるにつれて、水平方向の並び順に付された変数nが1つずつシフトした位置に配置されている焦点検出画素どうし、すなわち斜め方向に隣接した焦点検出画素311どうしの同一種類の光電変換部どうしが出力するデータについて空間積算が行なわれることとしてもよい。
B1(s,n,p)=B1(s,n,p−1)+B(s,n+p−1,p)
s=1,2 n=1〜N p=1〜8 ・・・(19)
However, as shown in the equation (19), as the focus detection pixel column Lp spatially integrated in the order of proximity to the focus detection pixel column L1 moves away from the focus detection pixel column L1, that is, as the variable p increases, Spatial integration of the data output by the focus detection pixels arranged at positions where the variables n assigned in the arrangement order are shifted one by one, that is, between the photoelectric conversion units of the same type between the focus detection pixels 311 adjacent in the oblique direction. May be performed.
B1 (s, n, p) = B1 (s, n, p-1) + B (s, n + p-1, p)
s = 1, 2 n = 1 to N p = 1 to 8 (19)

あるいは、(20)式および(21)式に示すように、焦点検出画素列Lpが奇数番目の焦点検出画素列であるとき、すなわち変数pが奇数であるときと、焦点検出画素列Lpが偶数番目の焦点検出画素列であるとき、すなわち変数pが偶数であるときとで、水平方向の並び順に付された変数nが1つシフトした位置に配置されている焦点検出画素どうし、すなわち千鳥状に隣接した焦点検出画素311どうしの同一種類の光電変換部どうしが出力するデータについて空間積算が行なわれることとしてもよい。
B1(s,n,p)=B1(s,n,p−1)+B(s,n,p)
s=1,2 n=1〜N p=1,3,5,7 ・・・(20)
B1(s,n,p)=B1(s,n,p−1)+B(s,n+1,p)
s=1,2 n=1〜N p=2,4,6,8 ・・・(21)
Alternatively, as shown in the equations (20) and (21), when the focus detection pixel column Lp is an odd-numbered focus detection pixel column, that is, when the variable p is an odd number, the focus detection pixel column Lp is an even number. The focus detection pixels arranged at the position where the variable n assigned in the order of arrangement in the horizontal direction is shifted by one when it is the first focus detection pixel row, that is, when the variable p is an even number, that is, staggered Spatial integration may be performed on data output by photoelectric conversion units of the same type between focus detection pixels 311 adjacent to each other.
B1 (s, n, p) = B1 (s, n, p-1) + B (s, n, p)
s = 1, 2 n = 1 to N p = 1, 3, 5, 7 (20)
B1 (s, n, p) = B1 (s, n, p-1) + B (s, n + 1, p)
s = 1, 2 n = 1 to N p = 2, 4, 6, 8 (21)

上述した実施形態における撮像素子212では撮像画素がベイヤー配列の色フィルタを備えた例を示したが、色フィルタの構成や配列はこれに限定されることはなく、補色フィルタ(緑:G、イエロー:Ye、マゼンタ:Mg、シアン:Cy)の配列やベイヤー配列以外の配列にも本発明を適用することができる。   In the imaging element 212 in the above-described embodiment, an example in which the imaging pixel includes a Bayer color filter is shown, but the configuration and arrangement of the color filter are not limited to this, and a complementary color filter (green: G, yellow). : Ye, magenta: Mg, cyan: Cy) and other arrangements other than the Bayer arrangement.

上述した実施形態においては撮像素子上において撮像画素と焦点検出画素が混在している。光路中にミラーを配置して撮像画素のみからなる撮像素子と焦点検出画素のみからなる焦点検出素子(イメージセンサ)に光束を分離するような構成であれば、その焦点検出素子に本発明を適用することができる。   In the above-described embodiment, the imaging pixels and the focus detection pixels are mixed on the imaging element. The present invention is applied to the focus detection element as long as the configuration is such that a mirror is arranged in the optical path and the light flux is separated into an image sensor consisting of only the imaging pixels and a focus detection element (image sensor) consisting of only the focus detection pixels. can do.

なお、撮像装置としては、上述したようなカメラボディに交換レンズが装着される構成のデジタルスチルカメラに限定されない。例えばレンズ一体型のデジタルスチルカメラ、フィルムスチルカメラ、あるいはビデオカメラにも本発明を適用することができる。さらには、携帯電話などに内蔵される小型カメラモジュール、監視カメラやロボット用の視覚認識装置、車載カメラなどにも適用できる。   Note that the imaging apparatus is not limited to a digital still camera having a configuration in which an interchangeable lens is attached to the camera body as described above. For example, the present invention can be applied to a lens-integrated digital still camera, film still camera, or video camera. Furthermore, the present invention can be applied to a small camera module built in a mobile phone, a surveillance camera, a visual recognition device for a robot, an in-vehicle camera, and the like.

10 マイクロレンズ、11,13,14 光電変換部、15 素子分離領域、
71 撮影光束、73,74 焦点検出光束、90 射出瞳、91 光軸、
93,94 測距瞳、95 領域、101 焦点検出位置、
201 デジタルスチルカメラ、202 交換レンズ、203 カメラボディ、
204 マウント部、206 レンズ駆動制御装置、
208 ズーミング用レンズ、209 レンズ、210 フォーカシング用レンズ、
211 絞り、212 撮像素子、213 電気接点、214 ボディ駆動制御装置、
215 液晶表示素子駆動回路、216 液晶表示素子、217 接眼レンズ、
219 メモリカード、220 撮像素子制御部、221 バッファメモリ、
222 CPU、223 内部メモリ、
310 撮像画素、311 焦点検出画素
10 microlens, 11, 13, 14 photoelectric conversion unit, 15 element isolation region,
71 shooting light beam, 73, 74 focus detection light beam, 90 exit pupil, 91 optical axis,
93, 94 Distance pupil, 95 area, 101 focus detection position,
201 digital still camera, 202 interchangeable lens, 203 camera body,
204 mount unit, 206 lens drive control device,
208 zooming lens, 209 lens, 210 focusing lens,
211 diaphragm 212 imaging device 213 electrical contact 214 body drive control device
215 liquid crystal display element driving circuit, 216 liquid crystal display element, 217 eyepiece,
219 Memory card, 220 Image sensor control unit, 221 Buffer memory,
222 CPU, 223 internal memory,
310 imaging pixels, 311 focus detection pixels

Claims (16)

光学系を透過した光を検出し、第1の焦点検出信号と第2の焦点検出信号とを出力する第1の方向に配置された複数の焦点検出画素を有する焦点検出部が、前記第1の方向とは異なる第2の方向に第1の数だけ複数設けられる撮像素子と、
前記第1の数の焦点検出部において前記第2の方向に配置された焦点検出画素から出力された前記第1の焦点検出信号同士を加算した第1の加算値と、前記第1の数の焦点検出部において前記第2の方向に配置された前記焦点検出画素から出力された前記第2の焦点検出信号同士を加算した第2の加算値とを算出する加算部と、
前記第1の加算値と前記第2の加算値とにより前記光学系の合焦状態を検出する合焦状態検出部とを備え
前記加算部は、前記第1の加算値および前記第2の加算値に基づく第1積算値が閾値よりも大きくなるまで、前記第1の数を上限とする第2の数の前記第1の焦点検出信号同士および前記第2の数の前記第2の焦点検出信号同士を加算する焦点検出装置。
A focus detection unit having a plurality of focus detection pixels arranged in a first direction for detecting light transmitted through the optical system and outputting a first focus detection signal and a second focus detection signal . A plurality of first imaging elements provided in a second direction different from the first direction ;
A first addition value obtained by adding the first of the first focus detection signals respectively outputted from the arranged focus detection pixels in the second direction in the focus detection unit number, the first number an adder for calculating a second sum value obtained by adding the second focus detection signals respectively output from the focus detection pixels arranged in the second direction in the focus detection unit,
An in-focus state detection unit that detects an in-focus state of the optical system based on the first addition value and the second addition value ;
The adding unit has a second number up to the first number until the first integrated value based on the first added value and the second added value is greater than a threshold value. focus detection signal with each other and the second number of the second focus detection signal between the focus detecting device you adds.
請求項1に記載の焦点検出装置において、
前記撮像素子は焦点検出領域を有し、
前記第1の数の焦点検出部は前記焦点検出領域に設けられる焦点検出装置。
The focus detection apparatus according to claim 1,
The image sensor has a focus detection area,
The focus detection unit of the first number of the focus detection device are found disposed in the focus detection area.
請求項2に記載の焦点検出装置において、
前記第1の加算値および前記第2の加算値についての時間積算値を算出する時間積算部をさらに備え、
前記第1数の焦点検出部はそれぞれ、前記第1の焦点検出信号と前記第2の焦点検出信号とを繰り返し出力し、
記加算部は、前記第1数の焦点検出部が出力する前記第1の焦点検出信号と前記第2の焦点検出信号とをそれぞれ積算して前記第1の加算値および前記第2の加算値を繰り返し算出し、
前記時間積算部は、前記加算部によって前記第1の加算値および前記第2の加算値が繰り返し算出されて得られる第3の数の前記第1の加算値および前記第2の加算値を積算することによって、前記時間積算値を算出し、
前記合焦状態検出部は、前記第1の加算値および前記第2の加算値と前記第1の加算値および前記第2の加算値についての前記時間積算値とのうちのいずれか一方に基づいて前記合焦状態を検出する焦点検出装置。
The focus detection apparatus according to claim 2,
A time integration unit for calculating a time integration value for the first addition value and the second addition value;
Each of the focus detecting portion of the first number, and wherein the first focus detection signal the second focus detection signal Ri returns output Repetitive,
Before SL addition unit, the first number focus detection unit is the first focus detection signal and the second focus detection signal and the by integrating each of the first sum value and said second output from the Calculate the added value repeatedly,
The time integration unit integrates a third number of the first addition value and the second addition value obtained by repeatedly calculating the first addition value and the second addition value by the addition unit. To calculate the time integrated value,
The focus state detection unit is based on one of the first addition value, the second addition value, and the time integration value for the first addition value and the second addition value. A focus detection device for detecting the in-focus state.
請求項3に記載の焦点検出装置において、
焦点検出部は、前記複数の焦点検出画素が前記第1の方向に配列されることによって構成され、光電変換により第1および第2の焦点検出光束による第1および第2の像に基づく前記第1の焦点検出信号と前記第2の焦点検出信号とを繰り返し出力する焦点検出装置。
The focus detection apparatus according to claim 3,
Each focus detection unit is configured by arranging the plurality of focus detection pixels in the first direction, and is based on the first and second images by the first and second focus detection light beams by photoelectric conversion . first focus detection signal and the second focus detection signal and the focus detection device that outputs, repeatedly a.
請求項4に記載の焦点検出装置において、
前記合焦状態検出部が前記時間積算値に基づいて前記合焦状態を検出するときは、前記第1の焦点検出信号と前記第2の焦点検出信号とに基づく評価値が前記閾値よりも大きくなるように前記第2の数と前記第3の数とが定まる焦点検出装置。
The focus detection apparatus according to claim 4,
When the focusing state detection unit detects the focus state based on the time integration value, evaluation value based on the said first focus detection signal the second focus detection signal is greater than said threshold value The focus detection apparatus in which the second number and the third number are determined as follows.
請求項5に記載の焦点検出装置において、
前記合焦状態検出部が前記第1の加算値および前記第2の加算値に基づいて前記合焦状態を検出するとき、前記評価値は前記第1の加算値および前記第2の加算値に基づく前記第1積算値であって、前記第1積算値が前記閾値よりも大きくなるように前記第2の数が前記第1の数を超過しない範囲で定まるとともに前記第3の数が0に定まり、前記合焦状態検出部が前記時間積算値に基づいて前記合焦状態を検出するときは、前記評価値は前記時間積算値に基づく第2積算値であって、前記第2積算値が前記閾値よりも大きくなるように前記第2の数が前記第1の数に定まるとともに前記第3の数が定まる焦点検出装置。
The focus detection apparatus according to claim 5,
When the in-focus state detection unit detects the in-focus state based on the first addition value and the second addition value, the evaluation value becomes the first addition value and the second addition value. a first integration value based, said third number with defined range, wherein the first integrated value is the second number to be greater than before Ki閾 value does not exceed the number of the first When the in-focus state detection unit detects the in-focus state based on the time integration value, the evaluation value is a second integration value based on the time integration value, and the second integration value is determined. value before Ki閾 value the third focus detection device number is determined together with determined number the second number the first to be greater than.
請求項6に記載の焦点検出装置において、
前記各焦点検出部が繰り返し出力する前記第1の焦点検出信号と前記第2の焦点検出信号とを記憶する記憶装置をさらに備え、
前記加算部は、前記記憶装置によって記憶されている前記第1の焦点検出信号と前記第2の焦点検出信号とをそれぞれ加算して前記第1の加算値および前記第2の加算値を算出する焦点検出装置。
The focus detection apparatus according to claim 6,
Further comprising a storage device for storing a first focus detection signal and the second focus detection signals each focus detecting unit repeatedly outputs,
The adding unit adds the first focus detection signal and the second focus detection signal stored in the storage device to calculate the first addition value and the second addition value, respectively. Focus detection device.
請求項6に記載の焦点検出装置において、
前記各焦点検出部が出力する前記第1の焦点検出信号と前記第2の焦点検出信号とに基づいて前記加算部によって繰り返し算出された前記第1の加算値および前記第2の加算値を記憶する記憶装置をさらに備え、
前記時間積算部は、前記記憶装置によって記憶されている前記第3の数の前記第1の加算値および前記第2の加算値を加算することによって、前記時間積算値を算出する焦点検出装置。
The focus detection apparatus according to claim 6,
The first addition value and the second addition value that are repeatedly calculated by the addition unit based on the first focus detection signal and the second focus detection signal output by each of the focus detection units are stored. Further comprising a storage device,
The focus detection device, wherein the time integration unit calculates the time integration value by adding the third addition value and the second addition value of the third number stored in the storage device.
請求項6に記載の焦点検出装置において、
記時間積算部によって算出された前記時間積算値を記憶する記憶装置をさらに備え、
前記合焦状態検出部は、前記時間積算値に基づいて前記合焦状態を検出するとき、前記記憶装置によって記憶された前記時間積算値に基づいて前記合焦状態を検出する焦点検出装置。
The focus detection apparatus according to claim 6,
Further comprising a storage device for storing said time integrated value calculated by the previous SL-time integrator,
The focus detection device detects the focus state based on the time integrated value stored in the storage device when the focus state detection unit detects the focus state based on the time integrated value.
請求項5に記載の焦点検出装置において、
前記撮像素子上に形成される像のフレーム間の動き量を検出する動き量検出部をさらに備え、
前記合焦状態検出部が前記時間積算値に基づいて前記合焦状態を検出するときは、前記動き量が大きいほど前記第2の数よりも前記第3の数の方が小さくなるように、かつ前記第2の数と前記第3の数との積が前記評価値と前記閾値とに応じた一定値に略等しくなるように、前記第2の数と前記第3の数とが定まる焦点検出装置。
The focus detection apparatus according to claim 5,
A motion amount detection unit for detecting a motion amount between frames of an image formed on the image sensor;
When the in-focus state detection unit detects the in-focus state based on the time integrated value, the third number is smaller than the second number as the amount of movement is larger. and the like product of the second number and said third number is substantially equal to a constant value corresponding to said evaluation value and the previous Ki閾 value, said second number of said third number Fixed focus detection device.
請求項6〜9のいずれか1項に記載の焦点検出装置において、
前記第1積算値ならびに前記第2積算値は、前記第1の加算値および前記第2の加算値の平均値ならびに前記時間積算値の平均値と、前記第1の加算値および前記第2の加算値の最大値ならびに前記時間積算値の最大値と、前記第1の加算値および前記第2の加算値の最大値および最小値の差ならびに前記時間積算値の最大値および最小値の差とのうちのいずれか1つに対応する焦点検出装置。
In the focus detection apparatus according to any one of claims 6 to 9,
The first integrated value and the second integrated value are an average value of the first added value and the second added value, an average value of the time integrated value, the first added value, and the second added value. The maximum value of the addition value and the maximum value of the time integration value, the difference between the maximum value and the minimum value of the first addition value and the second addition value, and the difference between the maximum value and the minimum value of the time integration value A focus detection device corresponding to any one of the above.
請求項10に記載の焦点検出装置において、
前記評価値は、前記第1の焦点検出信号と前記第2の焦点検出信号との平均値と、前記第1の焦点検出信号と前記第2の焦点検出信号との最大値と、前記第1の焦点検出信号と前記第2の焦点検出信号との最大値および最小値の差とのうちのいずれか1つに対応する焦点検出装置。
The focus detection apparatus according to claim 10, wherein
The evaluation value includes an average value of the first focus detection signal and the second focus detection signal, a maximum value of the first focus detection signal and the second focus detection signal, and the first value. The focus detection apparatus corresponding to any one of the difference between the maximum value and the minimum value of the focus detection signal of the second focus detection signal and the second focus detection signal.
請求項4〜12のいずれか1項に記載の焦点検出装置において、
前記複数の焦点検出画素の各々は、前記第1および第2の焦点検出光束を透過するマイクロレンズと、前記第1の方向に並んで、前記第1および第2の焦点検出光束を受光して前記光電変換を行う第1および第2の光電変換部とを有し、
前記第1および第2の光電変換部と、前記第1および第2の焦点検出光束が通る、前記光学系の射出瞳において前記第1の方向と平行に並んだ第1および第2の領域とが、前記マイクロレンズにより互いに共役関係となる焦点検出装置。
In the focus detection apparatus according to any one of claims 4 to 12,
Each of the plurality of focus detection pixel includes a microlens transmitted through the first and second focus detection light fluxes, aligned in the first direction, by receiving the first and second focus detection light fluxes A first and a second photoelectric conversion unit for performing the photoelectric conversion;
The first and second photoelectric conversion units, and first and second regions arranged in parallel with the first direction in an exit pupil of the optical system through which the first and second focus detection light beams pass. However, the focus detection device is conjugated with each other by the microlens.
請求項13に記載の焦点検出装置において、
前記光学系を通過する被写体からの撮影光束を受光して光電変換により被写体像に基づく被写体像信号を出力する複数の撮像画素が、前記複数の焦点検出画素と混在して前記撮像素子に配置される焦点検出装置。
The focus detection apparatus according to claim 13.
The plurality of imaging pixels that output the object image signals based on the subject image by photoelectric conversion by receiving photographing light flux from a subject passing through the optical system, disposed in the imaging element mixed with the plurality of focus detection pixels Focus detection device.
請求項4に記載の焦点検出装置において、
前記各焦点検出部を構成する前記複数の焦点検出画素は、前記光学系の射出瞳のうちの前記第1の方向と平行に並ぶ第1および第2の領域を通る前記第1および第2の焦点検出光束を受光し、
前記第1数の焦点検出部は互いに並置される焦点検出装置。
The focus detection apparatus according to claim 4,
Wherein the plurality of focus detection pixels constituting the respective focus detection unit, the first direction and the first and second through the first and second areas arranged in parallel of the exit pupil of the optical system Receives the focus detection beam,
The focus detection unit of the first number of the focus detection device are juxtaposed to each other.
請求項1〜15のいずれか1項に記載の焦点検出装置と、
前記合焦状態検出部によって検出された前記合焦状態に基づき前記光学系を合焦位置に駆動させる駆動部と、
前記光学系が前記合焦位置に位置するとき、前記光学系を通過する被写体からの撮影光束に基づき画像データを取得する取得部とを備える撮像装置。
The focus detection apparatus according to any one of claims 1 to 15,
A drive unit that drives the optical system to a focus position based on the focus state detected by the focus state detection unit;
An imaging apparatus comprising: an acquisition unit that acquires image data based on a photographing light beam from a subject passing through the optical system when the optical system is located at the in-focus position.
JP2016105305A 2016-05-26 2016-05-26 Focus detection apparatus and imaging apparatus Active JP6222278B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016105305A JP6222278B2 (en) 2016-05-26 2016-05-26 Focus detection apparatus and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016105305A JP6222278B2 (en) 2016-05-26 2016-05-26 Focus detection apparatus and imaging apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2012217303A Division JP5942757B2 (en) 2012-09-28 2012-09-28 Focus detection apparatus and imaging apparatus

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2017195400A Division JP2018028677A (en) 2017-10-05 2017-10-05 Focus detector and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2016177314A JP2016177314A (en) 2016-10-06
JP6222278B2 true JP6222278B2 (en) 2017-11-01

Family

ID=57069232

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016105305A Active JP6222278B2 (en) 2016-05-26 2016-05-26 Focus detection apparatus and imaging apparatus

Country Status (1)

Country Link
JP (1) JP6222278B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5202289B2 (en) * 2008-12-25 2013-06-05 キヤノン株式会社 Imaging device
JP5565105B2 (en) * 2010-05-31 2014-08-06 株式会社ニコン Imaging device

Also Published As

Publication number Publication date
JP2016177314A (en) 2016-10-06

Similar Documents

Publication Publication Date Title
JP5942757B2 (en) Focus detection apparatus and imaging apparatus
JP5454223B2 (en) camera
JP5565105B2 (en) Imaging device
JP2008268403A (en) Focus detection device, focus detection method, and imaging apparatus
JP5699480B2 (en) Focus detection device and camera
US9602716B2 (en) Focus-detection device, method for controlling the same, and image capture apparatus
JP5609232B2 (en) Imaging device
JP2021184101A (en) Focus detector
JP5600941B2 (en) Focus detection apparatus and imaging apparatus
JP5228777B2 (en) Focus detection apparatus and imaging apparatus
JP5338112B2 (en) Correlation calculation device, focus detection device, and imaging device
JP2018028677A (en) Focus detector and imaging apparatus
JP6222278B2 (en) Focus detection apparatus and imaging apparatus
JP5338113B2 (en) Correlation calculation device, focus detection device, and imaging device
JP5332384B2 (en) Correlation calculation device, focus detection device, and imaging device
JP2009282018A (en) Correlation calculation method, correlation calculator, focus detector, and imaging apparatus
JP4968009B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP4968010B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP5338118B2 (en) Correlation calculation device, focus detection device, and imaging device
JP6631002B2 (en) Imaging device
JP2019095804A (en) Focus detection device and camera

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170313

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170905

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170918

R150 Certificate of patent or registration of utility model

Ref document number: 6222278

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250