JP3952467B2 - 3D data extraction method and 3D data extraction apparatus - Google Patents
3D data extraction method and 3D data extraction apparatus Download PDFInfo
- Publication number
- JP3952467B2 JP3952467B2 JP2003131634A JP2003131634A JP3952467B2 JP 3952467 B2 JP3952467 B2 JP 3952467B2 JP 2003131634 A JP2003131634 A JP 2003131634A JP 2003131634 A JP2003131634 A JP 2003131634A JP 3952467 B2 JP3952467 B2 JP 3952467B2
- Authority
- JP
- Japan
- Prior art keywords
- dimensional data
- detection target
- target object
- dimensional
- search block
- 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
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Closed-Circuit Television Systems (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、測定領域内に配置された複数の物体の3次元形状を表す3次元データの中から、検出対象物体の3次元形状を表す3次元データを抽出する3次元データ抽出方法および3次元データ抽出装置に関する。
【0002】
【従来の技術】
従来から、3次元形状測定装置を用いて測定した測定領域内に位置する複数の物体の3次元形状を表す3次元データの中から、検出対象物体の3次元形状を表す3次元データを抽出することは行われていた(特許文献1参照)。この場合、測定によって得られた全ての3次元データを物体ごとの3次元データに分け、その後、前記分けた各3次元データが物体の特徴に合致するかを判定するようにしている。
【0003】
【特許文献1】
特開平7−244714号公報
【0004】
【発明が解決しようとする課題】
しかし、上記従来の方法では、全ての3次元データを物体ごとに分けることも、分けた各3次元データが物体の特徴に合致しているかを判定することも、多量の3次元データを処理しなければならないので、多大な処理時間を要するという問題がある。
【0005】
【発明の概略】
本発明は上記問題に対処するためになされたもので、その目的は、短い処理時間で、測定領域内に配置された複数の物体の3次元形状を表す3次元データの中から、検出対象物体の3次元形状を表す3次元データを抽出する3次元データ抽出方法および3次元データ抽出装置を提供することにある。
【0006】
前記目的を達成するために、本発明の特徴は、測定領域内で少なくとも検出対象物体の含まれる可能性のある領域を単位ブロックずつに分割し、前記分割された領域内で所定数以上の3次元データを含む単位ブロックを抽出し、検出対象物体の含まれる可能性のある領域内で、検出対象物体を包含し得るとともに複数の単位ブロックを包含する探索ブロックを単位ブロックを単位として順次移動させ、各移動ごとに、探索ブロックに含まれかつ前記抽出した単位ブロックの数または分布を調べることにより、検出対象物体を包含する可能性のある探索ブロックの位置を検出し、かつ前記検出した位置の探索ブロック内に含まれる3次元データの中から、検出対象物体の形状に合致する3次元データを抽出するようにしたことにある。
【0007】
この場合、検出対象物体を包含する探索ブロックの位置の検出においては、例えば、探索ブロックに含まれかつ抽出した単位ブロックの数が所定数以上であることを条件に、探索ブロックの位置を検出することができる。また、前記条件に代えまたは加えて、単位ブロックの分布に基づいて探索ブロックの位置を検出してもよい。例えば、検出対象物体が球体の場合には3次元形状測定装置の方向から平面的に見たときの単位ブロックの各列ごとの数が所定範囲内になっていることを条件に探索ブロックの位置を検出する。検出対象物体が球体以外の場合には、探索ブロックの中央部の平面内に抽出した単位ブロックが所定数以上直線的に連続し、または所定数以上楕円状に存在し、探索ブロックの周辺の各面において、抽出された単位ブロックが所定数以下であることを条件に、探索ブロック位置を抽出する。
【0008】
また、検出対象物が球体以外で平板の表面に底面を合わせて置かれている場合には、単位ブロックを平板の上面を底面として単位ブロックを並べるとともに積み上げる。そして、検出対象物体が、立方体、直方体などの多面体や円柱であれば、高さ方向の各平面内において抽出された単位ブロックが所定数以上の直線状または円状に存在し、探索ブロックの上面において、抽出された単位ブロックの数が所定の範囲内にあることを条件に、探索ブロック位置を抽出する。検出対象物が、角錐や円錐であれば、高さ方向の各平面内において抽出された単位ブロックが上方向に向けて徐々に減少し、探索ブロックの上面において抽出された単位ブロックの数が所定数以下であることを条件に探索ブロック位置を抽出する。
【0009】
上記のように構成した本発明においては、まず、測定領域内で少なくとも検出対象物体の含まれる可能性のある領域を単位ブロックずつに分割して、この分割された領域内で所定数以上の3次元データを含む単位ブロックを抽出する。この処理においては、単に3次元データの存在を確認するとともにその数を検出するだけでよいので、処理が簡単である。そして、次の段階では、検出対象物体の含まれる可能性のある領域内で探索ブロックを順次移動させながら、探索ブロックに含まれかつ前記抽出した単位ブロックの数または分布を調べることにより、検出対象物体を包含する可能性のある探索ブロックの位置を検出する。この処理では、前記抽出した単位ブロックの存在、およびその数または分布を調べるだけであるので、この処理も簡単である。そして、最後の段階では、3次元データが検出対象物体の形状に合致するかを判定するが、前記位置の検出された探索ブロック内に含まれる3次元データのみに基づく判定でよいので、判定処理すべき3次元データが少なく、この処理も短時間で済む。このような処理の結果、本発明によれば、短い処理時間で、検出対象物体の3次元形状を表す3次元データを抽出することができるようになる。
【0010】
また、本発明の他の特徴は、さらに、検出対象物体の特徴を入力装置を用いて入力可能としたことにある。これによれば、検出対象物体を容易に設定できるようになる。
【0011】
また、本発明の他の特徴は、さらに、3次元探索ブロックの大きさを検出対象物体の大きさに応じて設定するようにしたことにある。これによれば、検出対象物体ごとに適切な大きさの3次元探索ブロックが設定されるので、処理すべき3次元データ量を適切に減少させることができ、処理時間をより的確に節約できるようになる。
【0012】
【発明の実施の形態】
以下、本発明の一実施形態について図面を用いて説明する。図1は、本発明の適用される3次元画像システムの概略図である。
【0013】
この3次元画像システムは、基台10上に形成された測定対象空間に向けた3次元形状測定装置20Aを備えている。3次元形状測定装置20Aは、基台10上に置かれ測定対象空間内に存在する複数の物体OBの3次元表面形状を測定するもので、同測定結果を表す測定情報を出力する。
【0014】
この3次元形状測定装置20Aとしては、物体OBの3次元表面形状を測定するとともに同測定した3次元表面形状を表す信号を出力するものであれば、いかなる3次元形状測定装置をも利用できる。本実施形態においては、レーザ光を用いて3角測量法に従って物体の3次元表面形状を測定するものを簡単に紹介しておく。
【0015】
この3次元形状測定装置においては、レーザ光源から物体に向けて出射されるレーザ光の進行方向にほぼ垂直な仮想平面を想定するとともに、同仮想平面上にて互いに直交するX軸方向およびY軸方向に沿って分割した多数の微小エリアを想定する。そして、3次元形状測定装置は、前記多数の微小エリアにレーザ光を順次照射し、物体からの反射光によって前記微小エリアが規定する物体表面までの距離をZ軸方向距離として順次検出して、物体の表面を微小エリアずつに分割した各分割エリア位置を表すX,Y,Z座標に関する情報を得て、同3次元形状測定装置に面した物体表面の形状を測定するものである。
【0016】
したがって、この3次元形状測定装置は、出射レーザ光の向きをX軸方向に変化させるX軸方向走査器と、出射レーザ光の向きをY軸方向に変化させるY軸方向走査器と、物体表面にて反射された反射レーザ光を受光して物体表面までの距離を検出する距離検出器とを備えている。X軸方向走査器およびY軸方向走査器としては、レーザ光源からの出射レーザ光の光路をX軸方向およびY軸方向に独立に変化させ得る機構であればよく、例えばレーザ光源自体をX軸方向およびY軸方向の軸線回りに電動モータによって回転させたり、出射レーザ光の光路に設けられてその方向を変更するガルバノミラーをX軸方向およびY軸方向の軸線回りに電動モータによって回転させる機構を利用できる。距離検出器としては、前記出射レーザ光の光路に追従して回転し、物体表面にて反射された反射レーザ光を集光する結像レンズおよび同集光したレーザ光を受光するCCDなどの複数の受光素子を一列に配置させたラインセンサからなり、ラインセンサによる反射レーザ光の受光位置によって物体表面までの距離を検出する機構を利用できる。
【0017】
したがって、このような3次元形状測定装置は、物体の表面を微小エリアずつに分割した各分割エリア位置を表すX,Y,Z座標に関する情報として、X軸方向走査器による出射レーザ光の基準方向に対するX軸方向への傾きθx、Y軸方向走査器による出射レーザ光の基準方向に対するY軸方向への傾きθy、および距離検出器による物体表面までの距離Lzとが、前記仮想したX軸方向およびY軸方向に沿って分割した多数の微小エリアごとに出力される。より具体的には、X軸およびY軸方向への傾きθx,θyは、電動モータの基準位置からの回転角である。また、物体表面までの距離Lzは、ラインセンサにおける反射レーザ光の受光位置である。
【0018】
この3次元形状測定装置20Aには、コントローラ31および3次元画像処理装置32が接続されている。コントローラ31は、キーボードからなる入力装置33からの指示にしたがって、3次元形状測定装置20Aの作動を制御する。また、コントローラ31は、入力装置33からの指示にしたがって3次元画像処理装置32の作動を制御するとともに、同入力装置33にて入力されたデータを3次元画像処理装置32に供給する。
【0019】
3次元画像処理装置32は、コンピュータ装置によって構成されて図2の検出対象物体表示プログラムの実行により、3次元形状測定装置20Aからの3次元形状に関する3次元データを入力して、測定対象空間内に位置する検出対象物体に関する3次元データのみを抽出するとともに、同抽出した3次元データを用いて3次元画像データを生成する。この3次元画像処理装置32には、表示装置34が接続されている。表示装置34は、液晶ディスプレイ、プラズマディスプレイ、CRTディスプレイなどを備えており、3次元画像処理装置32からの3次元画像データに基づいて測定対象空間内に位置する物体の3次元画像を表示する。
【0020】
次に、上記のように構成した3次元画像システムの動作について説明する。基台10上には、複数の物体OBが置かれているものとする。この状態で、ユーザは、入力装置33を操作して3次元形状測定装置20Aによる測定を指示すると、同指示はコントローラ31に伝達されて、コントローラ31は3次元形状測定装置20Aに対して3次元形状の測定を指示する。これにより、3次元形状測定装置20Aは、基台10上の複数の物体OBの3次元形状すなわち測定対象空間内に位置する全ての物体OBの3次元表面形状を測定し始める。そして、3次元形状測定装置20Aは、複数の物体OBの3次元形状を表す3次元データを生成して、同3次元データを3次元画像処理装置32に出力する。すなわち、複数の物体OBの表面を微小エリアずつに分割した各分割エリア位置を表すX,Y,Z座標に関する3次元データ(具体的には、傾きθx,θyおよび距離Lz)を3次元画像処理装置32に出力する。
【0021】
3次元画像処理装置32は、3次元形状測定装置20Aから出力された3次元データを入力する。この3次元データは、3次元形状測定装置20Aの特定位置を原点にしたX,Y,Z座標に関する3次元データであり、各座標軸は図1に示す方向に設定されている。なお、平板状の基台10上に球体以外の形状の物体が基台10の上面に底面を合わせて置かれている場合には、後述する処理をより高速で行えるようにするため、3次元画像処理装置32にて前記入力した3次元データを基台10の表面の特定位置を原点としたX’,Y’,Z’座標に関する3次元データに変換してもよい。なお、このX’,Y’,Z’座標は、図1に示す方向に設定されている。この変換は、基台10の前記特定位置に対する3次元形状測定装置20Aの前記特定位置の相対位置を表す情報(既知の情報)を、座標軸の移動および回転に関する変換式に適用することにより行われる。なお、3次元形状測定装置20Aにおいて、前記3次元データの変換が行われている場合には、同変換を3次元画像処理装置32にて行わなくてもよい。
【0022】
次に、ユーザは入力装置33を操作することにより検出対象物体の3次元形状を表す3次元データの抽出を3次元画像処理装置32に指示する。この指示に応答して、3次元画像処理装置32は図2のステップS10にて検出対象物体表示プログラムの実行を開始する。
【0023】
プログラムの実行開始後、3次元画像処理装置32は、ステップS12にて検出対象物体の特徴の入力処理を実行する。この入力処理においては、表示装置34に検出対象物体の特徴を入力する旨を表示して、ユーザに検出対象物体の特徴の入力を促す。ユーザが入力装置33を操作して検出対象物体の特徴を入力すると、同入力情報は3次元画像処理装置32に供給される。
【0024】
この場合、検出対象物体が球体であれば、形状が球体であることを表すデータと、直径を表すデータを入力する。立方体、直方体などの多面体であれば、形状が特定の多面体であることを表すデータと、辺の長さを表すデータ(立方体の場合には1辺の長さを表すデータ、直方体の場合には2辺または3辺の長さを表すデータ)を入力する。円柱および円錐であれば、形状が円柱または円錐であることを表すデータと、直径および高さを表すデータを入力する。角錐であれば、形状が特定の角錐であることを表すデータと、底面の1辺の長さおよび高さを表すデータを入力する。なお、以前に入力された検出対象物体の特徴をひきつづき利用する場合には、このステップS12の処理をスキップさせるとよい。
【0025】
次に、3次元画像処理装置32は、ステップS14にて、前記入力された検出対象物体の特徴を表すデータを用いて、単位ブロックおよび探索ブロックのサイズ設定処理を実行する。単位ブロックは、検出対象物体の存在位置を特定するために探索ブロックを移動させる最小のブロックであり、本実施形態では立方体に形成されているが、直方体などの他の形状でもよい。また、この単位ブロックのサイズは、検出対象物体の一部が存在することを確認可能である程度に小さく設定される。探索ブロックは、検出対象物体をその内部に包含する位置を特定するために利用されるもので、本実施形態では立方体に形成されているが、直方体などの他の形状でもよい。また、この探索ブロックのサイズは、検出対象物体の全てを包含できるとともに、なるべく小さく設定される。ただし、この検出対象物体を包含できるとは、検出対象物体の一部でも含む単位ブロックの全てを含むことを意味する。
【0026】
この単位ブロックおよび探索ブロックの寸法について、具体例を挙げて説明しておく。例えば、検出対象物体が直径25mmの球体であれば、単位ブロックのサイズとして立方体の1辺の長さ4mmが設定されるとともに、探索ブロックのサイズとして立方体の1辺の長さ32mmが設定される。これによれば、探索ブロックは8×8×8個の単位ブロックを含むこととなり、直径25mmのうちの24mmが6個の単位ブロックに完全に包含され、残りの1mmが1個または2個の単位ブロックに含まれることになる。図3は、単位ブロックと探索ブロックとの関係を斜視図により示している。なお、検出対象物体が球体でない場合も同様であり、検出対象物体の特徴によっては単位ブロックおよび探索ブロックとして、直方体を利用した方が効率的である場合もある。
【0027】
次に、3次元画像処理装置32は、ステップS16にて探索領域のブロック化処理を実行する。この探索領域のブロック化処理は、測定対象領域内で検出対象物体の含まれる可能性のある領域を単位ブロックで分割する処理である。基本的には、物体OBに関する3次元データに基づき、測定対象空間内のうち3次元データが存在する空間を単位ブロックで立体的に分割する。分割は、前記X,Y,Z座標の各座標軸に沿って単位ブロックを並べていく方法で行う。図4は、図1の測定対象空間内に置かれた物体に関する3次元データに基づき、本処理を行った結果を示す2次元の概念図である。図4中、二点鎖線は測定対象空間の境界を示している。そして、分割後の各単位ブロックBLは、X,Y,Z方向の位置i,j,kを用いた座標(i,j,k)によって表される。ただし、i,j,kの各値は整数である。
【0028】
なお、3次元データを図1に示した基台10の上面の特定位置を原点にしたX’,Y’,Z’座標に関する3次元データに変換した場合には、物体OBに関する3次元データが存在する基台10の上面を底面として単位ブロックを平面内にて並べるとともに、上方に単位ブロックを積んでいくように配置すればよい。そして、検出対象物体の高さを超える高さまで単位ブロックを配置すれば、物体OBに関する3次元データが残っていても、それ以上の高さには単位ブロックを配置しなくてもよい。左右および前後方向においても、物体OBに関する3次元データが存在しない位置には、単位ブロックを配置しなくてもよい。
【0029】
次に、3次元画像処理装置32は、ステップS18にて、前記ステップS16の処理によって分割した各単位ブロックごとに3次元データが所定個数以上あるかを調べる。そして、3次元データが所定個数以上ある単位ブロックを抽出する。図5(A)〜(C)は、前述した検出対象物体を球体にした場合の例を採用して、抽出された単位ブロックを3次元形状測定装置20Aに視点をおいてZ軸方向に見たときの概念図である。ただし、外枠は探索ブロックに対応しており、ハッチング部分が抽出された単位ブロックである。
【0030】
次に、3次元画像処理装置32は、ステップS20にて、検出対象物体を含む可能性のある探索ブロック位置の検出処理を行う。この探索ブロック位置の検出処理においては、前記ステップS16の処理により単位ブロックに分割した領域にて、前記ステップS14の処理により設定した探索ブロックを単位ブロックを単位として、X軸、Y軸およびZ軸方向に順次移動させる。そして、各移動ごとに、移動後の探索ブロック内に含まれるとともに前記ステップS18の処理によって抽出された単位ブロックの個数を計算する。前記単位ブロックの数が所定の範囲内であれば、該当する探索ブロック位置であるとして、同位置が検出される。図6の(A)〜(D)は、この探索ブロックの移動の状態を2次元的に示す概念図である。
【0031】
この場合、検出対象物体が球体であれば、3次元形状測定装置20Aと対向する側に位置して3次元データが得られる箇所と、3次元形状測定装置20Aと対向しない側に位置して3次元データが得られない箇所の割合は、ほぼ同じであるので、球体の直径が特定されれば、探索ブロック内に含まれる単位ブロックの数は設定される。その結果、図5(A)に示す球体が検出対象物体であれば、図5(B)に示すような検出対象物体より直径の小さな球体を、単位ブロックの数が所定範囲外であるとして、除外することができる。
【0032】
ただし、図5(C)に示すような検出対象物体より直径の大きな球体は、探索ブロックの位置によって抽出された単位ブロックの数が所定の範囲内になることがあるため、該当する探索ブロックの位置として検出される。また、検出対象物体が球体以外の場合には、3次元形状測定装置20Aと対向する側に位置して3次元データが得られる箇所と、3次元形状測定装置20Aと対向しない側に位置して3次元データが得られない箇所の割合は、物体の置かれ方により変化するため、探索ブロック内で抽出される単位ブロックの数が変化する。さらに、何種類かの形状の物体が置かれている場合には、検出対象物体の形状とは異なった形状の物体を、探索ブロック内に含まれる単位ブロックの数が所定の範囲内であるとして検出する可能性が高くなる。このため、3次元データを所定数以上含む単位ブロックの数に代えまたは加えて、同単位ブロックの分布に基づいて該当探索ブロック位置の抽出処理を行った方が検出対象外の物体を除外することができる。
【0033】
例えば、検出対象物体が球体の場合には、図5のように探索ブロックを3次元形状測定装置20A側から見て(すなわち、Z軸方向から見て)、Z軸方向のいずれかの面で単位ブロックが抽出された箇所を、X,Y軸の平面内で抽出された単位ブロックとして、X,Y軸の平面の単位ブロック各列で抽出された数が設定数の範囲内であることを条件に、探索ブロック位置を検出すればよい。このようにすれば、図5(A)が検出対象物体であれば、図5(B)(C)のような検出対象物体より直径の明らかに異なる球体は、X,Y軸の平面の単位ブロック各列で抽出された数が設定数の範囲外であるとして除外することができる。
【0034】
さらに、上記処理において検出された物体を、X,Y軸の平面の単位ブロックにおける各列のX,Z平面またはY,Z平面内で抽出した単位ブロックが、円状に分布していることを条件にして追加の検出を行えば、円柱または円錐で直径が等しく、中心軸がZ軸方向を向いているため検出されたものも除外することができる。また、検出対象物体が、球体以外の物体である場合には、探索ブロックの中央部の平面内に抽出した単位ブロックが所定数以上直線状または楕円状に連続して存在し、探索ブロックの周辺の各面において、抽出された単位ブロックが所定数以下であることを条件に、探索ブロック位置を抽出する。
【0035】
なお、図1に示す基台10の表面を底面として単位ブロックを平面内にて並べるとともに、上方に単位ブロックを積んでいくようにした場合には、検出対象物体が、立方体、直方体などの多面体や円柱であれば、高さ方向の各平面内において抽出された単位ブロックが所定数以上直線状または円状に存在し、探索ブロックの上面において、抽出された単位ブロックの数が所定の範囲内にあることを条件に、探索ブロック位置を抽出する。検出対象物が、角錐や円錐であれば、高さ方向の各平面内において抽出された単位ブロックが上方向に向けて徐々に減少し、探索ブロックの上面において抽出された単位ブロックの数が所定数以下であることを条件に探索ブロック位置を抽出する。
【0036】
次に、3次元画像処理装置32は、ステップS22にて、前記ステップS20の処理によって検出した位置の探索ブロック内に含まれる3次元データが、検出対象物体の形状に合致するか否かを判定し、合致すると判定したとき探索ブロック内の3次元データを抽出する3次元データ抽出処理を行う。
【0037】
例えば、検出対象物体が球体であれば、該当する探索ブロック内の全ての3次元データ(X,Y,Z座標値)を、球体を表す式である下記数1の左辺のx,y,zにそれぞれ代入し、最小2乗法を用いて未知数a,b,c,dを計算する。この場合、a,b,cは、3次元データにより表された球体中心のX,Y,Z座標値をそれぞれ表し、dは球体の半径を表す。次に、前記該当する探索ブロック内の各3次元データ(X,Y,Z座標値)ごとに、同3次元データ(X,Y,Z座標値)と前記計算した値a,b,cを下記数1に代入して、各3次元データごとに値d(球体中心からの距離)を計算する。そして、前記計算した値d(球の半径)と前記ステップS12で入力した直径の半値(半径)との差が所定の判別値以内であり、かつ各3次元データの球体中心からの距離の偏差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致するとして、同3次元データを抽出する。一方、前記差または偏差が所定の判別値以内でなければ、前記探索ブロック内の3次元データは合致しないとして、同3次元データを抽出しない。
【0038】
【数1】
(x−a) 2+(y−b) 2+(z−c)2−d2=0
【0039】
次に、検出対象物体が、立方体、直方体などの多面体、または角錐である場合について説明する。この場合、検出対象物体の1つの平面に関する3次元データの抽出のために、3次元形状測定装置20Aに最も近い点を表す3次元データとその付近の点を表す3次元データ(X,Y,Z座標値)を、平面の式である下記数2の左辺のx,y,zにそれぞれ代入し、最小2乗法を用いて未知数a,b,c,dを計算する。次に、この計算した未知数a,b,c,dを用いた下記数2によって表された平面と、前記代入した各3次元データとを用いて、各3次元データにより表された点から前記平面までの距離をそれぞれ計算する。そして、前記計算した全ての距離が所定の判別値以内であれば、これらの全ての3次元データを含む平面を定義する。一方、前記計算した全ての距離が所定の判別値以内でなければ、前記平面の計算に利用した3次元データとは異なる位置にある点およびその近傍の点をそれぞれ表す複数の3次元データを用いて、前記と同様な平面の定義に関する処理を行う。これらの処理を平面が定義されるまで繰り返し行う。なお、前記計算した全ての距離が所定の判別値以内でなくても、判別値以内でない距離が極めて少数であれば、判別値以内でない距離に関する3次元データを除いて平面を定義するようにしてもよい。
【0040】
【数2】
a・x+b・y+c・z+d=0
【0041】
そして、平面が定義されれば、該当する探索ブロック内の他の3次元データによって表された点と前記数2によって表された平面までの距離を計算して、この距離が所定の判別値以内の点に関する3次元データを前記平面内にあるものとして取得する。次に、前記平面を定義するために利用した3次元データおよび同平面内にあるものとして取得された点に関する3次元データの中から、平面の周辺に対応する3次元データを取得して、同取得した3次元データを用いて平面の1辺の長さを計算する。そして、この計算した1辺の長さと、前記ステップS12の処理時に検出対象物体の特徴として入力した1辺の長さとの差を計算して、この計算した差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致する可能性があると判定して、後述する他の平面の定義を行う。一方、前記差が所定の判別値以内でなければ、前記探索ブロック内の3次元データは合致しないとして、同3次元データを破棄する。この場合、該当探索ブロック内には、検出対象物体の3次元形状を表す3次元データが存在しないことになる。
【0042】
前記のようにして可能性があると判定した場合には、該当する探索ブロック内の取得されていない3次元データに関しても、他の平面に関する3次元データの取得のために、前記のような平面に関する3次元データの取得処理を実行する。この他の平面に関しては、最初の平面とのなす角度(例えば、立方体または直方体の隣り合う2面間であれば90度)と、前記定義した平面の周辺に対応する3次元データとを用いて平面を定義して、同定義した平面に属する点を表す3次元データを取得する。そして、取得した3次元データの中から、前記と同様に、平面の周辺に対応する3次元データを取得して、同取得した3次元データを用いて平面の1辺の長さを計算する。そして、この計算した1辺の長さと前記ステップS12の処理時に検出対象物体の特徴として入力した1辺の長さとの差を計算して、この計算した差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致すると判定する。
【0043】
なお、検出対象物体の3次元形状を表す3次元データの1回目の取得に関しては、検出対象物体が立方体または直方体で基台10の上面に裏面を合わせて置かれている場合には、3次元形状測定装置20Aに最も近い点を含み、基台10の上面に平行な平面の式を定義し、この式に該当する探索ブロック内の全ての3次元データを適用して、前記平面よりの距離が判別値以内にある3次元データを取得するようにしてもよい。
【0044】
さらに、類似の3次元形状の物体が多数あるときは、定義した平面の式より、平面と平面が交わる角度(物体が基台10の上面に裏面を合わせて置かれているときには、基台10の上面と平面が交わる角度を加えてもよい)を計算し、この角度と検出対象物体の特徴によって定まる角度との差が判別値以内であるかを、検出対象物体に関する3次元データを取得するための判定条件に加えるとよい。
【0045】
次に、検出対象物体が、円柱または円錐である場合について説明する。この場合、該当する探索ブロック内に円柱または円錐の中心線に垂直な平面をいくつか想定し、同各平面ごとに平面内に属する点を表す3次元データを前記平面の座標データに変換した後、円の式である下記数3に適用して、最小2乗法により前記数3の未知数a,b,dを計算する。
【0046】
円柱の中心線に垂直な平面は、円柱内の平面である箇所(上面または底面)の3次元データを、立方体、直方体などの多面体の場合と同様な方法で抽出し、抽出した3次元データを含む平面を定義して、この平面に平行な面を想定すればよい。また、円錐の中心線に垂直な平面は、抽出された単位ブロックの数が減少する方向にほぼ平行で単位ブロックが最も減少した箇所を含み、かつZ軸方向(3次元形状測定装置20Aの方向)にほぼ平行な平面と、この平面と平行な平面を定義し、この面内において、単位ブロックの数が減少する方向とは逆方向で3次元データが途切れる点または3次元データが角度を形成する点(すなわち、円錐の底面の円周上にある点)を抽出し、この点を含む平面を定義して、この平面に平行な面を想定すればよい。なお、円柱または円錐が基台10の上面に底面を合わせて置かれている場合には、上記のような処理は必要なく、基台10の上面に平行な平面を想定すればよい。
【0047】
【数3】
(x−a) 2+(y−b) 2−d2=0
【0048】
次に、前記各平面内にあった全ての3次元データによって表された点と、前記計算した値a,bとを用いて、前記全ての3次元データに対応した点から前記数3によって定義される円の中心(値a,bによって定義される)までの距離をそれぞれ計算する。そして、この計算した全ての距離の偏差を計算し、検出対象物体が円柱の場合には前記計算した値dと、前記ステップS12で入力した直径の半値(半径)との差が所定の判別値以内であり、かつ前記偏差が所定の判別値以内であるとき、円が定義され、探索ブロック内の3次元データは合致する可能性があると判定される。また、検出対象物体が円錐の場合には、前記計算した値dが前記ステップS12で入力した直径の半値(半径)以下であり、かつ前記偏差が所定の判別値以内であるとき、円が定義され、探索ブロック内の3次元データは合致する可能性があると判定される。一方、前記計算した値dおよび偏差が所定の判別値以内でなければ、前記探索ブロック内の3次元データは合致しないとして同3次元データを破棄する。この場合、該当する探索ブロック内には、検出対象物体の3次元形状を表す3次元データが存在しないことになる。
【0049】
また、円柱の場合には、各平面における円の中心の座標を、各平面の式により3次元データに変換し、この3次元データを含む直線を定義し、この直線を含み、Z軸方向(3次元形状測定装置20Aの方向)にほぼ平行な平面を定義する。この平面内に含まれる3次元データから、先に抽出した円柱の平面箇所(上面または底面)に含まれる3次元データを除き、残りの直線状になっている3次元データから長さ(すなわち、円柱の高さ)を計算する。この計算した高さと、前記ステップS12の処理時に検出対象物体の特徴として入力した高さの差を計算して、この計算した差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致すると判定する。なお、円柱が基台10の上面に底面を合わせて置かれている場合には、高さを計算するために、上記のような処理は必要なく、基台10の上面の3次元データを含む平面の式と前記定義した円柱の上面の3次元データを含む平面の式とから、2つの平面の間隔を計算すればよい。
【0050】
また、円錐の場合には、前記想定した複数の平面から1つの平面を任意に選定し、その他の各平面ごとに、計算で求められた値d(円の半径)と前記選定された平面における値d(円の半径)の差を、前記選定された平面からの距離で除算した値を計算し、各平面ごとの前記値と、前記ステップS12の処理時に入力した直径の半値(半径)を同入力した高さで除算した値との差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致する可能性があると判定し、後述する高さによる判別を行う。計算した差が所定の判別値以内でなければ、前記探索ブロック内の3次元データは合致しないとして同3次元データを破棄する。この場合、該当探索ブロック内には、検出対象物体の3次元形状を表す3次元データが存在しないことになる。
【0051】
円錐の高さは、前記想定した平面の中の任意の2平面における値d(円の半径)と前記2平面の間隔より円錐の頂点から前記2平面までの距離が計算されるので、この距離に前記2平面と前記で定義した円錐の底面の間隔を加算すれば求めることができる。求めた高さと、前記ステップS12の処理時に検出対象物体の特徴として入力した高さとの差を計算して、この計算した差が所定の判別値以内であれば、前記探索ブロック内の3次元データは合致すると判定する。なお、円錐が基台10の上面に底面を合わせて置かれている場合には、高さを計算するために、円錐の底面の代わりに基台10の上面を用いればよい。
【0052】
前記ステップS22の3次元データの抽出処理後、3次元画像処理装置34は、ステップS24にて前記抽出した3次元データを用いて検出対象物体の形状を表す3次元画像データを生成して表示装置34に出力する。そして、ステップS26にてこの検出対象物体表示プログラムの実行を終了する。表示装置34は、前記入力した画像データにより表された画像を表示するので、検出対象物体の3次元画像が表示装置34に表示される。
【0053】
上記作動説明からも理解できるとおり、上記実施形態によれば、検出対象物体表示プログラムの実行により、3次元形状測定装置20Aを用いて測定した測定領域内に位置する複数の物体OBの形状を表す3次元データの中から、特定の検出対象物体の形状を表す3次元データが抽出される。
【0054】
そして、このプログラムにおいては、上記ステップS16,S18の処理により、測定領域内で少なくとも検出対象物体の含まれる可能性のある領域が単位ブロックずつに分割されて、単位ブロックの大きさずつに分割された領域内で所定数以上の3次元データを含む単位ブロックが抽出される。また、上記ステップS20の処理により、検出対象物体の含まれる可能性のある領域内で探索ブロックが順次移動しながら、探索ブロックに含まれかつ前記抽出した単位ブロックの数または分布を調べることにより、検出対象物体を包含する可能性のある探索ブロックの位置が検出される。そして、上記ステップS22の処理により、3次元データが検出対象物体の形状に合致するかが判定される。その結果、上記実施形態によれば、処理すべきデータ量を少なくすることができ、短い処理時間で、検出対象物体の3次元形状を表す3次元データを抽出することができるようになる。
【0055】
また、上記ステップS12の処理により、検出対象物体の特徴を入力装置33を用いて任意に入力可能としたので、検出対象物体を容易に設定できるようになる。さらに、上記ステップS14の処理により、3次元探索ブロックの大きさが検出対象物体の大きさに応じて自動的かつ適切に設定されるので、処理すべき3次元データ量を適切に減少させることができ、処理時間をより的確に節約できるようになる。
【0056】
以上、本発明の一実施形態について説明したが、本発明の実施にあたっては、上記実施形態に限定されるものではなく、本発明の目的を逸脱しない限りにおいて種々の変形も可能である。
【0057】
例えば、上記実施形態においては、図2のステップS12,S14において、検出対象物体の特徴、単位ブロックおよび探索ブロックのサイズを設定するようにした。しかし、これに代えて、予め設定されている検出対象物体の特徴、単位ブロックおよび探索ブロックのサイズをそのまま利用する場合には、これらのステップS12,S14の処理は不要である。
【0058】
また、上記ステップS16の探索領域のブロック化処理においては、物体OBの存在しない連続領域、すなわち物体OBに関する3次元データの含まれない連続領域を単位ブロックによる分割領域外とした。しかし、測定対象領域全体に渡って物体OBが存在しているような場合には、測定対象領域の全領域に渡って単位ブロックによる分割を行うようにしてもよい。
【0059】
また、上記実施形態においては、1つの3次元形状測定装置20Aを用いて全ての物体OBを同時に3次元測定して、同3次元測定によって得られた3次元データの中から検出対象物体に関する3次元データを単に抽出する3次元形状測定システムに本発明を適用した。しかし、本発明は、図7に示すように複数の3次元形状測定装置20A,20B,20Cを用いた多視点形状測定において、各視点での3次元データを同一の座標系の3次元データに変換する変換パラメータを計算するために適用すると有効である。
【0060】
すなわち、複数の3次元形状測定装置20A,20B,20Cによりそれぞれ測定した複数の物体OBに関する複数組の3次元データを取得し、各組ごとに、同一の検出対象物体に関する3次元データを取出すとともに、同取出した3次元データに基づいて検出対象物体の特定点を表す3次元データを計算し、同計算した各特定点を表す3次元データを同一の基準座標系に変換するための変換パラメータを計算する。そして、この計算した変換パラメータを用いて、3次元形状測定装置20A,20B,20Cにより取得した各3次元データを前記基準座標系の3次元データに変換すれば、多視点による3次元測定結果を1つの基準座標系として扱うことができるようになる。
【0061】
また、上記実施形態においては、基台10上の載置した物体OBに対して3次元測定する3次元形状測定システムに本発明を適用した例について説明した。しかし、これに代えて、本発明を、生産ライン、検査ラインなどの各種ライン上を次々に移動する物体の立体形状を次々に測定するようにした3次元形状測定にも適用できる。
【図面の簡単な説明】
【図1】 本発明の一実施形態に係る3次元形状測定システムの概略図である。
【図2】 図1の3次元画像処理装置によって実行される検出対象物体表示プログラムのフローチャートである。
【図3】 検出対象物体、単位ブロックおよび探索ブロックを立体的に示す概念図である。
【図4】 探索領域を2次元的に示す概念図である。
【図5】 (A)〜(C)は、探索ブロックと抽出された単位ブロックの関係を2次元的に示す概念図である。
【図6】 (A)〜(D)は、探索領域内における探索ブロックの移動を2次元的に示す概念図である。
【図7】 本発明の他の実施形態に係る3次元形状測定システムの概略図である。
【符号の説明】
10…基台、20A,20B,20C…3次元形状測定装置、31…コントローラ、32…3次元画像処理装置、33…入力装置、34…表示装置、OB…物体。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a three-dimensional data extraction method and three-dimensional data extraction method for extracting three-dimensional data representing a three-dimensional shape of a detection target object from three-dimensional data representing a three-dimensional shape of a plurality of objects arranged in a measurement region. The present invention relates to a data extraction apparatus.
[0002]
[Prior art]
Conventionally, three-dimensional data representing a three-dimensional shape of a detection target object is extracted from three-dimensional data representing a three-dimensional shape of a plurality of objects located in a measurement region measured using a three-dimensional shape measuring apparatus. This has been done (see Patent Document 1). In this case, all the three-dimensional data obtained by the measurement are divided into three-dimensional data for each object, and then it is determined whether each of the divided three-dimensional data matches the feature of the object.
[0003]
[Patent Document 1]
JP-A-7-244714
[0004]
[Problems to be solved by the invention]
However, in the above conventional method, it is possible to divide all three-dimensional data for each object, to determine whether each divided three-dimensional data matches the characteristics of the object, or to process a large amount of three-dimensional data. Therefore, there is a problem that a great deal of processing time is required.
[0005]
SUMMARY OF THE INVENTION
The present invention has been made to address the above-described problems, and its object is to detect a target object from three-dimensional data representing the three-dimensional shape of a plurality of objects arranged in a measurement region in a short processing time. It is an object of the present invention to provide a three-dimensional data extraction method and a three-dimensional data extraction apparatus for extracting three-dimensional data representing the three-dimensional shape.
[0006]
In order to achieve the above object, the present invention is characterized by dividing at least a region in which a detection target object may be included in a measurement region into unit blocks, and a predetermined number of 3 or more in the divided region. Extract unit blocks including dimensional data, and sequentially move the search block that can include the detection target object and include multiple unit blocks within the area where the detection target object may be included. For each movement, by detecting the number or distribution of the extracted unit blocks included in the search block and detecting the position of the search block that may include the detection target object, That is, three-dimensional data that matches the shape of the detection target object is extracted from the three-dimensional data included in the search block.
[0007]
In this case, in detecting the position of the search block including the detection target object, for example, the position of the search block is detected on the condition that the number of extracted unit blocks included in the search block is equal to or greater than a predetermined number. be able to. Further, instead of or in addition to the above condition, the position of the search block may be detected based on the distribution of unit blocks. For example, when the detection target object is a sphere, the position of the search block on condition that the number of unit blocks for each column when viewed in a plane from the direction of the three-dimensional shape measuring apparatus is within a predetermined range. Is detected. When the detection target object is other than a sphere, the unit blocks extracted in the central plane of the search block are linearly continuous for a predetermined number or more, or exist in an elliptical shape for a predetermined number or more. On the surface, the search block position is extracted on condition that the number of extracted unit blocks is not more than a predetermined number.
[0008]
In addition, when the detection target is other than a sphere and the bottom surface is placed on the surface of the flat plate, the unit blocks are stacked and stacked with the upper surface of the flat plate as the bottom surface. If the object to be detected is a polyhedron such as a cube or a rectangular parallelepiped, or a cylinder, the unit blocks extracted in each plane in the height direction are present in a predetermined number or more in a straight line or a circle, and the upper surface of the search block The search block position is extracted on the condition that the number of extracted unit blocks is within a predetermined range. If the detection target is a pyramid or a cone, the unit blocks extracted in each plane in the height direction gradually decrease upward, and the number of unit blocks extracted on the upper surface of the search block is predetermined. The search block position is extracted on condition that the number is less than or equal to the number.
[0009]
In the present invention configured as described above, first, at least a region that may contain the detection target object is divided into unit blocks in the measurement region, and a predetermined number of 3 or more is divided in the divided region. Extract unit blocks containing dimensional data. This process is simple because it is only necessary to confirm the presence of the three-dimensional data and to detect the number thereof. Then, in the next stage, by sequentially moving the search block within the area where the detection target object may be included, the number or distribution of the extracted unit blocks included in the search block is examined, thereby detecting the detection target. A position of a search block that may include an object is detected. This process is simple because only the existence and the number or distribution of the extracted unit blocks are examined. In the last stage, it is determined whether or not the three-dimensional data matches the shape of the detection target object. However, since the determination may be based on only the three-dimensional data included in the search block where the position is detected, the determination process There is little 3D data to be processed, and this process can be completed in a short time. As a result of such processing, according to the present invention, three-dimensional data representing the three-dimensional shape of the detection target object can be extracted in a short processing time.
[0010]
Further, another feature of the present invention is that the feature of the detection target object can be input using an input device. According to this, it becomes possible to easily set the detection target object.
[0011]
Another feature of the present invention is that the size of the three-dimensional search block is set in accordance with the size of the detection target object. According to this, since a three-dimensional search block having an appropriate size is set for each detection target object, the amount of three-dimensional data to be processed can be appropriately reduced, and the processing time can be saved more accurately. become.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a schematic diagram of a three-dimensional image system to which the present invention is applied.
[0013]
This three-dimensional image system includes a three-dimensional shape measuring device 20A directed toward a measurement target space formed on the
[0014]
As the three-dimensional shape measuring apparatus 20A, any three-dimensional shape measuring apparatus can be used as long as it measures the three-dimensional surface shape of the object OB and outputs a signal representing the measured three-dimensional surface shape. In the present embodiment, a brief description will be given of measuring a three-dimensional surface shape of an object according to a triangulation method using laser light.
[0015]
In this three-dimensional shape measuring apparatus, a virtual plane that is substantially perpendicular to the traveling direction of laser light emitted from a laser light source toward an object is assumed, and an X-axis direction and a Y-axis that are orthogonal to each other on the virtual plane. Assume a large number of minute areas divided along the direction. Then, the three-dimensional shape measuring apparatus sequentially irradiates the plurality of minute areas with laser light, sequentially detects the distance to the object surface defined by the minute areas by reflected light from the object as a Z-axis direction distance, Information on X, Y, and Z coordinates representing each divided area position obtained by dividing the surface of the object into minute areas is obtained, and the shape of the object surface facing the three-dimensional shape measuring apparatus is measured.
[0016]
Accordingly, the three-dimensional shape measuring apparatus includes an X-axis direction scanner that changes the direction of the emitted laser light in the X-axis direction, a Y-axis direction scanner that changes the direction of the emitted laser light in the Y-axis direction, and an object surface. And a distance detector for detecting the distance to the object surface by receiving the reflected laser beam reflected by the. The X-axis direction scanner and the Y-axis direction scanner may be any mechanism that can change the optical path of the laser beam emitted from the laser light source independently in the X-axis direction and the Y-axis direction. Rotating around the axis in the direction and the Y-axis direction by an electric motor, or rotating the galvanometer mirror provided in the optical path of the emitted laser light and changing the direction around the axes in the X-axis direction and the Y-axis direction by the electric motor Can be used. As the distance detector, a plurality of imaging lenses such as an imaging lens that condenses the reflected laser light reflected on the object surface and rotates following the optical path of the emitted laser light, and a CCD that receives the condensed laser light are used. It is possible to use a mechanism for detecting the distance to the object surface based on the light receiving position of the reflected laser beam by the line sensor.
[0017]
Therefore, such a three-dimensional shape measuring apparatus uses the reference direction of the laser beam emitted by the X-axis direction scanner as information on the X, Y, and Z coordinates representing the divided area positions obtained by dividing the surface of the object into minute areas. The inclination θx in the X-axis direction with respect to the angle, the inclination θy in the Y-axis direction with respect to the reference direction of the laser beam emitted by the Y-axis direction scanner, and the distance Lz to the object surface by the distance detector are the virtual X-axis direction. And output for each of a large number of minute areas divided along the Y-axis direction. More specifically, the inclinations θx and θy in the X-axis and Y-axis directions are rotation angles from the reference position of the electric motor. Further, the distance Lz to the object surface is the light receiving position of the reflected laser beam in the line sensor.
[0018]
A
[0019]
The three-dimensional
[0020]
Next, the operation of the three-dimensional image system configured as described above will be described. It is assumed that a plurality of objects OB are placed on the
[0021]
The three-dimensional
[0022]
Next, the user operates the
[0023]
After starting the execution of the program, the three-dimensional
[0024]
In this case, if the detection target object is a sphere, data indicating that the shape is a sphere and data indicating the diameter are input. If it is a polyhedron such as a cube or a cuboid, data indicating that the shape is a specific polyhedron and data indicating the length of a side (in the case of a cube, data indicating the length of one side, in the case of a cuboid) Data representing the length of two or three sides). In the case of a cylinder and a cone, data indicating that the shape is a cylinder or a cone and data indicating a diameter and a height are input. In the case of a pyramid, data indicating that the shape is a specific pyramid and data indicating the length and height of one side of the bottom surface are input. In addition, when the feature of the detection target object input before is used continuously, the process of step S12 may be skipped.
[0025]
Next, in step S14, the three-dimensional
[0026]
The dimensions of the unit block and the search block will be described with specific examples. For example, if the object to be detected is a sphere having a diameter of 25 mm, the length of one side of the cube is set to 4 mm as the size of the unit block, and the length of one side of the cube is set to 32 mm as the size of the search block. . According to this, the search block includes 8 × 8 × 8 unit blocks, 24 mm out of 25 mm in diameter is completely included in 6 unit blocks, and the remaining 1 mm is 1 or 2 units. It will be included in the unit block. FIG. 3 is a perspective view showing the relationship between the unit block and the search block. The same applies to the case where the detection target object is not a sphere, and depending on the characteristics of the detection target object, it may be more efficient to use a rectangular parallelepiped as the unit block and the search block.
[0027]
Next, the three-dimensional
[0028]
When the three-dimensional data is converted into three-dimensional data relating to the X ′, Y ′, Z ′ coordinates with the specific position on the upper surface of the base 10 shown in FIG. 1 as the origin, the three-dimensional data relating to the object OB is obtained. The unit blocks may be arranged in a plane with the upper surface of the existing
[0029]
Next, in step S18, the three-dimensional
[0030]
Next, in step S20, the three-dimensional
[0031]
In this case, if the detection target object is a sphere, it is located on the side facing the three-dimensional shape measuring apparatus 20A to obtain three-dimensional data, and located on the side not facing the three-dimensional shape measuring apparatus 20A. Since the ratio of the places where the dimension data cannot be obtained is substantially the same, if the diameter of the sphere is specified, the number of unit blocks included in the search block is set. As a result, if the sphere shown in FIG. 5 (A) is a detection target object, a sphere having a smaller diameter than the detection target object as shown in FIG. 5 (B) is assumed that the number of unit blocks is outside the predetermined range. Can be excluded.
[0032]
However, in the case of a sphere having a diameter larger than that of the detection target object as shown in FIG. 5C, the number of unit blocks extracted depending on the position of the search block may fall within a predetermined range. It is detected as a position. In addition, when the detection target object is other than a sphere, it is located on the side facing the 3D shape measuring apparatus 20A to obtain 3D data, and located on the side not facing the 3D shape measuring apparatus 20A. Since the ratio of the places where the three-dimensional data cannot be obtained changes depending on how the object is placed, the number of unit blocks extracted in the search block changes. Furthermore, when several types of objects are placed, it is assumed that the number of unit blocks included in the search block is within a predetermined range for an object having a shape different from the shape of the detection target object. The possibility of detection increases. For this reason, instead of or in addition to the number of unit blocks containing a predetermined number or more of three-dimensional data, extraction of the corresponding search block position based on the distribution of the unit blocks excludes objects that are not detection targets. Can do.
[0033]
For example, when the detection target object is a sphere, the search block is viewed from the three-dimensional shape measuring apparatus 20A side (that is, viewed from the Z-axis direction) as shown in FIG. Assuming that the unit block is extracted as a unit block extracted in the plane of the X and Y axes, the number extracted in each column of the unit blocks in the plane of the X and Y axes is within the set number range. The search block position may be detected as a condition. In this way, if FIG. 5A is a detection target object, a sphere whose diameter is clearly different from that of the detection target object as shown in FIGS. 5B and 5C is a unit of a plane in the X and Y axes. The number extracted in each column of blocks can be excluded as being outside the set number range.
[0034]
Further, the unit blocks obtained by extracting the objects detected in the above processing in the X, Z plane or the Y, Z plane of each row in the X, Y axis plane unit blocks are distributed in a circle. If additional detection is performed as a condition, it is possible to exclude those detected because the diameter is equal to a cylinder or cone and the central axis is directed in the Z-axis direction. In addition, when the detection target object is an object other than a sphere, a predetermined number or more of unit blocks extracted in the plane of the central portion of the search block exist continuously in a straight line or an ellipse, and the periphery of the search block The search block position is extracted on the condition that the number of extracted unit blocks is equal to or less than a predetermined number.
[0035]
Note that when the unit blocks are arranged in a plane with the surface of the base 10 shown in FIG. 1 as the bottom surface and the unit blocks are stacked above, the detection target object is a polyhedron such as a cube or a rectangular parallelepiped. In the case of a cylinder or a cylinder, a predetermined number or more of unit blocks extracted in each plane in the height direction are present in a linear or circular shape, and the number of extracted unit blocks is within a predetermined range on the upper surface of the search block. The search block position is extracted on the condition that If the detection target is a pyramid or a cone, the unit blocks extracted in each plane in the height direction gradually decrease upward, and the number of unit blocks extracted on the upper surface of the search block is predetermined. The search block position is extracted on condition that the number is less than or equal to the number.
[0036]
Next, in step S22, the three-dimensional
[0037]
For example, if the object to be detected is a sphere, all the three-dimensional data (X, Y, Z coordinate values) in the corresponding search block are converted to x, y, z on the left side of the following equation (1) that is a formula representing the sphere. And the unknowns a, b, c, and d are calculated using the least square method. In this case, a, b, and c represent X, Y, and Z coordinate values of the sphere center represented by the three-dimensional data, respectively, and d represents the radius of the sphere. Next, for each three-dimensional data (X, Y, Z coordinate values) in the corresponding search block, the same three-dimensional data (X, Y, Z coordinate values) and the calculated values a, b, c are obtained. Substituting into Equation 1 below, the value d (distance from the center of the sphere) is calculated for each three-dimensional data. The difference between the calculated value d (sphere radius) and the half value (radius) of the diameter input in step S12 is within a predetermined discriminant value, and the deviation of the distance from the sphere center of each three-dimensional data Is within a predetermined discriminant value, the three-dimensional data in the search block are determined to match and the three-dimensional data is extracted. On the other hand, if the difference or deviation is not within a predetermined discriminant value, the 3D data in the search block is not matched and the 3D data is not extracted.
[0038]
[Expression 1]
(x-a) 2 + (Y−b) 2 + (Z-c) 2 -D 2 = 0
[0039]
Next, a case where the detection target object is a polyhedron such as a cube or a rectangular parallelepiped, or a pyramid will be described. In this case, in order to extract three-dimensional data related to one plane of the detection target object, three-dimensional data representing a point closest to the three-dimensional shape measuring apparatus 20A and three-dimensional data (X, Y, (Z coordinate value) is substituted into x, y, z on the left side of the following equation 2 which is a plane equation, and unknowns a, b, c, d are calculated using the least square method. Next, the plane represented by the following equation 2 using the calculated unknowns a, b, c, and d and the substituted three-dimensional data are used to calculate the points from the points represented by the three-dimensional data. Calculate the distance to the plane. If all the calculated distances are within a predetermined discrimination value, a plane including all these three-dimensional data is defined. On the other hand, if all the calculated distances are not within a predetermined discriminant value, a plurality of three-dimensional data respectively representing a point at a position different from the three-dimensional data used for the calculation of the plane and its neighboring points are used. Thus, the same processing relating to the definition of the plane is performed. These processes are repeated until a plane is defined. Even if all the calculated distances are not within the predetermined discriminant value, if there are very few distances that are not within the discriminant value, the plane is defined excluding the three-dimensional data related to the distance that is not within the discriminant value. Also good.
[0040]
[Expression 2]
a.x + b.y + c.z + d = 0
[0041]
If a plane is defined, the distance between the point represented by the other three-dimensional data in the corresponding search block and the plane represented by the formula 2 is calculated, and this distance is within a predetermined discrimination value. The three-dimensional data regarding the point is acquired as being in the plane. Next, three-dimensional data corresponding to the periphery of the plane is acquired from the three-dimensional data used to define the plane and the three-dimensional data regarding the points acquired as being in the same plane. The length of one side of the plane is calculated using the acquired three-dimensional data. Then, a difference between the calculated length of one side and the length of one side input as the feature of the detection target object at the time of the processing of step S12 is calculated, and if the calculated difference is within a predetermined determination value. Then, it is determined that the three-dimensional data in the search block may match, and another plane to be described later is defined. On the other hand, if the difference is not within the predetermined discriminant value, the 3D data in the search block is determined not to match and the 3D data is discarded. In this case, three-dimensional data representing the three-dimensional shape of the detection target object does not exist in the corresponding search block.
[0042]
When it is determined that there is a possibility as described above, even for the three-dimensional data that has not been acquired in the corresponding search block, in order to acquire the three-dimensional data related to other planes, 3D data acquisition processing is executed. With respect to the other planes, an angle formed with the first plane (for example, 90 degrees between two adjacent faces of a cube or a rectangular parallelepiped) and three-dimensional data corresponding to the periphery of the defined plane are used. A plane is defined, and three-dimensional data representing points belonging to the defined plane is acquired. Then, in the same way as described above, three-dimensional data corresponding to the periphery of the plane is acquired from the acquired three-dimensional data, and the length of one side of the plane is calculated using the acquired three-dimensional data. Then, the difference between the calculated length of one side and the length of one side input as the feature of the detection target object at the time of the process of step S12 is calculated, and if the calculated difference is within a predetermined determination value, It is determined that the three-dimensional data in the search block matches.
[0043]
In addition, regarding the first acquisition of the three-dimensional data representing the three-dimensional shape of the detection target object, when the detection target object is a cube or a rectangular parallelepiped and placed on the upper surface of the
[0044]
Furthermore, when there are many similar three-dimensional objects, the angle between the plane and the plane is determined from the defined plane equation (when the object is placed with the back surface on the upper surface of the
[0045]
Next, a case where the detection target object is a cylinder or a cone will be described. In this case, after assuming several planes perpendicular to the center line of the cylinder or cone in the corresponding search block, after converting the three-dimensional data representing the points belonging to the plane for each plane into the coordinate data of the plane The unknown numbers a, b, and d of the formula 3 are calculated by the least square method by applying to the following formula 3 which is an equation of a circle.
[0046]
For the plane perpendicular to the center line of the cylinder, the 3D data of the place (top or bottom surface) that is the plane in the cylinder is extracted in the same way as in the case of a polyhedron such as a cube or a rectangular parallelepiped. What is necessary is just to define the plane to include and to consider a plane parallel to this plane. Further, the plane perpendicular to the center line of the cone includes a portion where the number of unit blocks is reduced most substantially parallel to the direction in which the number of extracted unit blocks decreases, and the Z-axis direction (the direction of the three-dimensional shape measuring apparatus 20A). ) And a plane parallel to this plane, and in this plane, the point where the three-dimensional data is interrupted in the direction opposite to the direction in which the number of unit blocks decreases, or the three-dimensional data forms an angle. What is necessary is just to extract a point to be performed (that is, a point on the circumference of the bottom surface of the cone), define a plane including this point, and assume a plane parallel to this plane. In addition, when the cylinder or the cone is placed with the bottom surface aligned with the top surface of the
[0047]
[Equation 3]
(x-a) 2 + (Y−b) 2 -D 2 = 0
[0048]
Next, using the points represented by all the three-dimensional data in the respective planes and the calculated values a and b, the points corresponding to the three-dimensional data are defined by the equation (3). Calculate the distance to the center of the circle (defined by values a and b), respectively. Then, the deviation of all the calculated distances is calculated, and when the detection target object is a cylinder, the difference between the calculated value d and the half value (radius) of the diameter input in step S12 is a predetermined discriminant value. If the deviation is within the predetermined discriminant value, a circle is defined, and it is determined that the three-dimensional data in the search block may match. When the object to be detected is a cone, a circle is defined when the calculated value d is equal to or less than the half value (radius) of the diameter input in step S12 and the deviation is within a predetermined discriminant value. Then, it is determined that the three-dimensional data in the search block may match. On the other hand, if the calculated value d and deviation are not within a predetermined discriminant value, the three-dimensional data in the search block are not matched and the three-dimensional data is discarded. In this case, three-dimensional data representing the three-dimensional shape of the detection target object does not exist in the corresponding search block.
[0049]
In the case of a cylinder, the coordinates of the center of the circle in each plane are converted into three-dimensional data by the formula of each plane, a straight line including the three-dimensional data is defined, the straight line including the straight line is included, and the Z-axis direction ( A plane substantially parallel to the direction of the three-dimensional shape measuring apparatus 20A) is defined. From the three-dimensional data included in this plane, the three-dimensional data included in the planar portion (upper surface or bottom surface) of the previously extracted cylinder is removed, and the length (ie, the length (ie, Calculate the height of the cylinder). The difference between the calculated height and the height input as the feature of the detection target object at the time of the processing of step S12 is calculated, and if the calculated difference is within a predetermined discriminant value, the 3D in the search block It is determined that the data match. If the cylinder is placed with the bottom surface aligned with the top surface of the
[0050]
In the case of a cone, one plane is arbitrarily selected from the plurality of assumed planes, and the value d (circle radius) obtained by calculation and the selected plane for each other plane. A value obtained by dividing the difference between the values d (circle radius) by the distance from the selected plane is calculated, and the value for each plane and the half value (radius) of the diameter input during the process of step S12 are calculated. If the difference from the value divided by the input height is within a predetermined discriminant value, it is determined that the three-dimensional data in the search block may be matched, and discriminating by height described later is performed. If the calculated difference is not within a predetermined discriminant value, the three-dimensional data in the search block is determined not to match and the three-dimensional data is discarded. In this case, three-dimensional data representing the three-dimensional shape of the detection target object does not exist in the corresponding search block.
[0051]
The height of the cone is calculated by calculating the distance from the apex of the cone to the two planes based on the value d (circle radius) in any two planes in the assumed plane and the interval between the two planes. Can be obtained by adding the distance between the two planes and the bottom surface of the cone defined above. The difference between the obtained height and the height input as the feature of the detection target object at the time of the processing of step S12 is calculated, and if the calculated difference is within a predetermined discrimination value, the three-dimensional data in the search block Is determined to match. When the cone is placed with the bottom surface aligned with the top surface of the
[0052]
After the extraction processing of the three-dimensional data in step S22, the three-dimensional
[0053]
As can be understood from the above description of operation, according to the above embodiment, the execution of the detection target object display program represents the shapes of a plurality of objects OB positioned in the measurement region measured using the three-dimensional shape measurement apparatus 20A. Three-dimensional data representing the shape of a specific detection target object is extracted from the three-dimensional data.
[0054]
In this program, by the processing in steps S16 and S18, at least the area that may contain the detection target object in the measurement area is divided into unit blocks and divided into unit blocks. A unit block including a predetermined number or more of three-dimensional data is extracted in the region. Further, by the process of step S20, while the search block sequentially moves within the area where the detection target object may be included, by examining the number or distribution of the extracted unit blocks included in the search block, A position of a search block that may include the detection target object is detected. Then, it is determined by the process of step S22 whether the three-dimensional data matches the shape of the detection target object. As a result, according to the above embodiment, the amount of data to be processed can be reduced, and three-dimensional data representing the three-dimensional shape of the detection target object can be extracted in a short processing time.
[0055]
In addition, since the feature of the detection target object can be arbitrarily input using the
[0056]
Although one embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the object of the present invention.
[0057]
For example, in the above embodiment, the features of the detection target object, the unit block, and the size of the search block are set in steps S12 and S14 of FIG. However, instead of this, when the preset characteristics of the detection target object, the unit block, and the size of the search block are used as they are, the processes of steps S12 and S14 are not necessary.
[0058]
Further, in the search area blocking process in step S16, a continuous area where the object OB does not exist, that is, a continuous area which does not include the three-dimensional data related to the object OB is excluded from the division area by the unit block. However, in the case where the object OB exists over the entire measurement target area, the unit block may be divided over the entire measurement target area.
[0059]
In the above-described embodiment, all three objects OB are simultaneously three-dimensionally measured using one three-dimensional shape measuring apparatus 20A, and 3 regarding the detection target object is selected from the three-dimensional data obtained by the three-dimensional measurement. The present invention is applied to a three-dimensional shape measurement system that simply extracts dimensional data. However, according to the present invention, as shown in FIG. 7, in multi-view shape measurement using a plurality of three-dimensional
[0060]
That is, a plurality of sets of three-dimensional data related to a plurality of objects OB measured by a plurality of three-dimensional
[0061]
Moreover, in the said embodiment, the example which applied this invention to the three-dimensional shape measurement system which measures three-dimensionally with respect to the object OB mounted on the
[Brief description of the drawings]
FIG. 1 is a schematic diagram of a three-dimensional shape measurement system according to an embodiment of the present invention.
FIG. 2 is a flowchart of a detection target object display program executed by the three-dimensional image processing apparatus of FIG.
FIG. 3 is a conceptual diagram three-dimensionally showing a detection target object, a unit block, and a search block.
FIG. 4 is a conceptual diagram showing a search area two-dimensionally.
FIGS. 5A to 5C are conceptual diagrams showing the relationship between a search block and an extracted unit block in a two-dimensional manner.
6A to 6D are conceptual diagrams showing two-dimensional movement of search blocks within a search area.
FIG. 7 is a schematic view of a three-dimensional shape measurement system according to another embodiment of the present invention.
[Explanation of symbols]
DESCRIPTION OF
Claims (6)
前記測定領域内で少なくとも検出対象物体の含まれる可能性のある領域を単位ブロックずつに分割し、
前記分割された領域内で所定数以上の3次元データを含む単位ブロックを抽出し、
検出対象物体の含まれる可能性のある領域内で、検出対象物体を包含し得るとともに複数の単位ブロックを包含する探索ブロックを単位ブロックを単位として順次移動させ、前記各移動ごとに、前記探索ブロックに含まれかつ前記抽出した単位ブロックの数または分布を調べることにより、検出対象物体を包含する可能性のある探索ブロックの位置を検出し、かつ
前記検出した位置の探索ブロック内に含まれる3次元データの中から、検出対象物体の形状に合致する3次元データを抽出するようにしたことを特徴とする3次元データ抽出方法。In a three-dimensional data extraction method for extracting three-dimensional data representing a three-dimensional shape of a detection target object from three-dimensional data representing a three-dimensional shape of a plurality of objects arranged in a measurement region,
Dividing at least a region where the detection target object may be included in the measurement region into unit blocks,
Extracting a unit block including a predetermined number or more of three-dimensional data in the divided area;
A search block that can include the detection target object and includes a plurality of unit blocks is sequentially moved in units of the unit block within the region where the detection target object may be included, and for each movement, the search block And the number or distribution of the extracted unit blocks is detected to detect the position of the search block that may include the detection target object, and the three-dimensional data included in the search block at the detected position. A three-dimensional data extraction method characterized in that three-dimensional data matching the shape of a detection target object is extracted from data.
前記測定領域内で少なくとも検出対象物体の含まれる可能性のある領域を単位ブロックずつに分割する単位ブロック分割手段と、
前記分割された領域内で所定数以上の3次元データを含む単位ブロックを抽出する単位ブロック抽出手段と、
検出対象物体の含まれる可能性のある領域内で、検出対象物体を包含し得るとともに複数の単位ブロックを包含する探索ブロックを単位ブロックを単位として順次移動させ、前記各移動ごとに、前記探索ブロックに含まれかつ前記抽出した単位ブロックの数または分布を調べることにより、検出対象物体を包含する可能性のある探索ブロックの位置を検出する探索ブロック位置検出手段と、
前記検出した位置の探索ブロック内に含まれる3次元データの中から、検出対象物体の形状に合致する3次元データを抽出する3次元データ抽出手段と
を備えたことを特徴とする3次元データ抽出装置。In a three-dimensional data extraction device for extracting three-dimensional data representing a three-dimensional shape of a detection target object from three-dimensional data representing a three-dimensional shape of a plurality of objects arranged in a measurement region,
Unit block dividing means for dividing an area in which at least the detection target object may be included in the measurement area into unit blocks;
Unit block extraction means for extracting unit blocks including a predetermined number of three-dimensional data in the divided area;
A search block that can include the detection target object and includes a plurality of unit blocks is sequentially moved in units of the unit block within the region where the detection target object may be included, and for each movement, the search block A search block position detecting means for detecting a position of a search block that may include a detection target object by examining the number or distribution of the extracted unit blocks included in
3D data extraction means comprising: 3D data extraction means for extracting 3D data matching the shape of the object to be detected from the 3D data included in the detected position search block apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003131634A JP3952467B2 (en) | 2003-05-09 | 2003-05-09 | 3D data extraction method and 3D data extraction apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003131634A JP3952467B2 (en) | 2003-05-09 | 2003-05-09 | 3D data extraction method and 3D data extraction apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004333371A JP2004333371A (en) | 2004-11-25 |
JP3952467B2 true JP3952467B2 (en) | 2007-08-01 |
Family
ID=33506756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003131634A Expired - Fee Related JP3952467B2 (en) | 2003-05-09 | 2003-05-09 | 3D data extraction method and 3D data extraction apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3952467B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5200582B2 (en) * | 2008-02-27 | 2013-06-05 | 国立大学法人浜松医科大学 | Method and system for measuring a three-dimensional relative relationship between a tip coordinate of a long axis portion of an object having a long axis portion and means for defining the position and orientation of the object |
US8184909B2 (en) | 2008-06-25 | 2012-05-22 | United Technologies Corporation | Method for comparing sectioned geometric data representations for selected objects |
-
2003
- 2003-05-09 JP JP2003131634A patent/JP3952467B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2004333371A (en) | 2004-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4290733B2 (en) | Three-dimensional shape measuring method and apparatus | |
US20170160077A1 (en) | Method of inspecting an object with a vision probe | |
EP2568253B1 (en) | Structured-light measuring method and system | |
EP2183544B1 (en) | Non-contact measurement apparatus and method | |
KR100708352B1 (en) | APPARATUS AND METHOD FOR 3DIMENSION CONFIGURATION MEASUREMENT WITHOUT PHASE SHIFT PROCESS AND 2pi; AMBIGUITY OF MOIRE PRINCIPLE | |
CN105627926A (en) | Four-camera group planar array feature point three-dimensional measurement system and measurement method | |
JP3944091B2 (en) | 3D image data generation method | |
JP6937482B2 (en) | Surface shape measuring device and its stitching measuring method | |
JP2021193400A (en) | Method for measuring artefact | |
WO2018109479A1 (en) | Method of obtaining data characterizing 3d-imaging equipment | |
JP2015072197A (en) | Shape measurement device, structure manufacturing system, shape measurement method, structure manufacturing method, and shape measurement program | |
JPH11151206A (en) | Eyeground image analyzing method and device therefor | |
JP4291178B2 (en) | 3D shape measuring system, measuring method, and 3D shape measuring stage device | |
JP5273091B2 (en) | 3D shape measuring apparatus and 3D shape measuring method | |
JP2011257293A (en) | Information processing apparatus, program and information processing system | |
JP3952467B2 (en) | 3D data extraction method and 3D data extraction apparatus | |
JP2010243273A (en) | Measuring method and measuring apparatus for object having cylindrical shape | |
JPH05135155A (en) | Three-dimensional model constitution device using successive silhouette image | |
Lee et al. | 3D foot scanner based on 360 degree rotating-type laser triangulation sensor | |
JP7502343B2 (en) | Image Processing System | |
JP2012026816A (en) | Dimension measuring method and device | |
JP4670700B2 (en) | 3D shape measuring device | |
EP4205921A1 (en) | Control device, robot, control method, and program | |
US20190113336A1 (en) | Multi-Directional Triangulation Measuring System with Method | |
KR101436097B1 (en) | Non-Contacting Method for Measuring 6-DOF Motion Based on Laser Sensor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050119 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060831 |
|
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: 20070418 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070420 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3952467 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130511 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130511 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 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130511 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130511 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160511 Year of fee payment: 9 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |