JP3800842B2 - Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program - Google Patents

Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program Download PDF

Info

Publication number
JP3800842B2
JP3800842B2 JP37268398A JP37268398A JP3800842B2 JP 3800842 B2 JP3800842 B2 JP 3800842B2 JP 37268398 A JP37268398 A JP 37268398A JP 37268398 A JP37268398 A JP 37268398A JP 3800842 B2 JP3800842 B2 JP 3800842B2
Authority
JP
Japan
Prior art keywords
code
spatial code
increase
decrease
spatial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP37268398A
Other languages
Japanese (ja)
Other versions
JP2000193438A (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.)
Suzuki Motor Co Ltd
Original Assignee
Suzuki Motor Co Ltd
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 Suzuki Motor Co Ltd filed Critical Suzuki Motor Co Ltd
Priority to JP37268398A priority Critical patent/JP3800842B2/en
Publication of JP2000193438A publication Critical patent/JP2000193438A/en
Application granted granted Critical
Publication of JP3800842B2 publication Critical patent/JP3800842B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、三次元形状を計測する方法および装置ならびに三次元形状計測用プログラムを記憶した記憶媒体に係り、特に、精度良く測定対象物の形状を計測する三次元形状計測方法および三次元形状計測装置に関する。
【0002】
【従来の技術】
従来、三次元形状を計測するために、レーザ光の照射角度と当該レーザ光の戻り光を受光するCCDの受光素子の位置とに基づいて、三角測量の原理により測定対象物表面までの距離を算出している。例えば、同一出願人による特開平10―213423号公報には、空間コードを得るために空間コード化パターンを投影して当該パターンの数だけ撮像すると共に、当該撮像した画像のビットプレーン画像を順次重ね合せることで、空間コード化画像を得ている。そして、この空間コードが格納された画素位置とその空間コードとから、測定対象物表面までの距離を算出する。
【0003】
光切断法による場合、スリット光の照射角度を、角度コード又は空間コードという。この空間コードがそれぞれ定義されたスリット光を照射し、このスリット光の角度コードを空間コードとすることができる。そして、スリット光の角度コードとこの角度コードのスリット光を受光した画素位置とから、測定対象物までの距離を算出することができる。
【0004】
【発明が解決しようとする課題】
しかしながら、上記従来例では、照明の当らない箇所である死角への多重反射により誤った角度コードが記録されてしまう、という不都合があった。すると、ノイズが発生し、本来ないはずの形状が現れる。死角領域への多重反射は、実際の形状付近に発生するため、除去が非常に困難である、という不都合があった。すなわち、多重反射によるノイズの除去は、実際の形状から大きくかけ離れた場所に存在する場合には、距離情報に基づいて除去することは可能であるが、実際の形状に近い箇所に生じたノイズは、人手によっても除去が困難である。
【0005】
【発明の目的】
本発明は、係る従来例の有する不都合を改善し、特に、多重反射によるノイズを除去することのできる三次元形状計測方法および装置を提供することを、その目的とする。
【0006】
【課題を解決するための手段】
そこで、本発明では、測定対象物を含む空間を分割する空間コードに対応した計測光を照射する照射工程と、この照射工程で照射された計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子にて当該計測光を受光する受光工程と、この受光工程にて受光した計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード処理工程と、この空間コード処理工程にて算出された空間コードと受光素子の位置とに基づいて予め定められた座標系での原点から測定対象物の表面までの距離を各受光素子毎に算出する距離算出工程とを備えている。
しかも、空間コード処理工程にて、照射工程での計測光の走査方向と同方向の空間コードの増減の変化を抽出する増減抽出工程と、この増減抽出工程にて抽出された空間コードの増減が予め定められた単調増加または単調減少とは逆向きの変化である単調減少または単調増加となった空間コードを特定すると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する多重反射判定工程とを備えた、という構成を採っている。これにより前述した目的を達成しようとするものである。
【0007】
照射工程では、角度コードをそれぞれ定義されるスリット光や、スポット光や、二進コードで定義された複数の時系列空間コード化パターン光を計測光として照射する。受光工程では、例えばエリア型のCCDセンサを使用して計測光を受光する。空間コード処理工程では、計測光の種類に応じて例えば時系列空間コード化パターンであればビットプレーンを生成すると共に当該ビットの順序に基づいて、またスリット光であれば輝度値が最大となったスリット光の順序に基づいて、空間コード化画像を生成する。そして、距離算出工程では、計測光の角度と、空間コード化画像の画素位置とに応じて三角測量の原理により測定対象物までの距離を算出する。このとき、例えば受光の焦点位置を原点としても良いし、また較正を行うことで測定対象物を含む空間の一点を原点としても良い。
【0008】
空間コード処理工程では、増減抽出工程にて、照射工程での計測光の走査方向と同方向の空間コードの増減の変化を抽出する。すると、計測光の走査方向にて空間コードを増加させているのであれば、通常空間コードの増加傾向が観察される。一方、多重反射が生じると、スリット光の進行方向が逆転し、走査方向とは逆向きに進行するため、空間コードの増加傾向が反転判定する。従って、多重反射判定工程では、増減抽出工程にて抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定し、そして、当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する。これにより、死角に生じた多重反射であっても、空間コードの増減の変化に基づいて確実に抽出する。
【0009】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。図1は本実施形態による三次元形状計測方法の構成を示すフローチャートである。図1に示すように、本実施形態による三次元計測方法は、測定対象物を含む空間を分割する空間コードに対応した計測光を照射する照射工程E1と、この照射工程E1で照射された計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子にて当該計測光を受光する受光工程E2と、この受光工程E2にて受光した計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード特定工程E3とを備えている。
【0010】
本実施形態ではさらに、照射工程E1での計測光の走査方向と同方向の空間コードの増減の変化を抽出する増減抽出工程E4と、この増減抽出工程E4にて抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定すると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する多重反射判定工程E5とを備えている。さらに、図1に示す例では、多重反射判定工程E5に続いて、当該多重反射判定工程によって多重反射と判定された空間コードを削除する削除工程E6を備えている。多重反射によるノイズを除去した後、空間コード特定工程E4乃至E6にて算出された空間コードと受光素子の位置とに基づいて予め定められた座標系での原点から測定対象物の表面までの距離を各受光素子毎に算出する距離算出工程E7と、この距離算出工程にて算出された距離画像データを出力する距離画像データ出力工程E8とを備えている。
【0011】
ステップE6では、多重反射による空間コードを削除することとしたが、実施の形態によっては、多重反射判定工程E5によって多重反射と判定された空間コードにエラーフラグを付するエラーフラグ付加工程E6を備えるようにしてもよい。この場合、距離画像データにてエラーフラグが付された空間コードによる距離データは他の部分と表示色を変化させる等の処理を行うとよい。
【0012】
以下、多重反射による空間コード増減の変化を説明するために、まず、空間コードを利用して測定対象物表面までの距離の算出手法を説明する。
【0013】
図2は空間コードを利用した距離計測の原理を示す説明図である。図2に示す例では、照射工程E1を実現する照射手段は、レーザ光源22と、ガルバノミラー23とを備えている。また、受光工程E2は、カメラ3を使用する。レーザ光源22,ガルバノミラー23及びカメラ3は、図2に示すように、床面(水平面)に対して水平である同一平面上に位置している。また、ガルバノミラー23は、カメラ3の光軸から長さlの距離で配置されており、カメラ3の受光素子31の水平走査線に対して垂直方向(スリット光Rと平行方向)を軸として回転する。この配置により、スリット光Rを受光素子31の水平走査線に沿って平行方向に移動させてカメラ3の受光素子31に受光させることを可能としている。
【0014】
空間コードは、例えば図2に示すθの値に対応してガルバノスキャナ23の走査方向に一定角度毎に増加させた値である。任意の画素について投光角度θが特定され、且つ、各画素の位置座標のx成分からカメラ3からスリット光R位置の角度αが特定される(図2では直角となっている)。また、カメラ3とガルバノミラー23との離間距離lは既値であるため、例えば、距離h=l・sinθ/sin(α+θ)から求められる。θの値はガルバノスキャナの走査角度によって定り、αの値は受光した受光素子の位置によって定るため、この2つの角度と予め定められた距離lとから、計測光が照射された位置の測定対象物表面までの距離hを算出することができる。
【0015】
図3乃至図5は計測光と空間コードの関係を示す説明図である。図3(A)に示すように、測定対象物Sが平面であって、この測定対象物に対して図中左側からスリット光を順次走査する場合、最初の角度θ1からθnまでの角度コードにより空間を分割できる。図3に示す例では図中左側から右側へと走査し、かつ空間コードを走査に応じて増加させているため、受光工程E2での水平画素座標と空間コードの関係は図3(B)に示す如くとなる。図3(B)に示すように、水平画素座標が大きくなるにつれて、空間コードの値も大きくなる。図3(C)では、空間コードを濃淡で表しており、黒で示す空間コードが最小で、白で示す空間コードが最大である。
【0016】
図4に示す例では、測定対象物S1よりもカメラ3側に円筒上の物体S2が存在している。図中、1乃至9はθを省略した空間コードの値である。ず4(A)に示すように、角度コードθ1からθ5までのスリット光は、平面である測定対象物S1に照射される。しかし、続く角度コードθ6およびθ7のスリット光は小物体S2に照射される。すると、水平画素座標の走査方向での連続では、角度コードはθ3からθ6へと増加する。一方、θ6まで増加した後は、小物体の裏側を通った角度コードθ4およびθ5が撮像される。続いて、角度コードθ8およびθ9のスリット光が平面の測定対象物S1に照射されている。このとき、角度コードθ5からθ8の間は、小物体S2による死角となり、角度コードが記録されない。しかしながら、図4に示すように、角度コードθ3からθ6や、θ7からθ4への変化など、不連続な部分を除くと、角度コードは(空間コード)は走査方向に対して増加する傾向を持つ。図4(C)および(D)に示すように、測定対象物Sの表面が傾斜していても、この角度コードの増加傾向は変化せず、傾きが変るのみである。
【0017】
図5に多重反射が生じた例を示す。図5に示す例では、角度コードθ8およびθ9が測定対象物S3の壁面S4にあたり、多重反射が生じている。多重反射では、照射する際に、θ8、θ9と増加させていても、反射によりこの関係が反転してしまい、図5(A)に示すように、空間コードがθ9、θ8と連続的に減少する。このときの空間コードと水平画素座標の関係を図5(B)に示す。符号4aで示す部分では、単調増加している。一方、符号4cで示す部分は死角となり、空間コードが0である。また、多重反射が生じた領域では、符号4bで示すように、空間コードが連続的に減少している。
【0018】
このように、空間コード化画像を生成する三次元計測器では、一部の例外(空間に浮いた微少な物体)以外の測定時には、角度コードは、画像の一方向に向って単調増加(もしくは単調減少)する。多重反射が発生し、光が直接当っている箇所と違う箇所にコードが記録されると、この単調増加(減少)の傾向が崩れる。さらに、一時反射(一回の反射)による多重反射の発生中はコード変化が単調減少となる。そこで、出力された空間コード化画像より、水平走査線に沿ってコードの増加(減少)傾向を調べることで多重反射によるノイズを除去することが可能となる。
【0019】
従って、図1に示す増減抽出工程E4が照射工程E1での計測光の走査方向と同方向の空間コードの増減の変化を抽出し、多重反射判定工程E5が、この増減抽出工程E4にて抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定すると、図5の符号4bで示す多重反射による空間コードを特定することができる。
【0020】
図6は本実施形態による三次元形状計測方法の実施に好適な三次元形状計測装置の構成を示すブロック図である。図6に示すように、本実施形態による三次元形状計測装置は、測定対象物を含む空間を分割する空間コードに対応した計測光を照射する照射手段2と、この照射手段2によって照射された計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子を有する受光手段3と、この受光手段3の各受光素子が受光する計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード処理手段4とを備えている。
【0021】
この計測装置はさらに、この空間コード処理手段4によって算出された空間コードを各受光素子に対応した画素位置に記憶する空間コード記憶手段42と、この空間コード記憶手段42の各画素位置及び当該画素に格納された空間コードに基づいて予め定められた座標系での原点から測定対象物の各表面までの距離を各受光素子毎に算出する距離算出手段100とを備えている。
【0022】
さらに、空間コード処理手段4は、照射手段2による計測光の走査方向と同方向の空間コードの増減の変化を空間コード記憶手段42に格納された空間コード画像から抽出する増減抽出部4Gと、この増減抽出部4Gによって抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定すると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する多重反射判定部4Hとを備えている。
【0023】
この空間コード処理手段のうち、増減抽出部4Gと、多重反射判定部4Hとは、コンピュータ等の演算装置を使用して実現することができる。この場合、演算装置は、三次元計測用プログラムを記憶した記憶手段と、このプログラムを実行する事により測定不能点抽出部4B等として機能するCPUと、このCPUの主記憶装置となるRAMとを備えている。この三次元計測用プログラムは、演算装置を動作させる指令として、照射装置によって照射される計測光の走査方向と同方向の空間コードの増減の変化を抽出させる増減抽出指令と、この増減抽出指令に応じて抽出された空間コードの増減が予め定められた単調増加または単調減少とは逆向きの変化である単調減少または単調増加となった空間コードを特定させると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定させる多重反射判定指令とを備える。これにより、図6に示す構成を実現し、さらに、この図6に示す構成を使用することで図1に示す処理が行われる。
【0024】
【実施例】
次に、三次元形状計測処理の実施例を図面を参照して説明する。
<較正>
図7乃至図9に三次元形状計測装置の構成を行う例を示す。図2に示すように、個別の照射角度と受光素子の画素位置とにより、測定対象物までの距離を算出することができるが、実際には、カメラの画角や、設置時の調整の困難性や、測定対象物を含む座標系での値が扱が容易である等の理由から、本実施例では、空間コードと画素位置との関係を較正している。
【0025】
一般に、撮像画面は平面状のCCD撮像センサにより検出されるため。、カメラ座標系は、Xc−Ycの二次元座標系によって得られる。物体座標系とこのカメラ座標系との関係を同次座標系表現で表すと、次式(1)のように表される。ここで、物体座標系をカメラ座標系に変換する行列Cをカメラパラメータという。
【0026】
【数1】

Figure 0003800842
【0027】
一方、プロジェクタは、一次元方向の変位を求めるため、得られる座標系はXpの一次元のみである。このプロジェクタ座標系と物体座標系との関係を同次座標系表現で表すと、次式(2)のように表される。ここで、物体座標系をプロジェクタ座標系に変換する行列Pをプロジェクタパラメータという。
【0028】
【数2】
Figure 0003800842
【0029】
これら各パラメータを展開し、連立して整理することにより、次式(3),(4),(5)の関係が求められる。
【0030】
【数3】
Figure 0003800842
【0031】
従って、行列Qに逆行列が存在すれば、カメラ座標系(Xc,Yc)及びプロジェクタ座標系Xpから物体座標系V=(X,Y,Z)を求めることができる。前述した各手法により三次元形状の測定を行う場合には、この行列Qを求めるために、前述したカメラパラメータ及びプロジェクタパラメータを予め求める必要がある。
【0032】
まず、CCDカメラで基準立方体Bの明暗画像とスリットプロジェクタで空間コード化法によりコード化画像を取り込む。そして、明暗画像を二値化して指標部を取り出し、各立方体の面内で相対する指標同士を仮想的に結んで格子状に得られるその交点を基準点(Xi,Yi,Zi)として抽出する。
【0033】
カメラパラメータを算出する場合には、この物体座標系上の基準点(既知)の位置座標と、撮像画像上のCCDカメラのイメージセンサ上における画素位置(カメラ座標系上の位置座標(Xci,Yci))をペアで記憶する。
【0034】
この物体座標系上の基準点の位置座標(Xi,Yi,Zi)とカメラ座標系上の位置座標(Xci,Yci)との間には、前述の式(3),(4)から求まる次式(6),(7)の関係が成立する。
【0035】
【数4】
Figure 0003800842
【0036】
各式(6),(7)のC11・・・C21・・・C34の合計12の未知数を求めるには、少なくとも同一平面上にない少なくとも六つ以上の基準点についてカメラ座標系上の点を検出する必要がある。そして、未知数は最小二乗法により求めることができる。
【0037】
図7に三次元計測装置および較正装置の一例を示す。三次元形状計測装置は、測定対象物に対して一定の一次元方向について位置座標を付する照射光を照射する照射機構としてのプロジェクタ202と、照射光を照射された測定対象物を撮像するカメラ3と、このカメラ3による撮像画像から測定対象物の三次元画像データを算出する画像処理ボード201とを備えている。
【0038】
プロジェクタ202は、ストライプ状のパターン光をピッチを変えて照射することが可能であり、ホストコンピュータ200により照射タイミングやパターン光のピッチの指定等の動作制御が行われる。また、パターン光に代えて、スリット光を照射するようにしてもよい。一次元座標系たるプロジェクタ座標系は、ストライプの並び方向(パターン光を垂直に横切る方向)に形成される。
【0039】
CCDカメラ3は、受光した光の輝度に応じた輝度信号を出力する受光素子を備えている。この受光素子は、平面状に配置された画素となる。二次元座標系たるカメラ座標系は、このCCD撮像センサの平面に対応して形成され、各画素の位置が座標系の位置座標に対応する。
【0040】
画像処理ボード201は、プロジェクタ202とCCDカメラ3の同期を図り、また、CCDカメラ3の出力に基づいて三次元形状データを算出する。
【0041】
次に、三次元形状計測装置の較正装置について説明する。この較正装置は、平滑な一平面221上に既知の配置で複数の指標222を付した較正用二次元ゲージ202と、このゲージ202をその一平面221に垂直な方向に移動自在に保持する一軸数値制御テーブル230と、この一軸数値制御テーブル230に装備され,較正用二次元ゲージ202の移動量を調節する調節手段としての一軸数値制御コントローラ240とを備えている。
【0042】
較正用二次元ゲージ202は、図7に示すように、正方形の一平面221を有し、この一平面221がCCDカメラ3及びプロジェクタ202に正対するように一軸数値制御テーブル230に保持されている。そして、CCDカメラ3の対物レンズの光軸と一平面221の法線とが平行である。即ち、これにより、一平面221に対してプロジェクタ202からパターン光の照射が行われ、CCDカメラ3は一平面221における明暗画像の撮像ができ、ホストコンピュータ200では、後述する三次元座標データを画像処理ボード201を介して得ることができる。
【0043】
三次元座標系である物体座標系は、較正用二次元ゲージ202を基準にして設定される。即ち、図7の位置(この位置を現位置とする)にある較正用二次元ゲージ202において、図8(A)に示すように、座標系のX軸は一平面221の左上方の角を原点として水平右方向に設定され、座標系のY軸は一平面21の同じ角を原点として垂直下方向に設定されている。また、座標系のZ軸は、図8(B)に示すように、一平面221の同じ角を原点として当該一平面221の法線方向に沿ってCCDカメラ3と反対側に向けて設定されている。本実施例では、この物体座標系の原点からの距離を空間コードと画素位置とに基づいて算出する。
【0044】
さらに、較正用二次元ゲージ202の一平面221上は白色に彩られ、その上に基準点23を決定する黒点である指標222が付されている。指標222は、図8(A)に示す如く、X軸,Y軸と各辺を平行とした正方形の四辺上に五つずつ等ピッチpで配列されている。互いに対向する辺上にある各指標は、それぞれが他方の辺上にある指標と対応しており、図8(A)の点線で示すように、対応する二つの指標は、X軸又はY軸に平行な直線で結ばれる。この対応する指標を結ぶ各直線の交点が基準点223となる。これら基準点223は、一平面21上に升目状に5×5=25個が展開される。各指標21は、前述した物体座標系において、いずれも既知の位置座標上に位置しており、これに伴い、各基準点23の位置座標も既知となる。
【0045】
一軸数値制御テーブル230は、較正用二次元ゲージ202の保持部材231と、これと係合しZ軸方向に保持部材31を送るボールネジ32と、ボールネジ32を一軸数値制御コントローラ4による数値制御のもとで駆動するステッピングモータ33とを備えている。
【0046】
一軸数値制御コントローラ240は、ホストコンピュータ200からのZ方向の送り量の数値入力を受けて、これに対応する駆動量でステッピングモータ233を駆動制御し、較正用二次元ゲージ202をZ方向について任意の位置に位置決めすることができる。較正の際に一軸数値制御テーブル230は、通常、較正用二次元ゲージ202の送り方向をCCDカメラ3の対物レンズの光軸と平行にして置かれ、当該較正用二次元ゲージ202を、Z方向について、基準点223のピッチpと等しい送り量で現位置から四回送る。
【0047】
ホストコンピュータ200は、三次元形状計測装置及び較正装置の動作制御を行うと共に測定情報の演算を行う。図9に示す三次元形状計測装置の自動較正システムの動作は、全て、このホストコンピュータ200に予め入力されたプログラムによって行われる。
【0048】
図9は、本実施形態の動作を示すフローチャートである。以下、これに基づいて本実施形態の三次元形状計測に先だって行われる三次元形状計測装置の較正動作を説明する。
【0049】
ホストコンピュータ200に記憶される変数ステップを0に初期化する(工程S1)。
【0050】
そして、三次元形状計測装置のプロジェクタ202から出力されるレーザ光を連続的に投影し、較正用二次元ゲージ202の一平面上に付された各指標の画像をCCDカメラ3によって取り込み明暗画像を得る。これにより、ホストコンピュータ200は、その記憶領域に二次元座標系たるカメラ座標系Xc−Ycを設定する(工程S2)。
【0051】
次に、プロジェクタ202からグレイコードパターン(ストライプ上のパターン光)を順次照射して空間コード化画像をCCDカメラ3により撮像する。ホストコンピュータ200は、取り込まれた画像から空間コードを得て、これにより記憶領域に一次元座標系たるプロジェクタ座標系Xpを設定する(工程S3)。
【0052】
撮像した明暗画像を二値化し、円形たる各指標222の重心画素(中心)を求める(工程S4)。
【0053】
ホストコンピュータ200では、正対する各々の指標22同士を結んだ直線の仮想交点を較正用の実座標基準点23として計算により求める(工程S5)。
【0054】
そして、ホストコンピュータの記憶領域において、各基準点223のカメラ座標系上の位置座標(Xc−Yc)とプロジェクタ座標形状の位置座標Xpをそれぞれ対応させてデータとして記憶する(工程S6)。
【0055】
ホストコンピュータ200では、ステップをインクリメントして(工程S7)、較正用二次元ゲージ202をピッチpの距離だけZ方向に移動させる(工程S8)。
【0056】
較正用二次元ゲージ202の撮像が五回行われたか、即ち、Z軸方向の移動が四回行われたかを確認し(工程S9)、もし目標回数を達していなければ工程S2から工程S8の動作を繰り返す。また、達していれば、記憶された上記データを基に、カメラパラメータとプロジェクタパラメータを求めてシステムパラメータを計算する(工程S10)。そして、これにより較正が終了する。
【0057】
また、本実施形態では、空間コード化法に基づいて三次元形状の計測を行う三次元形状計測装置100に対する較正作業を行う例を示したが、一つのスリット光の走査により三次元形状の計測を行う計測装置や他の手法に基づく計測装置に対しても有効である。
【0058】
このように、図7に示す較正装置を使用して画素位置と空間コードとの関係を予め較正しておく。すると、実際の計測では空間コードとその画素位置とから、物体座標系での原点からの距離を算出することができる。
【0059】
<計測>
空間コード化画像を得るには、スリット光を用いる光切断法と、時系列空間コード化パターン(グレイコード化パターン)を使用するパターン光投影法などがある。パターン光投影法については、パターン光の投影では、死角領域や受光素子自体の異常などの他には穴あきは生じがたい。一方、スリット光投影での空間コード化画像の算出処理では穴あきが生じてしまうことがあるため、以下、光切断法を例として測定対象物の形状計測の一例を説明する。
【0060】
図10は、本実施例のブロック図である。ここでは、測定対象物Sに対してスリット光Rを走査する照射手段2と、この照射手段2とは異なる方向から走査により移動するスリット光Rを複数回撮像するカメラ3と、複数の撮像画像から空間コード(角度コード)を算出する空間コード処理手段4とを備えている。
【0061】
また、この三次元形状の計測装置は、図示の如く、空間コード処理手段4で算出した三次元画像データをデジタルI/Oボード102を介して接続されたコンピュータ100に出力する。一方、コンピュータ100は、空間コード処理手段4からの角度コード化画像(空間コード化画像)とその画素位置とに基づいて三次元形状を算出する。この算出では、上述した較正装置を用いて算出したカメラパラメータ等を用い、物体座標系での距離を算出する。
【0062】
照射手段2は、レーザドライバ21により駆動される一本のスリット状のレーザ光(以下、スリット光Rとする)を照射するレーザ光源22と、照射されたスリット光Rを測定対象物S側に反射するガルバノミラー23と、ガルバノミラー23を回転してスリット光Rを測定対象物Sに対して走査するガルバノスキャナ24と、ガルバノスキャナ24の駆動制御を行うスキャナドライバ25と、空間コード処理手段4からの角度信号に基づいてスキャナドライバ25に投光角度指令を出力する投光角度指令作成回路26とを備える。
【0063】
レーザ光源22から射出されるスリット光Rは、測定時における床面に対して垂直方向(図10における上下方向)に沿った棒状の光であり、ガルバノミラー23により当該スリット光Rと垂直方向に移動して測定対象物Sに対して走査を行う。また、スリット光Rは、カメラ3の受光素子31の水平走査線に対して垂直となるように予めその向きが設定されている。
【0064】
投光角度指令作成回路26には、空間コード処理手段4のメモリアドレス作成回路46から投光角度信号が出力され、これに基づいてガルバノスキャナ24の駆動制御が行われる。
【0065】
また、レーザ光源22,ガルバノミラー23及びカメラ3は、図2に示すように、床面(水平面)に対して水平である同一平面上に位置している。そして、ガルバノミラー23は、カメラ3の受光素子31の水平走査線に対して垂直方向(スリット光Rと平行方向)を軸として回転する。この配置により、スリット光Rを受光素子31の水平走査線に沿って平行方向に移動させてカメラ3の受光素子31に受光させることを可能としている。
【0066】
受光素子31は、本実施例では、各画素が水平走査線方向に256個設けられ、そして、かかる水平走査線が243本設けられ、計256×243個の画素が規則正しく配置されている。各画素からの輝度信号の出力は、水平走査線ごとに、羅列された水平走査線方向の並び順に行われる。このときの一本の水平走査線の輝度信号の出力する期間を出力期間といい、出力が行われない出力期間と出力期間との間の期間を帰線期間という。また、一つの水平走査線上の各画素は、出力期間の間にその配列順に出力を行う。そして、全ての画素における出力が映像信号として空間コード処理手段4に送られる。このように、本実施例では、カメラ3の水平走査線方向の画素数と同一の空間コードを有する。
【0067】
また、カメラ3は、スリット光Rの一回の走査を走査線上の画素数(256)で分割して撮像を行う。このため、ガルバノスキャナ24の走査範囲角度を256分割し、各角度ごとに撮像を行うべく、後述する空間コード処理手段4の同期回路43から出力される水平,垂直同期信号により同期が図られる。
【0068】
空間コード処理手段4のブロック図を図11に示す。この空間コード処理手段4は、受光素子31の各走査線ごとに各画素から出力される輝度の最大値を検出し特定するピーク検出部5と、このピーク検出部5の検出に対応して,最大輝度を出力する画素について走査線上の位置を検出し特定する画素位置検出部8と、受光素子31の各画素に個別に対応する輝度の記録領域を有する輝度メモリ41と、ピーク検出部5に検出された輝度と画素位置検出部8に検出された画素の位置に基づいて,輝度メモリ41の対応する画素の記録領域に記録された記録輝度との大小を比較する比較部としての第二の比較回路6と、検出輝度が記録輝度よりも大きい場合に輝度メモリ41の記録輝度を検出輝度の値に更新する第一の更新部としての第三の選択回路7と、各画素に個別に対応する投光角度の記録領域を有する角度コード化メモリ42を備えている。
【0069】
さらに、空間コード処理手段4は、カメラ3の水平,垂直同期を図る同期回路43と、上記カメラ3からの映像信号の輝度信号を量子化するA/D変換回路44と、輝度メモリ41及び角度コード化メモリ42のアドレスを作成するメモリアドレス作成回路46を備えている。
【0070】
このメモリアドレス作成回路46は、同期回路43からの水平同期信号をカウントすることにより、受光素子31の現在出力中の画素が位置する水平走査線番号(端から何番目の水平走査線上で出力を行っているか、を示す。以下、垂直アドレスyとする)を出力する。
【0071】
さらに、メモリアドレス作成回路46は、水平駆動周波数(走査線中画素数768、14.318MHz)を三分周(走査線中画素数を256とするため)したものをカウントし、受光素子31の現在出力中の画素の水平走査線上の位置(水平走査線上で端から何番目の画素が出力を行っているか、を示す。以下、水平アドレスxとする)を出力する。
【0072】
また、同期回路43からの垂直同期信号をカウントし、投光角度信号を作成する共に照射手段2に出力する。さらに、このメモリアドレス作成回路46では、水平同期信号により、後述するピーク検出部5の一時輝度メモリ51及び画素位置検出部8の一時位置メモリ81のクリア信号を一水平走査線の出力ごとに作成し出力する。
【0073】
ところで、A/D変換回路44により量子化された輝度信号は、ピーク検出部5に出力される。このピーク検出部5は、一つの走査線上で最大レベルとなる輝度のみを記録する一時輝度メモリ51と、A/D交換回路44にて量子化された輝度信号の信号レベル(以下、単に「輝度」とする)と走査線中最大輝度メモリ51に記録された輝度とを比較し、いずれの輝度が高いかを出力する第一の比較回路53と、この第一の比較回路53の出力に基づいていずれか高い方の輝度を選択し、一時輝度メモリ51中の記録輝度を更新する第一の選択回路54とを備えている。
【0074】
なお、上述の一時輝度メモリ51は、一画素分の輝度信号を記録できれば足りるので、その記憶容量は、輝度分解能×1(8bit)である。また、一時輝度メモリ51の内容は、各水平帰線期間中(一水平走査線ごと)に0にクリアされる。
【0075】
上記の構成からピーク検出部5では、各走査線ごとの輝度信号の最大レベルが検出され記録される。
【0076】
また、このピーク検出部5による一走査線上の最大輝度が検出される際に、同時に画素位置検出部8では、上記最大輝度を出力する画素の水平アドレスxが検出される。この画素位置検出部8は、一つの走査線上で最大輝度を出力する画素の水平アドレスxのみを記録する一時位置メモリ81と、メモリアドレス作成回路46から順次出力される各画素に対応する水平アドレスxの内、前述したピーク検出部5の第一の比較回路53の出力により選択された最大輝度を出力する画素の水平アドレスxを一時位置メモリ81に上書きする第二の選択回路82とを備えている。
【0077】
なお、上述の一時位置メモリ81は、256ある内のいずれかの画素であるかを記録できれば足りるので、その記憶容量は、256×1(8bit)である。また、一時位置メモリ81の内容は、各水平帰線期間中(一水平走査線ごと)に0にクリアされる。
【0078】
上記の構成から画素位置検出部8では、各走査線ごとの最大輝度を出力する画素の水平アドレスxが検出され記録される。
【0079】
上記各一時輝度メモリ51は、ゲート91を介して前述の第二の比較回路6及び第三の選択回路7に接続されており、ゲート91が閉じた場合に一時輝度メモリ51中の記録輝度がこれらに出力される。一方、一時位置メモリ81は、ゲート92を介して輝度メモリ42及び角度コード化メモリ42に接続されており、ゲート92が閉じた場合に一時位置メモリ81中の水平アドレスxがこれらに出力される。
【0080】
これらのゲート91,92は、いずれもメモリアドレス作成回路46に接続されており、受光素子31の水平同期信号の出力を受けている。そして、これらのゲート91,92は、通常は開かれており、水平同期信号から受光素子31が帰線期間中であることが入力されると閉じられる。
【0081】
これら各ゲート91,92は、受光素子31が帰線期間中のときに同時に一時輝度メモリ51及び一時位置メモリ81の記録内容を出力させる出力同期部9を構成している。
【0082】
次に、輝度メモリ41について説明する。この輝度メモリ41は、受光素子31の各画素に個別に対応する輝度の記録領域が形成されている(図13参照)。そして、この輝度メモリ41の各記録領域中には,それぞれ予め0乃至通常のスリット光の輝度よりも小さい値に設定された輝度が記録されている。
【0083】
前述の如く、各ゲート91,92が閉じられると、一時輝度メモリ51から第二の比較回路6に最大輝度が出力され、一時位置メモリ81からその水平アドレスxが輝度メモリ41に出力される。また、メモリアドレス作成回路46からは、輝度メモリ41に常時現在の垂直アドレスyが出力される。
【0084】
これにより、輝度メモリ41に対して、水平アドレスxと垂直アドレスyから最大輝度を出力した画素が、受光素子31の画素の内のいずれのものであるかが特定され、これに対応する記録領域から記録輝度が第二の比較回路6に出力される。
【0085】
第二の比較回路6では、一時輝度メモリ51からの輝度と輝度メモリ41に既に記録された輝度との比較を行い、いずれが高いかを出力する。第三の選択回路7では、第二の比較回路6の出力を受けて、一時輝度メモリ51からの輝度が高い場合には輝度メモリ41の記録輝度を一時輝度メモリ51の輝度に更新し、そうでない場合には、輝度メモリ41の記録輝度をそのまま維持する。
【0086】
次に、角度コード化メモリ42について説明する。この角度コード化メモリ42は、受光素子31の各画素に個別に対応するスリット光Rの投光角度(ここでは、ガルバノミラー23の回転角度と同義)θの記録領域を備えている。
【0087】
また、この角度コード化メモリ42には、各記録領域の投光角度θの更新を行う第二の更新部としての第四の選択回路45が併設されている。かかる第四の選択回路45は、ゲート91が閉じられることにより作動する第二の比較回路6と接続されており、また同時にメモリアドレス作成回路46から現在の投光角度θを示す投光角度信号が入力されている。
【0088】
一方、角度コード化メモリ42には、常時、メモリアドレス作成回路46から現在の垂直アドレスyが入力され、また、ゲート92が閉じられることにより、一時位置メモリ81から最大輝度を出力した画素の水平アドレスxが入力される。これにより、角度コード化メモリ42に対して、水平アドレスxと垂直アドレスyから最大輝度を出力した画素が、受光素子31の画素の内のいずれのものであるかが特定され、第四の選択回路45による入力待ち状態となる。
【0089】
第四の選択回路45は、第二の比較回路6により、一時輝度メモリ51の輝度と輝度メモリ41の輝度の内,一時輝度メモリ51の輝度が高いと出力された場合に、メモリアドレス作成回路46からの投光角度θを対応する記録領域に記録し、輝度メモリ41の輝度が高いと出力された場合には更新を行わない。このように、第三及び第四の選択回路7,45は、いずれも第二の比較回路6の出力により更新を行うため、輝度メモリ41に対して一時輝度メモリ51の輝度が更新されたときにのみ、角度コード化メモリ42に対する投光角度θの記録(既に記録されている場合には更新)が行われる。
【0090】
ここで、上述した輝度メモリ41及び角度コード化メモリ42は、いずれも、測定開始時において、その記録が0にクリアされる。
【0091】
図12(A)は、この受光素子31上に撮像されたスリット光Rを示している。このとき、照射機構による走査範囲を256分割し、各分割された範囲ごとに撮像が行われるため、投光角度を撮像順に1から256の番号で表すこととする。図12(B)は、走査線番号1の水平走査線に沿った各画素から検出された輝度レベルを示している。この図によれば、水平走査線方向の位置x0で最大輝度レベルが観測され、これをスリット光と見なすことができる。
【0092】
上記各部の機能を総合すると、三次元形状の計測装置10では、出力期間中の水平走査線上において最大輝度を検出した画素をスリット光の照射位置とみなし、各走査線ごとに最大輝度を検出した画素の水平アドレスxを求め、且つ照射したスリット光の投光角度を求め、角度コード化メモリ42を完成させる。これにより、各画素のアドレスについて投光角度が求められると、各アドレスに撮像された測定対象物Sからカメラ3までの距離を算出することが可能となり、コンピュータ100により三次元形状の計測が行われる。
【0093】
このため、まず、ピーク検出部5によって現在出力期間中である水平走査線について、その水平走査線上の画素から出力される輝度の内、最大となる輝度が特定され一時輝度メモリ51に記録される。また、同出力期間中に、画素位置検出部8により、最大輝度を出力する画素の水平アドレスxが特定され、これが一時位置メモリ81に記録される。
【0094】
各メモリ51,81に記録された最大輝度及び水平アドレスxは、その出力期間が終わり帰線期間となるまで保留され、出力同期部9により、帰線期間に移行した時点で輝度メモリ41又は角度コード化メモリ42側に出力される。このように、輝度及び水平アドレスxは、出力期間の間,保留されるため、途中経過で最大と判断された輝度については、その下流側での処理(輝度メモリ41,角度コード化メモリ42への記録)が行われない。
【0095】
そして、これらの出力及びメモリアドレス作成回路46による垂直アドレスy及び投光角度信号の出力により、第二の比較回路6及び第三の選択回路7によって特定されたアドレスの輝度について、輝度メモリ41が比較更新される。即ち、全ての投光角度による撮像画像に対して全ての水平走査線について上述の比較又は更新が行われることにより、全ての画素について、各投光角度によって撮像された全ての撮像画像を通じて最高となった輝度のみが輝度メモリ41中に保管される。
【0096】
また、角度コード化メモリ42には、第二の比較回路6と接続された第四の選択回路45が併設されているため、同様にして、全ての画素について、各投光角度によって撮像された全ての撮像画像を通じて最高となった輝度が検出されたときの当該投光角度のみが角度コード化メモリ42中に保管される。
【0097】
そして、完成した角度コード化メモリ42の情報を出力し、コンピュータ100により三次元形状の計測が行われる。
【0098】
ここで、空間コード処理手段4の演算処理方法を図13乃至図15に示す簡単な例を用いて説明する。ここでは、カメラ3の受光素子31の画素数を3×3(水平方向×垂直方向)と仮定して説明する。また、輝度メモリ41及び角度コード化メモリ42の各記録領域は、測定開始前には全て0にリセットされているものとする。
【0099】
水平方向の画素数が三つであるため、これに対応してスリット光Rが各画素単位で撮像されるガルバノミラー23の回転角度θ0,θ1,θ2で撮像が行われるものとする。
【0100】
まず、投光角度θ=θ0のときの処理を図13に基づいて説明する。まず、投光角度θ=θ0のときのスリット光Rの受光素子31の撮像画像を図13(A)に示す。受光素子31において、横方向は水平アドレスx(図における左から順番に画素に付した番号),縦方向は垂直アドレスy(図における上から順番に水平走査線に付した番号)を示すものとする。また、図13(B)に更新記録前の輝度メモリ41を示す。
【0101】
受光素子31の垂直アドレスy=1の水平走査線の出力期間において、各画素の検出輝度が順番に出力され、ピーク検出部5により出力期間の終わりまでに最大輝度が200と特定され、同時にその水平アドレスxがx=1と特定される。そして、帰線期間に移行すると、特定された最大輝度が輝度メモリ41の記録輝度と比較され、その後、当該最大輝度が記録輝度として更新される(図13(C))。また、輝度メモリ41の更新と同時に、角度コード化メモリ42における水平アドレスx=1,垂直アドレスy=1の記録領域の内容が、そのときの投光角度θ0に更新される(図13(D))。
【0102】
同様の処理が、垂直アドレスy=2,y=3についても行われる(同図(E),(F)はy=2のときの輝度メモリ41,角度コード化メモリ42の更新を示し、同図(G),(H)はy=3のときの輝度メモリ41,角度コード化メモリ42の更新を示す)。
【0103】
投光角度θ=θ1、投光角度θ=θ2と処理される。さらに、コンピュータ(演算装置)100では、角度コード化メモリに格納された角度コードデータ(空間コード化画像)のうち、測定不能点を抽出し、さらに補完値を算出する。その後、補完後の角度コード(空間コード)とその角度コード化メモリ42に格納された画素位置とから物体座標系での距離を算出する。
【0104】
図14および図15は角度コードを算出するまでの処理例を示すフローチャートである。
【0105】
まず、同期回路43及びメモリアドレス作成回路46によりカメラ3と照射手段2の同期が図られ、測定対象物Sに対するスリット光Rの照射と撮像が行われる(ステップS1)。かかる同期によりスリット光は、受光素子31上を水平走査線方向に一画素ごとに位置を変えて撮像される。
【0106】
まず、投光角度1の撮像画像に応じて、走査線番号1の水平走査線から当該走査線上の各画素の並び順に輝度の出力が行われる。このときの一つの水平走査線上の全ての画素から出力が終了するまでが当該水平走査線における出力期間である(ステップS2)。
【0107】
かかる撮像画像に基づいてピーク検出部5により各水平走査線ごとに最大輝度の検出が行われ、同時に、かかる検出に基づいて最大輝度を出力する画素の水平アドレスの検出が行われる(ステップS3)。このとき検出された最大輝度は一時輝度メモリ51に保管され、水平アドレスxは一時位置メモリ81に保管される。
【0108】
上記各検出は、一つの水平走査線の出力期間が終了するまで継続して行われ、最終的に、当該水平走査線について全ての画素の出力に基づいて最大輝度及び水平アドレスが求められ、記録される(ステップS4)。
【0109】
そして、出力期間から帰線期間に移行すると、一時輝度メモリ51及び一時位置メモリ81の各ゲート91,92が閉路する(ステップS5)。
【0110】
ゲート91の閉路により、走査線番号1の水平走査線中の最大輝度が一時輝度メモリ51から第二の比較回路6に出力される。この第二の比較回路6では、検出された最大輝度と輝度メモリ41のアドレス(x,y)=(x0,1)に記録された輝度とを比較する(ステップS6,S7)。そして、検出された最大輝度の方が高い場合に、第三の選択回路7により輝度メモリ41のアドレス(x0,1)の記録輝度が検出された最大輝度の数値に更新される(ステップS8)。
【0111】
なお、このときの輝度メモリ41は、測定開始前に予め初期化されて記録輝度が0の状態であるため、スリット光Rの輝度レベルであれば、通常更新が行われる。また、投光角度が2以降に進行している場合には、それまでの撮像画像による検出によって、既に同じアドレスについて最大輝度が更新されていることもあり得るが、かかる場合も同様にして検出輝度が高い場合には更新される。
【0112】
輝度メモリ41の更新が行われると、角度コード化メモリ42のアドレス(x,y)=(x0,1)にも、そのときの投光角度1が記録される(ステップS9)。
【0113】
一方、検出された最大輝度レベルの方が低い場合には、輝度メモリ41の更新は行われず、同時に、角度コード化メモリ42の記録も行われない(ステップS10)。
【0114】
そして、一つのスリット光Rに対して、全ての水平走査線について上記の工程が繰り返し行われる(ステップS11)。これにより、投光角度1におけるスリット光について各水平走査線方向の位置(水平アドレスx)が角度コード化メモリ42上に記録される。
【0115】
一つのスリット光について処理が終わると、次の投光角度のスリット光の撮像が行われ、上記の工程が繰り返される(ステップS12)。そして、全ての投光角度におけるスリット光の処理が終わると、角度コード化メモリ42の記録情報が測定データとしてコンピュータ100に出力される(ステップS13)。コンピュータ100は、角度コード化メモリ42からの出力により、補完処理および三次元形状演算を行い表示する(ステップS14)。
【0116】
本実施例では、記録輝度の設定輝度レベルが、スリット光の検出輝度の記録を妨げるほどに高くない場合には、仮に、スリット光が照射されない部分が生じた場合,或いはスリット光が暗くしか照射されなかった場合に、ノイズを選択して取り込むことを防止することが可能である。これは、ノイズはスリット光の輝度よりもかなり低い輝度であり、上述の例にように予めスリット光の半分程度の輝度が輝度メモリ41に入力されていれば、これに満たないノイズの輝度が更新記録することはないからである。
【0117】
図16は測定された空間コード化画像の一部分(6×6の領域)の空間コード値である。この例では、測定不能点をコード値0で検出する。図16では、測定不能点を符号42dおよび42eで示す。近傍のコードから、符号42fで示す画素は123、符号42gで示す画素は122と推測される。この画素について周辺4近傍のデータの0以外の中央値を用いた平滑化処理を行うと図23の結果を得る。
図16と図17との比較すると、正しい測定データが影響を受けずに符号42fで示す画素は123、符号42gで示す画素は122となり推測どおりの平滑化が行われた。この例では、A,B点のデータを測定不能点の4近傍のコードの中央値を用いて補完したが、4近傍でなく8近傍でもよい。また中央値でなく測定不能点を除く近傍のコードの平均値を用いても良い。
【0118】
<多重反射ノイズ除去>
図18に多重反射が生じた一例を示す。図18に示す例では、歯車Sの平面を上方から撮像している。計測光は、図中左上方から照射した。符号Raで示す所定の角度コードを有するスリット光は、通常の照射Raと、多重反射による照射Rbとを生じさせた。この状態を図10及び図11に示す装置で計測すると、図19に示す距離画像が得られる。符号S1で示す距離画像中、符号S2で示す死角が生じている。そして、正面図では、符号S3で示す多重反射Rbによるノイズが生じている。このように、正常な形状の近傍にノイズによる形状が重なると、自動的な除去はもとより、手動による除去も難しい。
【0119】
図20にこのような多重反射時の空間コードの一例を示す。空間コードが0になっている画素は死角であるため、ここでは無視すると、全体的に単調増加傾向を示している。しかし、水平画素座標160および205近辺で一時的に減少傾向となっている。この部分が多重反射によるコードの変化の起った箇所である。
【0120】
図20に示す例では、空間コード0の画素を除いたすべての画素について、その増加傾向を調べることで多重反射発生箇所の特定が可能となる。まず、水平画素座標0から255に向けて、増加傾向を調べコードが減少に転じた画素(点A)とそれまでの最大コードを記録する。次にその時点での最大コード異常のコードが記録されている画素位置(点B)を求める。このA―B間のコードがノイズの候補となり、ここでは増加コード・ジャンプ区間と呼ぶ。
【0121】
ここで、対象物の形状により、多重反射時の空間コードが一時的に減少する部分がある(図20中の131近辺)。このとき、一方向の探索により多重反射の除去を行うと、図20中のA―B間全てが多重反射によるノイズという誤った結果となってしまう。そこで、反対方向より同様にして減少傾向を調べ、減少傾向から増加に転じた画素(点C)、再び減少に戻った画素(点D)を求める。このC―D間をここでは減少コード・ジャンプ区間という。
【0122】
上記処理を繰返し行うことで、増加傾向の調査によるノイズ候補と減少傾向の調査によるノイズの候補とが求まる。このノイズ候補となった画素のうち、両方で候補とされた画素(A―C間)が多重反射によるノイズの可能性が最も高い画素となる。
【0123】
図1との対応では、本実施例では、照射工程E1が、計測光の走査方向に対して空間コードを増加させて照射する増加空間コード照射工程を備える。そして、多重反射判定工程E5が、空間コードの連続する画素間での増減を走査方向に比較すると共に増加傾向が逆転して減少に転じた開始画素から当該転じた時までの空間コードの最高値を越えた終了画素までの増加コード・ジャンプ区間を定義する増加コード・ジャンプ区間定義工程と、空間コードの連続する画素間での増減を走査方向とは逆向きに比較すると共に減少傾向が逆転して増加に転じた開始画素から当該転じた時までの空間コードの最低値を下回った終了画素までの減少コード・ジャンプ区間を定義する減少コード・ジャンプ区間定義工程とを備える。そして、この減少コード・ジャンプ区間定義工程に続いて、増加コード・ジャンプ区間と減少コード・ジャンプ区間との重なり合う区間を多重反射区間と判定する多重反射区間判定工程を備える。これにより比較的高速に行える処理を用いて多重反射区間を特定することができる。
【0124】
図21乃至図23は具体的な処理例を示すフローチャートである。ここでは、画素数256×256、投光角度分解能8bitとする。図21乃至図23の順に処理を行う。
【0125】
画素位置: (x,y)
空間コード化画像: Code(x,y)
増加コード・ジャンプ識別フラグ: Fmax(x,y)
減少コード・ジャンプ識別フラグ: Fmin(x,y)
最大値: Max
最小値: Min
多重反射データ識別フラグ: Err(x,y)
【0126】
図21に示すように、まず、増加方向について増加コード・ジャンプ区間を探索する。画素位置および最大値を初期化する(ステップF1)と、次いで、空間コード化画像のCode(x,y)の値が最大値Maxよりも大きいか否かを判定する(ステップF2)。空間コード化画像の値が、最大値Maxよりも小さい場合には、増加コード・ジャンプ識別フラグFmax(x,y)を1とする(ステップF3)。これにより、空間コードが減少に転じた座標およびそのまま連続して減少している区間であるか否かを記憶する。一方、空間コード化画像の値が最大値よりも大きい場合には、最大値を当該空間コードの値で更新すると共に、増加コード・ジャンプ識別フラグを0とする(ステップF4)。これをx方向(水平走査方向)について繰返し(ステップF5,F6)、さらに、垂直走査方向について繰返す(ステップ7,F8)。このとき、xの初期値を0とし、xの値はカウントアップさせている。これにより、水平走査方向での空間コードの増減を調べている。この図21に示す処理により、全ての空間コード化画像中、増加コード・ジャンプ区間にてFmax(x,y)=1となる
【0127】
続いて、図21に示すように、減少方向について減少コード・ジャンプ区間を探索する。ステップG1にてx=255と初期化する。そして、空間コードが最小値よりも小さいか否かを判定する(ステップG2)。通常、走査方向の逆方向では空間コードが減少するため、空間コードが最小値よりも小さくない場合には、減少コード・ジャンプ識別フラグFmin(x,y)を1とする(ステップG3)。これにより、空間コードが増加に転じた座標およびその後連続して増加している区間であるか否かを記憶する。一方、空間コード化画像の値が最小値よりも小さい場合には、最小値を更新すると共に、Fmin(x,y)の値を0とする。これをx方向(水平走査方向の反平行方向)について繰返し(ステップG5,G6)、さらに垂直方向について繰返す(ステップG7,G8)。このとき、xの初期値を255とし、xの値をカウントダウンすることで逆方向の探索を行っている。この図22に示す処理により、全ての空間コード化画像中、減少コード・ジャンプ区間にてFmin(x,y)=1となる。
【0128】
さらに、図23に示すように、初期化xおよびyの値を初期化し(ステップH1)、その座標のフラグを読出し、FmaxとFminともに1であるか否かを確認し(ステップH2)、両区間が重なる区間であるとして、その座標にエラーを設定する(ステップH3)。一方、両方が0であるとき又は一方のみが1であるときには、エラーフラグを0とする。そして、これを水平方向(ステップH5,H6)および垂直方向(ステップH7,H8)に繰返す。この図23に示す例では、ステップH4にて多重反射による間違ったコードの識別フラグをセットする。その後このフラグを調べて、表示の際に色を変更したり、また、演算処理を行わない等の処理に利用する。
【0129】
本実施例による多重反射ノイズ除去を行った例を図24に示す。上述したように本実施例によると、多重反射の推定が可能となり自動的にノイズの除去を行うことができる。また、金属加工面などの反射率の高い対象物も測定可能となる。
【発明の効果】
本発明は以上のように構成され機能するので、これによると、増減抽出工程にて、照射工程での計測光の走査方向と同方向の空間コードの増減の変化を抽出し、すると、多重反射が生じたときには、スリット光の進行方向が逆転し、走査方向とは逆向きに進行するため、空間コードの増加傾向が反転判定し、従って、多重反射判定工程では、増減抽出工程にて抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定し、そして、当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定することができ、これにより、死角に生じた多重反射であっても、空間コードの増減の変化に基づいて確実に抽出することができ、このため、除去の困難なノイズを除去して正確な形状計測を行うことができるという従来にない優れた三次元形状計測方法を提供することができる。
【図面の簡単な説明】
【図1】本発明の第一の実施形態の構成を示すフローチャートである。
【図2】図1に示した空間コードと受光素子の位置と測定対象物までの距離の関係を示す説明図である。
【図3】計測光と空間コードの関係を示す説明図であり、図3(A)は照射角度と角度コードの関係を示す図で、図3(B)は図3(A)に対応する空間コードの変化を示す図で、図3(C)は空間コードを濃淡で示した図である。
【図4】計測光と空間コードの関係を図3に続いて示す説明図であり、図4(A)は平面の測定対象物のカメラ側に小物体が存在する場合の例を示す図で、図4(B)は図4(A)に示すスリット光に対応する空間コードの変化を示す図で、図4(C)は測定対象物の表面が傾斜している場合を示す図で、図4(D)は図4(C)に示すスリット光に対応する空間コードの例を示す図である。
【図5】多重反射の生じた測定対象物の例を示す説明図であり、図5(A)は多重反射の生じる測定対象物の例を示す図で、図5(B)はその空間コードの変化を示す図である。
【図6】本発明による三次元形状計測装置の構成を示すブロック図である。
【図7】図6に示した三次元計測装置を較正する較正装置の例を示す斜視図である。
【図8】図7に開示した較正用二次元ゲージを示す図で、図8(A)はその正面図、図8(B)は側面図である。
【図9】図7に示した装置による較正処理例を示すフローチャートである。
【図10】光切断法による三次元計測装置の構成を示すブロック図である。
【図11】図10に示した空間コード処理手段の一例を示すブロック図である。
【図12】図12(A)はスリット光を撮像したCCD撮像センサを示す説明図であり、図12(B)は走査線番号1の水平走査線を構成する画素の出力を並び順に示す説明図である。
【図13】空間コード処理手段の動作を説明する構成を簡易化して示した説明図であり、図13(A)は一つ目のスリット光を撮像したCCD撮像センサを示し、図13(B)は初期化された輝度メモリを示し、図13(C)は図13(A)のスリット光の撮像により得られた一番目の走査線における輝度を記録した輝度メモリを示し、図13(D)は図13(C)の輝度メモリに基づいて記録された角度コード化メモリを示す。そして、図13(E)から図13(H)までは、同様にして各走査線ごとに輝度メモリ及び角度コード化メモリが記録される状態示している。
【図14】図10に示した構成により光切断法に基づく空間コードの生成処理の一例を示すフローチャートの前段である。
【図15】図10に示した構成により光切断法に基づく空間コードの生成処理の一例を示すフローチャートの後段である。
【図16】測定不能点を有する空間コード化画像の一例を示す説明図である。
【図17】図22に示した空間コード画像を補完した例を示す説明図である。
【図18】多重反射が生じた歯車の例を示す説明図である。
【図19】図18に示す状態での計測例を示す説明図である。
【図20】多重反射発生時の空間コードの変化例を示すグラフ図である。
【図21】多重反射区間を特定する処理例を示すフローチャートの前段である。
【図22】多重反射区間を特定する処理例を示すフローチャートの中段である。
【図23】多重反射区間を特定する処理例を示すフローチャートの後段である。
【図24】本実施例により多重反射を除去した例を示す説明図である。
【符号の説明】
2 照射機構
3 カメラ
4 算出手段
31 受光素子
41 輝度メモリ
42 角度コード化メモリ
R スリット光
S 測定対象物[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method and apparatus for measuring a three-dimensional shape and a storage medium storing a program for measuring a three-dimensional shape, and in particular, a three-dimensional shape measuring method and a three-dimensional shape measurement for measuring the shape of a measurement object with high accuracy. Relates to the device.
[0002]
[Prior art]
Conventionally, in order to measure a three-dimensional shape, the distance to the surface of the object to be measured is determined by the principle of triangulation based on the irradiation angle of the laser light and the position of the light receiving element of the CCD that receives the return light of the laser light. Calculated. For example, in Japanese Patent Laid-Open No. 10-213423 by the same applicant, in order to obtain a spatial code, a spatial coding pattern is projected to capture the number of the patterns, and bit plane images of the captured images are sequentially superimposed. By combining them, a spatially coded image is obtained. Then, the distance to the surface of the measurement object is calculated from the pixel position where the spatial code is stored and the spatial code.
[0003]
In the case of the light cutting method, the irradiation angle of the slit light is referred to as an angle code or a space code. By irradiating slit light in which each spatial code is defined, the angle code of the slit light can be used as a spatial code. Then, the distance to the measurement object can be calculated from the angle code of the slit light and the pixel position where the slit light of this angle code is received.
[0004]
[Problems to be solved by the invention]
However, the conventional example has a disadvantage that an erroneous angle code is recorded due to multiple reflection to a blind spot that is not illuminated. Then, noise is generated, and a shape that should not be present appears. The multiple reflection to the blind spot region occurs near the actual shape, and thus has the disadvantage that it is very difficult to remove. In other words, noise removal due to multiple reflections can be removed based on distance information if it exists at a location far away from the actual shape, but noise generated in locations close to the actual shape is It is difficult to remove manually.
[0005]
OBJECT OF THE INVENTION
An object of the present invention is to provide a three-dimensional shape measurement method and apparatus capable of improving the disadvantages of the conventional example and removing noise due to multiple reflections.
[0006]
[Means for Solving the Problems]
Therefore, in the present invention, an irradiation step of irradiating the measurement light corresponding to the space code that divides the space including the measurement object, and a predetermined angle with respect to the irradiation angle of the measurement light irradiated in this irradiation step are set. A spatial code for each position corresponding to each light receiving element based on the light receiving process of receiving the measurement light by each light receiving element arranged two-dimensionally on the light receiving plane formed and the order of the measurement light received in this light receiving process The distance from the origin to the surface of the object to be measured in a predetermined coordinate system based on the space code calculated in the space code processing step and the position of the light receiving element calculated in the space code processing step. A distance calculating step for calculating for each light receiving element.
In addition, in the spatial code processing step, an increase / decrease extraction step for extracting a change in increase / decrease in the spatial code in the same direction as the scanning direction of the measurement light in the irradiation step, and an increase / decrease in the spatial code extracted in this increase / decrease extraction step Spatial code based on multiple reflections by specifying a spatial code that is monotonically decreasing or monotonically increasing, which is a change opposite to a predetermined monotonically increasing or decreasing monotonous, and that the spatial code whose increase or decrease is reversed And a multiple reflection determination step for determining the above. Thus, the above-described purpose is achieved.
[0007]
In the irradiation process, slit light, spot light, and a plurality of time-series space-coded pattern lights defined by binary codes are defined as measurement light. In the light receiving process, for example, an area type CCD sensor is used to receive the measurement light. In the spatial code processing step, a bit plane is generated according to the type of measurement light, for example, if it is a time-series spatial coding pattern, and the luminance value is maximized based on the order of the bits, and if it is slit light A spatially coded image is generated based on the order of the slit light. In the distance calculation step, the distance to the measurement object is calculated according to the principle of triangulation according to the angle of the measurement light and the pixel position of the spatially encoded image. At this time, for example, the focal position of light reception may be set as the origin, or a point in the space including the measurement target may be set as the origin by performing calibration.
[0008]
In the space code processing step, the increase / decrease change in the space code in the same direction as the scanning direction of the measurement light in the irradiation step is extracted in the increase / decrease extraction step. Then, if the spatial code is increased in the scanning direction of the measurement light, an increasing tendency of the normal spatial code is observed. On the other hand, when multiple reflection occurs, the traveling direction of the slit light is reversed and proceeds in the direction opposite to the scanning direction, so that the increasing tendency of the spatial code is determined to be reversed. Accordingly, in the multiple reflection determination step, the spatial code in which the increase / decrease in the spatial code extracted in the increase / decrease extraction step is a decrease or increase which is a change opposite to the predetermined increase or decrease is specified, and A spatial code in which the increase / decrease of the spatial code is reversed is determined as a spatial code by multiple reflection. Thereby, even the multiple reflection occurring in the blind spot is surely extracted based on the change in increase / decrease of the space code.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a flowchart showing the configuration of the three-dimensional shape measuring method according to this embodiment. As shown in FIG. 1, the three-dimensional measurement method according to the present embodiment irradiates measurement light corresponding to a space code that divides a space including a measurement object, and measurement irradiated in the irradiation step E1. A light receiving step E2 for receiving the measurement light by each of the light receiving elements arranged two-dimensionally on a light receiving plane having a predetermined angle with respect to the light irradiation angle, and the measurement light received in the light receiving step E2 And a spatial code specifying step E3 for calculating a spatial code for each position corresponding to each light receiving element based on the order.
[0010]
In the present embodiment, an increase / decrease extraction step E4 for extracting a change in increase / decrease in the spatial code in the same direction as the scanning direction of the measurement light in the irradiation step E1, and an increase / decrease in the spatial code extracted in the increase / decrease extraction step E4 are performed. Multiplexing that identifies a spatial code that has decreased or increased, which is a change opposite to a predetermined increase or decrease, and that determines that the spatial code whose increase or decrease of the spatial code is reverse is a spatial code by multiple reflection And a reflection determination step E5. Further, the example shown in FIG. 1 includes a deletion step E6 that deletes the spatial code determined to be multiple reflection by the multiple reflection determination step, following the multiple reflection determination step E5. After removing noise due to multiple reflections, the distance from the origin to the surface of the object to be measured in a predetermined coordinate system based on the spatial code calculated in the spatial code specifying steps E4 to E6 and the position of the light receiving element For each light receiving element, and a distance image data output step E8 for outputting the distance image data calculated in the distance calculation step.
[0011]
In step E6, the spatial code due to multiple reflection is deleted. However, depending on the embodiment, an error flag adding step E6 for attaching an error flag to the spatial code determined to be multiple reflection by the multiple reflection determination step E5 is provided. You may do it. In this case, it is preferable to perform processing such as changing the display color of the distance data based on the spatial code to which the error flag is attached in the distance image data.
[0012]
Hereinafter, in order to explain the change in increase / decrease of the space code due to multiple reflection, first, a method for calculating the distance to the surface of the measurement object using the space code will be described.
[0013]
FIG. 2 is an explanatory diagram showing the principle of distance measurement using a space code. In the example shown in FIG. 2, the irradiation means that realizes the irradiation step E <b> 1 includes a laser light source 22 and a galvanometer mirror 23. In the light receiving step E2, the camera 3 is used. As shown in FIG. 2, the laser light source 22, the galvano mirror 23, and the camera 3 are located on the same plane that is horizontal to the floor surface (horizontal plane). The galvanometer mirror 23 is disposed at a distance of 1 from the optical axis of the camera 3, and the vertical direction (parallel to the slit light R) is the axis with respect to the horizontal scanning line of the light receiving element 31 of the camera 3. Rotate. With this arrangement, the slit light R can be moved in the parallel direction along the horizontal scanning line of the light receiving element 31 to be received by the light receiving element 31 of the camera 3.
[0014]
The space code is a value that is increased by a certain angle in the scanning direction of the galvano scanner 23, for example, corresponding to the value of θ shown in FIG. The light projection angle θ is specified for an arbitrary pixel, and the angle α of the slit light R position from the camera 3 is specified from the x component of the position coordinate of each pixel (in FIG. 2, it is a right angle). Further, since the separation distance l between the camera 3 and the galvanometer mirror 23 is an existing value, it can be obtained from, for example, the distance h = 1 / sin θ / sin (α + θ). Since the value of θ is determined by the scanning angle of the galvano scanner and the value of α is determined by the position of the light receiving element that has received light, the position of the position irradiated with the measurement light is determined from these two angles and a predetermined distance l. The distance h to the surface of the measurement object can be calculated.
[0015]
3 to 5 are explanatory diagrams showing the relationship between the measurement light and the space code. As shown in FIG. 3A, when the measuring object S is a flat surface, and the slit light is sequentially scanned from the left side in the figure, the angle code from the first angle θ1 to θn is used. The space can be divided. In the example shown in FIG. 3, since the scanning is performed from the left side to the right side in the drawing and the space code is increased according to the scanning, the relationship between the horizontal pixel coordinates and the space code in the light receiving step E2 is as shown in FIG. As shown. As shown in FIG. 3B, the value of the spatial code increases as the horizontal pixel coordinate increases. In FIG. 3C, the spatial code is represented by shading, where the spatial code indicated by black is the minimum and the spatial code indicated by white is the maximum.
[0016]
In the example shown in FIG. 4, a cylindrical object S2 exists on the camera 3 side of the measurement object S1. In the figure, 1 to 9 are spatial code values in which θ is omitted. As shown in FIG. 4 (A), the slit light from the angle codes θ1 to θ5 is applied to the measuring object S1 which is a plane. However, the subsequent slit light of the angle codes θ6 and θ7 is applied to the small object S2. Then, the angle code increases from θ3 to θ6 when the horizontal pixel coordinates continue in the scanning direction. On the other hand, after increasing to θ6, the angle codes θ4 and θ5 passing through the back side of the small object are imaged. Subsequently, the slit light of the angle codes θ8 and θ9 is applied to the planar measuring object S1. At this time, the angle code θ5 to θ8 is a blind spot due to the small object S2, and the angle code is not recorded. However, as shown in FIG. 4, the angle code (spatial code) tends to increase with respect to the scanning direction, except for discontinuous portions such as changes from the angle code θ3 to θ6 and from θ7 to θ4. . As shown in FIGS. 4C and 4D, even if the surface of the measuring object S is inclined, the increasing tendency of the angle code does not change and only the inclination changes.
[0017]
FIG. 5 shows an example in which multiple reflection occurs. In the example shown in FIG. 5, the angle codes θ8 and θ9 hit the wall surface S4 of the measuring object S3, and multiple reflection occurs. In multiple reflection, even if θ8 and θ9 are increased during irradiation, this relationship is reversed by reflection, and the spatial code continuously decreases as θ9 and θ8 as shown in FIG. To do. FIG. 5B shows the relationship between the space code and the horizontal pixel coordinates at this time. In the part shown by the code | symbol 4a, it is increasing monotonously. On the other hand, the portion indicated by reference numeral 4c is a blind spot, and the space code is 0. In the region where multiple reflection occurs, the spatial code continuously decreases as indicated by reference numeral 4b.
[0018]
In this way, in a three-dimensional measuring instrument that generates a spatially coded image, the angle code monotonously increases in one direction of the image (or in the case of measurement other than some exceptions (small objects floating in space) (or Monotonically decreasing). If multiple reflections occur and a code is recorded at a location different from the location where the light is directly hit, the tendency of this monotonous increase (decrease) is lost. Further, the code change monotonously decreases during the occurrence of multiple reflections due to temporary reflection (one reflection). Therefore, by examining the increasing (decreasing) tendency of the code along the horizontal scanning line from the output spatially coded image, it becomes possible to remove noise due to multiple reflection.
[0019]
Accordingly, the increase / decrease extraction step E4 shown in FIG. 1 extracts the change in increase / decrease of the spatial code in the same direction as the scanning direction of the measurement light in the irradiation step E1, and the multiple reflection determination step E5 extracts in this increase / decrease extraction step E4. When the spatial code whose decrease or increase is a change opposite to the predetermined increase or decrease is specified, the spatial code by multiple reflection shown by reference numeral 4b in FIG. 5 is specified. Can do.
[0020]
FIG. 6 is a block diagram showing a configuration of a three-dimensional shape measuring apparatus suitable for carrying out the three-dimensional shape measuring method according to the present embodiment. As shown in FIG. 6, the three-dimensional shape measurement apparatus according to the present embodiment is irradiated with measurement means corresponding to a space code that divides a space including a measurement object, and the irradiation means 2 irradiates the measurement light. The light receiving means 3 having each light receiving element arranged two-dimensionally on a light receiving plane that forms a predetermined angle with respect to the irradiation angle of the measurement light, and the order of the measurement light received by each light receiving element of the light receiving means 3 And a spatial code processing means 4 for calculating a spatial code for each position corresponding to each light receiving element.
[0021]
The measuring apparatus further includes a spatial code storage unit 42 that stores the spatial code calculated by the spatial code processing unit 4 at a pixel position corresponding to each light receiving element, each pixel position of the spatial code storage unit 42, and the corresponding pixel. Distance calculating means 100 for calculating, for each light receiving element, the distance from the origin in a predetermined coordinate system to each surface of the object to be measured based on the spatial code stored in.
[0022]
Furthermore, the spatial code processing means 4 includes an increase / decrease extraction unit 4G for extracting a change in increase / decrease in the spatial code in the same direction as the measurement light scanning direction by the irradiation means 2 from the spatial code image stored in the spatial code storage means 42; The spatial code extracted by the increase / decrease extraction unit 4G specifies a spatial code whose decrease or increase is a change opposite to a predetermined increase or decrease, and the increase or decrease of the spatial code is reverse. A multiple reflection determination unit 4H that determines the spatial code that has become a spatial code by multiple reflection.
[0023]
Among the spatial code processing means, the increase / decrease extraction unit 4G and the multiple reflection determination unit 4H can be realized by using an arithmetic device such as a computer. In this case, the arithmetic unit includes a storage unit that stores a three-dimensional measurement program, a CPU that functions as the unmeasurable point extraction unit 4B by executing the program, and a RAM that is a main storage device of the CPU. I have. This three-dimensional measurement program includes an increase / decrease extraction command for extracting an increase / decrease change in the spatial code in the same direction as the scanning direction of the measurement light emitted by the irradiation device, and an increase / decrease extraction command. The spatial code that is extracted in accordance with the monotonically increasing or monotonic decrease in the increase or decrease of the spatial code is identified as a monotonically decreasing or monotonically increasing spatial code, and the spatial code increase or decrease is reverse. And a multiple reflection determination command for determining that the spatial code is a spatial code by multiple reflection. Thereby, the configuration shown in FIG. 6 is realized, and the processing shown in FIG. 1 is performed by using the configuration shown in FIG.
[0024]
【Example】
Next, an example of the three-dimensional shape measurement process will be described with reference to the drawings.
<Calibration>
7 to 9 show examples in which the configuration of the three-dimensional shape measuring apparatus is performed. As shown in FIG. 2, the distance to the measurement object can be calculated based on the individual irradiation angle and the pixel position of the light receiving element. However, in practice, it is difficult to adjust the angle of view of the camera and installation. In the present embodiment, the relationship between the spatial code and the pixel position is calibrated because of the ease of handling and the value in the coordinate system including the measurement object.
[0025]
Generally, the imaging screen is detected by a planar CCD imaging sensor. The camera coordinate system is obtained by an Xc-Yc two-dimensional coordinate system. When the relationship between the object coordinate system and the camera coordinate system is expressed by a homogeneous coordinate system expression, it is expressed as the following equation (1). Here, the matrix C for converting the object coordinate system to the camera coordinate system is referred to as a camera parameter.
[0026]
[Expression 1]
Figure 0003800842
[0027]
On the other hand, since the projector calculates the displacement in the one-dimensional direction, the obtained coordinate system is only one-dimensional of Xp. When the relationship between the projector coordinate system and the object coordinate system is expressed by a homogeneous coordinate system expression, it is expressed as the following equation (2). Here, the matrix P for converting the object coordinate system to the projector coordinate system is referred to as a projector parameter.
[0028]
[Expression 2]
Figure 0003800842
[0029]
By developing these parameters and arranging them together, the relationship of the following equations (3), (4), (5) is obtained.
[0030]
[Equation 3]
Figure 0003800842
[0031]
Accordingly, if an inverse matrix exists in the matrix Q, the object coordinate system V = (X, Y, Z) can be obtained from the camera coordinate system (Xc, Yc) and the projector coordinate system Xp. When the three-dimensional shape is measured by the above-described methods, it is necessary to obtain the above-described camera parameter and projector parameter in advance in order to obtain this matrix Q.
[0032]
First, a bright and dark image of the reference cube B is captured by a CCD camera, and a coded image is captured by a space projector using a slit projector. Then, the light / dark image is binarized to extract the index portion, and the intersections obtained in a lattice form by virtually connecting the indexes facing each other in the plane of each cube are extracted as reference points (Xi, Yi, Zi). .
[0033]
When calculating camera parameters, the position coordinates of the reference point (known) on the object coordinate system and the pixel position on the image sensor of the CCD camera on the captured image (position coordinates (Xci, Yci on the camera coordinate system). )) As a pair.
[0034]
Between the position coordinates (Xi, Yi, Zi) of the reference point on the object coordinate system and the position coordinates (Xci, Yci) on the camera coordinate system, the following equations (3) and (4) are obtained. The relationship of Formula (6), (7) is materialized.
[0035]
[Expression 4]
Figure 0003800842
[0036]
In order to obtain a total of twelve unknowns of C11... C21... C34 in the equations (6) and (7), at least six or more reference points that are not on the same plane are determined on the camera coordinate system. It needs to be detected. And an unknown can be calculated | required by the least squares method.
[0037]
FIG. 7 shows an example of a three-dimensional measuring device and a calibration device. The three-dimensional shape measuring apparatus includes a projector 202 as an irradiation mechanism that irradiates irradiation light that attaches position coordinates in a certain one-dimensional direction to the measurement object, and a camera that images the measurement object irradiated with the irradiation light. 3 and an image processing board 201 for calculating three-dimensional image data of the measurement object from an image captured by the camera 3.
[0038]
The projector 202 can irradiate stripe-shaped pattern light at different pitches, and the host computer 200 performs operation control such as designation of irradiation timing and pattern light pitch. Further, slit light may be irradiated instead of pattern light. The projector coordinate system, which is a one-dimensional coordinate system, is formed in the stripe arrangement direction (the direction that crosses the pattern light vertically).
[0039]
The CCD camera 3 includes a light receiving element that outputs a luminance signal corresponding to the luminance of the received light. This light receiving element is a pixel arranged in a plane. A camera coordinate system which is a two-dimensional coordinate system is formed corresponding to the plane of the CCD image sensor, and the position of each pixel corresponds to the position coordinate of the coordinate system.
[0040]
The image processing board 201 synchronizes the projector 202 and the CCD camera 3 and calculates three-dimensional shape data based on the output of the CCD camera 3.
[0041]
Next, a calibration apparatus for the three-dimensional shape measuring apparatus will be described. This calibration apparatus includes a calibration two-dimensional gauge 202 having a plurality of indexes 222 in a known arrangement on a smooth flat surface 221, and a single axis that holds the gauge 202 movably in a direction perpendicular to the flat surface 221. A numerical control table 230 and a uniaxial numerical controller 240 that is provided in the uniaxial numerical control table 230 and serves as an adjusting means for adjusting the movement amount of the calibration two-dimensional gauge 202 are provided.
[0042]
As shown in FIG. 7, the calibration two-dimensional gauge 202 has a square plane 221 and is held in the uniaxial numerical control table 230 so that the plane 221 faces the CCD camera 3 and the projector 202. . The optical axis of the objective lens of the CCD camera 3 and the normal line of the one plane 221 are parallel. In other words, pattern light is irradiated from the projector 202 to the one plane 221, and the CCD camera 3 can capture a bright and dark image on the one plane 221, and the host computer 200 displays three-dimensional coordinate data described later as an image. It can be obtained via the processing board 201.
[0043]
The object coordinate system, which is a three-dimensional coordinate system, is set with reference to the calibration two-dimensional gauge 202. That is, in the calibration two-dimensional gauge 202 at the position shown in FIG. 7 (this position is the current position), as shown in FIG. 8A, the X-axis of the coordinate system has an upper left corner of one plane 221. The origin is set in the horizontal right direction, and the Y axis of the coordinate system is set in the vertically downward direction with the same angle of the plane 21 as the origin. Further, as shown in FIG. 8B, the Z axis of the coordinate system is set toward the opposite side of the CCD camera 3 along the normal direction of the one plane 221 with the same angle of the one plane 221 as the origin. ing. In this embodiment, the distance from the origin of this object coordinate system is calculated based on the space code and the pixel position.
[0044]
Further, the one plane 221 of the calibration two-dimensional gauge 202 is colored white, and an index 222 which is a black point for determining the reference point 23 is attached thereon. As shown in FIG. 8A, the indexes 222 are arranged at five equal pitches p on four sides of a square in which each side is parallel to the X and Y axes. Each index on the side opposite to each other corresponds to an index on the other side, and as shown by a dotted line in FIG. 8A, the corresponding two indexes are the X axis or the Y axis. Connected with a straight line parallel to The intersection of the straight lines connecting the corresponding indices becomes the reference point 223. 5 × 5 = 25 of these reference points 223 are developed in a grid pattern on one plane 21. Each index 21 is located on a known position coordinate in the object coordinate system described above, and accordingly, the position coordinate of each reference point 23 is also known.
[0045]
The uniaxial numerical control table 230 includes a holding member 231 of the calibration two-dimensional gauge 202, a ball screw 32 that engages with the holding member 231 and sends the holding member 31 in the Z-axis direction, and the ball screw 32 that is numerically controlled by the uniaxial numerical controller 4. And a stepping motor 33 that is driven by
[0046]
The uniaxial numerical controller 240 receives the numerical input of the feed amount in the Z direction from the host computer 200, drives and controls the stepping motor 233 with the corresponding drive amount, and arbitrarily sets the calibration two-dimensional gauge 202 in the Z direction. It can be positioned at the position. During calibration, the uniaxial numerical control table 230 is usually placed with the feeding direction of the calibration two-dimensional gauge 202 parallel to the optical axis of the objective lens of the CCD camera 3, and the calibration two-dimensional gauge 202 is placed in the Z direction. Is fed four times from the current position with a feed amount equal to the pitch p of the reference point 223.
[0047]
The host computer 200 controls the operation of the three-dimensional shape measuring device and the calibration device and calculates measurement information. All the operations of the automatic calibration system of the three-dimensional shape measuring apparatus shown in FIG. 9 are performed by a program inputted in advance to the host computer 200.
[0048]
FIG. 9 is a flowchart showing the operation of this embodiment. Hereinafter, based on this, the calibration operation of the three-dimensional shape measuring apparatus performed prior to the three-dimensional shape measurement of the present embodiment will be described.
[0049]
A variable step stored in the host computer 200 is initialized to 0 (step S1).
[0050]
Then, the laser beam output from the projector 202 of the three-dimensional shape measuring apparatus is continuously projected, and the image of each index attached on one plane of the calibration two-dimensional gauge 202 is captured by the CCD camera 3 to obtain a bright and dark image. obtain. Thereby, the host computer 200 sets the camera coordinate system Xc-Yc, which is a two-dimensional coordinate system, in the storage area (step S2).
[0051]
Next, a gray code pattern (pattern light on a stripe) is sequentially irradiated from the projector 202 to capture a spatially encoded image by the CCD camera 3. The host computer 200 obtains a spatial code from the captured image, and thereby sets the projector coordinate system Xp, which is a one-dimensional coordinate system, in the storage area (step S3).
[0052]
The captured bright and dark image is binarized, and the barycentric pixel (center) of each circular index 222 is obtained (step S4).
[0053]
In the host computer 200, a virtual intersection of straight lines connecting the respective indices 22 facing each other is calculated as a real coordinate reference point 23 for calibration (step S5).
[0054]
Then, in the storage area of the host computer, the position coordinate (Xc−Yc) of each reference point 223 on the camera coordinate system and the position coordinate Xp of the projector coordinate shape are stored in correspondence with each other (step S6).
[0055]
In the host computer 200, the step is incremented (step S7), and the calibration two-dimensional gauge 202 is moved in the Z direction by the distance of the pitch p (step S8).
[0056]
It is confirmed whether the calibration two-dimensional gauge 202 has been imaged five times, that is, whether the movement in the Z-axis direction has been performed four times (step S9). If the target number of times has not been reached, the process from step S2 to step S8 is performed. Repeat the operation. If it has been reached, camera parameters and projector parameters are obtained based on the stored data, and system parameters are calculated (step S10). This completes the calibration.
[0057]
In the present embodiment, an example is shown in which a calibration operation is performed on the three-dimensional shape measuring apparatus 100 that measures a three-dimensional shape based on the spatial coding method. However, the measurement of the three-dimensional shape is performed by scanning one slit light. This is also effective for a measuring device that performs the above and a measuring device based on other methods.
[0058]
In this way, the relationship between the pixel position and the spatial code is calibrated in advance using the calibration device shown in FIG. Then, in actual measurement, the distance from the origin in the object coordinate system can be calculated from the spatial code and the pixel position.
[0059]
<Measurement>
To obtain a spatially coded image, there are a light cutting method using slit light, a pattern light projection method using a time-series spatial coding pattern (gray coded pattern), and the like. As for the pattern light projection method, it is difficult for the pattern light projection to have holes other than the blind spot area and the abnormality of the light receiving element itself. On the other hand, since a perforation may occur in the calculation process of the spatially coded image by slit light projection, an example of the shape measurement of the measurement object will be described below using the light cutting method as an example.
[0060]
FIG. 10 is a block diagram of the present embodiment. Here, the irradiation means 2 that scans the measuring object S with the slit light R, the camera 3 that images the slit light R moving by scanning from a direction different from the irradiation means 2, and a plurality of captured images. And a spatial code processing means 4 for calculating a spatial code (angle code).
[0061]
The three-dimensional shape measuring apparatus outputs the three-dimensional image data calculated by the space code processing means 4 to the computer 100 connected via the digital I / O board 102 as shown in the figure. On the other hand, the computer 100 calculates a three-dimensional shape based on the angle coded image (spatial coded image) from the spatial code processing means 4 and the pixel position thereof. In this calculation, the distance in the object coordinate system is calculated using the camera parameters calculated using the calibration device described above.
[0062]
The irradiation means 2 includes a laser light source 22 that irradiates a single slit-shaped laser beam (hereinafter referred to as slit light R) driven by a laser driver 21, and the irradiated slit light R toward the measuring object S side. The reflecting galvanometer mirror 23, the galvanometer scanner 24 that rotates the galvanometer mirror 23 and scans the measuring object S with the slit light R, the scanner driver 25 that controls the driving of the galvanometer scanner 24, and the spatial code processing means 4 And a light projection angle command creating circuit 26 for outputting a light projection angle command to the scanner driver 25 based on the angle signal from.
[0063]
The slit light R emitted from the laser light source 22 is rod-shaped light along the vertical direction (up and down direction in FIG. 10) with respect to the floor surface at the time of measurement, and is perpendicular to the slit light R by the galvano mirror 23. It moves and scans the measuring object S. The direction of the slit light R is set in advance so as to be perpendicular to the horizontal scanning line of the light receiving element 31 of the camera 3.
[0064]
A projection angle signal is output from the memory address creation circuit 46 of the space code processing means 4 to the projection angle command creation circuit 26, and based on this, drive control of the galvano scanner 24 is performed.
[0065]
Further, as shown in FIG. 2, the laser light source 22, the galvanometer mirror 23, and the camera 3 are located on the same plane that is horizontal to the floor surface (horizontal plane). The galvanometer mirror 23 rotates about the vertical direction (the direction parallel to the slit light R) with respect to the horizontal scanning line of the light receiving element 31 of the camera 3. With this arrangement, the slit light R can be moved in the parallel direction along the horizontal scanning line of the light receiving element 31 to be received by the light receiving element 31 of the camera 3.
[0066]
In this embodiment, the light receiving element 31 is provided with 256 pixels in the horizontal scanning line direction, and 243 such horizontal scanning lines are provided, and a total of 256 × 243 pixels are regularly arranged. The output of the luminance signal from each pixel is performed for each horizontal scanning line in the arrangement order of the arranged horizontal scanning lines. A period during which the luminance signal of one horizontal scanning line is output is referred to as an output period, and a period between an output period in which no output is performed and the output period is referred to as a blanking period. In addition, each pixel on one horizontal scanning line outputs in the arrangement order during the output period. The outputs from all the pixels are sent to the spatial code processing means 4 as video signals. Thus, in this embodiment, the camera 3 has the same spatial code as the number of pixels in the horizontal scanning line direction.
[0067]
The camera 3 captures an image by dividing one scan of the slit light R by the number of pixels (256) on the scanning line. For this reason, the scanning range angle of the galvano scanner 24 is divided into 256, and synchronization is achieved by horizontal and vertical synchronization signals output from the synchronization circuit 43 of the spatial code processing means 4 to be described later in order to perform imaging at each angle.
[0068]
A block diagram of the space code processing means 4 is shown in FIG. This spatial code processing means 4 detects the peak value of the luminance output from each pixel for each scanning line of the light receiving element 31 and identifies it, and in response to the detection of this peak detection unit 5, The pixel position detection unit 8 that detects and specifies the position on the scanning line for the pixel that outputs the maximum luminance, the luminance memory 41 having a luminance recording area corresponding to each pixel of the light receiving element 31, and the peak detection unit 5 Based on the detected luminance and the position of the pixel detected by the pixel position detection unit 8, a second comparison unit that compares the recorded luminance recorded in the recording area of the corresponding pixel in the luminance memory 41 is compared. The comparison circuit 6, the third selection circuit 7 serving as a first updating unit for updating the recording brightness of the brightness memory 41 to the value of the detected brightness when the detected brightness is larger than the recorded brightness, and individually corresponding to each pixel Recording light projection angle And a angle encoding memory 42 having a pass.
[0069]
Further, the spatial code processing means 4 includes a synchronization circuit 43 that performs horizontal and vertical synchronization of the camera 3, an A / D conversion circuit 44 that quantizes the luminance signal of the video signal from the camera 3, a luminance memory 41, and an angle. A memory address creating circuit 46 for creating an address of the coded memory 42 is provided.
[0070]
The memory address generation circuit 46 counts the horizontal synchronizing signal from the synchronizing circuit 43, thereby outputting the horizontal scanning line number (the number on the horizontal scanning line from the end) where the pixel currently being output from the light receiving element 31 is located. (Hereinafter, vertical address y) is output.
[0071]
Further, the memory address generation circuit 46 counts the horizontal drive frequency (the number of pixels in the scanning line 768, 14.318 MHz) divided by three (in order to set the number of pixels in the scanning line to 256). The position on the horizontal scanning line of the pixel currently being output (indicating what number pixel from the end is outputting on the horizontal scanning line, hereinafter referred to as horizontal address x) is output.
[0072]
Further, the vertical synchronizing signal from the synchronizing circuit 43 is counted, and a projection angle signal is created and output to the irradiation means 2. Further, the memory address generation circuit 46 generates a clear signal in a temporary luminance memory 51 of the peak detection unit 5 and a temporary position memory 81 of the pixel position detection unit 8 to be described later for each output of one horizontal scanning line by a horizontal synchronization signal. Then output.
[0073]
By the way, the luminance signal quantized by the A / D conversion circuit 44 is output to the peak detector 5. The peak detector 5 includes a temporary luminance memory 51 that records only the luminance at the maximum level on one scanning line, and the signal level of the luminance signal quantized by the A / D exchange circuit 44 (hereinafter simply referred to as “luminance”). ”) And the brightness recorded in the maximum brightness memory 51 in the scanning line, and outputs which brightness is higher, based on the output of the first comparison circuit 53 And a first selection circuit 54 that selects the higher luminance and updates the recording luminance in the temporary luminance memory 51.
[0074]
The temporary luminance memory 51 described above only needs to be able to record a luminance signal for one pixel, and the storage capacity is luminance resolution × 1 (8 bits). The content of the temporary luminance memory 51 is cleared to 0 during each horizontal blanking period (for each horizontal scanning line).
[0075]
With the above configuration, the peak detector 5 detects and records the maximum level of the luminance signal for each scanning line.
[0076]
When the maximum luminance on one scanning line is detected by the peak detector 5, the pixel position detector 8 simultaneously detects the horizontal address x of the pixel that outputs the maximum luminance. The pixel position detection unit 8 includes a temporary position memory 81 that records only the horizontal address x of a pixel that outputs the maximum luminance on one scanning line, and a horizontal address corresponding to each pixel that is sequentially output from the memory address creation circuit 46. a second selection circuit 82 that overwrites the temporary position memory 81 with the horizontal address x of the pixel that outputs the maximum luminance selected by the output of the first comparison circuit 53 of the peak detector 5 described above. ing.
[0077]
Note that the temporary position memory 81 described above only needs to be able to record which of the 256 pixels, and its storage capacity is 256 × 1 (8 bits). The contents of the temporary position memory 81 are cleared to 0 during each horizontal blanking period (for each horizontal scanning line).
[0078]
With the above configuration, the pixel position detection unit 8 detects and records the horizontal address x of the pixel that outputs the maximum luminance for each scanning line.
[0079]
Each of the temporary luminance memories 51 is connected to the second comparison circuit 6 and the third selection circuit 7 via a gate 91. When the gate 91 is closed, the recording luminance in the temporary luminance memory 51 is reduced. Output to these. On the other hand, the temporary position memory 81 is connected to the luminance memory 42 and the angle encoding memory 42 via the gate 92, and when the gate 92 is closed, the horizontal address x in the temporary position memory 81 is output to these. .
[0080]
These gates 91 and 92 are both connected to the memory address generation circuit 46 and receive the output of the horizontal synchronizing signal of the light receiving element 31. These gates 91 and 92 are normally opened, and are closed when it is input from the horizontal synchronization signal that the light receiving element 31 is in the blanking period.
[0081]
Each of these gates 91 and 92 constitutes an output synchronization unit 9 that outputs the recorded contents of the temporary luminance memory 51 and the temporary position memory 81 simultaneously when the light receiving element 31 is in the blanking period.
[0082]
Next, the luminance memory 41 will be described. In the luminance memory 41, a luminance recording area corresponding to each pixel of the light receiving element 31 is formed (see FIG. 13). In each recording area of the luminance memory 41, a luminance set in advance to a value smaller than 0 to the luminance of normal slit light is recorded.
[0083]
As described above, when the gates 91 and 92 are closed, the maximum luminance is output from the temporary luminance memory 51 to the second comparison circuit 6, and the horizontal address x is output from the temporary position memory 81 to the luminance memory 41. Further, the memory address creation circuit 46 always outputs the current vertical address y to the luminance memory 41.
[0084]
As a result, the pixel that outputs the maximum luminance from the horizontal address x and the vertical address y to the luminance memory 41 is specified, and the recording area corresponding to this is specified. Recording luminance is output to the second comparison circuit 6.
[0085]
The second comparison circuit 6 compares the luminance from the temporary luminance memory 51 with the luminance already recorded in the luminance memory 41 and outputs which is higher. The third selection circuit 7 receives the output of the second comparison circuit 6 and updates the recording luminance of the luminance memory 41 to the luminance of the temporary luminance memory 51 when the luminance from the temporary luminance memory 51 is high. If not, the recording luminance of the luminance memory 41 is maintained as it is.
[0086]
Next, the angle coding memory 42 will be described. The angle encoding memory 42 includes a recording area of θ of the slit light R corresponding to each pixel of the light receiving element 31 (here, synonymous with the rotation angle of the galvano mirror 23) θ.
[0087]
In addition, the angle encoding memory 42 is provided with a fourth selection circuit 45 as a second updating unit that updates the projection angle θ of each recording area. The fourth selection circuit 45 is connected to the second comparison circuit 6 that operates when the gate 91 is closed, and at the same time, a projection angle signal indicating the current projection angle θ from the memory address creation circuit 46. Is entered.
[0088]
On the other hand, the angle encoding memory 42 always receives the current vertical address y from the memory address generation circuit 46, and the gate 92 is closed, so that the horizontal luminance of the pixel that has output the maximum luminance from the temporary position memory 81 is set. Address x is entered. As a result, the pixel that outputs the maximum luminance from the horizontal address x and the vertical address y to the angle encoding memory 42 is specified as one of the pixels of the light receiving element 31, and the fourth selection is performed. The circuit 45 waits for input.
[0089]
The fourth selection circuit 45 is a memory address generation circuit when the second comparison circuit 6 outputs that the luminance of the temporary luminance memory 51 is high among the luminance of the temporary luminance memory 51 and the luminance of the luminance memory 41. When the projection angle θ from 46 is recorded in the corresponding recording area and the luminance memory 41 outputs a high luminance, no update is performed. In this way, since the third and fourth selection circuits 7 and 45 are both updated by the output of the second comparison circuit 6, when the luminance of the temporary luminance memory 51 is updated with respect to the luminance memory 41. Only, the projection angle θ is recorded (updated if already recorded) in the angle coding memory 42.
[0090]
Here, both the brightness memory 41 and the angle coding memory 42 described above are cleared to 0 at the start of measurement.
[0091]
FIG. 12A shows the slit light R imaged on the light receiving element 31. At this time, since the scanning range by the irradiation mechanism is divided into 256, and imaging is performed for each divided range, the light projection angle is represented by numbers 1 to 256 in the imaging order. FIG. 12B shows the luminance level detected from each pixel along the horizontal scanning line of scanning line number 1. According to this figure, the maximum luminance level is observed at the position x0 in the horizontal scanning line direction, and this can be regarded as slit light.
[0092]
When the functions of the above-described units are combined, the three-dimensional shape measuring apparatus 10 regards the pixel where the maximum luminance is detected on the horizontal scanning line during the output period as the slit light irradiation position, and detects the maximum luminance for each scanning line. The horizontal address x of the pixel is obtained, and the projection angle of the irradiated slit light is obtained, and the angle coding memory 42 is completed. Thus, when the projection angle is obtained for the address of each pixel, the distance from the measuring object S imaged at each address to the camera 3 can be calculated, and the computer 100 measures the three-dimensional shape. Is called.
[0093]
For this reason, for the horizontal scanning line currently in the output period by the peak detection unit 5, the maximum luminance among the luminances output from the pixels on the horizontal scanning line is specified and recorded in the temporary luminance memory 51. . Further, during the output period, the pixel position detection unit 8 specifies the horizontal address x of the pixel that outputs the maximum luminance, and this is recorded in the temporary position memory 81.
[0094]
The maximum luminance and the horizontal address x recorded in each of the memories 51 and 81 are held until the output period ends and the retrace line period is reached, and when the output synchronization unit 9 shifts to the retrace line period, the luminance memory 41 or the angle It is output to the coded memory 42 side. Thus, since the luminance and the horizontal address x are held during the output period, the luminance determined to be maximum in the middle of the process is processed downstream (to the luminance memory 41 and the angle encoding memory 42). Recording) is not performed.
[0095]
Then, the luminance memory 41 has the luminance of the address specified by the second comparison circuit 6 and the third selection circuit 7 by these outputs and the vertical address y and the projection angle signal output by the memory address generation circuit 46. The comparison is updated. That is, the above comparison or update is performed for all horizontal scanning lines with respect to captured images at all projection angles, so that all pixels are at the highest level through all captured images captured at each projection angle. Only the obtained luminance is stored in the luminance memory 41.
[0096]
In addition, since the angle selection memory 42 is provided with the fourth selection circuit 45 connected to the second comparison circuit 6, all the pixels are similarly imaged at each projection angle. Only the projection angle when the highest luminance is detected through all the captured images is stored in the angle coding memory 42.
[0097]
Then, the information of the completed angle coding memory 42 is output, and the three-dimensional shape is measured by the computer 100.
[0098]
Here, the arithmetic processing method of the spatial code processing means 4 will be described with reference to simple examples shown in FIGS. Here, description will be made assuming that the number of pixels of the light receiving element 31 of the camera 3 is 3 × 3 (horizontal direction × vertical direction). In addition, it is assumed that the recording areas of the luminance memory 41 and the angle encoding memory 42 are all reset to 0 before the measurement is started.
[0099]
Since the number of pixels in the horizontal direction is three, it is assumed that imaging is performed at the rotation angles θ0, θ1, and θ2 of the galvanometer mirror 23 in which the slit light R is imaged in units of pixels.
[0100]
First, the processing when the projection angle θ = θ0 will be described with reference to FIG. First, FIG. 13A shows a captured image of the light receiving element 31 of the slit light R when the light projection angle θ = θ0. In the light receiving element 31, the horizontal direction indicates a horizontal address x (number assigned to the pixels in order from the left in the figure), and the vertical direction indicates a vertical address y (number assigned to the horizontal scanning lines in order from the top in the figure). To do. FIG. 13B shows the luminance memory 41 before update recording.
[0101]
In the output period of the horizontal scanning line of the vertical address y = 1 of the light receiving element 31, the detected brightness of each pixel is output in order, and the peak brightness is specified as 200 by the peak detector 5 by the end of the output period. A horizontal address x is specified as x = 1. Then, when the blanking period is started, the specified maximum luminance is compared with the recording luminance of the luminance memory 41, and then the maximum luminance is updated as the recording luminance (FIG. 13C). Simultaneously with the update of the luminance memory 41, the contents of the recording area of the horizontal address x = 1 and the vertical address y = 1 in the angle coding memory 42 are updated to the projection angle θ0 at that time (FIG. 13D). )).
[0102]
The same processing is performed for the vertical addresses y = 2 and y = 3 (FIGS. (E) and (F) show the update of the luminance memory 41 and the angle encoding memory 42 when y = 2. (G) and (H) show the update of the luminance memory 41 and the angle coding memory 42 when y = 3).
[0103]
The projection angle θ = θ1 and the projection angle θ = θ2 are processed. Further, the computer (arithmetic unit) 100 extracts unmeasurable points from the angle code data (spatial coded image) stored in the angle coding memory, and further calculates a complementary value. Thereafter, the distance in the object coordinate system is calculated from the angle code (space code) after complement and the pixel position stored in the angle coding memory 42.
[0104]
14 and 15 are flowcharts showing an example of processing until the angle code is calculated.
[0105]
First, the synchronization circuit 43 and the memory address creation circuit 46 synchronize the camera 3 and the irradiation means 2, and the measurement object S is irradiated with the slit light R and imaged (step S1). With this synchronization, the slit light is imaged on the light receiving element 31 while changing the position for each pixel in the horizontal scanning line direction.
[0106]
First, in accordance with the captured image at the projection angle 1, luminance is output from the horizontal scanning line with scanning line number 1 in the arrangement order of the pixels on the scanning line. The output period of all the pixels on one horizontal scanning line at this time is the output period on the horizontal scanning line (step S2).
[0107]
Based on the captured image, the peak detection unit 5 detects the maximum luminance for each horizontal scanning line, and at the same time, detects the horizontal address of the pixel that outputs the maximum luminance based on the detection (step S3). . The maximum brightness detected at this time is stored in the temporary brightness memory 51, and the horizontal address x is stored in the temporary position memory 81.
[0108]
Each of the above detections is continuously performed until the output period of one horizontal scanning line ends, and finally, the maximum luminance and the horizontal address are obtained based on the output of all the pixels for the horizontal scanning line, and the recording is performed. (Step S4).
[0109]
Then, when the output period shifts to the blanking period, the gates 91 and 92 of the temporary luminance memory 51 and the temporary position memory 81 are closed (step S5).
[0110]
Due to the closing of the gate 91, the maximum luminance in the horizontal scanning line of scanning line number 1 is output from the temporary luminance memory 51 to the second comparison circuit 6. The second comparison circuit 6 compares the detected maximum luminance with the luminance recorded at the address (x, y) = (x0, 1) of the luminance memory 41 (steps S6 and S7). When the detected maximum luminance is higher, the recording luminance at the address (x0, 1) of the luminance memory 41 is updated to the detected maximum luminance value by the third selection circuit 7 (step S8). .
[0111]
Since the luminance memory 41 at this time is initialized in advance before the start of measurement and the recording luminance is 0, the luminance memory 41 is normally updated if the luminance level of the slit light R is present. In addition, when the projection angle is advanced after 2, it is possible that the maximum luminance has already been updated for the same address by the detection by the captured image so far. If the brightness is high, it is updated.
[0112]
When the luminance memory 41 is updated, the projection angle 1 at that time is also recorded at the address (x, y) = (x0, 1) of the angle coding memory 42 (step S9).
[0113]
On the other hand, when the detected maximum luminance level is lower, the luminance memory 41 is not updated, and at the same time, the angle coding memory 42 is not recorded (step S10).
[0114]
Then, the above process is repeated for all the horizontal scanning lines for one slit light R (step S11). As a result, the position in the horizontal scanning line direction (horizontal address x) for the slit light at the projection angle 1 is recorded on the angle encoding memory 42.
[0115]
When the process is completed for one slit light, the imaging of the slit light at the next projection angle is performed, and the above process is repeated (step S12). When the processing of slit light at all projection angles is completed, the recording information in the angle coding memory 42 is output to the computer 100 as measurement data (step S13). The computer 100 performs complementation processing and three-dimensional shape calculation based on the output from the angle coding memory 42 and displays the result (step S14).
[0116]
In this embodiment, if the set luminance level of the recording luminance is not high enough to prevent recording of the detection luminance of the slit light, if there is a portion where the slit light is not irradiated, or the slit light is only irradiated darkly. If not, it is possible to prevent the noise from being selected and taken. This is because the noise is much lower than the luminance of the slit light, and if the luminance memory 41 is previously input with about half the luminance of the slit light as in the above example, the luminance of the noise that is less than this is not obtained. This is because no update is recorded.
[0117]
FIG. 16 shows a spatial code value of a part (6 × 6 region) of the measured spatially coded image. In this example, a measurement impossible point is detected with a code value of zero. In FIG. 16, unmeasurable points are indicated by reference numerals 42d and 42e. From the neighboring codes, it is estimated that the pixel indicated by reference numeral 42f is 123 and the pixel indicated by reference numeral 42g is 122. When the smoothing process using a median value other than 0 of the data in the vicinity of the surrounding 4 is performed on this pixel, the result of FIG. 23 is obtained.
When comparing FIG. 16 with FIG. 17, the correct measurement data was not affected, and the pixel indicated by reference numeral 42f was 123, the pixel indicated by reference numeral 42g was 122, and smoothing was performed as estimated. In this example, the data of points A and B are complemented using the median value of the codes in the vicinity of 4 of the unmeasurable points. Moreover, you may use the average value of the code | cord | chord of the vicinity except an unmeasurable point instead of a median value.
[0118]
<Multiple reflection noise removal>
FIG. 18 shows an example in which multiple reflection occurs. In the example shown in FIG. 18, the plane of the gear S is imaged from above. Measurement light was applied from the upper left in the figure. Slit light having a predetermined angle code indicated by symbol Ra caused normal irradiation Ra and irradiation Rb by multiple reflection. When this state is measured by the apparatus shown in FIGS. 10 and 11, a distance image shown in FIG. 19 is obtained. In the distance image indicated by reference sign S1, a blind spot indicated by reference sign S2 is generated. In the front view, noise due to the multiple reflection Rb indicated by S3 is generated. As described above, when the shape due to noise overlaps in the vicinity of the normal shape, not only automatic removal but also manual removal is difficult.
[0119]
FIG. 20 shows an example of such a spatial code at the time of multiple reflection. Pixels having a space code of 0 are blind spots, and therefore, when ignored, they generally show a monotonically increasing tendency. However, it tends to decrease temporarily around the horizontal pixel coordinates 160 and 205. This is where the code changes due to multiple reflections.
[0120]
In the example shown in FIG. 20, the multiple reflection occurrence location can be specified by examining the increasing tendency of all the pixels except the pixel of the spatial code 0. First, from the horizontal pixel coordinates 0 to 255, the increasing tendency is examined, and the pixel (point A) where the code starts to decrease and the maximum code so far are recorded. Next, the pixel position (point B) where the code of the maximum code abnormality at that time is recorded is obtained. The code between A and B becomes a noise candidate, and is called an increased code jump section here.
[0121]
Here, depending on the shape of the object, there is a portion where the spatial code at the time of multiple reflection temporarily decreases (near 131 in FIG. 20). At this time, if multiple reflections are removed by searching in one direction, all results between A and B in FIG. 20 result in erroneous results of noise due to multiple reflections. Therefore, the decreasing tendency is similarly examined from the opposite direction, and the pixel (point C) that has started to increase from the decreasing tendency and the pixel (point D) that has returned to decreasing again are obtained. This section between C and D is herein referred to as a reduced code jump section.
[0122]
By repeatedly performing the above processing, a noise candidate based on an increase tendency survey and a noise candidate based on a decrease trend survey are obtained. Of the pixels that are candidates for noise, the pixel that is a candidate for both (between A and C) is the pixel that has the highest possibility of noise due to multiple reflection.
[0123]
In correspondence with FIG. 1, in this embodiment, the irradiation step E1 includes an increased space code irradiation step of increasing the space code in the scanning direction of the measurement light and irradiating. Then, the multiple reflection determination step E5 compares the increase / decrease between consecutive pixels of the spatial code in the scanning direction, and the maximum value of the spatial code from the start pixel where the increase tendency is reversed and decreases to the time when the change occurs. The increase code / jump section definition process that defines the increase code / jump section to the end pixel that exceeds the limit and the increase / decrease between the consecutive pixels of the spatial code are compared in the opposite direction to the scanning direction and the decreasing trend is reversed. And a decreasing code / jump section defining step for defining a decreasing code / jump section from a starting pixel that has started to increase to an ending pixel that has fallen below the minimum value of the spatial code from when the switching started. Then, following the decreasing code / jump section defining step, a multiple reflection section determining step for determining an overlapping section of the increasing code jump section and the decreasing code jump section as a multiple reflection section is provided. As a result, the multiple reflection section can be specified using processing that can be performed at a relatively high speed.
[0124]
21 to 23 are flowcharts showing specific processing examples. Here, the number of pixels is 256 × 256, and the projection angle resolution is 8 bits. Processing is performed in the order shown in FIGS.
[0125]
Pixel position: (x, y)
Spatial coded image: Code (x, y)
Increase code jump identification flag: Fmax (x, y)
Decrease code jump identification flag: Fmin (x, y)
Maximum value: Max
Minimum value: Min
Multiple reflection data identification flag: Err (x, y)
[0126]
As shown in FIG. 21, first, an increase code jump section is searched for the increase direction. When the pixel position and the maximum value are initialized (step F1), it is next determined whether or not the value of Code (x, y) of the spatially coded image is larger than the maximum value Max (step F2). When the value of the spatially coded image is smaller than the maximum value Max, the increase code / jump identification flag Fmax (x, y) is set to 1 (step F3). As a result, the coordinates where the space code has started to decrease and whether or not the space code is continuously decreasing are stored. On the other hand, if the value of the spatially coded image is larger than the maximum value, the maximum value is updated with the value of the spatial code and the increase code / jump identification flag is set to 0 (step F4). This is repeated for the x direction (horizontal scanning direction) (steps F5 and F6), and further repeated for the vertical scanning direction (steps 7 and F8). At this time, the initial value of x is set to 0, and the value of x is counted up. Thereby, the increase / decrease in the spatial code in the horizontal scanning direction is examined. By the processing shown in FIG. 21, Fmax (x, y) = 1 in the increased code jump section in all spatially coded images.
[0127]
Subsequently, as shown in FIG. 21, a decrease code jump section is searched for the decrease direction. In step G1, x is initialized to 255. Then, it is determined whether or not the space code is smaller than the minimum value (step G2). Usually, since the spatial code decreases in the reverse direction of the scanning direction, if the spatial code is not smaller than the minimum value, the decreased code jump identification flag Fmin (x, y) is set to 1 (step G3). As a result, the coordinates where the space code has started to increase and whether the space code is continuously increasing thereafter are stored. On the other hand, when the value of the spatially coded image is smaller than the minimum value, the minimum value is updated and the value of Fmin (x, y) is set to 0. This is repeated for the x direction (the antiparallel direction of the horizontal scanning direction) (steps G5 and G6), and further repeated for the vertical direction (steps G7 and G8). At this time, the initial value of x is set to 255, and the backward search is performed by counting down the value of x. By the processing shown in FIG. 22, Fmin (x, y) = 1 is set in the reduced code jump section in all the spatially coded images.
[0128]
Further, as shown in FIG. 23, initialization values x and y are initialized (step H1), the flag of the coordinates is read, and it is confirmed whether both Fmax and Fmin are 1 (step H2). Assuming that the sections overlap, an error is set for the coordinates (step H3). On the other hand, when both are 0 or only one is 1, the error flag is set to 0. This is repeated in the horizontal direction (steps H5 and H6) and the vertical direction (steps H7 and H8). In the example shown in FIG. 23, the identification flag of the wrong code due to multiple reflection is set in step H4. Thereafter, this flag is checked and used for processing such as changing the color at the time of display or not performing arithmetic processing.
[0129]
An example in which multiple reflection noise removal according to this embodiment is performed is shown in FIG. As described above, according to the present embodiment, multiple reflection can be estimated and noise can be automatically removed. It is also possible to measure an object with high reflectivity such as a metal processed surface.
【The invention's effect】
Since the present invention is configured and functions as described above, according to this, in the increase / decrease extraction process, the change in the increase / decrease in the spatial code in the same direction as the scanning direction of the measurement light in the irradiation process is extracted. When this occurs, the traveling direction of the slit light is reversed and proceeds in the direction opposite to the scanning direction, so that the increase tendency of the spatial code is determined to be reversed. Therefore, in the multiple reflection determination step, it is extracted in the increase / decrease extraction step. Identifies the space code whose decrease or increase is a change opposite to the predetermined increase or decrease, and multiplexes the space code where the increase or decrease of the space code is opposite It can be determined that the spatial code is due to reflection, and even multiple reflections that occur in the blind spot can be reliably extracted based on the change in the increase and decrease of the spatial code, and therefore difficult to remove. Noise is removed can be provided an excellent three-dimensional shape measuring method not conventionally being able to perform accurate shape measurement.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a configuration of a first embodiment of the present invention.
FIG. 2 is an explanatory diagram showing a relationship between a spatial code, a position of a light receiving element, and a distance to a measurement object shown in FIG. 1;
FIG. 3 is an explanatory diagram showing a relationship between measurement light and a space code, FIG. 3 (A) is a diagram showing a relationship between an irradiation angle and an angle code, and FIG. 3 (B) corresponds to FIG. 3 (A). FIG. 3C is a diagram showing changes in the spatial code, and FIG. 3C is a diagram showing the spatial code in shades.
FIG. 4 is an explanatory diagram showing the relationship between measurement light and a space code following FIG. 3, and FIG. 4 (A) is a diagram showing an example in the case where a small object exists on the camera side of a planar measurement object. 4 (B) is a diagram showing a change in the spatial code corresponding to the slit light shown in FIG. 4 (A), and FIG. 4 (C) is a diagram showing a case where the surface of the measurement object is inclined, FIG. 4D is a diagram showing an example of a spatial code corresponding to the slit light shown in FIG.
FIG. 5 is an explanatory diagram showing an example of a measurement object in which multiple reflection occurs, FIG. 5 (A) is a diagram showing an example of a measurement object in which multiple reflection occurs, and FIG. 5 (B) shows its spatial code; It is a figure which shows the change of.
FIG. 6 is a block diagram showing a configuration of a three-dimensional shape measuring apparatus according to the present invention.
7 is a perspective view showing an example of a calibration device for calibrating the three-dimensional measurement device shown in FIG. 6. FIG.
8A and 8B are diagrams showing the calibration two-dimensional gauge disclosed in FIG. 7, in which FIG. 8A is a front view and FIG. 8B is a side view.
9 is a flowchart showing an example of calibration processing by the apparatus shown in FIG. 7;
FIG. 10 is a block diagram showing a configuration of a three-dimensional measuring apparatus using a light cutting method.
11 is a block diagram showing an example of a spatial code processing means shown in FIG.
12A is an explanatory view showing a CCD image sensor that picks up slit light, and FIG. 12B is an explanatory view showing the outputs of pixels constituting the horizontal scanning line of scanning line number 1 in order. FIG.
13 is an explanatory diagram showing a simplified configuration for explaining the operation of the spatial code processing means. FIG. 13 (A) shows a CCD image sensor that images the first slit light, and FIG. ) Shows the initialized luminance memory, FIG. 13C shows the luminance memory in which the luminance in the first scanning line obtained by imaging the slit light in FIG. 13A is recorded, and FIG. ) Shows an angle-coded memory recorded based on the luminance memory of FIG. Similarly, FIGS. 13E to 13H show a state in which the luminance memory and the angle coding memory are recorded for each scanning line.
14 is a front part of a flowchart illustrating an example of a spatial code generation process based on the light cutting method with the configuration illustrated in FIG.
15 is the latter part of the flowchart showing an example of the spatial code generation process based on the light cutting method with the configuration shown in FIG.
FIG. 16 is an explanatory diagram illustrating an example of a spatially coded image having a measurement impossible point.
FIG. 17 is an explanatory diagram showing an example in which the spatial code image shown in FIG. 22 is complemented.
FIG. 18 is an explanatory diagram showing an example of a gear in which multiple reflection occurs.
FIG. 19 is an explanatory diagram showing a measurement example in the state shown in FIG. 18;
FIG. 20 is a graph showing an example of a change in spatial code when multiple reflection occurs.
FIG. 21 is a front part of a flowchart showing an example of processing for specifying a multiple reflection section;
FIG. 22 is a middle part of a flowchart showing an example of processing for specifying a multiple reflection section.
FIG. 23 is the latter part of the flowchart showing a processing example for identifying the multiple reflection section.
FIG. 24 is an explanatory diagram showing an example in which multiple reflection is removed according to the present embodiment.
[Explanation of symbols]
2 Irradiation mechanism
3 Camera
4 Calculation means
31 Light receiving element
41 Luminance memory
42 Angle coded memory
R slit light
S Measurement object

Claims (6)

測定対象物を含む空間を分割する空間コードに対応した計測光を照射する照射工程と、この照射工程で照射された計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子にて当該計測光を受光する受光工程と、この受光工程にて受光した計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード処理工程と、この空間コード処理工程にて算出された空間コードと前記受光素子の位置とに基づいて予め定められた座標系での原点から前記測定対象物の表面までの距離を各受光素子毎に算出する距離算出工程とを備えた三次元形状計測方法において、
前記空間コード処理工程が、前記照射工程での前記計測光の走査方向と同方向の空間コードの増減の変化を抽出する増減抽出工程と、この増減抽出工程にて抽出された空間コードの増減が予め定められた増加または減少とは逆向きの変化である減少または増加となった空間コードを特定すると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する多重反射判定工程とを備えたことを特徴とする三次元形状計測方法。
An irradiation process for irradiating measurement light corresponding to a space code that divides a space including a measurement object, and a light receiving plane that forms a predetermined angle with respect to the irradiation angle of the measurement light irradiated in this irradiation process. A light receiving process for receiving the measurement light at each light receiving element arranged in the space, and a spatial code process for calculating a spatial code for each position corresponding to each light receiving element based on the order of the measurement light received in the light receiving process The distance from the origin to the surface of the object to be measured for each light receiving element in a predetermined coordinate system based on the process, the spatial code calculated in this spatial code processing step and the position of the light receiving element. In a three-dimensional shape measurement method comprising a distance calculation step to calculate,
The spatial code processing step extracts an increase / decrease extraction step for extracting an increase / decrease change in the spatial code in the same direction as the scanning direction of the measurement light in the irradiation step, and an increase / decrease in the spatial code extracted in the increase / decrease extraction step. Multiplexing that identifies a spatial code that has decreased or increased, which is a change opposite to a predetermined increase or decrease, and that determines that the spatial code whose increase or decrease of the spatial code is reverse is a spatial code by multiple reflection A three-dimensional shape measurement method comprising: a reflection determination step.
前記多重反射判定工程に続いて、当該多重反射判定工程によって多重反射と判定された空間コードを削除する削除工程を備えたことを特徴とする請求項1記載の三次元形状計測方法。The three-dimensional shape measurement method according to claim 1, further comprising a deletion step of deleting the spatial code determined to be multiple reflection by the multiple reflection determination step, following the multiple reflection determination step. 前記多重反射判定工程に続いて、当該多重反射判定工程によって多重反射と判定された空間コードにエラーフラグを付するエラーフラグ付加工程を備えたことを特徴とする請求項1記載の三次元形状計測方法。The three-dimensional shape measurement according to claim 1, further comprising an error flag adding step of attaching an error flag to the spatial code determined to be multiple reflection by the multiple reflection determination step following the multiple reflection determination step. Method. 前記照射工程が、前記計測光の走査方向に対して前記空間コードを増加させて照射する増加空間コード照射工程を備え、
前記多重反射判定工程が、前記空間コードの連続する画素間での増減を走査方向に比較すると共に増加傾向が逆転して減少に転じた開始画素から当該転じた時までの空間コードの最高値を越えた終了画素までの増加コード・ジャンプ区間を定義する増加コード・ジャンプ区間定義工程と、前記空間コードの連続する画素間での増減を走査方向とは逆向きに比較すると共に減少傾向が逆転して増加に転じた開始画素から当該転じた時までの空間コードの最低値を下回った終了画素までの減少コード・ジャンプ区間を定義する減少コード・ジャンプ区間定義工程とを備えると共に、
この減少コード・ジャンプ区間定義工程に続いて、前記増加コード・ジャンプ区間と前記減少コード・ジャンプ区間との重なり合う区間を多重反射区間と判定する多重反射区間判定工程を備えたことを特徴とする請求項1記載の三次元形状計測方法。
The irradiation step includes an increased space code irradiation step of irradiating with increasing the space code with respect to the scanning direction of the measurement light,
The multiple reflection determination step compares the increase / decrease between successive pixels of the spatial code in the scanning direction and determines the highest value of the spatial code from the start pixel where the increase trend is reversed and decreases to the time when the change occurs. The increasing code / jump section defining step for defining the increasing code / jump section up to the end pixel that exceeds, and the increase / decrease between the consecutive pixels of the spatial code are compared in the opposite direction to the scanning direction and the decreasing tendency is reversed. And a decreasing code jump section defining step for defining a decreasing code jump section from a starting pixel that has started to increase to an ending pixel that has fallen below the minimum value of the spatial code from when the switching has started,
A step of determining a multiple reflection section is provided, following the reduction code jump section definition step, for determining a section where the increase code jump section and the decrease code jump section overlap as a multiple reflection section. Item 3. The three-dimensional shape measurement method according to Item 1.
測定対象物を含む空間を分割する空間コードに対応した計測光を照射する照射手段と、この照射手段によって照射された計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子を有する受光手段と、この受光手段の各受光素子が受光する計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード処理手段とを備えると共に、
この空間コード処理手段によって算出された空間コードを前記各受光素子に対応した画素位置に記憶する空間コード記憶手段と、この空間コード記憶手段の各画素位置及び当該画素に格納された空間コードに基づいて予め定められた座標系での原点から前記測定対象物の各表面までの距離を前記各受光素子毎に算出する距離算出手段とを備えた三次元形状計測装置において、
前記空間コード処理手段が、前記照射手段による計測光の走査方向と同方向の空間コードの増減の変化を前記空間コード記憶手段に格納された空間コード画像から抽出する増減抽出部と、この増減抽出部によって抽出された空間コードの増減が予め定められた単調増加または単調減少とは逆向きの変化である単調減少または単調増加となった空間コードを特定すると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定する多重反射判定部とを備えたことを特徴とする三次元形状計測装置。
Irradiation means for irradiating measurement light corresponding to a space code that divides the space including the measurement object, and a light receiving plane that forms a predetermined angle with respect to the irradiation angle of the measurement light emitted by the irradiation means. And a spatial code processing means for calculating a spatial code for each position corresponding to each light receiving element based on the order of measurement light received by each light receiving element of the light receiving means. As well as
Based on the spatial code storage means for storing the spatial code calculated by the spatial code processing means at the pixel position corresponding to each light receiving element, each pixel position of the spatial code storage means and the spatial code stored in the pixel In a three-dimensional shape measuring apparatus comprising a distance calculating means for calculating the distance from the origin in a predetermined coordinate system to each surface of the measurement object for each light receiving element,
The space code processing means extracts an increase / decrease extraction unit for extracting a change in the increase / decrease of the space code in the same direction as the scanning direction of the measurement light by the irradiation means from the space code image stored in the space code storage means, and this increase / decrease extraction The increase or decrease of the space code extracted by the unit is specified as a monotonically decreasing or monotonically increasing spatial code that is opposite to the predetermined monotonic increase or decrease, and the increase or decrease of the spatial code is reverse A three-dimensional shape measuring apparatus, comprising: a multiple reflection determination unit that determines a spatial code that has become a spatial code by multiple reflection.
測定対象物を含む空間を分割する空間コードに対応した計測光を照射させる照射装置と、この照射装置によって照射された計測光を当該計測光の照射角度に対して予め定められた角度をなす受光平面に二次元に配列された各受光素子にて受光する受光装置と、この受光装置にて受光した計測光の順序に基づいて各受光素子に対応する位置ごとに空間コードを算出する空間コード処理装置と、この空間コード処理装置によって生成された空間コード化画像に基づいて予め定められた座標系での原点から前記測定対象物の表面までの距離を各受光素子毎に算出する演算装置とを備えた三次元形状計測装置を使用して前記測定対象物の形状を測定する三次元形状計測用プログラムを記憶した記憶媒体であって、
前記三次元計測用プログラムは前記演算装置を動作させる指令として、前記照射装置によって照射される前記計測光の走査方向と同方向の空間コードの増減の変化を抽出させる増減抽出指令と、この増減抽出指令に応じて抽出された空間コードの増減が予め定められた単調増加または単調減少とは逆向きの変化である単調減少または単調増加となった空間コードを特定させると共に当該空間コードの増減が逆向きとなった空間コードを多重反射による空間コードと判定させる多重反射判定指令とを備えたことを特徴とする三次元形状計測用プログラムを記憶した記憶媒体。
Irradiation device that irradiates measurement light corresponding to a space code that divides the space including the measurement object, and light reception that makes the measurement light emitted by the irradiation device a predetermined angle with respect to the irradiation angle of the measurement light Spatial code processing that calculates a spatial code for each position corresponding to each light receiving element based on the order of the light receiving device that receives light by each light receiving element arranged two-dimensionally on a plane and the light received by this light receiving device And an arithmetic unit that calculates, for each light receiving element, a distance from the origin to the surface of the measurement object in a predetermined coordinate system based on a spatially encoded image generated by the spatial code processing device. A storage medium storing a three-dimensional shape measurement program for measuring the shape of the measurement object using a three-dimensional shape measurement apparatus provided,
The three-dimensional measurement program uses an increase / decrease extraction command for extracting a change in increase / decrease of a spatial code in the same direction as the scanning direction of the measurement light emitted by the irradiation device, as an instruction for operating the arithmetic unit, and this increase / decrease extraction The spatial code extracted according to the command is identified as a monotonically decreasing or monotonically increasing spatial code that is opposite to the predetermined monotonic increase or decrease, and the increase or decrease of the spatial code is reversed. A storage medium storing a three-dimensional shape measurement program, comprising: a multiple reflection determination command for determining a spatial code in an orientation as a spatial code by multiple reflection.
JP37268398A 1998-12-28 1998-12-28 Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program Expired - Fee Related JP3800842B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP37268398A JP3800842B2 (en) 1998-12-28 1998-12-28 Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP37268398A JP3800842B2 (en) 1998-12-28 1998-12-28 Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program

Publications (2)

Publication Number Publication Date
JP2000193438A JP2000193438A (en) 2000-07-14
JP3800842B2 true JP3800842B2 (en) 2006-07-26

Family

ID=18500878

Family Applications (1)

Application Number Title Priority Date Filing Date
JP37268398A Expired - Fee Related JP3800842B2 (en) 1998-12-28 1998-12-28 Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program

Country Status (1)

Country Link
JP (1) JP3800842B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8938099B2 (en) 2010-12-15 2015-01-20 Canon Kabushiki Kaisha Image processing apparatus, method of controlling the same, distance measurement apparatus, and storage medium
US10132613B2 (en) 2014-03-31 2018-11-20 Canon Kabushiki Kaisha Information processing apparatus, method for controlling information processing apparatus, gripping system, and storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5170622B2 (en) * 2007-07-11 2013-03-27 株式会社ニコン Shape measuring method, program, and shape measuring apparatus
EP2065678B1 (en) 2007-11-30 2016-02-10 Nissan Motor Co., Ltd. Distance measurement system and distance measurement method
JP5984409B2 (en) * 2012-02-03 2016-09-06 キヤノン株式会社 Three-dimensional measurement system and method
JP6009288B2 (en) * 2012-09-11 2016-10-19 株式会社キーエンス Measurement microscope apparatus, measurement microscope apparatus operation program, and computer-readable recording medium
JP2017126267A (en) * 2016-01-15 2017-07-20 株式会社Pfu Image processing system, image processing method and computer program
EP3788319A1 (en) * 2018-04-30 2021-03-10 Path Robotics, Inc. Reflection refuting laser scanner
JP7219034B2 (en) * 2018-09-14 2023-02-07 株式会社ミツトヨ Three-dimensional shape measuring device and three-dimensional shape measuring method
CN110532820B (en) * 2019-08-26 2021-03-16 维沃移动通信有限公司 Graphic code display and scanning method and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8938099B2 (en) 2010-12-15 2015-01-20 Canon Kabushiki Kaisha Image processing apparatus, method of controlling the same, distance measurement apparatus, and storage medium
US10132613B2 (en) 2014-03-31 2018-11-20 Canon Kabushiki Kaisha Information processing apparatus, method for controlling information processing apparatus, gripping system, and storage medium
DE102015104732B4 (en) 2014-03-31 2019-01-24 Canon Kabushiki Kaisha INFORMATION PROCESSING DEVICE, METHOD FOR CONTROLLING AN INFORMATION PROCESSING DEVICE, GRIPPING SYSTEM AND STORAGE MEDIUM

Also Published As

Publication number Publication date
JP2000193438A (en) 2000-07-14

Similar Documents

Publication Publication Date Title
US7116246B2 (en) Apparatus and method for sensing the occupancy status of parking spaces in a parking lot
US6549288B1 (en) Structured-light, triangulation-based three-dimensional digitizer
US7456842B2 (en) Color edge based system and method for determination of 3D surface topology
EP0669593B1 (en) Two-dimensional code recognition method
JP4885584B2 (en) Rangefinder calibration method and apparatus
JP2001116526A (en) Three-dimensional shape measuring instrument
JP4836086B2 (en) 3D shape detector
JP3800842B2 (en) Method and apparatus for measuring three-dimensional shape, and storage medium storing three-dimensional shape measuring program
EP1574819A2 (en) Identification and labeling of beam images of a structured beam matrix
JPH11166818A (en) Calibrating method and device for three-dimensional shape measuring device
GB2259764A (en) A device for measuring the three dimensional shape of an elongate member
JP2001159506A (en) Three-dimensional shape measuring device and method and recording medium
JP3621215B2 (en) 3D measuring device
JP3991501B2 (en) 3D input device
JP3800841B2 (en) Method and apparatus for measuring 3D shape and storage medium storing 3D shape measurement program
JP3740836B2 (en) Three-dimensional shape measuring device
JP2001012913A (en) Coil position detector
JP2961140B2 (en) Image processing method
JP2002107127A (en) Shape-measuring apparatus
JPH0467887B2 (en)
JP2000337829A (en) Luminance measuring method, storage medium to store program for measuring luminance, and three-dimensional measuring device
KR102423217B1 (en) Crack investigation device using 3D distance distribution information of ToF sensor and method of deriving crack information using the same
JPH11223516A (en) Three dimensional image pickup device
JPS63108207A (en) Method and device for measuring sectional shape
JP3013690B2 (en) Method and apparatus for measuring three-dimensional curved surface shape

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050325

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060424

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100512

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110512

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110512

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130512

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130512

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140512

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees