JP4006105B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP4006105B2
JP4006105B2 JP23911698A JP23911698A JP4006105B2 JP 4006105 B2 JP4006105 B2 JP 4006105B2 JP 23911698 A JP23911698 A JP 23911698A JP 23911698 A JP23911698 A JP 23911698A JP 4006105 B2 JP4006105 B2 JP 4006105B2
Authority
JP
Japan
Prior art keywords
image
model
light source
camera
generating
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
JP23911698A
Other languages
Japanese (ja)
Other versions
JP2000067265A (en
JP2000067265A5 (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP23911698A priority Critical patent/JP4006105B2/en
Publication of JP2000067265A publication Critical patent/JP2000067265A/en
Publication of JP2000067265A5 publication Critical patent/JP2000067265A5/ja
Application granted granted Critical
Publication of JP4006105B2 publication Critical patent/JP4006105B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、撮影された画像から作成される被写体画像と、 CG 画像を合成する画像処理に関する。
【0002】
【従来の技術】
三次元コンピュータグラフィックス(CG)システムにより、三次元の物体または複数の三次元物体を含むシーン(scene)のモデルを作成して、ユーザが移動および回転などの操作を指示することにより、CGで作成した三次元空間内を仮想的にウォークスルーできるシステムがある。
【0003】
【発明が解決しようとする課題】
しかしながら、CGを作成するには複雑な作業を必要する上、CGシステムにより作成された三次元物体(以下「三次元CG物体」と呼ぶ)の表面も一般に単一色である。これに対して、現実の物体の表面は様々な色やテクスチャに覆われている。そのため、CGで作成した三次元空間内のウォークスルーは臨場感が欠けたものになり易い。
【0004】
一方、カメラで撮影された画像(以下「カメラ画像」と呼ぶ)を、三次元CG物体の表面に貼り付けることも可能であるが、モデルの作成はさらに複雑になる。さらに、カメラ画像をその表面に貼り付けた三次元CG物体と、三次元CG物体とを同一シーン中に混在させると次の問題がある。
【0005】
CGで作成された物体に立体感をもたせるには、その物体が方向性のある光(以下「方向光」と称する)で照明されているように表示する必要があるが、カメラ画像には元もと陰影が含まれているので、カメラ画像を貼り付けた物体を方向光で照明されているように表示すると極めて不自然な画像になる。
【0006】
本発明は、撮影された画像から作成される被写体画像と、 CG 画像を合成する場合に、自然な合成画像を得ることを目的とする。
【0008】
【課題を解決するための手段】
本発明は、前記の目的を達成する一手段として、以下の構成を備える。
【0009】
本発明にかかる画像処理装置は、方向性をもたない光源モデルを設定する第一の設定手段と、方向性をもつ光源モデルを設定する第二の設定手段と、カメラによって撮影された画像データを取得する取得手段と、仮想カメラの位置を設定する第三の設定手段と、前記画像データをテクスチャ情報として使用し、前記仮想カメラの位置と前記方向性をもたない光源モデルに応じて、被写体画像を生成する被写体画像生成手段と、 CG モデル、前記仮想カメラの位置、前記方向性をもたない光源モデル、および、前記方向性をもつ光源モデルを用いて、 CG画像生成する CG 画像生成手段と、前記被写体画像と前記 CG 画像を合成した合成画像を生成する合成手段とを有することを特徴とする。
【0010】
本発明にかかる画像処理方法は、方向性をもたない光源モデルを設定するステップと、方向性をもつ光源モデルを設定するステップと、カメラによって撮影された画像データを取得するステップと、仮想カメラの位置を設定する設定ステップと、前記画像データをテクスチャ情報として使用し、前記仮想カメラの位置と前記方向性をもたない光源モデルに応じて、被写体画像を生成する被写体画像生成ステップと、 CG モデル、前記仮想カメラの位置、前記方向性をもたない光源モデル、および、前記方向性をもつ光源モデルを用いて、 CG 画像を生成する CG 画像生成ステップと、前記被写体画像と前記 CG 画像を合成した合成画像を生成する合成ステップとを有することを特徴とする。
【0011】
【発明の実施の形態】
以下、本発明にかかる一実施形態の画像処理装置を図面を参照して詳細に説明する。
【0012】
【第1実施形態】
図1は本発明にかかる第1実施形態の三次元シーンを合成し表示する画像処理装置の機能構成の一例を示すブロック図である。
【0013】
ステレオカメラ200は左右二系統の画像データを出力する。カメラパラメータ記憶部101は、ステレオカメラ200から出力された左右の画像データのカメラパラメータを記憶する。画像メモリ102および103は、ステレオカメラ200から出力された左右の画像データをそれぞれ一画面分記憶する。視差抽出部110は、画像メモリ102および103に記憶されている左右の画像データの視差分布を抽出して出力する。モデル生成部120は、視差抽出部110の出力である視差分布と、カメラパラメータ記憶部101に記憶されているカメラパラメータとから三次元シーンのモデルデータを生成して出力する。
【0014】
光源設定部130は、モデル生成部120で生成された三次元シーンのモデルデータに対する光源モデルを設定する。被写体画像生成部140は、モデル操作部150を介して入力される三次元空間上での移動および回転操作を表すデータに従い、光源設定部130により設定された光源モデル、画像メモリ102に記憶されている左画像データ、カメラパラメータ記憶部101に記憶されているカメラパラメータ、および、モデル生成部120から出力される三次元シーンのモデルデータから画像を生成する。
【0015】
CGモデル記憶部160は、予め作制されたCGオブジェクトのモデルを記憶する。光源設定部170は、CGモデル記憶部160に記憶されたモデルに対する光源モデルを設定する。CG画像生成部180は、モデル操作部150を介して入力される三次元空間上での移動および回転操作を表すデータに従い、光源設定部170で設定された光源モデル、カメラパラメータ記憶部101に記憶されているカメラパラメータ、および、CGモデル記憶部160に記憶されたモデルデータから画像を生成する。
【0016】
画像合成部190は、被写体画像生成部140から出力される被写体画像データと、CG画像生成部180から出力されるCG画像データとを合成した表示すべき画像データを、表示装置に画像を表示するための表示部300へ出力する。
【0017】
図2はステレオカメラ200の構成例を示すブロック図である。
【0018】
201および202は撮影レンズで、これらの撮影レンズにより二つの視点における画像(ステレオ画像)が撮影される。CCD 203および204は、画像を電気信号として取り込むためのイメージセンサである。これら二つの撮像系それぞれの撮像レンズの光軸は、CCD 203および204の水平方向に対して左右に振り分けられ、平行に配置されている。
【0019】
画像取込制御回路205および206は、CCD 203および204による画像の取り込みを制御するものである。画像信号処理部207および208は、CCD 203および204から出力されるアナログ画像信号を保持し、そのアナログ画像信号の利得を制御して階調補正を行うものである。A/D変換器209および210は、画像信号処理部207および208から出力されるアナログ画像信号をディジタル画像データに変換する。色信号処理回路211および212は、A/D変換器209および210から出力されるディジタル画像データを、RGB24ビット/画素のカラー画像データとして出力するためのものである。
【0020】
なお、撮影レンズ201および202、並びに、CCD 203および204などの構成要素は左右同一の特性のものから構成されている。
【0021】
以下では、本実施形態の三次元シーンを合成し表示する画像処理装置の動作を説明する。
【0022】
撮影者がステレオカメラ200および画像処理装置の電源スイッチ(不図示)をオンにすると、画像取込制御回路205の制御により、撮影レンズ201を通してイメージセンサ203に結像した被写体の右視点の画像データが、画像信号処理部207、A/D変換器209および色信号処理回路211を介して得られる。同様に、画像取込制御回路206の制御により、撮影レンズ204を通してイメージセンサ204に結像した被写体の左視点の画像データが、画像信号処理部208、A/D変換器210および色信号処理回路212を介して得られる。得られた二つの画像データは、図示しない同期信号発生回路により発生される同期信号に同期して、同じタイミングで撮影された画像データとしてステレオカメラ200から出力される。
【0023】
ステレオカメラ200から出力される左右一組の画像データは、撮影者によって図示しないシャッタボタンが押されると、それぞれ画像メモリ102および103に記憶される。そして、それら画像データのうち、画像メモリ102に記憶された左画像データが被写体画像生成部140に送られ、被写体画像生成部140は、画像合成部190を介してそのまま左画像データを表示部300に出力する。従って、表示装置には、ステレオカメラ200で撮影された左画像が表示されることになる。
【0024】
視差抽出部110は、画像メモリ102に記憶された基準になる左画像を例えば矩形の小領域に分割し、その各領域ごとに、画像メモリ103に記憶された右画像の画像データの差分が最も少ない領域を対応する領域として抽出する。その抽出結果は、左右画像間の水平ずれ量(以下「視差」と称する)データとして出力される。
【0025】
モデル生成部120は、視差抽出部110から出力された視差データの分布から三次元シーンのモデルデータを生成する。まず、モデル生成部120は、視差データ(u, v, d)を受け取る。ここで、(u, v)は左画像の画素座標を表す。つまり、イメージセンサと光軸との交点を原点とし、イメージセンサの水平方向および垂直方向にそれぞれu軸およびv軸を設定する。そして、座標(u, v)における視差をdとする。
【0026】
そして、カメラパラメータに基づき、各視差データに対する左撮像系の視点を原点とする撮像面の三次元空間の座標、つまりイメージセンサの水平方向および垂直方向にそれぞれx軸およびy軸を、光軸方向にz軸を設定した場合の座標(x, y, z)を求める。カメラパラメータは、二つの撮像系のレンズ中心(視点)間の距離b(以下「基線長」と称する)、撮像系の焦点距離f(撮像系の光軸に沿った視点から撮像面までの距離)、および、画像データの画素間隔pよりなり、次式から三次元空間の座標(x, y, z)が求められる。求められた三次元空間の座標データにはそれぞれインデックスが付与される。
x = (b/d)・u
y = (b/d)・v …(1)
z = (f・b)/(p・d)
【0027】
次に、モデル生成部120は、得られた三次元空間の座標データから三つのインデックスを組とする三角形データを形成する。三角形データの生成方法にはドロネー網として知られる方法などを用いる。そして、モデル生成部120は、三次元シーンのモデルデータとして式(1)により得た頂点データ、それぞれの頂点座標に対応する画像の座標および三角形データを出力する。
【0028】
被写体画像生成部140は、モデル生成部120から出力される三次元シーンのモデルデータおよび仮想カメラのモデルをワールド座標系に設定し、仮想カメラの撮像面に透視投影により画像を描画する。三次元シーンモデルの画像は、三角形データおよび頂点データの組合わせから三角形を生成し、各頂点に対応する画像の座標で指定される左画像データの一部をテクスチャとしてマッピングすることにより生成される。このとき生成される画像の輝度(画素値)は、光源設定部130に設定される光源モデルの光源の明るさを表す係数と、被写体画像データの画素値との積として求められる。従って、生成される三次元シーンモデルの画像は、方向性のない光源(以下「環境光」と称する)で一様に照明された画像になる。また、光源モデルの光源の明るさを表す係数は、光源設定部130により変更可能であり、三次元シーンモデルの画像の明るさを変えることができる。
【0029】
仮想カメラの初期位置および方向は、それぞれワールド座標系の頂点および三つの座標軸にxyz軸が一致するように合わせる。仮想カメラの焦点距離は、カメラパラメータ記憶部101のカメラパラメータである焦点距離から求める。また、仮想カメラの撮像面の大きさは、カメラパラメータ記憶部101のカメラパラメータである画素間隔および画像データの大きさから求める。
【0030】
このようにして得られた仮想カメラの撮像面に透視投影により描画された画像の画像データは、画像合成部190に出力される。一方、初期状態では、CG画像生成部180の出力はなく、画像合成部190は表示部300に被写体画像生成部140の出力画像のみを出力し、表示装置には初期画像が表示される。
【0031】
次に、CGモデルとの合成が指示されると、CG画像生成部180は、CGモデル記憶部160のモデルデータと、仮想カメラのモデルとをワールド座標系に設定し、仮想カメラの撮像面に透視投影により画像の描画を行う。この際の仮想カメラの設定位置および方向は、被写体画像生成部140と同様に求められる。このとき生成されるCGオブジェクト画像の輝度は、方向光によるCGオブジェクト画像の輝度と、環境光によるCGオブジェクト画像の輝度との和として求められる。
【0032】
光源設定部170には、方向光の光源モデル、その設定位置および方向、並びに、環境光の光源モデルが設定される。従って、方向光によるCGオブジェクト画像の輝度は、光源設定部170の方向光の明るさを表す係数、方向光の位置および方向、並びに、モデルデータの位置、表面の面方向および表面の色情報から、陰影のある画像として求められる。また、環境光によるCGオブジェクト画像の輝度は、光源設定部170の環境光の係数および表面の色情報の積として求める。従って、CGモデルの画像は、方向光で照明され陰影が附加された画像になり、立体感のある画像になる。
【0033】
生成されたCGオブジェクト画像は画像合成部190に出力され、被写体画像生成部140の出力画像に重ね合わされて、表示部300に三次元シーンとCGモデルとを合成した画像が表示される。また、光源設定部170における方向光や環境光の特性を表す値は変更可能であり、CGモデルの全体的な明るさと、モデルの表面形状を表現するための陰影との表示状態を変更することができる。また、ステレオカメラ200で撮影された被写体の画像およびCGモデルの画像の明るさおよび陰影を別々に操作し表示することもできる。
【0034】
モデル操作部150は、キーボード、マウスなどのインタフェイスを介して、仮想カメラの移動および回転指示を被写体画像生成部140に伝える。そして、被写体画像生成部140は、その指示に従い仮想カメラの位置を移動し、方向を回転して、仮想カメラの撮像面に三次元シーンのモデルを再描画する。CG画像生成部180も同様に、仮想カメラの位置を移動し、方向を回転して、仮想カメラの撮像面にCGモデルを再描画する。そして、画像合成部190は、再描画された被写体画像とCG画像とを合成して、モデル操作部150により指示された仮想カメラの移動および回転が反映された画像を表示装置に表示する。
【0035】
以上の動作により、ステレオカメラ200により撮影された画像から三次元シーンのモデルが生成され、CGオブジェクトと合成することにより、合成された三次元シーン中のウォークスルー再生が可能になる。しかも、ステレオカメラ200で撮影された三次元シーンの画像を違和感なく表示し、CGオブジェクトに陰影を付加した立体感のある画像として表示することができる。
【0036】
なお、本実施形態では、複数の描画手段を設けて三次元シーンのモデルとCGモデルとから別々に画像を生成するようにしたので、CGオブジェクトのみを操作する場合には、CGモデルのみ描画すればよい。
【0037】
以上説明したように、第1実施形態によれば、物体の三次元形状を表す複数の形状モデル、光源の特性を表す複数の光源モデル、カメラの特性を表すカメラモデル、仮想の三次元空間に前記複数の形状モデル、前記複数の光源モデルおよび前記カメラモデルをそれぞれ所定の位置および方向に設定して透視投影により合成画像を生成する画像生成部、並びに、前記合成画像を表示する表示部を有する三次元シーンを合成し表示する画像処理装置に、方向性を持たない光源モデルのみを設定する第一の光源設定部、および、少なくとも方向性をもつ光源モデルを設定する第二の光源設定部を備え、前記複数の形状モデルのうち少なくとも一つは表面のテクスチャ情報として画像データを有し、前記画像生成部は前記表面のテクスチャ情報として画像データを有する形状モデルのうち少なくとも一つを第一の光源設定部により設定される光源モデルで照明し、それ以外の形状モデルを第二の光源設定部により設定される光源モデルで照明した画像を生成するようにすることで、カメラで撮影された画像を三次元物体の表面に貼り付けた物体と、CGにより作成された三次元物体とを同一シーン中に混在させて表示する場合に、より自然な表示を得ることができる。
【0038】
【第2実施形態】
以下、本発明にかかる第2実施形態の画像処理装置を説明する。なお、本実施形態において、第1実施形態と略同様の構成については、同一符号を付して、その詳細説明を省略する。
【0039】
図3は第2実施形態の三次元シーンを合成し表示する画像処理装置の機能構成の一例を示すブロック図である。
【0040】
モデル合成部400は、CGモデル操作部420を介して指示される三次元空間のCGオブジェクトの移動および回転操作を表すデータに従い、モデル生成部120により生成された三次元シーンのモデルと、CGモデル記憶部160に記憶されたモデルとを合成し、合成されたモデルと光源モデルとを出力する。
【0041】
光源設定部410は、三次元シーンのモデルと、CGモデルのそれぞれモデルに対する光源モデルを設定する。
【0042】
画像生成部440は、カメラ操作部430を介して指示される三次元空間の仮想カメラの移動および回転操作を表すデータに従い、画像メモリ102に記憶されている左画像データ、カメラパラメータ記憶部101に記憶されているカメラパラメータ、並びに、モデル合成部400から出力されるモデルおよび光源モデルから画像を生成する。
【0043】
次に、第2実施形態の三次元シーンを合成し表示する画像処理装置の動作を説明する。
【0044】
撮影者がカメラの電源スイッチ(不図示)をオンすると、第1実施形態と同様に、左右の画像データがそれぞれ画像メモリ102および103に記憶される。そして、左右の画像データのうち、画像メモリ102に記憶された左画像データが画像生成部440に送られる。画像生成部440からは左画像データをそのまま表示部300に出力されるので、表示装置にはステレオカメラ200で撮影された左画像が表示される。また、視差抽出部110およびモデル生成部120は、第1実施形態と同様に動作し、三次元シーンのモデルデータをモデル合成部400に出力する。
【0045】
次に、CGモデルとの合成が指示されると、モデル合成部400は、モデル生成部120で生成された三次元シーンのモデルデータと、CGモデル記憶部160に記憶されているCGモデルとを一つのモデルに統合する。このとき、それぞれのモデルデータは、光源設定部410に設定されているそれぞれのモデルに対する光源モデルに関連付けられる。三次元シーンのモデルデータに対応した光源モデルは環境光のみで、CGモデルに対応した光源モデルは環境光および方向光の両方のモデルをもつ。
【0046】
また、CGモデルのモデルデータは、三次元シーンのワールド座標系と、CGモデルのワールド座標系との相対的な位置関係を表す移動および回転パラメータとも関連付けられる。なお、初期状態では、三次元シーンのワールド座標系と、CGモデルのワールド座標系との相対的な位置関係は一致されている。
【0047】
統合されたモデルデータは、三次元シーンおよびCGのモデルデータ、それぞれのモデルデータに対応した光源モデル、並びに、三次元シーンのワールド座標系およびCGモデルのワールド座標系の相対的な位置関係を表すパラメータを含む。
【0048】
画像生成部440は、モデル合成部400の出力である統合されたモデルデータおよび仮想カメラを三次元シーンのワールド座標系に設定し、仮想カメラの撮像面に透視投影により画像を描画する。三次元シーンモデルの画像は、三角形データおよび頂点データの組合わせから三角形を生成し、各頂点に対応する画像の座標で指定される左画像データの一部をテクスチャとしてマッピングすることにより生成される。
【0049】
このとき生成される三次元シーンモデルの画像の輝度(画素値)は、光源設定部410に設定されている三次元シーンモデルに対応した光源モデルの環境光の明るさを表す係数と、被写体画像データの画素値の積として求められる。また、CGモデルの画像の輝度は、光源設定部410に設定されているCGモデルに対応した光源モデルから方向光によるCGオブジェクトの画像の輝度と、環境光によるCGオブジェクトの画像の輝度の和として求められる。従って、生成される三次元シーンモデルの画像は、方向性のない光源(環境光)で一様に照明された画像になる。また、CGモデルの画像は、方向光で照明された陰影が付加された画像になり、立体感のある画像になる。
【0050】
このようにして描画された画像は、表示部300に出力され、三次元シーンとCGモデルを合成した画像が表示装置に表示される。
【0051】
CGモデル操作部420は、キーボードおよびマウスなどのインタフェイスを介して、CGモデルの移動および回転指示をモデル合成部400に伝える。そして、モデル合成部400はその指示に従い、三次元シーンのワールド座標系と、CGモデルのワールド座標系との相対的な位置関係を表す移動および回転パラメータを変更する。画像生成部440は変更されたパラメータに従い、CGモデルの画像の描画を行い、表示装置にはCGモデルに移動および/または回転が反映された画像が表示されることになる。
【0052】
カメラ操作部430は、キーボードおよびマウスなどのインタフェイスを介して、仮想カメラの移動および回転指示を画像生成部440に伝える。その指示に従い、画像生成部440は、仮想カメラの位置の移動および/または方向を回転し、仮想カメラの撮像面に三次元シーンモデルおよびCGモデルを再描画する。そして、カメラ操作部430により指示された仮想カメラの移動および/または回転が反映された画像が表示装置に表示されることになる。
【0053】
このように、第2実施形態では、三次元シーンのモデルとCGモデルとを合成して、画像生成部410において描画を行うので、複数の描画手段を設ける必要がない。また、三次元シーンのモデルおよびCGモデルにそれぞれの光源データを関連付けているので、三次元シーンのモデルは環境光で一様に照明された画像が、CGモデルは環境光と方向光で照明された陰影が付加された画像が、一つの描画手段により生成され表示装置に表示される。
【0054】
また、上記の各実施形態は、画像合成部190あるいは画像生成部440で生成される画像を記録する構成をもたないが、所望のカメラ位置および方向の画像が得られたことを表示部300で確認した後、その画像を記録媒体に記録することもできる。
【0055】
上記の各実施形態においては、ステレオカメラ200から直接ステレオ画像を取得して、三次元モデルの生成処理を行う構成としたが、ステレオカメラ200で撮影された画像をカメラに着脱自在な記録媒体に記録し、その記録媒体に記録されたステレオ画像について、画像メモリ102および103に記憶された画像と同様の処理を行うように装置を構成することもできる。
【0056】
また、ステレオ画像は、ステレオカメラ200によって撮影されたものに限らず、通常のディジタルカメラを利用して視点を変えて撮影された複数の画像を用いることもできる。
【0057】
以上説明したように、第2実施形態によれば、第1実施形態の効果に加えて、異なる視点で撮影された互いに視野の重なる複数の被写体画像から視差分布を抽出する視差抽出部と、視差分布から被写体の三次元形状を表す形状モデルを生成する被写体モデル生成部とを有し、複数の形状モデルのうち少なくとも一つは、被写体モデル生成部により生成された形状モデルであり、複数の被写体画像のうち少なくとも一つの画像の表面のテクスチャ情報を有するよう構成したので、カメラで撮影した画像をテクスチャとして貼り付けた三次元シーンのモデルを、複雑な作業を行うことなく生成でき、CGで作成した三次元物体と合成することができる。
【0058】
【第3実施形態】
上記の各実施形態では、画像処理装置をハードウェアで構成する例を説明したが、それらの処理部をソフトウェアの処理モジュールに置き換えたプログラムをコンピュータで実行しても同じ結果を得ることができる。
【0059】
以下では、第1実施形態の構成をソフトウェアの処理モジュールに置き換えた例を第3実施形態として説明する。図4は第3実施形態の構成例を示すフローチャートである。
【0060】
ステップS10で画像データを取得する。ここで取得される画像データは、例えば、第1実施形態のステレオカメラ200で撮影された左右の画像データである。
【0061】
次に、ステップS11で、取得された画像データのカメラパラメータを取得し、ステップS12で、取得された左右の画像データから視差分布を抽出する。この視差分布の抽出処理は、第1実施形態における視差抽出部110と同様の処理である。
【0062】
ステップS13では、取得されたカメラパラメータおよび抽出された視差分布から三次元シーンのモデルデータを生成する。この三次元シーンモデルの生成処理は、第1の実施形態におけるモデル生成部120と同様の処理である。
【0063】
ステップS14では、生成された三次元シーンモデルに対する光源の設定を行い、ステップS15でCGオブジェクトのモデルデータを取得し、ステップS16で、取得されたCGモデルに対する光源の設定を行い、ステップS17で仮想カメラおよびCGオブジェクトの位置および方向に関する初期状態を設定する。
【0064】
ステップS18では、生成された三次元シーンのモデルデータ、取得された画像データのうち左画像データ、取得されたカメラパラメータ、設定された三次元シーンモデルに対する光源、および、設定された仮想カメラの初期状態データから三次元シーンモデルの画像を生成する。この三次元シーンモデルの画像生成処理は、第1実施形態における被写体画像生成部140と同様の処理である。
【0065】
次に、ステップS19で、取得されたCGオブジェクトのモデルデータ、取得されたカメラパラメータ、設定されたCGモデルに対する光源データ、および、設定された仮想カメラおよびCGオブジェクトの初期状態データからCGモデルの画像を生成する。このCGモデルの画像生成処理は、第1実施形態におけるCG画像生成部180と同様の処理である。
【0066】
続いて、ステップS20で、生成された三次元シーンモデルの画像データおよび生成されたCGモデルの画像データを合成し、ステップS21で、合成された画像データをコンピュータの表示装置に表示し、ステップS22で、ユーザがキーボードやマウスなどのインタフェイスを介して行った仮想カメラおよびCGオブジェクトの移動および回転操作のパラメータを取得し、ステップS23で、取得されたパラメータに応じて処理を分岐する。
【0067】
CGオブジェクトの移動および回転操作を示すパラメータが取得された場合、処理はステップS19に戻り、再描画が行われる。また、仮想カメラの移動および回転操作を示すパラメータが取得された場合、処理はステップS18に戻り、再描画が行われる。また、表示終了を示すパラメータが取得された場合は処理プログラムを終了する。
【0068】
なお、図4には示さないが、ステップS22で画像の記録を示すパラメータが取得された場合は合成された画像を記録媒体に格納する。
【0069】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
【0070】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0071】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0072】
【発明の効果】
以上説明したように、本発明によれば、撮影された画像から作成される被写体画像と、 CG 画像を合成する場合に、自然な合成画像を得ることができる。
【図面の簡単な説明】
【図1】第1実施形態の三次元シーンを合成し表示する画像処理装置の機能構成の一例を示すブロック図、
【図2】図1に示すステレオカメラの構成例を示すブロック図、
【図3】第2実施形態の三次元シーンを合成し表示する画像処理装置の機能構成の一例を示すブロック図、
【図4】第3実施形態の構成例を示すフローチャートである。
[0001]
BACKGROUND OF THE INVENTION
The present invention is created from captured imagesSubject image, CG imageIt relates to image processing to synthesize.
[0002]
[Prior art]
A 3D computer graphics (CG) system is used to create a model of a scene that includes a 3D object or multiple 3D objects. There is a system that can virtually walk through the created 3D space.
[0003]
[Problems to be solved by the invention]
However, creating a CG requires a complicated work, and the surface of a three-dimensional object created by the CG system (hereinafter referred to as “three-dimensional CG object”) is generally a single color. On the other hand, the surface of an actual object is covered with various colors and textures. For this reason, walk-throughs in 3D space created with CG tend to lack realism.
[0004]
On the other hand, an image photographed by a camera (hereinafter referred to as “camera image”) can be pasted on the surface of a three-dimensional CG object, but the model creation is further complicated. Furthermore, there is the following problem when a 3D CG object with a camera image pasted on its surface and a 3D CG object are mixed in the same scene.
[0005]
In order to give a 3D effect to an object created with CG, it is necessary to display the object as if it was illuminated with directional light (hereinafter referred to as “directional light”). Since shadows are originally included, an image that is pasted with a camera image is displayed as if illuminated with directional light, resulting in a very unnatural image.
[0006]
The present inventionA subject image created from the captured image; CG imageAn object is to obtain a natural composite image when combining images.
[0008]
[Means for Solving the Problems]
The present invention has the following configuration as one means for achieving the above object.
[0009]
An image processing apparatus according to the present invention includes: a first setting unit that sets a light source model having no directionality; a second setting unit that sets a light source model having directionality;An acquisition means for acquiring image data photographed by the camera, a third setting means for setting the position of the virtual camera, and using the image data as texture information, having the position and the directionality of the virtual camera Subject image generating means for generating a subject image according to a light source model not present, CG No model, no position of the virtual camera, no directionLight source model,And with the directionalityLight source modelUsing, CGimageTheGenerationDo CG Image generating means, the subject image and the CG And a compositing means for generating a composite image by combining the imagesIt is characterized by that.
[0010]
An image processing method according to the present invention includes:A step of setting a light source model having no directionality; a step of setting a light source model having directionality; a step of acquiring image data captured by a camera; a setting step of setting a position of a virtual camera; Using the image data as texture information, a subject image generation step of generating a subject image according to the position of the virtual camera and the light source model having no directionality; CG Using a model, a position of the virtual camera, a light source model having no directionality, and a light source model having the directionality, CG Generate image CG An image generation step, the subject image, and the CG And a synthesis step for generating a synthesized image.It is characterized by doing.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.
[0012]
[First Embodiment]
FIG. 1 is a block diagram showing an example of a functional configuration of an image processing apparatus that synthesizes and displays a three-dimensional scene according to the first embodiment of the present invention.
[0013]
The stereo camera 200 outputs left and right two-line image data. The camera parameter storage unit 101 stores camera parameters of left and right image data output from the stereo camera 200. The image memories 102 and 103 respectively store the left and right image data output from the stereo camera 200 for one screen. The parallax extraction unit 110 extracts and outputs the parallax distribution of the left and right image data stored in the image memories 102 and 103. The model generation unit 120 generates and outputs 3D scene model data from the parallax distribution that is the output of the parallax extraction unit 110 and the camera parameters stored in the camera parameter storage unit 101.
[0014]
The light source setting unit 130 sets a light source model for the model data of the three-dimensional scene generated by the model generation unit 120. The subject image generation unit 140 is stored in the light source model set by the light source setting unit 130 and the image memory 102 in accordance with data representing movement and rotation operations in the three-dimensional space input via the model operation unit 150. The image is generated from the left image data, the camera parameters stored in the camera parameter storage unit 101, and the model data of the three-dimensional scene output from the model generation unit 120.
[0015]
The CG model storage unit 160 stores a model of a CG object created in advance. The light source setting unit 170 sets a light source model for the model stored in the CG model storage unit 160. The CG image generation unit 180 stores the light source model set by the light source setting unit 170 in the camera parameter storage unit 101 in accordance with the data representing the movement and rotation operations in the three-dimensional space input via the model operation unit 150. An image is generated from the camera parameters that have been stored and the model data stored in the CG model storage unit 160.
[0016]
The image compositing unit 190 is a subject image generating unit 1FourThe image data to be displayed by combining the subject image data output from 0 and the CG image data output from the CG image generation unit 180 is output to the display unit 300 for displaying an image on the display device.
[0017]
FIG. 2 is a block diagram illustrating a configuration example of the stereo camera 200.
[0018]
Reference numerals 201 and 202 denote photographing lenses, and images (stereo images) at two viewpoints are photographed by these photographing lenses. CCDs 203 and 204 are image sensors for capturing an image as an electrical signal. The optical axes of the imaging lenses of these two imaging systems are distributed to the left and right with respect to the horizontal direction of the CCDs 203 and 204, and are arranged in parallel.
[0019]
The image capture control circuits 205 and 206 control the capture of images by the CCDs 203 and 204. The image signal processing units 207 and 208 hold analog image signals output from the CCDs 203 and 204, and perform gradation correction by controlling the gain of the analog image signals. A / D converters 209 and 210 convert analog image signals output from image signal processing units 207 and 208 into digital image data. The color signal processing circuits 211 and 212 are for outputting the digital image data output from the A / D converters 209 and 210 as RGB 24-bit / pixel color image data.
[0020]
Note that the constituent elements such as the photographing lenses 201 and 202 and the CCDs 203 and 204 are composed of the same characteristics on the left and right.
[0021]
Hereinafter, the operation of the image processing apparatus that synthesizes and displays the three-dimensional scene of the present embodiment will be described.
[0022]
When the photographer turns on the power switch (not shown) of the stereo camera 200 and the image processing apparatus, the image data of the right viewpoint of the subject imaged on the image sensor 203 through the photographing lens 201 is controlled by the image capture control circuit 205. Is obtained via the image signal processing unit 207, the A / D converter 209, and the color signal processing circuit 211. Similarly, under the control of the image capture control circuit 206, the image data of the left viewpoint of the subject imaged on the image sensor 204 through the photographing lens 204 is converted into an image signal processing unit 208, an A / D converter 210, and a color signal processing circuit. Via 212. The two obtained image data are output from the stereo camera 200 as image data photographed at the same timing in synchronization with a synchronization signal generated by a synchronization signal generation circuit (not shown).
[0023]
A set of left and right image data output from the stereo camera 200 is stored in the image memories 102 and 103, respectively, when a photographer presses a shutter button (not shown). Of the image data, the left image data stored in the image memory 102 is sent to the subject image generation unit 140, and the subject image generation unit 140 displays the left image data as it is via the image composition unit 190. Output to. Therefore, the left image captured by the stereo camera 200 is displayed on the display device.
[0024]
The parallax extraction unit 110 divides the reference left image stored in the image memory 102 into, for example, rectangular small areas, and the difference between the image data of the right image stored in the image memory 103 is the largest for each area. A small area is extracted as a corresponding area. The extraction result is output as horizontal shift amount (hereinafter referred to as “parallax”) data between the left and right images.
[0025]
The model generation unit 120 generates model data of a 3D scene from the distribution of the parallax data output from the parallax extraction unit 110. First, the model generation unit 120 receives parallax data (u, v, d). Here, (u, v) represents the pixel coordinates of the left image. That is, the intersection point between the image sensor and the optical axis is set as the origin, and the u axis and the v axis are set in the horizontal direction and the vertical direction of the image sensor, respectively. The parallax at the coordinates (u, v) is d.
[0026]
Based on the camera parameters, the coordinates of the three-dimensional space of the imaging plane with the origin of the viewpoint of the left imaging system for each parallax data, that is, the x-axis and y-axis in the horizontal and vertical directions of the image sensor, respectively, and the optical axis direction Find the coordinates (x, y, z) when the z axis is set to. The camera parameters are the distance b (hereinafter referred to as “baseline length”) between the lens centers (viewpoints) of the two imaging systems, the focal length f of the imaging system (the distance from the viewpoint along the optical axis of the imaging system to the imaging surface). ) And the pixel interval p of the image data, and the coordinates (x, y, z) of the three-dimensional space are obtained from the following equation. Each obtained coordinate data in the three-dimensional space is assigned an index.
x = (b / d) ・ u
y = (b / d) ・ v… (1)
z = (f ・ b) / (p ・ d)
[0027]
Next, the model generation unit 120 forms triangular data having three indexes as a set from the obtained coordinate data of the three-dimensional space. A method known as Delaunay network is used as a method for generating triangle data. Then, the model generation unit 120 outputs the vertex data obtained by the equation (1) as the model data of the three-dimensional scene, the image coordinates corresponding to each vertex coordinate, and the triangle data.
[0028]
The subject image generation unit 140 sets the model data of the three-dimensional scene and the virtual camera model output from the model generation unit 120 in the world coordinate system, and draws an image on the imaging surface of the virtual camera by perspective projection. An image of a 3D scene model is generated by generating a triangle from a combination of triangle data and vertex data, and mapping a part of the left image data specified by the coordinates of the image corresponding to each vertex as a texture. . The brightness (pixel value) of the image generated at this time is obtained as the product of a coefficient representing the brightness of the light source of the light source model set in the light source setting unit 130 and the pixel value of the subject image data. Therefore, the generated image of the three-dimensional scene model is an image that is uniformly illuminated by a non-directional light source (hereinafter referred to as “ambient light”). Further, the coefficient representing the brightness of the light source of the light source model can be changed by the light source setting unit 130, and the brightness of the image of the three-dimensional scene model can be changed.
[0029]
The initial position and direction of the virtual camera are adjusted so that the xyz axis coincides with the vertex and three coordinate axes of the world coordinate system, respectively. The focal length of the virtual camera is obtained from the focal length, which is a camera parameter in the camera parameter storage unit 101. Further, the size of the imaging surface of the virtual camera is obtained from the pixel interval and the size of the image data, which are camera parameters in the camera parameter storage unit 101.
[0030]
The image data of the image drawn by the perspective projection on the imaging surface of the virtual camera thus obtained is output to the image composition unit 190. On the other hand, in the initial state, there is no output from the CG image generation unit 180, the image composition unit 190 outputs only the output image of the subject image generation unit 140 to the display unit 300, and the initial image is displayed on the display device.
[0031]
Next, when the synthesis with the CG model is instructed, the CG image generation unit 180 sets the model data of the CG model storage unit 160 and the model of the virtual camera in the world coordinate system, and displays them on the imaging surface of the virtual camera. An image is drawn by perspective projection. The setting position and direction of the virtual camera at this time are obtained in the same manner as the subject image generation unit 140. The luminance of the CG object image generated at this time is obtained as the sum of the luminance of the CG object image by directional light and the luminance of the CG object image by ambient light.
[0032]
In the light source setting unit 170, a light source model for directional light, a setting position and direction thereof, and a light source model for ambient light are set. Therefore, the luminance of the CG object image by the direction light is determined from the coefficient indicating the brightness of the direction light of the light source setting unit 170, the position and direction of the direction light, the position of the model data, the surface direction of the surface, and the color information of the surface. It is calculated | required as an image with a shadow. The luminance of the CG object image by ambient light is obtained as the product of the coefficient of ambient light of the light source setting unit 170 and the surface color information. Therefore, the image of the CG model is an image that is illuminated with directional light and is shaded, and has a stereoscopic effect.
[0033]
The generated CG object image is output to the image composition unit 190 and superimposed on the output image of the subject image generation unit 140, and an image obtained by combining the 3D scene and the CG model is displayed on the display unit 300. In addition, the values representing the characteristics of directional light and ambient light in the light source setting unit 170 can be changed, and the display state of the overall brightness of the CG model and the shade to express the surface shape of the model can be changed. Can do. In addition, the brightness and shadow of the subject image and the CG model image captured by the stereo camera 200 can be separately operated and displayed.
[0034]
The model operation unit 150 transmits a virtual camera movement and rotation instruction to the subject image generation unit 140 via an interface such as a keyboard and a mouse. Then, the subject image generation unit 140 moves the position of the virtual camera according to the instruction, rotates the direction, and redraws the 3D scene model on the imaging surface of the virtual camera. Similarly, the CG image generation unit 180 moves the position of the virtual camera, rotates the direction, and redraws the CG model on the imaging surface of the virtual camera. Then, the image synthesis unit 190 synthesizes the redrawn subject image and the CG image, and displays an image reflecting the movement and rotation of the virtual camera instructed by the model operation unit 150 on the display device.
[0035]
With the above operation, a model of a three-dimensional scene is generated from an image photographed by the stereo camera 200 and is synthesized with a CG object, thereby enabling walk-through reproduction in the synthesized three-dimensional scene. In addition, it is possible to display the image of the three-dimensional scene photographed by the stereo camera 200 without a sense of incongruity and display it as a stereoscopic image in which a shadow is added to the CG object.
[0036]
In the present embodiment, since a plurality of drawing means are provided to generate images separately from the 3D scene model and the CG model, only the CG model is drawn when operating only the CG object. That's fine.
[0037]
As described above, according to the first embodiment, a plurality of shape models representing the three-dimensional shape of the object, a plurality of light source models representing the characteristics of the light source, a camera model representing the characteristics of the camera, and a virtual three-dimensional space An image generation unit configured to generate a combined image by perspective projection by setting the plurality of shape models, the plurality of light source models, and the camera model to predetermined positions and directions, respectively; and a display unit configured to display the combined image. A first light source setting unit that sets only a light source model having no directionality and a second light source setting unit that sets at least a light source model having directionality in an image processing apparatus that synthesizes and displays a three-dimensional scene. And at least one of the plurality of shape models has image data as surface texture information, and the image generation unit displays image data as the surface texture information. An image obtained by illuminating at least one of the shape models having image data with the light source model set by the first light source setting unit and illuminating the other shape model with the light source model set by the second light source setting unit When an image captured by a camera is pasted on the surface of a 3D object and a 3D object created by CG is displayed in a mixed manner in the same scene, A more natural display can be obtained.
[0038]
Second Embodiment
The image processing apparatus according to the second embodiment of the present invention will be described below. Note that in the present embodiment, the same reference numerals are given to substantially the same configurations as those in the first embodiment, and detailed description thereof will be omitted.
[0039]
FIG. 3 is a block diagram illustrating an example of a functional configuration of an image processing apparatus that synthesizes and displays a three-dimensional scene according to the second embodiment.
[0040]
The model synthesis unit 400 includes a 3D scene model generated by the model generation unit 120 and a CG model according to data representing the movement and rotation operations of the CG object in the 3D space specified via the CG model operation unit 420. The model stored in the storage unit 160 is synthesized, and the synthesized model and the light source model are output.
[0041]
The light source setting unit 410 sets a light source model for each of the 3D scene model and the CG model.
[0042]
The image generation unit 440 stores the left image data stored in the image memory 102 and the camera parameter storage unit 101 in accordance with data representing the movement and rotation operation of the virtual camera in the three-dimensional space specified via the camera operation unit 430. An image is generated from the stored camera parameters and the model and light source model output from the model synthesis unit 400.
[0043]
Next, the operation of the image processing apparatus for synthesizing and displaying the 3D scene of the second embodiment will be described.
[0044]
When the photographer turns on the power switch (not shown) of the camera, the left and right image data are stored in the image memories 102 and 103, respectively, as in the first embodiment. Of the left and right image data, the left image data stored in the image memory 102 is sent to the image generation unit 440. Since the left image data is directly output from the image generation unit 440 to the display unit 300, the left image captured by the stereo camera 200 is displayed on the display device. Further, the parallax extraction unit 110 and the model generation unit 120 operate in the same manner as in the first embodiment, and output the model data of the three-dimensional scene to the model synthesis unit 400.
[0045]
Next, when the synthesis with the CG model is instructed, the model synthesis unit 400 combines the model data of the 3D scene generated by the model generation unit 120 and the CG model stored in the CG model storage unit 160. Integrate into one model. At this time, each model data is associated with a light source model for each model set in the light source setting unit 410. The light source model corresponding to the model data of the three-dimensional scene is only ambient light, and the light source model corresponding to the CG model has both ambient light and directional light models.
[0046]
The model data of the CG model is also associated with the movement and rotation parameters representing the relative positional relationship between the world coordinate system of the three-dimensional scene and the world coordinate system of the CG model. In the initial state, the relative positional relationship between the world coordinate system of the three-dimensional scene and the world coordinate system of the CG model is the same.
[0047]
The integrated model data represents the 3D scene and CG model data, the light source model corresponding to each model data, and the relative positional relationship between the world coordinate system of the 3D scene and the world coordinate system of the CG model. Contains parameters.
[0048]
The image generation unit 440 sets the integrated model data and virtual camera output from the model synthesis unit 400 in the world coordinate system of the three-dimensional scene, and draws an image on the imaging surface of the virtual camera by perspective projection. An image of a 3D scene model is generated by generating a triangle from a combination of triangle data and vertex data, and mapping a part of the left image data specified by the coordinates of the image corresponding to each vertex as a texture. .
[0049]
The brightness (pixel value) of the image of the 3D scene model generated at this time includes a coefficient representing the brightness of the ambient light of the light source model corresponding to the 3D scene model set in the light source setting unit 410, and the subject image It is obtained as the product of pixel values of data. The luminance of the CG model image is the sum of the luminance of the CG object image by direction light from the light source model corresponding to the CG model set in the light source setting unit 410 and the luminance of the CG object image by ambient light. Desired. Therefore, the generated image of the three-dimensional scene model is an image that is uniformly illuminated by a nondirectional light source (environment light). In addition, the image of the CG model becomes an image with a shadow illuminated with directional light and has a stereoscopic effect.
[0050]
The image drawn in this way is output to the display unit 300, and an image obtained by combining the three-dimensional scene and the CG model is displayed on the display device.
[0051]
The CG model operation unit 420 transmits an instruction to move and rotate the CG model to the model synthesis unit 400 via an interface such as a keyboard and a mouse. Then, the model synthesis unit 400 changes the movement and rotation parameters representing the relative positional relationship between the world coordinate system of the three-dimensional scene and the world coordinate system of the CG model in accordance with the instruction. The image generation unit 440 draws the image of the CG model according to the changed parameters, and the display device displays an image in which movement and / or rotation is reflected on the CG model.
[0052]
The camera operation unit 430 transmits a virtual camera movement and rotation instruction to the image generation unit 440 via an interface such as a keyboard and a mouse. In accordance with the instruction, the image generation unit 440 rotates and / or rotates the position of the virtual camera, and redraws the three-dimensional scene model and the CG model on the imaging surface of the virtual camera. Then, an image reflecting the movement and / or rotation of the virtual camera instructed by the camera operation unit 430 is displayed on the display device.
[0053]
As described above, in the second embodiment, the 3D scene model and the CG model are combined and drawn in the image generation unit 410, so there is no need to provide a plurality of drawing means. In addition, since the light source data is associated with the 3D scene model and the CG model, the 3D scene model is illuminated with ambient light uniformly, and the CG model is illuminated with ambient light and directional light. The image to which the shade is added is generated by one drawing means and displayed on the display device.
[0054]
Further, each of the above embodiments does not have a configuration for recording an image generated by the image synthesis unit 190 or the image generation unit 440, but the display unit 300 indicates that an image of a desired camera position and direction has been obtained. Then, the image can be recorded on a recording medium.
[0055]
In each of the above embodiments, the stereo image is directly acquired from the stereo camera 200 and the three-dimensional model is generated. However, the image captured by the stereo camera 200 is recorded on a recording medium that is detachable from the camera. The apparatus can also be configured to perform the same processing as the images stored in the image memories 102 and 103 on the stereo image recorded and recorded on the recording medium.
[0056]
In addition, the stereo image is not limited to the one captured by the stereo camera 200, and a plurality of images captured by changing the viewpoint using a normal digital camera can also be used.
[0057]
As described above, according to the second embodiment, in addition to the effects of the first embodiment, a parallax extraction unit that extracts parallax distributions from a plurality of subject images that are photographed from different viewpoints and overlap each other, and parallax A subject model generation unit that generates a shape model representing a three-dimensional shape of the subject from the distribution, and at least one of the plurality of shape models is a shape model generated by the subject model generation unit, and the plurality of subjects Since it is configured to have texture information on the surface of at least one of the images, a 3D scene model can be generated without complicated work and created with CG. Can be synthesized with the three-dimensional object.
[0058]
[Third Embodiment]
In each of the above embodiments, the example in which the image processing apparatus is configured by hardware has been described. However, the same result can be obtained even when a program in which those processing units are replaced with software processing modules is executed by a computer.
[0059]
Hereinafter, an example in which the configuration of the first embodiment is replaced with a software processing module will be described as a third embodiment. FIG. 4 is a flowchart showing a configuration example of the third embodiment.
[0060]
In step S10, image data is acquired. The image data acquired here is, for example, left and right image data captured by the stereo camera 200 of the first embodiment.
[0061]
Next, in step S11, camera parameters of the acquired image data are acquired, and in step S12, a parallax distribution is extracted from the acquired left and right image data. This parallax distribution extraction process is the same process as the parallax extraction unit 110 in the first embodiment.
[0062]
In step S13, model data of a three-dimensional scene is generated from the acquired camera parameters and the extracted parallax distribution. This three-dimensional scene model generation process is the same process as the model generation unit 120 in the first embodiment.
[0063]
In step S14, the light source is set for the generated 3D scene model, the model data of the CG object is acquired in step S15, the light source is set for the acquired CG model in step S16, and the virtual light is set in step S17. Set the initial state for camera and CG object position and direction.
[0064]
In step S18, the generated 3D scene model data, the left image data of the acquired image data, the acquired camera parameters, the light source for the set 3D scene model, and the initial setting of the set virtual camera An image of a 3D scene model is generated from the state data. This image generation process of the three-dimensional scene model is the same process as that of the subject image generation unit 140 in the first embodiment.
[0065]
Next, in step S19, the image of the CG model is obtained from the acquired model data of the CG object, the acquired camera parameters, the light source data for the set CG model, and the initial state data of the set virtual camera and CG object. Is generated. This CG model image generation processing is the same processing as the CG image generation unit 180 in the first embodiment.
[0066]
Subsequently, in step S20, the generated three-dimensional scene model image data and the generated CG model image data are combined, and in step S21, the combined image data is displayed on a computer display device, and step S22. Thus, the parameters of the movement and rotation operations of the virtual camera and the CG object performed by the user through the interface such as the keyboard and the mouse are acquired, and the process branches in accordance with the acquired parameters in step S23.
[0067]
When the parameter indicating the movement and rotation operation of the CG object is acquired, the process returns to step S19 and redrawing is performed. If a parameter indicating the movement and rotation operation of the virtual camera is acquired, the process returns to step S18 and redrawing is performed. If a parameter indicating the end of display is acquired, the processing program ends.
[0068]
Although not shown in FIG. 4, when a parameter indicating image recording is acquired in step S22, the synthesized image is stored in the recording medium.
[0069]
[Other Embodiments]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device. You may apply to.
[0070]
Another object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and the computer (or CPU or MPU) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in the. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0071]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted in the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0072]
【The invention's effect】
As explained above, according to the present invention,A subject image created from the captured image; CG imageWhen combining these, a natural combined image can be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of a functional configuration of an image processing apparatus that synthesizes and displays a three-dimensional scene according to a first embodiment;
FIG. 2 is a block diagram showing a configuration example of the stereo camera shown in FIG.
FIG. 3 is a block diagram illustrating an example of a functional configuration of an image processing apparatus that synthesizes and displays a three-dimensional scene according to a second embodiment;
FIG. 4 is a flowchart illustrating a configuration example of a third embodiment.

