JP6867766B2 - Information processing device and its control method, program - Google Patents

Information processing device and its control method, program Download PDF

Info

Publication number
JP6867766B2
JP6867766B2 JP2016173122A JP2016173122A JP6867766B2 JP 6867766 B2 JP6867766 B2 JP 6867766B2 JP 2016173122 A JP2016173122 A JP 2016173122A JP 2016173122 A JP2016173122 A JP 2016173122A JP 6867766 B2 JP6867766 B2 JP 6867766B2
Authority
JP
Japan
Prior art keywords
image
pattern image
captured
information processing
projected
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
JP2016173122A
Other languages
Japanese (ja)
Other versions
JP2018041169A5 (en
JP2018041169A (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 JP2016173122A priority Critical patent/JP6867766B2/en
Publication of JP2018041169A publication Critical patent/JP2018041169A/en
Publication of JP2018041169A5 publication Critical patent/JP2018041169A5/ja
Application granted granted Critical
Publication of JP6867766B2 publication Critical patent/JP6867766B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、撮像画像に基づいて物体の三次元形状を求める技術に関する。 The present invention relates to a technique for obtaining a three-dimensional shape of an object based on a captured image.

プロジェクタから対象物体にパターン光を投影し、その反射光をカメラによって観測することで、対象物体面上における投影座標と撮像座標の対応関係を取得する技術は、アクティブステレオによる三次元計測に必要な技術として知られている。アクティブステレオの手法の一つに非周期的なパターン画像(ランダムドットなど)を投影した対象物体をカメラで撮像し、パターン画像と撮像画像との間で対応画素を探索することにより、投影座標と撮像座標の対応関係を求めるという手法がある。このような対応画素の探索では、パターン画像と撮像画像との間で、注目画素とその近傍画素(以降、窓)の輝度差などの値が所定の条件(最小、極小など)を満たす画素を探索(以降、対応点探索)することが行われる。 The technology to acquire the correspondence between the projected coordinates and the imaging coordinates on the surface of the target object by projecting the pattern light from the projector onto the target object and observing the reflected light with the camera is necessary for three-dimensional measurement by active stereo. Known as technology. One of the active stereo methods is to capture a target object on which an aperiodic pattern image (random dots, etc.) is projected with a camera, and search for the corresponding pixel between the pattern image and the captured image to obtain the projected coordinates. There is a method of finding the correspondence between the imaging coordinates. In such a search for corresponding pixels, a pixel whose value such as the brightness difference between the pixel of interest and its neighboring pixels (hereinafter, window) satisfies a predetermined condition (minimum, minimum, etc.) between the pattern image and the captured image is selected. A search (hereinafter referred to as a corresponding point search) is performed.

対応点探索では、正方形の窓を用いて対応点を探索するのが一般的である。しかし、投影されたパターン画像は、対象物体の形状やカメラの視点位置姿勢などによって変形するため、撮像画像から見たパターン画像は歪んでしまう。一般的な対応点探索ではこのような歪みが考慮されないため、対応点の探索の精度が低くなるという問題がある。また、プロジェクタとカメラの基線長が長いほどパターン画像と撮像画像との間の歪みは大きくなるため、投影されたパターン画像の歪みはより重大な問題となる。 In the correspondence point search, it is common to search for the correspondence point using a square window. However, since the projected pattern image is deformed depending on the shape of the target object, the viewpoint position and orientation of the camera, and the like, the pattern image seen from the captured image is distorted. Since such distortion is not taken into consideration in the general correspondence point search, there is a problem that the accuracy of the correspondence point search becomes low. Further, the longer the baseline length of the projector and the camera, the greater the distortion between the pattern image and the captured image, so that the distortion of the projected pattern image becomes a more serious problem.

このような問題を解決するために、歪みを考慮し対応点を探索する手法として、非特許文献1では対応点だけでなく対象物体の法線に相当するパラメタも同時推定する手法が用いられている。特許部件1によれば、対象物体の法線パラメタに応じて窓を歪ませた上で輝度差などの値を計算することで、高精度に投影座標と撮像座標の対応関係を求めることが出来る。 In order to solve such a problem, as a method of searching for a corresponding point in consideration of distortion, Non-Patent Document 1 uses a method of simultaneously estimating not only the corresponding point but also the parameter corresponding to the normal of the target object. There is. According to Patent Part 1, the correspondence between the projected coordinates and the imaging coordinates can be obtained with high accuracy by calculating the value such as the brightness difference after distorting the window according to the normal parameter of the target object. ..

Michael Bleyer et al., Patch Match Stereo - Stereo Matching with Slanted Support Windows, British Machine Vision Conference 2011.Michael Bleyer et al., Patch Match Stereo --Stereo Matching with Slanted Support Windows, British Machine Vision Conference 2011.

しかしながら、非特許文献1の手法では対応点だけでなく、窓の歪み方も同時に推定しているため、推定するパラメタが増え、探索範囲が膨大になる。したがって、計算コストが高くなるという問題がある。 However, in the method of Non-Patent Document 1, not only the corresponding points but also the distortion of the window is estimated at the same time, so that the number of parameters to be estimated increases and the search range becomes enormous. Therefore, there is a problem that the calculation cost becomes high.

本発明は上記問題に鑑みてなされたものであり、計算コストを抑えつつ、高精度に三次元形状を計測できる装置及び方法を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an apparatus and a method capable of measuring a three-dimensional shape with high accuracy while suppressing a calculation cost.

上記目的を達成するための本発明の一態様による情報処理装置は、以下の構成を備える。すなわち、
既知の幾何形状を少なくとも一つ以上有する第1のパターン画像投影された状態を撮像した撮像画像において、前記第1のパターン画像における前記幾何形状に対応する領域の、前記幾何形状からの幾何学的な歪みを表す写像を算出する算出手段と、
第2のパターン画像における注目画素とその周囲の近傍画素から構成される注目領域と、前記第2のパターン画像投影された状態を撮像した撮像画像における領域を前記写像に基づいて変換することにより得られた対応領域と、の対比により、前記第2のパターン画像と前記撮像画像との対応点を探索する探索手段と、を備え
前記対応領域は、前記第2のパターン画像が投影された状態を撮像した撮像画像における対応画素の周囲に、当該対応画素について前記写像に基づいて前記周囲の近傍画素の位置が変換されて配置された領域である。
The information processing apparatus according to one aspect of the present invention for achieving the above object has the following configuration. That is,
In the captured image in which the first pattern image is captured a state of being projected to have at least one known geometry, the area corresponding to the geometry of the first pattern image, geometry from the geometry A calculation means for calculating a mapping representing a geometrical distortion, and
A region of interest consists of neighboring pixels surrounding the target pixel in the second pattern image by the second pattern image is converted based on the region in the captured image obtained by capturing an image of a state of being projected onto the mapping A search means for searching for a corresponding point between the second pattern image and the captured image by comparison with the obtained corresponding area is provided .
The corresponding region is arranged around the corresponding pixel in the captured image obtained by capturing the projected state of the second pattern image, with the positions of the surrounding neighboring pixels converted for the corresponding pixel based on the mapping. area der Ru.

本発明によれば、撮像画像上でパターン画像が歪んで見えてしまう場合でも、低い計算コストで高精度に三次元形状を計測できる。 According to the present invention, even when the pattern image looks distorted on the captured image, the three-dimensional shape can be measured with high accuracy at a low calculation cost.

第1の実施形態の情報処理装置の構成例を示すブロック図。The block diagram which shows the structural example of the information processing apparatus of 1st Embodiment. 第1の実施形態で用いる窓形状算出用パターン画像と対応点探索用パターン画像を示す図。The figure which shows the pattern image for window shape calculation and the pattern image for correspondence point search used in 1st Embodiment. 第1の実施形態で用いる窓形状算出用パターン画像を球に投影した例を示す図。The figure which shows the example which projected the pattern image for window shape calculation used in 1st Embodiment on a sphere. 第1の実施形態で用いる窓形状算出用パターン画像の正方形を撮像画像中から検出する処理を説明する図。The figure explaining the process of detecting the square of the pattern image for window shape calculation used in 1st Embodiment from the captured image. 第1の実施形態の歪み算出部の写像パラメタを算出する処理を説明する図。The figure explaining the process of calculating the mapping parameter of the distortion calculation part of 1st Embodiment. 第1の実施形態の対応探索部の処理を説明する図。The figure explaining the process of the correspondence search part of 1st Embodiment. 第1の実施形態の情報処理装置による計測処理を説明するフローチャート。The flowchart explaining the measurement process by the information processing apparatus of 1st Embodiment. 変形例1で用いる窓形状算出用パターン画像と対応点探索用パターン画像とを混合したパターン画像を示す図。The figure which shows the pattern image which mixed the pattern image for window shape calculation used in the modification 1 and the pattern image for search for corresponding points. 変形例2で用いる窓形状算出用パターン画像を示す図。The figure which shows the pattern image for window shape calculation used in the modification 2. 第2の実施形態の情報処理装置の構成例を示すブロック図。The block diagram which shows the structural example of the information processing apparatus of 2nd Embodiment. 第2の実施形態の情報処理装置による計測処理を説明するフローチャート。The flowchart explaining the measurement process by the information processing apparatus of the 2nd Embodiment. 情報処理装置のハードウエア構成例を示すブロック図。The block diagram which shows the hardware configuration example of an information processing apparatus.

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

<第1の実施形態>
第1の実施形態において説明する情報処理装置は、対象物体にパターン光を投影し、その反射光を観測することで対象物体の三次元形状を計測する三次元計測器である。パターン光の投影とは、所定のパターン画像を投影することである。第1の実施形態では、撮像画像上のパターン画像の歪みを算出するための第1のパターン画像と、投影座標と撮像座標の対応関係を求めるための第2のパターン画像の二種類のパターン画像が用いられる。以下では、第1のパターン画像を窓形状算出用パターン画像、第2のパターン画像を対応点探索用パターン画像と称する。第1の実施形態の情報処理装置は、窓形状算出用パターン画像を投影した状態で撮像された撮像画像から歪みを検出し、検出された歪が考慮された窓と対応点探索用パターン画像を利用して対応点探索を行うことにより高精度な三次元座標を算出する。
<First Embodiment>
The information processing device described in the first embodiment is a three-dimensional measuring instrument that measures a three-dimensional shape of a target object by projecting pattern light onto the target object and observing the reflected light. The projection of pattern light is to project a predetermined pattern image. In the first embodiment, there are two types of pattern images, a first pattern image for calculating the distortion of the pattern image on the captured image and a second pattern image for obtaining the correspondence between the projected coordinates and the captured coordinates. Is used. Hereinafter, the first pattern image is referred to as a window shape calculation pattern image, and the second pattern image is referred to as a corresponding point search pattern image. The information processing apparatus of the first embodiment detects distortion from the captured image captured in a state where the pattern image for window shape calculation is projected, and displays the window and the pattern image for searching for corresponding points in consideration of the detected distortion. Highly accurate three-dimensional coordinates are calculated by performing a corresponding point search using this.

[装置の構成]
図1は、第1の実施形態の情報処理装置100を備える三次元計測装置1000の構成例を示すブロック図である。投影装置1は、窓形状算出用パターン画像と対応点探索用パターン画像を対象物体に投影する。これらのパターン光は、対象物体の表面で反射し、撮像装置2によって撮像される。撮像装置2が撮像した画像(撮像画像)は、情報処理装置100に送られる。情報処理装置100は、撮像装置2からの撮像画像に基づいて対象物体の三次元座標を算出する。また、情報処理装置100は、投影装置1および撮像装置2の動作を制御する。投影装置1と撮像装置2はお互いの座標系を一致させるための校正が予め行われており、校正データが情報処理装置100内に保存されている。
[Device configuration]
FIG. 1 is a block diagram showing a configuration example of a three-dimensional measuring device 1000 including the information processing device 100 of the first embodiment. The projection device 1 projects the window shape calculation pattern image and the corresponding point search pattern image onto the target object. These pattern lights are reflected on the surface of the target object and are imaged by the image pickup apparatus 2. The image (captured image) captured by the image pickup device 2 is sent to the information processing device 100. The information processing device 100 calculates the three-dimensional coordinates of the target object based on the captured image from the image pickup device 2. Further, the information processing device 100 controls the operations of the projection device 1 and the image pickup device 2. The projection device 1 and the image pickup device 2 have been calibrated in advance to match their coordinate systems, and the calibration data is stored in the information processing device 100.

情報処理装置100は、投影制御部101、画像入力部102、歪み算出部103、対応探索部104、座標算出部105を備える。投影制御部101は、投影装置1を制御し、窓形状算出用パターン画像と対応点探索用パターン画像を順番に投影させるとともに、画像入力部102に制御信号を出力する。画像入力部102は、投影制御部101から入力された制御信号のタイミングに合わせて撮像装置2を制御し、各パターン画像が投影された状態で撮像された撮像画像を受け取る。また、画像入力部102は、窓形状算出用パターン画像が投影された状態で得られた撮像画像を歪み算出部103に出力し、対応点探索用パターン画像が投影された状態で得られた撮像画像を対応探索部104に出力する。 The information processing device 100 includes a projection control unit 101, an image input unit 102, a distortion calculation unit 103, a correspondence search unit 104, and a coordinate calculation unit 105. The projection control unit 101 controls the projection device 1, projects the window shape calculation pattern image and the corresponding point search pattern image in order, and outputs a control signal to the image input unit 102. The image input unit 102 controls the image pickup device 2 in accordance with the timing of the control signal input from the projection control unit 101, and receives the captured image captured in the state in which each pattern image is projected. Further, the image input unit 102 outputs the captured image obtained in the state where the window shape calculation pattern image is projected to the distortion calculation unit 103, and the imaging obtained in the state where the corresponding point search pattern image is projected. The image is output to the corresponding search unit 104.

歪み算出部103は、窓形状算出用パターン画像と画像入力部102から入力された撮像画像とを比較して撮像画像中の各画素がどのように写像されているか(歪み)を表す歪みパラメタを算出し、対応探索部104に出力する。対応探索部104は、歪み算出部103から入力された歪みパラメタに基づいて画像入力部102から入力された撮像画像に歪みを考慮した窓を生成し、対応点探索用パターン画像と撮像画像との間で対応点探索を行う。対応探索部104は、得られた投影装置1の投影座標と撮像装置2の撮像座標との対応関係を座標算出部105に出力する。座標算出部105は、対応探索部104から入力された投影座標と画像座標の対応関係と、予め求められた投影装置1と撮像装置2の校正データとに基づいて、対象物体の表面の三次元座標を算出する。 The distortion calculation unit 103 compares the pattern image for window shape calculation with the captured image input from the image input unit 102, and sets a distortion parameter indicating how each pixel in the captured image is mapped (distortion). It is calculated and output to the corresponding search unit 104. The correspondence search unit 104 generates a window in consideration of distortion in the captured image input from the image input unit 102 based on the distortion parameter input from the distortion calculation unit 103, and combines the corresponding point search pattern image and the captured image. Search for corresponding points between. The correspondence search unit 104 outputs to the coordinate calculation unit 105 the correspondence relationship between the obtained projection coordinates of the projection device 1 and the imaging coordinates of the imaging device 2. The coordinate calculation unit 105 is three-dimensional on the surface of the target object based on the correspondence relationship between the projected coordinates and the image coordinates input from the correspondence search unit 104 and the calibration data of the projection device 1 and the image pickup device 2 obtained in advance. Calculate the coordinates.

図12は、図1に示した各機能部を実現する情報処理装置100のハードウエア構成例を示す図である。図12において、CPU161は1つまたは複数のコンピュータ(プロセッサー)を含み、ROM162またはRAM163に格納されたプログラムを実行することで、情報処理装置100の各種処理を実行する。ROM162は読み出し専用の不揮発性メモリであり、RAM163は随時書き込みが可能な揮発性メモリである。RAM163はCPU161の作業メモリとしても機能する。二次記憶装置164は、例えばハードディスクなどで構成される。二次記憶装置164には、プログラム171、パターン画像172、校正データ173が格納されている。プログラム171は、例えば図7のフローチャートにより後述する処理をCPU161に実行させるためのプログラムを含む。パターン画像172は、たとえば、窓形状算出用パターン画像と対応点探索用パターン画像を含む。校正データは、投影装置1と撮像装置2はお互いの座標系を一致させるためのデータである。表示部165は、CPU161の制御下で各種表示を行う。キーボード166、ポインティングデバイス167はユーザからの指示を受け付けるための指示入力部である。インターフェース168は、投影装置1と撮像措置2を情報処理装置100と接続する。上述した各構成は、バス169と接続される。図1に示した各機能部はCPU161がプログラムを実行することにより実現されてもよいし、専用のハードウエアにより実現されてもよい。 FIG. 12 is a diagram showing a hardware configuration example of the information processing apparatus 100 that realizes each functional unit shown in FIG. In FIG. 12, the CPU 161 includes one or a plurality of computers (processors), and executes various processes of the information processing apparatus 100 by executing a program stored in the ROM 162 or the RAM 163. The ROM 162 is a read-only non-volatile memory, and the RAM 163 is a volatile memory that can be written at any time. The RAM 163 also functions as a working memory of the CPU 161. The secondary storage device 164 is composed of, for example, a hard disk or the like. The program 171 and the pattern image 172 and the calibration data 173 are stored in the secondary storage device 164. The program 171 includes, for example, a program for causing the CPU 161 to execute a process described later according to the flowchart of FIG. 7. The pattern image 172 includes, for example, a pattern image for calculating the window shape and a pattern image for searching for a corresponding point. The calibration data is data for the projection device 1 and the image pickup device 2 to match each other's coordinate systems. The display unit 165 performs various displays under the control of the CPU 161. The keyboard 166 and the pointing device 167 are instruction input units for receiving instructions from the user. The interface 168 connects the projection device 1 and the imaging measure 2 with the information processing device 100. Each of the above configurations is connected to the bus 169. Each functional unit shown in FIG. 1 may be realized by the CPU 161 executing a program, or may be realized by dedicated hardware.

[計測処理]
図7のフローチャートにより第1の実施形態の情報処理装置100による計測処理を説明する。
[Measurement processing]
The measurement process by the information processing apparatus 100 of the first embodiment will be described with reference to the flowchart of FIG. 7.

三次元計測装置1000が起動されると、ステップS11において初期化処理が実行される。初期化処理には、投影装置1や撮像装置2の起動、投影装置1と撮像装置2の校正データを作業メモリに読み込む処理、窓形状算出用パターン画像と対応点探索用パターン画像を作業メモリに読み込む処理などが含まれる。 When the three-dimensional measuring device 1000 is started, the initialization process is executed in step S11. In the initialization process, the projection device 1 and the image pickup device 2 are activated, the calibration data of the projection device 1 and the image pickup device 2 are read into the working memory, and the window shape calculation pattern image and the corresponding point search pattern image are stored in the work memory. The process of reading is included.

ステップS12では、投影制御部101が、投影装置1に窓形状算出用パターン画像を投影させるとともに、画像入力部102に制御信号を送る。本実施形態で用いられる窓形状算出用パターン画像は、図2(a)に示されるように、正方形が規則的に並んだパターンである。図2(a)において、パターン画像における白部分11は光を投影することを表しており、黒部分12は光を投影しないことを表している。投影制御部101からの制御信号の受信に応じて、画像入力部102は、撮像装置2に撮像を実行させ、撮像画像を入力する。こうして入力された撮像画像は、窓形状算出用パターン画像が投影された状態で撮像された画像である。画像入力部102は、撮像装置2から入力された撮像画像を歪み算出部103に出力する。 In step S12, the projection control unit 101 projects the window shape calculation pattern image on the projection device 1 and sends a control signal to the image input unit 102. As shown in FIG. 2A, the window shape calculation pattern image used in the present embodiment is a pattern in which squares are regularly arranged. In FIG. 2A, the white portion 11 in the pattern image indicates that light is projected, and the black portion 12 indicates that light is not projected. In response to the reception of the control signal from the projection control unit 101, the image input unit 102 causes the image pickup device 2 to perform imaging and inputs the captured image. The captured image input in this way is an image captured in a state where the pattern image for calculating the window shape is projected. The image input unit 102 outputs the captured image input from the image pickup device 2 to the distortion calculation unit 103.

ステップS13では、投影制御部101が、投影装置1に対応点探索用パターン画像を投影させるとともに、画像入力部102に制御信号を送る。本実施形態で用いられる対応点探索用パターン画像は、たとえば、図2(b)に示すように、ドットがランダムに並んだ非周期的な画像である。対応点探索用パターン画像は、同じ特徴を持つ局所領域が一つの探索方向に2つ以上現れない画像であることが望ましい。投影制御部101からの制御信号の受信に応じて、画像入力部102は、撮像装置2に画像を撮像させる。こうして、画像入力部102は、対象物体に対応点探索用パターン画像が投影された状態で撮像された撮像画像を撮像装置2から入力し、対応探索部104に出力する。 In step S13, the projection control unit 101 projects the pattern image for searching for the corresponding point on the projection device 1 and sends a control signal to the image input unit 102. The pattern image for searching for corresponding points used in the present embodiment is, for example, an aperiodic image in which dots are randomly arranged, as shown in FIG. 2 (b). It is desirable that the pattern image for searching for corresponding points is an image in which two or more local regions having the same characteristics do not appear in one search direction. In response to the reception of the control signal from the projection control unit 101, the image input unit 102 causes the image pickup device 2 to capture an image. In this way, the image input unit 102 inputs the captured image captured in the state where the corresponding point search pattern image is projected on the target object from the image pickup device 2, and outputs the captured image to the corresponding search unit 104.

ステップS14では、歪み算出部103が、画像入力部102から入力された撮像画像から窓形状算出用パターン画像における正方形に対応する領域を検出し、検出した領域が正方形と比較してどのように写像されているか(歪み)をパラメタ化する。歪みとは、窓形状算出用パターン画像における局所領域(本例では正方形の領域)が撮像画像中において平行四辺形などに歪むことを指している。例えば、図2(a)に示した窓形状算出用パターン画像を投影装置1により球に投影し、撮像装置2により撮像すると、図3(b)に示すような撮像画像が得られる。この撮像画像を拡大して見ると、図3(a)のようにパターン画像が歪んでいることが分かる。 In step S14, the distortion calculation unit 103 detects a region corresponding to a square in the pattern image for window shape calculation from the captured image input from the image input unit 102, and how the detected region is mapped as compared with the square. Parameterize whether it is done (distortion). Distortion means that the local region (square region in this example) in the pattern image for calculating the window shape is distorted into a parallelogram or the like in the captured image. For example, when the window shape calculation pattern image shown in FIG. 2 (a) is projected onto a sphere by the projection device 1 and imaged by the image pickup device 2, an captured image as shown in FIG. 3 (b) is obtained. When this captured image is magnified, it can be seen that the pattern image is distorted as shown in FIG. 3A.

このような、撮像画像における、窓形状算出用パターン画像の局所領域に対応する領域の幾何学的な歪みをパラメタ化するため、歪み算出部103は、まず撮像画像(図4(a))から窓形状算出用パターン画像における白線を検出する。例えば、歪み算出部103は、撮像画像の輝度に応じて線上画素(の候補画素)かどうかの二値を判定し、およそ縦方向、横方向に連続する候補画素の集合を縦線、横線として検出する(図4(b)の線21)。そして、歪み算出部103は、隣り合う縦方向の二線と横方向の二線で囲まれる領域を、窓形状算出用パターン画像中の正方領域に対応する領域(図4(c)の領域23)として検出する。例えば、歪み算出部103は、縦線にも横線にも含まれている点を線の交点(図4(b)の交点22)として求め、縦方向、横方向に隣り合う交点が同一の縦線、横線上にあるかどうかを判定する。歪み算出部103は、隣り合う交点が同一の縦線、横線上にあると判定された交点により囲まれた領域を、窓形状算出用パターン画像中の正方形に対応する領域として検出する。 In order to parameterize the geometric distortion of the region corresponding to the local region of the window shape calculation pattern image in the captured image, the distortion calculation unit 103 first starts with the captured image (FIG. 4A). Detects white lines in the window shape calculation pattern image. For example, the distortion calculation unit 103 determines the binary value of whether or not the pixels are on the line (candidate pixels) according to the brightness of the captured image, and sets a set of candidate pixels that are substantially continuous in the vertical and horizontal directions as vertical lines and horizontal lines. Detect (line 21 in FIG. 4B). Then, the strain calculation unit 103 sets a region surrounded by two adjacent vertical lines and two horizontal lines as a region corresponding to a square region in the pattern image for window shape calculation (region 23 in FIG. 4C). ). For example, the strain calculation unit 103 obtains a point included in both the vertical line and the horizontal line as the intersection of the lines (intersection 22 in FIG. 4B), and the intersections adjacent to each other in the vertical and horizontal directions are the same in the vertical direction. Determine if it is on a line or horizontal line. The strain calculation unit 103 detects a region surrounded by intersections determined to have adjacent intersections on the same vertical line and horizontal line as a region corresponding to a square in the window shape calculation pattern image.

次に、歪み算出部103は、窓形状算出用パターン画像中の正方形に対応する、撮像画像中のすべての領域の歪みをパラメタ化する。パラメタ化する方法は様々ありどのような表現が用いられてもよい。例えば、2次元の線形変換としてパラメタ化する方法が挙げられる。変換前の座標を(u,v)、変換後の座標を(x,y)とすると2次元の線形変換は次の数1に示す式で表わされる。

Figure 0006867766
Next, the distortion calculation unit 103 parameterizes the distortion of all the regions in the captured image corresponding to the squares in the window shape calculation pattern image. There are various methods for parameterizing, and any expression may be used. For example, there is a method of parameterizing as a two-dimensional linear transformation. Assuming that the coordinates before the conversion are (u, v) and the coordinates after the conversion are (x, y), the two-dimensional linear conversion is expressed by the following equation 1.
Figure 0006867766

数1において、fは写像を表し、a,b,c,dはfを表現する線形変換を示すパラメタである。窓形状算出用パターン画像中の正方形と撮像画像から検出した領域との対応関係からこれらのパラメタを求める。一つの点(図5における(0,0))を基準とすれば点または線分の対応関係(図5における(0,1)と(x1,y1)、(1,1)と(x2,y2)、(1,0)と(x3,y3))が得られる。この対応関係から解析的にパラメタを求めてもよいし、最小二乗法のような方法で最適なパラメタ求めてもよい。検出した領域内の画素はこのようにして求めたパラメタでパターン画像が歪んでいるものとする。 In Equation 1, f is a parameter representing a mapping, and a, b, c, and d are parameters indicating a linear transformation representing f. These parameters are obtained from the correspondence between the square in the pattern image for window shape calculation and the area detected from the captured image. If one point ((0,0) in FIG. 5) is used as a reference, the correspondence between points or line segments ((0,1) and (x1, y1) in FIG. 5), (1,1) and (x2, y2), (1,0) and (x3, y3)) are obtained. The parameters may be obtained analytically from this correspondence, or the optimum parameters may be obtained by a method such as the least squares method. It is assumed that the pattern image of the pixels in the detected area is distorted by the parameters obtained in this way.

一連の処理を撮像画像中のすべての領域で行うことで、撮像画像の各画素について写像fが決定される。窓形状算出用パターン画像中の正方形に対応する撮像画像中の領域が検出されない、できない領域が発生する場合もあるが、そのような領域では写像fを単位行列としてもよいし、近傍画素における写像fの線形和をとるなどして補間してもよい。歪み算出部103は、求めた歪みパラメタ(画素ごとのf)を対応探索部104に出力する。 By performing a series of processes in all regions in the captured image, the mapping f is determined for each pixel of the captured image. A region in the captured image corresponding to the square in the pattern image for window shape calculation may not be detected or may not be detected. In such a region, the mapping f may be used as an identity matrix, or a mapping in neighboring pixels may occur. Interpolation may be performed by taking a linear sum of f or the like. The distortion calculation unit 103 outputs the obtained distortion parameter (f for each pixel) to the corresponding search unit 104.

ステップS15では、対応探索部104が、歪み算出部103から入力された歪みパラメタに基づき窓を生成し、対応点探索用パターン画像と画像入力部102から入力された撮像画像との間で対応点探索を行う。対応点探索では、対応点探索用パターン画像と撮像画像との間で注目画素とその近傍画素(例えば、注目画素の周囲8画素)における輝度差などに基づいたコストが条件を満たす(最小、極小など)点をエピポーラ方向に探索し、対応点を求める。一般的には互いに正方形の窓を注目領域としてコストを計算するが、本実施形態ではパターン画像が投影されている画素に対してパターン画像の歪みfを考慮したコスト計算を行い、対応点を探索する。対応点探索用パターン画像の輝度をI、撮像画像の輝度をJ、注目画素をp、注目画素pの近傍画素をq、注目画素pと近傍画素qの集合をWp、注目画素pに対応する画素をr、対応画素rにおける写像をfrとする。対応領域は、対応点探索用パターン画像の投影を含む撮像画像において、対応画素rの周囲に、当該対応画素rについて算出された写像frに基づいて周囲の近傍画素の位置が変換されて配置された領域である。対応領域と注目領域の間のコストを算出するためのコスト関数Cは、例えば次のように設定される。

Figure 0006867766
In step S15, the correspondence search unit 104 generates a window based on the distortion parameter input from the distortion calculation unit 103, and the correspondence point between the corresponding point search pattern image and the captured image input from the image input unit 102. Perform a search. In the corresponding point search, the cost based on the brightness difference between the corresponding point search pattern image and the captured image in the pixel of interest and its neighboring pixels (for example, 8 pixels around the pixel of interest) is satisfied (minimum, minimum). Etc.) Search for points in the epipolar direction and find the corresponding points. Generally, the cost is calculated with the square windows as the areas of interest, but in the present embodiment, the cost is calculated in consideration of the distortion f of the pattern image for the pixel on which the pattern image is projected, and the corresponding point is searched for. To do. The brightness of the pattern image for searching for corresponding points corresponds to I, the brightness of the captured image corresponds to J, the pixel of interest corresponds to p, the nearby pixel of the pixel of interest p corresponds to q, the set of the pixel of interest p and the neighboring pixel q corresponds to Wp, and the pixel of interest p. Let r be the pixel and fr be the mapping on the corresponding pixel r. In the captured image including the projection of the pattern image for searching for the corresponding point, the corresponding area is arranged around the corresponding pixel r by converting the positions of the surrounding neighboring pixels based on the mapping fr calculated for the corresponding pixel r. Area. The cost function C for calculating the cost between the corresponding area and the area of interest is set as follows, for example.
Figure 0006867766

パターン画像の歪み方を考慮した対応点探索の例を図6に示す。図6(a)に示される対応点探索用パターン画像おける白丸31は注目画素p、白枠32は注目画素pとその近傍画素が形成される注目領域(窓)、白線33はエピポーラ線である。図6(b)に示される撮像画像おける白丸34は対応画素rである。白枠35は、対応画素rにおける写像(fr)により示される歪みを考慮した対応領域(窓)であり、対応画素rとその近傍画素で形成される。対応点探索では、エピポーラ線(白線33)に沿って注目画素p(白丸31)を動かし、注目画素pの各位置において注目領域と対応領域とを対比する。注目領域と対応領域について数2のコスト関数により算出されるコストが所定の条件を満たす(最小、極小など)注目画素pを対応点として求める。撮像画像上に歪みを考慮した窓を生成することで、参照画素がサブピクセル値を取る場合があるが、そのような場合にはバイリニア補間をするなどして輝度を求め、コストを計算すればよい。この処理を撮像画像上のすべての画素において行うことで、対応点(pとrのペア)が画素数分だけ得られる。得られたすべての投影座標と撮像座標の対応関係(画素数分のpとrのペア)を座標算出部105に出力する。 FIG. 6 shows an example of a corresponding point search in consideration of how the pattern image is distorted. The white circle 31 in the corresponding point search pattern image shown in FIG. 6A is the attention pixel p, the white frame 32 is the attention area (window) in which the attention pixel p and its neighboring pixels are formed, and the white line 33 is the epipolar line. .. The white circle 34 in the captured image shown in FIG. 6B is the corresponding pixel r. The white frame 35 is a corresponding region (window) in consideration of the distortion indicated by the mapping (fr) in the corresponding pixel r, and is formed by the corresponding pixel r and its neighboring pixels. In the corresponding point search, the pixel of interest p (white circle 31) is moved along the epipolar line (white line 33), and the region of interest and the corresponding region are compared at each position of the pixel of interest p. For the region of interest and the corresponding region, the pixel p of interest whose cost calculated by the cost function of Equation 2 satisfies a predetermined condition (minimum, minimum, etc.) is obtained as a corresponding point. By generating a window that takes distortion into consideration on the captured image, the reference pixel may take a sub-pixel value. In such a case, if the brightness is calculated by bilinear interpolation or the like, the cost can be calculated. Good. By performing this process on all the pixels on the captured image, corresponding points (pairs of p and r) can be obtained for the number of pixels. The correspondence between all the obtained projected coordinates and the imaging coordinates (pairs of p and r for the number of pixels) is output to the coordinate calculation unit 105.

ステップS16では、座標算出部105が、対応探索部104から入力された投影座標と撮像座標との対応関係と予め求められた投影装置1と撮像装置2の校正データから、三角測量を行う。こうして、対象物体の表面の三次元座標(対応点数分の(X,Y,Z)座標)を算出し、処理を終了する。 In step S16, the coordinate calculation unit 105 performs triangulation based on the correspondence between the projected coordinates and the imaging coordinates input from the corresponding search unit 104 and the calibration data of the projection device 1 and the imaging device 2 obtained in advance. In this way, the three-dimensional coordinates ((X, Y, Z) coordinates of the corresponding points) of the surface of the target object are calculated, and the process is completed.

なお、ステップの順は必ずしも図7のフローチャートに示した順である必要はなく、適宜入れ替えてもよいし、並列処理してもよい。 The order of the steps does not necessarily have to be the order shown in the flowchart of FIG. 7, and may be appropriately replaced or parallel processing may be performed.

以上のように、第1の実施形態によれば、投影パターン画像が撮像画像中でどのように歪むかを考慮して窓を生成し、対応点探索を行うことにより、三次元座標を高精度に算出することができる。 As described above, according to the first embodiment, the windows are generated in consideration of how the projection pattern image is distorted in the captured image, and the corresponding point search is performed to obtain the three-dimensional coordinates with high accuracy. Can be calculated in.

[変形例1]
上記実施形態では、ステップS12で窓形状算出用パターン画像を投影し、テップS13において対応点探索用パターン画像を投影し、これらパターン画像の投影を含む撮像画像が別々に取得されるが、これに限られるものではない。たとえば、図8に示すように窓形状算出用パターン画像(図8(a))と対応点探索用パターン画像(図8(b))を混合したパターン画像(図8(c))を投影し、これを撮像して歪みを示すパラメタの取得と対応点の探索に用いるようにしてもよい。あるいは、各パターン画像を投影する光の波長を変え、それら波長に対応した撮像装置を用いることで、これらパターン画像を同時に投影するようにしてもよい。たとえば、第1の波長の光(例えば赤色)で窓形状算出用パターンを投影するとともに、第2の波長の光(例えば緑色)で対応点探索用パターンを投影した状態で、カラー画像の撮像を行う。得られた撮像画像から赤色の線を検出することで歪みを示すパラメタを算出し、緑色の点を検出して探索の対象とする。以上のように、変形例1の構成によれば、一度の投影、撮像で計測が可能となるため、動きのある対象物体であっても、三次元座標を高精度に算出することができる。
[Modification 1]
In the above embodiment, the window shape calculation pattern image is projected in step S12, the corresponding point search pattern image is projected in Tep S13, and the captured images including the projection of these pattern images are separately acquired. It is not limited. For example, as shown in FIG. 8, a pattern image (FIG. 8 (c)) in which a window shape calculation pattern image (FIG. 8 (a)) and a corresponding point search pattern image (FIG. 8 (b)) are mixed is projected. , This may be imaged and used for acquiring a parameter indicating distortion and searching for a corresponding point. Alternatively, by changing the wavelength of the light for projecting each pattern image and using an imaging device corresponding to those wavelengths, these pattern images may be projected at the same time. For example, a color image is captured with the window shape calculation pattern projected by the light of the first wavelength (for example, red) and the corresponding point search pattern projected by the light of the second wavelength (for example, green). Do. A parameter indicating distortion is calculated by detecting a red line from the obtained captured image, and a green point is detected and used as a search target. As described above, according to the configuration of the modified example 1, since the measurement can be performed by one projection and the imaging, the three-dimensional coordinates can be calculated with high accuracy even for a moving target object.

[変形例2]
ステップS12やステップS13において投影されるパターン画像の一例として図2を示したが、パターン画像はこれらに限られるものではない。特に窓形状算出用パターン画像は、図2に示したように既知の幾何形状(正方形)が規則的に並んでいる必要はなく、既知の幾何形状が少なくとも一つ以上あればよい。例えば図9に示すように、異なる種類の既知の幾何形状として正三角形41と正方形42が並んでいるようなパターン画像でもよい。ただし、歪みパラメタを各画素において求めるため、窓形状算出用パターン画像中に既知形状がまんべんなく存在していることが望ましい。
[Modification 2]
FIG. 2 is shown as an example of the pattern image projected in step S12 and step S13, but the pattern image is not limited to these. In particular, in the pattern image for calculating the window shape, it is not necessary for the known geometric shapes (squares) to be regularly arranged as shown in FIG. 2, and it is sufficient that at least one known geometric shape is present. For example, as shown in FIG. 9, a pattern image in which equilateral triangles 41 and squares 42 are arranged side by side as different types of known geometric shapes may be used. However, since the distortion parameter is obtained for each pixel, it is desirable that the known shapes are evenly present in the pattern image for calculating the window shape.

なお、歪みパラメタを求めるため、撮像画像から既知の幾何形状(以下、既知形状ともにう)を検出する必要がある。例えば、既知形状の検出には、
・撮像画像にSobelフィルタといったエッジ検出フィルタを適用し手エッジを検出し、連結して一周しているエッジを既知形状として検出する方法、
・既知形状をテンプレートとして、LBP(Local Binary Pattern)やSIFT(Scale-Invariant Feature Transform)といった画像特徴量を用いてマッチングを取ることで既知形状を検出する方法、が挙げられる。
In addition, in order to obtain the distortion parameter, it is necessary to detect a known geometric shape (hereinafter, both known shapes) from the captured image. For example, to detect a known shape,
-A method of applying an edge detection filter such as the Sobel filter to the captured image to detect the hand edge, and detecting the connected edge that goes around as a known shape.
-A method of detecting a known shape by matching using an image feature amount such as LBP (Local Binary Pattern) or SIFT (Scale-Invariant Feature Transform) using a known shape as a template can be mentioned.

なお、異なる複数種類の既知形状を、窓形状算出用パターン画像における分割領域に種類ごとに存在させることにより、対応探索部104は、各画素の歪みパラメタとともに各画素がパターン画像中のおよそどの部分と対応しているかを把握できる。例えば、図9の場合、撮像画像中の正三角形41はパターン画像の上部、正方形42はパターン画像の下部と対応している。そのため、対応探索部104は、正三角形41内の画素であれば撮像画像の上部に、正方形42内の画素であれば撮像画像の下部に存在していることを把握できる。その結果、対応探索部104は、たとえば、図6(a)に示した探索範囲をエピポーラ線の上半分などのように限定することができ、三次元座標を高速、高精度に算出することができる。 By allowing a plurality of different types of known shapes to exist in the divided region of the window shape calculation pattern image for each type, the corresponding search unit 104 can use the distortion parameter of each pixel as well as approximately which part of the pattern image each pixel is. Can be grasped whether it corresponds to. For example, in the case of FIG. 9, the equilateral triangle 41 in the captured image corresponds to the upper part of the pattern image, and the square 42 corresponds to the lower part of the pattern image. Therefore, the corresponding search unit 104 can grasp that the pixels in the equilateral triangle 41 are present in the upper part of the captured image, and the pixels in the square 42 are present in the lower part of the captured image. As a result, the corresponding search unit 104 can limit the search range shown in FIG. 6A to the upper half of the epipolar line, for example, and can calculate the three-dimensional coordinates at high speed and with high accuracy. it can.

[変形例3]
ステップS12やステップS13において、投影するパターン画像は二値に限る必要はなく、階調や色調を持たせたパターン画像でもよい。たとえば、窓形状算出用パターンとして、階調や色調が異なる、既知の幾何形状が並んでいる画像を用いることができる。階調や色調が異なる複数の既知の幾何形状を撮像画像における輝度や色相などを特徴として検出すればよい。このようにすることで、変形例2と同様に、各画素の歪みパラメタとともにパターン画像中のおよそどの部分と対応しているかが分かるため、対応探索部104の探索範囲を限定することができる。したがって、三次元座標を高速、高精度に算出することができる。
[Modification 3]
In step S12 and step S13, the pattern image to be projected does not have to be limited to binary, and may be a pattern image having gradation and color tone. For example, as a window shape calculation pattern, an image in which known geometric shapes having different gradations and color tones are arranged can be used. A plurality of known geometric shapes having different gradations and color tones may be detected as features such as brightness and hue in the captured image. By doing so, it is possible to limit the search range of the corresponding search unit 104 because it is possible to know which part of the pattern image corresponds to along with the distortion parameter of each pixel, as in the modified example 2. Therefore, the three-dimensional coordinates can be calculated at high speed and with high accuracy.

[変形例4]
ステップS15では、ステップS14で求められた歪みパラメタを初期値として、非特許文献1と同様に対応点と窓の歪み方を同時に推定してもよい(数2におけるfrに相当するパラメタも同時に推定する)。すなわち、対応探索部104は、歪み算出部103により算出された写像を初期値として、対応画素rの更新に応じて写像frを更新する。この際、第1の実施形態のように、窓算出用パターン画像の局所領域に対応する、対応点探索用パターン画像の領域内の全探索により写像を探索してもよいし、Graph Cut、Belief Propagation、PatchMatchといったアルゴリズムを用いて写像を探索してもよい。このようにすることで、ある程度正しい歪みパラメタを初期値とすることができるため、写像の探索コストを抑えることができる。したがって、三次元座標を高速、高精度に算出することができる。
[Modification example 4]
In step S15, the strain parameter obtained in step S14 may be used as the initial value, and the corresponding point and the distortion of the window may be estimated at the same time as in Non-Patent Document 1 (the parameter corresponding to fr in Equation 2 is also estimated at the same time. To do). That is, the correspondence search unit 104 updates the mapping fr in response to the update of the corresponding pixel r, with the mapping calculated by the distortion calculation unit 103 as the initial value. At this time, as in the first embodiment, the mapping may be searched by the entire search in the area of the corresponding point search pattern image corresponding to the local area of the window calculation pattern image, or Graph Cut or Belief. The mapping may be searched using an algorithm such as Propagation or PatchMatch. By doing so, the distortion parameter that is correct to some extent can be set as the initial value, so that the search cost of the map can be suppressed. Therefore, the three-dimensional coordinates can be calculated at high speed and with high accuracy.

<第2の実施形態>
第1の実施形態では投影装置と撮像装置が1台ずつの構成だったが、第2の実施形態では、対象物体にパターン光を投影し、その反射光を2台の撮像装置によって観測することで対象物体の三次元形状を計測する構成を説明する。第2の実施形態の情報処理装置は、窓形状算出用パターン画像から算出した歪みを考慮した窓を生成し、2台の撮像装置から得られた撮像画像間の対応点探索を行うことで高精度な三次元座標を算出する。2台の撮像装置を用いることで、投影したパターン画像がボケる、相互反射などでパターン画像が崩れる、といった光学的な影響による精度の低下を抑えることができる。
<Second embodiment>
In the first embodiment, the projection device and the image pickup device are configured one by one, but in the second embodiment, the pattern light is projected on the target object and the reflected light is observed by the two image pickup devices. The configuration for measuring the three-dimensional shape of the target object will be described in. The information processing apparatus of the second embodiment generates a window considering the distortion calculated from the pattern image for calculating the window shape, and searches for a corresponding point between the captured images obtained from the two imaging devices. Calculate accurate 3D coordinates. By using two image pickup devices, it is possible to suppress a decrease in accuracy due to optical influences such as the projected pattern image being blurred and the pattern image being distorted due to mutual reflection or the like.

[装置の構成]
図10は、第2の実施形態の情報処理装置100を備える三次元計測装置1000の構成例を示すブロック図である。第1の実施形態とは、撮像装置が1台追加され、第1の撮像装置2と第2の撮像装置3を有している点が異なる。第1の撮像装置2と第の撮像装置3は、投影装置1によりパターン画像が投影された状態で、異なる位置から撮像を行う。なお、投影装置1、第1の撮像装置2、第2の撮像装置3は各々の座標系を一致させるための校正が予め行われており、校正データが情報処理装置100内に保存されている。なお、情報処理装置100のハードウエア構成は第1の実施形態(図12)と同様である。
[Device configuration]
FIG. 10 is a block diagram showing a configuration example of a three-dimensional measuring device 1000 including the information processing device 100 of the second embodiment. The first embodiment is different from the first embodiment in that one imaging device is added and the first imaging device 2 and the second imaging device 3 are provided. The first imaging device 2 and the second imaging device 3 perform imaging from different positions in a state where the pattern image is projected by the projection device 1. The projection device 1, the first image pickup device 2, and the second image pickup device 3 have been calibrated in advance to match their coordinate systems, and the calibration data is stored in the information processing device 100. .. The hardware configuration of the information processing device 100 is the same as that of the first embodiment (FIG. 12).

情報処理装置100は、投影制御部101、画像入力部102、歪み算出部103、対応探索部104、座標算出部105を備える。投影制御部101は、投影装置1を制御して、窓形状算出用パターン画像と対応点探索用パターン画像を混合したパターン画像(以下、混合パターン画像)を投影させるとともに、画像入力部102に制御信号を出力する。混合パターン画像の一例を図8(c)に示す。なお、第1実施形態と同様に、窓形状算出用パターン画像(図8(a))と対応点探索用パターン画像(図8(b))を順次に個別に投影し、撮像するようにしてもよい。画像入力部102は、投影制御部101から入力された制御信号のタイミングに合わせて、第1の撮像装置2、および、第2の撮像装置3を制御し、撮像を実行させ、それぞれから混合パターン画像が投影された撮像画像を受け取る。画像入力部102は、混合パターン画像が投影された2枚の撮像画像を歪み算出部103に出力する。 The information processing device 100 includes a projection control unit 101, an image input unit 102, a distortion calculation unit 103, a correspondence search unit 104, and a coordinate calculation unit 105. The projection control unit 101 controls the projection device 1 to project a pattern image (hereinafter referred to as a mixed pattern image) in which a pattern image for window shape calculation and a pattern image for searching corresponding points are mixed, and is controlled by the image input unit 102. Output a signal. An example of the mixed pattern image is shown in FIG. 8 (c). As in the first embodiment, the window shape calculation pattern image (FIG. 8 (a)) and the corresponding point search pattern image (FIG. 8 (b)) are sequentially projected and imaged individually. May be good. The image input unit 102 controls the first image pickup device 2 and the second image pickup device 3 in accordance with the timing of the control signal input from the projection control unit 101 to execute the image pickup, and mix patterns from each of them. Receive the captured image on which the image is projected. The image input unit 102 outputs the two captured images on which the mixed pattern image is projected to the distortion calculation unit 103.

歪み算出部103は、混合パターン画像内に含まれる窓形状算出用パターン画像と画像入力部102から入力された2枚の撮像画像とに基づいて、それぞれの撮像画像中の各画素がどのように写像されているかを示す歪みパラメタを算出する。歪み算出部103は、算出された2枚の撮像画像の歪みパラメタを対応探索部104に出力する。対応探索部104は、歪み算出部103から入力された歪みパラメタに基づき、歪みを考慮した窓を生成し、画像入力部102から入力された2枚の撮像画像同士の間で対応点探索を行う。対応探索部104は、対応点探索により得られた、第1の撮像装置2の撮像座標と第2の撮像装置3の撮像座標との関係を、座標算出部105に出力する。座標算出部105は、対応探索部104から入力された撮像座標の対応関係と予め求められた第1の撮像装置2と第2の撮像装置3の校正データから、三次元座標を算出する。 The distortion calculation unit 103 determines how each pixel in each captured image is based on the window shape calculation pattern image included in the mixed pattern image and the two captured images input from the image input unit 102. Calculate the distortion parameter that indicates whether the image is mapped. The distortion calculation unit 103 outputs the calculated distortion parameters of the two captured images to the corresponding search unit 104. The correspondence search unit 104 generates a window considering the distortion based on the distortion parameter input from the distortion calculation unit 103, and performs a correspondence point search between the two captured images input from the image input unit 102. .. The correspondence search unit 104 outputs to the coordinate calculation unit 105 the relationship between the imaging coordinates of the first imaging device 2 and the imaging coordinates of the second imaging device 3 obtained by the corresponding point search. The coordinate calculation unit 105 calculates the three-dimensional coordinates from the correspondence relationship of the image pickup coordinates input from the correspondence search unit 104 and the calibration data of the first image pickup device 2 and the second image pickup device 3 obtained in advance.

[計測処理]
図11のフローチャートにより第2の実施形態の情報処理装置100による計測処理を説明する。
[Measurement processing]
The measurement process by the information processing apparatus 100 of the second embodiment will be described with reference to the flowchart of FIG.

三次元計測装置2000が起動されると、ステップS21において初期化処理が実行される。初期化処理には、投影装置1、第1の撮像装置2と第2の撮像装置3の起動処理、投影装置1、第1の撮像装置2、および、第2の撮像装置3の校正データを作業メモリに読み込む処理、混合パターン画像を読み込む処理などが含まれる。 When the three-dimensional measuring device 2000 is started, the initialization process is executed in step S21. In the initialization process, the projection device 1, the activation process of the first image pickup device 2 and the second image pickup device 3, the calibration data of the projection device 1, the first image pickup device 2, and the second image pickup device 3 are used. It includes a process of reading into the working memory, a process of reading a mixed pattern image, and the like.

ステップS22では、投影制御部101が、投影装置1に混合パターン画像を投影させるとともに、画像入力部102に制御信号を送る。制御信号を受けた画像入力部102は、第1の撮像装置2と第2の撮像装置3に、対象物体に混合パターン画像が投影された画像を撮像させる。画像入力部102は、入力された2枚の撮像画像を歪み算出部103に出力する。 In step S22, the projection control unit 101 projects the mixed pattern image on the projection device 1 and sends a control signal to the image input unit 102. The image input unit 102 that has received the control signal causes the first image pickup device 2 and the second image pickup device 3 to take an image in which the mixed pattern image is projected on the target object. The image input unit 102 outputs the two input captured images to the distortion calculation unit 103.

ステップS23では、歪み算出部103が、画像入力部102から入力された2枚の撮像画像のそれぞれについて、窓形状算出用パターン画像における正方形の領域が、撮像画像へどのように写像されているかを示す歪みパラメタを算出する。歪みパラメタを求める処理は第1の実施形態(S14)と同様である。求めたそれぞれの歪みパラメタ(画素ごとのf)と2枚の撮像画像を対応探索部104に出力する。 In step S23, the distortion calculation unit 103 determines how the square region in the window shape calculation pattern image is mapped to the captured image for each of the two captured images input from the image input unit 102. Calculate the indicated distortion parameters. The process of obtaining the strain parameter is the same as that of the first embodiment (S14). Each of the obtained distortion parameters (f for each pixel) and two captured images are output to the corresponding search unit 104.

ステップS24では、対応探索部104が、歪み算出部103から入力された歪みパラメタに基づき、2枚の撮像画像のそれぞれにおいて窓を生成し、2枚の撮像画像同士の間で対応点探索を行う。第1の実施形態と同様、対応点探索用パターン画像が投影されている画素に対してパターン画像の歪みfを考慮したコスト計算を行い、対応点を探索する。第1の撮像装置2の撮像画像の輝度をI、第2の撮像装置3の撮像画像の輝度をJ、注目画素をp、注目画素pにおける写像をfp、注目画素pの近傍画素をq(例えば、注目画素pの周囲8画素)、注目画素pと近傍画素qの集合をWpとする。また、注目画素pに対応する画素をr、対応画素rにおける写像をfrとする。例えばコスト関数Cは次の数3により算出される。

Figure 0006867766
In step S24, the correspondence search unit 104 creates a window in each of the two captured images based on the distortion parameter input from the distortion calculation unit 103, and searches for a corresponding point between the two captured images. .. Similar to the first embodiment, the cost is calculated in consideration of the distortion f of the pattern image for the pixel on which the pattern image for searching the corresponding point is projected, and the corresponding point is searched. The brightness of the image captured by the first imaging device 2 is I, the brightness of the image captured by the second imaging device 3 is J, the pixel of interest is p, the mapping of the pixel of interest p is fp, and the pixels in the vicinity of the pixel of interest p are q ( For example, 8 pixels around the pixel of interest p), and the set of the pixel of interest p and the neighboring pixel q is Wp. Further, the pixel corresponding to the pixel of interest p is r, and the mapping on the corresponding pixel r is fr. For example, the cost function C is calculated by the following equation 3.
Figure 0006867766

コスト関数を用いた対応点探索処理は第1の実施形態と同様である。すなわち、対応探索部104は、エピポーラ線に沿って注目画素を動かし、数3のコスト関数が所定条件を満たす(最小、極小など)注目画素pを求める。このように、2つの撮像画像について対応点の探索を行うと、ボケや相互反射が起きてパターン画像が崩れてしまっても撮像画像同士では同様の見えとなるため、好適に対応点探索を行うことができる。対応探索部104は、得られたすべての撮像座標同士の対応関係(画素数分のpとrのペア)を座標算出部105に出力する。 The corresponding point search process using the cost function is the same as that of the first embodiment. That is, the correspondence search unit 104 moves the attention pixel along the epipolar line, and obtains the attention pixel p (minimum, minimum, etc.) in which the cost function of Equation 3 satisfies a predetermined condition (minimum, minimum, etc.). In this way, when the corresponding points are searched for the two captured images, even if the pattern images are distorted due to blurring or mutual reflection, the captured images look the same, so the corresponding point search is preferably performed. be able to. The correspondence search unit 104 outputs the correspondence relationship (pairs of p and r for the number of pixels) between all the obtained imaging coordinates to the coordinate calculation unit 105.

ステップS25では、座標算出部105が、対応探索部104から入力された撮像座標同士の対応関係と、第1の撮像装置2と第2の撮像装置3の予め求められた校正データとから、三角測量により三次元座標(対応点数分の(X,Y,Z)座標)を算出する。そして本処理を終了する。 In step S25, the coordinate calculation unit 105 triangulates from the correspondence relationship between the imaging coordinates input from the correspondence search unit 104 and the pre-obtained calibration data of the first imaging device 2 and the second imaging device 3. Three-dimensional coordinates ((X, Y, Z) coordinates for the number of corresponding points) are calculated by surveying. Then, this process is terminated.

以上のように第2の実施形態によれば、投影パターン画像がそれぞれの撮像画像中でどのように歪むかを考慮して窓を生成し、対応点探索がる。また、第2の実施形態によれば、2台の撮像装置を利用することで、ボケや相互反射などの光学的な影響による精度の低下が抑えられるため、三次元座標を高精度に算出することができる。 As described above, according to the second embodiment, a window is generated in consideration of how the projection pattern image is distorted in each captured image, and a corresponding point search is performed. Further, according to the second embodiment, by using two imaging devices, it is possible to suppress a decrease in accuracy due to optical influences such as blurring and mutual reflection, so that the three-dimensional coordinates are calculated with high accuracy. be able to.

[変形例5]
ステップS24において、第1の撮像装置2と第2の撮像装置3の対応関係だけでなく、第1の実施形態のように、投影装置と第1の撮像装置2、投影装置と第2の撮像装置3の対応関係を求めてもよい。このようにすることで、遮蔽などによって三次元座標を計測できない部分を減らすことができる。
[Modification 5]
In step S24, not only the correspondence between the first image pickup device 2 and the second image pickup device 3, but also the projection device and the first image pickup device 2, and the projection device and the second image pickup as in the first embodiment. The correspondence relationship of the device 3 may be obtained. By doing so, it is possible to reduce the portion where the three-dimensional coordinates cannot be measured due to shielding or the like.

[変形例6]
第2の実施形態では投影装置を1台、撮像装置を2台としたが、投影装置および撮像装置の第数はこれに限られるものではなく、投影装置と撮像装置が各々何台あってもよい。ステップS23では、投影装置、撮像装置それぞれペアを決めて歪みを求めればよい。また、ステップS24では、それぞれペアのコストを計算して対応関係を求めてもよいし、Multi-view Stereoのようにすべてのコストを統合して対応関係を求めてもよい。このようにすることで、遮蔽などによって計測できない部分を減らし、より確実に対象物体全体を計測することができる。
[Modification 6]
In the second embodiment, the number of projection devices is one and the number of image pickup devices is two, but the number of projection devices and image pickup devices is not limited to this, and the number of projection devices and image pickup devices is not limited to this. Good. In step S23, the distortion may be obtained by determining a pair of the projection device and the image pickup device. Further, in step S24, the cost of each pair may be calculated to obtain the correspondence relationship, or all the costs may be integrated to obtain the correspondence relationship as in Multi-view Stereo. By doing so, it is possible to reduce the portion that cannot be measured due to shielding or the like, and to measure the entire target object more reliably.

<実施形態の効果>
第1の実施形態によれば、投影パターン画像が撮像画像中でどのように歪むかを考慮して窓を生成し、対応点探索を行うことにより、三次元座標を高精度に算出することができる。
第2の実施形態によれば、第1の実施形態の効果に加え、2台のカメラを利用することで、ボケや相互反射などの光学的な影響による精度の低下を抑えることにより、三次元座標を高精度に算出することができる。
<Effect of embodiment>
According to the first embodiment, it is possible to calculate the three-dimensional coordinates with high accuracy by generating a window in consideration of how the projection pattern image is distorted in the captured image and performing a corresponding point search. it can.
According to the second embodiment, in addition to the effect of the first embodiment, by using two cameras, it is possible to suppress a decrease in accuracy due to optical influences such as blurring and mutual reflection, thereby making it three-dimensional. The coordinates can be calculated with high accuracy.

<定義>
投影制御部101が持つパターン画像は、第1の実施形態や変形例1、2、3で説明したように、歪みを考慮した窓形状を生成し対応点探索を行うことができれば、どのようなパターン画像でもよい。
また、対応探索部104は、第1の実施形態や変形例4で説明したように、対応点を求めることができれば、どのようなアルゴリズムを用いてもよい。
<Definition>
As for the pattern image possessed by the projection control unit 101, as described in the first embodiment and the modified examples 1, 2 and 3, what kind of pattern image can be obtained if a window shape considering distortion can be generated and a corresponding point search can be performed. It may be a pattern image.
Further, as described in the first embodiment and the modification 4, the correspondence search unit 104 may use any algorithm as long as the correspondence point can be obtained.

また、投影装置1や撮像装置2は第2の実施形態や変形例6で説明したように、それぞれ1台に限る必要はなく、複数台あってもよい。 Further, the projection device 1 and the image pickup device 2 do not have to be limited to one as described in the second embodiment and the modification 6, and may be a plurality of each.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It is also possible to realize the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

1000:三次元計測装置、1:投影装置、2:撮像装置、100:情報処理装置、101:投影制御部、102:画像入力部、103:歪み算出部、104:対応探索部、105:座標算出部 1000: 3D measuring device, 1: Projection device, 2: Imaging device, 100: Information processing device, 101: Projection control unit, 102: Image input unit, 103: Distortion calculation unit, 104: Correspondence search unit, 105: Coordinates Calculation unit

Claims (13)

既知の幾何形状を少なくとも一つ以上有する第1のパターン画像投影された状態を撮像した撮像画像において、前記第1のパターン画像における前記幾何形状に対応する領域の、前記幾何形状からの幾何学的な歪みを表す写像を算出する算出手段と、
第2のパターン画像における注目画素とその周囲の近傍画素から構成される注目領域と、前記第2のパターン画像投影された状態を撮像した撮像画像における領域を前記写像に基づいて変換することにより得られた対応領域と、の対比により、前記第2のパターン画像と前記撮像画像との対応点を探索する探索手段と、を備え
前記対応領域は、前記第2のパターン画像が投影された状態を撮像した撮像画像における対応画素の周囲に、当該対応画素について前記写像に基づいて前記周囲の近傍画素の位置が変換されて配置された領域であることを特徴とする情報処理装置。
In the captured image in which the first pattern image is captured a state of being projected to have at least one known geometry, the area corresponding to the geometry of the first pattern image, geometry from the geometry A calculation means for calculating a mapping representing a geometrical distortion, and
A region of interest consists of neighboring pixels surrounding the target pixel in the second pattern image by the second pattern image is converted based on the region in the captured image obtained by capturing an image of a state of being projected onto the mapping A search means for searching for a corresponding point between the second pattern image and the captured image by comparison with the obtained corresponding area is provided .
The corresponding region is arranged around the corresponding pixels in the captured image obtained by capturing the projected state of the second pattern image, with the positions of the surrounding neighboring pixels converted for the corresponding pixels based on the mapping. the information processing apparatus according to claim region der Rukoto was.
前記探索手段は、前記対応領域の点に対応するエピポーラ線に沿って前記注目領域を探索することを特徴とする請求項1に記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the search means searches the region of interest along an epipolar line corresponding to a point in the corresponding region. 前記探索手段は、前記算出手段により算出された写像を初期値として、前記対応画素の更新に応じて写像を更新することを特徴とする請求項に記載の情報処理装置。 The information processing apparatus according to claim 1 , wherein the search means updates the map according to the update of the corresponding pixel, with the map calculated by the calculation means as an initial value. 前記第1のパターン画像投影された状態を撮像した撮像画像と、前記第2のパターン画像投影された状態を撮像した撮像画像を、別々の撮像画像として取得する取得手段を更に備えることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 A captured image captured a state where the first pattern image is projected, the captured image and the second pattern image is captured a state of being projected, further comprising an acquisition means for acquiring as a separate captured images The information processing apparatus according to any one of claims 1 to 3, which is characterized. 前記第1のパターン画像と前記第2のパターン画像とを混合したパターン画像投影された状態を撮像した撮像画像を取得する取得手段を更に備えることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 Any of claims 1 to 4 , further comprising an acquisition means for acquiring an image captured by capturing a state in which a pattern image obtained by mixing the first pattern image and the second pattern image is projected. The information processing apparatus according to item 1. 前記第2のパターン画像は、非周期的なパターンを有することを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 5 , wherein the second pattern image has an aperiodic pattern. 前記第1のパターン画像は、階調または色調が異なる、既知の幾何形状が並んでいる画像であることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 6 , wherein the first pattern image is an image in which known geometric shapes are arranged, which have different gradations or color tones. 前記第1のパターン画像は、前記幾何形状が規則的に並んでいるパターン画像であることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 7 , wherein the first pattern image is a pattern image in which the geometric shapes are regularly arranged. 前記探索手段により探索された前記対応点に基づいて、対象物体の表面の三次元座標を算出する座標算出手段を更に備えることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 The information according to any one of claims 1 to 8 , further comprising a coordinate calculation means for calculating three-dimensional coordinates of the surface of the target object based on the corresponding point searched by the search means. Processing equipment. 投影手段をさらに備えることを特徴とする請求項1乃至のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 9 , further comprising a projection means. 撮像手段をさらに備えることを特徴とする請求項1乃至10のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 10 , further comprising an imaging means. 情報処理装置の制御方法であって、
既知の幾何形状を少なくとも一つ以上有する第1のパターン画像投影された状態を撮像した撮像画像において、前記第1のパターン画像における前記幾何形状に対応する領域の、前記幾何形状からの幾何学的な歪みを表す写像を算出する工程と、
第2のパターン画像における注目画素とその周囲の近傍画素から構成される注目領域と、前記第2のパターン画像投影された状態を撮像した撮像画像における領域を前記写像に基づいて変換することにより得られた対応領域と、の対比により、前記第2のパターン画像と前記撮像画像との対応点を探索する探索工程と、を有し、
前記対応領域は、前記第2のパターン画像が投影された状態を撮像した撮像画像における対応画素の周囲に、当該対応画素について前記写像に基づいて前記周囲の近傍画素の位置が変換されて配置された領域であることを特徴とする情報処理装置の制御方法。
It is a control method for information processing equipment.
In the captured image in which the first pattern image is captured a state of being projected to have at least one known geometry, the area corresponding to the geometry of the first pattern image, geometry from the geometry The process of calculating a mapping that represents a geometrical distortion,
A region of interest consists of neighboring pixels surrounding the target pixel in the second pattern image by the second pattern image is converted based on the region in the captured image obtained by capturing an image of a state of being projected onto the mapping the corresponding area obtained by the comparison, have a, a search step of searching corresponding points between the captured image and the second pattern image,
The corresponding region is arranged around the corresponding pixels in the captured image obtained by capturing the projected state of the second pattern image, with the positions of the surrounding neighboring pixels converted for the corresponding pixels based on the mapping. a method of controlling an information processing apparatus characterized by region der Rukoto was.
コンピュータに、請求項12に記載の情報処理装置の制御方法の各工程を実行させるためのプログラム。 A program for causing a computer to execute each step of the control method of the information processing apparatus according to claim 12.
JP2016173122A 2016-09-05 2016-09-05 Information processing device and its control method, program Active JP6867766B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016173122A JP6867766B2 (en) 2016-09-05 2016-09-05 Information processing device and its control method, program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016173122A JP6867766B2 (en) 2016-09-05 2016-09-05 Information processing device and its control method, program

Publications (3)

Publication Number Publication Date
JP2018041169A JP2018041169A (en) 2018-03-15
JP2018041169A5 JP2018041169A5 (en) 2019-10-10
JP6867766B2 true JP6867766B2 (en) 2021-05-12

Family

ID=61626128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016173122A Active JP6867766B2 (en) 2016-09-05 2016-09-05 Information processing device and its control method, program

Country Status (1)

Country Link
JP (1) JP6867766B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7119621B2 (en) * 2018-06-18 2022-08-17 オムロン株式会社 Image processing system and image processing method
JP2022073496A (en) 2020-11-02 2022-05-17 セイコーエプソン株式会社 Determination method for projective transformation matrix, projector, and determination system

Also Published As

Publication number Publication date
JP2018041169A (en) 2018-03-15

Similar Documents

Publication Publication Date Title
JP7282317B2 (en) Three-dimensional measurement system and three-dimensional measurement method
JP6363863B2 (en) Information processing apparatus and information processing method
JP4883517B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method, and three-dimensional measuring program
JP4885584B2 (en) Rangefinder calibration method and apparatus
JP6566768B2 (en) Information processing apparatus, information processing method, and program
US20100328308A1 (en) Three Dimensional Mesh Modeling
JP6352208B2 (en) 3D model processing apparatus and camera calibration system
JP2020053008A (en) Positioning method, robot, and computer storage medium
CN103782232A (en) Projector and control method thereof
EP2887313B1 (en) Image processing apparatus, system, image processing method, and computer-readable recording medium
KR20160121509A (en) Structured light matching of a set of curves from two cameras
JP2012021919A (en) Image processing system, image processing method and computer program
JP6282377B2 (en) Three-dimensional shape measurement system and measurement method thereof
JP5624457B2 (en) Three-dimensional data processing apparatus, method and program
JP6867766B2 (en) Information processing device and its control method, program
WO2024192102A1 (en) Systems and methods for splat filling a three-dimensional image using semi-measured data
TWI571099B (en) Device and method for depth estimation
JP2018009927A (en) Image processing device, image processing method and program
JP7298687B2 (en) Object recognition device and object recognition method
JP2015206654A (en) Information processing apparatus, information processing method, and program
JP6456084B2 (en) Image processing apparatus, image processing method, and program
JP2017199285A (en) Information processor, information processing method, program
JP5728399B2 (en) Measuring device, method and program
JP3823559B2 (en) How to convert 3D distance data
JP4351090B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190830

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201009

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201127

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210409

R151 Written notification of patent or utility model registration

Ref document number: 6867766

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151