JP2013254166A - Imaging device and control method of the same - Google Patents

Imaging device and control method of the same Download PDF

Info

Publication number
JP2013254166A
JP2013254166A JP2012131119A JP2012131119A JP2013254166A JP 2013254166 A JP2013254166 A JP 2013254166A JP 2012131119 A JP2012131119 A JP 2012131119A JP 2012131119 A JP2012131119 A JP 2012131119A JP 2013254166 A JP2013254166 A JP 2013254166A
Authority
JP
Japan
Prior art keywords
focus detection
pixel
subject
focus
contrast
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012131119A
Other languages
Japanese (ja)
Other versions
JP5963552B2 (en
Inventor
Hideyuki Hamano
英之 浜野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012131119A priority Critical patent/JP5963552B2/en
Publication of JP2013254166A publication Critical patent/JP2013254166A/en
Application granted granted Critical
Publication of JP5963552B2 publication Critical patent/JP5963552B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an imaging device capable of performing focus detection at further high speed with high accuracy in performing hybrid focus detection by a phase difference AF detection method and a contrast AF detection method.SOLUTION: An imaging device includes third control means for switching between phase difference AF and contrast AF by using subject information extracted from a second pixel signal output from an imaging pixel for detecting a plurality of light beams passing through a pupil area of an imaging optical system having a focus lens.

Description

本発明は、デジタルスチルカメラ、デジタルビデオカメラ、等の撮像装置及びその制御方法に関する。特に、コントラストAFと位相差AFを用いたハイブリッドAF検出方式を用いた撮像装置及びその制御方法に関する。   The present invention relates to an imaging apparatus such as a digital still camera and a digital video camera, and a control method thereof. In particular, the present invention relates to an image pickup apparatus using a hybrid AF detection method using contrast AF and phase difference AF, and a control method thereof.

撮像装置の焦点検出調節方法の一般的な方式として、コントラストAFと位相差AFとがある。コントラストAFはビデオカメラやデジタルスチルカメラで多く用いられるAF方式であり、撮像素子が焦点検出用センサとして用いられるものである。   As a general method of the focus detection adjustment method of the imaging apparatus, there are contrast AF and phase difference AF. Contrast AF is an AF method often used in video cameras and digital still cameras, and an image sensor is used as a focus detection sensor.

撮像素子の出力信号、特に高周波成分のコントラスト情報に着目し、そのAF評価値が最も大きくなるフォーカスレンズの位置を合焦位置とするAF方式である。しかしながら、山登り方式とも言われるように、フォーカスレンズの光軸方向の位置を微少量だけ移動させながら評価値を求め、その評価値が結果的に最大であったとわかるまで移動させることが必要であるため、高速な焦点検出動作には不向きとされている。   Focusing on the output signal of the image sensor, particularly the contrast information of the high-frequency component, the AF method uses the position of the focus lens where the AF evaluation value is the largest as the in-focus position. However, as it is also called a hill-climbing method, it is necessary to obtain an evaluation value while moving the position of the focus lens in the optical axis direction by a small amount and move it until it is understood that the evaluation value is the maximum as a result. Therefore, it is not suitable for high-speed focus detection operation.

一方、位相差AF検出方式の焦点検出は、一眼レフカメラに多く用いられ、自動焦点検出(AutoFocus:AF)一眼レフカメラの実用化に貢献した技術である。例えば、デジタル一眼レフカメラで、位相差AF検出方式は、2次結像光学系からなる焦点検出手段により行われる。焦点検出手段は、撮影光学系の射出瞳を通過した光束を2つの領域に分割する瞳分割手段を備え、2分割された光束はミラーボックス内に配置された光路分割手段を介して、2次結像光学系により一組の焦点検出用センサ上に結像する。   On the other hand, focus detection by the phase difference AF detection method is frequently used in single-lens reflex cameras, and is a technology that contributes to the practical application of automatic focus detection (AutoFocus: AF) single-lens reflex cameras. For example, in a digital single-lens reflex camera, the phase difference AF detection method is performed by a focus detection unit including a secondary imaging optical system. The focus detection unit includes a pupil division unit that divides the light beam that has passed through the exit pupil of the photographing optical system into two regions, and the divided light beam is second-order through an optical path division unit disposed in the mirror box. An image is formed on a set of focus detection sensors by an imaging optical system.

そして、その焦点検出用センサの受光量に応じて出力される信号のずれ量すなわち瞳分割方向の相対的位置ずれ量を検出することで、撮影光学系のピント方向のずれ量を直接的に求める。従って、焦点検出用センサにより一度蓄積動作を行なえば、ピントずれの量と方向が同時に得られ、高速な焦点調節動作が可能となる。焦点検出した後の撮影時には、光路分割手段を撮影光束外へ退避させ、撮像素子への露光を行い撮影画像を取得する。   Then, by detecting the shift amount of the signal output according to the received light amount of the focus detection sensor, that is, the relative positional shift amount in the pupil division direction, the shift amount in the focus direction of the photographing optical system is directly obtained. . Therefore, once the accumulation operation is performed by the focus detection sensor, the amount and direction of the focus shift can be obtained at the same time, and a high-speed focus adjustment operation is possible. At the time of photographing after focus detection, the optical path dividing means is retracted out of the photographing light beam, and the image sensor is exposed to obtain a photographed image.

また、撮像素子に位相差AF機能を付与し、背面液晶などの表示手段でリアルタイムに画像を確認する電子ファインダ観察時や動画撮影時でも高速のAFを実現する技術が特許文献1に開示されている。例えば、撮像素子の一部の受光用画素において、オンチップマイクロレンズの光軸に対して受光部の感度領域を偏心させて瞳分割機能を付与する技術が開示されている。   Further, Patent Document 1 discloses a technique for providing a phase difference AF function to an image pickup device and realizing high-speed AF even in electronic viewfinder observation or moving image shooting in which an image is confirmed in real time by a display means such as a rear liquid crystal. Yes. For example, a technique for providing a pupil division function by decentering a sensitivity region of a light receiving unit with respect to an optical axis of an on-chip microlens in a part of light receiving pixels of an image sensor is disclosed.

これらの画素を焦点検出用画素とし、撮影用画素群の間に所定の間隔で配置することで、撮像面位相差AF検出を行なう。ここで、焦点検出用画素が配置された箇所は撮影用画素の欠損部に相当するため、周辺の撮影用画素情報から補間して画像情報を生成している。この例によると、撮像面で撮像面位相差AF検出を行えるので、電子ファインダ観察時や動画撮影時でも、高速かつ高精度な焦点検出を行うことができる。   These pixels are used as focus detection pixels, and are arranged at predetermined intervals between the photographing pixel groups, thereby performing imaging surface phase difference AF detection. Here, the location where the focus detection pixels are arranged corresponds to a missing portion of the shooting pixels, and therefore, image information is generated by interpolation from surrounding shooting pixel information. According to this example, since imaging surface phase difference AF detection can be performed on the imaging surface, high-speed and high-precision focus detection can be performed even when observing an electronic finder or shooting a moving image.

近年、コントラストAFと位相差AFのお互いの長所を活かした方式として、ハイブリッドAFも提案されている。特許文献2では、位相差AFの焦点検出結果により、フォーカスレンズの調節を行い、合焦位置近傍では、コントラストAFに変更することにより、高速かつ、高精度な焦点検出を可能としている。   In recent years, hybrid AF has also been proposed as a method utilizing the mutual advantages of contrast AF and phase difference AF. In Patent Document 2, the focus lens is adjusted based on the focus detection result of the phase difference AF, and the focus detection is changed to the contrast AF near the in-focus position, thereby enabling high-speed and high-precision focus detection.

また、特許文献2では、位相差AFの焦点検出に用いる信号の特徴に応じて、焦点検出結果の精度が変わることを利用している。例えば、位相差AFで、信号の信頼性が高く、高精度な焦点検出結果が得られた場合には、より合焦位置に近づくまで、位相差AFの焦点検出結果を利用して、焦点調節を行う。それにより、更なる高速化が実現できる。   Japanese Patent Application Laid-Open No. 2004-26883 utilizes the fact that the accuracy of the focus detection result changes according to the characteristics of the signal used for the focus detection of the phase difference AF. For example, when the phase difference AF provides a highly reliable focus detection result with high signal reliability, focus adjustment is performed using the focus detection result of the phase difference AF until it is closer to the in-focus position. I do. Thereby, further speedup can be realized.

特開2009−003122号公報JP 2009-003122 A 特開2010−256824号公報JP 2010-256824 A

しかしながら、上述の特許文献1、2に開示された従来技術では、高速化と高精度化の両立が困難な場合があった。特許文献1では、位相差AFの焦点検出に用いる信号から、位相差AFの焦点検出精度を、見積もるよう構成されている。しかし、位相差AFの焦点検出精度は、様々な要因の影響を受けるため、位相差AF検出方式の焦点検出に用いる信号だけでは、焦点検出精度の見積もり精度は低くなる可能性があった。   However, in the conventional techniques disclosed in Patent Documents 1 and 2 described above, it is sometimes difficult to achieve both high speed and high accuracy. Patent Document 1 is configured to estimate the focus detection accuracy of the phase difference AF from the signal used for the focus detection of the phase difference AF. However, since the focus detection accuracy of the phase difference AF is affected by various factors, there is a possibility that the estimation accuracy of the focus detection accuracy is lowered only by a signal used for focus detection in the phase difference AF detection method.

また、特許文献2では、合焦位置近傍では、高精度な焦点調節を目的として、コントラストAFの焦点検出結果で、焦点調節をするよう構成されている。しかし、コントラストAFは、被写体や撮影環境によっては、十分な焦点検出精度が得られない場合があった。   In Patent Document 2, the focus adjustment is performed with the focus detection result of contrast AF for the purpose of high-precision focus adjustment near the in-focus position. However, contrast AF may not have sufficient focus detection accuracy depending on the subject and the shooting environment.

そこで、本発明の目的は、位相差AFとコントラストAFのハイブリッド焦点検出を行う際に、より高速で高精度な焦点検出を行うことを可能にした焦点検出装置を有する撮像装置を提供することである。   SUMMARY OF THE INVENTION An object of the present invention is to provide an imaging apparatus having a focus detection device that can perform high-speed and high-precision focus detection when performing hybrid focus detection of phase difference AF and contrast AF. is there.

上記目的を達成するために、本発明では、フォーカスレンズを有する撮影光学系により結像された被写体像を撮像する複数の撮影用画素と前記複数の撮影用画素内に離散的に配置され焦点検出用画素を有する撮像素子と、前記撮影光学系の異なる瞳領域を通過する複数の光束を検出する前記焦点検出用画素から出力される第1の画素信号に基づいて位相差AFを行う第1の制御手段と、前記撮影光学系の瞳領域を通過する複数の光束を検出する前記撮影用画素から出力される第2の画素信号に基づいてコントラストAFを行う第2の制御手段と、前記第2の画像信号から被写体情報を抽出する被写体情報抽出手段と、を有する撮像装置であって、
前記第2の画像信号から抽出された被写体情報を用いて、前記位相差AFと前記コントラストAFを切換える第3の制御手段を有することを特徴とする。
In order to achieve the above object, in the present invention, a plurality of shooting pixels for capturing a subject image formed by a shooting optical system having a focus lens, and focus detection that is discretely arranged in the plurality of shooting pixels. A phase difference AF based on a first pixel signal output from an imaging element having a pixel for detection and a focus detection pixel for detecting a plurality of light beams passing through different pupil regions of the imaging optical system. Control means; second control means for performing contrast AF based on a second pixel signal output from the imaging pixel that detects a plurality of light fluxes passing through a pupil region of the imaging optical system; and Subject information extraction means for extracting subject information from the image signal of
It has a third control means for switching between the phase difference AF and the contrast AF using subject information extracted from the second image signal.

本発明によれば、位相差AFとコントラストAFのハイブリッドAF検出方式を行う際に、より高速で高精度な焦点検出を行うことを可能にした焦点検出装置を有する撮像装置を提供することができる。   According to the present invention, it is possible to provide an imaging apparatus having a focus detection apparatus that can perform focus detection with higher speed and higher accuracy when performing a hybrid AF detection method of phase difference AF and contrast AF. .

本実施例の焦点検出処理を説明するためのフローチャートである。It is a flowchart for demonstrating the focus detection process of a present Example. 本実施例のデジタルカメラのブロック図である。It is a block diagram of the digital camera of a present Example. 図1の撮像面位相差AFにおけるフォーカスレンズの駆動を説明する図である。It is a figure explaining the drive of the focus lens in the imaging surface phase difference AF of FIG. 撮像素子上の一部の光学像が形成されている様子を示した図である。It is the figure which showed a mode that the one part optical image on an image pick-up element was formed. 図4に示した光学像により得られる出力信号を示した図である。It is the figure which showed the output signal obtained by the optical image shown in FIG. TVAF制御時のレンズ駆動量のステップ幅の設定について説明する図である。It is a figure explaining the setting of the step width of the lens drive amount at the time of TVAF control. TVAF制御による焦点調節処理サブルーチンのフローを示した図である。It is the figure which showed the flow of the focus adjustment process subroutine by TVAF control. TVAF制御を説明する図である。It is a figure explaining TVAF control. 撮像面位相差AF制御による焦点調節処理サブルーチンのフローを示した図である。It is the figure which showed the flow of the focus adjustment process subroutine by an imaging surface phase difference AF control.

(実施例1)
以下、本発明の実施例1では、本発明の撮像装置をレンズ交換可能な一眼レフタイプのデジタルカメラに適用した例について説明する。
Example 1
Hereinafter, in Embodiment 1 of the present invention, an example in which the imaging apparatus of the present invention is applied to a single-lens reflex digital camera capable of exchanging lenses will be described.

図2は本実施例のデジタルカメラのブロック図である。本実施例のデジタルカメラは交換レンズ式一眼レフカメラであり、レンズユニット100とカメラ本体120とを有する。レンズユニット100は図中央の点線で示されるマウントMを介して、カメラ本体120と接続される。   FIG. 2 is a block diagram of the digital camera of this embodiment. The digital camera of this embodiment is an interchangeable lens type single-lens reflex camera, and includes a lens unit 100 and a camera body 120. The lens unit 100 is connected to the camera body 120 via a mount M indicated by a dotted line in the center of the drawing.

レンズユニット100は、第1レンズ群101、絞り兼用シャッタ102、第2レンズ群103、フォーカスレンズ群(以下、単に「フォーカスレンズ」という)104、及び、後述する制御手段を有する。このようにレンズユニット100は、フォーカスレンズ104を含むと共に被写体の像を形成する撮影光学系を有する。   The lens unit 100 includes a first lens group 101, a diaphragm shutter 102, a second lens group 103, a focus lens group (hereinafter simply referred to as “focus lens”) 104, and control means described later. As described above, the lens unit 100 includes the focus lens 104 and includes a photographing optical system that forms an image of a subject.

第1レンズ群101は、レンズユニット100の先端に配置され、光軸方向OAに進退可能に保持される。絞り兼用シャッタ102は、その開口径を調節することで撮影時の光量調節を行う他、静止画撮影時には露光秒時調節用シャッタとして機能する。絞り兼用シャッタ102及び第2レンズ群103は一体として光軸方向OAに進退し、第1レンズ群101の進退動作との連動によりズーム機能を実現する。フォーカスレンズ104は、光軸方向の進退により焦点調節を行う。   The first lens group 101 is disposed at the tip of the lens unit 100 and is held so as to be able to advance and retreat in the optical axis direction OA. The aperture / shutter 102 adjusts the aperture diameter to adjust the amount of light during shooting, and also functions as an exposure time adjustment shutter when shooting a still image. The diaphragm / shutter 102 and the second lens group 103 integrally move forward / backward in the optical axis direction OA, and realize a zoom function in conjunction with the forward / backward movement of the first lens group 101. The focus lens 104 performs focus adjustment by moving back and forth in the optical axis direction.

制御手段は、ズームアクチュエータ111、絞りシャッタアクチュエータ112、フォーカスアクチュエータ113、ズーム駆動回路114、絞りシャッタ駆動回路115、フォーカス駆動回路116、レンズMPU117、レンズメモリ118を有する。   The control means includes a zoom actuator 111, an aperture shutter actuator 112, a focus actuator 113, a zoom drive circuit 114, an aperture shutter drive circuit 115, a focus drive circuit 116, a lens MPU 117, and a lens memory 118.

ズームアクチュエータ111は、第1レンズ群101や第3レンズ群103を光軸方向OAに進退駆動し、ズーム操作を行なう。絞りシャッタアクチュエータ112は、絞り兼用シャッタ102の開口径を制御して撮影光量を調節すると共に、静止画撮影時の露光時間制御を行なう。   The zoom actuator 111 performs a zoom operation by driving the first lens group 101 and the third lens group 103 forward and backward in the optical axis direction OA. The aperture shutter actuator 112 controls the aperture diameter of the aperture / shutter 102 to adjust the amount of photographing light, and controls the exposure time during still image photographing.

フォーカスアクチュエータ113で、フォーカスレンズ104を光軸方向OAに進退駆動して焦点調節を行なう。フォーカスアクチュエータ113は、フォーカスレンズ104の現在位置を検出する位置検出部としての機能が備わっている。   The focus actuator 113 drives the focus lens 104 back and forth in the optical axis direction OA to perform focus adjustment. The focus actuator 113 has a function as a position detection unit that detects the current position of the focus lens 104.

ズーム駆動回路114は、撮影者のズーム操作に応じてズームアクチュエータ111を駆動する。シャッタ駆動回路115は、絞りシャッタアクチュエータ112を駆動制御して絞り兼用シャッタ102の開口を制御する。   The zoom drive circuit 114 drives the zoom actuator 111 according to the zoom operation of the photographer. The shutter drive circuit 115 controls the aperture of the diaphragm shutter 102 by drivingly controlling the diaphragm shutter actuator 112.

フォーカス駆動回路116は、焦点検出結果に基づいてフォーカスアクチュエータ113を駆動制御し、フォーカスレンズ104を光軸方向OAに進退駆動して焦点調節を行なう。   The focus drive circuit 116 drives and controls the focus actuator 113 based on the focus detection result, and performs focus adjustment by driving the focus lens 104 forward and backward in the optical axis direction OA.

レンズMPU117は、撮像素子122上に被写体像を結像させる撮影光学系に係る全ての演算、制御を行い、ズーム駆動回路114、シャッタ駆動回路115、フォーカス駆動回路116、レンズメモリ118を制御する。また、レンズMPU117は、現在のレンズ位置を検出し、カメラMPU125からの要求に対してレンズ位置情報を通知する。レンズメモリ118には自動焦点調節に必要な光学情報を記憶する。   The lens MPU 117 performs all calculations and control related to the photographing optical system that forms a subject image on the image sensor 122, and controls the zoom drive circuit 114, the shutter drive circuit 115, the focus drive circuit 116, and the lens memory 118. The lens MPU 117 detects the current lens position, and notifies the lens position information in response to a request from the camera MPU 125. The lens memory 118 stores optical information necessary for automatic focus adjustment.

カメラ本体120は、光学的ローパスフィルタ121、撮像素子122、後述する制御手段を有する。   The camera body 120 includes an optical low-pass filter 121, an image sensor 122, and a control unit described later.

光学的ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。   The optical low-pass filter 121 reduces false colors and moire in the captured image.

撮像素子122は、C−MOSセンサとその周辺回路で構成され、横方向m画素、縦方向n画素の受光ピクセル上に1つの光電変換素子が配置される。撮像素子122は、全画素の独立な出力が可能なように構成されている。また、一部の画素が焦点検出用画素となっており、撮像面で位相差AF検出方式の焦点検出(撮像面位相差AF)が可能となっている。   The image sensor 122 is composed of a C-MOS sensor and its peripheral circuit, and one photoelectric conversion element is arranged on light receiving pixels of m pixels in the horizontal direction and n pixels in the vertical direction. The image sensor 122 is configured to be able to output all pixels independently. Some pixels are focus detection pixels, and focus detection (imaging surface phase difference AF) using the phase difference AF detection method is possible on the imaging surface.

焦点検出用画素は、複数の撮影用画素内に離散的に配置されている(図4)。   The focus detection pixels are discretely arranged in the plurality of imaging pixels (FIG. 4).

より具体的には、撮像素子122は、被写体の像を形成する撮影光学系の射出瞳の全域を通る光束を各々が受光して被写体の像を生成する複数の撮影用画素を有する。また、撮像素子122は、各々が撮影光学系の異なる射出瞳の領域を通る光束を受光する複数の焦点検出用画素を更に有する。複数の焦点検出用画素は全体として撮影光学系の射出瞳の全域を通る光束を受光することができる。例えば、撮像素子122は、2行×2列の画素のうち、対角に配置される一対のG画素は撮影用画素として残し、R画素とB画素を焦点検出用画素に置き換える。   More specifically, the image sensor 122 has a plurality of shooting pixels that each receive a light beam that passes through the entire exit pupil of an imaging optical system that forms an image of the subject and generates an image of the subject. The image sensor 122 further includes a plurality of focus detection pixels that each receive a light beam that passes through different exit pupil regions of the imaging optical system. The plurality of focus detection pixels as a whole can receive a light beam passing through the entire exit pupil of the photographing optical system. For example, the imaging element 122 leaves a pair of G pixels arranged diagonally out of 2 × 2 pixels as imaging pixels, and replaces R and B pixels with focus detection pixels.

駆動手段は、撮像素子駆動回路123、画像処理回路124、第1の制御手段、第2の制御手段、第3の制御手段の機能を備えたカメラMPU125、表示器126、操作スイッチ群127、メモリ128、撮像面位相差焦点検出部129、TVAF焦点検出部130を有する。   The driving means includes an image sensor driving circuit 123, an image processing circuit 124, a first control means, a second control means, a camera MPU 125 having functions of a third control means, a display 126, an operation switch group 127, a memory. 128, an imaging surface phase difference focus detection unit 129, and a TVAF focus detection unit 130.

撮像素子駆動回路123は、撮像素子122の動作を制御するとともに、取得した画像信号をA/D変換してカメラMPU125に送信する。画像処理回路124は、撮像素子122が取得した画像のγ変換、カラー補間、JPEG圧縮などを行う。   The image sensor drive circuit 123 controls the operation of the image sensor 122, A / D converts the acquired image signal, and transmits it to the camera MPU 125. The image processing circuit 124 performs γ conversion, color interpolation, JPEG compression, and the like of the image acquired by the image sensor 122.

第1の制御手段、第2の制御手段、第3の制御手段の機能を備えたカメラMPU(プロセッサ)125は、カメラ本体120に係る全ての演算、制御を行い、撮像素子駆動回路123、画像処理回路124、表示器126、操作SW127、メモリ128、撮像面位相差焦点検出部129、TVAF焦点検出部130を制御する。   A camera MPU (processor) 125 having functions of a first control unit, a second control unit, and a third control unit performs all computations and controls related to the camera body 120, and includes an image sensor driving circuit 123, an image The processing circuit 124, the display 126, the operation SW 127, the memory 128, the imaging plane phase difference focus detection unit 129, and the TVAF focus detection unit 130 are controlled.

第1の制御手段は、撮影光学系の異なる瞳領域を通過する複数の光束を検出する焦点検出用画素から出力される第1の画素信号に基づいて位相差AFを行う。   The first control means performs the phase difference AF based on the first pixel signal output from the focus detection pixel that detects a plurality of light beams passing through different pupil regions of the photographing optical system.

第2の制御手段は、撮影光学系の瞳領域を通過する複数の光束を検出する撮影用画素から出力される第2の画素信号に基づいてコントラストAFを行う。   The second control means performs contrast AF based on the second pixel signal output from the imaging pixel that detects a plurality of light beams passing through the pupil region of the imaging optical system.

第2の制御手段は、被写体像のコントラスト情報及び被写体像の輝度情報の少なくとも1つに基づいてフォーカスレンズのレンズ駆動量の駆動幅を可変する。   The second control unit varies the driving width of the lens driving amount of the focus lens based on at least one of the contrast information of the subject image and the luminance information of the subject image.

第3の制御手段は、第2の画素信号から抽出された被写体情報を用いて、前記位相差AFと前記コントラストAFを切換える。   The third control means switches between the phase difference AF and the contrast AF using subject information extracted from the second pixel signal.

第2の画素信号から抽出された被写体情報は、焦点検出用画素の焦点検出の精度と相関のある情報又は撮影用画素の焦点検出の精度と相関のある情報である。   The subject information extracted from the second pixel signal is information correlated with the focus detection accuracy of the focus detection pixel or information correlated with the focus detection accuracy of the imaging pixel.

第2の画素信号から抽出された被写体情報は、焦点検出用画素の焦点検出の精度と相関のあるコントラスト情報及び焦点検出用画素の焦点検出の精度と相関のある被写体像の空間周波数情報及び焦点検出用画素の焦点検出の精度と相関のある被写体像に含まれる迷光情報のうち少なくとも1つである。   The subject information extracted from the second pixel signal includes contrast information correlated with the focus detection accuracy of the focus detection pixel, and spatial frequency information and focus of the subject image correlated with the focus detection accuracy of the focus detection pixel. This is at least one of the stray light information included in the subject image correlated with the focus detection accuracy of the detection pixel.

第2の画素信号から抽出された被写体情報は、撮影用画素の焦点検出の精度と相関のある被写体像の輝度情報及び撮影用画素の焦点検出の精度と相関のある被写体像の経時による変化量情報及び撮影用画素の焦点検出の精度と相関のある被写体像のコントラスト情報うち少なくとも1つである。   The subject information extracted from the second pixel signal includes the luminance information of the subject image correlated with the focus detection accuracy of the shooting pixel and the change amount of the subject image correlated with the focus detection accuracy of the shooting pixel over time. This is at least one of the information and the contrast information of the subject image correlated with the focus detection accuracy of the photographing pixels.

第1の制御手段、第2の制御手段、第3の制御手段の機能を備えたカメラMPU125はマウントMの信号線を介してレンズMPU117と接続され、レンズMPU117に対してレンズ位置の取得や所定の駆動量でのレンズ駆動要求を発行したり、レンズユニット100に固有の光学情報を取得したりする。   The camera MPU 125 having the functions of the first control means, the second control means, and the third control means is connected to the lens MPU 117 via the signal line of the mount M, and obtains the lens position with respect to the lens MPU 117 and performs predetermined processing. The lens drive request is issued with the drive amount of ## EQU2 ## or the optical information specific to the lens unit 100 is acquired.

第1の制御手段、第2の制御手段、第3の制御手段の機能を備えたカメラMPU125には、カメラ動作を制御するプログラムを格納したROM125a、変数を記憶するRAM125b、諸パラメータを記憶するEEPROM125cが内蔵されている。   The camera MPU 125 having the functions of the first control means, the second control means, and the third control means includes a ROM 125a that stores a program for controlling camera operation, a RAM 125b that stores variables, and an EEPROM 125c that stores various parameters. Is built-in.

更に、カメラMPU125は、ROM125aに格納したプログラムにより焦点検出処理を実行する。焦点検出処理の詳細は後述する。また、カメラMPU125は、撮像面位相差AFにおいて、焦点検出位置の像高が大きい時にケラレの影響が大きく信頼度が低下するため、その補正も行う。   Further, the camera MPU 125 executes focus detection processing by a program stored in the ROM 125a. Details of the focus detection process will be described later. The camera MPU 125 also corrects the imaging plane phase difference AF because the influence of vignetting is large and the reliability decreases when the image height at the focus detection position is large.

表示器126はLCDなどから構成され、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態表示画像などを表示する。操作スイッチ群127は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。本実施例のメモリ128は、着脱可能なフラッシュメモリで、撮影済み画像を記録する。   The display 126 is configured by an LCD or the like, and displays information related to the shooting mode of the camera, a preview image before shooting and a confirmation image after shooting, a focus state display image at the time of focus detection, and the like. The operation switch group 127 includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like. The memory 128 of this embodiment is a detachable flash memory, and records captured images.

撮像面位相差焦点検出部(第1の焦点検出部)129は、撮像素子122の複数の撮影用画素内に離散的に配置されてた焦点検出用画素の像信号により位相差AF方式での焦点検出処理を行う。より具体的には、撮像面位相差焦点検出部129は、撮像光学系の一対の瞳領域を通過する光束により焦点検出用画素に形成される一対の像のずれ量に基づいて撮像面位相差AFを行う。   The imaging plane phase difference focus detection unit (first focus detection unit) 129 uses a phase difference AF method based on image signals of focus detection pixels discretely arranged in a plurality of imaging pixels of the image sensor 122. Focus detection processing is performed. More specifically, the imaging surface phase difference focus detection unit 129 is based on the deviation amount of the pair of images formed on the focus detection pixels by the light flux passing through the pair of pupil regions of the imaging optical system. Perform AF.

撮像面位相差AFの原理は、特許文献1の図5〜図7、図16などにおいて説明されているものと同様である。   The principle of the imaging surface phase difference AF is the same as that described in FIG. 5 to FIG. 7, FIG.

TVAF焦点検出部(第2の焦点検出部)130は、画像処理回路124にて得られた画像情報のコントラスト成分によりコントラスト方式の焦点検出処理を行う。コントラスト方式の焦点検出処理は、フォーカスレンズ104を移動してコントラスト評価値がピークとなるフォーカスレンズの位置を検出する。   The TVAF focus detection unit (second focus detection unit) 130 performs a contrast-type focus detection process using the contrast component of the image information obtained by the image processing circuit 124. In contrast-type focus detection processing, the focus lens 104 is moved to detect the position of the focus lens where the contrast evaluation value reaches a peak.

このように、本実施例は、撮像面位相差AFとコントラストAFを組み合わせており、いずれの焦点検出手段も撮像面上の情報に基づくため、位相差AFとコントラストAF(TVAF)を組み合わせるよりも焦点検出精度を向上することができる。   As described above, the present embodiment combines the imaging surface phase difference AF and the contrast AF, and since any focus detection means is based on the information on the imaging surface, the phase difference AF and the contrast AF (TVAF) are combined. Focus detection accuracy can be improved.

以下、図1、図3を参照して、第1の制御手段、第2の制御手段、第3の制御手段の機能を備えたカメラMPU(プロセッサ)125が実行する焦点検出処理について説明する。図1において、「S」はステップの略である。図1は、カメラMPU125が実行する焦点検出処理を説明するためのフローチャートである。   The focus detection process executed by the camera MPU (processor) 125 having the functions of the first control unit, the second control unit, and the third control unit will be described below with reference to FIGS. In FIG. 1, “S” is an abbreviation for a step. FIG. 1 is a flowchart for explaining a focus detection process executed by the camera MPU 125.

カメラMPU125は、焦点検出処理を開始すると(S100)、まず、現在選択中の焦点検出領域に含まれる撮像面位相差AFの焦点検出用画素列を探索し、その焦点検出用画素列が検出可能な最大検出デフォーカス量を取得する(S101)。焦点検出用画素が検出可能な最大デフォーカス量は焦点検出用画素列の長さ及び像ずれ量をデフォーカス量に変換する係数(K値)から決定される。K値は、焦点検出用画素列毎に予めEEPROM125cに記憶しておく。   When the camera MPU 125 starts the focus detection process (S100), the camera MPU 125 first searches for the focus detection pixel row of the imaging plane phase difference AF included in the currently selected focus detection region, and can detect the focus detection pixel row. A maximum detected defocus amount is acquired (S101). The maximum defocus amount that can be detected by the focus detection pixels is determined from the length of the focus detection pixel row and the coefficient (K value) for converting the image shift amount into the defocus amount. The K value is stored in advance in the EEPROM 125c for each focus detection pixel column.

次に、撮像素子122への露光を行う(S102)。これにより、撮像面位相差AFやTVAFに用いる出力信号を得るだけでなく、TVAF用の焦点検出領域や撮像面位相差AF用の焦点検出領域を含む近傍の被写体の情報を得ることができる。後述するTVAFや撮像面位相差AFの信頼性を判定するために、被写体の情報を得るための撮像面上の画素領域は、TVAF用の焦点検出領域や撮像面位相差AF用の焦点検出領域を包含しているのが望ましい。   Next, the image sensor 122 is exposed (S102). As a result, not only output signals used for imaging plane phase difference AF and TVAF but also information on nearby subjects including a focus detection area for TVAF and a focus detection area for imaging plane phase difference AF can be obtained. In order to determine the reliability of TVAF or imaging plane phase difference AF, which will be described later, the pixel area on the imaging plane for obtaining subject information is a focus detection area for TVAF or a focus detection area for imaging plane phase difference AF. It is desirable to include.

また、TVAFや撮像面位相差AFは、必要な焦点調節精度に合わせて、撮影用画素の出力信号の数を間引いて用いてもよい。その際にも、被写体の情報を得るための出力信号はTVAFや撮像面位相差AFの出力信号よりも多い画素数で構成されているのが望ましい。それによりTVAFや撮像面位相差AFの出力信号からは得られない情報を得ることができ、後述のTVAFや撮像面位相差AFの焦点検出結果の信頼性を判断することができる。   Further, TVAF and imaging surface phase difference AF may be used by thinning out the number of output signals of the imaging pixels in accordance with the required focus adjustment accuracy. Even in this case, it is desirable that the output signal for obtaining subject information is composed of a larger number of pixels than the output signal of TVAF or imaging plane phase difference AF. Thereby, information that cannot be obtained from the output signals of TVAF and imaging plane phase difference AF can be obtained, and the reliability of the focus detection result of TVAF and imaging plane phase difference AF described later can be determined.

撮像面位相差AFに用いる第1の画素信号は、第1の画像信号と対応している。また、コントラストAF(TVAF)に用いる画素信号や被写体からの情報を得るための第2の画素信号は、第2の画像信号と対応している。   The first pixel signal used for the imaging plane phase difference AF corresponds to the first image signal. Further, the pixel signal used for contrast AF (TVAF) and the second pixel signal for obtaining information from the subject correspond to the second image signal.

次に、カメラMPU125は、撮像面位相差AFによる焦点検出処理を行い(S103)、デフォーカス量を検出したかどうかを判断する(S104)。   Next, the camera MPU 125 performs focus detection processing based on the imaging plane phase difference AF (S103), and determines whether a defocus amount has been detected (S104).

デフォーカス量を検出していないと判断すると(S104のNo)、カメラMPU125は、S101で取得した最大検出デフォーカス量から被写体像の検出抜けがないようにフォーカスレンズ104を駆動し(S105)、フローはS102に帰還する。   If it is determined that the defocus amount has not been detected (No in S104), the camera MPU 125 drives the focus lens 104 so that the subject image is not detected from the maximum detected defocus amount acquired in S101 (S105). The flow returns to S102.

図3(a)は、S105におけるレンズ駆動のタイミングとフォーカスレンズ104の駆動位置との関係を示す図である。カメラMPU125は、フォーカスレンズ104を、撮像面位相差AFで検出可能な最大検出デフォーカス量の2倍に相当する駆動量Uで駆動する。隣接する2つの焦点検出点T1の間隔は駆動量Uであり、焦点検出点T1の前後のU/2に相当するデフォーカス量を取得する。ここで行う撮像面位相差AFの結果に基づくフォーカスレンズ駆動は、第1のレンズ制御によるレンズ駆動と称することする。第1のレンズ制御は、撮像面位相差AFの結果に基づくため、比較的大きな駆動量のレンズ駆動を行うことができ、高速なレンズ駆動を実現できる。   FIG. 3A is a diagram showing the relationship between the lens driving timing and the driving position of the focus lens 104 in S105. The camera MPU 125 drives the focus lens 104 with a drive amount U corresponding to twice the maximum detected defocus amount that can be detected by the imaging plane phase difference AF. An interval between two adjacent focus detection points T1 is a drive amount U, and a defocus amount corresponding to U / 2 before and after the focus detection point T1 is acquired. The focus lens driving based on the result of the imaging surface phase difference AF performed here is referred to as lens driving by the first lens control. Since the first lens control is based on the result of the imaging plane phase difference AF, it is possible to perform lens driving with a relatively large driving amount, and to realize high-speed lens driving.

一方、デフォーカス量を検出したと判断すると(S104のYes)、カメラMPU125は、S102の露光時に取得していたTVAF用の焦点検出領域や撮像面位相差AF用の焦点検出領域を含む近傍の被写体の情報から、撮像面位相差AF結果の信頼性を算出する(S106)。   On the other hand, if it is determined that the defocus amount has been detected (Yes in S104), the camera MPU 125 detects the vicinity including the focus detection area for TVAF and the focus detection area for imaging surface phase difference AF acquired during the exposure in S102. The reliability of the imaging surface phase difference AF result is calculated from the subject information (S106).

一般に、撮像面位相差AFは、被写体の状況によって、見込まれる検出精度が異なる。例えば、被写体のコントラストが低くなったり、被写体近傍に強い光源があり、ゴーストの影響を受けたりすることにより、焦点検出精度が低下することがある。上述した特許文献2では、このような撮像面位相差AFの焦点検出精度が低下するか否かを、撮像面位相差AFの画素信号のコントラストから判断してフォーカスレンズの駆動を制御している。   In general, the detection accuracy of the imaging surface phase difference AF differs depending on the state of the subject. For example, the focus detection accuracy may be lowered due to a low contrast of the subject, a strong light source near the subject, and the influence of a ghost. In Patent Document 2 described above, whether or not the focus detection accuracy of the imaging surface phase difference AF is lowered is determined from the contrast of the pixel signal of the imaging surface phase difference AF to control the driving of the focus lens. .

しかし、焦点検出精度の低下を招く被写体の状況の全てを、撮像面位相差AFの画素信号から判断するのは困難である。例えば、焦点検出精度の低下が見込まれる被写体の状況として、撮像面位相差AFのコントラスト検出方向(瞳分割方向)に対して、斜め方向にコントラストがある被写体や、撮像面位相差AFの検出できる被写体の空間周波数情報より高い空間周波数成分を含む被写体が考えられる。   However, it is difficult to determine all the situations of the subject that cause a decrease in focus detection accuracy from the pixel signal of the imaging plane phase difference AF. For example, as a situation of a subject in which a decrease in focus detection accuracy is expected, a subject having a contrast in an oblique direction with respect to the contrast detection direction (pupil division direction) of the imaging plane phase difference AF, or the imaging plane phase difference AF can be detected. A subject including a spatial frequency component higher than the spatial frequency information of the subject can be considered.

図4、図5に、焦点検出精度の低下が見込まれる被写体の状況の例を示す。   FIG. 4 and FIG. 5 show examples of the situation of the subject in which a decrease in focus detection accuracy is expected.

図4は、撮像素子122の撮像面上の一部に、光学像(斜線部)が形成されている様子を示している。被写体の光学像を示す斜線部が被写体上ではより高い輝度を有する部分で、斜線部以外は、より低輝度とする。   FIG. 4 shows a state in which an optical image (shaded portion) is formed on a part of the imaging surface of the imaging element 122. The hatched portion indicating the optical image of the subject is a portion having higher luminance on the subject, and the luminance is lower except for the hatched portion.

各正方形は、画素を示しており、R、G、Bと書かれている各画素は、それぞれ赤、緑、青の光に対して主に感度を有する画素を示している。上述の通り、2行×2列の画素のうち、対角に配置される一対のG画素は撮影用画素として残し、R画素とB画素を焦点検出用画素に置き換えられており、図4中の左右方向に瞳分割を行う焦点検出用画素対として、AF1とAF2が配置されている。対のAF画素は、図4中では、4対が描かれているが、焦点検出に用いる画素の数は、より多く構成されていてもよく、図4中で左右方向に連なっていてもよい。   Each square indicates a pixel, and each pixel written as R, G, B indicates a pixel mainly having sensitivity to red, green, and blue light. As described above, of the 2 rows × 2 columns of pixels, the pair of G pixels arranged diagonally is left as a photographing pixel, and the R pixel and the B pixel are replaced with focus detection pixels, as shown in FIG. AF1 and AF2 are arranged as a pair of focus detection pixels that perform pupil division in the left-right direction. Four pairs of AF pixels are depicted in FIG. 4, but the number of pixels used for focus detection may be larger, and may be continuous in the left-right direction in FIG. 4. .

図4では、被写体の光学像が撮像素子122の撮像面上に合焦状態で結像するよう焦点調節された状態を示している。合焦状態では、対のAF画素に対して、ほぼ同一形状で、同一の位置に光学像は形成されるため、図4では、対のAF画素に対して、共通の光学像のみを示している。   FIG. 4 shows a state in which the focus is adjusted so that the optical image of the subject is focused on the imaging surface of the image sensor 122 in a focused state. In the in-focus state, optical images are formed in the same position and in the same shape with respect to the pair of AF pixels, and FIG. 4 shows only the common optical image for the pair of AF pixels. Yes.

図4(A)は、被写体の光学像として、図中、縦方向に比較的幅の広い範囲で輝度を持つ被写体の光学像が撮像素子122の撮像面上の一部に、形成されている場合を示している。この場合、4対のAF画素のうち、2,3番目の対のAF画素は、光学像の一部に含まれているため、図中の4画素の出力は、図5(A)のようになる。図5(A)の詳細は後述する。   4A shows an optical image of a subject, in which a subject optical image having luminance in a relatively wide range in the vertical direction is formed on a part of the imaging surface of the image sensor 122. Shows the case. In this case, among the four pairs of AF pixels, the second and third pairs of AF pixels are included in a part of the optical image, so the output of the four pixels in the figure is as shown in FIG. become. Details of FIG. 5A will be described later.

図4(B)は、被写体の光学像として、図中、斜め方向に比較的幅の広い範囲で輝度を持つ被写体の光学像が撮像素子122上の一部に、形成されている場合を示している。この場合、4対のAF画素のうち、3番目のAF1のAF画素,2番目のAF2のAF画素のみ、光学像の一部に含まれているため、図中の4画素の出力は、図5(B)のようになる。図5(B)の詳細は後述する。   FIG. 4B shows a case where an optical image of a subject having luminance in a relatively wide range in an oblique direction is formed on a part of the image sensor 122 as an optical image of the subject. ing. In this case, among the four pairs of AF pixels, only the AF pixel of the third AF1 and the AF pixel of the second AF2 are included in a part of the optical image. It becomes like 5 (B). Details of FIG. 5B will be described later.

図4(C)は、被写体の光学像として、図中、縦方向に比較的幅の狭い範囲で輝度を持つ被写体の光学像が撮像素子122の撮像面上の一部に形成されている場合を示している。この場合、4対のAF画素のうち、3番目のAF1のAF画素,2番目のAF2のAF画素のみ、光学像の一部に含まれているため、図中の4画素の出力は、図5(B)のようになる。図5(B)の詳細は後述する。   FIG. 4C illustrates a case where an optical image of a subject having luminance within a relatively narrow range in the vertical direction is formed on a part of the imaging surface of the image sensor 122 as an optical image of the subject. Is shown. In this case, among the four pairs of AF pixels, only the AF pixel of the third AF1 and the AF pixel of the second AF2 are included in a part of the optical image. It becomes like 5 (B). Details of FIG. 5B will be described later.

図5は、図4で示した撮像素子122上に形成された光学像により、撮像素子122から得られる出力信号としての画素信号を示している。横軸に画素の位置を示す画素番号を表し、縦軸に光量を示す出力信号としての画素信号を表している。図5中、四角い印で表しているのが、AF1のAF画素の出力で、丸印で表しているのが、AF2のAF画素の出力である。   FIG. 5 shows a pixel signal as an output signal obtained from the image sensor 122 by the optical image formed on the image sensor 122 shown in FIG. The horizontal axis represents the pixel number indicating the pixel position, and the vertical axis represents the pixel signal as an output signal indicating the light amount. In FIG. 5, the square mark represents the output of the AF pixel of AF1, and the circle mark represents the output of the AF pixel of AF2.

図5(A)は、図4(A)のように光学像が形成された場合の出力で、合焦状態のため、AF1,AF2の出力は、ほぼ同じである。   FIG. 5A shows the output when an optical image is formed as shown in FIG. 4A, and the outputs of AF1 and AF2 are almost the same because of the in-focus state.

図5(B)は、図4(B)、(C)のように光学像が形成された場合の出力で、合焦状態にもかかわらず、AF1の画素とAF2の画素の出力が異なる。この場合、形成された出力によると、1画素分、像がずれた状態を示しているため、撮像面位相差焦点検出部129は、デフォーカス状態と判断し、誤った焦点検出、焦点調節を行ってしまう。しかし、AF画素のみの信号を用いていては、こういった焦点検出誤差を検出することはできない。   FIG. 5B shows the output when an optical image is formed as shown in FIGS. 4B and 4C. The outputs of the AF1 and AF2 pixels are different regardless of the in-focus state. In this case, according to the formed output, since the image is shifted by one pixel, the imaging surface phase difference focus detection unit 129 determines that the image is in the defocus state, and performs erroneous focus detection and focus adjustment. will have to go. However, such focus detection error cannot be detected by using only the AF pixel signal.

S106では、AF画素の周囲の撮影用画素から、上述したような焦点検出誤差を鑑みて、撮像面位相差AFの結果の信頼性を算出する。例えば、図4(B),(C)のような被写体の状況では、AF画素近傍の撮影用画素の信号のコントラストの高い部分の方向や位置を認識することにより、図5(B)のような焦点検出誤差の有無を検出することができる。図5(B)では、1画素分の像ずれ量に対応するピントずれが焦点検出誤差として得られる。   In S106, the reliability of the imaging surface phase difference AF result is calculated from the imaging pixels around the AF pixel in consideration of the focus detection error as described above. For example, in the situation of the subject as shown in FIGS. 4B and 4C, the direction and position of the high-contrast portion of the signal of the photographic pixel near the AF pixel are recognized, as shown in FIG. It is possible to detect the presence or absence of a significant focus detection error. In FIG. 5B, a focus shift corresponding to the image shift amount for one pixel is obtained as a focus detection error.

また、図4(C)のような被写体に対しては、公知のフーリエ変換などにより空間周波数成分に変換し、AF画素の検出できる空間周波数成分より高周波な成分が含まれるか否かで、焦点検出誤差を設定してもよい。このような方法で、焦点検出誤差を設定する場合には、被写体の空間周波数に対応した焦点検出誤差を事前に記憶しておくことにより、焦点検出誤差を見積もることができる。   4C is converted into a spatial frequency component by a known Fourier transform or the like, and whether or not a higher frequency component than the spatial frequency component that can be detected by the AF pixel is included. A detection error may be set. When the focus detection error is set by such a method, the focus detection error can be estimated by storing the focus detection error corresponding to the spatial frequency of the subject in advance.

図4のような、一対の焦点検出用画素の焦点検出方向(瞳分割方向)の中心同士の間隔の1/2以上の空間周波数の被写体は原理的に検出できない。第1の一対のAF画素の中心と第2の一対のAF画素の中心の間隔の1/2以上の高周波の空間周波数の被写体は原理的に検出できない。一般的に、タダの白と黒のエッジには、低周波から高周波まで多様な空間周波数情報の空間周波数成分を含むので、上述の焦点検出誤差が発生する。   As shown in FIG. 4, a subject having a spatial frequency of 1/2 or more of the distance between the centers of the focus detection directions (pupil division directions) of the pair of focus detection pixels cannot be detected in principle. In principle, a subject having a high spatial frequency that is 1/2 or more of the distance between the center of the first pair of AF pixels and the center of the second pair of AF pixels cannot be detected. In general, the white and black edges of the free color include spatial frequency components of various spatial frequency information from low frequency to high frequency, so that the above-described focus detection error occurs.

図4に示した被写体の状況以外でも、被写体近傍の強い光源による迷光が、対のAF画素に不均等に到達するような状況も考えられる。そのような場合にも、対のAF画素の出力が一致せず焦点検出誤差が発生するが、撮影用画素の信号から強い光源の位置が特定できるため、光源の位置に応じた焦点検出への影響を、事前に撮像面位相差焦点検出部129が、記憶していることにより、焦点検出誤差を見積もることができる。例えば、強い光源の位置に対応した焦点検出誤差量の対応表を、EEPROM125cに記憶しておく。   In addition to the situation of the subject shown in FIG. 4, a situation where stray light from a strong light source in the vicinity of the subject arrives at the paired AF pixels unevenly is also conceivable. Even in such a case, the outputs of the paired AF pixels do not match and a focus detection error occurs. However, since the position of the strong light source can be specified from the signal of the imaging pixel, the focus detection according to the position of the light source Since the imaging surface phase difference focus detection unit 129 stores the influence in advance, the focus detection error can be estimated. For example, a correspondence table of focus detection error amounts corresponding to strong light source positions is stored in the EEPROM 125c.

S106では、撮像面位相差AF結果の信頼性を、発生しうる焦点検出誤差として算出する。上述の撮像面位相差AF結果の信頼性を算出する処理は、カメラMPU125で行われる。S106では、下記の式1を用いて、焦点検出誤差を算出する。   In S106, the reliability of the imaging surface phase difference AF result is calculated as a possible focus detection error. The processing for calculating the reliability of the imaging surface phase difference AF result described above is performed by the camera MPU 125. In S106, the focus detection error is calculated using the following equation (1).

Figure 2013254166
Figure 2013254166

被写体コントラスト方向誤差は、上述の通り、撮影用画素の信号のコントラストの高い部分の方向と関連付けられた焦点検出誤差量の情報をEEPROM125cに記憶しておき、被写体毎に、算出される。また、被写体空間周波数誤差も同様に、撮影用画素の信号から検出された高周波成分の信号量と関連付けられた焦点検出誤差量の情報をEEPROM125cに記憶しておき、被写体毎に、算出される。さらに、迷光による誤差も、同様に、EEPROM125cに記憶された強い光源の位置と光量に対応した焦点検出誤差量を用いて、被写体毎に算出される。   As described above, the subject contrast direction error is calculated for each subject by storing information on the focus detection error amount associated with the direction of the high-contrast portion of the signal of the imaging pixel in the EEPROM 125c. Similarly, the subject spatial frequency error is calculated for each subject by storing information on the focus detection error amount associated with the signal amount of the high-frequency component detected from the signal of the photographing pixel in the EEPROM 125c. Further, the error due to stray light is similarly calculated for each subject using the focus detection error amount corresponding to the position of the strong light source and the amount of light stored in the EEPROM 125c.

S107では、S104で算出されたデフォーカス量とS106で算出された焦点検出誤差から、フォーカスレンズ104のレンズ駆動量を算出する。図3(b)は、S104でデフォーカス量を検出した時のフォーカスレンズ104の駆動制御の詳細を示す図である。図3(b)中の第1の合焦位置であるT2は、S104で算出されたデフォーカス量に基づく撮像面位相差AFが検出した合焦時のレンズ位置を示している。   In S107, the lens driving amount of the focus lens 104 is calculated from the defocus amount calculated in S104 and the focus detection error calculated in S106. FIG. 3B is a diagram showing details of drive control of the focus lens 104 when the defocus amount is detected in S104. T2 which is the first focus position in FIG. 3B indicates the lens position at the time of focus detected by the imaging plane phase difference AF based on the defocus amount calculated in S104.

S107では、T2の位置に対して、S106で算出された焦点検出誤差を鑑みて、レンズ駆動量T4の手前のレンズ位置T3に到達するよう駆動する。S104で算出されたデフォーカス量に対して、S106で算出された焦点検出誤差が大きい場合には、算出されたデフォーカス量は、信頼性が乏しいとして、S107で算出するレンズ駆動量を0とし、撮像面位相差AFの結果に基づくレンズ駆動を行わないようにする。   In S107, the position T2 is driven so as to reach the lens position T3 before the lens driving amount T4 in view of the focus detection error calculated in S106. When the focus detection error calculated in S106 is larger than the defocus amount calculated in S104, the calculated defocus amount is determined to be unreliable, and the lens driving amount calculated in S107 is set to 0. The lens driving based on the result of the imaging surface phase difference AF is not performed.

このように、撮像面位相差AFの焦点検出精度に合わせてレンズ駆動量を設定するため、被写体の状況に合わせた高速な焦点検出が可能となる。このような撮像面位相差AFを用いるか否かの判断は、カメラMPU125が行う。   As described above, since the lens driving amount is set in accordance with the focus detection accuracy of the imaging surface phase difference AF, high-speed focus detection in accordance with the state of the subject can be performed. The camera MPU 125 determines whether to use such imaging plane phase difference AF.

S108では、レンズ駆動量が0ではない有限値を持っているかどうかを判断する。レンズ駆動量として有限値を持っていた場合(S108でYes)、撮像面位相差AFの結果に基づくレンズ制御(第1のレンズ制御)によるレンズ駆動を行う。(S109)レンズ駆動量が0であった場合(S108でNo)、S109をスキップする。   In S108, it is determined whether the lens driving amount has a finite value other than zero. When the lens driving amount has a finite value (Yes in S108), lens driving is performed by lens control (first lens control) based on the result of the imaging surface phase difference AF. (S109) If the lens drive amount is 0 (No in S108), S109 is skipped.

S109でレンズ駆動を終えると、次に、S102と同様に、撮像素子122への露光を行う(S110)。これにより、撮像面位相差AFやTVAFに用いる出力信号を得るだけでなく、TVAF用の焦点検出領域や撮像面位相差AF用の焦点検出領域を含む近傍の被写体の情報を得ることができる。   When the lens driving is finished in S109, next, exposure to the image sensor 122 is performed as in S102 (S110). As a result, not only output signals used for imaging plane phase difference AF and TVAF but also information on nearby subjects including a focus detection area for TVAF and a focus detection area for imaging plane phase difference AF can be obtained.

次に、直前の露光時の被写体情報からTVAFの信頼性を判断する(S111)。   Next, the reliability of TVAF is determined from subject information at the time of the previous exposure (S111).

S111で判断するTVAFの信頼性は、焦点検出処理をTVAFを用いて終えるか、撮像面位相差AFを用いて終えるかを判断する。この処理は、被写体情報抽出手段としてのカメラMPU125で行われる。上述の通り、コントラスト方式の焦点検出処理は、フォーカスレンズ104を移動してコントラスト評価値がピークとなるフォーカスレンズ位置を検出する。   The reliability of the TVAF determined in S111 determines whether the focus detection process is finished using the TVAF or the imaging plane phase difference AF. This processing is performed by the camera MPU 125 as subject information extraction means. As described above, the contrast-type focus detection process detects the focus lens position where the contrast evaluation value reaches a peak by moving the focus lens 104.

そのため、この方式に依存した課題がいくつか存在する。例えば、高輝度な点光源が被写体として、コントラスト評価を行うTVAF用の焦点検出領域内に存在した場合、露光条件によっては、点光源の出力信号は飽和してしまうことが発生する。そのような際には、点光源が少しボケた状態の方が、出力信号は飽和した状態のまま、コントラスト評価を行うTVAF用の焦点検出領域内の被写体の面積が大きくなり、コントラストが大きいエッジが多く検出される。その結果、少しぼけた状態の方がコントラスト評価値が大きくなり、誤った焦点調節を行ってしまう。   Therefore, there are some issues that depend on this method. For example, when a high-brightness point light source exists as a subject in a focus detection area for TVAF that performs contrast evaluation, the output signal of the point light source may be saturated depending on exposure conditions. In such a case, when the point light source is slightly blurred, the output signal remains saturated and the area of the subject in the focus detection area for TVAF for performing contrast evaluation increases, resulting in an edge with high contrast. Many are detected. As a result, the contrast evaluation value becomes larger in a slightly blurred state, and erroneous focus adjustment is performed.

また、別の課題として、被写体が動いたり、撮影者の手振れなどにより、コントラスト評価を行うTVAF用の焦点検出領域内の被写体が揺れ動くことにより、安定したコントラスト評価値が得られないことがあげられる。そのような場合、コントラスト評価値のピークが高精度に検出できないことは容易に想像できる。また、点滅するような被写体も同様である。   Another problem is that a stable contrast evaluation value cannot be obtained because the subject in the focus detection area for TVAF that performs contrast evaluation shakes due to movement of the subject or camera shake of the photographer. . In such a case, it can be easily imagined that the peak of the contrast evaluation value cannot be detected with high accuracy. The same applies to a flashing subject.

このため、S111では、事前の露光で得られる画像信号から高精度なコントラスト方式の焦点検出が行えるか否かを判断する。具体的には、点光源の有無については、特開2007−33735号公報で、開示されている技術を用いてコントラスト評価を行うTVAF用の焦点検出領域内の飽和している信号の有無を判断できる。点光源が存在していると判明した場合にはTVAFの信頼性が低いと判断する。例えば、下記の式2を用いて、点光源に関するTVAFの信頼性を算出する。   For this reason, in S111, it is determined whether or not high-accuracy contrast focus detection can be performed from an image signal obtained in advance exposure. Specifically, as to the presence or absence of a point light source, it is determined in Japanese Patent Application Laid-Open No. 2007-33735 whether or not there is a saturated signal in the focus detection area for TVAF that performs contrast evaluation using the disclosed technique. it can. When it is determined that a point light source exists, it is determined that the reliability of TVAF is low. For example, the reliability of TVAF related to the point light source is calculated using the following Equation 2.

Figure 2013254166
Figure 2013254166

上述の式において、高輝度部を含む行の評価値は、特開2007−33735におけるTEラインピーク積分評価値Hiに相当する。また、焦点検出領域全域の評価値は、TEラインピーク積分評価値に相当する。   In the above formula, the evaluation value of the row including the high luminance portion corresponds to the TE line peak integration evaluation value Hi in Japanese Patent Application Laid-Open No. 2007-33735. In addition, the evaluation value of the entire focus detection area corresponds to the TE line peak integration evaluation value.

このように、焦点検出領域における高輝度部の割合をTVAFの信頼性として算出することにより、高輝度部が大きい場合には、TVAFの信頼性は、大きい値を取る。点光源のTVAFの信頼性が、所定の閾値以上の値を取る場合には、S111で撮像面位相差AFを用いるという判断を行う。   Thus, by calculating the ratio of the high luminance part in the focus detection area as the reliability of TVAF, when the high luminance part is large, the reliability of TVAF takes a large value. If the reliability of the TV AF of the point light source takes a value equal to or greater than a predetermined threshold, it is determined in step S111 that the imaging plane phase difference AF is used.

また、コントラスト評価を行うTVAF用の焦点検出領域内の被写体の変化を検出するためには、事前に取得した基準画像に対して、コントラスト評価を行うTVAF用の焦点検出領域内の画像をパターンマッチング(正規化相関)処理し、基準画像内における被写体の像の位置または範囲を検出する。所定の閾値に対して、位置の変化や範囲の変化(被写体の大きさの変化)が大きい場合には、TVAFの信頼性が低いと判断する。   In addition, in order to detect a change in the subject in the focus detection area for TVAF that performs contrast evaluation, an image in the focus detection area for TVAF that performs contrast evaluation is pattern-matched to a reference image acquired in advance. (Normalization correlation) processing is performed to detect the position or range of the subject image in the reference image. If the change in position or range (change in the size of the subject) is larger than the predetermined threshold, it is determined that the reliability of TVAF is low.

また、パターンマッチング処理後、所定の条件を満たす場合には、基準画像の更新を行う。更新される基準画像は、新たに露光して得られた画像信号でもよいし、前回のパターンマッチング処理に用いた画像でもよい。所定の条件を満たす場合とは、例えば、被写体領域の大きさが変わった場合や、被写体の向きが変化することなどによって類似度が低下した場合である。   In addition, after the pattern matching process, when a predetermined condition is satisfied, the reference image is updated. The updated reference image may be an image signal obtained by newly exposing or an image used for the previous pattern matching process. The case where the predetermined condition is satisfied is, for example, a case where the size of the subject area changes or a case where the similarity is lowered due to a change in the direction of the subject.

また、より簡易的に焦点検出領域内の被写体の変化を検出するために、レンズユニット100もしくはカメラ本体120に、撮影者が撮影時に発生させる手振れ量を検出し、焦点検出領域内の被写体の変化としてもよい。   In order to more easily detect changes in the subject in the focus detection area, the camera unit 120 detects the amount of camera shake that the photographer generates at the time of shooting, and changes the subject in the focus detection area. It is good.

TVAF用の焦点検出領域内の被写体の変化によるTVAFの信頼性は、下記の式3を用いて算出される。   The reliability of TVAF due to the change of the subject in the focus detection area for TVAF is calculated using Equation 3 below.

Figure 2013254166
Figure 2013254166

コントラストAFでは、被写体の輪郭などのコントラストのある境界の高域の空間周波数成分を評価する。そのため、上述の被写体の位置変化や大きさ変化による被写体輪郭の位置変化が、TVAFの信頼性に影響を与える。被写体輪郭の位置変化を撮像素子上の変化量として算出し、その変化量が、撮像素子上の被写体検出範囲より大きい場合には、全く異なる被写体に対して焦点検出を行うことになってしまう。   In contrast AF, a high-frequency spatial frequency component at a boundary with contrast such as the contour of a subject is evaluated. Therefore, the change in the position of the subject outline due to the change in the position and size of the subject described above affects the reliability of the TVAF. When the change in the position of the subject contour is calculated as the amount of change on the image sensor, and the amount of change is larger than the subject detection range on the image sensor, focus detection is performed on a completely different subject.

コントラストAFは、被写体の異なるボケ状態を評価することで、合焦位置を判別するため、焦点検出動作中は、同じ被写体の評価を行う必要がある。そこで、式3のように、被写体変化のTVAF信頼性を算出することにより、TVAF信頼性が所定の閾値よりも大きい場合には、S111で撮像面位相差AFを用いるという判断を行う。   In contrast AF, the in-focus position is determined by evaluating different blur states of the subject. Therefore, it is necessary to evaluate the same subject during the focus detection operation. Therefore, by calculating the TVAF reliability of the subject change as in Equation 3, if the TVAF reliability is greater than a predetermined threshold, it is determined in step S111 that the imaging plane phase difference AF is used.

本発明では、コントラスト評価を行うTVAF用の焦点検出領域近傍を含む画像信号を用いて、点光源などの被写体や不安定なコントラスト評価値が見込まれる被写体を、TVAF制御で焦点調節することを避けることができる。これにより、高精度な焦点調節を実現できる。   In the present invention, using an image signal including the vicinity of a focus detection area for TVAF that performs contrast evaluation, a subject such as a point light source or a subject for which an unstable contrast evaluation value is expected is avoided from being subjected to focus adjustment by TVAF control. be able to. Thereby, highly accurate focus adjustment is realizable.

S111でTVAFの信頼性が低いと判断された場合(S111でNo)、撮像面位相差AF制御のサブルーチンに移行する(S114)。S114で焦点調節を終えると焦点検出処理が終了する。このようなTVAFの信頼性に関する判断は、カメラMPU125が行う。   If it is determined in S111 that the reliability of TVAF is low (No in S111), the process proceeds to a subroutine for imaging surface phase difference AF control (S114). When the focus adjustment is completed in S114, the focus detection process ends. Such a determination regarding the reliability of TVAF is performed by the camera MPU 125.

S111でTVAFの信頼性が高いと判断された場合(S111でYes)、TVAF制御を行う際のフォーカスレンズ104のレンズ駆動量のステップ幅を設定する(S112)。図6は、TVAF制御時のレンズ駆動量のステップ幅の設定について説明する図であり、横軸はフォーカスレンズ104の位置、縦軸はTVAFのコントラスト評価値である。   If it is determined in S111 that the reliability of TVAF is high (Yes in S111), the step width of the lens driving amount of the focus lens 104 when performing TVAF control is set (S112). FIG. 6 is a diagram for explaining the setting of the step width of the lens driving amount at the time of TVAF control. The horizontal axis represents the position of the focus lens 104, and the vertical axis represents the TVAF contrast evaluation value.

一般に、TVAFのコントラスト評価値は、被写体の明暗差であるコントラストが高ければ高いほど大きくなる。また、被写体を照明する光源環境によって、被写体が高輝度であるほど、コントラストが高くTVAF評価値も大きくなる。そのため、被写体のコントラスト情報、輝度情報により、フォーカスレンズの位置変化に応じたTVAF評価値変化は異なる。   In general, the contrast evaluation value of TVAF increases as the contrast, which is the difference in brightness of the subject, increases. Also, depending on the light source environment that illuminates the subject, the higher the brightness of the subject, the higher the contrast and the larger the TVAF evaluation value. Therefore, the TVAF evaluation value change according to the position change of the focus lens differs depending on the contrast information and luminance information of the subject.

図6中、白い丸印で表しているのが、被写体が高コントラスト、高輝度であった場合の評価値の推移の例で、黒い丸印で表しているのが、被写体が低コントラスト、低輝度であった場合の評価値の推移の例である。   In FIG. 6, white circles represent examples of evaluation value transitions when the subject has high contrast and high brightness, and black circles represent subjects with low contrast and low contrast. It is an example of transition of the evaluation value when it is luminance.

被写体が高コントラスト、高輝度であった場合(白い丸印)、フォーカスレンズの位置によるコントラスト評価値変化は、比較的大きいため、フォーカスレンズのレンズ駆動量のステップ幅は小さめに設定することにより、高精度に焦点検出を行うことができる。一方で、被写体が低コントラスト、低輝度であった場合(黒い丸印)、高コントラスト、高輝度時と同様なフォーカスレンズ駆動量のステップ幅としての駆動幅に設定すると、コントラスト評価値の変化が大きく表れない。   When the subject has high contrast and high brightness (white circles), the change in the contrast evaluation value due to the focus lens position is relatively large. Therefore, by setting the step width of the lens drive amount of the focus lens to a small value, Focus detection can be performed with high accuracy. On the other hand, if the subject has low contrast and low brightness (black circles), setting the drive width as the step width of the focus lens drive amount similar to that at high contrast and high brightness will change the contrast evaluation value. It does not appear greatly.

一般に、コントラスト評価値は、被写体の光学像のコントラスト変化に加え、出力信号のノイズや被写体状況の変化によるノイズを含んでいる。TVAF制御では、コントラスト評価値のピーク位置を探すようにフォーカスレンズの位置を駆動制御するため、フォーカスレンズの位置毎の光学的なコントラスト変化が小さい場合には、その他のノイズの影響を大きく受け、誤ったフォーカスレンズの駆動方向にコントラスト評価値のピークが存在すると検出してしまう恐れがある。   In general, the contrast evaluation value includes noise of an output signal and noise due to a change in the subject situation in addition to a change in the contrast of the optical image of the subject. In TVAF control, the position of the focus lens is driven and controlled so as to search for the peak position of the contrast evaluation value. Therefore, when the optical contrast change for each position of the focus lens is small, it is greatly affected by other noises. If there is a peak of the contrast evaluation value in the wrong driving direction of the focus lens, it may be detected.

そのため、本実施例では、被写体の状況に応じて、レンズ駆動量のステップ幅としての駆動幅を変更する。例えば、図6では、被写体が高コントラスト、高輝度であった場合(白い丸印)、小ステップ量としてR1、被写体が低コントラスト、低輝度であった場合(黒い丸印)、大ステップ量としてR1の2倍のR2としてレンズ駆動を行っていることを示している。   Therefore, in this embodiment, the driving width as the step width of the lens driving amount is changed according to the condition of the subject. For example, in FIG. 6, when the subject has high contrast and high brightness (white circle), the small step amount is R1, and when the subject has low contrast and low brightness (black circle), the large step amount It shows that lens driving is performed as R2 which is twice R1.

本実施例では、被写体の状況の判断を、TVAF用の焦点検出領域であるコントラスト評価範囲近傍を含む画像信号を用いて行う。具体的には、TVAF用の焦点検出領域である内の画像信号で、隣接画素の出力差の和を被写体のコントラストとして計算し、所定の閾値に対する大小に応じて、フォーカスレンズの駆動量のステップ幅を設定してもよい。   In this embodiment, the state of the subject is determined using an image signal including the vicinity of the contrast evaluation range, which is a focus detection area for TVAF. Specifically, the sum of the output differences between adjacent pixels is calculated as the contrast of the subject in the image signal within the focus detection area for TVAF, and the focus lens drive amount step is determined according to the magnitude of a predetermined threshold. The width may be set.

また、より簡単に、TVAF用の焦点検出領域であるコントラスト評価範囲内の画像信号の出力最大値によって、フォーカスレンズ駆動量のステップ幅を設定してもよい。また、事前に複数の露光により、フォーカスレンズ104の位置の異なる複数の画像信号を得ている場合には、画像信号の隣接画素の出力差の2乗和の大小に応じて、フォーカスレンズの駆動量のステップ幅を設定してもよい。この処理は、カメラMPU125で行われる。   In addition, the step width of the focus lens drive amount may be set more simply by the maximum output value of the image signal within the contrast evaluation range that is a focus detection area for TVAF. In addition, when a plurality of image signals having different positions of the focus lens 104 are obtained in advance by a plurality of exposures, the focus lens is driven according to the magnitude of the square sum of the output differences between adjacent pixels of the image signal. An amount step width may be set. This process is performed by the camera MPU 125.

S112でフォーカスレンズの駆動量のステップ幅を設定した後、TVAF制御のサブルーチンに移行する(S113)。S113で焦点調節を終えると焦点検出処理が終了する。   After setting the step width of the focus lens drive amount in S112, the process proceeds to a TVAF control subroutine (S113). When the focus adjustment is completed in S113, the focus detection process ends.

図7、図8を用いて、TVAF制御による焦点調節処理サブルーチンについて説明する。図7は、TVAF制御による焦点調節処理サブルーチンのフローを示している。図8は、TVAF制御を説明する図であり、横軸はフォーカスレンズ104の位置、縦軸はTVAFの評価値である。図1のS112で設定したフォーカスレンズの駆動量のステップ幅を、1回のレンズ駆動のパルス数としてT8として表している。   A focus adjustment subroutine by TVAF control will be described with reference to FIGS. FIG. 7 shows a flow of a focus adjustment processing subroutine by TVAF control. FIG. 8 is a diagram for explaining TVAF control, where the horizontal axis represents the position of the focus lens 104 and the vertical axis represents the TVAF evaluation value. The step width of the focus lens drive amount set in S112 in FIG. 1 is represented as T8 as the number of pulses for one lens drive.

カメラMPU125は、S112で設定した駆動間隔T8で開始位置T7から撮像面位相差AFの合焦位置T2の方向にフォーカスレンズ104を駆動し、駆動間隔T8毎にTVAFの評価値を取得する(S301)。   The camera MPU 125 drives the focus lens 104 from the start position T7 to the in-focus position T2 of the imaging surface phase difference AF at the drive interval T8 set in S112, and acquires the TVAF evaluation value at each drive interval T8 (S301). ).

次に、カメラMPU125は、ピークが検出されたかどうか、即ちTVAFの評価値が増加から減少に切り替わり、ピーク判断の閾値T9以上の減少がされたかどうかを判断する(S302)。ピークを検出するための最初のTVAF評価値は、図1のS110の露光で得られるTVAF評価値を用いてもよい。カメラMPU125は、ピークが検出されないと判断すると(S302のNo)、フローはS301に帰還する。   Next, the camera MPU 125 determines whether or not a peak has been detected, that is, whether or not the TVAF evaluation value has been switched from increase to decrease, and whether or not the peak determination threshold T9 has been decreased (S302). As the first TVAF evaluation value for detecting the peak, the TVAF evaluation value obtained by the exposure in S110 of FIG. 1 may be used. If the camera MPU 125 determines that no peak is detected (No in S302), the flow returns to S301.

一方、ピークが検出されたと判断すると(S302のYes)、カメラMPU125は、現在の駆動間隔T8が狭いかどうか判断する(S303)。   On the other hand, if it is determined that a peak has been detected (Yes in S302), the camera MPU 125 determines whether the current driving interval T8 is narrow (S303).

カメラMPU125は、狭い駆動間隔T8でピークを検出していると判断すれば(S303のYes)、ピーク位置へフォーカスレンズ104を駆動する(S304)。   If the camera MPU 125 determines that a peak is detected at a narrow drive interval T8 (Yes in S303), the camera MPU 125 drives the focus lens 104 to the peak position (S304).

一方、カメラMPU125は、広い駆動間隔T8でピークを検出していると判断すれば(S303のNo)、カメラMPU125は、駆動間隔T8を狭く設定し(S305)TVAF合焦位置T11に向けて山登り駆動を行って評価値を取得する(S306)。   On the other hand, if the camera MPU 125 determines that a peak is detected at a wide driving interval T8 (No in S303), the camera MPU 125 sets the driving interval T8 narrow (S305) and climbs toward the TVAF in-focus position T11. Driving is performed to obtain an evaluation value (S306).

次に、カメラMPU125は、ピークが検出されたかどうか、即ち、TVAFの評価値が増加から減少に切り替わり、ピーク判断の閾値T9以上の減少がされたかどうかを判断する(S307)。カメラMPU125は、ピークが検出されていないと判断すると(S307のNo)、フローはS306に帰還する。一方、カメラMPU125は、ピークが検出されたと判断すると(S307のYes)、ピーク位置へフォーカスレンズ104を駆動する(S304)。   Next, the camera MPU 125 determines whether or not a peak has been detected, that is, whether or not the TVAF evaluation value has been switched from increasing to decreasing and the peak determination threshold T9 has been decreased (S307). If the camera MPU 125 determines that no peak is detected (No in S307), the flow returns to S306. On the other hand, when the camera MPU 125 determines that a peak has been detected (Yes in S307), it drives the focus lens 104 to the peak position (S304).

このように、カメラMPU125は、被写体像のコントラスト変化が大きくなることを見込めればTVAFにおけるフォーカスレンズ104のステップ幅を狭く設定して検出精度を確保し、コントラスト評価値変化が小さいと見込まれる場合は、ステップ幅を広く設定して応答性を向上し、ピーク検出後にステップ幅を狭く再設定する。このようなTVAF制御に関する判断は、カメラMPU125が行う。   In this way, if the camera MPU 125 is expected to increase the contrast change of the subject image, the step size of the focus lens 104 in the TVAF is set narrow to ensure detection accuracy, and the contrast evaluation value change is expected to be small. , Improve the responsiveness by setting a wide step width, and reset the step width narrowly after peak detection. Such determination regarding TVAF control is performed by the camera MPU 125.

S304でフォーカスレンズ104の駆動を終えるとTVAF制御による焦点調節処理を終了する。   When the driving of the focus lens 104 is finished in S304, the focus adjustment process by the TVAF control is finished.

ここで行うTVAFの結果に基づくフォーカスレンズの駆動は、第2のレンズ制御によるレンズ駆動と称することとする。第2のレンズ制御は、TVAFの結果に基づくため、比較的小さな駆動量の繰り返しレンズ駆動で構成され、比較的、低速なレンズ駆動となる。   The driving of the focus lens based on the result of TVAF performed here is referred to as lens driving by second lens control. Since the second lens control is based on the result of TVAF, the second lens control is configured by repeated lens driving with a relatively small driving amount, and the lens driving is relatively slow.

