JP2015138201A - Image capturing device and image capturing method - Google Patents

Image capturing device and image capturing method Download PDF

Info

Publication number
JP2015138201A
JP2015138201A JP2014010703A JP2014010703A JP2015138201A JP 2015138201 A JP2015138201 A JP 2015138201A JP 2014010703 A JP2014010703 A JP 2014010703A JP 2014010703 A JP2014010703 A JP 2014010703A JP 2015138201 A JP2015138201 A JP 2015138201A
Authority
JP
Japan
Prior art keywords
focus
focus adjustment
adjustment position
focus detection
value
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
JP2014010703A
Other languages
Japanese (ja)
Other versions
JP2015138201A5 (en
JP6415054B2 (en
Inventor
英之 浜野
Hideyuki Hamano
英之 浜野
友美 渡邉
Tomomi Watanabe
友美 渡邉
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 JP2014010703A priority Critical patent/JP6415054B2/en
Publication of JP2015138201A publication Critical patent/JP2015138201A/en
Publication of JP2015138201A5 publication Critical patent/JP2015138201A5/ja
Application granted granted Critical
Publication of JP6415054B2 publication Critical patent/JP6415054B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image capturing device capable of making more accurate focus adjustment by correcting an essential focus detection error, which is a difference in a focusing condition between a captured image and a focus detection result.SOLUTION: An image capturing device of the present invention includes: third computation means for computing a third focus adjustment position for recording signals by correcting either of a first focus adjustment position or a second focus adjustment position using a correction value; focus adjustment means for making focus adjustment for the recording signals using the third focus adjustment position; and determination mean for determining reliability of a first focus evaluation value corresponding to the first focus adjustment position and a second focus evaluation value corresponding to the second focus adjustment position. The correction value is modified in accordance with a result of determination made by the determination means.

Description

本発明は、撮像装置及び撮像方法に関し、更に詳しくは、自動焦点調節機能を有する撮像装置に関するものである。   The present invention relates to an imaging apparatus and an imaging method, and more particularly to an imaging apparatus having an automatic focus adjustment function.

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

この種の焦点調節方法は、光学系の所収差により、焦点検出結果に誤差を含む場合があり、その誤差を低減するための方法が、種々提案されている。   This type of focus adjustment method may include an error in the focus detection result due to the aberration of the optical system, and various methods for reducing the error have been proposed.

例えば、特許文献1には、焦点検出を行うために用いる信号の評価方向に関して、複数評価し、各々の評価結果を重み付けすることにより、焦点検出を行う方法が開示されている。   For example, Patent Document 1 discloses a method of performing focus detection by evaluating a plurality of evaluation directions of signals used for focus detection and weighting each evaluation result.

このような焦点検出誤差は、上述の焦点調節方法によらず、コントラストAF方式や位相差AF方式に用いられる焦点調節用信号列を取得する画素の撮像素子上での方向によって発生する。この誤差は、例えば、非点収差が発生する光学系を有する撮像装置を用いた場合などに発生する。   Such a focus detection error occurs depending on the direction on the image sensor of the pixel that acquires the focus adjustment signal sequence used in the contrast AF method or the phase difference AF method, regardless of the focus adjustment method described above. This error occurs, for example, when an imaging apparatus having an optical system that generates astigmatism is used.

特開2007‐94236号公報JP 2007-94236 A

しかしながら、上記従来技術の構成では、焦点検出誤差の補正を十分に行えないといった問題がある。特許文献1では、焦点検出誤差を低減するために、焦点調節用信号の評価方向を水平方向と垂直方向とし、その評価方向ごとに検出した焦点検出結果を、重み付けすることで、焦点検出を行う。   However, the configuration of the above prior art has a problem that the focus detection error cannot be sufficiently corrected. In Patent Document 1, in order to reduce the focus detection error, the evaluation direction of the focus adjustment signal is set to the horizontal direction and the vertical direction, and the focus detection result detected for each evaluation direction is weighted to perform focus detection. .

一方で、1方向のみの焦点調節用信号を用いて焦点検出を行い、検出結果に対して、予め記憶した補正値により補正を行うことにより、上述の焦点検出誤差を低減することも考えられる。   On the other hand, it is also conceivable to reduce the above-described focus detection error by performing focus detection using a focus adjustment signal in only one direction and correcting the detection result with a correction value stored in advance.

上述の特許文献1のように複数の方向の焦点検出を行う場合においても、いずれかの方向の焦点検出が、何らかの理由により不可能な場合には、焦点検出結果に対して補正値を持って補正を行うという方法は、有効である。   Even when focus detection in a plurality of directions is performed as in Patent Document 1 described above, if focus detection in any direction is impossible for some reason, the focus detection result has a correction value. The method of performing correction is effective.

しかしながら、複数の方向を評価方向とした焦点調節用信号を用いた焦点検出において、各方向の焦点調節用信号を用いて、いずれかの方向の焦点検出結果を補正する方法については、上述の特許文献1では、言及されていない。   However, in the focus detection using the focus adjustment signal with a plurality of directions as the evaluation directions, the method for correcting the focus detection result in any direction using the focus adjustment signal in each direction is described in the above-mentioned patent. Reference 1 does not mention it.

本発明は上記の問題点に鑑み、焦点検出を複数の評価方向で行う場合に、評価方向起因で発生する焦点検出誤差を、複数の方向の焦点調節用信号を用いて補正することにより、より高精度に焦点調節を行う撮像装置を提供することを目的とする。   In view of the above-described problems, the present invention corrects a focus detection error caused by an evaluation direction by using a focus adjustment signal in a plurality of directions when performing focus detection in a plurality of evaluation directions. An object of the present invention is to provide an imaging apparatus that performs focus adjustment with high accuracy.

そこで、上記目的を達成するために、本発明では、撮像素子と、前記撮像素子から出力された記録用信号を記録する記録手段と、前記撮像素子の第1の方向に配列された複数の画素から出力される出力信号を用いて第1の焦点調節位置を算出する第1の算出手段と、前記撮像素子の第1の方向と異なる第2の方向に配列された複数の画素から出力される出力信号を用いて第2の焦点調節位置を算出する第2の算出手段と、前記第1の焦点調節位置及び前記第2の焦点調節位置の何れか一方の焦点調節位置を補正値を用いて補正することで前記記録用信号の第3の焦点調節位置を算出する第3の算出手段と、前記第3の焦点調節位置を用いて前記記録用信号の焦点調節を行う焦点調節手段と、前記第1の焦点調節位置に対応する第1の焦点評価値及び前記第2の焦点調節位置に対応する第2の焦点評価値の信頼性を判定する判定手段と、を有する撮像装置であって、
前記判定手段の判定結果に応じて、前記補正値を変更することを特徴とする。
Therefore, in order to achieve the above object, in the present invention, an imaging device, recording means for recording a recording signal output from the imaging device, and a plurality of pixels arranged in a first direction of the imaging device Output from a plurality of pixels arranged in a second direction different from the first direction of the image sensor, and first calculation means for calculating a first focus adjustment position using an output signal output from A second calculation means for calculating a second focus adjustment position using the output signal, and a focus adjustment position of one of the first focus adjustment position and the second focus adjustment position using a correction value; Third calculation means for calculating a third focus adjustment position of the recording signal by correcting, focus adjustment means for adjusting the focus of the recording signal using the third focus adjustment position, and First focus evaluation corresponding to the first focus adjustment position And an imaging device having a determining means for determining reliability of the second focus evaluating value corresponding to the second focusing position,
The correction value is changed according to a determination result of the determination unit.

本発明によれば、焦点検出を複数の評価方向で行う場合に、評価方向起因で発生する焦点検出誤差を、複数の方向の焦点調節用信号を用いて補正することにより、より高精度に焦点調節を行うことができる。   According to the present invention, when focus detection is performed in a plurality of evaluation directions, the focus detection error caused by the evaluation direction is corrected by using the focus adjustment signals in the plurality of directions, so that focus can be performed with higher accuracy. Adjustments can be made.

本発明の実施例におけるAF動作手順を示すフローチャートである。It is a flowchart which shows AF operation | movement procedure in the Example of this invention. 本発明の実施の形態におけるデジタルカメラの概略構成を示すブロック図。1 is a block diagram showing a schematic configuration of a digital camera in an embodiment of the present invention. 受光画素をレンズユニット100側から見た平面図。The top view which looked at the light reception pixel from the lens unit 100 side. 撮影用画素の構造を説明する平面図と断面図。The top view and sectional drawing explaining the structure of the pixel for imaging | photography. 撮影レンズの水平方向に瞳分割を行う焦点検出用画素の構造を説明する平面図と断面図。The top view and sectional drawing explaining the structure of the pixel for a focus detection which divides a pupil in the horizontal direction of an imaging lens. 本発明の実施例における各種AF要評価値を算出する回路のブロック図である。It is a block diagram of the circuit which calculates various AF required evaluation values in the Example of this invention. 撮影範囲内の焦点検出領域及び被写体の状況の例を示す図。The figure which shows the example of the focus detection area | region in a imaging | photography range, and the condition of a to-be-photographed object. 本発明の実施例における縦横BP補正値(BP1)を算出する流れを示したサブルーチンである。It is the subroutine which showed the flow which calculates the vertical / horizontal BP correction value (BP1) in the Example of this invention. 本発明の実施例における縦横BP補正情報の例を示す図である。It is a figure which shows the example of the vertical / horizontal BP correction information in the Example of this invention. 本発明の実施例におけるフォーカスレンズ104の位置と焦点評価値の関係を示した図である。It is the figure which showed the relationship between the position of the focus lens 104 in an Example of this invention, and a focus evaluation value. 本発明の実施例における色BP補正値(BP2)を算出する流れを示したサブルーチンである。7 is a subroutine showing a flow of calculating a color BP correction value (BP2) in an embodiment of the present invention. 本発明の実施例における色BP補正情報の例を示す図である。It is a figure which shows the example of the color BP correction information in the Example of this invention. 本発明の実施例における空間周波数BP補正値(BP3)を算出する流れを示したサブルーチンである。It is a subroutine which showed the flow which calculates the spatial frequency BP correction value (BP3) in the Example of this invention. 本発明の実施例における撮影光学系のデフォーカスMTFを示す図である。It is a figure which shows the defocus MTF of the imaging optical system in the Example of this invention. 本発明の実施例における各種空間周波数特性を示す図である。It is a figure which shows the various spatial frequency characteristics in the Example of this invention. 本発明の実施例における撮影画像の評価帯域やAFの評価帯域を考慮したデフォーカスMTFを示す図である。It is a figure which shows the defocus MTF which considered the evaluation zone | band of the picked-up image in the Example of this invention, and the evaluation zone | band of AF. 本発明の実施例における撮影光学系のデフォーカスMTFの極大値に関する情報を示す図である。It is a figure which shows the information regarding the maximum value of the defocus MTF of the imaging optical system in the Example of this invention. 本発明の第3の実施例における空間周波数BP補正値(BP3)を算出する流れを示したサブルーチンである。It is a subroutine which showed the flow which calculates the spatial frequency BP correction value (BP3) in the 3rd Example of this invention.

以下、図面を参照しながら本発明の好適な実施の形態を説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

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

(撮像装置の構成の説明)
図2は本実施例のデジタルカメラのブロック図である。本実施例のデジタルカメラは交換レンズ式一眼レフカメラであり、レンズユニット100とカメラ本体120とを有する。レンズユニット100は図中央の点線で示されるマウントMを介して、カメラ本体120と接続される。
(Description of configuration of imaging device)
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 a drive / control system. As described above, the lens unit 100 includes the focus lens 104 and includes a photographing lens that forms an image of the subject.

第1レンズ群101は、レンズユニット100の先端に配置され、光軸方向OAに進退可能に保持される。絞り兼用シャッタ102は、その開口径を調節することで撮影時の光量調節を行う他、静止画撮影時には露光秒時調節用シャッタとして機能する。   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.

絞り兼用シャッタ102及び第2レンズ群103は一体として光軸方向OAに進退し、第1レンズ群101の進退動作との連動によりズーム機能を実現する。フォーカスレンズ104は、光軸方向の進退により焦点調節を行う。   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を有する。   The drive / control system includes a zoom actuator 111, an aperture shutter actuator 112, a focus actuator 113, a zoom drive circuit 114, and an aperture shutter drive circuit 115.

駆動/制御系は、フォーカス駆動回路116、レンズMPU117、レンズメモリ118、シフト/チルト/回転操作部材140、変位量検出手段141、変位方向検出手段142を有する。   The drive / control system includes a focus drive circuit 116, a lens MPU 117, a lens memory 118, a shift / tilt / rotation operation member 140, a displacement amount detection means 141, and a displacement direction detection means 142.

ズームアクチュエータ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は、撮影レンズに係る全ての演算、制御を行い、ズーム駆動回路114、シャッタ駆動回路115、フォーカス駆動回路116、レンズメモリ118を制御する。また、レンズMPU117は、現在のレンズ位置を検出し、カメラMPU125からの要求に対してレンズ位置情報を通知する。   The lens MPU 117 performs all calculations and control related to the photographing lens, 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.

このレンズ位置情報は、フォーカスレンズの光軸上位置、撮影光学系が移動していない状態の射出瞳の光軸上位置、直径、射出瞳の光束を制限するレンズ枠の光軸上位置、直径などの情報を含む。レンズメモリ118には自動焦点調節に必要な光学情報を記憶する。   This lens position information includes the position on the optical axis of the focus lens, the position on the optical axis of the exit pupil when the imaging optical system is not moving, the diameter, the position on the optical axis of the lens frame that restricts the light flux of the exit pupil, and the diameter. Information. 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 drive / control system.

光学的ローパスフィルタ121と撮像素子122はレンズユニット100からの光束によって被写体像を形成する撮像光学系として機能する。第1レンズ群101、絞り兼用シャッタ102、第2レンズ群103、フォーカスレンズ群(以下、単に「フォーカスレンズ」という)104、光学的ローパスフィルタ121は、撮影光学系を構成している。   The optical low-pass filter 121 and the imaging element 122 function as an imaging optical system that forms a subject image with the light flux from the lens unit 100. The first lens group 101, the diaphragm shutter 102, the second lens group 103, the focus lens group (hereinafter simply referred to as “focus lens”) 104, and the optical low-pass filter 121 constitute a photographing optical system.

光学的ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。撮像素子122はC−MOSセンサとその周辺回路で構成され、横方向m画素、縦方向n画素が配置される。撮像素子122は、焦点検出装置の一部を有し、位相差検出方式AFを行うことができる。   The optical low-pass filter 121 reduces false colors and moire in the captured image. The image sensor 122 is composed of a C-MOS sensor and its peripheral circuits, and has m pixels in the horizontal direction and n pixels in the vertical direction. The image sensor 122 has a part of a focus detection device, and can perform phase difference detection AF.

得られた画像データの内、焦点検出に対応する画像データは、画像処理回路124で焦点検出用画像データに変換される。一方で、得られた画像データの内、表示や記録やTVAFのために用いられる画像データも、画像処理回路124に送られ、目的に合わせた所定の処理が行われる。   Of the obtained image data, image data corresponding to focus detection is converted into focus detection image data by the image processing circuit 124. On the other hand, among the obtained image data, image data used for display, recording, and TVAF is also sent to the image processing circuit 124, and predetermined processing according to the purpose is performed.

駆動/制御系は、撮像素子駆動回路123、画像処理回路124、カメラMPU125、表示器126、操作スイッチ群127、メモリ128、撮像面位相差焦点検出部129、TVAF焦点検出部130を有する。   The drive / control system includes an image sensor driving circuit 123, an image processing circuit 124, a camera MPU 125, 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.

カメラMPU(プロセッサ)125は、カメラ本体120に係る全ての演算、制御を行い、撮像素子駆動回路123、画像処理回路124、表示器126、操作SW127、メモリ128、撮像面位相差焦点検出部129、TVAF焦点検出部130を制御する。カメラMPU125はマウントMの信号線を介してレンズMPU117と接続され、レンズMPU117に対してレンズ位置の取得や所定の駆動量でのレンズ駆動要求を発行したり、レンズユニット100に固有の光学情報を取得したりする。   The camera MPU (processor) 125 performs all calculations and controls related to the camera body 120, and includes an image sensor driving circuit 123, an image processing circuit 124, a display 126, an operation SW 127, a memory 128, and an imaging surface phase difference focus detection unit 129. The TVAF focus detection unit 130 is controlled. The camera MPU 125 is connected to the lens MPU 117 via the signal line of the mount M, and obtains the lens position, issues a lens driving request with a predetermined driving amount to the lens MPU 117, and transmits optical information specific to the lens unit 100. Or get it.

カメラMPU125には、カメラ動作を制御するプログラムを格納したROM125a、変数を記憶するRAM125b、諸パラメータを記憶するEEPROM125cが内蔵されている。   The camera MPU 125 includes a ROM 125a that stores a program for controlling camera operations, a RAM 125b that stores variables, and an EEPROM 125c that stores various parameters.

更に、カメラMPU125は、ROM125aに格納したプログラムにより焦点検出処理を実行する。焦点検出処理は、瞳の異なる領域を通過した光束により形成される光学像を光電変換した対の像信号を用いて、公知の相関演算処理を実行する。また、カメラMPU125は、撮像面位相差AFにおいて、焦点調節位置の像高が大きい時にケラレの影響が大きく信頼度が低下するため、その補正も行う。   Further, the camera MPU 125 executes focus detection processing by a program stored in the ROM 125a. In the focus detection process, a known correlation calculation process is executed using a pair of image signals obtained by photoelectrically converting an optical image formed by a light beam that has passed through different areas of the pupil. The camera MPU 125 also corrects the imaging surface phase difference AF because the influence of vignetting is large and the reliability decreases when the image height at the focus adjustment 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. A memory 128 serving as a recording unit according to the present exemplary embodiment is a detachable flash memory that records captured images.

撮像面位相差焦点検出部129は、撮像素子122、画像処理回路124により得られる焦点検出用画像データの像信号により位相差検出方式AFでの焦点検出処理を行う。   The imaging surface phase difference focus detection unit 129 performs focus detection processing by the phase difference detection method AF based on the image signal of the image data for focus detection obtained by the imaging element 122 and the image processing circuit 124.

より具体的には、撮像面位相差焦点検出部129は、撮像光学系の一対の瞳領域を通過する光束により焦点検出用画素に形成される一対の像のずれ量に基づいて撮像面位相差AFを行う。撮像面位相差AFの方法については、後に詳細に説明する。   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. The method of imaging plane phase difference AF will be described later in detail.

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

このように、本実施例は撮像面位相差AFとTVAFを組み合わせており、状況に応じて、選択的に使用したり、組み合わせて使用したりすることができる。撮像面位相差AFとTVAFは、各々の焦点検出結果を用いて、フォーカスレンズ104の位置を制御する制御手段として機能している。   As described above, the present embodiment combines the imaging surface phase difference AF and the TVAF, and can be selectively used or combined according to the situation. The imaging plane phase difference AF and TVAF function as control means for controlling the position of the focus lens 104 using the respective focus detection results.

(焦点検出装置の説明)
以上が、レンズユニット100とカメラ本体120からなるカメラシステムの構成である。次に、撮像素子122の信号を用いた焦点検出装置について詳細を説明する。この焦点検出装置は位相差検出方式AFとコントラスト方式AFを採用している。その構成について説明する。
(Description of focus detection device)
The above is the configuration of the camera system including the lens unit 100 and the camera body 120. Next, details of the focus detection apparatus using the signal of the image sensor 122 will be described. This focus detection apparatus employs phase difference detection AF and contrast AF. The configuration will be described.

(位相差検出方式AFの説明)
最初に、図3から図5を用いて、位相差検出方式AFの構成について説明する。
(Description of phase difference detection AF)
First, the configuration of the phase difference detection method AF will be described with reference to FIGS.

図3は本実施例における撮像素子の画素配列を示した図で、2次元C−MOSエリアセンサの縦(Y方向)6行と横(X方向)8列の範囲を、撮影光学系側から観察した状態を示している。カラーフィルタはベイヤー配列が適用され、奇数行の画素には、左から順に緑(Green)と赤(Red)のカラーフィルタが交互に設けられる。   FIG. 3 is a diagram showing a pixel arrangement of the image sensor in the present embodiment. A range of 6 rows and 8 columns in the horizontal (X direction) of the two-dimensional C-MOS area sensor is viewed from the photographing optical system side. The observed state is shown. A Bayer arrangement is applied to the color filters, and green (Red) and red (Red) color filters are alternately provided in order from the left on pixels in odd rows.

また、偶数行の画素には、左から順に青(Blue)と緑(Green)のカラーフィルタが交互に設けられる。円211iはオンチップマイクロレンズを表わす。オンチップマイクロレンズの内側に配置された複数の矩形はそれぞれ光電変換部である。   In addition, blue (Blue) and green (Green) color filters are alternately provided in order from the left in the pixels in even rows. A circle 211i represents an on-chip microlens. Each of the plurality of rectangles arranged inside the on-chip microlens is a photoelectric conversion unit.

本実施例では、すべての画素の光電変換部はX方向に2分割され、分割された一方の領域の光電変換信号と2つの光電変換信号の和は独立して読み出しできる構成となっている。そして、独立して読み出しされた信号は、2つの光電変換信号の和と分割された一方の領域の光電変換信号との差分をとることにより、もう一方の光電変換領域で得られる信号に相当する信号を得ることができる。   In this embodiment, the photoelectric conversion units of all the pixels are divided into two in the X direction, and the sum of the photoelectric conversion signal of one divided region and the two photoelectric conversion signals can be read independently. The signal read out independently corresponds to the signal obtained in the other photoelectric conversion region by taking the difference between the sum of the two photoelectric conversion signals and the divided photoelectric conversion signal in one region. A signal can be obtained.

これらの分割された領域の光電変換信号は、後述する方法で位相差式焦点検出に用いられるほか、視差情報を有した複数画像から構成される3D(3−Dimensional)画像を生成することもできる。一方で、2つの光電変換信号の和は、通常の撮影画像として用いられる。   The photoelectric conversion signals of these divided regions can be used for phase difference focus detection by a method described later, and can also generate a 3D (3-Dimensional) image composed of a plurality of images having parallax information. . On the other hand, the sum of two photoelectric conversion signals is used as a normal captured image.

ここで、位相差式焦点検出を行なう場合の画素信号について説明する。後述するように、本実施例においては、図3のマイクロレンズ211iと、分割された光電変換部211a及び211bで、撮影光学系の射出光束を瞳分割する。   Here, a pixel signal in the case of performing phase difference focus detection will be described. As will be described later, in this embodiment, the exit lens of the photographing optical system is pupil-divided by the microlens 211i of FIG. 3 and the divided photoelectric conversion units 211a and 211b.

そして、同一行上に配置された所定範囲内の複数の画素211において、光電変換部211aの出力をつなぎ合わせて編成したものをAF用A像、同じく光電変換部211bの出力をつなぎ合わせて編成したものをAF用B像とする。光電変換部211a、211bの出力は、ベイヤー配列の緑、赤、青、緑の出力を加算したもので、疑似的に輝度(Y)信号として算出されたものを用いる。   Then, in a plurality of pixels 211 within a predetermined range arranged on the same row, the result of joining the outputs of the photoelectric conversion unit 211a and the output of the photoelectric conversion unit 211b are joined together. This is used as an AF B image. The outputs of the photoelectric conversion units 211a and 211b are obtained by adding outputs of green, red, blue, and green in a Bayer array, and are used as pseudo-yield (Y) signals.

但し、赤、青、緑の色ごとに、AF用A像、B像を編成してもよい。このように生成したAF用A像とB像の相対的な像ずれ量を相関演算により検出することで、所定領域の焦点ずれ量、すなわちデフォーカス量を検出することができる。   However, the AF A image and the B image may be knitted for each of red, blue, and green colors. By detecting the relative image shift amount between the AF A image and the B image generated in this way by correlation calculation, it is possible to detect the defocus amount, that is, the defocus amount in a predetermined area.

本実施例では、AF用A像もしくはB像は、いずれか一方は撮像素子からは出力されないが、上述した通り、A像出力とB像出力の和は出力されるため、その出力と他方の出力の差分から、もう一方の信号を得ることができ、焦点検出を行うことができる。   In this embodiment, either the AF A image or the B image is not output from the image sensor, but as described above, the sum of the A image output and the B image output is output. The other signal can be obtained from the output difference, and focus detection can be performed.

上記の撮像素子は、特開2004−134867号公報に開示された技術を用いて製造することができるため、詳細構造に関する説明は省略する。   Since the above-described imaging element can be manufactured using the technique disclosed in Japanese Patent Application Laid-Open No. 2004-134867, description regarding the detailed structure is omitted.

図4は本実施例の撮像素子における読み出し回路の構成を示した図である。151は水平走査回路、153は垂直走査回路である。そして各画素の境界部には、水平走査ライン152a及び152bと、垂直走査ライン154a及び154bが配線され、各光電変換部はこれらの走査ラインを介して信号が外部に読み出される。   FIG. 4 is a diagram showing a configuration of a readout circuit in the image sensor of the present embodiment. Reference numeral 151 denotes a horizontal scanning circuit, and 153 denotes a vertical scanning circuit. In addition, horizontal scanning lines 152a and 152b and vertical scanning lines 154a and 154b are wired at the boundary between the pixels, and signals are read out to the photoelectric conversion units through these scanning lines.

なお、本実施例の撮像素子は以下の2種類の読み出しモードを有する。第1の読み出しモードは全画素読み出しモードと称するもので、高精細静止画を撮像するためのモードである。この場合は、全画素の信号が読み出される。   Note that the image sensor of the present embodiment has the following two types of readout modes. The first readout mode is called an all-pixel readout mode and is a mode for capturing a high-definition still image. In this case, signals of all pixels are read out.

第2の読み出しモードは間引き読み出しモードと称するもので、動画記録、もしくはプレビュー画像の表示のみを行なうためのモードである。この場合に必要な画素数は全画素よりも少ないため、画素群はX方向及びY方向ともに所定比率に間引いた画素のみ読み出す。   The second readout mode is called a thinning readout mode, and is a mode for performing only moving image recording or preview image display. In this case, since the number of necessary pixels is smaller than that of all the pixels, the pixel group reads out only the pixels thinned out at a predetermined ratio in both the X direction and the Y direction.

また、高速に読み出す必要がある場合にも、同様に間引き読み出しモードを用いる。X方向に間引く際には、信号の加算を行いS/Nの改善を図り、Y方向に対する間引きは、間引かれる行の信号出力を無視する。位相差検出方式、コントラスト検出方式の焦点検出も通常は、第2の読み出しモードで行われる。   Also, when it is necessary to read at high speed, the thinning-out reading mode is used in the same manner. When thinning out in the X direction, signals are added to improve the S / N ratio, and thinning out in the Y direction ignores the signal output of the thinned out rows. The focus detection by the phase difference detection method and the contrast detection method is also normally performed in the second readout mode.

図5A、5Bは、本実施例の撮像装置において、撮影光学系の射出瞳面と、像高ゼロすなわち像面中央近傍に配置された撮像素子の光電変換部の共役関係を説明する図である。撮像素子内の光電変換部と撮影光学系の射出瞳面は、オンチップマイクロレンズによって共役関係となるように設計される。   5A and 5B are diagrams for explaining the conjugate relationship between the exit pupil plane of the imaging optical system and the photoelectric conversion unit of the image sensor disposed near the center of the image plane, that is, in the vicinity of the center of the image plane, in the imaging apparatus of the present embodiment. . The photoelectric conversion unit in the image sensor and the exit pupil plane of the photographing optical system are designed to have a conjugate relationship by an on-chip microlens.

そして、撮影光学系の射出瞳は、一般的に光量調節用の虹彩絞りが置かれる面とほぼ一致する。一方、本実施例の撮影光学系は変倍機能を有したズームレンズであるが、光学タイプによっては変倍操作を行なうと、射出瞳の像面からの距離や大きさが変化する。図5における撮影光学系は、焦点距離が広角端と望遠端の中間、すなわちMiddleの状態を示している。   The exit pupil of the photographing optical system generally coincides with the surface on which the iris diaphragm for adjusting the light amount is placed. On the other hand, the photographing optical system of the present embodiment is a zoom lens having a zooming function. However, depending on the optical type, when the zooming operation is performed, the distance and size of the exit pupil from the image plane change. The photographing optical system in FIG. 5 shows a state in which the focal length is intermediate between the wide-angle end and the telephoto end, that is, a middle state.

これを標準的な射出瞳距離Zepと仮定して、オンチップマイクロレンズの形状や、像高(X、Y座標)に応じた偏心パラメータの最適設計がなされる。   Assuming that this is a standard exit pupil distance Zep, an optimum design of an eccentricity parameter according to the shape of the on-chip microlens and the image height (X, Y coordinates) is made.

図5Aにおいて、101は第1レンズ群、101bは第1レンズ群を保持する鏡筒部材、105は第3レンズ群、104bはフォーカスレンズ104を保持する鏡筒部材である。102は絞りで、102aは絞り開放時の開口径を規定する開口板、102bは絞り込み時の開口径を調節するための絞り羽根である。   In FIG. 5A, 101 is a first lens group, 101 b is a lens barrel member that holds the first lens group, 105 is a third lens group, and 104 b is a lens barrel member that holds the focus lens 104. Reference numeral 102 denotes an aperture, reference numeral 102a denotes an aperture plate that defines an aperture diameter when the aperture is opened, and reference numeral 102b denotes an aperture blade for adjusting the aperture diameter when the aperture is closed.

なお、撮影光学系を通過する光束の制限部材として作用する101b、102a、102b、及び104bは、像面から観察した場合の光学的な虚像を示している。また、絞り102の近傍における合成開口をレンズの射出瞳と定義し、前述したように像面からの距離をZepとしている。   Note that reference numerals 101b, 102a, 102b, and 104b that act as limiting members for the light beam passing through the photographing optical system indicate optical virtual images when observed from the image plane. Further, the synthetic aperture in the vicinity of the stop 102 is defined as the exit pupil of the lens, and the distance from the image plane is Zep as described above.

2110は、被写体像を光電変換するための画素で、像面中央近傍に配置されており、本実施例では、中央画素と呼ぶ。中央画素2110は、最下層より、光電変換部2110a、2110b、配線層2110e〜2110g、カラーフィルタ2110h、及びオンチップマイクロレンズ2110iの各部材で構成される。   Reference numeral 2110 denotes a pixel for photoelectrically converting a subject image, which is arranged in the vicinity of the center of the image plane, and is called a central pixel in this embodiment. The central pixel 2110 is composed of photoelectric conversion units 2110a and 2110b, wiring layers 2110e to 2110g, a color filter 2110h, and an on-chip microlens 2110i from the bottom layer.

そして、2つの光電変換部はオンチップマイクロレンズ2110iによって撮影光学系の射出瞳面に投影される。また別の言い方をすれば、撮影光学系の射出瞳が、オンチップマイクロレンズ2110iを介して、光電変換部の表面に投影されることになる。   The two photoelectric conversion units are projected onto the exit pupil plane of the photographing optical system by the on-chip microlens 2110i. In other words, the exit pupil of the photographing optical system is projected onto the surface of the photoelectric conversion unit via the on-chip microlens 2110i.

図5Bは、撮影光学系の射出瞳面上における、光電変換部の投影像を示したもので、光電変換部2110a及び2110bに対する投影像は各々EP1a及びEP1bとなる。また本実施例では、撮像素子は、2つの光電変換部2110aと2110bのいずれか一方の出力と、両方の和の出力を得ることができる画素を有している。両方の和の出力は、撮影光学系のほぼ全瞳領域である投影像EP1a、EP1bの両方の領域を通過した光束を光電変換したものである。   FIG. 5B shows a projected image of the photoelectric conversion unit on the exit pupil plane of the photographing optical system, and the projected images on the photoelectric conversion units 2110a and 2110b are EP1a and EP1b, respectively. Further, in this embodiment, the imaging device has a pixel that can obtain the output of either one of the two photoelectric conversion units 2110a and 2110b and the sum of both. The sum of both outputs is a photoelectric conversion of the light beam that has passed through both regions of the projection images EP1a and EP1b, which are almost the entire pupil region of the photographing optical system.

図5Aで、撮影光学系を通過する光束の最外部をLで示すと、光束Lは、絞りの開口板102aで規制されており、投影像EP1a及びEP1bは撮影光学系でケラレがほぼ発生していない。図5Bでは、図4Aの光束Lを、TLで示している。TLで示す円の内部に、光電変換部の投影像EP1a、EP1bの大部分が含まれていることからも、ケラレがほぼ発生していないことがわかる。光束Lは、絞りの開口板102aでのみ制限されているため、TLは、102aと言い換えることができる。   In FIG. 5A, when the outermost part of the light beam passing through the photographing optical system is denoted by L, the light beam L is regulated by the aperture plate 102a of the diaphragm, and the vignetting of the projection images EP1a and EP1b is almost generated in the photographing optical system. Not. In FIG. 5B, the light beam L in FIG. 4A is indicated by TL. Since most of the projected images EP1a and EP1b of the photoelectric conversion unit are included in the circle indicated by TL, it can be seen that almost no vignetting occurs. Since the light beam L is limited only by the aperture plate 102a of the diaphragm, TL can be restated as 102a.

この際、像面中央では各投影像EP1aないしEP1bのけられ状態は光軸に対して対称となり、各光電変換部2110a及び2110bが受光する光量は等しい。   At this time, the projected state of each projection image EP1a or EP1b is symmetric with respect to the optical axis at the center of the image plane, and the amount of light received by each of the photoelectric conversion units 2110a and 2110b is equal.

以上図3、図4、図5で説明した様に、撮像素子122は撮像のみの機能だけではなく焦点検出装置としての機能も有している。また、焦点検出方法としては、射出瞳を分割した光束を受光する焦点検出用画素を備えているため、位相差検出方式AFを行うことが可能である。   As described above with reference to FIGS. 3, 4, and 5, the image sensor 122 has not only a function of imaging but also a function as a focus detection device. In addition, as a focus detection method, since a focus detection pixel that receives a light beam obtained by dividing an exit pupil is provided, phase difference detection AF can be performed.

上述の説明では、水平方向に射出瞳を分割する構成を説明したが、撮像素子上に、垂直方向に射出瞳を分割する画素も合わせて設けてもよい。両方向に射出瞳を分割する画素を設けることにより、水平だけでなく、垂直方向の被写体のコントラストに対応した焦点検出を行うことができる。   In the above description, the configuration in which the exit pupil is divided in the horizontal direction has been described. However, pixels that divide the exit pupil in the vertical direction may also be provided on the image sensor. By providing pixels that divide the exit pupil in both directions, focus detection corresponding to the contrast of the subject in the vertical direction as well as the horizontal direction can be performed.

(コントラスト方式AFの説明)
次に、図6を用いて、コントラスト方式AFの構成について説明する。図6では、図2のカメラMPU125及びTVAF焦点検出部130を用いて算出される各種AF用評価値の算出の流れについて示している。
(Description of contrast AF)
Next, the configuration of the contrast AF will be described with reference to FIG. FIG. 6 shows a flow of calculation of various AF evaluation values calculated using the camera MPU 125 and the TVAF focus detection unit 130 of FIG.

A/D変換回路7で変換されたデジタル信号が、TVAF焦点検出部130に入力されると、AF評価用信号処理回路401で、ベイヤー配列信号からの緑(G)信号の抽出と、低輝度成分を強調して高輝度成分を抑圧するガンマ補正処理が施される。   When the digital signal converted by the A / D conversion circuit 7 is input to the TVAF focus detection unit 130, the AF evaluation signal processing circuit 401 extracts a green (G) signal from the Bayer array signal and reduces the luminance. A gamma correction process for emphasizing the component and suppressing the high luminance component is performed.

本実施例では、TVAF焦点検出を緑(G)信号で行う場合を説明するが、赤(R)、青(B)、緑(G)の全ての信号を用いてもよい。また、RGB全色用いて輝度(Y)信号を生成してもよい。AF評価用信号処理回路401で生成される出力信号は、用いられた色によらず、以後の説明では、輝度信号Yと呼ぶこととする。   In this embodiment, a case where TVAF focus detection is performed using a green (G) signal will be described, but all signals of red (R), blue (B), and green (G) may be used. Further, a luminance (Y) signal may be generated using all RGB colors. The output signal generated by the AF evaluation signal processing circuit 401 is referred to as a luminance signal Y in the following description regardless of the color used.

Yピーク評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、水平ライン毎のラインピーク値を検出するためのラインピーク検出回路402へ入力される。この回路によって、領域設定回路412によって設定されたAF評価範囲内で水平ライン毎のYラインピーク値が求められる。更に、ラインピーク検出回路402の出力は垂直ピーク検出回路405に入力される。   A method for calculating the Y peak evaluation value will be described. The luminance signal Y subjected to gamma correction is input to a line peak detection circuit 402 for detecting a line peak value for each horizontal line. With this circuit, the Y line peak value for each horizontal line is obtained within the AF evaluation range set by the area setting circuit 412. Further, the output of the line peak detection circuit 402 is input to the vertical peak detection circuit 405.

この回路によって、領域設定回路414によって設定されたAF評価範囲内で垂直方向にピークホールドが行われ、Yピーク評価値が生成される。Yピーク評価値は、高輝度被写体や低照度被写体の判定に有効である。   With this circuit, peak hold is performed in the vertical direction within the AF evaluation range set by the region setting circuit 414, and a Y peak evaluation value is generated. The Y peak evaluation value is effective for determining a high-luminance subject or a low-illuminance subject.

Y積分評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、水平ライン毎の積分値を検出するための水平積分回路403へ入力される。この回路によって、領域設定回路412によって設定されたAF評価範囲内で水平ライン毎のYの積分値が求められる。   A method for calculating the Y integral evaluation value will be described. The luminance signal Y subjected to gamma correction is input to a horizontal integration circuit 403 for detecting an integrated value for each horizontal line. With this circuit, the integral value of Y for each horizontal line is obtained within the AF evaluation range set by the area setting circuit 412.

更に、水平成分回路403の出力は垂直積分回路406に入力される。この回路によって、領域設定回路412によって設定されたAF評価範囲内で垂直方向に積分が行われ、Y積分評価値を生成される。Y積分評価値は、AF評価範囲内全体の明るさを判断することができる。   Further, the output of the horizontal component circuit 403 is input to the vertical integration circuit 406. By this circuit, integration is performed in the vertical direction within the AF evaluation range set by the region setting circuit 412 to generate a Y integral evaluation value. The Y integral evaluation value can determine the brightness of the entire AF evaluation range.

Max−Min評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、ラインピーク検出回路402に入力され、AF評価範囲内で水平ライン毎のYラインピーク値が求められる。また、ガンマ補正された輝度信号Yは、ライン最小値検出回路404に入力される。   A method for calculating the Max-Min evaluation value will be described. The gamma-corrected luminance signal Y is input to the line peak detection circuit 402, and the Y line peak value for each horizontal line is obtained within the AF evaluation range. Further, the luminance signal Y subjected to gamma correction is input to the line minimum value detection circuit 404.

この回路によって、輝度信号YのAF評価範囲内で水平ライン毎のYの最小値が検出される。検出された水平ライン毎のYのラインピーク値及び最小値は減算器に入力され、(ラインピーク値−最小値)を計算した上で垂直ピーク検出回路407に入力される。   This circuit detects the minimum value of Y for each horizontal line within the AF evaluation range of the luminance signal Y. The detected Y line peak value and minimum value for each horizontal line are input to the subtractor, and (line peak value−minimum value) is calculated and input to the vertical peak detection circuit 407.

この回路によって、AF評価範囲内で垂直方向にピークホールドが行われ、Max−Min評価値が生成される。Max−Min評価値は、低コントラスト・高コントラストの判定に有効である。   By this circuit, peak hold is performed in the vertical direction within the AF evaluation range, and a Max-Min evaluation value is generated. The Max-Min evaluation value is effective for determination of low contrast and high contrast.

領域ピーク評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、BPF408に通すことによって特定の周波数成分が抽出され焦点信号が生成される。この焦点信号は、水平ライン毎のラインピーク値を検出するためのピークホールド手段であるラインピーク検出回路409へ入力される。   A method for calculating the region peak evaluation value will be described. A specific frequency component is extracted from the gamma-corrected luminance signal Y through the BPF 408 to generate a focus signal. This focus signal is input to a line peak detection circuit 409 which is a peak hold means for detecting a line peak value for each horizontal line.

ラインピーク検出回路409は、AF評価範囲内で水平ライン毎のラインピーク値を求める。求めたラインピーク値は、垂直ピーク検出回路411によってAF評価範囲内でピークホールドされ、領域ピーク評価値が生成される。   The line peak detection circuit 409 obtains a line peak value for each horizontal line within the AF evaluation range. The obtained line peak value is peak-held within the AF evaluation range by the vertical peak detection circuit 411, and an area peak evaluation value is generated.

領域ピーク評価値は、AF評価範囲内で被写体が移動しても変化が少ないので、合焦状態から再度合焦点を探す処理に移行するための再起動判定に有効である。   Since the area peak evaluation value changes little even when the subject moves within the AF evaluation range, it is effective for restart determination for shifting from the focused state to the process of searching for the focused point again.

全ライン積分評価値の算出方法について説明する。領域ピーク評価値と同様に、ラインピーク検出回路409は、AF評価範囲内で水平ライン毎のラインピーク値を求める。次に、ラインピーク値を垂直積分回路410に入力し、AF評価範囲内で垂直方向に全水平走査ライン数について積分して全ライン積分評価値を生成する。   A method for calculating the total line integral evaluation value will be described. Similar to the area peak evaluation value, the line peak detection circuit 409 obtains a line peak value for each horizontal line within the AF evaluation range. Next, the line peak value is input to the vertical integration circuit 410 and integrated with respect to the number of all horizontal scanning lines in the vertical direction within the AF evaluation range to generate an all-line integration evaluation value.

高周波全ライン積分評価値は、積分の効果でダイナミックレンジが広く、感度が高いので、合焦位置の検出を行うためのAFのメインの評価値として有効である。   The high-frequency all-line integration evaluation value is effective as the main evaluation value of AF for detecting the in-focus position because the integration effect has a wide dynamic range and high sensitivity.

本実施例では、デフォーカス状態に応じて評価値が変化し、焦点調節に用いる全ライン積分評価値を焦点評価値と称する。   In this embodiment, the evaluation value changes according to the defocus state, and the total line integration evaluation value used for focus adjustment is referred to as a focus evaluation value.

領域設定回路413は、カメラMPU125により設定された画面内の所定の位置にある信号を選択するためのAF評価範囲用のゲート信号を生成する。   The area setting circuit 413 generates an AF evaluation range gate signal for selecting a signal at a predetermined position in the screen set by the camera MPU 125.

ゲート信号は、ラインピーク検出回路402、水平積分回路403、ライン最小値検出回路404、ラインピーク検出回路409、垂直積分回路406、410垂直ピーク検出回路405、407、411の各回路に入力される。   The gate signal is input to each circuit of the line peak detection circuit 402, horizontal integration circuit 403, line minimum value detection circuit 404, line peak detection circuit 409, vertical integration circuit 406, 410 vertical peak detection circuits 405, 407, and 411. .

そして、各焦点評価値がAF評価範囲内の輝度信号Yで生成されるように、輝度信号Yが各回路に入力するタイミングが制御される。   Then, the timing at which the luminance signal Y is input to each circuit is controlled so that each focus evaluation value is generated by the luminance signal Y within the AF evaluation range.

また、領域設定回路413は、AF評価範囲に合わせて、複数の領域の設定が可能である。   The area setting circuit 413 can set a plurality of areas in accordance with the AF evaluation range.

AF制御部151は、各焦点評価値を取り込み、フォーカス駆動回路116を通じてフォーカスアクチュエータ113を制御し、フォーカスレンズ104を光軸方向に移動させてAF制御を行う。   The AF control unit 151 takes in each focus evaluation value, controls the focus actuator 113 through the focus driving circuit 116, and moves the focus lens 104 in the optical axis direction to perform AF control.

本実施例では、各種のAF用評価値を上述の通り水平ライン方向に算出するのに加えて、垂直ライン方向にも算出する。これにより、水平、垂直いずれの方向の被写体のコントラスト情報に対しても焦点検出を行うことができる。   In the present embodiment, various AF evaluation values are calculated in the vertical line direction in addition to being calculated in the horizontal line direction as described above. Thereby, focus detection can be performed on the contrast information of the subject in either the horizontal or vertical direction.

コントラスト方式のAFを行う際には、フォーカスレンズ104を駆動しながら、上述した各種のAF用評価値を算出する。全ライン積分評価値が最大値となるフォーカスレンズ位置を検出することにより、焦点検出を行う。   When performing contrast AF, the above-described various AF evaluation values are calculated while driving the focus lens 104. Focus detection is performed by detecting the focus lens position where the total line integral evaluation value is the maximum value.

(焦点検出領域の説明)
図7は、撮影範囲内における焦点検出領域を示す図で、この焦点検出領域内で撮像素子122から得られた信号に基づいて撮像面位相差AFと及びTVAFが行われる。図7の焦点検出領域は、図3に示す撮影レンズの水平方向(横方向)に瞳分割を行う画素を含む焦点検出部を備えている。また、点線で示す長方形は撮像素子122の画素が形成された撮影範囲217を示す。
(Description of focus detection area)
FIG. 7 is a diagram showing a focus detection area in the imaging range, and imaging plane phase difference AF and TVAF are performed based on a signal obtained from the image sensor 122 in this focus detection area. The focus detection area in FIG. 7 includes a focus detection unit including pixels that perform pupil division in the horizontal direction (lateral direction) of the photographing lens shown in FIG. A rectangle indicated by a dotted line indicates an imaging range 217 in which pixels of the image sensor 122 are formed.

撮影範囲217内には撮像面位相差AFを行う3つの横方向の焦点検出領域218ah、218bh、218chが形成されている。本実施の形態では、位相差検出方式の焦点検出領域を図のように撮影範囲217の中央部と左右2箇所の計3箇所を備える構成とした。また、3つの撮像面位相差AFを行う焦点検出領域のそれぞれを包含する形で、TVAFを行う焦点検出領域219a、219b、219cが形成されている。   Three horizontal focus detection areas 218ah, 218bh, and 218ch for performing imaging plane phase difference AF are formed in the imaging range 217. In the present embodiment, the focus detection area of the phase difference detection method is configured to have a total of three locations, that is, the central portion of the imaging range 217 and two left and right locations as shown in the figure. Further, focus detection areas 219a, 219b, and 219c for performing TVAF are formed so as to include each of the focus detection areas for performing three imaging surface phase difference AFs.

TVAFを行う焦点検出領域では図6の水平方向と垂直方向の焦点評価値を用いて、コントラスト検出を行う。   In the focus detection area where TVAF is performed, contrast detection is performed using the focus evaluation values in the horizontal and vertical directions in FIG.

なお、図7に示す例では、大きくわけて3つの領域に焦点検出領域を配置した例を示しているが、本発明は3つの領域に限られるものではなく、任意の位置に複数の領域を配置してもよい。   The example shown in FIG. 7 shows an example in which focus detection areas are arranged roughly in three areas, but the present invention is not limited to three areas, and a plurality of areas can be arranged at arbitrary positions. You may arrange.

(焦点検出処理の流れの説明)
次に、図1を参照して、上記構成を有するデジタルカメラにおける本実施の形態による焦点検出(AF)処理について説明する。なお、本発明の実施の形態によるAF処理の概要は次の通りである。まず、焦点検出領域218ah、218bh、218chそれぞれについて、焦点ずれ量(デフォーカス量)と信頼性とを求める。
(Explanation of focus detection process flow)
Next, a focus detection (AF) process according to the present embodiment in the digital camera having the above configuration will be described with reference to FIG. The outline of the AF processing according to the embodiment of the present invention is as follows. First, for each of the focus detection areas 218ah, 218bh, and 218ch, a defocus amount (defocus amount) and reliability are obtained.

そして、所定の信頼性を有するデフォーカス量が得られた領域と、得られなかった領域に区分する。全ての焦点検出領域218ah、218bh、218chにおいて所定の信頼性を有するデフォーカス量が得られていれば、最至近の被写体に合焦するようにフォーカスレンズ104を駆動する。   Then, the region is divided into a region where a defocus amount having a predetermined reliability is obtained and a region where the defocus amount is not obtained. If a defocus amount having a predetermined reliability is obtained in all the focus detection areas 218ah, 218bh, and 218ch, the focus lens 104 is driven so as to focus on the closest subject.

一方、所定の信頼性を有するデフォーカス量が得られなかった領域が存在する場合、焦点検出領域219a〜cの内、対応する領域について、フォーカスレンズ駆動前後の焦点評価値の変化量を用いて、より至近側に被写体が存在するか判定する。そして、より至近側に被写体が存在すると判定された場合は、焦点評価値の変化に基づき、フォーカスレンズ104を駆動する。   On the other hand, when there is a region where a defocus amount having a predetermined reliability is not obtained, the change amount of the focus evaluation value before and after driving the focus lens is used for the corresponding region among the focus detection regions 219a to 219c. Then, it is determined whether or not the subject exists closer to the camera. When it is determined that the subject is present on the closer side, the focus lens 104 is driven based on the change in the focus evaluation value.

ただし、これより以前に焦点評価値が得られていない場合には焦点評価値の変化量を求めることができない。その場合、予め決められたデフォーカス量よりも大きい、所定の信頼性を有するデフォーカス量が得られた領域が存在する場合には、最至近の被写体に合焦するようにフォーカスレンズ104を駆動する。   However, if the focus evaluation value has not been obtained before this, the change amount of the focus evaluation value cannot be obtained. In that case, when there is a region where a defocus amount having a predetermined reliability greater than a predetermined defocus amount is obtained, the focus lens 104 is driven to focus on the closest subject. To do.

それ以外の場合、即ち、所定の信頼性を有するデフォーカス量が得られた領域が存在しない場合、及び、得られたデフォーカス量が予め決められたデフォーカス量以下の場合には、デフォーカス量に関係のない所定量のレンズ駆動を行う。なお、デフォーカス量が小さい場合にデフォーカス量に関係のない所定量のレンズ駆動を行う理由は、そのデフォーカス量に基づくレンズ駆動量では、次の焦点検出時に、焦点評価値の変化を検出することが難しい可能性が高いからである。   In other cases, that is, when there is no region where a defocus amount having a predetermined reliability is obtained, and when the obtained defocus amount is equal to or less than a predetermined defocus amount, defocusing is performed. A predetermined amount of lens driving is performed regardless of the amount. The reason for driving a predetermined amount of lens that is not related to the defocus amount when the defocus amount is small is that the lens drive amount based on the defocus amount detects a change in focus evaluation value at the next focus detection. This is because it is likely to be difficult.

いずれかの方法により、焦点検出を終えると、各種の補正値の算出を行い、焦点検出結果の補正を行う。補正の施された焦点検出結果に基づき、フォーカスレンズ104の駆動を行い焦点調節処理を終える。   When focus detection is completed by any of the methods, various correction values are calculated, and the focus detection result is corrected. Based on the corrected focus detection result, the focus lens 104 is driven to complete the focus adjustment process.

(AF動作手順を示すフローチャートの説明)
以下、上記AF処理について、詳細に説明する。図1(a)、図1(b)は、撮像装置のAF動作手順を示すフローチャートである。この動作に関する制御プログラムは、カメラMPU125によって実行される。カメラMPU125は、AF動作を開始すると、S1においてまず被写体に対する焦点調節を行うための焦点検出領域を設定する。
(Description of flowchart showing AF operation procedure)
Hereinafter, the AF process will be described in detail. FIG. 1A and FIG. 1B are flowcharts illustrating an AF operation procedure of the imaging apparatus. A control program related to this operation is executed by the camera MPU 125. When starting the AF operation, the camera MPU 125 first sets a focus detection area for performing focus adjustment on the subject in S1.

このS1の処理では、図6に示したように3か所の焦点検出領域が設定される。次にS2において、至近判定フラグを1に設定する。S3では、各焦点検出領域で、焦点検出に必要な信号を取得する。   In the process of S1, three focus detection areas are set as shown in FIG. Next, in S2, the closeness determination flag is set to 1. In S3, a signal necessary for focus detection is acquired in each focus detection region.

具体的には、撮像素子122で露光を行った後、撮像面位相差AF用の焦点検出領域218ah、218bh、218ch内の焦点検出用画素の像信号を取得する。   Specifically, after exposure is performed by the image sensor 122, image signals of focus detection pixels in the focus detection areas 218ah, 218bh, and 218ch for the imaging surface phase difference AF are acquired.

ここで、取得した像信号に対して、特開2010−117679号公報に記載の補正処理を行ってもよい。更に、撮像素子122で露光を行った後、TVAFに用いる焦点検出領域219a、219b、219cの領域内の画素信号を取得し、焦点評価値を算出する。算出された焦点評価値は、RAM125bに記憶される。   Here, correction processing described in JP 2010-117679 A may be performed on the acquired image signal. Further, after exposure is performed by the image sensor 122, pixel signals in the focus detection areas 219a, 219b, and 219c used for TVAF are acquired, and focus evaluation values are calculated. The calculated focus evaluation value is stored in the RAM 125b.

次に、S4において、焦点評価値のピーク(極大値)が検出されたか否かを判定する。これは、コントラスト検出方式の焦点検出を行うためのもので、信頼性のあるピークが検出された場合には、焦点検出を終えるため、S20に進む。焦点評価値の信頼性は、例えば、特開2010−078810号公報の図10から図13で説明されているような方法を用いればよい。   Next, in S4, it is determined whether or not the peak (maximum value) of the focus evaluation value has been detected. This is for performing focus detection by the contrast detection method, and when a reliable peak is detected, the process proceeds to S20 in order to finish focus detection. For the reliability of the focus evaluation value, for example, a method described in FIGS. 10 to 13 of JP 2010-078810 A may be used.

つまり、合焦状態を示す焦点評価値が山状になっているか否かを、焦点評価値の最大値と最小値の差、一定値(SlopeThr)以上の傾きで傾斜している部分の長さ、および傾斜している部分の勾配から判断する。これにより、ピークの信頼性判定を行うことができる。   That is, whether or not the focus evaluation value indicating the in-focus state has a mountain shape is determined by the difference between the maximum value and the minimum value of the focus evaluation value, and the length of the portion inclined with a slope equal to or greater than a certain value (SlopeThr). , And the slope of the inclined portion. Thereby, the peak reliability can be determined.

本実施例では、位相差検出方式のAFと併用しているため、同一の焦点検出領域や他の焦点検出領域で、より至近側の被写体の存在が確認されている場合には、信頼性のある焦点評価値ピークが検出された際であっても、焦点検出を終えずに、S5に進んでもよい。   In this embodiment, since the phase difference detection method AF is used in combination, if the presence of a subject on the closer side is confirmed in the same focus detection region or another focus detection region, the reliability can be improved. Even when a certain focus evaluation value peak is detected, the process may proceed to S5 without finishing focus detection.

その場合、焦点評価値ピークの位置に対応するフォーカスレンズ104位置を記憶しておき、以後、信頼性のある焦点検出結果が得られなかった場合に、記憶したフォーカスレンズ104位置を焦点検出結果とする。   In that case, the focus lens 104 position corresponding to the position of the focus evaluation value peak is stored, and when the focus detection result with reliability is not obtained thereafter, the stored focus lens 104 position is used as the focus detection result. To do.

次に、S5において、撮像面位相差AF用の各焦点検出領域について、得られた一対の像信号のずれ量を算出し、予め記憶されているデフォーカス量への換算係数を用いて、デフォーカス量を算出する。   Next, in S5, for each focus detection area for the imaging surface phase difference AF, the shift amount of the obtained pair of image signals is calculated, and the defocus amount is stored using a conversion factor to the defocus amount stored in advance. Calculate the focus amount.

ここでは、算出されるデフォーカス量の信頼性も判定し、所定の信頼性を有すると判定された焦点検出領域のデフォーカス量のみを、以後のAF処理で用いる。撮影レンズによるケラレの影響により、デフォーカス量が大きくなるにつれて、検出される対の像信号のずれ量は、より多くの誤差を含むようになる。   Here, the reliability of the calculated defocus amount is also determined, and only the defocus amount of the focus detection area determined to have the predetermined reliability is used in the subsequent AF processing. Due to the influence of vignetting caused by the taking lens, as the defocus amount increases, the detected shift amount of the pair of image signals includes more errors.

そのため、算出されるデフォーカス量が大きい場合や、対の像信号の形状の一致度が低い場合、対の像信号のコントラストが低い場合には、高精度な焦点検出は不可能と判断、言い換えると、算出されたデフォーカス量の信頼性が低いと判断する。   Therefore, when the calculated defocus amount is large, when the degree of coincidence of the shape of the pair of image signals is low, or when the contrast of the pair of image signals is low, it is determined that high-precision focus detection is impossible, in other words It is determined that the reliability of the calculated defocus amount is low.

以下、算出されたデフォーカス量が所定の信頼性を有する場合に「デフォーカス量が算出された」と表現し、デフォーカス量が何らかの理由で算出できない、または、算出されたデフォーカス量の信頼性が低い場合に「デフォーカス量が算出できない」と表現する。   Hereinafter, when the calculated defocus amount has a predetermined reliability, it is expressed as “the defocus amount is calculated”, and the defocus amount cannot be calculated for some reason, or the calculated defocus amount is reliable. It is expressed that “the defocus amount cannot be calculated” when the property is low.

次に、S6では、S1で設定した複数の焦点検出領域218ah、218bh、218chの全てでデフォーカス量が算出できたか否かを判断する。全ての焦点検出領域でデフォーカス量が算出できた場合にはS20に進み、算出されたデフォーカス量の中で、最も至近側にある被写体を示すデフォーカス量が算出された焦点検出領域に対して、縦横BP補正値(BP1)を算出する。ここで、最も至近側の被写体を選択する理由は、一般に、撮影者がピントを合わせたい被写体は、至近側に存在することが多いためである。縦横BP補正値(BP1)は、水平方向の被写体のコントラストに対して焦点検出を行った場合と、垂直方向の被写体のコントラストに対して焦点検出を行った場合の焦点検出結果の差を補正するものである。   Next, in S6, it is determined whether or not the defocus amount has been calculated in all of the plurality of focus detection areas 218ah, 218bh, and 218ch set in S1. If the defocus amount can be calculated in all the focus detection areas, the process proceeds to S20, and among the calculated defocus amounts, the focus detection area for which the defocus amount indicating the closest object is calculated. Thus, the vertical / horizontal BP correction value (BP1) is calculated. Here, the reason for selecting the closest subject is that the subject that the photographer wants to focus on is often on the close side. The vertical / horizontal BP correction value (BP1) corrects the difference between the focus detection results when the focus detection is performed on the contrast of the subject in the horizontal direction and the focus detection is performed on the contrast of the subject in the vertical direction. Is.

一般的には、被写体は、水平方向、垂直方向ともにコントラストを有しており、撮影された画像のピント状態の評価も、水平方向、垂直方向の両方向のコントラストを鑑みてなされる。一方で、上述の位相差検出方式のAFのように水平方向のみの焦点検出を行う場合、水平方向の焦点検出結果と撮影画像の水平方向、垂直方向の両方向のピント状態には誤差を生じる。この誤差は、撮影光学系の非点収差などにより発生する。   In general, the subject has contrast in both the horizontal direction and the vertical direction, and the evaluation of the focus state of the photographed image is performed in view of the contrast in both the horizontal direction and the vertical direction. On the other hand, when focus detection is performed only in the horizontal direction as in the AF of the phase difference detection method described above, an error occurs between the focus detection result in the horizontal direction and the focus state in both the horizontal and vertical directions of the captured image. This error is caused by astigmatism of the photographing optical system.

縦横BP補正値(BP1)は、その誤差を補正するための補正値である。また、縦横BP補正値(BP1)は、選択された焦点検出領域、フォーカスレンズ104の位置、ズーム状態を示す第1レンズ群101の位置などを鑑みて、算出される。算出方法の詳細については後述する。   The vertical / horizontal BP correction value (BP1) is a correction value for correcting the error. The vertical / horizontal BP correction value (BP1) is calculated in view of the selected focus detection area, the position of the focus lens 104, the position of the first lens group 101 indicating the zoom state, and the like. Details of the calculation method will be described later.

次に、S21では、S20で補正値算出対象となった焦点検出領域に対して、垂直もしくは水平の1方向のコントラスト情報を用いて、色BP補正値(BP2)を算出する。色BP補正値(BP2)は、撮影光学系の色収差により発生するもので、焦点検出に用いる信号の色のバランスと撮影画像もしくは現像された画像に用いる信号の色のバランスとの差により生じる。   Next, in S21, a color BP correction value (BP2) is calculated using contrast information in one direction, vertical or horizontal, for the focus detection area that is the correction value calculation target in S20. The color BP correction value (BP2) is generated due to chromatic aberration of the photographing optical system, and is caused by the difference between the color balance of the signal used for focus detection and the color balance of the signal used for the photographed image or the developed image.

例えば、本実施例でコントラスト検出式の焦点検出を行う場合、用いられる焦点評価値は、緑(G)のカラーフィルタを有する画素出力により生成されるため、主に緑色の波長の合焦位置を検出することとなる。   For example, in the case of performing contrast detection type focus detection in this embodiment, since the focus evaluation value used is generated by a pixel output having a green (G) color filter, the focus position of the green wavelength is mainly determined. Will be detected.

一方で、撮影画像は、RGB全色を用いて生成されるため、赤(R)や青(B)の合焦位置が緑(G)と異なる場合、焦点評価値による焦点検出結果とずれ(誤差)を生じる。その誤差を、補正するための補正値が、色BP補正値(BP2)である。色BP補正値(BP2)の算出方法の詳細は、後述する。   On the other hand, since the photographed image is generated using all the RGB colors, if the in-focus position of red (R) or blue (B) is different from green (G), it is different from the focus detection result based on the focus evaluation value ( Error). A correction value for correcting the error is a color BP correction value (BP2). Details of the method for calculating the color BP correction value (BP2) will be described later.

次に、S22では、S20、S21の補正対象である焦点検出領域に対して、垂直もしくは水平の1方で、緑もしくは輝度信号Yのコントラスト情報を用いてある特定の色空間周波数BP補正値(BP3)を算出する。空間周波数BP補正値(BP3)は、撮影光学系の主に球面収差により発生するもので、焦点検出に用いる信号の評価周波数(帯域)と撮影画像を鑑賞する際の評価周波数(帯域)の差によって発生する。   Next, in S22, a specific color space frequency BP correction value (contrast information of green or luminance signal Y is used in one of the vertical and horizontal directions with respect to the focus detection area to be corrected in S20 and S21. BP3) is calculated. The spatial frequency BP correction value (BP3) is generated mainly by spherical aberration in the photographing optical system, and the difference between the evaluation frequency (band) of the signal used for focus detection and the evaluation frequency (band) when viewing the photographed image. Caused by.

上述の通り焦点検出の際には、撮像素子から出力信号を読み出すモードが第2の読み出しモードであるため、出力信号が加算や間引きがされている。そのため、第1の読み出しモードで読み出された全画素の信号を用いて生成される撮影画像に対して、焦点検出に用いる出力信号は評価帯域が低くなる。   As described above, at the time of focus detection, the mode in which the output signal is read from the image sensor is the second readout mode, and therefore the output signal is added or thinned out. For this reason, the output signal used for focus detection has a lower evaluation band than the captured image generated using the signals of all the pixels read in the first readout mode.

その評価帯域の差により、空間周波数BP補正値(BP3)は発生する。空間周波数BP補正値(BP3)の算出方法の詳細は、後述する。   The spatial frequency BP correction value (BP3) is generated due to the difference between the evaluation bands. Details of the method of calculating the spatial frequency BP correction value (BP3) will be described later.

次に、S23では、ここまでで算出された3種の補正値(BP1、BP2、BP3)を用いて以下の式により焦点検出結果DEF_Bを補正し、DEF_Aを算出する。
(式1)
DEF_A=DEF_B+BP1+BP2+BP3
Next, in S23, the focus detection result DEF_B is corrected by the following equation using the three types of correction values (BP1, BP2, BP3) calculated so far, and DEF_A is calculated.
(Formula 1)
DEF_A = DEF_B + BP1 + BP2 + BP3

第1の実施例では、焦点検出結果を補正するための補正値を3段階に分けて、縦横、色、空間周波数の順番に、計算する。   In the first embodiment, the correction value for correcting the focus detection result is divided into three stages and calculated in the order of vertical and horizontal, color, and spatial frequency.

まず、縦横BP補正値の算出を行うことにより、撮影画像の鑑賞時の評価が縦横両方向のコントラスト情報を用いられるのに対して、焦点検出は、いずれか1方向のコントラスト情報を用いるために発生する誤差を算出する。   First, by calculating the vertical and horizontal BP correction values, the evaluation at the time of viewing a captured image uses contrast information in both vertical and horizontal directions, whereas focus detection occurs because contrast information in one direction is used. The error to be calculated is calculated.

次に、色BP補正値は、縦横BPの影響を切り離して、1方向のコントラスト情報において、撮影画像の鑑賞時と焦点検出時に信号に用いられる色による合焦位置の差を、補正値として算出している。   Next, the color BP correction value is calculated as a correction value by separating the influence of the vertical and horizontal BP, and using the contrast information in one direction as a correction value, based on the color used for the signal when viewing the captured image and detecting the focus. doing.

さらに、空間周波数BP補正値は、1方向のコントラスト情報で、緑もしくは輝度信号などのある特定の色に関して、撮影画像の鑑賞時と焦点検出時の評価帯域の差により発生する合焦位置の差を補正値として算出している。   Further, the spatial frequency BP correction value is contrast information in one direction, and for a specific color such as green or a luminance signal, a difference in focus position caused by a difference in evaluation band between viewing a captured image and detecting a focus. Is calculated as a correction value.

このように、3種類の誤差を切り分けて算出することにより、演算量の低減、レンズもしくはカメラに記憶するデータ容量の低減を図っている。   In this way, by calculating the three types of errors separately, the amount of calculation is reduced and the data capacity stored in the lens or camera is reduced.

S24では、式1で算出された補正後のデフォーカス量DEF_Aに基づいてフォーカスレンズ104の駆動を行う(合焦制御)。   In S24, the focus lens 104 is driven based on the corrected defocus amount DEF_A calculated by Expression 1 (focus control).

次に、S25に進み、レンズ駆動に用いたデフォーカス量が算出された焦点検出領域に関して、表示器126に合焦表示を行い、AF処理を終了する。   Next, the process proceeds to S25, where the focus detection area where the defocus amount used for driving the lens is calculated is displayed in focus on the display 126, and the AF process is terminated.

一方、S6でデフォーカス量が算出できない焦点検出領域が存在した場合には、図1(b)のS7に進む。S7では、至近判定フラグが1であるか否かを判定する。至近判定フラグは、AF動作が始まってから、レンズ駆動が一度も行われていない場合に1となり、レンズ駆動が複数回行われている場合に0となるフラグである。至近判定フラグが1である場合には、S8に進む。   On the other hand, if there is a focus detection area where the defocus amount cannot be calculated in S6, the process proceeds to S7 in FIG. In S7, it is determined whether or not the closeness determination flag is 1. The closeness determination flag is a flag that becomes 1 when the lens driving has never been performed since the AF operation has started, and becomes 0 when the lens driving has been performed a plurality of times. If the closeness determination flag is 1, the process proceeds to S8.

S8では、全ての焦点検出領域でデフォーカス量を算出できなかった場合、もしくは、算出されたデフォーカス量のうち、最も至近側の被写体の存在を示すデフォーカス量が所定の閾値A以下の場合には、S9に進む。S9では、至近側に予め決められた量のレンズ駆動を行う。   In S8, when the defocus amount cannot be calculated in all focus detection areas, or when the defocus amount indicating the presence of the closest subject among the calculated defocus amounts is equal to or less than the predetermined threshold A The process proceeds to S9. In S9, a predetermined amount of lens driving is performed on the closest side.

ここでS8でYesの場合に、所定量のレンズ駆動を行う理由を説明する。まず、複数の焦点検出領域の中で、デフォーカス量が算出できた領域が無い場合とは、現時点では、ピント合わせを行うべき被写体が見つかっていない場合である。そのため、合焦不能であると判断する前に、全ての焦点検出領域に対して、ピント合わせを行うべき被写体の存在を確認するために、所定量のレンズ駆動を行い、後述する焦点評価値の変化を判定できるようにする。   Here, the reason why the predetermined amount of lens driving is performed in the case of Yes in S8 will be described. First, the case where there is no region where the defocus amount can be calculated among the plurality of focus detection regions is a case where no subject to be focused is found at the present time. Therefore, before determining that focusing is impossible, a predetermined amount of lens driving is performed to check the presence of a subject to be focused on in all focus detection areas, and a focus evaluation value described later is obtained. Enable to determine changes.

また、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量が所定の閾値A以下の場合とは、現時点で、ほぼ合焦状態の焦点検出領域が存在している場合である。   Also, when the defocus amount indicating the presence of the closest subject in the calculated defocus amount is equal to or smaller than the predetermined threshold A, there is a focus detection region that is almost in focus at the present time. Is the case.

このような状況では、デフォーカス量が算出できなかった焦点検出領域に、より至近側に、現時点では検出されていない被写体がある可能性を確認するために、所定量のレンズ駆動を行い、後述する焦点評価値の変化を判定できるようにする。   In such a situation, a predetermined amount of lens drive is performed in order to confirm that there is a subject that is not detected at the present time closer to the focus detection area where the defocus amount could not be calculated. It is possible to determine a change in focus evaluation value.

なお、ここでのレンズ駆動量は、撮影光学系のF値やレンズ駆動量に対する撮像素子面上でのピント移動量の敏感度を鑑みて定めればよい。   Here, the lens driving amount may be determined in consideration of the sensitivity of the focus movement amount on the image sensor surface with respect to the F value of the photographing optical system and the lens driving amount.

一方で、S8でNoの場合、すなわち、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量が所定の閾値Aより大きい場合には、S10に進む。この場合には、デフォーカス量が算出された焦点検出領域は存在するものの、その焦点検出領域は合焦状態ではない場合である。そのため、S10では、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量に基づき、レンズ駆動を行う。   On the other hand, in the case of No in S8, that is, when the defocus amount indicating the presence of the closest subject in the calculated defocus amount is larger than the predetermined threshold A, the process proceeds to S10. In this case, there is a focus detection area where the defocus amount is calculated, but the focus detection area is not in focus. Therefore, in S10, lens driving is performed based on the defocus amount indicating the presence of the closest subject in the calculated defocus amount.

S9もしくはS10にてレンズ駆動を行った後、S11に進み、至近判定フラグを0に設定し、図1(a)のS3に戻る。   After driving the lens in S9 or S10, the process proceeds to S11, the closeness determination flag is set to 0, and the process returns to S3 in FIG.

S7で、至近判定フラグが1ではない(0である)場合にはS12に進む。S12で、デフォーカス量が算出できなかった焦点検出領域に対応したTVAF用の焦点検出領域の焦点評価値が、レンズ駆動前後で、所定の閾値B以上変化したか否かを判断する。ここでは、焦点評価値は、増加する場合も減少する場合もあるが、焦点評価値の変化量の絶対値が、所定の閾値B以上であるか否かを判断する。   If the closeness determination flag is not 1 (0) in S7, the process proceeds to S12. In S12, it is determined whether or not the focus evaluation value of the focus detection area for TVAF corresponding to the focus detection area for which the defocus amount cannot be calculated has changed by a predetermined threshold B or more before and after lens driving. Here, the focus evaluation value may increase or decrease, but it is determined whether or not the absolute value of the change amount of the focus evaluation value is equal to or greater than a predetermined threshold B.

S12において、焦点評価値の変化量の絶対値が、所定の閾値B以上である場合とは、デフォーカス量は算出できないものの、焦点評価値の増減により、被写体のボケ状態の変化を検出できたことを意味している。そのため、本実施の形態では、撮像面位相差AFによるデフォーカス量が検出できない場合でも、焦点評価値の増減に基づいて被写体の存在を判定し、AF処理を継続する。   In S12, when the absolute value of the change amount of the focus evaluation value is greater than or equal to the predetermined threshold B, the defocus amount cannot be calculated, but the change in the blurring state of the subject can be detected by increasing or decreasing the focus evaluation value. It means that. Therefore, in the present embodiment, even when the defocus amount due to the imaging surface phase difference AF cannot be detected, the presence of the subject is determined based on the increase / decrease of the focus evaluation value, and the AF process is continued.

これにより、デフォーカス量が大きく、撮像面位相差AFでは検出できない被写体に対して、焦点調節を行うことができる。   Thereby, focus adjustment can be performed on a subject that has a large defocus amount and cannot be detected by the imaging plane phase difference AF.

ここで、判定結果に用いられる所定の閾値Bは、事前に行われたレンズ駆動量に応じて変更する。レンズ駆動量が大きい場合には、閾値Bとしてより大きい値を設定し、レンズ駆動量が小さい場合には、閾値Bとしてより小さい値を設定する。   Here, the predetermined threshold B used for the determination result is changed according to the lens driving amount performed in advance. When the lens driving amount is large, a larger value is set as the threshold value B, and when the lens driving amount is small, a smaller value is set as the threshold value B.

これは、被写体が存在する場合には、レンズ駆動量の増加に応じて、焦点評価値の変化量も増加するためである。これらのレンズ駆動量毎の閾値Bは、EEPROM125cに記憶されている。   This is because when the subject exists, the amount of change in the focus evaluation value increases as the lens driving amount increases. The threshold value B for each lens driving amount is stored in the EEPROM 125c.

焦点評価値の変化量の絶対値が、所定の閾値B以上である場合にはS13に進み、焦点評価値の変化量が閾値以上ある焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみであるか否かを判定する。   If the absolute value of the change amount of the focus evaluation value is equal to or greater than the predetermined threshold B, the process proceeds to S13, and the focus detection area in which the change amount of the focus evaluation value is equal to or greater than the threshold indicates the presence of the infinite object. It is determined whether or not only the area.

焦点検出領域が無限遠側被写体の存在を示す場合とは、レンズ駆動の駆動方向が至近方向で焦点評価値が減少、もしくは、レンズ駆動の駆動方向が無限遠方向で焦点評価値が増加した場合である。   When the focus detection area indicates the presence of an object at infinity, the focus evaluation value decreases when the lens drive direction is close, or the focus evaluation value increases when the lens drive direction is infinity. It is.

焦点評価値の変化量が閾値B以上である焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみでない場合にはS14に進み、至近側に所定量のレンズ駆動を行う。   If the focus detection area where the change amount of the focus evaluation value is greater than or equal to the threshold value B is not only the focus detection area indicating the presence of the infinity side subject, the process proceeds to S14, and a predetermined amount of lens driving is performed on the closest side.

これは、焦点評価値の変化量が閾値B以上ある焦点検出領域の中に、至近側被写体の存在を示す焦点検出領域があるためである。なお、至近側を優先する理由は上述のとおりである。   This is because there is a focus detection area indicating the presence of the near-side subject in the focus detection area where the change amount of the focus evaluation value is equal to or greater than the threshold value B. The reason for giving priority to the closest side is as described above.

一方、S13において、焦点評価値の変化量が閾値B以上ある焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみである場合、S15に進む。   On the other hand, if the focus detection area where the amount of change in the focus evaluation value is greater than or equal to the threshold value B is only the focus detection area indicating the presence of the infinity side object in S13, the process proceeds to S15.

S15では、デフォーカス量が算出された焦点検出領域が存在するか否かを判定する。デフォーカス量が算出された焦点検出領域が存在する場合(S15でYes)には、焦点評価値による無限遠側被写体の存在よりも、撮像面位相差AFの結果を優先するため、図1(a)のS20に進む。   In S15, it is determined whether or not there is a focus detection area for which the defocus amount is calculated. When there is a focus detection area for which the defocus amount is calculated (Yes in S15), the result of the imaging plane phase difference AF is given priority over the presence of the infinitely far side object based on the focus evaluation value. Proceed to S20 of a).

デフォーカス量が算出された焦点検出領域が存在しない場合(S15でNo)には、被写体の存在を示す情報が、焦点評価値の変化のみであるため、その情報を用いて、S16で無限遠側に所定量のレンズ駆動を行う。無限遠側に所定量のレンズ駆動を行った後、図1(a)のS3に戻る。   If there is no focus detection area for which the defocus amount is calculated (No in S15), the information indicating the presence of the subject is only a change in the focus evaluation value. A predetermined amount of lens is driven to the side. After driving a predetermined amount of lens to the infinity side, the process returns to S3 in FIG.

S14及びS16で行うレンズ駆動の駆動量は、撮像面位相差AFで検出可能なデフォーカス量を鑑みて決めればよい。被写体によって検出可能なデフォーカス量は異なるが、焦点検出不可能な状態からのレンズ駆動で、被写体を検出できずに通り過ぎてしまうことがないようなレンズ駆動量を予め設定しておく。   The driving amount of the lens driving performed in S14 and S16 may be determined in view of the defocus amount that can be detected by the imaging surface phase difference AF. Although the defocus amount that can be detected differs depending on the subject, a lens drive amount is set in advance so that the subject cannot be detected and passed by the lens drive from a state where the focus cannot be detected.

焦点評価値の変化量の絶対値が所定の閾値B未満である場合には(S12でNo)、S17に進む。S17では、デフォーカス量が算出された焦点検出領域の有無を判定する。デフォーカス量が算出された焦点検出領域が無い場合にはS18に進み、予め定められた定点にレンズを駆動した後、S19に進み、表示器126に非合焦表示を行い、AF処理を終了する。   If the absolute value of the change amount of the focus evaluation value is less than the predetermined threshold B (No in S12), the process proceeds to S17. In S17, it is determined whether or not there is a focus detection area for which the defocus amount is calculated. If there is no focus detection area for which the defocus amount is calculated, the process proceeds to S18, the lens is driven to a predetermined fixed point, and then the process proceeds to S19, where the in-focus display is performed on the display 126 and the AF process is terminated. To do.

これは、デフォーカス量が算出された焦点検出領域が無く、レンズ駆動の前後で焦点評価値の変化がある焦点検出領域も無い場合である。このような場合には、被写体の存在を示す情報が全く無いため、合焦不能として、AF処理を終了する。   This is a case where there is no focus detection area where the defocus amount is calculated, and there is no focus detection area where the focus evaluation value changes before and after lens driving. In such a case, since there is no information indicating the presence of the subject, focusing is impossible and the AF process is terminated.

一方、S17で、デフォーカス量が算出できた焦点検出領域が有る場合には、図1(a)のS20に進み、検出されたデフォーカス量の補正を行い(S20〜S23)、S24で合焦位置へフォーカスレンズ104を駆動する。その後、S25で表示器126に合焦表示を行い、AF処理を終了する。   On the other hand, if there is a focus detection area in which the defocus amount can be calculated in S17, the process proceeds to S20 in FIG. 1A to correct the detected defocus amount (S20 to S23). The focus lens 104 is driven to the focal position. Thereafter, in-focus display is performed on the display 126 in S25, and the AF processing is terminated.

(縦横BP補正値の算出方法)
次に、図8から図10を用いて、図1のS20で行う縦横BP補正値(BP1)の算出方法について説明する。
(Calculation method of vertical / horizontal BP correction value)
Next, a method for calculating the vertical / horizontal BP correction value (BP1) performed in S20 of FIG. 1 will be described with reference to FIGS.

図8は、図1のS20で行う処理の詳細を示す縦横BP補正値(BP1)を算出する流れを示したサブルーチンである。   FIG. 8 is a subroutine showing a flow of calculating the vertical / horizontal BP correction value (BP1) indicating the details of the processing performed in S20 of FIG.

S100で、縦横BP補正情報の取得を行う。縦横BP補正情報は、カメラMPU125の要求に応じて、レンズMPU117を通じて、得られる情報であり、水平方向(第1の方向)の合焦位置に対する垂直方向(第2の方向)の合焦位置の差分情報である。   In S100, vertical / horizontal BP correction information is acquired. The vertical / horizontal BP correction information is information obtained through the lens MPU 117 in response to a request from the camera MPU 125, and the vertical position (second direction) of the focus position in the horizontal direction (first direction). Difference information.

図9は、レンズメモリ118に格納されている縦横BP補正情報の例を示している。図9は、図7の中央の焦点検出領域219a、218ahに対応した補正値を示している。同様に、他の2個の焦点検出領域についても焦点検出補正値を記憶している。   FIG. 9 shows an example of vertical / horizontal BP correction information stored in the lens memory 118. FIG. 9 shows correction values corresponding to the focus detection areas 219a and 218ah in the center of FIG. Similarly, focus detection correction values are stored for the other two focus detection areas.

但し、結像光学系の光軸に対して対称な焦点検出領域については、設計上の焦点検出補正値は等しくなる。従って、3つの焦点検出領域に対して、2つの焦点検出補正値のテーブルを記憶していればよい。また、焦点検出領域の位置によって補正値が大きく変化しない場合には、共通の値として記憶すればよい。   However, the design focus detection correction values are equal for the focus detection regions that are symmetrical with respect to the optical axis of the imaging optical system. Therefore, it is only necessary to store two focus detection correction value tables for the three focus detection regions. If the correction value does not change greatly depending on the position of the focus detection area, it may be stored as a common value.

つまり、第1の焦点調節位置用の補正値と第2の焦点調節位置用の補正値は、共通のテーブル値を使用する。   That is, a common table value is used for the correction value for the first focus adjustment position and the correction value for the second focus adjustment position.

図9において、撮影光学系のズーム位置とフォーカス位置を8つのゾーンに分割し、その分割ゾーンごとに焦点検出補正値BP111〜BP188を備える構成としている。従って、撮影光学系のフォーカスレンズ104、第1レンズ群101の位置に応じて高精度な補正値を得られる構成となっている。   In FIG. 9, the zoom position and focus position of the photographing optical system are divided into eight zones, and focus detection correction values BP111 to BP188 are provided for each of the divided zones. Therefore, a highly accurate correction value can be obtained according to the position of the focus lens 104 and the first lens group 101 of the photographing optical system.

また、縦横BP補正情報は、コントラスト検出方式、位相差検出方式の両方に用いることができる。   The vertical / horizontal BP correction information can be used for both the contrast detection method and the phase difference detection method.

S100では、補正対象となっている焦点検出結果に応じたズーム位置、フォーカス位置に対応した補正値を取得する。   In S100, the zoom position and the correction value corresponding to the focus position corresponding to the focus detection result to be corrected are acquired.

次に、S101で、補正対象となっている焦点検出領域において、水平方向、垂直方向のいずれの方向に対しても信頼性のある焦点検出結果が得られているかを判定する。焦点検出結果の信頼性の判定の方法については、位相差検出方式についてもコントラスト検出方式についても上述した通りである。   Next, in S101, it is determined whether a reliable focus detection result is obtained in either the horizontal direction or the vertical direction in the focus detection area to be corrected. The method of determining the reliability of the focus detection result is as described above for both the phase difference detection method and the contrast detection method.

第1の実施例において、水平方向、垂直方向の両方向に信頼性のある焦点検出結果が得られるのはコントラスト検出方式の場合である。そのため、縦横BP補正値に関する以後の説明は、コントラスト検出方式を想定した説明を行うが、位相差検出式の焦点検出が水平方向、垂直方向の両方向に可能である場合も、同様の処理を行えばよい。S101で、水平方向、垂直方向のいずれの焦点検出結果に対しても所定値以上の信頼性が有る場合には、S102に進む。   In the first embodiment, reliable focus detection results in both the horizontal and vertical directions are obtained in the case of the contrast detection method. Therefore, in the following description regarding the vertical / horizontal BP correction value, the description will be made assuming the contrast detection method, but the same processing is performed when the phase difference detection type focus detection is possible in both the horizontal direction and the vertical direction. Just do it. If it is determined in S101 that the reliability of the focus detection result in both the horizontal direction and the vertical direction is equal to or greater than a predetermined value, the process proceeds to S102.

S102で、水平方向の焦点検出結果と垂直方向の焦点検出結果の差が、妥当であるか否かを判定する。これは、遠い距離の被写体と近い距離の被写体を焦点検出領域内に含んだ際に生じる遠近競合の問題に対応するために行う処理である。   In S102, it is determined whether or not the difference between the focus detection result in the horizontal direction and the focus detection result in the vertical direction is appropriate. This is a process performed to deal with the perspective conflict problem that occurs when an object at a distance close to an object at a distance is included in the focus detection area.

例えば、遠い距離に水平方向にコントラストがある被写体が存在し、近い距離に垂直方向にコントラストがある被写体が存在した場合を考える。   For example, consider a case where there is a subject with contrast in the horizontal direction at a long distance and a subject with contrast in the vertical direction at a short distance.

その場合、撮影光学系の非点収差などにより発生する誤差より絶対値が大きかったり、符号が反対の焦点検出結果の差が生じたりする場合がある。   In that case, the absolute value may be larger than an error caused by astigmatism of the photographing optical system, or a difference in focus detection results with opposite signs may occur.

このように、水平方向の焦点検出結果(第1の焦点調節位置)と垂直方向の焦点検出結果(第2の焦点調節位置)の差が、判定値Cに対して大きく差がある場合には、遠近競合していると判断する。   Thus, when the difference between the horizontal focus detection result (first focus adjustment position) and the vertical focus detection result (second focus adjustment position) is significantly different from the determination value C. Judge that they are competing with each other.

そして、より至近側の焦点検出結果を示す方向として水平方向もしくは垂直方向を選択し、S104に進む。   Then, the horizontal direction or the vertical direction is selected as the direction indicating the closer focus detection result, and the process proceeds to S104.

判定値Cは、上述の理由から、補正値としてあり得ない値を判定するために一意に決めてもよいし、S100で得られた補正情報を用いて設定してもよい。   The determination value C may be uniquely determined to determine a value that cannot be a correction value for the above-described reason, or may be set using the correction information obtained in S100.

S102で水平方向の焦点検出結果(第1の焦点調節位置)と垂直方向の焦点検出結果(第2の焦点調節位置)の差が、妥当であると判定されると、S103に進み、BP1=0とし、縦横BP補正値算出のサブルーチンを終える。この場合には、補正値を用いずに、水平方向と垂直方向の焦点検出結果を用いて焦点検出を行う。   If it is determined in S102 that the difference between the horizontal focus detection result (first focus adjustment position) and the vertical focus detection result (second focus adjustment position) is appropriate, the process proceeds to S103, where BP1 = The subroutine for calculating vertical and horizontal BP correction values is completed. In this case, focus detection is performed using focus detection results in the horizontal and vertical directions without using correction values.

コントラスト検出方式の場合には、水平方向と垂直方向の焦点評価値の極大値の比などの大小関係に応じて、焦点検出結果の重みづけを行い水平方向と垂直方向を加味した焦点検出結果(焦点調節位置)を得る。位相差検出方式の場合も同様に、相関演算に用いられる相関量を用いて焦点検出結果の重みづけを行えばよい。   In the case of the contrast detection method, the focus detection result is weighted according to the magnitude relationship such as the ratio of the maximum value of the focus evaluation value in the horizontal direction and the vertical direction, and the focus detection result including the horizontal direction and the vertical direction ( Focus adjustment position). Similarly, in the case of the phase difference detection method, the focus detection result may be weighted using the correlation amount used for the correlation calculation.

一方で、S101で水平方向、もしくは垂直方向の一方向にのみ所定値以上の信頼性が有る場合や、S102で水平方向もしくは垂直方向の一方向のみが選択され場合には、S104に進む。S104で、焦点検出結果の方向選択を行う。信頼性のある焦点検出結果を算出した方向や、遠近競合判定で、より至近側にある被写体に対応した焦点検出結果を算出した方向を選択する。   On the other hand, if there is a reliability of a predetermined value or more only in one direction in the horizontal direction or the vertical direction in S101, or if only one direction in the horizontal direction or the vertical direction is selected in S102, the process proceeds to S104. In S104, the direction of the focus detection result is selected. A direction in which a reliable focus detection result is calculated or a direction in which a focus detection result corresponding to a subject on the closer side is calculated in the perspective conflict determination is selected.

つまり、焦点調節手段は、第1の焦点調節位置と第2の焦点調節位置の差が所定の閾値より大きい場合、第1の焦点調節位置及び第2の焦点調節位置のうち至近側の焦点調節位置を用いて記録用信号の焦点調節を行う。   That is, when the difference between the first focus adjustment position and the second focus adjustment position is larger than the predetermined threshold value, the focus adjustment unit adjusts the focus adjustment on the closest side of the first focus adjustment position and the second focus adjustment position. The focus of the recording signal is adjusted using the position.

次に、S105で、水平方向、垂直方向の重み付けが可能であるか否かを判定する。S105で判定を行う際には、焦点評価値の信頼性や遠近競合の観点で、水平方向、垂直方向の両方向に対して信頼性のある焦点検出結果が得られていないが、S105では改めて、縦横BP補正値を算出するための判定を行う。図10を用いて、詳細に説明する。   Next, in S105, it is determined whether or not weighting in the horizontal direction and the vertical direction is possible. When performing the determination in S105, a reliable focus detection result in both the horizontal direction and the vertical direction has not been obtained from the viewpoint of the reliability of the focus evaluation value and the perspective conflict, but in S105, A determination for calculating the vertical / horizontal BP correction value is performed. This will be described in detail with reference to FIG.

図10は、選択された焦点検出領域のフォーカスレンズ104の位置と焦点評価値の関係を示した図である。図中のE_h、E_vは、コントラスト検出方式で検出された水平方向の焦点評価値と垂直方向の焦点評価値の変化を示す曲線である。また、LP1、LP2、LP3は、それぞれフォーカスレンズ位置を示すものである。   FIG. 10 is a diagram showing the relationship between the position of the focus lens 104 in the selected focus detection area and the focus evaluation value. E_h and E_v in the figure are curves indicating changes in the horizontal focus evaluation value and the vertical focus evaluation value detected by the contrast detection method. LP1, LP2, and LP3 each indicate a focus lens position.

図10では、水平方向の焦点評価値E_hから信頼性のある焦点検出結果としてLP3が得られ、垂直方向の焦点評価値E_vから信頼性のある焦点検出結果としてLP1が得られた場合を示している。LP1とLP3はフォーカスレンズ位置が大きく異なっている、すなわち、遠近競合状態であるため、より至近側の焦点検出結果である水平方向の焦点検出結果LP3がS104で選択されている。   FIG. 10 shows a case where LP3 is obtained as a reliable focus detection result from the focus evaluation value E_h in the horizontal direction, and LP1 is obtained as a reliable focus detection result from the focus evaluation value E_v in the vertical direction. Yes. Since the focus lens positions of LP1 and LP3 are greatly different, that is, in a perspective conflict state, the focus detection result LP3 in the horizontal direction, which is the focus detection result on the closer side, is selected in S104.

このような状況で、S105では、選択されている水平方向の焦点検出結果LP1近傍に、垂直方向の焦点検出結果が存在しないか否かを判定する。図10のような状況では、LP2が存在するため、S106に進み、焦点検出結果LP3の補正値を、焦点検出結果LP2の影響を考慮に入れて算出する。   Under such circumstances, in S105, it is determined whether or not there is a vertical focus detection result in the vicinity of the selected horizontal focus detection result LP1. In the situation shown in FIG. 10, since LP2 exists, the process proceeds to S106, and the correction value of the focus detection result LP3 is calculated in consideration of the influence of the focus detection result LP2.

S106では、縦横BP補正情報として図8の1要素であるBP1_Bを取得している。   In S106, BP1_B, which is one element in FIG. 8, is acquired as the vertical / horizontal BP correction information.

図10におけるLP3の位置における水平方向の焦点評価値E_hpとLP1における垂直方向の焦点評価値E_vpを用いて、縦横BP補正値BP1は下記の式で算出される。
(式2)
BP1=BP1_B×E_vp/(E_vp+E_hp)×(+1)
Using the horizontal focus evaluation value E_hp at the position LP3 in FIG. 10 and the vertical focus evaluation value E_vp at LP1, the vertical / horizontal BP correction value BP1 is calculated by the following equation.
(Formula 2)
BP1 = BP1_B × E_vp / (E_vp + E_hp) × (+1)

第1の実施例では、水平方向の焦点検出結果に対する補正値を算出するため、式2を用いて補正値BP1を算出するが、垂直方向の焦点検出結果を補正する場合には、下記の式で算出される。
(式3)
BP1=BP1_B×E_hp/(E_vp+E_hp)×(−1)
In the first embodiment, in order to calculate the correction value for the focus detection result in the horizontal direction, the correction value BP1 is calculated using Formula 2, but when correcting the focus detection result in the vertical direction, the following formula is used. Is calculated by
(Formula 3)
BP1 = BP1_B × E_hp / (E_vp + E_hp) × (−1)

式2、式3から自明であるように、焦点評価値が大きいという情報を、被写体に含まれるコントラスト情報が多いと判定して、縦横BP補正値(BP1)を算出する。上述の通り、縦横BP補正情報は、(垂直方向にのみコントラスト情報をもつ被写体の焦点調節位置の差)−(水平方向にのみコントラスト情報を持つ被写体の焦点調節位置)である。   As is obvious from Equations 2 and 3, information indicating that the focus evaluation value is large is determined to be that there is a lot of contrast information included in the subject, and a vertical and horizontal BP correction value (BP1) is calculated. As described above, the vertical / horizontal BP correction information is (difference in focus adjustment position of subject having contrast information only in the vertical direction) − (focus adjustment position of subject having contrast information only in the horizontal direction).

そのため、水平方向の焦点検出結果を補正する補正値BP1と垂直方向の焦点検出結果を補正する補正値BP1の符号は反対となる。S106の処理を終えると、縦横BP補正値算出のサブルーチンを終了する。   Therefore, the signs of the correction value BP1 for correcting the focus detection result in the horizontal direction and the correction value BP1 for correcting the focus detection result in the vertical direction are opposite. When the process of S106 is completed, the vertical / horizontal BP correction value calculation subroutine ends.

一方で、S105で、選択されている水平方向の焦点検出結果LP1近傍に、垂直方向の焦点検出結果が存在しない場合には、S103に進む。S103では、被写体に含まれるコントラスト情報は、概ね1方向のみであると判断されるため、BP1=0とする。S107の処理を終えると、縦横BP補正値算出のサブルーチンを終了する。   On the other hand, if there is no vertical focus detection result in the vicinity of the selected horizontal focus detection result LP1 in S105, the process proceeds to S103. In S103, since it is determined that the contrast information included in the subject is generally only in one direction, BP1 = 0 is set. When the process of S107 is completed, the vertical / horizontal BP correction value calculation subroutine ends.

このように、被写体の方向毎のコントラスト情報に応じて、補正値を算出するため、被写体のパターンに応じた高精度な補正値算出を行うことができる。   Thus, since the correction value is calculated according to the contrast information for each direction of the subject, it is possible to calculate the correction value with high accuracy according to the pattern of the subject.

図10では、遠近競合している場合を説明したが、水平方向と垂直方向に1つずつ極大値が検出されており、片方の焦点検出結果に信頼性が無い場合も、同様に補正値を算出する。   In FIG. 10, the case where there is a perspective conflict has been described, but the maximum value is detected one by one in the horizontal direction and the vertical direction, and the correction value is similarly set even when the focus detection result of one side is not reliable. calculate.

第1の実施例では、S105で被写体の方向毎のコントラスト情報に基づき補正値を算出したが、補正値の算出方法はこれに限らない。例えば、第1の実施例の位相差検出方式の焦点検出のように、水平方向のみ焦点検出が行える場合には、被写体の水平方向と垂直方向のコントラストの情報量は同量であると仮定し、補正値を算出してもよい。   In the first embodiment, the correction value is calculated based on the contrast information for each direction of the subject in S105, but the correction value calculation method is not limited to this. For example, in the case where focus detection can be performed only in the horizontal direction, as in the focus detection of the phase difference detection method of the first embodiment, it is assumed that the amount of contrast information in the horizontal and vertical directions of the subject is the same. The correction value may be calculated.

その場合には、上述の式2、式3において、E_hp=E_vp=1を代入することにより補正値を算出することができる。このような処理を行うことにより、補正精度は落ちるが、補正値演算の負荷を減らすことができる。   In that case, the correction value can be calculated by substituting E_hp = E_vp = 1 in the above-described Expressions 2 and 3. By performing such processing, the correction accuracy is reduced, but the load of correction value calculation can be reduced.

上述の説明では、コントラスト検出方式の焦点検出結果に対して説明したが、位相差検出方式の焦点検出結果に対しても同様の処理を行うことが可能である。補正値算出の際の重み付けの係数として、位相差検出方式の相関演算で算出される相関量の変化量を用いればよい。   In the above description, the focus detection result of the contrast detection method has been described, but the same processing can be performed on the focus detection result of the phase difference detection method. As a weighting coefficient when calculating the correction value, a change amount of the correlation amount calculated by the correlation calculation of the phase difference detection method may be used.

これは、被写体の明暗差が大きい場合や明暗差のあるエッジの数が多い場合など、被写体のコントラスト情報が多ければ多いほど、相関量の変化量も大きくなることを利用している。同様の関係が得られる評価値であれば、相関量の変化量に限らず、種々の評価値を用いてよい。   This utilizes the fact that the amount of change in the correlation amount increases as the contrast information of the subject increases, such as when the contrast of the subject is large or the number of edges having the contrast is large. As long as the evaluation value can obtain the same relationship, various evaluation values may be used without being limited to the change amount of the correlation amount.

このように、縦横BP補正値を用いて、焦点検出結果を補正することにより、被写体の方向毎のコントラスト情報の量によらず、高精度な焦点検出を行うことができる。また、水平方向、垂直方向の補正値を図9に示したような共通の補正情報を用いて算出しているため、方向毎に各々の補正値を記憶する場合に比べて、補正情報の記憶容量を低減することができる。   In this way, by correcting the focus detection result using the vertical and horizontal BP correction values, high-precision focus detection can be performed regardless of the amount of contrast information for each direction of the subject. Further, since the correction values in the horizontal direction and the vertical direction are calculated using the common correction information as shown in FIG. 9, the correction information is stored as compared with the case where each correction value is stored for each direction. The capacity can be reduced.

また、方向毎の焦点検出結果が、大きく異なる場合には、これらの焦点検出結果を用いた縦横BP補正値の算出を行わないことにより、遠近競合の影響を低減することができる。さらに、遠近競合が想定される場合においても、方向毎の焦点評価値の大小により補正値の重みづけを行うことにより、より高精度な補正を行うことができる。   Also, when the focus detection results for each direction differ greatly, the influence of perspective conflict can be reduced by not calculating the vertical and horizontal BP correction values using these focus detection results. Furthermore, even when perspective conflict is assumed, more accurate correction can be performed by weighting the correction value according to the magnitude of the focus evaluation value for each direction.

(色BP補正値の算出方法)
次に、図11、図12を用いて、図1のS20で行う色BP補正値(BP2)の算出方法について説明する。
(Calculation method of color BP correction value)
Next, a method for calculating the color BP correction value (BP2) performed in S20 of FIG. 1 will be described with reference to FIGS.

図11は、図1のS21で行う処理の詳細を示す色BP補正値(BP2)を算出する流れを示したサブルーチンである。   FIG. 11 is a subroutine showing a flow of calculating the color BP correction value (BP2) indicating the details of the processing performed in S21 of FIG.

S200で、色BP補正情報の取得を行う。色BP補正情報は、カメラMPU125の要求に応じて、レンズMPU117を通じて、得られる情報であり、緑(G)の信号を用いて検出される合焦位置に対する他の色(赤(R)、青(B))の信号を用いて検出される合焦位置の差分情報である。図12は、レンズメモリ118に格納されている色BP補正情報の例を示している。   In S200, color BP correction information is acquired. The color BP correction information is information obtained through the lens MPU 117 in response to a request from the camera MPU 125, and other colors (red (R), blue) with respect to the in-focus position detected using the green (G) signal. (B)) is in-focus position difference information detected using the signal. FIG. 12 shows an example of color BP correction information stored in the lens memory 118.

図12は、図7の中央の焦点検出領域219a、218ahに対応した補正値を示している。同様に、他の2個の焦点検出領域についても焦点検出補正値を記憶している。但し、結像光学系の光軸に対して対称な焦点検出領域については、設計上の焦点検出補正値は等しくなる。従って、3つの焦点検出領域に対して、2つの焦点検出補正値のテーブルを記憶していればよい。また、焦点検出領域の位置によって補正値が大きく変化しない場合には、共通の値として記憶すればよい。   FIG. 12 shows correction values corresponding to the focus detection areas 219a and 218ah in the center of FIG. Similarly, focus detection correction values are stored for the other two focus detection areas. However, the design focus detection correction values are equal for the focus detection regions that are symmetrical with respect to the optical axis of the imaging optical system. Therefore, it is only necessary to store two focus detection correction value tables for the three focus detection regions. If the correction value does not change greatly depending on the position of the focus detection area, it may be stored as a common value.

図12において、図9と同様に、撮影光学系のズーム位置とフォーカス位置を8つのゾーンに分割し、その分割ゾーンごとに焦点検出補正値BP211〜BP288とBP311〜388を備える構成としている。従って、撮影光学系のフォーカスレンズ104、第1レンズ群101の位置に応じて高精度な補正値を得られる構成となっている。   In FIG. 12, similarly to FIG. 9, the zoom position and the focus position of the photographing optical system are divided into eight zones, and focus detection correction values BP211 to BP288 and BP311 to 388 are provided for each of the divided zones. Therefore, a highly accurate correction value can be obtained according to the position of the focus lens 104 and the first lens group 101 of the photographing optical system.

