JP2012108263A - Image calculation unit and image calculation program - Google Patents

Image calculation unit and image calculation program Download PDF

Info

Publication number
JP2012108263A
JP2012108263A JP2010256193A JP2010256193A JP2012108263A JP 2012108263 A JP2012108263 A JP 2012108263A JP 2010256193 A JP2010256193 A JP 2010256193A JP 2010256193 A JP2010256193 A JP 2010256193A JP 2012108263 A JP2012108263 A JP 2012108263A
Authority
JP
Japan
Prior art keywords
image
distance
distance information
parallax
unit
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.)
Withdrawn
Application number
JP2010256193A
Other languages
Japanese (ja)
Inventor
Hiroko Kobayashi
寛子 小林
Shinichi Nakajima
伸一 中島
Hironori Yazawa
洋紀 矢澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2010256193A priority Critical patent/JP2012108263A/en
Publication of JP2012108263A publication Critical patent/JP2012108263A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)

Abstract

PROBLEM TO BE SOLVED: To acquire accurate depth information of a subject image.SOLUTION: An image calculation unit comprises: an image acquisition part for acquiring parallax image data about mutually-parallactic images that are output from a light-receiving element for detecting incident subject light flux after separating it into multiple wavelength ranges and that correspond to at least two of the wavelength ranges; a distance information acquisition part for acquiring distance information to at least one focused object in a state of being focused in the parallax image data and distance information to at least one non-focused object in a state of not being focused therein; and a calculation part for separating multiple objects included in a parallax image in a depth direction to set an outline by executing matching processing between the parallax image data through the use of a local window regulated according to a window size based on the distance information.

Description

本発明は、画像演算装置および画像演算プログラムに関する。   The present invention relates to an image calculation device and an image calculation program.

レンズ光学系の絞り位置にRGB三色のカラーフィルタからなる構造化開口を配置したカメラでシーンを撮影することにより、一枚の画像データからシーンの奥行き情報を取得する技術が知られている(例えば非特許文献1)。
[先行技術文献]
[非特許文献1]カメラの絞りに色フィルタを用いた奥行き推定と前景マット抽出(Visual Computing/グラフィクスとCAD合同シンポジウム2008)
A technique is known in which scene depth information is obtained from a single piece of image data by photographing a scene with a camera in which a structured aperture composed of RGB color filters is arranged at the aperture position of the lens optical system ( For example, Non-Patent Document 1).
[Prior art documents]
[Non-Patent Document 1] Depth estimation and foreground mat extraction using a color filter for the diaphragm of a camera (Visual Computing / Graphics and CAD Joint Symposium 2008)

奥行き情報を演算する過程で用いられるマッチング処理の局所ウィンドウについて、そのサイズを適切に設定しないと正確な奥行き情報が得られなかった。   For the local window of the matching process used in the process of calculating the depth information, accurate depth information cannot be obtained unless the size is set appropriately.

上記課題を解決するために、本発明の第1の態様における画像演算装置は、入射する被写体光束を複数の波長帯に分離して検出する受光素子から出力され、複数の波長帯の少なくとも2つに対応する画像が互いに視差を有する視差画像データを取得する画像取得部と、視差画像データにおいて合焦状態にある少なくとも一つの合焦物体までの距離情報と非合焦状態にある少なくとも一つの非合焦物体までの距離情報を取得する距離情報取得部と、距離情報に基づくウィンドウサイズにより規定される局所ウィンドウを用いて視差画像データ間のマッチング処理を行うことにより、視差画像に含まれる複数の物体に対して奥行き方向に分離して輪郭を定める演算部とを備える。   In order to solve the above-described problem, the image calculation apparatus according to the first aspect of the present invention outputs from a light receiving element that detects an incident subject light beam by separating it into a plurality of wavelength bands, and outputs at least two of the plurality of wavelength bands. An image acquisition unit that acquires parallax image data in which images corresponding to each other have parallax, and distance information to at least one focused object that is in focus in the parallax image data and at least one non-focused state By performing a matching process between parallax image data using a distance information acquisition unit that acquires distance information to a focused object and a local window defined by a window size based on the distance information, a plurality of parallax images are included. A computing unit that separates the object in the depth direction and determines an outline.

上記課題を解決するために、本発明の第2の態様における画像演算プログラムは、入射する被写体光束を複数の波長帯に分離して検出する受光素子から出力され、複数の波長帯の少なくとも2つに対応する画像が互いに視差を有する視差画像データを取得する画像取得ステップと、視差画像データにおいて合焦状態にある少なくとも一つの合焦物体までの距離情報と非合焦状態にある少なくとも一つの非合焦物体までの距離情報を取得する距離情報取得ステップと、距離情報に基づくウィンドウサイズにより規定される局所ウィンドウを用いて視差画像データ間のマッチング処理を行うことにより、視差画像に含まれる複数の物体に対して奥行き方向に分離して輪郭を定める演算ステップとをコンピュータに実行させる。   In order to solve the above-described problem, an image calculation program according to the second aspect of the present invention is output from a light receiving element that detects an incident subject luminous flux by separating it into a plurality of wavelength bands, and at least two of the plurality of wavelength bands are detected. An image acquisition step of acquiring parallax image data in which images corresponding to each other have parallax, distance information to at least one in-focus object in the in-focus state in the parallax image data, and at least one non-in-focus state A distance information acquisition step for acquiring distance information to the in-focus object and a matching process between the parallax image data using a local window defined by the window size based on the distance information, thereby performing a plurality of processes included in the parallax image And causing the computer to execute a calculation step of determining an outline by separating the object in the depth direction.

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

本実施形態に係る一眼レフカメラの要部断面図である。It is principal part sectional drawing of the single-lens reflex camera which concerns on this embodiment. 本実施形態に係る構造化開口ユニットの外観図である。It is an external view of the structured opening unit concerning this embodiment. 構造化開口ユニットをレンズユニットに装着する様子を示す図である。It is a figure which shows a mode that a structured opening unit is attached to a lens unit. 撮像素子の画素上に配置されたカラーフィルタの説明図である。It is explanatory drawing of the color filter arrange | positioned on the pixel of an image pick-up element. 撮像素子の画素が感度を有する波長帯と、構造化開口のそれぞれのフィルタ部が透過する波長帯の関係を示す図である。It is a figure which shows the relationship between the wavelength band which the pixel of an image pick-up element has a sensitivity, and the wavelength band which each filter part of structured opening permeate | transmits. 一眼レフカメラのシステム構成を概略的に示すブロック図である。1 is a block diagram schematically showing a system configuration of a single-lens reflex camera. 本撮影画像および補助撮影画像の取得フローを示す図である。It is a figure which shows the acquisition flow of a main imaging | photography image and an auxiliary | assistant imaging | photography image. 光学ファインダから観察される被写体像および測距領域を示す図である。It is a figure which shows the to-be-photographed image observed from an optical finder, and a ranging area. 取得されるオブジェクト距離を説明する図である。It is a figure explaining the object distance acquired. オブジェクト領域と局所ウィンドウの関係を示す概念図である。It is a conceptual diagram which shows the relationship between an object area | region and a local window. 出力される距離画像の概念を説明する図である。It is a figure explaining the concept of the distance image output. オブジェクトと視差量の関係を表す概念図である。It is a conceptual diagram showing the relationship between an object and the amount of parallax. 補助撮影画像の取得から奥行き情報の出力までの処理フローを示す図である。It is a figure which shows the processing flow from acquisition of an auxiliary | assistant picked-up image to the output of depth information. 補助撮影画像の取得から奥行き情報の出力までの他の処理フローを示す図である。It is a figure which shows the other processing flow from acquisition of an auxiliary captured image to output of depth information.

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

まず、本実施形態におけるシーンの奥行き情報の取得原理について説明する。ここで、シーンの奥行き情報とは、シーンを構成する被写体としての各オブジェクト間の相対的な前後関係を示す距離情報である。画像演算装置は、距離情報として例えば、シーンの奥行き方向における合焦面を基準として、当該基準からそれぞれのオブジェクトの距離を出力する。画像演算装置は、特に、シーンを構成する各オブジェクトに対して、算出された距離に基づいて奥行き方向に分離して輪郭を定める。   First, the principle of acquiring scene depth information in this embodiment will be described. Here, the depth information of the scene is distance information indicating a relative front-rear relationship between each object as a subject constituting the scene. For example, the image calculation device outputs the distance of each object from the reference with respect to the focal plane in the depth direction of the scene as the reference. In particular, the image calculation device separates the objects in the scene in the depth direction based on the calculated distance and defines the contour.

本実施形態においては、被写体光束をCCD、CMOS等によって構成される受光素子に導く光学系に、構造化開口を挿入して、奥行き情報を演算するための補助撮影画像を取得する。構造化開口は、光学系に挿入されたときに、R(赤)G(緑)B(青)の各カラーフィルタが、光学系の光軸に対してそれぞれ偏心した位置となるように設けられて構成されている。例えば、光軸中心から、左方向へ放射状に延在するGフィルタ領域、上方向へ放射状に延在するRフィルタ領域および右方向へ放射状に延在するBフィルタ領域のようにカラーフィルタパターンが形成される。また、受光素子は、RGBのいずれかのカラーフィルタが各画素上に配置されており、例えば4画素を1組とするベイヤー配列が採用される。本実施形態に係る構造化開口の構成、および受光素子の構成は、後に詳述する。   In the present embodiment, a structured aperture is inserted into an optical system that guides a subject light beam to a light receiving element constituted by a CCD, a CMOS, etc., and an auxiliary captured image for calculating depth information is acquired. The structured aperture is provided so that each color filter of R (red), G (green), and B (blue) is decentered with respect to the optical axis of the optical system when inserted into the optical system. Configured. For example, a color filter pattern is formed such as a G filter region extending radially from the optical axis center to the left, an R filter region extending radially upward, and a B filter region extending radially to the right. Is done. The light receiving element has one of RGB color filters arranged on each pixel. For example, a Bayer arrangement in which four pixels are one set is employed. The structure of the structured opening and the structure of the light receiving element according to this embodiment will be described in detail later.

上述の例によるカラーフィルタパターンが形成された構造化開口を通過した被写体光束を、上述の受光素子で撮影した場合、焦点の合った奥行きより近い点はRが下、Gが右、Bが左方向にそれぞれずれて観測される。焦点の合った奥行きより遠い点ではずれ方向が逆になる。焦点の合っている奥行きでは画像はずれない。つまり、焦点の合っていない奥行きでは、シーンの同じ点が色ごとにずれて観察される。   When the subject light flux that has passed through the structured aperture in which the color filter pattern according to the above example is formed is photographed by the above-described light receiving element, R is below, G is on the right, and B is on the left near the in-focus depth. Observed in different directions. The direction of displacement is reversed at points farther than the in-focus depth. The image will not shift at the depth of focus. In other words, at the out-of-focus depth, the same point in the scene is observed shifted for each color.

別言すれば、撮影した補助撮影画像のRGB成分であるI、I、Iは、三視点のステレオ画像となる。仮想的な中央の視点をリファレンス座標に取れば、リファレンス座標(x,y)における視差をd画素とすると、I(x,y−d)、I(x+d,y)、I(x−d,y)が対応するから、これらが最も良く一致するdを視差の推定値とすることができる。しかし、観測波長帯が異なるため対応点の輝度レベルは位置しないので、単純な輝度の差分をマッチング指標にすることはできない。 In other words, I r , I g , and I b that are RGB components of the captured auxiliary captured image are three-viewpoint stereo images. If the virtual central viewpoint is taken as the reference coordinate, and the parallax at the reference coordinate (x, y) is d pixels, I r (x, y−d), I g (x + d, y), I b (x -D, y) corresponds, and d that best matches them can be used as an estimated value of parallax. However, since the luminance level of the corresponding point is not located because the observation wavelength bands are different, a simple luminance difference cannot be used as a matching index.

そこで、ここでは自然画像の色成分は局所的に線形関係を示す傾向が高いことを利用する。(x,y)の周りに局所ウィンドウw(x,y)を考え、そこに含まれる画素色の集合をS(x,y;d)={(I(s,t−d)、I(s+d,t)、I(s−d,t))|(s,t)∈w(x,y)}とすると、真のdのときに分布が最も直線に近くなると考えられる。 Therefore, the fact that the color component of the natural image has a high tendency to show a linear relationship locally is used here. A local window w (x, y) is considered around (x, y), and a set of pixel colors included therein is defined as S (x, y; d) = {(I r (s, t−d), I If g (s + d, t), I b (s−d, t)) | (s, t) ∈w (x, y)}, the distribution is considered to be closest to a straight line when true d.

ここではRGB間の線形関係を計る指標として以下を用いる。

Figure 2012108263
ただしλ、λ、λ(λ≧λ≧λ≧0)は色分布S(x,y;d)の主成分軸に沿った分散(すなわちS(x,y;d)の共分散行列Σの固有値)、σ 、σ 、σ は色分布のR、G、B軸に沿った分散である。ここでは表記の簡単のため右辺のx、y、dへの依存については省略した。 Here, the following is used as an index for measuring the linear relationship between RGB.
Figure 2012108263
However, λ 0 , λ 1 , λ 20 ≧ λ 1 ≧ λ 2 ≧ 0) is a dispersion along the principal component axis of the color distribution S (x, y; d) (that is, S (x, y; d) ), Σ r 2 , σ g 2 , and σ b 2 are variances along the R, G, and B axes of the color distribution. Here, the dependency on the right side x, y, d is omitted for the sake of simplicity.

行列の性質からλ+λ+λ=σ +σ +σ (=trace(Σ))であるので、固有値間の大小に差があるほど式(1)は小さくなる。直線的な分布(λ>>λ、λ)であればLは0に近く、完全無相関(固有値がR、G、B軸に沿った分散に等しい)のとき最大値L=1をとる。 Since it is λ 0 + λ 1 + λ 2 = σ r 2 + σ g 2 + σ b 2 (= trace (Σ)) due to the nature of the matrix, equation (1) becomes smaller as there is a difference in magnitude between eigenvalues. If the distribution is linear (λ 0 >> λ 1 , λ 2 ), L is close to 0, and the maximum value L = 1 when the correlation is completely uncorrelated (the eigenvalue is equal to the variance along the R, G, and B axes). Take.

画像の各点、おおび取りうる範囲の各視差dについてL(x,y;d)を計算する必要があるが、Summed Area Tableを用いてI、I、Iとそれらの二乗と積の表を計算しておけば、局所ウィンドウのサイズに依存せずに共分散行列Σの各要素を計算することができる。また、式(1)の分子は行列の性質からλλλ=det(Σ)であるので固有値を実際に計算する必要はない。 It is necessary to calculate L (x, y; d) for each point of the image, and for each disparity d in the range that can be taken, but using Summed Area Table, I r , I g , I b and their squares If the product table is calculated, each element of the covariance matrix Σ can be calculated without depending on the size of the local window. Further, since the numerator of the equation (1) is λ 0 λ 1 λ 2 = det (Σ) due to the matrix property, it is not necessary to actually calculate the eigenvalue.

上述のように計算される各オブジェクト単位の視差dにより、シーンの奥行き情報を推定することができる。本実施形態に係る画像演算装置としての一眼レフカメラは、このようなシーンの奥行き情報の取得原理を採用する。ただし、上述の手法において、マッチング処理を行う局所ウィンドウのウィンドウサイズを適切に設定しなければ、算出される距離、および算出距離から確定されるオブジェクトの輪郭の精度が低くなる。そこで、本実施形態の一眼レフカメラでは、奥行き情報の算出において、予め取得されている距離情報を利用してウィンドウサイズの最適化を図る。以下に本実施形態について説明する。   The depth information of the scene can be estimated by the parallax d of each object calculated as described above. The single-lens reflex camera as the image arithmetic apparatus according to the present embodiment employs such a principle of acquiring depth information of a scene. However, in the above-described method, if the window size of the local window for performing the matching process is not set appropriately, the calculated distance and the accuracy of the contour of the object determined from the calculated distance are lowered. In view of this, in the single-lens reflex camera of this embodiment, the optimization of the window size is attempted using the distance information acquired in advance in the calculation of the depth information. This embodiment will be described below.

図1は、本実施形態に係る一眼レフカメラ200の要部断面図である。一眼レフカメラ200は、撮影レンズであるレンズユニット210とカメラボディであるカメラユニット230が組み合わされて撮像装置として機能する。   FIG. 1 is a cross-sectional view of a main part of a single-lens reflex camera 200 according to the present embodiment. The single-lens reflex camera 200 functions as an imaging device by combining a lens unit 210 that is a photographing lens and a camera unit 230 that is a camera body.

レンズユニット210は、光軸201に沿って配列されたレンズ群211を備える。レンズ群211には、フォーカスレンズ212、ズームレンズ213が含まれる。また、光軸201に沿って、絞り214および構造化開口ユニット300も配列される。構造化開口ユニット300は、被写体光束に対して挿抜することができる。   The lens unit 210 includes a lens group 211 arranged along the optical axis 201. The lens group 211 includes a focus lens 212 and a zoom lens 213. An aperture 214 and a structured aperture unit 300 are also arranged along the optical axis 201. The structured aperture unit 300 can be inserted into and removed from the subject light flux.

レンズユニット210は、フォーカスレンズ212、絞り214の駆動などレンズユニット210の制御および演算を司るレンズシステム制御部216を備える。レンズユニット210を構成する各要素は、レンズ鏡筒217に支持されている。位置センサ221は、フォーカスレンズ212の位置を検出して、レンズシステム制御部216へ出力する。   The lens unit 210 includes a lens system control unit 216 that controls and operates the lens unit 210 such as driving the focus lens 212 and the diaphragm 214. Each element constituting the lens unit 210 is supported by the lens barrel 217. The position sensor 221 detects the position of the focus lens 212 and outputs it to the lens system control unit 216.

また、レンズユニット210は、カメラユニット230との接続部にレンズマウント218を備え、カメラユニット230が備えるカメラマウント231と係合して、カメラユニット230と一体化する。レンズマウント218およびカメラマウント231はそれぞれ、機械的な係合部の他に電気的な接続部も備え、カメラユニット230からレンズユニット210への電力の供給および相互の通信を実現している。なお、以後の説明においては図示するように、光軸201に沿って被写体光束が入射する方向にz軸を定める。   The lens unit 210 includes a lens mount 218 at a connection portion with the camera unit 230, and engages with the camera mount 231 included in the camera unit 230 to be integrated with the camera unit 230. Each of the lens mount 218 and the camera mount 231 includes an electrical connection portion in addition to a mechanical engagement portion, and realizes power supply from the camera unit 230 to the lens unit 210 and mutual communication. In the following description, as shown in the drawing, the z-axis is determined in the direction in which the subject luminous flux is incident along the optical axis 201.

カメラユニット230は、レンズユニット210から入射される被写体像を反射するメインミラー232と、メインミラー232で反射された被写体像が結像するピント板234を備える。メインミラー232は、回転軸233周りに回転して、光軸201を中心とする被写体光束中に斜設される状態と、被写体光束から退避する状態を取り得る。ピント板234側へ被写体像を導く場合は、メインミラー232は被写体光束中に斜設される。また、ピント板234は、撮像素子243の受光面と共役の位置に配置されている。   The camera unit 230 includes a main mirror 232 that reflects a subject image incident from the lens unit 210 and a focus plate 234 on which the subject image reflected by the main mirror 232 is formed. The main mirror 232 rotates around the rotation axis 233 and can take a state of being obliquely provided in the subject light flux centered on the optical axis 201 and a state of being retracted from the subject light flux. When the subject image is guided to the focus plate 234 side, the main mirror 232 is provided obliquely in the subject light flux. Further, the focus plate 234 is disposed at a position conjugate with the light receiving surface of the image sensor 243.

ピント板234で結像した被写体像は、ペンタプリズム235で正立像に変換され、接眼光学系236を介してユーザに観察される。また、ペンタプリズム235の射出面上方にはAEセンサ237が配置されており、被写体像の輝度分布を検出する。   The subject image formed on the focusing screen 234 is converted into an erect image by the pentaprism 235 and observed by the user via the eyepiece optical system 236. An AE sensor 237 is disposed above the exit surface of the pentaprism 235, and detects the luminance distribution of the subject image.

斜設状態におけるメインミラー232の光軸201の近傍領域は、ハーフミラーとして形成されており、入射される光束の一部が透過する。透過した光束は、メインミラー232と連動して動作するサブミラー238で反射されて、AF光学系239へ導かれる。AF光学系239を通過した被写体光束は、AFセンサ240へ入射される。AFセンサ240は、受光した被写体光束から、予め定められた複数の領域ごとに位相差信号を検出する。具体的な検出領域等については後に詳述する。なお、サブミラー238は、メインミラー232が被写体光束から退避する場合は、メインミラー232に連動して被写体光束から退避する。   The region near the optical axis 201 of the main mirror 232 in the oblique state is formed as a half mirror, and a part of the incident light beam is transmitted. The transmitted light beam is reflected by the sub mirror 238 that operates in conjunction with the main mirror 232, and is guided to the AF optical system 239. The subject luminous flux that has passed through the AF optical system 239 enters the AF sensor 240. The AF sensor 240 detects a phase difference signal for each of a plurality of predetermined regions from the received subject light flux. Specific detection areas and the like will be described in detail later. The sub mirror 238 retracts from the subject light beam in conjunction with the main mirror 232 when the main mirror 232 retracts from the subject light beam.

斜設されたメインミラー232の後方には、光軸201に沿って、フォーカルプレーンシャッタ241、光学ローパスフィルタ242、撮像素子243が配列されている。フォーカルプレーンシャッタ241は、撮像素子243へ被写体光束を導くときに開放状態を取り、その他のときに遮蔽状態を取る。光学ローパスフィルタ242は、撮像素子243の画素ピッチに対する被写体像の空間周波数を調整する役割を担う。そして、撮像素子243は、例えばCMOSセンサなどの受光素子であり、受光面で結像した被写体像を電気信号に変換する。   A focal plane shutter 241, an optical low-pass filter 242, and an image sensor 243 are arranged along the optical axis 201 behind the oblique main mirror 232. The focal plane shutter 241 takes an open state when the subject light flux is guided to the image sensor 243, and takes a shielding state at other times. The optical low-pass filter 242 plays a role of adjusting the spatial frequency of the subject image with respect to the pixel pitch of the image sensor 243. The imaging element 243 is a light receiving element such as a CMOS sensor, for example, and converts the subject image formed on the light receiving surface into an electrical signal.

撮像素子243で光電変換された電気信号は、メイン基板244に搭載されたDSPである画像処理部246で画像データに処理される。メイン基板244には、画像処理部246の他に、カメラユニット230のシステムを統合的に制御するMPUであるカメラシステム制御部245が搭載されている。カメラシステム制御部245は、カメラシーケンスを管理すると共に、各構成要素の入出力処理等を行う。   The electrical signal photoelectrically converted by the image sensor 243 is processed into image data by the image processing unit 246 which is a DSP mounted on the main board 244. In addition to the image processing unit 246, a camera system control unit 245, which is an MPU that integrally controls the system of the camera unit 230, is mounted on the main board 244. The camera system control unit 245 manages the camera sequence and performs input / output processing of each component.

カメラユニット230の背面には液晶モニタ等による表示部247が配設されており、画像処理部246で処理された被写体画像が表示される。表示部247は、撮影後の静止画像に限らず、ビューファインダとしてのEVF画像、各種メニュー情報、撮影情報等を表示する。また、カメラユニット230には、着脱可能な二次電池248が収容され、カメラユニット230に限らず、レンズユニット210にも電力を供給する。また、ペンタプリズム235の近傍には使用状態と収納状態を取り得るフラッシュ249を備えており、使用状態においてカメラシステム制御部245の制御により被写体を照射する。   A display unit 247 such as a liquid crystal monitor is disposed on the back surface of the camera unit 230, and a subject image processed by the image processing unit 246 is displayed. The display unit 247 displays not only a still image after shooting, but also an EVF image as a viewfinder, various menu information, shooting information, and the like. The camera unit 230 houses a detachable secondary battery 248 and supplies power to the lens unit 210 as well as the camera unit 230. A flash 249 that can be used and stored is provided near the pentaprism 235, and the subject is irradiated under the control of the camera system controller 245 in the used state.

図2は、構造化開口ユニット300の外観図である。図2(a)は被写体側から見た正面図であり、図2(b)は側面図である。   FIG. 2 is an external view of the structured opening unit 300. 2A is a front view seen from the subject side, and FIG. 2B is a side view.

構造化開口ユニット300は、フィルタ302、ベース部307、外周部308および把持部309を主な構成要素とする。ベース部307は、被写体光束範囲に円筒状の中空部分を有し、フィルタ302は、ベース部307の中空部分に張設されて固定されている。   The structured opening unit 300 includes a filter 302, a base portion 307, an outer peripheral portion 308, and a grip portion 309 as main components. The base portion 307 has a cylindrical hollow portion in the subject light flux range, and the filter 302 is stretched and fixed to the hollow portion of the base portion 307.

ベース部307の端部には外周部308と把持部309が一体的に形成されている。ユーザは、把持部309を掴んで構造化開口ユニット300をレンズユニット210に対して挿抜する。   An outer peripheral portion 308 and a grip portion 309 are integrally formed at the end of the base portion 307. The user inserts and removes the structured opening unit 300 with respect to the lens unit 210 by grasping the grip 309.

フィルタ302は、被写体光束を遮断する遮断フィルタ部303、赤色の波長帯を透過させるRフィルタ部304、緑色の波長体を透過させるGフィルタ部305および青色の波長帯を透過させるBフィルタ部306から構成される。図示するようにRフィルタ部304、Gフィルタ部305、Bフィルタ部306は、フィルタ302の中心を通る光軸201に対して放射方向へそれぞれ延在するように、光軸201からは偏心した位置に設けられている。より具体的には、Rフィルタ部304、Gフィルタ部305、Bフィルタ部306は、それぞれ正方形であって互いに隣接し、それぞれひとつの頂点が光軸201近傍に集合するように配列されている。   The filter 302 includes a blocking filter unit 303 that blocks a subject light beam, an R filter unit 304 that transmits a red wavelength band, a G filter unit 305 that transmits a green wavelength body, and a B filter unit 306 that transmits a blue wavelength band. Composed. As shown in the figure, the R filter unit 304, the G filter unit 305, and the B filter unit 306 are offset from the optical axis 201 so as to extend in the radial direction with respect to the optical axis 201 passing through the center of the filter 302. Is provided. More specifically, the R filter unit 304, the G filter unit 305, and the B filter unit 306 are each square and adjacent to each other, and are arranged such that one vertex is gathered near the optical axis 201.

図3は、構造化開口ユニット300をレンズユニット210に装着する様子を示す図である。図3(a)は、構造化開口ユニット300をレンズユニット210に挿し込む直前の様子を示し、図3(b)は、装着された様子を示す。   FIG. 3 is a diagram illustrating a state in which the structured aperture unit 300 is attached to the lens unit 210. FIG. 3A shows a state immediately before the structured aperture unit 300 is inserted into the lens unit 210, and FIG. 3B shows a state where the structured opening unit 300 is attached.

ユーザは、把持部309を把持して、構造化開口ユニット300をレンズ鏡筒217に設けられた装着スリット219へ挿し込む。すると、構造化開口ユニット300は、ベース部307の側面がレンズ鏡筒217の内部に設けられた挿抜ガイド220に案内されて、フィルタ302の中心が光軸201と一致する位置に到達する。フィルタ302の中心が光軸201と一致する位置に到達すると、外周部308が装着スリット219に嵌合し、外周部308の外面がレンズ鏡筒217の外観面と一致する。   The user grips the grip portion 309 and inserts the structured opening unit 300 into the mounting slit 219 provided in the lens barrel 217. Then, in the structured opening unit 300, the side surface of the base portion 307 is guided by the insertion / extraction guide 220 provided inside the lens barrel 217, and reaches the position where the center of the filter 302 coincides with the optical axis 201. When the center of the filter 302 reaches a position that coincides with the optical axis 201, the outer peripheral portion 308 is fitted into the mounting slit 219, and the outer surface of the outer peripheral portion 308 matches the outer appearance surface of the lens barrel 217.

図4は、撮像素子243の画素上に配置されたカラーフィルタの説明図である。カラーフィルタの配列は、いわゆるベイヤー配列であり、4画素を1組として、各画素上にR画素フィルタ、G画素フィルタ、G画素フィルタおよびB画素フィルタが設けられている。したがって、各画素が感度を有する波長帯は、それぞれに設けられた画素フィルタによって規制される。例えば、R画素フィルタが設けられた画素は、赤色の波長帯に対して感度を持つ。撮像素子243の全体としては、2次元的に配列された画素のそれぞれが離散的にR画素フィルタ、G画素フィルタおよびB画素フィルタのいずれかを備えることになるので、撮像素子243は、入射する被写体光束をそれぞれの波長帯に分離して検出していると言える。換言すれば、撮像素子243は、受光面に結像する被写体像をRGBの3つの波長帯に分離して光電変換する。   FIG. 4 is an explanatory diagram of color filters arranged on the pixels of the image sensor 243. The arrangement of the color filters is a so-called Bayer arrangement, and an R pixel filter, a G pixel filter, a G pixel filter, and a B pixel filter are provided on each pixel with four pixels as a set. Therefore, the wavelength band in which each pixel has sensitivity is regulated by the pixel filter provided for each pixel. For example, a pixel provided with an R pixel filter has sensitivity to a red wavelength band. As the entire image sensor 243, each of the two-dimensionally arranged pixels is discretely provided with any one of an R pixel filter, a G pixel filter, and a B pixel filter, and therefore the image sensor 243 is incident. It can be said that the object luminous flux is detected separately for each wavelength band. In other words, the image sensor 243 performs photoelectric conversion by separating the subject image formed on the light receiving surface into three wavelength bands of RGB.

図5は、撮像素子243の画素が感度を有する波長帯と、構造化開口のそれぞれのフィルタ部が透過する波長帯の関係を示す図である。図は、縦軸に透過率(%)を、横軸に波長(nm)を示す。透過率が高い波長の光ほど、画素を構成するフォトダイオードに到達することを表す。   FIG. 5 is a diagram illustrating a relationship between a wavelength band in which a pixel of the image sensor 243 has sensitivity and a wavelength band transmitted through each filter portion of the structured aperture. In the figure, the vertical axis represents transmittance (%), and the horizontal axis represents wavelength (nm). It represents that the light having a higher transmittance reaches the photodiode constituting the pixel.

B曲線701は、B画素フィルタが設けられた画素の感度を示し、同様にG曲線702はG画素フィルタが設けられた画素の感度を、R曲線703はR画素フィルタが設けられた画素の感度を示す。構造化開口のBフィルタ部306は、矢印711の波長帯を透過させる。同様に、Gフィルタ部305は、矢印712の波長帯を透過させ、Rフィルタ部304は、矢印713の波長帯を透過させる。したがって、B画素フィルタが設けられた画素は、構造化開口のBフィルタ部306を透過した被写体光束に対して感度を持ち、G画素フィルタが設けられた画素は、構造化開口のGフィルタ部305を透過した被写体光束に対して感度を持ち、R画素フィルタが設けられた画素は、構造化開口のRフィルタ部304を透過した被写体光束に対して感度を持つと言える。   The B curve 701 indicates the sensitivity of the pixel provided with the B pixel filter, the G curve 702 indicates the sensitivity of the pixel provided with the G pixel filter, and the R curve 703 indicates the sensitivity of the pixel provided with the R pixel filter. Indicates. The structured aperture B filter 306 transmits the wavelength band of arrow 711. Similarly, the G filter unit 305 transmits the wavelength band indicated by the arrow 712, and the R filter unit 304 transmits the wavelength band indicated by the arrow 713. Therefore, the pixel provided with the B pixel filter has sensitivity to the subject light beam transmitted through the B filter unit 306 of the structured aperture, and the pixel provided with the G pixel filter is the G filter unit 305 of the structured aperture. It can be said that the pixel provided with the R pixel filter has sensitivity to the subject light beam transmitted through the R filter unit 304 of the structured aperture.

すると、Rフィルタ部304を開口とする赤色波長帯の被写体画像、Gフィルタ部305を開口とする緑色波長帯の被写体画像、およびBフィルタ部306を開口とする青色波長帯の被写体画像を、一度の撮影により取得することができる。これらの被写体画像は、それぞれ上述のI、I、Iに相当し、互いに三視点の視差画像を構成する。 Then, a subject image in the red wavelength band with the R filter unit 304 as an opening, a subject image in a green wavelength band with the G filter unit 305 as an opening, and a subject image in a blue wavelength band with the B filter unit 306 as an opening are once Can be obtained by shooting. These subject images correspond to the above-described I r , I g , and I b , respectively, and constitute a three-viewpoint parallax image.

なお、このように撮影される赤色波長帯の被写体画像、緑色波長帯の被写体画像および青色波長帯の被写体画像は、それぞれR画素フィルタが設けられた画素の出力のみ、G画素フィルタが設けられた画素の出力のみ、または、B画素フィルタが設けられた画素の出力のみを集めて互いに分離されるので、通常の撮影における画像処理とは異なる画像処理により形成される。したがって、ここでは通常の撮影により取得される撮影画像を本撮影画像と呼び、構造化開口を用いて取得される撮影画像を補助撮影画像と呼ぶ。本撮影画像は構造化開口ユニット300をレンズユニット210から抜出して撮影された画像であり、補助撮影画像は構造化開口ユニット300をレンズユニット210へ装着して撮影された画像である。   Note that the subject image of the red wavelength band, the subject image of the green wavelength band, and the subject image of the blue wavelength band captured in this manner are provided with the G pixel filter only for the output of the pixel provided with the R pixel filter. Since only pixel outputs or only pixel outputs provided with a B pixel filter are collected and separated from each other, they are formed by image processing different from image processing in normal photographing. Therefore, here, a captured image acquired by normal imaging is referred to as a main captured image, and a captured image acquired using the structured aperture is referred to as an auxiliary captured image. The actual captured image is an image captured by extracting the structured aperture unit 300 from the lens unit 210, and the auxiliary captured image is an image captured by attaching the structured aperture unit 300 to the lens unit 210.

次に、本実施形態に係る一眼レフカメラ200のシステム構成を説明する。図6は、一眼レフカメラ200のシステム構成を概略的に示すブロック図である。一眼レフカメラ200のシステムは、レンズユニット210とカメラユニット230のそれぞれに対応して、レンズシステム制御部216を中心とするレンズ制御系と、カメラシステム制御部245を中心とするカメラ制御系により構成される。そして、レンズ制御系とカメラ制御系は、レンズマウント218とカメラマウント231によって接続される接続部を介して、相互に各種データ、制御信号の授受を行う。   Next, the system configuration of the single-lens reflex camera 200 according to the present embodiment will be described. FIG. 6 is a block diagram schematically showing the system configuration of the single-lens reflex camera 200. The system of the single-lens reflex camera 200 includes a lens control system centered on the lens system control unit 216 and a camera control system centered on the camera system control unit 245 corresponding to the lens unit 210 and the camera unit 230, respectively. Is done. The lens control system and the camera control system exchange various data and control signals with each other via a connection portion connected by the lens mount 218 and the camera mount 231.

カメラ制御系に含まれる画像処理部246は、カメラシステム制御部245からの指令に従って、撮像素子243で光電変換された撮像信号を画像データに処理する。本撮影画像において処理された画像データは、表示部247へ送られて、例えば撮影後の一定時間の間表示される。これに並行して、処理された画像データは、所定の画像フォーマットに加工され、外部接続IF254を介して外部メモリに記録される。画像処理部246は、補助撮影画像として撮影された撮像信号から、波長帯ごとに分離された被写体画像を生成する。生成された被写体画像は奥行き情報算出部251へ引き渡され、奥行き情報算出部251は、上述の手法により奥行き情報を算出する。算出された奥行き情報は、カメラメモリ252へ記録される。具体的な算出処理については後述する。   An image processing unit 246 included in the camera control system processes an imaging signal photoelectrically converted by the imaging element 243 into image data in accordance with a command from the camera system control unit 245. The image data processed in the actual photographed image is sent to the display unit 247 and displayed for a certain time after photographing, for example. In parallel with this, the processed image data is processed into a predetermined image format and recorded in the external memory via the external connection IF 254. The image processing unit 246 generates a subject image separated for each wavelength band from an imaging signal captured as an auxiliary captured image. The generated subject image is transferred to the depth information calculation unit 251. The depth information calculation unit 251 calculates depth information by the above-described method. The calculated depth information is recorded in the camera memory 252. Specific calculation processing will be described later.

カメラメモリ252は、例えばフラッシュメモリなどの不揮発性メモリであり、生成された撮影画像の一時的な記録場所としての他に、一眼レフカメラ200を制御するプログラム、各種パラメータなどを記録する役割を担う。ワークメモリ253は、例えばRAMなどの高速アクセスできるメモリであり、処理中の画像データを一時的に保管する役割などを担う。   The camera memory 252 is a non-volatile memory such as a flash memory, for example, and plays a role of recording a program for controlling the single-lens reflex camera 200, various parameters, and the like in addition to a temporary recording place of the generated captured image. . The work memory 253 is a memory that can be accessed at high speed, such as a RAM, and has a role of temporarily storing image data being processed.

レリーズスイッチ255は押し込み方向に2段階のスイッチ位置を備えており、カメラシステム制御部245は、第1段階のスイッチであるSW1がONになったことを検出すると、AFセンサ240から位相差情報を取得する。そして、レンズシステム制御部216へフォーカスレンズ212の駆動情報を送信する。また、AEセンサ237から被写体像の輝度分布を取得して露出値を決定する。さらに、第2段階のスイッチであるSW2がONになったことを検出すると、予め定められた処理フローに従って本撮影画像の取得、または、補助撮影画像の取得を実行する。本撮影画像の取得と補助撮影画像の取得についての処理フローについては後述する。フラッシュ249は、カメラシステム制御部245の制御に従って被写体を照射する。   The release switch 255 has a two-step switch position in the push-in direction, and the camera system control unit 245 detects phase difference information from the AF sensor 240 when detecting that the first-stage switch SW1 is turned on. get. Then, the drive information of the focus lens 212 is transmitted to the lens system control unit 216. Also, the exposure value is determined by obtaining the luminance distribution of the subject image from the AE sensor 237. Furthermore, when it is detected that SW2 which is the second-stage switch is turned on, acquisition of the main captured image or acquisition of the auxiliary captured image is executed according to a predetermined processing flow. A processing flow for acquiring the main captured image and the auxiliary captured image will be described later. The flash 249 irradiates the subject under the control of the camera system control unit 245.

レンズシステム制御部216は、カメラシステム制御部245からの制御信号を受けて各種動作を実行する。また、レンズシステム制御部216は、位置センサ221からの出力を受けてフォーカスレンズ212の位置を検出する。レンズシステム制御部216は、焦点距離を含むレンズ情報と共に、検出したフォーカスレンズ位置をカメラシステム制御部245へ送信する。   The lens system control unit 216 receives various control signals from the camera system control unit 245 and executes various operations. In addition, the lens system control unit 216 receives the output from the position sensor 221 and detects the position of the focus lens 212. The lens system control unit 216 transmits the detected focus lens position to the camera system control unit 245 together with the lens information including the focal length.

次に、一眼レフカメラ200による撮影シーケンスの例を説明する。図7は、本撮影画像および補助撮影画像の取得フローを示す図である。撮影シーケンスが開始されると、カメラシステム制御部245は、ステップS301で、これから行う撮影動作が本撮影画像の撮影動作か、補助撮影画像の撮影動作かを判断する。本撮影画像の撮影動作であると判断したときは、ステップS302へ進む。   Next, an example of a shooting sequence by the single-lens reflex camera 200 will be described. FIG. 7 is a diagram illustrating an acquisition flow of the main captured image and the auxiliary captured image. When the shooting sequence is started, in step S301, the camera system control unit 245 determines whether the shooting operation to be performed from now is the shooting operation of the main shooting image or the shooting operation of the auxiliary shooting image. If it is determined that the actual captured image is captured, the process proceeds to step S302.

ステップS302でカメラシステム制御部245は、ユーザにより構造化開口ユニット300が被写体光束から抜出されているか否かを判断する。抜出さているか否かは、例えば、フォトインタラプタなどのセンサを設けて判断することができる。   In step S302, the camera system control unit 245 determines whether or not the structured aperture unit 300 is extracted from the subject light beam by the user. Whether it is extracted or not can be determined by providing a sensor such as a photo interrupter.

カメラシステム制御部245は、構造化開口ユニット300が抜出されたと判断したらステップS303へ進む。抜出されるまではステップS302で待機する。   If the camera system control unit 245 determines that the structured aperture unit 300 has been extracted, the process proceeds to step S303. It waits at step S302 until it is extracted.

ステップS303では、カメラシステム制御部245は、レリーズスイッチ255のSW1がONにされるのを待って、被写体の測光を行う。具体的には、カメラシステム制御部245は、AEセンサ237から被写体像の輝度分布を取得する。カメラシステム制御部245は、被写体像の輝度分布を取得したら、ステップS304に進み、露出値を算出する。ここで、露出値とは、撮像素子243を被写体光束に露光する露光時間、被写体光束を制限する絞り214の絞り値、および撮像素子243の読み出しゲインに対応するISO感度の3つの数値である。   In step S303, the camera system control unit 245 performs photometry of the subject after waiting for the SW1 of the release switch 255 to be turned on. Specifically, the camera system control unit 245 acquires the luminance distribution of the subject image from the AE sensor 237. After acquiring the luminance distribution of the subject image, the camera system control unit 245 proceeds to step S304 and calculates an exposure value. Here, the exposure value is three numerical values of an exposure time for exposing the image sensor 243 to the subject light beam, an aperture value of the diaphragm 214 for limiting the subject light beam, and ISO sensitivity corresponding to the readout gain of the image sensor 243.

また、カメラシステム制御部245は、SW1がONにされると、測光処理の他にも合焦動作などの撮影準備処理を実行する。合焦動作は、AFセンサ240を用いて被写体を測距し、得られた位相差情報に基づいて、レンズシステム制御部216がフォーカスレンズ212を駆動することにより実現される。   Further, when SW1 is turned on, the camera system control unit 245 executes photographing preparation processing such as focusing operation in addition to the photometry processing. The focusing operation is realized by measuring the subject using the AF sensor 240 and driving the focus lens 212 by the lens system control unit 216 based on the obtained phase difference information.

撮影準備処理が終了すると、カメラシステム制御部245は、ステップS305へ進み、レリーズスイッチ255のSW2がONにされるのを待って、本撮影画像の取得動作を実行する。具体的には、メインミラー232およびサブミラー238を被写体光束から退避させ、決定された露出値に従って絞り214およびフォーカルプレーンシャッタ241を動作させる。さらに、フォーカルプレーンシャッタ241が開放されている間に撮像素子243の各画素に蓄積された電荷を読み出し、画像処理部246に予め設定されたフォーマットに従って画像ファイルを生成させ、当該画像ファイルを記録部に記録する。   When the shooting preparation process is completed, the camera system control unit 245 proceeds to step S305, waits for the SW2 of the release switch 255 to be turned on, and executes an operation for acquiring a captured image. Specifically, the main mirror 232 and the sub mirror 238 are retracted from the subject light beam, and the diaphragm 214 and the focal plane shutter 241 are operated according to the determined exposure value. Further, the electric charge accumulated in each pixel of the image sensor 243 is read while the focal plane shutter 241 is opened, the image processing unit 246 is caused to generate an image file in accordance with a preset format, and the image file is recorded in the recording unit. To record.

カメラシステム制御部245は、一連の本撮影画像の撮影動作が終了したらステップS306へ進み、引き続き補助撮影画像の撮影動作が指示されているか否かを判断する。補助撮影画像の撮影動作が指示されていなければ、一連の処理を終了する。   The camera system control unit 245 proceeds to step S306 when a series of main image capturing operations has been completed, and determines whether or not an auxiliary image capturing operation has been instructed. If the auxiliary photographing image photographing operation is not instructed, the series of processes is terminated.

カメラシステム制御部245は、ステップS301またはステップS306で補助撮影画像の撮影動作が指示されていると判断したら、ステップS307へ進み、ユーザにより構造化開口ユニット300が被写体光束中に装着されているか否かを判断する。カメラシステム制御部245は、構造化開口ユニット300が装着されるまでステップS307で待機する。   If the camera system control unit 245 determines that the auxiliary photographing image capturing operation is instructed in step S301 or step S306, the process proceeds to step S307, and whether or not the structured aperture unit 300 is mounted in the subject luminous flux by the user. Determine whether. The camera system control unit 245 waits in step S307 until the structured aperture unit 300 is mounted.

カメラシステム制御部245は、構造化開口ユニット300が装着されたと判断したらステップS308へ進む。補助撮影画像の撮影動作は、被写体光束中に構造化開口を介在させて実行するので、撮像素子243に到達する被写体光束の光学的条件が、本撮影画像の撮影動作時とは大きく異なる。簡単には、撮像素子243に到達する被写体光束が構造化開口によって制限されるので、本撮影画像の撮影条件と同じ条件では暗い画像が取得されることになる。そこで、カメラシステム制御部245は、補助撮影画像の撮影条件を、本撮影画像の撮影条件とは異ならせる。   If the camera system control unit 245 determines that the structured aperture unit 300 is attached, the process proceeds to step S308. Since the photographing operation of the auxiliary photographed image is executed with the structured aperture interposed in the subject light flux, the optical condition of the subject light flux reaching the image sensor 243 is greatly different from that during the photographing operation of the main photographed image. In brief, since the subject luminous flux reaching the image sensor 243 is limited by the structured aperture, a dark image is obtained under the same conditions as the shooting conditions of the main shooting image. Therefore, the camera system control unit 245 makes the shooting condition of the auxiliary shooting image different from the shooting condition of the main shooting image.

そこで、カメラシステム制御部245は、補助撮影画像の撮影動作時にフラッシュ249を動作させて被写体を照射する。カメラシステム制御部245は、ステップS308へ進むと、SW1がONにされるのを待って、フラッシュ249の事前照射動作であるプリ発光を行い、被写体の測光を行う。具体的には、カメラシステム制御部245は、AEセンサ237から被写体像のプリ発光時における輝度分布を取得する。   Therefore, the camera system control unit 245 irradiates the subject by operating the flash 249 during the operation of capturing the auxiliary captured image. In step S308, the camera system control unit 245 waits for SW1 to be turned on, performs pre-light emission as a pre-irradiation operation of the flash 249, and performs subject photometry. Specifically, the camera system control unit 245 acquires the luminance distribution from the AE sensor 237 when the subject image is pre-flashed.

また、カメラシステム制御部245は、SW1がONにされると、測光処理の他にも合焦動作などの撮影準備処理を実行する。合焦動作は、AFセンサ240を用いて被写体を測距し、得られた位相差情報に基づいて、レンズシステム制御部216がフォーカスレンズ212を駆動することにより実現される。このとき、レンズユニット210のレンズ情報、合焦動作を行った測距点、その他の測距点におけるデフォーカス量、フォーカスレンズ位置などを含む測距情報は、一旦ワークメモリ253に保管される。   Further, when SW1 is turned on, the camera system control unit 245 executes photographing preparation processing such as focusing operation in addition to the photometry processing. The focusing operation is realized by measuring the subject using the AF sensor 240 and driving the focus lens 212 by the lens system control unit 216 based on the obtained phase difference information. At this time, distance measurement information including the lens information of the lens unit 210, the distance measurement point where the focusing operation is performed, the defocus amount at the other distance measurement points, the focus lens position, and the like are temporarily stored in the work memory 253.

カメラシステム制御部245は、被写体像の輝度分布を取得したら、ステップS309へ進み、露出値を算出する。このときの露出値はフラッシュ249の発光を前提とした値であり、したがって、カメラシステム制御部245は、ステップS310へ進み、撮影動作時におけるフラッシュ249の照射量を決定する。なお、照射量の算出は、AEセンサ237から得られる輝度分布情報から行っても良いが、本撮影画像の撮影動作時にもフラッシュ249を照射させたのであれば、当該撮影動作時における照射量から、補助撮影画像の撮影動作における照射量を算出しても良い。具体的には、構造化開口を被写体光束中に介在させることによりカットされる光量は事前の実験等により把握されるので、これに応じて低下する露出段数分に相当する光量を本撮影画像の撮影動作時における照射量に足して算出する。   After acquiring the luminance distribution of the subject image, the camera system control unit 245 proceeds to step S309 and calculates the exposure value. The exposure value at this time is a value based on the premise that the flash 249 emits light. Therefore, the camera system control unit 245 proceeds to step S310 and determines the irradiation amount of the flash 249 during the photographing operation. The irradiation amount may be calculated from the luminance distribution information obtained from the AE sensor 237. However, if the flash 249 is irradiated even during the photographing operation of the actual captured image, the irradiation amount is calculated from the irradiation amount during the photographing operation. Alternatively, the irradiation amount in the shooting operation of the auxiliary captured image may be calculated. Specifically, the amount of light that is cut by interposing the structured aperture in the subject luminous flux is ascertained by a prior experiment or the like, and thus the amount of light corresponding to the number of exposure steps that decreases according to this is obtained. Calculated by adding to the irradiation amount during the shooting operation.

なお、ステップS309における露出値の算出は、ステップS310のフラッシュ249の照射量の決定とセットで実行されるが、露出値のうちISO感度については、ステップS304で算出されるISO感度よりも大きく設定すると良い。すなわち、補助撮影画像における被写体のぶれは、奥行き情報の算出に悪影響を及ぼし精度の低下を招くので、撮像素子243に対する露光時間は短いことが好ましい。そこで、露光時間を短くすべく、ISO感度を大きく設定する。補助撮影画像はユーザの鑑賞画像ではないので、奥行き情報の算出に影響しない限りにおいてISO感度が大きく設定されても良い。したがって、カメラシステム制御部245が設定し得るISO感度の上限は、本撮影画像の撮影動作時の値と補助撮影画像の撮影動作時の値で異なり、補助撮影画像の撮影動作時の値の方が大きい。   Note that the calculation of the exposure value in step S309 is executed in combination with the determination of the irradiation amount of the flash 249 in step S310, but the ISO sensitivity of the exposure value is set larger than the ISO sensitivity calculated in step S304. Good. That is, the blurring of the subject in the auxiliary captured image adversely affects the calculation of the depth information and causes a decrease in accuracy. Therefore, it is preferable that the exposure time for the image sensor 243 is short. Therefore, in order to shorten the exposure time, the ISO sensitivity is set large. Since the auxiliary captured image is not a user-viewed image, the ISO sensitivity may be set large as long as it does not affect the calculation of depth information. Therefore, the upper limit of the ISO sensitivity that can be set by the camera system control unit 245 differs depending on the value at the time of the photographing operation of the main photographic image and the value at the time of the photographing operation of the auxiliary photographic image. Is big.

このように撮影動作時における露出値と照射量が決定されると、カメラシステム制御部245は、ステップS311へ進み、レリーズスイッチ255のSW2がONにされるのを待って、補助撮影画像の取得動作を実行する。具体的には、メインミラー232およびサブミラー238を被写体光束から退避させ、決定された露出値に従って絞り214およびフォーカルプレーンシャッタ241を動作させる。このとき、決定された照射量に従ってフラッシュ249を動作させ被写体を照射する。さらに、撮像素子243の各画素に蓄積された電荷を読み出し、画像処理部246に赤色画像、緑色画像および青色画像の3つの視差画像を含む補助撮影画像ファイルを生成させ、当該画像ファイルを記録部に記録する。同時に、測距情報を当該補助撮影画像に関連付けて記録する。測距情報は、例えば、付帯情報であるEXIF情報として記述される。以上により一連の処理を終了する。   When the exposure value and the irradiation amount during the photographing operation are determined in this way, the camera system control unit 245 proceeds to step S311 and waits for the SW2 of the release switch 255 to be turned on to acquire an auxiliary captured image. Perform the action. Specifically, the main mirror 232 and the sub mirror 238 are retracted from the subject light beam, and the diaphragm 214 and the focal plane shutter 241 are operated according to the determined exposure value. At this time, the flash 249 is operated according to the determined irradiation amount to irradiate the subject. Furthermore, the electric charge accumulated in each pixel of the image sensor 243 is read, and the image processing unit 246 generates an auxiliary captured image file including three parallax images of a red image, a green image, and a blue image, and the image file is recorded in the recording unit To record. At the same time, distance measurement information is recorded in association with the auxiliary captured image. The distance measurement information is described as, for example, EXIF information that is supplementary information. Thus, a series of processing ends.

また、本フローにおいては、補助撮影画像の撮影動作時にフラッシュ249を照射させて構造化開口による光量低下を補った。しかし、被写体環境によってはフラッシュ249を照射させずに他の撮影条件を変更することにより光量低下を補っても良い。例えば、上述のように、ISO感度を大きな値に設定する。または、予め定められた露光時間を下限として、露光時間を長めに設定しても良い。つまり、カメラシステム制御部245は、本撮影画像の撮影条件に比較して、補助撮影画像の撮影条件を、被写体光束をより取り込む、取り込んだ光をより増幅する方向に変更すればよい。   Further, in this flow, the flash 249 is irradiated during the shooting operation of the auxiliary shooting image to compensate for the light amount reduction due to the structured opening. However, depending on the subject environment, the reduction in the amount of light may be compensated by changing other shooting conditions without irradiating the flash 249. For example, as described above, the ISO sensitivity is set to a large value. Alternatively, the exposure time may be set longer with a predetermined exposure time as a lower limit. That is, the camera system control unit 245 may change the shooting condition of the auxiliary captured image in a direction that captures the subject luminous flux and amplifies the captured light as compared to the shooting condition of the actual captured image.

次に、AFセンサ240の出力に基づく、距離情報の取得について説明する。図8は、光学ファインダから観察される被写体像および測距領域を示す図である。なお、ここではシーンの例として、手前から順に少女101、少年102および女性103が存在する場合を説明する。   Next, acquisition of distance information based on the output of the AF sensor 240 will be described. FIG. 8 is a diagram showing a subject image and a distance measurement area observed from the optical viewfinder. Here, as an example of the scene, a case where a girl 101, a boy 102, and a woman 103 exist in this order from the front will be described.

AFセンサ240は、被写体空間に対して二次元的かつ離散的に配置される複数の測距点260を有する。図の例の場合、11点の測距点260が、全体として略菱形形状に離散的に配置されている。AFセンサ240は、それぞれの測距点260に対応するデフォーカス量を独立に出力することができる。   The AF sensor 240 has a plurality of distance measuring points 260 that are two-dimensionally and discretely arranged with respect to the subject space. In the case of the example in the figure, eleven distance measuring points 260 are discretely arranged in a substantially rhombus shape as a whole. The AF sensor 240 can independently output a defocus amount corresponding to each distance measuring point 260.

カメラシステム制御部245は、例えば近点優先等のアルゴリズムにより選択された合焦測距点261のデフォーカス量を検出して、合焦に至るフォーカスレンズ212の移動量および移動方向を決定し、レンズシステム制御部216へ送信する。レンズシステム制御部216は、これらの情報に従ってフォーカスレンズ212を移動させる。フォーカスレンズ212の移動が完了すると、カメラシステム制御部245は、AFセンサ240により合焦測距点261のデフォーカス量を再度検出して、合焦測距点261に対応するオブジェクトにピントが合ったことを確認する。   The camera system control unit 245 detects the defocus amount of the focus range-finding point 261 selected by an algorithm such as near-point priority, and determines the amount and direction of movement of the focus lens 212 leading to focus, The data is transmitted to the lens system control unit 216. The lens system control unit 216 moves the focus lens 212 in accordance with these pieces of information. When the movement of the focus lens 212 is completed, the camera system control unit 245 detects the defocus amount of the focusing distance measuring point 261 again by the AF sensor 240, and focuses on the object corresponding to the focusing distance measuring point 261. Make sure.

カメラシステム制御部245は、ピントが合ったことを確認できたら、スーパーインポーズ表示等により合焦測距点261を明滅させ、合焦動作完了をユーザに告知する。また、カメラシステム制御部245は、合焦測距点261のデフォーカス量を再度検出すると同時に、他の測距点260のデフォーカス量も検出する。このとき、ほぼ同じデフォーカス量を示す測距点260ごとにグルーピングする。図の場合、第1デフォーカス量を示す第1非合焦測距点262、および第2デフォーカス量を示す第2非合焦測距点263を別々のグループとして認識する。なお、特定のグループのデフォーカス量から一定の範囲内にあるデフォーカス量を示す測距点260、および無限遠のデフォーカス量を示す測距点260は、グルーピングの対象外とする。なお、合焦測距点261が複数存在すれば、これらを纏めてグループとして認識する。   When the camera system control unit 245 confirms that the camera is in focus, the camera system control unit 245 blinks the focusing distance measuring point 261 by superimpose display or the like, and notifies the user of the completion of the focusing operation. In addition, the camera system control unit 245 detects the defocus amount of the focus range-finding point 261 again, and simultaneously detects the defocus amount of other range-finding points 260. At this time, grouping is performed for each distance measuring point 260 showing substantially the same defocus amount. In the case of the figure, the first non-focusing distance measuring point 262 indicating the first defocus amount and the second non-focusing distance measuring point 263 indicating the second defocus amount are recognized as separate groups. It should be noted that the distance measuring point 260 indicating the defocus amount within a certain range from the defocus amount of the specific group and the distance measuring point 260 indicating the defocus amount at infinity are excluded from grouping. If there are a plurality of in-focus distance measuring points 261, these are collectively recognized as a group.

これらグルーピングされた測距点260に対応する被写体空間には、被写体としてのオブジェクトがそれぞれ存在する。図の例によれば、合焦測距点261に対応して少女101が、第1非合焦測距点262に対応して少年102が、第2非合焦測距点263に対応して女性103が存在している。   In the subject space corresponding to the grouped distance measuring points 260, there are objects as subjects. According to the example in the figure, the girl 101 corresponds to the in-focus distance measuring point 261, and the boy 102 corresponds to the second out-of-focus distance measuring point 262, and the boy 102 corresponds to the second out-of-focus distance measuring point 263. A woman 103 exists.

カメラシステム制御部245は、これらのグルーピング情報を含む測距情報から、それぞれのオブジェクトまでの距離を算出する。図9は、取得されるオブジェクト距離を説明する図である。   The camera system control unit 245 calculates the distance to each object from the distance measurement information including the grouping information. FIG. 9 is a diagram for explaining the acquired object distance.

各オブジェクトまでの距離は、一眼レフカメラ200に配設された撮像素子243の受光面を基準として算出される。例えば、少年102までの距離Dは、第1非合焦測距点262におけるデフォーカス量、レンズユニット210のレンズ情報、フォーカスレンズ位置等から算出される。より具体的には、レンズ情報として、フォーカスレンズ位置と合焦オブジェクト距離の対応テーブルを取得し、現在のフォーカスレンズ位置を入力することにより、合焦オブジェクトまでの距離を得る。この距離は少女101までの距離Dに相当する。 The distance to each object is calculated with reference to the light receiving surface of the image sensor 243 provided in the single-lens reflex camera 200. For example, the distance D B to the boy 102 is a defocus amount in the first out-of-focus detecting point 262, the lens information of the lens unit 210, is calculated from the focus lens position and the like. More specifically, a correspondence table between the focus lens position and the focused object distance is acquired as lens information, and the current focus lens position is input to obtain the distance to the focused object. This distance corresponds to the distance D A to the girl 101.

オートフォーカスにおいては、あるデフォーカス量に対して、合焦位置までフォーカスレンズ212をどれだけ移動させればよいかの移動量変換関数を利用している。そこで、ここでもこの移動量関数を利用して、第1非合焦測距点262におけるデフォーカス量から、フォーカスレンズ212の移動量を算出する。そして、現在のフォーカスレンズ位置に算出した移動量を加算した値を対応テーブルに入力することにより、距離Dを得る。 In autofocus, a movement amount conversion function for how much the focus lens 212 should be moved to the in-focus position with respect to a certain defocus amount is used. Therefore, the movement amount of the focus lens 212 is calculated from the defocus amount at the first non-focusing distance measuring point 262 using this movement amount function. Then, by inputting a value obtained by adding the movement amounts calculated with the current focus lens position in the correspondence table, obtaining a distance D B.

女性103までの距離Dも同様に算出できる。この場合、第2非合焦測距点263には3つの測距点260が含まれるが、いずれか1つの測距点260におけるデフォーカス量を代表として用いれば良い。グルーピングしたそれぞれに対してオブジェクト距離を算出したら、その算出したオブジェクト距離とグルーピングした測距点260の配置とをペアとして記録する。 Distance D C to women 103 can also be calculated in the same manner. In this case, the second non-focusing distance measuring point 263 includes three distance measuring points 260, but the defocus amount at any one of the distance measuring points 260 may be used as a representative. When the object distance is calculated for each grouped object, the calculated object distance and the arrangement of the grouped distance measuring points 260 are recorded as a pair.

なお、移動量変換関数を利用して非合焦測距点に対応するオブジェクトまでの距離を算出する場合は、当該関数を補助撮影画像の関連情報として保持しておく。また、移動量変換関数を利用しなくても、レンズ情報としてレンズユニット210の焦点距離、測距時における絞り値、および第1非合焦測距点262におけるデフォーカス量を取得すれば、デフォーカスに相当する距離を算出できる。この場合は、合焦オブジェクトまでの距離に算出した距離を加算して非合焦オブジェクトまでの距離を得る。   Note that when the distance to the object corresponding to the out-of-focus distance measuring point is calculated using the movement amount conversion function, the function is held as related information of the auxiliary captured image. Even if the movement amount conversion function is not used, if the focal length of the lens unit 210, the aperture value at the time of distance measurement, and the defocus amount at the first non-focusing distance measuring point 262 are obtained as lens information, the defocus amount is obtained. The distance corresponding to the focus can be calculated. In this case, the calculated distance is added to the distance to the focused object to obtain the distance to the non-focused object.

次に、これらの距離情報を用いて行うマッチング処理について説明する。図10は、オブジェクト領域と局所ウィンドウの関係を示す概念図である。図は、左から順に、補助撮影画像から抽出されるI画像、I画像、I画像を表す。これらは互いに視差画像である。少女101に対応する画像領域は、ピントが合っている領域なので、互いに視差が無い。一方、少年102に対応する画像領域および女性103に対応する画像領域は、ピントが合っていない領域なので、互いに視差がある。特に、少年102よりも女性103の方が少女101から遠い距離に存在するので、女性103に対応する画像領域の視差量の方が少年102に対応する画像領域の視差量よりも大きいと推測される。 Next, the matching process performed using these distance information will be described. FIG. 10 is a conceptual diagram showing the relationship between the object area and the local window. Figure, in order from the left, I r image extracted from the auxiliary captured image, I g images, representing a I b images. These are mutually parallax images. Since the image area corresponding to the girl 101 is an in-focus area, there is no parallax between them. On the other hand, the image region corresponding to the boy 102 and the image region corresponding to the woman 103 are regions that are not in focus, and thus have parallax. In particular, since the female 103 exists farther from the girl 101 than the boy 102, it is estimated that the amount of parallax in the image area corresponding to the female 103 is greater than the amount of parallax in the image area corresponding to the boy 102. The

すでに説明した奥行き情報の取得原理によれば、それぞれの画像間における同一オブジェクトの視差量を算出することにより、当該オブジェクトの距離と輪郭を演算する。視差量の算出は、局所ウィンドウをそれぞれの視差画像に設定して、相対的にずらしながら互いにマッチングの良い画像領域を探索することにより実行する。そして、互いにマッチングが良いと判断される座標値から視差量を決定する。このとき、設定する局所ウィンドウのウィンドウサイズが視差量に対して大き過ぎると、境界部分の分解能が低下して結果的には曖昧な輪郭を定義することになり、逆に小さすぎると誤った領域に対してマッチングが良いと判断する誤対応が増加する。したがって、適切なウィンドウサイズを規定しなければ、精度の高い輪郭を定めることができない。   According to the depth information acquisition principle already described, the distance and contour of the object are calculated by calculating the parallax amount of the same object between the images. The calculation of the amount of parallax is performed by setting a local window for each parallax image and searching for image regions with good matching with each other while relatively shifting. Then, the amount of parallax is determined from the coordinate values that are determined to match each other. At this time, if the window size of the local window to be set is too large with respect to the amount of parallax, the resolution of the boundary portion will be reduced, resulting in the definition of an ambiguous contour. Mismatches that determine that matching is good increase. Therefore, a high-precision contour cannot be defined unless an appropriate window size is defined.

そこで、本実施形態においては、AFセンサ240の出力から算出した上述の距離情報を利用して、それぞれのオブジェクトに最適と考えられるウィンドウサイズを決定する。距離情報は、グルーピングした測距点260の配置と対応するオブジェクトの距離を含むので、まず測距点260の配置に対応する画像位置を取り囲む領域をオブジェクト領域として定義する。図の例においては、合焦測距点261に対応するオブジェクト領域として合焦オブジェクト領域271、第1非合焦測距点262に対応するオブジェクト領域として第1非合焦オブジェクト領域272、第2非合焦測距点263に対応するオブジェクト領域として第2非合焦オブジェクト領域273を定義する。   Therefore, in the present embodiment, the window size considered to be optimal for each object is determined using the above-described distance information calculated from the output of the AF sensor 240. Since the distance information includes the distance of the object corresponding to the arrangement of the grouping distance measuring points 260, first, an area surrounding the image position corresponding to the arrangement of the distance measuring points 260 is defined as an object area. In the example of the figure, a focused object area 271 is set as an object area corresponding to the focus range-finding point 261, a first non-focused object area 272 is set as an object area corresponding to the first non-focus range-finding point 262, and a second A second non-focused object region 273 is defined as an object region corresponding to the non-focusing distance measuring point 263.

そして、合焦オブジェクト領域271においては、一辺の長さがWの正方形である局所ウィンドウ281をそれぞれの視差画像で上下左右に移動させてマッチング処理を行う。同様に、第1非合焦オブジェクト領域272においては、一辺の長さがWの正方形である局所ウィンドウ282をそれぞれの視差画像で上下左右に移動させ、第2非合焦オブジェクト領域273においては、一辺の長さがWの正方形である局所ウィンドウ283をそれぞれの視差画像で上下左右に移動させて、マッチング処理を行う。 Then, at a focus object area 271, it performs moved matching the local window 281 with a side length of a square of W A vertically and horizontally in each parallax image. Similarly, in the first out-of-focus object region 272, to move the local window 282 with a side length of a square of W B in the vertical and horizontal directions in each of the parallax images in the second non-focused object area 273 moves the local window 283 with a side length of a square of W C in the vertical and horizontal directions in each of the parallax images, it performs a matching process.

合焦オブジェクト領域271においては視差画像間に視差が存在しないことが予想されるので、局所ウィンドウ281におけるウィンドウサイズWは、合焦オブジェクト領域に対するウィンドウサイズとして予め定められたサイズが適用される。一方、第1非合焦オブジェクト領域272においては視差画像間に、距離差|D−D|に基づく視差量が存在することが想定されるので、局所ウィンドウ282におけるウィンドウサイズWは、距離差|D−D|から算出されるサイズが適用される。同様に、第2非合焦オブジェクト領域273においても視差画像間に、距離差|D−D|に基づく視差量が存在することが想定されるので、局所ウィンドウ283におけるウィンドウサイズWは、距離差|D−D|から算出されるサイズが適用される。具体的な算出手順については後述する。 Because the focus object region 271 is expected that there is no disparity between the parallax images, the window size W A in the local window 281 having a predetermined size window size for focusing the object area is applied. On the other hand, between the parallax images in the first out-of-focus object region 272, the distance difference | D B -D A | so that the amount of parallax based on the presence is envisaged, the window size W B in the local window 282, The size calculated from the distance difference | D B −D A | is applied. Similarly, in the second non-focused object region 273, it is assumed that there is a parallax amount based on the distance difference | D C −D A | between the parallax images, so the window size W C in the local window 283 is , The size calculated from the distance difference | D C −D A | is applied. A specific calculation procedure will be described later.

このようにしてマッチング処理が行われると、それぞれのオブジェクトに対する輪郭が定められ、いわゆる距離画像を生成することができる。図11は、出力される距離画像の概念を説明する図である。   When the matching process is performed in this manner, the contour for each object is determined, and a so-called distance image can be generated. FIG. 11 is a diagram for explaining the concept of the output distance image.

図示するように、被写体として存在するオブジェクトごとに輪郭が定められ、それぞれの輪郭に内包する領域がほぼ同じ距離に存在することを表す。少女101に対応する画像領域としての領域Aには、距離Dが関連付けられている。同様に、少年102に対応する画像領域としての領域Bには、距離Dが関連付けられ、女性103に対応する画像領域としての領域Cには、距離Dが関連付けられている。また、その他の領域である領域Dの距離は無限遠として関連付けられる。 As shown in the figure, a contour is defined for each object that exists as a subject, indicating that the regions included in each contour are present at substantially the same distance. A distance DA is associated with an area A as an image area corresponding to the girl 101. Similarly, a distance D B is associated with a region B as an image region corresponding to the boy 102, and a distance D C is associated with a region C as an image region corresponding to the woman 103. Further, the distance of the area D, which is another area, is associated as infinity.

なお、図示する距離画像に対しては、3つの視差画像のいずれかを基準として輪郭を定めても良いし、3つの視差画像の重心により規定される視差の無い仮想的な画像を基準として輪郭を定めても良い。また、対応する本撮影画像に対応させて輪郭を定めても良い。   Note that for the distance image shown in the figure, the contour may be defined based on one of the three parallax images, or the contour image based on a virtual image having no parallax defined by the center of gravity of the three parallax images. May be determined. Further, the contour may be determined in correspondence with the corresponding main captured image.

奥行き情報算出部251は、このようにして算出した奥行き情報を、図11で示すようなオブジェクトの輪郭とそれに対応する距離により定義された距離画像として出力することもできるし、オブジェクトごとに輪郭を定めるベクトルデータと対応する距離とを列挙した、オブジェクトテーブルとして出力することもできる。   The depth information calculation unit 251 can output the depth information calculated in this way as a distance image defined by the object outline and the distance corresponding to the object as shown in FIG. It can also be output as an object table listing enumerated vector data and corresponding distances.

次に、距離差に基づいてウィンドウサイズを決定する算出手順について説明する。図12は、オブジェクトと視差量の関係を表す概念図である。なお、ここでは主光線がレンズ群211の瞳の中心を通ると仮定する。   Next, a calculation procedure for determining the window size based on the distance difference will be described. FIG. 12 is a conceptual diagram showing the relationship between an object and the amount of parallax. Here, it is assumed that the chief ray passes through the center of the pupil of the lens group 211.

フォーカスレンズ212が特定のオブジェクトに焦点を合せた場合の、そのフォーカス位置に存在する合焦オブジェクトまでの距離をsとする。また、デフォーカス位置に存在する非合焦オブジェクトまでの距離をsとする。そして、レンズユニット210の焦点距離をfとし、絞り値をFとすれば、sにある非合焦オブジェクトの撮像素子243上に現れる視差量εは、

Figure 2012108263
と表される。この式により、合焦オブジェクトまでの距離sと非合焦オブジェクトまでの距離sが既知であれば、その他のパラメータは補助撮影画像の撮影時において確定されているので、視差量εを算出することができる。なお、図による距離sおよび距離sは、レンズユニット210の瞳位置からの距離であるが、撮像素子243の結像面から瞳位置までの距離も、レンズ情報により既知であるので、AFセンサ240の出力から得られる距離情報を利用することができる。 When the focus lens 212 focuses on a specific object, s is a distance to the focused object existing at the focus position. Further, the distance to the out-of-focus object existing at the defocus position is s 1 . If the focal length of the lens unit 210 is f and the aperture value is F, the parallax amount ε appearing on the image sensor 243 of the out-of-focus object in s 1 is
Figure 2012108263
It is expressed. From this equation, if the distance s to the focused object and the distance s 1 to the non-focused object are known, the parallax amount ε is calculated because the other parameters are determined when the auxiliary captured image is captured. be able to. Note that the distance s and the distance s 1 shown in the figure are distances from the pupil position of the lens unit 210, but the distance from the imaging surface of the image sensor 243 to the pupil position is also known from the lens information, and therefore, the AF sensor. The distance information obtained from the 240 outputs can be used.

視差量εは、式(2)から、非合焦オブジェクトごとに算出され得ることがわかる。したがって、非合焦オブジェクト領域ごとにεを算出できるので、それぞれの非合焦オブジェクト領域に対して、視差量εに相当するピクセルサイズをウィンドウサイズとして規定する局所ウィンドウを適用できる。   It can be seen from the equation (2) that the parallax amount ε can be calculated for each out-of-focus object. Therefore, since ε can be calculated for each non-focused object region, a local window that defines a pixel size corresponding to the parallax amount ε as a window size can be applied to each non-focused object region.

図13は、補助撮影画像の取得から奥行き情報の出力までの処理フローを示す図である。本フローにおける一連の処理は、カメラシステム制御部245が操作部材を介してユーザから指示を受け付けたとき、または、予め定められた制御プログラムに距離算出処理が組み込まれているとき等に開始される。   FIG. 13 is a diagram illustrating a processing flow from acquisition of an auxiliary captured image to output of depth information. A series of processes in this flow is started when the camera system control unit 245 receives an instruction from the user via the operation member or when a distance calculation process is incorporated in a predetermined control program. .

ステップS101では、画像処理部246が処理対象となる補助撮影画像を取得する。画像処理部246は、処理対象の補助撮影画像として、撮像素子243から出力された画像信号をそのまま取得しても良いし、撮影後に奥行き情報を算出しないまま記録部に記録されている補助撮影画像を読み出して取得しても良い。したがって、本実施形態においてはカメラユニット230を画像演算装置として奥行き情報の算出を実行するが、奥行き情報の算出は、カメラとは別個の独立した画像演算装置で実行することもできる。   In step S101, the image processing unit 246 acquires an auxiliary captured image that is a processing target. The image processing unit 246 may acquire the image signal output from the image sensor 243 as the auxiliary captured image to be processed as it is, or the auxiliary captured image recorded in the recording unit without calculating the depth information after shooting. May be read and acquired. Therefore, in the present embodiment, the depth information is calculated using the camera unit 230 as the image arithmetic device, but the depth information can also be calculated by an independent image arithmetic device separate from the camera.

例えば、PCを例にすれば、カメラとの間に記録媒体を介在させ、記録媒体に記録された補助撮影画像を読み出して処理することもできるし、有線、無線によりカメラと接続した状態を確立すれば、補助撮影画像の撮影と連動して処理することもできる。この場合は、補助撮影画像に関連付けられた、または一体的に記録された、AFセンサ240の出力に基づく距離情報も、補助撮影画像と共に画像演算装置に取り込む。また、演算の方式に応じて、補助撮影画像の撮影時におけるレンズユニット210のレンズ情報、移動量変換関数等も画像演算装置に取り込む。   For example, taking a PC as an example, a recording medium can be interposed between the camera and an auxiliary captured image recorded on the recording medium can be read and processed, or a state where the camera is connected to the camera by wire or wirelessly can be established. If so, processing can be performed in conjunction with the shooting of the auxiliary captured image. In this case, distance information based on the output of the AF sensor 240 associated with or recorded integrally with the auxiliary captured image is also taken into the image arithmetic apparatus together with the auxiliary captured image. Further, according to the calculation method, the lens information of the lens unit 210 at the time of shooting the auxiliary captured image, the movement amount conversion function, and the like are also taken into the image calculation device.

距離情報については、AFセンサ240の出力に基づく距離情報でなくても、合焦オブジェクトまでの距離、非合焦オブジェクトまでの距離がそれぞれ少なくとも1つ以上含まれる距離情報であれば、いかなる取得方式により取得されたものであっても良い。オブジェクトまでの距離は様々な取得方式が知られているが、例えば、赤外線投射型のアクティブ測距方式等が利用できる。なお、以下のフローにおいては、すでに説明したように、オブジェクト距離とグルーピングした測距点260の配置とがペアとして記録された距離情報を例に説明する。   As for the distance information, any acquisition method may be used as long as the distance information includes at least one distance to the in-focus object and at least one distance to the non-focus object, even if the distance information is not based on the output of the AF sensor 240. It may be acquired by. Various acquisition methods are known for the distance to the object. For example, an infrared projection type active distance measurement method can be used. In the following flow, as described above, the distance information in which the object distance and the arrangement of the grouped distance measuring points 260 are recorded as a pair will be described as an example.

画像処理部246は、ステップS102で、補助撮影画像から、Rフィルタ部304を通過して形成された赤色画像、すなわち、R画素フィルタが設けられた画素の出力から形成されるI画像を抽出する。同様に、Gフィルタ部305を通過して形成された緑色画像であるI画像とBフィルタ部306を通過して形成された青色画像であるI画像を抽出する。画像処理部246は、このように波長帯別画像を抽出すると、これらの画像を奥行き情報算出部251へ引き渡す。 The image processing unit 246, extracted in step S102, the auxiliary captured image, R filter portion 304 red image formed through the, i.e., the I r image formed from the output of a pixel R pixel filter is provided To do. Similarly, to extract the I b image is I g images and B blue image formed by passing through the filter unit 306 is a green image formed by passing through the G filter portion 305. When the image processing unit 246 extracts the wavelength band-specific images in this way, the image processing unit 246 delivers these images to the depth information calculation unit 251.

奥行き情報算出部251は、ステップS103で、距離情報を抽出する。距離情報として取得した情報が、測距情報等の未だ距離に換算される前の状態であれば、ここでそれぞれのオブジェクトまでの距離を算出する。また、奥行き情報算出部251は、オブジェクト距離とグルーピングした測距点260の配置によるペアがいくつあるかをカウントし、変数nに代入する。   In step S103, the depth information calculation unit 251 extracts distance information. If the information acquired as the distance information is in a state before being converted into distance such as distance measurement information, the distance to each object is calculated here. Further, the depth information calculation unit 251 counts how many pairs are formed by the arrangement of the distance measuring points 260 grouped with the object distance, and substitutes them into the variable n.

奥行き情報算出部251は、ステップS104へ進み、インクリメント変数iを1とする。そして、ステップS105へ進み、i番目のペアに対応するオブジェクトOiについて、上述の手順によりオブジェクト領域とウィンドウサイズを決定する。   The depth information calculation unit 251 proceeds to step S104 and sets the increment variable i to 1. In step S105, the object region and window size are determined for the object Oi corresponding to the i-th pair by the above-described procedure.

奥行き情報算出部251は、ステップS105へ進み、決定したオブジェクト領域付近において、決定したウィンドウサイズにより規定した局所ウィンドウを用いてオブジェクトOiに対する境界を確定する。この段階では、隣接するオブジェクトに対して境界が確定していないので、まだ境界間の調整がなされておらず、その意味においてオブジェクトの輪郭は定まっていない。   The depth information calculation unit 251 proceeds to step S105 and determines a boundary for the object Oi using the local window defined by the determined window size in the vicinity of the determined object region. At this stage, the boundary between the adjacent objects has not been determined, so the adjustment between the boundaries has not yet been made, and the outline of the object has not been determined in that sense.

奥行き情報算出部251は、ステップS107でインクリメント変数iをインクリメントしてステップS108へ進む。ステップS108では、インクリメント変数iが変数nより大きいか否かを判断する。つまり、距離情報として取得したペアの全てについて処理が完了したか否かを判断する。条件を満たさなければステップS105へ戻り、満たせばステップS109へ進む。   The depth information calculation unit 251 increments the increment variable i in step S107 and proceeds to step S108. In step S108, it is determined whether or not the increment variable i is larger than the variable n. That is, it is determined whether or not processing has been completed for all pairs acquired as distance information. If the condition is not satisfied, the process returns to step S105, and if satisfied, the process proceeds to step S109.

奥行き情報算出部251は、ステップS109で、それぞれのオブジェクトに対して確定した境界が互いに交差しているかなどの不整合が無いかを確認し、不整合箇所を調整する。不整合箇所の調整は、例えば近点側のオブジェクトを優先するなどの、予め定められたアルゴリズムに従って実行される。境界の調整が終了すれば、それを輪郭情報として確定し、ステップS110で奥行き情報として出力する。   In step S109, the depth information calculation unit 251 confirms whether there is any inconsistency such as whether the boundaries established for each object intersect each other, and adjusts the inconsistent portion. The adjustment of the inconsistent portion is executed according to a predetermined algorithm, for example, giving priority to an object on the near point side. When the boundary adjustment is completed, it is confirmed as contour information and output as depth information in step S110.

奥行き情報は、距離画像データとして別途独立したファイルを生成しても良いし、補助撮影画像に付帯して記録しても良い。別途独立したファイルを生成する場合には、補助撮影画像に対してリンク情報を記録する。もちろん、上述のように、オブジェクトごとに輪郭を定めるベクトルデータと対応する距離とを列挙した、オブジェクトテーブルとして出力することもできる。以上により一連の処理フローを終了する。   For the depth information, a separate file may be generated as the distance image data, or the auxiliary information may be recorded with the auxiliary captured image. When a separate file is generated separately, link information is recorded for the auxiliary captured image. Of course, as described above, it is also possible to output as an object table in which vector data for defining an outline for each object and corresponding distances are listed. A series of processing flow is complete | finished by the above.

次に、上記処理フローの変形例を説明する。上述の処理においては、取得した距離情報からオブジェクト間の距離差を算出し、この距離差に起因する視差量からウィンドウサイズを演算して局所ウィンドウを規定した。本変形例においては、予め設定された複数のウィンドウサイズにより局所ウィンドウを規定し、それぞれの局所ウィンドウによって視差画像の全領域に対してオブジェクトの距離と境界を抽出する演算を行う。このようにして抽出された、あるオブジェクトに対する複数の距離のうち、取得した距離情報と最も一致する演算結果を得た局所ウィンドウによる境界を、当該オブジェクトの境界と定める。以下にその処理フローを説明する。   Next, a modified example of the processing flow will be described. In the above processing, the distance difference between objects is calculated from the acquired distance information, and the window size is calculated from the amount of parallax caused by the distance difference to define the local window. In this modification, a local window is defined by a plurality of window sizes set in advance, and an operation for extracting the distance and boundary of an object is performed on the entire region of the parallax image by each local window. Of the plurality of distances with respect to a certain object extracted in this way, the boundary by the local window that obtains the operation result that most closely matches the acquired distance information is determined as the boundary of the object. The processing flow will be described below.

図14は、補助撮影画像の取得から奥行き情報の出力までの他の処理フローを示す図である。ステップS201では、画像処理部246が処理対象となる補助撮影画像を取得する。画像処理部246は、ステップS102で、補助撮影画像からI、I、Iの各視差画像を抽出し、奥行き情報算出部251へ引き渡す。奥行き情報算出部251は、ステップS203で、距離情報を抽出すると共に、オブジェクト距離とグルーピングした測距点260の配置によるペアがいくつあるかをカウントし、変数nに代入する。 FIG. 14 is a diagram illustrating another processing flow from acquisition of an auxiliary captured image to output of depth information. In step S201, the image processing unit 246 acquires an auxiliary captured image to be processed. In step S < b > 102, the image processing unit 246 extracts I r , I g , and I b parallax images from the auxiliary captured image, and delivers them to the depth information calculation unit 251. In step S203, the depth information calculation unit 251 extracts distance information, counts the number of pairs based on the arrangement of the distance measuring points 260 grouped with the object distance, and substitutes it into a variable n.

画像処理部246は、ステップS204で、インクリメント変数jを1とする。そして、ステップS205へ進み、予め設定されたm個のウィンドウサイズのうち、j番目のウィンドウサイズであるWjにより規定した局所ウィンドウで各視差画像の全体領域を探索し、各オブジェクトの距離および境界を演算する。なお、この段階におけるウィンドウサイズは、視差量に対して適切なサイズではないものを含むので、上述のように、演算結果には誤差等を含み得る。   In step S204, the image processing unit 246 sets the increment variable j to 1. In step S205, the entire area of each parallax image is searched for in the local window defined by the jth window size Wj among the m window sizes set in advance, and the distance and boundary of each object are determined. Calculate. In addition, since the window size at this stage includes a size that is not appropriate for the amount of parallax, the calculation result may include an error or the like as described above.

奥行き情報算出部251は、ステップS206でインクリメント変数jをインクリメントしてステップS207へ進む。ステップS207では、インクリメント変数jが変数mより大きいか否かを判断する。つまり、予め設定されたm個のウィンドウサイズの全てについて演算が完了したか否かを判断する。条件を満たさなければステップS205へ戻り、満たせばステップS208へ進む。   The depth information calculation unit 251 increments the increment variable j in step S206 and proceeds to step S207. In step S207, it is determined whether or not the increment variable j is larger than the variable m. That is, it is determined whether or not the calculation has been completed for all the m window sizes set in advance. If the condition is not satisfied, the process returns to step S205, and if satisfied, the process proceeds to step S208.

奥行き情報算出部251は、ステップS208で、インクリメント変数iを1とする。そして、ステップS209へ進み、i番目のペアに対応するオブジェクトOiについて、ステップS205において演算されたm個の距離と、距離情報によるオブジェクト距離を対比する。   The depth information calculation unit 251 sets the increment variable i to 1 in step S208. In step S209, for the object Oi corresponding to the i-th pair, the m distances calculated in step S205 are compared with the object distance based on the distance information.

奥行き情報算出部251は、ステップS210へ進み、演算されたm個の距離のうち距離情報によるオブジェクト距離Diと最も近いものを選択し、これを算出したウィンドウサイズWjによって演算されたオブジェクトOi近傍の境界を、オブジェクトOi近傍の境界として確定する。 Depth information calculating section 251 proceeds to step S210, the distance select the one closest to the object distance Di by the information, the object Oi vicinity computed by the window size Wj 0 calculated this out of the computed m-number of distance Is determined as the boundary in the vicinity of the object Oi.

奥行き情報算出部251は、ステップS211でインクリメント変数iをインクリメントしてステップS212へ進む。ステップS212では、インクリメント変数iが変数nより大きいか否かを判断する。つまり、距離情報として取得したペアの全てについて処理が完了したか否かを判断する。条件を満たさなければステップS208へ戻り、満たせばステップS213へ進む。   The depth information calculation unit 251 increments the increment variable i in step S211 and proceeds to step S212. In step S212, it is determined whether or not the increment variable i is larger than the variable n. That is, it is determined whether or not processing has been completed for all pairs acquired as distance information. If the condition is not satisfied, the process returns to step S208, and if satisfied, the process proceeds to step S213.

奥行き情報算出部251は、ステップS213で、それぞれのオブジェクトに対して確定した境界が互いに交差しているかなどの不整合が無いかを確認し、不整合箇所を調整する。境界の調整が終了すれば、それを輪郭情報として確定し、ステップS214で奥行き情報として出力する。以上により一連の処理フローを終了する。   In step S213, the depth information calculation unit 251 checks whether there is any inconsistency, such as whether the boundaries determined for each object intersect each other, and adjusts the inconsistency location. When the boundary adjustment is completed, it is confirmed as contour information, and is output as depth information in step S214. A series of processing flow is complete | finished by the above.

以上の実施形態においては、AFセンサ240の測距点に応じて合焦オブジェクトと非合焦オブジェクトを決定したが、複数のオブジェクトのうち少なくとも一つを、操作部材を介してユーザに指定させるように構成しても良い。この場合、奥行き情報算出部251は、ユーザによって指定されたオブジェクトに対してウィンドウサイズを決定し、奥行き情報の演算を実行する。   In the above embodiment, the in-focus object and the out-of-focus object are determined according to the distance measuring point of the AF sensor 240, but at least one of the plurality of objects is designated by the user via the operation member. You may comprise. In this case, the depth information calculation unit 251 determines the window size for the object specified by the user, and executes the calculation of depth information.

また、以上の実施形態においては、一眼レフカメラを例に説明したが、光学ファインダを持たないレンズ交換式カメラ、レンズユニットが一体化されたコンパクトカメラ、動画撮影を行うこともできるビデオカメラといった撮像装置に対しても適用することができる。   In the above embodiments, a single-lens reflex camera has been described as an example. However, imaging such as an interchangeable lens camera without an optical finder, a compact camera with an integrated lens unit, and a video camera that can also shoot moving images. It can also be applied to a device.

また、以上の実施形態においては、撮像素子としてベイヤー配列のカラーフィルタを有する単板式撮像素子を例に説明したが、他のカラーフィルタ配列であっても良く、さらには、RGBに限らず他の波長帯を透過させるフィルタが配列されていても良い。この場合、構造化開口のフィルタ部は、撮像素子のカラーフィルタの波長帯に応じて透過波長帯が選択される。   In the above embodiment, a single-plate image sensor having a Bayer array color filter as an image sensor has been described as an example. However, other color filter arrays may be used, and not limited to RGB. A filter that transmits the wavelength band may be arranged. In this case, the transmission wavelength band is selected for the filter portion of the structured aperture according to the wavelength band of the color filter of the image sensor.

また、カラーフィルタを持たず、フォトダイオードの奥行き方向に異なる感応波長帯を有する撮像素子に対しても適用できる。この場合、構造化開口のフィルタ部は、フォトダイオードの奥行き方向で分離される波長帯に応じて透過波長帯が選択される。さらには、単板の撮像素子を備えるカメラに限らず、例えばRGBのそれぞれに分けられた三板式カメラのような、入射する被写体光束を複数の波長帯に分離してそれぞれの波長帯を独立して受光する複数の撮像素子を備えるカメラに対しても適用することができる。また、RGBのうち2つの波長帯を透過させるフィルタが配列されていれば、上述の距離情報取得を行うことができるので、以上の実施形態に係る構造化開口のRGBフィルタのうちの一つを取り除いても良い。   Further, the present invention can be applied to an image pickup element that does not have a color filter and has different sensitive wavelength bands in the depth direction of the photodiode. In this case, the transmission wavelength band is selected for the filter portion of the structured aperture according to the wavelength band separated in the depth direction of the photodiode. Furthermore, the present invention is not limited to a camera having a single-plate image sensor, but separates the incident light flux into a plurality of wavelength bands, such as a three-plate camera divided into RGB, for example, to make each wavelength band independent. The present invention can also be applied to a camera including a plurality of image sensors that receive light. Moreover, if the filter which transmits two wavelength bands among RGB is arranged, the above-mentioned distance information acquisition can be performed, so one of the RGB filters of the structured aperture according to the above embodiment is It may be removed.

また、取得する距離情報は、カメラから各オブジェクトまでの絶対距離でなくても良い。この場合、合焦オブジェクトから非合焦オブジェクトまでの相対距離が取得されれば、視差量に基づくウィンドウサイズが決定できる。また、取得する距離情報を用いて非合焦オブジェクト間の距離を算出し、奥行き情報の演算結果の確からしさを評価する評価演算に利用しても良い。   Further, the acquired distance information may not be the absolute distance from the camera to each object. In this case, if the relative distance from the focused object to the non-focused object is acquired, the window size based on the parallax amount can be determined. Further, the distance information between the out-of-focus objects may be calculated using the acquired distance information, and may be used for an evaluation calculation for evaluating the certainty of the calculation result of the depth information.

また、以上の実施例においては、オブジェクトの距離差に対応して算出される視差量に基づいてウィンドウサイズを決定したが、オブジェクト領域内で適用するウィンドウサイズは多少の許容範囲を有する。具体的には、当該ウィンドウサイズ内で局所ウィンドウを移動させるときに、その位置において局所ウィンドウ内にオブジェクトの境界が含まれない場合は、境界が含まれない限りにおいてウィンドウサイズを拡大しても良い。したがって、境界が複雑形状であるオブジェクトに対しては、ウィンドウサイズを拡大できる範囲が小さい。   In the above embodiment, the window size is determined based on the parallax amount calculated corresponding to the object distance difference. However, the window size applied in the object area has some tolerance. Specifically, when the local window is moved within the window size, if the boundary of the object is not included in the local window at the position, the window size may be enlarged as long as the boundary is not included. . Therefore, the range in which the window size can be enlarged is small for an object having a complicated boundary.

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

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

101 少女、102 少年、103 女性、200 一眼レフカメラ、201 光軸、210 レンズユニット、211 レンズ群、212 フォーカスレンズ、213 ズームレンズ、214 絞り、216 レンズシステム制御部、217 レンズ鏡筒、218 レンズマウント、219 装着スリット、220 挿抜ガイド、221 位置センサ、230 カメラユニット、231 カメラマウント、232 メインミラー、233 回転軸、234 ピント板、235 ペンタプリズム、236 接眼光学系、237 AEセンサ、238 サブミラー、239 AF光学系、240 AFセンサ、241 フォーカルプレーンシャッタ、242 光学ローパスフィルタ、243 撮像素子、244 メイン基板、245 カメラシステム制御部、246 画像処理部、247 表示部、248 二次電池、249 フラッシュ、251 奥行き情報算出部、252 カメラメモリ、253 ワークメモリ、254 外部接続IF、255 レリーズスイッチ、260 測距点、261 合焦測距点、262 第1非合焦測距点、263 第2非合焦測距点、271 合焦オブジェクト領域、272 第1非合焦オブジェクト領域、273 第2非合焦オブジェクト領域、281、282、283 局所ウィンドウ、300 構造化開口ユニット、302 フィルタ、303 遮断フィルタ部、304 Rフィルタ部、305 Gフィルタ部、306 Bフィルタ部、307 ベース部、308 外周部、309 把持部、701 B曲線、702 G曲線、703 R曲線、711、712、713 矢印 101 Girl, 102 Boy, 103 Woman, 200 Single-lens reflex camera, 201 Optical axis, 210 Lens unit, 211 Lens group, 212 Focus lens, 213 Zoom lens, 214 Aperture, 216 Lens system control unit, 217 Lens barrel, 218 lens Mount, 219 Mounting slit, 220 Insertion / extraction guide, 221 Position sensor, 230 Camera unit, 231 Camera mount, 232 Main mirror, 233 Rotating shaft, 234 Focus plate, 235 Pentaprism, 236 Eyepiece optical system, 237 AE sensor, 238 Sub mirror, 239 AF optical system, 240 AF sensor, 241 focal plane shutter, 242 optical low-pass filter, 243 image sensor, 244 main board, 245 camera system control unit, 246 Image processing unit, 247 display unit, 248 secondary battery, 249 flash, 251 depth information calculation unit, 252 camera memory, 253 work memory, 254 external connection IF, 255 release switch, 260 distance measuring point, 261 focusing distance measuring point 262, first out-of-focus distance measuring point, 263 second out-of-focus distance measuring point, 271 in-focus object area, 272 first out-of-focus object area, 273 second out-of-focus object area, 281, 282, 283 Local window, 300 structured aperture unit, 302 filter, 303 blocking filter section, 304 R filter section, 305 G filter section, 306 B filter section, 307 base section, 308 outer peripheral section, 309 gripping section, 701 B curve, 702 G Curve, 703 R curve, 711, 712, 713 Arrow

Claims (8)

入射する被写体光束を複数の波長帯に分離して検出する受光素子から出力され、前記複数の波長帯の少なくとも2つに対応する画像が互いに視差を有する視差画像データを取得する画像取得部と、
前記視差画像データにおいて合焦状態にある少なくとも一つの合焦物体までの距離情報と非合焦状態にある少なくとも一つの非合焦物体までの距離情報を取得する距離情報取得部と、
前記距離情報に基づくウィンドウサイズにより規定される局所ウィンドウを用いて前記視差画像データ間のマッチング処理を行うことにより、前記視差画像に含まれる複数の物体に対して奥行き方向に分離して輪郭を定める演算部と
を備える画像演算装置。
An image acquisition unit that outputs parallax image data that is output from a light receiving element that detects and separates incident subject light flux into a plurality of wavelength bands, and images corresponding to at least two of the plurality of wavelength bands have a parallax;
A distance information acquisition unit that acquires distance information to at least one in-focus object in the in-focus state and distance information to at least one in-focus object in the in-focus state in the parallax image data;
By performing a matching process between the parallax image data using a local window defined by a window size based on the distance information, a plurality of objects included in the parallax image are separated in the depth direction to define an outline. An image calculation device comprising a calculation unit.
前記演算部は、前記複数の物体に応じて複数の前記ウィンドウサイズを決定し、決定された複数の前記ウィンドウサイズによりそれぞれ規定される複数の前記局所ウィンドウを用いて前記マッチング処理を行う請求項1に記載の画像演算装置。   2. The calculation unit determines a plurality of window sizes according to the plurality of objects, and performs the matching process using a plurality of local windows respectively defined by the plurality of determined window sizes. The image arithmetic device described in 1. 前記演算部は、前記合焦物体と前記非合焦物体の距離差に基づいて前記ウィンドウサイズを決定する請求項1または2に記載の画像演算装置。   The image calculation device according to claim 1, wherein the calculation unit determines the window size based on a distance difference between the focused object and the non-focused object. 前記演算部は、予め定められた複数の前記ウィンドウサイズごとに前記マッチング処理を実行し、算出された距離が前記距離情報と最も一致する場合の前記ウィンドウサイズを用いて前記輪郭を定める請求項1または2に記載の画像演算装置。   The calculation unit executes the matching process for each of a plurality of predetermined window sizes, and determines the contour using the window size when the calculated distance most closely matches the distance information. Alternatively, the image arithmetic apparatus according to 2. 前記複数の物体のうちの少なくとも一つをユーザに指定させる指定部を備え、
前記演算部は、前記ユーザによって指定された前記複数の物体のうちの少なくとも一つに対して前記ウィンドウサイズを決定する請求項1から4のいずれか1項に記載の画像演算装置。
A designation unit that allows a user to designate at least one of the plurality of objects;
The image calculation device according to claim 1, wherein the calculation unit determines the window size for at least one of the plurality of objects specified by the user.
前記距離情報は、前記視差画像データが撮影された時の、AFセンサの出力に基づく情報である請求項1から5のいずれか1項に記載の画像演算装置。   The image calculation device according to claim 1, wherein the distance information is information based on an output of an AF sensor when the parallax image data is captured. 前記距離情報は、前記AFセンサの複数の合焦点が前記出力に基づいて複数のグループに分けられたグループ情報を含み、
前記演算部は、前記グループ情報に基づいて複数の前記ウィンドウサイズを決定する請求項6に記載の画像演算装置。
The distance information includes group information in which a plurality of focal points of the AF sensor are divided into a plurality of groups based on the output,
The image calculation device according to claim 6, wherein the calculation unit determines a plurality of window sizes based on the group information.
入射する被写体光束を複数の波長帯に分離して検出する受光素子から出力され、前記複数の波長帯の少なくとも2つに対応する画像が互いに視差を有する視差画像データを取得する画像取得ステップと、
前記視差画像データにおいて合焦状態にある少なくとも一つの合焦物体までの距離情報と非合焦状態にある少なくとも一つの非合焦物体までの距離情報を取得する距離情報取得ステップと、
前記距離情報に基づくウィンドウサイズにより規定される局所ウィンドウを用いて前記視差画像データ間のマッチング処理を行うことにより、前記視差画像に含まれる複数の物体に対して奥行き方向に分離して輪郭を定める演算ステップと
をコンピュータに実行させる画像演算プログラム。
An image acquisition step of acquiring parallax image data output from a light receiving element that detects and splits an incident subject luminous flux into a plurality of wavelength bands, and images corresponding to at least two of the plurality of wavelength bands have parallax with each other;
A distance information acquisition step of acquiring distance information to at least one in-focus object in the in-focus state and distance information to at least one in-focus object in the in-focus state in the parallax image data;
By performing a matching process between the parallax image data using a local window defined by a window size based on the distance information, a plurality of objects included in the parallax image are separated in the depth direction to define an outline. An image calculation program for causing a computer to execute calculation steps.
JP2010256193A 2010-11-16 2010-11-16 Image calculation unit and image calculation program Withdrawn JP2012108263A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010256193A JP2012108263A (en) 2010-11-16 2010-11-16 Image calculation unit and image calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010256193A JP2012108263A (en) 2010-11-16 2010-11-16 Image calculation unit and image calculation program

Publications (1)

Publication Number Publication Date
JP2012108263A true JP2012108263A (en) 2012-06-07

Family

ID=46493960

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010256193A Withdrawn JP2012108263A (en) 2010-11-16 2010-11-16 Image calculation unit and image calculation program

Country Status (1)

Country Link
JP (1) JP2012108263A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017225071A (en) * 2016-06-17 2017-12-21 キヤノン株式会社 Information processing device, information processing method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017225071A (en) * 2016-06-17 2017-12-21 キヤノン株式会社 Information processing device, information processing method and program

Similar Documents

Publication Publication Date Title
KR101859458B1 (en) Image processing method, image processing apparatus and image capturing apparatus
JP2012022308A (en) Imaging device
JP5644468B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL PROGRAM
JP2007003655A (en) Apparatus for determining focal position of imaging lens and method thereof
JP5950664B2 (en) Imaging apparatus and control method thereof
JP5925186B2 (en) Imaging apparatus and control method thereof
JP6175748B2 (en) Imaging device
WO2019181622A1 (en) Distance measurement camera
JP7300895B2 (en) Image processing device, image processing method, program, and storage medium
JP2015043026A (en) Image capturing device and control method therefor
JP2012088169A (en) Distance information acquisition device and imaging apparatus
JP6039301B2 (en) IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2012022309A (en) Imaging device
JP2012108263A (en) Image calculation unit and image calculation program
JP2012107956A (en) Device for acquiring distance information, imaging divice, and structured aperture unit
JP2021051322A (en) Focusing state detection device and camera
JP5930792B2 (en) Imaging apparatus and control method thereof
JP5510094B2 (en) Image processing apparatus and image processing program
JP6223502B2 (en) Image processing apparatus, image processing method, program, and storage medium storing the same
JP2016099322A (en) Imaging device, control method of imaging device, and program
JP2015087494A (en) Imaging device
JP2014211589A (en) Focus adjustment device and imaging device
JP2012002870A (en) Imaging device, photographic lens, and image processing program
JP6071748B2 (en) Imaging apparatus and control method thereof
JP2012002859A (en) Imaging device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140204