[go: up one dir, main page]

JP4107469B2 - Method for generating 3D shape data - Google Patents

Method for generating 3D shape data Download PDF

Info

Publication number
JP4107469B2
JP4107469B2 JP2001262921A JP2001262921A JP4107469B2 JP 4107469 B2 JP4107469 B2 JP 4107469B2 JP 2001262921 A JP2001262921 A JP 2001262921A JP 2001262921 A JP2001262921 A JP 2001262921A JP 4107469 B2 JP4107469 B2 JP 4107469B2
Authority
JP
Japan
Prior art keywords
dimensional
dimensional shape
dimensional image
shape data
data
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
JP2001262921A
Other languages
Japanese (ja)
Other versions
JP2003077007A (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.)
Roland DG Corp
Original Assignee
Roland DG 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 Roland DG Corp filed Critical Roland DG Corp
Priority to JP2001262921A priority Critical patent/JP4107469B2/en
Publication of JP2003077007A publication Critical patent/JP2003077007A/en
Application granted granted Critical
Publication of JP4107469B2 publication Critical patent/JP4107469B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、3次元形状データの生成方法に関し、さらに詳細には、人間の頭部の顔面側の3次元形状を示す3次元形状データを自動的に生成する3次元形状データの生成方法に関し、特に、3次元切削加工装置などの数値制御による3次元形状の加工装置などに用いる3次元形状データとして好適な3次元形状データを生成する3次元形状データの生成方法に関する。
【0002】
【従来の技術】
従来より、3次元スキャナーを用いて、3次元形状を備えた所定の対象物を示す3次元形状データを生成する方法が知られている。
【0003】
より詳細には、3次元スキャナーを用いた方法においては、例えば、対象物たる人間の頭部、特に顔面を、3次元スキャナーの光学手段などにより走査して測定し、その測定結果に基づいて、人間の顔面の3次元形状を示す3次元形状データが生成される。
【0004】
しかしながら、こうした従来の3次元スキャナーを用いた3次元形状データの生成方法においては、人間の顔面などの対象物を実際に測定しなければならないという制約があるとともに、当該3次元スキャナーが高価なので3次元形状データを生成するシステムが高価なものになるという問題点があった。
【0005】
また、3次元スキャナーを用いることなしに、所定の対象物の2次元画像を示す2次元画像データを用いて、当該2次元画像データから3次元形状データを生成する方法が知られている。
【0006】
より詳細には、2次元画像データを用いた方法においては、例えば、デジタルカメラで人間の顔面を撮影して得られた2次元画像データの各画素の赤色(R)の成分のデータ、緑色(G)の成分のデータ、青色(B)の成分のデータを、およそR:G:B=3:5:2の比率で処理して各画素の明るさを示す輝度情報を得る。そして、この2次元画像データの輝度情報を3次元形状データの高さ情報として、人間の顔面の3次元形状を示す3次元形状データを生成している。
【0007】
その結果、2次元画像データの示す2次元画像の明るい領域(即ち、輝度情報のレベルが高い領域)に対応して、3次元形状データの示す3次元形状の高さは高くなり、2次元画像の暗い領域(即ち、輝度情報のレベルが低い領域)に対応して3次元形状の高さは低くなる。
【0008】
この際、2次元画像データの示す2次元画像の種類に応じて白黒の反転処理がなされる。例えば、2次元画像が人間の頭部である場合には、髪が黒髪などで暗い領域であると、生成される3次元形状データの示す3次元形状の対応する部分の高さが低くなって不自然なので、白黒の反転処理を行った2次元画像データと元の2次元画像データとを合成する。そして、より輝度の高いデータからなる合成された2次元画像データの輝度情報を3次元形状データの高さ情報として変換する。
【0009】
しかしながら、こうした従来の2次元画像データを用いた3次元形状データの生成方法においては、2次元画像データの示す2次元画像が人物、特に、人間の頭部の顔面側である場合には、生成された3次元形状データの示す3次元形状が実際の人間の顔面の凹凸と対応せず不自然になってしまうという問題点があった。
【0010】
具体的には、2次元画像の人間の顔面における鼻の部位は、顔面のその他の領域に比べて特に明るい領域ではないため、2次元画像データの輝度情報を3次元形状データの高さ情報として変換しても、生成された3次元形状データの示す人間の顔面における鼻の部位の高さは、鼻の部位の周囲と略等しくなり、人間の顔面の3次元形状において鼻の部位が突出せず不自然であった。
【0011】
また、2次元画像の人間の顔面における眼の部位が、虹彩の色が黒などで暗い領域となっていると、白黒の反転処理が行われた際に、生成された3次元形状データの示す人間の顔面における眼の部位の高さが周囲に比べて高くなってしまい、人間の顔面の3次元形状において眼の部位が突出してしまって不自然であった。
【0012】
さらに、2次元画像の人間の顔面に所定の方向から光が照射された状態であって、例えば、人間の顔面の右側が左側に比べて明るい領域となっている場合には、生成された3次元形状データの示す人間の顔面における右側の高さが、左側の高さに比べて高くなってしまい、2次元画像データを取得した際の照明の影響によって人間の顔面の3次元形状が不自然なものとなっていた。
【0013】
【発明が解決しようとする課題】
本発明は、上記したような従来の技術の有する問題点に鑑みてなされたものであり、その目的とするところは、高品質な3次元形状を示す3次元形状データを安価に生成することができるようにした3次元形状データの生成方法を提供しようとするものである。
【0014】
【課題を解決するための手段】
上記目的を達成するために、本発明のうち請求項1に記載の発明は、指定手段と、生成手段と、反転禁止領域設定手段と、第1の加算手段と、補正手段と、平滑化処理手段と、グレー変換手段と、制限手段と、白黒反転手段と、形成手段と、第2の加算手段と、フィレット処理手段とを有し、所定の画素数に応じた画素データから構成される2次元画像データより得られる輝度情報を、XYZ座標系におけるXYZ座標値を有する複数のメッシュ点から構成される3次元形状データのZ座標値により示される高さ情報として用いて、人間の頭部の3次元形状を示す3次元形状データを生成する3次元形状データ生成装置における3次元形状データの生成方法であって、上記指定手段が上記2次元画像データの示す人間の顔面における眼の部位の位置指定入力を受ける第1のステップと、上記生成手段が上記第1のステップで指定された眼の部位の位置に基づいて、上記2次元画像データの示す人間の顔面の鼻の部位の領域を生成する第2のステップと、上記反転禁止領域設定手段が、上記2次元画像データの示す人間の頭部の髪以外の点の指定入力を受けることにより、該髪以外の領域における該指定入力を受けた点の色と同系色の色の領域を、白黒反転を行わない領域として設定する第3のステップと、上記第1の加算手段が、上記2次元画像データの輝度情報が示す上記第1のステップで指定された眼の部位の所定の周囲の輝度値に対し、該眼の部位からの距離に応じて所定の輝度値を加算し、該加算結果の輝度値を示す輝度情報に上記2次元画像データの輝度情報を変更する第4のステップと、上記補正手段が上記第1のステップで指定された眼の部位のうち左眼を中心とした所定の左側領域における上記2次元画像データ輝度情報が示す輝度の平均値と右眼を中心とした所定の右側領域における上記2次元画像データ輝度情報が示す輝度の平均値との差分を求め、該差分に基づき顔面の左側領域の輝度情報と右側領域の輝度情報とのバランスを補正して上記2次元画像データの輝度情報を変更する第5のステップと、上記平滑化処理手段が、上記2次元画像データに対して平滑化処理を行う第6のステップと、上記グレー変換手段が、上記第4のステップと上記第5のステップと上記第6のステップとで処理された上記2次元画像データの画素データを構成する赤色の成分のデータと、緑色の成分のデータと、青色の成分のデータとを所定の比率で重み付け加算してグレースケール値を取得し、該取得したグレースケール値を上記3次元形状データの高さ情報に変換して該高さ情報を生成する第7のステップと、上記制限手段が、上記第7のステップで生成された上記3次元形状データの高さ情報が示す高さの平均値と標準偏差とに基づいて、上記第7のステップで生成された上記3次元形状データの高さ情報が示す高さを制限して該高さ情報を変更する第8のステップと、上記白黒反転手段が、上記第3のステップで設定された白黒反転を行わない領域以外の領域について、上記第8のステップで高さ情報を変更された3次元形状データの白黒反転処理を行い、該白黒反転処理を行った3次元形状データと該白黒反転処理を行わない3次元形状データとを比較し、高さ情報が高い方の3次元形状データを上記人間の頭部の髪に対応する領域の3次元形状データとする第9のステップと、上記形成手段が、上記第2のステップにおいて生成された上記2次元画像データの示す人間の顔面の鼻の部位の領域について、上記2次元画像データの示す鼻先を頂点とする人間の顔面の鼻の盛り上がりに対応する形状として上記3次元形状データの高さ情報を変更する第10のステップと、上記第2の加算手段が、上記2次元画像データの示す人間の頭部を含むようにして指定された所定形状の領域に対応する上記3次元形状データの高さ情報が示す高さに、上記所定形状の領域の中央に対応する高さ情報が示す高さが最も高くなるように所定の高さを加算し、上記3次元形状データの高さ情報を該加算した高さを示す高さ情報に変更する第11のステップと、上記フィレット処理手段が、上記3次元形状データをフィレット処理する第12のステップとを有するようにしたものである。
【0015】
従って、本発明のうち請求項1に記載の発明によれば、2次元画像データから3次元形状データが生成されるので、上記した「従来の技術」の項において記載したような3次元スキャナーを用いる必要がなくなり、実際に3次元形状を備えた対象物を測定する制約なしに安価に3次元形状データを生成することができ、さらに、生成した3次元形状データは2次元画像データを取得した際の照明の影響によって人間の顔面の3次元形状が不自然なものとなることがない。
【0016】
また、形成手段が、上記第2のステップにおいて生成された上記2次元画像データの示す人間の顔面の鼻の部位の領域について、上記2次元画像データの示す鼻先を頂点とする人間の顔面の鼻の盛り上がりに対応する形状として上記3次元形状データの高さ情報を変更するので、生成された人間の頭部の顔面側の3次元形状において、鼻の盛り上がりが表現され、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0018】
また、上記白黒反転手段が、上記第3のステップで設定された白黒反転を行わない領域以外の領域について、上記第8のステップで高さ情報を変更された3次元形状データの白黒反転処理を行い、該白黒反転処理を行った3次元形状データと該白黒反転処理を行わない3次元形状データとを比較し、高さ情報が高い方の3次元形状データを上記人間の頭部の髪に対応する領域の3次元形状データとするので、髪の毛など本来盛り上がっている部分が窪んでしまうのを防ぐことができ、高品質な人間の頭部の3次元形状データを生成することができる。
【0020】
また、上記グレー変換手段が、上記第4のステップと上記第5のステップと上記第6のステップとで処理された上記2次元画像データの画素データを構成する赤色の成分のデータと、緑色の成分のデータと、青色の成分のデータとを所定の比率、例えば、およそR:G:B=7:2:1の比率で重み付け加算してグレースケール値を取得し、該取得したグレースケール値を上記3次元形状データの高さ情報に変換して該高さ情報を生成するので、2次元画像の顔面と3次元形状の顔面との対応が良くなり、3次元形状の顔面の凹凸を一層自然なものとすることができ、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0022】
また、上記制限手段が、上記第7のステップで生成された上記3次元形状データの高さ情報が示す高さの平均値と標準偏差とに基づいて、上記第7のステップで生成された上記3次元形状データの高さ情報が示す高さを制限して該高さ情報を変更するので、生成された3次元形状データの示す人間の頭部の顔面側の3次元形状において、急峻な凸部が形成されるのを防ぐことができ、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0024】
また、上記第2の加算手段が、上記2次元画像データの示す人間の頭部を含むようにして指定された所定形状の領域に対応する上記3次元形状データの高さ情報が示す高さに、上記所定形状の領域の中央に対応する高さ情報が示す高さが最も高くなるように所定の高さを加算し、前記3次元形状データの高さ情報を該加算した高さを示す高さ情報に変更するので、第11のステップと、生成される3次元形状において顔面側全体の丸みが表現され、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0026】
また、記フィレット処理手段が、上記3次元形状データをフィレット処理するので、3次元形状の垂直面の角が丸くなり曲面になり、人間の顔面にはありえないような垂直面はなくなり、3次元形状の人間の顔面が自然に仕上がり、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0027】
【発明の実施の形態】
以下、添付の図面に基づいて、本発明による3次元形状データの生成方法の実施の形態の一例を詳細に説明するものとする。
【0028】
図1には、本発明による3次元形状データの生成方法の実施の形態の一例を実施した3次元形状データ生成装置のブロック図が示されている。
【0029】
この3次元形状データ生成装置は、中央処理装置(CPU)10により全体の動作の制御が行われるものである。
【0030】
そして、CPU10には、バス12を介して、CPU10を動作するためのプログラムなどが記憶されたリード・オンリ・メモリ(ROM)14と、CPU10の制御によって後述する2次元画像データを記憶する2次元画像データ記憶部16−1や本発明による3次元形状データの生成処理によって生成される3次元形状データを記憶する3次元形状データ記憶部16−2やCPU10の制御によって本発明による3次元形状データの生成の処理が行われる際のワーキング・エリアとしての領域などが設定されたランダム・アクセス・メモリ(RAM)16と、マウスなどのポインティング・デバイスやキーボードなどの文字入力デバイスからなる入力装置18と、CRTや液晶表示装置(LCD)などにより構成される表示装置20と、各種のデータなどを記憶したハード・ディスクなどから構成される外部記憶装置22とを有して構成されている。
【0031】
ここで、CPU10は、後述する本発明による3次元形状データの生成処理の3次元化準備処理や3次元化実行処理における各種処理を実現するプログラムを実行する処理を行うものである。
【0032】
ここで、上記したように表示装置20は、例えば、CRTや液晶表示装置20(LCD)により構成され、当該表示装置20には各種の画面が表示されるものである。
【0033】
図2には、3次元形状データ生成装置を起動すると表示装置20に表示されるユーザー設定画面100が模式的に示されている。
【0034】
このユーザー設定画面100においては、本発明による3次元形状データの生成処理に用いられる2次元画像データをファイル名で選択して設定する2次元画像データ欄100bと、2次元画像データ欄100bに設定された2次元画像データが示す2次元画像や、本発明による3次元形状データの生成処理によって生成された3次元形状データの示す3次元形状が表示される画像エリア100aと、3次元形状データ生成装置の動作モードを選択して設定するモード選択エリア100cと、後述する領域設定モードにおいて指定した領域の種類を確定して設定するための背景マスク欄100iならびに反転禁止マスク欄100jと、本発明による3次元形状データの生成処理の後述する3次元化実行処理の開始を指示するか否かを選択して設定する3次元化開始欄100kと、本発明による3次元形状データの生成処理によって生成された3次元形状データが示す3次元形状を画像エリア100aに表示させるか否かを選択して設定するプレビュー欄100mとが表示されるものである。
【0035】
そして、ポインティング・デバイスや文字入力デバイスよりなる入力装置18は、表示装置20の画面上における所望の位置を選択したりあるいは所望の数値などを入力することにより、作業者の所望の指示を入力するものである。
【0036】
入力装置18のポインティング・デバイスや文字入力デバイスの操作により行われた各種設定の内容はCPU10により処理されて、本発明による3次元形状データの生成処理に用いられる情報としてRAM16の所定のエリアに記憶される。
【0037】
より詳細には、入力装置18は、2次元画像データ欄100bに所望の2次元画像データのファイル名を選択して設定したり、画像エリア100aに表示された2次元画像や3次元形状の所望の位置などを指定したり、モード選択エリア100cにおいて、楕円設定モード欄100d、右眼設定モード欄100e、左眼設定モード欄100f、鼻外郭設定モード欄100gならびに領域設定モード欄100hのいづれかを選択することにより、3次元形状データ生成装置の所望の動作モードを選択して設定したり、背景マスク欄100iや反転禁止マスク欄100jを選択することにより、後述する領域設定モードにおいて指定した領域の種類を確定したり、3次元化開始欄100kを選択することにより、本発明による3次元形状データの生成処理の後述する3次元化実行処理の開始の指示を設定したり、プレビュー欄100mを選択することにより、3次元形状データが示す3次元形状を画像エリア100bに表示させたりするためのものである。
【0038】
以上の構成において、本発明による3次元形状データの生成処理、具体的には、
人間の頭部、特に、顔面側の3次元形状を示す3次元形状データの生成処理を、図3乃至図26を用いて説明することとする。
【0039】
まず、本発明による3次元形状データの生成処理についての理解を容易にするために、本発明による3次元形状データの生成処理に用いられる2次元画像データについて説明することとする。
【0040】
2次元画像データは、3次元形状を備えた所定の対象物の2次元画像を示すものである。この実施の形態においては、デジタルカメラで人間の頭部の顔面側を撮影して得られた2次元画像データ、即ち、色彩を有するカラーの2次元画像データを用いる。
【0041】
そして、2次元画像データは、後述する「(1−1)2次元画像データ設定処理」により、外部記憶装置22などの3次元形状データ生成装置の外部から入力され、CPU10の制御によって2次元画像データ記憶部16−1に記憶されることになる。
【0042】
こうした2次元画像データは、所定の画素数に応じた画素データから構成され、画素データはそれぞれ、赤色(R)の成分のデータと、緑色(G)の成分のデータと、青色(B)の成分のデータとからなる。従って、およそR:G:B=3:5:2の比率で処理することにより、各画素の明るさを示す輝度情報を得ることができる。つまり、2次元画像データを構成する画素データに対応する2次元画像上の点(以下、単に「画素点」と称する。)はそれぞれ、その画素点の明るさを示す輝度情報を有するものである。
【0043】
ここで、図3には、2次元画像データの示す2次元画像の一例が模式的に示されており、この図3に示すような人間の頭部の2次元画像200を示す2次元画像データを、この実施の形態においては用いるものとする。
【0044】
なお、2次元画像データが示す2次元画像200(図3参照)は、ユーザー設定画面100(図2参照)の画像エリア100aに表示される。また、以下の説明においては、この2次元画像200の人間の頭部の各部位を、「顔面200a」、「髪200b」、「左眼の部位200c」、「右眼の部位200d」、「鼻の部位200e」と適宜称することとする。
【0045】
そして、本発明による3次元形状データの生成処理は、3次元化準備処理と3次元化実行処理との2つの段階の処理よりなる。以下、当該2つの段階における各種処理について詳細に説明することとする。
【0046】
(1)3次元化準備処理
3次元形状データ生成装置を起動すると、ユーザー設定画面100(図2参照)が表示装置20の画面上に表示される。そして、ユーザー設定画面100の各欄を、作業者が入力装置18を用いて選択することにより3次元化準備処理が行われる。
【0047】
この3次元化準備処理においては、以下に示す6つの処理が順次行われるものである。6つの処理は、2次元画像データ設定処理、3次元化領域設定処理、両眼位置設定処理、鼻外郭設定処理、背景領域設定処理ならびに反転禁止領域設定処理であり、6つの処理それぞれについて順次詳細に説明することとする。
【0048】
(1−1)2次元画像データ設定処理(図3参照)
この2次元画像データ設定処理においては、作業者が、3次元形状データの生成処理に用いられる2次元画像データを選択して設定する。
【0049】
図2に示すユーザー設定画面100の2次元画像データ欄100bに、作業者が入力装置18を操作して、2次元画像データ記憶部16−1に記憶されている2次元画像データのうちのいずれか所望の2次元画像データのファイルを入力する。
【0050】
これにより、2次元画像データ欄100bに選択されたファイルの2次元画像データが、3次元形状データの生成処理に用いられる2次元画像データとして設定される。また、ユーザー設定画面100の画像エリア100aには、設定された2次元画像データの示す人間の頭部の2次元画像200が表示される(図3参照)。
【0051】
(1−2)3次元化領域設定処理(図4(a)(b)(c)参照)
この3次元化領域設定処理においては、作業者が、2次元画像データの示す2次元画像のうち3次元形状データが生成される範囲を選択して設定する。
【0052】
具体的には、まず、作業者が入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて楕円設定モード欄100dを選択する。これにより、3次元形状データ生成装置の動作モードが楕円設定モードに変更される。
【0053】
そして、この楕円設定モードのときに、ユーザー設定画面100の画像エリア100aにおいて、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の一点を指定する(図4(a)における点E1参照)。この後、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の一点を指定する(図4(a)における点E2参照)。
【0054】
その結果、指定された点E1と点E2とを楕円長軸の両端とする楕円300とその楕円長軸300aとが、画像エリア100aの2次元画像200上に表示される(図4(b)参照)。
【0055】
さらに、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の一点を指定する(図4(b)における点E3参照)。その結果、指定された点E3が楕円300の円周上に位置するようにして、楕円300が変形する(図4(c)参照)。
【0056】
こうして作業者が2次元画像200上の3点(即ち、点E1,点E2ならびに点E3)を指定することで、2次元画像200上に楕円300が自動的に生成されて設定され、この楕円300で取り囲まれた内部の領域が、2次元画像データの示す2次元画像200のうち3次元形状データが生成される範囲、即ち、3次元化領域として設定される。
【0057】
なお、画像エリア100aにおいて表示される楕円長軸300aが、2次元画像200の人間の顔面200aにおける鼻すじと平行するようにして、作業者が2次元画像200上の3点を指定すると、後述する鼻外郭設定処理において自動生成される鼻の外郭形状をより正確なものとすることができる。
【0058】
(1−3)両眼位置設定処理(図5(a)(b)参照)
この両眼位置設定処理においては、作業者が、2次元画像データの示す2次元画像200の人間の顔面200aにおける右眼の位置と左眼の位置とを選択して設定する。
【0059】
具体的には、まず、作業者が入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて右眼設定モード欄100eを選択する。これにより、3次元形状データ生成装置の動作モードが右眼設定モードに変更される。
【0060】
そして、この右眼設定モードのときに、ユーザー設定画面100の画像エリア100aにおいて、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の右眼の部位200dの中心位置を指定する。
【0061】
その結果、指定された中心位置が、右眼の位置として設定される。また、画像エリア100aには設定された右眼の位置を示す点REが、右眼の部位200dの中心に表示される(図5(a)参照)。
【0062】
この後、作業者は入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて左眼設定モード欄100fを選択する。これにより、3次元形状データ生成装置の動作モードが左眼設定モードに変更される。
【0063】
そして、この左眼設定モードのときに、ユーザー設定画面100の画像エリア100aにおいて、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の左眼の部位200cの中心位置を指定する。
【0064】
その結果、指定された中心位置が、左眼の位置として設定される。また、画像エリア100aには設定された左眼の位置を示す点LEが、左眼の部位200cの中心に表示される(図5(b)参照)。
【0065】
(1−4)鼻外郭設定処理(図6参照)
この鼻外郭設定処理においては、2次元画像データの示す2次元画像200の人間の顔面200aにおける鼻の部位200eの外郭形状が設定される。
【0066】
具体的には、まず、作業者が入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて鼻外郭設定モード欄100gを選択する。これにより、3次元形状データ生成装置の動作モードが鼻外郭設定モードに変更される。
【0067】
その結果、図6に示すように、ユーザー設定画面100の画像エリア100aに表示されている2次元画像200の人間の顔面200aに、5つの点(上端点NU,下端点ND,左端点NL,右端点NRならびに中心点NC)からなる鼻外郭形状400が自動的に生成される。
【0068】
そして、この5つの点のうち上端点NU,下端点ND,左端点NLならびに右端点NRからなる四角形で取り囲まれた内部の領域が、2次元画像データの示す2次元画像200の人間の顔面200aにおける鼻の部位200eの範囲、即ち、鼻領域として設定されるとともに、中心点NCは鼻先として設定される。
【0069】
ここで、この鼻外郭形状400の自動生成、即ち、鼻外郭形状400を形成する上端点NU、下端点ND、左端点NL、右端点NRならびに中心点NCの自動生成処理について、図7乃至図12を用いてより詳細に説明することとする。
【0070】
図7には、鼻外郭形状の生成処理ルーチンのフローチャートが示されている。この図7に示す鼻外郭形状の生成処理ルーチンのフローチャートは、上記したように作業者によってユーザー設定画面100の鼻外郭設定モード欄100gが選択され、鼻外郭設定モードに変更されると起動されて実行されるものである。
【0071】
なお、この鼻外郭形状の生成処理ルーチンが起動されるときには、ユーザー設定画面100の画像エリア100aに表示されている2次元画像200上には、図5(b)に示すように、上記した(1−2)3次元化領域設定処理において生成された楕円300や、上記した(1−3)両眼位置設定処理において設定された右眼の位置を示す点REと左眼の位置を示す点LEとが表示されているものである。
【0072】
そして、この鼻外郭形状の生成処理ルーチンが起動されると、ステップS702においては、鼻の上端点NUの自動生成を行う。具体的には、右眼の位置を示す点REと左眼の位置を示す点LEとを中間点を求めて上端点NUとする。つまり、図8に示すように、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1を2等分する点が算出され、当該算出された点が鼻の上端点NUとして自動生成される。
【0073】
ステップS702の処理が終了すると、ステップS704の処理に進んで、鼻の下端点NDの自動生成を行う。図9(a)に示すように、楕円300の楕円長軸300aと平行し、ステップS702において自動生成された上端点NUを始点として、楕円長軸300の端点E1から端点E2に向かう方向で延長する半直線L2を求める。
【0074】
この半直線L2が算出された後、この半直線L2上で上端点NUから右眼の位置と左眼の位置との間の距離、即ち、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1の長さと等しい距離にある点が算出され、当該算出された点が鼻の下端点NDとして自動生成される(図9(b)参照)。
【0075】
そして、ステップS704の処理に続いて、ステップS706においては、鼻の右端点NRならびに左端点NLの自動生成を行う(図10参照)。右眼の位置を示す点REとステップS702において自動生成された上端点NUとの中間点を通り、上端点NUと下端点NDとを結ぶ直線L3(即ち、ステップS704における半直線L2の一部の直線)と平行な直線L4を求める。また、左眼の位置を示す点LEとステップS704において設定された上端点NUとの中間点を通り、上端点NUと下端点NDとを結ぶ直線L3と平行な直線L5を求める。
【0076】
そして、上端点NUと下端点NDとを結ぶ直線L3上において、上端点NU側からと5/6の位置の点を算出し、当該算出された点を通り右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1と平行な直線L6を求める。
【0077】
こうして直線L6が算出された後、直線L6と直線L4との交点を算出し、当該算出された点が鼻の右端点NRとして自動生成されるとともに、直線L6と直線L5との交点を算出し、当該算出された点が鼻の左端点NLとして自動生成される。
【0078】
そして、ステップS706の処理を終了すると、ステップS708に進み、鼻の中心点NCの自動生成を行う。ステップS706において設定された左端点NLと右端点NRと中間点を求める。つまり、図11(a)に示すように、左端点NLと右端点NRとを結ぶ直線L6を2等分する点Pを算出する。
【0079】
当該算出された点Pとを鼻の下端点NDとの中間点、即ち、算出された点Pとを鼻の下端点NDとを結ぶ直線を2等分する点を算出し、算出された点が鼻の中心点NCとして自動生成される(図11(b)参照)。
【0080】
こうしてステップS708の処理により鼻の中心点NCが自動生成されると、上端点NU、下端点ND、左端点NL、右端点NRならびに中心点NCの5つの点が生成されたことになる。そして、上端点NUと右端点NRとを結ぶ辺LRと、右端点NRと下端点NDとを結ぶ辺LDRと、下端点NDと左端点NLとを結ぶ辺LDLと、左端点NLと上端点NUとを結ぶ辺LLと、上端点NUと中心点NCとを結ぶ辺LCとが自動生成され(図12参照)、ステップS708の処理を終了して、この鼻外郭形状の生成処理ルーチンを終了する。
【0081】
上記した鼻外郭形状の処理ルーチンにより、上端点NU、下端点ND、左端点NL、右端点NRならびに中心点NCが自動生成され、鼻外郭形状400(図12参照)が自動的に生成されてユーザー設定画面100の画像エリア100aに表示されている2次元画像200の人間の顔面200aに表示される。
【0082】
こうして自動生成されて表示された鼻外郭形状400の辺LR、辺LDR、辺LDLならびに辺LLからなる四角形形状は、画像エリア100aに表示されている2次元画像200の人間の顔面200aにおける鼻の部位200eの外郭形状と一致するとともに、鼻外郭形状400の中心点NCは鼻の部位200eのうちの鼻先と一致する。
【0083】
このため、自動生成されて表示された鼻外郭形状400の上端点NU,下端点ND,左端点NLならびに右端点NRからなる四角形で取り囲まれた内部の領域が、2次元画像データの示す2次元画像200の人間の顔面200aにおける鼻の部位200eの範囲として設定されるとともに、中心点NCは鼻先として設定される。
【0084】
しかしながら、2次元画像の種類などによっては、自動生成されて表示された鼻外郭形状400が、画像エリア100aに表示されている2次元画像200の人間の顔面200aにおける鼻の部位200eと一致しない場合もある。こうした場合にのみ、自動生成されて表示された鼻外郭形状400の調整処理を行う。
【0085】
具体的には、図6に示すように、自動的に生成されて表示された鼻外郭形状400が、画像エリア100aに表示されている2次元画像200の人間の顔面200aにおける鼻の部位200eの外郭形状と一致していない場合には、作業者が入力装置18を操作して、鼻外郭形状400の上端点NUを2次元画像200の鼻の部位200eの上端に一致するように移動し、鼻外郭形状400の下端点NDを2次元画像200の鼻の部位200eの下端に一致するように移動し、鼻外郭形状400の左端点NLを2次元画像200の鼻の部位200eの左端に一致するように移動し、鼻外郭形状400の右端点NRを2次元画像200の鼻の部位200eの右端に一致するように移動し、鼻外郭形状400の中心点NCを2次元画像200の鼻の部位200eの鼻先、即ち、最も高さの高い位置に一致するように移動する。
【0086】
こうして調整処理を行い、画像エリア100aに表示されている2次元画像200の人間の顔面200aにおける鼻の部位200eと一致するようになった鼻外郭形状400’(図13参照)の上端点NU,下端点ND,左端点NLならびに右端点NRからなる四角形で取り囲まれた内部の領域が、2次元画像データの示す2次元画像200の人間の顔面200aにおける鼻の部位200eの範囲として設定されるとともに、中心点NCは鼻先として設定される。
【0087】
(1−5)背景領域設定処理(図14参照)
この背景領域設定処理においては、作業者が、2次元画像データの示す2次元画像の人間の頭部の背景の範囲を設定する。
【0088】
具体的には、まず、作業者が入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて領域設定モード欄100hを選択する。これにより、3次元形状データ生成装置の動作モードが領域設定モードに変更される。
【0089】
そして、この領域設定モードのときに、ユーザー設定画面100の画像エリア100aにおいて、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像の人間の頭部の背景の一点を指定する。さらに、この指定された点と同系色の領域の塗りつぶし処理を行う。
【0090】
こうした一点の指定とその指定した点と同系色の領域の塗りつぶし処理とを繰り返し行うことにより、2次元画像200の人間の頭部の背景(図14に示すハッチング領域参照)を指定する。
【0091】
この後、作業者は入力装置18を操作して、ユーザー設定画面100の背景マスク欄100iを選択する。これにより、画像エリア100aにおいて指定されていた領域(図14に示すハッチング領域)が、2次元画像データの示す2次元画像200の人間の頭部の背景の範囲を示す背景マスクとして設定される。
【0092】
(1−6)反転禁止領域設定処理(図15参照)
この反転禁止領域設定処理においては、作業者が、2次元画像データの示す2次元画像のうち白黒反転を行わない範囲を設定する。
【0093】
具体的には、まず、作業者が入力装置18を操作して、図2に示すユーザー設定画面100のモード選択エリア100cにおいて領域設定モード欄100hを選択する。これにより、3次元形状データ生成装置の動作モードが領域設定モードに変更される。
【0094】
そして、この領域設定モードのときに、ユーザー設定画面100の画像エリア100aにおいて、作業者が入力装置18のポインティング・デバイスを操作して、画像エリア100aに表示されている2次元画像200の人間の髪200b以外の一点を指定する。さらに、この指定された点と同系色の領域の塗りつぶし処理を行う。
【0095】
こうした一点の指定とその指定した点と同系色の領域の塗りつぶし処理とを繰り返し行うことにより、2次元画像200の人間の頭部の髪200b以外の領域(図15に示すハッチング領域)を指定する。
【0096】
この後、作業者は入力装置18を操作して、ユーザー設定画面100の反転禁止マスク欄100iを選択する。これにより、画像エリア100aにおいて指定されていた領域(図15に示すハッチング領域)、即ち、人間の頭部の髪200b以外の領域が、2次元画像データの示す2次元画像のうち白黒反転を行わない範囲を示す反転禁止マスクとして設定される。
【0097】
(2)3次元化実行処理
上記した(1)3次元化準備処理において、(1−1)2次元画像データ設定処理、(1−2)3次元化領域設定処理、(1−3)両眼位置設定処理、(1−4)鼻外郭設定処理、(1−5)背景領域設定処理ならびに(1−6)反転禁止領域設定処理の6つの処理が順次行われて全て終了した後に、3次元化実行処理が行われる。
【0098】
具体的には、3次元化準備処理が終了した後に、作業者がポインティング・デバイスや文字入力デバイスからなる入力装置18によって、表示装置20のユーザー設定画面100の3次元化開始欄100kを選択すると、3次元形状データの生成処理ルーチン(図16参照)が起動されて実行される。
【0099】
この図16に示す3次元形状データの生成処理ルーチンの概要について説明すると、まず、3次元形状データの生成に用いる2次元画像データの最適化処理を行い(ステップS1602〜ステップS1606)、その後、最適化された2次元画像データから3次元形状データを生成し(ステップS1608)、さらに、生成された3次元形状データの調整を行う(ステップS1610〜ステップS1622)ことにより、上記した3次元化準備処理における設定に基づいて、2次元画像データから3次元形状データが生成される。
【0100】
なお、3次元形状データの生成処理ルーチンによって生成される3次元形状データは、2次元画像データの示す人間の頭部の顔面側の2次元画像200(図3参照)と対応する人間の顔面の3次元形状を示す3次元形状データである。そして、生成された3次元形状データは、CPU10の制御によって3次元形状データ記憶部16−2に記憶されることになる。
【0101】
なお、この3次元形状データは、XYZ座標系におけるXYZ座標値を有する複数のメッシュ点から構成される3次元メッシュであり、この3次元メッシュのメッシュの交点たるメッシュ点それぞれには座標値、即ち、位置情報たる「X座標値」ならびに「Y座標値」と高さ情報たる「Z座標値」とが設定されるものである。
【0102】
この実施の形態においては、3次元形状データの生成処理ルーチンが開始される前に、所定の初期化処理により3次元メッシュを初期化するようになされている。その結果、初期化された3次元メッシュのX軸方向ならびにY軸方向におけるサイズは、2次元画像データに対応し、初期化された3次元メッシュのメッシュ点それぞれのX座標値ならびにY座標値は、2次元画像データを構成する画素データに対応した値を有し、Z座標値は所定の値(例えば「0」)を有するようになる。つまり、初期化された3次元メッシュのメッシュ点それぞれは、2次元画像データの示す2次元画像上の画素点との対応付けられているものである。
【0103】
そして、3次元形状データの生成処理ルーチンにおいては、まず、ステップS1602において、2次元画像データを対象にライト効果処理を行う。このライト効果処理は、3次元形状の眼の周囲が窪んでしまうのを防ぐための処理であり、2次元画像データの示す2次元画像の両眼に向けて2つのライトが照射されたようにする。
【0104】
具体的には、2次元画像の左眼の位置を示す点LE(図13参照)を中心とし、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1(図8参照)の1/8を半径とする左基準円の内部領域において、2次元画像データの輝度情報に基づいて最低輝度の値を求める。また、2次元画像の右眼の位置を示す点RE(図13参照)を中心とし、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1(図8参照)の1/8を半径とする右基準円の内部領域において、2次元画像データの輝度情報に基づいて最低輝度の値を求める。
【0105】
こうして、2次元画像200の左眼の部位200cの周囲における最低輝度の値(以下、左眼周囲最低輝度値)と、右眼の部位200dの周囲における最低輝度の値(以下、右眼周囲最低輝度値)とを求めた後、左眼の位置を示す点LEを中心に左基準円の内部領域において、左眼の位置を示す点LEからの距離に応じてコサインカーブの輝度を加算し、当該コサインカーブの輝度が加算された輝度の値を左眼周囲理想輝度値とする。また、右眼の位置を示す点REを中心に右基準円の内部領域において、右眼の位置を示す点REからの距離に応じてコサインカーブの輝度を加算し、当該コサインカーブの輝度が加算された輝度の値を右眼周囲理想輝度値とする。
【0106】
この後、左基準円の内部領域の輝度と右基準円の内部領域の輝度とを再び求め、それぞれ左眼周囲理想輝度値と右眼周囲理想輝度値との差分を求める。
【0107】
そして、2次元画像データの輝度情報を一旦元に戻した後、左基準円の内部領域の画素点それぞれに対して、左眼周囲理想輝度値との差分に応じた振幅のコサインカーブ輝度を加算し、右基準円の内部領域の画素点それぞれに対して、右眼周囲理想輝度値との差分に応じた振幅のコサインカーブ輝度を加算する。
【0108】
なお、上記したライト効果処理(ステップS1602)ならびに後述する左右輝度バランス処理(ステップS1604)、平滑化処理(ステップS1606)によって、2次元画像データの輝度情報が変更されて、2次元画像データの最適化がなされる。この際、2次元画像データの輝度情報の変更は、2次元画像データの画素データを構成する赤色(R)の成分のデータ、緑色(G)の成分のデータならびに青色(B)の成分のデータの値に反映されるようになされている。
【0109】
例えば、上記したライト効果処理によってコサインカーブ輝度が加算された画素点においては、変更後の輝度情報が従前の輝度情報のレベルに比べて高くなった分に応じて、当該画素点の画素データを構成する赤色(R)の成分のデータ、緑色(G)の成分のデータならびに青色(B)の成分のデータの値の変更がなされる。
【0110】
ステップS1602の処理が終了すると、ステップS1604に進み、2次元画像データを対象に左右輝度バランス処理を行う。この左右輝度バランス処理は、3次元形状の顔面の左側と右側とバランスが崩れるのを防ぐための処理であり、2次元画像の顔面の左側領域の輝度と右側領域の輝度のバランスを補正する。
【0111】
具体的には、2次元画像の左眼の位置を示す点LE(図13参照)を中心とし、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1(図8参照)の1/2を半径とする左基準円の内部領域において、2次元画像データの輝度情報に基づいて輝度の平均値を求める。また、2次元画像の右眼の位置を示す点RE(図13参照)を中心とし、右眼の位置を示す点REと左眼の位置を示す点LEとを結ぶ直線L1(図8参照)の1/2を半径とする右基準円の内部領域において、2次元画像データの輝度情報に基づいて輝度の平均値を求める。
【0112】
こうして、2次元画像200の左眼の部位200cの周囲における輝度の平均値(以下、左眼周囲輝度平均値)と、右眼の部位200dの周囲における輝度の平均値(以下、右眼周囲輝度平均値)とを求めた後、左眼周囲輝度平均値と右眼周囲輝度平均値との差分を求め、この差分に応じた傾きのグラデーションを2次元画像の画素点それぞれに付加する。
【0113】
ステップS1604の処理に続き、ステップS1606においては、2次元画像データを対象に平滑化処理を行う。この平滑化処理は、3次元形状の表面、例えば、肌の部分などの表面を滑らかにするための処理であり、2次元画像データに対してガウス分布によるノイズ除去を行う。
【0114】
具体的には、2次元画像データの示す2次元画像上の所定の画素点に注目し、この画素点の周囲の一定範囲の輝度を求める。そして、極端に輝度が異なる画素点が存在する場合には、その極端に輝度が異なる画素点を除いてガウス分布による係数を乗算し、元の2次元画像データを更新する。こうした処理を2次元画像データの示す2次元画像上の全ての画素点について繰り返し行う。
【0115】
ステップS160の処理が終了すると、ステップS1608に進み、グレー変換処理を行う。このグレー変換処理は、ステップS1602乃至ステップS1606の処理によって最適化された2次元画像データの画素データを構成する赤色(R)の成分のデータ、緑色(G)の成分のデータならびに青色(B)の成分のデータを、所定の比率でグレー変換し、グレー変換して得られた値(以下、グレー変換情報)を3次元形状データの高さ情報とする処理である。即ち、このステップS1608の処理によって、2次元画像データから3次元形状データが生成され、初期化された3次元メッシュのメッシュ点のZ座標値が2次元形状に対応して設定される。
【0116】
具体的には、まず、2次元画像データの示す2次元画像上の所定の画素点に注目し、この画素点の画素データを構成する赤色(R)の成分のデータ、緑色(G)の成分のデータ、青色(B)の成分のデータを求める。この際、ステップS1602乃至ステップS1606の最適化処理により2次元画像データの輝度情報が変更されている場合には、輝度情報の変更に応じて変更された赤色(R)の成分のデータ、緑色(G)の成分のデータ、青色(B)の成分のデータが求められる。
【0117】
そして、およそR:G:B=7:2:1の比率でグレー変換を行い、当該所定の画素点のグレー変換情報を得る。そして、得られたグレー変換情報を3次元形状データの高さ情報、即ち、2次元画像上の所定の画素点に対応する3次元メッシュのメッシュ点のZ座標値とする。
【0118】
さらに、同様の処理を2次元画像データの示す2次元画像上の全ての画素点について繰り返し行う。
【0119】
なお、このステップS1608の処理において2次元画像データから得られるグレー変換情報は、同じく2次元画像データから得られる輝度情報とは異なるものである。つまり、グレー変換情報も輝度情報もいずれも最適化された2次元画像データから得ることができるものであるが、輝度情報はおよそR:G:B=3:5:2の比率で処理して得られるものである一方、グレー変換情報はおよそR:G:B=7:2:1の比率で処理して得られるものである。
【0120】
このグレー変換情報を得るためのR:G:B=7:2:1の比率は、人間の頭部の2次元画像200(図3参照)に適した比率である。つまり、こうした比率で得られるグレー変換情報を用いることにより、輝度情報を3次元形状データの高さ情報とする場合に比べて、2次元画像の顔面と3次元形状の顔面との対応が良くなり、3次元形状の顔面の凹凸を一層自然なものとすることができる。
【0121】
ステップS1608の処理が終了すると、ステップS1610に進み、3次元形状データを対象にハイライト除去処理を行う。このハイライト除去処理は、3次元形状において、急峻な凸部が形成されるのを防ぐための処理であり、3次元メッシュの高さ情報の平均値と標準偏差とに基づいて異常なZ座標値を除去する。
【0122】
具体的には、3次元形状データの高さ情報、即ち、ステップS1608において2次元画像データに対応して設定された3次元メッシュのメッシュ点のZ座標値の平均値と標準偏差(σ)とを算出する。
【0123】
その後、平均値から1σの範囲を3次元メッシュ全体に引き伸ばし、限界値から外れたZ座標値は限界値に収まるように制限をかける。
【0124】
ステップS1610の処理が終了すると、ステップS1612に進み、3次元形状データを対象に白黒反転処理を行う。この白黒反転処理は、3次元形状において、髪など本来盛り上がっている部分(即ち、髪が黒髪などで2次元画像において暗い領域)が窪んでしまうのを防ぐための処理であり、輝度情報のレベルが低い領域を反転して元の3次元形状データと合成する。
【0125】
具体的には、ステップS1608乃至ステップS1610の処理によって3次元メッシュのメッシュ点が有しているZ座標値、即ち、3次元形状データの高さ情報を2次元画像データの輝度情報と対応するものとして以下の処理を行う。
【0126】
予め設定されている輝度(即ち、Z座標値)を基準に、白黒の反転処理を行う。そして、白黒の反転処理を行った3次元形状データと元の3次元形状データとを比較し、より輝度(即ち、Z座標値)の高いデータからなるように合成する。
【0127】
なお、この白黒反転処理は、2次元画像データの示す2次元画像のうち、上記した(1−6)反転禁止領域設定処理において反転禁止マスクとして設定された白黒反転を行わない範囲を除いた部分に対応する3次元メッシュの領域を対象とする。従って、この実施の形態においては、図15に示すハッチング領域以外の部分であり、人間の頭部の髪200bに対応する3次元メッシュの領域のみを対象に白黒反転処理が行われ、2次元画像の全体、即ち、3次元メッシュの全体を対象に白黒反転処理は行われない。
【0128】
ステップS1612の処理が終了すると、ステップS1614に進み、3次元形状データを対象に背景削除処理を行う。この背景削除処理は、3次元形状において人間物を目立たせるための処理であり、不要な背景部分を削除する。
【0129】
具体的には、上記した(1−5)背景領域設定処理において、背景マスクとして設定された部分に対応する3次元メッシュの領域を対象に、この領域内の高さ情報、即ち、この領域内のメッシュ点のZ座標値を「0」とする。従って、この実施の形態においては、図14に示すハッチング領域の部分、即ち、2次元画像の背景に対応する3次元メッシュの高さ情報が「0」となる。
【0130】
ステップS1614の処理が終了すると、ステップS1616に進み、3次元形状データを鼻形状作成処理を行う。この鼻形状作成処理は、3次元形状において、鼻の盛り上がりを表現するための処理であり、図6に示す上記した(1−4)鼻外郭設定処理によって設定された鼻外郭形状400(あるいは図13に示す鼻外郭形状400’)を用いる。
【0131】
具体的には、鼻外郭形状400の上端点NU,下端点ND,左端点NLならびに右端点NRからなる四角形で取り囲まれた2次元画像の内部領域に対応する3次元メッシュの領域を処理対象とする。
【0132】
まず、鼻外郭形状400において中心点NCと上端点NU、中心点NCと下端点ND、中心点NCと左端点NLならびに中心点NCと右端点NRそれぞれの角度と距離を求める。
【0133】
そして、求められた中心点NCと上端点NU,下端点ND,左端点NLならびに右端点NRそれぞれとの角度と距離に基づいて、鼻外郭形状400の領域内の3次元メッシュの所定のメッシュ点Pに注目し、このメッシュ点Pが属する領域を求める。つまり、メッシュ点Pが属する3次元メッシュの領域は、中心点NCと上端点NUと右端点NRとの3点を頂点とする三角形形状に対応するエリアAと、中心点NCと右端点NRと下端点NDとの3点を頂点とする三角形形状に対応するエリアBと、中心点NCと下端点NDと左端点NLとの3点を頂点とする三角形形状に対応するエリアCと、中心点NCと左端点NLと上端点NUとの3点を頂点とする三角形形状に対応するエリアDとの4つの領域のいずれかである。
【0134】
メッシュ点Pが属する領域が求められた後、中心点NCとメッシュ点Pとを結ぶ直線Rを延長し、当該直線Rと中心点NCの対辺との交点Qを求める。この際、メッシュ点Pが属する領域の3つの頂点のうちの中心点NC以外の2点を結ぶ辺を対辺とする。具体的には、図18に示すようにメッシュ点PがエリアAに属している場合には、中心点NCとメッシュ点Pとを結ぶ直線Rを延長し、直線Rと中心点NCとの対辺たる辺LRとの交点Qを求める。
【0135】
こうして交点Qが求められた後、中心点NCと交点Qとの間の距離L1と、中心点NCとメッシュ点Pとの間の距離L2とに従って、以下に示す数式1から、メッシュ点Pの高さhを求める(図19参照)。なお、3次元メッシュのメッシュ点のZ座標値の最大値の1/10をHとする。
【0136】
【数1】

Figure 0004107469
・・・数式1
この数式1により算出された高さh、即ち、Z座標値を、メッシュ点PのZ座標値に加算する。
【0137】
さらに、同様の処理を鼻外郭形状400に対応する3次元メッシュの領域内の全てのメッシュ点について繰り返し行う。その結果、鼻外郭形状400の上端点NU,下端点ND,左端点NLならびに右端点NRからなる四角形で取り囲まれた2次元画像の内部領域に対応する3次元メッシュの領域は、鼻の盛り上がりに対応するような形状となる(図20参照)。
【0138】
ステップS1616の処理が終了すると、ステップS1618に進み、3次元形状の楕円の盛り上げ処理を行う。この楕円の盛り上げ処理は、3次元形状において顔面全体の丸みを表現するための処理であり、上記した(1−2)3次元化領域設定処理によって設定された楕円300(図4(c)参照)を用いる。
【0139】
具体的には、楕円300で取り囲まれた2次元画像の内部領域に対応する3次元メッシュの領域を処理対象とする。
【0140】
そして、楕円300に対応する3次元メッシュの領域内の全てのメッシュ点それぞれのZ座標値に、楕円300の中心(楕円長軸300a上の点)を頂上とした楕円球を想定して求められる高さ情報、即ち、Z座標値を加算する。
【0141】
ステップS1618の処理が終了すると、ステップS1620に進み、3次元形状データを対象にフィレット処理を行う。このフィレット処理は、3次元形状の人間の顔面を自然に仕上げるための処理であり、人間の顔面にはありえないような垂直面の角を丸くする(図21(a)(b)参照)。
【0142】
具体的には、3次元形状データの3次元メッシュのメッシュ点毎に順次、漏斗様のフィレットメッシュ(図22(a)参照)の中心Tを一致させる。そして、3次元メッシュのメッシュ点の高さ情報(Z座標値)が、対応するフィレットメッシュのフィレットメッシュ点の高さ情報よりも高い場合には、その3次元メッシュのメッシュ点のZ座標値をフィレットメッシュの高さ情報に合わせて、3次元メッシュを変形させる。
【0143】
なお、このフィレット処理の開始に際しては、ステップS1602乃至ステップS1618の処理によって生成された3次元メッシュのコピー処理を行い、変換元3次元メッシュと変換先3次元メッシュとの2つの3次元メッシュを用意する。つまり、変換元3次元メッシュの高さ情報は変換先3次元メッシュにコピーされており、変換元3次元メッシュと変換先3次元メッシュとは、フィレット処理の開始前は同一なものである。
【0144】
また、図22乃至図26においては、説明を容易にするために、3次元メッシュのメッシュ点やフィレットメッシュのメッシュ点をバンド状に図示することとする。
【0145】
そして、フィレット処理に用いられるフィレットメッシュは、X軸方向におけるサイズとY軸方向におけるサイズとが等しい正方形形状の底面を有している(図22(b)参照)。なお、フィレットメッシュの半径をRとした場合に、フィレットメッシュのX軸方向およびY軸方向におけるサイズLはR×2+1となされている。
【0146】
こうしたフィレットメッシュのフィレットメッシュ点それぞれについて、フィレットメッシュの中心Tとの距離rを求める(図23(a)(b)参照)。そして、求められた距離rがフィレットメッシュの半径Rに比べて短いフィレットメッシュ点については、当該フィレットメッシュ点の高さ情報として下記数式2により求められるZ座標値Lrを設定する。
【0147】
【数2】
Figure 0004107469
・・・数式2
一方、求められた距離rがフィレットメッシュの半径Rに比べて短いフィレットメッシュ点以外のフィレットメッシュ点については、当該フィレットメッシュ点の高さ情報として最高値Lmax(例えば、255000)のZ座標値を設定する。
【0148】
こうして設定されたZ座標値を有するフィレットメッシュ点からなるフィレットメッシュは、図22(a)に示すような漏斗様体である。そして、このフィレットメッシュの中心Tを、変換元3次元メッシュの所定のメッシュ点に一致させ、3次元メッシュのメッシュ点の高さ情報baseLを取得する(図24参照)。この高さ情報baseLは、フィレットメッシュの中心Tが一致する変換元3次元メッシュのメッシュ点のZ座標値に等しいものである。
【0149】
それから、フィレットメッシュの全てのフィレットメッシュ点について、フィレットメッシュ点のZ座標値mLと、当該Z座標値mLのフィレットメッシュ点に対応する変換元3次元メッシュのメッシュ点の高さsrcLとを求める(図25(a)参照)。
【0150】
そして、求められた変換元3次元メッシュの高さsrcLと変換元3次元メッシュの高さ情報baseLとを比較し、当該比較処理の結果、高さsrcLが高さ情報baseLに比べて大きい(高い)場合には、処理対象の変換元3次元メッシュのメッシュ点に対応するフィレットメッシュの高さtargetLを
targetL=(srcL−baseL)×mL/Lmax+baseLとする(図28(b)参照)。
【0151】
この後、処理対象の変換元3次元メッシュのメッシュ点でのフィレットメッシュの高さtargetLと、処理対象の変換元3次元メッシュのメッシュ点に対応する変換先3次元メッシュの高さ情報とを比較し、高さtargetLが変換先3次元メッシュの高さ情報に比べて小さい(低い)場合には、変換先3次元メッシュの高さ情報、即ち、変換先3次元メッシュのメッシュ点のZ座標値を高さtargetLに置き換える(図26(a)参照)。
【0152】
そして、こうした処理をフィレットメッシュの全てのフィレットメッシュ点について行うことにより、変換先3次元メッシュの垂直面の角は丸いフィレット面となる(図26(b)参照)。
【0153】
ステップS1620の処理に続き、ステップS1622においては、3次元形状データを対象に孤立領域除去処理を行う。この孤立領域除去処理は、3次元形状に孤立した領域の存在を防止するための処理であり、余分な3次元形状メッシュのメッシュ点を削除する。
【0154】
3次元形状データの3次元メッシュのメッシュ点の所定のメッシュ点について、当該所定のメッシュ点の周囲8方向に位置するメッシュ点を対象にし、この周囲に有効なデータ、即ち、所定のメッシュ点の周囲に位置する8つのメッシュ点のうち、Z座標値が「0」ではないメッシュ点が1つ以下の場合には、そのメッシュ点のZ座標値を「0」にする。こうした処理を3次元メッシュの全てのメッシュ点について繰り返し行う。
【0155】
こうして孤立領域除去処理が3次元メッシュの全てのメッシュ点について行われると、ステップS1622の処理を終了して、この3次元形状データの生成処理ルーチンを終了する。
【0156】
なお、3次元形状データの生成処理ルーチンが終了した後に、作業者がポインティング・デバイスや文字入力デバイスからなる入力装置18によって、表示装置20のユーザー設定画面100のプレビュー欄100mを選択すると、3次元形状データの生成処理ルーチンよって生成された3次元形状データの示す3次元形状が画像エリア100aに表示される。
【0157】
上記したようにして、本発明による3次元形状データの生成方法は、2次元画像データから3次元形状データが生成されるので、3次元スキャナーは必要なくなり、実際に3次元形状を備えた対象物を測定する制約なしに安価に3次元形状データを生成することができる。
【0158】
また、本発明による3次元形状データの生成方法は、以下に示す(I)〜(VII)により、2次元画像データから高品質な3次元形状を示す3次元形状データ、特に、高品質な人間の頭部の顔面側を示す3次元形状データを生成することができる。
【0159】
(I)2次元画像データの示す2次元画像200の人間の顔面200aにおいて設定された右眼の位置と左眼の位置とに基づいて、上記した(1−4)鼻外郭設定処理(図6参照)によって鼻の部位200eの外郭形状が設定される。そして、設定された鼻外郭形状400に基づいて、鼻形状作成処理(ステップS1616)により鼻外郭形状400に対応する3次元メッシュの領域内の全てのメッシュ点のZ座標値に所定の値が加算される(図20参照)。その結果、生成された人間の頭部の顔面側の3次元形状において、鼻の盛り上がりが表現される。
【0160】
つまり、上記した「従来の技術」の項において記載したようにして、2次元画像データの輝度情報を3次元形状データの高さ情報として変換するときに、人間の頭部の顔面側の3次元形状において鼻の部位が突出せず不自然になるようなことがない。
【0161】
(II)3次元形状データの生成処理ルーチンの左右輝度バランス処理(ステップS1604)により、2次元画像データが最適化され、2次元画像の顔面の左側領域の輝度と右側領域の輝度のバランスを補正されるようにしたので、生成される3次元形状の顔面の左側と右側とバランスが崩れるのを防ぐことができる。
【0162】
つまり、上記した「従来の技術」の項において記載したように、2次元画像の人間の顔面に所定の方向から光が照射された状態であって、例えば、人間の顔面の右側が左側に比べて明るい領域となっている場合においても、生成された3次元形状データの示す人間の顔面における右側の高さが、左側の高さに比べて高くなってしまい、2次元画像データを取得した際の照明の影響によって人間の顔面の3次元形状が不自然なものとなるようなことがない。
【0163】
(III)3次元形状データの生成処理ルーチンのグレー変換処理(ステップS1608)において、人間の頭部の顔面側の2次元画像200(図3参照)に適した比率、具体的には、およそR:G:B=7:2:1の比率で、2次元画像データからグレー変換情報を得て、当該グレー変換情報を3次元形状データの高さ情報に変換している。このため、輝度情報を3次元形状データの高さ情報に変換する場合に比べて、2次元画像の顔面と3次元形状の顔面との対応が良くなり、3次元形状の顔面の凹凸を一層自然なものとすることができる。
【0164】
(IV)3次元形状データの生成処理ルーチンのハイライト除去処理(ステップS1610)において、3次元メッシュの高さ情報の平均値と標準偏差とに基づいて、3次元形状データの高さ情報、即ち、Z座標値に制限がかけられるので、生成された3次元形状データの示す人間の頭部の顔面側の3次元形状において、急峻な凸部が形成されるのを防ぐことができる。
【0165】
(V)上記した(1−6)反転禁止領域設定処理によって白黒反転を行わない範囲が設定される。そして、反転禁止マスクとして設定された白黒反転を行わない範囲を除いた部分を処理対象として、具体的には、人間の頭部の髪200bの部分のみを対象に、白黒反転処理(ステップS1612)が行われるので、髪の毛など本来盛り上がっている部分が窪んでしまうのを防ぐことができる。
【0166】
つまり、上記した「従来の技術」の項において記載したように、2次元画像の人間の顔面における眼の部位が、虹彩の色が黒などで暗い領域となっているときに、人間の顔面全体を対象に白黒の反転処理が行われて、生成された3次元形状データの示す人間の顔面における眼の部位の高さが、眼の部位の周囲に比べて高くなってしまい、人間の顔面の3次元形状において眼の部位が突出してしまって不自然なものとなるようなことがない。
【0167】
(VI)上記した(1−2)3次元化領域設定処理によって、2次元画像200の人間の顔面200aを取り囲むようにして楕円300が設定される。そして、設定された楕円300の内部領域たる3次元化領域を対象に、楕円の盛り上げ処理(ステップS1618)が行われるので、生成される3次元形状において顔面側全体の丸みが表現される。
【0168】
(VII)3次元形状データの生成処理ルーチンのフィレット処理(ステップS1620)において、フィレットメッシュによって3次元メッシュを変形させるので、3次元形状の垂直面の角が丸くなり、人間の顔面にはありえないような垂直面はなくなり、3次元形状の人間の顔面が自然に仕上がる。
【0169】
また、本発明による3次元形状データの生成方法によって生成された3次元形状データを、例えば、3次元切削加工装置に用いた場合には、3次元形状データの示す3次元形状が高品質なので、当該3次元形状データに基づいて被加工物から削り出される3次元形状を高品質なものとすることができる。
【0170】
なお、上記した実施の形態は、以下の(1)乃至(5)に説明するように変形することができる。
【0171】
(1)上記した実施の形態においては、本発明による3次元形状データの生成方法により生成された3次元形状データが3次元形状データ記憶部16−2に記憶されるようにしたが、これに限られるものではないことは勿論であり、本発明による3次元形状データの生成方法により生成された3次元形状データを、3次元切削加工の駆動装置に出力するようにしたり、外部記憶装置22に記憶するようにしてもよく、さらに、外部記憶装置22に記憶された3次元データをCADシステムなどで用いるようにしてもよい。
【0172】
(2)上記した実施の形態においては、カラーの2次元画像データから3次元形状データを生成するようにしたが、これに限られるものではないことは勿論であり、例えば、グレースケールの2次元画像データから3次元形状データを生成するときに、本発明による3次元形状データの生成方法を用いるようにしてもよい。なお、2次元画像データの種類により、ステップS1608の処理においてグレー変換情報を得ることができな場合には、3次元形状の品質が低下する恐れが生じるが、グレー変換情報に代えて輝度情報を3次元形状データの高さ情報に変換するようにしてもよい。
【0173】
(3)本発明による3次元形状データの生成方法においては、本発明による3次元形状データの生成方法により生成された3次元形状データが示す3次元形状は3次元メッシュのみならず、ポリゴンやあるいは曲面に適用することもできる。
【0174】
(4)本発明による3次元形状データの生成処理の3次元化準備処理の段階における各処理、あるいは、3次元化実行処理の段階における各種処理はそれぞれ、適宜処理の順序を入れ換えたり、あるいは、除いてもよい。例えば、3次元化実行処理の段階において、3次元形状データの生成処理ルーチンの白黒反転処理(ステップS1612)と背景削除処理(ステップS1614)との順序を入れ換えてもよいし、あるいは、背景削除処理(ステップS1614)を行わなくてもよい。
【0175】
(5)上記した実施の形態ならびに上記(1)乃至(4)に示す変形例は、適宜に組み合わせるようにしてもよい。
【0176】
【発明の効果】
本発明は、以上説明したように構成されているので、高品質な3次元形状を示す3次元形状データを安価に生成することができるという優れた効果を奏する。
【図面の簡単な説明】
【図1】本発明による3次元形状データの生成方法の実施の形態の一例を実施した3次元形状データ生成装置のブロック図である。
【図2】表示装置の画面上に表示されるユーザー設定画面を示す説明図である。
【図3】本発明による3次元形状データの生成方法に用いられる2次元画像データの示す2次元画像の一例を模式的に示す説明図である。
【図4】本発明による3次元形状データの生成方法の3次元化領域設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図であり、(a)は点E1ならびに点E2が指定された状態を示す説明図であり、(b)は楕円が生成された状態を示す説明図であり、(c)は(b)に示す楕円が変形された状態を示す説明図である。
【図5】本発明による3次元形状データの生成方法の両眼位置設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図であり、(a)は右眼の位置を示す点REが表示された状態を示す説明図であり、(b)は左眼の位置を示す点LEが表示された状態を示す説明図である。
【図6】本発明による3次元形状データの生成方法の鼻外郭設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図である。
【図7】鼻外郭形状の生成処理ルーチンのフローチャートである。
【図8】鼻外郭形状の生成処理ルーチンの鼻の上端点NUの生成処理を示す説明図である。
【図9】(a)(b)は、鼻外郭形状の生成処理ルーチンの鼻の下端点NDの生成処理を示す説明図である。
【図10】鼻外郭形状の生成処理ルーチンの鼻の右端点NRならびに左端点NLの生成処理を示す説明図である。
【図11】(a)(b)は、鼻外郭形状の生成処理ルーチンの鼻の中心点NCの生成処理を示す説明図である。
【図12】鼻外郭形状の生成処理ルーチンによって生成された鼻外郭形状を示す説明図である。
【図13】本発明による3次元形状データの生成方法の鼻外郭設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図である。
【図14】本発明による3次元形状データの生成方法の背景領域設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図である。
【図15】本発明による3次元形状データの生成方法の反転禁止領域設定処理のときのユーザー設定画面の画像エリアの表示内容を示す説明図である。
【図16】3次元形状データの生成処理ルーチンのフローチャートである。
【図17】3次元形状データの生成処理ルーチンの鼻形状作成処理を概念的に示す説明図である。
【図18】3次元形状データの生成処理ルーチンの鼻形状作成処理の内容をエリアAを中心にして概念的に示す説明図である。
【図19】3次元形状データの生成処理ルーチンの鼻形状作成処理のときのメッシュ点Pの高さhを求める数式1に対応する内容を示す説明図である。
【図20】3次元形状データの生成処理ルーチンの鼻形状作成処理後の3次元メッシュの一例を示す説明図である。
【図21】(a)(b)は、3次元形状データの生成処理ルーチンのフィレット処理を示す説明図であり、(a)はフィレット処理前の3次元メッシュを示す説明図であり、(b)はフィレット処理後の3次元メッシュを示す説明図である。
【図22】(a)(b)は、3次元形状データの生成処理ルーチンのフィレット処理に用いられるフィレットメッシュを示す説明図である。
【図23】(a)(b)は、3次元形状データの生成処理ルーチンのフィレット処理に用いられるフィレットメッシュを示す説明図である。
【図24】3次元形状データの生成処理ルーチンのフィレット処理を概念的に示す説明図である。
【図25】(a)(b)は、3次元形状データの生成処理ルーチンのフィレット処理を概念的に示す説明図である。
【図26】(a)(b)は、3次元形状データの生成処理ルーチンのフィレット処理を概念的に示す説明図である。
【符号の説明】
10 中央制御装置(CPU)
14 リード・オンリ・メモリ(ROM)
16 ランダム・アクセス・メモリ(RAM)
16−1 2次元画像データ記憶部
16−2 3次元形状データ記憶部
18 入力装置
20 表示装置
22 外部記憶装置
100 ユーザー設定画面
100a 画像エリア
100b 2次元画像データ欄
100c モード選択エリア
100d 楕円設定モード欄
100e 右眼設定モード欄
100f 左眼設定モード欄
100g 鼻外郭設定モード欄
100h 領域設定モード欄
100i 背景マスク欄
100j 反転禁止マスク欄
100k 3次元化開始欄
100m プレビュー欄
200 2次元画像
200a 顔面
200b 髪
200c 左眼の部位
200d 右眼の部位
200e 鼻の部位
300 楕円
300a 楕円長軸
400,400’鼻外郭形状[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for generating three-dimensional shape data, and more particularly, to a method for generating three-dimensional shape data for automatically generating three-dimensional shape data indicating a three-dimensional shape on the face side of a human head, In particular, the present invention relates to a method for generating three-dimensional shape data for generating three-dimensional shape data suitable as three-dimensional shape data used in a three-dimensional shape processing device by numerical control such as a three-dimensional cutting device.
[0002]
[Prior art]
Conventionally, a method of generating three-dimensional shape data indicating a predetermined object having a three-dimensional shape using a three-dimensional scanner is known.
[0003]
More specifically, in a method using a three-dimensional scanner, for example, a human head, particularly a face, as an object is measured by scanning with an optical means of a three-dimensional scanner, and based on the measurement result, Three-dimensional shape data indicating the three-dimensional shape of the human face is generated.
[0004]
However, in the method of generating three-dimensional shape data using such a conventional three-dimensional scanner, there is a restriction that an object such as a human face must be actually measured, and the three-dimensional scanner is expensive. There is a problem that the system for generating the dimensional shape data becomes expensive.
[0005]
There is also known a method of generating 3D shape data from the 2D image data using 2D image data indicating a 2D image of a predetermined object without using a 3D scanner.
[0006]
More specifically, in the method using two-dimensional image data, for example, red (R) component data of each pixel of the two-dimensional image data obtained by photographing a human face with a digital camera, green ( G) component data and blue (B) component data are processed at a ratio of approximately R: G: B = 3: 5: 2 to obtain luminance information indicating the brightness of each pixel. Then, using the luminance information of the two-dimensional image data as the height information of the three-dimensional shape data, three-dimensional shape data indicating the three-dimensional shape of the human face is generated.
[0007]
As a result, the height of the three-dimensional shape indicated by the three-dimensional shape data is increased corresponding to the bright region of the two-dimensional image indicated by the two-dimensional image data (that is, the region having a high luminance information level). The three-dimensional shape has a lower height corresponding to a dark area (that is, an area where the level of luminance information is low).
[0008]
At this time, black and white inversion processing is performed according to the type of the two-dimensional image indicated by the two-dimensional image data. For example, when the 2D image is a human head, if the hair is dark and dark, the height of the corresponding portion of the 3D shape indicated by the generated 3D shape data is low. Since it is unnatural, the two-dimensional image data subjected to the black and white inversion processing and the original two-dimensional image data are synthesized. Then, the luminance information of the synthesized two-dimensional image data composed of data having higher luminance is converted as height information of the three-dimensional shape data.
[0009]
However, in such a conventional method for generating three-dimensional shape data using two-dimensional image data, if the two-dimensional image indicated by the two-dimensional image data is on the face side of a person, particularly a human head, it is generated. There is a problem in that the three-dimensional shape indicated by the three-dimensional shape data thus made does not correspond to the unevenness of the actual human face and becomes unnatural.
[0010]
Specifically, the nose portion of the human face of the two-dimensional image is not particularly bright compared to other areas of the face, so that the luminance information of the two-dimensional image data is used as the height information of the three-dimensional shape data. Even after conversion, the height of the nose portion on the human face indicated by the generated three-dimensional shape data is substantially equal to the periphery of the nose portion, and the nose portion protrudes in the three-dimensional shape of the human face. It was unnatural.
[0011]
In addition, when the eye part on the human face of the two-dimensional image is a dark region with an iris color of black or the like, the generated three-dimensional shape data indicates when black and white inversion processing is performed. The height of the part of the eye on the human face is higher than the surroundings, and the part of the eye protrudes in the three-dimensional shape of the human face, which is unnatural.
[0012]
Further, when the human face of the two-dimensional image is irradiated with light from a predetermined direction and the right side of the human face is a brighter area than the left side, for example, the generated 3 The height on the right side of the human face indicated by the three-dimensional shape data is higher than the height on the left side, and the three-dimensional shape of the human face is unnatural due to the influence of illumination when acquiring the two-dimensional image data. It was something.
[0013]
[Problems to be solved by the invention]
The present invention has been made in view of the problems of the conventional techniques as described above, and an object of the present invention is to generate three-dimensional shape data indicating a high-quality three-dimensional shape at low cost. An object of the present invention is to provide a method for generating three-dimensional shape data that can be made.
[0014]
[Means for Solving the Problems]
  In order to achieve the above object, the invention according to claim 1 of the present invention comprises a specifying means, a generating means,Reversal prohibition area setting means,First addition means, correction means,Smoothing processing means;Gray conversion means, limiting means,Black-and-white reversing means, forming means,Brightness information obtained from two-dimensional image data composed of pixel data corresponding to a predetermined number of pixels, and having a plurality of XYZ coordinate values in an XYZ coordinate system. 3D for generating 3D shape data indicating the 3D shape of a human head using height information indicated by the Z coordinate value of 3D shape data composed of mesh pointsshapeA method for generating three-dimensional shape data in a data generation device, wherein the specifying means,Position of the eye part on the human face indicated by the two-dimensional image dataofSpecifiedReceive inputThe first step and the generating means,A second step of generating a region of the nose portion of the human face indicated by the two-dimensional image data based on the position of the eye portion designated in the first step;The inversion prohibition area setting means receives a designation input of a point other than the hair of the human head indicated by the two-dimensional image data, so that the color similar to the color of the point having received the designation input in the area other than the hair A third step of setting the color area as a region where black and white inversion is not performed;The first adding means isAdding a predetermined luminance value according to the distance from the eye part to the predetermined luminance value of the eye part specified in the first step indicated by the luminance information of the two-dimensional image data; A fourth step of changing the luminance information of the two-dimensional image data to luminance information indicating the luminance value of the addition result;The correction means is,The left eye is the center of the eye part specified in the first step.PredeterminedLeft area2D image data inofAverage brightness value indicated by brightness informationAnd focusing on the right eyePredeterminedRight area2D image data inofA difference between the average luminance value indicated by the luminance information is obtained, and based on the difference, the luminance information of the two-dimensional image data is changed by correcting the balance between the luminance information of the left region and the luminance information of the right region of the face. 5, a sixth step in which the smoothing processing means performs a smoothing process on the two-dimensional image data, a gray conversion means in the fourth step, the fifth step, and the above The red component data, the green component data, and the blue component data constituting the pixel data of the two-dimensional image data processed in the sixth step are weighted and added at a predetermined ratio and gray A seventh step of acquiring a scale value, converting the acquired gray scale value into height information of the three-dimensional shape data and generating the height information, and the limiting means in the seventh step Generation The height indicated by the height information of the three-dimensional shape data generated in the seventh step is limited based on the average value and standard deviation of the height indicated by the height information of the three-dimensional shape data. In the eighth step, the height information is changed in the eighth step with respect to an area other than the area where the black-and-white inversion means does not perform the black-and-white inversion set in the third step. The black-and-white reversal processing is performed on the three-dimensional shape data that has been changed. A ninth step of converting the three-dimensional shape data into the three-dimensional shape data of the region corresponding to the human head hair; and the two-dimensional image data generated by the forming means in the second step. The nose of the human face A tenth step of changing the height information of the three-dimensional shape data as a shape corresponding to the rising of the nose of the human face with the nose tip indicated by the two-dimensional image data as a vertex for the region; and the second addition The means is positioned at the center of the predetermined shape area at the height indicated by the height information of the three-dimensional shape data corresponding to the predetermined shape area specified to include the human head indicated by the two-dimensional image data. An eleventh step of adding a predetermined height so that the height indicated by the corresponding height information is the highest, and changing the height information of the three-dimensional shape data into height information indicating the added height. A twelfth step in which the fillet processing means fillets the three-dimensional shape data;It is made to have.
[0015]
  Therefore, according to the first aspect of the present invention, since the three-dimensional shape data is generated from the two-dimensional image data, the three-dimensional scanner as described in the above-mentioned section “Prior Art” is used. 3D shape data can be generated at low cost without the need to measure objects that actually have a 3D shape.Furthermore, the generated three-dimensional shape data does not make the three-dimensional shape of the human face unnatural due to the influence of illumination when the two-dimensional image data is acquired.
[0016]
  Also, the forming meansFor the region of the nose portion of the human face indicated by the two-dimensional image data generated in the second step, the shape corresponding to the rise of the nose of the human face having the nose tip indicated by the two-dimensional image data as a vertex As the height information of the three-dimensional shape data is changed asIn the generated three-dimensional shape on the face side of the human head, the rising of the nose is expressed, and high-quality three-dimensional shape data indicating the face side of the human head can be generated.
[0018]
  In addition, the black and white reversing means performs black and white reversal processing of the three-dimensional shape data whose height information has been changed in the eighth step for areas other than the areas that are not subjected to black and white reversal set in the third step. The three-dimensional shape data subjected to the black / white reversal processing is compared with the three-dimensional shape data not subjected to the black / white reversal processing, and the three-dimensional shape data having the higher height information is applied to the human head hair. Since it is the 3D shape data of the corresponding area,It is possible to prevent the originally raised portion such as hair from being depressed, and to generate high-quality three-dimensional shape data of the human head.
[0020]
  In addition, the gray conversion unit includes red component data constituting pixel data of the two-dimensional image data processed in the fourth step, the fifth step, and the sixth step; The grayscale value is obtained by weighting and adding the component data and the blue component data at a predetermined ratio, for example, a ratio of approximately R: G: B = 7: 2: 1, and the acquired grayscale value Is converted into the height information of the three-dimensional shape data to generate the height information.The correspondence between the face of the two-dimensional image and the face of the three-dimensional shape is improved, the unevenness of the three-dimensional face can be made more natural, and the three-dimensional showing the face side of the high-quality human head Shape data can be generated.
[0022]
  Further, the restricting means is based on the average value and the standard deviation of the height indicated by the height information of the three-dimensional shape data generated in the seventh step. Because the height information is changed by limiting the height indicated by the height information of the three-dimensional shape data,In the three-dimensional shape on the face side of the human head indicated by the generated three-dimensional shape data, it is possible to prevent a steep convex portion from being formed, and 3 indicating the face side of the high-quality human head. Dimensional shape data can be generated.
[0024]
  Further, the second adding means has the height indicated by the height information of the three-dimensional shape data corresponding to the region of the predetermined shape designated so as to include the human head indicated by the two-dimensional image data. Height information indicating the height obtained by adding the predetermined height so that the height indicated by the height information corresponding to the center of the region of the predetermined shape is the highest, and adding the height information of the three-dimensional shape data To the eleventh step,The roundness of the entire face side is expressed in the generated three-dimensional shape, and high-quality three-dimensional shape data indicating the face side of the human head can be generated.
[0026]
  Also,UpSince the fillet processing means performs fillet processing on the three-dimensional shape data,The corners of the three-dimensional shape of the vertical surface are rounded and curved, and there is no vertical surface that is impossible for human faces. The three-dimensional shape of the human face is naturally finished and the face side of a high-quality human head Can be generated.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an example of an embodiment of a method for generating three-dimensional shape data according to the present invention will be described in detail with reference to the accompanying drawings.
[0028]
FIG. 1 is a block diagram of a three-dimensional shape data generation apparatus that implements an example of an embodiment of a method for generating three-dimensional shape data according to the present invention.
[0029]
In the three-dimensional shape data generation apparatus, the overall operation is controlled by a central processing unit (CPU) 10.
[0030]
The CPU 10 stores a read-only memory (ROM) 14 in which a program for operating the CPU 10 is stored via the bus 12 and two-dimensional image data to be described later under the control of the CPU 10. The three-dimensional shape data according to the present invention is controlled by the image data storage unit 16-1, the three-dimensional shape data storage unit 16-2 that stores the three-dimensional shape data generated by the three-dimensional shape data generation process according to the present invention, and the CPU 10. A random access memory (RAM) 16 in which an area or the like as a working area is set, and an input device 18 including a pointing device such as a mouse and a character input device such as a keyboard A display device 20 composed of a CRT, a liquid crystal display device (LCD), etc .; And a like type of hard disk that stores such data and a configured external storage device 22.
[0031]
Here, the CPU 10 performs a process of executing a program for realizing various processes in the three-dimensional preparation process and the three-dimensional execution process of the three-dimensional shape data generation process according to the present invention described later.
[0032]
Here, as described above, the display device 20 includes, for example, a CRT or a liquid crystal display device 20 (LCD), and various screens are displayed on the display device 20.
[0033]
FIG. 2 schematically shows a user setting screen 100 displayed on the display device 20 when the three-dimensional shape data generation device is activated.
[0034]
In this user setting screen 100, the 2D image data field 100b for selecting and setting the 2D image data used for the 3D shape data generation processing according to the present invention by the file name and the 2D image data field 100b are set. Image area 100a in which the 2D image indicated by the generated 2D image data and the 3D shape indicated by the 3D shape data generated by the 3D shape data generation processing according to the present invention are displayed, and 3D shape data generation According to the present invention, a mode selection area 100c for selecting and setting the operation mode of the apparatus, a background mask column 100i and an inversion prohibition mask column 100j for determining and setting the type of region designated in the region setting mode described later, and Select whether or not to instruct the start of the 3D execution process described later in the 3D shape data generation process A 3D conversion start field 100k to be determined, and a preview for selecting and setting whether or not to display the 3D shape indicated by the 3D shape data generated by the 3D shape data generation processing according to the present invention in the image area 100a The column 100m is displayed.
[0035]
Then, the input device 18 including a pointing device or a character input device inputs a desired instruction of the operator by selecting a desired position on the screen of the display device 20 or inputting a desired numerical value. Is.
[0036]
The contents of various settings made by operating the pointing device or the character input device of the input device 18 are processed by the CPU 10 and stored in a predetermined area of the RAM 16 as information used for the processing for generating the three-dimensional shape data according to the present invention. Is done.
[0037]
More specifically, the input device 18 selects and sets a desired 2D image data file name in the 2D image data field 100b, or selects a desired 2D image or 3D shape displayed in the image area 100a. In the mode selection area 100c, the ellipse setting mode field 100d, the right eye setting mode field 100e, the left eye setting mode field 100f, the nasal outline setting mode field 100g, and the area setting mode field 100h are selected. By selecting and setting a desired operation mode of the three-dimensional shape data generation apparatus, or by selecting the background mask column 100i or the inversion prohibition mask column 100j, the type of region specified in the region setting mode to be described later By selecting the three-dimensional start column 100k, the three-dimensional shape data of the present invention This is for setting an instruction to start a three-dimensionalization execution process, which will be described later, or displaying the three-dimensional shape indicated by the three-dimensional shape data in the image area 100b by selecting the preview field 100m. is there.
[0038]
In the above configuration, the three-dimensional shape data generation processing according to the present invention, specifically,
A generation process of three-dimensional shape data indicating a three-dimensional shape of a human head, particularly, the face side will be described with reference to FIGS.
[0039]
First, in order to facilitate understanding of the processing for generating three-dimensional shape data according to the present invention, the two-dimensional image data used for the processing for generating three-dimensional shape data according to the present invention will be described.
[0040]
The two-dimensional image data indicates a two-dimensional image of a predetermined object having a three-dimensional shape. In this embodiment, two-dimensional image data obtained by photographing the face side of a human head with a digital camera, that is, two-dimensional image data having a color is used.
[0041]
The two-dimensional image data is input from the outside of a three-dimensional shape data generation device such as the external storage device 22 by “(1-1) two-dimensional image data setting process” described later, and the two-dimensional image data is controlled by the CPU 10. It is stored in the data storage unit 16-1.
[0042]
Such two-dimensional image data is composed of pixel data corresponding to a predetermined number of pixels. The pixel data includes red (R) component data, green (G) component data, and blue (B) data, respectively. It consists of component data. Accordingly, luminance information indicating the brightness of each pixel can be obtained by processing at a ratio of approximately R: G: B = 3: 5: 2. That is, each point on the two-dimensional image corresponding to the pixel data constituting the two-dimensional image data (hereinafter simply referred to as “pixel point”) has luminance information indicating the brightness of the pixel point. .
[0043]
Here, FIG. 3 schematically shows an example of the two-dimensional image indicated by the two-dimensional image data. The two-dimensional image data showing the two-dimensional image 200 of the human head as shown in FIG. Are used in this embodiment.
[0044]
The two-dimensional image 200 (see FIG. 3) indicated by the two-dimensional image data is displayed in the image area 100a of the user setting screen 100 (see FIG. 2). In the following description, each part of the human head of the two-dimensional image 200 is represented by “face 200a”, “hair 200b”, “left eye part 200c”, “right eye part 200d”, “ It will be appropriately referred to as “nose portion 200e”.
[0045]
The generation process of the three-dimensional shape data according to the present invention includes two stages of processes, a three-dimensional preparation process and a three-dimensional execution process. Hereinafter, various processes in the two stages will be described in detail.
[0046]
(1) Three-dimensional preparation process
When the three-dimensional shape data generation device is activated, a user setting screen 100 (see FIG. 2) is displayed on the screen of the display device 20. Then, the three-dimensional preparation process is performed by the operator selecting each column of the user setting screen 100 using the input device 18.
[0047]
In this three-dimensional preparation process, the following six processes are sequentially performed. The six processes are a two-dimensional image data setting process, a three-dimensional area setting process, a binocular position setting process, a nose outline setting process, a background area setting process, and an inversion-inhibited area setting process. It will be explained in the following.
[0048]
(1-1) Two-dimensional image data setting process (see FIG. 3)
In this two-dimensional image data setting process, an operator selects and sets two-dimensional image data used for three-dimensional shape data generation processing.
[0049]
Any one of the two-dimensional image data stored in the two-dimensional image data storage unit 16-1 by the operator operating the input device 18 in the two-dimensional image data column 100b of the user setting screen 100 shown in FIG. Alternatively, a desired two-dimensional image data file is input.
[0050]
Thereby, the two-dimensional image data of the file selected in the two-dimensional image data column 100b is set as the two-dimensional image data used for the three-dimensional shape data generation process. In the image area 100a of the user setting screen 100, a two-dimensional image 200 of the human head indicated by the set two-dimensional image data is displayed (see FIG. 3).
[0051]
(1-2) Three-dimensional area setting process (see FIGS. 4A, 4B, and 4C)
In this three-dimensional area setting process, the operator selects and sets a range in which three-dimensional shape data is generated from the two-dimensional image indicated by the two-dimensional image data.
[0052]
Specifically, first, the operator operates the input device 18 to select the ellipse setting mode field 100d in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the ellipse setting mode.
[0053]
In the ellipse setting mode, the operator operates the pointing device of the input device 18 in the image area 100a of the user setting screen 100 to select one point of the two-dimensional image 200 displayed in the image area 100a. Specify (see point E1 in FIG. 4A). Thereafter, the operator operates the pointing device of the input device 18 to designate one point of the two-dimensional image 200 displayed in the image area 100a (see point E2 in FIG. 4A).
[0054]
As a result, an ellipse 300 having the designated points E1 and E2 as both ends of the ellipse major axis and the ellipse major axis 300a are displayed on the two-dimensional image 200 in the image area 100a (FIG. 4B). reference).
[0055]
Further, the operator operates the pointing device of the input device 18 to designate one point of the two-dimensional image 200 displayed in the image area 100a (see point E3 in FIG. 4B). As a result, the ellipse 300 is deformed so that the designated point E3 is positioned on the circumference of the ellipse 300 (see FIG. 4C).
[0056]
Thus, when the operator designates three points on the two-dimensional image 200 (that is, point E1, point E2, and point E3), an ellipse 300 is automatically generated and set on the two-dimensional image 200. An internal region surrounded by 300 is set as a range in which 3D shape data is generated in the 2D image 200 indicated by the 2D image data, that is, a 3D region.
[0057]
Note that when the operator designates three points on the two-dimensional image 200 so that the ellipse major axis 300a displayed in the image area 100a is parallel to the nose strip on the human face 200a of the two-dimensional image 200, it will be described later. It is possible to make the outline of the nose automatically generated in the nasal outline setting process to be more accurate.
[0058]
(1-3) Binocular position setting process (see FIGS. 5A and 5B)
In this binocular position setting process, the operator selects and sets the position of the right eye and the position of the left eye on the human face 200a of the two-dimensional image 200 indicated by the two-dimensional image data.
[0059]
Specifically, first, the operator operates the input device 18 to select the right eye setting mode field 100e in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the right eye setting mode.
[0060]
In the right eye setting mode, the operator operates the pointing device of the input device 18 in the image area 100a of the user setting screen 100, and the right of the two-dimensional image 200 displayed in the image area 100a. The center position of the eye part 200d is designated.
[0061]
As a result, the designated center position is set as the position of the right eye. In the image area 100a, a point RE indicating the set position of the right eye is displayed at the center of the right eye portion 200d (see FIG. 5A).
[0062]
Thereafter, the operator operates the input device 18 to select the left eye setting mode field 100f in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the left eye setting mode.
[0063]
In the left eye setting mode, the operator operates the pointing device of the input device 18 in the image area 100a of the user setting screen 100, and the left of the two-dimensional image 200 displayed in the image area 100a. The center position of the eye part 200c is designated.
[0064]
As a result, the designated center position is set as the position of the left eye. In the image area 100a, a point LE indicating the set position of the left eye is displayed at the center of the left eye portion 200c (see FIG. 5B).
[0065]
(1-4) Nasal outline setting process (see FIG. 6)
In this nasal contour setting process, the contour shape of the nose portion 200e on the human face 200a of the two-dimensional image 200 indicated by the two-dimensional image data is set.
[0066]
Specifically, first, the operator operates the input device 18 to select the nose outline setting mode field 100g in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the nose outline setting mode.
[0067]
As a result, as shown in FIG. 6, the human face 200a of the two-dimensional image 200 displayed in the image area 100a of the user setting screen 100 has five points (upper end point NU, lower end point ND, left end point NL, A nasal outline 400 comprising a right end point NR and a center point NC) is automatically generated.
[0068]
Of these five points, an inner region surrounded by a quadrangle composed of the upper end point NU, the lower end point ND, the left end point NL, and the right end point NR is a human face 200a of the two-dimensional image 200 indicated by the two-dimensional image data. Is set as the range of the nose portion 200e, that is, the nose region, and the center point NC is set as the tip of the nose.
[0069]
Here, automatic generation of the nose outline 400, that is, automatic generation processing of the upper end point NU, the lower end point ND, the left end point NL, the right end point NR, and the center point NC forming the nose outline 400 will be described with reference to FIGS. 12 will be described in more detail.
[0070]
FIG. 7 shows a flowchart of a nasal contour shape generation processing routine. The flowchart of the nasal contour shape generation processing routine shown in FIG. 7 is started when the operator selects the nasal contour setting mode field 100g on the user setting screen 100 and changes to the nasal contour setting mode as described above. Is to be executed.
[0071]
As shown in FIG. 5B, when the nose outline shape generation processing routine is started, the two-dimensional image 200 displayed in the image area 100a of the user setting screen 100 is displayed as described above (see FIG. 5B). 1-2) The ellipse 300 generated in the three-dimensional area setting process, the point RE indicating the position of the right eye and the position of the left eye set in the above-described (1-3) binocular position setting process LE is displayed.
[0072]
Then, when this nasal contour shape generation processing routine is started, in step S702, the nose upper end point NU is automatically generated. Specifically, a point RE indicating the position of the right eye and a point LE indicating the position of the left eye are obtained as an intermediate point and set as the upper end point NU. That is, as shown in FIG. 8, a point that bisects the straight line L1 connecting the point RE indicating the position of the right eye and the point LE indicating the position of the left eye is calculated, and the calculated point is above the nose. Automatically generated as an end point NU.
[0073]
When the process of step S702 ends, the process proceeds to step S704, and the nose lower end point ND is automatically generated. As shown in FIG. 9A, the ellipse 300 extends in the direction from the end point E1 to the end point E2 of the ellipse major axis 300, starting from the upper end point NU automatically generated in step S702, parallel to the ellipse major axis 300a. A half straight line L2 is obtained.
[0074]
After the half line L2 is calculated, the distance between the right eye position and the left eye position from the upper end point NU on the half line L2, that is, the point RE indicating the position of the right eye and the position of the left eye A point that is at a distance equal to the length of the straight line L1 that connects the point LE indicating is calculated, and the calculated point is automatically generated as the lower end point ND of the nose (see FIG. 9B).
[0075]
Then, following step S704, in step S706, the right end point NR and the left end point NL of the nose are automatically generated (see FIG. 10). A straight line L3 that passes through an intermediate point between the point RE indicating the position of the right eye and the upper end point NU automatically generated in step S702 and connects the upper end point NU and the lower end point ND (that is, part of the half line L2 in step S704). A straight line L4 parallel to the straight line) is obtained. Further, a straight line L5 is obtained which passes through the midpoint between the point LE indicating the position of the left eye and the upper end point NU set in step S704 and is parallel to the straight line L3 connecting the upper end point NU and the lower end point ND.
[0076]
Then, on the straight line L3 connecting the upper end point NU and the lower end point ND, a point at a position 5/6 from the upper end point NU side is calculated, and a point RE indicating the position of the right eye passing through the calculated point A straight line L6 parallel to the straight line L1 connecting the point LE indicating the position of the left eye is obtained.
[0077]
After the straight line L6 is thus calculated, the intersection of the straight line L6 and the straight line L4 is calculated, the calculated point is automatically generated as the right end point NR of the nose, and the intersection of the straight line L6 and the straight line L5 is calculated. The calculated point is automatically generated as the left end point NL of the nose.
[0078]
  Then, when the process of step S706 is completed, the process proceeds to step S708, and the nose center point NC is automatically generated. The left end point NL and the right end point NR set in step S706ofFind the midpoint. That is, as shown in FIG. 11A, a point P that bisects a straight line L6 connecting the left end point NL and the right end point NR is calculated.
[0079]
An intermediate point between the calculated point P and the lower end point ND of the nose, that is, a point that bisects a straight line connecting the calculated point P and the lower end point ND of the nose. Is automatically generated as the center point NC of the nose (see FIG. 11B).
[0080]
Thus, when the center point NC of the nose is automatically generated by the process of step S708, five points of the upper end point NU, the lower end point ND, the left end point NL, the right end point NR, and the center point NC are generated. The side LR connecting the upper end point NU and the right end point NR, the side LDR connecting the right end point NR and the lower end point ND, the side LDL connecting the lower end point ND and the left end point NL, the left end point NL and the upper end point The side LL connecting the NU and the side LC connecting the upper end point NU and the center point NC are automatically generated (see FIG. 12), the process of step S708 is terminated, and the nose outline shape generation process routine is terminated. To do.
[0081]
By the above-described processing routine for the nose outline, the upper end point NU, the lower end point ND, the left end point NL, the right end point NR and the center point NC are automatically generated, and the nose outline 400 (see FIG. 12) is automatically generated. It is displayed on the human face 200a of the two-dimensional image 200 displayed in the image area 100a of the user setting screen 100.
[0082]
The quadrilateral shape composed of the side LR, the side LDR, the side LDL, and the side LL of the nose outline 400 thus automatically generated and displayed is the shape of the nose on the human face 200a of the two-dimensional image 200 displayed in the image area 100a. The center point NC of the nasal contour shape 400 coincides with the nose tip of the nasal region 200e as well as the contour shape of the region 200e.
[0083]
Therefore, the two-dimensional image indicated by the two-dimensional image data is an internal region surrounded by a quadrangle composed of the upper end point NU, the lower end point ND, the left end point NL, and the right end point NR of the nose outline 400 that is automatically generated and displayed. While being set as the range of the nose portion 200e in the human face 200a of the image 200, the center point NC is set as the nose tip.
[0084]
However, depending on the type of the two-dimensional image or the like, the nasal outline 400 that is automatically generated and displayed does not match the nose portion 200e on the human face 200a of the two-dimensional image 200 displayed in the image area 100a. There is also. Only in such a case, the adjustment processing of the nose outline 400 that is automatically generated and displayed is performed.
[0085]
Specifically, as shown in FIG. 6, the nose outline shape 400 that is automatically generated and displayed is the shape of the nose portion 200 e on the human face 200 a of the two-dimensional image 200 displayed in the image area 100 a. If it does not match the outline shape, the operator operates the input device 18 to move the upper end point NU of the nose outline shape 400 so as to match the upper end of the nose portion 200e of the two-dimensional image 200, The lower end point ND of the nose outline 400 is moved so as to coincide with the lower end of the nose part 200e of the two-dimensional image 200, and the left end point NL of the nose outline 400 matches the left end of the nose part 200e of the two-dimensional image 200. The right end point NR of the nose outline 400 is moved so as to coincide with the right end of the nose portion 200e of the two-dimensional image 200, and the center point NC of the nose outline 400 is moved to the nose of the two-dimensional image 200. Nose portion 200e, i.e., moved to match the high position the tallest.
[0086]
The adjustment processing is thus performed, and the upper end point NU of the nose outline 400 ′ (see FIG. 13) that matches the nose portion 200e on the human face 200a of the two-dimensional image 200 displayed in the image area 100a. An internal area surrounded by a quadrangle composed of the lower end point ND, the left end point NL, and the right end point NR is set as the range of the nose portion 200e in the human face 200a of the two-dimensional image 200 indicated by the two-dimensional image data. The center point NC is set as the nose tip.
[0087]
(1-5) Background area setting process (see FIG. 14)
In this background area setting process, the operator sets the range of the background of the human head of the two-dimensional image indicated by the two-dimensional image data.
[0088]
Specifically, first, the operator operates the input device 18 to select the area setting mode column 100h in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the region setting mode.
[0089]
In the area setting mode, the operator operates the pointing device of the input device 18 in the image area 100a of the user setting screen 100, and the human head of the two-dimensional image displayed in the image area 100a. Specify one point of the background of the part. Further, the area of the same color as the designated point is filled.
[0090]
The background of the human head of the two-dimensional image 200 (see the hatched area shown in FIG. 14) is designated by repeatedly performing such designation of one point and the process of filling the area of the same color with the designated point.
[0091]
Thereafter, the operator operates the input device 18 to select the background mask field 100i on the user setting screen 100. Thereby, the area (hatched area shown in FIG. 14) designated in the image area 100a is set as a background mask indicating the background range of the human head of the two-dimensional image 200 indicated by the two-dimensional image data.
[0092]
(1-6) Inversion prohibited area setting process (see FIG. 15)
In this inversion prohibition region setting process, the operator sets a range in which black and white inversion is not performed in the two-dimensional image indicated by the two-dimensional image data.
[0093]
Specifically, first, the operator operates the input device 18 to select the area setting mode column 100h in the mode selection area 100c of the user setting screen 100 shown in FIG. As a result, the operation mode of the three-dimensional shape data generation apparatus is changed to the region setting mode.
[0094]
In the area setting mode, the operator operates the pointing device of the input device 18 in the image area 100a of the user setting screen 100, and the human 2D image 200 displayed in the image area 100a is displayed. One point other than the hair 200b is designated. Further, the area of the same color as the designated point is filled.
[0095]
By repeatedly specifying such a point and filling the region of the same color with the specified point, a region other than the human head hair 200b of the two-dimensional image 200 (a hatched region shown in FIG. 15) is specified. .
[0096]
Thereafter, the operator operates the input device 18 to select the inversion prohibition mask field 100i on the user setting screen 100. As a result, the area designated in the image area 100a (the hatched area shown in FIG. 15), that is, the area other than the human head hair 200b is subjected to black and white reversal in the two-dimensional image indicated by the two-dimensional image data. It is set as an inversion prohibition mask indicating no range.
[0097]
(2) Three-dimensional execution processing
In the above (1) three-dimensional preparation process, (1-1) two-dimensional image data setting process, (1-2) three-dimensional area setting process, (1-3) binocular position setting process, (1- After the six processes of 4) nasal outline setting process, (1-5) background area setting process and (1-6) inversion prohibition area setting process are sequentially performed and all are finished, the three-dimensionalization execution process is performed.
[0098]
Specifically, after the three-dimensionalization preparation process is completed, when the operator selects the three-dimensionalization start column 100k on the user setting screen 100 of the display device 20 by the input device 18 including a pointing device or a character input device. A three-dimensional shape data generation processing routine (see FIG. 16) is activated and executed.
[0099]
The outline of the three-dimensional shape data generation processing routine shown in FIG. 16 will be described. First, optimization processing of two-dimensional image data used for generation of three-dimensional shape data is performed (steps S1602 to S1606), and then the optimum processing is performed. 3D shape data is generated from the converted 2D image data (step S1608), and the generated 3D shape data is adjusted (steps S1610 to S1622), whereby the above-described 3D preparation processing is performed. Based on the setting in, three-dimensional shape data is generated from the two-dimensional image data.
[0100]
Note that the three-dimensional shape data generated by the three-dimensional shape data generation processing routine is the human face corresponding to the two-dimensional image 200 (see FIG. 3) on the face side of the human head indicated by the two-dimensional image data. This is three-dimensional shape data indicating a three-dimensional shape. The generated three-dimensional shape data is stored in the three-dimensional shape data storage unit 16-2 under the control of the CPU 10.
[0101]
The three-dimensional shape data is a three-dimensional mesh composed of a plurality of mesh points having XYZ coordinate values in the XYZ coordinate system, and each mesh point that is an intersection of the meshes of the three-dimensional mesh has a coordinate value, that is, “X coordinate value” and “Y coordinate value” as position information and “Z coordinate value” as height information are set.
[0102]
In this embodiment, the three-dimensional mesh is initialized by a predetermined initialization process before the three-dimensional shape data generation processing routine is started. As a result, the size of the initialized 3D mesh in the X-axis direction and the Y-axis direction corresponds to the 2D image data, and the X coordinate value and Y coordinate value of each mesh point of the initialized 3D mesh are It has a value corresponding to the pixel data constituting the two-dimensional image data, and the Z coordinate value has a predetermined value (for example, “0”). That is, each initialized mesh point of the three-dimensional mesh is associated with a pixel point on the two-dimensional image indicated by the two-dimensional image data.
[0103]
In the three-dimensional shape data generation processing routine, first, in step S1602, the light effect processing is performed on the two-dimensional image data. This light effect process is a process for preventing the periphery of the eye of the three-dimensional shape from being depressed, as if two lights are irradiated toward both eyes of the two-dimensional image indicated by the two-dimensional image data. To do.
[0104]
Specifically, a straight line L1 (see FIG. 13) connecting a point RE indicating the position of the right eye and a point LE indicating the position of the left eye with the point LE (see FIG. 13) indicating the position of the left eye of the two-dimensional image as the center. In the inner region of the left reference circle whose radius is 1/8 of (see Fig. 8), the minimum luminance value is obtained based on the luminance information of the two-dimensional image data. A straight line L1 (see FIG. 8) connecting the point RE indicating the position of the right eye and the point LE indicating the position of the left eye around the point RE (see FIG. 13) indicating the position of the right eye of the two-dimensional image. In the inner region of the right reference circle having a radius of 1/8 of, the minimum luminance value is obtained based on the luminance information of the two-dimensional image data.
[0105]
Thus, the minimum luminance value around the left eye region 200c of the two-dimensional image 200 (hereinafter, the left eye periphery minimum luminance value) and the minimum luminance value around the right eye region 200d (hereinafter, the right eye periphery minimum). Luminance value), and in the inner region of the left reference circle around the point LE indicating the position of the left eye, the luminance of the cosine curve is added according to the distance from the point LE indicating the position of the left eye, The luminance value obtained by adding the luminance of the cosine curve is set as the ideal luminance value around the left eye. Further, the luminance of the cosine curve is added according to the distance from the point RE indicating the position of the right eye in the inner region of the right reference circle around the point RE indicating the position of the right eye, and the luminance of the cosine curve is added. The obtained luminance value is set as the ideal luminance value around the right eye.
[0106]
Thereafter, the luminance of the inner region of the left reference circle and the luminance of the inner region of the right reference circle are obtained again, and the difference between the left eye peripheral ideal luminance value and the right eye peripheral ideal luminance value is obtained.
[0107]
Then, after restoring the luminance information of the two-dimensional image data, an amplitude cosine curve luminance corresponding to the difference from the ideal luminance value around the left eye is added to each pixel point in the inner region of the left reference circle. Then, the cosine curve luminance having an amplitude corresponding to the difference from the ideal luminance value around the right eye is added to each pixel point in the inner region of the right reference circle.
[0108]
Note that the luminance information of the two-dimensional image data is changed by the light effect process (step S1602), the left / right luminance balance process (step S1604), and the smoothing process (step S1606), which will be described later, to optimize the two-dimensional image data. Is made. At this time, the luminance information of the two-dimensional image data is changed by red (R) component data, green (G) component data, and blue (B) component data constituting the pixel data of the two-dimensional image data. To be reflected in the value of.
[0109]
For example, at the pixel point to which the cosine curve luminance is added by the light effect processing described above, the pixel data of the pixel point is changed according to the amount that the luminance information after the change is higher than the level of the previous luminance information. The values of the red (R) component data, the green (G) component data, and the blue (B) component data are changed.
[0110]
When the process of step S1602 ends, the process proceeds to step S1604, and left / right luminance balance processing is performed on the two-dimensional image data. This left / right luminance balance processing is processing for preventing the balance between the left side and the right side of the three-dimensional face from being lost, and corrects the balance between the luminance of the left region and the right region of the face of the two-dimensional image.
[0111]
Specifically, a straight line L1 (see FIG. 13) connecting a point RE indicating the position of the right eye and a point LE indicating the position of the left eye with the point LE (see FIG. 13) indicating the position of the left eye of the two-dimensional image as the center. In the inner region of the left reference circle whose radius is 1/2 of (see Fig. 8), an average luminance value is obtained based on the luminance information of the two-dimensional image data. A straight line L1 (see FIG. 8) connecting the point RE indicating the position of the right eye and the point LE indicating the position of the left eye around the point RE (see FIG. 13) indicating the position of the right eye of the two-dimensional image. In the inner region of the right reference circle having a radius of ½, a mean luminance value is obtained based on the luminance information of the two-dimensional image data.
[0112]
Thus, the average value of luminance around the left eye portion 200c of the two-dimensional image 200 (hereinafter, left eye surrounding luminance average value) and the average value of luminance around the right eye portion 200d (hereinafter, right eye surrounding luminance). Then, a difference between the left eye surrounding luminance average value and the right eye surrounding luminance average value is obtained, and a gradient of inclination corresponding to the difference is added to each pixel point of the two-dimensional image.
[0113]
Following the processing in step S1604, in step S1606, smoothing processing is performed on the two-dimensional image data. This smoothing process is a process for smoothing the surface of a three-dimensional shape, for example, the surface of the skin, and performs noise removal by Gaussian distribution on the two-dimensional image data.
[0114]
Specifically, attention is paid to a predetermined pixel point on the two-dimensional image indicated by the two-dimensional image data, and a certain range of luminance around the pixel point is obtained. When there are pixel points with extremely different luminances, the original two-dimensional image data is updated by multiplying the coefficient by the Gaussian distribution except the pixel points with extremely different luminances. Such processing is repeated for all pixel points on the two-dimensional image indicated by the two-dimensional image data.
[0115]
  Step S1606When the process is completed, the process advances to step S1608 to perform a gray conversion process. In this gray conversion process, the red (R) component data, the green (G) component data, and the blue (B) that constitute the pixel data of the two-dimensional image data optimized by the processes in steps S1602 to S1606. This is a process in which the data of the above component is subjected to gray conversion at a predetermined ratio, and a value obtained by performing gray conversion (hereinafter, gray conversion information) is used as height information of the three-dimensional shape data. That is, three-dimensional shape data is generated from the two-dimensional image data by the processing in step S1608, and the Z coordinate value of the mesh point of the initialized three-dimensional mesh is set corresponding to the two-dimensional shape.
[0116]
Specifically, first, attention is paid to a predetermined pixel point on the two-dimensional image indicated by the two-dimensional image data, and red (R) component data and green (G) component constituting the pixel data of this pixel point. Data, and blue (B) component data. At this time, if the luminance information of the two-dimensional image data has been changed by the optimization processing in steps S1602 to S1606, the red (R) component data, green ( G) component data and blue (B) component data are obtained.
[0117]
Then, gray conversion is performed at a ratio of approximately R: G: B = 7: 2: 1 to obtain gray conversion information of the predetermined pixel point. The obtained gray conversion information is set as the height information of the three-dimensional shape data, that is, the Z coordinate value of the mesh point of the three-dimensional mesh corresponding to the predetermined pixel point on the two-dimensional image.
[0118]
Further, the same processing is repeated for all pixel points on the two-dimensional image indicated by the two-dimensional image data.
[0119]
Note that the gray conversion information obtained from the two-dimensional image data in the process of step S1608 is different from the luminance information obtained from the two-dimensional image data. That is, both gray conversion information and luminance information can be obtained from optimized two-dimensional image data, but the luminance information is processed at a ratio of approximately R: G: B = 3: 5: 2. On the other hand, the gray conversion information is obtained by processing at a ratio of approximately R: G: B = 7: 2: 1.
[0120]
The ratio of R: G: B = 7: 2: 1 for obtaining this gray conversion information is a ratio suitable for the two-dimensional image 200 (see FIG. 3) of the human head. That is, by using the gray conversion information obtained at such a ratio, the correspondence between the face of the two-dimensional image and the face of the three-dimensional shape is improved compared to the case where the luminance information is the height information of the three-dimensional shape data. The unevenness of the three-dimensional face can be made more natural.
[0121]
When the process of step S1608 ends, the process proceeds to step S1610 to perform highlight removal processing on the three-dimensional shape data. This highlight removal process is a process for preventing the formation of steep convex portions in the three-dimensional shape, and an abnormal Z coordinate based on the average value and standard deviation of the height information of the three-dimensional mesh. Remove the value.
[0122]
Specifically, the height information of the three-dimensional shape data, that is, the average value and standard deviation (σ) of the Z coordinate values of the mesh points of the three-dimensional mesh set corresponding to the two-dimensional image data in step S1608. Is calculated.
[0123]
Thereafter, the range of 1σ from the average value is extended to the entire three-dimensional mesh, and the Z coordinate value deviating from the limit value is limited so as to be within the limit value.
[0124]
When the process of step S1610 ends, the process proceeds to step S1612 to perform black and white reversal processing on the three-dimensional shape data. This black-and-white reversal process is a process for preventing an originally raised portion such as hair (that is, dark hair in a two-dimensional image, such as hair) in a three-dimensional shape. The region with a low value is inverted and synthesized with the original three-dimensional shape data.
[0125]
Specifically, the Z coordinate value that the mesh point of the three-dimensional mesh has, that is, the height information of the three-dimensional shape data corresponds to the luminance information of the two-dimensional image data by the processing of step S1608 to step S1610. The following processing is performed.
[0126]
Black and white inversion processing is performed based on a preset luminance (that is, Z coordinate value). Then, the three-dimensional shape data subjected to the black and white reversal processing is compared with the original three-dimensional shape data, and synthesized so as to be composed of data with higher luminance (that is, Z coordinate value).
[0127]
This black and white inversion processing is a portion of the two-dimensional image indicated by the two-dimensional image data excluding the range in which black and white inversion set as the inversion prohibition mask in the above (1-6) inversion prohibition area setting processing is not performed. The region of the three-dimensional mesh corresponding to is targeted. Therefore, in this embodiment, the black and white inversion processing is performed only on the 3D mesh area corresponding to the human head hair 200b, which is a part other than the hatching area shown in FIG. No black-and-white reversal processing is performed on the entire image, that is, the entire three-dimensional mesh.
[0128]
When the process of step S1612 ends, the process proceeds to step S1614, and the background deletion process is performed on the three-dimensional shape data. This background deletion process is a process for making a human object stand out in a three-dimensional shape, and deletes an unnecessary background part.
[0129]
Specifically, in the above-described (1-5) background region setting process, the height information in this region, that is, in this region, is targeted for the region of the three-dimensional mesh corresponding to the portion set as the background mask. The Z coordinate value of the mesh point is set to “0”. Therefore, in this embodiment, the height information of the hatched area shown in FIG. 14, that is, the three-dimensional mesh corresponding to the background of the two-dimensional image is “0”.
[0130]
When the process of step S1614 ends, the process proceeds to step S1616 to perform a nose shape creation process on the three-dimensional shape data. This nose shape creation process is a process for expressing the rising of the nose in a three-dimensional shape, and the nose outline shape 400 (or figure) set by the above-described (1-4) nose outline setting process shown in FIG. 13 is used.
[0131]
Specifically, a region of a three-dimensional mesh corresponding to an internal region of a two-dimensional image surrounded by a quadrangle composed of an upper end point NU, a lower end point ND, a left end point NL, and a right end point NR of the nose outline 400 is set as a processing target. To do.
[0132]
First, in the nose outline 400, the angles and distances of the center point NC and the upper end point NU, the center point NC and the lower end point ND, the center point NC and the left end point NL, and the center point NC and the right end point NR are obtained.
[0133]
Based on the obtained angles and distances between the center point NC, the upper end point NU, the lower end point ND, the left end point NL and the right end point NR, predetermined mesh points of the three-dimensional mesh in the region of the nose outline 400 Pay attention to P, and determine the region to which this mesh point P belongs. That is, the area of the three-dimensional mesh to which the mesh point P belongs includes an area A corresponding to a triangular shape having apexes of the center point NC, the upper end point NU, and the right end point NR, and the center point NC and the right end point NR. An area B corresponding to a triangular shape having three vertices with the lower end point ND, an area C corresponding to a triangular shape having three points including the central point NC, the lower end point ND, and the left end point NL, and a central point It is one of the four areas of an area D corresponding to a triangular shape having three points of NC, the left end point NL, and the upper end point NU.
[0134]
After the region to which the mesh point P belongs is obtained, a straight line R connecting the center point NC and the mesh point P is extended, and an intersection point Q between the straight line R and the opposite side of the center point NC is obtained. At this time, the side connecting two points other than the center point NC among the three vertices of the region to which the mesh point P belongs is set as the opposite side. Specifically, as shown in FIG. 18, when the mesh point P belongs to the area A, the straight line R connecting the center point NC and the mesh point P is extended, and the opposite side of the straight line R and the center point NC is extended. An intersection point Q with the side LR is obtained.
[0135]
After the intersection point Q is obtained in this way, according to the distance L1 between the center point NC and the intersection point Q and the distance L2 between the center point NC and the mesh point P, the following equation 1 The height h is obtained (see FIG. 19). Note that 1/10 of the maximum Z coordinate value of the mesh point of the three-dimensional mesh is H.
[0136]
[Expression 1]
Figure 0004107469
... Formula 1
The height h calculated by Equation 1 (ie, the Z coordinate value) is added to the Z coordinate value of the mesh point P.
[0137]
Further, the same processing is repeated for all mesh points in the three-dimensional mesh region corresponding to the nose outline 400. As a result, the region of the three-dimensional mesh corresponding to the inner region of the two-dimensional image surrounded by the quadrangle composed of the upper end point NU, the lower end point ND, the left end point NL, and the right end point NR of the nose outline 400 is raised. The corresponding shape is obtained (see FIG. 20).
[0138]
When the process of step S1616 ends, the process proceeds to step S1618, and a process for raising a three-dimensional ellipse is performed. This ellipse raising process is a process for expressing the roundness of the entire face in a three-dimensional shape. The ellipse 300 set by the above-described (1-2) three-dimensional area setting process (see FIG. 4C). ) Is used.
[0139]
Specifically, a region of a three-dimensional mesh corresponding to the inner region of the two-dimensional image surrounded by the ellipse 300 is set as a processing target.
[0140]
Then, the Z coordinate values of all the mesh points in the region of the three-dimensional mesh corresponding to the ellipse 300 are obtained assuming an ellipse sphere with the center of the ellipse 300 (a point on the ellipse major axis 300a) as the top. The height information, that is, the Z coordinate value is added.
[0141]
When the process of step S1618 ends, the process proceeds to step S1620, and fillet processing is performed on the three-dimensional shape data. This fillet process is a process for naturally finishing a three-dimensional human face, and rounds the corners of a vertical plane that cannot be found on a human face (see FIGS. 21A and 21B).
[0142]
Specifically, the center T of the funnel-like fillet mesh (see FIG. 22A) is made to coincide with each other for each mesh point of the three-dimensional mesh of the three-dimensional shape data. If the height information (Z coordinate value) of the mesh point of the three-dimensional mesh is higher than the height information of the fillet mesh point of the corresponding fillet mesh, the Z coordinate value of the mesh point of the three-dimensional mesh is The 3D mesh is deformed according to the height information of the fillet mesh.
[0143]
At the start of the fillet processing, the three-dimensional mesh generated by the processing from step S1602 to step S1618 is copied to prepare two three-dimensional meshes, a conversion source three-dimensional mesh and a conversion destination three-dimensional mesh. To do. That is, the height information of the conversion source 3D mesh is copied to the conversion destination 3D mesh, and the conversion source 3D mesh and the conversion destination 3D mesh are the same before the start of the fillet processing.
[0144]
22 to 26, the mesh points of the three-dimensional mesh and the mesh points of the fillet mesh are illustrated in a band shape for easy explanation.
[0145]
The fillet mesh used for the fillet processing has a square bottom surface having the same size in the X-axis direction and the size in the Y-axis direction (see FIG. 22B). When the radius of the fillet mesh is R, the size L in the X-axis direction and the Y-axis direction of the fillet mesh is R × 2 + 1.
[0146]
For each fillet mesh point of such a fillet mesh, a distance r from the center T of the fillet mesh is obtained (see FIGS. 23A and 23B). For a fillet mesh point whose calculated distance r is shorter than the radius R of the fillet mesh, a Z coordinate value Lr calculated by the following equation 2 is set as height information of the fillet mesh point.
[0147]
[Expression 2]
Figure 0004107469
... Formula 2
On the other hand, for the fillet mesh point other than the fillet mesh point whose calculated distance r is shorter than the radius R of the fillet mesh, the Z coordinate value of the maximum value Lmax (for example, 255000) is used as the height information of the fillet mesh point. Set.
[0148]
A fillet mesh composed of fillet mesh points having Z coordinate values set in this way is a funnel-like body as shown in FIG. Then, the center T of the fillet mesh is made to coincide with a predetermined mesh point of the conversion source three-dimensional mesh to obtain the height information baseL of the mesh point of the three-dimensional mesh (see FIG. 24). This height information baseL is equal to the Z coordinate value of the mesh point of the conversion source three-dimensional mesh with which the center T of the fillet mesh coincides.
[0149]
Then, for all fillet mesh points of the fillet mesh, the Z coordinate value mL of the fillet mesh point and the height srcL of the mesh point of the conversion source three-dimensional mesh corresponding to the fillet mesh point of the Z coordinate value mL are obtained ( FIG. 25 (a)).
[0150]
Then, the obtained transformation source three-dimensional mesh height srcL is compared with the transformation source three-dimensional mesh height information baseL, and as a result of the comparison processing, the height srcL is larger than the height information baseL (higher ), The fillet mesh height targetL corresponding to the mesh point of the conversion source 3D mesh to be processed is set to
targetL = (srcL−baseL) × mL / Lmax + baseL (see FIG. 28B).
[0151]
After that, the height target L of the fillet mesh at the mesh point of the conversion source 3D mesh to be processed is compared with the height information of the conversion destination 3D mesh corresponding to the mesh point of the conversion source 3D mesh to be processed If the height targetL is smaller (lower) than the height information of the destination 3D mesh, the height information of the destination 3D mesh, that is, the Z coordinate value of the mesh point of the destination 3D mesh Is replaced with the height targetL (see FIG. 26A).
[0152]
Then, by performing such processing for all fillet mesh points of the fillet mesh, the corners of the vertical plane of the conversion destination three-dimensional mesh become round fillet surfaces (see FIG. 26B).
[0153]
Following the processing of step S1620, in step S1622, isolated region removal processing is performed on the three-dimensional shape data. This isolated region removal processing is processing for preventing the presence of a region isolated in a three-dimensional shape, and deletes an extra mesh point of the three-dimensional shape mesh.
[0154]
For a predetermined mesh point of the mesh point of the three-dimensional mesh of the three-dimensional shape data, the mesh points located in the eight directions around the predetermined mesh point are targeted, and effective data around the mesh point, that is, the predetermined mesh point When the number of mesh points whose Z coordinate value is not “0” is one or less among the eight mesh points positioned around, the Z coordinate value of the mesh point is set to “0”. Such a process is repeated for all mesh points of the three-dimensional mesh.
[0155]
When the isolated region removal processing is thus performed for all the mesh points of the three-dimensional mesh, the processing in step S1622 is terminated, and the three-dimensional shape data generation processing routine is terminated.
[0156]
When the operator selects the preview field 100m on the user setting screen 100 of the display device 20 by the input device 18 including a pointing device or a character input device after the three-dimensional shape data generation processing routine is finished, the three-dimensional shape data is displayed. The three-dimensional shape indicated by the three-dimensional shape data generated by the shape data generation processing routine is displayed in the image area 100a.
[0157]
As described above, the 3D shape data generation method according to the present invention generates 3D shape data from 2D image data, so that a 3D scanner is not necessary, and an object that actually has a 3D shape. It is possible to generate three-dimensional shape data at a low cost without the restriction of measuring.
[0158]
In addition, the method for generating three-dimensional shape data according to the present invention uses the following (I) to (VII) to display three-dimensional shape data indicating a high-quality three-dimensional shape from two-dimensional image data, in particular, a high-quality human being. It is possible to generate three-dimensional shape data indicating the face side of the head.
[0159]
(I) Based on the position of the right eye and the position of the left eye set on the human face 200a of the two-dimensional image 200 indicated by the two-dimensional image data, the above-described (1-4) nasal outline setting process (FIG. 6). The contour shape of the nose portion 200e is set. Based on the set nose outline 400, a predetermined value is added to the Z coordinate values of all mesh points in the region of the three-dimensional mesh corresponding to the nose outline 400 by the nose outline creation process (step S1616). (See FIG. 20). As a result, the rising of the nose is expressed in the three-dimensional shape on the face side of the generated human head.
[0160]
That is, as described in the above-mentioned section “Prior Art”, when the luminance information of the two-dimensional image data is converted as the height information of the three-dimensional shape data, The shape of the nose does not protrude and it does not become unnatural.
[0161]
(II) The two-dimensional image data is optimized by the left-right luminance balance processing (step S1604) of the three-dimensional shape data generation processing routine, and the balance between the luminance of the left region and the right region of the face of the two-dimensional image is corrected. As a result, the balance between the left side and the right side of the generated three-dimensional face can be prevented from being lost.
[0162]
That is, as described in the above-mentioned section “Prior Art”, the human face of the two-dimensional image is irradiated with light from a predetermined direction, and the right side of the human face is compared with the left side, for example. Even when the area is bright, the height on the right side of the human face indicated by the generated three-dimensional shape data is higher than the height on the left side, and two-dimensional image data is acquired. The three-dimensional shape of the human face does not become unnatural due to the effect of lighting.
[0163]
(III) In the gray conversion process (step S1608) of the three-dimensional shape data generation process routine, a ratio suitable for the two-dimensional image 200 (see FIG. 3) on the face side of the human head, specifically about R : G: B = 7: 2: 1 The gray conversion information is obtained from the two-dimensional image data, and the gray conversion information is converted into the height information of the three-dimensional shape data. For this reason, the correspondence between the face of the two-dimensional image and the face of the three-dimensional shape is improved compared to the case where the luminance information is converted into the height information of the three-dimensional shape data. Can be.
[0164]
(IV) In the highlight removal processing (step S1610) of the three-dimensional shape data generation processing routine, based on the average value and standard deviation of the height information of the three-dimensional mesh, Since the Z coordinate value is limited, it is possible to prevent a steep convex portion from being formed in the three-dimensional shape on the face side of the human head indicated by the generated three-dimensional shape data.
[0165]
(V) A range in which black and white inversion is not performed is set by the above (1-6) inversion prohibition area setting process. Then, the black and white reversal process is performed on the part excluding the range where black and white reversal that is set as a reversal prohibition mask is not performed, specifically, only the part of the human head hair 200b (step S1612). Therefore, it is possible to prevent the originally raised portion such as the hair from being depressed.
[0166]
That is, as described in the section of “Prior Art” above, when the eye part of the human face of the two-dimensional image is a dark area such as a black iris color, the entire human face As a result of the black and white reversal processing being performed on the subject, the height of the eye part in the human face indicated by the generated three-dimensional shape data is higher than that around the eye part. In the three-dimensional shape, the part of the eye does not protrude and become unnatural.
[0167]
(VI) The ellipse 300 is set so as to surround the human face 200a of the two-dimensional image 200 by the above-described (1-2) three-dimensional area setting process. Then, since the ellipse raising process (step S1618) is performed on the three-dimensional area that is the inner area of the set ellipse 300, the roundness of the entire face side is expressed in the generated three-dimensional shape.
[0168]
(VII) In the fillet processing (step S1620) of the three-dimensional shape data generation processing routine, the three-dimensional mesh is deformed by the fillet mesh, so that the corners of the vertical surface of the three-dimensional shape are rounded, so that it is impossible for a human face. The vertical surface disappears, and the three-dimensional human face is naturally finished.
[0169]
In addition, when the 3D shape data generated by the 3D shape data generation method according to the present invention is used in, for example, a 3D cutting apparatus, the 3D shape indicated by the 3D shape data is high quality. The three-dimensional shape cut out from the workpiece based on the three-dimensional shape data can be made high quality.
[0170]
The embodiment described above can be modified as described in the following (1) to (5).
[0171]
(1) In the above embodiment, the 3D shape data generated by the 3D shape data generation method according to the present invention is stored in the 3D shape data storage unit 16-2. Of course, the present invention is not limited, and the 3D shape data generated by the 3D shape data generation method according to the present invention may be output to a drive device for 3D cutting, or may be stored in the external storage device 22. Alternatively, the three-dimensional data stored in the external storage device 22 may be used in a CAD system or the like.
[0172]
(2) In the above-described embodiment, the three-dimensional shape data is generated from the color two-dimensional image data. However, the present invention is not limited to this. When generating three-dimensional shape data from image data, the method for generating three-dimensional shape data according to the present invention may be used. If the gray conversion information cannot be obtained in the process of step S1608 depending on the type of the two-dimensional image data, the quality of the three-dimensional shape may be deteriorated. However, the luminance information is used instead of the gray conversion information. You may make it convert into the height information of three-dimensional shape data.
[0173]
(3) In the three-dimensional shape data generation method according to the present invention, the three-dimensional shape indicated by the three-dimensional shape data generated by the three-dimensional shape data generation method according to the present invention is not only a three-dimensional mesh but also a polygon or It can also be applied to curved surfaces.
[0174]
(4) Each process in the stage of the three-dimensional preparation process of the process of generating the three-dimensional shape data according to the present invention, or various processes in the stage of the three-dimensionalization execution process, respectively, May be omitted. For example, at the stage of the three-dimensionalization execution process, the order of the black-and-white reversal process (step S1612) and the background deletion process (step S1614) of the three-dimensional shape data generation process routine may be interchanged, or the background deletion process (Step S1614) may not be performed.
[0175]
(5) You may make it combine the above-mentioned embodiment and the modification shown in said (1) thru | or (4) suitably.
[0176]
【The invention's effect】
Since the present invention is configured as described above, it has an excellent effect that three-dimensional shape data indicating a high-quality three-dimensional shape can be generated at low cost.
[Brief description of the drawings]
FIG. 1 is a block diagram of a three-dimensional shape data generation apparatus that implements an example of an embodiment of a method for generating three-dimensional shape data according to the present invention.
FIG. 2 is an explanatory diagram showing a user setting screen displayed on the screen of the display device.
FIG. 3 is an explanatory diagram schematically showing an example of a two-dimensional image indicated by two-dimensional image data used in a method for generating three-dimensional shape data according to the present invention.
FIG. 4 is an explanatory diagram showing display contents of an image area of a user setting screen during a three-dimensional area setting process of a method for generating three-dimensional shape data according to the present invention, where (a) shows points E1 and E2; It is explanatory drawing which shows the designated state, (b) is explanatory drawing which shows the state by which the ellipse was produced | generated, (c) is explanatory drawing which shows the state by which the ellipse shown in (b) was deform | transformed.
FIG. 5 is an explanatory diagram showing display contents of an image area of a user setting screen during a binocular position setting process of the method for generating three-dimensional shape data according to the present invention, where (a) shows the position of the right eye It is explanatory drawing which shows the state where RE was displayed, (b) is explanatory drawing which shows the state where the point LE which shows the position of the left eye was displayed.
FIG. 6 is an explanatory diagram showing display contents of an image area of a user setting screen during a nasal contour setting process of the method for generating three-dimensional shape data according to the present invention.
FIG. 7 is a flowchart of a nasal outline shape generation processing routine.
FIG. 8 is an explanatory diagram showing generation processing of the upper end point NU of the nose in the generation processing routine for the nose outline.
FIGS. 9A and 9B are explanatory diagrams showing generation processing of the lower end point ND of the nose in the generation processing routine for the nasal outline. FIG.
FIG. 10 is an explanatory diagram showing generation processing of a right end point NR and a left end point NL of a nose outline shape generation processing routine;
FIGS. 11A and 11B are explanatory diagrams showing generation processing of a nose center point NC in a generation processing routine for a nasal contour. FIG.
FIG. 12 is an explanatory diagram showing a nasal contour shape generated by a nasal contour shape generation processing routine;
FIG. 13 is an explanatory diagram showing display contents of an image area of a user setting screen during a nasal contour setting process of the method for generating three-dimensional shape data according to the present invention.
FIG. 14 is an explanatory diagram showing display contents of an image area of a user setting screen at the time of setting a background area in the method for generating three-dimensional shape data according to the present invention.
FIG. 15 is an explanatory diagram showing display contents of an image area of a user setting screen at the time of inversion prohibited area setting processing of the method for generating three-dimensional shape data according to the present invention.
FIG. 16 is a flowchart of a three-dimensional shape data generation processing routine.
FIG. 17 is an explanatory diagram conceptually showing a nose shape creation process of a three-dimensional shape data generation process routine.
FIG. 18 is an explanatory diagram conceptually showing the contents of a nose shape creation process in a three-dimensional shape data generation process routine centered on area A.
FIG. 19 is an explanatory diagram showing the contents corresponding to Equation 1 for obtaining the height h of the mesh point P in the nose shape creation process of the three-dimensional shape data generation process routine.
FIG. 20 is an explanatory diagram illustrating an example of a three-dimensional mesh after a nose shape creation process of a three-dimensional shape data generation process routine;
FIGS. 21A and 21B are explanatory diagrams showing fillet processing of a three-dimensional shape data generation processing routine, and FIG. 21A is an explanatory diagram showing a three-dimensional mesh before fillet processing; ) Is an explanatory view showing a three-dimensional mesh after fillet processing.
FIGS. 22A and 22B are explanatory diagrams showing a fillet mesh used for a fillet process in a three-dimensional shape data generation process routine; FIGS.
FIGS. 23A and 23B are explanatory diagrams showing a fillet mesh used for a fillet process in a three-dimensional shape data generation process routine; FIGS.
FIG. 24 is an explanatory diagram conceptually showing a fillet process of a three-dimensional shape data generation process routine.
FIGS. 25A and 25B are explanatory diagrams conceptually showing fillet processing of a three-dimensional shape data generation processing routine. FIGS.
FIGS. 26A and 26B are explanatory diagrams conceptually showing fillet processing of a three-dimensional shape data generation processing routine. FIGS.
[Explanation of symbols]
10 Central control unit (CPU)
14 Read-only memory (ROM)
16 Random access memory (RAM)
16-1 Two-dimensional image data storage unit
16-2 3D shape data storage
18 Input device
20 Display device
22 External storage device
100 User setting screen
100a Image area
100b Two-dimensional image data column
100c mode selection area
100d Ellipse setting mode field
100e Right eye setting mode field
100f Left eye setting mode field
100g Nose outline setting mode field
100h area setting mode field
100i Background mask field
100j Inversion prohibition mask field
100k 3D start column
100m preview field
200 2D image
200a face
200b hair
200c Left eye region
200d Right eye region
200e Nose area
300 ellipse
300a Ellipse long axis
400, 400 'nose outline shape

Claims (1)

指定手段と、
生成手段と、
反転禁止領域設定手段と、
第1の加算手段と、
補正手段と、
平滑化処理手段と、
グレー変換手段と、
制限手段と、
白黒反転手段と、
形成手段と、
第2の加算手段と、
フィレット処理手段と
を有し、
所定の画素数に応じた画素データから構成される2次元画像データより得られる輝度情報を、XYZ座標系におけるXYZ座標値を有する複数のメッシュ点から構成される3次元形状データのZ座標値により示される高さ情報として用いて、人間の頭部の3次元形状を示す3次元形状データを生成する3次元形状データ生成装置における3次元形状データの生成方法であって、
前記指定手段が前記2次元画像データの示す人間の顔面における眼の部位の位置指定入力を受ける第1のステップと、
前記生成手段が前記第1のステップで指定された眼の部位の位置に基づいて、前記2次元画像データの示す人間の顔面の鼻の部位の領域を生成する第2のステップと、
前記反転禁止領域設定手段が、前記2次元画像データの示す人間の頭部の髪以外の点の指定入力を受けることにより、該髪以外の領域における該指定入力を受けた点の色と同系色の色の領域を、白黒反転を行わない領域として設定する第3のステップと、
前記第1の加算手段が、前記2次元画像データの輝度情報が示す前記第1のステップで指定された眼の部位の所定の周囲の輝度値に対し、該眼の部位からの距離に応じて所定の輝度値を加算し、該加算結果の輝度値を示す輝度情報に前記2次元画像データの輝度情報を変更する第4のステップと、
前記補正手段が前記第1のステップで指定された眼の部位のうち左眼を中心とした所定の左側領域における前記2次元画像データ輝度情報が示す輝度の平均値と右眼を中心とした所定の右側領域における前記2次元画像データ輝度情報が示す輝度の平均値との差分を求め、該差分に基づき顔面の左側領域の輝度情報と右側領域の輝度情報とのバランスを補正して前記2次元画像データの輝度情報を変更する第5のステップと、
前記平滑化処理手段が、前記2次元画像データに対して平滑化処理を行う第6のステップと、
前記グレー変換手段が、前記第4のステップと前記第5のステップと前記第6のステップとで処理された前記2次元画像データの画素データを構成する赤色の成分のデータと、緑色の成分のデータと、青色の成分のデータとを所定の比率で重み付け加算してグレースケール値を取得し、該取得したグレースケール値を前記3次元形状データの高さ情報に変換して該高さ情報を生成する第7のステップと、
前記制限手段が、前記第7のステップで生成された前記3次元形状データの高さ情報が示す高さの平均値と標準偏差とに基づいて、前記第7のステップで生成された前記3次元形状データの高さ情報が示す高さを制限して該高さ情報を変更する第8のステップと、
前記白黒反転手段が、前記第3のステップで設定された白黒反転を行わない領域以外の領域について、前記第8のステップで高さ情報を変更された3次元形状データの白黒反転処理を行い、該白黒反転処理を行った3次元形状データと該白黒反転処理を行わない3次元形状データとを比較し、高さ情報が高い方の3次元形状データを前記人間の頭部の髪に対応する領域の3次元形状データとする第9のステップと、
前記形成手段が、前記第2のステップにおいて生成された前記2次元画像データの示す人間の顔面の鼻の部位の領域について、前記2次元画像データの示す鼻先を頂点とする人間の顔面の鼻の盛り上がりに対応する形状として前記3次元形状データの高さ情報を変更する第10のステップと、
前記第2の加算手段が、前記2次元画像データの示す人間の頭部を含むようにして指定された所定形状の領域に対応する前記3次元形状データの高さ情報が示す高さに、前記所定形状の領域の中央に対応する高さ情報が示す高さが最も高くなるように所定の高さを加算し、前記3次元形状データの高さ情報を該加算した高さを示す高さ情報に変更する第11のステップと、
前記フィレット処理手段が、前記3次元形状データをフィレット処理する第12のステップと
を有することを特徴とする3次元形状データの生成方法。
Designation means;
Generating means;
Reversal prohibition area setting means,
First addition means;
Correction means;
Smoothing processing means;
Gray conversion means,
Limiting means,
Black and white reversal means;
Forming means;
A second adding means;
Fillet processing means,
Luminance information obtained from two-dimensional image data composed of pixel data corresponding to a predetermined number of pixels is represented by Z coordinate values of three-dimensional shape data composed of a plurality of mesh points having XYZ coordinate values in the XYZ coordinate system. A method for generating three-dimensional shape data in a three-dimensional shape data generation device that generates three-dimensional shape data indicating a three-dimensional shape of a human head using the displayed height information,
It said designating means is a first step of receiving an input designating a position in the region of the eye in human facial indicated by the two-dimensional image data,
Said generating means, a second step of generating said first based on the location of the site of the designated eye in step, regions of the region of the nose of a human face indicated by the two-dimensional image data,
The inversion prohibition area setting means receives a designation input of a point other than the hair of the human head indicated by the two-dimensional image data, so that the color similar to the color of the point having received the designation input in the area other than the hair A third step of setting the color area as a region where black and white inversion is not performed;
The first adding means responds to the predetermined peripheral luminance value of the eye part specified in the first step indicated by the luminance information of the two-dimensional image data according to the distance from the eye part. A fourth step of adding a predetermined luminance value and changing the luminance information of the two-dimensional image data to luminance information indicating the luminance value of the addition result;
It said correction means, and centered on the mean value and the right eye luminance indicated by the first brightness information of the two-dimensional image data in a predetermined left region around the left eye of the sites specified eye step The difference between the luminance value indicated by the luminance information of the two-dimensional image data in the predetermined right region is obtained, and the balance between the luminance information of the left region of the face and the luminance information of the right region is corrected based on the difference. A fifth step of changing luminance information of the two-dimensional image data;
A sixth step in which the smoothing processing means performs a smoothing process on the two-dimensional image data;
The gray conversion means includes red component data and green component data constituting the pixel data of the two-dimensional image data processed in the fourth step, the fifth step, and the sixth step. The data and the blue component data are weighted and added at a predetermined ratio to obtain a gray scale value, and the obtained gray scale value is converted into height information of the three-dimensional shape data to obtain the height information. A seventh step of generating;
The three-dimensional generated in the seventh step based on the average value and standard deviation of the height indicated by the height information of the three-dimensional shape data generated in the seventh step. An eighth step of changing the height information by limiting the height indicated by the height information of the shape data;
The black-and-white reversing means performs black-and-white reversal processing of the three-dimensional shape data whose height information has been changed in the eighth step for regions other than the region that is not subjected to black-and-white reversal set in the third step, The three-dimensional shape data that has undergone the black-and-white reversal processing is compared with the three-dimensional shape data that has not undergone the black-and-white reversal processing, and the three-dimensional shape data with higher height information corresponds to the hair of the human head. A ninth step for setting the three-dimensional shape data of the region;
For the region of the nose portion of the human face indicated by the two-dimensional image data generated in the second step, the forming means has a nose of the human face whose apex is the nose tip indicated by the two-dimensional image data. A tenth step of changing the height information of the three-dimensional shape data as a shape corresponding to the swell;
The second adding means has the predetermined shape at a height indicated by height information of the three-dimensional shape data corresponding to an area of the predetermined shape specified so as to include the human head indicated by the two-dimensional image data. A predetermined height is added so that the height indicated by the height information corresponding to the center of the region becomes the highest, and the height information of the three-dimensional shape data is changed to height information indicating the added height. Eleventh steps to:
The method for generating three-dimensional shape data, wherein the fillet processing means includes a twelfth step of performing fillet processing on the three-dimensional shape data.
JP2001262921A 2001-08-31 2001-08-31 Method for generating 3D shape data Expired - Fee Related JP4107469B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001262921A JP4107469B2 (en) 2001-08-31 2001-08-31 Method for generating 3D shape data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001262921A JP4107469B2 (en) 2001-08-31 2001-08-31 Method for generating 3D shape data

Publications (2)

Publication Number Publication Date
JP2003077007A JP2003077007A (en) 2003-03-14
JP4107469B2 true JP4107469B2 (en) 2008-06-25

Family

ID=19089751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001262921A Expired - Fee Related JP4107469B2 (en) 2001-08-31 2001-08-31 Method for generating 3D shape data

Country Status (1)

Country Link
JP (1) JP4107469B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8218903B2 (en) * 2007-04-24 2012-07-10 Sony Computer Entertainment Inc. 3D object scanning using video camera and TV monitor
JP6092602B2 (en) * 2012-12-04 2017-03-08 株式会社安永 Defect inspection apparatus and defect inspection method
CN110610533B (en) * 2019-08-07 2023-06-16 重庆灵翎互娱科技有限公司 Method and equipment for capturing expression based on face three-dimensional grid model

Also Published As

Publication number Publication date
JP2003077007A (en) 2003-03-14

Similar Documents

Publication Publication Date Title
JP3782709B2 (en) Image generation method and apparatus
US6148113A (en) System for stimulating the depth of field of an image in two dimensional space and method of operation
WO2018223561A1 (en) Method and system for virtual makeup
US7265761B2 (en) Multilevel texture processing method for mapping multiple images onto 3D models
JP3124999B1 (en) Rendering method and apparatus, game apparatus, and computer-readable recording medium storing program for calculating data on shadow of object in virtual space
US5568595A (en) Method for generating artificial shadow
US20030222875A1 (en) Method and program for generating a two-dimensional cartoonish picturization of a three-dimensional object
JP2022033344A (en) Oct retina image data rendering method and oct retina image data rendering device
JP2004038933A (en) Method for acquiring distance from 3d-point to 3d-surface using 2d-projected distance image
KR20200042781A (en) 3d model producing method and apparatus
KR20170033758A (en) Device and method to adjust brightness of image
JP4107469B2 (en) Method for generating 3D shape data
JP2011054008A (en) Distorted image correction device and method
JP6776004B2 (en) Image processing equipment, image processing methods and programs
US6744440B1 (en) Image processing apparatus, recording medium, and program
KR20230051418A (en) An intraoral image processing apparatus and an intraoral image processing method
KR100227246B1 (en) Image conversion apparatus
US20040119723A1 (en) Apparatus manipulating two-dimensional image in a three-dimensional space
JP2021081791A (en) Image processing device, image processing method, and program
JP2008084338A (en) Pseudo three-dimensional image forming device, pseudo three-dimensional image forming method and pseudo three-dimensional image forming program
JP7180123B2 (en) Medical image processing apparatus, medical image processing method, program, and data creation method
KR102534778B1 (en) Method and apparatus for obtaining three dimensional data and computer readable medium storing a program for performing the same method
JP2023026595A (en) volume rendering device
KR102195279B1 (en) Method and system for image registering using regional warping
JP6436258B1 (en) Computer program, image processing apparatus, and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071022

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080215

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20080227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080327

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees