JP5968370B2 - Three-dimensional measuring apparatus, three-dimensional measuring method, and program - Google Patents

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

Info

Publication number
JP5968370B2
JP5968370B2 JP2014137063A JP2014137063A JP5968370B2 JP 5968370 B2 JP5968370 B2 JP 5968370B2 JP 2014137063 A JP2014137063 A JP 2014137063A JP 2014137063 A JP2014137063 A JP 2014137063A JP 5968370 B2 JP5968370 B2 JP 5968370B2
Authority
JP
Japan
Prior art keywords
image
reliability
pattern
target object
line
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
JP2014137063A
Other languages
Japanese (ja)
Other versions
JP2014194436A (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 JP2014137063A priority Critical patent/JP5968370B2/en
Publication of JP2014194436A publication Critical patent/JP2014194436A/en
Application granted granted Critical
Publication of JP5968370B2 publication Critical patent/JP5968370B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、明部と暗部が任意の幅で配置するパターン光を複数枚投影して距離情報を取得する空間符号化法により三次元形状を計測する三次元計測装置、三次元計測方法、及びプログラムに関する。   The present invention relates to a three-dimensional measurement apparatus, a three-dimensional measurement method, and a three-dimensional measurement method for measuring a three-dimensional shape by a spatial encoding method that obtains distance information by projecting a plurality of pattern lights in which bright and dark portions are arranged with arbitrary widths, and Regarding the program.

被写体にパターン光を複数枚投影して、パターン光が投影された被写体を撮像することで、パターンの変形から三角測量の原理を用いて形状測定を行うパターン投影法が知られている。その中で、明部と暗部が任意の幅で交互に配置する縞パターン光を投影して空間を2進符号化する空間符号化法は三次元計測の分野でよく用いられており、製品化もなされている。   There is known a pattern projection method in which a plurality of pattern lights are projected onto a subject, and the subject on which the pattern light is projected is imaged to perform shape measurement using the principle of triangulation from pattern deformation. Among them, the spatial encoding method that projects the stripe pattern light in which the bright part and the dark part are alternately arranged with an arbitrary width and binary encodes the space is often used in the field of three-dimensional measurement, and commercialized. It has also been made.

図1を参照して、一般的な三次元形状を測定する装置の構成および三次元計測の概念を説明する。三次元形状測定装置は、測定対象物体にパターンを照射するプロジェクタ101、反射パターンを撮像するカメラ102から構成されるのが一般的である。プロジェクタ101から被写体103に向けて明部と暗部が任意の幅で交互に配置された縞パターン光を投射する。縞パターン光は予め決められた複数のパターン形状があり、それら投影され、その度にカメラ102により撮像して画像データとして取得する。被写体103の明部と暗部の境界位置を(X,Y,Z)とする。境界位置(X,Y,Z)とプロジェクタ101を線で結んだ時のプロジェクタ101の主点位置を(X1,Y1)とする。同様に、境界位置(X,Y,Z)とカメラ102を線で結んだ時のカメラ102の主点位置を(X2,Y2)とする。ここで、カメラ102の主点位置(X2,Y2)はカメラ102の撮像センサ(CCDやCMOSなど)の水平座標によって求まる点である。水平座標とは撮像センサの水平幅と垂直幅によって決まり、例えば640×480の撮像センサであれば、水平方向のx座標は0から640、垂直方向のy座標は0から480の値を有する。同様にプロジェクタ101の主点位置(X1,Y1)も投光センサの水平座標によって求まる。また、プロジェクタ101とカメラ102との間の距離Lは基線長となり、装置の構成条件から定められる値である。これらのパラメータから三角測量の原理によって被写体103の境界位置(X,Y,Z)を求めることができる。被写体103の全面に対してそれぞれの境界位置(X,Y,Z)を求めることで、被写体103の三次元形状を測定することができる。   With reference to FIG. 1, the structure of a general three-dimensional shape measuring apparatus and the concept of three-dimensional measurement will be described. The three-dimensional shape measuring apparatus generally includes a projector 101 that irradiates a measurement target object with a pattern and a camera 102 that images a reflection pattern. Stripe pattern light in which bright portions and dark portions are alternately arranged with an arbitrary width is projected from the projector 101 toward the subject 103. The fringe pattern light has a plurality of predetermined pattern shapes, which are projected and captured by the camera 102 each time and acquired as image data. The boundary position between the bright part and the dark part of the subject 103 is assumed to be (X, Y, Z). Assume that the principal point position of the projector 101 when the boundary position (X, Y, Z) and the projector 101 are connected by a line is (X1, Y1). Similarly, the principal point position of the camera 102 when the boundary position (X, Y, Z) and the camera 102 are connected by a line is defined as (X2, Y2). Here, the principal point position (X2, Y2) of the camera 102 is a point obtained from the horizontal coordinates of the image sensor (CCD, CMOS, etc.) of the camera 102. The horizontal coordinate is determined by the horizontal width and the vertical width of the image sensor. For example, in the case of a 640 × 480 image sensor, the horizontal x coordinate has a value of 0 to 640, and the vertical y coordinate has a value of 0 to 480. Similarly, the principal point position (X1, Y1) of the projector 101 is also obtained from the horizontal coordinates of the light projection sensor. The distance L between the projector 101 and the camera 102 is a base line length and is a value determined from the configuration conditions of the apparatus. From these parameters, the boundary position (X, Y, Z) of the subject 103 can be obtained by the principle of triangulation. By obtaining the respective boundary positions (X, Y, Z) with respect to the entire surface of the subject 103, the three-dimensional shape of the subject 103 can be measured.

次に縞パターン光の形状について説明する。図2を参照して、符号化誤り耐性のあるグレイコードと呼ばれる2進符号の縞パターン光を説明する。撮像された反射パターンで黒く観察された部分は0、白く観察された部分は1に対応する。図2(a)では全体を2分割し、2つの領域で1、0と符号化する。図2(b)では明部と暗部の4つの領域を1、0、0、1と符号化し、対応する縞パターン光を照射および撮像する。さらに図2(c)では8つの領域を1、0、0、1、1、0、0、1と符号化し、対応する縞パターン光を照射および撮像する。このように各領域に符号化された領域番号が付与されるので、各領域を判断することができる。各領域は(1,1,1)、(1,1,0)、(1,0,0)、(1,0,1)、(0,0,1)、(0,0,0)、(0,1,0)、(0,1,1)として判断できる。このようにして3枚の縞パターン光を使い、空間を8分割することができるため、この空間符号化を3bitの空間符号化と称する。そして、図2(a)、図2(b)、図2(c)の縞パターン光をそれぞれ1bitの縞パターン光、2bitの縞パターン光、3bitの縞パターン光と称する。   Next, the shape of the stripe pattern light will be described. With reference to FIG. 2, the stripe pattern light of a binary code called a Gray code having encoding error resistance will be described. A portion observed in black in the captured reflection pattern corresponds to 0, and a portion observed in white corresponds to 1. In FIG. 2A, the whole is divided into two and encoded as 1 and 0 in two areas. In FIG. 2B, the four areas of the bright part and the dark part are encoded as 1, 0, 0, 1, and the corresponding stripe pattern light is irradiated and imaged. Further, in FIG. 2C, eight regions are encoded as 1, 0, 0, 1, 1, 0, 0, 1 and the corresponding stripe pattern light is irradiated and imaged. Thus, since the encoded area number is assigned to each area, each area can be determined. Each area is (1,1,1), (1,1,0), (1,0,0), (1,0,1), (0,0,1), (0,0,0) , (0, 1, 0), (0, 1, 1). Since the space can be divided into eight by using the three stripe pattern lights in this way, this spatial coding is referred to as 3-bit spatial coding. The stripe pattern lights in FIGS. 2A, 2B, and 2C are referred to as 1-bit stripe pattern light, 2-bit stripe pattern light, and 3-bit stripe pattern light, respectively.

さらに詳細に三次元形状測定を行う場合には、明部と暗部の領域を順次縮小しながらn枚の縞パターン光を照射する。そしてプロジェクタの照射領域を2nに分割した領域番号を付与することにより、各領域を判断できる。例えば、領域を1024分割する三次元計測においては10bitの空間符号化が行われる。   When measuring the three-dimensional shape in more detail, n stripe pattern lights are irradiated while sequentially reducing the bright and dark areas. Each area can be determined by assigning an area number obtained by dividing the irradiation area of the projector into 2n. For example, 10-bit spatial encoding is performed in three-dimensional measurement in which a region is divided into 1024 regions.

グレイコードの利点は、縞パターン光のずれやぼけなどで領域境界に符号化の誤りが発生しても、隣接領域と判断されるだけで、大きくずれた領域として符号化誤りを生じないことである。そのためグレイコードによる空間符号化は一般に用いられている方法である。   The advantage of the Gray code is that even if a coding error occurs at the boundary of the region due to a shift or blur of the fringe pattern light, it is judged as an adjacent region and no coding error occurs as a greatly shifted region. is there. For this reason, spatial coding using the Gray code is a commonly used method.

空間符号化法による三次元計測で精度を向上させるには、撮像した画像データから明部と暗部の境界の水平座標位置x(以下、「境界位置」と称する)を決定する必要がある。図3を参照して、で明部と暗部の境界位置について説明する。図3は2bitの縞パターン光を撮像した画像データの輝度を縦軸に、水平座標xを横軸にとった時のグラフである。図3(a)は理想的な境界位置を示す。図3(a)では明部と暗部の輝度値が境界において1,0で異なるため、明部と暗部の境界位置が一意に決まり、位置aおよび位置bが境界位置と決定できる。しかし実際の計測では、縞パターン光のボケ、被写体の反射率、外光の影響などにより、図3(b)に示されるように境界近傍はなだらかな変化となり、境界位置を一意に決めることができず、計測誤差を生じさせる。   In order to improve accuracy in the three-dimensional measurement by the spatial encoding method, it is necessary to determine the horizontal coordinate position x (hereinafter referred to as “boundary position”) of the boundary between the bright part and the dark part from the captured image data. With reference to FIG. 3, the boundary position between the bright part and the dark part will be described. FIG. 3 is a graph when the luminance of image data obtained by imaging 2-bit stripe pattern light is plotted on the vertical axis and the horizontal coordinate x is plotted on the horizontal axis. FIG. 3A shows an ideal boundary position. In FIG. 3A, since the brightness values of the bright part and the dark part are different by 1 and 0 at the boundary, the boundary position between the bright part and the dark part is uniquely determined, and the position a and the position b can be determined as the boundary position. However, in actual measurement, the vicinity of the boundary changes gently as shown in FIG. 3B due to the blur of the stripe pattern light, the reflectance of the subject, the influence of external light, etc., and the boundary position can be uniquely determined. This is not possible and causes measurement errors.

こうした問題を回避するため、計測精度を示す信頼度を計測点に付与し、その信頼度が閾値以下であれば、その計測座標は使用しない方法が開示されている(例えば、特許文献1参照)。   In order to avoid such a problem, a method is disclosed in which a reliability indicating measurement accuracy is given to a measurement point, and the measurement coordinate is not used if the reliability is equal to or less than a threshold (for example, see Patent Document 1). .

特許文献1では、縞パターン光のほかに、全面明部である全点灯光と、全面暗部である全消灯光とを被写体に照射する。信頼度は全点灯光と全消灯光の輝度差に対する縞パターン光の輝度差の割合としている。そして信頼度が閾値を超える測定点のみを出力している。   In Patent Document 1, in addition to the stripe pattern light, the subject is irradiated with all lighting light that is the entire bright portion and all extinction light that is the entire dark portion. The reliability is defined as the ratio of the brightness difference of the stripe pattern light to the brightness difference between the all lighting light and all the lighting light. Only measurement points whose reliability exceeds a threshold are output.

特許第3996560号公報Japanese Patent No. 3996560

特許文献1の発明では、縞パターン光の輝度差を求める必要がある。輝度差を正確に求めるためには、複数の画素の輝度値を用いて輝度曲線を算出する必要があり、計算コストがかかるという課題がある。また、予めサンプリング点を決めて輝度差を求める方法もあるが、その場合にはサンプリング点ごとに信頼度が異なり、正確に信頼度が反映されない恐れがあるという課題もある。   In the invention of Patent Document 1, it is necessary to obtain the luminance difference of the stripe pattern light. In order to accurately obtain the luminance difference, it is necessary to calculate a luminance curve using the luminance values of a plurality of pixels, and there is a problem that the calculation cost is high. There is also a method of obtaining a luminance difference by determining sampling points in advance, but in that case, the reliability is different for each sampling point, and there is a problem that the reliability may not be accurately reflected.

上記の課題に鑑み、本発明は計測精度を示す信頼度を簡易かつ正確に算出すすることを目的とする。   In view of the above problems, an object of the present invention is to easily and accurately calculate a reliability indicating measurement accuracy.

上記の目的を達成する本発明に係る三次元計測装置は、
明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得手段と、
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値に基づいて前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段と
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値に基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段と、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段と
を備えることを特徴とする。

The three-dimensional measuring apparatus according to the present invention that achieves the above object is as follows:
A first image in which the bright part region and the dark areas are arranged alternately pattern is obtained by imaging the target object is projected, the pattern and the bright area and the dark area of the pattern is reversed is projected Image acquisition means for acquiring a second image obtained by imaging the target object ;
Determine the boundary position between the bright region and the dark region of the pattern the a picture pixel value that is part of the first images, and based on the the image pixel value to the Ru contained in the second images determining means for,
And image pixel value that is part of the first images, and based on the the image pixel value to the Ru contained in the second images, the reliability acquisition for acquiring a reliability indicating the accuracy of the boundary position Means,
Deriving means for deriving three-dimensional shape information of the target object based on the reliability.

上記の目的を達成する本発明に係る三次元計測装置は、
明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、明領域のみからなる全照明パターンが投影された前記対象物体を撮像して得られた第2の画像と、パターンが投影されていない状態の前記対象物体撮像して得られた第3の画像を取得する画像取得手段と、
前記第1の画像と、前記第2の画像および前記第3の画像とに基づいて決定される前記第1の画像内の前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段と
前記第1の画像の前記境界位置の近傍の少なくとも2つの画素の画素値に基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段と、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段と
を備えることを特徴とする。
The three-dimensional measuring apparatus according to the present invention that achieves the above object is as follows:
A first image obtained by imaging a target object on which a pattern in which bright areas and dark areas are alternately arranged is projected, and the target object on which an entire illumination pattern including only a bright area is projected. a second image obtained by capturing an image acquisition means for acquiring a third image obtained by imaging the target object in a state where the pattern is not projected,
Wherein the first images, and the second images Contact and said bright area and the dark region of the pattern in said first image which is determined based on the third images A determining means for determining the boundary position ;
And based on the pixel values of at least two pixels of the neighborhood of the boundary position of the first image, a reliability obtaining means for obtaining a reliability indicating the accuracy of the boundary position,
Deriving means for deriving three-dimensional shape information of the target object based on the reliability.

本発明によれば、取得した画像情報より明暗が反転している位置近傍の複数画素を利用して計測精度を示す信頼度とするため、簡易にかつ正確に信頼度を算出することが可能となる。また境界位置の算出と同時に信頼度を求めることができるため、計算処理の迅速化を図る事が可能となる。   According to the present invention, since the reliability indicating the measurement accuracy is obtained by using a plurality of pixels near the position where the brightness is inverted from the acquired image information, the reliability can be easily and accurately calculated. Become. In addition, since the reliability can be obtained simultaneously with the calculation of the boundary position, the calculation process can be speeded up.

三次元形状測定装置の構成および計測方法の概念図。The conceptual diagram of the structure and measuring method of a three-dimensional shape measuring apparatus. グレイコードによる空間符号化法の投影する縞パターン光を示す図。The figure which shows the fringe pattern light which the space encoding method by a Gray code | symbol projects. 境界位置の説明図。Explanatory drawing of a boundary position. 基本構成概略図。FIG. 第1実施形態に係る信頼度算出を示す図。The figure which shows the reliability calculation which concerns on 1st Embodiment. 第2実施形態に係る信頼度算出を示す図。The figure which shows the reliability calculation which concerns on 2nd Embodiment. 第3実施形態に係る信頼度算出を示す図。The figure which shows the reliability calculation which concerns on 3rd Embodiment.

(第1実施形態)
図4を参照して、本発明に係る三次元形状測定装置の基本構成概略図について説明する。三次元計測装置は、明部と暗部が交互に配置された縞パターン光を被写体407に投影するプロジェクタ402と、縞パターン光が投影された被写体407(対象物体)の反射パターン光を撮像するカメラ403と、種々の演算を実行する計算処理部41を備える。計算処理部41は、縞パターン光の投影や撮像を指示し、撮像された画像データを計算処理する。
(First embodiment)
With reference to FIG. 4, the basic composition schematic of the three-dimensional shape measuring apparatus which concerns on this invention is demonstrated. The three-dimensional measurement apparatus includes a projector 402 that projects a stripe pattern light in which bright portions and dark portions are alternately arranged onto a subject 407, and a camera that captures reflected pattern light of the subject 407 (target object) onto which the stripe pattern light is projected. 403 and a calculation processing unit 41 that executes various operations. The calculation processing unit 41 instructs the projection and imaging of the fringe pattern light, and calculates the captured image data.

計算処理部41は、CPU400と、パターンメモリ401と、画像メモリ1404と、信頼度算出部405と、計測処理部406とを備える。CPU400は各種の演算を実行する。パターンメモリ401はROM等で構成されており、縞パターン光のパターン形状プログラム、投影時間を設定するタイムアカウントプログラムなどを格納する。CPU400からの投影指示を受信したパターンメモリ401は縞パターン光形状信号をプロジェクタ402に送信する。またタイムアカウント信号がプロジェクタ402およびカメラ403に送信され、縞パターン光の投影および撮像のタイミングが管理される。   The calculation processing unit 41 includes a CPU 400, a pattern memory 401, an image memory 1404, a reliability calculation unit 405, and a measurement processing unit 406. The CPU 400 executes various calculations. The pattern memory 401 is composed of a ROM or the like, and stores a pattern shape program for stripe pattern light, a time account program for setting a projection time, and the like. The pattern memory 401 that has received the projection instruction from the CPU 400 transmits a stripe pattern light shape signal to the projector 402. In addition, a time account signal is transmitted to the projector 402 and the camera 403, and the timing of projection and imaging of the stripe pattern light is managed.

カメラ403により撮像された画像データは、画像メモリ404に一時的に格納され、順次信頼度算出部405に送信される。信頼度算出部405は、ROMやRAM等で構成されており、縞パターン光の明部と暗部の境界位置を決定し、かつ境界位置の信頼度を算出する処理を行う。境界位置を決定する方法および信頼度を算出する方法は後述する。   Image data captured by the camera 403 is temporarily stored in the image memory 404 and sequentially transmitted to the reliability calculation unit 405. The reliability calculation unit 405 is configured by a ROM, a RAM, or the like, and performs a process of determining the boundary position between the bright part and the dark part of the stripe pattern light and calculating the reliability of the boundary position. A method for determining the boundary position and a method for calculating the reliability will be described later.

次に画像データは計測処理部406に送信される。計測処理部406は画像データから三次元位置情報を算出する。計測処理部406はROMやRAM等で構成される。計測処理部406は、プロジェクタ402とカメラ403の基線長、焦点距離、画素数等の機器に依存するパラメータ、予め行うキャリブレーションによるディストーション、外光輝度などの外部パラメータ等を格納する。また三角測量による三次元計測プログラムも格納する。計測処理部406は画像データを2値化処理して、符合データ化する。Nbitで空間符号化を行う場合、縞パターン光はN種類のパターン形状となるので、符号データはN枚生成されることになる。データには信頼度算出部405で算出された信頼度および境界位置が付与される。次に符号データからプロジェクタ402の画素とカメラ403の画素との対応関係をとり、三角測量の原理によって三次元計測を行い三次元形状情報を取得する(三次元形状算出)。計測結果はカメラ403の画素数に応じた距離画像データとして生成される。距離画像データにも、任意で信頼度を付与する事ができる。距離画像データは不図示の出力部で画像化され、不図示の表示部で距離画像として観察することができる。   Next, the image data is transmitted to the measurement processing unit 406. The measurement processing unit 406 calculates three-dimensional position information from the image data. The measurement processing unit 406 includes a ROM, a RAM, and the like. The measurement processing unit 406 stores parameters depending on devices such as the baseline length, focal length, and the number of pixels of the projector 402 and the camera 403, distortion by calibration performed in advance, external parameters such as external light luminance, and the like. It also stores a three-dimensional measurement program by triangulation. The measurement processing unit 406 binarizes the image data to generate code data. When performing spatial encoding with N bits, the stripe pattern light has N types of pattern shapes, and thus N pieces of code data are generated. The reliability and the boundary position calculated by the reliability calculation unit 405 are given to the data. Next, the correspondence relationship between the pixels of the projector 402 and the pixels of the camera 403 is taken from the code data, and three-dimensional measurement is performed by the principle of triangulation to obtain three-dimensional shape information (three-dimensional shape calculation). The measurement result is generated as distance image data corresponding to the number of pixels of the camera 403. The reliability can be arbitrarily given to the distance image data. The distance image data is imaged by an output unit (not shown) and can be observed as a distance image by a display unit (not shown).

上記の画像メモリ404、信頼度算出部405、計測処理部406の処理はすべてCPU400からの指示に基づいて行われる。   The processes of the image memory 404, the reliability calculation unit 405, and the measurement processing unit 406 are all performed based on an instruction from the CPU 400.

次に図5を参照して、信頼度の算出方法について説明する。   Next, a method for calculating the reliability will be described with reference to FIG.

図5(a)は投影する縞パターン光を示す。縞パターン光51は3bitのグレイコードによる空間符号化の縞パターン光で、ポジティブパターンと称する。縞パターン光52は縞パターン光51の明部と暗部を反転させた逆縞パターン光であり、ネガティブパターンと称する。本図では、一例として3bitの縞パターン光のポジティブ/ネガティブパターンを示す。しかし、実際の空間符号化による計測では、プロジェクタの解像度に応じて、例えば1bitから10bitまでの縞パターン光のポジティブ/ネガティブパターンを投影し、それぞれ撮影してもよい。つまり、10bitの計測であれば、撮影枚数は20枚必要となる。図5(b)を用いて境界位置を決定する考え方を説明する。図5(b)は撮像した画像データの輝度を縦軸に、水平ピクセル座標を横軸にとったグラフである。縞パターン光の反射パターン光を撮像した画像データを第1の画像データとする。同様に、逆縞パターン光の反射パターン光を撮像した画像データを第2の画像データとする。輝度線53は縞パターン光51で撮像した第1の画像データの一部分の輝度線である。一方、輝度線54は逆縞パターン光52で撮像した第2の画像データの輝度線で、水平ピクセル座標の相対位置は輝度線53と同じとする。輝度線53と輝度線54とは、位置M及び位置Nで交わる。そこで位置M、位置Nを境界位置とする。図5(c)を用いて実際の境界位置の計算方法を説明する。グラフの下に画素番号が置かれ、点55、点56はそれぞれs番目、s+1番目の縞パターン光51を投影して撮影した画像データの画素である。点57、点58はそれぞれs番目、s+1番目の縞パターン光52を投影して撮影した画像データの画素である。そして点55と点56、点57と点58をそれぞれ直線で結び、線分500と線分501との交点59の水平座標を求める。このようにして境界位置Nを求める。ここで、信頼度は線分500と線分501の交わりで形成される角度φと定義する。   FIG. 5A shows the stripe pattern light to be projected. The fringe pattern light 51 is a spatial pattern fringe pattern light using a 3-bit gray code, and is referred to as a positive pattern. The stripe pattern light 52 is reverse stripe pattern light obtained by inverting the bright and dark portions of the stripe pattern light 51 and is referred to as a negative pattern. In this figure, a positive / negative pattern of 3-bit stripe pattern light is shown as an example. However, in measurement by actual spatial coding, for example, a positive / negative pattern of stripe pattern light of 1 to 10 bits may be projected and photographed according to the resolution of the projector. That is, if the measurement is 10 bits, 20 shots are required. The concept of determining the boundary position will be described with reference to FIG. FIG. 5B is a graph in which the vertical axis represents the luminance of the captured image data and the horizontal axis represents the horizontal pixel coordinate. Image data obtained by imaging the reflection pattern light of the stripe pattern light is defined as first image data. Similarly, image data obtained by imaging the reflected pattern light of the reverse stripe pattern light is set as second image data. A luminance line 53 is a luminance line of a part of the first image data imaged with the stripe pattern light 51. On the other hand, the luminance line 54 is the luminance line of the second image data imaged with the reverse stripe pattern light 52, and the relative position of the horizontal pixel coordinates is the same as that of the luminance line 53. The luminance line 53 and the luminance line 54 intersect at a position M and a position N. Therefore, the position M and the position N are set as boundary positions. An actual boundary position calculation method will be described with reference to FIG. Pixel numbers are placed below the graph, and points 55 and 56 are pixels of image data captured by projecting the s-th and s + 1-th stripe pattern light 51, respectively. Points 57 and 58 are pixels of image data obtained by projecting the sth and s + 1th fringe pattern light 52, respectively. Then, the points 55 and 56 and the points 57 and 58 are connected by straight lines, respectively, and the horizontal coordinates of the intersection 59 of the line segment 500 and the line segment 501 are obtained. In this way, the boundary position N is obtained. Here, the reliability is defined as an angle φ formed by the intersection of the line segment 500 and the line segment 501.

すなわち、第1の画像データおよび第2の画像データの各画像データを構成する各画素について、縞パターン光51に対する第1の輝度値と、逆縞パターン光52に対する第2の輝度値とを算出する(輝度値算出)。そして、第1の輝度値および第2の輝度値の大小関係が反転する画素に対応する位置を明部と暗部の境界位置として決定する。境界位置における縞パターン光51の第1の輝度勾配と、逆縞パターン光52の第2の輝度勾配とを算出する。各輝度勾配算出処理は、境界位置での各輝度曲線の傾きを算出する処理としてもよい。この第1の輝度勾配と、と第2の輝度勾配との相関を示す相関値を境界位置の正確性を示す信頼度として算出する。なお、相関値(信頼度)は角度φだけでなく、例えば、各輝度値をプロットした輝度曲線の境界位置における線分500と、線分501の一致度としてもよい。   That is, the first luminance value for the fringe pattern light 51 and the second luminance value for the reverse fringe pattern light 52 are calculated for each pixel constituting each image data of the first image data and the second image data. (Luminance value calculation). Then, the position corresponding to the pixel whose magnitude relationship between the first luminance value and the second luminance value is inverted is determined as the boundary position between the bright part and the dark part. A first luminance gradient of the stripe pattern light 51 at the boundary position and a second luminance gradient of the reverse stripe pattern light 52 are calculated. Each luminance gradient calculation process may be a process of calculating the gradient of each luminance curve at the boundary position. A correlation value indicating the correlation between the first luminance gradient and the second luminance gradient is calculated as a reliability indicating the accuracy of the boundary position. Note that the correlation value (reliability) is not limited to the angle φ, and may be, for example, the degree of coincidence between the line segment 500 and the line segment 501 at the boundary position of the luminance curve in which each luminance value is plotted.

以下、この信頼度である角度φの算出方法を詳述する
各点の座標をそれぞれ点55(Xa,Ya)、点56(Xb,Yb)、点57(Xa,Yd)、点58(Xb,Yc)とする。そして、線分500と線分501との交点を点59(Px,Py)と置く。
Hereinafter, the calculation method of the angle φ which is the reliability will be described in detail. The coordinates of each point are point 55 (Xa, Ya), point 56 (Xb, Yb), point 57 (Xa, Yd), and point 58 (Xb). , Yc). Then, an intersection of the line segment 500 and the line segment 501 is set as a point 59 (Px, Py).

線分500の傾きP1は、   The slope P1 of the line segment 500 is

Figure 0005968370
Figure 0005968370

線分501の傾きP2は、   The slope P2 of the line segment 501 is

Figure 0005968370
Figure 0005968370

と求まる。
式(1)及および式(2)から線分500を通る直線の式は、式(3)のように表される。
It is obtained.
A formula of a straight line passing through the line segment 500 from the formulas (1) and (2) is expressed as a formula (3).

Figure 0005968370
Figure 0005968370


同様に、線分501を通る直線の式は、式(3)のように表される。

Similarly, the equation of a straight line passing through the line segment 501 is expressed as equation (3).

Figure 0005968370
Figure 0005968370


式(3)及および式(4)から点59の座標(Px,Py)は、式(5)及および式(6)のように表される。

The coordinates (Px, Py) of the point 59 from the expressions (3) and (4) are expressed as the expressions (5) and (6).

Figure 0005968370
Figure 0005968370

Figure 0005968370
Figure 0005968370

境界位置は式(5)により算出される。   The boundary position is calculated by equation (5).

図5(c)で示すように角度φをφ1とφ2に分割すると、各点の座標から、φ1は式(7)で表され、φ2は式(8)で表される。   When the angle φ is divided into φ1 and φ2 as shown in FIG. 5C, φ1 is expressed by the equation (7) and φ2 is expressed by the equation (8) from the coordinates of each point.

Figure 0005968370
Figure 0005968370

Figure 0005968370
Figure 0005968370

式(7)及および式(8)より、角度φが式(9)のように求まる。   From the equations (7) and (8), the angle φ is obtained as in the equation (9).

Figure 0005968370
Figure 0005968370

ここで、画素間の距離を1とすると、Xb−Xa=1となるため、式(9)は、式(10)のように表すことができる。   Here, if the distance between the pixels is 1, Xb−Xa = 1, and therefore Expression (9) can be expressed as Expression (10).

Figure 0005968370
Figure 0005968370

これにより、信頼度φ(角度φ)が算出される。   Thereby, the reliability φ (angle φ) is calculated.

計測処理部406は、算出された信頼度に基づいて、信頼度が所定の閾値以下の計測点に対して、距離画像上への出力禁止を行う。また距離画像データの各測定点に信頼度を付与して全点出力を行い、距離画像データの編集時に、計測者が信頼度の閾値を任意に設定することで、所望する信頼度の高い計測点のみの距離画像データを取得することも可能である。   Based on the calculated reliability, the measurement processing unit 406 prohibits output on the distance image for measurement points whose reliability is a predetermined threshold or less. In addition, reliability is given to each measurement point of the distance image data and all points are output, and when the distance image data is edited, the measurer arbitrarily sets a threshold value of reliability, so that the desired high reliability measurement can be performed. It is also possible to acquire distance image data of only points.

以上のように本発明に係る第1実施形態によれば、画像データから明暗領域の反転位置の最近傍にある4点の画素を直線結合した線分同士のなす角を信頼度とするため、境界位置を求めるのと同時に信頼度を算出できる。また計算が4点の輝度値のみで求まるので、簡易に計算することが可能である。   As described above, according to the first embodiment of the present invention, since the angle formed by the line segments obtained by linearly connecting the four pixels in the nearest vicinity of the inversion position of the light and dark area from the image data is set as the reliability, The reliability can be calculated at the same time as obtaining the boundary position. Further, since the calculation can be obtained only with the luminance values of the four points, it can be easily calculated.

第1実施形態では、線分同士のなす角を信頼度として用いたが、2つの線分の交点(図5における点59)の輝度値を更なる第2の信頼度として追加してもよい。点59の輝度値は式(6)により求めることができる。信頼度が角度のみでは、対象からの反射光の輝度を知る事はできない。同じ角度でも、高輝度の場合と低輝度の場合で計測精度が異なり、閾値以上の高輝度では同じ角度でもコントラストが低下して信頼度が低下する場合がある。そのため、2つの線分の交点の輝度値も信頼度とし、角度と併せて判定する事で、信頼度による判定精度をより高めることが可能となる。   In the first embodiment, the angle between the line segments is used as the reliability. However, the luminance value of the intersection of the two line segments (point 59 in FIG. 5) may be added as the second reliability. . The luminance value of the point 59 can be obtained by Expression (6). If the reliability is only an angle, the brightness of the reflected light from the object cannot be known. Even at the same angle, the measurement accuracy differs between high brightness and low brightness, and at high brightness above the threshold, the contrast may decrease and reliability may decrease even at the same angle. Therefore, the luminance value at the intersection of the two line segments is also set as the reliability, and the determination accuracy based on the reliability can be further improved by determining it together with the angle.

(第2実施形態)
本実施形態では、ポジティブパターンと均一光量の均一パターン光を用いる空間符号化法の信頼度算出方法について説明する。
(Second Embodiment)
In this embodiment, a reliability calculation method of a spatial encoding method using a positive pattern and a uniform pattern light with a uniform light amount will be described.

図6(a)は投影する縞パターン光を示す。縞パターン光601は3bitのグレイコードによる空間符号化の縞パターン光である。パターン602は明部のみの全照明パターン光である。パターン603は暗部のみの全消灯パターン光である。3bitの空間符号化を行う場合には、1bitから3bitの縞パターン光と明部のみの全照明パターン602、暗部のみの全消灯パターン603が必要となる。縞パターン光の反射パターン光を撮像した画像データを第1の画像データとする。同様に、全照明パターン光の反射パターン光を撮像した画像データを第2の画像データとする。また、全消灯パターン光の反射パターン光を撮像した画像データを第2の画像データとする。   FIG. 6A shows the stripe pattern light to be projected. The fringe pattern light 601 is spatial pattern fringe pattern light using a 3-bit gray code. A pattern 602 is all illumination pattern light of only the bright part. A pattern 603 is all-off pattern light only in the dark part. In the case of performing 3-bit spatial encoding, 1-bit to 3-bit stripe pattern light, all illumination patterns 602 only for bright portions, and all extinction patterns 603 only for dark portions are required. Image data obtained by imaging the reflection pattern light of the stripe pattern light is defined as first image data. Similarly, image data obtained by imaging the reflection pattern light of all illumination pattern light is set as second image data. Further, the image data obtained by imaging the reflection pattern light of the all-off pattern light is set as second image data.

図6(b)を参照して、縞パターン光601の境界位置を決定する方法を説明する。図6(b)は撮像した画像データの輝度値を縦軸に、水平座標xを横軸にとったグラフである。   A method for determining the boundary position of the stripe pattern light 601 will be described with reference to FIG. FIG. 6B is a graph in which the luminance value of the captured image data is plotted on the vertical axis and the horizontal coordinate x is plotted on the horizontal axis.

輝度線53は縞パターン光601で撮像した第1の画像データの輝度線(第1の輝度値曲線)である。輝度線604は全照明パターン602を投影して撮像した第2の画像データの輝度線(第2の輝度値曲線)である。輝度線605は全消灯パターン603を投影して撮像した第3の画像データの輝度線(第3の輝度値曲線)である。輝度線604と輝度線605の平均輝度値を求めて、それを輝度線606とする。縞パターン光601の輝度線53と平均値の輝度線606は位置M´及び位置N´で交わるものとする。そこで位置M´、位置N´を境界位置とする。   A luminance line 53 is a luminance line (first luminance value curve) of the first image data imaged with the stripe pattern light 601. A luminance line 604 is a luminance line (second luminance value curve) of second image data captured by projecting the entire illumination pattern 602. A luminance line 605 is a luminance line (third luminance value curve) of third image data captured by projecting the all-off pattern 603. An average luminance value of the luminance line 604 and the luminance line 605 is obtained and set as a luminance line 606. It is assumed that the luminance line 53 of the stripe pattern light 601 and the average luminance line 606 intersect at a position M ′ and a position N ′. Therefore, the position M ′ and the position N ′ are set as boundary positions.

次に図6(c)を参照して、実際の計算方法を示す。グラフの下に画素番号が置かれ、点607、点608はそれぞれs番目、s+1番目の縞パターン光601を投影して撮影した画像データの画素である。点609、点610はそれぞれs番目、s+1番目の全照明パターン602を投影して撮影した画像データの画素である。点611、点612はそれぞれs番目、s+1番目の全消灯パターン603を投影して撮影した画像データの画素である。全照明パターン602と全消灯パターン603を投影して撮影した画像データの対応する画素の平均輝度値を求めると、s番目の点609と点611の平均値は点61
3と求まる。また、s+1番目の点610と点612の平均値は点614と求まる。そこで点607と点608、点613と点614をそれぞれ直線で結び、その交点615の水平座標を求める。このようにして境界位置N´を算出できる。ここで信頼度は2直線の交わりで形成される角度θと定義する。第1実施形態と同様に、角度θは式(9)で求めることができる。なお、信頼度は角度θではなく、輝度勾配、すなわち境界位置での傾きとしてもよい。
Next, an actual calculation method will be described with reference to FIG. Pixel numbers are placed below the graph, and points 607 and 608 are pixels of image data captured by projecting the s-th and s + 1-th stripe pattern light 601 respectively. Points 609 and 610 are pixels of image data obtained by projecting the s-th and s + 1-th all illumination patterns 602, respectively. Points 611 and 612 are pixels of image data obtained by projecting the s-th and s + 1-th all-off patterns 603, respectively. When the average luminance value of the corresponding pixels of the image data captured by projecting the entire illumination pattern 602 and the all-off pattern 603 is obtained, the average value of the sth point 609 and the point 611 is the point 61
3 is obtained. Further, the average value of the s + 1-th point 610 and the point 612 is obtained as a point 614. Therefore, the points 607 and 608, the points 613 and 614 are connected by straight lines, and the horizontal coordinate of the intersection 615 is obtained. In this way, the boundary position N ′ can be calculated. Here, the reliability is defined as an angle θ formed by the intersection of two straight lines. Similar to the first embodiment, the angle θ can be obtained by Expression (9). The reliability may be a luminance gradient, that is, a gradient at the boundary position, instead of the angle θ.

第2実施形態においても、2つの線分の交点(点615)の輝度値を第2の信頼度として追加してもよい。   Also in the second embodiment, the luminance value of the intersection (point 615) of two line segments may be added as the second reliability.

以上のように第2実施形態によれば、ポジティブパターンと均一光量の均一パターン光を用いる空間符号化法においても第1実施形態と同様に信頼度を求めることができる。本実施形態は、ポジティブ/ネガティブパターンを用いる空間符号化法に比べて、精度は低減するものの、撮影枚数は約半分で済むため、精度より高速を求められる計測において有効である。   As described above, according to the second embodiment, reliability can be obtained in the spatial coding method using a positive pattern and a uniform pattern light having a uniform light amount as in the first embodiment. This embodiment is effective in measurement requiring a higher speed than the accuracy because the number of shots is about half, although the accuracy is reduced as compared with the spatial encoding method using a positive / negative pattern.

(第3実施形態)
第3実施形態では、明暗領域の反転位置の近傍における画素を選択した場合の信頼度算出方法について説明する。
(Third embodiment)
In the third embodiment, a reliability calculation method when a pixel in the vicinity of the inversion position of the light and dark area is selected will be described.

図7は撮像した画像データの輝度を縦軸に、水平座標xを横軸にとったグラフである。輝度線53はポジティブパターンで撮像した画像データの一部分の輝度線である。輝度線54はネガティブパターンで撮像した画像データの輝度線である。水平ピクセル座標の相対位置は輝度線53と同じとする。線分500および線分501は、明暗領域の反転位置から最近傍にある画素、すなわち画素番号sと画素番号s+1の輝度を直線結合した線分である。この場合は線分500および線分501の交わり角φを信頼度とする。   FIG. 7 is a graph in which the brightness of captured image data is taken on the vertical axis and the horizontal coordinate x is taken on the horizontal axis. A luminance line 53 is a luminance line of a part of image data picked up with a positive pattern. A luminance line 54 is a luminance line of image data captured with a negative pattern. The relative position of the horizontal pixel coordinates is the same as that of the luminance line 53. The line segment 500 and the line segment 501 are the line segments obtained by linearly coupling the luminances of the pixels closest to the inversion position of the light and dark area, that is, the pixel numbers s and s + 1. In this case, the intersection angle φ between the line segment 500 and the line segment 501 is defined as the reliability.

上記は明暗領域の反転位置から最近傍にある画素を使用したが、画素間隔を倍にした画素を選択しても構わない。点702、点703はそれぞれs−1番目、s+2番目のポジティブパターンを投影して撮影した画像データの画素である。点704、点705はそれぞれs−1番目、s+2番目のネガティブパターンを投影して撮影した画像データの画素である。点702と点703、点704と点705をそれぞれ直線で結び、線分706と線分707とする。この場合は線分706および線分707の交わり角φ´を信頼度とする。   In the above description, the pixel closest to the inversion position of the light / dark region is used. However, a pixel in which the pixel interval is doubled may be selected. Points 702 and 703 are pixels of image data obtained by projecting the s−1 and s + 2 positive patterns, respectively. Points 704 and 705 are pixels of image data obtained by projecting the s−1 and s + 2 negative patterns, respectively. The points 702 and 703 and the points 704 and 705 are connected by straight lines to form a line segment 706 and a line segment 707, respectively. In this case, the intersection angle φ ′ between the line segment 706 and the line segment 707 is set as the reliability.

さらに画素間隔を広げて、s−2番目の画素とs+3番目の画素、又はs−3番目の画素とs+4番目の画素のように、明暗領域の反転位置から等距離にある画素を用いて傾きを算出して、線分がなす角度を同様に信頼度としてもよい。   Furthermore, the pixel interval is further widened and tilted using pixels that are equidistant from the inversion position of the light-dark region, such as the s-2th pixel and the s + 3rd pixel, or the s-3th pixel and the s + 4th pixel. And the angle formed by the line segment may be similarly set as the reliability.

以上のように第3実施形態によれば、明暗領域の反転位置から近傍にある画素を複数選択することができる。そのため、複数の傾きを信頼度として算出し、その平均値を信頼度にしてもよい。   As described above, according to the third embodiment, it is possible to select a plurality of pixels in the vicinity from the inversion position of the light and dark area. Therefore, a plurality of inclinations may be calculated as reliability, and the average value may be used as the reliability.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(または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 (20)

明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得手段と、
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値とに基づいて前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段と、
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値とに基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段と、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段と
を備えることを特徴とする三次元計測装置。
A first image obtained by imaging a target object onto which a pattern in which bright areas and dark areas are alternately arranged is projected, and a pattern in which the bright area and the dark area of the pattern are inverted is projected. Image acquisition means for acquiring a second image obtained by imaging the target object;
Determining means for determining a boundary position between the bright area and the dark area of the pattern based on a pixel value included in the first image and a pixel value included in the second image;
Reliability acquisition means for acquiring a reliability indicating the accuracy of the boundary position based on a pixel value included in the first image and a pixel value included in the second image;
Deriving means for deriving three-dimensional shape information of the target object based on the reliability.
前記信頼度取得手段は、前記第1の画像に含まれる画素の画素値のうち、前記境界位置の近傍における少なくとも2つの画素の画素値と、前記第2の画像に含まれる画素の画素値のうち、前記境界位置の近傍における少なくとも2つの画素の画素値とに基づいて前記境界位置の正確性を示す信頼度を算出することを特徴とする請求項1に記載の三次元計測装置。 The reliability value obtaining means said among the pixel values of the pixels included in the first images, the pixel values of at least two pixels in the vicinity of the boundary position, a pixel of pixels included in the second images The three-dimensional measurement apparatus according to claim 1, wherein a reliability indicating the accuracy of the boundary position is calculated based on pixel values of at least two pixels in the vicinity of the boundary position among the values. 前記信頼度取得手段は、前記第1の画像に含まれる画素のうち、前記境界位置の近傍における少なくとも2つの画素の画素値に基づいて、画素値の変化を表す第1の線を取得し、前記第2の画像に含まれる画素のうち、前記境界位置の近傍における少なくとも2つの画素の画素値に基づいて画素値の変化を表す第2の線を取得し、前記第1の線と前記第2の線とのなす角度に基づいて、前記信頼度を取得すること特徴とする請求項1または2に記載の三次元計測装置。 The reliability acquisition means acquires a first line representing a change in pixel value based on pixel values of at least two pixels in the vicinity of the boundary position among the pixels included in the first image, A second line representing a change in pixel value is obtained based on pixel values of at least two pixels in the vicinity of the boundary position among the pixels included in the second image, and the first line and the first line The three-dimensional measurement apparatus according to claim 1, wherein the reliability is acquired based on an angle formed by a line of two. 前記決定手段は、前記第1の画像に含まれる画素値の変化を表す第1の線と、前記第2の画像に含まれる画素値の変化を表す第2の線とが交わる画素の位置を前記境界位置として決定することを特徴とする請求項1乃至3のいずれか1項に記載の三次元計測装置。   The determination means determines a pixel position where a first line representing a change in pixel value included in the first image and a second line representing a change in pixel value included in the second image intersect. The three-dimensional measuring device according to claim 1, wherein the three-dimensional measuring device is determined as the boundary position. 明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、明部領域のみからなる全照明パターンが投影された前記対象物体を撮像して得られた第2の画像と、パターンが投影されていない状態の前記対象物体を撮像して得られた第3の画像を取得する画像取得手段と、
前記第1の画像と、前記第2の画像および前記第3の画像とに基づいて決定される前記第1の画像内の前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段と、
前記第1の画像の前記境界位置の近傍の少なくとも2つの画素の画素値に基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段と、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段と
を備えることを特徴とする三次元計測装置。
A first image obtained by imaging a target object on which a pattern in which bright areas and dark areas are alternately arranged is projected, and the target object on which an entire illumination pattern including only a bright area is projected. Image acquisition means for acquiring a second image obtained by imaging, and a third image obtained by imaging the target object in a state in which no pattern is projected;
A boundary position between the bright area and the dark area of the pattern in the first image determined based on the first image, the second image, and the third image is determined. A determination means;
Reliability acquisition means for acquiring reliability indicating the accuracy of the boundary position based on pixel values of at least two pixels in the vicinity of the boundary position of the first image;
Deriving means for deriving three-dimensional shape information of the target object based on the reliability.
前記決定手段は、前記第1の画像に含まれる画素値の変化を表す第1の線と、前記第2の画像に含まれる画素値および前記第3の画像に含まれる画素値の平均を取った平均画素値の変化を表す第2の線とに基づき、前記明部領域と前記暗部領域との境界位置を決定することを特徴とする請求項5に記載の三次元計測装置。 The determining means takes an average of a first line representing a change in a pixel value included in the first image, a pixel value included in the second image, and a pixel value included in the third image. The three-dimensional measurement apparatus according to claim 5, wherein a boundary position between the bright area and the dark area is determined based on a second line representing a change in average pixel value. 前記信頼度取得手段は、前記信頼度を、前記第1の線と、前記第2の線とのなす角度に基づき算出することを特徴とする請求項6に記載の三次元計測装置。   The three-dimensional measurement apparatus according to claim 6, wherein the reliability acquisition unit calculates the reliability based on an angle formed by the first line and the second line. 明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像を取得し、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得手段と、
前記第1の画像における第1の方向の画素値の変化を近似する第1の線と、前記第2の画像における第2の方向の画素値の変化を近似する第2の線とに基づいて、前記第1の線と前記第2の線との交点の位置を決定する決定手段と、
前記第1の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値と、前記第2の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値とに基づいて、前記決定される前記第1の線と前記第2の線との交点の位置の正確性を示す信頼度を取得する信頼度取得手段と、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段とを備えることを特徴とする三次元計測装置。
A first image obtained by imaging a target object onto which a pattern in which bright areas and dark areas are alternately arranged is obtained is acquired, and a pattern in which the bright areas and dark areas of the pattern are inverted is obtained. Image acquisition means for acquiring a second image obtained by imaging the projected target object;
Based on a first line that approximates a change in pixel value in a first direction in the first image and a second line that approximates a change in pixel value in a second direction in the second image. Determining means for determining a position of an intersection of the first line and the second line;
Based on the pixel values of at least two pixels in the vicinity of the intersection among the pixels of the first image, and the pixel values of at least two pixels in the vicinity of the intersection of the pixels of the second image, A reliability acquisition means for acquiring a reliability indicating the accuracy of the position of the intersection of the first line and the second line to be determined;
A three-dimensional measurement apparatus comprising: a derivation unit that derives three-dimensional shape information of the target object based on the reliability.
前記第1の画像および前記第2の画像は、同一の撮像手段によって順次撮像されることを特徴とすることを特徴とする請求項1乃至8のいずれか1項に記載の三次元計測装置。   The three-dimensional measurement apparatus according to claim 1, wherein the first image and the second image are sequentially captured by the same imaging unit. 前記導出手段は、前記パターンを投影する投影手段の位置と前記対象物体を撮像する撮像手段の位置とを用いて三角測量の原理により、前記境界位置に対応する位置ごとに、三次元形状情報を導出することを特徴とする請求項1乃至のいずれか1項に記載の三次元計測装置。 The derivation means obtains three-dimensional shape information for each position corresponding to the boundary position according to the principle of triangulation using the position of the projection means that projects the pattern and the position of the imaging means that images the target object. three-dimensional measuring apparatus according to any one of claims 1 to 7, wherein the deriving. 前記導出手段は、前記境界位置に対する信頼度が閾値以下の場合に、該境界位置に対応する位置に対する三次元形状情報の出力を禁止する禁止手段を更に備えることを特徴とする請求項1乃至の何れか1項に記載の三次元計測装置。 It said deriving means, when the reliability is below the threshold for the boundary position, claims 1 to 7, further comprising a prohibiting means for prohibiting the output of the three-dimensional shape information of a position corresponding to the boundary position The three-dimensional measurement apparatus according to any one of the above. ユーザの指示に基づいて前記閾値を取得する取得手段を更に備えることを特徴とする請求項11に記載の三次元計測装置。 The three-dimensional measurement apparatus according to claim 11 , further comprising an acquisition unit configured to acquire the threshold value based on a user instruction. 前記三次元計測装置は、更に、前記パターンを被写体に投影する投影手段と、
前記対象物体を撮像する撮像手段とを有することを特徴とする請求項1乃至12のいずれか1項に記載の三次元計測装置。
The three-dimensional measurement apparatus further includes a projecting unit that projects the pattern onto a subject.
Three-dimensional measuring apparatus according to any one of claims 1 to 12 and having an imaging means for imaging the object.
前記画素値は、輝度値であることを特徴とする請求項1乃至13のいずれか1項に記載の三次元計測装置。 The pixel value is three-dimensional measuring apparatus according to any one of claims 1 to 13, characterized in that a luminance value. 三次元計測装置における三次元計測方法であって、
画像取得手段が、明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得工程と、
信頼度取得手段が、前記第1の画像に含まれる画素値と前記第2の画像に含まれる画素値とに基づいて前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定工程と、
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値とに基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得工程と、
導出手段が、前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出工程と
を有することを特徴とする三次元計測方法。
A three-dimensional measurement method in a three-dimensional measurement apparatus,
A first image obtained by the image acquisition means imaging a target object on which a pattern in which bright areas and dark areas are alternately arranged is projected, and the bright area and the dark area of the pattern are inverted. An image acquisition step of acquiring a second image obtained by imaging the target object onto which the pattern is projected;
A determination that the reliability acquisition unit determines a boundary position between the bright area and the dark area of the pattern based on a pixel value included in the first image and a pixel value included in the second image; Process,
A reliability acquisition step of acquiring a reliability indicating the accuracy of the boundary position based on a pixel value included in the first image and a pixel value included in the second image;
And a deriving step of deriving three-dimensional shape information of the target object based on the reliability.
三次元計測装置における三次元計測方法であって、
画像取得手段が、明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、明部領域のみからなる全照明パターンが投影された前記対象物体を撮像して得られた第2の画像とし、パターンが投影されていない状態の前記対象物体を撮像して得られた第3の画像を取得する画像取得工程と、
決定手段が、前記第1の画像と、前記第2の画像および前記第3の画像とに基づいて決定される前記第1の画像内の前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定工程と、
信頼度取得手段が、前記第1の画像の前記境界位置の近傍の少なくとも2つの画素の画素値に基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得工程と、
導出手段が、前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出工程と
を有することを特徴とする三次元計測方法。
A three-dimensional measurement method in a three-dimensional measurement apparatus,
The image acquisition means projects a first image obtained by imaging a target object onto which a pattern in which bright areas and dark areas are alternately arranged is projected, and an entire illumination pattern including only the bright areas. An image obtaining step of obtaining a second image obtained by imaging the target object and obtaining a third image obtained by imaging the target object in a state in which no pattern is projected;
A boundary between the bright area and the dark area of the pattern in the first image determined by the determining means based on the first image, the second image, and the third image A determining step for determining the position;
A reliability acquisition step in which a reliability acquisition means acquires reliability indicating the accuracy of the boundary position based on pixel values of at least two pixels in the vicinity of the boundary position of the first image;
And a deriving step of deriving three-dimensional shape information of the target object based on the reliability.
コンピュータを、三次元計測装置として機能させるためのプログラムであって、前記プログラムは前記コンピュータを、
明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得手段、
前記第1の画像に含まれる画素値と前記第2の画像に含まれる画素値とに基づいて前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段、
前記第1の画像に含まれる画素値と、前記第2の画像に含まれる画素値とに基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段
として機能させることを特徴とするプログラム。
A program for causing a computer to function as a three-dimensional measuring apparatus, the program
A first image obtained by imaging a target object onto which a pattern in which bright areas and dark areas are alternately arranged is projected, and a pattern in which the bright area and the dark area of the pattern are inverted is projected. Image acquisition means for acquiring a second image obtained by imaging the target object;
Determining means for determining a boundary position between the bright area and the dark area of the pattern based on a pixel value included in the first image and a pixel value included in the second image;
A reliability acquisition means for acquiring a reliability indicating the accuracy of the boundary position based on a pixel value included in the first image and a pixel value included in the second image;
A program that functions as derivation means for deriving three-dimensional shape information of the target object based on the reliability.
コンピュータを、三次元計測装置として機能させるためのプログラムであって、前記プログラムは前記コンピュータを、
明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像と、明部領域のみからなる全照明パターンが投影された前記対象物体を撮像して得られた第2の画像と、パターンが投影されていない状態の前記対象物体を撮像して得られた第3の画像を取得する画像取得手段、
前記第1の画像と、前記第2の画像および前記第3の画像とに基づいて決定される前記第1の画像内の前記パターンの前記明部領域と前記暗部領域との境界位置を決定する決定手段、
前記第1の画像の前記境界位置の近傍の少なくとも2つの画素の画素値に基づいて、前記境界位置の正確性を示す信頼度を取得する信頼度取得手段、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段
として機能させることを特徴とするプログラム。
A program for causing a computer to function as a three-dimensional measuring apparatus, the program
A first image obtained by imaging a target object on which a pattern in which bright areas and dark areas are alternately arranged is projected, and the target object on which an entire illumination pattern including only a bright area is projected. Image acquisition means for acquiring a second image obtained by imaging and a third image obtained by imaging the target object in a state in which no pattern is projected;
A boundary position between the bright area and the dark area of the pattern in the first image determined based on the first image, the second image, and the third image is determined. Decision means,
Reliability acquisition means for acquiring a reliability indicating the accuracy of the boundary position based on pixel values of at least two pixels in the vicinity of the boundary position of the first image;
A program that functions as derivation means for deriving three-dimensional shape information of the target object based on the reliability.
三次元計測装置における三次元計測方法であって、
画像取得手段が、明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像を取得し、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得工程と、
決定手段が、前記第1の画像における第1の方向の画素値の変化を近似する第1の線と、前記第2の画像における第2の方向の画素値の変化を近似する第2の線とに基づいて、前記第1の線と前記第2の線との交点の位置を決定する決定工程と、
信頼度取得手段が、前記第1の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値と、前記第2の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値とに基づいて、前記決定される前記第1の線と前記第2の線との交点の位置の正確性を示す信頼度を取得する信頼度取得工程と、
導出手段が、前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出工程と
を有することを特徴とする三次元計測方法。
A three-dimensional measurement method in a three-dimensional measurement apparatus,
An image acquisition means acquires a first image obtained by imaging a target object onto which a pattern in which bright area and dark area are alternately arranged is projected, and the bright area and dark area of the pattern An image acquisition step of acquiring a second image obtained by imaging the target object onto which the inverted pattern is projected;
A first line approximating a change in a pixel value in a first direction in the first image; and a second line approximating a change in a pixel value in a second direction in the second image. And determining a position of an intersection of the first line and the second line based on
The reliability acquisition means includes pixel values of at least two pixels in the vicinity of the intersection among the pixels of the first image, and pixel values of at least two pixels in the vicinity of the intersection of the pixels of the second image. And a reliability acquisition step of acquiring a reliability indicating the accuracy of the position of the intersection of the first line and the second line determined based on:
And a deriving step of deriving three-dimensional shape information of the target object based on the reliability.
コンピュータを、三次元計測装置として機能させるためのプログラムであって、前記プログラムは前記コンピュータを、
明部領域と暗部領域とが交互に配置されたパターンが投影された対象物体を撮像して得られた第1の画像を取得し、前記パターンの明部領域と暗部領域とが反転したパターンが投影された前記対象物体を撮像して得られた第2の画像を取得する画像取得手段、
前記第1の画像における第1の方向の画素値の変化を近似する第1の線と、前記第2の画像における第2の方向の画素値の変化を近似する第2の線とに基づいて、前記第1の線と前記第2の線との交点の位置を決定する決定手段、
前記第1の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値と、前記第2の画像の画素のうち前記交点の近傍における少なくとも2つの画素の画素値とに基づいて、前記決定される前記第1の線と前記第2の線との交点の位置の正確性を示す信頼度を取得する信頼度取得手段、
前記信頼度に基づいて、前記対象物体の三次元形状情報を導出する導出手段
として機能させることを特徴とするプログラム。
A program for causing a computer to function as a three-dimensional measuring apparatus, the program
A first image obtained by imaging a target object onto which a pattern in which bright areas and dark areas are alternately arranged is obtained is acquired, and a pattern in which the bright areas and dark areas of the pattern are inverted is obtained. Image acquisition means for acquiring a second image obtained by imaging the projected target object;
Based on a first line that approximates a change in pixel value in a first direction in the first image and a second line that approximates a change in pixel value in a second direction in the second image. Determining means for determining the position of the intersection of the first line and the second line;
Based on the pixel values of at least two pixels in the vicinity of the intersection among the pixels of the first image, and the pixel values of at least two pixels in the vicinity of the intersection of the pixels of the second image, A reliability acquisition means for acquiring a reliability indicating the accuracy of the position of the intersection of the first line and the second line to be determined;
A program that functions as derivation means for deriving three-dimensional shape information of the target object based on the reliability.
JP2014137063A 2014-07-02 2014-07-02 Three-dimensional measuring apparatus, three-dimensional measuring method, and program Active JP5968370B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014137063A JP5968370B2 (en) 2014-07-02 2014-07-02 Three-dimensional measuring apparatus, three-dimensional measuring method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014137063A JP5968370B2 (en) 2014-07-02 2014-07-02 Three-dimensional measuring apparatus, three-dimensional measuring method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010148026A Division JP5576726B2 (en) 2010-06-29 2010-06-29 Three-dimensional measuring apparatus, three-dimensional measuring method, and program

Publications (2)

Publication Number Publication Date
JP2014194436A JP2014194436A (en) 2014-10-09
JP5968370B2 true JP5968370B2 (en) 2016-08-10

Family

ID=51839750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014137063A Active JP5968370B2 (en) 2014-07-02 2014-07-02 Three-dimensional measuring apparatus, three-dimensional measuring method, and program

Country Status (1)

Country Link
JP (1) JP5968370B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5907596B2 (en) * 2010-10-12 2016-04-26 キヤノン株式会社 Three-dimensional measuring apparatus, three-dimensional measuring method and program
JP2017078598A (en) * 2015-10-19 2017-04-27 キヤノン株式会社 Measuring device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07225834A (en) * 1994-02-10 1995-08-22 Matsushita Electric Ind Co Ltd Picture noise detector
JP3996560B2 (en) * 2003-08-18 2007-10-24 株式会社リコー Object shape measuring device
JP4501551B2 (en) * 2004-06-23 2010-07-14 富士ゼロックス株式会社 Three-dimensional shape measuring apparatus and method

Also Published As

Publication number Publication date
JP2014194436A (en) 2014-10-09

Similar Documents

Publication Publication Date Title
JP5576726B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method, and program
JP5907596B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method and program
JP5631094B2 (en) Measuring device and measuring method
US9546863B2 (en) Three-dimensional measuring apparatus and control method therefor
JP4830871B2 (en) 3D shape measuring apparatus and 3D shape measuring method
US9074879B2 (en) Information processing apparatus and information processing method
JP5032943B2 (en) 3D shape measuring apparatus and 3D shape measuring method
JP5633058B1 (en) 3D measuring apparatus and 3D measuring method
JP6170281B2 (en) Three-dimensional measuring device, control method for three-dimensional measuring device, and program
CN104838228A (en) Three-dimensional scanner and method of operation
JP2015210192A (en) Metrology device and metrology method
JP2015184056A (en) Measurement device, method, and program
US8970674B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method and storage medium
JP2014115108A (en) Distance measuring device
JP2008145139A (en) Shape measuring device
JP5968370B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method, and program
JP6412372B2 (en) Information processing apparatus, information processing system, information processing apparatus control method, and program
JP5743433B2 (en) 3D shape measuring device
JP2017156311A (en) Three-dimensional measurement device, three-dimensional measurement system, three-dimensional measurement method, and program
JP6552230B2 (en) Measuring device
JP2009216650A (en) Three-dimensional shape measuring device
JP2012098207A (en) Position measuring device, position measuring method and marker
KR101765257B1 (en) Method for acquiring three dimensional image information, and computing device implementing the samemethod
JP2005251122A (en) Image processor and image processing method
JP2017020953A (en) Measurement device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140728

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150522

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160208

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160705

R151 Written notification of patent or utility model registration

Ref document number: 5968370

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151