JP6362070B2 - Image processing apparatus, imaging apparatus, image processing method, program, and storage medium - Google Patents

Image processing apparatus, imaging apparatus, image processing method, program, and storage medium Download PDF

Info

Publication number
JP6362070B2
JP6362070B2 JP2014039319A JP2014039319A JP6362070B2 JP 6362070 B2 JP6362070 B2 JP 6362070B2 JP 2014039319 A JP2014039319 A JP 2014039319A JP 2014039319 A JP2014039319 A JP 2014039319A JP 6362070 B2 JP6362070 B2 JP 6362070B2
Authority
JP
Japan
Prior art keywords
signal
photoelectric conversion
conversion unit
image
parallax
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014039319A
Other languages
Japanese (ja)
Other versions
JP2015163915A (en
Inventor
文貴 中山
文貴 中山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014039319A priority Critical patent/JP6362070B2/en
Publication of JP2015163915A publication Critical patent/JP2015163915A/en
Application granted granted Critical
Publication of JP6362070B2 publication Critical patent/JP6362070B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、1つのマイクロレンズを共有する複数の光電変換部を備えた撮像装置に関する。   The present invention relates to an imaging apparatus including a plurality of photoelectric conversion units sharing one microlens.

従来から、1つのマイクロレンズ(以下、「ML」)に対して複数の光電変換部(以下、「PD」)を含む撮像素子を備えた撮像装置が知られている。このような撮像装置は、複数の光電変換部の信号に基づいて複数の瞳分割像を生成し、複数の瞳分割像間での位相差に基づいて焦点検出(位相差方式の焦点検出)を行う。しかし、位相差方式の焦点検出では、シェーディングの影響を受けることにより、正しい焦点検出が困難となる場合がある。   2. Description of the Related Art Conventionally, an imaging apparatus including an imaging element including a plurality of photoelectric conversion units (hereinafter referred to as “PD”) for one micro lens (hereinafter referred to as “ML”) is known. Such an imaging apparatus generates a plurality of pupil division images based on signals from a plurality of photoelectric conversion units, and performs focus detection (phase difference type focus detection) based on a phase difference between the plurality of pupil division images. Do. However, in the phase difference type focus detection, correct focus detection may be difficult due to the influence of shading.

特許文献1には、瞳分割像毎に適切なシェーディング補正を行う方法が開示されている。しかし、特許文献1では、飽和画素を考慮していないため、シェーディング補正を行うことにより、かえって焦点検出精度が低下する場合がある。一方、特許文献2には、瞳分割像毎に異なる補正量でシェーディング補正をする際に、飽和画素に対してシェーディング補正を行わないようにする構成が開示されている。   Patent Document 1 discloses a method for performing appropriate shading correction for each pupil division image. However, in Patent Document 1, since saturated pixels are not taken into consideration, the focus detection accuracy may be lowered by performing shading correction. On the other hand, Patent Document 2 discloses a configuration in which shading correction is not performed on saturated pixels when shading correction is performed with a different correction amount for each pupil divided image.

特開2011−223562号公報JP 2011-223562 A 特開昭63−276010号公報JP-A 63-276010

ところで、1つのMLを共有する複数のPD(分割PD)を備えた構成では、1つのPD当たりの電荷蓄積容量が減少する。少なくとも一つの分割PDが飽和すると、同一のMLを共有する複数のPDの出力を加算しても、飽和の影響により線形性のある感度特性が得られず、画質は劣化する。   By the way, in the configuration provided with a plurality of PDs (divided PDs) sharing one ML, the charge storage capacity per PD is reduced. When at least one divided PD is saturated, even if outputs of a plurality of PDs sharing the same ML are added, a linear sensitivity characteristic cannot be obtained due to the influence of saturation, and the image quality deteriorates.

また、位相差方式の焦点検出を行う際に、特許文献2の方法では飽和画素を用いないため、特許文献1のように不要な補正による影響を回避することは可能である。しかしながら、飽和画素は焦点検出に利用することができないため、焦点検出精度が低下する。仮に、飽和画素を焦点検出に利用したとしても、焦点検出精度は低下する。   In addition, when performing phase difference type focus detection, the method of Patent Document 2 does not use saturated pixels, so that it is possible to avoid the influence of unnecessary correction as in Patent Document 1. However, since saturated pixels cannot be used for focus detection, focus detection accuracy is reduced. Even if saturated pixels are used for focus detection, the focus detection accuracy decreases.

そこで本発明は、焦点検出精度の向上および高画質画像の取得が可能な画像処理装置、撮像装置、画像処理方法、プログラム、および、記憶媒体を提供することができる。   Therefore, the present invention can provide an image processing device, an imaging device, an image processing method, a program, and a storage medium that can improve focus detection accuracy and acquire a high-quality image.

本発明の一側面としての画像処理装置は、1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子から出力される画像信号を処理する画像処理装置であって、前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定手段と、前記判定手段からの情報に基づいて前記第1の信号または前記第2の信号を補正する補正手段と、前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出手段と、前記判定手段からの情報および前記算出手段からの情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるゲイン設定手段とを有し、前記ゲイン設定手段は、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させるAn image processing apparatus according to one aspect of the present invention is an image processing apparatus that processes an image signal output from an imaging element including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens. Determination means for determining whether each of the first signal obtained from the first photoelectric conversion unit and the second signal obtained from the second photoelectric conversion unit has reached a predetermined level; Calculation for calculating the amount of parallax between the correction unit that corrects the first signal or the second signal based on information from the determination unit, and the first photoelectric conversion unit and the second photoelectric conversion unit And gain setting means for reducing the level of the signal including color information obtained from the corrected first signal and second signal based on the information from the determination means and the information from the calculation means have a, said Gay Setting means, when one of the first signal and the second signal has reached the predetermined level, based on the parallax amount, reduces the level of the signal including the color information.

本発明の他の側面としての撮像装置は、1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子と、前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定手段と、前記判定手段からの情報に基づいて前記第1の信号または前記第2の信号を補正する補正手段と、前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出手段と、前記判定手段からの情報および前記算出手段からの情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるゲイン設定手段とを有し、前記ゲイン設定手段は、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させるAn imaging apparatus according to another aspect of the present invention includes an imaging device including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens, and a first obtained from the first photoelectric conversion unit. And the second signal obtained from the second photoelectric conversion unit determine whether or not each has reached a predetermined level, and the first signal based on information from the determination unit Or a correction unit that corrects the second signal, a calculation unit that calculates a parallax amount between the first photoelectric conversion unit and the second photoelectric conversion unit, and information from the determination unit and the calculation unit on the basis of the information, have a gain setting means for reducing the level of a signal including a color information obtained from the first signal and the second signal after the correction, the gain setting means, said first One of the signal and the second signal If is has reached the predetermined level, based on the parallax amount, reduces the level of the signal including the color information.

本発明の他の側面としての画像処理方法は、1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子から出力される画像信号を処理する画像処理方法であって、前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定ステップと、前記判定ステップにて得られた情報に基づいて前記第1の信号または前記第2の信号を補正する補正ステップと、前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出ステップと、前記判定ステップにて得られた情報および前記算出ステップにて得られた情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるようにゲインを設定する設定ステップとを有し、前記設定ステップは、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させる
An image processing method according to another aspect of the present invention is an image processing method for processing an image signal output from an imaging device including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens. A determination step of determining whether each of the first signal obtained from the first photoelectric conversion unit and the second signal obtained from the second photoelectric conversion unit has reached a predetermined level; , A correction step for correcting the first signal or the second signal based on the information obtained in the determination step, and a parallax amount between the first photoelectric conversion unit and the second photoelectric conversion unit And a color information obtained from the corrected first signal and the second signal based on the information obtained in the determination step and the information obtained in the calculation step. Signal level Possess a setting step of setting the gain to reduce the setting step, when one of the first signal and the second signal has reached the predetermined level, based on the amount of parallax The level of the signal including the color information is reduced .

本発明の他の側面としてのプログラムは、前記画像処理方法をコンピュータに実行させるように構成されている。   A program according to another aspect of the present invention is configured to cause a computer to execute the image processing method.

本発明の他の側面としての記憶媒体は、前記プログラムを記憶している。   A storage medium according to another aspect of the present invention stores the program.

本発明の他の目的及び特徴は、以下の実施形態において説明される。   Other objects and features of the invention are described in the following embodiments.

本発明によれば、焦点検出精度の向上および高画質画像の取得が可能な画像処理装置、撮像装置、画像処理方法、プログラム、および、記憶媒体を提供することができる。   According to the present invention, it is possible to provide an image processing device, an imaging device, an image processing method, a program, and a storage medium capable of improving focus detection accuracy and acquiring a high-quality image.

第1の実施形態における画像処理部のブロック図である。FIG. 3 is a block diagram of an image processing unit in the first embodiment. シェーディングの影響の説明図である。It is explanatory drawing of the influence of shading. 第1の実施形態における撮像装置のブロック図である。It is a block diagram of the imaging device in a 1st embodiment. 第1の実施形態における撮像素子の単位画素セルの概略図である。It is the schematic of the unit pixel cell of the image pick-up element in 1st Embodiment. 第1の実施形態における撮像素子のカラーフィルタの配列図である。It is an array diagram of the color filter of the image sensor in the first embodiment. 分割瞳とマイクロレンズを共有する複数の光電変換部への入射主光線との関係図である。It is a related figure with the incident principal ray to the some photoelectric conversion part which shares a division pupil and a micro lens. 射出瞳と絞り位置のずれにより生じるケラレの様子の説明図である。It is explanatory drawing of the mode of the vignetting produced by the shift | offset | difference of an exit pupil and an aperture position. マイクロレンズと光電変換部とのアライメントの影響の説明図である。It is explanatory drawing of the influence of alignment with a micro lens and a photoelectric conversion part. 1つのマイクロレンズを共有する複数の光電変換部の射出瞳の大きさおよび形状の説明図である。It is explanatory drawing of the magnitude | size and shape of the exit pupil of several photoelectric conversion parts which share one microlens. 画角または画像座標の変化に応じたシェーディングによる諧調変化の説明図である。It is explanatory drawing of the gradation change by the shading according to the change of a view angle or an image coordinate. シェーディング補正の際の飽和画素値の説明図である。It is explanatory drawing of the saturated pixel value in the case of shading correction | amendment. 相関演算における飽和画素の影響の説明図である。It is explanatory drawing of the influence of the saturated pixel in correlation calculation. 第2の実施形態における多点位相差測距による相関演算の説明図である。It is explanatory drawing of the correlation calculation by the multipoint phase difference ranging in 2nd Embodiment. 第1の実施形態において、周辺画素を考慮した抑圧の説明図であるFIG. 6 is an explanatory diagram of suppression in consideration of neighboring pixels in the first embodiment. 第1の実施形態における撮像装置の制御方法を示すフローチャートである。3 is a flowchart illustrating a method for controlling the imaging apparatus according to the first embodiment. 第3の実施形態における撮像装置のブロック図である。It is a block diagram of the imaging device in 3rd Embodiment. 第1の実施形態におけるシェーディング補正手段および画像処理手段のブロック図である。It is a block diagram of a shading correction unit and an image processing unit in the first embodiment. 第1の実施形態において、視差量と抑圧ゲインとの関係の説明図である。In 1st Embodiment, it is explanatory drawing of the relationship between the amount of parallax, and a suppression gain.

以下、本発明の実施形態について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照符号を付し、重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In each figure, the same members are denoted by the same reference numerals, and redundant description is omitted.

(第1の実施形態)
まず、図3を参照して、本発明の第1の実施形態における撮像装置について説明する。図3は、本実施形態における撮像装置300のブロック図である。撮像装置300は、光学系301、撮像素子302、画像処理部303(画像処理装置)、および、CPU304を有する。光学系301は、被写体100から放射された光を撮像素子302上に結像(集光)させる。光学系301は、例えば、複数のレンズ、ミラー、絞り機構、および、フォーカスやズームのための駆動機構を備えて構成される。
(First embodiment)
First, the imaging device according to the first embodiment of the present invention will be described with reference to FIG. FIG. 3 is a block diagram of the imaging apparatus 300 in the present embodiment. The imaging apparatus 300 includes an optical system 301, an imaging element 302, an image processing unit 303 (image processing apparatus), and a CPU 304. The optical system 301 forms (condenses) light emitted from the subject 100 on the image sensor 302. The optical system 301 includes, for example, a plurality of lenses, a mirror, a diaphragm mechanism, and a driving mechanism for focusing and zooming.

撮像素子302は、1つのマイクロレンズ(以下、「ML」)に対応する(すなわち、1つのMLを共有する)複数の光電変換部(以下、「PD」)を有する。図4は、1つのMLを共有する複数の光電変換部を備えた撮像素子302の単位画素セル401の概略図である。図4(a)は、単位画素セル401の断面図を示し、図4(b)、(c)は、それぞれ、1つのMLを共有するPDを2分割、4分割した場合の正面図を示している。図4(a)に示されるように、1つのMLに対応する画素群により構成される単位画素セル401は、1つ目の分割PD402、2つ目の分割PD403、ML404、カラーフィルタ405、および、配線層406により構成される。図4(b)、(c)は、単位画素セル401におけるML404を共有する2分割PD402、403、および、4分割PD402、403、404、405の配置例を示している。図4(b)、(c)において、入射光は、ML404を通り、カラーフィルタ405によって分光特性を持ち、各分割PDへ照射される。カラーフィルタ405は、一定周期の繰り返しで単位画素セル毎に配列される。   The image sensor 302 includes a plurality of photoelectric conversion units (hereinafter “PD”) corresponding to one micro lens (hereinafter “ML”) (that is, sharing one ML). FIG. 4 is a schematic diagram of a unit pixel cell 401 of the image sensor 302 including a plurality of photoelectric conversion units sharing one ML. 4A shows a cross-sectional view of the unit pixel cell 401, and FIGS. 4B and 4C show front views when a PD sharing one ML is divided into two and four, respectively. ing. As shown in FIG. 4A, a unit pixel cell 401 configured by a pixel group corresponding to one ML includes a first divided PD 402, a second divided PD 403, an ML 404, a color filter 405, and And the wiring layer 406. FIGS. 4B and 4C show an arrangement example of the two-divided PDs 402 and 403 and the four-divided PDs 402, 403, 404, and 405 that share the ML 404 in the unit pixel cell 401. FIG. 4B and 4C, incident light passes through the ML 404, has spectral characteristics by the color filter 405, and is irradiated to each divided PD. The color filter 405 is arranged for each unit pixel cell at a constant cycle.

なお、以下の説明において、図4(b)に示されるように1つのMLを共有する2つのPDを含む撮像素子を用いる場合、これらの2つのPDをそれぞれ第1の光電変換部(PD1)および第2の光電変換部(PD2)という。また、図4(c)に示されるように1つのMLを共有する4つのPDを含む撮像素子を用いる場合、4つのPDのうち少なくとも一つを第1の光電変換部(PD1)、4つのPDのうち他の(残りの)少なくとも一つを第2の光電変換部(PD2)という。   In the following description, when an image sensor including two PDs sharing one ML is used as shown in FIG. 4B, these two PDs are respectively connected to the first photoelectric conversion unit (PD1). And a second photoelectric conversion unit (PD2). In addition, when using an imaging device including four PDs sharing one ML as shown in FIG. 4C, at least one of the four PDs is a first photoelectric conversion unit (PD1), four At least one other (remaining) PD is referred to as a second photoelectric conversion unit (PD2).

図5は、本実施形態におけるカラーフィルタの配列図であり、2分割PD402、403の例を示す。図5において、カラーフィルタ405は、R、G、G、Bのセット(縦2×横2の単位画素セル)が周期的に配列された、一般的なベイヤー配列の場合を例示している。本実施形態の撮像素子302の構造および特徴は、単位画素セルが分割構造であることを除いて、一般的な撮像素子と同様である。   FIG. 5 is an arrangement diagram of color filters in the present embodiment, and shows an example of two-divided PDs 402 and 403. In FIG. 5, the color filter 405 exemplifies a general Bayer arrangement in which a set of R, G, G, and B (2 × 2 unit pixel cells) is periodically arranged. The structure and characteristics of the image sensor 302 of the present embodiment are the same as those of a general image sensor except that the unit pixel cell has a divided structure.

ML404は、光学系301により構成される主光学系(主レンズ)に対して視野レンズの役割を果たす。このため、分割PDに到達する射出瞳からの光束は制限され、各分割PD上には、射出瞳の互いに異なる領域を通過した光束が到達する。すなわち第1の光電変換部および第2の光電変換部は、撮影光学系の射出瞳のうち互いに異なる領域を通過する光束を受光するように構成されている。このため、単位画素セルにおいて同一配列の画素、例えば、PD402のみの画素を、受光領域の全体から集めて構成した画像と、PD403のみの画素を集めて構成した画像との間には、視差が生じる。このような画像間の視差を利用することにより、焦点検出やステレオ画像処理が可能となる。画素間で視差を有する画像は、視差画像と呼ばれる。   The ML 404 serves as a field lens for the main optical system (main lens) configured by the optical system 301. For this reason, the light flux from the exit pupil that reaches the split PD is limited, and the light flux that has passed through different areas of the exit pupil reaches each split PD. That is, the first photoelectric conversion unit and the second photoelectric conversion unit are configured to receive light beams that pass through different regions of the exit pupil of the photographing optical system. For this reason, there is a parallax between an image formed by collecting pixels of the same arrangement in the unit pixel cell, for example, pixels of only PD 402 from the entire light receiving region, and an image formed by collecting pixels of only PD 403. Arise. By using such parallax between images, focus detection and stereo image processing can be performed. An image having parallax between pixels is called a parallax image.

また、一般的な太陽光などのコヒーレンスの低い光を照明とする撮影照明条件、および民生光学素子を利用する条件下では、分割瞳間の空間コヒーレンシーは低いとみなすことが可能である。このため、単位画素セル401中の各PD、例えば2分割402、403間、または、4分割402、403、404、405間の画素値の加算で得られる画像は、従来の非瞳分割光学系で撮影した像と略等価な値として得られる。この加算画像に対して、後述の画像処理部303に搭載の前処理および後処理からなる画像処理、または、一般的な画像処理を実行することにより、従来の撮像素子を用いた場合と同様の画像を得ることができる。   In addition, it is possible to consider that the spatial coherency between the divided pupils is low under a photographing illumination condition in which light with low coherence such as general sunlight is used for illumination and a condition using a consumer optical element. For this reason, an image obtained by adding pixel values between the PDs in the unit pixel cell 401, for example, between the two divisions 402 and 403 or between the four divisions 402, 403, 404, and 405, is a conventional non-pupil division optical system. It is obtained as a value approximately equivalent to the image photographed in. By performing image processing including pre-processing and post-processing mounted on the image processing unit 303 described later or general image processing on the added image, the same as in the case of using a conventional image sensor An image can be obtained.

また、撮像素子302からは、一つのMLを共有する各PDに対応する分割数分の視差画像信号が出力される。多くの場合、読み出し回路が共有され、例えばスイッチング回路の切り替えによる順次読み出しにより各視差画像信号が順次出力される。撮像素子によっては占有伝送帯域節約のため、2つ以上の視差画像間で四則演算、例えば2つ以上の視差画像を画素毎で加算した信号と非加算画像をセットで出力する。加算画像出力デバイスの場合、後述の画像処理部にて分離処理を行い、各視差画像に復元することにより、視差画像信号毎に出力した場合と等価な画像信号を得ることができる。   In addition, the imaging element 302 outputs parallax image signals corresponding to the number of divisions corresponding to each PD sharing one ML. In many cases, the readout circuit is shared, and each parallax image signal is sequentially output by sequential readout by switching the switching circuit, for example. Depending on the imaging device, in order to save the occupied transmission band, four arithmetic operations are performed between two or more parallax images, for example, a signal obtained by adding two or more parallax images for each pixel and a non-addition image are output as a set. In the case of an addition image output device, an image signal equivalent to the case of outputting for each parallax image signal can be obtained by performing separation processing in an image processing unit described later and restoring each parallax image.

画像処理部303は、大きく分類すると、前処理部3031と後処理部3032とに分けることができる。前処理部3031は、撮像素子302で光電変換されたアナログ画像信号に対して相二重サンプリング(CDS)によるノイズ除去、オートゲインコントロール(AGC) によるゲインアップ、黒レベル補正、A/D変換、キズ補正などの基礎的な処理を行う。そして前処理部3031は、各種処理後の信号をデジタル信号に変換した画像信号を得る。前処理部3031は、アナログ信号に対する前処理が主であるため、主要部はAFE(アナログフロントエンド)とも呼ばれる。デジタル出力センサと対で使われるものは、DFE(デジタルフロントエンド)と呼ばれる。   The image processing unit 303 can be broadly classified into a pre-processing unit 3031 and a post-processing unit 3032. The pre-processing unit 3031 removes noise by phase double sampling (CDS) from the analog image signal photoelectrically converted by the image sensor 302, gain-up by auto gain control (AGC), black level correction, A / D conversion, Perform basic processing such as scratch correction. The preprocessing unit 3031 obtains an image signal obtained by converting a signal after various processing into a digital signal. Since the preprocessing unit 3031 mainly performs preprocessing for analog signals, the main part is also called AFE (analog front end). What is used in pair with a digital output sensor is called a DFE (digital front end).

一方、後処理部3032は、前処理部3031にてデジタル信号に変換された画像信号に対して絵作りに関する画像処理や記録・伝送のための符号化圧縮処理を行う。後処理部3032は、例えば、ベイヤー配列補間、線形化マトリクス処理、ホワイトバランス調整、YCC変換、色差・階調・コントラスト補正、エッジ強調などの処理を行う。近年では、複数枚合成により広ダイナミックレンジ画像を生成するダイナミックレンジ拡張処理や超解像処理などの付加価値向上処理も後処理の一つとして分類される。これらの処理により、一枚または動画に形成された出力像の情報が生成される。またこれらの後処理は、前処理部3031のAFE処理に対してDBE(デジタルバックエンド)処理と呼ばれる。   On the other hand, the post-processing unit 3032 performs image processing relating to picture creation and coding / compression processing for recording / transmission on the image signal converted into the digital signal by the pre-processing unit 3031. The post-processing unit 3032 performs, for example, processing such as Bayer array interpolation, linearization matrix processing, white balance adjustment, YCC conversion, color difference / tone / contrast correction, and edge enhancement. In recent years, added value improvement processing such as dynamic range expansion processing and super-resolution processing for generating a wide dynamic range image by combining a plurality of images is also classified as one of post-processing. By these processes, information of an output image formed on one sheet or a moving image is generated. Further, these post-processing are called DBE (digital back end) processing with respect to the AFE processing of the pre-processing unit 3031.

そして、画像処理部303で生成された画像情報は、不図示のDRAMなどから構成されるワークメモリに一旦保存され、または、想定される後段の処理部に直接伝送される。後段の処理部としては、例えば、半導体メモリなどからなる記録部、液晶などのディスプレイから構成される表示部、無線LANやUSBなどの有線ケーブルを接続可能なI/F(インターフェース)から構成される外部入出力I/Fが挙げられる。   The image information generated by the image processing unit 303 is temporarily stored in a work memory composed of a DRAM (not shown) or the like, or directly transmitted to an assumed subsequent processing unit. For example, the processing unit in the subsequent stage includes a recording unit made of a semiconductor memory, a display unit made up of a display such as a liquid crystal, and an I / F (interface) that can be connected to a wired cable such as a wireless LAN or USB An external input / output I / F can be mentioned.

CPU304は、撮像装置全体の動作を制御する制御手段である。CPU304は、例えば、光学系301のフォーカス、ズーム、絞りなどを制御する。CPU304からの命令に基づいて、光学系301のコンポーネントに含まれるレンズ群や絞りが駆動される。すなわちCPU304は、フォーカス距離、焦点距離、絞り値などのカメラパラメータの状態情報を常に管理している。   The CPU 304 is a control unit that controls the operation of the entire imaging apparatus. For example, the CPU 304 controls the focus, zoom, aperture, and the like of the optical system 301. Based on a command from the CPU 304, the lens group and the diaphragm included in the components of the optical system 301 are driven. That is, the CPU 304 always manages state information of camera parameters such as a focus distance, a focal distance, and an aperture value.

一つのMLに対して複数のPDを含む撮像素子302を有する場合、または、その映像信号を入力とする画像処理装置において、画像処理部303、主に前処理部3031が本実施形態の主要要素である画素値のシェーディング補正処理を実施する。また後処理部3032は、付加価値的な処理である視差画像を用いた測距処理および画素加算に基づく観賞用画像生成を行う。画像処理部303にて得られた測距情報は、CPU304に伝送され、CPU304はこの情報に基づいて、光学系301のフォーカシング(フォーカス制御)を行う。フォーカシング後の被写体距離やその際の絞り値、ズーム状態などのカメラパラメータは、CPU304に保持される。より高精度なカメラパラメータを制御に用いる場合、光学系301のユニットに搭載される不図示のエンコーダを用いてカメラパラメータの状態を測定し、測定された状態をCPU304に記録する。   In the case of having an image sensor 302 including a plurality of PDs for one ML, or in an image processing apparatus that receives the video signal, an image processing unit 303, mainly a preprocessing unit 3031, is a main element of the present embodiment. The pixel value shading correction process is performed. Further, the post-processing unit 3032 performs ornamental image generation based on distance measurement processing using a parallax image, which is an added value processing, and pixel addition. The distance measurement information obtained by the image processing unit 303 is transmitted to the CPU 304, and the CPU 304 performs focusing (focus control) of the optical system 301 based on this information. The camera parameters such as the subject distance after focusing, the aperture value at that time, and the zoom state are held in the CPU 304. When using a more accurate camera parameter for control, the state of the camera parameter is measured using an encoder (not shown) mounted on the unit of the optical system 301 and the measured state is recorded in the CPU 304.

前述の装置の構成における前処理および後処理の定義付け、各処理部に含まれる画像処理の分類およびグループ分けや順番は、近年の急速な画像処理の発展およびデバイスの進化の影響を受け、曖昧なものとなっている。例えば、シェーディング補正処理を、測距や観賞用画像生成処理等の後半の後処理の一部として実施することもありうる。また逆に、視差画像間の画素加算を基礎的な画像処理と位置付け、前半の前処理として実施することもありうる。加えて、従来主流であったAFEでは、シェーディング補正のような複雑な処理は苦手のため、DBEで実施されていた。しかし、DFEが主流となりつつある現在、処理の共通性から前処理として実施されるなどの影響がある。また、撮像素子302が画像処理回路をオンチップで含む場合、前処理および後処理、一つのMLを共有する複数PDを持つ撮像素子302に特有のシェーディング補正、測距処理、観賞用画像生成のための画素加算の全てを撮像素子302内で実施してもよい。また、画素加算した視差画像と非加算画像のセットを出力とする撮像素子302の場合、本実施形態のシェーディング補正および測距処理前に加算画像と非加算画像の間で分離処理、例えば画素単位レベルの四則演算を行い、各視差画像に分離する処理が追加される。   The definition of pre-processing and post-processing in the above-described apparatus configuration, the classification, grouping and order of image processing included in each processing unit are ambiguous due to the recent rapid development of image processing and the evolution of devices. It has become a thing. For example, the shading correction processing may be performed as part of the latter half of post-processing such as distance measurement or ornamental image generation processing. Conversely, pixel addition between parallax images may be positioned as basic image processing and may be implemented as the first half of preprocessing. In addition, in AFE, which has been the mainstream in the past, complicated processing such as shading correction has been performed in DBE because it is not good at it. However, since DFE is becoming mainstream, there is an influence such as being implemented as preprocessing due to commonality of processing. When the image sensor 302 includes an image processing circuit on-chip, pre-processing and post-processing, shading correction unique to the image sensor 302 having a plurality of PDs sharing one ML, distance measurement processing, and ornamental image generation are performed. All the pixel additions for this purpose may be performed within the image sensor 302. Further, in the case of the image sensor 302 that outputs a set of parallax images added with pixels and non-added images, separation processing between the added image and the non-added image before the shading correction and distance measurement processing of the present embodiment, for example, pixel unit A process of performing level four arithmetic operations and separating the parallax images is added.

このように、本実施形態に適用可能な装置および処理の構成は様々であり、以下説明する画素値のシェーディング補正処理は、前述の装置や処理構成、およびその順番に制限されるものではない。このため、以下、撮像素子302の出力の前述した些細な組み合わせなどの条件の違い、処理順の違いを省いた条件下で、本実施形態の主要要素である画素値のシェーディング補正処理について説明する。   Thus, there are various apparatus and processing configurations applicable to the present embodiment, and the pixel value shading correction processing described below is not limited to the above-described apparatus and processing configuration and their order. For this reason, the shading correction processing of the pixel value, which is the main element of the present embodiment, will be described below under the conditions in which the difference in conditions such as the above-described trivial combinations of the outputs of the image sensor 302 and the processing order are omitted. .

次に、図1を参照して、本実施形態におけるシェーディング補正を行う画像処理部303(画像処理装置)について説明する。図1は、本実施形態における画像処理部303のブロック図である。画像処理部303は、シェーディング補正手段3033、画像処理手段3034、および、測距手段3035(焦点検出手段)を有し、シェーディング補正を実行可能に構成されている。   Next, an image processing unit 303 (image processing apparatus) that performs shading correction in the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram of the image processing unit 303 in the present embodiment. The image processing unit 303 includes a shading correction unit 3033, an image processing unit 3034, and a distance measurement unit 3035 (focus detection unit), and is configured to be able to perform shading correction.

図1に示されるように、画像処理部303には、1つのMLに対して複数のPDを有する撮像素子302で撮影した複数の視差画像(画像信号)が入力される。撮像素子302から出力された画像信号に対するA/D変換などの前処理、および、画像信号の一部が加算画像の場合の分離処理は実施済みであるとする。シェーディング補正手段3033は、瞳分割系を考慮したシェーディング補正を実施し、飽和の影響を補正した複数枚からなる一群の視差画像を出力する。画像処理手段3034は、画素加算処理により得られた加算画像に基づいて、観賞用画像を生成する。観賞用画像への変換を行う画像処理手段3034は、ベイヤー配列補間や符号化圧縮などを行う後処理部3032に対応する。測距手段3035は、補正済みの複数の視差画像(補正後の第1の信号および第2の信号)に基づいて、測距処理(焦点検出処理)を行う。また、複数の視差画像は、密な奥行情報の取得に利用し、不図示の記録部に保存し、または、外部入出力I/Fから出力して外部の画像処理手段の入力として利用してもよい。   As shown in FIG. 1, a plurality of parallax images (image signals) captured by an image sensor 302 having a plurality of PDs for one ML are input to the image processing unit 303. It is assumed that preprocessing such as A / D conversion for the image signal output from the image sensor 302 and separation processing in the case where a part of the image signal is an added image have been performed. The shading correction unit 3033 performs shading correction in consideration of the pupil division system, and outputs a group of parallax images composed of a plurality of sheets corrected for the influence of saturation. The image processing unit 3034 generates an ornamental image based on the added image obtained by the pixel addition process. An image processing unit 3034 that performs conversion into an ornamental image corresponds to the post-processing unit 3032 that performs Bayer array interpolation, encoding compression, and the like. The distance measuring unit 3035 performs distance measurement processing (focus detection processing) based on a plurality of corrected parallax images (corrected first signal and second signal). The plurality of parallax images are used for obtaining dense depth information, stored in a recording unit (not shown), or output from an external input / output I / F and used as input to external image processing means. Also good.

シェーディングは、大きく分けて二種類の影響により生じる。図2は、シェーディングの影響を説明する図である。図2(a)は、通常の非瞳分割光学系においても不可避の周辺光量低下を主とするシェーディングを示している。図2(b)、(c)は、本実施形態の対象である瞳分割光学系に特有のシェーディング(左右2分割の場合、上下左右4分割の場合)をそれぞれ示している。シェーディング補正は、両方の影響を低減するように行う。実際の処理の実行においては、2つの影響を合算して考慮した補正を実施することが効率的である。   Shading is caused by two types of effects. FIG. 2 is a diagram for explaining the influence of shading. FIG. 2A shows shading mainly due to an inevitable decrease in peripheral light amount even in a normal non-pupil division optical system. FIGS. 2B and 2C respectively show shading specific to the pupil division optical system that is the object of the present embodiment (in the case of two left and right divisions, and in the case of four divisions, up and down, left and right). Shading correction is performed to reduce both effects. In actual execution of processing, it is efficient to perform correction in consideration of the total of two effects.

前述のように、光学系301と、撮像素子302の単位画素セル401内のMLおよび1つのMLに対して複数の光電変換部を有する撮像素子302とを組み合わせることにより、瞳分割光学系を構成することができる。図2(b)の傾向から観察可能なように、瞳分割に伴うシェーディングは、複数の視差画像間で瞳分割方向に偏ったシェーディングを生じる。以下、最初にMLを共有する複数のPDを持つ撮像素子302を用いることにより生じる特有のシェーディング要因について説明する。   As described above, the pupil division optical system is configured by combining the optical system 301 with the ML in the unit pixel cell 401 of the image sensor 302 and the image sensor 302 having a plurality of photoelectric conversion units for one ML. can do. As can be observed from the tendency of FIG. 2B, the shading accompanying the pupil division causes a shading biased in the pupil division direction between a plurality of parallax images. Hereinafter, a specific shading factor generated by using the image sensor 302 having a plurality of PDs sharing the ML first will be described.

図6は、分割瞳(射出瞳を分割した部分領域)と1つのマイクロレンズ(ML)を共有する複数の光電変換部PDへの入射主光線との関係を示す図である。図6(a)は全瞳に対応する画像中心近傍の単位画素セルへの入射主光線の説明図、図6(b)は画像周辺部の単位画素セルへの入射主光線の説明図である。ここで、画像中心とは、光学系301の光軸と撮像素子302上に形成される画像面との交点である。   FIG. 6 is a diagram illustrating a relationship between a divided pupil (a partial region obtained by dividing the exit pupil) and a principal ray incident on a plurality of photoelectric conversion units PD sharing one microlens (ML). FIG. 6A is an explanatory diagram of the principal ray incident on the unit pixel cell near the center of the image corresponding to all pupils, and FIG. 6B is an explanatory diagram of the incident principal ray incident on the unit pixel cell in the peripheral portion of the image. . Here, the image center is the intersection of the optical axis of the optical system 301 and the image plane formed on the image sensor 302.

図6(a)においては、各分割瞳から入射する主光線の角度は略等しい。一方、画像周辺部の単位画素セルに入射する各分割瞳からの主光線の角度は、図6(b)に示されるように、単純な幾何学的関係に基づき相対的に大きく異なる。この結果、一般的なシェーディング要因であるCOS4乗測の影響により、1つのMLを共有する対となる画素間で、被写体の同一点からの等しい輝度または照度の光束を投影しても、画素値には差が生じる。これが、分割瞳光学系に生じる特有のシェーディングの主要な原因である。COS4乗測の影響は、主レンズからPDまでの距離が1つのMLを共有する対となる画素間で著しく異なる場合、主光学系の瞳サイズが同様に異なる場合、画像中心からの当該単位画素セル401の距離が同様に著しく大きい場合には顕著となる。ここで、主レンズからPDまでの距離とは、物理的な距離ではなく主レンズを構成するレンズ群を1つの合成レンズに換算した際の仮想距離を指す。   In FIG. 6A, the angles of chief rays incident from each divided pupil are substantially equal. On the other hand, as shown in FIG. 6B, the angle of the principal ray from each divided pupil that enters the unit pixel cell in the peripheral portion of the image is relatively greatly different based on a simple geometric relationship. As a result, even if a luminous flux having the same luminance or illuminance from the same point of the subject is projected between the pair of pixels sharing one ML due to the influence of COS4 power measurement, which is a general shading factor, the pixel value There will be a difference. This is the main cause of the unique shading that occurs in the split pupil optics. When the distance from the main lens to the PD is significantly different between paired pixels sharing one ML, the pupil size of the main optical system is similarly different, the unit pixel from the image center Similarly, when the distance of the cell 401 is extremely large, it becomes prominent. Here, the distance from the main lens to the PD indicates not a physical distance but a virtual distance when the lens group constituting the main lens is converted into one synthetic lens.

COS4乗測は、ケラレのない理想状態、例えば長焦点距離のレンズの場合、瞳分割特有のシェーディング現象を忠実にモデリングする。一方、短焦点距離のレンズでは、鏡筒やレンズ保持部によるケラレに起因するシェーディングが生じやすく、主要な要素となる場合が多い。また、ズームやフォーカス制御により射出瞳が移動するのに対し、絞り位置が移動しない場合にはケラレによるシェーディングがさらに生じ易くなる。   In the case of an ideal state without vignetting, for example, a lens having a long focal length, the COS4 power measurement faithfully models a shading phenomenon peculiar to pupil division. On the other hand, in a short focal length lens, shading due to vignetting due to a lens barrel or a lens holding portion is likely to occur, which is often a major factor. Further, while the exit pupil moves due to zoom and focus control, when the aperture position does not move, shading due to vignetting is more likely to occur.

図7は射出瞳と絞り700の位置(絞り位置)のずれにより生じる偏りを持ったケラレの様子を説明する図である。図7(a)は、射出瞳と絞り位置とが互いに一致する場合を示す図である。通常、光学系301における絞り位置は、画角変動に対し、周辺光線の経路の変動が一番小さくなる射出瞳の位置に設定される。このため、画像中心近傍の画角に対するケラレと、画像周辺部に対するケラレの間には大差がない。図7(a)において、左側の円は画像周辺部から見た射出瞳701、右側の円は画像中心部から見た射出瞳702である。射出瞳701、702は、略同じ形状および大きさを有する。   FIG. 7 is a diagram for explaining a vignetting state having a bias caused by a shift between the exit pupil and the position of the diaphragm 700 (aperture position). FIG. 7A is a diagram illustrating a case where the exit pupil and the aperture position coincide with each other. Normally, the stop position in the optical system 301 is set to the position of the exit pupil where the fluctuation of the path of the peripheral ray is the smallest with respect to the fluctuation of the angle of view. For this reason, there is no great difference between the vignetting for the angle of view near the center of the image and the vignetting for the peripheral portion of the image. In FIG. 7A, the left circle is the exit pupil 701 viewed from the periphery of the image, and the right circle is the exit pupil 702 viewed from the center of the image. The exit pupils 701 and 702 have substantially the same shape and size.

しかしながら、ズームやフォーカス制御状態によっては、光学系301に含まれる絞り位置に対し、射出瞳が光軸方向にずれを生じる場合がある。図7(b)は、撮像素子302の周辺部に到達する光束に対しては、ずれた位置に移動した絞りにより、射出瞳が偏心した形でケラレが生じる状態を表す。この場合、画像中心近傍の画角と周辺部の画角の間で特有のシェーディングを生じる。図7(b)において、左側の円は画像周辺部から見た射出瞳703、右側の円は画像中心部から見た射出瞳704である。射出瞳からずれた位置に設置された絞り700による遮蔽を受け、周辺画角から見た瞳(射出瞳703)は小さくなる。加えて、光学系301の合成主点が撮像素子302の近くに位置する場合、周辺部に近づくにつれて単位画素セルにおいて光学系301の主レンズとMLを結ぶ光軸が大きく傾く可能性がある。   However, the exit pupil may be displaced in the optical axis direction with respect to the stop position included in the optical system 301 depending on the zoom or focus control state. FIG. 7B illustrates a state in which vignetting occurs in a form in which the exit pupil is decentered by the diaphragm moved to a shifted position with respect to the light beam reaching the periphery of the image sensor 302. In this case, specific shading occurs between the angle of view near the center of the image and the angle of view of the peripheral part. In FIG. 7B, the left circle is the exit pupil 703 viewed from the periphery of the image, and the right circle is the exit pupil 704 viewed from the center of the image. The pupil (exit pupil 703) viewed from the peripheral angle of view is reduced by being shielded by the diaphragm 700 installed at a position shifted from the exit pupil. In addition, when the composite principal point of the optical system 301 is located near the image sensor 302, the optical axis connecting the main lens of the optical system 301 and the ML may be greatly inclined in the unit pixel cell as it approaches the periphery.

図8は、マイクロレンズMLと光電変換部PDとのアライメントの影響を説明する図である。図8(a)に示されるような画像周辺部の画角の単位画素セルについて説明する。MLとPDとのアライメントが適切な場合、図8(b)に示されるように、射出瞳EPからの光束を効率良く各PDで受光することが可能である。一方、MLとPDとのアライメントが適切になされていない場合、図8(c)に示されるようになる。ここで、撮像素子302側が光学系301の高いテレセントリック性を想定し、MLとPDとのアライメントは略等ピッチである。一方、光学系301のテレセントリック性が低い場合、別の分割画素に入射すべき光束が隣接PCに入射してクロストークが発生、または、図8(c)に示されるように光束の一部が画素構造や配線層406によってケラレを生じ、相対的な光量低下を引き起こす。これは、前述の鏡筒やレンズ保持部により生じるケラレと同様に、各PDの断面積から見える射出瞳サイズの縮小として影響が現れ、画像周辺部の画角ほど影響が大きくなるためである。   FIG. 8 is a diagram for explaining the influence of alignment between the microlens ML and the photoelectric conversion unit PD. A unit pixel cell having an angle of view at the periphery of the image as shown in FIG. When the alignment between the ML and the PD is appropriate, the light flux from the exit pupil EP can be efficiently received by each PD as shown in FIG. 8B. On the other hand, when the alignment between ML and PD is not properly performed, it is as shown in FIG. Here, assuming that the image pickup element 302 side has high telecentricity of the optical system 301, the alignment between ML and PD is substantially equal pitch. On the other hand, when the telecentricity of the optical system 301 is low, a light beam to be incident on another divided pixel enters the adjacent PC and crosstalk occurs, or a part of the light beam is generated as shown in FIG. Vignetting is caused by the pixel structure and the wiring layer 406, causing a relative decrease in the amount of light. This is because, similar to the vignetting caused by the lens barrel and the lens holding portion described above, the influence appears as a reduction in the exit pupil size seen from the cross-sectional area of each PD, and the influence becomes larger as the angle of view at the peripheral portion of the image.

図9は、1つのマイクロレンズMLを共有する複数の光電変換部PDの射出瞳の大きさおよび形状の説明図であり、2分割(2divided)の場合および4分割(4divided)の場合のそれぞれを示している。図9に示されるように、前述の複合的要因により、PDの射出瞳の大きさおよび形状は、単位画素セルにおける位置に応じて変化する。図9中の左下は、画像中心近傍の画角の単位画素セルから見た射出瞳の模式図である。画像中心近傍の場合、1つのMLを共有する複数のPD毎に見込む射出瞳形状は略同一となる。被写体が均一な輝度または照度面であって、合焦して同一物点を投影している場合には画素値は略同一となる。   FIG. 9 is an explanatory diagram of the size and shape of the exit pupil of a plurality of photoelectric conversion units PD sharing one microlens ML. Each of the cases of 2 divisions (2 divided) and 4 divisions (4 divided) is shown. Show. As shown in FIG. 9, due to the above-described complex factors, the size and shape of the exit pupil of the PD change according to the position in the unit pixel cell. The lower left in FIG. 9 is a schematic diagram of the exit pupil viewed from a unit pixel cell having an angle of view near the center of the image. In the case of the vicinity of the center of the image, the exit pupil shapes expected for a plurality of PDs sharing one ML are substantially the same. When the subject has a uniform luminance or illuminance surface and the same object point is projected in focus, the pixel values are substantially the same.

一方、図9中の右上は、撮像素子302の周辺部の画角の画素セルから見た射出瞳の模式図である。各PD間でケラレ量が異なるため、射出瞳の形状および大きさには差が生じ、得られる画素値に差が生じる。ただし、鏡筒やレンズ保持部により生じるケラレ形状は鏡筒形状などに依存して複雑な形状となる。また、光学系301と撮像素子302との間での想定するテレセントリック特性のずれに起因するケラレ形状は、相対的な特性のずれにより影響の大小が変化して方向反転が生じる。よって、図9に示される形状は模式的なものにすぎず、画素値の光量差に影響する相対サイズの変化を表す近似的なものである。   On the other hand, the upper right in FIG. 9 is a schematic diagram of an exit pupil viewed from a pixel cell having an angle of view around the image sensor 302. Since the amount of vignetting differs between the PDs, there is a difference in the shape and size of the exit pupil, and there is a difference in the obtained pixel values. However, the vignetting shape generated by the lens barrel and the lens holding portion becomes a complicated shape depending on the lens barrel shape and the like. In addition, the vignetting shape caused by the assumed shift of the telecentric characteristic between the optical system 301 and the image pickup element 302 changes in magnitude due to the shift of the relative characteristic and causes direction reversal. Therefore, the shape shown in FIG. 9 is only a schematic shape and is an approximate one that represents a change in relative size that affects the light amount difference between pixel values.

前述のように、COS4乗則による影響、および各分割瞳から見た射出瞳の大きさの違いの影響により、シェーディングが発生して1つのMLを共有する各PD間での受光量に差が生じる。その結果、均一な輝度または照度の平面を撮影しても、2分割の場合は図2(b)、4分割の場合は図2(c)に示されるように方向性を有する、空間的に不均一な諧調差を持ったシェーディングが発生する。   As described above, due to the influence of the COS-fourth law and the influence of the difference in exit pupil size seen from each divided pupil, there is a difference in the amount of light received between PDs sharing shading and sharing one ML. Arise. As a result, even if a plane with uniform luminance or illuminance is photographed, spatially having directionality as shown in FIG. 2 (b) in the case of two divisions and in FIG. 2 (c) in the case of four divisions. Shading with uneven gradation difference occurs.

図10は、画角または画像座標の変化に応じたシェーディングによる諧調変化(シェーディング特性)の説明図である。図10は、被写体が均一な輝度または照度面の場合の像のプロファイルに相当する。図10において、横軸は、画像中心を通る瞳分割方向に対する画像座標(画像の画素位置)である。図10の縦軸は、撮像素子302の各単位画素セルの瞳分割PDから得られる諧調値(または係数)である。図10(a)は、瞳分割を行わない撮像素子、または、画素加算後に対応する非瞳分割時の光学系起因の減光特性を示している。一般的なシェーディング影響により、周辺画角に行くほどに諧調値に減光作用が生じる。   FIG. 10 is an explanatory diagram of gradation change (shading characteristics) due to shading according to changes in the angle of view or image coordinates. FIG. 10 corresponds to an image profile when the subject has a uniform luminance or illuminance surface. In FIG. 10, the horizontal axis represents image coordinates (pixel position of the image) with respect to the pupil division direction passing through the center of the image. The vertical axis in FIG. 10 is a gradation value (or coefficient) obtained from the pupil division PD of each unit pixel cell of the image sensor 302. FIG. 10A shows the dimming characteristics caused by the optical system at the time of non-pupil division corresponding to an image sensor that does not perform pupil division or non-pupil division after pixel addition. Due to the general shading effect, the gradation value is dimmed as it goes to the peripheral angle of view.

図10(b)は、瞳分割時の瞳分割起因のシェーディングによる諧調変化の分布図である。ここでは、1つのMLを共有する2つのPD(2分割PD)における等輝度光を入射した場合の諧調値の分布の違いを示している。対となる一方の視差画像を視差画像1、他方を視差画像2とする。単位画素セル画素構造における左右のいずれが視差画像1または視差画像2であるかは、前述のシェーディング要因の条件により変化する。このため、図10(b)の関係は厳密ではない。横軸の同じ2曲線上のサンプリング値は、同一の画像座標の諧調差、撮像素子302の観点で言い換えれば、1つのMLを共有するPDの諧調差、または感度差を表す。PDは画像の周辺部に行くほどシェーディングの影響を受ける。このため、1つのMLを共有する複数のPDに対して等輝度光を入射した場合であっても大きな諧調差を生じる。   FIG. 10B is a distribution diagram of gradation changes due to shading caused by pupil division during pupil division. Here, a difference in gradation value distribution when isoluminous light is incident on two PDs (two-segment PDs) sharing one ML is shown. One parallax image to be paired is a parallax image 1 and the other is a parallax image 2. Which of the right and left in the unit pixel cell pixel structure is the parallax image 1 or the parallax image 2 varies depending on the condition of the shading factor described above. For this reason, the relationship of FIG.10 (b) is not exact | strict. The sampling values on the same two curves on the horizontal axis represent the gradation difference of the same image coordinates, in other words, the gradation difference of the PD sharing one ML, or the sensitivity difference from the viewpoint of the image sensor 302. The PD is affected by shading as it goes to the periphery of the image. For this reason, a large gradation difference occurs even when isoluminous light is incident on a plurality of PDs sharing one ML.

図10(c)は、シェーディングの影響による図10(a)、(b)を合成し、同時に考慮した場合のシェーディング特性である。図10(a)の非瞳分割時の光学系起因のシェーディングおよび図10(b)の瞳分割起因のシェーディングの影響は、画像中心を基準とする、少なくとも瞳分割方向の座標位置を変数とする補正係数を用いたゲイン補正により補正される。画像中心を基準とする瞳分割方向の座標位置の変数とは、具体的には、水平方向の2分割の瞳分割の場合には水平座標、水平垂直方向の4分割の瞳分割の場合には水平および垂直方向の画像座標を表す変数である。図10(d)は、図10(c)の合成シェーディング特性に対するシェーディング補正パラメータの一例である。補正パラメータを変数である画像座標の対応する諧調値に乗算することにより、シェーディング補正が実施される。シェーディング補正パラメータが図10(d)のように1以上の拡張方向に係数を持つ場合、係数によるゲイン補正と同時にスケーリングまたはビット深度の拡張を実施することが好ましい。図10(e)は、その補正結果である。視差画像間、各視差画像内でシェーディングの影響が補正され、均一な感度、言い換えれば等しい諧調特性が得られる。   FIG. 10C shows shading characteristics when FIGS. 10A and 10B due to the influence of shading are combined and considered simultaneously. The influence of the shading caused by the optical system at the time of non-pupil division in FIG. 10A and the shading caused by the pupil division in FIG. 10B uses at least the coordinate position in the pupil division direction as a variable with reference to the image center. Correction is performed by gain correction using a correction coefficient. Specifically, the variable of the coordinate position in the pupil division direction with reference to the center of the image is the horizontal coordinate in the case of pupil division in the horizontal direction, and in the case of pupil division in the horizontal and vertical direction. It is a variable that represents the image coordinates in the horizontal and vertical directions. FIG. 10D is an example of a shading correction parameter for the combined shading characteristic of FIG. Shading correction is performed by multiplying the correction parameter by the corresponding gradation value of the image coordinates as a variable. When the shading correction parameter has a coefficient in one or more expansion directions as shown in FIG. 10D, it is preferable to implement scaling or bit depth expansion simultaneously with gain correction by the coefficient. FIG. 10E shows the correction result. The effect of shading is corrected between parallax images and within each parallax image, and uniform sensitivity, in other words, equal tone characteristics are obtained.

前述の瞳分割に関するシェーディング補正パラメータ、例えば、水平座標を変数とする補正係数や水平垂直座標を変数とする補正係数は、撮像装置設計時の設計パラメータまたは撮像装置を用いた計測により作成する。補正係数は、前述の非瞳分割時の光学系起因のシェーディング特性を含んだ形でも作成可能である。   The above-described shading correction parameters relating to pupil division, for example, the correction coefficient using the horizontal coordinate as the variable and the correction coefficient using the horizontal / vertical coordinate as the variable are created by design parameters at the time of designing the imaging apparatus or by measurement using the imaging apparatus. The correction coefficient can also be created in a form including the above-described shading characteristics due to the optical system during non-pupil division.

具体的には、補正係数は、光学系301(撮影光学系)、撮像素子302、および、絞りなどを含む鏡筒構造、および、ズーム、焦点距離、絞り値などの撮影時のカメラパラメータに基づく光学計算、例えば幾何光学演算による計算により求められる。実際には、光学設計CADの機能を利用する場合が多い。まず、光学系301を設計した光学系設計CADを利用し、等照度面を撮影した場合の諧調分布からなるシェーディングデータを分割瞳毎に光線追跡により計算する。その際、鏡筒やレンズ保持部のデータも用いて、鏡筒やレンズ保持部によるケラレも考慮したシェーディングの影響を演算する。図10(c)に示されるように、図10(a)の非瞳分割時の光学系起因のシェーディングおよび図10(b)の瞳分割起因のシェーディング特性を同時に考慮したシェーディング特性が得られ、補正時に効率的な計算が実現可能である。そしてこの諧調分布を、画像中心座標を基準に等諧調となるような補正係数を水平座標または水平垂直座標を変数として分割瞳毎に算出する。前述のように、図10(d)は合成補正パラメータであり、図10(c)のシェーディング特性を補正するパラメータとして計算される。   Specifically, the correction coefficient is based on an optical system 301 (imaging optical system), an imaging element 302, a lens barrel structure including an aperture, and camera parameters at the time of imaging such as zoom, focal length, and aperture value. It is obtained by optical calculation, for example, calculation by geometrical optical calculation. In practice, the function of the optical design CAD is often used. First, by using an optical system design CAD that designs the optical system 301, shading data including a gradation distribution when an isoillumination surface is imaged is calculated for each divided pupil by ray tracing. At this time, the data of the lens barrel and the lens holding unit is also used to calculate the influence of shading in consideration of vignetting caused by the lens barrel and the lens holding unit. As shown in FIG. 10 (c), the shading characteristic due to the optical system at the time of non-pupil division in FIG. 10 (a) and the shading characteristic due to the pupil division in FIG. 10 (b) can be obtained simultaneously. An efficient calculation can be realized at the time of correction. Then, this gradation distribution is calculated for each divided pupil by using a horizontal coordinate or a horizontal / vertical coordinate as a variable as a correction coefficient that makes an equal gradation based on the image center coordinates. As described above, FIG. 10D is a composite correction parameter, and is calculated as a parameter for correcting the shading characteristics of FIG.

前述の光学系設計CADとしては、Synopsys Inc.(ORA)社開発のCODEVおよびLightTools、Radiant ZEMAX LLC.社開発のZEMAX等の製品が代表的なものとして挙げられる。これら設計CADは撮像面におけるシェーディングの影響を光線追跡に基づき計算する専用コマンドを備える。また、配線層406に起因する、より詳細なケラレ効果を考慮したシェーディング特性を計算する場合であって、特に基本機能が不足する場合、各設計ソフトに備えられたマクロ機能を利用して画素セルの構造モデルを計算に含めることにより、実現可能である。マクロにより、図4(a)に示される単位画素セル401の構造を光線追跡時に考慮できるように入力する。画素セル構造の波動光学的影響を厳密に計算する場合、連携機能を用いて有限要素法などによる構造解析可能なソフトによる計算出力を用いてシェーディングによる影響を計算する。また、補正パラメータは、撮像装置を用いた計測により作成してもよい。等照度面を撮影した際の各単位画素セルの分割瞳毎の諧調値からシェーディングデータを計測し、この諧調分布を、画像中心座標を基準に等諧調となるような補正係数を水平座標または水平垂直座標を変数として分割瞳毎に算出してもよい。   As the above-mentioned optical system design CAD, Synopsys Inc. (ORA) developed by CODEV and LightTools, Radiant ZEMAX LLC. Representative examples include products such as ZEMAX developed by the company. These design CADs have dedicated commands for calculating the effect of shading on the imaging surface based on ray tracing. In addition, when calculating shading characteristics in consideration of a more detailed vignetting effect caused by the wiring layer 406, particularly when the basic function is insufficient, a pixel cell is used by utilizing a macro function provided in each design software. This can be realized by including the following structural model in the calculation. The macro is input so that the structure of the unit pixel cell 401 shown in FIG. When the wave optical influence of the pixel cell structure is strictly calculated, the influence by shading is calculated by using a calculation output by software capable of structural analysis by a finite element method or the like using the cooperation function. The correction parameter may be created by measurement using an imaging device. The shading data is measured from the gradation value for each divided pupil of each unit pixel cell when the isoilluminance plane is imaged, and the correction coefficient that makes the gradation distribution equal to the image center coordinates is set to the horizontal coordinate or horizontal. You may calculate for every division pupil by making a perpendicular coordinate into a variable.

事前に設計CADによる計算、または測定により得られた補正パラメータは、画像処理部303に含まれる不図示のROMなどの記録部に保存される。補正パラメータは、カメラパラメータに対して代表的な組み合わせに対してのみ用意してもよく、または、全てのパラメータ変数の定義域範囲をカバーするような多次元テーブル形式で用意してもよい。   Correction parameters obtained by calculation or measurement by design CAD in advance are stored in a recording unit such as a ROM (not shown) included in the image processing unit 303. Correction parameters may be prepared only for typical combinations of camera parameters, or may be prepared in a multi-dimensional table format that covers the domain of all parameter variables.

撮像素子302のダイナミックレンジが十分広く、瞳分割数が少なく、シーンの輝度範囲が狭く、かつ撮像装置300の露出条件が適切な場合、撮影画像の諧調値はほぼ飽和することなく諧調値が得られる。このため、本実施形態のシェーディング補正により、視差画像間の諧調差が適切に補正され、視差画像間の位相差測距等が十分精度良く実現可能である。一方、撮像素子302のダイナミックレンジが狭い場合、瞳分割数が多い場合、シーンの輝度範囲が広い場合、または、撮像装置300の露出条件が低輝度部分に不適切に適応され撮影が行われた場合、画像内の高諧調部分に飽和が発生する。飽和画素に本実施形態のシェーディング補正を実施すると、視差画像の対応する画素間で逆に疑似的な諧調差を生じてしまう。   When the dynamic range of the image sensor 302 is sufficiently wide, the number of pupil divisions is small, the scene luminance range is narrow, and the exposure conditions of the imaging device 300 are appropriate, the gradation value of the captured image is obtained without being almost saturated. It is done. For this reason, the gradation difference between parallax images is appropriately corrected by the shading correction of this embodiment, and phase difference ranging between parallax images can be realized with sufficient accuracy. On the other hand, when the dynamic range of the image sensor 302 is narrow, when the number of pupil divisions is large, when the luminance range of the scene is wide, or when the exposure condition of the imaging device 300 is inappropriately applied to a low-luminance portion, shooting is performed. In this case, saturation occurs in a high gradation portion in the image. When the shading correction of the present embodiment is performed on the saturated pixels, a pseudo gradation difference is generated between the corresponding pixels of the parallax image.

図11は、シェーディング補正の際の飽和画素値の説明図であり、2分割PDの場合を例として示している。図11(a)は、本実施形態の飽和対策を行わない場合において、光電変換ユニットに含まれる2つの光電変換素子PD1、PD2の出力特性、およびPD1とPD2の出力の合成出力特性を示す。合成出力は、少なくとも光電変換素子の信号を加算することで得られる。合成出力は平均化によって取得してもよい。また、増幅などの追加処理を実施してもよい。図11は、説明のため、PD1のほうがPD2より感度が高い場合、すなわちPD1のほうがPD2よりも光が多く入力している場合を示している。   FIG. 11 is an explanatory diagram of saturated pixel values at the time of shading correction, and shows an example of a two-division PD. FIG. 11A shows the output characteristics of the two photoelectric conversion elements PD1 and PD2 included in the photoelectric conversion unit and the combined output characteristics of the outputs of PD1 and PD2 when the saturation countermeasure of this embodiment is not performed. The combined output can be obtained by adding at least the signals of the photoelectric conversion elements. The composite output may be obtained by averaging. Further, additional processing such as amplification may be performed. For the sake of explanation, FIG. 11 shows a case where the sensitivity of PD1 is higher than that of PD2, that is, PD1 receives more light than PD2.

光電変換素子PD1、PD2への入射光が範囲1101内の場合、PD1のほうがPD2よりも発生電荷が多い。PD1は未飽和のため、PD1とPD2を合成した出力は適切な出力が得られる。ところが、入射光が範囲1102内の場合、PD1が飽和してPD2が未飽和である。この場合、PD2のみが、入射光に応じて線形性を有した信号が出力される。このため、範囲1102内でシェーディング補正した信号には諧調差が生じる。このような問題に対しては、特許文献2(特開昭63−276010号公報)などにおいて、1つのMLを共有する複数のPDのうち少なくとも一つの画素が飽和画素の場合、その画素間の演算を相関演算の対象から外すという対策が提案されている。   When the incident light on the photoelectric conversion elements PD1 and PD2 is within the range 1101, the generated charge is larger in PD1 than in PD2. Since PD1 is not saturated, an appropriate output can be obtained by combining PD1 and PD2. However, when the incident light is within the range 1102, PD1 is saturated and PD2 is not saturated. In this case, only the PD 2 outputs a signal having linearity according to the incident light. For this reason, a tone difference occurs in the signal subjected to the shading correction within the range 1102. With respect to such a problem, in Patent Document 2 (Japanese Patent Laid-Open No. 63-276010) and the like, when at least one pixel among a plurality of PDs sharing one ML is a saturated pixel, there is a gap between the pixels. A countermeasure has been proposed in which the calculation is excluded from the correlation calculation target.

図12は、相関演算における飽和画素の影響の説明図である。図12(a)は、飽和領域を含む相関におけるプロファイルを示す。例えば、視差画像1(1201)および視差画像2(1202)をシフトさせつつ差分の絶対値総和演算を行い、相関を計算する。図12(a)は、シェーディング補正を行わない場合の相関演算の例である。飽和諧調画素の境界近傍の特徴が相関において良い影響を与える。しかしながら実際には、非飽和領域においてはシェーディングの影響により合焦の位相位置でも画素値に差が生じ、相関演算精度は低下する。   FIG. 12 is an explanatory diagram of the influence of saturated pixels in the correlation calculation. FIG. 12A shows a profile in the correlation including the saturation region. For example, the absolute value summation of the differences is performed while shifting the parallax image 1 (1201) and the parallax image 2 (1202), and the correlation is calculated. FIG. 12A shows an example of correlation calculation when no shading correction is performed. Features near the boundary of saturated tone pixels have a positive effect on the correlation. However, in actuality, in the non-saturated region, a difference occurs in the pixel value even at the in-focus phase position due to the influence of shading, and the correlation calculation accuracy decreases.

図12(b)は、シェーディング補正後の画素置換で相関演算を行う例である。逆に、非飽和領域においてはシェーディング補正の効果により相関演算精度は向上する。一方、飽和諧調画素の部分では、画像周辺部でシェーディング特性が異なると、等輝度または等照度物点を射影した画素の対であってもその諧調はシェーディング補正の弊害を受け、異なってしまう。   FIG. 12B is an example in which correlation calculation is performed by pixel replacement after shading correction. On the contrary, in the non-saturated region, the correlation calculation accuracy is improved by the effect of shading correction. On the other hand, if the shading characteristics of the saturated gradation pixel portion are different in the peripheral portion of the image, the gradation is affected by the shading correction even if it is a pair of pixels projected with an isoluminance or isoluminance object point.

図12(c)は、1つのMLを共有する複数のPDのうち少なくとも一つの画素が飽和画素の場合、その画素間の演算を相関演算の対象から外す場合を示している。点線部で囲まれた領域が少なくとも一方の画素が飽和している領域となる。図示されたプロファイル特性のようなテクスチャ性の低い場合、飽和領域を除くと、図12(c)のプロファイルの飽和の右側にあるような微小な特徴のみを用いて相関演算せざるを得ない状況が多くなり易い。このため、相関演算の信頼度が低下する。微小特徴は、照明変化やノイズで生じた偽対応特徴である可能性も高い。   FIG. 12C shows a case where, when at least one pixel among a plurality of PDs sharing one ML is a saturated pixel, the calculation between the pixels is excluded from the correlation calculation target. A region surrounded by a dotted line is a region where at least one pixel is saturated. When the texture characteristics are low such as the profile characteristics shown in the figure, if the saturation region is excluded, the correlation calculation must be performed using only the minute features on the right side of the saturation of the profile in FIG. Tends to increase. For this reason, the reliability of the correlation calculation decreases. There is a high possibility that the minute feature is a false correspondence feature caused by illumination change or noise.

また飽和は、1つのMLを共有する複数のPDの諧調値の総和による観賞用画像生成にも影響する。図11(a)の合成出力は、PD1が飽和する範囲1102では、PD2の出力のみに依存して諧調が変化する。結果として、合成出力は、PD2が飽和したところから、ニー特性と呼ばれる入力に対する非線形な感度特性を有する。このようなニー特性を持って取得した諧調値は、特に図5に示されるようなカラーフィルタ配列を有する撮像素子302で撮影し、後段の画像処理部でカラー画像として処理する際、色ずれ、色曲がり、色シェーディングなどと呼ばれる目立つ現象として現れる。   Saturation also affects ornamental image generation by the sum of the gradation values of a plurality of PDs sharing one ML. In the range 1102 where PD1 is saturated, the composite output of FIG. 11A changes in tone depending on only the output of PD2. As a result, the synthesized output has a non-linear sensitivity characteristic with respect to the input called the knee characteristic from the point where PD2 is saturated. The gradation value acquired with such a knee characteristic is captured by an image sensor 302 having a color filter array as shown in FIG. 5 and processed as a color image by a subsequent image processing unit. It appears as a prominent phenomenon called color bending or color shading.

そこで本実施形態は、飽和画素に対し、1つのMLを共有する少なくとも一つの非飽和画素がある場合、1つのMLを共有する非飽和の画素の諧調値により、シェーディング特性値または補正値を用いて、飽和画素値が非飽和な場合の諧調値を推定する。飽和画素とは、シェーディング補正前の諧調値について、ある閾値を超える諧調値を持つ画素である。閾値は、撮像素子に固有のノイズや信号の揺らぎ等を考慮して決定される。換言すると、1つのMLを共有するいずれかのPDが所定のレベル以上の場合、すなわち飽和とみなせる場合、所定レベルに未達の画素レベルに基づいて、飽和画素に飽和が生じない時のレベルを推定し、感度差を補正する。つまり、シェーディング補正手段は、同一の単一画素セルに含まれる分割瞳画像に対応する複数の光電変換部から得られる撮像信号のうち、少なくとも1つ以上が所定レベル以上の場合、所定レベル以上の画素を飽和とみなす。そして、所定レベルに未達の画素のレベルに基づいて、飽和画素に飽和が生じないときのレベルを推定して感度差を補正する。   Therefore, in the present embodiment, when there is at least one unsaturated pixel sharing one ML with respect to a saturated pixel, the shading characteristic value or the correction value is used depending on the gradation value of the unsaturated pixel sharing one ML. Thus, the gradation value when the saturated pixel value is not saturated is estimated. A saturated pixel is a pixel having a gradation value that exceeds a certain threshold with respect to the gradation value before shading correction. The threshold value is determined in consideration of noise inherent in the image sensor, signal fluctuation, and the like. In other words, when any PD sharing one ML is above a predetermined level, that is, when it can be regarded as saturated, the level at which saturation does not occur in a saturated pixel is determined based on the pixel level that has not reached the predetermined level. Estimate and correct sensitivity differences. In other words, the shading correction means has a predetermined level or higher when at least one of the imaging signals obtained from the plurality of photoelectric conversion units corresponding to the divided pupil images included in the same single pixel cell is equal to or higher than the predetermined level. Consider a pixel as saturated. Then, based on the level of the pixel that has not reached the predetermined level, the level at which saturation does not occur in the saturated pixel is estimated to correct the sensitivity difference.

図11(b)は、本実施形態の飽和対策の処理方法を示す図である。非飽和の低輝度の信号PD2に基づいて、飽和しているPD1の本来の諧調を推定する。等輝度または等照度の同じ被写体を投影していると想定して推定を行う。推定にはシェーディング特性情報または補正情報を用いる。一方から他方を算出可能である。同一座標の視差画像1と視差画像2のシェーディング特性データ、および、PD2の諧調値を用いて、以下の式(1)により、シェーディング補正前の諧調値を推定することができる。   FIG. 11B is a diagram illustrating a saturation countermeasure processing method according to this embodiment. Based on the non-saturated low-brightness signal PD2, the original tone of the saturated PD1 is estimated. Estimation is performed on the assumption that subjects having the same luminance or equal illuminance are projected. For the estimation, shading characteristic information or correction information is used. The other can be calculated from one. Using the shading characteristic data of the parallax image 1 and the parallax image 2 having the same coordinates, and the tone value of the PD 2, the tone value before shading correction can be estimated by the following equation (1).

ただし、実際にはシェーディング補正後の諧調値が得られればよい。このため、式(1)は以下の式(2)で表されるようにより簡単に記述される。   However, in practice, it is only necessary to obtain a gradation value after shading correction. For this reason, equation (1) is described more simply as represented by equation (2) below.

このような補正を実施することにより、図11(a)に示されるようにすぐに飽和するPD1の諧調を、より広ダイナミックレンジで計測可能となる。各視差画像を補正するため、範囲1102の入力諧調領域において、合成出力画像においても推定が反映され、図11(b)に示されるような線形特性を維持した推定合成特性が実現可能である。図中の太線が補正により得られる特性直線である。   By performing such correction, it is possible to measure the gradation of PD1, which is saturated immediately, as shown in FIG. 11A, with a wider dynamic range. In order to correct each parallax image, in the input gradation region in the range 1102, the estimation is reflected also in the synthesized output image, and an estimated synthesis characteristic maintaining a linear characteristic as shown in FIG. 11B can be realized. The thick line in the figure is a characteristic straight line obtained by correction.

しかしながら、1つのMLを共有する一部の分割瞳画素が飽和画素であるのに対し、残りの非飽和画素の信号レベルが飽和画素の信号レベルに対応する最低値に満たない場合、視差により対応しない別の物体点が投影されている可能性が高い。このため、上記方法では正しく推定することができない。図11(c)は、その場合(2分割の場合)の例を示している。高輝度側信号レベル1104が既に飽和しているのに対し、未飽和の低輝度側信号レベル1105が、シェーディング特性から推定される飽和に対応する最低諧調閾値1103に満たない場合を考える。この場合、通常シーンにおいては、該当画素は非合焦部分の異なる被写体の写像、すなわち視差が発生している可能性が高い。このため、視差が発生している画素で、分割瞳画素の一方が飽和画素である場合、上記方法で推定した値は本来の信号値とは異なる。このため、合成出力信号おいて、本来の色とは異なる色づきが発生してしまう。   However, when some of the divided pupil pixels sharing one ML are saturated pixels, the remaining non-saturated pixel signal level is less than the minimum value corresponding to the saturated pixel signal level. There is a high possibility that another object point is not projected. For this reason, it cannot estimate correctly with the said method. FIG. 11C shows an example of that case (in the case of two divisions). Consider a case where the high luminance side signal level 1104 is already saturated, whereas the unsaturated low luminance side signal level 1105 is less than the minimum gradation threshold 1103 corresponding to the saturation estimated from the shading characteristics. In this case, in a normal scene, there is a high possibility that the corresponding pixel has a mapping of a subject having a different out-of-focus portion, that is, parallax. For this reason, when the parallax is generated and one of the divided pupil pixels is a saturated pixel, the value estimated by the above method is different from the original signal value. For this reason, coloring different from the original color occurs in the combined output signal.

そこで本実施形態の撮像装置300は、分割瞳画素の一部の画素が飽和している場合、当該画素に発生している視差量に基づいて、後段の彩度抑圧手段を用いて色づきを抑える処理を行う。続いて、図17および図18を参照して、彩度抑圧手段(ゲイン設定手段)による色づきを抑える処理について説明する。   Therefore, when a part of the divided pupil pixels is saturated, the imaging apparatus 300 according to the present embodiment suppresses coloring using the subsequent saturation suppression unit based on the amount of parallax generated in the pixel. Process. Next, with reference to FIG. 17 and FIG. 18, processing for suppressing coloring by the saturation suppressing unit (gain setting unit) will be described.

図17は、本実施形態の画像処理装置の一部を構成するシェーディング補正手段および画像処理手段のブロック図である。図17において、シェーディング補正手段1700および画像処理手段1710は、それぞれ、図1中のシェーディング補正手段3033および画像処理手段3034に相当する。図18(a)は瞳分割撮像系の感度差特性の関係、図18(b)は抑圧ゲインの決定に関する説明図であり、2分割の場合を例にとり説明する。   FIG. 17 is a block diagram of a shading correction unit and an image processing unit that constitute a part of the image processing apparatus of the present embodiment. In FIG. 17, a shading correction unit 1700 and an image processing unit 1710 correspond to the shading correction unit 3033 and the image processing unit 3034 in FIG. 1, respectively. FIG. 18A is a diagram illustrating the relationship between the sensitivity difference characteristics of the pupil-divided imaging system, and FIG. 18B is an explanatory diagram regarding the determination of the suppression gain. The case of two divisions will be described as an example.

図17において、1701は飽和判定手段(判定手段)である。飽和判定手段1701は、第1の光電変換部(PD1)から得られる信号(第1の信号)および第2の光電変換部(PD2)から得られる信号(第2の信号)のそれぞれが所定のレベル(飽和レベル)に達しているか否かを判定する。すなわち飽和判定手段1701は、図1に示される瞳分割撮像系(撮像素子302)から得られる画像信号(瞳分割信号)の信号レベルが飽和しているか否かを判定する。そして飽和判定手段1701は、その判定結果(飽和判定情報)を後述する飽和補正値生成手段へ送る。1702は飽和補正値生成手段である。飽和補正値生成手段1702は、飽和判定手段1701から得られる判定結果(飽和判定情報)に基づいて、画像信号を補正するための飽和補正値を生成する。   In FIG. 17, reference numeral 1701 denotes saturation determination means (determination means). Saturation determination means 1701 is configured such that a signal (first signal) obtained from the first photoelectric conversion unit (PD1) and a signal (second signal) obtained from the second photoelectric conversion unit (PD2) are predetermined. It is determined whether the level (saturation level) has been reached. That is, the saturation determination unit 1701 determines whether or not the signal level of the image signal (pupil division signal) obtained from the pupil division imaging system (imaging element 302) shown in FIG. 1 is saturated. Then, the saturation determination unit 1701 sends the determination result (saturation determination information) to a saturation correction value generation unit described later. Reference numeral 1702 denotes a saturation correction value generation unit. The saturation correction value generation unit 1702 generates a saturation correction value for correcting the image signal based on the determination result (saturation determination information) obtained from the saturation determination unit 1701.

1703は飽和補正手段(補正手段)である。飽和補正手段1703は、飽和判定手段1701からの情報に基づいて第1の信号または第2の信号を補正する。すなわち飽和補正手段1703は、飽和補正値生成手段1702により生成された飽和補正値を用いて、画像信号(瞳分割信号)を補正する。1704はデータベースである。データベース1704は、飽和補正値を生成するために必要な、瞳分割して読み出された視差画像の同一画素部を構成する各々のPDの瞳分割撮像系に起因した感度差に関する情報が記録されている。この情報は、飽和補正値生成手段1702が飽和補正値を生成する際に利用される。   Reference numeral 1703 denotes saturation correction means (correction means). The saturation correction unit 1703 corrects the first signal or the second signal based on information from the saturation determination unit 1701. That is, the saturation correction unit 1703 corrects the image signal (pupil division signal) using the saturation correction value generated by the saturation correction value generation unit 1702. Reference numeral 1704 denotes a database. The database 1704 records information related to the sensitivity difference caused by the pupil division imaging system of each PD that constitutes the same pixel portion of the parallax image read out by dividing the pupil, which is necessary for generating the saturation correction value. ing. This information is used when the saturation correction value generation unit 1702 generates a saturation correction value.

1711は画像加算手段である。画像加算手段1711は、シェーディング補正手段1700から出力された瞳分割信号(補正後の瞳分割信号)を加算して、1つの画素信号を出力する。1712は画像信号処理手段である。画像信号処理手段1712は、例えば、ベイヤー配列補間、線形化マトリクス処理、ホワイトバランス調整、YUV変換、色差・階調・コントラスト補正、エッジ強調などの各種処理を行い、YUV信号を出力する(Y:輝度信号、UV:色差信号)。   Reference numeral 1711 denotes image addition means. The image addition unit 1711 adds the pupil division signals (corrected pupil division signals) output from the shading correction unit 1700 and outputs one pixel signal. Reference numeral 1712 denotes image signal processing means. The image signal processing unit 1712 performs various processes such as Bayer array interpolation, linearization matrix processing, white balance adjustment, YUV conversion, color difference / gradation / contrast correction, and edge enhancement, and outputs a YUV signal (Y: Luminance signal, UV: color difference signal).

1713は視差量算出手段(算出手段)である。視差量算出手段1713は、第1の光電変換部(PD1)と第2の光電変換部(PD2)との視差量を算出する。すなわち視差量算出手段1713は、瞳分割撮像系(撮像素子302)から得られる信号レベルの情報(瞳分割信号)に基づいて、視差量を算出する。1714は抑圧ゲイン算出手段である。抑圧ゲイン算出手段1714は、視差量算出手段1713により算出された視差量に基づいてゲイン(抑圧ゲイン)を算出する。   Reference numeral 1713 denotes a parallax amount calculating means (calculating means). The parallax amount calculation means 1713 calculates the parallax amount between the first photoelectric conversion unit (PD1) and the second photoelectric conversion unit (PD2). That is, the parallax amount calculation unit 1713 calculates the parallax amount based on signal level information (pupil division signal) obtained from the pupil division imaging system (imaging element 302). Reference numeral 1714 denotes a suppression gain calculation means. The suppression gain calculation unit 1714 calculates a gain (suppression gain) based on the parallax amount calculated by the parallax amount calculation unit 1713.

1715は彩度抑圧手段(ゲイン設定手段)である。彩度抑圧手段1715は、飽和判定手段1701からの情報および視差量算出手段1713からの情報に基づいて、補正後の第1の信号および第2の信号から得られた信号(UV信号などの色情報を含む信号)のレベルを低減させる。すなわち彩度抑圧手段1715は、画像信号処理手段1712から出力されたYUV信号に対して、視差量に応じて抑圧ゲイン算出手段1714により算出された抑圧ゲインをUV信号(色差信号または色信号)に乗算して出力する。   Reference numeral 1715 denotes saturation suppression means (gain setting means). The saturation suppression unit 1715 is a signal (a color such as a UV signal) obtained from the corrected first signal and second signal based on the information from the saturation determination unit 1701 and the information from the parallax amount calculation unit 1713. The level of the signal containing information). That is, the saturation suppression unit 1715 converts the suppression gain calculated by the suppression gain calculation unit 1714 according to the amount of parallax to the UV signal (color difference signal or color signal) with respect to the YUV signal output from the image signal processing unit 1712. Multiply and output.

続いて、飽和判定手段1701、視差量算出手段1713、抑圧ゲイン算出手段1714、および、彩度抑圧手段1715について詳述する。まず、飽和判定手段1701について説明する。図18(a)は、2分割の感度差特性を示したものであり、PD1、PD2の出力をそれぞれVal1、Val2とする。図18(a)はPD1の感度がPD2の感度よりも高い例を示しており、視差量が0であるならば、PD1がPD2よりも先に飽和し、そのときのVal1の値をTh1とする。また、視差量が0である場合に、Val1の値がTh1にちょうど達したときの、Val2の値をTh2とする。すなわち、このTh1とTh2の違いがPD1とPD2の感度差特性を示す。Val1がTh1に達し、かつ、Val2がTh2以上である場合、分割瞳画素の一部の画素が飽和していることになる。なお、感度差特性は像高位置に応じて変化するため、PD2の感度がPD1より高い場合がある。この場合、PD2がPD1よりも先に飽和し、そのときのVal2の値をTh2、Val1の値をTh1とすると、Val2がTh2に達し、かつ、Val1がTh1以上であるとき、分割瞳画素の一部の画素が飽和していることになる。   Next, the saturation determination unit 1701, the parallax amount calculation unit 1713, the suppression gain calculation unit 1714, and the saturation suppression unit 1715 will be described in detail. First, the saturation determination unit 1701 will be described. FIG. 18 (a) shows the sensitivity difference characteristics in two divisions, and the outputs of PD1 and PD2 are Val1 and Val2, respectively. FIG. 18A shows an example in which the sensitivity of PD1 is higher than the sensitivity of PD2. If the amount of parallax is 0, PD1 is saturated before PD2, and the value of Val1 at that time is Th1. To do. Further, when the parallax amount is 0, the value of Val2 when the value of Val1 has just reached Th1 is Th2. That is, the difference between Th1 and Th2 indicates the sensitivity difference characteristic between PD1 and PD2. When Val1 reaches Th1 and Val2 is equal to or greater than Th2, some of the divided pupil pixels are saturated. In addition, since the sensitivity difference characteristic changes according to the image height position, the sensitivity of PD2 may be higher than that of PD1. In this case, when PD2 is saturated before PD1, the value of Val2 at that time is Th2 and the value of Val1 is Th1, when Val2 reaches Th2 and Val1 is equal to or greater than Th1, the divided pupil pixels Some pixels are saturated.

続いて、視差量算出手段1713について説明する。図18(a)において、PD1の出力がTh1と同じ値であるため、PD1は飽和しており、入力信号は範囲1802内にある。この場合、PD2の出力は、感度差特性の直線上のいずれかとなるため、Th2からTh1の間の値を持つはずである。しかしながら、PD2の出力がTh2未満の場合、感度差特性に沿わない信号がPD1とPD2に入射されている、すなわち視差が発生している可能性が高いと判定することができる。また、どれだけ視差が発生しているかを示す視差量は、飽和レベルからどれだけ離れているかということ、すなわち差分量(Th2−Val2)と定義することができる。この値が正で大きいほど視差が大きく発生していることを示し、負の値であれば視差が発生していないこととなる。なお、PD2の出力がTh2からTh1の間の値である場合、視差が発生している可能性が全くないとはいえないが、ここでは、確実に視差が発生していると判定できるものを視差が発生していると定義する。ただし本実施形態はこれに限定されるものではなく、その可能性を考慮して判定するように構成ことも可能である。   Next, the parallax amount calculation unit 1713 will be described. In FIG. 18A, since the output of PD1 is the same value as Th1, PD1 is saturated and the input signal is within a range 1802. In this case, since the output of PD2 is one on the sensitivity difference characteristic line, it should have a value between Th2 and Th1. However, when the output of PD2 is less than Th2, it can be determined that there is a high possibility that a signal that does not conform to the sensitivity difference characteristic is incident on PD1 and PD2, that is, a parallax has occurred. Further, the amount of parallax indicating how much parallax is generated can be defined as how far away from the saturation level, that is, the difference amount (Th2-Val2). A positive value indicates a larger parallax, and a negative value indicates that no parallax has occurred. In addition, when the output of PD2 is a value between Th2 and Th1, it cannot be said that there is no possibility of occurrence of parallax. It is defined that parallax occurs. However, the present embodiment is not limited to this, and it is possible to make a determination in consideration of the possibility.

続いて、抑圧ゲイン算出手段1714について説明する。図18(b)は、横軸に視差量(Th2−Val2)、縦軸に抑圧ゲイン(gain)の関係を示す図である。Th2は、PD2の飽和レベルであり、像高位置に応じて決定される。PD2の出力(Val2)がTh2より小さい場合、すなわち(Th2−Val2)が正の場合、視差が発生している可能性が高いため、抑圧を行うように制御する。具体的には、視差量が大きいほど色づきが大きいと仮定し、(Th2−Val2)が大きくなるにつれて、抑圧ゲインを0に近づけるように制御する。一方、(Th2−Val2)が負の場合、視差が発生している可能性が低いため、抑圧ゲインを1にする。すなわち、この場合には何も処理を行わないように制御する。また、前述のように、Th2は像高位置に応じて変化する。このため、Val2が同じでも像高位置によって、抑圧ゲインは変化する。また、視差が発生している状況では必ず誤推定による色づきが発生すると考え、視差量に応じて抑圧ゲインを変化させることのほか、(Th2−Val2)が正の場合、ゲインを0にして強制的に彩度を抑圧するようにしてもよい。   Next, the suppression gain calculation unit 1714 will be described. FIG. 18B is a diagram illustrating the relationship between the parallax amount (Th2-Val2) on the horizontal axis and the suppression gain (gain) on the vertical axis. Th2 is the saturation level of PD2, and is determined according to the image height position. When the output (Val2) of PD2 is smaller than Th2, that is, when (Th2-Val2) is positive, since there is a high possibility that parallax has occurred, control is performed to perform suppression. More specifically, it is assumed that the larger the amount of parallax, the greater the coloring, and the suppression gain is controlled to approach 0 as (Th2-Val2) increases. On the other hand, when (Th2-Val2) is negative, since the possibility that parallax has occurred is low, the suppression gain is set to 1. That is, in this case, control is performed so that no processing is performed. Further, as described above, Th2 changes according to the image height position. For this reason, even if Val2 is the same, the suppression gain changes depending on the image height position. In addition, in the situation where parallax occurs, it is considered that coloring due to erroneous estimation always occurs, and in addition to changing the suppression gain according to the amount of parallax, if (Th2-Val2) is positive, the gain is set to 0 and forced Alternatively, saturation may be suppressed.

続いて、彩度抑圧手段1715について説明する。彩度抑圧手段1715は、画像信号処理手段1712から出力されるYUV信号に対して、抑圧ゲイン算出手段1714にて算出された抑圧ゲイン(gain)に基づき、色差信号であるUV信号に対して抑圧ゲインを乗算して出力する。   Next, the saturation suppression unit 1715 will be described. The saturation suppression unit 1715 suppresses the UV signal that is a color difference signal based on the suppression gain (gain) calculated by the suppression gain calculation unit 1714 for the YUV signal output from the image signal processing unit 1712. Multiply the gain and output.

なお、前述の各処理は画素単位で行っているが、抑圧処理を行う画素と行わない画素が連続する場合、不自然な画像となる可能性もある。このため、周辺画素を考慮して抑圧処理を行うようにしてもよい。図14は、周辺画素を考慮した抑圧の説明図である。図14のN×Nの領域内において、片方画素が飽和して視差が発生している画素が1画素でも存在する場合、N×N領域内の画素全てに対して抑圧処理を行うようにしてもよい。その際、抑圧ゲインはN×N領域内の各画素で算出したゲイン値の最小値、最大値、または平均値などを用いる。このように彩度抑圧手段1715は、第1の信号(PD1)および第2の信号(PD2)のいずれも所定のレベルに達していなくても、周囲の複数の光電変換部に視差が生じている場合、色情報を含む信号のレベルを低減させるようにすることができる。   Note that each of the above-described processes is performed in units of pixels. However, if the pixels for which the suppression process is performed and the pixels for which the suppression process is not performed are consecutive, an unnatural image may be generated. For this reason, suppression processing may be performed in consideration of surrounding pixels. FIG. 14 is an explanatory diagram of suppression in consideration of surrounding pixels. In the N × N region of FIG. 14, if even one pixel is saturated and parallax occurs, the suppression process is performed on all the pixels in the N × N region. Also good. At this time, the suppression gain uses a minimum value, a maximum value, an average value, or the like of gain values calculated for each pixel in the N × N region. As described above, the saturation suppression unit 1715 generates parallax in a plurality of surrounding photoelectric conversion units even when neither the first signal (PD1) nor the second signal (PD2) has reached a predetermined level. If so, the level of the signal including color information can be reduced.

次に、図15を参照して、本実施形態における撮像装置の制御方法について説明する。図15は、撮像装置の制御方法を示すフローチャートである。ここでは、図17と同様に、2分割PDの場合を例として説明する。図15の各ステップは、主に、画像処理部303のシェーディング補正手段3033や画像処理手段3034の各要素により実施される。   Next, with reference to FIG. 15, a control method of the imaging apparatus in the present embodiment will be described. FIG. 15 is a flowchart illustrating a method for controlling the imaging apparatus. Here, as in FIG. 17, a case of a two-segment PD will be described as an example. Each step in FIG. 15 is mainly performed by each element of the shading correction unit 3033 and the image processing unit 3034 of the image processing unit 303.

まずステップS1501において、飽和判定手段1701は、光電変換素子PD1、PD2の飽和判定を行う。そしてステップS1502において、飽和判定手段1701は、PD1、PD2の画素値(Val1、Val2)が両方とも飽和しているか否かを判定する。両方とも飽和している場合、ステップS1504へ移行し、飽和補正手段1703は瞳分割信号に対して補正を行わない。そしてステップS1508へ移行する。一方、ステップS1502にてPD1、PD2の少なくとも一方が飽和していない場合、ステップS1503へ移行する。   First, in step S1501, the saturation determination unit 1701 performs saturation determination on the photoelectric conversion elements PD1 and PD2. In step S1502, the saturation determination unit 1701 determines whether or not the pixel values (Val1, Val2) of PD1 and PD2 are both saturated. If both are saturated, the process proceeds to step S1504, and the saturation correction unit 1703 does not correct the pupil division signal. Then, control goes to a step S1508. On the other hand, if at least one of PD1 and PD2 is not saturated in step S1502, the process proceeds to step S1503.

ステップS1503において、飽和判定手段1701は、PD1、PD2の画素値(Val1,Val2)が両方とも飽和していないか否かを判定する。両方とも飽和していない場合、ステップS1505へ移行し、飽和補正手段1703は通常のシェーディング補正を行い、ステップS1508へ移行する。一方、ステップS1503にてPD1、PD2のいずれか一方のみが飽和している場合、ステップS1506へ移行する。   In step S1503, the saturation determination unit 1701 determines whether or not the pixel values (Val1, Val2) of PD1 and PD2 are both saturated. If neither is saturated, the process proceeds to step S1505, and the saturation correction unit 1703 performs normal shading correction, and then proceeds to step S1508. On the other hand, if only one of PD1 and PD2 is saturated in step S1503, the process proceeds to step S1506.

ステップS1506において、PD1が飽和している場合、飽和補正手段1703は、飽和しているPD1の画素値を、飽和していないPD2の画素値から推定する。そしてステップS1507において、視差量算出手段1713は、視差量(Th2−Val2)を算出し、ステップS1508へ移行する。   When PD1 is saturated in step S1506, the saturation correction unit 1703 estimates the pixel value of PD1 that is saturated from the pixel value of PD2 that is not saturated. In step S1507, the parallax amount calculating unit 1713 calculates the parallax amount (Th2-Val2), and the process proceeds to step S1508.

ステップS1508において、画像加算手段1711および画像信号処理手段1712は、各分岐の出力に対して、瞳分割画素の加算やYCC変換などの各種の画像処理を行う。続いてステップS1509において、抑圧ゲイン算出手段1714は、視差量に応じて抑圧ゲインを決定(算出)する。ここで、PD1、PD2が両方とも飽和している、または、両方とも飽和していない場合、抑圧ゲインは1.0(すなわち抑圧しない)に設定される。一方の画素が飽和している場合(本実施形態では、PD1のみ飽和している場合)、抑圧ゲイン算出手段1714は、ステップS1507にて算出された視差量に応じて抑圧ゲインを算出する。続いてステップS1510において、彩度抑圧手段1715は、ステップS1509にて決定された抑圧ゲインを用いて、画像信号処理手段1712の出力信号(UV信号)に対して、彩度を抑圧する処理を行う。   In step S1508, the image addition unit 1711 and the image signal processing unit 1712 perform various types of image processing such as addition of pupil division pixels and YCC conversion on the output of each branch. In step S1509, the suppression gain calculation unit 1714 determines (calculates) a suppression gain according to the amount of parallax. Here, when both PD1 and PD2 are saturated or both are not saturated, the suppression gain is set to 1.0 (that is, not suppressed). When one pixel is saturated (in this embodiment, only PD1 is saturated), the suppression gain calculation unit 1714 calculates the suppression gain according to the parallax amount calculated in step S1507. Subsequently, in step S1510, the saturation suppression unit 1715 performs a process of suppressing the saturation on the output signal (UV signal) of the image signal processing unit 1712 using the suppression gain determined in step S1509. .

このように本実施形態において、彩度抑圧手段1715(ゲイン設定手段)は、飽和判定手段1701からの情報および視差量算出手段1713からの情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させる。好ましくは、彩度抑圧手段1715は、第1の信号および第2の信号の一方が所定のレベルに達している場合、視差量に基づいて、色情報を含む信号のレベルを低減させる。また好ましくは、色情報を含む信号は、補正後の第1の信号と第2の信号との加算信号(画像加算手段1711の出力信号)から得られた色信号または色差信号(UV信号)である。より好ましくは、彩度抑圧手段1715は、視差量が大きいほど色情報を含む信号のレベルが小さくなるように、この信号に対してゲインを乗算する。   Thus, in this embodiment, the saturation suppression unit 1715 (gain setting unit) is based on the information from the saturation determination unit 1701 and the information from the parallax amount calculation unit 1713, and the corrected first signal and second The level of the signal including color information obtained from the above signal is reduced. Preferably, the saturation suppression unit 1715 reduces the level of the signal including color information based on the amount of parallax when one of the first signal and the second signal has reached a predetermined level. Preferably, the signal including color information is a color signal or a color difference signal (UV signal) obtained from an addition signal (output signal of the image addition means 1711) of the corrected first signal and the second signal. is there. More preferably, the saturation suppression unit 1715 multiplies this signal by a gain so that the level of the signal including color information decreases as the amount of parallax increases.

好ましくは、飽和補正手段1703は、第1の光電変換部および第2の光電変換部に入射する光束の主光線の入射角度に起因して生じる、第1の信号と第2の信号との感度差を補正する。より好ましくは、飽和補正手段1703は、第1の信号および第2の信号の一方が所定のレベルに達している場合、第1の信号および第2の信号の他方に基づいて第1の信号および第2の信号の一方の本来のレベルを推定し、感度差を補正する。   Preferably, the saturation correction unit 1703 has a sensitivity between the first signal and the second signal generated due to the incident angle of the principal ray of the light beam incident on the first photoelectric conversion unit and the second photoelectric conversion unit. Correct the difference. More preferably, when one of the first signal and the second signal has reached a predetermined level, the saturation correction unit 1703 determines the first signal and the second signal based on the other of the first signal and the second signal. The original level of one of the second signals is estimated and the sensitivity difference is corrected.

好ましくは、視差量算出手段1713は、第1の信号および第2の信号の他方のレベルが、感度差に基づいて決定される第2のレベル(Th2)よりも小さい場合、視差が発生していると判定する。より好ましくは、視差量は、第1の信号および第2の信号の他方のレベルと、第2のレベルとの差(Th2−Val2)である。また好ましくは、飽和判定手段1701は、第1の信号または第2の信号が所定のレベルに達している場合、第1の信号または第の2の信号は飽和レベルに達していると判定する。   Preferably, when the other level of the first signal and the second signal is smaller than the second level (Th2) determined based on the sensitivity difference, the parallax amount calculating unit 1713 generates a parallax. It is determined that More preferably, the parallax amount is a difference (Th2−Val2) between the other level of the first signal and the second signal and the second level. Preferably, the saturation determination unit 1701 determines that the first signal or the second signal has reached a saturation level when the first signal or the second signal has reached a predetermined level.

本実施形態によれば、瞳分割画素のいずれか一方が飽和している場合、飽和していない画素から推定する際に、視差が発生していることで生じる色づきを抑圧(低減)することができる。   According to the present embodiment, when any one of the pupil-divided pixels is saturated, it is possible to suppress (reduce) coloring caused by the occurrence of parallax when estimating from a pixel that is not saturated. it can.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。本実施形態の視差量算出手段1713は、測距情報を用いて視差量を算出する。図13は、多点位相差測距における相関演算を説明する図である。図13(a)は、視差画像群に含まれる一つの視差画像に写る被写体を示す。それぞれ画像の下側の被写体Aが遠景被写体、中央の被写体Bがピント位置の被写体、上側の被写体Cが近景の被写体であるとする。図13(b)は、測距点、測距領域、測距の相関に利用する画素の関係を示す図である。相対的に大きい黒丸が測距点である。測距点は、測距情報の基準となる点であり、画素値ベースの相関演算の特性から測距領域の略中心に位置する。測距領域(多点測距領域)は、測距点の測距に関わる画素のグループ領域であり、太線の四角で囲まれたエリアである。そして、測距領域内の小黒丸が相関演算に用いられる画素を表している。測距に用いる画素は、計算効率向上のため、例えば、加算または間引取得してもよい。また、近傍の異なるカラーフィルタの同一瞳に対応する画素値を重み付け加算して、輝度画素情報として取得してもよい。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. The parallax amount calculation means 1713 of the present embodiment calculates the parallax amount using the distance measurement information. FIG. 13 is a diagram for explaining correlation calculation in multipoint phase difference ranging. FIG. 13A shows a subject that appears in one parallax image included in the parallax image group. Assume that the lower-side subject A is a distant subject, the center subject B is a focus subject, and the upper subject C is a foreground subject. FIG. 13B is a diagram illustrating a relationship between a distance measurement point, a distance measurement area, and pixels used for correlation of distance measurement. A relatively large black circle is a distance measuring point. The distance measuring point is a reference point of distance measuring information, and is located at the approximate center of the distance measuring area from the characteristics of the correlation calculation based on the pixel value. The distance measurement area (multi-point distance measurement area) is a group area of pixels related to distance measurement of the distance measurement points, and is an area surrounded by a thick-line square. A small black circle in the distance measurement area represents a pixel used for correlation calculation. The pixels used for distance measurement may be acquired or thinned out, for example, to improve calculation efficiency. Alternatively, pixel values corresponding to the same pupil of different color filters in the vicinity may be weighted and added to obtain luminance pixel information.

このようにして、測距領域毎に左目画像と右目画像の相関演算を行い、図13(c)に示されるような画素のずれ量を算出することができる。ずれ量が所定の閾値より大きい領域に含まれる画素は、視差が発生している可能性が高いと判定することができる。そこで、このずれ量を視差量として、視差量に応じた抑圧ゲインを決定することも可能である。なお、ずれ量は画像の撮像が終了した時点で確定するため、次に撮像される画像に対して抑圧ゲインをかけることになる。   In this manner, the correlation calculation between the left eye image and the right eye image is performed for each distance measurement area, and the pixel shift amount as shown in FIG. 13C can be calculated. It can be determined that a pixel included in a region where the amount of deviation is larger than a predetermined threshold is highly likely to have parallax. Therefore, it is also possible to determine a suppression gain according to the amount of parallax using the amount of deviation as the amount of parallax. Since the amount of deviation is determined when the image capturing is completed, a suppression gain is applied to the next captured image.

このように本実施形態において、視差量算出手段1713は、第1の光電変換部(PD1)および第2の光電変換部(PD2)から得られた測距情報に基づいて視差量を算出する。好ましくは、測距情報は、第1の信号および第2の信号に基づいて算出されたデフォーカス量(ずれ量)である。   As described above, in this embodiment, the parallax amount calculation unit 1713 calculates the parallax amount based on the distance measurement information obtained from the first photoelectric conversion unit (PD1) and the second photoelectric conversion unit (PD2). Preferably, the distance measurement information is a defocus amount (deviation amount) calculated based on the first signal and the second signal.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。図16は、本実施形態における撮像装置300aのブロック図である。本実施形態の撮像装置300aは、データベース部305を備えている点で、第1の実施形態の撮像装置300とは異なる。データベース部305は、飽和補正手段1703により利用される情報(シェーディング特性、補正値、補正パラメータなどの補正に関する情報)を保持する。
(Third embodiment)
Next, a third embodiment of the present invention will be described. FIG. 16 is a block diagram of the imaging apparatus 300a in the present embodiment. The imaging device 300a of the present embodiment is different from the imaging device 300 of the first embodiment in that it includes a database unit 305. The database unit 305 holds information used by the saturation correction unit 1703 (information regarding correction such as shading characteristics, correction values, and correction parameters).

第1の実施形態では、シェーディング特性または補正パラメータを、画像処理部303に含まれる不図示のROMなどの記録部に保存する。しかし、例えば高精度化を目的として、フォーカス距離、ズーム、絞り設定値などのカメラパラメータに対して細かいサンプリングで記録しようとすると、特性および補正パラメータの記録量は線形的に増大する性質がある。これは、シェーディング特性や射出瞳の見た目の大きさは、MLを共有する複数のPDへの光束の入射角度、すなわち画素部に対する光学系の主点位置の幾何学的位置関係や射出瞳の大きさ(焦点距離や絞りなどのカメラパラメータの状態)に依存するためである。   In the first embodiment, shading characteristics or correction parameters are stored in a recording unit such as a ROM (not shown) included in the image processing unit 303. However, for example, when recording is performed with fine sampling with respect to camera parameters such as a focus distance, zoom, and aperture setting value for the purpose of increasing accuracy, the recording amount of characteristics and correction parameters has a property of increasing linearly. This is because the shading characteristics and the apparent size of the exit pupil depend on the incident angle of the light beam to a plurality of PDs sharing the ML, that is, the geometrical positional relationship of the principal point position of the optical system with respect to the pixel unit and the size of the exit pupil. This is because it depends on (state of camera parameters such as focal length and aperture).

また、特性および補正パラメータは、ズーム範囲が広い場合には非常大きくなる。また光学系301が交換レンズの場合、交換レンズに対応する特性および補正パラメータを予め記録しておく、後から更新する、または、ネットワークなどから必要時に取得するなどの対応が必要となる。データベース部305は、このような対策を行う処理部である。このため、データベース部305は、ROMまたはRAMにより構成される。またデータベース部305は、不図示の外部I/F、例えばSDカードスロット経由でデータを更新し、または、無線LANなどのネットワークにより必要なデータを取得可能な手段である。CPU304は、データベース部305に、撮像装置300aのその時点のカメラパラメータを入力し、撮影状態に合致したシェーディング特性または補正値を取得する。そしてCPU304は、取得したシェーディング特性または補正値データを画像処理部303に伝送する。画像処理部303は、CPU304から受け取ったシェーディング特性または補正値データを、シェーディング補正に利用する。   Also, the characteristics and correction parameters become very large when the zoom range is wide. Further, when the optical system 301 is an interchangeable lens, it is necessary to take measures such as recording characteristics and correction parameters corresponding to the interchangeable lens in advance, updating them later, or obtaining them from a network or the like when necessary. The database unit 305 is a processing unit that performs such countermeasures. For this reason, the database unit 305 is configured by a ROM or a RAM. The database unit 305 is a means that can update data via an external I / F (not shown), for example, an SD card slot, or obtain necessary data via a network such as a wireless LAN. The CPU 304 inputs the camera parameters at that time of the imaging apparatus 300a to the database unit 305, and acquires shading characteristics or correction values that match the shooting state. Then, the CPU 304 transmits the acquired shading characteristics or correction value data to the image processing unit 303. The image processing unit 303 uses the shading characteristics or correction value data received from the CPU 304 for shading correction.

本実施形態によれば、より高精度な補正を低リソースで実現することができる。また、交換レンズの対応を容易にすることが可能となる。   According to the present embodiment, more accurate correction can be realized with low resources. In addition, it is possible to facilitate the correspondence of the interchangeable lens.

(その他の実施形態)
本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウエア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。この場合、撮像装置の制御方法の手順が記述されたコンピュータで実行可能なプログラムおよびそのプログラムを記憶した記憶媒体は本発明を構成する。
(Other embodiments)
The present invention is also realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the program. To be executed. In this case, a computer-executable program describing the procedure of the imaging apparatus control method and a storage medium storing the program constitute the present invention.

各実施形態によれば、焦点検出精度の向上および高画質画像の取得が可能な画像処理装置、撮像装置、画像処理方法、プログラム、および、記憶媒体を提供することができる。   According to each embodiment, it is possible to provide an image processing device, an imaging device, an image processing method, a program, and a storage medium that can improve focus detection accuracy and acquire a high-quality image.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

例えば、各実施形態では、1つのマイクロレンズを共有する複数の光電変換部として、2つの光電変換部(2分割PD)または4つの光電変換部(4分割PD)の場合について説明しているが、これらに限定されるものではない。他の分割数であってもよい。   For example, in each embodiment, the case of two photoelectric conversion units (2-division PD) or four photoelectric conversion units (4-division PD) is described as a plurality of photoelectric conversion units sharing one microlens. However, it is not limited to these. Other division numbers may be used.

303 画像処理部(画像処理装置)
1701 飽和判定手段(判定手段)
1703 飽和補正手段(補正手段)
1713 視差量算出手段(算出手段)
1715 彩度抑圧手段(ゲイン設定手段)
303 Image processing unit (image processing apparatus)
1701 Saturation determination means (determination means)
1703 Saturation correction means (correction means)
1713 Parallax amount calculation means (calculation means)
1715 Saturation suppression means (gain setting means)

Claims (17)

1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子から出力される画像信号を処理する画像処理装置であって、
前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定手段と、
前記判定手段からの情報に基づいて前記第1の信号または前記第2の信号を補正する補正手段と、
前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出手段と、
前記判定手段からの情報および前記算出手段からの情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるゲイン設定手段と、を有し、
前記ゲイン設定手段は、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させることを特徴とする画像処理装置。
An image processing apparatus that processes an image signal output from an imaging device including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens,
Determining means for determining whether or not each of the first signal obtained from the first photoelectric conversion unit and the second signal obtained from the second photoelectric conversion unit has reached a predetermined level;
Correction means for correcting the first signal or the second signal based on information from the determination means;
Calculating means for calculating a parallax amount between the first photoelectric conversion unit and the second photoelectric conversion unit;
Gain setting means for reducing the level of the signal including color information obtained from the corrected first signal and second signal based on the information from the determination means and the information from the calculation means. And
The gain setting means reduces the level of the signal including the color information based on the amount of parallax when one of the first signal and the second signal has reached the predetermined level. A featured image processing apparatus.
前記色情報を含む信号は、補正後の前記第1の信号と前記第2の信号との加算信号から得られた色差信号であることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the signal including color information is a color difference signal obtained from an addition signal of the corrected first signal and the second signal. 前記ゲイン設定手段は、前記視差量が大きいほど前記色情報を含む信号の前記レベルが小さくなるように、該信号に対してゲインを乗算することを特徴とする請求項1または2に記載の画像処理装置。 Said gain setting means, as the level of the signal including the color information about the amount of parallax is large is small, the image according to claim 1 or 2, characterized in that multiplying the gain with respect to the signal Processing equipment. 前記補正手段は、前記第1の光電変換部および前記第2の光電変換部に入射する光束の主光線の入射角度に起因して生じる、前記第1の信号と前記第2の信号との感度差を補正することを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The correction means is a sensitivity between the first signal and the second signal, which is generated due to an incident angle of a principal ray of a light beam incident on the first photoelectric conversion unit and the second photoelectric conversion unit. the image processing apparatus according to any one of claims 1 to 3, characterized in that to correct the difference. 前記補正手段は、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、該第1の信号および該第2の信号の他方に基づいて該第1の信号および該第2の信号の一方の本来のレベルを推定し、前記感度差を補正することを特徴とする請求項に記載の画像処理装置。 When one of the first signal and the second signal has reached the predetermined level, the correcting means determines the first signal based on the other of the first signal and the second signal. The image processing apparatus according to claim 4 , wherein the original level of one of the second signals is estimated to correct the sensitivity difference. 前記算出手段は、前記第1の信号および前記第2の信号の他方のレベルが、前記感度差に基づいて決定される第2のレベルよりも小さい場合、視差が発生していると判定することを特徴とする請求項またはに記載の画像処理装置。 The calculating means determines that a parallax has occurred when the other level of the first signal and the second signal is smaller than a second level determined based on the sensitivity difference. the image processing apparatus according to claim 4 or 5, characterized in. 前記視差量は、前記第1の信号および前記第2の信号の他方のレベルと、前記第2のレベルとの差であることを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 6 , wherein the amount of parallax is a difference between the other level of the first signal and the second signal and the second level. 前記算出手段は、前記第1の光電変換部および前記第2の光電変換部から得られた測距情報に基づいて前記視差量を算出することを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The calculating means is any one of claims 1 to 7, characterized in that calculating the parallax amount on the basis of the first photoelectric conversion unit and distance measurement information obtained from the second photoelectric conversion unit The image processing apparatus according to item. 前記ゲイン設定手段は、前記第1の信号および前記第2の信号のいずれも前記所定のレベルに達していなくても、周囲の複数の光電変換部に視差が生じている場合、前記色情報を含む信号のレベルを低減させることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 If the parallax occurs in a plurality of surrounding photoelectric conversion units even if neither of the first signal and the second signal has reached the predetermined level, the gain setting means may change the color information. the image processing apparatus according to any one of claims 1 to 8, wherein reducing the level of a signal including. 1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子と、
前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定手段と、
前記判定手段からの情報に基づいて前記第1の信号または前記第2の信号を補正する補正手段と、
前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出手段と、
前記判定手段からの情報および前記算出手段からの情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるゲイン設定手段と、を有し、
前記ゲイン設定手段は、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させることを特徴とする撮像装置。
An image pickup device including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens;
Determining means for determining whether or not each of the first signal obtained from the first photoelectric conversion unit and the second signal obtained from the second photoelectric conversion unit has reached a predetermined level;
Correction means for correcting the first signal or the second signal based on information from the determination means;
Calculating means for calculating a parallax amount between the first photoelectric conversion unit and the second photoelectric conversion unit;
Gain setting means for reducing the level of the signal including color information obtained from the corrected first signal and second signal based on the information from the determination means and the information from the calculation means. And
The gain setting means reduces the level of the signal including the color information based on the amount of parallax when one of the first signal and the second signal has reached the predetermined level. An imaging device that is characterized.
前記第1の光電変換部および前記第2の光電変換部は、撮影光学系の射出瞳のうち互いに異なる領域を通過する光束を受光するように構成されていることを特徴とする請求項10に記載の撮像装置。 It said first photoelectric conversion unit and the second photoelectric conversion unit, to claim 10, characterized in that it is configured to receive light beams passing through different areas of the exit pupil of the photographing optical system The imaging device described. 前記第1の信号と前記第2の信号とを加算する加算手段を更に有し、
前記色情報を含む信号は、前記加算手段により加算された加算信号に基づいて生成されることを特徴とする請求項10または11に記載の撮像装置。
An adder for adding the first signal and the second signal;
The imaging apparatus according to claim 10 or 11 , wherein the signal including the color information is generated based on an addition signal added by the addition unit.
補正後の前記第1の信号および前記第2の信号に基づいて測距処理を行う測距手段を更に有することを特徴とする請求項10乃至12のいずれか1項に記載の撮像装置。 The imaging apparatus according to any one of claims 10 to 12, further comprising a distance measuring unit for performing distance measurement processing based on the first signal and the second signal after the correction. 前記補正手段により利用される情報を保持するデータベース部を更に有することを特徴とする請求項10乃至13のいずれか1項に記載の撮像装置。 The imaging apparatus according to any one of claims 10 to 13, further comprising a database unit that holds information used by the correction means. 1つのマイクロレンズを共有する第1の光電変換部および第2の光電変換部を含む撮像素子から出力される画像信号を処理する画像処理方法であって、
前記第1の光電変換部から得られる第1の信号および前記第2の光電変換部から得られる第2の信号のそれぞれが所定のレベルに達しているか否かを判定する判定ステップと、
前記判定ステップにて得られた情報に基づいて前記第1の信号または前記第2の信号を補正する補正ステップと、
前記第1の光電変換部と前記第2の光電変換部との視差量を算出する算出ステップと、
前記判定ステップにて得られた情報および前記算出ステップにて得られた情報に基づいて、補正後の第1の信号および第2の信号から得られた色情報を含む信号のレベルを低減させるようにゲインを設定する設定ステップと、を有し、
前記設定ステップは、前記第1の信号および前記第2の信号の一方が前記所定のレベルに達している場合、前記視差量に基づいて、前記色情報を含む信号のレベルを低減させることを特徴とする画像処理方法。
An image processing method for processing an image signal output from an imaging device including a first photoelectric conversion unit and a second photoelectric conversion unit sharing one microlens,
A determination step of determining whether or not each of the first signal obtained from the first photoelectric conversion unit and the second signal obtained from the second photoelectric conversion unit has reached a predetermined level;
A correction step of correcting the first signal or the second signal based on the information obtained in the determination step;
A calculation step of calculating a parallax amount between the first photoelectric conversion unit and the second photoelectric conversion unit;
Based on the information obtained in the determination step and the information obtained in the calculation step, the level of the signal including color information obtained from the corrected first signal and second signal is reduced. a setting step of setting the gain, the possess to,
In the setting step, when one of the first signal and the second signal reaches the predetermined level, the level of the signal including the color information is reduced based on the parallax amount. An image processing method.
請求項15に記載の画像処理方法をコンピュータに実行させるように構成されていることを特徴とするプログラム。 A program configured to cause a computer to execute the image processing method according to claim 15 . 請求項16に記載のプログラムを記憶していることを特徴とする記憶媒体。 A storage medium storing the program according to claim 16 .
JP2014039319A 2014-02-28 2014-02-28 Image processing apparatus, imaging apparatus, image processing method, program, and storage medium Active JP6362070B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014039319A JP6362070B2 (en) 2014-02-28 2014-02-28 Image processing apparatus, imaging apparatus, image processing method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014039319A JP6362070B2 (en) 2014-02-28 2014-02-28 Image processing apparatus, imaging apparatus, image processing method, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2015163915A JP2015163915A (en) 2015-09-10
JP6362070B2 true JP6362070B2 (en) 2018-07-25

Family

ID=54186870

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014039319A Active JP6362070B2 (en) 2014-02-28 2014-02-28 Image processing apparatus, imaging apparatus, image processing method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP6362070B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6971685B2 (en) * 2017-08-02 2021-11-24 キヤノン株式会社 Imaging device and its control method
JP7023701B2 (en) * 2017-12-18 2022-02-22 キヤノン株式会社 Imaging equipment and programs
JPWO2022130662A1 (en) * 2020-12-17 2022-06-23

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002262300A (en) * 2001-03-02 2002-09-13 Canon Inc Imaging unit and imaging method
JP5943655B2 (en) * 2012-03-12 2016-07-05 キヤノン株式会社 Image processing apparatus, focus detection apparatus, and image processing program

Also Published As

Publication number Publication date
JP2015163915A (en) 2015-09-10

Similar Documents

Publication Publication Date Title
JP6643122B2 (en) Range image apparatus, imaging apparatus, and range image correction method
US10393996B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and storage medium
US8947585B2 (en) Image capturing apparatus, image processing method, and storage medium
JP6786225B2 (en) Image processing equipment, imaging equipment and image processing programs
JP2007304525A (en) Image input device, electronic equipment, and image input method
JP6800650B2 (en) Reliability generator, reliability generator, and imaging device
JP6353233B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP6700986B2 (en) Image processing device, imaging device, image processing method, and program
JP6095266B2 (en) Image processing apparatus and control method thereof
JP6544978B2 (en) Image output apparatus, control method therefor, imaging apparatus, program
US9538074B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP2015046019A (en) Image processing device, imaging device, imaging system, image processing method, program, and storage medium
US20170359500A1 (en) Control apparatus, image capturing apparatus, control method, and non-transitory computer-readable storage medium
JP6494416B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP2016200703A (en) Focus detection device, control method therefor, image capturing device, program, and storage medium
JP6682184B2 (en) Image processing method, image processing program, image processing device, and imaging device
US20160255294A1 (en) Image capturing apparatus and image processing apparatus
JP5906139B2 (en) Correction apparatus, program thereof, and stereoscopic imaging system
JP5743769B2 (en) Image processing apparatus and image processing method
US11295464B2 (en) Shape measurement device, control method, and recording medium
JP5526984B2 (en) Image processing apparatus, image processing method, computer program for image processing, and imaging apparatus
JP6652294B2 (en) Image processing device, imaging device, image processing method, program, and storage medium
JP2005216191A (en) Stereo image processing apparatus and method
JP2018110299A (en) Image processing method, image processing 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: 20170221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171121

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180116

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180619

R151 Written notification of patent or utility model registration

Ref document number: 6362070

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151