JP6685769B2 - Information processing device, imaging device, and information processing method - Google Patents

Information processing device, imaging device, and information processing method Download PDF

Info

Publication number
JP6685769B2
JP6685769B2 JP2016036064A JP2016036064A JP6685769B2 JP 6685769 B2 JP6685769 B2 JP 6685769B2 JP 2016036064 A JP2016036064 A JP 2016036064A JP 2016036064 A JP2016036064 A JP 2016036064A JP 6685769 B2 JP6685769 B2 JP 6685769B2
Authority
JP
Japan
Prior art keywords
information
aberration
image
focus detection
optical system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016036064A
Other languages
Japanese (ja)
Other versions
JP2017151380A (en
Inventor
友美 高尾
友美 高尾
優 稲垣
優 稲垣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2016036064A priority Critical patent/JP6685769B2/en
Publication of JP2017151380A publication Critical patent/JP2017151380A/en
Application granted granted Critical
Publication of JP6685769B2 publication Critical patent/JP6685769B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は情報処理装置、撮像装置及び情報処理方法に関する。   The present invention relates to an information processing device, an imaging device, and an information processing method.

撮影光学系の焦点状態を検出する自動焦点検出(Auto Focusing、以下AFと表記する)の方式として、コントラストAF方式と位相差AF方式がある。コントラストAF方式及び位相差AF方式は、ビデオカメラ、デジタルスチルカメラ等の撮像装置に用いられ得る。このような撮像装置では、撮像用の撮像素子が焦点検出素子としても用いられるものがある。   A contrast AF method and a phase difference AF method are available as methods of automatic focusing (Auto Focusing, hereinafter referred to as AF) for detecting the focus state of the photographing optical system. The contrast AF method and the phase difference AF method can be used for image pickup devices such as video cameras and digital still cameras. In such an image pickup apparatus, an image pickup element for image pickup is also used as a focus detection element.

コントラストAF方式及び位相差AF方式では光学像を利用して焦点検出を行うため、光学像を結像する光学系の収差が焦点検出の結果に誤差を与える場合がある。このような誤差を低減するための方法が特許文献1及び特許文献2に提案されている。   Since the focus detection is performed using the optical image in the contrast AF method and the phase difference AF method, the aberration of the optical system that forms the optical image may give an error to the result of the focus detection. Methods for reducing such an error are proposed in Patent Documents 1 and 2.

特許文献1には、絞り開放時と絞り込み時の焦点移動量を用いて、撮影レンズの球面収差による焦点検出誤差を補正する技術が開示されている。   Patent Document 1 discloses a technique for correcting a focus detection error due to spherical aberration of a photographing lens by using the focus movement amount when the diaphragm is opened and when the diaphragm is closed.

特許文献2には、撮像素子から出力された信号の評価帯域に関する情報を用いて、撮影画像の焦点と焦点検出結果の焦点との差を補正するための補正値を算出する技術が開示されている。   Patent Document 2 discloses a technique of calculating a correction value for correcting the difference between the focus of a captured image and the focus of a focus detection result, using information about the evaluation band of the signal output from the image sensor. There is.

特開昭62−157016号公報JP 62-157016 A 特開2015−138200公報JP, 2015-138200, A

しかしながら、特許文献1及び特許文献2に記載された補正方法では、撮影光学系からの光束を瞳分割して受光する画素を有する撮像素子を用いた焦点検出において光学系の収差の補正精度が十分ではない場合がある。   However, in the correction methods described in Patent Document 1 and Patent Document 2, the correction accuracy of the aberration of the optical system is sufficient in the focus detection using the image sensor having the pixel that splits the light flux from the photographing optical system and receives the light. May not be.

本発明は、より高精度に焦点検出誤差を補正し得る情報処理装置、撮像装置及び情報処理方法を提供する。   The present invention provides an information processing device, an imaging device, and an information processing method capable of correcting a focus detection error with higher accuracy.

本発明の一実施形態によれば、撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得する画像信号取得手段と、前記複数の画像信号のうちの少なくとも1つに基づいて焦点検出を行い、第1のデフォーカス値を算出するデフォーカス値算出手段と、前記撮影光学系の異なる瞳領域を通過した光束にそれぞれ対応する第1の収差情報及び第2の収差情報を取得する収差情報取得手段と、前記第1の収差情報と、前記第2の収差情報とに基づいて前記第1のデフォーカス値を補正するための補正値を算出する補正値算出手段と、前記補正値を用いて前記第1のデフォーカス値を補正して第2のデフォーカス値を生成するデフォーカス値補正手段と、を有することを特徴とする情報処理装置が提供される。 According to one embodiment of the present invention, an image signal acquisition unit that acquires a plurality of image signals based on a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids of the imaging optical system, and the plurality of image signals. Defocus value calculating means for performing focus detection based on at least one of the two, and first aberrations respectively corresponding to light fluxes passing through different pupil regions of the photographing optical system. calculating the aberration information acquisition unit, the first aberration information, a correction value for correcting said first defocus value based on said second aberration information for acquiring information and the second aberration information And a defocus value correction unit that corrects the first defocus value using the correction value to generate a second defocus value. It is provided.

本発明の一実施形態によれば、撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得する画像信号取得工程と、前記複数の画像信号のうちの少なくとも1つに基づいて焦点検出を行い、第1のデフォーカス値を算出するデフォーカス値算出工程と、前記撮影光学系の異なる瞳領域を通過した光束にそれぞれ対応する第1の収差情報及び第2の収差情報を取得する収差情報取得工程と、前記第1の収差情報と、前記第2の収差情報とに基づいて前記第1のデフォーカス値を補正するための補正値を算出する補正値算出工程と、前記補正値を用いて前記第1のデフォーカス値を補正して第2のデフォーカス値を生成するデフォーカス値補正工程と、を有することを特徴とする情報処理方法が提供される。
According to one embodiment of the present invention, an image signal acquisition step of acquiring a plurality of image signals based on each of a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids of the imaging optical system, and the plurality of image signals. Defocus value calculation step of performing focus detection based on at least one of the two, and first aberrations corresponding to light fluxes passing through different pupil regions of the photographing optical system. calculating the aberration information acquisition process, and the first aberration information, a correction value for correcting said first defocus value based on said second aberration information for acquiring information and the second aberration information And a defocus value correction step of correcting the first defocus value by using the correction value to generate a second defocus value. It is provided.

本発明によれば、より高精度に焦点検出誤差を補正し得る情報処理装置、撮像装置及び情報処理方法が提供される。   According to the present invention, there are provided an information processing device, an imaging device, and an information processing method capable of correcting a focus detection error with higher accuracy.

第1の実施形態に係るAF処理動作を示すフローチャートである。6 is a flowchart showing an AF processing operation according to the first embodiment. 第1の実施形態に係る撮像装置の一例であるデジタルカメラのブロック図である。FIG. 3 is a block diagram of a digital camera that is an example of the image pickup apparatus according to the first embodiment. 第1の実施形態に係る撮像素子の構成を示す図である。It is a figure which shows the structure of the image sensor which concerns on 1st Embodiment. 第1の実施形態に係る撮影光学系の構造を示す図である。It is a figure which shows the structure of the imaging optical system which concerns on 1st Embodiment. 第1の実施形態に係るコントラストAF部の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of a contrast AF unit according to the first embodiment. 第1の実施形態に係る焦点検出領域の一例を示す図である。It is a figure which shows an example of the focus detection area | region which concerns on 1st Embodiment. (a)及び(b)は、焦点検出情報の例を示す表であり、(c)は、瞳領域情報重み付け係数の例を示す表である。(A) and (b) is a table | surface which shows the example of focus detection information, (c) is a table | surface which shows the example of a pupil area information weighting coefficient. (a)は、第1の実施形態に係る撮影光学系のデフォーカスMTFを示すグラフであり、(b)は、第1の実施形態に係るデフォーカスMTFのピーク位置と空間周波数の関係を示すグラフである。(A) is a graph showing the defocus MTF of the imaging optical system according to the first embodiment, and (b) shows the relationship between the peak position and the spatial frequency of the defocus MTF according to the first embodiment. It is a graph. 第1の実施形態に係る瞳領域情報と収差係数の対応を示す表である。5 is a table showing correspondence between pupil region information and aberration coefficients according to the first embodiment. 第1の実施形態に係るデフォーカスMTFのピーク位置と空間周波数の関係を示すグラフである。It is a graph which shows the peak position of defocus MTF and spatial frequency which concern on 1st Embodiment. 第1の実施形態に係るデフォーカスMTFのピーク位置と空間周波数の関係を示すグラフである。It is a graph which shows the peak position of defocus MTF and spatial frequency which concern on 1st Embodiment. 第2の実施形態に係るAF処理動作を示すフローチャートである。7 is a flowchart showing an AF processing operation according to the second embodiment. 第2の実施形態に係る撮像素子での受光強度分布を示すグラフである。8 is a graph showing a distribution of received light intensity in the image sensor according to the second embodiment. 第2の実施形態に係る射出瞳面における横収差の量を示すグラフである。8 is a graph showing the amount of lateral aberration on the exit pupil plane according to the second embodiment. 第2の実施形態に係る瞳領域ごとの収差寄与率分布を示すグラフである。9 is a graph showing an aberration contribution rate distribution for each pupil region according to the second embodiment. 第2の実施形態に係るデフォーカスによる線像強度分布の重心ずれ量を説明するための図である。FIG. 9 is a diagram for explaining a center-of-gravity shift amount of a line image intensity distribution due to defocus according to the second embodiment. 第2の実施形態に係る重心ずれ量、相関演算結果の差が大きい場合の線像強度分布を示す図である。It is a figure which shows the line image intensity distribution when the difference of the gravity center shift amount and correlation calculation result which concerns on 2nd Embodiment is large. 第2の実施形態に係る瞳領域ごとのデフォーカスMTFを示す図である。It is a figure which shows the defocus MTF for every pupil area | region which concerns on 2nd Embodiment. 第2の実施形態に係る絞りの位置、像高、レンズの射出瞳距離、センサの設定距離の関係を示す図である。It is a figure which shows the position of the diaphragm which concerns on 2nd Embodiment, the image height, the exit pupil distance of a lens, and the setting distance of a sensor. 第2の実施形態に係るセンサの設定瞳距離と撮影光学系の射出瞳距離を示す図である。It is a figure which shows the setting pupil distance of the sensor which concerns on 2nd Embodiment, and the exit pupil distance of an imaging optical system.

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

[第1の実施形態]
(撮像装置の構成の説明−レンズユニット)
図2は、第1の実施形態に係る撮像装置の一例であるデジタルカメラの機能構成例を示すブロック図である。本実施形態のデジタルカメラは、レンズ交換式一眼レフカメラであり、撮影光学系の一部を含むレンズユニット100と、撮像ユニットとしてのカメラ本体120とを有する。レンズユニット100は図中央の点線で示されるマウントMを介して、カメラ本体120に装着される。
[First Embodiment]
(Description of Configuration of Imaging Device-Lens Unit)
FIG. 2 is a block diagram illustrating a functional configuration example of a digital camera which is an example of the image pickup apparatus according to the first embodiment. The digital camera of the present embodiment is an interchangeable lens type single-lens reflex camera, and has a lens unit 100 including a part of a photographing optical system and a camera body 120 as an image pickup unit. The lens unit 100 is attached 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 (first lens group 101, diaphragm 102, second lens group 103, focus lens group (hereinafter, simply referred to as “focus lens”) 104), and a drive / control system for these. 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の入光部側の先端に配置される。第1レンズ群101は、光軸方向OAに移動可能に保持される。絞り102は、撮影時の光量を調節する機能、及び静止画撮影時に露出時間を制御するメカニカルシャッタの機能を有する。絞り102及び第2レンズ群103は、一体で光軸方向OAに移動可能であり、第1レンズ群101と連動して移動することによりズーム機能を実現する。フォーカスレンズ104も、光軸方向OAに移動可能である。フォーカスレンズ104の位置に応じて、合焦する被写体距離(合焦距離)が変化する。フォーカスレンズ104の光軸方向OAにおける位置を制御することにより、レンズユニット100の合焦距離を調節する焦点調節が行われる。   The first lens group 101 is arranged at the tip of the lens unit 100 on the light incident side. The first lens group 101 is held so as to be movable in the optical axis direction OA. The diaphragm 102 has a function of adjusting the amount of light at the time of shooting, and a function of a mechanical shutter that controls the exposure time at the time of shooting a still image. The diaphragm 102 and the second lens group 103 are integrally movable in the optical axis direction OA, and the zoom function is realized by moving in conjunction with the first lens group 101. The focus lens 104 is also movable in the optical axis direction OA. The subject distance to be focused (focus distance) changes depending on the position of the focus lens 104. By controlling the position of the focus lens 104 in the optical axis direction OA, focus adjustment for adjusting the focusing distance of the lens unit 100 is performed.

駆動/制御系は、ズームアクチュエータ111、絞りシャッタアクチュエータ112、フォーカスアクチュエータ113、ズーム駆動回路114、絞りシャッタ駆動回路115、フォーカス駆動回路116、レンズMPU117、レンズメモリ118を有する。ズーム駆動回路114は、ズームアクチュエータ111を用いて第1レンズ群101及び第2レンズ群103を光軸方向OAに駆動することにより、レンズユニット100の光学系の画角を制御する。絞りシャッタ駆動回路115は、絞りシャッタアクチュエータ112を用いて絞り102を駆動することにより、絞り102の開口径及び開閉を制御する。フォーカス駆動回路116は、フォーカスアクチュエータ113を用いてフォーカスレンズ104を光軸方向OAに駆動することにより、レンズユニット100の光学系の合焦距離を制御する。また、フォーカス駆動回路116は、フォーカスアクチュエータ113を用いてフォーカスレンズ104の現在位置を検出する。   The drive / control system includes a zoom actuator 111, an aperture shutter actuator 112, a focus actuator 113, a zoom drive circuit 114, an aperture shutter drive circuit 115, a focus drive circuit 116, a lens MPU 117, and a lens memory 118. The zoom drive circuit 114 controls the angle of view of the optical system of the lens unit 100 by driving the first lens group 101 and the second lens group 103 in the optical axis direction OA using the zoom actuator 111. The diaphragm shutter drive circuit 115 controls the aperture diameter and opening / closing of the diaphragm 102 by driving the diaphragm 102 using the diaphragm shutter actuator 112. The focus drive circuit 116 controls the focusing distance of the optical system of the lens unit 100 by driving the focus lens 104 in the optical axis direction OA using the focus actuator 113. Further, the focus drive circuit 116 detects the current position of the focus lens 104 using the focus actuator 113.

レンズMPU(Micro Processing Unit)117は、レンズユニット100に係る演算及び制御を行い、ズーム駆動回路114、絞りシャッタ駆動回路115、フォーカス駆動回路116を制御する。また、レンズMPU117は、マウントMの信号線を通じてカメラMPU125と接続され、コマンド及びデータをカメラMPU125と通信する。例えば、レンズMPU117は、フォーカスレンズ104の現在位置などに関する情報をフォーカス駆動回路116から取得する。レンズMPU117は、カメラMPU125からの要求に応じて、レンズ位置情報をカメラMPU125に通知する。このレンズ位置情報は、フォーカスレンズ104の光軸方向OAにおける位置、光学系が移動していない状態の射出瞳の光軸方向OAにおける位置及び直径、射出瞳の光束を制限するレンズ枠の光軸方向OAにおける位置及び直径などの情報を含む。またレンズMPU117は、カメラMPU125からの要求に応じて、ズーム駆動回路114、絞りシャッタ駆動回路115、フォーカス駆動回路116を制御する。レンズメモリ118には自動焦点検出に必要な光学情報があらかじめ記憶されている。また、レンズメモリ118に、さらにレンズユニット100の動作に必要なプログラムなどが記憶されていてもよい。カメラMPU125は、例えば、内蔵する不揮発性メモリ、あるいはレンズメモリ118に記憶されているプログラムを実行することで、レンズユニット100の動作を制御する。   A lens MPU (Micro Processing Unit) 117 calculates and controls the lens unit 100 and controls the zoom drive circuit 114, the aperture shutter drive circuit 115, and the focus drive circuit 116. Further, the lens MPU 117 is connected to the camera MPU 125 through the signal line of the mount M, and communicates commands and data with the camera MPU 125. For example, the lens MPU 117 acquires information about the current position of the focus lens 104 from the focus drive circuit 116. The lens MPU 117 notifies the camera MPU 125 of lens position information in response to a request from the camera MPU 125. This 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 luminous flux of the exit pupil. It includes information such as position and diameter in direction OA. The lens MPU 117 also controls the zoom drive circuit 114, the aperture shutter drive circuit 115, and the focus drive circuit 116 in response to a request from the camera MPU 125. Optical information necessary for automatic focus detection is stored in the lens memory 118 in advance. Further, the lens memory 118 may further store programs necessary for the operation of the lens unit 100. The camera MPU 125 controls the operation of the lens unit 100, for example, by executing a program stored in the built-in nonvolatile memory or the lens memory 118.

(撮像装置の構成の説明−カメラ本体)
カメラ本体120は、光学系(光学ローパスフィルタ121及び撮像素子122)と、駆動/制御系とを有する。レンズユニット100の第1レンズ群101、絞り102、第2レンズ群103及びフォーカスレンズ104並びにカメラ本体120の光学ローパスフィルタ121は撮影光学系を構成する。
(Explanation of the structure of the imaging device-camera body)
The camera body 120 has an optical system (optical low-pass filter 121 and image sensor 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 photographic optical system.

光学ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。撮像素子122はCMOSイメージセンサと周辺回路で構成され、CMOSイメージセンサは、横方向(X方向)にm画素、縦方向(Y方向)にn画素(n、mは2以上の整数)が行列状に配置されたエリアセンサを含む。本実施形態の撮像素子122は、瞳分割機能を有し、画像データを用いた位相差AFが可能である瞳分割画素である。   The optical low-pass filter 121 reduces false color and moire in a captured image. The image sensor 122 includes a CMOS image sensor and peripheral circuits. The CMOS image sensor has a matrix of m pixels in the horizontal direction (X direction) and n pixels (n and m are integers of 2 or more) in the vertical direction (Y direction). Including area sensors arranged in a line. The image sensor 122 of this embodiment is a pupil division pixel that has a pupil division function and is capable of phase difference AF using image data.

駆動/制御系は、撮像素子駆動回路123、画像処理回路124、カメラMPU125、表示器126、操作スイッチ群127、メモリ128、位相差AF部129及びコントラストAF部130を有する。   The drive / control system includes an image 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 section 129, and a contrast AF section 130.

撮像素子駆動回路123は、撮像素子122の動作を制御するとともに、取得した画像信号をA/D変換してカメラMPU125に送信する。画像処理回路124は、撮像素子122が取得した画像データに対し、例えばガンマ補正、ホワイトバランス調整処理、色補間処理、圧縮符号化処理などの画像処理を行う。また、画像処理回路124は位相差AF用の信号も生成する。すなわち、画像処理回路124は、位相差AF用のデータと、表示、記録及びコントラストAF用の画像データとを生成し得る。   The image sensor drive circuit 123 controls the operation of the image sensor 122, A / D-converts the acquired image signal, and transmits it to the camera MPU 125. The image processing circuit 124 performs image processing such as gamma correction, white balance adjustment processing, color interpolation processing, and compression encoding processing on the image data acquired by the image sensor 122. The image processing circuit 124 also generates a signal for phase difference AF. That is, the image processing circuit 124 can generate data for phase difference AF and image data for display, recording, and contrast AF.

カメラMPU(プロセッサ)125は、カメラ本体120に係る演算、制御を行う情報処理装置である。より具体的には、カメラMPU125は、撮像素子駆動回路123、画像処理回路124、表示器126、操作スイッチ群127、メモリ128、位相差AF部129、及びコントラストAF部130を制御する。カメラMPU125は、マウントMの信号線を介してレンズMPU117と接続され、レンズMPU117とコマンド及びデータを通信する。カメラMPU125はレンズMPU117に対し、レンズ位置の取得要求、絞り駆動要求、フォーカスレンズ駆動要求、ズーム駆動要求、レンズユニット100に固有の光学情報の取得要求など行う。カメラMPU125には、カメラ動作を制御するプログラムを格納したROM125a、変数を記憶するRAM125b(カメラメモリ)、種々のパラメータを記憶するEEPROM125cが内蔵されている。なお、レンズメモリ118及びRAM125bは、それぞれ本実施形態の処理のための収差情報等を記憶する第1のメモリ及び第2のメモリとして機能する。   The camera MPU (processor) 125 is an information processing device that performs calculation and control related to the camera body 120. More specifically, the camera MPU 125 controls the image sensor drive circuit 123, the image processing circuit 124, the display 126, the operation switch group 127, the memory 128, the phase difference AF section 129, and the contrast AF section 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 requests the lens MPU 117 to acquire a lens position, a diaphragm drive request, a focus lens drive request, a zoom drive request, an optical information acquisition request unique to the lens unit 100, and the like. The camera MPU 125 includes a ROM 125a that stores a program for controlling the camera operation, a RAM 125b (camera memory) that stores variables, and an EEPROM 125c that stores various parameters. The lens memory 118 and the RAM 125b respectively function as a first memory and a second memory that store aberration information and the like for the processing of this embodiment.

表示器126は、液晶ディスプレイなどから構成され、カメラの撮影モードに関する情報、撮影前のプレビュー画像、撮影後の確認用画像、焦点検出時の合焦状態表示画像などを表示する。操作スイッチ群127は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチなどで構成される。本実施形態の記録手段としてのメモリ128は、例えば着脱可能なフラッシュメモリであり、撮影済み画像を記録する。   The display device 126 is composed of a liquid crystal display or the like, and displays information about the shooting mode of the camera, a preview image before shooting, a confirmation image after shooting, a focus state display image at the time of focus detection, and the like. The operation switch group 127 includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like. The memory 128 as a recording unit of the present embodiment is, for example, a removable flash memory, and records a captured image.

位相差AF部129は、画像処理回路124により得られる焦点検出用データを用いて位相差検出方式による焦点検出処理を行う。より具体的には、画像処理回路124は、撮影光学系の一対の瞳領域を通過する光束で形成される一対の像データを焦点検出用データ又は画像用データとして生成する。位相差AF部129は、この一対の像データのずれ量に基づいて焦点ずれ量を検出する。このように、本実施形態の位相差AF部129は、専用のAFセンサを用いず、撮像素子122の出力に基づく位相差AF(像面位相差AF)を行う。位相差AF部129の動作についての詳細は後述する。なお、位相差AFに用いるデータが、一対、すなわち2個であることは必須ではなく、3個以上でもよい。   The phase difference AF unit 129 performs focus detection processing by the phase difference detection method using the focus detection data obtained by the image processing circuit 124. More specifically, the image processing circuit 124 generates, as focus detection data or image data, a pair of image data formed by a light flux passing through a pair of pupil regions of the photographing optical system. The phase difference AF unit 129 detects the focus shift amount based on the shift amount of the pair of image data. As described above, the phase difference AF unit 129 of the present embodiment performs the phase difference AF (image plane phase difference AF) based on the output of the image sensor 122 without using a dedicated AF sensor. Details of the operation of the phase difference AF unit 129 will be described later. In addition, it is not essential that the data used for the phase difference AF is a pair, that is, two pieces of data, and may be three or more pieces.

位相差AFの処理が可能なデジタルカメラは、複数の瞳領域に対応した撮影画像である視差画像を記録することも可能である。ユーザーは、複数の視差画像から所望の画像を選択することが可能となる。これにより、所望の視差、所望の被写界深度の画像を撮影画像として記録可能となる。例えば、ユーザーは、記録する画像として、オクルージョンの少ない画像、被写体のコントラストが高い画像等を選択できる。   A digital camera capable of phase difference AF processing can also record a parallax image that is a captured image corresponding to a plurality of pupil regions. The user can select a desired image from the plurality of parallax images. As a result, an image with a desired parallax and a desired depth of field can be recorded as a captured image. For example, the user can select, as an image to be recorded, an image with less occlusion, an image with a high subject contrast, or the like.

コントラストAF部130は、画像処理回路124が生成するコントラストAF用評価値(画像データのコントラスト情報)に基づいてコントラスト方式の焦点検出処理を行う。コントラスト方式の焦点検出処理においては、フォーカスレンズ104を移動させてコントラストAF用評価値がピークとなる位置が合焦位置として検出される。   The contrast AF unit 130 performs the focus detection process of the contrast method based on the contrast AF evaluation value (contrast information of image data) generated by the image processing circuit 124. In the focus detection processing of the contrast method, the focus lens 104 is moved and the position where the contrast AF evaluation value reaches a peak is detected as the in-focus position.

このように、本実施形態のデジタルカメラは位相差AFとコントラストAFの両方を実行可能であり、状況に応じてこれらのいずれか一方を選択的に使用したり、組み合わせて使用したりすることができる。   As described above, the digital camera according to the present embodiment can perform both the phase difference AF and the contrast AF, and it is possible to selectively use either one of them or to use them in combination depending on the situation. it can.

(焦点検出動作の説明:位相差AF)
以下、位相差AF部129及びコントラストAF部130の動作についてさらに説明する。最初に、位相差AF部129の動作について説明する。
(Explanation of focus detection operation: Phase difference AF)
The operations of the phase difference AF section 129 and the contrast AF section 130 will be further described below. First, the operation of the phase difference AF section 129 will be described.

図3(a)は本実施形態における撮像素子122の画素配列を示す図である。図3(a)には、2次元CMOSエリアセンサの縦(Y方向)6行と横(X方向)8列の範囲の画素211を、レンズユニット100側から観察した状態が示されている。撮像素子122にはベイヤー配列のカラーフィルタが設けられている。奇数行目には、左から順に、緑(G)のカラーフィルタを有する画素211と、赤(R)のカラーフィルタを有する画素211とが交互に配置されている。偶数行目には、左から順に青(B)のカラーフィルタを有する画素211と、緑(G)のカラーフィルタを有する画素211とが交互に配置されている。画素211上には、図中に円で示されているようにオンチップマイクロレンズ211iが設けられている。また、画素211は、図中に矩形で示されているように、上面視においてオンチップマイクロレンズの内側に配置された光電変換部211a、211bを有する。   FIG. 3A is a diagram showing a pixel array of the image sensor 122 according to this embodiment. FIG. 3A shows a state in which the pixels 211 in a range of 6 rows in the vertical direction (Y direction) and 8 columns in the horizontal direction (X direction) of the two-dimensional CMOS area sensor are observed from the lens unit 100 side. The image sensor 122 is provided with a Bayer array color filter. In the odd-numbered rows, pixels 211 having a green (G) color filter and pixels 211 having a red (R) color filter are alternately arranged in order from the left. In the even-numbered rows, pixels 211 having a blue (B) color filter and pixels 211 having a green (G) color filter are alternately arranged in order from the left. On-chip microlenses 211i are provided on the pixels 211 as indicated by circles in the figure. Further, the pixel 211 has photoelectric conversion units 211a and 211b arranged inside the on-chip microlens in a top view, as indicated by a rectangle in the drawing.

各画素211はX方向に並ぶ2つの光電変換部211a、211bを有している。換言すると、各画素211はX方向に2分割されている。この構成により、光電変換部211a、211bから出力される光電変換信号を個別に読み出すことと、2つの光電変換信号の和を読み出すことが可能である。また、2つの光電変換信号の和から一方の光電変換部からの光電変換信号を減じることで、他方の光電変換部からの光電変換信号に相当する信号を得ることができる。個々の光電変換部からの光電変換信号は位相差AF用のデータとして用いることができる。また、個々の光電変換部からの画像信号は3D(3-Dimensional)画像を構成する視差画像の生成に用いることもできる。また、光電変換信号の和を、通常の撮影画像データとして用いることができる。   Each pixel 211 has two photoelectric conversion units 211a and 211b arranged in the X direction. In other words, each pixel 211 is divided into two in the X direction. With this configuration, it is possible to individually read the photoelectric conversion signals output from the photoelectric conversion units 211a and 211b and to read the sum of the two photoelectric conversion signals. Further, by subtracting the photoelectric conversion signal from one photoelectric conversion unit from the sum of the two photoelectric conversion signals, a signal corresponding to the photoelectric conversion signal from the other photoelectric conversion unit can be obtained. The photoelectric conversion signal from each photoelectric conversion unit can be used as data for phase difference AF. Further, the image signals from the individual photoelectric conversion units can also be used to generate a parallax image forming a 3D (3-Dimensional) image. Further, the sum of photoelectric conversion signals can be used as normal captured image data.

ここで、位相差AFを行う際の光電変換信号に対する演算について説明する。後述するように、本実施形態においては、図3(a)のオンチップマイクロレンズ211iと、分割された光電変換部211a、211bにより撮影光学系の射出光束を瞳分割する。光電変換部211a、211bは本実施形態中で瞳分割画素を構成する。そして、所定範囲内の複数の画素211について、光電変換部211aの出力を加算して得られた信号をAF用A像、光電変換部211bの出力を加算して得られた信号をAF用B像とする。一例としては、AF用A像及びAF用B像は、カラーフィルタの単位配列に含まれる緑、赤、青、緑の各色の4つの画素211からの信号を加算することで算出された疑似的な輝度(Y)信号を用いる。ただし、赤、青、緑の色ごとに、AF用A像及びAF用B像を生成してもよい。このようにして生成されたAF用A像とAF用B像の間の相対的な像ずれ量を相関演算により算出することで、所定領域の焦点ずれ量(デフォーカス値)を算出することができる。   Here, the calculation for the photoelectric conversion signal when performing the phase difference AF will be described. As will be described later, in this embodiment, the on-chip microlens 211i of FIG. 3A and the divided photoelectric conversion units 211a and 211b divide the exit light flux of the photographing optical system into pupils. The photoelectric conversion units 211a and 211b form a pupil division pixel in this embodiment. Then, for a plurality of pixels 211 within a predetermined range, the signal obtained by adding the outputs of the photoelectric conversion unit 211a is the AF A image, and the signal obtained by adding the outputs of the photoelectric conversion unit 211b is the AF B image. Make it a statue. As an example, the A image for AF and the B image for AF are pseudo-values calculated by adding signals from four pixels 211 of each color of green, red, blue, and green included in the unit array of the color filter. Different luminance (Y) signals are used. However, an AF A image and an AF B image may be generated for each of red, blue, and green colors. By calculating the relative image shift amount between the A image for AF and the B image for AF generated in this way by the correlation calculation, the focus shift amount (defocus value) of the predetermined area can be calculated. it can.

本実施形態では、一方の光電変換部からの出力信号と、2つの光電変換部からの出力信号の和に相当する信号との2つの信号が撮像素子122から読み出されるものとする。例えば、光電変換部211aからの出力信号と、光電変換部211a、211bの出力信号の和に相当する出力信号とが読み出される場合を考える。この場合、光電変換部211bの出力信号は、上述の和に相当する出力信号から光電変換部211aからの出力信号を減じることで取得され得る。これにより、AF用A像とAF用B像の両方を得ることができ、位相差AFが実現され得る。なお、これらの複数の画像信号の取得は画像信号取得手段として動作するカメラMPU125により制御される。   In this embodiment, it is assumed that two signals, that is, an output signal from one photoelectric conversion unit and a signal corresponding to the sum of output signals from two photoelectric conversion units are read from the image sensor 122. For example, consider a case where an output signal from the photoelectric conversion unit 211a and an output signal corresponding to the sum of the output signals of the photoelectric conversion units 211a and 211b are read. In this case, the output signal of the photoelectric conversion unit 211b can be obtained by subtracting the output signal from the photoelectric conversion unit 211a from the output signal corresponding to the above sum. Thereby, both the A image for AF and the B image for AF can be obtained, and the phase difference AF can be realized. Note that the acquisition of these plural image signals is controlled by the camera MPU 125 that operates as an image signal acquisition unit.

図3(b)は本実施形態の撮像素子122の読み出し回路の構成例を示す図である。撮像素子122は、水平走査回路151、垂直走査回路153を有する。行方向及び列方向に配列された複数の画素211の境界部には、列方向に並ぶ複数の画素211に沿って水平走査ライン152a、152bが配され、行方向に並ぶ画素211に沿って垂直走査ライン154a、154bが配される。各行の垂直走査ライン154aは、垂直走査回路153と、対応する行の複数の光電変換部211aとを接続する。各行の垂直走査ライン154bは、垂直走査回路153と、対応する行の複数の光電変換部211bとを接続する。各列の水平走査ライン152aは、水平走査回路151と、対応する列の複数の光電変換部211aとを接続する。各列の水平走査ライン152bは、水平走査回路151と、対応する列の複数の光電変換部211bとを接続する。垂直走査回路153は、垂直走査ライン154a、154bを介して、各画素211に制御信号を送信し、信号の読み出し等の制御を行う。水平走査回路151は、水平走査ライン152a、152bを介して、各画素211から信号を読み出す。   FIG. 3B is a diagram showing a configuration example of the readout circuit of the image sensor 122 of this embodiment. The image sensor 122 includes a horizontal scanning circuit 151 and a vertical scanning circuit 153. Horizontal scanning lines 152a and 152b are arranged along the plurality of pixels 211 arranged in the column direction at boundaries between the plurality of pixels 211 arranged in the row direction and the column direction, and are vertically arranged along the pixels 211 arranged in the row direction. Scan lines 154a and 154b are arranged. The vertical scanning line 154a in each row connects the vertical scanning circuit 153 and the plurality of photoelectric conversion units 211a in the corresponding row. The vertical scanning line 154b in each row connects the vertical scanning circuit 153 and the plurality of photoelectric conversion units 211b in the corresponding row. The horizontal scanning line 152a in each column connects the horizontal scanning circuit 151 to the plurality of photoelectric conversion units 211a in the corresponding column. The horizontal scanning line 152b in each column connects the horizontal scanning circuit 151 and the plurality of photoelectric conversion units 211b in the corresponding column. The vertical scanning circuit 153 transmits a control signal to each pixel 211 via the vertical scanning lines 154a and 154b, and performs control such as signal reading. The horizontal scanning circuit 151 reads a signal from each pixel 211 via the horizontal scanning lines 152a and 152b.

なお、本実施形態の撮像素子122は、以下の2種類の読み出しモードでの信号の読み出しが可能である。第1の読み出しモードは、高精細静止画を撮影するための全画素読み出しモードである。全画素読み出しモードでは、撮像素子122に含まれる全ての画素211からの信号が読み出される。   The image sensor 122 of the present embodiment can read signals in the following two types of read modes. The first readout mode is an all-pixel readout mode for capturing a high-definition still image. In the all-pixel reading mode, signals from all the pixels 211 included in the image sensor 122 are read.

第2の読み出しモードは、動画記録、あるいはプレビュー画像の表示のみを行うための間引き読み出しモードである。動画記録、あるいはプレビュー画像の表示の用途では、高精細静止画を撮影する場合と比べて要求される解像度が低い。そのため、これらの用途の場合、撮像素子122に含まれる全画素から信号を読み出す必要がないため、所定比率に間引いた一部の画素のみから信号を読み出す間引き読み出しモードでの動作が行われる。また、高速に読み出す必要がある場合には、同様に間引き読み出しモードが用いられる。間引きの一例としては、X方向の間引きを行う際には、複数の画素からの信号を加算してS/N比の改善を図り、Y方向の間引きを行う際には、間引かれる行の信号出力を無視するという処理を行うことが可能である。位相差AF及びコントラストAFは、第2の読み出しモードで読み出された信号に基づいて行うことで、高速な処理が可能である。   The second read mode is a thinning read mode for recording a moving image or only displaying a preview image. For the purpose of recording a moving image or displaying a preview image, the required resolution is lower than that required for shooting a high-definition still image. Therefore, in these applications, it is not necessary to read out signals from all the pixels included in the image sensor 122, and therefore the operation is performed in the thinning-out reading mode in which signals are read out only from some of the pixels thinned out at a predetermined ratio. Further, when it is necessary to read at high speed, the thinning-out reading mode is similarly used. As an example of thinning out, when thinning out in the X direction, signals from a plurality of pixels are added to improve the S / N ratio, and when thinning out in the Y direction, the number of rows to be thinned out is reduced. It is possible to perform a process of ignoring the signal output. High-speed processing is possible by performing the phase difference AF and the contrast AF based on the signal read in the second read mode.

図4(a)及び図4(b)は、本実施形態における撮影光学系の構造図である。図4(a)及び図4(b)を参照して、撮影光学系の射出瞳面と、像高ゼロすなわち像面中央近傍に配置された撮像素子の光電変換部との共役関係を説明する。撮像素子122内の光電変換部211a、211bと撮影光学系の射出瞳面は、オンチップマイクロレンズ211iによって共役関係となるように設計される。撮影光学系の射出瞳面は、一般的に光量調節用の虹彩絞りが置かれる面とほぼ一致する。一方、本実施形態の撮影光学系は変倍機能を有したズームレンズであるが、撮影光学系のタイプによっては変倍操作を行うと、射出瞳の像面からの距離や大きさが変化することがある。図4(a)では、レンズユニット100の焦点距離が広角端と望遠端の中央にある状態を示されている。この状態における射出瞳距離Zepを標準値として、オンチップマイクロレンズの形状及び像高(X,Y座標)に応じた偏心パラメータの最適設計がなされる。   FIG. 4A and FIG. 4B are structural views of the photographing optical system in this embodiment. With reference to FIGS. 4A and 4B, the conjugate relationship between the exit pupil plane of the imaging optical system and the photoelectric conversion unit of the image sensor arranged near the image height zero, that is, near the center of the image plane will be described. . The photoelectric conversion units 211a and 211b in the image sensor 122 and the exit pupil plane of the photographing optical system are designed to have a conjugate relationship by the on-chip microlens 211i. The exit pupil plane of the photographing optical system generally coincides with the plane on which the iris diaphragm for adjusting the light amount is placed. On the other hand, the photographing optical system of the present embodiment is a zoom lens having a magnification changing function, but depending on the type of the photographing optical system, when the magnification changing operation is performed, the distance and size of the exit pupil from the image plane change. Sometimes. FIG. 4A 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, the eccentricity parameter is optimally designed according to the shape of the on-chip microlens and the image height (X, Y coordinates).

図4(a)は、撮影光学系のXZ断面を示している。レンズユニット100に対応する部分として、第1レンズ群101、鏡筒部材101b、開口板102a、絞り羽根102b、フォーカスレンズ104及び鏡筒部材104bが図示されている。鏡筒部材101bは、第1レンズ群101を保持する部材である。開口板102aは絞り開放時の開口径を規定する部材である。絞り羽根102bは絞り込み時の開口径を調節する部材である。鏡筒部材104bは、フォーカスレンズ104を保持する部材である。図2で説明した第2レンズ群103は図4(a)では図示を省略している。   FIG. 4A shows an XZ section of the photographing optical system. As a portion corresponding to the lens unit 100, a first lens group 101, a lens barrel member 101b, an aperture plate 102a, an aperture blade 102b, a focus lens 104, and a lens barrel member 104b are shown. The lens barrel member 101b is a member that holds the first lens group 101. The aperture plate 102a is a member that defines the aperture diameter when the diaphragm is opened. The diaphragm blade 102b is a member that adjusts the aperture diameter when narrowing down. The lens barrel member 104b is a member that holds the focus lens 104. The second lens group 103 described with reference to FIG. 2 is omitted in FIG. 4A.

なお、鏡筒部材101b、開口板102a、絞り羽根102b及び鏡筒部材104bは、撮影光学系を通過する光束に対する制限部材として作用する。図4(a)に図示された鏡筒部材101b、開口板102a、絞り羽根102b及び鏡筒部材104bは、像面から観察した場合の光学的な虚像を模式的に示すものであり、必ずしも実際の構造を示すものではない。また、絞り102の近傍における合成開口をレンズの射出瞳と定義し、前述したように像面から射出瞳までの射出瞳距離をZepとしている。   The lens barrel member 101b, the aperture plate 102a, the diaphragm blades 102b, and the lens barrel member 104b act as a limiting member for the light flux passing through the photographing optical system. The lens barrel member 101b, the aperture plate 102a, the diaphragm blades 102b, and the lens barrel member 104b shown in FIG. 4A are schematic representations of optical virtual images when observed from the image plane, and are not always actual. It does not indicate the structure of. The synthetic aperture in the vicinity of the diaphragm 102 is defined as the exit pupil of the lens, and the exit pupil distance from the image plane to the exit pupil is Zep as described above.

画素211は像面中央近傍に配置されている。画素211は、最下層より順に、光電変換部211a、211b、配線層211e、211f、211g、カラーフィルタ211h、及びオンチップマイクロレンズ211iの各部材を備えている。そして2つの光電変換部211a、211bはオンチップマイクロレンズ211iによって撮影光学系の射出瞳面に投影される。換言すれば、撮影光学系の射出瞳が、オンチップマイクロレンズ211iを介して、光電変換部211a、211bの表面に投影される。   The pixel 211 is arranged near the center of the image plane. The pixel 211 includes, in order from the bottom layer, photoelectric conversion units 211a and 211b, wiring layers 211e, 211f and 211g, a color filter 211h, and an on-chip microlens 211i. Then, the two photoelectric conversion units 211a and 211b are projected by the on-chip microlens 211i onto the exit pupil plane of the photographing optical system. In other words, the exit pupil of the photographing optical system is projected onto the surfaces of the photoelectric conversion units 211a and 211b via the on-chip microlens 211i.

図4(b)は、撮影光学系の射出瞳面上における、光電変換部211a、211bの投影像を示したものである。図4(b)には、光電変換部211a及び211bに対する投影像が、それぞれ、瞳領域EP1a及びEP1bとして示されている。上述のように、画素211は、2つの光電変換部211a、211bのいずれか一方からの信号と、2つの光電変換部211a、211bからの信号の和とを出力することができる。2つの光電変換部211a、211bからの信号の和は、瞳領域EP1a、EP1bの両方の領域、すなわち、撮影光学系の瞳領域のほぼ全域(瞳領域TL)を通過した光束に基づく信号に対応する。このようにして、本実施形態の光電変換部211aと211bは瞳分割画素を構成する。   FIG. 4B shows projected images of the photoelectric conversion units 211a and 211b on the exit pupil plane of the photographing optical system. In FIG. 4B, the projected images of the photoelectric conversion units 211a and 211b are shown as pupil regions EP1a and EP1b, respectively. As described above, the pixel 211 can output the signal from either one of the two photoelectric conversion units 211a and 211b and the sum of the signals from the two photoelectric conversion units 211a and 211b. The sum of the signals from the two photoelectric conversion units 211a and 211b corresponds to the signal based on the light flux that has passed through both the pupil regions EP1a and EP1b, that is, almost the entire pupil region (pupil region TL) of the photographing optical system. To do. In this way, the photoelectric conversion units 211a and 211b of this embodiment form pupil division pixels.

図4(a)において、撮影光学系を通過する光束の最外部が線分Lで示されている。図4(a)の配置では、線分Lの位置は、絞り102の開口板102aの端部の位置で決定されている。そのため、図4(a)に示されるように、瞳領域EP1a、EP1bに対応する投影像は撮影光学系によるケラレがほぼ発生していない。図4(b)では、図4(a)の射出瞳面上における光束の最外部がTL(102a)の符号が付された円で示されている。図4(a)に示されるように、円の内部に、光電変換部211a、211bの投影像に対応する瞳領域EP1a、EP1bの大部分が含まれていることからも、ケラレがほぼ発生していないことがわかる。撮影光学系を通過する光束は、絞りの端部でのみ制限されているため、この円は、絞り102の開口部に相当する。像面中央では各投影像に対応する瞳領域EP1a、EP1bのケラレは光軸に対して対称となる。そのため、各光電変換部211a、211bが受光する光量は等しい。   In FIG. 4A, the outermost part of the light flux passing through the photographing optical system is indicated by a line segment L. In the arrangement of FIG. 4A, the position of the line segment L is determined by the position of the end portion of the aperture plate 102a of the diaphragm 102. Therefore, as shown in FIG. 4A, the projection images corresponding to the pupil regions EP1a and EP1b are not substantially vignetting due to the photographing optical system. In FIG. 4B, the outermost part of the light flux on the exit pupil plane of FIG. 4A is indicated by a circle labeled with TL (102a). As shown in FIG. 4A, most of the pupil regions EP1a and EP1b corresponding to the projection images of the photoelectric conversion units 211a and 211b are included in the circle, and therefore vignetting is almost generated. You can see that not. Since the light flux passing through the photographing optical system is limited only at the end of the diaphragm, this circle corresponds to the opening of the diaphragm 102. In the center of the image plane, the vignetting of the pupil regions EP1a and EP1b corresponding to each projection image is symmetrical with respect to the optical axis. Therefore, the amounts of light received by the photoelectric conversion units 211a and 211b are equal.

位相差AFを行う場合、画像信号取得手段として動作するカメラMPU125は、撮像素子122から上述した2種類の出力信号を読み出すように撮像素子駆動回路123を制御する。このとき、カメラMPU125は、画像処理回路124に対して焦点検出領域を示す情報を与える。さらに、カメラMPU125は、焦点検出領域内に含まれる画素211の出力信号から、AF用A像及びAF用B像のデータを生成して位相差AF部129に供給するよう命令する。画像処理回路124はこの命令に従ってAF用A像及びAF用B像のデータを生成して位相差AF部129に出力する。画像処理回路124は、また、コントラストAF部130に対してRAW画像データを供給する。   When performing the phase difference AF, the camera MPU 125, which operates as an image signal acquisition unit, controls the image sensor drive circuit 123 so as to read the above-described two types of output signals from the image sensor 122. At this time, the camera MPU 125 gives information indicating the focus detection area to the image processing circuit 124. Further, the camera MPU 125 commands to generate the AF A image data and the AF B image data from the output signal of the pixel 211 included in the focus detection area and supply the data to the phase difference AF unit 129. The image processing circuit 124 generates AF A image data and AF B image data according to this instruction and outputs the data to the phase difference AF unit 129. The image processing circuit 124 also supplies the RAW image data to the contrast AF section 130.

以上説明したように、撮像素子122は、位相差AF及びコントラストAFを行い得る機能を有している。換言すると、撮像素子122は、位相差AF及びコントラストAFの両方について、焦点検出装置の一部を構成している。   As described above, the image sensor 122 has a function of performing the phase difference AF and the contrast AF. In other words, the image sensor 122 constitutes a part of the focus detection device for both the phase difference AF and the contrast AF.

なお、ここでは一例として水平方向(X方向)に射出瞳が2分割されている構成を説明したが、撮像素子122の一部又は全部の画素について垂直方向(Y方向)に射出瞳を2分割する構成としてもよい。また、例えば、画素211に光電変換部を4個配置することにより、水平方向及び垂直方向の両方向に射出瞳が分割される構成としてもよい。このように垂直方向に射出瞳が分割される画素211を設けることにより、水平方向だけでなく垂直方向の被写体のコントラストに対応した位相差AFが可能となる。   Although the configuration in which the exit pupil is divided into two in the horizontal direction (X direction) has been described here as an example, the exit pupil is divided into two in the vertical direction (Y direction) for some or all of the pixels of the image sensor 122. It may be configured to. Further, for example, by disposing four photoelectric conversion units in the pixel 211, the exit pupil may be divided in both the horizontal direction and the vertical direction. By providing the pixels 211 in which the exit pupil is divided in the vertical direction in this way, phase difference AF corresponding to the contrast of the object in the vertical direction as well as in the horizontal direction becomes possible.

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

図5は、第1の実施形態に係るコントラストAF部130の構成及びこれと連携するカメラMPU125の構成を示すブロック図である。コントラストAF部130は、AF評価用信号処理部401と、ラインピーク検出部402と、水平積分部403と、ライン最小値検出部404と、垂直ピーク検出部405と、垂直積分部406と、垂直ピーク検出部407とを有する。コントラストAF部130は、さらに、BPF(Band Pass Filter)408と、ラインピーク検出部409と、垂直積分部410と、垂直ピーク検出部411と、減算部412と、領域設定部413とを有する。カメラMPU125はAF制御部451を有する。   FIG. 5 is a block diagram showing the configuration of the contrast AF unit 130 according to the first embodiment and the configuration of the camera MPU 125 that works in cooperation with the configuration. The contrast AF unit 130 includes an AF evaluation signal processing unit 401, a line peak detection unit 402, a horizontal integration unit 403, a line minimum value detection unit 404, a vertical peak detection unit 405, a vertical integration unit 406, and a vertical integration unit 406. A peak detector 407. The contrast AF unit 130 further includes a BPF (Band Pass Filter) 408, a line peak detection unit 409, a vertical integration unit 410, a vertical peak detection unit 411, a subtraction unit 412, and a region setting unit 413. The camera MPU 125 has an AF control unit 451.

画像処理回路124からRAW画像データがコントラストAF部130に入力されると、RAW画像データはまずAF評価用信号処理部401に入力される。AF評価用信号処理部401は、RAW画像データ内のベイヤー配列信号から緑(G)信号を抽出し、低輝度成分を強調して高輝度成分を抑圧するガンマ補正処理を行う。本実施形態では、コントラストAFが緑(G)信号を用いて行われる場合を説明するが、他の色の信号を用いてもよく、赤(R)、青(B)、緑(G)の全ての信号を用いてもよい。また、赤(R)、青(B)、緑(G)の全色を用いて輝度(Y)信号を生成してから、輝度(Y)信号を用いてコントラストAFを行ってもよい。以後の説明では、AF評価用信号処理部401で生成される出力信号は、用いられた信号の種類によらず、輝度信号Yと呼ぶ。AF評価用信号処理部401は、輝度信号Yをラインピーク検出部402、水平積分部403、ライン最小値検出部404及びBPF408に出力する。輝度信号Yがこれらの各部に入力されるタイミングは、後述の各評価値を生成すべきタイミングと合致するように制御される。   When the RAW image data is input from the image processing circuit 124 to the contrast AF section 130, the RAW image data is first input to the AF evaluation signal processing section 401. The AF evaluation signal processing unit 401 extracts a green (G) signal from the Bayer array signal in the RAW image data, performs a gamma correction process of emphasizing the low luminance component and suppressing the high luminance component. In this embodiment, the case where the contrast AF is performed using the green (G) signal will be described, but signals of other colors may be used, and the signals of red (R), blue (B), and green (G) may be used. All signals may be used. Alternatively, contrast AF may be performed using the luminance (Y) signal after generating the luminance (Y) signal using all the colors of red (R), blue (B), and green (G). In the following description, the output signal generated by the AF evaluation signal processing unit 401 will be referred to as the luminance signal Y regardless of the type of signal used. The AF evaluation signal processing unit 401 outputs the luminance signal Y to the line peak detection unit 402, horizontal integration unit 403, line minimum value detection unit 404, and BPF 408. The timing at which the luminance signal Y is input to each of these units is controlled so as to coincide with the timing at which each evaluation value described below should be generated.

カメラMPU125は、領域設定部413に焦点検出領域の設定に関する情報を出力する。領域設定部413は、設定された領域内の信号を選択するゲート信号を生成する。ゲート信号は、ラインピーク検出部402、409、水平積分部403、ライン最小値検出部404、垂直積分部406、410及び垂直ピーク検出部405、407、411の各部に入力される。なお、領域設定部413は、焦点検出領域の設定に応じて複数の領域を選択可能である。   The camera MPU 125 outputs information regarding the setting of the focus detection area to the area setting unit 413. The area setting unit 413 generates a gate signal that selects a signal within the set area. The gate signal is input to the line peak detectors 402 and 409, the horizontal integrator 403, the line minimum value detector 404, the vertical integrators 406 and 410, and the vertical peak detectors 405, 407, and 411. The area setting unit 413 can select a plurality of areas according to the setting of the focus detection area.

Yピーク評価値の算出方法について説明する。AF評価用信号処理部401でガンマ補正された輝度信号Yは、ラインピーク検出部402へ入力される。ラインピーク検出部402は、焦点検出領域内で水平ラインごとのYラインピーク値を算出して、垂直ピーク検出部405に出力する。垂直ピーク検出部405は、ラインピーク検出部402から出力されたYラインピーク値に対し焦点検出領域内で垂直方向にピークホールドを行い、Yピーク評価値を生成する。Yピーク評価値は、高輝度被写体及び低輝度被写体の判定に有効な指標である。   A method of calculating the Y peak evaluation value will be described. The luminance signal Y gamma-corrected by the AF evaluation signal processing unit 401 is input to the line peak detection unit 402. The line peak detection unit 402 calculates the Y line peak value for each horizontal line in the focus detection area and outputs it to the vertical peak detection unit 405. The vertical peak detection unit 405 holds the Y line peak value output from the line peak detection unit 402 in the vertical direction in the focus detection region to generate a Y peak evaluation value. The Y peak evaluation value is an index effective for determining a high-luminance subject and a low-luminance subject.

Y積分評価値の算出方法について説明する。AF評価用信号処理部401でガンマ補正された輝度信号Yは、水平積分部403へ入力される。水平積分部403は、焦点検出領域内で水平ラインごとにYの積分値を算出して、垂直積分部406に出力する。垂直積分部406は、水平積分部403で算出された積分値を、焦点検出領域内で垂直方向に積分することにより、Y積分評価値を生成する。Y積分評価値は、焦点検出領域内全体の輝度を判断する指標として用いることができる。   A method of calculating the Y integral evaluation value will be described. The luminance signal Y gamma-corrected by the AF evaluation signal processing unit 401 is input to the horizontal integration unit 403. The horizontal integrator 403 calculates the integrated value of Y for each horizontal line in the focus detection area and outputs it to the vertical integrator 406. The vertical integration unit 406 generates a Y integration evaluation value by vertically integrating the integration value calculated by the horizontal integration unit 403 within the focus detection area. The Y integration evaluation value can be used as an index for determining the brightness of the entire focus detection area.

Max−Min評価値の算出方法について説明する。AF評価用信号処理部401でガンマ補正された輝度信号Yは、ライン最小値検出部404に入力される。ライン最小値検出部404は、焦点検出領域内で水平ラインごとにYライン最小値を算出して減算部412に出力する。また、上述のYピーク評価値の算出方法と同様の方法によりラインピーク検出部402で算出されたYラインピーク値も減算部412に入力される。減算部412は、ラインピーク値からYライン最小値を減算して垂直ピーク検出部407に出力する。垂直ピーク検出部407は、焦点検出領域内で減算部412からの出力に対し垂直方向にピークホールドを行い、Max−Min評価値を生成する。Max−Min評価値は、低コントラスト・高コントラストの判定に有効な指標である。   A method of calculating the Max-Min evaluation value will be described. The luminance signal Y gamma-corrected by the AF evaluation signal processing unit 401 is input to the line minimum value detection unit 404. The line minimum value detection unit 404 calculates the Y line minimum value for each horizontal line in the focus detection area and outputs it to the subtraction unit 412. Further, the Y line peak value calculated by the line peak detection unit 402 by the same method as the above Y peak evaluation value calculation method is also input to the subtraction unit 412. The subtraction unit 412 subtracts the Y-line minimum value from the line peak value and outputs it to the vertical peak detection unit 407. The vertical peak detection unit 407 performs peak hold in the vertical direction on the output from the subtraction unit 412 in the focus detection area to generate a Max-Min evaluation value. The Max-Min evaluation value is an index effective for determining low contrast / high contrast.

領域ピーク評価値の算出方法について説明する。AF評価用信号処理部401でガンマ補正された輝度信号Yは、BPF408に入力される。BPF408は、輝度信号Yから特定の周波数成分を抽出して焦点信号を生成し、ラインピーク検出部409に出力する。ラインピーク検出部409は、焦点検出領域内で水平ラインごとのラインピーク値を算出して、垂直ピーク検出部411に出力する。垂直ピーク検出部411は、ラインピーク検出部409から出力されたラインピーク値に対し焦点検出領域内でピークホールドを行い、領域ピーク評価値を生成する。領域ピーク評価値は、焦点検出領域内で被写体が移動しても変化が少ないので、合焦状態から再度合焦点を探す処理に移行するかどうかを判定する再起動判定に有効な指標である。   A method of calculating the area peak evaluation value will be described. The luminance signal Y gamma-corrected by the AF evaluation signal processing unit 401 is input to the BPF 408. The BPF 408 extracts a specific frequency component from the luminance signal Y, generates a focus signal, and outputs the focus signal to the line peak detection unit 409. The line peak detection unit 409 calculates a line peak value for each horizontal line in the focus detection area and outputs it to the vertical peak detection unit 411. The vertical peak detection unit 411 holds the peak of the line peak value output from the line peak detection unit 409 in the focus detection area to generate an area peak evaluation value. The area peak evaluation value, which does not change much even if the subject moves within the focus detection area, is an effective index for restart determination for determining whether or not to shift to the processing for searching the focused point again from the focused state.

全ライン積分評価値の算出方法について説明する。領域ピーク評価値の算出方法と同様にして、ラインピーク検出部409は、焦点検出領域内で水平ラインごとのラインピーク値を算出して、垂直積分部410に出力する。垂直積分部410は、ラインピーク検出部409から出力されたラインピーク値に対し焦点検出領域内で垂直方向に全水平走査ライン数について積分して全ライン積分評価値を生成する。全ライン積分評価値は、積分の効果でダイナミックレンジが広く、感度が高いので、焦点検出の処理における主要なAF評価値である。したがって、本実施形態のコントラストAFには主として全ライン積分評価値が用いられる。   A method of calculating the total line integral evaluation value will be described. Similar to the method of calculating the area peak evaluation value, the line peak detection unit 409 calculates the line peak value for each horizontal line in the focus detection area and outputs it to the vertical integration unit 410. The vertical integrator 410 integrates the line peak value output from the line peak detector 409 in the vertical direction within the focus detection area for all horizontal scanning lines to generate an all-line integral evaluation value. The all-line integral evaluation value is a main AF evaluation value in focus detection processing because it has a wide dynamic range and high sensitivity due to the effect of integration. Therefore, the all-line integral evaluation value is mainly used for the contrast AF of this embodiment.

カメラMPU125のAF制御部451は、Yピーク評価値、Y積分評価値、Max−Min評価値、領域ピーク評価値及び全ライン積分評価値を取得する。AF制御部451は、レンズMPU117にフォーカスレンズ104を光軸方向に沿って所定方向に所定量移動させる指示を行う。その後、フォーカスレンズ104の移動後に新たに得られた画像データに基づいて再び上述の各評価値を算出する。これを繰り返すことで、全ライン積分評価値が最大値となるフォーカスレンズ位置を検出する。本実施形態中では、全ライン積分評価値が最大値となる検出フォーカスレンズ位置と現時刻でのフォーカスレンズ位置の差が、コントラストAF方式でのデフォーカス値に対応する。   The AF control unit 451 of the camera MPU 125 acquires the Y peak evaluation value, the Y integration evaluation value, the Max-Min evaluation value, the area peak evaluation value, and the all-line integration evaluation value. The AF control unit 451 instructs the lens MPU 117 to move the focus lens 104 in a predetermined direction along the optical axis direction by a predetermined amount. After that, the above-described evaluation values are calculated again based on the image data newly obtained after the movement of the focus lens 104. By repeating this, the focus lens position where the integrated evaluation value for all lines becomes the maximum value is detected. In the present embodiment, the difference between the detected focus lens position where the total line integral evaluation value is the maximum value and the focus lens position at the current time corresponds to the defocus value in the contrast AF method.

本実施形態では、各種の評価値の算出に水平ライン方向及び垂直ライン方向の2方向の情報が用いられる。そのため、水平方向及び垂直方向の直交する2方向の被写体のコントラスト情報に対応した焦点検出を行うことができる。   In the present embodiment, information of two directions, that is, the horizontal line direction and the vertical line direction is used for calculating various evaluation values. Therefore, it is possible to perform focus detection corresponding to the contrast information of the subject in two directions orthogonal to each other in the horizontal direction and the vertical direction.

(焦点検出領域の説明)
図6(a)及び図6(b)は、撮影範囲220内における焦点検出領域219の一例を示す図である。図6(a)は、撮影範囲220内に配置された焦点検出領域219を示す図である。上述したように、位相差AF及びコントラストAFは、いずれも焦点検出領域219に対応する画素211から得られた信号に基づいて行われる。焦点検出領域219は、5行5列の複数の焦点検出領域を含み得る。
(Explanation of focus detection area)
FIG. 6A and FIG. 6B are diagrams showing an example of the focus detection area 219 in the shooting range 220. FIG. 6A is a diagram showing the focus detection area 219 arranged in the shooting range 220. As described above, both the phase difference AF and the contrast AF are performed based on the signal obtained from the pixel 211 corresponding to the focus detection area 219. The focus detection area 219 may include a plurality of focus detection areas of 5 rows and 5 columns.

図6(b)は、焦点検出領域219(1,1)〜219(5,5)を示す。括弧内の2つの引数は、焦点検出領域219内の行番号及び列番号をそれぞれ示している。図6(a)、図6(b)に示した例では、焦点検出領域219(1,1)〜219(5,5)は、5行×5列分配置されており、すなわち25個となっている。しかしながら、焦点検出領域219の個数、位置及び大きさは図示したものに限定されない。   FIG. 6B shows the focus detection areas 219 (1,1) to 219 (5,5). The two arguments in parentheses indicate the row number and the column number in the focus detection area 219, respectively. In the example shown in FIGS. 6A and 6B, the focus detection areas 219 (1,1) to 219 (5,5) are arranged in 5 rows × 5 columns, that is, 25 pieces. Has become. However, the number, positions and sizes of the focus detection areas 219 are not limited to those shown in the figure.

(焦点検出処理のフローの説明)
次に、図1を参照して、本実施形態のデジタルカメラ及び付属アプリケーションにおいて行われ得るAF処理の動作に関して説明する。
(Explanation of the flow of focus detection processing)
Next, with reference to FIG. 1, an operation of AF processing that can be performed in the digital camera and the auxiliary application of the present embodiment will be described.

図1は、本実施形態に係るAF処理動作を示すフローチャートである。図1のフローチャートを参照しつつ、AF処理の詳細を説明する。以下のAF処理動作は、他の主体が明記されている場合を除き、カメラMPU125が主体となって実行される。また、カメラMPU125がレンズMPU117にコマンドなどを送信することによってレンズユニット100の駆動や制御を行う場合も、説明を簡潔にするために動作主体をカメラMPU125として記載する場合がある。   FIG. 1 is a flowchart showing an AF processing operation according to this embodiment. Details of the AF process will be described with reference to the flowchart of FIG. The following AF processing operation is executed by the camera MPU 125 as a main body, unless another main body is specified. Also, when the camera MPU 125 drives or controls the lens unit 100 by transmitting a command or the like to the lens MPU 117, the operation subject may be described as the camera MPU 125 for the sake of simplicity.

ステップS1において、カメラMPU125は焦点検出領域219を設定する。ここで設定される焦点検出領域219は、例えば、図6(a)、図6(b)に示されるようなあらかじめ設定された領域であってもよく、主被写体の検出座標によって決定される領域であってもよい。例えば、図6(a)、図6(b)の例では、焦点検出領域219(2,4)に人物の顔が検出可能である。この人物の顔を主被写体とした場合、焦点検出領域219(2,4)を焦点検出領域として設定することができる。   In step S1, the camera MPU 125 sets the focus detection area 219. The focus detection area 219 set here may be, for example, a preset area as shown in FIGS. 6A and 6B, and an area determined by the detection coordinates of the main subject. May be For example, in the example of FIGS. 6A and 6B, the face of a person can be detected in the focus detection area 219 (2,4). When this person's face is the main subject, the focus detection area 219 (2, 4) can be set as the focus detection area.

ここでは、焦点検出領域に対して、複数の焦点検出領域のうちの代表位置座標(x1,y1)を設定する。例えば、位置座標(x1,y1)は、例えば、焦点検出領域219に対する重心座標であってもよい。   Here, representative position coordinates (x1, y1) of the plurality of focus detection areas are set for the focus detection area. For example, the position coordinates (x1, y1) may be barycentric coordinates for the focus detection area 219, for example.

ステップS2において、カメラMPU125は、ステップS1で設定された焦点検出領域に対して、焦点検出結果としてデフォーカス値DEF(第1のデフォーカス値)を算出する。デフォーカス値DEFは、前述した位相差AF又はコントラストAFを適用した焦点検出動作によって求められる。また、本動作を行うカメラMPU125は、デフォーカス値算出手段を構成する。なお、デフォーカス値DEFの算出に先立って、画像信号取得手段として動作するカメラMPU125は、互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得しているものとする。   In step S2, the camera MPU 125 calculates the defocus value DEF (first defocus value) as the focus detection result for the focus detection area set in step S1. The defocus value DEF is obtained by the focus detection operation to which the phase difference AF or the contrast AF described above is applied. Further, the camera MPU 125 that performs this operation constitutes a defocus value calculation means. Note that, prior to the calculation of the defocus value DEF, the camera MPU 125 that operates as an image signal acquisition unit acquires a plurality of image signals based on a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids. I shall.

ステップS3において、カメラMPU125は、BP補正値の算出に必要なAF条件のパラメータ(BP算出条件)を取得する。BP補正値とは、撮影光学系が有する設計上の光学収差及び製造誤差により生じ得る焦点検出誤差を補正するための値である。BP補正値は、フォーカスレンズ104の位置、ズーム状態を示す第1レンズ群101の位置、焦点検出領域219の位置座標(x1,y1)など、撮影光学系の変化及び焦点検出光学系の変化に伴い変化する。そのため、カメラMPU125は、ステップS2においてデフォーカス値の算出を行った際の、フォーカスレンズ104の位置、ズーム状態を示す第1レンズ群101の位置、焦点検出領域219の位置座標(x1,y1)などの情報を取得する。   In step S3, the camera MPU 125 acquires a parameter of the AF condition (BP calculation condition) necessary for calculating the BP correction value. The BP correction value is a value for correcting focus detection error that may occur due to design optical aberration and manufacturing error of the photographing optical system. The BP correction value is used for changes in the photographing optical system and changes in the focus detection optical system, such as the position of the focus lens 104, the position of the first lens group 101 indicating the zoom state, and the position coordinates (x1, y1) of the focus detection area 219. It changes with it. Therefore, the camera MPU 125 calculates the defocus value in step S2, the position of the focus lens 104, the position of the first lens group 101 indicating the zoom state, and the position coordinates (x1, y1) of the focus detection area 219. Get information such as.

さらに、本実施形態の撮影光学系は瞳分割の機能を有するため、本ステップにおいてカメラMPU125は、焦点検出時及び撮影時に使用する信号に対応する瞳領域に関する情報(瞳領域情報)を取得する。例えば、焦点検出時には撮影光学系の瞳領域のほぼ全域を通過した光束に基づく信号を用いてコントラストAFを行い、撮影画像用には、光電変換部211aに対応する瞳領域に対応する信号を用いるものとする。この場合には、カメラMPU125は、瞳領域情報として、焦点検出時の瞳領域が瞳領域TLであり、撮影時の瞳領域が瞳領域EP1aであることを示す情報を取得する。なお、撮影画像とは、鑑賞用の画像を指し、撮影とは、新たに取得したデータ又は既に取得したデータから撮影画像を生成するための画像取得の処理を含む。   Furthermore, since the photographing optical system of the present embodiment has a pupil division function, the camera MPU 125 acquires information (pupil region information) regarding the pupil region corresponding to the signals used during focus detection and photographing in this step. For example, at the time of focus detection, contrast AF is performed using a signal based on a light beam that has passed almost the entire pupil area of the photographic optical system, and for a captured image, a signal corresponding to the pupil area corresponding to the photoelectric conversion unit 211a is used. I shall. In this case, the camera MPU 125 acquires, as the pupil area information, information indicating that the pupil area at the time of focus detection is the pupil area TL and the pupil area at the time of shooting is the pupil area EP1a. It should be noted that the captured image refers to an image for viewing, and the capturing includes image acquisition processing for generating a captured image from newly acquired data or already acquired data.

ステップS4において、カメラMPU125は、焦点検出に関する焦点検出情報を設定する。ここでは、ステップS3で取得したBP算出条件を、焦点検出情報のパラメータとして設定する。焦点検出情報の例を図7(a)及び図7(b)に示す。図7(a)及び図7(b)は、焦点検出情報の例として、焦点状態を評価するコントラストの方向(水平,垂直)、色(赤,緑,青)及び空間周波数(Fq1,Fq2,Fq3,Fq4)の各組み合わせに対する、重み付けの大きさを示す情報についての表である。ここで設定される重み付け情報は、あらかじめ設定されている値であってもよく、検出された被写体情報に応じて変更される値としてもよいが、焦点検出用と撮影用とで、異なる情報を有するように設定する。   In step S4, the camera MPU 125 sets focus detection information regarding focus detection. Here, the BP calculation condition acquired in step S3 is set as a parameter of focus detection information. Examples of focus detection information are shown in FIGS. 7A and 7B. FIGS. 7A and 7B show, as examples of focus detection information, the directions of contrast (horizontal, vertical), colors (red, green, blue) and spatial frequencies (Fq1, Fq2, Fq1, Fq2, which evaluate the focus state. It is a table about the information which shows the magnitude of weighting with respect to each combination (Fq3, Fq4). The weighting information set here may be a preset value or a value that is changed according to the detected subject information, but different information is used for focus detection and shooting. Set to have.

ここで、K_AF_H、K_AF_V、K_IMG_H、K_IMG_Vは、焦点検出、撮影に関する方向に対応する係数である。K_AF_R、K_AF_G、K_AF_B、K_IMG_R、K_IMG_G、K_IMG_Bは、焦点検出、撮影に関する各色に対応する係数である。K_AF_Fq1〜K_AF_Fq4、K_IMG_Fq1〜K_IMG_Fq4は焦点検出、撮影に関する各空間周波数に対応する係数である。   Here, K_AF_H, K_AF_V, K_IMG_H, and K_IMG_V are coefficients corresponding to directions related to focus detection and shooting. K_AF_R, K_AF_G, K_AF_B, K_IMG_R, K_IMG_G, and K_IMG_B are coefficients corresponding to each color for focus detection and shooting. K_AF_Fq1 to K_AF_Fq4 and K_IMG_Fq1 to K_IMG_Fq4 are coefficients corresponding to each spatial frequency relating to focus detection and photographing.

重み付けの大きさの具体例を説明する。一例として、コントラストの方向が水平方向で緑色の信号を用い、空間周波数Fq1におけるコントラストAFの結果を補正する場合、焦点検出用の設定情報は、以下のように設定される。
K_AF_H=1
K_AF_V=0
K_AF_R=0
K_AF_G=1
K_AF_B=0
K_AF_Fq1=1
K_AF_Fq2=0
K_AF_Fq3=0
K_AF_Fq4=0
A specific example of the weighting magnitude will be described. As an example, when a contrast signal is horizontal and a green signal is used to correct the result of the contrast AF at the spatial frequency Fq1, the focus detection setting information is set as follows.
K_AF_H = 1
K_AF_V = 0
K_AF_R = 0
K_AF_G = 1
K_AF_B = 0
K_AF_Fq1 = 1
K_AF_Fq2 = 0
K_AF_Fq3 = 0
K_AF_Fq4 = 0

このような設定情報により、焦点検出用の信号のデフォーカスMTF(Modulation Transfer Function)のピーク情報は、水平方向で緑色の信号の特性と同じであることを示すことができる。一方、撮影用の設定情報は、例えば以下のように設定される。
K_IMG_H=0.5
K_IMG_V=0.5
K_IMG_R=0.25
K_IMG_G=0.5
K_IMG_B=0.25
K_IMG_Fq1=0
K_IMG_Fq2=0
K_IMG_Fq3=1
K_IMG_Fq4=0
With such setting information, it can be shown that the peak information of the defocus MTF (Modulation Transfer Function) of the focus detection signal is the same as the characteristic of the green signal in the horizontal direction. On the other hand, the setting information for photographing is set as follows, for example.
K_IMG_H = 0.5
K_IMG_V = 0.5
K_IMG_R = 0.25
K_IMG_G = 0.5
K_IMG_B = 0.25
K_IMG_Fq1 = 0
K_IMG_Fq2 = 0
K_IMG_Fq3 = 1
K_IMG_Fq4 = 0

このような設定情報により、RGBの信号をY信号相当に変換するための重み付けが行われ、撮影画像はY信号(白色)で評価される。また、水平方向及び垂直方向のいずれの方向のコントラストも同等の重みで評価され、焦点検出時とは異なる空間周波数Fq3で評価される。   With such setting information, weighting is performed to convert the RGB signal into the Y signal, and the captured image is evaluated with the Y signal (white). Further, the contrast in both the horizontal direction and the vertical direction is evaluated with the same weight, and is evaluated at the spatial frequency Fq3 different from that at the time of focus detection.

ステップS4_2からステップS5において、収差情報取得手段として動作するカメラMPU125は、瞳領域情報重み付け係数を用いた演算により、焦点検出又は撮影に対応する収差情報を取得する。   In steps S4_2 to S5, the camera MPU 125 that operates as the aberration information acquisition unit acquires the aberration information corresponding to the focus detection or the photographing by the calculation using the pupil area information weighting coefficient.

ステップS4_2において、カメラMPU125は、ステップS3で取得された瞳領域に対応する複数の瞳領域情報重み付け係数を取得する。K_AF_PTL、K_AF_PA、K_AF_PBは、焦点検出に用いられる画像信号と複数の瞳領域の各々との対応関係を示す第1の重み付け情報である。K_IMG_PTL、K_IMG_PA、K_IMG_PBは撮影(画像取得)に用いられる画像信号と複数の瞳領域との対応関係を示す第2の重み付け情報である。例えば、ステップS3において、焦点検出時の瞳領域がTL、撮影時の瞳領域がEP1aとして設定されていた場合には、瞳領域情報重み付け係数は以下のように設定される。
K_AF_PTL=1
K_AF_PA=0
K_AF_PB=0
K_IMG_PTL=0
K_IMG_PA=1
K_IMG_PB=0
In step S4_2, the camera MPU 125 acquires a plurality of pupil area information weighting coefficients corresponding to the pupil area acquired in step S3. K_AF_PTL, K_AF_PA, K_AF_PB are first weighting information indicating the correspondence between the image signal used for focus detection and each of the plurality of pupil regions. K_IMG_PTL, K_IMG_PA, and K_IMG_PB are second weighting information indicating the correspondence relationship between the image signal used for imaging (image acquisition) and a plurality of pupil regions. For example, in step S3, if the pupil area at the time of focus detection is set as TL and the pupil area at the time of shooting is set as EP1a, the pupil area information weighting coefficient is set as follows.
K_AF_PTL = 1
K_AF_PA = 0
K_AF_PB = 0
K_IMG_PTL = 0
K_IMG_PA = 1
K_IMG_PB = 0

ただし、上述の具体的な設定値は一例であり、これに限られない。また重み付けを設定する設定値の種類なども一例であり、これに限らない。   However, the specific set values described above are examples, and the present invention is not limited to this. Further, the type of setting value for setting weighting is also an example, and the present invention is not limited to this.

ステップS5において、カメラMPU125は、瞳領域情報重み付け係数を用いて収差情報を取得する。ここで、収差情報とは、ステップS3及びステップS4で設定されたBP算出条件での光学系の収差状態を表す情報であり、例えば、被写体の色、方向、空間周波数ごとの撮影光学系の結像位置に関する情報である。   In step S5, the camera MPU 125 acquires the aberration information using the pupil area information weighting coefficient. Here, the aberration information is information indicating the aberration state of the optical system under the BP calculation conditions set in step S3 and step S4, and, for example, the connection of the imaging optical system for each color, direction, and spatial frequency of the subject. This is information about the image position.

図8(a)、図8(b)を参照しつつ、記憶手段であるRAM125b(カメラメモリ)又はレンズメモリ118に格納されている空間周波数に対応する収差情報の例を説明する。図8(a)は、撮影光学系のデフォーカスMTFを示すグラフである。横軸は、フォーカスレンズ104の位置を示しており、縦軸はMTFを示している。図8(a)に描かれている4種の曲線(MTF1、MTF2、MTF3、MTF4)は、4種類の空間周波数にそれぞれ対応するデフォーカスMTF曲線である。すなわち、4つのデフォーカスMTF曲線は、MTF1、MTF2、MTF3、MTF4の順に、空間周波数が低い方から高い方に変化した場合におけるMTFの極大値の変化を示している。空間周波数Fq1(lp/mm)のデフォーカスMTF曲線がMTF1と対応し、同様に、空間周波数Fq2、Fq3、Fq4(lp/mm)のデフォーカスMTF曲線がMTF2、MTF3、MTF4とそれぞれ対応する。また、LP4、LP5、LP6、LP7は、各デフォーカスMTF曲線MTF1、MTF2、MTF3、MTF4がそれぞれ極大値になるときのフォーカスレンズ104の位置を示している。なお、図中の空間周波数Nqは撮像素子122の画素ピッチに依存するナイキスト周波数を示す。   An example of the aberration information corresponding to the spatial frequency stored in the RAM 125b (camera memory) or the lens memory 118, which is a storage unit, will be described with reference to FIGS. 8A and 8B. FIG. 8A is a graph showing the defocus MTF of the photographing optical system. The horizontal axis shows the position of the focus lens 104, and the vertical axis shows the MTF. The four types of curves (MTF1, MTF2, MTF3, MTF4) depicted in FIG. 8A are defocus MTF curves respectively corresponding to four types of spatial frequencies. That is, the four defocus MTF curves show changes in the maximum value of the MTF when the spatial frequency changes from the lower spatial frequency to the higher spatial frequency in the order of MTF1, MTF2, MTF3, and MTF4. The defocus MTF curve of the spatial frequency Fq1 (lp / mm) corresponds to MTF1, and similarly, the defocus MTF curve of the spatial frequencies Fq2, Fq3, and Fq4 (lp / mm) corresponds to MTF2, MTF3, and MTF4, respectively. Further, LP4, LP5, LP6, and LP7 indicate the positions of the focus lens 104 when the defocus MTF curves MTF1, MTF2, MTF3, and MTF4 have respective maximum values. The spatial frequency Nq in the figure indicates the Nyquist frequency depending on the pixel pitch of the image sensor 122.

図8(b)に、本実施形態における収差情報の例を示す。図8(b)は、図8(a)のデフォーカスMTFが極大値となるフォーカスレンズ104の位置(ピーク位置)と空間周波数の関係を示すグラフである。MTF_P_RH、…、MTF_P_BVで示される6種類の曲線は、色と方向の組み合わせが異なるものである。添字の(R,G,B)が色(赤,緑,青)を示しており、添字の(H,V)が方向(水平,垂直)を示している。例えば、色が赤で方向が水平の場合に対応する収差情報であるMTF_P_RHの曲線は、空間周波数fと焦点検出領域219の位置座標(x1,y1)を変数(x,y)とし、収差係数rh(n)(nは0から8の整数)を係数とした以下の式で表現される。
MTF_P_RH(f,x,y)
=(rh(0)×x+rh(1)×y+rh(2))×f
+(rh(3)×x+rh(4)×y+rh(5))×f
+(rh(6)×x+rh(7)×y+rh(8)) (1)
FIG. 8B shows an example of the aberration information in this embodiment. FIG. 8B is a graph showing the relationship between the position (peak position) of the focus lens 104 where the defocus MTF of FIG. 8A has a maximum value and the spatial frequency. The six types of curves indicated by MTF_P_RH, ..., MTF_P_BV have different combinations of color and direction. The subscripts (R, G, B) indicate the colors (red, green, blue), and the subscripts (H, V) indicate the directions (horizontal, vertical). For example, the curve of MTF_P_RH, which is the aberration information corresponding to the case where the color is red and the direction is horizontal, has the spatial frequency f and the position coordinates (x1, y1) of the focus detection area 219 as variables (x, y), and the aberration coefficient It is expressed by the following equation using rh (n) (n is an integer from 0 to 8) as a coefficient.
MTF_P_RH (f, x, y)
= (Rh (0) × x + rh (1) × y + rh (2)) × f 2
+ (Rh (3) × x + rh (4) × y + rh (5)) × f
+ (Rh (6) × x + rh (7) × y + rh (8)) (1)

本実施形態において、rh(n)は、レンズユニット100のRAM125b(カメラメモリ)又はレンズメモリ118にあらかじめ記憶されるものとする。カメラMPU125は、レンズMPU117に要求してレンズメモリ118からrh(n)を取得する。しかしながら、rh(n)はRAM125bの不揮発性領域に記憶されていてもよい。この場合、カメラMPU125は、rh(n)をRAM125bから取得する。   In the present embodiment, it is assumed that rh (n) is stored in advance in the RAM 125b (camera memory) of the lens unit 100 or the lens memory 118. The camera MPU 125 requests the lens MPU 117 to acquire rh (n) from the lens memory 118. However, rh (n) may be stored in the nonvolatile area of the RAM 125b. In this case, the camera MPU 125 acquires rh (n) from the RAM 125b.

その他の曲線も式(1)と同様の式で表現される。赤と垂直(MTF_P_RV)、緑と水平(MTF_P_GH)、緑と垂直(MTF_P_GV)、青と水平(MTF_P_BH)、青と垂直(MTF_P_BV)の各組み合わせにおける係数(rv,gh,gv,bh,bv)とする。これらの係数も同様にRAM125b又はレンズメモリ118に記憶されており、カメラMPU125の要求により取得される。   Other curves are also expressed by the same formula as the formula (1). Coefficients (rv, gh, gv, bh, bv) for each combination of red and vertical (MTF_P_RV), green and horizontal (MTF_P_GH), green and vertical (MTF_P_GV), blue and horizontal (MTF_P_BH), and blue and vertical (MTF_P_BV). And Similarly, these coefficients are also stored in the RAM 125b or the lens memory 118, and are acquired by the request of the camera MPU 125.

さらに、本実施形態においては、RAM125b又はレンズメモリ118は、各瞳領域に対応して、収差情報を記憶する。各瞳領域に対応した式(1)の収差情報を得るための処理について説明する。   Furthermore, in the present embodiment, the RAM 125b or the lens memory 118 stores aberration information corresponding to each pupil area. A process for obtaining the aberration information of Expression (1) corresponding to each pupil region will be described.

RAM125b又はレンズメモリ118に記憶される係数を図9に示す。図9において、例えば、rh_TL(n)は、赤、水平及び瞳領域TLの条件に対応する係数であり、gv_A(n)は、緑、垂直及び瞳領域EP1aの条件に対応する係数である。   FIG. 9 shows the coefficients stored in the RAM 125b or the lens memory 118. In FIG. 9, for example, rh_TL (n) is a coefficient corresponding to the conditions of red, horizontal, and pupil area TL, and gv_A (n) is a coefficient corresponding to the conditions of green, vertical, and pupil area EP1a.

カメラMPU125は、焦点検出時における瞳領域、又は記録時若しくは鑑賞時に使用する撮影画像の瞳領域に対応した収差情報を、ステップS4_2で設定された瞳領域重み付け係数に従って選択する。ここで瞳領域重み付け係数は、図7(c)に示す、K_AF_PTL、K_AF_PA、K_AF_PB、K_IMG_PTL、K_IMG_PA、K_IMG_PBである。   The camera MPU 125 selects aberration information corresponding to the pupil area at the time of focus detection or the pupil area of the captured image used at the time of recording or viewing according to the pupil area weighting coefficient set in step S4_2. Here, the pupil area weighting coefficients are K_AF_PTL, K_AF_PA, K_AF_PB, K_IMG_PTL, K_IMG_PA, and K_IMG_PB shown in FIG. 7C.

瞳領域重み付け係数は、焦点検出用と撮影画像用とで異なる値となっているので、瞳領域重み付け係数と図9に示す係数に基づき、焦点検出用の収差係数rh_AF(n)と撮影画像用の収差係数rh_IMG(n)が得られる。焦点検出用の収差係数rh_AF(n)と撮影画像用の収差係数rh_IMG(n)は、以下の式(2)及び式(3)を用いて表される。   Since the pupil area weighting coefficient has different values for the focus detection and the captured image, the focus area aberration coefficient rh_AF (n) and the captured image are calculated based on the pupil area weighting coefficient and the coefficient shown in FIG. The aberration coefficient rh_IMG (n) of is obtained. The aberration coefficient rh_AF (n) for focus detection and the aberration coefficient rh_IMG (n) for a captured image are expressed using the following equations (2) and (3).

rh_AF(n)
=rh_TL(n)×K_AF_PTL
+rh_A(n)×K_AF_PA
+rh_B(n)×K_AF_PB (2)
rh_IMG(n)
=rh_TL(n)×K_IMG_PTL
+rh_A(n)×K_IMG_PA
+rh_B(n)×K_IMG_PB (3)
rh_AF (n)
= Rh_TL (n) × K_AF_PTL
+ Rh_A (n) x K_AF_PA
+ Rh_B (n) × K_AF_PB (2)
rh_IMG (n)
= Rh_TL (n) × K_IMG_PTL
+ Rh_A (n) x K_IMG_PA
+ Rh_B (n) × K_IMG_PB (3)

上述のステップS4_2の説明で例示した瞳領域情報重み付け係数を用いて、式(2)、式(3)を計算して収差係数の重み付けを行うと、以下の式(2’)及び式(3’)が得られる。
rh_AF(n)=rh_TL(n) (2’)
rh_IMG(n)=rh_A(n) (3’)
When the equation (2) and the equation (3) are calculated and the aberration coefficient is weighted using the pupil region information weighting coefficient exemplified in the above description of step S4_2, the following equation (2 ′) and equation (3) are obtained. ') Is obtained.
rh_AF (n) = rh_TL (n) (2 ')
rh_IMG (n) = rh_A (n) (3 ′)

式(2’)及び式(3’)は、焦点検出時には、射出瞳全体に対応する収差状態に基づき後述するBP補正値の演算が行われ、撮像画像の記録時等には、瞳領域EP1aの収差状態に基づき後述するBP補正値の演算が行われることを意味する。   In the expressions (2 ′) and (3 ′), the BP correction value, which will be described later, is calculated based on the aberration state corresponding to the entire exit pupil at the time of focus detection, and when the captured image is recorded, the pupil region EP1a is calculated. It means that a BP correction value, which will be described later, is calculated based on the aberration state.

なお、上述の説明では、色が赤で、方向が水平の場合の係数について例示したが、他の色、方向においても、同様の処理が可能である。   In the above description, the coefficient in the case where the color is red and the direction is horizontal has been exemplified, but the same processing can be performed for other colors and directions.

焦点検出用の収差係数rh_AF(n)を式(1)のrh(n)に代入すると、図10(a)に示すように各色、各方向に対応した空間周波数ごとのデフォーカスMTFの極大値が得られる。撮影画像用の収差係数rh_IMG(n)を式(1)のrh(n)に代入すると、同様に、図10(a)に示すように各色、各方向に対応した空間周波数ごとのデフォーカスMTFの極大値が得られる。このようにして、焦点検出用及び撮影画像用のそれぞれに対応する収差情報を取得することができる。   Substituting the aberration coefficient rh_AF (n) for focus detection into rh (n) of the equation (1), the maximum value of the defocus MTF for each spatial frequency corresponding to each color and each direction as shown in FIG. Is obtained. Substituting the aberration coefficient rh_IMG (n) for the captured image into rh (n) of the equation (1), similarly, as shown in FIG. 10A, the defocus MTF for each spatial frequency corresponding to each color and each direction. The maximum value of is obtained. In this way, the aberration information corresponding to each of the focus detection and the captured image can be acquired.

このように、本実施形態によれば、焦点検出、撮影画像の各々について、瞳領域に対応する収差情報を選択し用いることができる。これにより、瞳領域ごとの収差の差を考慮した補正が可能となる。これにより、高精度なBP補正値の算出が可能である。   As described above, according to the present embodiment, it is possible to select and use the aberration information corresponding to the pupil region for each of the focus detection and the captured image. As a result, it becomes possible to perform correction in consideration of the difference in aberration between the pupil regions. Accordingly, it is possible to calculate the BP correction value with high accuracy.

なお、瞳分割数(本実施形態では2個)、瞳分割の方向等の瞳分割の方法は本実施形態の方法に限定されるものではない。瞳分割の個数、方向等は、適宜変更し得る。また、レンズメモリ118に記憶される収差情報の情報量を低減するために、選択される瞳領域の面積が等しいか又は近い場合には、共通の収差情報を用いてもよい。例えば、図4(b)のように瞳領域が線対称の系である場合には、製造誤差が大きい場合などを除き、収差情報は近い特性を持つ。よって、収差情報を共通化してもよい。   Note that the number of pupil divisions (two in this embodiment), the pupil division method such as the direction of pupil division, is not limited to the method of this embodiment. The number of pupil divisions, the direction, and the like can be changed as appropriate. Further, in order to reduce the information amount of the aberration information stored in the lens memory 118, common aberration information may be used when the areas of the selected pupil regions are equal to or close to each other. For example, when the pupil region is a line-symmetrical system as shown in FIG. 4B, the aberration information has similar characteristics except when the manufacturing error is large. Therefore, the aberration information may be shared.

本実施形態のように収差情報を関数化し、各項の係数を収差係数として記憶させておくことにより、数値データのまま記憶させた場合と比べてレンズメモリ118又はRAM125b(カメラメモリ)に記憶されるデータ量が削減される。また、撮影光学系の変化及び焦点検出光学系の変化に対応することも可能となる。   By converting the aberration information into a function and storing the coefficient of each term as the aberration coefficient as in the present embodiment, the numerical value data is stored in the lens memory 118 or the RAM 125b (camera memory) as compared with the case where the numerical data is stored. The amount of data to be saved is reduced. It is also possible to deal with changes in the photographing optical system and changes in the focus detection optical system.

ステップS6において、補正値算出手段として機能するカメラMPU125は、ステップS4で取得した焦点検出情報と、ステップS5で取得した瞳領域に対応した収差情報から、BP補正値を算出する。ここでは、焦点検出に対応する光学系の収差情報BP1と、撮影画像に対応する光学系の収差情報BP2と、ステップS4で設定された色、方向、周波数の重み付け係数である焦点検出情報とを用いて、BP補正値を算出する例を説明する。   In step S6, the camera MPU 125 functioning as a correction value calculating unit calculates a BP correction value from the focus detection information acquired in step S4 and the aberration information corresponding to the pupil area acquired in step S5. Here, the aberration information BP1 of the optical system corresponding to the focus detection, the aberration information BP2 of the optical system corresponding to the captured image, and the focus detection information that is the weighting coefficient of the color, direction, and frequency set in step S4 are set. An example of calculating the BP correction value will be described with reference to FIG.

まず、前述したように、式(1)のx,yに、焦点検出領域219の位置情報(x1,y1)を代入する。この計算により式(1)は、係数Arh、Brh及びCrhを用いて以下の式(4)のような形式で表される。
MTF_P_RH1(f)=Arh1×f+Brh1×f+Crh1 (4)
First, as described above, the position information (x1, y1) of the focus detection area 219 is substituted for x, y in the equation (1). By this calculation, the equation (1) is expressed in the following equation (4) using the coefficients Arh, Brh, and Crh.
MTF_P_RH1 (f) = Arh1 × f 2 + Brh1 × f + Crh1 (4)

カメラMPU125は、同様にして、焦点検出に関する収差情報MTF_P_RV1(f)、MTF_P_GH1(f)、MTF_P_GV1(f)、MTF_P_BH1(f)、MTF_P_BV1(f)を計算する。また、カメラMPU125は、同様にして、撮影画像に関する収差情報MTF_P_RH2(f)、MTF_P_RV2(f)、MTF_P_GH2(f)、MTF_P_GV2(f)、MTF_P_BH2(f)、MTF_P_BV2(f)を計算する。   Similarly, the camera MPU 125 calculates aberration information MTF_P_RV1 (f), MTF_P_GH1 (f), MTF_P_GV1 (f), MTF_P_BH1 (f), and MTF_P_BV1 (f) regarding focus detection. Further, the camera MPU 125 similarly calculates the aberration information MTF_P_RH2 (f), MTF_P_RV2 (f), MTF_P_GH2 (f), MTF_P_GV2 (f), MTF_P_BH2 (f), MTF_P_BV2 (f) regarding the captured image.

図10(a)、図10(b)に示されるとおり、色収差、縦横方向の収差により、各曲線は乖離する。色収差が大きい場合には、色ごとの曲線が大きく乖離し、収差の縦横差が大きい場合には、水平方向と垂直方向に対応する曲線が大きく乖離する。このように、本実施形態では、色(R,G,B)と評価方向(H,V)との組み合わせごとに、空間周波数に対応したデフォーカスMTF情報を得ることができる。   As shown in FIGS. 10A and 10B, the respective curves deviate due to the chromatic aberration and the longitudinal and lateral aberrations. When the chromatic aberration is large, the curves for each color deviate greatly, and when the vertical and horizontal differences in aberration are large, the curves corresponding to the horizontal direction and the vertical direction deviate greatly. As described above, in this embodiment, the defocus MTF information corresponding to the spatial frequency can be obtained for each combination of the color (R, G, B) and the evaluation direction (H, V).

次に、カメラMPU125は、ステップS4で取得した焦点検出情報を構成する係数(図7(a)、図7(b))で、各瞳領域に対応する収差情報を重み付けする。この動作により、収差情報が、焦点検出及び撮影画像について評価する色及び方向に関して重み付けされる。具体的には、カメラMPU125は、焦点検出用の空間周波数特性である収差情報MTF_P_AF(f)と撮影画像用の空間周波数特性である収差情報MTF_P_IMG(f)を、式(5)及び式(6)を用いて算出する。   Next, the camera MPU 125 weights the aberration information corresponding to each pupil region with the coefficient (FIGS. 7A and 7B) that constitutes the focus detection information acquired in step S4. By this operation, the aberration information is weighted with respect to focus detection and color and direction evaluated for the captured image. Specifically, the camera MPU 125 calculates the aberration information MTF_P_AF (f), which is the spatial frequency characteristic for focus detection, and the aberration information MTF_P_IMG (f), which is the spatial frequency characteristic for the captured image, using equations (5) and (6). ) Is used to calculate.

MTF_P_AF(f)
=K_AF_R×K_AF_H×MTF_P_RH1(f)
+K_AF_R×K_AF_V×MTF_P_RV1(f)
+K_AF_G×K_AF_H×MTF_P_GH1(f)
+K_AF_G×K_AF_V×MTF_P_GV1(f)
+K_AF_B×K_AF_H×MTF_P_BH1(f)
+K_AF_B×K_AF_V×MTF_P_BV1(f) (5)
MTF_P_IMG(f)
=K_IMG_R×K_IMG_H×MTF_P_RH2(f)
+K_IMG_R×K_IMG_V×MTF_P_RV2(f)
+K_IMG_G×K_IMG_H×MTF_P_GH2(f)
+K_IMG_G×K_IMG_V×MTF_P_GV2(f)
+K_IMG_B×K_IMG_H×MTF_P_BH2(f)
+K_IMG_B×K_IMG_V×MTF_P_BV2(f) (6)
MTF_P_AF (f)
= K_AF_R × K_AF_H × MTF_P_RH1 (f)
+ K_AF_R × K_AF_V × MTF_P_RV1 (f)
+ K_AF_G × K_AF_H × MTF_P_GH1 (f)
+ K_AF_G × K_AF_V × MTF_P_GV1 (f)
+ K_AF_B × K_AF_H × MTF_P_BH1 (f)
+ K_AF_B × K_AF_V × MTF_P_BV1 (f) (5)
MTF_P_IMG (f)
= K_IMG_R × K_IMG_H × MTF_P_RH2 (f)
+ K_IMG_R × K_IMG_V × MTF_P_RV2 (f)
+ K_IMG_G × K_IMG_H × MTF_P_GH2 (f)
+ K_IMG_G × K_IMG_V × MTF_P_GV2 (f)
+ K_IMG_B × K_IMG_H × MTF_P_BH2 (f)
+ K_IMG_B × K_IMG_V × MTF_P_BV2 (f) (6)

図11は、上述の式(5)、式(6)により得られたMTF_P_AF(f)とMTF_P_IMG(f)を示すグラフである。図11には、離散的な空間周波数Fq1からFq4について、デフォーカスMTFがピーク(極大値)となるフォーカスレンズ104の位置(ピーク位置)LP4_AF、LP5_AF、LP6_AF、LP7_AFが縦軸に示されている。   FIG. 11 is a graph showing MTF_P_AF (f) and MTF_P_IMG (f) obtained by the above equations (5) and (6). In FIG. 11, the positions (peak positions) LP4_AF, LP5_AF, LP6_AF, and LP7_AF of the focus lens 104 where the defocus MTF has a peak (maximum value) are shown on the vertical axis for the discrete spatial frequencies Fq1 to Fq4. .

次に、カメラMPU125は、撮影画像の合焦位置(P_IMG)とAFで検出される合焦位置(P_AF)を、以下の式(7)及び(8)に従って算出する。算出には、空間周波数特性に係る収差情報MTF_P_AF(f)、MTF_P_IMG(f)と、ステップS4で得た評価帯域K_IMG_Fq1〜Fq4、K_AF_Fq1〜Fq4を用いる。   Next, the camera MPU 125 calculates the in-focus position (P_IMG) of the captured image and the in-focus position (P_AF) detected by AF according to the following equations (7) and (8). For the calculation, the aberration information MTF_P_AF (f) and MTF_P_IMG (f) related to the spatial frequency characteristic and the evaluation bands K_IMG_Fq1 to Fq4 and K_AF_Fq1 to Fq4 obtained in step S4 are used.

P_IMG
=MTF_P_IMG(1)×K_IMG_Fq1
+MTF_P_IMG(2)×K_IMG_Fq2
+MTF_P_IMG(3)×K_IMG_Fq3
+MTF_P_IMG(4)×K_IMG_Fq4 (7)
P_AF
=MTF_P_AF(1)×K_AF_Fq1
+MTF_P_AF(2)×K_AF_Fq2
+MTF_P_AF(3)×K_AF_Fq3
+MTF_P_AF(4)×K_AF_Fq4 (8)
P_IMG
= MTF_P_IMG (1) × K_IMG_Fq1
+ MTF_P_IMG (2) × K_IMG_Fq2
+ MTF_P_IMG (3) × K_IMG_Fq3
+ MTF_P_IMG (4) × K_IMG_Fq4 (7)
P_AF
= MTF_P_AF (1) × K_AF_Fq1
+ MTF_P_AF (2) × K_AF_Fq2
+ MTF_P_AF (3) × K_AF_Fq3
+ MTF_P_AF (4) × K_AF_Fq4 (8)

すなわち、カメラMPU125は、図11に示される空間周波数ごとのデフォーカスMTFの極大値情報を、K_IMG_FQ、K_AF_FQで重み付け加算する。それにより、撮影画像の合焦位置(P_IMG)とAFで検出される合焦位置(P_AF)を算出している。   That is, the camera MPU 125 weights and adds the maximum value information of the defocus MTF for each spatial frequency shown in FIG. 11 with K_IMG_FQ and K_AF_FQ. Thereby, the focus position (P_IMG) of the captured image and the focus position (P_AF) detected by AF are calculated.

次にカメラMPU125は、BP補正値(BP)を、以下の式(9)により算出する。
BP=P_AF−P_IMG (9)
Next, the camera MPU 125 calculates the BP correction value (BP) by the following equation (9).
BP = P_AF-P_IMG (9)

ステップS7において、デフォーカス値補正手段として機能するカメラMPU125は、以下の式(10)により、デフォーカス値DEFを補正することにより焦点検出結果の補正を行う。補正後のデフォーカス値をcDEF(第2のデフォーカス値)とする。なお、ここで用いられるデフォーカス値は、前述したように、コントラストAFで得られるものであってもよく、位相差AFで得られるものであってもよい。
cDEF=DEF−BP (10)
In step S7, the camera MPU 125, which functions as the defocus value correction unit, corrects the focus detection result by correcting the defocus value DEF according to the following equation (10). The corrected defocus value is set to cDEF (second defocus value). The defocus value used here may be one obtained by contrast AF or one obtained by phase difference AF, as described above.
cDEF = DEF-BP (10)

ステップS8において、焦点制御手段として動作するカメラMPU125が、ステップS7で得られたデフォーカス値cDEF分だけフォーカスレンズ104を駆動させるように、フォーカスアクチュエータ113を制御する。この動作により、撮影光学系の焦点位置が補正を考慮した合焦位置となるようにフォーカスレンズ104が駆動される。以上によりAF処理が完了する。   In step S8, the camera MPU 125, which operates as the focus control unit, controls the focus actuator 113 so as to drive the focus lens 104 by the defocus value cDEF obtained in step S7. By this operation, the focus lens 104 is driven so that the focus position of the photographing optical system becomes the in-focus position in consideration of the correction. With the above, the AF process is completed.

本実施形態では、焦点検出領域219の位置、評価する色及び方向に関する処理を、空間周波数に関する処理よりも先行して実行している。これは、撮影者が焦点検出領域219の位置を設定するモードの場合、焦点検出領域219の位置、評価する色及び方向に関する情報は変更される頻度が低いためである。   In the present embodiment, the processing regarding the position of the focus detection area 219, the color and the direction to be evaluated are executed prior to the processing regarding the spatial frequency. This is because in the mode in which the photographer sets the position of the focus detection area 219, the information about the position of the focus detection area 219, the evaluated color, and the direction is changed less frequently.

一方で、信号の評価する空間周波数については、撮像素子122の読出しモード、AF評価信号に係るデジタルフィルタなどにより変更される頻度が高い。例えば、信号のS/N比が低下する低輝度環境では、デジタルフィルタの帯域をより低帯域に変更することなどがあり得る。そのため、変更の頻度が低い係数(ピーク係数)を算出後に記憶しておき、変更の頻度の高い係数(空間周波数)のみを必要に応じて計算し、BP補正値の算出を行ってもよい。これにより、撮影者が焦点検出領域の位置を設定する場合などには、評価する空間周波数の係数のみを更新して処理することが可能であり、演算量を低減することができる。   On the other hand, the spatial frequency evaluated by the signal is frequently changed by the read mode of the image sensor 122, the digital filter related to the AF evaluation signal, and the like. For example, in a low-luminance environment in which the S / N ratio of the signal decreases, the band of the digital filter may be changed to a lower band. Therefore, the coefficient having a low change frequency (peak coefficient) may be stored after the calculation, and only the coefficient having a high change frequency (spatial frequency) may be calculated as necessary to calculate the BP correction value. Thereby, when the photographer sets the position of the focus detection area, only the coefficient of the spatial frequency to be evaluated can be updated and processed, and the amount of calculation can be reduced.

本実施形態によれば、一部の瞳領域を通過した光束に基づく信号が焦点検出信号又は撮影画像に使用される場合であっても、その瞳領域に対応した収差情報を選択可能であるため、高精度な焦点検出結果補正が可能である。さらに、本実施形態によれば、瞳領域ごとのレンズの収差情報と、カメラの重み付け係数とを用いてBP補正値を算出することができる。そのため、各カメラ、焦点検出モード、撮影モードに対応するBP補正値を個別に記憶しておかなくても、レンズの収差情報を用いてカメラがBP補正値を算出することができるため、焦点検出結果補正のための記憶容量を低減することができる。   According to this embodiment, even when the signal based on the light flux that has passed through a part of the pupil region is used for the focus detection signal or the captured image, the aberration information corresponding to the pupil region can be selected. Highly accurate focus detection result correction is possible. Furthermore, according to the present embodiment, the BP correction value can be calculated using the aberration information of the lens for each pupil region and the weighting coefficient of the camera. Therefore, the camera can calculate the BP correction value using the aberration information of the lens without separately storing the BP correction value corresponding to each camera, the focus detection mode, and the shooting mode. The storage capacity for result correction can be reduced.

さらに、交換可能なレンズユニット100(交換レンズ)とカメラ本体200とを組み合わせたカメラシステムにおいて、BP補正値の算出に必要な収差情報などの情報をレンズユニット100とカメラ本体200に分けて記憶させてもよい。例えば、レンズユニット100内のレンズメモリ118に収差情報を記憶させておき、カメラ本体200のRAM125bに重み付け係数を記憶させておく構成であってもよい。この構成によれば、レンズユニット100とカメラ本体200の間の適合性に優れるカメラシステムが実現可能となる。例えば、カメラ本体200よりも後にレンズユニット100が発売されるような場合であっても、両者を適合させることができ、BP補正値が算出可能となる。   Further, in a camera system in which the interchangeable lens unit 100 (interchangeable lens) and the camera body 200 are combined, information such as aberration information necessary for calculating the BP correction value is separately stored in the lens unit 100 and the camera body 200. May be. For example, the lens memory 118 in the lens unit 100 may store the aberration information and the RAM 125b of the camera body 200 may store the weighting coefficient. With this configuration, it is possible to realize a camera system having excellent compatibility between the lens unit 100 and the camera body 200. For example, even when the lens unit 100 is released after the camera body 200, both can be adapted and the BP correction value can be calculated.

撮影光学系の全域の瞳領域TLに対応する収差情報と、撮影光学系の一部の瞳領域EP1a、EP1bに対応する収差情報とは、いずれもRAM125bに記憶させておくことができる。また、これらは、いずれもレンズメモリ118に記憶されていてもよい。しかしながら、瞳領域TLに対応する収差情報は、視差画像を記録する機能を有しないカメラに対しても使用され得るものであるが、瞳領域EP1a、EP1bに対応する収差情報は、このようなカメラでは使用されないという場合がある。そのため、レンズメモリ118には瞳領域TLに対応する収差情報のみを記憶させておき、RAM125bには瞳領域EP1a、EP1bに対応する収差情報を記憶させておいてもよい。   Both the aberration information corresponding to the pupil region TL of the entire area of the photographing optical system and the aberration information corresponding to some pupil regions EP1a and EP1b of the photographing optical system can be stored in the RAM 125b. Further, all of them may be stored in the lens memory 118. However, although the aberration information corresponding to the pupil area TL can be used for a camera that does not have a function of recording a parallax image, the aberration information corresponding to the pupil areas EP1a and EP1b can be used for such a camera. May not be used in. Therefore, the lens memory 118 may store only the aberration information corresponding to the pupil area TL, and the RAM 125b may store the aberration information corresponding to the pupil areas EP1a and EP1b.

[第2の実施形態]
次に、本発明の第2の実施形態について説明する。第1の実施形態では、焦点検出に用いる光束が通過する瞳領域と、撮影に用いる光束が通過する瞳領域とにそれぞれ対応した収差情報を用いることにより高精度な焦点検出誤差の補正が行われる。これに対し、本実施形態は、焦点検出、撮影に用いる光束が通過する瞳領域ごとに収差寄与率に応じた収差情報の重み付けを行う点が第1の実施形態と異なる。この重み付けに用いられる係数は、焦点検出に用いる光束を構成する収差情報の対に係るビネッティングに関する条件、収差量等に基づき定められる。なお、本実施形態では、AF動作は位相差焦点検出により行われるものとする。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the first embodiment, highly accurate focus detection error correction is performed by using the aberration information corresponding to the pupil area through which the light flux used for focus detection passes and the pupil area through which the light flux used for imaging passes. . On the other hand, the present embodiment is different from the first embodiment in that the aberration information is weighted according to the aberration contribution rate for each pupil region through which the light flux used for focus detection and imaging passes. The coefficient used for this weighting is determined on the basis of the condition regarding the vignetting relating to the pair of aberration information forming the light flux used for focus detection, the aberration amount, and the like. In this embodiment, the AF operation is performed by phase difference focus detection.

図12は、本実施形態に係るAF処理動作を示すフローチャートである。図12を参照して、本実施形態のデジタルカメラ及び付属アプリケーションにおいて行われ得るAF処理の動作に関して説明する。撮像装置等の装置構成は第1の実施形態と共通であるため説明を省略する。また、本実施形態のステップS1からS4及びS6からS8は、第1の実施形態と共通であるため、説明を省略する。   FIG. 12 is a flowchart showing the AF processing operation according to this embodiment. With reference to FIG. 12, the operation of the AF processing that can be performed in the digital camera of the present embodiment and the auxiliary application will be described. Since the device configuration of the image pickup device and the like is the same as that of the first embodiment, the description thereof will be omitted. Further, steps S1 to S4 and S6 to S8 of the present embodiment are common to the first embodiment, and therefore description thereof will be omitted.

ステップS805において、瞳領域ごとに収差情報の重み付けが行われる。焦点検出、撮影に関する瞳領域ごとの収差情報の重み付け係数をそれぞれK_AF_SA、K_AF_SBとする。このとき、赤色及び水平方向に対応する、瞳領域ごとの収差情報の重み付けは、以下の式(11)、式(12)により行われる。
rh_AF(n)
=rh_A(n)×K_AF_SA
+rh_B(n)×K_AF_SB (11)
rh_IMG(n)=rh_TL(n) (12)
In step S805, the aberration information is weighted for each pupil region. The weighting factors of the aberration information for each pupil region relating to focus detection and photographing are set to K_AF_SA and K_AF_SB, respectively. At this time, the weighting of the aberration information for each pupil region corresponding to the red color and the horizontal direction is performed by the following equations (11) and (12).
rh_AF (n)
= Rh_A (n) × K_AF_SA
+ Rh_B (n) × K_AF_SB (11)
rh_IMG (n) = rh_TL (n) (12)

例えば、瞳領域ごとの収差情報の重み付け係数が、K_AF_SA=0.8、K_AF_SB=0.2である場合、式(11)、式(12)は、以下の式(11’)、式(12’)のように変形される。
rh_AF(n)
=0.8×rh_A(n)
+0.2×rh_B(n) (11’)
rh_IMG(n)=rh_TL(n) (12’)
For example, when the weighting coefficient of the aberration information for each pupil region is K_AF_SA = 0.8 and K_AF_SB = 0.2, the equations (11) and (12) are the following equations (11 ′) and (12). It is transformed like ').
rh_AF (n)
= 0.8 x rh_A (n)
+ 0.2 × rh_B (n) (11 ')
rh_IMG (n) = rh_TL (n) (12 ′)

式(11’)は、焦点検出結果に対して瞳領域EP1bに関する収差に比べ瞳領域EP1aに関する収差の影響が大きいことを意味する。なお、他の色及び他の方向においても、同様の処理が行われる。   Expression (11 ') means that the focus detection result has a larger influence of the aberration on the pupil region EP1a than on the pupil region EP1b. Similar processing is performed for other colors and other directions.

次に、瞳領域ごとの収差情報の重み付け係数の算出方法について説明する。まず、瞳領域ごとの収差の寄与率に関して図13から図15、図20を参照して説明する。   Next, a method of calculating the weighting coefficient of the aberration information for each pupil area will be described. First, the contribution rate of aberration for each pupil region will be described with reference to FIGS. 13 to 15 and 20.

図20(a)、図20(b)及び図20(c)は、センサの設定瞳距離と撮影光学系の射出瞳距離を示す図である。図20(a)、図20(b)及び図20(c)は、撮像素子122(センサ)の周辺像高における光電変換部211a、211bの瞳領域500及び撮影光学系の射出瞳400の関係を示している。瞳領域500は、光電変換部211aの瞳部分領域501及び光電変換部211bの瞳部分領域502を含む。図中の距離Dlは、撮影光学系の射出瞳距離(射出瞳400と撮像素子107の撮像面との距離)を表している。距離Dsは、撮像素子122の設定瞳距離(センサの設定瞳距離)表している。   20A, 20B, and 20C are diagrams showing the set pupil distance of the sensor and the exit pupil distance of the photographing optical system. 20A, 20B, and 20C show the relationship between the pupil region 500 of the photoelectric conversion units 211a and 211b and the exit pupil 400 of the photographing optical system at the peripheral image height of the image sensor 122 (sensor). Is shown. The pupil region 500 includes a pupil partial region 501 of the photoelectric conversion unit 211a and a pupil partial region 502 of the photoelectric conversion unit 211b. The distance Dl in the drawing represents the exit pupil distance of the photographing optical system (the distance between the exit pupil 400 and the imaging surface of the image sensor 107). The distance Ds represents the set pupil distance of the image sensor 122 (sensor set pupil distance).

図20(a)は、撮影光学系の射出瞳距離Dlと、センサの設定瞳距離Dsとが等しい場合を示している。この場合、瞳部分領域501及び瞳部分領域502により、撮影光学系の射出瞳400は略均等に瞳分割される。   FIG. 20A shows a case where the exit pupil distance Dl of the photographing optical system is equal to the set pupil distance Ds of the sensor. In this case, the pupil partial area 501 and the pupil partial area 502 divide the exit pupil 400 of the photographing optical system into substantially even pupils.

一方、図20(b)に示されるように、撮影光学系の射出瞳距離Dlがセンサの設定瞳距離Dsよりも短い場合、センサの周辺像高では、撮影光学系の射出瞳400と撮像素子107の入射瞳との間に瞳ずれが生じる。このため、撮影光学系の射出瞳400が不均一に瞳分割される。同様に、図20(c)に示されるように、撮影光学系の射出瞳距離Dlがセンサの設定瞳距離Dsよりも長い場合も、センサの周辺像高では、撮影光学系の射出瞳400と撮像素子107の入射瞳との間に瞳ずれが生じる。このため、撮影光学系の射出瞳400が不均一に瞳分割される。   On the other hand, as shown in FIG. 20B, when the exit pupil distance Dl of the photographing optical system is shorter than the set pupil distance Ds of the sensor, at the peripheral image height of the sensor, the exit pupil 400 of the photographing optical system and the image sensor are detected. A pupil shift occurs with the entrance pupil of 107. Therefore, the exit pupil 400 of the photographing optical system is non-uniformly divided. Similarly, as shown in FIG. 20C, even when the exit pupil distance Dl of the imaging optical system is longer than the set pupil distance Ds of the sensor, the exit pupil 400 of the imaging optical system is the same as the exit pupil 400 of the imaging optical system at the peripheral image height of the sensor. A pupil shift occurs between the image pickup element 107 and the entrance pupil. Therefore, the exit pupil 400 of the photographing optical system is non-uniformly divided.

図13は、撮像素子122での受光強度の分布を示すグラフである。図13(a)は、横軸をセンサの設定瞳距離における位置(センサ瞳面座標)とした場合の受光強度分布であり、図13(b)は、横軸を撮影光学系の射出瞳面における位置とした場合の受光強度分布である。図中の一点鎖線は絞り102の開口部の端部に相当する位置を示している。また、軸の交点は光軸上の点を示している。   FIG. 13 is a graph showing the distribution of received light intensity at the image sensor 122. FIG. 13A shows the received light intensity distribution when the horizontal axis is the position (sensor pupil plane coordinates) at the set pupil distance of the sensor, and FIG. 13B is the horizontal axis showing the exit pupil plane of the imaging optical system. It is a received light intensity distribution when the position is set to. The alternate long and short dash line in the drawing indicates the position corresponding to the end of the aperture of the diaphragm 102. The intersection of the axes indicates a point on the optical axis.

図13(a)は、撮影光学系の射出瞳距離がセンサの設定瞳距離よりも短く、焦点検出領域が周辺像高に設定された場合における受光強度分布を示す。また、図中の901A、901Bの符号が付された2つのグラフは、それぞれ光電変換部211a、211bに対応した受光強度分布である。なお、絞り102により光束の一部が遮られるため、実際に得られる信号は、絞り102の位置を示す2本の線の間の領域が切り出されたものとなる。図13(b)は、絞り102により切り出された受光強度分布901A、901Bを撮影光学系の射出瞳面の位置に投影し、さらに受光強度をそれぞれの光量で規格化したものを、受光強度分布902A、902Bとして示すグラフである。受光強度分布902Aは面内における強度の変化が大きく、図中の左側ほど強度が強くなっている。これに対し、受光強度分布902Bは、受光強度分布902Aと比べて面内における強度の変化が小さい。   FIG. 13A shows the received light intensity distribution when the exit pupil distance of the photographing optical system is shorter than the set pupil distance of the sensor and the focus detection area is set to the peripheral image height. In addition, two graphs denoted by reference numerals 901A and 901B in the drawing are light reception intensity distributions corresponding to the photoelectric conversion units 211a and 211b, respectively. Since a part of the light beam is blocked by the diaphragm 102, an actually obtained signal is a signal obtained by cutting out a region between two lines indicating the position of the diaphragm 102. FIG. 13B shows a received light intensity distribution obtained by projecting the received light intensity distributions 901A and 901B cut out by the diaphragm 102 on the position of the exit pupil plane of the photographing optical system and further standardizing the received light intensity by each light amount. It is a graph shown as 902A and 902B. The received light intensity distribution 902A has a large change in the in-plane intensity, and the intensity becomes stronger toward the left side in the figure. On the other hand, in the received light intensity distribution 902B, the change in the in-plane intensity is smaller than that in the received light intensity distribution 902A.

図14は撮影光学系の射出瞳面内における、撮影光学系に含まれるレンズの収差量を示すグラフである。ここで縦軸の収差量は、横収差の量を表しており、本実施形態では、この収差は、一例としてコマ収差であるものとして説明する。図14に示される1001の符号が付されたグラフにより、撮影光学系のレンズのコマ収差は射出瞳面の端部に近づくにつれて大きくなることがわかる。   FIG. 14 is a graph showing the amount of aberration of the lens included in the photographing optical system in the exit pupil plane of the photographing optical system. Here, the amount of aberration on the vertical axis represents the amount of lateral aberration, and in the present embodiment, this aberration will be described as a coma aberration as an example. It can be seen from the graph denoted by reference numeral 1001 shown in FIG. 14 that the coma aberration of the lens of the photographing optical system increases as it approaches the end of the exit pupil plane.

図15(a)は、図13(a)に示す受光強度分布と、図14に示す収差量とを乗算して得られる収差寄与率分布を示すグラフである。図中の1101A、1101Bの符号が付された2つのグラフは、それぞれ光電変換部211a、211bに対応した収差寄与率分布である。光電変換部211aに関する収差寄与率分布1101Aは、図中の左端において大きい値となっている。これは、受光強度分布902Aの強度が高い左端において撮影光学系のレンズの収差も大きいためである。これに対して、光電変換部211bに対する収差寄与率分布1101Bの左端は、受光強度分布902Bの分布が比較的平坦であるため、収差寄与率分布1101Aの左端に比べて小さな値となっている。   FIG. 15A is a graph showing an aberration contribution rate distribution obtained by multiplying the received light intensity distribution shown in FIG. 13A and the aberration amount shown in FIG. Two graphs denoted by reference numerals 1101A and 1101B in the figure are aberration contribution rate distributions corresponding to the photoelectric conversion units 211a and 211b, respectively. The aberration contribution rate distribution 1101A regarding the photoelectric conversion unit 211a has a large value at the left end in the drawing. This is because the aberration of the lens of the photographing optical system is large at the left end where the intensity of the received light intensity distribution 902A is high. On the other hand, the left end of the aberration contribution rate distribution 1101B for the photoelectric conversion unit 211b has a smaller value than the left end of the aberration contribution rate distribution 1101A because the distribution of the received light intensity distribution 902B is relatively flat.

図15(b)は、収差寄与率分布1101Aから収差寄与率分布1101Bを減算して得られる収差寄与率分布1103を示すグラフである。このグラフは、収差寄与率分布1103がプラス方向に大きいほど、光電変換部211aに対する収差寄与率が大きく、マイナス方向に大きいほど、光電変換部211bに対する収差寄与率が大きいことを意味している。射出瞳面内全体での光電変換部211a、光電変換部211bのそれぞれに対する収差寄与率Sa、Sbは図中にハッチングで示された領域の面積で表わされる。   FIG. 15B is a graph showing an aberration contribution rate distribution 1103 obtained by subtracting the aberration contribution rate distribution 1101B from the aberration contribution rate distribution 1101A. This graph means that the larger the aberration contribution ratio distribution 1103 is in the positive direction, the larger the aberration contribution ratio to the photoelectric conversion unit 211a is, and the larger it is in the negative direction, the larger the aberration contribution ratio to the photoelectric conversion unit 211b is. Aberration contribution ratios Sa and Sb for the photoelectric conversion unit 211a and the photoelectric conversion unit 211b in the entire exit pupil plane are represented by the areas of the regions shown by hatching in the figure.

図15(b)の例では、収差寄与率SaとSbの比率の概算値は、Sa:Sb=5:2であり、光電変換部211aへの入射光の方が、撮影光学系のレンズの収差の影響を大きく受けている。光電変換部211aについては、受光強度が大きい箇所と収差が大きい箇所とが一致しているため収差寄与率Saが大きくなるが、光電変換部211bについては、受光強度分布が比較的平坦であるため、収差寄与率Sbはさほど大きくならないためである。このように、収差が大きい箇所において、光電変換部211aと光電変換部211bに関し、絞り102を通過した光束に対する強度分布の差が大きい場合に、寄与率の差が大きくなる。   In the example of FIG. 15B, the approximate value of the ratio of the aberration contribution rates Sa and Sb is Sa: Sb = 5: 2, and the incident light on the photoelectric conversion unit 211a is the lens of the photographing optical system. It is greatly affected by aberration. In the photoelectric conversion unit 211a, the aberration contribution rate Sa becomes large because the portion having a large received light intensity and the portion having a large aberration match, but the photoelectric conversion unit 211b has a relatively flat received light intensity distribution. This is because the aberration contribution rate Sb does not become so large. As described above, when the difference in intensity distribution between the photoelectric conversion unit 211a and the photoelectric conversion unit 211b with respect to the light flux that has passed through the diaphragm 102 is large, the difference in the contribution ratios is large at a location where the aberration is large.

位相差AFでは、光電変換部211a、光電変換部211bの各々に基づく2つの信号を用いて焦点検出を行う。そのため、光電変換部211a、光電変換部211bへの入射光について収差の寄与率が異なる場合、射出瞳面上の瞳領域に対する収差情報を用いてBP補正値を算出すると、補正誤差が生じる。その理由について説明する。   In the phase difference AF, focus detection is performed using two signals based on each of the photoelectric conversion unit 211a and the photoelectric conversion unit 211b. Therefore, when the contribution ratios of the aberrations with respect to the incident light on the photoelectric conversion unit 211a and the photoelectric conversion unit 211b are different, a correction error occurs when the BP correction value is calculated using the aberration information for the pupil area on the exit pupil plane. The reason will be described.

位相差AFは、デフォーカスによる線像強度分布の重心ずれ量に基づいて合焦位置を算出する手法である。図16に、デフォーカスによる線像強度分布の重心ずれ量を説明するための図を示す。図16は、重心ずれ量及び相関演算結果(線像強度分布の位置ずれ量)の少なくとも1つに差を与える収差(以下、コマ収差等の収差と呼ぶ)並びに絞り102等によるケラレ(ビネッティング)がないと仮定した状態の線像強度分布を示している。このような場合、位相差AFにおいて焦点検出誤差が生じない。   The phase difference AF is a method of calculating the in-focus position based on the amount of shift of the center of gravity of the line image intensity distribution due to defocus. FIG. 16 is a diagram for explaining the amount of deviation of the center of gravity of the line image intensity distribution due to defocus. FIG. 16 shows an aberration (hereinafter, referred to as an aberration such as coma aberration) that gives a difference to at least one of the center-of-gravity shift amount and the correlation calculation result (positional shift amount of the line image intensity distribution), and vignetting (vignetting) due to the diaphragm 102 and the like. ) Indicates that the line image intensity distribution is assumed to be absent. In such a case, no focus detection error occurs in the phase difference AF.

図16には、互いに異なるフォーカス位置1201_P、1202_Pにおける線像強度分布が示されている。線像強度分布1201_A、1201_Bは、それぞれ光電変換部211a、211bに対応する、1201_Pにおける一対の線像強度分布である。線像強度分布1202_A、1202_Bは、それぞれ光電変換部211a、211bに対応する、1202_Pにおける一対の線像強度分布である。また、一点鎖線で示された1201_GA、1201_GBは、それぞれ線像強度分布1201_A、1201_Bの重心位置を示している。一点鎖線で示された1202_GA、1202_GBは、それぞれ1202_A、1202_Bの重心位置を示している。さらに、重心ずれ量1201_difGは、1201_GA、1201_GBの差分を示しており、重心ずれ量1202_difGは、1202_GA、1202_GBの差分を示している。   FIG. 16 shows line image intensity distributions at different focus positions 1201_P and 1202_P. The line image intensity distributions 1201_A and 1201_B are a pair of line image intensity distributions in 1201_P corresponding to the photoelectric conversion units 211a and 211b, respectively. The line image intensity distributions 1202_A and 1202_B are a pair of line image intensity distributions in 1202_P corresponding to the photoelectric conversion units 211a and 211b, respectively. In addition, 1201_GA and 1201_GB indicated by alternate long and short dash lines indicate the barycentric positions of the line image intensity distributions 1201_A and 1201_B, respectively. 1202_GA and 1202_GB indicated by alternate long and short dashed lines indicate the center of gravity positions of 1202_A and 1202_B, respectively. Further, the center-of-gravity shift amount 1201_difG indicates the difference between 1201_GA and 1201_GB, and the center-of-gravity shift amount 1202_difG indicates the difference between 1202_GA and 1202_GB.

図16に示されるように、コマ収差等の収差及び絞り102等によるケラレがない場合には、デフォーカスに応じて、重心ずれ量1201_difG、1202_difGが変化する。そのため、これらの重心ずれ量1201_difG、1202_difGに基づいて、デフォーカス値を算出することで、位相差AFを行うことができる。   As shown in FIG. 16, when there is no aberration such as coma and vignetting due to the diaphragm 102, the center-of-gravity shift amount 1201_difG, 1202_difG changes according to the defocus. Therefore, the phase difference AF can be performed by calculating the defocus value based on these center-of-gravity shift amounts 1201_difG and 1202_difG.

次に、撮影光学系のコマ収差等の収差又は絞り102等によるケラレが大きい場合について説明する。図17(a)は、撮影光学系のコマ収差等の収差又は絞り102等によるケラレが大きい場合の一対の線像強度分布を示す図である。   Next, a case where aberration such as coma of the photographing optical system or vignetting due to the diaphragm 102 or the like is large will be described. FIG. 17A is a diagram showing a pair of line image intensity distributions in the case where aberration such as coma of the photographing optical system or vignetting due to the diaphragm 102 or the like is large.

図17(a)において、破線で示された線像強度分布1301_Aは、光電変換部211aに対応する線像強度分布である。実線で示された線像強度分布1301_Bは光電変換部211bに対応する線像強度分布である。一点鎖線で示されたG_Aは、線像強度分布1301_Aの重心位置を示しており、一点鎖線で示されたG_Bは線像強度分布1301_Bの重心位置を示している。   In FIG. 17A, the line image intensity distribution 1301_A indicated by the broken line is the line image intensity distribution corresponding to the photoelectric conversion unit 211a. A line image intensity distribution 1301_B indicated by a solid line is a line image intensity distribution corresponding to the photoelectric conversion unit 211b. G_A indicated by the alternate long and short dash line indicates the center of gravity of the line image intensity distribution 1301_A, and G_B indicated by the alternate long and short dash line indicates the center of gravity of the line image intensity distribution 1301_B.

図17(a)に示されるように線像強度分布1301_A、1301_Bは、光学系のコマ収差等の収差の影響により、片側に尾を引いた非対称形状の分布となっている。このような非対称形状である場合、線像強度分布の重心位置G_A、G_Bが尾を引いた側にシフトするため、重心ずれが生じる。   As shown in FIG. 17A, the line image intensity distributions 1301_A and 1301_B have an asymmetrical shape with one side being tailed due to the influence of aberrations such as coma of the optical system. In the case of such an asymmetrical shape, the gravity center positions G_A and G_B of the line image intensity distribution shift to the trailing side, so that the gravity center shift occurs.

また、線像強度分布1301_A、1301_Bは、撮影光学系の絞り102等によるケラレの影響により差が生じる。よりケラレの影響が大きい線像強度分布1301_Aの方がコマ収差等の収差の影響を大きく受けており、非対称性がより大きい。このように、非対称性が線像強度分布1301_A、1301_Bの間で異なることにより、それぞれの重心位置G_A、G_Bのずれ量が互いに異なる。図17(b)は、図17(a)における線像強度分布1301_A、1301_Bを足し合わせた線像強度分布1301_IMGを示す図である。線像強度分布1301_IMGは、光電変換部211a、211bの各々で生成された光電変換信号の和に対応する。   Further, the line image intensity distributions 1301_A and 1301_B have a difference due to the effect of vignetting due to the diaphragm 102 of the photographing optical system. The line image intensity distribution 1301_A, which is more affected by vignetting, is more affected by aberrations such as coma and has a greater asymmetry. In this way, the asymmetry differs between the line image intensity distributions 1301_A and 1301_B, and thus the shift amounts of the respective barycentric positions G_A and G_B differ from each other. FIG. 17B is a diagram showing a line image intensity distribution 1301_IMG obtained by adding the line image intensity distributions 1301_A and 1301_B in FIG. 17A. The line image intensity distribution 1301_IMG corresponds to the sum of the photoelectric conversion signals generated by each of the photoelectric conversion units 211a and 211b.

図17(c)は、図17(a)の状態とは異なるデフォーカス位置における線像強度分布を示す図である。この状態では、点線で示された線像強度分布1302_Aと、実線で示された線像強度分布1302_Bとの重心位置が一致している。図17(d)は、図17(b)と同様に、図17(c)における線像強度分布1302_A、1302_Bを足し合わせた線像強度分布1302_IMGを示す図である。   FIG. 17C is a diagram showing a line image intensity distribution at a defocus position different from the state of FIG. 17A. In this state, the barycentric positions of the line image intensity distribution 1302_A indicated by the dotted line and the line image intensity distribution 1302_B indicated by the solid line match. Similar to FIG. 17B, FIG. 17D is a diagram showing a line image intensity distribution 1302_IMG obtained by adding the line image intensity distributions 1302_A and 1302_B in FIG. 17C.

図17(b)と図17(d)を比較すると、重心位置の異なる線像強度分布の和である線像強度分布1301_IMGのピークの方が、重心位置が一致した線像強度分布の和である線像強度分布1302_IMGのピークよりも急峻である。撮影画像の信号に対応する線像強度分布1301_IMG、1302_IMGのピーク形状が最も急峻であり、コントラストが最大となる位置が、合焦位置である。そのため、重心位置の異なる図17(a)の状態がより合焦位置に近い状態であり、重心位置が一致した図17(c)の状態は図17(a)の状態よりも合焦位置から遠い状態であるといえる。   Comparing FIG. 17B and FIG. 17D, the peak of the line image intensity distribution 1301_IMG, which is the sum of the line image intensity distributions at different centroid positions, is the sum of the line image intensity distributions at which the centroid positions match. It is steeper than the peak of a certain line image intensity distribution 1302_IMG. The position where the peak shape of the line image intensity distributions 1301_IMG and 1302_IMG corresponding to the signal of the captured image is the steepest and the contrast is maximum is the focus position. Therefore, the state of FIG. 17A in which the center of gravity positions are different is closer to the in-focus position, and the state of FIG. 17C in which the center of gravity positions match is closer to the in-focus position than the state in FIG. 17A. It can be said that it is in a distant state.

このことから、非対称性が一対の線像強度分布間で異なり、重心ずれ量に差が生じている場合には、重心位置が一致する位置が合焦位置とはならず、重心位置が異なる位置が合焦位置となることがある。言い換えると、合焦位置の検出に誤差が生じている。   From this, when the asymmetry is different between the pair of line image intensity distributions and there is a difference in the center-of-gravity shift amount, the position where the center-of-gravity positions match does not become the focus position, and the position where the center-of-gravity positions differ. May be the in-focus position. In other words, there is an error in the detection of the in-focus position.

以上のように、線像強度分布1301_A、1301_Bのように撮影光学系のコマ収差等の収差又は絞り102等によるケラレが大きい場合、デフォーカスによる重心ずれ量に加えて、線像強度分布の非対称性に起因した重心ずれ量差が生じる。これにより、位相差AFの処理において、本来合焦位置と検出するべきデフォーカス位置で、ピントずれがあると検出する誤検出が生じ得る。また、その際の合焦位置からのずれ量は、光電変換部211aと光電変換部211bの間の収差の寄与率の差が大きいほど、大きくなる。   As described above, when the line image intensity distributions 1301_A and 1301_B have large aberrations such as coma of the photographing optical system or vignetting due to the diaphragm 102 or the like, the line image intensity distribution is asymmetrical in addition to the center-of-gravity shift amount due to defocus. There is a difference in the amount of displacement of the center of gravity due to the sex. As a result, in the phase difference AF process, an erroneous detection may occur that defocus is detected at the defocus position that should be detected as the in-focus position. Further, the amount of deviation from the in-focus position at that time increases as the difference in the contribution rate of the aberration between the photoelectric conversion unit 211a and the photoelectric conversion unit 211b increases.

次に、重心ずれ量差と、撮影光学系のデフォーカスMTFとの関係について説明する。
図18(a)及び図18(b)は、撮影光学系のデフォーカスMTFを示す。図18(a)は、瞳領域TLに対応するデフォーカスMTFであり、図18(b)は、光電変換部211a、211bのうち、収差寄与率が高い方の瞳領域に対応するデフォーカスMTFである。
Next, the relationship between the center-of-gravity deviation amount difference and the defocus MTF of the photographing optical system will be described.
18A and 18B show the defocus MTF of the photographing optical system. 18A shows the defocus MTF corresponding to the pupil region TL, and FIG. 18B shows the defocus MTF corresponding to the pupil region having the higher aberration contribution rate in the photoelectric conversion units 211a and 211b. Is.

MTF_TL_1401〜MTF_TL_1404は、瞳領域TLに対するデフォーカスMTFであり、それぞれ空間周波数が異なる。AFの処理に用いる空間周波数のデフォーカスMTFがMTF_TL_1401であるものとする。このとき、MTF_TL_1401のピーク位置p_TL_1401は、位相差AFで検出される合焦位置を意味する。また、撮影画像に用いる空間周波数のデフォーカスMTFがMTF_TL_1404であるものとするとそのピーク位置p_TL_1404は、撮影画像に対する合焦位置を意味する。これらのピーク位置p_TL_1401、p_TL1404の差分が、瞳領域TLに対する収差情報から算出されるBP補正値である。   MTF_TL_1401 to MTF_TL_1404 are defocus MTFs for the pupil region TL and have different spatial frequencies. It is assumed that the defocus MTF of the spatial frequency used for the AF processing is MTF_TL_1401. At this time, the peak position p_TL_1401 of MTF_TL_1401 means the in-focus position detected by the phase difference AF. Further, assuming that the defocus MTF of the spatial frequency used for the captured image is MTF_TL_1404, the peak position p_TL_1404 means the focus position for the captured image. The difference between the peak positions p_TL_1401 and p_TL1404 is the BP correction value calculated from the aberration information for the pupil region TL.

しかし上述したとおり、位相差AFでは、光電変換部211a、211bの収差の寄与率に差がある場合、重心ずれ量に差が生じる。これにより、位相差AFで検出される合焦位置は図18(a)中の破線で示されたdef1410の位置となり、ピーク位置p_TL1401からずれる。   However, as described above, in the phase difference AF, when there is a difference in the contribution rate of the aberrations of the photoelectric conversion units 211a and 211b, there is a difference in the center of gravity shift amount. As a result, the in-focus position detected by the phase difference AF becomes the position of def1410 indicated by the broken line in FIG. 18A, which deviates from the peak position p_TL1401.

図18(b)には、瞳領域TLに対するデフォーカスMTFであるMTF_TL_1401と、光電変換部211a、211bのうち、収差の寄与率が大きい方に対するデフォーカスMTFであるMTF_A_1401が示されている。これらはいずれも位相差AFの処理に用いられる空間周波数に対応するものである。MTF_TL_1401、MTF_A_1401のそれぞれのピーク位置は、p_TL_1401、p_A_1401である。また、図18(b)には、図18(a)の説明で述べたピーク位置p_TL_1404が破線で示されている。   FIG. 18B shows MTF_TL_1401, which is the defocus MTF for the pupil region TL, and MTF_A_1401, which is the defocus MTF for the one of the photoelectric conversion units 211a and 211b that has a larger contribution rate of aberration. All of these correspond to the spatial frequency used for the phase difference AF processing. The peak positions of MTF_TL_1401 and MTF_A_1401 are p_TL_1401 and p_A_1401, respectively. Further, in FIG. 18B, the peak position p_TL_1404 described in the description of FIG. 18A is indicated by a broken line.

図18(b)に示されるとおり、ピーク位置p_A_1401はピーク位置p_TL_1401に比べ、右側に位置しており、図18(a)の位相差AFが検出するデフォーカス位置def1410と同方向にp_TL_1401からずれた位置となっている。また、p_A_1401のp_TL_1401からのずれ量は、収差寄与率に応じて変化する。   As shown in FIG. 18B, the peak position p_A_1401 is located on the right side of the peak position p_TL_1401, and is deviated from p_TL_1401 in the same direction as the defocus position def1410 detected by the phase difference AF in FIG. 18A. The position is The amount of deviation of p_A_1401 from p_TL_1401 changes according to the aberration contribution rate.

このことから、光電変換部211a、211bに対応する収差の寄与率を考慮して、位相差AFで検出する合焦位置を算出することで、位相差AFの焦点検出誤差を良好に補正することが可能となる。   From this, the focus detection error of the phase difference AF can be satisfactorily corrected by calculating the in-focus position detected by the phase difference AF in consideration of the contribution rates of the aberrations corresponding to the photoelectric conversion units 211a and 211b. Is possible.

そのため、上述した式(11)、式(12)に基づいて、重み付けを行って算出した収差情報からBP補正量を算出することで、補正誤差を小さくすることが可能となる。重み付け係数K_AF_SA、K_AF_SBは、上述した収差寄与率Sa、Sbに基づいて以下の式(13)、式(14)のように設定することができる。
K_AF_SA=Sa (13)
K_AF_SB=Sb (14)
Therefore, it is possible to reduce the correction error by calculating the BP correction amount from the aberration information calculated by performing the weighting based on the expressions (11) and (12) described above. The weighting factors K_AF_SA and K_AF_SB can be set as in the following equations (13) and (14) based on the above-described aberration contribution rates Sa and Sb.
K_AF_SA = Sa (13)
K_AF_SB = Sb (14)

収差寄与率Sa、Sbは、上述したとおり、収差量と、絞り102でのケラレによる受光強度分布の差によって生じる。絞り102でのケラレによる受光強度分布の差が大きくなる条件は様々な条件が重なって生じる。例として示した、図13から整理して説明する。   As described above, the aberration contribution ratios Sa and Sb are caused by the difference between the aberration amount and the received light intensity distribution due to vignetting at the diaphragm 102. The condition that the difference in the received light intensity distribution due to vignetting at the diaphragm 102 becomes large is caused by various conditions overlapping. An example will be described in order from FIG. 13.

受光強度分布901Aについては、変化量の大きい領域が絞り102の開口部に対応しているのに対し、受光強度分布902Aについては、比較的平坦な領域が絞り102の開口部に対応している。これにより、受光強度分布の差が生じている。このような現象が生じる要因としては、第1の要因として焦点検出領域219の像高の影響が挙げられる。第2の要因として、レンズの射出瞳距離とセンサの設定瞳距離との間の差の影響が挙げられる。図19を参照して、これらの要因間の関係を説明する。   In the received light intensity distribution 901A, a region having a large variation corresponds to the aperture of the diaphragm 102, while in the received light intensity distribution 902A, a relatively flat region corresponds to the aperture of the diaphragm 102. . This causes a difference in the received light intensity distribution. The first factor that causes such a phenomenon is the influence of the image height of the focus detection area 219. The second factor is the effect of the difference between the exit pupil distance of the lens and the set pupil distance of the sensor. The relationship between these factors will be described with reference to FIG.

図19(a)は、像高z1が比較的高い周辺像高であり、かつ、レンズの射出瞳距離LPO1とセンサの設定瞳距離との間の差が大きい場合を示している。この場合、受光強度分布の端の方が絞り102の開口部に対応する。そのため、受光強度分布901Aは変化量の大きい領域が絞り102の開口部に対応しているのに対し、受光強度分布901Bは比較的平坦な領域が絞り102の開口部に対応する。   FIG. 19A shows a case where the image height z1 is a relatively high peripheral image height and the difference between the exit pupil distance LPO1 of the lens and the set pupil distance of the sensor is large. In this case, the edge of the received light intensity distribution corresponds to the opening of the diaphragm 102. Therefore, in the received light intensity distribution 901A, the region where the amount of change is large corresponds to the aperture of the diaphragm 102, whereas in the received light intensity distribution 901B, the relatively flat region corresponds to the aperture of the diaphragm 102.

図19(b)は、レンズの射出瞳距離LPO2とセンサの設定瞳距離との間の差が小さい場合を示している。この場合、受光強度分布901A、901Bはいずれも変化量の大きい領域が絞り102の開口部に対応しており、これらは似た形状となる。   FIG. 19B shows a case where the difference between the exit pupil distance LPO2 of the lens and the set pupil distance of the sensor is small. In this case, in each of the received light intensity distributions 901A and 901B, a region in which the amount of change is large corresponds to the opening of the diaphragm 102, and these have similar shapes.

図19(c)は、像高z2が低い、すなわち、焦点検出領域219が中央付近である場合を示している。この場合には、図19(b)の場合と同様に、受光強度分布901A、901Bはいずれも変化量の大きい領域が絞り102の開口部に対応しており、これらは似た形状となる。   FIG. 19C shows a case where the image height z2 is low, that is, the focus detection area 219 is near the center. In this case, as in the case of FIG. 19B, in each of the received light intensity distributions 901A and 901B, a region in which the amount of change is large corresponds to the opening of the diaphragm 102, and these have similar shapes.

以上のことから、受光強度分布の差が大きくなる条件は、図19(a)のように像高が高く、かつ、レンズの射出瞳距離とセンサの設定瞳距離の差が大きい場合であるといえる。また、このような条件では、光電変換部211a、211bでの受光強度のレベル差も大きくなるため、受光強度分布の差がさらに大きくなる。   From the above, the condition that the difference in received light intensity distribution becomes large is that the image height is high and the difference between the exit pupil distance of the lens and the set pupil distance of the sensor is large as shown in FIG. I can say. Further, under such a condition, the level difference in the received light intensity between the photoelectric conversion units 211a and 211b also becomes large, so that the difference in the received light intensity distribution becomes even larger.

上述の例以外にも、絞り102以外にレンズの枠ケラレ等の別の要因のケラレがある場合にも、受光強度分布の差及びレベル差が大きくなり、受光強度分布の差が大きくなる。すなわち、絞り102及びレンズの枠等によるケラレの影響を含む撮影光学系のビネッティング率が大きい場合には、光電変換部211a、211bの間の収差寄与率の差が大きくなるといえる。   In addition to the above-described example, even when vignetting due to another factor such as lens frame vignetting is present in addition to the diaphragm 102, the difference in the received light intensity distribution and the level difference become large, and the difference in the received light intensity distribution also becomes large. That is, when the vignetting rate of the photographic optical system including the influence of vignetting due to the diaphragm 102 and the frame of the lens is large, it can be said that the difference in the aberration contribution rate between the photoelectric conversion units 211a and 211b is large.

以上により、収差寄与率はSa、Sbは、収差量、像高、センサの設定瞳距離とレンズの射出瞳距離との差、光量差、ビネッティング率をパラメータとして変化する。言い換えると、重み付け係数K_AF_SA、K_AF_SBは、収差量、像高、センサの設定瞳距離とレンズの射出瞳距離との差、光量差、ビネッティング率のうちの少なくとも1つに基づき、設定することができる。重み付け係数K_AF_SA、K_AF_SBにより、瞳領域ごとに収差情報の重み付けを行うことで、より高精度に焦点検出誤差の補正を行うことができる。   As described above, the aberration contribution ratios Sa and Sb are changed with the aberration amount, the image height, the difference between the set pupil distance of the sensor and the exit pupil distance of the lens, the light amount difference, and the vignetting ratio as parameters. In other words, the weighting factors K_AF_SA and K_AF_SB can be set based on at least one of the amount of aberration, the image height, the difference between the set pupil distance of the sensor and the exit pupil distance of the lens, the light amount difference, and the vignetting rate. it can. By weighting the aberration information for each pupil region using the weighting factors K_AF_SA and K_AF_SB, the focus detection error can be corrected with higher accuracy.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. It can also be realized by the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

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

Claims (14)

撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得する画像信号取得手段と、
前記複数の画像信号のうちの少なくとも1つに基づいて焦点検出を行い、第1のデフォーカス値を算出するデフォーカス値算出手段と、
前記撮影光学系の異なる瞳領域を通過した光束にそれぞれ対応する第1の収差情報及び第2の収差情報を取得する収差情報取得手段と、
前記第1の収差情報と、前記第2の収差情報とに基づいて前記第1のデフォーカス値を補正するための補正値を算出する補正値算出手段と、
前記補正値を用いて前記第1のデフォーカス値を補正して第2のデフォーカス値を生成するデフォーカス値補正手段と、
を有することを特徴とする情報処理装置。
An image signal acquisition unit that acquires a plurality of image signals based on a plurality of light fluxes that have passed through a plurality of pupil regions having mutually different centers of gravity of the imaging optical system,
Defocus value calculation means for performing focus detection based on at least one of the plurality of image signals to calculate a first defocus value;
Aberration information acquisition means for acquiring first aberration information and second aberration information respectively corresponding to light fluxes passing through different pupil regions of the photographing optical system ,
Correction value calculating means for calculating a correction value for correcting the first defocus value based on the first aberration information and the second aberration information,
Defocus value correction means for correcting the first defocus value using the correction value to generate a second defocus value;
An information processing device comprising:
前記収差情報取得手段は、
前記焦点検出に用いられる画像信号と前記複数の瞳領域の各々との対応関係を示す第1の重み付け情報を取得し、
前記第1の重み付け情報と前記複数の瞳領域の各々に対応する収差情報とに基づいて、前記第1の収差情報を取得する
ことを特徴とする請求項1に記載の情報処理装置。
The aberration information acquisition means,
Acquiring first weighting information indicating a correspondence relationship between the image signal used for focus detection and each of the plurality of pupil regions,
The information processing apparatus according to claim 1, wherein the first aberration information is acquired based on the first weighting information and the aberration information corresponding to each of the plurality of pupil regions.
前記焦点検出は、前記複数の画像信号のうちの少なくとも2つの画像信号を用いる位相差焦点検出であり、
前記第1の重み付け情報は、前記焦点検出に用いられる画像信号に対応する複数の瞳領域を通過する複数の光束に対する前記撮影光学系のビネッティング率に基づいて決定される
ことを特徴とする請求項2に記載の情報処理装置。
The focus detection is a phase difference focus detection using at least two image signals of the plurality of image signals,
The first weighting information is determined based on a vignetting rate of the photographing optical system with respect to a plurality of light fluxes passing through a plurality of pupil regions corresponding to an image signal used for the focus detection. Item 2. The information processing device according to item 2.
前記焦点検出は、前記複数の画像信号のうちの少なくとも2つの画像信号を用いる位相差焦点検出であり、
前記第1の重み付け情報は、前記焦点検出に用いられる画像信号に対応する複数の瞳領域を通過する複数の光束の光量に基づいて決定される
ことを特徴とする請求項2に記載の情報処理装置。
The focus detection is a phase difference focus detection using at least two image signals of the plurality of image signals,
The information processing apparatus according to claim 2, wherein the first weighting information is determined based on light amounts of a plurality of light fluxes passing through a plurality of pupil regions corresponding to the image signal used for the focus detection. apparatus.
前記焦点検出は、前記複数の画像信号のうちの少なくとも2つの画像信号を用いる位相差焦点検出であり、
前記第1の重み付け情報は、前記焦点検出に用いられる画像信号に対応する複数の瞳領域に対応する収差量に基づいて決定される
ことを特徴とする請求項2に記載の情報処理装置。
The focus detection is a phase difference focus detection using at least two image signals of the plurality of image signals,
The information processing apparatus according to claim 2, wherein the first weighting information is determined based on aberration amounts corresponding to a plurality of pupil regions corresponding to the image signal used for the focus detection.
前記焦点検出に用いられる画像信号の個数は複数であり、前記複数の画像信号の各々に対応する第1の収差情報は共通であることを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。   The number of image signals used for the focus detection is plural, and the first aberration information corresponding to each of the plurality of image signals is common, and the first aberration information is common. The information processing device described. 前記収差情報取得手段は
像取得に用いられる画像信号と前記複数の瞳領域の各々との対応関係を示す第2の重み付け情報を取得し、
前記第2の重み付け情報と前記複数の瞳領域の各々に対応する収差情報とに基づいて、前記第2の収差情報を取得する
ことを特徴とする請求項1乃至6のいずれか1項に記載の情報処理装置。
The aberration information acquisition means ,
Get the second weighting information indicating a correspondence relationship between the image signal used in the images acquired with each of the plurality of pupil areas,
7. The second aberration information is acquired based on the second weighting information and the aberration information corresponding to each of the plurality of pupil regions. 7. The any one of claims 1 to 6, wherein: Information processing equipment.
撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を生成する撮像素子と、
請求項1乃至7のいずれか1項に記載の情報処理装置と、
前記第2のデフォーカス値に基づいて、前記撮影光学系の焦点位置を制御する焦点制御手段と、
を有することを特徴とする撮像装置。
An image pickup device that generates a plurality of image signals based on a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids of the photographing optical system,
An information processing apparatus according to any one of claims 1 to 7,
Focus control means for controlling the focus position of the photographing optical system based on the second defocus value;
An image pickup apparatus comprising:
撮影光学系の一部を構成するレンズユニットと、
前記撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を生成する撮像素子と、
請求項1乃至7のいずれか1項に記載の情報処理装置と、
前記第2のデフォーカス値に基づいて、前記撮影光学系の焦点位置を制御する焦点制御手段と
を含む撮像ユニットと、
を有することを特徴とする撮像装置。
A lens unit that forms part of the shooting optical system,
An image pickup device that generates a plurality of image signals based on a plurality of light fluxes that have passed through a plurality of pupil regions having different center of gravity of the photographing optical system,
An information processing apparatus according to any one of claims 1 to 7,
An image pickup unit including: a focus control unit that controls a focus position of the photographing optical system based on the second defocus value;
An image pickup apparatus comprising:
前記レンズユニットは、第1のメモリを含み、
前記撮像ユニットは、第2のメモリを含み、
前記第1の収差情報又は前記第2の収差情報の取得に用いられる情報は、前記第1のメモリと前記第2のメモリに分かれて記憶されており、
前記レンズユニットと前記撮像ユニットは互いに着脱可能に構成されていることを特徴とする請求項9に記載の撮像装置。
The lens unit includes a first memory,
The imaging unit includes a second memory,
Information used to obtain the first aberration information or the second aberration information is stored separately in the first memory and the second memory,
The image pickup apparatus according to claim 9, wherein the lens unit and the image pickup unit are configured to be detachable from each other.
前記第1のメモリは、前記複数の瞳領域の各々に対応する収差情報を記憶し、
前記第2のメモリは、前記複数の画像信号と前記複数の瞳領域との対応関係を示す重み付け情報を記憶する
ことを特徴とする請求項10に記載の撮像装置。
The first memory stores aberration information corresponding to each of the plurality of pupil regions,
The imaging device according to claim 10, wherein the second memory stores weighting information indicating a correspondence relationship between the plurality of image signals and the plurality of pupil regions.
前記第1のメモリは、前記撮影光学系を通過する光束の全てが通過する瞳領域に対応する収差情報を記憶し、
前記第2のメモリは、前記撮影光学系を通過する光束の一部が通過する瞳領域に対応する収差情報を記憶する
ことを特徴とする請求項10に記載の撮像装置。
The first memory stores aberration information corresponding to a pupil region through which all of the light flux passing through the photographing optical system passes,
The imaging device according to claim 10, wherein the second memory stores aberration information corresponding to a pupil region through which a part of the light flux passing through the imaging optical system passes.
撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得する画像信号取得工程と、
前記複数の画像信号のうちの少なくとも1つに基づいて焦点検出を行い、第1のデフォーカス値を算出するデフォーカス値算出工程と、
前記撮影光学系の異なる瞳領域を通過した光束にそれぞれ対応する第1の収差情報及び第2の収差情報を取得する収差情報取得工程と、
前記第1の収差情報と、前記第2の収差情報とに基づいて前記第1のデフォーカス値を補正するための補正値を算出する補正値算出工程と、
前記補正値を用いて前記第1のデフォーカス値を補正して第2のデフォーカス値を生成するデフォーカス値補正工程と、
を有することを特徴とする情報処理方法。
An image signal acquisition step of acquiring a plurality of image signals based on each of a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids of the imaging optical system,
A defocus value calculation step of performing focus detection based on at least one of the plurality of image signals to calculate a first defocus value;
An aberration information acquisition step of acquiring first aberration information and second aberration information respectively corresponding to light fluxes that have passed through different pupil regions of the imaging optical system ;
A correction value calculating step of calculating a correction value for correcting the first defocus value based on the first aberration information and the second aberration information,
A defocus value correction step of correcting the first defocus value using the correction value to generate a second defocus value;
An information processing method comprising:
コンピュータに、
撮影光学系の互いに重心が異なる複数の瞳領域を通過した複数の光束のそれぞれに基づく複数の画像信号を取得する画像信号取得工程と、
前記複数の画像信号のうちの少なくとも1つに基づいて焦点検出を行い、第1のデフォーカス値を算出するデフォーカス値算出工程と、
前記撮影光学系の異なる瞳領域を通過した光束にそれぞれ対応する第1の収差情報及び第2の収差情報を取得する収差情報取得工程と、
前記第1の収差情報と、前記第2の収差情報とに基づいて前記第1のデフォーカス値を補正するための補正値を算出する補正値算出工程と、
前記補正値を用いて前記第1のデフォーカス値を補正して第2のデフォーカス値を生成するデフォーカス値補正工程と、
を実行させることを特徴とするプログラム。
On the computer,
An image signal acquisition step of acquiring a plurality of image signals based on each of a plurality of light fluxes that have passed through a plurality of pupil regions having different centroids of the imaging optical system,
A defocus value calculation step of performing focus detection based on at least one of the plurality of image signals to calculate a first defocus value;
An aberration information acquisition step of acquiring first aberration information and second aberration information respectively corresponding to light fluxes that have passed through different pupil regions of the imaging optical system ;
A correction value calculating step of calculating a correction value for correcting the first defocus value based on the first aberration information and the second aberration information,
A defocus value correction step of correcting the first defocus value using the correction value to generate a second defocus value;
A program characterized by causing to execute.
JP2016036064A 2016-02-26 2016-02-26 Information processing device, imaging device, and information processing method Active JP6685769B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016036064A JP6685769B2 (en) 2016-02-26 2016-02-26 Information processing device, imaging device, and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016036064A JP6685769B2 (en) 2016-02-26 2016-02-26 Information processing device, imaging device, and information processing method

Publications (2)

Publication Number Publication Date
JP2017151380A JP2017151380A (en) 2017-08-31
JP6685769B2 true JP6685769B2 (en) 2020-04-22

Family

ID=59739618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016036064A Active JP6685769B2 (en) 2016-02-26 2016-02-26 Information processing device, imaging device, and information processing method

Country Status (1)

Country Link
JP (1) JP6685769B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7091053B2 (en) * 2017-10-27 2022-06-27 キヤノン株式会社 Imaging device and focus detection method

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62157016A (en) * 1985-12-28 1987-07-13 Olympus Optical Co Ltd Auto-focus camera
JP4938922B2 (en) * 2000-06-08 2012-05-23 キヤノン株式会社 Camera system
KR20100077878A (en) * 2008-12-29 2010-07-08 삼성전자주식회사 Focus detecting apparatus and image pick-up apparatus having the same
KR20110027120A (en) * 2009-09-09 2011-03-16 삼성전자주식회사 Image pickup apparatus
JP5956782B2 (en) * 2011-05-26 2016-07-27 キヤノン株式会社 Imaging device and imaging apparatus
JP2014029353A (en) * 2012-07-31 2014-02-13 Sony Corp Focus adjustment device, and focus adjustment method
JP2014048620A (en) * 2012-09-04 2014-03-17 Canon Inc Focus adjustment device, control method therefor, and control program
JP6478457B2 (en) * 2014-01-23 2019-03-06 キヤノン株式会社 Focus adjustment device and focus adjustment method
JP6313685B2 (en) * 2014-05-01 2018-04-18 キヤノン株式会社 Imaging apparatus and control method thereof
JP2016024338A (en) * 2014-07-22 2016-02-08 キヤノン株式会社 Imaging device

Also Published As

Publication number Publication date
JP2017151380A (en) 2017-08-31

Similar Documents

Publication Publication Date Title
US11822211B2 (en) Imaging optical system storing information on its aberration, imaging apparatus, and control method thereof
US10212334B2 (en) Focusing adjustment apparatus and focusing adjustment method
US10313578B2 (en) Image capturing apparatus and method for controlling image capturing apparatus
US9641769B2 (en) Image capture apparatus and method for controlling the same
JP6429546B2 (en) Imaging apparatus, control method, program, and storage medium
JP6486288B2 (en) Imaging apparatus, control method, program, storage medium
JP6843604B2 (en) Information processing device and information processing method
JP6682310B2 (en) Focus detection apparatus and method, and imaging apparatus
JP6298362B2 (en) Imaging apparatus, control method therefor, and imaging system
JP6464118B2 (en) Focus detection apparatus and method, imaging apparatus, and lens unit
JP6854619B2 (en) Focus detection device and method, imaging device, lens unit and imaging system
JP6890937B2 (en) Focus detector, image pickup device, and focus detection method
JP7037271B2 (en) Focus detectors and focus detectors, imaging devices, programs and storage media
JP6685769B2 (en) Information processing device, imaging device, and information processing method
JP6744933B2 (en) Lens part and its control method
JP6686191B2 (en) Focus detection device, imaging device, and focus detection method
JP6548626B2 (en) Image pickup apparatus, control method for image pickup apparatus, and focus control program
JP2020003686A (en) Focus detection device, imaging apparatus, and interchangeable lens device

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20171214

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180126

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190806

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191002

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200401

R151 Written notification of patent or utility model registration

Ref document number: 6685769

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151