JP2000193438A - Method and device for measuring 3-dimension form, and storage medium where 3-dimension form measuring program is stored - Google Patents
Method and device for measuring 3-dimension form, and storage medium where 3-dimension form measuring program is storedInfo
- Publication number
- JP2000193438A JP2000193438A JP10372683A JP37268398A JP2000193438A JP 2000193438 A JP2000193438 A JP 2000193438A JP 10372683 A JP10372683 A JP 10372683A JP 37268398 A JP37268398 A JP 37268398A JP 2000193438 A JP2000193438 A JP 2000193438A
- Authority
- JP
- Japan
- Prior art keywords
- code
- decrease
- increase
- space code
- space
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000007423 decrease Effects 0.000 claims abstract description 99
- 238000005259 measurement Methods 0.000 claims abstract description 88
- 230000008859 change Effects 0.000 claims abstract description 31
- 238000000605 extraction Methods 0.000 claims description 18
- 230000001678 irradiating effect Effects 0.000 claims description 16
- 230000003247 decreasing effect Effects 0.000 claims description 11
- 238000000691 measurement method Methods 0.000 claims description 3
- 238000012217 deletion Methods 0.000 claims description 2
- 230000037430 deletion Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 17
- 235000019557 luminance Nutrition 0.000 description 146
- 230000015654 memory Effects 0.000 description 114
- 238000010586 diagram Methods 0.000 description 29
- 238000001514 detection method Methods 0.000 description 12
- 238000003384 imaging method Methods 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 102100033041 Carbonic anhydrase 13 Human genes 0.000 description 1
- 101000867860 Homo sapiens Carbonic anhydrase 13 Proteins 0.000 description 1
- 101000854908 Homo sapiens WD repeat-containing protein 11 Proteins 0.000 description 1
- 102100020705 WD repeat-containing protein 11 Human genes 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、三次元形状を計測
する方法および装置ならびに三次元形状計測用プログラ
ムを記憶した記憶媒体に係り、特に、精度良く測定対象
物の形状を計測する三次元形状計測方法および三次元形
状計測装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for measuring a three-dimensional shape and a storage medium storing a three-dimensional shape measurement program, and more particularly to a three-dimensional shape for accurately measuring the shape of an object to be measured. The present invention relates to a measurement method and a three-dimensional shape measurement device.
【0002】[0002]
【従来の技術】従来、三次元形状を計測するために、レ
ーザ光の照射角度と当該レーザ光の戻り光を受光するC
CDの受光素子の位置とに基づいて、三角測量の原理に
より測定対象物表面までの距離を算出している。例え
ば、同一出願人による特開平10―213423号公報
には、空間コードを得るために空間コード化パターンを
投影して当該パターンの数だけ撮像すると共に、当該撮
像した画像のビットプレーン画像を順次重ね合せること
で、空間コード化画像を得ている。そして、この空間コ
ードが格納された画素位置とその空間コードとから、測
定対象物表面までの距離を算出する。2. Description of the Related Art Conventionally, in order to measure a three-dimensional shape, an irradiation angle of a laser beam and a C which receives a return beam of the laser beam are used.
The distance to the surface of the object to be measured is calculated based on the principle of triangulation based on the position of the light receiving element of the CD. For example, in Japanese Patent Application Laid-Open No. Hei 10-213423 filed by the same applicant, in order to obtain a spatial code, a spatial coded pattern is projected and imaged by the number of the patterns, and bit plane images of the captured image are sequentially superimposed. By combining, a spatially coded image is obtained. Then, the distance to the surface of the object to be measured is calculated from the pixel position where the space code is stored and the space code.
【0003】光切断法による場合、スリット光の照射角
度を、角度コード又は空間コードという。この空間コー
ドがそれぞれ定義されたスリット光を照射し、このスリ
ット光の角度コードを空間コードとすることができる。
そして、スリット光の角度コードとこの角度コードのス
リット光を受光した画素位置とから、測定対象物までの
距離を算出することができる。In the case of the light cutting method, the irradiation angle of the slit light is called an angle code or a space code. The space code irradiates the defined slit light, and the angle code of the slit light can be used as the space code.
Then, the distance to the object to be measured can be calculated from the angle code of the slit light and the pixel position that has received the slit light of the angle code.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、上記従
来例では、照明の当らない箇所である死角への多重反射
により誤った角度コードが記録されてしまう、という不
都合があった。すると、ノイズが発生し、本来ないはず
の形状が現れる。死角領域への多重反射は、実際の形状
付近に発生するため、除去が非常に困難である、という
不都合があった。すなわち、多重反射によるノイズの除
去は、実際の形状から大きくかけ離れた場所に存在する
場合には、距離情報に基づいて除去することは可能であ
るが、実際の形状に近い箇所に生じたノイズは、人手に
よっても除去が困難である。However, in the above-mentioned conventional example, there is a disadvantage that an incorrect angle code is recorded due to multiple reflections on a blind spot which is a place where illumination is not applied. Then, noise is generated, and a shape that should not exist appears. Since the multiple reflection to the blind spot area occurs near the actual shape, there is an inconvenience that removal is very difficult. In other words, noise removal by multiple reflections can be removed based on distance information if the noise is located far away from the actual shape. It is difficult to remove by hand.
【0005】[0005]
【発明の目的】本発明は、係る従来例の有する不都合を
改善し、特に、多重反射によるノイズを除去することの
できる三次元形状計測方法および装置を提供すること
を、その目的とする。SUMMARY OF THE INVENTION An object of the present invention is to provide a method and an apparatus for measuring a three-dimensional shape capable of improving the disadvantages of the prior art and removing noise due to multiple reflections.
【0006】[0006]
【課題を解決するための手段】そこで、本発明では、測
定対象物を含む空間を分割する空間コードに対応した計
測光を照射する照射工程と、この照射工程で照射された
計測光の照射角度に対して予め定められた角度をなす受
光平面に二次元に配列された各受光素子にて当該計測光
を受光する受光工程と、この受光工程にて受光した計測
光の順序に基づいて各受光素子に対応する位置ごとに空
間コードを算出する空間コード処理工程と、この空間コ
ード処理工程にて算出された空間コードと受光素子の位
置とに基づいて予め定められた座標系での原点から測定
対象物の表面までの距離を各受光素子毎に算出する距離
算出工程とを備えている。しかも、空間コード処理工程
にて、照射工程での計測光の走査方向と同方向の空間コ
ードの増減の変化を抽出する増減抽出工程と、この増減
抽出工程にて抽出された空間コードの増減が予め定めら
れた単調増加または単調減少とは逆向きの変化である単
調減少または単調増加となった空間コードを特定すると
共に当該空間コードの増減が逆向きとなった空間コード
を多重反射による空間コードと判定する多重反射判定工
程とを備えた、という構成を採っている。これにより前
述した目的を達成しようとするものである。Therefore, according to the present invention, there is provided an irradiation step of irradiating measurement light corresponding to a space code for dividing a space including an object to be measured, and an irradiation angle of the measurement light irradiated in this irradiation step. A light receiving step of receiving the measurement light by each light receiving element two-dimensionally arranged on a light receiving plane forming a predetermined angle with respect to the light receiving element, and receiving each light based on an order of the measurement light received in the light receiving step. A space code processing step of calculating a space code for each position corresponding to the element, and measurement from an origin 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 Calculating a distance to the surface of the object for each light receiving element. In addition, in the space code processing step, an increase / decrease extraction step of extracting an increase / decrease change of the space code in the same direction as the scanning direction of the measurement light in the irradiation step, and an increase / decrease of the space code extracted in the increase / decrease extraction step. Identify a spatial code that is monotonically decreasing or monotonically increasing, which is a change in the opposite direction to a predetermined monotonically increasing or monotonically decreasing space code, and a spatial code obtained by multi-reflecting a spatial code in which the increase or decrease of the spatial code is reversed. And a multiple reflection determining step of determining that This aims to achieve the above-mentioned object.
【0007】照射工程では、角度コードをそれぞれ定義
されるスリット光や、スポット光や、二進コードで定義
された複数の時系列空間コード化パターン光を計測光と
して照射する。受光工程では、例えばエリア型のCCD
センサを使用して計測光を受光する。空間コード処理工
程では、計測光の種類に応じて例えば時系列空間コード
化パターンであればビットプレーンを生成すると共に当
該ビットの順序に基づいて、またスリット光であれば輝
度値が最大となったスリット光の順序に基づいて、空間
コード化画像を生成する。そして、距離算出工程では、
計測光の角度と、空間コード化画像の画素位置とに応じ
て三角測量の原理により測定対象物までの距離を算出す
る。このとき、例えば受光の焦点位置を原点としても良
いし、また較正を行うことで測定対象物を含む空間の一
点を原点としても良い。[0007] In the irradiation step, a slit light, a spot light, each of which defines an angle code, and a plurality of time-series space coded pattern lights defined by a binary code are irradiated as measurement light. In the light receiving process, for example, an area type CCD
The measurement light is received using a sensor. In the spatial code processing step, according to the type of the measurement light, for example, a bit plane is generated in the case of a time-series space coded pattern, and the brightness value is maximized based on the order of the bits, and in the case of slit light. A spatially coded image is generated based on the order of the slit light. Then, in the distance calculation step,
The distance to the object to be measured is calculated according to the principle of triangulation according to the angle of the measurement light and the pixel position of the spatially coded image. At this time, for example, the focus position of the light reception may be set as the origin, or one point of a space including the measurement target may be set as the origin by performing calibration.
【0008】空間コード処理工程では、増減抽出工程に
て、照射工程での計測光の走査方向と同方向の空間コー
ドの増減の変化を抽出する。すると、計測光の走査方向
にて空間コードを増加させているのであれば、通常空間
コードの増加傾向が観察される。一方、多重反射が生じ
ると、スリット光の進行方向が逆転し、走査方向とは逆
向きに進行するため、空間コードの増加傾向が反転判定
する。従って、多重反射判定工程では、増減抽出工程に
て抽出された空間コードの増減が予め定められた増加ま
たは減少とは逆向きの変化である減少または増加となっ
た空間コードを特定し、そして、当該空間コードの増減
が逆向きとなった空間コードを多重反射による空間コー
ドと判定する。これにより、死角に生じた多重反射であ
っても、空間コードの増減の変化に基づいて確実に抽出
する。In the space code processing step, in the increase / decrease extraction step, a change in the increase / decrease of the space code in the same direction as the scanning direction of the measurement light in the irradiation step is extracted. Then, if the space code is increased in the scanning direction of the measurement light, an increase tendency of the space code is usually observed. On the other hand, when multiple reflections occur, the traveling direction of the slit light is reversed and travels in the opposite direction to the scanning direction, so that the increasing tendency of the space code is determined to be reversed. Accordingly, in the multiple reflection determination step, the increase or decrease of the space code extracted in the increase or decrease extraction step specifies a space code in which the increase or decrease is a decrease or increase that is a change opposite to a predetermined increase or decrease, and The space code in which the increase / decrease of the space code is reversed is determined as a space code due to multiple reflection. As a result, even multiple reflections occurring in the blind spot are reliably extracted based on changes in the increase or decrease of the space code.
【0009】[0009]
【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。図1は本実施形態による三次元形
状計測方法の構成を示すフローチャートである。図1に
示すように、本実施形態による三次元計測方法は、測定
対象物を含む空間を分割する空間コードに対応した計測
光を照射する照射工程E1と、この照射工程E1で照射
された計測光の照射角度に対して予め定められた角度を
なす受光平面に二次元に配列された各受光素子にて当該
計測光を受光する受光工程E2と、この受光工程E2に
て受光した計測光の順序に基づいて各受光素子に対応す
る位置ごとに空間コードを算出する空間コード特定工程
E3とを備えている。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a flowchart showing the configuration of the three-dimensional shape measuring method according to the present embodiment. As shown in FIG. 1, the three-dimensional measurement method according to the present embodiment includes an irradiation step E1 of irradiating measurement light corresponding to a space code that divides a space including an object to be measured, and a measurement irradiated in the irradiation step E1. A light receiving step E2 of receiving the measurement light by each of the light receiving elements arranged two-dimensionally on a light receiving plane at a predetermined angle with respect to the light irradiation angle; and a light receiving step E2 of the measurement light received in the light receiving step E2. A space code specifying step E3 of calculating a space code for each position corresponding to each light receiving element based on the order.
【0010】本実施形態ではさらに、照射工程E1での
計測光の走査方向と同方向の空間コードの増減の変化を
抽出する増減抽出工程E4と、この増減抽出工程E4に
て抽出された空間コードの増減が予め定められた増加ま
たは減少とは逆向きの変化である減少または増加となっ
た空間コードを特定すると共に当該空間コードの増減が
逆向きとなった空間コードを多重反射による空間コード
と判定する多重反射判定工程E5とを備えている。さら
に、図1に示す例では、多重反射判定工程E5に続い
て、当該多重反射判定工程によって多重反射と判定され
た空間コードを削除する削除工程E6を備えている。多
重反射によるノイズを除去した後、空間コード特定工程
E4乃至E6にて算出された空間コードと受光素子の位
置とに基づいて予め定められた座標系での原点から測定
対象物の表面までの距離を各受光素子毎に算出する距離
算出工程E7と、この距離算出工程にて算出された距離
画像データを出力する距離画像データ出力工程E8とを
備えている。In this embodiment, furthermore, an increase / decrease extraction step E4 for extracting an increase / decrease change of the space code in the same direction as the scanning direction of the measurement light in the irradiation step E1, and a space code extracted in the increase / decrease extraction step E4 The increase / decrease of the predetermined increase or decrease is a change in the opposite direction to the decrease or increase in the space code, and the space code in which the increase / decrease of the space code is reversed is referred to as the space code by multiple reflection. And a multiple reflection determination step E5 for determination. Further, the example shown in FIG. 1 includes, following the multiple reflection determination step E5, a deletion step E6 for deleting the spatial code determined to be multiple reflection by the multiple reflection determination step. After removing noise due to multiple reflections, the distance from the origin in the predetermined coordinate system to the surface of the measurement object based on the space code calculated in the space code specifying steps E4 to E6 and the position of the light receiving element. Is calculated 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】ステップE6では、多重反射による空間コ
ードを削除することとしたが、実施の形態によっては、
多重反射判定工程E5によって多重反射と判定された空
間コードにエラーフラグを付するエラーフラグ付加工程
E6を備えるようにしてもよい。この場合、距離画像デ
ータにてエラーフラグが付された空間コードによる距離
データは他の部分と表示色を変化させる等の処理を行う
とよい。In step E6, the spatial code due to multiple reflection is deleted, but depending on the embodiment,
An error flag adding step E6 for adding an error flag to the space code determined to be multiple reflection in the multiple reflection determining step E5 may be provided. In this case, it is preferable to perform processing such as changing the display color of the distance data based on the space code to which the error flag has been added in the distance image data from other parts.
【0012】以下、多重反射による空間コード増減の変
化を説明するために、まず、空間コードを利用して測定
対象物表面までの距離の算出手法を説明する。In the following, in order to explain the change in the increase / decrease of the space code due to multiple reflection, first, a method of calculating the distance to the surface of the object to be measured using the space code will be described.
【0013】図2は空間コードを利用した距離計測の原
理を示す説明図である。図2に示す例では、照射工程E
1を実現する照射手段は、レーザ光源22と、ガルバノ
ミラー23とを備えている。また、受光工程E2は、カ
メラ3を使用する。レーザ光源22,ガルバノミラー2
3及びカメラ3は、図2に示すように、床面(水平面)
に対して水平である同一平面上に位置している。また、
ガルバノミラー23は、カメラ3の光軸から長さlの距
離で配置されており、カメラ3の受光素子31の水平走
査線に対して垂直方向(スリット光Rと平行方向)を軸
として回転する。この配置により、スリット光Rを受光
素子31の水平走査線に沿って平行方向に移動させてカ
メラ3の受光素子31に受光させることを可能としてい
る。FIG. 2 is an explanatory diagram showing the principle of distance measurement using a space code. In the example shown in FIG.
The irradiation means for realizing 1 includes a laser light source 22 and a galvanomirror 23. The camera 3 is used in the light receiving step E2. Laser light source 22, Galvano mirror 2
As shown in FIG. 2, the camera 3 and the camera 3 are on a floor surface (horizontal surface).
Are located on the same plane which is horizontal with respect to. Also,
The galvanometer mirror 23 is disposed at a distance of l from the optical axis of the camera 3 and rotates around a vertical 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, it is possible to move the slit light R in the parallel direction along the horizontal scanning line of the light receiving element 31 and allow the light receiving element 31 of the camera 3 to receive the light.
【0014】空間コードは、例えば図2に示すθの値に
対応してガルバノスキャナ23の走査方向に一定角度毎
に増加させた値である。任意の画素について投光角度θ
が特定され、且つ、各画素の位置座標のx成分からカメ
ラ3からスリット光R位置の角度αが特定される(図2
では直角となっている)。また、カメラ3とガルバノミ
ラー23との離間距離lは既値であるため、例えば、距
離h=l・sinθ/sin(α+θ)から求められる。θの
値はガルバノスキャナの走査角度によって定り、αの値
は受光した受光素子の位置によって定るため、この2つ
の角度と予め定められた距離lとから、計測光が照射さ
れた位置の測定対象物表面までの距離hを算出すること
ができる。The space code is, for example, a value that is increased at every fixed angle in the scanning direction of the galvano scanner 23 corresponding to the value of θ shown in FIG. Projection angle θ for any pixel
And the angle α of the slit light R position from the camera 3 is specified from the x component of the position coordinates of each pixel (FIG. 2).
Is a right angle.) Further, since the separation distance l between the camera 3 and the galvanometer mirror 23 is a known value, it can be obtained from, for example, the distance h = l · sin θ / sin (α + θ). 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 the light. Therefore, from these two angles and the predetermined distance l, the position of the position irradiated with the measurement light is determined. The distance h to the surface of the measurement object can be calculated.
【0015】図3乃至図5は計測光と空間コードの関係
を示す説明図である。図3(A)に示すように、測定対
象物Sが平面であって、この測定対象物に対して図中左
側からスリット光を順次走査する場合、最初の角度θ1
からθnまでの角度コードにより空間を分割できる。図
3に示す例では図中左側から右側へと走査し、かつ空間
コードを走査に応じて増加させているため、受光工程E
2での水平画素座標と空間コードの関係は図3(B)に
示す如くとなる。図3(B)に示すように、水平画素座
標が大きくなるにつれて、空間コードの値も大きくな
る。図3(C)では、空間コードを濃淡で表しており、
黒で示す空間コードが最小で、白で示す空間コードが最
大である。FIGS. 3 to 5 are explanatory diagrams showing the relationship between the measurement light and the space code. As shown in FIG. 3A, when the measurement object S is a plane and the slit light is sequentially scanned on the measurement object from the left side in the figure, the initial angle θ1
The space can be divided by angle codes from to .theta.n. In the example shown in FIG. 3, the scanning is performed from the left side to the right side in the figure, and the space code is increased in accordance with the scanning.
The relationship between the horizontal pixel coordinates and the space code in 2 is as shown in FIG. As shown in FIG. 3B, the value of the space code increases as the horizontal pixel coordinates increase. In FIG. 3 (C), the space code is represented by shading,
The space code shown in black is the smallest, and the space code shown in white is the largest.
【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の表面が傾斜していても、この
角度コードの増加傾向は変化せず、傾きが変るのみであ
る。In the example shown in FIG. 4, a cylindrical object S2 exists on the camera 3 side of the measuring object S1. In the figure,
1 to 9 are the values of the space code in which θ is omitted. 4
As shown in (A), the slit light having the angle codes θ1 to θ5 is applied to a flat measurement target S1. However, the slit light having the following angle codes θ6 and θ7 is applied to the small object S2. Then, in the continuation of the horizontal pixel coordinates in the scanning direction, the angle code increases from θ3 to θ6.
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 having the angle codes θ8 and θ9 is radiated to the planar measurement object S1. At this time, the area between the angle codes θ5 and θ8 is a blind spot due to the small object S2, and no angle code is recorded. However, as shown in FIG. 4, the angle code (space code) tends to increase in the scanning direction when discontinuous portions such as a change from the angle code θ3 to θ6 or a change from θ7 to θ4 are removed. . 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, but only the inclination changes.
【0017】図5に多重反射が生じた例を示す。図5に
示す例では、角度コードθ8およびθ9が測定対象物S3
の壁面S4にあたり、多重反射が生じている。多重反射
では、照射する際に、θ8、θ9と増加させていても、反
射によりこの関係が反転してしまい、図5(A)に示す
ように、空間コードがθ9、θ8と連続的に減少する。こ
のときの空間コードと水平画素座標の関係を図5(B)
に示す。符号4aで示す部分では、単調増加している。
一方、符号4cで示す部分は死角となり、空間コードが
0である。また、多重反射が生じた領域では、符号4b
で示すように、空間コードが連続的に減少している。FIG. 5 shows an example in which multiple reflection occurs. In the example shown in FIG. 5, the angle codes θ8 and θ9 are
Multiple reflection occurs on the wall surface S4. In the multiple reflection, even when the irradiation is increased to θ8 and θ9, this relationship is reversed by reflection, and the space code continuously decreases to θ9 and θ8 as shown in FIG. I do. FIG. 5B shows the relationship between the space code and the horizontal pixel coordinates at this time.
Shown in The portion indicated by reference numeral 4a monotonically increases.
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 reflections occur, reference numeral 4b
As shown by, the spatial code decreases continuously.
【0018】このように、空間コード化画像を生成する
三次元計測器では、一部の例外(空間に浮いた微少な物
体)以外の測定時には、角度コードは、画像の一方向に
向って単調増加(もしくは単調減少)する。多重反射が
発生し、光が直接当っている箇所と違う箇所にコードが
記録されると、この単調増加(減少)の傾向が崩れる。
さらに、一時反射(一回の反射)による多重反射の発生
中はコード変化が単調減少となる。そこで、出力された
空間コード化画像より、水平走査線に沿ってコードの増
加(減少)傾向を調べることで多重反射によるノイズを
除去することが可能となる。As described above, in the three-dimensional measuring device for generating a space-coded image, the angle code is monotonous in one direction of the image during measurement except for some exceptions (small objects floating in space). Increase (or monotonically decrease). When multiple reflection occurs and a code is recorded in a place different from a place where light is directly applied, this tendency of monotone increase (decrease) is broken.
Further, during multiple reflections caused by temporary reflection (single reflection), the code change monotonically decreases. Therefore, it is possible to remove noise due to multiple reflection by examining the tendency of the code to increase (decrease) along the horizontal scanning line from the output spatially coded image.
【0019】従って、図1に示す増減抽出工程E4が照
射工程E1での計測光の走査方向と同方向の空間コード
の増減の変化を抽出し、多重反射判定工程E5が、この
増減抽出工程E4にて抽出された空間コードの増減が予
め定められた増加または減少とは逆向きの変化である減
少または増加となった空間コードを特定すると、図5の
符号4bで示す多重反射による空間コードを特定するこ
とができる。Therefore, the increase / decrease extraction step E4 shown in FIG. 1 extracts the change of the increase / decrease of the space code in the same direction as the scanning direction of the measurement light in the irradiation step E1, and the multiple reflection judgment step E5 determines the increase / decrease extraction step E4. When a spatial code whose decrease or increase is a change opposite to a predetermined increase or decrease in the spatial code extracted in is specified, the spatial code by multiple reflection indicated by reference numeral 4b in FIG. Can be identified.
【0020】図6は本実施形態による三次元形状計測方
法の実施に好適な三次元形状計測装置の構成を示すブロ
ック図である。図6に示すように、本実施形態による三
次元形状計測装置は、測定対象物を含む空間を分割する
空間コードに対応した計測光を照射する照射手段2と、
この照射手段2によって照射された計測光の照射角度に
対して予め定められた角度をなす受光平面に二次元に配
列された各受光素子を有する受光手段3と、この受光手
段3の各受光素子が受光する計測光の順序に基づいて各
受光素子に対応する位置ごとに空間コードを算出する空
間コード処理手段4とを備えている。FIG. 6 is a block diagram showing a configuration of a three-dimensional shape measuring apparatus suitable for implementing the three-dimensional shape measuring method according to the present embodiment. As shown in FIG. 6, the three-dimensional shape measuring apparatus according to the present embodiment includes an irradiation unit 2 that irradiates measurement light corresponding to a space code that divides a space including a measurement target,
A light receiving means 3 having light receiving elements arranged two-dimensionally on a light receiving plane at a predetermined angle with respect to the irradiation angle of the measuring light irradiated by the irradiation means 2; and each light receiving element of the light receiving means 3 And a space code processing means 4 for calculating a space code for each position corresponding to each light receiving element based on the order of measurement light received by the light receiving element.
【0021】この計測装置はさらに、この空間コード処
理手段4によって算出された空間コードを各受光素子に
対応した画素位置に記憶する空間コード記憶手段42
と、この空間コード記憶手段42の各画素位置及び当該
画素に格納された空間コードに基づいて予め定められた
座標系での原点から測定対象物の各表面までの距離を各
受光素子毎に算出する距離算出手段100とを備えてい
る。The measuring apparatus further includes a space code storage means 42 for storing the space code calculated by the space code processing means 4 at a pixel position corresponding to each light receiving element.
And calculating the distance from the origin in the predetermined coordinate system to each surface of the measurement object for each light receiving element based on each pixel position of the space code storage means 42 and the space code stored in the pixel. And distance calculating means 100 for calculating the distance.
【0022】さらに、空間コード処理手段4は、照射手
段2による計測光の走査方向と同方向の空間コードの増
減の変化を空間コード記憶手段42に格納された空間コ
ード画像から抽出する増減抽出部4Gと、この増減抽出
部4Gによって抽出された空間コードの増減が予め定め
られた増加または減少とは逆向きの変化である減少また
は増加となった空間コードを特定すると共に当該空間コ
ードの増減が逆向きとなった空間コードを多重反射によ
る空間コードと判定する多重反射判定部4Hとを備えて
いる。Further, the space code processing means 4 includes an increase / decrease extraction unit for extracting a change in increase / decrease of the space code in the same direction as the scanning direction of the measurement light by the irradiation means 2 from the space code image stored in the space code storage means 42. 4G and the space code extracted by the increase / decrease extraction unit 4G, the space code whose decrease or increase is a change opposite to the predetermined increase or decrease is specified, and the increase / decrease of the space code is specified. The multi-reflection determination unit 4H that determines the space code turned in the opposite direction as a space code by multiple reflection is provided.
【0023】この空間コード処理手段のうち、増減抽出
部4Gと、多重反射判定部4Hとは、コンピュータ等の
演算装置を使用して実現することができる。この場合、
演算装置は、三次元計測用プログラムを記憶した記憶手
段と、このプログラムを実行する事により測定不能点抽
出部4B等として機能するCPUと、このCPUの主記
憶装置となるRAMとを備えている。この三次元計測用
プログラムは、演算装置を動作させる指令として、照射
装置によって照射される計測光の走査方向と同方向の空
間コードの増減の変化を抽出させる増減抽出指令と、こ
の増減抽出指令に応じて抽出された空間コードの増減が
予め定められた単調増加または単調減少とは逆向きの変
化である単調減少または単調増加となった空間コードを
特定させると共に当該空間コードの増減が逆向きとなっ
た空間コードを多重反射による空間コードと判定させる
多重反射判定指令とを備える。これにより、図6に示す
構成を実現し、さらに、この図6に示す構成を使用する
ことで図1に示す処理が行われる。Of the spatial code processing means, the increase / decrease extracting section 4G and the multiple reflection determining section 4H can be realized by using an arithmetic device such as a computer. in this case,
The arithmetic unit includes storage means for storing a three-dimensional measurement program, a CPU which functions as an unmeasurable point extracting unit 4B by executing the program, and a RAM which is a main storage device of the CPU. . The three-dimensional measurement program includes, as commands for operating the arithmetic device, an increase / decrease extraction command for extracting a change in increase / decrease of the space code in the same direction as the scanning direction of the measurement light irradiated by the irradiation device, and an increase / decrease extraction command. The increase or decrease of the space code extracted in response to the monotone decrease or monotone decrease is a change in the opposite direction to the predetermined monotone increase or monotone decrease, and the space code that has become the monotone decrease or monotone increase is specified, and the increase or decrease of the space code is in the opposite direction. And a multiple reflection determination command for determining the resulting spatial code as 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】[0024]
【実施例】次に、三次元形状計測処理の実施例を図面を
参照して説明する。 <較正>図7乃至図9に三次元形状計測装置の構成を行
う例を示す。図2に示すように、個別の照射角度と受光
素子の画素位置とにより、測定対象物までの距離を算出
することができるが、実際には、カメラの画角や、設置
時の調整の困難性や、測定対象物を含む座標系での値が
扱が容易である等の理由から、本実施例では、空間コー
ドと画素位置との関係を較正している。Next, an embodiment of a three-dimensional shape measuring process will be described with reference to the drawings. <Calibration> FIGS. 7 to 9 show examples of the configuration of the three-dimensional shape measuring apparatus. As shown in FIG. 2, the distance to the object to be measured can be calculated from the individual irradiation angles and the pixel positions of the light receiving elements. However, in practice, it is difficult to adjust the angle of view of the camera and the adjustment at the time of installation. In the present embodiment, the relationship between the spatial code and the pixel position is calibrated for reasons such as the property and the value in the coordinate system including the measurement object is easy to handle.
【0025】一般に、撮像画面は平面状のCCD撮像セ
ンサにより検出されるため。、カメラ座標系は、Xc−
Ycの二次元座標系によって得られる。物体座標系とこ
のカメラ座標系との関係を同次座標系表現で表すと、次
式(1)のように表される。ここで、物体座標系をカメ
ラ座標系に変換する行列Cをカメラパラメータという。Generally, an imaged screen is detected by a planar CCD image sensor. , The camera coordinate system is Xc-
It is obtained by a two-dimensional coordinate system of Yc. When the relationship between the object coordinate system and the camera coordinate system is represented by a homogeneous coordinate system expression, it is represented by the following equation (1). Here, the matrix C for converting the object coordinate system into the camera coordinate system is called a camera parameter.
【0026】[0026]
【数1】 (Equation 1)
【0027】一方、プロジェクタは、一次元方向の変位
を求めるため、得られる座標系はXpの一次元のみであ
る。このプロジェクタ座標系と物体座標系との関係を同
次座標系表現で表すと、次式(2)のように表される。
ここで、物体座標系をプロジェクタ座標系に変換する行
列Pをプロジェクタパラメータという。On the other hand, since the projector obtains displacement in one-dimensional direction, the obtained coordinate system is only one-dimensional Xp. When the relationship between the projector coordinate system and the object coordinate system is represented by a homogeneous coordinate system expression, it is represented by the following equation (2).
Here, a matrix P for transforming the object coordinate system into the projector coordinate system is called a projector parameter.
【0028】[0028]
【数2】 (Equation 2)
【0029】これら各パラメータを展開し、連立して整
理することにより、次式(3),(4),(5)の関係
が求められる。By developing these parameters and arranging them simultaneously, the following equations (3), (4) and (5) are obtained.
【0030】[0030]
【数3】 (Equation 3)
【0031】従って、行列Qに逆行列が存在すれば、カ
メラ座標系(Xc,Yc)及びプロジェクタ座標系Xpか
ら物体座標系V=(X,Y,Z)を求めることができ
る。前述した各手法により三次元形状の測定を行う場合
には、この行列Qを求めるために、前述したカメラパラ
メータ及びプロジェクタパラメータを予め求める必要が
ある。Therefore, 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 each of the above-described methods, it is necessary to obtain the camera parameters and the projector parameters in advance in order to obtain the matrix Q.
【0032】まず、CCDカメラで基準立方体Bの明暗
画像とスリットプロジェクタで空間コード化法によりコ
ード化画像を取り込む。そして、明暗画像を二値化して
指標部を取り出し、各立方体の面内で相対する指標同士
を仮想的に結んで格子状に得られるその交点を基準点
(Xi,Yi,Zi)として抽出する。First, a light and dark image of the reference cube B is fetched by a CCD camera and a coded image by a space coding method by a slit projector. Then, the bright and dark images are binarized to take out the index portion, and the intersections obtained by virtually connecting the opposing indices in the plane of each cube and obtained in a grid shape are extracted as reference points (Xi, Yi, Zi). .
【0033】カメラパラメータを算出する場合には、こ
の物体座標系上の基準点(既知)の位置座標と、撮像画
像上のCCDカメラのイメージセンサ上における画素位
置(カメラ座標系上の位置座標(Xci,Yci))をペア
で記憶する。When calculating the camera parameters, the position coordinates of the reference point (known) on the object coordinate system and the pixel positions on the image sensor of the CCD camera on the picked-up image (position coordinates on the camera coordinate system) Xci, Yci)) are stored in pairs.
【0034】この物体座標系上の基準点の位置座標(X
i,Yi,Zi)とカメラ座標系上の位置座標(Xci,Yc
i)との間には、前述の式(3),(4)から求まる次
式(6),(7)の関係が成立する。The position coordinates (X) of the reference point on the object coordinate system
i, Yi, Zi) and position coordinates (Xci, Yc) on the camera coordinate system.
i), the following equations (6) and (7) obtained from the above equations (3) and (4) hold.
【0035】[0035]
【数4】 (Equation 4)
【0036】各式(6),(7)のC11・・・C21・・
・C34の合計12の未知数を求めるには、少なくとも同
一平面上にない少なくとも六つ以上の基準点についてカ
メラ座標系上の点を検出する必要がある。そして、未知
数は最小二乗法により求めることができる。In each of the equations (6) and (7), C11... C21.
To find a total of 12 unknowns of C34, it is necessary to detect points on the camera coordinate system for at least six or more reference points that are not on the same plane. The unknown can be obtained by the least square method.
【0037】図7に三次元計測装置および較正装置の一
例を示す。三次元形状計測装置は、測定対象物に対して
一定の一次元方向について位置座標を付する照射光を照
射する照射機構としてのプロジェクタ202と、照射光
を照射された測定対象物を撮像するカメラ3と、このカ
メラ3による撮像画像から測定対象物の三次元画像デー
タを算出する画像処理ボード201とを備えている。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 with position coordinates in a certain one-dimensional direction to the measurement target, and a camera that captures the measurement target irradiated with the irradiation light 3 and an image processing board 201 for calculating three-dimensional image data of the object to be measured from an image captured by the camera 3.
【0038】プロジェクタ202は、ストライプ状のパ
ターン光をピッチを変えて照射することが可能であり、
ホストコンピュータ200により照射タイミングやパタ
ーン光のピッチの指定等の動作制御が行われる。また、
パターン光に代えて、スリット光を照射するようにして
もよい。一次元座標系たるプロジェクタ座標系は、スト
ライプの並び方向(パターン光を垂直に横切る方向)に
形成される。The projector 202 is capable of irradiating a stripe-shaped pattern light at a different pitch.
Operation control such as designation of irradiation timing and pattern light pitch is performed by the host computer 200. Also,
Instead of the pattern light, slit light may be applied. The projector coordinate system, which is a one-dimensional coordinate system, is formed in the direction in which the stripes are arranged (the direction perpendicular to the pattern light).
【0039】CCDカメラ3は、受光した光の輝度に応
じた輝度信号を出力する受光素子を備えている。この受
光素子は、平面状に配置された画素となる。二次元座標
系たるカメラ座標系は、このCCD撮像センサの平面に
対応して形成され、各画素の位置が座標系の位置座標に
対応する。The CCD camera 3 has a light receiving element for outputting a luminance signal according 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 coordinates of the coordinate system.
【0040】画像処理ボード201は、プロジェクタ2
02とCCDカメラ3の同期を図り、また、CCDカメ
ラ3の出力に基づいて三次元形状データを算出する。The image processing board 201 includes the projector 2
02 and the CCD camera 3 are synchronized, and three-dimensional shape data is calculated based on the output of the CCD camera 3.
【0041】次に、三次元形状計測装置の較正装置につ
いて説明する。この較正装置は、平滑な一平面221上
に既知の配置で複数の指標222を付した較正用二次元
ゲージ202と、このゲージ202をその一平面221
に垂直な方向に移動自在に保持する一軸数値制御テーブ
ル230と、この一軸数値制御テーブル230に装備さ
れ,較正用二次元ゲージ202の移動量を調節する調節
手段としての一軸数値制御コントローラ240とを備え
ている。Next, a calibration device of the three-dimensional shape measuring device will be described. The calibration device includes a calibration two-dimensional gauge 202 having a plurality of indices 222 in a known arrangement on a smooth plane 221, and the gauge 202 is attached to the plane 221.
A uniaxial numerical control table 230 that is movably held in a direction perpendicular to the axis, and a uniaxial numerical control controller 240 that is provided in the uniaxial numerical control table 230 and that serves as adjusting means for adjusting the amount of movement of the calibration two-dimensional gauge 202. Have.
【0042】較正用二次元ゲージ202は、図7に示す
ように、正方形の一平面221を有し、この一平面22
1がCCDカメラ3及びプロジェクタ202に正対する
ように一軸数値制御テーブル230に保持されている。
そして、CCDカメラ3の対物レンズの光軸と一平面2
21の法線とが平行である。即ち、これにより、一平面
221に対してプロジェクタ202からパターン光の照
射が行われ、CCDカメラ3は一平面221における明
暗画像の撮像ができ、ホストコンピュータ200では、
後述する三次元座標データを画像処理ボード201を介
して得ることができる。As shown in FIG. 7, the calibration two-dimensional gauge 202 has a plane 221 of a square.
1 is held in the uniaxial numerical control table 230 so as to face the CCD camera 3 and the projector 202.
Then, the optical axis of the objective lens of the CCD camera 3 and one plane 2
The normal to 21 is parallel. That is, thereby, the pattern light is emitted from the projector 202 to the one plane 221, the CCD camera 3 can capture a bright and dark image on the one plane 221, and the host computer 200
Three-dimensional coordinate data described later can be obtained via the image processing board 201.
【0043】三次元座標系である物体座標系は、較正用
二次元ゲージ202を基準にして設定される。即ち、図
7の位置(この位置を現位置とする)にある較正用二次
元ゲージ202において、図8(A)に示すように、座
標系のX軸は一平面221の左上方の角を原点として水
平右方向に設定され、座標系のY軸は一平面21の同じ
角を原点として垂直下方向に設定されている。また、座
標系のZ軸は、図8(B)に示すように、一平面221
の同じ角を原点として当該一平面221の法線方向に沿
ってCCDカメラ3と反対側に向けて設定されている。
本実施例では、この物体座標系の原点からの距離を空間
コードと画素位置とに基づいて算出する。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 assumed to be the current position), as shown in FIG. The origin is set horizontally rightward, and the Y-axis of the coordinate system is set vertically downward with the same angle of one plane 21 as the origin. Further, as shown in FIG. 8B, the Z axis of the coordinate system is
Are set to the opposite side to the CCD camera 3 along the normal direction of the one plane 221 with the same angle as the origin.
In this embodiment, the distance from the origin of the object coordinate system is calculated based on the space code and the pixel position.
【0044】さらに、較正用二次元ゲージ202の一平
面221上は白色に彩られ、その上に基準点23を決定
する黒点である指標222が付されている。指標222
は、図8(A)に示す如く、X軸,Y軸と各辺を平行と
した正方形の四辺上に五つずつ等ピッチpで配列されて
いる。互いに対向する辺上にある各指標は、それぞれが
他方の辺上にある指標と対応しており、図8(A)の点
線で示すように、対応する二つの指標は、X軸又はY軸
に平行な直線で結ばれる。この対応する指標を結ぶ各直
線の交点が基準点223となる。これら基準点223
は、一平面21上に升目状に5×5=25個が展開され
る。各指標21は、前述した物体座標系において、いず
れも既知の位置座標上に位置しており、これに伴い、各
基準点23の位置座標も既知となる。Further, one plane 221 of the two-dimensional calibration gauge 202 is colored white, and an index 222 which is a black point for determining the reference point 23 is attached thereon. Index 222
As shown in FIG. 8A, five are arranged at equal pitch p on four sides of a square having each side parallel to the X-axis and Y-axis. The indices on the sides facing each other correspond to the indices on the other side, respectively, and as shown by the dotted line in FIG. Are connected by a straight line parallel to. The intersection of each straight line connecting the corresponding indices is the reference point 223. These reference points 223
5 × 5 = 25 cells are developed in a grid 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】一軸数値制御テーブル230は、較正用二
次元ゲージ202の保持部材231と、これと係合しZ
軸方向に保持部材31を送るボールネジ32と、ボール
ネジ32を一軸数値制御コントローラ4による数値制御
のもとで駆動するステッピングモータ33とを備えてい
る。The one-axis numerical control table 230 includes a holding member 231 of the calibration two-dimensional gauge 202 and a
The ball screw 32 that feeds the holding member 31 in the axial direction, and a stepping motor 33 that drives the ball screw 32 under numerical control by the single-axis numerical controller 4 are provided.
【0046】一軸数値制御コントローラ240は、ホス
トコンピュータ200からのZ方向の送り量の数値入力
を受けて、これに対応する駆動量でステッピングモータ
233を駆動制御し、較正用二次元ゲージ202をZ方
向について任意の位置に位置決めすることができる。較
正の際に一軸数値制御テーブル230は、通常、較正用
二次元ゲージ202の送り方向をCCDカメラ3の対物
レンズの光軸と平行にして置かれ、当該較正用二次元ゲ
ージ202を、Z方向について、基準点223のピッチ
pと等しい送り量で現位置から四回送る。The one-axis numerical controller 240 receives a numerical input of the feed amount in the Z direction from the host computer 200, drives and controls the stepping motor 233 with a corresponding drive amount, and controls the two-dimensional It can be positioned at any position in the direction. At the time of calibration, the one-axis numerical control table 230 is usually set so that the feed direction of the calibration two-dimensional gauge 202 is parallel to the optical axis of the objective lens of the CCD camera 3, and the calibration two-dimensional gauge 202 is moved in the Z direction. Is sent four times from the current position with a feed amount equal to the pitch p of the reference point 223.
【0047】ホストコンピュータ200は、三次元形状
計測装置及び較正装置の動作制御を行うと共に測定情報
の演算を行う。図9に示す三次元形状計測装置の自動較
正システムの動作は、全て、このホストコンピュータ2
00に予め入力されたプログラムによって行われる。The host computer 200 controls the operation of the three-dimensional shape measuring device and the calibrating device and calculates the measurement information. The operation of the automatic calibration system of the three-dimensional shape measuring apparatus shown in FIG.
This is performed by a program input in advance at 00.
【0048】図9は、本実施形態の動作を示すフローチ
ャートである。以下、これに基づいて本実施形態の三次
元形状計測に先だって行われる三次元形状計測装置の較
正動作を説明する。FIG. 9 is a flowchart showing the operation of the present embodiment. Hereinafter, a calibration operation of the three-dimensional shape measuring apparatus performed prior to the three-dimensional shape measurement of the present embodiment will be described based on this.
【0049】ホストコンピュータ200に記憶される変
数ステップを0に初期化する(工程S1)。The variable step stored in the host computer 200 is initialized to 0 (step S1).
【0050】そして、三次元形状計測装置のプロジェク
タ202から出力されるレーザ光を連続的に投影し、較
正用二次元ゲージ202の一平面上に付された各指標の
画像をCCDカメラ3によって取り込み明暗画像を得
る。これにより、ホストコンピュータ200は、その記
憶領域に二次元座標系たるカメラ座標系Xc−Ycを設定
する(工程S2)。Then, the laser light output from the projector 202 of the three-dimensional shape measuring apparatus is continuously projected, and the image of each index attached to one plane of the two-dimensional calibration gauge 202 is captured by the CCD camera 3. Obtain light and dark images. Thereby, the host computer 200 sets the camera coordinate system Xc-Yc as a two-dimensional coordinate system in the storage area (step S2).
【0051】次に、プロジェクタ202からグレイコー
ドパターン(ストライプ上のパターン光)を順次照射し
て空間コード化画像をCCDカメラ3により撮像する。
ホストコンピュータ200は、取り込まれた画像から空
間コードを得て、これにより記憶領域に一次元座標系た
るプロジェクタ座標系Xpを設定する(工程S3)。Next, a gray code pattern (pattern light on a stripe) is sequentially emitted from the projector 202 and a spatially coded image is captured by the CCD camera 3.
The host computer 200 obtains a space code from the captured image, and thereby sets a projector coordinate system Xp as a one-dimensional coordinate system in the storage area (step S3).
【0052】撮像した明暗画像を二値化し、円形たる各
指標222の重心画素(中心)を求める(工程S4)。The captured light-dark image is binarized, and the center-of-gravity pixel (center) of each circular index 222 is obtained (step S4).
【0053】ホストコンピュータ200では、正対する
各々の指標22同士を結んだ直線の仮想交点を較正用の
実座標基準点23として計算により求める(工程S
5)。In the host computer 200, a virtual intersection point of a straight line connecting the respective indices 22 facing each other is obtained by calculation as the actual coordinate reference point 23 for calibration (step S).
5).
【0054】そして、ホストコンピュータの記憶領域に
おいて、各基準点223のカメラ座標系上の位置座標
(Xc−Yc)とプロジェクタ座標形状の位置座標Xpを
それぞれ対応させてデータとして記憶する(工程S
6)。Then, in the storage area of the host computer, the position coordinates (Xc-Yc) of each reference point 223 on the camera coordinate system and the position coordinates Xp of the projector coordinate shape are stored as data corresponding to each other (step S).
6).
【0055】ホストコンピュータ200では、ステップ
をインクリメントして(工程S7)、較正用二次元ゲー
ジ202をピッチpの距離だけZ方向に移動させる(工
程S8)。In the host computer 200, the steps are incremented (step S7), and the calibration two-dimensional gauge 202 is moved in the Z direction by a distance of the pitch p (step S8).
【0056】較正用二次元ゲージ202の撮像が五回行
われたか、即ち、Z軸方向の移動が四回行われたかを確
認し(工程S9)、もし目標回数を達していなければ工
程S2から工程S8の動作を繰り返す。また、達してい
れば、記憶された上記データを基に、カメラパラメータ
とプロジェクタパラメータを求めてシステムパラメータ
を計算する(工程S10)。そして、これにより較正が
終了する。It is confirmed whether or not the imaging of the calibration two-dimensional gauge 202 has been performed five times, that is, whether or not the movement in the Z-axis direction has been performed four times (step S9). The operation of step S8 is repeated. If it has reached, the camera parameters and the projector parameters are obtained based on the stored data to calculate the system parameters (step S10). Then, the calibration is completed.
【0057】また、本実施形態では、空間コード化法に
基づいて三次元形状の計測を行う三次元形状計測装置1
00に対する較正作業を行う例を示したが、一つのスリ
ット光の走査により三次元形状の計測を行う計測装置や
他の手法に基づく計測装置に対しても有効である。In this embodiment, a three-dimensional shape measuring apparatus 1 for measuring a three-dimensional shape based on a spatial coding method is used.
Although the example in which the calibration work is performed for 00 is shown, the present invention is also effective for a measuring device that measures a three-dimensional shape by scanning one slit light or a measuring device based on another method.
【0058】このように、図7に示す較正装置を使用し
て画素位置と空間コードとの関係を予め較正しておく。
すると、実際の計測では空間コードとその画素位置とか
ら、物体座標系での原点からの距離を算出することがで
きる。As described above, the relationship between the pixel position and the space code is calibrated in advance by using the calibration device shown in FIG.
Then, in the actual measurement, the distance from the origin in the object coordinate system can be calculated from the space code and the pixel position.
【0059】<計測>空間コード化画像を得るには、ス
リット光を用いる光切断法と、時系列空間コード化パタ
ーン(グレイコード化パターン)を使用するパターン光
投影法などがある。パターン光投影法については、パタ
ーン光の投影では、死角領域や受光素子自体の異常など
の他には穴あきは生じがたい。一方、スリット光投影で
の空間コード化画像の算出処理では穴あきが生じてしま
うことがあるため、以下、光切断法を例として測定対象
物の形状計測の一例を説明する。<Measurement> In order to obtain a space-coded image, there are a light cutting method using slit light, a pattern light projection method using a time-series space coding pattern (gray coding pattern), and the like. Regarding the pattern light projection method, in the projection of the pattern light, holes are unlikely to occur other than the blind spot area and the abnormality of the light receiving element itself. On the other hand, in the calculation processing of the spatially coded image by the slit light projection, a hole may be generated. Therefore, an example of the shape measurement of the measurement object will be described below using the light section method as an example.
【0060】図10は、本実施例のブロック図である。
ここでは、測定対象物Sに対してスリット光Rを走査す
る照射手段2と、この照射手段2とは異なる方向から走
査により移動するスリット光Rを複数回撮像するカメラ
3と、複数の撮像画像から空間コード(角度コード)を
算出する空間コード処理手段4とを備えている。FIG. 10 is a block diagram of this embodiment.
Here, an irradiation unit 2 that scans the measurement object S with the slit light R, a camera 3 that images the slit light R that moves by scanning from a direction different from the irradiation unit 2 a plurality of times, and a plurality of captured images And a space code processing means 4 for calculating a space code (angle code) from the data.
【0061】また、この三次元形状の計測装置は、図示
の如く、空間コード処理手段4で算出した三次元画像デ
ータをデジタルI/Oボード102を介して接続された
コンピュータ100に出力する。一方、コンピュータ1
00は、空間コード処理手段4からの角度コード化画像
(空間コード化画像)とその画素位置とに基づいて三次
元形状を算出する。この算出では、上述した較正装置を
用いて算出したカメラパラメータ等を用い、物体座標系
での距離を算出する。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. Meanwhile, computer 1
00 calculates a three-dimensional shape based on the angle coded image (space coded image) from the space code processing means 4 and its pixel position. In this calculation, a distance in the object coordinate system is calculated using camera parameters and the like calculated using the above-described calibration device.
【0062】照射手段2は、レーザドライバ21により
駆動される一本のスリット状のレーザ光(以下、スリッ
ト光Rとする)を照射するレーザ光源22と、照射され
たスリット光Rを測定対象物S側に反射するガルバノミ
ラー23と、ガルバノミラー23を回転してスリット光
Rを測定対象物Sに対して走査するガルバノスキャナ2
4と、ガルバノスキャナ24の駆動制御を行うスキャナ
ドライバ25と、空間コード処理手段4からの角度信号
に基づいてスキャナドライバ25に投光角度指令を出力
する投光角度指令作成回路26とを備える。The irradiating means 2 includes a laser light source 22 for irradiating one slit-shaped laser beam (hereinafter, referred to as a slit beam R) driven by a laser driver 21, and an illuminating slit beam R for an object to be measured. A galvanometer mirror 23 that reflects to the S side, and a galvanometer scanner 2 that rotates the galvanometer mirror 23 to scan the slit light R with respect to the measurement target S.
4, a scanner driver 25 for controlling the drive of the galvano scanner 24, and a projection angle command generation circuit 26 for outputting a projection angle command to the scanner driver 25 based on the angle signal from the space code processing means 4.
【0063】レーザ光源22から射出されるスリット光
Rは、測定時における床面に対して垂直方向(図10に
おける上下方向)に沿った棒状の光であり、ガルバノミ
ラー23により当該スリット光Rと垂直方向に移動して
測定対象物Sに対して走査を行う。また、スリット光R
は、カメラ3の受光素子31の水平走査線に対して垂直
となるように予めその向きが設定されている。The slit light R emitted from the laser light source 22 is a 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. The object S to be measured is scanned by moving in the vertical direction. Also, 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】投光角度指令作成回路26には、空間コー
ド処理手段4のメモリアドレス作成回路46から投光角
度信号が出力され、これに基づいてガルバノスキャナ2
4の駆動制御が行われる。The 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 the galvano scanner 2 is
4 is performed.
【0065】また、レーザ光源22,ガルバノミラー2
3及びカメラ3は、図2に示すように、床面(水平面)
に対して水平である同一平面上に位置している。そし
て、ガルバノミラー23は、カメラ3の受光素子31の
水平走査線に対して垂直方向(スリット光Rと平行方
向)を軸として回転する。この配置により、スリット光
Rを受光素子31の水平走査線に沿って平行方向に移動
させてカメラ3の受光素子31に受光させることを可能
としている。The laser light source 22, the galvanometer mirror 2
As shown in FIG. 2, the camera 3 and the camera 3 are on a floor surface (horizontal surface).
Are located on the same plane which is horizontal with respect to. Then, the galvanomirror 23 rotates around a vertical direction (a 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, it is possible to move the slit light R in the parallel direction along the horizontal scanning line of the light receiving element 31 and allow the light receiving element 31 of the camera 3 to receive the light.
【0066】受光素子31は、本実施例では、各画素が
水平走査線方向に256個設けられ、そして、かかる水
平走査線が243本設けられ、計256×243個の画
素が規則正しく配置されている。各画素からの輝度信号
の出力は、水平走査線ごとに、羅列された水平走査線方
向の並び順に行われる。このときの一本の水平走査線の
輝度信号の出力する期間を出力期間といい、出力が行わ
れない出力期間と出力期間との間の期間を帰線期間とい
う。また、一つの水平走査線上の各画素は、出力期間の
間にその配列順に出力を行う。そして、全ての画素にお
ける出力が映像信号として空間コード処理手段4に送ら
れる。このように、本実施例では、カメラ3の水平走査
線方向の画素数と同一の空間コードを有する。In the present embodiment, the light receiving element 31 is provided with 256 pixels in the horizontal scanning line direction, and 243 such horizontal scanning lines, and a total of 256 × 243 pixels are regularly arranged. I have. The output of the luminance signal from each pixel is performed for each horizontal scanning line in the arrangement order in the horizontal scanning line direction. At this time, a period during which the luminance signal of one horizontal scanning line is output is called an output period, and a period between an output period during which no output is performed and an output period is called a blanking period. Further, each pixel on one horizontal scanning line outputs in the arrangement order during the output period. Then, outputs from all the pixels are sent to the space code processing means 4 as video signals. As described above, in this embodiment, the camera 3 has the same space code as the number of pixels in the horizontal scanning line direction.
【0067】また、カメラ3は、スリット光Rの一回の
走査を走査線上の画素数(256)で分割して撮像を行
う。このため、ガルバノスキャナ24の走査範囲角度を
256分割し、各角度ごとに撮像を行うべく、後述する
空間コード処理手段4の同期回路43から出力される水
平,垂直同期信号により同期が図られる。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 a horizontal and vertical synchronization signal output from a synchronization circuit 43 of the space code processing unit 4 described later in order to perform imaging at each angle.
【0068】空間コード処理手段4のブロック図を図1
1に示す。この空間コード処理手段4は、受光素子31
の各走査線ごとに各画素から出力される輝度の最大値を
検出し特定するピーク検出部5と、このピーク検出部5
の検出に対応して,最大輝度を出力する画素について走
査線上の位置を検出し特定する画素位置検出部8と、受
光素子31の各画素に個別に対応する輝度の記録領域を
有する輝度メモリ41と、ピーク検出部5に検出された
輝度と画素位置検出部8に検出された画素の位置に基づ
いて,輝度メモリ41の対応する画素の記録領域に記録
された記録輝度との大小を比較する比較部としての第二
の比較回路6と、検出輝度が記録輝度よりも大きい場合
に輝度メモリ41の記録輝度を検出輝度の値に更新する
第一の更新部としての第三の選択回路7と、各画素に個
別に対応する投光角度の記録領域を有する角度コード化
メモリ42を備えている。FIG. 1 is a block diagram of the spatial code processing means 4.
It is shown in FIG. The space code processing means 4 includes a light receiving element 31
A peak detector 5 for detecting and specifying the maximum value of the luminance output from each pixel for each scanning line,
In response to the detection, the pixel position detector 8 detects and specifies the position on the scanning line for the pixel that outputs the maximum luminance, and the luminance memory 41 having a recording area of the luminance individually corresponding to each pixel of the light receiving element 31. Based on the luminance detected by the peak detection unit 5 and the position of the pixel detected by the pixel position detection unit 8, the magnitude of the recording luminance recorded in the recording area of the corresponding pixel in the luminance memory 41 is compared. A second comparing circuit 6 as a comparing section, and a third selecting circuit 7 as a first updating section for updating the recording luminance of the luminance memory 41 to the value of the detected luminance when the detected luminance is larger than the recording luminance. And an angle coding memory 42 having a recording area of a projection angle individually corresponding to each pixel.
【0069】さらに、空間コード処理手段4は、カメラ
3の水平,垂直同期を図る同期回路43と、上記カメラ
3からの映像信号の輝度信号を量子化するA/D変換回
路44と、輝度メモリ41及び角度コード化メモリ42
のアドレスを作成するメモリアドレス作成回路46を備
えている。Further, the spatial code processing means 4 comprises a synchronizing circuit 43 for synchronizing the camera 3 in the horizontal and vertical directions, an A / D conversion circuit 44 for quantizing the luminance signal of the video signal from the camera 3, and a luminance memory. 41 and angle coded memory 42
And a memory address creation circuit 46 for creating an address.
【0070】このメモリアドレス作成回路46は、同期
回路43からの水平同期信号をカウントすることによ
り、受光素子31の現在出力中の画素が位置する水平走
査線番号(端から何番目の水平走査線上で出力を行って
いるか、を示す。以下、垂直アドレスyとする)を出力
する。The memory address generating circuit 46 counts the horizontal synchronizing signal from the synchronizing circuit 43 to determine the horizontal scanning line number (the number of the horizontal scanning line from the end) at which the currently output pixel of the light receiving element 31 is located. Indicates that the output is being performed. Hereinafter, this is referred to as a vertical address y).
【0071】さらに、メモリアドレス作成回路46は、
水平駆動周波数(走査線中画素数768、14.318
MHz)を三分周(走査線中画素数を256とするた
め)したものをカウントし、受光素子31の現在出力中
の画素の水平走査線上の位置(水平走査線上で端から何
番目の画素が出力を行っているか、を示す。以下、水平
アドレスxとする)を出力する。Further, the memory address creation circuit 46
Horizontal drive frequency (number of pixels in a scanning line 768, 14.318)
MHz) is divided by 3 (to make the number of pixels in the scanning line 256), and the position of the pixel currently being output from the light receiving element 31 on the horizontal scanning line (the number of pixels from the end on the horizontal scanning line) Indicates whether the horizontal address x is output.
【0072】また、同期回路43からの垂直同期信号を
カウントし、投光角度信号を作成する共に照射手段2に
出力する。さらに、このメモリアドレス作成回路46で
は、水平同期信号により、後述するピーク検出部5の一
時輝度メモリ51及び画素位置検出部8の一時位置メモ
リ81のクリア信号を一水平走査線の出力ごとに作成し
出力する。The vertical synchronizing signal from the synchronizing circuit 43 is counted, and a projection angle signal is generated and output to the irradiation means 2. Further, in the memory address creation circuit 46, a clear signal of a temporary brightness memory 51 of the peak detection unit 5 and a temporary location memory 81 of the pixel position detection unit 8, which will be described later, is created for each output of one horizontal scanning line by a horizontal synchronization signal. And output.
【0073】ところで、A/D変換回路44により量子
化された輝度信号は、ピーク検出部5に出力される。こ
のピーク検出部5は、一つの走査線上で最大レベルとな
る輝度のみを記録する一時輝度メモリ51と、A/D交
換回路44にて量子化された輝度信号の信号レベル(以
下、単に「輝度」とする)と走査線中最大輝度メモリ5
1に記録された輝度とを比較し、いずれの輝度が高いか
を出力する第一の比較回路53と、この第一の比較回路
53の出力に基づいていずれか高い方の輝度を選択し、
一時輝度メモリ51中の記録輝度を更新する第一の選択
回路54とを備えている。The luminance signal quantized by the A / D conversion circuit 44 is output to the peak detector 5. The peak detection unit 5 includes a temporary luminance memory 51 for recording only the luminance at the maximum level on one scanning line, and a signal level of a luminance signal quantized by the A / D exchange circuit 44 (hereinafter simply referred to as “luminance”). ") And the maximum luminance memory 5 in the scanning line.
A first comparison circuit 53 that compares the luminance recorded with the first and outputs which luminance is higher, and selects the higher luminance based on the output of the first comparison circuit 53;
And a first selection circuit 54 for updating the recording luminance in the temporary luminance memory 51.
【0074】なお、上述の一時輝度メモリ51は、一画
素分の輝度信号を記録できれば足りるので、その記憶容
量は、輝度分解能×1(8bit)である。また、一時
輝度メモリ51の内容は、各水平帰線期間中(一水平走
査線ごと)に0にクリアされる。The temporary luminance memory 51 only needs to record a luminance signal for one pixel, and its storage capacity is luminance resolution × 1 (8 bits). The contents of the temporary luminance memory 51 are cleared to 0 during each horizontal blanking period (for each horizontal scanning line).
【0075】上記の構成からピーク検出部5では、各走
査線ごとの輝度信号の最大レベルが検出され記録され
る。With the above configuration, the peak detector 5 detects and records the maximum level of the luminance signal for each scanning line.
【0076】また、このピーク検出部5による一走査線
上の最大輝度が検出される際に、同時に画素位置検出部
8では、上記最大輝度を出力する画素の水平アドレスx
が検出される。この画素位置検出部8は、一つの走査線
上で最大輝度を出力する画素の水平アドレスxのみを記
録する一時位置メモリ81と、メモリアドレス作成回路
46から順次出力される各画素に対応する水平アドレス
xの内、前述したピーク検出部5の第一の比較回路53
の出力により選択された最大輝度を出力する画素の水平
アドレスxを一時位置メモリ81に上書きする第二の選
択回路82とを備えている。When the maximum luminance on one scanning line is detected by the peak detecting section 5, the pixel position detecting section 8 simultaneously outputs the horizontal address x of the pixel outputting the maximum luminance.
Is detected. The pixel position detection unit 8 includes a temporary position memory 81 that records only the horizontal address x of the pixel that outputs the maximum luminance on one scanning line, and a horizontal address corresponding to each pixel sequentially output from the memory address generation circuit 46. x, the first comparison circuit 53 of the peak detection unit 5 described above.
And 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.
【0077】なお、上述の一時位置メモリ81は、25
6ある内のいずれかの画素であるかを記録できれば足り
るので、その記憶容量は、256×1(8bit)であ
る。また、一時位置メモリ81の内容は、各水平帰線期
間中(一水平走査線ごと)に0にクリアされる。The above-mentioned temporary position memory 81 stores 25
It is enough to be able to record which of the six pixels it is, so 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】上記の構成から画素位置検出部8では、各
走査線ごとの最大輝度を出力する画素の水平アドレスx
が検出され記録される。With the above configuration, the pixel position detector 8 outputs the horizontal address x of the pixel that outputs the maximum luminance for each scanning line.
Are detected and recorded.
【0079】上記各一時輝度メモリ51は、ゲート91
を介して前述の第二の比較回路6及び第三の選択回路7
に接続されており、ゲート91が閉じた場合に一時輝度
メモリ51中の記録輝度がこれらに出力される。一方、
一時位置メモリ81は、ゲート92を介して輝度メモリ
42及び角度コード化メモリ42に接続されており、ゲ
ート92が閉じた場合に一時位置メモリ81中の水平ア
ドレスxがこれらに出力される。Each temporary luminance memory 51 has a gate 91
Via the second comparison circuit 6 and the third selection circuit 7
The recording luminance in the temporary luminance memory 51 is output to these when the gate 91 is closed. on the other hand,
The temporary position memory 81 is connected to the luminance memory 42 and the angle coding memory 42 via a gate 92, and when the gate 92 is closed, the horizontal address x in the temporary position memory 81 is output to them.
【0080】これらのゲート91,92は、いずれもメ
モリアドレス作成回路46に接続されており、受光素子
31の水平同期信号の出力を受けている。そして、これ
らのゲート91,92は、通常は開かれており、水平同
期信号から受光素子31が帰線期間中であることが入力
されると閉じられる。Each of these gates 91 and 92 is connected to the memory address generating circuit 46 and receives the output of the horizontal synchronizing signal of the light receiving element 31. These gates 91 and 92 are normally open, and are closed when it is input from the horizontal synchronization signal that the light receiving element 31 is in the flyback period.
【0081】これら各ゲート91,92は、受光素子3
1が帰線期間中のときに同時に一時輝度メモリ51及び
一時位置メモリ81の記録内容を出力させる出力同期部
9を構成している。The gates 91 and 92 are connected to the light receiving element 3
1 constitutes an output synchronizing unit 9 for simultaneously outputting the recorded contents of the temporary luminance memory 51 and the temporary position memory 81 during the flyback period.
【0082】次に、輝度メモリ41について説明する。
この輝度メモリ41は、受光素子31の各画素に個別に
対応する輝度の記録領域が形成されている(図13参
照)。そして、この輝度メモリ41の各記録領域中に
は,それぞれ予め0乃至通常のスリット光の輝度よりも
小さい値に設定された輝度が記録されている。Next, the luminance memory 41 will be described.
In the luminance memory 41, a recording area of luminance 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 a value smaller than the luminance of the normal slit light is recorded.
【0083】前述の如く、各ゲート91,92が閉じら
れると、一時輝度メモリ51から第二の比較回路6に最
大輝度が出力され、一時位置メモリ81からその水平ア
ドレスxが輝度メモリ41に出力される。また、メモリ
アドレス作成回路46からは、輝度メモリ41に常時現
在の垂直アドレスyが出力される。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. Is done. The current vertical address y is always output from the memory address creation circuit 46 to the luminance memory 41.
【0084】これにより、輝度メモリ41に対して、水
平アドレスxと垂直アドレスyから最大輝度を出力した
画素が、受光素子31の画素の内のいずれのものである
かが特定され、これに対応する記録領域から記録輝度が
第二の比較回路6に出力される。As a result, the pixel outputting the maximum luminance from the horizontal address x and the vertical address y to the luminance memory 41 is identified as one of the pixels of the light receiving element 31. The recording luminance is output to the second comparison circuit 6 from the recording area to be recorded.
【0085】第二の比較回路6では、一時輝度メモリ5
1からの輝度と輝度メモリ41に既に記録された輝度と
の比較を行い、いずれが高いかを出力する。第三の選択
回路7では、第二の比較回路6の出力を受けて、一時輝
度メモリ51からの輝度が高い場合には輝度メモリ41
の記録輝度を一時輝度メモリ51の輝度に更新し、そう
でない場合には、輝度メモリ41の記録輝度をそのまま
維持する。In the second comparison circuit 6, the temporary luminance memory 5
The luminance from 1 is compared with the luminance already recorded in the luminance memory 41, and which is higher is output. The third selection circuit 7 receives the output of the second comparison circuit 6 and, when the luminance from the temporary luminance memory 51 is high, the luminance memory 41
Is updated to the luminance of the temporary luminance memory 51; otherwise, the recording luminance of the luminance memory 41 is maintained as it is.
【0086】次に、角度コード化メモリ42について説
明する。この角度コード化メモリ42は、受光素子31
の各画素に個別に対応するスリット光Rの投光角度(こ
こでは、ガルバノミラー23の回転角度と同義)θの記
録領域を備えている。Next, the angle encoding memory 42 will be described. The angle coded memory 42 stores the light receiving element 31
The recording area of the projection angle θ of the slit light R (which is synonymous with the rotation angle of the galvanomirror 23 in this case) θ corresponding to each pixel is provided.
【0087】また、この角度コード化メモリ42には、
各記録領域の投光角度θの更新を行う第二の更新部とし
ての第四の選択回路45が併設されている。かかる第四
の選択回路45は、ゲート91が閉じられることにより
作動する第二の比較回路6と接続されており、また同時
にメモリアドレス作成回路46から現在の投光角度θを
示す投光角度信号が入力されている。The angle encoding memory 42 has
A fourth selection circuit 45 as a second updating unit for updating the projection angle θ of each recording area is also provided. 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, emits a light emission angle signal indicating the current light emission angle θ from the memory address creation circuit 46. Is entered.
【0088】一方、角度コード化メモリ42には、常
時、メモリアドレス作成回路46から現在の垂直アドレ
スyが入力され、また、ゲート92が閉じられることに
より、一時位置メモリ81から最大輝度を出力した画素
の水平アドレスxが入力される。これにより、角度コー
ド化メモリ42に対して、水平アドレスxと垂直アドレ
スyから最大輝度を出力した画素が、受光素子31の画
素の内のいずれのものであるかが特定され、第四の選択
回路45による入力待ち状態となる。On the other hand, the current vertical address y is always input from the memory address creation circuit 46 to the angle encoding memory 42, and the maximum luminance is output from the temporary position memory 81 by closing the gate 92. The horizontal address x of the pixel is input. As a result, the pixel which has output the maximum luminance from the horizontal address x and the vertical address y to the angle coding memory 42 is identified as one of the pixels of the light receiving element 31, and the fourth selection is performed. The input state by the circuit 45 is awaited.
【0089】第四の選択回路45は、第二の比較回路6
により、一時輝度メモリ51の輝度と輝度メモリ41の
輝度の内,一時輝度メモリ51の輝度が高いと出力され
た場合に、メモリアドレス作成回路46からの投光角度
θを対応する記録領域に記録し、輝度メモリ41の輝度
が高いと出力された場合には更新を行わない。このよう
に、第三及び第四の選択回路7,45は、いずれも第二
の比較回路6の出力により更新を行うため、輝度メモリ
41に対して一時輝度メモリ51の輝度が更新されたと
きにのみ、角度コード化メモリ42に対する投光角度θ
の記録(既に記録されている場合には更新)が行われ
る。The fourth selection circuit 45 includes a second comparison circuit 6
When the luminance of the temporary luminance memory 51 is higher than the luminance of the temporary luminance memory 51 and the luminance of the luminance memory 41, the light projection angle θ from the memory address creation circuit 46 is recorded in the corresponding recording area. However, if the luminance memory 41 outputs that the luminance is high, the update is not performed. As described above, 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 θ to the angle coding memory 42
(Update if already recorded) is performed.
【0090】ここで、上述した輝度メモリ41及び角度
コード化メモリ42は、いずれも、測定開始時におい
て、その記録が0にクリアされる。Here, the recording of the luminance memory 41 and the angle coding memory 42 are cleared to 0 at the start of measurement.
【0091】図12(A)は、この受光素子31上に撮
像されたスリット光Rを示している。このとき、照射機
構による走査範囲を256分割し、各分割された範囲ご
とに撮像が行われるため、投光角度を撮像順に1から2
56の番号で表すこととする。図12(B)は、走査線
番号1の水平走査線に沿った各画素から検出された輝度
レベルを示している。この図によれば、水平走査線方向
の位置x0で最大輝度レベルが観測され、これをスリッ
ト光と見なすことができる。FIG. 12A shows the slit light R imaged on the light receiving element 31. At this time, the scanning range by the irradiation mechanism is divided into 256, and imaging is performed for each of the divided ranges.
It will be represented by the number 56. FIG. 12B shows the luminance level detected from each pixel along the horizontal scanning line of scanning line number 1. According to this figure, a maximum luminance level is observed at a position x0 in the horizontal scanning line direction, and this can be regarded as slit light.
【0092】上記各部の機能を総合すると、三次元形状
の計測装置10では、出力期間中の水平走査線上におい
て最大輝度を検出した画素をスリット光の照射位置とみ
なし、各走査線ごとに最大輝度を検出した画素の水平ア
ドレスxを求め、且つ照射したスリット光の投光角度を
求め、角度コード化メモリ42を完成させる。これによ
り、各画素のアドレスについて投光角度が求められる
と、各アドレスに撮像された測定対象物Sからカメラ3
までの距離を算出することが可能となり、コンピュータ
100により三次元形状の計測が行われる。When the functions of the above components are combined, the three-dimensional shape measuring apparatus 10 regards the pixel which has detected the maximum luminance on the horizontal scanning line during the output period as the irradiation position of the slit light, and sets the maximum luminance for each scanning line. Then, the horizontal address x of the pixel in which is detected is obtained, and the projection angle of the irradiated slit light is obtained, thereby completing the angle encoding memory 42. With this, when the projection angle is obtained for each pixel address, the camera 3 can determine the projection angle from the measurement target S imaged at each address.
, And the computer 100 measures the three-dimensional shape.
【0093】このため、まず、ピーク検出部5によって
現在出力期間中である水平走査線について、その水平走
査線上の画素から出力される輝度の内、最大となる輝度
が特定され一時輝度メモリ51に記録される。また、同
出力期間中に、画素位置検出部8により、最大輝度を出
力する画素の水平アドレスxが特定され、これが一時位
置メモリ81に記録される。For this reason, first, for the horizontal scanning line currently in the output period by the peak detecting section 5, the maximum luminance out of the luminances output from the pixels on the horizontal scanning line is specified, and is stored in the temporary luminance memory 51. Be recorded. In addition, during the output period, the horizontal address x of the pixel that outputs the maximum luminance is specified by the pixel position detection unit 8 and is recorded in the temporary position memory 81.
【0094】各メモリ51,81に記録された最大輝度
及び水平アドレスxは、その出力期間が終わり帰線期間
となるまで保留され、出力同期部9により、帰線期間に
移行した時点で輝度メモリ41又は角度コード化メモリ
42側に出力される。このように、輝度及び水平アドレ
スxは、出力期間の間,保留されるため、途中経過で最
大と判断された輝度については、その下流側での処理
(輝度メモリ41,角度コード化メモリ42への記録)
が行われない。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 a blanking period is reached. It is output to 41 or the angle coding memory 42 side. As described above, since the luminance and the horizontal address x are suspended during the output period, the luminance determined to be the maximum in the course of the processing is processed on the downstream side (to the luminance memory 41 and the angle encoding memory 42). Record)
Is not done.
【0095】そして、これらの出力及びメモリアドレス
作成回路46による垂直アドレスy及び投光角度信号の
出力により、第二の比較回路6及び第三の選択回路7に
よって特定されたアドレスの輝度について、輝度メモリ
41が比較更新される。即ち、全ての投光角度による撮
像画像に対して全ての水平走査線について上述の比較又
は更新が行われることにより、全ての画素について、各
投光角度によって撮像された全ての撮像画像を通じて最
高となった輝度のみが輝度メモリ41中に保管される。Then, based on these outputs and the output of the vertical address y and the light projection angle signal by the memory address creation circuit 46, the brightness of the address specified by the second comparison circuit 6 and the third selection circuit 7 is reduced. The memory 41 is compared and updated. That is, by performing the above-described comparison or update on all the horizontal scanning lines with respect to the captured images at all the projection angles, the highest is achieved through all the captured images captured at the respective projection angles for all the pixels. Only the changed luminance is stored in the luminance memory 41.
【0096】また、角度コード化メモリ42には、第二
の比較回路6と接続された第四の選択回路45が併設さ
れているため、同様にして、全ての画素について、各投
光角度によって撮像された全ての撮像画像を通じて最高
となった輝度が検出されたときの当該投光角度のみが角
度コード化メモリ42中に保管される。Further, since the angle coding memory 42 is provided with the fourth selection circuit 45 connected to the second comparison circuit 6, the same applies to all pixels for each light emission angle. Only the light projection angle when the highest luminance is detected through all the captured images is stored in the angle coding memory 42.
【0097】そして、完成した角度コード化メモリ42
の情報を出力し、コンピュータ100により三次元形状
の計測が行われる。Then, the completed angle encoding memory 42
And the computer 100 measures the three-dimensional shape.
【0098】ここで、空間コード処理手段4の演算処理
方法を図13乃至図15に示す簡単な例を用いて説明す
る。ここでは、カメラ3の受光素子31の画素数を3×
3(水平方向×垂直方向)と仮定して説明する。また、
輝度メモリ41及び角度コード化メモリ42の各記録領
域は、測定開始前には全て0にリセットされているもの
とする。Here, the arithmetic processing method of the spatial code processing means 4 will be described with reference to simple examples shown in FIGS. Here, the number of pixels of the light receiving element 31 of the camera 3 is 3 ×
3 (horizontal direction × vertical direction). Also,
It is assumed that all recording areas of the luminance memory 41 and the angle coding memory 42 have been reset to 0 before the start of measurement.
【0099】水平方向の画素数が三つであるため、これ
に対応してスリット光Rが各画素単位で撮像されるガル
バノミラー23の回転角度θ0,θ1,θ2で撮像が行わ
れるものとする。Since the number of pixels in the horizontal direction is three, the image is taken at the rotation angles θ 0, θ 1, θ 2 of the galvanomirror 23 corresponding to which the slit light R is imaged for each pixel. .
【0100】まず、投光角度θ=θ0のときの処理を図
13に基づいて説明する。まず、投光角度θ=θ0のと
きのスリット光Rの受光素子31の撮像画像を図13
(A)に示す。受光素子31において、横方向は水平ア
ドレスx(図における左から順番に画素に付した番
号),縦方向は垂直アドレスy(図における上から順番
に水平走査線に付した番号)を示すものとする。また、
図13(B)に更新記録前の輝度メモリ41を示す。First, the processing when the light projection angle θ = θ0 will be described with reference to FIG. First, an image captured by the light receiving element 31 of the slit light R when the projection angle θ = θ0 is shown in FIG.
It is shown in (A). In the light receiving element 31, the horizontal direction indicates a horizontal address x (numbers assigned to pixels in order from the left in the figure), and the vertical direction indicates a vertical address y (numbers assigned to horizontal scanning lines in order from the top in the figure). I do. Also,
FIG. 13B shows the luminance memory 41 before update recording.
【0101】受光素子31の垂直アドレスy=1の水平
走査線の出力期間において、各画素の検出輝度が順番に
出力され、ピーク検出部5により出力期間の終わりまで
に最大輝度が200と特定され、同時にその水平アドレ
スxがx=1と特定される。そして、帰線期間に移行す
ると、特定された最大輝度が輝度メモリ41の記録輝度
と比較され、その後、当該最大輝度が記録輝度として更
新される(図13(C))。また、輝度メモリ41の更
新と同時に、角度コード化メモリ42における水平アド
レスx=1,垂直アドレスy=1の記録領域の内容が、
そのときの投光角度θ0に更新される(図13
(D))。In the output period of the horizontal scanning line of the vertical address y = 1 of the light receiving element 31, the detected luminance of each pixel is sequentially output, and the peak luminance is specified by the peak detecting section 5 as 200 by the end of the output period. At the same time, the horizontal address x is specified as x = 1. Then, when shifting to the flyback period, the specified maximum luminance is compared with the recording luminance of the luminance memory 41, and thereafter, the maximum luminance is updated as the recording luminance (FIG. 13C). Simultaneously with the updating 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 encoding memory 42 are
The projection angle θ0 at that time is updated (FIG. 13
(D)).
【0102】同様の処理が、垂直アドレスy=2,y=
3についても行われる(同図(E),(F)はy=2の
ときの輝度メモリ41,角度コード化メモリ42の更新
を示し、同図(G),(H)はy=3のときの輝度メモ
リ41,角度コード化メモリ42の更新を示す)。The same processing is performed with the vertical addresses y = 2, y =
3 (E) and (F) show the updating of the luminance memory 41 and the angle coding memory 42 when y = 2, and FIGS. 3 (G) and 3 (H) show the case where y = 3. The update of the luminance memory 41 and the angle encoding memory 42 at the time is shown.)
【0103】投光角度θ=θ1、投光角度θ=θ2と処理
される。さらに、コンピュータ(演算装置)100で
は、角度コード化メモリに格納された角度コードデータ
(空間コード化画像)のうち、測定不能点を抽出し、さ
らに補完値を算出する。その後、補完後の角度コード
(空間コード)とその角度コード化メモリ42に格納さ
れた画素位置とから物体座標系での距離を算出する。Processing is performed such that the light projection angle θ = θ1 and the light projection angle θ = θ2. Further, the computer (arithmetic unit) 100 extracts an unmeasurable point from the angle code data (spatial coded image) stored in the angle coded memory and further calculates a complement value. After that, the distance in the object coordinate system is calculated from the complemented angle code (space code) and the pixel position stored in the angle coding memory 42.
【0104】図14および図15は角度コードを算出す
るまでの処理例を示すフローチャートである。FIGS. 14 and 15 are flowcharts showing an example of processing up to calculation of an angle code.
【0105】まず、同期回路43及びメモリアドレス作
成回路46によりカメラ3と照射手段2の同期が図ら
れ、測定対象物Sに対するスリット光Rの照射と撮像が
行われる(ステップS1)。かかる同期によりスリット
光は、受光素子31上を水平走査線方向に一画素ごとに
位置を変えて撮像される。First, the camera 3 and the irradiating means 2 are synchronized by the synchronization circuit 43 and the memory address creation circuit 46, and the 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 its position for each pixel in the horizontal scanning line direction.
【0106】まず、投光角度1の撮像画像に応じて、走
査線番号1の水平走査線から当該走査線上の各画素の並
び順に輝度の出力が行われる。このときの一つの水平走
査線上の全ての画素から出力が終了するまでが当該水平
走査線における出力期間である(ステップS2)。First, according to the captured image at the light projection angle 1, the luminance is output from the horizontal scanning line of the scanning line number 1 in the arrangement order of the pixels on the scanning line. The output period for all the pixels on one horizontal scanning line at this time is the output period for the horizontal scanning line (step S2).
【0107】かかる撮像画像に基づいてピーク検出部5
により各水平走査線ごとに最大輝度の検出が行われ、同
時に、かかる検出に基づいて最大輝度を出力する画素の
水平アドレスの検出が行われる(ステップS3)。この
とき検出された最大輝度は一時輝度メモリ51に保管さ
れ、水平アドレスxは一時位置メモリ81に保管され
る。The peak detector 5 based on the captured image
, The maximum luminance is detected for each horizontal scanning line, and at the same time, the horizontal address of the pixel outputting the maximum luminance is detected based on the detection (step S3). The maximum luminance detected at this time is stored in the temporary luminance memory 51, and the horizontal address x is stored in the temporary position memory 81.
【0108】上記各検出は、一つの水平走査線の出力期
間が終了するまで継続して行われ、最終的に、当該水平
走査線について全ての画素の出力に基づいて最大輝度及
び水平アドレスが求められ、記録される(ステップS
4)。The above detections are 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 outputs of all the pixels for the horizontal scanning line. And recorded (step S
4).
【0109】そして、出力期間から帰線期間に移行する
と、一時輝度メモリ51及び一時位置メモリ81の各ゲ
ート91,92が閉路する(ステップS5)。When the transition from the output period to the flyback period is completed, the gates 91 and 92 of the temporary luminance memory 51 and the temporary position memory 81 are closed (step S5).
【0110】ゲート91の閉路により、走査線番号1の
水平走査線中の最大輝度が一時輝度メモリ51から第二
の比較回路6に出力される。この第二の比較回路6で
は、検出された最大輝度と輝度メモリ41のアドレス
(x,y)=(x0,1)に記録された輝度とを比較す
る(ステップS6,S7)。そして、検出された最大輝
度の方が高い場合に、第三の選択回路7により輝度メモ
リ41のアドレス(x0,1)の記録輝度が検出された
最大輝度の数値に更新される(ステップS8)。When the gate 91 is closed, the maximum luminance in the horizontal scanning line of the 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) in the luminance memory 41 (steps S6 and S7). If the detected maximum luminance is higher, the recording luminance of the address (x0, 1) of the luminance memory 41 is updated by the third selection circuit 7 to the detected maximum luminance value (step S8). .
【0111】なお、このときの輝度メモリ41は、測定
開始前に予め初期化されて記録輝度が0の状態であるた
め、スリット光Rの輝度レベルであれば、通常更新が行
われる。また、投光角度が2以降に進行している場合に
は、それまでの撮像画像による検出によって、既に同じ
アドレスについて最大輝度が更新されていることもあり
得るが、かかる場合も同様にして検出輝度が高い場合に
は更新される。Note that the luminance memory 41 at this time is initialized in advance before the start of measurement and has a recording luminance of 0. Therefore, if the luminance level of the slit light R is attained, normal updating is performed. Further, when the light projection angle has advanced to 2 or later, the maximum luminance may have already been updated for the same address by the detection based on the captured image up to that point. If the luminance is high, it is updated.
【0112】輝度メモリ41の更新が行われると、角度
コード化メモリ42のアドレス(x,y)=(x0,
1)にも、そのときの投光角度1が記録される(ステッ
プS9)。When the brightness memory 41 is updated, the address (x, y) = (x0,
Also in 1), the projection angle 1 at that time is recorded (step S9).
【0113】一方、検出された最大輝度レベルの方が低
い場合には、輝度メモリ41の更新は行われず、同時
に、角度コード化メモリ42の記録も行われない(ステ
ップS10)。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 coded memory 42 is not recorded (step S10).
【0114】そして、一つのスリット光Rに対して、全
ての水平走査線について上記の工程が繰り返し行われる
(ステップS11)。これにより、投光角度1における
スリット光について各水平走査線方向の位置(水平アド
レスx)が角度コード化メモリ42上に記録される。Then, for one slit light R, the above steps are repeatedly performed for all the horizontal scanning lines (step S11). Thereby, the position (horizontal address x) of each slit light at the light projection angle 1 in the horizontal scanning line direction is recorded on the angle encoding memory 42.
【0115】一つのスリット光について処理が終わる
と、次の投光角度のスリット光の撮像が行われ、上記の
工程が繰り返される(ステップS12)。そして、全て
の投光角度におけるスリット光の処理が終わると、角度
コード化メモリ42の記録情報が測定データとしてコン
ピュータ100に出力される(ステップS13)。コン
ピュータ100は、角度コード化メモリ42からの出力
により、補完処理および三次元形状演算を行い表示する
(ステップS14)。When the processing is completed for one slit light, an image of the slit light at the next light projection angle is taken, and the above steps are repeated (step S12). Then, when the processing of the slit light at all the projection angles is completed, the information recorded in the angle encoding memory 42 is output to the computer 100 as the measurement data (step S13). The computer 100 performs the complementing process and the three-dimensional shape calculation based on the output from the angle coding memory 42 and displays the result (step S14).
【0116】本実施例では、記録輝度の設定輝度レベル
が、スリット光の検出輝度の記録を妨げるほどに高くな
い場合には、仮に、スリット光が照射されない部分が生
じた場合,或いはスリット光が暗くしか照射されなかっ
た場合に、ノイズを選択して取り込むことを防止するこ
とが可能である。これは、ノイズはスリット光の輝度よ
りもかなり低い輝度であり、上述の例にように予めスリ
ット光の半分程度の輝度が輝度メモリ41に入力されて
いれば、これに満たないノイズの輝度が更新記録するこ
とはないからである。In this embodiment, if the set luminance level of the recording luminance is not high enough to prevent the recording of the detected luminance of the slit light, if there is a portion where the slit light is not irradiated, or if the slit light is generated. It is possible to prevent noise from being selected and taken in when only dark illumination is performed. This is because the noise is considerably lower than the luminance of the slit light, and if the luminance of about half of the slit light is input to the luminance memory 41 in advance as in the above example, the luminance of the noise less than this is lower than the luminance of the slit light. This is because there is no update record.
【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近傍でもよい。また
中央値でなく測定不能点を除く近傍のコードの平均値を
用いても良い。FIG. 16 shows the spatial code values of a part (6 × 6 area) of the measured spatially coded image. In this example, an unmeasurable point is detected with a code value of 0. In FIG.
Unmeasurable points are indicated by reference numerals 42d and 42e. From the neighboring codes, the pixel denoted by reference numeral 42f is 123, and the reference numeral 42g
The pixel indicated by is estimated to be 122. When this pixel is subjected to a smoothing process using a median value other than 0 of the data in the vicinity of the four surroundings, the result of FIG. 23 is obtained. When comparing FIG. 16 with FIG. 17, the correct measurement data is shown as 42f without being affected.
The pixel indicated by is 123, and the pixel indicated by reference numeral 42g is 122, and smoothing was performed as expected. In this example, A,
The data at point B was complemented using the median value of the code near the four points near the unmeasurable point, but may be eight points instead of four points. Instead of the median value, the average value of the neighboring codes excluding the unmeasurable point may be used.
【0118】<多重反射ノイズ除去>図18に多重反射
が生じた一例を示す。図18に示す例では、歯車Sの平
面を上方から撮像している。計測光は、図中左上方から
照射した。符号Raで示す所定の角度コードを有するス
リット光は、通常の照射Raと、多重反射による照射R
bとを生じさせた。この状態を図10及び図11に示す
装置で計測すると、図19に示す距離画像が得られる。
符号S1で示す距離画像中、符号S2で示す死角が生じ
ている。そして、正面図では、符号S3で示す多重反射
Rbによるノイズが生じている。このように、正常な形
状の近傍にノイズによる形状が重なると、自動的な除去
はもとより、手動による除去も難しい。<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. The measurement light was emitted from the upper left in the figure. The slit light having a predetermined angle code indicated by the symbol Ra is divided into a normal irradiation Ra and an irradiation R by multiple reflection.
b. When this state is measured by the apparatus shown in FIGS. 10 and 11, a distance image shown in FIG. 19 is obtained.
A blind spot indicated by reference sign S2 occurs in the distance image indicated by reference sign S1. Then, in the front view, noise occurs due to the multiple reflection Rb indicated by the reference numeral S3. As described above, when the shape due to noise overlaps the vicinity of the normal shape, it is difficult to remove not only automatically but also manually.
【0119】図20にこのような多重反射時の空間コー
ドの一例を示す。空間コードが0になっている画素は死
角であるため、ここでは無視すると、全体的に単調増加
傾向を示している。しかし、水平画素座標160および
205近辺で一時的に減少傾向となっている。この部分
が多重反射によるコードの変化の起った箇所である。FIG. 20 shows an example of such a space code at the time of multiple reflection. Pixels for which the space code is 0 are blind spots and, if ignored here, show a monotonically increasing tendency as a whole. However, it is temporarily decreasing around the horizontal pixel coordinates 160 and 205. This part is where the code change due to multiple reflection occurs.
【0120】図20に示す例では、空間コード0の画素
を除いたすべての画素について、その増加傾向を調べる
ことで多重反射発生箇所の特定が可能となる。まず、水
平画素座標0から255に向けて、増加傾向を調べコー
ドが減少に転じた画素(点A)とそれまでの最大コード
を記録する。次にその時点での最大コード異常のコード
が記録されている画素位置(点B)を求める。このA―
B間のコードがノイズの候補となり、ここでは増加コー
ド・ジャンプ区間と呼ぶ。In the example shown in FIG. 20, it is possible to specify a multiple reflection occurrence position by checking the increasing tendency of all the pixels except the pixel of the space code 0. First, from the horizontal pixel coordinates 0 to 255, the increasing tendency is checked, and the pixel (point A) at which the code has started to decrease and the maximum code up to that point are recorded. Next, the pixel position (point B) where the code of the maximum code abnormality at that time is recorded is obtained. This A-
The code between B is a candidate for noise and is referred to herein as an increased code jump section.
【0121】ここで、対象物の形状により、多重反射時
の空間コードが一時的に減少する部分がある(図20中
の131近辺)。このとき、一方向の探索により多重反
射の除去を行うと、図20中のA―B間全てが多重反射
によるノイズという誤った結果となってしまう。そこ
で、反対方向より同様にして減少傾向を調べ、減少傾向
から増加に転じた画素(点C)、再び減少に戻った画素
(点D)を求める。このC―D間をここでは減少コード
・ジャンプ区間という。Here, there is a portion where the space code at the time of multiple reflection temporarily decreases depending on the shape of the object (around 131 in FIG. 20). At this time, if multiple reflections are removed by searching in one direction, an erroneous result of noise due to multiple reflections occurs between A and B in FIG. Therefore, the decrease tendency is similarly examined from the opposite direction, and the pixel that has turned from the decrease tendency to increase (point C) and the pixel that has returned to decrease again (point D) are determined. Here, the section between CD and D is referred to as a reduced code jump section.
【0122】上記処理を繰返し行うことで、増加傾向の
調査によるノイズ候補と減少傾向の調査によるノイズの
候補とが求まる。このノイズ候補となった画素のうち、
両方で候補とされた画素(A―C間)が多重反射による
ノイズの可能性が最も高い画素となる。By repeating the above processing, a noise candidate by investigating the increasing tendency and a noise candidate by investigating the decreasing tendency are obtained. Of the noise candidate pixels,
Pixels (between A and C) that are both candidates are pixels having the highest possibility of noise due to multiple reflection.
【0123】図1との対応では、本実施例では、照射工
程E1が、計測光の走査方向に対して空間コードを増加
させて照射する増加空間コード照射工程を備える。そし
て、多重反射判定工程E5が、空間コードの連続する画
素間での増減を走査方向に比較すると共に増加傾向が逆
転して減少に転じた開始画素から当該転じた時までの空
間コードの最高値を越えた終了画素までの増加コード・
ジャンプ区間を定義する増加コード・ジャンプ区間定義
工程と、空間コードの連続する画素間での増減を走査方
向とは逆向きに比較すると共に減少傾向が逆転して増加
に転じた開始画素から当該転じた時までの空間コードの
最低値を下回った終了画素までの減少コード・ジャンプ
区間を定義する減少コード・ジャンプ区間定義工程とを
備える。そして、この減少コード・ジャンプ区間定義工
程に続いて、増加コード・ジャンプ区間と減少コード・
ジャンプ区間との重なり合う区間を多重反射区間と判定
する多重反射区間判定工程を備える。これにより比較的
高速に行える処理を用いて多重反射区間を特定すること
ができる。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 the space code. Then, the multiple reflection determination step E5 compares the increase / decrease between consecutive pixels of the space code in the scanning direction, and the maximum value of the space code from the start pixel at which the increase tendency is reversed to start decreasing to the time of the transition. Increase code to end pixel beyond
The step of defining an increase code / jump section defining a jump section, and comparing the increase / decrease between consecutive pixels of the space code in the direction opposite to the scanning direction, and starting from the start pixel where the decreasing tendency is reversed to increase. A reduced code / jump section definition step of defining a reduced code / jump section up to an end pixel below the minimum value of the spatial code up to the time of the occurrence. Then, following the decreasing code / jump section defining step, the increasing code / jump section and the decreasing code / jump section
A multiple reflection section determining step of determining a section overlapping with the jump section as a multiple reflection section is provided. This makes it possible to specify a multiple reflection section using a process that can be performed at a relatively high speed.
【0124】図21乃至図23は具体的な処理例を示す
フローチャートである。ここでは、画素数256×25
6、投光角度分解能8bitとする。図21乃至図23
の順に処理を行う。FIGS. 21 to 23 are flowcharts showing specific processing examples. Here, the number of pixels is 256 × 25
6, the projection angle resolution is 8 bits. 21 to 23
The processing is performed in the order of.
【0125】画素位置: (x,y) 空間コード化画像: Code(x,y) 増加コード・ジャンプ識別フラグ: Fmax(x,
y) 減少コード・ジャンプ識別フラグ: Fmin(x,
y) 最大値: Max 最小値: Min 多重反射データ識別フラグ: Err(x,y)Pixel position: (x, y) Spatial coded image: Code (x, y) Incremental code / jump identification flag: Fmax (x, y)
y) Decrease code / jump identification flag: Fmin (x,
y) Maximum value: Max Minimum value: Min Multiple reflection data identification flag: Err (x, y)
【0126】図21に示すように、まず、増加方向につ
いて増加コード・ジャンプ区間を探索する。画素位置お
よび最大値を初期化する(ステップF1)と、次いで、
空間コード化画像のCode(x,y)の値が最大値M
axよりも大きいか否かを判定する(ステップF2)。
空間コード化画像の値が、最大値Maxよりも小さい場
合には、増加コード・ジャンプ識別フラグFmax
(x,y)を1とする(ステップF3)。これにより、
空間コードが減少に転じた座標およびそのまま連続して
減少している区間であるか否かを記憶する。一方、空間
コード化画像の値が最大値よりも大きい場合には、最大
値を当該空間コードの値で更新すると共に、増加コード
・ジャンプ識別フラグを0とする(ステップF4)。こ
れをx方向(水平走査方向)について繰返し(ステップ
F5,F6)、さらに、垂直走査方向について繰返す
(ステップ7,F8)。このとき、xの初期値を0と
し、xの値はカウントアップさせている。これにより、
水平走査方向での空間コードの増減を調べている。この
図21に示す処理により、全ての空間コード化画像中、
増加コード・ジャンプ区間にてFmax(x,y)=1
となるAs shown in FIG. 21, first, an increase code jump section is searched for in the increase direction. Initializing the pixel position and the maximum value (step F1),
The value of Code (x, y) of the spatially coded image is the maximum value M
It is determined whether it is larger than ax (step F2).
If 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). This allows
The coordinates at which the space code has turned to decrease and whether or not the section is a section in which the space code continuously decreases are stored. On the other hand, if the value of the space-coded image is larger than the maximum value, the maximum value is updated with the value of the space code, and the increase code / jump identification flag is set to 0 (step F4). This is repeated in the x direction (horizontal scanning direction) (steps F5 and F6), and further repeated in the vertical scanning direction (steps F7 and F8). At this time, the initial value of x is set to 0, and the value of x is counted up. This allows
We are investigating the increase and decrease of the space code in the horizontal scanning direction. By the processing shown in FIG. 21, in all the spatially coded images,
Fmax (x, y) = 1 in the increased code jump section
Becomes
【0127】続いて、図21に示すように、減少方向に
ついて減少コード・ジャンプ区間を探索する。ステップ
G1にてx=255と初期化する。そして、空間コード
が最小値よりも小さいか否かを判定する(ステップG
2)。通常、走査方向の逆方向では空間コードが減少す
るため、空間コードが最小値よりも小さくない場合に
は、減少コード・ジャンプ識別フラグFmin(x,
y)を1とする(ステップG3)。これにより、空間コ
ードが増加に転じた座標およびその後連続して増加して
いる区間であるか否かを記憶する。一方、空間コード化
画像の値が最小値よりも小さい場合には、最小値を更新
すると共に、Fmin(x,y)の値を0とする。これ
をx方向(水平走査方向の反平行方向)について繰返し
(ステップG5,G6)、さらに垂直方向について繰返
す(ステップG7,G8)。このとき、xの初期値を2
55とし、xの値をカウントダウンすることで逆方向の
探索を行っている。この図22に示す処理により、全て
の空間コード化画像中、減少コード・ジャンプ区間にて
Fmin(x,y)=1となる。Subsequently, as shown in FIG. 21, a decrease code jump section is searched for in the decrease direction. In step G1, x = 255 is initialized. Then, it is determined whether the space code is smaller than the minimum value (step G).
2). Usually, since the space code decreases in the reverse direction of the scanning direction, if the space code is not smaller than the minimum value, the reduced code jump identification flag Fmin (x,
y) is set to 1 (step G3). As a result, the coordinates at which the space code has turned to increase and whether or not the section is a section in which the space code continuously increases thereafter are stored. On the other hand, when the value of the space-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 in the x direction (the antiparallel direction of the horizontal scanning direction) (steps G5 and G6), and further repeated in the vertical direction (steps G7 and G8). At this time, the initial value of x is 2
55, and the search in the reverse direction is performed by counting down the value of x. By the processing shown in FIG. 22, Fmin (x, y) = 1 in the reduced code jump section in all the spatially coded images.
【0128】さらに、図23に示すように、初期化xお
よびyの値を初期化し(ステップH1)、その座標のフ
ラグを読出し、FmaxとFminともに1であるか否
かを確認し(ステップH2)、両区間が重なる区間であ
るとして、その座標にエラーを設定する(ステップH
3)。一方、両方が0であるとき又は一方のみが1であ
るときには、エラーフラグを0とする。そして、これを
水平方向(ステップH5,H6)および垂直方向(ステ
ップH7,H8)に繰返す。この図23に示す例では、
ステップH4にて多重反射による間違ったコードの識別
フラグをセットする。その後このフラグを調べて、表示
の際に色を変更したり、また、演算処理を行わない等の
処理に利用する。Further, as shown in FIG. 23, the values of the initialization 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 both sections are overlapping sections, an error is set at the coordinates (step H).
3). 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 in the vertical direction (steps H7 and H8). In the example shown in FIG.
In step H4, an identification flag of an incorrect code due to multiple reflection is set. Thereafter, this flag is checked and used for processing such as changing the color at the time of display or not performing the arithmetic processing.
【0129】本実施例による多重反射ノイズ除去を行っ
た例を図24に示す。上述したように本実施例による
と、多重反射の推定が可能となり自動的にノイズの除去
を行うことができる。また、金属加工面などの反射率の
高い対象物も測定可能となる。FIG. 24 shows an example in which multiple reflection noise removal according to this embodiment is performed. As described above, according to the present embodiment, multiple reflection can be estimated, and noise can be automatically removed. In addition, an object having a high reflectance such as a metal processing surface can be measured.
【発明の効果】本発明は以上のように構成され機能する
ので、これによると、増減抽出工程にて、照射工程での
計測光の走査方向と同方向の空間コードの増減の変化を
抽出し、すると、多重反射が生じたときには、スリット
光の進行方向が逆転し、走査方向とは逆向きに進行する
ため、空間コードの増加傾向が反転判定し、従って、多
重反射判定工程では、増減抽出工程にて抽出された空間
コードの増減が予め定められた増加または減少とは逆向
きの変化である減少または増加となった空間コードを特
定し、そして、当該空間コードの増減が逆向きとなった
空間コードを多重反射による空間コードと判定すること
ができ、これにより、死角に生じた多重反射であって
も、空間コードの増減の変化に基づいて確実に抽出する
ことができ、このため、除去の困難なノイズを除去して
正確な形状計測を行うことができるという従来にない優
れた三次元形状計測方法を提供することができる。Since the present invention is constructed and functions as described above, according to this, in the increase / decrease extraction step, the change of the increase / decrease of the space code in the same direction as the scanning direction of the measurement light in the irradiation step is extracted. Then, when multiple reflection occurs, the traveling direction of the slit light is reversed and travels in the opposite direction to the scanning direction, so that the increasing tendency of the space code is determined to be inverted. Identify the space code in which the increase or decrease of the space code extracted in the process is a decrease or increase which is a change opposite to the predetermined increase or decrease, and the increase or decrease of the space code is reversed. Can be determined as a spatial code due to multiple reflections, whereby even multiple reflections occurring in blind spots can be reliably extracted based on changes in the increase or decrease in spatial codes. , It is possible to provide a good three-dimensional shape measuring method not conventionally being able to perform accurate shape measurement by removing difficult noise removal.
【図1】本発明の第一の実施形態の構成を示すフローチ
ャートである。FIG. 1 is a flowchart showing a configuration of a first embodiment of the present invention.
【図2】図1に示した空間コードと受光素子の位置と測
定対象物までの距離の関係を示す説明図である。FIG. 2 is an explanatory diagram showing a relationship between a space code shown in FIG. 1, a position of a light receiving element, and a distance to an object to be measured.
【図3】計測光と空間コードの関係を示す説明図であ
り、図3(A)は照射角度と角度コードの関係を示す図
で、図3(B)は図3(A)に対応する空間コードの変
化を示す図で、図3(C)は空間コードを濃淡で示した
図である。3A and 3B are explanatory diagrams showing a relationship between a measurement light and a space code; FIG. 3A is a diagram showing a relationship between an irradiation angle and an angle code; FIG. 3B corresponds to FIG. 3A; FIG. 3C is a diagram showing a change in the space code, and FIG. 3C is a diagram showing the space code in shades.
【図4】計測光と空間コードの関係を図3に続いて示す
説明図であり、図4(A)は平面の測定対象物のカメラ
側に小物体が存在する場合の例を示す図で、図4(B)
は図4(A)に示すスリット光に対応する空間コードの
変化を示す図で、図4(C)は測定対象物の表面が傾斜
している場合を示す図で、図4(D)は図4(C)に示
すスリット光に対応する空間コードの例を示す図であ
る。FIG. 4 is an explanatory diagram showing the relationship between the measurement light and the space code following FIG. 3, and FIG. 4A is a diagram showing an example in which a small object exists on the camera side of a planar measurement target; , FIG. 4 (B)
4A is a diagram showing a change in a space code corresponding to the slit light shown in FIG. 4A, FIG. 4C is a diagram showing a case where the surface of the measurement object is inclined, and FIG. FIG. 5 is a diagram illustrating an example of a space code corresponding to the slit light illustrated in FIG.
【図5】多重反射の生じた測定対象物の例を示す説明図
であり、図5(A)は多重反射の生じる測定対象物の例
を示す図で、図5(B)はその空間コードの変化を示す
図である。5A and 5B are explanatory diagrams illustrating an example of a measurement target in which multiple reflections have occurred; FIG. 5A is a diagram illustrating an example of a measurement target in which multiple reflections have occurred; FIG. FIG.
【図6】本発明による三次元形状計測装置の構成を示す
ブロック図である。FIG. 6 is a block diagram showing a configuration of a three-dimensional shape measuring apparatus according to the present invention.
【図7】図6に示した三次元計測装置を較正する較正装
置の例を示す斜視図である。7 is a perspective view showing an example of a calibration device for calibrating the three-dimensional measurement device shown in FIG.
【図8】図7に開示した較正用二次元ゲージを示す図
で、図8(A)はその正面図、図8(B)は側面図であ
る。8 is a diagram showing the calibration two-dimensional gauge disclosed in FIG. 7, wherein FIG. 8 (A) is a front view and FIG. 8 (B) is a side view.
【図9】図7に示した装置による較正処理例を示すフロ
ーチャートである。FIG. 9 is a flowchart illustrating an example of a calibration process performed by the device illustrated in FIG. 7;
【図10】光切断法による三次元計測装置の構成を示す
ブロック図である。FIG. 10 is a block diagram showing a configuration of a three-dimensional measuring apparatus using a light section method.
【図11】図10に示した空間コード処理手段の一例を
示すブロック図である。FIG. 11 is a block diagram showing an example of a spatial code processing means shown in FIG.
【図12】図12(A)はスリット光を撮像したCCD
撮像センサを示す説明図であり、図12(B)は走査線
番号1の水平走査線を構成する画素の出力を並び順に示
す説明図である。FIG. 12 (A) is a CCD imaging slit light.
FIG. 12B is an explanatory diagram illustrating an image sensor, and FIG. 12B is an explanatory diagram illustrating outputs of pixels forming a horizontal scanning line of a scanning line number 1 in an arrangement order.
【図13】空間コード処理手段の動作を説明する構成を
簡易化して示した説明図であり、図13(A)は一つ目
のスリット光を撮像したCCD撮像センサを示し、図1
3(B)は初期化された輝度メモリを示し、図13
(C)は図13(A)のスリット光の撮像により得られ
た一番目の走査線における輝度を記録した輝度メモリを
示し、図13(D)は図13(C)の輝度メモリに基づ
いて記録された角度コード化メモリを示す。そして、図
13(E)から図13(H)までは、同様にして各走査
線ごとに輝度メモリ及び角度コード化メモリが記録され
る状態示している。FIG. 13 is an explanatory diagram showing a simplified configuration for explaining the operation of the space code processing means. FIG. 13 (A) shows a CCD image sensor for capturing the first slit light, and FIG.
FIG. 3B shows an initialized luminance memory, and FIG.
FIG. 13C shows a luminance memory in which the luminance of the first scanning line obtained by imaging the slit light in FIG. 13A is recorded, and FIG. 13D is based on the luminance memory in FIG. 4 shows a recorded angle coded memory. FIGS. 13E to 13H show a state in which a luminance memory and an angle coded memory are similarly recorded for each scanning line.
【図14】図10に示した構成により光切断法に基づく
空間コードの生成処理の一例を示すフローチャートの前
段である。14 is a first part of a flowchart illustrating an example of a space code generation process based on the light section method using the configuration illustrated in FIG. 10;
【図15】図10に示した構成により光切断法に基づく
空間コードの生成処理の一例を示すフローチャートの後
段である。FIG. 15 is a second half of a flowchart showing an example of processing for generating a space code based on the light section method with the configuration shown in FIG. 10;
【図16】測定不能点を有する空間コード化画像の一例
を示す説明図である。FIG. 16 is an explanatory diagram showing an example of a space-coded image having a measurement impossible point.
【図17】図22に示した空間コード画像を補完した例
を示す説明図である。FIG. 17 is an explanatory diagram showing an example in which the space code image shown in FIG. 22 is complemented.
【図18】多重反射が生じた歯車の例を示す説明図であ
る。FIG. 18 is an explanatory diagram illustrating an example of a gear in which multiple reflection has occurred.
【図19】図18に示す状態での計測例を示す説明図で
ある。FIG. 19 is an explanatory diagram showing a measurement example in the state shown in FIG. 18;
【図20】多重反射発生時の空間コードの変化例を示す
グラフ図である。FIG. 20 is a graph illustrating an example of a change in a space code when multiple reflection occurs.
【図21】多重反射区間を特定する処理例を示すフロー
チャートの前段である。FIG. 21 is a first part of a flowchart illustrating a processing example for specifying a multiple reflection section;
【図22】多重反射区間を特定する処理例を示すフロー
チャートの中段である。FIG. 22 is a middle part of a flowchart showing a processing example for specifying a multiple reflection section.
【図23】多重反射区間を特定する処理例を示すフロー
チャートの後段である。FIG. 23 is a second half of a flowchart illustrating a processing example of specifying a multiple reflection section.
【図24】本実施例により多重反射を除去した例を示す
説明図である。FIG. 24 is an explanatory diagram showing an example in which multiple reflection is removed according to the present embodiment.
2 照射機構 3 カメラ 4 算出手段 31 受光素子 41 輝度メモリ 42 角度コード化メモリ R スリット光 S 測定対象物 2 Irradiation mechanism 3 Camera 4 Calculation means 31 Light receiving element 41 Luminance memory 42 Angle coding memory R Slit light S Object to be measured
───────────────────────────────────────────────────── フロントページの続き (72)発明者 中島 毅 神奈川県横浜市都筑区桜並木2番1号 ス ズキ株式会社技術研究所内 Fターム(参考) 2F065 AA04 AA53 DD04 DD12 FF01 FF02 FF09 FF61 GG04 HH05 HH07 HH12 HH14 JJ03 JJ26 LL13 LL62 MM16 QQ24 QQ31 5B057 AA01 BA02 CA13 CB13 CC01 DA20 DB03 DC09 DC30 ────────────────────────────────────────────────── ─── Continuing from the front page (72) Inventor Takeshi Nakajima 2-1, Sakuranamiki, Tsuzuki-ku, Yokohama-shi, Kanagawa Prefecture F-term in the Suzuki R & D Center (reference) 2F065 AA04 AA53 DD04 DD12 FF01 FF02 FF09 FF61 GG04 HH05 HH07 HH12 HH14 JJ03 JJ26 LL13 LL62 MM16 QQ24 QQ31 5B057 AA01 BA02 CA13 CB13 CC01 DA20 DB03 DC09 DC30
Claims (6)
ードに対応した計測光を照射する照射工程と、この照射
工程で照射された計測光の照射角度に対して予め定めら
れた角度をなす受光平面に二次元に配列された各受光素
子にて当該計測光を受光する受光工程と、この受光工程
にて受光した計測光の順序に基づいて各受光素子に対応
する位置ごとに空間コードを算出する空間コード処理工
程と、この空間コード処理工程にて算出された空間コー
ドと前記受光素子の位置とに基づいて予め定められた座
標系での原点から前記測定対象物の表面までの距離を各
受光素子毎に算出する距離算出工程とを備えた三次元形
状計測方法において、 前記空間コード処理工程が、前記照射工程での前記計測
光の走査方向と同方向の空間コードの増減の変化を抽出
する増減抽出工程と、この増減抽出工程にて抽出された
空間コードの増減が予め定められた増加または減少とは
逆向きの変化である減少または増加となった空間コード
を特定すると共に当該空間コードの増減が逆向きとなっ
た空間コードを多重反射による空間コードと判定する多
重反射判定工程とを備えたことを特徴とする三次元形状
計測方法。An irradiation step of irradiating measurement light corresponding to a space code for dividing a space including a measurement object, and forming a predetermined angle with respect to an irradiation angle of the measurement light irradiated in the irradiation step. A light receiving step of receiving the measurement light with each light receiving element two-dimensionally arranged on the light receiving plane, and a space code for each position corresponding to each light receiving element based on the order of the measurement light received in the light receiving step. The space code processing step to be calculated, and the distance from the origin in the coordinate system predetermined on the basis of the space code and the position of the light receiving element calculated in the space code processing step to the surface of the measurement object. A three-dimensional shape measuring method comprising: a distance calculating step of calculating for each light receiving element; wherein the space code processing step includes: changing a change in increase or decrease of a space code in the same direction as a scanning direction of the measurement light in the irradiation step. An increase / decrease extraction step to output, and a space code in which the increase / decrease of the space code extracted in the increase / decrease extraction step is a decrease / increase that is a change opposite to a predetermined increase / decrease, and the space code is specified. A multi-reflection determining step of determining a spatial code in which the increase or decrease of the code is reversed as a spatial code by multiple reflection.
重反射判定工程によって多重反射と判定された空間コー
ドを削除する削除工程を備えたことを特徴とする請求項
1記載の三次元形状計測方法。2. The three-dimensional shape measurement according to claim 1, further comprising a deletion step of deleting a space code determined as multiple reflection in the multiple reflection determination step, following the multiple reflection determination step. Method.
重反射判定工程によって多重反射と判定された空間コー
ドにエラーフラグを付するエラーフラグ付加工程を備え
たことを特徴とする請求項1記載の三次元形状計測方
法。3. The method according to claim 1, further comprising an error flag adding step of adding an error flag to the space code determined to be multiple reflection in the multiple reflection determining step, following the multiple reflection determining step. 3D shape measurement method.
に対して前記空間コードを増加させて照射する増加空間
コード照射工程を備え、 前記多重反射判定工程が、前記空間コードの連続する画
素間での増減を走査方向に比較すると共に増加傾向が逆
転して減少に転じた開始画素から当該転じた時までの空
間コードの最高値を越えた終了画素までの増加コード・
ジャンプ区間を定義する増加コード・ジャンプ区間定義
工程と、前記空間コードの連続する画素間での増減を走
査方向とは逆向きに比較すると共に減少傾向が逆転して
増加に転じた開始画素から当該転じた時までの空間コー
ドの最低値を下回った終了画素までの減少コード・ジャ
ンプ区間を定義する減少コード・ジャンプ区間定義工程
とを備えると共に、 この減少コード・ジャンプ区間定義工程に続いて、前記
増加コード・ジャンプ区間と前記減少コード・ジャンプ
区間との重なり合う区間を多重反射区間と判定する多重
反射区間判定工程を備えたことを特徴とする請求項1記
載の三次元形状計測方法。4. The method according to claim 1, wherein the irradiating step includes an increasing space code irradiating step of increasing and irradiating the space code with respect to a scanning direction of the measurement light; The increase / decrease of the space code between the start pixel where the increase tendency is reversed and the decrease is reversed and the end pixel exceeding the maximum value of the spatial code from the time of the change is compared.
An increasing code / jump section defining step for defining a jump section, and comparing the increase / decrease between consecutive pixels of the space code in the direction opposite to the scanning direction, and starting from the start pixel whose decreasing tendency is reversed to increase. A reduced code / jump section defining step of defining a reduced code / jump section up to an end pixel below the minimum value of the space code up to the time of the change, and following the reduced code / jump section defining step, 2. The three-dimensional shape measuring method according to claim 1, further comprising a multiple reflection section determination step of determining a section where the increase code jump section overlaps with the decrease code jump section as a multiple reflection section.
ードに対応した計測光を照射する照射手段と、この照射
手段によって照射された計測光の照射角度に対して予め
定められた角度をなす受光平面に二次元に配列された各
受光素子を有する受光手段と、この受光手段の各受光素
子が受光する計測光の順序に基づいて各受光素子に対応
する位置ごとに空間コードを算出する空間コード処理手
段とを備えると共に、 この空間コード処理手段によって算出された空間コード
を前記各受光素子に対応した画素位置に記憶する空間コ
ード記憶手段と、この空間コード記憶手段の各画素位置
及び当該画素に格納された空間コードに基づいて予め定
められた座標系での原点から前記測定対象物の各表面ま
での距離を前記各受光素子毎に算出する距離算出手段と
を備えた三次元形状計測装置において、 前記空間コード処理手段が、前記照射手段による計測光
の走査方向と同方向の空間コードの増減の変化を前記空
間コード記憶手段に格納された空間コード画像から抽出
する増減抽出部と、この増減抽出部によって抽出された
空間コードの増減が予め定められた単調増加または単調
減少とは逆向きの変化である単調減少または単調増加と
なった空間コードを特定すると共に当該空間コードの増
減が逆向きとなった空間コードを多重反射による空間コ
ードと判定する多重反射判定部とを備えたことを特徴と
する三次元形状計測装置。5. An irradiating means for irradiating measurement light corresponding to a space code for dividing a space including an object to be measured, and forming a predetermined angle with respect to an irradiation angle of the measuring light radiated by the irradiating means. A light receiving means having light receiving elements arranged two-dimensionally on a light receiving plane, and a space for calculating a space 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. A space code storage unit for storing a space code calculated by the space code processing unit at a pixel position corresponding to each of the light receiving elements; and a pixel position of the space code storage unit and the corresponding pixel. A distance calculating means for calculating, for each of the light receiving elements, a distance from an origin in a predetermined coordinate system based on a space code stored in the light receiving element. In the three-dimensional shape measuring apparatus comprising: a spatial code processing means, wherein the spatial code image stored in the spatial code storage means changes in increase and decrease of the spatial code in the same direction as the scanning direction of the measurement light by the irradiating means Identify the space code in which the increase or decrease of the space code extracted by the increase / decrease extractor is monotonically decreasing or monotonically increasing in a direction opposite to a predetermined monotonic increase or monotonic decrease. A multi-reflection determining unit for determining a spatial code in which the increase or decrease of the spatial code is reversed as a spatial code by multiple reflection.
ードに対応した計測光を照射させる照射装置と、この照
射装置によって照射された計測光を当該計測光の照射角
度に対して予め定められた角度をなす受光平面に二次元
に配列された各受光素子にて受光する受光装置と、この
受光装置にて受光した計測光の順序に基づいて各受光素
子に対応する位置ごとに空間コードを算出する空間コー
ド処理装置と、この空間コード処理装置によって生成さ
れた空間コード化画像に基づいて予め定められた座標系
での原点から前記測定対象物の表面までの距離を各受光
素子毎に算出する演算装置とを備えた三次元形状計測装
置を使用して前記測定対象物の形状を測定する三次元形
状計測用プログラムを記憶した記憶媒体であって、 前記三次元計測用プログラムは前記演算装置を動作させ
る指令として、前記照射装置によって照射される前記計
測光の走査方向と同方向の空間コードの増減の変化を抽
出させる増減抽出指令と、この増減抽出指令に応じて抽
出された空間コードの増減が予め定められた単調増加ま
たは単調減少とは逆向きの変化である単調減少または単
調増加となった空間コードを特定させると共に当該空間
コードの増減が逆向きとなった空間コードを多重反射に
よる空間コードと判定させる多重反射判定指令とを備え
たことを特徴とする三次元形状計測用プログラムを記憶
した記憶媒体。6. An irradiation device for irradiating measurement light corresponding to a space code for dividing a space including an object to be measured, and a measurement light irradiated by the irradiation device is determined in advance with respect to an irradiation angle of the measurement light. A light receiving device that receives light at each light receiving element two-dimensionally arranged on a light receiving plane at an angle, and a space code for each position corresponding to each light receiving element based on the order of measurement light received at the light receiving device. A space code processing device to be calculated, and a distance from an origin in a predetermined coordinate system to a surface of the measurement target is calculated for each light receiving element based on a space coded image generated by the space code processing device. A storage medium storing a three-dimensional shape measurement program for measuring the shape of the object to be measured using a three-dimensional shape measurement device having a three-dimensional measurement device. The ram is a command to operate the arithmetic device, an increase / decrease extraction command for extracting a change in increase / decrease of the space code in the same direction as the scanning direction of the measurement light irradiated by the irradiation device, and an extraction in accordance with the increase / decrease extraction command. A space in which the increase / decrease of the space code specified is a monotonically decreasing or monotonically increasing space code which is a change opposite to the predetermined monotonic increase or monotonic decrease, and the space in which the increase / decrease of the space code is reversed. A storage medium storing a program for measuring a three-dimensional shape, comprising a multiple reflection determination command for determining a code as a spatial code by multiple reflection.
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 true JP2000193438A (en) | 2000-07-14 |
| JP3800842B2 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 (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009019942A (en) * | 2007-07-11 | 2009-01-29 | Nikon Corp | Shape measuring method, program, and shape measuring apparatus |
| EP2065678A2 (en) | 2007-11-30 | 2009-06-03 | Nissan Motor Co., Ltd. | Distance measurement system and distance measurement method |
| JP2013160624A (en) * | 2012-02-03 | 2013-08-19 | Canon Inc | Three-dimensional measurement system and method |
| JP2014055776A (en) * | 2012-09-11 | 2014-03-27 | Keyence Corp | Measurement microscope device, measurement microscope device operation pogram and computer readable recording medium |
| JP2017126267A (en) * | 2016-01-15 | 2017-07-20 | 株式会社Pfu | Image processing system, image processing method and computer program |
| WO2019212985A1 (en) * | 2018-04-30 | 2019-11-07 | Path Robotics, Inc. | Reflection refuting laser scanner |
| CN110532820A (en) * | 2019-08-26 | 2019-12-03 | 维沃移动通信有限公司 | Graphic code display, scanning method and terminal |
| JP2020046229A (en) * | 2018-09-14 | 2020-03-26 | 株式会社ミツトヨ | Three-dimensional measuring device and three-dimensional measuring method |
Families Citing this family (2)
| 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 |
| JP6338421B2 (en) | 2014-03-31 | 2018-06-06 | キヤノン株式会社 | Information processing apparatus, information processing apparatus control method, gripping system, and program |
-
1998
- 1998-12-28 JP JP37268398A patent/JP3800842B2/en not_active Expired - Fee Related
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009019942A (en) * | 2007-07-11 | 2009-01-29 | Nikon Corp | Shape measuring method, program, and shape measuring apparatus |
| EP2065678A2 (en) | 2007-11-30 | 2009-06-03 | Nissan Motor Co., Ltd. | Distance measurement system and distance measurement method |
| US7920247B2 (en) | 2007-11-30 | 2011-04-05 | Nissan Motor Co., Ltd. | Distance measurement system and distance measurement method |
| JP2013160624A (en) * | 2012-02-03 | 2013-08-19 | Canon Inc | Three-dimensional measurement system and method |
| JP2014055776A (en) * | 2012-09-11 | 2014-03-27 | Keyence Corp | Measurement microscope device, measurement microscope device operation pogram and computer readable recording medium |
| JP2017126267A (en) * | 2016-01-15 | 2017-07-20 | 株式会社Pfu | Image processing system, image processing method and computer program |
| WO2019212985A1 (en) * | 2018-04-30 | 2019-11-07 | Path Robotics, Inc. | Reflection refuting laser scanner |
| US10551179B2 (en) | 2018-04-30 | 2020-02-04 | Path Robotics, Inc. | Reflection refuting laser scanner |
| JP2021515250A (en) * | 2018-04-30 | 2021-06-17 | パス ロボティクス,インコーポレイテッド | Reflection falsification laser scanner |
| US11209264B2 (en) | 2018-04-30 | 2021-12-28 | Path Robotics, Inc. | Reflection refuting laser scanner |
| US11859964B2 (en) | 2018-04-30 | 2024-01-02 | Path Robotics, Inc. | Reflection refuting laser scanner |
| JP2020046229A (en) * | 2018-09-14 | 2020-03-26 | 株式会社ミツトヨ | Three-dimensional measuring device and three-dimensional measuring method |
| JP7219034B2 (en) | 2018-09-14 | 2023-02-07 | 株式会社ミツトヨ | Three-dimensional shape measuring device and three-dimensional shape measuring method |
| CN110532820A (en) * | 2019-08-26 | 2019-12-03 | 维沃移动通信有限公司 | Graphic code display, scanning method and terminal |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3800842B2 (en) | 2006-07-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5891280B2 (en) | Method and device for optically scanning and measuring the environment | |
| US6674893B1 (en) | Three-dimensional shape measuring apparatus | |
| US7456842B2 (en) | Color edge based system and method for determination of 3D surface topology | |
| EP1814083A1 (en) | Photometric measurements using at least three light sources | |
| JP4885584B2 (en) | Rangefinder calibration method and apparatus | |
| WO2022050279A1 (en) | Three-dimensional measurement device | |
| JP6279060B1 (en) | Laser sensor and measuring method | |
| JP7259660B2 (en) | Image registration device, image generation system and image registration program | |
| JP2000193438A (en) | Method and device for measuring 3-dimension form, and storage medium where 3-dimension form measuring program is stored | |
| US20240412394A1 (en) | Method and device for measuring depth information relating to a scene on the basis of structured light generated by means of at least one parallel radiation source | |
| JP4691701B2 (en) | Number detection device and method | |
| JP2006023178A (en) | 3-dimensional measuring method and device | |
| JPH1144533A (en) | Preceding vehicle detection device | |
| JP3621215B2 (en) | 3D measuring device | |
| JP2002022425A (en) | 3D image input device | |
| JP3800841B2 (en) | Method and apparatus for measuring 3D shape and storage medium storing 3D shape measurement program | |
| JP2000337829A (en) | Luminance measuring method, storage medium to store program for measuring luminance, and three-dimensional measuring device | |
| JP3740836B2 (en) | Three-dimensional shape measuring device | |
| JP2001012913A (en) | Coil position detection device | |
| US6411918B1 (en) | Method and apparatus for inputting three-dimensional data | |
| JP2001264017A (en) | Three-dimensional image photographing apparatus | |
| JP2001012917A (en) | Coil position detection device | |
| JPH0467887B2 (en) | ||
| KR102423217B1 (en) | Crack investigation device using 3D distance distribution information of ToF sensor and method of deriving crack information using the same | |
| 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 |