JP6381206B2 - Image processing apparatus, control method thereof, and program - Google Patents
Image processing apparatus, control method thereof, and program Download PDFInfo
- Publication number
- JP6381206B2 JP6381206B2 JP2013266127A JP2013266127A JP6381206B2 JP 6381206 B2 JP6381206 B2 JP 6381206B2 JP 2013266127 A JP2013266127 A JP 2013266127A JP 2013266127 A JP2013266127 A JP 2013266127A JP 6381206 B2 JP6381206 B2 JP 6381206B2
- Authority
- JP
- Japan
- Prior art keywords
- image processing
- processing apparatus
- luminance
- image
- parallax images
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 86
- 238000000034 method Methods 0.000 title claims description 45
- 238000003384 imaging method Methods 0.000 claims description 35
- 238000012937 correction Methods 0.000 claims description 34
- 230000003287 optical effect Effects 0.000 claims description 19
- 235000019557 luminance Nutrition 0.000 description 74
- 210000001747 pupil Anatomy 0.000 description 45
- 230000008569 process Effects 0.000 description 21
- 238000010586 diagram Methods 0.000 description 17
- 230000006870 function Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 3
- 239000003086 colorant Substances 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000004907 flux Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Landscapes
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Color Television Image Signal Generators (AREA)
- Studio Devices (AREA)
Description
本発明は画像処理装置、その制御方法およびプログラムに関し、特には多視点画像を用いた光源色の推定技術に関するものである。 The present invention relates to an image processing apparatus, a control method thereof, and a program, and more particularly to a light source color estimation technique using a multi-viewpoint image.
従来、撮像装置には、様々な色温度の光源のもとで、白色の被写体が正しく白色に表現されるように色成分のゲインを調整するホワイトバランス調整機能が備わっている。より容易な撮影を実現するために、自動ホワイトバランス調整機能が搭載された撮像装置もある。自動ホワイトバランス調整を実現する方法には、画像全体で平均した被写体色がグレイになると仮定してゲインを調整する方法と、より正確な色表現を実現するための方法として光源(の色温度)を推定した上でゲインを調整する方法が知られている。 2. Description of the Related Art Conventionally, an imaging apparatus has a white balance adjustment function that adjusts a gain of a color component so that a white subject is correctly expressed in white under light sources having various color temperatures. In order to realize easier shooting, there is also an imaging apparatus equipped with an automatic white balance adjustment function. There are two methods for automatic white balance adjustment: gain adjustment assuming that the subject color averaged over the entire image is gray, and light source (color temperature) as a method for realizing more accurate color expression. There is known a method of adjusting the gain after estimating.
光源を推定する方法として、光源色を反映する鏡面反射成分を画像から抽出する方法が知られている(特許文献1および特許文献2)。 As a method of estimating a light source, a method of extracting a specular reflection component reflecting a light source color from an image is known (Patent Document 1 and Patent Document 2).
特許文献1の方法では、画像を複数のブロックに分割し、各ブロック内の画素を輝度値に応じて複数の段階に分類し、最も明るい段階に分類された画素の平均輝度(A値)と、2番目に明るい段階に分類された画素の平均輝度(B値)を求める。そして、全ブロックでのA値とB値の平均値の差分値を鏡面反射成分として抽出する。この方法では、ブロック内で求めた平均値をさらにブロック間で平均する統計処理を行っているため、画像上の様々な被写体の影響を受けて推定精度が低下する可能性がある。 In the method of Patent Document 1, an image is divided into a plurality of blocks, pixels in each block are classified into a plurality of stages according to luminance values, and the average luminance (A value) of the pixels classified in the brightest stage is determined. The average luminance (B value) of the pixels classified in the second brightest stage is obtained. And the difference value of the average value of A value and B value in all the blocks is extracted as a specular reflection component. In this method, statistical processing for further averaging the average value obtained in the block is performed between the blocks, so that the estimation accuracy may be reduced due to the influence of various subjects on the image.
特許文献2の方法では、複数の視差画像のそれぞれから視点の移動の方向に異なる位置の一次元領域を切り出して順に並べた2次元画像を生成し、画像内の各画素の移動軌跡が直線的或いは曲線的であるかを判定することにより鏡面反射成分の抽出を行っている。画像内の各画素について視差画像間の移動の軌跡の形状を判定する必要があるため、多数の視差画像が必要になるうえ、計算量が多く複雑な処理が必要である。また、1台の撮像装置を移動させて視差画像を取得するため、撮像装置を駆動するための装置が必要なほか、視差画像の取得時刻に差が生じ、被写体が移動する場合には適用が困難であるほか、動画像撮影への適用ができない問題もある。
In the method of
本発明では、上述の従来技術の問題点に鑑みてなされたものであり、簡便な構成で精度の良い光源色の推定が可能な画像処理装置、その制御方法およびプログラムを提供することを目的とする。 The present invention has been made in view of the above-described problems of the prior art, and an object thereof is to provide an image processing apparatus capable of accurately estimating a light source color with a simple configuration, a control method thereof, and a program. To do.
この課題を解決するため、例えば本発明の画像処理装置は以下の構成を備える。すなわち、露光時間が重複した複数の視差画像を取得する取得手段と、複数の視差画像に対してケラレ補正を行う補正手段と、補正手段によりケラレ補正が行われた複数の視差画像間の対応する位置における輝度差を算出する算出手段と、算出手段により算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定手段と、領域決定手段により決定された領域における算出手段により算出された輝度差から光源色を推定する推定手段とを有することを特徴とする。 In order to solve this problem, for example, an image processing apparatus of the present invention has the following configuration. That is, an acquisition unit that acquires a plurality of parallax images with overlapping exposure times, a correction unit that performs vignetting correction on the plurality of parallax images, and a plurality of parallax images that have undergone vignetting correction by the correction unit correspond to each other. A calculation means for calculating a luminance difference at a position , and a degree of coincidence for each partial area is obtained based on the luminance difference calculated by the calculation means, and an area having a relatively low degree of coincidence is determined as an area used for light source color estimation And an estimation means for estimating the light source color from the luminance difference calculated by the calculation means in the area determined by the area determination means .
本発明によれば、簡便な構成で精度の良い光源色の推定が可能になる。 According to the present invention, it is possible to estimate a light source color with high accuracy with a simple configuration.
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下では、画像処理装置の一例としての、光線空間情報を記録可能なライトフィールドカメラ(LFC)に本発明を適用した例を説明する。しかし、本発明は露光時間が重複した視差画像を取得可能な多眼カメラ(例えば撮像装置を直線上または格子状に配置して多眼撮像装置を構成するもの)を有する電子機器はもとより、視差画像の撮影や記録に関する機能を有さない電子機器にも適用可能である。これらの電子機器には、携帯電話機、ゲーム機、タブレット端末、パーソナルコンピュータなどが含まれるが、これらは単なる例示である。 Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. Hereinafter, an example in which the present invention is applied to a light field camera (LFC) capable of recording light space information as an example of an image processing apparatus will be described. However, the present invention is not limited to an electronic apparatus having a multi-lens camera (for example, a multi-lens imaging device configured by arranging imaging devices on a straight line or in a grid) that can obtain parallax images with overlapping exposure times. The present invention can also be applied to electronic devices that do not have functions related to image capturing and recording. These electronic devices include mobile phones, game machines, tablet terminals, personal computers, etc., but these are merely examples.
図2は本実施形態のライトフィールドカメラの機能構成例を示すブロック図である。 FIG. 2 is a block diagram showing a functional configuration example of the light field camera of the present embodiment.
ライトフィールドカメラは、例えばマイクロレンズアレイの各マイクロレンズに対して複数の画素が割り当てられた構造の撮像素子を用いて、光束の位置と角度の情報(光線空間(ライトフィールド)情報と呼ばれることもある)を記録可能なカメラである。1つのマイクロレンズの出射光を複数の画素で受光することで、各画素では異なる角度でマイクロレンズに入射した光の強度を得ることができる。また、同じマイクロレンズに割り当てられた複数の画素の各々は射出瞳面における異なる領域を通過した光束を受光するため、マイクロレンズに対して異なる位置の画素の信号から視差画像を生成することができる。 A light field camera uses, for example, an image sensor having a structure in which a plurality of pixels are assigned to each microlens of a microlens array, and is also referred to as light beam position and angle information (light space information). Is a camera capable of recording. By receiving light emitted from one microlens by a plurality of pixels, the intensity of light incident on the microlens at different angles can be obtained in each pixel. In addition, since each of the plurality of pixels assigned to the same microlens receives light beams that have passed through different regions on the exit pupil plane, a parallax image can be generated from signals of pixels at different positions with respect to the microlens. .
本実施形態のLFCは、本体1と、着脱可能なレンズ2とから構成される。本体1とレンズ2とは、レンズマウント(不図示)を通じて機械的に接続されるとともに、レンズマウントに設けられた電気接点11を通じて電気的に接続される。なお、レンズ2が本体1と一体である構成であってもよい。
The LFC of the present embodiment includes a main body 1 and a
物体からの光は、撮影光軸4を有する撮影光学部3を介して撮像素子6の撮像面に結像される。本実施形態の撮影素子6はマイクロレンズが格子状に配置されたいわゆるマイクロレンズアレイ(MLA)を有し、1つのマイクロレンズの出射光を複数の画素で受光する構成を有している。MLAの機能や配置の詳細については図5を用いて後述する。撮影素子6の各画素は入射光の強度に応じて電気信号(画像信号)を出力する。
Light from the object is imaged on the imaging surface of the
画像処理部7は、撮像素子6が出力した画像信号に対して処理を行う各種回路を有する。画像処理部7は例えば、A/D変換器、ホワイトバランス回路、ガンマ補正回路、補間演算回路等を有している。また、画像処理部7は、予め定められた方法を用いて画像、動画、音声などのデータを圧縮・伸長する回路を有し、記録用のデータを生成したり、記録されたデータを再生したりする。
The
記録部8は記録媒体および記録媒体にデータを読み書きするための回路を備えている。記録部8は、画像処理部7の出力したデータを記録媒体に記録する。また、記録媒体に記録されたデータを読み出して表示部9に表示するために画像処理部7へ出力する。表示部9は液晶モニタ等に撮影時や再生時のデータを表示するほか、カメラシステム制御部5の指示に従って撮影に必要な情報を表示する。操作部10は、レリーズボタン、合焦距離や絞り等の操作のほか、記録データの再生やメニュー画面による操作指示を検出する。
The
カメラシステム制御部5は、例えばCPUやMPUなどのプログラマブルプロセッサであり、不揮発性メモリに記憶されたプログラムを実行することにより各機能ブロックを制御し、LFCの機能を実現する。
The camera
カメラシステム制御部5は画像処理部7で処理された画像信号に基づいて撮像光学部3の合焦状態や被写体輝度を求める。カメラシステム制御部5は、撮像光学部3が有するフォーカスレンズの位置をレンズシステム制御部12を通じて制御し、撮像光学部3の合焦距離を調整する。また、カメラシステム制御部5は、被写体輝度に応じて絞り値、シャッタスピード、撮影感度などの露出条件を決定する。カメラシステム制御部5は、撮像光学部3が有する絞りの開口量についてもレンズシステム制御部12を通じて制御する。レンズシステム制御部12には不図示の手ぶれ検出センサが接続されており、手ぶれ補正を行うモードにおいては、手ぶれ検出センサの信号を元にレンズ駆動部13を介してブレ補正レンズを適切に制御する。カメラシステム制御部5はまた、必要に応じて、画像データやメニュー画面などを表示部9に出力する。
カメラシステム制御部5は、画像処理部7により処理された画像データに対して、後に説明する輝度調整処理、視差画像位置合わせ処理、輝度差算出処理、光源色推定処理を行う。
The camera
The camera
(光源色推定処理の流れ)
本実施形態の光源色推定処理について、図3に示すフローチャートおよび、図2および図4に示すブロック図を用いて説明する。
(Flow of light source color estimation process)
The light source color estimation process of the present embodiment will be described with reference to the flowchart shown in FIG. 3 and the block diagrams shown in FIGS.
図4は、カメラシステム制御部5の光源色推定処理に係る機能構成例を示すブロック図である。カメラシステム制御部5は、輝度調整部501、視差画像位置合わせ部502、輝度差算出部503、光源色推定部504、出力画像生成部505および制御部506を有する。制御部506は501から505の各処理部の機能以外について、カメラシステム制御部5として機能するための処理を行う。制御部506以外の各処理部の機能は、カメラシステム制御部5が画像処理部7を用いて実現してもよい。
FIG. 4 is a block diagram illustrating a functional configuration example related to the light source color estimation process of the camera
図3においてシステム制御部5は操作部10に含まれるレリーズボタンの押下を検出すると、画像取得指示が入力されたものとして以降の各ステップを開始する。
In FIG. 3, when detecting that the release button included in the
S101は視差画像の取得を行うステップである。カメラシステム制御部5は、電気接点11を通じてレンズシステム制御部12に指示を出し、レンズ駆動部13を制御してシャッタ兼絞りの動作を制御し、適切な露出条件で撮像素子6を露光する。さらに、カメラシステム制御部5は、撮像素子6から取得した画像データに対して画像処理部7が上述した補正等の処理を施した画像データを入手する。なお、LFCは1回の露光動作で複数の視差画像を得ることができる。
S101 is a step of acquiring a parallax image. The camera
S102において輝度調整部501は、画像処理部7から画像データを取得して輝度調整処理を行い、視差画像位置合わせ部502へ補正後の視差画像データを出力する。輝度調整の詳細については図6(a)から図6(c)を用いて後述するが、輝度調整部501は、瞳距離等のケラレの決定要因に基づいて予め設定された、各画素に対する補正値を、予め保存された補正値テーブルから読み出して各画素の輝度調整を行う。なお、本実施形態では、複数の視差画像に対して輝度補正処理を行うが、複数の視差画像を生成する前の各画素値に対して行ってもよい。
In S <b> 102, the
S103において視差画像位置合わせ部502は、被写体像の位置が一致するように視差画像間の位置合わせを行う。本実施形態における視差画像位置合わせ処理の詳細な動作については図7を用いて後述するが、視差画像位置合わせ部502は、公知の技術を用いて位置合わせすることができる。例えば、処理対象となる2つの視差画像に対して、視差画像のエピポーラ拘束の条件下で最もマッチングが良い画素の対応点を探すステレオマッチングにより位置合わせすることができる。
In step S103, the parallax
視差画像間の位置のずれ(位相差)は視差(図5での瞳領域30−aと30−eなどの重心間の距離)および被写体の距離に依存する。一般に平面物体でかつ物体表面がランバート面と仮定できる場合は、ステレオマッチングは容易である。一方で、本発明で対象とする鏡面反射成分を含む場合や位置合わせのブロック内に近距離の被写体と遠距離の被写体が混在する状況ではステレオマッチングの精度が下がる場合がある。 The positional shift (phase difference) between the parallax images depends on the parallax (the distance between the centers of gravity of the pupil regions 30-a and 30-e in FIG. 5) and the distance of the subject. In general, stereo matching is easy when it is a planar object and the object surface can be assumed to be a Lambertian surface. On the other hand, the accuracy of stereo matching may be lowered in the case where a specular reflection component that is a subject of the present invention is included or in a situation where a short distance object and a long distance object are mixed in the alignment block.
この対策として、視差画像位置合わせ部502は、位置合わせに用いるブロックの大きさを被写体の倍率に応じて設定してもよい。また、鏡面反射成分に起因するローカルミニマムに陥らないようにするためには、位置合わせに用いるブロックを大き目に設定してもよい。視差画像位置合わせ部502は、複数の視差画像と共に、視差画像の位置合わせの結果求めた視差画像間の対応する画素位置についての情報を出力する。また、視差画像位置合わせ部502は、後述する視差画像の像の一致度に基づいて光源色推定に適する画像上の領域を特定し、特定の一致度である領域を示す情報を出力する。
As a countermeasure against this, the parallax
S104において輝度差算出部503は、視差画像間の対応する画素における輝度差を算出する。輝度差算出部503は、視差画像位置合わせ部502において求めた視差画像間の対応する画素位置の情報と視差画像を取得した上で、それぞれの視差画像の対応する画素位置から輝度値を取得してその差分を算出する。また、詳細は後述するがS101で取得した視差画像の数が3以上の場合には、同位置に対応する画素の輝度値の最大値と最小値の差(最大輝度差)を算出する。
In S104, the luminance
S105で光源色推定部504は、R,G,B各色の輝度差を用いて、光源色(波長特性)を推定する。光源色推定の詳細は後述する。
In step S105, the light source
S106で出力画像生成部505は、例えば、視差画像に基づく光線空間情報のうち角度情報を積分して出力像を生成する。角度に関して積分する前に各視差画像をずらすことでいわゆるリフォーカスして出力像を生成してもよい。
In S106, for example, the output
S107において画像処理部7は、光源色推定部504がS105で求めた光源色の推定結果に基づいて入力画像のホワイトバランス調整を行ない、S106で生成した出力像にホワイトバランス調整を施す。また、画像処理部7は、ホワイトバランス調整後の画像を用い、記録フォーマットに応じた形式の記録用画像ファイルを生成する。画像処理部7は、画像ファイルを生成する際、必要に応じて画像の圧縮符号化も行う。
In S107, the
S103,S104,S105,S107の処理は画像を複数の領域に分けて行うことができる。例えば、外光とは異なる光源特性をもつ光源が撮影装置近傍にある場合、光源の影響を受ける領域と影響を受けない(外光のみの)領域では光源色が異なる。このため領域ごとに光源色を求めてホワイトバランス調整を施すと良い。このような方法を用いれば、例えば日中シンクロと呼ばれる太陽光とストロボ光が当たるような撮影場面において、ストロボ光が支配的な領域と、太陽光が支配的な領域の双方に適当なホワイトバランス調整を施すことが可能となる。 The processing of S103, S104, S105, and S107 can be performed by dividing the image into a plurality of regions. For example, when a light source having a light source characteristic different from that of outside light is in the vicinity of the photographing apparatus, the light source color is different between a region affected by the light source and a region not affected (only with outside light). For this reason, it is preferable to obtain a light source color for each region and perform white balance adjustment. By using this method, for example, in a shooting scene where sunlight and strobe light hit, such as daytime synchro, white balance is suitable for both the area where the strobe light is dominant and the area where the sunlight is dominant. Adjustments can be made.
S108において記録部8は、S107で得られた記録用画像ファイルを記録部8に記録して一連の撮像動作を完了する。必要であればカメラシステム制御部5はホワイトバランス調整後の画像を画像処理部7から取得して表示部9に表示させてプレビュー動作なども行う。
In S108, the
(視差画像取得処理)
図3のS101で行う視差画像の取得処理について図5を示してさらに説明する。図5(a)は撮像素子6とMLA20の関係を模式的に示す図である。図5(b)は撮像素子6の画素とMLA20の対応関係を模式的に示す図である。図5(c)はMLA20のレンズによって、レンズに対応する画素が特定の瞳領域と対応づけられることを示す図である。
(Parallax image acquisition process)
The parallax image acquisition process performed in S101 of FIG. 3 will be further described with reference to FIG. FIG. 5A is a diagram schematically showing the relationship between the
図5(a)に示すように撮像素子6上にはMLA20が設けられており、MLA20の前側主点は撮影光学部3の結像面近傍になるように配置されている。図5(a)はLFCの横と、正面からMLA20を見た状態を示しており、LFCの正面から見るとMLA20が撮像素子6の画素を覆うように配置されている。なお、図5(a)ではMLA20を構成する各マイクロレンズを見やすくするために、大きく記載したが、実際には図5(b)に示すように各マイクロレンズは画素の数倍から数十倍程度の大きさしかない。
As shown in FIG. 5A, the
図5(b)は図5(a)のLFC正面からみた図を一部拡大した図である。図5(b)に示す格子状の枠は、撮像素子6の各画素を示している。一方、MLA20を構成する各マイクロレンズは太い円で示した。図5(b)から明らかなようにマイクロレンズ1つに対して複数の画素が割り当てられており、図5(b)の例では、5行x5列=25個の画素が1つのマイクロレンズに対して設けられている。(すなわち各マイクロレンズは画素の約25倍の大きさである。)
図5(c)は撮像素子6を、マイクロレンズ光軸を含みセンサの長手方向が図の横方向になるように切断した図である。図5(c)の20−a、20−b、20−c、20−d、20−eのそれぞれは図5(b)に示した位置の画素(1つの光電変換部)を示している。一方、図5(c)の上方に示した図は撮影光学部3の射出瞳面を示している。実際には、図5(c)の下方に示したセンサの図と方向を合わせると、射出瞳面は図5(c)の紙面垂直方向になるが、説明のために投影方向を変化させている。また、図5(c)においては説明を簡単にするために、1次元の投影/信号処理について説明する。実際の装置においては、これを容易に2次元に拡張することができる。
FIG. 5B is a partially enlarged view of the front view of the LFC in FIG. A grid-like frame shown in FIG. 5B indicates each pixel of the
FIG. 5C is a view in which the
図5(c)に示すように、MLA20によって各画素は撮影光学部3の射出瞳面上の特定の領域と共役になるように設計されている。図5(c)の例では画素20−aと領域30−aが、画素20−bと領域30−bが、画素20−cと領域30−cが、画素20−dと領域30−dが、画素20−eと領域30−eがそれぞれ対応している。すなわち画素20−aには撮影光学部3の射出瞳面上の領域30−aを通過した光束のみが入射する。他の画素も同様である。結果として、瞳面上での通過領域と撮像素子6上の位置関係から角度の情報を取得することが可能となる。
As shown in FIG. 5C, each pixel is designed to be conjugate with a specific area on the exit pupil plane of the imaging
瞳領域30−aを通過した光束のみを捉えている画素20−aと同じ対応関係にある画素のみ集めた画像と、瞳領域30−eを通過した光束のみを捉えている画素20−eと同じ対応関係にある画素のみ集めた画像は視差画像となる。つまり、画素20−aと同じ対応関係にある画素のみ集めた画像は瞳領域30−aから見た画像となっており、画素20−eと同じ対応関係にある画素のみ集めた画像は瞳領域30−eから見た画像となる。このように、LFCでは、一度の露光で得られる信号から、複数の視差画像を得ることができる。 An image obtained by collecting only pixels having the same correspondence as the pixel 20-a that captures only the light beam that has passed through the pupil region 30-a, and a pixel 20-e that captures only the light beam that has passed through the pupil region 30-e An image obtained by collecting only pixels having the same correspondence is a parallax image. In other words, an image obtained by collecting only pixels having the same correspondence with the pixel 20-a is an image viewed from the pupil region 30-a, and an image obtained by collecting only pixels having the same correspondence with the pixel 20-e The image is viewed from 30-e. Thus, in LFC, a plurality of parallax images can be obtained from a signal obtained by one exposure.
本実施形態では、画像処理部7は、補完等の処理を行った画像データに対してx軸及びy軸のそれぞれについて5画素単位で画像全体を走査する。本実施形態ではMLA20のマイクロレンズ1つあたり25画素を対応させているため、1回の露光により視差画像を最大25枚生成することができる。25の画素のうち、画素20−a、画素20−c、画素20−eに対応する画素を集めれば3枚の視差画像が得られるが、光源色推定処理の対象や求められる精度に応じて視差画像の枚数を随時調整してもよい。
In the present embodiment, the
露光時間が重複した複数の視差画像を得ることにより、被写体の状態が揃った視差画像が得られるため、一台の撮像装置を利用して複数の視差画像を得る場合よりも位置合わせが容易である。加えて、動きのある被写体に対する撮影や動画像において後述する光源推定が適用可能となる利点がある。LFCのように、露光時間が完全に重複した複数の視差画像が得られる場合、特に高い効果が得られる。 By obtaining multiple parallax images with overlapping exposure times, it is possible to obtain parallax images with the same state of the subject, so positioning is easier than when multiple parallax images are obtained using a single imaging device. is there. In addition, there is an advantage that light source estimation, which will be described later, can be applied to shooting or moving images of a moving subject. A particularly high effect is obtained when a plurality of parallax images with completely overlapping exposure times are obtained as in LFC.
(輝度補正処理)
次に図3のS102における輝度補正処理について図6を示してさらに説明する。まず輝度補正処理が必要となる原因であるケラレについて図6(a)から図6(c)を用いて説明する。
(Brightness correction processing)
Next, the brightness correction processing in S102 of FIG. 3 will be further described with reference to FIG. First, vignetting that is a cause of the necessity of luminance correction processing will be described with reference to FIGS. 6A to 6C.
図6(a)は撮影光軸4、撮像素子6、絞り43、各種レンズ枠42,44(レンズ保持等を行う部分であり、一般的に画面中心40では光線を制限しないが像高に応じて光線を制限する端面となりうる個所)とケラレの関係を模式的に示している。図6(b)は画面中心40での絞り43および各種レンズ枠42,44の位置関係を示す図であり、図6(c)は撮像素子6上のある点41での絞り43および各種レンズ枠42,44の位置関係を示す図である。
FIG. 6A shows the photographing
図6(a)では説明を容易にするために、絞り43に対して撮像素子6側とその反対側に1つずつのレンズ枠42,44があるものとしたが、これは模式的なものであり必ずしも1つずつである必要はない。図6(a)において絞り43を示す太い直線は開口の大きさを1次元的に示したものである。実際の絞りはほぼ円形であるがその直径を模式的に示していると考えれば良い。これはレンズ枠42,44も同様である。画面中心40から見た場合絞り43に向かう光線はレンズ枠42,44によってケラレが発生することが無い。これを図6(b)に示した。図6(b)は絞り43およびレンズ枠42,44を絞り43の面に投影したものである。この時42,43,44は同心円をなしており且つ絞り43の径が最も小さいためにレンズ枠42,44によってケラレが発生していない。
In FIG. 6 (a), for ease of explanation, one
一方で、一定の像高がある点41から見た場合、レンズ枠42,44によるケラレが発生する可能性がある。図6(c)の例では撮像素子6側にあるレンズ枠44によって領域45にケラレが発生している。図6(b)と同様に点41からの絞り43およびレンズ枠42,44を絞り43の面に投影したものを図6(c)に示した。レンズ枠44によってケラレが発生し、輝度が低下していることが分かる。
On the other hand, when viewed from a
図6(a)ないし(c)から分かるようにケラレの発生や大きさは、瞳距離、瞳径(Fナンバー)、像高、レンズ枠の距離と径に応じて決定される。なお、図6(a)では、瞳距離は撮像素子6と絞り43との距離で、瞳径は絞り43の幅で、像高は画面中心40と撮像素子6上のある点41との距離で表現される。また同様に、図6(a)では、レンズ枠の距離は撮像素子6とレンズ枠42,44との距離、レンズ枠の径はレンズ枠42,44の幅で表される。
As can be seen from FIGS. 6A to 6C, the occurrence and size of vignetting is determined according to the pupil distance, pupil diameter (F number), image height, and distance and diameter of the lens frame. In FIG. 6A, the pupil distance is the distance between the
輝度に変化が生じていると、位置合わせなどの処理を行う際に演算の失敗や誤差要因になる。そこで本実施形態ではそれらの処理に先立ってS102で輝度調整(ケラレ補正)を施すことにより、位置合わせや輝度差の算出精度を高めている。 If there is a change in luminance, it may cause a calculation failure or an error factor when performing processing such as alignment. Therefore, in the present embodiment, by performing brightness adjustment (vignetting correction) in S102 prior to these processes, the accuracy of alignment and brightness difference calculation is increased.
上述したケラレの決定因子のうち、瞳距離およびレンズ枠の距離はレンズ2固有の値である。従って、Fナンバーと像高に応じた補正値を予め用意し、例えば補正値テーブルとして保存しておくことができる。そして、輝度調整部501は現在のFナンバー(絞り値)と画素の像高に応じた補正値をテーブルから取得して輝度補正を行うことで、ケラレによる輝度の変化を補正することができる。なお、Fナンバーやレンズの固有情報を画像データの付加情報などから取得してケラレ補正を行ってもよい。
Among the vignetting determinants described above, the pupil distance and the lens frame distance are values specific to the
また、輝度調整部501は、電気接点11を通じて撮影条件やレンズの情報取得を行いケラレ状態を決定し、例えば像高に応じて画面中心40からの距離が所定の画素数より大きくなる領域について補正をするようにしてもよい。視差を持つ画像については、対応する瞳領域に応じて画面中心40の位置が相対的に移動するから、各視差画像においては対応する瞳領域に応じて画面中心40を所定の画素数分ずらした上で補正を行うようにしてもよい。
Also, the
(視差画像位置合わせ処理及び輝度差算出処理)
次に、図3のS103およびS104で行う視差画像の位置合わせ処理および輝度差算出処理について、図7を用いてさらに説明する。図7(a)は複数の視差画像を取得する様子を模式的に示した図である。矢印79は光源からの光線を、80は被写体を表す。矢印81,82,83は各視差画像の視点方向を、84,85,86はそれぞれ81,82,83方向から見たときに被写体を、84a,85a,86aは、それぞれ被写体像84,85,86上の鏡面反射成分の位置を示している。
(Parallax image alignment processing and luminance difference calculation processing)
Next, the parallax image alignment processing and luminance difference calculation processing performed in S103 and S104 in FIG. 3 will be further described with reference to FIG. FIG. 7A is a diagram schematically showing a state where a plurality of parallax images are acquired. An
図7(b)は位置合わせを行った後の状態を模式的に示す図である。84(85および86は重なっている)は図7(a)の被写体像を、84a,85a,86aは図7(a)と同じ鏡面反射成分の位置を、81a,82a,83aは視点81,82,83からの像を位置合わせしたことを示す枠である。87は位置合わせのために用いる部分領域を示す枠である。
FIG. 7B is a diagram schematically showing a state after alignment. 84 (85 and 86 overlap) is the subject image of FIG. 7A, 84a, 85a and 86a are the positions of the same specular reflection components as in FIG. 7A, 81a, 82a and 83a are the
図7(c)は図7(b)の状態での枠87内の輝度分布を模式的に示した図である。図7(c)の横軸は図7(b)の横方向の位置を、縦軸は輝度を示している。図7(c)において91,92,93はそれぞれ被写体84,85,86の輝度を示すグラフ、94は背景の輝度レベル、95は被写体80の拡散反射レベル96は拡散反射と鏡面反射を合わせて輝度レベルを示している。
FIG. 7C is a diagram schematically showing the luminance distribution in the
図7(a)では3つの視点から同一の被写体80を撮影している様子を示している。ここでは複数の視点から示すことを模式的に示しており視点の数や位置には特別な意味はない。図7(a)に示すように複数の視点81,82,83から撮影するとそれぞれの視差画像には同一の被写体80が異なる位置に結像84,85,86する。図3で説明したように視差画像間の相対的な位置は、視差と被写体の距離によって決まる。図7(a)では横方向にずれて結像している様子を示した。
FIG. 7A shows a situation where the
被写体像を適当な大きさで切り出し被写体像が一致するように位置合わせを行うと図7(b)のような像が得られる。すなわち被写体像84,85,86が重なり、反対に像の取得範囲を示す枠81a,82a,83aがずれた状態である。被写体の位置合わせに用いた枠を87で模式的に示した。枠87内の輝度分布は図7(c)に示すようになっている。ここで図7(c)は1次元的な広がりを持つように図示しているが、これはエピポーラ拘束と関連している。図7(a)の説明で横方向にずれて結像していると記載したが、これは視差が横方向にのみ生じているような視差画像を用いていることを意味している。図5の例に対応させると瞳領域30−a,30−c,30−eに対応した視差画像を利用すればx方向にのみ視差を持ちこの例のようになる。この場合は縦方向には被写体像のずれは生じないので、視差方向に直交する方向(図7では縦方向)の信号を加算して画像を1次元的な広がりを持つように扱うことができる。このようにすることで計算量を削減するとともに信号のS/N比をあげて位置合わせを行うことが可能となる。
When the subject image is cut out to an appropriate size and aligned so that the subject images match, an image as shown in FIG. 7B is obtained. That is, the
鏡面反射による影響が支配的ではない場合、図7(c)に示すように被写体84,85,86は被写体エッジを利用して位置合わせがなされる。被写体の位置合わせに用いる枠87の大きさを適当に設定すれば、鏡面反射成分に引きずられて位置合わせ精度が低下することを避けることができる。
When the influence of the specular reflection is not dominant, the
視差画像位置合わせ部502は、輝度調整部501による輝度調整のされた画像を取得し、位置合わせ処理を行う。上述のように位置合わせ処理はステレオマッチングとして知られる公知の方法で視差画像間の対応点の探索処理を行えばよい。LFCにより得られた視差画像は、直線上(例えばx方向)にのみ視差をもつ視差画像の組み合わせを容易に選択することができる。視差画像位置合わせ部502は、x方向にのみ視差をもつ視差画像の組み合わせを選択して、位置合わせ処理の対象にしてもよい。また、対応点の探索の前処理として公知の方法で被写体のエッジや特徴点の抽出を行ってもよい。視差画像位置合わせ部502は、位置合わせ処理の結果により、視差画像間の対応する画像位置の情報を生成する。
The parallax
また、視差画像の位置合わせ処理は、輝度の一致度に基づいて後の光源色推定処理に適した画像領域を特定することができる。なお、本実施形態で一致度とは、2つの像を位置合わせした後の輝度の差分絶対値の和を指す。例えば、図7では2つの輝度を比較した時に重ならない部分の大きさを指す。 In addition, the parallax image alignment processing can specify an image region suitable for the subsequent light source color estimation processing based on the degree of coincidence of luminance. In the present embodiment, the degree of coincidence refers to the sum of absolute values of luminance differences after aligning two images. For example, FIG. 7 indicates the size of a portion that does not overlap when two luminances are compared.
図7(c)に示す被写体84,85,86の信号91,92,93は鏡面反射を強く含む領域84a,85a,86aでは像の一致度が低い。一方でその周辺部や被写体80のエッジでは非常に良く一致する。
詳細は後述するが、被写体上の同じ位置を観察していても鏡面反射成分は視差によって大きく異なっている。図7(c)の位置84a、85b、86cの部分のように部分的に信号の一致度が低い場合は鏡面反射成分を含むことが考えられるため光源色推定処理に用いるのに適している。換言すれば、視差画像の位置合わせの処理において輝度の一致度が予め定められた範囲となる画像中の部分領域の情報を用いて光源色推定処理を行うと都合が良い。
Although details will be described later, even when the same position on the subject is observed, the specular reflection component varies greatly depending on the parallax. When the signal coincidence is partially low as in the
像の一致度が非常に高い箇所は、鏡面反射ではなく拡散反射成分が支配的で視差間の像の差がほとんどないことが想定される。他方、像の一致度が非常に低い箇所は、オクルージョンや被写体の位置合わせに用いる枠内に距離の異なる物体が複雑に混在している場合が考えられる。これらの場合は、鏡面反射成分を抽出する場面として適しているとは言えない。従って、これらの間における一致度のうち、光源色推定に用いるのに適した一致度の範囲を例えば実験的に求めておく。 It is assumed that the part where the degree of coincidence of images is very high is not specular reflection but diffuse reflection component is dominant and there is almost no difference in image between parallaxes. On the other hand, in a place where the degree of coincidence of images is very low, it is conceivable that objects with different distances are mixedly mixed in a frame used for occlusion and object positioning. In these cases, it cannot be said that it is suitable as a scene for extracting a specular reflection component. Therefore, of the coincidence between these, a range of coincidence suitable for use in light source color estimation is obtained, for example, experimentally.
別の例として、位置合わせに用いる画像内の一部の領域で一致度が高く、一部の領域で一致度が低い場合に、一致度が低い部分的な領域を利用して光源色推定処理を行うこともできる。これは図7(c)のように鏡面反射光により像の一致度が低下している場合を考えると、鏡面反射光の影響を受ける範囲のみ一致度が低下し、他の部分では一致度が高くなることを利用している。すなわち図7(c)の拡散反射光のレベル95にある部分(被写体である植木鉢の右側付近)や背景は一致度が高く、鏡面反射光を含む領域84a,85a,86aでは像の一致度が低い。一部分のみ一致度が低い場合は、オクルージョンが生じている場合を除いて、光源の鏡面反射の影響を受けている可能性が高い。
As another example, when the degree of coincidence is high in some areas in the image used for alignment and the degree of coincidence is low in some areas, light source color estimation processing is performed using a partial area with low coincidence. Can also be done. Considering the case where the degree of coincidence of the image is lowered due to the specular reflection light as shown in FIG. 7C, the degree of coincidence is reduced only in the range affected by the specular reflection light, and the degree of coincidence is reduced in other parts. Take advantage of becoming higher. That is, the portion at the diffuse
視差画像位置合わせ部502は、視差画像の位置合わせ処理に加えて輝度の一致度を算出する。視差画像位置合わせ部502は、視差画像から対応する画像位置の輝度値を取得して、例えば輝度の差分絶対値の和を一致度として算出する。算出した一致度が、実験等の方法により予め設定された値の範囲に属する場合は、画素位置と対応させた情報にフラグを立てて光源色推定に適した領域(光源色推定対象領域)であることを示す。他方、一致度が設定された値の範囲から外れるときは、フラグを立てずに光源色推定に適さない領域であることを示す。
The parallax
輝度差算出部503は、視差画像位置合わせ部502で位置合わせされた視差画像間の対応する画素位置に関する情報を取得する(対応点取得)。輝度差算出部503は、対応点取得によって得られた視差画像の対応する画素位置において、それぞれの視差画像の対応する画素位置の輝度値を取得してその差分を算出する。輝度差算出部503は、対応する画素位置の情報が存在する全ての画素について輝度差を算出してもよいが、視差画像位置合わせ部502にてフラグが立てられた領域のみ輝度差を算出してもよい。
The luminance
輝度差算出部503は、視差画像が3以上の場合には、各画素位置におけるこれらの視差画像の輝度値のうち最大値と最小値の差を求める。これについては光源色推定処理において更に説明する。
When the parallax image is 3 or more, the luminance
以上のように、輝度差の算出は視差画像の対応する画素位置の単位で求められるため、画像全体で統計処理をした場合のように他の様々な被写体の影響を受けて推定精度が低下する問題を軽減することができる。 As described above, since the calculation of the luminance difference is obtained in units of the corresponding pixel positions of the parallax image, the estimation accuracy decreases due to the influence of various other subjects as in the case of performing statistical processing on the entire image. The problem can be reduced.
(光源色推定処理)
次に、図1を用いて反射光の状態と光源色推定処理の動作について説明する。図1(a)は被写体がランバート面の場合の拡散反射光の状態を示す図を、図1(b)は鏡面反射光の状態を示す図である。また図1(c)は拡散反射光および鏡面反射光を含む光線を撮像装置でとらえる様子を模式的に示す図を、図1(d)は平行光が物体に当たっている状態を撮像装置でとらえる様子とその時の信号の状態を示す図である。
(Light source color estimation process)
Next, the state of the reflected light and the operation of the light source color estimation process will be described with reference to FIG. FIG. 1A is a diagram showing the state of diffuse reflected light when the subject is a Lambertian surface, and FIG. 1B is a diagram showing the state of specular reflected light. FIG. 1 (c) is a diagram schematically showing how the imaging device captures light rays including diffuse reflection light and specular reflection light, and FIG. 1 (d) shows the imaging device capturing a state in which parallel light strikes an object. It is a figure which shows the state of the signal at that time.
図1(a)において、50は物体を、51は光線を、52は拡散反射光を、θは光線51の入射角を示す。図1(b)において、53は鏡面反射光を、61は光線51の正反射方向を示す線を示す。図1(c)において、3は撮影光学部を、4は撮影光軸を、6は撮像素子であり、54は拡散反射光と鏡面反射光を加えた反射光を示す。また30−a、30−eは図5(c)と対応する撮影光学部3の特定の瞳領域である。φaは30−aと正反射方向61がなす角を、φeは30−eと正反射方向61がなす角である。図1(d)において、50a,50b,50c,50dは物体50上の点を、6a,6b,6c,6dは撮像素子6上の物体上の点50a,50b,50c,50dのそれぞれに対応する点を表す。51a,51b,51c,51dは点50a,50b,50c,50dに入射する光線を、61a,61b,61c,61dは光線51a,51b,51c,51dの正反射方向を示す線である。52−a,52−eは瞳領域30−a、30−eを通過した信号の輝度を、53は瞳領域30−aを通過して点50c上の輝度を、54は瞳領域30−eを通過して点50c上の輝度を、55は拡散反射光のレベルをそれぞれ示している。
In FIG. 1A, 50 indicates an object, 51 indicates a light beam, 52 indicates diffusely reflected light, and θ indicates the incident angle of the
以下に説明する反射モデルはいわゆる2色性反射モデルに基づいている。2色性反射モデルは公知であり、その詳細については、例えば「ディジタル画像処理」 CG-ARTS協会 P.281などを参照されたい。 The reflection model described below is based on a so-called dichroic reflection model. The dichroic reflection model is known, and for details, refer to “Digital Image Processing” CG-ARTS Association P.281, for example.
まず拡散反射を考える。拡散反射光は多くの場合完全に乱反射するような反射でモデル化され、ランバート反射(このような反射をする面をランバート面)と呼ばれる。図1(a)はランバート面でモデル化された反射特性を図示しており、52は各方向への反射が均一な様子を分かりやすく示すために反射光の強度の包絡線で示されている。拡散反射光は見る方向によって輝度が変化しないことが特徴である。これを式で記載すると次のようになる。
Ld(λ)=Ie(λ)Kd (λ)cosθ ・・・(1)
ただしLd(λ)は拡散反射光の輝度、Ie(λ)は光源の輝度、Kd(λ)は拡散反射特性、θは入射角である。
First, consider diffuse reflection. In many cases, the diffusely reflected light is modeled by reflection that completely diffusely reflects, and is called Lambertian reflection (a surface that performs such reflection is a Lambertian surface). FIG. 1A illustrates the reflection characteristics modeled on a Lambertian surface, and 52 is indicated by an envelope of the intensity of reflected light for easy understanding of how the reflection in each direction is uniform. . The diffuse reflected light is characterized in that the luminance does not change depending on the viewing direction. This can be expressed as follows.
Ld (λ) = Ie (λ) Kd (λ) cosθ (1)
However, Ld (λ) is the luminance of the diffuse reflected light, Ie (λ) is the luminance of the light source, Kd (λ) is the diffuse reflection characteristic, and θ is the incident angle.
次に鏡面反射を考える。本実施形態ではCGなどで多く利用されているフォンモデルを示す。鏡面反射光は多くのモデルが提案されているため他のモデルを用いても良い。正反射方向となす角によって大きく輝度が変化するという特徴を利用していれば適用可能である。図1(b)はフォン反射モデルでモデル化された反射特性を図示しており、光線51の正反射方向61に強いピークを持ち角度が変わると急に減衰する。観察する方向によって反射光が変化する様子を分かりやすく示すために反射光の強度の包絡線を53で示した。これを式で記載すると次のようになる。
Ls(λ)=Ie(λ) (cosφ)n ・・・(2)
ただしLs(λ)は鏡面反射光の輝度、φは正反射方向と観察方向のなす角、nは物体の特性によって決まる定数である。数式(2)において鏡面反射光の波長特性は光源の特性と同じという仮定を暗黙に利用している。
Next, specular reflection is considered. In the present embodiment, a phone model frequently used in CG or the like is shown. Since many models of specular reflected light have been proposed, other models may be used. The present invention can be applied if the feature that the luminance greatly changes depending on the angle formed with the regular reflection direction is used. FIG. 1B illustrates the reflection characteristics modeled by the Phong reflection model, which has a strong peak in the
Ls (λ) = Ie (λ) (cosφ) n ... (2)
Where Ls (λ) is the brightness of the specular reflection light, φ is the angle between the specular reflection direction and the observation direction, and n is a constant determined by the characteristics of the object. In Equation (2), the assumption that the wavelength characteristic of the specular reflected light is the same as the characteristic of the light source is implicitly used.
観察対象は上記の鏡面反射光と拡散反射光の合成したものであるから、視点pから観察した場合は次の式のように記述される。
L(λ)= Ld(λ) +Ls(λ) =Ie(λ)Kd (λ)cosθ + Ie(λ) (cosφp)n ・・・(3)
ただし、L(λ)は拡散反射光と鏡面反射光を合わせた反射光の輝度、φpは正反射方向と視点pとのなす角である。
Since the observation target is a combination of the specular reflection light and the diffuse reflection light, the observation target is described as the following expression when observed from the viewpoint p.
L (λ) = Ld (λ) + Ls (λ) = Ie (λ) Kd (λ) cosθ + Ie (λ) (cosφ p ) n (3)
However, L (λ) is the luminance of the reflected light obtained by combining the diffuse reflection light and the specular reflection light, and φ p is the angle formed between the specular reflection direction and the viewpoint p.
次に図1(c)を用いて光線の状態について説明する。画像処理装置は、図1(c)に示すように拡散反射光と鏡面反射光が合成された複雑な輝度分布54が処理対象となる。この時、瞳領域30−eを通過する光束は正反射方向61となす角が小さく、この時、瞳領域30−aを通過する光束は正反射方向61となす角が大きい。数式(3)によれば瞳領域30−aと瞳領域30−eを通過する光束を比較した場合に、拡散反射光は同じ量含まれているが、鏡面反射光は強度が異なる。
Next, the state of the light beam will be described with reference to FIG. In the image processing apparatus, as shown in FIG. 1C, a
本実施形態で示す画像処理装置は、MLAを利用すれば瞳の通過領域を分別して光束を取得可能であるから、光源色推定には分別して取得した拘束を利用する。画像処理装置は、瞳領域30−aから物体50上の点50aを見た信号と、瞳領域30−eから物体50上の点50aを見た信号の差をとればよい。式で示すと以下のようになる。
Ldiff(λ)= Le(λ) − La(λ)
=(Ie(λ)Kd (λ)cosθ + Ie(λ) (cosφe)n)
− (Ie(λ)Kd (λ)cosθ + Ie(λ) (cosφa)n)
= Ie(λ){ (cosφe)n −(cosφa)n } ・・・(4)
ただし、Ldiff(λ)は、瞳領域30−aから物体50上の点50aを見た信号と瞳領域30−eから物体50上の点50aを見た信号の差を表す。La(λ)、Le(λ)はそれぞれ瞳領域30−aから物体50上の点50aを見た信号と瞳領域30−eから物体50上の点50aを見た信号を表す。φa、φeはそれぞれ瞳領域30−aから物体50上の点50aに向かう線と正反射方向61となす角、瞳領域30−eから物体50上の点50aに向かう線と正反射方向61となす角である。
Since the image processing apparatus shown in the present embodiment can acquire the luminous flux by classifying the pupil passage area by using MLA, the constraint acquired by classification is used for light source color estimation. The image processing apparatus only needs to take a difference between a signal when the
L diff (λ) = L e (λ) − L a (λ)
= (Ie (λ) Kd (λ) cosθ + Ie (λ) (cosφ e ) n )
− (Ie (λ) Kd (λ) cosθ + Ie (λ) (cosφ a ) n )
= Ie (λ) {(cosφ e ) n − (cosφ a ) n } (4)
However, L diff (λ) represents a difference between a signal when the
数式(4)を見ると明らかなように、”(cosφe)n −(cosφa)n”は視点によって決まる定数であり波長依存性を持たない。光源の色(波長特性)はLdiff(λ)と比例している。そのためLdiff(λ)から光源の波長特性を知ることが可能となる。このように光源の波長特性を知ることを本実施形態では光源色推定と呼んでいる。 As is clear from Equation (4), “(cosφ e ) n − (cos φ a ) n ” is a constant determined by the viewpoint and has no wavelength dependency. The color (wavelength characteristic) of the light source is proportional to L diff (λ). Therefore, it is possible to know the wavelength characteristics of the light source from L diff (λ). In this embodiment, knowing the wavelength characteristics of the light source is called light source color estimation.
図1(d)を用いて実際の撮影状況と数式(4)の関係について説明する。図1(d)は平行光が物体50にあたって、その反射光を撮像している様子を示している。図1(c)の説明では省略したが、撮像素子6上には物体の様々な個所の反射光が結像している。すなわち数式(4)などは位置の関数になっている。例えば図1(d)においては物体50上の点50a,50b,50c,50dはそれぞれ撮像素子上の点6a,6b,6c,6dに対応している。図1(d)の例では簡単のために主レンズピントは物体50にあっているように記載した。つまり瞳通過領域によらず物体側の点は撮像素子上の同じ位置に結像している。一方で、主レンズピントが物体50にあっていない場合は瞳通過領域によって結像する位置がずれる。(これは位相差AFの原理としてよく知られているので説明は省略する。)
このような状況で得られる信号は図1(d)の下段のような信号になる。瞳領域30−aを通過した信号は52−a、瞳領域30−eを通過した信号は52−eとして図示した。ここで物体の拡散反射光レベル55は数式(1)、数式(3)のLd(λ)に対応している。
The relationship between the actual shooting situation and Equation (4) will be described with reference to FIG. FIG. 1D shows a state in which parallel light strikes the
The signal obtained in such a situation is a signal as shown in the lower part of FIG. The signal passing through the pupil region 30-a is shown as 52-a, and the signal passing through the pupil region 30-e is shown as 52-e. Here, the diffuse reflection light level 55 of the object corresponds to Ld (λ) in the equations (1) and (3).
図1(d)の例では53は物体上の点50cから瞳領域30−aを通過した場合の信号を、54は物体上の点50cから瞳領域30−eを通過した場合の信号を表す。信号53,54に注目すると、鏡面反射光の影響で像の一致度が低下している。これは、図7を用いて説明した状況である。図7を用いて説明したように、図1(d)には不図示の物体の輪郭などで信号52−aと52−eの位置合わせがなされる。さらに、信号53は数式(4)のLa(λ)に対応しており、信号54は数式(4)のLe(λ)に対応している。信号53と信号53では鏡面反射光の大きさが大きく異なるのでこの差から光源色推定を行うことができる。
In the example of FIG. 1D, 53 indicates a signal when the
さらに一般的に考えると視点は2つよりも多い複数個である場合が考えられるこのような場合には次の式に従えばよい。
Ldiff(λ)= max{Li(λ)} − min{Li(λ)} (i=1,2,…,N) ・・・(5)
ただしmaxは輝度最大の視点を選択する演算子、minは輝度最小の視点を選択する演算子、iは視点に対応する添え字、Nは視点数である。数式(5)において輝度最大、輝度最小としたのは、波長(λの値)ごとに最も大きいものと小さいものの差をとるのではなく、輝度が最大の視点位置と輝度が最小の視点位置を選択したのちに、視点間で波長ごとの値を求めることを示すものである。
More generally, in the case where there are more than two viewpoints, the following equation may be used.
L diff (λ) = max {L i (λ)} − min {L i (λ)} (i = 1,2,…, N) (5)
Here, max is an operator that selects the viewpoint with the highest luminance, min is an operator that selects the viewpoint with the lowest luminance, i is a subscript corresponding to the viewpoint, and N is the number of viewpoints. In Equation (5), the maximum brightness and the minimum brightness are not the difference between the largest and the smallest for each wavelength (value of λ), but the viewpoint position with the highest brightness and the viewpoint with the lowest brightness. It shows that after selection, a value for each wavelength is obtained between viewpoints.
数式(5)は数式(4)の自然な拡張になっている。数式(5)によると数式(4)と異なり2より多い視差を一般的に扱うことが可能となる。また最大値と最小値の差を利用することで、S/N比が良い状態で光源色推定を行うことが可能となる。特に多数の視差画像がある場合は、鏡面反射光を強く含む視点が含まれる可能性がある。このような視点の情報を積極的に活用するには数式(5)を用いると都合が良い。 Equation (5) is a natural extension of Equation (4). According to the equation (5), unlike the equation (4), more than two parallaxes can be generally handled. Further, by using the difference between the maximum value and the minimum value, it is possible to perform light source color estimation with a good S / N ratio. In particular, when there are a large number of parallax images, a viewpoint that strongly includes specular reflection light may be included. It is convenient to use Equation (5) to actively use such viewpoint information.
図1(b)や数式(2)から分かるように、物体の特性によって決まる定数nが大きい場合は正反射方向と観察方向のなす角が大きくなると鏡面反射光の輝度が急激に減衰する。光源色を正しく(S/N比が良い状態で)推定するためには、正反射方向に近い視点があると有利になる。換言すれば、数式(5)を用いて多数の視点を利用することによって、2つの視点を利用する場合に比べてより精度よく光源推定を行うことができる。 As can be seen from FIG. 1B and Equation (2), when the constant n determined by the characteristics of the object is large, the brightness of the specular reflected light is rapidly attenuated when the angle formed between the specular reflection direction and the observation direction is increased. In order to correctly estimate the light source color (with a good S / N ratio), it is advantageous to have a viewpoint close to the regular reflection direction. In other words, by using a large number of viewpoints using Equation (5), it is possible to perform light source estimation more accurately than when using two viewpoints.
図1(d)のように視点によって鏡面反射光の取得状態が異なるということは多くの場面で起こりうる。図8は視点による鏡面反射光の取得状態の異なる例を模式的に示したものである。図8(a)は曲面の物体50に平行光が当たっている状況を、図8(b)は平面に対して拡散光(光源が近い位置にある場合に対応)が当たっている状況をそれぞれ示した。図8に用いる記号は図1(d)と同じものには同じ番号を付した。
As shown in FIG. 1D, the specular reflection light acquisition state varies depending on the viewpoint, which can occur in many situations. FIG. 8 schematically shows an example of different specular reflection light acquisition states depending on the viewpoint. FIG. 8A shows a situation in which parallel light hits a
図8(a)および図8(b)の例では、いずれも瞳領域30−aを通過した信号52−aは物体上の点50b近傍に鏡面反射光のピークを持ち、瞳領域30−eを通過した信号52−eは物体上の点50c近傍に鏡面反射光のピークをもつ。ここで大切なことは視点の違いによって鏡面反射光が異なり、拡散反射光が等しいことである。この特性を利用すれば、被写体が曲面物体である場合や光源が近い場合であっても数式(4)または数式(5)を利用して光源色の推定を行うことが可能となる。
In the examples of FIGS. 8A and 8B, the signal 52-a that has passed through the pupil region 30-a has a peak of specular reflection light near the
光源色推定部504は、輝度差算出部503が生成した輝度差を用いて光源推定を行う画素位置を決定し、この画素位置におけるR,G,B各色の輝度差の組み合わせから光源の色を推定する。視差画像が3以上の場合には、上述のように輝度差算出部503は、視差画像間の輝度差の算出において、各画素位置におけるこれらの視差画像の輝度値のうち最大値と最小値の差を求める。これは、輝度が最大の視点位置と輝度が最小の視点位置の組み合わせを選択することに相当する。光源色推定部504は、これらの視点位置を構成する各視差画像からR,G,B各色の輝度差の組み合わせを求め、光源の色を推定する。
The light source
このように輝度差を算出することによって簡易な演算で鏡面反射光を抽出することができる。そして、鏡面反射光から容易に光源色を推定することができるため、全体として簡単な方法で視差画像から光源色を推定することができる。また、視差画像の数が増えた場合においても、輝度の差が最大となる視点を選択するだけであるから、計算量の増加が抑えられる。 By calculating the luminance difference in this way, the specular reflection light can be extracted with a simple calculation. Since the light source color can be easily estimated from the specular reflection light, the light source color can be estimated from the parallax image by a simple method as a whole. Further, even when the number of parallax images increases, only the viewpoint that maximizes the difference in luminance is selected, so that an increase in calculation amount can be suppressed.
本実施形態によれば、同時に露光した視差画像について処理を行うことができるから、動画像撮影における光源色推定に適用することが可能であり、ひいては動画像撮影におけるホワイトバランスの処理も可能となる。 According to this embodiment, since it is possible to perform processing on the simultaneously exposed parallax images, it can be applied to light source color estimation in moving image shooting, and in addition, white balance processing in moving image shooting can also be performed. .
以上に説明したように本発明によれば、簡便な構成で精度の良い光源色の推定が可能な画像処理装置、その制御方法およびプログラムを提供することができる。 As described above, according to the present invention, it is possible to provide an image processing apparatus capable of accurately estimating a light source color with a simple configuration, a control method thereof, and a program.
[その他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Claims (24)
前記複数の視差画像に対してケラレ補正を行う補正手段と、
前記補正手段によりケラレ補正が行われた前記複数の視差画像間の対応する位置における輝度差を算出する算出手段と、
前記算出手段により算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定手段と、
前記領域決定手段により決定された領域における前記算出手段により算出された輝度差から光源色を推定する推定手段と、を有することを特徴とする画像処理装置。 Obtaining means for obtaining a plurality of parallax images with overlapping exposure times;
Correction means for performing vignetting correction on the plurality of parallax images;
Calculating means for calculating a luminance difference at corresponding positions between the plurality of parallax images that have undergone vignetting correction by the correcting means;
Area determination means for obtaining a degree of coincidence for each partial area based on the luminance difference calculated by the calculation means, and determining an area having a relatively low degree of coincidence as an area used for light source color estimation;
An image processing apparatus comprising: an estimation unit configured to estimate a light source color from a luminance difference calculated by the calculation unit in an area determined by the region determination unit .
前記取得手段が、直線上あるいは格子状に配置された多眼撮像装置であることを特徴とする撮像装置。 An imaging apparatus comprising the image processing apparatus according to any one of claims 1 to 6,
An image pickup apparatus, wherein the acquisition means is a multi-lens image pickup apparatus arranged on a straight line or in a grid pattern.
前記取得手段が、光束の位置と角度の情報を取得する撮像手段であることを特徴とする撮像装置。 An imaging apparatus comprising the image processing apparatus according to any one of claims 1 to 6,
An image pickup apparatus, wherein the acquisition means is an image pickup means for acquiring information on a position and an angle of a light beam.
前記取得手段が、複数のマイクロレンズと、前記複数のマイクロレンズの各マイクロレンズに対して複数の画素が割当てられている撮像素子を有する撮像手段であることを特徴とする撮像装置。 An imaging apparatus comprising the image processing apparatus according to any one of claims 1 to 6,
An image pickup apparatus, wherein the acquisition means is an image pickup means having a plurality of microlenses and an image pickup device in which a plurality of pixels are assigned to each of the microlenses of the plurality of microlenses.
前記複数の視差画像に対して像高に応じた輝度の補正を行う補正手段と、
前記補正手段により輝度の補正が行われた前記複数の視差画像間の対応する位置における輝度差を算出する算出手段と、
前記算出手段により算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定手段と、
前記領域決定手段により決定された領域における前記算出手段により算出された輝度差から光源色を推定する推定手段と、を有することを特徴とする画像処理装置。 Obtaining means for obtaining a plurality of parallax images with overlapping exposure times;
Correction means for correcting luminance according to image height for the plurality of parallax images;
Calculating means for calculating a luminance difference at a corresponding position between the plurality of parallax images whose luminance has been corrected by the correcting means;
Area determination means for obtaining a degree of coincidence for each partial area based on the luminance difference calculated by the calculation means, and determining an area having a relatively low degree of coincidence as an area used for light source color estimation;
An image processing apparatus comprising: an estimation unit configured to estimate a light source color from a luminance difference calculated by the calculation unit in an area determined by the region determination unit .
前記複数の視差画像に対して前記複数の視差画像を撮像した際の光学条件に基づく輝度の補正を行う補正手段と、
前記補正手段により輝度の補正が行われた前記複数の視差画像間の対応する位置における輝度差を算出する算出手段と、
前記算出手段により算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定手段と、
前記領域決定手段により決定された領域における前記算出手段により算出された輝度差から光源色を推定する推定手段と、を有することを特徴とする画像処理装置。 Obtaining means for obtaining a plurality of parallax images with overlapping exposure times;
Correction means for correcting luminance based on optical conditions when the plurality of parallax images are captured with respect to the plurality of parallax images;
Calculating means for calculating a luminance difference at a corresponding position between the plurality of parallax images whose luminance has been corrected by the correcting means;
Area determination means for obtaining a degree of coincidence for each partial area based on the luminance difference calculated by the calculation means, and determining an area having a relatively low degree of coincidence as an area used for light source color estimation;
An image processing apparatus comprising: an estimation unit configured to estimate a light source color from a luminance difference calculated by the calculation unit in an area determined by the region determination unit .
前記取得手段が、直線上あるいは格子状に配置された多眼撮像装置であることを特徴とする撮像装置。An image pickup apparatus, wherein the acquisition means is a multi-lens image pickup apparatus arranged on a straight line or in a grid pattern.
前記取得手段が、光束の位置と角度の情報を取得する撮像手段であることを特徴とする撮像装置。 An image pickup apparatus, wherein the acquisition means is an image pickup means for acquiring information on a position and an angle of a light beam.
前記取得手段が、複数のマイクロレンズと、前記複数のマイクロレンズの各マイクロレンズに対して複数の画素が割当てられている撮像素子を有する撮像手段であることを特徴とする撮像装置。An image pickup apparatus, wherein the acquisition means is an image pickup means having a plurality of microlenses and an image pickup device in which a plurality of pixels are assigned to each of the microlenses of the plurality of microlenses.
補正手段が、前記複数の視差画像に対してケラレ補正を行う補正工程と、
算出手段が、前記補正工程でケラレ補正が行われた前記複数の視差画像間の対応する画素位置における輝度差を算出する算出工程と、
領域決定手段が、前記算出手段で算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定工程と、
推定手段が、前記領域決定工程で決定された領域における前記算出工程で算出された前記輝度差から光源色を推定する推定工程とを有することを特徴とする画像処理装置の制御方法。 An acquisition step in which the acquisition means acquires a plurality of parallax images with overlapping exposure times;
A correcting step in which a correcting unit performs vignetting correction on the plurality of parallax images;
A calculating step for calculating a luminance difference at a corresponding pixel position between the plurality of parallax images that have undergone vignetting correction in the correcting step;
A region determining step in which a region determining unit obtains a matching degree for each partial region based on the luminance difference calculated by the calculating unit, and determines a region having a relatively low matching degree as a region used for light source color estimation; ,
A method for controlling an image processing apparatus, comprising: an estimation unit that estimates a light source color from the luminance difference calculated in the calculation step in the region determined in the region determination step .
補正手段が、前記複数の視差画像に対して像高に応じた輝度の補正を行う補正工程と、
算出手段が、前記補正工程で輝度の補正が行われた前記複数の視差画像間の対応する画素位置における輝度差を算出する算出工程と、
領域決定手段が、前記算出工程で算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定工程と、
推定手段が、前記領域決定工程で決定された領域における前記算出工程で算出された前記輝度差から光源色を推定する推定工程とを有することを特徴とする画像処理装置の制御方法。 An acquisition step in which the acquisition means acquires a plurality of parallax images with overlapping exposure times;
A correcting step, wherein the correcting means corrects the luminance according to the image height for the plurality of parallax images;
A calculation step in which a calculation unit calculates a luminance difference at corresponding pixel positions between the plurality of parallax images that have been corrected for luminance in the correction step;
A region determining step of determining a matching degree for each partial region based on the luminance difference calculated in the calculating step, and determining a region having a relatively low matching level as a region used for light source color estimation; ,
A method for controlling an image processing apparatus, comprising: an estimation unit that estimates a light source color from the luminance difference calculated in the calculation step in the region determined in the region determination step .
補正手段が、前記複数の視差画像に対して前記複数の視差画像を撮像した際の光学条件に基づく輝度の補正を行う補正工程と、
算出手段が、前記補正工程で輝度の補正が行われた前記複数の視差画像間の対応する画素位置における輝度差を算出する算出工程と、
領域決定手段が、前記算出工程で算出された輝度差に基づいて部分領域毎の一致度を求め、該一致度が相対的に低い領域を光源色の推定に用いる領域として決定する領域決定工程と、
推定手段が、前記領域決定工程で決定された領域における前記算出工程で算出された前記輝度差から光源色を推定する推定工程とを有することを特徴とする画像処理装置の制御方法。 An acquisition step in which the acquisition means acquires a plurality of parallax images with overlapping exposure times;
A correcting step, wherein the correcting means corrects the luminance based on the optical condition when the plurality of parallax images are captured with respect to the plurality of parallax images;
A calculation step in which a calculation unit calculates a luminance difference at corresponding pixel positions between the plurality of parallax images that have been corrected for luminance in the correction step;
A region determining step of determining a matching degree for each partial region based on the luminance difference calculated in the calculating step, and determining a region having a relatively low matching level as a region used for light source color estimation; ,
A method for controlling an image processing apparatus, comprising: an estimation unit that estimates a light source color from the luminance difference calculated in the calculation step in the region determined in the region determination step .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013266127A JP6381206B2 (en) | 2013-12-24 | 2013-12-24 | Image processing apparatus, control method thereof, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013266127A JP6381206B2 (en) | 2013-12-24 | 2013-12-24 | Image processing apparatus, control method thereof, and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2015122669A JP2015122669A (en) | 2015-07-02 |
JP2015122669A5 JP2015122669A5 (en) | 2017-02-09 |
JP6381206B2 true JP6381206B2 (en) | 2018-08-29 |
Family
ID=53533928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013266127A Active JP6381206B2 (en) | 2013-12-24 | 2013-12-24 | Image processing apparatus, control method thereof, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6381206B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6786850B2 (en) * | 2016-04-07 | 2020-11-18 | 富士ゼロックス株式会社 | Image processing equipment, image processing methods, image processing systems and programs |
JP2017215851A (en) * | 2016-06-01 | 2017-12-07 | キヤノン株式会社 | Image processing device, image processing method, and molding system |
WO2019017290A1 (en) * | 2017-07-20 | 2019-01-24 | エフ・エーシステムエンジニアリング株式会社 | Stereoscopic image display device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3943288B2 (en) * | 1999-06-29 | 2007-07-11 | 富士フイルム株式会社 | Parallax image imaging device, parallax image processing device, and parallax image processing method |
US8259198B2 (en) * | 2009-10-20 | 2012-09-04 | Apple Inc. | System and method for detecting and correcting defective pixels in an image sensor |
JP2012156882A (en) * | 2011-01-27 | 2012-08-16 | Canon Inc | Solid state imaging device |
JP2012220790A (en) * | 2011-04-11 | 2012-11-12 | Canon Inc | Imaging apparatus |
JP2013258675A (en) * | 2012-05-16 | 2013-12-26 | Canon Inc | Image processing apparatus, image processing method and program, and image pick-up device |
-
2013
- 2013-12-24 JP JP2013266127A patent/JP6381206B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015122669A (en) | 2015-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9998650B2 (en) | Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map | |
JP6140935B2 (en) | Image processing apparatus, image processing method, image processing program, and imaging apparatus | |
US8810713B2 (en) | Image pickup apparatus and image pickup device for performing auto-focusing | |
KR20170106325A (en) | Method and apparatus for multiple technology depth map acquisition and fusion | |
JP6220148B2 (en) | Imaging apparatus and control method thereof | |
US8937662B2 (en) | Image processing device, image processing method, and program | |
JP2013123123A (en) | Stereo image generation device, stereo image generation method and computer program for stereo image generation | |
JP2006279546A (en) | Electronic camera, image processing program, and image processing method | |
KR20150047112A (en) | Imaging apparatus and its control method, and storage medium | |
JP2016018116A (en) | Focus adjustment device, focus adjustment method and program, and imaging apparatus | |
US9894339B2 (en) | Image processing apparatus, image processing method and program | |
US11808561B2 (en) | Electronic apparatus for controlling a projector to project an image onto a screen at an actual size length, control method thereof and computer readable storage medium | |
JP5857712B2 (en) | Stereo image generation apparatus, stereo image generation method, and computer program for stereo image generation | |
JP2015046019A (en) | Image processing device, imaging device, imaging system, image processing method, program, and storage medium | |
JP2016001853A (en) | Image processing system, imaging device, control method, and program | |
JP6381206B2 (en) | Image processing apparatus, control method thereof, and program | |
JP2013097154A (en) | Distance measurement device, imaging apparatus, and distance measurement method | |
JP6645711B2 (en) | Image processing apparatus, image processing method, and program | |
JP6346484B2 (en) | Image processing apparatus and control method thereof | |
US10943328B2 (en) | Image capturing apparatus, method for controlling same, and storage medium | |
JP2017161941A (en) | Reproducer, imaging apparatus, and control method of reproducer | |
JP2017227792A (en) | Focus detector and focus detection method | |
JP6566800B2 (en) | Imaging apparatus and imaging method | |
WO2018030386A1 (en) | Position designation device and position designation method | |
US11790600B2 (en) | Image processing device, imaging apparatus, image processing method, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161222 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20161222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171018 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171204 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180130 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180702 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180731 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6381206 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |