[go: up one dir, main page]

JP6070061B2 - Image processing apparatus, photographing apparatus, image processing method, and program - Google Patents

Image processing apparatus, photographing apparatus, image processing method, and program Download PDF

Info

Publication number
JP6070061B2
JP6070061B2 JP2012236307A JP2012236307A JP6070061B2 JP 6070061 B2 JP6070061 B2 JP 6070061B2 JP 2012236307 A JP2012236307 A JP 2012236307A JP 2012236307 A JP2012236307 A JP 2012236307A JP 6070061 B2 JP6070061 B2 JP 6070061B2
Authority
JP
Japan
Prior art keywords
parallax
image
amount
moving image
change
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
JP2012236307A
Other languages
Japanese (ja)
Other versions
JP2014086984A (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 JP2012236307A priority Critical patent/JP6070061B2/en
Publication of JP2014086984A publication Critical patent/JP2014086984A/en
Application granted granted Critical
Publication of JP6070061B2 publication Critical patent/JP6070061B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像処理装置、撮影装置およびプログラムに関する。   The present invention relates to an image processing apparatus, a photographing apparatus, and a 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 playing back a stereo image in time series like a video, if the amount of parallax generated between the right-eye image and the left-eye image changes rapidly in time, the viewer can follow the change in the convergence angle. Without feeling uncomfortable.

本発明の第1の態様における画像処理装置は、同一の対象に対する視差を示す視差量を時系列的に取得し、視差量の時間的な変化量を算出する変化量算出部と、変化量算出部により取得された変化量が閾値よりも大きい場合に、少なくとも対象に対する変化量を低減した動画を生成する動画生成部とを備える。   The image processing apparatus according to the first aspect of the present invention acquires a parallax amount indicating parallax for the same target in time series, calculates a temporal variation amount of the parallax amount, and a variation amount calculation And a moving image generation unit that generates a moving image with a reduced amount of change with respect to the target when the amount of change acquired by the unit is larger than a threshold.

本発明の第2の態様における画像処理方法は、同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出手順と、前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成手順とを備える。   The image processing method according to the second aspect of the present invention includes a change amount calculation procedure for acquiring a disparity amount indicating disparity for the same target in time series, and calculating a temporal change amount of the disparity amount, and the change A moving image generation procedure for generating a moving image in which the amount of change with respect to the object is reduced at least when the amount of change acquired by the amount calculation procedure is larger than a threshold value;

本発明の第2の態様におけるプログラムは、同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出手順と、前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成手順とをコンピュータに実行させる。   The program according to the second aspect of the present invention acquires a parallax amount indicating parallax for the same target in time series, calculates a temporal variation amount of the parallax amount, and calculates the variation amount When the amount of change acquired by the procedure is larger than a threshold, the computer is caused to execute a moving image generation procedure for generating a moving image in which the amount of change with respect to the target is reduced.

なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではない。また、これらの特徴群のサブコンビネーションもまた、発明となりうる。   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.

本実施形態に係るデジタルカメラおよびPCを示す。1 shows a digital camera and a PC according to the present embodiment. 被写体の移動量、鑑賞者の輻輳角および表示装置上の視差量の関係を示す。The relationship between the amount of movement of the subject, the vergence angle of the viewer, and the amount of parallax on the display device is shown. 視差量の時間的な変化量を低減する方法を説明する図である。It is a figure explaining the method to reduce the temporal variation | change_quantity of the amount of parallax. デジタルカメラの構成を説明する図である。It is a figure explaining the structure of a digital camera. 撮像素子の一部を拡大した様子を概念的に表す概念図である。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 explanatory drawing explaining the production | generation process of a parallax map. 視差マップを参照して原色情報を移植する処理の概念を示す図である。It is a figure which shows the concept of the process which transplants primary color information with reference to a parallax map. デジタルカメラにおける絞り値、画像の鮮鋭度を示すコントラストおよび視差量の関係を模式的に示す。The relationship between the aperture value, the contrast indicating the sharpness of an image, and the amount of parallax in a digital camera is schematically shown. デジタルカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of a digital camera. デジタルカメラの他の動作を示すフローチャートである。It is a flowchart which shows the other operation | movement of a digital camera. 図6に示すRAW画像データセットから右目用のカラー画像データおよび左目用のカラー画像データを生成する他の例を示す。7 shows another example of generating color image data for the right eye and color image data for the left eye from the RAW image data set shown in FIG. 図6に示すRAW画像データセットから右目用のカラー画像データおよび左目用のカラー画像データを生成する他の例を示す。7 shows another example of generating color image data for the right eye and color image data for the left eye from the RAW image data set shown in FIG. デジタルカメラの他の動作を示すフローチャートである。It is a flowchart which shows the other operation | movement of a digital camera. デジタルカメラの他の動作を示すフローチャートである。It is a flowchart which shows the other operation | movement of a digital camera. 図17のステップS114で生成される動画の例を示す。The example of the moving image produced | generated by step S114 of FIG. 17 is shown. PCの本体の機能ブロックを示す。The functional block of the main body of PC is shown. 本体の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a main body. 図20のフローチャートにより生成される補正動画の一例を示す。An example of the correction | amendment moving image produced | generated by the flowchart of FIG. 20 is shown.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   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は、本実施形態に係るデジタルカメラ10およびパーソナルコンピュータ40(PCということがある)を示す。デジタルカメラ10は撮像装置の一例であるとともに、動画を生成する画像処理装置の一例でもある。   FIG. 1 shows a digital camera 10 and a personal computer 40 (sometimes referred to as a PC) according to this embodiment. The digital camera 10 is an example of an imaging device and an example of an image processing device that generates a moving image.

デジタルカメラ10とPC40とは、例えば接続ケーブル32を介して動画等の画像データを送受信する。PC40は、互いに接続されたディスプレイ42、本体44およびキーボード46を有する。PC40も画像処理装置の一例であって、キーボード46の入力に基づいて、本体44により生成された動画をディスプレイ42に表示する。   The digital camera 10 and the PC 40 transmit and receive image data such as moving images via the connection cable 32, for example. The PC 40 includes a display 42, a main body 44, and a keyboard 46 that are connected to each other. The PC 40 is also an example of an image processing apparatus, and displays a moving image generated by the main body 44 on the display 42 based on input from the keyboard 46.

図2は、被写体の移動量、ディスプレイを鑑賞している鑑賞者50の輻輳角およびディスプレイ42上の視差量の関係を示す。図中の三角を現実の物体とすると、鑑賞者50は、物体が位置L0にあるときに右目51と左目52との視差で生じる輻輳角θ0に基づいて、物体の前後方向の位置L0を認識する。さらに、鑑賞者50は、物体が位置L0にあるときと位置L1にあるときとで輻輳角θ0、θ1が異なることにより、物体の大きさの変化等の他の情報と合わせて、物体が前後方向に移動していることを認識する。   FIG. 2 shows the relationship between the amount of movement of the subject, the convergence angle of the viewer 50 who is viewing the display, and the amount of parallax on the display 42. If the triangle in the figure is a real object, the viewer 50 recognizes the position L0 in the front-rear direction of the object based on the convergence angle θ0 generated by the parallax between the right eye 51 and the left eye 52 when the object is at the position L0. To do. Furthermore, the viewer 50 determines that when the object is at the position L0 and at the position L1, the convergence angles θ0 and θ1 are different, so that the object moves forward and backward along with other information such as a change in the size of the object. Recognize that it is moving in the direction.

また、鑑賞者50の輻輳角θ0に対応して、右目51に向けた右目用画像55と、左目52に向けた左目用画像56とがディスプレイ42上に表示されることにより、鑑賞者50は擬似的に物体の前後方向の立体感を得ることができる。ここで、右目用画像55および左目用画像56のディスプレイ42上の位置の差が、視差量D0の一例である。当該視差量D0は、上記位置の差を画素数で数えて、ディスプレイ42の水平方向の全画素数で割り算することにより正規化されてもよい。   Further, the viewer 50 displays the right-eye image 55 directed toward the right eye 51 and the left-eye image 56 directed toward the left eye 52 on the display 42 in accordance with the convergence angle θ0 of the viewer 50. A stereoscopic effect in the front-rear direction of the object can be obtained in a pseudo manner. Here, the difference in position on the display 42 between the right-eye image 55 and the left-eye image 56 is an example of the parallax amount D0. The parallax amount D0 may be normalized by counting the difference in position by the number of pixels and dividing by the total number of pixels in the horizontal direction of the display 42.

さらに、輻輳角θ0に対応した視差量D0を有する右目用画像55および左目用画像56と、輻輳角θ1に対応した視差量D1の右目用画像57および左目用画像58とが時系列的に動画として表示されることにより、鑑賞者50は擬似的に物体が前後方向に移動した立体感を得ることができる。ここで、視差量D0と視差量D1とが急激に変化すると、鑑賞者50が輻輳角の変化に追従できずに違和感が生じる(輻輳と調整の矛盾、といわれることがある)。そこで、本実施形態においては、デジタルカメラ10またはPC40において、視差の時間変化を低減した動画を生成する。   Further, a right-eye image 55 and a left-eye image 56 having a parallax amount D0 corresponding to the convergence angle θ0, and a right-eye image 57 and a left-eye image 58 having a parallax amount D1 corresponding to the convergence angle θ1 are animated in time series. As a result, the viewer 50 can obtain a stereoscopic effect in which the object is moved in the front-rear direction. Here, when the parallax amount D0 and the parallax amount D1 change suddenly, the viewer 50 cannot follow the change of the convergence angle, and a sense of incongruity occurs (this is sometimes called a contradiction between convergence and adjustment). Therefore, in the present embodiment, the digital camera 10 or the PC 40 generates a moving image with reduced parallax time change.

なお、ディスプレイ42上に右目用画像55と左目用画像56とを表示する方法はいずれであってもよい。例えば、時分割で表示されてもよいし、水平方向または垂直方向に短冊状にそれぞれが並んだインターレースであってもよいし、画面の一方側と他方側に並ぶサイドバイサイドであってもよい。   Any method may be used for displaying the right-eye image 55 and the left-eye image 56 on the display 42. For example, it may be displayed in a time-division manner, an interlace in which strips are arranged horizontally or vertically, or a side-by-side arrangement on one side and the other side of the screen.

図3は、視差量の時間的な変化量を低減する方法を説明する図である。図3は、動画C1が時刻T0の視差量D0から時刻T1の視差量D1へ変化する例を示す。   FIG. 3 is a diagram illustrating a method for reducing the temporal change amount of the parallax amount. FIG. 3 shows an example in which the moving image C1 changes from the parallax amount D0 at time T0 to the parallax amount D1 at time T1.

動画C1の視差の時間的な変化量を低減する場合に、少なくとも二つの方法が考えられる。一つ目は、時刻T1において視差量D1よりも小さい視差量D2を用いて動画C2を生成することである。二つ目は、同じ視差量D1に到達するのを時刻T1よりも遅い時刻T2にして動画C3を生成することである。上記二つの方法は、動画の撮影時に実行されてもよいし、動画の撮像後に表示装置への表示時に実行されてもよい。それぞれの具体例については後述する。   In order to reduce the temporal change amount of the parallax of the moving image C1, at least two methods are conceivable. The first is to generate the moving image C2 using the parallax amount D2 smaller than the parallax amount D1 at time T1. The second is to generate the moving image C3 at a time T2 that is later than the time T1 to reach the same parallax amount D1. The above two methods may be executed at the time of shooting a moving image, or may be executed at the time of display on a display device after shooting of a moving image. Each specific example will be described later.

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

図4は、デジタルカメラ10の構成を説明する図である。デジタルカメラ10は、被写体光を特定のフレームレートで時系列的に順次撮影した、複数の視差画像を生成し、当該複数の視差画像のそれぞれに基づいたフレームを時系列的に並べることにより、視差情報を含む動画を生成する。   FIG. 4 is a diagram illustrating the configuration of the digital camera 10. The digital camera 10 generates a plurality of parallax images in which subject light is sequentially captured at a specific frame rate in time series, and arranges frames based on each of the plurality of parallax images in time series to thereby generate parallax. Generate a video containing information.

デジタルカメラ10は、撮影光学系としての撮影レンズ20を備え、光軸21に沿って入射する被写体光束を撮像素子100へ導く。デジタルカメラ10は、被写体光束の周辺を遮光する絞り22をさらに備える。撮影レンズ20は絞り22と共に、デジタルカメラ10に対して着脱できる交換式レンズであっても構わない。デジタルカメラ10は、撮像素子100、制御部201、A/D変換回路202、メモリ203、駆動部204、画像処理部205、メモリカードIF207、操作部208、表示部209、LCD駆動回路210およびAFセンサ211を備える。   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 digital camera 10 further includes an aperture 22 that shields the periphery of the subject light flux. The taking lens 20 may be an interchangeable lens that can be attached to and detached from the digital camera 10 together with the aperture 22. The digital camera 10 includes an image sensor 100, a control unit 201, an A / D conversion circuit 202, a memory 203, a drive unit 204, an image processing unit 205, a memory card IF 207, an operation unit 208, a display unit 209, an LCD drive circuit 210, and an AF. A sensor 211 is provided.

なお、図示するように、撮像素子100へ向かう光軸21に平行な方向をZ軸プラス方向と定め、Z軸と直交する平面において紙面手前へ向かう方向をX軸プラス方向、紙面上方向をY軸プラス方向と定める。撮影における構図との関係はX軸が水平方向、Y軸が垂直方向となる。以降のいくつかの図においては、図4の座標軸を基準として、それぞれの図の向きがわかるように座標軸を表示する。   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 relation to the composition in photographing, the X axis is the horizontal direction and the Y axis is the vertical 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 in FIG.

撮影レンズ20は、複数の光学レンズ群から構成され、シーンからの被写体光束をその焦点面近傍に結像させる。なお、図4では撮影レンズ20を説明の都合上、瞳近傍に配置された仮想的な1枚のレンズで代表して表している。   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. 4, for convenience of explanation, the photographic lens 20 is represented by a single virtual lens arranged in the vicinity of the pupil.

絞り22は、撮影レンズ20の瞳近傍に配され、撮像素子100へ入射する被写体光束の周辺領域を遮光する。絞り22の絞り量は可変であって、制御部201からの制御により設定される。当該絞り22の一例は虹彩絞りであるが、これに限られない。   The aperture 22 is disposed in the vicinity of the pupil of the photographic lens 20 and shields the peripheral region of the subject light flux incident on the image sensor 100. The aperture amount of the aperture 22 is variable and is set by control from the control unit 201. An example of the diaphragm 22 is an iris diaphragm, but is not limited thereto.

撮像素子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をワークスペースとして種々の画像処理を施し、画像データを生成する。   The A / D conversion circuit 202 converts the image signal output from the image sensor 100 into a digital image signal and outputs the digital image signal to the memory 203. The image processing unit 205 performs various image processing using the memory 203 as a work space, and generates image data.

制御部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. Furthermore, a timing control signal is transmitted to the drive unit 204, and a series of sequences until the image signal output from the image sensor 100 is processed into captured image data by the image processing unit 205 is managed.

画像処理部205は、同一の対象に対する視差画像データを時系列的に取得して視差量を算出する視差量算出部231、視差量の時間的な変化量を算出する変化量算出部232、および、当該変化量が閾値よりも大きい場合に、少なくとも上記対象に対する変化量を低減した動画を生成する動画生成部233を有する。それぞれの処理の詳細については、後述する。   The image processing unit 205 acquires parallax image data for the same target in time series to calculate a parallax amount, a change amount calculation unit 232 that calculates a temporal change amount of the parallax amount, and When the change amount is larger than the threshold, the moving image generation unit 233 generates a moving image in which the change amount with respect to the target is reduced. Details of each processing will be described later.

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

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

図5は、撮像素子100の一部を拡大した様子を概念的に表す概念図である。画素領域には2000万個以上もの画素がマトリックス状に配列されている。本実施形態においては、隣接する8画素×8画素の64画素が一つの基本格子110を形成する。基本格子110は、2×2の4画素を基本単位とするベイヤー配列を、Y軸方向に4つ、X軸方向に4つ含む。なお、図示するように、ベイヤー配列においては、左上画素と右下画素に緑フィルタ(Gフィルタ)、左下画素に青フィルタ(Bフィルタ)、右上画素に赤フィルタ(Rフィルタ)が配される。   FIG. 5 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を透過する入射光束のうち、光軸から偏位した部分光束を受光する画素である。視差画素には、当該部分光束のみを透過させるように、画素中心から偏位した偏位開口を有する開口マスクが設けられている。開口マスクは、例えば、カラーフィルタに重ねて設けられる。本実施形態においては、開口マスクにより、部分光束が画素中心に対して左側に到達するように規定された視差Lt画素と、部分光束が画素中心に対して右側に到達するように規定された視差Rt画素の2種類が存在する。一方、視差なし画素は、開口マスクが設けられていない画素であり、撮影レンズ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. 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画像データと視差画像データを含むRAW画像データセットを生成する処理の概念を説明する。図6は、2D画像データと視差画像データの生成処理の例を説明する図である。   Next, a concept of processing for generating a RAW image data set including 2D image data and parallax image data from captured image data output from the image sensor 100 will be described. FIG. 6 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は、まず視差画素の画素値を除去して、空格子とする。そして、空格子となった画素値を、周辺画素の画素値を用いて補間処理により算出する。例えば、空格子P11の画素値は、斜め方向に隣接するGフィルタ画素の画素値である、P−1−1、P2−1、P−12、P22の画素値を平均化演算して算出する。また、例えば空格子P63の画素値は、上下左右に1画素飛ばして隣接するRフィルタの画素値である、P43、P61、P83、P65の画素値を平均化演算して算出する。同様に、例えば空格子P76の画素値は、上下左右に1画素飛ばして隣接するBフィルタの画素値である、P56、P74、P96、P78の画素値を平均化演算して算出する。 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. 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 acquisition 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は、これらのプレーンデータを用いて、左側視点のカラー画像データおよび右側視点のカラー画像データを生成する。上記プレーンデータを時系列的に並べて動画としてもよいし、後述する視差マップを用いて原色情報を移植した各色の画像を時系列に並べて動画としてもよい。   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. The plane data may be arranged in time series to form a moving image, or images of each color in which primary color information is transplanted using a parallax map described later may be arranged in time series to form a moving image.

図7は、デフォーカスの概念を説明する図である。視差Lt画素および視差Rt画素は、レンズ瞳の部分領域としてそれぞれ光軸対象に設定された2つの視差仮想瞳のいずれかから到達する被写体光束を受光する。本実施形態の光学系においては、実際の被写体光束はレンズ瞳の全体を通過するので、視差画素に到達するまでは、視差仮想瞳に対応する光強度分布が互いに区別されるのではない。しかし、視差画素は、それぞれが有する開口マスクの作用により、視差仮想瞳を通過した部分光束のみを光電変換した画像信号を出力する。したがって、視差画素の出力が示す画素値分布は、それぞれ対応する視差仮想瞳を通過した部分光束の光強度分布と比例関係にあると考えても良い。   FIG. 7 is a diagram for explaining the concept of defocusing. The parallax Lt pixel and the parallax Rt pixel receive the subject luminous flux that arrives from one of the two parallax virtual pupils set as the optical axis target as a partial region of the lens pupil. 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 light intensity distribution of the partial light flux that has passed through the corresponding parallax virtual pupil.

図7(a)で示すように、被写体である物点が焦点位置に存在する場合、いずれの視差仮想瞳を通った被写体光束であっても、それぞれの視差画素の出力は、対応する像点の画素を中心として急峻な画素値分布を示す。像点付近に視差Lt画素が配列されていれば、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。また、像点付近に視差Rt画素が配列されていても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する。すなわち、被写体光束がいずれの視差仮想瞳を通過しても、像点に対応する画素の出力値が最も大きく、周辺に配列された画素の出力値が急激に低下する分布を示し、それぞれの分布は互いに一致する。   As shown in FIG. 7A, 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.

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

また、図7(b)(c)は、物点が焦点位置から遠ざかる方向へずれる場合を示すが、物点が焦点位置から近づく方向へずれる場合は、図7(d)に示すように、図7(b)(c)と比べて、視差Lt画素が示す画素値分布と視差Rt画素が示す画素値分布の相対的な位置関係が逆転する。このようなデフォーカス関係により、視差画像を鑑賞するときに鑑賞者は、焦点位置より奥に存在する被写体を遠くに視認し、手前に存在する被写体を近くに視認する。   FIGS. 7B and 7C show the case where the object point shifts away from the focal position. When the object point moves away from the focal position, as shown in FIG. Compared to FIGS. 7B and 7C, 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.

図7(b)(c)で説明した画素値分布の変化をそれぞれグラフ化すると、図8のように表される。図において、横軸は画素位置を表し、中心位置が像点に対応する画素位置である。縦軸は各画素の出力値(画素値)を表す。この出力値は上述の通り実質的に光強度に比例する。   When the change of the pixel value distribution described in FIGS. 7B and 7C 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は、それぞれ図7(b)の視差Lt画素の画素値分布と視差Rt画素の画素値分布を表す。図からわかるように、これらの分布は中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1806は、図7(b)の状況に対する視差なし画素の画素値分布、すなわち被写体光束の全体を受光した場合の画素値分布と略相似形状を示す。   A distribution curve 1804 and a 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. 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 with no parallax with respect to the situation of FIG. 7B, that is, a pixel value distribution when the entire subject luminous flux is received, and a substantially similar shape.

分布曲線1807と分布曲線1808は、それぞれ図7(c)の視差Lt画素の画素値分布と視差Rt画素の画素値分布を表す。図からわかるように、これらの分布も中心位置に対して線対称の形状を成す。また、これらを足し合わせた合成分布曲線1809は、図7(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. Further, a combined distribution curve 1809 obtained by adding them shows a shape that is substantially similar to the pixel value distribution of the non-parallax pixels in the situation of FIG.

図9は、視差マップの生成処理を説明する説明図である。図9に示す例において、視差量算出部231は、上記GLtプレーンデータおよびGRtプレーンデータに基づいて、以下の視差マップ生成処理を実行する。   FIG. 9 is an explanatory diagram illustrating a process for generating a parallax map. In the example illustrated in FIG. 9, the parallax amount calculation unit 231 performs the following parallax map generation processing based on the GLt plane data and the GRt plane data.

視差量算出部231は、対象ブロックに含まれる画素のうち画素値を有する対象画素311を決定し、この対象画素311に対して局所ウィンドウ312を定める。そして、局所ウィンドウ312を基準として2画像間でマッチング処理を行い、対象画素311を含む対象ブロックにおける視差画素量を決定する。具体的には、視差量算出部231は、Ltプレーン画像上の局所ウィンドウ312に対応してGRtプレーンデータが示すGRtプレーン画像上に局所ウィンドウ314を設定して、局所ウィンドウ314を局所ウィンドウ312に対して相対的にずらしながら互いにマッチングの良い画像領域を探索する。そして、マッチングが良いと判断される局所ウィンドウ314の位置を定め、その中心座標である探索画素313の座標値を算出する。視差画素量は、対象画素311の座標値と探索画素313の座標値との差を視差ブロック単位に換算して決定される。そして、視差量算出部231は、GLtプレーン画像上において対象画素311を左上から右下まで順次走査しながら上記のマッチング処理を逐次実行して、GLtプレーン画像とGRtプレーン画像の視差画素量を算出する。   The parallax amount calculation unit 231 determines a target pixel 311 having a pixel value among the pixels included in the target block, and determines a local window 312 for the target pixel 311. Then, matching processing is performed between the two images using the local window 312 as a reference, and the amount of parallax pixels in the target block including the target pixel 311 is determined. Specifically, the parallax amount calculation unit 231 sets the local window 314 on the GRt plane image indicated by the GRt plane data corresponding to the local window 312 on the Lt plane image, and changes the local window 314 to the local window 312. On the other hand, image regions having good matching with each other are searched while being relatively shifted. Then, the position of the local window 314 where matching is determined to be good is determined, and the coordinate value of the search pixel 313 that is the center coordinate is calculated. The amount of parallax pixels is determined by converting the difference between the coordinate value of the target pixel 311 and the coordinate value of the search pixel 313 in units of parallax blocks. Then, the parallax amount calculation unit 231 sequentially executes the above matching process while sequentially scanning the target pixel 311 from the upper left to the lower right on the GLt plane image, and calculates the parallax pixel amounts of the GLt plane image and the GRt plane image. To do.

そして、視差量算出部231は、2D画像を基準画像とすべく、算出された視差画素量をそれぞれ半分の値として視差マップを完成させる。視差マップは、上述の算出結果として、例えば図の例において、各被写体である少年301、少女302、女性303および背景304の各被写体領域に対応した視差画素量として表現される。図の例においては、少年301に合焦しており、少年301の領域では視差画素量が0となり、少年301より手前に存在する少女302の領域では−1、奥に存在する女性303の領域では+1、さらに遠方の背景は+4の値を示している。   Then, the parallax amount calculation unit 231 completes the parallax map with each of the calculated parallax pixel amounts as a half value in order to use the 2D image as a reference image. The parallax map is expressed as a parallax pixel amount corresponding to each subject area of the boy 301, the girl 302, the woman 303, and the background 304, which are the subjects, for example, in the example of the figure, as the above calculation result. In the example in the figure, the boy 301 is in focus, the parallax pixel amount is 0 in the area of the boy 301, -1 in the area of the girl 302 existing in front of the boy 301, and the area of the woman 303 existing in the back. In this case, the value is +1, and the background in the far distance is +4.

GLtプレーンデータとGRtプレーンデータとの間で像のマッチング処理を行えば、それぞれの視差ブロックにおける視差画素量を算出することができるので、一方の視差画像のどの画素ブロックが他方の視差画像のどの画素ブロックと対応するかがわかる。すなわち、両視差画像間で、被写体の同一微小領域を捉えている画素ブロックの相対的な位置関係を把握することができる。また、上述のように、基準画像との視差画素量は、視差画像間の視差画素量の半分である。したがって、全ブロックに亘ってそれぞれ視差なし画像に対してGLtプレーンデータが示すGLtプレーン画像が何ブロックずれているかを羅列することができ、羅列された数列はいわゆる視差マップを形成する。   If image matching processing is performed between the GLt plane data and the GRt plane data, the amount of parallax pixels in each parallax block can be calculated, so which pixel block in one parallax image corresponds to which in the other parallax image You can see if it corresponds to a pixel block. That is, it is possible to grasp the relative positional relationship between the pixel blocks capturing the same minute area of the subject between both parallax images. Further, as described above, the parallax pixel amount with respect to the reference image is half of the parallax pixel amount between the parallax images. Therefore, it is possible to enumerate how many blocks the GLt plane image indicated by the GLt plane data is shifted from the non-parallax image over all blocks, and the enumerated number sequence forms a so-called parallax map.

図10は、視差マップを参照して原色情報を移植する処理の概念を示す図である。上述のように、視差マップが生成されると、動画生成部233は、視差マップを参照して、視差情報を含むカラー画像データのフレームを生成する。   FIG. 10 is a diagram illustrating a concept of processing for transplanting primary color information with reference to a parallax map. As described above, when the parallax map is generated, the moving image generation unit 233 refers to the parallax map and generates a frame of color image data including the parallax information.

基準画像であるカラー画像データは、図6に示すRnプレーンデータ等の各画素ブロックにおいて、RGBフィルタのそれぞれに対応する画素値を原色情報として有する。n,mを自然数としたとき、画素ブロック(n,m)に対する原色情報を、Cnmと表す。そして、動画生成部233は、視差画像データにおける画素ブロック(n,m)の原色情報として、視差マップを参照して、Rnプレーンデータ等の画素ブロック(n',m')の原色情報Cn'm'を移植する。動画生成部233は、全ブロックに対してこの作業を繰り返し、視差情報を含むカラー画像データのフレームを生成する。 The color image data that is the reference image has pixel values corresponding to each of the RGB filters as primary color information in each pixel block such as the Rn plane data shown in FIG. When n and m are natural numbers, primary color information for the pixel block (n, m) is represented as C nm . Then, the moving image generation unit 233 refers to the parallax map as primary color information of the pixel block (n, m) in the parallax image data, and primary color information C n of the pixel block (n ′, m ′) such as Rn plane data. transplant 'm' . The moving image generation unit 233 repeats this operation for all blocks, and generates a frame of color image data including disparity information.

図の例を用いて具体的に説明する。左視差画像データの画素ブロック(1,1)の原色情報を取得する場合は、視差マップの画素ブロック(1,1)を参照する。このとき視差マップの画素ブロック(1,1)は、視差画素量0を示しているので、動画生成部233は、そのまま対応する画素ブロックとして2D画像データの画素ブロック(1,1)を検索する。そして、動画生成部233は、2D画像データの画素ブロック(1,1)の原色情報C11を、左視差画像データの画素ブロック(1,1)へ移植することにより原色情報を取得する。動画生成部233は、視差画素量が0であるので、右視差画像データの画素ブロック(1,1)についても同様に、2D画像データの画素ブロック(1,1)の原色情報C11を移植する。 This will be specifically described with reference to the example in the figure. When acquiring the primary color information of the pixel block (1, 1) of the left parallax image data, the pixel block (1, 1) of the parallax map is referred to. At this time, since the pixel block (1, 1) of the parallax map indicates the parallax pixel amount 0, the moving image generation unit 233 searches the pixel block (1, 1) of the 2D image data as the corresponding pixel block as it is. . The moving image generation unit 233, a primary color information C 11 pixel block of the 2D image data (1, 1), to obtain the primary information by transplanting into pixel blocks (1,1) of the left parallax image data. Moving image generation unit 233, since the parallax pixel amount is 0, the same applies to the pixel blocks (1,1) of the right parallax image data, transplanted primary information C 11 pixel block of the 2D image data (1,1) To do.

次に、左視差画像データの画素ブロック(1,2)の原色情報を取得する場合は、視差マップの画素ブロック(1,2)を参照する。このとき視差マップの画素ブロック(1,2)は、視差画素量1を示しているので、動画生成部233は、カラー画像データの対応する画素ブロック(1,2)のひとつ右側である画素ブロック(1,3)を検索する。そして、動画生成部233は、2D画像データの画素ブロック(1,3)の原色情報C13を、左視差画像データの画素ブロック(1,2)へ移植することにより原色情報を取得する。 Next, when acquiring the primary color information of the pixel block (1, 2) of the left parallax image data, the pixel block (1, 2) of the parallax map is referred to. At this time, since the pixel block (1, 2) of the parallax map indicates the parallax pixel amount 1, the moving image generation unit 233 is the pixel block on the right side of the corresponding pixel block (1, 2) of the color image data. Search for (1,3). The moving image generation unit 233, a primary color information C 13 pixel block of the 2D image data (1,3), to obtain the primary information by transplanting into the left parallax image data pixel blocks (1, 2).

続いて動画生成部233は、右視差画像データの画素ブロック(1,2)の原色情報を取得する。参照した視差マップの画素ブロック(1,2)の視差画素量は1を示していたが、右視差画素データへ原色情報を移植する場合は符号を逆転させるので、ここでは視差画素量を−1とする。したがって、動画生成部233は、2D画像データの対応する画素ブロック(1,2)のひとつ左側である画素ブロック(1,1)を検索する。そして、動画生成部233は、2D画像データの画素ブロック(1,1)の原色情報C11を、右視差画像データの画素ブロック(1,2)へ移植することにより原色情報を取得する。 Subsequently, the moving image generation unit 233 acquires primary color information of the pixel block (1, 2) of the right parallax image data. The parallax pixel amount of the pixel block (1, 2) of the referenced parallax map is 1, but when the primary color information is transplanted to the right parallax pixel data, the sign is reversed. And Therefore, the moving image generation unit 233 searches for the pixel block (1, 1) that is one left side of the corresponding pixel block (1, 2) of the 2D image data. The moving image generation unit 233, a primary color information C 11 pixel block (1,1) of the 2D image data, and acquires the primary information by transplanting into the right parallax image data pixel blocks (1, 2).

つまり、動画生成部233は、左視差画像データの画素ブロック(n,m)へは、視差画素量がkであるとき、2D画像データの原色情報Cnm+kを、右視差画像データの画素ブロック(n,m)へは、2D画像データの原色情報Cnm−kを移植して、それぞれの視差画像データ原色情報を取得する。 That is, the moving image generation unit 233 applies the primary color information C nm + k of the 2D image data to the pixel block (n, m) of the left parallax image data and the pixel block ( n, m), the primary color information C nm-k of 2D image data is transplanted, and the respective parallax image data primary color information is acquired.

図11は、デジタルカメラ10における絞り値、画像の鮮鋭度を示すコントラストおよび視差量の関係を模式的に示す。図4から図10のデジタルカメラ10においては、視差情報のない2D画像を得るデジタルカメラと同様に、図11(a)から(c)に示すように、絞り値が大きいほどピント位置の前後のコントラストが高く、いわゆる被写界深度の深い画像を得る。   FIG. 11 schematically shows the relationship between the aperture value, the contrast indicating the sharpness of the image, and the amount of parallax in the digital camera 10. In the digital camera 10 of FIGS. 4 to 10, as in the case of a digital camera that obtains a 2D image without parallax information, as the aperture value is larger, the position before and after the focus position increases as shown in FIGS. An image having a high contrast and a deep so-called depth of field is obtained.

さらに本実施形態のデジタルカメラ10においては、図11(a)から(c)に示すように、絞り値が大きいほどピント位置の前後の視差量が小さい視差画像となる。これは、デジタルカメラ10の撮像素子100の視差画素が、図4等に示すように、射出瞳における偏った位置からの光束を受光するので、絞り値が大きいほど絞り22が絞られて射出瞳における偏った側からの光束が遮られることに基づく。すなわち、図11(a)から(c)を比較すると、絞り22のF値が1.4の場合に比べ、F値が4、8となるに従い、ピント位置より前の視差量および後の視差量が小さくなる。   Furthermore, in the digital camera 10 of the present embodiment, as shown in FIGS. 11A to 11C, the larger the aperture value, the smaller the amount of parallax before and after the focus position becomes. This is because the parallax pixels of the image sensor 100 of the digital camera 10 receive a light beam from a biased position in the exit pupil, as shown in FIG. This is based on the fact that the light flux from the biased side is blocked. That is, comparing FIGS. 11A to 11C, the amount of parallax before and after the focus position and the amount of parallax after the focus position are increased as the F value becomes 4 and 8, compared with the case where the F value of the diaphragm 22 is 1.4. The amount becomes smaller.

図12は、デジタルカメラ10の動作を示すフローチャートである。図12のフローチャートは図11の絞り値と視差量との関係を用いて、視差量を低減することにより、視差の時間的な変化量を低減して動画を生成する一例である。図12に示すフローチャートは、ユーザによりデジタルカメラ10へ動画生成の指示が入力された場合に開始する。   FIG. 12 is a flowchart showing the operation of the digital camera 10. The flowchart of FIG. 12 is an example of generating a moving image by reducing the amount of temporal change in parallax by reducing the amount of parallax using the relationship between the aperture value and the amount of parallax in FIG. The flowchart shown in FIG. 12 starts when an instruction to generate a moving image is input to the digital camera 10 by the user.

制御部201は、絞り22の絞り値を初期値に設定する(S100)。絞り値の初期値は、最小値である開放値であってもよいし、被写体光束の光量等の他の撮影条件から決定されてもよい。   The control unit 201 sets the aperture value of the aperture 22 to an initial value (S100). The initial value of the aperture value may be an open value that is a minimum value, or may be determined from other shooting conditions such as the amount of light of a subject light beam.

制御部201は駆動部204を介して撮像素子100を駆動することにより、当該絞り値で被写体光を撮像した仮画像を生成する(S102)。ここで仮画像は視差量を計算するのに用いられる画像であるが、その一例は、後述する本画像と同様に、図4から図6に示す動作および処理により得られるRAW画像データセットである。なお、仮画像を本画像とは別個の方法で生成することにより処理を速めてもよい。別個の方法の例は、間引き読出し、補間処理の省略等が挙げられる。   The control unit 201 drives the image sensor 100 via the drive unit 204 to generate a temporary image obtained by imaging subject light with the aperture value (S102). Here, the temporary image is an image used to calculate the amount of parallax, and an example thereof is a RAW image data set obtained by the operations and processes shown in FIGS. . Note that the processing may be speeded up by generating the temporary image by a method separate from the main image. Examples of separate methods include thinning out reading, omission of interpolation processing, and the like.

視差量算出部231は、仮画像から視差量を計算する(S104)。この場合に視差量算出部231は、例えば図9で説明した処理を行い、視差マップを生成することにより視差画素量を計算する。   The parallax amount calculation unit 231 calculates the parallax amount from the temporary image (S104). In this case, the parallax amount calculation unit 231 performs the process described in FIG. 9, for example, and calculates the parallax pixel amount by generating a parallax map.

変化量算出部232は、上記ステップS104により算出された視差量と、時系列的に前回生成された仮画像に対して同ステップS104により算出された視差量とを比較して、視差の時間的な変化量を計算する(S106)。この場合に、変化量算出部232は例えば、時間的に前後する仮画像に対する二つの視差マップにおける同一の被写体の視差画素量をフレームレートが示す時間間隔で除することにより変化量を算出する。   The change amount calculation unit 232 compares the amount of parallax calculated in step S104 with the amount of parallax calculated in step S104 with respect to the temporary image previously generated in time series, and compares the amount of parallax over time. The amount of change is calculated (S106). In this case, for example, the change amount calculation unit 232 calculates the change amount by dividing the amount of parallax pixels of the same subject in the two parallax maps with respect to the temporal images that are temporally changed by the time interval indicated by the frame rate.

動画生成部233は、ステップS106により算出された変化量が閾値よりも大きいか否かを判断する(S108)。この場合に、動画生成部233は例えば、ステップS106により算出された変化量が被写体ごとに異なる場合に、最も大きい変化量と閾値とを比較する。当該閾値は、絞りの初期設定値で生成した動画を表示したときに鑑賞者50が違和感を生じるか否かに基づいて予め設定されてもよいし、立体感を感じさせる表示についての業界のガイドライン等に基づいて設定されてもよい。   The moving image generation unit 233 determines whether or not the amount of change calculated in step S106 is greater than a threshold (S108). In this case, for example, when the amount of change calculated in step S106 is different for each subject, the moving image generation unit 233 compares the largest amount of change with a threshold value. The threshold value may be set in advance based on whether or not the viewer 50 feels uncomfortable when displaying the moving image generated with the initial aperture setting value, and industry guidelines for a display that makes the viewer feel a three-dimensional effect. Etc. may be set based on the above.

ステップS108において変化量が閾値よりも大きい場合に(S108:Yes)、動画生成部233は、絞り値を大きくする旨を制御部201に入力する(S110)。この場合に、制御部201は閾値からの乖離度合に合わせて絞り値が設定されたテーブルを参照して絞り値を設定してもよいし、乖離度合にかかわらず初期値に対して1段分または数段分だけ絞り値を大きくしてもよい。   When the amount of change is larger than the threshold value in step S108 (S108: Yes), the moving image generating unit 233 inputs to the control unit 201 that the aperture value is increased (S110). In this case, the control unit 201 may set the aperture value with reference to a table in which the aperture value is set in accordance with the degree of deviation from the threshold, or one step from the initial value regardless of the degree of deviation. Alternatively, the aperture value may be increased by several steps.

上記ステップS110において、制御部201は、動画生成部233から絞り値の変更を受け付けた場合に、他の撮像条件、例えば光電変換素子108の蓄積時間、感度等を再設定する。これにより、絞り値の変更の前後で画像の明るさが急激に変化する等の不自然さを緩和することができる。   In step S <b> 110, when the control unit 201 receives a change in aperture value from the moving image generation unit 233, the control unit 201 resets other imaging conditions such as the accumulation time and sensitivity of the photoelectric conversion element 108. As a result, unnaturalness such as a sudden change in the brightness of the image before and after the aperture value change can be alleviated.

ステップS110に続いてまたは上記ステップS108において変化量が閾値以下である場合に(S108:No)、制御部201は駆動部204を介して撮像素子100を駆動することにより、被写体光を撮像した本画像を生成する(S112)。動画生成部233は、当該本画像に基づいて視差情報を有する1フレーム分の画像を生成し、前回のフレームと時間的に並べることにより、視差情報を有する動画を生成する(S114)。この場合に、動画生成部233は例えば、本画像から図6に示す各原色のプレーンデータのセットにより右目用画像と左目用画像とを含む1フレーム分の画像を生成する。これに代えて、動画生成部233は、視差量算出部231の上記処理により視差マップを得て、当該視差マップを用いた図10の処理により、右目用画像と左目用画像とを含む1フレーム分の画像を生成してもよい。   Subsequent to step S110 or when the amount of change is equal to or smaller than the threshold value in step S108 (S108: No), the control unit 201 drives the image sensor 100 via the drive unit 204 to capture the subject light. An image is generated (S112). The moving image generation unit 233 generates an image for one frame having parallax information based on the main image, and generates a moving image having parallax information by temporally arranging the frames with the previous frame (S114). In this case, for example, the moving image generating unit 233 generates an image for one frame including the right-eye image and the left-eye image from the main image by using a set of primary color plane data shown in FIG. Instead, the moving image generation unit 233 obtains a parallax map by the above-described processing of the parallax amount calculation unit 231, and one frame including the right-eye image and the left-eye image by the processing of FIG. 10 using the parallax map. Minute images may be generated.

ユーザから動画の終了の指示が入力されない限り(S116:No)、上記ステップS100からS114の処理が繰り返される。ユーザから動画の終了の指示が入力された場合に(S116:Yes)、当該フローチャートが終了する。これにより、動画生成部233は、視差の時間的な変化量が閾値よりも大きい場合に、変化量が閾値よりも小さい場合に比べて絞り値を大きくした状態で時系列的に撮影されて生成された複数の画像から動画を生成する。よって、動画生成部233は、視差の時間的な変化量を低減した動画を生成して、鑑賞者50が当該動画を見た場合の違和感を低減することができる。   Unless an instruction for ending the moving image is input from the user (S116: No), the processes of steps S100 to S114 are repeated. When an instruction to end the moving image is input from the user (S116: Yes), the flowchart ends. As a result, the moving image generation unit 233 generates and generates time-series images in a state where the aperture value is larger than when the amount of change is smaller than the threshold when the amount of temporal change in parallax is larger than the threshold. A moving image is generated from the plurality of images. Therefore, the moving image generation unit 233 can generate a moving image with a reduced amount of temporal change in parallax, and can reduce discomfort when the viewer 50 views the moving image.

図13は、デジタルカメラ10の他の動作を示すフローチャートである。図13のフローチャートは図9および図10の視差マップを用いて、視差量を低減することにより、視差の時間的な変化量を低減して動画を生成する一例である。図13のフローチャートにおいて、図12のフローチャートと同一の動作は同一の参照番号を付して説明を省略する。   FIG. 13 is a flowchart showing another operation of the digital camera 10. The flowchart of FIG. 13 is an example of generating a moving image by reducing the amount of temporal change in parallax by reducing the amount of parallax using the parallax maps of FIGS. 9 and 10. In the flowchart of FIG. 13, the same operations as those in the flowchart of FIG.

図13のフローチャートにおいて、制御部201は、絞り値等の撮影条件を設定して、撮像素子100を駆動することにより、被写体光を撮像した画像を生成する(S130)。当該画像に基づいて、視差量算出部231は図9で説明した処理を行い、視差マップを生成する(S132)。続くステップS106およびS108は図12のフローチャートと同じ動作である。   In the flowchart of FIG. 13, the control unit 201 sets an imaging condition such as an aperture value and drives the image sensor 100 to generate an image of subject light (S130). Based on the image, the parallax amount calculation unit 231 performs the processing described with reference to FIG. 9 to generate a parallax map (S132). Subsequent steps S106 and S108 are the same as those in the flowchart of FIG.

ステップS108において、変化量が閾値より大きい場合に(S108:Yes)、動画生成部233は、視差マップを補正する(S134)。動画生成部233は例えば閾値を超える変化量に対応する被写体の視差画素量を、当該閾値以下に低減するように視差マップを補正する。   In step S108, when the amount of change is larger than the threshold (S108: Yes), the moving image generating unit 233 corrects the parallax map (S134). For example, the moving image generation unit 233 corrects the parallax map so that the parallax pixel amount of the subject corresponding to the change amount exceeding the threshold value is reduced to the threshold value or less.

動画生成部233は、上記ステップS134で視差マップが補正された場合には補正後の視差マップを用いて、上記ステップS108で変化量が閾値以下と判断された場合(S108:No)には補正していない視差マップを用いて、図10の処理により、右目用画像と左目用画像とを含む1フレーム分の画像を生成する。   The moving image generation unit 233 uses the corrected parallax map when the parallax map is corrected in step S134, and corrects when the change amount is determined to be equal to or less than the threshold value in step S108 (S108: No). An image for one frame including the right-eye image and the left-eye image is generated by the processing of FIG.

これにより、動画生成部233は、視差の時間的な変化量が閾値よりも大きい場合に、変化量を当該閾値以下に低減した動画を生成する。よって、動画生成部233は、視差の時間的な変化量を低減した動画を生成して、鑑賞者50が当該動画を見た場合の違和感を低減することができる。   Thereby, the moving image generation unit 233 generates a moving image in which the change amount is reduced to the threshold value or less when the temporal change amount of the parallax is larger than the threshold value. Therefore, the moving image generation unit 233 can generate a moving image with a reduced amount of temporal change in parallax, and can reduce discomfort when the viewer 50 views the moving image.

図14および図15は、図6に示すRAW画像データセットから右目用のカラー画像データおよび左目用のカラー画像データを生成する他の例を示す。特に、図14および図15の例において、立体調整パラメータを導入することにより、主要被写体のぼけを感じさせない範囲で視差量を任意に調整したカラー画像データを生成する。   14 and 15 show another example of generating color image data for the right eye and color image data for the left eye from the RAW image data set shown in FIG. In particular, in the examples of FIGS. 14 and 15, color image data in which the parallax amount is arbitrarily adjusted within a range in which the main subject is not blurred is generated by introducing the stereoscopic adjustment parameter.

図14を用いて、カラー画像データのうち赤色の右視差画像データおよび赤色の左視差画像データの生成処理の例を示す。   FIG. 14 illustrates an example of a process for generating red right parallax image data and red left parallax image data among color image data.

赤色の視差画像データは、図6を用いて説明したRnプレーンデータの画素値と、RLtプレーンデータおよびRRtプレーンデータの輝度値とを用いて生成する。具体的には、例えば左視差画像データの対象画素位置(i,j)の画素値RLtmnを算出する場合、まず、動画生成部233は、Rnプレーンデータの同一画素位置(i,j)から画素値Rnmnを抽出する。次に、動画生成部233は、RLtプレーンデータの同一画素位置(i,j)から輝度値RLtmnを、RRtプレーンデータの同一画素位置(i,j)から輝度値RRtmnを抽出する。そして、動画生成部233は、画素値Rnmnに、輝度値RLtmnとRRtmnを立体調整パラメータCで分配した値を乗じて、画素値RLctmnを算出する。具体的には、以下の式(1)により算出する。ただし、立体調整パラメータCは、0.5<C<1の範囲で予め設定される。
RLctmn=2Rnmn×{C・RLtmn+(1−C)・RRtmn}/(RLtmn+RRtmn)…(1)
The red parallax image data is generated using the pixel value of the Rn plane data described with reference to FIG. 6, and the luminance 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 left parallax image data, first, the moving image generation unit 233 first determines the same pixel position (i m , The pixel value Rn mn is extracted from j n ). Next, moving image generation unit 233, the same pixel position of RLt plane data (i m, j n) the luminance value RLt mn from the same pixel position of the RRT plane data (i m, j n) the luminance value RRT mn from Extract. The moving image generation unit 233, the pixel values Rn mn, by multiplying the value obtained by distributing the luminance value RLt mn and RRT mn stereoscopic adjustment parameter C, and calculates the pixel value RLct mn. Specifically, it is calculated by the following equation (1). However, the three-dimensional adjustment parameter C is preset in the range of 0.5 <C <1.
RLct mn = 2Rn mn x {C · RLt mn + (1-C) · RRt mn } / (RLt mn + RRt mn ) (1)

同様に、右視差画像データの対象画素位置(i,j)の画素値RRctmnを算出する場合も、動画生成部233は、画素値Rnmnに輝度値RLtmnと輝度値RRtmnを立体調整パラメータCで分配した値を乗じて算出する。具体的には、以下の式(2)により算出する。
RRctmn=2Rnmn×{C・RRtmn+(1−C)・RLtmn}/(RLtmn+RRtmn)…(2)
Similarly, when calculating the pixel value RRct mn of the target pixel position (i m , j n ) of the right parallax image data, the moving image generation unit 233 uses the luminance value RLt mn and the luminance value RRt mn as the pixel value Rn mn. Calculated by multiplying the value distributed by the three-dimensional adjustment parameter C. Specifically, it is calculated by the following equation (2).
RRct mn = 2Rn mn × {C · RRt mn + (1-C) · RLt mn } / (RLt mn + RRt mn ) (2)

動画生成部233は、このような処理を、左端かつ上端の画素である(1、1)から右端かつ下端の座標である(i,j)まで順次実行する。 Moving image generation unit 233, such processing is sequentially executed from the pixel at the left end and the upper end (1,1) to a right end and the lower end of the coordinate (i 0, j 0).

そして、赤色の右視差画像データおよび左視差画像データの生成処理が完了したら、次に緑色の右視差画像データと左視差画像データ、および、青色の右視差画像データと左視差画像データを同様に生成する。以上の処理により、視差情報を含むカラー画像データの1フレームを完成させる。さらに、動画生成部233は、当該フレームを時系列的に並べて、動画を生成する。   When the generation process of the red right parallax image data and the left parallax image data is completed, the green right parallax image data and the left parallax image data, and the blue right parallax image data and the left parallax image data are similarly processed. Generate. Through the above processing, one frame of color image data including parallax information is completed. Further, the moving image generation unit 233 generates a moving image by arranging the frames in time series.

図15は、RGBの画素値分布の変化を説明する図である。図15(a)は、焦点位置から一定量だけずれた位置に存在する物点からのある白色被写体光束を受光した場合の、G(Lt)画素、G(Rt)画素、R(Lt)画素、R(Rt)画素、B(Lt)画素およびB(Rt)画素のそれぞれの出力値を並べたグラフである。   FIG. 15 is a diagram for explaining a change in RGB pixel value distribution. FIG. 15A 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.

図15(b)は、図15(a)における物点からのある白色被写体光束を受光した場合の、視差無し画素であるR(N)画素、G(N)画素およびB(N)画素の出力値を並べたグラフである。このグラフも、各色の画素値分布を表すと言える。   FIG. 15B 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. 15A 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として対応する画素ごとに上述の処理を施すと、図15(c)のグラフで表される光強度分布となる。図15および上記式(1)(2)から分かるように、0.5<C<1の範囲で立体調整パラメータCが1に近いほど視差量が大きく、0.5に近いほど視差量が小さくなる。すなわち、立体調整パラメータCは、視差Lt画素の示す視差量と視差Rt画素の示す視差量とに基づいた視差量を視差なし画素に割り付ける場合の、視差Lt画素の示す視差量と視差Rt画素の示す視差量との重みを調整している。そして、立体調整パラメータCが1に近いほど視差Lt画素の示す視差量と視差Rt画素の示す視差量の一方の重みが大きく、0.5に近いほどそれらの重みが近い視差量が、視差なし画素に割り付けられる。   When the above-described processing is performed for each corresponding pixel with C = 0.8, the light intensity distribution represented by the graph of FIG. As can be seen from FIG. 15 and the above formulas (1) and (2), the parallax amount is larger as the three-dimensional adjustment parameter C is closer to 1 in the range of 0.5 <C <1, and the parallax amount is smaller as it is closer to 0.5. Become. That is, the three-dimensional adjustment parameter C includes the parallax amount indicated by the parallax Lt pixel and the parallax Rt pixel when the parallax amount based on the parallax amount indicated by the parallax Lt pixel and the parallax amount indicated by the parallax Rt pixel is assigned to the non-parallax pixel. The weight with the amount of parallax shown is adjusted. One of the weights of the parallax amount indicated by the parallax Lt pixel and the parallax amount indicated by the parallax Rt pixel is larger as the stereoscopic adjustment parameter C is closer to 1, and the parallax amount closer to 0.5 is closer to 0.5. Assigned to a pixel.

図16は、デジタルカメラ10の他の動作を示すフローチャートである。図16のフローチャートは図14および図15の立体調整パラメータCを用いて視差量を低減することにより、視差の時間的な変化量を低減して動画を生成する一例である。図16のフローチャートにおいて、図12および図13のフローチャートと同一の動作は同一の参照番号を付して説明を省略する。   FIG. 16 is a flowchart showing another operation of the digital camera 10. The flowchart in FIG. 16 is an example of generating a moving image by reducing the amount of temporal change in parallax by reducing the amount of parallax using the stereoscopic adjustment parameter C in FIGS. 14 and 15. In the flowchart of FIG. 16, the same operations as those in the flowcharts of FIGS. 12 and 13 are denoted by the same reference numerals, and the description thereof is omitted.

図16のフローチャートにおいて、ステップS130により生成された画像に基づいて、視差量算出部231は、例えば図9で説明した処理を行い、視差量を計算する(S104)。続くステップS106およびS108は図12のフローチャートと同じ動作である。   In the flowchart of FIG. 16, based on the image generated in step S <b> 130, the parallax amount calculation unit 231 performs the process described in FIG. 9, for example, and calculates the parallax amount (S <b> 104). Subsequent steps S106 and S108 are the same as those in the flowchart of FIG.

ステップS108において、変化量が閾値より大きい場合に(S108:Yes)、動画生成部233は、立体調整パラメータCを補正する(S142)。この場合に、動画生成部233は例えば閾値を超える変化量に対応する被写体に対して、より0.5に近い、予め定められた立体調整パラメータCを用いる。例えば、補正前の立体調整パラメータCを1とし、補正後の立体調整パラメータCを0.75とする。   In step S108, when the amount of change is larger than the threshold (S108: Yes), the moving image generating unit 233 corrects the three-dimensional adjustment parameter C (S142). In this case, the moving image generation unit 233 uses a predetermined three-dimensional adjustment parameter C that is closer to 0.5, for example, for a subject corresponding to an amount of change that exceeds a threshold. For example, the stereoscopic adjustment parameter C before correction is set to 1, and the corrected stereoscopic adjustment parameter C is set to 0.75.

動画生成部233は、上記ステップS134で立体調整パラメータCが補正された場合には補正後の立体調整パラメータCを用いて、上記ステップS108で変化量が閾値以下と判断された場合(S108:No)には補正していない立体調整パラメータを用いて、図14および図15の処理により、右目用画像と左目用画像とを含む1フレーム分の画像を生成する。   When the stereoscopic adjustment parameter C is corrected in step S134, the moving image generation unit 233 uses the corrected stereoscopic adjustment parameter C and determines that the change amount is equal to or less than the threshold value in step S108 (S108: No). ) Is used to generate an image for one frame including the image for the right eye and the image for the left eye by using the uncorrected stereo adjustment parameters by the processing of FIGS. 14 and 15.

これにより、動画生成部233は、視差の時間的な変化量が閾値よりも大きい場合に、変化量を当該閾値以下に低減した動画を生成する。よって、動画生成部233は、視差の時間的な変化量を低減した動画を生成して、鑑賞者50が当該動画を見た場合の違和感を低減することができる。   Thereby, the moving image generation unit 233 generates a moving image in which the change amount is reduced to the threshold value or less when the temporal change amount of the parallax is larger than the threshold value. Therefore, the moving image generation unit 233 can generate a moving image with a reduced amount of temporal change in parallax, and can reduce discomfort when the viewer 50 views the moving image.

ここで、立体調整パラメータCで視差の時間的な変化量を低減するので、視差無し画素による2Dカラー画像のぼけ量を維持したまま、視差量の大きさを調整することができる。したがって、これらの画像データを3D画像対応の再生装置で再生すれば、鑑賞者50は、カラー画像として立体感が適度に調整された3D映像を鑑賞できる。特に処理が容易で高速に画像データを生成することができ、動画像に適している。   Here, since the temporal change amount of the parallax is reduced by the stereoscopic adjustment parameter C, it is possible to adjust the size of the parallax amount while maintaining the blur amount of the 2D color image due to the non-parallax pixels. Therefore, if these image data are reproduced by a 3D image-compatible reproducing apparatus, the viewer 50 can appreciate a 3D image in which the stereoscopic effect is appropriately adjusted as a color image. In particular, processing is easy and image data can be generated at high speed, which is suitable for moving images.

図17は、デジタルカメラ10の他の動作を示すフローチャートである。図17のフローチャートは撮影時のフレームレートを高くして、表示時にある視差量になるまでの時間を遅くすることにより、視差の時間的な変化量を低減して動画を生成する一例である。図17のフローチャートにおいて、図12のフローチャートと同一の動作には同一の参照番号を付して説明を省略する。   FIG. 17 is a flowchart showing another operation of the digital camera 10. The flowchart in FIG. 17 is an example of generating a moving image by reducing the amount of temporal change in parallax by increasing the frame rate at the time of shooting and delaying the time until a certain amount of parallax is displayed. In the flowchart of FIG. 17, the same operations as those in the flowchart of FIG.

制御部201は、フレームレートを初期値に設定する(S120)。絞り値の初期値は、予め定められた一定値であってもよいし、被写体光束の光量等の他の撮影条件から決定されてもよい。   The control unit 201 sets the frame rate to an initial value (S120). The initial value of the aperture value may be a predetermined constant value, or may be determined from other shooting conditions such as the light amount of the subject light flux.

制御部201は駆動部204を介して撮像素子100を駆動することにより、当該フレームレートで仮画像を生成する(S102)。さらに図12と同様に、視差量および変化量が計算されて、変化量が閾値と比較される(S104、S106、S108)。   The control unit 201 drives the image sensor 100 via the drive unit 204 to generate a temporary image at the frame rate (S102). Further, as in FIG. 12, the amount of parallax and the amount of change are calculated, and the amount of change is compared with a threshold (S104, S106, S108).

ステップS108において変化量が閾値よりも大きい場合に(S108:Yes)、動画生成部233は、フレームレートを上げる旨を制御部201に入力する(S122)。この場合に、制御部201は閾値からの乖離度合に合わせてフレームレートが設定されたテーブルを参照してフレームレートを設定してもよいし、乖離度合にかかわらず初期値に対して1段分または数段分だけフレームレートを上げてもよい。   When the amount of change is larger than the threshold value in step S108 (S108: Yes), the moving image generation unit 233 inputs to the control unit 201 that the frame rate is increased (S122). In this case, the control unit 201 may set the frame rate by referring to a table in which the frame rate is set in accordance with the degree of deviation from the threshold, or one step for the initial value regardless of the degree of deviation. Alternatively, the frame rate may be increased by several stages.

上記ステップS110において、制御部201は、動画生成部233からフレームレートの変更を受け付けた場合に、他の撮像条件、例えば光電変換素子108の蓄積時間、感度等を再設定する。これにより、フレームレートの変更の前後で画像の明るさが急激に変化する等の不自然さを緩和することができる。   In step S <b> 110, when the control unit 201 receives a change in the frame rate from the moving image generation unit 233, the control unit 201 resets other imaging conditions such as the accumulation time and sensitivity of the photoelectric conversion element 108. Thereby, unnaturalness such as a sudden change in the brightness of the image before and after the change of the frame rate can be alleviated.

ステップS110に続いてまたは上記ステップS108において変化量が閾値以下である場合に(S108:No)、制御部201はその時点で設定されているフレームレートで本画像を生成し(S112)、視差情報を有する動画を生成する(S114)。これにより、動画生成部233は、視差の時間的な変化量が閾値よりも大きい場合に、変化量が閾値よりも小さい場合に比べて高いフレームレートで撮像されて生成された複数の画像から動画を生成する。   Subsequent to step S110 or when the amount of change is equal to or less than the threshold value in step S108 (S108: No), the control unit 201 generates a main image at the frame rate set at that time (S112), and disparity information (S114). Thereby, the moving image generation unit 233, when the amount of temporal change in parallax is larger than the threshold, generates a moving image from a plurality of images captured and generated at a higher frame rate than when the amount of change is smaller than the threshold. Is generated.

図18は、図17のステップS114で生成される動画330および補正動画340の例を示す。図18の例において、時間t2での視差の変化量が閾値を超えているとする。この場合に、閾値以下の他の時間t1、t3のフレームレート60fpsよりも高いフレームレート120fps分のフレーム332が生成される。   FIG. 18 shows an example of the moving image 330 and the corrected moving image 340 generated in step S114 of FIG. In the example of FIG. 18, it is assumed that the amount of change in parallax at time t2 exceeds the threshold value. In this case, frames 332 corresponding to a frame rate of 120 fps, which are higher than the frame rate of 60 fps at other times t1 and t3 below the threshold, are generated.

動画生成部233は、高いフレームレート120fpsでのフレーム332を、低いフレームレート60fpsに変換したフレーム342により、補正動画340を生成する。これにより、視差の変化量が閾値を超えていた時間t2が、長い時間(t5+t6)に変換される。補正後の補正動画340をPC40等で通常通りに再生することにより、時間t5、t6では撮影時の実時間t2よりも長い、いわゆるスロー再生となり、視差の時間的な変化量が低減される。視差の時間的な変化量を低減することにより、鑑賞者50が当該動画を見た場合の違和感を低減することができる。   The moving image generation unit 233 generates a corrected moving image 340 using a frame 342 obtained by converting a frame 332 at a high frame rate of 120 fps to a low frame rate of 60 fps. Thereby, the time t2 when the amount of change in parallax exceeds the threshold value is converted into a long time (t5 + t6). By reproducing the corrected corrected video 340 as usual on the PC 40 or the like, so-called slow reproduction is performed at times t5 and t6, which is longer than the actual time t2 at the time of shooting, and the temporal change in parallax is reduced. By reducing the temporal change amount of the parallax, it is possible to reduce a sense of discomfort when the viewer 50 views the moving image.

動画生成部233は、フレームレートを合わせた補正動画340を生成するのに代えて、撮影時のフレームレートを反映した動画330を生成してもよい。この場合に、動画生成部233はさらに、時間t2でのフレームレートが他の時間t1、t3よりも高い旨、または、時間t2での視差の変化量が閾値を越えている旨の情報を動画330のヘッダ部分等に格納することが好ましい。これにより、PC40等の表示装置は、動画330のヘッダ情報を参照して、補正動画340のように再生して視差の時間的な変化量を低減することができる。また、鑑賞者50の指示等により、視差の変化量を低減せずに実時間に対応した再生をすることもできる。   The moving image generation unit 233 may generate a moving image 330 that reflects the frame rate at the time of shooting instead of generating the corrected moving image 340 that matches the frame rate. In this case, the moving image generation unit 233 further displays information indicating that the frame rate at time t2 is higher than the other times t1 and t3, or that the amount of change in parallax at time t2 exceeds the threshold value. It is preferable to store in the header portion 330 or the like. Thereby, a display device such as the PC 40 can reproduce the corrected moving image 340 with reference to the header information of the moving image 330 to reduce the temporal change amount of the parallax. Further, it is possible to perform reproduction corresponding to real time without reducing the amount of change in parallax according to the instruction of the viewer 50 or the like.

図19は、PC40の本体44の機能ブロックを示す。本体44は、動画取得部410と、変化量算出部412と、動画補正部414とを有する。本体44は、ディスプレイ42を用いて動画を表示する。   FIG. 19 shows functional blocks of the main body 44 of the PC 40. The main body 44 includes a moving image acquisition unit 410, a change amount calculation unit 412, and a moving image correction unit 414. The main body 44 displays a moving image using the display 42.

動画取得部410は、デジタルカメラ10等から動画を取得する。動画取得部410は、デジタルカメラ10と直接的に通信して動画を取得するのに代えて、メモリまたはネットワークのサーバ等から取得してもよい。   The moving image acquisition unit 410 acquires a moving image from the digital camera 10 or the like. The moving image acquisition unit 410 may acquire the moving image from a memory or a network server instead of directly communicating with the digital camera 10 to acquire the moving image.

変化量算出部412は、動画取得部410により取得された動画に基づいて、同一の対象に対する視差を示す視差量を時系列的に取得するとともに、視差量の時間的な変化を算出する。動画補正部414は、変化量算出部412により取得された変化量が閾値よりも大きい場合に、元の動画に対して少なくとも当該対象に対する変化量を低減した補正後の動画を生成する。   Based on the moving image acquired by the moving image acquisition unit 410, the change amount calculation unit 412 acquires a parallax amount indicating the parallax for the same target in time series, and calculates a temporal change in the parallax amount. When the change amount acquired by the change amount calculation unit 412 is larger than the threshold, the moving image correction unit 414 generates a corrected moving image in which at least the change amount for the target is reduced with respect to the original moving image.

図20は本体44の動作を示すフローチャートである。図20のフローチャートは、動画を表示する装置側で視差の時間的な変化を低減した当該動画を補正して表示する例を示す。図20のフローチャートにおいて、図12、21、24と同一の動作には同一の参照番号を付して説明を省略する。   FIG. 20 is a flowchart showing the operation of the main body 44. The flowchart in FIG. 20 illustrates an example in which the moving image on which the moving image is displayed is corrected and displayed on the side where the temporal change in parallax is reduced. In the flowchart of FIG. 20, the same operations as those in FIGS. 12, 21, and 24 are denoted by the same reference numerals, and the description thereof is omitted.

図16のフローチャートにおいて、動画取得部410は、デジタルカメラ10等から少なくとも立体情報が含まれている元動画を取得する(S150)。当該立体情報は、図10および図14のような一対の視差画像データであってもよいし、図9のように視差量自体に関する情報であってもよい。   In the flowchart of FIG. 16, the moving image acquisition unit 410 acquires an original moving image including at least stereoscopic information from the digital camera 10 or the like (S150). The stereoscopic information may be a pair of parallax image data as shown in FIGS. 10 and 14, or may be information related to the parallax amount itself as shown in FIG. 9.

変化量算出部412は、動画取得部410により取得された元動画に基づいて、視差量を計算する(S104)。 動画取得部410により取得された元動画に視差量を示す情報が直接的に含まれている場合に、変化量算出部412は当該情報を取得する。一方、動画取得部410により取得された元動画に視差量を示す情報が直接的に含まれていない場合に、変化量算出部412は元動画の各フレームに基づいて、図9に示す視差マップを生成する等により、視差量を算出する。変化量算出部412はさらに、上記ステップS104の視差量を時系列的な複数のフレーム間で比較し、同一の対象に対する視差量の時間的な変化を算出する(S106)。   The change amount calculation unit 412 calculates the amount of parallax based on the original moving image acquired by the moving image acquisition unit 410 (S104). When the information indicating the parallax amount is directly included in the original moving image acquired by the moving image acquiring unit 410, the change amount calculating unit 412 acquires the information. On the other hand, when the information indicating the parallax amount is not directly included in the original moving image acquired by the moving image acquiring unit 410, the change amount calculating unit 412 performs the disparity map illustrated in FIG. 9 based on each frame of the original moving image. For example, the amount of parallax is calculated. The change amount calculation unit 412 further compares the amount of parallax in step S104 between a plurality of time-series frames, and calculates a temporal change in the amount of parallax for the same target (S106).

ステップS108において、変化量が閾値より大きい場合に(S108:Yes)、動画補正部414は、視差量を補正する(S152)。この場合に、動画補正部414は、上記対象に対する各フレームにおける視差量を低減してもよいし、同じ視差量分だけ変化するまでの時間を遅くしてもよい。   In step S108, when the amount of change is larger than the threshold (S108: Yes), the moving image correction unit 414 corrects the parallax amount (S152). In this case, the moving image correction unit 414 may reduce the amount of parallax in each frame with respect to the target, or may delay the time until the amount of change changes by the same amount of parallax.

各フレームにおける視差量を低減する場合に、例えば、動画補正部414は、元動画が図9に示す視差マップを用いている場合には、当該視差マップにおける視差量を低減する。これに代えて、または、これに加えて、動画補正部414は、元動画の一対の視差画像データに対して図14の立体調整パラメータCを1から0.5の間、例えば0.75とした新たな一対の視差画像データを生成することで、視差量を低減したフレームを生成してもよい。   When reducing the amount of parallax in each frame, for example, when the original moving image uses the parallax map shown in FIG. 9, the moving image correction unit 414 reduces the amount of parallax in the parallax map. Instead of this, or in addition to this, the moving image correction unit 414 sets the stereoscopic adjustment parameter C in FIG. 14 between 1 and 0.5, for example, 0.75, for a pair of parallax image data of the original moving image. A frame with a reduced amount of parallax may be generated by generating a new pair of parallax image data.

動画補正部414は、上記ステップS152で視差量が低減された補正後のフレームを用いて動画を生成する(S154)。この場合に動画補正部414は、上記ステップS108で閾値を越えなかったフレームはそのまま用いる。   The moving image correcting unit 414 generates a moving image using the corrected frame in which the amount of parallax has been reduced in step S152 (S154). In this case, the moving image correction unit 414 uses the frame that does not exceed the threshold value in step S108 as it is.

動画補正部414は、上記ステップS154で生成した補正後の動画を、ディスプレイ42の表示方法に合わせて表示する。以上で図20のフローチャートを終了する。なお、図20に示すフローチャートの各手順は、CD−ROM416等の媒体またはネットワークを介して本体44にインストールされたコンピュータプログラムにより実行されてもよい。   The moving image correction unit 414 displays the corrected moving image generated in step S154 in accordance with the display method of the display 42. This is the end of the flowchart of FIG. 20 may be executed by a computer program installed in the main body 44 via a medium such as the CD-ROM 416 or a network.

図21は、図20のフローチャートにより生成される補正動画360の一例を示す。動画補正部414は、上記ステップS152において、同じ視差量分だけ変化するまでの時間を遅くなるように補正した補正動画360を生成してもよい。   FIG. 21 shows an example of the corrected moving image 360 generated by the flowchart of FIG. The moving image correcting unit 414 may generate the corrected moving image 360 corrected in step S152 so that the time until the change by the same amount of parallax is delayed.

この場合に、例えば、元動画350において、時間t12における視差量の変化が閾値よりも大きく、時間t11、t13では閾値よりも小さいとする。この場合に、動画補正部414は、元動画350の時間t12における各フレーム352を、補正動画360において、2倍の時間(t15+t16)にフレーム362として割り付ける。さらに、動画補正部414は、他の時間t14等と同じフレームレート、例えば60fpsを保つように、補間フレーム364を生成する。当該補間フレーム364の一例は直前のフレーム362をそのままコピーすることであるが、これに代えて他の方法で補間フレーム364を生成してもよい。   In this case, for example, in the original video 350, it is assumed that the change in the amount of parallax at time t12 is larger than the threshold value, and is smaller than the threshold value at times t11 and t13. In this case, the moving image correction unit 414 allocates each frame 352 at time t12 of the original moving image 350 as a frame 362 at twice the time (t15 + t16) in the corrected moving image 360. Furthermore, the moving image correction unit 414 generates the interpolation frame 364 so as to maintain the same frame rate as other times t14 and the like, for example, 60 fps. An example of the interpolation frame 364 is to copy the immediately preceding frame 362 as it is, but instead of this, the interpolation frame 364 may be generated by another method.

上記補正動画360を時間t14からt17に渡って同一のフレームレートで再生することにより、元動画350において視差の変化量が大きかった時間t12が、再生時に2倍に引き伸ばされて時間(t15+t16)で再生される。これにより、視差の変化量が大きかった時間t12を元動画350よりも長い再生時間で再生することにより、視差の時間当たりの変化量を低減してディスプレイ42に表示することができる。   By reproducing the corrected moving image 360 from the time t14 to the time t17 at the same frame rate, the time t12 when the amount of change in parallax in the original moving image 350 is enlarged is doubled at the time of reproduction, and the time (t15 + t16) is obtained. Played. Thereby, by reproducing the time t12 when the change amount of the parallax is large with a reproduction time longer than that of the original moving image 350, the change amount of the parallax per time can be reduced and displayed on the display 42.

以上、図1から図21の実施形態によれば、視差の時間的な変化が大きい動画に対して、視差を低減することにより、鑑賞者50が当該動画を見た場合の違和感を低減することができる。なお図1においてデジタルカメラ10とPC40とが示されているが、本実施形態はこれらの少なくとも一方に適用されればよい。   As described above, according to the embodiment shown in FIGS. 1 to 21, by reducing the parallax with respect to a moving image with a large change in parallax, it is possible to reduce discomfort when the viewer 50 views the moving image. Can do. Although the digital camera 10 and the PC 40 are shown in FIG. 1, the present embodiment may be applied to at least one of them.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   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 絞り、32 接続ケーブル、40 パーソナルコンピュータ、42 ディスプレイ、44 本体、46 キーボード、50 鑑賞者、51 右目、52 左目、55 右目用画像、56 左目用画像、57 右目用画像、58 左目用画像、100 撮像素子、110 基本格子、201 制御部、202 A/D変換回路、203 メモリ、204 駆動部、205 画像処理部、207 メモリカードIF、208 操作部、209 表示部、210 LCD駆動回路、211 AFセンサ、220 メモリカード、231 視差量算出部、232 変化量算出部、233 動画生成部、301 少年、302 少女、303 女性、304 背景、311 対象画素、312 局所ウィンドウ、314 局所ウィンドウ、313 探索画素、410 動画取得部、412 変化量算出部、414 動画補正部、416 CD−ROM、330 動画、332 フレーム、340 補正動画、342 フレーム、350 元動画、352 フレーム、360 補正動画、362 フレーム、364 補間フレーム、1804 分布曲線、1805 分布曲線、1806 合成分布曲線、1807 分布曲線、1808 分布曲線、1809 合成分布曲線 10 digital camera, 20 taking lens, 21 optical axis, 22 aperture, 32 connection cable, 40 personal computer, 42 display, 44 main body, 46 keyboard, 50 viewer, 51 right eye, 52 left eye, 55 right eye image, 56 left eye Image, 57 Right eye image, 58 Left eye image, 100 Image sensor, 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 Part, 209 display part, 210 LCD drive circuit, 211 AF sensor, 220 memory card, 231 parallax amount calculation part, 232 change amount calculation part, 233 video generation part, 301 boy, 302 girl, 303 woman, 304 background, 311 target Pixel, 312 local window, 31 4 Local window, 313 search pixel, 410 moving image acquisition unit, 412 change amount calculating unit, 414 moving image correction unit, 416 CD-ROM, 330 moving image, 332 frame, 340 corrected moving image, 342 frame, 350 original moving image, 352 frame, 360 Corrected video, 362 frames, 364 interpolation frames, 1804 distribution curve, 1805 distribution curve, 1806 composite distribution curve, 1807 distribution curve, 1808 distribution curve, 1809 composite distribution curve

Claims (11)

同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出部と、
前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成部と、
基準画像、前記基準画像に対して第1視差を有する第1視差画像、および、前記基準画像に対して前記第1視差とは反対の方向の第2視差を有する第2視差画像を取得する画像取得部と
を備え、
前記動画生成部は、対応する画素ごとに前記第1視差画像の示す視差量と前記第2視差画像の示す視差量とに基づいた視差量を前記基準画像に割り付けた、新たな一対の視差画像に基づいて前記動画を生成し、
前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて、前記第1視差画像の示す視差量の重みと前記第2視差画像の示す視差量の重みとがより近くなる前記視差量を前記基準画像に割り付ける画像処理装置。
A change amount calculation unit that obtains a disparity amount indicating disparity with respect to the same object in time series, and calculates a temporal change amount of the disparity amount; and
A moving image generating unit that generates a moving image with a reduced amount of change for at least the object when the amount of change acquired by the change amount calculating unit is greater than a threshold ;
An image for obtaining a reference image, a first parallax image having a first parallax with respect to the reference image, and a second parallax image having a second parallax in a direction opposite to the first parallax with respect to the reference image. for example Bei an acquisition unit to <br/>,
The moving image generation unit assigns a parallax amount based on the parallax amount indicated by the first parallax image and the parallax amount indicated by the second parallax image to the reference image for each corresponding pixel. To generate the video based on
The moving image generation unit weights the parallax amount indicated by the first parallax image when the change amount acquired by the change amount calculation unit is larger than a threshold value, compared to when the change amount is smaller than the threshold value. An image processing apparatus that assigns the parallax amount, which makes the weight of the parallax amount indicated by the second parallax image closer, to the reference image .
前記動画生成部は、前記変化量を前記閾値以下に低減した前記動画を生成する請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the moving image generation unit generates the moving image in which the amount of change is reduced to the threshold value or less. 前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて長い再生時間で再生される前記動画を生成する請求項2に記載の画像処理装置。 The moving image generation unit generates the moving image that is played back with a longer playback time when the change amount acquired by the change amount calculation unit is larger than a threshold value than when the change amount is smaller than the threshold value. The image processing apparatus according to claim 2 . 画像処理装置と、
入射光を電気信号に光電変換する、二次元的に配列された複数の光電変換素子、および、前記入射光の断面領域内の部分領域からの光を、対応する前記複数の光電変換素子にそれぞれ入射させる開口を設けた遮光部を有し、対象を撮影して画像を生成する撮影部と
を備え、
前記画像処理装置は、
同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出部と、
前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成部と
を有し、
前記動画生成部は、前記撮影部で時系列的に撮影した前記対象の複数の画像から前記動画を生成し、
前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて高いフレームレートで前記撮影部で撮影されて生成された複数の画像から前記動画を生成する撮影装置
An image processing device;
A plurality of two-dimensionally arranged photoelectric conversion elements that photoelectrically convert incident light into an electrical signal, and light from a partial region in a cross-sectional area of the incident light, respectively, to the corresponding plurality of photoelectric conversion elements An imaging unit having a light-shielding unit provided with an incident aperture, and imaging an object to generate an image;
With
The image processing apparatus includes:
A change amount calculation unit that obtains a disparity amount indicating disparity with respect to the same object in time series, and calculates a temporal change amount of the disparity amount; and
A moving image generating unit that generates a moving image in which at least the amount of change with respect to the target is reduced when the amount of change acquired by the amount of change calculating unit is greater than a threshold;
Have
The moving image generation unit generates the moving image from a plurality of images of the target imaged in time series by the imaging unit,
The moving image generation unit is generated when the change amount acquired by the change amount calculation unit is photographed by the photographing unit at a higher frame rate than when the change amount is smaller than the threshold value. An imaging device that generates the moving image from a plurality of images .
前記動画生成部は、前記変化量を前記閾値以下に低減した前記動画を生成する請求項4に記載の撮影装置The imaging device according to claim 4, wherein the moving image generation unit generates the moving image in which the amount of change is reduced to the threshold value or less. 前記撮影部に入射する前記入射光の周辺領域を遮光する、絞り値が可変な絞りをさらに備え、
前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて前記絞り値を大きくした状態で前記撮影部で時系列的に撮影されて生成された複数の画像から前記動画を生成する請求項4に記載の撮影装置。
Further comprising a diaphragm with a variable aperture value that shields a peripheral region of the incident light incident on the imaging unit;
When the change amount acquired by the change amount calculation unit is larger than a threshold value, the moving image generation unit increases the aperture value in a state where the aperture value is larger than when the change amount is smaller than the threshold value. The imaging device according to claim 4, wherein the moving image is generated from a plurality of images generated by time series imaging.
前記動画生成部は、前記フレームレートの情報を前記動画に対応付けて出力する請求項4から6のいずれか1項に記載の撮影装置。 The imaging device according to claim 4 , wherein the moving image generation unit outputs the frame rate information in association with the moving image. 基準画像、前記基準画像に対して第1視差を有する第1視差画像、および、前記基準画像に対して前記第1視差とは反対の方向の第2視差を有する第2視差画像を取得する画像取得部をさらに備え、
前記動画生成部は、対応する画素ごとに前記第1視差画像の示す視差量と前記第2視差画像の示す視差量とに基づいた視差量を前記基準画像に割り付けた、新たな一対の視差画像に基づいて前記動画を生成し、
前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて、前記第1視差画像の示す視差量の重みと前記第2視差画像の示す視差量の重みとがより近くなる前記視差量を前記基準画像に割り付ける請求項4に記載の撮影装置
An image for obtaining a reference image, a first parallax image having a first parallax with respect to the reference image, and a second parallax image having a second parallax in a direction opposite to the first parallax with respect to the reference image. An acquisition unit,
The moving image generation unit assigns a parallax amount based on the parallax amount indicated by the first parallax image and the parallax amount indicated by the second parallax image to the reference image for each corresponding pixel. To generate the video based on
The moving image generation unit weights the parallax amount indicated by the first parallax image when the change amount acquired by the change amount calculation unit is larger than a threshold value, compared to when the change amount is smaller than the threshold value. The imaging device according to claim 4, wherein the parallax amount that makes the weight of the parallax amount indicated by the second parallax image closer is assigned to the reference image.
前記動画生成部は、前記変化量算出部により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて長い再生時間で再生される前記動画を生成する請求項4に記載の撮影装置The moving image generation unit generates the moving image that is played back with a longer playback time when the change amount acquired by the change amount calculation unit is larger than a threshold value than when the change amount is smaller than the threshold value. The imaging device according to claim 4 . 同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出手順と、
前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成手順と、
基準画像、前記基準画像に対して第1視差を有する第1視差画像、および、前記基準画像に対して前記第1視差とは反対の方向の第2視差を有する第2視差画像を取得する画像取得手順と
を備え、
前記動画生成手順は、対応する画素ごとに前記第1視差画像の示す視差量と前記第2視差画像の示す視差量とに基づいた視差量を前記基準画像に割り付けた、新たな一対の視差画像に基づいて前記動画を生成し、
前記動画生成手順は、前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて、前記第1視差画像の示す視差量の重みと前記第2視差画像の示す視差量の重みとがより近くなる前記視差量を前記基準画像に割り付ける画像処理方法。
A change amount calculation procedure for acquiring a disparity amount indicating disparity with respect to the same object in time series, and calculating a temporal change amount of the disparity amount;
A moving image generating procedure for generating a moving image with a reduced amount of change for at least the target when the amount of change acquired by the change amount calculating procedure is greater than a threshold ;
An image for obtaining a reference image, a first parallax image having a first parallax with respect to the reference image, and a second parallax image having a second parallax in a direction opposite to the first parallax with respect to the reference image. for example Bei the acquisition procedure <br/>,
The moving image generation procedure includes a new pair of parallax images in which a parallax amount based on a parallax amount indicated by the first parallax image and a parallax amount indicated by the second parallax image is assigned to the reference image for each corresponding pixel. To generate the video based on
In the moving image generation procedure, when the change amount acquired by the change amount calculation procedure is larger than a threshold value, the weight of the parallax amount indicated by the first parallax image is larger than when the change amount is smaller than the threshold value. And an image processing method for allocating, to the reference image, the parallax amount that makes the weight of the parallax amount indicated by the second parallax image closer .
同一の対象に対する視差を示す視差量を時系列的に取得し、前記視差量の時間的な変化量を算出する変化量算出手順と、
前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、少なくとも前記対象に対する前記変化量を低減した動画を生成する動画生成手順と
基準画像、前記基準画像に対して第1視差を有する第1視差画像、および、前記基準画像に対して前記第1視差とは反対の方向の第2視差を有する第2視差画像を取得する画像取得手順と
をコンピュータに実行させ、
前記動画生成手順は、対応する画素ごとに前記第1視差画像の示す視差量と前記第2視差画像の示す視差量とに基づいた視差量を前記基準画像に割り付けた、新たな一対の視差画像に基づいて前記動画を生成し、
前記動画生成手順は、前記変化量算出手順により取得された前記変化量が閾値よりも大きい場合に、前記変化量が閾値よりも小さい場合に比べて、前記第1視差画像の示す視差量の重みと前記第2視差画像の示す視差量の重みとがより近くなる前記視差量を前記基準画像に割り付けるプログラム。
A change amount calculation procedure for acquiring a disparity amount indicating disparity with respect to the same object in time series, and calculating a temporal change amount of the disparity amount;
A moving image generating procedure for generating a moving image with a reduced amount of change for at least the object when the amount of change acquired by the change amount calculating procedure is greater than a threshold;
An image for obtaining a reference image, a first parallax image having a first parallax with respect to the reference image, and a second parallax image having a second parallax in a direction opposite to the first parallax with respect to the reference image. Let the computer execute the acquisition procedure and <br/>
The moving image generation procedure includes a new pair of parallax images in which a parallax amount based on a parallax amount indicated by the first parallax image and a parallax amount indicated by the second parallax image is assigned to the reference image for each corresponding pixel. To generate the video based on
In the moving image generation procedure, when the change amount acquired by the change amount calculation procedure is larger than a threshold value, the weight of the parallax amount indicated by the first parallax image is larger than when the change amount is smaller than the threshold value. And a program for allocating the parallax amount, which makes the weight of the parallax amount indicated by the second parallax image closer, to the reference image .
JP2012236307A 2012-10-26 2012-10-26 Image processing apparatus, photographing apparatus, image processing method, and program Active JP6070061B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012236307A JP6070061B2 (en) 2012-10-26 2012-10-26 Image processing apparatus, photographing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012236307A JP6070061B2 (en) 2012-10-26 2012-10-26 Image processing apparatus, photographing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2014086984A JP2014086984A (en) 2014-05-12
JP6070061B2 true JP6070061B2 (en) 2017-02-01

Family

ID=50789645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012236307A Active JP6070061B2 (en) 2012-10-26 2012-10-26 Image processing apparatus, photographing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6070061B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5439949B2 (en) * 2009-05-22 2014-03-12 コニカミノルタ株式会社 Stereo measurement system and video playback system
JP2011124941A (en) * 2009-12-14 2011-06-23 Mitsubishi Electric Corp Apparatus and method for producing three-dimensional video
JP2011176523A (en) * 2010-02-24 2011-09-08 Jvc Kenwood Holdings Inc Stereo video signal control method, control device, and control program
JP5368350B2 (en) * 2010-03-18 2013-12-18 富士フイルム株式会社 Stereo imaging device
WO2012039180A1 (en) * 2010-09-24 2012-03-29 富士フイルム株式会社 Image pickup device and image pickup apparatus
JP5699609B2 (en) * 2011-01-06 2015-04-15 ソニー株式会社 Image processing apparatus and image processing method
JP2012178688A (en) * 2011-02-25 2012-09-13 Olympus Corp Stereoscopic image photographing device

Also Published As

Publication number Publication date
JP2014086984A (en) 2014-05-12

Similar Documents

Publication Publication Date Title
US9118904B2 (en) Image processing apparatus, image processing method, and program for generating a three dimensional image to be stereoscopically viewed
EP2741504B1 (en) Image processing device
CN103874960B (en) Monocular stereoscopic imaging device, imaging method, and program
CN102833560A (en) Image processing apparatus, image processing method, and program
CN103493484A (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
JP2013042301A (en) Image processor, image processing method, and program
CN103733133A (en) Image capturing apparatus, method of controlling the same and program
JP2014036362A (en) Imaging device, control method therefor, and control program
JP6004741B2 (en) Image processing apparatus, control method therefor, and imaging apparatus
JP5982907B2 (en) Image processing apparatus, image processing method, and program
JP6070061B2 (en) Image processing apparatus, photographing apparatus, image processing method, and program
WO2015163350A1 (en) Image processing device, imaging device and image processing program
JP6439285B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2014085608A (en) Imaging device
JPWO2012001958A1 (en) Image processing apparatus and method, and program
JP6255753B2 (en) Image processing apparatus and imaging apparatus
JP6331279B2 (en) Imaging apparatus, imaging method, and program
JP6070060B2 (en) Imaging apparatus and program
JP2012060346A (en) Stereoscopic image photographing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160810

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161219

R150 Certificate of patent or registration of utility model

Ref document number: 6070061

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250