JP2013229766A - Image processing apparatus, image pickup apparatus and image processing program - Google Patents

Image processing apparatus, image pickup apparatus and image processing program Download PDF

Info

Publication number
JP2013229766A
JP2013229766A JP2012100476A JP2012100476A JP2013229766A JP 2013229766 A JP2013229766 A JP 2013229766A JP 2012100476 A JP2012100476 A JP 2012100476A JP 2012100476 A JP2012100476 A JP 2012100476A JP 2013229766 A JP2013229766 A JP 2013229766A
Authority
JP
Japan
Prior art keywords
parallax
image data
image
pixel
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012100476A
Other languages
Japanese (ja)
Other versions
JP5978738B2 (en
Inventor
Kenichi Ishiga
健一 石賀
Kiyoshige Shibazaki
清茂 芝崎
Muneki Hamashima
宗樹 浜島
Susumu Mori
晋 森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2012100476A priority Critical patent/JP5978738B2/en
Priority to PCT/JP2013/002831 priority patent/WO2013161313A1/en
Priority to CN201380022016.6A priority patent/CN104412586B/en
Publication of JP2013229766A publication Critical patent/JP2013229766A/en
Priority to US14/513,729 priority patent/US9838665B2/en
Application granted granted Critical
Publication of JP5978738B2 publication Critical patent/JP5978738B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve such a problem that although the blur amount and the parallax amount in the image for right eye and the image for left eye are determined integrally by a focal position and an aperture set by an image pickup optical system, it may be required to change the parallax amount independently.SOLUTION: By using reference image data, first parallax image data having a first parallax in one direction for the subject image of the reference image data, and second parallax image data having a second parallax in other direction opposite from the one direction, which are generated by capturing the same scene, a third parallax pixel value having a third parallax different from both first parallax and second parallax is calculated for a subject image by a calculating formula P-P=(1/2-C)(P-P)(P:reference pixel value, P:first parallax luminance value, P:second parallax luminance value, P:third parallax pixel value, C:real number (where, C≠0, 0.5, 1)).

Description

本発明は、画像処理装置、撮像装置および画像処理プログラムに関する。   The present invention relates to an image processing device, an imaging device, and an image processing program.

2つの撮影光学系を用いて、右目用の画像と左目用の画像とから成るステレオ画像を取得するステレオ撮像装置が知られている。このようなステレオ撮像装置は、2つの撮像光学系を一定の間隔で配置することにより、同一の被写体を撮像して得られる2つの画像に視差を生じさせる。
[先行技術文献]
[特許文献]
[特許文献1] 特開平8−47001号公報
There is known a stereo imaging device that acquires a stereo image composed of a right-eye image and a left-eye image using two photographing optical systems. Such a stereo imaging device causes parallax to occur in two images obtained by imaging the same subject by arranging two imaging optical systems at regular intervals.
[Prior art documents]
[Patent Literature]
[Patent Document 1] JP-A-8-47001

右目用の画像と左目用の画像におけるぼけ量と視差量は、撮像光学系によって設定される焦点位置、絞り値によって一体的に定まる。しかし、ぼけ量を維持したまま、視差量を独立して変更したい場合がある。   The amount of blur and the amount of parallax in the image for the right eye and the image for the left eye are integrally determined by the focus position and aperture value set by the imaging optical system. However, there are cases where it is desired to independently change the parallax amount while maintaining the blur amount.

本発明の第1の態様における画像処理装置は、同一シーンを撮像して生成される、基準画像データ、基準画像データの被写体像に対して一方向に第1視差を有する第1視差画像データ、および一方向とは反対の他方向に第2視差を有する第2視差画像データを取得する画像データ取得部と、基準画像データの対象画素位置における基準画素値、第1視差画像データの対象画素位置における第1視差輝度値、および第2視差画像データの対象画素位置における第2視差輝度値を抽出して、計算式P−P=(1/2−C)(P−P)(P:基準画素値、P:第1視差輝度値、P:第2視差輝度値、P:第3視差画素値、C:実数(ただし、C≠0,0.5,1))により、被写体像に対して第1視差とも第2視差とも異なる第3視差を有する第3視差画素値を算出する算出部と、基準画像データにおける画像領域に対して対象画素位置を順次移動して算出部により算出させた複数の第3視差画素値を用いて、第3視差画像データを生成する画像データ生成部とを備える。 The image processing apparatus according to the first aspect of the present invention includes reference image data generated by capturing the same scene, first parallax image data having a first parallax in one direction with respect to a subject image of the reference image data, And an image data acquisition unit that acquires second parallax image data having a second parallax in a direction opposite to one direction, a reference pixel value at a target pixel position of the reference image data, and a target pixel position of the first parallax image data And the second parallax luminance value at the target pixel position of the second parallax image data are extracted, and the calculation formula P 3 −P 0 = (1 / 2−C) (P 2 −P 1 ) (P 0 : reference pixel value, P 1 : first parallax luminance value, P 2 : second parallax luminance value, P 3 : third parallax pixel value, C: real number (where C ≠ 0, 0.5, 1 )), The first parallax and the second parallax with respect to the subject image A calculation unit that calculates a third parallax pixel value having a different third parallax, and a plurality of third parallax pixel values calculated by the calculation unit by sequentially moving the target pixel position with respect to the image area in the reference image data And an image data generation unit for generating third parallax image data.

本発明の第2の態様における撮像装置は、同一シーンを撮像する撮像素子と、上記の画像処理装置とを備える撮像装置であって、画像データ取得部は、撮像素子が出力する基準画像データ、第1視差画像データおよび第2視差画像データを取得する。   An image pickup apparatus according to a second aspect of the present invention is an image pickup apparatus including an image pickup element that picks up an image of the same scene and the image processing apparatus described above, and the image data acquisition unit includes reference image data output by the image pickup element, First parallax image data and second parallax image data are acquired.

本発明の第3の態様における画像処理プログラムは、同一シーンを撮像して生成される、基準画像データ、基準画像データの被写体像に対して一方向に第1視差を有する第1視差画像データ、および一方向とは反対の他方向に第2視差を有する第2視差画像データを取得する画像データ取得ステップと、基準画像データにおける画像領域に対して対象画素位置を順次移動しつつ、基準画像データの対象画素位置における基準画素値、第1視差画像データの対象画素位置における第1視差輝度値、および第2視差画像データの対象画素位置における第2視差輝度値を抽出して、計算式P−P=(1/2−C)(P−P)(P:基準画素値、P:第1視差輝度値,P:第2視差輝度値,P:第3視差画素値,C:実数(ただし、C≠0,0.5,1))により、被写体像に対して第1視差とも第2視差とも異なる第3視差を有する第3視差画素値を順次算出する算出ステップと、算出ステップにより算出された複数の第3視差画素値を用いて、第3視差画像データを生成する画像データ生成ステップとをコンピュータに実行させる。 The image processing program according to the third aspect of the present invention includes reference image data generated by capturing the same scene, first parallax image data having a first parallax in one direction with respect to a subject image of the reference image data, And an image data acquisition step for acquiring second parallax image data having a second parallax in another direction opposite to one direction, and the reference image data while sequentially moving the target pixel position with respect to the image area in the reference image data The reference pixel value at the target pixel position, the first parallax luminance value at the target pixel position of the first parallax image data, and the second parallax luminance value at the target pixel position of the second parallax image data are extracted, and the calculation formula P 3 -P 0 = (1/2- C) (P 2 -P 1) (P 0: reference pixel value, P 1: first parallax luminance value, P 2: the second parallax luminance value, P 3: third parallax Pixel value, C: Real number (Where C ≠ 0, 0.5, 1)), a calculation step for sequentially calculating a third parallax pixel value having a third parallax different from the first parallax and the second parallax for the subject image, and a calculation step Using the plurality of third parallax pixel values calculated by the above, the computer executes an image data generation step for generating third parallax image data.

なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではない。また、これらの特徴群のサブコンビネーションもまた、発明となりうる。   It should be noted that the above summary of the invention does not enumerate all the necessary features of the present invention. In addition, a sub-combination of these feature groups can also be an invention.

本発明の実施形態に係るデジタルカメラの構成を説明する図である。It is a figure explaining the structure of the digital camera which concerns on embodiment of this invention. 本発明の実施形態に係る撮像素子の断面を表す概略図である。It is the schematic showing the cross section of the image pick-up element which concerns on embodiment of this invention. 撮像素子の一部を拡大した様子を表す概略図である。It is the schematic showing a mode that a part of imaging device was expanded. 視差画素と被写体の関係を説明する概念図である。It is a conceptual diagram explaining the relationship between a parallax pixel and a to-be-photographed object. 視差画像を生成する処理を説明する概念図である。It is a conceptual diagram explaining the process which produces | generates a parallax image. ベイヤー配列を説明する図である。It is a figure explaining a Bayer arrangement. ベイヤー配列に対する視差画素の割り振りについて、視差画素の種類が2つである場合のバリエーションを説明する図である。It is a figure explaining the variation in case there are two kinds of parallax pixels about allocation of parallax pixels to a Bayer arrangement. バリエーションの一例を示す図である。It is a figure which shows an example of a variation. 他のバリエーションの一例を示す図である。It is a figure which shows an example of another variation. 他のバリエーションの一例を示す図である。It is a figure which shows an example of another variation. 他のカラーフィルタ配列を説明する図である。It is a figure explaining other color filter arrangement | sequences. W画素と視差画素の配列の一例を示す図である。It is a figure which shows an example of the arrangement | sequence of W pixel and a parallax pixel. プレーン分離処理を説明する図である。It is a figure explaining a plane separation process. プレーンデータの補間処理を説明する図である。It is a figure explaining the interpolation process of plane data. RAW画像データセットのデータ構造を説明する図である。It is a figure explaining the data structure of a RAW image data set. デフォーカスの概念を説明する図である。It is a figure explaining the concept of defocusing. 視差画素デフォーカスの概念を説明する図である。It is a figure explaining the concept of parallax pixel defocusing. 視差なし画素と視差画素の光強度分布を示す図である。It is a figure which shows the light intensity distribution of a parallax pixel and a parallax pixel. 調整視差量の概念を説明するための光強度分布を示す図である。It is a figure which shows the light intensity distribution for demonstrating the concept of adjustment parallax amount. カラー視差プレーンデータの生成処理を説明する図である。It is a figure explaining the production | generation process of color parallax plane data. RGBの光強度分布の変化を説明する図である。It is a figure explaining the change of the light intensity distribution of RGB. 視差カラー画像データを生成するまでの処理フローである。It is a processing flow until it produces | generates parallax color image data. 好ましい開口形状を説明する図である。It is a figure explaining a preferable opening shape. 調整視差量の概念を説明するための光強度分布を示す図である。It is a figure which shows the light intensity distribution for demonstrating the concept of adjustment parallax amount. カラー視差プレーンデータの生成処理を説明する図である。It is a figure explaining the production | generation process of color parallax plane data. RGBの光強度分布の変化を説明する図である。It is a figure explaining the change of the light intensity distribution of RGB. 他の繰り返しパターンを採用する撮像素子100におけるプレーン分離処理を説明する図である。It is a figure explaining the plane separation process in the image pick-up element 100 which employ | adopts another repeating pattern. 他の繰り返しパターンを採用する撮像素子100におけるRAW画像データセットのデータ構造を説明する図である。It is a figure explaining the data structure of the RAW image data set in the image pick-up element 100 which employ | adopts another repeating pattern.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   Hereinafter, the present invention will be described through embodiments of the invention, but the following embodiments do not limit the invention according to the claims. In addition, not all the combinations of features described in the embodiments are essential for the solving means of the invention.

画像処理装置および撮像装置の一形態である本実施形態に係るデジタルカメラは、1つのシーンについて複数の視点数の画像を一度の撮影により生成できるように構成されている。互いに視点の異なるそれぞれの画像を視差画像と呼ぶ。   The digital camera according to the present embodiment, which is a form of the image processing apparatus and the imaging apparatus, is configured to be able to generate images with a plurality of viewpoints for one scene by one shooting. Each image having a different viewpoint is called a parallax image.

図1は、本発明の実施形態に係るデジタルカメラ10の構成を説明する図である。デジタルカメラ10は、撮影光学系としての撮影レンズ20を備え、光軸21に沿って入射する被写体光束を撮像素子100へ導く。撮影レンズ20は、デジタルカメラ10に対して着脱できる交換式レンズであっても構わない。デジタルカメラ10は、撮像素子100、制御部201、A/D変換回路202、メモリ203、駆動部204、画像処理部205、メモリカードIF207、操作部208、表示部209、LCD駆動回路210およびAFセンサ211を備える。   FIG. 1 is a diagram illustrating the configuration of a digital camera 10 according to an embodiment of the present invention. The digital camera 10 includes a photographic lens 20 as a photographic optical system, and guides a subject light beam incident along the optical axis 21 to the image sensor 100. The photographing lens 20 may be an interchangeable lens that can be attached to and detached from the digital camera 10. The digital camera 10 includes an image sensor 100, a control unit 201, an A / D conversion circuit 202, a memory 203, a drive unit 204, an image processing unit 205, a memory card IF 207, an operation unit 208, a display unit 209, an LCD drive circuit 210, and an AF. A sensor 211 is provided.

なお、図示するように、撮像素子100へ向かう光軸21に平行な方向をz軸プラス方向と定め、z軸と直交する平面において紙面手前へ向かう方向をx軸プラス方向、紙面上方向をy軸プラス方向と定める。以降のいくつかの図においては、図1の座標軸を基準として、それぞれの図の向きがわかるように座標軸を表示する。   As shown in the figure, the direction parallel to the optical axis 21 toward the image sensor 100 is defined as the z-axis plus direction, the direction toward the front of the drawing in the plane orthogonal to the z-axis is the x-axis plus direction, and the upward direction on the drawing is y. The axis is defined as the plus direction. In the following several figures, the coordinate axes are displayed so that the orientation of each figure can be understood with reference to the coordinate axes of FIG.

撮影レンズ20は、複数の光学レンズ群から構成され、シーンからの被写体光束をその焦点面近傍に結像させる。なお、図1では撮影レンズ20を説明の都合上、瞳近傍に配置された仮想的な1枚のレンズで代表して表している。撮像素子100は、撮影レンズ20の焦点面近傍に配置されている。撮像素子100は、二次元的に複数の光電変換素子が配列された、例えばCCD、CMOSセンサ等のイメージセンサである。撮像素子100は、駆動部204によりタイミング制御されて、受光面上に結像された被写体像を画像信号に変換してA/D変換回路202へ出力する。   The taking lens 20 is composed of a plurality of optical lens groups, and forms an image of a subject light flux from the scene in the vicinity of its focal plane. In FIG. 1, for convenience of explanation, the photographic lens 20 is represented by a single virtual lens arranged in the vicinity of the pupil. The image sensor 100 is disposed near the focal plane of the photographic lens 20. The image sensor 100 is an image sensor such as a CCD or CMOS sensor in which a plurality of photoelectric conversion elements are two-dimensionally arranged. The image sensor 100 is controlled in timing by the drive unit 204, converts the subject image formed on the light receiving surface into an image signal, and outputs the image signal to the A / D conversion circuit 202.

A/D変換回路202は、撮像素子100が出力する画像信号をデジタル画像信号に変換してメモリ203へ出力する。画像処理部205は、メモリ203をワークスペースとして種々の画像処理を施し、画像データを生成する。特に、画像処理部205は、カラー画像データの対象画素位置から画素値を抽出する画素値抽出部231、視差画像データの対象画素位置から輝度値を抽出する輝度値抽出部232、抽出した画素値と輝度値を用いて対象画素位置におけるカラー画像データとしての画素値を算出する算出部233を有する。それぞれの処理の詳細については、後述する。   The A / D conversion circuit 202 converts the image signal output from the image sensor 100 into a digital image signal and outputs the digital image signal to the memory 203. The image processing unit 205 performs various image processing using the memory 203 as a work space, and generates image data. In particular, the image processing unit 205 includes a pixel value extracting unit 231 that extracts a pixel value from the target pixel position of the color image data, a luminance value extracting unit 232 that extracts a luminance value from the target pixel position of the parallax image data, and the extracted pixel value. And a luminance value are used to calculate a pixel value as color image data at the target pixel position. Details of each processing will be described later.

画像処理部205は、他にも選択された画像フォーマットに従って画像データを調整するなどの画像処理一般の機能も担う。生成された画像データは、LCD駆動回路210により表示信号に変換され、表示部209に表示される。また、メモリカードIF207に装着されているメモリカード220に記録される。   The image processing unit 205 also has general image processing functions such as adjusting image data according to the selected image format. The generated image data is converted into a display signal by the LCD drive circuit 210 and displayed on the display unit 209. The data is recorded on the memory card 220 attached to the memory card IF 207.

AFセンサ211は、被写体空間に対して複数の測距点が設定された位相差センサであり、それぞれの測距点において被写体像のデフォーカス量を検出する。一連の撮影シーケンスは、操作部208がユーザの操作を受け付けて、制御部201へ操作信号を出力することにより開始される。撮影シーケンスに付随するAF,AE等の各種動作は、制御部201に制御されて実行される。例えば、制御部201は、AFセンサ211の検出信号を解析して、撮影レンズ20の一部を構成するフォーカスレンズを移動させる合焦制御を実行する。   The AF sensor 211 is a phase difference sensor in which a plurality of distance measuring points are set for the subject space, and detects the defocus amount of the subject image at each distance measuring point. A series of shooting sequences is started when the operation unit 208 receives a user operation and outputs an operation signal to the control unit 201. Various operations such as AF and AE accompanying the imaging sequence are executed under the control of the control unit 201. For example, the control unit 201 analyzes the detection signal of the AF sensor 211 and executes focus control for moving a focus lens that constitutes a part of the photographing lens 20.

次に、撮像素子100の構成について詳細に説明する。図2は、本発明の実施形態に係る撮像素子の断面を表す概略図である。図2(a)は、カラーフィルタ102と開口マスク103が別体で構成される撮像素子100の断面概略図である。また、図2(b)は、撮像素子100の変形例として、カラーフィルタ部122と開口マスク部123が一体的に構成されたスクリーンフィルタ121を備える撮像素子120の断面外略図である。   Next, the configuration of the image sensor 100 will be described in detail. FIG. 2 is a schematic diagram showing a cross section of the image sensor according to the embodiment of the present invention. FIG. 2A is a schematic cross-sectional view of the image sensor 100 in which the color filter 102 and the aperture mask 103 are separately formed. FIG. 2B is a schematic cross-sectional view of an image pickup device 120 including a screen filter 121 in which a color filter portion 122 and an opening mask portion 123 are integrally formed as a modification of the image pickup device 100.

図2(a)に示すように、撮像素子100は、被写体側から順に、マイクロレンズ101、カラーフィルタ102、開口マスク103、配線層105および光電変換素子108が配列されて構成されている。光電変換素子108は、入射する光を電気信号に変換するフォトダイオードにより構成される。光電変換素子108は、基板109の表面に二次元的に複数配列されている。   As shown in FIG. 2A, the image sensor 100 is configured by arranging a micro lens 101, a color filter 102, an aperture mask 103, a wiring layer 105, and a photoelectric conversion element 108 in this order from the subject side. The photoelectric conversion element 108 is configured by a photodiode that converts incident light into an electrical signal. A plurality of photoelectric conversion elements 108 are two-dimensionally arranged on the surface of the substrate 109.

光電変換素子108により変換された画像信号、光電変換素子108を制御する制御信号等は、配線層105に設けられた配線106を介して送受信される。また、各光電変換素子108に一対一に対応して設けられた開口部104を有する開口マスク103が、配線層に接して設けられている。開口部104は、後述するように、対応する光電変換素子108ごとにシフトされて、相対的な位置が厳密に定められている。詳しくは後述するが、この開口部104を備える開口マスク103の作用により、光電変換素子108が受光する被写体光束に視差が生じる。   An image signal converted by the photoelectric conversion element 108, a control signal for controlling the photoelectric conversion element 108, and the like are transmitted and received through the wiring 106 provided in the wiring layer 105. In addition, an opening mask 103 having openings 104 provided in one-to-one correspondence with each photoelectric conversion element 108 is provided in contact with the wiring layer. As will be described later, the opening 104 is shifted for each corresponding photoelectric conversion element 108 so that the relative position is precisely determined. As will be described in detail later, parallax occurs in the subject light beam received by the photoelectric conversion element 108 by the action of the opening mask 103 including the opening 104.

一方、視差を生じさせない光電変換素子108上には、開口マスク103が存在しない。別言すれば、対応する光電変換素子108に対して入射する被写体光束を制限しない、つまり有効光束の全体を通過させる開口部104を有する開口マスク103が設けられているとも言える。視差を生じさせることはないが、実質的には配線106によって形成される開口107が入射する被写体光束を規定するので、配線106を、視差を生じさせない有効光束の全体を通過させる開口マスクと捉えることもできる。開口マスク103は、各光電変換素子108に対応して別個独立に配列しても良いし、カラーフィルタ102の製造プロセスと同様に複数の光電変換素子108に対して一括して形成しても良い。   On the other hand, the aperture mask 103 does not exist on the photoelectric conversion element 108 that does not generate parallax. In other words, it can be said that the aperture mask 103 having the aperture 104 that does not limit the subject luminous flux incident on the corresponding photoelectric conversion element 108, that is, allows the entire effective luminous flux to pass therethrough is provided. Although no parallax is generated, the aperture 107 formed by the wiring 106 defines the subject luminous flux that is incident, so the wiring 106 is regarded as an aperture mask that allows the entire effective luminous flux that does not cause parallax to pass. You can also. The opening mask 103 may be arranged separately and independently corresponding to each photoelectric conversion element 108, or may be formed collectively for a plurality of photoelectric conversion elements 108 in the same manner as the manufacturing process of the color filter 102. .

カラーフィルタ102は、開口マスク103上に設けられている。カラーフィルタ102は、各光電変換素子108に対して特定の波長帯域を透過させるように着色された、光電変換素子108のそれぞれに一対一に対応して設けられるフィルタである。カラー画像を出力するには、互いに異なる少なくとも2種類のカラーフィルタが配列されれば良いが、より高画質のカラー画像を取得するには3種類以上のカラーフィルタを配列すると良い。これらのカラーフィルタは、カラー画像を生成するための原色フィルタと言える。原色フィルタの組み合わせは、例えば赤色波長帯を透過させる赤フィルタ(Rフィルタ)、緑色波長帯を透過させる緑フィルタ(Gフィルタ)、および青色波長帯を透過させる青フィルタ(Bフィルタ)である。これらのカラーフィルタは、後述するように、光電変換素子108に対応して格子状に配列される。   The color filter 102 is provided on the opening mask 103. The color filter 102 is a filter provided in a one-to-one correspondence with each photoelectric conversion element 108, which is colored so as to transmit a specific wavelength band to each photoelectric conversion element 108. In order to output a color image, it is only necessary to arrange at least two types of color filters that are different from each other. However, in order to obtain a higher quality color image, it is preferable to arrange three or more types of color filters. These color filters can be said to be primary color filters for generating a color image. The primary color filter combination is, for example, a red filter (R filter) that transmits the red wavelength band, a green filter (G filter) that transmits the green wavelength band, and a blue filter (B filter) that transmits the blue wavelength band. As will be described later, these color filters are arranged in a lattice pattern corresponding to the photoelectric conversion elements 108.

マイクロレンズ101は、カラーフィルタ102上に設けられている。マイクロレンズ101は、入射する被写体光束のより多くを光電変換素子108へ導くための集光レンズである。マイクロレンズ101は、光電変換素子108のそれぞれに一対一に対応して設けられている。マイクロレンズ101は、撮影レンズ20の瞳中心と光電変換素子108の相対的な位置関係を考慮して、より多くの被写体光束が光電変換素子108に導かれるようにその光軸がシフトされていることが好ましい。さらには、開口マスク103の開口部104の位置と共に、後述の特定の被写体光束がより多く入射するように配置位置が調整されても良い。   The microlens 101 is provided on the color filter 102. The microlens 101 is a condensing lens for guiding more incident subject light flux to the photoelectric conversion element 108. The microlenses 101 are provided in a one-to-one correspondence with the photoelectric conversion elements 108. In consideration of the relative positional relationship between the pupil center of the taking lens 20 and the photoelectric conversion element 108, the optical axis of the microlens 101 is shifted so that more subject light flux is guided to the photoelectric conversion element 108. It is preferable. Furthermore, the arrangement position may be adjusted so that more specific subject light beam, which will be described later, is incident along with the position of the opening 104 of the opening mask 103.

このように、各々の光電変換素子108に対応して一対一に設けられる開口マスク103、カラーフィルタ102およびマイクロレンズ101の一単位を画素と呼ぶ。特に、視差を生じさせる開口マスク103が設けられた画素を視差画素、視差を生じさせる開口マスク103が設けられていない画素を視差なし画素と呼ぶ。例えば、撮像素子100の有効画素領域が24mm×16mm程度の場合、画素数は1200万程度に及ぶ。また、撮像素子100の出力から生成される画像データにおいて、撮像素子100の画素に対応して出力値を持ち得る単位も単に画素と呼ぶ場合がある。   As described above, one unit of the aperture mask 103, the color filter 102, and the microlens 101 provided in one-to-one correspondence with each photoelectric conversion element 108 is referred to as a pixel. In particular, a pixel provided with the opening mask 103 that generates parallax is referred to as a parallax pixel, and a pixel that is not provided with the opening mask 103 that generates parallax is referred to as a non-parallax pixel. For example, when the effective pixel area of the image sensor 100 is about 24 mm × 16 mm, the number of pixels reaches about 12 million. In the image data generated from the output of the image sensor 100, a unit that can have an output value corresponding to the pixel of the image sensor 100 may be simply referred to as a pixel.

なお、集光効率、光電変換効率が良いイメージセンサの場合は、マイクロレンズ101を設けなくても良い。また、裏面照射型イメージセンサの場合は、配線層105が光電変換素子108とは反対側に設けられる。   Note that in the case of an image sensor with good light collection efficiency and photoelectric conversion efficiency, the microlens 101 may not be provided. In the case of a back-illuminated image sensor, the wiring layer 105 is provided on the side opposite to the photoelectric conversion element 108.

カラーフィルタ102と開口マスク103の組み合わせには、さまざまなバリエーションが存在する。図2(a)において、開口マスク103の開口部104に色成分を持たせれば、カラーフィルタ102と開口マスク103を一体的に形成することができる。また、特定の画素を被写体の輝度情報を取得する画素とする場合、その画素には、対応するカラーフィルタ102を設けなくても良い。あるいは、可視光のおよそ全ての波長帯域を透過させるように、着色を施さない透明フィルタを配列しても良い。   There are various variations in the combination of the color filter 102 and the aperture mask 103. In FIG. 2A, the color filter 102 and the opening mask 103 can be integrally formed if the opening 104 of the opening mask 103 has a color component. In addition, when a specific pixel is a pixel that acquires luminance information of a subject, the corresponding color filter 102 may not be provided for the pixel. Or you may arrange | position the transparent filter which does not give coloring so that the substantially all wavelength band of visible light may be permeate | transmitted.

また、本実施形態においては、開口マスク103と配線106を別体として設けているが、視差画素における開口マスク103の機能を配線106が担っても良い。すなわち、規定される開口形状を配線106により形成し、当該開口形状により被写体光束を制限して特定の部分光束のみを光電変換素子108へ導く。この場合、開口形状を形成する配線106は、配線層105のうち最も光電変換素子108側であることが好ましい。   In the present embodiment, the opening mask 103 and the wiring 106 are provided separately, but the wiring 106 may serve the function of the opening mask 103 in the parallax pixels. In other words, a defined aperture shape is formed by the wiring 106, the subject light beam is limited by the aperture shape, and only a specific partial light beam is guided to the photoelectric conversion element 108. In this case, the wiring 106 that forms the opening shape is preferably closest to the photoelectric conversion element 108 in the wiring layer 105.

また、開口マスク103は、光電変換素子108に重ねて設けられる透過阻止膜によって形成されても良い。この場合、開口マスク103は、例えば、SiN膜とSiO膜を順次積層して透過阻止膜とし、開口部104に相当する領域をエッチングで除去して形成される。 Further, the opening mask 103 may be formed by a permeation blocking film provided to overlap the photoelectric conversion element 108. In this case, the opening mask 103 is formed, for example, by sequentially laminating a SiN film and a SiO 2 film to form a permeation blocking film and removing a region corresponding to the opening 104 by etching.

輝度情報を取得する画素を視差画素とするのであれば、図2(b)として示す撮像素子120の構成を採用し得る。すなわち、カラーフィルタとして機能するカラーフィルタ部122と、開口部104を有する開口マスク部123とが一体的に構成されたスクリーンフィルタ121を、マイクロレンズ101と配線層105の間に配設することができる。   If the pixel from which luminance information is acquired is a parallax pixel, the configuration of the image sensor 120 shown in FIG. 2B can be employed. That is, the screen filter 121 in which the color filter part 122 that functions as a color filter and the opening mask part 123 having the opening 104 are integrally formed may be disposed between the microlens 101 and the wiring layer 105. it can.

スクリーンフィルタ121は、カラーフィルタ部122において例えば青緑赤の着色が施され、開口マスク部123において開口部104以外のマスク部分が黒の着色が施されて形成される。スクリーンフィルタ121を採用する撮像素子120は、撮像素子100に比較して、マイクロレンズ101から光電変換素子108までの距離が短いので、被写体光束の集光効率が高い。   The screen filter 121 is formed by, for example, blue-green-red coloring in the color filter portion 122 and black in the opening mask portion 123 other than the opening portion 104. Since the image sensor 120 that employs the screen filter 121 has a shorter distance from the microlens 101 to the photoelectric conversion element 108 than the image sensor 100, the light collection efficiency of the subject light flux is high.

次に、開口マスク103の開口部104と、生じる視差の関係について説明する。図3は、撮像素子100の一部を拡大した様子を表す概略図である。ここでは、説明を簡単にすべく、カラーフィルタ102の配色については後に言及を再開するまで考慮しない。カラーフィルタ102の配色に言及しない以下の説明においては、同色(透明である場合を含む)のカラーフィルタ102を有する視差画素のみを寄せ集めたイメージセンサであると捉えることができる。したがって、以下に説明する繰り返しパターンは、同色のカラーフィルタ102における隣接画素として考えても良い。   Next, the relationship between the opening 104 of the opening mask 103 and the generated parallax will be described. FIG. 3 is a schematic diagram illustrating a state in which a part of the image sensor 100 is enlarged. Here, in order to simplify the explanation, the color arrangement of the color filter 102 is not considered until the reference is resumed later. In the following description that does not refer to the color arrangement of the color filter 102, it can be considered that the image sensor is a collection of only parallax pixels having the color filter 102 of the same color (including the case of being transparent). Therefore, the repetitive pattern described below may be considered as an adjacent pixel in the color filter 102 of the same color.

図3に示すように、開口マスク103の開口部104は、それぞれの画素に対して相対的にシフトして設けられている。そして、隣接する画素同士においても、それぞれの開口部104は互いに変位した位置に設けられている。   As shown in FIG. 3, the opening 104 of the opening mask 103 is provided so as to be relatively shifted with respect to each pixel. In the adjacent pixels, the openings 104 are provided at positions displaced from each other.

図の例においては、それぞれの画素に対する開口部104の位置として、互いに左右方向にシフトした6種類の開口マスク103が用意されている。そして、撮像素子100の全体は、紙面左側から右側へ徐々にシフトする開口マスク103をそれぞれ有する6つの視差画素を一組とする光電変換素子群が、二次元的かつ周期的に配列されている。つまり、撮像素子100は、一組の光電変換素子群を含む繰り返しパターン110が、周期的に敷き詰められて構成されていると言える。   In the example shown in the drawing, six types of opening masks 103 that are shifted in the left-right direction are prepared as the positions of the openings 104 for the respective pixels. The entire image sensor 100 has a two-dimensional and periodic array of photoelectric conversion element groups each including a set of six parallax pixels each having an aperture mask 103 that gradually shifts from the left side to the right side of the drawing. . That is, it can be said that the image sensor 100 is configured by periodically repeating a repeating pattern 110 including a set of photoelectric conversion element groups.

図4は、視差画素と被写体の関係を説明する概念図である。特に図4(a)は撮像素子100のうち撮影光軸21と直交する中心に配列されている繰り返しパターン110tの光電変換素子群を示し、図4(b)は周辺部分に配列されている繰り返しパターン110uの光電変換素子群を模式的に示している。図4(a)、(b)における被写体30は、撮影レンズ20に対して合焦位置に存在する。図4(c)は、図4(a)に対応して、撮影レンズ20に対して非合焦位置に存在する被写体31を捉えた場合の関係を模式的に示している。   FIG. 4 is a conceptual diagram illustrating the relationship between the parallax pixels and the subject. In particular, FIG. 4A shows a photoelectric conversion element group of a repetitive pattern 110t arranged in the center orthogonal to the photographing optical axis 21 in the image pickup element 100, and FIG. 4B shows a repetitive arrangement arranged in the peripheral portion. The photoelectric conversion element group of the pattern 110u is typically shown. The subject 30 in FIGS. 4A and 4B is in the in-focus position with respect to the photographic lens 20. FIG. 4C schematically shows a relationship when the subject 31 existing at the out-of-focus position with respect to the photographing lens 20 is captured corresponding to FIG.

まず、撮影レンズ20が合焦状態に存在する被写体30を捉えている場合の、視差画素と被写体の関係を説明する。被写体光束は、撮影レンズ20の瞳を通過して撮像素子100へ導かれるが、被写体光束が通過する全体の断面領域に対して、6つの部分領域Pa〜Pfが規定されている。そして、例えば繰り返しパターン110t、110uを構成する光電変換素子群の紙面左端の画素は、拡大図からもわかるように、部分領域Pfから射出された被写体光束のみが光電変換素子108へ到達するように、開口マスク103の開口部104fの位置が定められている。同様に、右端の画素に向かって、部分領域Peに対応して開口部104eの位置が、部分領域Pdに対応して開口部104dの位置が、部分領域Pcに対応して開口部104cの位置が、部分領域Pbに対応して開口部104bの位置が、部分領域Paに対応して開口部104aの位置がそれぞれ定められている。   First, the relationship between the parallax pixels and the subject when the photographing lens 20 captures the subject 30 that is in focus will be described. The subject luminous flux passes through the pupil of the photographic lens 20 and is guided to the image sensor 100. Six partial areas Pa to Pf are defined for the entire cross-sectional area through which the subject luminous flux passes. For example, in the pixel at the left end of the sheet of the photoelectric conversion element group constituting the repetitive patterns 110t and 110u, only the subject luminous flux emitted from the partial region Pf reaches the photoelectric conversion element 108 as can be seen from the enlarged view. The position of the opening 104f of the opening mask 103 is determined. Similarly, toward the rightmost pixel, the position of the opening 104e corresponding to the partial area Pe, the position of the opening 104d corresponding to the partial area Pd, and the position of the opening 104c corresponding to the partial area Pc. However, the position of the opening 104b is determined corresponding to the partial area Pb, and the position of the opening 104a is determined corresponding to the partial area Pa.

別言すれば、例えば部分領域Pfと左端画素の相対的な位置関係によって定義される、部分領域Pfから射出される被写体光束(部分光束)の主光線Rfの傾きにより、開口部104fの位置が定められていると言っても良い。そして、合焦位置に存在する被写体30からの被写体光束を、開口部104fを介して光電変換素子108が受光する場合、その被写体光束は、点線で図示するように、光電変換素子108上で結像する。同様に、右端の画素に向かって、主光線Reの傾きにより開口部104eの位置が、主光線Rdの傾きにより開口部104dの位置が、主光線Rcの傾きにより開口部104cの位置が、主光線Rbの傾きにより開口部104bの位置が、主光線Raの傾きにより開口部104aの位置がそれぞれ定められていると言える。   In other words, the position of the opening 104f is determined by the inclination of the principal ray Rf of the subject light beam (partial light beam) emitted from the partial region Pf, which is defined by the relative positional relationship between the partial region Pf and the leftmost pixel, for example. It may be said that it is established. Then, when the photoelectric conversion element 108 receives the subject luminous flux from the subject 30 existing at the in-focus position via the opening 104f, the subject luminous flux is coupled on the photoelectric conversion element 108 as shown by the dotted line. Image. Similarly, toward the rightmost pixel, the position of the opening 104e is determined by the inclination of the principal ray Re, the position of the opening 104d is determined by the inclination of the principal ray Rd, and the position of the opening 104c is determined by the inclination of the principal ray Rc. It can be said that the position of the opening 104b is determined by the inclination of the light ray Rb, and the position of the opening 104a is determined by the inclination of the principal ray Ra.

図4(a)で示すように、合焦位置に存在する被写体30のうち、光軸21と交差する被写体30上の微小領域Otから放射される光束は、撮影レンズ20の瞳を通過して、繰り返しパターン110tを構成する光電変換素子群の各画素に到達する。すなわち、繰り返しパターン110tを構成する光電変換素子群の各画素は、それぞれ6つの部分領域Pa〜Pfを介して、一つの微小領域Otから放射される光束を受光している。微小領域Otは、繰り返しパターン110tを構成する光電変換素子群の各画素の位置ずれに対応する分だけの広がりを有するが、実質的には、ほぼ同一の物点と近似することができる。同様に、図4(b)で示すように、合焦位置に存在する被写体30のうち、光軸21から離間した被写体30上の微小領域Ouから放射される光束は、撮影レンズ20の瞳を通過して、繰り返しパターン110uを構成する光電変換素子群の各画素に到達する。すなわち、繰り返しパターン110uを構成する光電変換素子群の各画素は、それぞれ6つの部分領域Pa〜Pfを介して、一つの微小領域Ouから放射される光束を受光している。微小領域Ouも、微小領域Otと同様に、繰り返しパターン110uを構成する光電変換素子群の各画素の位置ずれに対応する分だけの広がりを有するが、実質的には、ほぼ同一の物点と近似することができる。   As shown in FIG. 4A, the light beam emitted from the minute region Ot on the subject 30 that intersects the optical axis 21 among the subject 30 existing at the in-focus position passes through the pupil of the photographing lens 20. Then, each pixel of the photoelectric conversion element group constituting the repetitive pattern 110t is reached. That is, each pixel of the photoelectric conversion element group constituting the repetitive pattern 110t receives a light beam emitted from one minute region Ot through each of the six partial regions Pa to Pf. Although the minute region Ot has an extent corresponding to the positional deviation of each pixel of the photoelectric conversion element group constituting the repetitive pattern 110t, it can be approximated to substantially the same object point. Similarly, as shown in FIG. 4B, the light beam emitted from the minute region Ou on the subject 30 that is separated from the optical axis 21 among the subject 30 that exists at the in-focus position passes through the pupil of the photographing lens 20. It passes through and reaches each pixel of the photoelectric conversion element group constituting the repetitive pattern 110u. That is, each pixel of the photoelectric conversion element group constituting the repetitive pattern 110u receives a light beam emitted from one minute region Ou through each of the six partial regions Pa to Pf. Similarly to the micro area Ot, the micro area Ou has an extent corresponding to the positional deviation of each pixel of the photoelectric conversion element group constituting the repetitive pattern 110u, but substantially the same object point. Can be approximated.

つまり、被写体30が合焦位置に存在する限りは、撮像素子100上における繰り返しパターン110の位置に応じて、光電変換素子群が捉える微小領域が異なり、かつ、光電変換素子群を構成する各画素は互いに異なる部分領域を介して同一の微小領域を捉えている。そして、それぞれの繰り返しパターン110において、対応する画素同士は同じ部分領域からの被写体光束を受光している。つまり、図においては、例えば繰り返しパターン110t、110uのそれぞれの左端の画素は、同じ部分領域Pfからの被写体光束を受光している。   In other words, as long as the subject 30 exists at the in-focus position, the minute area captured by the photoelectric conversion element group differs according to the position of the repetitive pattern 110 on the image sensor 100, and each pixel constituting the photoelectric conversion element group Captures the same minute region through different partial regions. In each repetitive pattern 110, corresponding pixels receive the subject luminous flux from the same partial area. That is, in the figure, for example, the leftmost pixel of each of the repeated patterns 110t and 110u receives the subject light flux from the same partial region Pf.

撮影光軸21と直交する中心に配列されている繰り返しパターン110tにおいて左端画素が部分領域Pfからの被写体光束を受光する開口部104fの位置と、周辺部分に配列されている繰り返しパターン110uにおいて左端画素が部分領域Pfからの被写体光束を受光する開口部104fの位置は厳密には異なる。しかしながら、機能的な観点からは、部分領域Pfからの被写体光束を受光するための開口マスクという点で、これらを同一種類の開口マスクとして扱うことができる。したがって、図4の例では、撮像素子100上に配列される視差画素のそれぞれは、6種類の開口マスクの一つを備えると言える。   In the repetitive pattern 110t arranged in the center orthogonal to the photographing optical axis 21, the left end pixel in the repetitive pattern 110u arranged in the peripheral portion and the position of the opening 104f where the left end pixel receives the subject light beam from the partial region Pf. However, the position of the opening 104f that receives the subject luminous flux from the partial region Pf is strictly different. However, from a functional point of view, these can be treated as the same type of aperture mask in terms of an aperture mask for receiving the subject light flux from the partial region Pf. Therefore, in the example of FIG. 4, it can be said that each of the parallax pixels arranged on the image sensor 100 includes one of six types of aperture masks.

次に、撮影レンズ20が非合焦状態に存在する被写体31を捉えている場合の、視差画素と被写体の関係を説明する。この場合も、非合焦位置に存在する被写体31からの被写体光束は、撮影レンズ20の瞳の6つの部分領域Pa〜Pfを通過して、撮像素子100へ到達する。ただし、非合焦位置に存在する被写体31からの被写体光束は、光電変換素子108上ではなく他の位置で結像する。例えば、図4(c)に示すように、被写体31が被写体30よりも撮像素子100に対して遠い位置に存在すると、被写体光束は、光電変換素子108よりも被写体31側で結像する。逆に、被写体31が被写体30よりも撮像素子100に対して近い位置に存在すると、被写体光束は、光電変換素子108よりも被写体31とは反対側で結像する。   Next, the relationship between the parallax pixels and the subject when the photographing lens 20 captures the subject 31 existing in the out-of-focus state will be described. Also in this case, the subject luminous flux from the subject 31 present at the out-of-focus position passes through the six partial areas Pa to Pf of the pupil of the photographing lens 20 and reaches the image sensor 100. However, the subject light flux from the subject 31 existing at the out-of-focus position forms an image at another position, not on the photoelectric conversion element 108. For example, as illustrated in FIG. 4C, when the subject 31 exists at a position farther from the imaging element 100 than the subject 30, the subject light flux forms an image on the subject 31 side with respect to the photoelectric conversion element 108. Conversely, when the subject 31 is present at a position closer to the image sensor 100 than the subject 30, the subject luminous flux forms an image on the opposite side of the subject 31 from the photoelectric conversion element 108.

したがって、非合焦位置に存在する被写体31のうち、微小領域Ot'から放射される被写体光束は、6つの部分領域Pa〜Pfのいずれを通過するかにより、異なる組の繰り返しパターン110における対応画素に到達する。例えば、部分領域Pdを通過した被写体光束は、図4(c)の拡大図に示すように、主光線Rd'として、繰り返しパターン110t'に含まれる、開口部104dを有する光電変換素子108へ入射する。そして、微小領域Ot'から放射された被写体光束であっても、他の部分領域を通過した被写体光束は、繰り返しパターン110t'に含まれる光電変換素子108へは入射せず、他の繰り返しパターンにおける対応する開口部を有する光電変換素子108へ入射する。換言すると、繰り返しパターン110t'を構成する各光電変換素子108へ到達する被写体光束は、被写体31の互いに異なる微小領域から放射された被写体光束である。すなわち、開口部104dに対応する108へは主光線をRd'とする被写体光束が入射し、他の開口部に対応する光電変換素子108へは主光線をRa、Rb、Rc、Re、Rfとする被写体光束が入射するが、これらの被写体光束は、被写体31の互いに異なる微小領域から放射された被写体光束である。このような関係は、図4(b)における周辺部分に配列されている繰り返しパターン110uにおいても同様である。 Therefore, the subject luminous flux emitted from the minute region Ot ′ among the subjects 31 existing at the out-of-focus position depends on which of the six partial regions Pa to Pf, the corresponding pixels in the different sets of repetitive patterns 110. To reach. For example, as shown in the enlarged view of FIG. 4C, the subject luminous flux that has passed through the partial region Pd is incident on the photoelectric conversion element 108 having the opening 104d included in the repeated pattern 110t ′ as the principal ray Rd ′. To do. Even if the subject light beam is emitted from the minute region Ot ′, the subject light beam that has passed through another partial region does not enter the photoelectric conversion element 108 included in the repetitive pattern 110t ′, and the repetitive pattern in the other repetitive pattern. The light enters the photoelectric conversion element 108 having a corresponding opening. In other words, the subject luminous flux reaching each photoelectric conversion element 108 constituting the repetitive pattern 110t ′ is a subject luminous flux radiated from different minute areas of the subject 31. That is, a subject luminous flux having a principal ray as Rd ′ is incident on 108 corresponding to the opening 104d, and the principal rays are incident on Ra + , Rb + , Rc + , Re to the photoelectric conversion elements 108 corresponding to the other openings. +, although subject light flux to Rf + is incident, these object light is a subject light flux emitted from different micro region of the object 31. Such a relationship is the same in the repeated pattern 110u arranged in the peripheral portion in FIG.

すると、撮像素子100の全体で見た場合、例えば、開口部104aに対応する光電変換素子108で捉えた被写体像Aと、開口部104dに対応する光電変換素子108で捉えた被写体像Dは、合焦位置に存在する被写体に対する像であれば互いにずれが無く、非合焦位置に存在する被写体に対する像であればずれが生じることになる。そして、そのずれは、非合焦位置に存在する被写体が合焦位置に対してどちら側にどれだけずれているかにより、また、部分領域Paと部分領域Pdの距離により、方向と量が定まる。つまり、被写体像Aと被写体像Dは、互いに視差像となる。この関係は、他の開口部に対しても同様であるので、開口部104aから104fに対応して、6つの視差像が形成されることになる。   Then, when viewed as a whole of the imaging element 100, for example, the subject image A captured by the photoelectric conversion element 108 corresponding to the opening 104a and the subject image D captured by the photoelectric conversion element 108 corresponding to the opening 104d are: If the image is for the subject present at the in-focus position, there is no shift, and if the image is for the subject present at the out-of-focus position, there is a shift. Then, the direction and amount of the shift are determined by how much the subject existing at the out-of-focus position is shifted from the focus position and by the distance between the partial area Pa and the partial area Pd. That is, the subject image A and the subject image D are parallax images. Since this relationship is the same for the other openings, six parallax images are formed corresponding to the openings 104a to 104f.

したがって、このように構成されたそれぞれの繰り返しパターン110において、互いに対応する画素の出力を寄せ集めると、視差画像が得られる。つまり、6つの部分領域Pa〜Pfうちの特定の部分領域から射出された被写体光束を受光した画素の出力は、視差画像を形成する。   Therefore, when the outputs of the pixels corresponding to each other in each of the repetitive patterns 110 configured in this way are collected, a parallax image is obtained. That is, the output of the pixel that has received the subject light beam emitted from a specific partial area among the six partial areas Pa to Pf forms a parallax image.

図5は、視差画像を生成する処理を説明する概念図である。図は、左列から順に、開口部104fに対応する視差画素の出力を集めて生成される視差画像データIm_fの生成の様子、開口部104eの出力による視差画像データIm_eの生成の様子、開口部104dの出力による視差画像データIm_dの生成の様子、開口部104cの出力による視差画像データIm_cの生成の様子、開口部104bの出力による視差画像データIm_bの生成の様子、開口部104aの出力による視差画像データIm_aの生成の様子を表す。まず開口部104fの出力による視差画像データIm_fの生成の様子について説明する。   FIG. 5 is a conceptual diagram illustrating processing for generating a parallax image. The figure shows, in order from the left column, the generation of the parallax image data Im_f generated by collecting the outputs of the parallax pixels corresponding to the opening 104f, the generation of the parallax image data Im_e by the output of the opening 104e, the opening State of generation of parallax image data Im_d by output of 104d, state of generation of parallax image data Im_c by output of opening 104c, state of generation of parallax image data Im_b by output of opening 104b, parallax by output of opening 104a This represents how the image data Im_a is generated. First, how the parallax image data Im_f is generated by the output of the opening 104f will be described.

6つの視差画素を一組とする光電変換素子群から成る繰り返しパターン110は、横一列に配列されている。したがって、開口部104fを有する視差画素は、視差なし画素を除いた仮想的な撮像素子100上において、左右方向に6画素おき、かつ、上下方向に連続して存在する。これら各画素は、上述のようにそれぞれ異なる微小領域からの被写体光束を受光している。したがって、これらの視差画素の出力を寄せ集めて配列すると、視差画像が得られる。   A repeating pattern 110 composed of a group of photoelectric conversion elements each including six parallax pixels is arranged in a horizontal row. Therefore, the parallax pixels having the opening 104f are present every six pixels in the left-right direction and continuously in the vertical direction on the virtual imaging element 100 excluding the pixels without parallax. Each of these pixels receives the subject luminous flux from different microregions as described above. Therefore, when the outputs of these parallax pixels are collected and arranged, a parallax image is obtained.

しかし、本実施形態における撮像素子100の各画素は正方画素であるので、単に寄せ集めただけでは、横方向の画素数が1/6に間引かれた結果となり、縦長の画像データが生成されてしまう。そこで、補間処理を施して横方向に6倍の画素数とすることにより、本来のアスペクト比の画像として視差画像データIm_fを生成する。ただし、そもそも補間処理前の視差画像データが横方向に1/6に間引かれた画像であるので、横方向の解像度は、縦方向の解像度よりも低下している。つまり、生成される視差画像データの数と、解像度の向上は相反関係にあると言える。なお、本実施形態に適用する具体的な補間処理については後述する。   However, since each pixel of the image sensor 100 according to the present embodiment is a square pixel, simply gathering results in the result that the number of pixels in the horizontal direction is reduced to 1/6, and vertically long image data is generated. End up. Therefore, by performing an interpolation process to obtain the number of pixels 6 times in the horizontal direction, the parallax image data Im_f is generated as an image with an original aspect ratio. However, since the parallax image data before the interpolation processing is an image that is thinned by 1/6 in the horizontal direction, the resolution in the horizontal direction is lower than the resolution in the vertical direction. That is, it can be said that the number of generated parallax image data and the improvement in resolution are in a conflicting relationship. A specific interpolation process applied to this embodiment will be described later.

同様にして、視差画像データIm_e〜視差画像データIm_aが得られる。すなわち、デジタルカメラ10は、横方向に視差を有する6視点の視差画像を生成することができる。   Similarly, parallax image data Im_e to parallax image data Im_a are obtained. That is, the digital camera 10 can generate a six-view parallax image having parallax in the horizontal direction.

次に、カラーフィルタ102と視差画像について説明する。図6は、ベイヤー配列を説明する図である。図示するように、ベイヤー配列は、緑フィルタが左上と右下の2画素に、赤フィルタが左下の1画素に、青フィルタが右上の1画素に割り当てられる配列である。ここでは、緑フィルタが割り当てられた左上の画素をGb画素と、同じく緑色フィルタが割り当てられた右下の画素をGr画素とする。また、赤色フィルタが割り当てられた画素をR画素と、青色が割り当てられた画素をB画素とする。そして、Gb画素およびB画素が並ぶ横方向をGb行とし、R画素およびGr画素が並ぶ横方向をGr行とする。また、Gb画素およびR画素が並ぶ縦方向をGb列とし、B画素およびGr画素が並ぶ縦方向をGr列とする。   Next, the color filter 102 and the parallax image will be described. FIG. 6 is a diagram for explaining the Bayer arrangement. As shown in the figure, the Bayer array is an array in which the green filter is assigned to the upper left and lower right pixels, the red filter is assigned to the lower left pixel, and the blue filter is assigned to the upper right pixel. Here, the upper left pixel to which the green filter is assigned is the Gb pixel, and the lower right pixel to which the green filter is assigned is the Gr pixel. In addition, a pixel to which a red filter is assigned is an R pixel, and a pixel to which blue is assigned is a B pixel. A horizontal direction in which Gb pixels and B pixels are arranged is defined as Gb row, and a horizontal direction in which R pixels and Gr pixels are arranged is defined as Gr row. A vertical direction in which Gb pixels and R pixels are arranged is a Gb column, and a vertical direction in which B pixels and Gr pixels are arranged is a Gr column.

このようなカラーフィルタ102の配列に対して、視差画素と視差なし画素を、何色の画素にどのような周期で割り振っていくかにより、膨大な数の繰り返しパターン110が設定され得る。視差なし画素の出力を集めれば、通常の撮影画像と同じく視差のない撮影画像データを生成することができる。したがって、相対的に視差なし画素の割合を増やせば、解像度の高い2D画像を出力させることができる。この場合、視差画素は相対的に少ない割合となるので、複数の視差画像からなる3D画像としては画質が低下する。逆に、視差画素の割合を増やせば、3D画像としては画質が向上するが、視差なし画素は相対的に減少するので、解像度の低い2D画像が出力される。   With respect to such an arrangement of the color filters 102, an enormous number of repetitive patterns 110 can be set depending on what color pixels the parallax pixels and non-parallax pixels are allocated to. If the outputs of pixels without parallax are collected, photographic image data having no parallax can be generated in the same way as normal photographic images. Therefore, if the ratio of pixels without parallax is relatively increased, a 2D image with high resolution can be output. In this case, since the number of parallax pixels is relatively small, the image quality is degraded as a 3D image including a plurality of parallax images. Conversely, if the ratio of the parallax pixels is increased, the image quality is improved as a 3D image, but the non-parallax pixels are relatively reduced, so that a 2D image with low resolution is output.

このようなトレードオフの関係において、何れの画素を視差画素とするか、あるいは視差なし画素とするかにより、様々な特徴を有する繰り返しパターン110が設定される。図7は、ベイヤー配列に対する視差画素の割り振りについて、視差画素の種類が2つである場合のバリエーションを説明する図である。この場合の視差画素は、開口部104が中心よりも左側に偏心した視差Lt画素と、同じく右側に偏心した視差Rt画素を想定している。つまり、このような視差画素から出力される2視点の視差画像は、いわゆる立体視を実現する。   In such a trade-off relationship, a repetitive pattern 110 having various characteristics is set depending on which pixel is a parallax pixel or a non-parallax pixel. FIG. 7 is a diagram illustrating a variation in the case where there are two types of parallax pixels with respect to the allocation of parallax pixels to the Bayer array. The parallax pixels in this case are assumed to be a parallax Lt pixel in which the opening 104 is decentered to the left of the center and a parallax Rt pixel that is also decentered to the right. That is, the two viewpoint parallax images output from such parallax pixels realize so-called stereoscopic vision.

それぞれの繰り返しパターンに対する特徴の説明は図に示す通りである。例えば、視差なし画素が多く割り振られていれば高解像度の2D画像データとなり、RGBのいずれの画素に対しても均等に割り振られていれば、色ずれの少ない高画質の2D画像データとなる。一方、視差画素が多く割り振られていれば高解像度の3D画像データとなり、RGBのいずれの画素に対しても均等に割り振られていれば、3D画像でありながら、色再現性の良い高品質のカラー画像データとなる。   The description of the features for each repetitive pattern is as shown in the figure. For example, if many non-parallax pixels are allocated, high-resolution 2D image data is obtained, and if all pixels of RGB are equally allocated, high-quality 2D image data with little color shift is obtained. On the other hand, if a large number of parallax pixels are allocated, high-resolution 3D image data is obtained, and if all the RGB pixels are allocated equally, a high-quality image with good color reproducibility can be obtained while being a 3D image. Color image data.

以下にいくつかのバリエーションについて説明する。図8は、バリエーションの一例を示す図である。図8のバリエーションは、図7における繰り返しパターン分類A−1に相当する。   Some variations are described below. FIG. 8 is a diagram illustrating an example of a variation. The variation in FIG. 8 corresponds to the repeated pattern classification A-1 in FIG.

図の例においては、ベイヤー配列と同じ4画素を繰り返しパターン110とする。R画素とB画素は視差なし画素であり、Gb画素を視差Lt画素に、Gr画素を視差Rt画素に割り当てる。この場合、同一の繰り返しパターン110に含まれる視差Lt画素と視差Rt画素が、被写体が合焦位置に存在するときに、同じ微小領域から放射される光束を受光するように開口部104が定められる。   In the example of the figure, the same four pixels as the Bayer array are used as the repeated pattern 110. The R pixel and the B pixel are non-parallax pixels, and the Gb pixel is assigned to the parallax Lt pixel and the Gr pixel is assigned to the parallax Rt pixel. In this case, the opening 104 is defined so that the parallax Lt pixel and the parallax Rt pixel included in the same repetitive pattern 110 receive the light beam emitted from the same minute region when the subject is in the in-focus position. .

図の例においては、視感度の高い緑画素であるGb画素およびGr画素を視差画素として用いるので、コントラストの高い視差画像を得ることが期待できる。また、同じ緑色画素であるGb画素およびGr画素を視差画素として用いるので、これら2つの出力から視差のない出力に変換演算がし易く、視差なし画素であるR画素およびB画素の出力と共に、高画質の2D画像データを生成できる。なお、変換演算については後述する。   In the example of the figure, Gb pixels and Gr pixels, which are green pixels with high visibility, are used as parallax pixels, so that it is expected to obtain a parallax image with high contrast. In addition, since the Gb pixel and the Gr pixel which are the same green pixels are used as the parallax pixels, it is easy to perform a conversion operation from these two outputs to an output having no parallax, and the output of the R pixel and the B pixel which are non-parallax pixels is high. High-quality 2D image data can be generated. The conversion operation will be described later.

図9は、他のバリエーションの一例を示す図である。図9のバリエーションは、図7における繰り返しパターン分類B−1に相当する。   FIG. 9 is a diagram illustrating an example of another variation. The variations in FIG. 9 correspond to the repeated pattern classification B-1 in FIG.

図の例においては、ベイヤー配列の4画素が左右に2組続く8画素を繰り返しパターン110とする。8画素のうち、左側のGb画素に視差Lt画素を、右側のGb画素に視差Rt画素を割り当てる。このような配列においては、Gr画素を視差なし画素としたことにより、図8の例よりも、更に2D画像の高画質化が望める。   In the example shown in the figure, the repeated pattern 110 is 8 pixels in which 4 pixels in the Bayer array are two sets on the left and right. Among the eight pixels, the parallax Lt pixel is assigned to the left Gb pixel, and the parallax Rt pixel is assigned to the right Gb pixel. In such an arrangement, the Gr pixel is a non-parallax pixel, so that higher image quality of the 2D image can be expected than in the example of FIG.

図10は、更に他のバリエーションの一例を示す図である。図10のバリエーションは、図7における繰り返しパターン分類D−1に相当する。   FIG. 10 is a diagram illustrating an example of still another variation. The variation in FIG. 10 corresponds to the repeated pattern classification D-1 in FIG.

図の例においては、ベイヤー配列の4画素が左右に2組続く8画素を繰り返しパターン110とする。8画素のうち、左側のGb画素に視差Lt画素を、右側のGb画素に視差Rt画素を割り当てる。さらに、左側のR画素に視差Lt画素を、右側のR画素に視差Rt画素を割り当てる。さらに、左側のB画素に視差Lt画素を、右側のB画素に視差Rt画素を割り当てる。2つのGr画素には視差なし画素を割り当てる。   In the example shown in the figure, the repeated pattern 110 is 8 pixels in which 4 pixels in the Bayer array are two sets on the left and right. Among the eight pixels, the parallax Lt pixel is assigned to the left Gb pixel, and the parallax Rt pixel is assigned to the right Gb pixel. Further, the parallax Lt pixel is assigned to the left R pixel, and the parallax Rt pixel is assigned to the right R pixel. Further, the parallax Lt pixel is assigned to the left B pixel, and the parallax Rt pixel is assigned to the right B pixel. Non-parallax pixels are assigned to the two Gr pixels.

2つのGb画素に割り当てられた視差Lt画素と視差Rt画素は、被写体が合焦位置に存在するときに、一つの微小領域から放射される光束を受光する。また、2つのR画素に割り当てられた視差Lt画素と視差Rt画素は、Gb画素のそれとは異なる一つの微小領域から放射される光束を受光し、2つのB画素に割り当てられた視差Lt画素と視差Rt画素は、Gb画素およびR画素のそれとは異なる一つの微小領域から放射される光束を受光する。したがって、図9の例に比較して、3D画像としての解像度が縦方向に3倍となる。しかも、RGBの3色の出力が得られるので、カラー画像としての3D画像として高品質である。   The parallax Lt pixel and the parallax Rt pixel assigned to the two Gb pixels receive the light flux emitted from one minute region when the subject is in the in-focus position. In addition, the parallax Lt pixel and the parallax Rt pixel assigned to the two R pixels receive a light beam emitted from one minute region different from that of the Gb pixel, and the parallax Lt pixel assigned to the two B pixels The parallax Rt pixel receives a light beam emitted from one minute region different from that of the Gb pixel and the R pixel. Therefore, compared with the example of FIG. 9, the resolution as a 3D image is tripled in the vertical direction. Moreover, since RGB three-color output can be obtained, it is a high-quality 3D image as a color image.

なお、上述のように視差画素の種類を2つにすれば2視点の視差画像が得られるが、もちろん視差画素の種類は、出力したい視差画像数に合わせて様々な数を採用し得る。視点数が増えていっても、さまざまな繰り返しパターン110を形成することができる。したがって、仕様、目的等に応じた繰り返しパターン110を選択することができる。   As described above, if two types of parallax pixels are used, a parallax image with two viewpoints can be obtained. Of course, various types of parallax pixels can be used according to the number of parallax images to be output. Even if the number of viewpoints is increased, various repeated patterns 110 can be formed. Therefore, it is possible to select the repetitive pattern 110 according to the specification, purpose, and the like.

上述の例では、カラーフィルタ配列としてベイヤー配列を採用した場合について説明したが、もちろん他のカラーフィルタ配列であっても差し支えない。このとき、一組の光電変換素子群を構成する視差画素のそれぞれは、互いに異なる部分領域を向く開口部104を有する開口マスク103を備えると良い。   In the above-described example, the case where the Bayer array is adopted as the color filter array has been described. Of course, other color filter arrays may be used. At this time, each of the parallax pixels constituting the set of photoelectric conversion element groups may include an opening mask 103 having opening portions 104 facing different partial regions.

したがって、撮像素子100は、入射光を電気信号に光電変換する、二次元的に配列された光電変換素子108と、光電変換素子108の少なくとも一部のそれぞれに一対一に対応して設けられた開口マスク103と、光電変換素子108の少なくとも一部のそれぞれに一対一に対応して設けられたカラーフィルタ102とを備え、隣接するn個(nは3以上の整数)の光電変換素子108のうち、少なくとも2つ(3つ以上であっても良い)に対応して設けられたそれぞれの開口マスク103の開口部104は、互いに異なる波長帯域を透過させる少なくとも3種類のカラーフィルタ102から構成されるカラーフィルターパターンの一パターン内に含まれると共に、入射光の断面領域内の互いに異なる部分領域からの光束をそれぞれ通過させるように位置づけられ、n個の光電変換素子108を一組とする光電変換素子群が周期的に配列されていれば良い。   Therefore, the image sensor 100 is provided in a one-to-one correspondence with each of at least a part of the photoelectric conversion elements 108 and the photoelectric conversion elements 108 that are two-dimensionally arranged to photoelectrically convert incident light into electric signals. The aperture mask 103 and the color filters 102 provided in a one-to-one correspondence with each of at least a part of the photoelectric conversion elements 108 are provided, and n adjacent n (n is an integer of 3 or more) photoelectric conversion elements 108. Of these, the openings 104 of the respective opening masks 103 provided corresponding to at least two (may be three or more) are composed of at least three types of color filters 102 that transmit different wavelength bands. The color filter pattern is included in one pattern and the light beams from different partial areas in the cross-sectional area of the incident light pass through each. So as positioned, the photoelectric conversion element group for the n-number of photoelectric conversion elements 108 and a set is only to be periodically arranged.

図11は、他のカラーフィルタ配列を説明する図である。図示するように、他のカラーフィルタ配列は、図6で示したベイヤー配列のGr画素を緑フィルタが割り当てられるG画素として維持する一方、Gb画素をカラーフィルタが割り当てられないW画素に変更した配列である。なお、W画素は、上述のように、可視光のおよそ全ての波長帯域を透過させるように、着色を施さない透明フィルタが配列されていても良い。   FIG. 11 is a diagram for explaining another color filter arrangement. As shown in the figure, the other color filter array maintains the Gr pixels in the Bayer array shown in FIG. 6 as G pixels to which the green filter is assigned, while changing the Gb pixels to W pixels to which no color filter is assigned. It is. Note that, as described above, the W pixel may be arranged with a transparent filter that is not colored so as to transmit substantially all the wavelength band of visible light.

このようなW画素を含むカラーフィルタ配列を採用すれば、撮像素子が出力するカラー情報の精度は若干低下するものの、W画素が受光する光量はカラーフィルタが設けられている場合に比較して多いので、精度の高い輝度情報を取得できる。W画素の出力を寄せ集めれば、モノクロ画像を形成することもできる。   If such a color filter array including W pixels is adopted, the accuracy of the color information output from the image sensor is slightly reduced, but the amount of light received by the W pixels is larger than that when a color filter is provided. Therefore, highly accurate luminance information can be acquired. A monochrome image can also be formed by gathering the outputs of W pixels.

W画素を含むカラーフィルタ配列の場合、視差画素と視差なし画素の繰り返しパターン110は、さらなるバリエーションが存在する。例えば、比較的暗い環境下で撮影された画像であっても、カラー画素から出力された画像に比較してW画素から出力された画像であれば、被写体像のコントラストが高い。そこで、W画素に視差画素を割り振れば、複数の視差画像間で行うマッチング処理において、精度の高い演算結果が期待できる。したがって、2D画像の解像度および視差画像の画質への影響に加え、抽出される他の情報への利害得失も考慮して、視差画素と視差なし画素の繰り返しパターン110が設定される。   In the case of a color filter array including W pixels, there are further variations in the repeating pattern 110 of parallax pixels and non-parallax pixels. For example, even if the image is captured in a relatively dark environment, the contrast of the subject image is higher if the image is output from the W pixel as compared to the image output from the color pixel. Therefore, if a parallax pixel is assigned to a W pixel, a highly accurate calculation result can be expected in a matching process performed between a plurality of parallax images. Therefore, in addition to the influence on the resolution of the 2D image and the image quality of the parallax image, the repetitive pattern 110 of the parallax pixels and the non-parallax pixels is set in consideration of the interest in other extracted information.

図12は、図11の他のカラーフィルタ配列を採用する場合の、W画素と視差画素の配列の一例を示す図である。図12のバリエーションは、ベイヤー配列における図7の繰り返しパターン分類B−1に類似するので、ここではB'−1とする。図の例においては、他のカラーフィルタ配列の4画素が左右に2組続く8画素を繰り返しパターン110とする。8画素のうち、左側のW画素に視差Lt画素を、右側のW画素に視差Rt画素を割り当てる。このような配列において撮像素子100は、視差画像をモノクロ画像として出力し、2D画像をカラー画像として出力することができる。   FIG. 12 is a diagram illustrating an example of an array of W pixels and parallax pixels when the other color filter array of FIG. 11 is employed. The variation in FIG. 12 is similar to the repeated pattern classification B-1 in FIG. In the example shown in the figure, the repeated pattern 110 is an eight pixel in which two sets of four pixels in other color filter arrays continue to the left and right. Among the eight pixels, the parallax Lt pixel is assigned to the left W pixel, and the parallax Rt pixel is assigned to the right W pixel. In such an arrangement, the image sensor 100 can output a parallax image as a monochrome image and output a 2D image as a color image.

この場合、撮像素子100は、入射光を電気信号に光電変換する、二次元的に配列された光電変換素子108と、光電変換素子108の少なくとも一部のそれぞれに一対一に対応して設けられた開口マスク103と、光電変換素子108の少なくとも一部のそれぞれに一対一に対応して設けられたカラーフィルタ102とを有し、隣接するn個(nは4以上の整数)の光電変換素子108のうち、少なくとも2つに対応して設けられたそれぞれの開口マスク103の開口部104は、互いに異なる波長帯域を透過させる少なくとも3種類のカラーフィルタ102から構成されるカラーフィルターパターンの一パターン内には含まれず、かつ、入射光の断面領域内の互いに異なる部分領域からの光束をそれぞれ通過させるように位置づけられ、n個の光電変換素子108を一組とする光電変換素子群が周期的に配列されていれば良い。   In this case, the image sensor 100 is provided in a one-to-one correspondence with each of the two-dimensionally arranged photoelectric conversion elements 108 that photoelectrically convert incident light into electric signals and at least a part of the photoelectric conversion elements 108. And n adjacent n (n is an integer of 4 or more) photoelectric conversion elements each having an opening mask 103 and a color filter 102 provided in a one-to-one correspondence with each of at least a part of the photoelectric conversion element 108. The openings 104 of the respective opening masks 103 provided corresponding to at least two out of 108 are in one pattern of a color filter pattern composed of at least three kinds of color filters 102 that transmit different wavelength bands. And is positioned so as to pass light beams from different partial areas in the cross-sectional area of the incident light, The photoelectric conversion element group for a number of photoelectric conversion elements 108 and a set is only to be periodically arranged.

以上のように、撮像素子100を構成する各画素は、開口部104に着目した場合の視差画素と視差なし画素、およびカラーフィルタ102に着目した場合のR画素、G画素、B画素、W画素が、さまざまに組み合わされて特徴付けられる。したがって、撮像素子100の出力をその画素配列に一致させてそのまま羅列しても、特定の像を表す画像データにはならない。すなわち、撮像素子100の画素出力を、同一に特徴付けられた画素グループごとに分離して寄せ集めてはじめて、その特徴に即した一つの像を表す画像データが形成される。例えば、既に図5を用いて説明したように、視差画素の出力をその開口部の種類ごとに寄せ集めると、互いに視差を有する複数の視差画像データが得られる。このように、同一に特徴付けられた画素グループごとに分離して寄せ集められたそれぞれの画像データを、プレーンデータと呼ぶ。   As described above, the pixels constituting the image sensor 100 are parallax pixels and non-parallax pixels when focusing on the opening 104, and R, G, B, and W pixels when focusing on the color filter 102. Are characterized in various combinations. Therefore, even if the outputs of the image sensor 100 are aligned with the pixel arrangement, they are not image data representing a specific image. That is, only when the pixel outputs of the image sensor 100 are separated and collected for each pixel group characterized by the same, image data representing one image corresponding to the feature is formed. For example, as already described with reference to FIG. 5, when the outputs of the parallax pixels are collected for each type of opening, a plurality of parallax image data having parallax can be obtained. In this way, each piece of image data separated and collected for each identically characterized pixel group is referred to as plane data.

画像処理部205は、撮像素子100の画素配列順にその出力値が羅列されたRAW元画像データを受け取り、複数のプレーンデータに分離するプレーン分離処理を実行する。図13は、図12を用いて説明したB'−1の繰り返しパターンを例として、プレーン分離処理を説明する図である。なお、図示するように、撮像素子100の画素配列に対して、右向きにi軸を定め、下向きにj軸を定める。また、左端かつ上端の座標を(1,1)とし、右端かつ下端の座標を(i,j)とする。図においては、図12の例に則して画素の種類が理解されるように記載するが、実際のプレーンデータとしては各画素に対応した出力値が並ぶ。 The image processing unit 205 receives raw raw image data whose output values are arranged in the pixel arrangement order of the image sensor 100, and executes plane separation processing for separating the raw image data into a plurality of plane data. FIG. 13 is a diagram for explaining the plane separation process using the B′-1 repetition pattern described with reference to FIG. 12 as an example. As shown in the figure, with respect to the pixel array of the image sensor 100, the i axis is determined rightward and the j axis is determined downward. Also, the left end and upper end coordinates are (1, 1), and the right end and lower end coordinates are (i 0 , j 0 ). In the figure, description is made so that the types of pixels can be understood in accordance with the example of FIG. 12, but output values corresponding to the respective pixels are arranged as actual plane data.

図13の上段に模式的に表すように、RAW元画像データは、i=1行目において、(1,1)から(i,1)へ向かって、視差Lt画素、視差なしB画素、視差Rt画素、視差なしB画素の順にそれぞれの出力値が繰り返し並んでいる。また、i=2行目において、(1,2)から(i,2)へ向かって、視差なしR画素、視差なしG画素(Gr画素)の順にそれぞれの出力値が繰り返し並んでいる。RAW元画像データは、このような行方向の出力値が、列方向にも交互に繰り返して並んでいる。 As schematically illustrated in the upper part of FIG. 13, the RAW original image data has a parallax Lt pixel, a B pixel without parallax, from (1, 1) to (i 0 , 1) in the i = 1st row. The respective output values are repeatedly arranged in the order of the parallax Rt pixel and the non-parallax B pixel. In the i = 2nd row, the output values are repeatedly arranged in the order of R pixels without parallax and G pixels without parallax (Gr pixels) from (1,2) to (i 0 , 2). In the RAW original image data, such output values in the row direction are alternately and repeatedly arranged in the column direction.

画像処理部205は、視差Lt画素、視差Rt画素、視差なしR画素、視差なしG画素、および視差なしB画素のそれぞれを同一に特徴付けられた画素グループとして、RAW元画像データをそれぞれのプレーンデータに分離する。B'−1の繰り返しパターンにおいては、RGBのカラー画素は視差なし画素であり、視差画素はW画素である。そこで、画像処理部205は、RAW元画像データから、視差なしR画素のみを分離してRプレーンデータを生成し、視差なしG画素のみを分離してGプレーンデータを生成し、視差なしB画素のみを分離してBプレーンデータを生成して、これらを纏めてカラー画像データとして管理する。 The image processing unit 205 sets the RAW source image data to the respective planes using the parallax Lt pixel, the parallax Rt pixel, the non-parallax R pixel, the non-parallax G pixel, and the non-parallax B pixel as the same pixel group. Separate into data. In the repeating pattern of B′−1, the RGB color pixels are non-parallax pixels, and the parallax pixels are W pixels. Therefore, the image processing unit 205 generates R 0 plane data by separating only R pixels without parallax from the RAW original image data, generates G 0 plane data by separating only G pixels without parallax, and has no parallax. and generates B 0 plane data only by separating B pixel, it managed as color image data are collectively.

同様に、画像処理部205は、RAW元画像データから、視差Lt画素のみを分離してLtプレーンデータを生成し、視差Rt画素のみを分離してRtプレーンデータを生成して、これらを纏めて視差画像データして管理する。ここで、視差画像データは、カラー情報を含まず、被写体像の輝度情報を表していると言えるので、輝度画像データとして扱うことができる。そこで、本実施形態においては、カラー画像データに属する各プレーンの出力値を画素値と呼び、輝度画像データに属する各プレーンの出力値を輝度値と呼ぶ。また、画像処理部205は、カラー画像データと視差画像データを、一つのRAW元画像データから生成されたプレーンデータ群として、RAW画像データセットとして管理する。 Similarly, the image processing unit 205 separates only the parallax Lt pixels from the RAW original image data to generate Lt 0 plane data, and separates only the parallax Rt pixels to generate Rt 0 plane data. Collectively manage parallax image data. Here, it can be said that the parallax image data does not include color information and represents luminance information of the subject image, and thus can be handled as luminance image data. Therefore, in the present embodiment, the output value of each plane belonging to color image data is referred to as a pixel value, and the output value of each plane belonging to luminance image data is referred to as a luminance value. Further, the image processing unit 205 manages color image data and parallax image data as a RAW image data set as a plane data group generated from one RAW original image data.

この時点における各プレーンデータは、図示するように、RAW元画像データにおいて出力値が存在する画素位置にのみ出力値が存在する。例えば、Rプレーンデータにおいては、一つの繰り返しパターン110に対して出力値(画素値)が存在するのは2画素分であり、他の6画素分は空格子として存在する。同様に、Ltプレーンデータにおいては、一つの繰り返しパターンに対して出力値(輝度値)が存在するのは1画素分であり、他の7画素分は空格子として存在する。そこで、画像処理部205は、各プレーンデータの空格子を埋める補間処理を実行する。 As shown in the drawing, each plane data at this point has an output value only at a pixel position where the output value exists in the RAW original image data. For example, in the R0 plane data, output values (pixel values) exist for two pixels for one repetitive pattern 110, and the remaining six pixels exist as empty grids. Similarly, in the Lt 0 plane data, the output value (luminance value) for one repetitive pattern exists for one pixel, and the other seven pixels exist as an empty grid. Therefore, the image processing unit 205 executes an interpolation process for filling the empty grid of each plane data.

図14は、プレーンデータの補間処理を説明する図である。ここでは、空格子の存在するRプレーンデータに補間処理を施して、空格子の存在しないRnプレーンデータを生成する様子を示す。 FIG. 14 is a diagram for explaining the plane data interpolation processing. Here, a state is shown in which interpolation processing is performed on R0 plane data in which vacancies exist to generate Rn plane data in which vacancies do not exist.

画像処理部205は、補間処理として、空格子に近接する画素の画素値を用いて、当該空格子の画素値を生成する。例えば、対象となる空格子と隣接する画素に画素値があれば、これらの平均値を当該空格子の画素値とする。また、隣接しない画素を用いる場合は、当該空格子からの距離に応じた重み付けを与えて平均化処理する。   As an interpolation process, the image processing unit 205 uses the pixel values of the pixels close to the empty grid to generate the pixel values of the empty grid. For example, if there is a pixel value in a pixel adjacent to the target empty grid, the average value thereof is set as the pixel value of the empty grid. When non-adjacent pixels are used, averaging processing is performed by giving a weight according to the distance from the empty lattice.

このように補間処理を施すと、それぞれのプレーンデータから空格子を無くすことができる。図15は、補間処理を施した後のRAW画像データセットのデータ構造を説明する図である。   When interpolation processing is performed in this way, empty grids can be eliminated from each plane data. FIG. 15 is a diagram for explaining the data structure of the RAW image data set after performing the interpolation process.

図示するように、RAW画像データセットを構成するカラー画像データは、空格子の存在しないRnプレーンデータ、Gnプレーンデータ、およびBnプレーンデータを含む。これらの画像データはそれぞれ、被写体像に対して赤色成分のみを抽出した画像データ、緑色成分のみを抽出した画像データ、青色成分のみを抽出した画像データに相当する。   As shown in the figure, the color image data constituting the RAW image data set includes Rn plane data, Gn plane data, and Bn plane data having no empty lattice. These image data correspond to image data obtained by extracting only the red component, image data obtained by extracting only the green component, and image data obtained by extracting only the blue component, respectively.

同様に、RAW画像データセットを構成する視差画像データ(輝度画像データ)は、空格子の存在しないLtプレーンデータおよびRtプレーンデータを含む。これらの画像データはそれぞれ、被写体像に対して左側視点の輝度成分のみを抽出した画像データ、右側視点の輝度成分のみを抽出した画像データに相当する。   Similarly, the parallax image data (luminance image data) constituting the RAW image data set includes Lt plane data and Rt plane data having no empty lattice. Each of these image data corresponds to image data obtained by extracting only the luminance component of the left viewpoint from the subject image, and image data obtained by extracting only the luminance component of the right viewpoint.

本実施形態においては、画像処理部205は、これら5つのプレーンデータを用いて、左側視点のカラー画像データおよび右側視点のカラー画像データを生成する。特に、立体調整パラメータを導入することにより、ぼけ量を維持したまま視差量を任意に調整したカラー画像データを生成する。具体的な処理に先立って、まず生成原理について説明する。   In the present embodiment, the image processing unit 205 uses these five plane data to generate left-viewpoint color image data and right-viewpoint color image data. In particular, by introducing a three-dimensional adjustment parameter, color image data in which the parallax amount is arbitrarily adjusted while maintaining the blur amount is generated. Prior to specific processing, the generation principle will be described first.

図16は、デフォーカスの概念を説明する図である。図16(a)で示すように、被写体である物点が焦点位置に存在する場合、レンズ瞳を通って撮像素子受光面に到達する被写体光束は、対応する像点の画素を中心として急峻な光強度分布を示す。すなわち、レンズ瞳を通過する有効光束の全体を受光する視差なし画素が像点近傍に配列されていれば、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値は急激に低下する。   FIG. 16 is a diagram for explaining the concept of defocusing. As shown in FIG. 16A, when an object point that is a subject exists at the focal position, the subject luminous flux that reaches the image sensor light receiving surface through the lens pupil is steep with the pixel at the corresponding image point as the center. The light intensity distribution is shown. That is, if non-parallax pixels that receive the entire effective luminous flux that passes through the lens pupil are arranged in the vicinity of the image point, the output value of the pixel corresponding to the image point is the largest, and the output value of the pixels arranged in the vicinity Drops rapidly.

一方、図16(b)に示すように、物点が焦点位置からずれると、被写体光束は、物点が焦点位置に存在する場合に比べて、撮像素子受光面においてなだらかな光強度分布を示す。すなわち、対応する像点の画素における出力値が低下する上に、より周辺画素まで出力値を有する分布を示す。   On the other hand, as shown in FIG. 16B, when the object point deviates from the focal position, the subject luminous flux shows a gentle light intensity distribution on the light receiving surface of the image sensor as compared with the case where the object point exists at the focal position. . That is, the output value at the pixel of the corresponding image point is lowered, and a distribution having output values up to the peripheral pixels is shown.

また、図16(c)に示すように、さらに物点が焦点位置からずれると、被写体光束は、撮像素子受光面においてよりなだらかな光強度分布を示す。すなわち、対応する像点の画素における出力値がさらに低下する上に、より周辺画素まで出力値を有する分布を示す。   Further, as shown in FIG. 16C, when the object point further deviates from the focal position, the subject luminous flux exhibits a gentler light intensity distribution on the image sensor light receiving surface. In other words, the output value at the pixel of the corresponding image point further decreases, and a distribution having output values up to the surrounding pixels is shown.

次に、視差Lt画素および視差Rt画素が受光する場合のデフォーカスの概念を説明する。図17は、視差画素デフォーカスの概念を説明する図である。視差Lt画素および視差Rt画素は、レンズ瞳の部分領域としてそれぞれ光軸対象に設定された2つの視差仮想瞳のいずれかから到達する被写体光束を受光する。   Next, the concept of defocusing when the parallax Lt pixel and the parallax Rt pixel receive light will be described. FIG. 17 is a diagram for explaining the concept of parallax pixel defocusing. The parallax Lt pixel and the parallax Rt pixel receive the subject luminous flux that arrives from one of the two parallax virtual pupils set as the optical axis target as a partial region of the lens pupil.

図17(a)で示すように、被写体である物点が焦点位置に存在する場合、いずれの視差仮想瞳を通った被写体光束であっても、対応する像点の画素を中心として急峻な光強度分布を示す。像点付近に視差Lt画素が配列されていれば、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。また、像点付近に視差Rt画素が配列されていても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。すなわち、被写体光束がいずれの視差仮想瞳を通過しても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する分布を示し、それぞれの分布は互いに一致する。   As shown in FIG. 17 (a), when an object point that is a subject exists at the focal position, steep light centering on the pixel of the corresponding image point regardless of the parallax virtual pupil, regardless of the parallax virtual pupil. The intensity distribution is shown. If the parallax Lt pixels are arranged in the vicinity of the image point, the output value of the pixel corresponding to the image point is the largest, and the output value of the pixels arranged in the vicinity rapidly decreases. Further, even when the parallax Rt pixels are arranged in the vicinity of the image point, the output value of the pixel corresponding to the image point is the largest, and the output value of the pixels arranged in the vicinity rapidly decreases. That is, even if the subject luminous flux passes through any parallax virtual pupil, the output value of the pixel corresponding to the image point is the largest, and the output value of the pixels arranged in the vicinity rapidly decreases. Match each other.

一方、図17(b)に示すように、物点が焦点位置からずれると、物点が焦点位置に存在した場合に比べて、視差Lt画素が示す光強度分布のピークは、像点に対応する画素から一方向に離れた位置に現れ、かつその出力値は低下する。また、出力値を有する画素の幅も広がる。視差Rt画素が示す光強度分布のピークは、像点に対応する画素から、視差Lt画素における一方向とは逆向きかつ等距離に離れた位置に現れ、同様にその出力値は低下する。また、同様に出力値を有する画素の幅も広がる。すなわち、物点が焦点位置に存在した場合に比べてなだらかとなった同一の光強度分布が、互いに等距離に離間して現れる。また、図17(c)に示すように、さらに物点が焦点位置からずれると、図17(b)の状態に比べて、さらになだらかとなった同一の光強度分布が、より離間して現れる。つまり、物点が焦点位置から大きくずれる程、ぼけ量と視差量が増すと言える。別言すれば、デフォーカスに応じて、ぼけ量と視差量は連動して変化する。すなわち、ぼけ量と視差量は、一対一に対応する関係を有する。   On the other hand, as shown in FIG. 17B, when the object point deviates from the focal position, the peak of the light intensity distribution indicated by the parallax Lt pixel corresponds to the image point as compared with the case where the object point exists at the focal position. Appearing at a position away from the pixel in one direction, and its output value decreases. In addition, the width of the pixel having the output value is increased. The peak of the light intensity distribution indicated by the parallax Rt pixel appears at a position away from the pixel corresponding to the image point in the opposite direction to the one direction in the parallax Lt pixel and at an equal distance, and the output value similarly decreases. Similarly, the width of the pixel having the output value is increased. That is, the same light intensity distribution that is gentler than that in the case where the object point exists at the focal position appears at an equal distance from each other. Further, as shown in FIG. 17C, when the object point further deviates from the focal position, the same light intensity distribution that is more gentle than the state of FIG. . That is, it can be said that the amount of blur and the amount of parallax increase as the object point deviates from the focal position. In other words, the amount of blur and the amount of parallax change in conjunction with defocus. That is, the amount of blur and the amount of parallax have a one-to-one relationship.

図16で説明した光強度分布の変化と、図17で説明した光強度分布の変化をそれぞれグラフ化すると、図18のように表される。図において、横軸は画素位置を表し、中心位置が像点に対応する画素位置である。縦軸は各画素の出力値を表し、この出力値は実質的に光強度に比例するので、図においては光強度として示す。   When the change in the light intensity distribution described with reference to FIG. 16 and the change in the light intensity distribution described with reference to FIG. 17 are graphed, they are expressed as shown in FIG. In the figure, the horizontal axis represents the pixel position, and the center position is the pixel position corresponding to the image point. The vertical axis represents the output value of each pixel. Since this output value is substantially proportional to the light intensity, it is shown as the light intensity in the figure.

図18(a)は、図16で説明した光強度分布の変化を表すグラフである。分布曲線1801は、図16(a)に対応する光強度分布を表し、最も急峻な様子を示す。分布曲線1802は、図16(b)に対応する光強度分布を表し、また、分布曲線1803は、図16(c)に対応する光強度分布を表す。分布曲線1801に比較して、徐々にピーク値が下がり、広がりを持つ様子がわかる。   FIG. 18A is a graph showing changes in the light intensity distribution described in FIG. A distribution curve 1801 represents the light intensity distribution corresponding to FIG. 16A and shows the steepest state. The distribution curve 1802 represents the light intensity distribution corresponding to FIG. 16B, and the distribution curve 1803 represents the light intensity distribution corresponding to FIG. Compared with the distribution curve 1801, it can be seen that the peak value gradually decreases and has a broadening.

図18(b)は、図17で説明した光強度分布の変化を表すグラフである。分布曲線1804と分布曲線1805は、それぞれ図17(b)の視差Lt画素の光強度分布と視差Rt画素の光強度分布を表す。図からわかるように、これらの分布は中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1806は、図17(b)に対して同等のデフォーカス状態である図16(b)の分布曲線1802と相似形状を示す。   FIG. 18B is a graph showing changes in the light intensity distribution described in FIG. A distribution curve 1804 and a distribution curve 1805 represent the light intensity distribution of the parallax Lt pixel and the light intensity distribution of the parallax Rt pixel in FIG. As can be seen from the figure, these distributions have a line-symmetric shape with respect to the center position. Further, a combined distribution curve 1806 obtained by adding these together shows a similar shape to the distribution curve 1802 in FIG. 16B, which is in a defocus state equivalent to that in FIG.

分布曲線1807と分布曲線1808は、それぞれ図17(c)の視差Lt画素の光強度分布と視差Rt画素の光強度分布を表す。図からわかるように、これらの分布も中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1809は、図17(c)に対して同等のデフォーカス状態である図16(c)の分布曲線1803と相似形状を示す。   A distribution curve 1807 and a distribution curve 1808 respectively represent the light intensity distribution of the parallax Lt pixel and the light intensity distribution of the parallax Rt pixel in FIG. As can be seen from the figure, these distributions are also symmetrical with respect to the center position. Also, a combined distribution curve 1809 obtained by adding them shows a similar shape to the distribution curve 1803 in FIG. 16C, which is in a defocus state equivalent to that in FIG.

本実施形態においては、実際に撮像素子100の出力値として取得され、空格子が補間処理された、このような光強度分布を示す視差Lt画素の輝度値と視差Rt画素の輝度値とを用いて、仮想的な光強度分布をつくり出す。このとき、光強度分布の広がりによって表現されるぼけ量はおよそ維持しつつ、ピーク間の間隔として表現される視差量を調整する。つまり、本実施形態において画像処理部205は、像としてのぼけ量はほぼそのままとしつつも、視差無し画素から生成される2D画像と視差画素から生成される3D画像との間に調整された視差量を有する画像を生成する。図19は、調整視差量の概念を説明するための光強度分布を示す図である。   In the present embodiment, the luminance value of the parallax Lt pixel and the luminance value of the parallax Rt pixel, which are actually obtained as the output value of the image sensor 100 and interpolated in the sky lattice and indicate such a light intensity distribution, are used. To create a virtual light intensity distribution. At this time, the amount of parallax expressed as an interval between peaks is adjusted while approximately maintaining the amount of blur expressed by the spread of the light intensity distribution. That is, in this embodiment, the image processing unit 205 maintains the amount of blurring as an image as it is, but adjusts the parallax adjusted between the 2D image generated from the non-parallax pixel and the 3D image generated from the parallax pixel. An image having a quantity is generated. FIG. 19 is a diagram showing a light intensity distribution for explaining the concept of the adjusted parallax amount.

図において実線で示すLt分布曲線1901とRt分布曲線1902は、LtプレーンデータとRtプレーンデータの実際の輝度値をプロットした分布曲線である。例えば、図18における分布曲線1804、1805に相当する。そして、Lt分布曲線1901とRt分布曲線1902のそれぞれのピーク間距離は3D視差量を表し、この距離が大きいほど、画像再生時の立体感が強くなる。   Lt distribution curves 1901 and Rt distribution curves 1902 indicated by solid lines in the figure are distribution curves in which actual luminance values of Lt plane data and Rt plane data are plotted. For example, it corresponds to the distribution curves 1804 and 1805 in FIG. The distance between the peaks of the Lt distribution curve 1901 and the Rt distribution curve 1902 represents the 3D parallax amount, and the greater the distance, the stronger the stereoscopic effect during image reproduction.

Lt分布曲線1901とRt分布曲線1902とをそれぞれ5割として足し合わせた2D分布曲線1903は、左右に偏りのない凸形状となる。2D分布曲線1903は、図18における合成分布曲線1806の高さを1/2にした形状に相当する。すなわち、2D分布曲線1903は、視差無し画素の輝度値をプロットした分布曲線に相似する形状を示す。すなわち、この輝度分布に基づく画像は、視差量0の2D画像となる。   A 2D distribution curve 1903 obtained by adding 50% each of the Lt distribution curve 1901 and the Rt distribution curve 1902 has a convex shape with no left-right bias. The 2D distribution curve 1903 corresponds to a shape in which the height of the composite distribution curve 1806 in FIG. 18 is halved. That is, the 2D distribution curve 1903 shows a shape similar to a distribution curve in which the luminance values of pixels without parallax are plotted. That is, an image based on this luminance distribution is a 2D image with a parallax amount of zero.

調整Lt分布曲線1905は、Lt分布曲線1901の8割と、Rt分布曲線1902の2割を足し合わせた曲線である。調整Lt分布曲線1905のピークは、Rt分布曲線1902の成分が加えられる分だけ、Lt分布曲線1901のピークよりも中心寄りに変位する。同様に、調整Rt分布曲線1906は、Lt分布曲線1901の2割と、Rt分布曲線1902の8割を足し合わせた曲線である。調整Rt分布曲線1906のピークは、Lt分布曲線1901の成分が加えられる分だけ、Rt分布曲線1902のピークよりも中心寄りに変位する。   The adjusted Lt distribution curve 1905 is a curve obtained by adding 80% of the Lt distribution curve 1901 and 20% of the Rt distribution curve 1902. The peak of the adjusted Lt distribution curve 1905 is displaced closer to the center than the peak of the Lt distribution curve 1901 as much as the component of the Rt distribution curve 1902 is added. Similarly, the adjusted Rt distribution curve 1906 is a curve obtained by adding 20% of the Lt distribution curve 1901 and 80% of the Rt distribution curve 1902. The peak of the adjusted Rt distribution curve 1906 is displaced closer to the center than the peak of the Rt distribution curve 1902 by the amount to which the component of the Lt distribution curve 1901 is added.

したがって、調整Lt分布曲線1905と調整Rt分布曲線1906のそれぞれのピーク間距離で表される調整視差量は、3D視差量よりも小さくなる。したがって、画像再生時の立体感は、緩和される。一方で、調整Lt分布曲線1905と調整Rt分布曲線1906のそれぞれの分布の広がりは、2D分布曲線1903の広がりと同等なので、ぼけ量は2D画像のそれと等しいと言える。   Therefore, the adjusted parallax amount represented by the distance between the peaks of the adjusted Lt distribution curve 1905 and the adjusted Rt distribution curve 1906 is smaller than the 3D parallax amount. Therefore, the stereoscopic effect during image reproduction is alleviated. On the other hand, since the spread of each of the adjusted Lt distribution curve 1905 and the adjusted Rt distribution curve 1906 is equivalent to the spread of the 2D distribution curve 1903, it can be said that the amount of blur is equal to that of the 2D image.

すなわち、Lt分布曲線1901とRt分布曲線1902をそれぞれどれくらいの割合で加算するかにより、調整視差量を制御することができる。そして、この調整された輝度分布を、視差なし画素から生成されたカラー画像データの各プレーンに適用することにより、視差画素から生成された視差画像データとは異なる立体感を与える左側視点のカラー画像データと右側視点のカラー画像データとを生成することができる。   That is, the amount of adjustment parallax can be controlled depending on the ratio of the Lt distribution curve 1901 and the Rt distribution curve 1902 to be added. Then, by applying this adjusted luminance distribution to each plane of the color image data generated from the non-parallax pixels, the color image of the left viewpoint that gives a stereoscopic effect different from that of the parallax image data generated from the parallax pixels Data and right-view color image data can be generated.

本実施形態においては、RAW画像データセットを構成する5つのプレーンデータから、左側視点のカラー画像データと右側視点のカラー画像データを生成する。左側視点のカラー画像データは、左側視点に対応する赤色プレーンデータであるRLtプレーンデータ、緑色プレーンデータであるGLtプレーンデータ、および青色プレーンデータであるBLtプレーンデータの3つのカラー視差プレーンデータによって構成される。同様に、右側視点のカラー画像データは、右側視点に対応する赤色プレーンデータであるRRtプレーンデータ、緑色プレーンデータであるGRtプレーンデータ、および青色プレーンデータであるBRtプレーンデータの3つのカラー視差プレーンデータによって構成される。 In the present embodiment, color image data for the left viewpoint and color image data for the right viewpoint are generated from the five plane data constituting the RAW image data set. Color image data of the left viewpoint, RLt c plane data is red plane data corresponding to the left viewpoint, a green plane data GLt c plane data, and three color parallax plane data BLt c plane data is blue plane data Consists of. Similarly, the color image data of the right-side perspective is, RRT c plane data is red plane data corresponding to the right viewpoint, a green plane data GRT c plane data, and three of BRt c plane data is blue plane Datacolor Consists of parallax plane data.

図20は、カラー視差プレーンデータの生成処理を説明する図である。特に、カラー視差プレーンのうち赤色視差プレーンである、RLtプレーンデータとRRtプレーンデータの生成処理について示す。 FIG. 20 is a diagram for explaining color parallax plane data generation processing. In particular, a generation process of RLt c plane data and RRt c plane data, which are red parallax planes among color parallax planes, will be described.

赤色視差プレーンは、図15を用いて説明したRnプレーンデータの画素値と、LtプレーンデータおよびRtプレーンデータの輝度値とを用いて生成する。具体的には、例えばRLtプレーンデータの対象画素位置(i,j)の画素値RLtmnを算出する場合、まず、画像処理部205の画素値抽出部231は、Rnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する。次に、画像処理部205の輝度値抽出部232は、Ltプレーンデータの同一画素位置(i,j)から輝度値Ltmnを、Rtプレーンデータの同一画素位置(i,j)から輝度値Rtmnを抽出する。そして、画像処理部205の算出部233は、画素値Rnmnに、輝度値LtmnとRtmnを立体調整パラメータCで分配した値を乗じて、画素値RLtmnを算出する。具体的には、以下の式(1)により算出する。ただし、立体調整パラメータCは、0.5<C<1の範囲で予め設定される。
RLtmn=2Rnmn×{C・Ltmn+(1−C)・Rtmn}/(Ltmn+Rtmn)…(1)
The red parallax plane is generated using the pixel value of the Rn plane data described with reference to FIG. 15 and the luminance value of the Lt plane data and the Rt plane data. Specifically, for example, when calculating the pixel value RLt mn of the target pixel position (i m , j n ) of the RLt c plane data, first, the pixel value extraction unit 231 of the image processing unit 205 is identical to the Rn plane data. A pixel value Rn mn is extracted from the pixel position (i m , j n ). Next, the luminance value extracting unit 232 of the image processing section 205, the same pixel position of Lt plane data (i m, j n) the luminance value Lt mn from the same pixel position of Rt plane data (i m, j n) The luminance value Rt mn is extracted from. The calculation unit 233 of the image processing unit 205, the pixel values Rn mn, by multiplying the value obtained by distributing the luminance value Lt mn and Rt mn stereoscopic adjustment parameter C, and calculates the pixel value RLt mn. Specifically, it is calculated by the following equation (1). However, the three-dimensional adjustment parameter C is preset in the range of 0.5 <C <1.
RLt mn = 2Rn mn × {C · Lt mn + (1-C) · Rt mn } / (Lt mn + Rt mn ) (1)

同様に、RRtプレーンデータの対象画素位置(i,j)の画素値RRtmnを算出する場合も、算出部233は、画素値抽出部231が抽出した画素値Rnmnに、輝度値抽出部232が抽出した輝度値Ltmnと輝度値Rtmnを立体調整パラメータCで分配した値を乗じて算出する。具体的には、以下の式(2)により算出する。
RRtmn=2Rnmn×{C・Rtmn+(1−C)・Ltmn}/(Ltmn+Rtmn)…(2)
Similarly, also when calculating the pixel value RRt mn of the target pixel position (i m , j n ) of the RRt c plane data, the calculation unit 233 adds the luminance value to the pixel value Rn mn extracted by the pixel value extraction unit 231. The luminance value Lt mn extracted by the extraction unit 232 and the luminance value Rt mn are calculated by multiplying the values distributed by the three-dimensional adjustment parameter C. Specifically, it is calculated by the following equation (2).
RRt mn = 2Rn mn × {C · Rt mn + (1-C) · Lt mn } / (Lt mn + Rt mn ) (2)

画像処理部205は、このような処理を、左端かつ上端の画素である(1、1)から右端かつ下端の座標である(i,j)まで順次実行する。 The image processing unit 205 sequentially executes such processing from (1, 1) which is the pixel at the left end and the upper end to (i 0 , j 0 ) which is the coordinates at the right end and the lower end.

そして、赤色視差プレーンであるRLtプレーンデータとRRtプレーンデータの生成処理が完了したら、次に緑色視差プレーンであるGLtプレーンデータとGRtプレーンデータの生成処理を実行する。具体的には、上述の説明においてRnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する代わりに、Gnプレーンデータの同一画素位置(i,j)から画素値Gnmnを抽出して、同様に処理する。さらに、緑色視差プレーンであるGLtプレーンデータとGRtプレーンデータの生成処理が完了したら、次に青色視差プレーンであるBLtプレーンデータとBRtプレーンデータの生成処理を実行する。具体的には、上述の説明においてRnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する代わりに、Bnプレーンデータの同一画素位置(i,j)から画素値Bnmnを抽出して、同様に処理する。 When the generation processing of RLt c plane data and RRt c plane data that are red parallax planes is completed, generation processing of GLt c plane data and GRt c plane data that are green parallax planes is then executed. Specifically, the pixel same pixel position (i m, j n) of Rn plane data in the above description, instead of extracting the pixel values Rn mn from the same pixel position of Gn plane data (i m, j n) from The value Gn mn is extracted and processed in the same way. Further, when the generation processing of the GLt c plane data and the GRt c plane data which are green parallax planes is completed, the generation processing of the BLt c plane data and BRt c plane data which are blue parallax planes is executed next. Specifically, the pixel same pixel position (i m, j n) of Rn plane data in the above description, instead of extracting the pixel values Rn mn from the same pixel position of Bn plane data (i m, j n) from The value Bn mn is extracted and processed in the same way.

以上の処理により、左側視点のカラー画像データ(RLtプレーンデータ、GLtプレーンデータ、BLtプレーンデータ)および右側視点のカラー画像データ(RRtプレーンデータ、GRtプレーンデータ、BRtプレーンデータ)が生成される。すなわち、実際には撮像素子100の画素として存在しない仮想的な出力として、左側視点および右側視点のカラー画像データを、比較的簡易な処理により取得することができる。 Through the above processing, left-view color image data (RLt c- plane data, GLt c- plane data, BLt c- plane data) and right-view color image data (RRt c- plane data, GRt c- plane data, BRt c- plane data) Is generated. That is, the color image data of the left viewpoint and the right viewpoint can be acquired by a relatively simple process as a virtual output that does not actually exist as a pixel of the image sensor 100.

しかも、立体調整パラメータCを0.5<C<1の範囲で変更できるので、視差無し画素による2Dカラー画像のぼけ量を維持したまま、視差量の大きさを調整することができる。したがって、これらの画像データを3D画像対応の再生装置で再生すれば、ユーザは、カラー画像として立体感が適度に調整された3D映像を鑑賞できる。特に、処理が簡易なので高速に画像データを生成することができ、動画像にも対応できる。   In addition, since the stereoscopic adjustment parameter C can be changed in the range of 0.5 <C <1, the amount of parallax can be adjusted while maintaining the amount of blur of the 2D color image due to the pixels without parallax. Therefore, if these image data are played back by a playback device that supports 3D images, the user can view 3D video with a three-dimensional effect adjusted appropriately as a color image. In particular, since the processing is simple, it is possible to generate image data at high speed and to deal with moving images.

上記において、実際の撮像素子100上に視差画素がRGBのいずれの画素に対しても均等に割り振られていれば、3D画像でありながら色再現性の良い高品質のカラー画像データが得られる旨を説明したが、実際にはそのような画素を備えていなくても、以上の処理を施すことにより、これに準じた高品質の3Dカラー画像データを取得できると言える。また、実際の画素として視差画素をRGB画素に対して割り振らなくても良いので、その分、他のプレーンデータを高品質化できる。   In the above description, if parallax pixels are evenly allocated to all RGB pixels on the actual image sensor 100, high-quality color image data with good color reproducibility can be obtained while being a 3D image. However, it can be said that high-quality 3D color image data according to this can be obtained by performing the above processing even if such pixels are not actually provided. In addition, since it is not necessary to allocate parallax pixels to RGB pixels as actual pixels, the quality of other plane data can be improved accordingly.

次に、以上の処理を光強度分布とカラーの観点から説明する。図21は、RGBの光強度分布の変化を説明する図である。図21(a)は、焦点位置から一定量だけずれた位置に存在する物点からの被写体光束を受光した場合の、W画素である視差Lt画素の出力値と視差Rt画素の出力値を並べたグラフである。これらの出力値はカラー情報を含まない輝度値である。また、上述の通り、画素の出力値は光強度に比例するので、グラフは光強度分布を表すとも言える。   Next, the above processing will be described from the viewpoint of light intensity distribution and color. FIG. 21 is a diagram for explaining a change in RGB light intensity distribution. FIG. 21A shows the output value of the parallax Lt pixel and the output value of the parallax Rt pixel when the subject luminous flux from an object point located at a position deviated by a certain amount from the focal position is received. It is a graph. These output values are luminance values not including color information. Further, as described above, since the output value of the pixel is proportional to the light intensity, it can be said that the graph represents the light intensity distribution.

図21(b)は、図21(a)における物点からの被写体光束を受光した場合の、視差無し画素であるR画素、G画素、B画素の出力値を並べたグラフである。これらの出力値は、カラー情報を含む画素値である。また、このグラフも、各色の光強度分布を表すと言える。   FIG. 21B is a graph in which output values of R pixels, G pixels, and B pixels, which are non-parallax pixels, are arranged when the subject luminous flux from the object point in FIG. 21A is received. These output values are pixel values including color information. It can also be said that this graph also represents the light intensity distribution of each color.

C=0.8として対応する画素ごとに上述の処理を施すと、図21(c)のグラフで表される光強度分布となる。図から分かるように、RGBそれぞれの画素値に応じた分布が得られる。   When the above process is performed for each corresponding pixel with C = 0.8, the light intensity distribution represented by the graph in FIG. As can be seen from the figure, a distribution corresponding to the pixel values of RGB is obtained.

次に、視差カラー画像データを生成するまでを、処理フローの観点から説明する。図22は、視差カラー画像データを生成するまでの処理フローである。フローは、撮影動作に連動して開始しても良いし、メモリカード220から対象画像データを読み出すことにより開始しても良い。   Next, the process until the generation of parallax color image data will be described from the viewpoint of the processing flow. FIG. 22 is a processing flow until generation of parallax color image data. The flow may be started in conjunction with the shooting operation, or may be started by reading target image data from the memory card 220.

画像処理部205は、ステップS101で、RAW元画像データを取得する。そして、ステップS102において、図13を用いて説明したように、RAW元画像データを、カラー画像データとしてのRプレーンデータ、Gプレーンデータ、Bプレーンデータ、視差画像データとしてのLtプレーンデータ、Rtプレーンデータに分離する。画像処理部205は、ステップS103で、分離した各プレーンデータに存在する空格子を補間する補間処理を実行する。具体的には、図14を用いて説明したように、近接する画素の出力値を用いて平均化処理等により空格子の出力値を算出する。 In step S101, the image processing unit 205 acquires RAW original image data. Then, in step S102, as described with reference to FIG. 13, the RAW original image data, R 0 plane data as color image data, G 0 plane data, B 0 plane data, Lt 0 plane as the parallax image data Data and Rt 0 plane data are separated. In step S103, the image processing unit 205 executes an interpolation process for interpolating vacancies existing in the separated plane data. Specifically, as described with reference to FIG. 14, the output value of the empty grid is calculated by averaging processing using the output values of adjacent pixels.

画像処理部205は、ステップS104で、各変数の初期化を行う。具体的には、まず、カラー変数Csetに1を代入する。カラー変数Csetは、1=赤、2=緑、3=青を表す。また、座標変数であるiとjに1を代入する。さらに、視差変数Sに1を代入する。視差変数Sは、1=左、2=右を表す。   In step S104, the image processing unit 205 initializes each variable. Specifically, first, 1 is substituted into the color variable Cset. The color variable Cset represents 1 = red, 2 = green, 3 = blue. Also, 1 is substituted into the coordinate variables i and j. Further, 1 is substituted into the parallax variable S. The parallax variable S represents 1 = left, 2 = right.

画像処理部205の画素値抽出部231は、ステップS105において、Csetプレーンの対象画素位置(i,j)から画素値を抽出する。例えばCset=1で、対象画素位置が(1,1)である場合、抽出する画素値は、Rn11である。さらに、画像処理部205の輝度値抽出部232は、ステップS106において、Ltプレーンデータ、Rtプレーンデータの対象画素位置(i,j)から輝度値を抽出する。例えば対象画素位置が(1,1)である場合、抽出する輝度値は、Lt11とRt11である。 In step S105, the pixel value extraction unit 231 of the image processing unit 205 extracts a pixel value from the target pixel position (i, j) of the Cset plane. For example, Cset = 1, when a target pixel position (1,1), pixel values to be extracted is Rn 11. Further, the luminance value extraction unit 232 of the image processing unit 205 extracts a luminance value from the target pixel position (i, j) of the Lt plane data and the Rt plane data in step S106. For example, when the target pixel position is (1, 1), the luminance values to be extracted are Lt 11 and Rt 11 .

画像処理部205の算出部233は、ステップS107において、視差変数Sに対応する対象画素位置(i,j)の画素値を算出する。例えばCset=1、S=1で、対象画素位置が(1,1)である場合、RLt11を算出する。具体的には、例えば、上述の式(1)により算出する。なお、立体調整パラメータCは、予め0.5<C<1の範囲で設定されている。具体的には、例えば、制御部201が、操作部208によりユーザの指示を受け付けて設定する。 In step S107, the calculation unit 233 of the image processing unit 205 calculates the pixel value of the target pixel position (i, j) corresponding to the parallax variable S. For example, when Cset = 1 and S = 1 and the target pixel position is (1, 1), RLt 11 is calculated. Specifically, for example, it is calculated by the above-described equation (1). Note that the three-dimensional adjustment parameter C is set in advance in a range of 0.5 <C <1. Specifically, for example, the control unit 201 receives and sets a user instruction through the operation unit 208.

画像処理部205は、ステップS108で、視差変数Sをインクリメントする。そして、ステップS109で、視差変数Sが2を超えたか否かを判断する。超えていなければステップS107へ戻る。超えていればステップS110へ進む。   In step S108, the image processing unit 205 increments the parallax variable S. In step S109, it is determined whether or not the parallax variable S exceeds 2. If not, the process returns to step S107. If it exceeds, the process proceeds to step S110.

画像処理部205は、ステップS110で、視差変数Sに1を代入すると共に、座標変数iをインクリメントする。そして、ステップS111で、座標変数iがiを超えたか否かを判断する。超えていなければステップS105へ戻る。超えていればステップS112へ進む。 In step S110, the image processing unit 205 assigns 1 to the parallax variable S and increments the coordinate variable i. Then, in step S111, it is determined whether coordinate variable i exceeds i 0. If not, the process returns to step S105. If it exceeds, the process proceeds to step S112.

画像処理部205は、ステップS112で、座標変数iに1を代入すると共に、座標変数jをインクリメントする。そして、ステップS113で、座標変数jがjを超えたか否かを判断する。超えていなければステップS105へ戻る。超えていればステップS114へ進む。 In step S112, the image processing unit 205 assigns 1 to the coordinate variable i and increments the coordinate variable j. Then, in step S113, it is determined whether coordinate variable j exceeds j 0. If not, the process returns to step S105. If it exceeds, the process proceeds to step S114.

ステップS114まで進むと、Csetに対する左右それぞれの全画素の画素値が揃うので、画像処理部205は、これらの画素値を並べて、プレーン画像データを生成する。例えばCset=1である場合、RLtプレーンデータとRRtプレーンデータを生成する。 When the process proceeds to step S114, since the pixel values of all the left and right pixels for Cset are aligned, the image processing unit 205 arranges these pixel values to generate plain image data. For example, when Cset = 1, RLt c plane data and RRt c plane data are generated.

ステップS115ヘ進み、画像処理部205は、座標変数jに1を代入すると共に、カラー変数Csetをインクリメントする。そして、ステップS116で、カラー変数Csetが3を超えたか否かを判断する。超えていなければステップS105へ戻る。超えていれば、左側視点のカラー画像データ(RLtプレーンデータ、GLtプレーンデータ、BLtプレーンデータ)および右側視点のカラー画像データ(RRtプレーンデータ、GRtプレーンデータ、BRtプレーンデータ)の全てが揃ったとして、一連の処理を終了する。 In step S115, the image processing unit 205 assigns 1 to the coordinate variable j and increments the color variable Cset. In step S116, it is determined whether or not the color variable Cset exceeds 3. If not, the process returns to step S105. If it exceeds, color image data of the left viewpoint (RLt c plane data, GLt c plane data, BLt c plane data) and color image data of the right viewpoint (RRt c plane data, GRt c plane data, BRt c plane data) As a result, the series of processes is terminated.

次に、開口部104の好ましい開口形状について説明する。図23は、好ましい開口形状を説明する図である。   Next, a preferable opening shape of the opening 104 will be described. FIG. 23 is a diagram illustrating a preferred opening shape.

視差Lt画素の開口部104l、および視差Rt画素の開口部104rは、それぞれ対応する光電変換素子108に対して中心を含んで互いに反対方向に偏位していることが好ましい。具体的には、開口部104lおよび104rのそれぞれが、光電変換素子108の中心(画素中心)を通る仮想的な中心線322と接する形状であるか、あるいは、中心線322を跨ぐ形状であることが好ましい。   It is preferable that the opening 104l of the parallax Lt pixel and the opening 104r of the parallax Rt pixel are offset in the opposite directions including the center with respect to the corresponding photoelectric conversion element 108. Specifically, each of the openings 104l and 104r has a shape in contact with a virtual center line 322 passing through the center (pixel center) of the photoelectric conversion element 108, or a shape straddling the center line 322. Is preferred.

特に、図示するように、開口部104lの形状と開口部104rの形状は、視差なし画素の開口部104nの形状を中心線322で分割したそれぞれの形状と同一であることが好ましい。別言すれば、開口部104nの形状は、開口部104lの形状と開口部104rの形状を隣接させた形状に等しいことが好ましい。   In particular, as illustrated, the shape of the opening 104l and the shape of the opening 104r are preferably the same as the respective shapes obtained by dividing the shape of the opening 104n of the non-parallax pixel by the center line 322. In other words, the shape of the opening 104n is preferably equal to the shape in which the shape of the opening 104l and the shape of the opening 104r are adjacent to each other.

次に、図19から図21で説明した概念、処理とは異なる概念、処理について説明する。図24は、他の調整視差量の概念を説明するための光強度分布を示す図である。   Next, a concept and process different from the concept and process described in FIGS. 19 to 21 will be described. FIG. 24 is a diagram illustrating a light intensity distribution for explaining another concept of the adjustment parallax amount.

図24(a)においてLt分布曲線1901とRt分布曲線1902は、LtプレーンデータとRtプレーンデータの実際の輝度値をプロットした分布曲線である。具体的には、視差方向のある画素配列に着目し、その視差方向における画素位置に対応させて輝度値をプロットした曲線である。これらの曲線は、例えば、図18における分布曲線1804、1805に相当する。そして、Lt分布曲線1901とRt分布曲線1902のそれぞれのピーク間距離は3D視差量を表し、この距離が大きいほど、画像再生時の立体感が強くなる。   In FIG. 24A, an Lt distribution curve 1901 and an Rt distribution curve 1902 are distribution curves in which actual luminance values of Lt plane data and Rt plane data are plotted. Specifically, it is a curve in which luminance values are plotted in correspondence with pixel positions in the parallax direction, paying attention to a pixel array having a parallax direction. These curves correspond to, for example, the distribution curves 1804 and 1805 in FIG. The distance between the peaks of the Lt distribution curve 1901 and the Rt distribution curve 1902 represents the 3D parallax amount, and the greater the distance, the stronger the stereoscopic effect during image reproduction.

このLt分布曲線1901とRt分布曲線1902に対し、それぞれの画素位置において以下の2式を用いて算出した値をそれぞれプロットした、2つの変調曲線を生成する。
Lt変調曲線…(1/2−C)(Lt−Rt)
Rt変調曲線…(1/2−C)(Rt−Lt)
ただし、Cは立体調整パラメータであり、通常は0<C<0.5の実数が採用される。
Two modulation curves are generated by plotting the values calculated by using the following two expressions at the respective pixel positions with respect to the Lt distribution curve 1901 and the Rt distribution curve 1902.
Lt modulation curve (1 / 2-C) (Lt-Rt)
Rt modulation curve (1 / 2-C) (Rt-Lt)
However, C is a three-dimensional adjustment parameter, and a real number of 0 <C <0.5 is usually adopted.

図24(b)は、立体調整パラメータCの値を変化させたときの様子を示す。左図はC=0.2の場合の分布であり、Lt変調曲線1913とRt変調曲線1914は、光強度に関して対称形状を成す。同様に中図はC=0.3の場合の分布であり、右図はC=0.4の場合を示す。   FIG. 24B shows a state when the value of the three-dimensional adjustment parameter C is changed. The left figure shows the distribution when C = 0.2, and the Lt modulation curve 1913 and the Rt modulation curve 1914 are symmetrical with respect to the light intensity. Similarly, the middle figure shows the distribution when C = 0.3, and the right figure shows the case when C = 0.4.

図24(c)は、立体変調を施す対象となるカラー画像データのプレーンデータの画素値をプロットした分布曲線1915を示す。具体的には、視差方向のある画素配列に着目し、その視差方向における画素位置に対応させて画素値をプロットした曲線である。この分布曲線も、光強度分布を表すと言える。   FIG. 24C shows a distribution curve 1915 in which pixel values of plane data of color image data to be subjected to stereo modulation are plotted. Specifically, it is a curve in which pixel values are plotted in correspondence with pixel positions in the parallax direction, focusing on a pixel array in the parallax direction. It can be said that this distribution curve also represents the light intensity distribution.

図24(d)は、調整Lt分布曲線1916と調整Rt分布曲線1917を示す。具体的には、調整Lt分布曲線1916は、分布曲線1915にLt変調曲線1913が加算されて生成される。また、調整Rt分布曲線1917は、分布曲線1915にRt変調曲線1914が加算されて生成される。左図はC=0.2、中図はC=0.3、右図はC=0.4の場合の分布を示す。調整Lt分布曲線1916と調整Rt分布曲線1917のそれぞれのピーク間距離は調整視差量を表す。   FIG. 24D shows an adjusted Lt distribution curve 1916 and an adjusted Rt distribution curve 1917. Specifically, the adjusted Lt distribution curve 1916 is generated by adding the Lt modulation curve 1913 to the distribution curve 1915. The adjusted Rt distribution curve 1917 is generated by adding the Rt modulation curve 1914 to the distribution curve 1915. The left figure shows the distribution when C = 0.2, the middle figure shows C = 0.3, and the right figure shows C = 0.4. The distance between the peaks of the adjusted Lt distribution curve 1916 and the adjusted Rt distribution curve 1917 represents the adjusted parallax amount.

例えば、C=0.4の場合のLt変調曲線1913およびRt変調曲線1914の変化量は、C=0.2の場合のそれよりも小さい。このような関係から、C=0.4の場合の調整視差量は、C=0.2の場合のそれよりも小さくなる。しかも、立体調整パラメータCが0<C<0.5を満たす場合には、調整視差量は、3D視差量よりも小さくなる。したがって、画像再生時の立体感は、緩和される。一方で、調整Lt分布曲線1916と調整Rt分布曲線1917のそれぞれの分布の広がりは、分布曲線1915の広がりとほぼ同等なので、ぼけ量は2D画像のそれと等しいと言える。   For example, the change amount of the Lt modulation curve 1913 and the Rt modulation curve 1914 when C = 0.4 is smaller than that when C = 0.2. From this relationship, the adjusted parallax amount when C = 0.4 is smaller than that when C = 0.2. In addition, when the stereoscopic adjustment parameter C satisfies 0 <C <0.5, the adjustment parallax amount is smaller than the 3D parallax amount. Therefore, the stereoscopic effect during image reproduction is alleviated. On the other hand, since the spread of each of the adjusted Lt distribution curve 1916 and the adjusted Rt distribution curve 1917 is substantially equal to the spread of the distribution curve 1915, it can be said that the amount of blur is equal to that of the 2D image.

すなわち、Lt分布曲線1901とRt分布曲線1902の差をどれくらいの割合で相関させるかにより、調整視差量を制御することができる。このような演算を施すことにより、視差画素から生成された視差画像データとは異なる立体感を与える左側視点のカラー画像データと右側視点のカラー画像データとを生成することができる。   That is, the amount of adjusted parallax can be controlled by how much the difference between the Lt distribution curve 1901 and the Rt distribution curve 1902 is correlated. By performing such calculation, it is possible to generate left-viewpoint color image data and right-viewpoint color image data that give a stereoscopic effect different from that of the parallax image data generated from the parallax pixels.

なお、立体調整パラメータCの値をC<0の範囲で変化させることにより、もとの3D視差量より強調した調整視差量を得たり、0.5<Cの範囲で変化させることにより、視差方向が逆転する逆視を実現したり、様々な映像効果を付与することもできる。   In addition, by changing the value of the stereoscopic adjustment parameter C in the range of C <0, an adjustment parallax amount emphasized from the original 3D parallax amount is obtained, or by changing in the range of 0.5 <C, the parallax can be obtained. It is possible to realize reverse viewing in which the direction is reversed, and to apply various video effects.

本実施形態においては、RAW画像データセットを構成する5つのプレーンデータから、左側視点のカラー画像データと右側視点のカラー画像データを生成する。左側視点のカラー画像データは、左側視点に対応する赤色プレーンデータであるRLtプレーンデータ、緑色プレーンデータであるGLtプレーンデータ、および青色プレーンデータであるBLtプレーンデータの3つのカラー視差プレーンデータによって構成される。同様に、右側視点のカラー画像データは、右側視点に対応する赤色プレーンデータであるRRtプレーンデータ、緑色プレーンデータであるGRtプレーンデータ、および青色プレーンデータであるBRtプレーンデータの3つのカラー視差プレーンデータによって構成される。 In the present embodiment, color image data for the left viewpoint and color image data for the right viewpoint are generated from the five plane data constituting the RAW image data set. Color image data of the left viewpoint, RLt c plane data is red plane data corresponding to the left viewpoint, a green plane data GLt c plane data, and three color parallax plane data BLt c plane data is blue plane data Consists of. Similarly, the color image data of the right-side perspective is, RRT c plane data is red plane data corresponding to the right viewpoint, a green plane data GRT c plane data, and three of BRt c plane data is blue plane Datacolor Consists of parallax plane data.

図25は、カラー視差プレーンデータの生成処理を説明する図である。特に、カラー視差プレーンのうち赤色視差プレーンである、RLtプレーンデータとRRtプレーンデータの生成処理について示す。 FIG. 25 is a diagram for explaining color parallax plane data generation processing. In particular, a generation process of RLt c plane data and RRt c plane data, which are red parallax planes among color parallax planes, will be described.

赤色視差プレーンは、図15を用いて説明したRnプレーンデータの画素値と、LtプレーンデータおよびRtプレーンデータの輝度値とを用いて生成する。具体的には、例えばRLtプレーンデータの対象画素位置(i,j)の画素値RLtmnを算出する場合、まず、画像処理部205の画素値抽出部231は、Rnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する。次に、画像処理部205の輝度値抽出部232は、Ltプレーンデータの同一画素位置(i,j)から輝度値Ltmnを、Rtプレーンデータの同一画素位置(i,j)から輝度値Rtmnを抽出する。そして、画像処理部205の算出部233は、算出したい画素値RLtmnと抽出した画素値Rnmnとの差が、抽出した輝度値LtmnとRtmnとの差に立体調整パラメータCに関する項を乗じた値と相関を保つように、画素値RLtmnを算出する。具体的には、以下の式(3)により算出する。ただし、立体調整パラメータCは、0<C<0.5の範囲で予め設定される。
RLtmn−Rnmn=(1/2−C)(Ltmn−Rtmn) …(3)
The red parallax plane is generated using the pixel value of the Rn plane data described with reference to FIG. 15 and the luminance value of the Lt plane data and the Rt plane data. Specifically, for example, when calculating the pixel value RLt mn of the target pixel position (i m , j n ) of the RLt c plane data, first, the pixel value extraction unit 231 of the image processing unit 205 is identical to the Rn plane data. A pixel value Rn mn is extracted from the pixel position (i m , j n ). Next, the luminance value extracting unit 232 of the image processing section 205, the same pixel position of Lt plane data (i m, j n) the luminance value Lt mn from the same pixel position of Rt plane data (i m, j n) The luminance value Rt mn is extracted from. Then, the calculation unit 233 of the image processing unit 205 adds a term relating to the three-dimensional adjustment parameter C to the difference between the pixel value RLt mn to be calculated and the extracted pixel value Rn mn as the difference between the extracted luminance values Lt mn and Rt mn. The pixel value RLt mn is calculated so as to maintain a correlation with the multiplied value. Specifically, it is calculated by the following equation (3). However, the three-dimensional adjustment parameter C is preset in the range of 0 <C <0.5.
RLt mn -Rn mn = (1 / 2-C) (Lt mn -Rt mn ) (3)

同様に、RRtプレーンデータの対象画素位置(i,j)の画素値RRtmnを算出する場合も、算出部233は、算出したい画素値RRtmnと抽出した画素値Rnmnとの差が、抽出した輝度値LtmnとRtmnとの差に立体調整パラメータCに関する項を乗じた値と相関を保つように、画素値RRtmnを算出する。具体的には、以下の式(4)により算出する。ただし、ここでの立体調整パラメータCは、式(3)のCと同値である。
RRtmn−Rnmn=(1/2−C)(Rtmn−Ltmn) …(4)
Similarly, the target pixel position of RRT plane data (i m, j n) may be calculated pixel value RRT mn of calculating unit 233, the difference between the pixel values Rn mn and the extracted pixel values RRT mn to be calculated The pixel value RRt mn is calculated so as to maintain a correlation with a value obtained by multiplying the difference between the extracted luminance values Lt mn and Rt mn by a term relating to the stereo adjustment parameter C. Specifically, it is calculated by the following equation (4). However, the three-dimensional adjustment parameter C here has the same value as C in Expression (3).
RRt mn -Rn mn = (1 / 2-C) (Rt mn -Lt mn ) (4)

画像処理部205は、このような処理を、左端かつ上端の画素である(1、1)から右端かつ下端の座標である(i,j)まで順次実行する。なお、上記式(3)、式(4)の例では、立体調整パラメータCに関する項として(1/2−C)を規定したが、算出したい画素値RRtmnと抽出した画素値Rnmnとの差と、抽出した輝度値LtmnとRtmnとの差の相関関係は、適宜変更することができる。視差画素の開口部の偏心量、大きさ、視差なし画素の開口部との相対的な関係等のパラメータを考慮して、比例係数を変更したり、補正項として定数を加算したりして、相関関係を適宜調整しても良い。なお、算出したい画素値が画素値RRtmn、GLtmn、GRtmn、BLtmn、BRtmnであっても、上記の関係は同様である。 The image processing unit 205 sequentially executes such processing from (1, 1) which is the pixel at the left end and the upper end to (i 0 , j 0 ) which is the coordinates at the right end and the lower end. In the examples of the above formulas (3) and (4), (1 / 2−C) is defined as the term relating to the stereo adjustment parameter C, but the pixel value RRt mn to be calculated and the extracted pixel value Rn mn The correlation between the difference and the difference between the extracted luminance values Lt mn and Rt mn can be changed as appropriate. In consideration of parameters such as the amount of eccentricity of the opening of the parallax pixel, the size, and the relative relationship with the opening of the pixel without parallax, the proportionality coefficient is changed, or a constant is added as a correction term, The correlation may be adjusted as appropriate. The above relationship is the same even if the pixel values to be calculated are the pixel values RRt mn , GLt mn , GRt mn , BLt mn , BRt mn .

赤色視差プレーンであるRLtプレーンデータとRRtプレーンデータの生成処理が完了したら、次に緑色視差プレーンであるGLtプレーンデータとGRtプレーンデータの生成処理を実行する。具体的には、上述の説明においてRnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する代わりに、Gnプレーンデータの同一画素位置(i,j)から画素値Gnmnを抽出して、同様に処理する。さらに、緑色視差プレーンであるGLtプレーンデータとGRtプレーンデータの生成処理が完了したら、次に青色視差プレーンであるBLtプレーンデータとBRtプレーンデータの生成処理を実行する。具体的には、上述の説明においてRnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する代わりに、Bnプレーンデータの同一画素位置(i,j)から画素値Bnmnを抽出して、同様に処理する。 When the generation processing of RLt c plane data and RRt c plane data which are red parallax planes is completed, generation processing of GLt c plane data and GRt c plane data which are green parallax planes is executed next. Specifically, the pixel same pixel position (i m, j n) of Rn plane data in the above description, instead of extracting the pixel values Rn mn from the same pixel position of Gn plane data (i m, j n) from The value Gn mn is extracted and processed in the same way. Further, when the generation processing of the GLt c plane data and the GRt c plane data which are green parallax planes is completed, the generation processing of the BLt c plane data and BRt c plane data which are blue parallax planes is executed next. Specifically, the pixel same pixel position (i m, j n) of Rn plane data in the above description, instead of extracting the pixel values Rn mn from the same pixel position of Bn plane data (i m, j n) from The value Bn mn is extracted and processed in the same way.

以上の処理により、左側視点のカラー画像データ(RLtプレーンデータ、GLtプレーンデータ、BLtプレーンデータ)および右側視点のカラー画像データ(RRtプレーンデータ、GRtプレーンデータ、BRtプレーンデータ)が生成される。すなわち、実際には撮像素子100の画素として存在しない仮想的な出力として、左側視点および右側視点のカラー画像データを、比較的簡易な処理により取得することができる。 Through the above processing, left-view color image data (RLt c- plane data, GLt c- plane data, BLt c- plane data) and right-view color image data (RRt c- plane data, GRt c- plane data, BRt c- plane data) Is generated. That is, the color image data of the left viewpoint and the right viewpoint can be acquired by a relatively simple process as a virtual output that does not actually exist as a pixel of the image sensor 100.

しかも、立体調整パラメータCを変更できるので、視差無し画素による2Dカラー画像のぼけ量を維持したまま、視差量の大きさを調整することができる。したがって、これらの画像データを3D画像対応の再生装置で再生すれば、ユーザは、カラー画像として立体感が適度に調整された3D映像を鑑賞できる。特に、処理が簡易なので高速に画像データを生成することができ、動画像にも対応できる。なお、生成した左側視点のカラー画像データは、Ltプレーンデータ等の由来する左側視点の視差画像データに、生成した右側視点のカラー画像データは、Rtプレーンデータ等の由来する右側視点の視差画像データに関連付けて記録しても良い。このように、生成した画像データを由来する画像データと関連性を持たせて記録することにより、画像再生時の管理等を容易にできる。関連づけは、例えばそれぞれのヘッダ情報に関連画像データとしてファイル名を記述する。この場合、画像処理部205は、関連情報を付加する付加部としての役割を担う。   Moreover, since the three-dimensional adjustment parameter C can be changed, the amount of parallax can be adjusted while maintaining the blur amount of the 2D color image due to the non-parallax pixels. Therefore, if these image data are played back by a playback device that supports 3D images, the user can view 3D video with a three-dimensional effect adjusted appropriately as a color image. In particular, since the processing is simple, it is possible to generate image data at high speed and to deal with moving images. The generated left-view color image data is the left-view parallax image data derived from the Lt plane data, and the generated right-view color image data is the right-view parallax image data derived from the Rt plane data. It may be recorded in association with. In this way, by recording the generated image data so as to be related to the image data derived from it, it is possible to easily manage the image during reproduction. For the association, for example, a file name is described as related image data in each header information. In this case, the image processing unit 205 plays a role as an adding unit that adds related information.

上記において、実際の撮像素子100上に視差画素がRGBのいずれの画素に対しても均等に割り振られていれば、3D画像でありながら色再現性の良い高品質のカラー画像データが得られる旨を説明したが、実際にはそのような画素を備えていなくても、以上の処理を施すことにより、これに準じた高品質の3Dカラー画像データを取得できると言える。また、実際の画素として視差画素をRGB画素に対して割り振らなくても良いので、その分、他のプレーンデータを高品質化できる。   In the above description, if parallax pixels are evenly allocated to all RGB pixels on the actual image sensor 100, high-quality color image data with good color reproducibility can be obtained while being a 3D image. However, it can be said that high-quality 3D color image data according to this can be obtained by performing the above processing even if such pixels are not actually provided. In addition, since it is not necessary to allocate parallax pixels to RGB pixels as actual pixels, the quality of other plane data can be improved accordingly.

次に、以上の処理を光強度分布の観点から説明する。図26は、光強度分布の変化を説明する図である。図26(a)は、焦点位置から一定量だけずれた位置に存在する物点からの被写体光束を受光した場合の、W画素である視差Lt画素の出力値と視差Rt画素の出力値を並べたグラフである。これらの出力値はカラー情報を含まない輝度値である。また、上述の通り、画素の出力値は光強度に比例するので、グラフは光強度分布を表すとも言える。   Next, the above processing will be described from the viewpoint of light intensity distribution. FIG. 26 is a diagram for explaining a change in the light intensity distribution. FIG. 26A shows the output values of the parallax Lt pixel and the parallax Rt pixel, which are W pixels, when the subject luminous flux is received from an object point located at a position deviated from the focal position by a certain amount. It is a graph. These output values are luminance values not including color information. Further, as described above, since the output value of the pixel is proportional to the light intensity, it can be said that the graph represents the light intensity distribution.

図26(b)は、図26(a)における視差Lt画素の出力値から視差Rt画素の出力値を引いた値と、視差Rt画素の出力値から視差Lt画素の出力値を引いた値に、それぞれ(1/2−C)を乗じて並べたグラフである。図の例では立体調整パラメータCとしてC=0.2を採用する。これらの曲線は、図24のLt変調曲線1913とRt変調曲線1914に相当する。   FIG. 26B shows a value obtained by subtracting the output value of the parallax Rt pixel from the output value of the parallax Lt pixel in FIG. 26A and a value obtained by subtracting the output value of the parallax Lt pixel from the output value of the parallax Rt pixel. These are graphs arranged by multiplying (1 / 2-C), respectively. In the example shown in the figure, C = 0.2 is adopted as the three-dimensional adjustment parameter C. These curves correspond to the Lt modulation curve 1913 and the Rt modulation curve 1914 of FIG.

図21(c)は、図20(a)における物点からの被写体光束を受光した場合の、視差無し画素であるR画素、G画素、B画素の出力値を並べたグラフである。これらの出力値は、カラー情報を含む画素値である。また、このグラフも、各色の光強度分布を表すと言える。   FIG. 21C is a graph in which output values of R pixels, G pixels, and B pixels, which are pixels with no parallax, are arranged when the subject luminous flux from the object point in FIG. 20A is received. These output values are pixel values including color information. It can also be said that this graph also represents the light intensity distribution of each color.

対応する画素ごとに上述の処理を施すと、図25(d)のグラフで表される光強度分布となる。図から分かるように、あたかも、実際のRLt画素、RRt画素、GLt画素、GRt画素、BLt画素、BRt画素からの出力値を並べたかのような分布となる。なお、視差カラー画像データを生成するまでの処理フローは図22の処理と同様である。この場合、ステップS107において、立体調整パラメータCは、予め0<C<0.5の範囲で設定されている。   When the above-described processing is performed for each corresponding pixel, a light intensity distribution represented by the graph of FIG. As can be seen from the figure, the distribution is as if the output values from the actual RLt pixels, RRt pixels, GLt pixels, GRt pixels, BLt pixels, and BRt pixels are arranged. Note that the processing flow until the generation of parallax color image data is the same as the processing in FIG. In this case, in step S107, the three-dimensional adjustment parameter C is set in advance in a range of 0 <C <0.5.

以上の説明においては、撮像素子100がB'−1の繰り返しパターンを採用する場合を例に説明した。すなわち、視差画素がW画素であって、色情報を含まない輝度画像データとしての視差画像データを利用して、左側視点のカラー画像データと右側視点のカラー画像データの6プレーンデータを生成する例を説明した。しかし、上述の通り、カラーフィルタの配列に対して、視差画素と視差なし画素を、何色の画素にどのような周期で割り振っていくかにより、膨大な数の繰り返しパターンが設定され得る。特定色のカラーフィルタに視差画素が割り振られた撮像素子100の場合、上述の処理を多少変更して左側視点のカラー画像データと右側視点のカラー画像データの6プレーンデータを揃える。以下に具体的な手順について説明する。   In the above description, the case where the image sensor 100 employs a B′-1 repeating pattern has been described as an example. That is, an example of generating 6 plane data of color image data of the left viewpoint and color image data of the right viewpoint by using the parallax image data as luminance image data that has W pixels and no color information. Explained. However, as described above, an enormous number of repetitive patterns can be set depending on how many colors of pixels the parallax pixels and non-parallax pixels are allocated to the color filter array. In the case of the image sensor 100 in which parallax pixels are assigned to a color filter of a specific color, the above processing is slightly changed to align 6 plane data of color image data of the left viewpoint and color image data of the right viewpoint. A specific procedure will be described below.

図27は、他の繰り返しパターンを採用する撮像素子100におけるプレーン分離処理を説明する図である。図の例では、撮像素子100は、上述のA−1の繰り返しパターンを採用する。A−1の繰り返しパターンは、ベイヤー配列におけるGb画素が視差Lt画素となり、Gr画素が視差Rt画素となっている。   FIG. 27 is a diagram illustrating plane separation processing in the image sensor 100 that employs another repetitive pattern. In the example shown in the figure, the image sensor 100 employs the above-described repeating pattern A-1. In the repeating pattern A-1, Gb pixels in the Bayer array are parallax Lt pixels, and Gr pixels are parallax Rt pixels.

このような撮像素子100から出力されたRAW元画像データからは、カラー画像データとして、RプレーンデータとBプレーンデータは分離されるものの、Gプレーンデータは分離され得ない。また、視差画像データとして分離されるLtプレーンデータとRtプレーンデータは、緑色の色情報を有している。別言すると、視差画像データは、被写体光束のうち緑色波長成分を捉えた輝度画像データであると言える。したがって、これらのプレーンデータの各出力値は、輝度値として扱うことができる。 From the RAW original image data output from such an image sensor 100, although R 0 plane data and B 0 plane data are separated as color image data, G 0 plane data cannot be separated. Further, the Lt 0 plane data and the Rt 0 plane data separated as the parallax image data have green color information. In other words, it can be said that the parallax image data is luminance image data obtained by capturing a green wavelength component in the subject luminous flux. Therefore, each output value of these plane data can be handled as a luminance value.

分離されたプレーンデータに上述の補間処理を施して、それぞれに存在する空格子を埋める。図28は、補間処理後のRAW画像データセットのデータ構造を説明する図である。   The above-described interpolation processing is performed on the separated plane data, and the empty grids existing in each are filled. FIG. 28 is a diagram for explaining the data structure of the RAW image data set after the interpolation processing.

Rnプレーンデータ、Bnプレーンデータ、LtプレーンデータおよびRtプレーンデータを生成する補間処理は上述の例と同様である。また、画像処理部205は、GLtプレーンデータとGRtプレーンデータの対応する画素ごとに平均値を算出してGnプレーンデータを生成する。   Interpolation processing for generating Rn plane data, Bn plane data, Lt plane data, and Rt plane data is the same as in the above example. In addition, the image processing unit 205 calculates an average value for each pixel corresponding to the GLt plane data and the GRt plane data, and generates Gn plane data.

Rnプレーンデータに対して視差画像データを用いてRLtプレーンデータとRRtプレーンデータを生成する処理、Gnプレーンデータに対して視差画像データを用いてGLtプレーンデータとGRtプレーンデータを生成する処理、およびBnプレーンデータに対して視差画像データを用いてBLtプレーンデータとBRtプレーンデータを生成する処理は、上述の例と同様である。 Processing for generating RLt c plane data and RRt c plane data using parallax image data for Rn plane data, and generating GLt c plane data and GRt c plane data using parallax image data for Gn plane data The process and the process of generating BLt c plane data and BRt c plane data using parallax image data for the Bn plane data are the same as in the above-described example.

以上の説明においては、被写体像のカラーを構成する原色として、赤色、緑色および青色の3つを用いた。しかし、翠色などを加えた4つ以上を原色としても良い。また、赤色、緑色および青色に代えて、イエロー、マゼンタ、シアンの組み合わせによる補色の3原色を採用することもできる。   In the above description, three primary colors, red, green and blue, are used as the primary colors constituting the color of the subject image. However, four or more colors including amber color may be used as primary colors. Instead of red, green, and blue, three primary colors that are complementary colors of yellow, magenta, and cyan can be used.

上述の式(1)と式(2)においては、立体調整パラメータCの範囲を、0.5<C<1とした。C=1とすれば、実際には撮像素子100の画素として存在しない、RGBいずれかのカラーフィルタを併せ持つ視差Lt画素および視差Rt画素の仮想的な出力として、左側視点および右側視点のカラー画像データを生成することができる。また、C=0.5とすれば、図28のGnプレーンデータを例のように、2Dカラー画像データを生成することができる。また、C=0とすれば、左右の輝度分布が逆転した視差画像データとなる。また、これら以外の値を採用すれば、逆視などさらに特殊な視差画像データを得ることができる。   In the above formulas (1) and (2), the range of the stereo adjustment parameter C is set to 0.5 <C <1. If C = 1, the color image data of the left viewpoint and the right viewpoint as virtual outputs of the parallax Lt pixel and the parallax Rt pixel that do not actually exist as the pixels of the image sensor 100 and have any of RGB color filters. Can be generated. If C = 0.5, 2D color image data can be generated as in the Gn plane data of FIG. If C = 0, the parallax image data is obtained by reversing the left and right luminance distributions. If values other than these are employed, more specific parallax image data such as reverse viewing can be obtained.

また、図22のフローにおける処理では、立体調整パラメータCの値として、一貫して同一値を適用した。しかし、例えば被写体像の特徴に併せて、領域ごとにCの値を変更しても良い。具体的には、対象画素位置(i,j)に応じてCを変更する。Cをどのように変更するかは、分割された領域に対して事前にユーザから指示を受け付けることもできるし、顔認識技術等により領域ごとに適当な値を設定することもできる。Cの値を可変とすることにより、同一画像内でも領域ごとに立体感の異なる画像が得られる。   In the processing in the flow of FIG. 22, the same value is consistently applied as the value of the three-dimensional adjustment parameter C. However, for example, the value of C may be changed for each region in accordance with the characteristics of the subject image. Specifically, C is changed according to the target pixel position (i, j). As for how to change C, it is possible to accept an instruction from the user in advance for the divided area, or it is possible to set an appropriate value for each area by face recognition technology or the like. By making the value of C variable, images with different stereoscopic effects can be obtained for each region even within the same image.

上述においては、左側視点のカラー画像データおよび右側視点のカラー画像データをペアで生成した。つまり、式(1)を適用する場合に、立体調整パラメータCを0.5<C<1の範囲で設定すれば、式(2)は、式(1)に対してCと1−Cを入れ替えた関係となる。この場合、式(1)から生成されるカラー画像データは、左側視点のカラー画像データとして、例えばLtプレーンデータと関連付けて管理され、式(2)から生成されるカラー画像データは、右側視点のカラー画像データとして、例えばRtプレーンデータと関連付けて管理される。このとき、画像処理部205は、関連付けを実行する付加部の機能を担う。   In the above description, the color image data of the left viewpoint and the color image data of the right viewpoint are generated in pairs. That is, when applying the formula (1), if the stereo adjustment parameter C is set in the range of 0.5 <C <1, the formula (2) is obtained by substituting C and 1-C for the formula (1). It becomes a replaced relationship. In this case, the color image data generated from Expression (1) is managed as color image data of the left viewpoint, for example, in association with Lt plane data, and the color image data generated from Expression (2) is The color image data is managed in association with, for example, Rt plane data. At this time, the image processing unit 205 functions as an adding unit that executes association.

また、上述の式(3)と式(4)においては、立体調整パラメータCの範囲を、0.5<C<1とした。しかし、上述の式(1)と式(2)において立体調整パラメータCの値を変更すれば多様な画像データを取得できたのと同様に、式(3)と式(4)の立体調整パラメータCも変更することにより、様々な画像データを取得することができる。   Further, in the above formulas (3) and (4), the range of the stereo adjustment parameter C is set to 0.5 <C <1. However, similarly to the case where various image data can be obtained by changing the value of the stereo adjustment parameter C in the above formulas (1) and (2), the stereo adjustment parameters of the formulas (3) and (4) are obtained. Various image data can be acquired by changing C as well.

また、上述の式(3)と式(4)を図22のフローに適用する場合も、立体調整パラメータCの値として、一貫して同一値を適用するばかりでなく、例えば被写体像の特徴に併せて、領域ごとにCの値を変更しても良い。   Further, when the above formulas (3) and (4) are applied to the flow of FIG. 22, not only the same value is consistently applied as the value of the three-dimensional adjustment parameter C but also, for example, in the feature of the subject image. In addition, the value of C may be changed for each region.

上述においては、左側視点のカラー画像データおよび右側視点のカラー画像データをペアで生成した。つまり、式(3)を適用する場合に、立体調整パラメータCを0.5<C<1の範囲で設定すれば、式(4)は、式(3)に対してCと1−Cを入れ替えた関係となる。この場合、式(3)から生成されるカラー画像データは、左側視点のカラー画像データとして、例えばLtプレーンデータと関連付けて管理され、式(4)から生成されるカラー画像データは、右側視点のカラー画像データとして、例えばRtプレーンデータと関連付けて管理される。このとき、画像処理部205は、関連付けを実行する付加部の機能を担う。   In the above description, the color image data of the left viewpoint and the color image data of the right viewpoint are generated in pairs. That is, when applying the formula (3), if the stereo adjustment parameter C is set in a range of 0.5 <C <1, the formula (4) is obtained by substituting C and 1-C for the formula (3). It becomes a replaced relationship. In this case, the color image data generated from Expression (3) is managed as color image data of the left viewpoint, for example, in association with Lt plane data, and the color image data generated from Expression (4) is The color image data is managed in association with, for example, Rt plane data. At this time, the image processing unit 205 functions as an adding unit that executes association.

上述においては、例えば画像処理部205が含む画素値抽出部231、輝度値抽出部232および算出部233などは、デジタルカメラ10を構成する各構成要素の機能としてそれぞれの処理を説明した。また、制御部201および画像処理部205を動作させる制御プログラムは、デジタルカメラ10を構成する各ハードウェアを、上述の処理を実行させる構成要素として機能させ得る。また、カラー画像データを生成するこれらの処理は、デジタルカメラ10で行わなくても、外部のパーソナルコンピュータなどの機器で行っても良い。この場合、外部のパーソナルコンピュータなどの機器は画像処理装置として機能する。画像処理装置は、例えばRAW元画像データを取得してカラー画像データを生成する。画像処理装置は、RAW元画像データを取得した場合は、上述のプレーン分離処理、プレーンデータの補間処理も実行する。また、画像処理装置は、撮像装置側で補間処理が施されたプレーンデータを取得しても良い。   In the above description, for example, the pixel value extraction unit 231, the luminance value extraction unit 232, the calculation unit 233, and the like included in the image processing unit 205 have been described as functions of the respective components constituting the digital camera 10. Further, the control program that operates the control unit 201 and the image processing unit 205 can cause each hardware component of the digital camera 10 to function as a component that executes the above-described processing. In addition, these processes for generating color image data may be performed not by the digital camera 10 but by an external device such as a personal computer. In this case, an external device such as a personal computer functions as an image processing apparatus. For example, the image processing apparatus acquires RAW original image data and generates color image data. When the RAW original image data is acquired, the image processing apparatus also executes the above-described plane separation processing and plane data interpolation processing. The image processing apparatus may acquire plane data that has undergone interpolation processing on the imaging apparatus side.

次に、これまで説明した上述の実施例(実施例1)に対して別の実施例(実施例2)について説明する。実施例1では、左視点のカラー画像と右視点のカラー画像を生成するために通常画像Rn,Gn,Bnの色面情報を、左視点の輝度画像Ltと右視点の輝度画像Rtの平均画像に対して、左視点のカラー画像を作る場合には、左視点の輝度画像と右視点の輝度画像の混合画像と相加平均画像との比が一定に保たれるようにして左視点の輝度画像に重きを置きながらなぞらえて、左視点のカラー画像を生成する概念を示した。実施例2では、別の式を提示する。式(1)、式(2)で示した式は以下のような演算式に置き換える。   Next, another example (Example 2) will be described with respect to the above-described Example (Example 1). In the first embodiment, in order to generate a color image of the left viewpoint and a color image of the right viewpoint, the color plane information of the normal images Rn, Gn, and Bn is used, and an average image of the luminance image Lt of the left viewpoint and the luminance image Rt of the right viewpoint. On the other hand, when creating a color image of the left viewpoint, the luminance of the left viewpoint is maintained so that the ratio of the mixed image of the luminance image of the left viewpoint and the luminance image of the right viewpoint and the arithmetic average image is kept constant. The concept of generating a color image of the left viewpoint was shown by comparing the images with emphasis. In Example 2, another formula is presented. The expressions shown in Expression (1) and Expression (2) are replaced with the following arithmetic expressions.

左視点のカラー画像の生成
RLt=Rnx(Lt(1-d)*Rtd)/√(Lt*Rt)
GLt=Gnx(Lt(1-d)*Rtd)/√(Lt*Rt)
BLt=Bnx(Lt(1-d)*Rtd)/√(Lt*Rt)
右視点のカラー画像の生成
RRt=Rnx(Rt(1-d)*Ltd)/√(Lt*Rt)
GRt=Gnx(Rt(1-d)*Ltd)/√(Lt*Rt)
BRt=Bnx(Rt(1-d)*Ltd)/√(Lt*Rt)
ただし、立体調整パラメータdは、0≦d≦0.5の範囲の値をとる。
Generate color image of left viewpoint
RLt = Rnx (Lt (1-d) * Rt d ) / √ (Lt * Rt)
GLt = Gnx (Lt (1-d) * Rt d ) / √ (Lt * Rt)
BLt = Bnx (Lt (1-d) * Rt d ) / √ (Lt * Rt)
Generate right-view color image
RRt = Rnx (Rt (1-d) * Lt d ) / √ (Lt * Rt)
GRt = Gnx (Rt (1-d) * Lt d ) / √ (Lt * Rt)
BRt = Bnx (Rt (1-d) * Lt d ) / √ (Lt * Rt)
However, the three-dimensional adjustment parameter d takes a value in the range of 0 ≦ d ≦ 0.5.

上記式はd=0のとき、左視点の輝度画像Ltと右視点の輝度画像Rtの相乗平均に対して比を一定に保つようにして右視点の輝度画像や左視点の輝度画像になぞらえて左視点のカラー画像と右視点のカラー画像を生成している。d=0.5のとき視差なし画像と同じになる。   When d = 0, the above expression is compared with the luminance image of the right viewpoint and the luminance image of the left viewpoint by keeping the ratio constant with respect to the geometric mean of the luminance image Lt of the left viewpoint and the luminance image Rt of the right viewpoint. A left-view color image and a right-view color image are generated. When d = 0.5, it is the same as the image without parallax.

上記式を書き換えると、以下のような関係を満たしている。   When the above equation is rewritten, the following relationship is satisfied.

左視点のカラー画像の生成
RLt/Rn=(Lt/Rt)(0.5-d)
GLt/Gn=(Lt/Rt)(0.5-d)
BLt/Bn=(Lt/Rt)(0.5-d)
右視点のカラー画像の生成
RRt/Rn=(Rt/Lt)(0.5-d)
GRt/Gn=(Rt/Lt)(0.5-d)
BRt/Bn=(Rt/Lt)(0.5-d)
Generate color image of left viewpoint
RLt / Rn = (Lt / Rt) (0.5-d)
GLt / Gn = (Lt / Rt) (0.5-d)
BLt / Bn = (Lt / Rt) (0.5-d)
Generate right-view color image
RRt / Rn = (Rt / Lt) (0.5-d)
GRt / Gn = (Rt / Lt) (0.5-d)
BRt / Bn = (Rt / Lt) (0.5-d)

すなわち、求める対象の左視点のカラー画像の画素値は、左視点のカラー画像の画素値と視差なし画像の画素値との間の比が、左視点の輝度画像の輝度値と右視点の輝度画像の輝度値との間の比に対して相関を持つように値を求めている。また、求める対象の右視点のカラー画像の画素値は、右視点のカラー画像の画素値と視差なし画像の画素値との間の比が、右視点の輝度画像の輝度値と左視点の輝度画像の輝度値との間の比に対して相関を持つように値を求めている。   That is, the pixel value of the color image of the left viewpoint to be obtained is the ratio between the pixel value of the color image of the left viewpoint and the pixel value of the non-parallax image, and the luminance value of the left viewpoint luminance image and the luminance of the right viewpoint The value is obtained so as to have a correlation with the ratio between the luminance value of the image. In addition, the pixel value of the right-view color image to be obtained is determined by the ratio between the pixel value of the right-view color image and the pixel value of the non-parallax image. The value is obtained so as to have a correlation with the ratio between the luminance value of the image.

次に、実施例3を示す。実施例2で示した式の対数をとると以下のような式で等価に表される。   Next, Example 3 is shown. Taking the logarithm of the formula shown in the second embodiment, it is equivalently expressed by the following formula.

左視点のカラー画像の生成
log(RLt)=log(Rn)+(1-d)*log(Lt)+d*log(Rt)-[log(Lt)+log(Rt)]/2
log(GLt)=log(Gn)+(1-d)*log(Lt)+d*log(Rt)-[log(Lt)+log(Rt)]/2
log(BLt)=log(Bn)+(1-d)*log(Lt)+d*log(Rt)-[log(Lt)+log(Rt)]/2
右視点のカラー画像の生成
log(RRt)=log(Rn)+(1-d)*log(Rt)+d*log(Lt)-[log(Lt)+log(Rt)]/2
log(GRt)=log(Gn)+(1-d)*log(Rt)+d*log(Lt)-[log(Lt)+log(Rt)]/2
log(BRt)=log(Bn)+(1-d)*log(Rt)+d*log(Lt)-[log(Lt)+log(Rt)]/2
Generate color image of left viewpoint
log (RLt) = log (Rn) + (1-d) * log (Lt) + d * log (Rt)-[log (Lt) + log (Rt)] / 2
log (GLt) = log (Gn) + (1-d) * log (Lt) + d * log (Rt)-[log (Lt) + log (Rt)] / 2
log (BLt) = log (Bn) + (1-d) * log (Lt) + d * log (Rt)-[log (Lt) + log (Rt)] / 2
Generate right-view color image
log (RRt) = log (Rn) + (1-d) * log (Rt) + d * log (Lt)-[log (Lt) + log (Rt)] / 2
log (GRt) = log (Gn) + (1-d) * log (Rt) + d * log (Lt)-[log (Lt) + log (Rt)] / 2
log (BRt) = log (Bn) + (1-d) * log (Rt) + d * log (Lt)-[log (Lt) + log (Rt)] / 2

すなわち、対数階調をもつ階調特性の画像処理空間に移行すれば、線形階調の画像処理空間で比を一定に保つ演算式は、対数階調空間では差を一定に保つ視差変調によって、左右の各視点のカラー画像を生成することができる。この考え方を一般化して、対数階調にとどまらず、平方根や立方根など羃乗で表される階調特性や、任意の階調特性をもつガンマ空間で、差を一定に保つ演算を行えば、同様に視差変調を加える効果を得ることができる。   That is, when moving to an image processing space with logarithmic gradation, the arithmetic expression that keeps the ratio constant in the linear gradation image processing space is based on parallax modulation that keeps the difference constant in the logarithmic gradation space. Color images for the left and right viewpoints can be generated. By generalizing this idea, not only logarithmic gradation, but also gradation characteristics represented by powers such as square root and cubic root, and gamma space with arbitrary gradation characteristics, an operation to keep the difference constant, Similarly, the effect of applying parallax modulation can be obtained.

フローチャート
1)色・視差多重化モザイク画像データ入力
2)階調変換によるガンマ空間への移行
3)色、視差画像生成
4)逆階調変換による元の色空間への移行
5)出力色空間への変換
Flow chart 1) Color / parallax multiplexed mosaic image data input 2) Transition to gamma space by gradation conversion 3) Color and parallax image generation 4) Transition to original color space by inverse gradation conversion 5) Output color space Conversion

処理手順
1)色・視差多重化モザイク画像データ入力
ベイヤ配列型のG画素を右視差と左視差に瞳分割した、色と視差の多重化された単板式モザイク画像を入力する。これをM[i,j]と表す。各画素値は露光量に比例した値をとる線形階調のデータである。
2)階調変換によるガンマ空間への移行
モザイク画像に対して階調変換を施して、ガンマ空間に移行する。
M[i,j] → MΓ[i,j]
Processing Procedure 1) Color / Parallax Multiplexed Mosaic Image Data Input A single-panel mosaic image in which colors and parallax are multiplexed, which is obtained by dividing a Bayer array type G pixel into right parallax and left parallax, is input. This is represented as M [i, j]. Each pixel value is linear gradation data having a value proportional to the exposure amount.
2) Transition to gamma space by gradation conversion Perform gradation conversion on the mosaic image and shift to gamma space.
M [i, j] → M Γ [i, j]

実際には、入力画素値xに対して出力画素値yとなるように非線形変換y=f(x)を施す。非線形変換の特性の例として、以下のような種々の場合が考えられる。ただし、入力信号をx、出力信号をyとし、入力信号の階調と出力信号の階調が共に、[0,1]の範囲で定義されるものとする。入出力特性は(x,y)=(0,0)と(1,1)を通るように階調曲線(ガンマ曲線)を定義する。実際の入力階調Xの最大値をXmax、出力階調Yの最大値をYmaxとすると、x=X/Xmax、y=Y/Ymaxであり、階調変換は

Figure 2013229766
によって行われる。 Actually, the nonlinear transformation y = f (x) is applied to the input pixel value x so as to be the output pixel value y. As examples of the characteristics of the non-linear transformation, the following various cases are conceivable. However, it is assumed that the input signal is x and the output signal is y, and both the gradation of the input signal and the gradation of the output signal are defined in the range [0, 1]. The gradation curve (gamma curve) is defined so that the input / output characteristics pass through (x, y) = (0, 0) and (1, 1). If the maximum value of the actual input gradation X is Xmax and the maximum value of the output gradation Y is Ymax, x = X / Xmax, y = Y / Ymax, and gradation conversion
Figure 2013229766
Is done by.

階調特性の例として以下のような場合が考えられる。
a)立方根階調特性

Figure 2013229766
b)オフセット付き平方根階調特性
オフセット値εは、正の定数である。USP7,957,588参照。
c)対数特性
Figure 2013229766
係数kは正の定数である。
d)線形特性
y=x The following cases can be considered as examples of gradation characteristics.
a) Cubic root gradation characteristics
Figure 2013229766
b) Square root tone characteristic with offset The offset value ε is a positive constant. See USP 7,957,588.
c) Logarithmic characteristics
Figure 2013229766
The coefficient k is a positive constant.
d) Linear characteristics
y = x

3)色、視差画像生成
ガンマ空間で実施例1と同様にして、視差なしカラー画像RnΓ、GnΓ、BnΓと左視点の輝度画像LtΓと右視点の輝度画像RtΓを生成する。その後、視差変調を以下の式によって加えて、左視点のカラー画像と右視点のカラー画像を生成する。なお、模式的にガンマ空間での値を指数Γによって表す。
3) Color and parallax image generation In the gamma space, similarly to the first embodiment, the parallax-free color images Rn Γ , Gn Γ and Bn Γ , the left viewpoint luminance image Lt Γ and the right viewpoint luminance image Rt Γ are generated. Thereafter, parallax modulation is applied by the following formula to generate a left-viewpoint color image and a right-viewpoint color image. The value in the gamma space is schematically represented by the index Γ .

左視点のカラー画像の生成
RLtΓ=RnΓ+(1-d)*LtΓ+d*RtΓ-(LtΓ+RtΓ)/2
GLtΓ=GnΓ+(1-d)*LtΓ+d*RtΓ-(LtΓ+RtΓ)/2
BLtΓ=BnΓ+(1-d)*LtΓ+d*RtΓ-(LtΓ+RtΓ)/2
右視点のカラー画像の生成
RRtΓ=RnΓ+(1-d)*RtΓ+d*LtΓ-(LtΓ+RtΓ)/2
GRtΓ=GnΓ+(1-d)*RtΓ+d*LtΓ-(LtΓ+RtΓ)/2
BRtΓ=BnΓ+(1-d)*RtΓ+d*LtΓ-(LtΓ+RtΓ)/2
ただし、立体調整パラメータdは、0≦d≦0.5の範囲の値をとる。
Generate color image of left viewpoint
RLt Γ = Rn Γ + (1 -d) * Lt Γ + d * Rt Γ - (Lt Γ + Rt Γ) / 2
GLt Γ = Gn Γ + (1 -d) * Lt Γ + d * Rt Γ - (Lt Γ + Rt Γ) / 2
BLt Γ = Bn Γ + (1-d) * Lt Γ + d * Rt Γ- (Lt Γ + Rt Γ ) / 2
Generate right-view color image
RRt Γ = Rn Γ + (1 -d) * Rt Γ + d * Lt Γ - (Lt Γ + Rt Γ) / 2
GRt Γ = Gn Γ + (1 -d) * Rt Γ + d * Lt Γ - (Lt Γ + Rt Γ) / 2
BRt Γ = Bn Γ + (1 -d) * Rt Γ + d * Lt Γ - (Lt Γ + Rt Γ) / 2
However, the three-dimensional adjustment parameter d takes a value in the range of 0 ≦ d ≦ 0.5.

上記式を書き換えると、以下のような関係を満たしている。   When the above equation is rewritten, the following relationship is satisfied.

左視点のカラー画像の生成
RLtΓ-RnΓ=(0.5-d)*(LtΓ-RtΓ)
GLtΓ-GnΓ=(0.5-d)*(LtΓ-RtΓ)
BLtΓ-BnΓ=(0.5-d)*(LtΓ-RtΓ)
右視点のカラー画像の生成
RRtΓ-RnΓ=(0.5-d)*(RtΓ-LtΓ)
GRtΓ-GnΓ=(0.5-d)*(RtΓ-LtΓ)
BRtΓ-BnΓ=(0.5-d)*(RtΓ-LtΓ)
Generate color image of left viewpoint
RLt Γ -Rn Γ = (0.5-d) * (Lt Γ -Rt Γ )
GLt Γ -Gn Γ = (0.5-d) * (Lt Γ -Rt Γ )
BLt Γ -Bn Γ = (0.5-d) * (Lt Γ -Rt Γ )
Generate right-view color image
RRt Γ -Rn Γ = (0.5-d) * (Rt Γ -Lt Γ )
GRt Γ -Gn Γ = (0.5-d) * (Rt Γ -Lt Γ )
BRt Γ -Bn Γ = (0.5-d) * (Rt Γ -Lt Γ )

すなわち、求める対象の左視点のカラー画像の画素値は、左視点のカラー画像の画素値と視差なし画像の画素値との間の差が、左視点の輝度画像の輝度値と右視点の輝度画像の輝度値との間の差に対して相関を持つように値を求めている。また、求める対象の右視点のカラー画像の画素値は、右視点のカラー画像の画素値と視差なし画像の画素値との間の差が、右視点の輝度画像の輝度値と左視点の輝度画像の輝度値との間の差に対して相関を持つように値を求めている。   That is, the pixel value of the color image of the left viewpoint to be obtained is the difference between the pixel value of the color image of the left viewpoint and the pixel value of the non-parallax image, and the luminance value of the luminance image of the left viewpoint and the luminance of the right viewpoint The value is obtained so as to have a correlation with the difference between the luminance value of the image. In addition, the pixel value of the color image of the right viewpoint to be obtained is the difference between the pixel value of the color image of the right viewpoint and the pixel value of the non-parallax image. The value is obtained so as to have a correlation with the difference between the luminance value of the image.

4)逆階調変換による元の色空間への移行
ガンマ空間から線形階調空間へ逆階調変換を加えることによって、元の色空間へ戻す。必要なカラー画像データに対して施す。左視点のカラー画像と右視点のカラー画像が出来上がる。
4) Transition to the original color space by inverse gradation conversion By applying inverse gradation conversion from the gamma space to the linear gradation space, the original color space is restored. Apply to necessary color image data. A left-view color image and a right-view color image are created.

左視点のカラー画像
RLtΓ[i,j] → RLt[i,j]
GLtΓ[i,j] → GLt[i,j]
BLtΓ[i,j] → BLt[i,j]
右視点のカラー画像
RRtΓ[i,j] → RRt[i,j]
GRtΓ[i,j] → GRt[i,j]
BRtΓ[i,j] → BRt[i,j]
Left view color image
RLt Γ [i, j] → RLt [i, j]
GLt Γ [i, j] → GLt [i, j]
BLt Γ [i, j] → BLt [i, j]
Right-view color image
RRt Γ [i, j] → RRt [i, j]
GRt Γ [i, j] → GRt [i, j]
BRt Γ [i, j] → BRt [i, j]

5)出力色空間への変換
できあがった左視点のカラー画像と右視点のカラー画像に対して、色変換と出力階調変換を加えて、各出力カラー画像を生成する。例えば、sRGB色空間へ変換する。
5) Conversion to output color space Color conversion and output gradation conversion are performed on the completed left-viewpoint color image and right-viewpoint color image to generate each output color image. For example, conversion to sRGB color space.

なお、視差を含むモザイク画像が原色ベイヤ配列の例を示したが、これらのカラーフィルタが補色系に置き換わっても、同様に右視差の補色カラー画像と左視差の補色カラー画像が同じ原理で生成できる。   In addition, although the mosaic image including parallax showed an example of the primary color Bayer arrangement, even if these color filters are replaced with a complementary color system, a complementary color image with a right parallax and a complementary color image with a left parallax are generated in the same principle. it can.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.

特許請求の範囲、明細書、および図面中において示した装置、システム、プログラム、および方法における動作、手順、ステップ、および段階等の各処理の実行順序は、特段「より前に」、「先立って」等と明示しておらず、また、前の処理の出力を後の処理で用いるのでない限り、任意の順序で実現しうることに留意すべきである。特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず、」、「次に、」等を用いて説明したとしても、この順で実施することが必須であることを意味するものではない。   The order of execution of each process such as operations, procedures, steps, and stages in the apparatus, system, program, and method shown in the claims, the description, and the drawings is particularly “before” or “prior to”. It should be noted that the output can be realized in any order unless the output of the previous process is used in the subsequent process. Regarding the operation flow in the claims, the description, and the drawings, even if it is described using “first”, “next”, etc. for convenience, it means that it is essential to carry out in this order. It is not a thing.

10 デジタルカメラ、20 撮影レンズ、21 光軸、30、31 被写体、100 撮像素子、101 マイクロレンズ、102 カラーフィルタ、103 開口マスク、104 開口部、105 配線層、106 配線、107 開口、108 光電変換素子、109 基板、110 繰り返しパターン、120 撮像素子、121 スクリーンフィルタ、122 カラーフィルタ部、123 開口マスク部、201 制御部、202 A/D変換回路、203 メモリ、204 駆動部、205 画像処理部、207 メモリカードIF、208 操作部、209 表示部、210 LCD駆動回路、211 AFセンサ、220 メモリカード、231 画素値抽出部、232 輝度値抽出部、233 算出部、322 中心線、1801、1802、1803、1804、1805、1807、1808 分布曲線、1806、1809 合成分布曲線、1901 Lt分布曲線、1902 Rt分布曲線、1903 2D分布曲線、1905 調整Lt分布曲線、1906 調整Rt分布曲線、1913 Lt変調曲線、1914 Rt変調曲線、1915 分布曲線、1916 調整Lt分布曲線、1917 調整Rt分布曲線 DESCRIPTION OF SYMBOLS 10 Digital camera, 20 Shooting lens, 21 Optical axis, 30, 31 Subject, 100 Image sensor, 101 Micro lens, 102 Color filter, 103 Aperture mask, 104 Aperture, 105 Wiring layer, 106 Wiring, 107 aperture, 108 Photoelectric conversion Element, 109 substrate, 110 Repeat pattern, 120 Image sensor, 121 Screen filter, 122 Color filter part, 123 Aperture mask part, 201 Control part, 202 A / D conversion circuit, 203 Memory, 204 Drive part, 205 Image processing part, 207 Memory card IF, 208 operation unit, 209 display unit, 210 LCD drive circuit, 211 AF sensor, 220 memory card, 231 pixel value extraction unit, 232 luminance value extraction unit, 233 calculation unit, 322 center line, 1801, 1802, 1 03, 1804, 1805, 1807, 1808 Distribution curve, 1806, 1809 Composite distribution curve, 1901 Lt distribution curve, 1902 Rt distribution curve, 1903 2D distribution curve, 1905 Adjustment Lt distribution curve, 1906 Adjustment Rt distribution curve, 1913 Lt modulation curve 1914 Rt modulation curve, 1915 distribution curve, 1916 adjustment Lt distribution curve, 1917 adjustment Rt distribution curve

Claims (11)

同一シーンを撮像して生成される、基準画像データ、前記基準画像データの被写体像に対して一方向に第1視差を有する第1視差画像データ、および前記一方向とは反対の他方向に第2視差を有する第2視差画像データを取得する画像データ取得部と、
前記基準画像データの対象画素位置における基準画素値、前記第1視差画像データの前記対象画素位置における第1視差輝度値、および前記第2視差画像データの前記対象画素位置における第2視差輝度値を抽出して、計算式
−P=(1/2−C)(P−P
(P:基準画素値、P:第1視差輝度値、P:第2視差輝度値、P:第3視差画素値、C:実数(ただし、C≠0,0.5,1))
により、前記被写体像に対して前記第1視差とも前記第2視差とも異なる第3視差を有する第3視差画素値を算出する算出部と、
前記基準画像データにおける画像領域に対して前記対象画素位置を順次移動して前記算出部により算出させた複数の前記第3視差画素値を用いて、第3視差画像データを生成する画像データ生成部と
を備える画像処理装置。
Reference image data generated by capturing the same scene, first parallax image data having a first parallax in one direction with respect to a subject image of the reference image data, and in a direction opposite to the one direction An image data acquisition unit for acquiring second parallax image data having two parallaxes;
The reference pixel value at the target pixel position of the reference image data, the first parallax luminance value at the target pixel position of the first parallax image data, and the second parallax luminance value at the target pixel position of the second parallax image data. extracted and, equation P 3 -P 0 = (1/ 2-C) (P 2 -P 1)
(P 0 : reference pixel value, P 1 : first parallax luminance value, P 2 : second parallax luminance value, P 3 : third parallax pixel value, C: real number (where C ≠ 0, 0.5, 1 ))
A calculation unit that calculates a third parallax pixel value having a third parallax different from the first parallax and the second parallax with respect to the subject image;
An image data generation unit that generates third parallax image data using the plurality of third parallax pixel values calculated by the calculation unit by sequentially moving the target pixel position with respect to an image region in the reference image data An image processing apparatus comprising:
抽出される前記基準画素値、前記第1視差輝度値および前記第2視差輝度値のそれぞれは、ガンマ変換後の値である請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein each of the extracted reference pixel value, the first parallax luminance value, and the second parallax luminance value is a value after gamma conversion. 前記算出部は、前記対象画素位置に応じて、前記計算式におけるCを変更する請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the calculation unit changes C in the calculation formula according to the target pixel position. 前記画像データ生成部は、前記算出部に、前記計算式におけるCとして0より大きく0.5より小さい範囲で設定したCを用いて算出させた前記第3視差画像データとしての第1データと、前記計算式におけるCとして1−Cを用いて算出させた前記第3視差画像データとしての第2データとをペアで生成する請求項1に記載の画像処理装置。 The image data generation unit causes the calculation unit to calculate the first data as the third parallax image data calculated using C k set in a range greater than 0 and less than 0.5 as C in the calculation formula; The image processing apparatus according to claim 1, wherein the second data as the third parallax image data calculated using 1−C k as C in the calculation formula is generated in pairs. 前記第1データを前記第1視差画像データに関連付け、前記第2データを前記第2視差画像データに関連付ける付加部を備える請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, further comprising: an adding unit that associates the first data with the first parallax image data and associates the second data with the second parallax image data. 前記基準画像データはカラー画像データであり、前記算出部は、前記カラー画像データを構成する、色成分ごとに分離されたプレーン画像データのそれぞれに対して前記第3視差画素値を算出する請求項1から5のいずれか1項に記載の画像処理装置。   The reference image data is color image data, and the calculation unit calculates the third parallax pixel value for each of plain image data separated for each color component constituting the color image data. The image processing apparatus according to any one of 1 to 5. 前記第1視差画像データおよび前記第2視差画像データは、前記色成分の色情報を含まない請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the first parallax image data and the second parallax image data do not include color information of the color component. 前記同一シーンを撮像する撮像素子と、
請求項1から7のいずれか1項に記載の画像処理装置と
を備える撮像装置であって、
前記画像データ取得部は、前記撮像素子が出力する前記基準画像データ、前記第1視差画像データおよび前記第2視差画像データを取得する撮像装置。
An image sensor for imaging the same scene;
An image pickup apparatus comprising the image processing apparatus according to claim 1,
The image data acquisition unit is an imaging apparatus that acquires the reference image data, the first parallax image data, and the second parallax image data output from the imaging element.
前記撮像素子は、
入射光を電気信号に光電変換する、二次元的に配列された光電変換素子と、
前記光電変換素子の少なくとも一部のそれぞれに一対一に対応して設けられた開口マスクと
を備え、
隣接するn個(nは3以上の整数)の前記光電変換素子のうち、少なくとも2つに対応して設けられたそれぞれの前記開口マスクの開口は、前記入射光の断面領域内の、前記第1視差と前記第2視差に対応する互いに異なる部分領域からの光束をそれぞれ通過させるように位置づけられ、前記n個の前記光電変換素子を一組とする光電変換素子群が周期的に配列されている請求項8に記載の撮像装置。
The image sensor is
Two-dimensionally arranged photoelectric conversion elements that photoelectrically convert incident light into electrical signals;
An opening mask provided in one-to-one correspondence with each of at least a part of the photoelectric conversion element,
Of the n adjacent photoelectric conversion elements (n is an integer of 3 or more), the openings of the opening masks provided corresponding to at least two of the photoelectric conversion elements are in the cross-sectional area of the incident light. Positioned so that light beams from mutually different partial areas corresponding to one parallax and the second parallax pass, and a photoelectric conversion element group including the n photoelectric conversion elements as a set is periodically arranged. The imaging device according to claim 8.
一組の前記光電変換素子群は、前記基準画像データを出力する、前記入射光の有効光束の全体を通過させる前記開口マスクが設けられた前記光電変換素子を含む請求項9に記載の撮像装置。   10. The imaging apparatus according to claim 9, wherein the set of the photoelectric conversion element group includes the photoelectric conversion element provided with the aperture mask that outputs the reference image data and passes the entire effective light flux of the incident light. . 同一シーンを撮像して生成される、基準画像データ、前記基準画像データの被写体像に対して一方向に第1視差を有する第1視差画像データ、および前記一方向とは反対の他方向に第2視差を有する第2視差画像データを取得する画像データ取得ステップと、
前記基準画像データにおける画像領域に対して対象画素位置を順次移動しつつ、前記基準画像データの前記対象画素位置における基準画素値、前記第1視差画像データの前記対象画素位置における第1視差輝度値、および前記第2視差画像データの前記対象画素位置における第2視差輝度値を抽出して、計算式
−P=(1/2−C)(P−P
(P:基準画素値、P:第1視差輝度値,P:第2視差輝度値,P:第3視差画素値,C:実数(ただし、C≠0,0.5,1))
により、前記被写体像に対して前記第1視差とも前記第2視差とも異なる第3視差を有する第3視差画素値を順次算出する算出ステップと、
前記算出ステップにより算出された複数の前記第3視差画素値を用いて、第3視差画像データを生成する画像データ生成ステップと
をコンピュータに実行させる画像処理プログラム。
Reference image data generated by capturing the same scene, first parallax image data having a first parallax in one direction with respect to a subject image of the reference image data, and in a direction opposite to the one direction An image data acquisition step of acquiring second parallax image data having two parallaxes;
The reference pixel value at the target pixel position of the reference image data and the first parallax luminance value at the target pixel position of the first parallax image data while sequentially moving the target pixel position with respect to the image area in the reference image data , And the second parallax luminance value at the target pixel position of the second parallax image data is extracted, and the calculation formula P 3 −P 0 = (1 / 2−C) (P 2 −P 1 )
(P 0 : reference pixel value, P 1 : first parallax luminance value, P 2 : second parallax luminance value, P 3 : third parallax pixel value, C: real number (where C ≠ 0, 0.5, 1 ))
A calculation step of sequentially calculating a third parallax pixel value having a third parallax different from the first parallax and the second parallax with respect to the subject image;
An image processing program for causing a computer to execute an image data generation step of generating third parallax image data using the plurality of third parallax pixel values calculated in the calculation step.
JP2012100476A 2012-04-25 2012-04-25 Image processing apparatus, imaging apparatus, and image processing program Active JP5978738B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2012100476A JP5978738B2 (en) 2012-04-25 2012-04-25 Image processing apparatus, imaging apparatus, and image processing program
PCT/JP2013/002831 WO2013161313A1 (en) 2012-04-25 2013-04-25 Image processing device, imaging device, and image processing program
CN201380022016.6A CN104412586B (en) 2012-04-25 2013-04-25 Image processing apparatus, camera head
US14/513,729 US9838665B2 (en) 2012-04-25 2014-10-14 Image processing device, imaging device, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012100476A JP5978738B2 (en) 2012-04-25 2012-04-25 Image processing apparatus, imaging apparatus, and image processing program

Publications (2)

Publication Number Publication Date
JP2013229766A true JP2013229766A (en) 2013-11-07
JP5978738B2 JP5978738B2 (en) 2016-08-24

Family

ID=49676997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012100476A Active JP5978738B2 (en) 2012-04-25 2012-04-25 Image processing apparatus, imaging apparatus, and image processing program

Country Status (1)

Country Link
JP (1) JP5978738B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703813A (en) * 2022-12-27 2023-09-05 荣耀终端有限公司 Image processing method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124213A (en) * 2007-11-12 2009-06-04 Sony Corp Image pickup apparatus
WO2012002297A1 (en) * 2010-06-30 2012-01-05 富士フイルム株式会社 Imaging device and imaging method
JP2012054856A (en) * 2010-09-03 2012-03-15 Sony Corp Imaging method
WO2012039180A1 (en) * 2010-09-24 2012-03-29 富士フイルム株式会社 Image pickup device and image pickup apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124213A (en) * 2007-11-12 2009-06-04 Sony Corp Image pickup apparatus
WO2012002297A1 (en) * 2010-06-30 2012-01-05 富士フイルム株式会社 Imaging device and imaging method
JP2012054856A (en) * 2010-09-03 2012-03-15 Sony Corp Imaging method
WO2012039180A1 (en) * 2010-09-24 2012-03-29 富士フイルム株式会社 Image pickup device and image pickup apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703813A (en) * 2022-12-27 2023-09-05 荣耀终端有限公司 Image processing method and apparatus
CN116703813B (en) * 2022-12-27 2024-04-26 荣耀终端有限公司 Image processing method and apparatus

Also Published As

Publication number Publication date
JP5978738B2 (en) 2016-08-24

Similar Documents

Publication Publication Date Title
JP5804055B2 (en) Image processing apparatus, image processing method, and program
WO2013161313A1 (en) Image processing device, imaging device, and image processing program
JP6131545B2 (en) Image processing apparatus, imaging apparatus, and image processing program
WO2013136819A1 (en) Image sensor, imaging device and imaging system
JP6354838B2 (en) Image pickup device, image pickup apparatus, and image processing apparatus
WO2014192300A1 (en) Imaging element, imaging device, and image processing device
JP5979134B2 (en) Image processing apparatus and image processing program
WO2013114895A1 (en) Imaging device
JP5978736B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6197316B2 (en) Imaging device and imaging apparatus
WO2012132270A1 (en) Image processing device, imaging device, and image processing program
JP5874729B2 (en) Imaging device
JP5887845B2 (en) Image processing method and image processing program
JP5979137B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL PROGRAM
JP5978738B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5874334B2 (en) Image processing apparatus, imaging apparatus, image processing program, and imaging apparatus control program
JP5978737B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5978735B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6205770B2 (en) Imaging device and imaging system
JP2014107594A (en) Image pick-up device and imaging apparatus
JP2012212975A (en) Imaging device and control program for imaging device
JP2013090265A (en) Image processing apparatus and image processing program
JP6051568B2 (en) Imaging device and imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150420

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160711

R150 Certificate of patent or registration of utility model

Ref document number: 5978738

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250