JP2002162215A - Three-dimensional shape measuring method and its system - Google Patents

Three-dimensional shape measuring method and its system

Info

Publication number
JP2002162215A
JP2002162215A JP2000359231A JP2000359231A JP2002162215A JP 2002162215 A JP2002162215 A JP 2002162215A JP 2000359231 A JP2000359231 A JP 2000359231A JP 2000359231 A JP2000359231 A JP 2000359231A JP 2002162215 A JP2002162215 A JP 2002162215A
Authority
JP
Japan
Prior art keywords
value
phase
image
area
region
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
Application number
JP2000359231A
Other languages
Japanese (ja)
Other versions
JP3687531B2 (en
Inventor
Ryosuke Mitaka
良介 三高
長生 ▲濱▼田
Osao Hamada
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2000359231A priority Critical patent/JP3687531B2/en
Publication of JP2002162215A publication Critical patent/JP2002162215A/en
Application granted granted Critical
Publication of JP3687531B2 publication Critical patent/JP3687531B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable three-dimensional shape measurement, simple phase connection processing and high speed measurement without excessively taking a cost and an imaging time and without damaging the resolution of an imaging device. SOLUTION: The image of a pattern H1 is projected on an object, photographing and the shift of H1 are repeated to take in a plurality of stripe images H2 shifting a bright phase every constant amount, and the image for area classification is created. In the image for the area classification, a first value is assigned to a pixel corresponding to a pixel belonging to one half cycle in one bright cycle, a second value is assigned to the other, and a third value is assigned to the pixel corresponding to the pixel in which brightness does not change in the shift. The classification of the area in which each pixel of the first to third values continues is performed by using the image for the area classification, on the basis of the classified result the connection area of the first value and the second value mutually adjacent along the parallel direction of the stripe are classified, phase connecting processing is performed by utilizing the classified result, and the three-dimensional shaped height information of the object is extracted in accordance with the processed result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、位相シフト法(縞
走査法)により対象物の3次元形状を計測するための3
次元形状計測方法およびそのシステムに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for measuring a three-dimensional shape of an object by a phase shift method (fringe scanning method).
The present invention relates to a dimensional shape measurement method and a system thereof.

【0002】[0002]

【従来の技術】従来、3次元形状の計測には、高速かつ
高精度の計測を可能にする位相シフト法(縞走査法)が用
いられている。ここで、位相シフト法においては、位相
連結の処理が正しく行われていなければ、高さ情報を一
意に決定することができないという位相連結問題に対処
する必要があることから、例えば、特公平3−3852
4号公報には、計測対象の近くに投影パターン全体を捉
えることが出来るような広い基準面を配置し、ここに投
影される歪みのない投影パターンを基準位相として計測
し、これをもとにして計測対象に投影されたパターンの
歪みを求めるという方法が記載されている。
2. Description of the Related Art Conventionally, a phase shift method (fringe scanning method) that enables high-speed and high-accuracy measurement has been used for measuring a three-dimensional shape. Here, in the phase shift method, it is necessary to deal with the phase connection problem that the height information cannot be uniquely determined unless the phase connection processing is performed correctly. −3852
In JP-A-4, a wide reference plane is arranged near the measurement target so that the entire projection pattern can be captured, and a projection pattern without distortion projected thereon is measured as a reference phase. A method is described in which the distortion of a pattern projected on a measurement target is obtained by using the method.

【0003】また、特開平11−14327号公報で
は、画像処理のみにより位相連結の処理を行う方法とし
て、画像全面に対して位相不連続部分の特徴を抽出する
フィルタを適用する方法が提案されている。
Japanese Patent Application Laid-Open No. H11-14327 proposes a method of applying a filter for extracting a feature of a phase discontinuity over the entire image as a method of performing a phase connection process only by image processing. I have.

【0004】さらに、特開平6−66527号公報に
は、投影方法の改良により位相連結問題を解決する方法
として、投影するパターンの周期を変えて2度の計測を
行い、周期から決定される最大計測高さを元に小さい周
期での計測の際に発生した周期ズレを大きい周期での計
測結果をもとに補正する方法が記載されている。
Japanese Patent Laid-Open Publication No. Hei 6-66527 discloses a method of solving the phase connection problem by improving the projection method, performing measurement twice by changing the period of the pattern to be projected, and determining the maximum value determined from the period. A method is described in which a cycle deviation generated at the time of measurement in a small cycle based on the measurement height is corrected based on a measurement result in a large cycle.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記3
つの公報に記載の方法では、位相連結問題を解決するこ
とができるものの、それぞれ以下のような課題が残る。
However, the above 3)
Although the methods described in the two publications can solve the phase connection problem, the following problems remain.

【0006】特公平3−38524号公報に記載の方法
では、カメラ視野内にその基準面の全体を捉える必要が
あり、計測対象は画面の一部にしか捉えられないため、
撮像装置の分解能が十分に活用されないという問題があ
った。また、装置構成の面でも基準面を設置する必要が
あり、計測対象が人体のように加工することのできない
場合、適用が困難であるという問題があった。
In the method described in Japanese Patent Publication No. 3-38524, it is necessary to capture the entire reference plane in the camera's field of view, and the measurement target can be captured only on a part of the screen.
There is a problem that the resolution of the imaging device is not fully utilized. In addition, it is necessary to set a reference plane also in terms of the device configuration, and there is a problem that application is difficult when the measurement target cannot be processed like a human body.

【0007】特開平11−14327号公報に記載の方
法では、得られた位相推定結果画像の全面に対して演算
量の多い大きな畳み込みフィルタを適用する必要があ
り、位相導出の処理に時間がかかるという問題があっ
た。
In the method described in Japanese Patent Application Laid-Open No. 11-14327, it is necessary to apply a large convolution filter with a large amount of calculation to the entire surface of the obtained phase estimation result image, and the process of deriving the phase takes time. There was a problem.

【0008】特開平6−66527号公報に記載の方法
では、計測を行うにあたって2回の計測を実施する必要
があり、計測時間が2倍かかるという問題があった。
In the method described in Japanese Patent Application Laid-Open No. 6-66527, it is necessary to perform measurement twice when performing the measurement, and there is a problem that the measurement time is twice as long.

【0009】また、本出願人による特願平11−304
086号の出願にも、位相連結問題を解決することがで
きる発明として、段差などで縞に不連続が生じた場合に
も縞次数を決定しやすくすべく、光の強度が少なくとも
1周期以上に亘る正弦波状に変化し縞状となる第1パタ
ーンの投影像と、その第1パターンの位相境界の位置を
割り出すための第2パターンの投影像とを併用する方法
が記載されている。しかし、この出願の一部の方法は、
第2パターンの像を投影するために補助投影装置を用い
たり、投影回数を増やしたりするので、コストおよび撮
像時間が余計にかかる欠点があった。
[0009] Also, Japanese Patent Application No. 11-304 filed by the present applicant.
Also in the application of No. 086, as an invention which can solve the phase connection problem, in order to make it easy to determine the fringe order even when the fringe is discontinuous due to a step or the like, the light intensity must be at least one cycle or more. A method is described in which a projected image of a first pattern that changes in a sine wave shape and forms a stripe pattern and a projected image of a second pattern for determining the position of the phase boundary of the first pattern are used in combination. However, some methods in this application
Since an auxiliary projection device is used to project the image of the second pattern or the number of times of projection is increased, there is a disadvantage that the cost and the imaging time are extra.

【0010】本発明は、上記事情に鑑みてなされたもの
であり、コストおよび撮像時間を余計にかけることな
く、撮像装置の解像度を損なわない3次元形状の計測、
簡易な位相連結の処理および高速な計測を可能にする3
次元形状計測方法およびそのシステムを提供することを
目的とする。
The present invention has been made in view of the above circumstances, and measures a three-dimensional shape without impairing the resolution of an imaging apparatus without adding cost and imaging time.
Enables simple phase connection processing and high-speed measurement 3
It is an object of the present invention to provide a dimensional shape measuring method and a system therefor.

【0011】[0011]

【課題を解決するための手段】上記課題を解決するため
の請求項1記載の発明は、位相シフト法に基づく3次元
形状計測方法であって、縞状で縞の並設方向に沿って明
度が正弦波状に変化するパターンの像を対象物に投影
し、前記対象物に投影されたパターンの像の撮影および
前記パターンの一定量のシフトを繰り返して、前記明度
の位相が一定量づつシフトした画像を少なくとも3種類
取り込み、これらの画像から、この画像の複数の画素に
それぞれ対応する複数の画素を有し、これら複数の画素
のうち、前記明度の1周期の一部に属する画素に対応す
る画素には第1値が割り当てられ、前記明度の1周期の
残部に属する画素に対応する画素には第2値が割り当て
られ、前記明度の位相のシフトで明度が変化しない画素
に対応する画素には第3値が割り当てられてなる領域分
類用画像を作成し、この領域分類用画像を用いて前記第
1〜第3値の画素の各々が連続する領域の分類を行い、
この分類結果に基づいて、前記第1値の画素が連続する
第1領域および前記第2値の画素が連続する第2領域の
うち、前記縞の並設方向に沿って互いに隣接する第1領
域および第2領域の組分けをし、この組分け結果を利用
して位相連結の処理を行い、この処理結果に応じて前記
対象物の3次元形状の高さ情報を抽出することを特徴と
する。
According to a first aspect of the present invention, there is provided a method for measuring a three-dimensional shape based on a phase shift method. Projects an image of a pattern that changes in a sinusoidal shape on the object, repeats photographing of the image of the pattern projected on the object and a certain amount of shift of the pattern, and the lightness phase is shifted by a fixed amount. At least three types of images are captured, and from these images, a plurality of pixels respectively corresponding to a plurality of pixels of the image are provided, and among the plurality of pixels, the plurality of pixels correspond to pixels belonging to a part of one cycle of the brightness. A pixel is assigned a first value, a pixel corresponding to a pixel belonging to the remainder of one cycle of the brightness is assigned a second value, and a pixel corresponding to a pixel whose brightness does not change due to the shift of the brightness phase. Is Assigned three values to create a region classification image comprising performs classification of each successive region of the pixels of the first to third values with the region classification image,
Based on the classification result, of the first area in which the pixels of the first value are continuous and the second area in which the pixels of the second value are continuous, first areas adjacent to each other along the direction in which the stripes are arranged And the second area are grouped, and a phase connection process is performed using the grouping result, and height information of the three-dimensional shape of the object is extracted according to the processing result. .

【0012】請求項2記載の発明は、請求項1記載の3
次元形状計測方法において、前記領域分類用画像を作成
する場合、前記取り込んだ複数の画像の各画素のうち、
同一の位置にある各画素の明度を所定の演算式に代入し
て算出された位相値がその位置に対応する画素の値とし
て画素毎に割り当てられてなる位相復元画像を作成し、
この後、前記領域分類用画像は、前記明度の位相のシフ
トで明度が変化する画素の位置に対応するとともに前記
位相復元画像内の対応する画素の値が所定しきい値より
小さい画素に、第1値が割り当てられ、前記明度の位相
のシフトで明度が変化する画素の位置に対応するととも
に前記位相復元画像内の対応する画素の値が所定しきい
値より大きい画素に、第2値が割り当てられ、前記明度
の位相のシフトで明度が変化しない画素の位置に対応す
る画素に、第3値が割り当てられて作成され、前記位相
連結の処理は前記組分け結果を前記位相復元画像に利用
して行われることを特徴とする。
[0012] The invention described in claim 2 is the third invention described in claim 1.
In the dimensional shape measurement method, when creating the area classification image, among the pixels of the plurality of captured images,
Create a phase restored image in which the phase value calculated by substituting the brightness of each pixel at the same position into a predetermined arithmetic expression is assigned to each pixel as the value of the pixel corresponding to that position,
Thereafter, the area classification image corresponds to a position of a pixel whose lightness changes due to the shift of the lightness phase and a pixel whose value of a corresponding pixel in the phase-recovered image is smaller than a predetermined threshold value. A second value is assigned to a pixel corresponding to a position of a pixel whose brightness changes due to the shift of the brightness phase and whose value of the corresponding pixel in the phase-recovered image is larger than a predetermined threshold value A third value is created by assigning a third value to a pixel corresponding to a position of a pixel whose brightness does not change due to the shift of the brightness phase, and the phase connection process uses the grouping result for the phase restoration image. It is characterized by being performed.

【0013】請求項3記載の発明は、請求項1記載の3
次元形状計測方法において、前記領域分類用画像は、前
記取り込んだ複数の画像の各画素のうち、同一の位置に
ある各画素の明度を所定の演算式に代入して位相値を算
出する処理を、前記取り込んだ画像のうち、一の画像を
初期位相用とした場合と他の画像を初期位相用とした場
合とで平行に実行しながら、前記一の画像を初期位相用
とした場合の位相値と前記他の画像を初期位相用とした
場合の位相値との差分値を求め、この差分値が正であれ
ば第1値が、負であれば第2値が、そして明度が変化し
なければ第3値が割り当てられて作成され、前記位相連
結の処理は前記組分け結果を前記各位相値に利用して行
われることを特徴とする。
[0013] The third aspect of the present invention provides the third aspect of the present invention.
In the dimensional shape measurement method, the area classification image includes a process of calculating a phase value by substituting the brightness of each pixel at the same position among the pixels of the plurality of captured images into a predetermined arithmetic expression. Of the captured images, the phase when the one image is used for the initial phase while the one image is used for the initial phase and the other image is used for the initial phase are executed in parallel. A difference value between the value and the phase value when the other image is used for the initial phase is determined. If the difference value is positive, the first value is changed. If the difference value is negative, the second value is changed. If not, a third value is assigned and created, and the phase connection process is performed using the grouping result for each of the phase values.

【0014】請求項4記載の発明は、請求項1記載の3
次元形状計測方法において、前記一定量は前記明度の1
周期を3より大きい整数である所定数で除して得た量で
あり、前記領域分類用画像を作成する場合、前記取り込
んだ複数の画像の各画素のうち、同一の位置にある各画
素の明度を所定の演算式に代入して算出された位相値が
その位置に対応する画素の値として画素毎に割り当てら
れてなる位相復元画像を、前記取り込んだ画像のうち、
一の画像を初期位相用とした場合と前記取り込んだ画像
をサイクリックに前記所定数より小さい整数回分ずらし
て他の画像を初期位相用とした場合とでそれぞれ作成
し、この後、前記領域分類用画像は、前記両位相復元画
像内の対応する両画素の値の差分値が正であれば第1値
が、負であれば第2値が、そして明度が変化しなければ
第3値が各画素に割り当てられて作成され、前記位相連
結の処理は前記組分け結果を前記両位相復元画像の一方
に利用して行われることを特徴とする。
According to a fourth aspect of the present invention, there is provided the third aspect of the present invention.
In the three-dimensional shape measuring method, the certain amount is one of the lightness.
This is the amount obtained by dividing the period by a predetermined number that is an integer greater than 3, and when creating the area classification image, among the pixels of the plurality of captured images, A phase restoration image in which the phase value calculated by substituting the brightness into a predetermined arithmetic expression is assigned to each pixel as a value of a pixel corresponding to the position, among the captured images,
One image is used for the initial phase and the captured image is cyclically shifted an integer number of times smaller than the predetermined number and another image is used for the initial phase. The first image is the first value if the difference between the values of the two corresponding pixels in the two-phase restored image is positive, the second value if the difference is negative, and the third value if the brightness does not change. The phase concatenation process is created by being assigned to each pixel, and is performed using the grouping result for one of the two phase restored images.

【0015】請求項5記載の発明は、請求項1記載の3
次元形状計測方法において、前記領域分類用画像の各画
素のうち、画素の値が前記縞の並設方向に沿って前記第
2値から前記第1値に変化する画素の位置を位相連結の
位置として、前記位相連結の処理を行うことを特徴とす
る。
According to a fifth aspect of the present invention, there is provided the third aspect of the present invention.
In the two-dimensional shape measurement method, among the pixels of the area classification image, the position of the pixel at which the pixel value changes from the second value to the first value along the direction in which the stripes are arranged is determined by the phase connection position. And performing the phase connection processing.

【0016】請求項6記載の発明は、請求項1記載の3
次元形状計測方法において、前記位相連結の処理は、前
記領域分類用画像を用いて、前記第1値の画素が連続す
る第1領域および前記第2値の画素が連続する第2領域
の分類を行い、これら第1領域および第2領域における
前記縞の並設方向に沿った始点および終点をそれぞれ求
めて前記第1領域および第2領域の位置関係の評価を行
い、この評価結果に応じて、前記縞の並設方向に沿って
互いに隣接する前記第1領域および第2領域の組分けを
することにより実行されることを特徴とする。
The invention according to claim 6 is the third invention according to claim 1.
In the dimensional shape measurement method, the phase connection processing includes, using the area classification image, classifying a first area in which the first value pixels are continuous and a second area in which the second value pixels are continuous. Then, a starting point and an ending point along the direction in which the stripes are arranged in the first area and the second area are obtained, respectively, and the positional relationship between the first area and the second area is evaluated. This is performed by grouping the first region and the second region adjacent to each other along the direction in which the stripes are arranged.

【0017】請求項7記載の発明は、請求項6記載の3
次元形状計測方法において、前記組分け前、前記第1領
域および第2領域の各々に所定画素数以下の他の小領域
が含まれる場合、その小領域を、これを含む領域に併合
する処理を行うことを特徴とする。
The invention according to claim 7 is the third invention according to claim 6.
In the dimensional shape measurement method, when each of the first area and the second area includes another small area equal to or less than a predetermined number of pixels before the grouping, a process of merging the small area with an area including the small area is performed. It is characterized by the following.

【0018】請求項8記載の発明は、請求項6記載の3
次元形状計測方法において、前記第3値の画素が連続す
る第3領域を前記第1領域に含めて拡張の第1領域と
し、前記第3領域を前記第2領域に含めて拡張の第2領
域とし、これら拡張の第1および第2領域の重なり状態
に基づいて、互いに隣接する前記第1領域および第2領
域の組分けをすることを特徴とする。
[0018] The invention described in claim 8 is the third invention described in claim 6.
In the two-dimensional shape measurement method, a third region in which the pixels of the third value are continuous is included in the first region to be an extended first region, and the third region is included in the second region to be an extended second region. The first region and the second region adjacent to each other are grouped based on the overlapping state of the first and second regions.

【0019】請求項9記載の発明は、請求項8記載の3
次元形状計測方法において、前記第3領域により複数位
相分の前記第1領域および第2領域が繋がって見える場
合、前記第3領域を除いて前記第1領域および第2領域
を再度求め、これら第1領域および第2領域のうち、前
記縞に沿った方向に分断されていない領域を抽出し、こ
の領域に基づいて前記縞に沿った方向に分断された領域
を結合することを特徴とする。
The ninth aspect of the present invention is the third aspect of the present invention.
In the three-dimensional shape measuring method, when the first region and the second region for a plurality of phases appear to be connected by the third region, the first region and the second region are obtained again except for the third region, and the third region is obtained. A region not divided in the direction along the stripe is extracted from the first region and the second region, and the regions divided in the direction along the stripe are combined based on this region.

【0020】請求項10記載の発明は、請求項2記載の
3次元形状計測方法において、前記撮影およびシフトを
繰り返して取り込まれる画像を、前記パターンの像を一
の方向から前記対象物に投影した場合のものと前記パタ
ーンの像を他の方向から前記対象物に投影した場合のも
のとの2組み用意し、これら2組みの画像から前記位相
復元画像を2つ作成し、これら位相復元画像の一方のみ
に前記第3値の画素が連続する領域が存在する場合、そ
の領域を、前記対象物における段差を作る突部の影の範
囲として、これら影の範囲の間に挟まれる領域を前記突
部の存在領域とすることを特徴とする。
According to a tenth aspect of the present invention, in the three-dimensional shape measuring method according to the second aspect, an image captured by repeating the photographing and shifting is obtained by projecting the image of the pattern onto the object from one direction. Two sets of a case and a case where the image of the pattern is projected onto the object from another direction are prepared, and two phase restored images are created from these two sets of images. When there is a region where the third value pixel is continuous on only one of the regions, the region is defined as a shadow region of a projection that forms a step in the object, and a region sandwiched between these shadow regions is defined as the projection region. It is characterized in that it is a region where a part exists.

【0021】請求項11記載の発明は、請求項2記載の
3次元形状計測方法において、前記領域分類用画像の各
画素のうち、前記第3値の画素が連続する第3領域にお
ける前記縞の並設方向に沿った始点と終点における位相
復元画像の画素の値がほぼ同一である場合、当該第3領
域を前記対象物において段差を作る突部の影の範囲とす
ることを特徴とする。
According to an eleventh aspect of the present invention, in the three-dimensional shape measuring method according to the second aspect, among the pixels of the area classification image, the stripes in the third area in which the pixels of the third value are continuous. When the values of the pixels of the phase-recovered images at the start point and the end point along the juxtaposition direction are substantially the same, the third area is defined as a shadow area of a protrusion that forms a step in the object.

【0022】請求項12記載の発明は、請求項10また
は11記載の3次元形状計測方法において、前記領域分
類用画像の各画素のうち、前記影の範囲からその影が伸
びる方向とは逆の方向における前記縞に沿った方向の各
画素に対応する前記位相復元画像の画素の値を調べ、こ
れら画素の値が不連続である場合には前記影が伸びる方
向とは逆の方向に前記突部が続いているものとし、不連
続で無くなった場合には前記突部が途切れる境界である
とすることを特徴とする。
According to a twelfth aspect of the present invention, in the three-dimensional shape measuring method according to the tenth or eleventh aspect, of the pixels of the area classification image, a direction opposite to a direction in which the shadow extends from the range of the shadow. The values of the pixels of the phase-recovered image corresponding to each pixel in the direction along the stripe in the direction are examined, and when the values of these pixels are discontinuous, the projection is performed in a direction opposite to the direction in which the shadow extends. It is characterized in that the portion is continued, and when the portion is discontinuous and disappears, it is a boundary where the protrusion is interrupted.

【0023】請求項13記載の発明は、請求項10〜1
2のいずれかに記載の3次元形状計測方法において、前
記縞の並設方向に沿った前記影の範囲の長さをパターン
ずれ量として求め、その影が伸びる方向とは逆の方向に
存在する前記突部における前記第1値ないし第2値の画
素が連続する領域を、前記パターンずれ量だけ前記縞の
並設方向にずれた前記突部の外側の領域と対応付けるこ
とを特徴とする。
The invention according to claim 13 is the invention according to claims 10 to 1
3. In the three-dimensional shape measuring method according to any one of 2., the length of the range of the shadow along the direction in which the stripes are arranged is obtained as a pattern shift amount, and the shadow exists in a direction opposite to the direction in which the shadow extends. A region where the pixels of the first value or the second value in the protrusion are continuous is associated with a region outside the protrusion which is shifted in the direction in which the stripes are arranged by the pattern shift amount.

【0024】請求項14記載の発明は、請求項1記載の
3次元形状計測方法において、前記第3値の画素が連続
する第3領域内の位相値または高さ情報を、その第3領
域の外側の位相値または高さ情報をもとに補完すること
を特徴とする。
According to a fourteenth aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, the phase value or the height information in the third area where the pixels of the third value are continuous is stored in the third area. It is characterized by complementing based on outer phase value or height information.

【0025】請求項15記載の発明は、請求項14記載
の3次元形状計測方法において、前記第3値の画素が連
続する第3領域が前記対象物における段差を作る突部の
影で生じた場合、その第3領域内の位相値または高さ情
報を、その第3領域に隣接しかつ前記突部の影が伸びる
方向にある領域の位相値または高さ情報をもとに補完す
ることを特徴とする。
According to a fifteenth aspect of the present invention, in the three-dimensional shape measuring method according to the fourteenth aspect, the third region in which the pixels of the third value are continuous is formed by a shadow of a projection forming a step in the object. In this case, complementing the phase value or the height information in the third area based on the phase value or the height information of the area adjacent to the third area and in the direction in which the shadow of the projection extends. Features.

【0026】請求項16記載の発明は、位相シフト法に
基づく3次元形状計測システムであって、縞状で縞の並
設方向に沿って明度が正弦波状に変化するパターンの像
を対象物に投影する投影装置と、前記対象物に投影され
たパターンの像を撮影する撮像装置と、前記対象物に投
影されたパターンの一定量のシフトを繰り返して得ら
れ、前記明度の位相が一定量づつシフトした画像を少な
くとも3種類取り込んで記憶する記憶装置と、この記憶
装置に記憶された画像から、この画像の複数の画素にそ
れぞれ対応する複数の画素を有し、これら複数の画素の
うち、前記明度の1周期の一部に属する画素に対応する
画素には第1値が割り当てられ、前記明度の1周期の残
部に属する画素に対応する画素には第2値が割り当てら
れ、前記明度の位相のシフトで明度が変化しない画素に
対応する画素には第3値が割り当てられてなる領域分類
用画像を作成し、この領域分類用画像を用いて前記第1
〜第3値の画素の各々が連続する領域の分類を行い、こ
の分類結果に基づいて、前記第1値の画素が連続する第
1領域および前記第2値の画素が連続する第2領域のう
ち、前記縞の並設方向に沿って互いに隣接する第1領域
および第2領域の組分けをし、この組分け結果を利用し
て位相連結の処理を行い、この処理結果に応じて前記対
象物の3次元形状の高さ情報を抽出する画像処理装置と
を備えることを特徴とする。
According to a sixteenth aspect of the present invention, there is provided a three-dimensional shape measuring system based on a phase shift method. A projection device for projecting, an imaging device for photographing an image of the pattern projected on the object, and a certain amount of shift of the pattern projected on the object is obtained repeatedly, and the phase of the lightness is obtained by a constant amount. A storage device for capturing and storing at least three types of shifted images, and a plurality of pixels respectively corresponding to a plurality of pixels of the image, from the images stored in the storage device, and among the plurality of pixels, A pixel corresponding to a pixel belonging to a part of one cycle of brightness is assigned a first value, a pixel corresponding to a pixel belonging to the remainder of one cycle of brightness is assigned a second value, and the phase of the brightness is assigned. The pixel corresponding to the pixel brightness does not change the shift creates a region classification image composed assigned third value, the using the area classification image first
To a third area in which each of the pixels of the third value is continuous, and based on the classification result, a first area in which the pixels of the first value are continuous and a second area in which the pixels of the second value are continuous The first region and the second region adjacent to each other along the direction in which the stripes are arranged are grouped, and a phase connection process is performed using the grouping result. An image processing device for extracting height information of the three-dimensional shape of the object.

【0027】上記発明によれば、領域分類用画像を用い
て第1〜第3値の画素の各々が連続する領域の分類を行
い、この分類結果に基づいて、縞の並設方向に沿って互
いに隣接する第1領域および第2領域の組分けをするの
で、組分けされた第1領域および第2領域が1周期分の
位相(以下、1位相という)に相当するようになるか
ら、段差や孔がある場合にも、組分け結果を利用するこ
とで正しい位相連結の処理を行うことができる。また、
補助投影装置を用いたり、補助パターンを投影するため
に投影回数を増やしたりする必要がないので、3次元形
状計測を低コストで高速に実現できる。
According to the present invention, a region in which each of the first to third value pixels is continuous is classified using the region classification image, and based on the classification result, the regions are arranged along the direction in which the stripes are arranged. Since the first region and the second region adjacent to each other are grouped, the grouped first region and second region correspond to a phase for one cycle (hereinafter, referred to as one phase). Even when there are holes or holes, correct phase connection processing can be performed by using the grouping result. Also,
Since there is no need to use an auxiliary projection device or increase the number of projections for projecting an auxiliary pattern, three-dimensional shape measurement can be realized at low cost and at high speed.

【0028】[0028]

【発明の実施の形態】図1は3次元形状計測システムの
説明図、図2は3次元形状計測方法の手順を示すフロー
チャートであり、これらの図を用いて本発明の第1実施
形態を説明する。
FIG. 1 is an explanatory diagram of a three-dimensional shape measuring system, and FIG. 2 is a flowchart showing a procedure of a three-dimensional shape measuring method. The first embodiment of the present invention will be described with reference to these drawings. I do.

【0029】図2に示す3次元形状計測方法は、位相シ
フト法に基づいて3次元形状を計測する方法であって、
ステップS1の「画像番号←1」と、ステップS2の
「パターン切り替え」と、ステップS3の「画像取り込
み」と、ステップS4の「取り込み完了?」と、ステッ
プS5の「画像番号←画像番号+1」と、ステップS6
の「画像番号:N」と、ステップS7の「画像を記憶装
置へ転送」と、ステップS8の「位相導出処理」と、ス
テップS9の「位相境界検出」と、ステップS10の
「位相連結処理」と、ステップS11の「距離計算」と
の各手順を持つ。
The three-dimensional shape measuring method shown in FIG. 2 is a method for measuring a three-dimensional shape based on a phase shift method.
"Image number ← 1" in step S1, "Pattern switching" in step S2, "Image capture" in step S3, "Capture completed?" In step S4, and "Image number ← image number +1" in step S5. And step S6
"Image number: N", "transfer image to storage device" in step S7, "phase derivation process" in step S8, "phase boundary detection" in step S9, and "phase concatenation process" in step S10. And a procedure of “distance calculation” in step S11.

【0030】そして、上記3次元形状計測方法は、図1
(a)の例に示すように、投影装置1と、カメラ2と、
量子化回路3と、記憶装置4と、画像処理装置5とを備
える3次元形状計測システムによって実行される。
The above three-dimensional shape measuring method uses the method shown in FIG.
As shown in the example of (a), the projection device 1, the camera 2,
This is executed by a three-dimensional shape measurement system including the quantization circuit 3, the storage device 4, and the image processing device 5.

【0031】投影装置1は、ランプ11と、このランプ
11の光を一の方向に向けて反射する凹面鏡12と、ラ
ンプ11の前方に配置される投影用レンズ13と、ラン
プ11および投影用レンズ13間に介在し、光の透過率
がある1方向に正弦波状に変化する縞状の濃淡パターン
H1が形成されたパターン板14と、このパターン板1
4を上記正弦波の1周期より短い間隔で正確に移動させ
るパターンシフト部15とにより構成されている。この
構成の場合、ランプ11の光が凹面鏡12により面状光
となってパターン板14を通過して、縞状で縞の並設方
向に沿って明度が正弦波状に変化するパターンの像が投
影用レンズ13を通して対象物10の表面上に投影され
ることになり、また、図2のステップS2の処理とし
て、パターンシフト部15により、対象物10に投影さ
れた像の明度の位相がシフトすることになる。ここに、
対象物10に投影された像はその対象物10の表面の3
次元形状に応じた像H2に変化する。
The projection apparatus 1 includes a lamp 11, a concave mirror 12 for reflecting light from the lamp 11 in one direction, a projection lens 13 disposed in front of the lamp 11, a lamp 11 and a projection lens. 13, a pattern plate 14 on which a stripe-shaped light and shade pattern H1 which changes in a sinusoidal manner in one direction with a light transmittance is formed.
4 and a pattern shift unit 15 for accurately moving the sine wave at an interval shorter than one cycle of the sine wave. In the case of this configuration, the light of the lamp 11 becomes planar light by the concave mirror 12, passes through the pattern plate 14, and projects an image of a pattern in which the brightness changes sinusoidally along the direction in which the stripes are arranged. 2 is projected onto the surface of the object 10 through the lens 13, and as a process of step S <b> 2 in FIG. 2, the phase of the brightness of the image projected on the object 10 is shifted by the pattern shift unit 15. Will be. here,
The image projected on the object 10 is 3
The image changes to an image H2 according to the dimensional shape.

【0032】なお、パターン板14に透光型液晶パネル
を使用して、パターンシフト部15を廃止する構成でも
よい。この構成の場合、機械的可動部のない装置構成が
可能となるほか、対象物10に投影される像の明度の位
相を簡単、正確にシフトすることが可能になる。また、
上記投影方法は一例であり、この他にも白黒格子パター
ンをレンズによりぼかして投影する方法やレーザーの干
渉を利用する方法、モアレトポグラフィにより縞を生成
する方法により置換しても構わない。
It should be noted that a transmissive liquid crystal panel may be used for the pattern plate 14 and the pattern shift section 15 may be omitted. In the case of this configuration, an apparatus configuration having no mechanical movable part can be realized, and the phase of the brightness of the image projected on the object 10 can be simply and accurately shifted. Also,
The above-described projection method is an example, and may be replaced by a method of projecting a black and white grid pattern by blurring the lens with a lens, a method of using laser interference, or a method of generating fringes by moire topography.

【0033】カメラ2は、受光レンズおよびCCDなど
により構成され、濃淡パターンH1のシフト毎に、対象
物10の表面上の像H2を投影装置1の光軸とは異なる
方向から撮影するものであり、図1(a)の例では、対
象物10の上面を撮影するように設置されている。量子
化回路3は、カメラ2の撮影で得られた信号を量子化し
て、像H2に対応する縞画像H3を得るものである。記
憶装置4は、例えばRAMなどの半導体記憶素子または
ハードディスクなどのディスク装置などにより構成さ
れ、量子化回路3の量子化で得られた縞画像H3を複数
フレーム分記憶するものである。なお、本実施形態で
は、カメラ2と量子化回路3で撮像装置を構成してい
る。
The camera 2 is constituted by a light receiving lens, a CCD, and the like, and captures an image H2 on the surface of the object 10 from a direction different from the optical axis of the projection device 1 every time the grayscale pattern H1 shifts. In the example of FIG. 1A, the camera is installed so as to photograph the upper surface of the object 10. The quantization circuit 3 quantizes a signal obtained by photographing with the camera 2 to obtain a fringe image H3 corresponding to the image H2. The storage device 4 includes, for example, a semiconductor storage element such as a RAM or a disk device such as a hard disk, and stores a plurality of frames of the stripe image H3 obtained by the quantization of the quantization circuit 3. In this embodiment, the camera 2 and the quantization circuit 3 constitute an imaging device.

【0034】ここで、カメラ2による撮影の手順を説明
すると、まず、撮影で得られる縞画像に対する画像番号
が1に初期化される(図2のS1)。この後、濃淡パタ
ーンH1のシフトが行われ(S2)、続いてカメラ2の
撮影および量子化回路3の量子化により縞画像H3が取
り込まれる(S3)。この後、縞画像H3の取り込みが
完了すると(S4でYes)、画像番号が1増分され
(S5)、画像番号と所定数N(3以上)とが比較され
る(S6)。このとき、画像番号がNより大きければ
(S6でYes)、取り込まれた縞画像H3が記憶装置
4に転送されて記憶され(S7)、そうでなければ(S
6でNo)、ステップS2に戻る。なお、以下、投影さ
れたパターン自体の光量を「強度」、撮影された縞画像
H3における任意の座標点の画素値を「明度」という。
Here, the procedure of photographing by the camera 2 will be described. First, an image number for a striped image obtained by photographing is initialized to 1 (S1 in FIG. 2). Thereafter, the light and shade pattern H1 is shifted (S2), and subsequently, the stripe image H3 is captured by photographing of the camera 2 and quantization of the quantization circuit 3 (S3). Thereafter, when the capture of the stripe image H3 is completed (Yes in S4), the image number is incremented by 1 (S5), and the image number is compared with a predetermined number N (3 or more) (S6). At this time, if the image number is larger than N (Yes in S6), the captured stripe image H3 is transferred to the storage device 4 and stored (S7), otherwise (S7).
No at 6), and the process returns to step S2. Hereinafter, the light amount of the projected pattern itself is referred to as “intensity”, and the pixel value of an arbitrary coordinate point in the captured stripe image H3 is referred to as “brightness”.

【0035】図1に戻って、画像処理装置5は、CPU
およびメモリなどにより構成され、記憶装置4に記憶さ
れた画像から、この画像の複数の画素にそれぞれ対応す
る複数の画素を有し、これら複数の画素のうち、上記明
度の1周期の一部に属する画素に対応する画素には第1
値が割り当てられ、明度の1周期の残部に属する画素に
対応する画素には第2値が割り当てられ、明度の位相の
シフトで明度が変化しない画素に対応する画素には第3
値が割り当てられてなる領域分類用画像を作成する領域
分類用画像作成機能51と、領域分類用画像を用いて第
1〜第3値の画素の各々が連続する領域の分類を行い、
この分類結果に基づいて、第1値の画素が連続する第1
領域および第2値の画素が連続する第2領域のうち、縞
の並設方向に沿って互いに隣接する第1領域および第2
領域の組分けをし、この組分け結果を利用して位相連結
の処理を行い、この処理結果に応じて対象物の3次元形
状の高さ情報を抽出する高さ情報抽出機能52とを有
し、より具体的には、図2のステップS8〜S11の画
像処理を含む各種処理を実行するものである。例えば、
記憶装置4に記憶された複数の縞画像H3から位相復元
画像を作成する処理が実行される(S8)。この位相復
元画像は、複数の縞画像H3の各画素のうち、同一の位
置にある各画素の明度を所定の演算式に代入して算出さ
れた位相値がその位置に対応する画素の値として画素毎
に割り当てられてなる。また、位相復元画像の複数の画
素にそれぞれ対応する複数の画素を有する領域分類用画
像を生成する処理が実行される(S9)。この領域分類
用画像は、上記明度の位相のシフトで明度が変化する画
素の位置に対応するとともに位相復元画像内の対応する
画素の値が所定しきい値より小さい画素に、第1値が割
り当てられ、明度の位相のシフトで明度が変化する画素
の位置に対応するとともに位相復元画像内の対応する画
素の値が所定しきい値より大きい画素に、第2値が割り
当てられ、明度の位相のシフトで明度が変化しない画素
の位置に対応する画素に、第3値が割り当てられてな
る。さらに、領域分類用画像を用いて第1〜第3値の画
素の各々が連続する領域(連結領域)の分類を行い、こ
の分類結果に基づいて、第1値の画素が連続する第1値
の連結領域(第1領域ともいう)および第2値の画素が
連続する第2値の連結領域(第2領域ともいう)のう
ち、縞の並設方向に沿って互いに隣接する第1領域およ
び第2領域の組分けをし、この組分け結果を利用して位
相連結の処理を行い、この処理結果に応じて対象物10
の3次元形状の高さ情報を抽出する処理が実行される
(S10,S11)。
Returning to FIG. 1, the image processing device 5 includes a CPU
And a plurality of pixels corresponding to a plurality of pixels of the image from the image stored in the storage device 4. Of the plurality of pixels, a part of one cycle of the lightness is included. The pixel corresponding to the pixel to which the
A second value is assigned to a pixel corresponding to a pixel belonging to the remainder of one cycle of brightness, and a third value is assigned to a pixel corresponding to a pixel whose brightness does not change due to a shift in brightness phase.
A region classification image generation function 51 for generating a region classification image to which values are assigned, and classifying a region where each of the first to third value pixels is continuous using the region classification image,
Based on this classification result, the first pixel in which
The first region and the second region, which are adjacent to each other along the direction in which the stripes are arranged, of the region and the second region in which the pixels having the second value
A height information extraction function 52 is provided for classifying the regions, performing phase connection processing using the grouping results, and extracting height information of the three-dimensional shape of the object according to the processing results. More specifically, various processes including the image processing of steps S8 to S11 in FIG. 2 are executed. For example,
A process of creating a phase restored image from the plurality of stripe images H3 stored in the storage device 4 is executed (S8). This phase restoration image is obtained by substituting the brightness of each pixel at the same position among the pixels of the plurality of stripe images H3 into a predetermined arithmetic expression as a value of a pixel corresponding to the position. It is assigned for each pixel. Further, a process of generating an area classification image having a plurality of pixels respectively corresponding to the plurality of pixels of the phase restoration image is executed (S9). In the area classification image, a first value is assigned to a pixel corresponding to a position of a pixel whose brightness changes due to the shift of the brightness phase and a value of a corresponding pixel in the phase restoration image being smaller than a predetermined threshold value. The second value is assigned to the pixel corresponding to the position of the pixel where the brightness changes due to the shift of the brightness phase and the value of the corresponding pixel in the phase restored image is larger than a predetermined threshold value, and the brightness phase is shifted. A third value is assigned to a pixel corresponding to a position of a pixel whose brightness does not change due to the shift. Further, a region (connected region) in which each of the first to third value pixels is continuous is classified using the region classification image, and a first value in which the first value pixel is continuous is determined based on the classification result. Of the connected region (also referred to as the first region) and the connected region of the second value (also referred to as the second region) in which the pixels of the second value are continuous, The second area is grouped, a phase connection process is performed using the grouping result, and the object 10 is set in accordance with the processing result.
The process of extracting the height information of the three-dimensional shape is performed (S10, S11).

【0036】次に、画像処理装置5により実行される各
種処理などについて、図面をさらに順次使用しながら詳
述する。
Next, various processes executed by the image processing apparatus 5 will be described in detail with reference to the drawings.

【0037】図3に位相復元の原理説明図を示す。図2
のステップS8に進むと、記憶装置4に記憶された複数
の縞画像H3に対して同一座標点における明度変化を演
算することにより、投影されたパターンの位相を推定す
る処理が行われる。例えば、図2のステップS1からS
7において、周期の1/4(π/2)づつ位相をシフト
しながら4回撮影が行われたとすると、図3に示すよう
に、同一座標点(x, y)における明度がI0(x, y)→I1(x,
y)→I2(x, y)→I3(x, y)と変化した場合、その位置にお
ける位相値α(x, y)が次の演算式で導出される。
FIG. 3 is a diagram for explaining the principle of the phase restoration. FIG.
In step S8, a process of estimating the phase of the projected pattern is performed by calculating the brightness change at the same coordinate point for the plurality of stripe images H3 stored in the storage device 4. For example, steps S1 to S1 in FIG.
In FIG. 7, assuming that the image was captured four times while shifting the phase by 1/4 (π / 2) of the cycle, as shown in FIG. 3, the brightness at the same coordinate point (x, y) is I0 (x, y). y) → I1 (x,
When y) → I2 (x, y) → I3 (x, y), the phase value α (x, y) at that position is derived by the following equation.

【0038】[0038]

【数1】 (Equation 1)

【0039】この位相値αを全ての点(x, y)について求
めて、位相値が等しくなる点を結ぶと、いわゆる光切断
法における光切断線に相当し、対象物10の断面形状を
反映する等位相線ができる。そして、投影装置1および
カメラ2の位置関係、各種光学的パラメータは既知であ
るので、これらのパラメータと等位相線の形状から、光
切断法と同様に対象物10の3次元形状の高さ情報が得
られる。このように、撮影された縞画像の全ての画素に
ついて位相を求めると、光切断法で光切断線をそれと略
直交する方向に極めて密な間隔で走査してエリア的な距
離惰報を得る場合と同様の計測を簡単かつ高速に行え
る。
When the phase value α is obtained for all points (x, y) and the points where the phase values are equal are connected, this corresponds to a so-called light-section line in the light-section method and reflects the cross-sectional shape of the object 10. Is formed. Then, since the positional relationship between the projection device 1 and the camera 2 and various optical parameters are known, the height information of the three-dimensional shape of the object 10 is obtained from these parameters and the shape of the equiphase lines in the same manner as in the light section method. Is obtained. As described above, when the phases are obtained for all the pixels of the captured fringe image, when the light-section method is used to scan the light-section line at a very close interval in a direction substantially orthogonal to the light-section line to obtain area-based distance information. The same measurement can be performed easily and at high speed.

【0040】図4は対象物の斜視図、図5は対象物の上
面図および断面図、図6は対象物の撮影で得られる縞画
像およびこの縞画像のある直線上に沿った明度変化の例
を示す図、図7は位相シフトで得られる各縞画像および
各縞画像のある直線上に沿った明度変化の例を示す図、
図8は位相復元画像およびこの位相復元画像のある直線
上に沿った位相値変化の例を示す図、図9は位相連結処
理の説明図である。
FIG. 4 is a perspective view of the object, FIG. 5 is a top view and a sectional view of the object, and FIG. 6 is a stripe image obtained by photographing the object and a change in brightness along a straight line of the stripe image. FIG. 7 is a diagram showing an example, FIG. 7 is a diagram showing an example of each stripe image obtained by phase shift and an example of a brightness change along a certain straight line of each stripe image,
FIG. 8 is a diagram showing an example of a phase restored image and a phase value change along a straight line of the phase restored image, and FIG. 9 is an explanatory diagram of a phase connection process.

【0041】図4,図5に示すように、対象物10が急
な段差を伴う突部10Aと穴(図では貫通孔)10Bと
を有する場合、上記数1の演算式を用いただけの3次元
形状計測方法では、対象物10の3次元形状を正確に計
測することができない。図5の例では、投影装置1の投
影光軸がある傾斜角度を有しているので、突部10Aの
影ができてその影の範囲Aには投影パターンが投影され
ない。また、穴10Bに対応する範囲Bにも投影パター
ンが投影されない。このため、カメラ2の撮影で得られ
る縞画像H3は、図6に示すように、範囲A,Bに対応
する領域AH3,BH3の明度IAH3 ,IBH3 は、投影パタ
ーンの影響を受けず周囲光によって照明されただけの明
度となる。従って、図2のステップS2で位相シフトを
行ったとしても、領域AH3,BH3の明度が図7に示すよ
うに変化しなくなる部分が生じるから、上記演算式だけ
では、図8に示すように、位相復元画像H4における範
囲A,Bに対応する領域AH4,BH4の位相値αAH4 ,α
BH4 が欠落して正確な位相値を計測することができなく
なる。
As shown in FIGS. 4 and 5, when the object 10 has a projection 10A having a steep step and a hole (through hole in the figure) 10B, the above equation 1 is used. The three-dimensional shape measurement method cannot accurately measure the three-dimensional shape of the target object 10. In the example of FIG. 5, since the projection optical axis of the projection device 1 has a certain inclination angle, a shadow of the projection 10A is formed, and the projection pattern is not projected on the range A of the shadow. Also, the projection pattern is not projected on the range B corresponding to the hole 10B. For this reason, as shown in FIG. 6, the brightness I AH3 and I BH3 of the areas A H3 and B H3 corresponding to the ranges A and B are affected by the projection pattern. The brightness is just illuminated by ambient light. Therefore, even if the phase shift is performed in step S2 in FIG. 2, there is a portion where the brightness of the regions A H3 and B H3 does not change as shown in FIG. 7, so that only the above arithmetic expression is used as shown in FIG. The phase values α AH4 , α of the areas A H4 , B H4 corresponding to the ranges A, B in the phase restored image H4
BH4 is missing, making it impossible to measure an accurate phase value.

【0042】他方、上述の等位相線から3次元形状の高
さ情報を求める場合、数1が逆正接関数であるため、と
り得る位相値が−πからπまでの範囲内になることか
ら、図9に示すように、画像の端を基準とした位相値
(絶対位相値)α’を求めるためには、縞次数n(n=
0,1,2,…)の縞に対してそれぞれn×2πだけ位
相値を加算する必要がある。しかしながら、図8に示し
たように、位相値の情報が欠落して正確な位相値を計測
することができなければ、図2のステップS10の位相
連結処理を実行するすることができなくなって、絶対位
相値α’を求めることができなくなる。すなわち、最も
単純な位相境界検出の処理は、位相値がπから−πに変
化する部分を検出する処理になるが、この処理では、図
8に示すように、領域AH4,BH4の位相値αAH4 ,α
BH4 を求めることができないため、その領域内に位相の
境界があった場合、これを検出できない。例えば、図5
の範囲A内に位相の境界がくると、真上からの撮影で縞
画像を得た場合、πから−πに変化する部分が隠されて
しまい、位相境界の検出ができないことになる。この結
果、対象物10の3次元形状を正確に計測することがで
きなくなるのである。
On the other hand, when the height information of the three-dimensional shape is obtained from the above-mentioned isophase line, the possible phase value is in the range from -π to π since Equation 1 is an arctangent function. As shown in FIG. 9, in order to obtain the phase value (absolute phase value) α ′ based on the edge of the image, the fringe order n (n =
0, 1, 2,...), It is necessary to add a phase value by n × 2π. However, as shown in FIG. 8, if the phase value information is missing and an accurate phase value cannot be measured, the phase concatenation process of step S10 in FIG. 2 cannot be performed, and The absolute phase value α ′ cannot be obtained. That is, the simplest phase boundary detection process is a process of detecting a portion where the phase value changes from π to −π. In this process, as shown in FIG. 8, the phase A of the areas A H4 and B H4 is detected. Value α AH4 , α
Since BH4 cannot be obtained, if there is a phase boundary in that area, it cannot be detected. For example, FIG.
When the phase boundary comes within the range A, when a fringe image is obtained by photographing from directly above, the portion that changes from π to −π is hidden, and the phase boundary cannot be detected. As a result, the three-dimensional shape of the object 10 cannot be measured accurately.

【0043】そこで、第1実施形態では、図4,5に示
したように、突部10Aおよび穴10Bで局所的に位相
境界が隠蔽されている場合の位相連結問題を解決する手
段として、より広い範囲の情報を利用するために、各位
相値を第1値および第2値に二値化し、それぞれの値が
連続する領域(範囲)の組合せをもって1周期分と見な
す方法を用いて、1周期ごとに分割された復元位相値の
周期の境界を検出し、正しい絶対位相値を求める。
Therefore, in the first embodiment, as shown in FIGS. 4 and 5, as a means for solving the phase connection problem when the phase boundary is locally hidden by the protrusion 10A and the hole 10B, In order to utilize a wide range of information, each phase value is binarized into a first value and a second value, and a method is used in which a combination of regions (ranges) in which the respective values are continuous is regarded as one cycle. The boundary of the period of the restored phase value divided for each period is detected, and a correct absolute phase value is obtained.

【0044】図10は領域分類用画像およびこの領域分
類用画像のある直線上に沿った明度変化の例を示す図で
ある。図10では、しきい値を位相値0に設定して、位
相値が0より小さい第1値(黒)と位相値が0より大き
い第2値(白)とに2値化することで、領域分類用画像
H5が作成されている。このように、位相復元画像H4
の複数の画素にそれぞれ対応する複数の画素を有する画
像を用意し、これら複数の画素のうち、位相シフトで明
度が変化する画素の位置に対応するとともに位相復元画
像H4内の対応する画素の位相値がしきい値0より小さ
い画素に、第1値を割り当て、位相シフトで明度が変化
する画素の位置に対応するとともに位相復元画像H4内
の対応する画素の位相値がしきい値0より大きい画素
に、第1値を割り当てて、領域分類用画像H5を作成す
れば、第1領域および第2領域が互いに隣接するとき、
それら第1領域および第2領域の組みを投影パターンの
1位相として取り扱うことができる。従って、互いに隣
接する第1領域および第2領域を1位相とすればよいの
で、位相変化方向(図10では左右方向)に画素値を調
べ、画素値が第2値から第1値に変化する位置を位相境
界とする処理が最も単純な位相境界検出の処理となる。
FIG. 10 is a diagram showing an example of an area classification image and a change in brightness along a straight line of the area classification image. In FIG. 10, the threshold value is set to a phase value of 0, and is binarized into a first value (black) having a phase value smaller than 0 and a second value (white) having a phase value larger than 0, An area classification image H5 has been created. Thus, the phase restoration image H4
An image having a plurality of pixels respectively corresponding to the plurality of pixels is prepared, and among the plurality of pixels, the image corresponding to the position of the pixel whose brightness changes due to the phase shift and the phase of the corresponding pixel in the phase restored image H4 A first value is assigned to a pixel whose value is smaller than the threshold value 0, and the phase value of the corresponding pixel in the phase restored image H4 is larger than the threshold value 0 while corresponding to the position of the pixel whose brightness changes due to the phase shift. If the first value is assigned to the pixel and the area classification image H5 is created, when the first area and the second area are adjacent to each other,
A set of the first area and the second area can be handled as one phase of the projection pattern. Therefore, since the first region and the second region adjacent to each other may be set to one phase, the pixel value is examined in the phase change direction (the horizontal direction in FIG. 10), and the pixel value changes from the second value to the first value. The process of setting the position as the phase boundary is the simplest phase boundary detection process.

【0045】そして、上記位相連結問題を解決すべく、
領域分類用画像H5において、位相シフトで明度が変化
しない画素(図8では領域AH4,BH4の画素)の位置に
対応する画素には、第3値が割り当てられる。図10の
例では、領域AH4,BH4に対応し、第3値が割り当てら
れる領域AH5,BH5の位相値αAH5 ,αBH5 は、0にな
っている。第1実施形態では、このようにして作成され
た領域分類用画像H5を用いて、位相境界検出の処理が
実行される。
Then, in order to solve the above phase connection problem,
In the region classification image H5, a third value is assigned to a pixel corresponding to the position of a pixel whose brightness does not change due to the phase shift (the pixels of the regions A H4 and B H4 in FIG. 8). In the example of FIG. 10, corresponding to the region A H4, B H4, phase values alpha AH5 of the region 3 value is assigned A H5, B H5, α BH5 has become zero. In the first embodiment, the phase boundary detection processing is executed using the region classification image H5 created in this manner.

【0046】図11にこの位相境界検出の具体的な処理
手順を示すフローチャートを示す。図11において、ま
ず、上記の3値化によって、ステップS901の「3値
画像生成」の処理を実行する。
FIG. 11 is a flowchart showing a specific processing procedure of the phase boundary detection. In FIG. 11, first, the “ternary image generation” process of step S901 is performed by the above-described ternarization.

【0047】なお、第1実施形態では、上記しきい値を
用いて、3値画像としての領域分類用画像H5が生成さ
れるが、これに限らず、図2のステップS1〜S7で得
た複数の縞画像の各画素のうち、同一の位置にある各画
素の明度を上記数1の演算式に代入して算出された位相
値をその位置に対応する画素の値として画素毎に割り当
てられてなる位相復元画像H4を、ステップS7で取り
込んだ画像のうち、一の画像を初期位相用とした場合と
取り込んだ画像をサイクリックに上記Nより小さい整数
回分ずらして他の画像を初期位相用とした場合とでそれ
ぞれ作成し、上記両位相復元画像内の対応する両画素の
値の差分値が正であれば第1値が、負であれば第2値
が、そして明度が変化しなければ第3値が各画素に割り
当てられてなる領域分類用画像H5を生成するようにし
てもよい。つまり、初期位相をずらせて復元した2つの
位相値を差分することにより同様のパターンを得ること
ができるのである。
In the first embodiment, the area classification image H5 as a ternary image is generated using the above threshold value. However, the present invention is not limited to this, and is obtained in steps S1 to S7 in FIG. A phase value calculated by substituting the brightness of each pixel at the same position among the pixels of the plurality of fringe images into the arithmetic expression of Equation 1 above is assigned to each pixel as a value of a pixel corresponding to that position. Out of the phase-recovered image H4 obtained in step S7, one image is used for the initial phase, and the captured image is cyclically shifted by an integer smaller than N to obtain another image for the initial phase. And the first value if the difference between the values of the corresponding two pixels in the two phase restored images is positive, the second value if the difference is negative, and the brightness must change. For example, the area where the third value is assigned to each pixel It may be generated a class image for H5. That is, a similar pattern can be obtained by subtracting the two phase values restored by shifting the initial phase.

【0048】図12にこの領域分類用画像の生成方法の
説明図を示す。まず、投影パターンを1→2→3→4と
変化させて、図7(a)〜(d)に示すような4枚の縞
画像H3を取り込み、これら縞画像H3の各画素(x, y)
における明度を、数1の演算式のI0(x, y)→I1(x, y)→
I2(x, y)→I3(x, y)として代入して位相復元を行い、図
12(a)に示すような位相復元画像を生成する。続い
て、4枚の縞画像H3をサイクリックにずらして別の配
列順序の縞画像列を得る。図7の例の各縞画像H3は、
投影パターンの位相をπ/2づつシフトしつつ撮影され
たものであるので、図7の(c),(d),(a),
(b)の配列順序になるように、4枚の縞画像H3をサ
イクリックにずらせば、図7の(c),(d)から、さ
らに位相シフトしながら2回撮影を行った場合と同様の
配列順序になる縞画像を得ることができ、この場合、初
期位相はπだけずれることになる。これにより、投影お
よび撮影回数を増やすことなく、図12(b)に示すよ
うに、初期位相が1/2周期だけずれた別の位相復元画
像を生成することができる。
FIG. 12 is an explanatory diagram of a method for generating the area classification image. First, the projected pattern is changed from 1 → 2 → 3 → 4, and four stripe images H3 as shown in FIGS. 7A to 7D are taken in. Each pixel (x, y) of these stripe images H3 )
The lightness at is calculated by the following equation: I0 (x, y) → I1 (x, y) →
Phase restoration is performed by substituting as I2 (x, y) → I3 (x, y) to generate a phase restored image as shown in FIG. Subsequently, the four stripe images H3 are cyclically shifted to obtain a stripe image sequence in another arrangement order. Each stripe image H3 in the example of FIG.
Since the images were shot while shifting the phase of the projection pattern by π / 2 at a time, (c), (d), (a), and (c) of FIG.
If the four striped images H3 are cyclically shifted so as to have the arrangement order of (b), it is the same as the case where the image is captured twice with further phase shift from (c) and (d) of FIG. Can be obtained, and in this case, the initial phase is shifted by π. Thus, as shown in FIG. 12B, another phase restored image whose initial phase is shifted by 周期 cycle can be generated without increasing the number of times of projection and imaging.

【0049】そして、上記両位相復元画像内の対応する
両画素の値の差分値が正であれば第1値を負であれば第
2値を0であれば第3値を割り当てれば、図12(c)
に示すように、領域分類用画像H5を生成することがで
きる。このとき、突部10Aおよび穴10Bで位相を復
元できないため、第3値として任意の定数(図12でも
0)が代入される。ここで、対象物10の表面の凹凸に
伴う縞形状の変形は、図12(a),(b)のように初
期位相値を変化させても同じであるので、図12(b)
のパターンから図12(a)のパターンを減算した差分
画像は、図12(c)のように、図12(a)における
位相値が−π〜0の範囲では−π、0〜πの範囲ではπ
となる。また、第3値の部分には定数が代入されている
ため差分値は0となる。よって、この差分画像において
画素値πを第1値、画素値−πを第2値、画素値0を第
3値とすることにより、簡単に3値画像(領域分類用画
像H5)を生成することができる。
Then, if the difference between the values of the two corresponding pixels in the two-phase restored image is positive, the first value is negative, the second value is 0, and the third value is assigned. FIG. 12 (c)
As shown in (5), the area classification image H5 can be generated. At this time, since the phase cannot be restored by the protrusion 10A and the hole 10B, an arbitrary constant (0 in FIG. 12) is substituted as the third value. Here, the deformation of the stripe shape due to the unevenness of the surface of the object 10 is the same even when the initial phase value is changed as shown in FIGS.
The difference image obtained by subtracting the pattern of FIG. 12A from the pattern of FIG. 12A has a range of -π and 0 to π when the phase value in FIG. Then π
Becomes Further, since a constant is substituted for the third value part, the difference value is 0. Therefore, in this difference image, the pixel value π is set to the first value, the pixel value −π is set to the second value, and the pixel value 0 is set to the third value, thereby easily generating a ternary image (image H5 for area classification). be able to.

【0050】また、例えば領域分類用画像を生成する処
理をハードウエアで行う等メモリ使用をなるべく控えた
い場合には、取り込んだ複数の縞画像の各画素のうち、
同一の位置にある各画素の明度を所定の演算式に代入し
て位相値を算出する処理を、取り込んだ画像のうち、一
の画像を初期位相用とした場合と他の画像を初期位相用
とした場合とで平行に実行しながら、一の画像を初期位
相用とした場合の位相値と他の画像を初期位相用とした
場合の位相値との差分値を求め、この差分値が正であれ
ば第1値を負であれば第2値をそして明度が変化しなけ
れば第3値を割り当てて領域分類用画像を作成するよう
にしてもよい。この第3値については、例えば、位相復
元の際、明度の変化が小さい場合にこれらの位相値に同
じ定数を代入するようにして差分値が0となる場合に第
3値を割り当てればよい。つまり、各画素ごとに初期位
相をずらせて第1と第2の位相を復元し、その差分値の
正負を判断して直接3値画像を生成するようにすれば、
中間段階として位相復元画像を作成してしきい値処理を
行う必要がないから、メモリの使用量を少なくすること
ができる。
When it is desired to use a memory as little as possible, for example, by performing processing for generating an area classification image by hardware, among the pixels of the plurality of captured stripe images,
The process of calculating the phase value by substituting the brightness of each pixel at the same position into a predetermined arithmetic expression is performed when one of the captured images is used for the initial phase and another image is used for the initial phase. While executing in parallel, the difference between the phase value when one image is used for the initial phase and the phase value when the other image is used for the initial phase is determined. In this case, the first value may be assigned a negative value if the value is negative, and the third value may be assigned if the brightness does not change, to create an area classification image. For the third value, for example, at the time of phase restoration, the same constant may be substituted for these phase values when the change in brightness is small, and the third value may be assigned when the difference value becomes 0. . In other words, if the initial phase is shifted for each pixel to restore the first and second phases, the sign of the difference is determined, and a ternary image is generated directly.
Since there is no need to create a phase-recovered image and perform threshold processing as an intermediate stage, the amount of memory used can be reduced.

【0051】図13は領域分類用画像を利用した各連結
領域の分類処理の説明図、図14は小領域の大領域への
併合処理(前処理)の説明図、図15は第1領域および
第2領域の組分け処理の説明図である。ただし、以下で
は、図13の領域分類用画像の左方の縞から右方の縞に
かけて走査しながら、図11のフローチャートの各手順
を説明する。
FIG. 13 is an explanatory diagram of a classification process of each connected region using the region classification image, FIG. 14 is an explanatory diagram of a process of merging a small region into a large region (pre-processing), and FIG. It is explanatory drawing of the grouping process of a 2nd area | region. However, hereinafter, each procedure of the flowchart of FIG. 11 will be described while scanning from the left stripe to the right stripe of the area classification image of FIG. 13.

【0052】図11のステップS901の後、図13
(a)の領域分類用画像H5から、第1領域(N0,N
1,…)および第2領域(P0,P1,…)を求める
(S902,S903)。このとき、図14(a)に示
すように、所定画素数以下の面積の小さい領域が多数あ
ると、第1領域および第2領域の数が多くなり、処理が
煩雑となるため、膨張および収縮処理などで面積の小さ
い領域をその周囲の面積の大きい領域に併合する処理を
かけ、図14(b)に示すように面積の大きい領域のみ
を残した画像を予め生成しておくのが望ましい。
After step S901 in FIG. 11, FIG.
From the area classification image H5 of (a), the first area (N0, N
..) And the second area (P0, P1,...) Are obtained (S902, S903). At this time, as shown in FIG. 14A, if there are a large number of regions having a small area equal to or less than the predetermined number of pixels, the number of the first region and the second region increases, and the processing becomes complicated. It is desirable to apply a process of merging the small area with the surrounding large area by processing or the like, and to generate an image in which only the large area is left as shown in FIG.

【0053】続いて、図13(b)の各第1領域の始点
位置(Sn0,Sn1,…)および終点位置(En0,
En1,…)を検出するとともに、図13(c)の各第
2領域の始点位置(Sp0,Sp1,…)および終点位
置(Ep0,Ep1,…)を検出する(S904)。こ
れら始点位置および終点位置の関係をもとに、互いに隣
接する第1領域および第2領域の組みを検出する(図1
1のS906)。この後、位相番号iが0に初期化され
る(S904)。 (1)第1領域N0〜N2および第2領域P0〜P2に
対する処理 第1領域N0の終点位置En0および第2領域P0の始
点位置Sp0と、第1領域N1の終点位置En1および
第2領域P1の始点位置Sp1と、第1領域N2の終点
位置En2および第2領域P2の始点位置Sp2は、い
ずれも交差することなく隣接していることから、それら
いずれの組みも突部10Aおよび穴10Bなどの影響を
受けていないとみなすことができるので、そのまま組と
して図15に示すように位相領域I0,I1,I2を生
成する。このような処理は、ステップS906,S90
7,S908,S909,S906のループ処理で実行
される。 (2)第1領域N3および第2領域P3に対する処理 第1領域N3の終点位置En3および第2領域P3の始
点位置Sp3は、一部で隣接し残部(第3値の連結領
域)で離間しているが、終点位置En3および始点位置
Sp3が交差していないので、そのまま組として図15
に示すように位相領域I3を生成する(S906,S9
07,S908,S909でNo)。 (3)図13の第1領域N4および第2領域P4,P5
に対する処理 1.第3値の連結領域(第3領域ともいう)が1位相よ
り短い場合 図16,図17に各連結領域の分類処理の説明図を示
し、図18に第1領域および第2領域の組分け処理の説
明図を示す。
Subsequently, the start point position (Sn0, Sn1,...) And end point position (En0,
.., And the start point position (Sp0, Sp1,...) And end point position (Ep0, Ep1,...) Of each second region in FIG. 13C are detected (S904). Based on the relationship between the start point position and the end point position, a set of a first area and a second area adjacent to each other is detected (FIG. 1).
1 (S906). Thereafter, the phase number i is initialized to 0 (S904). (1) Processing for First Area N0 to N2 and Second Area P0 to P2 End point En0 of first area N0 and start point Sp0 of second area P0, and end point En1 and second area P1 of first area N1 , The end point En2 of the first area N2 and the start point Sp2 of the second area P2 are adjacent to each other without intersecting each other. Therefore, any of these sets includes the protrusion 10A and the hole 10B. Therefore, the phase regions I0, I1, and I2 are generated as a set as shown in FIG. Such processing is performed in steps S906 and S90.
7, S908, S909, and S906. (2) Processing for First Area N3 and Second Area P3 The end point En3 of the first area N3 and the start point Sp3 of the second area P3 are partially adjacent to each other and separated from each other at the remaining portion (third value connection area). However, since the end point position En3 and the start point position Sp3 do not intersect with each other, FIG.
(S906, S9)
07, S908, and S909: No). (3) First region N4 and second regions P4, P5 in FIG.
Processing for 1. When Connected Region of Third Value (also referred to as Third Region) is Shorter than One Phase FIGS. 16 and 17 show explanatory views of the classification process of each connected region, and FIG. 18 shows the grouping of the first region and the second region. FIG. 4 shows an explanatory diagram of the processing.

【0054】図13において、第1領域N4と対になる
第2領域は、穴10Bの影響による第3領域が存在する
ため、P4,P5の2つの連結領域に分割されている。
位相シフトによる計測では、位相値は位相変化方向と直
交方向(縞に沿った方向)に連続している必要があるた
め、第2領域P4,P5のように2つの連結領域に分断
されていると、それを1つの連結領域に修復する必要が
ある。このため、ステップS902で、図16(a)に
示すように第3値を第1値とみなして拡張第1領域と
し、ステップS903で、図16(b)に示すように第
3値を第2値とみなして拡張第2領域とする。
In FIG. 13, the second region paired with the first region N4 is divided into two connection regions P4 and P5 since the third region is affected by the hole 10B.
In the measurement based on the phase shift, the phase value needs to be continuous in the direction orthogonal to the phase change direction (the direction along the stripes), and thus is divided into two connected regions like the second regions P4 and P5. And it needs to be repaired into one connected region. For this reason, in step S902, the third value is regarded as the first value as shown in FIG. 16A to form an extended first area, and in step S903, the third value is changed to the first value as shown in FIG. The extended second area is regarded as binary.

【0055】この場合、図13(b)の第1領域N4が
隣の第1領域N5と融合して、図16(a)に示すよう
に1つの拡張第1領域N4aになるが、図16の連結領
域の情報を併用することで、位相ごとに正しく分離する
ことができる(S911,S912)。
In this case, the first region N4 in FIG. 13B is fused with the adjacent first region N5 to form one extended first region N4a as shown in FIG. 16A. Can be correctly separated for each phase by using the information of the connected region (S911, S912).

【0056】図16において、拡張第1領域N4aの始
点位置Sn4aおよび終点位置En4aと拡張第2領域
P4aの始点位置Sp4aおよび終点位置Ep4aとを
比較すると、始点位置Sp4aおよび終点位置Ep4a
がともに始点位置Sn4aおよび終点位置En4a間に
入っていることがわかる。このことから、図13(b)
の第1領域N4が第3領域により2位相分に渡って繋が
っていると推定できる。この場合、図17に示すよう
に、拡張第2領域P4aの終点位置Ep4aの位置でN
4aをN4bとN5に分割して、新しく生成された第1
領域N4bの終点En4bを検出すれば(S911)、
第1領域N4bの終点位置En4bが図17に示す第2
領域P4aの始点位置Sp4aと一部で離間しているが
交差していないので、上記(2)の場合と同様、第1領
域N4bおよび第2領域P4aを組みとし、図18に示
す位相領域I4を生成する(S912)。
In FIG. 16, when the start point position Sn4a and end point position En4a of the extended first area N4a are compared with the start point position Sp4a and end point position Ep4a of the extended second area P4a, the start point position Sp4a and the end point position Ep4a are compared.
Are located between the start point position Sn4a and the end point position En4a. From this, FIG.
It can be estimated that the first region N4 is connected by the third region over two phases. In this case, as shown in FIG. 17, at the position of the end point Ep4a of the extended second area P4a, N
4a is divided into N4b and N5, and the newly generated first
If the end point En4b of the area N4b is detected (S911),
The end point position En4b of the first region N4b is the second position shown in FIG.
Since the start point position Sp4a of the region P4a is partially separated but does not intersect, the first region N4b and the second region P4a are combined as in the case of (2), and the phase region I4 shown in FIG. Is generated (S912).

【0057】2.第3値の連結領域が1位相以上に渡る
場合 図19,図20に各連結領域の分類処理の説明図を示
し、図21に第1領域および第2領域の組分け処理の説
明図を示す。この場合、ステップS913〜S917の
処理が実行される。
2. When Connected Region of Third Value Exceeds One Phase or More FIGS. 19 and 20 show explanatory diagrams of the classification process of each connected region, and FIG. 21 shows an explanatory diagram of the classification process of the first region and the second region. . In this case, the processing of steps S913 to S917 is performed.

【0058】図19において、拡張第1領域N4cの始
点位置Sn4cおよび終点位置En4cと拡張第2領域
P4cの始点位置Sp4cおよび終点位置Ep4cとを
比較すると、第2領域の始点位置Sp4cが第1領域の
終点位置En4cより左にあり、第2領域の終点位置E
p4cが第1領域の終点位置En4cより右にあること
から、拡張第1領域N4cおよび拡張第2領域P4cは
交差していることがわかる(S906,S910)。こ
のことから、拡張第1領域N4cおよび拡張第2領域P
4cは、第3値の連結領域により2位相分以上に渡って
繁がっていると推定できる。
In FIG. 19, when the start point position Sn4c and the end point position En4c of the extended first area N4c are compared with the start point position Sp4c and the end point position Ep4c of the extended second area P4c, the start point position Sp4c of the second area is the first area. Is located to the left of the end position En4c of the
Since p4c is on the right side of the end point position En4c of the first area, it can be seen that the first extended area N4c and the second extended area P4c intersect (S906, S910). From this, the extended first area N4c and the extended second area P
4c can be estimated to be spread over two or more phases by the third value connection region.

【0059】そこで、拡張第2領域P4cについて、第
3値の連結領域を第2値と見なさずに再度連結領域を求
めると(S913)、図20(a)のように、第2領域
P4〜P6に分割される(S914)。このうちの第2
領域P6は位相変化方向と直行する方向に連続であるの
で、第2領域P4,P5が第3値の連結領域により分断
されていると判断できる。従って、図20(b),
(c)に示すように、第2領域P4,P5を仮に融合し
て連結領域P4dとし(S915)、この連結領域P4
dの終点位置Ep4dで、拡張第1領域N4cを拡張第
1領域N4d,N5に分割する(S916)。これによ
り、拡張第1領域N4dの終点位置がEn4dとなり、
拡張第1領域N4dの終点位置En4dが図20(a)
の第2領域P4,P5の始点位置Sp4,Sp5と隣接
するため、拡張第1領域N4dおよび第2領域P4dを
組とし、図21に示す位相領域I4を生成する(S91
7)。 (4)分割後の第1領域N5および第2領域N6に対す
る処理 1.第3値の連結領域が1位相より短い場合 図17(b)に示す分割後の第1領域N5の終点位置E
n5および図16(b)に示す第2領域P6の始点位置
Sp6は、交差することなく隣接しているから、上記
(1)と同様、そのまま組として図18に示すように位
相領域I5を生成する。
Therefore, regarding the extended second area P4c, if the connected area of the third value is determined again without regarding the connected area of the third value as the second value (S913), as shown in FIG. It is divided into P6 (S914). The second of these
Since the region P6 is continuous in the direction orthogonal to the phase change direction, it can be determined that the second regions P4 and P5 are separated by the third value connection region. Therefore, FIG.
As shown in (c), the second regions P4 and P5 are temporarily fused to form a connection region P4d (S915), and the connection region P4
The extended first area N4c is divided into extended first areas N4d and N5 at the end point position Ep4d of d (S916). Thereby, the end point position of the extended first area N4d becomes En4d,
FIG. 20A shows the end point position En4d of the extended first area N4d.
Since the first region N4d and the second region P4d are adjacent to the start point positions Sp4 and Sp5 of the second regions P4 and P5, the phase region I4 shown in FIG. 21 is generated (S91).
7). (4) Processing for divided first region N5 and second region N6 When the connected region of the third value is shorter than one phase: the end point position E of the divided first region N5 shown in FIG.
Since n5 and the start point position Sp6 of the second area P6 shown in FIG. 16B are adjacent to each other without intersecting, the phase area I5 is generated as a set as shown in FIG. I do.

【0060】2.第3値の連結領域が1位相以上に渡る
場合 図20(c)に示す分割後の拡張第1領域N5の終点位
置En5および図20(a),(b)に示す第2領域P
6の始点位置Sp6は、交差することなく隣接している
から、上記(1)と同様、そのまま組として図21に示
すように位相領域I5を生成する。
2. When the Connected Region of the Third Value Exceeds One Phase or More The End Point En5 of the Divided Extended First Region N5 shown in FIG. 20C and the Second Region P shown in FIGS. 20A and 20B
Since the start point Sp6 of No. 6 is adjacent without intersecting, the phase area I5 is generated as a set as shown in FIG.

【0061】図22は位相境界の検出結果の説明図、図
23は位相連結処理結果の説明図、図24は高さ情報の
例を示す図である。上記図11のフローにより図22に
示す位相境界の検出結果が得られる。この図22におい
て、各位相領域の終点位置Ei0〜Ei5が位相連結位
置となるので、図8に示す位相値に左から順に位相終点
位置ごとに2πを加算する処理を行うと、図23に示す
ような位相連結画像H6が得られる。そして、この位相
連結画像H6から図24に示すような高さ情報が得られ
る。このように、復元された位相値を二値化したパター
ンについて各々連結領域を求め、さらに位相復元が出来
ない影や穴に相当する第3値の連結領域との位置関係を
評価して位相境界を求めることにより、影や穴によって
位相境界が隠蔽されている場合にも正しい高さ情報が得
られるのである。
FIG. 22 is an explanatory diagram of a phase boundary detection result, FIG. 23 is an explanatory diagram of a phase concatenation process result, and FIG. 24 is a diagram illustrating an example of height information. The detection result of the phase boundary shown in FIG. 22 is obtained by the flow of FIG. In FIG. 22, since the end point positions Ei0 to Ei5 of each phase region are the phase connection positions, the process of adding 2π for each phase end point position from the left to the phase value shown in FIG. 8 is performed as shown in FIG. Such a phase-coupled image H6 is obtained. Then, height information as shown in FIG. 24 is obtained from the phase-coupled image H6. As described above, a connected region is obtained for each pattern obtained by binarizing the restored phase value, and the positional relationship between the connected region of the third value corresponding to a shadow or a hole for which phase recovery cannot be performed is evaluated. By obtaining, the correct height information can be obtained even when the phase boundary is concealed by a shadow or a hole.

【0062】以上、第1実施形態によれば、第3値の連
結領域の有無により第1値および第2値の連結領域の位
置関係がどのように変化するかを調べることができ、第
3値の連結領域の影響を除去して第1領域および第2領
域の組を抽出し、図22に示すように、位相境界を正し
く決定することができる。
As described above, according to the first embodiment, it is possible to examine how the positional relationship between the first value and the second value connected areas changes depending on the presence or absence of the third value connected area. The combination of the first region and the second region is extracted by removing the influence of the value connection region, and the phase boundary can be correctly determined as shown in FIG.

【0063】図25は図4の対象物よりも大きな突部を
有する対象物の斜視図、図26は図25の対象物の撮影
で得られる縞画像の例を示す図、図27は複数枚の縞画
像から復元された位相復元画像および領域分類用画像な
どを示す図であり、これらの図を用いて以下に本発明の
第2実施形態について説明する。
FIG. 25 is a perspective view of an object having a projection larger than that of FIG. 4, FIG. 26 is a view showing an example of a striped image obtained by photographing the object of FIG. 25, and FIG. FIG. 9 is a diagram showing a phase-recovered image, a region-classifying image, and the like, which are restored from the stripe image of FIG.

【0064】図25に示す対象物20の場合、位相シフ
トの撮影毎に縞画像H3が得られるのであるが、その縞
画像H3の画像内容は、図26に示すように図6のそれ
とは相違している。
In the case of the object 20 shown in FIG. 25, a stripe image H3 is obtained every time the phase shift is photographed, but the image content of the stripe image H3 is different from that of FIG. are doing.

【0065】図26の縞画像H3において、1位相分の
縞の組みG1,G2は、突部20Aの凸面によって左に
ずれた1位相分の縞の組みG3と対応する。そして、図
27のようにG1〜G3にそれぞれ対応する第1領域G
1n〜G3nおよび第2領域G1p〜G3pが連続しな
いため、第1実施形態では、突部20Aの影響を受けず
に上下方向に連続している連結領域(図27のG4p,
G5n)を検出し、これをもとに対応付けを行うことに
なる。しかしながら、突部20Aの影響を受けずに上下
方向に連続している連結領域を検出しても、図26のG
4とG5との間には3つの組みG6,G7,G1がある
のに対して、突部20Aの凸面には1組みしかないため
に、このままでは数が合わず、第1実施形態を適用する
ことができない。つまり、第1実施形態では、段差を有
する突部などによる位相のずれが2πを超えた場合に計
測が不可能となる。この数の不一致は、図26のG3の
左に隣接する縞が突部20Aの左側面に投影され、真上
から観測しているカメラ2からは死角になってしまうこ
とによる。したがって、これを画像処理により推定する
必要がある。
In the fringe image H3 of FIG. 26, the set of stripes G1 and G2 for one phase corresponds to the set of stripes G3 for one phase shifted to the left by the convex surface of the projection 20A. Then, as shown in FIG. 27, the first regions G corresponding to G1 to G3 respectively.
Since 1n to G3n and the second regions G1p to G3p are not continuous, in the first embodiment, the connection regions (G4p, G4p in FIG. 27) that are vertically continuous without being affected by the protrusion 20A.
G5n) is detected, and association is performed based on this. However, even if a connected region that is continuous in the vertical direction without being affected by the protrusion 20A is detected, G in FIG.
Although there are three sets G6, G7, G1 between 4 and G5, since there is only one set on the convex surface of the projection 20A, the numbers do not match as they are, and the first embodiment is applied. Can not do it. That is, in the first embodiment, measurement cannot be performed when the phase shift due to a stepped projection or the like exceeds 2π. This number mismatch is due to the fact that a stripe adjacent to the left of G3 in FIG. 26 is projected on the left side surface of the projection 20A and becomes a blind spot from the camera 2 observed from directly above. Therefore, it is necessary to estimate this by image processing.

【0066】第2実施形態では、突部20Aを予め抽出
しておき、突部20Aの影による第3値の連結領域の情
報をもとに、突部20Aに存在する第1値および第2値
の連結領域の位置ずれを推定して対応付けを行う。図2
7(b)の第3値の連結領域AH5が突部20Aの影であ
ると判断でき、かつ投影方向が既知である場合には、図
26の組みG3は、突部20Aにより図27(b)の連
結領域AH5の幅だけ左方に位置がずれていると考えるこ
とができるので、組みG1,G2と対応すると判断する
ことができる。
In the second embodiment, the protrusion 20A is extracted in advance, and the first value and the second value existing in the protrusion 20A are determined based on the information of the connection area of the third value due to the shadow of the protrusion 20A. The positional shift of the value connection area is estimated and associated. FIG.
If the third value connection area A H5 of FIG. 7B can be determined to be the shadow of the projection 20A and the projection direction is known, the set G3 of FIG. Since it can be considered that the position is shifted to the left by the width of the connection region A H5 in b), it can be determined that the positions correspond to the sets G1 and G2.

【0067】次に、事前に突部20Aにより縞がずれて
いる部分(以下、スライド領域という)を抽出する方法
について説明する。事前にスライド領域を抽出する理由
は、図27(b)の例に示す領域分類用画像H5におい
て、誤ってG3pの部分がその上下のG6pと一つの連
結領域を形成する(おそれがある)ために、G3pとこ
の上下のG6pとを分離して扱う必要があるからであ
る。
Next, a method of extracting a portion (hereinafter, referred to as a slide area) in which stripes are shifted by the protrusion 20A in advance will be described. The reason why the slide area is extracted in advance is that, in the area classification image H5 shown in the example of FIG. 27B, the G3p part erroneously forms one connected area with the G6p above and below it (there is a possibility). This is because it is necessary to treat G3p and G6p above and below G3p separately.

【0068】スライド領域の抽出においては、例えば電
子回路基板などで、突部としての段差を作る部品が既知
であって、それをパターンマッチング等により検出可能
な場合は予め既知の部品を検出しておけばよい。
In the extraction of the slide area, for example, a component that forms a step as a protrusion on an electronic circuit board or the like is known, and if it can be detected by pattern matching or the like, a known component is detected in advance. It is good.

【0069】また、段差を作る部品が未知の場合には、
領域分類用画像および位相復元画像のみを用いてスライ
ド領域(段差を作る突部の凸面領域)および影である第
3値の連結領域を検出することも可能であるので、次に
この方法について説明する。
If the part forming the step is unknown,
Since it is also possible to detect a slide area (a convex area of a projection forming a step) and a third value connected area which is a shadow using only the area classification image and the phase restoration image, this method will be described next. I do.

【0070】スライド領域を抽出するための第1の方法
として、投影方向を変えて得られた別の領域分類用画像
における影の出方を元にする方法がある。図28にその
方法を実行する3次元形状計測システムの構成図を示
す。ただし、識別のため図28における括弧内の符号1
L,1Rを適宜使用する。また、対象物は図4と同様で
あるとする。
As a first method for extracting a slide area, there is a method based on the appearance of a shadow in another area classification image obtained by changing the projection direction. FIG. 28 shows a configuration diagram of a three-dimensional shape measurement system that executes the method. However, for identification, reference numeral 1 in parentheses in FIG.
L and 1R are used appropriately. It is also assumed that the object is the same as in FIG.

【0071】図28の3次元形状計測システムでは、2
台の投影装置1が使用され、それぞれ反対方向から対象
物10に縞パターンを照射するように配置されている。
一方の投影装置1(1L)を用いて投影された複数の画
像からは、図29(a)に示すような領域分類用画像H
5が得られ、他方の投影装置1(1R)を用いて投影さ
れた複数の画像からは、図29(b)に示すような領域
分類用画像H5が得られる。図29では、投影方向が逆
であるため、影の範囲Ap5が反対方向に1つ生じる。
また、同一の穴10Bに対応する範囲には投影方向に関
係なく第3値の連結領域ができる。この場合、両領域分
類用画像H5において、一方にあって他方にない第3値
の連結領域をそれぞれ抽出すれば、影の領域だけを抽出
したことになる。そして、抽出された双方の連結領域A
H5間を、図30に示すように、突部としての段差を作る
部品などの存在を示すスライド領域として検出すること
ができる。
In the three-dimensional shape measuring system shown in FIG.
A plurality of projectors 1 are used and arranged so as to irradiate the object 10 with a stripe pattern from opposite directions.
From a plurality of images projected using one projection device 1 (1L), an area classification image H as shown in FIG.
5 are obtained, and an area classification image H5 as shown in FIG. 29B is obtained from a plurality of images projected using the other projection device 1 (1R). In FIG. 29, since the projection direction is opposite, one shadow range Ap5 occurs in the opposite direction.
Further, a third value connection area is formed in a range corresponding to the same hole 10B regardless of the projection direction. In this case, if the third-valued connected areas that are on one side and not on the other side are extracted from both the area classification images H5, only the shadow area is extracted. Then, both of the extracted connected regions A
As shown in FIG. 30, the area between H5 can be detected as a slide area indicating the presence of a part or the like forming a step as a protrusion.

【0072】次に、第2の方法として、1台の投影装置
1を用いて、第3値の連結領域が影であるかどうかを判
断して、スライド領域を抽出する方法について説明す
る。まず、第3値の連結領域が影であるかどうかの判断
については、対象物に穴がないことが既知である場合に
は全ての第3値の連結領域を影と判断すればよい。そう
ではない場合は、位相値の連続性を用いる方法がある。
図27(a)に示すように、突部20Aの影の部分で
は、投影された連続する正弦波縞パターンが影によって
見かけ上分断されている状態であるため、影が伸びる方
向に沿った影の両端(p1およびp2)では位相値はほ
ぼ同一である。従って、影の両端における復元位相値を
調べ、数値がほぼ同一である場合にはそれを影と見なす
ことができる。
Next, as a second method, a method of extracting a slide area by using one projection device 1 to determine whether or not the connected area of the third value is a shadow will be described. First, as to whether or not the third value connected area is a shadow, if it is known that the target object has no hole, all the third value connected areas may be determined as shadows. If not, there is a method using continuity of the phase value.
As shown in FIG. 27A, in the shadow portion of the projection 20A, the projected continuous sine wave stripe pattern is apparently divided by the shadow, and thus the shadow along the direction in which the shadow extends. Are almost the same at both ends (p1 and p2). Therefore, the restoration phase values at both ends of the shadow are examined, and if the numerical values are almost the same, it can be regarded as a shadow.

【0073】このようにして影による第3領域を抽出し
た後、縞の位相ズレをもとにスライド領域の境界を検出
することにより、スライド領域を抽出できる。図31に
示すように、影による第3領域の左方上下端p3,p4
から影が伸びる方向とは逆方向にそれぞれ伸ばした直線
L1,L2上の各点において、L1,L2と略直交する
方向に復元された位相の変化を調べる。このとき、突部
20Aの境界(p5,p6)ではその内側と外側とで位
相値が不連続になる。よってこれを利用し、p3,p4
から左方向に位相が不連続である部分を追跡し、位相の
不連続がなくなる位置を突部20Aの左端(p7,p
8)として検出できる。この方法によれば、p7−p8
間の線分と、第3領域AH4の左端ラインp3−p4に囲
まれた領域が突部20Aとして検出できる。
After extracting the third region due to the shadow in this manner, the slide region can be extracted by detecting the boundary of the slide region based on the phase shift of the stripe. As shown in FIG. 31, the upper left and lower edges p3 and p4 of the third region due to the shadows
At each point on the straight lines L1 and L2 extending in the direction opposite to the direction in which the shadow extends from, the change in the phase restored in a direction substantially orthogonal to L1 and L2 is examined. At this time, at the boundary (p5, p6) of the protrusion 20A, the phase value is discontinuous between the inside and the outside. Therefore, using this, p3, p4
The portion where the phase discontinuity is tracked from the left to the left, and the position where the phase discontinuity disappears is determined by the left end (p7, p7) of the projection 20A.
8). According to this method, p7-p8
A line segment between the line segment and a region surrounded by the left end line p3-p4 of the third region A H4 can be detected as the protrusion 20A.

【0074】以上、第2実施形態によれば、突部に対応
するスライド領域を抽出し、その突部による影の長さを
測定し、そのスライド領域に存在するパターン(第1・
第2領域)は影の伸びる方向とは逆方向にずれていると
してスライド領域外のパターンと対応付けを行うことに
より、段差や穴がある対象物に対しても正しい位相連結
処理が行え、高さ情報が得られる。
As described above, according to the second embodiment, the slide area corresponding to the protrusion is extracted, the length of the shadow caused by the protrusion is measured, and the pattern (first and second) existing in the slide area is measured.
The second region) is shifted in the direction opposite to the direction in which the shadow extends, and is associated with a pattern outside the slide region, so that correct phase connection processing can be performed even on an object having a step or a hole. Information is obtained.

【0075】図32は高さ情報の欠落を補完する方法の
説明図、図33は高さ情報の欠落を補完した結果を示す
図であり、これらの図を用いて以下に本発明の第3実施
形態について説明する。
FIG. 32 is an explanatory diagram of a method for compensating for a lack of height information, and FIG. 33 is a diagram showing a result of compensating for a lack of height information. The third embodiment of the present invention will be described with reference to these figures. An embodiment will be described.

【0076】第1,第2実施形態では、第3値の連結領
域により位相を復元できないため、高さ情報を生成でき
ない。用途によっては、このような距離情報の欠落が不
都合である場合があるので、こういった場合には周囲の
高さ情報をもとにデータの補完を行うことで、距離情報
の欠落をなくすことができる。
In the first and second embodiments, since the phase cannot be restored by the connection area of the third value, the height information cannot be generated. Depending on the application, such lack of distance information may be inconvenient.In such cases, data is complemented based on surrounding height information to eliminate the lack of distance information. Can be.

【0077】例えば、図32に示すように、影の範囲A
(第3値の連結領域)内の高さ情報が欠落している場
合、範囲Aに隣接し影が伸びる側の領域C内の高さ情報
を、範囲A内の高さ情報Eとして外挿することにより、
欠落している高さ情報を擬似的に補完することができ
る。また、穴に対応する範囲Bの高さ情報の欠落が不都
合である場合には、範囲Bに隣接する領域C,D内の高
さ情報をもとに、その高さと同じかまたはそれよりも低
い所定の高さの情報F(図32の例では同じ高さ)で穴
を埋める方法を適用することができる。
For example, as shown in FIG.
When the height information in the (third value connected area) is missing, the height information in the area C adjacent to the range A and on the side where the shadow extends is extrapolated as the height information E in the range A. By doing
The missing height information can be supplemented in a pseudo manner. Further, if the lack of the height information of the range B corresponding to the hole is inconvenient, based on the height information in the regions C and D adjacent to the range B, the height is equal to or less than the height. A method of filling a hole with information F of a low predetermined height (the same height in the example of FIG. 32) can be applied.

【0078】以上、第3実施形態では、補完するべき範
囲内の高さ情報をその範囲に隣接する領域の高さ情報を
利用して補完するので、図33に示すように欠落の無い
高さ情報を得ることができる。
As described above, in the third embodiment, the height information in the range to be complemented is supplemented by using the height information of the area adjacent to the range, and therefore, as shown in FIG. Information can be obtained.

【0079】[0079]

【発明の効果】請求項1記載の発明によれば、位相シフ
ト法に基づく3次元形状計測方法であって、縞状で縞の
並設方向に沿って明度が正弦波状に変化するパターンの
像を対象物に投影し、前記対象物に投影されたパターン
の像の撮影および前記パターンの一定量のシフトを繰り
返して、前記明度の位相が一定量づつシフトした画像を
少なくとも3種類取り込み、これらの画像から、この画
像の複数の画素にそれぞれ対応する複数の画素を有し、
これら複数の画素のうち、前記明度の1周期の一部に属
する画素に対応する画素には第1値が割り当てられ、前
記明度の1周期の残部に属する画素に対応する画素には
第2値が割り当てられ、前記明度の位相のシフトで明度
が変化しない画素に対応する画素には第3値が割り当て
られてなる領域分類用画像を作成し、この領域分類用画
像を用いて前記第1〜第3値の画素の各々が連続する領
域の分類を行い、この分類結果に基づいて、前記第1値
の画素が連続する第1領域および前記第2値の画素が連
続する第2領域のうち、前記縞の並設方向に沿って互い
に隣接する第1領域および第2領域の組分けをし、この
組分け結果を利用して位相連結の処理を行い、この処理
結果に応じて前記対象物の3次元形状の高さ情報を抽出
するので、対象物に段差や孔がある場合にも、組分け結
果を利用することで正しい位相連結の処理を行うことが
でき、また3次元形状計測を低コストで高速に実現でき
る。これにより、コストおよび撮像時間を余計にかける
ことなく、撮像装置の解像度を損なわない3次元形状の
計測、簡易な位相連結の処理および高速な計測が可能に
なる。
According to the first aspect of the present invention, there is provided a three-dimensional shape measuring method based on a phase shift method, wherein an image of a pattern in which the brightness changes sinusoidally along the direction in which the stripes are arranged. Is projected onto the object, and photographing of an image of the pattern projected on the object and a certain amount of shift of the pattern are repeated to capture at least three types of images in which the phase of the brightness is shifted by a fixed amount, and these are captured. From the image, having a plurality of pixels respectively corresponding to a plurality of pixels of the image,
Among the plurality of pixels, a first value is assigned to a pixel corresponding to a pixel belonging to a part of the one cycle of the brightness, and a second value is assigned to a pixel corresponding to the remaining part of the one cycle of the brightness. Is assigned, and a pixel corresponding to a pixel whose brightness does not change due to the shift of the brightness phase is created with an area classification image in which a third value is allocated. Using the area classification image, A region where each of the third value pixels is continuous is classified, and based on the classification result, a first region where the first value pixels are continuous and a second region where the second value pixels are continuous Grouping a first region and a second region adjacent to each other along the direction in which the stripes are arranged, and performing a phase connection process using the grouping result; Since the height information of the three-dimensional shape of Even if there is a step or hole, it is possible to perform processing of correct phase coupling by using the grouping results, also possible to realize a three-dimensional shape measurement at high speed with low cost. As a result, the measurement of the three-dimensional shape, the simple phase connection processing, and the high-speed measurement that do not impair the resolution of the imaging device can be performed without increasing the cost and the imaging time.

【0080】請求項2記載の発明によれば、請求項1記
載の3次元形状計測方法において、前記領域分類用画像
を作成する場合、前記取り込んだ複数の画像の各画素の
うち、同一の位置にある各画素の明度を所定の演算式に
代入して算出された位相値がその位置に対応する画素の
値として画素毎に割り当てられてなる位相復元画像を作
成し、この後、前記領域分類用画像は、前記明度の位相
のシフトで明度が変化する画素の位置に対応するととも
に前記位相復元画像内の対応する画素の値が所定しきい
値より小さい画素に、第1値が割り当てられ、前記明度
の位相のシフトで明度が変化する画素の位置に対応する
とともに前記位相復元画像内の対応する画素の値が所定
しきい値より大きい画素に、第2値が割り当てられ、前
記明度の位相のシフトで明度が変化しない画素の位置に
対応する画素に、第3値が割り当てられて作成され、前
記位相連結の処理は前記組分け結果を前記位相復元画像
に利用して行われるのであり、この方法でも、コストお
よび撮像時間を余計にかけることなく、撮像装置の解像
度を損なわない3次元形状の計測、簡易な位相連結の処
理および高速な計測が可能になる。
According to the second aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, when the area classification image is created, the same position among the pixels of the plurality of captured images is used. To create a phase-recovered image in which the calculated phase value is assigned to each pixel as the value of the pixel corresponding to the position by substituting the brightness of each pixel in the predetermined arithmetic expression. The image for use corresponds to the position of the pixel whose brightness changes due to the shift of the brightness phase, and the value of the corresponding pixel in the phase-recovered image is smaller than a predetermined threshold value, and a first value is assigned to the pixel. A second value is assigned to a pixel corresponding to the position of a pixel whose brightness changes due to the shift of the brightness phase and the value of the corresponding pixel in the phase-recovered image is larger than a predetermined threshold value, and the brightness phase is No The pixel corresponding to the position of the pixel whose brightness does not change in the default value is created by assigning a third value, and the process of the phase connection is performed using the grouping result for the phase restored image. The method also enables measurement of a three-dimensional shape without impairing the resolution of the imaging device, simple phase connection processing, and high-speed measurement without increasing the cost and the imaging time.

【0081】請求項3記載の発明によれば、請求項1記
載の3次元形状計測方法において、前記領域分類用画像
は、前記取り込んだ複数の画像の各画素のうち、同一の
位置にある各画素の明度を所定の演算式に代入して位相
値を算出する処理を、前記取り込んだ画像のうち、一の
画像を初期位相用とした場合と他の画像を初期位相用と
した場合とで平行に実行しながら、前記一の画像を初期
位相用とした場合の位相値と前記他の画像を初期位相用
とした場合の位相値との差分値を求め、この差分値が正
であれば第1値が、負であれば第2値が、そして明度が
変化しなければ第3値が割り当てられて作成され、前記
位相連結の処理は前記組分け結果を前記各位相値に利用
して行われるので、中間段階として位相復元画像を作成
してしきい値処理を行う必要がないから、メモリの使用
量を少なくすることができる。
According to a third aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, the area classification image is located at the same position among the pixels of the plurality of captured images. The process of calculating the phase value by substituting the brightness of the pixel into a predetermined arithmetic expression is performed depending on whether one of the captured images is used for the initial phase and the other image is used for the initial phase. While executing in parallel, a difference value between a phase value when the one image is used for the initial phase and a phase value when the other image is used for the initial phase is obtained. If the first value is negative, the second value is assigned, and if the brightness does not change, the third value is assigned. The phase concatenation process uses the grouping result for each of the phase values. Is performed, a phase restoration image is created as an intermediate stage, and threshold processing is performed. No need to carry out, it is possible to reduce memory usage.

【0082】請求項4記載の発明によれば、請求項1記
載の3次元形状計測方法において、前記一定量は前記明
度の1周期を3より大きい整数である所定数で除して得
た量であり、前記領域分類用画像を作成する場合、前記
取り込んだ複数の画像の各画素のうち、同一の位置にあ
る各画素の明度を所定の演算式に代入して算出された位
相値がその位置に対応する画素の値として画素毎に割り
当てられてなる位相復元画像を、前記取り込んだ画像の
うち、一の画像を初期位相用とした場合と前記取り込ん
だ画像をサイクリックに前記所定数より小さい整数回分
ずらして他の画像を初期位相用とした場合とでそれぞれ
作成し、この後、前記領域分類用画像は、前記両位相復
元画像内の対応する両画素の値の差分値が正であれば第
1値が、負であれば第2値が、そして明度が変化しなけ
れば第3値が各画素に割り当てられて作成され、前記位
相連結の処理は前記組分け結果を前記両位相復元画像の
一方に利用して行われるので、投影回数を増やす必要が
なく、高速な計測が可能となる。
According to a fourth aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, the certain amount is obtained by dividing one cycle of the brightness by a predetermined number that is an integer greater than three. When creating the area classification image, the phase value calculated by substituting the brightness of each pixel at the same position among the pixels of the plurality of captured images into a predetermined arithmetic expression is A phase-recovered image assigned to each pixel as a value of a pixel corresponding to a position, of the captured images, when one image is used for an initial phase, and when the captured image is cyclically determined from the predetermined number. The other images are shifted by a small integer number of times and the other images are used for the initial phase, respectively. Thereafter, the area classification image has a positive difference value between the values of the corresponding two pixels in the two phase restoration images. If the first value is negative, A second value is created by assigning a third value to each pixel if the brightness does not change, and the phase concatenation process is performed using the grouping result for one of the two phase restored images. Therefore, it is not necessary to increase the number of projections, and high-speed measurement can be performed.

【0083】請求項5記載の発明によれば、請求項1記
載の3次元形状計測方法において、前記領域分類用画像
の各画素のうち、画素の値が前記縞の並設方向に沿って
前記第2値から前記第1値に変化する画素の位置を位相
連結の位置として、前記位相連結の処理を行うので、穴
や段差がない対象物を計測する場合に、高速に位相接続
位置を検出できる。
According to a fifth aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, a pixel value of each pixel of the area classification image is set along the direction in which the stripes are arranged. The phase connection processing is performed by using the position of the pixel that changes from the second value to the first value as the position of the phase connection, so that when measuring an object without holes or steps, the phase connection position can be detected at high speed. it can.

【0084】請求項6記載の発明によれば、請求項1記
載の3次元形状計測方法において、前記位相連結の処理
は、前記領域分類用画像を用いて、前記第1値の画素が
連続する第1領域および前記第2値の画素が連続する第
2領域の分類を行い、これら第1領域および第2領域に
おける前記縞の並設方向に沿った始点および終点をそれ
ぞれ求めて前記第1領域および第2領域の位置関係の評
価を行い、この評価結果に応じて、前記縞の並設方向に
沿って互いに隣接する前記第1領域および第2領域の組
分けをすることにより実行されるので、大局的な領域情
報をもとに位相連結位置の検出が可能となり、誤った位
相連結の発生を防止しうる。
According to a sixth aspect of the present invention, in the three-dimensional shape measuring method according to the first aspect, in the phase connection processing, the pixels of the first value are continuous using the area classification image. The first area and the second area in which the pixels of the second value are continuous are classified, and the first point and the end point along the direction in which the stripes are arranged in the first area and the second area are obtained, respectively. And evaluation of the positional relationship between the second area and the second area. The first area and the second area adjacent to each other along the direction in which the stripes are arranged are grouped according to the evaluation result. In addition, the position of the phase connection can be detected based on the global area information, and the occurrence of incorrect phase connection can be prevented.

【0085】請求項7記載の発明によれば、請求項6記
載の3次元形状計測方法において、前記組分け前、前記
第1領域および第2領域の各々に所定画素数以下の他の
小領域が含まれる場合、その小領域を、これを含む領域
に併合する処理を行うので、不要な組分け数が減少し、
処理速度が向上する。
According to the seventh aspect of the present invention, in the three-dimensional shape measuring method according to the sixth aspect, before the grouping, in each of the first area and the second area, another small area less than a predetermined number of pixels is provided. If it is included, the process of merging the small area with the area including the small area is performed, so that the number of unnecessary groups is reduced,
Processing speed is improved.

【0086】請求項8記載の発明によれば、請求項6記
載の3次元形状計測方法において、前記第3値の画素が
連続する第3領域を前記第1領域に含めて拡張の第1領
域とし、前記第3領域を前記第2領域に含めて拡張の第
2領域とし、これら拡張の第1および第2領域の重なり
状態に基づいて、互いに隣接する前記第1領域および第
2領域の組分けをするので、第1領域または第2領域と
第3領域とが重なっている場合に、本来1つであるはず
の領域が分断されて認識不能となるのを防止することが
できる。
According to an eighth aspect of the present invention, in the three-dimensional shape measuring method according to the sixth aspect, an extended first area including a third area in which the pixels of the third value are continuous is included in the first area. A set of the first region and the second region which are adjacent to each other based on an overlapping state of the first and second regions in the expansion, including the third region in the second region. Since the division is performed, when the first area or the second area overlaps with the third area, it is possible to prevent the area that should originally be one from being divided and becoming unrecognizable.

【0087】請求項9記載の発明によれば、請求項8記
載の3次元形状計測方法において、前記第3領域により
複数位相分の前記第1領域および第2領域が繋がって見
える場合、前記第3領域を除いて前記第1領域および第
2領域を再度求め、これら第1領域および第2領域のう
ち、前記縞に沿った方向に分断されていない領域を抽出
し、この領域に基づいて前記縞に沿った方向に分断され
た領域を結合するので、1周期以上の長さに渡って第3
領域が第1領域および第2領域を分断している場合にも
正しい位相連結が可能となる。
According to the ninth aspect of the present invention, in the three-dimensional shape measuring method according to the eighth aspect, when the first area and the second area for a plurality of phases appear to be connected by the third area, The first region and the second region are obtained again except for the three regions, and a region that is not divided in the direction along the stripe is extracted from the first region and the second region. Since the areas divided in the direction along the stripes are combined, the third
Even when the region separates the first region and the second region, correct phase connection can be performed.

【0088】請求項10記載の発明によれば、請求項2
記載の3次元形状計測方法において、前記撮影およびシ
フトを繰り返して取り込まれる画像を、前記パターンの
像を一の方向から前記対象物に投影した場合のものと前
記パターンの像を他の方向から前記対象物に投影した場
合のものとの2組み用意し、これら2組みの画像から前
記位相復元画像を2つ作成し、これら位相復元画像の一
方のみに前記第3値の画素が連続する領域が存在する場
合、その領域を、前記対象物における段差を作る突部の
影の範囲として、これら影の範囲の間に挟まれる領域を
前記突部の存在領域とするので、突部の存在領域を容易
に抽出できるとともに、第3領域が影であるかどうかの
判断も同時に行うことができる。
According to the tenth aspect, the second aspect is provided.
In the three-dimensional shape measurement method according to the above, the image captured by repeating the photographing and shifting, the image of the pattern is projected onto the object from one direction and the image of the pattern is projected from another direction. Two sets of the phase-reconstructed image and the two sets of the phase-reconstructed image are prepared from the two sets of images, and an area where the pixel of the third value is continuous in only one of the phase-reconstructed images is prepared. If there is, the area is defined as a shadow area of the protrusion that forms a step in the object, and an area sandwiched between the shadow areas is defined as the protrusion existence area. It can be easily extracted, and it can be determined at the same time whether the third area is a shadow.

【0089】請求項11記載の発明によれば、請求項2
記載の3次元形状計測方法において、前記領域分類用画
像の各画素のうち、前記第3値の画素が連続する第3領
域における前記縞の並設方向に沿った始点と終点におけ
る位相復元画像の画素の値がほぼ同一である場合、当該
第3領域を前記対象物において段差を作る突部の影の範
囲とするので、第3領域が影であるか否かの判断を容易
に行うことができる。
According to the eleventh aspect, according to the second aspect,
In the three-dimensional shape measurement method according to the aspect, among the pixels of the area classification image, a phase restoration image at a start point and an end point along a direction in which the stripes are arranged in a third area where the pixels of the third value are continuous. When the pixel values are substantially the same, the third area is defined as a shadow area of the protrusion that forms a step in the object, so that it is easy to determine whether the third area is a shadow. it can.

【0090】請求項12記載の発明によれば、請求項1
0または11記載の3次元形状計測方法において、前記
領域分類用画像の各画素のうち、前記影の範囲からその
影が伸びる方向とは逆の方向における前記縞に沿った方
向の各画素に対応する前記位相復元画像の画素の値を調
べ、これら画素の値が不連続である場合には前記影が伸
びる方向とは逆の方向に前記突部が続いているものと
し、不連続で無くなった場合には前記突部が途切れる境
界であるので、突部の領域を抽出する処理が簡単に行え
る。
According to the twelfth aspect of the present invention, the first aspect is provided.
12. The three-dimensional shape measurement method according to 0 or 11, wherein each of the pixels of the area classification image corresponds to each pixel in a direction along the stripe in a direction opposite to a direction in which the shadow extends from the shadow range. The values of the pixels of the phase-recovered image are examined, and if the values of these pixels are discontinuous, the projections are assumed to continue in the direction opposite to the direction in which the shadow extends, and the discontinuity is eliminated. In this case, since the protrusion is a boundary where the protrusion is interrupted, the process of extracting the region of the protrusion can be easily performed.

【0091】請求項13記載の発明によれば、請求項1
0〜12のいずれかに記載の3次元形状計測方法におい
て、前記縞の並設方向に沿った前記影の範囲の長さをパ
ターンずれ量として求め、その影が伸びる方向とは逆の
方向に存在する前記突部における前記第1値ないし第2
値の画素が連続する領域を、前記パターンずれ量だけ前
記縞の並設方向にずれた前記突部の外側の領域と対応付
けるので、1周期分を超える大きな段差がある場合にも
正しい対応づけが行える。
According to the thirteenth aspect, according to the first aspect,
In the three-dimensional shape measurement method according to any one of 0 to 12, a length of the shadow range along the direction in which the stripes are arranged is determined as a pattern shift amount, and the length is determined in a direction opposite to a direction in which the shadow extends. The first value or the second value in the existing protrusion;
The area where the pixels having the same value are continuous is associated with the area outside the protrusion that is shifted in the direction in which the stripes are arranged by the pattern shift amount. Therefore, even when there is a large step exceeding one cycle, correct association can be achieved. I can do it.

【0092】請求項14記載の発明によれば、請求項1
記載の3次元形状計測方法において、前記第3値の画素
が連続する第3領域内の位相値または高さ情報を、その
第3領域の外側の位相値または高さ情報をもとに補完す
るので、高さ情報の欠落が発生しない。
According to the fourteenth aspect of the present invention, the first aspect is provided.
In the three-dimensional shape measurement method described above, phase value or height information in a third region in which the pixels of the third value are continuous is complemented based on phase value or height information outside the third region. Therefore, no loss of height information occurs.

【0093】請求項15記載の発明によれば、請求項1
4記載の3次元形状計測方法において、前記第3値の画
素が連続する第3領域が前記対象物における段差を作る
突部の影で生じた場合、その第3領域内の位相値または
高さ情報を、その第3領域に隣接しかつ前記突部の影が
伸びる方向にある領域の位相値または高さ情報をもとに
補完するので、突部の形状を損なうことなく高さ情報の
欠落を補完できる。
According to the fifteenth aspect, the first aspect is provided.
4. In the three-dimensional shape measurement method according to 4, when the third region in which the pixels of the third value are continuous is caused by a shadow of a projection that forms a step in the object, the phase value or the height in the third region. The information is complemented based on the phase value or height information of the area adjacent to the third area and in the direction in which the shadow of the projection extends, so that the height information is lost without damaging the shape of the projection. Can be complemented.

【0094】請求項16記載の発明は、位相シフト法に
基づく3次元形状計測システムであって、縞状で縞の並
設方向に沿って明度が正弦波状に変化するパターンの像
を対象物に投影する投影装置と、前記対象物に投影され
たパターンの像を撮影する撮像装置と、前記対象物に投
影されたパターンの一定量のシフトを繰り返して得ら
れ、前記明度の位相が一定量づつシフトした画像を少な
くとも3種類取り込んで記憶する記憶装置と、この記憶
装置に記憶された画像から、この画像の複数の画素にそ
れぞれ対応する複数の画素を有し、これら複数の画素の
うち、前記明度の1周期の一部に属する画素に対応する
画素には第1値が割り当てられ、前記明度の1周期の残
部に属する画素に対応する画素には第2値が割り当てら
れ、前記明度の位相のシフトで明度が変化しない画素に
対応する画素には第3値が割り当てられてなる領域分類
用画像を作成し、この領域分類用画像を用いて前記第1
〜第3値の画素の各々が連続する領域の分類を行い、こ
の分類結果に基づいて、前記第1値の画素が連続する第
1領域および前記第2値の画素が連続する第2領域のう
ち、前記縞の並設方向に沿って互いに隣接する第1領域
および第2領域の組分けをし、この組分け結果を利用し
て位相連結の処理を行い、この処理結果に応じて前記対
象物の3次元形状の高さ情報を抽出する画像処理装置と
を備えるので、対象物に段差や孔がある場合にも、組分
け結果を利用することで正しい位相連結の処理を行うこ
とができ、また3次元形状計測を低コストで高速に実現
できる。これにより、コストおよび撮像時間を余計にか
けることなく、撮像装置の解像度を損なわない3次元形
状の計測、簡易な位相連結の処理および高速な計測が可
能になる。
The invention according to claim 16 is a three-dimensional shape measuring system based on the phase shift method, wherein an image of a pattern in which the brightness changes in a sinusoidal manner along the direction in which the stripes are arranged is applied to the object. A projection device for projecting, an imaging device for photographing an image of the pattern projected on the object, and a certain amount of shift of the pattern projected on the object is obtained repeatedly, and the phase of the lightness is obtained by a constant amount. A storage device for capturing and storing at least three types of shifted images, and a plurality of pixels respectively corresponding to a plurality of pixels of the image, from the images stored in the storage device, and among the plurality of pixels, A pixel corresponding to a pixel belonging to a part of one cycle of brightness is assigned a first value, a pixel corresponding to a pixel belonging to the remainder of one cycle of brightness is assigned a second value, and the phase of the brightness is assigned. The pixel corresponding to the pixel brightness does not change the shift creates a region classification image composed assigned third value, the using the area classification image first
To a third area in which each of the pixels of the third value is continuous, and based on the classification result, a first area in which the pixels of the first value are continuous and a second area in which the pixels of the second value are continuous The first region and the second region adjacent to each other along the direction in which the stripes are arranged are grouped, and a phase connection process is performed using the grouping result. Since it has an image processing device that extracts height information of the three-dimensional shape of the object, even if the object has a step or a hole, it is possible to perform the correct phase connection processing by using the grouping result. In addition, three-dimensional shape measurement can be realized at low cost and at high speed. As a result, the measurement of the three-dimensional shape, the simple phase connection processing, and the high-speed measurement that do not impair the resolution of the imaging device can be performed without increasing the cost and the imaging time.

【図面の簡単な説明】[Brief description of the drawings]

【図1】3次元形状計測システムの説明図である。FIG. 1 is an explanatory diagram of a three-dimensional shape measurement system.

【図2】3次元形状計測方法の手順を示すフローチャー
トである。
FIG. 2 is a flowchart illustrating a procedure of a three-dimensional shape measurement method.

【図3】位相復元の原理説明図である。FIG. 3 is a diagram illustrating the principle of phase restoration.

【図4】対象物の斜視図である。FIG. 4 is a perspective view of an object.

【図5】図4の対象物の上面図および断面図である。5 is a top view and a sectional view of the object shown in FIG. 4;

【図6】対象物の撮影で得られる縞画像およびこの縞画
像のある直線上に沿った明度変化の例を示す図である。
FIG. 6 is a diagram illustrating an example of a stripe image obtained by capturing an object and a change in brightness along a straight line of the stripe image.

【図7】位相シフトで得られる各縞画像および各縞画像
のある直線上に沿った明度変化の例を示す図である。
FIG. 7 is a diagram illustrating an example of each fringe image obtained by a phase shift and a change in brightness along a straight line of each fringe image.

【図8】位相復元画像およびこの位相復元画像のある直
線上に沿った位相値変化の例を示す図である。
FIG. 8 is a diagram illustrating an example of a phase restored image and a phase value change along a certain straight line of the phase restored image.

【図9】位相連結処理の説明図である。FIG. 9 is an explanatory diagram of a phase connection process.

【図10】領域分類用画像およびこの領域分類用画像の
ある直線上に沿った明度変化の例を示す図である。
FIG. 10 is a diagram illustrating an example of an area classification image and a change in brightness along a straight line of the area classification image.

【図11】図2の位相境界検出の具体的な処理手順を示
すフローチャートである。
FIG. 11 is a flowchart illustrating a specific processing procedure of phase boundary detection in FIG. 2;

【図12】領域分類用画像の生成方法の説明図である。FIG. 12 is an explanatory diagram of a method for generating an area classification image.

【図13】領域分類用画像を利用した各連結領域の分類
処理の説明図である。
FIG. 13 is an explanatory diagram of a classification process of each connected region using a region classification image.

【図14】小領域の大領域への併合処理の説明図であ
る。
FIG. 14 is an explanatory diagram of a process of merging a small area into a large area.

【図15】第1領域および第2領域の組分け処理の説明
図である。
FIG. 15 is an explanatory diagram of a grouping process of a first area and a second area.

【図16】各連結領域の分類処理の説明図である。FIG. 16 is an explanatory diagram of a classification process of each connected region.

【図17】各連結領域の分類処理の説明図である。FIG. 17 is an explanatory diagram of a classification process of each connected region.

【図18】第1領域および第2領域の組分け処理の説明
図である。
FIG. 18 is an explanatory diagram of a grouping process of a first area and a second area.

【図19】各連結領域の分類処理の説明図である。FIG. 19 is an explanatory diagram of a classification process of each connected region.

【図20】各連結領域の分類処理の説明図である。FIG. 20 is an explanatory diagram of a classification process of each connected region.

【図21】第1領域および第2領域の組分け処理の説明
図である。
FIG. 21 is an explanatory diagram of a grouping process of a first area and a second area.

【図22】位相境界の検出結果の説明図である。FIG. 22 is an explanatory diagram of a detection result of a phase boundary.

【図23】位相連結処理結果の説明図である。FIG. 23 is an explanatory diagram of a result of the phase connection processing.

【図24】高さ情報の例を示す図である。FIG. 24 is a diagram illustrating an example of height information.

【図25】図4の対象物よりも大きな突部を有する対象
物の斜視図である。
FIG. 25 is a perspective view of an object having a protrusion larger than the object of FIG. 4;

【図26】図25の対象物の撮影で得られる縞画像の例
を示す図である。
26 is a diagram illustrating an example of a striped image obtained by photographing the object in FIG. 25.

【図27】複数枚の縞画像から復元された位相復元画像
および領域分類用画像などを示す図である。
FIG. 27 is a diagram showing a phase-recovered image, a region-classifying image, and the like restored from a plurality of stripe images.

【図28】対象物の突部位置をその突部の影を利用して
検出する3次元形状計測システムの構成図である。
FIG. 28 is a configuration diagram of a three-dimensional shape measurement system that detects a projection position of a target object by using a shadow of the projection.

【図29】領域分類用画像から対象物の突部位置を検出
する方法の説明図である。
FIG. 29 is an explanatory diagram of a method for detecting a projection position of a target object from an area classification image.

【図30】図29の方法で検出される突部位置を示す図
である。
FIG. 30 is a diagram showing a protrusion position detected by the method of FIG. 29;

【図31】対象物の突部位置を検出する方法の説明図で
ある。
FIG. 31 is an explanatory diagram of a method for detecting the position of a projection of an object.

【図32】高さ情報の欠落を補完する方法の説明図であ
る。
FIG. 32 is an explanatory diagram of a method of complementing a missing height information.

【図33】高さ情報の欠落を補完した結果を示す図であ
る。
FIG. 33 is a diagram showing a result of complementing missing height information.

【符号の説明】 1 投影装置 11 ランプ 12 凹面鏡 13 投影用レンズ 14 パターン板 15 パターンシフト部 2 カメラ 3 量子化回路 4 記憶装置 5 画像処理装置[Description of Signs] 1 Projection device 11 Lamp 12 Concave mirror 13 Projection lens 14 Pattern plate 15 Pattern shift unit 2 Camera 3 Quantization circuit 4 Storage device 5 Image processing device

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 位相シフト法に基づく3次元形状計測方
法であって、 縞状で縞の並設方向に沿って明度が正弦波状に変化する
パターンの像を対象物に投影し、 前記対象物に投影されたパターンの像の撮影および前記
パターンの一定量のシフトを繰り返して、前記明度の位
相が一定量づつシフトした画像を少なくとも3種類取り
込み、 これらの画像から、この画像の複数の画素にそれぞれ対
応する複数の画素を有し、これら複数の画素のうち、前
記明度の1周期の一部に属する画素に対応する画素には
第1値が割り当てられ、前記明度の1周期の残部に属す
る画素に対応する画素には第2値が割り当てられ、前記
明度の位相のシフトで明度が変化しない画素に対応する
画素には第3値が割り当てられてなる領域分類用画像を
作成し、 この領域分類用画像を用いて前記第1〜第3値の画素の
各々が連続する領域の分類を行い、この分類結果に基づ
いて、前記第1値の画素が連続する第1領域および前記
第2値の画素が連続する第2領域のうち、前記縞の並設
方向に沿って互いに隣接する第1領域および第2領域の
組分けをし、この組分け結果を利用して位相連結の処理
を行い、この処理結果に応じて前記対象物の3次元形状
の高さ情報を抽出することを特徴とする3次元形状計測
方法。
1. A three-dimensional shape measuring method based on a phase shift method, wherein an image of a pattern in which the brightness changes in a sinusoidal manner along a direction in which the stripes are arranged is projected on the target. By repeating the photographing of the image of the pattern projected on and the certain amount of shift of the pattern, at least three types of images in which the brightness phase is shifted by a fixed amount are taken in, and from these images, a plurality of pixels of this image are taken. Each of the plurality of pixels has a corresponding one of the plurality of pixels, and among the plurality of pixels, a pixel corresponding to a pixel belonging to a part of the one cycle of the brightness is assigned a first value, and belongs to the remainder of the one cycle of the brightness. A second value is assigned to a pixel corresponding to the pixel, and a third value is assigned to a pixel corresponding to a pixel whose lightness does not change due to the shift of the lightness phase. Using a similar image, a region in which each of the first to third value pixels is continuous is classified, and based on the classification result, a first region in which the first value pixel is continuous and the second value are classified. Out of the second area where the pixels are continuous, the first area and the second area adjacent to each other along the direction in which the stripes are arranged are grouped, and a phase connection process is performed using the grouping result. Extracting a height information of a three-dimensional shape of the object according to a result of the processing.
【請求項2】 前記領域分類用画像を作成する場合、前
記取り込んだ複数の画像の各画素のうち、同一の位置に
ある各画素の明度を所定の演算式に代入して算出された
位相値がその位置に対応する画素の値として画素毎に割
り当てられてなる位相復元画像を作成し、この後、前記
領域分類用画像は、前記明度の位相のシフトで明度が変
化する画素の位置に対応するとともに前記位相復元画像
内の対応する画素の値が所定しきい値より小さい画素
に、第1値が割り当てられ、前記明度の位相のシフトで
明度が変化する画素の位置に対応するとともに前記位相
復元画像内の対応する画素の値が所定しきい値より大き
い画素に、第2値が割り当てられ、前記明度の位相のシ
フトで明度が変化しない画素の位置に対応する画素に、
第3値が割り当てられて作成され、 前記位相連結の処理は前記組分け結果を前記位相復元画
像に利用して行われることを特徴とする請求項1記載の
3次元形状計測方法。
2. A phase value calculated by substituting the brightness of each pixel at the same position among the pixels of the plurality of captured images into a predetermined arithmetic expression when creating the area classification image. Creates a phase-recovered image that is assigned to each pixel as the value of the pixel corresponding to that position, and thereafter, the area classification image corresponds to the position of the pixel whose lightness changes due to the lightness phase shift And a first value is assigned to a pixel having a value of a corresponding pixel smaller than a predetermined threshold value in the phase-recovered image, and the pixel corresponds to a position of a pixel whose brightness changes due to the shift of the brightness phase, and A second value is assigned to a pixel whose value of a corresponding pixel in the restored image is larger than a predetermined threshold, and a pixel corresponding to a position of a pixel whose brightness does not change due to the shift of the brightness phase,
The three-dimensional shape measurement method according to claim 1, wherein a third value is created by being assigned, and the phase connection process is performed using the grouping result for the phase restoration image.
【請求項3】 前記領域分類用画像は、前記取り込んだ
複数の画像の各画素のうち、同一の位置にある各画素の
明度を所定の演算式に代入して位相値を算出する処理
を、前記取り込んだ画像のうち、一の画像を初期位相用
とした場合と他の画像を初期位相用とした場合とで平行
に実行しながら、前記一の画像を初期位相用とした場合
の位相値と前記他の画像を初期位相用とした場合の位相
値との差分値を求め、この差分値が正であれば第1値
が、負であれば第2値が、そして明度が変化しなければ
第3値が割り当てられて作成され、 前記位相連結の処理は前記組分け結果を前記各位相値に
利用して行われることを特徴とする請求項1記載の3次
元形状計測方法。
3. The region classifying image includes a process of calculating a phase value by substituting the brightness of each pixel at the same position among the pixels of the plurality of captured images into a predetermined arithmetic expression. Among the captured images, the phase value when the one image is used for the initial phase while the one image is used for the initial phase and the other image is used in parallel for the initial phase. And a difference value between the other image and the phase value when the other image is used for the initial phase. If the difference value is positive, the first value must be changed. If the difference value is negative, the second value must be changed. The three-dimensional shape measuring method according to claim 1, wherein a third value is allocated and created, and the phase connection process is performed using the grouping result for each of the phase values.
【請求項4】 前記一定量は前記明度の1周期を3より
大きい整数である所定数で除して得た量であり、 前記領域分類用画像を作成する場合、前記取り込んだ複
数の画像の各画素のうち、同一の位置にある各画素の明
度を所定の演算式に代入して算出された位相値がその位
置に対応する画素の値として画素毎に割り当てられてな
る位相復元画像を、前記取り込んだ画像のうち、一の画
像を初期位相用とした場合と前記取り込んだ画像をサイ
クリックに前記所定数より小さい整数回分ずらして他の
画像を初期位相用とした場合とでそれぞれ作成し、この
後、前記領域分類用画像は、前記両位相復元画像内の対
応する両画素の値の差分値が正であれば第1値が、負で
あれば第2値が、そして明度が変化しなければ第3値が
各画素に割り当てられて作成され、 前記位相連結の処理は前記組分け結果を前記両位相復元
画像の一方に利用して行われることを特徴とする請求項
1記載の3次元形状計測方法。
4. The fixed amount is an amount obtained by dividing one cycle of the lightness by a predetermined number that is an integer greater than 3. When creating the area classification image, the fixed amount of the plurality of captured images is Of each pixel, a phase restoration image in which a phase value calculated by substituting the brightness of each pixel at the same position into a predetermined arithmetic expression is assigned to each pixel as a value of a pixel corresponding to that position, Of the captured images, one image is used for the initial phase and the captured image is cyclically shifted by an integer number smaller than the predetermined number and the other image is used for the initial phase. Thereafter, in the area classification image, the first value is changed if the difference between the values of the corresponding two pixels in the phase-recovered images is positive, the second value is changed if the difference is negative, and the brightness is changed. Otherwise, a third value is assigned to each pixel Made is, three-dimensional shape measuring method according to claim 1, wherein said processing phase coupling is characterized by being carried out by using the groupings result in one of the two phase recovery image.
【請求項5】 前記領域分類用画像の各画素のうち、画
素の値が前記縞の並設方向に沿って前記第2値から前記
第1値に変化する画素の位置を位相連結の位置として、
前記位相連結の処理を行うことを特徴とする請求項1記
載の3次元形状計測方法。
5. A position of a pixel whose pixel value changes from the second value to the first value along the direction in which the stripes are arranged in each pixel of the area classification image is set as a phase connection position. ,
The three-dimensional shape measurement method according to claim 1, wherein the phase connection processing is performed.
【請求項6】 前記位相連結の処理は、前記領域分類用
画像を用いて、前記第1値の画素が連続する第1領域お
よび前記第2値の画素が連続する第2領域の分類を行
い、これら第1領域および第2領域における前記縞の並
設方向に沿った始点および終点をそれぞれ求めて前記第
1領域および第2領域の位置関係の評価を行い、この評
価結果に応じて、前記縞の並設方向に沿って互いに隣接
する前記第1領域および第2領域の組分けをすることに
より実行されることを特徴とする請求項1記載の3次元
形状計測方法。
6. The phase connection processing classifies a first area in which the first value pixels are continuous and a second area in which the second value pixels are continuous using the area classification image. In each of the first region and the second region, a start point and an end point along the direction in which the stripes are arranged are determined to evaluate the positional relationship between the first region and the second region. 2. The three-dimensional shape measuring method according to claim 1, wherein the method is performed by grouping the first region and the second region adjacent to each other along a direction in which the stripes are arranged.
【請求項7】 前記組分け前、前記第1領域および第2
領域の各々に所定画素数以下の他の小領域が含まれる場
合、その小領域を、これを含む領域に併合する処理を行
うことを特徴とする請求項6記載の3次元形状計測方
法。
7. The method according to claim 1, wherein the first region and the second region are arranged before the grouping.
7. The three-dimensional shape measuring method according to claim 6, wherein when each of the areas includes another small area equal to or less than a predetermined number of pixels, a process of merging the small area with an area including the small area is performed.
【請求項8】 前記第3値の画素が連続する第3領域を
前記第1領域に含めて拡張の第1領域とし、前記第3領
域を前記第2領域に含めて拡張の第2領域とし、これら
拡張の第1および第2領域の重なり状態に基づいて、互
いに隣接する前記第1領域および第2領域の組分けをす
ることを特徴とする請求項6記載の3次元形状計測方
法。
8. An extended first area including a third area in which the pixels of the third value are continuous in the first area, and an extended second area including the third area in the second area. 7. The three-dimensional shape measuring method according to claim 6, wherein the first region and the second region adjacent to each other are classified based on the overlapping state of the first and second regions.
【請求項9】 前記第3領域により複数位相分の前記第
1領域および第2領域が繋がって見える場合、前記第3
領域を除いて前記第1領域および第2領域を再度求め、
これら第1領域および第2領域のうち、前記縞に沿った
方向に分断されていない領域を抽出し、この領域に基づ
いて前記縞に沿った方向に分断された領域を結合するこ
とを特徴とする請求項8記載の3次元形状計測方法。
9. When the first region and the second region for a plurality of phases appear to be connected by the third region, the third region
The first region and the second region are obtained again except for the region,
Extracting a region that is not divided in the direction along the stripe from the first region and the second region, and combining the regions divided in the direction along the stripe based on this region; 9. The three-dimensional shape measurement method according to claim 8, wherein:
【請求項10】 前記撮影およびシフトを繰り返して取
り込まれる画像を、前記パターンの像を一の方向から前
記対象物に投影した場合のものと前記パターンの像を他
の方向から前記対象物に投影した場合のものとの2組み
用意し、 これら2組みの画像から前記位相復元画像を2つ作成
し、これら位相復元画像の一方のみに前記第3値の画素
が連続する領域が存在する場合、その領域を、前記対象
物における段差を作る突部の影の範囲として、これら影
の範囲の間に挟まれる領域を前記突部の存在領域とする
ことを特徴とする請求項2記載の3次元形状計測方法。
10. An image captured by repeating the photographing and shifting, wherein an image of the pattern is projected onto the object from one direction and an image of the pattern is projected onto the object from another direction. Two sets of the phase-recovered images are prepared from these two sets of images, and if only one of the phase-recovered images has an area where the pixel of the third value is continuous, 3. The three-dimensional image according to claim 2, wherein the area is defined as a shadow area of the projection that forms a step in the object, and an area sandwiched between the shadow areas is defined as an existing area of the projection. Shape measurement method.
【請求項11】 前記領域分類用画像の各画素のうち、
前記第3値の画素が連続する第3領域における前記縞の
並設方向に沿った始点と終点における位相復元画像の画
素の値がほぼ同一である場合、当該第3領域を前記対象
物において段差を作る突部の影の範囲とすることを特徴
とする請求項2記載の3次元形状計測方法。
11. Each pixel of the area classification image,
When the values of the pixels of the phase-recovered image at the start point and the end point along the direction in which the stripes are arranged in the third region in which the pixels of the third value are continuous are substantially the same, the third region is stepped in the object. 3. The three-dimensional shape measuring method according to claim 2, wherein the projection is a shadow area of the projection.
【請求項12】 前記領域分類用画像の各画素のうち、
前記影の範囲からその影が伸びる方向とは逆の方向にお
ける前記縞に沿った方向の各画素に対応する前記位相復
元画像の画素の値を調べ、これら画素の値が不連続であ
る場合には前記影が伸びる方向とは逆の方向に前記突部
が続いているものとし、不連続で無くなった場合には前
記突部が途切れる境界であるとすることを特徴とする請
求項10または11記載の3次元形状計測方法。
12. Each pixel of the area classification image,
Check the values of the pixels of the phase-recovered image corresponding to each pixel in the direction along the stripe in the direction opposite to the direction in which the shadow extends from the range of the shadow, and when the values of these pixels are discontinuous, 12. The projection according to claim 10, wherein the projection is continued in a direction opposite to a direction in which the shadow extends, and when the projection is discontinuous, the projection is a boundary where the projection is interrupted. The three-dimensional shape measurement method described in the above.
【請求項13】 前記縞の並設方向に沿った前記影の範
囲の長さをパターンずれ量として求め、その影が伸びる
方向とは逆の方向に存在する前記突部における前記第1
値ないし第2値の画素が連続する領域を、前記パターン
ずれ量だけ前記縞の並設方向にずれた前記突部の外側の
領域と対応付けることを特徴とする請求項10〜12の
いずれかに記載の3次元形状計測方法。
13. A length of a range of the shadow along the direction in which the stripes are arranged is determined as a pattern shift amount, and the first portion of the projection in the direction opposite to the direction in which the shadow extends is obtained.
13. The area according to claim 10, wherein an area in which pixels of the value or the second value are continuous is associated with an area outside the protrusion that is shifted in the direction in which the stripes are arranged by the pattern shift amount. The three-dimensional shape measurement method described in the above.
【請求項14】 前記第3値の画素が連続する第3領域
内の位相値または高さ情報を、その第3領域の外側の位
相値または高さ情報をもとに補完することを特徴とする
請求項1記載の3次元形状計測方法。
14. The method according to claim 1, wherein phase value or height information in a third region in which the pixels of the third value are continuous is complemented based on phase value or height information outside the third region. The three-dimensional shape measurement method according to claim 1.
【請求項15】 前記第3値の画素が連続する第3領域
が前記対象物における段差を作る突部の影で生じた場
合、その第3領域内の位相値または高さ情報を、その第
3領域に隣接しかつ前記突部の影が伸びる方向にある領
域の位相値または高さ情報をもとに補完することを特徴
とする請求項14記載の3次元形状計測方法。
15. When a third region in which the pixels of the third value are continuous occurs due to a shadow of a protrusion forming a step in the object, the phase value or height information in the third region is converted to the third region. 15. The three-dimensional shape measurement method according to claim 14, wherein interpolation is performed based on phase value or height information of an area adjacent to the three areas and extending in a direction in which the shadow of the protrusion extends.
【請求項16】 位相シフト法に基づく3次元形状計測
システムであって、縞状で縞の並設方向に沿って明度が
正弦波状に変化するパターンの像を対象物に投影する投
影装置と、 前記対象物に投影されたパターンの像を撮影する撮像装
置と、 前記対象物に投影されたパターンの一定量のシフトを繰
り返して得られ、前記明度の位相が一定量づつシフトし
た画像を少なくとも3種類取り込んで記憶する記憶装置
と、 この記憶装置に記憶された画像から、この画像の複数の
画素にそれぞれ対応する複数の画素を有し、これら複数
の画素のうち、前記明度の1周期の一部に属する画素に
対応する画素には第1値が割り当てられ、前記明度の1
周期の残部に属する画素に対応する画素には第2値が割
り当てられ、前記明度の位相のシフトで明度が変化しな
い画素に対応する画素には第3値が割り当てられてなる
領域分類用画像を作成し、この領域分類用画像を用いて
前記第1〜第3値の画素の各々が連続する領域の分類を
行い、この分類結果に基づいて、前記第1値の画素が連
続する第1領域および前記第2値の画素が連続する第2
領域のうち、前記縞の並設方向に沿って互いに隣接する
第1領域および第2領域の組分けをし、この組分け結果
を利用して位相連結の処理を行い、この処理結果に応じ
て前記対象物の3次元形状の高さ情報を抽出する画像処
理装置とを備えることを特徴とする3次元形状計測シス
テム。
16. A three-dimensional shape measurement system based on a phase shift method, comprising: a projection device for projecting an image of a pattern in which the brightness changes in a sinusoidal manner along a direction in which the stripes are arranged on a target object; An imaging device that captures an image of a pattern projected on the object; and at least 3 images obtained by repeating a certain amount of shifts of the pattern projected on the object, wherein the lightness phase is shifted by a certain amount at a time. A storage device for capturing and storing the type; and from the image stored in the storage device, the storage device includes a plurality of pixels respectively corresponding to a plurality of pixels of the image. The first value is assigned to the pixel corresponding to the pixel belonging to
A pixel corresponding to a pixel belonging to the rest of the cycle is assigned a second value, and a pixel corresponding to a pixel whose brightness does not change due to the shift in brightness phase is assigned a third value. The first area where the first value pixels are continuous is created based on the classification result, and the area where the first to third value pixels are continuous is classified using the area classification image. And a second pixel in which the pixels of the second value
Among the regions, a first region and a second region adjacent to each other along the direction in which the stripes are arranged are grouped, and a phase connection process is performed using the grouping result. An image processing device for extracting height information of the three-dimensional shape of the target object.
JP2000359231A 2000-11-27 2000-11-27 Three-dimensional shape measurement method and system Expired - Fee Related JP3687531B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000359231A JP3687531B2 (en) 2000-11-27 2000-11-27 Three-dimensional shape measurement method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000359231A JP3687531B2 (en) 2000-11-27 2000-11-27 Three-dimensional shape measurement method and system

Publications (2)

Publication Number Publication Date
JP2002162215A true JP2002162215A (en) 2002-06-07
JP3687531B2 JP3687531B2 (en) 2005-08-24

Family

ID=18831018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000359231A Expired - Fee Related JP3687531B2 (en) 2000-11-27 2000-11-27 Three-dimensional shape measurement method and system

Country Status (1)

Country Link
JP (1) JP3687531B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100612932B1 (en) 2005-12-14 2006-08-14 주식회사 고영테크놀러지 3d image measuring apparatus and method thereof
JP2009079934A (en) * 2007-09-25 2009-04-16 Shibuya Kogyo Co Ltd Three-dimensional measuring method
WO2009107981A2 (en) * 2008-02-26 2009-09-03 주식회사 고영테크놀러지 Apparatus and method for measuring a three-dimensional shape
JP2010537181A (en) * 2007-08-17 2010-12-02 レニショウ パブリック リミテッド カンパニー Apparatus and method for non-contact measurement
CN102519396A (en) * 2011-12-21 2012-06-27 哈尔滨理工大学 Three-dimensional information acquisition method for sampling points of three gray level symmetrical linear coding periods
JP2014081218A (en) * 2012-10-12 2014-05-08 Ricoh Elemex Corp Exterior appearance inspection device
CN105258653A (en) * 2015-10-27 2016-01-20 电子科技大学 Automatic detection method for detecting whether coloring of remote control keyboard is qualified
US9329030B2 (en) 2009-09-11 2016-05-03 Renishaw Plc Non-contact object inspection

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100612932B1 (en) 2005-12-14 2006-08-14 주식회사 고영테크놀러지 3d image measuring apparatus and method thereof
US8605983B2 (en) 2007-08-17 2013-12-10 Renishaw Plc Non-contact probe
USRE46012E1 (en) 2007-08-17 2016-05-24 Renishaw Plc Non-contact probe
US8923603B2 (en) 2007-08-17 2014-12-30 Renishaw Plc Non-contact measurement apparatus and method
JP2010537181A (en) * 2007-08-17 2010-12-02 レニショウ パブリック リミテッド カンパニー Apparatus and method for non-contact measurement
US8792707B2 (en) 2007-08-17 2014-07-29 Renishaw Plc Phase analysis measurement apparatus and method
JP2009079934A (en) * 2007-09-25 2009-04-16 Shibuya Kogyo Co Ltd Three-dimensional measuring method
WO2009107981A3 (en) * 2008-02-26 2009-11-05 주식회사 고영테크놀러지 Apparatus and method for measuring a three-dimensional shape
CN101960253B (en) * 2008-02-26 2013-05-01 株式会社高永科技 Apparatus and method for measuring a three-dimensional shape
US8854610B2 (en) 2008-02-26 2014-10-07 Koh Young Technology Inc. Apparatus and method for measuring a three-dimensional shape
WO2009107981A2 (en) * 2008-02-26 2009-09-03 주식회사 고영테크놀러지 Apparatus and method for measuring a three-dimensional shape
US9329030B2 (en) 2009-09-11 2016-05-03 Renishaw Plc Non-contact object inspection
CN102519396A (en) * 2011-12-21 2012-06-27 哈尔滨理工大学 Three-dimensional information acquisition method for sampling points of three gray level symmetrical linear coding periods
JP2014081218A (en) * 2012-10-12 2014-05-08 Ricoh Elemex Corp Exterior appearance inspection device
CN105258653A (en) * 2015-10-27 2016-01-20 电子科技大学 Automatic detection method for detecting whether coloring of remote control keyboard is qualified
CN105258653B (en) * 2015-10-27 2017-10-27 电子科技大学 A kind of automatic testing method for situation qualification of being painted for keyboard for remote control

Also Published As

Publication number Publication date
JP3687531B2 (en) 2005-08-24

Similar Documents

Publication Publication Date Title
US10346963B2 (en) Point cloud merging from multiple cameras and sources in three-dimensional profilometry
JP5055191B2 (en) Three-dimensional shape measuring method and apparatus
US9007602B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and computer-readable medium storing control program
US9607406B2 (en) Size measurement device and size measurement method
JP3525964B2 (en) 3D shape measurement method for objects
JP5576726B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method, and program
WO2019153569A1 (en) Phase error correction method for defocusing phenomenon of fringe projection profilometric system
EP3594617B1 (en) Three-dimensional-shape measurement device, three-dimensional-shape measurement method, and program
WO2018163530A1 (en) Three-dimensional shape measurement device, three-dimensional shape measurement method, and program
JP6598673B2 (en) Data processing apparatus and method
JP2014115109A (en) Device and method for measuring distance
CN107705278B (en) Dynamic effect adding method and terminal equipment
JP2014115108A (en) Distance measuring device
JP3687531B2 (en) Three-dimensional shape measurement method and system
JP4516949B2 (en) Three-dimensional shape measuring apparatus and three-dimensional shape measuring method
JP6104662B2 (en) Measuring device, method and program
US9204130B2 (en) Method and system for creating a three dimensional representation of an object
JP2001124534A (en) Three-dimensional shape-measuring method
JP2001148012A (en) Method and device for searching corresponding point
CN113793273A (en) Point cloud noise deleting method based on phase shift fringe brightness amplitude
JP6099281B2 (en) Book reading system and book reading method
CN110832851B (en) Image processing apparatus, image conversion method, and program
Shi et al. Depth sensing with coding-free pattern based on topological constraint
JP5728399B2 (en) Measuring device, method and program
JP2016008837A (en) Shape measuring method, shape measuring device, structure manufacturing system, structure manufacturing method, and shape measuring program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050208

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050411

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050530

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

Free format text: PAYMENT UNTIL: 20090617

Year of fee payment: 4

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20090617

Year of fee payment: 4

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100617

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110617

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120617

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120617

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130617

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees