JP6166539B2 - Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program - Google Patents

Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program Download PDF

Info

Publication number
JP6166539B2
JP6166539B2 JP2013011238A JP2013011238A JP6166539B2 JP 6166539 B2 JP6166539 B2 JP 6166539B2 JP 2013011238 A JP2013011238 A JP 2013011238A JP 2013011238 A JP2013011238 A JP 2013011238A JP 6166539 B2 JP6166539 B2 JP 6166539B2
Authority
JP
Japan
Prior art keywords
image data
pattern image
pattern
measurement line
shape measuring
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.)
Active
Application number
JP2013011238A
Other languages
Japanese (ja)
Other versions
JP2014142277A (en
Inventor
安藤 利典
利典 安藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013011238A priority Critical patent/JP6166539B2/en
Publication of JP2014142277A publication Critical patent/JP2014142277A/en
Application granted granted Critical
Publication of JP6166539B2 publication Critical patent/JP6166539B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、被検物にパターンを投影しこれを撮像することで被検物の三次元形状データを取得する三次元形状計測装置、三次元形状計測装置の制御方法、およびプログラムに関し、特に、複数のパターンを被検物に投影、撮像し、その明暗境界の位置を算出する手法を用いる三次元形状計測装置、三次元形状計測装置の制御方法、およびプログラムに関する。   The present invention relates to a three-dimensional shape measuring apparatus, a three-dimensional shape measuring apparatus control method, and a program for acquiring a three-dimensional shape data of a test object by projecting and imaging a pattern on the test object. The present invention relates to a three-dimensional shape measuring apparatus, a method for controlling a three-dimensional shape measuring apparatus, and a program that use a method of projecting and imaging a plurality of patterns on a test object and calculating the position of a light / dark boundary.

被検物にパターンを投影しこれを撮像することで被検物の三次元形状データを取得する三次元形状計測技術が広く知られている。   A three-dimensional shape measurement technique for acquiring three-dimensional shape data of a test object by projecting a pattern onto the test object and imaging the pattern is widely known.

この技術において重要な要素は、投影したパターンを撮像し、パターンの特徴点をマーカーとして認識し、このマーカーの位置を正確に算出すること、及び複数のマーカーを個々に識別するために識別コードを与えること、撮像画像上のマーカー位置とこの識別コードとからマーカーの3次元座標を特定することである。   An important element in this technology is that the projected pattern is imaged, the feature points of the pattern are recognized as markers, the position of this marker is accurately calculated, and an identification code is used to identify multiple markers individually. Giving and specifying the three-dimensional coordinates of the marker from the marker position on the captured image and this identification code.

投影パターンとしてストライプ状の二値的な明暗分布を用い、その明暗の境界線をマーカーとして用いることが一般に行われている。   In general, a striped binary light-dark distribution is used as a projection pattern, and the light-dark boundary line is used as a marker.

特許文献1および非特許文献1においては、相補パターン投影という方法でマーカー位置を算出することが述べられている。相補パターン投影法とは、濃淡の変化が交番する二種類のパターンを被検面に投影、撮像し、撮像素子上でのパターンの明暗の交差点をマーカーとして利用するものである。当該マーカーのことを、特許文献1においては「明暗の境界」と表現しており、非特許文献1においては「しま模様エッジ位置」と表現している。   Patent Document 1 and Non-Patent Document 1 describe that a marker position is calculated by a method called complementary pattern projection. In the complementary pattern projection method, two types of patterns having alternating shades are projected and imaged on a surface to be examined, and a pattern intersection on the image sensor is used as a marker. The marker is expressed as “bright / dark boundary” in Patent Document 1, and is expressed as “striped pattern edge position” in Non-Patent Document 1.

上述したようにパターンとしてはストライプ状の明暗分布が多く用いられており、その結果、明暗の交点軌跡は線状に分布する為、本発明の説明においては以降マーカーのことを計測線と称する。   As described above, a stripe-shaped light / dark distribution is often used as a pattern, and as a result, the intersection locus of light and dark is distributed in a linear shape. Therefore, in the description of the present invention, the marker is hereinafter referred to as a measurement line.

このような方法で、撮像素子上での計測線の位置が計測されたのちに、個々の計測線を識別する為のパターンが投影される。このパターンは複数枚のパターンで構成されており、撮像素子上で計測線と同等位置にパターン毎に明暗の輝度分布が形成され、これを2値信号の列としてとらえて識別番号とする。このような方法は、いわゆる空間符号化、空間コード化と呼ばれる手法である。   After the position of the measurement line on the image sensor is measured by such a method, a pattern for identifying each measurement line is projected. This pattern is composed of a plurality of patterns, and a brightness distribution of brightness and darkness is formed for each pattern at the same position as the measurement line on the image sensor, and this is regarded as a binary signal column as an identification number. Such a method is a technique called so-called spatial coding or spatial coding.

特開2009−042015号公報JP 2009-042015 A

電子情報通信学会論文誌 D Vol.J71−D No.7 pp.1249−1257IEICE Transactions D Vol. J71-D No. 7 pp. 1249-1257

しかしながら、特許文献1および非特許文献1の技術では、この方法を用いると計測線位置に空間符号化パターンの明暗境界が一致するような場合、明暗の値が確定されず、識別コード付けが不安定になるという課題がある。   However, in the techniques of Patent Document 1 and Non-Patent Document 1, when this method is used, when the light / dark boundary of the spatial coding pattern coincides with the measurement line position, the light / dark value is not fixed, and the identification code is not attached. There is a problem of becoming stable.

上記の課題に鑑み、本発明は、空間符号化パターン判定の不安定性を低減して、空間符号化の精度を向上させることを目的とする。   In view of the above problems, an object of the present invention is to reduce the instability of spatial coding pattern determination and improve the accuracy of spatial coding.

上記の目的を達成する本発明に係る三次元形状計測装置は、
複数のパターンをそれぞれ被検物へ投影する投影手段と、
前記複数のパターンがそれぞれ投影された前記被検物を各々撮像し、複数のパターン画像データとして取得する撮像手段と、
前記複数のパターン画像データのうち、特定のパターン画像データの着目領域の明暗を、他のパターン画像データの対応領域の明暗に基づいて決定する決定手段と、
前記決定手段により決定された前記特定のパターン画像データの明暗と、前記他のパターン画像データの明暗とに基づいて、前記被検物の三次元座標を算出する算出手段と、
を備え
前記複数のパターンは、グレイコードパターンであることを特徴とする。
The three-dimensional shape measuring apparatus according to the present invention that achieves the above object is as follows.
Projecting means for projecting a plurality of patterns onto the test object,
Imaging means for capturing images of the test objects onto which the plurality of patterns are respectively projected, and acquiring the plurality of pattern image data;
Determining means for determining the contrast of the region of interest of the specific pattern image data among the plurality of pattern image data based on the contrast of the corresponding region of the other pattern image data;
Calculation means for calculating the three-dimensional coordinates of the test object based on the brightness of the specific pattern image data determined by the determination means and the brightness of the other pattern image data;
Equipped with a,
Wherein the plurality of patterns, characterized by a gray code pattern der Rukoto.

本発明によれば、空間符号化パターン判定の不安定性を低減して、空間符号化の精度を向上させることができる。   According to the present invention, the instability of spatial coding pattern determination can be reduced and the accuracy of spatial coding can be improved.

第1実施形態に係る三次元形状計測装置の構成例を示す図。The figure which shows the structural example of the three-dimensional shape measuring apparatus which concerns on 1st Embodiment. 第1実施形態に係る計測線設定パターン群Aを示す図。The figure which shows the measurement line setting pattern group A which concerns on 1st Embodiment. 第1実施形態に係る投影画像の撮像イメージ図。FIG. 3 is a captured image diagram of a projection image according to the first embodiment. 第1実施形態に係る空間符号化パターン群を示す図。The figure which shows the space coding pattern group which concerns on 1st Embodiment. 第1実施形態に係る計測線設定パターン群Aの撮像データを示す図。The figure which shows the imaging data of the measurement line setting pattern group A which concerns on 1st Embodiment. 第1実施形態に係る相補パターン差分信号Saを示す図。The figure which shows the complementary pattern difference signal Sa which concerns on 1st Embodiment. 第1実施形態に係る偶数番号の計測線に対応するグレイコードパターンを示す図。The figure which shows the gray code pattern corresponding to the even-numbered measurement line which concerns on 1st Embodiment. 第1実施形態に係る奇数番号の計測線に対応するグレイコードパターンを示す図。The figure which shows the gray code pattern corresponding to the odd-numbered measurement line which concerns on 1st Embodiment. 第2実施形態に係る計測線設定パターン群BおよびCを示す図。The figure which shows the measurement line setting pattern groups B and C which concern on 2nd Embodiment.

以下、添付の図面を参照して、本発明の実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.

(第1実施形態)
図1を参照して、第1実施形態に係る三次元形状計測装置の構成例を説明する。図1において、投影部1は、液晶パネル3と、液晶パネル3を照明する照明部2と、液晶パネル3の像を被検面6近傍に配置された被検物7へ投影する投影光学系4とを有している。 投影部1は、後述する投影撮像制御部20からの指令によってストライプ構造を有する所定パターンを被検物7へ投影する。
(First embodiment)
With reference to FIG. 1, the structural example of the three-dimensional shape measuring apparatus which concerns on 1st Embodiment is demonstrated. In FIG. 1, a projection unit 1 projects a liquid crystal panel 3, an illumination unit 2 that illuminates the liquid crystal panel 3, and a projection optical system that projects an image of the liquid crystal panel 3 onto a test object 7 disposed near the test surface 6. 4. The projection unit 1 projects a predetermined pattern having a stripe structure onto the test object 7 according to a command from the projection imaging control unit 20 described later.

また、撮像部8は、撮像素子10と、被検物7上へ投影されたパターンを撮像素子10上に輝度分布として結像し撮像させる撮像光学系9とを有している。 撮像部8は、後述する投影撮像制御部20からの指令によって撮像動作を行い、撮像素子10上の輝度分布を撮像素子10で離散的にサンプリングされた階調分布として、後述する階調交点算出部21へ出力する。
投影撮像制御部20は 投影部1を制御して所定のタイミングで所定パターンを被検物7へ投影するとともに、撮像部8を制御して被検物7のパターンを撮像させる。階調交点算出部21は、撮像部8から出力された情報に基づいて空間符号化法により被検物7の三次元座標を算出し、三次元形状を計測する。
In addition, the imaging unit 8 includes an imaging element 10 and an imaging optical system 9 that forms an image of a pattern projected on the test object 7 as a luminance distribution on the imaging element 10 and images the image. The imaging unit 8 performs an imaging operation in accordance with a command from a projection imaging control unit 20 described later, and calculates a gradation intersection described later as a gradation distribution discretely sampled by the imaging device 10. To the unit 21.
The projection imaging control unit 20 controls the projection unit 1 to project a predetermined pattern onto the test object 7 at a predetermined timing, and controls the imaging unit 8 to image the pattern of the test object 7. The gradation intersection calculation unit 21 calculates the three-dimensional shape by calculating the three-dimensional coordinates of the test object 7 by the spatial encoding method based on the information output from the imaging unit 8.

図2は、計測線を規定する為の投影パターンである計測線設定パターン群Aのストライプ構造を示すものであり、投影撮像制御部20が指令し投影部1によって被検物7上に投影する所定パターンの一部である。   FIG. 2 shows a stripe structure of a measurement line setting pattern group A that is a projection pattern for defining a measurement line. The projection imaging control unit 20 commands the projection structure 1 to project it onto the test object 7. Part of the predetermined pattern.

図2において、白が明部、黒が暗部を示しており パターンA_ref及び A_invは交互に明部と暗部とが繰り返し、且つ両パターンで明暗が反転しており、これにより被検面6上に相補的な照度分布を形成することができる。また図2における番号はパターン番号であり、A_refでは偶数のときに明、A_invでは奇数の場合に明となるように設定している。   In FIG. 2, white indicates a bright portion and black indicates a dark portion. In the patterns A_ref and A_inv, a bright portion and a dark portion are alternately repeated, and the light and darkness are reversed in both patterns. A complementary illumination distribution can be formed. The numbers in FIG. 2 are pattern numbers, and are set so that A_ref is bright when the number is even and A_inv is bright when the number is odd.

図3は、被検物7が平面形状である場合に当該被検物へ投影されたパターンを撮像部1で撮像した場合の二次元の撮像イメージを模式的に示したものである。   FIG. 3 schematically shows a two-dimensional captured image when the imaging unit 1 captures a pattern projected onto the test object 7 when the test object 7 has a planar shape.

ここで撮像素子10上でパターンの明暗交番する方向をX方向、変化の少ない方向をY方向としている。また、以降X方向の画素番号をi、Y方向の画素番号をjと表記することとする。   Here, the direction in which the pattern alternates on the image sensor 10 is the X direction, and the direction with little change is the Y direction. Further, hereinafter, the pixel number in the X direction is denoted by i, and the pixel number in the Y direction is denoted by j.

図4は、計測線に番号を設定する為の、グレイコードを用いた空間符号化用パターンであり、投影撮像制御部20が指令し投影部1によって被検物7上に投影する所定パターンの一部である。   FIG. 4 is a spatial coding pattern using a Gray code for setting a number to a measurement line. The pattern is a predetermined pattern that is projected by the projection imaging control unit 20 onto the test object 7 as instructed by the projection imaging control unit 20. It is a part.

図4において、nはグレイコードのビット番号に対応しており、n=1は最下位ビットn=2は2ビット目、以下同様に上位ビットに対応したパターンが示されている。空間符号化法においてはこれらのパターンを順次投影し、それぞれ撮像する。以下、ビット番号nに対応したパターンをGnと称し、これに対応した撮像画像をIGnと表現する。   In FIG. 4, n corresponds to the bit number of the Gray code, n = 1 indicates the least significant bit, n = 2 indicates the second bit, and so on. In the spatial coding method, these patterns are sequentially projected and imaged respectively. Hereinafter, a pattern corresponding to bit number n is referred to as Gn, and a captured image corresponding to this is expressed as IGn.

以下に説明する本実施形態に係る各処理は、主として三次元形状計測装置が備える階調交点算出部21が実施する。   Each processing according to the present embodiment described below is mainly performed by the gradation intersection calculation unit 21 included in the three-dimensional shape measurement apparatus.

<計測線の取得>
投影撮像制御部20は、計測線の取得のために図2に示した計測線設定パターン群Aの二種類のパターンA_ref及びA_invを投影部1を用いて被検物7上に投影し、撮像部8を用いてそれぞれに対する撮像画像IA_ref(i,j)及びIA_inv(i,j)を順次取得する。
<Acquisition of measurement line>
The projection imaging control unit 20 projects the two types of patterns A_ref and A_inv of the measurement line setting pattern group A shown in FIG. The captured images IA_ref (i, j) and IA_inv (i, j) for each are sequentially acquired using the unit 8.

図5は、被検物7上に投影した計測線設定パターン群Aを撮像部で撮像した場合の輝度データを表したものであり、実線はIA_ref、破線はIA_invに対応している。   FIG. 5 shows luminance data when the imaging line setting pattern group A projected onto the test object 7 is imaged by the imaging unit. The solid line corresponds to IA_ref, and the broken line corresponds to IA_inv.

図5における横軸は、座標X方向の撮像データ画素番号である。縦軸は、各画素における輝度を表しており、パターン撮像輝度の最大値で正規化している。また輝度は暗部が0に明部が正になるようにしている。相補的パターン法ではIA_ref、IA_invの輝度が等しい部分、即ち図5における実線と破線の交点のX座標を計測線位置として算出するが、これは二つの信号の差分をとり、その値が0となる位置を計測線位置として算出してもよい。   The horizontal axis in FIG. 5 is the imaging data pixel number in the coordinate X direction. The vertical axis represents the luminance at each pixel and is normalized by the maximum value of the pattern imaging luminance. Also, the brightness is set so that the dark part is 0 and the bright part is positive. In the complementary pattern method, the X-coordinate of the intersection of the solid line and the broken line in FIG. 5 is calculated as the measurement line position where the luminances of IA_ref and IA_inv are equal, but this takes the difference between the two signals and the value is 0. May be calculated as the measurement line position.

図6は、IA_refからIA_invを減じた相補パターン差分信号Saである。図6においては 画素番号4と5の間、9と10の間、14と15の間、19と20の間に 値が0となる位置があり、これらの位置をもって計測線位置とする。   FIG. 6 shows a complementary pattern difference signal Sa obtained by subtracting IA_inv from IA_ref. In FIG. 6, there are positions where the value is 0 between pixel numbers 4 and 5, between 9 and 10, between 14 and 15, and between 19 and 20, and these positions are taken as measurement line positions.

撮像素子10上で計測線をはさむ二つの画素を本発明では「隣接画素」と呼び、このうち画素番号の小さいものを便宜上「左側隣接画素」、大きいものを「右側隣接画素」と呼ぶものとする。計測線が画素位置と一致した場合はこの画素の番号を「左側隣接画素」と呼び 画素番号が1つ大となる画素を「右側隣接画素」と呼ぶ。   Two pixels sandwiching a measurement line on the image sensor 10 are referred to as “adjacent pixels” in the present invention, and among these, a pixel having a smaller pixel number is referred to as a “left adjacent pixel” for convenience and a pixel having a larger pixel number is referred to as a “right adjacent pixel”. To do. When the measurement line coincides with the pixel position, this pixel number is referred to as “left adjacent pixel”, and the pixel whose pixel number is one larger is referred to as “right adjacent pixel”.

A_refパターンは偶数番号において点灯、奇数番号において消灯であり、A_invパターンはその逆であるから、IA_ref輝度値からIA_inv輝度値を減じた相補パターン差分信号Saは正の部分が偶数、負の部分が奇数のパターンにそれぞれ対応している。計測線位置はこれらのパターン明暗の境界に存在しており、それぞれに与える番号は隣接するパターン番号の絶対値の小さい方と規定すれば、図6において計測線Aは偶数(4)、計測線Bは奇数(9)であることが判明する。即ち、計測線位置において差分データが正から負に変化する場合は偶数計測線、負から正に変化する場合は奇数計測線と判定すればよい。   Since the A_ref pattern is turned on at the even number and turned off at the odd number, and the A_inv pattern is the opposite, the complementary pattern difference signal Sa obtained by subtracting the IA_inv luminance value from the IA_ref luminance value has an even number in the positive part and a negative part in the complementary pattern difference signal Sa. Each corresponds to an odd number of patterns. The measurement line position exists at the boundary between these pattern bright and dark, and if the number given to each pattern is defined as the smaller absolute value of the adjacent pattern number, the measurement line A is an even number (4) in FIG. It turns out that B is an odd number (9). That is, if the difference data changes from positive to negative at the measurement line position, it may be determined as an even measurement line, and if the difference data changes from negative to positive, it may be determined as an odd measurement line.

<計測線への番号付け>
次に、投影撮像制御部20は、図4に示した空間符号化パターン群Gn(n=1〜5)を、投影部1を用いて被検物7上に順次投影し、撮像部8を用いてそれぞれに対する撮像画像IGn(i,j)を順次取得する。計測線への番号付けは、従来はその計測線の隣接画素の値が各IGnでどのように変化するかを検査し、これをよく知られたグレイコードとしてとらえ、通常これを2進数や10進数に変換することによって行われている。
<Numbering measurement lines>
Next, the projection imaging control unit 20 sequentially projects the spatial coding pattern group Gn (n = 1 to 5) shown in FIG. 4 onto the test object 7 using the projection unit 1, and the imaging unit 8 is The captured images IGn (i, j) for each are sequentially acquired. Conventionally, the numbering of the measurement line is performed by examining how the value of the adjacent pixel of the measurement line changes in each IGn, and this is regarded as a well-known gray code. This is done by converting to hex.

例えば、計測線番号7に対応する隣接画素は、図4のパターン群において番号7と8の境界近辺に存在しており、グレイコードは、n=1であるIG1は暗部であるから0、n=2であるIG2も暗部であるから0、n=3であるIG3は明部であるから1、n=5であるIG5は暗部であるから0となる。そしてn=4であるIG4は境界部分で明暗が変化しているが、隣接するパターン番号の小さい投影画素は暗部であるから0として、グレイコードを設定する。この場合、上位ビットから順に「00100」 となり、これにグレイコードの変換手法を用いれば、番号7を得ることができる。   For example, the adjacent pixel corresponding to the measurement line number 7 exists in the vicinity of the boundary between the numbers 7 and 8 in the pattern group of FIG. 4 and the gray code is 0, n because IG1 where n = 1 is a dark part. IG2 with = 2 is 0 because it is a dark part, IG3 with n = 3 is 1 because it is a bright part, and IG5 with n = 5 is 0 because it is a dark part. In IG4 where n = 4, the brightness changes at the boundary portion, but the adjacent projection pixel with a small pattern number is a dark portion, so that the gray code is set to 0. In this case, it becomes “00100” in order from the upper bits, and the number 7 can be obtained by using the Gray code conversion technique.

しかしながら、IG4では隣接画素部分で明暗が変化しているためその値を特定することが困難であり、誤判定が発生する可能性がある。仮に0であるはずのIG4を1と判定した場合、グレイコードは「01100」となり、これを変換すると番号8が得られてしまう。このように隣接画素位置で空間符号化パターンの明暗が変化して値の取得が困難となることを、本発明においては「不定」であると表現する。   However, in IG4, since the brightness changes in the adjacent pixel portion, it is difficult to specify the value, and erroneous determination may occur. If it is determined that IG4, which should be 0, is 1, the gray code is “01100”, and if this is converted, the number 8 is obtained. In this invention, it is expressed as “indeterminate” that the value of the spatial coding pattern changes at adjacent pixel positions and thus it becomes difficult to obtain a value.

そこで、本実施形態では、計測線への符号付けに際し、その計測線の隣接画素の値が不定となる符号化パターン番号を予測し、この画像に対応するビットの判定を行わずに他の画像の情報からその値を決定する。   Therefore, in the present embodiment, when encoding a measurement line, an encoding pattern number in which the value of an adjacent pixel of the measurement line is indefinite is predicted, and another image is not determined without determining the bit corresponding to this image. The value is determined from the information.

<偶数コードを有する計測線の符号付け>
図7は、偶数の計測線番号に対するグレイコードパターンの変化の様子を示している。偶数番号を与えるべき計測線においては、最下位ビット(n=1)に対応するパターンのみ、計測線の隣接画素近辺で明暗が反転しており、それ以上の高位ビット(n=2〜5)では 隣接画素間で明暗の反転は無い。
<Signaling of measurement line with even code>
FIG. 7 shows how the gray code pattern changes for even measurement line numbers. In the measurement line to which an even number should be given, only the pattern corresponding to the least significant bit (n = 1) has the light and darkness reversed in the vicinity of the adjacent pixel of the measurement line, and the higher order bits (n = 2 to 5). Then there is no inversion of light and dark between adjacent pixels.

これは、そもそもグレイコードがそのコードの変化においてただひとつのビットのみ 0、1が変化するという特性を持たせたものであり、且つ最下位ビット(n=1)は2画素ごとに明暗が切り替わる特性があるからである。   In the first place, the Gray code has a characteristic that only one bit changes when the code changes, 0 and 1 change, and the least significant bit (n = 1) switches between light and dark every two pixels. This is because there are characteristics.

本実施形態では、計測線隣接画素で明暗反転が起こるパターンについては、そのパターンの評価を省略することにより計測精度を向上させるものである。すなわち偶数番号の計測線に関しては最下位ビット(n=1)のパターンの評価を無視し、その他のビットのパターンを計測する。 例えば、計測線コード6に対応する隣接画素の値は、n=1を不定とし、n=2からn=5までの上位が暗、明、暗、暗であるから、グレイコードは不定なビットをXとして、上位ビットから順に「0010X」となる。   In the present embodiment, the measurement accuracy is improved by omitting the evaluation of the pattern with respect to the pattern in which the brightness inversion occurs in the pixels adjacent to the measurement line. That is, for the even-numbered measurement line, the evaluation of the pattern of the least significant bit (n = 1) is ignored, and the pattern of the other bits is measured. For example, as for the value of the adjacent pixel corresponding to the measurement line code 6, n = 1 is indefinite, and the upper part from n = 2 to n = 5 is dark, bright, dark, dark, so the gray code is an indefinite bit. X is “0010X” in order from the upper bit.

グレイコードは、それが対応する数値とコードのパリティー(コード中の1の個数)の偶奇が一致するという特性を有している。「0010X」で判明しているパリティーは1であり奇数となるが、表す数値は偶数となるはずであるからXは1でなければならない。そこで対応するグレイコードは「00101」となり、これは番号6を表す。   The gray code has a characteristic that the even number of the numerical value to which it corresponds and the parity of the code (the number of 1s in the code) match. The parity known by “0010X” is 1, which is an odd number, but the numerical value to be represented should be an even number, so X must be 1. Therefore, the corresponding gray code is “00101”, which represents the number 6.

計測線コード8については、同様に不定ビットをXとしてグレイコードは「0110X」であり、パリティーを偶数にするためX=0、即ち「01100」とすればよく、これは番号8を表す。   For the measurement line code 8, similarly, the indefinite bit is X and the gray code is “0110X”. To make the parity even, X = 0, that is, “01100” may be used.

このように、複数のパターン画像データ(IGn)のうち、明暗を決定すべき特定のパターン画像データ(IG1)を、パターン画像データ上での着目位置(偶数コードを有する計測線位置)に応じて特定する。また特定のパターン画像データ(IG1)の明暗を、他のパターン画像データ(IG2〜IG5)の明暗と、着目位置(偶数コードを有する計測線位置)に対応するパリティーの値(偶数)とに基づいて決定する。   In this way, among the plurality of pattern image data (IGn), the specific pattern image data (IG1) whose light and darkness should be determined is determined according to the position of interest (measurement line position having an even code) on the pattern image data. Identify. The brightness of the specific pattern image data (IG1) is determined based on the brightness of the other pattern image data (IG2 to IG5) and the parity value (even number) corresponding to the position of interest (measurement line position having an even code). To decide.

なお、偶数番号を付ける場合はn=1でのみ不定になるのであるから、別法としてXを予測するのではなくn=1を除いたグレイコードで数値を求めて、最後にこれを二倍することによっても正しい値を求められる。例えば「0010X」に関してはXを除いたグレイコード「0010」は番号3であり、これを2倍して番号6となり、「0110X」に関してはXを除いたグレイコード「0110」は番号4であり、これを2倍して番号8となる。   In addition, since even numbers are indeterminate only when n = 1, instead of predicting X, a numerical value is obtained with a Gray code excluding n = 1 and finally doubled. By doing so, the correct value can be obtained. For example, for “0010X”, the gray code “0010” excluding X is number 3 and is doubled to become number 6, and for “0110X”, the gray code “0110” excluding X is number 4. This is doubled to become number 8.

<奇数コードを有する計測線の符号付け>
図8は、奇数の計測線番号に対するグレイコードパターンの変化の様子を示している。奇数番号を与えるべき計測線に関しては、n=2以上の高位ビットで計測線の隣接画素で明暗が反転するが、その位置は計測線コードにより変化する。
<Signaling of measurement line having odd number code>
FIG. 8 shows how the gray code pattern changes for odd measurement line numbers. For a measurement line to which an odd number is to be given, brightness is inverted at a pixel adjacent to the measurement line with a high-order bit of n = 2 or more, but the position changes depending on the measurement line code.

しかしながら、反転するビットの1つだけ下位のビットは必ず1であり、それがn=1であるか、或いはそのビットよりさらに下位のビットは必ず0であるという特性がある。   However, there is a characteristic that the bit lower by one of the bits to be inverted is always 1 and that it is n = 1, or the bit lower than that bit is always 0.

図8において不定となるビットをXとすると、計測線コード1では上位ビットから順に 「000X1」、計測線コード3では「00X10」、計測線コード5では「001X1」、計測線コード7では「0X100」、計測線コード9では「011X1」、計測線コード11では「01X10」、計測線コード13では「010X1」、そして計測線コード15では「X1000」となり、上記特性を有することがわかる。   In FIG. 8, when X is an indefinite bit, “000X1” is measured in order from the upper bit in measurement line code 1, “00X10” in measurement line code 3, “001X1” in measurement line code 5, and “0X100” in measurement line code 7. "011X1" for the measurement line code 9, "01X10" for the measurement line code 11, "010X1" for the measurement line code 13, and "X1000" for the measurement line code 15, indicating that the above characteristics are obtained.

即ち、奇数のコードをもつ計測線においては、下位ビットから0、1の評価を行い、初めて1となった部分の上位ビットを不定として特定し、残りのビットの評価を行えばよい。   That is, for a measurement line having an odd number of codes, 0 and 1 are evaluated from the lower bits, the upper bits of the portion that becomes 1 for the first time are specified as indefinite, and the remaining bits are evaluated.

最後に不定ビットを除いたパリティーの検査を行い、全体のパリティーが奇数となるように不定ビットの0、1を確定してコードを算出する。   Finally, a parity check excluding the indefinite bits is performed, and the codes are calculated by determining 0 and 1 of the indefinite bits so that the overall parity becomes an odd number.

例えば、計測線コード7の位置では「0X100」 であり、パリティーが1であるからパリティーを奇数にするためにXを0として「00100」とし、これからコード7を得る。また計測線コード13の位置では「010X1」であり、パリティーが2であるから パリティーを奇数にするためにXを1として「01011」とし、これからコード13を得ることができる。   For example, at the position of the measurement line code 7, it is “0X100”, and since the parity is 1, X is set to 0 to “00100” in order to make the parity odd, and the code 7 is obtained therefrom. Further, since the position of the measurement line code 13 is “010X1” and the parity is 2, X is set to 1 to “01011” in order to make the parity odd, and the code 13 can be obtained therefrom.

このように、複数のパターン画像データ(IGn)のうち、明暗を決定すべき特定のパターン画像データ(下位ビットから0、1の評価を行い、初めて1となった部分の上位ビットに対応するIGk)を、パターン画像データ上での着目位置(奇数コードを有する計測線位置)に応じて特定する。また特定のパターン画像データ(IGk)の明暗を、他のパターン画像データ(IG1、…、IGk−1、IGk+1、…)の明暗と、着目位置(奇数コードを有する計測線位置)に対応するパリティーの値(奇数)とに基づいて決定する。   In this way, among the plurality of pattern image data (IGn), specific pattern image data for which light and darkness should be determined (0 to 1 are evaluated from the lower bits, and IGk corresponding to the upper bits of the portion that becomes 1 for the first time) ) Is specified according to the position of interest (measurement line position having an odd code) on the pattern image data. Further, the light and darkness of the specific pattern image data (IGk), the parity corresponding to the lightness and darkness of the other pattern image data (IG1,..., IGk-1, IGk + 1,...) And the position of interest (measurement line position having an odd code). It is determined based on the value (odd number).

以上説明したように、本実施形態では、複数のパターン画像データ(IGn)のうち、特定のパターン画像データの着目領域(例えば、偶数コードを有する計測線の例ではIG1(n=1)、奇数コードを有する計測線の例ではn=1の下位ビットから順に0、1の評価を行い、最初に1となったビットに対応するn=kの上位ビットであるIGk+1)の明暗を、他のパターン画像データの対応領域(例えば、偶数コードを有する計測線の例ではIG2〜IG5(n=2〜5)、奇数コードを有する計測線の例ではIGk+1以外のIGn)の明暗に基づいて決定する。そして、決定された特定のパターン画像データの明暗と、他のパターン画像データの明暗とに基づいて、空間符号化法により被検物の三次元座標を算出する。   As described above, in the present embodiment, among a plurality of pattern image data (IGn), a region of interest of specific pattern image data (for example, IG1 (n = 1) in the example of a measurement line having an even code), an odd number In the example of the measurement line having a code, 0 and 1 are evaluated in order from the lower bit of n = 1, and the lightness of IGk + 1), which is the upper bit of n = k corresponding to the bit that has become 1 first, It is determined based on the contrast of the pattern image data (for example, IG2 to IG5 (n = 2 to 5) in the example of the measurement line having an even code and IGn other than IGk + 1 in the example of the measurement line having an odd code). . Then, based on the determined brightness of the specific pattern image data and the brightness of the other pattern image data, the three-dimensional coordinates of the test object are calculated by a spatial encoding method.

本実施形態によれば、空間符号化パターン判定の不安定性を低減して空間符号化の精度を向上させるとともに、不要なパターンの判定を省略することで処理時間の短縮を行うことが可能となる。   According to the present embodiment, it is possible to improve the accuracy of spatial coding by reducing instability of spatial coding pattern determination, and to shorten processing time by omitting unnecessary pattern determination. .

(第2実施形態)
第1実施形態では、相補パターンとして、コード毎に明暗を繰り返すパターンを用いたが、他のパターンを使用してもよい。第2実施形態では、二画素ごとに明暗を繰り返すパターン4枚を用いる場合について説明する。
(Second Embodiment)
In the first embodiment, a pattern that repeats light and dark for each code is used as the complementary pattern, but other patterns may be used. In the second embodiment, a case where four patterns that repeat light and dark for every two pixels are used will be described.

図9は、第2実施形態に係る計測線設定パターン群B及びCを示している。第2実施形態に係るパターンは、第1実施形態に比べて周期が粗く、空間周波数が低いため、投影系、撮像系の解像度の影響を受けにくいというメリットがある。   FIG. 9 shows measurement line setting pattern groups B and C according to the second embodiment. The pattern according to the second embodiment has a merit that it is less affected by the resolution of the projection system and the imaging system because the pattern is coarser and the spatial frequency is lower than that of the first embodiment.

第1実施形態と同様にグレイコードの境界に計測線を設定し、隣接グレイコードのうち小さい方をその計測線のコードに対応させる。計測線の位置は、第1実施形態と同様に相補パターンの差分を求め、それが0となる位置として特定する。   Similar to the first embodiment, the measurement line is set at the boundary of the gray code, and the smaller one of the adjacent gray codes is associated with the code of the measurement line. The position of the measurement line is specified as a position where the difference between the complementary patterns is obtained as in the first embodiment and becomes zero.

相補パターンBの差分データをSb=B_ref−Binvとすると、その0点位置は計測線コードの偶数に対応するように構成されている。相補パターンCの差分データをSc=C_ref−C_invとするとその0点位置は計測線コードの奇数に対応するように構成されている。   When the difference data of the complementary pattern B is Sb = B_ref−Binv, the 0 point position is configured to correspond to an even number of measurement line codes. When the difference data of the complementary pattern C is Sc = C_ref−C_inv, the 0 point position is configured to correspond to the odd number of the measurement line code.

さらに、Scが正から負に変化する位置の計測線は1、5、9、…、すなわち{4×(k−1)+1;k=1、2、…}に対応し、Scが負から正に変化する位置の計測線は3、7、11、…、すなわち{4×(k−1)+3}となる。   Further, the measurement line at the position where Sc changes from positive to negative corresponds to 1, 5, 9,..., That is, {4 × (k−1) +1; k = 1, 2,. The measurement line at the positive change position is 3, 7, 11,..., That is, {4 × (k−1) +3}.

相補パターンBによって規定される計測線をB列と呼び、相補パターンCによって規定され、さらに上述したように1、5、9、…、すなわち{4×(k−1)+1;k=1、2、…}となる計測線群をC1列と呼び、3、7、11、…、すなわち{4×(k−1)+3}となる計測線群をC3列と呼ぶ。   A measurement line defined by the complementary pattern B is referred to as a B column, and is defined by the complementary pattern C. Further, as described above, 1, 5, 9,..., {4 × (k−1) +1; The measurement line group that becomes 2, ...} is referred to as column C1, and 3, 7, 11, ..., that is, the measurement line group that becomes {4 × (k-1) +3}, is referred to as column C3.

B列はすべての計測線が偶数であるから、第1実施形態で説明した偶数計測線のコード化手法を用いればよい。C1列はすべての計測線が奇数であり、図8に示されるようにn=1のパターンが必ず1であり、n=2に不定ビットが存在する。C3列はすべての計測線が奇数であり、n=1のパターンが必ず0であり、n=3以上に不定ビットが存在する。   Since all measurement lines are even in column B, the encoding method for even measurement lines described in the first embodiment may be used. In the C1 column, all the measurement lines are odd numbers, and the pattern of n = 1 is always 1 as shown in FIG. 8, and there is an indefinite bit at n = 2. In the C3 column, all the measurement lines are odd numbers, the pattern of n = 1 is always 0, and there are undefined bits at n = 3 or higher.

そこで、C1列と判定された計測線では隣接画素におけるn=3以上のパターンの明暗を判定してパリティーを計測し、全ビットのパリティーが奇数となるように不定ビットの値を決定する。またC3列と判定された計測線では、第1実施形態で説明した奇数計測線と同様の不定ビット探索、決定を行えばよい。   Therefore, in the measurement line determined to be the C1 column, the parity is measured by determining the brightness of the pattern of n = 3 or more in the adjacent pixels, and the value of the indefinite bit is determined so that the parity of all bits is an odd number. For the measurement line determined to be the column C3, the indefinite bit search and determination similar to the odd measurement line described in the first embodiment may be performed.

このようにすればB列、C1列においては不定ビットの位置を探索する必要はなくなり、またすべての列についてn=1のパターン判定を行う必要がないので、これに対応するパターン画像を参照する必要もなくなる。   In this way, it is not necessary to search for the position of the indefinite bit in the B column and the C1 column, and it is not necessary to perform the pattern determination of n = 1 for all the columns, so the corresponding pattern image is referred to. There is no need.

このため、本実施形態によれば、画像の明暗判定に要する時間や、不定ビット探索時間が削減でき、さらに明暗判定、探索エラー確率の低減等のメリットがある。   For this reason, according to the present embodiment, it is possible to reduce the time required for image brightness determination and the indefinite bit search time, and there are advantages such as brightness determination, reduction in search error probability, and the like.

以上説明したように、本発明によれば、個々の計測線について空間符号化パターン群のうち 対応する位置に明暗の境界が存在するパターンを予測し、このパターンに対応する値を他のパターン群から予測することで、明暗判定の不安定なパターンの識別を行わずに正確にコードを特定することが可能となる。   As described above, according to the present invention, a pattern in which a light / dark boundary exists at a corresponding position in a spatially encoded pattern group for each measurement line is predicted, and a value corresponding to this pattern is set to another pattern group. Therefore, it is possible to accurately specify a code without identifying an unstable pattern for light / dark determination.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (5)

複数のパターンをそれぞれ被検物へ投影する投影手段と、
前記複数のパターンがそれぞれ投影された前記被検物を各々撮像し、複数のパターン画像データとして取得する撮像手段と、
前記複数のパターン画像データのうち、特定のパターン画像データの着目領域の明暗を、他のパターン画像データの対応領域の明暗に基づいて決定する決定手段と、
前記決定手段により決定された前記特定のパターン画像データの明暗と、前記他のパターン画像データの明暗とに基づいて、前記被検物の三次元座標を算出する算出手段と、
を備え
前記複数のパターンは、グレイコードパターンであることを特徴とする三次元形状計測装置。
Projecting means for projecting a plurality of patterns onto the test object,
Imaging means for capturing images of the test objects onto which the plurality of patterns are respectively projected, and acquiring the plurality of pattern image data;
Determining means for determining the contrast of the region of interest of the specific pattern image data among the plurality of pattern image data based on the contrast of the corresponding region of the other pattern image data;
Calculation means for calculating the three-dimensional coordinates of the test object based on the brightness of the specific pattern image data determined by the determination means and the brightness of the other pattern image data;
Equipped with a,
Wherein the plurality of patterns, three-dimensional shape measuring device according to claim gray code pattern der Rukoto.
前記決定手段は、前記複数のパターン画像データのうち、明暗を決定すべき前記特定のパターン画像データを、パターン画像データ上での着目位置に応じて特定することを特徴とする請求項1に記載の三次元形状計測装置。   The said determination means specifies the said specific pattern image data which should determine light and dark among these pattern image data according to the focus position on pattern image data. 3D shape measuring device. 前記決定手段は、前記特定のパターン画像データの明暗を、前記他のパターン画像データの明暗と、前記着目位置に対応するパリティーの値とに基づいて決定することを特徴とする請求項2に記載の三次元形状計測装置。   The said determination means determines the brightness of the said specific pattern image data based on the brightness of the said other pattern image data, and the value of the parity corresponding to the said attention position. 3D shape measuring device. 投影手段と、撮像手段と、決定手段と、算出手段とを備える三次元形状計測装置の制御方法であって、
前記投影手段が、複数のパターンをそれぞれ被検物へ投影する投影工程と、
前記撮像手段が、前記複数のパターンがそれぞれ投影された前記被検物を各々撮像し、複数のパターン画像データとして取得する撮像工程と、
前記決定手段が、前記複数のパターン画像データのうち、特定のパターン画像データの着目領域の明暗を、他のパターン画像データの対応領域の明暗に基づいて決定する決定工程と、
前記算出手段が、前記決定工程で決定された前記特定のパターン画像データの明暗と、前記他のパターン画像データの明暗とに基づいて、前記被検物の三次元座標を算出する算出工程と、
を有し、
前記複数のパターンは、グレイコードパターンであることを特徴とする三次元形状計測装置の制御方法。
A control method for a three-dimensional shape measuring apparatus comprising a projecting means, an imaging means, a determining means, and a calculating means,
A projecting step in which the projecting means projects each of the plurality of patterns onto the test object;
An imaging step in which the imaging means images each of the test objects onto which the plurality of patterns are projected, and acquires the plurality of pattern image data;
A determining step in which the determining means determines the contrast of the region of interest of the specific pattern image data among the plurality of pattern image data based on the contrast of the corresponding region of the other pattern image data;
A calculating step for calculating the three-dimensional coordinates of the test object based on the brightness of the specific pattern image data determined in the determining step and the brightness of the other pattern image data;
I have a,
Wherein the plurality of patterns, the control method of the three-dimensional shape measuring apparatus, wherein a gray code pattern der Rukoto.
請求項に記載の三次元形状計測装置の制御方法の各工程をコンピュータに実行させるためのプログラム。 The program for making a computer perform each process of the control method of the three-dimensional shape measuring apparatus of Claim 4 .
JP2013011238A 2013-01-24 2013-01-24 Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program Active JP6166539B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013011238A JP6166539B2 (en) 2013-01-24 2013-01-24 Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013011238A JP6166539B2 (en) 2013-01-24 2013-01-24 Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program

Publications (2)

Publication Number Publication Date
JP2014142277A JP2014142277A (en) 2014-08-07
JP6166539B2 true JP6166539B2 (en) 2017-07-19

Family

ID=51423683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013011238A Active JP6166539B2 (en) 2013-01-24 2013-01-24 Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program

Country Status (1)

Country Link
JP (1) JP6166539B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11344307A (en) * 1998-06-01 1999-12-14 Daihatsu Motor Co Ltd Work take-out device
JP4043931B2 (en) * 2002-12-09 2008-02-06 株式会社リコー 3D information acquisition system
JP5032889B2 (en) * 2007-05-28 2012-09-26 パナソニック株式会社 Three-dimensional measurement method and apparatus using spatial coding method
US8964189B2 (en) * 2010-08-19 2015-02-24 Canon Kabushiki Kaisha Three-dimensional measurement apparatus, method for three-dimensional measurement, and computer program

Also Published As

Publication number Publication date
JP2014142277A (en) 2014-08-07

Similar Documents

Publication Publication Date Title
EP2459960B1 (en) Measuring apparatus, measuring method, and computer program
KR101461068B1 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and storage medium
JP6161276B2 (en) Measuring apparatus, measuring method, and program
US20130155417A1 (en) Three-dimensional measurement apparatus, method for three-dimensional measurement, and computer program
US20120089364A1 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and computer-readable medium storing control program
JP5517829B2 (en) Three-dimensional measuring apparatus and three-dimensional measuring method
US10430962B2 (en) Three-dimensional shape measuring apparatus, three-dimensional shape measuring method, and storage medium that calculate a three-dimensional shape of an object by capturing images of the object from a plurality of directions
US20150271466A1 (en) Measuring device, measuring method, and computer program product
JP5971050B2 (en) Shape measuring apparatus and shape measuring method
JP2012251997A (en) Three-dimensional measurement device, method for controlling three-dimensional measurement device and program
JP5032889B2 (en) Three-dimensional measurement method and apparatus using spatial coding method
JP2016180708A (en) Distance measurement device, distance measurement method and program
CN109696191B (en) Movement delay measurement method of virtual reality head-mounted display equipment
JP6166539B2 (en) Three-dimensional shape measuring apparatus, control method for three-dimensional shape measuring apparatus, and program
US20210156677A1 (en) Three-dimensional measurement apparatus and method
WO2022254854A1 (en) Three-dimensional measurement device
JP4430680B2 (en) 3D dimension measuring apparatus and 3D dimension measuring program
JP4351090B2 (en) Image processing apparatus and image processing method
JP2014194436A (en) Three-dimensional measurement device, three-dimensional measurement method and program
WO2023008509A1 (en) Information processing program and information processing device
JP2016050794A (en) Edge position detecting device, and edge position detecting method
WO2023167162A1 (en) Dot pattern generation method and three-dimensional measurement device
JP5371015B2 (en) Cross mark detection apparatus and method, and program
JPS63108204A (en) Size measuring method
EP3617661A1 (en) Absolute position detection apparatus and method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161114

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170110

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170623

R151 Written notification of patent or utility model registration

Ref document number: 6166539

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151