Claims (8)

方向性をもたない光源モデルを設定する第一の設定手段と、
方向性をもつ光源モデルを設定する第二の設定手段と、
カメラによって撮影された画像データを取得する取得手段と、
仮想カメラの位置を設定する第三の設定手段と、
前記画像データをテクスチャ情報として使用し、前記仮想カメラの位置と前記方向性をもたない光源モデルに応じて、被写体画像を生成する被写体画像生成手段と、
CG モデル、前記仮想カメラの位置、前記方向性をもたない光源モデル、および、前記方向性をもつ光源モデルを用いて、 CG画像生成する CG 画像生成手段と、
前記被写体画像と前記 CG 画像を合成した合成画像を生成する合成手段とを有することを特徴とする画像処理装置。
A first setting means for setting a light source model having no directionality;
A second setting means for setting a light source model having directionality;
Acquisition means for acquiring image data captured by the camera;
A third setting means for setting the position of the virtual camera;
Using the image data as texture information, subject image generation means for generating a subject image according to the position of the virtual camera and the light source model having no directionality;
CG model, the position of the virtual camera, lighting model having no the directional, and, with a light source model with the directional, and the CG image generating means for generating a CG image,
The image processing apparatus according to claim Rukoto which have a synthesizing means for generating a composite image of the CG image and the subject image.
さらに、前記画像データが含む、前記カメラによって異なる視点で撮影された互いに視野の重なる複数の被写体画像データから視差分布を抽出する抽出手段と、
前記視差分布から前記カメラが撮影した被写体の三次元形状を表す形状モデルを生成する被写体モデル生成手段とを有し、
前記被写体画像生成手段は、前記形状モデルに基づき、三次元シーンを表す被写体画像を生成することを特徴とする請求項1に記載された画像処理装置。
Furthermore, the image data includes an extraction unit that extracts parallax distributions from a plurality of subject image data that are photographed from different viewpoints with the camera and that overlap each other's field of view.
Subject model generation means for generating a shape model representing a three-dimensional shape of a subject photographed by the camera from the parallax distribution;
The subject image generating means, based on said shape model, the image processing apparatus according to claim 1, characterized in that to generate the object image representing a three-dimensional scene.
前記第三の設定手段によって前記仮想カメラの位置が変更された場合、前記被写体画像生成手段、前記 CG画像生成手段および前記合成手段は、前記合成画像再生成ることを特徴とする請求項1または請求項2に記載された画像処理装置。If the position of the virtual camera is changed by said third setting means, the object image generating unit, the CG image generating means and said combining means, claims, characterized that you regenerate the composite image The image processing device according to claim 1 or 2. さらに、前記合成画像を表示する表示手段を有することを特徴とする請求項1から請求項3の何れか一項に記載された画像処理装置。  4. The image processing apparatus according to claim 1, further comprising display means for displaying the composite image. 方向性をもたない光源モデルを設定するステップと、
方向性をもつ光源モデルを設定するステップと、
カメラによって撮影された画像データを取得するステップと、
仮想カメラの位置を設定する設定ステップと、
前記画像データをテクスチャ情報として使用し、前記仮想カメラの位置と前記方向性をもたない光源モデルに応じて、被写体画像を生成する被写体画像生成ステップと、
CG モデル、前記仮想カメラの位置、前記方向性をもたない光源モデル、および、前記方向性をもつ光源モデルを用いて、 CG 画像を生成する CG 画像生成ステップと、
前記被写体画像と前記 CG 画像を合成した合成画像を生成する合成ステップとを有することを特徴とする画像処理方法。
Setting a light source model having no directionality;
Setting a directional light source model;
Obtaining image data taken by the camera;
A setting step for setting the position of the virtual camera;
Using the image data as texture information, a subject image generation step of generating a subject image according to the position of the virtual camera and the light source model having no directionality;
CG model, the position of the virtual camera, lighting model having no the directional, and, with a light source model with the directional, and the CG image generating step of generating a CG image,
An image processing method characterized by chromatic and synthetic step of generating a composite image of the CG image and the subject image.
さらに、前記画像データが含む、前記カメラによって異なる視点で撮影された互いに視野の重なる複数の被写体画像データから視差分布を抽出するステップと
前記視差分布から前記カメラが撮影した被写体の三次元形状を表す形状モデルを生成するステップとを有し
前記被写体画像生成ステップは、前記形状モデルに基づき、三次元シーンを表す被写体画像を生成することを特徴とする請求項5に記載された画像処理方法。
Furthermore, extracting the parallax distribution from a plurality of subject image data that are captured from different viewpoints by the camera and that overlap each other's visual field included in the image data ;
And a step of generating a shape model representing a three-dimensional shape of the object the camera is taken from the parallax distribution,
The subject image generating step, based on said shape model, image processing method according to claim 5, characterized that you generate an object image representing a three-dimensional scene.
前記設定ステップにおいて、前記仮想カメラの位置が変更された場合、前記被写体画像生成ステップ、前記 CG 画像生成ステップおよび前記合成ステップにおいて、前記合成画像を再生成することを特徴とする請求項5または請求項6に記載された画像処理方法。 6. The synthetic image is regenerated in the subject image generation step, the CG image generation step, and the synthesis step when the position of the virtual camera is changed in the setting step. Item 7. The image processing method according to Item 6. 画像処理装置を制御して、請求項5から請求項7の何れか一項に記載された画像処理を実現するコンピュータプログラムが記録されたことを特徴とするコンピュータが読み取り可能な記憶媒体。  8. A computer-readable storage medium having recorded thereon a computer program for controlling the image processing apparatus and realizing the image processing according to any one of claims 5 to 7.
JP23911698A 1998-08-25 1998-08-25 Image processing apparatus and method Expired - Fee Related JP4006105B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23911698A JP4006105B2 (en) 1998-08-25 1998-08-25 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23911698A JP4006105B2 (en) 1998-08-25 1998-08-25 Image processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2000067265A JP2000067265A (en) 2000-03-03
JP2000067265A5 JP2000067265A5 (en) 2007-04-26
JP4006105B2 true JP4006105B2 (en) 2007-11-14

Family

ID=17040042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23911698A Expired - Fee Related JP4006105B2 (en) 1998-08-25 1998-08-25 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4006105B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007116549A1 (en) * 2006-04-07 2007-10-18 Sharp Kabushiki Kaisha Image processing device
JP2009268088A (en) * 2008-04-04 2009-11-12 Fujifilm Corp Image processing system, image processing method, and program
US8335425B2 (en) 2008-11-18 2012-12-18 Panasonic Corporation Playback apparatus, playback method, and program for performing stereoscopic playback
WO2010058546A1 (en) 2008-11-18 2010-05-27 パナソニック株式会社 Reproduction device, reproduction method, and program for stereoscopic reproduction
US10652519B2 (en) * 2009-09-11 2020-05-12 Disney Enterprises, Inc. Virtual insertions in 3D video

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2883523B2 (en) * 1992-08-26 1999-04-19 株式会社ナムコ Image synthesizing apparatus and image synthesizing method
JPH06231275A (en) * 1993-01-29 1994-08-19 Hitachi Ltd Picture simulation method
JPH11175762A (en) * 1997-12-08 1999-07-02 Katsushi Ikeuchi Light environment measuring instrument and device and method for shading virtual image using same
WO1999060526A1 (en) * 1998-05-20 1999-11-25 Sega Enterprises, Ltd. Image processor, game machine, image processing method, and recording medium

Also Published As

Publication number Publication date
JP2000067265A (en) 2000-03-03

Similar Documents

Publication Publication Date Title
US10417829B2 (en) Method and apparatus for providing realistic 2D/3D AR experience service based on video image
US5694533A (en) 3-Dimensional model composed against textured midground image and perspective enhancing hemispherically mapped backdrop image for visual realism
US20020113865A1 (en) Image processing method and apparatus
JP4065488B2 (en) 3D image generation apparatus, 3D image generation method, and storage medium
JP4804256B2 (en) Information processing method
JP3992629B2 (en) Image generation system, image generation apparatus, and image generation method
JP4847203B2 (en) Information processing method and information processing apparatus
JP2002163670A (en) Device for presenting combined sense of reality and its controlling method
JP2006107213A (en) Stereoscopic image printing system
KR20060090367A (en) 3d virtual studio using video texturing
JP4264601B2 (en) Information input device, information input method, and game device
US20220189078A1 (en) Image processing apparatus, method for controlling image processing apparatus, and storage medium
KR20230032893A (en) Image processing apparatus, image processing method, and storage medium
JP7234021B2 (en) Image generation device, image generation system, image generation method, and program
JP4006105B2 (en) Image processing apparatus and method
RU2735066C1 (en) Method for displaying augmented reality wide-format object
CN108492381A (en) A kind of method and system that color in kind is converted into 3D model pinup pictures
JP2008287588A (en) Image processor and image processing method
JP2003143477A (en) Image compositing device and method
CA3155612A1 (en) Method and system for providing at least a portion of content having six degrees of freedom motion
WO2021171982A1 (en) Image processing device, three-dimensional model generating method, learning method, and program
JP4046973B2 (en) Information processing method and image mixing apparatus
JP2001118074A (en) Method and device for producing three-dimensional image and program recording medium
JPH10336703A (en) Image compositing device, its method and storage medium
JP4366165B2 (en) Image display apparatus and method, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040520

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20040520

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040520

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070208

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070827

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110831

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120831

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120831

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130831

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees