[go: up one dir, main page]

JP4056891B2 - Three-dimensional position / attitude detection device, method, program, and recording medium - Google Patents

Three-dimensional position / attitude detection device, method, program, and recording medium Download PDF

Info

Publication number
JP4056891B2
JP4056891B2 JP2003009861A JP2003009861A JP4056891B2 JP 4056891 B2 JP4056891 B2 JP 4056891B2 JP 2003009861 A JP2003009861 A JP 2003009861A JP 2003009861 A JP2003009861 A JP 2003009861A JP 4056891 B2 JP4056891 B2 JP 4056891B2
Authority
JP
Japan
Prior art keywords
posture
image
solid
dimensional position
spherical surface
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 - Lifetime
Application number
JP2003009861A
Other languages
Japanese (ja)
Other versions
JP2005055177A (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.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003009861A priority Critical patent/JP4056891B2/en
Publication of JP2005055177A publication Critical patent/JP2005055177A/en
Application granted granted Critical
Publication of JP4056891B2 publication Critical patent/JP4056891B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明はカメラで撮像した画像から対象物の3次元位置・姿勢を特定するための3次元位置・姿勢検出用立体、方法および装置に関する。
【0002】
【従来の技術】
CAD用デバイスなどでは、3次元の位置と姿勢を入力する装置として、複数のLEDを利用するもの、ボールを利用するものがあった。
【0003】
また、デザインが既知である立体をカメラで撮像し、その画像において、立体の「辺」や「頂点」といった特徴点の位置を基にするか、立体全体の画像のテンプレート(3次元モデル)を用いるなどして、該立体の位置および姿勢を算出していた。
【0004】
【特許文献1】
特許第2730457号
【特許文献2】
特許第2791275号
【特許文献3】
特許第3192779号
【特許文献4】
特許第2564963号
【特許文献5】
特許第3056764号
【0005】
【発明が解決しようとする課題】
複数のLEDを利用するものでは、姿勢に制限があった。また、ボールを利用するものでは、少なくとも3個のボールが必要であり、かつ、位置と姿勢を算出するための計算が複雑であった。さらに、3Dデジタイザなどでは、プローブにリンクが付けられており、自由な動きが妨げられる場合があった。
【0006】
特許第2730457号については、対象物を撮像した画像上での特徴点の見え方のパターンが対象物の位置・姿勢により変化するため、実際には、カメラの位置・姿勢を特定するパラメータの探索空間が非常に広く、また、仮想画像を内部的に作成しながら、画像上での特徴点の位置から対象物の位置・姿勢を同時に求める方式であるため、一般に膨大な計算コストがかかるという欠点がある。
【0007】
特許第2791275号については、変換行列およびその逆行列を予め求めておいてルックアップテーブルとして利用するという方法であるが、画像上での特徴点の位置から対象物の位置・姿勢を同時に求める方法であるため、一般に計算コストがかかり、さらには、対象物の位置・姿勢の基準位置・姿勢からの誤差計測といった意味合いが強く、基準位置・姿勢からのずれが大きな場合にはその計測精度は非常に低いという欠点がある。
【0008】
特許第3192779号については、各色領域の面積および重心位置から対象物の位置・姿勢を算出する過程において、複数の領域の輪郭を求める必要がある。
【0009】
特許第2564963号については、光源を同軸とした光学系を必要とし、また、画像上での特徴点の位置から対象物の位置・姿勢を同時に求める方法であるため、一般に計算コストがかかるという欠点がある。
【0010】
特許第3056764号については、標的の位置検出と識別とを手動で行っており、また、画像上での特徴点の位置から対象物の位置・姿勢を同時に求める方式であるため、一般に計算コストがかかるという欠点がある。
【0013】
本発明目的は、3次元位置・姿勢を検出することが可能な立体の撮像から、該立体の3次元位置・姿勢を少ない計算コストで検出する3次元位置検出方法、装置、プログラム、およびプログラムを記録した記録媒体を提供することにある。
【0016】
【課題を解決するための手段】
本発明では、表面の少なくとも一部分が球面であり、球面上に姿勢により見え方が異なる図形を有する3次元位置・姿勢検出用立体の撮像画像から立体の輪郭画像を得、輪郭画像から立体の3次元位置を算出し、撮像画像と立体の種々の姿勢に対応する立体の全体または部分のテンプレート画像群とを比較することにより立体の姿勢を算出する。
【0017】
この立体は姿勢が変化しても見え方が変化しないため、撮像した画像において、その輪郭である楕円から球の3次元位置を非常に少ない計算コストで算出できる。例えば、2変数方程式のNewton-Raphson法(ニュートン法)による解法を利用する。
【0018】
一方、球表面に設けられたドット(回転対称図形)の画像上での位置を検出し、該球の3次元位置と併せることで、該ドットの3次元位置を非常に少ないコストで算出でき、該球および該ドットの3次元位置から立体の3次元姿勢を算出できる。
【0019】
このように、位置の算出と姿勢の算出とを独立に行っているため、全体の計算コストを非常に低く抑えることができる。
【0020】
また、輪郭を求める際に、複数のエッジポイントを利用できるため、非常に高い精度で輪郭を検出でき、すなわち非常に高い精度で立体の3次元位置を算出できる。
【0021】
さらに、できるだけ小さなサイズのドットを用いることにより、高精度にその位置を検出でき、加えて、立体とドットのサイズが有意に異なるため、高精度に立体の3次元姿勢を算出できる。
【0022】
さらに、球面上に全てが同一ではない色の2個以上の回転対称図形を有する3次元位置・姿勢検出用立体を用い、撮像画像の、回転対称図形の色情報に基づき、姿勢候補の中から正確な姿勢を選択することにより、回転対称図形の近傍に描かれた図形によって姿勢を判別する方法に比べ、計算コストをさらに低減できる。
【0023】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して説明する。
【0024】
第1の実施形態
図1を参照すると、本発明の第1の実施形態の3次元位置・姿勢検出装置は球1とカメラ2と球位置算出部3と球姿勢算出部4で構成されている。
【0025】
球1は表面に散乱面を備え、世界地図(日本地図以外の図示が省略されている)が描かれ、内部に赤外線光源1aを備えた半透明での球である。カメラ2は赤外線のみを通過させる赤外線通過フィルタ2aを備えている。ここで、赤外線光源1aを用いるのは、画像上で球部位を切り出す際に、環境光の影響を極力少なくするためである。また、半透明の散乱面からなる球を用いるのは、画面上で球部位を切り出す際に、球の輪郭を極力鮮明にするためである。赤外線は輪郭線のみ透過しない。球位置算出部3は、画像の二値化処理を行う二値化処理エンジン3aと、画像の楕円部分を検出する楕円検出エンジン3bと、球1の位置(x, y, z)を算出するための非線型連立方程式ソルバ3cを有し、球1の位置(中心)(x, y, z)を算出する。球姿勢検出部4は、球1の種々の姿勢に対応するテンプレート画像群4aと、算出された球1の位置(x, y, z)を元に球1の画像を正規化する正規化相関エンジン4bを有し、正規化された画像をテンプレート画像群4aと比較することにより、球1の姿勢(θ, φ, ψ)を算出する。
【0026】
次に、本装置における球1の位置および姿勢の算出処理を図7により、図2から図6を参照して詳しく説明する。
【0027】
1. 世界地図が描かれた、内部に赤外線光源1aを具備した半透明の散乱面からなる球1を、赤外線通過フィルタ2aを具備したカメラ2で撮影し、画像I0(図2(a))を得、同画像I0の光学的歪みを補正し、補正画像I1(図2(b))を得る(ステップ21)。ここで、図2(a), (b)中の同心円のパターン歪みの方向を説明するためのものである。
【0028】
2. 次に、補正画像I1を二値化処理エンジン3aで二値化処理して、球1の輪郭画像I2(図3)を得る(ステップ22)。エッジ検出を行ってから輪郭を得る方法など、他にも方法はあるが、ここでは、二値化処理を用いる方法を示した。球1の部分の輝度が十分高く、かつそれ以外の部分の輝度が十分に低いため、適当な閾値で画像を二値化することにより、球1の領域だけを抽出することができる。この領域に対して、輪郭追跡法などを適用すると、輪郭を構成する画素の集合が得られる。これらの画素に楕円を最小2乗法でフィットさせる楕円検出エンジン3bにより、楕円のパラメータを算出する。
【0029】
3. 次に、輪郭画像I2上での球1の位置(ξとs)と大きさ(aまたはb、もしくは両方)とから、レンズ中心Cを原点とした、空間における球1の位置(中心)(x, y, z)を算出する(ステップ23、図4)。ここで、レンズ中心Cとはカメラ2をピンホールカメラにモデル化した際のピンホールの位置に一致する。2.で算出した楕円は、位置および幾何学パラメータがわかっているので、例えばNewton-Raphson法などの非線型連立方程式ソルバ3cによりそのパラメータを基に球1の位置(x, y, z)を算出する。
【0030】
4. 次に、既知である、カメラ2の撮像素子平面π1の位置と、レンズ中心Cの位置と、球1の輪郭とレンズ中心Cとによって空間に作られる錐の位置とを元に、平面π1上の画像である補正画像I1からの切り出し画像I3を、この錐の軸に垂直な平面π2上の画像I4に変換する(ステップ24、図5)。
【0031】
5. 最後に、画像I4をテンプレート画像群4aのテンプレート画像と同じ大きさの画像I5に正規化し、予め用意しておいた、球1の様々な姿勢に対応するテンプレート画像群Tnと、正規化された画像I5との比較から、空間における球1の姿勢(θ, φ, ψ)を算出する(ステップ25、図6)。テンプレート画像とのマッチングには正規化相関マッチングなどの手法を使用する。なお、テンプレート画像はとびとびの姿勢なので、正規化された画像I5とテンプレート画像が完全に一致するケースは稀である。そこで、実際には、正規化相関の値が最大となるテンプレート画像の姿勢をもって球1の姿勢とする。
【0032】
図8は本発明の応用例を示している。図8(a)は球を手に把持して利用する場合で、CAD用の位置・姿勢入力デバイスとして利用する場合である。図8(b)は、球をペンシル型のプローブに取り付けて利用する場合で、3Dデジタイザのプローブとして利用する場合である。なお、カメラ、球位置算出部、球姿勢算出部は図示を省略している。
【0033】
なお、本実施形態では、球1として、内部に赤外線光源1aを備えた半透明の球を用い、カメラ2として、赤外線通過フィルタ2aを備えたカメラを用いる例を示したが、球1として、光源を備えない球を用い、カメラ2として、赤外線通過フィルタを備えないカメラを用いても、本発明は同様の効果を奏する。
【0034】
第2の実施形態
図9は本発明の第2の実施形態の3次元位置・姿勢検出用立体と3次元位置・姿勢検出装置を示す図、図10は立体11の画像を示す図である。
【0035】
立体11は、表面の少なくとも一部分が球面であり、立体11の球面には「A」の文字が描かれている。
【0036】
3次元位置・姿勢検出装置13は位置算出部13aと姿勢算出部13bからなる。位置算出部13aは、立体11をカメラ12で撮影して得られた画像(図10(a))に二値化処理を施すことで立体11の輪郭画像(図10(b))を得、その輪郭画像上での立体の輪郭の位置と大きさとから立体11の実空間での位置x, y, zを算出する。姿勢算出部13bは、輪郭画像(図10(b))を基に立体11(図10(a))上での立体部位を切り出し、その画像(図10(c))との図形の種々の姿勢に対応する図形の全体または部分のテンプレート画像群とを比較することにより立体11の姿勢θ, φ, ψを算出する。
【0037】
以下では、全て同一の2個以上の回転対称図形と、これらの回転対称図形と異なる1個以上の互いに異なる図形とを有しており、かつ、これらの回転対称図形が立体球面上の一点を中心とする回転対称の位置に配置されている立体11を用いて、その立体の3次元位置および姿勢を検出する例について詳細に説明する。
【0038】
図11は立体11の例を示している。この立体11では球面に内接する正五角形と正六角形とから構成される準正多角形の3個の頂点が該球面と接する点の位置に全て同じサイズのドットが、また該準多面体の中心と該準多面体の面の重心とを結ぶ直線が該球面と交わる点の位置に1個の文字が、それぞれ設けられている。これらのドットは、サイズを小さくするほど、高精度にその位置検出ができ、また、立体11とのサイズ差が大きくなるため、高精度の立体の3次元姿勢を算出できる。したがって、撮像画像上で識別可能な最小のサイズとすることが望ましい。
【0039】
図12は、レンズの光学中心Cを原点とし、レンズの光軸をZ軸とするカメラ12を基準とする実空間での座標系において、位置(x, y, z)に立体11が置かれている様子を示した図である。立体11は、図11に示したものと同一のデザインである。カメラ12については、第1の実施形態と同様の方法で撮像画像の光学的歪みを補正することにより、レンズ歪み等のない理想的なカメラとして扱うことができる。
【0040】
図13は立体11を撮像した画像を示している。uは画像の水平方向の軸、vは画像の垂直方向の軸である。図において、14は、検出した立体のエッジに楕円をフィットさせて得られた輪郭である。ξは、輪郭の重心と画像原点とを結ぶ直線がu軸となる角である。dは輪郭の重心と画像原点との距離である。bは輪郭楕円の長径である。
【0041】
図14は、撮像画像上でのドットの位置Psと実空間でのドットの位置Pとの幾何的関係を示す図である。図において、点Pは、撮像画像上でのドットの位置Psとレンズの光学中心Cとを結ぶ直線が立体11の球面と交わる点である。
【0042】
図15は、撮像画像上で検出された3個のドットの位置(図15(a))と、これらドットの位置を基にして計算により作成された3枚の文字用テンプレートを示す図(図15(b))である。ここで、ドットが図の位置となるような球の姿勢は3通りに限られる。それら3通りの姿勢の全てについて、例えば以下のような方法でテンプレートを作成する。
【0043】
図16および図17は図形のテンプレートの計算機による作成方法を説明するための図である。図16において、Cvは無限遠に配置してある仮想カメラである。Oは計算機内の仮想空間の原点、Xは水平方向の軸、Yは垂直方向の軸、Zは仮想カメラCvの光軸である。Rは軸Z上の点であり、距離ORは仮想球の半径に等しい。線分OGは線分ORを軸Zから角度Q1だけ回転させた線分である。SvはGを通り線分OGに垂直な仮想平面である。Gを通る直線Tは、軸Yと軸Zとを含む平面上にあり、線分OGに垂直である。角度Q2は仮想平面Svが線分OGを軸として回転した際の、直線Tからの偏角である。なお、図形はその重心がGに一致するように仮想平面Sv上に配置してある。説明のために、図形については輪郭のみを示してある。
【0044】
図17は仮想平面Sv上に配置した図形をXY平面に射影して得られた仮想カメラCvの画像である。GTはGの画像上での位置である。テンプレートは、この仮想カメラCvの画像を図形を含みかつ位置GTを中心とする矩形領域で切り出した部分画像にガウシアンフィルタ等によるぼかし処理を施して作成する。
【0045】
図18は、図11の立体11を撮像した画像から、図9の装置によって、実空間での立体11の位置・姿勢を算出する方法を示すフローチャートである。なお、立体11の球面部の半径は既知であるとする。
1. 第1の実施形態と同様の方法で立体11を撮像した画像の光学的歪みを補正し、補正画像を得る(ステップ31)。
2. 補正画像において、ハフ変換等を用いて球の輪郭である楕円を検出し、図13で示した楕円パラメータ(ξ, d, b)を算出する(ステップ32)。
3. 図12で示した立体11の位置(x, y, z)と図13で示した楕円のパラメータ(ξ, d, b)との間には、球の半径が既知であるため、固定した1対1の対応関係がある。この対応関係を表わす方程式をNewton-Raphson法等を用いて解くことにより、(ξ, d, b)から(x y, z)を算出する(ステップ33)。
4. 補正画像において、1個のドット図形用のテンプレートを用いたパターンマッチング処理により比較し、3個のドットの画像上での位置を各々独立に検出し、図14に示した幾何的関係を用いて3個のドットの実空間での位置を算出する。算出された3個のドットの位置と立体11の位置(x, y, z)とを基に、立体11の姿勢を算出する(ステップ34)。ただし、3個のドットの位置を基にした場合、得られる立体11の姿勢は3通りあるため、それら3通りの姿勢の全てを算出し、これらを立体11の姿勢の候補とする。立体11の姿勢の算出方法は次の通りである。立体11のモデルとして、表面に3個のドットを有する球を考え、図14に示す実空間での各ドットの位置をそれぞれP1、P2、P3とする各ドットは球に固定されているので、球の姿勢が変化すると、各位置P1、P2、P3も変化する。算出された3個のドットの位置Q1、Q2、Q3として、
【0046】
【数1】

Figure 0004056891
【0047】
を最小にする球の姿勢を求め、これを立体11の姿勢とする。ただし、
【0048】
【外1】
Figure 0004056891
【0049】
はそれぞれP1とQ1、P2とQ2、P3とQ3の距離である。
5. 算出された3通りの姿勢の全てについて、図16および図17で説明した方法等により、文字の部分を切り出したテンプレートを3個作成する。ドットの文字との位置関係は既知であり、この関係から補正画像上での文字の位置(重心位置)を求めることができるため、この位置を基準として、これら3個のテンプレートを用いたパターンマッチング処理を逐次行う。得られた各テンプレートと補正画像とのマッチングの程度を比較し、最も評価の高いテンプレートに対応する姿勢を選択し、これを立体11の正確な姿勢とする(ステップ35)。
【0050】
第3の実施形態
本実施形態は、全て同一の2個以上の回転対称図形と、これらの回転対称図形と異なる1個以上の互いに異なる図形とを有しており、かつ、これらの回転対称図形が立体球面上の一点およびその一点を中心とする回転対称の位置の双方に配置されている立体11を用いて、その立体の3次元位置および姿勢を検出する例である。
【0051】
図19は、立体11の球面上に設けられる図形の例である。球面に内接する正二十面体の2個の頂点が該球面と接する点の位置に互いに異なる図形が、該正二十面体の中心と該正二十面体の面の重心とを結ぶ直線が該球面と交わる点の位置に4個のドットが、それぞれ設けられている。これらのドットは、第2の実施形態と同様、撮像画像上で識別可能な最小のサイズとすることが望ましい。図19(a)において図形は「O」と「ハ」に似た図形であり、図19(b)において図形は、「コ」と「ハ」に似た図形である。なお、図では平面的に示してある。
【0052】
本実施形態の立体においても、第2の実施形態と同様の装置により3次元位置・姿勢を検出することができる。本実施形態によれば、文字の代わりに単純な図形を用いているため、さらなる計算コストの低減、処理の高速化が図れる。
【0053】
なお、第2および第3の実施形態においても、第1の実施形態と同様に、立体11として、内部に赤外線光源を備えた半透明の立体を用い、カメラ12として、赤外線通過フィルタを備える等の方法により赤外線像を撮像可能なカメラを用いてもよい。こうすることにより、撮像画像上で立体11の部位を切り出す際に、環境光の影響を少なくし、立体11の輪郭を鮮明にすることができる。
【0054】
また、第2および第3の実施形態では、立体11の球面に内接する正多面体もしくは準正多面体の頂点の位置に3ないし4個の同じサイズのドットを設け、該多面体の中心と該多面体の面の重心とを結ぶ直線が球面と交わる点の位置に1ないし2個の互いに異なる図形を設けた例、および、ドットと互いに異なる図形との位置関係をこれとは逆にした例を示した。しかし、これらのドットの代わりに円など他の回転対称図形を用いてもよく、また、これら回転対称図形のサイズは必ずしも全て同じでなくてもよく、個数は5個以上であっても、画像上に撮像されていれば2個だけであってもよい。さらに、回転対称図形と互いに異なる図形との位置関係は、既知であれば、必ずしも上記実施形態で示した関係でなくてもよい。
【0055】
第4の実施形態
第2および第3の実施形態では、検出された各ドット、すなわち回転対称図形をそれらの近傍に描かれた文字等の図形を基にして識別する。しかし、文字等の図形の判別には、テンプレートを用いたパターンマッチング処理など、計算コストのかかる処理が不可欠である。そこで、本実施形態では、検出された各回転対称図形をその色に基づき識別する。この処理には、パターンマッチング処理に比べ、計算コストがかからないという利点がある。
【0056】
図20は本発明の第4の実施形態における3次元位置・姿勢検出用立体と3次元位置・姿勢検出装置を示す図である。
【0057】
立体41は、表面の少なくとも一部分が球面であり、立体41の球面には全てが同一ではない色の回転対称図形(ドット)が複数個描かれている。
【0058】
3次元位置・姿勢検出装置43では、カメラ42で撮像された立体41のカラー画像を入力し、この撮像画像を輝度情報のみによるモノクロ画像と色情報まで含めたカラー画像とに分離した上でそれぞれを使い分ける。すなわち、位置算出部43aでは、モノクロ画像を用いて、第2の実施形態と同様の方法で立体41の実空間での位置x, y, zを算出する。また、姿勢算出部43bでは、まずモノクロ画像を用いて、回転対称図形の位置を検出し、次にカラー画像を用いて、回転対称図形を特定することにより、立体41の姿勢θ, φ, ψを算出する。
【0059】
以下では、全て同一形状かつ同一サイズであり、かつ全てが同一ではない色の2個以上の回転対称図形が、球面上の一点およびその一点を中心とする回転対称の位置の双方に配置されている立体41を用いて、立体41の3次元位置および姿勢を検出する例について詳細に説明する。
【0060】
図21は立体41の例を示している。立体41の表面の色は橙であり、その球面上の一点に黒のドットが、その黒のドットを中心とする回転対称の3つの位置にそれぞれ赤、緑、青のドットが設けられている。これらのドットは、第2の実施形態と同様、撮像画像上でその色までが識別可能な最小のサイズとすることが望ましい。
【0061】
図22は、入力された撮像画像を輝度情報のみのモノクロチャネル、および赤、緑、青の色情報まで含めた各カラーチャネルに分離した撮像画像である。
【0062】
図23は、図22(a)のモノクロチャネルにおける撮像画像上で検出された4個のドットの位置P1〜P4および球の輪郭である楕円の中心の位置を表わしている。
【0063】
図24は、検出されたドットの画像上での位置の色相を各カラーチャネルにおける撮像画像に基づき決定する方法を示すフローチャートである。
【0064】
まず、球の輪郭である楕円の中心に最も近い2点をP1, P2とする(ステップ51)。楕円の中心に近い点を用いるのは計測の精度が高くなるためである。次に、各カラーチャネル画像(図22)の点P1, P2における輝度をそれぞれ(R1, G1, B1)、(R2, G2, B2)とする(ステップ52)。次に、色相の判定のため閾値MT
Figure 0004056891
により計算する(ステップ53)。R1, G1, B1 のうちMTより大きいな値が1つもなければ、点P1の色は黒と判定する(ステップ54、55)。R1, G1,B1のうちMTより大きな値が1個以上であれば点P1の色はR,G,BのうちMTより大きな値に対応する色と判定する(ステップ56)。点P2についても同様にして色相を判定する(ステップ57〜59)。
【0065】
なお、立体41上の図形とその位置関係は既知であるため、本実施形態では、姿勢を決定するために必要な2個の点位置が、図24の処理により求められるP1、P2の色相情報から決定されるため、残りの2つのドットについての図24と同様の処理は不要である。
【0066】
図25は、図21の立体41を撮像した画像から、図20の装置によって、実空間での立体41の位置・姿勢を算出する方法を示すフローチャートである。なお、立体41の球面部の半径は既知であるとする。
1. 第1の実施形態と同様の方法で立体41を撮像した画像の光学的歪みを補正し、補正画像を得る(ステップ61)。
2. 補正画像を図22で示したモノクロチャネルと各カラーチャネルに分離する(ステップ62)。
3. モノクロチャネルにおける補正画像(モノクロ画像)を用いて、第2の実施形態と同様の方法で立体41の位置(x, y, z)を算出する(ステップ63)。
4. モノクロ画像を用いて、第2の実施形態と同様の方法で全てのドットの画像上での位置を算出する(ステップ64)。
5. 各カラーチャネルにおける補正画像を用いて、図24の手順によりドットの画像上での位置の色相を決定し、対応するドットを特定する(ステップ65)。
6. 第2の実施形態と同様の方法で、特定されたドットの実空間での位置およびこれに基づく立体41の姿勢(θ, φ, ψ)を算出する(ステップ66)。
【0067】
本実施形態においても、ドットの代わりに他の回転対称図形を用いてもよく、また、これら回転対称図形のサイズは必ずしも全て同じでなくてもよく、個数は2個以上が画像上に撮像されていれば幾つであってもよい。
【0068】
なお、以上説明した3次元位置・姿勢検出装置は専用のハードウェアにより実現されるもの以外に、以上説明した方法を実行するためのプログラムを、コンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行するものであってもよい。コンピュータ読み取り可能な記録媒体とは、フレキシブルディスク、光磁気ディスク、CD―ROM等の記録媒体、コンピュータシステムに内蔵されるハードディスク装置等の記憶装置を指す。さらに、コンピュータ読み取り可能な記録媒体は、インターネットを介してプログラムを送信する場合のように、短時間の間、動的にプログラムを保持するもの(伝送媒体もしくは伝送波)、その場合のサーバとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含む。
【0069】
【発明の効果】
以上説明したように本発明によれば、下記の効果がある。
・球がどのような姿勢にあっても、画像上の球の模様から空間におけるその姿勢を算出できるため、位置の算出と姿勢の算出を分離でき、その結果計算が簡易となる。
・球を用いて位置と姿勢とを独立に算出するため、計算コストを低減できる。
・ドットの位置に基づき立体の姿勢の候補を算出するため、計算コストを大幅に低減できる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態の3次元位置・姿勢検出装置の構成図である。
【図2】球1を撮影した画像と(図2(a)) その補正画像を(図2(b))示す図である。
【図3】球1の輪郭画像を示す図である。
【図4】空間における球1の位置を算出する処理の説明図である。
【図5】空間における球1の姿勢を算出する処理の説明図である。
【図6】正規化画像I5とテンプレート画像群Tnとの比較を示す図である。
【図7】第1の実施形態における、3次元位置・姿勢を検出する処理を示すフローチャートである。
【図8】本発明の応用例を示す図である。
【図9】本発明の第2の実施形態の3次元位置・姿勢検出装置の構成図である。
【図10】図9中のカメラ12で得られた画像(同図(a))、3次元位置・姿勢検出装置で得られる画像(同図(b), (c))を示す図である。
【図11】立体11の例を示す図である。
【図12】カメラ12を基準とする実空間での座標系において立体11が置かれている様子を示す図である。
【図13】立体11を撮像した画像を示す図である。
【図14】撮像画像上でのドットの位置Pと実空間でのドットの位置Pとの幾何学的関係を示す図である。
【図15】撮像画像上で検出された3個のドットの位置と、これらドットの位置により作成された3枚の文字用のテンプレートを示す図である。
【図16】計算機を用いた、図形テンプレートの作成方法を説明するための図である。
【図17】計算機で算出された、仮想カメラの画像を示す図である。
【図18】第2の実施形態における、立体11の位置・姿勢を算出する処理を示すフローチャートである。
【図19】立体11の球面上に設けられる図形の例を示す図である。
【図20】本発明の第4の実施形態の3次元位置・姿勢検出用立体と3次元位置・姿勢検出装置の構成を示す図である。
【図21】立体41の例を示す図である。
【図22】モノクロチャネルおよび各カラーチャネルにおける立体41の撮像画像を示す図である。
【図23】モノクロチャネルにおける撮像画像上で検出された立体41のドットの位置を示す図である。
【図24】ドットの画像上での位置の色相をカラー画像に基づき決定する方法を示すフローチャートである。
【図25】図21の立体41を撮像した画像から、図20の3次元位置・姿勢検出装置によって、実空間での立体41の位置・姿勢を算出する方法を示すフローチャートである。
【符号の説明】
1 球
1a 赤外線光源
2 カメラ
2a 赤外線透過フィルタ
3 球位置算出部
3a 二値化処理エンジン
3b 楕円検出エンジン
3c 非線型連立方程式ソルバ
4 球姿勢算出部
4a テンプレート画像群
4b 正規化相関エンジン
11 立体
12 カメラ
13 3次元位置・姿勢検出装置
13a 位置算出部
13b 姿勢算出部
14 輪郭
21〜25、31〜35 ステップ
41 立体
42 カメラ
43 3次元位置・姿勢検出装置
43a 位置算出部
43b 姿勢算出部
51〜59、61〜66 ステップ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a three-dimensional position / posture detection solid, method, and apparatus for specifying a three-dimensional position / posture of an object from an image captured by a camera.
[0002]
[Prior art]
Some CAD devices, for example, use a plurality of LEDs and use a ball as a device for inputting a three-dimensional position and orientation.
[0003]
Also, a solid with a known design is imaged with a camera, and based on the positions of feature points such as “sides” and “vertices” of the solid in the image, or a template (three-dimensional model) of the entire solid is created. For example, the position and orientation of the solid were calculated.
[0004]
[Patent Document 1]
Japanese Patent No. 2730457
[Patent Document 2]
Japanese Patent No. 2791275
[Patent Document 3]
Japanese Patent No. 3192779
[Patent Document 4]
Japanese Patent No. 2564963
[Patent Document 5]
Japanese Patent No. 3056764
[0005]
[Problems to be solved by the invention]
In the case of using a plurality of LEDs, the posture is limited. Further, in the case of using a ball, at least three balls are required, and the calculation for calculating the position and orientation is complicated. Furthermore, in a 3D digitizer or the like, a link is attached to the probe, and free movement may be prevented.
[0006]
With regard to Japanese Patent No. 2730457, the pattern of how feature points appear on an image obtained by capturing an object changes depending on the position and orientation of the object, so in fact, a search for parameters that specify the position and orientation of the camera is performed. It is a method that requires a huge calculation cost because it is a method that obtains the position and orientation of an object at the same time from the positions of feature points on the image while creating a virtual image internally, while the space is very large. There is.
[0007]
Japanese Patent No. 2791275 is a method in which a transformation matrix and its inverse matrix are obtained in advance and used as a lookup table, but a method for simultaneously obtaining the position and orientation of an object from the positions of feature points on an image. Therefore, it generally requires a calculation cost, and further, it has a strong meaning such as error measurement from the reference position / posture of the position / posture of the object, and if the deviation from the reference position / posture is large, the measurement accuracy is very high Has the disadvantage of being low.
[0008]
In Japanese Patent No. 3192777, it is necessary to obtain outlines of a plurality of regions in the process of calculating the position / posture of an object from the area and the center of gravity position of each color region.
[0009]
Japanese Patent No. 2564963 requires an optical system with a coaxial light source, and is a method of obtaining the position and orientation of an object at the same time from the positions of feature points on an image, so that it generally requires a calculation cost. There is.
[0010]
Patent No. 3056764 is a method in which target position detection and identification are manually performed, and the position / posture of an object is simultaneously obtained from the position of a feature point on an image. There is a disadvantage that it takes.
[0013]
  The present inventionofMy goal is,3D position / posture can be detectedAn object of the present invention is to provide a three-dimensional position detection method, apparatus, program, and recording medium on which a program is recorded, which detects a three-dimensional position and orientation of the three-dimensional object from a three-dimensional image with low calculation cost.
[0016]
[Means for Solving the Problems]
  Main departureIn the lightIs a three-dimensional position image obtained from a three-dimensional position / posture detection three-dimensional image having at least a part of a spherical surface and a figure that differs in appearance depending on the posture on the spherical surface. And the solid posture is calculated by comparing the captured image with a template image group of the whole or a part of the solid corresponding to various postures of the solid.
[0017]
Since the appearance of this solid does not change even if the posture changes, it is possible to calculate the three-dimensional position of the sphere from the ellipse that is the outline in the captured image with very little calculation cost. For example, a solution using the Newton-Raphson method (Newton method) of a two-variable equation is used.
[0018]
On the other hand, by detecting the position of the dot (rotationally symmetric figure) provided on the sphere surface on the image and combining it with the three-dimensional position of the sphere, the three-dimensional position of the dot can be calculated at a very low cost, A three-dimensional posture of a solid can be calculated from the three-dimensional positions of the sphere and the dot.
[0019]
Thus, since the calculation of the position and the calculation of the posture are performed independently, the overall calculation cost can be kept very low.
[0020]
In addition, since a plurality of edge points can be used when obtaining the contour, the contour can be detected with very high accuracy, that is, the three-dimensional position of the solid can be calculated with very high accuracy.
[0021]
Furthermore, by using dots of the smallest possible size, the position can be detected with high accuracy. In addition, since the size of the solid and the dot are significantly different, the three-dimensional posture of the solid can be calculated with high accuracy.
[0022]
Furthermore, using a three-dimensional position / posture detection solid having two or more rotationally symmetric figures of colors that are not all the same on the spherical surface, based on the color information of the rotationally symmetric figure of the captured image, from among the posture candidates By selecting an accurate posture, the calculation cost can be further reduced as compared with the method of determining the posture based on the graphic drawn in the vicinity of the rotationally symmetric graphic.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings.
[0024]
First embodiment
Referring to FIG. 1, the three-dimensional position / posture detection apparatus according to the first embodiment of the present invention includes a sphere 1, a camera 2, a sphere position calculation unit 3, and a sphere posture calculation unit 4.
[0025]
The sphere 1 is a translucent sphere having a scattering surface on its surface, a world map (not shown except for the Japanese map), and an infrared light source 1a inside. The camera 2 includes an infrared pass filter 2a that passes only infrared rays. Here, the reason why the infrared light source 1a is used is to reduce the influence of ambient light as much as possible when a spherical part is cut out on the image. The reason why a sphere having a translucent scattering surface is used is to make the outline of the sphere as clear as possible when the sphere portion is cut out on the screen. Infrared rays do not transmit only the outline. The sphere position calculation unit 3 calculates a binarization processing engine 3a that performs binarization processing of the image, an ellipse detection engine 3b that detects an elliptical portion of the image, and the position (x, y, z) of the sphere 1. And the position (center) (x, y, z) of the sphere 1 is calculated. The sphere attitude detection unit 4 normalizes the image of the sphere 1 based on the template image group 4a corresponding to various attitudes of the sphere 1 and the calculated position (x, y, z) of the sphere 1. By having the engine 4b and comparing the normalized image with the template image group 4a, the attitude (θ, φ, ψ) of the sphere 1 is calculated.
[0026]
Next, the calculation process of the position and orientation of the sphere 1 in this apparatus will be described in detail with reference to FIG. 7 and with reference to FIGS.
[0027]
1. A sphere 1 composed of a translucent scattering surface with an infrared light source 1a inside, on which a world map is drawn, is photographed with a camera 2 having an infrared transmission filter 2a, and an image I is taken.0(Fig. 2 (a))0Corrects the optical distortion of the corrected image I1(FIG. 2B) is obtained (step 21). Here, the direction of the pattern distortion of the concentric circles in FIGS. 2A and 2B will be described.
[0028]
2. Next, corrected image I1Is binarized by the binarization processing engine 3a, and the contour image I of the sphere 1 is2(FIG. 3) is obtained (step 22). Although there are other methods such as a method of obtaining an outline after performing edge detection, a method using a binarization process is shown here. Since the luminance of the portion of the sphere 1 is sufficiently high and the luminance of the other portions is sufficiently low, only the region of the sphere 1 can be extracted by binarizing the image with an appropriate threshold value. When a contour tracking method or the like is applied to this region, a set of pixels constituting the contour can be obtained. Ellipse parameters are calculated by an ellipse detection engine 3b that fits ellipses to these pixels by the least square method.
[0029]
3. Next, contour image I2From the position (ξ and s) of the sphere 1 and the size (a, b, or both), the position (center) of the sphere 1 in space with the lens center C as the origin (x, y, z) Is calculated (step 23, FIG. 4). Here, the lens center C corresponds to the position of the pinhole when the camera 2 is modeled as a pinhole camera. Since the ellipse calculated in 2. has a known position and geometric parameters, the position (x, y, z) of the sphere 1 is determined based on the parameters by a nonlinear simultaneous equation solver 3c such as Newton-Raphson method. calculate.
[0030]
4. Next, the known imaging element plane π of the camera 21, The position of the lens center C, and the position of the cone formed in the space by the contour of the sphere 1 and the lens center C, the plane π1Corrected image I which is the upper image1Cut out image IThreeA plane π perpendicular to the axis of this cone2Image I aboveFour(Step 24, FIG. 5).
[0031]
5. Finally, image IFourIs an image I having the same size as the template image of the template image group 4a.FiveA template image group T corresponding to various postures of the sphere 1 prepared in advance and prepared in advance.nAnd the normalized image IFiveFrom the comparison, the posture (θ, φ, ψ) of the sphere 1 in the space is calculated (step 25, FIG. 6). For matching with the template image, a method such as normalized correlation matching is used. Note that the template image is a discrete posture, so normalized image IFiveThere are rare cases where the template image completely matches. Therefore, in practice, the posture of the sphere 1 is set to the posture of the template image having the maximum normalized correlation value.
[0032]
FIG. 8 shows an application example of the present invention. FIG. 8A shows a case where a sphere is held and used as a CAD position / posture input device. FIG. 8B shows a case where a sphere is used by being attached to a pencil type probe, and is used as a probe of a 3D digitizer. In addition, a camera, a sphere position calculation unit, and a sphere posture calculation unit are not illustrated.
[0033]
In the present embodiment, an example in which a translucent sphere provided with an infrared light source 1a is used as the sphere 1 and a camera provided with an infrared transmission filter 2a is used as the camera 2 is described. Even when a sphere that does not include a light source is used and a camera that does not include an infrared transmission filter is used as the camera 2, the present invention has the same effect.
[0034]
Second embodiment
FIG. 9 is a diagram showing a three-dimensional position / posture detection solid and a three-dimensional position / posture detection apparatus according to the second embodiment of the present invention, and FIG. 10 is a diagram showing a solid 11 image.
[0035]
The solid 11 has at least a part of a spherical surface, and a letter “A” is drawn on the spherical surface of the solid 11.
[0036]
The three-dimensional position / attitude detection device 13 includes a position calculation unit 13a and an attitude calculation unit 13b. The position calculation unit 13a obtains a contour image (FIG. 10 (b)) of the solid 11 by performing binarization processing on the image (FIG. 10 (a)) obtained by photographing the solid 11 with the camera 12. The position x, y, z in the real space of the solid 11 is calculated from the position and size of the contour of the solid on the contour image. The posture calculation unit 13b cuts out a three-dimensional part on the solid 11 (FIG. 10 (a)) based on the contour image (FIG. 10 (b)), and various figures of the figure with the image (FIG. 10 (c)). The posture θ, φ, ψ of the solid 11 is calculated by comparing the template image group of the whole or part of the figure corresponding to the posture.
[0037]
In the following, there are two or more rotationally symmetric figures that are all the same, and one or more different figures that are different from these rotationally symmetric figures, and these rotationally symmetric figures represent one point on the solid spherical surface. An example of detecting the three-dimensional position and orientation of the solid using the solid 11 arranged at the rotationally symmetric position as the center will be described in detail.
[0038]
FIG. 11 shows an example of the solid 11. In this solid 11, a dot of the same size is located at the point where three vertices of a quasi-regular polygon composed of a regular pentagon and a regular hexagon inscribed in the sphere contact the sphere, and the center of the quasi-polyhedron One character is provided at each point where a straight line connecting the center of gravity of the surface of the quasi-polyhedron intersects the spherical surface. The position of these dots can be detected with high accuracy as the size is reduced, and the size difference from the solid 11 becomes large, so that the three-dimensional posture of the solid with high accuracy can be calculated. Therefore, it is desirable that the minimum size be identifiable on the captured image.
[0039]
In FIG. 12, a solid 11 is placed at a position (x, y, z) in a coordinate system in a real space with the optical center C of the lens as the origin and the optical axis of the lens as the Z axis in the camera 12 as a reference. FIG. The solid 11 has the same design as that shown in FIG. The camera 12 can be handled as an ideal camera with no lens distortion or the like by correcting the optical distortion of the captured image in the same manner as in the first embodiment.
[0040]
FIG. 13 shows an image obtained by capturing the solid 11. u is the horizontal axis of the image, and v is the vertical axis of the image. In the figure, reference numeral 14 denotes a contour obtained by fitting an ellipse to the detected solid edge. ξ is an angle at which a straight line connecting the center of gravity of the contour and the image origin is the u axis. d is the distance between the center of gravity of the contour and the image origin. b is the major axis of the contour ellipse.
[0041]
FIG. 14 is a diagram illustrating a geometric relationship between the dot position Ps on the captured image and the dot position P in the real space. In the figure, a point P is a point where a straight line connecting the dot position Ps on the captured image and the optical center C of the lens intersects the spherical surface of the solid 11.
[0042]
FIG. 15 is a diagram showing the positions of three dots detected in the captured image (FIG. 15A) and three character templates created by calculation based on the positions of these dots (FIG. 15). 15 (b)). Here, the posture of the sphere such that the dot is positioned in the figure is limited to three. For all of these three postures, templates are created by the following method, for example.
[0043]
16 and 17 are diagrams for explaining a method of creating a graphic template by a computer. In FIG. 16, Cv is a virtual camera arranged at infinity. O is the origin of the virtual space in the computer, X is the horizontal axis, Y is the vertical axis, and Z is the optical axis of the virtual camera Cv. R is a point on the axis Z, and the distance OR is equal to the radius of the phantom sphere. Line segment OG is an angle Q from line Z to line segment OR1Is a line segment rotated only by Sv is a virtual plane passing through G and perpendicular to the line segment OG. A straight line T passing through G is on a plane including the axis Y and the axis Z, and is perpendicular to the line segment OG. Angle Q2Is a declination from the straight line T when the virtual plane Sv rotates about the line segment OG. The figure is arranged on the virtual plane Sv so that its center of gravity coincides with G. For illustration purposes, only the outline is shown for the graphic.
[0044]
FIG. 17 is an image of the virtual camera Cv obtained by projecting a figure arranged on the virtual plane Sv onto the XY plane. GTIs the position of G on the image. The template includes an image of the virtual camera Cv and a position GTA partial image cut out in a rectangular area centered on is subjected to blurring processing using a Gaussian filter or the like.
[0045]
FIG. 18 is a flowchart illustrating a method for calculating the position / posture of the solid 11 in real space from the image obtained by capturing the solid 11 of FIG. 11 using the apparatus of FIG. It is assumed that the radius of the spherical portion of the solid 11 is known.
1. The optical distortion of the image obtained by imaging the solid 11 is corrected by the same method as in the first embodiment to obtain a corrected image (step 31).
2. In the corrected image, an ellipse that is the outline of a sphere is detected using Hough transform or the like, and the ellipse parameters (ξ, d, b) shown in FIG. 13 are calculated (step 32).
3. Since the radius of the sphere is known between the position (x, y, z) of the solid 11 shown in FIG. 12 and the ellipse parameters (ξ, d, b) shown in FIG. There is a one-to-one correspondence. By solving an equation representing this correspondence using the Newton-Raphson method or the like, (xy, z) is calculated from (ξ, d, b) (step 33).
4. In the corrected image, comparison is made by pattern matching using a template for one dot figure, and the positions of the three dots on the image are detected independently, and the geometric relationship shown in FIG. To calculate the position of the three dots in real space. Based on the calculated positions of the three dots and the position (x, y, z) of the solid 11, the posture of the solid 11 is calculated (step 34). However, when the positions of the three dots are used, there are three postures of the solid 11 to be obtained. Therefore, all of the three postures are calculated and set as candidates for the posture of the solid 11. The calculation method of the posture of the solid 11 is as follows. As a model of the solid 11, a sphere having three dots on the surface is considered, and each dot having a position P1, P2, and P3 in the real space shown in FIG. 14 is fixed to the sphere. When the attitude of the sphere changes, the positions P1, P2, and P3 also change. As the calculated positions Q1, Q2, and Q3 of the three dots,
[0046]
[Expression 1]
Figure 0004056891
[0047]
Is determined as the attitude of the solid 11. However,
[0048]
[Outside 1]
Figure 0004056891
[0049]
Are distances between P1 and Q1, P2 and Q2, and P3 and Q3, respectively.
5. For all three calculated postures, three templates are created by cutting out the character portion by the method described with reference to FIGS. Since the positional relationship between the dot and the character is known, the position of the character (the center of gravity position) on the corrected image can be obtained from this relationship. Therefore, pattern matching using these three templates based on this position. Processing is performed sequentially. The degree of matching between the obtained templates and the corrected image is compared, and the posture corresponding to the template with the highest evaluation is selected, and this is set as the accurate posture of the solid 11 (step 35).
[0050]
Third embodiment
This embodiment has two or more rotationally symmetric figures that are all the same, and one or more different figures that are different from these rotationally symmetric figures, and these rotationally symmetric figures are on a three-dimensional spherical surface. This is an example of detecting the three-dimensional position and posture of a solid using the solid 11 arranged at both the point and a rotationally symmetric position around the point.
[0051]
FIG. 19 is an example of a figure provided on the spherical surface of the solid 11. Different figures at the positions of the two vertices of the regular icosahedron inscribed in the spherical surface touch the spherical surface, and a straight line connecting the center of the regular icosahedron and the center of gravity of the surface of the regular icosahedron Four dots are respectively provided at the positions of the points that intersect the spherical surface. As in the second embodiment, it is desirable that these dots have a minimum size that can be identified on the captured image. In FIG. 19A, the figure is a figure similar to “O” and “C”, and in FIG. 19B, the figure is a figure similar to “K” and “C”. In the figure, it is shown in a plan view.
[0052]
Also in the solid according to the present embodiment, the three-dimensional position / orientation can be detected by the same device as in the second embodiment. According to this embodiment, since simple figures are used instead of characters, the calculation cost can be further reduced and the processing speed can be increased.
[0053]
Also in the second and third embodiments, as in the first embodiment, a semi-transparent solid having an infrared light source inside is used as the solid 11, and an infrared pass filter is provided as the camera 12. You may use the camera which can image an infrared image by the method of this. By doing so, when the part of the solid 11 is cut out on the captured image, the influence of ambient light can be reduced and the outline of the solid 11 can be made clear.
[0054]
In the second and third embodiments, three to four dots of the same size are provided at the positions of the vertices of a regular polyhedron or a quasi-regular polyhedron inscribed in the spherical surface of the solid 11, and the center of the polyhedron and the polyhedron of the polyhedron are provided. An example in which one or two different graphics are provided at the position where the straight line connecting the center of gravity of the surface intersects the spherical surface, and an example in which the positional relationship between the dots and the different graphics is reversed are shown. . However, other rotationally symmetric figures such as circles may be used in place of these dots, and the sizes of these rotationally symmetric figures are not necessarily the same. If two images are captured above, only two may be used. Furthermore, the positional relationship between the rotationally symmetric graphic and the graphic different from each other is not necessarily the relationship shown in the above embodiment as long as it is known.
[0055]
Fourth embodiment
In the second and third embodiments, each detected dot, that is, a rotationally symmetric figure is identified based on a figure such as a character drawn in the vicinity thereof. However, in order to discriminate figures such as characters, processing that requires calculation costs such as pattern matching processing using a template is indispensable. Therefore, in the present embodiment, each detected rotationally symmetric figure is identified based on its color. This process has an advantage that it does not require a calculation cost compared to the pattern matching process.
[0056]
FIG. 20 is a diagram showing a three-dimensional position / posture detection solid and a three-dimensional position / posture detection apparatus according to the fourth embodiment of the present invention.
[0057]
The solid 41 has a spherical surface at least partially, and a plurality of rotationally symmetric figures (dots) having colors that are not all the same are drawn on the spherical surface of the solid 41.
[0058]
The three-dimensional position / orientation detection device 43 receives a color image of the solid 41 captured by the camera 42, separates the captured image into a monochrome image using only luminance information and a color image including even color information. Use properly. That is, the position calculation unit 43a calculates the positions x, y, and z in the real space of the solid 41 using a monochrome image by the same method as in the second embodiment. In the posture calculation unit 43b, first, the position of the rotationally symmetric figure is detected using the monochrome image, and then the rotationally symmetric figure is specified using the color image, whereby the posture θ, φ, ψ of the solid 41 is determined. Is calculated.
[0059]
In the following, two or more rotationally symmetric figures of the same shape and the same size, but not all the same color, are arranged at both a point on the spherical surface and a rotationally symmetric position around that point. An example of detecting the three-dimensional position and orientation of the solid 41 using the solid 41 will be described in detail.
[0060]
FIG. 21 shows an example of the solid 41. The surface color of the solid 41 is orange, and a black dot is provided at one point on the spherical surface, and red, green, and blue dots are provided at three rotationally symmetric positions around the black dot. . As in the second embodiment, it is desirable that these dots have a minimum size that allows identification of the color on the captured image.
[0061]
FIG. 22 shows captured images obtained by separating the input captured image into monochrome channels with only luminance information and color channels including red, green, and blue color information.
[0062]
FIG. 23 shows the positions P of the four dots detected on the captured image in the monochrome channel of FIG.1~ PFourAnd the position of the center of the ellipse that is the outline of the sphere.
[0063]
FIG. 24 is a flowchart illustrating a method of determining the hue of the position of the detected dot on the image based on the captured image in each color channel.
[0064]
First, the two points closest to the center of the ellipse that is the outline of the sphere are P1, P2(Step 51). The reason why the point close to the center of the ellipse is used is that the accuracy of measurement is increased. Next, point P of each color channel image (FIG. 22).1, P2The brightness at (R1, G1, B1), (R2, G2, B2(Step 52). Next, a threshold value M is used for hue determination.TThe
Figure 0004056891
(Step 53). R1, G1, B1 M out ofTIf there is no greater value, point P1Is determined to be black (steps 54 and 55). R1, G1, B1M out ofTIf the larger value is 1 or more, the point P1The color of M is R, G, BTIt is determined that the color corresponds to a larger value (step 56). Point P2In the same manner, the hue is determined (steps 57 to 59).
[0065]
Since the figure on the solid 41 and its positional relationship are known, in the present embodiment, two point positions necessary for determining the posture are obtained by the process of FIG.1, P2Therefore, the same processing as in FIG. 24 is not required for the remaining two dots.
[0066]
FIG. 25 is a flowchart illustrating a method for calculating the position / posture of the solid 41 in the real space from the image obtained by capturing the solid 41 of FIG. 21 using the apparatus of FIG. It is assumed that the radius of the spherical portion of the solid 41 is known.
1. The optical distortion of the image obtained by capturing the solid 41 is corrected by the same method as in the first embodiment to obtain a corrected image (step 61).
2. The corrected image is separated into the monochrome channel and each color channel shown in FIG. 22 (step 62).
3. Using the corrected image (monochrome image) in the monochrome channel, the position (x, y, z) of the solid 41 is calculated in the same manner as in the second embodiment (step 63).
4. Using the monochrome image, the positions of all the dots on the image are calculated by the same method as in the second embodiment (step 64).
5. Using the corrected image in each color channel, the hue of the position on the dot image is determined by the procedure of FIG. 24, and the corresponding dot is specified (step 65).
6. The position of the identified dot in the real space and the attitude (θ, φ, ψ) of the solid 41 based on the position are calculated by the same method as in the second embodiment (step 66).
[0067]
Also in the present embodiment, other rotationally symmetric figures may be used instead of dots, and the sizes of these rotationally symmetric figures are not necessarily the same, and two or more pieces are captured on the image. Any number can be used.
[0068]
  The three-dimensional position / orientation detection apparatus described above is not only realized by dedicated hardware, but also stores a program for executing the method described above on a computer-readable recording medium. A program recorded on a medium may be read into a computer system and executed. What is a computer-readable recording medium?flexibleA recording medium such as a disk, a magneto-optical disk, a CD-ROM, or a storage device such as a hard disk device built in a computer system. Furthermore, a computer-readable recording medium is a server that dynamically holds a program (transmission medium or transmission wave) for a short period of time, as in the case of transmitting a program via the Internet, and a server in that case. Some of them hold programs for a certain period of time, such as volatile memory inside computer systems.
[0069]
【The invention's effect】
As described above, the present invention has the following effects.
Since the posture in the space can be calculated from the shape of the sphere on the image regardless of the posture of the sphere, the calculation of the position and the calculation of the posture can be separated, and the result calculation is simplified.
-Since the position and orientation are calculated independently using a sphere, the calculation cost can be reduced.
-Since the three-dimensional posture candidates are calculated based on the dot positions, the calculation cost can be greatly reduced.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a three-dimensional position / attitude detection device according to a first embodiment of the present invention.
FIG. 2 is a diagram showing an image of a sphere 1 (FIG. 2 (a)) and a corrected image thereof (FIG. 2 (b)).
FIG. 3 is a diagram showing a contour image of a sphere 1;
FIG. 4 is an explanatory diagram of processing for calculating the position of a sphere 1 in space.
FIG. 5 is an explanatory diagram of processing for calculating the attitude of a sphere 1 in space.
FIG. 6 Normalized image IFiveAnd template image group TnIt is a figure which shows a comparison with.
FIG. 7 is a flowchart showing processing for detecting a three-dimensional position / attitude in the first embodiment.
FIG. 8 is a diagram illustrating an application example of the present invention.
FIG. 9 is a configuration diagram of a three-dimensional position / attitude detection device according to a second embodiment of the present invention.
10 is a diagram showing an image obtained by the camera 12 in FIG. 9 (FIG. 10A) and an image obtained by the three-dimensional position / posture detection apparatus (FIG. 10B, FIG. 10C). .
11 is a diagram illustrating an example of a solid 11. FIG.
12 is a diagram showing a state in which a solid 11 is placed in a coordinate system in a real space with the camera 12 as a reference. FIG.
13 is a diagram illustrating an image obtained by capturing a solid 11. FIG.
FIG. 14 is a diagram illustrating a geometric relationship between a dot position P on a captured image and a dot position P in real space;
FIG. 15 is a diagram showing the positions of three dots detected on a captured image and three character templates created based on the positions of these dots;
FIG. 16 is a diagram for explaining a graphic template creation method using a computer;
FIG. 17 is a diagram showing an image of a virtual camera calculated by a computer.
FIG. 18 is a flowchart showing processing for calculating the position and orientation of a solid in the second embodiment.
FIG. 19 is a diagram showing an example of a figure provided on the spherical surface of the solid 11;
FIG. 20 is a diagram illustrating a configuration of a three-dimensional position / posture detection solid and a three-dimensional position / posture detection apparatus according to a fourth embodiment of the present invention;
21 is a diagram illustrating an example of a solid 41. FIG.
FIG. 22 is a diagram illustrating captured images of a solid 41 in a monochrome channel and each color channel.
FIG. 23 is a diagram illustrating positions of dots of a solid 41 detected on a captured image in a monochrome channel.
FIG. 24 is a flowchart showing a method of determining the hue of a position on a dot image based on a color image.
25 is a flowchart showing a method of calculating the position / orientation of the solid 41 in real space from the image obtained by capturing the solid 41 of FIG. 21 by the three-dimensional position / orientation detection apparatus of FIG.
[Explanation of symbols]
1 ball
1a Infrared light source
2 Camera
2a Infrared transmission filter
3 Ball position calculator
3a Binarization processing engine
3b Ellipse detection engine
3c Nonlinear simultaneous equation solver
4 Ball posture calculation unit
4a Template image group
4b Normalized correlation engine
11 solid
12 Camera
13 3D Position / Attitude Detection Device
13a Position calculation unit
13b Attitude calculation unit
14 Outline
21-25, 31-35 steps
41 solid
42 Camera
43 3D Position / Attitude Detection Device
43a Position calculation unit
43b Attitude calculation unit
51-59, 61-66 steps

Claims (5)

3次元位置・姿勢検出装置に撮像画像を入力することによって、その3次元位置および姿勢を検出することが可能な立体であって、表面の少なくとも一部分が球面であり、前記球面に描かれ、撮影可能な最小の大きさである、形状が同一の2つ以上の点もしくは該点を頂点とする形状が同一の2つ以上の回転対称図形と、前記球面に描かれ、姿勢により見え方が異なり、かつ前記球面上に描かれた前記点もしくは前記回転対称図形とは異なる1つ以上の互いに異なる図形と、を有する、3次元位置・姿勢検出用立体と、
前記立体と、該立体に描かれている2つ以上の点もしくは2つ以上の回転対称図形と、姿勢により見え方の異なる1つ以上の図形を撮影するカメラと、
前記カメラから得られた、前記立体の画像から球面の輪郭画像を取得し、該輪郭画像から空間における前記球面の位置を算出する球面位置算出手段と、
前記の算出された位置を元に前記球面の画像を正規化し、該正規化された画像中の2つ以上の点もしくは2つ以上の回転対称図形の位置に基づいて前記立体の姿勢候補を算出する球姿勢候補算出手段と、
前記の正規化された画像中の1つ以上の姿勢により見え方の異なる図形を、予め用意されている、前記球面の種々の姿勢に対応するテンプレート画像群の中の前記姿勢候補のテンプレートとマッチングを行い、前記球の姿勢を算出する球姿勢算出手段と
を有する3次元位置・姿勢検出装置。
A solid that can detect the three-dimensional position and orientation by inputting a captured image to the three-dimensional position / posture detection device, and at least a part of the surface is a spherical surface, and is drawn on the spherical surface. The smallest possible size, two or more points with the same shape, or two or more rotationally symmetric figures with the same point as the vertex, drawn on the spherical surface, and the appearance differs depending on the posture And one or more different figures different from the point drawn on the spherical surface or the rotationally symmetric figure, and a three-dimensional position / attitude detection solid,
A camera that shoots the solid, two or more points drawn on the solid or two or more rotationally symmetric figures, and one or more figures that differ in appearance depending on the posture;
A spherical position calculation means for obtaining a spherical contour image from the stereoscopic image obtained from the camera and calculating the position of the spherical surface in space from the contour image;
The spherical image is normalized based on the calculated position, and the solid posture candidates are calculated based on the positions of two or more points or two or more rotationally symmetric figures in the normalized image. Sphere posture candidate calculation means to perform,
Matching a figure with a different appearance depending on one or more postures in the normalized image with a template of the posture candidate in a template image group corresponding to various postures of the spherical surface prepared in advance A three-dimensional position / posture detection device comprising: a ball posture calculation unit that calculates the posture of the ball.
前記球面は、内部に赤外線発光手段を備え、散乱面を有する半透明の球であり、前記カメラは赤外線のみを透過させるフィルタを備えている、請求項1に記載の3次元位置・姿勢検出装置。2. The three-dimensional position / attitude detection device according to claim 1, wherein the spherical surface is a translucent sphere having infrared light emitting means therein and having a scattering surface, and the camera includes a filter that transmits only infrared light. . 3次元位置・姿勢検出装置に撮像画像を入力することによって、その3次元位置および姿勢を検出することが可能な立体であって、表面の少なくとも一部分が球面であり、前記球面に描かれ、撮影可能な最小の大きさである、形状が同一の2つ以上の点もしくは該点を頂点とする形状が同一の2つ以上の回転対称図形と、前記球面に描かれ、姿勢により見え方が異なり、かつ前記球面上に描かれた前記点もしくは前記回転対称図形とは異なる1つ以上の互いに異なる図形と、を有する、3次元位置・姿勢検出用立体を用いて、該立体の撮像画像から、該立体の3次元位置および姿勢を検出する方法であって、
前記立体と、該立体に描かれている2つ以上の点もしくは2つ以上の回転対称図形と、姿勢により見え方の異なる1つ以上の図形を撮影する撮影段階と、
前記撮影段階で得られた、前記立体の画像から球面の輪郭画像を取得し、該輪郭画像から空間における前記球面の位置を算出する球面位置算出段階と、
前記の算出された位置を元に前記球面の画像を正規化し、該正規化された画像中の2つ以上の点もしくは回転対称図形の位置に基づいて前記立体の姿勢候補を算出する球姿勢候補算出段階と、
前記の正規化された画像中の1つ以上の姿勢により見え方の異なる図形を、予め用意されている、前記球面の種々の姿勢に対応するテンプレート画像群の中の前記姿勢候補のテンプレートとマッチングを行い、前記球の姿勢を算出する球姿勢算出段階と
を有する3次元位置・姿勢検出方法。
A solid that can detect the three-dimensional position and orientation by inputting a captured image to the three-dimensional position / posture detection device, and at least a part of the surface is a spherical surface, and is drawn on the spherical surface. The smallest possible size, two or more points with the same shape, or two or more rotationally symmetric figures with the same point as the vertex, drawn on the spherical surface, and the appearance differs depending on the posture and wherein having a different shape one or more different from the point or the rotationally symmetrical shape drawn on a spherical surface, with the 3-dimensional position and posture detecting stereoscopic, from the captured image of the three-dimensional, A method for detecting the three-dimensional position and orientation of the solid,
A shooting step of shooting the solid, two or more points drawn on the solid or two or more rotationally symmetric figures, and one or more figures that differ in appearance depending on the posture;
Obtaining a spherical contour image from the three-dimensional image obtained in the photographing step, and calculating a spherical position in space from the contour image;
A spherical posture candidate that normalizes the spherical image based on the calculated position and calculates the solid posture candidate based on the positions of two or more points or rotationally symmetric figures in the normalized image A calculation stage;
Matching a figure with a different appearance depending on one or more postures in the normalized image with a template of the posture candidate in a template image group corresponding to various postures of the spherical surface prepared in advance A three-dimensional position / posture detection method comprising: a ball posture calculation step of calculating a posture of the ball.
請求項に記載の3次元位置・姿勢検出方法をコンピュータに実行させるための3次元位置・姿勢検出プログラム。A three-dimensional position / posture detection program for causing a computer to execute the three-dimensional position / posture detection method according to claim 3 . 請求項に記載の3次元位置・姿勢検出方法をコンピュータに実行させるための3次元位置・姿勢検出プログラムを記録した、コンピュータ読み取り可能な記録媒体。A computer-readable recording medium on which a three-dimensional position / posture detection program for causing a computer to execute the three-dimensional position / posture detection method according to claim 3 is recorded.
JP2003009861A 2002-01-18 2003-01-17 Three-dimensional position / attitude detection device, method, program, and recording medium Expired - Lifetime JP4056891B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003009861A JP4056891B2 (en) 2002-01-18 2003-01-17 Three-dimensional position / attitude detection device, method, program, and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002010563 2002-01-18
JP2002269891 2002-09-17
JP2003009861A JP4056891B2 (en) 2002-01-18 2003-01-17 Three-dimensional position / attitude detection device, method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2005055177A JP2005055177A (en) 2005-03-03
JP4056891B2 true JP4056891B2 (en) 2008-03-05

Family

ID=34381694

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003009861A Expired - Lifetime JP4056891B2 (en) 2002-01-18 2003-01-17 Three-dimensional position / attitude detection device, method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4056891B2 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1963786B1 (en) * 2005-12-23 2013-07-24 GCoder Systems AB Positioning pattern
CN100401010C (en) * 2006-08-25 2008-07-09 哈尔滨工业大学 Non-contact three-axis air bearing table rotation angle measurement device
GB0622451D0 (en) * 2006-11-10 2006-12-20 Intelligent Earth Ltd Object position and orientation detection device
JP2008140077A (en) * 2006-11-30 2008-06-19 Tamagawa Seiki Co Ltd Sphere absolute angle detection system, sphere actuator and pointing device
JP5085230B2 (en) * 2007-08-24 2012-11-28 パナソニック株式会社 Mobile system
US9139977B2 (en) * 2010-01-12 2015-09-22 Topcon Positioning Systems, Inc. System and method for orienting an implement on a vehicle
KR101363502B1 (en) * 2010-12-23 2014-02-14 삼성중공업 주식회사 Position measuring apparatus, position measuring method, painting system, and painting method
JP5855416B2 (en) * 2011-10-25 2016-02-09 Kddi株式会社 3D coordinate acquisition device, camera posture estimation device, program
JP5801209B2 (en) * 2012-01-06 2015-10-28 Kddi株式会社 Camera posture estimation device, program
CN118696293A (en) * 2022-03-25 2024-09-24 株式会社和冠 Controller and computer
CN116182783A (en) * 2023-03-09 2023-05-30 吉林大学 A Speckle Textured Spherical Target and Its Pose Estimation Method

Also Published As

Publication number Publication date
JP2005055177A (en) 2005-03-03

Similar Documents

Publication Publication Date Title
US12008796B2 (en) Systems and methods for pose detection and measurement
CN110232311B (en) Method and device for segmenting hand image and computer equipment
CN110478892B (en) A three-dimensional interactive method and system
US9898651B2 (en) Upper-body skeleton extraction from depth maps
WO2018133130A1 (en) 3d marker model construction and real-time tracking using monocular camera
US20180321776A1 (en) Method for acting on augmented reality virtual objects
US9922245B2 (en) Method and system for recognizing an object
CN112132907A (en) A camera calibration method, device, electronic device and storage medium
US20080101693A1 (en) Video image based tracking system for identifying and tracking encoded color surface
JP4056891B2 (en) Three-dimensional position / attitude detection device, method, program, and recording medium
Azad et al. Combining appearance-based and model-based methods for real-time object recognition and 6d localization
US6873712B2 (en) Method for identifying an object image
CN110288040B (en) Image similarity judging method and device based on topology verification
CN110942092B (en) Graphic image recognition method and recognition system
WO2023193763A1 (en) Data processing method and apparatus, and tracking mark, electronic device and storage medium
Su et al. Smart training: Mask R-CNN oriented approach
Vysocky et al. Generating synthetic depth image dataset for industrial applications of hand localization
JP2009216480A (en) Three-dimensional position and attitude measuring method and system
Ibelaiden et al. Scene description from depth images for visually positioning
JP2004152032A (en) Three-dimensional posture input state three-dimensional posture input method, three-dimensional posture input method, three-dimensional posture input device, three-dimensional posture input program, and recording medium recording the program
CN114627273B (en) Quantitative evaluation method for illumination consistency under virtual-real fusion scene
Bradley et al. Natural interaction with virtual objects using vision-based six DOF sphere tracking
TWI460683B (en) The way to track the immediate movement of the head
CN112219207A (en) Method for optically identifying a marking
Lima et al. Rgb-d based detection of texture-less planar objects applied to an ar jigsaw puzzle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050125

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070606

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070731

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071212

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4056891

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131221

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term