次に、撮像面位相差AF制御による焦点調節処理サブルーチンについて説明する。図9は、撮像面位相差AF制御による焦点調節処理サブルーチンのフローを示している。   Next, a focus adjustment subroutine by the imaging plane phase difference AF control will be described. FIG. 9 shows a flow of a focus adjustment processing subroutine by the imaging surface phase difference AF control.

図1のS110で行われた露光で得られた撮像面位相差AFに用いる出力信号を用いて算出されたデフォーカス量に対応したレンズ駆動量を算出する。   A lens driving amount corresponding to the defocus amount calculated using the output signal used for the imaging plane phase difference AF obtained by the exposure performed in S110 of FIG. 1 is calculated.

このように、S110の露光時の出力信号は、撮像面位相差AFやTVAFのいずれにも用いられる可能性がある。そのため、露光の度に、撮像面位相差焦点検出部によるデフォーカス量の算出とTVAF検出部によるコントラスト評価値をともに算出する。   Thus, the output signal at the time of exposure in S110 may be used for either imaging plane phase difference AF or TVAF. Therefore, for each exposure, the calculation of the defocus amount by the imaging surface phase difference focus detection unit and the contrast evaluation value by the TVAF detection unit are both calculated.

これにより、常に両方の焦点検出方式で焦点検出が行える。しかし、本発明の実施形態として、これに限る必要はなく、露光の度に、いずれか一方のみの焦点検出を行うようにしてもよい。その場合には、焦点検出に必要な演算量が減るという効果が得られる。   Thereby, focus detection can always be performed by both focus detection methods. However, the embodiment of the present invention is not limited to this, and only one of the focus detections may be performed for each exposure. In that case, an effect of reducing the amount of calculation required for focus detection can be obtained.

次に、算出されたレンズ駆動量に基づいて、第1のレンズ制御によるフォーカスレンズの駆動を行う(S402)。   Next, the focus lens is driven by the first lens control based on the calculated lens driving amount (S402).

その後、撮像素子122への露光を行い、少なくとも撮像面位相差AFの出力信号を得て、算出されるデフォーカス量から、合焦しているか否かを判断する(S403)。   After that, exposure to the image sensor 122 is performed to obtain at least an output signal of the imaging surface phase difference AF, and it is determined whether or not it is in focus from the calculated defocus amount (S403).

合焦している場合(S403でYes)には、撮像面位相差AF制御による焦点調節処理を終える。合焦していない場合(S403でNo)には、S401に帰還する。ここでは、レンズ駆動後、必ず合焦判定を行うために、デフォーカス量を再度算出するように説明したが、実施形態はこれに限らない。S401で算出されたレンズ駆動量が、所定値より小さい場合には、検出されたデフォーカス量やレンズ駆動の誤差が少ないと判断し、合焦判定を省くことができる。   If it is in focus (Yes in S403), the focus adjustment process by the imaging surface phase difference AF control is finished. If it is not in focus (No in S403), the process returns to S401. Here, the defocus amount is calculated again in order to always perform the focus determination after driving the lens, but the embodiment is not limited thereto. When the lens driving amount calculated in S401 is smaller than the predetermined value, it is determined that the detected defocus amount and lens driving error are small, and the focus determination can be omitted.

以上のように、撮像面位相差AFやTVAFに用いる信号以外の出力信号から、それぞれのAFの信頼性を鑑みて、各々のAF制御の選択を行うことにより、焦点調節の精度と速度を両立した焦点調節を行うことができる。   As described above, by selecting each AF control from the output signals other than the signals used for imaging plane phase difference AF and TVAF in consideration of the reliability of each AF, both the accuracy and speed of focus adjustment are achieved. Focus adjustment can be performed.

122 撮像素子
100 撮影光学系
129 撮像面位相差焦点検出部(第1の焦点検出部)
130 TVAF焦点検出部(第2の焦点検出部)
125 カメラMPU
122 Imaging element 100 Imaging optical system 129 Imaging surface phase difference focus detection unit (first focus detection unit)
130 TVAF focus detection unit (second focus detection unit)
125 camera MPU

Claims (8)

フォーカスレンズを有する撮影光学系により結像された被写体像を撮像する複数の撮影用画素と前記複数の撮影用画素内に離散的に配置され焦点検出用画素を有する撮像素子と、前記撮影光学系の異なる瞳領域を通過する複数の光束を検出する前記焦点検出用画素から出力される第1の画素信号に基づいて位相差AFを行う第1の制御手段と、前記撮影光学系の瞳領域を通過する複数の光束を検出する前記撮影用画素から出力される第2の画素信号に基づいてコントラストAFを行う第2の制御手段と、前記第2の画素信号から被写体情報を抽出する被写体情報抽出手段と、を有する撮像装置であって、
前記第2の画素信号から抽出された被写体情報を用いて、前記位相差AFと前記コントラストAFを切換える第3の制御手段を有することを特徴とする撮像装置。
A plurality of photographic pixels for imaging a subject image formed by a photographic optical system having a focus lens; an imaging device having focus detection pixels discretely arranged in the plurality of photographic pixels; and the photographic optical system First control means for performing phase difference AF based on a first pixel signal output from the focus detection pixel that detects a plurality of light fluxes passing through different pupil regions, and a pupil region of the photographing optical system. Second control means for performing contrast AF based on a second pixel signal output from the photographing pixel for detecting a plurality of light beams passing therethrough, and subject information extraction for extracting subject information from the second pixel signal An imaging device comprising:
An image pickup apparatus comprising: third control means for switching between the phase difference AF and the contrast AF using subject information extracted from the second pixel signal.
前記第3の制御手段は、前記第1の画素信号を用いず前記第2の画素信号から抽出された被写体情報に基づいて算出された位相差AFの信頼性が低いと判断された場合、前記位相差AFから前記前記コントラストAFに切換える請求項1に記載の撮像装置。   When the third control means determines that the reliability of the phase difference AF calculated based on subject information extracted from the second pixel signal without using the first pixel signal is low, The imaging apparatus according to claim 1, wherein the phase difference AF is switched to the contrast AF. 前記第3の制御手段は、前記第1の画素信号を用いず前記第2の画素信号から抽出された被写体情報に基づいて算出されたコントラストAFの信頼性が低いと判断された場合、前記コントラストAFから前記位相差AFに切換える請求項1に記載の撮像装置。   If the third control means determines that the contrast AF calculated based on the subject information extracted from the second pixel signal without using the first pixel signal has low reliability, the contrast The imaging apparatus according to claim 1, wherein AF is switched to the phase difference AF. 前記第2の画素信号から抽出された被写体情報は、前記焦点検出用画素の焦点検出の精度と相関のある情報又は前記撮影用画素の焦点検出の精度と相関のある情報である請求項1乃至3の何れか一項に記載の撮像装置。   The subject information extracted from the second pixel signal is information correlated with focus detection accuracy of the focus detection pixel or information correlated with focus detection accuracy of the photographing pixel. 4. The imaging device according to any one of 3. 前記第2の画素信号から抽出された被写体情報は、前記焦点検出用画素の焦点検出の精度と相関のあるコントラスト情報及び前記焦点検出用画素の焦点検出の精度と相関のある被写体像の空間周波数情報及び前記焦点検出用画素の焦点検出の精度と相関のある被写体像に含まれる迷光情報のうち少なくとも1つである請求項4に記載の撮像装置。   The subject information extracted from the second pixel signal includes the contrast information correlated with the focus detection accuracy of the focus detection pixel and the spatial frequency of the subject image correlated with the focus detection accuracy of the focus detection pixel. The imaging apparatus according to claim 4, which is at least one of stray light information included in a subject image correlated with information and a focus detection accuracy of the focus detection pixel. 前記第2の画素信号から抽出された被写体情報は、前記撮影用画素の焦点検出の精度と相関のある被写体像の輝度情報及び前記撮影用画素の焦点検出の精度と相関のある被写体像の経時による変化量情報及び前記撮影用画素の焦点検出の精度と相関のある被写体像のコントラスト情報うち少なくとも1つである請求項4又は5に記載の撮像装置。   The subject information extracted from the second pixel signal includes the luminance information of the subject image correlated with the focus detection accuracy of the shooting pixel and the time-lapse of the subject image correlated with the focus detection accuracy of the shooting pixel. 6. The imaging apparatus according to claim 4, wherein at least one of the information on the amount of change due to the difference between the image and the contrast information of the subject image correlated with the focus detection accuracy of the imaging pixel. 前記第2の制御手段は、前記被写体像のコントラスト情報及び前記被写体像の輝度情報の少なくとも1つに基づいて前記フォーカスレンズのレンズ駆動量の駆動幅を可変する請求項1乃至6の何れか一項に記載の撮像装置。   The said 2nd control means changes the drive width of the lens drive amount of the said focus lens based on at least 1 of the contrast information of the said subject image, and the luminance information of the said subject image. The imaging device according to item. フォーカスレンズを有する撮影光学系により結像された被写体像を撮像する複数の撮影用画素と前記複数の撮影用画素内に離散的に配置され焦点検出用画素を有する撮像素子と、前記撮影光学系の異なる瞳領域を通過する複数の光束を検出する前記焦点検出用画素から出力される第1の画素信号に基づいて位相差AFを行う第1の制御手段と、前記撮影光学系の瞳領域を通過する複数の光束を検出する前記撮影用画素から出力される第2の画素信号に基づいてコントラストAFを行う第2の制御手段と、前記第2の画素信号から被写体情報を抽出する被写体情報抽出手段と、を有する撮像装置の制御方法であって、
前記第2の画素信号から抽出された被写体情報を用いて、前記位相差AFと前記コントラストAFを切換える第3の制御手段を有することを特徴とする撮像装置の制御方法。
A plurality of photographic pixels for imaging a subject image formed by a photographic optical system having a focus lens; an imaging device having focus detection pixels discretely arranged in the plurality of photographic pixels; and the photographic optical system First control means for performing phase difference AF based on a first pixel signal output from the focus detection pixel that detects a plurality of light fluxes passing through different pupil regions, and a pupil region of the photographing optical system. Second control means for performing contrast AF based on a second pixel signal output from the photographing pixel for detecting a plurality of light beams passing therethrough, and subject information extraction for extracting subject information from the second pixel signal A method of controlling an imaging apparatus comprising:
A control method for an imaging apparatus, comprising: third control means for switching between the phase difference AF and the contrast AF using subject information extracted from the second pixel signal.
JP2012131119A 2012-06-08 2012-06-08 Imaging device Expired - Fee Related JP5963552B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012131119A JP5963552B2 (en) 2012-06-08 2012-06-08 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012131119A JP5963552B2 (en) 2012-06-08 2012-06-08 Imaging device

Publications (2)

Publication Number Publication Date
JP2013254166A true JP2013254166A (en) 2013-12-19
JP5963552B2 JP5963552B2 (en) 2016-08-03

Family

ID=49951674

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012131119A Expired - Fee Related JP5963552B2 (en) 2012-06-08 2012-06-08 Imaging device

Country Status (1)

Country Link
JP (1) JP5963552B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015129846A (en) * 2014-01-07 2015-07-16 キヤノン株式会社 Image capturing device and control method therefor
JP2015155952A (en) * 2014-02-20 2015-08-27 キヤノン株式会社 Imaging apparatus, control method of imaging apparatus, program, and storage medium
JP2015203793A (en) * 2014-04-15 2015-11-16 キヤノン株式会社 Image capturing device, control device, control method, program, and storage medium
WO2016039528A1 (en) * 2014-09-11 2016-03-17 삼성전자 주식회사 Imaging device comprising fill-light projector, and autofocus method using imaging device
JP2016143003A (en) * 2015-02-04 2016-08-08 キヤノン株式会社 Imaging apparatus and control method thereof
US9742985B2 (en) 2015-03-19 2017-08-22 Canon Kabushiki Kaisha Automatic focus adjustment apparatus and control method therefor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006178343A (en) * 2004-12-24 2006-07-06 Nikon Corp Electronic camera
JP2008191391A (en) * 2007-02-05 2008-08-21 Nikon Corp Focusing mechanism, and camera
JP2010204294A (en) * 2009-03-02 2010-09-16 Canon Inc Image capturing apparatus
JP2010256824A (en) * 2009-04-28 2010-11-11 Canon Inc Imaging apparatus
JP2011197277A (en) * 2010-03-18 2011-10-06 Fujifilm Corp Three-dimensional imaging apparatus
WO2012133413A1 (en) * 2011-03-31 2012-10-04 富士フイルム株式会社 Imaging device, method for controlling imaging device, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006178343A (en) * 2004-12-24 2006-07-06 Nikon Corp Electronic camera
JP2008191391A (en) * 2007-02-05 2008-08-21 Nikon Corp Focusing mechanism, and camera
JP2010204294A (en) * 2009-03-02 2010-09-16 Canon Inc Image capturing apparatus
JP2010256824A (en) * 2009-04-28 2010-11-11 Canon Inc Imaging apparatus
JP2011197277A (en) * 2010-03-18 2011-10-06 Fujifilm Corp Three-dimensional imaging apparatus
WO2012133413A1 (en) * 2011-03-31 2012-10-04 富士フイルム株式会社 Imaging device, method for controlling imaging device, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015129846A (en) * 2014-01-07 2015-07-16 キヤノン株式会社 Image capturing device and control method therefor
JP2015155952A (en) * 2014-02-20 2015-08-27 キヤノン株式会社 Imaging apparatus, control method of imaging apparatus, program, and storage medium
JP2015203793A (en) * 2014-04-15 2015-11-16 キヤノン株式会社 Image capturing device, control device, control method, program, and storage medium
WO2016039528A1 (en) * 2014-09-11 2016-03-17 삼성전자 주식회사 Imaging device comprising fill-light projector, and autofocus method using imaging device
JP2016143003A (en) * 2015-02-04 2016-08-08 キヤノン株式会社 Imaging apparatus and control method thereof
US9742985B2 (en) 2015-03-19 2017-08-22 Canon Kabushiki Kaisha Automatic focus adjustment apparatus and control method therefor

Also Published As

Publication number Publication date
JP5963552B2 (en) 2016-08-03

Similar Documents

Publication Publication Date Title
JP5388544B2 (en) Imaging apparatus and focus control method thereof
JP5653035B2 (en) Imaging apparatus, focus detection method, and control method
US10264173B2 (en) Image capturing apparatus and control method thereof, and storage medium
US20120268613A1 (en) Image capturing apparatus and control method thereof
JP5618712B2 (en) Automatic focusing device and imaging device
JP2011017800A (en) Focus detection apparatus
JP2007322922A (en) Imaging system and camera, and lens unit
JP5963552B2 (en) Imaging device
JP5366643B2 (en) Imaging device
US9781330B2 (en) Focus detection apparatus and control method for focus detection apparatus
JP2017211487A (en) Imaging apparatus and automatic focus adjustment method
JP5402298B2 (en) Focus detection device and camera
JP6300670B2 (en) Focus adjustment apparatus, focus adjustment method and program, and imaging apparatus
JP2015152749A (en) Imaging device and control method of the same
JP6271911B2 (en) Imaging apparatus, control method therefor, and defocus amount calculation method
JP4888249B2 (en) Focus detection apparatus and imaging apparatus
JP2012208507A (en) Image tracking device
JP5023750B2 (en) Ranging device and imaging device
JP2016142924A (en) Imaging apparatus, method of controlling the same, program, and storage medium
JP2014142497A (en) Imaging apparatus and method for controlling the same
JP2010200138A (en) Photographic subject tracking device
JP5590850B2 (en) Imaging device and focus control method of imaging device
JP2010072559A (en) Imaging apparatus and object area extracting method
JP5447579B2 (en) Tracking device, focus adjustment device, and photographing device
JP2009031562A (en) Light receiving element, light receiver, focus detecting device, camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150415

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160330

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160628

R151 Written notification of patent or utility model registration

Ref document number: 5963552

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees