[go: up one dir, main page]

JP2019091067A - Lens assembly and control method thereof - Google Patents

Lens assembly and control method thereof Download PDF

Info

Publication number
JP2019091067A
JP2019091067A JP2019017252A JP2019017252A JP2019091067A JP 2019091067 A JP2019091067 A JP 2019091067A JP 2019017252 A JP2019017252 A JP 2019017252A JP 2019017252 A JP2019017252 A JP 2019017252A JP 2019091067 A JP2019091067 A JP 2019091067A
Authority
JP
Japan
Prior art keywords
lens
information
focus
unit
focus detection
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
JP2019017252A
Other languages
Japanese (ja)
Other versions
JP6744933B2 (en
Inventor
友美 高尾
Tomomi Takao
友美 高尾
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 JP2019017252A priority Critical patent/JP6744933B2/en
Publication of JP2019091067A publication Critical patent/JP2019091067A/en
Application granted granted Critical
Publication of JP6744933B2 publication Critical patent/JP6744933B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)
  • Structure And Mechanism Of Cameras (AREA)

Abstract

【課題】撮像装置が焦点検出誤差を精度良く補正することを可能にするレンズ部およびその制御方法を提供する。【解決手段】撮像素子を有する撮像部に着脱可能に構成され、撮影光学系を有するレンズ部であって、異なる複数の空間周波数についての撮影光学系のMTF曲線に関する情報を記憶する記憶手段と、撮像部からの要求に対応して、情報を撮像部に対して送信する送信手段とを有し、情報は、空間周波数に応じた重み付けがされていないことを特徴とするレンズ部。【選択図】図2Kind Code: A1 A lens unit and a control method thereof are provided that enable an imaging device to accurately correct a focus detection error. A lens unit having a photographing optical system, which is detachably attached to an image pickup unit having an image sensor, and which stores information on MTF curves of the photographing optical system for a plurality of different spatial frequencies; and transmitting means for transmitting information to the imaging section in response to a request from the imaging section, wherein the information is not weighted according to spatial frequency. [Selection drawing] Fig. 2

Description

本発明は撮像素子を有する撮像装置(または撮像部)に着脱可能なレンズ部およびその制御方法に関する。   The present invention relates to a lens unit that can be attached to and detached from an imaging device (or imaging unit) having an imaging element, and a control method therefor.

撮像装置の自動焦点検出(AF)方式として、コントラストAF方式と位相差AF方式が知られている。コントラストAF方式も位相差AF方式もビデオカメラやデジタルスチルカメラで多く用いられるAF方式であり、撮像素子が焦点検出用センサとして用いられるものが存在する。   A contrast AF method and a phase difference AF method are known as an automatic focus detection (AF) method of an imaging device. 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 systems in which an imaging device is used as a focus detection sensor.

これらのAF方式は光学像を利用して焦点検出を行うため、光学像を結像する光学系の収差が焦点検出結果に誤差を与える場合があり、このような誤差を低減するための方法が提案されている。   Since these AF methods perform focus detection using an optical image, the aberration of the optical system that forms an optical image may give an error to the focus detection result, and a method for reducing such an error is used. Proposed.

特許文献1には、AF枠、焦点距離、AF評価周波数、被写体までの距離のそれぞれについて、複数の代表値の組み合わせを規定した基準補正データを用意し、実際の条件に応じて補間して求めた補正データで焦点検出結果を補正する方法が開示されている。   Patent Document 1 prepares reference correction data that defines a combination of a plurality of representative values for each of an AF frame, a focal length, an AF evaluation frequency, and a distance to an object, and performs interpolation according to actual conditions. A method of correcting the focus detection result with the correction data is disclosed.

特許第5087077号公報Patent No. 5087077

しかしながら、カメラ本体に固有のAF評価周波数に適した補正値を用いて焦点検出結果を補正する特許文献1の方法では、焦点検出誤差の補正を十分に行えないという問題がある。焦点検出誤差は、本来、撮影された画像において最も良好なピント状態であると観察者が感じられる焦点状態と、焦点検出結果が示す焦点状態の差である。しかしながら、特許文献1記載の方法では、撮影された画像の焦点状態について考慮されていない。   However, the method of Patent Document 1 in which the focus detection result is corrected using the correction value suitable for the AF evaluation frequency specific to the camera body has a problem that the focus detection error can not be sufficiently corrected. The focus detection error is originally the difference between the focus state in which the observer feels that the image is in the best focus state in the photographed image and the focus state indicated by the focus detection result. However, in the method described in Patent Document 1, the focus state of the captured image is not considered.

また、特許文献1におけるAF評価周波数は、単一周波数の空間周波数特性を表すものである。しかしながら、焦点検出で実際に評価される帯域は、周波数帯域幅を有しており、単一周波数の特性のみを表すものではない。   Further, the AF evaluation frequency in Patent Document 1 represents the spatial frequency characteristic of a single frequency. However, the band that is actually evaluated in focus detection has a frequency bandwidth, and does not represent only a single frequency characteristic.

本発明はこのような従来技術の問題点の1つ以上を改善することを目的としている。具体的には、撮像装置が焦点検出誤差を精度良く補正することを可能にするレンズ部およびその制御方法を提供することを目的とする。   The present invention is directed to ameliorating one or more of the problems of the prior art. Specifically, it is an object of the present invention to provide a lens unit that enables an imaging device to accurately correct a focus detection error and a control method thereof.

上述の目的は、撮像素子を有する撮像部に着脱可能に構成され、撮影光学系を有するレンズ部であって、異なる複数の空間周波数についての撮影光学系のMTF曲線に関する情報を記憶する記憶手段と、撮像部からの要求に対応して、情報を撮像部に対して送信する送信手段とを有し、情報は、空間周波数に応じた重み付けがされていないことを特徴とするレンズ部によって達成される。   The above-described object is a lens unit configured to be attachable to and detachable from an imaging unit having an imaging element and having a photographing optical system, and storing information on MTF curves of the photographing optical system with respect to a plurality of different spatial frequencies , And transmitting means for transmitting information to the imaging unit in response to a request from the imaging unit, the information being achieved by the lens unit characterized in that weighting according to the spatial frequency is not performed. Ru.

このような構成により、本発明によれば、撮像装置が焦点検出誤差を精度良く補正することを可能にするレンズ部およびその制御方法を提供できる。   According to such a configuration, according to the present invention, it is possible to provide a lens unit that enables an imaging device to accurately correct a focus detection error, and a control method thereof.

実施形態におけるAF動作を示すフローチャートFlow chart showing AF operation in the embodiment 実施形態におけるAF動作を示すフローチャートFlow chart showing AF operation in the embodiment 実施形態に係る撮像装置の一例としてデジタルカメラのブロック図A block diagram of a digital camera as an example of an imaging device according to an embodiment 実施形態における撮像素子の構成例を示す図。FIG. 2 is a view showing an example of the arrangement of an imaging device according to the embodiment. 実施形態における光電変換領域と射出瞳との関係を示す図The figure which shows the relationship between the photoelectric conversion area | region and exit pupil in embodiment 図2のTVAF部130のブロック図Block diagram of the TVAF unit 130 of FIG. 2 実施形態における焦点検出領域の例を示す図A figure showing an example of a focus detection field in an embodiment 実施形態における縦横BP補正値(BP1)算出処理のフローチャートFlow chart of vertical and horizontal BP correction value (BP1) calculation process in the embodiment 実施形態における縦横BP補正値算出処理を説明するための図A diagram for explaining vertical and horizontal BP correction value calculation processing in the embodiment 実施形態における色BP補正値(BP2)算出処理を説明するための図The figure for demonstrating the color BP correction value (BP2) calculation process in embodiment. 第1の実施形態における空間周波数BP補正値(BP3)算出処理を説明するための図A figure for explaining spatial frequency BP correction value (BP3) calculation processing in a 1st embodiment. 実施形態における各種空間周波数特性を示す図The figure which shows the various space frequency characteristics in an embodiment 第2の実施形態における空間周波数BP補正値(BP3)算出処理を説明するための図The figure for demonstrating the spatial frequency BP correction value (BP3) calculation process in 2nd Embodiment. 第3の実施形態における空間周波数BP補正値(BP3)算出処理を説明するためのフローチャートFlow chart for explaining the spatial frequency BP correction value (BP3) calculation process in the third embodiment

以下、図面を参照しながら本発明の例示的な実施形態について説明する。なお、実施形態は発明の理解と説明を容易にするため、具体的かつ特定の構成を有するが、本発明はそのような特定の構成に限定されない。例えば、以下では本発明をレンズ交換可能な一眼レフタイプのデジタルカメラに適用した実施形態について説明するが、本発明はレンズ交換できないタイプのデジタルカメラや、ビデオカメラに対しても適用可能である。また、カメラを備えた任意の電子機器、例えば携帯電話機、パーソナルコンピュータ(ラップトップ、タブレット、デスクトップ型など)、ゲーム機などで実施することもできる。   Hereinafter, exemplary embodiments of the present invention will be described with reference to the drawings. Although the embodiments have specific and specific configurations to facilitate understanding and explanation of the invention, the present invention is not limited to such specific configurations. For example, although an embodiment in which the present invention is applied to a lens interchangeable single-lens reflex digital camera will be described below, the present invention is also applicable to a lens interchangeable type digital camera and a video camera. The present invention can also be implemented in any electronic device equipped with a camera, such as a mobile phone, a personal computer (laptop, tablet, desktop, etc.), a game console, and the like.

●(第1の実施形態)
(撮像装置の構成の説明−レンズユニット)
図2は、実施形態に係る撮像装置の一例としてデジタルカメラの機能構成例を示すブロック図である。本実施形態のデジタルカメラはレンズ交換式一眼レフカメラであり、レンズユニット100とカメラ本体120とを有する。レンズユニット100は図中央の点線で示されるマウントMを介して、カメラ本体120に装着される。
● (First embodiment)
(Description of Configuration of Imaging Device-Lens Unit)
FIG. 2 is a block diagram showing an example of the functional configuration of a digital camera as an example of the imaging device according to the embodiment. The digital camera of the present embodiment is a lens-interchangeable single-lens reflex camera, and has a lens unit 100 and a camera body 120. The lens unit 100 is mounted to the camera body 120 via a mount M shown by a dotted line in the center of the figure.

レンズユニット100は、光学系(第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ群(以下、単に「フォーカスレンズ」という)104)及び、駆動/制御系を有する。このようにレンズユニット100は、フォーカスレンズ104を含み、被写体の光学像を形成する撮影レンズである。   The lens unit 100 has an optical system (a first lens group 101, an aperture 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 is a photographing lens that includes the focus lens 104 and forms an optical image of a subject.

第1レンズ群101はレンズユニット100の先端に配置され、光軸方向OAに移動可能に保持される。絞り102は、撮影時の光量を調節する機能のほか、静止画撮影時には露出時間を制御するメカニカルシャッタとしても機能する。絞り102及び第2レンズ群103は一体で光軸方向OAに移動可能であり、第1レンズ群101と連動して移動することによりズーム機能を実現する。フォーカスレンズ104も光軸方向OAに移動可能であり、位置に応じてレンズユニット100が合焦する被写体距離(合焦距離)が変化する。フォーカスレンズ104の光軸方向OAにおける位置を制御することにより、レンズユニット100の合焦距離を調節する焦点調節を行う。   The first lens group 101 is disposed at the tip of the lens unit 100, and is movably held in the optical axis direction OA. The diaphragm 102 also functions as a mechanical shutter that controls the exposure time during still image shooting, in addition to the function of adjusting the light amount at the time of shooting. The diaphragm 102 and the second lens group 103 are integrally movable in the optical axis direction OA, and move in conjunction with the first lens group 101 to realize the zoom function. The focus lens 104 is also movable in the optical axis direction OA, and the subject distance (in-focus distance) at which the lens unit 100 is in focus changes according to the position. By controlling the position of the focusing lens 104 in the optical axis direction OA, focusing is performed to adjust the focusing distance of the lens unit 100.

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

ズーム駆動回路114は、ズームアクチュエータ111を用いて第1レンズ群101や第3レンズ群103を光軸方向OAに駆動し、レンズユニット100の光学系の画角を制御する。絞り駆動回路115は、絞りアクチュエータ112を用いて絞り102を駆動し、絞り102の開口径や開閉動作を制御する。フォーカス駆動回路116はフォーカスアクチュエータ113を用いてフォーカスレンズ104を光軸方向OAに駆動し、レンズユニット100の光学系の合焦距離を制御する。また、フォーカス駆動回路116は、フォーカスアクチュエータ113を用いてフォーカスレンズ104の現在位置を検出する。   The zoom drive circuit 114 drives the first lens group 101 and the third lens group 103 in the optical axis direction OA using the zoom actuator 111 to control the angle of view of the optical system of the lens unit 100. The diaphragm drive circuit 115 drives the diaphragm 102 using the diaphragm actuator 112 to control the aperture diameter and the opening / closing operation of the diaphragm 102. The focus drive circuit 116 drives the focus lens 104 in the optical axis direction OA using the focus actuator 113 to control the focusing distance of the optical system of the lens unit 100. Also, the focus drive circuit 116 detects the current position of the focus lens 104 using the focus actuator 113.

レンズMPU(プロセッサ)117は、レンズユニット100に係る全ての演算、制御を行い、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116を制御する。また、レンズMPU117は、マウントMを通じてカメラMPU125と接続され、コマンドやデータを通信する。例えばレンズMPU117はフォーカスレンズ104の位置を検出し、カメラMPU125からの要求に対してレンズ位置情報を通知する。このレンズ位置情報は、フォーカスレンズ104の光軸方向OAにおける位置、光学系が移動していない状態の射出瞳の光軸方向OAにおける位置および直径、射出瞳の光束を制限するレンズ枠の光軸方向OAにおける位置および直径などの情報を含む。またレンズMPU117は、カメラMPU125からの要求に応じて、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116を制御する。レンズメモリ118は自動焦点検出に必要な光学情報が予め記憶されている。カメラMPU125は例えば内蔵する不揮発性メモリやレンズメモリ118に記憶されているプログラムを実行することで、レンズユニット100の動作を制御する。   A lens MPU (processor) 117 performs all calculations and controls related to the lens unit 100, and controls the zoom drive circuit 114, the diaphragm drive circuit 115, and the focus drive circuit 116. The lens MPU 117 is connected to the camera MPU 125 through the mount M, and communicates commands and data. For example, the lens MPU 117 detects the position of the focus lens 104, and notifies lens position information in response to a request from the camera MPU 125. The lens position information includes the position of the focus lens 104 in the optical axis direction OA, the position and diameter of the exit pupil in the optical axis direction OA when the optical system is not moving, and the optical axis of the lens frame that limits the light flux of the exit pupil. It contains information such as position and diameter in the direction OA. The lens MPU 117 controls the zoom drive circuit 114, the diaphragm drive circuit 115, and the focus drive circuit 116 in response to a request from the camera MPU 125. The lens memory 118 stores in advance optical information necessary for automatic focus detection. The camera MPU 125 controls the operation of the lens unit 100 by executing a program stored in, for example, a built-in non-volatile memory or lens memory 118.

(撮像装置の構成の説明−カメラ本体)
カメラ本体120は、光学系(光学ローパスフィルタ121および撮像素子122)と、駆動/制御系とを有する。レンズユニット100の第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ104と、カメラ本体120の光学ローパスフィルタ121は撮影光学系を構成する。
光学ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。撮像素子122はCMOSイメージセンサと周辺回路で構成され、横方向m画素、縦方向n画素(n,mは2以上の整数)が配置される。本実施形態の撮像素子122は、瞳分割機能を有し、画像データを用いた位相差AFが可能である。画像処理回路124は、撮像素子122が出力する画像データから、位相差AF用のデータと、表示、記録、およびコントラストAF(TVAF)用の画像データを生成する。
(Description of Configuration of Imaging Device-Camera Body)
The camera body 120 has an optical system (optical low pass filter 121 and imaging element 122) and a drive / control system. The first lens group 101, the diaphragm 102, the second lens group 103, the focus lens 104 of the lens unit 100, and the optical low pass filter 121 of the camera body 120 constitute a photographing optical system.
The optical low pass filter 121 reduces false color and moiré of a captured image. The imaging device 122 is configured of a CMOS image sensor and peripheral circuits, and m pixels in the horizontal direction and n pixels in the vertical direction (n and m are integers of 2 or more) are arranged. The imaging element 122 according to the present embodiment has a pupil division function, and can perform phase difference AF using image data. The image processing circuit 124 generates data for phase difference AF and image data for display, recording, and contrast AF (TVAF) from the image data output from the imaging element 122.

駆動/制御系は、センサ駆動回路123、画像処理回路124、カメラMPU125、表示器126、操作スイッチ群127、メモリ128、位相差AF部129、TVAF部130を有する。   The drive / control system includes a sensor drive circuit 123, an image processing circuit 124, a camera MPU 125, a display 126, an operation switch group 127, a memory 128, a phase difference AF unit 129, and a TVAF unit 130.

センサ駆動回路123は、撮像素子122の動作を制御するとともに、取得した画像信号をA/D変換してカメラMPU125に送信する。画像処理回路124は、撮像素子122が取得した画像データに対し、例えばγ変換、ホワイトバランス調整処理、色補間処理、圧縮符号化処理など、デジタルカメラで行われる一般的な画像処理を行う。また、画像処理回路124は位相差AF用の信号も生成する。   The sensor drive circuit 123 controls the operation of the image sensor 122 and A / D converts the acquired image signal and transmits it to the camera MPU 125. The image processing circuit 124 performs general image processing performed by a digital camera, such as γ conversion, white balance adjustment processing, color interpolation processing, compression encoding processing, on the image data acquired by the imaging element 122. The image processing circuit 124 also generates a signal for phase difference AF.

カメラMPU(プロセッサ)125は、カメラ本体120に係る全ての演算、制御を行い、センサ駆動回路123、画像処理回路124、表示器126、操作スイッチ群127、メモリ128、位相差AF部129、TVAF部130を制御する。カメラMPU125はマウントMの信号線を介してレンズMPU117と接続され、レンズMPU117とコマンドやデータを通信する。カメラMPU125はレンズMPU117に対し、レンズ位置の取得要求や、所定の駆動量での絞り、フォーカスレンズ、ズーム駆動要求や、レンズユニット100に固有の光学情報の取得要求などを発行する。カメラMPU125には、カメラ動作を制御するプログラムを格納したROM125a、変数を記憶するRAM125b、諸パラメータを記憶するEEPROM125cが内蔵されている。   The camera MPU (processor) 125 performs all operations and controls related to the camera body 120, and the sensor drive circuit 123, image processing circuit 124, display 126, operation switch group 127, memory 128, phase difference AF unit 129, TVAF Control unit 130; The camera MPU 125 is connected to the lens MPU 117 via the signal line of the mount M, and communicates commands and data with the lens MPU 117. The camera MPU 125 issues, to the lens MPU 117, a request for acquiring the lens position, a diaphragm with a predetermined drive amount, a focus lens, a zoom driving request, and a request for acquiring optical information unique to the lens unit 100. The camera MPU 125 incorporates a ROM 125a storing a program for controlling the camera operation, a RAM 125b storing variables, and an EEPROM 125c storing various parameters.

表示器126はLCDなどから構成され、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態表示画像などを表示する。操作スイッチ群127は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。本実施形態の記録手段としてのメモリ128は、着脱可能なフラッシュメモリで、撮影済み画像を記録する。   The display 126 is configured of an LCD or the like, and displays information on the shooting mode of the camera, a preview image before shooting and a confirmation image after shooting, an in-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 as recording means of the present embodiment is a removable flash memory and records a photographed image.

位相差AF部129は、画像処理回路124により得られる焦点検出用データを用いて位相差検出方式で焦点検出処理を行う。より具体的には、画像処理回路124が、撮影光学系の一対の瞳領域を通過する光束で形成される一対の像データを焦点検出用データとして生成し、位相差AF部129はこの一対の像データのずれ量に基づいて焦点ずれ量を検出する。このように、本実施形態の位相差AF部129は、専用のAFセンサを用いず、撮像素子122の出力に基づく位相差AF(撮像面位相差AF)を行う。位相差AF部129の動作については後で詳細に説明する。   The phase difference AF unit 129 performs focus detection processing using a phase difference detection method using the focus detection data obtained by the image processing circuit 124. More specifically, the image processing circuit 124 generates a pair of image data formed by light beams passing through a pair of pupil regions of the imaging optical system as data for focus detection, and the phase difference AF unit 129 generates the pair of image data. The focus shift amount is detected based on the shift amount of the image data. As described above, the phase difference AF unit 129 according to the present embodiment performs the phase difference AF (imaging plane phase difference AF) based on the output of the imaging element 122 without using a dedicated AF sensor. The operation of the phase difference AF unit 129 will be described in detail later.

TVAF部130は、画像処理回路124が生成するTVAF用評価値(画像データのコントラスト情報)に基づいてコントラスト方式の焦点検出処理を行う。コントラスト方式の焦点検出処理は、フォーカスレンズ104を移動して評価値がピークとなるフォーカスレンズ位置を合焦位置として検出する。
このように、本実施形態のデジタルカメラは位相差AFとTVAFの両方を実行可能であり、状況に応じて選択的に使用したり、組み合わせて使用したりすることができる。
The TVAF unit 130 performs the focus detection process of the contrast method based on the evaluation value for TVAF (contrast information of the image data) generated by the image processing circuit 124. In contrast type focus detection processing, the focus lens 104 is moved to detect the focus lens position at which the evaluation value reaches a peak as the in-focus position.
Thus, the digital camera of the present embodiment can execute both phase difference AF and TVAF, and can be selectively used or used in combination depending on the situation.

(焦点検出動作の説明:位相差AF)
以下、位相差AF部129およびTVAF部130の動作についてさらに説明する。
最初に、位相差AF部129の動作について説明する。
図3(a)は本実施形態における撮像素子122の画素配列を示した図で、2次元C−MOSエリアセンサの縦(Y方向)6行と横(X方向)8列の範囲を、レンズユニット100側から観察した状態を示している。撮像素子122にはベイヤー配列のカラーフィルタが設けられ、奇数行の画素には、左から順に緑(G)と赤(R)のカラーフィルタが交互に、偶数行の画素には、左から順に青(B)と緑(G)のカラーフィルタが交互に配置されている。画素211において、円211iはオンチップマイクロレンズを表し、オンチップマイクロレンズの内側に配置された複数の矩形211a,211bはそれぞれ光電変換部である。
(Description of focus detection operation: phase difference AF)
Hereinafter, the operations of the phase difference AF unit 129 and the TVAF unit 130 will be further described.
First, the operation of the phase difference AF unit 129 will be described.
FIG. 3A is a diagram showing the pixel arrangement of the image pickup device 122 in the present embodiment, in which a range of six rows (Y direction) and eight rows (X direction) of a two-dimensional C-MOS area sensor The state observed from the unit 100 side is shown. The image sensor 122 is provided with a Bayer-arranged color filter, and in the pixels in the odd rows, the green (G) and red (R) color filters are alternately arranged in order from the left. Blue (B) and green (G) color filters are alternately arranged. In the pixel 211, a circle 211i represents an on-chip microlens, and a plurality of rectangles 211a and 211b disposed inside the on-chip microlens are photoelectric conversion units.

本実施形態の撮像素子122は、すべての画素の光電変換部がX方向に2分割され、個々の光電変換部の光電変換信号と、光電変換信号の和が独立して読み出し可能である。また、光電変換信号の和から一方の光電変換部の光電変換信号を減じることで、他方の光電変換部の光電変換信号に相当する信号を得ることができる。個々の光電変換部における光電変換信号は位相差AF用のデータとして用いたり、3D(3-Dimensional)画像を構成する視差画像の生成に用いたりすることもできる。また、光電変換信号の和は、通常の撮影画像データとして用いることができる。   In the image sensor 122 of 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 signals of the individual photoelectric conversion units and the photoelectric conversion signals can be read independently. Further, by subtracting the photoelectric conversion signal of one photoelectric conversion unit from the sum of photoelectric conversion signals, a signal corresponding to the photoelectric conversion signal of the other photoelectric conversion unit can be obtained. The photoelectric conversion signals in the individual photoelectric conversion units can be used as data for phase difference AF, or can be used to generate parallax images constituting a 3D (3-dimensional) image. Also, the sum of photoelectric conversion signals can be used as normal photographed image data.

ここで、位相差AFを行なう場合の画素信号について説明する。後述するように、本実施形態においては、図3(a)のマイクロレンズ211iと、分割された光電変換部211a,211bで撮影光学系の射出光束を瞳分割する。そして、同一画素行に配置された所定範囲内の複数の画素211について、光電変換部211aの出力をつなぎ合わせて編成したものをAF用A像、光電変換部211bの出力をつなぎ合わせて編成したものをAF用B像とする。光電変換部211a、211bの出力は、カラーフィルタの単位配列に含まれる緑、赤、青、緑の出力を加算して算出した疑似的な輝度(Y)信号を用いる。但し、赤、青、緑の色ごとに、AF用A像、B像を編成してもよい。このように生成したAF用A像とB像の相対的な像ずれ量を相関演算により検出することで、所定領域の焦点ずれ量(デフォーカス量)を検出することができる。本実施形態では、一方の光電変換部の出力と全光電変換部の出力の和を撮像素子122から読み出すものとする。例えば光電変換部211aの出力と、光電変換部211a,211bの出力の和とが読み出される場合、光電変換部211bの出力は和から光電変換部211aの出力を減じることで取得する。これにより、AF用A像とB像の両方を得ることができ、位相差AFが実現できる。このような撮像素子は、特開2004−134867号公報に開示されるように公知であるため、これ以上の詳細に関する説明は省略する。   Here, the pixel signal in the case of performing phase difference AF will be described. As described later, in the present embodiment, the exit light beam of the imaging optical system is pupil-divided by the micro lens 211i of FIG. 3A and the divided photoelectric conversion units 211a and 211b. Then, for a plurality of pixels 211 in a predetermined range arranged in the same pixel row, the output of the photoelectric conversion unit 211a is connected and organized, and the AF A image and the output of the photoelectric conversion unit 211b are connected and organized. Let the thing be the B image for AF. The outputs of the photoelectric conversion units 211a and 211b use pseudo luminance (Y) signals calculated by adding the green, red, blue, and green outputs included in the unit array of the color filter. However, the AF A image and the B image may be organized for each of the red, blue and green colors. By detecting the relative image shift amount of the AF A image and the B image thus generated by correlation calculation, it is possible to detect the defocus amount (defocus amount) of the predetermined area. In this embodiment, the sum of the output of one photoelectric conversion unit and the output of all photoelectric conversion units is read out from the image sensor 122. For example, when the output of the photoelectric conversion unit 211a and the sum of the outputs of the photoelectric conversion units 211a and 211b are read out, the output of the photoelectric conversion unit 211b is obtained by subtracting the output of the photoelectric conversion unit 211a from the sum. As a result, both AF A and B images can be obtained, and phase difference AF can be realized. Such an imaging device is known as disclosed in Japanese Patent Application Laid-Open No. 2004-134867, and thus the description of the details beyond this will be omitted.

図3(b)は本実施形態の撮像素子122の読み出し回路の構成例を示した図である。151は水平走査回路、153は垂直走査回路である。そして各画素の境界部には、水平走査ライン152a及び152bと、垂直走査ライン154a及び154bが配線され、各光電変換部はこれらの走査ラインを介して信号が外部に読み出される。   FIG. 3B is a view showing a configuration example of the readout circuit of the image sensor 122 of the present embodiment. Reference numeral 151 denotes a horizontal scanning circuit, and reference numeral 153 denotes a vertical scanning circuit. Then, horizontal scanning lines 152a and 152b and vertical scanning lines 154a and 154b are wired at the boundary of each pixel, and in each photoelectric conversion unit, signals are read out via these scanning lines.

なお、本実施形態の撮像素子は上述の画素内の読み出し方法に加え、以下の2種類の読み出しモードを有する。第1の読み出しモードは全画素読み出しモードと称するもので、高精細静止画を撮像するためのモードである。この場合は、全画素の信号が読み出される。
第2の読み出しモードは間引き読み出しモードと称するもので、動画記録、もしくはプレビュー画像の表示のみを行なうためのモードである。この場合に必要な画素数は全画素よりも少ないため、画素群はX方向及びY方向ともに所定比率に間引いた画素のみ読み出す。また、高速に読み出す必要がある場合にも、同様に間引き読み出しモードを用いる。X方向に間引く際には、信号の加算を行いS/Nの改善を図り、Y方向に対する間引きは、間引かれる行の信号出力を無視する。位相差AFおよびコントラストAFも、通常、第2の読み出しモードで読み出された信号に基づいて行われる。
The image sensor of this embodiment has the following two types of readout modes in addition to the above-described readout method in the pixel. The first readout mode is referred to as an all-pixel readout mode, and is a mode for capturing a high definition still image. In this case, the signals of all the pixels are read out.
The second readout mode is referred to as a thinning readout mode and is a mode for performing only moving image recording or display of a preview image. In this case, since the number of pixels required is smaller than all the pixels, only the pixels thinned out to a predetermined ratio in both the X direction and the Y direction are read out. Also, when it is necessary to read data at high speed, the thinning read mode is used similarly. When thinning in the X direction, signal addition is performed to improve the S / N, and thinning in the Y direction ignores the signal output of the row to be thinned. The phase difference AF and the contrast AF are usually performed based on the signal read in the second read mode.

図4は、本実施形態の撮像装置において、撮影光学系の射出瞳面と、像高ゼロすなわち像面中央近傍に配置された撮像素子の光電変換部の共役関係を説明する図である。撮像素子内の光電変換部と撮影光学系の射出瞳面は、オンチップマイクロレンズによって共役関係となるように設計される。そして撮影光学系の射出瞳は、一般的に光量調節用の虹彩絞りが置かれる面とほぼ一致する。一方、本実施形態の撮影光学系は変倍機能を有したズームレンズであるが、光学タイプによっては変倍操作を行なうと、射出瞳の像面からの距離や大きさが変化する。図4では、レンズユニット100の焦点距離が広角端と望遠端の中央にある状態を示している。この状態における射出瞳距離Zepを標準値として、オンチップマイクロレンズの形状や、像高(X,Y座標)に応じた偏心パラメータの最適設計がなされる。   FIG. 4 is a view for explaining the conjugate relationship between the exit pupil plane of the photographing optical system and the photoelectric conversion unit of the image pickup element disposed near the image height zero, that is, the center of the image plane, in the image pickup apparatus of this embodiment. The photoelectric conversion unit in the image sensor and the exit pupil plane of the photographing optical system are designed to be in a conjugate relationship by the on-chip micro lens. 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, although the photographing optical system of the present embodiment is a zoom lens having a variable power function, the distance and size from the image plane of the exit pupil change when the variable power operation is performed depending on the optical type. FIG. 4 shows a state in which the focal length of the lens unit 100 is at the center between the wide angle end and the telephoto end. With the exit pupil distance Zep in this state as a standard value, optimum design of decentration parameters according to the shape of the on-chip micro lens and the image height (X, Y coordinates) is made.

図4(a)において、101は第1レンズ群、101bは第1レンズ群を保持する鏡筒部材、105は第3レンズ群、104bはフォーカスレンズ104を保持する鏡筒部材である。102は絞りで、102aは絞り開放時の開口径を規定する開口板、102bは絞り込み時の開口径を調節するための絞り羽根である。なお、撮影光学系を通過する光束の制限部材として作用する101b、102a、102b、及び104bは、像面から観察した場合の光学的な虚像を示している。また、絞り102の近傍における合成開口をレンズの射出瞳と定義し、前述したように像面からの距離をZepとしている。   In FIG. 4A, reference numeral 101 denotes a first lens group, reference numeral 101b denotes a barrel member for holding the first lens group, reference numeral 105 denotes a third lens group, and reference numeral 104b denotes a barrel member for holding the focus lens 104. Reference numeral 102 denotes an aperture, 102a an aperture plate for defining the aperture diameter when the aperture is open, and 102b an aperture blade for adjusting the aperture diameter when the aperture is narrowed. Note that 101b, 102a, 102b, and 104b, which function as restriction members for light fluxes 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 set to Zep as described above.

画素211は像面中央近傍に配置されており、本実施形態では、中央画素と呼ぶ。中央画素211は、最下層より、光電変換部211a,211b、配線層211e〜211g、カラーフィルタ211h、及びオンチップマイクロレンズ211iの各部材で構成される。そして2つの光電変換部はオンチップマイクロレンズ211iによって撮影光学系の射出瞳面に投影される。換言すれば、撮影光学系の射出瞳が、オンチップマイクロレンズ211iを介して、光電変換部の表面に投影される。   The pixel 211 is disposed in the vicinity of the center of the image plane, and is called a center pixel in the present embodiment. The central pixel 211 includes the members of the photoelectric conversion units 211a and 211b, the wiring layers 211e to 211g, the color filter 211h, and the on-chip microlenses 211i from the lowermost layer. Then, the two photoelectric conversion units are projected on the exit pupil plane of the photographing optical system by the on-chip micro lens 211i. 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 micro lens 211i.

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

図4(a)で、撮影光学系を通過する光束の最外部をLで示すと、光束Lは、絞りの開口板102aで規制されており、投影像EP1a及びEP1bは撮影光学系でケラレがほぼ発生していない。図4(b)では、図4(a)の光束Lを、TLで示している。TLで示す円の内部に、光電変換部の投影像EP1a、EP1bの大部分が含まれていることからも、ケラレがほぼ発生していないことがわかる。光束Lは、絞りの開口板102aでのみ制限されているため、TLは、102aと言い換えることができる。この際、像面中央では各投影像EP1aないしEP1bのけられ状態は光軸に対して対称となり、各光電変換部211a及び211bが受光する光量は等しい。   In FIG. 4A, the outermost part of the light flux passing through the photographing optical system is indicated by L, the light flux L is restricted by the aperture plate 102a of the stop, and the projected images EP1a and EP1b are vignetted by the photographing optical system. It has hardly occurred. In FIG. 4 (b), the light flux L of FIG. 4 (a) is indicated by TL. From the fact that most of the projected images EP1a and EP1b of the photoelectric conversion unit are included in the circle indicated by TL, it can be understood that vignetting is substantially not generated. Since the light beam L is limited only by the aperture plate 102a of the stop, TL can be reworded as 102a. At this time, at the center of the image plane, the vignette state of each of the projected images EP1a to EP1b is symmetrical with respect to the optical axis, and the amount of light received by each of the photoelectric conversion units 211a and 211b is equal.

位相差AFを行う場合、カメラMPU125は撮像素子122から上述した2種類の出力を読み出すようにセンサ駆動回路123を制御する。そして、カメラMPU125は画像処理回路124に対して焦点検出領域の情報を与え、焦点検出領域内に含まれる画素の出力から、AF用A像およびB像のデータを生成して位相差AF部129に供給するよう命令する。画像処理回路124はこの命令に従ってAF用A像およびB像のデータを生成して位相差AF部129に出力する。画像処理回路124はまた、TVAF部130に対してRAW画像データを供給する。   When phase difference AF is performed, the camera MPU 125 controls the sensor drive circuit 123 so as to read out the two types of outputs from the image sensor 122. Then, the camera MPU 125 supplies information of the focus detection area to the image processing circuit 124, generates AF A and B image data from the output of the pixels included in the focus detection area, and the phase difference AF unit 129 To supply to The image processing circuit 124 generates data of the A and B images for AF in accordance with this command and outputs the data to the phase difference AF unit 129. The image processing circuit 124 also supplies the RAW image data to the TVAF unit 130.

以上説明した様に、撮像素子122は位相差AFおよびコントラストAFの両方について、焦点検出装置の一部を構成している。
なお、ここでは一例として水平方向に射出瞳を2分割する構成を説明したが、撮像素子一部の画素については垂直方向に射出瞳を2分割する構成としてもよい。また、水平および垂直の両方向に射出瞳を分割する構成としてもよい。垂直方向に射出瞳を分割する画素を設けることにより、水平だけでなく垂直方向の被写体のコントラストに対応した位相差AFが可能となる。
As described above, the imaging element 122 constitutes a part of the focus detection apparatus for both phase difference AF and contrast AF.
Here, the configuration in which the exit pupil is divided into two in the horizontal direction has been described as an example, but the configuration may be such that the exit pupil is divided into two in the vertical direction for some pixels of the imaging device. Also, the exit pupil may be divided in both horizontal and vertical directions. By providing the pixels for dividing the exit pupil in the vertical direction, it is possible to perform phase difference AF corresponding to the contrast of the subject in the vertical direction as well as in the horizontal direction.

(焦点検出動作の説明:コントラストAF)
次に、図5を用いて、コントラストAF(TVAF)について説明する。コントラストAFは、カメラMPU125とTVAF部130が連携してフォーカスレンズの駆動と評価値の算出を繰り返し行うことで実現される。
(Description of focus detection operation: Contrast AF)
Next, contrast AF (TVAF) will be described with reference to FIG. The contrast AF is realized by the camera MPU 125 and the TVAF unit 130 cooperating to repeatedly drive the focus lens and calculate the evaluation value.

画像処理回路124からRAW画像データがTVAF部130に入力されると、AF評価用信号処理回路401で、ベイヤー配列信号からの緑(G)信号の抽出と、低輝度成分を強調して高輝度成分を抑圧するガンマ補正処理が施される。本実施形態では、TVAFを緑(G)信号で行う場合を説明するが、赤(R)、青(B)、緑(G)の全ての信号を用いてもよい。また、RGB全色用いて輝度(Y)信号を生成してもよい。AF評価用信号処理回路401で生成される出力信号は、用いられた信号の種類によらず、以後の説明では、輝度信号Yと呼ぶ。   When RAW image data is input from the image processing circuit 124 to the TVAF unit 130, the AF evaluation signal processing circuit 401 extracts the green (G) signal from the Bayer array signal and emphasizes the low luminance component to achieve high luminance. A gamma correction process is performed to suppress the component. In the present embodiment, the case where TVAF is performed using a green (G) signal will be described, but all signals of red (R), blue (B), and green (G) may be used. Alternatively, the 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 type of signal used.

なお、カメラMPU125から、領域設定回路413に焦点検出領域が設定されているものとする。領域設定回路413は、設定された領域内の信号を選択するゲート信号を生成する。ゲート信号は、ラインピーク検出回路402、水平積分回路403、ライン最小値検出回路404、ラインピーク検出回路409、垂直積分回路406、410垂直ピーク検出回路405、407、411の各回路に入力される。また、各焦点評価値が焦点検出領域内の輝度信号Yで生成されるように、輝度信号Yが各回路に入力するタイミングが制御される。なお、領域設定回路413には、焦点検出領域に合わせて複数の領域が設定可能である。   A focus detection area is set in the area setting circuit 413 from the camera MPU 125. The area setting circuit 413 generates a gate signal for selecting a signal in the set area. The gate signal is input to the line peak detection circuit 402, the horizontal integration circuit 403, the line minimum value detection circuit 404, the line peak detection circuit 409, the vertical integration circuit 406, and the 410 vertical peak detection circuits 405, 407, and 411. . Further, 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 in the focus detection area. A plurality of areas can be set in the area setting circuit 413 in accordance with the focus detection area.

Yピーク評価値の算出方法について説明する。ガンマ補正された輝度信号Yはラインピーク検出回路402へ入力され、領域設定回路413に設定された焦点検出領域内で水平ラインごとのYラインピーク値が求められる。ラインピーク検出回路402の出力は垂直ピーク検出回路405において焦点検出領域内で垂直方向にピークホールドされ、Yピーク評価値が生成される。Yピーク評価値は、高輝度被写体や低照度被写体の判定に有効な指標である。   The method of calculating the Y peak 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 determined in the focus detection area set in the area setting circuit 413. The output of the line peak detection circuit 402 is peak-held in the vertical direction in the focus detection area by the vertical peak detection circuit 405 to generate a Y peak evaluation value. The Y peak evaluation value is an index that is effective for determining a high brightness subject or a low brightness subject.

Y積分評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、水平積分回路403へ入力され、焦点検出領域内で水平ラインごとにYの積分値が求められる。更に、水平積分回路403の出力は垂直積分回路406において焦点検出領域内で垂直方向に積分されて、Y積分評価値が生成される。Y積分評価値は、焦点検出領域内全体の明るさを判断する指標として用いることができる。   The method of calculating the Y integral evaluation value will be described. The gamma-corrected luminance signal Y is input to the horizontal integration circuit 403, and an integrated value of Y is obtained for each horizontal line in the focus detection area. Further, the output of the horizontal integration circuit 403 is vertically integrated in the focus detection area by the vertical integration circuit 406 to generate a Y integration evaluation value. The Y integral evaluation value can be used as an index for determining the brightness of the entire focus detection area.

Max−Min評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、ラインピーク検出回路402に入力され、焦点検出領域内で水平ラインごとのYラインピーク値が求められる。また、ガンマ補正された輝度信号Yは、ライン最小値検出回路404に入力され、焦点検出領域内で水平ラインごとにYの最小値が検出される。検出された水平ラインごとのYのラインピーク値及び最小値は減算器に入力され、(ラインピーク値−最小値)が垂直ピーク検出回路407に入力される。垂直ピーク検出回路407は焦点検出領域内で垂直方向にピークホールドを行い、Max−Min評価値を生成する。Max−Min評価値は、低コントラスト・高コントラストの判定に有効な指標である。   The method of 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 determined in the focus detection area. Further, the gamma-corrected luminance signal Y is input to the line minimum value detection circuit 404, and the minimum value of Y is detected for each horizontal line in the focus detection area. The detected line peak value and minimum value of Y for each horizontal line are input to the subtractor, and (line peak value−minimum value) is input to the vertical peak detection circuit 407. The vertical peak detection circuit 407 performs peak hold in the vertical direction in the focus detection area to generate a Max-Min evaluation value. The Max-Min evaluation value is an index that is effective for determining low contrast and high contrast.

領域ピーク評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、BPF408に通すことによって特定の周波数成分が抽出され焦点信号が生成される。この焦点信号はラインピーク検出回路409へ入力され、焦点検出領域内で水平ラインごとのラインピーク値が求められる。ラインピーク値は、垂直ピーク検出回路411によって焦点検出領域内でピークホールドされ、領域ピーク評価値が生成される。領域ピーク評価値は、焦点検出領域内で被写体が移動しても変化が少ないので、合焦状態から再度合焦点を探す処理に移行するかどうかを判定する再起動判定に有効な指標である。   The method of calculating the area peak evaluation value will be described. The gamma corrected luminance signal Y is passed through the BPF 408 to extract a specific frequency component to generate a focus signal. This focus signal is input to the line peak detection circuit 409, and the line peak value for each horizontal line is determined in the focus detection area. The line peak value is peak-held in the focus detection area by the vertical peak detection circuit 411 to generate an area peak evaluation value. The area peak evaluation value is an index that is effective for the restart determination that determines whether or not to shift to the process of searching for the in-focus point again from the in-focus state because the change is small even if the subject moves in the focus detection area.

全ライン積分評価値の算出方法について説明する。領域ピーク評価値と同様に、ラインピーク検出回路409は、焦点検出領域内で水平ラインごとのラインピーク値を求める。次に、ラインピーク値を垂直積分回路410に入力し、焦点検出領域内で垂直方向に全水平走査ライン数について積分して全ライン積分評価値を生成する。全ライン積分評価値は、積分の効果でダイナミックレンジが広く、感度が高いので、主要なAF評価値である。従って、本実施形態では単に焦点評価値と記載した場合は全ライン積分評価値を意味する。   A method of calculating the all 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 in the focus detection area. Next, the line peak value is input to the vertical integration circuit 410, and integration is performed on the total number of horizontal scanning lines in the vertical direction in the focus detection area to generate an entire line integration evaluation value. The all line integral evaluation value is a main AF evaluation value because the dynamic range is wide and the sensitivity is high due to the integration effect. Therefore, in the present embodiment, the case where the focus evaluation value is simply described means the entire line integral evaluation value.

カメラMPU125のAF制御部151は上述したそれぞれの焦点評価値を取得し、レンズMPU117を通じてフォーカスレンズ104を光軸方向に沿って所定方向に所定量移動させる。そして、新たに得られた画像データに基づいて上述した各種の評価値を算出し、全ライン積分評価値が最大値となるフォーカスレンズ位置を検出する。   The AF control unit 151 of the camera MPU 125 obtains each of the focus evaluation values described above, and moves the focus lens 104 by a predetermined amount in a predetermined direction along the optical axis direction through the lens MPU 117. Then, the above-mentioned various evaluation values are calculated based on the newly obtained image data, and the focus lens position at which the all line integral evaluation value becomes the maximum value is detected.

本実施形態では、各種のAF用評価値を水平ライン方向および垂直ライン方向で算出する。これにより、水平、垂直の直交する2方向の被写体のコントラスト情報に対して焦点検出を行うことができる。   In the present embodiment, various AF evaluation values are calculated in the horizontal line direction and the vertical line direction. In this way, focus detection can be performed on the contrast information of the subject in two directions, horizontal and vertical.

(焦点検出領域の説明)
図6は、撮影範囲内における焦点検出領域の例を示す図である。上述の通り、位相差AFおよびコントラストAFのいずれも、焦点検出領域に含まれる画素から得られた信号に基づいて行われる。図6において、点線で示す長方形は撮像素子122の画素が形成された撮影範囲217を示す。撮影範囲217には位相差AF用の焦点検出領域218ah、218bh、218chが設定されている。本実施形態では、位相差AF用の焦点検出領域218ah、218bh、218chを撮影範囲217の中央部と左右2箇所の計3箇所に設定している。また、TVAF用の焦点検出領域219a、219b、219cが、位相差AF用の焦点検出領域218ah、218bh、218chの1つを包含する形で設定されている。なお、図6は焦点検出領域の設定例であり、数、位置および大きさは図示したものに限定されない。
(Description of focus detection area)
FIG. 6 is a diagram showing an example of the focus detection area in the imaging range. As described above, both phase difference AF and contrast AF are performed based on the signals obtained from the pixels included in the focus detection area. In FIG. 6, a rectangle indicated by a dotted line indicates the imaging range 217 in which the pixels of the imaging element 122 are formed. In the imaging range 217, focus detection areas 218ah, 218bh, and 218ch for phase difference AF are set. In this embodiment, three focus detection areas 218 ah, 218 b h, and 218 ch for phase difference AF are set at a central part of the imaging range 217 and two places on the left and right. Further, focus detection areas 219a, 219b and 219c for TVAF are set to include one of focus detection areas 218ah, 218bh and 218ch for phase difference AF. Note that FIG. 6 is a setting example of the focus detection area, and the number, the position, and the size are not limited to those illustrated.

(焦点検出処理の流れの説明)
次に、図1Aおよび1Bを参照して、本実施形態のデジタルカメラにおける自動焦点検出(AF)動作について説明する。
AF処理の概要を説明した後、詳細な説明を行う。本実施形態でカメラMPU125はまず、焦点検出領域218ah、218bh、218chのそれぞれについて、位相差AFを適用して焦点ずれ量(デフォーカス量)と、デフォーカス量の信頼性とを求める。焦点検出領域218ah、218bh、218chの全てで所定の信頼性を有するデフォーカス量が得られていれば、カメラMPU125はデフォーカス量に基づいて最至近の被写体の合焦位置にフォーカスレンズ104を移動させる。
(Description of the flow of focus detection processing)
Next, with reference to FIGS. 1A and 1B, an automatic focus detection (AF) operation in the digital camera of the present embodiment will be described.
After the outline of the AF process is described, the detailed description will be made. In the present embodiment, the camera MPU 125 first applies phase difference AF to each of the focus detection areas 218ah, 218bh, and 218ch to obtain the defocus amount (defocus amount) and the reliability of the defocus amount. If a defocus amount having predetermined reliability is obtained in all of the focus detection areas 218ah, 218bh, and 218ch, the camera MPU 125 moves the focus lens 104 to the in-focus position of the closest subject based on the defocus amount. Let

一方、所定の信頼性を有するデフォーカス量が得られなかった焦点検出領域が存在する場合、カメラMPU125は、その焦点検出領域を包含するコントラストAF用の焦点検出領域について焦点評価値を取得する。カメラMPU125は、焦点評価値の変化とフォーカスレンズ104の位置の関係とに基づいて、位相差AFで得られたデフォーカス量に対応する被写体距離より至近側に被写体が存在するか判定する。そして、より至近側に被写体が存在すると判定された場合、焦点評価値の変化に基づく方向にフォーカスレンズ104を駆動する。   On the other hand, when there is a focus detection area for which a defocus amount having a predetermined reliability can not be obtained, the camera MPU 125 obtains a focus evaluation value for a focus detection area for contrast AF including the focus detection area. The camera MPU 125 determines whether an object is present closer to the object distance corresponding to the defocus amount obtained by the phase difference AF, based on the change in focus evaluation value and the relationship between the position of the focus lens 104. Then, when it is determined that the subject is present closer to the near side, the focus lens 104 is driven in the direction based on the change of the focus evaluation value.

なお、以前に焦点評価値が得られていない場合には焦点評価値の変化量を求めることができない。その場合、カメラMPU125は予め決められたデフォーカス量よりも大きく、かつ所定の信頼性を有するデフォーカス量が得られた焦点検出領域が存在する場合にはその中の最至近の被写体に合焦するようにフォーカスレンズ104を駆動する。所定の信頼性を有するデフォーカス量が得られていない場合、及び、予め決められたデフォーカス量よりも大きなデフォーカス量が得られていない場合、カメラMPU125はデフォーカス量に関係の無い所定量フォーカスレンズ104を駆動させる。これは、小さいデフォーカス量に基づいてフォーカスレンズ104を駆動した場合、次の焦点検出時に焦点評価値の変化を検出することが難しい可能性が高いからである。   If the focus evaluation value has not been obtained before, the amount of change in the focus evaluation value can not be obtained. In that case, the camera MPU 125 focuses on the closest subject among the focus detection areas which are larger than the predetermined defocus amount and in which the defocus amount having the predetermined reliability is obtained. The focus lens 104 is driven as follows. If a defocus amount having a predetermined reliability is not obtained, and if a defocus amount larger than a predetermined defocus amount is not obtained, the camera MPU 125 determines a predetermined amount that is not related to the defocus amount. The focus lens 104 is driven. This is because when the focus lens 104 is driven based on a small defocus amount, there is a high possibility that it is difficult to detect a change in focus evaluation value at the time of the next focus detection.

いずれかの方法により焦点検出を終えると、カメラMPU125は各種の補正値を算出し、焦点検出結果を補正する。そして、カメラMPU125は補正後の焦点検出結果に基づいてフォーカスレンズ104を駆動する。   When focus detection is completed by any method, the camera MPU 125 calculates various correction values and corrects the focus detection result. Then, the camera MPU 125 drives the focus lens 104 based on the focus detection result after correction.

以下、上述したAF処理の詳細を、図1Aおよび図1Bに示すフローチャートを用いて説明する。以下のAF処理動作は、他の主体が明記されている場合を除き、カメラMPU125が主体となって実行される。また、カメラMPU125がレンズMPU117にコマンド等を送信することによってレンズユニット100の駆動や制御を行う場合、説明を簡潔にするために動作主体をカメラMPU125として記載する場合がある。
S1でカメラMPU125は焦点検出領域を設定する。ここでは、位相差AF用、コントラストAF用とも、図6に示したような3か所の焦点検出領域が設定されるものとする。
The details of the above-described AF processing will be described below using the flowcharts shown in FIGS. 1A and 1B. The following AF processing operation is mainly executed by the camera MPU 125 unless another entity is specified. When the camera MPU 125 transmits a command or the like to the lens MPU 117 to drive or control the lens unit 100, an operation subject may be described as the camera MPU 125 in order to simplify the description.
At S1, the camera MPU 125 sets a focus detection area. Here, it is assumed that three focus detection areas as shown in FIG. 6 are set for phase difference AF and contrast AF.

S2において、カメラMPU125は、RAM125b内の至近判定フラグを1に設定する。
S3で、カメラMPU125は、撮像素子122を露光して画像信号を読み出し、画像処理回路124に位相差AF用の焦点検出領域218ah、218bh、218ch内の画像データに基づく位相差AF用の像信号を生成させる。また、画像処理回路124が生成したRAW画像データをTVAF部130に供給させ、TVAF部130でTVAF用の焦点検出領域219a、219b、219c内の画素データに基づく評価値を算出させる。なお、位相差AF用の像信号を生成する前に、画像処理回路124において撮影レンズのレンズ枠などによる光束のケラレによる射出瞳の非対称性を補正する処理(特開2010−117679号公報参照)を適用してもよい。TVAF部130が算出した焦点評価値は、カメラMPU125内のRAM125bに記憶される。
At S2, the camera MPU 125 sets the close determination flag in the RAM 125b to one.
In step S3, the camera MPU 125 exposes the image sensor 122 and reads an image signal, and the image processing circuit 124 generates an image signal for phase difference AF based on image data in the focus detection areas 218ah, 218bh, and 218ch for phase difference AF. To generate In addition, the RAW image data generated by the image processing circuit 124 is supplied to the TVAF unit 130, and the TVAF unit 130 calculates an evaluation value based on pixel data in the focus detection areas 219a, 219b, and 219c for TVAF. A process of correcting the asymmetry of the exit pupil due to vignetting of the light flux by the lens frame of the photographing lens or the like in the image processing circuit 124 before generating an image signal for phase difference AF (see Japanese Patent Laid-Open No. 2010-117679) May apply. The focus evaluation value calculated by the TVAF unit 130 is stored in the RAM 125 b in the camera MPU 125.

S4において、カメラMPU125は、信頼性のある焦点評価値のピーク(極大値)が検出されたか否かを判定する。信頼性のあるピークが検出された場合、カメラMPU125は、焦点検出処理を終えるために処理をS20に進める。なお、焦点評価値のピークの信頼性の算出方法に制限はないが、例えば、特開2010−78810号公報の図10から図13で説明されているような方法を用いればよい。具体的には、検出されたピークが山の頂点かどうかを、焦点評価値の最大値と最小値の差、一定値(SlopeThr)以上の傾きで傾斜している部分の長さ、および傾斜している部分の勾配をそれぞれの閾値と比較して判断する。全ての閾値を満たしていればピークは信頼性があると判定することができる。   In S4, the camera MPU 125 determines whether or not the peak (maximum value) of the reliable focus evaluation value is detected. If a reliable peak is detected, the camera MPU 125 advances the process to step S20 to finish the focus detection process. Although the method of calculating the reliability of the peak of the focus evaluation value is not limited, for example, the method as described in FIGS. 10 to 13 of JP-A-2010-78810 may be used. Specifically, whether the detected peak is the peak of a mountain, the difference between the maximum value and the minimum value of the focus evaluation value, the length of a portion inclined at an inclination of a predetermined value (SlopeThr), and The slope of the part in question is compared with each threshold value to judge. If all the thresholds are satisfied, it can be determined that the peak is reliable.

本実施形態では、位相差AFとコントラストAFを併用している。そのため、同一の焦点検出領域や他の焦点検出領域で、より至近側の被写体の存在が確認されている場合には、信頼性のある焦点評価値ピークが検出された際であっても、焦点検出を終えずに処理をS5に進めてもよい。ただし、この場合、信頼性のある焦点評価値ピークに対応するフォーカスレンズ104の位置を記憶しておき、S5以降の処理で信頼性のある焦点検出結果が得られなかった場合に、記憶したフォーカスレンズ104位置を焦点検出結果とする。   In the present embodiment, phase difference AF and contrast AF are used in combination. Therefore, when the presence of a closer object is confirmed in the same focus detection area or another focus detection area, the focus evaluation value peak is detected even when the reliable focus evaluation value peak is detected. The process may proceed to S5 without completing the detection. However, in this case, when the position of the focus lens 104 corresponding to the reliable focus evaluation value peak is stored, and the reliable focus detection result is not obtained in the process after S5, the stored focus The position of the lens 104 is taken as the focus detection result.

S5において、位相差AF部129は、焦点検出領域218ch、218ah,218bhごとに、画像処理回路124から供給された一対の像信号のずれ量(位相差)を算出し、位相差を予め記憶されている換算係数を用いてデフォーカス量に変換する。ここでは、算出されたデフォーカス量の信頼性も判定し、所定の信頼性を有すると判定された焦点検出領域のデフォーカス量のみを、以後のAF処理で用いる。レンズ枠などによるケラレの影響により、デフォーカス量が大きくなるにつれて、一対の像信号間で検出される位相差は、より多くの誤差を含むようになる。そのため、得られたデフォーカス量が閾値より大きい場合、一対の像信号の形状の一致度が低い場合、像信号のコントラストが低い場合には、得られたデフォーカス量は所定の信頼性を有さない(信頼性が低い)と判定することができる。以下、得られたデフォーカス量が所定の信頼性を有すると判定された場合に「デフォーカス量が算出できた」と表現する。また、デフォーカス量が何らかの理由で算出できなかった場合や、デフォーカス量の信頼性が低いと判定された場合には「デフォーカス量が算出できない」と表現する。   In S5, the phase difference AF unit 129 calculates the shift amount (phase difference) of the pair of image signals supplied from the image processing circuit 124 for each of the focus detection areas 218ch, 218ah, and 218bh, and stores the phase difference in advance. It converts into defocusing quantity using the conversion factor which is. Here, the reliability of the calculated defocus amount is also determined, and only the defocus amount of the focus detection area determined to have predetermined reliability is used in the subsequent AF processing. Due to the influence of vignetting due to a lens frame or the like, the phase difference detected between a pair of image signals contains more errors as the defocus amount increases. Therefore, when the obtained defocus amount is larger than the threshold, when the degree of coincidence of the shape of the pair of image signals is low, and when the contrast of the image signal is low, the obtained defocus amount has a predetermined reliability. It can be determined that it is not (unreliable). Hereinafter, when it is determined that the obtained defocus amount has a predetermined reliability, it is expressed as “the defocus amount has been calculated”. Further, when the defocus amount can not be calculated for some reason, or when it is determined that the reliability of the defocus amount is low, it is expressed as "the defocus amount can not be calculated".

S6でカメラMPU125は、S1で設定した位相差AF用の焦点検出領域218ah、218bh、218chの全てでデフォーカス量が算出できたか否か調べる。全ての焦点検出領域でデフォーカス量が算出できている場合、カメラMPU125は処理をS20に進め、算出されたデフォーカス量の中で、最も至近側にある被写体を示すデフォーカス量が算出された焦点検出領域に対して、縦横BP補正値(BP1)を算出する。ここで、最も至近側の被写体を選択する理由は、一般に、撮影者がピントを合わせたい被写体は、至近側に存在することが多いためである。また、縦横BP補正値(BP1)は、水平方向の被写体のコントラストに対して焦点検出を行った場合と、垂直方向の被写体のコントラストに対して焦点検出を行った場合の焦点検出結果の差を補正する値である。   In S6, the camera MPU 125 checks whether or not the defocus amount has been calculated in all of the focus detection areas 218ah, 218bh, and 218ch for phase difference AF set in S1. If the defocus amount has been calculated in all the focus detection areas, the camera MPU 125 advances the process to S20, and the defocus amount indicating the object closest to the closest side among the calculated defocus amounts is calculated. Vertical and horizontal BP correction values (BP1) are calculated for the focus detection area. Here, the reason why the closest subject is selected is that, in general, the subject that the photographer wants to focus on is often present on the near side. The vertical and horizontal BP correction values (BP1) are the difference between the focus detection result in the case where focus detection is performed on the contrast in the horizontal direction and in the case where focus detection is performed on the contrast in the vertical direction. It is a value to be corrected.

一般的な被写体は、水平方向、垂直方向ともにコントラストを有しており、撮影された画像のピント状態の評価も、水平方向、垂直方向の両方向のコントラストを鑑みてなされる。一方で、上述の位相差検出方式のAFのように水平方向のみの焦点検出を行う場合、水平方向の焦点検出結果と撮影画像の水平方向、垂直方向の両方向のピント状態には誤差を生じる。この誤差は、撮影光学系の非点収差などにより発生する。縦横BP補正値(BP1)は、その誤差を補正するための補正値で、選択された焦点検出領域、フォーカスレンズ104の位置、ズーム状態を示す第1レンズ群101の位置などを考慮して算出される。算出方法の詳細については後述する。   A general subject has contrast in both the horizontal direction and the vertical direction, and the evaluation of the focus state of a captured image is also made in consideration 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 AF of the above-described phase difference detection method, errors occur in the focus detection result in the horizontal direction and the focus state in both the horizontal direction and the vertical direction of the captured image. This error occurs due to astigmatism of the imaging optical system and the like. The vertical and horizontal BP correction value (BP1) is a correction value for correcting the error, and is calculated in consideration 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, etc. Be done. Details of the calculation method will be described later.

S21でカメラMPU125は、S20で補正値算出対象となった焦点検出領域に対して、垂直方向もしくは水平方向のコントラスト情報を用いて、色BP補正値(BP2)を算出する。色BP補正値(BP2)は、撮影光学系の色収差により発生するもので、焦点検出に用いる信号の色のバランスと撮影画像もしくは現像された画像に用いる信号の色のバランスとの差により生じる。例えば、本実施形態のコントラストAFでは、焦点評価値を緑(G)のカラーフィルタを有する画素(緑画素)出力に基づいて生成するため、主に緑色の波長の合焦位置を検出することになる。しかし、撮影画像は、RGB全色を用いて生成されるため、赤(R)や青(B)の合焦位置が緑(G)と異なる場合(軸上色収差が存在する場合)、焦点評価値による焦点検出結果とずれ(誤差)を生じる。その誤差を、補正するための補正値が、色BP補正値(BP2)である。色BP補正値(BP2)の算出方法の詳細は、後述する。   In S21, the camera MPU 125 calculates a color BP correction value (BP2) using contrast information in the vertical direction or horizontal direction for the focus detection area for which the correction value has been calculated in S20. The color BP correction value (BP2) is generated due to the chromatic aberration of the photographing optical system, and is generated due to 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. For example, in the contrast AF of this embodiment, since the focus evaluation value is generated based on the pixel (green pixel) output having a green (G) color filter, the in-focus position of the green wavelength is mainly detected. Become. However, since the captured image is generated using all RGB colors, when the in-focus position of red (R) or blue (B) is different from green (G) (when on-axis chromatic aberration exists), focus evaluation is performed This results in a deviation (error) from the focus detection result by the value. The correction value for correcting the error is the color BP correction value (BP2). Details of the method of calculating the color BP correction value (BP2) will be described later.

S22でカメラMPU125は、補正対象である焦点検出領域に対して、垂直方向もしくは水平方向で緑信号もしくは輝度信号Yのコントラスト情報を用いて、ある特定の空間周波数BP補正値(BP3)を算出する。空間周波数BP補正値(BP3)は、撮影光学系の主に球面収差により発生するもので、焦点検出に用いる信号の評価周波数(帯域)と撮影画像を鑑賞する際の評価周波数(帯域)の差によって発生する。上述の通り焦点検出時の画像信号は第2のモードで撮像素子から読み出されているため、出力信号が加算や間引きされている。そのため、第1の読み出しモードで読み出された全画素の信号を用いて生成される撮影画像に対して、焦点検出に用いる出力信号は評価帯域が低くなる。その評価帯域の差により発生する焦点検出のずれを補正するのが空間周波数BP補正値(BP3)である。空間周波数BP補正値(BP3)の算出方法の詳細は、後述する。   At S22, the camera MPU 125 calculates a specific spatial frequency BP correction value (BP3) using the green signal or the contrast information of the luminance signal Y in the vertical direction or horizontal direction with respect to the focus detection area to be corrected. . The spatial frequency BP correction value (BP3) is mainly generated by spherical aberration of the photographing optical system, and is a difference between the evaluation frequency (band) of the signal used for focus detection and the evaluation frequency (band) at the time of viewing the photographed image. Generated by As described above, since the image signal at the time of focus detection is read out from the image sensor in the second mode, the output signal is added or thinned. Therefore, the output signal used for focus detection has a low evaluation band with respect to the captured image generated using the signals of all the pixels read out in the first readout mode. It is the spatial frequency BP correction value (BP3) that corrects the focus detection shift that occurs due to the difference in the evaluation band. Details of the method of calculating the spatial frequency BP correction value (BP3) will be described later.

S23でカメラMPU125は、算出された3種の補正値(BP1、BP2、BP3)を用いて以下の式(1)により焦点検出結果DEF_Bを補正し、補正後の焦点検出結果DEF_Aを算出する。
DEF_A=DEF_B+BP1+BP2+BP3 (1)
In S23, the camera MPU 125 corrects the focus detection result DEF_B according to the following equation (1) using the three calculated correction values (BP1, BP2, BP3), and calculates the corrected focus detection result DEF_A.
DEF_A = DEF_B + BP1 + BP2 + BP3 (1)

本実施形態では、焦点検出結果を補正するための補正値を3段階に分けて、縦横(S20)、色(S21)、空間周波数(S22)の順番に、計算する。
まず、撮影画像の鑑賞時の評価が縦横両方向のコントラスト情報を用いられるのに対し、焦点検出は1方向のコントラスト情報を用いることに起因する誤差を、縦横BP補正値(BP1)として算出する。
In the present embodiment, the correction value for correcting the focus detection result is divided into three steps, and calculation is performed in order of vertical and horizontal (S20), color (S21), and spatial frequency (S22).
First, while evaluation at the time of viewing of a photographed image uses contrast information in both the vertical and horizontal directions, focus detection calculates an error caused by using contrast information in one direction as the vertical and horizontal BP correction value (BP1).

次に、縦横BPの影響を切り離して、1方向のコントラスト情報において、撮影画像に用いられる信号の色と焦点検出時に用いられる信号の色による合焦位置の差を、色BP補正値(BP2)として算出する。
さらに、1方向のコントラスト情報で、緑もしくは輝度信号などのある特定の色に関して、撮影画像の鑑賞時と焦点検出時の評価帯域の差により発生する合焦位置の差を空間周波数BP補正値(BP3)として算出する。
このように、3種類の誤差を切り分けて算出することにより、演算量の低減、レンズもしくはカメラに記憶するデータ容量の低減を図っている。
Next, by separating the influence of vertical and horizontal BP, the difference between the color of the signal used for the captured image and the color of the signal used for focus detection in the contrast information in one direction is the color BP correction value (BP2) Calculated as
Furthermore, the spatial frequency BP correction value is the difference in the in-focus position generated due to the difference between the evaluation band at the time of viewing the captured image and at the time of focus detection for one specific color such as green or luminance signal. Calculated as BP3).
As described above, by dividing and calculating the three types of errors, the amount of calculation is reduced, and the data capacity stored in the lens or the camera is reduced.

S24でカメラMPU125は、レンズMPU117を通じてフォーカスレンズ104を、式(1)で算出された補正後のデフォーカス量DEF_Aに基づいて駆動する。   In S24, the camera MPU 125 drives the focus lens 104 through the lens MPU 117 based on the corrected defocus amount DEF_A calculated by Equation (1).

S25でカメラMPU125は、フォーカスレンズ104の駆動に用いたデフォーカス量を算出した焦点検出領域を表す表示(AF枠表示)を、表示器126で例えばライブビュー画像に重畳表示させて、AF処理を終了する。   In step S25, the camera MPU 125 causes the display 126 to display a focus detection area (AF frame display) representing the focus detection area for which the defocus amount used to drive the focus lens 104 has been calculated superimposed on, for example, a live view image. finish.

一方、S6でデフォーカス量が算出できなかった焦点検出領域が存在した場合、カメラMPU125は処理を図1BのS7に進める。S7でカメラMPU125は、至近判定フラグが1であるか否かを判定する。至近判定フラグが1なのは、AF動作が始まってからフォーカスレンズ駆動が一度も行われていない場合である。フォーカスレンズ駆動が行われていれば至近判定フラグは0となる。至近判定フラグが1である場合、カメラMPU125は、処理をS8に進める。   On the other hand, if there is a focus detection area for which the defocus amount could not be calculated in S6, the camera MPU 125 advances the process to S7 of FIG. 1B. At S7, the camera MPU 125 determines whether the close determination flag is 1. The closeness determination flag is 1 when the focus lens drive has not been performed since the start of the AF operation. If focus lens driving is performed, the close determination flag is zero. If the close determination flag is 1, the camera MPU 125 advances the process to step S8.

S8でカメラMPU125は、全ての焦点検出領域でデフォーカス量を算出できなかった場合、もしくは、算出されたデフォーカス量のうち、最も至近側の被写体の存在を示すデフォーカス量が所定の閾値A以下の場合には、処理をS9に進める。S9でカメラMPU125は、至近側に予め決められた量、フォーカスレンズを駆動する。   When the camera MPU 125 can not calculate the defocus amount in all the focus detection areas in S8, or the defocus amount indicating the presence of the closest object on the nearest side among the calculated defocus amounts is the predetermined threshold A. In the following case, the process proceeds to S9. At S9, the camera MPU 125 drives the focus lens by a predetermined amount on the near side.

ここでS8でYesの場合に、所定量のレンズ駆動を行う理由を説明する。まず、複数の焦点検出領域の中で、デフォーカス量が算出できた領域が無い場合とは、現時点では、ピント合わせを行うべき被写体が見つかっていない場合である。そのため、合焦不能であると判断する前に、全ての焦点検出領域に対して、ピント合わせを行うべき被写体の存在を確認するために、所定量のレンズ駆動を行い、後述する焦点評価値の変化を判定できるようにする。また、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量が所定の閾値A以下の場合とは、現時点で、ほぼ合焦状態の焦点検出領域が存在している場合である。このような状況では、デフォーカス量が算出できなかった焦点検出領域に、より至近側に、現時点では検出されていない被写体がある可能性を確認するために、所定量のレンズ駆動を行い、後述する焦点評価値の変化を判定できるようにする。
なお、S9でフォーカスレンズを駆動する所定量は、撮影光学系のF値やレンズ駆動量に対する撮像面上でのピント移動量の敏感度を鑑みて定めればよい。
Here, in the case of Yes in S8, the reason for performing the lens drive of a predetermined amount will be described. First, among the plurality of focus detection areas, the case where there is no area for which the defocus amount can be calculated means that the subject to be focused on has not been found at the present time. Therefore, before it is determined that focusing can not be performed, a predetermined amount of lens driving is performed on all focus detection areas in order to confirm the presence of an object to be focused, and focus evaluation values to be described later are obtained. Make it possible to determine changes. In addition, when the defocus amount indicating the presence of the closest subject among the calculated defocus amounts is less than or equal to the predetermined threshold A, a focus detection area in a substantially in-focus state exists at the present time That's the case. In such a situation, a lens drive of a predetermined amount is performed in order to confirm the possibility that there is a subject not detected at this time on the near side in the focus detection area where the defocus amount could not be calculated. Change in the focus evaluation value to be determined.
Note that the predetermined amount for driving the focus lens in S9 may be determined in view of the F value of the photographing optical system and the sensitivity of the focus movement amount on the imaging surface to the lens driving amount.

一方で、S8でNoの場合、すなわち、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量が所定の閾値Aより大きい場合には、S10に進む。この場合には、デフォーカス量が算出できた焦点検出領域は存在するものの、その焦点検出領域は合焦状態ではない場合である。そのため、S10でカメラMPU125は、算出されたデフォーカス量の中で最も至近側の被写体の存在を示すデフォーカス量に基づき、レンズ駆動を行う。
S9もしくはS10にてレンズ駆動を行った後、カメラMPU125は処理をS11に進め、至近判定フラグを0に設定して、図1AのS3に処理を戻す。
On the other hand, if the result of S8 is No, that is, if the defocus amount indicating the presence of the closest subject among the calculated defocus amounts is larger than the predetermined threshold A, the process proceeds to S10. In this case, although there is a focus detection area where the defocus amount can be calculated, the focus detection area is not in focus. Therefore, in S10, the camera MPU 125 performs lens driving based on the defocus amount indicating the presence of the closest subject among the calculated defocus amounts.
After driving the lens in S9 or S10, the camera MPU 125 advances the process to S11, sets the close determination flag to 0, and returns the process to S3 in FIG. 1A.

S7で、至近判定フラグが1でない(0である)場合、カメラMPU125は処理をS12に進める。S12でカメラMPU125は、デフォーカス量が算出できなかった焦点検出領域に対応したTVAF用の焦点検出領域の焦点評価値が、レンズ駆動前後で、所定の閾値B以上変化したか否かを判断する。焦点評価値は増加する場合も減少する場合もあるが、S12では焦点評価値の変化量の絶対値が所定の閾値B以上であるか否かを判断する。   If it is determined in S7 that the close determination flag is not 1 (is 0), the camera MPU 125 advances the process to S12. In S12, the camera MPU 125 determines 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 could not be calculated has changed by a predetermined threshold B or more before and after lens driving. . Although the focus evaluation value may increase or decrease, in S12, it is determined whether the absolute value of the change amount of the focus evaluation value is equal to or greater than a predetermined threshold B.

ここで、焦点評価値の変化量の絶対値が所定の閾値B以上である場合とは、デフォーカス量は算出できないものの、焦点評価値の増減により、被写体のボケ状態の変化を検出できたことを意味している。そのため、本実施形態では、位相差AFによるデフォーカス量が検出できない場合でも、焦点評価値の増減に基づいて被写体の存在を判定し、AF処理を継続する。これにより、デフォーカス量が大きく、位相差AFでは検出できない被写体に対して、焦点調節を行うことができる。   Here, although the defocus amount can not be calculated when the absolute value of the change amount of the focus evaluation value is equal to or more than the predetermined threshold value B, the change of the blurred state of the subject could be detected by the increase or decrease of the focus evaluation value. Means. Therefore, in the present embodiment, even when the defocus amount due to the phase difference AF can not be detected, the presence of the subject is determined based on the increase or decrease of the focus evaluation value, and the AF processing is continued. As a result, it is possible to perform focus adjustment on an object which has a large defocus amount and can not be detected by the phase difference AF.

ここで、判定に用いられる所定の閾値Bは、レンズ駆動量に応じて変更する。レンズ駆動量が大きい場合は、小さい場合よりも閾値Bに大きい値を設定する。これは、被写体が存在する場合には、レンズ駆動量の増加に応じて、焦点評価値の変化量も増加するためである。これらのレンズ駆動量ごとの閾値Bは、EEPROM125cに記憶されている。   Here, the predetermined threshold value B used for the determination is changed according to the lens drive amount. When the lens driving amount is large, the threshold B is set to a larger value than when the lens driving amount is small. This is because when there is a subject, the amount of change of the focus evaluation value also increases as the amount of lens drive increases. The threshold B for each lens drive amount is stored in the EEPROM 125 c.

焦点評価値の変化量の絶対値が閾値B以上である場合、カメラMPU125は処理をS13に進め、焦点評価値の変化量が閾値B以上ある焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみであるか否かを判定する。焦点検出領域が無限遠側被写体の存在を示す場合とは、レンズ駆動の駆動方向が至近方向で焦点評価値が減少、もしくは、レンズ駆動の駆動方向が無限遠方向で焦点評価値が増加した場合である。   If the absolute value of the amount of change in focus evaluation value is equal to or greater than the threshold B, the camera MPU 125 advances the process to S13, and the focus detection area in which the amount of change in focus evaluation value is equal to or greater than the threshold B indicates the presence of an infinite distance object. It is determined whether it is only the focus detection area. When the focus detection area indicates the presence of an object at infinity, the drive direction of the lens drive is the closest direction and the focus evaluation value decreases, or the drive direction of the lens drive is the focus direction and the focus evaluation value increases. It is.

焦点評価値の変化量が閾値B以上である焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみでない場合、カメラMPU125は処理をS14に進め、至近側に所定量のレンズ駆動を行う。これは、焦点評価値の変化量が閾値B以上ある焦点検出領域の中に、至近側被写体の存在を示す焦点検出領域があるためである。なお、至近側を優先する理由は上述のとおりである。   If the focus detection area in which the amount of change in focus evaluation value is equal to or greater than the threshold B is not the only focus detection area indicating the presence of an infinite distance object, the camera MPU 125 advances the process to S14 and drives the lens by a predetermined amount on the near side. Do. This is because there is a focus detection area that indicates the presence of the near side object in the focus detection area in which the amount of change in focus evaluation value is equal to or greater than the threshold B. The reason for giving priority to the close side is as described above.

一方、S13において、焦点評価値の変化量が閾値B以上ある焦点検出領域が、無限遠側被写体の存在を示す焦点検出領域のみである場合、カメラMPU125は処理をS15に進める。S15でカメラMPU125は、デフォーカス量が算出できた焦点検出領域が存在するか否かを判定する。デフォーカス量が算出できた焦点検出領域が存在する場合(S15でYes)には、焦点評価値による無限遠側被写体の存在よりも、位相差AFの結果を優先するため、カメラMPU125は、処理を図1AのS20に進める。   On the other hand, if the focus detection area in which the amount of change in focus evaluation value is equal to or greater than the threshold B is only the focus detection area indicating the presence of an infinite distance object in S13, the camera MPU 125 advances the process to S15. At S15, the camera MPU 125 determines whether there is a focus detection area for which the defocus amount has been calculated. When there is a focus detection area for which the defocus amount has been calculated (Yes in S15), the camera MPU 125 processes the result of the phase difference AF in preference to the presence of the object on the infinity side by the focus evaluation value. To S20 of FIG. 1A.

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

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

焦点評価値の変化量の絶対値が所定の閾値B未満である場合(S12でNo)、カメラMPU125は処理をS17に進め、デフォーカス量が算出できた焦点検出領域の有無を判定する。デフォーカス量が算出できた焦点検出領域が無い場合、カメラMPU125は、処理をS18に進め、予め定められた定点にレンズを駆動した後、さらに処理をS19に進め、表示器126に非合焦表示を行ってAF処理を終了する。これは、デフォーカス量が算出できた焦点検出領域が無く、レンズ駆動の前後で焦点評価値の変化がある焦点検出領域も無い場合である。このような場合、被写体の存在を示す情報が全く無いため、カメラMPU125は合焦不能と判定して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 camera MPU 125 advances the process to S17 and determines the presence or absence of the focus detection area for which the defocus amount has been calculated. If there is no focus detection area for which the defocus amount has been calculated, the camera MPU 125 advances the process to S18, drives the lens to a predetermined fixed point, and then advances the process to S19 and causes the display 126 to be out of focus. Display and stop AF processing. This is a case where there is no focus detection area where the defocus amount can be calculated, and there is no focus detection area in which 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, the camera MPU 125 determines that the in-focus state can not be achieved and ends the AF process.

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

(縦横BP補正値の算出方法)
次に、図7から図8(b)を用いて、図1のS20で行う縦横BP補正値(BP1)の算出方法について説明する。図7は、縦横BP補正値(BP1)の算出処理の詳細を示すフローチャートである。
S100で、カメラMPU125は縦横BP補正情報を取得する。縦横BP補正情報は、水平方向(第1の方向)の合焦位置に対する垂直方向(第2の方向)の合焦位置の差分情報である。本実施形態において縦横BP補正情報はレンズユニット100のレンズメモリ118に予め記憶されており、カメラMPU125は、レンズMPU117に要求して取得するものとする。しかし、カメラRAM125bの不揮発性領域に、レンズユニットの識別情報と対応付けて記憶されていてもよい。
(Method of calculating vertical and horizontal BP correction value)
Next, a method of calculating the vertical and horizontal BP correction value (BP1) performed in S20 of FIG. 1 will be described using FIGS. 7 to 8B. FIG. 7 is a flowchart showing details of calculation processing of the vertical and horizontal BP correction value (BP1).
At S100, the camera MPU 125 obtains vertical and horizontal BP correction information. The vertical and horizontal BP correction information is difference information of the in-focus position in the vertical direction (second direction) with respect to the in-focus position in the horizontal direction (first direction). In the present embodiment, vertical and horizontal BP correction information is stored in advance in the lens memory 118 of the lens unit 100, and the camera MPU 125 requests the lens MPU 117 to acquire it. However, it may be stored in the nonvolatile area of the camera RAM 125b in association with the identification information of the lens unit.

図8(a)に、縦横BP補正情報の例を示す。ここでは、図6の中央の焦点検出領域219a、218ahに対応した縦横BP補正情報の例を示しているが、他の焦点検出領域219c、218chおよび219b、218bhについても縦横BP補正情報を記憶している。ただし、撮影光学系の光軸を挟んで対称な位置に存在する焦点検出領域の焦点検出補正値は設計上は等しい。本実施形態において、焦点検出領域219c、218chと219b、218bhとはこのような対象関係を満たすため、一方についてのみ縦横BP補正情報を記憶してもよい。また、焦点検出領域の位置によって補正値が大きく変化しない場合には、共通の値として記憶してもよい。   FIG. 8A shows an example of vertical and horizontal BP correction information. Here, although an example of vertical and horizontal BP correction information corresponding to the focus detection areas 219a and 218ah in the center of FIG. 6 is shown, vertical and horizontal BP correction information is stored also for other focus detection areas 219c, 218ch and 219b, 218bh. ing. However, the focus detection correction values of the focus detection areas present at symmetrical positions across the optical axis of the photographing optical system are equal in design. In the present embodiment, since the focus detection areas 219c, 218ch and 219b, 218bh satisfy such a target relationship, the vertical and horizontal BP correction information may be stored for only one of them. Further, when the correction value does not largely change depending on the position of the focus detection area, it may be stored as a common value.

図8(a)に示す例では、撮影光学系のズーム位置(画角)とフォーカスレンズ位置(合焦距離)を8つのゾーンに分割し、ゾーンごとに焦点検出補正値BP111〜BP188を記憶している。分割ゾーン数が多いほど撮影光学系の第1レンズ群101の位置およびフォーカスレンズ104の位置に応じた高精度な補正値が得られる。また、縦横BP補正情報は、コントラストAF、位相差AFの両方に用いることができる。   In the example shown in FIG. 8A, the zoom position (field angle) of the photographing optical system and the focus lens position (focus distance) are divided into eight zones, and focus detection correction values BP111 to BP188 are stored for each zone. ing. As the number of divided zones increases, a highly accurate correction value according to the position of the first lens group 101 of the imaging optical system and the position of the focus lens 104 can be obtained. The vertical and horizontal BP correction information can be used for both contrast AF and phase difference AF.

S100でカメラMPU125は、補正対象となっている焦点検出結果に応じたズーム位置、フォーカスレンズ位置に対応した補正値を取得する。
S101でカメラMPU125は、補正対象となっている焦点検出領域において、水平方向、垂直方向のいずれの方向に対しても信頼性のある焦点検出結果が得られているかを判定する。焦点検出結果の信頼性の判定の方法については、位相差AFについてもコントラストAFについても上述した通りである。本実施形態の位相差AFは水平方向の焦点検出しか行っていないため、水平方向、垂直方向の両方向に信頼性のある焦点検出結果が得られるのはコントラストAFである。そのため、縦横BP補正値に関する以後の説明は、コントラストAFを想定した説明を行うが、位相差AFの焦点検出を水平、垂直の両方向で行う場合も、同様の処理を行えばよい。S101で、水平方向、垂直方向のいずれの焦点検出結果も信頼性があると判定された場合、カメラMPU125は、処理をS102に進める。
In S100, the camera MPU 125 acquires the zoom position and the correction value corresponding to the focus lens position according to the focus detection result to be corrected.
In step S101, the camera MPU 125 determines whether a reliable focus detection result is obtained in any of the horizontal direction and 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 the phase difference AF and the contrast AF. Since the phase difference AF of this embodiment only performs focus detection in the horizontal direction, it is the contrast AF that reliable focus detection results can be obtained in both the horizontal direction and the vertical direction. Therefore, in the following description of the vertical and horizontal BP correction values, contrast AF is assumed, but similar processing may be performed when focus detection of phase difference AF is performed in both horizontal and vertical directions. If it is determined in step S101 that the horizontal and vertical focus detection results are also reliable, the camera MPU 125 advances the process to step S102.

S102でカメラMPU125は、水平方向の焦点検出結果と垂直方向の焦点検出結果の差が、妥当であるか否かを判定する。これは、遠い距離の被写体と近い距離の被写体を焦点検出領域内に含んだ際に生じる遠近競合の問題に対応するために行う処理である。例えば、遠い被写体が水平方向にコントラストを有し、近い被写体が垂直方向にコントラストを有するような場合、撮影光学系の非点収差などにより発生する誤差よりも絶対値が大きかったり、符号が反対の焦点検出結果の差が生じたりする場合がある。カメラMPU125は、水平方向の焦点検出結果と垂直方向の焦点検出結果の差が予め定めた判定値Cより大きい場合には差が妥当でない(遠近競合している)と判定する。そして、より至近側の焦点検出結果を示す方向として水平方向もしくは垂直方向を選択し、処理をS104に進める。なお、判定値Cは、上述の理由から、収差などで発生しうる差を大きく超える値を一意に決めてもよいし、S100で得られた補正情報を用いて設定してもよい。   In S102, the camera MPU 125 determines whether the difference between the horizontal focus detection result and the vertical focus detection result is valid. This is a process performed to cope with the problem of near-far conflict that occurs when a long distance subject and a close distance subject are included in the focus detection area. For example, in the case where the distant object has contrast in the horizontal direction and the close object has contrast in the vertical direction, the absolute value is larger than the error generated due to astigmatism of the imaging optical system or the like. There may be a difference in focus detection results. When the difference between the focus detection result in the horizontal direction and the focus detection result in the vertical direction is larger than a predetermined determination value C, the camera MPU 125 determines that the difference is not valid (perspective conflict). Then, the horizontal direction or the vertical direction is selected as the direction indicating the focus detection result closer to the near side, and the process proceeds to S104. Note that the determination value C may uniquely determine a value that greatly exceeds the difference that may occur due to aberration or the like, for the above-described reason, or may be set using the correction information obtained in S100.

S102で水平方向の焦点検出結果と垂直方向の焦点検出結果の差が妥当であると判定された場合、カメラMPU125は、処理をS106に進める。   If it is determined in S102 that the difference between the focus detection result in the horizontal direction and the focus detection result in the vertical direction is valid, the camera MPU 125 advances the process to S106.

一方で、S101で水平方向、もしくは垂直方向の一方向にのみ信頼性が有る場合や、S102で水平方向もしくは垂直方向の一方向のみが選択された場合、カメラMPU125は処理をS104に進める。S104でカメラMPU125は焦点検出結果の方向選択を行う。信頼性のある焦点検出結果を算出した方向や、遠近競合判定で、より至近側にある被写体に対応した焦点検出結果を算出した方向を選択する。   On the other hand, if the reliability is in only 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 camera MPU 125 advances the process to S104. At S104, the camera MPU 125 selects the direction of the focus detection result. The direction in which the reliable focus detection result is calculated, or the direction in which the focus detection result corresponding to the object closer to the near side is calculated in the near and far competition determination is selected.

次にカメラMPU125は、S105で、水平方向、垂直方向の重み付けが可能であるか否かを判定する。S105が実行される場合、焦点評価値の信頼性や遠近競合の観点で、水平方向、垂直方向の両方向に対して信頼性のある焦点検出結果が得られていないが、縦横BP補正値を算出するための判定を改めて行う。この理由を、図8(b)を用いて、詳細に説明する。   Next, in step S105, the camera MPU 125 determines whether weighting in the horizontal direction and the vertical direction is possible. When S105 is executed, although reliable focus detection results have not been obtained in both the horizontal direction and the vertical direction from the viewpoint of the reliability of the focus evaluation value and the near and far conflict, the vertical and horizontal BP correction values are calculated. Make another judgment to The reason is described in detail with reference to FIG.

図8(b)は、選択された焦点検出領域のフォーカスレンズ104の位置と焦点評価値の関係例を示す図である。図中の曲線E_h、E_vは、コントラストAFで検出された水平方向の焦点評価値と垂直方向の焦点評価値の変化を示す。また、LP1、LP2、LP3は、それぞれフォーカスレンズ位置を示す。図8(b)では、水平方向の焦点評価値E_hから信頼性のある焦点検出結果としてLP3が得られ、垂直方向の焦点評価値E_vから信頼性のある焦点検出結果としてLP1が得られた場合を示している。LP1とLP3とが大きく異なっているため遠近競合状態であると判定され、より至近側の焦点検出結果である水平方向の焦点検出結果LP3がS104で選択される。   FIG. 8B is a diagram showing an example of the relationship between the position of the focus lens 104 in the selected focus detection area and the focus evaluation value. Curves E_h and E_v in the figure indicate changes in the horizontal focus evaluation value and the vertical focus evaluation value detected by the contrast AF. Also, LP1, LP2, and LP3 indicate the focus lens positions, respectively. In FIG. 8B, LP3 is obtained as the reliable focus detection result from the horizontal focus evaluation value E_h, and LP1 is obtained as the reliable focus detection result from the vertical focus evaluation value E_v. Is shown. Since LP1 and LP3 are largely different, it is determined to be in the near and far conflict state, and the focus detection result LP3 in the horizontal direction, which is the focus detection result closer to the near side, is selected in S104.

このような状況で、S105でカメラMPU125は、選択されている水平方向の焦点検出結果LP3近傍に、垂直方向の焦点検出結果が存在しないか否かを判定する。図8(b)のような状況ではLP2が存在するため、カメラMPU125は、水平、垂直方向の重み付けが可能であると判定して処理をS106に進め、焦点検出結果LP3の補正値を、焦点検出結果LP2の影響を考慮に入れて算出する。   Under such circumstances, the camera MPU 125 determines in step S105 whether or not there is a vertical focus detection result in the vicinity of the selected horizontal focus detection result LP3. Since LP2 exists in the situation as shown in FIG. 8B, the camera MPU 125 determines that weighting in the horizontal and vertical directions is possible, advances the process to S106, and corrects the focus detection result LP3 with the focus value. It calculates taking into consideration the influence of the detection result LP2.

S100において縦横BP補正情報として図8(a)の1要素であるBP1_Bを取得しており、図8(b)におけるLP3における水平方向の焦点評価値がE_hp、LP2における垂直方向の焦点評価値がE_vpであるとする。この場合、S106でカメラMPU125は、焦点評価値の合計に対する、補正する方向と直交する方向における焦点評価値の割合に基づき、縦横BP補正値BP1を以下の式(2)に従って算出する。
BP1=BP1_B×E_vp/(E_vp+E_hp)×(+1) (2)
In S100, BP1_B which is one element of FIG. 8A is acquired as vertical and horizontal BP correction information, and the focus evaluation value in the horizontal direction in LP3 in FIG. 8B is E_hp, and the focus evaluation value in the vertical direction in LP2 is Suppose that it is E_vp. In this case, in step S106, the camera MPU 125 calculates the vertical and horizontal BP correction value BP1 according to the following equation (2) based on the ratio of the focus evaluation value in the direction orthogonal to the correction direction to the total focus evaluation value.
BP1 = BP1_B × E_vp / (E_vp + E_hp) × (+1) (2)

本実施形態では、水平方向の焦点検出結果に対する補正値を算出するため、式(2)を用いて補正値BP1を算出するが、垂直方向の焦点検出結果を補正する場合には、以下の式(3)で算出することができる。
BP1=BP1_B×E_hp/(E_vp+E_hp)×(−1) (3)
In this embodiment, the correction value BP1 is calculated using equation (2) to calculate the correction value for the focus detection result in the horizontal direction, but when correcting the focus detection result in the vertical direction, the following equation It can be calculated by (3).
BP1 = BP1_B × E_hp / (E_vp + E_hp) × (−1) (3)

S102で水平方向の焦点検出結果と垂直方向の焦点検出結果の差が妥当であると判定された場合、至近側の焦点検出結果が水平方向の検出結果であれば式(2)を、垂直方向の検出結果であれば式(3)を用いて補正値BP1を算出する。   If it is determined in S102 that the difference between the focus detection result in the horizontal direction and the focus detection result in the vertical direction is valid, if the focus detection result on the near side is the detection result in the horizontal direction, If it is the detection result of (1), the correction value BP1 is calculated using the equation (3).

式(2)、式(3)から自明であるように、焦点評価値が大きいという情報を、被写体に含まれるコントラスト情報が多いと判定して、縦横BP補正値(BP1)を算出する。上述の通り、縦横BP補正情報は、
(垂直方向にのみコントラスト情報をもつ被写体の焦点検出位置)−(水平方向にのみコントラスト情報を持つ被写体の焦点検出位置)
である。そのため、水平方向の焦点検出結果を補正する補正値BP1と垂直方向の焦点検出結果を補正する補正値BP1の符号は反対となる。S106の処理を終えるとカメラMPU125は、縦横BP補正値算出処理を終了する。
As is obvious from the equations (2) and (3), the information that the focus evaluation value is large is determined that the contrast information included in the subject is large, and the vertical and horizontal BP correction value (BP1) is calculated. As described above, the vertical and horizontal BP correction information is
(Focus detection position of subject having contrast information only in the vertical direction)-(Focus detection position of subject having contrast information only in the horizontal direction)
It is. 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 camera MPU 125 ends the vertical and horizontal BP correction value calculation process.

一方、選択されている水平方向の焦点検出結果LP3近傍に、垂直方向の焦点検出結果が存在しないとS105で判定された場合、カメラMPU125は処理をS103に進める。S103でカメラMPU125は、被写体に含まれるコントラスト情報が概ね1方向のみであると判断されるため、BP1=0とし、縦横BP補正値算出処理を終了する。   On the other hand, when it is determined in S105 that there is no focus detection result in the vertical direction in the vicinity of the focus detection result LP3 in the horizontal direction selected, the camera MPU 125 advances the process to S103. In step S103, the camera MPU 125 determines that the contrast information included in the subject is only in one direction, and thus sets BP1 = 0, and ends the vertical and horizontal BP correction value calculation process.

このように、本実施形態では、異なる方向における被写体のコントラスト情報に応じて補正値を算出するため、被写体のパターンに応じた高精度な補正値算出を行うことができる。なお、図8(b)では、被写体が遠近競合している場合について説明したが、水平方向と垂直方向に1つずつ極大値が検出されており、片方の焦点検出結果に信頼性が無い場合も、同様の考え方で補正値を算出する。   As described above, in this embodiment, since the correction value is calculated according to the contrast information of the subject in different directions, it is possible to calculate the correction value highly accurately according to the pattern of the subject. Although FIG. 8B illustrates the case in which the subject is in perspective competition, one maximum value is detected in each of the horizontal direction and the vertical direction, and one of the focus detection results is not reliable. Also, the correction value is calculated in the same way.

ただし、S106での補正値算出方法はこれに限らない。例えば、本実施形態の位相差AFのように、水平方向のみ焦点検出が行える場合には、被写体の水平方向と垂直方向のコントラストの情報量は同量であると仮定して、補正値を算出してもよい。その場合には、上述の式(2)、式(3)において、E_hp=E_vp=1を代入することにより補正値を算出することができる。このような処理を行うことにより、補正精度は落ちるが、補正値演算の負荷を減らすことができる。   However, the correction value calculation method in S106 is not limited to this. For example, as in the phase difference AF of this embodiment, when focus detection can be performed only in the horizontal direction, it is assumed that the information amount of the contrast in the horizontal direction and the vertical direction of the object is the same, and the correction value is calculated. You may In that case, the correction value can be calculated by substituting E_hp = E_vp = 1 in the above-mentioned Expression (2) and Expression (3). By performing such processing, although the correction accuracy is lowered, the load of the correction value calculation can be reduced.

上述の説明では、コントラストAFの焦点検出結果に対して説明したが、位相差AFの焦点検出結果に対しても同様の処理を行うことが可能である。補正値算出の際の重み付けの係数として、位相差AFの相関演算で算出される相関量の変化量を用いればよい。これは、被写体の明暗差が大きい場合や明暗差のあるエッジの数が多い場合など、被写体のコントラスト情報が多ければ多いほど、相関量の変化量も大きくなることを利用している。同様の関係が得られる評価値であれば、相関量の変化量に限らず、種々の評価値を用いてよい。   In the above description, the focus detection result of contrast AF is described, but the same processing can be performed on the focus detection result of phase difference AF. The amount of change in the amount of correlation calculated by the correlation calculation of the phase difference AF may be used as a weighting coefficient in calculating the correction value. This utilizes the fact that the amount of change in the amount of correlation increases as the subject's contrast information increases, such as when the subject has a large contrast or a large number of edges with contrast. If it is an evaluation value which can obtain the same relation, various evaluation values may be used without being limited to the change amount of the correlation amount.

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

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

(色BP補正値の算出方法)
次に、図9(a)および図9を用いて、図1のS21で行う色BP補正値(BP2)の算出方法について説明する。図9(a)は、色BP補正値(BP2)の算出処理の詳細を示すフローチャートである。
S200で、カメラMPU125は色BP補正情報を取得する。色BP補正情報は、緑(G)の信号を用いて検出される合焦位置に対する他の色(赤(R)、青(B))の信号を用いて検出される合焦位置の差分情報である。本実施形態において色BP補正情報はレンズユニット100のレンズメモリ118に予め記憶されており、カメラMPU125は、レンズMPU117に要求して取得するものとするが、カメラRAM125bの不揮発性領域に記憶されていてもよい。
(Method of calculating color BP correction value)
Next, a method of calculating the color BP correction value (BP2) performed in S21 of FIG. 1 will be described with reference to FIGS. 9A and 9. FIG. 9A is a flowchart showing details of the calculation process of the color BP correction value (BP2).
At S200, the camera MPU 125 acquires color BP correction information. The color BP correction information is difference information of in-focus positions detected using signals of other colors (red (R) and blue (B)) with respect to the in-focus position detected using the green (G) signal. It is. In the present embodiment, the color BP correction information is stored in advance in the lens memory 118 of the lens unit 100, and the camera MPU 125 requests and acquires the lens MPU 117, but is stored in the nonvolatile area of the camera RAM 125b. May be

分割ゾーン数が多いほど撮影光学系の第1レンズ群101の位置およびフォーカスレンズ104の位置に応じた高精度な補正値が得られる。また、色BP補正情報は、コントラストAF、位相差AFの両方に用いることができる。   As the number of divided zones increases, a highly accurate correction value according to the position of the first lens group 101 of the imaging optical system and the position of the focus lens 104 can be obtained. The color BP correction information can be used for both contrast AF and phase difference AF.

S200でカメラMPU125は、補正対象となっている焦点検出結果に応じたズーム位置、フォーカスレンズ位置に対応した補正値を取得する。
S201でカメラMPU125は、色BP補正値を算出する。S200で、図9(b)の1要素としてBP_R、図9(c)の1要素としてBP_Bを取得している場合、カメラMPU125は、色BP補正値BP2を以下の式(4)に従って算出する。
BP2=K_R×BP_R+K_B×BP_B (4)
In S200, the camera MPU 125 acquires a correction value corresponding to the zoom position and the focus lens position according to the focus detection result to be corrected.
At S201, the camera MPU 125 calculates a color BP correction value. When BP_R as one element in FIG. 9B and BP_B as one element in FIG. 9C are acquired in S200, the camera MPU 125 calculates the color BP correction value BP2 according to the following equation (4) .
BP2 = K_R × BP_R + K_B × BP_B (4)

ここで、K_RおよびK_Bは、各色の補正情報に対する係数である。被写体に含まれる緑(G)情報に対する赤(R)や青(B)の情報の大小関係と相関がある値で、赤い色を多く含む被写体に対しては、K_Rが大きな値を取り、青い色を多く含む被写体に対しては、K_Bが大きな値を取る。緑色を多く含む被写体に対しては、K_R、K_B共に小さい値を取る。K_R、K_Bは、被写体として代表的な分光情報に基づき、予め設定しておけばよい。被写体の分光情報を検出できる場合には、被写体の分光情報に応じてK_R、K_Bを設定すればよい。S202で色BP補正値の算出を終えると、カメラMPU125は、色BP補正値算出処理を終了する。   Here, K_R and K_B are coefficients for correction information of each color. This value has a correlation with the magnitude relationship of red (R) and blue (B) information to green (G) information contained in the subject, and K_R takes a large value and is blue for subjects containing a large amount of red color. K_B takes a large value for an object containing many colors. For an object containing a large amount 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 a subject. If spectral information of the subject can be detected, 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 completed in S202, the camera MPU 125 ends the color BP correction value calculation process.

なお、本実施形態では、補正値を図8(a)や図9のように焦点検出領域ごとにテーブル形式で記憶するものとしたが、補正値の記憶方法については、これに限らない。例えば、撮像素子と撮影光学系の光軸との交点を原点とし、撮像装置の水平方向、垂直方向をX軸、Y軸とした座標を設定し、焦点検出領域の中心座標における補正値をXとYの関数で求めてもよい。この場合、焦点検出補正値として記憶すべき情報量を削減することができる。   In the present embodiment, correction values are stored in the form of a table for each focus detection area as shown in FIG. 8A and FIG. 9, but the storage method of the correction values is not limited to this. For example, with the intersection of the imaging element and the optical axis of the imaging optical system as the origin, the horizontal and vertical directions of the imaging device are set as the X and Y axes, and the correction value at the center coordinate of the focus detection area is X It may be obtained by the function of and Y. In this case, the amount of information to be stored as the focus detection correction value can be reduced.

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

(空間周波数BP補正値の算出方法)
次に、図10(a)から図10(c)を用いて、図1のS22で行う空間周波数BP補正値(BP3)の算出方法について説明する。図10(a)は、空間周波数BP補正値(BP3)の算出処理の詳細を示すフローチャートである。
S300で、カメラMPU125は空間周波数BP補正情報を取得する。空間周波数BP補正情報は、被写体の空間周波数ごとの撮影光学系の結像位置に関する情報である。本実施形態において空間周波数BP補正情報はレンズユニット100のレンズメモリ118に予め記憶されており、カメラMPU125は、レンズMPU117に要求して取得するものとするが、カメラRAM125bの不揮発性領域に記憶されていてもよい。
(Method of calculating spatial frequency BP correction value)
Next, a method of calculating the spatial frequency BP correction value (BP3) performed in S22 of FIG. 1 will be described with reference to FIGS. 10 (a) to 10 (c). FIG. 10A is a flowchart showing details of the process of calculating the spatial frequency BP correction value (BP3).
At S300, the camera MPU 125 acquires spatial frequency BP correction information. The spatial frequency BP correction information is information on the imaging position of the imaging optical system for each spatial frequency of the subject. In the present embodiment, the spatial frequency BP correction information is stored in advance in the lens memory 118 of the lens unit 100, and the camera MPU 125 requests and acquires the lens MPU 117, but is stored in the nonvolatile area of the camera RAM 125b. It may be

撮影光学系のデフォーカスMTF(Modulation Transfer Function)を示す図10(b)を用いて、空間周波数BP補正情報の例を説明する。図10(b)の横軸はフォーカスレンズ104の位置を、縦軸はMTFの強度を示している。図10(b)に描かれている4種の曲線は、空間周波数ごとのMTF曲線で、MTF1、MTF2、MTF3、MTF4の順に、空間周波数が低い方から高い方に変化した場合を示している。空間周波数F1(lp/mm)のMTF曲線がMTF1と対応し、同様に、空間周波数F2,F3,F4(lp/mm)とMTF2、MTF3、MTF4が対応する。また、LP4、LP5、LP6、LP7は、各デフォーカスMTF曲線の極大値に対応するフォーカスレンズ104位置を示している。なお、記憶されている空間周波数BP補正情報は図10(b)の曲線を離散的にサンプリングしたものである。一例として本実施形態では、1つのMTF曲線に対して10個のフォーカスレンズ位置に対してMTFデータがサンプリングされており、例えば、MTF1に対しては、MTF1(n)(1≦n≦10)として10個のデータを記憶している。   An example of the spatial frequency BP correction information will be described with reference to FIG. 10B showing a defocusing MTF (Modulation Transfer Function) of the photographing optical system. The horizontal axis of FIG. 10B 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. 10 (b) are MTF curves for each spatial frequency, showing the case where the spatial frequency changes from low to high in order of MTF1, MTF2, MTF3 and MTF4. . The MTF curve of the spatial frequency F1 (lp / mm) corresponds to the MTF1, and similarly, the spatial frequencies F2, F3 and F4 (lp / mm) correspond to the MTF2, MTF3 and MTF4. Also, LP4, LP5, LP6, and LP7 indicate the position of the focus lens 104 corresponding to the maximum value of each defocus MTF curve. The stored spatial frequency BP correction information is obtained by discretely sampling the curve of FIG. As an example, in the present embodiment, MTF data is sampled for ten focus lens positions for one MTF curve. For example, MTF 1 (n) (1 ≦ n ≦ 10) for MTF 1 It stores 10 data as.

空間周波数BP補正情報は、縦横BP補正情報や色BP補正情報と同様、焦点検出領域の位置ごとに撮影光学系のズーム位置(画角)とフォーカスレンズ位置(合焦距離)を8つのゾーンに分割し、ゾーンごとに記憶する。分割ゾーン数が多いほど撮影光学系の第1レンズ群101の位置およびフォーカスレンズ104の位置に応じた高精度な補正値が得られる。また、空間周波数BP補正情報は、コントラストAF、位相差AFの両方に用いることができる。   The spatial frequency BP correction information, like the vertical and horizontal BP correction information and the color BP correction information, sets the zoom position (field angle) of the photographing optical system and the focus lens position (focus distance) to eight zones for each position of the focus detection area. Divide and store for each zone. As the number of divided zones increases, a highly accurate correction value according to the position of the first lens group 101 of the imaging optical system and the position of the focus lens 104 can be obtained. Also, spatial frequency BP correction information can be used for both contrast AF and phase difference AF.

S300でカメラMPU125は、補正対象となっている焦点検出結果に応じたズーム位置、フォーカスレンズ位置に対応した補正値を取得する。
S301でカメラMPU125は、補正対象となっている焦点検出領域において、コントラストAFや位相差AFを行う際に用いられる信号の帯域を算出する。本実施形態でカメラMPU125は、被写体、撮影光学系、撮像素子のサンプリング周波数、評価に用いるデジタルフィルタの影響を鑑みて、AF評価帯域を算出する。AF評価帯域の算出方法は、後述する。
In S300, the camera MPU 125 acquires the zoom position and the correction value corresponding to the focus lens position according to the focus detection result to be corrected.
In S301, the camera MPU 125 calculates a band of a signal used when performing contrast AF or phase difference AF in the focus detection area to be corrected. In the present embodiment, the camera MPU 125 calculates the AF evaluation band in consideration of the subject, the imaging optical system, the sampling frequency of the imaging device, and the digital filter used for evaluation. The method of calculating the AF evaluation band will be described later.

次に、S302でカメラMPU125は、撮影画像に用いられる信号の帯域を算出する。S302のAF評価帯域の算出と同様にカメラMPU125は、被写体、撮影光学系、および撮像素子の周波数特性、撮影画像の鑑賞者の評価帯域の影響を鑑みて、撮影画像評価帯域を算出する。   Next, in step S302, the camera MPU 125 calculates a band of a signal used for a captured image. Similar to the calculation of the AF evaluation band in S302, the camera MPU 125 calculates a photographed image evaluation band in consideration of the subject, the imaging optical system, the frequency characteristics of the imaging device, and the evaluation band of the viewer of the photographed image.

図11を用いて、S301、S302で行うAF評価帯域(第2の評価帯域)、撮影画像評価帯域(第1の評価帯域)の算出について説明する。図11は、いずれも空間周波数ごとの強度を示しており、横軸に空間周波数、縦軸に強度を示している。
図11(a)は、被写体の空間周波数特性(I)を示している。横軸上のF1、F2,F3、F4は、図10(b)のMTF曲線(MTF1〜MTF4)と対応した空間周波数である。また、Nqは、撮像素子122の画素ピッチによりきまるナイキスト周波数を示している。F1からF4とNqについては、以後説明する図11(b)から図11(f)にも同様に示している。本実施形態では、被写体の空間周波数特性(I)は、事前に記憶した代表値を用いる。図11(a)では、被写体の空間周波数特性(I)は連続した曲線で描かれているが、空間周波数F1,F2,F3,F4に対応した離散値I(n)(1≦n≦4)を有する。
The calculation of the AF evaluation band (second evaluation band) and the captured image evaluation band (first evaluation band) performed in S301 and S302 will be described using FIG. FIG. 11 shows the intensity for each spatial frequency, and the horizontal axis shows the spatial frequency and the vertical axis shows the intensity.
FIG. 11A 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. 10 (b). Further, Nq indicates the Nyquist frequency determined by the pixel pitch of the imaging element 122. F1 to F4 and Nq are similarly shown in FIGS. 11 (b) to 11 (f) described later. In the present embodiment, the spatial frequency characteristic (I) of the subject uses a representative value stored in advance. In FIG. 11A, the spatial frequency characteristic (I) of the object is drawn as a continuous curve, but discrete values I (n) (1 ≦ n ≦ 4) corresponding to the spatial frequencies F1, F2, F3 and F4. ).

また、本実施形態では、被写体の空間周波数特性として予め記憶された代表値を用いたが、焦点検出を行う被写体に応じて、用いる被写体の空間周波数特性を変更してもよい。撮影した画像信号にFFT処理などを適用することにより、被写体の空間周波数情報(パワースペクトル)を得ることができる。この場合、演算処理が増加するが、実際に焦点検出する被写体に応じた補正値を算出できるため、高精度な焦点検出が可能となる。また、より簡易的に、被写体のコントラスト情報の大小によって、予め記憶された数種の空間周波数特性を使い分けてもよい。   Further, in the present embodiment, the representative value stored in advance is used as the spatial frequency characteristic of the subject, but the spatial frequency characteristic of the subject to be used may be changed according to the subject on which the focus detection is performed. By applying FFT processing or the like to the captured image signal, spatial frequency information (power spectrum) of the subject can be obtained. In this case, although the arithmetic processing increases, since it is possible to calculate the correction value according to the subject for which the focus is actually detected, it is possible to perform focus detection with high accuracy. Also, more simply, several kinds of spatial frequency characteristics stored in advance may be used properly depending on the magnitude of the contrast information of the subject.

図11(b)は、撮影光学系の空間周波数特性(O)である。この情報は、レンズMPU117を通じて得てもよいし、カメラ内のRAM125bに記憶しておいてもよい。記憶する情報は、デフォーカス状態ごとの空間周波数特性でもよいし、合焦時の空間周波数特性のみでもよい。空間周波数BP補正値は合焦近傍で算出するため、合焦時の空間周波数特性を用いれば、高精度に補正を行うことができる。ただし、演算負荷は増えるものの、デフォーカス状態ごとの空間周波数特性を用いると、より高精度に焦点調節を行うことができる。どのデフォーカス状態の空間周波数特性を用いるかについては、位相差AFにより得られるデフォーカス量を用いて選択すればよい。
図11(b)で撮影光学系の空間周波数特性(O)は連続した曲線で描かれているが、空間周波数F1,F2,F3,F4に対応した離散値O(n)(1≦n≦4)を有する。
FIG. 11B shows the spatial frequency characteristic (O) of the photographing optical system. This information may be obtained through the lens MPU 117 or may be stored in the RAM 125 b in the camera. Information to be stored may be spatial frequency characteristics for each defocus state, or may be only spatial frequency characteristics 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 in-focus state. However, although the calculation load increases, if the spatial frequency characteristic for each defocus state is used, focusing can be performed with higher accuracy. What defocus state spatial frequency characteristic is to be used may be selected using the defocus amount obtained by phase difference AF.
The spatial frequency characteristic (O) of the photographing optical system is drawn as a continuous curve in FIG. 11B, but discrete values O (n) (1 ≦ n ≦) corresponding to the spatial frequencies F1, F2, F3, and F4. 4).

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

図11(d)は、信号生成による空間周波数特性(M1,M2)である。上述の通り、本実施形態の撮像素子は2種類の読み出しモードを有する。第1の読み出しモード、すなわち全画素読み出しモードでは、M1として示すように、信号生成時に空間周波数特性が変わることはない。一方で、第2の読み出しモード、すなわち間引き読み出しモードの際には、M2で示すように信号生成時に空間周波数特性が変わる。上述の通り、X方向の間引きの際に信号の加算を行いS/Nの改善を図るため、加算によるローパス効果が発生する。図11(d)のM2は、第2の読み出しモードの際の信号生成時の空間周波数特性を示している。ここでは、間引きの影響は加味せず、加算によるローパス効果を示している。
図11(d)では、信号生成による空間周波数特性(M1,M2)が連続した曲線で描かれているが、空間周波数F1,F2,F3,F4に対応した離散値M1(n),M2(n)(1≦n≦4)を有する。
FIG. 11D shows spatial frequency characteristics (M1, M2) by signal generation. As described above, the imaging device of the present embodiment has two types of readout modes. In the first readout mode, that is, the all-pixel readout mode, the spatial frequency characteristic does not change at the time of signal generation, as indicated by M1. On the other hand, in the second readout mode, that is, in the thinning readout mode, the spatial frequency characteristics change at the time of signal generation as indicated by M2. As described above, in order to improve the S / N by adding signals during thinning in the X direction, a low pass effect due to the addition is generated. M2 in FIG. 11D indicates the spatial frequency characteristics at the time of signal generation in the second readout mode. Here, the effect of thinning is not taken into consideration, and a low pass effect by addition is shown.
In FIG. 11 (d), the spatial frequency characteristics (M1, M2) due to signal generation are drawn as continuous curves, but discrete values M1 (n), M2 (M1) corresponding to the spatial frequencies F1, F2, F3, F4. n) (1 ≦ n ≦ 4).

図11(e)は、撮影画像を鑑賞する際の空間周波数ごとの感度を示す空間周波数特性(D1)とAF評価信号の処理時に用いるデジタルフィルタの空間周波数特性(D2)を示している。撮影画像を鑑賞する際の空間周波数ごとの感度は、鑑賞者の個人差や、画像サイズや鑑賞距離、明るさなどの鑑賞環境などにより影響を受ける。本実施形態では、代表的な値として、鑑賞時の空間周波数ごとの感度を設定し、記憶している。   FIG. 11E shows a spatial frequency characteristic (D1) indicating sensitivity for each spatial frequency when viewing a captured image and a spatial frequency characteristic (D2) of a digital filter used when processing an AF evaluation signal. The sensitivity for each spatial frequency when viewing a captured image is affected by the viewer's individual differences and the viewing environment such as the image size, viewing distance, and brightness. In the present embodiment, the sensitivity for each spatial frequency at the time of viewing is set and stored as a representative value.

一方で、第2の読み出しモードの際には、間引きの影響で、信号の周波数成分の折り返しノイズ(エイリアシング)が発生する。その影響を加味して、デジタルフィルタの空間周波数特性を示したのがD2である。
図11(e)では、鑑賞時の空間周波数特性(D1)とデジタルフィルタの空間周波数特性(D2)は、曲線で描かれているが、空間周波数F1,F2,F3,F4に対応した離散値D1(n)、D2(n)(1≦n≦4)を有する。
On the other hand, in the second read mode, aliasing noise (aliasing) of the frequency component of the signal occurs due to the influence of thinning. D2 shows the spatial frequency characteristics of the digital filter in consideration of the influence.
In FIG. 11E, the spatial frequency characteristic (D1) at the time of viewing and the spatial frequency characteristic (D2) of the digital filter are drawn by curves, but discrete values corresponding to the spatial frequencies F1, F2, F3, and F4 It has D1 (n) and D2 (n) (1 ≦ n ≦ 4).

以上のように、種々の情報を、カメラ、レンズのいずれかに記憶しておくことにより、カメラMPU125は撮影画像の評価帯域W1やAF評価帯域W2を以下の式(5),(6)に基づいて算出する。
W1(n)=I(n)×O(n)×L(n)×M1(n)×D1(n)(1≦n≦4) (5)
W2(n)=I(n)×O(n)×L(n)×M2(n)×D2(n)(1≦n≦4) (6)
As described above, by storing various information in either the camera or the lens, the camera MPU 125 sets the evaluation band W1 of the photographed image and the AF evaluation band W2 to the following formulas (5) and (6). Calculate based on.
W1 (n) = I (n) × O (n) × L (n) × M1 (n) × D1 (n) (1 ≦ n ≦ 4) (5)
W2 (n) = I (n) × O (n) × L (n) × M 2 (n) × D 2 (n) (1 ≦ n ≦ 4) (6)

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

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

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

図11では、説明を簡易にするため、4つの空間周波数(F1〜F4)に対応する離散値を用いて説明した。しかし、データを有する空間周波数の数は、多いほど、撮影画像やAFの評価帯域の空間周波数特性を正確に再現することができ、精度のよい補正値の算出を行うことができる。一方で、重みづけを行う空間周波数を少なくすることにより、演算量の低減を行うことができる。撮影画像の評価帯域とAF評価帯域の空間周波数特性を代表する空間周波数を各々1つずつ持ち、以後の演算を行ってもよい。   In FIG. 11, in order to simplify the description, the description has been made using discrete values corresponding to four spatial frequencies (F1 to F4). However, as the number of spatial frequencies having data increases, the spatial frequency characteristics of the evaluation image of the captured image and the AF can be more accurately reproduced, and the correction value can be calculated with high accuracy. On the other hand, the amount of computation can be reduced by reducing the spatial frequency to be weighted. One spatial frequency representing the spatial frequency characteristics of the evaluation band of the photographed image and the AF evaluation band may be provided, and the subsequent calculation may be performed.

図10(a)に戻り、S303でカメラMPU125は、空間周波数BP補正値(BP3)を算出する。空間周波数BP補正値の算出を行うに際しカメラMPU125は、まず、撮影画像のデフォーカスMTF(C1)と焦点検出信号のデフォーカスMTF(C2)を算出する。第1および第2の結像位置情報であるC1,C2は、S300で得たデフォーカスMTF情報と、S301、S302で得た評価帯域W1,W2を用いて、以下の式(7)および式(8)に従って算出する(1≦n≦10)。
C1(n)=MTF1(n)×W1(1)+MTF2(n)×W1(2)+MTF3(n)×W1(3)+MTF4(n)×W1(4) (7)
C2(n)=MTF1(n)×W2(1)+MTF2(n)×W2(2)+MTF3(n)×W2(3)+MTF4(n)×W2(4) (8)
Referring back to FIG. 10A, the camera MPU 125 calculates a spatial frequency BP correction value (BP3) in S303. When calculating the spatial frequency BP correction value, the camera MPU 125 first calculates the defocus MTF (C1) of the photographed image and the defocus MTF (C2) of the focus detection signal. The first and second imaging position information C1 and C2 are expressed by the following equations (7) and (5) using the defocus MTF information obtained in S300 and the evaluation bands W1 and W2 obtained in S301 and S302. Calculated according to (8) (1 ≦ n ≦ 10).
C1 (n) = MTF1 (n) × W1 (1) + MTF2 (n) × W1 (2) + MTF 3 (n) × W1 (3) + MTF 4 (n) × W1 (4) (7)
C2 (n) = MTF1 (n) × W2 (1) + MTF2 (n) × W2 (2) + MTF 3 (n) × W2 (3) + MTF 4 (n) × W2 (4) (8)

このように、図10(b)で示した空間周波数ごとのデフォーカスMTF情報を、S301、S302で算出した撮影画像やAFの評価帯域の重みづけに基づいて加算し、撮影画像のデフォーカスMTF(C1)とAFのデフォーカスMTF(C2)を得る。ここでの重み付け加算を行う際に使用するデフォーカスMTFは、各空間周波数(MTF1からMTF4)の最大値で正規化してから使用しても良い。デフォーカスMTFは一般的に、図10(b)に示すように空間周波数に応じて最大値が異なる。従って、同じ重みで加重加算した場合、図10(b)の例ではMTF1の影響が強くなってしまう。そのため、空間周波数ごとのデフォーカスMTFは、最大値で規格化した値を用いて加重加算することができる。   Thus, defocus MTF information for each spatial frequency shown in FIG. 10B is added based on the weighting of the evaluation band of the captured image or AF calculated in S301 and S302, and the defocus MTF of the captured image is added. The defocus MTF (C2) of (C1) and AF is obtained. The defocus MTF used when performing weighted addition here may be used after being normalized with the maximum value of each spatial frequency (MTF1 to MTF4). The defocus MTF generally differs in maximum value according to the spatial frequency as shown in FIG. 10 (b). Therefore, when weighted addition is performed with the same weight, the influence of MTF 1 becomes strong in the example of FIG. Therefore, the defocus MTF for each spatial frequency can be weighted and added using a value standardized at the maximum value.

図10(c)に、得られた2つのデフォーカスMTFであるC1,C2を示している。横軸はフォーカスレンズ104の位置で、縦軸は、空間周波数毎に重み付け加算されたMTFの値となっている。カメラMPU125は、各々のMTF曲線の極大値位置を検出する。曲線C1の極大値と対応するフォーカスレンズ104の位置としてP_img(第1の結像位置)が検出される。曲線C2の極大値と対応するフォーカスレンズ104の位置としてP_AF(第2の結像位置)が検出される。   FIG. 10C shows two obtained defocus MTFs C1 and C2. The horizontal axis is the position of the focus lens 104, and the vertical axis is the value of MTF weighted and added for each spatial frequency. The camera MPU 125 detects the maximum value position of each MTF curve. 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 image forming position) is detected as the position of the focus lens 104 corresponding to the maximum value of the curve C2.

S303でカメラMPU125は、空間周波数BP補正値(BP3)を以下の式(9)により算出する。
BP3=P_AF−P_img (9)
式(9)により、撮影画像の合焦位置とAFで検出される合焦位置の間で発生しうる誤差を補正するための補正値を算出することができる。
At S303, the camera MPU 125 calculates the spatial frequency BP correction value (BP3) by the following equation (9).
BP3 = P_AF−P_img (9)
By the equation (9), it is possible to calculate a correction value for correcting an error that may occur between the in-focus position of the captured image and the in-focus position detected by the AF.

上述したように撮影画像の合焦位置は、被写体、撮影光学系、および光学ローパスフィルタのそれぞれの空間周波数特性、信号生成時の空間周波数特性、鑑賞時の周波数ごとの感度を示す空間周波数特性や、撮影画像に施される画像処理などによって変化する。本実施形態では、撮影画像の生成過程に遡って空間周波数特性を算出することにより、高精度に撮影画像の合焦位置を算出することができる。例えば、撮影画像の記録サイズや、画像処理で行われる超解像処理、シャープネスなどによって、撮影画像の合焦位置を変更する。また、撮影画像の記録後に、どの程度の画像サイズや拡大率で鑑賞されるかや鑑賞する際の鑑賞距離などは、鑑賞者の評価帯域に影響を与える。そして、画像サイズが大きくなるほど、また、鑑賞距離が短くなるほど、鑑賞者の評価帯域を高周波成分に重きを置いた特性とすることで、撮影画像の合焦位置も変更される。   As described above, the in-focus position of the captured image is the spatial frequency characteristics of the subject, the imaging optical system, and the optical low pass filter, the spatial frequency characteristics at the time of signal generation, and the spatial frequency characteristics , It changes with the image processing etc. which are given to a photography picture. In the present embodiment, the in-focus position of the captured image can be calculated with high accuracy by calculating the spatial frequency characteristics retroactively to the process of generating the captured image. For example, the in-focus position of the captured image is changed according to the recording size of the captured image, super-resolution processing performed in image processing, sharpness, and the like. In addition, after recording the photographed image, how much the image size and the enlargement rate are to be viewed, the viewing distance at the time of watching and the like affect the evaluation band of the viewer. Then, as the image size becomes larger and as the viewing distance becomes shorter, by setting the evaluation band of the appreciator to a characteristic with emphasis on high frequency components, the in-focus position of the photographed image is also changed.

一方で、AFが検出する合焦位置も同様に、被写体、撮影光学系、および光学ローパスフィルタそれぞれの空間周波数特性、信号生成時の空間周波数特性、AF評価に用いるデジタルフィルタ空間周波数特性などにより変化する。本実施形態では、AFに用いられる信号が生成される過程に遡って空間周波数特性を算出することにより、高精度にAFが検出する合焦位置を算出することができる。例えば、第1の読み出しモードでAFを行う際にも柔軟に対応できる。その場合には、信号生成時の空間周波数特性を、第1の読み出しモードに対応した特性に変更して、重みづけ係数を算出すればよい。   On the other hand, the in-focus position detected by the AF also varies with the spatial frequency characteristics of the subject, the imaging optical system, and the optical low-pass filter, the spatial frequency characteristics at the time of signal generation, the digital filter spatial frequency characteristics used for AF evaluation, etc. Do. In the present embodiment, the in-focus position detected by the AF can be calculated with high accuracy by calculating the spatial frequency characteristic retroactively to the process of generating the signal used for the AF. For example, it is possible to flexibly cope with AF in the first read mode. In that case, the weighting factor may be calculated by changing the spatial frequency characteristic at the time of signal generation to the characteristic corresponding to the first readout mode.

また、本実施形態で説明した撮像装置は、レンズ交換式一眼レフカメラであるため、レンズユニット100の交換が可能である。レンズユニット100が交換された場合、レンズMPU117は各空間周波数に対応したデフォーカスMTF情報を、カメラ本体120に送信する。そして、カメラMPU125が、撮影画像の合焦位置やAFが検出する合焦位置を算出するので、交換レンズ毎に高精度な補正値の算出を行うことができる。レンズユニット100は、デフォーカスMTF情報だけでなく、撮影光学系の空間周波数特性などの情報もカメラ本体120に送信してもよい。その情報の活用方法は、上述のとおりである。   Further, since the imaging device described in the present embodiment is a lens interchangeable single-lens reflex camera, the lens unit 100 can be replaced. When the lens unit 100 is replaced, the lens MPU 117 transmits defocus MTF information corresponding to each spatial frequency to the camera body 120. Then, since the camera MPU 125 calculates the in-focus position of the photographed image and the in-focus position detected by the AF, it is possible to calculate the correction value with high accuracy for each interchangeable lens. The lens unit 100 may transmit not only defocus MTF information but also information such as spatial frequency characteristics of the photographing optical system to the camera body 120. The method of utilizing 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, the correction value is calculated according to the characteristics of the camera body 120, so that correction can be performed with high accuracy.

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

本実施形態では、焦点検出に用いる信号の特性(縦横、色、空間周波数帯域)に着目して、AF用の補正値を算出している。そのため、AFの方式によらず、同様の方法で、補正値の算出を行うことができる。AF方式毎に、補正方法、補正に用いるデータを有する必要がないため、データの記憶容量、演算負荷の低減を行うことができる。   In the present embodiment, the correction value for AF is calculated paying attention to the characteristics (longitudinal, 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.

●(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第1の実施形態との主な違いは、空間周波数BP補正値の算出方法が異なる点である。第1の実施形態では、撮影光学系の空間周波数ごとの特性を表す値としてデフォーカスMTF情報を用いた。しかしながら、デフォーカスMTF情報は、データ量が多く、記憶容量、演算負荷が大きくなるため、第2の実施形態では、デフォーカスMTFの極大値情報を用いて空間周波数BP補正値を算出する。これにより、レンズメモリ118もしくはRAM125bの容量を節約し、レンズ−カメラ間の通信量の低減、カメラMPU125で行う演算負荷の低減などが実現できる。
Second Embodiment
Next, a second embodiment of the present invention will be described. The main difference from the first embodiment is that the method of calculating 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 spatial frequency of the imaging optical system. However, the defocus MTF information has a large amount of data, and the storage capacity and calculation load become large. Therefore, in the second embodiment, the spatial frequency BP correction value is calculated using the maximum value information of the defocus MTF. As a result, the capacity of the lens memory 118 or the RAM 125 b can be saved, and the amount of communication between the lens and the camera can be reduced, and the calculation load performed by the camera MPU 125 can be reduced.

なお、撮像装置のブロック図(図2)、各焦点検出方式の説明図(図3(a)から5)、焦点検出領域の説明図(図6)、焦点検出処理および各種BP補正値算出処理のフローチャート(図1、図7、図9(a))は、本実施形態においても流用する。また、空間周波数BP補正値算出処理のフローチャート(図10(a))および各評価帯域の説明図(図11)についても流用する。   Note that a block diagram of the imaging apparatus (FIG. 2), explanatory views of respective focus detection methods (FIGS. 3A to 5), an explanatory view of focus detection areas (FIG. 6), focus detection processing and various BP correction value calculation processing The flowcharts of (1), (7) and (9 (a)) are also used in the present embodiment. The flowchart of the spatial frequency BP correction value calculation process (FIG. 10A) and the explanatory diagram of each evaluation band (FIG. 11) are also used.

本実施形態における空間周波数BP補正値(BP3)の算出方法を、図12を用いて説明する。
S300でカメラMPU125は空間周波数BP補正情報を取得する。
A method of calculating the spatial frequency BP correction value (BP3) in the present embodiment will be described with reference to FIG.
In S300, the camera MPU 125 acquires spatial frequency BP correction information.

図12は、撮影光学系の特性である空間周波数ごとのデフォーカスMTFの極大値を示すフォーカスレンズ104位置を示している。図10(b)に示した離散的な空間周波数F1からF4について、デフォーカスMTFがピーク(極大値)となるフォーカスレンズ位置LP4、LP5、LP6、LP7が縦軸に示されている。本実施形態では、このLP4〜LP7を、MTF_P(n)(1≦n≦4)としてレンズメモリ118またはRAM125bに記憶する。記憶されている情報が、焦点検出領域の位置、ズーム位置やフォーカスレンズ位置に対応していることは、第1の実施形態と同様である。   FIG. 12 shows the position of the focus lens 104 that indicates the maximum value of the defocus MTF for each spatial frequency, which is a characteristic of the imaging optical system. Focus lens positions LP4, LP5, LP6, and LP7 at which the defocus MTF reaches a peak (maximum value) are shown on the vertical axis for discrete spatial frequencies F1 to F4 shown in FIG. 10B. In this embodiment, the LP4 to LP7 are stored in the lens memory 118 or the RAM 125 b as MTF_P (n) (1 ≦ n ≦ 4). It is the same as the first embodiment that the stored information corresponds to the position of the focus detection area, the zoom position, and the focus lens position.

第2の実施形態では、図10(a)に示した空間周波数BP補正値処理のS300で、カメラMPU125は、補正対象となっている焦点検出結果に応じたズーム位置、フォーカスレンズ位置に対応した補正値を取得する。
S301、S302でカメラMPU125は、第1の実施形態と同様の処理を行う。
In the second embodiment, at S300 of the spatial frequency BP correction value processing shown in FIG. 10A, the camera MPU 125 corresponds to the zoom position and the focus lens position according to the focus detection result to be corrected. Get correction value.
In steps S301 and S302, the camera MPU 125 performs the same processing as that in the first embodiment.

S303でカメラMPU125は、空間周波数BP補正値(BP3)を算出する。空間周波数BP補正値の算出を行うに際し、カメラMPU125はまず、撮影画像の合焦位置(P_img)とAFが検出する合焦位置(P_AF)を、以下の式(10)および(11)に従って算出する。算出には、S300で得たデフォーカスMTF情報MTF_P(n)と、S301、S302で得た評価帯域W1,W2を用いる。
P_img=MTF_P(1)×W1(1)+MTF_P(2)×W1(2)+MTF_P(3)×W1(3)+MTF_P(4)×W1(4) (10)
P_AF=MTF_P(1)×W2(1)+MTF_P(2)×W2(2)+MTF_P(3)×W2(3)+MTF_P(4)×W2(4) (11)
At S303, the camera MPU 125 calculates a spatial frequency BP correction value (BP3). When calculating the spatial frequency BP correction value, the camera MPU 125 first calculates the in-focus position (P_img) of the captured image and the in-focus position (P_AF) detected by the AF according to the following equations (10) and (11) Do. The defocus MTF information MTF_P (n) obtained in S300 and the evaluation bands W1 and W2 obtained in S301 and S302 are used for the calculation.
P_img = MTF_P (1) × W1 (1) + MTF_P (2) × W1 (2) + MTF_P (3) × W1 (3) + MTF_P (4) × W1 (4) (10)
P_AF = MTF_P (1) × W2 (1) + MTF_P (2) × W2 (2) + MTF_P (3) × W2 (3) + MTF_P (4) × W2 (4) (11)

つまり、図12で示した空間周波数ごとのデフォーカスMTFの極大値情報MTF_P(n)を、S301、S302で算出した撮影画像やAFの評価帯域W1,W2で重みづけ加算する。それにより、撮影画像の合焦位置(P_img)とAFが検出する合焦位置(P_AF)を算出している。   That is, the local maximum value information MTF_P (n) of defocus MTF for each spatial frequency shown in FIG. 12 is weighted and added in the evaluation bands W1 and W2 of the photographed image and AF calculated in S301 and S302. Thus, the in-focus position (P_img) of the captured image and the in-focus position (P_AF) detected by the AF are calculated.

次にカメラMPU125は、空間周波数BP補正値(BP3)を、第1の実施形態と同様に、以下の式(9)により算出する。
BP3=P_AF−P_img (9)
Next, the camera MPU 125 calculates the spatial frequency BP correction value (BP3) by the following equation (9), as in the first embodiment.
BP3 = P_AF−P_img (9)

本実施形態では、空間周波数BP補正値をより簡便に算出することができる。本実施形態では、空間周波数BP補正値の精度は第1の実施形態より若干劣るが、空間周波数BP補正値を算出するために記憶しておく情報量の削減、レンズ−カメラ間の通信量の削減、カメラMPU125で行う演算負荷の低減が実現できる。   In the present embodiment, the spatial frequency BP correction value can be calculated more simply. In this embodiment, although the accuracy of the spatial frequency BP correction value is slightly inferior to that of the first embodiment, reduction of the amount of information to be stored for calculating the spatial frequency BP correction value, communication amount between lens and camera The reduction of the calculation load performed by the camera MPU 125 can be realized.

●(第3の実施形態)
次に、本発明の第3の実施形態について説明する。本実施形態も空間周波数BP補正値の算出方法が上述の実施形態と異なる。本実施形態では、空間周波数BP補正値を算出する必要性がない場合には算出しないことにより、空間周波数BP補正値の精度を低下させずに、レンズ−カメラ間の通信量の低減やカメラMPU125で行う演算負荷を低減する。
(Third Embodiment)
Next, a third embodiment of the present invention will be described. Also in the present embodiment, the method of calculating the spatial frequency BP correction value is different from the above-described embodiment. In this embodiment, the spatial frequency BP correction value is not calculated if it is not necessary to reduce the communication amount between the lens and the camera or the camera MPU 125 without reducing the accuracy of the spatial frequency BP correction value. Reduce the computational load to be

なお、撮像装置のブロック図(図2)、各焦点検出方式の説明図(図3(a)から5)、焦点検出領域の説明図(図6)、焦点検出処理および各種BP補正値算出処理のフローチャート(図1、図7、図9(a))は、本実施形態においても流用する。また、空間周波数BP補正値算出処理に関する図(図10(b)〜図10(c))についても流用する。   Note that a block diagram of the imaging apparatus (FIG. 2), explanatory views of respective focus detection methods (FIGS. 3A to 5), an explanatory view of focus detection areas (FIG. 6), focus detection processing and various BP correction value calculation processing The flowcharts of (1), (7) and (9) of FIG. Also, FIGS. 10 (b) to 10 (c) regarding the spatial frequency BP correction value calculation process are also used.

本実施形態における空間周波数BP補正値(BP3)の算出方法を、図13のフローチャートを用いて説明する。図13において、図10(a)と同様の処理は同じ参照数字を付して重複する説明を省略する。   A method of calculating the spatial frequency BP correction value (BP3) in the present embodiment will be described using the flowchart of FIG. In FIG. 13, the same processes as in FIG. 10A are denoted by the same reference numerals, and redundant descriptions will be omitted.

S3000でカメラMPU125は、空間周波数BP補正値を算出する必要があるか否かを判定する。第1の実施形態で説明したことからわかる通り、撮影画像の評価帯域W1とAF評価帯域W2が似ているほど、空間周波数BP補正値は小さくなる。そのため、本実施形態では、2つの評価帯域の差が空間周波数BP補正値を算出する必要がない程度に小さいと判定される場合(例えば差が予め定められた閾値より小さい場合)には、補正値の算出を省略する。   At S3000, the camera MPU 125 determines whether it is necessary to calculate the spatial frequency BP correction value. As understood from the description in the first embodiment, the spatial frequency BP correction value decreases as the evaluation band W1 of the photographed image and the AF evaluation band W2 are similar. Therefore, in the present embodiment, if it is determined that the difference between the two evaluation bands is small to such an extent that it is not necessary to calculate the spatial frequency BP correction value (for example, the difference is smaller than a predetermined threshold) Omit the calculation of the value.

具体的には、2つの評価帯域の差が十分小さくなる条件を満たす場合に、補正値の算出を省略する。例えば、AFに用いる信号も第1の読み出しモードで読み出された信号である場合には、撮影画像の評価帯域とAF評価帯域は等しくなる。さらに、撮影画像を鑑賞する際の空間周波数ごとの感度を示す空間周波数特性と類似の空間周波数特性のデジタルフィルタをAF評価信号の処理時に用いる場合には、鑑賞時の空間周波数特性とデジタルフィルタの空間周波数特性が等しくなる。このような状況は、表示器126に表示する画像を拡大して表示する場合などに発生する。
また、同様に、撮影画像が第2の読み出しモードで読み出された信号で生成される場合にも撮影画像の評価帯域とAF評価帯域が等しくなることが想定される。このような状況は、撮影画像の記録画像サイズを小さく設定している場合などに、発生する。
Specifically, when the condition that the difference between the two evaluation bands is sufficiently small is satisfied, the calculation of the correction value is omitted. For example, if the signal used for AF is also a signal read out in the first readout mode, the evaluation band of the photographed image and the AF evaluation band become equal. Furthermore, when using a digital filter with spatial frequency characteristics similar to the spatial frequency characteristics indicating sensitivity for each spatial frequency when viewing a captured image when processing an AF evaluation signal, the spatial frequency characteristics at the time of viewing and the digital filter Space frequency characteristics become equal. Such a situation occurs, for example, when the image displayed on the display 126 is enlarged and displayed.
Also, similarly, it is assumed that the evaluation band of the photographed image and the AF evaluation band become equal even when the photographed image is generated by the signal read in the second readout mode. Such a situation occurs, for example, when the recording image size of the photographed image is set small.

S3000でカメラMPU125は、このような、予め定められた条件のいずれかが満たされる場合に、補正値の算出が不要と判定し、処理をS3001に進める。
S3001でカメラMPU125は、補正値の算出を行わないため、BP3に0を代入し、空間周波数BP補正値(BP3)の算出処理を終了する。
The camera MPU 125 determines that calculation of the correction value is unnecessary when any of the predetermined conditions is satisfied in S3000, and advances the process to S3001.
Since the camera MPU 125 does not calculate the correction value in S3001, the camera MPU 125 substitutes 0 into BP3 and ends the process of calculating the spatial frequency BP correction value (BP3).

一方、S3000で、補正値の算出が必要であると判定された場合、カメラMPU125は、S300〜S303を第1の実施形態(または第2の実施形態)と同様に実施する。   On the other hand, when it is determined in S3000 that the correction value needs to be calculated, the camera MPU 125 performs S300 to S303 in the same manner as in the first embodiment (or the second embodiment).

このように、本実施形態では、空間周波数BP補正値の算出が不要と判定された場合には補正値の算出を省略するので、補正値の算出用に記憶しておくデータ量は削減できないが、補正値算出時のデータ通信量や演算負荷を低減することができる。なお、第2の実施形態と組み合わせることも可能であり、その場合は補正値の算出用に記憶しておくデータ量の削減はもちろん、補正値算出時のデータ通信量や演算負荷を一層低減することができる。   As described above, in the present embodiment, calculation of the correction value is omitted when it is determined that calculation of the spatial frequency BP correction value is unnecessary, so the amount of data to be stored for calculation of the correction value can not be reduced. The amount of data communication and calculation load at the time of correction value calculation can be reduced. In addition, it is also possible to combine with the second embodiment, in which case the amount of data stored for calculation of the correction value is of course reduced, as well as the amount of data communication and calculation load at the time of calculation of the correction value. be able to.

本実施形態では、空間周波数BP補正値の省略について説明したが、縦横BP補正値や色BP補正値についても不要と判定できれば省略することができる。例えば、焦点検出を垂直方向、水平方向の両方のコントラストを考慮して行う場合は、縦横BP補正値の算出を省略してもよい。また、撮影画像に用いる色信号と、焦点検出に用いる色信号が等しい場合は、色BP補正値の算出を省略してもよい。   In the present embodiment, the omission of the spatial frequency BP correction value has been described, but the vertical / horizontal BP correction value or the color BP correction value can be omitted if it can be determined that it is unnecessary. For example, when focus detection is performed in consideration of the contrast in both the vertical direction and the horizontal direction, calculation of the vertical and horizontal BP correction values may be omitted. Further, when the color signal used for the photographed image and the color signal used for focus detection are equal, the calculation of the color BP correction value may be omitted.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention is also realized by executing the following processing. That is, software (program) for realizing the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU or the like) of the system or apparatus reads the program. It is a process to execute.

100…レンズユニット、104…フォーカスレンズ、113…フォーカスアクチュエータ、117…レンズMPU、118…レンズメモリ、120…カメラ本体、122…撮像素子、125…カメラMPU、129…位相差AF部、130…TVAF部 DESCRIPTION OF SYMBOLS 100 ... Lens unit, 104 ... Focus lens, 113 ... Focus actuator, 117 ... Lens MPU, 118 ... Lens memory, 120 ... Camera main body, 122 ... Image sensor, 125 ... Camera MPU, 129 ... Phase difference AF part, 130 ... TVAF Department

Claims (15)

撮像素子を有する撮像部に着脱可能に構成され、撮影光学系を有するレンズ部であって、
異なる複数の空間周波数についての前記撮影光学系のMTF曲線に関する情報を記憶する記憶手段と、
前記撮像部からの要求に対応して、前記情報を前記撮像部に対して送信する送信手段とを有し、
前記情報は、空間周波数に応じた重み付けがされていないことを特徴とするレンズ部。
A lens unit configured to be attachable to and detachable from an imaging unit having an imaging element, and having a photographing optical system,
Storage means for storing information about MTF curves of the imaging optical system for different spatial frequencies;
Transmission means for transmitting the information to the imaging unit in response to a request from the imaging unit;
The lens unit characterized in that the information is not weighted according to spatial frequency.
前記レンズ部から前記撮像部へ送信された前記情報は、前記撮像部において空間周波数に応じた重み付けが行われることを特徴とする請求項1に記載のレンズ部。   The lens unit according to claim 1, wherein the information transmitted from the lens unit to the imaging unit is weighted according to a spatial frequency in the imaging unit. 前記重み付けは、空間周波数が低いほど、低い重み付けであることを特徴とする請求項2に記載のレンズ部。   The lens unit according to claim 2, wherein the weighting is lower as spatial frequency is lower. 前記重み付けは、空間周波数ごとに最大値で正規化された情報に対して行われることを特徴とする請求項2に記載のレンズ部。   The lens unit according to claim 2, wherein the weighting is performed on information normalized with a maximum value for each spatial frequency. 前記情報は、前記MTF曲線の離散的なサンプルであることを特徴とする請求項1乃至4のいずれか1項に記載のレンズ部。   The lens unit according to any one of claims 1 to 4, wherein the information is a discrete sample of the MTF curve. 前記情報は、前記MTF曲線の極大値に関する情報であることを特徴とする請求項1乃至4のいずれか1項に記載のレンズ部。   The said information is information regarding the maximum value of the said MTF curve, The lens part of any one of the Claims 1 thru | or 4 characterized by the above-mentioned. 前記送信手段は、前記レンズ部に装着されている撮像部が交換されると、新たに装着された撮像部に前記情報が前記撮像部を送信することを特徴とする請求項1乃至6のいずれか1項に記載のレンズ部。   7. The image pickup unit according to claim 1, wherein the transmission unit transmits the image pickup unit to the newly mounted image pickup unit when the image pickup unit mounted on the lens unit is replaced. The lens part according to 1 or 2. 前記送信手段は、前記撮像部による焦点検出処理が行われるたびに、前記情報を前記撮像部に送信されることを特徴とする請求項1乃至6のいずれか1項に記載のレンズ部。   The lens unit according to any one of claims 1 to 6, wherein the transmission unit transmits the information to the imaging unit each time a focus detection process is performed by the imaging unit. 前記撮像部による焦点検出結果を補正するための補正値を算出しないと前記撮像部により判定された場合、前記情報は前記撮像部に送信されないことを特徴とする請求項1乃至8のいずれか1項に記載のレンズ部。   The information according to any one of claims 1 to 8, wherein the information is not transmitted to the imaging unit when the imaging unit determines that the correction value for correcting the focus detection result by the imaging unit is not calculated. The lens part as described in a term. 前記情報は、焦点検出領域の位置に応じた情報であることを特徴とする請求項1乃至9のいずれか1項に記載のレンズ部。   The lens unit according to any one of claims 1 to 9, wherein the information is information according to a position of a focus detection area. 前記情報は、前記レンズ部のズーム位置とフォーカス位置に応じた情報であることを特徴とする請求項1乃至10のいずれか1項に記載のレンズ部。   The lens unit according to any one of claims 1 to 10, wherein the information is information according to a zoom position and a focus position of the lens unit. 前記撮影光学系は、ズーム機能を実現するズームレンズ、光量調節を行う絞り、及び焦点調節を行うフォーカスレンズを備えることを特徴とする請求項1乃至11のいずれか1項に記載のレンズ部。   The lens unit according to any one of claims 1 to 11, wherein the photographing optical system includes a zoom lens for realizing a zoom function, an aperture for adjusting a light amount, and a focus lens for adjusting a focus. 前記送信手段は、前記レンズ部に係る制御を行い、前記撮像部からの要求に対して前記撮像部に情報を送信するレンズMPUであることを特徴とする請求項1乃至12のいずれか1項に記載のレンズ部。   The transmission unit is a lens MPU that performs control related to the lens unit and transmits information to the imaging unit in response to a request from the imaging unit. Lens part described in. 前記レンズMPUは、マウントの信号線を介して前記撮像部と電気的に接続され、前記撮像部からの要求に対して前記情報を前記信号線を介して前記撮像部に送信することを特徴とする請求項13に記載のレンズ部。   The lens MPU is electrically connected to the imaging unit through a signal line of a mount, and transmits the information to the imaging unit through the signal line in response to a request from the imaging unit. The lens part of Claim 13. 撮像素子を有する撮像部に着脱可能に構成され、撮影光学系を有するレンズ部の制御方法であって、
前記レンズ部は、異なる複数の空間周波数についての前記撮影光学系のMTF曲線に関する情報を記憶する記憶手段を有し、
前記制御方法は、前記撮像部からの要求に対応して、前記情報を前記記憶手段から読み出して前記撮像部に対して送信する送信工程を有し、
前記情報は、空間周波数に応じた重み付けがされていないことを特徴とするレンズ部の制御方法。
A control method of a lens unit configured to be attachable to and detachable from an imaging unit having an imaging element and having a photographing optical system,
The lens unit includes storage means for storing information on MTF curves of the imaging optical system for a plurality of different spatial frequencies,
The control method includes a transmitting step of reading the information from the storage unit and transmitting the information to the imaging unit in response to a request from the imaging unit.
The control method of a lens unit, wherein the information is not weighted according to spatial frequency.
JP2019017252A 2019-02-01 2019-02-01 Lens part and its control method Active JP6744933B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019017252A JP6744933B2 (en) 2019-02-01 2019-02-01 Lens part and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019017252A JP6744933B2 (en) 2019-02-01 2019-02-01 Lens part and its control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014138017A Division JP6478496B2 (en) 2014-07-03 2014-07-03 Imaging apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2019091067A true JP2019091067A (en) 2019-06-13
JP6744933B2 JP6744933B2 (en) 2020-08-19

Family

ID=66837375

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019017252A Active JP6744933B2 (en) 2019-02-01 2019-02-01 Lens part and its control method

Country Status (1)

Country Link
JP (1) JP6744933B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020197979A (en) * 2019-06-04 2020-12-10 田中 成典 Three-dimensional model generation device based on three-dimensional point group data

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08327893A (en) * 1995-06-01 1996-12-13 Canon Inc Automatic focus adjustment device
US20030063212A1 (en) * 2001-09-28 2003-04-03 Nikon Corporation Camera
JP2003107332A (en) * 2001-09-28 2003-04-09 Nikon Corp camera
JP2005309323A (en) * 2004-04-26 2005-11-04 Kodak Digital Product Center Japan Ltd Focal length detecting method of imaging, and imaging apparatus
JP2006003417A (en) * 2004-06-15 2006-01-05 Nikon Corp Lens barrel, camera and camera system
JP2006071829A (en) * 2004-08-31 2006-03-16 Fuji Photo Film Co Ltd Image reading apparatus and focusing control method
JP2009175184A (en) * 2008-01-21 2009-08-06 Canon Inc Automatic focus adjustment device and automatic focus adjustment method thereof
JP2013029656A (en) * 2011-07-28 2013-02-07 Sanyo Electric Co Ltd Image pickup apparatus
JP2013171251A (en) * 2012-02-22 2013-09-02 Nikon Corp Focus detection device
JP2013250498A (en) * 2012-06-04 2013-12-12 Canon Inc Manufacturing method of imaging optical system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08327893A (en) * 1995-06-01 1996-12-13 Canon Inc Automatic focus adjustment device
US20030063212A1 (en) * 2001-09-28 2003-04-03 Nikon Corporation Camera
JP2003107332A (en) * 2001-09-28 2003-04-09 Nikon Corp camera
JP2005309323A (en) * 2004-04-26 2005-11-04 Kodak Digital Product Center Japan Ltd Focal length detecting method of imaging, and imaging apparatus
JP2006003417A (en) * 2004-06-15 2006-01-05 Nikon Corp Lens barrel, camera and camera system
JP2006071829A (en) * 2004-08-31 2006-03-16 Fuji Photo Film Co Ltd Image reading apparatus and focusing control method
JP2009175184A (en) * 2008-01-21 2009-08-06 Canon Inc Automatic focus adjustment device and automatic focus adjustment method thereof
JP2013029656A (en) * 2011-07-28 2013-02-07 Sanyo Electric Co Ltd Image pickup apparatus
JP2013171251A (en) * 2012-02-22 2013-09-02 Nikon Corp Focus detection device
JP2013250498A (en) * 2012-06-04 2013-12-12 Canon Inc Manufacturing method of imaging optical system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020197979A (en) * 2019-06-04 2020-12-10 田中 成典 Three-dimensional model generation device based on three-dimensional point group data

Also Published As

Publication number Publication date
JP6744933B2 (en) 2020-08-19

Similar Documents

Publication Publication Date Title
KR102159544B1 (en) Focus detection apparatus, Focus detection method, and Lens unit
JP6478457B2 (en) Focus adjustment device and focus adjustment method
CN109981945B (en) Image pickup optical system
CN105578033B (en) Image capture device and control method of image capture device
CN105430257B (en) Control equipment and control method
JP6682310B2 (en) Focus detection apparatus and method, and imaging apparatus
JP6484004B2 (en) Imaging apparatus and control method thereof, imaging optical system and control method thereof
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
JP6415054B2 (en) Imaging apparatus and imaging method
JP6686191B2 (en) Focus detection device, imaging device, and focus detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200403

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20200529

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200622

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200731

R151 Written notification of patent or utility model registration

Ref document number: 6744933

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151