JP6439285B2 - Image processing apparatus, imaging apparatus, and image processing program - Google Patents

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

Info

Publication number
JP6439285B2
JP6439285B2 JP2014122366A JP2014122366A JP6439285B2 JP 6439285 B2 JP6439285 B2 JP 6439285B2 JP 2014122366 A JP2014122366 A JP 2014122366A JP 2014122366 A JP2014122366 A JP 2014122366A JP 6439285 B2 JP6439285 B2 JP 6439285B2
Authority
JP
Japan
Prior art keywords
image data
parallax
value
pixel
evaluation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014122366A
Other languages
Japanese (ja)
Other versions
JP2016005018A (en
JP2016005018A5 (en
Inventor
祐介 ▲高▼梨
祐介 ▲高▼梨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2014122366A priority Critical patent/JP6439285B2/en
Publication of JP2016005018A publication Critical patent/JP2016005018A/en
Publication of JP2016005018A5 publication Critical patent/JP2016005018A5/ja
Application granted granted Critical
Publication of JP6439285B2 publication Critical patent/JP6439285B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

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

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.
[Prior art documents]
[Patent Literature]
[Patent Document 1] JP-A-8-47001

ステレオ撮像装置によって撮影されたステレオ画像データを用いて三次元画像を作成する際に、視差量を調整することで、立体視における奥行きを調整することができる。より自然な三次元画像を生成するために、被写体ごと(或いは画像を構成する画素ごと)に視差量の調整量を設定するには、レンズの焦点距離や絞り値等の複数のパラメータによって調整することが考えられるが、これら複数のパラメータを自動で調整して被写体ごと(画素ごと)に最適な調整量を設定することは難しかった。   When creating a three-dimensional image using stereo image data captured by a stereo imaging device, the depth in stereoscopic vision can be adjusted by adjusting the amount of parallax. In order to generate a more natural three-dimensional image, in order to set an adjustment amount of the parallax amount for each subject (or for each pixel constituting the image), adjustment is performed by a plurality of parameters such as a focal length of the lens and an aperture value. However, it is difficult to automatically adjust these parameters to set an optimal adjustment amount for each subject (for each pixel).

本発明の第1の態様における画像処理装置は、画像データを取得する取得部と、画像データの画像に含まれる被写体の領域の評価値を被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成部と、画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、評価マップの評価値に対応させて決定する決定部と、画像データに調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成部とを備える。   An image processing apparatus according to a first aspect of the present invention includes an acquisition unit that acquires image data, and an evaluation value of a subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area. An evaluation map generation unit that generates the evaluation map, and a determination unit that determines an adjustment parameter value for adjusting the amount of parallax, which is applied when generating parallax image data from the image data, corresponding to the evaluation value of the evaluation map And a generation unit that applies the adjustment parameter value to the image data and generates parallax image data that is an image having a parallax amount adjusted to each other.

本発明の第2の態様における画像処理プログラムは、画像データを取得する取得ステップと、画像データの画像に含まれる被写体の領域の評価値を被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成ステップと、画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、評価マップの評価値に対応させて決定する決定ステップと、画像データに調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成ステップとをコンピュータに実行させる。   The image processing program according to the second aspect of the present invention includes an acquisition step of acquiring image data, and an evaluation value of a subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area. An evaluation map generation step for generating the evaluation map, and a determination step for determining an adjustment parameter value for adjusting the amount of parallax, which is applied when generating the parallax image data from the image data, corresponding to the evaluation value of the evaluation map And a generation step of generating parallax image data that is an image having parallax amounts adjusted to each other by applying the adjustment parameter value to the 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 a conceptual diagram which represents notably the mode that a part of imaging device was expanded. 2D画像データと視差画像データの生成処理の例を説明する図である。It is a figure explaining the example of a production | generation process of 2D image data and parallax image data. デフォーカスの概念を説明する図である。It is a figure explaining the concept of defocusing. 視差画素が出力する光強度分布を示す図である。It is a figure which shows the light intensity distribution which a parallax pixel outputs. 調整視差量の概念を説明するための画素値分布を示す図である。It is a figure which shows pixel value 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 RGB pixel value distribution. 入力画像と顕著性マップの画像とを示す図である。It is a figure which shows the input image and the image of a saliency map. 立体調整パラメータのパラメータ値算出関数を例示する図である。It is a figure which illustrates the parameter value calculation function of a three-dimensional adjustment parameter. 鑑賞者の輻輳角と視差量の関係を示す図である。It is a figure which shows the relationship between a viewer's convergence angle and the amount of parallax. 視差量制限のメニュー画面を表示するデジタルカメラの背面図である。It is a rear view of the digital camera which displays the menu screen of parallax amount restriction | limiting. 動画撮影における処理フローである。It is a processing flow in moving image shooting. 視差カラー画像データを生成するまでの処理フローである。It is a processing flow until it produces | generates parallax color image data. 好ましい開口形状を説明する図である。It is a figure explaining a preferable opening shape. デジタルカメラとTVモニタとの連携を説明する図である。It is a figure explaining cooperation with a digital camera and TV monitor. 変形例としてのデジタルカメラの動画撮影における処理フローである。It is a processing flow in the moving image photography of the digital camera as a modification. 変形例としてのTVモニタにおける処理フローである。It is a processing flow in the TV monitor as a modification.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   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つのシーンについて複数の視点数の画像を一度の撮影により生成できるように構成されている。互いに視点の異なるそれぞれの画像を視差画像と呼ぶ。本実施形態においては、特に、右目と左目に対応する2つの視点による右視差画像と左視差画像を生成する場合について説明する。本実施形態におけるデジタルカメラは、中央視点による視差のない視差なし画像も、視差画像と共に生成できる。   The digital camera according to the present embodiment, which is one form of the imaging device, is configured 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. In the present embodiment, a case where a right parallax image and a left parallax image from two viewpoints corresponding to the right eye and the left eye are generated will be described. The digital camera in the present embodiment can generate a parallax-free image without parallax from the central viewpoint together with the parallax image.

図1は、本発明の実施形態に係るデジタルカメラ10の構成を説明する図である。デジタルカメラ10は、撮影光学系としての撮影レンズ20を備え、光軸21に沿って入射する被写体光束を撮像素子100へ導く。撮影レンズ20は、デジタルカメラ10に対して着脱できる交換式レンズであっても構わない。デジタルカメラ10は、撮像素子100、制御部201、A/D変換回路202、メモリ203、駆動部204、画像処理部205、メモリカードIF207、操作部208、表示部209およびLCD駆動回路210を備える。   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, and an LCD drive circuit 210. .

なお、図示するように、撮像素子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 on 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枚のレンズで代表して表している。また、瞳近傍には、光軸21を中心として同心状に入射光束を制限する絞り22が配置されている。   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. Further, in the vicinity of the pupil, a diaphragm 22 that restricts the incident light beam concentrically with the optical axis 21 as the center is disposed.

撮像素子100は、撮影レンズ20の焦点面近傍に配置されている。撮像素子100は、二次元的に複数の光電変換素子が配列された、例えばCCD、CMOSセンサ等のイメージセンサである。撮像素子100は、駆動部204によりタイミング制御されて、受光面上に結像された被写体像を画像信号に変換してA/D変換回路202へ出力する。   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をワークスペースとしてデジタル画像信号に種々の画像処理を施し、撮影画像データを生成する。撮影画像データは、後述するように、撮像素子100の視差なし画素の出力から生成される基準画像データと、撮像素子100の視差画素の出力から生成される視差画像データを包含する。撮影画像データを生成するまでの処理部を撮像部とする場合、撮像部は、撮像素子100、A/D変換回路202、メモリ203、制御部201および画像処理部205を含んで構成される。   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 on the digital image signal using the memory 203 as a work space, and generates captured image data. The captured image data includes reference image data generated from the output of the non-parallax pixels of the image sensor 100 and parallax image data generated from the output of the parallax pixels of the image sensor 100, as will be described later. In the case where the processing unit until the captured image data is generated is an imaging unit, the imaging unit is configured to include the imaging element 100, an A / D conversion circuit 202, a memory 203, a control unit 201, and an image processing unit 205.

制御部201は、デジタルカメラ10を統合的に制御する。例えば、設定された絞り値に応じて絞り22の開口を調整し、AF評価値に応じて撮影レンズ20を光軸方向に進退させる。また、撮影レンズ20の位置を検出して、撮影レンズ20の焦点距離、フォーカスレンズ位置を把握する。さらに、駆動部204に対してタイミング制御信号を送信し、撮像素子100から出力される画像信号が画像処理部205で撮影画像データに処理されるまでの一連のシーケンスを管理して、撮影画像データを取得する。   The control unit 201 controls the digital camera 10 in an integrated manner. For example, the aperture of the diaphragm 22 is adjusted according to the set diaphragm value, and the photographing lens 20 is advanced and retracted in the optical axis direction according to the AF evaluation value. Further, the position of the photographing lens 20 is detected, and the focal length and the focus lens position of the photographing lens 20 are grasped. Further, a timing control signal is transmitted to the drive unit 204, and a series of sequences from when the image signal output from the image sensor 100 is processed into captured image data by the image processing unit 205 is managed, and the captured image data To get.

画像処理部205は、評価マップ生成部231、調整パラメータ値決定部232、視差画像データ生成部233および動画生成部234を包含する。評価マップ生成部231は、撮影画像データを評価するための評価マップを生成する。   The image processing unit 205 includes an evaluation map generation unit 231, an adjustment parameter value determination unit 232, a parallax image data generation unit 233, and a moving image generation unit 234. The evaluation map generation unit 231 generates an evaluation map for evaluating the captured image data.

調整パラメータ値決定部232は、撮影画像データから視差画像データを生成するときに適用される、視差量を調整する立体調整パラメータ値を決定する。視差画像データ生成部233は、撮影画像データに立体調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する。動画生成部234は、視差画像データ生成部が生成した新たな視差画像データを繋ぎ合わせて、3Dの動画ファイルを生成する。   The adjustment parameter value determination unit 232 determines a stereoscopic adjustment parameter value for adjusting the amount of parallax, which is applied when generating parallax image data from captured image data. The parallax image data generation unit 233 applies the stereoscopic adjustment parameter value to the captured image data, and generates parallax image data that becomes images having parallax amounts adjusted to each other. The moving image generation unit 234 generates a 3D moving image file by joining the new parallax image data generated by the parallax image data generation unit.

画像処理部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 captured 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.

図2は、撮像素子100の一部を拡大した様子を概念的に表す概念図である。画素領域には2000万個以上もの画素がマトリックス状に配列されている。本実施形態においては、隣接する8画素×8画素の64画素が一つの基本格子110を形成する。基本格子110は、2×2の4画素を基本単位とするベイヤー配列を、Y軸方向に4つ、X軸方向に4つ含む。なお、図示するように、ベイヤー配列においては、左上画素と右下画素に緑フィルタ(Gフィルタ)、左下画素に青フィルタ(Bフィルタ)、右上画素に赤フィルタ(Rフィルタ)が配される。   FIG. 2 is a conceptual diagram conceptually showing a state in which a part of the image sensor 100 is enlarged. In the pixel area, 20 million or more pixels are arranged in a matrix. In the present embodiment, 64 pixels of adjacent 8 pixels × 8 pixels form one basic lattice 110. The basic grid 110 includes four Bayer arrays having 4 × 2 × 2 basic units in the Y-axis direction and four in the X-axis direction. As shown in the figure, in the Bayer array, a green filter (G filter) is arranged for the upper left pixel and the lower right pixel, a blue filter (B filter) is arranged for the lower left pixel, and a red filter (R filter) is arranged for the upper right pixel.

基本格子110は、視差画素と視差なし画素を含む。視差画素は、撮影レンズ20を透過する入射光束のうち、光軸から偏位した部分光束を受光する画素である。視差画素には、当該部分光束のみを透過させるように、画素中心から偏位した偏位開口を有する開口マスクが設けられている。   The basic grid 110 includes parallax pixels and non-parallax pixels. The parallax pixel is a pixel that receives a partial light beam that is deviated from the optical axis among incident light beams that pass through the photographing lens 20. The parallax pixel is provided with an aperture mask having a deviated opening that is deviated from the center of the pixel so as to transmit only the partial light flux.

開口マスクは、例えば、カラーフィルタに重ねて設けられる。本実施形態においては、開口マスクにより、部分光束が画素中心に対して左側に到達するように規定された視差Lt画素と、部分光束が画素中心に対して右側に到達するように規定された視差Rt画素の2種類が存在する。一方、視差なし画素は、開口マスクが設けられていない画素であり、撮影レンズ20を透過する入射光束の全体を受光する画素である。   For example, the opening mask is provided so as to overlap the color filter. In the present embodiment, the parallax Lt pixel defined so that the partial light beam reaches the left side with respect to the pixel center and the parallax specified so that the partial light beam reaches the right side with respect to the pixel center by the aperture mask. There are two types of Rt pixels. On the other hand, the non-parallax pixel is a pixel that is not provided with an aperture mask, and is a pixel that receives the entire incident light beam that passes through the photographing lens 20.

なお、視差画素は、光軸から偏位した部分光束を受光するにあたり、開口マスクに限らず、受光領域と反射領域が区分された選択的反射膜、偏位したフォトダイオード領域など、様々な構成を採用し得る。すなわち、視差画素は、撮影レンズ20を透過する入射光束のうち、光軸から偏位した部分光束を受光できるように構成されていれば良い。   Note that the parallax pixel is not limited to the aperture mask when receiving the partial light beam that is deviated from the optical axis, but has various configurations such as a selective reflection film in which the light receiving region and the reflective region are separated, and a deviated photodiode region. Can be adopted. In other words, the parallax pixel only needs to be configured to receive a partial light beam that is deviated from the optical axis, among incident light beams that pass through the photographing lens 20.

基本格子110内の画素をPIJで表す。例えば、左上画素はP11であり、右上画素はP81である。図に示すように、視差画素は以下のように配列されている。
11…視差Lt画素+Gフィルタ(=G(Lt))
51…視差Rt画素+Gフィルタ(=G(Rt))
32…視差Lt画素+Bフィルタ(=B(Lt))
63…視差Rt画素+Rフィルタ(=R(Rt))
15…視差Rt画素+Gフィルタ(=G(Rt))
55…視差Lt画素+Gフィルタ(=G(Lt))
76…視差Rt画素+Bフィルタ(=B(Rt))
27…視差Lt画素+Rフィルタ(=R(Lt))
他の画素は視差なし画素であり、視差無し画素+Rフィルタ、視差なし画素+Gフィルタ、視差無し画素+Bフィルタのいずれかである。
Pixels in the basic grid 110 are denoted by PIJ . For example, the upper left pixel is P 11, the upper right pixel is P 81. As shown in the figure, the parallax pixels are arranged as follows.
P 11 : Parallax Lt pixel + G filter (= G (Lt))
P 51 ... Parallax Rt pixel + G filter (= G (Rt))
P 32 ... Parallax Lt pixel + B filter (= B (Lt))
P 63 ... Parallax Rt pixel + R filter (= R (Rt))
P 15 ... Parallax Rt pixel + G filter (= G (Rt))
P 55 ... Parallax Lt pixel + G filter (= G (Lt))
P 76 ... Parallax Rt pixel + B filter (= B (Rt))
P 27 ... Parallax Lt pixel + R filter (= R (Lt))
The other pixels are non-parallax pixels, and are any of the non-parallax pixel + R filter, the non-parallax pixel + G filter, and the non-parallax pixel + B filter.

撮像素子100の全体でみた場合に、視差画素は、Gフィルタを有する第1群と、Rフィルタを有する第2群と、Bフィルタを有する第3群のいずれかに区分され、基本格子110には、それぞれの群に属する視差Lt画素および視差Rt画素が少なくとも1つは含まれる。図の例のように、これらの視差画素および視差なし画素が、基本格子110内においてランダム性を有して配置されると良い。ランダム性を有して配置されることにより、色成分ごとの空間分解能に偏りを生じさせることなく、視差画素の出力としてRGBのカラー情報を取得することができるので、高品質な視差画像データが得られる。   When viewed as a whole of the image sensor 100, the parallax pixels are classified into one of a first group having a G filter, a second group having an R filter, and a third group having a B filter. Includes at least one parallax Lt pixel and parallax Rt pixel belonging to each group. As in the example in the figure, these parallax pixels and non-parallax pixels may be arranged with randomness in the basic lattice 110. By arranging with randomness, RGB color information can be acquired as the output of the parallax pixels without causing bias in the spatial resolution for each color component, so that high-quality parallax image data can be obtained. can get.

次に、撮像素子100から出力される撮影画像データから2D画像データと視差画像データを生成する処理の概念を説明する。図3は、2D画像データと視差画像データの生成処理の例を説明する図である。   Next, the concept of processing for generating 2D image data and parallax image data from captured image data output from the image sensor 100 will be described. FIG. 3 is a diagram illustrating an example of processing for generating 2D image data and parallax image data.

基本格子110における視差画素および視差なし画素の配列からもわかるように、撮像素子100の出力をその画素配列に一致させてそのまま羅列しても、特定の像を表す画像データにはならない。撮像素子100の画素出力を、同一に特徴付けられた画素グループごとに分離して寄せ集めてはじめて、その特徴に即した一つの像を表す画像データが形成される。例えば、左右の視差画素をそれぞれ寄せ集めると、互いに視差を有する左右の視差画像データが得られる。このように、同一に特徴付けられた画素グループごとに分離して寄せ集められたそれぞれの画像データを、プレーンデータと呼ぶ。   As can be seen from the arrangement of parallax pixels and non-parallax pixels in the basic grid 110, image data representing a specific image is not obtained even if the output of the image sensor 100 is aligned with the pixel arrangement. Only when the pixel outputs of the image sensor 100 are separated and collected for each pixel group characterized in the same manner, image data representing one image in accordance with the characteristics is formed. For example, when the left and right parallax pixels are gathered together, left and right 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元画像データを受け取り、複数のプレーンデータに分離するプレーン分離処理を実行する。図の左列は、2D画像データとしての2D−RGBプレーンデータの生成処理の例を示す。   The image processing unit 205 receives raw raw image data in which output values (pixel values) are arranged in the order of pixel arrangement of the image sensor 100, and executes plane separation processing for separating the raw image data into a plurality of plane data. The left column of the figure shows an example of processing for generating 2D-RGB plane data as 2D image data.

2D−RGBプレーンデータを生成するにあたり、画像処理部205は、まず視差画素の画素値を除去して、空格子とする。そして、空格子となった画素値を、周辺画素の画素値を用いて補間処理により算出する。   In generating the 2D-RGB plane data, the image processing unit 205 first removes the pixel values of the parallax pixels to form an empty grid. Then, the pixel value that becomes the empty grid is calculated by interpolation processing using the pixel values of the surrounding pixels.

例えば、空格子P11の画素値は、斜め方向に隣接するGフィルタ画素の画素値である、P−1−1、P2−1、P−12、P22の画素値を平均化演算して算出する。また、例えば空格子P63の画素値は、上下左右に1画素飛ばして隣接するRフィルタの画素値である、P43、P61、P83、P65の画素値を平均化演算して算出する。同様に、例えば空格子P76の画素値は、上下左右に1画素飛ばして隣接するBフィルタの画素値である、P56、P74、P96、P78の画素値を平均化演算して算出する。 For example, the pixel values of the vacancy P 11 is the pixel value of the G filter pixels adjacent in an oblique direction, P -1-1, P 2-1, P -12, averages calculates the pixel values of P 22 To calculate. Further, for example, the pixel value of the empty lattice P 63 is calculated by averaging the pixel values of P 43 , P 61 , P 83 , and P 65 that are adjacent R filter pixel values by skipping one pixel vertically and horizontally. To do. Similarly, for example, the pixel value of the air grating P 76 is the pixel value of the adjacent B filter skipping one pixel vertically and horizontally, and averaging operation of the pixel values of P 56, P 74, P 96 , P 78 calculate.

このように補間された2D−RGBプレーンデータは、ベイヤー配列を有する通常の撮像素子の出力と同様であるので、その後は2D画像データとして各種処理を行うことができる。すなわち、公知のベイヤー補間を行って、各画素にRGBデータの揃ったカラー画像データを生成する。画像処理部205は、静止画データを生成する場合にはJPEG等の、動画データを生成する場合にはMPEG等の、予め定められたフォーマットに従って一般的な2D画像としての画像処理を行う。   Since the 2D-RGB plane data interpolated in this way is the same as the output of a normal imaging device having a Bayer array, various processes can be performed as 2D image data thereafter. That is, known Bayer interpolation is performed to generate color image data in which RGB data is aligned for each pixel. The image processing unit 205 performs image processing as a general 2D image according to a predetermined format such as JPEG when generating still image data and MPEG when generating moving image data.

本実施形態においては、画像処理部205は、2D−RGBプレーンデータをさらに色ごとに分離し、上述のような補間処理を施して、基準画像データとしての各プレーンデータを生成する。すなわち、緑色の基準画像プレーンデータとしてのGnプレーンデータ、赤色の基準画像プレーンデータとしてのRnプレーンデータ、および青色の基準画像プレーンデータとしてのBnプレーンデータの3つを生成する。   In the present embodiment, the image processing unit 205 further separates the 2D-RGB plane data for each color, performs the above-described interpolation processing, and generates each plane data as reference image data. That is, three types of data are generated: Gn plane data as green reference image plane data, Rn plane data as red reference image plane data, and Bn plane data as blue reference image plane data.

図の右列は、視差画素データとしての2つのGプレーンデータ、2つのRプレーンデータおよび2つのBプレーンデータの生成処理の例を示す。2つのGプレーンデータは、左視差画像データとしてのGLtプレーンデータと右視差画像データとしてのGRtプレーンデータであり、2つのRプレーンデータは、左視差画像データとしてのRLtプレーンデータと右視差画像データとしてのRRtプレーンデータであり、2つのBプレーンデータは、左視差画像データとしてのBLtプレーンデータと右視差画像データとしてのBRtプレーンデータである。   The right column of the figure shows an example of generation processing of two G plane data, two R plane data, and two B plane data as parallax pixel data. The two G plane data are GLt plane data as left parallax image data and GRt plane data as right parallax image data. The two R plane data are RLt plane data and right parallax image data as left parallax image data. The two B plane data are the BLt plane data as the left parallax image data and the BRt plane data as the right parallax image data.

GLtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からG(Lt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P11とP55の2つの画素値が残る。そこで、基本格子110を縦横に4等分し、左上の16画素分をP11の出力値で代表させ、右下の16画素分をP55の出力値で代表させる。そして、右上の16画素分および左下の16画素分は、上下左右に隣接する周辺の代表値を平均化演算して補間する。すなわち、GLtプレーンデータは、16画素単位で一つの値を有する。 In generating the GLt plane data, the image processing unit 205 removes pixel values other than the pixel values of the G (Lt) pixels from all output values of the image sensor 100 to form a vacant lattice. As a result, two pixel values P 11 and P 55 remain in the basic grid 110. Therefore, it divided into four equal basic grid 110 vertically and horizontally, the 16 pixels of the top left is represented by an output value of the P 11, is representative of the 16 pixels in the lower right in the output value of the P 55. Then, for the upper right 16 pixels and the lower left 16 pixels, average values of neighboring representative values adjacent in the vertical and horizontal directions are averaged and interpolated. That is, the GLt plane data has one value in units of 16 pixels.

同様に、GRtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からG(Rt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P51とP15の2つの画素値が残る。そこで、基本格子110を縦横に4等分し、右上の16画素分をP51の出力値で代表させ、左下の16画素分をP15の出力値で代表させる。そして、左上の16画素分および右下の16画素分は、上下左右に隣接する周辺の代表値を平均化演算して補間する。すなわち、GRtプレーンデータは、16画素単位で一つの値を有する。このようにして、2D−RGBプレーンデータよりは解像度の低いGLtプレーンデータとGRtプレーンデータを生成することができる。 Similarly, when generating the GRt plane data, the image processing unit 205 removes pixel values other than the pixel value of the G (Rt) pixel from all the output values of the image sensor 100 to obtain an empty grid. Then, two pixel values P 51 and P 15 remain in the basic grid 110. Therefore, the basic grid 110 is divided into four equal parts vertically and horizontally, the upper right 16 pixels are represented by the output value of P 51 , and the lower left 16 pixels are represented by the output value of P 15 . The upper left 16 pixels and the lower right 16 pixels are interpolated by averaging the peripheral representative values adjacent vertically and horizontally. That is, the GRt plane data has one value in units of 16 pixels. In this way, it is possible to generate GLt plane data and GRt plane data having a resolution lower than that of 2D-RGB plane data.

RLtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からR(Lt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P27の画素値が残る。この画素値を基本格子110の64画素分の代表値とする。同様に、RRtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からR(Rt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P63の画素値が残る。この画素値を基本格子110の64画素分の代表値とする。このようにして、2D−RGBプレーンデータよりは解像度の低いRLtプレーンデータとRRtプレーンデータが生成される。この場合、RLtプレーンデータとRRtプレーンデータの解像度は、GLtプレーンデータとGRtプレーンデータの解像度よりも低い。 In generating the RLt plane data, the image processing unit 205 removes pixel values other than the pixel value of the R (Lt) pixel from all output values of the image sensor 100 to form a vacant lattice. Then, the primitive lattice 110, the pixel values of P 27 remains. This pixel value is set as a representative value for 64 pixels of the basic grid 110. Similarly, when generating the RRt plane data, the image processing unit 205 removes pixel values other than the pixel value of the R (Rt) pixel from all output values of the image sensor 100 to form a vacant lattice. Then, the pixel value P 63 remains in the basic grid 110. This pixel value is set as a representative value for 64 pixels of the basic grid 110. In this way, RLt plane data and RRt plane data having a resolution lower than that of 2D-RGB plane data are generated. In this case, the resolution of the RLt plane data and the RRt plane data is lower than the resolution of the GLt plane data and the GRt plane data.

BLtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からB(Lt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P32の画素値が残る。この画素値を基本格子110の64画素分の代表値とする。同様に、BRtプレーンデータを生成するにあたり、画像処理部205は、撮像素子100の全出力値からB(Rt)画素の画素値以外の画素値を除去して空格子とする。すると、基本格子110には、P76の画素値が残る。この画素値を基本格子110の64画素分の代表値とする。このようにして、2D−RGBプレーンデータよりは解像度の低いBLtプレーンデータとBRtプレーンデータが生成される。この場合、BLtプレーンデータとBRtプレーンデータの解像度は、GLtプレーンデータとGRtプレーンデータの解像度よりも低く、RLtプレーンデータとRRtプレーンデータの解像度と同等である。 In generating the BLt plane data, the image processing unit 205 removes pixel values other than the pixel values of the B (Lt) pixels from all output values of the image sensor 100 to form a vacant lattice. Then, the primitive lattice 110, the pixel values of P 32 remains. This pixel value is set as a representative value for 64 pixels of the basic grid 110. Similarly, when generating the BRt plane data, the image processing unit 205 removes pixel values other than the pixel value of the B (Rt) pixel from all the output values of the image sensor 100 to obtain an empty grid. Then, the primitive lattice 110, the pixel values of P 76 remains. This pixel value is set as a representative value for 64 pixels of the basic grid 110. In this way, BLt plane data and BRt plane data having a resolution lower than that of 2D-RGB plane data are generated. In this case, the resolution of the BLt plane data and the BRt plane data is lower than the resolution of the GLt plane data and the GRt plane data, and is equal to the resolution of the RLt plane data and the RRt plane data.

本実施形態においては、画像処理部205は、これらのプレーンデータを用いて、左側視点のカラー画像データおよび右側視点のカラー画像データを生成する。特に、立体調整パラメータを導入することにより、ぼけ量を維持したまま視差量を調整したカラー画像データを生成する。以下、本実施形態における具体的な処理に先立って、視差量を調整したカラー画像データの生成原理と、本実施形態の処理に対する比較例の処理とについて、図4〜図8を参照しつつ説明する。   In the present embodiment, the image processing unit 205 uses these plane data to generate left-viewpoint color image data and right-viewpoint color image data. In particular, by introducing a stereo adjustment parameter, color image data in which the parallax amount is adjusted while the blur amount is maintained is generated. Hereinafter, prior to specific processing in the present embodiment, the generation principle of color image data in which the amount of parallax is adjusted and the processing of a comparative example with respect to the processing of the present embodiment will be described with reference to FIGS. To do.

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

本実施形態の光学系においては、実際の被写体光束はレンズ瞳の全体を通過するので、視差画素に到達するまでは、視差仮想瞳に対応する光強度分布が互いに区別されるのではない。しかし、視差画素は、それぞれが有する開口マスクの作用により、視差仮想瞳を通過した部分光束のみを光電変換した画像信号を出力する。したがって、視差画素の出力が示す画素値分布は、それぞれ対応する視差仮想瞳を通過した部分光束の画素値分布と比例関係にあると考えても良い。   In the optical system of the present embodiment, since the actual subject light flux passes through the entire lens pupil, the light intensity distributions corresponding to the parallax virtual pupil are not distinguished from each other until the parallax pixel is reached. However, the parallax pixel outputs an image signal obtained by photoelectrically converting only the partial light flux that has passed through the parallax virtual pupil by the action of the aperture mask that each has. Therefore, the pixel value distribution indicated by the output of the parallax pixel may be considered to be proportional to the pixel value distribution of the partial light flux that has passed through the corresponding parallax virtual pupil.

図4(a)で示すように、被写体である物点が焦点位置に存在する場合、いずれの視差仮想瞳を通った被写体光束であっても、それぞれの視差画素の出力は、対応する像点の画素を中心として急峻な画素値分布を示す。像点付近に視差Lt画素が配列されていれば、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。また、像点付近に視差Rt画素が配列されていても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。すなわち、被写体光束がいずれの視差仮想瞳を通過しても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する分布を示し、それぞれの分布は互いに一致する。   As shown in FIG. 4A, when an object point that is a subject exists at the focal position, the output of each parallax pixel is the corresponding image point regardless of the subject luminous flux that has passed through any parallax virtual pupil. This shows a steep pixel value distribution centering on this pixel. 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.

一方、図4(b)に示すように、物点が焦点位置からずれると、物点が焦点位置に存在した場合に比べて、視差Lt画素が示す画素値分布のピークは、像点に対応する画素から一方向に離れた位置に現れ、かつその出力値は低下する。また、出力値を有する画素の幅も広がる。視差Rt画素が示す画素値分布のピークは、像点に対応する画素から、視差Lt画素における一方向とは逆向きかつ等距離に離れた位置に現れ、同様にその出力値は低下する。また、同様に出力値を有する画素の幅も広がる。すなわち、物点が焦点位置に存在した場合に比べてなだらかとなった同一の画素値分布が、互いに等距離に離間して現れる。また、図4(c)に示すように、さらに物点が焦点位置からずれると、図4(b)の状態に比べて、さらになだらかとなった同一の画素値分布が、より離間して現れる。つまり、物点が焦点位置から大きくずれる程、ぼけ量と視差量が増すと言える。別言すれば、デフォーカスに応じて、ぼけ量と視差量は連動して変化する。すなわち、ぼけ量と視差量は、一対一に対応する関係を有する。   On the other hand, as shown in FIG. 4B, when the object point deviates from the focal position, the peak of the pixel value distribution indicated by the parallax Lt pixel corresponds to the image point, compared to 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 pixel value 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 pixel value 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. 4C, when the object point further deviates from the focal position, the same pixel value distribution that becomes more gentle as compared with the state of FIG. 4B appears further apart. . 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.

また、図4(b)(c)は、物点が焦点位置から遠ざかる方向へずれる場合を示すが、物点が焦点位置から近づく方向へずれる場合は、図4(d)に示すように、図4(b)(c)と比べて、視差Lt画素が示す画素値分布と視差Rt画素が示す画素値分布の相対的な位置関係が逆転する。このようなデフォーカス関係により、視差画像を鑑賞するときに鑑賞者は、焦点位置より奥に存在する被写体を遠くに視認し、手前に存在する被写体を近くに視認する。   FIGS. 4B and 4C show the case where the object point shifts away from the focal position, but when the object point moves away from the focal position, as shown in FIG. Compared to FIGS. 4B and 4C, the relative positional relationship between the pixel value distribution indicated by the parallax Lt pixel and the pixel value distribution indicated by the parallax Rt pixel is reversed. Due to such a defocus relationship, when viewing a parallax image, the viewer visually recognizes a subject existing far behind the focal position and visually recognizes a subject present in front.

図4(b)(c)で説明した画素値分布の変化をそれぞれグラフ化すると、図5のように表される。図において、横軸は画素位置を表し、中心位置が像点に対応する画素位置である。縦軸は各画素の出力値(画素値)を表す。この出力値は上述の通り実質的に光強度に比例する。   When the change of the pixel value distribution described in FIGS. 4B and 4C is graphed, it is 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 (pixel value) of each pixel. As described above, this output value is substantially proportional to the light intensity.

分布曲線1804と分布曲線1805は、それぞれ図4(b)の視差Lt画素の画素値分布と視差Rt画素の画素値分布を表す。図からわかるように、これらの分布は中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1806は、図4(b)の状況に対する視差なし画素の画素値分布、すなわち被写体光束の全体を受光した場合の画素値分布と略相似形状を示す。   The distribution curve 1804 and the distribution curve 1805 represent the pixel value distribution of the parallax Lt pixel and the pixel value distribution of the parallax Rt pixel in FIG. 4B, respectively. 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 them shows a pixel value distribution of pixels without parallax with respect to the situation of FIG. 4B, that is, a pixel value distribution when the entire subject luminous flux is received, and a substantially similar shape.

分布曲線1807と分布曲線1808は、それぞれ図4(c)の視差Lt画素の画素値分布と視差Rt画素の画素値分布を表す。図からわかるように、これらの分布も中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1809は、図4(c)の状況に対する視差なし画素の画素値分布と略相似形状を示す。   A distribution curve 1807 and a distribution curve 1808 represent the pixel value distribution of the parallax Lt pixel and the pixel value 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 shape substantially similar to the pixel value distribution of the non-parallax pixels for the situation of FIG.

以上から分かるように、実際に撮像素子100の出力値として取得され、空格子が補間処理された、画素値分布の視差Lt画素の画素値と視差Rt画素の画素値とを用いれば、仮想的な画素値分布をつくり出すことができる。このとき、画素値分布の広がりによって表現されるぼけ量はおよそ維持しつつ、ピーク間の間隔として表現される視差量を調整することもできる。つまり、2D画像のぼけ量をほぼそのまま維持しつつも、視差無し画素から生成される2D画像と視差画素から生成される3D画像との間に調整された視差量を有する画像を生成することができる。   As can be seen from the above, if the pixel value of the parallax Lt pixel and the pixel value of the parallax Rt pixel of the pixel value distribution obtained by actually obtaining the output value of the image sensor 100 and interpolating the sky lattice are used, It is possible to create a simple pixel value distribution. At this time, the amount of parallax expressed as an interval between peaks can be adjusted while maintaining the amount of blur expressed by the spread of the pixel value distribution approximately. That is, it is possible to generate an image having a parallax amount adjusted between a 2D image generated from non-parallax pixels and a 3D image generated from parallax pixels while maintaining the blur amount of the 2D image almost as it is. it can.

図6は、調整視差量の概念を説明するための画素値分布を示す図である。図において実線で示すLt分布曲線1901とRt分布曲線1902は、LtプレーンデータとRtプレーンデータの実際の画素値をプロットした分布曲線である。例えば、図5における分布曲線1804、1805に相当する。そして、Lt分布曲線1901とRt分布曲線1902のそれぞれのピーク間距離は3D視差量を表し、この距離が大きいほど、画像再生時の立体感が強くなる。   FIG. 6 is a diagram illustrating a pixel value distribution for explaining the concept of the adjusted parallax amount. Lt distribution curves 1901 and Rt distribution curves 1902 indicated by solid lines in the figure are distribution curves in which actual pixel 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は、図5における合成分布曲線1806の高さを1/2にした形状に相当する。すなわち、この分布に基づく画像は、視差量「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 combined distribution curve 1806 in FIG. That is, an image based on this distribution is a 2D image with a parallax amount “0”.

調整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 pixel value distribution to each plane of color image data generated from pixels without parallax, the color of the left viewpoint that gives a stereoscopic effect different from that of parallax image data generated from parallax pixels Image data and right-view color image data can be generated.

具体的には、図3を用いて説明した9つのプレーンデータから、左側視点のカラー画像データと右側視点のカラー画像データを生成することができる。左側視点のカラー画像データは、左側視点に対応する赤色プレーンデータであるRLtプレーンデータ、緑色プレーンデータであるGLtプレーンデータ、および青色プレーンデータであるBLtプレーンデータの3つのカラー視差プレーンデータによって構成される。同様に、右側視点のカラー画像データは、右側視点に対応する赤色プレーンデータであるRRtプレーンデータ、緑色プレーンデータであるGRtプレーンデータ、および青色プレーンデータであるBRtプレーンデータの3つのカラー視差プレーンデータによって構成される。 Specifically, left-viewpoint color image data and right-viewpoint color image data can be generated from the nine plane data described with reference to FIG. 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.

図7は、比較例としてのカラー視差プレーンデータの生成処理を説明する図である。特に、カラー視差プレーンのうち赤色視差プレーンである、RLtプレーンデータとRRtプレーンデータの生成処理について示す。 FIG. 7 is a diagram illustrating color parallax plane data generation processing as a comparative example. 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.

赤色視差プレーンは、図3を用いて説明したRnプレーンデータの画素値と、RLtプレーンデータおよびRRtプレーンデータの画素値とを用いて生成する。具体的には、例えばRLtプレーンデータの対象画素位置(i,j)の画素値RLtmnを算出する場合、まず、Rnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する。次に、RLtプレーンデータの同一画素位置(i,j)から画素値RLtmnを、RRtプレーンデータの同一画素位置(i,j)から画素値RRtmnを抽出する。そして、画素値Rnmnに、画素値RLtmnとRRtmnを立体調整パラメータCで分配した値を乗じて、画素値RLtcmnを算出する。具体的には、以下の式(1)により算出する。ただし、比較例のカラー視差プレーンの生成処理では、立体調整パラメータCは画素によらず0.5≦C≦1.0の範囲で単一の値に設定される。
同様に、RRtプレーンデータの対象画素位置(i,j)の画素値RRtcmnを算出する場合も、抽出した画素値Rnmnに、画素値RLtmnと画素値RRtmnを立体調整パラメータCで分配した値を乗じて算出する。具体的には、以下の式(2)により算出する。
このような処理を、左端かつ上端の画素である(1、1)から右端かつ下端の座標である(i,j)まで順次実行する。
The red parallax plane is generated using the pixel value of the Rn plane data described with reference to FIG. 3, and the pixel value of the RLt plane data and the RRt 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 is calculated from the same pixel position (i m , j n ) of the Rn plane data. Rn mn is extracted. Then, the same pixel position of RLt plane data (i m, j n) pixel values RLt mn from extracts the pixel values RRT mn from the same pixel position of the RRT plane data (i m, j n). Then, the pixel value Rn mn, by multiplying the value obtained by distributing the pixel values RLt mn and RRT mn stereoscopic adjustment parameter C, and calculates the pixel value RLt cmn. Specifically, it is calculated by the following equation (1). However, in the color parallax plane generation process of the comparative example, the stereoscopic adjustment parameter C is set to a single value in the range of 0.5 ≦ C ≦ 1.0 regardless of the pixels.
Similarly, when calculating the pixel value RRt cmd of the target pixel position (i m , j n ) of the RRt c plane data, the three-dimensional adjustment parameter is obtained by adding the pixel value RLt mn and the pixel value RRt mn to the extracted pixel value Rn mn. Calculated by multiplying the value distributed in C. Specifically, it is calculated by the following equation (2).
Such processing is sequentially executed 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を抽出する。また、RLtプレーンデータの同一画素位置(i,j)から画素値RLtmnを抽出する代わりに、GLtプレーンデータの同一画素位置(i,j)から画素値GLtmnを抽出する。同様に、RRtプレーンデータの同一画素位置(i,j)から画素値RRtmnを抽出する代わりに、GRtプレーンデータの同一画素位置(i,j)から画素値GRtmnを抽出する。そして、式(1)および式(2)の各パラメータを適宜変更して同様に処理する。 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. Moreover, the same pixel position of RLt plane data (i m, j n) from instead of extracting the pixel value RLt mn, extracts the pixel value GLt mn from the same pixel position of GLt plane data (i m, j n). Similarly, the same pixel position of the RRT plane data (i m, j n) from instead of extracting the pixel value RRT mn, extracts the pixel value GRT mn from the same pixel position of GRT plane data (i m, j n) . Then, the parameters of Equation (1) and Equation (2) are appropriately changed and processed in the same manner.

さらに、緑色視差プレーンであるGLtプレーンデータとGRtプレーンデータの生成処理が完了したら、次に青色視差プレーンであるBLtプレーンデータとBRtプレーンデータの生成処理を実行する。具体的には、上述の説明においてRnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する代わりに、Bnプレーンデータの同一画素位置(i,j)から画素値Bnmnを抽出する。また、RLtプレーンデータの同一画素位置(i,j)から画素値RLtmnを抽出する代わりに、BLtプレーンデータの同一画素位置(i,j)から画素値BLtmnを抽出する。同様に、RRtプレーンデータの同一画素位置(i,j)から画素値RRtmnを抽出する代わりに、BRtプレーンデータの同一画素位置(i,j)から画素値BRtmnを抽出する。そして、式(1)および式(2)の各パラメータを適宜変更して同様に処理する。 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 Extract the value Bn mn . Moreover, the same pixel position of RLt plane data (i m, j n) from instead of extracting the pixel value RLt mn, extracts the pixel value BLt mn from the same pixel position of BLt plane data (i m, j n). Similarly, the same pixel position of the RRT plane data (i m, j n) from instead of extracting the pixel value RRT mn, extracts the pixel value BRt mn from the same pixel position of BRt plane data (i m, j n) . Then, the parameters of Equation (1) and Equation (2) are appropriately changed and processed in the same manner.

以上の処理により、左側視点のカラー画像データ(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.0の範囲で変更できるので、視差無し画素による2Dカラー画像のぼけ量を維持したまま、3D画像としての視差量の大きさを調整することができる。したがって、これらの画像データを3D画像対応の再生装置で再生すれば、立体映像表示パネルの鑑賞者は、カラー画像として立体感が適度に調整された3D映像を鑑賞できる。特に、処理が簡易なので高速に画像データを生成することができ、動画像にも対応できる。   In addition, since the value of the stereoscopic adjustment parameter C can be changed within the range of 0.5 ≦ C ≦ 1.0, the amount of parallax as a 3D image can be increased while maintaining the amount of blur of the 2D color image due to pixels without parallax. Can be adjusted. Therefore, if these image data are reproduced by a 3D image compatible reproduction device, the viewer of the stereoscopic video display panel can appreciate the 3D video in which the stereoscopic effect is appropriately adjusted 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.

次に、以上の処理を画素値分布とカラーの観点から説明する。図8は、RGBの画素値分布の変化を説明する図である。図8(a)は、焦点位置から一定量だけずれた位置に存在する物点からのある白色被写体光束を受光した場合の、G(Lt)画素、G(Rt)画素、R(Lt)画素、R(Rt)画素、B(Lt)画素およびB(Rt)画素のそれぞれの出力値を並べたグラフである。   Next, the above processing will be described from the viewpoint of pixel value distribution and color. FIG. 8 is a diagram for explaining a change in RGB pixel value distribution. FIG. 8A shows a G (Lt) pixel, a G (Rt) pixel, and an R (Lt) pixel when a white subject light beam from an object point located at a position deviated by a certain amount from the focal position is received. , R (Rt) pixels, B (Lt) pixels, and B (Rt) pixels.

図8(b)は、図8(a)における物点からのある白色被写体光束を受光した場合の、視差無し画素であるR(N)画素、G(N)画素およびB(N)画素の出力値を並べたグラフである。このグラフも、各色の画素値分布を表すと言える。   FIG. 8B shows the R (N) pixel, G (N) pixel, and B (N) pixel that are non-parallax pixels when a white subject light beam from the object point in FIG. 8A is received. It is the graph which arranged the output value. It can be said that this graph also represents the pixel value distribution of each color.

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

続いて、本実施形態における視差量の調整について説明する。上述した比較例としての視差量の調整においては、プレーンデータの画像を表示する各画素の画素値に対して単一の立体調整パラメータCを適用することで視差プレーンデータにおける対応画素の画素値を算出した。   Next, adjustment of the parallax amount in the present embodiment will be described. In the adjustment of the parallax amount as the comparative example described above, the pixel value of the corresponding pixel in the parallax plane data is obtained by applying a single stereoscopic adjustment parameter C to the pixel value of each pixel that displays the image of the plane data. Calculated.

これに対し、本実施形態における視差量の調整においては、プレーンデータを評価するための評価マップを用いて画素ごとに異なる立体調整パラメータCの値を適用することで、視差プレーンデータにおける対応画素の画素値を算出する。   On the other hand, in the adjustment of the amount of parallax in the present embodiment, by applying a different value of the three-dimensional adjustment parameter C for each pixel using an evaluation map for evaluating the plane data, the corresponding pixel in the parallax plane data is adjusted. Pixel value is calculated.

本実施形態における画像処理部205の評価マップ生成部231は、撮影画像データの画像に含まれる被写体の表示画素の評価値を、画素の位置に対応させて二次元的に配列した評価マップを生成する。ここでは、評価マップ生成部231は、撮影画像データから評価マップを生成する。   The evaluation map generation unit 231 of the image processing unit 205 in this embodiment generates an evaluation map in which the evaluation values of the display pixels of the subject included in the image of the captured image data are two-dimensionally arranged corresponding to the pixel positions. To do. Here, the evaluation map generation unit 231 generates an evaluation map from the captured image data.

好ましくは、評価マップ生成部231は、撮影画像データにおけるLtプレーンデータおよびRtプレーンデータからそれぞれ予備評価マップを生成し、これらの予備評価マップ同士を合成して評価マップを生成する。より好ましくは、評価マップ生成部231は、被写体を表示する画素と周辺画素との差異を、鑑賞者が注視する確度と関連づけて数値化した予備評価値(後述の顕著度)の分布データ、換言すれば、いわゆる顕著性マップを予備評価マップとして用いる。   Preferably, the evaluation map generation unit 231 generates a preliminary evaluation map from the Lt plane data and the Rt plane data in the captured image data, and generates an evaluation map by combining these preliminary evaluation maps. More preferably, the evaluation map generation unit 231 distributes preliminary evaluation value (notice level described later) distribution data obtained by quantifying the difference between a pixel displaying a subject and surrounding pixels in association with the accuracy of the viewer's gaze. In this case, a so-called saliency map is used as the preliminary evaluation map.

このように顕著性マップとしての予備評価マップ同士を合成して評価マップを生成する場合には、評価マップにおける被写体の表示画素の評価値は、予備評価マップにおける各画素の予備評価値を画素ごとに合成した値となる。そのため、この場合の評価マップにおける被写体の表示画素の評価値は、この画素の予備評価値と同様に、被写体を表示する画素と周辺画素との差異を、鑑賞者が注視する確度と関連づけて数値化した値と言える。   In this way, when the evaluation map is generated by combining the preliminary evaluation maps as the saliency maps, the evaluation value of the display pixel of the subject in the evaluation map is the pixel-by-pixel preliminary evaluation value of each pixel in the preliminary evaluation map. It becomes the value synthesized. For this reason, the evaluation value of the display pixel of the subject in the evaluation map in this case is a numerical value that relates the difference between the pixel displaying the subject and the surrounding pixels in the same manner as the preliminary evaluation value of this pixel, in association with the accuracy with which the viewer gazes. It can be said that it has become a value.

ここで、確度とは、確からしさの度合い、確実さである。また、鑑賞者が注視する確度とは、鑑賞者が注視することの確からしさを数値で表したものである。   Here, the accuracy is a degree of certainty and certainty. In addition, the accuracy of the viewer's gaze is a numerical value representing the probability of the viewer's gaze.

また、予備評価マップ同士を合成するとは、本実施形態では、Ltプレーンデータ及びRtプレーンデータの予備評価マップにおける被写体の表示画素ごとに、その予備評価値同士の相乗平均をとることを意味する。   Further, in this embodiment, synthesizing the preliminary evaluation maps means taking a geometric average of the preliminary evaluation values for each display pixel of the subject in the preliminary evaluation map of the Lt plane data and the Rt plane data.

Lt、Rtプレーンデータにおける被写体の表示画素ごとの予備評価値同士を画素ごとに合成することで評価マップを生成する場合には、鑑賞時の違和感や疲労感が抑えられる。この効果を説明するため、デジタルカメラ10のデフォーカス領域において手前側の被写体と奥側の被写体とが画像上で上下や左右に隣接するような視差画像データを生成する場合を考える。   When the evaluation map is generated by combining the preliminary evaluation values for the display pixels of the subject in the Lt and Rt plane data for each pixel, a sense of incongruity and a feeling of fatigue during viewing can be suppressed. In order to explain this effect, let us consider a case in which parallax image data is generated such that the near-side subject and the far-side subject are adjacent vertically or horizontally on the image in the defocus area of the digital camera 10.

この場合、予備評価マップにおける画素ごとの予備評価値には、視点ごとに顕著度が異なって視野闘争を生じやすい画素の予備評価値と、視点ごとの顕著度が共通して視野闘争を生じにくい画素の予備評価値とが混在する。そして、このような予備評価値を画素ごとに合成すると、視点ごとに顕著度が異なって視野闘争を生じやすい画素の評価値と、視点ごとの顕著度が共通して視野闘争を生じにくい画素の評価値との差が明確になる。   In this case, the preliminary evaluation value for each pixel in the preliminary evaluation map is unlikely to cause a visual field conflict because the preliminary evaluation value of a pixel that has a different degree of saliency for each viewpoint and easily causes a visual field conflict and the saliency for each viewpoint are common. Pixel preliminary evaluation values are mixed. Then, when such preliminary evaluation values are synthesized for each pixel, the evaluation values of pixels that have different saliency for each viewpoint and are likely to cause a visual field conflict, and pixels that are less likely to cause a visual field conflict due to the common saliency for each viewpoint. The difference from the evaluation value becomes clear.

これにより、視野闘争を生じやすい画素に対する立体調整パラメータCの値と、視野闘争を生じにくい画素に対する立体調整パラメータCの値とを相違させることが容易となる。よって、視野闘争を生じやすい画素に対して付与される視差量を、視野闘争を生じにくい画素に対して付与される視差量よりも小さくすることで、鑑賞時の違和感や疲労感が抑えられる。   This makes it easy to make the value of the stereoscopic adjustment parameter C for a pixel that is likely to cause a visual field conflict different from the value of the stereoscopic adjustment parameter C for a pixel that is less likely to cause a visual field conflict. Therefore, by making the amount of parallax given to a pixel that is likely to cause a visual field conflict to be smaller than the amount of parallax given to a pixel that is less likely to cause a visual field conflict, a sense of incongruity or fatigue during viewing can be suppressed.

なお、顕著性マップとは、人間の視覚受容野の働きを模倣し、視覚注意を呼ぶ箇所を抽出することで得られる画像データであり、換言すれば、被写体を表示する画素と周辺画素との差異を、鑑賞者が注視する確度と関連づけて数値化した顕著度の分布データである。顕著性マップは、色、輝度及びエッジ方向の3つの指標を用いて周囲との相違度に応じた各画素の顕著度(saliency value)を計算することで生成される。   Note that the saliency map is image data obtained by imitating the function of the human visual receptive field and extracting the part that calls for visual attention. In other words, the saliency map includes the pixels that display the subject and the peripheral pixels. This is distribution data of the saliency that is obtained by quantifying the difference in association with the accuracy with which the viewer gazes. The saliency map is generated by calculating the saliency value of each pixel according to the degree of difference from the surroundings using three indicators of color, luminance, and edge direction.

このような顕著性マップは、例えばItti等による論文"A Model of Saliency-Based Visual Attention for Rapid Scene Analysis"(刊行物名:The IEEE Transactions on Pattern Analysis and Machine Intelligence、発行国:USA、発行所:IEEE Computer Society、発行年月: Nov 1998、巻数:Volume 20、ページ:pp.1254〜1259)に記載の手法により生成される。この手法では、まずカラー画像を色、輝度、エッジ方向の3つの特徴に分解し、それぞれのガウシアンピラミッドを生成し、これら3つのガウシアンピラミッドを用いてcenter-surround演算を行うことで特徴マップを生成した後、全ての特徴マップを正規化し統合することで顕著性マップを生成する。   Such a saliency map is, for example, the paper “A Model of Saliency-Based Visual Attention for Rapid Scene Analysis” by Itti et al. (Publication name: The IEEE Transactions on Pattern Analysis and Machine Intelligence, publication country: USA, publication place: IEEE Computer Society, date of issue: Nov 1998, volume: Volume 20, pages: pp. 1254-1259). In this method, first, a color image is decomposed into three features of color, luminance, and edge direction, each Gaussian pyramid is generated, and a feature map is generated by performing center-surround calculation using these three Gaussian pyramids. Then, the saliency map is generated by normalizing and integrating all the feature maps.

図9は、この手法により生成された顕著性マップの例を示す図である。ここで、図中の右側の画像は顕著性マップを示す画像であり、左側の画像は顕著性マップを生成するために用いた元画像、つまり入力画像である。   FIG. 9 is a diagram showing an example of the saliency map generated by this method. Here, the right image in the figure is an image showing a saliency map, and the left image is an original image used to generate the saliency map, that is, an input image.

この入力画像は複数のドット300を図示したカラーの抽象画であり、背景色は白色、ドット300の色は赤色となっている。より詳細には、いくつかのドット300では色が掠れており、右側の下から2番目のドット300には中心を横断するように緑色のライン301が描画されている。   This input image is a color abstract picture illustrating a plurality of dots 300, the background color is white, and the color of the dots 300 is red. More specifically, some of the dots 300 are faded, and a green line 301 is drawn on the second dot 300 from the lower right side so as to cross the center.

また、画像の全面に亘り、薄い緑色の小点によって斑に網掛けが施されている。このような入力画像を人間が鑑賞すると、人間の感性によって右側の下から2番目のドット300が最も注目されやすい。   Further, over the entire surface of the image, the spots are shaded by small green dots. When a human appreciates such an input image, the second dot 300 from the lower right is most likely to be noticed due to human sensitivity.

一方、顕著性マップの画像は、例えば256階調のグレースケール画像であり、色の薄い画素ほど顕著度が高く、色の濃い画素ほど顕著度が低いことを示している。この図では、右側から2番目のドット300の顕著度が最も高くなっており、人間の感性に沿って顕著度が評価されていることが分かる。   On the other hand, the image of the saliency map is, for example, a grayscale image of 256 gradations, and indicates that the saliency is higher as the pixel is lighter and the saliency is lower as the pixel is darker. In this figure, it can be seen that the second dot 300 from the right side has the highest saliency, and the saliency is evaluated according to human sensitivity.

このような顕著性マップにおける被写体の顕著度は、その被写体がぼやけていると低くなりやすい。そのため、撮影画像の顕著性マップを生成すると、フォーカス位置の被写体では輪郭がはっきりしているので、顕著度が高くなりやすい。また、フォーカス位置から離れた被写体では輪郭がぼやけているので、顕著度が低くなりやすい。   The saliency of a subject in such a saliency map tends to be low when the subject is blurred. Therefore, when the saliency map of the captured image is generated, the saliency is likely to be high because the contour is clear in the subject at the focus position. In addition, since the outline is blurred in a subject away from the focus position, the saliency is likely to be low.

なお、顕著性マップを生成する手法としては、従来公知の他の手法を用いても良い。このような手法としては、例えばHarel等による論文"Graph Based Visual Saliency"(刊行物名:Advances in Neural Information Processing Systems (NIPS)、発行年: 2007、ページ:pp.545〜552)、及びJiang等による論文"Automatic salient object segmentation based on context and shape prior"(刊行物名:British Machine Vision Conference、発行年: 2011、ページ:pp.1〜12)等に記載の手法を用いることができる。   As a method for generating the saliency map, another conventionally known method may be used. Examples of such methods include the paper “Graph Based Visual Saliency” by Harel et al. (Publication name: Advances in Neural Information Processing Systems (NIPS), Publication year: 2007, pages: pp. 545-552), Jiang et al. Can be used as described in the paper "Automatic salient object segmentation based on context and shape prior" (publication name: British Machine Vision Conference, publication year: 2011, pages: pp. 1-12).

本実施形態における画像処理部205の調整パラメータ値決定部232は、立体調整パラメータCの値を、評価マップの評価値に対応させて画素ごとに決定する。換言すれば、調整パラメータ値決定部232は、評価マップの画素ごとのデータ、つまり画素ごとの評価値に基づき、Ltプレーンデータ及びRtプレーンデータの対応画素に対して立体調整パラメータCの値をそれぞれ決定する。   The adjustment parameter value determination unit 232 of the image processing unit 205 in the present embodiment determines the value of the stereoscopic adjustment parameter C for each pixel in association with the evaluation value of the evaluation map. In other words, the adjustment parameter value determination unit 232 sets the value of the stereoscopic adjustment parameter C for the corresponding pixels of the Lt plane data and the Rt plane data based on the data for each pixel of the evaluation map, that is, the evaluation value for each pixel. decide.

より詳細には、調整パラメータ値決定部232は、評価マップにおける画素ごとの評価値が取りうる各値から立体調整パラメータCの値を算出するためのパラメータ値算出関数を記憶している。そして、調整パラメータ値決定部232は、このパラメータ値算出関数を用いて画素ごとに立体調整パラメータCの値を算出し、対応画素に対して決定する。   More specifically, the adjustment parameter value determination unit 232 stores a parameter value calculation function for calculating the value of the three-dimensional adjustment parameter C from each value that can be taken by the evaluation value for each pixel in the evaluation map. Then, the adjustment parameter value determination unit 232 calculates the value of the three-dimensional adjustment parameter C for each pixel using this parameter value calculation function, and determines the corresponding pixel.

このパラメータ値算出関数では、評価値が大きいほど立体調整パラメータCの値を1に近づけて視差量が変化しないようにし、評価値が小さいほど立体調整パラメータCの値を0.5に近づけて視差量を小さくすることが好ましい。また、評価値が小さい場合の立体調整パラメータCの変化量よりも、評価値が大きい場合の立体調整パラメータCの変化量が大きいことが好ましい。具体的には、評価値が小さい場合の評価値の単位増分に対する立体調整パラメータCの値の増分は、評価値が大きい場合の単位増分に対する立体調整パラメータCの値の増分よりも大きいことが好ましい。   In this parameter value calculation function, the larger the evaluation value, the closer the stereoscopic adjustment parameter C value to 1 so that the amount of parallax does not change, and the smaller the evaluation value, the closer the stereoscopic adjustment parameter C value to 0.5 and the parallax. It is preferable to reduce the amount. In addition, it is preferable that the amount of change in the three-dimensional adjustment parameter C when the evaluation value is large is larger than the amount of change in the three-dimensional adjustment parameter C when the evaluation value is small. Specifically, it is preferable that the increment of the value of the stereo adjustment parameter C with respect to the unit increment of the evaluation value when the evaluation value is small is larger than the increment of the value of the stereo adjustment parameter C with respect to the unit increment when the evaluation value is large. .

更に、パラメータ値算出関数としては、非線形の関数が好ましく、例えばガンマ値γが0<γ<1を満たすようなガンマ補正を表す関数を用いることができる。図10は、パラメータ値算出関数の具体例を示す図である。   Further, as the parameter value calculation function, a non-linear function is preferable, and for example, a function representing gamma correction such that the gamma value γ satisfies 0 <γ <1 can be used. FIG. 10 is a diagram illustrating a specific example of the parameter value calculation function.

ここで、図中の横軸(x軸)は入力値としての評価値(ここでは256段階で表される顕著度の相乗平均)を示しており、0≦x≦255となっている。また、縦軸(y軸)は出力値としての立体調整パラメータCの値を示しており、0.50≦y≦1.00となっている。   Here, the horizontal axis (x-axis) in the figure represents an evaluation value (here, a geometric mean of saliency expressed in 256 levels) as an input value, and 0 ≦ x ≦ 255. The vertical axis (y-axis) indicates the value of the three-dimensional adjustment parameter C as an output value, and 0.50 ≦ y ≦ 1.00.

この図で示される関数のうち、ガンマ値γが0<γ<1を満たすようなガンマ補正の関数としては、「y=x1/4.4」または「y=x1/2.2」を用いることができる。なお、パラメータ値算出関数は図10に示した関数に限らず、立体調整パラメータCの値の範囲が0.75から1.00になるよう正規化したパラメータ値算出関数を用いても良い。 Among the functions shown in this figure, as a function of gamma correction such that the gamma value γ satisfies 0 <γ <1, “y = x 1 / 4.4 ” or “y = x 1 / 2.2 ” Can be used. The parameter value calculation function is not limited to the function shown in FIG. 10, and a parameter value calculation function that is normalized so that the range of the value of the stereo adjustment parameter C is 0.75 to 1.00 may be used.

本実施形態における画像処理部205の視差画像データ生成部233は、プレーンデータから、視差画像データを生成する。この視差画像データには、互いに視差を有するLt視差プレーンデータ及びRt視差プレーンデータが包含される。 The parallax image data generation unit 233 of the image processing unit 205 in the present embodiment generates parallax image data from plane data. The parallax image data includes Lt c parallax plane data and Rt c parallax plane data having parallax with each other.

より具体的には、視差画像データ生成部233は、例えば上述の式(1)などを用い、LtプレーンデータとRtプレーンデータとの各画素に対し、対応する立体調整パラメータCの値を適用する。これにより、Ltプレーンデータ及びRtプレーンデータの画像間における視差量とは異なる視差量を互いとの間に有するLt視差プレーンデータ及びRt視差プレーンデータを生成する。 More specifically, the parallax image data generation unit 233 applies the value of the corresponding stereoscopic adjustment parameter C to each pixel of the Lt plane data and the Rt plane data using, for example, the above-described equation (1). . Thus, Lt c parallax plane data and Rt c parallax plane data having a parallax amount different from the parallax amount between images of the Lt plane data and the Rt plane data are generated.

次に、以上のような3D画像データを再生装置で再生した場合の、鑑賞者と映像との関係について説明する。図11は、鑑賞者の輻輳角と視差量の関係を示す図である。眼球50は、鑑賞者の眼球を表し、図は、右目51と左目52が離間している様子を示す。   Next, the relationship between the viewer and the video when the 3D image data as described above is played back by a playback device will be described. FIG. 11 is a diagram illustrating the relationship between the vergence angle of the viewer and the amount of parallax. The eyeball 50 represents the eyeball of the viewer, and the figure shows the right eye 51 and the left eye 52 being separated.

表示部40には、視差量が調整されていない非調整画像データが再生され、右目用画像の被写体61と左目用画像の被写体62が表示されている。被写体61と被写体62は同一の被写体であり、撮影時において焦点位置からずれた位置に存在していたので、表示部40においては、視差量Dをもって離間して表示されている。 The display unit 40 reproduces non-adjusted image data whose parallax amount is not adjusted, and displays a subject 61 for the right-eye image and a subject 62 for the left-eye image. Object 61 and the object 62 are the same object, so were present at a position shifted from the focal position at the time of shooting, the display unit 40 is displayed at a distance with a disparity amount D 1.

眼球50は、これらを一致させて視認しようとするので、鑑賞者は、右目51と被写体61を結ぶ直線と、左目52と被写体62を結ぶ直線とが交差する、浮き上がり距離L1の位置(図において四角で表す)に被写体が存在するように認識する。   Since the eyeball 50 is intended to be viewed with the eyeballs coincident with each other, the viewer views the position of the lifting distance L1 (in the drawing) where the straight line connecting the right eye 51 and the subject 61 and the straight line connecting the left eye 52 and the subject 62 intersect. (Represented by a square).

このときの輻輳角は、図示するようにθである。一般的に、輻輳角が大きくなると、映像に対して違和感を覚え、また、眼精疲労の原因ともなる。そこで、本実施形態においては、上述のように、評価マップにおいて評価値の小さい画素ほど視差量が小さくなるよう立体調整パラメータで視差量を調整した調整画像データを生成する。図は、非調整画像データに重ねて調整画像データが再生されている様子を示す。 The convergence angle at this time is θ 1 as shown in the figure. In general, when the angle of convergence is increased, the video is uncomfortable and causes eye strain. Therefore, in the present embodiment, as described above, adjusted image data in which the parallax amount is adjusted with the stereoscopic adjustment parameter is generated so that the smaller the evaluation value in the evaluation map, the smaller the parallax amount is. The figure shows a state in which the adjusted image data is reproduced over the non-adjusted image data.

表示部40には、調整画像データの右目用画像の被写体71と左目用画像の被写体72が表示されている。被写体71と被写体72は同一の被写体であり、また被写体61、62とも同一の被写体である。これらの被写体は、評価マップにおいて評価値が小さい画素で表示される。被写体71と被写体72は、表示部40においては、視差量Dをもって離間して表示されている。鑑賞者は、右目51と被写体71を結ぶ直線と、左目52と被写体72を結ぶ直線とが交差する、浮き上がり距離L2の位置(図において三角で表す)に被写体が存在するように認識する。 The display unit 40 displays a subject 71 of the right-eye image and a subject 72 of the left-eye image of the adjustment image data. The subject 71 and the subject 72 are the same subject, and the subjects 61 and 62 are also the same subject. These subjects are displayed with pixels having small evaluation values in the evaluation map. Object 71 and the object 72, the display unit 40 is displayed at a distance with a disparity amount D 2. The viewer recognizes that the subject exists at the position of the lifting distance L2 (represented by a triangle in the figure) where the straight line connecting the right eye 51 and the subject 71 intersects with the straight line connecting the left eye 52 and the subject 72.

このときの輻輳角は、θよりも小さいθである。したがって、鑑賞者は極端な浮き上がり感を感じることなく、また眼精疲労の蓄積も軽減できる。なお、視差量は、後述するように適度に調整されるので、鑑賞者は、心地良い浮き上がり感(デフォーカス関係が逆転した場合の沈み込み感も合せて立体感)をもって映像を鑑賞できる。 The convergence angle at this time is θ 2 smaller than θ 1 . Therefore, the viewer can feel the extreme feeling of lifting and can reduce the accumulation of eye strain. Note that the amount of parallax is appropriately adjusted as will be described later, so that the viewer can appreciate the video with a comfortable floating feeling (a three-dimensional effect with a feeling of depression when the defocus relationship is reversed).

なお、図11の説明として用いた視差量は、表示部40における離間距離で表わされたが、視差量は、さまざまな形式で定義され得る。撮影画像データにおけるピクセル単位で定義しても良いし、画像の横幅に対するずれ幅で定義しても良い。   Note that the amount of parallax used as the description of FIG. 11 is represented by the separation distance in the display unit 40, but the amount of parallax can be defined in various forms. You may define by the pixel unit in picked-up image data, and you may define by the shift | offset | difference width with respect to the horizontal width of an image.

本実施形態における視差量の調整によれば、フォーカス位置の被写体を表示する画素では、評価値が大きくなる(顕著度が高くなる)結果、視差量が維持されるように立体調整パラメータCの値が決定される。そして、フォーカス位置から被写体が離れるに従って、その被写体を表示する画素では、評価値が小さくなる(顕著度が低くなる)結果、視差量が小さくなるように立体調整パラメータCの値が決定される。   According to the adjustment of the parallax amount in the present embodiment, the value of the stereoscopic adjustment parameter C is maintained such that the parallax amount is maintained as a result of the evaluation value becoming large (the degree of saliency increases) in the pixel displaying the subject at the focus position. Is determined. Then, as the subject moves away from the focus position, the value of the three-dimensional adjustment parameter C is determined so that the evaluation value becomes smaller (the saliency becomes lower) in the pixel displaying the subject, and as a result, the parallax amount becomes smaller.

しかしながら、このようにして立体調整パラメータCの値を決定しても、フォーカス位置から離れた被写体の視差量が依然として大きく残ってしまうと、鑑賞者が違和感、疲労感を覚えてしまう。そのため、本実施形態において画像処理部205は、鑑賞者が違和感、疲労感を覚えてしまうのを確実に防止すべく、設定された下限値と上限値の間に視差量が収まるように調整画像データを生成しても良い。   However, even if the value of the three-dimensional adjustment parameter C is determined in this way, if the parallax amount of the subject away from the focus position still remains large, the viewer will feel uncomfortable and tired. Therefore, in this embodiment, the image processing unit 205 adjusts the parallax amount so that the amount of parallax falls between the set lower limit value and the upper limit value in order to surely prevent the viewer from feeling uncomfortable and tired. Data may be generated.

まず、視差量の制限について説明する。図12は、視差量制限のメニュー画面を表示するデジタルカメラ10の背面図である。   First, the limitation on the amount of parallax will be described. FIG. 12 is a rear view of the digital camera 10 that displays a menu screen for limiting the amount of parallax.

視差量の制限は、例えば下限値−m、上限値+mのように設定される。下限値と上限値の絶対値は異なっていても良い。ここでは、視差量を調整視差画像データにおける視差画像のピクセル単位で表す。   The limit of the parallax amount is set, for example, as a lower limit value −m and an upper limit value + m. The absolute value of the lower limit value and the upper limit value may be different. Here, the parallax amount is expressed in units of pixels of the parallax image in the adjusted parallax image data.

鑑賞者が違和感、疲労感を覚える視差量は、鑑賞者ごとに異なる。したがって、撮影時においてデジタルカメラ10のユーザである撮影者が視差量制限の設定を変更できるように、デジタルカメラ10を構成することが好ましい。   The amount of parallax that the viewer feels uncomfortable and tired varies from viewer to viewer. Therefore, it is preferable to configure the digital camera 10 so that a photographer who is a user of the digital camera 10 can change the setting of the parallax amount restriction at the time of shooting.

デジタルカメラ10には、視差量制限のメニューとして、例えば、図示するように4つの選択肢が設けられている。具体的には、標準的な鑑賞者が心地よいと感じる範囲がプリセットされた「標準」、標準よりも広い範囲がプリセットされ、より大きな視差量を許容する「強め」、標準よりも狭い範囲がプリセットされ、より小さな視差量しか許容しない「弱め」、および撮影者が上限値、下限値を数値入力する「マニュアル」が設けられている。「マニュアル」を選択した場合には、撮影者は、上限値としての「最大浮き上がり量」と下限値としての「最大沈み込み量」を、ピクセル単位で順次指定することができる。撮影者は、操作部208の一部であるダイヤルボタン2081を操作することにより、これらの選択、指定を行う。   The digital camera 10 has, for example, four options as shown in the figure as a menu for limiting the amount of parallax. Specifically, “Standard” presets the range that a standard viewer feels comfortable with, presets a range wider than the standard, “strong” allows a larger amount of parallax, and presets a range narrower than the standard In addition, “weak” that allows only a smaller amount of parallax, and “manual” in which the photographer inputs an upper limit value and a lower limit value are provided. When “Manual” is selected, the photographer can sequentially specify “maximum lifting amount” as an upper limit value and “maximum sinking amount” as a lower limit value in units of pixels. The photographer selects and designates these by operating a dial button 2081 that is a part of the operation unit 208.

このように視差量制限として許容される視差量の範囲が設定されると、画像処理部205は、この範囲に収まるように視差量を調整した調整視差画像データを生成する。このとき、調整パラメータ値決定部232は、設定された範囲に各被写体の視差量が収まるよう、立体調整パラメータCの値を決定する。   When the allowable parallax amount range is set as described above, the image processing unit 205 generates adjusted parallax image data in which the parallax amount is adjusted to fall within this range. At this time, the adjustment parameter value determination unit 232 determines the value of the three-dimensional adjustment parameter C so that the parallax amount of each subject is within the set range.

具体的には、調整パラメータ値決定部232は、設定されうる視差量の範囲に予め対応付けて複数種類記憶されたパラメータ値算出関数から、設定された視差量の範囲に対応するパラメータ値算出関数を検出する。これらのパラメータ算出関数では、出力値としての立体調整パラメータCの最大値が異なっている。そして、このようなパラメータ値算出関数を用いることで、当該範囲に被写体の視差量が収まるよう立体調整パラメータCの値を決定する。   Specifically, the adjustment parameter value determination unit 232 determines the parameter value calculation function corresponding to the set parallax amount range from the parameter value calculation functions stored in advance in association with the range of parallax amounts that can be set. Is detected. In these parameter calculation functions, the maximum value of the three-dimensional adjustment parameter C as an output value is different. Then, by using such a parameter value calculation function, the value of the stereoscopic adjustment parameter C is determined so that the parallax amount of the subject is within the range.

なお、例えば視差量制限のメニューの「標準」に対応するパラメータ算出関数としては、立体調整パラメータCの最大値が1の関数を用いることができる。また、視差量制限のメニューの「強め」に対応するパラメータ算出関数としては、立体調整パラメータCの最大値が1よりも大きい関数を用いることができる。   For example, as a parameter calculation function corresponding to “standard” in the parallax amount restriction menu, a function having a maximum value of the three-dimensional adjustment parameter C of 1 can be used. In addition, as a parameter calculation function corresponding to “higher” in the parallax amount restriction menu, a function in which the maximum value of the stereoscopic adjustment parameter C is larger than 1 can be used.

また、視差量制限のメニューの「弱め」に対応するパラメータ算出関数としては、立体調整パラメータCの最大値が1より小さい関数を用いることができる。また、視差量制限のメニューの「マニュアル」に対応するパラメータ算出関数では、立体調整パラメータCの最大値が任意に変更されるようになっている。   As the parameter calculation function corresponding to “weak” in the parallax amount restriction menu, a function in which the maximum value of the stereoscopic adjustment parameter C is smaller than 1 can be used. Further, in the parameter calculation function corresponding to “Manual” in the parallax amount restriction menu, the maximum value of the three-dimensional adjustment parameter C is arbitrarily changed.

本実施形態における視差量の調整処理は、従来技術のように被写体オブジェクトごとに切り出し、デプスマップの情報を用いつつオブジェクト単位で水平方向に移動させるような複雑な処理を必要としない。したがって、従来技術に比べて高速に演算できるので、画像処理部205は、被写体の状況が刻々と変化する動画撮影に対してもリアルタイムに調整視差画像データを出力することに容易に対応できる。   The parallax amount adjustment processing according to the present embodiment does not require complicated processing such as cutting out for each subject object and moving the object in the horizontal direction using the depth map information as in the prior art. Accordingly, since the calculation can be performed at a higher speed than in the prior art, the image processing unit 205 can easily cope with the output of the adjusted parallax image data in real time even for moving image shooting in which the state of the subject changes every moment.

本実施形態におけるデジタルカメラ10は、心地良い視差量に調整された視差画像データを連続的に生成し、これらを繋ぎ合わせて動画ファイルを生成するオート3D動画モードを、動画撮影モードのひとつとして備える。撮影者は、撮影に先立ち、操作部208の一部であるモードボタン2082を操作して、オート3D動画モードを選択する。   The digital camera 10 according to the present embodiment includes an auto 3D moving image mode in which a parallax image data adjusted to a comfortable parallax amount is continuously generated and a moving image file is generated by connecting the parallax image data as one of the moving image shooting modes. . Prior to shooting, the photographer operates the mode button 2082 that is part of the operation unit 208 to select the auto 3D moving image mode.

次に、デジタルカメラ10の一連の処理フローについて説明する。図13は、動画撮影における処理フローである。   Next, a series of processing flows of the digital camera 10 will be described. FIG. 13 is a processing flow in moving image shooting.

図のフローは、撮影者によりモードボタン2082が操作されてオート3D動画モードが開始された時点から始まる。なお、視差量範囲は、事前に撮影者により設定されているオート3D動画モードが開始されると、制御部201は、ステップS11で、撮影者が設定した視差量範囲をシステムメモリから取得する。   The flow in the figure starts when the mode button 2082 is operated by the photographer and the automatic 3D moving image mode is started. When the auto 3D moving image mode set by the photographer in advance is started for the parallax amount range, the control unit 201 acquires the parallax amount range set by the photographer from the system memory in step S11.

制御部201は、ステップS12で、撮影者が録画開始ボタンを押下げる録画開始指示を待つ。録画開始指示を検出すると(ステップS12のYES)、制御部201は、ステップS13へ進み、AF、AEを実行する。そして、制御部201は、ステップS14で、駆動部204を介して撮像素子100の電荷蓄積、読み出しを実行し、1フレームとしての撮影画像データを取得する。なお、制御部201は、この間、ステップS13の検出結果に応じてフォーカスレンズ駆動、絞り22の駆動を継続していても良い。   In step S12, the control unit 201 waits for a recording start instruction for the photographer to press the recording start button. When a recording start instruction is detected (YES in step S12), the control unit 201 proceeds to step S13 and executes AF and AE. In step S <b> 14, the control unit 201 performs charge accumulation and readout of the image sensor 100 via the drive unit 204, and acquires captured image data as one frame. During this period, the control unit 201 may continue driving the focus lens and the diaphragm 22 in accordance with the detection result in step S13.

ステップS17では、画像処理部205は、評価マップにおける画素ごとのデータに基づき撮影画像データの対応画素にそれぞれ立体調整パラメータCの値を決定し、左側視点のカラー画像データ(RLtプレーンデータ、GLtプレーンデータ、BLtプレーンデータ)および右側視点のカラー画像データ(RRtプレーンデータ、GRtプレーンデータ、BRtプレーンデータ)を生成する。具体的な処理は後述する。 In step S17, the image processing unit 205 determines the value of the stereoscopic adjustment parameter C for each corresponding pixel of the captured image data based on the data for each pixel in the evaluation map, and the color image data (RLt c plane data, GLt for the left viewpoint). 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). Specific processing will be described later.

制御部201は、ステップS18で、撮影者から録画停止指示を受けていないと判断すればステップS13へ戻り次のフレーム処理を実行する。録画停止指示を受けたと判断すればステップS19へ進む。   If the control unit 201 determines in step S18 that a recording stop instruction has not been received from the photographer, the control unit 201 returns to step S13 to execute the next frame processing. If it is determined that a recording stop instruction has been received, the process proceeds to step S19.

ステップS19では、動画生成部234は、連続的に生成された左側視点のカラー画像データと右側視点のカラー画像データを繋ぎ合わせ、Blu−ray3Dなどの3D対応動画フォーマットに従ってフォーマット処理を実行し、動画ファイルを生成する。そして、制御部201は、生成された動画ファイルを、メモリカードIF207を介してメモリカード220へ記録し、一連のフローを終了する。なお、メモリカード220への記録は、左側視点のカラー画像データと右側視点のカラー画像データの生成に同期して逐次実行し、録画停止指示に同期してファイル終端処理を実行しても良い。また、制御部201は、メモリカード220へ記録するに限らず、LANを介して外部機器に出力するように構成しても良い。   In step S19, the moving image generation unit 234 connects the color image data of the left viewpoint and the color image data of the right viewpoint generated continuously, executes format processing according to a 3D-compatible moving image format such as Blu-ray 3D, and the moving image Generate a file. Then, the control unit 201 records the generated moving image file on the memory card 220 via the memory card IF 207, and ends a series of flows. Note that the recording to the memory card 220 may be sequentially executed in synchronization with the generation of the left-viewpoint color image data and the right-viewpoint color image data, and the file end process may be executed in synchronization with the recording stop instruction. Further, the control unit 201 is not limited to recording on the memory card 220, but may be configured to output to an external device via a LAN.

次に、図13のステップS17の処理について詳細に説明する。図14は、左側視点のカラー画像データと右側視点のカラー画像データである視差カラー画像データを生成するまでの、ステップS17の処理フローである。   Next, the process of step S17 in FIG. 13 will be described in detail. FIG. 14 is a processing flow of step S17 until the color image data of the left viewpoint and the parallax color image data that is the color image data of the right viewpoint are generated.

視差画像データ生成部233は、ステップS101で、撮影画像データを取得する。そして、ステップS102において、図3を用いて説明したように、撮影画像データを、視差なし画像データと視差画像データにプレーン分離する。視差画像データ生成部233は、ステップS103で、図3を用いて説明したように分離した各プレーンデータに存在する空格子を補間する補間処理を実行する。そして、Ltプレーンデータと、Rtプレーンデータに基づいて、左側視点及び右側視点の仮のカラー視差画像データを生成する。   In step S101, the parallax image data generation unit 233 acquires captured image data. In step S102, as described with reference to FIG. 3, the captured image data is plane-separated into image data without parallax and parallax image data. In step S103, the parallax image data generation unit 233 executes an interpolation process for interpolating vacancies existing in the separated plane data as described with reference to FIG. Then, based on the Lt plane data and the Rt plane data, temporary color parallax image data of the left viewpoint and the right viewpoint is generated.

評価マップ生成部231は、ステップS104で評価マップを生成する。例えば、評価マップ生成部231は、Ltプレーンデータから生成した仮のカラー視差画像データの顕著性マップ(予備評価マップ)と、Rtプレーンデータから生成した仮のカラー視差画像データの顕著性マップとをそれぞれ生成する。そして、Ltプレーンデータにおける画素ごとの顕著度(予備評価値)と、Rtプレーンデータにおける画素ごとの顕著度とを画素ごとに合成することで、被写体の表示画素の評価値を2次元的に配列した評価マップを生成する。   The evaluation map generation unit 231 generates an evaluation map in step S104. For example, the evaluation map generation unit 231 generates a saliency map (provisional evaluation map) of temporary color parallax image data generated from Lt plane data and a saliency map of temporary color parallax image data generated from Rt plane data. Generate each. Then, the evaluation values of the display pixels of the subject are two-dimensionally arranged by combining the saliency (preliminary evaluation value) for each pixel in the Lt plane data and the saliency for each pixel in the Rt plane data for each pixel. Generated evaluation map.

視差画像データ生成部233は、ステップS105で、各変数の初期化を行う。具体的には、まず、カラー変数Csetに1を代入する。カラー変数Csetは、1=赤、2=緑、3=青を表す。また、座標変数であるiとjに1を代入する。さらに、視差変数Sに1を代入する。視差変数Sは、1=左、2=右を表す。   In step S105, the parallax image data generation unit 233 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.

視差画像データ生成部233は、ステップS106で、評価マップにおける画素位置(i,j)の評価値を抽出する。そして、ステップS107で調整パラメータ値決定部232は、抽出された評価値に対応させて立体調整パラメータCの値を決定する。   In step S106, the parallax image data generation unit 233 extracts the evaluation value of the pixel position (i, j) in the evaluation map. In step S107, the adjustment parameter value determination unit 232 determines the value of the three-dimensional adjustment parameter C in association with the extracted evaluation value.

このとき視差画像データ生成部233は、撮影者が設定した視差量範囲に対応するパラメータ値算出関数を用いることで、当該範囲に被写体の視差量が収まるよう立体調整パラメータを決定する。なお、視差画像データ生成部233が更に画素の種類、換言すればプレーンデータの種類に応じてパラメータ値算出関数を複数種類記憶しておき、処理対象の画素の種類に対応するパラメータ値算出関数を用いて立体調整パラメータの値を決定することとしても良い。   At this time, the parallax image data generation unit 233 uses the parameter value calculation function corresponding to the parallax amount range set by the photographer to determine the stereoscopic adjustment parameter so that the parallax amount of the subject falls within the range. Note that the parallax image data generation unit 233 further stores a plurality of parameter value calculation functions according to the type of pixel, in other words, the type of plane data, and sets a parameter value calculation function corresponding to the type of pixel to be processed. It is good also as determining the value of a three-dimensional adjustment parameter using.

視差画像データ生成部233は、ステップS108において、Csetプレーンの対象画素位置(i,j)から画素値を抽出する。例えばCset=1で、対象画素位置が(1,1)である場合、抽出する画素値は、Rn11である。さらに、視差画像データ生成部233は、ステップS109において、LtCsetプレーンデータ、RtCsetプレーンデータの対象画素位置(i,j)から画素値を抽出する。例えば対象画素位置が(1,1)である場合、抽出する画素値は、LtCset11とRtCset11である。 In step S108, the parallax image data generation unit 233 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, in step S109, the parallax image data generation unit 233 extracts a pixel value from the target pixel position (i, j) of the Lt Cset plane data and the Rt Cset plane data. For example, when the target pixel position is (1, 1), the pixel values to be extracted are Lt Cset11 and Rt Cset11 .

視差画像データ生成部233は、ステップS110において、視差変数Sに対応する対象画素位置(i,j)の画素値を算出する。例えばCset=1、S=1で、対象画素位置が(1,1)である場合、RRLtC11を算出する。具体的には、例えば、上述の式(1)により算出する。ここで、立体調整パラメータCの値は、ステップS107で設定された値である。 In step S110, the parallax image data generation unit 233 calculates a 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), RRLt C11 is calculated. Specifically, for example, it is calculated by the above-described equation (1). Here, the value of the three-dimensional adjustment parameter C is the value set in step S107.

視差画像データ生成部233は、ステップS111で、視差変数Sをインクリメントする。そして、ステップS112で、視差変数Sが2を超えたか否かを判断する。超えていなければステップS110へ戻る。超えていればステップS113へ進む。   The parallax image data generation unit 233 increments the parallax variable S in step S111. In step S112, it is determined whether or not the parallax variable S exceeds 2. If not, the process returns to step S110. If it exceeds, the process proceeds to step S113.

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

視差画像データ生成部233は、ステップS115で、座標変数iに1を代入すると共に、座標変数jをインクリメントする。そして、ステップS116で、座標変数jがjを超えたか否かを判断する。超えていなければステップS106へ戻る。超えていればステップS117へ進む。 In step S115, the parallax image data generation unit 233 assigns 1 to the coordinate variable i and increments the coordinate variable j. Then, in step S116, it is determined whether coordinate variable j exceeds j 0. If not, the process returns to step S106. If it exceeds, the process proceeds to step S117.

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

ステップS118ヘ進み、視差画像データ生成部233は、座標変数jに1を代入すると共に、カラー変数Csetをインクリメントする。そして、ステップS119で、カラー変数Csetが3を超えたか否かを判断する。超えていなければステップS106へ戻る。超えていれば、視差画像データ生成部233は、ステップS120で、左側視点のプレーンデータ(RLtプレーンデータ、GLtプレーンデータ、BLtプレーンデータ)をまとめて左側視点のカラー画像データとし、かつ、右側視点のプレーンデータ(RRtプレーンデータ、GRtプレーンデータ、BRtプレーンデータ)をまとめて右側視点のカラー画像データとして、図13のフローに戻る。 In step S118, the parallax image data generation unit 233 assigns 1 to the coordinate variable j and increments the color variable Cset. In step S119, it is determined whether or not the color variable Cset exceeds 3. If not, the process returns to step S106. If so, the parallax image data generation unit 233 collects the left viewpoint plane data (RLt c plane data, GLt c plane data, and BLt c plane data) into the left viewpoint color image data in step S120, and Then, the right viewpoint plane data (RRt c plane data, GRt c plane data, and BRt c plane data) are collected as right viewpoint color image data, and the process returns to the flow of FIG.

次に、図2を用いて説明した開口マスクの好ましい開口形状について説明する。図15は、好ましい開口形状を説明する図である。   Next, a preferable opening shape of the opening mask described with reference to FIG. 2 will be described. FIG. 15 is a diagram illustrating a preferred opening shape.

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

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

以上の実施形態によれば、被写体の表示画素の評価値を二次元的に配列した評価マップを生成し、視差量を調整する立体調整パラメータCの値を、評価マップの評価値に対応させて決定して視差画像データを生成する。従って、評価値の大きい画素と、評価値の小さい画素との間で立体調整パラメータCの値を相違させて視差画像データを生成することができる。   According to the above embodiment, an evaluation map in which the evaluation values of the display pixels of the subject are two-dimensionally arranged is generated, and the value of the three-dimensional adjustment parameter C for adjusting the parallax amount is made to correspond to the evaluation value of the evaluation map. Determination is performed to generate parallax image data. Accordingly, it is possible to generate parallax image data by making the value of the stereoscopic adjustment parameter C different between a pixel having a large evaluation value and a pixel having a small evaluation value.

これにより、評価値の大きい画素と、評価値の小さい画素とのいずれか一方の画素では視差量が変化しないようにし、他方の画素では視差量を小さくすることができる。その結果、鑑賞者が注目している被写体の表示画素では視差量を変化させずに立体感を維持しつつ、鑑賞者が注目していない被写体の表示画素では視差量を小さくすることができる。よって、視差量の調整量を一律に定める従来の場合と異なり、メリハリのある三次元画像を生成することができる。   Thereby, it is possible to prevent the parallax amount from changing in any one of the pixel having a large evaluation value and the pixel having a small evaluation value, and to reduce the parallax amount in the other pixel. As a result, it is possible to reduce the amount of parallax in the display pixels of the subject not noticed by the viewer while maintaining the stereoscopic effect without changing the amount of parallax in the display pixels of the subject focused by the viewer. Therefore, unlike the conventional case where the adjustment amount of the parallax amount is uniformly determined, a sharp three-dimensional image can be generated.

また、シーンの奥行き方向の被写体分布に関するデータを用いることなく、視差量を調整した視差画像データを生成することができるため、撮影画像データの生成時に奥行き方向の被写体分布に関するデータを生成する手間を省くことができる。また、視差画像データの生成時に奥行き方向の被写体分布に関するデータを解析する手間を省くことができる分、視差画像データを生成するための処理を簡略化することができる。   In addition, since it is possible to generate parallax image data in which the parallax amount is adjusted without using data related to the subject distribution in the depth direction of the scene, there is no need to generate data related to the subject distribution in the depth direction when generating captured image data. It can be omitted. In addition, the process for generating the parallax image data can be simplified by the amount of time and effort required for analyzing the data regarding the subject distribution in the depth direction when generating the parallax image data.

また、被写体の領域と周辺領域との差異を、鑑賞者が注視する確度と関連づけて数値化した値を画素の予備評価値、或いは評価値として用いるので、注視されやすい被写体の視差量を確実に調整することができる。従って、視差画像データに基づく立体画像を鑑賞者が見たときの違和感を確実に低減することができる。   In addition, the difference between the subject area and the surrounding area is used as a preliminary evaluation value or evaluation value of the pixel in association with the accuracy with which the viewer gazes. Can be adjusted. Therefore, it is possible to reliably reduce a sense of incongruity when the viewer views a stereoscopic image based on the parallax image data.

また、或る画素について鑑賞者が注視する確度が小さい(または大きい)とは、当該画素に表示される被写体が画像撮影時にフォーカス領域から遠い(またはフォーカス領域に近い)ことを概ね意味する。そのため、確度に応じて立体調整パラメータCの値を調整することにより、フォーカス領域から遠く違和感を生じやすい被写体に付与される視差量を、フォーカス領域に近く違和感を生じにくい被写体に付与される視差量よりも小さくすることができる。よって、視差画像データに基づく立体画像を鑑賞者が見たときの違和感をよりいっそう確実に低減することができる。   Also, the small (or high) probability that the viewer gazes at a certain pixel generally means that the subject displayed on the pixel is far from the focus area (or close to the focus area) at the time of image capturing. Therefore, by adjusting the value of the three-dimensional adjustment parameter C according to the accuracy, the amount of parallax given to the subject that is likely to cause discomfort far from the focus area is changed to the amount of parallax given to the subject that is close to the focus area and hardly causes discomfort. Can be made smaller. Accordingly, it is possible to further reduce the uncomfortable feeling when the viewer views a stereoscopic image based on the parallax image data.

なお、以上の説明においては、視差画像データ生成部233が用いる計算式は、加重相加平均を利用した上記式(1)(2)を採用したが、これに限らず様々な計算式を採用することができる。例えば、加重相乗平均を利用すれば、上記式(1)(2)と同様に表して、
を計算式として採用できる。この場合、維持されるぼけ量が、視差なし画素の出力によるぼけ量ではなく、視差画素の出力によるぼけ量となる。
In the above description, the calculation formula used by the parallax image data generation unit 233 employs the above formulas (1) and (2) using the weighted arithmetic mean. can do. For example, if the weighted geometric mean is used, it can be expressed in the same manner as the above formulas (1) and (2),
Can be adopted as a calculation formula. In this case, the amount of blur maintained is not the amount of blur due to the output of the non-parallax pixel but the amount of blur due to the output of the parallax pixel.

また、他の計算式としては、上記式(1)(2)と同様に表して、
を採用しても良い。この場合、GLtcmn、GRtcmn、BLtcmn、BRtcmnをそれぞれ算出するときも、立方根の項は変化しない。
Moreover, as another calculation formula, it represents like the said Formula (1) (2),
May be adopted. In this case, when calculating GLt cmn , GRt cmn , BLt cmn , and BRt cmn , the cubic root term does not change.

さらには、
を採用しても良い。この場合も、GLtcmn、GRtcmn、BLtcmn、BRtcmnをそれぞれ算出するときも、立方根の項は変化しない。
Moreover,
May be adopted. Also in this case, when calculating GLt cmn , GRt cmn , BLt cmn , and BRt cmn , the cubic root term does not change.

次に表示装置との連携について説明する。図16は、デジタルカメラ10とTVモニタ80との連携を説明する図である。TVモニタ80は、例えば液晶から構成される表示部40、デジタルカメラ10から取り出されたメモリカード220を受容してメモリカード220から撮影画像データを取得するメモリカードIF81、鑑賞者が手元で操作するリモコン82等により構成されている。TVモニタ80は3D画像の表示に対応している。3D画像の表示形式は、特に限定されない。右目用画像と左目用画像を時分割で表示しても良いし、水平方向または垂直方向に短冊状にそれぞれが並んだインターレースであっても良い。また、画面の一方側と他方側に並ぶサイドバイサイド形式であっても良い。   Next, cooperation with the display device will be described. FIG. 16 is a diagram for explaining the cooperation between the digital camera 10 and the TV monitor 80. The TV monitor 80 includes, for example, a display unit 40 made of liquid crystal, a memory card IF 81 that receives the memory card 220 taken out from the digital camera 10 and acquires photographed image data from the memory card 220, and a viewer operates at hand. The remote control 82 is used. The TV monitor 80 is compatible with 3D image display. The display format of the 3D image is not particularly limited. The right-eye image and the left-eye image may be displayed in a time-sharing manner, or may be an interlace in which strips are arranged in a horizontal or vertical direction. Further, it may be a side-by-side format arranged on one side and the other side of the screen.

TVモニタ80は、左側視点のカラー画像データと右側視点のカラー画像データを含んでフォーマット化された動画ファイルをデコードして、3D画像を表示部40に表示する。この場合、TVモニタ80は、規格化された動画ファイルを表示する一般的な表示装置としての機能を担う。しかしながら、TVモニタ80は、図1を用いて説明した制御部201の機能の少なくとも一部、および画像処理部205の少なくとも一部の機能を担う画像処理装置として機能させることもできる。具体的には、図1で説明した評価マップ生成部231、調整パラメータ値決定部232、視差画像データ生成部233及び動画生成部234を包含する画像処理部をTVモニタ80に組み込む。このように構成することにより、上述の実施形態におけるデジタルカメラ10とTVモニタ80の組み合わせによる機能分担とは異なる機能分担を実現することができる。以下にその変形例を説明する。   The TV monitor 80 decodes the moving image file that is formatted including the color image data of the left viewpoint and the color image data of the right viewpoint, and displays a 3D image on the display unit 40. In this case, the TV monitor 80 serves as a general display device that displays a standardized moving image file. However, the TV monitor 80 can also function as an image processing apparatus that bears at least part of the function of the control unit 201 and at least part of the function of the image processing unit 205 described with reference to FIG. Specifically, an image processing unit including the evaluation map generation unit 231, the adjustment parameter value determination unit 232, the parallax image data generation unit 233, and the moving image generation unit 234 described in FIG. 1 is incorporated in the TV monitor 80. With this configuration, it is possible to realize function sharing different from the function sharing by the combination of the digital camera 10 and the TV monitor 80 in the above-described embodiment. The modification is demonstrated below.

変形例においては、視差量を立体調整パラメータによって調整した調整画像データの生成処理を、デジタルカメラ10側ではなく、TVモニタ80側に担わせる。したがって、デジタルカメラ10は、図1の構成に対して評価マップ生成部231と調整パラメータ値決定部232と視差画像データ生成部233とを備えなくて良い。   In the modified example, the adjustment image data generation process in which the parallax amount is adjusted by the stereoscopic adjustment parameter is performed not on the digital camera 10 side but on the TV monitor 80 side. Therefore, the digital camera 10 does not have to include the evaluation map generation unit 231, the adjustment parameter value determination unit 232, and the parallax image data generation unit 233 with respect to the configuration of FIG. 1.

具体的に変形例におけるデジタルカメラ10の処理動作について説明する。図17は、変形例としてのデジタルカメラ10の動画撮影における処理フローである。図13の処理フローの各処理と関連する処理については同一のステップ番号を付すことにより、異なる処理および追加的な処理の説明を除いて、その説明を省略する。   The processing operation of the digital camera 10 in the modification will be specifically described. FIG. 17 is a processing flow in moving image shooting of the digital camera 10 as a modification. The processes related to the respective processes in the process flow of FIG. 13 are denoted by the same step numbers, and the description thereof is omitted except for the description of different processes and additional processes.

ステップS20では、連続的に生成された撮影画像データを繋ぎ合わせて動画ファイル化を実行する。なお、動画ファイルは、連続するフレームの撮影画像データとして基準画像データと左右視点の視差画像データを包含すれば、図3を用いて説明したいずれの段階のデータであっても良い。すなわち、分離処理、補間処理、プレーンデータ処理は、デジタルカメラ10の処理としてステップS14で行っても良いし、一部または全部を画像処理装置としてのTVモニタ80で行っても良い。そして、制御部201は、生成された動画ファイルをメモリカード220へ出力して、一連のフローを終了する。   In step S20, continuously generated photographic image data are connected to create a moving image file. Note that the moving image file may be data at any stage described with reference to FIG. 3 as long as it includes reference image data and left-right viewpoint parallax image data as captured image data of successive frames. That is, separation processing, interpolation processing, and plane data processing may be performed in step S14 as processing of the digital camera 10, or part or all may be performed in the TV monitor 80 as an image processing apparatus. And the control part 201 outputs the produced | generated moving image file to the memory card 220, and complete | finishes a series of flows.

次に、変形例におけるTVモニタ80の処理動作について説明する。図18は、変形例としてのTVモニタ80の動画再生における処理フローである。図13の処理フローの各処理と関連する処理については同一のステップ番号を付すことにより、異なる処理および追加的な処理の説明を除いて、その説明を省略する。ただし、TVモニタ80は、評価マップ生成部231、調整パラメータ値決定部232、視差画像データ生成部233及び動画生成部234を包含する画像処理部を備える。画像処理部は、図1を用いて説明した画像処理部205に対応する。   Next, the processing operation of the TV monitor 80 in the modification will be described. FIG. 18 is a processing flow in the moving image reproduction of the TV monitor 80 as a modified example. The processes related to the respective processes in the process flow of FIG. 13 are denoted by the same step numbers, and the description thereof is omitted except for the description of different processes and additional processes. However, the TV monitor 80 includes an image processing unit including an evaluation map generation unit 231, an adjustment parameter value determination unit 232, a parallax image data generation unit 233, and a moving image generation unit 234. The image processing unit corresponds to the image processing unit 205 described with reference to FIG.

制御部は、3D画像の再生指示を検出すると、上述の図14に示したステップS17で、視差量調整された左側視点および右側視点のカラー画像データを生成する。但し、この処理において制御部は、メモリカードIF81内の動画ファイルをデコードすることで、撮影画像データを取得する。   When the control unit detects an instruction to reproduce a 3D image, the control unit generates color image data of the left viewpoint and the right viewpoint adjusted in parallax in step S17 illustrated in FIG. However, in this process, the control unit acquires captured image data by decoding a moving image file in the memory card IF81.

ステップS33へ進み、制御部は、視差量調整された左側視点および右側視点のカラー画像データによる3D画像を表示部40に表示する。そして、制御部は、ステップS34で、鑑賞者から再生停止の指示があったか、あるいは、再生すべき画像データが終了したかを判断し、いずれにも該当しない場合には、ステップS31へ戻って、次のフレームの再生処理を開始する。一方、いずれかに該当する場合には、一連の再生処理を終了する。   Proceeding to step S <b> 33, the control unit displays a 3D image based on color image data of the left viewpoint and the right viewpoint adjusted in parallax amount on the display unit 40. Then, in step S34, the control unit determines whether there is an instruction to stop playback from the viewer or whether the image data to be played back has ended. If none of the data is applicable, the control unit returns to step S31, The playback process for the next frame is started. On the other hand, in the case of any of the above, a series of reproduction processing is ended.

なお、上記の変形例においては、鑑賞者がTVモニタ80での再生時にリモコン82を操作して、視差量範囲を入力できるように構成しても良い。TVモニタ80の調整パラメータ値決定部232は、入力された視差量範囲を取得し、この視差量範囲に従って立体調整パラメータCの値を決定する。このように構成すれば、TVモニタ80は、鑑賞者ごとの好みに応じた3D画像を表示することができる。   In the above modification, it may be configured such that the viewer can input the parallax amount range by operating the remote controller 82 during reproduction on the TV monitor 80. The adjustment parameter value determination unit 232 of the TV monitor 80 acquires the input parallax amount range, and determines the value of the stereoscopic adjustment parameter C according to the parallax amount range. If comprised in this way, the TV monitor 80 can display the 3D image according to the preference for every viewer.

また、以上の本実施形態では、動画撮影を前提として説明したが、視差量を調整した視差画像データを出力する構成は、もちろん静止画撮影についても適用できる。このように撮影された静止画像は、左右の画像間に極端な視差を生じさせず、鑑賞者に違和感を与えない。   In the above embodiment, the description has been made on the premise of moving image shooting. However, the configuration for outputting the parallax image data in which the parallax amount is adjusted can be applied to still image shooting as well. The still image shot in this way does not cause extreme parallax between the left and right images, and does not give the viewer a sense of incongruity.

また、以上の実施形態では、TVモニタ80を画像処理装置の一例として説明したが、画像処理装置はさまざまな形態を採り得る。例えば、PC、携帯電話、ゲーム機器など、表示部を備える、あるいは表示部に接続される機器は画像処理装置になり得る。   In the above embodiment, the TV monitor 80 has been described as an example of an image processing apparatus. However, the image processing apparatus can take various forms. For example, a device such as a PC, a mobile phone, or a game device that includes or is connected to the display unit can be an image processing apparatus.

また、以上の実施形態では、撮像素子100は視差なし画素と視差画素とを有することとして説明した。しかしながら、撮像素子100は視差画素のみを有することとしても良い。この場合には、例えば上記の式(1)においてRnプレーンデータの画素値の代わりに、RLtプレーンデータの画素値と、RRtプレーンデータの画素値との加算平均を用いる。   In the above embodiments, the image sensor 100 has been described as having a parallax-free pixel and a parallax pixel. However, the image sensor 100 may have only parallax pixels. In this case, for example, instead of the pixel value of the Rn plane data in the above equation (1), an average of the pixel value of the RLt plane data and the pixel value of the RRt plane data is used.

また、以上の実施形態では、評価マップ及び視差画像データ(Lt視差プレーンデータ及びRt視差プレーンデータ)を生成するために同一の撮影画像データを用いることとして説明した。しかしながら、同一シーンについての画像データを用いる限りにおいて、撮影画像ではない同一の画像データ(CG画像など)を用いても良いし、互いに異なる画像データを用いても良い。 In the above embodiment it has been described as using the same captured image data to generate an evaluation map and the disparity image data (Lt c disparity plane data and Rt c disparity plane data). However, as long as image data for the same scene is used, the same image data (CG image or the like) that is not a captured image may be used, or different image data may be used.

異なる画像データを用いる具体例としては、動画撮影において連続して撮影される前後フレームの撮影画像データを視差画像データ及び評価マップの生成に用いる場合が挙げられる。また、デジタルカメラによる撮影画像データを視差画像データの生成に用い、この撮影画像データに連動して取得される、撮影画像データよりも画素数の少ない予備画像データを評価マップの生成に用いる場合も挙げられる。   As a specific example using different image data, there is a case where captured image data of frames before and after continuously captured in moving image capturing is used for generating parallax image data and an evaluation map. In some cases, image data captured by a digital camera is used to generate parallax image data, and preliminary image data having a smaller number of pixels than the captured image data acquired in conjunction with the captured image data is used to generate an evaluation map. Can be mentioned.

このような予備画像データとしては、デジタルカメラによる撮影画像データの取得時に表示部209に表示されるライブビュー画像の画像データを用いることができる。画素数の異なる画像データを用いる場合であっても、画素間の対応関係を参酌すれば、一方の画像データから生成される評価マップの画素ごとのデータに基づいて、他方の画像データの対応画素にそれぞれ立体調整パラメータCの値を決定し、視差画像データを生成することができる。   As such preliminary image data, image data of a live view image displayed on the display unit 209 when the captured image data is acquired by the digital camera can be used. Even when image data having a different number of pixels is used, if the correspondence between the pixels is taken into consideration, the corresponding pixel of the other image data is based on the data for each pixel of the evaluation map generated from the one image data. The value of the stereoscopic adjustment parameter C can be determined respectively to generate parallax image data.

また、以上の実施形態では、評価マップに配列される評価値として、被写体の表示画素の評価値を用いることとして説明したが、被写体の表示領域の評価値を用いても良い。この場合には、調整パラメータ値決定部232は被写体の表示領域ごとに立体調整パラメータCの値を決定することになる。   In the above embodiment, the evaluation value of the display pixel of the subject is used as the evaluation value arranged in the evaluation map. However, the evaluation value of the display area of the subject may be used. In this case, the adjustment parameter value determination unit 232 determines the value of the three-dimensional adjustment parameter C for each display area of the subject.

また、以上の実施形態では、予備評価マップにおける被写体の表示画素ごとに、その予備評価値同士の相乗平均をとることで予備評価マップ同士を合成することとして説明した。しかしながら、被写体の表示画素ごとに予備評価値同士を単純に乗算することで予備評価マップ同士を合成しても良い。   In the above embodiment, the preliminary evaluation maps are synthesized by taking the geometric mean of the preliminary evaluation values for each display pixel of the subject in the preliminary evaluation map. However, the preliminary evaluation maps may be synthesized by simply multiplying the preliminary evaluation values for each display pixel of the subject.

また、被写体の表示画素ごとに予備評価値同士を単純に加算するか、或いは相加平均をとることで予備評価マップ同士を合成しても良い。また、被写体の表示画素ごとにLtプレーンデータ及びRtプレーンデータの間で共通する予備評価値のみを残すようにAND演算を行うことで、予備評価マップ同士を合成しても良い。   Further, the preliminary evaluation maps may be synthesized by simply adding the preliminary evaluation values for each display pixel of the subject or by taking an arithmetic mean. Alternatively, the preliminary evaluation maps may be synthesized by performing an AND operation so that only the preliminary evaluation value common between the Lt plane data and the Rt plane data is left for each display pixel of the subject.

また、以上の実施形態では、Ltプレーンデータの予備評価マップ(好ましくは顕著性マップ)と、Rtプレーンデータの予備評価マップとを合成することで評価マップを生成することとして説明した。しかしながら、2D画像データの画像についての顕著性マップを評価マップとして生成しても良い。また、Ltプレーンデータの予備評価マップ(好ましくは顕著性マップ)と、Rtプレーンデータの予備評価マップと、2D画像データの予備評価マップとを合成することで評価マップを生成しても良い。3つの予備評価マップを合成する場合には、予備評価マップの種類ごとに重み付けして合成しても良い。   In the above embodiment, the preliminary evaluation map (preferably the saliency map) of the Lt plane data and the preliminary evaluation map of the Rt plane data are synthesized to generate the evaluation map. However, a saliency map for an image of 2D image data may be generated as an evaluation map. Alternatively, the evaluation map may be generated by combining the preliminary evaluation map of Lt plane data (preferably the saliency map), the preliminary evaluation map of Rt plane data, and the preliminary evaluation map of 2D image data. When combining three preliminary evaluation maps, weighting may be performed for each type of preliminary evaluation map.

また、以上の実施形態では、調整パラメータ値決定部232はパラメータ値算出関数を記憶し、このパラメータ値算出関数を用いて立体調整パラメータCの値を決定することとして説明した。しかしながら、調整パラメータ値決定部232は、評価マップにおける画素ごとの評価値が取り得る値と、立体調整パラメータCの値とを対応付けたルックアップテーブルを記憶し、このルックアップテーブルを用いて立体調整パラメータCの値を決定しても良い。   In the above embodiment, the adjustment parameter value determination unit 232 stores the parameter value calculation function, and the parameter value calculation function is used to determine the value of the three-dimensional adjustment parameter C. However, the adjustment parameter value determination unit 232 stores a look-up table in which values that can be taken by the evaluation values for each pixel in the evaluation map and the value of the solid adjustment parameter C are associated with each other, and the three-dimensional adjustment is performed using this lookup table. The value of the adjustment parameter C may be determined.

以上の本実施形態において説明した各処理フローは、制御部を制御する制御プログラムによって実行される。制御プログラムは、内蔵する不揮発性メモリに記録されており、適宜ワークメモリに展開されて各処理を実行する。あるいは、サーバに記録された制御プログラムが、ネットワークを介して各装置に送信され、ワークメモリに展開されて各処理を実行する。または、サーバに記録された制御プログラムがサーバ上で実行され、各装置は、ネットワークを介して送信されてくる制御信号に即して処理を実行する。   Each processing flow described in this embodiment is executed by a control program that controls the control unit. The control program is recorded in a built-in nonvolatile memory, and is appropriately expanded in the work memory to execute each process. Alternatively, the control program recorded in the server is transmitted to each device via the network, and is expanded in the work memory to execute each process. Alternatively, a control program recorded on the server is executed on the server, and each device executes processing in accordance with a control signal transmitted via the network.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   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 光軸、22 絞り、50 眼球、51 右目、52 左目、40 表示部、61、62、71、72 被写体、80 TVモニタ、81 メモリカードIF、82 リモコン、100 撮像素子、104、105、106 開口部、110 基本格子、201 制御部、202 A/D変換回路、203 メモリ、204 駆動部、205 画像処理部、207 メモリカードIF、208 操作部、209 表示部、210 LCD駆動回路、231 評価マップ生成部、232 調整パラメータ値決定部、233 視差画像データ生成部、234 動画生成部、322 中心線、1804、1805、1807、1808 分布曲線、1806、1809 合成分布曲線、1901 Lt分布曲線、1902 Rt分布曲線、1903 2D分布曲線、1905 調整Lt分布曲線、1906 調整Rt分布曲線、2081 ダイヤルボタン、2082 モードボタン DESCRIPTION OF SYMBOLS 10 Digital camera, 20 Shooting lens, 21 Optical axis, 22 Aperture, 50 Eyeball, 51 Right eye, 52 Left eye, 40 Display part, 61, 62, 71, 72 Subject, 80 TV monitor, 81 Memory card IF, 82 Remote control, 100 Image sensor, 104, 105, 106 aperture, 110 basic grid, 201 control unit, 202 A / D conversion circuit, 203 memory, 204 drive unit, 205 image processing unit, 207 memory card IF, 208 operation unit, 209 display unit , 210 LCD drive circuit, 231 evaluation map generation unit, 232 adjustment parameter value determination unit, 233 parallax image data generation unit, 234 moving image generation unit, 322 center line, 1804, 1805, 1807, 1808 distribution curve, 1806, 1809 composite distribution Curve, 1901 Lt distribution curve, 1902 t distribution curve, 1903 2D distribution curve, 1905 adjustment Lt distribution curve, 1906 adjustment Rt distribution curve, 2081 dial button, 2082 mode button

Claims (10)

画像データを取得する取得部と、
前記画像データの画像に含まれる被写体の領域の評価値を前記被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成部と、
前記画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、前記評価マップの前記評価値に対応させて決定する決定部と、
前記画像データに前記調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成部と
を備え
前記画像データは、互いに視差を有する第1視差画像データと第2視差画像データを包含し、
前記画像データは、前記第1視差画像データおよび前記第2視差画像データとは異なる基準画像データを更に包含し、
前記評価マップ生成部は、前記基準画像データから前記評価マップを生成する画像処理装置。
An acquisition unit for acquiring image data;
An evaluation map generating unit that generates an evaluation map in which the evaluation value of the subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area;
A determination unit configured to determine an adjustment parameter value for adjusting a parallax amount, which is applied when generating parallax image data from the image data, in correspondence with the evaluation value of the evaluation map;
A generation unit that applies the adjustment parameter value to the image data and generates parallax image data that becomes images having parallax amounts adjusted to each other ;
The image data includes first parallax image data and second parallax image data having parallax with each other,
The image data further includes reference image data different from the first parallax image data and the second parallax image data,
The evaluation map generation unit is an image processing device that generates the evaluation map from the reference image data .
画像データを取得する取得部と、An acquisition unit for acquiring image data;
前記画像データの画像に含まれる被写体の領域の評価値を前記被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成部と、An evaluation map generating unit that generates an evaluation map in which the evaluation value of the subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area;
前記画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、前記評価マップの前記評価値に対応させて決定する決定部と、A determination unit configured to determine an adjustment parameter value for adjusting a parallax amount, which is applied when generating parallax image data from the image data, in correspondence with the evaluation value of the evaluation map;
前記画像データに前記調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成部とA generation unit configured to apply the adjustment parameter value to the image data and generate parallax image data to be images having parallax amounts adjusted to each other;
を備え、With
前記画像データは、互いに視差を有する第1視差画像データと第2視差画像データを包含し、The image data includes first parallax image data and second parallax image data having parallax with each other,
前記評価マップ生成部は、前記第1視差画像データおよび前記第2視差画像データからそれぞれ予備評価マップを生成し、前記予備評価マップを合成して前記評価マップを生成する画像処理装置。The evaluation map generation unit generates a preliminary evaluation map from each of the first parallax image data and the second parallax image data, and synthesizes the preliminary evaluation map to generate the evaluation map.
記生成部は、前記第1視差画像データと前記第2視差画像データに前記調整パラメータ値を適用して、互いに前記第1視差画像データと前記第2視差画像データのそれぞれの画像間における視差量とは異なる視差量を有する画像となるように第3視差画像データと第4視差画像データを生成する請求項1又は2に記載の画像処理装置。 Before Symbol generation section, wherein the first parallax image data by applying the adjustment parameter value in the second parallax image data, the disparity between the respective images of the second parallax image data and the first parallax image data with each other the amount image processing apparatus according to claim 1 or 2 to generate a third parallax image data and the fourth parallax image data so that images with different parallax amount from. 前記評価マップ生成部は、前記被写体の領域と周辺領域との差異を鑑賞者が注視する確度と関連づけて数値化した値を前記評価値とする請求項1からのいずれか1項に記載の画像処理装置。 The evaluation map generation unit according to any one of the three values a difference a viewer is quantified in association with accuracy to look between the subject region and the peripheral region of claim 1, wherein the evaluation value Image processing device. 前記決定部は、前記評価値が小さい場合の前記評価値の単位増分に対する前記調整パラメータ値の増分を、前記評価値が大きい場合の前記評価値の単位増分に対する前記調整パラメータ値の増分よりも大きくする請求項に記載の画像処理装置。 The determination unit is configured to increase an increment of the adjustment parameter value with respect to a unit increment of the evaluation value when the evaluation value is small larger than an increment of the adjustment parameter value with respect to a unit increment of the evaluation value when the evaluation value is large. The image processing apparatus according to claim 4 . 画像データを取得する取得部と、An acquisition unit for acquiring image data;
前記画像データの画像に含まれる被写体の領域の評価値を前記被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成部と、An evaluation map generating unit that generates an evaluation map in which the evaluation value of the subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area;
前記画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、前記評価マップの前記評価値に対応させて決定する決定部と、A determination unit configured to determine an adjustment parameter value for adjusting a parallax amount, which is applied when generating parallax image data from the image data, in correspondence with the evaluation value of the evaluation map;
前記画像データに前記調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成部とA generation unit configured to apply the adjustment parameter value to the image data and generate parallax image data to be images having parallax amounts adjusted to each other;
を備え、With
前記評価マップ生成部は、前記被写体の領域と周辺領域との差異を鑑賞者が注視する確度と関連づけて数値化した値を前記評価値とし、The evaluation map generation unit sets the evaluation value to a value obtained by associating the difference between the area of the subject and the surrounding area with the probability that the viewer gazes,
前記決定部は、前記評価値が小さい場合の前記評価値の単位増分に対する前記調整パラメータ値の増分を、前記評価値が大きい場合の前記評価値の単位増分に対する前記調整パラメータ値の増分よりも大きくする画像処理装置。The determination unit is configured to increase an increment of the adjustment parameter value with respect to a unit increment of the evaluation value when the evaluation value is small larger than an increment of the adjustment parameter value with respect to a unit increment of the evaluation value when the evaluation value is large. An image processing apparatus.
前記評価マップ生成部は、前記画像データに連動して前記取得部により取得された、前記画像データよりも画素数が少ない予備画像データから前記評価マップを生成する請求項に記載の画像処理装置。 The image processing apparatus according to claim 6 , wherein the evaluation map generation unit generates the evaluation map from preliminary image data having a smaller number of pixels than the image data acquired by the acquisition unit in conjunction with the image data. . 前記決定部は、前記画像データの画素ごとに前記調整パラメータ値を決定する請求項1から7のいずれか1項に記載の画像処理装置。 The determination section, the image processing apparatus according to any one of claims 1 to 7 for determining the adjustment parameter values for each pixel of the image data. 撮像素子と、
前記取得部が前記撮像素子の出力信号を処理して前記画像データを取得する請求項1からのいずれか1項に記載の画像処理装置と
を備える撮像装置。
An image sensor;
An imaging apparatus and an image processing apparatus according to any one of claims 1 to 8, wherein the acquisition unit acquires the image data by processing the output signal of the imaging element.
画像データを取得する取得ステップと、
前記画像データの画像に含まれる被写体の領域の評価値を前記被写体の領域の位置に対応させて二次元的に配列した評価マップを生成する評価マップ生成ステップと、
前記画像データから視差画像データを生成するときに適用される、視差量を調整する調整パラメータ値を、前記評価マップの前記評価値に対応させて決定する決定ステップと、
前記画像データに前記調整パラメータ値を適用して、互いに調整された視差量を有する画像となる視差画像データを生成する生成ステップと
をコンピュータに実行させる画像処理プログラムであって、
前記画像データは、互いに視差を有する第1視差画像データと第2視差画像データを包含し、
前記画像データは、前記第1視差画像データおよび前記第2視差画像データとは異なる基準画像データを更に包含し、
前記評価マップ生成ステップは、前記基準画像データから前記評価マップを生成する画像処理プログラム。
An acquisition step of acquiring image data;
An evaluation map generating step for generating an evaluation map in which the evaluation value of the subject area included in the image of the image data is two-dimensionally arranged in correspondence with the position of the subject area;
A determination step for determining an adjustment parameter value for adjusting a parallax amount, which is applied when generating parallax image data from the image data, in association with the evaluation value of the evaluation map;
An image processing program for causing a computer to execute a generation step of generating parallax image data to be images having parallax amounts adjusted to each other by applying the adjustment parameter value to the image data ,
The image data includes first parallax image data and second parallax image data having parallax with each other,
The image data further includes reference image data different from the first parallax image data and the second parallax image data,
The evaluation map generating step is an image processing program for generating the evaluation map from the reference image data.
JP2014122366A 2014-06-13 2014-06-13 Image processing apparatus, imaging apparatus, and image processing program Active JP6439285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014122366A JP6439285B2 (en) 2014-06-13 2014-06-13 Image processing apparatus, imaging apparatus, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014122366A JP6439285B2 (en) 2014-06-13 2014-06-13 Image processing apparatus, imaging apparatus, and image processing program

Publications (3)

Publication Number Publication Date
JP2016005018A JP2016005018A (en) 2016-01-12
JP2016005018A5 JP2016005018A5 (en) 2017-09-21
JP6439285B2 true JP6439285B2 (en) 2018-12-19

Family

ID=55224045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014122366A Active JP6439285B2 (en) 2014-06-13 2014-06-13 Image processing apparatus, imaging apparatus, and image processing program

Country Status (1)

Country Link
JP (1) JP6439285B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639973A (en) * 2018-12-21 2019-04-16 中国科学院自动化研究所南京人工智能芯片创新研究院 Shoot image methods of marking, scoring apparatus, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5444955B2 (en) * 2009-08-31 2014-03-19 ソニー株式会社 Stereoscopic image display system, parallax conversion device, parallax conversion method, and program
JP2012257022A (en) * 2011-06-08 2012-12-27 Sony Corp Image processing apparatus, method, and program
JP5978736B2 (en) * 2012-04-25 2016-08-24 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program
JP2015154101A (en) * 2014-02-10 2015-08-24 ソニー株式会社 Image processing method, image processor and electronic apparatus

Also Published As

Publication number Publication date
JP2016005018A (en) 2016-01-12

Similar Documents

Publication Publication Date Title
US9341935B2 (en) Image capturing device
JP5982751B2 (en) Image processing apparatus, image processing method, and program
US8885026B2 (en) Imaging device and imaging method
EP2760209B1 (en) Image processing device, method, program and recording medium, stereoscopic image capture device, portable electronic apparatus, printer, and stereoscopic image player device
US8130259B2 (en) Three-dimensional display device and method as well as program
CN103098459B (en) Stereo photographic device and shadow correction method
JP5368350B2 (en) Stereo imaging device
CN102934025A (en) Imaging device and imaging method
JP6036840B2 (en) Imaging apparatus, image processing apparatus, control program for imaging apparatus, and control program for image processing apparatus
JP5467993B2 (en) Image processing apparatus, compound-eye digital camera, and program
US8648953B2 (en) Image display apparatus and method, as well as program
JPWO2012001970A1 (en) Image processing apparatus and method, and program
US20130083169A1 (en) Image capturing apparatus, image processing apparatus, image processing method and program
JP2012257105A (en) Stereoscopic image obtaining apparatus
WO2012043003A1 (en) Three-dimensional image display device, and three-dimensional image display method
JP2014036362A (en) Imaging device, control method therefor, and control program
JP6439285B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5978736B2 (en) Image processing apparatus, imaging apparatus, and image processing program
WO2015163350A1 (en) Image processing device, imaging device and image processing program
JP6070061B2 (en) Image processing apparatus, photographing apparatus, image processing method, and program
JP5978738B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6255753B2 (en) Image processing apparatus and imaging apparatus
JP2014135642A (en) Imaging apparatus and imaging apparatus control program
JP2013229762A (en) Image processing apparatus, image pickup apparatus and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170421

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180320

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180509

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181105

R150 Certificate of patent or registration of utility model

Ref document number: 6439285

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