図12(a)の焦点検出補正値BP211〜BP288は、緑(G)のカラーフィルタを有する画素の出力信号を用いて検出される焦点検出結果に対する赤(R)のカラーフィルタを有する画素の出力信号を用いて検出される焦点検出結果の差分である。図12(b)の焦点検出補正値BP311〜BP388は、緑(G)のカラーフィルタを有する画素の出力信号を用いて検出される焦点検出結果に対する青(B)のカラーフィルタを有する画素の出力信号を用いて検出される焦点検出結果の差分である。   The focus detection correction values BP211 to BP288 in FIG. 12A are outputs of pixels having a red (R) color filter with respect to a focus detection result detected using an output signal of a pixel having a green (G) color filter. This is a difference between focus detection results detected using a signal. The focus detection correction values BP311 to BP388 in FIG. 12B are output of the pixel having the blue (B) color filter with respect to the focus detection result detected using the output signal of the pixel having the green (G) color filter. This is a difference between focus detection results detected using a signal.

第1の実施例における緑(G)、赤(R)、青(B)は、上述の撮像素子上の画素に施されるカラーフィルタ毎に得られる信号を意味しているが、各色の定義は、これに限らない。例えば、別途、被写体の分光情報を検出する分光検出手段を有し、分光検出手段の出力に合わせて、緑(G)、赤(R)、青(B)の波長もしくは波長域を設定してもよい。   In the first embodiment, green (G), red (R), and blue (B) mean signals obtained for each of the color filters applied to the pixels on the image sensor described above. Is not limited to this. For example, a spectral detection unit that separately detects spectral information of a subject is provided, and the wavelengths or wavelength ranges of green (G), red (R), and blue (B) are set according to the output of the spectral detection unit. Also good.

また、色BP補正情報は、コントラスト検出方式、位相差検出方式の両方に用いることができる。   The color BP correction information can be used for both the contrast detection method and the phase difference detection method.

S200では、補正対象となっている焦点検出結果に応じたズーム位置、フォーカス位置に対応した補正値を取得する。   In S200, the zoom position and the correction value corresponding to the focus position corresponding to the focus detection result to be corrected are acquired.

次に、S201で、色BP補正値の算出を行う。S200で、図12(a)の1要素でとしてBP_R、図12(b)の1要素としてBP_Bを取得している場合には、色BP補正値BP2は、下記の式で算出される。
(式4)
BP2=K_R×BP_R+K_B×BP_B
In step S201, a color BP correction value is calculated. In S200, when BP_R is acquired as one element of FIG. 12A and BP_B is acquired as one element of FIG. 12B, the color BP correction value BP2 is calculated by the following equation.
(Formula 4)
BP2 = K_R × BP_R + K_B × BP_B

K_RおよびK_Bは、各色の補正情報に対する係数である。被写体に含まれる緑(G)情報に対する赤(R)や青(B)の情報の大小関係と相関がある値で、赤い色を多く含む被写体に対しては、K_Rが大きな値を取り、青い色を多く含む被写体に対しては、K_Bが大きな値を取る。   K_R and K_B are coefficients for the correction information of each color. For a subject that contains many red colors, K_R takes a large value and is blue for a value that correlates with the magnitude relationship of red (R) and blue (B) information with respect to green (G) information contained in the subject. For a subject that contains many colors, K_B takes a large value.

緑色を多く含む被写体に対しては、K_R、K_B共に小さい値を取る。K_R、K_Bは、被写体として代表的な分光情報に基づき、予め設定しておけばよい。もしくは、被写体の分光情報を、被写体の分光を検出する手段を用いて取得できる場合には、被写体の分光情報に応じて、K_R、K_Bを設定すればよい。S202で色BP補正値の算出を終えると、本サブルーチンを終了する。   For a subject containing a lot of green, both K_R and K_B take small values. K_R and K_B may be set in advance based on spectral information representative of the subject. Alternatively, when the spectral information of the subject can be acquired using means for detecting the spectral of the subject, K_R and K_B may be set according to the spectral information of the subject. When the calculation of the color BP correction value is finished in S202, this subroutine is finished.

第1の実施例では、焦点検出に用いるベストピント補正値を図9や図12のように焦点検出領域ごとにテーブルデータを記憶するようにしたが、補正値の記憶方法については、これに限らない。例えば、撮像素子と結像光学系の光軸の交点を原点とし撮像装置の水平方向、垂直方向をX軸、Y軸とした座標を設定し、焦点検出領域の中心座標における補正値をXとYの関数で求めてもよい。この場合、焦点検出補正値として記憶するべき情報量を削減することができる。   In the first embodiment, the best focus correction value used for focus detection is stored for each focus detection area as shown in FIGS. 9 and 12, but the correction value storage method is not limited to this. Absent. For example, coordinates are set with the intersection of the optical axis of the imaging device and the imaging optical system as the origin and the horizontal and vertical directions of the imaging device as the X axis and the Y axis, and the correction value at the center coordinate of the focus detection area is set as X You may obtain | require with the function of Y. In this case, the amount of information to be stored as the focus detection correction value can be reduced.

また、第1の実施例では、縦横BP補正情報や色BP補正情報を用いて算出する焦点検出に用いる補正値を、被写体のパターンの持つ空間周波数情報によらないものとして算出した。そのため、記憶するべき補正情報の量を増やすことなく高精度な補正を行うことができる。しかしながら、補正値の算出方法は、これに限らない。後述する空間周波数BP補正値の算出方法と同様に、空間周波数毎の縦横BP補正情報や色BP補正情報を用いて、被写体の空間周波数成分に合わせた補正値を算出してもよい。   In the first embodiment, the correction value used for focus detection calculated using the vertical / horizontal BP correction information and the color BP correction information is calculated based on the spatial frequency information of the subject pattern. Therefore, highly accurate correction can be performed without increasing the amount of correction information to be stored. However, the correction value calculation method is not limited to this. Similar to a method for calculating a spatial frequency BP correction value described later, a correction value that matches the spatial frequency component of the subject may be calculated using vertical / horizontal BP correction information and color BP correction information for each spatial frequency.

(空間周波数BP補正値の算出方法)
次に、図13から図16を用いて、図1のS22で行う空間周波数BP補正値(BP3)の算出方法について説明する。
(Calculation method of spatial frequency BP correction value)
Next, a method for calculating the spatial frequency BP correction value (BP3) performed in S22 of FIG. 1 will be described with reference to FIGS.

図13は、図1のS22で行う処理の詳細を示す空間周波数BP補正値(BP3)を算出する流れを示したサブルーチンである。   FIG. 13 is a subroutine showing a flow of calculating the spatial frequency BP correction value (BP3) indicating the details of the processing performed in S22 of FIG.

S300で、空間周波数BP補正情報の取得を行う。空間周波数BP補正情報は、カメラMPU125の要求に応じて、レンズMPU117を通じて得られる情報であり、被写体の空間周波数ごとの撮影光学系の結像位置に関する情報である。   In S300, the spatial frequency BP correction information is acquired. The spatial frequency BP correction information is information obtained through the lens MPU 117 in response to a request from the camera MPU 125, and is information regarding the imaging position of the photographing optical system for each spatial frequency of the subject.

図14を用いて、レンズメモリ118に格納されている空間周波数BP補正情報の例を説明する。図14は、撮影光学系のデフォーカスMTFを示している。横軸は、フォーカスレンズ104の位置を示しており、縦軸はMTFの強度を示している。図14に描かれている4種の曲線は、空間周波数ごとのMTF曲線で、MTF1、MTF2、MTF3、MTF4の順に、空間周波数が低い方から高い方に変化した場合を示している。   An example of the spatial frequency BP correction information stored in the lens memory 118 will be described with reference to FIG. FIG. 14 shows the defocus MTF of the photographing optical system. The horizontal axis indicates the position of the focus lens 104, and the vertical axis indicates the intensity of the MTF. The four types of curves depicted in FIG. 14 are MTF curves for each spatial frequency, and show a case where the spatial frequency changes from lower to higher in the order of MTF1, MTF2, MTF3, and MTF4.

空間周波数F1(lp/mm)のMTF曲線がMTF1と対応し、同様に、空間周波数F2、F3、F4(lp/mm)とMTF2、MTF3、MTF4が対応する。また、LP4、LP5、LP5、LP6は、各デフォーカスMTF曲線の極大値に対応するフォーカスレンズ104位置を示している。   The MTF curve of the spatial frequency F1 (lp / mm) corresponds to MTF1, and similarly, the spatial frequencies F2, F3, and F4 (lp / mm) correspond to MTF2, MTF3, and MTF4. LP4, LP5, LP5, and LP6 indicate the positions of the focus lens 104 corresponding to the maximum values of the defocus MTF curves.

図14では、連続曲線で示されているが、レンズメモリ118に格納されている空間周波数BP補正情報は、図14の曲線を離散的にサンプリングしたものである。第1の実施例では、1つのMTF曲線に対して、10個のフォーカスレンズ位置に対してMTFデータがサンプリングされており、例えば、MTF1に対しては、MTF1(n)(1≦n≦10)として10個のデータを記憶している。   In FIG. 14, although shown by a continuous curve, the spatial frequency BP correction information stored in the lens memory 118 is obtained by discretely sampling the curve of FIG. In the first embodiment, MTF data is sampled for 10 focus lens positions with respect to one MTF curve. For example, for MTF1, MTF1 (n) (1 ≦ n ≦ 10). ) 10 data are stored.

空間周波数BP補正情報は、縦横BP補正情報や、色BP補正情報と同様に、焦点検出領域の位置ごとに記憶している。また、撮影光学系のズーム位置とフォーカス位置を8つのゾーンに分割し、その分割ゾーンごとに空間周波数BP補正情報を有する。上述した縦横BP補正情報や色BP補正情報と同様に、焦点検出領域の数、ズーム位置やフォーカス位置の分割数は、自由に設定してよい。設定数を増やすほど、データの記憶に必要なメモリ量が増えてしまうが、高精度な補正が期待できる。   Spatial frequency BP correction information is stored for each position of the focus detection area in the same manner as vertical and horizontal BP correction information and color BP correction information. Further, the zoom position and the focus position of the photographing optical system are divided into eight zones, and spatial frequency BP correction information is provided for each of the divided zones. Similar to the vertical / horizontal BP correction information and color BP correction information described above, the number of focus detection areas, the number of divisions of the zoom position, and the focus position may be freely set. As the number of settings increases, the amount of memory necessary for data storage increases, but high-precision correction can be expected.

また、空間周波数BP補正情報は、コントラスト検出方式、位相差検出方式の両方に用いることができる。   The spatial frequency BP correction information can be used for both the contrast detection method and the phase difference detection method.

S300では、補正対象となっている焦点検出結果に応じたズーム位置、フォーカス位置に対応した補正値を取得する。   In S300, the zoom position and the correction value corresponding to the focus position corresponding to the focus detection result to be corrected are acquired.

次に、S301で、コントラスト検出方式や位相差検出方式の焦点検出(AF)を行う際に用いられる信号の帯域の算出を行う。第1の実施例では、被写体、撮影光学系、撮像素子のサンプリング、評価に用いるデジタルフィルタの影響を鑑みて、AF評価帯域の算出を行う。AF評価帯域の算出方法は、後述する。   In step S301, a signal band used for focus detection (AF) in the contrast detection method or the phase difference detection method is calculated. In the first embodiment, the AF evaluation band is calculated in consideration of the influence of the subject, the photographing optical system, the sampling of the image sensor, and the digital filter used for evaluation. A method for calculating the AF evaluation band will be described later.

次に、S302で、撮影画像に用いられる信号の帯域の算出を行う。S302のAF評価帯域の算出と同様に、被写体、撮影光学系、撮像素子のサンプリング、撮影画像の鑑賞者の評価帯域の影響を鑑みて、撮影画像評価帯域の算出を行う。   Next, in S302, the band of the signal used for the captured image is calculated. Similar to the calculation of the AF evaluation band in S302, the photographed image evaluation band is calculated in consideration of the influence of the subject, the photographing optical system, the sampling of the image sensor, and the evaluation band of the viewer of the photographed image.

図15を用いて、S301、S302で行うAF評価帯域(第2の評価帯域)、撮影画像評価帯域(記録用信号の第1の評価帯域)の算出について説明する。図15は、いずれも空間周波数毎の強度を示しており、横軸に空間周波数、縦軸に強度を示している。   The calculation of the AF evaluation band (second evaluation band) and the captured image evaluation band (first evaluation band of the recording signal) performed in S301 and S302 will be described with reference to FIG. FIG. 15 shows the intensity for each spatial frequency, with the horizontal axis indicating the spatial frequency and the vertical axis indicating the intensity.

図15(a)は、被写体の空間周波数特性(I)を示している。横軸上のF1、F2、F3、F4は、図14のMTF曲線(MTF1〜MTF4)と対応した空間周波数である。また、Nqは、撮像素子の画素ピッチによりきまるナイキスト周波数を示している。F1からF4とNqについては、以後説明する図15(b)から図15(f)にも同様に示している。   FIG. 15A shows the spatial frequency characteristic (I) of the subject. F1, F2, F3, and F4 on the horizontal axis are spatial frequencies corresponding to the MTF curves (MTF1 to MTF4) in FIG. Nq represents the Nyquist frequency determined by the pixel pitch of the image sensor. F1 to F4 and Nq are similarly shown in FIGS. 15B to 15F described later.

第1の実施例では、被写体の空間周波数特性(I)は、事前に記憶した代表値を用いる。図15(a)では、被写体の空間周波数特性(I)は、曲線で描かれているが、離散的に空間周波数F1、F2、F3、F4に対応した値を有し、それをI(n)(1≦n≦4)と表す。   In the first embodiment, a representative value stored in advance is used as the spatial frequency characteristic (I) of the subject. In FIG. 15A, the spatial frequency characteristic (I) of the subject is drawn as a curve, but has discrete values corresponding to the spatial frequencies F1, F2, F3, and F4, and is expressed as I (n ) (1 ≦ n ≦ 4).

また、第1の実施例では、予め記憶された被写体の空間周波数特性を用いたが、焦点検出を行う被写体に応じて、用いる被写体の空間周波数特性を変更してもよい。撮影した画像信号をFFT処理などの処理を行うことにより、被写体の空間周波数情報を得ることができる。   In the first embodiment, the spatial frequency characteristics of the subject stored in advance are used. However, the spatial frequency characteristics of the subject to be used may be changed according to the subject for which focus detection is performed. By performing processing such as FFT processing on the captured image signal, spatial frequency information of the subject can be obtained.

このような処理により、演算処理内容が増えるが、焦点検出を行う被写体に応じた補正値を算出できるため、高精度な焦点調節を行うことができる。また、より簡易的に、被写体のコントラスト情報の大小によって、予め記憶された数種の空間周波数特性を使い分けてもよい。   Such processing increases the amount of calculation processing, but a correction value corresponding to the subject for which focus detection is performed can be calculated, so that highly accurate focus adjustment can be performed. Further, several types of spatial frequency characteristics stored in advance may be properly used depending on the magnitude of the contrast information of the subject.

図15(b)は、撮影光学系の撮影光学系の空間周波数特性(O)である。この情報は、レンズMPU117を通じて得てもよいし、カメラ内のRAM125bに記憶しておいてもよい。その際に記憶する情報は、デフォーカス状態毎の空間周波数特性でもよいし、合焦時の空間周波数特性のみでもよい。空間周波数BP補正値は、合焦近傍で算出するため、合焦時の空間周波数特性を用いれば、高精度に補正を行うことができる。   FIG. 15B is a spatial frequency characteristic (O) of the photographing optical system of the photographing optical system. This information may be obtained through the lens MPU 117 or may be stored in the RAM 125b in the camera. The information stored at this time may be a spatial frequency characteristic for each defocus state or only a spatial frequency characteristic at the time of focusing. Since the spatial frequency BP correction value is calculated in the vicinity of the in-focus state, the correction can be performed with high accuracy by using the spatial frequency characteristic at the time of in-focus state.

但し、演算負荷は増えるものの、デフォーカス状態毎の空間周波数特性を用いると、より高精度に焦点調節を行うことができる。どのデフォーカス状態の空間周波数特性用いるかについては、位相差検出方式の焦点検出により得られるデフォーカス量を用いて選択すればよい。   However, although the calculation load increases, focus adjustment can be performed with higher accuracy by using the spatial frequency characteristics for each defocus state. Which defocus state spatial frequency characteristic is used may be selected using a defocus amount obtained by focus detection by the phase difference detection method.

図15(b)では、撮影光学系の空間周波数特性(O)は、曲線で描かれているが、離散的に空間周波数F1、F2、F3、F4に対応した値を有し、それをO(n)(1≦n≦4)と表す。   In FIG. 15B, the spatial frequency characteristic (O) of the photographing optical system is drawn with a curve, but has discrete values corresponding to the spatial frequencies F1, F2, F3, and F4. (N) (1 ≦ n ≦ 4).

図15(c)は、光学ローパスフィルタ121の空間周波数特性(L)である。この情報は、カメラ内のRAM125bに記憶されている。図15(c)では、光学ローパスフィルタ121の空間周波数特性(L)は、曲線で描かれているが、離散的に空間周波数F1、F2、F3、F4に対応した値を有し、それをL(n)(1≦n≦4)と表す。   FIG. 15C shows the spatial frequency characteristic (L) of the optical low-pass filter 121. This information is stored in the RAM 125b in the camera. In FIG. 15 (c), the spatial frequency characteristic (L) of the optical low-pass filter 121 is drawn as a curve, but has discrete values corresponding to the spatial frequencies F1, F2, F3, and F4. L (n) (1 ≦ n ≦ 4).

図15(d)は、信号生成による空間周波数特性(M1、M2)である。上述の通り、第1の実施例の撮像素子は2種類の読み出しモードを有する。第1の読み出しモード、すなわち全画素読み出しモードでは、信号生成時に空間周波数特性が変わる事はない。図15(d)のM1は、第1の読み出しモードの際の空間周波数特性を示している。   FIG. 15D shows the spatial frequency characteristics (M1, M2) by signal generation. As described above, the image sensor of the first embodiment has two types of readout modes. In the first readout mode, that is, the all-pixel readout mode, the spatial frequency characteristics do not change during signal generation. M1 in FIG. 15D indicates a spatial frequency characteristic in the first read mode.

一方で、第2の読み出しモード、すなわち間引き読み出しモードの際には、信号生成時に空間周波数特性が変わる。上述の通り、X方向の間引きの際に信号の加算を行いS/Nの改善を図るため、加算によるローパス効果が発生する。図15(d)のM2は、第2の読み出しモードの際の信号生成時の空間周波数特性を示している。ここでは、間引きの影響は加味せず、加算によるローパス効果を示している。   On the other hand, in the second reading mode, that is, the thinning-out reading mode, the spatial frequency characteristics change when generating a signal. As described above, a signal is added at the time of decimation in the X direction to improve the S / N, so that a low-pass effect due to the addition occurs. M2 in FIG. 15D indicates the spatial frequency characteristics during signal generation in the second readout mode. Here, the influence of thinning is not taken into account, and the low-pass effect by addition is shown.

図15(d)では、信号生成による空間周波数特性(M1、M2)は、曲線で描かれているが、離散的に空間周波数F1、F2、F3、F4に対応した値を有し、それをM1(n)、M2(n)(1≦n≦4)と表す。   In FIG. 15 (d), the spatial frequency characteristics (M1, M2) due to signal generation are drawn as curves, but discretely have values corresponding to the spatial frequencies F1, F2, F3, F4. M1 (n) and M2 (n) (1 ≦ n ≦ 4) are represented.

図15(e)は、撮影画像を鑑賞する際の空間周波数ごとの感度を示す空間周波数特性(D1)とAF評価信号の処理時に用いるデジタルフィルタの空間周波数特性(D2)を示している。   FIG. 15E shows the spatial frequency characteristic (D1) indicating the sensitivity for each spatial frequency when viewing a captured image and the spatial frequency characteristic (D2) of the digital filter used when processing the AF evaluation signal.

撮影画像を鑑賞する際の空間周波数毎の感度は、鑑賞者の個人差や、画像サイズや鑑賞距離、明るさなどの鑑賞環境などにより影響を受ける。第1の実施例では、代表的な値として、鑑賞時の空間周波数毎の感度を設定し、記憶している。   Sensitivity for each spatial frequency at the time of appreciating a photographed image is affected by individual differences among viewers, viewing environments such as image size, viewing distance, and brightness. In the first embodiment, the sensitivity for each spatial frequency during viewing is set and stored as a representative value.

鑑賞距離は、ユーザーから記録画像が表示されるディスプレイまでの距離、ユーザーから記録画像が印字される紙までの距離を意味する。   The viewing distance means the distance from the user to the display on which the recorded image is displayed, and the distance from the user to the paper on which the recorded image is printed.

一方で、第2の読み出しモードの際には、間引きの影響で、信号の周波数成分の折り返しノイズが発生する。その影響を加味して、デジタルフィルタの空間周波数特性を示したのがD2である。   On the other hand, in the second reading mode, aliasing noise of the frequency component of the signal occurs due to the influence of thinning. In consideration of the influence, D2 shows the spatial frequency characteristics of the digital filter.

図15(e)では、鑑賞時の空間周波数特性(D1)とデジタルフィルタの空間周波数特性(D2)は、曲線で描かれているが、離散的に空間周波数F1、F2、F3、F4に対応した値を有し、それをD1(n)、D2(n)(1≦n≦4)と表す。   In FIG. 15 (e), the spatial frequency characteristic (D1) at the time of viewing and the spatial frequency characteristic (D2) of the digital filter are drawn with curves, but discretely correspond to the spatial frequencies F1, F2, F3, and F4. It is expressed as D1 (n) and D2 (n) (1 ≦ n ≦ 4).

以上のように、種々の情報を、カメラ、レンズのいずれかに記憶しておくことにより、撮影画像の評価帯域W1やAF評価帯域W2の算出を下記の式を用いて行う。
(式5)
W1(n)=I(n)×O(n)×L(n)×M1(n)×D1(n)(1≦n≦4)
(式6)
W2(n)=I(n)×O(n)×L(n)×M2(n)×D2(n)(1≦n≦4)
As described above, by storing various information in either the camera or the lens, the evaluation band W1 and the AF evaluation band W2 of the captured image are calculated using the following equations.
(Formula 5)
W1 (n) = I (n) × O (n) × L (n) × M1 (n) × D1 (n) (1 ≦ n ≦ 4)
(Formula 6)
W2 (n) = I (n) × O (n) × L (n) × M2 (n) × D2 (n) (1 ≦ n ≦ 4)

図15(f)に、撮影画像の評価帯域W1(記録用信号の第1の評価帯域)とAF評価帯域W2(第2の評価帯域)を示す。式5や式6のような計算を行うことにより、撮影画像の合焦状態を決定する因子に対して、空間周波数毎に、どの程度の影響度合いを有するかを定量化することができる。同様に、焦点検出結果が有する誤差が、空間周波数毎に、どの程度の影響度合いを有するかを定量化することができる。   FIG. 15F shows an evaluation band W1 (first evaluation band of the recording signal) and AF evaluation band W2 (second evaluation band) of the captured image. By performing calculations such as Expression 5 and Expression 6, it is possible to quantify the degree of influence for each spatial frequency with respect to the factor that determines the in-focus state of the captured image. Similarly, it is possible to quantify how much influence the error of the focus detection result has for each spatial frequency.

また、カメラ内に記憶する情報は、事前に計算されたW1やW2を記憶していてもよい。上述のように、補正の度に計算することにより、AF評価の際に用いるデジタルフィルタ等を変更した際に、柔軟に対応して補正値を算出できる。一方で、事前に記憶しておけば、式5や式6のような計算や各種データの記憶容量を省略することができる。   The information stored in the camera may store W1 and W2 calculated in advance. As described above, by calculating each correction, the correction value can be calculated flexibly when the digital filter or the like used for AF evaluation is changed. On the other hand, if they are stored in advance, calculations such as Equation 5 and Equation 6 and the storage capacity of various data can be omitted.

また、全ての計算を事前に終えておく必要はないため、例えば、撮影光学系と被写体の空間周波数特性のみは予め計算し、カメラ内に記憶することにより、データの記憶容量の低減や演算量の低減を行ってもよい。   In addition, since it is not necessary to finish all calculations in advance, for example, only the spatial frequency characteristics of the photographing optical system and the subject are calculated in advance and stored in the camera, thereby reducing the data storage capacity and the calculation amount. May be reduced.

図15では、説明を簡易にするため、4つ空間周波数(F1〜F4)を用いて説明したが、データを有する空間周波数の数は、多いほど、撮影画像やAFの評価帯域の空間周波数特性を正確に再現することができ、精度のよい補正値の算出を行うことができる。   In FIG. 15, the four spatial frequencies (F1 to F4) are used to simplify the description. However, as the number of spatial frequencies having data increases, the spatial frequency characteristics of the captured image and the evaluation band of the AF are increased. Can be accurately reproduced, and a highly accurate correction value can be calculated.

一方で、重みづけを行う空間周波数を少なくすることにより、演算量の低減を行うことができる。撮影画像の評価帯域とAF評価帯域の空間周波数特性を代表する空間周波数を各々1つずつ持ち、以後の演算を行ってもよい。   On the other hand, the amount of calculation can be reduced by reducing the spatial frequency for weighting. It is also possible to have one spatial frequency representative of the spatial frequency characteristics of the evaluation band of the photographed image and the AF evaluation band, and perform subsequent calculations.

図13に戻りサブルーチンの内容の説明を続ける。   Returning to FIG. 13, the description of the subroutine will be continued.

S303で、空間周波数BP補正値(BP3)の算出を行う。空間周波数BP補正値の算出を行うに際し、まず、撮影画像のデフォーカスMTF(C1)と焦点検出信号のデフォーカスMTF(C2)を算出する。C1、C2は、S300で得たデフォーカスMTF情報と、S301、S301で得た評価帯域W1、W2を用いて、下記式にて算出する。
(式7)
C1(n)=MTF1(n)×W1(1)+MTF2(n)×W1(2)+MTF3(n)×W1(3)+MTF4(n)×W1(4)
(式8)
C2(n)=MTF1(n)×W2(1)+MTF2(n)×W2(2)+MTF3(n)×W2(3)+MTF4(n)×W2(4)
In S303, a spatial frequency BP correction value (BP3) is calculated. In calculating the spatial frequency BP correction value, first, the defocus MTF (C1) of the captured image and the defocus MTF (C2) of the focus detection signal are calculated. C1 and C2 are calculated by the following formula using the defocus MTF information obtained in S300 and the evaluation bands W1 and W2 obtained in S301 and S301.
(Formula 7)
C1 (n) = MTF1 (n) × W1 (1) + MTF2 (n) × W1 (2) + MTF3 (n) × W1 (3) + MTF4 (n) × W1 (4)
(Formula 8)
C2 (n) = MTF1 (n) × W2 (1) + MTF2 (n) × W2 (2) + MTF3 (n) × W2 (3) + MTF4 (n) × W2 (4)

式7、式8では、図14で示した空間周波数毎のデフォーカスMTF情報に対して、S301、S302で算出した撮影画像やAFの評価帯域の重みづけを行い加算し、撮影画像のデフォーカスMTFであるC1とAFのデフォーカスMTFであるC2を得ている。図16に、得られた2つのデフォーカスMTFであるC1、C2を示している。   In Expressions 7 and 8, the defocus MTF information for each spatial frequency shown in FIG. 14 is weighted and added to the captured image or AF evaluation band calculated in S301 and S302, and the defocus of the captured image is performed. C1 as the MTF and C2 as the AF defocus MTF are obtained. FIG. 16 shows the obtained two defocus MTFs C1 and C2.

横軸はフォーカスレンズ104の位置で、縦軸は、空間周波数毎に重み付けして加算されたMTFの値となっている。カメラMPU125は、結像位置算出手段として各々のMTF曲線の極大値位置を検出する。曲線C1の極大値と対応するフォーカスレンズ104の位置としてP_img(第1の結像位置)が検出される。曲線C2の極大値と対応するフォーカスレンズ104の位置としてP_AF(第2の結像位置)が検出される。   The horizontal axis represents the position of the focus lens 104, and the vertical axis represents the MTF value added by weighting for each spatial frequency. The camera MPU 125 detects the maximum value position of each MTF curve as an imaging position calculation means. P_img (first imaging position) is detected as the position of the focus lens 104 corresponding to the maximum value of the curve C1. P_AF (second imaging position) is detected as the position of the focus lens 104 corresponding to the maximum value of the curve C2.

S303で、空間周波数BP補正値であるBP3は、下記の式により算出される。
(式9)
BP3=P_AF−P_img
In S303, the spatial frequency BP correction value BP3 is calculated by the following equation.
(Formula 9)
BP3 = P_AF-P_img

式9により、撮影画像の合焦位置とAFが検出する合焦位置の間で発生しうる誤差を補正するための補正値を補正することができる。上述の説明の通り、撮影画像の合焦位置は、被写体の空間周波数特性、撮影光学系の空間周波数特性、光学ローパスフィルタの空間周波数特性、信号生成時の空間周波数特性、鑑賞時の周波数毎の感度を示す空間周波数特性などにより変化する。   According to Expression 9, it is possible to correct a correction value for correcting an error that may occur between the focus position of the captured image and the focus position detected by the AF. As described above, the in-focus position of the photographed image is the spatial frequency characteristic of the subject, the spatial frequency characteristic of the photographing optical system, the spatial frequency characteristic of the optical low-pass filter, the spatial frequency characteristic at the time of signal generation, and the frequency at the time of viewing. It varies depending on the spatial frequency characteristics indicating sensitivity.

他にも、撮影画像に施される画像処理などによっても変化する。第1の実施例では、撮影画像の生成される過程に遡って空間周波数特性を算出することにより、高精度に撮影画像の合焦位置を算出することができる。例えば、撮影画像を記録する際の記録サイズや画像処理で行われる超解像処理、シャープネスなどによって、撮影画像の合焦位置を変更する。   In addition, it varies depending on image processing applied to the captured image. In the first embodiment, the in-focus position of the captured image can be calculated with high accuracy by calculating the spatial frequency characteristic going back to the process of generating the captured image. For example, the in-focus position of the photographed image is changed by the recording size when the photographed image is recorded, the super-resolution processing performed in the image processing, the sharpness, or the like.

また、撮影画像の記録後に、どの程度の画像サイズや拡大率で鑑賞されるかや鑑賞する際の鑑賞距離などが、事前にわかる場合は、鑑賞者の評価帯域に影響を与える。画像サイズが大きくなるほど、また、鑑賞距離が短くなるほど、鑑賞者の評価帯域は、高周波成分に重きを置いた特性とする。これにより、撮影画像の合焦位置も変更されることとなる。   In addition, when the captured image is recorded, it is possible to know in advance how much the image size and enlargement ratio can be viewed, and the viewing distance when viewing the image, which affects the evaluation band of the viewer. As the image size is increased and the viewing distance is shortened, the viewer's evaluation band is set to have a characteristic that emphasizes the high frequency component. As a result, the in-focus position of the captured image is also changed.

一方で、AFが検出する合焦位置も同様に、被写体の空間周波数特性、撮影光学系の空間周波数特性、光学ローパスフィルタの空間周波数特性、信号生成時の空間周波数特性、AF評価に用いるデジタルフィルタ空間周波数特性などにより変化する。第1の実施例では、AFに用いられる信号が生成される過程に遡って空間周波数特性を算出することにより、高精度にAFが検出する合焦位置を算出することができる。   On the other hand, the focus position detected by the AF is similarly the spatial frequency characteristics of the subject, the spatial frequency characteristics of the photographing optical system, the spatial frequency characteristics of the optical low-pass filter, the spatial frequency characteristics at the time of signal generation, and the digital filter used for AF evaluation. It varies depending on the spatial frequency characteristics. In the first embodiment, the in-focus position detected by the AF can be calculated with high accuracy by calculating the spatial frequency characteristics going back to the process of generating the signal used for the AF.

例えば、第1の読み出しモードで、AFを行う際にも柔軟に対応できる。その場合には、信号生成時の空間周波数特性を、第1の読み出しモードに対応した特性に変更して、重みづけ係数を算出すればよい。   For example, it is possible to flexibly cope with AF in the first readout mode. In that case, the weighting coefficient may be calculated by changing the spatial frequency characteristic at the time of signal generation to a characteristic corresponding to the first readout mode.

また、第1の実施例で説明した撮像装置は、交換レンズ式一眼レフカメラであるため、レンズユニット100の交換が可能である。交換が行われた場合には、撮影光学系ごとに、各空間周波数に対応したデフォーカスMTF情報を、カメラ本体120に送信し、撮影画像の合焦位置やAFが検出する合焦位置を算出するため、交換レンズ毎に高精度な補正値の算出を行うことができる。   Further, since the image pickup apparatus described in the first embodiment is an interchangeable lens type single-lens reflex camera, the lens unit 100 can be replaced. When the exchange is performed, defocus MTF information corresponding to each spatial frequency is transmitted to the camera body 120 for each photographing optical system, and the in-focus position of the photographed image and the in-focus position detected by the AF are calculated. Therefore, a highly accurate correction value can be calculated for each interchangeable lens.

レンズユニット100は、デフォーカスMTF情報だけでなく、撮影光学系の空間周波数特性などの情報もカメラ本体120に送信してもよい。その情報の活用方法は、上述のとおりである。   The lens unit 100 may transmit not only the defocus MTF information but also information such as the spatial frequency characteristics of the photographing optical system to the camera body 120. The method of using the information is as described above.

また、同様に、カメラ本体120を交換した場合には、画素ピッチや光学ローパスフィルタの特性などが変わる場合がある。上述の通り、そのような場合でも、カメラ本体120の特性に合わせた補正値が算出されるため、高精度に補正を行うことができる。   Similarly, when the camera body 120 is replaced, the pixel pitch, the characteristics of the optical low-pass filter, and the like may change. As described above, even in such a case, a correction value that matches the characteristics of the camera body 120 is calculated, so that correction can be performed with high accuracy.

上述の説明では、主に補正値の計算を、カメラMPU125で行ったが、計算手段はこれに限らない。例えば、レンズMPU117で補正値の計算を行ってもよい。その場合には、カメラMPUから、レンズMPUに対して、図15を用いて説明した各種情報を送信し、レンズMPU内で、デフォーカスMTF情報などを用いて補正値の算出を行ってもよい。その場合には、図1のS24で、カメラMPU125から送信された合焦位置に対して、レンズMPUが補正を施して、レンズ駆動を行えばよい。   In the above description, the correction value is mainly calculated by the camera MPU 125, but the calculation means is not limited to this. For example, the correction value may be calculated by the lens MPU 117. In this case, the camera MPU may transmit various information described with reference to FIG. 15 to the lens MPU, and the correction value may be calculated using the defocus MTF information or the like in the lens MPU. . In that case, the lens MPU may correct the focus position transmitted from the camera MPU 125 and drive the lens in S24 of FIG.

本実施例では、焦点検出に用いる信号の特性(縦横、色、空間周波数帯域)に着目して、AF用の補正値を算出している。そのため、AFの方式によらず、同様の方法で、補正値の算出を行うことができる。AF方式毎に、補正方法、補正に用いるデータを有する必要がないため、データの記憶容量、演算負荷の低減を行うことができる。   In this embodiment, the AF correction value is calculated by paying attention to the characteristics (vertical / horizontal, color, spatial frequency band) of the signal used for focus detection. Therefore, the correction value can be calculated by the same method regardless of the AF method. Since it is not necessary to have a correction method and data used for correction for each AF method, it is possible to reduce data storage capacity and calculation load.

以下、図17を参照して、本発明の第2の実施例について説明する。第1の実施例との主な違いは、空間周波数BP補正値の算出方法が異なる点である。第1の実施例では、撮影光学系の空間周波数毎の特性を表す値としてデフォーカスMTF情報を用いた。   Hereinafter, the second embodiment of the present invention will be described with reference to FIG. The main difference from the first embodiment is that the calculation method of the spatial frequency BP correction value is different. In the first embodiment, defocus MTF information is used as a value representing the characteristic of each photographing optical system for each spatial frequency.

しかしながら、デフォーカスMTF情報は、データ量が多く、記憶容量、演算負荷が大きくなるため、第2の実施例では、デフォーカスMTFの極大値情報を用いて、空間周波数BP補正値の算出を行う。これにより、レンズメモリ118内のデータ容量の低減、レンズ、カメラ間の通信容量の低減、カメラMPU125で行う演算負荷の低減を行うことができる。   However, since the defocus MTF information has a large amount of data and a large storage capacity and calculation load, in the second embodiment, the spatial frequency BP correction value is calculated using the maximum value information of the defocus MTF. . Thereby, the data capacity in the lens memory 118 can be reduced, the communication capacity between the lens and the camera can be reduced, and the calculation load performed by the camera MPU 125 can be reduced.

なお、第1の実施例における撮像装置のブロック図(図2)、各焦点検出方式の説明図(図3から6)、焦点検出領域の説明図(図7)、焦点検出処理のフロー図(図1)に関しては、第2の実施例においても同様の構成のため、説明は省略する。   In addition, the block diagram (FIG. 2) of the imaging device in the first embodiment, the explanatory diagrams of the respective focus detection methods (FIGS. 3 to 6), the explanatory diagram of the focus detection area (FIG. 7), and the flowchart of the focus detection process (FIG. With respect to FIG. 1), the second embodiment also has the same configuration and will not be described.

第1の実施例における各種BP補正値の算出方法(図8から12)に関しては、第2の実施例においても同様の構成であり、同様の動作を行うため、説明は省略する。   The method for calculating various BP correction values (FIGS. 8 to 12) in the first embodiment is the same as that in the second embodiment, and the same operation is performed.

また、空間周波数BP補正値算出のサブルーチン(図13)、各評価帯域の説明図(図15)についても、同様の構成であり、同様の動作を行うため、説明を省略する。   Also, the sub-routine for calculating the spatial frequency BP correction value (FIG. 13) and the explanatory diagram (FIG. 15) of each evaluation band have the same configuration and perform the same operation, and thus the description thereof is omitted.

第2の実施例における空間周波数BP補正値(BP3)を算出する流れを示したサブルーチンを説明する。   A subroutine showing a flow of calculating the spatial frequency BP correction value (BP3) in the second embodiment will be described.

S300で、空間周波数BP補正情報の取得を行う。   In S300, the spatial frequency BP correction information is acquired.

第2の実施例で行う処理内容が、第1の実施例とは異なる図14のレンズメモリ118に格納されている空間周波数BP補正情報について、図17を用いて説明する。   The spatial frequency BP correction information stored in the lens memory 118 of FIG. 14 in which the processing content performed in the second embodiment is different from that of the first embodiment will be described with reference to FIG.

図17は、撮影光学系の特性である空間周波数毎のデフォーカスMTFの極大値を示すフォーカスレンズ104位置を示している。図14の空間周波数(F1からF4)ごとのデフォーカスMTFの極大値と対応するレンズ位置LP1、LP2、LP3、LP4が、それと対応して、図17の縦軸に示されている。第2の実施例では、MTF_P(n)(1≦n≦4)として4個のデータを、レンズメモリ118は記憶している。   FIG. 17 shows the position of the focus lens 104 indicating the maximum value of the defocus MTF for each spatial frequency, which is a characteristic of the photographing optical system. Lens positions LP1, LP2, LP3, and LP4 corresponding to the maximum values of the defocus MTF for each spatial frequency (F1 to F4) in FIG. 14 are shown on the vertical axis in FIG. 17 corresponding thereto. In the second embodiment, the lens memory 118 stores four data as MTF_P (n) (1 ≦ n ≦ 4).

記憶されている情報は、焦点検出領域の位置、ズーム位置やフォーカス位置に対応していることは、第1の実施例と同様である。   As in the first embodiment, the stored information corresponds to the position of the focus detection area, the zoom position, and the focus position.

第2の実施例では、空間周波数BP補正値の算出を行うサブルーチンで、S300で、補正対象となっている焦点検出結果に応じたズーム位置、フォーカス位置に対応した補正値を取得する。   In the second embodiment, in a subroutine for calculating the spatial frequency BP correction value, correction values corresponding to the zoom position and the focus position corresponding to the focus detection result to be corrected are acquired in S300.

次に、S301、S302では、第1の実施例と同様の処理を行う。   Next, in S301 and S302, processing similar to that in the first embodiment is performed.

次に、S303で、空間周波数BP補正値(BP3)の算出を行う。空間周波数BP補正値の算出を行うに際し、まず、撮影画像の合焦位置(P_img)とAFが検出する合焦位置(P_AF)を、S300で得たデフォーカスMTF情報と、S301、S301で得た評価帯域W1、W2を用いて、下記式にて算出する。
(式10)
P_img=MTF_P(1)×W1(1)+MTF_P(2)×W1(2)+MTF_P(3)×W1(3)+MTF_P(4)×W1(4)
(式11)
P_AF=MTF_P(1)×W2(1)+MTF_P(2)×W2(2)+MTF_P(3)×W2(3)+MTF_P(4)×W2(4)
Next, in S303, a spatial frequency BP correction value (BP3) is calculated. When calculating the spatial frequency BP correction value, first, the in-focus position (P_img) of the captured image and the in-focus position (P_AF) detected by the AF are obtained in the defocus MTF information obtained in S300 and in S301 and S301. Using the evaluation bands W1 and W2, the following formula is used.
(Formula 10)
P_img = MTF_P (1) × W1 (1) + MTF_P (2) × W1 (2) + MTF_P (3) × W1 (3) + MTF_P (4) × W1 (4)
(Formula 11)
P_AF = MTF_P (1) × W2 (1) + MTF_P (2) × W2 (2) + MTF_P (3) × W2 (3) + MTF_P (4) × W2 (4)

式10、式11では、図17で示した空間周波数毎のデフォーカスMTFの極大値情報に対して、S301、S302で算出した撮影画像やAFの評価帯域の重みづけを行う。それにより、撮影画像の合焦位置(P_img)とAFが検出する合焦位置(P_AF)を算出している。   In Expressions 10 and 11, the photographic image calculated in S301 and S302 and the AF evaluation band are weighted on the maximum value information of the defocus MTF for each spatial frequency shown in FIG. Thereby, the focus position (P_img) of the captured image and the focus position (P_AF) detected by the AF are calculated.

S303で、空間周波数BP補正値であるBP3は、第1の実施例と同様に、下記の式により算出される。
(式9)
BP3=P_AF−P_img
In S303, the spatial frequency BP correction value BP3 is calculated by the following equation, as in the first embodiment.
(Formula 9)
BP3 = P_AF-P_img

以上のように処理することにより、空間周波数BP補正値を算出することができる。第1の実施例では、デフォーカスMTF情報を用いるため、より高精度に補正値の算出を行うことができる。一方で、第2の実施例のように構成することにより、レンズメモリ118内のデータ容量の低減、レンズ、カメラ間の通信容量の低減、カメラMPU125で行う演算負荷の低減を行うことができる。   By performing the processing as described above, the spatial frequency BP correction value can be calculated. In the first embodiment, since the defocus MTF information is used, the correction value can be calculated with higher accuracy. On the other hand, by configuring as in the second embodiment, it is possible to reduce the data capacity in the lens memory 118, the communication capacity between the lens and the camera, and the calculation load performed by the camera MPU 125.

以下、図18を参照して、本発明の第3の実施例について説明する。第1の実施例との主な違いは、空間周波数BP補正値の算出方法が異なる点である。第1の実施例では、撮影光学系の空間周波数毎の特性を表す値としてデフォーカスMTF情報を用いて、焦点検出を行うたびに、補正値の算出を行うように構成した。   The third embodiment of the present invention will be described below with reference to FIG. The main difference from the first embodiment is that the calculation method of the spatial frequency BP correction value is different. In the first embodiment, the defocus MTF information is used as a value representing the characteristic for each spatial frequency of the photographing optical system, and the correction value is calculated every time focus detection is performed.

しかしながら、空間周波数BP補正値の算出は、扱うデータ量が多く、記憶容量、演算負荷が大きくなるため、第3の実施例では、空間周波数BP補正値の算出の必要性が無い場合には、算出を行わない。これにより、レンズ、カメラ間の通信容量の低減、カメラMPU125で行う演算負荷の低減を行うことができる。   However, since the calculation of the spatial frequency BP correction value involves a large amount of data to be handled, and a large storage capacity and calculation load, in the third embodiment, when there is no need to calculate the spatial frequency BP correction value, Do not calculate. Thereby, the communication capacity between the lens and the camera can be reduced, and the calculation load performed by the camera MPU 125 can be reduced.

なお、第1の実施例における撮像装置のブロック図(図2)、各焦点検出方式の説明図(図3から6)、焦点検出領域の説明図(図7)、焦点検出処理のフロー図(図1)に関しては、第3の実施例においても同様の構成のため、説明は省略する。   In addition, the block diagram (FIG. 2) of the imaging device in the first embodiment, the explanatory diagrams of the respective focus detection methods (FIGS. 3 to 6), the explanatory diagram of the focus detection area (FIG. 7), and the flowchart of the focus detection process (FIG. With respect to FIG. 1), the third embodiment also has the same configuration, so that the description thereof is omitted.

第1の実施例における各種BP補正値の算出方法(図8から12)に関しては、第3の実施例においても同様の構成であり、同様の動作を行うため、説明は省略する。   The method for calculating various BP correction values (FIGS. 8 to 12) in the first embodiment is the same as that in the third embodiment, and the same operation is performed.

また、空間周波数BP補正値を算出する際に用いた説明図(図14から16)についても、同様の構成であり、同様の動作を行うため、説明を省略する。   Further, the explanatory diagrams (FIGS. 14 to 16) used when calculating the spatial frequency BP correction value have the same configuration and perform the same operation, and thus the description thereof is omitted.

第3の実施例で行う処理内容が、第1の実施例における空間周波数BP補正値(BP3)を算出するサブルーチンと異なる点について図18を用いて説明する。図18において、図13と同様の処理を行う箇所については、同じステップ番号を付しており、説明は割愛する。   The difference between the processing contents performed in the third embodiment and the subroutine for calculating the spatial frequency BP correction value (BP3) in the first embodiment will be described with reference to FIG. In FIG. 18, the same step numbers are assigned to portions that perform the same processing as in FIG. 13, and description thereof is omitted.

図18は、図1のS22で行う処理の詳細を示す第3の実施例における空間周波数BP補正値(BP3)を算出する流れを示したサブルーチンである。   FIG. 18 is a subroutine showing a flow of calculating the spatial frequency BP correction value (BP3) in the third embodiment showing the details of the processing performed in S22 of FIG.

S3000で、補正値を算出するか否かを判定する。第1の実施例で説明したことからわかる通り、撮影画像の評価帯域とAF評価帯域が似ていれば似ているほど、補正量は小さくなる。   In S3000, it is determined whether to calculate a correction value. As can be seen from the description in the first embodiment, the more similar the evaluation band of the captured image and the AF evaluation band, the smaller the correction amount.

そのため、第3の実施例では、事前に、2つの評価帯域の差が小さいことが分かる場合には、補正値の算出を省略する。   Therefore, in the third embodiment, when it is known in advance that the difference between the two evaluation bands is small, the calculation of the correction value is omitted.

具体的には、信号生成による空間周波数特性は、AFに用いる信号も第1の読み出しモードで読み出された信号である場合には、撮影画像の評価帯域とAF評価帯域は等しくなる。   Specifically, in the spatial frequency characteristics by signal generation, when the signal used for AF is also a signal read out in the first readout mode, the evaluation band of the captured image is equal to the AF evaluation band.

さらに、撮影画像を鑑賞する際の空間周波数ごとの感度を示す空間周波数特性と類似の空間周波数特性のデジタルフィルタをAF評価信号の処理時に用いる場合には、鑑賞時の空間周波数特性とデジタルフィルタの空間周波数特性が等しくなる。このような状況は、表示器126に表示する画像を拡大して表示する場合などに、発生する。   Furthermore, when a digital filter having a spatial frequency characteristic similar to the spatial frequency characteristic indicating the sensitivity for each spatial frequency when viewing a captured image is used when processing the AF evaluation signal, the spatial frequency characteristic during viewing and the digital filter Spatial frequency characteristics are equal. Such a situation occurs when an image to be displayed on the display 126 is enlarged and displayed.

また、同様に、撮影画像が第2の読み出しモードで読み出された信号で生成される場合にも撮影画像の評価帯域とAF評価帯域が等しくなることが想定される。このような状況は、撮影画像の記録画像サイズを小さく設定している場合などに、発生する。   Similarly, when the captured image is generated with a signal read in the second readout mode, it is assumed that the evaluation band of the captured image is equal to the AF evaluation band. Such a situation occurs when the recording image size of the captured image is set small.

S3000では、このような場合に、補正値算出の必要はないと判定して、S3001に進む。   In S3000, in such a case, it is determined that there is no need to calculate a correction value, and the process proceeds to S3001.

S3001では、補正値の算出を行わないため、BP3に0を代入し、空間周波数BP補正値(BP3)を算出するサブルーチンを終了する。   In S3001, since the correction value is not calculated, 0 is substituted for BP3, and the subroutine for calculating the spatial frequency BP correction value (BP3) is terminated.

一方で、S3000で、補正値の算出が必要であると判定された場合に行われる以後の処理は、第1の実施例と同じであるため、説明は省略する。   On the other hand, the subsequent processing performed when it is determined in S3000 that the correction value needs to be calculated is the same as that in the first embodiment, and thus the description thereof is omitted.

このように構成することにより、空間周波数BP補正値の算出が不要な時には、処理を省略することができる。これにより、データの通信量の低減、演算負荷の低減を実現することができる。   With this configuration, when it is not necessary to calculate the spatial frequency BP correction value, the processing can be omitted. As a result, it is possible to reduce the amount of data communication and the calculation load.

また、第3の実施例では、空間周波数BP補正値について説明を行ったが、縦横BP補正値や色BP補正値についても同様である。焦点検出を垂直方向、水平方向に行う場合は、縦横BP補正値の算出を省略してもよい。また、撮影画像に用いる色信号と、焦点検出に用いる色信号が等しい場合は、色BP補正値の算出を省略してもよい。   In the third embodiment, the spatial frequency BP correction value has been described, but the same applies to the vertical / horizontal BP correction value and the color BP correction value. When focus detection is performed in the vertical and horizontal directions, the calculation of the vertical and horizontal BP correction values may be omitted. If the color signal used for the captured image is the same as the color signal used for focus detection, the calculation of the color BP correction value may be omitted.

100 レンズユニット
104 フォーカスレンズ
113 フォーカスアクチュエータ
117 レンズMPU
118 レンズメモリ
120 カメラ本体
122 撮像素子
125 カメラMPU
129 撮像面位相差焦点検出部
130 TVAF焦点検出部
DESCRIPTION OF SYMBOLS 100 Lens unit 104 Focus lens 113 Focus actuator 117 Lens MPU
118 Lens Memory 120 Camera Body 122 Image Sensor 125 Camera MPU
129 Imaging surface phase difference focus detection unit 130 TVAF focus detection unit

Claims (6)

撮像素子と、前記撮像素子から出力された記録用信号を記録する記録手段と、前記撮像素子の第1の方向に配列された複数の画素から出力される出力信号を用いて第1の焦点調節位置を算出する第1の算出手段と、前記撮像素子の第1の方向と異なる第2の方向に配列された複数の画素から出力される出力信号を用いて第2の焦点調節位置を算出する第2の算出手段と、補正値を用いて前記第1の焦点調節位置及び前記第2の焦点調節位置の何れか一方の焦点調節位置を補正することで前記記録用信号の第3の焦点調節位置を算出する第3の算出手段と、前記第3の焦点調節位置を用いて前記記録用信号の焦点調節を行う焦点調節手段と、前記第1の焦点調節位置に対応する第1の焦点評価値及び前記第2の焦点調節位置に対応する第2の焦点評価値の信頼性を判定する判定手段と、を有する撮像装置であって、
前記判定手段の判定結果に応じて、前記補正値を変更することを特徴とする撮像装置。
First focus adjustment using an imaging device, recording means for recording a recording signal output from the imaging device, and output signals output from a plurality of pixels arranged in a first direction of the imaging device A second focus adjustment position is calculated using first calculation means for calculating a position and output signals output from a plurality of pixels arranged in a second direction different from the first direction of the image sensor. Third focus adjustment of the recording signal is performed by correcting the focus adjustment position of either the first focus adjustment position or the second focus adjustment position using the second calculation means and the correction value. Third calculation means for calculating a position, focus adjustment means for performing focus adjustment of the recording signal using the third focus adjustment position, and first focus evaluation corresponding to the first focus adjustment position Value and a second focus corresponding to the second focus position Determining means for determining reliability of the evaluation value, an imaging device having,
An imaging apparatus, wherein the correction value is changed according to a determination result of the determination unit.
前記判定手段にて前記第1の焦点調節位置及び前記第2の焦点調節位置の信頼性が所定値より小さいと判定された場合、補正値を用いて前記第1の焦点調節位置及び前記第2の焦点調節位置の何れか一方の焦点調節位置を補正し、前記判定手段にて前記第1の焦点調節位置及び前記第2の焦点調節位置の信頼性が前記所定値以上であると判定された場合、補正値を用いて前記第1の焦点調節位置及び前記第2の焦点調節位置の何れか一方の焦点調節位置を補正することで前記記録用信号の第3の焦点調節位置を算出しない請求項1に記載の撮像装置。   When it is determined by the determination means that the reliability of the first focus adjustment position and the second focus adjustment position is smaller than a predetermined value, the first focus adjustment position and the second focus adjustment position are corrected using a correction value. One of the focus adjustment positions is corrected, and the determination means determines that the reliability of the first focus adjustment position and the second focus adjustment position is greater than or equal to the predetermined value. In this case, the third focus adjustment position of the recording signal is not calculated by correcting one of the first focus adjustment position and the second focus adjustment position using a correction value. Item 2. The imaging device according to Item 1. 前記判定手段にて前記第1の焦点調節位置の信頼性が所定値以上で前記第2の焦点調節位置の信頼性が前記所定値より小さいと判定された場合、前記第1の焦点調節位置を前記補正値を用いて補正することで前記記録用信号の第3の焦点調節位置を算出する請求項1に記載の撮像装置。   When the determination means determines that the reliability of the first focus adjustment position is equal to or higher than a predetermined value and the reliability of the second focus adjustment position is lower than the predetermined value, the first focus adjustment position is determined. The imaging apparatus according to claim 1, wherein a third focus adjustment position of the recording signal is calculated by performing correction using the correction value. 前記第1の焦点調節位置用の補正値と前記第2の焦点調節位置用の補正値は、共通のテーブル値を使用する請求項1乃至3の何れか一項に記載の撮像装置。   4. The imaging apparatus according to claim 1, wherein a common table value is used for the correction value for the first focus adjustment position and the correction value for the second focus adjustment position. 5. 前記焦点調節手段は、前記第1の焦点調節位置と前記第2の焦点調節位置の差が所定の閾値より大きい場合、前記第1の焦点調節位置及び前記第2の焦点調節位置のうち至近側の焦点調節位置を用いて前記記録用信号の焦点調節を行う請求項1乃至4の何れか一項に記載の撮像装置。   When the difference between the first focus adjustment position and the second focus adjustment position is greater than a predetermined threshold, the focus adjustment unit is located on the closest side of the first focus adjustment position and the second focus adjustment position. The imaging apparatus according to claim 1, wherein focus adjustment of the recording signal is performed using the focus adjustment position. 撮像素子から出力された記録用信号を記録する記録工程と、前記撮像素子の第1の方向に配列された複数の画素から出力される出力信号を用いて第1の焦点調節位置を算出する第1の算出工程と、前記撮像素子の第1の方向と異なる第2の方向に配列された複数の画素から出力される出力信号を用いて第2の焦点調節位置を算出する第2の算出工程と、補正値を用いて前記第1の焦点調節位置及び前記第2の焦点調節位置の何れか一方の焦点調節位置を補正することで前記記録用信号の第3の焦点調節位置を算出する第3の算出工程と、前記第3の焦点調節位置を用いて前記記録用信号の焦点調節を行う焦点調節手段と、前記第1の焦点調節位置に対応する第1の焦点評価値及び前記第2の焦点調節位置に対応する第2の焦点評価値の信頼性を判定する判定工程と、を有する撮像方法であって、
前記判定工程の判定結果に応じて、前記補正値を変更することを特徴とする撮像方法。
A first focus adjustment position is calculated using a recording step of recording a recording signal output from the image sensor and output signals output from a plurality of pixels arranged in the first direction of the image sensor. And a second calculation step of calculating a second focus adjustment position using output signals output from a plurality of pixels arranged in a second direction different from the first direction of the image sensor. And calculating a third focus adjustment position of the recording signal by correcting one of the first focus adjustment position and the second focus adjustment position using the correction value. 3 calculation step, focus adjusting means for adjusting the focus of the recording signal using the third focus adjustment position, a first focus evaluation value corresponding to the first focus adjustment position, and the second focus adjustment value. Of the second focus evaluation value corresponding to the focus adjustment position of A determination step, an imaging method with,
An imaging method, wherein the correction value is changed according to a determination result of the determination step.
JP2014010703A 2014-01-23 2014-01-23 Imaging apparatus and imaging method Active JP6415054B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014010703A JP6415054B2 (en) 2014-01-23 2014-01-23 Imaging apparatus and imaging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014010703A JP6415054B2 (en) 2014-01-23 2014-01-23 Imaging apparatus and imaging method

Publications (3)

Publication Number Publication Date
JP2015138201A true JP2015138201A (en) 2015-07-30
JP2015138201A5 JP2015138201A5 (en) 2017-03-02
JP6415054B2 JP6415054B2 (en) 2018-10-31

Family

ID=53769217

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014010703A Active JP6415054B2 (en) 2014-01-23 2014-01-23 Imaging apparatus and imaging method

Country Status (1)

Country Link
JP (1) JP6415054B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02123339A (en) * 1988-11-01 1990-05-10 Nikon Corp Camera with data imprinting device
JPH1184222A (en) * 1997-09-02 1999-03-26 Minolta Co Ltd Focusing position detecting device
JP2007240877A (en) * 2006-03-08 2007-09-20 Canon Inc Imaging apparatus and control method therefor
US20080309771A1 (en) * 2007-06-12 2008-12-18 Nikon Corporation Digital camera
JP2009217074A (en) * 2008-03-11 2009-09-24 Canon Inc Focus detecting device
JP2010107771A (en) * 2008-10-30 2010-05-13 Canon Inc Camera and camera system
JP2011191340A (en) * 2010-03-11 2011-09-29 Canon Inc Imaging apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02123339A (en) * 1988-11-01 1990-05-10 Nikon Corp Camera with data imprinting device
JPH1184222A (en) * 1997-09-02 1999-03-26 Minolta Co Ltd Focusing position detecting device
JP2007240877A (en) * 2006-03-08 2007-09-20 Canon Inc Imaging apparatus and control method therefor
US20080309771A1 (en) * 2007-06-12 2008-12-18 Nikon Corporation Digital camera
JP2008309883A (en) * 2007-06-12 2008-12-25 Nikon Corp Digital camera
JP2009217074A (en) * 2008-03-11 2009-09-24 Canon Inc Focus detecting device
US20110037888A1 (en) * 2008-03-11 2011-02-17 Canon Kabushiki Kaisha Image sensor and focus detection apparatus
JP2010107771A (en) * 2008-10-30 2010-05-13 Canon Inc Camera and camera system
US20110164169A1 (en) * 2008-10-30 2011-07-07 Canon Kabushiki Kaisha Camera and camera system
JP2011191340A (en) * 2010-03-11 2011-09-29 Canon Inc Imaging apparatus

Also Published As

Publication number Publication date
JP6415054B2 (en) 2018-10-31

Similar Documents

Publication Publication Date Title
JP6478457B2 (en) Focus adjustment device and focus adjustment method
KR102159544B1 (en) Focus detection apparatus, Focus detection method, and Lens unit
JP6429546B2 (en) Imaging apparatus, control method, program, and storage medium
JP6478496B2 (en) Imaging apparatus and control method thereof
EP3018516B1 (en) Image capturing apparatus and method for controlling image capturing apparatus
JP6682310B2 (en) Focus detection apparatus and method, and imaging apparatus
JP6486288B2 (en) Imaging apparatus, control method, program, storage medium
JP6298362B2 (en) Imaging apparatus, control method therefor, and imaging system
JP6464118B2 (en) Focus detection apparatus and method, imaging apparatus, and lens unit
JP2016018012A (en) Imaging device and control method of the same
JP2018021971A (en) Focus detection method, and imaging apparatus
JP6744933B2 (en) Lens part and its control method
JP6484003B2 (en) Imaging apparatus, control method therefor, and imaging optical system
JP6686239B1 (en) Lens unit, transmitter, and receiver
JP6686191B2 (en) Focus detection device, imaging device, and focus detection method
JP6415054B2 (en) Imaging apparatus and imaging method
JP6484004B2 (en) Imaging apparatus and control method thereof, imaging optical system and control method thereof
JP6548626B2 (en) Image pickup apparatus, control method for image pickup apparatus, and focus control program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170120

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170912

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170926

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180424

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180619

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181002

R151 Written notification of patent or utility model registration

Ref document number: 6415054

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151