JP3971714B2 - Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium - Google Patents

Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium Download PDF

Info

Publication number
JP3971714B2
JP3971714B2 JP2003075478A JP2003075478A JP3971714B2 JP 3971714 B2 JP3971714 B2 JP 3971714B2 JP 2003075478 A JP2003075478 A JP 2003075478A JP 2003075478 A JP2003075478 A JP 2003075478A JP 3971714 B2 JP3971714 B2 JP 3971714B2
Authority
JP
Japan
Prior art keywords
image
virtual viewpoint
projection plane
subject
point
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.)
Expired - Fee Related
Application number
JP2003075478A
Other languages
Japanese (ja)
Other versions
JP2004287517A (en
Inventor
豊 國田
秋彦 橋本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003075478A priority Critical patent/JP3971714B2/en
Publication of JP2004287517A publication Critical patent/JP2004287517A/en
Application granted granted Critical
Publication of JP3971714B2 publication Critical patent/JP3971714B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、仮想視点画像生成方法及び仮想視点画像生成装置、ならびに仮想視点画像生成プログラム及び記録媒体に関し、特に、一次元的に配列されたカメラで撮影した画像から仮想視点画像を生成する方法に適用して有効な技術に関するものである。
【0002】
【従来の技術】
従来、コンピュータグラフィックス(CG)やバーチャルリアリティ(VR)技術の発達により、カメラで撮影した画像に写っている物体(被写体)を、前記カメラの設置位置とは異なる視点から見たときの画像を生成できるようになってきた。
【0003】
このように、前記カメラの設置位置とは異なる視点から前記被写体を見たときの画像は、仮想視点画像または任意視点画像と呼ばれ、種々の画像生成方法が提案されている。なかでも、IBR(Image-Based Rendering)と呼ばれる画像生成方法は、被写体の実写画像を元にして、極めて写実的な仮想視点画像を生成することができる。
【0004】
前記IBRにより画像を生成する方法では、前記カメラにより、多数の視点位置から撮影した画像をもとにして前記仮想生成画像を生成するが、明示的には被写体のモデルを求めずに、2次元画像処理により生成する(例えば、非特許文献1、非特許文献2、非特許文献3を参照。)。
【0005】
また、前記IBRにより画像を生成する方法には、例えば、前記被写体のモデルを取得する処理はしないものの、およそ被写体のある位置に平面(以下、投影面と称する)という幾何構造を想定し、そこに多数のカメラからの画像のうち仮想視点位置に応じて部分画像を適切に投影する方法がある(例えば、非特許文献4を参照。)。
【0006】
前記投影面を想定する方法では、前記多視点画像データに要求される視点の密度は、実際にカメラを並べることができるほど現実的となり、多視点画像データを記憶するまでの時間を短縮することができる。そのため、前記被写体の画像の撮影から仮想視点画像の生成までの処理時間が短縮し、実時間での処理が可能となる。
【0007】
前記投影面を想定する方法では、例えば、N台のカメラを、図22(a)に示すように、前記各カメラの視点Ci(i=1,2,…,N)が、z=0のxy平面上にあり、かつ、Z軸の負の方向(Z<0)の領域にある被写体2を撮影できるように配列する。このとき、前記投影面L0は、前記被写体があるおおよその位置(Z=−l0)にとる。また、前記被写体2を見る視点(仮想視点)PのZ座標をZP、前記仮想視点Pと生成する画像の画像面PPとの距離(透視投影の焦点距離)をf、前記被写体2上の点QのZ座標をlとおく。
【0008】
またこのとき、前記視点Ciに配置したカメラで撮影した前記被写体2上の点Qは、前記投影面L0上の点Q’に投影される。そのため、前記仮想視点画像を生成したときに、前記被写体2上の点Qは、図22(a)及び図22(b)に示すように、前記仮想視点Pと前記投影面L0上の点Q’を結ぶ直線と仮想視点画像の画像面PPが交わる点PP1に表示される。
【0009】
しかしながら、実際に、前記仮想視点Pから前記被写体2上の点Qを見たときには、前記点Qは、図22(a)及び図22(b)に示すように、前記画像面PP上の点PP2に表示され、前記点PP1との間にΔpのずれが生じる。
【0010】
このとき、Z=0のxy平面上で、前記カメラの視点Ciと、前記仮想視点Pと前記投影面上の点Q’を結ぶ光線の距離ベクトルΔr、及び前記画像面PP上での点のずれΔpの間には、下記数式1のような関係が成り立つ。
【0011】
【数1】
Δp=k(l0)Δr
ここで、前記数式1におけるk(l0)は、例えば、下記数式2のように定義する。
【0012】
【数2】

Figure 0003971714
【0013】
すなわち、前記投影面が1つ(L0)の場合、定数l0に対して、前記数式1及び数式2で与えられる誤差が、前記仮想視点画像の画像面PP上に生じる。
またこのとき、前記被写体2の奥行き方向の範囲(距離)が大きいと、前記投影面L0から離れている前記被写体2上の点の誤差が大きくなる。そのため、広範囲にわたる仮想視点画像を生成することが難しいという問題があった。
【0014】
そこで、近年、広範囲にわたる仮想視点画像を生成することが可能な方法として、多層構造をもつ複数の投影面に、撮影した画像をテクスチャマッピングする方法が提案されている(例えば、特願2002−318343号を参照。)。
【0015】
前記複数の投影面を設定する方法では、前記カメラの視点Ci(Z=0)から投影面までの距離l0は変数とみなし、いくつかの投影面Lj(j=1,2,…,M)のうち、前記数式1及び数式2で与えられる画像面PP上での誤差が最小となる距離にある投影面を選んで、前記被写体2上の点Qを投影する。
【0016】
このとき、前記被写体上の点Qが、例えば、図23に示すように、z=0のxy平面からの距離がl0Frontの投影面LFrontと、l0Backの投影面LBackの中間にあるとすると、前記点Qは、前記仮想視点画像の画像面PP上でのずれΔpが小さいほうの投影面に投影(テクスチャマッピング)される。そのため、前記数式2で与えられる係数kは、下記数式3または数式4となる。
【0017】
【数3】
k(l0Front)<0
【0018】
【数4】
k(l0Back)>0
【0019】
すなわち、前記被写体上の点Qを前方の投影面LFrontにテクスチャマッピングするか、後方の投影面LBackにテクスチャマッピングするかによって、係数kの符号が変化する。
【0020】
このとき、前記各投影面の中間地点にある被写体上の点Qは、どちらにテクスチャマッピングするかにより、前記仮想視点画像の画像面PP上での位置のずれΔpの方向が逆になる。そのため、テクスチャマッピングされる投影面が前方と後方に分離される箇所があり、生成した画像に隙間が生じ、その大きさはΔrの大きさ|Δr|に比例する。
【0021】
ここで、前記数式1をX軸方向の成分と、Y軸方向の成分とに分けて考えると、下記数式5及び数式6のようになる。
【0022】
【数5】
Δpx=k(l0)Δrx
【0023】
【数6】
Δpy=k(l0)Δry
【0024】
このとき、前記カメラの視点Ciが、例えば、X軸方向に間隔εxで配列していれば、適切な視点Ciのカメラで撮影した画像を選択して用いることで、|Δrx|≦εx/2となり、Δpxは一定の範囲内に収めることができる。
【0025】
同様に、前記カメラの視点Ciが、例えば、Y軸方向に間隔εyで配列していれば、適切な視点Ciのカメラで撮影した画像を選択して用いることで、|Δry|≦εy/2となり、Δpyは一定の範囲内に収めることができる。
【0026】
【非特許文献1】
Marc Levoy and Pat Hanrahan:"Light Field Rendering," SIGGRAPH'96 Conference Proceedings, pp.34-41, 1996
【非特許文献2】
Steven J. Gortler et al.:"The Lumigraph," SIGGRAPH'96 Conference
Proceedings, pp.43-54, 1996
【非特許文献3】
片山昭宏ほか:「多視点画像の補間・再構成による視点追従型立体画像表示法」, 電子情報通信学会誌, Vol.J79-DII, No.5, pp.803-811, 1996
【非特許文献4】
國田豊ほか:「多眼カメラを用いた任意視点人物像の実時間生成システム」, 電子情報通信学会誌, Vol.J84-DII, No.1, pp.129-138, 2001
【0027】
【発明が解決しようとする課題】
しかしながら、前記従来の技術で説明した、複数の投影面Lj(j=1,2,…,M)を設定して仮想視点画像を生成する方法では、例えば、投影面Ljと投影面Lj+1の間にテクスチャ画像が存在しない場合、生成した仮想視点画像に隙間が生じる。そのため、生成した仮想視点画像が劣化するという問題がある。
【0028】
なお、前記カメラ(視点Ci)の配列密度を十分に大きくすれば、前記仮想視点画像に生じる隙間は、目立たないほどに小さくできる。しかしながら、前記カメラの配列密度には限界がある。また、前記カメラの配列密度を高くすることにより、前記カメラで撮影した画像を取得する時間や、前記仮想視点画像の生成処理にかかる時間が長くなり、実時間レベルでの画像生成が難しくなるという問題もあった。また、前記カメラの配列密度を高くすれば、その分システムが大掛かりになるので、設置コストが上昇するという問題があった。
【0029】
また、前記仮想視点画像生成装置を、例えば、テレビ会議システム等で用いる場合、利用者の視点(仮想視点)は、画像の左右方向に対しての移動が多く、上下方向に対しての移動はあまり行わないことがある。このように、視点の移動方向が、主に一方向である場合には、前記カメラを一次元的に配列することで、設置コストの上昇を抑えることができる。
【0030】
前記カメラ(視点Ci)を一次元的、例えば、前記X軸方向にのみ配列した場合、前記カメラが配列されたX軸方向では、前記カメラの配置間隔や、適切なカメラで撮影した画像を用いることで、前記仮想視点画像の画像面PP上での位置のずれΔpxを一定の範囲内に収めることができる。
【0031】
しかしながら、前記カメラが配列されていないY軸方向では、適切な画像を選択する余地がないので、前記距離ベクトルの大きさ|Δry|は画角の周辺、すなわち画像の端部で大きな値を持つ。そのため、前記仮想視点画像は、図24に示すように、前記カメラが配列されていないY軸方向に走査したときに見られる隙間が大きくなるという問題があった。
【0032】
本発明の目的は、一次元的に配列されたカメラで撮影した画像から仮想視点画像を生成するときに、前記カメラが配列されていない方向で隙間が生じるのを防ぐことが可能な技術を提供することにある。
本発明の他の目的は、一次元的に配列されたカメラで撮影した画像から仮想視点画像を生成するときに、前記カメラが配列されていない方向で隙間が生じるのを防ぐことが可能なプログラム及び記録媒体を提供することにある。
本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述及び添付図面によって明らかになるであろう。
【0033】
【課題を解決するための手段】
本願において開示される発明の概要を説明すれば、以下の通りである。
【0034】
(1)同一平面上にある直線または曲線に沿って配列された複数のカメラで撮影した被写体の画像を取得するステップと、前記被写体の奥行き情報を取得するステップと、前記被写体を見る位置(以下、仮想視点と称する)を設定するステップと、前記被写体の画像を投影面にテクスチャマッピングして、前記仮想視点から前記被写体を見たときの画像(以下、仮想視点画像と称する)を生成するステップとを有する仮想視点画像生成方法であって、前記仮想視点画像を生成するステップは、複数の投影面からなる投影面群、及び1つの投影面を設定する第1ステップと、前記投影面群の投影面上で、前記被写体の画像を貼り付ける領域を設定する第2ステップと、前記被写体の画像を前記投影面群の各投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第3ステップと、前記被写体の画像を前記1つの投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第4ステップと、前記被写体の画像上の、前記投影面群を用いて求めた前記被写体の画像上の点の前記カメラが配列された方向の成分と、前記1つの投影面を用いて求めた前記被写体の画像上の点の前記カメラが配列されていない方向の成分とからなる点の色情報を、仮想視点画像上の点に転写する第5ステップとを有することを特徴とする仮想視点画像生成方法である。
【0035】
前記(1)の手段によれば、前記仮想視点画像上の点の、前記カメラが配列されていない方向の成分は、前記1つの投影面から求める。そのため、前記仮想視点画像の画像面上において、位置ずれの誤差は生じるものの、前記画像面全域で連続的に変化するので、前記仮想視点画像を前記カメラが配列されていない方向に走査したときに見られる隙間が大きくなるのを防ぐことができる。
【0036】
また、前記カメラが配列されている方向の成分は、前記複数の投影面から求めるので、前記仮想視点画像の画像面上での位置ずれの誤差を小さくすることができる。そのため、一次元的、言い換えると、同一平面にある直線あるいは曲線に沿って配列されたカメラで撮影した画像から生成する仮想視点画像の劣化を少なくすることができる。
【0037】
このとき、前記カメラは、例えば、同一平面にある直線あるいは曲線に沿って配列された状態であればよく、前記被写体の画像は、直線状に配列されたカメラで撮影してもよいし、円弧状に配列されたカメラで撮影してもよい。また、前記各カメラの配列の間隔は、等間隔であってもよいし、不規則な間隔であってもよい。
【0038】
(2)前記(1)の手段において、前記第4ステップは、前記被写体の画像を前記投影面群の投影面に逆投影するステップと、テクスチャマッピング用の2次元配列を確保するステップと、前記投影面に逆投影した画像の頂点の座標と前記2次元配列の座標の対応付けを行うステップと、前記1つの投影面及び前記投影面群の投影面、ならびに前記仮想視点の位置関係に基づいて、前記投影面に逆投影した画像を拡大あるいは縮小するステップとを有する。
【0039】
前記(2)の手段によれば、前記投影面群の投影面に逆投影した画像を拡大あるいは縮小することで、前記投影面群の投影面の画像を、あたかも前記1つの投影面に逆投影した画像であるかのように見えるようにすることができる。
【0040】
そのため、前記各投影面を三次元空間上で表現できる構造にすることができ、例えば、OpenGLやDirectX等の汎用的な三次元ライブラリを用いて、高速な前記仮想視点画像の生成処理を行うことができる。
【0041】
(3)同一平面上にある直線または曲線に沿って配列された複数のカメラで撮影した被写体の画像を取得する被写体画像取得手段と、前記被写体の奥行き情報を取得する奥行き情報取得手段と、前記被写体の画像を投影面にテクスチャマッピングして、任意の視点(以下、仮想視点と称する)から前記被写体を見たときの画像(以下、仮想視点画像と称する)を生成する画像生成手段とを有する仮想視点画像生成装置であって、前記画像生成手段は、複数の投影面からなる投影面群、及び1つの投影面を設定する投影面設定手段と、前記投影面群の投影面上で、前記被写体の画像を貼り付ける領域を設定する貼付領域設定手段と、前記投影面設定手段で設定した投影面、及び前記貼付領域設定手段で設定した貼付領域に基づいて、前記被写体の画像を前記投影面にテクスチャマッピングして、前記仮想視点画像に変換するレンダリング手段とを有し、前記レンダリング手段は、前記被写体の画像を前記投影面群の各投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第1対応点算出手段と、前記被写体の画像を前記1つの投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第2対応点算出手段と、前記被写体の画像上の、前記投影面群を用いて求めた前記被写体の画像上の点の前記カメラが配列された方向の成分と、前記1つの投影面を用いて求めた前記被写体の画像上の点の前記カメラが配列されていない方向の成分とからなる点の色情報を、仮想視点画像上の点に転写する色情報転写手段とを有する仮想視点画像生成装置である。
【0042】
前記(3)の手段は、前記(1)の手段の仮想視点画像生成方法を用いて前記仮想視点画像を生成するための装置である。そのため、前記各手段を備えることにより、前記カメラが一次元的に配列されている場合でも、前記仮想視点画像をカメラが配列されていない方向に走査したときに見られる隙間を小さくすることができる。また、カメラが配列されている方向は、画像面上での位置ずれを小さくすることができる。そのため、前記仮想視点画像の劣化を少なくすることができる。
【0043】
(4)前記(3)の手段において、前記第2対応点算出手段は、前記被写体の画像を前記投影面群の投影面に逆投影する逆投影手段と、テクスチャマッピング用の2次元配列を確保するテクスチャ配列確保手段と、前記投影面に逆投影した画像の頂点の座標と前記2次元配列の座標の対応付けを行う対応付け手段と、前記1つの投影面及び前記投影面群の投影面、ならびに前記仮想視点の位置関係に基づいて、前記投影面に逆投影した画像を拡大あるいは縮小する縮尺変更手段とを備える。
【0044】
前記(4)の手段によれば、前記第2対応点算出手段に、前記各手段を備えることで、前記投影面群の投影面に逆投影した画像を、あたかも前記1つの投影面に逆投影した画像であるかのように見えるようにすることができる。
【0045】
そのため、前記各投影面を三次元空間上で表現できる構造にすることができ、例えば、OpenGLやDirectX等の汎用的な三次元ライブラリを用いて、市販のグラフィックス・ハードウェア及びライブラリに対応するソフトウェア(ドライバ)によって、高速な前記仮想視点画像の生成処理を行うことができる。
【0046】
(5)前記(1)または(2)の手段の仮想視点画像生成方法の各ステップを、コンピュータに実行させるための仮想視点画像生成プログラムである。
【0047】
前記(5)の手段によれば、前記仮想視点画像の生成処理をコンピュータに実行させることができる。そのため、専用の装置を用いなくても、劣化の少ない仮想視点画像を高速で生成することができる。
【0048】
(6)前記(5)の手段の仮想視点画像生成プログラムが、コンピュータで読み出し可能な状態に記録された記録媒体である。
前記(6)の手段によれば、前記記録媒体を頒布することで、専用の装置を用いなくても、劣化の少ない仮想視点画像を容易に生成することができる。
【0049】
以下、本発明について、図面を参照して実施の形態(実施例)とともに詳細に説明する。
なお、実施例を説明するための全図において、同一機能を有するものは、同一符号を付け、その繰り返しの説明は省略する。
【0050】
【発明の実施の形態】
(実施例1)
図1及び図2は、本発明による実施例1の仮想視点画像生成装置の概略構成を示す模式図であり、図1は装置の構成を示すブロック図、図2は仮想視点画像生成装置を用いたシステムの構成例を示す図である。
【0051】
図1及び図2において、1は仮想視点画像生成装置、101は被写体画像取得手段、102は奥行き情報取得手段、103は仮想視点設定手段、104は画像生成手段、104aは投影面決定手段、104bは貼付領域設定手段、104cはレンダリング手段、2は被写体、3はカメラ、4は奥行き情報計測手段、5は仮想視点入力手段、6は画像表示手段、7は利用者である。
【0052】
本実施例1の仮想視点画像生成装置1は、図1に示すように、被写体2の画像を取得する被写体画像取得手段101と、前記被写体2の奥行き情報(表面形状)を取得する奥行き情報取得手段102と、前記生成する画像の視点(以下、仮想視点と称する)を設定する仮想視点設定手段103と、前記被写体2の画像及び前記奥行き情報を用いて、前記仮想視点から見た被写体2の画像(以下、仮想視点画像と称する)を生成する画像生成手段104とにより構成されている。
【0053】
また、前記画像生成手段104は、前記被写体2の奥行き情報及び前記仮想視点から投影面を設定する投影面設定手段104aと、前記被写体2の奥行き情報に基づいて、前記投影面上の、前記被写体2の画像を貼り付ける領域を設定する貼付領域設定手段104bと、前記投影面設定手段104aで設定した投影面、及び前記貼付領域設定手段104bで設定した貼付領域に基づいて、前記被写体2の画像を前記投影面に貼り付け(テクスチャマッピング)して、前記仮想視点画像に変換するレンダリング手段104cとを備える。
【0054】
また、本実施例1では、前記被写体2の画像は、例えば、図1及び図2に示したように、4台のカメラ3を一次元的、言い換えると、一方向に列状に、一定の間隔で配列して撮影し、それを前記被写体画像取得手段101で取得する。ここで、前記カメラ3を配列した空間では、図2に示したような、カメラの配列方向がX軸となるような三次元空間をとる。なお、本実施例1では、図1及び図2では、4台のカメラを配列しているが、前記カメラは4台である必要はなく、N台(Nは2以上の整数)のカメラが一方向に配列されていればよい。
【0055】
また、前記被写体2の奥行き情報は、例えば、図1及び図2に示すように、前記カメラ3の近傍に設置した奥行き情報計測手段4で計測し、それを前記奥行き情報取得手段102で取得する。前記奥行き計測手段4には、例えば、TOF(Time Of Flight)法を用いた計測装置を用いる。また、前記奥行き計測手段4の代わりに、前記カメラ3のうちの一つに、前記被写体2の画像(色情報)の撮影及び表面形状の測定をできるカメラを用いてもよい。
【0056】
また、前記仮想視点設定手段103は、例えば、マウスやキーボード等の仮想視点入力手段5から入力された情報に基づき、前記仮想視点の位置、方向、画角等を設定する。またこのとき、前記仮想視点は、前記仮想視点設定手段103で許容されている範囲内であれば、前記カメラ3を配置した位置に限らず、任意の位置に設定することができる。
【0057】
また、前記仮想視点画像生成装置1で生成した画像(以下、仮想視点画像と称する)は、例えば、CRTディスプレイ、液晶ディスプレイ等の画像表示手段6で表示される。
【0058】
図3乃至図6は、本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の原理を説明するための模式図であり、図3は処理全体のフロー図、図4及び図5は投影面の設定方法を説明するための図、図6は色情報の転写方法を説明するための図である。
【0059】
本実施例1の仮想視点画像生成装置を用いて前記仮想視点画像を生成するときには、IBR(Image-Based Rendering)と呼ばれる手法を用いる。前記IBRは、前記被写体画像取得手段101で取得した画像の一部分を、コンピュータ上の三次元空間に設定した投影面にテクスチャマッピングし、その投影面を前記仮想視点設定手段103で設定した仮想視点から見た画像を、座標計算処理で生成する方法である。
【0060】
本実施例1の仮想視点画像生成装置を用いて、前記IBRにより仮想視点画像を生成するときには、まず、図3に示すように、仮想視点P、すなわち生成する画像の視点の位置、方向、画角等を設定する(ステップ801)。前記仮想視点Pの位置、方向、画角等は、前記仮想視点入力手段5から入力された情報に基づき、前記仮想視点設定手段103で設定される。
【0061】
次に、例えば、コンピュータ上に想定した三次元空間上に、投影面を設定する(ステップ802)。前記投影面は、前記仮想視点画像生成装置1の画像生成手段104に設けられた投影面設定手段104aで設定する。
【0062】
本実施例1の仮想視点画像生成装置1を用いる場合、前記ステップ802(投影面設定手段140a)では、例えば、図4に示すように、複数の投影面Lj(j=1,2,…,M)からなる投影面群と、図5に示すように、1つの投影面L*の2種類の投影面を設定する。前記投影面群及び前記1つの投影面L*の設定方法については、後で説明する。
【0063】
前記ステップ802(投影面設定手段104a)で、前記2種類の投影面を設定したら、次に、前記貼付領域設定手段104bで、前記投影面群の各投影面上の、前記被写体2の画像を貼り付ける領域Uijを設定する(ステップ803)。前記被写体の画像を貼り付ける領域Uijの設定方法については、後で説明する。
【0064】
その後、前記レンダリング手段104cで、前記仮想視点画像Pから前記被写体を見たときの画像を生成する(ステップ804)。
【0065】
このとき、前記ステップ804(レンダリング手段104c)では、まず、前記投影面群に前記被写体の画像をテクスチャマッピングしたときに、前記仮想視点画像の画像面PP上の点と対応する前記被写体の画像の画像面上の点を求める。このとき、前記仮想視点Pから見た画像の画像面PP上の点(x,y)は、図4に示したように、前記投影面群の投影面Lj上の点(X,Y,Z)に相当し、前記投影面Lj上の点(X,Y,Z)には、視点Ciに配置されたカメラ3で撮影した被写体2の画像の画像面CPi上の点(xi,yi)が貼り付けられているとする。
【0066】
そして、次に、前記1つの投影面L*を用いて、前記仮想視点画像の画像面PP上の同じ点(x,y)と対応する、視点Ciに配置されたカメラ3で撮影した被写体2の画像の画像面CPi上の点(xi *,yi *)を求める。
【0067】
前記被写体2の画像の画像面CPi上の各点(xi,yi),(xi *,yi *)を求めるときには、例えば、前記仮想視点画像PPの点(x,y)を投影面上へ逆投影したときの点(X,Y,Z),(X*,Y*,Z*)を、前記被写体2の画像の画像面CPiへ投影する。
【0068】
一般に、前記投影面上の点のような三次元空間上の点(X,Y,Z)から、前記被写体の画像の画像面CPi上の点のような二次元平面上の点(xi,yi)への射影は、下記数式7ような行列式で表すことができる。
【0069】
【数7】
Figure 0003971714
【0070】
ここで、前記数式7の左辺のsは補助的な係数である。また、前記数式7のΦは変換行列であり、下記数式8のような3行4列の行列で与えられる。
【0071】
【数8】
Figure 0003971714
【0072】
このとき、例えば、原点を中心とした焦点距離fの透視投影変換を表す行列Φ0は、下記数式9で与えられる。
【0073】
【数9】
Figure 0003971714
【0074】
一方、前記仮想視点画像の画像面上の点のような二次元平面上の点(x,y)を前記三次元空間上の点(X,Y,Z)に逆投影する場合には、前記数式7及び数式8を満たす点が無数に存在する。そのうち、前記三次元空間上に設定した投影面に逆投影する場合、前記投影面を表す式がaX+bY+cZ+d=0とすると、ベクトル表現では下記数式10のように表せる。
【0075】
【数10】
Figure 0003971714
【0076】
ここで、前記数式7及び数式8、ならびに前記数式10をまとめると、下記数式11のようになる。
【0077】
【数11】
Figure 0003971714
【0078】
そのため、前記数式11を(X,Y,Z)について解くと、仮想視点画像の画像面PP上の点(x,y)を前記投影面Lj上の点(X,Y,Z)へ逆投影することができる。ここで、前記数式11の右辺の4行4列の行列が逆行列を持つならば、前記数式11は、s’=1/sとおくことで、下記数式12のようになり、前記投影面Lj上の点(X,Y,Z)が求められる。
【0079】
【数12】
Figure 0003971714
【0080】
前記視点Ciに設置したカメラで撮影した画像の画像面CPi上の点(xi,yi)及び点(xi *,yi *)を求めたら、前記投影面群を用いて求めた点(xi,yi)のカメラが配列されている方向の成分、及び前記1つの投影面を用いて求めた点(xi *,yi *)のカメラが配列されていない方向の成分からなる点を、前記仮想視点画像の画像面PP上の点(x,y)と対応する点とみなし、色情報を転写する。このとき、前記カメラが配列されている方向を三次元空間のX軸方向、前記カメラが配列していない方向をY軸方向とすると、図6に示すように、前記点(xi,yi)のx成分(xi)と、点(xi *,yi *)のy成分(yi *)からなる点(xi,yi *)の色情報を前記仮想視点画像の画像面PP上の点(x,y)に転写する。
【0081】
また、前記カメラで撮影した画像及び前記仮想視点画像は、いわゆるディジタル画像であり、有限の面積を持つ画素の位置及び色情報は、メモリ上の二次元配列により表現されている。ここでは、前記画素の配列の位置を示す座標系(u,v)をディジタル画像座標系と呼ぶことにする。
【0082】
このとき、例えば、前記仮想視点画像のサイズが、640画素×480画素であるとすると、前記仮想視点画像を構成する各画素の位置は、0から639までのいずれかの整数値をとる変数uと、0から479までのいずれかの整数値をとる変数vで表される。また、前記各画素の色情報は、その画素のアドレス(u,v)での赤(R),緑(G),青(B)の情報を8ビットなどで量子化したデータで表される。
【0083】
またこのとき、前記ディジタル画像座標(u,v)と通常の画像座標(x,y)は1対1で対応付けされ、例えば、下記数式13のような関係を持つ。
【0084】
【数13】
Figure 0003971714
【0085】
なお、前記数式13では、x軸とu軸を平行とし、u軸とv軸の単位長は(x,y)座標系を基準にku,kvとし、u軸とv軸のなす角度をθとしている。
【0086】
前記二次元配列の各画素の情報の書き込みや読み出しをする場合、前記ディジタル画像座標系(u,v)は離散的な値をとるが、以下の説明では断りのない限り連続値をとるものとし、各画素の情報へアクセスする際に適当な離散化処理を行うものとする。
【0087】
また、前記ディジタル画像座標と画像座標の座標変換では、前記数式13の関係に加えて、例えば、レンズの歪みを考慮した変換を行うことも可能である。
【0088】
このようにして、前記カメラで撮影した画像の画像面CPi上の点(xi,yi *)に相当する画素(ui,vi)の色情報を取り出した後、取り出した色情報を、前記仮想視点画像の画像面PP上の点(x,y)に相当する画素(u,v)に転写すれば、仮想視点画像が得られる。
【0089】
以下、本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法について、前記投影面及び前記貼付領域の設定方法を含めて、詳細に説明する。
【0090】
図7乃至図12は、本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、図7は複数の投影面の設定方法を説明するための図、図8(a),図8(b),図9(a)及び図9(b)は貼り付け領域の設定方法を説明するための図、図10は仮想視点Pから見た画像を生成するステップの処理手順を示すフロー図、図11(a)及び図11(b)は色情報を転写するステップを説明するための図、図12は生成した仮想視点画像の一例を示す図である。
【0091】
本実施例1の仮想視点画像生成装置1を用いて、前記仮想視点画像を生成するには、まず、前記被写体画像取得手段101で前記被写体2の画像を取得すると共に、前記奥行き情報取得手段102で前記被写体2の奥行き情報を取得する。
【0092】
このとき、前記被写体2の画像は、前記1次元的に配列したN台のカメラ3で撮影し、取得する。このとき、前記カメラ3は、視点Ci(i=1,2,…,N)が、例えば、図4に示したように、直線上(X軸上)に並ぶように配列する。
【0093】
また、前記被写体2の奥行き情報は、前記カメラ3の近傍に設置した奥行き情報計測装置4により計測して取得する。
【0094】
前記被写体の画像及び前記奥行き情報を取得した状態で、前記仮想視点画像を生成するには、まず、図3に示したように、仮想視点Pの位置、方向、画角等を設定する(ステップ801)。前記ステップ801は、前記仮想視点設定手段103で行い、前記仮想視点Pを決定するために必要な情報は、前記仮想視点入力手段5から入力する。
【0095】
このとき、前記仮想視点入力手段5として、例えば、マウスやキーボード等の入力装置を用いれば、利用者7は、前記画像表示手段(ディスプレイ)6を見ながら、前記仮想視点Pに関する情報を直接的に設定することができる。
【0096】
また、前記仮想視点入力手段5として、例えば、利用者の周りに配置されたセンサー、もしくは前記利用者7に装着したセンサーを用いれば、前記利用者7の位置を検知して前記仮想視点Pを設定することもできる。
【0097】
また、前記仮想視点入力手段5として、他の装置やコンピュータプログラムを用いれば、前記仮想視点Pを自動的に設定することもできる。
【0098】
前記仮想視点Pの位置等を設定したら、次に、3次元空間上に、前記被写体の画像を貼り付ける投影面を設定する(ステップ802)。前記ステップ802は、前記投影面設定手段104aで行う。このとき、前記ステップ802では、例えば、図4及び図5に示したように、複数の投影面Lj(j=1,2,…,M)からなる投影面群と、1つの投影面L*を設定する。
【0099】
また、本実施例1では、説明を簡単にするため、前記投影面を設定する3次元空間は、例えば、図4及び図5に示したように、前記カメラ3(視点Ci)が配列されている方向をX軸方向、配列されていない方向をY軸方向とする。また、前記各投影面Lj,L*は、法線方向がZ軸と平行であるとする。またこのとき、前記Z軸は、図4及び図5に示したように、前記各投影面から前記カメラ3に向かう方向にとり、前記投影面Ljの設定距離はZ=−lj、前記投影面L*の設定距離はZ=−l*で表すことにする。
【0100】
またこのとき、前記投影面群の投影面Ljは、例えば、以下のような条件を満たすように設定する。
【0101】
本実施例1のように、前記被写体の画像から部分的に抽出した画像を、前記投影面に貼り付ける場合、例えば、カメラの視点Ciがある面(以下、カメラ設置面と称する)8から被写体2上の点までの実際の距離と、前記カメラ設置面8から前記投影面までの距離が異なると、生成した画像上で誤差が生じる。そこで、前記仮想視点画像で要求される精度を満たすために許容される誤差の最大値をδとする。
【0102】
このとき、前記カメラ設置面8から距離lの位置にある被写体2上の点が、前記投影面Ljに貼り付けられているとすると、前記距離lが、下記数式1、数式2、数式3で表される条件を満たしていれば、前記距離lの位置にある被写体上の点と投影面Lj上の点の誤差が最大値δよりも小さいことが保証される。
【0103】
【数14】
Figure 0003971714
【0104】
【数15】
Figure 0003971714
【0105】
【数16】
Figure 0003971714
【0106】
前記数式14において、flj及びbljは前記投影面Ljに貼り付けられる点の最小値及び最大値であり、前記被写体の画像の中で、カメラ設置面8からの距離lがfljからbljまでの間である点(部分)は、前記画像投影面Ljに貼り付けられる。
【0107】
また、前記数式15及び数式16において、ZPはカメラ設置面8から仮想視点Pまでの距離、fはカメラの焦点距離、εはカメラの設置間隔、δは許容される誤差の最大値である。またこのとき、前記仮想視点Pの位置は、前記カメラ設置面8を基準として、前記投影面Ljが設けられた方向とは逆の方向にあるとする。また、前記被写体の画像と前記投影面Ljの間の写像は透視投影とする。
【0108】
このとき、前記投影面Ljのうち、前記カメラ設置面8に一番近い投影面L1では、貼り付けた画像(点)のうち、実際の被写体2上の点が、前記数式1によって与えられる奥行き範囲内に存在する場合は、前記投影面L1上での位置の誤差を、最大値δよりも小さくすることができる。そのため、前記各投影面Ljに対して、前記数式14の条件を設定し、前記被写体2が存在する奥行き範囲全体をカバーするように配置することで、仮想視点画像を一定の誤差の範囲内で生成することができる。
【0109】
前記flj及びblj、ならびにカメラ設置面8から投影面Ljまでの距離ljを設定するときは、まず、例えば、図7に示したように、奥行き情報の最小値lminをfl1とする。このとき、前記数式15から投影面L1の距離l1が決定する。また、前記投影面L1の距離l1が決まると、前記数式16からbl1が決まる。
【0110】
次の投影面L2に関しては、図7に示したように、fl2=bl1とし、前記数式15及び前記数式16を用いて前記投影面L2の距離l2、及びbl2を決める。
【0111】
以下、逐次的にflj+1=bljとして計算を繰り返し、bljが被写体2の奥行き情報の最大値lmaxよりも大きくなるか、無限大になるまで投影面Ljを設定していく。
【0112】
前記被写体の奥行き情報の最小値lmin、及び最大値lmaxは、前記奥行き情報取得手段102で取得した奥行き情報を用いる代わりに、例えば、あらかじめ被写体2が移動する奥行き範囲を想定しておき、その情報を用いてもよい。
【0113】
また、前記投影面Ljの設定方法では、仮想視点Pが更新されるたびに設定処理を行ってもよいし、あらかじめ仮想視点Pが移動する範囲を限定しておき、その限定された範囲内で、許容される誤差の最大値δがもっとも厳しい(小さい)場合に基づいて設定してもよい。
【0114】
また、前記カメラが配列されていない方向(Y軸方向)に対する投影面L*は、例えば、前記X軸方向に対する投影面Ljの1つと一致するように設定する。また、その他にも、例えば、前記X軸方向に対する投影面Ljの設定距離を平均した距離に設定してもよい。
【0115】
なお、前記数式14乃至数式16を用いる方法は、前記投影面群の各投影面Ljの設定方法の一例であり、他の方法で設定することもできる。
【0116】
前記各投影面Lj,L*の設定が済んだら、次に、前記被写体の画像を、前記各投影面Lj,L*にテクスチャマッピングする際に、各投影面Lj,L*上で、視点Ciのカメラで撮影した画像が分担する領域、言い換えると、前記各投影面Lj,L*上の前記被写体の画像を貼り付ける領域(以下、貼付領域と称する)Uijを設定する(ステップ803)。
【0117】
前記貼付領域Uijを設定するときには、まず、例えば、図8(a)に示すように、前記視点Ciを母点としたボロノイ領域Viを求め、前記仮想視点Pを中心にして前記ボロノイ領域Viを投影面Ljに投影した領域Wijを求める。また、その一方で、図8(b)に示すように、前記被写体2を前記視点Ciから測ったときの投影面Ljにおける分担領域Sijを求める。
【0118】
前記貼付領域Uijは、図9(a)及び図9(b)に示すように、前記領域Wijと前記分担領域Sijの重なる領域とすれば、下記数式17で与えられる。
【0119】
【数17】
ij=Wij∩Sij
なお、図9(a)及び図9(b)、ならびに前記数式17に示したような設定方法は、前記貼付領域Uijの設定方法の一例であり、他の方法で設定することもできる。
【0120】
前記投影面Lj,L*の設定、及び前記貼付領域Uijの設定が済んだら、次に、前記仮想視点画像を生成する(ステップ804)。
【0121】
前記仮想視点画像は、例えば、横(u軸)方向がw画素、縦(v軸)方向がh画素のディジタル画像である。そのため、前記ディジタル画像の各画素(u,v)における色情報を取得すれば、前記仮想視点画像を生成することができる。このとき、前記各画素(u,v)の色情報は、例えば、R(赤),G(緑),B(青)の各色を8ビットの値で表現する。
【0122】
前記仮想視点画像を生成するには、図10に示すように、まず、仮想視点画像の画素(u,v)を示す変数u,v、投影面Ljの変数j、前記カメラの視点Ciの変数iのそれぞれを初期化する(ステップ804a,ステップ804b,ステップ804c)。このとき、前記変数u,vは、例えば、u=0,v=0とする。また、前記変数i及び変数jはそれぞれ、例えば、i=1,j=1とする。
【0123】
次に、前記仮想視点画像の各画素(u,v)に対応する、前記仮想視点画像の画像面PP上の点(x,y)を求める(ステップ804d)。前記画像面PP上の点(x,y)は、例えば、前記数式13に基づいて求める。
【0124】
次に、前記仮想視点画像の画像面PP上の点(x,y)を、前記投影面群の投影面Ljに逆投影して、前記画像面PP上の点(x,y)に対応する前記投影面Lj上の点(X,Y,Z)を求める(ステップ804e)。前記投影面Lj上の点(X,Y,Z)は、例えば、前記数式11に基づいて求める。
【0125】
次に、前記投影面Lj上の点(X,Y,Z)が、前記視点Ciのカメラで撮影した画像の前記投影面Ljにおける貼付領域Uijに含まれるか判定する(ステップ804f)。ここで、前記貼付領域Uijに含まれる場合は、次のステップ804gに進む。また、前記貼付領域Uijに含まれない場合は、以降のステップを飛ばして、ステップ804lに進む。
【0126】
前記投影面Lj上の点(X,Y,Z)が前記貼付領域Uijに含まれる場合、次のステップ804gで、前記仮想視点画像の画像面PP上の点(x,y)を、前記1つの投影面L*上に逆投影して、前記点(x,y)に対応する点(X*,Y*,Z*)を求める。前記投影面L*への逆投影は、前記投影面Ljへの逆投影と同じ要領で、前記数式11に基づいて行えばよい。
【0127】
次に、前記投影面Lj上の点(X,Y,Z)を視点Ciのカメラで撮影した画像の画像面CPi上に投影し、前記点(X,Y,Z)に対応する点(xi,yi)を得る(ステップ804h)。前記ステップ804hの投影処理は、例えば、前記数式7及び数式8で表される行列式を用いて行えばよいので、詳細な説明は省略する。
【0128】
次に、前記投影面L*上の点(X*,Y*,Z*)を前記被写体画像の画像面CPi上に投影し、前記点(X*,Y*,Z*)に対応する点(xi *,yi *)を得る(ステップ804i)。前記ステップ804iの投影処理も、例えば、下記数式7及び数式8で表される行列式を用いて行えばよいので、詳細な説明は省略する。
【0129】
次に、図6に示したように、前記ステップ804hで求めた点(xi,yi)のx成分と、前記ステップ804iで求めた点(xi *,yi *)のy成分からなる点(xi,yi *)に対応する、前記視点Ciのカメラで撮影したディジタル画像の画像面CPi上の画素(ui,vi)を求める(ステップ804j)。前記ステップ804jは、例えば、前記数式13に基づいて行えばよいので、詳細な説明は省略する。
【0130】
次に、図11(a)に示すように、前記視点Ciに設置したカメラで撮影したディジタル画像の画像面CPiの画素(ui,vi)の色情報を、図11(b)に示すように、前記仮想視点画像の画像面PP上の画素(u,v)における色情報に転写する(ステップ804k)。
【0131】
その後、前記視点Ciの変数iを更新し(ステップ804l)、前記色情報の転写が済んでいない視点Ciのカメラで撮影した画像があるか調べる(ステップ804m)。色情報の転写が済んでいない視点Ciの画像があれば前記ステップ804eに戻り、前記ステップ804eからステップ804kまでの処理を行う。
【0132】
全ての視点Ciの画像において前記色情報の転写が済んでいれば、今度は投影面Ljの変数jを更新し(ステップ804n)、前記処理を行っていない投影面があるか調べる(ステップ804o)。処理を行っていない投影面があれば、前記ステップ804cに戻り、前記ステップ804cからステップ804kの処理を行う。
【0133】
その後、今度は、前記仮想視点画像の画素(u,v)を更新し(ステップ804p)、全ての画素に対して処理を行ったか調べる(ステップ804q)。未処理の画素(u,v)がある場合は、前記ステップ804bに戻り、前記ステップ804bからステップ804kの処理を行う。
【0134】
以上の処理が全て済むと、例えば、図12に示したような前記仮想視点画像が得られ、前記画像表示手段6に表示される。このとき、前記仮想視点画像の各点(画素)のY軸方向成分、すなわち前記カメラ3が配列されていない方向の成分は、1つの投影面にテクスチャマッピングして求めている。そのため、前記Y軸方向の成分は画像面全域にわたり連続的に変化し、図12に示したように、前記仮想視点画像をY軸方向に走査してみたときに、画像の隙間が非常に小さくなる。
【0135】
以上説明したように、本実施例1の仮想視点画像生成装置を用いた仮想視点画像生成方法によれば、前記仮想視点画像上の点の、前記カメラが配列された方向の成分は複数の投影面Ljからなる投影面群を用いて求め、前記カメラが配列されていない方向の成分は1つの投影面L*を用いて求めることにより、生成した仮想視点画像の、前記カメラが配列されていない方向に隙間が生じるのを防ぐことができる。そのため、前記カメラが1次元的に配列されている場合でも、仮想視点画像の劣化を低減することができる。
【0136】
また、本実施例1の仮想視点画像生成装置1は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)、HDD(Hard Disk Drive)等を備えるコンピュータであってもよい。その場合、図3及び図10に示したような処理の各ステップを、前記コンピュータに実行させるプログラムを、例えば、前記HDDや前記ROMに記録しておけばよい。また、前記プログラムは、前記HDDや前記ROMに記録する代わりに、CD-ROM等の記録媒体に記録したり、インターネット上のサーバー等に記録したりして、前記記録媒体や前記インターネットなどのネットワークを利用して提供することもできる。そのため、専用の装置を用いなくても、劣化の少ない仮想視点画像を容易に生成することができる。
【0137】
図13及び図14は、前記実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の応用例を説明するための図である。
【0138】
前記実施例1では、図4に示したように、前記投影面Lj,L*を設定する三次元空間のX軸方向及びY軸方向と、前記仮想視点画像のx軸方向及びy軸方向が一致している例を挙げて説明したが、実際には、図13及び図14に示すように、三次元空間のX軸方向及びY軸方向と、前記仮想視点画像のx軸方向及びy軸方向が一致していなくてもよい。そのような場合は、例えば、図14に示したように、三次元空間のX軸方向及びY軸方向と一致するx’軸及びy’軸をとるような画像面を想定し、前記実施例1で説明した手順に沿って、前記仮想視点画像の画像面上の点(x',y')と対応する被写体2の画像の画像面上の点(xi',(yi *)')を求めた後、前記点(x',y')を点(x,y)に座標変換すればよい。
【0139】
図15は、前記実施例1の仮想視点画像生成装置の変形例を説明するための図である。
【0140】
前記実施例1の仮想視点画像生成装置では、前記奥行き情報取得手段102は、前記奥行き計測手段4で計測した結果を取得しているが、これに限らず、例えば、図15に示すように、前記被写体画像取得手段101で取得した画像を用いて、奥行き情報を算出してもよい。このとき、前記奥行き情報取得手段102では、例えば、ステレオマッチングにより奥行き情報を算出する(例えば、奥富,金出, “複数の基線長を利用したステレオマッチング”, 電子情報通信学会誌 D-II, no.8, pp.1317-1327, 1992を参照。)。
【0141】
(実施例2)
図16及び図21は、本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、図16は仮想視点Pから見た画像を生成するステップのフロー図、図17及び図18は投影ポリゴンの設定方法を説明するための図、図19はテクスチャ配列内での画像の例を示す図、図20及び図21は投影ポリゴンの頂点の補正方法を説明するための図である。
【0142】
本実施例2の仮想視点画像生成装置は、前記実施例1で説明した仮想視点画像生成装置1と同様の構成であるので、詳細な説明は省略する。
【0143】
前記実施例1の仮想視点画像生成装置1を用いた仮想視点画像生成方法では、図4及び図5に示したように、複数の投影面Lj(j=1,2,…,M)からなる投影面群と、1つの投影面L*の2種類の投影面を設定し、仮想視点画像を生成した。これは、カメラが配列されている方向では投影面が複数あり、前記カメラが配列されていない方向では投影面が1つであるという想定をして、透視投影変換をしていることになるが、実際の三次元空間上に、このような幾何図形は存在しない。そのため、例えば、OpenGLやDirectXのような、汎用的な三次元ライブラリを用いると、座標の扱いが困難である。
【0144】
前記三次元ライブラリにより、ある視点からの画像を生成するには、いくつもの段階的な処理が施される。そのうち特に、処理の高速化が求められる箇所では、並列処理を行うなど、ライブラリの種類によって処理方法は多様であるが、一般的には、大きく分けて次の3つの処理を経る。
【0145】
(1)被写体をポリゴン(多角形平面)等の基本図形の組み合わせとして三次元座標系で表現し、視点の位置、光源の位置、テクスチャ等を設定する三次元シーンの設定処理。
【0146】
(2)被写体を表現する三次元座標系の頂点を視点座標系に変換し、投影変換して視点の位置にある画像面の二次元座標系に変換する座標変換処理。またこのとき、光源やテクスチャマッピングによる頂点の色の計算、奥行き情報の計算なども行う。
【0147】
(3)二次元座標に変換された頂点を補完して塗りつぶし、画像面の各画素での色を計算する走査変換処理。またこのとき、奥行き情報を基にした隠面消去処理もここで行う。
【0148】
前記三次元ライブラリ及びグラフィクス・ハードウェアを組み合わせて使用する場合、前記3つの処理のうち、アプリケーション・プログラム(ソフトウェア)で受け持つ処理は、前記(1)の三次元シーンの設定処理のみであり、前記(2)の座標変換処理、及び前記(3)の走査変換処理は、前記三次元ライブラリが対応したグラフィックス・ハードウェアにより処理される。
【0149】
しかしながら、前記座標変換処理を前記三次元ライブラリ(グラフィックス・ハードウェア)に任せてしまうと、前記実施例1のような特殊な座標変換処理を行なうことができない。そのため、前記座標変換処理をアプリケーション・プログラムで行わなければならなくなり、処理速度(画像生成速度)が低下する。
【0150】
そこで、本実施例2では、前記汎用的な三次元ライブラリ(グラフィックス・ハードウェア)を用いて仮想視点画像を生成する方法について説明する。
【0151】
本実施例2の仮想視点画像生成方法でも、まず、図3に示したように、仮想視点Pの設定(ステップ801)、及び投影面Lj,L*の設定(ステップ802)、ならびに前記各投影面上の貼付領域Uijの設定(ステップ803)の各ステップを行う。なお、前記ステップ801,802,803は前記実施例1で説明したような処理を行えばよいので、詳細な説明は省略する。
【0152】
次に、図3に示した前記ステップ804の処理を行うが、本実施例2では、まず、図16に示すように、前記ステップ802で決定した投影面Lj上に、前記視点Ciのカメラで撮影した画像の画像面の画角を逆投影したポリゴン(多角形平面)を設定する(ステップ804r)。以下、前記ポリゴンを投影ポリゴンと称する。
【0153】
このとき、例えば、図17に示すように、前記視点Ciのカメラで撮影した画像の画像面CPiにおける画角の四隅を{Hi 1,Hi 2,Hi 3,Hi 4}とおき、それらを投影面Ljに逆投影したものをそれぞれ{Gij 1,Gij 2,Gij 3,Gij 4}とおいた場合、この{Gij 1,Gij 2,Gij 3,Gij 4}を頂点とする多角形が前記投影ポリゴンとなる。
【0154】
ここで、前記逆投影の座標計算は、例えば、前記数式12に示す関係式に基づいて行い、全てのカメラCi(i=1,2,…,N)、及び全ての投影面Lj(j=1,2,…,M)に対して、図18に示したように、合計i×j組の前記投影ポリゴン、及びi×j×4個の頂点を設定する。なお、ここでは、画像面の画角を規定する多角形及び前記投影ポリゴンの頂点の数を4つとしたが、前記頂点の数は3つでもよいし、5つ以上でもよい。
【0155】
次に、全ての投影ポリゴンについて、テクスチャマッピング用の二次元配列(テクスチャ配列)を確保する(ステップ804s)。前記テクスチャ配列は、1つの視点Ciに対して、投影面の数、すなわちj組確保し、合計でi×j組を確保する。
【0156】
前記テクスチャ配列の各成分(画素)には、赤(R),緑(G),青(B)の3原色の輝度を表す色情報の他、一般にアルファ値と呼ばれる透明度を表す情報(A)も格納する。
【0157】
また、前記テクスチャ配列のサイズは、前記視点Ciのカメラで撮影した画像のサイズと同じである場合に、メモリの使用量をもっとも節約できるが、前記三次元ライブラリの種類によっては、前記テクスチャ配列の各辺のサイズは2のべき乗でなければならないなどの条件がある。そのため、前記テクスチャ配列は、前記カメラの画像サイズよりも大きなサイズの配列を確保する。このとき、前記カメラ画像の配列のサイズをw×hとすると、前記テクスチャ配列のサイズはwt×ht(wt≧w,ht≧h)となるようにする。ここで、例えば、前記カメラの画像サイズ(w,h)が(640,480)であり、テクスチャ配列の各辺のサイズ(wt,ht)が2のべき乗でなければならないとすると、確保するテクスチャ配列のサイズ(wt,ht)は(1024,512)とする。
【0158】
また、前記カメラの画像のサイズが大きく、前記テクスチャ配列に許容される最大のサイズを超えてしまうような場合は、前記テクスチャ配列を小さく分けて複数のテクスチャ配列を確保する。
【0159】
このようにして、前記テクスチャ配列を確保した後、前記視点Ciのカメラで撮影した画像を、対応するj組のテクスチャ配列に転送する。
【0160】
前記テクスチャ配列を確保したら、次に、前記投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の三次元座標と、テクスチャ座標の対応付けを行う(ステップ804t)。ここで、前記テクスチャ座標とは、例えば、図19に示すように、テクスチャマッピングに用いる画像TPの辺の長さを1に正規化した座標である。このとき、前記テクスチャ画像TP上の各点の位置は、0から1までの値をとる座標軸(s,t)で与えられる。前記ステップ804tにおいて、前記各頂点の三次元空間座標(X,Y,Z)と二次元テクスチャ座標(s,t)の対応付けができれば、テクスチャマッピング処理は、前記三次元ライブラリが担当して行うことができ、グラフィックス・ハードウェアで仮想視点画像を生成することができる。
【0161】
このとき、例えば、図19に示したように、前記カメラ画像の配列を、前記テクスチャ配列の左下隅に合わせて転送した場合、前記カメラ画像の四隅の点{Hi 1,Hi 2,Hi 3,Hi 4}はそれぞれ、前記テクスチャ座標では(0,0),(0,h/ht),(w/wt,h/ht),(w/wt,0)となる。また、前記投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の三次元座標と、前記カメラ画像の四隅の点{Hi 1,Hi 2,Hi 3,Hi 4}の対応関係は、前記ステップ804rで求めているので、それを利用すれば、前記投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の各座標と前記テクスチャ座標の対応関係が得られる。
【0162】
前記投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の各座標と前記テクスチャ座標の対応関係が得られたら、次に、前記テクスチャ座標を格納する配列の透明度(A)の設定をする(ステップ804u)。このとき、前記配列の透明度(A)は、前記投影面上の貼付領域Uijに相当する領域が不透明になり、その他の領域が透明になるように設定する。このように設定することで、三次元ライブラリで描画するときに、前記貼付領域Uijに含まれるテクスチャのみを描画することができる。
【0163】
次に、前記ステップ804rで設定した投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の位置を、前記カメラが配列されていない方向に移動させ、前記投影面上でのテクスチャ画像を拡大あるいは縮小する(ステップ804v)。
【0164】
本実施例2の仮想視点画像の生成方法で、前記実施例1と同様の処理をするならば、前記カメラが配列されていない方向(Y軸方向)に対しては、前記投影面群の代わりに、1つの投影面L*を想定して座標計算処理を行う。このとき、例えば、図20に示すように、投影面Lj上の点Gにテクスチャマッピングされている配列(画素)は、投影面L*上では点G*にテクスチャマッピングされる。そのため、前記配列(画素)は、前記仮想視点Pから見た画像の画像面PP上では点Iに描画される。
【0165】
そこで、前記投影面Ljを用いつつ、前記仮想視点Pから見た画像の画像面PPの点Iに描画されるように、点GのY座標を点G’のY座標に更新する。
【0166】
このような処理を、前記投影ポリゴンの全ての頂点に付いて行えば、前記投影ポリゴンで囲まれるテクスチャは、前記投影面L*を用いたかのように補正処理される。
また、前記点G’は、例えば、以下のような方法で簡単に求めることができる。
【0167】
まず、点Gに対応する視点Ciで撮影した画像の画像面CPi上の点Hを投影面L*上の点G*に逆投影する。次に、点G*を仮想視点Pの画像面PP上の点Iに投影する。最後に、点Iを投影面Ljに逆投影すれば、点G’が得られる。ここで、前記点G*の投影は、例えば、前記数式7及び数式8に示した関係式に基づいて計算する。また、前記点G,G’の逆投影は、例えば、前記数式12に示した関係式に基づいて計算する。
【0168】
なお、図20では、前記投影ポリゴンの頂点が拡大するような例を示したが、前記仮想視点P、前記カメラの視点Ci、前記投影面Lj,L*の位置関係によっては、前記投影ポリゴンの頂点を縮小する場合も考えられる。
【0169】
前記投影ポリゴンを縮小する場合も、前記拡大する場合と同様の処理を行えばよく、例えば、図21に示すように、前記カメラの画像面CPi上の点Hを投影面L*上の点G*に逆投影し、点G*を仮想視点Pの画像面PP上の点Iに投影した後、点Iを投影面Ljに投影すれば、点G’が得られる。ここで、前記点G*の投影は、例えば、前記数式7及び数式8に示した関係式に基づいて計算する。また、前記点G,G’の逆投影は、例えば、前記数式12に示した関係式に基づいて計算する。
【0170】
前記各ステップの処理を終了したら、前記各ステップで設定した仮想視点P、投影ポリゴンの各頂点{Gij 1,Gij 2,Gij 3,Gij 4}の位置、テクスチャからなる三次元シーンを、前記三次元ライブラリに設定すると、前記三次元ライブラリを用いて、前記グラフィックス・ハードウェア上で、前記座標変換処理及び前記走査変換処理が行われ、前記仮想視点Pにおける画像が生成される(ステップ804w)。
【0171】
以上説明したように、本実施例2の仮想視点画像生成方法によれば、前記投影面群の投影面に逆投影した画像を拡大、あるいは縮小することで、前記投影面郡の投影面上の画像を、あたかも前記実施例1で説明した前記1つの投影面L*にテクスチャマッピングした画像のように見えるようにすることができる。そのため、前記投影面を3次元空間上で表現できる構造にすることができ、汎用的なの三次元ライブラリを用いて、劣化の少ない仮想視点画像を高速に生成することができる。
【0172】
以上、本発明を、前記実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲において、種々変更可能であることはもちろんである。
【0173】
例えば、前記実施例では、例えば、図1及び図2に示したように、直線状に配列したカメラ3で前記被写体2の画像を撮影したが、前記カメラ3は、直線状に限らず、例えば、円弧状に配列されていてもよい。
【0174】
また、前記カメラ3は、前記直線状や前記円弧状に限らず、前記一次元的な配列、言い換えると、1つの平面上にある直線または曲線に沿って配列された状態であればよい。すなわち、前記実施例では、前記各カメラの視点Ciが直線(X軸)上になるように配列しているが、必ずしもX軸上にある必要はない。
【0175】
また、前記実施例では、前記カメラ3は、一定の間隔で配列したが、これに限らず、不規則な間隔で配列されていてもよい。
【0176】
【発明の効果】
本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば、以下の通りである。
【0177】
すなわち、一次元的に配列されたカメラで撮影した画像から仮想視点画像を生成するときに、前記カメラが配列されていない方向で隙間が生じるのを防ぐことができる。
【図面の簡単な説明】
【図1】本発明による実施例1の仮想視点画像生成装置の概略構成を示す模式図であり、装置の構成を示すブロック図である。
【図2】本発明による実施例1の仮想視点画像生成装置の概略構成を示す模式図であり、仮想視点画像生成装置を用いたシステムの構成例を示す図である。
【図3】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の原理を説明するための模式図であり、処理全体のフロー図である。
【図4】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の原理を説明するための模式図であり、投影面の設定方法を説明するための図である。
【図5】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の原理を説明するための模式図であり、投影面の設定方法を説明するための図である。
【図6】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の原理を説明するための模式図であり、色情報の転写方法を説明するための図である。
【図7】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、複数の投影面の設定方法を説明するための図である。
【図8】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、図8(a)及び図8(b)は貼り付け領域の設定方法を説明するための図である。
【図9】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、図9(a)及び図9(b)は貼り付け領域の設定方法を説明するための図である。
【図10】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、仮想視点Pから見た画像を生成するステップの処理手順を示すフロー図である。
【図11】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、図11(a)及び図11(b)は色情報を転写するステップを説明するための図である。
【図12】本実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法を説明するための模式図であり、生成した仮想視点画像の一例を示す図である。
【図13】前記実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の応用例を説明するための図である。
【図14】前記実施例1の仮想視点画像生成装置を用いた仮想視点画像の生成方法の応用例を説明するための図である。
【図15】前記実施例1の仮想視点画像生成装置の変形例を説明するための図である。
【図16】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、仮想視点Pから見た画像を生成するステップのフロー図である。
【図17】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、投影ポリゴンの設定方法を説明するための図である。
【図18】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、投影ポリゴンの設定方法を説明するための図である。
【図19】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、テクスチャ配列内での画像の例を示す図である。
【図20】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、投影ポリゴンの頂点の補正方法を説明するための図である。
【図21】本発明による実施例2の仮想視点画像生成方法を説明するための模式図であり、投影ポリゴンの頂点の補正方法を説明するための図である。
【図22】従来の投影面が1つの場合の画像生成方法を説明するための模式図である。
【図23】従来の投影面が複数の場合の画像生成方法を説明するための模式図である。
【図24】従来の画像生成方法の課題を説明するための模式図である。
【符号の説明】
1…仮想視点画像生成装置、101…被写体画像取得手段、102…奥行き情報取得手段、103…仮想視点設定手段、104…画像生成手段、104a…投影面設定手段、104b貼付領域設定手段、2…被写体、3…カメラ、4…奥行き情報計測手段、5…仮想視点入力手段、6…画像表示手段、7…利用者、8…カメラ設置面、Ci…カメラの視点、CPi…カメラで撮影した画像の画像面、Lj,L*…投影面、P…仮想視点、PP…仮想視点画像の画像面。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a virtual viewpoint image generation method, a virtual viewpoint image generation apparatus, a virtual viewpoint image generation program, and a recording medium, and more particularly, to a method for generating a virtual viewpoint image from images captured by a one-dimensionally arranged camera. It is related to effective technology when applied.
[0002]
[Prior art]
Conventionally, with the development of computer graphics (CG) and virtual reality (VR) technology, an image of an object (subject) in an image taken with a camera is viewed from a different viewpoint than the camera installation position. It has become possible to generate.
[0003]
Thus, an image when the subject is viewed from a viewpoint different from the installation position of the camera is called a virtual viewpoint image or an arbitrary viewpoint image, and various image generation methods have been proposed. In particular, an image generation method called IBR (Image-Based Rendering) can generate a very realistic virtual viewpoint image based on a real image of a subject.
[0004]
In the method of generating an image by the IBR, the virtual generation image is generated by the camera based on images taken from a large number of viewpoint positions. It is generated by image processing (see, for example, Non-Patent Document 1, Non-Patent Document 2, and Non-Patent Document 3).
[0005]
Further, the method for generating an image by the IBR assumes, for example, a geometric structure called a plane (hereinafter referred to as a projection plane) at a certain position of the subject, although the process of acquiring the model of the subject is not performed. In addition, there is a method of appropriately projecting a partial image according to a virtual viewpoint position among images from a large number of cameras (for example, see Non-Patent Document 4).
[0006]
In the method that assumes the projection plane, the viewpoint density required for the multi-viewpoint image data becomes so realistic that the cameras can be actually arranged, and the time until the multi-viewpoint image data is stored is shortened. Can do. For this reason, the processing time from the photographing of the subject image to the generation of the virtual viewpoint image is shortened, and the processing in real time becomes possible.
[0007]
In the method of assuming the projection plane, for example, as shown in FIG.i(I = 1, 2,..., N) are arranged so that the subject 2 is on the xy plane with z = 0 and in the negative Z-axis direction (Z <0) area can be photographed. At this time, the projection plane L0Is the approximate position where the subject is (Z = −l0) Further, the Z coordinate of the viewpoint (virtual viewpoint) P for viewing the subject 2 is set to ZPThe distance between the virtual viewpoint P and the image plane PP of the image to be generated (the focal length of the perspective projection) is f, and the Z coordinate of the point Q on the subject 2 is l.
[0008]
At this time, the viewpoint CiThe point Q on the subject 2 photographed by the camera placed on the projection plane L0Projected to the upper point Q '. Therefore, when the virtual viewpoint image is generated, the point Q on the subject 2 becomes the virtual viewpoint P and the projection plane L as shown in FIGS. 22 (a) and 22 (b).0It is displayed at the point PP1 where the straight line connecting the upper point Q 'and the image plane PP of the virtual viewpoint image intersect.
[0009]
However, when the point Q on the subject 2 is actually viewed from the virtual viewpoint P, the point Q is a point on the image plane PP as shown in FIGS. 22 (a) and 22 (b). A difference of Δp is generated between the point PP1 and the point PP1.
[0010]
At this time, the viewpoint C of the camera on the xy plane with Z = 0.iThe following relationship is established between the distance vector Δr of the ray connecting the virtual viewpoint P and the point Q ′ on the projection plane and the point shift Δp on the image plane PP.
[0011]
[Expression 1]
Δp = k (l0) Δr
Here, k (l0) Is defined as, for example, Equation 2 below.
[0012]
[Expression 2]
Figure 0003971714
[0013]
That is, one projection plane (L0), The constant l0On the other hand, the error given by Equation 1 and Equation 2 occurs on the image plane PP of the virtual viewpoint image.
At this time, if the range (distance) in the depth direction of the subject 2 is large, the projection plane L0The error of the point on the subject 2 that is away from the object becomes large. Therefore, there is a problem that it is difficult to generate a wide range of virtual viewpoint images.
[0014]
Therefore, in recent years, as a method capable of generating a wide range of virtual viewpoint images, a method of texture mapping a captured image on a plurality of projection surfaces having a multilayer structure has been proposed (for example, Japanese Patent Application No. 2002-318343). Issue).
[0015]
In the method of setting the plurality of projection planes, the viewpoint C of the cameraiDistance l from (Z = 0) to projection plane0Is considered a variable and some projection plane LjFrom among (j = 1, 2,..., M), a projection plane at a distance that minimizes the error on the image plane PP given by the formulas 1 and 2 is selected, and a point Q on the subject 2 is selected. Project.
[0016]
At this time, when the point Q on the subject is, for example, as shown in FIG.0FrontProjection plane LFrontAnd l0BackProjection plane LBack, The point Q is projected (texture mapping) on the projection plane with the smaller shift Δp on the image plane PP of the virtual viewpoint image. Therefore, the coefficient k given by Equation 2 is Equation 3 or Equation 4 below.
[0017]
[Equation 3]
k (l0Front) <0
[0018]
[Expression 4]
k (l0Back)> 0
[0019]
That is, the point Q on the subject is moved to the front projection plane L.FrontTexture mapping to the rear projection plane LBackDepending on whether texture mapping is performed, the sign of the coefficient k changes.
[0020]
At this time, the direction of the positional deviation Δp on the image plane PP of the virtual viewpoint image is reversed depending on which point the point Q on the subject at the intermediate point of each projection plane is texture mapped to. Therefore, there are portions where the projection plane to be texture-mapped is separated from the front and the rear, and a gap is generated in the generated image, the size of which is proportional to the size | Δr | of Δr.
[0021]
Here, when Equation 1 is divided into a component in the X-axis direction and a component in the Y-axis direction, Equations 5 and 6 below are obtained.
[0022]
[Equation 5]
Δpx= K (l0) Δrx
[0023]
[Formula 6]
Δpy= K (l0) Δry
[0024]
At this time, the viewpoint C of the cameraiFor example, the interval ε in the X-axis directionxIf it is arranged in the appropriate viewpoint CiBy selecting and using an image shot with a camera of | Δrx| ≦ εx/ 2, and ΔpxCan be within a certain range.
[0025]
Similarly, the viewpoint C of the cameraiFor example, the interval ε in the Y-axis directionyIf it is arranged in the appropriate viewpoint CiBy selecting and using an image shot with a camera of | Δry| ≦ εy/ 2, and ΔpyCan be within a certain range.
[0026]
[Non-Patent Document 1]
Marc Levoy and Pat Hanrahan: "Light Field Rendering," SIGGRAPH'96 Conference Proceedings, pp.34-41, 1996
[Non-Patent Document 2]
Steven J. Gortler et al.:"The Lumigraph, "SIGGRAPH'96 Conference
Proceedings, pp.43-54, 1996
[Non-Patent Document 3]
Akihiro Katayama et al .: "View-following stereoscopic image display method by interpolation and reconstruction of multi-viewpoint images", IEICE Journal, Vol.J79-DII, No.5, pp.803-811, 1996
[Non-Patent Document 4]
Yutaka Kunida et al .: "Real-time system for generating arbitrary viewpoint images using multi-camera", IEICE Journal, Vol.J84-DII, No.1, pp.129-138, 2001
[0027]
[Problems to be solved by the invention]
However, the plurality of projection planes L described in the above prior artjIn the method of generating a virtual viewpoint image by setting (j = 1, 2,..., M), for example, the projection plane LjAnd projection plane Lj + 1If there is no texture image between, a gap is generated in the generated virtual viewpoint image. Therefore, there is a problem that the generated virtual viewpoint image is deteriorated.
[0028]
The camera (viewpoint Ci) Is sufficiently large, the gap generated in the virtual viewpoint image can be made inconspicuously small. However, the arrangement density of the cameras is limited. In addition, by increasing the array density of the cameras, it takes longer time to acquire images taken by the cameras and more time to generate the virtual viewpoint image, making it difficult to generate images at the real time level. There was also a problem. In addition, if the arrangement density of the cameras is increased, there is a problem that the installation cost increases because the system becomes larger correspondingly.
[0029]
In addition, when the virtual viewpoint image generation device is used in, for example, a video conference system or the like, the user's viewpoint (virtual viewpoint) often moves in the horizontal direction of the image, and does not move in the vertical direction. I don't do much. Thus, when the moving direction of the viewpoint is mainly one direction, an increase in installation cost can be suppressed by arranging the cameras one-dimensionally.
[0030]
The camera (viewpoint Ci) In a one-dimensional manner, for example, in the X-axis direction in which the cameras are arranged, in the X-axis direction in which the cameras are arranged, by using the arrangement interval of the cameras or images taken with an appropriate camera, the virtual Positional deviation Δp on the image plane PP of the viewpoint imagexCan be kept within a certain range.
[0031]
However, since there is no room for selecting an appropriate image in the Y-axis direction where the cameras are not arranged, the magnitude of the distance vector | Δry| Has a large value around the angle of view, that is, at the edge of the image. Therefore, as shown in FIG. 24, the virtual viewpoint image has a problem that a gap that is seen when scanning in the Y-axis direction where the camera is not arranged becomes large.
[0032]
An object of the present invention is to provide a technique capable of preventing a gap from being generated in a direction in which the cameras are not arranged when generating a virtual viewpoint image from an image taken by a camera arranged one-dimensionally. There is to do.
Another object of the present invention is a program capable of preventing a gap from occurring in a direction in which the camera is not arranged when generating a virtual viewpoint image from an image photographed by a one-dimensionally arranged camera. And providing a recording medium.
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
[0033]
[Means for Solving the Problems]
The outline of the invention disclosed in the present application will be described as follows.
[0034]
(1) a step of acquiring images of a subject photographed by a plurality of cameras arranged along a straight line or a curve on the same plane; a step of obtaining depth information of the subject; A virtual viewpoint), and texture mapping the subject image onto a projection plane to generate an image when the subject is viewed from the virtual viewpoint (hereinafter referred to as a virtual viewpoint image). And generating the virtual viewpoint image includes a first step of setting a projection plane group composed of a plurality of projection planes and one projection plane, and A second step of setting a region to which the subject image is pasted on the projection plane; and texture mapping of the subject image to each projection plane of the projection plane group A third step for obtaining a point on the image of the subject corresponding to the point on the virtual viewpoint image, and a point on the virtual viewpoint image when the image of the subject is texture-mapped to the one projection plane. A fourth step of obtaining a point on the subject image corresponding to the component, and a component in the direction in which the cameras are arranged at the point on the subject image obtained using the projection plane group on the subject image And color information of a point consisting of a component on the image of the subject obtained using the one projection plane in a direction in which the camera is not arranged is transferred to a point on the virtual viewpoint image. A virtual viewpoint image generation method characterized by comprising steps.
[0035]
According to the means of (1), the component in the direction in which the camera is not arranged of the point on the virtual viewpoint image is obtained from the one projection plane. Therefore, although an error in positional deviation occurs on the image plane of the virtual viewpoint image, it continuously changes over the entire image plane, so when the virtual viewpoint image is scanned in a direction in which the camera is not arranged. It is possible to prevent the visible gap from becoming large.
[0036]
In addition, since the component in the direction in which the cameras are arranged is obtained from the plurality of projection planes, it is possible to reduce an error in positional deviation of the virtual viewpoint image on the image plane. Therefore, one-dimensional, in other words, it is possible to reduce the deterioration of the virtual viewpoint image generated from the images photographed by the cameras arranged along the straight line or the curve on the same plane.
[0037]
At this time, for example, the camera may be in a state arranged along a straight line or a curve on the same plane, and the image of the subject may be taken by a camera arranged in a straight line, You may image | photograph with the camera arranged in the arc. Further, the intervals of the arrangement of the cameras may be equal intervals or irregular intervals.
[0038]
(2) In the means of (1), the fourth step includes a step of back projecting the image of the subject onto a projection surface of the projection surface group, a step of securing a two-dimensional array for texture mapping, The step of associating the coordinates of the vertices of the image back-projected on the projection plane with the coordinates of the two-dimensional array, the projection plane of the one projection plane and the projection plane group, and the positional relationship of the virtual viewpoint And enlarging or reducing the back-projected image on the projection plane.
[0039]
According to the means of (2) above, by enlarging or reducing the backprojected image on the projection surface of the projection surface group, the image of the projection surface of the projection surface group is backprojected onto the one projection surface. The image can be made to appear as if it were an image.
[0040]
Therefore, each projection plane can be structured to be expressed in a three-dimensional space. For example, a high-speed virtual viewpoint image generation process can be performed using a general-purpose three-dimensional library such as OpenGL or DirectX. Can do.
[0041]
(3) subject image acquisition means for acquiring images of a subject photographed by a plurality of cameras arranged along a straight line or a curve on the same plane; depth information acquisition means for acquiring depth information of the subject; Image generating means for texture-mapping an image of a subject on a projection plane and generating an image (hereinafter referred to as a virtual viewpoint image) when the subject is viewed from an arbitrary viewpoint (hereinafter referred to as a virtual viewpoint); In the virtual viewpoint image generation device, the image generation unit includes a projection plane group including a plurality of projection planes, a projection plane setting unit that sets one projection plane, and the projection plane of the projection plane group. Based on the pasting area setting means for setting the area where the subject image is pasted, the projection plane set by the projection plane setting means, and the pasting area set by the pasting area setting means, the subject A rendering unit that texture-maps an image to the projection plane and converts the image into the virtual viewpoint image, and the rendering unit texture-maps the image of the subject to each projection plane of the projection plane group; A first corresponding point calculating means for obtaining a point on the image of the subject corresponding to a point on the virtual viewpoint image; and when the image of the subject is texture-mapped on the one projection plane, Second corresponding point calculating means for obtaining a point on the image of the subject corresponding to the point, and the camera of the point on the image of the subject obtained using the projection plane group on the image of the subject. Color information of a point consisting of a component in a certain direction and a component in a direction in which the camera is not arranged at a point on the image of the subject obtained using the one projection plane, A virtual viewpoint image generation apparatus and a color information transfer means for transferring the point above.
[0042]
The means (3) is an apparatus for generating the virtual viewpoint image using the virtual viewpoint image generation method of the means (1). Therefore, by providing each of the above means, even when the cameras are arranged one-dimensionally, it is possible to reduce the gap that is seen when the virtual viewpoint image is scanned in the direction in which the cameras are not arranged. . Further, the direction in which the cameras are arranged can reduce the positional deviation on the image plane. Therefore, the deterioration of the virtual viewpoint image can be reduced.
[0043]
(4) In the means of (3), the second corresponding point calculating means secures a back projection means for back projecting the image of the subject onto the projection plane of the projection plane group, and a two-dimensional array for texture mapping. Texture arrangement securing means, associating means for associating the coordinates of the vertices of the image back-projected on the projection plane and the coordinates of the two-dimensional array, the projection plane of the one projection plane and the projection plane group, And scale changing means for enlarging or reducing the backprojected image on the projection plane based on the positional relationship of the virtual viewpoint.
[0044]
According to the means of (4), the second corresponding point calculating means includes the respective means so that an image back-projected onto the projection plane of the projection plane group is back-projected onto the one projection plane. The image can be made to appear as if it were an image.
[0045]
For this reason, each projection plane can be structured to be expressed in a three-dimensional space. For example, a general-purpose three-dimensional library such as OpenGL or DirectX can be used to support commercially available graphics hardware and libraries. High-speed generation processing of the virtual viewpoint image can be performed by software (driver).
[0046]
(5) A virtual viewpoint image generation program for causing a computer to execute each step of the virtual viewpoint image generation method of the means (1) or (2).
[0047]
According to the means (5), it is possible to cause the computer to execute the virtual viewpoint image generation processing. Therefore, a virtual viewpoint image with little deterioration can be generated at high speed without using a dedicated device.
[0048]
(6) The virtual viewpoint image generation program of the means of (5) is a recording medium recorded in a computer-readable state.
According to the means (6), by distributing the recording medium, a virtual viewpoint image with little deterioration can be easily generated without using a dedicated device.
[0049]
Hereinafter, the present invention will be described in detail together with embodiments (examples) with reference to the drawings.
In all the drawings for explaining the embodiments, parts having the same function are given the same reference numerals and their repeated explanation is omitted.
[0050]
DETAILED DESCRIPTION OF THE INVENTION
Example 1
1 and 2 are schematic diagrams showing a schematic configuration of a virtual viewpoint image generation device according to a first embodiment of the present invention, FIG. 1 is a block diagram showing the configuration of the device, and FIG. 2 uses the virtual viewpoint image generation device. It is a figure which shows the structural example of the installed system.
[0051]
1 and 2, 1 is a virtual viewpoint image generation device, 101 is a subject image acquisition unit, 102 is depth information acquisition unit, 103 is a virtual viewpoint setting unit, 104 is an image generation unit, 104a is a projection plane determination unit, 104b. Is a pasting area setting means, 104c is a rendering means, 2 is a subject, 3 is a camera, 4 is depth information measurement means, 5 is a virtual viewpoint input means, 6 is an image display means, and 7 is a user.
[0052]
As illustrated in FIG. 1, the virtual viewpoint image generation apparatus 1 according to the first embodiment includes a subject image acquisition unit 101 that acquires an image of a subject 2 and depth information acquisition that acquires depth information (surface shape) of the subject 2. Means 102, virtual viewpoint setting means 103 for setting the viewpoint of the image to be generated (hereinafter referred to as a virtual viewpoint), and the image of the subject 2 and the depth information of the subject 2 viewed from the virtual viewpoint. The image generating unit 104 generates an image (hereinafter referred to as a virtual viewpoint image).
[0053]
In addition, the image generation unit 104 includes a projection plane setting unit 104a that sets a projection plane from the depth information of the subject 2 and the virtual viewpoint, and the subject on the projection plane based on the depth information of the subject 2. Image of the subject 2 based on the pasting area setting means 104b for setting the area where the second image is pasted, the projection plane set by the projection plane setting means 104a, and the pasting area set by the pasting area setting means 104b. Is attached to the projection plane (texture mapping) and converted into the virtual viewpoint image.
[0054]
In the first embodiment, the image of the subject 2 is, for example, as shown in FIGS. 1 and 2, in which the four cameras 3 are arranged one-dimensionally, in other words, in a line in one direction. The images are arranged and arranged at intervals, and are acquired by the subject image acquisition means 101. Here, the space in which the cameras 3 are arranged is a three-dimensional space in which the camera arrangement direction is the X axis as shown in FIG. In FIG. 1 and FIG. 2, four cameras are arranged in the first embodiment. However, the number of cameras is not necessarily four, and N cameras (N is an integer of 2 or more) are included. It only needs to be arranged in one direction.
[0055]
Further, the depth information of the subject 2 is measured by the depth information measuring unit 4 installed in the vicinity of the camera 3 and acquired by the depth information acquiring unit 102, for example, as shown in FIGS. . For the depth measuring means 4, for example, a measuring device using a TOF (Time Of Flight) method is used. Further, instead of the depth measuring means 4, a camera capable of taking an image (color information) of the subject 2 and measuring the surface shape may be used as one of the cameras 3.
[0056]
The virtual viewpoint setting unit 103 sets the position, direction, angle of view, etc. of the virtual viewpoint based on information input from the virtual viewpoint input unit 5 such as a mouse or a keyboard. At this time, the virtual viewpoint can be set at any position, not limited to the position where the camera 3 is placed, as long as it is within the range allowed by the virtual viewpoint setting means 103.
[0057]
An image generated by the virtual viewpoint image generation device 1 (hereinafter referred to as a virtual viewpoint image) is displayed by image display means 6 such as a CRT display or a liquid crystal display, for example.
[0058]
3 to 6 are schematic diagrams for explaining the principle of the virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment. FIG. 3 is a flowchart of the entire processing, and FIGS. FIG. 5 is a diagram for explaining a projection plane setting method, and FIG. 6 is a diagram for explaining a color information transfer method.
[0059]
When the virtual viewpoint image is generated using the virtual viewpoint image generation apparatus according to the first embodiment, a technique called IBR (Image-Based Rendering) is used. The IBR performs texture mapping of a part of the image acquired by the subject image acquisition unit 101 on a projection plane set in a three-dimensional space on a computer, and the projection plane is determined from a virtual viewpoint set by the virtual viewpoint setting unit 103. This is a method of generating a viewed image by coordinate calculation processing.
[0060]
When a virtual viewpoint image is generated by the IBR using the virtual viewpoint image generation apparatus according to the first embodiment, first, as shown in FIG. 3, the virtual viewpoint P, that is, the viewpoint position, direction, and image of the generated image are displayed. A corner or the like is set (step 801). The position, direction, angle of view, etc. of the virtual viewpoint P are set by the virtual viewpoint setting means 103 based on information input from the virtual viewpoint input means 5.
[0061]
Next, for example, a projection plane is set on a three-dimensional space assumed on the computer (step 802). The projection plane is set by a projection plane setting unit 104 a provided in the image generation unit 104 of the virtual viewpoint image generation apparatus 1.
[0062]
In the case where the virtual viewpoint image generation device 1 according to the first embodiment is used, in the step 802 (projection plane setting unit 140a), for example, as shown in FIG.jA projection plane group consisting of (j = 1, 2,..., M) and one projection plane L as shown in FIG.*The two types of projection planes are set. The projection plane group and the one projection plane L*The setting method will be described later.
[0063]
After the two types of projection planes are set in the step 802 (projection plane setting means 104a), the image of the subject 2 on each projection plane of the projection plane group is then set by the pasting area setting means 104b. Area U to pasteijIs set (step 803). Region U for pasting the subject imageijThe setting method will be described later.
[0064]
Thereafter, the rendering unit 104c generates an image when the subject is viewed from the virtual viewpoint image P (step 804).
[0065]
At this time, in step 804 (rendering means 104c), first, when texture mapping is performed on the subject image on the projection plane group, the image of the subject corresponding to a point on the image plane PP of the virtual viewpoint image is displayed. Find a point on the image plane. At this time, the point (x, y) on the image plane PP of the image viewed from the virtual viewpoint P is the projection plane L of the projection plane group as shown in FIG.jIt corresponds to the upper point (X, Y, Z) and the projection plane LjThe upper point (X, Y, Z) has viewpoint CiThe image plane CP of the image of the subject 2 photographed by the camera 3 arranged iniTop point (xi, yi) Is pasted.
[0066]
Next, the one projection plane L*, The viewpoint C corresponding to the same point (x, y) on the image plane PP of the virtual viewpoint imageiThe image plane CP of the image of the subject 2 photographed by the camera 3 arranged iniTop point (xi *, yi *)
[0067]
Image plane CP of the image of subject 2iEach point above (xi, yi), (Xi *, yi *), For example, the points (X, Y, Z), (X when the point (x, y) of the virtual viewpoint image PP is back-projected onto the projection plane.*, Y*, Z*) Is the image plane CP of the image of the subject 2iProject to.
[0068]
In general, from a point (X, Y, Z) in a three-dimensional space, such as a point on the projection plane, an image plane CP of the subject image.iA point on a two-dimensional plane (xi, yi) Can be expressed by a determinant as shown in Equation 7 below.
[0069]
[Expression 7]
Figure 0003971714
[0070]
Here, s on the left side of Equation 7 is an auxiliary coefficient. In addition, Φ in Equation 7 is a transformation matrix, which is given by a 3 × 4 matrix as shown in Equation 8 below.
[0071]
[Equation 8]
Figure 0003971714
[0072]
At this time, for example, a matrix Φ representing the perspective projection transformation with the focal length f centered on the origin0Is given by Equation 9 below.
[0073]
[Equation 9]
Figure 0003971714
[0074]
On the other hand, when a point (x, y) on a two-dimensional plane such as a point on the image plane of the virtual viewpoint image is back-projected to a point (X, Y, Z) on the three-dimensional space, There are an infinite number of points that satisfy Equations 7 and 8. Among them, when back projection is performed on the projection plane set in the three-dimensional space, if the expression representing the projection plane is aX + bY + cZ + d = 0, the vector expression can be expressed as the following Expression 10.
[0075]
[Expression 10]
Figure 0003971714
[0076]
Here, the mathematical formula 7, the mathematical formula 8, and the mathematical formula 10 are summarized as the following mathematical formula 11.
[0077]
## EQU11 ##
Figure 0003971714
[0078]
Therefore, when the equation 11 is solved for (X, Y, Z), the point (x, y) on the image plane PP of the virtual viewpoint image is represented by the projection plane L.jYou can backproject to the upper point (X, Y, Z). Here, if the matrix of 4 rows and 4 columns on the right side of Equation 11 has an inverse matrix, Equation 11 can be expressed as Equation 12 below by setting s ′ = 1 / s. LjThe upper point (X, Y, Z) is determined.
[0079]
[Expression 12]
Figure 0003971714
[0080]
Viewpoint CiImage plane CP of the image taken with the camera installed iniTop point (xi, yi) And point (xi *, yi *) Is calculated using the projection plane group (xi, yi) In the direction in which the cameras are arranged, and the point (xi *, yi *) Is regarded as a point corresponding to a point (x, y) on the image plane PP of the virtual viewpoint image, and color information is transferred. At this time, if the direction in which the cameras are arranged is the X-axis direction of the three-dimensional space, and the direction in which the cameras are not arranged is the Y-axis direction, as shown in FIG.i, yi) X component (xi) And point (xi *, yi *) Y component (yi *) (Xi, yi *) Color information is transferred to the point (x, y) on the image plane PP of the virtual viewpoint image.
[0081]
Further, the image photographed by the camera and the virtual viewpoint image are so-called digital images, and the position and color information of pixels having a finite area are represented by a two-dimensional array on the memory. Here, the coordinate system (u, v) indicating the position of the pixel array is referred to as a digital image coordinate system.
[0082]
At this time, for example, if the size of the virtual viewpoint image is 640 pixels × 480 pixels, the position of each pixel constituting the virtual viewpoint image is a variable u that takes any integer value from 0 to 639. And a variable v taking any integer value from 0 to 479. The color information of each pixel is represented by data obtained by quantizing information of red (R), green (G), and blue (B) at the address (u, v) of the pixel with 8 bits or the like. .
[0083]
At this time, the digital image coordinates (u, v) and the normal image coordinates (x, y) are associated with each other in one-to-one relationship, and for example, there is a relationship represented by Equation 13 below.
[0084]
[Formula 13]
Figure 0003971714
[0085]
In Equation 13, the x axis and the u axis are parallel, and the unit length of the u axis and the v axis is k based on the (x, y) coordinate system.u, KvAnd the angle between the u axis and the v axis is θ.
[0086]
When writing and reading information of each pixel of the two-dimensional array, the digital image coordinate system (u, v) takes discrete values, but in the following description, it takes continuous values unless otherwise noted. It is assumed that an appropriate discretization process is performed when accessing the information of each pixel.
[0087]
In addition, in the coordinate conversion between the digital image coordinates and the image coordinates, it is possible to perform conversion in consideration of, for example, lens distortion in addition to the relationship of Expression 13.
[0088]
In this way, the image plane CP of the image taken by the cameraiTop point (xi, yi *) Corresponding to the pixel (ui, vi) Color information is extracted, and the extracted color information is transferred to a pixel (u, v) corresponding to a point (x, y) on the image plane PP of the virtual viewpoint image, a virtual viewpoint image is obtained. It is done.
[0089]
Hereinafter, a method for generating a virtual viewpoint image using the virtual viewpoint image generating apparatus according to the first embodiment will be described in detail including the method for setting the projection plane and the pasting area.
[0090]
7 to 12 are schematic diagrams for explaining a method for generating a virtual viewpoint image using the virtual viewpoint image generating apparatus according to the first embodiment, and FIG. 7 is a diagram for explaining a method for setting a plurality of projection planes. 8A, FIG. 8B, FIG. 9A and FIG. 9B are diagrams for explaining a method for setting the pasting area, and FIG. 10 is an image viewed from the virtual viewpoint P. FIG. 11 (a) and FIG. 11 (b) are diagrams for explaining the step of transferring color information, and FIG. 12 is a diagram showing an example of the generated virtual viewpoint image. It is.
[0091]
In order to generate the virtual viewpoint image using the virtual viewpoint image generation apparatus 1 according to the first embodiment, first, the subject image acquisition unit 101 acquires the image of the subject 2 and the depth information acquisition unit 102. To obtain the depth information of the subject 2.
[0092]
At this time, the image of the subject 2 is captured and acquired by the N cameras 3 arranged one-dimensionally. At this time, the camera 3i(I = 1, 2,..., N) are arranged so as to be aligned on a straight line (on the X axis), for example, as shown in FIG.
[0093]
Further, the depth information of the subject 2 is measured and acquired by the depth information measuring device 4 installed in the vicinity of the camera 3.
[0094]
In order to generate the virtual viewpoint image in a state where the image of the subject and the depth information are acquired, first, as shown in FIG. 3, the position, direction, angle of view, etc. of the virtual viewpoint P are set (step) 801). The step 801 is performed by the virtual viewpoint setting unit 103, and information necessary for determining the virtual viewpoint P is input from the virtual viewpoint input unit 5.
[0095]
At this time, if an input device such as a mouse or a keyboard is used as the virtual viewpoint input means 5, the user 7 directly receives information on the virtual viewpoint P while viewing the image display means (display) 6. Can be set to
[0096]
Further, as the virtual viewpoint input means 5, for example, if a sensor arranged around a user or a sensor attached to the user 7 is used, the position of the user 7 is detected and the virtual viewpoint P is determined. It can also be set.
[0097]
Further, if another device or computer program is used as the virtual viewpoint input means 5, the virtual viewpoint P can be automatically set.
[0098]
Once the position of the virtual viewpoint P is set, a projection plane on which the subject image is pasted is set in a three-dimensional space (step 802). Step 802 is performed by the projection plane setting means 104a. At this time, in the step 802, for example, as shown in FIGS.jA projection plane group consisting of (j = 1, 2,..., M) and one projection plane L*Set.
[0099]
In the first embodiment, in order to simplify the description, the three-dimensional space for setting the projection plane is, for example, the camera 3 (viewpoint C as shown in FIGS. 4 and 5.i) Is the X-axis direction, and the non-arranged direction is the Y-axis direction. Also, each projection plane Lj, L*Is assumed that the normal direction is parallel to the Z-axis. At this time, as shown in FIGS. 4 and 5, the Z-axis is in the direction from each projection plane toward the camera 3, and the projection plane LjSet distance is Z = -lj, The projection plane L*Set distance is Z = -l*It will be expressed as
[0100]
At this time, the projection plane L of the projection plane groupjIs set to satisfy the following conditions, for example.
[0101]
When an image partially extracted from the image of the subject is pasted on the projection plane as in the first embodiment, for example, the viewpoint C of the cameraiIf an actual distance from a certain plane (hereinafter referred to as a camera installation plane) 8 to a point on the subject 2 is different from a distance from the camera installation plane 8 to the projection plane, an error occurs on the generated image. . Therefore, the maximum value of error allowed to satisfy the accuracy required for the virtual viewpoint image is assumed to be δ.
[0102]
At this time, a point on the subject 2 at a distance l from the camera installation surface 8 is the projection plane L.jIf the distance l satisfies the conditions expressed by the following formula 1, formula 2, and formula 3, the point on the subject at the position of the distance l and the projection plane LjIt is guaranteed that the error of the upper point is smaller than the maximum value δ.
[0103]
[Expression 14]
Figure 0003971714
[0104]
[Expression 15]
Figure 0003971714
[0105]
[Expression 16]
Figure 0003971714
[0106]
In Equation 14, fljAnd bljIs the projection plane LjAnd the distance l from the camera installation surface 8 is fl in the subject image.jTo bljA point (part) between the image projection plane LjIs pasted.
[0107]
In Equations 15 and 16, ZPIs the distance from the camera installation surface 8 to the virtual viewpoint P, f is the focal length of the camera, ε is the camera installation interval, and δ is the maximum allowable error. At this time, the position of the virtual viewpoint P is determined with respect to the projection plane L with respect to the camera installation plane 8.jIt is assumed that the direction is opposite to the direction in which is provided. Further, the image of the subject and the projection plane LjThe mapping between is a perspective projection.
[0108]
At this time, the projection plane LjOf these, the projection plane L closest to the camera installation plane 81In the pasted image (point), when the actual point on the subject 2 is within the depth range given by the equation 1, the projection plane L1The position error above can be made smaller than the maximum value δ. Therefore, each projection plane LjOn the other hand, the virtual viewpoint image can be generated within a certain error range by setting the condition of the mathematical expression 14 and arranging the conditions so as to cover the entire depth range in which the subject 2 exists.
[0109]
The fljAnd blj, And from the camera installation surface 8 to the projection surface LjDistance tojIs set, first, for example, as shown in FIG. 7, the minimum value lmin of the depth information is set to fl.1And At this time, the projection surface L1Distance l1Will be determined. The projection plane L1Distance l1Is determined, the above formula 16 shows bl1Is decided.
[0110]
Next projection plane L2, As shown in FIG.2= Bl1And the projection plane L using Equation 15 and Equation 162Distance l2And bl2Decide.
[0111]
Hereinafter, sequentially flj + 1= BljRepeat the calculation asjUntil the projection surface L becomes larger than the maximum value lmax of the depth information of the subject 2 or becomes infinite.jWill be set.
[0112]
For the minimum value lmin and the maximum value lmax of the depth information of the subject, instead of using the depth information acquired by the depth information acquisition unit 102, for example, a depth range in which the subject 2 moves is assumed in advance, and the information May be used.
[0113]
The projection plane LjIn this setting method, the setting process may be performed every time the virtual viewpoint P is updated, or the range in which the virtual viewpoint P moves is limited in advance, and the allowable error is limited within the limited range. The maximum value δ may be set based on the severest (small) value.
[0114]
Further, the projection plane L with respect to the direction in which the cameras are not arranged (Y-axis direction)*Is, for example, the projection plane L with respect to the X-axis direction.jSet to match one of In addition, for example, the projection plane L with respect to the X-axis direction is used.jThe set distance may be set to an average distance.
[0115]
In addition, the method using the said Formula 14 thru | or Formula 16 is each projection surface L of the said projection surface group.jThis is an example of the setting method, and can be set by other methods.
[0116]
Each projection plane Lj, L*Are set, next, the image of the subject is displayed on each projection plane L.j, L*Each texture plane Lj, L*Above, viewpoint CiAn area shared by an image captured by the camera, in other words, each projection plane Lj, L*A region (hereinafter referred to as a pasting region) U on which the subject image is pastedijIs set (step 803).
[0117]
The pasting area UijFirst, for example, as shown in FIG. 8A, the viewpoint C is set.iVoronoi region ViAnd the Voronoi region V around the virtual viewpoint PiProjection plane LjProjected area WijAsk for. On the other hand, as shown in FIG.iProjection plane L when measured fromjSharing area SijAsk for.
[0118]
The pasting area Uij9 (a) and 9 (b), the region WijAnd the sharing area SijIs given by Equation 17 below.
[0119]
[Expression 17]
Uij= Wij∩Sij
Note that the setting method as shown in FIGS. 9A and 9B and Equation 17 is applied to the pasting region U.ijThis is an example of the setting method, and can be set by other methods.
[0120]
Projection plane Lj, L*And the pasting area UijWhen the above setting is completed, the virtual viewpoint image is generated (step 804).
[0121]
The virtual viewpoint image is, for example, a digital image having w pixels in the horizontal (u-axis) direction and h pixels in the vertical (v-axis) direction. Therefore, the virtual viewpoint image can be generated by obtaining color information at each pixel (u, v) of the digital image. At this time, the color information of each pixel (u, v) represents, for example, each color of R (red), G (green), and B (blue) as an 8-bit value.
[0122]
In order to generate the virtual viewpoint image, as shown in FIG. 10, first, variables u and v indicating pixels (u, v) of the virtual viewpoint image, the projection plane LjJ, the camera viewpoint CiAre initialized (steps 804a, 804b, and 804c). At this time, the variables u and v are set to u = 0 and v = 0, for example. Further, the variable i and the variable j are, for example, i = 1 and j = 1, respectively.
[0123]
Next, a point (x, y) on the image plane PP of the virtual viewpoint image corresponding to each pixel (u, v) of the virtual viewpoint image is obtained (step 804d). The point (x, y) on the image plane PP is obtained based on the equation 13, for example.
[0124]
Next, the point (x, y) on the image plane PP of the virtual viewpoint image is set as the projection plane L of the projection plane group.jTo the projection plane L corresponding to the point (x, y) on the image plane PP.jThe upper point (X, Y, Z) is obtained (step 804e). Projection plane LjThe upper point (X, Y, Z) is obtained based on, for example, the formula 11.
[0125]
Next, the projection plane LjThe upper point (X, Y, Z) is the viewpoint CiThe projection plane L of the image taken by the camerajSticking area Uij(Step 804f). Here, the pasting region UijIf it is included, the process proceeds to the next step 804g. In addition, the pasting area UijIf not included, the subsequent steps are skipped and the process proceeds to step 804l.
[0126]
Projection plane LjThe upper point (X, Y, Z) is the pasting area UijIn the next step 804g, the point (x, y) on the image plane PP of the virtual viewpoint image is converted into the one projection plane L.*Back-projected onto the point (X, y) corresponding to the point (x, y)*, Y*, Z*) Projection plane L*Back projection onto the projection plane LjIn the same manner as the backprojection to the image, the above equation 11 may be used.
[0127]
Next, the projection plane LjView point C (X, Y, Z)iImage plane CP of the image taken with the cameraiA point (x, projected above and corresponding to the point (X, Y, Z)i, yi) Is obtained (step 804h). The projection processing in step 804h may be performed using, for example, the determinants represented by the above formulas 7 and 8, and detailed description thereof will be omitted.
[0128]
Next, the projection plane L*Top point (X*, Y*, Z*) Is the image plane CP of the subject imageiProjected above and said point (X*, Y*, Z*) (X)i *, yi *) Is obtained (step 804i). Since the projection processing in step 804i may be performed using, for example, the determinants represented by the following formulas 7 and 8, detailed description thereof will be omitted.
[0129]
Next, as shown in FIG. 6, the point (xi, yi) And the point (xi *, yi *) Of the y component (x)i, yi *) Corresponding to the viewpoint C)iImage plane CP of a digital image taken with a cameraiUpper pixel (ui, vi) Is obtained (step 804j). The step 804j may be performed based on, for example, the mathematical formula 13, and a detailed description thereof will be omitted.
[0130]
Next, as shown in FIG.iImage plane CP of a digital image taken by a camera installed iniPixels (ui, vi) Is transferred to the color information in the pixel (u, v) on the image plane PP of the virtual viewpoint image as shown in FIG. 11B (step 804k).
[0131]
Then, the viewpoint CiThe variable i is updated (step 804l), and the viewpoint C where the color information has not been transferred has been updated.iIt is checked whether there is an image photographed by the camera (step 804m). Viewpoint C where color information has not been transferrediIf there is an image of step 804e, the process returns to step 804e, and processing from step 804e to step 804k is performed.
[0132]
All viewpoints CiIf the transfer of the color information has been completed in this image, this time the projection plane LjThe variable j is updated (step 804n), and it is checked whether there is a projection plane not subjected to the above processing (step 804o). If there is a projection surface that has not been processed, the process returns to step 804c, and the processes from step 804c to step 804k are performed.
[0133]
Then, this time, the pixel (u, v) of the virtual viewpoint image is updated (step 804p), and it is checked whether processing has been performed for all the pixels (step 804q). If there is an unprocessed pixel (u, v), the process returns to step 804b and the processes from step 804b to step 804k are performed.
[0134]
When all of the above processes are completed, for example, the virtual viewpoint image as shown in FIG. 12 is obtained and displayed on the image display means 6. At this time, the Y-axis direction component of each point (pixel) of the virtual viewpoint image, that is, the component in the direction in which the camera 3 is not arranged is obtained by texture mapping on one projection plane. Therefore, the component in the Y-axis direction changes continuously over the entire image plane, and as shown in FIG. 12, when the virtual viewpoint image is scanned in the Y-axis direction, the image gap is very small. Become.
[0135]
As described above, according to the virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, the components in the direction in which the cameras are arranged at the points on the virtual viewpoint image have a plurality of projections. Surface LjThe component in the direction in which the cameras are not arranged is obtained as one projection plane L.*By using this, it is possible to prevent the generated virtual viewpoint image from generating a gap in the direction in which the camera is not arranged. Therefore, even when the cameras are arranged one-dimensionally, it is possible to reduce the deterioration of the virtual viewpoint image.
[0136]
The virtual viewpoint image generation apparatus 1 according to the first embodiment is a computer including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), an HDD (Hard Disk Drive), and the like. May be. In that case, a program that causes the computer to execute the steps of the processes shown in FIGS. 3 and 10 may be recorded in, for example, the HDD or the ROM. Further, the program may be recorded on a recording medium such as a CD-ROM instead of being recorded on the HDD or the ROM, or may be recorded on a server on the Internet, and the network such as the recording medium or the Internet. Can also be provided. Therefore, a virtual viewpoint image with little deterioration can be easily generated without using a dedicated device.
[0137]
13 and 14 are diagrams for explaining an application example of the virtual viewpoint image generation method using the virtual viewpoint image generation apparatus of the first embodiment.
[0138]
In the first embodiment, as shown in FIG.j, L*The X-axis direction and the Y-axis direction of the three-dimensional space for setting the image and the x-axis direction and the y-axis direction of the virtual viewpoint image have been described as examples, but actually, FIG. 13 and FIG. As shown in FIG. 3, the X-axis direction and the Y-axis direction of the three-dimensional space may not coincide with the x-axis direction and the y-axis direction of the virtual viewpoint image. In such a case, for example, as shown in FIG. 14, an image plane that assumes an x ′ axis and a y ′ axis that coincide with the X axis direction and the Y axis direction of the three-dimensional space is assumed. In accordance with the procedure described in 1, the point (x ′, y ′) on the image plane of the virtual viewpoint image and the point (xi', (yi *) ′), The coordinates of the point (x ′, y ′) may be converted to the point (x, y).
[0139]
FIG. 15 is a diagram for explaining a modification of the virtual viewpoint image generation device according to the first embodiment.
[0140]
In the virtual viewpoint image generation apparatus according to the first embodiment, the depth information acquisition unit 102 acquires the result measured by the depth measurement unit 4, but the present invention is not limited to this. For example, as shown in FIG. The depth information may be calculated using the image acquired by the subject image acquisition unit 101. At this time, the depth information acquisition unit 102 calculates depth information by, for example, stereo matching (for example, Okutomi, Kinde, “Stereo matching using a plurality of baseline lengths”, IEICE Journal D-II, no.8, pp.1317-1327, 1992).
[0141]
(Example 2)
16 and 21 are schematic diagrams for explaining the virtual viewpoint image generation method according to the second embodiment of the present invention. FIG. 16 is a flowchart of steps for generating an image viewed from the virtual viewpoint P, and FIGS. 18 is a diagram for explaining a method for setting a projected polygon, FIG. 19 is a diagram for illustrating an example of an image in a texture array, and FIGS. 20 and 21 are diagrams for explaining a method for correcting a vertex of a projected polygon. is there.
[0142]
Since the virtual viewpoint image generation device according to the second embodiment has the same configuration as the virtual viewpoint image generation device 1 described in the first embodiment, detailed description thereof is omitted.
[0143]
In the virtual viewpoint image generation method using the virtual viewpoint image generation device 1 of the first embodiment, as shown in FIGS.jA projection plane group consisting of (j = 1, 2,..., M) and one projection plane L*These two types of projection planes were set to generate a virtual viewpoint image. This is because perspective projection conversion is performed on the assumption that there are a plurality of projection surfaces in the direction in which the cameras are arranged and that there is one projection surface in the direction in which the cameras are not arranged. There is no such geometric figure in an actual three-dimensional space. Therefore, for example, if a general-purpose three-dimensional library such as OpenGL or DirectX is used, it is difficult to handle coordinates.
[0144]
In order to generate an image from a certain viewpoint using the three-dimensional library, a number of steps are performed. Of these, especially in places where high-speed processing is required, parallel processing is performed and there are various processing methods depending on the type of library, but generally the following three processes are roughly divided.
[0145]
(1) A 3D scene setting process in which a subject is expressed as a combination of basic figures such as polygons (polygonal planes) in a 3D coordinate system, and a viewpoint position, a light source position, a texture, and the like are set.
[0146]
(2) A coordinate conversion process in which a vertex of a three-dimensional coordinate system representing a subject is converted into a viewpoint coordinate system, and is converted into a two-dimensional coordinate system of an image plane at a viewpoint position by projection conversion. At this time, vertex color calculation by light source and texture mapping, depth information calculation, and the like are also performed.
[0147]
(3) Scan conversion processing that complements and paints vertices converted to two-dimensional coordinates, and calculates the color at each pixel on the image plane. At this time, hidden surface removal processing based on the depth information is also performed here.
[0148]
When the three-dimensional library and graphics hardware are used in combination, the processing handled by the application program (software) among the three processes is only the three-dimensional scene setting process of (1), The coordinate conversion process (2) and the scan conversion process (3) are processed by graphics hardware to which the three-dimensional library corresponds.
[0149]
However, if the coordinate transformation process is left to the three-dimensional library (graphics hardware), the special coordinate transformation process as in the first embodiment cannot be performed. For this reason, the coordinate conversion process must be performed by an application program, and the processing speed (image generation speed) decreases.
[0150]
In the second embodiment, a method for generating a virtual viewpoint image using the general-purpose three-dimensional library (graphics hardware) will be described.
[0151]
Also in the virtual viewpoint image generation method of the second embodiment, first, as shown in FIG. 3, the setting of the virtual viewpoint P (step 801) and the projection plane Lj, L*(Step 802) and the pasting area U on each projection planeijEach step of setting (step 803) is performed. The steps 801, 802, and 803 may be performed as described in the first embodiment, and thus detailed description thereof is omitted.
[0152]
Next, the processing of step 804 shown in FIG. 3 is performed. In the second embodiment, first, as shown in FIG. 16, the projection plane L determined in step 802 is determined.jAbove, the viewpoint CiA polygon (polygonal plane) obtained by back-projecting the angle of view of the image plane of the image captured by the camera is set (step 804r). Hereinafter, the polygon is referred to as a projected polygon.
[0153]
At this time, for example, as shown in FIG.iImage plane CP of the image taken with the cameraiThe four corners of the angle of view at {Hi 1, Hi 2, Hi Three, Hi Four} And place them on the projection plane Lj{Gij 1, Gij 2, Gij Three, Gij Four}, This {Gij 1, Gij 2, Gij Three, Gij FourA polygon having a vertex at} is the projected polygon.
[0154]
Here, the coordinate calculation of the backprojection is performed based on the relational expression shown in Expression 12, for example, and all the cameras Ci(I = 1,2, ..., N) and all projection planes LjFor (j = 1, 2,..., M), as shown in FIG. 18, a total of i × j sets of the projection polygons and i × j × 4 vertices are set. Here, the number of vertices of the polygon that defines the angle of view of the image plane and the projection polygon is four, but the number of vertices may be three or five or more.
[0155]
Next, a two-dimensional array (texture array) for texture mapping is secured for all projected polygons (step 804s). The texture array has one viewpoint C.iOn the other hand, the number of projection planes, that is, j sets are secured, and i × j sets are secured in total.
[0156]
In each component (pixel) of the texture array, in addition to color information representing the luminances of the three primary colors of red (R), green (G), and blue (B), information (A) representing transparency generally called an alpha value Also store.
[0157]
In addition, the size of the texture array is the viewpoint CiIf the image size is the same as the size of the image taken by the camera, the memory usage can be saved the most, but depending on the type of the 3D library, the size of each side of the texture array must be a power of 2 There are conditions such as. Therefore, the texture array secures an array having a size larger than the image size of the camera. At this time, if the size of the camera image array is w × h, the size of the texture array is wt × ht (wt ≧ w, ht ≧ h). Here, for example, if the image size (w, h) of the camera is (640, 480) and the size (wt, ht) of each side of the texture array must be a power of two, The size (wt, ht) is (1024, 512).
[0158]
Further, when the image size of the camera is large and exceeds the maximum size allowed for the texture array, a plurality of texture arrays are secured by dividing the texture array into small parts.
[0159]
In this way, after securing the texture arrangement, the viewpoint CiThe images taken by the camera are transferred to the corresponding j sets of texture arrays.
[0160]
After securing the texture array, each vertex {Gij 1, Gij 2, Gij Three, Gij Four} Is associated with texture coordinates (step 804t). Here, the texture coordinates are coordinates obtained by normalizing the length of the side of the image TP used for texture mapping to 1, for example, as shown in FIG. At this time, the position of each point on the texture image TP is given by coordinate axes (s, t) taking values from 0 to 1. If the three-dimensional spatial coordinates (X, Y, Z) of each vertex and the two-dimensional texture coordinates (s, t) can be associated in step 804t, the texture mapping process is performed by the three-dimensional library. And a virtual viewpoint image can be generated by graphics hardware.
[0161]
At this time, for example, as illustrated in FIG. 19, when the camera image array is transferred in accordance with the lower left corner of the texture array, the points {H at the four corners of the camera image are transferred.i 1, Hi 2, Hi Three, Hi Four} Is (0,0), (0, h / ht), (w / wt, h / ht), and (w / wt, 0) in the texture coordinates, respectively. Further, each vertex {G of the projected polygonij 1, Gij 2, Gij Three, Gij Four} Three-dimensional coordinates and four corner points {Hi 1, Hi 2, Hi Three, Hi Four} Is obtained in the step 804r, and if this is used, each vertex {Gij 1, Gij 2, Gij Three, Gij Four} And the correspondence of the texture coordinates are obtained.
[0162]
Each vertex {G of the projected polygonij 1, Gij 2, Gij Three, Gij Four} And the texture coordinates are obtained, next, the transparency (A) of the array for storing the texture coordinates is set (step 804u). At this time, the transparency (A) of the array is determined by the pasting area U on the projection plane.ijThe area corresponding to is set to be opaque, and the other areas are set to be transparent. By setting in this way, when drawing in the three-dimensional library, the pasting region UijOnly the textures included in can be drawn.
[0163]
Next, each vertex {G of the projection polygon set in step 804r is set.ij 1, Gij 2, Gij Three, Gij Four} Is moved in a direction in which the cameras are not arranged, and the texture image on the projection plane is enlarged or reduced (step 804v).
[0164]
In the virtual viewpoint image generation method according to the second embodiment, if the same processing as in the first embodiment is performed, the projection plane group is substituted for the direction in which the cameras are not arranged (Y-axis direction). And one projection plane L*Coordinate calculation processing is performed assuming At this time, for example, as shown in FIG.jThe array (pixels) texture-mapped to the upper point G is the projection plane L*Above, point G*Is texture mapped. Therefore, the array (pixel) is drawn at the point I on the image plane PP of the image viewed from the virtual viewpoint P.
[0165]
Therefore, the projection plane LjThe Y coordinate of the point G is updated to the Y coordinate of the point G ′ so that the image is drawn at the point I on the image plane PP of the image viewed from the virtual viewpoint P.
[0166]
If such processing is performed for all the vertices of the projection polygon, the texture surrounded by the projection polygon is the projection plane L.*The correction process is performed as if it were used.
The point G ′ can be easily obtained by the following method, for example.
[0167]
First, the viewpoint C corresponding to the point GiImage plane CP of images taken withiThe upper point H is the projection plane L*Top point G*Backproject to. Next, point G*Is projected onto the point I on the image plane PP of the virtual viewpoint P. Finally, point I is projected onto the projection plane LjIs projected back to the point G ′. Here, the point G*Is calculated based on, for example, the relational expressions shown in Equations 7 and 8 above. Further, the back projection of the points G and G ′ is calculated based on, for example, the relational expression shown in Expression 12.
[0168]
20 shows an example in which the vertex of the projection polygon is enlarged, the virtual viewpoint P, the viewpoint C of the camerai, The projection plane Lj, L*Depending on the positional relationship, the vertex of the projection polygon may be reduced.
[0169]
When the projected polygon is reduced, the same processing as that for the enlargement may be performed. For example, as shown in FIG.iThe upper point H is the projection plane L*Top point G*Backprojected to point G*Is projected onto the point I on the image plane PP of the virtual viewpoint P, and then the point I is projected onto the projection plane Lj, The point G ′ is obtained. Here, the point G*Is calculated based on, for example, the relational expressions shown in Equations 7 and 8 above. Further, the back projection of the points G and G ′ is calculated based on, for example, the relational expression shown in Expression 12.
[0170]
When the processing of each step is completed, the virtual viewpoint P set in each step, each vertex of the projection polygon {Gij 1, Gij 2, Gij Three, Gij Four}, When the 3D scene consisting of the texture and texture is set in the 3D library, the coordinate conversion process and the scan conversion process are performed on the graphics hardware using the 3D library. An image at the virtual viewpoint P is generated (step 804w).
[0171]
As described above, according to the virtual viewpoint image generation method of the second embodiment, the backprojected image on the projection plane of the projection plane group is enlarged or reduced, so that The image is displayed as if the one projection plane L described in the first embodiment.*It can be made to look like a texture-mapped image. Therefore, the projection plane can be structured to be expressed in a three-dimensional space, and a virtual viewpoint image with little deterioration can be generated at high speed using a general-purpose three-dimensional library.
[0172]
The present invention has been specifically described above based on the above-described embodiments. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention. is there.
[0173]
For example, in the embodiment, as shown in FIGS. 1 and 2, for example, the image of the subject 2 is captured by the cameras 3 arranged in a straight line. However, the camera 3 is not limited to a straight line. These may be arranged in an arc shape.
[0174]
Further, the camera 3 is not limited to the linear shape or the arc shape, and may be in a state of being arranged along the one-dimensional arrangement, in other words, a straight line or a curve on one plane. That is, in the embodiment, the viewpoint C of each cameraiAre arranged on a straight line (X-axis), but are not necessarily on the X-axis.
[0175]
In the embodiment, the cameras 3 are arranged at regular intervals. However, the present invention is not limited to this, and the cameras 3 may be arranged at irregular intervals.
[0176]
【The invention's effect】
Of the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows.
[0177]
That is, when a virtual viewpoint image is generated from an image photographed by a one-dimensionally arranged camera, it is possible to prevent a gap from being generated in a direction where the camera is not arranged.
[Brief description of the drawings]
FIG. 1 is a schematic diagram illustrating a schematic configuration of a virtual viewpoint image generation device according to a first embodiment of the present invention, and is a block diagram illustrating the configuration of the device.
FIG. 2 is a schematic diagram illustrating a schematic configuration of the virtual viewpoint image generation device according to the first embodiment of the present invention, and is a diagram illustrating a configuration example of a system using the virtual viewpoint image generation device.
FIG. 3 is a schematic diagram for explaining the principle of a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, and is a flowchart of the entire process.
FIG. 4 is a schematic diagram for explaining the principle of a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, and is a diagram for explaining a projection plane setting method;
FIG. 5 is a schematic diagram for explaining the principle of a virtual viewpoint image generation method using the virtual viewpoint image generation device according to the first embodiment, and is a diagram for explaining a projection plane setting method;
FIG. 6 is a schematic diagram for explaining the principle of a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, and is a diagram for explaining a color information transfer method;
7 is a schematic diagram for explaining a virtual viewpoint image generation method using the virtual viewpoint image generation device according to the first embodiment, and is a diagram for explaining a method for setting a plurality of projection planes. FIG.
FIGS. 8A and 8B are schematic diagrams for explaining a method for generating a virtual viewpoint image using the virtual viewpoint image generating apparatus according to the first embodiment, and FIGS. It is a figure for demonstrating a method.
FIGS. 9A and 9B are schematic diagrams for explaining a method for generating a virtual viewpoint image using the virtual viewpoint image generating apparatus according to the first embodiment, and FIGS. It is a figure for demonstrating a method.
FIG. 10 is a schematic diagram for explaining a virtual viewpoint image generation method using the virtual viewpoint image generation device according to the first embodiment, and shows a processing procedure of a step of generating an image viewed from the virtual viewpoint P; FIG.
FIGS. 11A and 11B are schematic diagrams for explaining a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, and FIGS. 11A and 11B transfer color information; FIGS. It is a figure for demonstrating a step.
FIG. 12 is a schematic diagram for explaining a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment, and illustrates an example of the generated virtual viewpoint image.
FIG. 13 is a diagram for explaining an application example of a virtual viewpoint image generation method using the virtual viewpoint image generation device according to the first embodiment;
FIG. 14 is a diagram for explaining an application example of a virtual viewpoint image generation method using the virtual viewpoint image generation apparatus according to the first embodiment;
FIG. 15 is a diagram for explaining a modification of the virtual viewpoint image generation device according to the first embodiment;
FIG. 16 is a schematic diagram for explaining the virtual viewpoint image generation method according to the second embodiment of the present invention, and is a flowchart of steps for generating an image viewed from the virtual viewpoint P;
FIG. 17 is a schematic diagram for explaining a virtual viewpoint image generation method according to the second embodiment of the present invention, and is a diagram for explaining a projection polygon setting method;
FIG. 18 is a schematic diagram for explaining a virtual viewpoint image generation method according to the second embodiment of the present invention, and is a diagram for explaining a projection polygon setting method;
FIG. 19 is a schematic diagram for explaining the virtual viewpoint image generation method according to the second embodiment of the present invention, and is a diagram illustrating an example of an image in a texture array.
FIG. 20 is a schematic diagram for explaining a virtual viewpoint image generation method according to the second embodiment of the present invention, and is a diagram for explaining a method for correcting a vertex of a projection polygon.
FIG. 21 is a schematic diagram for explaining the virtual viewpoint image generation method according to the second embodiment of the present invention, and is a diagram for explaining a method of correcting the vertexes of the projection polygon.
FIG. 22 is a schematic diagram for explaining a conventional image generation method when there is one projection plane.
FIG. 23 is a schematic diagram for explaining a conventional image generation method when there are a plurality of projection planes.
FIG. 24 is a schematic diagram for explaining a problem of a conventional image generation method.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Virtual viewpoint image generation apparatus, 101 ... Subject image acquisition means, 102 ... Depth information acquisition means, 103 ... Virtual viewpoint setting means, 104 ... Image generation means, 104a ... Projection plane setting means, 104b Paste area setting means, 2 ... Subject: 3 ... Camera, 4 ... Depth information measuring means, 5 ... Virtual viewpoint input means, 6 ... Image display means, 7 ... User, 8 ... Camera installation surface, Ci... Camera viewpoint, CPi... Image plane of the image taken by the camera, Lj, L*... projection plane, P ... virtual viewpoint, PP ... image plane of virtual viewpoint image.

Claims (6)

同一平面上にある直線または曲線に沿って配置された複数のカメラで撮影した被写体の画像を取得するステップと、前記被写体の奥行き情報を取得するステップと、前記被写体を見る位置(以下、仮想視点と称する)を設定するステップと、前記被写体の画像を投影面にテクスチャマッピングして、前記仮想視点から前記被写体を見たときの画像(以下、仮想視点画像と称する)を生成するステップとを有する仮想視点画像生成方法であって、
前記仮想視点画像を生成するステップは、
複数の投影面からなる投影面群、及び1つの投影面を設定する第1ステップと、
前記投影面群の投影面上で、前記被写体の画像を貼り付ける領域を設定する第2ステップと、
前記被写体の画像を前記投影面群の各投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第3ステップと、
前記被写体の画像を前記1つの投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第4ステップと、
前記被写体の画像上の、前記投影面群を用いて求めた前記被写体の画像上の点の前記カメラが配列された方向の成分と、前記1つの投影面を用いて求めた前記被写体の画像上の点の前記カメラが配列されていない方向の成分とからなる点の色情報を、仮想視点画像上の点に転写する第5ステップとを有することを特徴とする仮想視点画像生成方法。
A step of acquiring images of a subject taken by a plurality of cameras arranged along a straight line or a curve on the same plane, a step of acquiring depth information of the subject, a position where the subject is viewed (hereinafter referred to as a virtual viewpoint) And a step of texture mapping the subject image on the projection plane to generate an image when the subject is viewed from the virtual viewpoint (hereinafter referred to as a virtual viewpoint image). A virtual viewpoint image generation method,
The step of generating the virtual viewpoint image includes
A first step of setting a projection plane group consisting of a plurality of projection planes and one projection plane;
A second step of setting a region to which the subject image is pasted on the projection plane of the projection plane group;
A third step of obtaining a point on the image of the subject corresponding to a point on the virtual viewpoint image when texture mapping of the image of the subject on each projection surface of the projection surface group;
A fourth step of obtaining a point on the subject image corresponding to a point on the virtual viewpoint image when the subject image is texture-mapped on the one projection plane;
On the subject image, the component in the direction in which the cameras are arranged at the points on the subject image obtained using the projection plane group, and the subject image obtained using the one projection plane. And a fifth step of transferring the color information of the point composed of the component in the direction in which the camera is not arranged at the point to the point on the virtual viewpoint image.
前記第4ステップは、
前記被写体の画像を前記投影面群の投影面に逆投影するステップと、
テクスチャマッピング用の2次元配列を確保するステップと、
前記投影面に逆投影した画像の頂点の座標と前記2次元配列の座標の対応付けを行うステップと、
前記1つの投影面及び前記投影面群の投影面、ならびに前記仮想視点の位置関係に合わせて、前記投影面に逆投影した画像を拡大あるいは縮小するステップとを有する請求項1に記載の仮想視点画像生成方法。
The fourth step includes
Back-projecting the image of the subject onto the projection plane of the projection plane group;
Securing a two-dimensional array for texture mapping;
Associating coordinates of vertices of an image back-projected on the projection plane with coordinates of the two-dimensional array;
The virtual viewpoint according to claim 1, further comprising a step of enlarging or reducing an image back-projected on the projection plane in accordance with a positional relationship between the projection plane of the one projection plane and the projection plane group, and the virtual viewpoint. Image generation method.
同一平面上にある直線または曲線に沿って配置された複数のカメラで撮影した被写体の画像を取得する被写体画像取得手段と、前記被写体の奥行き情報を取得する奥行き情報取得手段と、前記被写体の画像を投影面にテクスチャマッピングして、任意の視点(以下、仮想視点と称する)から前記被写体を見たときの画像(以下、仮想視点画像と称する)を生成する画像生成手段とを備える仮想視点画像生成装置であって、
前記画像生成手段は、
複数の投影面からなる投影面群、及び1つの投影面を設定する投影面設定手段と、
前記投影面群の投影面上で、前記被写体の画像を貼り付ける領域を設定する貼付領域設定手段と、
前記投影面設定手段で設定した投影面、及び前記貼付領域設定手段で設定した貼付領域に基づいて、前記被写体の画像を前記投影面にテクスチャマッピングして、前記仮想視点画像に変換するレンダリング手段とを備え、
前記レンダリング手段は、
前記被写体の画像を前記投影面群の各投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第1対応点算出手段と、
前記被写体の画像を前記1つの投影面にテクスチャマッピングしたときに、前記仮想視点画像上の点と対応する前記被写体の画像上の点を求める第2対応点算出手段と、
前記被写体の画像上の、前記投影面群を用いて求めた前記被写体の画像上の点の前記カメラが配列された方向の成分と、前記1つの投影面を用いて求めた前記被写体の画像上の点の前記カメラが配列されていない方向の成分とからなる点の色情報を、仮想視点画像上の点に転写する色情報転写手段とを備えることを特徴とする仮想視点画像生成装置。
Subject image acquisition means for acquiring images of a subject photographed by a plurality of cameras arranged along a straight line or a curve on the same plane, depth information acquisition means for acquiring depth information of the subject, and image of the subject A virtual viewpoint image including image generation means for generating an image (hereinafter referred to as a virtual viewpoint image) when the subject is viewed from an arbitrary viewpoint (hereinafter referred to as a virtual viewpoint) A generating device,
The image generating means includes
A projection plane group including a plurality of projection planes, and a projection plane setting means for setting one projection plane;
Paste area setting means for setting an area to paste the image of the subject on the projection plane of the projection plane group;
Rendering means for texture-mapping the subject image on the projection plane based on the projection plane set by the projection plane setting means and the paste area set by the paste area setting means, and converting the image into the virtual viewpoint image; With
The rendering means includes
First corresponding point calculating means for obtaining a point on the image of the subject corresponding to a point on the virtual viewpoint image when texture mapping the image of the subject on each projection surface of the projection surface group;
Second corresponding point calculating means for obtaining a point on the subject image corresponding to a point on the virtual viewpoint image when the subject image is texture-mapped on the one projection plane;
On the subject image, the component in the direction in which the cameras are arranged at the points on the subject image obtained using the projection plane group, and the subject image obtained using the one projection plane. A virtual viewpoint image generating apparatus comprising: color information transfer means for transferring color information of a point consisting of a component in a direction in which the camera is not arranged at a point to a point on the virtual viewpoint image.
前記第2対応点算出手段は、
前記被写体の画像を前記投影面群の投影面に逆投影する逆投影手段と、
テクスチャマッピング用の2次元配列を確保するテクスチャ配列確保手段と、
前記投影面に逆投影した画像の頂点の座標と前記2次元配列の座標の対応付けを行う対応付け手段と、
前記1つの投影面及び前記投影面群の投影面、ならびに前記仮想視点の位置関係に合わせて、前記投影面に逆投影した画像を拡大あるいは縮小する縮尺変更手段とを備えることを特徴とする請求項3に記載の仮想視点画像生成装置。
The second corresponding point calculating means includes
Back projection means for back projecting the image of the subject onto the projection plane of the projection plane group;
Texture array securing means for securing a two-dimensional array for texture mapping;
Association means for associating the coordinates of the vertex of the image back-projected on the projection plane with the coordinates of the two-dimensional array;
The image processing apparatus includes scale changing means for enlarging or reducing an image back-projected on the projection plane in accordance with a positional relationship between the one projection plane and the projection plane group and the virtual viewpoint. Item 4. The virtual viewpoint image generation device according to Item 3.
前記請求項1または請求項2に記載の仮想視点画像生成方法の各ステップを、コンピュータに実行させるための仮想視点画像生成プログラム。A virtual viewpoint image generation program for causing a computer to execute each step of the virtual viewpoint image generation method according to claim 1 or 2. 前記請求項5に記載の仮想視点画像生成プログラムが、コンピュータで読み出し可能な状態に記録された記録媒体。A recording medium in which the virtual viewpoint image generation program according to claim 5 is recorded in a computer-readable state.
JP2003075478A 2003-03-19 2003-03-19 Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium Expired - Fee Related JP3971714B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003075478A JP3971714B2 (en) 2003-03-19 2003-03-19 Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003075478A JP3971714B2 (en) 2003-03-19 2003-03-19 Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium

Publications (2)

Publication Number Publication Date
JP2004287517A JP2004287517A (en) 2004-10-14
JP3971714B2 true JP3971714B2 (en) 2007-09-05

Family

ID=33290784

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003075478A Expired - Fee Related JP3971714B2 (en) 2003-03-19 2003-03-19 Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium

Country Status (1)

Country Link
JP (1) JP3971714B2 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006310936A (en) * 2005-04-26 2006-11-09 Sharp Corp System for generating video image viewed at optional viewpoint
JP2006352539A (en) * 2005-06-16 2006-12-28 Sharp Corp Wide-field video system
US9235920B2 (en) 2011-12-22 2016-01-12 Telefonaktiebolaget L M Ericsson (Publ) Method and processor for 3D scene representation
JP6042732B2 (en) * 2013-01-17 2016-12-14 日本電信電話株式会社 Image generation method, image generation apparatus, and image generation program
US11989820B2 (en) 2016-03-25 2024-05-21 Outward, Inc. Arbitrary view generation
US11989821B2 (en) 2016-03-25 2024-05-21 Outward, Inc. Arbitrary view generation
US10163249B2 (en) 2016-03-25 2018-12-25 Outward, Inc. Arbitrary view generation
US11972522B2 (en) 2016-03-25 2024-04-30 Outward, Inc. Arbitrary view generation
US11232627B2 (en) 2016-03-25 2022-01-25 Outward, Inc. Arbitrary view generation
KR101986433B1 (en) 2017-11-28 2019-06-05 재단법인 다차원 스마트 아이티 융합시스템 연구단 Image stitching method and system using viewpoint transformation
KR101997991B1 (en) * 2017-11-29 2019-07-08 재단법인 다차원 스마트 아이티 융합시스템 연구단 Image merging method and system using viewpoint transformation
CN113259642B (en) * 2021-05-12 2023-05-30 华强方特(深圳)科技有限公司 Film visual angle adjusting method and system

Also Published As

Publication number Publication date
JP2004287517A (en) 2004-10-14

Similar Documents

Publication Publication Date Title
JP3840150B2 (en) Image-based representation and rendering method for 3D objects and animated 3D objects
Oliveira et al. Relief texture mapping
El-Hakim et al. A multi-sensor approach to creating accurate virtual environments
US6778173B2 (en) Hierarchical image-based representation of still and animated three-dimensional object, method and apparatus for using this representation for the object rendering
US6081273A (en) Method and system for building three-dimensional object models
Newcombe et al. Live dense reconstruction with a single moving camera
JP3052681B2 (en) 3D video generation device
JPH0757117A (en) Forming method of index to texture map and computer control display system
US20130038696A1 (en) Ray Image Modeling for Fast Catadioptric Light Field Rendering
US20100085423A1 (en) Stereoscopic imaging
US20130249901A1 (en) Systems and methods for geometrically mapping two-dimensional images to three-dimensional surfaces
US7194125B2 (en) System and method for interactively rendering objects with surface light fields and view-dependent opacity
US9367943B2 (en) Seamless fracture in a production pipeline
JP3971714B2 (en) Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium
Oliveira Image-based modeling and rendering techniques: A survey
CN113345063B (en) PBR three-dimensional reconstruction method, system and computer storage medium based on deep learning
US20210398358A1 (en) Optimizations to Reduce Multi-Channel Ray Casting for Color Sampling
CN113643414B (en) Three-dimensional image generation method and device, electronic equipment and storage medium
AU2004306226B2 (en) Stereoscopic imaging
WO2020184174A1 (en) Image processing device and image processing method
JP2004234350A (en) Image processing device, image processing method, and image processing program
JPH11504452A (en) Apparatus and method for reproducing and handling a three-dimensional object based on a two-dimensional projection
JP4354708B2 (en) Multi-view camera system
Hornung et al. Interactive pixel‐accurate free viewpoint rendering from images with silhouette aware sampling
WO2023004559A1 (en) Editable free-viewpoint video using a layered neural representation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070608

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100615

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110615

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees