JP5476810B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP5476810B2
JP5476810B2 JP2009149045A JP2009149045A JP5476810B2 JP 5476810 B2 JP5476810 B2 JP 5476810B2 JP 2009149045 A JP2009149045 A JP 2009149045A JP 2009149045 A JP2009149045 A JP 2009149045A JP 5476810 B2 JP5476810 B2 JP 5476810B2
Authority
JP
Japan
Prior art keywords
focus detection
imaging
pixel
pixels
interpolation
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.)
Expired - Fee Related
Application number
JP2009149045A
Other languages
Japanese (ja)
Other versions
JP2011007882A (en
Inventor
洋介 日下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2009149045A priority Critical patent/JP5476810B2/en
Publication of JP2011007882A publication Critical patent/JP2011007882A/en
Application granted granted Critical
Publication of JP5476810B2 publication Critical patent/JP5476810B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、撮像装置に関する。   The present invention relates to an imaging apparatus.

赤、緑、または青の色フィルターを有する撮像画素が二次元状に配列され、その二次元配列の中に、色フィルターを有しない焦点検出画素を配列したイメージセンサーを用い、撮像と瞳分割型位相差検出方式による焦点検出を行う撮像装置が知られている(例えば、特許文献1参照)。   Imaging pixels with red, green, or blue color filters are two-dimensionally arranged, and image sensors and pupil division types are used in the two-dimensional array with focus detection pixels that do not have color filters An imaging apparatus that performs focus detection by a phase difference detection method is known (see, for example, Patent Document 1).

特開2000―156823号公報JP 2000-156823 A

しかしながら、このような撮像装置においては、焦点検出画素位置に色純度の高い像が形成された場合、焦点検出結果が不適切になる場合があった。例えば、焦点検出位置(焦点検出エリア)に、赤外に近い高純度の赤色の像が形成された場合には、焦点検出結果はその赤外に近い高純度の赤色の波長に応じたピント位置を示し、該ピント位置に光学系をピント調整することになる。しかし人間の視感度は緑色の波長にピークを持っているので、ピント位置の判断も緑色の像構造に対して行われ、光学系の色収差が大きく上述した赤色の波長に応じたピント位置と緑色の波長に応じたピント位置が大きく隔たっている場合には、ピンボケだと判断されてしまう。   However, in such an imaging apparatus, when an image with high color purity is formed at the focus detection pixel position, the focus detection result may be inappropriate. For example, when a high-purity red image close to infrared is formed at the focus detection position (focus detection area), the focus detection result is a focus position corresponding to the wavelength of the high-purity red near infrared. And the optical system is focused on the focus position. However, since human visibility has a peak at the green wavelength, the focus position is also determined for the green image structure, and the chromatic aberration of the optical system is large. If the focus positions corresponding to the wavelength of are greatly separated, it is determined that the image is out of focus.

請求項1に記載の発明による撮像装置は、撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出する焦点検出手段と、前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を補正する補正手段と、前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号が示す色相が偏っている場合に、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を前記補正手段によって補正することを禁止する禁止制御を行う禁止手段と、を備えることを特徴とする。
請求項2に記載の発明による撮像装置は、撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出する焦点検出手段と、前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を補正する補正手段と、前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号が示す色相と、前記補間手段による補間処理に使用された前記複数種類の撮像画素が配置された領域を囲む、当該領域よりも大きな広範領域に配置された前記複数種類の撮像画素の撮像画素信号が示す色相との相違が少ない場合に、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を前記補正手段によって補正することを禁止する禁止制御を行う禁止手段と、を備えることを特徴とする。
請求項8に記載の発明による撮像装置は、撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出し、デフォーカス量を算出する焦点検出手段と、前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記デフォーカス量を補正する補正手段と、を備え、前記撮像画素は、第1、第2、及び第3の分光感度をそれぞれ有する第1、第2、及び第3の撮像画素を含み、前記焦点検出画素は、前記第1、第2、及び第3の分光感度を含む分光感度を有し、前記撮影光学系の色収差情報は、前記第1の分光感度に対応した第1の波長に関する第1の色収差情報を基準とする、前記第2の分光感度に対応した第2の波長に関する第2の色収差及び前記第3の分光感度に対応した第3の波長に関する第3の色収差情報をそれぞれ含み、前記補間手段は、前記複数の焦点検出画素の近傍に配置された前記第1、第2、及び第3の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記第1、第2、及び第3の撮像画素信号を補間演算によって算出し、前記補正手段は、前記補間手段によって算出された前記第1、第2、及び第3の撮像画素信号の合計値で前記補間手段によって算出された前記第2の撮像画素信号を除算した値を、前記第2の色収差情報に乗算した第1の補正値と、前記合計値で前記補間手段によって算出された前記第3の撮像画素信号を除算した値を、前記第3の色収差情報に乗算した第2の補正値とを、前記デフォーカス量から減算することを特徴とする。
An image pickup apparatus according to a first aspect of the present invention receives a pick-up light beam that has passed through a photographic optical system and outputs an image pickup pixel signal, and passes through the photographic optical system and a plurality of types of image pickup pixels having different spectral sensitivity characteristics. An image sensor in which a plurality of focus detection pixels having spectral sensitivity characteristics different from those of the imaging pixels are arranged in accordance with a two-dimensional array, and the focus detection pixel signal Based on the focus detection means for detecting the focus adjustment state of the imaging optical system based on the imaging pixel signals output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels Interpolation means for calculating the imaging pixel signal at the position of the focus detection pixel by interpolation calculation, and the positions at the positions of the plurality of focus detection pixels calculated by the interpolation means. Based on an image pixel signal and chromatic aberration information of the photographing optical system, a correction unit that corrects a physical quantity representing the focus adjustment state detected by the focus detection unit, and the plurality of focal points calculated by the interpolation unit Prohibition of performing prohibition control for prohibiting correction by the correction means of the physical quantity representing the focus adjustment state detected by the focus detection means when the hue indicated by the imaging pixel signal at the position of the detection pixel is biased And means.
An imaging device according to a second aspect of the invention receives a plurality of types of imaging pixels having different spectral sensitivity characteristics, which receives an imaging light beam that has passed through the imaging optical system and outputs an imaging pixel signal, and passes through the imaging optical system. An image sensor in which a plurality of focus detection pixels having spectral sensitivity characteristics different from those of the imaging pixels are arranged in accordance with a two-dimensional array, and the focus detection pixel signal Based on the focus detection means for detecting the focus adjustment state of the imaging optical system based on the imaging pixel signals output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels Interpolation means for calculating the imaging pixel signal at the position of the focus detection pixel by interpolation calculation, and the positions at the positions of the plurality of focus detection pixels calculated by the interpolation means. Based on an image pixel signal and chromatic aberration information of the photographing optical system, a correction unit that corrects a physical quantity representing the focus adjustment state detected by the focus detection unit, and the plurality of focal points calculated by the interpolation unit The hue indicated by the imaging pixel signal at the position of the detection pixel, and the area disposed in a wide area larger than the area surrounding the area where the plurality of types of imaging pixels used for the interpolation processing by the interpolation unit are disposed. When the difference between the hues indicated by the imaging pixel signals of a plurality of types of imaging pixels is small, prohibition control is performed to prohibit the correction of the physical quantity representing the focus adjustment state detected by the focus detection unit by the correction unit. And a prohibiting means.
An image pickup apparatus according to an eighth aspect of the invention receives a plurality of types of image pickup pixels having different spectral sensitivity characteristics that receive an image pickup light beam that has passed through the image pickup optical system and outputs an image pickup pixel signal, and passes through the image pickup optical system. An image sensor in which a plurality of focus detection pixels having spectral sensitivity characteristics different from those of the imaging pixels are arranged in accordance with a two-dimensional array, and the focus detection pixel signal Based on the focus detection means for detecting a focus adjustment state of the photographing optical system and calculating a defocus amount, and the imaging pixels output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels Based on the signal, an interpolation means for calculating the imaging pixel signals at the positions of the plurality of focus detection pixels by interpolation calculation, and the plurality of focus detection calculated by the interpolation means. With the image-capturing pixel signal at the position of the pixel, on the basis of the chromatic information of the photographing optical system, and a correction means for correcting the defocus amount, the image pickup pixel, first, second, and third The first, second, and third imaging pixels each having a spectral sensitivity of, and the focus detection pixel has a spectral sensitivity that includes the first, second, and third spectral sensitivities, and the imaging The chromatic aberration information of the optical system is based on the first chromatic aberration information related to the first wavelength corresponding to the first spectral sensitivity, the second chromatic aberration related to the second wavelength corresponding to the second spectral sensitivity, and Each of the first, second, and third interpolation information includes third chromatic aberration information relating to a third wavelength corresponding to the third spectral sensitivity, and the interpolation means is disposed in the vicinity of the plurality of focus detection pixels. The imaging pixel signal output by the imaging pixel Based on the first, second, and third imaging pixel signals at the positions of the plurality of focus detection pixels, the correction means calculates the first, second, and the correction means calculated by the interpolation means. A first correction value obtained by multiplying the second chromatic aberration information by a value obtained by dividing the second imaging pixel signal calculated by the interpolation unit by the total value of the second and third imaging pixel signals; A second correction value obtained by multiplying the third chromatic aberration information by a value obtained by dividing the third imaging pixel signal calculated by the interpolation means by a total value is subtracted from the defocus amount. And

本発明によれば、色収差の大きな光学系を使用した場合でも正確な焦点検出を行うことが可能になる。   According to the present invention, accurate focus detection can be performed even when an optical system with large chromatic aberration is used.

第1の実施の形態のデジタルスチルカメラの構成を示す横断面図である。It is a cross-sectional view which shows the structure of the digital still camera of 1st Embodiment. 撮影画面上の焦点検出位置を示す図である。It is a figure which shows the focus detection position on an imaging | photography screen. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 撮像画素の構成を示す図である。It is a figure which shows the structure of an imaging pixel. 焦点検出画素の構成を示す図である。It is a figure which shows the structure of a focus detection pixel. 撮像画素の分光特性を示す図である。It is a figure which shows the spectral characteristic of an imaging pixel. 焦点検出画素の分光特性を示す図である。It is a figure which shows the spectral characteristic of a focus detection pixel. 撮像画素の断面図である。It is sectional drawing of an imaging pixel. 焦点検出画素の断面図である。It is sectional drawing of a focus detection pixel. マイクロレンズを用いた瞳分割型位相差検出方式の焦点検出光学系の構成を示す図である。It is a figure which shows the structure of the focus detection optical system of the pupil division type phase difference detection system using a micro lens. デジタルスチルカメラ(撮像装置)の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a digital still camera (imaging device). 焦点検出結果の信頼性の判定方法を説明するための図である。It is a figure for demonstrating the determination method of the reliability of a focus detection result. 画素補間処理の詳細な動作を示すフローチャートである。It is a flowchart which shows the detailed operation | movement of a pixel interpolation process. 2次元状にベイヤー配列された撮像画素の中の1行に焦点検出画素が配置された場合の、各画素のデータをGij、Bij、Rijで示す図である。It is a figure which shows the data of each pixel by Gij, Bij, Rij when a focus detection pixel is arrange | positioned at one line among the imaging pixels arranged in a two-dimensional Bayer array. 像の連続性の方向を示す図である。It is a figure which shows the direction of the continuity of an image. 横軸が焦点検出画素配列と直交する方向(列方向)の画素位置、縦軸が画素位置における画素データを示す図である。FIG. 4 is a diagram illustrating pixel positions in a direction (column direction) orthogonal to the focus detection pixel array on a horizontal axis, and pixel data on the pixel positions on a vertical axis. 変形例の撮像素子の正面図である。It is a front view of the image sensor of a modification. 図18に示す変形例の撮像素子に用いる焦点検出画素の正面図である。It is a front view of the focus detection pixel used for the image sensor of the modification shown in FIG. 色収差と波長との関係を示す図である。It is a figure which shows the relationship between a chromatic aberration and a wavelength. 視感度曲線を示す図である。It is a figure which shows a visibility curve. 焦点検出画素列を含む焦点検出画素列周辺近傍の領域と該領域の外周辺の更に大きな領域との関係を示す図である。It is a figure which shows the relationship between the area | region of the focus detection pixel row | line | column vicinity containing a focus detection pixel row | line | column, and the still larger area | region of the outer periphery of this area | region.

−−−第1の実施の形態−−−
第1の実施の形態の撮像装置として、レンズ交換式のデジタルスチルカメラを例に挙げて説明する。図1は第1の実施の形態のデジタルスチルカメラの構成を示す横断面図である。第1の実施の形態のデジタルスチルカメラ201は交換レンズ202とカメラボディ203から構成され、交換レンズ202がマウント部204を介してカメラボディ203に装着される。
--- First embodiment ---
A lens interchangeable digital still camera will be described as an example of the imaging apparatus according to the first embodiment. FIG. 1 is a cross-sectional view showing the configuration of the digital still camera according to the first embodiment. The digital still camera 201 according to the first embodiment includes an interchangeable lens 202 and a camera body 203, and the interchangeable lens 202 is attached to the camera body 203 via a mount unit 204.

交換レンズ202はレンズ209、ズーミング用レンズ208、フォーカシング用レンズ210、絞り211、レンズ駆動制御装置206などを備えている。レンズ駆動制御装置206は不図示のマイクロコンピューター、メモリ、駆動制御回路などから構成され、フォーカシング用レンズ210および絞り211の駆動制御や、ズーミング用レンズ208、フォーカシング用レンズ210および絞り211の状態検出などを行う。また、後述するボディ駆動制御装置214との通信によりレンズ情報の送信とカメラ情報の受信を行う。   The interchangeable lens 202 includes a lens 209, a zooming lens 208, a focusing lens 210, an aperture 211, a lens drive control device 206, and the like. The lens drive control device 206 includes a microcomputer (not shown), a memory, a drive control circuit, and the like. The lens drive control device 206 controls the driving of the focusing lens 210 and the aperture 211, detects the state of the zooming lens 208, the focusing lens 210, and the aperture 211, and the like. I do. In addition, lens information is transmitted and camera information is received by communication with a body drive control device 214 described later.

カメラボディ203は撮像素子212、ボディ駆動制御装置214、液晶表示素子駆動回路215、液晶表示素子216、接眼レンズ217、メモリカード219などを備えている。撮像素子212には、撮像画素が二次元状に配置されるとともに、焦点検出位置に対応した部分に焦点検出画素が組み込まれている。   The camera body 203 includes an imaging element 212, a body drive control device 214, a liquid crystal display element drive circuit 215, a liquid crystal display element 216, an eyepiece lens 217, a memory card 219, and the like. In the imaging element 212, imaging pixels are two-dimensionally arranged, and focus detection pixels are incorporated in portions corresponding to focus detection positions.

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

液晶表示素子216は液晶ビューファインダー(EVF:電気的ビューファインダー)として機能する。液晶表示素子駆動回路215は撮像素子212によるスルー画像を液晶表示素子216に表示し、撮影者は接眼レンズ217を介してスルー画像を観察することができる。メモリカード219は、撮像素子212により撮像された画像を記憶する画像ストレージである。   The liquid crystal display element 216 functions as a liquid crystal viewfinder (EVF: electrical viewfinder). The liquid crystal display element driving circuit 215 displays a through image by the imaging element 212 on the liquid crystal display element 216, and the photographer can observe the through image through the eyepiece lens 217. The memory card 219 is an image storage that stores an image captured by the image sensor 212.

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

ボディ駆動制御装置214は、撮像素子212の焦点検出画素からの焦点検出信号に基づいてデフォーカス量を算出し、このデフォーカス量をレンズ駆動制御装置206へ送る。また、ボディ駆動制御装置214は、撮像素子212から画像信号と焦点検出信号を入力し、焦点検出画素の位置における撮像用の画素データ、すなわち、この焦点検出画素の位置に本来あるべき撮像画素を配置した場合にその撮像画素から出力される画素データを、この焦点検出画素の周囲の撮像画素の画素データを用いて補間する。そして、撮像画素の画素データと焦点検出画素位置において補間した画素データにより構成される画像信号をメモリカード219に格納する。さらに、撮像素子212から入力したスルー画像信号を液晶表示素子駆動回路215へ送り、スルー画像を液晶表示素子216に表示させる。さらにまた、ボディ駆動制御装置214は、レンズ駆動制御装置206へ絞り制御情報を送って絞り211の開口制御を行う。   The body drive control device 214 calculates the defocus amount based on the focus detection signal from the focus detection pixel of the image sensor 212 and sends the defocus amount to the lens drive control device 206. Further, the body drive control device 214 inputs an image signal and a focus detection signal from the image sensor 212, and picks up pixel data for imaging at the position of the focus detection pixel, that is, an imaging pixel that should be originally at the position of the focus detection pixel. When arranged, pixel data output from the imaging pixel is interpolated using pixel data of imaging pixels around the focus detection pixel. Then, an image signal composed of pixel data of the image pickup pixel and pixel data interpolated at the focus detection pixel position is stored in the memory card 219. Further, the through image signal input from the image sensor 212 is sent to the liquid crystal display element driving circuit 215, and the through image is displayed on the liquid crystal display element 216. Furthermore, the body drive control device 214 sends aperture control information to the lens drive control device 206 to control the aperture of the aperture 211.

レンズ駆動制御装置206は、レンズ情報をフォーカシング状態、ズーミング状態、絞り設定状態、絞り開放F値などに応じて変更する。具体的には、ズーミング用レンズ208とフォーカシング用レンズ210の位置と絞り211の絞り値を検出し、これらのレンズ位置と絞り値に応じてレンズ情報を演算したり、あるいは予め用意されたルックアップテーブルからレンズ位置と絞り値に応じたレンズ情報を選択する。またフォーカシング状態、ズーミング状態、絞り開放F値によって変化する色収差情報をボディ駆動制御装置214に送信する。なお色収差情報を後述する複数の焦点検出エリア毎に定められる。   The lens drive control device 206 changes the lens information according to the focusing state, zooming state, aperture setting state, aperture opening F value, and the like. Specifically, the positions of the zooming lens 208 and the focusing lens 210 and the aperture value of the aperture 211 are detected, and lens information is calculated according to these lens positions and aperture values, or a lookup prepared in advance. Lens information corresponding to the lens position and aperture value is selected from the table. Also, chromatic aberration information that changes depending on the focusing state, zooming state, and full aperture F value is transmitted to the body drive control unit 214. Chromatic aberration information is determined for each of a plurality of focus detection areas described later.

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

カメラボディ203にはマウント部204を介して種々の結像光学系を有する交換レンズ202が装着可能であり、カメラボディ203は撮像素子212に組み込まれた焦点検出画素の出力に基づいて交換レンズ202の焦点調節状態を検出する。   An interchangeable lens 202 having various imaging optical systems can be attached to the camera body 203 via a mount unit 204, and the camera body 203 is based on an output of a focus detection pixel incorporated in the image sensor 212. Detect the focus adjustment state.

図2は撮影画面上の焦点検出位置、すなわち後述する焦点検出画素列により焦点検出を行う際に画面上で像をサンプリングする焦点検出エリアを示す。矩形の撮影画面100の中央、左右および上下の5箇所に焦点検出エリア101〜105が配置される。長方形で示した各焦点検出エリア101〜105の長手方向に焦点検出画素が直線的に配列される。   FIG. 2 shows a focus detection area on which an image is sampled on the screen when focus detection is performed using a focus detection position on the photographing screen, that is, a focus detection pixel array to be described later. Focus detection areas 101 to 105 are arranged at five locations on the center, left and right, and top and bottom of the rectangular shooting screen 100. Focus detection pixels are linearly arranged in the longitudinal direction of the focus detection areas 101 to 105 indicated by rectangles.

図3は撮像素子212の詳細な構成を示す正面図であり、撮像素子212上の焦点検出エリア101(焦点検出エリア104、105も同様)の近傍を拡大して示す。撮像素子212は、撮像画素310と焦点検出画素313、314から構成される。撮像画素310は水平方向と垂直方向に2次元状に正方格子配列されており、焦点検出画素313、314は水平方向に配列されている。   FIG. 3 is a front view showing a detailed configuration of the image sensor 212, and shows an enlarged view of the vicinity of the focus detection area 101 (the same applies to the focus detection areas 104 and 105) on the image sensor 212. The imaging element 212 includes an imaging pixel 310 and focus detection pixels 313 and 314. The imaging pixels 310 are arranged in a two-dimensional square lattice in the horizontal and vertical directions, and the focus detection pixels 313 and 314 are arranged in the horizontal direction.

図5に示すように、撮像画素310はマイクロレンズ10、光電変換部11および色フィルター(不図示)から構成される。色フィルターは赤(R)、緑(G)、青(B)の3種類からなり、それぞれの分光感度は図7に示す特性となっている。各色フィルターを備えた撮像画素310がベイヤー配列されている。なお図7においてλR、λG、λBは赤、緑、青の分光感度曲線のピーク波長(中心波長)を示している。   As shown in FIG. 5, the imaging pixel 310 includes the microlens 10, the photoelectric conversion unit 11, and a color filter (not shown). There are three types of color filters, red (R), green (G), and blue (B), and the respective spectral sensitivities have the characteristics shown in FIG. An imaging pixel 310 having each color filter is arranged in a Bayer array. In FIG. 7, λR, λG, and λB indicate the peak wavelengths (center wavelengths) of the red, green, and blue spectral sensitivity curves.

図6(a)に示すように、焦点検出画素313はマイクロレンズ10と光電変換部16から構成される。光電変換部16の形状はマイクロレンズ10の垂直2等分線に接する左半円状である。また、図6(b)に示すように、焦点検出画素314はマイクロレンズ10と光電変換部17から構成される。光電変換部17の形状はマイクロレンズ10の垂直2等分線に接する右半円である。光電変換部16と17の正面図は、マイクロレンズ10を基準として重ね合わせて表示した場合に左右水平方向に並んでおり、マイクロレンズ10の垂直2等分線に関して対称な形状をしている。焦点検出画素313と焦点検出画素314が水平方向、すなわち光電変換部16と17の並び方向に交互に配置される。   As illustrated in FIG. 6A, the focus detection pixel 313 includes the microlens 10 and the photoelectric conversion unit 16. The shape of the photoelectric conversion unit 16 is a left semicircle in contact with the vertical bisector of the microlens 10. Further, as shown in FIG. 6B, the focus detection pixel 314 includes the microlens 10 and the photoelectric conversion unit 17. The shape of the photoelectric conversion unit 17 is a right semicircle in contact with the vertical bisector of the microlens 10. The front views of the photoelectric conversion units 16 and 17 are arranged side by side in the horizontal direction when they are displayed superimposed on the microlens 10, and have a symmetrical shape with respect to the vertical bisector of the microlens 10. The focus detection pixels 313 and the focus detection pixels 314 are alternately arranged in the horizontal direction, that is, the arrangement direction of the photoelectric conversion units 16 and 17.

焦点検出画素313、314には光量をかせぐために色フィルターが設置されておらず、その分光特性は光電変換を行うフォトダイオードの分光感度、赤外カットフィルター(不図示)の分光感度を合わせ持った分光特性(図8参照)となる。つまり、図7に示す緑画素、赤画素および青画素の分光特性を加算したような分光特性となり、その感度の光波長領域は緑画素、赤画素および青画素の感度の光波長領域を包括している。焦点検出画素313、314は撮像画素310のBとGが配置されるべき行に配置される。   The focus detection pixels 313 and 314 are not provided with a color filter in order to increase the amount of light, and the spectral characteristics of the focus detection pixels 313 and 314 include the spectral sensitivity of a photodiode that performs photoelectric conversion and the spectral sensitivity of an infrared cut filter (not shown). Spectral characteristics (see FIG. 8). In other words, the spectral characteristics are obtained by adding the spectral characteristics of the green pixel, red pixel, and blue pixel shown in FIG. 7, and the light wavelength region of the sensitivity includes the light wavelength regions of the sensitivity of the green pixel, red pixel, and blue pixel. ing. The focus detection pixels 313 and 314 are arranged in a row where B and G of the imaging pixel 310 are to be arranged.

図4は撮像素子212の詳細な構成を示す正面図であり、撮像素子212上の焦点検出エリア102(焦点検出エリア103も同様)の近傍を拡大して示す。撮像素子212は、撮像画素310と焦点検出画素315、316から構成される。焦点検出画素315,316は焦点検出画素313,314を90度回転した構造となっており、撮像面において垂直方向に配列されている。焦点検出画素315、316は、撮像画素310のBとGが配置されるべき列に配置されている。   FIG. 4 is a front view showing a detailed configuration of the image sensor 212, and shows an enlarged view of the vicinity of the focus detection area 102 (the same applies to the focus detection area 103) on the image sensor 212. The imaging element 212 includes an imaging pixel 310 and focus detection pixels 315 and 316. The focus detection pixels 315 and 316 have a structure in which the focus detection pixels 313 and 314 are rotated by 90 degrees, and are arranged in the vertical direction on the imaging surface. The focus detection pixels 315 and 316 are arranged in a column in which B and G of the imaging pixel 310 are to be arranged.

焦点検出画素313、314、315、316が、撮像画素310のBとGが配置されるべき行または列に配置されているのは、後述する画素補間処理において補間誤差が生じた場合に、人間の視覚特性上、赤画素の補間誤差に比較して青画素の補間誤差が目立たないためである。   The focus detection pixels 313, 314, 315, and 316 are arranged in the row or column where the B and G of the imaging pixel 310 are to be arranged when an interpolation error occurs in the pixel interpolation processing described later. This is because the blue pixel interpolation error is less conspicuous than the red pixel interpolation error.

図9は撮像画素310の断面図である。撮像画素310において、撮像用の光電変換部11の前方にマイクロレンズ10が配置され、マイクロレンズ10により光電変換部11が前方に投影される。光電変換部11は半導体回路基板29上に形成される。不図示の色フィルターはマイクロレンズ10と光電変換部11の中間に配置される。   FIG. 9 is a cross-sectional view of the imaging pixel 310. In the imaging pixel 310, the microlens 10 is disposed in front of the photoelectric conversion unit 11 for imaging, and the photoelectric conversion unit 11 is projected forward by the microlens 10. The photoelectric conversion unit 11 is formed on the semiconductor circuit substrate 29. A color filter (not shown) is disposed between the microlens 10 and the photoelectric conversion unit 11.

図10(a)は焦点検出画素313の断面図である。焦点検出画素313において、光電変換部16の前方にマイクロレンズ10が配置され、マイクロレンズ10により光電変換部16が前方に投影される。光電変換部16は半導体回路基板29上に形成されており、その上にマイクロレンズ10が半導体イメージセンサーの製造工程により一体的かつ固定的に形成される。光電変換部16はマイクロレンズ10の光軸の片側に配置される。   FIG. 10A is a cross-sectional view of the focus detection pixel 313. In the focus detection pixel 313, the microlens 10 is disposed in front of the photoelectric conversion unit 16, and the photoelectric conversion unit 16 is projected forward by the microlens 10. The photoelectric conversion unit 16 is formed on the semiconductor circuit substrate 29, and the microlens 10 is integrally and fixedly formed thereon by the manufacturing process of the semiconductor image sensor. The photoelectric conversion unit 16 is disposed on one side of the optical axis of the microlens 10.

図10(b)は焦点検出画素314の断面図である。焦点検出画素314において、光電変換部17の前方にマイクロレンズ10が配置され、マイクロレンズ10により光電変換部17が前方に投影される。光電変換部17は半導体回路基板29上に形成されており、その上にマイクロレンズ10が半導体イメージセンサーの製造工程により一体的かつ固定的に形成される。光電変換部17は、マイクロレンズ10の光軸の片側でかつ光電変換部16の反対側に配置される。   FIG. 10B is a cross-sectional view of the focus detection pixel 314. In the focus detection pixel 314, the microlens 10 is disposed in front of the photoelectric conversion unit 17, and the photoelectric conversion unit 17 is projected forward by the microlens 10. The photoelectric conversion unit 17 is formed on the semiconductor circuit substrate 29, and the microlens 10 is integrally and fixedly formed thereon by the manufacturing process of the semiconductor image sensor. The photoelectric conversion unit 17 is disposed on one side of the optical axis of the microlens 10 and on the opposite side of the photoelectric conversion unit 16.

図11は、マイクロレンズ10を用いた瞳分割型位相差検出方式の焦点検出光学系の構成を示す。図11において、射出瞳90は、交換レンズの予定結像面に配置され、マイクロレンズ10の前方へ距離dの位置に設定されている。なお、距離dはマイクロレンズ10の曲率、屈折率、マイクロレンズ10と光電変換部13,14との間の距離などに応じて決まる距離であって、この明細書では測距瞳距離と呼ぶ。図11には、交換レンズの光軸91、マイクロレンズ10a〜10d、光電変換部(画素)313a、313b、314a、314b、光束73,74、83,84が示されている。   FIG. 11 shows a configuration of a focus detection optical system of the pupil division type phase difference detection method using the microlens 10. In FIG. 11, the exit pupil 90 is disposed on the planned imaging plane of the interchangeable lens and is set at a distance d in front of the microlens 10. The distance d is a distance determined according to the curvature and refractive index of the microlens 10, the distance between the microlens 10 and the photoelectric conversion units 13 and 14, and is referred to as a distance measuring pupil distance in this specification. FIG. 11 shows an optical axis 91 of the interchangeable lens, microlenses 10a to 10d, photoelectric conversion units (pixels) 313a, 313b, 314a, 314b, and light beams 73, 74, 83, 84.

また、領域93は、光電変換部13a、13bがマイクロレンズ10a、10cにより投影される領域であり、この明細書では測距瞳と呼ぶ。同様に、領域94も測距瞳であり、光電変換部14a、14bがマイクロレンズ10b、10dにより投影される。なお、図11では説明を理解しやすくするために測距瞳を楕円領域で示しているが、実際は光電変換部の形状が拡大投影された形状となる。   The region 93 is a region where the photoelectric conversion units 13a and 13b are projected by the micro lenses 10a and 10c, and is referred to as a distance measuring pupil in this specification. Similarly, the region 94 is also a distance measuring pupil, and the photoelectric conversion units 14a and 14b are projected by the micro lenses 10b and 10d. In FIG. 11, the range-finding pupil is shown as an elliptical area for easy understanding of the description. However, the shape of the photoelectric conversion unit is actually an enlarged projection.

図11では隣接する4画素(画素313a、313b、314a、314b)を模式的に例示しているが、その他の画素においても、光電変換部はそれぞれ対応した測距瞳から各マイクロレンズに到来する光束を受光する。焦点検出画素の配列方向は、一対の測距瞳の並び方向、すなわち一対の光電変換部の並び方向と一致させる。   Although FIG. 11 schematically illustrates four adjacent pixels (pixels 313a, 313b, 314a, and 314b), in other pixels, the photoelectric conversion units arrive at the respective microlenses from the corresponding distance measurement pupils. Receives light flux. The arrangement direction of the focus detection pixels is made to coincide with the arrangement direction of the pair of distance measuring pupils, that is, the arrangement direction of the pair of photoelectric conversion units.

マイクロレンズ10a〜10dは交換レンズの予定結像面近傍に配置されている。マイクロレンズ10a〜10dによりその背後に配置された光電変換部13a、13b、14a、14bの形状がマイクロレンズ10a〜10dから測距瞳距離dだけ離間した射出瞳90上に投影され、その投影形状は測距瞳93,94を形成する。すなわち、投影距離dにある射出瞳90上において、各画素の光電変換部の投影形状(測距瞳93,94)が一致するように各画素における光電変換部の投影方向が決定されている。   The microlenses 10a to 10d are arranged in the vicinity of the planned imaging plane of the interchangeable lens. The shapes of the photoelectric conversion units 13a, 13b, 14a, and 14b arranged behind the microlenses 10a to 10d are projected onto the exit pupil 90 that is separated from the microlenses 10a to 10d by the distance measurement pupil distance d, and the projected shape thereof. Forms distance measuring pupils 93 and 94. That is, on the exit pupil 90 at the projection distance d, the projection direction of the photoelectric conversion unit in each pixel is determined so that the projection shapes (ranging pupils 93 and 94) of the photoelectric conversion unit of each pixel match.

光電変換部13aは測距瞳93を通過し、マイクロレンズ10aに向う光束73によりマイクロレンズ10a上に形成される像の強度に対応した信号を出力する。光電変換部13bは測距瞳93を通過し、マイクロレンズ10cに向う光束83によりマイクロレンズ10c上に形成される像の強度に対応した信号を出力する。光電変換部14aは測距瞳94を通過し、マイクロレンズ10bに向う光束74によりマイクロレンズ10b上に形成される像の強度に対応した信号を出力する。光電変換部14bは測距瞳94を通過し、マイクロレンズ10dに向う光束84によりマイクロレンズ10d上に形成される像の強度に対応した信号を出力する。   The photoelectric conversion unit 13a passes through the distance measuring pupil 93 and outputs a signal corresponding to the intensity of the image formed on the microlens 10a by the light beam 73 directed to the microlens 10a. The photoelectric conversion unit 13b outputs a signal corresponding to the intensity of the image formed on the microlens 10c by the light beam 83 passing through the distance measuring pupil 93 and directed to the microlens 10c. The photoelectric conversion unit 14a outputs a signal corresponding to the intensity of the image formed on the microlens 10b by the light beam 74 passing through the distance measuring pupil 94 and directed to the microlens 10b. The photoelectric conversion unit 14b passes through the distance measuring pupil 94 and outputs a signal corresponding to the intensity of the image formed on the microlens 10d by the light beam 84 directed to the microlens 10d.

上記のような2種類の焦点検出画素を直線状に多数配置し、各画素の光電変換部の出力を測距瞳93および測距瞳94に対応した出力グループにまとめることによって、測距瞳93と測距瞳94をそれぞれ通過する焦点検出用光束が画素列上に形成する一対の像の強度分布に関する情報が得られる。この情報に対して後述する像ズレ検出演算処理(相関演算処理、位相差検出処理)を施すことにより、いわゆる瞳分割型位相差検出方式で一対の像の像ズレ量が検出される。さらに、像ズレ量に一対の測距瞳の重心間隔に応じた変換演算を行うことによって、予定結像面に対する現在の結像面、すなわち予定結像面上のマイクロレンズアレイの位置に対応した焦点検出位置における結像面の偏差(デフォーカス量)が算出される。   A large number of the two types of focus detection pixels as described above are arranged in a straight line, and the output of the photoelectric conversion unit of each pixel is grouped into an output group corresponding to the distance measurement pupil 93 and the distance measurement pupil 94, thereby the distance measurement pupil 93. And information on the intensity distribution of the pair of images formed on the pixel array by the focus detection light fluxes passing through the distance measuring pupil 94, respectively. By applying an image shift detection calculation process (correlation calculation process, phase difference detection process), which will be described later, to this information, the image shift amount of a pair of images is detected by a so-called pupil division type phase difference detection method. Furthermore, by performing a conversion operation according to the center of gravity distance of the pair of distance measuring pupils to the image shift amount, it corresponds to the current imaging plane with respect to the planned imaging plane, that is, the position of the microlens array on the planned imaging plane. The deviation (defocus amount) of the imaging plane at the focus detection position is calculated.

図12は、第1の実施の形態のデジタルスチルカメラ(撮像装置)の動作を示すフローチャートである。ボディ駆動制御装置214は、ステップS100でカメラの電源がONされるとステップS110から動作を開始する。ステップS110において、撮像素子212から撮像画素のデータを間引き読み出しし、電子ビューファインダーに表示させる。続くステップS120では、焦点検出画素列から一対の像に対応した一対の像データと焦点検出画素列の周辺近傍の撮像画素のデータを読み出す。なお、焦点検出エリアは撮影者が焦点検出エリア選択スイッチ(不図示)を操作して選択されているものとする。   FIG. 12 is a flowchart illustrating the operation of the digital still camera (imaging device) according to the first embodiment. The body drive control device 214 starts its operation from step S110 when the camera is turned on in step S100. In step S110, the image pickup pixel data is read out from the image pickup device 212 and displayed on the electronic viewfinder. In subsequent step S120, a pair of image data corresponding to the pair of images and data of imaging pixels near the periphery of the focus detection pixel array are read from the focus detection pixel array. Note that the focus detection area is selected by the photographer by operating a focus detection area selection switch (not shown).

ステップS130では、読み出された撮像画素の一対の像データに基づいて像ズレ検出演算処理(相関演算処理)を行い、像ズレ量を演算してデフォーカス量に変換する。ステップS131では、焦点検出画素の周辺近傍の撮像画素のデータに基づいて焦点検出画素の位置における仮想的な撮像画素のデータを後述する補間処理により求める。ステップS132において、デフォーカス量補正を禁止するかを判定する。どのような場合に肯定判定がされるかについては後述する。肯定判定の場合は次のステップS133をスキップし、否定判定の場合はステップS133へ進む。ステップS133では、交換レンズから焦点検出エリア位置に対応した色収差情報を読み出すとともに、この色収差情報とステップS131で求めた仮想的な撮像画素のデータに基づいてデフォーカス量を補正する。このデフォーカス量補正処理については詳細を後述する。   In step S130, an image shift detection calculation process (correlation calculation process) is performed based on the read pair of image data of the imaging pixels, and the image shift amount is calculated and converted into a defocus amount. In step S131, virtual imaging pixel data at the position of the focus detection pixel is obtained by interpolation processing to be described later, based on the imaging pixel data in the vicinity of the focus detection pixel. In step S132, it is determined whether defocus amount correction is prohibited. The case in which an affirmative determination is made will be described later. If the determination is affirmative, the next step S133 is skipped, and if the determination is negative, the process proceeds to step S133. In step S133, chromatic aberration information corresponding to the focus detection area position is read from the interchangeable lens, and the defocus amount is corrected based on the chromatic aberration information and the data of the virtual imaging pixel obtained in step S131. Details of the defocus amount correction processing will be described later.

ステップS140で合焦近傍か否か、算出された補正デフォーカス量の絶対値が所定値以内であるか否かを判別する。合焦近傍でないと判別された場合はステップS150へ進み、補正デフォーカス量をレンズ駆動制御装置206へ送信し、図1に示す交換レンズ202のフォーカシングレンズ210を合焦位置に駆動させる。その後、ステップS110へ戻って上述した動作を繰り返す。   In step S140, it is determined whether or not the focus is close to focus, and whether or not the calculated absolute value of the corrected defocus amount is within a predetermined value. If it is determined that the lens is not in focus, the process proceeds to step S150, where the corrected defocus amount is transmitted to the lens drive controller 206, and the focusing lens 210 of the interchangeable lens 202 shown in FIG. 1 is driven to the focus position. Then, it returns to step S110 and repeats the operation | movement mentioned above.

なお、焦点検出不能な場合もこのステップS150へ分岐し、レンズ駆動制御装置206へスキャン駆動命令を送信し、交換レンズ202のフォーカシングレンズ210を無限遠位置から至近位置までスキャン駆動させ、ステップS110へ戻って上述した動作を繰り返す。   Even when focus detection is impossible, the process branches to step S150, a scan drive command is transmitted to the lens drive control device 206, and the focusing lens 210 of the interchangeable lens 202 is scan-driven from the infinity position to the closest position, and the process proceeds to step S110. Return and repeat the above operation.

一方、ステップS140で合焦近傍であると判別した場合はステップS160へ進み、シャッターボタン(不図示)の操作によりシャッターレリーズがなされたか否かを判別し、なされていないと判別された場合はステップS110へ戻って上述した動作を繰り返す。シャッターレリーズがなされたと判別された場合は、レンズ駆動制御装置206へ絞り調整命令を送信し、交換レンズ202の絞り値を制御F値(ユーザーまたは自動により設定されたF値)に設定する。絞り制御が終了した時点で、撮像素子212に撮像動作を行わせ、撮像素子212の撮像画素およびすべての焦点検出画素から画像データを読み出す。   On the other hand, if it is determined in step S140 that the focus is close to the in-focus state, the process proceeds to step S160, where it is determined whether or not a shutter release has been performed by operating a shutter button (not shown). Returning to S110, the above-described operation is repeated. If it is determined that the shutter release has been made, an aperture adjustment command is transmitted to the lens drive control unit 206, and the aperture value of the interchangeable lens 202 is set to the control F value (F value set by the user or automatically). When the aperture control is finished, the image sensor 212 is caused to perform an imaging operation, and image data is read from the imaging pixels of the image sensor 212 and all focus detection pixels.

ステップS180において、焦点検出画素列の各画素位置の画素データを焦点検出画素の周囲の撮像画素のデータに基づいて画素補間する。この画素補間については詳細を後述する。続くステップS190で、撮像画素のデータおよび補間されたデータからなる画像データをメモリカード219に保存し、ステップS110へ戻って上述した動作を繰り返す。   In step S180, pixel interpolation of pixel data at each pixel position in the focus detection pixel row is performed based on data of imaging pixels around the focus detection pixel. Details of this pixel interpolation will be described later. In subsequent step S190, the image data composed of the imaged pixel data and the interpolated data is stored in the memory card 219, and the process returns to step S110 to repeat the above-described operation.

次に、図12のステップS130における像ズレ検出演算処理(相関演算処理)の詳細について説明する。焦点検出画素が検出する一対の像は、測距瞳がレンズの絞り開口によりけられて光量バランスが崩れている可能性があるので、光量バランスに対して像ズレ検出精度を維持できるタイプの相関演算を施す。焦点検出画素列から読み出された一対のデータ列A1〜A1、A2〜A2(Mはデータ数)に対し下記の式(1)の相関演算を行い、相関量C(k)を演算する。
C(k)=Σ|A1・A2n+1+k−A2n+k・A1n+1| (1)
Next, details of the image shift detection calculation process (correlation calculation process) in step S130 of FIG. 12 will be described. The pair of images detected by the focus detection pixels has a possibility that the distance measurement pupil is displaced by the aperture of the lens and the balance of the light quantity is lost. Perform the operation. The correlation calculation of the following equation (1) is performed on the pair of data strings A1 1 to A1 M and A2 1 to A2 M (M is the number of data) read from the focus detection pixel array, and the correlation amount C (k) Is calculated.
C (k) = Σ | A1 n · A2 n + 1 + k− A2 n + k · A1 n + 1 | (1)

式(1)において、Σ演算はnについて累積されるが、nのとる値の範囲は、像ずらし量kに応じてA1、A1n+1、A2n+k、A2n+1+kのデータが存在する範囲に限定される。像ずらし量kは整数であり、データ列のデータ間隔を単位とした相対的シフト量である。式(1)の演算結果は、図13(a)に示すように、一対のデータの相関が高いシフト量(図13(a)ではk=k=2)において相関量C(k)が極小(小さいほど相関度が高い)になる。なお、相関演算式は式(1)に限定されない。 In equation (1), the Σ operation is accumulated for n, but the range of values of n is limited to the range in which data of A1 n , A1 n + 1 , A2 n + k , A2 n + 1 + k exists according to the image shift amount k. Is done. The image shift amount k is an integer and is a relative shift amount with the data interval of the data string as a unit. As shown in FIG. 13A, the calculation result of the expression (1) indicates that the correlation amount C (k) is obtained when the pair of data has a high correlation amount (k = k j = 2 in FIG. 13A). Minimal (the smaller the value, the higher the degree of correlation). The correlation calculation formula is not limited to the formula (1).

次に、式(2)から(5)による3点内挿の手法を用いて連続的な相関量に対する極小値C(x)を与えるシフト量xを求める。
x=k+D/SLOP (2)
C(x)=C(k)−|D| (3)
D={C(k−1)−C(k+1)}/2 (4)
SLOP=MAX{C(kj+1)−C(k),C(kj−1)−C(k)} (5)
Next, the shift amount x that gives the minimum value C (x) with respect to the continuous correlation amount is obtained using the three-point interpolation method according to the equations (2) to (5).
x = k j + D / SLOP (2)
C (x) = C (k j ) − | D | (3)
D = {C (k j −1) −C (k j +1)} / 2 (4)
SLOP = MAX {C (k j + 1 ) −C (k j ), C (k j−1 ) −C (k j )} (5)

式(2)で算出されたシフト量xの信頼性があるかどうかは次のようにして判定される。図13(b)に示すように、一対のデータの相関度が低い場合は、内挿された相関量の極小値C(x)の値が大きくなる。したがって、C(x)が所定のしきい値以上の場合は、算出されたずらし量の信頼性が低いと判定し、算出されたシフト量xをキャンセルする。あるいは、C(x)をデータのコントラストで規格化するために、コントラストに比例した値となるSLOPでC(x)を除した値が所定値以上の場合は、算出されたシフト量の信頼性が低いと判定し、算出されたシフト量xをキャンセルする。あるいはまた、コントラストに比例した値となるSLOPが所定値以下の場合は、被写体が低コントラストであり、算出されたシフト量の信頼性が低いと判定し、算出されたシフト量xをキャンセルする。   Whether or not the shift amount x calculated by the equation (2) is reliable is determined as follows. As shown in FIG. 13B, when the degree of correlation between a pair of data is low, the value of the interpolated minimum value C (x) of the correlation amount increases. Therefore, when C (x) is equal to or greater than a predetermined threshold value, it is determined that the calculated shift amount has low reliability, and the calculated shift amount x is canceled. Alternatively, in order to normalize C (x) with the contrast of data, if the value obtained by dividing C (x) by SLOP that is proportional to the contrast is equal to or greater than a predetermined value, the reliability of the calculated shift amount Is determined to be low, and the calculated shift amount x is canceled. Alternatively, when SLOP that is a value proportional to the contrast is equal to or less than a predetermined value, it is determined that the subject has low contrast and the reliability of the calculated shift amount is low, and the calculated shift amount x is canceled.

図13(c)に示すように、一対のデータの相関度が低く、シフト範囲kmin〜kmaxの間で相関量C(k)の落ち込みがない場合は、極小値C(x)を求めることができず、このような場合は焦点検出不能と判定する。 As shown in FIG. 13 (c), low level of correlation between the pair of data when there is no drop in correlation quantity C (k) between the shift range k min to k max is for a local minimum C (x) In such a case, it is determined that the focus cannot be detected.

算出されたシフト量xの信頼性があると判定された場合は、式(6)により像ズレ量shftに換算される。
shft=PY・x (6)
When it is determined that the calculated shift amount x is reliable, it is converted into the image shift amount shft by the equation (6).
shft = PY · x (6)

式(6)において、PYは検出ピッチ、すなわち焦点検出画素のピッチである。次に、式(6)により算出された像ズレ量に所定の変換係数Kを乗じてデフォーカス量defへ変換する。
def=K・shft (7)
In Expression (6), PY is a detection pitch, that is, a pitch of focus detection pixels. Next, the image shift amount calculated by the equation (6) is multiplied by a predetermined conversion coefficient Kd to be converted into a defocus amount def.
def = K d · shft (7)

図14は、図12のステップS180における画素補間処理の詳細な動作を示すフローチャートである。この画素補間処理においては、焦点検出画素の位置における仮想的な撮像画素のデータを焦点検出画素の周辺近傍の撮像画素のデータに基づいて補間する。ボディ駆動制御装置214はステップ300から画素補間処理を開始する。図15は、2次元状にベイヤー配列された撮像画素の中の1行(図中の斜線で示す行)に焦点検出画素が配置された場合の、各画素のデータをGij、Bij、Rijで示す。画素補間処理では斜線の入った行の画素データ(G03、B13、G23、B33、G43、B53)が周囲の撮像画素のデータから補間される。   FIG. 14 is a flowchart showing a detailed operation of the pixel interpolation process in step S180 of FIG. In this pixel interpolation processing, data of virtual imaging pixels at the position of the focus detection pixel is interpolated based on data of imaging pixels in the vicinity of the focus detection pixel. The body drive control device 214 starts pixel interpolation processing from step 300. FIG. 15 shows the data of each pixel as Gij, Bij, and Rij when the focus detection pixel is arranged in one row (rows indicated by diagonal lines) in the two-dimensional Bayer array imaging pixels. Show. In the pixel interpolation process, pixel data (G03, B13, G23, B33, G43, and B53) in the hatched rows are interpolated from the data of surrounding imaging pixels.

ステップS310で、GB行(GijとBijとが配列される行)またはGB列(GijとBijとが配列される列)に配置された焦点検出画素の内、緑画素が配置されるべき位置に配置された焦点検出画素のひとつが順次指定される。ここでは、G23を出力すべき位置の焦点検出画素が指定されたとして説明を進める。ステップS320において、この焦点検出画素位置で像の連続性が高い方向はないとして、像の連続性が高い方向を表すパラメーターDCGを0に初期化する。ここで、像の連続性が高い方向とは、例えば像がエッジパターンやラインパターンである場合に、エッジパターンやラインパターンの伸びる方向が像の連続性が高い方向である。   In step S310, among the focus detection pixels arranged in the GB row (the row in which Gij and Bij are arranged) or the GB column (the column in which Gij and Bij are arranged), the green pixel is located at the position where the green pixel is to be arranged. One of the arranged focus detection pixels is sequentially designated. Here, the description will proceed assuming that the focus detection pixel at the position where G23 is to be output is designated. In step S320, assuming that there is no direction in which the image continuity is high at the focus detection pixel position, a parameter DCG representing the direction in which the image continuity is high is initialized to zero. Here, the direction in which the continuity of the image is high is, for example, the direction in which the edge pattern or the line pattern extends when the image is an edge pattern or a line pattern.

ステップS330では、焦点検出画素位置近傍で像の均一性(一様性)があるか否かを判別する。像の均一性は例えば次のように判定される。本来は緑画素G23があるべき位置に配置された焦点検出画素の周辺の緑画素の画像データを用いて、この焦点検出画素周辺の緑画素の平均値Gavと、焦点検出画素位置近傍の画像データの偏差を表すGsdを演算する。
Gav=(G10+G30+G21+G12+G32+G14+G34+G25+G16+G36)/10 (8)
Gsd=(|G10−Gav|+|G30−Gav|+|G21−Gav|+|G12−Gav|+|G32−Gav|+|G14−Gav|+|G34−Gav|+|G25−Gav|+|G16−Gav|+|G36−Gav|))/(10・Gav) (9)
焦点検出画素位置近傍の画素データの偏差を表すGsdが所定のしきい値以内である場合には、像の均一性があると判定される。均一性があると判別された場合はステップS420へ進み、均一性がないと判断された場合はステップS340へ進む。
In step S330, it is determined whether or not there is image uniformity (uniformity) in the vicinity of the focus detection pixel position. The uniformity of the image is determined as follows, for example. Originally, using the image data of the green pixels around the focus detection pixel arranged at the position where the green pixel G23 should be, the average value Gav of the green pixels around the focus detection pixel and the image data in the vicinity of the focus detection pixel position Gsd representing the deviation is calculated.
Gav = (G10 + G30 + G21 + G12 + G32 + G14 + G34 + G25 + G16 + G36) / 10 (8)
Gsd = (| G10-Gav | + | G30-Gav | + | G21-Gav | + | G32-Gav | + | G14-Gav | + | G34-Gav | + | G25-Gav | + | G16-Gav | + | G36-Gav |)) / (10 · Gav) (9)
When Gsd representing the deviation of pixel data in the vicinity of the focus detection pixel position is within a predetermined threshold value, it is determined that there is image uniformity. If it is determined that there is uniformity, the process proceeds to step S420, and if it is determined that there is no uniformity, the process proceeds to step S340.

ステップS340では、焦点検出画素配列の方向(図15に示す例では左右方向)に対して、右上がり斜め45度方向(図16に示すDCG=4の方向)において像の連続性があるか否かを判定する。右上がり斜め45度方向における像の連続性の有無は、例えば次のようにして判定される。
Gav1=(G12+G21)/2 (10)
Gsd1=|G12−G21|/Gav1 (11)
Gav2=(G14+G32)/2 (12)
Gsd2=|G14−G32|/Gav2 (13)
Gav3=(G25+G34)/2 (14)
Gsd3=|G25−G34|/Gav3 (15)
Gdf12=|Gav1−Gav2| (16)
Gdf13=|Gav1−Gav3| (17)
Gdf23=|Gav2−Gav3| (18)
In step S340, whether or not there is image continuity in the 45 ° upward diagonal direction (DCG = 4 direction shown in FIG. 16) with respect to the direction of the focus detection pixel array (left and right direction in the example shown in FIG. 15). Determine whether. The presence / absence of continuity of the image in the direction of 45 degrees diagonally upward is determined as follows, for example.
Gav1 = (G12 + G21) / 2 (10)
Gsd1 = | G12−G21 | / Gav1 (11)
Gav2 = (G14 + G32) / 2 (12)
Gsd2 = | G14−G32 | / Gav2 (13)
Gav3 = (G25 + G34) / 2 (14)
Gsd3 = | G25−G34 | / Gav3 (15)
Gdf12 = | Gav1-Gav2 | (16)
Gdf13 = | Gav1-Gav3 | (17)
Gdf23 = | Gav2-Gav3 | (18)

右上がり斜め45度方向の画素データの偏差を表すGsd1、Gsd2、Gsd3がすべて所定のしきい値以内であり、かつ、右上がり斜め45度方向に直交する方向の画素データの偏差Gdf12、Gdf13、Gdf23の内のいずれかが所定のしきい値を超えた場合には、右上がり斜め45度方向において像の連続性があると判定される。右上がり斜め45度方向(図16に示すDCG=4の方向)において像の連続性があると判別された場合はステップS350へ進み、像の連続性の高い方向を示すパラメーターDCGに4を設定した後、ステップS360へ進む。一方、連続性がないと判断された場合はそのままステップS360へ進む。   Gsd1, Gsd2, and Gsd3 representing deviations of pixel data in the 45 ° upward diagonal direction are all within a predetermined threshold value, and pixel data deviations Gdf12, Gdf13 in a direction orthogonal to the 45 ° upward diagonal direction If any of Gdf23 exceeds a predetermined threshold value, it is determined that there is continuity of the image in the 45 ° upward diagonal direction. If it is determined that there is image continuity in the 45 ° upward diagonal direction (DCG = 4 direction shown in FIG. 16), the process proceeds to step S350, and parameter DCG indicating the direction with high image continuity is set to 4. After that, the process proceeds to step S360. On the other hand, if it is determined that there is no continuity, the process proceeds directly to step S360.

ステップS360では、焦点検出画素配列の方向に対して左上がり斜め45度方向(図16に示すDCG=3の方向)において像の連続性があるか否かを判定する。左上がり斜め45度方向における像の連続性の有無は、例えば次のようにして判定される。
Gav1=(G14+G25)/2 (19)
Gsd1=|G14−G25|/Gav1 (20)
Gav2=(G12+G34)/2 (21)
Gsd2=|G12−G34|/Gav2 (22)
Gav3=(G21+G32)/2 (23)
Gsd3=|G21−G32|/Gav3 (24)
Gdf12=|Gav1−Gav2| (25)
Gdf13=|Gav1−Gav3| (26)
Gdf23=|Gav2−Gav3| (27)
In step S360, it is determined whether or not there is image continuity in a 45 ° upward diagonal direction (DCG = 3 direction shown in FIG. 16) with respect to the direction of the focus detection pixel array. The presence / absence of image continuity in the 45 ° upward slanting direction is determined, for example, as follows.
Gav1 = (G14 + G25) / 2 (19)
Gsd1 = | G14−G25 | / Gav1 (20)
Gav2 = (G12 + G34) / 2 (21)
Gsd2 = | G12−G34 | / Gav2 (22)
Gav3 = (G21 + G32) / 2 (23)
Gsd3 = | G21−G32 | / Gav3 (24)
Gdf12 = | Gav1-Gav2 | (25)
Gdf13 = | Gav1-Gav3 | (26)
Gdf23 = | Gav2-Gav3 | (27)

左上がり斜め45度方向の画素データの偏差を表すGsd1、Gsd2、Gsd3がすべて所定のしきい値以内であり、かつ、左上がり斜め45度方向に直交する方向の画素データの偏差Gdf12、Gdf13、Gdf23の内のいずれかが所定のしきい値を超えた場合には、左上がり斜め45度方向において像の連続性があると判定される。左上がり斜め45度方向において像の連続性があると判定された場合にはステップS370へ進み、像の連続性の高い方向を示すパラメーターDCGに3を設定してステップS380へ進む。一方、連続性がないと判断された場合にはそのままステップS380へ進む。   Gsd1, Gsd2, and Gsd3 representing deviations of pixel data in the 45 ° upward diagonal direction are all within a predetermined threshold value, and deviations Gdf12, Gdf13 of pixel data in a direction orthogonal to the 45 ° upward diagonal direction If any of Gdf23 exceeds a predetermined threshold value, it is determined that there is continuity of the image in the 45 ° upward diagonal direction. If it is determined that there is image continuity in the 45 ° upward and diagonal direction, the process proceeds to step S370, and a parameter DCG indicating a direction with high image continuity is set to 3, and the process proceeds to step S380. On the other hand, if it is determined that there is no continuity, the process directly proceeds to step S380.

ステップS380では、焦点検出画素配列の方向に対して直交する方向(図16に示すDCG=2の方向)において像の連続性があるか否かを判定する。焦点検出画素配列の方向に直交する方向における像の連続性の有無は、例えば次のようにして判定される。
Gav1=(G12+G14)/2 (28)
Gsd1=|G12−G14|/Gav1 (29)
Gav2=(G21+G25)/2 (30)
Gsd2=|G21−G25|/Gav2 (31)
Gav3=(G32+G34)/2 (32)
Gsd3=|G32−G34|/Gav3 (33)
Gdf12=|Gav1−Gav2| (34)
Gdf13=|Gav1−Gav3| (35)
Gdf23=|Gav2−Gav3| (36)
In step S380, it is determined whether there is image continuity in a direction orthogonal to the direction of the focus detection pixel array (the direction of DCG = 2 shown in FIG. 16). The presence / absence of image continuity in a direction orthogonal to the direction of the focus detection pixel array is determined, for example, as follows.
Gav1 = (G12 + G14) / 2 (28)
Gsd1 = | G12−G14 | / Gav1 (29)
Gav2 = (G21 + G25) / 2 (30)
Gsd2 = | G21−G25 | / Gav2 (31)
Gav3 = (G32 + G34) / 2 (32)
Gsd3 = | G32−G34 | / Gav3 (33)
Gdf12 = | Gav1-Gav2 | (34)
Gdf13 = | Gav1-Gav3 | (35)
Gdf23 = | Gav2-Gav3 | (36)

焦点検出画素配列の方向と直交する方向の画素データの偏差を表すGsd1、Gsd2、Gsd3がすべて所定のしきい値以内であり、かつ、焦点検出画素配列の方向の画素データの偏差Gdf12、Gdf13、Gdf23の内のいずれかが所定のしきい値を超えた場合には、焦点検出画素配列の方向と直交する方向において像の連続性があると判定される。焦点検出画素配列の方向と直交する方向に像の連続性があると判断された場合にはステップS390へ進み、像の連続性の高い方向を示すパラメーターDCGに2を設定してステップS400へ進む。一方、連続性がないと判断された場合にはそのままステップS400へ進む。   Gsd1, Gsd2, and Gsd3 representing deviations of pixel data in a direction orthogonal to the direction of the focus detection pixel array are all within a predetermined threshold, and pixel data deviations Gdf12, Gdf13, When any one of Gdf23 exceeds a predetermined threshold value, it is determined that there is image continuity in a direction orthogonal to the direction of the focus detection pixel array. If it is determined that there is image continuity in a direction orthogonal to the direction of the focus detection pixel array, the process proceeds to step S390, and a parameter DCG indicating a direction with high image continuity is set to 2, and the process proceeds to step S400. . On the other hand, if it is determined that there is no continuity, the process directly proceeds to step S400.

ステップS400では、焦点検出画素配列の方向(図16に示すDCG=1の方向)において像の連続性があるか否かを判別する。焦点検出画素配列の方向における像の連続性の有無は、例えば次のようにして判定される。
Gav1=(G01+G21+G41)/3 (37)
Gsd1=(|G01−Gav1|+|G21−Gav1|+|G41−Gav1|/(3・Gav1) (38)
Gav2=(G12+G32)/2 (39)
Gsd2=|G12−G32|/Gav2 (40)
Gav3=(G14+G34)/2 (41)
Gsd3=|G14−G34|/Gav3 (42)
Gav4=(G05+G25+G45)/2 (43)
Gsd4=(|G05−Gav4|+|G25−Gav4|+|G45−Gav4|)/Gav4 (44)
Gdf12=|Gav1−Gav2| (45)
Gdf23=|Gav2−Gav3| (46)
Gdf34=|Gav3−Gav4| (47)
In step S400, it is determined whether or not there is image continuity in the direction of the focus detection pixel array (the direction of DCG = 1 shown in FIG. 16). The presence or absence of image continuity in the direction of the focus detection pixel array is determined, for example, as follows.
Gav1 = (G01 + G21 + G41) / 3 (37)
Gsd1 = (| G01−Gav1 | + | G21−Gav1 | + | G41−Gav1 | / (3 · Gav1) (38)
Gav2 = (G12 + G32) / 2 (39)
Gsd2 = | G12−G32 | / Gav2 (40)
Gav3 = (G14 + G34) / 2 (41)
Gsd3 = | G14−G34 | / Gav3 (42)
Gav4 = (G05 + G25 + G45) / 2 (43)
Gsd4 = (| G05-Gav4 | + | G25-Gav4 | + | G45-Gav4 |) / Gav4 (44)
Gdf12 = | Gav1-Gav2 | (45)
Gdf23 = | Gav2-Gav3 | (46)
Gdf34 = | Gav3-Gav4 | (47)

焦点検出画素配列の方向の画素データの偏差を表すGsd1、Gsd2、Gsd3、Gsd4がすべて所定のしきい値以内であり、かつ、焦点検出画素配列の方向と直交する方向の画素データの偏差Gdf12、Gdf23、Gdf34の内のいずれかが所定のしきい値を超えた場合には、焦点検出画素配列の方向において像の連続性があると判定される。焦点検出画素配列の方向に像の連続性があると判断された場合にはステップS410へ進み、像の連続性の高い方向を示すパラメーターDCGに1を設定してステップS420へ進む。一方、連続性がないと判断された場合にはそのままステップS420へ進む。   Gsd1, Gsd2, Gsd3, and Gsd4 representing deviations of pixel data in the direction of the focus detection pixel array are all within a predetermined threshold value, and pixel data deviations Gdf12 in a direction orthogonal to the direction of the focus detection pixel array If any of Gdf23 and Gdf34 exceeds a predetermined threshold value, it is determined that there is image continuity in the direction of the focus detection pixel array. If it is determined that there is image continuity in the direction of the focus detection pixel array, the process proceeds to step S410, 1 is set to a parameter DCG indicating a direction in which the image continuity is high, and the process proceeds to step S420. On the other hand, if it is determined that there is no continuity, the process directly proceeds to step S420.

ステップS420において、焦点検出画素位置の近傍において像の方向性がないか否かをパラメーターDCGにより確認する。焦点検出画素位置の近傍で像の方向性がない場合(DCG=0)、つまり焦点検出画素位置の近傍で像が均一またはランダムである場合にはステップS440へ進み、それ以外の場合はステップS430へ進む。ステップS430では、焦点検出画素位置の近傍において像が焦点検出画素配列の方向に連続性があるか否かをパラメーターDCGにより確認する。焦点検出画素配列の方向に連続性がある場合(DCG=1)にはステップS460へ進み、それ以外の場合はステップS450へ進む。   In step S420, whether or not there is an image directionality in the vicinity of the focus detection pixel position is confirmed by the parameter DCG. If there is no directionality of the image in the vicinity of the focus detection pixel position (DCG = 0), that is, if the image is uniform or random in the vicinity of the focus detection pixel position, the process proceeds to step S440. Otherwise, step S430 is performed. Proceed to In step S430, whether or not the image has continuity in the direction of the focus detection pixel array in the vicinity of the focus detection pixel position is confirmed by the parameter DCG. If there is continuity in the direction of the focus detection pixel array (DCG = 1), the process proceeds to step S460. Otherwise, the process proceeds to step S450.

焦点検出画素位置の近傍で像の方向性がない場合(DCG=0)、つまり焦点検出画素位置の近傍で像が均一またはランダムである場合は、ステップS440で、焦点検出画素の近傍にある撮像画素の画素データを方向性に依存せずに平均化して画素補間し、焦点検出画素位置の画素データとする。例えば、図15、図16に示す焦点検出画素G23に対しては次のようにして補間画素データが算出される。
G23=(G12+G32+G14+G34)/4 (48)
If there is no directionality of the image in the vicinity of the focus detection pixel position (DCG = 0), that is, if the image is uniform or random in the vicinity of the focus detection pixel position, in step S440, the imaging in the vicinity of the focus detection pixel is performed. The pixel data of the pixels are averaged without depending on the directionality and subjected to pixel interpolation to obtain pixel data at the focus detection pixel position. For example, for the focus detection pixel G23 shown in FIGS. 15 and 16, interpolation pixel data is calculated as follows.
G23 = (G12 + G32 + G14 + G34) / 4 (48)

焦点検出画素配列の方向以外に連続性がある場合、つまり図16に示すDCG=2、3、4の内のいずれか1方向に連続性がある場合は、ステップS450で、焦点検出画素の近傍にある撮像画素のデータを像の方向性に応じて平均化して画素補間し、焦点検出画素位置の画素データとする。例えば、図15、図16に示す焦点検出画素G23に対しては次のようにして補間画素データが算出される。   If there is continuity in a direction other than the direction of the focus detection pixel array, that is, if there is continuity in any one of DCG = 2, 3, and 4 shown in FIG. The data of the image pickup pixels in are averaged according to the directionality of the image and subjected to pixel interpolation to obtain pixel data at the focus detection pixel position. For example, for the focus detection pixel G23 shown in FIGS. 15 and 16, interpolation pixel data is calculated as follows.

右上がり斜め45度方向に像の連続性がある場合(DCG=4)には、図16に示すDCG=4の方向において焦点検出画素位置の近傍にある緑画素の画素データの平均をとり、焦点検出画素位置の画素データとする。
G23=(G14+G32)/2 (49)
When there is continuity of the image in the 45 ° upward diagonal direction (DCG = 4), the average of the pixel data of green pixels in the vicinity of the focus detection pixel position in the direction of DCG = 4 shown in FIG. The pixel data is the focus detection pixel position.
G23 = (G14 + G32) / 2 (49)

また、左上がり斜め45度方向に像の連続性がある場合(DCG=3)には、図16に示すDCG=3の方向において焦点検出画素の近傍にある緑画素の画素データの平均をとり、焦点検出画素位置の画素データとする。
G23=(G12+G34)/2 (50)
When there is continuity of the image in the 45 ° upward diagonal direction (DCG = 3), the average of the pixel data of the green pixels in the vicinity of the focus detection pixel in the direction of DCG = 3 shown in FIG. , Pixel data at the focus detection pixel position.
G23 = (G12 + G34) / 2 (50)

さらに、焦点検出画素配列の方向に直交する方向に像の連続性がある場合(DCG=2)には、図16に示すDCG=2の方向において焦点検出画素の近傍にある緑画素の画素データの平均をとり、焦点検出画素位置の画素データとする。
G23=(G21+G25)/2 (51)
Further, when there is image continuity in a direction orthogonal to the direction of the focus detection pixel array (DCG = 2), pixel data of green pixels in the vicinity of the focus detection pixel in the direction of DCG = 2 shown in FIG. Is taken as pixel data at the focus detection pixel position.
G23 = (G21 + G25) / 2 (51)

焦点検出画素位置の近傍において像が焦点検出画素配列の方向に連続性がある場合(図16に示すDCG=1)には、焦点検出画素位置を基準として焦点検出画素配列の方向には撮像画素が存在しない。そのため、平均化により焦点検出画素位置の画素データを算出することができない。そこで、焦点検出画素配列と直交する方向(図16に示すDCG=2の方向)において、焦点検出画素配列を挟む撮像画素データに基づいて焦点検出画素位置の画素データを内挿して求める。例えば、式(37)、(39)、(41)、(43)で求めたGav1、Gav2、Gav3、Gav4を用い、次のようにして補間画素データGip0が内挿される。
Gip0=Gav2+Gav3−(Gav1+Gav4)/2 (52)
When the image has continuity in the direction of the focus detection pixel array in the vicinity of the focus detection pixel position (DCG = 1 shown in FIG. 16), the imaging pixels are in the direction of the focus detection pixel array with reference to the focus detection pixel position. Does not exist. Therefore, pixel data at the focus detection pixel position cannot be calculated by averaging. Therefore, in the direction orthogonal to the focus detection pixel array (the direction of DCG = 2 shown in FIG. 16), the pixel data at the focus detection pixel position is interpolated and obtained based on the imaging pixel data sandwiching the focus detection pixel array. For example, using Gav1, Gav2, Gav3, and Gav4 obtained by Expressions (37), (39), (41), and (43), interpolation pixel data Gip0 is interpolated as follows.
Gip0 = Gav2 + Gav3- (Gav1 + Gav4) / 2 (52)

図17は、横軸が焦点検出画素配列と直交する方向(列方向)の画素位置、縦軸が画素位置における画素データを示す。上述した式(52)が意味する所は、焦点検出画素の片側にある2つの画素データGav1とGav2を結んだ直線を焦点検出画素位置まで延長した画素データと、焦点検出画素のもう一方の側にある2つの画素データGav3とGav4を結んだ直線を焦点検出画素位置まで延長した画素データとの平均を、補間画素データGip0にするということである。このような内挿処理により、焦点検出画素近傍の高周波成分の影響を補間画素データの値に反映できる。したがって、単純に焦点検出画素位置に隣接する2つの画素データGav2、Gav3を単に平均した画素データGip1を補間画素データとする場合に比べて、高周波成分を多く含む像に対しては良好な結果が得られる。   In FIG. 17, the horizontal axis indicates the pixel position in the direction (column direction) orthogonal to the focus detection pixel array, and the vertical axis indicates the pixel data at the pixel position. The above equation (52) means that pixel data obtained by extending a straight line connecting two pixel data Gav1 and Gav2 on one side of the focus detection pixel to the focus detection pixel position, and the other side of the focus detection pixel. That is, the average of the pixel data obtained by extending the straight line connecting the two pixel data Gav3 and Gav4 to the focus detection pixel position is the interpolation pixel data Gip0. By such interpolation processing, the influence of the high frequency component near the focus detection pixel can be reflected in the value of the interpolation pixel data. Therefore, compared with the case where the pixel data Gip1 obtained by simply averaging the two pixel data Gav2 and Gav3 adjacent to the focus detection pixel position is used as the interpolated pixel data, an excellent result is obtained for an image containing a high frequency component. can get.

しかしながら、像が極めて高い空間周波成分(画素データピッチに応じたナイキスト周波数に近い空間周波数成分)のみを含んでいる場合には、式(52)を用いた内挿処理では補間画素データの値が理想的な画素データの値に対して大きな誤差を生じる場合がある。図17において点線はナイキスト周波数成分を多く含む像の波形であり、実際の画素データのあるべき値に対して内挿処理で求めた画素データGip0が外れてしまう。このような不都合を防止するために、実際の画素データのあるべき値がある程度反映されている焦点検出画素の画素データを参照する。   However, when the image includes only a very high spatial frequency component (spatial frequency component close to the Nyquist frequency corresponding to the pixel data pitch), the interpolation pixel data using the equation (52) has a value of the interpolated pixel data. A large error may occur with respect to the ideal pixel data value. In FIG. 17, the dotted line is the waveform of an image containing a large amount of Nyquist frequency components, and the pixel data Gip0 obtained by the interpolation process deviates from the actual value of the pixel data. In order to prevent such an inconvenience, the pixel data of the focus detection pixel in which the value that the actual pixel data should be is reflected to some extent is referred to.

ここで、焦点検出画素の画素データの値をA23とする。焦点検出画素は図8に示す分光特性を持っており、この分光特性は緑画素、赤画素、青画素の分光特性を包含しているので、焦点検出画素の画素データA23は次のように表される。
A23=Ka・(Ga+Ba+Ra) (53)
Here, the value of the pixel data of the focus detection pixel is A23. The focus detection pixel has the spectral characteristics shown in FIG. 8. This spectral characteristic includes the spectral characteristics of the green pixel, the red pixel, and the blue pixel. Therefore, the pixel data A23 of the focus detection pixel is expressed as follows. Is done.
A23 = Ka · (Ga + Ba + Ra) (53)

式(53)において、Kaは焦点検出画素の光電変換部の面積を撮像画素の光電変換部の面積で除して求めた係数であり、Ga、Ba、Raは焦点検出画素の位置にそれぞれ緑画素、青画素、赤画素があった場合の画素データである。   In Expression (53), Ka is a coefficient obtained by dividing the area of the photoelectric conversion unit of the focus detection pixel by the area of the photoelectric conversion unit of the imaging pixel, and Ga, Ba, and Ra are green at the position of the focus detection pixel, respectively. This is pixel data when there are pixels, blue pixels, and red pixels.

ここで、焦点検出画素位置の入射光の分光分布(緑画素、赤画素、青画素の出力比)と、焦点検出画素位置の近傍における入射光の分光分布(緑画素、赤画素、青画素の出力比)が等しいと仮定すれば、下式のように表される。
Ba/Ga=(B11+B31+B15+B35)/(2・(G21+G25)) (54)
Ra/Ga=2・(R22+R24)/(G12+G32+G14+G34) (55)
Here, the spectral distribution of incident light at the focus detection pixel position (output ratio of green pixels, red pixels, and blue pixels) and the spectral distribution of incident light near the focus detection pixel position (green pixels, red pixels, and blue pixels) Assuming that the output ratio is equal, it is expressed as:
Ba / Ga = (B11 + B31 + B15 + B35) / (2 · (G21 + G25)) (54)
Ra / Ga = 2. (R22 + R24) / (G12 + G32 + G14 + G34) (55)

式(54)と(55)とを式(53)に代入してGaについて整理し、これを焦点検出画素の画素データに基づく焦点検出画素位置の緑画素の画素データに対する換算データGip2とすると次のようになる。
Gip2=Ga=A23/(Ka・(1+(B11+B31+B15+B35)/(2・(G21+G25))+2・(R22+R24)/(G12+G32+G14+G34)) (56)
Substituting Equations (54) and (55) into Equation (53) to organize Ga, and assuming this as conversion data Gip2 for the pixel data of the green pixel at the focus detection pixel position based on the pixel data of the focus detection pixel, become that way.
Gip2 = Ga = A23 / (Ka · (1+ (B11 + B31 + B15 + B35) / (2 · (G21 + G25)) + 2 · (R22 + R24) / (G12 + G32 + G14 + G34)) (56)

最終的な補間画素データG23は次のようにして決定される。Gip0とGip2が両方ともGip1(平均値)よりも大きいか、または小さい場合は式(57)、それ以外の場合は式(58)が用いられる。
G23=Gip0 (57)
G23=Gip2 (58)
Final interpolation pixel data G23 is determined as follows. If both Gip0 and Gip2 are larger or smaller than Gip1 (average value), equation (57) is used, and otherwise equation (58) is used.
G23 = Gip0 (57)
G23 = Gip2 (58)

上記の処理を行うことにより、ナイキスト周波数近傍の高周波成分を多く含む像に対しても補間画素データの大外れを防止することができる。   By performing the above processing, it is possible to prevent the interpolation pixel data from being greatly out of the image including a large amount of high-frequency components near the Nyquist frequency.

ステップS470において、GB行またはGB列に配置された焦点検出画素の内、緑画素が配置されるべき位置に配置された焦点検出画素のすべての指定が終了したか否かを確認する。終了していない場合は次の焦点検出画素を指定するためにステップS310に戻り、終了した場合は青画素が配置されるべき位置に配置された焦点検出画素の画素補間処理を行うためにステップS480へ進む。   In step S470, it is confirmed whether or not all the designations of the focus detection pixels arranged at the positions where the green pixels are to be arranged among the focus detection pixels arranged in the GB row or the GB column are completed. If not completed, the process returns to step S310 to specify the next focus detection pixel. If completed, step S480 is performed to perform pixel interpolation processing of the focus detection pixel arranged at the position where the blue pixel is to be arranged. Proceed to

ステップS480では、GB行またはGB列に配置された焦点検出画素の内、青画素が配置されるべき位置に配置された焦点検出画素のひとつが順次指定される。ここでは図15においてB33を出力すべき位置の焦点検出画素が指定されたとして、説明を進める。ステップS490において、焦点検出画素の近傍にある青画素の画素データと緑画素の画素データの比に基づいて焦点検出画素位置の画素データを算出し、ステップS500へ進む。   In step S480, one of the focus detection pixels arranged at the position where the blue pixel is to be arranged among the focus detection pixels arranged in the GB row or GB column is sequentially designated. Here, it is assumed that the focus detection pixel at the position where B33 is to be output in FIG. In step S490, the pixel data of the focus detection pixel position is calculated based on the ratio of the pixel data of the blue pixel and the pixel data of the green pixel in the vicinity of the focus detection pixel, and the process proceeds to step S500.

青画素は緑画素に比較して低密度であり、画素ピッチも緑画素の画素ピッチの倍になっている。緑画素と同様な手法で焦点検出画素位置の画素データを補間することも可能であるが、青画素のナイキスト周波数が緑画素のナイキスト周波数の1/2になってしまう。そのため、像が高周波成分を多く含む場合には緑画素の補間精度に比較して青画素の補間精度が低下してしまい、周囲の緑画素データとの比が狂って色味が変化してしまう場合がある。人間の視覚特性的には色味(青画素データと緑画素データの比)が周囲と揃っていれば違和感を感じにくいので、青画素データを補間する場合には周囲の色と揃えるように補間を行う。   The blue pixels have a lower density than the green pixels, and the pixel pitch is twice that of the green pixels. Although it is possible to interpolate the pixel data at the focus detection pixel position by the same method as that for the green pixel, the Nyquist frequency of the blue pixel becomes ½ of the Nyquist frequency of the green pixel. For this reason, when the image contains a lot of high frequency components, the interpolation accuracy of the blue pixel is lower than the interpolation accuracy of the green pixel, and the ratio with the surrounding green pixel data is out of order and the color changes. There is a case. In terms of human visual characteristics, if the color (ratio of blue pixel data to green pixel data) is consistent with the surroundings, it is difficult to feel uncomfortable, so when interpolating blue pixel data, it is interpolated to align with the surrounding colors. I do.

例えば、焦点検出画素位置の青画素データとその周囲の緑画素の画素データの比が、焦点検出画素位置の近傍の青画素データとその周囲の緑画素の画素データの比に等しいと仮定すれば、次のようにして補間画素データB33が算出される。
B33/(G23+G32+G34+G43)=((B31/(G21+G30+G32+G41)+(B35/(G25+G34+G36+G45))/2 (59)
B33=(G23+G32+G34+G43)・((B31/(G21+G30+G32+G41)+(B35/(G25+G34+G36+G45))/2 (60)
For example, assuming that the ratio of the blue pixel data at the focus detection pixel position and the pixel data of the surrounding green pixels is equal to the ratio of the blue pixel data near the focus detection pixel position and the pixel data of the surrounding green pixels. Interpolated pixel data B33 is calculated as follows.
B33 / (G23 + G32 + G34 + G43) = ((B31 / (G21 + G30 + G32 + G41) + (B35 / (G25 + G34 + G36 + G45)) / 2 (59)
B33 = (G23 + G32 + G34 + G43). ((B31 / (G21 + G30 + G32 + G41) + (B35 / (G25 + G34 + G36 + G45)) / 2 (60)

ステップS500で、GB行またはGB列に配置された焦点検出画素の内、青画素が配置されるべき位置に配置された焦点検出画素のすべての指定が終了したかを調べる。終了していない場合は次の焦点検出画素を指定するためにステップS480に戻り、終了した場合はステップS501で画素補間処理を終了する。   In step S500, it is checked whether all of the focus detection pixels arranged at the positions where the blue pixels are to be arranged among the focus detection pixels arranged in the GB row or the GB column are finished. If not completed, the process returns to step S480 to designate the next focus detection pixel. If completed, the pixel interpolation process is terminated in step S501.

上述した一実施の形態では、像の連続性の方向に応じて画素補間処理を異ならせているので、単純な平均処理による画素補間処理に比較して、エッジパターンやラインパターン等の方向性を有する像が焦点検出画素列に重畳した場合においても良好に画素補間処理を行うことができる。   In the above-described embodiment, since the pixel interpolation process is changed according to the direction of the continuity of the image, the directionality of the edge pattern, the line pattern, and the like is compared with the pixel interpolation process based on the simple average process. Pixel interpolation processing can be performed satisfactorily even when the image having the image is superimposed on the focus detection pixel row.

また、画素密度が高い緑画素データを補間する場合は像の連続性を検出し、検出した方向に応じた画素補間処理を施すことによって、高精度な画素補間を達成できる。それとともに、画素密度が低い青画素データを補間する場合は、画素密度が高い緑画素データに対する色味を揃えるように青画素データを補間しているので、補間誤差による色味変化を防止できる。   In addition, when interpolating green pixel data having a high pixel density, high-accuracy pixel interpolation can be achieved by detecting the continuity of the image and performing pixel interpolation processing according to the detected direction. At the same time, when interpolating the blue pixel data with a low pixel density, the blue pixel data is interpolated so as to make the color of the green pixel data with a high pixel density uniform, so that a color change due to an interpolation error can be prevented.

さらに、焦点検出画素配列方向と像の連続性の方向が一致した場合の画素補間処理(方向に応じた平均化処理)と、像の連続性がその他の方向である場合の画素補間処理(方向に応じた平均化処理)とを異ならせている。したがって、焦点検出画素配列方向と像の連続性の方向との関係によらず、高精度な画素補間データを得ることができる。   Furthermore, pixel interpolation processing when the focus detection pixel array direction matches the direction of image continuity (average processing according to the direction), and pixel interpolation processing when the image continuity is in another direction (direction Different from the averaging processing according to Therefore, highly accurate pixel interpolation data can be obtained regardless of the relationship between the focus detection pixel array direction and the image continuity direction.

焦点検出画素配列方向と像の連続性の方向が一致した場合の画素補間処理において、焦点検出画素近傍の画素データの平均データを基準として、内挿処理により得た補間データと焦点検出画素の画素データに基づいて得られた換算データとの比較を行って最終的な補間データを決定している。そのため、像がナイキスト周波数近傍の高周波成分を含む場合においても、内挿処理による補間誤差を防止することができる。   In the pixel interpolation process when the focus detection pixel array direction and the image continuity direction match, the interpolation data obtained by the interpolation process and the pixel of the focus detection pixel are based on the average data of the pixel data in the vicinity of the focus detection pixel. The final interpolation data is determined by comparing with the conversion data obtained based on the data. Therefore, even when the image includes a high-frequency component near the Nyquist frequency, an interpolation error due to the interpolation process can be prevented.

また、焦点検出画素位置周辺の像が一様な場合やランダムな場合には、単純な平均化処理により画素補間を行っているので、演算処理が簡単になり、演算時間を短縮することができる。   In addition, when the image around the focus detection pixel position is uniform or random, pixel interpolation is performed by a simple averaging process, which simplifies the calculation process and shortens the calculation time. .

図14に示す一実施の形態の動作において、焦点検出画素配列と直交する方向の像の連続性の検出(ステップ380)に対して、焦点検出画素配列方向の像の連続性の検出(ステップ400)のほうが後になっている。これにより焦点検出画素配列方向の像の連続性の検出が優先されている。したがって、焦点検出画素配列にエッジパターンやラインパターンが重畳した場合においても、確実に焦点検出画素配列方向の画素補間処理を行うことができる。   In the operation of the embodiment shown in FIG. 14, the detection of the image continuity in the direction of the focus detection pixel array (step 400) in contrast to the detection of the image continuity in the direction orthogonal to the focus detection pixel array (step 380). ) Is later. Accordingly, priority is given to detection of image continuity in the focus detection pixel array direction. Therefore, even when an edge pattern or a line pattern is superimposed on the focus detection pixel array, pixel interpolation processing in the focus detection pixel array direction can be reliably performed.

図12のステップS131、S132におけるデフォーカス量補正処理の詳細な動作について説明する。ステップS131においては前述したステップS180と同様な処理が行われる。すなわち、本来青画素、緑画素が配置されるべき位置に配置された焦点検出画素に対し、その位置に仮に撮像画素が配置されていたとして、その撮像画素(仮想的な撮像画素)のデータを焦点検出画素の周辺近傍に配置された撮像画素および焦点検出画素のデータから補間する。   A detailed operation of the defocus amount correction process in steps S131 and S132 of FIG. 12 will be described. In step S131, the same processing as in step S180 described above is performed. That is, with respect to the focus detection pixel originally arranged at the position where the blue pixel and the green pixel should be arranged, assuming that the imaging pixel is arranged at the position, the data of the imaging pixel (virtual imaging pixel) is obtained. Interpolation is performed from data of imaging pixels and focus detection pixels arranged in the vicinity of the focus detection pixels.

以上の補間処理により算出された焦点検出画素列上の仮想的な撮像画素のデータのうち緑の撮像画素のデータの平均値をGm、青の撮像画素のデータの平均値をBmとする。又焦点検出画素の位置に仮想的に赤の撮像画素が配置されたとして、焦点検出画素列に隣接する赤の撮像画素の平均を算出し、その平均値をRmとする。   Of the data of the virtual imaging pixels on the focus detection pixel column calculated by the above interpolation processing, the average value of the green imaging pixel data is Gm, and the average value of the blue imaging pixel data is Bm. Further, assuming that a red imaging pixel is virtually arranged at the position of the focus detection pixel, the average of the red imaging pixels adjacent to the focus detection pixel column is calculated, and the average value is defined as Rm.

ステップS132においてはまずレンズ駆動制御装置から色収差情報を読み出す。色収差情報は図20に示すように、赤、緑、青の撮像画素のピーク波長λR、λG、λBに対する色収差ΔR、ΔG、ΔBの量を波長λGの色収差ΔGを基準(ΔG=0)として表したものである。   In step S132, chromatic aberration information is first read from the lens drive control device. As shown in FIG. 20, the chromatic aberration information is represented by the amounts of chromatic aberrations ΔR, ΔG, and ΔB with respect to the peak wavelengths λR, λG, and λB of red, green, and blue imaging pixels, with the chromatic aberration ΔG of the wavelength λG as a reference (ΔG = 0). It is a thing.

式(7)で求めたデフォーカス量defは各ピーク波長λR、λG、λBに対するデフォーカス量defR、defG、defBの重み付け加算平均と考えられる。したがって、デフォーカス量defは、ステップ131で求めた仮想的な撮像画素のデータの平均値の比を重み係数として次式(61)のように表される。ただし、式(61)においてTm=Rm+Gm+Bmである。
def=(Rm/Tm)・defR+(Gm/Tm)・defG+(Bm/Tm)・defB (61)
The defocus amount def obtained by Expression (7) is considered to be a weighted average of the defocus amounts defR, defG, and defB for the peak wavelengths λR, λG, and λB. Therefore, the defocus amount def is expressed by the following equation (61) using the ratio of the average values of the virtual imaging pixel data obtained in step 131 as a weighting factor. However, in the formula (61), Tm = Rm + Gm + Bm.
def = (Rm / Tm) .defR + (Gm / Tm) .defG + (Bm / Tm) .defB (61)

人間がピント判定に用いる緑色の波長領域のデフォーカス量は、視感度特性のピーク波長λGにおけるデフォーカス量defGであるとして、式(62)および式(63)を式(61)に代入してdefGについて整理すると式(64)が得られる。こうして得られるデフォーカス量defを補正したdefGを最終的なデフォーカス量として用いる。
defR=defG+ΔR (62)
defB=defG+ΔB (63)
defG=def−(Rm/Tm)・ΔR−(Bm/Tm)・ΔB (64)
Assuming that the defocus amount in the green wavelength region that humans use for focus determination is the defocus amount defG at the peak wavelength λG of the visibility characteristic, Equations (62) and (63) are substituted into Equation (61). By organizing defG, equation (64) is obtained. DefG obtained by correcting the defocus amount def thus obtained is used as the final defocus amount.
defR = defG + ΔR (62)
defB = defG + ΔB (63)
defG = def− (Rm / Tm) · ΔR− (Bm / Tm) · ΔB (64)

以上のように本発明においては撮像素子上に撮像画素と撮像画素とは分光感度特性が異なる瞳分割型位相差検出方式の焦点検出画素を混在させるとともに、焦点検出画素列に近接した撮像画素のデータに基づいて焦点検出画素配列上の像の色を検出し、該検出した色に基づいて焦点検出画素データに基づいて求めたデフォーカス量の色収差補正を行っている。したがって、焦点検出画素列上の像の色を非常に高い精度で検出でき、正確な色収差補正を行うことができる。   As described above, in the present invention, the focus detection pixels of the pupil division type phase difference detection method having different spectral sensitivity characteristics are mixed on the image sensor, and the image pickup pixels adjacent to the focus detection pixel array are mixed. The color of the image on the focus detection pixel array is detected based on the data, and the chromatic aberration correction of the defocus amount obtained based on the focus detection pixel data is performed based on the detected color. Therefore, the color of the image on the focus detection pixel row can be detected with very high accuracy, and accurate chromatic aberration correction can be performed.

また焦点検出画素列に近接した撮像画素のデータに基づいて焦点検出画素配列上の像の色を検出する際に、画像情報を生成する際の画素補間処理と同じ処理を用いているので、処理の簡素化を図ることができる。   In addition, when detecting the color of the image on the focus detection pixel array based on the data of the imaging pixels close to the focus detection pixel row, the same processing as the pixel interpolation processing when generating image information is used. Can be simplified.

−−−他の実施の形態−−−
図14に示す第1の実施の形態のデジタルスチルカメラ201の動作についてのフローチャートのステップS330、S340、S360、S380、S400において、像の均一性や連続性を判定するための式において使用される撮像画素の画素データの範囲は、上述した式で用いられる範囲に限定されているわけではなく、状況に応じて任意に変更が可能である。
--- Other embodiments ---
In steps S330, S340, S360, S380, and S400 of the flowchart about the operation of the digital still camera 201 of the first embodiment shown in FIG. 14, it is used in an expression for determining image uniformity and continuity. The range of the pixel data of the imaging pixels is not limited to the range used in the above-described formula, and can be arbitrarily changed according to the situation.

図14に示すステップS460において、像が極めて高い空間周波成分(画素データピッチに応じたナイキスト周波数に近い空間周波数成分)を含んでいる場合に、内挿処理で求めた画素データGip0を採用すると補間誤差が大きくなる。そのため、焦点検出画素の画素データに基づいて求めた換算データGip2と画素データGip0を平均データGip1と比較し、Gip0とGip2が両方ともGip1(平均値)よりも大きいか小さい場合はG23=Gip0とし、それ以外の場合にはG23=Gip2としている。しかし、それ以外の場合にG23=Gip1としたり、G23=(Gip2+Gip0)/2としたりすることも可能である。   In step S460 shown in FIG. 14, when the image includes an extremely high spatial frequency component (spatial frequency component close to the Nyquist frequency corresponding to the pixel data pitch), interpolation is performed by using the pixel data Gip0 obtained by the interpolation process. The error increases. Therefore, the conversion data Gip2 obtained based on the pixel data of the focus detection pixel and the pixel data Gip0 are compared with the average data Gip1, and when both Gip0 and Gip2 are larger or smaller than Gip1 (average value), G23 = Gip0. In other cases, G23 = Gip2. However, in other cases, G23 = Gip1 or G23 = (Gip2 + Gip0) / 2 can be set.

また、像が極めて高い空間周波成分(画素データピッチに応じたナイキスト周波数に近い空間周波数成分)を含んでいることを検出するために、画素データの列をフーリエ変換して直接的に像の空間周波数分布を検出し、その結果に応じて高周波成分が多い場合はG23=Gip2とし、それ以外の場合にはG23=Gip0とするようにしてもよい。   In addition, in order to detect that the image contains an extremely high spatial frequency component (a spatial frequency component close to the Nyquist frequency corresponding to the pixel data pitch), the pixel data string is directly Fourier-transformed to directly detect the image space. The frequency distribution may be detected, and G23 = Gip2 may be set when there are many high frequency components according to the result, and G23 = Gip0 may be set otherwise.

図14に示すステップS460において、焦点検出画素の画素データに基づいて得られた換算データGip2に応じて、内挿処理で求めた画素データGip0を採用の採用可否を決定している。しかし、平均化処理で求めた補間画素データや内挿処理で求めた補間画素データの上限、下限を、換算画素データGip2に所定係数を乗じたデータに応じて制限するようにしてもよい。例えば、補間画素データの値が換算画素データの2倍を超える場合には、補間画素データの値を換算画素データの2倍の値にクリップする。このようにすることによって、補間画素データの誤差が異常に大きくなることを防止できる。   In step S460 shown in FIG. 14, whether or not to adopt the pixel data Gip0 obtained by the interpolation processing is determined according to the conversion data Gip2 obtained based on the pixel data of the focus detection pixel. However, the upper and lower limits of the interpolated pixel data obtained by the averaging process and the interpolated pixel data obtained by the interpolation process may be limited according to data obtained by multiplying the converted pixel data Gip2 by a predetermined coefficient. For example, when the value of the interpolation pixel data exceeds twice the converted pixel data, the value of the interpolation pixel data is clipped to a value twice that of the converted pixel data. By doing in this way, it can prevent that the error of interpolation pixel data becomes abnormally large.

図14に示す第1の実施の形態のデジタルスチルカメラ201の動作についてのフローチャートのステップS460において、焦点検出画素の画素データに基づく換算データGip2を求めるために、その位置にある焦点検出画素の画素データの値A23を用いている。しかし、デフォーカス量が大きい場合には像ズレが生じるので、その位置に色フィルタなしの撮像画素があった場合の換算データとは誤差が生じる。デフォーカスによる像ズレの影響をキャンセルするために、A23の代わりにA23/2+(A13+A33)/4を用いるようにしてもよい。ここで、A13、A33は指定された焦点検出画素(基準となる焦点検出画素)に隣接する焦点検出画素の画素データである。このようにすれば、デフォーカスによる像ズレが生じていても像ズレしたデータが平均化されるので、上記のような誤差を減少させることができる。さらにデフォーカス量の大きさに応じて平均化に用いる焦点検出画素の範囲を変更して平均化することも可能である。   In step S460 of the flowchart of the operation of the digital still camera 201 of the first embodiment shown in FIG. 14, in order to obtain the conversion data Gip2 based on the pixel data of the focus detection pixel, the pixel of the focus detection pixel at that position Data value A23 is used. However, when the defocus amount is large, an image shift occurs, and an error occurs from the conversion data when there is an imaging pixel without a color filter at that position. A23 / 2 + (A13 + A33) / 4 may be used in place of A23 in order to cancel the influence of image shift due to defocusing. Here, A13 and A33 are pixel data of focus detection pixels adjacent to the designated focus detection pixel (reference focus detection pixel). In this way, even if there is an image shift due to defocusing, the data that has been shifted is averaged, so that the above errors can be reduced. Furthermore, it is possible to change and average the range of focus detection pixels used for averaging in accordance with the size of the defocus amount.

図14に示す第1の実施の形態のデジタルスチルカメラ201の動作についてのフローチャートのステップS460において、焦点検出画素の画素データに基づく換算データGip2を求めるために、その位置にある焦点検出画素の画素データの値A23を用いている。しかし、焦点検出画素の画素データと本来その位置にあるべき撮像画素の画素データの比は光学系の絞り値によっても変化するので、焦点検出画素の画素データを絞りに応じて換算して用いるようにしてもよい。   In step S460 of the flowchart of the operation of the digital still camera 201 of the first embodiment shown in FIG. 14, in order to obtain the conversion data Gip2 based on the pixel data of the focus detection pixel, the pixel of the focus detection pixel at that position Data value A23 is used. However, since the ratio between the pixel data of the focus detection pixel and the pixel data of the imaging pixel that should originally be at the position also changes depending on the aperture value of the optical system, the pixel data of the focus detection pixel is converted and used according to the aperture. It may be.

図14に示す第1の実施の形態のデジタルスチルカメラ201の動作についてのフローチャートにおいては、焦点検出画素配列と直交する方向の像の連続性の検出(ステップS380)に対して、焦点検出画素配列方向の像の連続性の検出(ステップS400)のほうが後になっている。これにより焦点検出画素配列方向の像の連続性の検出が優先されている。しかし、ステップS380において焦点検出画素配列と直交する方向の像の連続性が検出された状態(DCG=2)において、焦点検出画素配列方向の像の連続性も検出された場合には、像が格子パターンあるいはランダムパターンであると認識して方向性なし(DCG=0)としてステップS420に進むようにしてもよい。   In the flowchart of the operation of the digital still camera 201 according to the first embodiment shown in FIG. 14, the focus detection pixel array is used for the detection of image continuity in the direction orthogonal to the focus detection pixel array (step S380). The detection of the continuity of the image in the direction (step S400) is later. Accordingly, priority is given to detection of image continuity in the focus detection pixel array direction. However, in the state where the continuity of the image in the direction orthogonal to the focus detection pixel array is detected in step S380 (DCG = 2), if the continuity of the image in the focus detection pixel array direction is also detected, the image is displayed. It may be recognized that the pattern is a lattice pattern or a random pattern, and the process proceeds to step S420 with no directionality (DCG = 0).

上述した第1の実施の形態においては、焦点検出画素の配列近傍の像の均一性および像の連続性の方向に応じて、周囲画素データに応じた平均化処理の方法を変更している。しかし、焦点検出画素の配列近傍の像の空間周波数成分の分布を複数方向について算出し、算出結果に応じて平均化処理の方法を変更するようにしてもよい。例えばすべての方向で高周波数成分が少ない場合は単純な平均化処理を行い、特定の方向において高周波成分が多い場合にはその方向と直交する方向において画素データの平均を取る平均化処理を行う。また周波数成分に応じて平均化処理に用いる画素データの範囲を変更することもできる。例えば、低周波数成分が多い場合は比較的広範囲の画素データの平均化処理を行い、高周波成分が多い場合には比較的狭い範囲の画素データの平均化処理を行う。   In the first embodiment described above, the averaging processing method according to the surrounding pixel data is changed according to the uniformity of the image in the vicinity of the focus detection pixel array and the direction of image continuity. However, the spatial frequency component distribution of the image in the vicinity of the focus detection pixel array may be calculated in a plurality of directions, and the averaging method may be changed according to the calculation result. For example, when there are few high frequency components in all directions, simple averaging processing is performed, and when there are many high frequency components in a specific direction, averaging processing is performed to average pixel data in a direction orthogonal to that direction. The range of pixel data used for the averaging process can be changed according to the frequency component. For example, when there are many low frequency components, averaging processing of pixel data in a relatively wide range is performed, and when there are many high frequency components, averaging processing of pixel data in a relatively narrow range is performed.

上述した第1の実施の形態においては、人間がピント判定に用いる波長として緑画素の分光感度特性のピーク波長λGにおけるデフォーカス量defGとなるように式(7)で算出したデフォーカス量を補正している。しかし、これ以外の波長のデフォーカス量となるように補正しても構わない。例えば合焦面を撮像画素の分光特性の各ピーク波長λR、λG、λBにおけるデフォーカス量defR、defG、defBの重み付け平均であるとする。そして、その重みが図21に示すような視感度曲線の各ピーク波長λR、λG、λBにおける値R0、G0、B0に対応するとして式(7)で算出したデフォーカス量を補正することもできる。各ピーク波長λR、λG、λBにおけるデフォーカス量defR、defG、defBは上述した式(62)〜(64)で求められる。   In the first embodiment described above, the defocus amount calculated by Expression (7) is corrected so that the wavelength used for the focus determination by the human becomes the defocus amount defG at the peak wavelength λG of the spectral sensitivity characteristic of the green pixel. doing. However, you may correct | amend so that it may become a defocus amount of wavelengths other than this. For example, it is assumed that the in-focus plane is a weighted average of the defocus amounts defR, defG, and defB at the respective peak wavelengths λR, λG, and λB of the spectral characteristics of the imaging pixel. Then, the defocus amount calculated by Expression (7) can be corrected by assuming that the weight corresponds to the values R0, G0, and B0 at the peak wavelengths λR, λG, and λB of the visibility curve as shown in FIG. . The defocus amounts defR, defG, and defB at the respective peak wavelengths λR, λG, and λB are obtained by the above-described equations (62) to (64).

最終的に補正されたデフォーカス量defTは次式(65)で求められる。ただし、式(65)において、T0=R0+G0+B0である。
defT
=(R0/T0)・defR+(G0/T0)・defG+(B0/T0)・defB
=defG+(R0/T0)・ΔR+(B0/T0)・ΔB
=def+(R0/T0−Rm/Tm)・ΔR+(B0/T0−Bm/Tm)・ΔB (65)
The finally corrected defocus amount defT is obtained by the following equation (65). However, in Expression (65), T0 = R0 + G0 + B0.
defT
= (R0 / T0) .defR + (G0 / T0) .defG + (B0 / T0) .defB
= DefG + (R0 / T0) · ΔR + (B0 / T0) · ΔB
= Def + (R0 / T0−Rm / Tm) · ΔR + (B0 / T0−Bm / Tm) · ΔB (65)

上述した第1の実施の形態においては、常時、式(7)で算出したデフォーカス量を補正している。しかし、焦点検出画素位置における仮想的な撮像画素で受光する像の色の純度が高い場合には、人間のピント判定はその色の像構造に対して行われるため、そのような場合はデフォーカス量の補正を禁止してもよい。例えば、Rm/Tm、Gm/Tm、Bm/Tmのいずれかが所定値以上の場合には、色純度が高い単色光の像が焦点検出画素列上に形成されているとして、デフォーカス量の補正を禁止する。   In the above-described first embodiment, the defocus amount calculated by Expression (7) is always corrected. However, if the color purity of the image received by the virtual imaging pixel at the focus detection pixel position is high, human focus determination is performed on the image structure of that color. The amount correction may be prohibited. For example, when any of Rm / Tm, Gm / Tm, and Bm / Tm is equal to or greater than a predetermined value, it is assumed that a monochromatic light image with high color purity is formed on the focus detection pixel array, and the defocus amount is Prohibit correction.

また、焦点検出画素列を含む焦点検出画素列周辺近傍の領域の色と該領域の外周辺の更に大きな領域の色との相違が少ない場合には、画面上の比較的大きな領域でほぼ同一色の像が形成されていると考えられる。したがって、式(7)で算出したデフォーカス量がその色の像面のデフォーカス量を表しているとして、デフォーカス量の補正を禁止するようにしてもよい。例えば、図22において焦点検出画素列110の周辺近傍の領域120(仮想的な撮像画素のデータを算出するのに用いる撮像画素が存在する領域)における明るさに対して規格化した平均的な色をRGB値でR1、G1、B1とする。また、領域120を囲む比較的大きな領域130における明るさに対して規格化した平均的な色をR2、G2、B2とする。この場合、(R1、G1、B1)と(R2、G2、B2)を3次元ベクトルと考えれば、その外積の大きさが小さいほど2つの色の相違が少ないと言える。そこで、(G1・B2−B1・G2)+(B1・R2−R1・B2)+(R1・G2−G1・R2)が所定値以下となった場合にデフォーカス量の補正を禁止する。 In addition, when there is little difference between the color of the area in the vicinity of the focus detection pixel array including the focus detection pixel array and the color of the larger area in the outer periphery of the area, the same color in a relatively large area on the screen It is thought that the image of is formed. Therefore, it is possible to prohibit the correction of the defocus amount on the assumption that the defocus amount calculated by Expression (7) represents the defocus amount of the image plane of the color. For example, in FIG. 22, an average color normalized with respect to brightness in a region 120 in the vicinity of the focus detection pixel array 110 (a region where an imaging pixel used to calculate virtual imaging pixel data exists). Are R1, G1, and B1 in terms of RGB values. In addition, average colors normalized with respect to brightness in a relatively large area 130 surrounding the area 120 are R2, G2, and B2. In this case, if (R1, G1, B1) and (R2, G2, B2) are considered as three-dimensional vectors, it can be said that the smaller the size of the outer product, the smaller the difference between the two colors. Therefore, when (G1, B2-B1, G2) 2 + (B1, R2-R1, B2) 2 + (R1, G2-G1, R2) 2 becomes a predetermined value or less, correction of the defocus amount is prohibited. To do.

また、焦点検出画素列を含む焦点検出画素列の周辺近傍の領域おける色と該領域の外周辺の更に大きな領域の色との相違が大きい場合には、画面上の比較的大きな領域で形成されている像の色の像面に対してデフォーカス量の補正を行うようにしてもよい。例えば、(G1・B2−B1・G2)+(B1・R2−R1・B2)+(R1・G2−G1・R2)が所定値以下となった場合に、目標の色R2、G2、B2に対し次式のように演算を行って補正デフォーカス量defCを求める。ただし、式(66)において、T2=R2+G2+B2である。
defC
=(R2/T2)・defR+(G2/T2)・defG+(B2/T2)・defB
=defG+(R2/T2)・ΔR+(B2/T2)・ΔB
=def+(R2/T2−Rm/Tm)・ΔR+(B2/T2−Bm/Tm)・ΔB (66)
In addition, when there is a large difference between the color in the vicinity of the focus detection pixel array including the focus detection pixel array and the color of the larger area outside the area, it is formed in a relatively large area on the screen. The defocus amount may be corrected with respect to the image plane of the color of the current image. For example, when (G1 · B2−B1 · G2) 2 + (B1 · R2−R1 · B2) 2 + (R1 · G2−G1 · R2) 2 becomes a predetermined value or less, the target colors R2 and G2 , B2 is calculated as in the following equation to obtain a corrected defocus amount defC. However, in Formula (66), T2 = R2 + G2 + B2.
defC
= (R2 / T2) .defR + (G2 / T2) .defG + (B2 / T2) .defB
= DefG + (R2 / T2) · ΔR + (B2 / T2) · ΔB
= Def + (R2 / T2-Rm / Tm) · ΔR + (B2 / T2-Bm / Tm) · ΔB (66)

上述した第1の実施の形態においては、式(7)で算出したデフォーカス量を補正しているが、デフォーカス量に基づいて、レンズ駆動制御装置206により算出されるレンズ駆動量を、色収差情報に応じて補正するようにしてもよい。   In the first embodiment described above, the defocus amount calculated by Expression (7) is corrected. Based on the defocus amount, the lens drive amount calculated by the lens drive control device 206 is calculated using chromatic aberration. You may make it correct | amend according to information.

上述した第1の実施の形態においては、撮像画素の2次元的な配列中に焦点検出画素の配列が線状(1次元状)に存在するものとして説明を行ったが、本発明はこれに限定されるものではない。撮像画素の2次元的な配列中に撮像に直接用いることができない画素(例えば欠陥画素)の配列が線状(1次元状)に存在する場合に広く適用可能である。   In the above-described first embodiment, the description has been given on the assumption that the array of focus detection pixels is linear (one-dimensional) in the two-dimensional array of imaging pixels. It is not limited. The present invention is widely applicable when an array of pixels (for example, defective pixels) that cannot be directly used for imaging in a two-dimensional array of imaging pixels is linear (one-dimensional).

撮像素子における焦点検出エリアの配置は図2に示す一実施の形態の配置に限定されず、対角線方向やその他の位置に水平方向および垂直方向に焦点検出エリアを配置することも可能である。   The arrangement of the focus detection areas in the image sensor is not limited to the arrangement of the embodiment shown in FIG. 2, and the focus detection areas can be arranged in the horizontal direction and the vertical direction in the diagonal direction and other positions.

図3に示す撮像素子212では、焦点検出画素313、314、315、316がひとつの画素内にひとつの光電変換部を備えた例を示したが、図18に示す変形例の撮像素子212Aのように、ひとつの画素内に一対の光電変換部を備えた焦点検出画素を用いてもよい。図18において、焦点検出画素311はひとつの画素内に一対の光電変換部を備えている。この焦点検出画素311が図3に示す撮像素子212の焦点検出画素313と焦点検出画素314のペアに相当した機能を果たす。   In the image sensor 212 illustrated in FIG. 3, the focus detection pixels 313, 314, 315, and 316 are provided with one photoelectric conversion unit in one pixel, but the image sensor 212 </ b> A of the modified example illustrated in FIG. As described above, a focus detection pixel including a pair of photoelectric conversion units in one pixel may be used. In FIG. 18, the focus detection pixel 311 includes a pair of photoelectric conversion units in one pixel. The focus detection pixel 311 performs a function corresponding to a pair of the focus detection pixel 313 and the focus detection pixel 314 of the image sensor 212 shown in FIG.

図19に示すように、焦点検出画素311は、マイクロレンズ10、一対の光電変換部12,13からなる。焦点検出画素311には光量をかせぐために色フィルターは配置されておらず、その分光特性は光電変換を行うフォトダイオードの分光感度、赤外カットフィルター(不図示)の分光特性を合わせ持った分光特性(図8)となる。すなわち、図7で示した緑画素、赤画素、青画素の分光特性を加算したような分光特性となり、その感度の光波長領域は緑画素、赤画素、青画素の感度の光波長領域を包括している。   As shown in FIG. 19, the focus detection pixel 311 includes a microlens 10 and a pair of photoelectric conversion units 12 and 13. The focus detection pixel 311 is not provided with a color filter in order to increase the amount of light, and its spectral characteristics are spectral characteristics that combine the spectral sensitivity of a photodiode that performs photoelectric conversion and the spectral characteristics of an infrared cut filter (not shown). (FIG. 8). That is, the spectral characteristics are the sum of the spectral characteristics of the green pixel, red pixel, and blue pixel shown in FIG. 7, and the optical wavelength range of the sensitivity includes the optical wavelength range of the sensitivity of the green pixel, red pixel, and blue pixel. doing.

図3に示す撮像素子212において、撮像画素はベイヤー配列の色フィルターを備えた例を示したが、色フィルターの構成や配列はこれに限定されず、補色フィルター(緑:G、イエロー:Ye、マゼンタ:Mg,シアン:Cy)の配列を採用してもよい。   In the image sensor 212 shown in FIG. 3, the example in which the imaging pixel includes a Bayer color filter is shown, but the configuration and arrangement of the color filter are not limited to this, and complementary color filters (green: G, yellow: Ye, An arrangement of magenta: Mg, cyan: Cy) may be employed.

図3に示す撮像素子212において、焦点検出画素には色フィルターを備えていなかったが、撮像画素と同色の色フィルターのうちひとつのフィルター(たとえば緑フィルター)を備えるようにした場合でも、本発明を適用することができる。   In the image pickup device 212 shown in FIG. 3, the focus detection pixel does not include a color filter, but the present invention can be applied even when one filter (for example, a green filter) of the same color filter as the image pickup pixel is provided. Can be applied.

図5、図18において、焦点検出画素の光電変換部の形状を半円形とした例を示したが、光電変換部の形状は一実施の形態の形状に限定されず、他の形状としてもよい。例えば、焦点検出画素の光電変換部の形状を楕円や矩形や多角形にすることも可能である。   FIGS. 5 and 18 show an example in which the shape of the photoelectric conversion unit of the focus detection pixel is a semicircular shape. However, the shape of the photoelectric conversion unit is not limited to the shape of the embodiment, and may be another shape. . For example, the shape of the photoelectric conversion unit of the focus detection pixel may be an ellipse, a rectangle, or a polygon.

図3に示す撮像素子212においては撮像画素と焦点検出画素が稠密正方格子配列に配置した例を示したが、稠密六方格子配列としてもよい。   In the imaging element 212 shown in FIG. 3, the example in which the imaging pixels and the focus detection pixels are arranged in a dense square lattice arrangement is shown, but a dense hexagonal lattice arrangement may be used.

図3に示す撮像素子212において、焦点検出画素には色フィルターを備えていなかったが、撮像画素と同色の色フィルターのうちひとつのフィルター(たとえば緑フィルター)を備えるようにした場合でも、本発明を適用することができる。   In the image pickup device 212 shown in FIG. 3, the focus detection pixel does not include a color filter, but the present invention can be applied even when one filter (for example, a green filter) of the same color filter as the image pickup pixel is provided. Can be applied.

本発明の撮像装置は交換レンズとカメラボディから構成されるデジタルスチルカメラやフィルムスチルカメラに限定されず、レンズ一体型のデジタルスチルカメラやフィルムスチルカメラやビデオカメラにも適用できる。また、携帯電話などに内蔵される小型カメラモジュール、監視カメラ、ロボット用の視覚認識装置などにも適用できる。あるいは、カメラ以外の焦点検出用装置や測距装置やステレオ測距装置にも適用できる。   The image pickup apparatus of the present invention is not limited to a digital still camera or a film still camera including an interchangeable lens and a camera body, and can also be applied to a lens-integrated digital still camera, a film still camera, and a video camera. Further, the present invention can be applied to a small camera module, a surveillance camera, a visual recognition device for a robot, etc. incorporated in a mobile phone. Alternatively, the present invention can also be applied to a focus detection device other than a camera, a distance measuring device, or a stereo distance measuring device.

10,10a,10b,10c,10d;マイクロレンズ、11,12,13,13a,14a,14b,16,17;光電変換部、29;半導体回路基板、73,74,83,84;焦点検出用光束、90;射出瞳、91;交換レンズの光軸、93,94;測距瞳、100;撮影画面、101〜103;焦点検出エリア、110;焦点検出画素列、120;焦点検出画素列周辺近傍の領域、130;焦点検出画素列周辺近傍の領域を囲む比較的大きな領域、201;デジタルスチルカメラ、202;交換レンズ、203;カメラボディ、204;マウント部、206;レンズ駆動制御装置、208;ズーミング用レンズ、209;レンズ、210;フォーカシング用レンズ、211;絞り、212,212A;撮像素子、213;電気接点、214;ボディ駆動制御装置、215;液晶表示素子駆動回路、216;液晶表示素子、217;接眼レンズ、219;メモリカード、310;撮像画素、311,313,313a,313b,314,314a,314b,315,316;焦点検出画素 10, 10a, 10b, 10c, 10d; micro lens, 11, 12, 13, 13a, 14a, 14b, 16, 17; photoelectric conversion unit, 29; semiconductor circuit board, 73, 74, 83, 84; for focus detection Luminous flux, 90; exit pupil, 91; optical axis of interchangeable lens, 93, 94; distance measurement pupil, 100; photographing screen, 101 to 103; focus detection area, 110; focus detection pixel row, 120; Neighboring area 130; A relatively large area surrounding the vicinity of the focus detection pixel array; 201; Digital still camera 202; Interchangeable lens 203; Camera body 204; Mount portion 206; Lens drive control device 208 Lens for zooming, 209; lens, 210; lens for focusing, 211; diaphragm, 212, 212A; image sensor, 213; 214; body drive control device, 215; liquid crystal display element drive circuit, 216; liquid crystal display element, 217; eyepiece, 219; memory card, 310; imaging pixels, 311, 313, 313a, 313b, 314, 314a, 314b, 315, 316; focus detection pixels

Claims (8)

撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、
前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出する焦点検出手段と、
前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、
前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を補正する補正手段と、
前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号が示す色相が偏っている場合に、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を前記補正手段によって補正することを禁止する禁止制御を行う禁止手段と、を備えることを特徴とする撮像装置。
A plurality of types of imaging pixels having different spectral sensitivity characteristics that receive an imaging light beam that has passed through the imaging optical system and output an imaging pixel signal, and a focus detection pixel signal that receives the focus detection light beam that has passed through the imaging optical system An image sensor in which a plurality of focus detection pixels having different spectral sensitivity characteristics from the imaging pixels are arranged according to a two-dimensional array;
Focus detection means for detecting a focus adjustment state of the photographing optical system based on the focus detection pixel signal;
Interpolating means for calculating the imaging pixel signals at the positions of the plurality of focus detection pixels based on the imaging pixel signals output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels by interpolation calculation. When,
Based on the imaging pixel signal at the position of the plurality of focus detection pixels calculated by the interpolation unit and chromatic aberration information of the photographing optical system, a physical quantity representing the focus adjustment state detected by the focus detection unit is obtained. Correction means for correcting;
When the hue indicated by the imaging pixel signal at the position of the plurality of focus detection pixels calculated by the interpolation means is biased, a physical quantity representing the focus adjustment state detected by the focus detection means is obtained by the correction means. An imaging apparatus comprising: prohibiting means for performing prohibition control for prohibiting correction.
撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、
前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出する焦点検出手段と、
前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、
前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を補正する補正手段と、
前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号が示す色相と、前記補間手段による補間処理に使用された前記複数種類の撮像画素が配置された領域を囲む、当該領域よりも大きな広範領域に配置された前記複数種類の撮像画素の撮像画素信号が示す色相との相違が少ない場合に、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を前記補正手段によって補正することを禁止する禁止制御を行う禁止手段と、を備えることを特徴とする撮像装置。
A plurality of types of imaging pixels having different spectral sensitivity characteristics that receive an imaging light beam that has passed through the imaging optical system and output an imaging pixel signal, and a focus detection pixel signal that receives the focus detection light beam that has passed through the imaging optical system An image sensor in which a plurality of focus detection pixels having different spectral sensitivity characteristics from the imaging pixels are arranged according to a two-dimensional array;
Focus detection means for detecting a focus adjustment state of the photographing optical system based on the focus detection pixel signal;
Interpolating means for calculating the imaging pixel signals at the positions of the plurality of focus detection pixels based on the imaging pixel signals output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels by interpolation calculation. When,
Based on the imaging pixel signal at the position of the plurality of focus detection pixels calculated by the interpolation unit and chromatic aberration information of the photographing optical system, a physical quantity representing the focus adjustment state detected by the focus detection unit is obtained. Correction means for correcting;
Surrounding the area where the hues indicated by the imaging pixel signals at the positions of the plurality of focus detection pixels calculated by the interpolation unit and the plurality of types of imaging pixels used for the interpolation processing by the interpolation unit are arranged, When the difference between the hues indicated by the imaging pixel signals of the plurality of types of imaging pixels arranged in a wide area larger than the area is small, the physical quantity representing the focus adjustment state detected by the focus detection means is the correction means An imaging device comprising: prohibiting means for performing prohibition control for prohibiting correction by the control unit.
請求項1または2に記載の撮像装置において、
前記撮像画素は、第1、第2、及び第3の分光感度をそれぞれ有する第1、第2、及び第3の撮像画素を含み、
前記焦点検出画素は、前記第1、第2、及び第3の分光感度を含む分光感度を有し、
前記撮影光学系の色収差情報は、前記第1の分光感度に対応した第1の波長に関する第1の色収差情報を基準とする、前記第2の分光感度に対応した第2の波長に関する第2の色収差情報及び前記第3の分光感度に対応した第3の波長に関する第3の色収差情報をそれぞれ含み、
前記補正手段は、前記焦点検出手段によって検出された前記焦点調節状態を表す物理量を前記第2の色収差情報及び前記第3の色収差情報に基づき補正することを特徴とする撮像装置。
The imaging device according to claim 1 or 2,
The imaging pixels include first, second, and third imaging pixels having first, second, and third spectral sensitivities, respectively.
The focus detection pixel has a spectral sensitivity including the first, second, and third spectral sensitivities,
The chromatic aberration information of the photographing optical system is a second related to the second wavelength corresponding to the second spectral sensitivity with reference to the first chromatic aberration information related to the first wavelength corresponding to the first spectral sensitivity. Chromatic aberration information and third chromatic aberration information related to the third wavelength corresponding to the third spectral sensitivity, respectively,
The imaging device corrects a physical quantity representing the focus adjustment state detected by the focus detection unit based on the second chromatic aberration information and the third chromatic aberration information.
請求項3に記載の撮像装置において、
前記二次元配列はベイヤー配列であり、
前記第1の撮像画素は、緑色の光の波長帯域において高い分光感度を有する緑画素であり、
前記第2の撮像画素は、赤色の光の波長帯域において高い分光感度を有する赤画素であり、
前記第3の撮像画素は、青の色の光の波長帯域において高い分光感度を有する青画素であることを特徴とする撮像装置。
The imaging device according to claim 3.
The two-dimensional array is a Bayer array;
The first imaging pixel is a green pixel having high spectral sensitivity in a wavelength band of green light,
The second imaging pixel is a red pixel having high spectral sensitivity in a wavelength band of red light,
The third image pickup pixel is a blue pixel having high spectral sensitivity in a wavelength band of light of blue color.
請求項1〜4のいずれか一項に記載の撮像装置において、
前記焦点検出手段によって検出された前記焦点調節状態を表す物理量は、デフォーカス量であることを特徴とする撮像装置。
In the imaging device according to any one of claims 1 to 4,
The physical quantity representing the focus adjustment state detected by the focus detection means is a defocus amount.
請求項1〜4のいずれか一項に記載の撮像装置において、
前記焦点検出手段は、前記焦点検出画素信号に基づいてデフォーカス量を算出し、
前記焦点検出手段によって検出された前記焦点調節状態を表す物理量は、前記デフォーカス量に応じた前記撮影光学系の移動距離であることを特徴とする撮像装置。
In the imaging device according to any one of claims 1 to 4,
The focus detection means calculates a defocus amount based on the focus detection pixel signal,
The physical quantity representing the focus adjustment state detected by the focus detection means is a moving distance of the photographing optical system according to the defocus amount.
請求項1〜4のいずれか一項に記載の撮像装置において、
前記焦点検出手段は、前記焦点検出画素信号に基づいて、瞳分割型位相差検出方式によって、前記撮影光学系の焦点調節状態を検出することを特徴とする撮像装置。
In the imaging device according to any one of claims 1 to 4,
The image pickup apparatus, wherein the focus detection unit detects a focus adjustment state of the photographing optical system by a pupil division type phase difference detection method based on the focus detection pixel signal.
撮影光学系を通過した撮像光束を受光して撮像画素信号を出力する、分光感度特性が互いに異なる複数種類の撮像画素と、前記撮影光学系を通過した焦点検出光束を受光して焦点検出画素信号を出力する、前記撮像画素とは分光感度特性が異なる複数の焦点検出画素とが二次元配列に従って配置された撮像素子と、
前記焦点検出画素信号に基づいて、前記撮影光学系の焦点調節状態を検出し、デフォーカス量を算出する焦点検出手段と、
前記複数の焦点検出画素の近傍に配置された前記複数種類の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記撮像画素信号を補間演算によって算出する補間手段と、
前記補間手段によって算出された前記複数の焦点検出画素の位置における前記撮像画素信号と、前記撮影光学系の色収差情報とに基づいて、前記デフォーカス量を補正する補正手段と、を備え
前記撮像画素は、第1、第2、及び第3の分光感度をそれぞれ有する第1、第2、及び第3の撮像画素を含み、
前記焦点検出画素は、前記第1、第2、及び第3の分光感度を含む分光感度を有し、
前記撮影光学系の色収差情報は、前記第1の分光感度に対応した第1の波長に関する第1の色収差情報を基準とする、前記第2の分光感度に対応した第2の波長に関する第2の色収差及び前記第3の分光感度に対応した第3の波長に関する第3の色収差情報をそれぞれ含み、
前記補間手段は、前記複数の焦点検出画素の近傍に配置された前記第1、第2、及び第3の撮像画素の出力する前記撮像画素信号に基づいて、前記複数の焦点検出画素の位置における前記第1、第2、及び第3の撮像画素信号を補間演算によって算出し、
前記補正手段は、前記補間手段によって算出された前記第1、第2、及び第3の撮像画素信号の合計値で前記補間手段によって算出された前記第2の撮像画素信号を除算した値を、前記第2の色収差情報に乗算した第1の補正値と、前記合計値で前記補間手段によって算出された前記第3の撮像画素信号を除算した値を、前記第3の色収差情報に乗算した第2の補正値とを、前記デフォーカス量から減算することを特徴とする撮像装置。
A plurality of types of imaging pixels having different spectral sensitivity characteristics that receive an imaging light beam that has passed through the imaging optical system and output an imaging pixel signal, and a focus detection pixel signal that receives the focus detection light beam that has passed through the imaging optical system An image sensor in which a plurality of focus detection pixels having different spectral sensitivity characteristics from the imaging pixels are arranged according to a two-dimensional array;
A focus detection unit that detects a focus adjustment state of the photographing optical system based on the focus detection pixel signal and calculates a defocus amount;
Interpolating means for calculating the imaging pixel signals at the positions of the plurality of focus detection pixels based on the imaging pixel signals output from the plurality of types of imaging pixels arranged in the vicinity of the plurality of focus detection pixels by interpolation calculation. When,
Correction means for correcting the defocus amount based on the imaging pixel signals at the positions of the plurality of focus detection pixels calculated by the interpolation means and chromatic aberration information of the photographing optical system ,
The imaging pixels include first, second, and third imaging pixels having first, second, and third spectral sensitivities, respectively.
The focus detection pixel has a spectral sensitivity including the first, second, and third spectral sensitivities,
The chromatic aberration information of the photographing optical system is a second related to the second wavelength corresponding to the second spectral sensitivity with reference to the first chromatic aberration information related to the first wavelength corresponding to the first spectral sensitivity. Chromatic aberration and third chromatic aberration information related to the third wavelength corresponding to the third spectral sensitivity, respectively,
The interpolation unit is configured to detect the position of the plurality of focus detection pixels based on the imaging pixel signals output from the first, second, and third imaging pixels arranged in the vicinity of the plurality of focus detection pixels. Calculating the first, second, and third imaging pixel signals by interpolation;
The correction means is a value obtained by dividing the second imaging pixel signal calculated by the interpolation means by the total value of the first, second, and third imaging pixel signals calculated by the interpolation means, A value obtained by multiplying the third chromatic aberration information by the first correction value multiplied by the second chromatic aberration information and a value obtained by dividing the third imaging pixel signal calculated by the interpolation means by the total value. An image pickup apparatus that subtracts a correction value of 2 from the defocus amount .
JP2009149045A 2009-06-23 2009-06-23 Imaging device Expired - Fee Related JP5476810B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009149045A JP5476810B2 (en) 2009-06-23 2009-06-23 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009149045A JP5476810B2 (en) 2009-06-23 2009-06-23 Imaging device

Publications (2)

Publication Number Publication Date
JP2011007882A JP2011007882A (en) 2011-01-13
JP5476810B2 true JP5476810B2 (en) 2014-04-23

Family

ID=43564657

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009149045A Expired - Fee Related JP5476810B2 (en) 2009-06-23 2009-06-23 Imaging device

Country Status (1)

Country Link
JP (1) JP5476810B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102019128781A1 (en) * 2019-10-24 2021-04-29 Leica Camera Aktiengesellschaft Method for generating an output signal of a PDAF pixel

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5800573B2 (en) * 2011-05-23 2015-10-28 キヤノン株式会社 Imaging apparatus, camera system, and focus detection method
JP5889010B2 (en) * 2012-01-31 2016-03-22 キヤノン株式会社 Imaging apparatus and control method thereof
WO2014103852A1 (en) 2012-12-28 2014-07-03 富士フイルム株式会社 Pixel correction method and image capture device
JP5775918B2 (en) 2013-09-27 2015-09-09 オリンパス株式会社 Imaging apparatus, image processing method, and image processing program
US9420164B1 (en) 2015-09-24 2016-08-16 Qualcomm Incorporated Phase detection autofocus noise reduction
US9804357B2 (en) 2015-09-25 2017-10-31 Qualcomm Incorporated Phase detection autofocus using masked and unmasked photodiodes
CN106937107B (en) * 2015-12-29 2019-03-12 宁波舜宇光电信息有限公司 Camera shooting module group focusing method based on color difference
JP7009091B2 (en) * 2017-06-20 2022-01-25 キヤノン株式会社 Distance information generator, image pickup device, distance information generation method, and program
JP2019035825A (en) * 2017-08-10 2019-03-07 キヤノン株式会社 Imaging device
JP7071088B2 (en) 2017-10-24 2022-05-18 キヤノン株式会社 Distance detector, image pickup device, distance detection method, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002258142A (en) * 2001-02-28 2002-09-11 Canon Inc Imaging apparatus
JP4532849B2 (en) * 2003-05-20 2010-08-25 キヤノン株式会社 Automatic focusing device
JP4928236B2 (en) * 2006-11-22 2012-05-09 キヤノン株式会社 Imaging apparatus and imaging system
JP5256675B2 (en) * 2007-09-21 2013-08-07 株式会社ニコン Imaging device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102019128781A1 (en) * 2019-10-24 2021-04-29 Leica Camera Aktiengesellschaft Method for generating an output signal of a PDAF pixel

Also Published As

Publication number Publication date
JP2011007882A (en) 2011-01-13

Similar Documents

Publication Publication Date Title
JP5476810B2 (en) Imaging device
JP5029274B2 (en) Imaging device
JP5012495B2 (en) IMAGING ELEMENT, FOCUS DETECTION DEVICE, FOCUS ADJUSTMENT DEVICE, AND IMAGING DEVICE
US7586588B2 (en) Correlation operation method, correlation operation device, focus detection device and imaging device
US20190219793A1 (en) Focus detection device and image-capturing apparatus
US7783185B2 (en) Image sensor, imaging device and imaging method
US7863550B2 (en) Focus detection device and focus detection method based upon center position of gravity information of a pair of light fluxes
JP5454223B2 (en) camera
JP4770560B2 (en) Imaging apparatus, camera, and image processing method
JP5157400B2 (en) Imaging device
US7586072B2 (en) Correlation operation method, correlation operation device, focus detection device and imaging device
JP2007317951A (en) Optical sensing element and photographing device
JP2007282109A (en) Imaging apparatus, camera and image processing method
JP5857547B2 (en) Focus detection device and focus adjustment device
JP5381472B2 (en) Imaging device
JP2009271523A (en) Focus detection device and image-capturing apparatus
JP5278123B2 (en) Imaging device
JP5228777B2 (en) Focus detection apparatus and imaging apparatus
JP5600941B2 (en) Focus detection apparatus and imaging apparatus
JP5407314B2 (en) Focus detection apparatus and imaging apparatus
JP5338113B2 (en) Correlation calculation device, focus detection device, and imaging device
JP5316324B2 (en) Imaging device and imaging apparatus
JP5399627B2 (en) Focus detection device, focus adjustment device, and imaging device
JP5476702B2 (en) Imaging device and imaging apparatus
JP4968009B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130723

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130920

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131015

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131216

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140127

R150 Certificate of patent or registration of utility model

Ref document number: 5476810

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees