JP2016154360A - Imaging apparatus and control method therefor - Google Patents

Imaging apparatus and control method therefor Download PDF

Info

Publication number
JP2016154360A
JP2016154360A JP2016068031A JP2016068031A JP2016154360A JP 2016154360 A JP2016154360 A JP 2016154360A JP 2016068031 A JP2016068031 A JP 2016068031A JP 2016068031 A JP2016068031 A JP 2016068031A JP 2016154360 A JP2016154360 A JP 2016154360A
Authority
JP
Japan
Prior art keywords
image
data
parallax map
eye
eye image
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.)
Pending
Application number
JP2016068031A
Other languages
Japanese (ja)
Inventor
孝之 中▲濱▼
Takayuki Nakahama
孝之 中▲濱▼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016068031A priority Critical patent/JP2016154360A/en
Publication of JP2016154360A publication Critical patent/JP2016154360A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus and its control method that are capable of creating an image file from which an image having a correct subject shape can be reproduced in two-dimensional display and stereoscopic display.SOLUTION: An imaging element 505 includes a plurality of photoelectric conversion units that perform photoelectric conversion on light beams individually having passed through different regions in an exit pupil of an imaging optical system to output a plurality of image signals. An image combination processing circuit 513 acquires respective data on a left-eye image and right-eye image from an image signal output by the imaging element 505, and generates combined image data for two-dimensional display by performing addition combination on the left-eye image and right-eye image. A parallax map generation circuit 514 generates parallax map data from the data on the left-eye image and right-eye image. A recording medium control I/F unit 510 performs control of generating an image file including the combined image data generated by the image combination processing circuit 513 and the parallax map data generated by the parallax map generation circuit 514 in different regions inside to record the image file in a recording medium 511.SELECTED DRAWING: Figure 4

Description

本発明は、撮像装置に関し、特に立体視表示(以下、3D表示ともいう)および2次元表示(以下、2D表示ともいう)のための画像データを含む画像ファイルの記録処理に関するものである。   The present invention relates to an imaging apparatus, and more particularly to recording processing of an image file including image data for stereoscopic display (hereinafter also referred to as 3D display) and two-dimensional display (hereinafter also referred to as 2D display).

近年、3次元(3D)シネマや3Dディスプレイ等、立体映像関連機器の普及が急速に進んでいる。立体映像撮影は従来からフィルム式カメラ等でも行われてきたが、デジタル撮像装置の普及に伴い、デジタルカメラやデジタルビデオカメラ等により立体映像を生成するための元画像が撮影されるようになってきている。   In recent years, three-dimensional (3D) cinema, 3D display, and other 3D video related devices are rapidly spreading. Although stereoscopic video shooting has been conventionally performed with a film camera or the like, with the widespread use of digital imaging devices, original images for generating stereoscopic video with a digital camera, a digital video camera, and the like have been captured. ing.

立体映像をユーザが鑑賞する仕組みとしては、対象物を左目で見た像及び右目で見た像に対応するように、左右方向に視差を持たせた、右目用画像と左目用画像のデータが用意される。各画像をユーザが右目と左目でそれぞれ見ることで立体視可能である。その方法には、視差バリア方式やレンチキュラ方式等のように鑑賞対象の映像を視差分割する方法がある。また左右で特性の異なるフィルタを介して、ユーザの左目と右目に異なる映像を提示する方法等が知られている。
立体映像として鑑賞可能な画像の撮影方法として、異なる視点での画像を同時に撮影する方法が、特許文献1および2に開示されている。
As a mechanism for a user to view a stereoscopic video, right eye image data and left eye image data with parallax in the left-right direction so as to correspond to an image of an object viewed with the left eye and an image viewed with the right eye are provided. Be prepared. A user can view each image stereoscopically by looking at the right eye and the left eye. As such a method, there is a method of dividing an image to be viewed, such as a parallax barrier method or a lenticular method, into a parallax. There is also known a method for presenting different images to the left and right eyes of the user through filters having different characteristics on the left and right.
Patent Documents 1 and 2 disclose a method of simultaneously capturing images from different viewpoints as a method of capturing an image that can be viewed as a stereoscopic video.

特許文献1は、複数の微小レンズが形成され、該微小レンズの各々に近接して、対を成すフォトダイオードが1対以上配置されている固体撮像素子を開示する。フォトダイオード対のうち、一方のフォトダイオードの出力から第1の画像信号が得られ、他方のフォトダイオードの出力から第2の画像信号が得られる。第1及び第2の画像信号を、左目用画像信号、右目用画像信号としてそれぞれ用いることで、ユーザは立体映像の鑑賞が可能となる。   Patent Document 1 discloses a solid-state imaging device in which a plurality of microlenses are formed, and one or more pairs of photodiodes are arranged in proximity to each of the microlenses. A first image signal is obtained from the output of one of the photodiode pairs, and a second image signal is obtained from the output of the other photodiode. By using the first and second image signals as the left-eye image signal and the right-eye image signal, respectively, the user can view a stereoscopic video.

特許文献2は、第1の画像のそれぞれの画素に適用されるべきシフトに対応する出力値を持つ出力要素を有する出力視差マップを開示する。この出力視差マップと第1の画像とに基づいて、第2の画像を生成することができる。この計算は、入力値を持つそれぞれの入力要素を有する入力視差マップに基づいており、マルチビュー画像をレンダリングするために、入力画像と視差マップを用いて第2の画像が生成可能である。   Patent Document 2 discloses an output parallax map having an output element having an output value corresponding to a shift to be applied to each pixel of the first image. A second image can be generated based on the output parallax map and the first image. This calculation is based on an input parallax map with each input element having an input value, and a second image can be generated using the input image and the parallax map to render a multi-view image.

特開昭58−24105号公報JP-A-58-24105 特表2008−518317号公報Special table 2008-518317

立体映像として画像を鑑賞するには、上述のように、左右方向に視差を持たせた画像を、それぞれに対応するユーザの目で見る必要がある。したがって、いずれの方式にしても、左目で鑑賞するための左目用画像と、右目で鑑賞するための右目用画像が必要である。
特許文献1が開示するように、複数の微小レンズが形成され、該微小レンズの各々に近接して、対を成すフォトダイオードが1対以上配置されている固体撮像素子を用いて撮影した場合、以下のような問題がある。対をなすフォトダイオードの一方が撮像光学系の射出瞳のある領域を通過した光束を光電変換した左目用画像信号を出力し、他方が射出瞳の上記領域とは異なる領域を通過した光束を光電変換した右目用画像信号を出力する場合を想定する。この場合、被写体によっては、左目用画像、右目用画像のいずれの画像も、被写体の形状を反映した画像でないことがある。
In order to view an image as a three-dimensional video, as described above, it is necessary to view an image with parallax in the left-right direction with the corresponding user's eyes. Therefore, in either method, a left-eye image for viewing with the left eye and a right-eye image for viewing with the right eye are necessary.
As disclosed in Patent Document 1, when a plurality of microlenses are formed and imaged using a solid-state imaging device in which one or more pairs of photodiodes are arranged in proximity to each of the microlenses, There are the following problems. One of the paired photodiodes outputs a left-eye image signal obtained by photoelectrically converting the light beam that has passed through the region where the exit pupil of the imaging optical system is located, and the other photo-electrical light beam that has passed through a region different from the region of the exit pupil. Assume that the converted right-eye image signal is output. In this case, depending on the subject, both the left-eye image and the right-eye image may not be images reflecting the shape of the subject.

例えば、点光源からの光がボケたように撮影される撮影シーンにおいては、本来、円形にボケた光源の写真が撮影されるべきである。しかし、特許文献1が開示する固体撮像素子で撮影した場合、撮影される画像は、被写体の形状が反映されていない半円形や楕円形等の形状となってしまう。例えば、左目用画像における被写体は左半分が欠けており、右目用画像における被写体は右半分が欠けているというように、左目用画像と右目用画像とでは、画像として写る被写体の形状が異なって撮影される。その理由としては、撮像光学系の射出瞳から出た光束のうち、光軸を境にして、フォトダイオードが受光する光の領域が異なるためである。
このような場合、特許文献2に開示の技術を用いて前記第2の画像を計算により求めようと試みたとしても正しい被写体形状の画像は得られない。つまり、基の画像にて実際の被写体とは異なる形状に撮影されるので、計算により求めた前記第2の画像についても正しい画像として再生することはできないからである。
For example, in a shooting scene in which light from a point light source is shot in a blurred manner, a photograph of a light source that is blurred in a circular shape should be originally taken. However, when the image is captured by the solid-state imaging device disclosed in Patent Document 1, the captured image has a shape such as a semicircle or an ellipse that does not reflect the shape of the subject. For example, the subject in the left-eye image is missing the left half, and the subject in the right-eye image is missing the right half. Taken. This is because, among the light fluxes emitted from the exit pupil of the imaging optical system, the regions of the light received by the photodiodes differ from the optical axis.
In such a case, even if an attempt is made to obtain the second image by calculation using the technique disclosed in Patent Document 2, an image of the correct subject shape cannot be obtained. That is, since the original image is captured in a shape different from the actual subject, the second image obtained by calculation cannot be reproduced as a correct image.

また、視差マップを利用する場合、一般のアプリケーションで扱えるように、互換性のあるファイルフォーマットに従って画像ファイルを作成する必要がある。視差マップデータを含むファイルと画像データを含むファイルとを別々に作成した場合、複数のファイルを管理する必要が生じるので、ユーザの使い勝手を考慮すると両データを単一のファイルに内包させることが望ましい。
そこで、本発明の目的は、2次元表示および立体視表示で正しい被写体形状の画像を再生可能な画像ファイルを作成できる撮像装置とその制御方法を提供することである。
When using a parallax map, it is necessary to create an image file in accordance with a compatible file format so that it can be handled by a general application. When files containing parallax map data and files containing image data are created separately, it is necessary to manage multiple files, so it is desirable to include both data in a single file in consideration of user convenience .
Accordingly, an object of the present invention is to provide an imaging apparatus capable of creating an image file capable of reproducing an image of a correct subject shape in two-dimensional display and stereoscopic display, and a control method thereof.

上記課題を解決するために本発明に係る装置は、撮像光学系の射出瞳における異なる領域をそれぞれ通過した光束を光電変換して複数の画像信号を出力する複数の光電変換部を撮像素子が有し、該撮像素子による複数の画像信号を処理して記録媒体に記録する撮像装置であって、前記撮像素子の出力する画像信号から左目用画像と右目用画像の各データを取得して該左目用画像および右目用画像に係る加算合成によって2次元表示用の合成画像データを生成する画像合成手段と、前記左目用画像および右目用画像のデータから視差マップデータを生成する視差マップ生成手段と、前記画像合成手段が生成した合成画像データ、および前記視差マップ生成手段が生成した視差マップデータをそれぞれ異なる領域に内包する画像ファイルを作成して前記記録媒体に記録する制御を行う記録制御手段を備える。   In order to solve the above problems, an apparatus according to the present invention includes an image sensor having a plurality of photoelectric conversion units that photoelectrically convert light beams that have passed through different areas of an exit pupil of an imaging optical system and output a plurality of image signals. An image pickup apparatus that processes a plurality of image signals by the image pickup device and records the processed image signals on a recording medium, and acquires each data of a left eye image and a right eye image from an image signal output from the image pickup device, Image synthesis means for generating composite image data for two-dimensional display by addition synthesis related to the image for right and the image for right eye, and parallax map generation means for generating parallax map data from the data of the image for left eye and the image for right eye, Create image files that contain the combined image data generated by the image combining means and the disparity map data generated by the disparity map generating means in different regions. A recording control means for performing control of recording on the recording medium.

本発明によれば、2次元表示および立体視表示で正しい被写体形状の画像を再生可能な画像ファイルを作成することができる。   According to the present invention, it is possible to create an image file that can reproduce an image of a correct subject shape in two-dimensional display and stereoscopic display.

本発明の実施形態に係る撮像素子の全体構成を概略的に示す図である。1 is a diagram schematically showing an overall configuration of an image sensor according to an embodiment of the present invention. 撮像素子の画素の構成例を示す図である。It is a figure which shows the structural example of the pixel of an image pick-up element. 撮影レンズの射出瞳の異なる領域からの光が撮像素子に入射する様子を表した概念図である。It is the conceptual diagram showing a mode that the light from the area | region where the exit pupil of a photographing lens enters into an image pick-up element. 本発明の実施形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on embodiment of this invention. 視差マップの生成処理例を示す図である。It is a figure which shows the production | generation process example of a parallax map. 視差マップを模式的に示す図である。It is a figure which shows a parallax map typically. 図8ないし10と併せて本発明の第1実施形態を説明するために、ファイル構造例を模式的に示す図であるFIG. 11 is a diagram schematically showing an example of a file structure in order to explain the first embodiment of the present invention in conjunction with FIGS. 撮影シーケンス例を説明するフローチャートである。It is a flowchart explaining an imaging sequence example. ファイル作成処理例を説明するフローチャートである。It is a flowchart explaining the example of a file creation process. 視差マップ生成処理例を説明するフローチャートである。It is a flowchart explaining the example of a parallax map production | generation process. 第2実施形態におけるファイル構造例を模式的に示す図である。It is a figure which shows typically the file structure example in 2nd Embodiment. 第2実施形態における視差マップ生成処理例を説明するフローチャートである。It is a flowchart explaining the example of a parallax map generation process in 2nd Embodiment. 第3実施形態におけるファイル構造例を模式的に示す図である。It is a figure which shows the example of a file structure in 3rd Embodiment typically. 第3実施形態における視差マップ生成処理例を説明するフローチャートである。It is a flowchart explaining the example of a parallax map generation process in 3rd Embodiment.

以下、図面を参照して本発明の各実施形態を説明する。
図1は、本発明の実施形態の撮像装置に適用する撮像素子の構成例を概略的に示す図である。撮像素子100は、画素アレイ101と、画素アレイ101における行を選択する垂直選択回路102と、画素アレイ101における列を選択する水平選択回路104を含む。読み出し回路103は、画素アレイ101中の画素のうち垂直選択回路102によって選択される画素の信号を読み出す。読み出し回路103は、信号を蓄積するメモリ、ゲインアンプ、AD変換器等を列毎に有する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram schematically illustrating a configuration example of an imaging element applied to an imaging apparatus according to an embodiment of the present invention. The image sensor 100 includes a pixel array 101, a vertical selection circuit 102 that selects a row in the pixel array 101, and a horizontal selection circuit 104 that selects a column in the pixel array 101. The readout circuit 103 reads out the signal of the pixel selected by the vertical selection circuit 102 among the pixels in the pixel array 101. The reading circuit 103 includes a memory for accumulating signals, a gain amplifier, an AD converter, and the like for each column.

シリアルインターフェース(SI)部105は、各回路の動作モード等を外部回路からの指示に従って決定する。垂直選択回路102は、画素アレイ101の複数の行を順次選択し、読み出し回路103に画素信号を取り出す。また水平選択回路104は、読み出し回路103によって読み出された複数の画素信号を列毎に順次選択する。なお、撮像素子100は、図1に示す構成要素以外に、例えば、垂直選択回路102、水平選択回路104、読み出し回路103等にタイミング信号を提供するタイミングジェネレータや、制御回路等が存在するが、これらの詳細な説明は省略する。   The serial interface (SI) unit 105 determines an operation mode of each circuit according to an instruction from an external circuit. The vertical selection circuit 102 sequentially selects a plurality of rows in the pixel array 101 and extracts pixel signals to the readout circuit 103. The horizontal selection circuit 104 sequentially selects a plurality of pixel signals read by the reading circuit 103 for each column. In addition to the components shown in FIG. 1, the image sensor 100 includes, for example, a timing generator that provides a timing signal to the vertical selection circuit 102, the horizontal selection circuit 104, the readout circuit 103, a control circuit, and the like. These detailed explanations are omitted.

図2は、撮像素子100の画素の構成例を示す図である。図2(A)は1画素の構成を概略的に示す。図2(B)は画素アレイ101の配置を示す。図2(A)に示す画素201は、光学素子としてのマイクロレンズ202と、受光素子としての複数のフォトダイオード(以下、PDと略記する)を有する。   FIG. 2 is a diagram illustrating a configuration example of pixels of the image sensor 100. FIG. 2A schematically shows the configuration of one pixel. FIG. 2B shows the arrangement of the pixel array 101. A pixel 201 illustrated in FIG. 2A includes a microlens 202 as an optical element and a plurality of photodiodes (hereinafter abbreviated as PD) as light receiving elements.

図2(A)には、1画素に左側のPD203と右側のPD204の2個を設けた例を示すが、3個以上(例えば、4個または9個)のPDを用いてもよい。PD203は、受光した光束を光電変換して左目用画像信号を出力する。PD204は、受光した光束を光電変換して右目用画像信号を出力する。なお、画素201は、図示の構成要素以外にも、例えば、PD信号を読み出し回路103に取り出す画素増幅アンプや、行選択スイッチ、PD信号のリセットスイッチ等を備える。   FIG. 2A illustrates an example in which two pixels, the left PD 203 and the right PD 204, are provided in one pixel, but three or more (for example, four or nine) PDs may be used. The PD 203 photoelectrically converts the received light beam and outputs a left-eye image signal. The PD 204 photoelectrically converts the received light beam and outputs a right-eye image signal. The pixel 201 includes, for example, a pixel amplification amplifier that extracts a PD signal to the readout circuit 103, a row selection switch, a PD signal reset switch, and the like in addition to the illustrated components.

画素アレイ101は2次元画像を提供するため、図2(B)に示す複数の画素301から304のように、2次元アレイ状に配列して構成される。PD301L、302L、303L、304Lは、図2(A)中のPD203に相当する。また、PD301R、302R、303R、304Rは、図2(A)中のPD204に相当する。すなわち、本実施形態に用いる撮像素子は、各々が、左目用画像信号を出力する第1の光電変換部(PD203)と、右目用画像信号を出力する第2の光電変換部(PD204)とを有する複数の画素部を備える。複数の光電変換部を有する画素部は水平方向および垂直方向に並べて配置される。   In order to provide a two-dimensional image, the pixel array 101 is configured by arranging in a two-dimensional array like a plurality of pixels 301 to 304 shown in FIG. The PDs 301L, 302L, 303L, and 304L correspond to the PD 203 in FIG. PDs 301R, 302R, 303R, and 304R correspond to the PD 204 in FIG. That is, the image sensor used in the present embodiment includes a first photoelectric conversion unit (PD 203) that outputs a left-eye image signal and a second photoelectric conversion unit (PD 204) that outputs a right-eye image signal. A plurality of pixel portions. Pixel portions having a plurality of photoelectric conversion portions are arranged side by side in the horizontal direction and the vertical direction.

次に、図2(B)に示す画素構成を有する撮像素子100の受光について説明する。図3は、1つの光学素子(マイクロレンズ)に対して、撮影レンズの射出瞳の異なる領域を通過した光束が撮像素子100に入射する様子を表した概念図である。
画素アレイ101は、マイクロレンズ202と、カラーフィルタ403と、PD404および405を有する。PD404、PD405は、図2(A)中のPD203、PD204にそれぞれ相当する。
Next, light reception of the imaging element 100 having the pixel configuration illustrated in FIG. FIG. 3 is a conceptual diagram showing a state in which a light beam that has passed through different regions of the exit pupil of the photographing lens is incident on the image sensor 100 with respect to one optical element (microlens).
The pixel array 101 includes a microlens 202, a color filter 403, and PDs 404 and 405. PD 404 and PD 405 correspond to PD 203 and PD 204 in FIG.

図3において、マイクロレンズ202に対して、撮影レンズの射出瞳406から出た光束の中心を光軸409とする。射出瞳406から出た光は、光軸409を中心として撮像素子100に入射する。一部領域407、408は、撮影レンズの射出瞳406の領域である。光線410、411は、一部領域407を通過する光の最外周の光線である。光線412、413は、一部領域408を通過する光の最外周の光線である。
射出瞳406から出る光束のうち、光軸409を境界線として、図3の上側の光束はPD405に入射し、下側の光束はPD404に入射する。つまり、PD404とPD405は、各々、撮像光学系の射出瞳の異なる領域からの光束を受光する。このように各受光素子は射出瞳での異なる領域の光を検出するため、点光源からの光が暈けた状態で撮影される状況では、それぞれに異なった形状の撮影画像が得られることになる。
In FIG. 3, the center of the light beam emitted from the exit pupil 406 of the photographing lens with respect to the microlens 202 is an optical axis 409. The light emitted from the exit pupil 406 enters the image sensor 100 with the optical axis 409 as the center. Partial areas 407 and 408 are areas of the exit pupil 406 of the photographing lens. Light rays 410 and 411 are the outermost light rays of the light passing through the partial region 407. Light rays 412 and 413 are the outermost light rays of the light passing through the partial region 408.
Among the light beams emitted from the exit pupil 406, with the optical axis 409 as a boundary line, the upper light beam in FIG. 3 is incident on the PD 405, and the lower light beam is incident on the PD 404. That is, PD 404 and PD 405 each receive light beams from different regions of the exit pupil of the imaging optical system. In this way, each light receiving element detects light in a different region at the exit pupil, and therefore, in a situation where light is taken from a point light source, photographed images having different shapes can be obtained. .

図4は、本実施形態の撮像装置の構成例を示す図である。図4を参照して、図1に示す撮像素子100をデジタルカメラへ適用した例について説明する。
撮像光学系を構成するレンズ部501は、被写体からの光を撮像素子505に結像する。撮像素子505は、図1に示す撮像素子100に相当し、図2(B)に示す画素構成を有する。レンズ駆動装置502は、ズーム制御、フォーカス制御、絞り制御等を行う。メカニカルシャッタ503は、シャッタ駆動装置504によって制御される。撮像素子505は、レンズ部501により結像した被写体像を画像信号に変換する。撮像信号処理回路506は、撮像素子505の出力する画像信号に対して各種の処理(画素補間処理や色変換処理等)や補正を行う。タイミング発生部507は、撮像素子505や撮像信号処理回路506に必要なタイミング信号を出力する。
FIG. 4 is a diagram illustrating a configuration example of the imaging apparatus according to the present embodiment. An example in which the image sensor 100 shown in FIG. 1 is applied to a digital camera will be described with reference to FIG.
The lens unit 501 constituting the imaging optical system forms an image of light from the subject on the imaging element 505. The imaging element 505 corresponds to the imaging element 100 illustrated in FIG. 1 and has a pixel configuration illustrated in FIG. The lens driving device 502 performs zoom control, focus control, aperture control, and the like. The mechanical shutter 503 is controlled by a shutter driving device 504. The image sensor 505 converts the subject image formed by the lens unit 501 into an image signal. The imaging signal processing circuit 506 performs various processing (pixel interpolation processing, color conversion processing, etc.) and correction on the image signal output from the imaging element 505. The timing generator 507 outputs a timing signal necessary for the image sensor 505 and the image signal processing circuit 506.

システム制御部509は各種演算を行い、撮像装置全体を制御する制御手段であり、不図示のCPU(中央演算処理装置)がプログラムを解釈して実行することで各種の処理を行う。なお、システム制御部509は、左目用画像と右目用画像の各データを比較し、位相差検出を行ってAF(オートフォーカス)制御を行うことができる。   A system control unit 509 is a control unit that performs various calculations and controls the entire imaging apparatus, and performs various processes by interpreting and executing a program by a CPU (central processing unit) (not shown). Note that the system control unit 509 can perform AF (autofocus) control by comparing each data of the left-eye image and the right-eye image and detecting a phase difference.

メモリ部508は、画像データを一時的に記憶するメモリを備える。記録制御を行う記録媒体制御インターフェース部(以下、I/F部と略記する)510は、記録媒体511に画像データや後述の視差マップデータ等を記録し、または読み出すために設けられる。撮像装置に着脱可能な記録媒体511は、半導体メモリ等である。外部I/F部512は、コンピュータ機器等の外部装置との間でデータを送受し、ユーザは画像加工を行うことができる。また外部I/F部512に接続された不図示の操作部を用いて、ユーザはデジタルカメラに対する操作を行うことができる。   The memory unit 508 includes a memory that temporarily stores image data. A recording medium control interface unit (hereinafter abbreviated as I / F unit) 510 that performs recording control is provided for recording or reading image data, parallax map data described later, and the like on the recording medium 511. The recording medium 511 that can be attached to and detached from the imaging apparatus is a semiconductor memory or the like. The external I / F unit 512 transmits and receives data to and from an external device such as a computer device, and the user can perform image processing. Further, the user can operate the digital camera using an operation unit (not shown) connected to the external I / F unit 512.

画像合成回路513は撮像素子505から出力された画像データについて画素毎に加算平均処理を行い、また必要なPD信号のみを取得する処理を行う。図2を例にすると、各PDから出力される画素信号301L、301R、302L、302R、303L、303R、304L、304Rに対し、左側PDの出力のみを取り出したものを、(301L,302L,303L,304L)とする。また、右側PDの出力のみを取り出したもの(301R,302R,303R,304R)とする。左側PDおよび右側PDの各出力を加算平均した、((301L+301R)/2,(302L+302R)/2,(303L+303R)/2,(304L+304R)/2)から、合成画像データが作成される。   The image composition circuit 513 performs an addition averaging process on the image data output from the image sensor 505 for each pixel and performs a process of acquiring only a necessary PD signal. Taking FIG. 2 as an example, for the pixel signals 301L, 301R, 302L, 302R, 303L, 303R, 304L, and 304R output from each PD, only the output of the left PD is extracted (301L, 302L, and 303L). 304L). Further, it is assumed that only the output of the right PD is taken out (301R, 302R, 303R, 304R). Composite image data is created from ((301L + 301R) / 2, (302L + 302R) / 2, (303L + 303R) / 2, (304L + 304R) / 2) obtained by averaging the outputs of the left PD and right PD.

視差マップ生成回路514は、合成画像における被写体像の位置を基準とした左目用画像/右目用画像の位置ずれ量を視差量として算出する。算出した視差量に関する情報は視差マップとしてメモリ部508に記憶される。圧縮伸長回路515は、メモリ部508に記憶した画像データを所定の画像圧縮方法(例えば、適応離散コサイン変換(ADCT)等)に従って画像圧縮する。また、圧縮伸長回路515は、画像圧縮された画像データをメモリ部508に書き込む機能、及びメモリ部508から読み出した画像データを伸長してメモリ部508に書き込む機能を有する。   The parallax map generation circuit 514 calculates the amount of positional deviation between the left-eye image / right-eye image based on the position of the subject image in the composite image as the parallax amount. Information on the calculated amount of parallax is stored in the memory unit 508 as a parallax map. The compression / decompression circuit 515 compresses the image data stored in the memory unit 508 according to a predetermined image compression method (for example, adaptive discrete cosine transform (ADCT)). The compression / decompression circuit 515 has a function of writing image data that has been compressed into the memory unit 508, and a function of expanding image data read from the memory unit 508 and writing it into the memory unit 508.

表示部516は、表示制御回路517からの表示用データに従って、各種情報や撮影画像を表示する。表示制御回路517は2次元表示用の画像データを表示するための表示制御や、立体視表示で画像データを表示するための表示制御を行う。   The display unit 516 displays various information and captured images in accordance with display data from the display control circuit 517. A display control circuit 517 performs display control for displaying image data for two-dimensional display and display control for displaying image data in stereoscopic display.

次に、撮影時のデジタルカメラの動作について説明する。
撮像装置のメイン電源が投入されると、制御系回路部の電源がオン状態となり、更に撮像信号処理回路506等の撮像処理系回路の電源がオン状態となる。ユーザが図示しないレリーズボタンを操作すると、システム制御部509が撮像素子505からのデータに基づいて、焦点状態検出に係る演算を行い、撮像装置から被写体までの距離を算出する。その後、レンズ駆動装置502がレンズ部501の可動レンズを駆動し、システム制御部509は、合焦状態であるか否かを判定する。
Next, the operation of the digital camera at the time of shooting will be described.
When the main power supply of the image pickup apparatus is turned on, the power supply of the control system circuit unit is turned on, and the power supply of the image pickup processing system circuit such as the image pickup signal processing circuit 506 is turned on. When the user operates a release button (not shown), the system control unit 509 performs a calculation related to focus state detection based on data from the image sensor 505, and calculates a distance from the imaging device to the subject. Thereafter, the lens driving device 502 drives the movable lens of the lens unit 501, and the system control unit 509 determines whether or not it is in focus.

システム制御部509は、合焦状態でないと判定した場合、再びレンズ部501の駆動制御により、焦点状態の検出処理を実行する。なお、被写体までの距離を求める演算については、撮像素子505による撮像データから算出する方法以外に、図示しない測距専用装置を用いて行う方法でも構わない。システム制御部509は、合焦状態と判定した後に撮影動作を開始させる。撮影動作が終了すると、撮像信号処理回路506は撮像素子505が出力した画像信号を処理し、システム制御部509は画像データをメモリ部508に書き込む制御を行う。   If the system control unit 509 determines that it is not in focus, the system control unit 509 executes focus state detection processing again by driving control of the lens unit 501. Note that the calculation for obtaining the distance to the subject may be a method using a dedicated distance measuring device (not shown) in addition to the method of calculating from the imaging data by the imaging element 505. The system control unit 509 starts the photographing operation after determining the focused state. When the photographing operation is completed, the imaging signal processing circuit 506 processes the image signal output from the imaging element 505, and the system control unit 509 performs control to write image data in the memory unit 508.

撮像素子505が出力する撮像データについては、複数のPDからの画像信号として出力される。図2(B)に示す例では、PD301L、301R、302L、302R、303L、303R、304L、304Rの順に画像信号が出力される。撮像信号処理回路506は、撮像素子505の出力する撮像データを左目用画像データと右目用画像データに振り分けて画像処理を行う。左目用画像データは、図2(B)における左側PD301L、302L、303L、304L等の出力のみを選択して処理した結果得られる画像データである。また、右目用画像データは、図2(B)における右側PD301R、302R、303R、304R等の出力のみを選択して処理した結果得られる画像データである。左目用画像データと右目用画像データとは、別々にメモリ部508に保持される。   The imaging data output by the imaging element 505 is output as image signals from a plurality of PDs. In the example shown in FIG. 2B, image signals are output in the order of PDs 301L, 301R, 302L, 302R, 303L, 303R, 304L, and 304R. The imaging signal processing circuit 506 performs image processing by sorting imaging data output from the imaging element 505 into left-eye image data and right-eye image data. The left-eye image data is image data obtained as a result of selecting and processing only the outputs of the left PD 301L, 302L, 303L, 304L, etc. in FIG. The right-eye image data is image data obtained as a result of selecting and processing only the outputs of the right PD 301R, 302R, 303R, 304R, etc. in FIG. The left-eye image data and the right-eye image data are held in the memory unit 508 separately.

画像合成回路513は、メモリ部508に保持した左目用画像と右目用画像の各データを読み出して合成画像データを生成する。生成された合成画像データはメモリ部508に格納される。画像合成回路513によって実行される画像処理は、左目用画像と右目用画像について画素毎の加算平均値を算出する処理である。従って、この画像処理によって生成される合成画像は、被写体の形状を反映した画像となる。つまり、撮像素子505にて、左目用画像と右目用画像とで被写体の形状が異なって撮影された場合でも、画像合成回路513の画像処理によって被写体像の形状が補間されるため、正しい形状の画像データが生成される。例えば、被写体の形状が円形状であって、左目用画像と右目用画像では円形状でない場合でも、合成画像では被写体の形状と同じ円形状となる。   The image composition circuit 513 reads the left eye image data and the right eye image data held in the memory unit 508 and generates composite image data. The generated composite image data is stored in the memory unit 508. The image processing executed by the image composition circuit 513 is a process of calculating an addition average value for each pixel for the left-eye image and the right-eye image. Therefore, the composite image generated by this image processing is an image reflecting the shape of the subject. That is, even when the imaging element 505 captures the subject image in the left-eye image and the right-eye image differently, the shape of the subject image is interpolated by the image processing of the image composition circuit 513, so that the correct shape is obtained. Image data is generated. For example, even when the shape of the subject is circular and the left-eye image and the right-eye image are not circular, the composite image has the same circular shape as the subject.

次に、視差マップ生成回路514が視差マップを生成して、メモリ部508に視差マップデータを記憶する。視差マップ生成回路514は、合成画像の位置を基準とした左目用画像/右目用画像の位置ずれ量を視差量として、視差マップを生成する。   Next, the parallax map generation circuit 514 generates a parallax map and stores the parallax map data in the memory unit 508. The parallax map generation circuit 514 generates a parallax map using the amount of positional deviation between the left-eye image / right-eye image based on the position of the composite image as a parallax amount.

図5は、視差マップの生成処理例を示す図である。図5(A)中の符号601は、被写体を撮影して得られる構図を示す。符号602、603、604はそれぞれ被写体を示す。図5(A)中に示す構図では、被写体602、603、604は、この順に上から並んでいる。また、被写体は、図5(C)に示すように、奥行き方向に並んで配置されている。符号604がカメラから最も近い被写体を示し、符号602が最も遠い被写体を示す。
図5(B)は、図5(A)に示す構図を撮影して得られるステレオ画像を示す。画像605は左目用画像を示し、画像606は右目用画像を示す。左目用画像605には、被写体602、603、604が、それぞれ、607L、608L、609Lとして示される。右目用画像606には、被写体602、603、604が、それぞれ、607R、608R、609Rとして示される。
FIG. 5 is a diagram illustrating an example of a disparity map generation process. Reference numeral 601 in FIG. 5A indicates a composition obtained by photographing a subject. Reference numerals 602, 603, and 604 denote subjects. In the composition shown in FIG. 5A, the subjects 602, 603, and 604 are arranged in this order from the top. In addition, the subject is arranged side by side in the depth direction as shown in FIG. Reference numeral 604 indicates a subject closest to the camera, and reference numeral 602 indicates a subject farthest from the camera.
FIG. 5B shows a stereo image obtained by photographing the composition shown in FIG. An image 605 shows a left-eye image, and an image 606 shows a right-eye image. In the left-eye image 605, subjects 602, 603, and 604 are shown as 607L, 608L, and 609L, respectively. In the right-eye image 606, subjects 602, 603, and 604 are shown as 607R, 608R, and 609R, respectively.

左目用画像605における被写体像と右目用画像606における被写体像との間には、位置ずれがある。本実施形態では、両者間の位置ずれの量を視差量と定義する。符号610は、被写体602の左目用画像605における位置を基準とする、右目用画像606における位置のずれ量、つまり607Lと607Rとの間の視差量を示す。同様に、符号611は、被写体604の左目用画像605における位置を基準とする、右目用画像606における位置のずれ量、つまり609Lと609Rとの間の視差量を示す。被写体603については、左目用画像605における位置と右目用画像606における位置とが同じである。すなわち、被写体603については、視差量がゼロである。   There is a positional deviation between the subject image in the left-eye image 605 and the subject image in the right-eye image 606. In this embodiment, the amount of positional deviation between the two is defined as the amount of parallax. Reference numeral 610 indicates a positional shift amount in the right-eye image 606 based on the position of the subject 602 in the left-eye image 605, that is, a parallax amount between 607L and 607R. Similarly, reference numeral 611 indicates a positional shift amount in the right-eye image 606 with reference to the position of the subject 604 in the left-eye image 605, that is, a parallax amount between 609L and 609R. For the subject 603, the position in the left-eye image 605 and the position in the right-eye image 606 are the same. That is, for the subject 603, the parallax amount is zero.

視差マップ生成回路514は、まず、公知のパターンマッチング法を用いて、左目用画像605と右目用画像606に含まれる被写体を検知する。視差マップ生成回路514は、検知した被写体毎に以下の処理を実行する。
視差マップ生成回路514は、左目用画像605、右目用画像606における被写体像の重心間の中点から、左目用画像605における被写体像の重心までの位置ずれ量を視差量として算出する。言い換えると、視差マップ生成回路514は、左目用画像605と右目用画像606とに基づいて生成された合成画像における被写体像の重心の位置を基準とした、左目用画像における当該被写体の重心の位置ずれ量を視差量として算出する。算出される視差量は、左目用画像に対応する視差量である。もちろん、視差マップ生成回路514が、合成画像における被写体像の重心の位置を基準とした、右目用画像における当該被写体像の重心の位置ずれ量を、右目用画像に対応する視差量として算出してもよい。
First, the parallax map generation circuit 514 detects subjects included in the left-eye image 605 and the right-eye image 606 using a known pattern matching method. The parallax map generation circuit 514 executes the following processing for each detected subject.
The parallax map generation circuit 514 calculates a positional deviation amount from the midpoint between the centroids of the subject images in the left-eye image 605 and the right-eye image 606 to the centroid of the subject image in the left-eye image 605 as a parallax amount. In other words, the parallax map generation circuit 514 uses the position of the center of gravity of the subject image in the composite image generated based on the left-eye image 605 and the right-eye image 606 as a reference, and the position of the center of gravity of the subject in the left-eye image. The deviation amount is calculated as the parallax amount. The calculated amount of parallax is the amount of parallax corresponding to the image for the left eye. Of course, the parallax map generation circuit 514 calculates the displacement amount of the center of gravity of the subject image in the right-eye image based on the position of the center of gravity of the subject image in the composite image as a parallax amount corresponding to the right-eye image. Also good.

図5(B)に示す例では、被写体602については、視差マップ生成回路514は、視差量610の半分の量である視差量612を算出する。また、被写体604については、視差マップ生成回路514は、視差量611の半分の量である視差量613を算出する。視差マップ生成回路514は、算出した視差量612、613に関する情報と、当該視差量の基準となる画像の位置情報を視差マップとしてメモリ部508に記憶する。この例では、視差量の基準となる画像の位置情報は、合成画像における被写体像の重心を示す。なお、上述したように、図5(B)に示す例では、被写体603については視差量がゼロである。   In the example illustrated in FIG. 5B, for the subject 602, the parallax map generation circuit 514 calculates a parallax amount 612 that is half of the parallax amount 610. For the subject 604, the parallax map generation circuit 514 calculates a parallax amount 613 that is half the parallax amount 611. The parallax map generation circuit 514 stores information regarding the calculated parallax amounts 612 and 613 and position information of an image serving as a reference for the parallax amount in the memory unit 508 as a parallax map. In this example, the position information of the image serving as a reference for the amount of parallax indicates the center of gravity of the subject image in the composite image. As described above, in the example illustrated in FIG. 5B, the parallax amount is zero for the subject 603.

図6は、視差マップを模式的に例示した図である。視差マップ621は、視差量622と、視差量の基準となる画像の位置(重心)の情報623を含む。   FIG. 6 is a diagram schematically illustrating a parallax map. The parallax map 621 includes a parallax amount 622 and information 623 on the position (center of gravity) of the image serving as a reference for the parallax amount.

次に、視差マップを用いた画像の再生処理について説明する。
システム制御部509は、メモリ部508から合成画像データと視差マップデータを読み出す。システム制御部509は、視差マップデータが示す視差量の基準となる画像の位置が、合成画像における被写体像の重心であることを確認する。そして、システム制御部509は、合成画像における被写体像を当該視差マップデータが示す視差量の分だけシフトさせることによって、再生対象の左目用画像すなわち視差量に対応する画像の再生用データを生成する。
Next, an image reproduction process using a parallax map will be described.
The system control unit 509 reads the composite image data and the parallax map data from the memory unit 508. The system control unit 509 confirms that the position of the image serving as the reference of the parallax amount indicated by the parallax map data is the center of gravity of the subject image in the composite image. Then, the system control unit 509 shifts the subject image in the composite image by the amount of parallax indicated by the parallax map data, thereby generating the left-eye image to be reproduced, that is, the reproduction data of the image corresponding to the parallax amount. .

また、システム制御部509は視差マップデータが示す視差量の符号を反転させる。システム制御部509は、視差マップが示す視差量の符号を反転させて得られる視差量を、合成画像における当該被写体像の重心を基準とする右目用画像における当該被写体の重心の位置ずれ量とする。そして、システム制御部509は、合成画像における被写体像を、当該視差マップデータが示す視差量の符号を反転させて得られる視差量の分だけシフトさせる。これによって、再生対象の右目用画像すなわち視差マップデータが示す視差量に対応する画像以外の画像の再生用データが生成される。   Also, the system control unit 509 inverts the sign of the amount of parallax indicated by the parallax map data. The system control unit 509 uses the parallax amount obtained by inverting the sign of the parallax amount indicated by the parallax map as the positional deviation amount of the center of gravity of the subject in the image for the right eye with reference to the center of gravity of the subject image in the composite image. . Then, the system control unit 509 shifts the subject image in the composite image by the amount of parallax obtained by inverting the sign of the parallax amount indicated by the parallax map data. As a result, the right-eye image to be reproduced, that is, reproduction data for an image other than the image corresponding to the parallax amount indicated by the parallax map data is generated.

なお、合成画像における被写体像のシフトによって、当該被写体像が配置されていた位置の画素は、欠落画素となる。システム制御部509は、例えば、下記の参考文献1に記載されている技術を用いて、この欠落画素に色空間情報を付与する。すなわち、システム制御部509は、欠落画素の近傍の画素の画素値の平均値を色空間情報として算出し、算出した色空間情報を欠落画素に付与する。
参考文献1:特許第3524147号公報
Note that the pixel at the position where the subject image is arranged becomes a missing pixel due to the shift of the subject image in the composite image. The system control unit 509 assigns color space information to the missing pixels using, for example, a technique described in Reference Document 1 below. That is, the system control unit 509 calculates the average value of the pixel values of the pixels near the missing pixel as color space information, and gives the calculated color space information to the missing pixel.
Reference 1: Japanese Patent No. 3524147

以上のように本実施形態の撮像装置は、左目用画像と右目用画像を合成して、被写体の形状が反映された合成画像を生成し、該合成画像での位置を基準とする視差量に関する情報を視差マップデータとして生成する。メモリ部508には、左目用画像データと右目用画像データ、さらに画像合成回路513によって生成された合成画像データと、視差マップ生成回路514によって生成された視差マップデータが記憶される。   As described above, the imaging apparatus according to the present embodiment combines the left-eye image and the right-eye image to generate a composite image that reflects the shape of the subject, and relates to the amount of parallax based on the position in the composite image. Information is generated as parallax map data. The memory unit 508 stores left-eye image data and right-eye image data, combined image data generated by the image combining circuit 513, and disparity map data generated by the disparity map generating circuit 514.

合成画像データと、視差マップデータが示す視差量に基づいて、再生対象の左目用画像データおよび右目用画像データが生成される。従って、撮影光学系の射出瞳の異なる領域を通過した光束の光電変換によって得られる左目用画像、右目用画像での形状が被写体形状と異なる場合であっても、画像の再生時には被写体の形状を反映した正しい画像を再生できる。   Based on the composite image data and the parallax amount indicated by the parallax map data, the left-eye image data and the right-eye image data to be reproduced are generated. Therefore, even when the shape of the image for the left eye and the image for the right eye obtained by photoelectric conversion of the light beam that has passed through different areas of the exit pupil of the photographing optical system is different from the subject shape, the shape of the subject is changed during image reproduction. The reflected correct image can be played back.

[第1実施形態]
次に、本発明の第1実施形態における画像データのファイル構造について図7を参照して説明する。
図7は、視差マップを含む、DCF規格に準拠した画像ファイルを作成した場合の構造例を示す。なお、DCF(Design rule for Camera File system)とは、デジタルカメラにおいて画像データを共通の仕様で扱うための画像ファイル形式である。画像ファイル6000は、DCFヘッダ部6003、サムネイル画像部6004、JPEG画像部6005、視差マップ部6006で構成されている。JPEGは、“Joint Photographic Experts Group”の略号である。
[First Embodiment]
Next, the file structure of the image data in the first embodiment of the present invention will be described with reference to FIG.
FIG. 7 shows an example of the structure when an image file compliant with the DCF standard including a parallax map is created. DCF (Design Rule for Camera File System) is an image file format for handling image data with a common specification in a digital camera. The image file 6000 includes a DCF header portion 6003, a thumbnail image portion 6004, a JPEG image portion 6005, and a parallax map portion 6006. JPEG is an abbreviation for “Joint Photographic Experts Group”.

DCF画像データ部6001は、DCFヘッダ部6003、サムネイル画像部6004、JPEG画像部6005を含む。DCFヘッダ部6003はDCFヘッダ情報を格納する領域であって、予め所定のデータサイズが与えられている。DCFヘッダ情報には、以下の付帯情報、および各画像データを格納する領域を特定するためのオフセット情報が含まれる(括弧内は符号を示す)。
・メタデータA(6007):JPEG画像部6005に格納される画像データに関連する撮影情報やパラメータ等。
・オフセット値B(6008):サムネイル画像部6004の先頭位置までのオフセットデータ。
・オフセット値C(6009):JPEG画像部6005の先頭位置までのオフセットデータ。
・オフセット値D(6010):視差マップ部6006の先頭位置までのオフセットデータ。
オフセット値B、C、DはDCFヘッダ部6003の基準位置から算出される各画像部までの相対位置情報であり、これらの値により画像ファイル内における各画像データの開始位置が特定される。
The DCF image data portion 6001 includes a DCF header portion 6003, a thumbnail image portion 6004, and a JPEG image portion 6005. The DCF header portion 6003 is an area for storing DCF header information, and is given a predetermined data size in advance. The DCF header information includes the following supplementary information and offset information for specifying an area for storing each image data (indicated by a sign in parentheses).
Metadata A (6007): shooting information and parameters related to image data stored in the JPEG image portion 6005.
Offset value B (6008): Offset data up to the top position of the thumbnail image portion 6004.
Offset value C (6009): Offset data up to the top position of the JPEG image portion 6005.
Offset value D (6010): Offset data up to the top position of the parallax map portion 6006.
The offset values B, C, and D are relative position information from the reference position of the DCF header portion 6003 to each image portion, and the start position of each image data in the image file is specified by these values.

サムネイル画像部6004は、JPEG画像部6005に格納されているJPEG画像データ等を間引いてリサイズ処理したサムネイル画像データを格納する領域である。サムネイル画像データは、例えば、表示部516の画面上に複数枚の縮小画像表示(インデックス表示)を行う際等に利用される。   The thumbnail image portion 6004 is an area for storing thumbnail image data that has been resized by thinning out the JPEG image data stored in the JPEG image portion 6005. The thumbnail image data is used, for example, when displaying a plurality of reduced images (index display) on the screen of the display unit 516.

JPEG画像部6005は、RAW画像データを撮像信号処理回路506で処理した後、圧縮して得たJPEG画像データを格納する領域である。RAW画像とは、撮像素子による各画素のデータから得られる画像であって、画像加工前、つまり現像処理等を行う前の画像を意味する。JPEG画像データは、多くのアプリケーションで扱うことが可能なデータであり、本実施形態では右目用画像と左目用画像を合成したJPEG画像のデータが格納される。両画像を加算合成することでJPEG画像部6005のデータは2D表示用として正しい被写体形状の画像を再生できる。なお、加算合成には加算平均処理も含むものとする。さらに視差マップを用いることで左目用画像、右目用画像を復元でき、3D表示用としても再生できる画像データが得られる。
視差マップ部6006は、JPEG画像部6005の画像データに係る視差量を格納する領域である。視差量は前記の方法により算出される。
The JPEG image portion 6005 is an area for storing JPEG image data obtained by processing RAW image data with the imaging signal processing circuit 506 and then compressing it. The RAW image is an image obtained from the data of each pixel by the image sensor, and means an image before image processing, that is, before performing development processing or the like. JPEG image data is data that can be handled by many applications, and in the present embodiment, JPEG image data obtained by combining a right-eye image and a left-eye image is stored. By adding and synthesizing both images, the data of the JPEG image portion 6005 can be reproduced as a correct subject shape for 2D display. Note that the addition synthesis includes addition averaging processing. Further, by using the parallax map, the image for the left eye and the image for the right eye can be restored, and image data that can be reproduced for 3D display can be obtained.
The parallax map unit 6006 is an area for storing a parallax amount related to the image data of the JPEG image unit 6005. The amount of parallax is calculated by the above method.

次に、本実施形態における画像ファイルの記録動作について、図8を参照して説明する。図8は、撮影開始から記録媒体511に画像ファイルを記録するまでの一連のシーケンスを説明するフローチャートである。以下では、撮影前に予め撮影者が、3D撮影を行う設定を行っている場合と、そうでない場合の処理について説明する。   Next, an image file recording operation in the present embodiment will be described with reference to FIG. FIG. 8 is a flowchart for explaining a series of sequences from the start of shooting to recording of an image file on the recording medium 511. In the following, a case where the photographer has made a setting for performing 3D photographing before photographing and a case where this is not the case will be described.

S6101では、図5で説明したように、不図示のレリーズボタンのユーザ操作に応答して、AF(オートフォーカス)処理、AE(自動露出)処理、露光処理までの一連の撮影処理が行われる。次のS6102では、視差マップを含む画像ファイル、または視差マップを含まない画像ファイルの作成処理が行われ、作成された画像ファイルはメモリ部508に一時保存される。なお、DCFファイルの作成処理の詳細については図9および図10を参照して後述する。S6103では、S6102で生成されてメモリ部508に一時保存された画像ファイルのデータを、記録媒体511へ書き込む記録処理が行われる。   In step S6101, as described with reference to FIG. 5, in response to a user operation of a release button (not shown), a series of shooting processes including AF (autofocus) processing, AE (automatic exposure) processing, and exposure processing is performed. In next step S6102, an image file including a parallax map or an image file not including a parallax map is created, and the created image file is temporarily stored in the memory unit 508. Details of the DCF file creation processing will be described later with reference to FIGS. In step S6103, a recording process for writing the image file data generated in step S6102 and temporarily stored in the memory unit 508 to the recording medium 511 is performed.

次に、図8のS6102における画像ファイルの作成処理について、図9を参照して説明する。
まず、S6201にて撮像信号処理回路506は、撮像素子505から出力されるRAWデータを取得する。画像合成回路513は取得したRAWデータを用いて合成画像データを生成する(S6202)。生成された合成画像データはメモリ部508に記憶される。
S6203は視差マップの作成が必要か否かの判定処理である。例えばユーザ操作に従って3D撮影を行った場合、視差マップが必要になるが、2D撮影を行った場合、視差マップは不要である。ここでは、視差マップを生成する場合から説明する。
Next, the image file creation processing in S6102 of FIG. 8 will be described with reference to FIG.
First, in step S6201, the imaging signal processing circuit 506 acquires RAW data output from the imaging element 505. The image composition circuit 513 generates composite image data using the acquired RAW data (S6202). The generated composite image data is stored in the memory unit 508.
In step S6203, it is determined whether a parallax map needs to be created. For example, when 3D shooting is performed according to a user operation, a parallax map is necessary, but when 2D shooting is performed, a parallax map is not necessary. Here, a case where a parallax map is generated will be described.

S6204の視差マップ生成処理について、図10を参照して説明する。
まずS6201で取得したRAWデータから画像合成回路513は左目用画像データを生成し(S6301)、さらに右目用画像データを生成する(S6302)。なお、左目用画像データおよび右目用画像データの生成順序はこの逆でもよい。
生成された各画像データに対して、JPEG画像のサイズに合わせたリサイズ処理が行われる(S6303)。次に、リサイズ処理された左目用画像データと右目用画像データから視差マップ生成回路514が視差マップデータを生成する(S6304)。生成された視差マップデータはメモリ部508に記憶される。なお、リサイズ処理を行っていない左目用画像および右目用画像のデータから視差マップのデータを生成し、その後でリサイズ処理を行ってもよい。
The disparity map generation processing in S6204 will be described with reference to FIG.
First, the image composition circuit 513 generates left-eye image data from the RAW data acquired in S6201 (S6301), and further generates right-eye image data (S6302). Note that the order of generating the left-eye image data and the right-eye image data may be reversed.
Resize processing according to the size of the JPEG image is performed on each generated image data (S6303). Next, the parallax map generation circuit 514 generates parallax map data from the resized left-eye image data and right-eye image data (S6304). The generated parallax map data is stored in the memory unit 508. Note that the disparity map data may be generated from the data of the left-eye image and the right-eye image that have not been resized, and then the resizing process may be performed.

図9のS6205ではサムネイル画像データが生成され、S6206にてJPEG画像データが生成される。メモリ部508に格納された合成画像データを読み出す処理が実行され、圧縮伸長回路515は、設定されたモードに応じた画像圧縮処理を行う。メモリ部508の空き領域には、撮影開始から一連の処理を終えたJPEG画像とサムネイル画像の各データが格納される。   In S6205 of FIG. 9, thumbnail image data is generated, and JPEG image data is generated in S6206. A process of reading the composite image data stored in the memory unit 508 is executed, and the compression / decompression circuit 515 performs an image compression process according to the set mode. In the free area of the memory unit 508, JPEG image data and thumbnail image data that have been subjected to a series of processing from the start of shooting are stored.

最後にDCFヘッダが作成され(S6207)、メモリ部508に格納されているサムネイル画像、JPEG画像、視差マップのデータにより、画像ファイル6000の作成処理が実行される。このとき、DCFヘッダ部6003には、撮影情報、パラメータ等のメタデータA(図7の6007参照)として、シャッタースピードや露光時間等の撮影情報からメタデータが作成され、それらの値が設定される。またデータサイズに基づいてサムネイル画像部6004までのオフセット値B(6008参照)、JPEG画像部6005までのオフセット値C(6009参照)、及び視差マップ部6006までのオフセット値D(6010参照)が設定される。こうして、DCFヘッダ部6003のヘッダ情報が生成される。これにより、DCFヘッダ部6003内には視差マップの存在の有無及び場所を示す情報(オフセット6010参照)が格納されることになる。例えば、オフセット6010のオフセット値Dが所定値(例えば、“0”)であれば、視差マップが画像ファイル6000に格納されていないことを意味する。視差マップが画像ファイル6000内に含まれていないことを示す所定値が設定されているか、またはオフセット6010自体がDCFヘッダ部6003に存在しない場合には、視差マップが存在しないと判断することができる。一方、オフセット値Dに所定のオフセット値が与えられる場合には、視差マップが画像ファイル6000内に格納されており、かつ、その格納場所をオフセット値Dから特定できる。   Finally, a DCF header is created (S6207), and the creation process of the image file 6000 is executed using the thumbnail image, JPEG image, and parallax map data stored in the memory unit 508. At this time, in the DCF header portion 6003, metadata is created from shooting information such as shutter speed and exposure time as metadata A (see 6007 in FIG. 7) such as shooting information and parameters, and these values are set. The Also, an offset value B (see 6008) up to the thumbnail image portion 6004, an offset value C (see 6009) up to the JPEG image portion 6005, and an offset value D (see 6010) up to the parallax map portion 6006 are set based on the data size. Is done. Thus, header information of the DCF header portion 6003 is generated. As a result, information indicating the presence / absence and location of the parallax map (see offset 6010) is stored in the DCF header portion 6003. For example, if the offset value D of the offset 6010 is a predetermined value (for example, “0”), it means that the parallax map is not stored in the image file 6000. When a predetermined value indicating that the parallax map is not included in the image file 6000 is set, or when the offset 6010 itself does not exist in the DCF header portion 6003, it can be determined that the parallax map does not exist. . On the other hand, when a predetermined offset value is given to the offset value D, the parallax map is stored in the image file 6000 and the storage location can be specified from the offset value D.

次に、図9のS6203にて、視差マップを生成しない場合の画像ファイルの作成処理について図9を参照して説明する。
S6201とS6202の処理にてメモリ部508には合成画像データが格納される。S6203での判定後、合成画像データを用いてサムネイル画像データが生成され(S6205)、JPEG画像データが生成される(S6206)。視差マップの生成処理を省略することで、メモリ部508を無駄に使用しないで済む。
Next, image file creation processing when no parallax map is generated in S6203 of FIG. 9 will be described with reference to FIG.
The composite image data is stored in the memory unit 508 in the processes of S6201 and S6202. After the determination in S6203, thumbnail image data is generated using the composite image data (S6205), and JPEG image data is generated (S6206). By omitting the disparity map generation process, the memory unit 508 can be saved.

S6207ではDCFヘッダ部6003に関して、撮影情報やパラメータ等のメタデータA(図7の6007参照)、つまりシャッタースピードや露光時間等の撮影情報からメタデータが作成されて、それらの値が設定される。さらに各データサイズに基づいてサムネイル画像部6004までのオフセット値B(6008参照)、JPEG画像部6005までのオフセット値C(6009参照)、視差マップ部6006までのオフセット値D(6010参照)が設定される。ここで、オフセット6101に格納させるオフセット値Dは、視差マップが画像ファイル6000内に含まれていないことを示す所定値、例えば“0”に設定される。あるいは視差マップが画像ファイル6000に含まれない場合には、オフセット6010自体を生成しなくてもよい。   In S6207, regarding the DCF header portion 6003, metadata is created from metadata A (see 6007 in FIG. 7) such as shooting information and parameters, that is, shooting information such as shutter speed and exposure time, and their values are set. . Further, based on each data size, an offset value B (see 6008) up to the thumbnail image portion 6004, an offset value C (see 6009) up to the JPEG image portion 6005, and an offset value D (see 6010) up to the parallax map portion 6006 are set. Is done. Here, the offset value D stored in the offset 6101 is set to a predetermined value indicating that the parallax map is not included in the image file 6000, for example, “0”. Alternatively, when the parallax map is not included in the image file 6000, the offset 6010 itself may not be generated.

次にS6208では、生成されたDCFヘッダ部6003、サムネイル画像部6004およびJPEG画像部6005の各領域のデータから、視差マップを含まない画像ファイル6000が作成される。
本実施形態では、画像ファイルを記録媒体511に書き込む記録処理について説明したが、これに限らず、コンピュータ機器やプリンタ等の周辺機器との間で画像データや画像データに付属した管理情報を転送し合う場合でも前記と同様の処理が行われる。
In step S6208, an image file 6000 that does not include a parallax map is created from the data of the generated DCF header portion 6003, thumbnail image portion 6004, and JPEG image portion 6005.
In the present embodiment, the recording process for writing the image file to the recording medium 511 has been described. However, the present invention is not limited to this, and image data and management information attached to the image data are transferred to and from a peripheral device such as a computer device or a printer. Even if they match, the same processing as described above is performed.

第1実施形態によれば、画像ファイルのJPEG画像部に、左目用画像と右目用画像を合成したJPEG画像のデータを格納し、当該データに関する視差マップを画像ファイルに内包させる。これにより、視差マップを用いた3D表示での画像再生が可能となる。また視差マップを利用できないアプリケーションでは、加算合成処理したJPEG画像データを用いて2D表示での画像再生が可能となり、汎用性が保証される。すなわち、本実施形態では、一般のアプリケーションでも再生可能なファイルフォーマットを維持したままで、2D表示および3D表示で再生可能な画像ファイルを作成できる。   According to the first embodiment, the JPEG image data obtained by combining the left-eye image and the right-eye image is stored in the JPEG image portion of the image file, and the parallax map related to the data is included in the image file. Thereby, it is possible to reproduce an image in 3D display using a parallax map. In applications where the parallax map cannot be used, it is possible to reproduce images in 2D display using JPEG image data subjected to addition synthesis processing, and versatility is guaranteed. That is, in this embodiment, it is possible to create an image file that can be played back in 2D display and 3D display while maintaining a file format that can be played back by a general application.

[第2実施形態]
次に、本発明の第2実施形態を説明する。
以下、図11を参照して、サムネイル画像用の視差マップを生成した場合の画像ファイルの構造と生成処理について説明する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described.
Hereinafter, the structure of the image file and the generation process when the parallax map for the thumbnail image is generated will be described with reference to FIG.

図11は、サムネイル画像用視差マップを含むDCFファイルの構造例を示す。
DCF画像データ部7001は、DCFヘッダ部7003、サムネイル画像部7004、JPEG画像部7005を含む。DCFヘッダ部7003はDCFヘッダ情報を格納する領域であり、予め所定のデータサイズが与えられている。DCFヘッダ情報は、撮影情報やパラメータ等のメタデータA(7008参照)を含む。この他、サムネイル画像部7004の先頭位置までのオフセット値B(7009参照)と、JPEG画像部7005の先頭位置までのオフセット値C(7010参照)が含まれる。オフセット値D(7011参照)は、サムネイル画像用視差マップ部7006の先頭位置までのオフセットを示す。オフセット値E(7012参照)は、JPEG画像用視差マップ部7007の先頭位置までのオフセットデータを示す。これらのオフセット値B、C、D、Eにより、画像ファイル内における各画像データの開始位置が特定される。なお、オフセット値の配置順序は例示であって、他の順序でも構わない。
FIG. 11 shows an example of the structure of a DCF file including a thumbnail image parallax map.
The DCF image data portion 7001 includes a DCF header portion 7003, a thumbnail image portion 7004, and a JPEG image portion 7005. The DCF header portion 7003 is an area for storing DCF header information, and is given a predetermined data size in advance. The DCF header information includes metadata A (see 7008) such as shooting information and parameters. In addition, an offset value B (see 7009) to the top position of the thumbnail image portion 7004 and an offset value C (see 7010) to the top position of the JPEG image portion 7005 are included. An offset value D (see 7011) indicates an offset to the top position of the thumbnail image parallax map unit 7006. An offset value E (see 7012) indicates offset data up to the head position of the JPEG image parallax map unit 7007. These offset values B, C, D, and E specify the start position of each image data in the image file. Note that the arrangement order of the offset values is an example, and other orders may be used.

視差マップ部7002は、サムネイル画像用視差マップ部7006とJPEG画像用視差マップ部7007を含む。サムネイル画像用視差マップ部7006にはサムネイル画像のサイズに合わせて生成された視差マップデータが格納され、サムネイル画像の3D表示での画像再生処理に使用する。サムネイル画像用視差マップ部7006は、JPEG画像用視差マップ部7007よりも前(DCFヘッダ部7003側)に配置されるが、視差マップ部7002における各視差マップの配置順序は図11と逆でもよい。なお、サムネイル画像部7004、JPEG画像部7005、JPEG画像用視差マップ部7007は第1実施形態の場合と同様であるため、それらの詳細な説明は省略する。
図11のように、サムネイル画像用視差マップをJPEG画像用視差マップとともに画像ファイルの後方に配置することで、視差マップを使用しない場合の画像再生や視差マップの削除等の編集において利便性が向上する。
The parallax map unit 7002 includes a thumbnail image parallax map unit 7006 and a JPEG image parallax map unit 7007. The parallax map unit 7006 for thumbnail images stores parallax map data generated according to the size of the thumbnail image, and is used for image reproduction processing in 3D display of the thumbnail image. The thumbnail image parallax map unit 7006 is arranged before the JPEG image parallax map unit 7007 (on the DCF header unit 7003 side), but the arrangement order of the parallax maps in the parallax map unit 7002 may be reverse to that in FIG. . The thumbnail image portion 7004, the JPEG image portion 7005, and the JPEG image parallax map portion 7007 are the same as those in the first embodiment, and thus detailed descriptions thereof are omitted.
As shown in FIG. 11, the thumbnail image parallax map and the JPEG image parallax map are arranged at the rear of the image file, so that convenience is improved in image reproduction and parallax map deletion when the parallax map is not used. To do.

次に、第2実施形態における視差マップの生成について、図9および図12を参照して説明する。
まず、図9のS6201およびS6202の処理にてメモリ部508に合成画像データが格納される。画像合成回路513は、左目用画像データを生成し(図12のS7101)、右目用画像データを生成する(S7102)。生成された各画像データに対して、設定されたJPEG画像のサイズに合わせてリサイズ処理が実行される(S7103)。JPEG画像用にリサイズ処理された右目用画像データと左目用画像データから、視差マップ生成回路514はJPEG画像用の視差マップを生成する(S7104)。
Next, generation of a parallax map in the second embodiment will be described with reference to FIGS. 9 and 12.
First, the composite image data is stored in the memory unit 508 in the processes of S6201 and S6202 of FIG. The image composition circuit 513 generates left-eye image data (S7101 in FIG. 12), and generates right-eye image data (S7102). Resize processing is executed on each generated image data in accordance with the set JPEG image size (S7103). The parallax map generation circuit 514 generates a JPEG image parallax map from the right-eye image data and the left-eye image data resized for the JPEG image (S7104).

次にサムネイル画像用視差マップを生成するために、S7101およびS7102で生成した左目用画像データと右目用画像データに対して、サムネイル画像サイズへのリサイズ処理が実行される(S7105)。サムネイル画像用にリサイズ処理された右目用画像データと左目用画像データから、視差マップ生成回路514はサムネイル画像用視差マップデータを生成する(S7106)。その後、第1実施形態の説明と同様にDCFヘッダ部7003が作成される。このときサムネイル画像用視差マップ部7006のオフセット値DとJPEG画像用視差マップ部7007のオフセット値Eをそれぞれ設けることにより、画像ファイル7000はサムネイル画像用およびJPEG画像用の視差マップを別々に持つことができる。   Next, in order to generate a thumbnail image parallax map, a resize process to the thumbnail image size is performed on the left-eye image data and the right-eye image data generated in S7101 and S7102 (S7105). The parallax map generation circuit 514 generates parallax map data for thumbnail images from the right-eye image data and the left-eye image data resized for the thumbnail images (S7106). Thereafter, the DCF header portion 7003 is created in the same manner as described in the first embodiment. At this time, by providing the offset value D of the thumbnail image parallax map unit 7006 and the offset value E of the JPEG image parallax map unit 7007, the image file 7000 has separate parallax maps for thumbnail images and JPEG images. Can do.

以上のように、第2実施形態では、サムネイル画像用視差マップを生成して、該マップのデータを内包した画像ファイルを作成する。これにより、サムネイル画像について3D表示での画像再生処理を行うことができる。   As described above, in the second embodiment, a parallax map for thumbnail images is generated, and an image file including the map data is created. Thereby, it is possible to perform image reproduction processing in 3D display for the thumbnail image.

[第3実施形態]
次に、本発明の第3実施形態を説明する。
図13はRAW画像データを含む画像ファイルを作成した場合のファイル構造を例示する。
[Third Embodiment]
Next, a third embodiment of the present invention will be described.
FIG. 13 illustrates a file structure when an image file including RAW image data is created.

DCF画像データ部8001はDCFヘッダ部8003、サムネイル画像部8004、表示用JPEG画像部8005、RAW画像部8006を含む。DCFヘッダ部8003はDCFヘッダ情報を格納する領域であって、予め所定のデータサイズが与えられている。DCFヘッダ情報は、RAW画像部8006に格納される画像データに関連する撮影情報やパラメータ等のメタデータA(8010参照)を含む。この他、以下のオフセット値が含まれる(括弧内は符号を示す)。
・オフセット値B(8011参照):サムネイル画像部8004の先頭位置までのオフセットデータを示す。
・オフセット値C(8012参照):表示用JPEG画像部8005の先頭位置までのオフセットデータを示す。
・オフセット値D(8013参照):RAW画像部8006の先頭位置までのオフセットデータを示す。
・オフセット値E(8014参照):サムネイル画像用視差マップ部8007の先頭位置までのオフセットデータを示す。
・オフセット値F(8015参照):表示JPEG画像用視差マップ部8008の先頭位置までのオフセットデータを示す。
・オフセット値G(8016参照):RAW画像用視差マップ部8009の先頭位置までのオフセットデータを示す。
オフセット値BないしGにより画像ファイル内における各画像データの開始位置が特定される。
The DCF image data portion 8001 includes a DCF header portion 8003, a thumbnail image portion 8004, a display JPEG image portion 8005, and a RAW image portion 8006. The DCF header portion 8003 is an area for storing DCF header information, and is given a predetermined data size in advance. The DCF header information includes metadata A (see 8010) such as shooting information and parameters related to image data stored in the RAW image unit 8006. In addition, the following offset values are included (indicated by a sign in parentheses).
Offset value B (see 8011): indicates offset data up to the top position of the thumbnail image portion 8004.
Offset value C (see 8012): Indicates offset data up to the top position of the display JPEG image portion 8005.
Offset value D (see 8013): Indicates offset data up to the head position of the RAW image portion 8006.
Offset value E (see 8014): Indicates offset data up to the top position of the parallax map portion 8007 for thumbnail images.
Offset value F (see 8015): Indicates offset data up to the top position of the display JPEG image parallax map portion 8008.
Offset value G (see 8016): Indicates offset data up to the start position of the RAW image parallax map unit 8009.
The start position of each image data in the image file is specified by the offset values B to G.

RAW画像部8006はRAW画像データを格納する領域である。RAW画像データは、撮像素子から読み出されたデータであって、現像や圧縮処理等の画像加工が行われる前の大サイズの画像データである。本実施形態では、以下に示す2種類のRAW画像データを取り扱う例について説明する。
・複数のPDで得たデータを各画素内で加算平均したRAW画像データ(以下、加算RAW画像データという)
・選択処理や合成処理を行わずに、画素内の各PDで得たデータをそのまま使用したRAW画像データ(以下、非加算RAW画像データという)。
A RAW image portion 8006 is an area for storing RAW image data. The RAW image data is data read from the image sensor, and is large-size image data before image processing such as development and compression processing is performed. In the present embodiment, an example in which the following two types of RAW image data are handled will be described.
RAW image data obtained by adding and averaging data obtained by a plurality of PDs in each pixel (hereinafter referred to as added RAW image data)
Raw image data (hereinafter referred to as non-added RAW image data) that uses data obtained from each PD in the pixel as it is without performing selection processing or composition processing.

加算RAW画像データは、1画素内の各PDの検出データに加算平均処理を施こして得られるデータであり、演算処理後のデータではあるが、表示等には適さないという意味でRAW画像データである。本実施形態では加算RAW画像データを、加算平均処理後のデータとして説明するが、加算処理のみ行ったデータを加算RAW画像データとして扱い、後処理で除算処理やダイナミックレンジの調整を行う形態でも構わない。   The added RAW image data is data obtained by subjecting the detection data of each PD in one pixel to the addition averaging process, and is the data after the calculation process, but the RAW image data means that it is not suitable for display or the like. It is. In the present embodiment, the addition RAW image data is described as data after addition averaging processing. However, data obtained by performing only addition processing may be handled as addition RAW image data, and division processing or dynamic range adjustment may be performed in post-processing. Absent.

図13に示す視差マップ部8002は、サムネイル画像用視差マップ部8007、表示JPEG画像用視差マップ部8008、RAW画像用視差マップ部8009を含む。サムネイル画像用視差マップ部8007および表示JPEG画像用視差マップ部8008については、第2実施形態の場合と同様であるため、それらの詳細な説明を省略する。   The parallax map unit 8002 shown in FIG. 13 includes a thumbnail image parallax map unit 8007, a display JPEG image parallax map unit 8008, and a RAW image parallax map unit 8009. Since the thumbnail image parallax map unit 8007 and the display JPEG image parallax map unit 8008 are the same as those in the second embodiment, detailed description thereof will be omitted.

RAW画像用視差マップ部8009は、RAW画像部8006のRAW画像データに係る視差量を格納する領域である。非加算RAW画像データの場合には、撮像素子505から読み出した各PDの情報がそのまま使用されるため、後で視差マップを復元できる。そのため本実施形態では、RAW画像部8006に格納されるRAW画像データが非加算RAW画像データである場合、RAW画像用視差マップ部8009を内包しない画像ファイルを作成するものとして説明する。その他、サムネイル画像部8004、表示用JPEG画像部8005等については、第2実施形態の場合と同様であるため、それらの詳細な説明を省略する。   The RAW image parallax map unit 8009 is an area for storing the amount of parallax related to the RAW image data of the RAW image unit 8006. In the case of non-addition RAW image data, the information of each PD read from the image sensor 505 is used as it is, so that the parallax map can be restored later. For this reason, in the present embodiment, when the RAW image data stored in the RAW image unit 8006 is non-addition RAW image data, an image file that does not include the RAW image parallax map unit 8009 will be described. In addition, since the thumbnail image portion 8004, the display JPEG image portion 8005, and the like are the same as those in the second embodiment, their detailed description is omitted.

次に、第3実施形態における視差マップの生成について、図9および図14を参照して説明する。
まず、図9のS6201およびS6202の処理においてメモリ部508には合成画像データが格納される。画像合成回路513は、左目用画像データを生成し(S8101)、右目用画像データを生成する(S8102)。次にシステム制御部509は、RAW画像データが非加算RAW画像データであるか、または加算RAW画像データであるかを判定し、RAW画像用視差マップを作成する必要性の有無を判定する(S8103)。RAW画像データが非加算RAW画像データであるか、または加算RAW画像データであるかの判定については、ユーザが設定したモード等から判定する方法や、メディア容量や画像サイズ等から自動で判定する方法がある。加算RAW画像データの場合、S8014に進む。S8101やS8102で生成した左目用画像データと右目用画像データから、視差マップ生成回路514はRAW画像用視差マップデータを生成する(S8104)。次に、S8101、S8102で生成した左目用画像データと右目用画像データは、それぞれJPEG画像用にリサイズ処理され(S8105)、表示用JPEG画像の視差マップデータが生成される(S8106)。さらに、S8101およびS8102で生成した左目用画像データと右目用画像データは、それぞれサムネイル画像用にリサイズ処理され(S8107)、サムネイル画像用の視差マップデータが生成される(S8108)。
Next, generation of a parallax map in the third embodiment will be described with reference to FIGS. 9 and 14.
First, in the processing of S6201 and S6202 of FIG. The image composition circuit 513 generates left-eye image data (S8101), and generates right-eye image data (S8102). Next, the system control unit 509 determines whether the RAW image data is non-addition RAW image data or addition RAW image data, and determines whether or not it is necessary to create a RAW image parallax map (S8103). ). For determining whether the RAW image data is non-addition RAW image data or addition RAW image data, a method of determining from a mode set by the user or a method of automatically determining from a media capacity, an image size, or the like There is. In the case of addition RAW image data, the process proceeds to S8014. From the left-eye image data and right-eye image data generated in S8101 and S8102, the parallax map generation circuit 514 generates RAW image parallax map data (S8104). Next, the left-eye image data and the right-eye image data generated in S8101 and S8102 are each resized for JPEG images (S8105), and parallax map data of the display JPEG image is generated (S8106). Further, the left-eye image data and the right-eye image data generated in S8101 and S8102 are resized for thumbnail images (S8107), and parallax map data for thumbnail images is generated (S8108).

一方、S8103で非加算RAW画像データと判定された場合には、RAW画像用視差マップデータの生成は不要であり、S8105に進んで、JPEG画像用およびサムネイル画像用のリサイズ処理と視差マップ生成処理が行われる。
第1実施形態のDCFヘッダ部と同様に、DCFヘッダ部8003には、撮影情報、パラメータ等のメタデータA(図13の8010参照)として、シャッタースピードや露光時間等の撮影情報が設定される。またデータサイズに基づいて前記オフセット値BからGが設定され、DCFヘッダ部8003のヘッダ情報が生成される。こうして、DCFヘッダ部8003内にはRAW画像データ用の視差マップの存在の有無及び場所を示す情報(オフセットG)が格納されることになる。オフセット8016の示すオフセット値Gとして所定値(例えば、“0”)が設定されている場合、RAW画像用視差マップのデータが画像ファイル8000には格納されていないことを意味する。あるいは、オフセット8016自体がDCFヘッダ部8003に存在しない場合、RAW画像用視差マップデータは画像ファイル8000に格納されていないことが分かる。オフセット値Gに正当な値が与えられていれば、RAW画像用視差マップデータが画像ファイル8000内に格納されていることが判明し、その格納場所はオフセット値Gから特定できる。
On the other hand, if it is determined in S8103 that it is non-addition RAW image data, it is not necessary to generate RAW image parallax map data, and the process proceeds to S8105 to perform resizing processing and parallax map generation processing for JPEG images and thumbnail images. Is done.
Similarly to the DCF header portion of the first embodiment, in the DCF header portion 8003, shooting information such as shutter speed and exposure time is set as metadata A (see 8010 in FIG. 13) such as shooting information and parameters. . Further, G is set from the offset values B to G based on the data size, and header information of the DCF header portion 8003 is generated. Thus, the DCF header portion 8003 stores information (offset G) indicating the presence / absence and location of the parallax map for RAW image data. When a predetermined value (for example, “0”) is set as the offset value G indicated by the offset 8016, it means that the RAW image parallax map data is not stored in the image file 8000. Alternatively, when the offset 8016 itself does not exist in the DCF header portion 8003, it can be seen that the RAW image parallax map data is not stored in the image file 8000. If a valid value is given to the offset value G, it is found that the RAW image parallax map data is stored in the image file 8000, and the storage location can be specified from the offset value G.

以上のように、第3実施形態では、加算RAW画像データであるか、または非加算RAW画像データであるかによって画像ファイルに視差マップのデータを内包させる必要があるか否かを判断する。その結果、非加算RAW画像データと判定された場合、RAW画像用視差マップは不要となるので、その分のファイル容量を削減できる。   As described above, in the third embodiment, it is determined whether or not it is necessary to include parallax map data in an image file depending on whether it is added RAW image data or non-added RAW image data. As a result, when it is determined as non-addition RAW image data, a RAW image parallax map is not necessary, and the file capacity can be reduced accordingly.

以上、本発明の好ましい実施形態について説明したが、DCFヘッダ部に格納するオフセットデータの配置順序や、視差マップ部に格納する視差マップデータの配置順序については任意に変更可能である。また、本実施形態では3D画像の再生処理に要する時間を短縮するために、サムネイル画像用視差マップおよび表示用JPEG画像の視差マップを常に作成するものとして説明した。これに限らず、RAW画像用視差マップが画像ファイル内に存在する場合には、サムネイル画像用視差マップや表示用JPEG画像の視差マップを作成して画像ファイルに含める工程を削除してもよい。   The preferred embodiment of the present invention has been described above, but the arrangement order of offset data stored in the DCF header part and the arrangement order of parallax map data stored in the parallax map part can be arbitrarily changed. In the present embodiment, the thumbnail image parallax map and the display JPEG image parallax map are always created in order to reduce the time required for 3D image playback processing. However, the present invention is not limited thereto, and when a RAW image parallax map exists in an image file, a step of creating a parallax map for a thumbnail image or a parallax map for a display JPEG image and including it in the image file may be deleted.

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

505 撮像素子
506 撮像信号処理回路
509 システム制御部
510 記録媒体制御I/F部
511 記録媒体
513 画像合成回路
514 視差マップ生成回路
505 Imaging device 506 Imaging signal processing circuit 509 System control unit 510 Recording medium control I / F unit 511 Recording medium 513 Image composition circuit 514 Parallax map generation circuit

上記課題を解決するために本発明に係る装置は、被写体からの光束を光電変換する撮像手段から出力された、視点の異なる複数の画像信号を取得する取得手段と、前記取得手段により取得される異なる視点の画像信号を合成して画像加工前の合成画像信号を生成する画像生成手段と、前記異なる視点の画像信号に基づいて、画像信号間の像の位置ずれ量の分布に対応するマップデータを生成するマップ生成手段と、前記合成画像信号および前記マップデータを含む画像ファイルを生成し、記録媒体に記録する記録手段と、を有するIn order to solve the above problems, an apparatus according to the present invention is obtained by an acquisition unit that acquires a plurality of image signals with different viewpoints that are output from an imaging unit that photoelectrically converts a light beam from a subject, and is acquired by the acquisition unit. Map data corresponding to the distribution of the amount of image misalignment between image signals based on the image signals of the different viewpoints based on the image generation means for synthesizing the image signals of different viewpoints to generate a composite image signal before image processing Map generation means for generating image data, and recording means for generating an image file including the composite image signal and the map data and recording the image file on a recording medium .

Claims (1)

撮像光学系の射出瞳における異なる領域をそれぞれ通過した光束を光電変換して複数の画像信号を出力する複数の光電変換部を撮像素子が有し、該撮像素子による複数の画像信号を処理して記録媒体に記録する撮像装置であって、
前記撮像素子の出力する画像信号から左目用画像と右目用画像の各データを取得して該左目用画像および右目用画像に係る加算合成によって2次元表示用の合成画像データを生成する画像合成手段と、
前記左目用画像および右目用画像のデータから視差マップデータを生成する視差マップ生成手段と、
前記画像合成手段が生成した合成画像データ、および前記視差マップ生成手段が生成した視差マップデータをそれぞれ異なる領域に内包する画像ファイルを作成して前記記録媒体に記録する制御を行う記録制御手段を備えることを特徴とする撮像装置。
The imaging device has a plurality of photoelectric conversion units that photoelectrically convert light beams that have passed through different areas in the exit pupil of the imaging optical system and output a plurality of image signals, and process the plurality of image signals by the imaging device An imaging device for recording on a recording medium,
Image combining means for acquiring left-eye image data and right-eye image data from an image signal output from the image sensor, and generating combined image data for two-dimensional display by additive combining of the left-eye image and right-eye image When,
Parallax map generating means for generating parallax map data from the data of the left-eye image and right-eye image;
A recording control unit configured to create an image file that includes the combined image data generated by the image combining unit and the parallax map data generated by the parallax map generating unit in different areas and record the image files on the recording medium; An imaging apparatus characterized by that.
JP2016068031A 2016-03-30 2016-03-30 Imaging apparatus and control method therefor Pending JP2016154360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016068031A JP2016154360A (en) 2016-03-30 2016-03-30 Imaging apparatus and control method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016068031A JP2016154360A (en) 2016-03-30 2016-03-30 Imaging apparatus and control method therefor

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2011264282A Division JP5911276B2 (en) 2011-10-04 2011-12-02 Imaging apparatus, control method therefor, and image processing apparatus

Publications (1)

Publication Number Publication Date
JP2016154360A true JP2016154360A (en) 2016-08-25

Family

ID=56761343

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016068031A Pending JP2016154360A (en) 2016-03-30 2016-03-30 Imaging apparatus and control method therefor

Country Status (1)

Country Link
JP (1) JP2016154360A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005175566A (en) * 2003-12-08 2005-06-30 Shinichi Hirabayashi Three-dimensional display system
JP2006105771A (en) * 2004-10-05 2006-04-20 Canon Inc Imaging device and topographical map preparing apparatus
JP2008141517A (en) * 2006-12-01 2008-06-19 Fujifilm Corp Image reproducing device and method
JP2008306645A (en) * 2007-06-11 2008-12-18 Fujifilm Corp Image recording device and image recording method
WO2011118089A1 (en) * 2010-03-24 2011-09-29 富士フイルム株式会社 3d imaging device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005175566A (en) * 2003-12-08 2005-06-30 Shinichi Hirabayashi Three-dimensional display system
JP2006105771A (en) * 2004-10-05 2006-04-20 Canon Inc Imaging device and topographical map preparing apparatus
JP2008141517A (en) * 2006-12-01 2008-06-19 Fujifilm Corp Image reproducing device and method
JP2008306645A (en) * 2007-06-11 2008-12-18 Fujifilm Corp Image recording device and image recording method
WO2011118089A1 (en) * 2010-03-24 2011-09-29 富士フイルム株式会社 3d imaging device

Similar Documents

Publication Publication Date Title
US10587860B2 (en) Imaging apparatus and method for controlling same
JP5096048B2 (en) Imaging apparatus, stereoscopic image reproduction apparatus, and stereoscopic image reproduction program
RU2567438C1 (en) Image forming device and method of controlling same
JP6053276B2 (en) Imaging apparatus, control method therefor, and image processing apparatus
JP5924943B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP5864992B2 (en) Imaging apparatus and control method thereof, and image processing apparatus and control method thereof
JP6004741B2 (en) Image processing apparatus, control method therefor, and imaging apparatus
JP5911276B2 (en) Imaging apparatus, control method therefor, and image processing apparatus
JP2014022888A (en) Image pickup device and image pickup device manufacturing method
JP5001960B2 (en) 3D image display apparatus and method
JP6366793B2 (en) Image processing apparatus, control method therefor, and imaging apparatus
JP6433474B2 (en) Imaging apparatus and control method thereof
JP6177305B2 (en) Imaging apparatus and control method thereof, and image processing apparatus and control method thereof
JP2016154360A (en) Imaging apparatus and control method therefor
JP2016163235A (en) Image display device, imaging apparatus, image display method, program and storage medium
JP6172949B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, IMAGE PROCESSING DEVICE, AND IMAGE PROCESSING DEVICE CONTROL METHOD
JP6230266B2 (en) Imaging apparatus, image processing apparatus, and control method
JP6161307B2 (en) Imaging apparatus and control method thereof
JP2014090252A (en) Image processing device and control method for the same, image pickup device and control method for the same and image processing program
JP2014204299A (en) Imaging apparatus and method for controlling the same
JP2017126916A (en) Imaging apparatus
JP2013157726A (en) Imaging apparatus and method for controlling imaging apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170209

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170314

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20180116