JP4017351B2 - 3D model generation apparatus and 3D model generation program - Google Patents

3D model generation apparatus and 3D model generation program Download PDF

Info

Publication number
JP4017351B2
JP4017351B2 JP2001037293A JP2001037293A JP4017351B2 JP 4017351 B2 JP4017351 B2 JP 4017351B2 JP 2001037293 A JP2001037293 A JP 2001037293A JP 2001037293 A JP2001037293 A JP 2001037293A JP 4017351 B2 JP4017351 B2 JP 4017351B2
Authority
JP
Japan
Prior art keywords
data
dimensional
subspace
space
texture
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
JP2001037293A
Other languages
Japanese (ja)
Other versions
JP2002245486A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001037293A priority Critical patent/JP4017351B2/en
Publication of JP2002245486A publication Critical patent/JP2002245486A/en
Application granted granted Critical
Publication of JP4017351B2 publication Critical patent/JP4017351B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、空間を撮影した画像を用いてオブジェクトの3次元モデルやオブジェクトを配置した空間の3次元モデルを作成する3次元モデル生成装置、3次元モデル生成方法、および3次元モデル生成プログラムに関するものである。
【0002】
【従来の技術】
以下、従来技術について説明する。たとえば、一つの視点から撮影されたパノラマ画像を用いて室内空間を3次元モデル化する従来の3次元モデル生成装置としては、特開2000−11172号公報に記載の「仮想環境生成方法および装置、並びに仮想環境プログラムを記録した記録媒体」がある。ここでは、室内空間を撮影したパノラマ画像上で操作員が特徴点を指定すると、指定した特徴点から、視点位置,視点と床,視点と天井の相対的な位置関係を求め、室内3次元モデルを簡易的に作成する。
【0003】
また、オブジェクトのある空間を生成する従来の3次元モデル生成装置としては、たとえば、特開平9−244522号公報に記載の「仮想建築物体験方法及び装置」がある。ここでは、操作員が建築物の平面図上で壁となる線分を指定しながら対話的に操作することで建築物の3次元モデル(建築物の仮想空間)を簡易的に作成し、さらに生成した仮想空間を仮想体験できる。なお、この装置では、建築物内部に配置するオブジェクトを予めモデリングソフトウェア等で作成し、建築物内部に配置している。
【0004】
【発明が解決しようとする課題】
しかしながら、上記、特開2000−11172号公報に記載された従来の3次元モデル生成装置では、空間を一つの直方体とみなして作成するため、直方体どうしが、たとえば、L字型に接続しているように欠落した空間を持つ場合や、曲がった形状を持つ場合や、空間が任意の方向に分岐しているような場合に、複雑な形状の空間を作成することが難しい、という問題があった。
【0005】
また、上記特開平9−244522号公報に記載された従来の3次元モデル生成装置では、室内に配置するオブジェクトを予め他のモデリングソフトウェアで作成しておく必要がある、という問題があった。また、モデリング作業においては、オブジェクトの特徴点を多数入力する等、煩雑な作業を要するため、初心者が簡単にオブジェクトの3次元モデルを作成することが難しい、という問題があった。また、オブジェクトを室内に配置するためには、オブジェクトの大きさを、配置する空間に合わせてスケーリングする作業が必要となり、オブジェクトを配置した室内の3次元モデルを誰もが簡単に作成することができない、という問題があった。
【0006】
本発明は、上記に鑑みてなされたものであって、凹部/凸部のある形状や曲がり形状や分岐形状等の複雑な形状をもつ空間を、少ない入力作業で簡易に作成可能な3次元モデル生成装置、3次元モデル生成方法および3次元モデル生成プログラムを得ることを目的とする。
【0007】
【課題を解決するための手段】
上述した課題を解決し、目的を達成するために、本発明にかかる3次元モデル生成装置にあっては、空間を撮影した画像を用いて空間の3次元モデルを作成する構成とし、たとえば、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段(後述する実施の形態の背景領域指定部1に相当)と、前記背景領域データに基づいて、複数の部分空間をつなぎあわせた空間3次元データを生成する空間3次元データ生成手段(空間3次元情報生成部11に相当)と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段(接続情報設定部12に相当)と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、すべての部分空間に対するテクスチャデータ生成処理が終了した段階で、前記接続関係および空間3次元データに基づいて接続面以外の面にテクスチャをマッピングし、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル生成手段(空間テクスチャ情報生成部13に相当)と、を備えることを特徴とする。
【0008】
つぎの発明にかかる3次元モデル生成装置にあっては、空間を撮影した画像を用いて空間の3次元モデルを作成する構成とし、たとえば、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段(部分空間3次元情報生成部41に相当)と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段(部分空間テクスチャ情報生成部42に相当)と、すべての部分空間3次元モデル生成処理が終了した段階で、当該部分空間3次元モデルおよび前記接続関係に基づいて、部分空間どうしの接続面のテクスチャを切り抜いた後、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段(部分空間接続部33に相当)と、を備えることを特徴とする。
【0009】
つぎの発明にかかる3次元モデル生成装置にあっては、さらに、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段(オブジェクト2次元情報生成部81に相当)と、前記部分空間3次元データ、前記背景領域データおよび前記指定頂点データに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段(オブジェクト付部分空間3次元情報生成部111に相当)と、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段(オブジェクト付部分空間テクスチャ情報生成部112に相当)と、を備え、前記3次元モデル接続手段(オブジェクト付空間生成部125に相当)は、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする。
【0010】
つぎの発明にかかる3次元モデル生成装置にあっては、さらに、前記静止画像の中からモデル化を行うオブジェクトの写っている静止画像を表示し、オブジェクトの奥面に対して平行に接しかつ壁面と交差する仮想的な背景領域に対応する仮想背景領域データを生成する仮想背景領域データ生成手段(仮想背景領域指定部171に相当)と、前記仮想背景領域の高さと幅に基づいて、仮想背景領域の全頂点の3次元座標を表す仮想背景領域3次元データを生成する仮想背景領域3次元データ生成手段(仮想背景領域3次元データ生成部172に相当)と、前記部分空間3次元データと前記仮想背景領域3次元データに基づいて、実在する壁面と仮想壁面のなす角度を表すオブジェクト傾きデータを生成する傾き計算手段(傾き計算部173に相当)と、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段(オブジェクト2次元情報生成部81に相当)と、前記部分空間3次元データ、前記仮想背景領域3次元データ、前記指定頂点データ、および前記オブジェクト傾きデータに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段(オブジェクト3次元情報生成部82に相当)と、前記静止画像、前記仮想背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段(オブジェクトテクスチャ情報生成部83に相当)と、を備え、前記3次元モデル接続手段(オブジェクト付空間生成部125に相当)は、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする。
【0011】
つぎの発明にかかる3次元モデル生成装置にあっては、さらに、作業中の部分空間の部分空間番号、オブジェクトの背景となる面の面番号、所定のオブジェクトサイズ情報をオブジェクト管理テーブルに設定するオブジェクト管理テーブル設定手段(オブジェクト管理テーブル設定部202に相当)と、指定されたオブジェクトの頂点の数が4個未満である場合に、前記オブジェクト管理テーブルから所定のオブジェクトサイズ情報を取得するオブジェクトサイズ情報取得手段(オブジェクト情報取得部201に相当)と、を備え、前記オブジェクト付部分空間3次元データ生成手段は、前記背景領域データ、前記指定頂点データ、および前記所定のオブジェクトサイズ情報に基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成することを特徴とする。
【0012】
つぎの発明にかかる3次元モデル生成装置にあっては、前記空間を直方体の集合体とみなして、空間の3次元モデルを生成することを特徴とする。
【0013】
つぎの発明にかかる3次元モデル生成装置にあっては、分岐のある空間を三角柱の集合体とみなして、空間の3次元モデルを生成することを特徴とする。
【0014】
つぎの発明にかかる3次元モデル生成装置にあっては、曲がりのある空間を六面体の集合体とみなして、空間の3次元モデルを生成することを特徴とする。
【0015】
つぎの発明にかかる3次元モデル生成装置にあっては、撮影した画像を用いてオブジェクトの3次元モデルを作成する構成とし、たとえば、オブジェクトの静止画像を表示し、指定された部分領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、前記背景領域データおよび前記指定頂点データに基づいてオブジェクトの3次元データを生成するオブジェクト3次元データ生成手段と、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータおよび前記オブジェクト3次元データに基づいてテクスチャをマッピングし、オブジェクトの3次元モデルを生成するオブジェクト3次元モデル生成手段と、を備えることを特徴とする。
【0016】
つぎの発明にかかる3次元モデル生成方法にあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成ステップと、前記背景領域データに基づいて、部分空間を構成する所定の面の高さおよび幅を表す部分空間サイズデータを生成する部分空間サイズデータ生成ステップと、前記部分空間サイズデータに基づいて部分空間の3次元形状を計算し、作成済みの部分空間の3次元形状をつなぎあわせた空間3次元データを生成する空間3次元データ生成ステップと、前記部分空間サイズデータおよび前記空間3次元データに基づいて、部分空間を構成するすべての面に関する所定のサイズ情報および端点の3次元座標を空間管理テーブルに設定する空間管理テーブル設定ステップと、新たな接続面の指定に伴い部分空間どうしの接続関係を接続テーブルに設定する接続情報設定ステップと、前記接続関係に基づいて、新たに接続された部分空間のすべての面に関する所定のサイズ情報および端点の3次元座標を空間管理テーブルに追記する空間管理テーブル追記ステップと、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成する部分空間テクスチャ生成ステップと、すべての部分空間に対するテクスチャデータ生成処理が終了した段階で、前記空間管理テーブル、前記接続テーブルおよび前記空間3次元データに基づいて接続面以外の面にテクスチャをマッピングし、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル生成ステップと、を含むことを特徴とする。
【0017】
つぎの発明にかかる3次元モデル生成方法にあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成ステップと、前記背景領域データに基づいて、部分空間を構成する所定の面の高さおよび幅を表す部分空間サイズデータを生成する部分空間サイズデータ生成ステップと、前記部分空間サイズデータに基づいて、部分空間の3次元形状である部分空間3次元データを生成する部分空間3次元データ生成ステップと、前記部分空間サイズデータおよび前記部分空間3次元データに基づいて、部分空間を構成するすべての面に関する所定のサイズ情報および端点の3次元座標を空間管理テーブルに設定する空間管理テーブル設定ステップと、新たな接続面の指定に伴い部分空間どうしの接続関係を接続テーブルに設定する接続情報設定ステップと、前記接続関係に基づいて、新たに接続された部分空間のすべての面に関する所定のサイズ情報および端点の3次元座標を空間管理テーブルに追記する空間管理テーブル追記ステップと、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成する部分空間テクスチャ生成ステップと、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成ステップと、すべての部分空間3次元モデル生成処理が終了した段階で、当該部分空間3次元モデル、前記空間管理テーブルおよび前記接続テーブルに基づいて、部分空間どうしの接続面のテクスチャを切り抜いた後、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル接続ステップと、を含むことを特徴とする。
【0018】
つぎの発明にかかる3次元モデル生成方法にあっては、さらに、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成ステップと、前記背景領域データおよび前記頂点データに基づいて、オブジェクトが正面および床面から離れているかどうかを判断し、さらに、オブジェクトの幅と高さと奥行きを表すオブジェクトサイズデータを生成するオブジェクトサイズデータ生成ステップと、オブジェクトが正面および床面から離れている場合に、前記背景領域データおよび前記頂点データに基づいて、その距離を表すオフセットデータを生成するオフセットデータ生成ステップと、前記部分空間3次元データ、前記オフセットデータおよび前記オブジェクトサイズデータに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成ステップと、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成するオブジェクトテクスチャ生成ステップと、前記オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成ステップと、を含み、前記3次元モデル接続ステップにあっては、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、前記空間管理テーブル、および前記接続テーブルに基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする。
【0019】
つぎの発明にかかる3次元モデル生成方法にあっては、さらに、前記静止画像の中からモデル化を行うオブジェクトの写っている静止画像を表示し、オブジェクトの奥面に対して平行に接しかつ壁面と交差する仮想的な背景領域に対応する仮想背景領域データを生成する仮想背景領域データ生成ステップと、前記仮想背景領域の高さと幅に基づいて、仮想背景領域の全頂点の3次元座標を表す仮想背景領域3次元データを生成する仮想背景領域3次元データ生成ステップと、前記部分空間3次元データと前記仮想背景領域3次元データに基づいて、実在する壁面と仮想壁面のなす角度を表すオブジェクト傾きデータを生成する傾き計算ステップと、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成ステップと、前記仮想背景領域の高さと幅、前記仮想背景領域データおよび前記指定頂点データに基づいて、オブジェクトの幅と高さと奥行きを表すオブジェクトサイズデータを生成するオブジェクトサイズデータ生成ステップと、前記部分空間3次元データ、前記仮想背景領域3次元データ、前記指定頂点データ、および前記オブジェクト傾きデータに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成ステップと、前記静止画像、前記仮想背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成するオブジェクトテクスチャ生成ステップと、前記オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成ステップと、を含み、前記3次元モデル接続ステップにあっては、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、前記空間管理テーブル、および前記接続テーブルに基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする。
【0020】
つぎの発明にかかる3次元モデル生成方法にあっては、さらに、作業中の部分空間の部分空間番号、オブジェクトの背景となる面の面番号、所定のオブジェクトサイズ情報をオブジェクト管理テーブルに設定するオブジェクト管理テーブル設定ステップと、指定されたオブジェクトの頂点の数が4個未満である場合に、前記オブジェクト管理テーブルから所定のオブジェクトサイズ情報を取得するオブジェクトサイズ情報取得ステップと、を備え、前記オブジェクト付部分空間3次元データ生成ステップにあっては、前記背景領域データ、前記指定頂点データ、および前記所定のオブジェクトサイズ情報に基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成することを特徴とする。
【0021】
つぎの発明にかかる3次元モデル生成方法にあっては、オブジェクトの静止画像を表示し、指定された部分領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成ステップと、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成ステップと、前記背景領域データおよび前記指定頂点データに基づいて、オブジェクトの幅と高さと奥行きを表すオブジェクトサイズデータを生成するオブジェクトサイズデータ生成ステップと、前記オブジェクトサイズデータに基づいて、オブジェクトの3次元座標であるオブジェクト3次元データを生成するオブジェクト3次元データ生成ステップと、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成するオブジェクトテクスチャ生成ステップと、前記オブジェクトテクスチャデータおよび前記オブジェクト3次元データに基づいてテクスチャをマッピングし、オブジェクトの3次元モデルを生成するオブジェクト3次元モデル生成ステップと、を含むことを特徴とする。
【0022】
つぎの発明にかかる3次元モデル生成プログラムにあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記背景領域データに基づいて、複数の部分空間をつなぎあわせた空間3次元データを生成する空間3次元データ生成手段と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、すべての部分空間に対するテクスチャデータ生成処理が終了した段階で、前記接続関係および空間3次元データに基づいて接続面以外の面にテクスチャをマッピングし、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル生成手段と、をコンピュータに実行させることを特徴とする。
【0023】
つぎの発明にかかる3次元モデル生成プログラムにあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段と、すべての部分空間3次元モデル生成処理が終了した段階で、当該部分空間3次元モデルおよび前記接続関係に基づいて、部分空間どうしの接続面のテクスチャを切り抜いた後、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段と、をコンピュータに実行させることを特徴とする。
【0024】
つぎの発明にかかる3次元モデル生成プログラムにあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段と、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、前記部分空間3次元データ、前記背景領域データおよび前記指定頂点データに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段と、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段と、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段と、をコンピュータに実行させることを特徴とする。
【0025】
つぎの発明にかかる3次元モデル生成プログラムにあっては、部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段と、部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段と、前記静止画像の中からモデル化を行うオブジェクトの写っている静止画像を表示し、オブジェクトの奥面に対して平行に接しかつ壁面と交差する仮想的な背景領域に対応する仮想背景領域データを生成する仮想背景領域データ生成手段と、前記仮想背景領域の高さと幅に基づいて、仮想背景領域の全頂点の3次元座標を表す仮想背景領域3次元データを生成する仮想背景領域3次元データ生成手段と、前記部分空間3次元データと前記仮想背景領域3次元データに基づいて、実在する壁面と仮想壁面のなす角度を表すオブジェクト傾きデータを生成する傾き計算手段と、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、前記部分空間3次元データ、前記仮想背景領域3次元データ、前記指定頂点データ、および前記オブジェクト傾きデータに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段と、前記静止画像、前記仮想背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段と、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段と、をコンピュータに実行させることを特徴とする。
【0026】
つぎの発明にかかる3次元モデル生成プログラムにあっては、オブジェクトの静止画像を表示し、指定された部分領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、前記背景領域データおよび前記指定頂点データに基づいてオブジェクトの3次元データを生成するオブジェクト3次元データ生成手段と、前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータおよび前記オブジェクト3次元データに基づいてテクスチャをマッピングし、オブジェクトの3次元モデルを生成するオブジェクト3次元モデル生成手段と、をコンピュータに実行させることを特徴とする。
【0027】
【発明の実施の形態】
以下に、本発明にかかる3次元モデル生成装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。
【0028】
実施の形態1.
図1は、本発明にかかる3次元モデル生成装置の実施の形態1の構成を示す図である。図1において、1は指定された部分空間の背景となる領域を背景領域データとして出力する背景領域指定部であり、2は部分空間を構成する面のサイズを部分空間サイズデータとして出力する部分空間サイズ取得部であり、3は部分空間サイズデータに基づいて部分空間の3次元形状を計算し、既に作成された部分空間とつなぎ合わせた後の空間の3次元幾何データを空間3次元データとして出力する空間3次元データ生成部であり、4は空間の3次元座標やサイズを管理するための空間管理テーブルを作成する空間管理テーブル設定部であり、5は指定した面に接続する別の部分空間の部分空間番号と面番号を接続テーブルに設定する接続設定部であり、6は接続テーブルに基づいて部分空間番号,面番号,接続面の3次元座標および部分空間サイズを空間管理テーブルに追記する空間管理テーブル追記部であり、7は部分空間の背景に相当する静止画像の一部分の切りだし/加工を行うことで部分空間テクスチャデータを出力する部分空間テクスチャ生成部であり、8は複数の部分空間をつなぎ合わせた空間にテクスチャをマッピングした3次元モデルを生成し、それを空間モデルデータとして出力する空間テクスチャマッピング部である。
【0029】
また、9は部分空間を構成する面の3次元座標と部分空間サイズデータを格納する空間管理テーブルであり、10は接続先の部分空間番号と面番号を格納する接続テーブルである。
【0030】
また、11は背景領域データおよび既に作成された部分空間の3次元データに基づいて3次元幾何データ(空間3次元データ)を生成する空間3次元情報生成部であり、部分空間サイズ取得部2と空間3次元データ生成部3と空間管理テーブル設定部4で構成される。12はどの部分空間のどの面がどの部分空間のどの面と接続するかという接続関係を設定する接続情報設定部であり、接続設定部5と空間管理テーブル追記部6で構成される。13はつなぎ合わされた複数の部分空間に対してテクスチャをマッピングした3次元モデルを空間モデルデータとして出力する空間テクスチャ情報生成部であり、部分空間テクスチャ生成部7と空間テクスチャマッピング部8で構成される。
【0031】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。なお、本実施の形態では、モデル化する空間を複数の直方体の集合体とみなし、個々の直方体を部分空間とする。また、直方体内部の6面は、「正面」,「右面」,「背面」,「左面」,「天井」,「床面」の名称によって区別する。さらに、前記の6つの名称は、空間全体に対して一方向に定められているものとし、空間を構成する各直方体は、同一方向にある場合、同一名称となる。
【0032】
図2は、空間を構成する直方体の集合体の一例を示す図である。ここでは、直方体ごとに、内部の6面(正面、右面、背面、左面、床面、天井)をディジタルカメラで撮影し、正面21a,左面21b,背面21c,左面21d,床面21e、天井21fの静止画像を得る。
【0033】
本実施の形態では、まず、直方体21を作成し、つぎに、直方体21の右側に直方体22を接続する場合を、一例として説明する。なお、最初に作成する直方体は任意である。
【0034】
まず、背景領域指定部1では、静止画像21a〜21fをディスプレイに表示する。図3は、表示された静止画像を示す図である。ここで、操作員が、マウス等を用いて各画像上の正面21a,右面21b,背面21c,左面21d,床面21e,天井21fに相当する部分領域を四辺形で指定する。このとき、背景領域指定部1では、指定された領域の端点に対応する平面座標に基づいて背景領域データを生成し、当該背景領域データを部分空間サイズ取得部2および部分空間テクスチャ生成部7に対して通知する。ただし、平面座標系における原点は静止画像の中心とし、単位はドット(dot)とする。
【0035】
部分空間サイズ取得部2では、操作員の入力による直方体の高さと上記背景領域データを受け取ると、直方体の正面21aと右面21bの幅をそれぞれ計算する。そして、計算した高さと幅に基づいて部分空間サイズデータを生成し、当該部分空間サイズデータを空間3次元データ生成部3および空間管理テーブル設定部4に対して通知する。床面21e,天井21f,左面21d,背面21cの幅は、全体が直方体であることから決定される。
【0036】
なお、部分空間サイズ取得部2では、最初の直方体を作成する場合、背景領域データを受け取った段階で直方体の正面21aと右面21bに対して幅を自動的に計算し、部分空間サイズデータを出力する。一方、2番目以降の直方体を作成する場合には、背景領域データを受け取った段階で、後述する空間管理テーブル追記部6において出力された空間管理テーブルを参照し、正面21aあるいは右面21bに対して幅が設定されていない場合には、その幅を計算し、空間サイズデータとして出力する。ただし、空間管理テーブルにおいて高さと幅が既知である場合にはこれを空間サイズデータとする。
【0037】
ここで、正面21aおよび右面21bの幅Wの計算方法を、図面を用いて説明する。図4は、幅Wの計算方法を説明するための図である。この計算方法は、前原秀明、中村亘、田中聡、「実写静止画を利用したリアルタイムCGのための仮想室内空間の簡易制作」、電学論C、Vol.120-C、No.7、pp.977-985、2000に詳細に説明されている。ただし、各写真は、中心の点が指定された部分領域に含まれるように、かつカメラをほぼ水平にして、撮影されているものとする。また、角度の単位はディグリ(degree)とする。
【0038】
W=√(Drt2+Dlt2−2*Drt*Dlt*cosθt) (1)
ただし、
θr=cos-1((drt2+drb2+2*F2−drt_rb2
/(2*√(drt2+F2)√(drb2+F2))) (2)
F=Cx/(2*tan(Ca/2)) (3)
Dr=(√(4*h(H−h)*tan2θr+H2)+H)
/(2*tanθr) (4)
Drt=√(Dr2+(H−h)2) (5)
Drb=√(Dr2+h2) (6)
を前提とする。
【0039】
なお、drtは、背景領域を構成する右の縦線上方の頂点をVrtとしたとき、Vrtから静止画の中心までの距離(単位はドット)を表す。また、drbは、背景領域を構成する右の縦線下方の頂点をVrbとしたとき、Vrbから静止画の中心までの距離(単位はドット)を表す。また、drt_rbは、VrtとVrbの静止画上の距離(単位はドット)を表す。また、hは、カメラの床面からの高さを表す。また、DrtはVrtとカメラとの距離を表す。DrbはVrbとカメラとの距離を表す。また、Drは背景領域を構成する右の縦線とカメラとの距離を表す。また、静止画の水平方向の画素数(単位はドット)Cxおよびカメラの水平方向の視野角(単位はディグリ)Caについては、ディジタルカメラによって異なる。
【0040】
このとき、カメラの焦点距離F、および静止画上の距離drt,drb,drt_rbによりθrが求まり、このθrを用いると、Drt,Drbをhの変数として表すことができる。同様にして、背景領域を構成する左の縦線でも、Dlt、Dlbがhの変数として表されるので、幅Wを媒介とすると以下の方程式(7)が得られる。
Drt2+Dlt2−2*Drt*Dlt*cosθt
=Drb2+Dlb2−2*Drb*Dlb*cosθb (7)
この式は、hの1変数方程式であるので、求めたhを用いてWを求めることができる。
【0041】
つぎに、部分空間サイズデータを受け取った空間3次元データ生成部3では、当該データに基づいて部分空間の3次元形状を計算する。そして、既に作成した部分空間とつなぎ合わせた「空間の3次元幾何データ」、すなわち、空間3次元データを生成し、当該空間3次元データを空間管理テーブル設定部4および空間テクスチャマッピング部8に通知する。このとき、最初に作成する直方体に関しては、操作員の指示で、当該直方体を空間のしかるべき位置に配置するための基準点を、各頂点の中から選択する。そして、基準点の3次元座標を設定後、空間3次元データ生成部3では、直方体21のすべての頂点に対して3次元座標を計算し、その計算結果として空間3次元データを出力する。
【0042】
空間管理テーブル設定部4では、上記部分空間サイズ取得部2にて生成された部分空間サイズデータと空間3次元データ生成部3にて生成された空間3次元データに基づいて、正面21a,右面21b,背面21c,左面21d,床面21e,天井21f単位に、端点の3次元座標、直方体の高さ、および正面と右面に対応するそれぞれの幅、を空間管理テーブル9に対して設定する。この空間管理テーブル9は、後述する空間管理テーブル追記部6において参照される。
【0043】
図5は、空間管理テーブル9の一例を示す図である。ここでは、部分空間番号が各直方体に固有の番号となる。なお、面番号において、a〜fは、正面,右面,背面,左面,床面,天井の順に付けられており、数字の部分は、部分空間番号となっている。
【0044】
つぎに、たとえば、直方体21の右面21bに別の直方体22を接続する場合、接続設定部5では、操作員により、作業中の6面の中から別の直方体を接続する面が指定されると、指定された面に接続する別の部分空間の面番号を自動的に接続テーブル10に設定する。図6は、接続テーブル10の一例を示す図である。接続元部分空間番号には、作業中の直方体の部分空間番号が設定される。この接続元部分空間番号は、空間管理テーブル設定部4において設定された部分空間番号と同一である。また、接続元面番号には、接続元部分空間番号の直方体内部の6面に対応する面番号が設定される。この接続元面番号は、空間管理テーブル設定部4において設定された面番号と同一である。
【0045】
そして、たとえば、接続面として右面21bが指定された場合、接続テーブル10には、接続元面番号(21b)の横の欄に接続先部分空間番号として22が、そして、接続先面番号として22dが、自動的に設定される。なお、接続テーブル10は、後述する空間管理テーブル追記部6および空間テクスチャマッピング部8において参照される。
【0046】
空間管理テーブル追記部6では、接続テーブル10を参照して、直方体21に接続する直方体22の部分空間番号,面番号,接続面の3次元座標および幅を、空間管理テーブル9に対して追記する。ここでは、接続テーブル10に接続先部分空間番号として22が設定されているので、空間管理テーブル9に対して、部分空間番号として22を追記し、そして、面番号として22a〜22f(図示せず)を追記する。また、接続テーブル10に、接続元面番号(21b)に対応する接続先面番号として22dが設定されているので、接続先面番号(22d)に対応する面の幅は、接続元面番号(21b)の面の幅と等しくなる。そのため、空間管理テーブル9には、部分空間番号(22)の右面幅に部分空間番号(21)の右面幅と同じ値を追記する。また、高さも同様に追記する。また、面番号(21b)の3次元座標を、面番号(22b)の3次元座標の欄に追記する。
【0047】
部分空間テクスチャ生成部7では、背景領域指定部1から受け取った静止画像と背景領域データに基づいて、直方体の各面単位に、背景領域として指定された四辺形の部分領域を切り取り、さらに、切り取った部分が長方形となるように加工することで、部分空間テクスチャデータを生成する。そして、当該部分空間テクスチャデータを空間テクスチャマッピング部8に対して通知する。
【0048】
ここで、テクスチャ加工の方法について説明する。この方法は、特開平11−144076に詳細に記載されている。部分空間テクスチャ生成部7では、背景領域データに基づいて、以下の(8)〜(21)ように、視点位置(Vx,Vy,Vz)、視線とポリゴンの角度θ、およびウインドウの縦サイズwy(dot)等のパラメータを算出する。ただし、座標は仮想3次元空間における座標の値とし、角度の単位はディグリ(degree)とする。
【0049】

Figure 0004017351
【0050】
ただし、(X1,Y1)は領域データの左下隅の座標を表し、(X2,Y2)は領域データの右下隅の座標を表し、(X3,Y3)は領域データの右上隅の座標を表し、(X4,Y4)は領域データの左上隅の座標を表し、Cyはウインドウの水平画素数を表す。
【0051】
そして、部分空間テクスチャ生成部7では、透視投影変換の機能を利用して、部分領域が長方形に変形された 部分空間テクスチャデータを生成する。具体的にいうと、まず、部分空間テクスチャ生成部7では、透視投影変換により、横幅640ドット、縦幅Wyドット、視野角Caの表示ウインドウをディスプレイに表示する。つぎに、4つの頂点(−320.0,0,240.0)、(320.0,0,240.0)、(320.0,0,−240.0)、(−320.0,0,−240.0)によって定義されるポリゴンを仮3次元空間に配置し、Y軸を軸として反時計回りにθだけ回転させ、視点位置を点(Vx,Vy,Vz)に移し、視線方向を水平方向の傾き0.0およびZ軸と平行とし、かつ原点が見えるようにする。最後に、表示ウインドウに表示されている内容全体を部分空間テクスチャデータとして出力する。
【0052】
つぎに、直方体21の右側に直方体22を接続する場合の3次元モデル生成装置の動作を説明する。ここでは、上記直方体21を生成する動作と異なる動作についてのみ説明する。まず、上記と同様の動作で背景領域データを出力後、部分空間サイズ取得部2では、空間管理テーブル追記部6にて設定された空間管理テーブル9を参照し、正面あるいは右面に対応する幅が設定されていない場合に、その幅を計算し、部分空間サイズデータを生成する。そして、当該部分空間サイズデータを空間3次元データ生成部3および空間管理テーブル設定部4に対して通知する。
【0053】
空間3次元データ生成部3では、受け取った部分空間サイズデータに基づいて部分空間の3次元形状を計算する。そして、既に作成した部分空間とつなぎ合わせた「空間の3次元幾何データ」、すなわち、空間3次元データを生成する。ここでは、面番号として22dが設定された直方体22の左面については、4個の頂点の3次元座標が既に空間管理テーブル9に設定されているので、この中の1点を基準点とする。したがって、この基準点の3次元座標と上記部分空間サイズデータに基づいて、直方体22のすべての頂点に対応する3次元座標を計算し、直方体21と直方体22が接続した状態の3次元データを空間3次元データとして出力する。
【0054】
以降、空間管理テーブル設定部4、接続設定部5、空間管理テーブル追記部6、および部分空間テクスチャ生成部7では、直方体21を生成する場合と同様の手順で処理を行う。
【0055】
つぎに、空間テクスチャマッピング部8では、すべての直方体に対する処理が完了した段階で(ここでは、直方体21および直方体22の処理に相当)、空間3次元データおよび空間を構成するすべての直方体の部分空間テクスチャデータを受け取り、空間管理テーブル9と接続テーブル10を参照して、接続する面以外の面にテクスチャをマッピングし、複数の部分空間をつなぎ合わせた空間モデルデータを生成する。この空間モデルデータは、たとえば、VRML形式で出力し、VRMLブラウザを用いて表示する。
【0056】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して複数の空間を生成し、複数の空間を平面方向および鉛直方向に自由につなぎ合わせる構成とした。具体的にいうと、複数の直方体が接続された状態の空間3次元データに対してテクスチャをマッピングすることで、複数の部分空間をつなぎ合わせた空間モデルデータを生成する構成とした。これにより、複雑な形状の3次元モデルを生成することができる。また、空間の外郭を形成する直方体をずらして配置することにより、展望室のような円形状の室内やドームのような球状の空間に対しても適用することができる。
【0057】
実施の形態2.
前述の実施の形態1では、複数の直方体が接続された状態の空間3次元データに対してテクスチャをマッピングすることで、空間モデルデータを生成する。一方、実施の形態2では、空間を構成する個々の直方体に対してテクスチャをマッピングし、すべての直方体に対してマッピング処理を終えた段階で、すべての直方体を接続することで、空間モデルデータを生成する。
【0058】
図7は、本発明にかかる3次元モデル生成装置の実施の形態2の構成を示す図である。なお、前述の実施の形態1と同様の構成については、同一の符号を付してその説明を省略する。図7において、31は部分空間サイズデータに基づいて部分空間の3次元形状を計算し、その計算結果を部分空間3次元データとして出力する部分空間3次元データ生成部であり、32は部分空間3次元データと部分空間テクスチャデータに基づいて部分空間にテクスチャをマッピングした3次元モデルを生成し、それを部分空間モデルデータとして出力する部分空間テクスチャマッピング部であり、33は空間管理テーブル9と接続テーブル10に基づいて各部分空間を接続させた空間の3次元データを生成し、部分空間どうしの接続面のテクスチャを切り抜いて空間の3次元モデルを生成し、それを空間3次元モデルデータとして出力する部分空間接続部である。
【0059】
また、41は背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元情報生成部であり、部分空間サイズ取得部2と部分空間3次元データ生成部31と空間管理テーブル設定部4で構成される。42は部分空間に対してテクスチャをマッピングした3次元モデルを部分空間モデルデータとして出力する部分空間テクスチャ情報生成部であり、部分空間テクスチャ生成部7と部分空間テクスチャマッピング部32で構成される。
【0060】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。なお、本実施の形態では、実施の形態1と同様に、直方体21と直方体22をつなぎ合わせた空間を作成する(図2参照)。また、ここでは、前述の実施の形態1と異なる動作についてのみ説明を行う。
【0061】
まず、実施の形態1と同様の動作で、背景領域データ生成処理および部分空間サイズデータ生成処理を実行後、部分空間3次元データ生成部31では、当該部分空間サイズデータに基づいて部分空間の3次元形状を計算することで部分空間3次元データを生成し、当該部分空間3次元データを空間管理テーブル設定部4および部分空間テクスチャマッピング部32に対して通知する。このとき、最初に作成する直方体21に関しては、前述の実施の形態1と同様の手順で、基準点の3次元座標を設定後、直方体21のすべての頂点に対して3次元座標を計算し、その計算結果として部分空間3次元データを出力する。一方、その後に作成する直方体22に関しては、基準点は任意とし、かつ直方体22のサイズに従った、部分空間3次元データが生成される。
【0062】
空間管理テーブル設定部4では、部分空間サイズ取得部2にて生成された部分空間サイズデータと部分空間3次元データ生成部31にて生成された部分空間3次元データに基づいて、正面21a,右面21b,背面21c,左面21d,床面21e,天井21f単位に、端点の3次元座標、直方体の高さ、および正面と右面に対応するそれぞれの幅、を空間管理テーブル9に対して設定する(図5参照)。この空間管理テーブル9は、前述の実施の形態1と同様、空間管理テーブル追記部6において参照される。
【0063】
つぎに、実施の形態1と同様の動作で、接続テーブル10への設定処理(図6参照)、空間管理テーブル9への追記処理、および部分空間テクスチャデータ生成処理を実行後、部分空間テクスチャマッピング部32では、上記部分空間3次元データと部分空間テクスチャデータに基づいて、部分空間にテクスチャをマッピングし、部分空間モデルデータを生成する。本実施の形態では、直方体21に関する処理を終えた時点で、直方体21の3次元モデルが作成される。
【0064】
つぎに、直方体21の右側に直方体22を接続する場合の3次元モデル生成装置の動作を説明する。ここでは、上記直方体21を生成する動作と異なる動作についてのみ説明する。上記と同様の手順で、背景領域データ生成処理、および部分空間サイズデータ生成処理を実行後、部分空間3次元データ生成部31では、当該部分空間サイズデータに基づいて、任意の点を基準として直方体22の3次元幾何データを計算することで、部分空間3次元データを生成する。そして、当該部分空間3次元データを空間管理テーブル設定部4および部分空間テクスチャマッピング部32に対して通知する。
【0065】
つぎに、直方体21に関する処理と同様の手順で、空間管理テーブル9への設定処理、接続テーブル10への設定処理、空間管理テーブル9への追記処理、部分空間テクスチャデータ生成処理、および部分空間モデルデータ生成処理を実行後、部分空間接続部33では、空間管理テーブル9と接続テーブル10に基づいて、直方体21と直方体22をつなぎ合わせた空間の3次元データを生成する。
【0066】
たとえば、接続テーブル10を参照すると、直方体21の面21bと直方体22の面22dが接していることが分かる。また、直方体21の3次元座標は基準点に基づいて生成されたものであり、直方体21は空間のしかるべき位置に配置されているため、部分空間接続部33では、直方体22の3次元座標を変換して、左面22dと右面21bが接続するようにすればよい。
【0067】
そこで、部分空間接続部33では、空間管理テーブル9から右面21bおよび左面22dの3次元座標を取得し、左面22dの3次元座標が右面21bの座標に等しくなるように、直方体22の全頂点の3次元座標を変換することにより、直方体21と直方体22をつなぎ合わせた空間の3次元座標を生成する。また、右面21bと左面22dが接続することから、この2つの面に対してマッピングされているテクスチャデータを切り抜き、直方体21と直方体22をつなぎ合わせた空間3次元モデルデータを生成する。
【0068】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して複数の空間を生成し、複数の空間を平面方向および鉛直方向に自由につなぎ合わせる構成とした。具体的にいうと、空間を構成する個々の直方体に対してテクスチャをマッピングし、すべての直方体に対してマッピング処理を終えた段階で、すべての直方体を接続することで、空間モデルデータを生成する構成とした。これにより、複雑な形状の3次元モデルを生成することができる。また、空間の外郭を形成する直方体をずらして配置することにより、展望室のような円形状の室内やドームのような球状の空間に対しても適用することができる。
【0069】
実施の形態3.
実施の形態3では、分岐のある空間の3次元モデルを生成する。なお、本実施の形態の構成については、先に説明した実施の形態1の図1と同様であるため、同一の符号を付してその説明を省略する。ここでは、実施の形態1と異なる動作についてのみ説明を行う。
【0070】
以下、本実施の形態における3次元モデル生成装置の動作を説明する。図8は、分岐のある空間の一例を示す図である。本実施の形態では、分岐のある空間を複数の三角柱の集合体とみなし、各三角柱を部分空間とする。そして、三角柱単位に、内部の5面(側面3つおよび天井、床面)をディジタルカメラで撮影し、静止画像を得る。
【0071】
図9は、実施の形態3における空間の3次元モデルを示す図である。本実施の形態では、まず、図9(a)に示す三角柱51を作成し、つぎに、三角柱51の側面に図9(b)に示す三角柱52を接続する場合(図9(c)参照)を、一例として説明する。なお、最初に作成する三角柱は任意である。
【0072】
まず、背景領域指定部1では、三角柱51の内部の面を撮影した静止画像をディスプレイに表示する。ここで、操作員がマウス等を用いて部分領域を指定すると、背景領域指定部1では、指定された部分領域の端点に対応する平面座標に基づいて背景領域データを生成し、当該背景領域データを部分空間サイズ取得部2および部分空間テクスチャ生成部7に対して通知する。たとえば、側面に対しては、画像上の側面の部分領域を四辺形で指定し、天井および床面に対しては、画像上の天井および床面の部分領域を三角形で指定する。
【0073】
部分空間サイズ取得部2では、操作員の入力による三角柱51の側面の幅と高さ、および上記背景領域データに基づいて、部分空間サイズデータを生成し、当該部分空間サイズデータを空間3次元データ生成部3および空間管理テーブル設定部4に対して通知する。
【0074】
空間3次元データ生成部3では、受け取った部分空間サイズデータに基づいて三角柱51の3次元形状を計算する。そして、実施の形態1と同様に、空間3次元データを生成し、当該空間3次元データを空間管理テーブル設定部4および空間テクスチャマッピング部8に対して通知する。このとき、最初に作成する三角柱51に関しては、操作員の指示で、三角柱51を空間のしかるべき位置に配置するための基準点(U)を、各頂点の中から選択する。そして、基準点の3次元座標を設定後、空間3次元データ生成部3では、三角柱51のすべての頂点に対して3次元座標を計算し、その計算結果として空間3次元データを出力する。一方、2番目以降に作成する三角柱に関しては、空間管理テーブル設定部4にて設定した空間管理テーブル9および接続設定部5にて設定した接続テーブル10に基づいて、基準点が自動的に設定される。
【0075】
空間管理テーブル設定部4では、上記部分空間サイズ取得部2にて生成された部分空間サイズデータと空間3次元データ生成部3にて生成された空間3次元データに基づいて、部分空間の各面における端点の3次元座標と面の幅を、空間管理テーブル9に対して設定する。この空間管理テーブル9は、空間テクスチャマッピング部8において参照される。
【0076】
図10は、空間管理テーブル9の一例を示す図である。ここでは、各部分空間番号が各三角柱に固有の番号となる。なお、側面(1)は、三角柱の外側から見たときに基準点が面の左下端にある面とし、側面(2)と側面(3)は、側面(1)から見て時計回りの順に、側面(2),側面(3)とする。また、面番号において、a〜eは、側面(1),側面(2),側面(3),天井,床面の順に付けられており、数字の部分は、部分空間番号を表している。
【0077】
つぎに、たとえば、三角柱51の側面(1)に別の三角柱52を接続する場合、接続設定部5では、操作員により、作業中の5面の中から別の三角柱を接続する面が指定されると、指定された面に接続する別の三角柱の面番号を自動的に接続テーブル10に設定する。図11は、接続テーブル10の一例を示す図である。接続元部分空間番号および接続先部分空間番号は、空間管理テーブル9の部分空間番号と同一である。
【0078】
そして、たとえば、接続面として側面(1)が指定された場合、接続テーブル10には、接続元面番号(51a)の横の欄に接続先部分空間番号として52が、そして、接続先面番号として52aが、自動的に設定される。この場合、接続先の面は側面(1)としてよい。
【0079】
空間管理テーブル追記部6では、接続テーブル10を参照して、三角柱51に接続する三角柱52の部分空間番号,面番号,接続面の3次元座標と幅と高さを、空間管理テーブル9に対して追記する。ここでは、接続テーブル10に接続先空間番号として52が設定されているので、空間管理テーブル9に対して、部分空間番号として52を追記し、そして、面番号として52a〜52eを追記する。また、接続テーブル10に、接続元面番号(51a)に対応する接続先面番号として52aが設定されているので、接続先面番号(52a)に対応する幅と高さは、接続元面番号(51a)の幅と高さに各々等しくなる。そのため、空間管理テーブル9には、部分空間番号(52)の側面(1)の幅と高さに、部分空間番号(51)の側面(1)の幅と高さを追記する。また、面番号(51a)の3次元座標を面番号(52a)の3次元座標の欄に追記する。
【0080】
部分空間テクスチャ生成部7では、背景領域指定部1から受け取った静止画像と背景領域データに基づいて、三角柱の各面単位に、背景領域として指定された部分領域を切り取り、さらに、切り取った部分を加工して部分空間テクスチャデータを生成する。そして、当該部分空間テクスチャデータを空間テクスチャマッピング部8に対して通知する。画像の加工においては、画像に歪みを発生させる他の写真加工ソフトウェアを使ってもよい。
【0081】
つぎに、三角柱51の側面(1)に三角柱52を接続する場合の3次元モデル生成装置の動作を説明する。ここでは、上記三角柱51を生成する動作と異なる動作についてのみ説明する。まず、上記と同様の動作で背景領域データを出力後、部分空間サイズ取得部2では、空間管理テーブル追記部6にて設定された空間管理テーブル9を参照し、側面(1)、側面(2)または側面(3)に対応する幅が設定されていない場合に、部分空間サイズデータを生成する。そして、当該部分空間サイズデータを空間3次元データ生成部3および空間管理テーブル設定部4に対して通知する。
【0082】
空間3次元データ生成部3では、受け取った部分空間サイズデータに基づいて部分空間の3次元形状を計算する。そして、既に作成した部分空間とつなぎ合わせた空間3次元データを生成する。ここでは、面番号として52aが設定された三角柱52の側面(1)については、面を形成する端点の3次元座標が既に空間管理テーブル9に設定されているので、この中の1点を基準点とする。したがって、この基準点の3次元座標と上記部分空間サイズデータに基づいて、三角柱52のすべての頂点に対応する3次元座標を計算し、三角柱51と三角柱52が接続した状態の空間3次元データとして出力する。
【0083】
以降、空間管理テーブル設定部4、接続設定部5、空間管理テーブル追記部6、および部分空間テクスチャ生成部7では、三角柱51を生成する場合と同様の手順で処理を行う。
【0084】
つぎに、空間テクスチャマッピング部8では、すべての三角柱に対する処理が完了した段階で(ここでは、三角柱51および三角柱52の処理に相当)、空間3次元データおよび空間を構成するすべての三角柱の部分空間テクスチャデータを受け取り、空間管理テーブル9と接続テーブル10を参照して、接続する面以外の面にテクスチャをマッピングし、複数の三角柱をつなぎあわせた分岐形状の空間モデルデータを生成する。この空間モデルデータは、たとえば、VRML形式で出力し、VRMLブラウザを用いて表示する。
【0085】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して複数の三角柱を生成する構成としたため、分岐形状を有する空間の3次元モデルを簡単に生成することができる。
【0086】
なお、本実施の形態では、分岐のある空間の3次元データを実施の形態1の構成を用いて生成したが、これに限らず、たとえば、実施の形態2の構成を適用することとしてもよい。
【0087】
実施の形態4.
実施の形態4では、曲がりのある空間の3次元モデルを生成する。なお、本実施の形態の構成については、先に説明した実施の形態1の図1と同様であるため、同一の符号を付してその説明を省略する。ここでは、実施の形態1と異なる動作についてのみ説明を行う。
【0088】
以下、本実施の形態における3次元モデル生成装置の動作を説明する。図12は、実施の形態4における曲がりのある空間の一例を示す図である。本実施の形態では、曲がりのある空間を複数の六面体の集合体とみなし、各六面体を部分空間とする。そして、六面体単位に、内部の6面をディジタルカメラで撮影し、静止画像を得る。ここでは、曲がりの形状に沿った面を右面あるいは左面とし、右面および左面との位置関係から正面,背面,天井,床面とする。
【0089】
本実施の形態では、まず、図12に示す六面体61を作成し、つぎに、六面体61の正面に六面体62を接続する場合を、一例として説明する。なお、最初に作成する六面体は任意である。
【0090】
背景領域指定部1では、先に説明した実施の形態1と同様の手順で、静止画像をディスプレイに表示し、その後、指定された領域の端点に対応する平面座標に基づいて背景領域データを生成し、当該背景領域データを部分空間サイズ取得部2および部分空間テクスチャ生成部7に対して通知する。
【0091】
部分空間サイズ取得部2では、操作員の入力による六面体61の各側面の幅と高さ、および上記背景領域データに基づいて、部分空間サイズデータを生成し、当該部分空間サイズデータを空間3次元データ生成部3および空間管理テーブル設定部4に対して通知する。
【0092】
空間3次元データ生成部3では、受け取った部分空間サイズデータに基づいて六面体61の3次元形状を計算する。そして、実施の形態1と同様に、空間3次元データを生成し、当該空間3次元データを空間管理テーブル設定部4および空間テクスチャマッピング部8に対して通知する。なお、基準点の設定方法については、前述の実施の形態3と同様である。
【0093】
つぎに、空間管理テーブル設定部4、接続設定部5、空間管理テーブル追記部6、および部分空間テクスチャ生成部7では、実施の形態1と同様の手順で処理を行い、六面体61に対する処理を完了する。また、六面体61の正面に六面体62を接続する場合についても、3次元モデル生成装置の各部では、先に説明した実施の形態1と同様の手順で処理を行う。以降、本実施の形態では、曲がりの空間を構成するすべての六面体に対して上記処理を実行する。
【0094】
つぎに、空間テクスチャマッピング部8では、先に説明した実施の形態1と同様の手順で、すべての三角柱に対する処理が完了した段階で、空間3次元データおよび空間を構成するすべての六面体の部分空間テクスチャデータに基づいて、複数の六面体をつなぎあわせた曲がり形状の空間モデルデータを生成する。
【0095】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して複数の六面体を生成する構成としたため、曲がりのある空間の3次元モデルを簡単に生成することができる。
【0096】
なお、本実施の形態では、曲がりのある空間の3次元データを実施の形態1の構成を用いて生成したが、これに限らず、たとえば、実施の形態2の構成を適用することとしてもよい。
【0097】
実施の形態5.
実施の形態5では、空間に配置しているオブジェクトの3次元モデルを生成する。なお、先に説明した実施の形態1と同様の構成については、同一の符号を付してその説明を省略する。
【0098】
図13は、本発明にかかる3次元モデル生成装置の実施の形態5の構成を示す図である。図13において、71は指定されたオブジェクトの頂点の平面座標に基づいて指定頂点データを生成するオブジェクト指定部であり、72は指定されていない頂点の平面座標に基づいて計算頂点データを生成する頂点計算部であり、73はオブジェクトの幅,高さ,奥行きに基づいてオブジェクトサイズデータを生成するオブジェクトサイズ計算部であり、74は背景領域データおよび指定頂点データに基づいてオブジェクトの3次元データを生成するオブジェクト3次元データ生成部であり、75は静止画像からオブジェクトに相当する部分を切り出し/加工を行い、オブジェクトテクスチャデータを生成するオブジェクトテクスチャ生成部であり、76はオブジェクト3次元データとオブジェクトテクスチャデータに基づいてテクスチャをマッピングしたオブジェクトモデルデータを生成するオブジェクトテクスチャマッピング部である。
【0099】
また、81は静止画像をディスプレイに表示し、指定された、オブジェクトを近似する直方体の頂点の平面座標を指定頂点データとして出力するオブジェクト2次元情報生成部であり、82は背景領域データと指定頂点データに基づいてオブジェクトを近似する直方体の3次元データを生成するオブジェクト3次元情報生成部であり、83はオブジェクトを近似する直方体の3次元データとオブジェクトテクスチャデータに基づいてテクスチャをマッピングしたオブジェクトモデルデータを出力するオブジェクトテクスチャ情報生成部である。
【0100】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。図14は、実施の形態5における空間の3次元モデルを示す図である。まず、背景領域指定部1では、壁面を背景としてオブジェクトが写っている静止画像91をディスプレイに表示する。ここで、操作員がマウス等を用いてオブジェクトの背景となっている壁面に相当する部分領域を四辺形で指定すると、背景領域指定部1では、指定された4点の平面座標に基づいて背景領域データを生成し、当該背景領域データをオブジェクトサイズ計算部73およびオブジェクトテクスチャ生成部75に対して通知する。
【0101】
オブジェクト指定部71では、背景領域指定部1において表示された静止画像91に基づいてオブジェクトの形状を直方体で近似する。ここで、その直方体の頂点を操作員がマウス等で指定すると、オブジェクト指定部71では、指定した頂点の平面座標に基づいて指定頂点データを生成し、当該指定頂点データを頂点計算部72、オブジェクトサイズ計算部73およびオブジェクトテクスチャ生成部75に対して通知する。
【0102】
ただし、指定する頂点の数は最小で4個とする。このときの4つの頂点は、直方体の幅,高さ,奥行きに相当するものとし、この頂点が3次元直交座標系の3軸に相当するように指定する。たとえば、図14では、頂点91c,頂点91f,頂点91g,頂点91hを指定している。なお、他の指定例として、たとえば、頂点91b,頂点91c,頂点91d,頂点91gを指定することとしてもよい。また、画像に写っている直方体のすべての頂点を指定することとしてもよい。以降、オブジェクトを近似している直方体を、単に「オブジェクト」と呼ぶ。
【0103】
頂点計算部72では、オブジェクトを構成するすべての頂点の中の、指定頂点データとして出力されていない頂点の平面座標に基づいて、計算頂点データを生成し、当該計算頂点データをオブジェクトサイズ計算部73およびオブジェクトテクスチャ生成部75に対して通知する。図14では、頂点91a,頂点91b,頂点91d,頂点91eの平面座標を出力する。これらの頂点の平面座標は、指定頂点データおよびオブジェクトの形状が直方体であること、を利用して計算する。
【0104】
オブジェクトサイズ計算部73では、上記背景領域データおよび指定頂点データに基づいて、オブジェクトの幅,高さ,奥行きを自動的に計算することで、オブジェクトサイズデータを生成する。そして、当該オブジェクトサイズデータをオブジェクト3次元データ生成部74に対して通知する。
【0105】
ここで、オブジェクトの幅M,高さN,奥行きKの計算方法を説明する。図15は、オブジェクトの幅,高さ,奥行きの計算方法(Dl<Drの場合の一例)を示す図である。なお。壁面の高さH,幅Wは、実施の形態1に示した方法により、既に分かっているものとする。また、オブジェクトは壁面に接しているものとし、壁面に対して傾いていないものとする。
【0106】
まず、幅Mは、壁面の幅W,背景領域データ,指定頂点データ,計算頂点データを用いて計算する。具体的にいうと、静止画像上で、壁面上のオブジェクトの幅に相当する線分と壁面の幅に相当する線分とを対象とし、線分の長さと壁面の幅Wとの比率から計算する。同様にして、高さNは、壁面の高さH、背景領域データ,指定頂点データ,計算頂点データを用いて計算する。具体的にいうと、静止画像で、壁面上におけるオブジェクトの高さに相当する線分と壁面の高さに相当する線分とを対象とし、線分の長さと壁面の高さHとの比率から計算する。
【0107】
つぎに、奥行きKは、以下の計算式(22)〜(28)に基づいて、いくつかのパラメータを算出する。
Figure 0004017351
s=H/(Y5−Y6) (23)
θ=cos-1(Pz/L) (24)
δo=tan-1(x0/F) (25)
δc=tan-1(x3/F) (26)
Po=Pz*tan(∠o) (27)
Pc=Pz*tan(∠c) (28)
【0108】
ただし、(X1,Y1)は背景領域データの左下隅の座標を表し、(X2,Y2)は背景領域データの右下隅の座標を表し、(X3,Y3)は背景領域データの右上隅の座標を表し、(X4,Y4)は背景領域データの左上隅の座標を表し、Cxは点(X1,Y1)および点(X3,Y3)を結ぶ直線と点(X4,Y4)および点(X2,Y2)を結ぶ直線との交点のx座標を表し、Y5は点(X4,Y4)と点(X3,Y3)を結ぶ直線上でx座標値をCxとしたときのy座標を表し、Y6は点(X1,Y1)と点(X2,Y2)を結ぶ直線上でx座標値をCxとしたときのy座標を表し、x0は指定頂点データの中の直方体の原点に相当する頂点のx座標を表し、x3は指定頂点データの中の直方体の奥行き方向に相当する頂点のx座標を表す。
【0109】
また、Dl>Drの場合は、以下の計算式(29)〜(34)で計算する。
β=cos-1((W2+Dr2−Dl2)/(2*W*Dr)) (29)
Pz=Dr*sin(π−β) (30)
Wr=W/2+Cx*s (31)
L=√(Dr2+Wr2−2*Dr*Wr*cosβ) (32)
∠o=θ−δo (33)
∠c=θ−δc (34)
【0110】
また、Dl<Drの場合は、以下の計算式(35)〜(40)で計算する。
β=cos-1((W2+Dl2−Dr2)/(2*W*Dl)) (35)
Pz=Dl*sin(π−β) (36)
Wl=W/2−Cx*s (37)
L=√(Dl2+Wl2−2*Dl*Wl*cosβ) (38)
∠o=θ+δo (39)
∠c=θ+δc (40)
【0111】
上記のパラメータを用いると、奥行きKは以下の式(41)で計算される。
K=(Po−Pc)/(tan(∠o)) (41)
【0112】
つぎに、オブジェクトの幅M,高さN,奥行きKを計算後、オブジェクト3次元データ生成部74では、受け取ったオブジェクトサイズデータに基づいて、オブジェクトの3次元座標を計算し、その計算結果をオブジェクト3次元データとして出力する。
【0113】
オブジェクトテクスチャ生成部75では、背景領域データ、指定頂点データおよび計算頂点データに基づいて、静止画像からオブジェクトに相当する部分を切り出し、さらに、画像を加工することで、オブジェクトテクスチャデータを生成する。そして、当該オブジェクトテクスチャデータとオブジェクトテクスチャマッピング部76に対して通知する。なお、オブジェクトの各面には、壁面を基準に名前が付けられている。たとえば、図13に示すように、壁面と向かい合っている面を奥面、奥面に相対している面を手前面、手前面に対して左右上下に位置する面をそれぞれ左面,右面,上面,下面と呼ぶ。
【0114】
たとえば、オブジェクトテクスチャ生成部75では、背景領域指定部1において表示した画像、指定頂点データおよび計算頂点データを受け取ると、オブジェクトの面に相当する部分を画像から切り出し、さらに、切り出した部分が長方形となるように加工して、オブジェクトテクスチャデータを生成する。また、背景領域指定部1において表示した画像に写っていない面については、操作員が、静止画像のオブジェクトの面に相当する領域を四辺形で指定すると、指定した頂点の平面座標が計算されるので、オブジェクトテクスチャ生成部75では、その部分領域を切り出し、さらに、切り出した部分が長方形となるように加工して、オブジェクトテクスチャデータを生成する。
【0115】
オブジェクトテクスチャマッピング部76では、受け取ったオブジェクト3次元データおよびオブジェクトテクスチャデータに基づいて、テクスチャをマッピングしたオブジェクトの3次元モデル、すなわち、オブジェクトモデルデータを生成する。このオブジェクトモデルデータは、たとえば、VRML形式で出力し、VRMLブラウザを用いて表示する。
【0116】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して、空間に配置しているオブジェクトの3次元モデルを生成する構成としたため、直方体形状のオブジェクトの3次元モデルを簡単に作成することができる。また、実在するオブジェクトが直方体形状でない場合においても、突起部分や凹み等を含めてオブジェクトの形状を直方体で近似することにより、実在するオブジェクトを簡易的にモデル化することができる。
【0117】
なお、本実施の形態では、説明の分かりやすさを考慮して「壁面」という表現を用いているが、オブジェクトが実空間において壁に接していない場合においても、オブジェクトの奥面に接するような仮想的な壁面を実空間内に想定することにより、同様にして、オブジェクトを直方体形状で3次元モデル化することができる。
【0118】
また、本実施の形態では、説明の分かりやすさを考慮して直方体の手前面が壁面と平行であるとしているが、オブジェクトが壁面に対して傾いている場合においても、オブジェクトの手前面に平行な仮想的な壁面を実空間内に想定することにより、同様にして、オブジェクトを直方体形状で3次元モデル化することができる。
【0119】
実施の形態6.
実施の形態6では、オブジェクトを配置した空間の3次元モデルを生成する。なお、先に説明した実施の形態1、2および5と同様の構成については、同一の符号を付してその説明を省略する。
【0120】
図16は、本発明にかかる3次元モデル生成装置の実施の形態6の構成を示す図である。図16において、101は部分空間の3次元モデルを生成する空間処理部であり、102は、部分空間内にオブジェクトを配置する場合に、オブジェクトの3次元形状を取得し、オブジェクトを配置した部分空間の3次元モデルを生成するオブジェクト処理部である。
【0121】
また、111は、部分空間の3次元データ、オブジェクトを近似している直方体の幅や高さ等のサイズ、およびオブジェクトを配置した部分空間の3次元データ、を生成するオブジェクト付部分空間3次元情報生成部であり、112は、部分空間の3次元データ、部分空間のテクスチャデータ、オブジェクトの3次元データ、およびオブジェクトを配置した部分空間の3次元モデル、を生成するオブジェクト付部分空間テクスチャ情報生成部である。
【0122】
また、121はオブジェクトの幅,高さ,奥行きに基づいてオブジェクトサイズデータを生成するオブジェクトサイズ計算部であり、122は、背景領域データおよび指定頂点データに基づいてオブジェクトが壁面から離れている距離を計算し、その計算結果をオフセットデータとして出力するオフセット計算部であり、123は、オブジェクトの3次元座標を計算し、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成部であり、124は、オブジェクトのテクスチャデータとオブジェクトの3次元データと部分空間のテクスチャデータと部分空間の3次元データに基づいて、オブジェクトに対してテクスチャをマッピングし、部分空間にオブジェクトを配置したオブジェクト付部分空間モデルデータを生成するオブジェクト付部分空間テクスチャマッピング部であり、125は、オブジェクトのテクスチャデータとオブジェクトの3次元データと部分空間のテクスチャデータと部分空間の3次元データに基づいて、部分空間どうしが接続する面のテクスチャを切り抜くことにより、オブジェクトを配置した空間の3次元モデルを生成するオブジェクト付空間生成部である。
【0123】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。なお、空間処理部101内の処理については、先に説明した実施の形態2と同様であるため、その説明を省略する。また、オブジェクト処理部102における、オブジェクト指定部71,頂点計算部72,オブジェクトテクスチャ生成部75の処理についても、前述の実施の形態5と同様であるため、その説明を省略する。
【0124】
前述の実施の形態5と同様の手順で、指定頂点データ生成処理および計算頂点データ生成処理を実行後、オブジェクトサイズ計算部121では、オブジェクトが床面130あるいは正面132に接しているか、離れているか、を調べる。図17は、実施の形態6における空間の3次元モデルを示す図である。図17において、背景領域データは、頂点133〜136の平面座標である。また、頂点131a〜131hの平面座標は、オブジェクト指定部71あるいは頂点計算部72で求められている。
【0125】
まず、オブジェクトが正面130から離れているかどうかを調べる。ここでは、しきい値γを予め任意の値で設定し、頂点133と頂点134を結ぶ直線(以下、直線133−134と表記する)と傾きが等しく、しきい値γの分だけy軸下方向に平行移動した直線137−138を設定する。そして、頂点131eまたは131hのいずれかの頂点が、画像上で直線133−134と137−138に挟まれた領域に存在する場合、そのオブジェクトは正面130に接しているとみなす。なお、この実施の形態では、オブジェクトは壁面に対して傾いていないものとする。
【0126】
また、床面132から離れているかどうかについても、上記同様、複数の頂点と直線との距離を計算することによって、推定することができる。
【0127】
つぎに、オブジェクトサイズ計算部121では、オブジェクトの幅M,高さN,奥行きKを計算する。オブジェクトが正面130に接している場合、幅Mは、前述の実施の形態5と同様に、背景領域指定部1で表示した静止画像上で、壁面上のオブジェクトの幅に相当する線分と壁面の幅に相当する線分とを対象とし、画像上での線分の長さと壁面の幅との比率から計算する。
【0128】
一方、図17に示すように、オブジェクトが正面130から離れている場合は、頂点133,134,131e,131f,131g,131hを用いて、頂点139,140の平面座標系における座標を計算し、頂点139,140で挟まれる線分をオブジェクトの幅とみなすことで、上記と同様に幅Mを計算することができる。
【0129】
また、オブジェクトが正面130に接している場合、高さNは、前述の実施の形態5と同様に、背景領域指定部1で表示した静止画像上で、壁面上におけるオブジェクトの高さに相当する線分と壁面の高さに相当する線分とを対象とし、画像上での線分の長さと壁面の高さとの比率から計算する。
【0130】
一方、図17に示すように、オブジェクトが正面130から離れている場合は、頂点135,136,131c,131d,131g,131hを用いて、頂点139,141,142の平面座標系における座標を計算し、頂点139,141で挟まれる線分をオブジェクトの高さとみなし、頂点139,142で挟まれる線分を壁面の高さとみなすことで、上記と同様に高さNを計算することができる。なお、奥行きKについては、前述の実施の形態5と同様の手順で求めることができる。
【0131】
つぎに、オフセット計算部122では、背景領域データおよび指定頂点データに基づいて、オブジェクトが壁面から離れている距離を計算し、オフセットデータを生成する。そして、当該オフセットデータをオブジェクト付部分空間3次元データ生成部123に対して通知する。
【0132】
たとえば、図17の場合、オブジェクトと正面130との距離は、頂点131h,139で挟まれる線分の実空間における距離に相当する。これは、頂点131h,139で挟まれる線分と頂点131g,131hで挟まれる線分とを対象とし、画像上での長さと実空間上での距離の比率から求めることができる。一方、オブジェクトが床面132から離れている場合も同様であり、床面132からの距離は、正面130上でオブジェクトが床面132から離れている距離に相当する線分と、その線分の延長でありかつ正面130の高さに相当する線分とを対象とし、画像上での長さと実空間上での距離の比率から求めることができる。
【0133】
つぎに、オブジェクト付部分空間3次元データ生成部123では、部分空間3次元データ、オフセットデータ、オブジェクトサイズデータに基づいて、オブジェクトの3次元形状を計算し、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成する。そして、当該オブジェクト付部分空間3次元データをオブジェクト付部分空間テクスチャマッピング部124に対して通知する。
【0134】
つぎに、オブジェクトテクスチャデータ生成処理を実行後、オブジェクト付部分空間テクスチャマッピング部124では、オブジェクト付部分空間3次元データ、オブジェクトテクスチャデータ、部分空間3次元データ、部分空間テクスチャデータに基づいてテクスチャをマッピングし、部分空間にオブジェクトを配置したオブジェクト付部分空間モデルデータを生成する。そして、当該オブジェクト付部分空間モデルデータをオブジェクト付空間生成部125に対して通知する。
【0135】
以降、空間処理部101では、空間を構成するすべての部分空間に対して実施の形態2と同様の処理を実行し、また、モデル化するオブジェクトがある部分空間に対しては、オブジェクト処理部102が上記処理を実行する。
【0136】
最後に、オブジェクト付空間生成部125では、オブジェクトを配置しない部分空間の3次元モデルである部分空間モデルデータと、オブジェクトを配置する部分空間の3次元モデルであるオブジェクト付部分空間モデルデータと、を受け取り、空間管理テーブル9(図示せず)と接続テーブル10(図示せず)に基づいて、複数の部分空間をつなぎ合わせた空間のオブジェクト付空間3次元モデルデータを生成する。なお、複数の部分空間をつなぎ合わせる方法については、実施の形態2の部分空間接続部33の処理と同様の手順で実行する。
【0137】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して、オブジェクトを配置した空間の3次元モデルを生成する構成としたため、オブジェクトを配置した空間の3次元モデルを少ない作業量で簡単に作成することができる。また、オブジェクトのサイズや空間における配置等を空間の3次元モデルの作成過程で取得する構成とし、オブジェクトと空間を別々に作成してから合成する構成を用いていないため、効率よく、オブジェクトを配置した空間の3次元モデルを作成することができる。
【0138】
なお、本実施の形態で示した「壁面」は実在する壁であるが、オブジェクトの背後に仮想的な透明の壁面を想定することにより、室内の中央に置かれたオブジェクトに対しても上記動作を適用することができる。すなわち、本実施の形態においては、室内中央にオブジェクトを置いた空間の3次元モデルを生成することもできる。
【0139】
また、本実施の形態では、実施の形態2で示した方法で部分空間の3次元データおよびテクスチャデータを生成しているが、これに限らず、たとえば、実施の形態1で示した方法により、部分空間の3次元データおよびテクスチャデータを生成することとしてもよい。
【0140】
実施の形態7.
実施の形態7では、オブジェクトが背景の領域に対して傾いて配置されている場合の、オブジェクトを配置した空間の3次元モデルを生成する。なお、先に説明した実施の形態1、2、5および6と同様の構成については、同一の符号を付してその説明を省略する。
【0141】
図18は、本発明にかかる3次元モデル生成装置の実施の形態7の構成を示す図である。図18において、151は、部分空間内にオブジェクトを配置する場合に、オブジェクトの3次元形状を取得し、オブジェクトを配置した部分空間の3次元モデルを生成する傾きオブジェクト処理部である。
【0142】
また、161は、受け取った部分空間3次元データに基づいて、実在する壁面に対してオブジェクトがどれくらい傾いているかを計算するオブジェクト傾き情報生成部である。
【0143】
また、171は、背景領域指定部1にて表示した画像の中から、モデル化したいオブジェクトの写っている静止画像をディスプレイに表示し、指定された仮想背景領域の4点の平面座標系における座標値を、仮想背景領域データとして出力する仮想背景領域指定部であり、172は、仮想背景領域の高さと幅の入力により、仮想背景領域の頂点の3次元座標を計算し、その計算結果を仮想背景領域3次元データとして出力する仮想背景領域3次元データ生成部であり、173は、部分空間3次元データ生成部31出力の部分空間3次元データと上記仮想背景領域3次元データに基づいて、実在する壁面と仮想背景領域である仮想壁面とのなす角度を計算し、その計算結果をオブジェクト傾きデータとして出力する傾き計算部である。
【0144】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。なお、空間処理部101内の処理については、先に説明した実施の形態2と同様であるため、その説明を省略する。
【0145】
仮想背景領域指定部171では、背景領域指定部1て表示した画像の中から、モデル化したいオブジェクトの写っている静止画像をディスプレイに表示する。、ここで、操作員が、画像上で、オブジェクトの奥面に対して平行に接しかつ壁面と交差する仮想的な背景領域を、マウス等を用いて四辺形で指定すると、仮想背景領域指定部171では、指定された4点の平面座標系における座標値、すなわち、仮想背景領域データを生成する。そして、当該仮想背景領域データをオブジェクトサイズ計算部73に対して通知する。なお、仮想的な背景領域(仮想背景領域)は、静止画像を写す際に、目印となる物やマーカーを置いて撮影することにより、静止画像上で指定できるようにする。また、仮想背景領域の高さ、幅はあらかじめ計測しておく。
【0146】
仮想背景領域3次元データ生成部172では、仮想背景領域の高さと幅に基づいて、仮想背景領域の全頂点の3次元座標を計算することにより、仮想背景領域3次元データを生成する。そして、当該仮想背景領域3次元データを傾き計算部173に対して通知する。
【0147】
傾き計算部173では、部分空間3次元データ生成部31出力の部分空間3次元データと上記仮想背景領域3次元データに基づいて、実在する壁面と仮想壁面について面の法線ベクトルを計算することにより、壁面と仮想壁面のなす角度、すなわち、オブジェクト傾きデータを生成する。そして、当該オブジェクト傾きデータをオブジェクト付部分空間3次元データ生成部74に対して通知する。図19は、オブジェクトが背景領域に対して傾いて配置されている様子を示す図である。したがって、ここでは、壁面181と仮想背景領域である仮想壁面182について面の法線ベクトルを計算し、壁面181と仮想壁面182のなす角度を求める。
【0148】
つぎに、先に説明した実施の形態5と同様の手順で、指定頂点データ生成処理および計算頂点データ生成処理を実行後、オブジェクトサイズ計算部73では、仮想背景領域の高さと幅、仮想背景領域データ、指定頂点データに基づいて、オブジェクトの幅,高さ,奥行きを自動的に計算することにより、オブジェクトサイズデータを生成する。そして、当該オブジェクトサイズデータをオブジェクト付部分空間3次元データ生成部74に対して通知する。なお、オブジェクトの幅,高さ,奥行きの計算方法については、前術の実施の形態6と同様の手順で実効する。
【0149】
オブジェクト付部分空間3次元データ生成部74では、部分空間3次元データ、仮想背景領域3次元データ、指定頂点データ、オブジェクト傾きデータに基づいて、オブジェクトの3次元形状を計算することにより、オブジェクト付部分空間3次元データを生成する。そして、当該オブジェクト付部分空間3次元データをオブジェクト付部分空間テクスチャマッピング部76に対して通知する。
【0150】
以降、空間処理部101では、空間を構成するすべての部分空間に対して実施の形態2と同様の処理を実行し、また、モデル化するオブジェクトがある部分空間に対しては、傾きオブジェクト処理部151が上記処理を実行する。
【0151】
最後に、オブジェクト付空間生成部125では、前述の実施の形態6と同様の手順で、オブジェクトを配置しない部分空間の3次元モデルである部分空間モデルデータと、オブジェクトを配置する部分空間の3次元モデルであるオブジェクト付部分空間データと、を受け取り、空間管理テーブル9(図示せず)と接続テーブル10(図示せず)に基づいて、複数の部分空間をつなぎ合わせた空間のオブジェクト付空間3次元モデルデータを生成する。
【0152】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して、背景の領域に対して傾いて配置されているオブジェクトの3次元モデルを生成可能な構成としたため、オブジェクトを任意の角度で配置した場合においても、少ない作業量で簡単に空間の3次元モデルを作成することができる。
【0153】
また、本実施の形態では、実施の形態2で示した方法で部分空間の3次元データおよびテクスチャデータを生成しているが、これに限らず、たとえば、実施の形態1で示した方法により、部分空間の3次元データおよびテクスチャデータを生成することとしてもよい。
【0154】
実施の形態8.
実施の形態8では、同一のオブジェクトが複数の部分空間にまたがって配置している場合の空間の3次元モデルを生成する(実施の形態6の応用例)。なお、先に説明した実施の形態1、2、5、6および7と同様の構成については、同一の符号を付してその説明を省略する。
【0155】
図20は、本発明にかかる3次元モデル生成装置の実施の形態8の構成を示す図である。図20において、201は、操作員が指定したオブジェクトの頂点の数が4個未満である場合に、接続設定テーブル10を参照して、作業中の部分空間に接続している既に作業済みの部分空間の部分空間番号と、これからオブジェクトを生成しようとしている面と連続している面の面番号とを取得し、さらに、オブジェクト管理テーブルを参照して、オブジェクトの奥行き、オフセットを取得するオブジェクト情報取得部であり、202は、作業中の部分空間の部分空間番号、オブジェクトの背景となる面の面番号、オブジェクトの幅、高さ、奥行き、オブジェクトが壁面から離れている距離、をオブジェクト管理テーブルに設定するオブジェクト管理テーブル設定部である。
【0156】
なお、連続オブジェクト処理部191は、オブジェクトを配置した部分空間の3次元モデルを生成する実施の形態6のオブジェクト処理部102に、上記オブジェクト情報取得部201およびオブジェクト管理テーブル設定部202を追加したものである。
【0157】
ここで、本実施の形態における3次元モデル生成装置の動作を説明する。なお、ここでは、先に説明した実施の形態1〜7と異なる動作についてのみ説明する。
【0158】
オブジェクト管理テーブル設定部202では、操作員の入力による作業中の部分空間の部分空間番号、指定されたオブジェクトの頂点に対応する静止画像に基づいて取得したオブジェクトの背景となる面の面番号(オブジェクト帰属面番号)、オブジェクトサイズ計算部121出力のオブジェクトサイズデータ(オブジェクト幅、オブジェクト高さ、オブジェクト奥行き)、およびオフセット計算部122出力のオフセットデータ(オフセット)、をオブジェクト管理テーブルに設定する。図21は、オブジェクト管理テーブルの一例を示す図である。
【0159】
オブジェクト情報取得部201では、操作員が指定したオブジェクトの頂点の数が4個未満である場合に、これから生成しようとするオブジェクトを、既に作業済みの部分空間において一部分が作成されているものとみなす。そして、接続設定テーブル10を参照して、作業中の部分空間に接続している既に作業済みの部分空間の部分空間番号と、これからオブジェクトを生成しようとしている面と連続している面の面番号と、を取得する。さらに、オブジェクト情報取得部201では、上記オブジェクト管理テーブルを参照して、オブジェクト奥行きおよびオフセットを取得する。そして、取得したオブジェクトの奥行きおよびオフセットについては、オブジェクト付部分空間3次元データ生成部123に対して通知する。
【0160】
ここで、具体例を用いて上記オブジェクト情報取得部201の動作を詳細に説明する。図22は、オブジェクト情報取得部201の動作を説明するための図である。なお、ここでは、直方体211に対する作業が既に終了しているものとし、これから直方体212の作業を行うものとする。また、最初の直方体でない場合は、指定される頂点が4個未満でもよいこととする。また、正面を撮影した静止画像212a(図示せず)上では、オブジェクトの頂点として、頂点221、頂点222、頂点223の3点が指定されたことを前提とする。
【0161】
このような場合、オブジェクト情報取得部201では、指定した頂点の数が4個未満であるため、接続設定テーブル10を参照する。図23は、接続テーブル10の一例を示す図である。そして、接続先部分空間番号が、作業中の直方体の部分空間番号(212)となっている項目を探し、ここで、接続元部分空間番号(211)を取得する。
【0162】
また、作業中の面が正面212aであることから、これから生成しようとしているオブジェクトは、直方体211の正面211aに対する作業時に既に処理されていたことになる。そこで、オブジェクト情報取得部201では、オブジェクト管理テーブルを参照し、部分空間番号(211)およびオブジェクト帰属面番号(211a)に基づいて、オブジェクトの奥行きとオフセットを得る。なお、オブジェクトの幅と高さについては、実施の形態4で示した方法を用いて求めることができるため、オブジェクト管理テーブルからは取得しない。
【0163】
このように、本実施の形態においては、ディジタルカメラ等から得られた静止画像を利用して、複数の部分空間にまたがって配置されているオブジェクトの3次元モデルを生成可能な構成としたため、たとえば、柱や細長い棚のように複数の空間にまたがるようなオブジェクトについても、効率よく3次元モデルを作成することができる。
【0164】
なお、図24は、上記実施の形態1〜8に示す3次元モデル生成装置として動作し、前述した3次元モデルの生成処理を実現可能な一般的な計算機システムの構成を示す図である。
【0165】
この計算機システムは、CPUを含む制御ユニット301と、メモリユニット302と、表示ユニット303と、入力ユニット304と、CD−ROMドライブユニット305と、ディスクユニット306と、を備え、これらの各ユニットは、それぞれシステムバスAを介して接続されている。また、図24において、制御ユニット301は形態1〜8に示す3次元モデルの生成処理を実行する。メモリユニット302は、RAM、ROM等のメモリを含み、制御ユニット301が実行すべきプログラム、処理の過程で得られた必要なデータ等を記憶する。表示ユニット303は、CRTやLCD(液晶表示パネル)等で構成され、計算機システムの使用者に対して、各種画面を表示する。入力ユニット304は、キーボード、マウス等で構成され、計算機システムの使用者が、各種情報の入力を行うために使用する。また、図示のCD−ROM400には、実施の形態1〜8に示す各処理を記述したプログラムが格納されている。
【0166】
上記のように構成される計算機システムでは、まず、CD−ROMドライブユニット305にセットされたCD−ROM400からプログラムがディスクユニット306にインストールされる。そして、計算機システムを立ち上げるときにディスクユニット306から読み出されたプログラムが、メモリユニット302に格納される。この状態で、制御ユニット301(CPU)は、メモリユニット302に格納されたプログラムにしたがって、実施の形態1〜8に示す処理を実行する。
【0167】
なお、本発明においては、CD−ROM400にて各処理を記述したプログラムを提供しているが、このプログラムの記録媒体は、これに限定されることなく、システムを構成するコンピュータに応じて、たとえば、フロッピーディスク等の磁気ディスク、光磁気ディスク、磁気テープ等の他の記録媒体を用いることも可能である。
【0168】
【発明の効果】
以上、説明したとおり、本発明によれば、ディジタルカメラ等から得られた静止画像を利用して複数の空間を生成し、複数の空間を平面方向および鉛直方向に自由につなぎ合わせる構成とした。具体的にいうと、複数の直方体が接続された状態の空間3次元データに対してテクスチャをマッピングすることで、複数の部分空間をつなぎ合わせた空間モデルデータを生成する構成とした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0169】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して複数の空間を生成し、複数の空間を平面方向および鉛直方向に自由につなぎ合わせる構成とした。具体的にいうと、空間を構成する個々の直方体に対してテクスチャをマッピングし、すべての直方体に対してマッピング処理を終えた段階で、すべての直方体を接続することで、空間モデルデータを生成する構成とした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0170】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して、オブジェクトを配置した空間の3次元モデルを生成する構成としたため、オブジェクトを配置した空間の3次元モデルを少ない作業量で簡単に作成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。また、オブジェクトのサイズや空間における配置等を空間の3次元モデルの作成過程で取得する構成とし、オブジェクトと空間を別々に作成してから合成する構成を用いていないため、効率よく、オブジェクトを配置した空間の3次元モデルを作成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0171】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して、背景の領域に対して傾いて配置されているオブジェクトの3次元モデルを生成可能な構成としたため、オブジェクトを任意の角度で配置した場合においても、少ない作業量で簡単に空間の3次元モデルを作成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0172】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して、複数の部分空間にまたがって配置されているオブジェクトの3次元モデルを生成可能な構成としたため、たとえば、柱や細長い棚のように複数の空間にまたがるようなオブジェクトについても、効率よく3次元モデルを作成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0173】
つぎの発明によれば、空間の外郭を形成する直方体をずらして配置することにより、展望室のような円形状の室内やドームのような球状の空間に対しても適用すること可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0174】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して複数の三角柱を生成する構成としたため、分岐形状を有する空間の3次元モデルを簡単に生成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0175】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して複数の六面体を生成する構成としたため、曲がりのある空間の3次元モデルを簡単に生成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0176】
つぎの発明によれば、ディジタルカメラ等から得られた静止画像を利用して、空間に配置しているオブジェクトの3次元モデルを生成する構成としたため、直方体形状のオブジェクトの3次元モデルを簡単に作成することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。また、実在するオブジェクトが直方体形状でない場合においても、突起部分や凹み等を含めてオブジェクトの形状を直方体で近似することにより、実在するオブジェクトを簡易的にモデル化することが可能な3次元モデル生成装置を得ることができる、という効果を奏する。
【0177】
つぎの発明によれば、複数の直方体が接続された状態の空間3次元データに対してテクスチャをマッピングすることで、複数の部分空間をつなぎ合わせた空間モデルデータを生成することとした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0178】
つぎの発明によれば、空間を構成する個々の直方体に対してテクスチャをマッピングし、すべての直方体に対してマッピング処理を終えた段階で、すべての直方体を接続することで、空間モデルデータを生成することとした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0179】
つぎの発明によれば、オブジェクトを配置した空間の3次元モデルを少ない作業量で簡単に作成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0180】
つぎの発明によれば、オブジェクトを任意の角度で配置した場合においても、少ない作業量で簡単に空間の3次元モデルを作成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0181】
つぎの発明によれば、たとえば、柱や細長い棚のように複数の空間にまたがるようなオブジェクトについても、効率よく3次元モデルを作成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0182】
つぎの発明によれば、直方体形状のオブジェクトの3次元モデルを簡単に作成することが可能な3次元モデル生成方法を得ることができる、という効果を奏する。
【0183】
つぎの発明によれば、複数の直方体が接続された状態の空間3次元データに対してテクスチャをマッピングし、複数の部分空間をつなぎ合わせた空間モデルデータを生成する処理を、コンピュータに実行させることとした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成プログラムを得ることができる、という効果を奏する。
【0184】
つぎの発明によれば、空間を構成する個々の直方体に対してテクスチャをマッピングし、すべての直方体に対してマッピング処理を終えた段階で、すべての直方体を接続する処理を、コンピュータに実行させることとした。これにより、複雑な形状の3次元モデルを生成することが可能な3次元モデル生成プログラムを得ることができる、という効果を奏する。
【0185】
つぎの発明によれば、オブジェクトを配置した空間の3次元モデルを少ない作業量で簡単に作成させることが可能な3次元モデル生成プログラムを得ることができる、という効果を奏する。
【0186】
つぎの発明によれば、オブジェクトを任意の角度で配置した場合においても、少ない作業量で簡単に空間の3次元モデルを作成させることが可能な3次元モデル生成プログラムを得ることができる、という効果を奏する。
【0187】
つぎの発明によれば、直方体形状のオブジェクトの3次元モデルを簡単に作成することが可能な3次元モデル生成プログラムを得ることができる、という効果を奏する。
【図面の簡単な説明】
【図1】 本発明にかかる3次元モデル生成装置の実施の形態1の構成を示す図である。
【図2】 空間を構成する直方体の集合体の一例を示す図である。
【図3】 表示された静止画像を示す図である。
【図4】 幅Wの計算方法を説明するための図である。
【図5】 空間管理テーブル9の一例を示す図である。
【図6】 接続テーブル10の一例を示す図である。
【図7】 本発明にかかる3次元モデル生成装置の実施の形態2の構成を示す図である。
【図8】 実施の形態3における分岐のある空間の一例を示す図である。
【図9】 実施の形態3における空間の3次元モデルを示す図である。
【図10】 空間管理テーブル9の一例を示す図である。
【図11】 接続テーブル10の一例を示す図である。
【図12】 実施の形態4における曲がりのある空間の一例を示す図である。
【図13】 本発明にかかる3次元モデル生成装置の実施の形態5の構成を示す図である。
【図14】 実施の形態5における空間の3次元モデルを示す図である。
【図15】 オブジェクトの幅,高さ,奥行きの計算方法を示す図である。
【図16】 本発明にかかる3次元モデル生成装置の実施の形態6の構成を示す図である。
【図17】 実施の形態6における空間の3次元モデルを示す図である。
【図18】 本発明にかかる3次元モデル生成装置の実施の形態7の構成を示す図である。
【図19】 オブジェクトが背景領域に対して傾いて配置されている様子を示す図である。
【図20】 本発明にかかる3次元モデル生成装置の実施の形態8の構成を示す図である。
【図21】 オブジェクト管理テーブルの一例を示す図である。
【図22】 オブジェクト情報取得部201の動作を説明するための図である。
【図23】 接続テーブル10の一例を示す図である。
【図24】 一般的な計算機システムの構成を示す図である。
【符号の説明】
1 背景領域指定部、2 部分空間サイズ取得部、3 空間3次元データ生成部、4 空間管理テーブル設定部、5 接続設定部、6 空間管理テーブル追記部、7 部分空間テクスチャ生成部、8 空間テクスチャマッピング部、9 空間管理テーブル、10 接続テーブル、11 空間3次元情報生成部、12 接続情報設定部、13 空間テクスチャ情報生成部、31 部分空間3次元データ生成部、32 部分空間テクスチャマッピング部、33 部分空間接続部、41部分空間3次元情報生成部、42 部分空間テクスチャ情報生成部、71 オブジェクト指定部、72 頂点計算部、73 オブジェクトサイズ計算部、74オブジェクト3次元データ生成部、75 オブジェクトテクスチャ生成部、76 オブジェクトテクスチャマッピング部、81 オブジェクト2次元情報生成部、82 オブジェクト3次元情報生成部、83 オブジェクトテクスチャ情報生成部、102 オブジェクト処理部、111 オブジェクト付部分空間3次元情報生成部、112 オブジェクト付部分空間テクスチャ情報生成部、121 オブジェクトサイズ計算部、122 オフセット計算部、123 オブジェクト付部分空間3次元データ生成部、124 オブジェクト付部分空間テクスチャマッピング部、125 オブジェクト付空間生成部、151 傾きオブジェクト処理部、161 オブジェクト傾き情報生成部、171 仮想背景領域指定部、172 仮想背景領域3次元データ生成部、173 傾き計算部、191 連続オブジェクト処理部191、201 オブジェクト情報取得部、202 オブジェクト管理テーブル設定部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a three-dimensional model generation device, a three-dimensional model generation method, and a three-dimensional model generation program that create a three-dimensional model of an object or a three-dimensional model of a space in which an object is arranged using an image of a space. It is.
[0002]
[Prior art]
Hereinafter, the prior art will be described. For example, as a conventional three-dimensional model generation device for modeling a three-dimensional indoor space using a panoramic image taken from one viewpoint, “virtual environment generation method and device described in Japanese Patent Application Laid-Open No. 2000-11172, And a recording medium on which a virtual environment program is recorded. Here, when an operator designates a feature point on a panoramic image obtained by photographing an indoor space, a viewpoint position, a viewpoint and a floor, and a relative positional relationship between the viewpoint and a ceiling are obtained from the designated feature point, and an indoor three-dimensional model is obtained. Is simply created.
[0003]
Further, as a conventional three-dimensional model generation apparatus that generates a space with an object, for example, there is a “virtual building experience method and apparatus” described in JP-A-9-244522. Here, a 3D model of a building (virtual space of a building) can be easily created by an operator operating interactively while specifying a line segment to be a wall on the floor plan of the building. Virtual experience of the generated virtual space. In this apparatus, an object to be placed inside the building is created in advance by modeling software or the like and placed inside the building.
[0004]
[Problems to be solved by the invention]
However, in the conventional three-dimensional model generation device described in Japanese Patent Application Laid-Open No. 2000-11172, a space is regarded as one rectangular parallelepiped, so that the rectangular parallelepipeds are connected in an L shape, for example. There is a problem that it is difficult to create a complex shaped space when there is a missing space, when it has a bent shape, or when the space branches in any direction .
[0005]
In addition, the conventional three-dimensional model generation apparatus described in Japanese Patent Laid-Open No. 9-244522 has a problem that an object to be placed in a room needs to be created in advance by other modeling software. In addition, in the modeling work, there is a problem that it is difficult for a beginner to easily create a three-dimensional model of an object because a complicated work such as inputting many feature points of the object is required. In addition, in order to place an object in a room, it is necessary to scale the size of the object according to the space in which the object is placed, and anyone can easily create a three-dimensional model in the room in which the object is placed. There was a problem that it was not possible.
[0006]
The present invention has been made in view of the above, and is a three-dimensional model that can easily create a space having a concave / convex shape, a complicated shape such as a bent shape or a branched shape with a small number of input operations. It is an object to obtain a generation device, a three-dimensional model generation method, and a three-dimensional model generation program.
[0007]
[Means for Solving the Problems]
In order to solve the above-described problems and achieve the object, the three-dimensional model generation device according to the present invention is configured to create a three-dimensional model of a space using an image obtained by photographing the space. Background area data generation means for displaying a still image of space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space (corresponding to background area designating section 1 in an embodiment described later); Based on the background area data, a spatial three-dimensional data generation means (corresponding to the spatial three-dimensional information generation unit 11) that generates spatial three-dimensional data connecting a plurality of partial spaces, and a connection relationship between the partial spaces ( Connection information setting means (corresponding to the connection information setting unit 12) for setting predetermined size information on each surface and three-dimensional coordinates of the end points), the still image and the background area data Then, after the texture data generation processing for all the partial spaces is completed, the texture is mapped to a surface other than the connection surface based on the connection relation and the spatial three-dimensional data, and a plurality of spaces are generated. And a three-dimensional model generating means (corresponding to the spatial texture information generating unit 13) for generating a three-dimensional model obtained by connecting the two.
[0008]
In the three-dimensional model generation apparatus according to the next invention, a configuration is used in which a three-dimensional model of a space is created using an image of the space, for example, a still image of a partial space is displayed, and an area in the partial space is displayed Background area data generation means for generating background area data based on the plane coordinates corresponding to the end points of the subspace, and subspace 3D data generation means (partial space 3) for generating 3D data of the subspace based on the background area data A connection information setting means for setting connection relations between subspaces (including predetermined size information on each surface and three-dimensional coordinates of end points), the still image, and the background area data. Subspace texture data is generated based on the subspace, and texture is mapped to the subspace based on the subspace three-dimensional data. Subspace three-dimensional model generation means (corresponding to the subspace texture information generation unit 42) for generating the original model, and at the stage when all the subspace three-dimensional model generation processing is completed, the subspace three-dimensional model and the connection relationship 3D model connection means (corresponding to the partial space connection unit 33) for generating a 3D model in which a plurality of spaces are connected after cutting out the texture of the connection surface between the partial spaces based on Features.
[0009]
In the three-dimensional model generation device according to the next invention, the shape of the object is approximated by a rectangular parallelepiped based on the still image, the designated vertex data that is the plane coordinates of the designated vertex, and other vertices Based on the vertex data generation means (corresponding to the object two-dimensional information generation unit 81), the partial space three-dimensional data, the background area data, and the specified vertex data. An object-attached subspace three-dimensional data generating means (corresponding to the object-added subspace three-dimensional information generating unit 111), the still image, and the background region. Object texture data is generated based on the data and the vertex data, and the object Sub-space 3D with object for mapping texture based on texture data, sub-space 3D data with object, sub-space 3D data, and sub-space texture data to generate a sub-space 3D model with object Model generation means (corresponding to the object-attached subspace texture information generation unit 112), and the three-dimensional model connection means (corresponding to the object-added space generation unit 125) completes all subspace three-dimensional model generation processing. In this step, a three-dimensional model in which a plurality of partial spaces are connected is generated based on the partial space three-dimensional model, the object-attached partial space three-dimensional model, and the connection relation.
[0010]
In the three-dimensional model generation device according to the next invention, a still image showing an object to be modeled is displayed from among the still images, and is in contact with the inner surface of the object in parallel with the wall surface. A virtual background area data generating means (corresponding to a virtual background area specifying unit 171) for generating virtual background area data corresponding to a virtual background area intersecting with the virtual background area, based on the height and width of the virtual background area Virtual background region three-dimensional data generation means (corresponding to virtual background region three-dimensional data generation unit 172) for generating virtual background region three-dimensional data representing the three-dimensional coordinates of all the vertices of the region; Based on the virtual background region three-dimensional data, an inclination calculation means (inclination calculation unit 173 for generating object inclination data representing an angle formed by the actual wall surface and the virtual wall surface). Approximate the shape of the object with a rectangular parallelepiped based on the still image and generate specified vertex data that is the plane coordinates of the specified vertex and non-specified vertex data that is the plane coordinates of the other vertices Based on the vertex data generating means (corresponding to the object two-dimensional information generating unit 81), the partial space three-dimensional data, the virtual background region three-dimensional data, the designated vertex data, and the object inclination data. An object-attached subspace three-dimensional data generating means (corresponding to the object three-dimensional information generating unit 82) for generating the object-attached subspace three-dimensional data, and the still image, the virtual background area data, and the vertex data; Object texture data is generated based on the object texture data. Generating a subspace 3D model with an object by mapping a texture based on the subspace 3D data with the object, the subspace 3D data, and the subspace texture data Means (corresponding to the object texture information generation unit 83), and the three-dimensional model connection means (corresponding to the object-added space generation unit 125), when all the subspace three-dimensional model generation processing is completed, Based on the partial space three-dimensional model, the object-attached partial space three-dimensional model, and the connection relation, a three-dimensional model in which a plurality of partial spaces are connected is generated.
[0011]
In the three-dimensional model generation device according to the next invention, the object for setting the subspace number of the working subspace, the surface number of the surface serving as the background of the object, and predetermined object size information in the object management table Management table setting means (corresponding to the object management table setting unit 202) and object size information acquisition for acquiring predetermined object size information from the object management table when the number of vertices of the designated object is less than 4 Means (corresponding to the object information acquisition unit 201), and the object-attached subspace three-dimensional data generation means is configured to generate a subspace based on the background area data, the designated vertex data, and the predetermined object size information. Object-attached part with objects placed on And generating a spatial three-dimensional data.
[0012]
In the three-dimensional model generation apparatus according to the next invention, the space is regarded as a collection of rectangular parallelepipeds, and a three-dimensional model of the space is generated.
[0013]
The three-dimensional model generation apparatus according to the next invention is characterized in that a three-dimensional model of a space is generated by regarding a space with a branch as an aggregate of triangular prisms.
[0014]
The three-dimensional model generation apparatus according to the next invention is characterized by generating a three-dimensional model of a space by regarding a space with a bend as a collection of hexahedrons.
[0015]
In the three-dimensional model generation device according to the next invention, a three-dimensional model of an object is created using a photographed image. For example, a still image of an object is displayed and an end point of a specified partial region is displayed. Background area data generation means for generating background area data based on the corresponding plane coordinates, the specified vertex data which is the plane coordinates of the specified vertex, approximating the shape of the object in a rectangular parallelepiped based on the still image, and Non-designated vertex data that is a plane coordinate of a vertex other than the above, vertex data generating means for generating, and object three-dimensional data generating means for generating three-dimensional data of an object based on the background area data and the specified vertex data , Object texture data based on the still image, the background area data and the vertex data Form, further, the texture mapping based on the object texture data and the object 3-dimensional data, characterized in that it comprises a and object three-dimensional model generating means for generating a three-dimensional model of the object.
[0016]
In the three-dimensional model generation method according to the next invention, a background region data generation step of displaying a still image of a partial space and generating background region data based on plane coordinates corresponding to the end points of the region in the partial space A partial space size data generation step for generating partial space size data representing the height and width of a predetermined surface constituting the partial space based on the background area data; and the partial space based on the partial space size data A spatial three-dimensional data generation step of generating a spatial three-dimensional data obtained by connecting the three-dimensional shapes of the created partial spaces, and based on the partial space size data and the spatial three-dimensional data A space management table for setting predetermined size information and three-dimensional coordinates of end points on all the surfaces constituting the subspace in the space management table. A connection information setting step for setting a connection relationship between the partial spaces in the connection table in accordance with the designation of a new connection surface, and all the surfaces of the newly connected partial space based on the connection relationship. A space management table additional step for adding predetermined size information and the three-dimensional coordinates of the end points to the space management table; a subspace texture generation step for generating subspace texture data based on the still image and the background region data; and At the stage when the texture data generation processing for the partial space is completed, a texture is mapped to a surface other than the connection surface based on the space management table, the connection table, and the space three-dimensional data, and a plurality of spaces are connected 3 Including a three-dimensional model generation step for generating a three-dimensional model And features.
[0017]
In the three-dimensional model generation method according to the next invention, a background region data generation step of displaying a still image of a partial space and generating background region data based on plane coordinates corresponding to the end points of the region in the partial space A partial space size data generation step for generating partial space size data representing the height and width of a predetermined surface constituting the partial space based on the background area data, and a partial space size data based on the partial space size data. A subspace three-dimensional data generation step for generating subspace three-dimensional data, which is a three-dimensional shape of the space, and a predetermined number relating to all surfaces constituting the subspace based on the subspace size data and the subspace three-dimensional data Space management table setting step for setting the size information and the three-dimensional coordinates of the end points in the space management table, and a new connection plane A connection information setting step for setting a connection relationship between the partial spaces in the connection table according to the determination, and predetermined size information and three-dimensional coordinates of the end points for all the surfaces of the newly connected partial space based on the connection relationship A space management table appending step for appending to the space management table, a partial space texture generating step for generating partial space texture data based on the still image and the background region data, and a partial space based on the partial space three-dimensional data The subspace 3D model generation step of mapping the texture to the subspace and generating the subspace 3D model, and at the stage when all the subspace 3D model generation processing is completed, the subspace 3D model and the space management table And the texture of the connection surface between the subspaces based on the connection table. After cutting out, characterized in that it comprises a three-dimensional model connection step of generating a three-dimensional model was Awa connecting a plurality of spaces, the.
[0018]
In the three-dimensional model generation method according to the next invention, the shape of the object is approximated by a rectangular parallelepiped based on the still image, the designated vertex data that is the plane coordinates of the designated vertex, and other vertices A vertex data generation step for generating non-designated vertex data that is the plane coordinates of the object, and determining whether the object is away from the front surface and the floor surface based on the background area data and the vertex data; Object size data generation step for generating object size data representing the width, height and depth of the object, and when the object is away from the front and floor, the distance is represented based on the background area data and the vertex data An offset data generation step for generating offset data; and the partial space 3 A subspace with object three-dimensional data generation step for generating subspace three-dimensional data with an object in which an object is arranged in the subspace based on the original data, the offset data, and the object size data; the still image; and the background region An object texture generation step for generating object texture data based on the data and the vertex data; and based on the object texture data, the subspace three-dimensional data with the object, the subspace three-dimensional data, and the subspace texture data A subspace three-dimensional model generation step with an object for mapping a texture and generating a subspace three-dimensional model with an object. In the three-dimensional model connection step, 3 is obtained by connecting a plurality of partial spaces based on the partial space three-dimensional model, the object-attached partial space three-dimensional model, the space management table, and the connection table at the stage when the intermediate three-dimensional model generation process is completed. A dimensional model is generated.
[0019]
In the three-dimensional model generation method according to the next invention, a still image showing an object to be modeled is displayed from among the still images, and is in contact with the inner surface of the object in parallel with the wall surface. A virtual background area data generation step for generating virtual background area data corresponding to a virtual background area that intersects with the virtual background area, and represents the three-dimensional coordinates of all the vertices of the virtual background area based on the height and width of the virtual background area A virtual background region three-dimensional data generation step for generating virtual background region three-dimensional data, and an object inclination representing an angle formed by the actual wall surface and the virtual wall surface based on the partial space three-dimensional data and the virtual background region three-dimensional data The slope calculation step for generating data, and the shape of the object is approximated by a rectangular parallelepiped based on the still image, and the plane coordinates of the specified vertex are used. Designated vertex data and vertex data other than the designated vertex data that is the plane coordinates of the other vertices, a height and width of the virtual background region, the virtual background region data, and the designated vertex data An object size data generation step for generating object size data representing the width, height, and depth of the object, the subspace three-dimensional data, the virtual background region three-dimensional data, the designated vertex data, and the object inclination data An object-attached subspace three-dimensional data generation step of generating an object-attached subspace three-dimensional data in which an object is arranged in the subspace, and an object texture based on the still image, the virtual background region data, and the vertex data The object that generates the data Texture generation step, mapping texture based on the object texture data, the subspace three-dimensional data with object, the subspace three-dimensional data, and the subspace texture data to generate a subspace three-dimensional model with object A subspace 3D model generation step with an object, and in the 3D model connection step, the subspace 3D model, the object A three-dimensional model in which a plurality of partial spaces are connected is generated based on the partial space three-dimensional model, the space management table, and the connection table.
[0020]
In the three-dimensional model generation method according to the next invention, the object for setting the subspace number of the working subspace, the surface number of the surface serving as the background of the object, and predetermined object size information in the object management table A management table setting step; and an object size information acquisition step of acquiring predetermined object size information from the object management table when the number of vertices of the designated object is less than four, In the spatial three-dimensional data generation step, generating subspace three-dimensional data with an object in which objects are arranged in the partial space based on the background region data, the designated vertex data, and the predetermined object size information. It is characterized by.
[0021]
In the three-dimensional model generation method according to the next invention, a background region data generation step of displaying a still image of an object and generating background region data based on plane coordinates corresponding to the end points of the designated partial region; , Vertex data that approximates the shape of the object in a rectangular parallelepiped based on the still image and generates specified vertex data that is the plane coordinates of the specified vertex and non-designated vertex data that is the plane coordinates of the other vertex An object size data generating step for generating object size data representing the width, height and depth of the object based on the background area data and the designated vertex data; and 3 of the object based on the object size data. Object tertiary that generates object three-dimensional data that is a dimensional coordinate A data generation step, an object texture generation step for generating object texture data based on the still image, the background area data, and the vertex data; a texture is mapped based on the object texture data and the object three-dimensional data; An object three-dimensional model generating step for generating a three-dimensional model of the object.
[0022]
In the three-dimensional model generation program according to the next invention, background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space And a spatial three-dimensional data generation means for generating a spatial three-dimensional data obtained by connecting a plurality of partial spaces based on the background region data, and a connection relationship between the partial spaces (predetermined size information and end points on each surface) Connection information setting means for setting (including three-dimensional coordinates), subspace texture data is generated based on the still image and the background region data, and when the texture data generation processing for all the partial spaces is completed, Based on the connection relationship and spatial 3D data, textures are mapped to surfaces other than the connection surface to connect multiple spaces. And a three-dimensional model generating means for generating a three-dimensional model, characterized by allowing a computer to execute the.
[0023]
In the three-dimensional model generation program according to the next invention, background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space A subspace three-dimensional data generating means for generating subspace three-dimensional data based on the background area data, and a connection relationship between the subspaces (including predetermined size information on each surface and three-dimensional coordinates of the end points) A subspace texture data based on the still image and the background area data, and mapping a texture on the subspace based on the subspace three-dimensional data, At the stage when the subspace 3D model generation means for generating the 3D model and all the subspace 3D model generation processes are completed, Three-dimensional model connection means for generating a three-dimensional model in which a plurality of spaces are connected after cutting out the texture of the connection surface between the partial spaces based on the partial space three-dimensional model and the connection relationship; It is made to perform.
[0024]
In the three-dimensional model generation program according to the next invention, background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space A subspace three-dimensional data generating means for generating subspace three-dimensional data based on the background area data, and a connection relationship between the subspaces (including predetermined size information on each surface and three-dimensional coordinates of the end points) A subspace texture data based on the still image and the background area data, and mapping a texture on the subspace based on the subspace three-dimensional data, Subspace three-dimensional model generation means for generating a three-dimensional model, and approximate the shape of the object in a rectangular parallelepiped based on the still image , Vertex data generating means for generating specified vertex data that is the plane coordinates of the specified vertex and non-designated vertex data that is the plane coordinates of the other vertices, the subspace three-dimensional data, and the background region data And an object-attached subspace three-dimensional data generating means for generating an object-attached subspace three-dimensional data based on the designated vertex data, the still image, the background region data, and the vertex data. Based on the object texture data, the object-attached subspace three-dimensional data, the subspace three-dimensional data, and the subspace texture data; Object that generates a 3D model The subspace three-dimensional model generation means with the object, and at the stage when all the subspace three-dimensional model generation processing is completed, based on the subspace three-dimensional model, the subspace three-dimensional model with the object, and the connection relationship, It is characterized by causing a computer to execute a three-dimensional model connecting means for generating a three-dimensional model in which a plurality of partial spaces are connected.
[0025]
In the three-dimensional model generation program according to the next invention, background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space A subspace three-dimensional data generating means for generating subspace three-dimensional data based on the background area data, and a connection relationship between the subspaces (including predetermined size information on each surface and three-dimensional coordinates of the end points) A subspace texture data based on the still image and the background area data, and mapping a texture on the subspace based on the subspace three-dimensional data, A subspace 3D model generation means for generating a 3D model and an object to be modeled from the still image Virtual background area data generation means for generating virtual background area data corresponding to a virtual background area that is in parallel with the back surface of the object and intersects the wall surface, Virtual background region 3D data generating means for generating virtual background region 3D data representing 3D coordinates of all vertices of the virtual background region based on the height and width; the partial space 3D data; and the virtual background region 3 Inclination calculation means for generating object inclination data representing the angle between the real wall surface and the virtual wall surface based on the dimensional data, and the shape of the object approximated by a rectangular parallelepiped based on the still image, and the plane coordinates of the specified vertex Vertex data generating means for generating specified vertex data and non-designated vertex data which are plane coordinates of other vertices, and the subspace three-dimensional Generating subspace three-dimensional data with an object for generating subspace three-dimensional data with an object in which an object is arranged in the subspace based on the data, the virtual background region three-dimensional data, the designated vertex data, and the object inclination data And object texture data based on the still image, the virtual background region data, and the vertex data, and further, the object texture data, the object-attached subspace three-dimensional data, the subspace three-dimensional data, and The step of mapping the texture based on the subspace texture data and generating the subspace 3D model generation unit with the object for generating the subspace 3D model with the object, and when all the subspace 3D model generation processes are completed, Subspace 3D A computer, and a three-dimensional model connecting means for generating a three-dimensional model obtained by connecting a plurality of partial spaces based on the connection relation and the model, the subspace three-dimensional model with an object, and a computer. .
[0026]
In the three-dimensional model generation program according to the next invention, background area data generation means for displaying a still image of an object and generating background area data based on plane coordinates corresponding to the end points of the designated partial area; , Vertex data that approximates the shape of the object in a rectangular parallelepiped based on the still image and generates specified vertex data that is the plane coordinates of the specified vertex and non-designated vertex data that is the plane coordinates of the other vertex Generating means; object three-dimensional data generating means for generating three-dimensional data of an object based on the background area data and the designated vertex data; and object texture data based on the still image, the background area data, and the vertex data. Further, the object texture data and the object Mapping the texture on the basis of the dimension data, characterized in that to execute the object 3-dimensional model generating means for generating a three-dimensional model of the object, to the computer.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of a three-dimensional model generation device according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
[0028]
Embodiment 1 FIG.
FIG. 1 is a diagram showing a configuration of a first embodiment of a three-dimensional model generation apparatus according to the present invention. In FIG. 1, reference numeral 1 denotes a background area designating unit that outputs a background area of a designated partial space as background area data, and reference numeral 2 denotes a partial space that outputs the size of a surface constituting the partial space as partial space size data. A size acquisition unit 3 calculates the 3D shape of the subspace based on the subspace size data, and outputs the 3D geometric data of the space after joining the already created subspace as spatial 3D data 3 is a space 3D data generation unit, 4 is a space management table setting unit for creating a space management table for managing the 3D coordinates and size of the space, and 5 is another partial space connected to the specified surface. Is a connection setting unit for setting the partial space number and the surface number in the connection table, and 6 is a partial space number, surface number, three-dimensional coordinates of the connection surface and the part based on the connection table A space management table appending unit that appends the space size to the space management table. 7 is a partial space texture generation that outputs partial space texture data by cutting out / processing a part of a still image corresponding to the background of the partial space. 8 is a spatial texture mapping unit that generates a three-dimensional model in which a texture is mapped in a space obtained by connecting a plurality of partial spaces, and outputs the generated model as spatial model data.
[0029]
Reference numeral 9 denotes a space management table that stores the three-dimensional coordinates and partial space size data of the surfaces constituting the partial space, and reference numeral 10 denotes a connection table that stores the connection destination partial space number and the surface number.
[0030]
Reference numeral 11 denotes a spatial three-dimensional information generation unit that generates three-dimensional geometric data (spatial three-dimensional data) based on the background region data and the already created partial space three-dimensional data. It comprises a spatial three-dimensional data generation unit 3 and a spatial management table setting unit 4. Reference numeral 12 denotes a connection information setting unit for setting a connection relationship in which surface of which partial space is connected to which surface of which partial space. The connection information setting unit 12 includes a connection setting unit 5 and a space management table additional recording unit 6. Reference numeral 13 denotes a spatial texture information generation unit that outputs, as spatial model data, a three-dimensional model in which textures are mapped to a plurality of connected partial spaces, and includes a partial space texture generation unit 7 and a spatial texture mapping unit 8. .
[0031]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. In the present embodiment, the space to be modeled is regarded as an aggregate of a plurality of rectangular parallelepipeds, and each rectangular parallelepiped is defined as a partial space. The six surfaces inside the rectangular parallelepiped are distinguished by the names of “front”, “right”, “back”, “left”, “ceiling”, and “floor”. Further, the six names are defined in one direction with respect to the entire space, and the rectangular parallelepipeds constituting the space have the same name when they are in the same direction.
[0032]
FIG. 2 is a diagram illustrating an example of a set of rectangular parallelepipeds forming a space. Here, for each rectangular parallelepiped, six internal surfaces (front, right, back, left, floor, and ceiling) are photographed with a digital camera, and the front 21a, left 21b, back 21c, left 21d, floor 21e, and ceiling 21f are captured. A still image is obtained.
[0033]
In the present embodiment, a case where the rectangular parallelepiped 21 is first created and then the rectangular parallelepiped 22 is connected to the right side of the rectangular parallelepiped 21 will be described as an example. The rectangular parallelepiped to be created first is arbitrary.
[0034]
First, the background area designating unit 1 displays the still images 21a to 21f on the display. FIG. 3 is a diagram illustrating the displayed still image. Here, the operator designates partial areas corresponding to the front surface 21a, the right surface 21b, the back surface 21c, the left surface 21d, the floor surface 21e, and the ceiling 21f on each image by using a mouse or the like with a quadrilateral. At this time, the background area specifying unit 1 generates background area data based on the plane coordinates corresponding to the end points of the specified area, and the background area data is sent to the partial space size acquisition unit 2 and the partial space texture generation unit 7. Notify them. However, the origin in the plane coordinate system is the center of the still image, and the unit is a dot.
[0035]
When the partial space size acquisition unit 2 receives the height of the rectangular parallelepiped and the background area data input by the operator, the partial space size acquisition unit 2 calculates the widths of the front surface 21a and the right surface 21b of the rectangular parallelepiped. Then, partial space size data is generated based on the calculated height and width, and the partial space size data is notified to the space three-dimensional data generation unit 3 and the space management table setting unit 4. The widths of the floor surface 21e, the ceiling 21f, the left surface 21d, and the back surface 21c are determined because the whole is a rectangular parallelepiped.
[0036]
In addition, when creating the first rectangular parallelepiped, the partial space size acquisition unit 2 automatically calculates the width of the rectangular parallelepiped front surface 21a and right surface 21b at the stage of receiving the background region data, and outputs the partial space size data. To do. On the other hand, when creating the second and subsequent rectangular parallelepipeds, with reference to the space management table output in the space management table appending unit 6 described later at the stage of receiving the background area data, the front surface 21a or the right surface 21b is referred to. If the width is not set, the width is calculated and output as space size data. However, if the height and width are known in the space management table, this is used as space size data.
[0037]
Here, a method of calculating the width W of the front surface 21a and the right surface 21b will be described with reference to the drawings. FIG. 4 is a diagram for explaining a method of calculating the width W. This calculation method is based on Hideaki Maehara, Wataru Nakamura, Jun Tanaka, “Simple production of virtual room space for real-time CG using live-action still images”, Denki Theory C, Vol.120-C, No.7, pp. .977-985, 2000. However, each photograph is taken so that the center point is included in the designated partial area and the camera is almost horizontal. The unit of angle is degree.
[0038]
W = √ (Drt 2 + Dlt 2 -2 * Drt * Dlt * cosθt) (1)
However,
θr = cos -1 ((Drt 2 + Drb 2 + 2 * F 2 -Drt_rb 2 )
/ (2 * √ (drt 2 + F 2 ) √ (drb 2 + F 2 ))) (2)
F = Cx / (2 * tan (Ca / 2)) (3)
Dr = (√ (4 * h (H−h) * tan) 2 θr + H 2 ) + H)
/ (2 * tan θr) (4)
Drt = √ (Dr 2 + (H-h) 2 (5)
Drb = √ (Dr 2 + H 2 (6)
Assuming
[0039]
Here, drt represents the distance (in dots) from Vrt to the center of the still image, where Vrt is the vertex above the right vertical line that constitutes the background area. Drb represents the distance (in dots) from Vrb to the center of the still image, where Vrb is the vertex below the right vertical line constituting the background area. Drt_rb represents the distance (unit: dot) between Vrt and Vrb on the still image. H represents the height from the floor of the camera. Drt represents the distance between Vrt and the camera. Drb represents the distance between Vrb and the camera. Dr represents the distance between the right vertical line constituting the background area and the camera. Further, the number of pixels (unit: dots) Cx in the horizontal direction of a still image and the viewing angle (unit: degree) Ca in the horizontal direction of the camera differ depending on the digital camera.
[0040]
At this time, θr is obtained from the focal length F of the camera and the distances drt, drb, drt_rb on the still image, and using this θr, Drt, Drb can be expressed as a variable of h. Similarly, even in the left vertical line constituting the background area, Dlt and Dlb are expressed as variables of h, so that the following equation (7) is obtained using the width W as a medium.
Drt 2 + Dlt 2 -2 * Drt * Dlt * cosθt
= Drb 2 + Dlb 2 -2 * Drb * Dlb * cos θb (7)
Since this equation is a one-variable equation of h, W can be obtained using the obtained h.
[0041]
Next, the spatial three-dimensional data generation unit 3 that has received the partial space size data calculates the three-dimensional shape of the partial space based on the data. Then, “spatial three-dimensional geometric data” connected to the already created partial space, that is, spatial three-dimensional data is generated, and the spatial three-dimensional data is notified to the spatial management table setting unit 4 and the spatial texture mapping unit 8 To do. At this time, for the rectangular parallelepiped to be created first, a reference point for arranging the rectangular parallelepiped at an appropriate position in the space is selected from the respective vertices according to an instruction from the operator. Then, after setting the three-dimensional coordinates of the reference point, the spatial three-dimensional data generation unit 3 calculates the three-dimensional coordinates for all the vertices of the rectangular parallelepiped 21, and outputs the spatial three-dimensional data as the calculation result.
[0042]
In the space management table setting unit 4, based on the partial space size data generated by the partial space size acquisition unit 2 and the spatial three-dimensional data generated by the spatial three-dimensional data generation unit 3, the front surface 21a and the right surface 21b , The rear surface 21c, the left surface 21d, the floor surface 21e, and the ceiling 21f, the three-dimensional coordinates of the end points, the height of the rectangular parallelepiped, and the widths corresponding to the front and right surfaces are set in the space management table 9. This space management table 9 is referred to in the space management table additional recording unit 6 described later.
[0043]
FIG. 5 is a diagram illustrating an example of the space management table 9. Here, the subspace number is a number unique to each rectangular parallelepiped. In the surface numbers, a to f are given in the order of front, right surface, back surface, left surface, floor surface, and ceiling, and the numerical part is a partial space number.
[0044]
Next, for example, when another cuboid 22 is connected to the right surface 21b of the cuboid 21, in the connection setting unit 5, when the operator designates a surface to which another cuboid is connected from among the six working surfaces. The surface number of another partial space connected to the designated surface is automatically set in the connection table 10. FIG. 6 is a diagram illustrating an example of the connection table 10. In the connection source subspace number, a subspace number of a rectangular parallelepiped under work is set. This connection source subspace number is the same as the subspace number set in the space management table setting unit 4. In addition, as the connection source surface number, a surface number corresponding to 6 surfaces inside the rectangular parallelepiped of the connection source subspace number is set. This connection source surface number is the same as the surface number set in the space management table setting unit 4.
[0045]
For example, when the right surface 21b is designated as the connection surface, the connection table 10 includes 22 as the connection destination partial space number in the column next to the connection source surface number (21b) and 22d as the connection destination surface number. Is automatically set. The connection table 10 is referred to in the space management table additional recording unit 6 and the space texture mapping unit 8 described later.
[0046]
The space management table additional writing unit 6 refers to the connection table 10 and adds the partial space number, the surface number, the three-dimensional coordinates and the width of the connection surface of the rectangular parallelepiped 22 connected to the rectangular parallelepiped 21 to the space management table 9. . Here, since 22 is set as the connection destination partial space number in the connection table 10, 22 is added as the partial space number to the space management table 9, and 22a to 22f (not shown) as the surface numbers. ) Is added. Further, since 22d is set in the connection table 10 as the connection destination surface number corresponding to the connection source surface number (21b), the width of the surface corresponding to the connection destination surface number (22d) is the connection source surface number ( It becomes equal to the width of the surface of 21b). Therefore, in the space management table 9, the same value as the right surface width of the partial space number (21) is added to the right surface width of the partial space number (22). The height is added in the same way. Further, the three-dimensional coordinates of the surface number (21b) are added to the three-dimensional coordinates column of the surface number (22b).
[0047]
The subspace texture generation unit 7 cuts out the quadrilateral partial region designated as the background region for each surface of the rectangular parallelepiped based on the still image received from the background region designation unit 1 and the background region data. The partial space texture data is generated by processing so that the portion becomes rectangular. Then, the partial texture data is notified to the spatial texture mapping unit 8.
[0048]
Here, a texture processing method will be described. This method is described in detail in JP-A-11-144076. In the subspace texture generation unit 7, the viewpoint position (Vx, Vy, Vz), the line-of-sight and polygon angle θ, and the vertical size wy of the window, based on the background area data, as shown in (8) to (21) below. Parameters such as (dot) are calculated. However, the coordinates are coordinate values in the virtual three-dimensional space, and the unit of the angle is degree.
[0049]
Figure 0004017351
[0050]
However, (X 1 , Y 1 ) Represents the coordinates of the lower left corner of the region data, and (X 2 , Y 2 ) Represents the coordinates of the lower right corner of the region data, and (X Three , Y Three ) Represents the coordinates of the upper right corner of the area data, and (X Four , Y Four ) Represents the coordinates of the upper left corner of the area data, and Cy represents the number of horizontal pixels in the window.
[0051]
Then, the partial space texture generation unit 7 uses the perspective projection conversion function to generate partial space texture data in which the partial area is transformed into a rectangle. Specifically, first, the partial space texture generation unit 7 displays a display window with a horizontal width of 640 dots, a vertical width Wy dot, and a viewing angle Ca on the display by perspective projection conversion. Next, four vertices (−320.0, 0, 240.0), (320.0, 0, 240.0), (320.0, 0, −240.0), (−320.0, (0, -240.0) is placed in a provisional three-dimensional space, rotated about the Y axis counterclockwise by θ, and the viewpoint position is moved to a point (Vx, Vy, Vz). The direction is 0.0 in the horizontal direction and parallel to the Z axis so that the origin can be seen. Finally, the entire contents displayed in the display window are output as partial space texture data.
[0052]
Next, the operation of the three-dimensional model generation device when the rectangular parallelepiped 22 is connected to the right side of the rectangular parallelepiped 21 will be described. Here, only an operation different from the operation of generating the rectangular parallelepiped 21 will be described. First, after the background area data is output by the same operation as described above, the partial space size acquisition unit 2 refers to the space management table 9 set by the space management table appending unit 6 and determines the width corresponding to the front or right side. If it is not set, its width is calculated and partial space size data is generated. Then, the partial space size data is notified to the spatial three-dimensional data generation unit 3 and the spatial management table setting unit 4.
[0053]
The spatial three-dimensional data generation unit 3 calculates a three-dimensional shape of the partial space based on the received partial space size data. Then, “spatial three-dimensional geometric data” connected to the already created partial space, that is, spatial three-dimensional data is generated. Here, since the three-dimensional coordinates of the four vertices are already set in the space management table 9 for the left face of the rectangular parallelepiped 22 in which the face number 22d is set, one point among these is set as a reference point. Therefore, based on the three-dimensional coordinates of the reference point and the partial space size data, the three-dimensional coordinates corresponding to all the vertices of the rectangular parallelepiped 22 are calculated, and the three-dimensional data in a state where the rectangular parallelepiped 21 and the rectangular parallelepiped 22 are connected is obtained as a space. Output as three-dimensional data.
[0054]
Thereafter, the space management table setting unit 4, the connection setting unit 5, the space management table additional recording unit 6, and the partial space texture generation unit 7 perform processing in the same procedure as that for generating the rectangular parallelepiped 21.
[0055]
Next, in the space texture mapping unit 8, when processing for all the rectangular parallelepipeds is completed (here, corresponding to the processing of the rectangular parallelepiped 21 and the rectangular parallelepiped 22), the spatial three-dimensional data and the partial spaces of all the rectangular solids constituting the space The texture data is received, the space management table 9 and the connection table 10 are referred to, the texture is mapped to a surface other than the surface to be connected, and space model data in which a plurality of partial spaces are connected is generated. This spatial model data is output in, for example, a VRML format and displayed using a VRML browser.
[0056]
As described above, in the present embodiment, a plurality of spaces are generated using still images obtained from a digital camera or the like, and the plurality of spaces are freely connected in the plane direction and the vertical direction. More specifically, a configuration is used in which texture model is mapped to spatial three-dimensional data in a state where a plurality of rectangular parallelepipeds are connected to generate spatial model data in which a plurality of partial spaces are connected. As a result, a three-dimensional model having a complicated shape can be generated. Further, by arranging the rectangular parallelepiped forming the outline of the space in a shifted manner, the present invention can be applied to a circular room such as an observation room or a spherical space such as a dome.
[0057]
Embodiment 2. FIG.
In the first embodiment described above, spatial model data is generated by mapping a texture to spatial three-dimensional data in a state where a plurality of rectangular parallelepipeds are connected. On the other hand, in the second embodiment, the texture model is mapped to the individual rectangular parallelepipeds constituting the space, and the spatial model data is obtained by connecting all the rectangular parallelepipeds after completing the mapping process for all the rectangular parallelepipeds. Generate.
[0058]
FIG. 7 is a diagram showing the configuration of the second embodiment of the three-dimensional model generation device according to the present invention. In addition, about the structure similar to the above-mentioned Embodiment 1, the same code | symbol is attached | subjected and the description is abbreviate | omitted. In FIG. 7, reference numeral 31 denotes a subspace three-dimensional data generation unit that calculates a three-dimensional shape of the subspace based on the subspace size data and outputs the calculation result as subspace three-dimensional data. A subspace texture mapping unit that generates a three-dimensional model in which a texture is mapped to a subspace based on the dimensional data and the subspace texture data, and outputs it as subspace model data. 33 is a space management table 9 and a connection table 10 is generated, and the three-dimensional data of the space where the partial spaces are connected to each other is generated, the texture of the connection surface between the partial spaces is cut out to generate the three-dimensional model of the space, and the resultant is output as the spatial three-dimensional model data. It is a partial space connection part.
[0059]
Reference numeral 41 denotes a subspace three-dimensional information generation unit that generates subspace three-dimensional data based on the background region data. The subspace size acquisition unit 2, the subspace three-dimensional data generation unit 31, and a space management table setting unit It is composed of four. Reference numeral 42 denotes a partial space texture information generation unit that outputs a three-dimensional model obtained by mapping a texture to the partial space as partial space model data, and includes a partial space texture generation unit 7 and a partial space texture mapping unit 32.
[0060]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. In the present embodiment, as in the first embodiment, a space in which the cuboid 21 and the cuboid 22 are connected is created (see FIG. 2). Here, only operations different from those of the first embodiment will be described.
[0061]
First, after executing the background region data generation process and the partial space size data generation process in the same operation as in the first embodiment, the partial space three-dimensional data generation unit 31 performs subspace 3 based on the partial space size data. The subspace three-dimensional data is generated by calculating the three-dimensional shape, and the subspace three-dimensional data is notified to the space management table setting unit 4 and the subspace texture mapping unit 32. At this time, for the rectangular parallelepiped 21 to be created first, after setting the three-dimensional coordinates of the reference point in the same procedure as in the first embodiment, the three-dimensional coordinates are calculated for all the vertices of the rectangular parallelepiped 21, The subspace three-dimensional data is output as the calculation result. On the other hand, for the rectangular parallelepiped 22 to be created thereafter, the reference point is arbitrary, and the subspace three-dimensional data according to the size of the rectangular parallelepiped 22 is generated.
[0062]
In the space management table setting unit 4, based on the partial space size data generated by the partial space size acquisition unit 2 and the partial space 3D data generated by the partial space 3D data generation unit 31, the front surface 21 a and the right surface 21b, rear surface 21c, left surface 21d, floor surface 21e, ceiling 21f, the three-dimensional coordinates of the end points, the height of the rectangular parallelepiped, and the respective widths corresponding to the front and right surfaces are set in the space management table 9 ( (See FIG. 5). This space management table 9 is referred to in the space management table appending unit 6 as in the first embodiment.
[0063]
Next, after performing the setting process (see FIG. 6) in the connection table 10, the appending process in the space management table 9, and the subspace texture data generation process, the same operation as in the first embodiment, and then the subspace texture mapping The unit 32 maps the texture to the partial space based on the partial space three-dimensional data and the partial space texture data, and generates partial space model data. In the present embodiment, a three-dimensional model of the rectangular parallelepiped 21 is created when the processing related to the rectangular parallelepiped 21 is finished.
[0064]
Next, the operation of the three-dimensional model generation device when the rectangular parallelepiped 22 is connected to the right side of the rectangular parallelepiped 21 will be described. Here, only an operation different from the operation of generating the rectangular parallelepiped 21 will be described. After executing the background area data generation process and the partial space size data generation process in the same procedure as described above, the partial space three-dimensional data generation unit 31 uses a rectangular parallelepiped with an arbitrary point as a reference based on the partial space size data. The subspace three-dimensional data is generated by calculating 22 three-dimensional geometric data. Then, the subspace three-dimensional data is notified to the space management table setting unit 4 and the subspace texture mapping unit 32.
[0065]
Next, in the same procedure as the process related to the rectangular parallelepiped 21, the setting process to the space management table 9, the setting process to the connection table 10, the additional process to the space management table 9, the subspace texture data generation process, and the subspace model After executing the data generation process, the partial space connection unit 33 generates three-dimensional data of a space in which the rectangular parallelepiped 21 and the rectangular parallelepiped 22 are connected based on the space management table 9 and the connection table 10.
[0066]
For example, referring to the connection table 10, it can be seen that the surface 21b of the cuboid 21 and the surface 22d of the cuboid 22 are in contact. Further, since the three-dimensional coordinates of the rectangular parallelepiped 21 are generated based on the reference points, and the rectangular parallelepiped 21 is arranged at an appropriate position in the space, the subspace connecting unit 33 changes the three-dimensional coordinates of the rectangular parallelepiped 22. Conversion may be made so that the left surface 22d and the right surface 21b are connected.
[0067]
Therefore, the partial space connection unit 33 acquires the three-dimensional coordinates of the right surface 21b and the left surface 22d from the space management table 9, and sets all the vertices of the rectangular parallelepiped 22 so that the three-dimensional coordinates of the left surface 22d are equal to the coordinates of the right surface 21b. By converting the three-dimensional coordinates, the three-dimensional coordinates of the space obtained by connecting the rectangular parallelepiped 21 and the rectangular parallelepiped 22 are generated. Since the right surface 21b and the left surface 22d are connected, the texture data mapped to the two surfaces is cut out to generate spatial three-dimensional model data in which the rectangular parallelepiped 21 and the rectangular parallelepiped 22 are connected.
[0068]
As described above, in the present embodiment, a plurality of spaces are generated using still images obtained from a digital camera or the like, and the plurality of spaces are freely connected in the plane direction and the vertical direction. Specifically, texture models are mapped to the individual rectangular parallelepipeds that make up the space, and after completing the mapping process for all the rectangular parallelepipeds, all the rectangular parallelepipeds are connected to generate spatial model data. The configuration. As a result, a three-dimensional model having a complicated shape can be generated. Further, by arranging the rectangular parallelepiped forming the outline of the space in a shifted manner, the present invention can be applied to a circular room such as an observation room or a spherical space such as a dome.
[0069]
Embodiment 3 FIG.
In the third embodiment, a three-dimensional model of a space with a branch is generated. The configuration of the present embodiment is the same as that of FIG. 1 of the first embodiment described above, so the same reference numerals are given and the description thereof is omitted. Here, only operations different from those of the first embodiment will be described.
[0070]
Hereinafter, the operation of the three-dimensional model generation apparatus according to the present embodiment will be described. FIG. 8 is a diagram illustrating an example of a branched space. In the present embodiment, a space with a branch is regarded as an aggregate of a plurality of triangular prisms, and each triangular prism is defined as a partial space. Then, for each triangular prism unit, five internal surfaces (three side surfaces, a ceiling, and a floor surface) are photographed with a digital camera to obtain a still image.
[0071]
FIG. 9 is a diagram illustrating a three-dimensional model of a space in the third embodiment. In this embodiment, first, the triangular prism 51 shown in FIG. 9A is created, and then the triangular prism 52 shown in FIG. 9B is connected to the side surface of the triangular prism 51 (see FIG. 9C). Will be described as an example. The triangular prism created first is arbitrary.
[0072]
First, the background area designation unit 1 displays a still image obtained by photographing the inner surface of the triangular prism 51 on the display. Here, when the operator designates a partial area using a mouse or the like, the background area designation unit 1 generates background area data based on the plane coordinates corresponding to the end points of the designated partial area, and the background area data To the subspace size acquisition unit 2 and the subspace texture generation unit 7. For example, for the side surface, the partial area of the side surface on the image is designated by a quadrilateral, and for the ceiling and floor surface, the partial area of the ceiling and floor surface on the image is designated by a triangle.
[0073]
The partial space size acquisition unit 2 generates partial space size data based on the width and height of the side surface of the triangular prism 51 input by the operator and the background area data, and the partial space size data is converted into spatial three-dimensional data. The generation unit 3 and the space management table setting unit 4 are notified.
[0074]
The spatial three-dimensional data generation unit 3 calculates the three-dimensional shape of the triangular prism 51 based on the received partial space size data. Then, similarly to the first embodiment, spatial three-dimensional data is generated, and the spatial three-dimensional data is notified to the spatial management table setting unit 4 and the spatial texture mapping unit 8. At this time, for the triangular prism 51 to be created first, a reference point (U) for arranging the triangular prism 51 at an appropriate position in the space is selected from the vertices according to an instruction from the operator. Then, after setting the three-dimensional coordinates of the reference point, the spatial three-dimensional data generation unit 3 calculates the three-dimensional coordinates for all the vertices of the triangular prism 51 and outputs the spatial three-dimensional data as the calculation result. On the other hand, for the triangular prisms to be created after the second, reference points are automatically set based on the space management table 9 set by the space management table setting unit 4 and the connection table 10 set by the connection setting unit 5. The
[0075]
In the space management table setting unit 4, each surface of the partial space is determined based on the partial space size data generated by the partial space size acquisition unit 2 and the spatial three-dimensional data generated by the spatial three-dimensional data generation unit 3. The three-dimensional coordinates of the end points and the width of the surface are set in the space management table 9. This space management table 9 is referred to in the space texture mapping unit 8.
[0076]
FIG. 10 is a diagram illustrating an example of the space management table 9. Here, each subspace number is a number unique to each triangular prism. The side surface (1) is a surface whose reference point is at the lower left corner of the surface when viewed from the outside of the triangular prism, and the side surface (2) and the side surface (3) are in clockwise order when viewed from the side surface (1). Let side (2) and side (3). Moreover, in surface number, ae is attached in order of side surface (1), side surface (2), side surface (3), ceiling, and floor surface, and the part of a number represents the partial space number.
[0077]
Next, for example, when another triangular prism 52 is connected to the side surface (1) of the triangular prism 51, the connection setting unit 5 designates a surface to which another triangular prism is connected from among the five working surfaces. Then, the surface number of another triangular prism connected to the designated surface is automatically set in the connection table 10. FIG. 11 is a diagram illustrating an example of the connection table 10. The connection source partial space number and the connection destination partial space number are the same as the partial space numbers in the space management table 9.
[0078]
For example, when the side surface (1) is designated as the connection surface, the connection table 10 includes 52 as the connection destination partial space number in the column next to the connection source surface number (51a), and the connection destination surface number. 52a is automatically set. In this case, the connection destination surface may be the side surface (1).
[0079]
In the space management table appending unit 6, the connection table 10 is referred to, and the space management table 9 indicates the partial space number, the surface number, the three-dimensional coordinates and the width and height of the connection surface of the triangular prism 52 connected to the triangular prism 51. To add. Here, since 52 is set as the connection destination space number in the connection table 10, 52 is added as the partial space number to the space management table 9, and 52a to 52e are added as the surface numbers. Further, since 52a is set in the connection table 10 as the connection destination surface number corresponding to the connection origin surface number (51a), the width and height corresponding to the connection destination surface number (52a) are the connection origin surface number. It becomes equal to the width and height of (51a). Therefore, in the space management table 9, the width and height of the side surface (1) of the partial space number (51) are added to the width and height of the side surface (1) of the partial space number (52). Further, the three-dimensional coordinates of the surface number (51a) are added to the three-dimensional coordinates column of the surface number (52a).
[0080]
In the subspace texture generation unit 7, based on the still image and the background region data received from the background region specification unit 1, the partial region designated as the background region is cut out for each surface of the triangular prism, and the cut portion is further cut out. Process and generate subspace texture data. Then, the partial texture data is notified to the spatial texture mapping unit 8. In image processing, other photo processing software that generates distortion in the image may be used.
[0081]
Next, the operation of the three-dimensional model generation device when the triangular prism 52 is connected to the side surface (1) of the triangular prism 51 will be described. Only the operation different from the operation of generating the triangular prism 51 will be described here. First, after outputting the background area data by the same operation as described above, the partial space size acquisition unit 2 refers to the space management table 9 set by the space management table appending unit 6, and the side surface (1), side surface (2 ) Or the width corresponding to the side surface (3) is not set, the partial space size data is generated. Then, the partial space size data is notified to the spatial three-dimensional data generation unit 3 and the spatial management table setting unit 4.
[0082]
The spatial three-dimensional data generation unit 3 calculates a three-dimensional shape of the partial space based on the received partial space size data. Then, spatial three-dimensional data connected to the already created partial space is generated. Here, for the side surface (1) of the triangular prism 52 with the surface number 52a set, the three-dimensional coordinates of the end points forming the surface are already set in the space management table 9, so that one of these points is used as a reference. Let it be a point. Therefore, based on the three-dimensional coordinates of the reference point and the partial space size data, the three-dimensional coordinates corresponding to all the vertices of the triangular prism 52 are calculated, and the spatial three-dimensional data in a state where the triangular prism 51 and the triangular prism 52 are connected. Output.
[0083]
Thereafter, the space management table setting unit 4, the connection setting unit 5, the space management table additional recording unit 6, and the partial space texture generation unit 7 perform processing in the same procedure as when generating the triangular prism 51.
[0084]
Next, in the space texture mapping unit 8, when the processing for all the triangular prisms is completed (here, corresponding to the processing of the triangular prism 51 and the triangular prism 52), the spatial three-dimensional data and the partial spaces of all the triangular prisms constituting the space The texture data is received, the spatial management table 9 and the connection table 10 are referred to, the texture is mapped to a surface other than the surface to be connected, and branch-shaped space model data in which a plurality of triangular prisms are connected is generated. This spatial model data is output in, for example, a VRML format and displayed using a VRML browser.
[0085]
Thus, in this embodiment, since a plurality of triangular prisms are generated using still images obtained from a digital camera or the like, a three-dimensional model of a space having a branch shape can be easily generated. it can.
[0086]
In the present embodiment, the three-dimensional data of the branched space is generated using the configuration of the first embodiment. However, the present invention is not limited to this, and for example, the configuration of the second embodiment may be applied. .
[0087]
Embodiment 4 FIG.
In the fourth embodiment, a three-dimensional model of a curved space is generated. The configuration of the present embodiment is the same as that of FIG. 1 of the first embodiment described above, so the same reference numerals are given and the description thereof is omitted. Here, only operations different from those of the first embodiment will be described.
[0088]
Hereinafter, the operation of the three-dimensional model generation apparatus according to the present embodiment will be described. FIG. 12 is a diagram illustrating an example of a curved space in the fourth embodiment. In this embodiment, a curved space is regarded as an aggregate of a plurality of hexahedrons, and each hexahedron is defined as a partial space. Then, six internal surfaces are photographed with a digital camera in hexahedral units to obtain a still image. Here, the surface along the shape of the curve is the right surface or the left surface, and the front surface, the back surface, the ceiling, and the floor surface are determined from the positional relationship with the right surface and the left surface.
[0089]
In this embodiment, first, the case where the hexahedron 61 shown in FIG. 12 is created and then the hexahedron 62 is connected to the front of the hexahedron 61 will be described as an example. Note that the hexahedron to be created first is arbitrary.
[0090]
The background area designating unit 1 displays a still image on the display in the same procedure as in the first embodiment described above, and then generates background area data based on the plane coordinates corresponding to the end points of the designated area. The background area data is notified to the partial space size acquisition unit 2 and the partial space texture generation unit 7.
[0091]
The partial space size acquisition unit 2 generates partial space size data based on the width and height of each side surface of the hexahedron 61 and the background region data input by the operator, and the partial space size data is generated in the space three-dimensional. The data generation unit 3 and the space management table setting unit 4 are notified.
[0092]
The spatial three-dimensional data generation unit 3 calculates the three-dimensional shape of the hexahedron 61 based on the received partial space size data. Then, similarly to the first embodiment, spatial three-dimensional data is generated, and the spatial three-dimensional data is notified to the spatial management table setting unit 4 and the spatial texture mapping unit 8. The reference point setting method is the same as in the third embodiment.
[0093]
Next, the space management table setting unit 4, the connection setting unit 5, the space management table appending unit 6, and the subspace texture generating unit 7 perform the processing in the same procedure as in the first embodiment, and the processing for the hexahedron 61 is completed. To do. Further, also when the hexahedron 62 is connected to the front surface of the hexahedron 61, each part of the three-dimensional model generation apparatus performs processing in the same procedure as in the first embodiment described above. Thereafter, in the present embodiment, the above process is executed for all hexahedrons constituting the curved space.
[0094]
Next, in the space texture mapping unit 8, when the processing for all the triangular prisms is completed in the same procedure as in the first embodiment described above, the partial space of all hexahedrons constituting the space three-dimensional data and the space Based on the texture data, a curved space model data obtained by connecting a plurality of hexahedrons is generated.
[0095]
As described above, in the present embodiment, since a plurality of hexahedrons are generated using still images obtained from a digital camera or the like, a three-dimensional model of a curved space can be easily generated. .
[0096]
In the present embodiment, the three-dimensional data of the curved space is generated using the configuration of the first embodiment. However, the configuration is not limited to this, and for example, the configuration of the second embodiment may be applied. .
[0097]
Embodiment 5 FIG.
In the fifth embodiment, a three-dimensional model of an object arranged in a space is generated. In addition, about the structure similar to Embodiment 1 demonstrated previously, the same code | symbol is attached | subjected and the description is abbreviate | omitted.
[0098]
FIG. 13 is a diagram showing the configuration of the fifth embodiment of the three-dimensional model generation device according to the present invention. In FIG. 13, reference numeral 71 denotes an object specifying unit that generates specified vertex data based on the plane coordinates of the vertex of the specified object, and 72 denotes a vertex that generates calculated vertex data based on the plane coordinates of the unspecified vertex. A calculation unit 73 is an object size calculation unit that generates object size data based on the width, height, and depth of the object. 74 is a unit that generates three-dimensional data of the object based on the background area data and designated vertex data. 3 is an object three-dimensional data generation unit, 75 is an object texture generation unit that cuts out / processes a portion corresponding to an object from a still image and generates object texture data, and 76 is object three-dimensional data and object texture data Based on texture An object texture mapping unit for generating a mapped object model data.
[0099]
Reference numeral 81 denotes an object two-dimensional information generation unit that displays a still image on a display and outputs the designated plane coordinates of a rectangular parallelepiped approximating the object as designated vertex data. 82 is background area data and designated vertex. An object three-dimensional information generating unit that generates three-dimensional data of a rectangular parallelepiped that approximates an object based on data, and 83 is object model data in which a texture is mapped based on the three-dimensional data of the rectangular parallelepiped approximating the object and the object texture data Is an object texture information generation unit for outputting.
[0100]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. FIG. 14 is a diagram illustrating a three-dimensional model of a space in the fifth embodiment. First, the background area designating unit 1 displays a still image 91 in which an object is reflected with a wall as a background on the display. Here, when the operator uses a mouse or the like to specify a partial area corresponding to the wall that is the background of the object with a quadrilateral, the background area specifying unit 1 uses the specified four-point plane coordinates to determine the background. Area data is generated, and the background area data is notified to the object size calculator 73 and the object texture generator 75.
[0101]
The object designating unit 71 approximates the shape of the object in a rectangular parallelepiped based on the still image 91 displayed in the background area designating unit 1. Here, when the operator designates the vertex of the rectangular parallelepiped with a mouse or the like, the object designation unit 71 generates designated vertex data based on the plane coordinates of the designated vertex, and the designated vertex data is used as the vertex calculation unit 72, the object The size calculator 73 and the object texture generator 75 are notified.
[0102]
However, the minimum number of vertices to be specified is four. The four vertices at this time are assumed to correspond to the width, height, and depth of the rectangular parallelepiped, and the vertexes are designated to correspond to the three axes of the three-dimensional orthogonal coordinate system. For example, in FIG. 14, apex 91c, apex 91f, apex 91g, and apex 91h are designated. As another designation example, for example, the vertex 91b, the vertex 91c, the vertex 91d, and the vertex 91g may be designated. It is also possible to designate all vertices of a rectangular parallelepiped in the image. Hereinafter, a rectangular parallelepiped that approximates an object is simply referred to as an “object”.
[0103]
The vertex calculation unit 72 generates calculation vertex data based on the plane coordinates of the vertices that are not output as the designated vertex data among all the vertices constituting the object, and the calculation vertex data is used as the object size calculation unit 73. And the object texture generation unit 75. In FIG. 14, the plane coordinates of vertex 91a, vertex 91b, vertex 91d, and vertex 91e are output. The plane coordinates of these vertices are calculated using the designated vertex data and the fact that the shape of the object is a rectangular parallelepiped.
[0104]
The object size calculation unit 73 generates object size data by automatically calculating the width, height, and depth of the object based on the background area data and the designated vertex data. Then, the object size data is notified to the object three-dimensional data generation unit 74.
[0105]
Here, a method of calculating the width M, height N, and depth K of the object will be described. FIG. 15 is a diagram illustrating a method for calculating the width, height, and depth of an object (an example in the case of Dl <Dr). Note that. It is assumed that the height H and width W of the wall surface are already known by the method shown in the first embodiment. The object is in contact with the wall surface and is not inclined with respect to the wall surface.
[0106]
First, the width M is calculated using the wall width W, background area data, designated vertex data, and calculated vertex data. Specifically, on a still image, a line segment corresponding to the width of the object on the wall surface and a line segment corresponding to the width of the wall surface are targeted and calculated from the ratio of the length of the line segment and the width W of the wall surface. To do. Similarly, the height N is calculated using the wall height H, background region data, designated vertex data, and calculated vertex data. Specifically, in a still image, for a line segment corresponding to the height of an object on the wall surface and a line segment corresponding to the height of the wall surface, the ratio between the length of the line segment and the height H of the wall surface Calculate from
[0107]
Next, the depth K calculates several parameters based on the following calculation formulas (22) to (28).
Figure 0004017351
s = H / (Y Five -Y 6 (23)
θ = cos -1 (Pz / L) (24)
δo = tan -1 (X 0 / F) (25)
δc = tan -1 (X Three / F) (26)
Po = Pz * tan (∠o) (27)
Pc = Pz * tan (∠c) (28)
[0108]
However, (X 1 , Y 1 ) Represents the coordinates of the lower left corner of the background area data, and (X 2 , Y 2 ) Represents the coordinates of the lower right corner of the background area data, and (X Three , Y Three ) Represents the coordinates of the upper right corner of the background area data, and (X Four , Y Four ) Represents the coordinates of the upper left corner of the background area data, and Cx represents a point (X 1 , Y 1 ) And point (X Three , Y Three ) And a line (X Four , Y Four ) And point (X 2 , Y 2 ) Represents the x coordinate of the intersection with the straight line connecting Y Five Is a point (X Four , Y Four ) And point (X Three , Y Three ) Represents the y-coordinate when the x-coordinate value is Cx on the straight line connecting 6 Is a point (X 1 , Y 1 ) And point (X 2 , Y 2 ) Represents the y coordinate when the x coordinate value is Cx on the straight line connecting 0 Represents the x coordinate of the vertex corresponding to the origin of the rectangular parallelepiped in the specified vertex data, Three Represents the x coordinate of the vertex corresponding to the depth direction of the rectangular parallelepiped in the designated vertex data.
[0109]
When Dl> Dr, the following calculation formulas (29) to (34) are used.
β = cos -1 ((W 2 + Dr 2 -Dl 2 ) / (2 * W * Dr)) (29)
Pz = Dr * sin (π−β) (30)
Wr = W / 2 + Cx * s (31)
L = √ (Dr 2 + Wr 2 -2 * Dr * Wr * cosβ) (32)
∠o = θ−δo (33)
∠c = θ−δc (34)
[0110]
When Dl <Dr, the following calculation formulas (35) to (40) are used.
β = cos -1 ((W 2 + Dl 2 -Dr 2 ) / (2 * W * Dl)) (35)
Pz = Dl * sin (π−β) (36)
Wl = W / 2−Cx * s (37)
L = √ (Dl 2 + Wl 2 -2 * Dl * Wl * cosβ) (38)
∠o = θ + δo (39)
∠c = θ + δc (40)
[0111]
Using the above parameters, the depth K is calculated by the following equation (41).
K = (Po−Pc) / (tan (∠o)) (41)
[0112]
Next, after calculating the width M, height N, and depth K of the object, the object three-dimensional data generation unit 74 calculates the three-dimensional coordinates of the object based on the received object size data, and the calculation result is used as the object. Output as three-dimensional data.
[0113]
The object texture generation unit 75 generates object texture data by cutting out a portion corresponding to the object from the still image based on the background area data, the designated vertex data, and the calculated vertex data, and further processing the image. Then, the object texture data and the object texture mapping unit 76 are notified. Each surface of the object is given a name based on the wall surface. For example, as shown in FIG. 13, the surface facing the wall surface is the back surface, the surface facing the back surface is the front surface of the hand, and the surfaces positioned on the left and right and top and bottom of the front surface are the left surface, right surface, top surface, Called the bottom surface.
[0114]
For example, when the object texture generation unit 75 receives the image, the specified vertex data, and the calculated vertex data displayed in the background area specifying unit 1, the object texture generation unit 75 cuts out a portion corresponding to the object surface from the image, and further, the cut-out portion is a rectangle. Then, the object texture data is generated. In addition, for a surface that is not shown in the image displayed in the background region designating unit 1, when the operator designates a region corresponding to the object surface of the still image as a quadrilateral, the plane coordinates of the designated vertex are calculated. Therefore, the object texture generation unit 75 cuts out the partial region, further processes the cut-out portion so as to be a rectangle, and generates object texture data.
[0115]
The object texture mapping unit 76 generates a three-dimensional model of the object to which the texture is mapped, that is, object model data, based on the received object three-dimensional data and object texture data. This object model data is output in VRML format, for example, and displayed using a VRML browser.
[0116]
As described above, in the present embodiment, since a three-dimensional model of an object arranged in space is generated using a still image obtained from a digital camera or the like, the three-dimensional object of a rectangular parallelepiped object is generated. A model can be easily created. Further, even when the actual object is not a rectangular parallelepiped shape, the actual object can be easily modeled by approximating the shape of the object including the protruding portion and the dent with a rectangular parallelepiped.
[0117]
In the present embodiment, the expression “wall surface” is used in consideration of the ease of explanation, but even when the object is not in contact with the wall in the real space, it is in contact with the back surface of the object. By assuming a virtual wall surface in real space, an object can be similarly modeled in a rectangular parallelepiped shape.
[0118]
Further, in this embodiment, the cuboid hand front surface is assumed to be parallel to the wall surface in consideration of easy understanding of the explanation. However, even when the object is inclined with respect to the wall surface, it is parallel to the object front surface. By assuming a simple virtual wall surface in real space, the object can be similarly modeled in a rectangular parallelepiped shape.
[0119]
Embodiment 6 FIG.
In the sixth embodiment, a three-dimensional model of a space in which objects are arranged is generated. In addition, about the structure similar to Embodiment 1, 2, and 5 demonstrated previously, the same code | symbol is attached | subjected and the description is abbreviate | omitted.
[0120]
FIG. 16 is a diagram showing the configuration of the sixth embodiment of the three-dimensional model generation device according to the present invention. In FIG. 16, reference numeral 101 denotes a spatial processing unit that generates a three-dimensional model of a subspace, and reference numeral 102 denotes a subspace in which the three-dimensional shape of the object is acquired and the object is arranged when the object is arranged in the subspace. This is an object processing unit that generates a three-dimensional model.
[0121]
Further, reference numeral 111 denotes an object-attached subspace three-dimensional information for generating subspace three-dimensional data, a size such as the width and height of a rectangular parallelepiped approximating the object, and three-dimensional data of the subspace in which the object is arranged. 112 is a generation unit, and an object-attached subspace texture information generation unit 112 generates subspace three-dimensional data, subspace texture data, object three-dimensional data, and a subspace three-dimensional model in which objects are arranged. It is.
[0122]
Reference numeral 121 denotes an object size calculation unit that generates object size data based on the width, height, and depth of the object. Reference numeral 122 denotes a distance that the object is away from the wall surface based on the background area data and specified vertex data. An offset calculation unit that calculates and outputs the calculation result as offset data. 123 is a part with an object that calculates the three-dimensional coordinates of the object and generates subspace three-dimensional data with an object in which the object is arranged in the partial space. A spatial three-dimensional data generation unit 124 is configured to map a texture to an object based on the texture data of the object, the three-dimensional data of the object, the texture data of the subspace, and the three-dimensional data of the subspace. An object was placed on An object-attached subspace texture mapping unit that generates object-attached subspace model data, and 125 is a subsection based on object texture data, object three-dimensional data, subspace texture data, and subspace three-dimensional data. This is a space generation unit with an object that generates a three-dimensional model of a space in which objects are arranged by cutting out textures of surfaces to which the spaces are connected.
[0123]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. Note that the processing in the spatial processing unit 101 is the same as that of the second embodiment described above, and thus the description thereof is omitted. In addition, since the processing of the object designating unit 71, the vertex calculating unit 72, and the object texture generating unit 75 in the object processing unit 102 is the same as that in the above-described fifth embodiment, the description thereof is omitted.
[0124]
After executing the designated vertex data generation process and the calculated vertex data generation process in the same procedure as in the above-described fifth embodiment, the object size calculation unit 121 determines whether the object is in contact with the floor surface 130 or the front surface 132 or away from it. Find out. FIG. 17 is a diagram illustrating a three-dimensional model of a space in the sixth embodiment. In FIG. 17, the background area data is the plane coordinates of the vertices 133 to 136. Further, the plane coordinates of the vertices 131a to 131h are obtained by the object designating unit 71 or the vertex calculating unit 72.
[0125]
First, it is checked whether or not the object is away from the front face 130. Here, the threshold value γ is set in advance as an arbitrary value, and the inclination is equal to a straight line connecting the vertex 133 and the vertex 134 (hereinafter, referred to as a straight line 133-134), and the threshold value γ is below the y axis. Straight lines 137 to 138 translated in the direction are set. If any one of the vertices 131e and 131h exists in an area between the straight lines 133-134 and 137-138 on the image, the object is considered to be in contact with the front surface 130. In this embodiment, it is assumed that the object is not inclined with respect to the wall surface.
[0126]
Further, whether or not it is away from the floor surface 132 can also be estimated by calculating the distances between a plurality of vertices and straight lines as described above.
[0127]
Next, the object size calculation unit 121 calculates the width M, height N, and depth K of the object. When the object is in contact with the front surface 130, the width M is equal to the line segment and the wall surface corresponding to the width of the object on the wall surface on the still image displayed by the background area designating unit 1 as in the fifth embodiment. Is calculated from the ratio of the length of the line segment on the image to the width of the wall surface.
[0128]
On the other hand, as shown in FIG. 17, when the object is away from the front surface 130, the coordinates of the vertices 139 and 140 in the plane coordinate system are calculated using the vertices 133, 134, 131e, 131f, 131g, and 131h. By regarding the line segment between the vertices 139 and 140 as the width of the object, the width M can be calculated in the same manner as described above.
[0129]
When the object is in contact with the front surface 130, the height N corresponds to the height of the object on the wall surface on the still image displayed by the background area designating unit 1 as in the fifth embodiment. A line segment and a line segment corresponding to the height of the wall surface are targeted, and calculation is performed from the ratio between the length of the line segment on the image and the height of the wall surface.
[0130]
On the other hand, as shown in FIG. 17, when the object is away from the front surface 130, the coordinates of the vertices 139, 141, and 142 in the plane coordinate system are calculated using the vertices 135, 136, 131c, 131d, 131g, and 131h. Then, the line N between the vertices 139 and 141 is regarded as the height of the object, and the line N between the vertices 139 and 142 is regarded as the height of the wall surface, whereby the height N can be calculated in the same manner as described above. Note that the depth K can be obtained by the same procedure as in the fifth embodiment.
[0131]
Next, the offset calculation unit 122 calculates the distance that the object is away from the wall surface based on the background area data and the designated vertex data, and generates offset data. Then, the offset data is notified to the object-attached subspace three-dimensional data generation unit 123.
[0132]
For example, in the case of FIG. 17, the distance between the object and the front 130 corresponds to the distance in the real space of the line segment sandwiched between the vertices 131h and 139. This can be obtained from the ratio between the length on the image and the distance in the real space, targeting the line segment sandwiched between the vertices 131h and 139 and the line segment sandwiched between the vertices 131g and 131h. On the other hand, the same applies to the case where the object is away from the floor surface 132. The distance from the floor surface 132 includes a line segment corresponding to a distance on the front surface 130 where the object is away from the floor surface 132, and the line segment. A line segment that is an extension and corresponds to the height of the front face 130 can be obtained from the ratio of the length in the image and the distance in the real space.
[0133]
Next, the object-attached subspace three-dimensional data generation unit 123 calculates the three-dimensional shape of the object based on the subspace three-dimensional data, offset data, and object size data, and places the object in the subspace. Spatial three-dimensional data is generated. Then, the object-attached subspace three-dimensional data is notified to the object-attached subspace texture mapping unit 124.
[0134]
Next, after executing the object texture data generation process, the object-attached subspace texture mapping unit 124 maps the texture based on the object-attached subspace three-dimensional data, object texture data, subspace three-dimensional data, and subspace texture data. Then, the object-attached subspace model data in which the objects are arranged in the subspace is generated. Then, the object-attached subspace model data is notified to the object-added space generation unit 125.
[0135]
Thereafter, the spatial processing unit 101 executes the same processing as that of the second embodiment on all the partial spaces constituting the space, and the object processing unit 102 for the partial space having the object to be modeled. Performs the above processing.
[0136]
Finally, in the object-added space generation unit 125, subspace model data that is a three-dimensional model of a subspace in which no object is arranged and subspace model data with an object that is a three-dimensional model of a subspace in which the object is arranged are obtained. Then, based on the space management table 9 (not shown) and the connection table 10 (not shown), the object-attached space three-dimensional model data is generated by connecting a plurality of partial spaces. In addition, about the method of connecting several partial space, it performs by the procedure similar to the process of the partial space connection part 33 of Embodiment 2. FIG.
[0137]
As described above, in the present embodiment, a configuration is used in which a three-dimensional model of a space in which an object is arranged is generated using a still image obtained from a digital camera or the like. Can be created easily with a small amount of work. In addition, the object size and the arrangement in the space are acquired in the process of creating the three-dimensional model of the space, and the object and the space are created separately, and the composition is not used. A three-dimensional model of the obtained space can be created.
[0138]
Note that the “wall surface” shown in the present embodiment is a real wall, but by assuming a virtual transparent wall behind the object, the above operation is also performed for an object placed in the center of the room. Can be applied. That is, in the present embodiment, a three-dimensional model of a space in which an object is placed in the center of the room can be generated.
[0139]
In the present embodiment, the three-dimensional data and texture data of the partial space are generated by the method shown in the second embodiment. However, the present invention is not limited to this. For example, by the method shown in the first embodiment, The three-dimensional data and texture data of the partial space may be generated.
[0140]
Embodiment 7 FIG.
In the seventh embodiment, a three-dimensional model of a space in which an object is arranged when the object is arranged to be inclined with respect to the background area is generated. In addition, about the structure similar to Embodiment 1, 2, 5 and 6 demonstrated previously, the same code | symbol is attached | subjected and the description is abbreviate | omitted.
[0141]
FIG. 18 is a diagram showing the configuration of the third embodiment of the three-dimensional model generation device according to the present invention. In FIG. 18, reference numeral 151 denotes a tilt object processing unit that acquires a three-dimensional shape of an object and generates a three-dimensional model of the subspace in which the object is arranged when the object is arranged in the subspace.
[0142]
Reference numeral 161 denotes an object inclination information generation unit that calculates how much the object is inclined with respect to the existing wall surface based on the received partial space three-dimensional data.
[0143]
Reference numeral 171 denotes a still image in which an object to be modeled is displayed on the display from the images displayed by the background area designating unit 1, and the coordinates of the designated virtual background area in the four-dimensional coordinate system. A virtual background area designating unit that outputs a value as virtual background area data. 172 calculates the three-dimensional coordinates of the vertices of the virtual background area by inputting the height and width of the virtual background area, A virtual background region three-dimensional data generation unit that outputs the background region three-dimensional data. 173 is a real space based on the partial space three-dimensional data output from the partial space three-dimensional data generation unit 31 and the virtual background region three-dimensional data. It is an inclination calculation part which calculates the angle which the wall surface to perform and the virtual wall surface which is a virtual background area | region make, and outputs the calculation result as object inclination data.
[0144]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. Note that the processing in the spatial processing unit 101 is the same as that of the second embodiment described above, and thus the description thereof is omitted.
[0145]
The virtual background area designating unit 171 displays on the display a still image in which an object to be modeled is captured from the images displayed by the background area designating unit 1. Here, when the operator designates a virtual background area that is parallel to the back surface of the object and intersects the wall surface on the image with a quadrilateral using a mouse or the like, the virtual background area designation unit In 171, coordinate values in the plane coordinate system of the designated four points, that is, virtual background area data is generated. Then, the virtual background area data is notified to the object size calculation unit 73. Note that a virtual background area (virtual background area) can be specified on a still image by shooting an object or marker as a mark when the still image is captured. In addition, the height and width of the virtual background area are measured in advance.
[0146]
The virtual background region three-dimensional data generation unit 172 generates virtual background region three-dimensional data by calculating three-dimensional coordinates of all vertices of the virtual background region based on the height and width of the virtual background region. Then, the virtual background area three-dimensional data is notified to the inclination calculation unit 173.
[0147]
The inclination calculation unit 173 calculates a normal vector of the surface of the real wall surface and the virtual wall surface based on the subspace three-dimensional data output from the subspace three-dimensional data generation unit 31 and the virtual background region three-dimensional data. The angle between the wall surface and the virtual wall surface, that is, the object inclination data is generated. Then, the object inclination data is notified to the object-attached subspace three-dimensional data generation unit 74. FIG. 19 is a diagram illustrating a state in which the objects are arranged to be inclined with respect to the background area. Therefore, here, the normal vector of the surface is calculated for the wall surface 181 and the virtual wall surface 182 that is the virtual background region, and the angle formed by the wall surface 181 and the virtual wall surface 182 is obtained.
[0148]
Next, after executing the designated vertex data generation process and the calculated vertex data generation process in the same procedure as in the fifth embodiment described above, the object size calculation unit 73 determines the height and width of the virtual background area, the virtual background area Object size data is generated by automatically calculating the width, height, and depth of an object based on the data and designated vertex data. Then, the object size data is notified to the object-attached subspace three-dimensional data generation unit 74. Note that the calculation method of the width, height, and depth of the object is performed in the same procedure as in the previous embodiment 6.
[0149]
The object-attached subspace three-dimensional data generation unit 74 calculates the three-dimensional shape of the object based on the subspace three-dimensional data, the virtual background area three-dimensional data, the designated vertex data, and the object inclination data, thereby Spatial three-dimensional data is generated. Then, the object-attached subspace three-dimensional data is notified to the object-attached subspace texture mapping unit 76.
[0150]
Thereafter, the spatial processing unit 101 executes the same processing as that of the second embodiment for all the partial spaces constituting the space, and the gradient object processing unit for the partial space where the object to be modeled is present. 151 executes the above processing.
[0151]
Finally, in the object-added space generation unit 125, in the same procedure as in the above-described sixth embodiment, the subspace model data that is the three-dimensional model of the subspace in which no object is arranged, and the three-dimensional of the subspace in which the object is arranged 3D space with an object which is a space obtained by connecting a plurality of partial spaces based on a space management table 9 (not shown) and a connection table 10 (not shown). Generate model data.
[0152]
As described above, in the present embodiment, since a still image obtained from a digital camera or the like is used, a three-dimensional model of an object arranged to be inclined with respect to the background region can be generated. Even when objects are arranged at an arbitrary angle, a three-dimensional model of a space can be easily created with a small amount of work.
[0153]
In the present embodiment, the three-dimensional data and texture data of the partial space are generated by the method shown in the second embodiment. However, the present invention is not limited to this. For example, by the method shown in the first embodiment, The three-dimensional data and texture data of the partial space may be generated.
[0154]
Embodiment 8 FIG.
In the eighth embodiment, a three-dimensional model of a space when the same object is arranged over a plurality of partial spaces is generated (application example of the sixth embodiment). In addition, about the structure similar to Embodiment 1, 2, 5, 6 and 7 demonstrated previously, the same code | symbol is attached | subjected and the description is abbreviate | omitted.
[0155]
FIG. 20 is a diagram showing a configuration of an eighth embodiment of the three-dimensional model generation device according to the present invention. In FIG. 20, reference numeral 201 denotes an already-worked part connected to the working subspace with reference to the connection setting table 10 when the number of vertices of the object specified by the operator is less than four. Get object information to obtain the subspace number of the space, the face number of the face that is going to generate an object from now on, and the face number of the face that is continuous with reference to the object management table 202 is an object management table that stores the partial space number of the working partial space, the surface number of the surface that is the background of the object, the width, height, and depth of the object, and the distance that the object is away from the wall surface. It is an object management table setting unit to be set.
[0156]
The continuous object processing unit 191 is obtained by adding the object information acquisition unit 201 and the object management table setting unit 202 to the object processing unit 102 according to the sixth embodiment that generates a three-dimensional model of a partial space in which objects are arranged. It is.
[0157]
Here, the operation of the three-dimensional model generation apparatus in the present embodiment will be described. Here, only operations different from those of the first to seventh embodiments described above will be described.
[0158]
In the object management table setting unit 202, the subspace number of the working subspace by the operator's input, the surface number of the surface as the background of the object acquired based on the still image corresponding to the vertex of the specified object (object Attribution plane number), object size data (object width, object height, object depth) output from the object size calculation unit 121, and offset data (offset) output from the offset calculation unit 122 are set in the object management table. FIG. 21 is a diagram illustrating an example of the object management table.
[0159]
In the object information acquisition unit 201, when the number of vertices of the object designated by the operator is less than 4, the object to be generated is regarded as having been partially created in the already worked subspace. . Then, referring to the connection setting table 10, the partial space number of the already worked partial space connected to the working partial space, and the surface number of the surface continuous with the surface from which an object is to be generated And get. Further, the object information acquisition unit 201 refers to the object management table and acquires the object depth and offset. The acquired depth and offset of the object are notified to the object-attached subspace three-dimensional data generation unit 123.
[0160]
Here, the operation of the object information acquisition unit 201 will be described in detail using a specific example. FIG. 22 is a diagram for explaining the operation of the object information acquisition unit 201. Here, it is assumed that the work for the rectangular parallelepiped 211 has already been completed, and the work for the rectangular parallelepiped 212 is to be performed. Further, if it is not the first rectangular parallelepiped, the number of designated vertices may be less than four. Further, on the still image 212a (not shown) obtained by photographing the front, it is assumed that three points of the vertex 221, the vertex 222, and the vertex 223 are designated as the vertex of the object.
[0161]
In such a case, the object information acquisition unit 201 refers to the connection setting table 10 because the number of designated vertices is less than four. FIG. 23 is a diagram illustrating an example of the connection table 10. Then, an item whose connection destination partial space number is the partial space number (212) of the rectangular parallelepiped under operation is searched, and the connection source partial space number (211) is obtained here.
[0162]
In addition, since the working surface is the front surface 212a, the object to be generated has already been processed when working on the front surface 211a of the rectangular parallelepiped 211. Therefore, the object information acquisition unit 201 refers to the object management table and obtains the depth and offset of the object based on the partial space number (211) and the object attribution surface number (211a). Note that the width and height of the object can be obtained using the method described in the fourth embodiment, and thus are not acquired from the object management table.
[0163]
As described above, in the present embodiment, since a still image obtained from a digital camera or the like is used, a three-dimensional model of an object arranged across a plurality of partial spaces can be generated. A three-dimensional model can be efficiently created for an object that spans multiple spaces, such as a pillar or an elongated shelf.
[0164]
FIG. 24 is a diagram showing a configuration of a general computer system that operates as the three-dimensional model generation apparatus shown in the first to eighth embodiments and can realize the above-described three-dimensional model generation processing.
[0165]
The computer system includes a control unit 301 including a CPU, a memory unit 302, a display unit 303, an input unit 304, a CD-ROM drive unit 305, and a disk unit 306. They are connected via a system bus A. In FIG. 24, the control unit 301 executes the three-dimensional model generation process shown in the first to eighth aspects. The memory unit 302 includes a memory such as a RAM and a ROM, and stores a program to be executed by the control unit 301, necessary data obtained in the course of processing, and the like. The display unit 303 is composed of a CRT, LCD (liquid crystal display panel) or the like, and displays various screens to the user of the computer system. The input unit 304 includes a keyboard, a mouse, and the like, and is used by a computer system user to input various information. The illustrated CD-ROM 400 stores a program describing each process shown in the first to eighth embodiments.
[0166]
In the computer system configured as described above, first, a program is installed in the disk unit 306 from the CD-ROM 400 set in the CD-ROM drive unit 305. Then, the program read from the disk unit 306 when starting the computer system is stored in the memory unit 302. In this state, the control unit 301 (CPU) executes the processing shown in the first to eighth embodiments in accordance with the program stored in the memory unit 302.
[0167]
In the present invention, a program in which each process is described is provided on the CD-ROM 400. However, the recording medium of the program is not limited to this, and may be, for example, according to the computer constituting the system. Other recording media such as a magnetic disk such as a floppy disk, a magneto-optical disk, and a magnetic tape can also be used.
[0168]
【The invention's effect】
As described above, according to the present invention, a plurality of spaces are generated using still images obtained from a digital camera or the like, and the plurality of spaces are freely connected in the plane direction and the vertical direction. More specifically, a configuration is used in which texture model is mapped to spatial three-dimensional data in a state where a plurality of rectangular parallelepipeds are connected to generate spatial model data in which a plurality of partial spaces are connected. Thereby, there is an effect that a three-dimensional model generation device capable of generating a three-dimensional model having a complicated shape can be obtained.
[0169]
According to the next invention, a plurality of spaces are generated using still images obtained from a digital camera or the like, and the plurality of spaces are freely connected in the plane direction and the vertical direction. Specifically, texture models are mapped to the individual rectangular parallelepipeds that make up the space, and after completing the mapping process for all the rectangular parallelepipeds, all the rectangular parallelepipeds are connected to generate spatial model data. The configuration. Thereby, there is an effect that a three-dimensional model generation device capable of generating a three-dimensional model having a complicated shape can be obtained.
[0170]
According to the next invention, a configuration is used in which a three-dimensional model of a space in which an object is arranged is generated using a still image obtained from a digital camera or the like. Thus, it is possible to obtain a three-dimensional model generation device that can be easily created. In addition, the object size and the arrangement in the space are acquired in the process of creating the three-dimensional model of the space, and the object and the space are created separately, and the composition is not used. It is possible to obtain a three-dimensional model generation apparatus capable of creating a three-dimensional model of the space obtained.
[0171]
According to the next invention, since a still image obtained from a digital camera or the like is used to generate a three-dimensional model of an object arranged to be inclined with respect to the background area, the object can be arbitrarily set. Even when arranged at an angle, there is an effect that it is possible to obtain a three-dimensional model generation device capable of easily creating a three-dimensional model of a space with a small amount of work.
[0172]
According to the next invention, it is possible to generate a three-dimensional model of an object arranged over a plurality of partial spaces using a still image obtained from a digital camera or the like. There is an effect that it is possible to obtain a three-dimensional model generation apparatus that can efficiently create a three-dimensional model for an object that spans multiple spaces such as a shelf.
[0173]
According to the next invention, the rectangular parallelepiped forming the outline of the space is shifted and arranged so that it can be applied to a circular room such as an observation room or a spherical space such as a dome. There is an effect that a model generation device can be obtained.
[0174]
According to the next invention, since a plurality of triangular prisms are generated using still images obtained from a digital camera or the like, it is possible to easily generate a three-dimensional model of a space having a branch shape. There is an effect that a model generation device can be obtained.
[0175]
According to the next invention, since a plurality of hexahedrons are generated using still images obtained from a digital camera or the like, a three-dimensional model capable of easily generating a three-dimensional model of a curved space is provided. There exists an effect that a production | generation apparatus can be obtained.
[0176]
According to the next invention, since a 3D model of an object arranged in space is generated using a still image obtained from a digital camera or the like, a 3D model of a rectangular parallelepiped object can be easily obtained. There is an effect that a three-dimensional model generation apparatus that can be created can be obtained. In addition, even when a real object is not a rectangular parallelepiped shape, a three-dimensional model generation that can easily model a real object by approximating the shape of the object with a rectangular parallelepiped including protrusions and dents, etc. There is an effect that an apparatus can be obtained.
[0177]
According to the next invention, the spatial model data in which the plurality of partial spaces are connected is generated by mapping the texture to the spatial three-dimensional data in a state where the plurality of rectangular parallelepipeds are connected. Thereby, there is an effect that a three-dimensional model generation method capable of generating a three-dimensional model having a complicated shape can be obtained.
[0178]
According to the next invention, the texture model is mapped to the individual rectangular parallelepipeds constituting the space, and the spatial model data is generated by connecting all the rectangular parallelepipeds after completing the mapping process for all the rectangular parallelepipeds. It was decided to. Thereby, there is an effect that a three-dimensional model generation method capable of generating a three-dimensional model having a complicated shape can be obtained.
[0179]
According to the next invention, there is an effect that it is possible to obtain a 3D model generation method capable of easily creating a 3D model of a space in which an object is arranged with a small amount of work.
[0180]
According to the next invention, it is possible to obtain a three-dimensional model generation method capable of easily creating a three-dimensional model of a space with a small amount of work even when an object is arranged at an arbitrary angle. Play.
[0181]
According to the next invention, for example, it is possible to obtain a 3D model generation method capable of efficiently creating a 3D model for an object that spans a plurality of spaces such as a pillar and an elongated shelf. There is an effect.
[0182]
According to the next invention, there is an effect that it is possible to obtain a 3D model generation method capable of easily creating a 3D model of a rectangular parallelepiped object.
[0183]
According to the next invention, a computer executes a process of mapping a texture to spatial three-dimensional data in a state where a plurality of rectangular parallelepipeds are connected and generating a spatial model data obtained by connecting a plurality of partial spaces. It was. Thereby, there is an effect that it is possible to obtain a 3D model generation program capable of generating a 3D model having a complicated shape.
[0184]
According to the next invention, the texture is mapped to the individual rectangular parallelepipeds constituting the space, and when the mapping process is completed for all the rectangular parallelepipeds, the computer is caused to execute the process of connecting all the rectangular parallelepipeds. It was. Thereby, there is an effect that it is possible to obtain a 3D model generation program capable of generating a 3D model having a complicated shape.
[0185]
According to the next invention, there is an effect that it is possible to obtain a three-dimensional model generation program capable of easily creating a three-dimensional model of a space in which objects are arranged with a small amount of work.
[0186]
According to the next invention, it is possible to obtain a 3D model generation program capable of easily creating a 3D model of a space with a small amount of work even when objects are arranged at an arbitrary angle. Play.
[0187]
According to the next invention, there is an effect that it is possible to obtain a three-dimensional model generation program capable of easily creating a three-dimensional model of a rectangular parallelepiped object.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a first embodiment of a three-dimensional model generation apparatus according to the present invention.
FIG. 2 is a diagram illustrating an example of a set of rectangular parallelepipeds constituting a space.
FIG. 3 is a diagram showing a displayed still image.
FIG. 4 is a diagram for explaining a method for calculating a width W;
FIG. 5 is a diagram showing an example of a space management table 9;
6 is a diagram illustrating an example of a connection table 10. FIG.
FIG. 7 is a diagram showing a configuration of a second embodiment of a three-dimensional model generation device according to the present invention.
8 is a diagram illustrating an example of a branched space in the third embodiment. FIG.
FIG. 9 is a diagram illustrating a three-dimensional model of a space in the third embodiment.
10 is a diagram showing an example of a space management table 9. FIG.
FIG. 11 is a diagram illustrating an example of a connection table 10;
12 is a diagram showing an example of a curved space in the fourth embodiment. FIG.
FIG. 13 is a diagram showing a configuration of a third embodiment of a three-dimensional model generation device according to the present invention.
FIG. 14 is a diagram illustrating a three-dimensional model of a space in the fifth embodiment.
FIG. 15 is a diagram illustrating a method for calculating the width, height, and depth of an object.
FIG. 16 is a diagram showing a configuration of a sixth embodiment of a three-dimensional model generation device according to the present invention.
FIG. 17 is a diagram illustrating a three-dimensional model of a space in the sixth embodiment.
FIG. 18 is a diagram showing a configuration of a third embodiment of a three-dimensional model generation device according to the present invention.
FIG. 19 is a diagram illustrating a state in which an object is disposed to be inclined with respect to a background area.
FIG. 20 is a diagram illustrating a configuration of an eighth embodiment of a three-dimensional model generation device according to the present invention.
FIG. 21 is a diagram illustrating an example of an object management table.
22 is a diagram for explaining the operation of the object information acquisition unit 201. FIG.
FIG. 23 is a diagram illustrating an example of a connection table 10;
FIG. 24 is a diagram showing a configuration of a general computer system.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Background area | region designation | designated part, 2 Subspace size acquisition part, 3 Spatial 3D data generation part, 4 Spatial management table setting part, 5 Connection setting part, 6 Spatial management table additional recording part, 7 Subspace texture generation part, 8 Spatial texture Mapping unit 9 Spatial management table 10 Connection table 11 Spatial 3D information generation unit 12 Connection information setting unit 13 Spatial texture information generation unit 31 Subspace 3D data generation unit 32 Subspace texture mapping unit 33 Subspace connection unit, 41 subspace 3D information generation unit, 42 subspace texture information generation unit, 71 object specification unit, 72 vertex calculation unit, 73 object size calculation unit, 74 object 3D data generation unit, 75 object texture generation Part, 76 object texture mapping part, 81 object 2 object information generation unit, 82 object 3D information generation unit, 83 object texture information generation unit, 102 object processing unit, 111 object subspace 3D information generation unit, 112 object subspace texture information generation unit, 121 object Size calculation unit, 122 offset calculation unit, 123 subspace three-dimensional data generation unit with object, 124 subspace texture mapping unit with object, 125 space generation unit with object, 151 tilt object processing unit, 161 object tilt information generation unit, 171 Virtual background region designation unit, 172 Virtual background region three-dimensional data generation unit, 173 Inclination calculation unit, 191 Continuous object processing unit 191, 201 Object information acquisition unit, 202 Object management table setting unit

Claims (10)

空間を撮影した画像を用いて空間の3次元モデルを作成する3次元モデル生成装置において、
部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、
前記背景領域データに基づいて、複数の部分空間をつなぎあわせた空間3次元データを生成する空間3次元データ生成手段と、
部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、
前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、すべての部分空間に対するテクスチャデータ生成処理が終了した段階で、前記接続関係および前記空間3次元データに基づいて接続面以外の面にテクスチャをマッピングし、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル生成手段と、
を備えることを特徴とする3次元モデル生成装置。
In a 3D model generation apparatus that creates a 3D model of a space using an image of the space,
Background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space;
A spatial three-dimensional data generating means for generating spatial three-dimensional data by connecting a plurality of partial spaces based on the background region data;
Connection information setting means for setting connection relationships between subspaces (including predetermined size information on each surface and three-dimensional coordinates of end points);
Subspace texture data is generated based on the still image and the background region data, and texture data generation processing for all the partial spaces is completed. 3D model generation means for mapping a texture to a surface and generating a 3D model by connecting a plurality of spaces;
A three-dimensional model generation apparatus comprising:
空間を撮影した画像を用いて空間の3次元モデルを作成する3次元モデル生成装置において、
部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段と、
前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段と、
部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段と、
前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段と、
すべての部分空間3次元モデル生成処理が終了した段階で、当該部分空間3次元モデルおよび前記接続関係に基づいて、部分空間どうしの接続面のテクスチャを切り抜いた後、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段と、
を備えることを特徴とする3次元モデル生成装置。
In a 3D model generation apparatus that creates a 3D model of a space using an image of the space,
Background area data generation means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space;
Subspace three-dimensional data generation means for generating subspace three-dimensional data based on the background region data;
Connection information setting means for setting connection relationships between subspaces (including predetermined size information on each surface and three-dimensional coordinates of end points);
Subspace 3 generates subspace texture data based on the still image and the background region data, and further maps a texture to the subspace based on the subspace 3D data to generate a 3D model of the subspace. Dimensional model generation means;
After all the subspace three-dimensional model generation processing is completed, based on the subspace three-dimensional model and the connection relation, the texture of the connection surface between the subspaces is cut out, and a plurality of spaces are connected 3 Three-dimensional model connection means for generating a three-dimensional model;
A three-dimensional model generation apparatus comprising:
さらに、
前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、
前記部分空間3次元データ、前記背景領域データおよび前記指定頂点データに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段と、
前記静止画像、前記背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段と、
を備え、
前記3次元モデル接続手段は、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする請求項2に記載の3次元モデル生成装置。
further,
Vertex data generation that approximates the shape of the object in a rectangular parallelepiped based on the still image and generates specified vertex data that is the plane coordinates of the specified vertex and non-designated vertex data that is the plane coordinates of the other vertices Means,
An object-attached subspace three-dimensional data generating means for generating object-attached subspace three-dimensional data in which an object is arranged in the subspace based on the subspace three-dimensional data, the background region data, and the designated vertex data;
Object texture data is generated based on the still image, the background area data, and the vertex data, and further, the object texture data, the object-attached subspace three-dimensional data, the subspace three-dimensional data, and the subspace texture A subspace 3D model generating means with an object for mapping a texture based on data and generating a subspace 3D model with an object;
With
The three-dimensional model connection means, when all of the partial space three-dimensional model generation processing is completed, based on the partial space three-dimensional model, the object-attached partial space three-dimensional model, and the connection relation, The three-dimensional model generation apparatus according to claim 2, wherein a three-dimensional model in which spaces are connected is generated.
さらに、
前記静止画像の中からモデル化を行うオブジェクトの写っている静止画像を表示し、オブジェクトの奥面に対して平行に接しかつ壁面と交差する仮想的な背景領域に対応する仮想背景領域データを生成する仮想背景領域データ生成手段と、
前記仮想背景領域の高さと幅に基づいて、仮想背景領域の全頂点の3次元座標を表す仮想背景領域3次元データを生成する仮想背景領域3次元データ生成手段と、
前記部分空間3次元データと前記仮想背景領域3次元データに基づいて、実在する壁面と仮想壁面のなす角度を表すオブジェクト傾きデータを生成する傾き計算手段と、
前記静止画像に基づいてオブジェクトの形状を直方体で近似し、指定された頂点の平面座標である指定頂点データと、それ以外の頂点の平面座標である指定以外頂点データと、を生成する頂点データ生成手段と、
前記部分空間3次元データ、前記仮想背景領域3次元データ、前記指定頂点データ、および前記オブジェクト傾きデータに基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成するオブジェクト付部分空間3次元データ生成手段と、
前記静止画像、前記仮想背景領域データおよび前記頂点データに基づいてオブジェクトテクスチャデータを生成し、さらに、当該オブジェクトテクスチャデータ、前記オブジェクト付部分空間3次元データ、前記部分空間3次元データ、および前記部分空間テクスチャデータに基づいてテクスチャをマッピングし、オブジェクト付部分空間3次元モデルを生成するオブジェクト付部分空間3次元モデル生成手段と、
を備え、
前記3次元モデル接続手段は、すべての部分空間3次元モデル生成処理が終了した段階で、前記部分空間3次元モデル、前記オブジェクト付部分空間3次元モデル、および前記接続関係に基づいて、複数の部分空間をつなぎあわせた3次元モデルを生成することを特徴とする請求項2に記載の3次元モデル生成装置。
further,
Displays a still image of an object to be modeled from the still image, and generates virtual background area data corresponding to a virtual background area that is in parallel with the back surface of the object and intersects the wall surface Virtual background area data generating means for
Virtual background area 3D data generating means for generating virtual background area 3D data representing 3D coordinates of all vertices of the virtual background area based on the height and width of the virtual background area;
An inclination calculation means for generating object inclination data representing an angle formed by a real wall surface and a virtual wall surface based on the partial space three-dimensional data and the virtual background region three-dimensional data;
Vertex data generation that approximates the shape of the object in a rectangular parallelepiped based on the still image and generates specified vertex data that is the plane coordinates of the specified vertex and non-designated vertex data that is the plane coordinates of the other vertices Means,
A subspace with an object that generates subspace three-dimensional data with an object in which an object is arranged in the subspace based on the subspace three-dimensional data, the virtual background region three-dimensional data, the designated vertex data, and the object inclination data Three-dimensional data generation means;
Object texture data is generated based on the still image, the virtual background area data, and the vertex data, and further, the object texture data, the object-attached subspace three-dimensional data, the subspace three-dimensional data, and the subspace A subspace 3D model generating means with an object for mapping a texture based on the texture data and generating a subspace 3D model with an object;
With
The three-dimensional model connection means, when all of the partial space three-dimensional model generation processing is completed, based on the partial space three-dimensional model, the object-attached partial space three-dimensional model, and the connection relation, The three-dimensional model generation apparatus according to claim 2, wherein a three-dimensional model in which spaces are connected is generated.
さらに、
作業中の部分空間の部分空間番号、オブジェクトの背景となる面の面番号、所定のオブジェクトサイズ情報をオブジェクト管理テーブルに設定するオブジェクト管理テーブル設定手段と、
指定されたオブジェクトの頂点の数が4個未満である場合に、前記オブジェクト管理テーブルから所定のオブジェクトサイズ情報を取得するオブジェクトサイズ情報取得手段と、
を備え、
前記オブジェクト付部分空間3次元データ生成手段は、前記背景領域データ、前記指定頂点データ、および前記所定のオブジェクトサイズ情報に基づいて、部分空間にオブジェクトを配置したオブジェクト付部分空間3次元データを生成することを特徴とする請求項3に記載の3次元モデル生成装置。
further,
An object management table setting means for setting a partial space number of a working partial space, a surface number of a surface serving as an object background, and predetermined object size information in an object management table;
Object size information acquisition means for acquiring predetermined object size information from the object management table when the number of vertices of the designated object is less than 4;
With
The subspace three-dimensional data generation unit with an object generates subspace three-dimensional data with an object in which an object is arranged in the subspace based on the background region data, the designated vertex data, and the predetermined object size information. The three-dimensional model generation apparatus according to claim 3.
前記空間を直方体の集合体とみなして、空間の3次元モデルを生成することを特徴とする請求項1〜5のいずれか一つに記載の3次元モデル生成装置。  The three-dimensional model generation apparatus according to claim 1, wherein the three-dimensional model of the space is generated by regarding the space as a collection of rectangular parallelepipeds. 分岐のある空間を三角柱の集合体とみなして、空間の3次元モデルを生成することを特徴とする請求項1〜6のいずれか一つに記載の3次元モデル生成装置。  The three-dimensional model generation apparatus according to any one of claims 1 to 6, wherein a three-dimensional model of the space is generated by regarding a space with a branch as an aggregate of triangular prisms. 曲がりのある空間を六面体の集合体とみなして、空間の3次元モデルを生成することを特徴とする請求項1〜7のいずれか一つに記載の3次元モデル生成装置。  The three-dimensional model generation apparatus according to any one of claims 1 to 7, wherein a three-dimensional model of a space is generated by regarding a space with a bend as an aggregate of hexahedrons. 部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段、
前記背景領域データに基づいて、複数の部分空間をつなぎあわせた空間3次元データを生成する空間3次元データ生成手段、
部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段、
前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、すべての部分空間に対するテクスチャデータ生成処理が終了した段階で、前記接続関係および空間3次元データに基づいて接続面以外の面にテクスチャをマッピングし、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル生成手段、
としてコンピュータを機能させることを特徴とする3次元モデル生成プログラム。
Background area data generating means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space;
A spatial three-dimensional data generation means for generating spatial three-dimensional data by connecting a plurality of partial spaces based on the background region data;
Connection information setting means for setting connection relations between subspaces (including predetermined size information on each surface and three-dimensional coordinates of end points);
Subsurface texture data is generated based on the still image and the background area data, and a surface other than the connection surface is generated based on the connection relation and the spatial three-dimensional data when texture data generation processing for all the partial spaces is completed. 3D model generation means for mapping a texture to and generating a 3D model by connecting a plurality of spaces,
A three-dimensional model generation program for causing a computer to function as
部分空間の静止画像を表示し、部分空間内の領域の端点に対応する平面座標に基づいて背景領域データを生成する背景領域データ生成手段、
前記背景領域データに基づいて部分空間の3次元データを生成する部分空間3次元データ生成手段、
部分空間どうしの接続関係(各面における所定のサイズ情報および端点の3次元座標を含む)を設定する接続情報設定手段、
前記静止画像および前記背景領域データに基づいて部分空間テクスチャデータを生成し、さらに、前記部分空間3次元データに基づいて部分空間にテクスチャをマッピングし、部分空間の3次元モデルを生成する部分空間3次元モデル生成手段、
すべての部分空間3次元モデル生成処理が終了した段階で、当該部分空間3次元モデルおよび前記接続関係に基づいて、部分空間どうしの接続面のテクスチャを切り抜いた後、複数の空間をつなぎあわせた3次元モデルを生成する3次元モデル接続手段、
としてコンピュータを機能させることを特徴とする3次元モデル生成プログラム。
Background area data generating means for displaying a still image of a partial space and generating background area data based on plane coordinates corresponding to the end points of the area in the partial space;
Subspace three-dimensional data generating means for generating subspace three-dimensional data based on the background region data;
Connection information setting means for setting connection relations between subspaces (including predetermined size information on each surface and three-dimensional coordinates of end points);
Subspace 3 generates subspace texture data based on the still image and the background region data, and further maps a texture to the subspace based on the subspace 3D data to generate a 3D model of the subspace. Dimensional model generation means,
After all the subspace three-dimensional model generation processing is completed, based on the subspace three-dimensional model and the connection relation, the texture of the connection surface between the subspaces is cut out, and a plurality of spaces are connected 3 3D model connection means for generating a 3D model,
A three-dimensional model generation program for causing a computer to function as
JP2001037293A 2001-02-14 2001-02-14 3D model generation apparatus and 3D model generation program Expired - Fee Related JP4017351B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001037293A JP4017351B2 (en) 2001-02-14 2001-02-14 3D model generation apparatus and 3D model generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001037293A JP4017351B2 (en) 2001-02-14 2001-02-14 3D model generation apparatus and 3D model generation program

Publications (2)

Publication Number Publication Date
JP2002245486A JP2002245486A (en) 2002-08-30
JP4017351B2 true JP4017351B2 (en) 2007-12-05

Family

ID=18900442

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001037293A Expired - Fee Related JP4017351B2 (en) 2001-02-14 2001-02-14 3D model generation apparatus and 3D model generation program

Country Status (1)

Country Link
JP (1) JP4017351B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4152698B2 (en) * 2002-09-06 2008-09-17 三菱電機株式会社 3D building model data generator
JP5274717B2 (en) * 2010-11-18 2013-08-28 三菱電機株式会社 3D image display apparatus and 3D image display program
CN113483771B (en) * 2021-06-30 2024-01-30 北京百度网讯科技有限公司 Method, device and system for generating live-action map

Also Published As

Publication number Publication date
JP2002245486A (en) 2002-08-30

Similar Documents

Publication Publication Date Title
Haala et al. 3D urban GIS from laser altimeter and 2D map data
US6529626B1 (en) 3D model conversion apparatus and method
US5990900A (en) Two-dimensional to three-dimensional image converting system
US7812839B2 (en) Method for creating 3-D curved suface by using corresponding curves in a plurality of images
EP2546806B1 (en) Image based rendering for ar - enabling user generation of 3d content
JP2006172471A (en) Method and apparatus for three-dimensionally transforming two-dimensional linear data in real time and method and apparatus for three-dimensionally visualizing two-dimensional linear data in real time
JP4119529B2 (en) Virtual environment generation method and apparatus, and recording medium on which virtual environment generation program is recorded
JP3104638B2 (en) 3D image creation device
JP2020052790A (en) Information processor, information processing method, and program
RU2295772C1 (en) Method for generation of texture in real time scale and device for its realization
JP2002245438A (en) Device, method and program for supporting preparation of three-dimensional computer graphics
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
JPH06348815A (en) Method for setting three-dimensional model of building aspect in cg system
Mezhenin et al. Use of point clouds for video surveillance system cover zone imitation.
JP4017351B2 (en) 3D model generation apparatus and 3D model generation program
JP2832463B2 (en) 3D model reconstruction method and display method
JP3429400B2 (en) Modeling system
JP3309841B2 (en) Synthetic moving image generating apparatus and synthetic moving image generating method
JP3577202B2 (en) Video production equipment
EP3779878A1 (en) Method and device for combining a texture with an artificial object
JP4269951B2 (en) 3D computer graphics modeling system
JP2021064267A (en) Image processing apparatus and image processing method
JP3575469B2 (en) Synthetic moving image generating apparatus and synthetic moving image generating method
JP2003323636A (en) Three-dimensional supplying device and method and image synthesizing device and method and user interface device
JP2000057376A (en) Method for generating new viewpoint image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070522

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070615

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070918

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110928

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees