JP2014036362A - Imaging device, control method therefor, and control program - Google Patents

Imaging device, control method therefor, and control program Download PDF

Info

Publication number
JP2014036362A
JP2014036362A JP2012176949A JP2012176949A JP2014036362A JP 2014036362 A JP2014036362 A JP 2014036362A JP 2012176949 A JP2012176949 A JP 2012176949A JP 2012176949 A JP2012176949 A JP 2012176949A JP 2014036362 A JP2014036362 A JP 2014036362A
Authority
JP
Japan
Prior art keywords
image
value
depth
imaging
difference amount
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
JP2012176949A
Other languages
Japanese (ja)
Inventor
Satoshi Ikuta
智史 生田
Takeshi Ogawa
武志 小川
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 JP2012176949A priority Critical patent/JP2014036362A/en
Publication of JP2014036362A publication Critical patent/JP2014036362A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To enable easy generation of a stereo image by suppressing a load on a user irrespective of a photographing scene.SOLUTION: A first image and a second image mutually different in depth of field are photographed under control of a CPU 113. A difference amount calculation unit 119 obtains a difference amount by calculating a pixel value difference between mutually corresponding areas in the first image and the second image. A depth direction determination unit 120 determines depth in an image for each of the areas in accordance with the difference amount, and a pseudo stereo image generation unit 123 generates a right-eye image and a left-eye image as a stereo image from the first image and the second image in accordance with the depth.

Description

本発明は、デジタルカメラやビデオカメラなどの撮像装置、その制御方法、および制御プログラムに関し、特に、擬似ステレオ画像の生成機能を備える撮像装置に関する。   The present invention relates to an imaging apparatus such as a digital camera or a video camera, a control method thereof, and a control program, and more particularly to an imaging apparatus having a pseudo stereo image generation function.

一般に、ステレオ画像を表示する際に用いられる自然画像入力装置は、2台以上のカメラを有している。そして、これらカメラはその光軸が互いに平行となるように配置されるか又は若干の輻輳をもって光軸が交差するように配置され、カメラで撮影した画像はそのまま左右眼用画像として表示装置に入力される。   Generally, a natural image input device used when displaying a stereo image has two or more cameras. These cameras are arranged so that their optical axes are parallel to each other, or arranged so that their optical axes intersect with a slight convergence, and the images photographed by the cameras are directly input to the display device as images for the left and right eyes. Is done.

一方、近年、複数の光学系を備えて左右眼用画像を撮影するカメラ、2眼の交換レンズによって左右眼用画像を撮影するカメラが実用化されている。   On the other hand, in recent years, a camera that includes a plurality of optical systems and captures images for the left and right eyes has been put into practical use.

上述のように、ステレオ画像を得る際には、カメラを複数台準備するか又は一台のカメラを特殊な構成とする必要がある。このため、ステレオ画像を得るためにはカメラが不可避的に高価となってしまう。   As described above, when obtaining a stereo image, it is necessary to prepare a plurality of cameras or to specially configure one camera. For this reason, a camera is inevitably expensive to obtain a stereo image.

ところで、単一又は複数の2次元画像信号に含まれる各種情報に応じて被写体の奥行き方向又は奥行き量を推定して、推定の結果得られた奥行き情報に基づいて疑似的にステレオ画像信号を作り出す技術が知られている。このような技術の一つとして、例えば、2D−3D変換技術がある。   By the way, the depth direction or depth amount of the subject is estimated according to various information included in the single or plural two-dimensional image signals, and a pseudo stereo image signal is created based on the depth information obtained as a result of the estimation. Technology is known. As one of such techniques, for example, there is a 2D-3D conversion technique.

例えば、単眼の撮像装置によって撮影された単一の静止画像について、撮影者が立体効果を付与したい領域を指定すると、当該領域において前後の奥行き方向を決定するようにしたものがある。   For example, for a single still image taken by a monocular imaging device, when a photographer specifies an area to which a stereoscopic effect is to be applied, the depth direction before and after the area is determined in the area.

ここでは、指定した領域に対して予め設定された複数の奥行きモデルのいずれか1つを適用して疑似的にステレオ画像を生成している(特許文献1参照)。   Here, a pseudo stereo image is generated by applying any one of a plurality of depth models set in advance to a specified region (see Patent Document 1).

また、単眼の撮像装置によって撮影された照明条件の異なる複数の静止画像について、画素値の減算を行って3次元の奥行き方向を推定して、疑似的にステレオ画像を生成するようにしたものもある(特許文献2参照)。   In addition, for a plurality of still images taken with a monocular imaging device and having different illumination conditions, a pseudo-stereo image is generated by subtracting pixel values to estimate a three-dimensional depth direction. Yes (see Patent Document 2).

特開2003−47027号公報JP 2003-47027 A 特開2004−200973号公報JP 2004-200383 A

ところが、特許文献1に記載の手法では、撮影者が対象画像において手前領域(立体表示する領域)を指定する必要があり、当該指定について撮影者に負担が掛かってしまう。   However, in the method described in Patent Document 1, it is necessary for the photographer to designate a near area (area to be stereoscopically displayed) in the target image, which places a burden on the photographer.

一方、特許文献2に記載の手法では、照明条件を変えることが困難なシーン(例えば、フラッシュ撮影禁止エリア)などにおいては2D−3D変換を行うことができない。   On the other hand, with the technique described in Patent Document 2, 2D-3D conversion cannot be performed in a scene where it is difficult to change the illumination conditions (for example, flash photography prohibited area).

そこで、本発明の目的は、撮影シーンに拘わらず手軽に擬似ステレオ画像を生成することのできる撮像装置、その制御方法、および制御プログラムを提供することにある。   Accordingly, an object of the present invention is to provide an imaging apparatus capable of easily generating a pseudo stereo image regardless of a shooting scene, a control method thereof, and a control program.

上記の目的を達成するため、本発明による撮像装置は、互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像手段と、前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出手段と、前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定手段と、前記奥行きに応じて前記第1の画像又は第2の画像から右目用画像および左目用画像を生成するステレオ画像生成手段と、を備えることを特徴とする。   In order to achieve the above object, an imaging apparatus according to the present invention includes an imaging unit that captures a first image and a second image having different depths of field, and the first image and the second image. Difference amount calculation means for obtaining a difference amount by obtaining a difference between pixel values in a corresponding area, depth determination means for determining a depth in the image for each of the areas according to the difference amount, and the depth according to the depth And stereo image generation means for generating a right-eye image and a left-eye image from the first image or the second image.

本発明による制御方法は、被写体を撮影して得られた画像から立体的画像であるステレオ画像を生成する撮像装置の制御方法であって、互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像ステップと、前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出ステップと、前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定ステップと、前記奥行きに応じて前記第1の画像又は第2の画像から前記ステレオ画像として右目用画像および左目用画像を生成するステレオ画像生成ステップと、を備えることを特徴とする。   A control method according to the present invention is a control method for an imaging apparatus that generates a stereoscopic image that is a stereoscopic image from an image obtained by photographing a subject, and includes a first image and a second image having different depths of field. An imaging step of capturing an image of the image, a difference amount calculating step of obtaining a difference value by obtaining a difference between pixel values in regions corresponding to each other for the first image and the second image, and the region corresponding to the difference amount A depth determination step for determining a depth in the image for each of the above, and a stereo image generation step for generating a right-eye image and a left-eye image as the stereo image from the first image or the second image according to the depth, It is characterized by providing.

本発明による制御プログラムは、被写体を撮影して得られた画像から立体的画像であるステレオ画像を生成する撮像装置で用いられる制御プログラムであって、前記撮像装置が備えるコンピュータに、互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像ステップと、前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出ステップと、前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定ステップと、前記奥行きに応じて前記第1の画像又は第2の画像から前記ステレオが像として右目用画像および左目用画像を生成するステレオ画像生成ステップと、を実行させることを特徴とする。   A control program according to the present invention is a control program used in an imaging apparatus that generates a stereoscopic image, which is a stereoscopic image, from an image obtained by photographing a subject. An imaging step for capturing a first image and a second image having different depths, and a difference amount calculating step for obtaining a difference amount by obtaining a difference between pixel values in regions corresponding to each other with respect to the first image and the second image A depth determination step for determining a depth in the image for each of the regions according to the difference amount, and a right-eye image as the stereo image from the first image or the second image according to the depth, and And a stereo image generation step of generating a left-eye image.

本発明によれば、撮影シーンに拘わらず、撮影者の負荷を軽減して手軽にステレオ画像を生成することができる。   According to the present invention, it is possible to easily generate a stereo image by reducing the burden on the photographer regardless of the shooting scene.

本発明の第1の実施形態による撮像装置の構成についてその一例を示すブロック図である。It is a block diagram which shows the example about the structure of the imaging device by the 1st Embodiment of this invention. 図1に示すカメラにおける擬似ステレオ画像の生成についてその概要を説明するための図であり、(A)は被写界深度が深い状態における画像の一例を示す図、(B)は被写界深度が浅い状態における画像の一例を示す図、(C)は(A)に示す画像と(B)に示す画像とを比較した結果得られた画像を示す図、(D)は(C)に示す画像から手前側領域を抽出した状態を示す図、(E)は(D)に示す手前側領域を左右にシフトした状態を示す図、(F)は左目用入力画像と右目用入力画像とを示す図、(G)はステレオ画像のイメージを示す図である。It is a figure for demonstrating the outline | summary about the production | generation of the pseudo | simulation stereo image in the camera shown in FIG. 1, (A) is a figure which shows an example of an image in a state with a deep depth of field, (B) is a depth of field. The figure which shows an example of the image in a shallow state, (C) is a figure which shows the image obtained as a result of comparing the image shown in (A) and the image shown in (B), (D) is shown in (C) The figure which shows the state which extracted the near side area | region from the image, (E) is a figure which shows the state which shifted the near side area | region shown to (D) right and left, (F) is the input image for left eyes, and the input image for right eyes FIG. 4G is a diagram showing an image of a stereo image. 図1に示すカメラにおいて行われる擬似ステレオ画像の取得を説明するためのフローチャートである。3 is a flowchart for explaining the acquisition of a pseudo stereo image performed in the camera shown in FIG. 1. 絞り値およびシャッタースピードと露光量との関係を示す図である。It is a figure which shows the relationship between an aperture value, shutter speed, and exposure amount. 図1に示す撮影パラメータ決定部において行われる2回目の撮影の際の撮影パラメータの決定を説明するための図である。It is a figure for demonstrating the determination of the imaging | photography parameter in the time of the 2nd imaging | photography performed in the imaging | photography parameter determination part shown in FIG. 図1に示す差分量演算部による差分量の演算を説明するための図であり、(A)はある視点から全ての被写体にピントが合うような被写界深度となるように撮影パラメータを設定して撮影した際の画像を示す図、(B)は(A)と同一の視点から被写界深度が狭くなるような撮影パラメータを設定して撮影した画像であり際の画像を示す図、(C)は差分量の算出の一例を示す図、(d)は差分量算出の他の例を示す図である。FIG. 2 is a diagram for explaining calculation of a difference amount by a difference amount calculation unit shown in FIG. 1, in which (A) sets shooting parameters so that a depth of field is set so that all subjects are in focus from a certain viewpoint; FIG. 5B is a diagram illustrating an image when the image is captured, and FIG. 5B is a diagram illustrating an image captured when the imaging parameter is set so that the depth of field is narrowed from the same viewpoint as FIG. (C) is a figure which shows an example of calculation of difference amount, (d) is a figure which shows the other example of difference amount calculation. 図1に示す奥行き方向決定部による処理を説明するための図であり、(A)は差分量演算部で得られた差分量をマッピングした状態を示す図、(B)は2値化処理を行った結果を示す図である。It is a figure for demonstrating the process by the depth direction determination part shown in FIG. 1, (A) is a figure which shows the state which mapped the difference amount obtained by the difference amount calculating part, (B) is a binarization process. It is a figure which shows the result of having performed. 本発明の第2の実施形態によるカメラについてその構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure about the camera by the 2nd Embodiment of this invention. 図8に示すカメラで用いられる撮像素子の構造を説明するための図であり、(A)は撮像素子の撮像面(結像面)の一部を示す図、(B)は撮像素子の画素を拡大して示す図、(C)は画素に対する光の入射を示す図である。It is a figure for demonstrating the structure of the image pick-up element used with the camera shown in FIG. 8, (A) is a figure which shows a part of image pick-up surface (imaging surface) of an image pick-up element, (B) is a pixel of an image pick-up element. (C) is a figure which shows incidence | injection of the light with respect to a pixel. 図8に示すカメラにおいて行われる擬似ステレオ画像の取得を説明するためのフローチャートである。FIG. 9 is a flowchart for explaining a pseudo stereo image acquisition performed in the camera shown in FIG. 8. FIG.

以下、本発明の実施の形態による撮像装置について図面を参照して説明する。   Hereinafter, an imaging device according to an embodiment of the present invention will be described with reference to the drawings.

[第1の実施形態]
図1は、本発明の第1の実施形態による撮像装置の構成についてその一例を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing an example of the configuration of the imaging apparatus according to the first embodiment of the present invention.

図1において、撮像装置100は、例えば、レンズ一体型の所謂コンパクトデジタルスチルカメラや又はムービーカメラであってもよく、撮影レンズ交換式のデジタル一眼レフレックス式のカメラであってもよい。   In FIG. 1, the imaging apparatus 100 may be, for example, a so-called compact digital still camera or a movie camera integrated with a lens, or a digital single-lens reflex camera with an interchangeable taking lens.

また、撮像装置100は、撮影レンズ交換式であって、レフレックスミラー又はフォーカシングスクリーンなどを備えず、代わりに電子ビューファインダー装置(EVF)およびライブビュー画像を表示するための表示装置を有するカメラであってもよい。   In addition, the imaging apparatus 100 is a camera that has an interchangeable photographic lens, does not include a reflex mirror or a focusing screen, and instead has an electronic viewfinder device (EVF) and a display device for displaying a live view image. There may be.

以下の説明では、撮像装置100は撮影レンズ交換式であって、表示部114に表示される電子ビューファインダー(EVF)画像を視認しつつ撮影をするタイプのデジタルスチルカメラであるとして説明をする。   In the following description, it is assumed that the imaging apparatus 100 is a photographic lens interchangeable type and is a digital still camera that shoots while viewing an electronic viewfinder (EVF) image displayed on the display unit 114.

撮像装置(以下単にカメラと呼ぶ)100は、交換式の撮影レンズユニット101を有している。この撮影レンズユニット101は複数のレンズ群、絞り、およびピントリングなどを備えている。なお、図示の例では、撮影レンズ101a、絞り102、フォーカシングレンズ103、絞り駆動部121、およびフォーカシングレンズ駆動部122が示されている。   An imaging apparatus (hereinafter simply referred to as a camera) 100 has an interchangeable photographic lens unit 101. The photographing lens unit 101 includes a plurality of lens groups, a diaphragm, a focus ring, and the like. In the illustrated example, a photographing lens 101a, an aperture 102, a focusing lens 103, an aperture driving unit 121, and a focusing lens driving unit 122 are shown.

絞り102は複数枚の羽根(図示せず)を備えている。絞り制御部111の制御下で絞り駆動部121が駆動されると、絞り102は撮影の際の開口形状を変化させて入射光量を調節する。   The diaphragm 102 includes a plurality of blades (not shown). When the aperture drive unit 121 is driven under the control of the aperture control unit 111, the aperture 102 adjusts the amount of incident light by changing the aperture shape at the time of photographing.

フォーカシングレンズ103は焦点位置を変化させるためのレンズである。フォーカシングレンズ制御部110の制御下でフォーカシングレンズ駆動部122が駆動されて合焦が行われる。また、撮影者は手動で撮影レンズユニット101に備えられたピントリング(図示せず)を調節するとフォーカシングレンズ103を駆動することができる。   The focusing lens 103 is a lens for changing the focal position. The focusing lens driving unit 122 is driven under the control of the focusing lens control unit 110 to perform focusing. The photographer can drive the focusing lens 103 by manually adjusting a focus ring (not shown) provided in the photographing lens unit 101.

システム制御用CPU(以下単にCPUと呼ぶ)113はカメラ全体の制御を司る。このCPU113にはメモリ117が接続され、メモリ117には各種データが記憶される。   A system control CPU (hereinafter simply referred to as a CPU) 113 controls the entire camera. A memory 117 is connected to the CPU 113, and various data are stored in the memory 117.

CPU113は撮影の結果得られた画像データを、例えば、記録メディア118に記録する。この記録メディア118として、CF(Compact Flash(登録商標))カード又はSDカードなどが用いられる。   The CPU 113 records the image data obtained as a result of shooting on the recording medium 118, for example. As the recording medium 118, a CF (Compact Flash (registered trademark)) card or an SD card is used.

撮影レンズユニット101を介して撮像素子104に光学像が結像する。図示の例では、撮像素子104としてCCD又はCMOSセンサーが用いられ、撮像素子104は光学像に応じたアナログ信号(画像信号)を出力する。   An optical image is formed on the image sensor 104 via the taking lens unit 101. In the illustrated example, a CCD or CMOS sensor is used as the image sensor 104, and the image sensor 104 outputs an analog signal (image signal) corresponding to the optical image.

この画像信号はA/D変換部105によってデジタル信号に変換されて、信号処理部106に与えられる。信号処理部106は、例えば、画素信号を加算した結果得られるベイヤー配列のデジタル信号について信号処理を行って、CPU113に与える。   The image signal is converted into a digital signal by the A / D conversion unit 105 and given to the signal processing unit 106. The signal processing unit 106 performs signal processing on, for example, a Bayer array digital signal obtained as a result of adding pixel signals, and provides the signal to the CPU 113.

画像処理部107はCPU113の制御下で、信号処理部106から入力されたデジタル信号に対して、例えば、ホワイトバランスの調整およびノイズ除去などの画像処理を行って、画像データを得る。   Under the control of the CPU 113, the image processing unit 107 performs image processing such as white balance adjustment and noise removal on the digital signal input from the signal processing unit 106 to obtain image data.

一方、CPU113は信号処理部106から入力されたデジタル信号に応じた画像を表示部114にリアルタイムで逐次表示して、電子ビューファインダー(EVF)として機能させる。なお、表示部114は、例えば、TFT液晶で構成される。   On the other hand, the CPU 113 sequentially displays an image corresponding to the digital signal input from the signal processing unit 106 on the display unit 114 in real time so as to function as an electronic viewfinder (EVF). The display unit 114 is composed of, for example, a TFT liquid crystal.

CPU113は表示部114にパラメータ設定画面を表示する。撮影者はパラメータ設定画面に撮影パラメータ設定部115を用いてシャッタースピード、F値、およびISO感度などの撮影パラメータを設定又は変更することができる。   The CPU 113 displays a parameter setting screen on the display unit 114. The photographer can set or change shooting parameters such as shutter speed, F value, and ISO sensitivity using the shooting parameter setting unit 115 on the parameter setting screen.

また、ユーザである撮影者は撮影モード切替部116によって撮影モードを切り替えることができる。ここでは、撮影モードとして、例えば、マニュアルモードおよび擬似ステレオ画像撮影モードがある。   The photographer who is a user can switch the shooting mode by the shooting mode switching unit 116. Here, for example, there are a manual mode and a pseudo stereo image shooting mode as the shooting mode.

電子シャッター制御部108は、CPU113の制御下で撮影パラメータ設定部115によって指定されたパラメータ又は撮影モード切替部116で指定された撮影モードに応じてシャッタースピードを変更する。ISO感度制御部109は、CPU113の制御下で撮影パラメータ設定部115によって指定されたパラメータ又は撮影モード切替部116で指定された撮影モードに応じてISO感度を変更する。   The electronic shutter control unit 108 changes the shutter speed according to the parameter specified by the shooting parameter setting unit 115 or the shooting mode specified by the shooting mode switching unit 116 under the control of the CPU 113. The ISO sensitivity control unit 109 changes the ISO sensitivity according to the parameter specified by the shooting parameter setting unit 115 or the shooting mode specified by the shooting mode switching unit 116 under the control of the CPU 113.

フォーカシングレンズ制御部110は、CPU113の制御下でオートフォーカス(AF)などの際、フォーカシングレンズ駆動部122を駆動制御して合焦を行う。絞り制御部111は、CPU113の制御下で撮影パラメータ設定部115によって指定されたパラメータ又は撮影モード切替部116で指定された撮影モードに応じて絞り駆動部112を駆動制御して絞り102を調節する。   The focusing lens control unit 110 performs focusing by controlling the driving of the focusing lens driving unit 122 during autofocus (AF) or the like under the control of the CPU 113. The diaphragm control unit 111 adjusts the diaphragm 102 by drivingly controlling the diaphragm driving unit 112 according to the parameter specified by the shooting parameter setting unit 115 or the shooting mode specified by the shooting mode switching unit 116 under the control of the CPU 113. .

撮影パラメータ決定部112は、擬似ステレオ画像撮影モードが選択されると差分比較用に撮影される2枚目の画像(以下「画像B」と呼ぶ)を撮影する際の撮影パラメータを決定する。なお、画像B(第2の画像)の撮影の際における撮影パラメータの決定について後述する。   When the pseudo stereo image shooting mode is selected, the shooting parameter determination unit 112 determines shooting parameters when shooting a second image (hereinafter referred to as “image B”) to be shot for difference comparison. It should be noted that determination of shooting parameters when shooting the image B (second image) will be described later.

差分量演算部119は、擬似ステレオ画像撮影モードが選択されると、1枚目に撮影された画像(以下「画像A」と呼ぶ)と画像Bと間における差分量を算出する。そして、差分量演算部119は演算の結果得られた差分量を、CPU113を介して奥行き方向決定部120に与える。   When the pseudo stereo image shooting mode is selected, the difference amount calculation unit 119 calculates the difference amount between the first image (hereinafter referred to as “image A”) and the image B. Then, the difference amount calculation unit 119 gives the difference amount obtained as a result of the calculation to the depth direction determination unit 120 via the CPU 113.

奥行き方向決定部102は、差分量と所定の閾値とを比較して、後述するように、その比較結果に応じて画像A(第1の画像)における手前画像領域および背景画像領域を決定する。擬似ステレオ画像生成部123は、CPU113の制御下で後述するようにして擬似ステレオ画像を生成する。   The depth direction determination unit 102 compares the difference amount with a predetermined threshold value, and determines the near image area and the background image area in the image A (first image) according to the comparison result, as will be described later. The pseudo stereo image generation unit 123 generates a pseudo stereo image under the control of the CPU 113 as described later.

図2は、図1に示すカメラにおける擬似ステレオ画像の生成についてその概要を説明するための図である。そして、図2(A)は被写界深度が深い状態における画像の一例を示す図であり、図2(B)は被写界深度が浅い状態における画像の一例を示す図である。また、図2(C)は図2(A)に示す画像と図2(B)に示す画像とを比較した結果得られた画像を示す図であり、図2(D)は図2(C)に示す画像から手前側領域を抽出した状態を示す図である。さらに、図2(E)は図2(D)に示す手前側領域を左右にシフトした状態を示す図であり、図2(F)は左目用入力画像と右目用入力画像とを示す図である。そして、図2(G)はステレオ画像のイメージを示す図である。   FIG. 2 is a diagram for explaining an outline of generation of a pseudo stereo image in the camera shown in FIG. FIG. 2A is a diagram illustrating an example of an image in a state where the depth of field is deep, and FIG. 2B is a diagram illustrating an example of an image in a state where the depth of field is shallow. 2C shows an image obtained as a result of comparing the image shown in FIG. 2A with the image shown in FIG. 2B, and FIG. 2D shows the image shown in FIG. It is a figure which shows the state which extracted the near side area | region from the image shown to (). 2E is a diagram showing a state where the near side region shown in FIG. 2D is shifted to the left and right, and FIG. 2F is a diagram showing a left-eye input image and a right-eye input image. is there. FIG. 2G shows a stereo image.

図2(A)および図2(B)においては、静止画像の撮影を行う際、同一の視点から主被写体200に合焦された状態において被写界深度を変更して撮影を行ったものとする。なお、物体201は主被写体200よりも奥に位置しているものとする。   In FIGS. 2A and 2B, when taking a still image, the depth of field is changed in the state where the main subject 200 is focused from the same viewpoint. To do. Note that the object 201 is located behind the main subject 200.

図2(A)では、被写界深度を深くした状態で撮影が行われ、主被写体200および物体201の双方ともに被写界深度内に収まってピントがあっているように見える。一方、図2(B)では、図2(A)よりも被写界深度を浅くした状態で撮影が行われ、主被写体200にはピントが合った状態になっているものの、物体201は被写界深度内に収まらずボケてしまっている。   In FIG. 2A, shooting is performed with the depth of field deepened, and both the main subject 200 and the object 201 appear to be in focus within the depth of field. On the other hand, in FIG. 2B, shooting is performed in a state where the depth of field is shallower than in FIG. 2A and the main subject 200 is in focus, but the object 201 is not covered. It is out of focus and out of focus.

続いて、図2(A)および図2(B)に示す画像において特定領域の成分を比較演算する。ここでは、画素の並びと同様に、これら画像の差分量をマッピングして、両画像の間で差のある部分の映像(図2(C)参照)を得る。   Subsequently, in the images shown in FIGS. 2A and 2B, the components of the specific area are compared and calculated. Here, similarly to the arrangement of pixels, the difference amounts of these images are mapped to obtain a video of a portion having a difference between both images (see FIG. 2C).

被写界深度の特性から、画像間の変化が少ない部分は合焦位置に近く、大きく変化する部分は合焦位置から遠いといえる。また、ピントが合っている位置は一般に主被写体であり、主被写体は画像において最も手前に位置することがほとんどである。このため、主被写体を基準として前景および背景を大まかに分離することができる。   From the characteristics of the depth of field, it can be said that the portion with little change between images is close to the in-focus position, and the portion with large change is far from the in-focus position. Further, the in-focus position is generally the main subject, and the main subject is most often located in the foreground in the image. For this reason, the foreground and the background can be roughly separated on the basis of the main subject.

図2(C)で得られた差分量を予め設定された閾値と比較して、2値化などの処理を行って、図2(D)に示すように、画像における各画素が手前領域(白塗り領域)又は背景領域(黒塗り領域)のいずれの領域に属するかを決定する。そして、図2(E)に示すように、手前領域に属する画素に視差を割り当て左又は右にシフトして、左右眼用のステレオ画像を生成する。   The difference amount obtained in FIG. 2C is compared with a threshold value set in advance, and processing such as binarization is performed. As shown in FIG. It is determined whether it belongs to a white area) or a background area (black area). Then, as shown in FIG. 2 (E), a parallax is assigned to the pixels belonging to the front area and shifted to the left or right to generate a stereo image for the left and right eyes.

図2(F)に示す左目用入力画像202および右目用入力画像203を、レンチキュラー方式又はパララックスバリア方式などの立体画像表示装置に入力すると、立体視効果のある画像を表示することができる。つまり、図2(G)に示すように、ステレオ画像が表示される。   When the left-eye input image 202 and the right-eye input image 203 illustrated in FIG. 2F are input to a stereoscopic image display device such as a lenticular method or a parallax barrier method, an image having a stereoscopic effect can be displayed. That is, a stereo image is displayed as shown in FIG.

図3は、図1に示すカメラにおいて行われる擬似ステレオ画像の取得を説明するためのフローチャートである。   FIG. 3 is a flowchart for explaining the acquisition of the pseudo stereo image performed in the camera shown in FIG.

擬似ステレオ画像を取得する際には、つまり、擬似ステレオ画像を生成する際には、撮影者は撮影モード切替部116によって擬似ステレオ画像撮影モードを選択する(ステップS301)。次に、CPU113は設定された撮影パラメータに応じて主被写体にピントを合わせて1回目の撮影を行って画像を得る(ステップS302)。   When acquiring the pseudo stereo image, that is, when generating the pseudo stereo image, the photographer selects the pseudo stereo image shooting mode by the shooting mode switching unit 116 (step S301). Next, the CPU 113 focuses on the main subject according to the set shooting parameter and performs the first shooting to obtain an image (step S302).

なお、撮影パラメータの設定に当たっては、撮影者が撮影パラメータ設定部115で設定した撮影パラメータを用いるようにしてもよく、予め定められた撮影パラメータを用いるようにしてもよい。   In setting the shooting parameters, the shooting parameters set by the shooting person using the shooting parameter setting unit 115 may be used, or predetermined shooting parameters may be used.

ここでは、1回目の撮影によって得られた画像を「画像A」と呼ぶ。続いて、CPU113は画像Aを撮影した際の撮影パラメータにおけるF値、シャッタースピードおよびISO感度を撮影パラメータ決定部112に与える。撮影パラメータ決定部112は画像Aを撮影した際の露光量(以下「A露光量」と呼ぶ)と等しい露光量でかつ被写界深度が変化するように撮影パラメータを決定する(ステップS303)。なお、被写界深度が変化する撮影パラメータの決定については後述する。   Here, an image obtained by the first shooting is referred to as “image A”. Subsequently, the CPU 113 provides the photographing parameter determination unit 112 with the F value, shutter speed, and ISO sensitivity in the photographing parameters when the image A is photographed. The shooting parameter determination unit 112 determines shooting parameters so that the exposure amount is equal to the exposure amount when the image A is shot (hereinafter referred to as “A exposure amount”) and the depth of field changes (step S303). The determination of the shooting parameter for changing the depth of field will be described later.

次に、CPU113はステップS303で決定した撮影パラメータを2回目の撮影を行う際の撮影パラメータとして設定する(ステップS304)。そして、CPU113は2回目の撮影を実行して画像を得る(ステップS305)。ここでは、2回目の撮影によって得られた画像を「画像B」と呼ぶ。   Next, the CPU 113 sets the shooting parameters determined in step S303 as shooting parameters for the second shooting (step S304). Then, the CPU 113 executes the second shooting to obtain an image (step S305). Here, an image obtained by the second shooting is referred to as “image B”.

続いて、CPU113は連続撮影された画像A(第1の画像)および画像B(第2の画像)を差分量演算部119に与える。そして、差分量演算部119は画像Aおよび画像Bと間の差分量を算出する(ステップS306)。なお、2画像間の差分量の演算については後述する。   Subsequently, the CPU 113 provides the difference amount calculation unit 119 with the image A (first image) and the image B (second image) taken continuously. Then, the difference amount calculation unit 119 calculates the difference amount between the image A and the image B (step S306). The calculation of the difference amount between the two images will be described later.

CPU113は、差分量演算部119によって求められた差分量を奥行き方向決定部120に与える。そして、奥行き方向決定部120は後述するようにして手前領域および背景領域(つまり、奥行き方向)を決定する(ステップS307)。   The CPU 113 gives the difference amount obtained by the difference amount calculation unit 119 to the depth direction determination unit 120. Then, the depth direction determination unit 120 determines the near area and the background area (that is, the depth direction) as described later (step S307).

続いて、擬似ステレオ画像生成部123はCPU113の制御下で、奥行き方向に基づいて擬似的に右目用画像および左目用画像(擬似ステレオ画像)を生成する(2D3D変換処理:ステップS308)。擬似ステレオ画像の生成が終了すると、CPU113は擬似ステレオ画像取得処理を終了する。   Subsequently, under the control of the CPU 113, the pseudo stereo image generation unit 123 generates a right eye image and a left eye image (pseudo stereo image) in a pseudo manner based on the depth direction (2D3D conversion processing: step S308). When the generation of the pseudo stereo image ends, the CPU 113 ends the pseudo stereo image acquisition process.

ところで、上述の2回目の撮影の際の撮影パラメータの決定については、次の条件1〜3を考慮するものとする。   By the way, the following conditions 1 to 3 are taken into consideration for the determination of the shooting parameters at the time of the second shooting described above.

条件1:画像Aと画像Bの露光量が等価になること。   Condition 1: Exposure amounts of image A and image B are equivalent.

条件2:画像BのF値が画像Aを撮影した際のF値からなるべく離れること。   Condition 2: The F value of the image B is as far as possible from the F value when the image A is captured.

条件3:画像Bの撮影の際のシャッタースピードが画像Aの撮影の際のシャッタースピードに比べて遅くならないこと。   Condition 3: The shutter speed when shooting the image B should not be slower than the shutter speed when shooting the image A.

上記の条件1は画像Aと画像Bの出力ゲインを合わせることによって演算の精度を上げるための条件である。条件2は被写界深度の変更が最も大きくなるようにするための条件であり、画像Aと画像Bとの間で被写界深度が異なる程差分量は顕著に現れる。条件3はユーザの使い勝手と手ぶれ防止のための条件である。   The above condition 1 is a condition for improving the calculation accuracy by combining the output gains of the image A and the image B. Condition 2 is a condition for making the change in the depth of field the greatest, and the difference amount becomes more prominent as the depth of field differs between the image A and the image B. Condition 3 is a condition for user convenience and prevention of camera shake.

なお、ここでは、条件1>条件2>条件3の順に優先度をつけてパラメータを決定する。   Here, the parameters are determined by assigning priorities in the order of condition 1> condition 2> condition 3.

一般に、露光量を算出する際には次の式(1)が用いられる。   Generally, the following formula (1) is used when calculating the exposure amount.

Ev=Av+Tv (1)
ここで、Evは露光量であり、露出の度合いを表すものである。Av(絞り優先)は絞り値F1を0とし、1段絞る毎に1ずつ加算される値である。Tv(シャッタースピード優先)はシャッタースピード1秒を0として、1段速くする毎に1ずつ加算され、1段遅くする毎に1ずつ減算される値である。
Ev = Av + Tv (1)
Here, Ev is the exposure amount and represents the degree of exposure. Av (aperture priority) is a value in which the aperture value F1 is set to 0 and 1 is added every time the aperture is reduced by one step. Tv (shutter speed priority) is a value that is incremented by 1 each time the shutter speed is increased by 1 step and incremented by 1 each time the shutter speed is decreased by 1 step.

式(1)によれば、所定の撮影パラメータに対して、絞り値を1段絞りシャッタースピードを1段遅くする場合と絞り値を1段開放しシャッタースピードを1段速くする場合とで得られるEv値は互いに等しい値となる。   According to the equation (1), for a predetermined shooting parameter, it can be obtained when the aperture value is reduced by one step and the shutter speed is decreased by one step, and when the aperture value is opened by one step and the shutter speed is increased by one step. Ev values are equal to each other.

図4は、絞り値およびシャッタースピードと露光量との関係を示す図である。   FIG. 4 is a diagram showing the relationship between the aperture value, shutter speed, and exposure amount.

図4において、絞り値F8、シャッタースピード125/1で撮影された場合のEvは、Ev=6+7=13である。一方、絞り値F4、シャッタースピード500/1で撮影された場合のEvは、Ev=4+9=13となる。よって、上記の絞り値およびシャッタースピードによって撮影された2つの画像において露光量は互いに等しくなる。   In FIG. 4, Ev when the image is taken with the aperture value F8 and the shutter speed 125/1 is Ev = 6 + 7 = 13. On the other hand, Ev when the image is taken with the aperture value F4 and the shutter speed 500/1 is Ev = 4 + 9 = 13. Therefore, the exposure amounts of the two images taken with the aperture value and the shutter speed are equal to each other.

式(1)は撮影感度(ISO)100における露光量を求めるためのものであり、ISO100以外の露光量の算出についてはISO感度補正を行う必要がある。ここでは、式(1)にISO感度設定に応じた補正を考慮してIv(露出補正)値を設定することにする。   Expression (1) is for obtaining the exposure amount at the photographing sensitivity (ISO) 100, and it is necessary to perform ISO sensitivity correction for the calculation of exposure amounts other than ISO 100. Here, the Iv (exposure correction) value is set in the equation (1) in consideration of the correction according to the ISO sensitivity setting.

Iv値はISO100を0として、撮影感度を1段上げる毎に1ずつ加算される値である。Iv値を考慮した露光量は次の式(2)で表わされる。   The Iv value is a value that is incremented by 1 every time the photographing sensitivity is increased by one step with ISO 100 as 0. The exposure amount considering the Iv value is expressed by the following equation (2).

Ev=Av+Tv−Iv (2)
そして、式(2)を変形すれば、Av値、Tv値、およびIv値はそれぞれ式(3)〜式(5)で求めることができる。
Ev = Av + Tv-Iv (2)
Then, if the formula (2) is modified, the Av value, the Tv value, and the Iv value can be obtained by the formulas (3) to (5), respectively.

Av=Ev−Tv+Iv (3)
Tv=Ev−Av+Iv (4)
Iv=Av+Tv−Ev (5)
図5は、図1に示す撮影パラメータ決定部112において行われる2回目の撮影の際の撮影パラメータの決定を説明するための図である。
Av = Ev−Tv + Iv (3)
Tv = Ev−Av + Iv (4)
Iv = Av + Tv−Ev (5)
FIG. 5 is a diagram for explaining the determination of shooting parameters at the time of the second shooting performed by the shooting parameter determination unit 112 shown in FIG.

撮影パラメータ決定処理を開始すると、撮影パラメータ決定部112は、まず画像Aを撮影した際のEv値を算出する(ステップS401)。続いて、撮影パラメータ決定部112は画像Aを撮影した際のAv値が設定可能なAv値の範囲における中央値よりも小さい値であるか否かを判定する(ステップS402)。   When the shooting parameter determination process is started, the shooting parameter determination unit 112 first calculates an Ev value when the image A is shot (step S401). Subsequently, the shooting parameter determination unit 112 determines whether or not the Av value when the image A is shot is smaller than the median value in the settable Av value range (step S402).

画像Aを撮影した際のAv値が中央値より小さいと(ステップS402において、YES)、撮影パラメータ決定部112は画像Bを撮影する際のAv値を最大値に設定する(ステップS403)。そして、撮影パラメータ決定部112はIv値の調整によって、画像Bを撮影する際に画像Aを撮影した際のEv値と等価なEv値が得られるか否かを判定する(ステップS404)。   If the Av value at the time of shooting image A is smaller than the median value (YES in step S402), shooting parameter determining unit 112 sets the Av value at the time of shooting image B to the maximum value (step S403). Then, the shooting parameter determination unit 112 determines whether or not an Ev value equivalent to the Ev value when the image A is shot when the image B is shot can be obtained by adjusting the Iv value (step S404).

Iv値の調整によって画像BのEv値と画像AのEv値とが等価にできると(ステップS404において、YES)、撮影パラメータ決定部112は、画像BのEv値と画像AのEv値とが等価となるIv値を設定して(ステップS405)、撮影パラメータ決定処理を終了する。   If the Ev value of the image B and the Ev value of the image A can be made equivalent by adjusting the Iv value (YES in step S404), the imaging parameter determination unit 112 determines that the Ev value of the image B and the Ev value of the image A are An equivalent Iv value is set (step S405), and the photographing parameter determination process is terminated.

いま、Av値およびTv値がそれぞれ0〜10の10段階で、Iv値が0〜5の5段階に設定できるものとする。Av値=5、Tv値=6、Iv値=0、そして、Ev値=11である撮影パラメータで画像Aを撮影したものとする。   Now, it is assumed that the Av value and the Tv value can be set to 10 levels of 0 to 10, respectively, and the Iv value can be set to 5 levels of 0 to 5. It is assumed that the image A is shot with shooting parameters of Av value = 5, Tv value = 6, Iv value = 0, and Ev value = 11.

この場合には、ステップS403において、Av値=10(最大値)が設定される。そして、ステップS404において、画像Aを撮影した際のTv値を用いてIv値の調整によって等価なAv値が得られるか否かが判定されることになる。   In this case, Av value = 10 (maximum value) is set in step S403. In step S404, it is determined whether an equivalent Av value can be obtained by adjusting the Iv value using the Tv value obtained when the image A is captured.

上記の式(5)を用いると、Iv=10+6−11=5となる。このIv値は設定可能なIv値の範囲に収まっているので、撮影パラメータ決定部112はIv値の調整が可能であると判断する。そして、ステップS404において、調整後のIv値=5が画像Bを撮影する際のIv値として設定される。   Using the above formula (5), Iv = 10 + 6-11 = 5. Since this Iv value is within the settable Iv value range, the imaging parameter determination unit 112 determines that the Iv value can be adjusted. In step S404, the adjusted Iv value = 5 is set as the Iv value when the image B is captured.

この結果、画像Bを撮影する際の撮影パラメータとして、上記の条件1〜3の全てを満たす撮影パラメータが決定されることになる。   As a result, shooting parameters that satisfy all of the above conditions 1 to 3 are determined as shooting parameters when shooting the image B.

Iv値の調整によって画像BのEv値と画像AのEv値とが等価にできないと(ステップS404において、NO)、撮影パラメータ決定部112はIv値を最大値に設定する(ステップS406)。そして、撮影パラメータ決定部112はTv値の調整によって、画像Bを撮影する際に画像Aを撮影した際のEv値と等価なEv値が得られるか否かを判定する(ステップS407)。   If the Ev value of image B and the Ev value of image A cannot be made equivalent by adjusting the Iv value (NO in step S404), shooting parameter determining unit 112 sets the Iv value to the maximum value (step S406). Then, the shooting parameter determination unit 112 determines whether or not an Ev value equivalent to the Ev value obtained when the image A is captured when the image B is captured can be obtained by adjusting the Tv value (step S407).

Tv値の調整によって画像BのEv値と画像AのEv値とが等価にできると(ステップS407において、YES)、撮影パラメータ決定部112は、画像BのEv値と画像AのEv値とが等価となるTv値を設定して(ステップS408)、撮影パラメータ決定処理を終了する。   If the Ev value of image B and the Ev value of image A can be made equivalent by adjusting the Tv value (YES in step S407), the imaging parameter determination unit 112 determines that the Ev value of image B and the Ev value of image A are An equivalent Tv value is set (step S408), and the shooting parameter determination process is terminated.

一方、Tv値の調整によって画像BのEv値と画像AのEv値とが等価にできないと(ステップS407において、NO)、撮影パラメータ決定部112はTv値を最小値に設定する(ステップS409)。そして、撮影パラメータ決定部112は画像AのEv値と等価となるAv値を算出して(ステップS410)、撮影パラメータ決定処理を終了する。   On the other hand, if the Ev value of image B and the Ev value of image A cannot be made equivalent by adjusting the Tv value (NO in step S407), shooting parameter determining unit 112 sets the Tv value to the minimum value (step S409). . Then, the shooting parameter determination unit 112 calculates an Av value equivalent to the Ev value of the image A (step S410), and ends the shooting parameter determination process.

前述のように、Av値およびTv値がそれぞれ0〜10の10段階で、Iv値が0〜5の5段階に設定できるものとし、Av値=4、Tv値=6、Iv値=0、そして、Ev値=10である撮影パラメータで画像Aを撮影したものとする。   As described above, the Av value and the Tv value can be set to 10 levels of 0 to 10, respectively, and the Iv value can be set to 5 levels of 0 to 5, and Av value = 4, Tv value = 6, Iv value = 0, Then, it is assumed that the image A is shot with the shooting parameters where the Ev value = 10.

この場合、Iv値の調整によって画像BのEv値と画像AのEv値とが等価にできないので、ステップS406においてIv値=5(最大値)が設定される。そして、ステップS407において、Tv値による調整が可能であるか否かが判定される。   In this case, since the Ev value of the image B and the Ev value of the image A cannot be made equal by adjusting the Iv value, Iv value = 5 (maximum value) is set in step S406. In step S407, it is determined whether or not adjustment by the Tv value is possible.

ここで、式(4)を用いると、Tv=10−10+5=5となり、当該Tv値は設定可能なTv値の範囲に収まっているので、撮影パラメータ決定部112は、ステップS408において上記のTv値を、画像Bを撮影する際のTv値として決定することになる。   Here, using Equation (4), Tv = 10−10 + 5 = 5, and the Tv value is within the settable Tv value range. Therefore, the imaging parameter determination unit 112 performs the above Tv in step S408. The value is determined as a Tv value when the image B is captured.

この結果、画像Bを撮影する際の撮影パラメータとして、上記の条件1および2を満たす撮影パラメータが決定されることになる。   As a result, shooting parameters satisfying the above conditions 1 and 2 are determined as shooting parameters when shooting the image B.

前述のステップS402において、画像Aを撮影した際のAv値が中央値以上であると(ステップS402において、NO)、撮影パラメータ決定部112は画像Bを撮影する際のAv値を最小値に設定する(ステップS411)。そして、撮影パラメータ決定部112はTv値の調整によって、画像Bを撮影する際に画像Aを撮影した際のEv値と等価なEv値が得られるか否かを判定する(ステップS412)。   In step S402 described above, if the Av value when the image A is captured is equal to or greater than the median value (NO in step S402), the capturing parameter determination unit 112 sets the Av value when capturing the image B to the minimum value. (Step S411). Then, the shooting parameter determination unit 112 determines whether or not an Ev value equivalent to the Ev value obtained when the image A is captured when the image B is captured can be obtained by adjusting the Tv value (step S412).

Tv値の調整によって画像BのEv値と画像AのEv値とが等価にできると(ステップS412において、YES)、撮影パラメータ決定部112は、画像BのEv値と画像AのEv値とが等価となるTv値を設定して(ステップS413)、撮影パラメータ決定処理を終了する。   When the Ev value of the image B and the Ev value of the image A can be made equivalent by adjusting the Tv value (YES in step S412), the imaging parameter determination unit 112 determines that the Ev value of the image B and the Ev value of the image A are An equivalent Tv value is set (step S413), and the shooting parameter determination process is terminated.

前述のように、Av値およびTv値がそれぞれ0〜10の10段階で、Iv値が0〜5の5段階に設定できるものとし、Av値=6、Tv値=4、Iv値=0、そして、Ev値=10である撮影パラメータで画像Aを撮影したものとする。   As described above, it is assumed that the Av value and the Tv value can be set to 10 levels of 0 to 10, respectively, and the Iv value can be set to 5 levels of 0 to 5, Av value = 6, Tv value = 4, Iv value = 0, Then, it is assumed that the image A is shot with the shooting parameters where the Ev value = 10.

この場合、画像Aを撮影した際のAv値が中央値以上であるので、ステップS41104において、Av値=0(最小値)が設定される。そして、ステップS412で、Tv値の調整によって画像BのEv値を画像AのEv値と等価にできるか否かが判定される。   In this case, since the Av value when the image A is captured is equal to or greater than the median value, Av value = 0 (minimum value) is set in step S41104. In step S412, it is determined whether or not the Ev value of the image B can be equivalent to the Ev value of the image A by adjusting the Tv value.

上記の式(4)によって、Tv=10−0+0=10であるので、Tv値の調整によって、画像Bを撮影する際に画像AのEv値と等価なEv値が得られることになる。従って、ステップS413において、上記のTv値が画像Bを撮影する際のTv値として決定されることになる。   Since Tv = 10−0 + 0 = 10 according to the above equation (4), by adjusting the Tv value, an Ev value equivalent to the Ev value of the image A can be obtained when the image B is captured. Accordingly, in step S413, the above Tv value is determined as the Tv value when the image B is captured.

この結果、画像Bを撮影する際の撮影パラメータとして、上記の条件1〜3の全てを満たす撮影パラメータが決定されることになる。   As a result, shooting parameters that satisfy all of the above conditions 1 to 3 are determined as shooting parameters when shooting the image B.

一方、Tv値の調整によって画像BのEv値と画像AのEv値とが等価にできないと(ステップS412において、NO)、撮影パラメータ決定部112はTv値を最大値に設定する(ステップS414)。そして、撮影パラメータ決定部112は、Iv値の調整によって、画像Bを撮影する際に画像Aを撮影した際のEv値と等価なEv値が得られるか否かを判定する(ステップS415)。   On the other hand, if the Ev value of image B and the Ev value of image A cannot be made equal by adjusting the Tv value (NO in step S412), shooting parameter determining unit 112 sets the Tv value to the maximum value (step S414). . Then, the imaging parameter determination unit 112 determines whether or not an Ev value equivalent to the Ev value when the image A is captured when the image B is captured can be obtained by adjusting the Iv value (step S415).

Iv値の調整によって画像BのEv値と画像AのEv値とが等価にできると(ステップS415において、YES)、撮影パラメータ決定部112は、画像BのEv値と画像AのEv値とが等価となるIv値を設定して(ステップS416)、撮影パラメータ決定処理を終了する。   If the Ev value of the image B and the Ev value of the image A can be made equivalent by adjusting the Iv value (YES in step S415), the imaging parameter determination unit 112 determines that the Ev value of the image B and the Ev value of the image A are An equivalent Iv value is set (step S416), and the photographing parameter determination process is terminated.

Iv値の調整によって画像BのEv値と画像AのEv値とが等価にできないと(ステップS415において、NO)、撮影パラメータ決定部112はIv値を最大値に設定する(ステップS417)。そして、撮影パラメータ決定部112は画像AのEv値と等価となるAv値を算出して(ステップS418)、撮影パラメータ決定処理を終了する。   If the Ev value of image B and the Ev value of image A cannot be made equivalent by adjusting the Iv value (NO in step S415), shooting parameter determining unit 112 sets the Iv value to the maximum value (step S417). Then, the shooting parameter determination unit 112 calculates an Av value that is equivalent to the Ev value of the image A (step S418), and ends the shooting parameter determination process.

Av値およびTv値がそれぞれ0〜10の10段階で、Iv値が0〜5の5段階に設定できるものとし、Av値=6、Tv値=6、Iv値=4、そして、Ev値=8である撮影パラメータで画像Aを撮影したものとする。   It is assumed that the Av value and the Tv value can be set to 10 levels of 0 to 10, respectively, and the Iv value can be set to 5 levels of 0 to 5, Av value = 6, Tv value = 6, Iv value = 4, and Ev value = Assume that the image A is shot with the shooting parameter of 8.

この場合、Tv値の調整によって画像BのEv値と画像AのEv値とが等価にできないので、ステップS414においてTv値=10(最大値)が設定される。そして、ステップS415で、Iv値の調整によって画像BのEv値を画像AのEv値と等価にできるか否かが判定される。   In this case, since the Ev value of the image B and the Ev value of the image A cannot be made equivalent by adjusting the Tv value, Tv value = 10 (maximum value) is set in step S414. In step S415, it is determined whether or not the Ev value of the image B can be equivalent to the Ev value of the image A by adjusting the Iv value.

この際、ステップS411でAv値=0(最小値)とされているので、上記の式(5)によって、Iv=0+10−8=2となる。従って、Iv値の調整によって、画像Bを撮影する際に画像AのEv値と等価なEv値が得られることになる。よって、ステップS416において、上記のIv値が画像Bを撮影する際のIv値として決定されることになる。   At this time, since Av value = 0 (minimum value) is set in step S411, Iv = 0 + 10−8 = 2 according to the above equation (5). Therefore, by adjusting the Iv value, an Ev value equivalent to the Ev value of the image A is obtained when the image B is captured. Therefore, in step S416, the above Iv value is determined as the Iv value when the image B is captured.

この結果、画像Bを撮影する際の撮影パラメータとして、上記の条件1および2を満たす撮影パラメータが決定されることになる。   As a result, shooting parameters satisfying the above conditions 1 and 2 are determined as shooting parameters when shooting the image B.

図6は、図1に示す差分量演算部119による差分量の演算を説明するための図である。そして、図6(A)はある視点から全ての被写体にピントが合うような被写界深度となるように撮影パラメータを設定して撮影した際の画像を示す図であり、図6(B)は図6(A)と同一の視点から被写界深度が狭くなるような撮影パラメータを設定して撮影した画像であり際の画像を示す図である。また、図6(C)は差分量の算出の一例を示す図であり、図6(d)は差分量算出の他の例を示す図である。   FIG. 6 is a diagram for explaining the calculation of the difference amount by the difference amount calculation unit 119 shown in FIG. FIG. 6A is a diagram showing an image when shooting is performed with the shooting parameters set so that all the subjects are in focus from a certain viewpoint, and FIG. FIG. 7 is a diagram showing an image that is an image taken by setting shooting parameters such that the depth of field is narrowed from the same viewpoint as in FIG. 6A. FIG. 6C is a diagram illustrating an example of the difference amount calculation, and FIG. 6D is a diagram illustrating another example of the difference amount calculation.

図6(B)においては、主被写体にのみピントが合っており、差分量演算部119は、図6(A)および図6(B)に示す画像において、その同一位置における領域ついて画素値同士を減算して差分量を算出する。   In FIG. 6B, only the main subject is in focus, and the difference amount calculation unit 119 determines the pixel values of the regions at the same position in the images shown in FIGS. 6A and 6B. Is subtracted to calculate the difference amount.

例えば、図6(A)に示す領域500と図6(B)に示す領域502とが同一位置の領域(対応する領域)に当たり、同様に、領域501と領域503とが同一位置の領域に当たる。   For example, the region 500 shown in FIG. 6A and the region 502 shown in FIG. 6B correspond to regions at the same position (corresponding regions), and similarly, the region 501 and the region 503 correspond to regions at the same position.

図示の例では、注目画素を中心として3×3(Pixel)の領域について画素値同士の減算を行う。そして、差分量演算部119は画素毎の減算によって得られた差分値の絶対値の総和を求めて、各領域における差分量を算出する。   In the example shown in the figure, pixel values are subtracted from each other for a 3 × 3 (Pixel) region with the pixel of interest at the center. Then, the difference amount calculation unit 119 obtains the sum of absolute values of the difference values obtained by subtraction for each pixel, and calculates the difference amount in each region.

この結果、図6(A)においてピントが合っているが図6(B)ではピントが合っていない領域500および502については差分量が大きくなる(図6(C)参照)。一方、図6(A)および図6(B)の双方ともにピントが合っている領域501および503では差分量が小さくなる(理想的には0:図6(D)参照)。   As a result, the areas 500 and 502 that are in focus in FIG. 6A but not in focus in FIG. 6B have a larger difference amount (see FIG. 6C). On the other hand, the difference amount is small in the regions 501 and 503 in which both FIGS. 6A and 6B are in focus (ideally 0: see FIG. 6D).

なお、図6に示す例では、説明の便宜上に3×3の領域毎に差分演算を行っているが、差分演算を行う領域について設定可能な範囲で適宜決定される。また、差分量を演算する際には、2つの画像について同一位置の画素値同士を減算した後、ローパスフィルタ処理するようにしてもよい。   In the example illustrated in FIG. 6, the difference calculation is performed for each 3 × 3 area for convenience of explanation, but is appropriately determined within a settable range for the area where the difference calculation is performed. Further, when calculating the difference amount, after subtracting pixel values at the same position for two images, low-pass filter processing may be performed.

図7は、図1に示す奥行き方向決定部120による処理を説明するための図である。そして、図7(A)は差分量演算部で得られた差分量をマッピングした状態を示す図であり、図7(B)は2値化処理を行った結果を示す図である。   FIG. 7 is a diagram for describing processing by the depth direction determination unit 120 illustrated in FIG. 1. FIG. 7A is a diagram illustrating a state in which the difference amount obtained by the difference amount calculation unit is mapped, and FIG. 7B is a diagram illustrating a result of binarization processing.

なお、ここでは、説明の便宜上2値で奥行き方向を決定する場合について説明する。   Here, a case where the depth direction is determined with two values will be described for convenience of explanation.

差分量演算部119で求められた各領域における差分量を受けると、奥行き方向決定部120は当該差分量をマッピングして、例えば、図7(A)に示すイメージを得る。   When the difference amount in each region obtained by the difference amount calculation unit 119 is received, the depth direction determination unit 120 maps the difference amount to obtain, for example, the image shown in FIG.

図7(A)において、領域600〜602はそれぞれ差分なし領域、差分量小の領域、および差分量大の領域を示している。奥行き方向決定部120はこれら差分量と予め設定された閾値とを比較して差分量を2値化する。例えば、差分量が閾値を超えると、奥行き方向決定部120は当該領域を“1”とする。一方、差分量が閾値以下であると、奥行き方向決定部120は当該領域を“0”とする。そして、奥行き方向決定部120は、例えば、図7(B)に示す2値化結果を得る。   In FIG. 7A, regions 600 to 602 indicate a no-difference region, a small difference amount region, and a large difference amount region, respectively. The depth direction determination unit 120 compares these difference amounts with a preset threshold value and binarizes the difference amount. For example, when the difference amount exceeds the threshold value, the depth direction determination unit 120 sets the area to “1”. On the other hand, if the difference amount is equal to or smaller than the threshold value, the depth direction determination unit 120 sets the area to “0”. Then, the depth direction determination unit 120 obtains a binarization result illustrated in FIG. 7B, for example.

図6(B)において、領域603は差分のない領域(つまり、”0”の領域)を示し、領域604は差分が生じた領域(つまり、”1”の領域)を示している。この場合、被写界深度の特性から差分のない領域、つまり、領域603は合焦位置上に存在する被写体であるといえる。   In FIG. 6B, an area 603 indicates an area without a difference (that is, an area “0”), and an area 604 indicates an area where a difference occurs (that is, an area “1”). In this case, it can be said that the region having no difference from the characteristics of the depth of field, that is, the region 603 is a subject existing at the in-focus position.

また、一般に撮影者は主被写体に合焦位置を合わせるので、主被写体は構図の最手前に位置していることが多い。このため、奥行き方向決定部120は領域603が手前側(手前方向)の領域であり、領域604が奥側(背景方向)の領域であると決定する。   In general, since the photographer focuses on the main subject, the main subject is often positioned at the forefront of the composition. For this reason, the depth direction determination unit 120 determines that the region 603 is a front side (front side) region, and the region 604 is a back side (background direction) region.

なお、図7に示す例では、2値化によって画像中の領域の前後方向を決定するようにしたが、複数の閾値を設定して複数段階にその位置関係を決定するようにしてもよい。   In the example shown in FIG. 7, the front-rear direction of the region in the image is determined by binarization. However, a plurality of threshold values may be set to determine the positional relationship in a plurality of stages.

擬似ステレオ画像生成部123は、奥行き方向決定部120で得られた手前側領域および奥側領域を受けて、手前領域に属する画素に視差を割り当て左又は右にシフトして、左右眼用のステレオ画像(立体的画像である擬似ステレオ画像)を生成することになる。そして、CPU113は当該擬似ステレオ画像を表示部114に表示する。   The pseudo stereo image generation unit 123 receives the near side region and the far side region obtained by the depth direction determination unit 120, assigns parallax to the pixels belonging to the near region, and shifts to the left or right, and stereo for the left and right eyes An image (a pseudo stereo image that is a stereoscopic image) is generated. Then, the CPU 113 displays the pseudo stereo image on the display unit 114.

このように、本発明の第1の実施形態では、撮影者は特殊な操作を行う必要がなく、光学的な特性に基づいた簡単な演算によって画像の各領域についてその前後方向を決定することができ、撮影者への負担を軽減することができる。   As described above, in the first embodiment of the present invention, the photographer does not need to perform a special operation, and can determine the front-rear direction of each region of the image by a simple calculation based on optical characteristics. This can reduce the burden on the photographer.

さらに、ストロボ発光などを行う必要もなく、幅広い撮影シーンにおいて疑似ステレオ画像を撮影することができる。   Furthermore, it is not necessary to perform strobe light emission and the like, and a pseudo stereo image can be taken in a wide variety of shooting scenes.

[第2の実施形態]
続いて、本発明の第2の実施形態によるカメラについて説明する。
[Second Embodiment]
Subsequently, a camera according to a second embodiment of the present invention will be described.

図8は、本発明の第2の実施形態によるカメラについてその構成の一例を示すブロック図である。   FIG. 8 is a block diagram showing an example of the configuration of a camera according to the second embodiment of the present invention.

なお、図8において、図1に示すカメラと同一の構成要素については同一の参照番号を付す。また、図8に示すカメラはその構成が図1に示すカメラと異なるので、参照番号700を付す。   In FIG. 8, the same components as those in the camera shown in FIG. Further, since the camera shown in FIG. 8 is different from the camera shown in FIG.

図8に示すカメラ700は、後述する領域加算画像取得部(瞳分割画像取得部ともいう)712を有しており、この領域加算画像取得部712はA/D変換部105と信号処理部106との間に配置されている。そして、A/D変換部105であるデジタル信号が領域加算画像取得部712に入力される。   A camera 700 illustrated in FIG. 8 includes a region addition image acquisition unit (also referred to as a pupil-divided image acquisition unit) 712 described later. The region addition image acquisition unit 712 includes an A / D conversion unit 105 and a signal processing unit 106. It is arranged between. Then, a digital signal that is the A / D conversion unit 105 is input to the region addition image acquisition unit 712.

領域加算画像取得部712は、撮像素子104において複数の光電変換領域から得られる画像信号(デジタル信号)を互いに加算処理して被写界深度の異なる複数の画像信号を生成する。   The area addition image acquisition unit 712 adds the image signals (digital signals) obtained from the plurality of photoelectric conversion areas in the image sensor 104 to generate a plurality of image signals having different depths of field.

以下の説明では、領域加算画像取得部712において生成された被写界深度の異なる一対の画像信号をそれぞれ画像Aおよび画像Bと呼ぶ。これら画像AおよびBは信号処理部106に与えられる。信号処理部106は、画像AおよびBの各々について前述したように画素信号を加算した結果得られるベイヤー配列の画像信号について信号処理を行う。   In the following description, a pair of image signals having different depths of field generated by the region addition image acquisition unit 712 are referred to as an image A and an image B, respectively. These images A and B are given to the signal processing unit 106. The signal processing unit 106 performs signal processing on the image signals of the Bayer array obtained as a result of adding the pixel signals as described above for each of the images A and B.

図9は、図8に示すカメラ700で用いられる撮像素子104の構造を説明するための図である。そして、図9(A)は撮像素子104の撮像面(結像面)の一部を示す図であり、図9(B)は撮像素子104の画素を拡大して示す図である。また、図9(C)は画素に対する光の入射を示す図である。   FIG. 9 is a view for explaining the structure of the image sensor 104 used in the camera 700 shown in FIG. 9A is a diagram illustrating a part of the imaging surface (imaging plane) of the imaging device 104, and FIG. 9B is a diagram illustrating the pixels of the imaging device 104 in an enlarged manner. FIG. 9C shows the incidence of light on the pixel.

図9(A)に示すように、撮像素子104は、2次元マトリックス状に配列された複数の画素を有している。撮像素子104では画素上にそれぞれRGBのカラーフィルタが設けられ、分光特性の異なるR画素801、G画素802、およびB画素803が規則的に配置されている。そして、各画素はマイクロレンズ807および光電変換領域(光電変換部)を備えている。   As shown in FIG. 9A, the imaging element 104 has a plurality of pixels arranged in a two-dimensional matrix. In the image sensor 104, RGB color filters are provided on the pixels, and R pixels 801, G pixels 802, and B pixels 803 having different spectral characteristics are regularly arranged. Each pixel includes a microlens 807 and a photoelectric conversion region (photoelectric conversion unit).

図9(B)において、画素804は斜線で示す光電変換領域805および網線で示す光電変換領域806を有しており、これら光電変換領域805および806は同心円状に配置されている。そして、光電変換領域805および806はその面積が互いに等しい。   In FIG. 9B, a pixel 804 includes a photoelectric conversion region 805 indicated by diagonal lines and a photoelectric conversion region 806 indicated by mesh lines, and these photoelectric conversion regions 805 and 806 are arranged concentrically. The areas of the photoelectric conversion regions 805 and 806 are equal to each other.

図9(C)において、いま、光電変換領域805には点線(破線)で示す光束が入射されて光電変換される。一方、光電変換領域806には実線で示す光束が入射されて光電変換される。   In FIG. 9C, a light beam indicated by a dotted line (broken line) is incident on the photoelectric conversion region 805 and undergoes photoelectric conversion. On the other hand, a light beam indicated by a solid line enters the photoelectric conversion region 806 and undergoes photoelectric conversion.

光束の関係と光電変換領域の面積の関係とから、光電変換領域806で得られた画素信号(第1の画像および第2の画像の一方)は、光電変換領域805および806で得られた画素信号を加算処理した加算信号(第1および第2の画像の他方)に対して絞りを1段変更して得られた画素信号と同等になる。つまり、1回の撮影で被写界深度の異なる2枚の画像進行が取得できることになる。   From the relationship between the luminous flux and the area of the photoelectric conversion region, the pixel signal (one of the first image and the second image) obtained in the photoelectric conversion region 806 is the pixel obtained in the photoelectric conversion regions 805 and 806. This is equivalent to a pixel signal obtained by changing the aperture one stage with respect to an addition signal (the other of the first and second images) obtained by adding the signals. That is, it is possible to acquire two image progressions having different depths of field in one shooting.

なお、図9に示す例では、光電変換領域を2つの領域に分割したが、光電変換領域を3つ以上の領域に分割すれば、互いに被写体深度の異なる複数の画像信号を得ることができる。そして、光電変換領域を3つ以上の領域に分割した際においては、同心円の最も内側に位置する領域で得られる画像と全ての領域で得られる画像とが最も被写界深度の異なる2枚の画像となる。   In the example shown in FIG. 9, the photoelectric conversion area is divided into two areas. However, if the photoelectric conversion area is divided into three or more areas, a plurality of image signals having different subject depths can be obtained. When the photoelectric conversion area is divided into three or more areas, the images obtained in the innermost area of the concentric circles and the images obtained in all the areas have two different depths of field. It becomes an image.

図10は、図8に示すカメラ700において行われる擬似ステレオ画像の取得を説明するためのフローチャートである。なお、図10において、図3と同一のステップについては同一の参照符号を付す。   FIG. 10 is a flowchart for explaining the pseudo-stereo image acquisition performed in the camera 700 shown in FIG. In FIG. 10, the same steps as those in FIG. 3 are denoted by the same reference numerals.

ステップS301において、擬似ステレオ画像撮影モードが選択されると、CPU113は設定された撮影パラメータに応じて主被写体にピントを合わせて撮影を行う(ステップS902)。   When the pseudo stereo image shooting mode is selected in step S301, the CPU 113 performs shooting while focusing on the main subject according to the set shooting parameters (step S902).

なお、撮影パラメータの設定に当たっては、撮影者が撮影パラメータ設定部115で設定した撮影パラメータを用いるようにしてもよく、予め定められた撮影パラメータを用いるようにしてもよい。   In setting the shooting parameters, the shooting parameters set by the shooting person using the shooting parameter setting unit 115 may be used, or predetermined shooting parameters may be used.

続いて、瞳分割画像取得部712は複数の光電変換領域によって得られた画像信号を用いて(つまり、瞳分割によって)被写界深度の異なる2枚の画像信号を生成する(ステップS903)。そして、2枚の画像信号は信号処理部106で信号処理された後、画像AおよびBとしてCPU113に与えられる。   Subsequently, the pupil divided image acquisition unit 712 generates two image signals having different depths of field using the image signals obtained by the plurality of photoelectric conversion regions (that is, by pupil division) (step S903). Then, the two image signals are subjected to signal processing by the signal processing unit 106 and then given to the CPU 113 as images A and B.

この際、信号処理部106は、CPU113の制御下で2枚の画像信号のレベルが等価になるようにゲインの調整を行い、被写界深度の異なる2枚の画像信号の露出を等価に処理する(ステップS904)。   At this time, the signal processing unit 106 adjusts the gain so that the levels of the two image signals are equivalent under the control of the CPU 113, and processes the exposure of the two image signals having different depths of field equivalently. (Step S904).

その後、図3で説明したようにして、ステップS306〜S308の処理が行われて、擬似ステレオ画像取得処理が終了する。   Thereafter, as described with reference to FIG. 3, the processes of steps S306 to S308 are performed, and the pseudo stereo image acquisition process is ended.

このように、本発明の第2の実施形態では、一回の撮影によって擬似ステレオ画像を得ることができるので、第1の実施形態の効果に加えて、さらに撮影者の負担を低減することができる。   As described above, in the second embodiment of the present invention, since a pseudo stereo image can be obtained by one shooting, in addition to the effects of the first embodiment, the burden on the photographer can be further reduced. it can.

上述の説明から明らかなように、図1に示す例においては、撮影レンズユニット101、撮像素子105、A/D変換部105、信号処理部106、およびシステム制御用CPU113が撮像手段として機能する。また、差分量演算部119およびシステム制御用CPU113が差分量算出手段として機能する。   As is clear from the above description, in the example shown in FIG. 1, the photographing lens unit 101, the image sensor 105, the A / D conversion unit 105, the signal processing unit 106, and the system control CPU 113 function as an imaging unit. Further, the difference amount calculation unit 119 and the system control CPU 113 function as a difference amount calculation unit.

さらに、奥行き方向決定部120およびシステム制御用CPU113が奥行き決定手段として機能し、擬似ステレオ画像生成部123およびシステム制御用CPU113がステレオ画像生成手段として機能する。   Further, the depth direction determination unit 120 and the system control CPU 113 function as depth determination means, and the pseudo stereo image generation unit 123 and the system control CPU 113 function as stereo image generation means.

加えて、図8に示す例において、領域加算画像取得部712、信号処理部106、およびシステム制御用CPU113が領域加算手段として機能し、信号処理部106およびシステム制御用CPU113がゲイン調整手段として機能する。   In addition, in the example shown in FIG. 8, the region addition image acquisition unit 712, the signal processing unit 106, and the system control CPU 113 function as a region addition unit, and the signal processing unit 106 and the system control CPU 113 function as a gain adjustment unit. To do.

以上、本発明について実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not limited to these embodiment, Various forms of the range which does not deviate from the summary of this invention are also contained in this invention. .

例えば、上記の実施の形態の機能を制御方法として、この制御方法を撮像装置に実行させるようにすればよい。また、上述の実施の形態の機能を有するプログラムを制御プログラムとして、当該制御プログラムを撮像装置が備えるコンピュータに実行させるようにしてもよい。なお、制御プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録される。   For example, the function of the above embodiment may be used as a control method, and this control method may be executed by the imaging apparatus. Further, a program having the functions of the above-described embodiments may be used as a control program, and the control program may be executed by a computer included in the imaging apparatus. The control program is recorded on a computer-readable recording medium, for example.

上記の制御方法および制御プログラムの各々は、少なくとも撮像ステップ、差分量算出ステップ、奥行き決定ステップ、およびステレオ画像生成ステップを有している。   Each of the above control method and control program has at least an imaging step, a difference amount calculating step, a depth determining step, and a stereo image generating step.

また、本発明は、以下の処理を実行することによっても実現される。つまり、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種の記録媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPUなど)がプログラムを読み出して実行する処理である。   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 recording media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the program. To be executed.

104 撮像素子
105 A/D変換部
113 システム制御用CPU
114 表示部
115 撮影パラメータ設定部
116 撮影モード切替部
119 差分量演算部
120 奥行き方向決定部
123 疑似ステレオ画像生成部
712 領域加算画像取得部(瞳分割画像取得部)
104 Image sensor 105 A / D converter 113 CPU for system control
114 Display unit 115 Shooting parameter setting unit 116 Shooting mode switching unit 119 Difference amount calculation unit 120 Depth direction determination unit 123 Pseudo stereo image generation unit 712 Region addition image acquisition unit (pupil division image acquisition unit)

Claims (12)

互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像手段と、
前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出手段と、
前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定手段と、
前記奥行きに応じて前記第1の画像又は第2の画像から右目用画像および左目用画像を生成するステレオ画像生成手段と、
を備えることを特徴とする撮像装置。
Imaging means for capturing a first image and a second image having different depths of field;
Difference amount calculation means for obtaining a difference amount by obtaining a difference between pixel values in regions corresponding to each other for the first image and the second image;
Depth determining means for determining the depth in the image for each of the regions according to the difference amount;
Stereo image generation means for generating a right-eye image and a left-eye image from the first image or the second image according to the depth;
An imaging apparatus comprising:
前記撮像手段は連続撮影によって前記第1の画像および前記第2の画像を得ることを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the imaging unit obtains the first image and the second image by continuous shooting. 前記撮像手段は、2次元マトリックス状に画素が配列された撮像素子を備え、前記画素の各々に備えられた光電変換部が同心円状に複数の光電変換領域に分割されており、
さらに、前記撮像手段は、前記複数の光電変換領域から得られる画像信号を加算処理して互いに被写体深度の異なる前記第1の画像および前記第2の画像を得る領域加算手段を有することを特徴とする請求項1に記載の撮像装置。
The imaging means includes an imaging device in which pixels are arranged in a two-dimensional matrix, and a photoelectric conversion unit provided in each of the pixels is concentrically divided into a plurality of photoelectric conversion regions,
Furthermore, the imaging means includes area addition means for obtaining the first image and the second image having different subject depths by adding image signals obtained from the plurality of photoelectric conversion areas. The imaging device according to claim 1.
前記差分量算出手段は、前記対応する領域において画素毎の画素値の差分を求めて当該差分の絶対値の和を差分量とすることを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。   The difference amount calculation unit obtains a difference between pixel values for each pixel in the corresponding region, and uses a sum of absolute values of the differences as a difference amount. The imaging device described. 前記奥行き決定手段は前記差分量と予め設定された閾値とを比較して、その比較結果に応じて前記領域が手前側に位置するか又は奥側に位置するかを示す奥行きを決定することを特徴とする請求項1〜4のいずれか1項に記載の撮像装置。   The depth determination means compares the difference amount with a preset threshold value, and determines a depth indicating whether the region is located on the near side or the far side according to the comparison result. The imaging apparatus according to claim 1, wherein the imaging apparatus is characterized. 前記撮像手段は、前記第2の画像を撮影する際、前記第1の画像を撮影した際の露光量と等価な露光量とすることを特徴とする請求項2に記載の撮像装置。   The imaging apparatus according to claim 2, wherein when the second image is captured, the imaging unit sets an exposure amount equivalent to an exposure amount when the first image is captured. 前記撮像手段は、前記第2の画像を撮影する際、前記第1の画像を撮影した際の被写界深度に対して被写界深度を変化させて撮影を行うことを特徴とする請求項6に記載の撮像装置。   The imaging unit, when capturing the second image, performs imaging by changing the depth of field with respect to the depth of field at the time of capturing the first image. 6. The imaging device according to 6. 前記撮像手段は、前記第2の画像を撮影する際、前記第1の画像を撮影した際のシャッタースピードよりも遅くならないようにシャッタースピードの設定を行うことを特徴とする請求項7に記載の撮像装置。   8. The image pickup unit according to claim 7, wherein when the second image is taken, the shutter speed is set so as not to be slower than a shutter speed at which the first image is taken. Imaging device. 前記領域加算手段で得られた前記第1の画像および前記第2の画像のレベルが等価になるようにゲインを調整するゲイン調整手段を有すること特徴する請求項3に記載の撮像装置。   The imaging apparatus according to claim 3, further comprising: a gain adjusting unit that adjusts a gain so that levels of the first image and the second image obtained by the region adding unit are equivalent. 前記領域加算手段は前記第1の画像として前記複数の光電変換領域のうち最も内側に位置する光電変換領域から出力された画像信号に応じて前記第1の画像および前記第2の画像の一方を生成し、前記複数の光電変換領域から出力された全ての画像信号を加算して前記第1の画像および前記第2の画像の他方を生成することを特徴とする請求項3又は9に記載の撮像装置。   The region adding means outputs one of the first image and the second image according to an image signal output from the innermost photoelectric conversion region among the plurality of photoelectric conversion regions as the first image. 10. The method according to claim 3, wherein the second image is generated by adding all image signals output from the plurality of photoelectric conversion regions and generating the other of the first image and the second image. Imaging device. 被写体を撮影して得られた画像から立体的画像であるステレオ画像を生成する撮像装置の制御方法であって、
互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像ステップと、
前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出ステップと、
前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定ステップと、
前記奥行きに応じて前記第1の画像又は第2の画像から前記ステレオ画像として右目用画像および左目用画像を生成するステレオ画像生成ステップと、
を備えることを特徴とする制御方法。
A method for controlling an imaging apparatus that generates a stereoscopic image that is a stereoscopic image from an image obtained by photographing a subject,
An imaging step of capturing a first image and a second image having different depths of field;
A difference amount calculating step of obtaining a difference amount by obtaining a difference between pixel values in regions corresponding to each other with respect to the first image and the second image;
A depth determining step for determining a depth in the image for each of the regions according to the difference amount;
A stereo image generation step of generating a right-eye image and a left-eye image as the stereo image from the first image or the second image according to the depth;
A control method comprising:
被写体を撮影して得られた画像から立体的画像であるステレオ画像を生成する撮像装置で用いられる制御プログラムであって、
前記撮像装置が備えるコンピュータに、
互いに被写界深度の異なる第1の画像および第2の画像を撮影する撮像ステップと、
前記第1の画像および第2の画像について互いに対応する領域において画素値の差分を求めて差分量を得る差分量算出ステップと、
前記差分量に応じて前記領域の各々について画像中の奥行きを決定する奥行き決定ステップと、
前記奥行きに応じて前記第1の画像又は第2の画像から前記ステレオ画像として右目用画像および左目用画像を生成するステレオ画像生成ステップと、
を実行させることを特徴とする制御プログラム。
A control program used in an imaging apparatus that generates a stereoscopic image that is a stereoscopic image from an image obtained by photographing a subject,
In the computer provided in the imaging device,
An imaging step of capturing a first image and a second image having different depths of field;
A difference amount calculating step of obtaining a difference amount by obtaining a difference between pixel values in regions corresponding to each other with respect to the first image and the second image;
A depth determining step for determining a depth in the image for each of the regions according to the difference amount;
A stereo image generation step of generating a right-eye image and a left-eye image as the stereo image from the first image or the second image according to the depth;
A control program characterized by causing
JP2012176949A 2012-08-09 2012-08-09 Imaging device, control method therefor, and control program Pending JP2014036362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012176949A JP2014036362A (en) 2012-08-09 2012-08-09 Imaging device, control method therefor, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012176949A JP2014036362A (en) 2012-08-09 2012-08-09 Imaging device, control method therefor, and control program

Publications (1)

Publication Number Publication Date
JP2014036362A true JP2014036362A (en) 2014-02-24

Family

ID=50285085

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012176949A Pending JP2014036362A (en) 2012-08-09 2012-08-09 Imaging device, control method therefor, and control program

Country Status (1)

Country Link
JP (1) JP2014036362A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2015170762A1 (en) * 2014-05-09 2017-04-20 株式会社湯山製作所 Drug sorting device
US9769456B2 (en) 2014-11-13 2017-09-19 Samsung Electronics Co., Ltd. Camera for measuring depth image and method of measuring depth image
KR20170115803A (en) * 2016-04-08 2017-10-18 재단법인 다차원 스마트 아이티 융합시스템 연구단 Multi aperture camera for improving depth accuracy with low compexity and opertation method thereof
WO2022201319A1 (en) * 2021-03-23 2022-09-29 日本電信電話株式会社 Image processing device, method, and program
WO2022201305A1 (en) * 2021-03-23 2022-09-29 日本電信電話株式会社 Image processing device, method, and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009207188A (en) * 2009-06-15 2009-09-10 Seiko Epson Corp Imaging apparatus and computer program
JP2010191366A (en) * 2009-02-20 2010-09-02 Nikon Corp Imaging apparatus
JP2011019088A (en) * 2009-07-09 2011-01-27 Fujifilm Corp Compound eye imaging apparatus
JP2011066827A (en) * 2009-09-18 2011-03-31 Casio Computer Co Ltd Image processing apparatus, image processing method and program
WO2012056686A1 (en) * 2010-10-27 2012-05-03 パナソニック株式会社 3d image interpolation device, 3d imaging device, and 3d image interpolation method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010191366A (en) * 2009-02-20 2010-09-02 Nikon Corp Imaging apparatus
JP2009207188A (en) * 2009-06-15 2009-09-10 Seiko Epson Corp Imaging apparatus and computer program
JP2011019088A (en) * 2009-07-09 2011-01-27 Fujifilm Corp Compound eye imaging apparatus
JP2011066827A (en) * 2009-09-18 2011-03-31 Casio Computer Co Ltd Image processing apparatus, image processing method and program
WO2012056686A1 (en) * 2010-10-27 2012-05-03 パナソニック株式会社 3d image interpolation device, 3d imaging device, and 3d image interpolation method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2015170762A1 (en) * 2014-05-09 2017-04-20 株式会社湯山製作所 Drug sorting device
US9769456B2 (en) 2014-11-13 2017-09-19 Samsung Electronics Co., Ltd. Camera for measuring depth image and method of measuring depth image
KR20170115803A (en) * 2016-04-08 2017-10-18 재단법인 다차원 스마트 아이티 융합시스템 연구단 Multi aperture camera for improving depth accuracy with low compexity and opertation method thereof
WO2022201319A1 (en) * 2021-03-23 2022-09-29 日本電信電話株式会社 Image processing device, method, and program
WO2022201305A1 (en) * 2021-03-23 2022-09-29 日本電信電話株式会社 Image processing device, method, and program
JP7456553B2 (en) 2021-03-23 2024-03-27 日本電信電話株式会社 Image processing device, method and program

Similar Documents

Publication Publication Date Title
US8599245B2 (en) Image processing apparatus, camera, and image processing method
US8885026B2 (en) Imaging device and imaging method
US9077976B2 (en) Single-eye stereoscopic image capturing device
US8854528B2 (en) Imaging apparatus
US8823778B2 (en) Imaging device and imaging method
CN108462830B (en) Image pickup apparatus and control method of image pickup apparatus
JP5788518B2 (en) Monocular stereoscopic photographing apparatus, photographing method and program
US20110109727A1 (en) Stereoscopic imaging apparatus and imaging control method
US9838667B2 (en) Image pickup apparatus, image pickup method, and non-transitory computer-readable medium
JP2013150362A (en) Monocular three-dimensional imaging device and method for controlling the same
JP2013041103A (en) Image pickup apparatus, control method thereof, and program
JP5449551B2 (en) Image output apparatus, method and program
JP2014036362A (en) Imaging device, control method therefor, and control program
US20110025824A1 (en) Multiple eye photography method and apparatus, and program
WO2014064946A1 (en) Image capture device, image processing device, image capture device control program, and image processing device control program
JP5160460B2 (en) Stereo imaging device and stereo imaging method
US9106900B2 (en) Stereoscopic imaging device and stereoscopic imaging method
US9124866B2 (en) Image output device, method, and recording medium therefor
JP5825932B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM
JP2012124650A (en) Imaging apparatus, and imaging method
JP5860251B2 (en) Imaging apparatus, control method therefor, and program
WO2015163350A1 (en) Image processing device, imaging device and image processing program
JP2012028871A (en) Stereoscopic image display device, stereoscopic image photographing device, stereoscopic image display method, and stereoscopic image display program
JP2010028219A (en) Photographing apparatus
CN105939471B (en) Image processing apparatus, photographic device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150717

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160517

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160714

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170110