JP2016080545A - Measuring device, projection pattern - Google Patents

Measuring device, projection pattern Download PDF

Info

Publication number
JP2016080545A
JP2016080545A JP2014213088A JP2014213088A JP2016080545A JP 2016080545 A JP2016080545 A JP 2016080545A JP 2014213088 A JP2014213088 A JP 2014213088A JP 2014213088 A JP2014213088 A JP 2014213088A JP 2016080545 A JP2016080545 A JP 2016080545A
Authority
JP
Japan
Prior art keywords
projection pattern
projection
stripes
boundary line
image
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.)
Pending
Application number
JP2014213088A
Other languages
Japanese (ja)
Inventor
史織 太田
Shiori Ota
史織 太田
増田 浩二
Koji Masuda
浩二 増田
二瓶 靖厚
Yasuhiro Nihei
靖厚 二瓶
上田 健
Takeshi Ueda
健 上田
伊藤 昌弘
Masahiro Ito
昌弘 伊藤
小川 武士
Takeshi Ogawa
武士 小川
周 高橋
Shu Takahashi
周 高橋
宏昌 田中
Hiromasa Tanaka
宏昌 田中
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2014213088A priority Critical patent/JP2016080545A/en
Publication of JP2016080545A publication Critical patent/JP2016080545A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a measuring device capable of preventing a resolution power from being reduced, while enlarging a size of the measurable measurement object.SOLUTION: A three-dimensional shape measuring device (measuring device) includes: a projection part for projecting a projection pattern P having a plurality of stripes S arranged side by side; an imaging part for imaging a measurement object; and a distance calculation part for calculating a distance up to the measurement object from the projection pattern imaged by the imaging part using a triangulation method. The projection pattern P includes a plurality of periodic areas Ar formed by arranging two pairs of adjacent stripes S in a second direction D2 without overlapping each other using m×(m-1) pieces of m kinds of strips S coded by luminescence value of an m value level with m as a natural number of 3 or more. The projection pattern P is provided with a boundary line B having a luminescence value of a different level when viewed from a first direction D1, and the boundary line B is linearly formed so as to be inclined to the first direction D1 and the second direction D2 in the projection pattern P.SELECTED DRAWING: Figure 4

Description

本発明は、測定装置およびそこで用いる投影パターンに関し、特に三次元形状の測定に好適な測定装置および投影パターンに関する。   The present invention relates to a measuring apparatus and a projection pattern used therein, and more particularly to a measuring apparatus and a projection pattern suitable for measuring a three-dimensional shape.

測定対象の形状を測定する測定装置(三次元形状測定装置)では、測定対象に投影パターンを投影し、投影された投影パターンを撮像するパターン投影法を用いるものがある。このような測定装置では、測定対象に基準となる投影パターンを投影する投影部と、その投影部による投影方向とは異なる方向から撮像する撮像部と、を備えるものがある。   Some measurement apparatuses (three-dimensional shape measurement apparatuses) that measure the shape of a measurement object use a pattern projection method that projects a projection pattern onto the measurement object and images the projected projection pattern. Some of such measurement apparatuses include a projection unit that projects a projection pattern serving as a reference onto a measurement target, and an imaging unit that captures an image from a direction different from the projection direction of the projection unit.

その測定装置では、測定対象の外形形状に沿って変形した投影パターンを撮像部で撮像し、その変形した投影パターン像と投影部で投影した投影パターンとの対応付けを行うことで、測定対象の三次元形状測定を行う。測定装置では、測定対象の三次元形状を適切に測定するために投影パターン像と投影パターンとを適切に対応付けする必要があることから、いかに誤対応を少なくかつ簡便に行うことができるかが求められる。このため、このような測定装置では、投影部がコード化した投影パターンを投影するものとし、その投影パターンの構成や投影の方法等を工夫するものが提案されている(例えば、特許文献1、2、3参照)。その特許文献1では、全白または全黒のストライプと、全白または全黒ではない輝度値または色相を有しコード化されたストライプと、を交互に配置する投影パターンを用いている。また、特許文献2では、投影パターンを投影することと、投影パターンを投影せずにフラッシュを用いることと、投影パターンを投影せずにフラッシュを用いないことと、を連続して行いつつ撮像部で各々を撮像している。さらに、特許文献3では、投影部が複数のスリットを用いるものとし、撮像部での撮像の露光時間内において、投影部がスリット毎の露光時間を変化させつつ用いるスリットを変化させている。   In the measurement apparatus, the projection pattern deformed along the outer shape of the measurement target is captured by the imaging unit, and the deformed projection pattern image and the projection pattern projected by the projection unit are associated with each other. Perform 3D shape measurement. In the measuring device, since it is necessary to properly associate the projection pattern image with the projection pattern in order to appropriately measure the three-dimensional shape of the measurement target, it is possible to reduce the miscorrespondence easily and easily. Desired. Therefore, in such a measuring apparatus, a projection pattern encoded by the projection unit is projected, and a device that devises a configuration of the projection pattern, a projection method, and the like has been proposed (for example, Patent Document 1, 2 and 3). In Patent Document 1, a projection pattern is used in which stripes of all white or all black and stripes coded with luminance values or hues that are not all white or all black are alternately arranged. Further, in Patent Document 2, an imaging unit is configured to continuously project a projection pattern, use a flash without projecting a projection pattern, and not use a flash without projecting a projection pattern. Each is imaged. Further, in Patent Literature 3, the projection unit uses a plurality of slits, and the slit used by the projection unit while changing the exposure time for each slit is changed within the exposure time of imaging in the imaging unit.

このような測定装置では、より広い面積を高い分解能で三次元形状を測定することが求められている。ところが、測定装置では、投影した投影パターンにおける各ストライプの並列方向で見て、当該投影パターンの寸法(サイズ)よりも大きな寸法(サイズ)の測定対象の三次元形状を測定することができない。このため、測定装置では、投影パターンの寸法(サイズ)を大きくすべく、ストライプの本数を増やすことや、並列方向における各ストライプの幅寸法を大きくすることが考えられる。   In such a measuring apparatus, it is required to measure a three-dimensional shape over a wider area with high resolution. However, the measurement apparatus cannot measure the three-dimensional shape of the measurement target having a dimension (size) larger than the dimension (size) of the projection pattern when viewed in the parallel direction of the stripes in the projected projection pattern. For this reason, in the measuring apparatus, it is conceivable to increase the number of stripes or increase the width dimension of each stripe in the parallel direction in order to increase the dimension (size) of the projection pattern.

ところが、測定装置では、投影パターンにおける並列方向での位置を隣接する各ストライプの組み合わせにより判別することから、投影パターンのストライプの本数を増やすには各ストライプ(そのコード)の種類を増やす必要がある。そして、測定装置では、各ストライプ(そのコード)の種類を増やすとストライプ毎の差異が小さくなるため、各ストライプの判別を適切に行うことが困難となるので、投影パターンのストライプの本数を増やすことは困難である。   However, in the measurement apparatus, the position in the parallel direction in the projection pattern is determined by the combination of adjacent stripes. Therefore, in order to increase the number of stripes in the projection pattern, it is necessary to increase the type of each stripe (its code). . In the measurement device, if the number of stripes (its codes) is increased, the difference between the stripes is reduced, making it difficult to properly identify each stripe. Therefore, the number of stripes in the projection pattern is increased. It is difficult.

また、測定装置では、投影パターン(投影パターン像)の並列方向で見てストライプ毎に三次元形状測定を行うものであることから、投影した各ストライプの幅寸法が測定対象の測定結果(三次元形状)における並列方向での分解能(解像度)となる。このため、測定装置では、各ストライプの幅寸法を大きくすると、分解能(解像度)の低下を招いてしまう。   In addition, since the measuring device performs three-dimensional shape measurement for each stripe as viewed in the parallel direction of the projection pattern (projection pattern image), the width dimension of each projected stripe is the measurement result (three-dimensional) (Resolution) in the parallel direction in (shape). For this reason, in the measuring apparatus, when the width dimension of each stripe is increased, the resolution (resolution) is lowered.

本発明は、上記の事情に鑑みて為されたもので、測定可能な測定対象の大きさを大きくしつつ分解能の低下を防止することのできる測定装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a measuring apparatus capable of preventing a decrease in resolution while increasing the size of a measurable measurement target.

請求項1に記載の測定装置は、第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させた投影パターンを投影光軸上で測定対象に投影する投影部と、前記投影光軸とは異なる撮像光軸で前記測定対象を撮像する撮像部と、前記投影部で投影した前記投影パターンを前記撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する距離算出部と、を備え、前記投影パターンは、mを3以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプをm×(m−1)本用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を有し、前記投影パターンでは、前記第1方向で見て異なるレベルの輝度値となる境界線を設け、前記境界線を前記投影パターンにおいて前記第1方向および前記第2方向に対して傾斜する直線状に形成していることを特徴とする。   The measurement apparatus according to claim 1, wherein a projection unit projects a projection pattern, in which a plurality of stripes extending in a first direction are arranged in parallel in a second direction inclined with respect to the first direction onto a measurement target on a projection optical axis An imaging unit that images the measurement target with an imaging optical axis different from the projection optical axis, and the projection pattern image projected by the projection unit using a triangulation method from the projection pattern image captured by the imaging unit. A distance calculation unit that calculates a distance to a measurement target, and the projection pattern includes m × (m−) m stripes encoded with luminance values at an m-value level, where m is a natural number of 3 or more. 1) It has a plurality of periodic regions formed by arranging two stripes adjacent to each other in the second direction without overlapping each other, and the projection pattern is viewed in the first direction. Different levels of brightness The boundary line to be provided, characterized in that it is formed in a straight line that is inclined to the boundary line with respect to the first direction and the second direction in the projection pattern.

本発明に係る測定装置では、測定可能な測定対象の大きさを大きくしつつ分解能の低下を防止することができる。   In the measuring apparatus according to the present invention, it is possible to prevent a decrease in resolution while increasing the size of a measurable measurement object.

本発明の測定装置の一実施形態に係る実施例1の三次元形状測定装置10の構成を概略的に示す説明図である。It is explanatory drawing which shows roughly the structure of the three-dimensional shape measuring apparatus 10 of Example 1 which concerns on one Embodiment of the measuring apparatus of this invention. 三次元形状測定装置10を用いて三次元形状の測定を行う様子を模式的に示す説明図である。It is explanatory drawing which shows typically a mode that a three-dimensional shape is measured using the three-dimensional shape measuring apparatus. 図2に示す三次元形状測定装置10を用いた三次元形状の測定を上方から見た様子を模式的に示す説明図である。It is explanatory drawing which shows typically a mode that the measurement of the three-dimensional shape using the three-dimensional shape measuring apparatus 10 shown in FIG. 2 was seen from upper direction. 三次元形状測定装置10の投影部11が投影する投影パターンPの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern P which the projection part 11 of the three-dimensional shape measuring apparatus 10 projects. 投影パターンPの各周期性領域Arにおける各ストライプSの配列の一例を示す説明図である。It is explanatory drawing which shows an example of the arrangement | sequence of each stripe S in each periodic area | region Ar of the projection pattern P. FIG. 図2、図3、図7、図8を用いた説明で用いる投影パターンPAを示す説明図である。It is explanatory drawing which shows the projection pattern PA used by description using FIG.2, FIG.3, FIG.7 and FIG. 三次元形状測定装置10の撮像部12により撮像された画像Iを模式的に示す説明図である。It is explanatory drawing which shows typically the image I imaged by the imaging part 12 of the three-dimensional shape measuring apparatus 10. FIG. 三次元形状測定装置10の制御部13にて実行される三次元形状測定処理内容を示すフローチャートである。3 is a flowchart showing the contents of a three-dimensional shape measurement process executed by a control unit 13 of the three-dimensional shape measurement apparatus 10. 本発明の測定装置の一実施形態に係る実施例2の三次元形状測定装置10の投影部11が投影する投影パターンPBの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PB which the projection part 11 of the three-dimensional shape measurement apparatus 10 of Example 2 which concerns on one Embodiment of this invention projects. 本発明の測定装置の一実施形態に係る実施例3の三次元形状測定装置10の投影部11が投影する投影パターンPCの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PC which the projection part 11 of the three-dimensional shape measuring apparatus 10 of Example 3 which concerns on one Embodiment of this invention projects. 本発明の測定装置の一実施形態に係る実施例3の三次元形状測定装置10の投影部11が投影する他の例の投影パターンPDの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PD of the other example which the projection part 11 of the three-dimensional shape measuring apparatus 10 of Example 3 which concerns on one Embodiment of this invention projects. 本発明の測定装置の一実施形態に係る実施例4の三次元形状測定装置10の投影部11が投影する投影パターンPEの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PE which the projection part 11 of the three-dimensional shape measuring apparatus 10 of Example 4 which concerns on one Embodiment of this invention projects. 本発明の測定装置の一実施形態に係る実施例5の三次元形状測定装置10の投影部11が投影する投影パターンPFの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PF which the projection part 11 of the three-dimensional shape measuring apparatus 10 of Example 5 which concerns on one Embodiment of this invention projects. 本発明の測定装置の一実施形態に係る実施例6の三次元形状測定装置10の投影部11が投影する投影パターンPGの一例を示す説明図である。It is explanatory drawing which shows an example of the projection pattern PG which the projection part 11 of the three-dimensional shape measuring apparatus 10 of Example 6 which concerns on one Embodiment of this invention projects.

以下に、本発明に係る測定装置の各実施例について図面を参照しつつ説明する。   Embodiments of the measuring apparatus according to the present invention will be described below with reference to the drawings.

本発明に係る測定装置の一例としての実施例1の三次元形状測定装置10を、図1から図8を用いて説明する。なお、図1、図2および図3では、三次元形状測定装置10の構成の理解を容易なものとするために、各部の構成を模式的に示している。このため、図1、図2および図3に示す三次元形状測定装置10は、必ずしも実際の構成と一致するものではない。   A three-dimensional shape measuring apparatus 10 of Example 1 as an example of a measuring apparatus according to the present invention will be described with reference to FIGS. 1, 2, and 3 schematically show the configuration of each unit in order to facilitate understanding of the configuration of the three-dimensional shape measuring apparatus 10. For this reason, the three-dimensional shape measuring apparatus 10 shown in FIGS. 1, 2 and 3 does not necessarily match the actual configuration.

本発明に係る測定装置としての実施例1の三次元形状測定装置10は、測定対象Oに投影パターンP(図4等参照)を投影し、その投影パターンPを撮像し、その撮像画像(投影パターン像Pi)を元に三次元座標を得るパターン投影法を用いる。この三次元形状測定装置10は、パターン投影法に基づいて測定対象Oまでの距離を算出することにより当該測定対象O(その各点)の三次元座標を求める。三次元形状測定装置10は、図1に示すように、距離を算出するための基準とする基準線L上に設けた投影部11および撮像部12と、それらに接続する制御部13と、を備える。   The three-dimensional shape measurement apparatus 10 according to the first embodiment as the measurement apparatus according to the present invention projects a projection pattern P (see FIG. 4 and the like) onto the measurement object O, images the projection pattern P, and captures the captured image (projection). A pattern projection method for obtaining three-dimensional coordinates based on the pattern image Pi) is used. The three-dimensional shape measuring apparatus 10 obtains the three-dimensional coordinates of the measurement target O (its respective points) by calculating the distance to the measurement target O based on the pattern projection method. As shown in FIG. 1, the three-dimensional shape measuring apparatus 10 includes a projection unit 11 and an imaging unit 12 provided on a reference line L as a reference for calculating a distance, and a control unit 13 connected thereto. Prepare.

投影部11は、投影光軸Ap上で基準となる所定の投影パターンP(図4等参照)を投影する。この投影部11は、実施例1では、光源と、マスクが設けられた投影光学系と、を有する。投影部11は、光源から出射した光(光束)を、投影光学系およびそこに設けられたマスクを経て出射させることで、投影光軸Ap上に投影パターンPを投影する。その光源は、レーザ光源やLED光源を用いて構成することができ、実施例1では近赤外光を出射するものとする。投影光学系は、光源から出射した光(光束)を所定の形状に成形する光学部材であり、実施例1では光(光束)を所定の広がり角度で発散させる。マスクは、ガラス基板上に金属膜を蒸着して形成され、その金属膜の膜圧の変化により投影パターンPを形成すべく透過率が設定されたマスクパターンが設けられている。この投影パターンPの構成については後に述べる。このため、投影部11は、実施例1では、無彩色の投影パターンPを投影する。   The projection unit 11 projects a predetermined projection pattern P (see FIG. 4 and the like) serving as a reference on the projection optical axis Ap. In the first embodiment, the projection unit 11 includes a light source and a projection optical system provided with a mask. The projection unit 11 projects the projection pattern P onto the projection optical axis Ap by emitting the light (light beam) emitted from the light source through the projection optical system and the mask provided there. The light source can be configured using a laser light source or an LED light source. In the first embodiment, near-infrared light is emitted. The projection optical system is an optical member that shapes light (light beam) emitted from a light source into a predetermined shape. In the first embodiment, light (light beam) is diverged at a predetermined spread angle. The mask is formed by vapor-depositing a metal film on a glass substrate, and a mask pattern having a transmittance set to form a projection pattern P by changing the film pressure of the metal film is provided. The configuration of the projection pattern P will be described later. For this reason, the projection unit 11 projects the achromatic projection pattern P in the first embodiment.

投影部11は、投影光軸Ap上に位置する測定対象Oへ向けて、投影光学系の焦点距離に応じた広がり角度で徐々に拡散する光(光束)としての投影パターンP(図4等参照)を投影する。このため、投影部11は、所定の視野範囲に投影パターンPを投影することができる。なお、この投影部11は、投影光軸Ap上で所定の投影パターンPを投影するものであれば、例えばプロジェクタを用いるものであってもよく、他の構成であってもよく、実施例1の構成に限定されるものではない。   The projection unit 11 projects a projection pattern P as light (light flux) that gradually diffuses at a spread angle corresponding to the focal length of the projection optical system toward the measurement object O located on the projection optical axis Ap (see FIG. 4 and the like). ). For this reason, the projection part 11 can project the projection pattern P in the predetermined visual field range. As long as the projection unit 11 projects a predetermined projection pattern P on the projection optical axis Ap, for example, a projector may be used, or another configuration may be used. It is not limited to the configuration of

撮像部12は、投影パターンPが投影された測定対象Oを撮像する。この撮像部12は、実施例1では、撮像光学系と撮像素子とを有し、撮像光軸Asを中心として入射する光(光束)を撮像光学系で撮像素子(その受光面)上に結像させる。その撮像光学系は、実施例1では、投影部11の投影光学系と等しい焦点距離としている。このため、実施例1では、投影部11の視野範囲(投影パターンPを投影する光(光束)の広がり角)を、撮像部12の撮像範囲(画角)と等しいものとしている。撮像素子は、実施例1では、近赤外の波長帯域に感度を有するCCDイメージセンサを用いて構成され、各画素を水平方向および鉛直方向で長方形状に行列を為して設けられている。この撮像素子は、受光面上に結像された被写体像を電気信号(画像データ)に変換して、画像生成部に出力する。その画像生成部は、撮像部12に設けられ、撮像素子から出力された電気信号を、被写体像に対応したデジタル画像データに生成して出力する。なお、撮像部12では、撮像素子としてCMOSを用いて構成してもよく、他の構成であってもよく、実施例1の構成に限定されるものではない。   The imaging unit 12 images the measurement object O on which the projection pattern P is projected. In the first embodiment, the imaging unit 12 includes an imaging optical system and an imaging element, and couples incident light (light beam) about the imaging optical axis As on the imaging element (its light receiving surface) by the imaging optical system. Let me image. In the first embodiment, the imaging optical system has a focal length equal to that of the projection optical system of the projection unit 11. For this reason, in the first embodiment, the field of view range of the projection unit 11 (the spread angle of light (light flux) for projecting the projection pattern P) is set equal to the imaging range (view angle) of the imaging unit 12. In the first embodiment, the imaging element is configured using a CCD image sensor having sensitivity in the near-infrared wavelength band, and each pixel is provided in a matrix in a rectangular shape in the horizontal direction and the vertical direction. This image sensor converts a subject image formed on the light receiving surface into an electric signal (image data) and outputs the electric signal to the image generation unit. The image generation unit is provided in the imaging unit 12, and generates and outputs an electrical signal output from the imaging element as digital image data corresponding to the subject image. Note that the imaging unit 12 may be configured using a CMOS as an imaging device, or may be another configuration, and is not limited to the configuration of the first embodiment.

この撮像部12は、図2および図3に示すように、投影部11とともに基準線L上に設け、その投影部11とは所定の間隔d(図3参照)だけ離した位置関係とし、撮像光軸Asを投影部11の投影光軸Apとは異なる方向に向けている。なお、実施例1では、一例として、投影部11(その投影光軸Ap)と撮像部12(その撮像光軸As)とを等しい高さ位置として、すなわち基準線Lを水平方向に沿うものとして、所定の間隔dだけ離して設けている。また、実施例1では、一例として、投影部11の投影光軸Apを基準線Lに対して直交させるとともに、撮像部12の撮像光軸Asを基準線Lに対して傾斜させつつ投影光軸Apに交わる設定としている。この撮像部12は、撮像した撮像光軸As上の画像I(そのデジタル画像データ)(図7参照)を、制御部13に出力する。   As shown in FIGS. 2 and 3, the imaging unit 12 is provided on the reference line L together with the projection unit 11, and has a positional relationship separated from the projection unit 11 by a predetermined distance d (see FIG. 3). The optical axis As is directed in a direction different from the projection optical axis Ap of the projection unit 11. In the first embodiment, as an example, the projection unit 11 (its projection optical axis Ap) and the imaging unit 12 (its imaging optical axis As) are set to the same height position, that is, the reference line L is along the horizontal direction. , They are separated by a predetermined distance d. In the first embodiment, as an example, the projection optical axis Ap of the projection unit 11 is orthogonal to the reference line L, and the projection optical axis is inclined while the imaging optical axis As of the imaging unit 12 is inclined with respect to the reference line L. It is set to intersect with Ap. The imaging unit 12 outputs the captured image I on the imaging optical axis As (its digital image data) (see FIG. 7) to the control unit 13.

その制御部13は、図1に示すように、駆動制御部14と距離算出部15と記憶部16とを備え、その記憶部16に記憶されたプログラムに基づいて三次元形状測定装置10の動作を統括的に制御する。なお、この制御部13は、投影部11および撮像部12とは別体とされていてもよく、投影部11および撮像部12と一体とされていてもよく、投影部11または撮像部12に内蔵されていてもよい。駆動制御部14は、投影部11(その光源)を制御することで投影部11から投影パターンP(図4等参照)を投影させる。また、駆動制御部14は、撮像部12(その撮像素子および画像生成部)を制御することで撮像光軸As上を撮像させ、その撮像に基づく画像I(そのデジタル画像データ)(図7参照)を生成させる。   As shown in FIG. 1, the control unit 13 includes a drive control unit 14, a distance calculation unit 15, and a storage unit 16, and the operation of the three-dimensional shape measuring apparatus 10 based on a program stored in the storage unit 16. Overall control. The control unit 13 may be separate from the projection unit 11 and the imaging unit 12, or may be integrated with the projection unit 11 and the imaging unit 12. It may be built in. The drive control unit 14 projects the projection pattern P (see FIG. 4 and the like) from the projection unit 11 by controlling the projection unit 11 (its light source). Further, the drive control unit 14 controls the image pickup unit 12 (the image pickup element and the image generation unit) to pick up an image on the image pickup optical axis As, and an image I based on the image pickup (the digital image data) (see FIG. 7). ) Is generated.

距離算出部15は、図3に示すように、撮像部12からの撮像光軸As上の画像I(そのデジタル画像データ)(図7参照)に基づいて、三角測量の原理により画像Iに写し出された任意の点daまでの深度方向距離Zを算出する。その深度方向距離Zとは、三次元形状測定装置10から測定対象O(任意の点da)までの距離を示し、その深度方向Dzは、水平面に沿いつつ基準線Lと直交するものである。距離算出部15は、後述するように画像Iにおける投影パターン像Pi(図7参照)を投影パターンP(図6参照)に対応付けすることにより、投影部11(その基準点)から任意の点daへ向かう方向の投影光軸Apに対する投影角度を求める。その距離算出部15では、投影角度と、撮像部12の撮像光学系の焦点距離と、画像I上での撮像光軸Asと任意の点daとの間隔と、投影部11と撮像部12との所定の間隔dと、を用いて三角測量の原理により任意の点daの深度方向距離Zを算出する。そして、距離算出部15では、測定対象Oを写し出した画像Iにおける全ての測定点に対して深度方向距離Zを算出することにより、当該測定対象Oの三次元座標値を算出する。   As shown in FIG. 3, the distance calculating unit 15 projects the image I on the image I based on the principle of triangulation based on the image I (its digital image data) on the imaging optical axis As (see FIG. 7) from the imaging unit 12. The depth direction distance Z to the given point da is calculated. The depth direction distance Z indicates the distance from the three-dimensional shape measuring apparatus 10 to the measurement object O (arbitrary point da), and the depth direction Dz is orthogonal to the reference line L along the horizontal plane. As will be described later, the distance calculation unit 15 associates a projection pattern image Pi (see FIG. 7) in the image I with the projection pattern P (see FIG. 6), thereby allowing an arbitrary point from the projection unit 11 (its reference point). The projection angle with respect to the projection optical axis Ap in the direction toward da is obtained. In the distance calculation unit 15, the projection angle, the focal length of the imaging optical system of the imaging unit 12, the interval between the imaging optical axis As and an arbitrary point da on the image I, the projection unit 11, the imaging unit 12, and the like. The depth direction distance Z of an arbitrary point da is calculated based on the principle of triangulation using the predetermined interval d. Then, the distance calculation unit 15 calculates the three-dimensional coordinate value of the measurement target O by calculating the depth direction distance Z for all the measurement points in the image I in which the measurement target O is copied.

次に、本発明に係る測定装置としての実施例1の三次元形状測定装置10の投影部11が投影する本発明に係る投影パターンの一例としての投影パターンPについて説明する。この投影パターンPは、図4に示すように、第1方向D1に伸びる複数のストライプSを、第2方向D2に並列させて形成している。実施例1では、第1方向D1を水平方向と平行とし、第2方向D2を鉛直方向と平行としており、第1方向D1と第2方向D2とを直交させている。このため、実施例1では、投影パターンPにおける第1方向D1および第2方向D2を、撮像部12の撮像素子における画素が並ぶ方向と等しいものとしている。各ストライプSは、第1方向D1で見て互いに等しい長さ寸法とし、第2方向D2で見て互いに等しい幅寸法としている。この各ストライプSの幅寸法は、測定対象Oの三次元座標値を算出する際に求められる分解能(解像度)に対応させる十分に細いものとする。投影パターンPでは、m値レベルの輝度値によりコード化、すなわち輝度値を(m−1)段階に変化させることによりコード化したm種類のストライプSを用いている。その各ストライプSにおけるレベル数すなわち用いる種類の数(m)は、各ストライプSの適切な判別を可能とする観点から輝度値の差異を十分に確保することができるように設定する。実施例1の投影パターンPでは、mを3以上の自然数として、第2方向D2で隣接する2本のストライプSを異なる種類としつつm種類のストライプSを適宜組み合わせてm×(m−1)本のストライプSから為る1つの周期性領域Arを形成する。そして、投影パターンPでは、その周期性領域Arを複数個(図4の例では3個)繰り返し配している。その各周期性領域Arは、次のように形成する。   Next, a projection pattern P as an example of the projection pattern according to the present invention projected by the projection unit 11 of the three-dimensional shape measurement apparatus 10 according to the first embodiment as the measurement apparatus according to the present invention will be described. As shown in FIG. 4, the projection pattern P is formed by arranging a plurality of stripes S extending in the first direction D1 in parallel in the second direction D2. In the first embodiment, the first direction D1 is parallel to the horizontal direction, the second direction D2 is parallel to the vertical direction, and the first direction D1 and the second direction D2 are orthogonal to each other. For this reason, in the first embodiment, the first direction D1 and the second direction D2 in the projection pattern P are set to be equal to the direction in which the pixels in the image pickup element of the image pickup unit 12 are arranged. The stripes S have the same length as viewed in the first direction D1, and the same width as viewed in the second direction D2. The width dimension of each stripe S is sufficiently narrow to correspond to the resolution (resolution) required when calculating the three-dimensional coordinate value of the measurement object O. In the projection pattern P, m types of stripes S are used which are coded by luminance values at m level, that is, coded by changing the luminance values in (m−1) stages. The number of levels in each stripe S, that is, the number (m) of types to be used is set so that a sufficient difference in luminance value can be secured from the viewpoint of enabling appropriate discrimination of each stripe S. In the projection pattern P of Example 1, m × (m−1) by appropriately combining m types of stripes S, with m being a natural number of 3 or more, and two stripes S adjacent in the second direction D2 being different types. One periodic region Ar formed by the stripes S is formed. In the projection pattern P, a plurality (three in the example of FIG. 4) of the periodic areas Ar are repeatedly arranged. Each periodic region Ar is formed as follows.

先ず、投影パターンP(各周期性領域Ar)では、第2方向D2で見て隣接する2本のストライプSのコードを1組として扱い、それぞれの組み合わせを互いに異なるものとすることで、第2方向D2で見た位置の特定を可能とする。このとき、第2方向D2で見てn列目のストライプSとn+1列目のストライプSとのコードを1組とし、n+1列目のストライプSとn+2列目のストライプSとのコードを次の1組とする。すなわち、各ストライプSは、隣接する2つのストライプSの組において、第2方向D2で見た前側と後側とに1回ずつ位置することで、2種類の組み合せの態様C(図5参照)を構成するものとする。ここで、m種類のストライプSで形成することのできる組み合わせの態様Cは、m種類のストライプSから2つを用いた順列で表すことができるので、最大で(mm-1)種類を形成することができる。これらのことから、各周期性領域Arでは、m種類のストライプSをそれぞれ(m−1)本ずつ用いることで、最も多くの組み合わせパターンを形成することができ、全部でm×(m−1)本のストライプSを用いている。また、実施例1では、各周期性領域Ar(投影パターンP)において、第2方向D2で隣接する3本のストライプSにおいて、中央に位置するストライプSの輝度値を極値すなわち極大値または極小値とするように、各ストライプSを配列する。 First, in the projection pattern P (each periodic region Ar), the codes of two stripes S adjacent in the second direction D2 are treated as one set, and the respective combinations are different from each other. The position viewed in the direction D2 can be specified. At this time, the code of the stripe S of the nth column and the stripe S of the (n + 1) th column when viewed in the second direction D2 is taken as one set, and the stripe S of the (n + 1) th column and the stripe S of the (n + 2) th column. And the following set of codes. That is, each stripe S is positioned once in the front and rear sides as viewed in the second direction D2 in the set of two adjacent stripes S, so that two types of combinations C (see FIG. 5) It shall constitute. Here, since the combination mode C that can be formed by m kinds of stripes S can be represented by a permutation using two of the m kinds of stripes S, a maximum of ( mP m-1 ) kinds can be selected. Can be formed. From these facts, in each periodic region Ar, by using (m−1) m kinds of stripes S, the largest number of combination patterns can be formed, and mx (m−1) in total. ) The stripe S of the book is used. In the first embodiment, in each periodic area Ar (projection pattern P), the brightness value of the stripe S located at the center in the three stripes S adjacent in the second direction D2 is an extreme value, that is, a maximum value or a minimum value. Each stripe S is arranged so as to have a value.

この周期性領域Arの一例を図5に示す。その図5の例では、5値レベルの輝度値(m=5)によりコード化して5種類のストライプSを用いるものとし、輝度値別に1、2、3、4、5のコードを割り振っている。ここで、5種類のストライプSから2つを用いた順列は、最大で20種類(55-1)の組み合わせの態様Cを形成することができる。そして、上述したように、1本のストライプSがコードの組み合わせにおける2つの態様Cに用いられるので、各周期性領域Arでは、5種類のストライプSを各々4本ずつ用いることで合計20本のストライプSを用いている。この図5に示す例では、第2方向D2で見て最も左側に位置するコードの組み合わせの態様Cが、1列目のストライプSと2列目のストライプSとからなる「12」となる。また、第2方向D2で見て左から2番目に位置するコードの組み合わせの態様Cが、2列目のストライプSと3列目のストライプSとからなる「21」となる。そして、図5に示す例では、第2方向D2で見て最後に位置するコードの組み合わせの態様Cが、20列目のストライプSと1列目のストライプSとからなる「51」となる。これは、上記した周期性領域Arを複数個繰り返し配することによる。そして、各周期性領域Arでは、第2方向D2で隣接する3本のストライプSで見ると、中央に位置するストライプSの輝度値を極値としている。 An example of the periodic region Ar is shown in FIG. In the example of FIG. 5, it is assumed that five types of stripes S are used by encoding with luminance values (m = 5) at five levels, and codes 1, 2, 3, 4, and 5 are assigned to each luminance value. . Here, the permutation using two of the five types of stripes S can form a maximum of 20 types ( 5 P 5-1 ) of combinations C. As described above, since one stripe S is used for two modes C in the combination of codes, in each periodic region Ar, a total of 20 stripes can be obtained by using four each of five types of stripes S. A stripe S is used. In the example shown in FIG. 5, the code combination mode C located on the leftmost side in the second direction D2 is “12” including the stripe S in the first column and the stripe S in the second column. Further, the combination C of the code combination located second from the left when viewed in the second direction D2 is “21” including the stripe S in the second column and the stripe S in the third column. In the example illustrated in FIG. 5, the code combination mode C that is positioned last in the second direction D <b> 2 is “51” including the stripe S in the 20th column and the stripe S in the first column. This is because a plurality of the periodic regions Ar are repeatedly arranged. And in each periodic area | region Ar, when it sees by the three stripes S adjacent in the 2nd direction D2, the luminance value of the stripe S located in the center is made into the extreme value.

このように形成した周期性領域Arを複数個繰り返し配することにより、投影パターンP(図4参照)を形成する。その図4に示す例では、図5と同様に5値レベルの輝度値(m=5)によりコード化して5種類のストライプSを用いるものとし、輝度値別に1、2、3、4、5のコードを割り振っている。そして、20(5×(5−1))本のストライプSから為る周期性領域Arを3個繰り返して配することにより、投影パターンPを形成している。   A projection pattern P (see FIG. 4) is formed by repeatedly arranging a plurality of the periodic regions Ar thus formed. In the example shown in FIG. 4, it is assumed that five types of stripes S are used by encoding with luminance values (m = 5) of five levels as in FIG. 5, and 1, 2, 3, 4, 5 are used for each luminance value. Is allocated. The projection pattern P is formed by repeatedly arranging three periodic regions Ar formed by 20 (5 × (5-1)) stripes S.

そして、投影パターンPでは、第1方向D1で見て異なるレベルの輝度値とする境界線Bを設けている。このため、投影パターンPでは、n列目において、境界線Bの第1方向D1で見た一方側(図4の例では正面視して上側)と、境界線Bの第1方向D1で見た他方側(図4の例では正面視して下側)と、で異なる輝度値のストライプSが存在している。その境界線Bは、投影パターンPにおいて、第1方向D1および第2方向D2に対して傾斜を為して設ける。図4に示す例の投影パターンPでは、左上の角部から右下の角部を架け渡す対角線上に境界線Bを設けている。このため、投影パターンPでは、3個繰り返し配した各周期性領域Arにおいて、互いに等しい順序で5種類のストライプSが配され、周期性領域Ar毎に第1方向D1および第2方向D2で見た境界線Bの位置が異なっている。境界線Bは、実施例1では、対角線の上側(第1方向D1一方側)でn列目に位置するストライプSが、対角線の下側(第1方向D1他方側)ではn−1列目に位置するように、各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。   And in the projection pattern P, the boundary line B which makes a luminance value of a different level seeing in the 1st direction D1 is provided. Therefore, in the projection pattern P, in the n-th column, the one side viewed in the first direction D1 of the boundary line B (upward when viewed from the front in the example of FIG. 4) and the first direction D1 of the boundary line B are viewed. There are stripes S having different luminance values on the other side (lower side in front view in the example of FIG. 4). The boundary line B is provided in the projection pattern P so as to be inclined with respect to the first direction D1 and the second direction D2. In the projection pattern P of the example shown in FIG. 4, the boundary line B is provided on the diagonal line that bridges the lower left corner from the upper left corner. Therefore, in the projection pattern P, five types of stripes S are arranged in the same order in each of the three periodic regions Ar repeatedly arranged, and the periodic patterns Ar are viewed in the first direction D1 and the second direction D2. The position of the boundary line B is different. In the first embodiment, the boundary line B corresponds to the stripe S located in the nth column on the upper side of the diagonal line (on the one side in the first direction D1), and the n-1th column on the lower side of the diagonal line (on the other side in the first direction D1). The positions of the stripes S are formed so as to be shifted in the second direction D2 by one column so as to be located in the second direction D2.

次に、距離算出部15による画像I上の投影パターン像Piと投影パターンPとの対応付けについて、図2および図3に加えて、図6および図7を用いて説明する。この図2、図3、図6、図7に示す例では、理解を容易なものとするために、投影パターンPとして図6に示す投影パターンPAを用いるものとする。その投影パターンPAでは、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いるものとし、輝度値別に1、2、3のコードを割り振っている。そして、投影パターンPAは、6(3×(3−1))本のストライプSから為る周期性領域Arを3個繰り返し配して形成している。また、図2、図3、図6、図7に示す例では、スクリーンOsおよびその前方に置かれた突起物Opを測定対象Oとしている。そのスクリーンOsは、図3に示すように、基準線Lに対して平行な平面を規定する板状を呈し、突起物Opは、手前側(三次元形状測定装置10側)が基準線Lに対して平行な平面とされた直方体形状を呈する。   Next, the association between the projection pattern image Pi on the image I and the projection pattern P by the distance calculation unit 15 will be described with reference to FIGS. 6 and 7 in addition to FIGS. In the examples shown in FIGS. 2, 3, 6, and 7, the projection pattern PA shown in FIG. 6 is used as the projection pattern P in order to facilitate understanding. In the projection pattern PA, three types of stripes S are used by encoding with three-level luminance values (m = 3), and codes 1, 2, and 3 are assigned to the luminance values. The projection pattern PA is formed by repeatedly arranging three periodic regions Ar formed by 6 (3 × (3-1)) stripes S. In the examples shown in FIGS. 2, 3, 6, and 7, the measurement object O is the screen Os and the protrusion Op placed in front of the screen Os. As shown in FIG. 3, the screen Os has a plate shape that defines a plane parallel to the reference line L, and the projection Op has the front side (three-dimensional shape measuring apparatus 10 side) at the reference line L. It exhibits a rectangular parallelepiped shape that is a parallel plane.

三次元形状測定装置10では、図2および図3に示すように、測定対象Oの三次元座標値(三次元形状)を測定すべく、投影部11が投影光軸Ap上に位置する測定対象Oとしての突起物OpおよびスクリーンOsに投影パターンPAを投影する。その投影パターンPAは、投影された測定対象Oの外形形状に沿って、図2に示す例では、突起物OpおよびスクリーンOsの外形形状に沿って変形する。そして、三次元形状測定装置10では、撮像部12が撮像光軸As上の撮像範囲を撮像することで、投影パターンPが投影された突起物OpおよびスクリーンOs(測定対象O)を撮像し、その画像I(そのデジタル画像データ)を取得する。その取得した画像Iを図7に示す。   In the three-dimensional shape measuring apparatus 10, as shown in FIGS. 2 and 3, the measuring object in which the projection unit 11 is positioned on the projection optical axis Ap in order to measure the three-dimensional coordinate value (three-dimensional shape) of the measuring object O. The projection pattern PA is projected onto the projection Op as O and the screen Os. The projected pattern PA is deformed along the projected outer shape of the measuring object O, and in the example shown in FIG. 2, along the projected shapes Op and the screen Os. And in the three-dimensional shape measuring apparatus 10, the imaging part 12 images the projection range Op on which the projection pattern P was projected, and the screen Os (measurement object O) by imaging the imaging range on the imaging optical axis As, The image I (the digital image data) is acquired. The acquired image I is shown in FIG.

その画像Iでは、突起物OpおよびスクリーンOsに投影された投影パターンPAの投影パターン像Piが写し出されている。画像Iでは、高さ位置y2から高さ位置y3の間であって水平位置x1から水平位置x3の間に、突起物Opの手前側の平面に投影された投影パターン像Piが写し出されている。また、画像Iでは、高さ位置y2から高さ位置y3の間であって水平位置x3から水平位置x4の間に、投影パターン像Piが投影されていない突起物Opの側面が写し出されている。そして、画像Iでは、高さ位置y2から高さ位置y3の間であって水平位置x4から水平位置x5の間が、スクリーンOs上において手前に位置する突起物Opにより投影パターンPAが投影されていない箇所とされている。画像Iでは、高さ位置y1から高さ位置y3の間であって水平位置x2から水平位置x6の間において、上記した突起物Opに関連する箇所以外に、スクリーンOsに投影された投影パターン像Piが写し出されている。   In the image I, the projection pattern image Pi of the projection pattern PA projected on the projection Op and the screen Os is shown. In the image I, the projection pattern image Pi projected on the plane on the near side of the projection Op is projected between the height position y2 and the height position y3 and between the horizontal position x1 and the horizontal position x3. . In the image I, the side surface of the projection Op on which the projection pattern image Pi is not projected is projected between the height position y2 and the height position y3 and between the horizontal position x3 and the horizontal position x4. . In the image I, the projection pattern PA is projected by the projection Op positioned on the screen Os between the height position y2 and the height position y3 and between the horizontal position x4 and the horizontal position x5. There are no places. In the image I, between the height position y1 and the height position y3 and between the horizontal position x2 and the horizontal position x6, a projection pattern image projected on the screen Os other than the portion related to the above-described protrusion Op. Pi is projected.

ここで、突起物OpとスクリーンOsとが深度方向Dzで異なる位置とされているが(図3参照)、画像Iに写し出された投影パターン像Piの第1方向D1での位置および大きさは変化しない。これは、投影部11の視野範囲(投影パターンPを投影する光(光束)の広がり角)と、撮像部12の撮像範囲(画角)と、を等しいものとしていることによる。すなわち、投影パターンPAは、深度方向Dzの手前側となるほど小さく投影されるが(図2参照)、投影パターン像Piは、深度方向Dzの手前側となるほど画像Iに大きく写し出される。そして、その変化分は、投影部11の視野範囲と、撮像部12の撮像範囲と、が等しいことで互いに相殺される。このため、画像Iの投影パターン像Piは、深度方向Dzにおける投影された位置に拘わらず、画像Iにおける第1方向D1での位置および大きさは変化しない。これにより、投影パターン像Piでは、深度方向Dzでの投影された位置に拘わらず、第1方向D1での位置(各画素の位置)を、投影部11から投影される投影パターンPAにおける鉛直方向での位置(高さ位置)に対応させることができる。なお、投影部11の視野範囲と撮像部12の撮像範囲(焦点距離)とを異なるものとした場合であっても、撮像部12が画像Iを生成する際に撮像範囲の投影部11の視野範囲との差異を打ち消すように計算処理を行うことで同様の効果を得ることができる。   Here, although the projection Op and the screen Os are in different positions in the depth direction Dz (see FIG. 3), the position and size in the first direction D1 of the projection pattern image Pi projected on the image I are It does not change. This is because the field-of-view range of the projection unit 11 (the spread angle of light (light flux) projecting the projection pattern P) and the imaging range (view angle) of the imaging unit 12 are equal. That is, the projection pattern PA is projected smaller as it becomes closer to the depth direction Dz (see FIG. 2), but the projection pattern image Pi is projected larger on the image I as it is closer to the depth direction Dz. Then, the amount of change is canceled out because the visual field range of the projection unit 11 and the imaging range of the imaging unit 12 are equal. Therefore, the position and size of the projected pattern image Pi of the image I in the first direction D1 in the image I do not change regardless of the projected position in the depth direction Dz. Thereby, in the projection pattern image Pi, the position in the first direction D1 (the position of each pixel) is the vertical direction in the projection pattern PA projected from the projection unit 11 regardless of the position projected in the depth direction Dz. It is possible to correspond to the position (height position) at. Even when the field of view range of the projection unit 11 and the imaging range (focal length) of the imaging unit 12 are different, the field of view of the projection unit 11 in the imaging range is generated when the imaging unit 12 generates the image I. A similar effect can be obtained by performing calculation processing so as to cancel the difference from the range.

また、投影パターン像Piでは、深度方向Dzにおける投影された位置(その変化)に応じて、画像I上での第2方向D2での位置が変化する。これは、撮像部12を、基準線L上において投影部11と所定の間隔dだけ離して設けていることによる。この例では、投影部11に対して撮像部12を右側に変位させていることから(図2および図3参照)、画像Iにおいて、スクリーンOsの手前に位置する突起物Op上の投影パターン像PiがスクリーンOs上の投影パターン像Piに対して左側に変位する。そこで、投影パターン像Piの各ストライプ像Siと投影パターンPAの各ストライプSとを用いて、当該投影パターン像Piにおける第2方向D2での位置を、投影パターンPAにおける第2方向D2での位置に対応させる。   Further, in the projection pattern image Pi, the position in the second direction D2 on the image I changes according to the projected position (change) in the depth direction Dz. This is because the imaging unit 12 is provided on the reference line L at a predetermined distance d from the projection unit 11. In this example, since the imaging unit 12 is displaced to the right side with respect to the projection unit 11 (see FIGS. 2 and 3), in the image I, the projection pattern image on the projection Op positioned in front of the screen Os. Pi is displaced to the left with respect to the projection pattern image Pi on the screen Os. Therefore, using each stripe image Si of the projection pattern image Pi and each stripe S of the projection pattern PA, the position in the second direction D2 in the projection pattern image Pi is changed to the position in the second direction D2 in the projection pattern PA. To correspond to.

投影パターン像Piでは、第2方向D2で隣接する2本のストライプ像Siのコードを判別し、投影パターンPAにおいて等しいコードを探し出すことで各周期性領域Arにおける第2方向D2(水平方向)での位置(水平位置)に対応させることができる。これは、投影パターンPAの各周期性領域Arでは、隣接する2本のストライプSのコードの組み合わせの態様Cをすべて異なるものとしていることによる。そして、投影パターン像Piでは、1本のストライプ像Siを2つの態様Cに用いるものとしているので、ストライプ像Si毎に投影パターンPAのストライプSに対応させることができる。なお、実施例1では、投影パターン像Piの隣接する2本のストライプ像Siのコードを判別して投影パターンPAの水平位置に対応させる際、両ストライプ像Siの境目(後述する図7の画素p1等参照)を第2方向D2での位置として扱うこととする。なお、この第2方向D2での位置は、第2方向D2で見て判断したコードの組み合わせを形成する2本のストライプ像Si上であれば、いずれか一方のストライプ像Siの内部もしくは端部であってもよく、他の位置であってもよく、実施例1に限定されるものではない。   In the projection pattern image Pi, the codes of the two stripe images Si adjacent in the second direction D2 are discriminated, and by searching for the same code in the projection pattern PA, in the second direction D2 (horizontal direction) in each periodic area Ar. It is possible to correspond to the position (horizontal position). This is because, in each periodic area Ar of the projection pattern PA, all the combinations C of the codes of the two adjacent stripes S are different. In the projection pattern image Pi, since one stripe image Si is used for the two modes C, each stripe image Si can correspond to the stripe S of the projection pattern PA. In Example 1, when the codes of the two adjacent stripe images Si of the projection pattern image Pi are discriminated to correspond to the horizontal position of the projection pattern PA, the boundary between the two stripe images Si (a pixel in FIG. 7 described later). p1) is treated as the position in the second direction D2. If the position in the second direction D2 is on two stripe images Si that form a combination of codes determined in the second direction D2, the inside or the end of one of the stripe images Si It may be any other position, and is not limited to the first embodiment.

しかしながら、投影パターンPAでは、複数の周期性領域Ar(この例では3個)が設けられていることから、隣接する2本のストライプSのコードの組み合わせの態様Cではいずれの周期性領域Arに属するものであるのかを判別することができない。このため、本発明では、第1方向D1で見て異なるレベルの輝度値となる境界線Bを投影パターンPA(投影パターンP)に設けている(図4、図6参照)。ここで、投影パターン像Piでは、上述したように、深度方向Dzにおける投影された位置の変化に応じて、第2方向D2で見た位置が変化するが、第1方向D1で見た位置は変化しない。このため、投影パターン像Piでは、深度方向Dzにおける投影された位置に拘わらず、第1方向D1で見た両端部(上端部Etまたは下端部Eb)から任意の位置までの間隔hを一定のものとすることができる。また、投影パターンPAでは、周期性領域Ar毎に第1方向D1および第2方向D2で見た境界線Bの位置を異なるものとしている。このことから、投影パターンPAでは、各ストライプSにおける任意の位置から、境界線Bまでの間隔kを一対一対応とすることができる。この具体的な例を、図7に示す注目点dsを用いて説明する。   However, since the projection pattern PA is provided with a plurality of periodic regions Ar (three in this example), in the mode C of the combination of codes of two adjacent stripes S, any periodic region Ar It cannot be determined whether it belongs. For this reason, in the present invention, a boundary line B having a luminance value of a different level when viewed in the first direction D1 is provided in the projection pattern PA (projection pattern P) (see FIGS. 4 and 6). Here, in the projection pattern image Pi, as described above, the position viewed in the second direction D2 changes according to the change in the projected position in the depth direction Dz, but the position viewed in the first direction D1 is It does not change. For this reason, in the projection pattern image Pi, regardless of the projected position in the depth direction Dz, the distance h from the both ends (upper end Et or lower end Eb) viewed in the first direction D1 to an arbitrary position is constant. Can be. In the projection pattern PA, the position of the boundary line B viewed in the first direction D1 and the second direction D2 is different for each periodic region Ar. From this, in the projection pattern PA, the interval k from an arbitrary position in each stripe S to the boundary line B can be made to correspond one-to-one. A specific example of this will be described using the attention point ds shown in FIG.

先ず、図7に示す画像I上の投影パターン像Piにおいて、注目点dsと第1方向D1で見た一方の端部(上端部Etまたは下端部Eb)との間隔h(間隔h1または間隔h2)を求めることにより、投影パターンPAにおける注目点dsの高さ位置Hを求める。そして、注目点dsを第2方向D2で挟む2本のストライプ像Siのコードを判別することにより、注目点dsが位置するコードの組み合わせの態様Cを求める。この図7に示す例では、注目点dsは、投影パターンPAにおける各ストライプSのコード(図6参照)に基づいてストライプ像Siのコードを判別することにより、コードの組み合わせの態様Cが「23」となる位置に存在していることが解る。この注目点dsは、投影パターン像Piにおける境界線Bまでの間隔kが、第1方向D1で見ると間隔k1とされ、第2方向D2で見ると間隔k2とされている。   First, in the projection pattern image Pi on the image I shown in FIG. 7, the interval h (the interval h1 or the interval h2) between the point of interest ds and one end portion (the upper end portion Et or the lower end portion Eb) viewed in the first direction D1. ) To obtain the height position H of the point of interest ds in the projection pattern PA. Then, the code C of the two stripe images Si sandwiching the point of interest ds in the second direction D2 is determined to obtain the mode C of the code combination where the point of interest ds is located. In the example shown in FIG. 7, the attention point ds is determined by determining the code of the stripe image Si based on the code of each stripe S (see FIG. 6) in the projection pattern PA, so that the code combination mode C is “23. It can be seen that it exists at a position where “ The attention point ds has an interval k to the boundary line B in the projection pattern image Pi as an interval k1 when viewed in the first direction D1, and an interval k2 when viewed in the second direction D2.

ここで、投影パターンPAでは、図6に示すように、高さ位置Hにおいてコードの組み合わせの態様Cが「23」となる位置が、対応候補点Sc1、Sc2の2箇所に存在する。その対応候補点Sc1では、境界線Bまでの間隔kが、第1方向D1で見ると間隔k3であり、第2方向D2で見ると間隔k4である。また、対応候補点Sc2では、境界線Bまでの間隔kが、第1方向D1で見ると間隔k5であり、第2方向D2で見ると間隔k6である。このため、注目点dsの境界線Bまでの間隔k(図7参照)と、各対応候補点Sc1、Sc2の境界線Bまでの間隔k(図6参照)と、のうちの等しい方向のものを比較することで、注目点dsが両対応候補点Sc1、Sc2のいずれに対応するかを判別することができる。この例では、間隔k1(図7参照)が間隔k3(図6参照)と等しいこと、または間隔k2(図7参照)が間隔k4(図6参照)と等しいことから、注目点ds(図7参照)が対応候補点Sc1に対応する対応点E(図6参照)であると判別することができる。これにより、撮像部12で撮像した画像I上の投影パターン像Piを、投影部11が投影する投影パターンPに対応付けることができる。   Here, in the projection pattern PA, as shown in FIG. 6, there are two positions, corresponding candidate points Sc1 and Sc2, where the code combination mode C is “23” at the height position H. In the corresponding candidate point Sc1, the interval k to the boundary line B is the interval k3 when viewed in the first direction D1, and the interval k4 when viewed in the second direction D2. In the corresponding candidate point Sc2, the interval k to the boundary line B is the interval k5 when viewed in the first direction D1, and the interval k6 when viewed in the second direction D2. Therefore, the distance k (see FIG. 7) to the boundary line B of the attention point ds and the distance k (see FIG. 6) to the boundary line B of each corresponding candidate point Sc1 and Sc2 are in the same direction. , It is possible to determine which of the two corresponding candidate points Sc1 and Sc2 the attention point ds corresponds to. In this example, the interval k1 (see FIG. 7) is equal to the interval k3 (see FIG. 6), or the interval k2 (see FIG. 7) is equal to the interval k4 (see FIG. 6). It is possible to determine that the reference point) is the corresponding point E (see FIG. 6) corresponding to the corresponding candidate point Sc1. Thereby, the projection pattern image Pi on the image I imaged by the imaging unit 12 can be associated with the projection pattern P projected by the projection unit 11.

このように、本発明では、注目点dsに対する投影パターンPでの対応点Eを適切に求めるために、注目点dsから境界線Bまでの間隔k(図7参照)を用いている。この図7に示す例では、投影パターン像Piにおいて、高さ位置y1から高さ位置y2の間では、いずれの画素を注目点dsとした場合であっても、第2方向D2に境界線B1が存在するので、第2方向D2で見た境界線Bまでの間隔k2を用いることができる。また、投影パターン像Piにおいて、水平位置x5から水平位置x6の間では、いずれの画素を注目点dsとした場合であっても、第1方向D1に境界線B2が存在するので、第1方向D1で見た境界線Bまでの間隔k1を用いることができる。さらに、高さ位置y2から高さ位置y3の間でかつ水平位置x1から水平位置x3の間では、いずれの画素を注目点dsとした場合であっても、第1方向D1(一部では第2方向D2にも)に境界線B3が存在するので、第1方向D1で見た境界線Bまでの間隔k1を用いることができる。このため、投影パターン像Piにおける全ての画素に対して深度方向距離Zを適切に算出することができる。   Thus, in the present invention, in order to appropriately obtain the corresponding point E in the projection pattern P with respect to the attention point ds, the interval k (see FIG. 7) from the attention point ds to the boundary line B is used. In the example shown in FIG. 7, in the projection pattern image Pi, between the height position y1 and the height position y2, the boundary line B1 in the second direction D2 regardless of which pixel is the attention point ds. Therefore, the distance k2 to the boundary line B viewed in the second direction D2 can be used. In the projection pattern image Pi, the boundary line B2 exists in the first direction D1 between the horizontal position x5 and the horizontal position x6, regardless of which pixel is the point of interest ds. An interval k1 to the boundary line B viewed at D1 can be used. Furthermore, between the height position y2 and the height position y3 and between the horizontal position x1 and the horizontal position x3, even if any pixel is set as the attention point ds, the first direction D1 (partly in the first direction D1). Since the boundary line B3 exists in the two directions D2), the distance k1 to the boundary line B viewed in the first direction D1 can be used. For this reason, it is possible to appropriately calculate the depth direction distance Z for all the pixels in the projection pattern image Pi.

換言すると、本発明では、少なくとも第1方向D1と第2方向D2とのいずれか一方に境界線Bが存在する箇所であれば、いずれの画素を注目点ds(図7参照)とした場合であっても、境界線Bまでの間隔k(図7参照)を用いて投影パターンPでの対応点E(図6参照)を適切に求めることができる。また、本発明では、投影パターン像Piにおける第1方向D1で見た端部(上端部Etまたは下端部Eb)と注目点dsとの間隔h(間隔h1または間隔h2)を求めることにより(図7参照)、注目点dsの投影パターンPにおける高さ位置H(図6参照)を求めている。このため、本発明では、画像I上に投影パターン像Piにおける第1方向D1で見た少なくとも一方の端部(上端部Etまたは下端部Eb)が映し出されていることが必要となる。   In other words, in the present invention, any pixel is set as the attention point ds (see FIG. 7) as long as the boundary line B exists in at least one of the first direction D1 and the second direction D2. Even if it exists, the corresponding point E (refer FIG. 6) in the projection pattern P can be calculated | required appropriately using the space | interval k (refer FIG. 7) to the boundary line B. FIG. In the present invention, the distance h (the distance h1 or the distance h2) between the end portion (upper end portion Et or lower end portion Eb) viewed in the first direction D1 and the point of interest ds in the projection pattern image Pi is obtained (see FIG. 7), the height position H (see FIG. 6) of the target point ds in the projection pattern P is obtained. Therefore, in the present invention, it is necessary that at least one end portion (upper end portion Et or lower end portion Eb) of the projection pattern image Pi viewed in the first direction D1 is projected on the image I.

なお、図2および図3に示す例では、スクリーンOsと突起物Opの手前側の面とを基準線Lに対して平行な平面を規定するものとしている。このため、図7に示す画像I上での投影パターン像Piの第2方向D2で見た幅寸法が均一なものとなっている。ところが、測定対象Oは、基準線Lと平行な平面とは限らず、基準線Lの傾斜度合や形状等に応じて、各ストライプSの幅寸法が変化する。このことは、例えば、基準線Lに対して傾斜する平面である場合には、その傾斜度合いと傾斜の向きとに応じて、各ストライプSの幅寸法が一様に収縮する。この場合、基準線Lと平行な平面上の各ストライプ像Siの幅寸法を基準として、画像I上での投影パターン像Piにおける第2方向D2で見た境界線Bまでの間隔kを適宜補正することにより、上記した対応付けを行うことができる。   In the example shown in FIGS. 2 and 3, the plane parallel to the reference line L is defined by the screen Os and the front surface of the projection Op. For this reason, the width dimension seen in the 2nd direction D2 of the projection pattern image Pi on the image I shown in FIG. 7 is uniform. However, the measurement object O is not necessarily a plane parallel to the reference line L, and the width dimension of each stripe S changes according to the inclination degree, shape, and the like of the reference line L. For example, in the case of a plane inclined with respect to the reference line L, the width dimension of each stripe S contracts uniformly according to the degree of inclination and the direction of inclination. In this case, with reference to the width dimension of each stripe image Si on the plane parallel to the reference line L, the interval k to the boundary line B viewed in the second direction D2 in the projection pattern image Pi on the image I is corrected as appropriate. By doing so, the above-described association can be performed.

次に、本発明に係る測定装置としての実施例1の三次元形状測定装置10の制御部13(図1参照)において実行される、測定対象Oの三次元形状を測定する三次元形状測定処理について、図8を用いて説明する。その図8は、実施例1における距離算出部15にて実行される三次元形状測定処理(三次元形状測定方法)を示すフローチャートである。この三次元形状測定処理(三次元形状測定方法)は、制御部13の記憶部16に記憶されたプログラムに基づいて、距離算出部15が実行する。以下では、この三次元形状測定処理(三次元形状測定方法)としての図8のフローチャートの各ステップ(各工程)について説明する。この図8のフローチャートは、測定対象Oの三次元形状を測定する要求が為されると開始される。   Next, a three-dimensional shape measurement process for measuring the three-dimensional shape of the measurement object O, which is executed in the control unit 13 (see FIG. 1) of the three-dimensional shape measurement apparatus 10 according to the first embodiment as the measurement apparatus according to the present invention. Will be described with reference to FIG. FIG. 8 is a flowchart showing a three-dimensional shape measurement process (three-dimensional shape measurement method) executed by the distance calculation unit 15 in the first embodiment. This three-dimensional shape measurement process (three-dimensional shape measurement method) is executed by the distance calculation unit 15 based on a program stored in the storage unit 16 of the control unit 13. Below, each step (each process) of the flowchart of FIG. 8 as this three-dimensional shape measurement process (three-dimensional shape measurement method) is demonstrated. The flowchart of FIG. 8 is started when a request for measuring the three-dimensional shape of the measuring object O is made.

ステップS1では、撮像部12により測定対象O上の投影パターン像Piの画像Iを取得して、ステップS2へ進む。このステップS1では、駆動制御部14が、投影部11(その光源)を制御して投影部11から投影パターンP(PA)を投影させ、撮像部12(その撮像素子および画像生成部)を制御して画像I(そのデジタル画像データ)を生成させる。これにより、ステップS1では、投影部11で測定対象Oに投影パターンPを投影し、その投影パターンPが投影された測定対象Oを撮像部12で撮像して、測定対象O上の投影パターン像Piの画像Iを取得する。   In step S1, the image I of the projection pattern image Pi on the measurement object O is acquired by the imaging unit 12, and the process proceeds to step S2. In step S1, the drive control unit 14 controls the projection unit 11 (its light source) to project the projection pattern P (PA) from the projection unit 11, and controls the imaging unit 12 (its imaging device and image generation unit). Thus, an image I (its digital image data) is generated. Thereby, in step S1, the projection unit 11 projects the projection pattern P onto the measurement target O, the measurement unit O on which the projection pattern P is projected is imaged by the imaging unit 12, and a projection pattern image on the measurement target O is obtained. An image I of Pi is acquired.

ステップS2では、ステップS1での測定対象O上の投影パターン像Piの画像Iを取得することに続き、画像Iにおける投影パターン像Piが写し出された領域をコード化して、ステップS3へ進む。このステップS2では、先ず、距離算出部15が、エッジ検出フィルタを用いて、写し出された投影パターン像Piにおけるエッジ(輝度値が大きく変化している箇所)を検出する。このエッジ検出フィルタとしては、Cannyフィルタや、Laplacianフィルタや、Sobelフィルタが等を用いることができる。これにより、投影パターン像Piにおける外郭線、その外郭線を含む各ストライプ像Siの境目および境界線B(それらを示す画素位置)を算出することができ、各ストライプ像Siの位置を求めることができる。その後、ステップS2では、距離算出部15が、求めた各ストライプ像Siにおける輝度値を算出する。この輝度値は、各ストライプ像Siにおける中心の輝度値を用いてもよく、全体の平均輝度値を用いてもよく、他の方法で求めた輝度値を用いても良い。この後、ステップS2では、距離算出部15が、求めた輝度値に基づいて各ストライプ像Siに輝度レベルを割り当てる。例えば、図6に示す例の投影パターンPAでは、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いていることから、各ストライプ像Siに輝度値に応じた1から3のいずれかの輝度レベルを割り当てる。これにより、画像Iにおける投影パターン像Piが写し出された領域をコード化することができる。   In step S2, following acquisition of the image I of the projection pattern image Pi on the measurement object O in step S1, the area in which the projection pattern image Pi in the image I is projected is encoded, and the process proceeds to step S3. In this step S2, first, the distance calculation unit 15 detects an edge (a portion where the luminance value greatly changes) in the projected projection pattern image Pi using an edge detection filter. As the edge detection filter, a Canny filter, a Laplacian filter, a Sobel filter, or the like can be used. As a result, the contour line in the projection pattern image Pi, the boundary of each stripe image Si including the contour line, and the boundary line B (pixel position indicating them) can be calculated, and the position of each stripe image Si can be obtained. it can. Thereafter, in step S2, the distance calculation unit 15 calculates a luminance value in each obtained stripe image Si. As the luminance value, the central luminance value in each stripe image Si may be used, the entire average luminance value may be used, or the luminance value obtained by another method may be used. Thereafter, in step S2, the distance calculation unit 15 assigns a luminance level to each stripe image Si based on the obtained luminance value. For example, the projection pattern PA in the example shown in FIG. 6 uses three kinds of stripes S encoded by three-level luminance values (m = 3), so that each stripe image Si corresponds to the luminance value. Any one of luminance levels 1 to 3 is assigned. Thereby, the area | region where the projection pattern image Pi in the image I was projected can be coded.

ステップS3では、ステップS2での投影パターン像Piが写し出された領域をコード化することに続き、行数p=1および列数q=1として、ステップS4へ進む。ここで、投影パターン像Piにおける第2方向D2に並ぶ画素の群を行として、最も上側の画素の並びを1行目としかつその下の画素の並びを2行目とするように、各画素を第1方向D1で見て上から順に加算して行数pを割り当てる。また、投影パターン像Piにおける第1方向D1に並ぶ各ストライプ像Siを列として、最も左側を1列目としかつその隣を2列目とするように、各ストライプ像Siを第2方向D2で見て左から順に加算して列数qを割り当てる。このステップS3では、距離算出部15が、ステップS1で取得した投影パターン像Piを用いて三次元形状の計測を開始するために、行数p=1および列数q=1とする。   In step S3, following the coding of the region where the projection pattern image Pi is copied in step S2, the number of rows p = 1 and the number of columns q = 1 are set, and the process proceeds to step S4. Here, each pixel is set so that the group of pixels arranged in the second direction D2 in the projection pattern image Pi is a row, the uppermost pixel row is the first row, and the lower pixel row is the second row. Are added in order from the top, and the number of rows p is assigned. Further, each stripe image Si in the second direction D2 is set so that each stripe image Si arranged in the first direction D1 in the projection pattern image Pi is a column, the leftmost side is the first column, and the next column is the second column. The number of columns q is assigned by adding in order from the left. In step S3, the distance calculation unit 15 sets the number of rows p = 1 and the number of columns q = 1 in order to start measuring the three-dimensional shape using the projection pattern image Pi acquired in step S1.

ステップS4では、ステップS3での行数p=1および列数q=1とすること、あるいは、ステップS11での列数qに1を加算して新たな列数qとすること、あるいは、ステップS12での行数pに1を加算して新たな行数pとすること、に続き、p行目におけるq列目を注目点dsとして、ステップS5へ進む。このステップS4では、距離算出部15が、p行目におけるq列目を、すなわち投影パターン像Piにおいて上端からp番目に位置しかつ左端からq列目に位置するストライプ像Siを示す画素を注目点(注目画素)dsとする。ここで、実施例1では、上述したように、コードを判別する2本のストライプSの境目を第2方向D2での位置として扱うことから、q列目とq+1列目とのストライプ像Siの境目に位置する画素を、q列目に位置するストライプ像Siを示す画素とする。   In step S4, the number of rows p = 1 and the number of columns q in step S3 are set, or the number of columns q in step S11 is incremented by 1 to obtain a new number of columns q. After adding 1 to the number of rows p in S12 to obtain a new number of rows p, the q-th column in the p-th row is set as the attention point ds, and the process proceeds to step S5. In step S4, the distance calculation unit 15 pays attention to the pixel indicating the stripe image Si in the q-th column in the p-th row, that is, the p-th position from the upper end and the q-th column from the left end in the projection pattern image Pi. Let it be a point (attention pixel) ds. Here, in the first embodiment, as described above, the boundary between the two stripes S for determining the code is handled as the position in the second direction D2, so that the stripe images Si of the q-th column and the q + 1-th column are displayed. Let the pixel located at the boundary be a pixel indicating the stripe image Si located in the q-th column.

ステップS5では、ステップS4でのp行目におけるq列目を注目点dsとすることに続き、注目点dsに対する各対応候補点Scを算出して、ステップS6へ進む。このステップS5では、距離算出部15が、投影パターン像Piにおいて、注目点dsの行数pから当該注目点dsの投影パターンPAにおける高さ位置Hを求める。これは、この三次元形状測定処理(三次元形状測定方法)では、投影パターン像Piにおける上端部Etを1行目としており、行数を規定する各画素の寸法(サイズ)が既知であることによる。その後、ステップS5では、距離算出部15が、投影パターン像Piにおいて、注目点dsを第2方向D2で挟む2本のストライプ像Siのコードを判別することにより、注目点dsが位置するコードの組み合わせの態様Cを求める。そして、ステップS5では、距離算出部15が、投影パターンP(PA)において、高さ位置Hでコードの組み合わせが態様Cとなる位置を求め、それぞれの位置を対応候補点Scとする。   In step S5, subsequent to setting the q-th column in the p-th row in step S4 as the attention point ds, each corresponding candidate point Sc for the attention point ds is calculated, and the process proceeds to step S6. In step S5, the distance calculation unit 15 obtains the height position H of the target point ds in the projection pattern PA from the number of rows p of the target point ds in the projection pattern image Pi. This is because, in this three-dimensional shape measurement process (three-dimensional shape measurement method), the upper end Et in the projection pattern image Pi is the first row, and the dimensions (sizes) of the pixels that define the number of rows are known. by. After that, in step S5, the distance calculation unit 15 determines the code of the two stripe images Si sandwiching the target point ds in the second direction D2 in the projection pattern image Pi, so that the code where the target point ds is located is determined. The combination mode C is obtained. In step S5, the distance calculation unit 15 obtains a position where the code combination is in the mode C at the height position H in the projection pattern P (PA), and sets each position as the corresponding candidate point Sc.

ステップS6では、ステップS5での各対応候補点Scの算出に続き、注目点dsから境界線Bまでの間隔kを求めて、ステップS7へ進む。このステップS6では、距離算出部15が、投影パターン像Piにおいて、注目点dsから境界線Bまでの第1方向D1で見た間隔k1または第2方向D2で見た間隔k2を求める。この間隔kは、それぞれの方向での画素数をカウントすることで求めることができる。   In step S6, following calculation of each corresponding candidate point Sc in step S5, an interval k from the attention point ds to the boundary line B is obtained, and the process proceeds to step S7. In step S6, the distance calculation unit 15 obtains an interval k1 viewed in the first direction D1 from the point of interest ds to the boundary line B or an interval k2 viewed in the second direction D2 in the projection pattern image Pi. This interval k can be obtained by counting the number of pixels in each direction.

ステップS7では、ステップS6での注目点dsから境界線Bまでの間隔kを求めることに続き、対応点Eを求めて、ステップS8へ進む。このステップS7では、距離算出部15が、投影パターン像Piにおける注目点dsから境界線Bまでの間隔kと、既知である投影パターンPにおける各対応候補点Scのから境界線Bまでの間隔kと、を比較する。その投影パターンPにおける間隔kとしては、各対応候補点Scから境界線Bまでの第1方向D1で見た間隔k1または第2方向D2で見た間隔k2を用いることができる。そして、投影パターン像Piの間隔k1(図7参照)を用いる場合には、投影パターンPの第1方向D1の間隔を用い、投影パターン像Piの間隔k2(図7参照)を用いる場合には、投影パターンPの第2方向D2の間隔を用いる。ステップS7では、距離算出部15が、間隔kと最も近似する間隔を有する対応候補点Scを、注目点dsに対応する対応点Eとする。   In step S7, following the determination of the distance k from the target point ds to the boundary line B in step S6, the corresponding point E is determined, and the process proceeds to step S8. In step S7, the distance calculation unit 15 determines the interval k from the point of interest ds to the boundary line B in the projection pattern image Pi and the interval k from each corresponding candidate point Sc to the boundary line B in the known projection pattern P. And compare. As the interval k in the projection pattern P, the interval k1 viewed in the first direction D1 from each corresponding candidate point Sc to the boundary line B or the interval k2 viewed in the second direction D2 can be used. When the interval k1 (see FIG. 7) of the projection pattern image Pi is used, the interval in the first direction D1 of the projection pattern P is used, and when the interval k2 (see FIG. 7) of the projection pattern image Pi is used. The interval in the second direction D2 of the projection pattern P is used. In step S7, the distance calculation unit 15 sets the corresponding candidate point Sc having the interval closest to the interval k as the corresponding point E corresponding to the attention point ds.

ステップS8では、ステップS7での対応点Eを求めることに続き、注目点dsまでの深度方向距離Zを算出して、ステップS9へ進む。このステップS8では、距離算出部15が、投影部11(その基準点)から対応点Eへ向かう方向の投影光軸Apに対する投影角度を求める。そして、ステップS8では、距離算出部15が、投影角度と、撮像部12の撮像光学系の焦点距離と、画像I上での撮像光軸Asから注目点dsまでの間隔と、投影部11と撮像部12との所定の間隔dと、を用いて三角測量の原理により注目点dsの深度方向距離Zを算出する。   In step S8, following the determination of the corresponding point E in step S7, the depth direction distance Z to the attention point ds is calculated, and the process proceeds to step S9. In step S8, the distance calculation unit 15 obtains a projection angle with respect to the projection optical axis Ap in a direction from the projection unit 11 (its reference point) toward the corresponding point E. In step S8, the distance calculation unit 15 determines the projection angle, the focal length of the imaging optical system of the imaging unit 12, the interval from the imaging optical axis As to the point of interest ds on the image I, the projection unit 11, The depth direction distance Z of the attention point ds is calculated by the principle of triangulation using a predetermined distance d from the imaging unit 12.

ステップS9では、ステップS8での深度方向距離Zを算出することに続き、注目点dsが投影パターン像Piにおける右端に位置するか否かを判断し、YESの場合はステップS10へ進み、NOの場合はステップS11へ進む。このステップS9では、距離算出部15が、深度方向距離Zを算出した注目点dsが投影パターン像Piの右端に位置するか否かを判断することにより、p行目におけるすべてのストライプ像Siを示す全ての画素に対して深度方向距離Zを算出したか否かを判断する。ステップS9では、p行目のすべてのストライプ像Siを示す全ての画素に対して算出した場合には、p+1行目における各ストライプ像Siを注目点dsとすべくステップS10に進む。また、ステップS9では、p行目のすべてのストライプ像Siを示す全ての画素に対して算出していない場合には、p行目における未算出のストライプ像Siを注目点dsとすべくステップS11に進む。   In step S9, following the calculation of the depth direction distance Z in step S8, it is determined whether or not the point of interest ds is located at the right end in the projection pattern image Pi. If YES, the process proceeds to step S10, and NO is determined. In this case, the process proceeds to step S11. In this step S9, the distance calculation unit 15 determines whether or not the attention point ds for which the depth direction distance Z has been calculated is located at the right end of the projection pattern image Pi, whereby all stripe images Si in the p-th row are determined. It is determined whether or not the depth direction distance Z has been calculated for all the pixels shown. In step S9, when calculation is performed for all pixels indicating all stripe images Si in the p-th row, the process proceeds to step S10 so that each stripe image Si in the p + 1-th row is set as the point of interest ds. Further, in step S9, when calculation is not performed for all pixels indicating all stripe images Si in the p-th row, step S11 is performed so that the uncalculated stripe image Si in the p-th row is set as the attention point ds. Proceed to

ステップS10では、ステップS9での注目点dsが投影パターン像Piにおける右端に位置するとの判断に続き、注目点dsが投影パターン像Piにおける下端に位置するか否かを判断し、YESの場合はこの三次元形状測定処理(三次元形状測定方法)を終了し、NOの場合はステップS12へ進む。このステップS10では、距離算出部15が、深度方向距離Zを算出した注目点dsが投影パターン像Piにおける下端に位置する(p行目が最下端である)か否かを判断する。これにより、ステップS10では、投影パターン像Piの各ストライプ像Siを示す全ての画素に対して深度方向距離Zを算出したか否かを判断する。これは、ステップS10に進んだ場面では、p行目におけるすべてのストライプ像Siに対して深度方向距離Zを算出した場合であるので、p行目が最下端の行数である場合には投影パターン像Piにおける全てのストライプ像Siを示す画素を注目点dsとしたことによる。ステップS10では、投影パターン像Piにおける全てのストライプ像Siを示す画素に対して深度方向距離Zを算出した場合には、この三次元形状測定処理(三次元形状測定方法)を終了する。また、ステップS10では、p行目が最下端ではなく投影パターン像Piにおける全てのストライプ像Siを示す画素に対して深度方向距離Zを算出していない場合には、p+1行目における各ストライプ像Siを注目点dsとすべくステップS12に進む。   In step S10, following the determination that the attention point ds in step S9 is located at the right end in the projection pattern image Pi, it is determined whether or not the attention point ds is located in the lower end in the projection pattern image Pi. This three-dimensional shape measurement process (three-dimensional shape measurement method) is terminated. If NO, the process proceeds to step S12. In this step S10, the distance calculation unit 15 determines whether or not the attention point ds for which the depth direction distance Z has been calculated is positioned at the lower end in the projection pattern image Pi (the p-th row is the lowest end). Thus, in step S10, it is determined whether or not the depth direction distance Z has been calculated for all the pixels indicating each stripe image Si of the projection pattern image Pi. This is the case where the depth direction distance Z is calculated for all the stripe images Si in the p-th row in the scene that has proceeded to step S10, so that projection is performed when the p-th row has the lowest number of rows. This is because pixels indicating all stripe images Si in the pattern image Pi are set as the attention point ds. In step S10, when the depth direction distance Z is calculated for the pixels indicating all stripe images Si in the projection pattern image Pi, the three-dimensional shape measurement process (three-dimensional shape measurement method) is terminated. Further, in step S10, when the depth direction distance Z is not calculated for the pixels indicating all stripe images Si in the projection pattern image Pi instead of the lowermost row in the pth row, each of the p + 1th row is calculated. The process proceeds to step S12 to set the stripe image Si as the point of interest ds.

ステップS11では、ステップS9での注目点dsが投影パターン像Piにおける右端に位置しないとの判断に続き、列数q(その現状の値)に1を加算して新たな列数qとして(q=q+1)、ステップS4へと戻る。このステップS11では、p行目において深度方向距離Zを算出していないストライプ像Siを示す全ての画素がある。このことから、ステップS11では、その残りのストライプ像Siに対して深度方向距離Zを算出すべく、距離算出部15が列数qを1つ増やしてステップS4からの流れを繰り返させる。   In step S11, following the determination that the target point ds in step S9 is not located at the right end in the projection pattern image Pi, 1 is added to the column number q (its current value) to obtain a new column number q (q = Q + 1), the process returns to step S4. In step S11, there are all pixels indicating the stripe image Si for which the depth direction distance Z is not calculated in the p-th row. Therefore, in step S11, the distance calculation unit 15 increases the number of columns q by one and repeats the flow from step S4 in order to calculate the depth direction distance Z for the remaining stripe image Si.

ステップS12では、ステップS10での注目点dsが投影パターン像Piにおける下端に位置しないとの判断に続き、行数p(その現状の値)に1を加算して新たな行数pとして(p=p+1)、ステップS4へと戻る。このステップS12では、p行目において深度方向距離Zを算出していないストライプ像Siを示す全ての画素がなく、かつp行目が投影パターン像Piにおける最下端ではない場面である。このことから、ステップS12では、次の行の各ストライプ像Siを示す全ての画素に対して深度方向距離Zを算出するために、距離算出部15が行数pを1つ増やすとともにステップS4からの流れを繰り返させる。   In step S12, following the determination that the target point ds in step S10 is not located at the lower end of the projection pattern image Pi, 1 is added to the number of rows p (its current value) to obtain a new number of rows p (p = P + 1), the process returns to step S4. This step S12 is a scene in which there is no pixel indicating the stripe image Si for which the depth direction distance Z is not calculated in the p-th row, and the p-th row is not the lowest end in the projection pattern image Pi. From this, in step S12, in order to calculate the depth direction distance Z for all the pixels indicating each stripe image Si in the next row, the distance calculation unit 15 increases the number of rows p by 1 and from step S4. Let the flow repeat.

なお、上記した三次元形状測定処理(三次元形状測定方法)では、画像Iにおける投影パターン像Piが写し出された領域をコード化(ステップS3)する際に、エッジ検出フィルタを用いてエッジを検出している。しかしながら、投影パターン像Piが写し出された領域をコード化すべく各ストライプ像Siの区別を可能とするものであれば、パターンマッチングを用いてもよく、他の方法を用いてもよく、実施例1の構成に限定されるものではない。そのパターンマッチングは、例えば、SSD(Sum−of Square Difference)や、NCC(Normalized Cross−Correlation)や、ZNCC(Zero−mean Normalized Cross−Correlation)等により計算することが挙げられる。   In the above-described three-dimensional shape measurement process (three-dimensional shape measurement method), an edge is detected by using an edge detection filter when coding the region where the projection pattern image Pi in the image I is projected (step S3). doing. However, pattern matching may be used or other methods may be used as long as the stripe images Si can be distinguished in order to encode the region where the projected pattern image Pi is projected. It is not limited to the configuration of The pattern matching may be calculated by, for example, SSD (Sum-of Square Difference), NCC (Normalized Cross-Correlation), ZNCC (Zero-means Normalized Cross-Correlation), or the like.

次に、三次元形状測定装置10により測定対象Oの三次元形状を測定する際の画像I上で注目点dsを変化させつつ三次元形状を測定する様子を、図7を用いて説明する。三次元形状測定装置10では、測定対象Oの三次元形状を測定する要求が為されると、図8のフローチャートにおいてステップS1→ステップS2へと進むことにより、測定対象O上の投影パターン像Piの画像Iを取得し、その投影パターン像Piをコード化する。そして、図8のフローチャートにおいてステップS3→ステップS4へと進むことにより、投影パターン像Piにおいて、1行目すなわち第1方向D1で見て最も上側に位置する画素の並びであって、1行目における1列目すなわち1行目における最も左側に位置するストライプ像Siを示す画素p1を注目点dsとする。そして、図8のフローチャートにおいてステップS5→ステップS6→ステップS7→ステップS8へと進むことにより、画素p1(注目点ds)の深度方向距離Zを算出する。   Next, how the three-dimensional shape is measured while changing the point of interest ds on the image I when the three-dimensional shape of the measuring object O is measured by the three-dimensional shape measuring apparatus 10 will be described with reference to FIG. In the three-dimensional shape measuring apparatus 10, when a request for measuring the three-dimensional shape of the measuring object O is made, the process proceeds from step S1 to step S2 in the flowchart of FIG. The image I is obtained and the projection pattern image Pi is encoded. Then, by proceeding from step S3 to step S4 in the flowchart of FIG. 8, in the projection pattern image Pi, the first row, that is, the arrangement of pixels located on the uppermost side in the first direction D1, the first row A pixel p1 indicating the leftmost stripe image Si in the first column, that is, the first row in FIG. Then, the process proceeds from step S5 to step S6 to step S7 to step S8 in the flowchart of FIG. 8, thereby calculating the depth direction distance Z of the pixel p1 (attention point ds).

その後、図8のフローチャートにおいてステップS9→ステップS11→ステップS4へと進むことにより、投影パターン像Piにおいて、1行目の画素の並びであって、2列目すなわち画素p1(そのストライプ像Si)の隣に位置する画素p2(そのストライプ像Si)を注目点dsとする。その後、図8のフローチャートにおいてステップS9→ステップS11→ステップS4→ステップS5→ステップS6→ステップS7→ステップS8へと進むこと繰り返すことにより、投影パターン像Piにおいて、1行目の画素の並びであって、その1行目における最も右端(水平位置x6)に位置するストライプ像Siを示す画素p3(注目点ds)の深度方向距離Zを算出する。これにより、投影パターン像Piにおいて高さ位置y1に位置する列の全ての画素(全てのストライプ像Siを示す画素)を測定点として深度方向距離Zを算出することができる。   Thereafter, by proceeding from step S9 to step S11 to step S4 in the flowchart of FIG. 8, in the projection pattern image Pi, the first row of pixels is arranged in the second column, that is, the pixel p1 (its stripe image Si). A pixel p2 (its stripe image Si) located next to is a point of interest ds. Thereafter, by repeating the process of step S9 → step S11 → step S4 → step S5 → step S6 → step S7 → step S8 in the flowchart of FIG. Then, the depth direction distance Z of the pixel p3 (attention point ds) indicating the stripe image Si located at the rightmost end (horizontal position x6) in the first row is calculated. Thereby, the depth direction distance Z can be calculated using all the pixels (pixels indicating all the stripe images Si) in the column located at the height position y1 in the projection pattern image Pi as measurement points.

その後、図8のフローチャートにおいてステップS9→ステップS10→ステップS12→ステップS4へと進むことにより、投影パターン像Piにおいて、2行目の画素の並びであって、1列目すなわち2行目における最も左側に位置するストライプ像Siを示す画素p4を注目点dsとする。その後は、上記したことを繰り返すことにより、投影パターン像Piにおいて、高さ位置y1から高さ位置y2に位置する全てのストライプ像Siに対する深度方向距離Zを算出することができる。   Thereafter, by proceeding from step S9 to step S10 to step S12 to step S4 in the flowchart of FIG. 8, in the projection pattern image Pi, the arrangement of the pixels in the second row is the highest in the first column, that is, the second row. A pixel p4 indicating the stripe image Si located on the left side is set as a point of interest ds. Thereafter, by repeating the above, it is possible to calculate the depth direction distance Z for all the stripe images Si located from the height position y1 to the height position y2 in the projection pattern image Pi.

その後、図8のフローチャートにおいてステップS9→ステップS10→ステップS12→ステップS4へと進むことにより、投影パターン像Piにおいて、高さ位置y2を示す行数の画素の並びであって、1列目すなわち最も左側に位置するストライプ像Siを示す画素p5を注目点dsとする。その後、上記したことを繰り返すことにより、高さ位置y2を示す行数において、水平位置x3に位置するストライプ像Siを示す画素p6の深度方向距離Zを算出し、次に水平位置x5の次に位置するストライプ像Siを示す画素p7の深度方向距離Zを算出する。その後、上記したことを繰り返すことにより、高さ位置y2を示す行数における最も右端(水平位置x6)に位置するストライプ像Siを示す画素p8(注目点ds)の深度方向距離Zを算出する。その後、上記したことを繰り返すことにより、高さ位置y3を示す行数における最も右端(水平位置x6)に位置するストライプ像Siを示す画素p9(注目点ds)の深度方向距離Zを算出する。これにより、投影パターン像Piにおける各ストライプ像Siを示す全ての画素を測定点として深度方向距離Zを算出することができる。   Thereafter, by proceeding from step S9 to step S10 to step S12 to step S4 in the flowchart of FIG. 8, in the projection pattern image Pi, an array of pixels having the number of rows indicating the height position y2, the first column, A pixel p5 indicating the leftmost stripe image Si is set as a point of interest ds. Thereafter, by repeating the above, in the number of rows indicating the height position y2, the depth direction distance Z of the pixel p6 indicating the stripe image Si positioned at the horizontal position x3 is calculated, and next to the horizontal position x5. The depth direction distance Z of the pixel p7 indicating the positioned stripe image Si is calculated. Thereafter, by repeating the above, the depth direction distance Z of the pixel p8 (point of interest ds) indicating the stripe image Si located at the rightmost end (horizontal position x6) in the number of rows indicating the height position y2 is calculated. Thereafter, by repeating the above, the depth direction distance Z of the pixel p9 (attention point ds) indicating the stripe image Si positioned at the rightmost end (horizontal position x6) in the number of rows indicating the height position y3 is calculated. As a result, the depth direction distance Z can be calculated using all the pixels indicating each stripe image Si in the projection pattern image Pi as measurement points.

次に、このような測定対象Oの三次元形状を測定する三次元形状測定装置(測定装置)の技術の課題について、説明する。なお、この技術の課題は、実施例1の三次元形状測定装置10であっても、投影パターンPに境界線Bを設けていなければ同様であることから、実施例1の三次元形状測定装置10と同様の符号を用いて説明する。   Next, the technical problem of the three-dimensional shape measuring device (measuring device) that measures the three-dimensional shape of the measuring object O will be described. Note that the problem of this technique is the same as that of the three-dimensional shape measuring apparatus 10 of the first embodiment unless the boundary line B is provided in the projection pattern P. Therefore, the three-dimensional shape measuring apparatus of the first embodiment is the same. Description will be made using the same reference numerals as in FIG.

三次元形状測定装置10では、投影パターン像Piにおける各ストライプ像Siを示す画素毎に第2方向D2での測定点を設定することで、投影パターン像Piにおける各ストライプ像Siを示す全ての画素の三次元形状を測定する。このため、三次元形状測定装置10では、投影した投影パターンPにおける第2方向D2で見て、この投影パターンPの寸法(サイズ)よりも大きな寸法(サイズ)の測定対象Oの三次元形状を測定することができない。このことは、例えば、手の形状を測定するためには、一般的な手の大きさが約20cmであることから、第2方向D2に約20cm長さの投影パターンPを投影する必要があることとなる。ここで、三次元形状測定装置10では、投影パターンPの寸法(サイズ)を大きくすべく各ストライプSの種類を増やすと、ストライプS毎の差異が小さくなって各ストライプSの判別を適切に行うことが困難となる。また、三次元形状測定装置10では、各ストライプ像Siを示す画素毎に第2方向D2での測定点を設定するため、各ストライプSの幅寸法を大きくすると、測定結果における第2方向D2での分解能(解像度)の低下を招いてしまう。   In the three-dimensional shape measuring apparatus 10, by setting a measurement point in the second direction D2 for each pixel indicating each stripe image Si in the projection pattern image Pi, all the pixels indicating each stripe image Si in the projection pattern image Pi. Measure the three-dimensional shape. For this reason, in the three-dimensional shape measuring apparatus 10, the three-dimensional shape of the measuring object O having a size (size) larger than the size (size) of the projected pattern P when viewed in the second direction D2 in the projected projection pattern P is obtained. It cannot be measured. This is because, for example, in order to measure the shape of the hand, since the size of a general hand is about 20 cm, it is necessary to project a projection pattern P having a length of about 20 cm in the second direction D2. It will be. Here, in the three-dimensional shape measuring apparatus 10, when the type of each stripe S is increased in order to increase the dimension (size) of the projection pattern P, the difference for each stripe S is reduced, and each stripe S is appropriately determined. It becomes difficult. Further, in the three-dimensional shape measuring apparatus 10, since the measurement point in the second direction D2 is set for each pixel indicating each stripe image Si, if the width dimension of each stripe S is increased, the measurement result in the second direction D2 is measured. Lowering the resolution (resolution).

このため、三次元形状測定装置10では、求められる分解能(解像度)に対応させた十分に細い幅寸法の各ストライプSを適切な判別を可能とする種類の数だけ用いて、隣接する2本のストライプSを異なる種類として周期性領域Arを形成する。そして、三次元形状測定装置10では、その周期性領域Arを複数個繰り返して配することにより、投影パターンPの寸法(サイズ)を大きくすることが考えられる。この場合、投影パターン像Piにおいて隣接する2本のストライプ像Siのコードの組み合わせの態様Cを求め、投影パターンPにおける態様Cと比較することで、各周期性領域Arにおける第2方向D2での位置(水平位置)に対応させることができる。ところが、投影パターンPでは、複数の周期性領域Ar(この例では3個)が設けられていることから、隣接する2本のストライプSのコードの組み合わせの態様Cではいずれの周期性領域Arに属するものであるのかを判別することができなくなってしまう。   For this reason, in the three-dimensional shape measuring apparatus 10, two adjacent stripes S having a sufficiently narrow width corresponding to the required resolution (resolution) are used by the number of types that enable appropriate discrimination, and two adjacent S are used. The periodic region Ar is formed using different types of stripes S. In the three-dimensional shape measuring apparatus 10, it is conceivable to increase the dimension (size) of the projection pattern P by repeatedly arranging the periodic region Ar. In this case, an aspect C of the combination of the codes of the two adjacent stripe images Si in the projection pattern image Pi is obtained, and compared with the aspect C in the projection pattern P. Thus, in the second direction D2 in each periodic region Ar It can correspond to the position (horizontal position). However, since the projection pattern P is provided with a plurality of periodic regions Ar (three in this example), in the mode C of the combination of codes of two adjacent stripes S, any periodic region Ar It will not be possible to determine whether it belongs.

これに対して、本発明に係る測定装置の実施例1の三次元形状測定装置10では、投影パターンPに、第1方向D1で見て異なるレベルの輝度値としつつ投影パターンPの左上の角部から右下の角部を架け渡す対角線上に境界線Bを設けている。このため、三次元形状測定装置10では、周期性領域Ar毎に第1方向D1および第2方向D2で見た境界線Bの位置を異なるものとすることができる。このことから、三次元形状測定装置10では、投影パターン像Piにおけるいずれの位置(画素)を注目点dsとした場合であっても、注目点dsから境界線Bまでの間隔kを用いることにより、当該注目点dsが属する周期性領域Arを判別することができる。これにより、三次元形状測定装置10では、複数個の周期性領域Arを繰り返して配することで投影パターンPの寸法(サイズ)を大きくしても、投影パターン像Pi上に設定した測定点を投影パターンPに適切に対応させることができる。ここで、三次元形状測定装置10では、求められる分解能(解像度)に対応させた十分に細い幅寸法の各ストライプSを適切な判別を可能とする種類の数だけ用いて、隣接する2本のストライプSを異なる種類として周期性領域Arを形成している。よって、三次元形状測定装置10では、適切な各ストライプSの判別を可能としつつ十分な分解能(解像度)を有するとともに、測定可能な測定対象Oの大きさを大きくすることができる。   On the other hand, in the three-dimensional shape measuring apparatus 10 of the first embodiment of the measuring apparatus according to the present invention, the upper left corner of the projection pattern P while the brightness value of the projection pattern P is different from that of the first direction D1. A boundary line B is provided on a diagonal line that bridges the lower right corner from the part. For this reason, in the three-dimensional shape measuring apparatus 10, the position of the boundary line B viewed in the first direction D1 and the second direction D2 can be different for each periodic region Ar. From this, the three-dimensional shape measuring apparatus 10 uses the interval k from the attention point ds to the boundary line B, regardless of which position (pixel) in the projection pattern image Pi is the attention point ds. The periodic region Ar to which the attention point ds belongs can be determined. Thereby, in the three-dimensional shape measuring apparatus 10, even if the dimension (size) of the projection pattern P is increased by repeatedly arranging the plurality of periodic regions Ar, the measurement points set on the projection pattern image Pi are displayed. It is possible to appropriately correspond to the projection pattern P. Here, in the three-dimensional shape measuring apparatus 10, two adjacent stripes S having a sufficiently narrow width corresponding to the required resolution (resolution) are used by the number of types that enable appropriate discrimination. The periodic region Ar is formed by using different types of stripes S. Therefore, the three-dimensional shape measuring apparatus 10 has sufficient resolution (resolution) while enabling appropriate discrimination of each stripe S, and can increase the size of the measurement object O that can be measured.

また、三次元形状測定装置10では、第1方向D1で見て境界線Bの一方側(図4では上側)と他方側(図4では下側)とで各ストライプSの位置を第2方向D2にずらすことにより、第1方向D1で見て異なるレベルの輝度値となる境界線Bを形成している。このため、三次元形状測定装置10では、第1方向D1で見て境界線Bの一方側と他方側とで異なる種類ではあるが切れ目なく各ストライプSを位置させることができる。ここで、三次元形状測定装置10では、投影パターン像Piにおける各ストライプ像Siを示す全ての画素の三次元形状を測定すべく、各ストライプ像Siを示す画素列におけるすべての画素を測定点として設定する。このため、三次元形状測定装置10では、測定結果における第1方向D1での分解能(解像度)が1画素の大きさとなる。これらのことから、三次元形状測定装置10では、第1方向D1で見て切れ目なく各ストライプSを位置させつつ境界線Bを形成することにより、第1方向D1での分解能(解像度)の低下を防止しつつ境界線Bを設けることができる。   In the three-dimensional shape measuring apparatus 10, the position of each stripe S is set in the second direction on one side (upper side in FIG. 4) and the other side (lower side in FIG. 4) of the boundary line B as viewed in the first direction D1. By shifting to D2, a boundary line B having luminance values at different levels when viewed in the first direction D1 is formed. For this reason, in the three-dimensional shape measuring apparatus 10, the stripes S can be positioned without any break although they are of different types on the one side and the other side of the boundary line B as viewed in the first direction D <b> 1. Here, in the three-dimensional shape measuring apparatus 10, in order to measure the three-dimensional shape of all the pixels indicating each stripe image Si in the projection pattern image Pi, all the pixels in the pixel column indicating each stripe image Si are used as measurement points. Set. For this reason, in the three-dimensional shape measuring apparatus 10, the resolution (resolution) in the first direction D1 in the measurement result is the size of one pixel. For these reasons, the three-dimensional shape measuring apparatus 10 reduces the resolution (resolution) in the first direction D1 by forming the boundary line B while positioning the stripes S without any breaks when viewed in the first direction D1. The boundary line B can be provided while preventing the above.

さらに、三次元形状測定装置10では、第1方向D1で見て境界線Bの一方側と他方側とで各ストライプSの位置を第2方向D2にずらすことにより境界線Bを形成している。このため、三次元形状測定装置10では、境界線Bを形成するために異なる各ストライプSの配置を形成する必要がないので、簡易な構成で境界線Bを投影パターンPに設けることができる。   Further, in the three-dimensional shape measuring apparatus 10, the boundary line B is formed by shifting the position of each stripe S in the second direction D2 on one side and the other side of the boundary line B as viewed in the first direction D1. . For this reason, in the three-dimensional shape measuring apparatus 10, it is not necessary to form different arrangements of the stripes S in order to form the boundary line B. Therefore, the boundary line B can be provided in the projection pattern P with a simple configuration.

三次元形状測定装置10では、無彩色の投影パターンPを投影することから、測定対象Oが有彩色であっても三次元形状を適切に測定することができる。特に、三次元形状測定装置10では、近赤外光を用いて投影パターンPを投影することから、投影した投影パターンPを見えなくすることができる。   Since the three-dimensional shape measuring apparatus 10 projects the achromatic projection pattern P, the three-dimensional shape can be appropriately measured even if the measurement object O is a chromatic color. In particular, since the three-dimensional shape measuring apparatus 10 projects the projection pattern P using near-infrared light, the projected projection pattern P can be made invisible.

三次元形状測定装置10では、第1方向D1で見て境界線Bの一方側と他方側とで各ストライプSの位置を当該ストライプSの幅寸法の整数倍だけ第2方向D2にずらすことにより境界線Bを形成している。このため、三次元形状測定装置10では、第1方向D1で見て異なる2種類のストライプSを位置させるだけでよいので、簡易な構成で境界線Bを投影パターンPに設けることができる。   In the three-dimensional shape measuring apparatus 10, the position of each stripe S is shifted in the second direction D2 by an integral multiple of the width dimension of the stripe S on one side and the other side of the boundary line B as viewed in the first direction D1. A boundary line B is formed. For this reason, in the three-dimensional shape measuring apparatus 10, it is only necessary to position two different types of stripes S as viewed in the first direction D1, and therefore the boundary line B can be provided in the projection pattern P with a simple configuration.

三次元形状測定装置10では、第1方向D1で見て境界線Bの一方側と他方側とで各ストライプSの位置を1列分だけ第2方向D2にずらすことにより境界線Bを形成している。ここで、三次元形状測定装置10では、隣接する2本のストライプSが異なる種類とすべく各ストライプSを配列して投影パターンPを形成している。このため、三次元形状測定装置10では、第1方向D1で見て異なるレベルの輝度値とする境界線Bを、簡易な構成でかつ確実に投影パターンPに設けることができる。   In the three-dimensional shape measuring apparatus 10, the boundary line B is formed by shifting the position of each stripe S by one column in the second direction D2 on one side and the other side of the boundary line B as viewed in the first direction D1. ing. Here, in the three-dimensional shape measuring apparatus 10, the projection pattern P is formed by arranging the stripes S so that the two adjacent stripes S are of different types. For this reason, in the three-dimensional shape measuring apparatus 10, the boundary line B having different levels of luminance values when viewed in the first direction D1 can be reliably provided in the projection pattern P with a simple configuration.

三次元形状測定装置10では、m値レベルの輝度値によりコード化したm種類のストライプSを、m×(m−1)本用いて各周期性領域Arを形成している。このため、三次元形状測定装置10では、m種類のストライプSを用いて隣接する2本のストライプSのコードにより最も多くの態様Cを形成することができ、効率よく各周期性領域Arの第2方向D2での寸法(サイズ)を大きくすることができる。   In the three-dimensional shape measuring apparatus 10, each periodic region Ar is formed by using m × (m−1) stripes S that are encoded by luminance values of m-value level. For this reason, in the three-dimensional shape measuring apparatus 10, it is possible to form the most aspect C by using the codes of two adjacent stripes S using m types of stripes S, and efficiently the first region C of each periodic region Ar. The dimension (size) in the two directions D2 can be increased.

三次元形状測定装置10では、第1方向D1で見た境界線Bまでの間隔k1と第2方向D2で見た境界線Bまでの間隔k2とのいずれか一方を用いて、投影パターン像Piを投影する投影パターンPに対応付けることができる。このため、三次元形状測定装置10では、投影パターン像Piにおける注目点dsとした箇所に応じて第1方向D1および第2方向D2の少なくとも一方を適宜選択することで、境界線Bまでの間隔kを用いて投影パターンPでの対応点Eを適切に求めることができる。   In the three-dimensional shape measuring apparatus 10, the projection pattern image Pi is used by using either the interval k1 to the boundary line B viewed in the first direction D1 or the interval k2 to the boundary line B viewed in the second direction D2. Can be associated with the projection pattern P for projecting. For this reason, in the three-dimensional shape measuring apparatus 10, the distance to the boundary line B is appropriately selected by selecting at least one of the first direction D1 and the second direction D2 in accordance with the location of the projected point ds in the projection pattern image Pi. The corresponding point E in the projection pattern P can be determined appropriately using k.

三次元形状測定装置10では、投影部11が投影する投影パターンPにおける第1方向D1および第2方向D2を、撮像部12の撮像素子において各画素が行列を為す行列方向と等しくしている。このため、三次元形状測定装置10では、投影パターン像Piにおける各ストライプ像Siを示す全ての画素の三次元形状をより適切に測定することができる。   In the three-dimensional shape measuring apparatus 10, the first direction D <b> 1 and the second direction D <b> 2 in the projection pattern P projected by the projection unit 11 are made equal to the matrix direction in which each pixel forms a matrix in the imaging element of the imaging unit 12. For this reason, the three-dimensional shape measuring apparatus 10 can more appropriately measure the three-dimensional shape of all the pixels indicating each stripe image Si in the projection pattern image Pi.

三次元形状測定装置10では、投影パターンP(各周期性領域Ar)において、第2方向D2で隣接する3本のストライプSで見ると、中央に位置するストライプSの輝度値を極値としている。このため、三次元形状測定装置10では、投影パターン像Piにおける各ストライプ像Siをより適切に判別することができる。   In the three-dimensional shape measuring apparatus 10, in the projection pattern P (each periodic region Ar), when viewed with three stripes S adjacent in the second direction D2, the luminance value of the stripe S located at the center is an extreme value. . For this reason, the three-dimensional shape measuring apparatus 10 can more appropriately determine each stripe image Si in the projection pattern image Pi.

したがって、本発明に係る測定装置としての実施例1の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the first embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、境界線Bは、投影パターンP上の全ての位置に対して、少なくとも第1方向D1または第2方向D2のいずれか一方で存在させるように設けられていれば、当該全ての位置に対して対応付けを可能とすることができる。このため、境界線Bは、第1方向D1および第2方向D2に対して傾斜を為すとともに、少なくとも第1方向D1または第2方向D2で見て投影パターンPの全域に渡って伸びるものであれば、本数や位置や長さ寸法や傾斜は適宜設定すればよく、実施例1の構成に限定されるものではない。   In addition, if the boundary line B is provided so as to exist at least in one of the first direction D1 and the second direction D2 with respect to all positions on the projection pattern P, the boundary line B with respect to all the positions. Can be associated with each other. Therefore, the boundary line B is inclined with respect to the first direction D1 and the second direction D2, and extends at least over the entire area of the projection pattern P when viewed in the first direction D1 or the second direction D2. For example, the number, position, length dimension, and inclination may be set as appropriate, and are not limited to the configuration of the first embodiment.

また、実施例1では、図5に示すように各ストライプSを配列して投影パターンPにおける各周期性領域Arを形成している。しかしながら、各周期性領域Arは、m種類のストライプSを、m×(m−1)本用いて第2方向D2で隣接する2本のストライプSの組(2つのコードの態様C)を重複させることなく配列するものであればよく、実施例1の構成に限定されるものではない。また、各周期性領域Arは、m種類のストライプSを用いて第2方向D2で隣接する2本のストライプSの組(2つのコードの態様C)を重複させることなく配列するものであれば、厳密にm×(m−1)本用いなくてもよく、実施例1の構成に限定されるものではない。   In the first embodiment, the stripes S are arranged to form the periodic areas Ar in the projection pattern P as shown in FIG. However, each periodic area Ar overlaps a set of two stripes S adjacent to each other in the second direction D2 using m × (m−1) stripes of m types (m−1). The arrangement is not limited to the configuration of the first embodiment as long as it is arranged without being arranged. In addition, each periodic region Ar may be formed by using m types of stripes S and arranging a set of two stripes S adjacent in the second direction D2 (two code modes C) without overlapping each other. Strictly, it is not necessary to use m × (m−1) lines, and the configuration is not limited to that of the first embodiment.

さらに、実施例1では、投影パターンPにおいて、第1方向D1で見て境界線Bの一方側(図4では上側)と他方側(図4では下側)とで各ストライプSの位置を1列分だけ第2方向D2にずらすことにより境界線Bを形成している。しかしながら、境界線Bは、第1方向D1で見て異なるレベルの輝度値となるものであれば、例えば、ストライプSの幅寸法の整数倍だけ第2方向D2にずらすものであってもよく、実施例1の構成に限定されるものではない。   Further, in the first embodiment, in the projection pattern P, the position of each stripe S is 1 on one side (upper side in FIG. 4) and the other side (lower side in FIG. 4) of the boundary line B as viewed in the first direction D1. The boundary line B is formed by shifting in the second direction D2 by the amount of the column. However, the boundary line B may be shifted in the second direction D2 by an integral multiple of the width dimension of the stripe S, for example, as long as the boundary line B has brightness values at different levels when viewed in the first direction D1. The configuration is not limited to that of the first embodiment.

実施例1では、投影パターンP(各周期性領域Ar)において、第2方向D2で隣接する3本のストライプSで見ると、中央に位置するストライプSの輝度値を極値としている。しかしながら、投影パターンP(各周期性領域Ar)では、m種類のストライプSを、m×(m−1)本用いて隣接する2本のストライプSの組(2つのコードの態様C)を重複させることなく配列するものであればよく、実施例1の構成に限定されるものではない。   In Example 1, in the projection pattern P (each periodic region Ar), when viewed with three stripes S adjacent in the second direction D2, the luminance value of the stripe S located at the center is an extreme value. However, in the projection pattern P (each periodic area Ar), m types of stripes S are used as m × (m−1), and a set of two adjacent stripes S (two code modes C) are overlapped. The arrangement is not limited to the configuration of the first embodiment as long as it is arranged without being arranged.

実施例1では、各ストライプ像Siを示す画素列におけるすべての画素を測定点として設定すなわち1行を1画素としており、第1方向D1での分解能(解像度)を1画素の大きさとしている。しかしながら、求められる分解能(解像度)に応じて、1行を複数の画素とするものであってもよく、実施例1の構成に限定されるものではない。   In the first embodiment, all the pixels in the pixel column indicating each stripe image Si are set as measurement points, that is, one row is one pixel, and the resolution (resolution) in the first direction D1 is one pixel. However, depending on the required resolution (resolution), one row may be a plurality of pixels, and is not limited to the configuration of the first embodiment.

次に、本発明の測定装置としての実施例2の三次元形状測定装置10について、図9を用いて説明する。この実施例2の三次元形状測定装置10は、投影する本発明に係る投影パターンの一例としての投影パターンPBの構成が、実施例1の投影パターンP(投影パターンPA)とは異なる例である。この実施例2の三次元形状測定装置10は、基本的な概念および構成は上記した実施例1の三次元形状測定装置10と同様であることから、等しい概念および構成の個所には同じ符号を付し、その詳細な説明は省略する。   Next, the three-dimensional shape measuring apparatus 10 of Example 2 as a measuring apparatus of the present invention will be described with reference to FIG. The three-dimensional shape measuring apparatus 10 of the second embodiment is an example in which the configuration of the projection pattern PB as an example of the projection pattern according to the present invention to be projected is different from the projection pattern P (projection pattern PA) of the first embodiment. . Since the basic concept and configuration of the three-dimensional shape measuring apparatus 10 according to the second embodiment are the same as those of the three-dimensional shape measuring apparatus 10 according to the first embodiment described above, the same reference numerals are used for parts having the same concept and configuration. A detailed description thereof will be omitted.

実施例2の三次元形状測定装置10では、投影部11が投影する投影パターンPBに複数の境界線BBを設けるものとする。その一例としての投影パターンPBを図9に示す。その投影パターンPBは、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いるものとして輝度値別に1、2、3のコードを割り振っている。投影パターンPBは、6(3×(3−1))本のストライプSから為る周期性領域Arを10個繰り返し配して形成している。この投影パターンPBでは、第1方向D1および第2方向D2に対して傾斜しつつ外形線における各辺の中点を架け渡すように4本の境界線BBを設けている。この各境界線BBは、それらが取り囲む内側と外側とで、各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。   In the three-dimensional shape measurement apparatus 10 according to the second embodiment, a plurality of boundary lines BB are provided on the projection pattern PB projected by the projection unit 11. An example of the projection pattern PB is shown in FIG. The projection pattern PB is coded with three-level luminance values (m = 3) and uses three types of stripes S, and codes 1, 2, and 3 are assigned to the luminance values. The projection pattern PB is formed by repeatedly arranging 10 periodic regions Ar formed by 6 (3 × (3-1)) stripes S. In this projection pattern PB, four boundary lines BB are provided so as to bridge the midpoints of the sides of the outline while being inclined with respect to the first direction D1 and the second direction D2. Each boundary line BB is formed by shifting the position of each stripe S by one column in the second direction D2 between the inner side and the outer side that they surround.

このため、投影パターンPBでは、各境界線BBが交わる4つの交点(中点)を除くと、投影パターンPB上の全ての位置に対して、第1方向D1および第2方向D2で見て各々2つの境界線BBを存在させている。これにより、実施例2では、第1方向D1および第2方向D2のいずれであっても2つの境界線BBまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPBに対応付けることができる。   For this reason, in the projection pattern PB, except for the four intersections (midpoints) where each boundary line BB intersects, all the positions on the projection pattern PB are viewed in the first direction D1 and the second direction D2, respectively. Two boundary lines BB are present. Thus, in the second embodiment, the projection pattern image Pi can be associated with the projection pattern PB to be projected using the interval k to the two boundary lines BB in either the first direction D1 or the second direction D2. it can.

実施例2の三次元形状測定装置10では、基本的に実施例1の三次元形状測定装置10と同様の構成であることから、基本的に実施例1と同様の効果を得ることができる。   Since the three-dimensional shape measuring apparatus 10 according to the second embodiment has basically the same configuration as the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same effects as those of the first embodiment can be basically obtained.

それに加えて、実施例2の三次元形状測定装置10では、投影する投影パターンPBに第1方向D1および第2方向D2に対して傾斜しつつ外形線における各辺の中点を架け渡すように4本の境界線BBを設けている。このため、実施例2では、第1方向D1および第2方向D2の一方のみで見た場合であっても、2つの境界線BBまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPBに対応付けることができる。これにより、実施例2では、投影パターン像Piを投影する投影パターンPBにより適切に対応付けることができ、投影パターン像Piにおける各ストライプ像Siを示す全ての画素を測定点として深度方向距離Zをより適切に算出することができる。   In addition, in the three-dimensional shape measuring apparatus 10 according to the second embodiment, the midpoint of each side of the outline is bridged over the projection pattern PB to be projected while being inclined with respect to the first direction D1 and the second direction D2. Four boundary lines BB are provided. For this reason, in the second embodiment, even when viewed only in one of the first direction D1 and the second direction D2, the projection pattern image Pi is projected using the interval k to the two boundary lines BB. It can be associated with the pattern PB. Accordingly, in the second embodiment, the projection pattern PB can be appropriately associated with the projection pattern PB, and the depth direction distance Z is further measured using all the pixels indicating the stripe images Si in the projection pattern image Pi as measurement points. It can be calculated appropriately.

また、実施例2の三次元形状測定装置10では、第1方向D1および第2方向D2の一方のみで見た場合であっても、2つの境界線BBまでの間隔kを用いることができるので、一方の間隔kを他方の間隔kに対するエラーチェックとして用いることができる。このため、実施例2では、投影パターン像Piを投影する投影パターンPBにより適切に対応付けることができる。   In the three-dimensional shape measuring apparatus 10 according to the second embodiment, the distance k to the two boundary lines BB can be used even when viewed in only one of the first direction D1 and the second direction D2. , One interval k can be used as an error check for the other interval k. For this reason, in the second embodiment, the projection pattern image Pi can be appropriately associated with the projection pattern PB.

さらに、実施例2の三次元形状測定装置10では、各境界線BBが交わる4つの交点(中点)を除くと、投影パターンPB上の全ての位置に対して、第1方向D1および第2方向D2で見て各々2つの境界線BBを存在させている。このため、実施例2では、投影パターン像Piにおいて、注目点dsに対して第1方向D1または第2方向D2に境界線BBを存在させる可能性を高めることができるので、投影パターン像Piを投影パターンPBにより確実に対応付けることができる。これは、三次元形状の測定では、オクル―ジョン等により撮像部12が投影パターンPBの全体を投影パターン像Piとして取得できない可能性があることによる。   Furthermore, in the three-dimensional shape measuring apparatus 10 according to the second embodiment, the first direction D1 and the second direction with respect to all positions on the projection pattern PB except for the four intersections (midpoints) where the boundary lines BB intersect. There are two boundary lines BB as seen in the direction D2. For this reason, in the second embodiment, in the projection pattern image Pi, it is possible to increase the possibility that the boundary line BB exists in the first direction D1 or the second direction D2 with respect to the target point ds. The projection pattern PB can be reliably associated. This is because in the measurement of the three-dimensional shape, the imaging unit 12 may not be able to acquire the entire projection pattern PB as the projection pattern image Pi due to occlusion or the like.

したがって、本発明に係る測定装置としての実施例2の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the second embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、実施例3では、図9に示す投影パターンPBを用いているが、複数の境界線が設けられたものであれば、他の構成であってもよく、実施例2の構成に限定されるものではない。   In the third embodiment, the projection pattern PB shown in FIG. 9 is used. However, as long as a plurality of boundary lines are provided, other configurations may be used, and the configuration is limited to the configuration of the second embodiment. It is not something.

次に、本発明の測定装置としての実施例3の三次元形状測定装置10について、図10を用いて説明する。この実施例3の三次元形状測定装置10は、投影する本発明に係る投影パターンの一例としての投影パターンPCの構成が、実施例1の投影パターンP(投影パターンPA)および実施例2の投影パターンPBとは異なる例である。この実施例3の三次元形状測定装置10は、基本的な概念および構成は上記した実施例1の三次元形状測定装置10と同様であることから、等しい概念および構成の個所には同じ符号を付し、その詳細な説明は省略する。   Next, the three-dimensional shape measuring apparatus 10 of Example 3 as a measuring apparatus of the present invention will be described with reference to FIG. In the three-dimensional shape measuring apparatus 10 of the third embodiment, the configuration of the projection pattern PC as an example of the projection pattern according to the present invention to be projected is the projection pattern P (projection pattern PA) of the first embodiment and the projection of the second embodiment. This is an example different from the pattern PB. Since the basic concept and configuration of the three-dimensional shape measuring apparatus 10 according to the third embodiment are the same as those of the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same reference numerals are used for the same concept and configuration. A detailed description thereof will be omitted.

実施例3の三次元形状測定装置10では、投影部11が投影する投影パターンPCに複数の境界線BCを設けるとともに、その各境界線BCが互いに交わることを防止したものとする。その一例としての投影パターンPCを図9に示す。その投影パターンPCは、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いるものとして輝度値別に1、2、3のコードを割り振っている。投影パターンPCは、6(3×(3−1))本のストライプSから為る周期性領域Arを10個繰り返し配して形成している。この投影パターンPCでは、第1方向D1および第2方向D2に対して傾斜しつつ、互いに平行な3本の境界線BCを設けている。この各境界線BCは、当該各境界線BCの上側(第1方向D1一方側)と下側(第1方向D1他方側)とで各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。図10に示す例では、真ん中に位置する境界線BCを、右上の角部の近傍から左下の角部の近傍を架け渡して設け、上下の2本の境界線BCを外形線における第1方向D1に伸びる辺の中点の近傍と第2方向D2に伸びる辺の中点の近傍とを架け渡して設けている。このため、投影パターンPCでは、第2方向D2に並列する各ストライプSの群が3本の境界線BCにより4段階に分けられている。この投影パターンPCでは、1段目と3段目の各ストライプSの並びを等しくし、2段目と4段目の各ストライプSの並びを等しくしている。   In the three-dimensional shape measuring apparatus 10 according to the third embodiment, it is assumed that a plurality of boundary lines BC are provided on the projection pattern PC projected by the projection unit 11 and that the boundary lines BC are prevented from crossing each other. An example of the projection pattern PC is shown in FIG. The projection pattern PC is coded with three-level luminance values (m = 3) and uses three types of stripes S, and codes 1, 2, and 3 are assigned to the luminance values. The projection pattern PC is formed by repeatedly arranging 10 periodic regions Ar formed by 6 (3 × (3-1)) stripes S. In this projection pattern PC, three boundary lines BC are provided parallel to each other while being inclined with respect to the first direction D1 and the second direction D2. Each boundary line BC has the position of each stripe S in the second direction D2 by one column on the upper side (first side in the first direction D1) and the lower side (first side in the first direction D1) of the boundary line BC. They are staggered. In the example shown in FIG. 10, the boundary line BC positioned in the middle is provided so as to extend from the vicinity of the upper right corner to the vicinity of the lower left corner, and the upper and lower boundary lines BC are arranged in the first direction in the outline. The vicinity of the midpoint of the side extending in D1 and the vicinity of the midpoint of the side extending in the second direction D2 are provided across. For this reason, in the projection pattern PC, each group of stripes S arranged in parallel in the second direction D2 is divided into four stages by three boundary lines BC. In this projection pattern PC, the arrangement of the stripes S in the first and third stages is made equal, and the arrangement of the stripes S in the second and fourth stages is made equal.

このため、投影パターンPCでは、全ての位置に対して、第1方向D1および第2方向D2で見て各々2つの境界線BCを存在させている。これにより、実施例3では、第1方向D1および第2方向D2のいずれであっても2つの境界線BCまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPCに対応付けることができる。   For this reason, in the projection pattern PC, two boundary lines BC exist in each position when viewed in the first direction D1 and the second direction D2. Thereby, in Example 3, it is possible to associate the projection pattern image Pi with the projection pattern PC to project the projection pattern image Pi using the interval k to the two boundary lines BC in any of the first direction D1 and the second direction D2. it can.

実施例3の三次元形状測定装置10では、基本的に実施例1の三次元形状測定装置10と同様の構成であることから、基本的に実施例1と同様の効果を得ることができる。   Since the three-dimensional shape measuring apparatus 10 according to the third embodiment has basically the same configuration as the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same effects as those of the first embodiment can be basically obtained.

それに加えて、実施例3の三次元形状測定装置10では、投影する投影パターンPCに互いに平行な3本の境界線BCを設けている。このため、実施例3では、第1方向D1および第2方向D2の一方のみで見た場合であっても、2つの境界線BCまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPCに対応付けることができる。これにより、実施例3では、投影パターン像Piを投影する投影パターンPCにより適切に対応付けることができ、投影パターン像Piにおける各ストライプ像Siを示す全ての画素を測定点として深度方向距離Zをより適切に算出することができる。   In addition, in the three-dimensional shape measuring apparatus 10 of the third embodiment, three boundary lines BC parallel to each other are provided on the projection pattern PC to be projected. For this reason, in the third embodiment, even when viewed in only one of the first direction D1 and the second direction D2, the projection pattern image Pi is projected using the interval k to the two boundary lines BC. It can be associated with the pattern PC. As a result, in the third embodiment, the projection pattern PC can be appropriately associated with the projection pattern PC to project the projection pattern image Pi, and the depth direction distance Z is further measured using all the pixels indicating each stripe image Si in the projection pattern image Pi as measurement points. It can be calculated appropriately.

また、実施例3の三次元形状測定装置10では、第1方向D1および第2方向D2の一方のみで見た場合であっても、2つの境界線BCまでの間隔kを用いることができるので、一方の間隔kを他方の間隔kに対するエラーチェックとして用いることができる。このため、実施例3では、投影パターン像Piを投影する投影パターンPCにより適切に対応付けることができる。   In the three-dimensional shape measuring apparatus 10 according to the third embodiment, the distance k to the two boundary lines BC can be used even when viewed in only one of the first direction D1 and the second direction D2. , One interval k can be used as an error check for the other interval k. For this reason, in the third embodiment, the projection pattern PC that projects the projection pattern image Pi can be appropriately associated.

さらに、実施例3の三次元形状測定装置10では、投影パターンPC上の全ての位置に対して、第1方向D1および第2方向D2で見て各々2つの境界線BCを存在させている。このため、実施例3では、投影パターン像Piにおいて、注目点dsに対して第1方向D1または第2方向D2に境界線BCを存在させる可能性を高めることができるので、投影パターン像Piを投影する投影パターンPCにより確実に対応付けることができる。   Further, in the three-dimensional shape measuring apparatus 10 of the third embodiment, two boundary lines BC exist in all positions on the projection pattern PC as viewed in the first direction D1 and the second direction D2. Therefore, in the third embodiment, in the projection pattern image Pi, it is possible to increase the possibility that the boundary line BC exists in the first direction D1 or the second direction D2 with respect to the point of interest ds. The projection pattern PC to be projected can be reliably associated.

実施例3の三次元形状測定装置10では、3本の境界線BCが互いに交わることが防止されている。このため、実施例3では、投影パターン像Piにおいて、注目点dsに対して第1方向D1または第2方向D2に境界線BCを存在させる可能性をさらに高めることができ、投影パターン像Piを投影する投影パターンPCにより確実に対応付けることができる。これは、境界線が交わるものとされていると、その交点では境界線が一致していることから、一方の境界線が存在しない場合には同時に他方の境界線も存在しないこととなることによる。特に、実施例3では、3本の境界線BCが互いに平行とされて互いの間隔が変化することがないので、複数の境界線BCが同時に存在しなくなる確率を大幅に低減することができ、投影パターン像Piを投影する投影パターンPCにより確実に対応付けることができる。   In the three-dimensional shape measuring apparatus 10 according to the third embodiment, the three boundary lines BC are prevented from crossing each other. For this reason, in Example 3, in the projection pattern image Pi, it is possible to further increase the possibility that the boundary line BC exists in the first direction D1 or the second direction D2 with respect to the target point ds. The projection pattern PC to be projected can be reliably associated. This is because if the boundary line intersects, the boundary line coincides at the intersection point, so that if one boundary line does not exist, the other boundary line does not exist at the same time. . In particular, in the third embodiment, since the three boundary lines BC are parallel to each other and the distance between them does not change, the probability that a plurality of boundary lines BC do not exist at the same time can be greatly reduced. The projection pattern image Pi can be reliably associated with the projection pattern PC that projects the projection pattern image Pi.

したがって、本発明に係る測定装置としての実施例3の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the third embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、実施例3では、図10に示す投影パターンPCを用いているが、複数の境界線が設けられたものであって、互いに交わることが防止されているものであれば、他の構成であってもよく、実施例3の構成に限定されるものではない。その他の例として、図11に示す投影パターンPDをあげる。この投影パターンPDでは、第1方向D1および第2方向D2に対して傾斜しつつ、互いに平行な2本の境界線BDを設けている。この各境界線BDは、当該各境界線BDの上側(第1方向D1一方側)と下側(第1方向D1他方側)とで各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。図11に示す例では、左側の境界線BDを外形線における上側で第2方向D2に伸びる辺の中点と左下の角部とを架け渡して設け、右側の境界線BDを外形線における下側で第2方向D2に伸びる辺の中点と右上の角部とを架け渡して設けている。このため、投影パターンPCでは、第2方向D2に並列する各ストライプSの群が、2本の境界線BDにより3段階に分けられている。この投影パターンPDでは、全ての位置に対して、第1方向D1で見て1つの境界線BDを存在させるとともに、第2方向D2で見て2つの境界線BCを存在させている。このため、図11に示す例では、第1方向D1では境界線BCまでの間隔kを用いて、第2方向D2では2つの境界線BCまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPCに対応付けることができる。   In the third embodiment, the projection pattern PC shown in FIG. 10 is used. However, as long as it is provided with a plurality of boundary lines and is prevented from crossing each other, it may have another configuration. It may be present and is not limited to the configuration of the third embodiment. Another example is a projection pattern PD shown in FIG. In the projection pattern PD, two boundary lines BD that are parallel to each other are provided while being inclined with respect to the first direction D1 and the second direction D2. Each boundary line BD has the position of each stripe S in the second direction D2 by one column on the upper side (first direction D1 one side) and the lower side (first direction D1 other side) of the boundary line BD. They are staggered. In the example shown in FIG. 11, the left boundary line BD is provided across the midpoint of the side extending in the second direction D2 on the upper side of the outline and the lower left corner, and the right boundary line BD is provided below the outline. It is provided across the midpoint of the side extending in the second direction D2 and the upper right corner. For this reason, in the projection pattern PC, each group of stripes S arranged in parallel in the second direction D2 is divided into three stages by two boundary lines BD. In this projection pattern PD, for every position, one boundary line BD exists in the first direction D1 and two boundary lines BC exist in the second direction D2. Therefore, in the example shown in FIG. 11, the projection pattern image Pi is projected using the interval k to the boundary line BC in the first direction D1 and using the interval k to the two boundary lines BC in the second direction D2. Can be associated with the projection pattern PC.

次に、本発明の測定装置としての実施例4の三次元形状測定装置10について、図12を用いて説明する。この実施例4の三次元形状測定装置10は、投影する本発明に係る投影パターンの一例としての投影パターンPEの構成が、実施例1の投影パターンP(投影パターンPA)、実施例2の投影パターンPBおよび実施例3の投影パターンPC、投影パターンPDとは異なる例である。この実施例4の三次元形状測定装置10は、基本的な概念および構成は上記した実施例1の三次元形状測定装置10と同様であることから、等しい概念および構成の個所には同じ符号を付し、その詳細な説明は省略する。   Next, the three-dimensional shape measuring apparatus 10 of Example 4 as a measuring apparatus of the present invention will be described with reference to FIG. In the three-dimensional shape measuring apparatus 10 of the fourth embodiment, the projection pattern PE as an example of the projection pattern according to the present invention to be projected is the projection pattern P (projection pattern PA) of the first embodiment and the projection of the second embodiment. This is an example different from the pattern PB and the projection pattern PC and projection pattern PD of the third embodiment. Since the basic concept and configuration of the three-dimensional shape measuring apparatus 10 according to the fourth embodiment are the same as those of the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same reference numerals are used for parts having the same concept and configuration. A detailed description thereof will be omitted.

実施例4の三次元形状測定装置10では、投影部11が投影する投影パターンPEを、次式(1)を満たすものとする。ここで、投影パターンPEの投影パターン像Piにおいて、第2方向D2での総画素数をαとし、境界線BEの本数をβとし、各ストライプ像Siの第2方向D2での画素数をγとする。   In the three-dimensional shape measurement apparatus 10 according to the fourth embodiment, the projection pattern PE projected by the projection unit 11 satisfies the following expression (1). Here, in the projection pattern image Pi of the projection pattern PE, the total number of pixels in the second direction D2 is α, the number of boundary lines BE is β, and the number of pixels in each stripe image Si in the second direction D2 is γ. And

α/β=m×(m−1)×γ ・・・(1)
ここで、投影パターンPEでは、第1方向D1で見て各境界線BEを互いに重複させることなく、かつ第2方向D2で見ると全ての境界線BEを連続させるように、各境界線BEを設けるものとする。すると、式(1)において、左項の「α/β」は、投影パターン像Pi(投影パターンPE)において、1つの境界線BEが存在する第2方向D2で見た幅寸法に相当する。また、式(1)において、右項の「m×(m−1)×γ」は、各周期性領域Arにおける各ストライプ像Siの本数に各ストライプ像Siの第2方向D2での画素数を乗算したものであるので、各周期性領域Arの第2方向D2で見た寸法(サイズ)に相当する。このため、式(1)は、周期性領域Arのそれぞれに境界線BEを設けることを意味している。そして、式(1)は、各周期性領域Arを互いに等しいストライプSの配列としている場合、周期性領域Ar同士で見ると、各ストライプSに対する境界線BEとの位置関係が互いに等しくなることを意味する。換言すると、いずれの周期性領域Arであっても、注目点dsにおける第1方向D1で見た境界線BEまでの間隔k1が互いに等しくなり、かつ注目点dsにおける第2方向D2で見た境界線BEまでの間隔k2が互いに等しくなることを意味する。このため、実施例4の三次元形状測定装置10では、注目点dsにおける第2方向D2で見た各境界線BEまでの間隔k2を用いて、投影パターン像Pi上に設定した測定点を投影パターンPEに対応させる。
α / β = m × (m−1) × γ (1)
Here, in the projection pattern PE, the boundary lines BE are not overlapped with each other when viewed in the first direction D1, and are continuous so that all the boundary lines BE are continuous when viewed in the second direction D2. Shall be provided. Then, in the expression (1), “α / β” in the left term corresponds to the width dimension viewed in the second direction D2 where one boundary line BE exists in the projection pattern image Pi (projection pattern PE). In Expression (1), “m × (m−1) × γ” in the right term represents the number of pixels in the second direction D2 of each stripe image Si to the number of each stripe image Si in each periodic region Ar. Is equivalent to the dimension (size) of each periodic region Ar viewed in the second direction D2. For this reason, Formula (1) means that the boundary line BE is provided in each of the periodic regions Ar. Then, when the periodic regions Ar are arranged in the same stripe S, the formula (1) indicates that the positional relationship between the periodic regions Ar and the boundary line BE is equal to each other when viewed in the periodic regions Ar. means. In other words, in any periodic region Ar, the interval k1 to the boundary line BE viewed in the first direction D1 at the attention point ds is equal to each other, and the boundary viewed in the second direction D2 at the attention point ds. This means that the distances k2 to the line BE are equal to each other. For this reason, in the three-dimensional shape measuring apparatus 10 according to the fourth embodiment, the measurement points set on the projection pattern image Pi are projected using the intervals k2 to each boundary line BE viewed in the second direction D2 at the target point ds. Corresponds to the pattern PE.

この実施例4の三次元形状測定装置10の投影部11が投影する一例としての投影パターンPEを図12に示す。その投影パターンPEは、5値レベルの輝度値(m=5)によりコード化して5種類のストライプSを用いるものとして輝度値別に1、2、3、4、5のコードを割り振っている。投影パターンPEは、20(5×(5−1))本のストライプSから為る周期性領域Arを3個繰り返し配して形成している。この投影パターンPEでは、第1方向D1および第2方向D2に対して傾斜しつつ各周期性領域Arを右上から左下に架け渡して3本の境界線BEを設けている。この各境界線BEは、各周期性領域Arにおいて当該各境界線BEの上側(第1方向D1一方側)と下側(第1方向D1他方側)とで各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。このため、投影パターンPEでは、各周期性領域Arにおける上側の各ストライプSの群同士を互いに等しい各ストライプSの並びとし、各周期性領域Arにおける下側の各ストライプSの群同士を互いに等しい各ストライプSの並びとしている。   FIG. 12 shows an example of a projection pattern PE projected by the projection unit 11 of the three-dimensional shape measuring apparatus 10 according to the fourth embodiment. The projection pattern PE is coded with five levels of luminance values (m = 5) and uses five types of stripes S, and codes 1, 2, 3, 4, 5 are assigned to the luminance values. The projection pattern PE is formed by repeatedly arranging three periodic regions Ar formed by 20 (5 × (5-1)) stripes S. In this projection pattern PE, three boundary lines BE are provided by spanning each periodic region Ar from the upper right to the lower left while being inclined with respect to the first direction D1 and the second direction D2. Each boundary line BE corresponds to the position of each stripe S by one column on each upper side (first direction D1 one side) and lower side (first direction D1 other side) of each boundary line BE in each periodic region Ar. Only by shifting in the second direction D2. For this reason, in the projection pattern PE, the groups of the upper stripes S in each periodic area Ar are arranged to be equal to each other, and the groups of the lower stripes S in each periodic area Ar are equal to each other. Each stripe S is arranged.

このため、投影パターンPEでは、いずれの周期性領域Arに注目点dsが位置するかによって、第2方向D2で見た境界線BEの数が異なるものとなり、第2方向D2で見た各境界線BEまでの間隔kの組み合わせが異なるものとなる。このことを、図12に示す注目点ds1、注目点ds2、注目点ds3を用いて説明する。各注目点は、高さ位置H2でコードの組み合わせの態様Cが「31」となる位置であって、注目点ds1が左側の周期性領域Arに位置し、注目点ds2が真ん中の周期性領域Arに位置し、注目点ds3が右側の周期性領域Arに位置する。ここで、左側の境界線BEを境界線BE1とし、真ん中の境界線BEを境界線BE2とし、右側の境界線BEを境界線BE3とする。また、第2方向D2で見て、左側から右側への向きを正側とし、反対の向きを負側とする。すると、第2方向D2で見て、注目点ds1では、正側に3本の境界線BEが位置し、注目点ds2では、負側に1本かつ正側に2本の境界線BEが位置し、注目点ds3では、負側に2本かつ正側に1本の境界線BEが位置する。そして、注目点ds1では、境界線BE1に対して正側に間隔k11となり、境界線BE2に対して正側に間隔k12となり、境界線BE3に対して正側に間隔k13となる。このため、注目点ds1における各境界線BEまでの間隔kの組み合わせは、間隔k11、間隔k12および間隔k13となる。また、注目点ds2では、境界線BE1に対して負側に間隔k14となり、境界線BE2に対して正側に間隔k15となり、境界線BE3に対して正側に間隔k16となる。このため、注目点ds2における境界線BEまでの間隔kの組み合わせは、間隔k14、間隔k15および間隔k16となる。注目点ds3では、境界線BE1に対して負側に間隔k17となり、境界線BE2に対して負側に間隔k18となり、境界線BE3に対して正側に間隔k19となる。このため、注目点ds3における各境界線BEまでの間隔kの組み合わせは、間隔k17、間隔k18および間隔k19となる。このように、投影パターンPEでは、所定の高さ位置においてコードの組み合わせの態様Cが等しい場合であっても、位置する周期性領域Arによって、第2方向D2で見た境界線BEの数が異なり、第2方向D2で見た各境界線BEまでの間隔kの組み合わせが異なる。   For this reason, in the projection pattern PE, the number of boundary lines BE viewed in the second direction D2 differs depending on which periodic region Ar the target point ds is located on, and each boundary viewed in the second direction D2 The combinations of the intervals k to the line BE are different. This will be described using the attention point ds1, the attention point ds2, and the attention point ds3 shown in FIG. Each attention point is a position where the code combination mode C is “31” at the height position H2, the attention point ds1 is located in the left periodic region Ar, and the attention point ds2 is the middle periodic region. Located at Ar, the point of interest ds3 is located in the right periodic area Ar. Here, the left boundary line BE is defined as a boundary line BE1, the middle boundary line BE is defined as a boundary line BE2, and the right boundary line BE is defined as a boundary line BE3. Further, when viewed in the second direction D2, the direction from the left side to the right side is the positive side, and the opposite direction is the negative side. Then, as viewed in the second direction D2, at the attention point ds1, three boundary lines BE are positioned on the positive side, and at the attention point ds2, one boundary line BE is positioned on the negative side and two boundary lines BE are positioned on the positive side. At the attention point ds3, there are two boundary lines BE on the negative side and one boundary line BE on the positive side. At the point of interest ds1, the distance k11 is on the positive side with respect to the boundary line BE1, the distance k12 is on the positive side with respect to the boundary line BE2, and the distance k13 is on the positive side with respect to the boundary line BE3. For this reason, the combination of the intervals k to each boundary line BE at the attention point ds1 is an interval k11, an interval k12, and an interval k13. At the point of interest ds2, the distance k14 is on the negative side with respect to the boundary line BE1, the distance k15 is on the positive side with respect to the boundary line BE2, and the distance k16 is on the positive side with respect to the boundary line BE3. For this reason, the combination of the intervals k to the boundary line BE at the attention point ds2 is the interval k14, the interval k15, and the interval k16. At the point of interest ds3, the distance k17 is negative on the boundary line BE1, the distance k18 is negative on the boundary line BE2, and the distance k19 is positive on the boundary line BE3. For this reason, the combination of the intervals k to each boundary line BE at the attention point ds3 is an interval k17, an interval k18, and an interval k19. As described above, in the projection pattern PE, even when the code combination mode C is equal at the predetermined height position, the number of the boundary lines BE viewed in the second direction D2 is determined by the periodic region Ar. Differently, the combinations of the intervals k to each boundary line BE viewed in the second direction D2 are different.

また、投影パターンPEでは、隣接する2本のストライプSのコードによる態様Cと、各周期性領域Arにおける第2方向D2での位置とを一対一対応とすることができる。すなわち、上記した例を用いると、注目点ds1、注目点ds2、注目点ds3は、いずれも高さ位置H2でコードの組み合わせの態様Cが「31」とされている。そして、左側の周期性領域Arにおける注目点ds1の第2方向D2での位置と、真ん中の周期性領域Arにおける注目点ds2の第2方向D2での位置と、右側の周期性領域Arにおける注目点ds3の第2方向D2での位置と、は互いに等しい。このように、投影パターンPEでは、隣接する2本のストライプSのコードによる態様Cにより、各周期性領域Arにおける第2方向D2での位置が一義的に定まる。   Moreover, in the projection pattern PE, the aspect C by the code | symbol of two adjacent stripes S and the position in the 2nd direction D2 in each periodic area | region Ar can be made to correspond one-to-one. That is, using the above example, the attention point ds1, the attention point ds2, and the attention point ds3 are all at the height position H2 and the code combination mode C is “31”. Then, the position of the attention point ds1 in the left periodic region Ar in the second direction D2, the position of the attention point ds2 in the middle periodic region Ar in the second direction D2, and the attention in the right periodic region Ar. The position of the point ds3 in the second direction D2 is equal to each other. As described above, in the projection pattern PE, the position in the second direction D2 in each periodic region Ar is uniquely determined by the aspect C by the codes of the two adjacent stripes S.

この実施例4の三次元形状測定装置10では、注目点dsを第2方向D2で挟む2本のストライプ像Siのコードを判別することにより、注目点dsが位置するコードの組み合わせの態様Cを求める。すると、投影パターンPEでは、各周期性領域Ar内での第2方向D2での位置が態様Cに応じて一義的に定まることから、各周期性領域Ar内での第2方向D2での位置を求めることができる。そして、投影パターン像Piにおいて第2方向D2で見た注目点dsから各境界線BEまでの間隔kの組み合わせと、投影パターンPEにおいて第2方向D2で見た注目点dsから各境界線BEまでの間隔との組み合わせを比較する。すると、この間隔の組み合わせが一致する周期性領域Arが、注目点dsが位置する周期性領域Arとなるので、投影パターン像Piを投影する投影パターンPEに対応付けることができる。   In the three-dimensional shape measuring apparatus 10 according to the fourth embodiment, the code C of the two stripe images Si sandwiching the attention point ds in the second direction D2 is discriminated to thereby change the code combination mode C where the attention point ds is located. Ask. Then, in the projection pattern PE, since the position in the second direction D2 in each periodic area Ar is uniquely determined according to the mode C, the position in the second direction D2 in each periodic area Ar. Can be requested. Then, in the projection pattern image Pi, a combination of the distances k from the attention point ds viewed in the second direction D2 to each boundary line BE and the attention point ds viewed in the second direction D2 in the projection pattern PE to each boundary line BE. Compare combinations with intervals. Then, the periodic area Ar having the same combination of intervals becomes the periodic area Ar where the point of interest ds is located, and can therefore be associated with the projection pattern PE on which the projection pattern image Pi is projected.

実施例4の三次元形状測定装置10では、基本的に実施例1の三次元形状測定装置10と同様の構成であることから、基本的に実施例1と同様の効果を得ることができる。   Since the three-dimensional shape measuring apparatus 10 according to the fourth embodiment has basically the same configuration as the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same effects as those of the first embodiment can be basically obtained.

それに加えて、実施例4の三次元形状測定装置10では、式(1)を満たす投影パターンPEを用いている。また、その投影パターンPEでは、第1方向D1で見て各境界線BEを互いに重複させることなく、かつ第2方向D2で見ると全ての境界線BEを連続させるように、各境界線BEを設けるものとしている。さらに、投影パターンPEでは、各周期性領域Arを互いに等しいストライプSの配列としている。これらにより、投影パターンPEでは、2本のストライプ像Siの態様Cから各周期性領域Ar内における第2方向D2での位置を求めることができる。また、投影パターンPEでは、第2方向D2で見た各境界線BEまでの間隔kの組み合わせから注目点dsが位置する周期性領域Arを求めることができる。このため、実施例4では、投影パターン像Pi上に設定した測定点を投影パターンPEに対応させることを、より簡易なものとしつつ適切なものとすることができる。これにより、実施例4では、投影パターン像Piを投影する投影パターンPEにより適切に対応付けることができ、投影パターン像Piにおける各ストライプ像Siを示す全ての画素を測定点として深度方向距離Zをより適切に算出することができる。   In addition, in the three-dimensional shape measuring apparatus 10 according to the fourth embodiment, the projection pattern PE that satisfies Expression (1) is used. Further, in the projection pattern PE, the boundary lines BE are not overlapped with each other when viewed in the first direction D1, and all the boundary lines BE are continuous when viewed in the second direction D2. It is supposed to be provided. Further, in the projection pattern PE, the periodic regions Ar are arranged in the same stripe S. Accordingly, in the projection pattern PE, the position in the second direction D2 in each periodic area Ar can be obtained from the aspect C of the two stripe images Si. Further, in the projection pattern PE, the periodic region Ar where the target point ds is located can be obtained from the combination of the intervals k to each boundary line BE viewed in the second direction D2. For this reason, in the fourth embodiment, it is possible to make the measurement point set on the projection pattern image Pi correspond to the projection pattern PE while making it simpler. As a result, in the fourth embodiment, the projection pattern PE can be appropriately associated with the projection pattern PE to project the projection pattern image Pi, and the depth direction distance Z is further measured using all the pixels indicating each stripe image Si in the projection pattern image Pi as measurement points. It can be calculated appropriately.

また、実施例4の三次元形状測定装置10では、投影パターン像Pi上に設定した測定点を投影パターンPEにより簡易に対応させることができるので、測定対象Oの三次元形状を短時間で測定することができる。   In the three-dimensional shape measuring apparatus 10 of the fourth embodiment, the measurement points set on the projection pattern image Pi can be easily associated with the projection pattern PE, so that the three-dimensional shape of the measuring object O can be measured in a short time. can do.

したがって、本発明に係る測定装置としての実施例4の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the fourth embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、実施例4では、図12に示す投影パターンPEを用いているが、式(1)を満たすものであれば、他の構成であってもよく、実施例5の構成に限定されるものではない。   In the fourth embodiment, the projection pattern PE shown in FIG. 12 is used. However, any other configuration may be used as long as the formula (1) is satisfied, and the configuration is limited to the configuration of the fifth embodiment. is not.

次に、本発明の測定装置としての実施例5の三次元形状測定装置10について、図13を用いて説明する。この実施例5の三次元形状測定装置10は、投影する本発明に係る投影パターンの一例としての投影パターンPFの構成が、実施例1の投影パターンP(投影パターンPA)、実施例2の投影パターンPB、実施例3の投影パターンPC、投影パターンPDおよび実施例4の投影パターンPEとは異なる例である。この実施例5の三次元形状測定装置10は、基本的な概念および構成は上記した実施例1の三次元形状測定装置10と同様であることから、等しい概念および構成の個所には同じ符号を付し、その詳細な説明は省略する。   Next, the three-dimensional shape measuring apparatus 10 of Example 5 as the measuring apparatus of the present invention will be described with reference to FIG. In the three-dimensional shape measuring apparatus 10 of the fifth embodiment, the configuration of the projection pattern PF as an example of the projection pattern according to the present invention to be projected is the projection pattern P (projection pattern PA) of the first embodiment and the projection of the second embodiment. This is an example different from the pattern PB, the projection pattern PC of Example 3, the projection pattern PD, and the projection pattern PE of Example 4. Since the basic concept and configuration of the three-dimensional shape measuring apparatus 10 according to the fifth embodiment are the same as those of the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same reference numerals are used for the same concept and configuration. A detailed description thereof will be omitted.

実施例5の三次元形状測定装置10では、投影部11が投影する投影パターンPFを有彩色のストライプSで形成するものとし、好適な例としてR、G、Bの3成分を用いてストライプSを形成するものとする。このような投影パターンPFは、例えば、投影部11の投影光学系に設けるマスクに色フィルタを用いることにより形成することができる。その一例としての投影パターンPFを図13に示す。その投影パターンPFでは、互いの色を重畳させることなく、R、G、Bの各ストライプSを用いることとする。すなわち、RのストライプSでは、G、Bの色成分(G、Bの波長帯域での輝度値)を有さないものとし、GのストライプSでは、R、Bの色成分(R、Bの波長帯域での輝度値)を有さないものとし、BのストライプSでは、R、Gの色成分(R、Gの波長帯域での輝度値)を有さないものとする。そして、投影パターンPFでは、R、G、Bのそれぞれの色成分において、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いるものとして輝度値別に1、2、3のコードを割り振っている。投影パターンPFでは、第2方向D2で隣接する2本のストライプSを異なる種類としつつ、3値レベルの輝度値とした3種類のRのストライプSを適宜組み合わせて6(3×(3−1))本のストライプSから為る配列(Rの周期性領域)を形成する。そして、G、Bのそれぞれに対しても、同様に、6(3×(3−1))本のGのストライプSおよびBのストライプSから為る配列(G、Bの周期性領域)を形成する。そして、R、G、Bの各周期性領域すなわちRの6本のストライプSの配列とGの6本のストライプSの配列とBの6本のストライプSの配列とを第2方向D2で並べて配することにより、周期性領域Arを形成する。図13に示す例では、その周期性領域Arを3個繰り返し配して投影パターンPFを形成している。   In the three-dimensional shape measuring apparatus 10 according to the fifth embodiment, the projection pattern PF projected by the projection unit 11 is formed with chromatic stripes S. As a preferable example, the stripes S using the three components R, G, and B are used. Shall be formed. Such a projection pattern PF can be formed, for example, by using a color filter for a mask provided in the projection optical system of the projection unit 11. An example of the projection pattern PF is shown in FIG. In the projection pattern PF, R, G, and B stripes S are used without superimposing the colors of each other. That is, the R stripe S does not have G and B color components (luminance values in the G and B wavelength bands), and the G stripe S has R and B color components (R and B). It is assumed that the B stripe S does not have R and G color components (brightness values in the R and G wavelength bands). In the projection pattern PF, each of the R, G, and B color components is encoded with a three-level luminance value (m = 3) and three types of stripes S are used. A code of 3 is assigned. In the projection pattern PF, two stripes S adjacent in the second direction D2 are of different types, and three types of R stripes S having three-level luminance values are appropriately combined to obtain 6 (3 × (3-1 )) An arrangement (R periodic region) formed by the stripes S is formed. Similarly, for each of G and B, an array (G and B periodic regions) made up of 6 (3 × (3-1)) G stripes S and B stripes S is formed. Form. Then, each of the periodic regions of R, G, and B, that is, the array of the six stripes S of R, the array of the six stripes S of G, and the array of the six stripes B of B are arranged in the second direction D2. By arranging, the periodic region Ar is formed. In the example shown in FIG. 13, the projection pattern PF is formed by repeatedly arranging three periodic regions Ar.

この投影パターンPFでは、第1方向D1および第2方向D2に対して傾斜しつつ、互いに交わることのない2本の境界線BFを設けている。この各境界線BFは、当該各境界線BFの上側(第1方向D1一方側)と下側(第1方向D1他方側)とで各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。図13に示す例では、左側の境界線BFを外形線における上側で第2方向D2に伸びる辺の中間と左下の角部とを架け渡して設け、右側の境界線BFを外形線における下側で第2方向D2に伸びる辺の中間と右上の角部とを架け渡して設けている。このため、投影パターンPFでは、第2方向D2に並列する各ストライプSの群が、2本の境界線BFにより3段階に分けられている。   In the projection pattern PF, two boundary lines BF that are inclined with respect to the first direction D1 and the second direction D2 but do not intersect with each other are provided. Each boundary line BF has the position of each stripe S in the second direction D2 by one column on the upper side (first side in the first direction D1) and the lower side (first side in the first direction D1) of the boundary line BF. They are staggered. In the example shown in FIG. 13, the left boundary line BF is provided so as to bridge the middle of the side extending in the second direction D2 on the upper side of the outline and the lower left corner, and the right boundary line BF is provided on the lower side of the outline. Thus, the intermediate part of the side extending in the second direction D2 and the upper right corner are provided across. For this reason, in the projection pattern PF, each group of stripes S arranged in parallel in the second direction D2 is divided into three stages by two boundary lines BF.

この投影パターンPFでは、全ての位置に対して、第2方向D2で見て2つの境界線BFを存在させている。このため、実施例5では、第2方向D2で2つの境界線BFまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPFに対応付けることができる。また、実施例5では、左右両側の一定の範囲において、第1方向D1で見て境界線BFを存在させており、第1方向D1で境界線BFまでの間隔kを用いて、投影パターン像Piを投影する投影パターンPFに対応付けることができる。   In this projection pattern PF, two boundary lines BF exist in all positions when viewed in the second direction D2. Therefore, in the fifth embodiment, it is possible to associate the projection pattern image Pi with the projection pattern PF that projects the projection pattern image Pi using the interval k to the two boundary lines BF in the second direction D2. In the fifth embodiment, the boundary line BF is present in a certain range on both the left and right sides as viewed in the first direction D1, and the projection pattern image is used by using the interval k to the boundary line BF in the first direction D1. Pi can be associated with a projection pattern PF to be projected.

実施例5の三次元形状測定装置10では、基本的に実施例1の三次元形状測定装置10と同様の構成であることから、基本的に実施例1と同様の効果を得ることができる。   Since the three-dimensional shape measuring apparatus 10 according to the fifth embodiment has basically the same configuration as the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same effects as those of the first embodiment can be basically obtained.

それに加えて、実施例5の三次元形状測定装置10では、投影する投影パターンPFを、有彩色のストライプSで形成している。このため、実施例5では、輝度値のレベルすなわち輝度値の変化によりストライプSの種類を増やさなくても、用いるストライプSの種類を増やすことができる。これにより、実施例5では、適切な各ストライプSの判別を可能としつつ十分な分解能(解像度)を有するとともに、測定可能な測定対象Oの大きさをより大きくすることができる。   In addition, in the three-dimensional shape measuring apparatus 10 according to the fifth embodiment, the projection pattern PF to be projected is formed with chromatic stripes S. For this reason, in Example 5, it is possible to increase the types of stripes S to be used without increasing the types of stripes S due to changes in the luminance value level, that is, the luminance values. As a result, in the fifth embodiment, it is possible to determine the appropriate stripes S and to have a sufficient resolution (resolution) and to increase the size of the measurement object O that can be measured.

また、実施例5の三次元形状測定装置10では、R、G、Bの3成分を用いて各ストライプSを形成していることから、異なる色成分のストライプSの判別を容易なものとすることができる。特に、実施例5では、互いの色成分を重畳させることなく各色成分のストライプSを形成しているので、異なる色成分のストライプSの判別をより容易なものとすることができる。   Further, in the three-dimensional shape measuring apparatus 10 of the fifth embodiment, since each stripe S is formed using the three components R, G, and B, the stripe S having different color components can be easily identified. be able to. In particular, in the fifth embodiment, since the stripes S of the respective color components are formed without superimposing the color components of each other, it is possible to more easily discriminate the stripes S of different color components.

したがって、本発明に係る測定装置としての実施例5の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the fifth embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、実施例5では、図13に示す投影パターンPFを用いているが、有彩色とされて、境界線が設けられたものであれば、他の構成であってもよく、実施例5の構成に限定されるものではない。   In the fifth embodiment, the projection pattern PF shown in FIG. 13 is used. However, any other configuration may be used as long as it is a chromatic color and provided with a boundary line. The configuration is not limited.

また、実施例5の三次元形状測定装置10では、R、G、Bの3成分を用いてストライプSを形成しているが、有彩色の投影パターンを投影するものであれば、重畳させるか否かに拘わらず用いる色成分は適宜設定すればよく、実施例5の構成に限定されるものではない。   Further, in the three-dimensional shape measuring apparatus 10 of the fifth embodiment, the stripe S is formed using the three components R, G, and B. Regardless of whether or not, the color component to be used may be set as appropriate, and is not limited to the configuration of the fifth embodiment.

さらに、実施例5の三次元形状測定装置10では、R、G、Bの3成分を用いて互いの色成分を重畳させることなく各色成分のストライプSを形成するものとしているが、有彩色の投影パターンを投影するものであれば、互いの色成分を重畳させるものであってもよく、実施例5の構成に限定されるものではない。   Furthermore, in the three-dimensional shape measuring apparatus 10 of Example 5, the stripes S of the respective color components are formed using the three components R, G, and B without superimposing the color components of each other. As long as the projection pattern is projected, the color components may be superimposed, and the configuration is not limited to that of the fifth embodiment.

次に、本発明の測定装置としての実施例6の三次元形状測定装置10について、図14を用いて説明する。この実施例6の三次元形状測定装置10は、投影パターン像Piを本発明に係る投影パターンの一例としての投影パターンPGに対応付けする際の方法が、実施例1から実施例5の三次元形状測定装置10とは異なる例である。この実施例6の三次元形状測定装置10は、基本的な概念および構成は上記した実施例1の三次元形状測定装置10と同様であることから、等しい概念および構成の個所には同じ符号を付し、その詳細な説明は省略する。   Next, the three-dimensional shape measuring apparatus 10 of Example 6 as a measuring apparatus of the present invention will be described with reference to FIG. In the three-dimensional shape measuring apparatus 10 of the sixth embodiment, the method for associating the projection pattern image Pi with the projection pattern PG as an example of the projection pattern according to the present invention is the same as that of the first to fifth embodiments. This is an example different from the shape measuring apparatus 10. Since the basic concept and configuration of the three-dimensional shape measuring apparatus 10 according to the sixth embodiment are the same as those of the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same reference numerals are used for parts having the same concept and configuration. A detailed description thereof will be omitted.

この実施例6の三次元形状測定装置10では、制御部13の距離算出部15が、第1方向D1で見た境界線BGまでの間隔k1と第2方向D2で見た境界線BGまでの間隔k2とのうちの短い方を用いて、投影パターン像Piを投影した投影パターンPGに対応付ける。この説明のために、この実施例6では、図14に示す一例としての投影パターンPGを用いる。その投影パターンPGは、実施例3と同様に、投影部11が投影する投影パターンPGに複数の境界線BGを設けるとともに、その各境界線BGが互いに交わることを防止したものとする。投影パターンPGは、3値レベルの輝度値(m=3)によりコード化して3種類のストライプSを用いるものとして輝度値別に1、2、3のコードを割り振っている。投影パターンPGは、6(3×(3−1))本のストライプSから為る周期性領域Arを10個繰り返し配して形成している。この投影パターンPGでは、第1方向D1および第2方向D2に対して傾斜する2本の境界線BGを設けている。この各境界線BGは、当該各境界線BGの上側(第1方向D1一方側)と下側(第1方向D1他方側)とで各ストライプSの位置を1列分だけ第2方向D2にずらして形成している。図14に示す例では、上側に位置する境界線BGを、左上の角部から境界線BGを外形線における第1方向D1に伸びる右側の辺の中点を架け渡して設け、下側に位置する境界線BGを、右下の角部から境界線BGを外形線における第1方向D1に伸びる左側の辺の中点を架け渡して設けている。このため、投影パターンPGでは、第2方向D2に並列する各ストライプSの群が2本の境界線BGにより3段階に分けられている。この投影パターンPGでは、1段目と3段目の各ストライプSの並びを等しくし、2段目各ストライプSの並びを1段目と3段目とに対して1列分だけ第2方向D2にずらしている。   In the three-dimensional shape measuring apparatus 10 according to the sixth embodiment, the distance calculation unit 15 of the control unit 13 includes the distance k1 to the boundary line BG viewed in the first direction D1 and the boundary line BG viewed in the second direction D2. Using the shorter one of the intervals k2, the projection pattern image Pi is associated with the projected pattern PG. For this explanation, in the sixth embodiment, a projection pattern PG as an example shown in FIG. 14 is used. Similar to the third embodiment, the projection pattern PG is provided with a plurality of boundary lines BG on the projection pattern PG projected by the projection unit 11 and prevents the boundary lines BG from crossing each other. The projection pattern PG is coded with three-level luminance values (m = 3) and uses three types of stripes S, and codes 1, 2, and 3 are assigned to the luminance values. The projection pattern PG is formed by repeatedly arranging 10 periodic regions Ar formed by 6 (3 × (3-1)) stripes S. In the projection pattern PG, two boundary lines BG that are inclined with respect to the first direction D1 and the second direction D2 are provided. Each boundary line BG has the position of each stripe S in the second direction D2 by one column on the upper side (first direction D1 one side) and the lower side (first direction D1 other side) of the boundary line BG. They are staggered. In the example shown in FIG. 14, the boundary line BG located on the upper side is provided across the middle point of the right side extending in the first direction D1 of the outline from the upper left corner, and positioned on the lower side. The boundary line BG is provided across the midpoint of the left side extending from the lower right corner to the boundary line BG in the first direction D1 of the outline. For this reason, in the projection pattern PG, each group of stripes S arranged in parallel in the second direction D2 is divided into three stages by two boundary lines BG. In this projection pattern PG, the arrangement of the stripes S in the first stage and the third stage is made equal, and the arrangement of the stripes S in the second stage is the second direction by one column with respect to the first stage and the third stage. Shifted to D2.

実施例6の三次元形状測定装置10では、撮像部12が取得した画像Iの投影パターン像Piが写し出された領域をコード化する際、各ストライプ像Siを示す画素毎に境界線BGまでの第1方向D1で見た間隔k1と第2方向D2で見た間隔k2とを求める。このことは、制御部13の距離算出部15が、検出した投影パターン像Piにおけるエッジを用いて、各ストライプ像Siを示す画素毎に第1方向D1および第2方向D2で見た境界線BGまでの間隔kを求めることにより行うことができる。その後、距離算出部15は、注目点dsを設定すると、当該注目点dsから第1方向D1と第2方向D2とで境界線BGまでの間隔kが短い方を求める。そして、距離算出部15は、第1方向D1で見た境界線BGまでの間隔k1と第2方向D2で見た境界線BGまでの間隔k2とのうちの短い方を用いて、投影パターン像Piを投影した投影パターンPGに対応付ける。なお、距離算出部15は、第1方向D1または第2方向D2で見た一方のみに境界線BGが位置する場合には、その一方の方向で見た境界線BGまでの間隔kを用いて、投影パターン像Piを投影した投影パターンPGに対応付ける。   In the three-dimensional shape measuring apparatus 10 according to the sixth embodiment, when coding the region where the projection pattern image Pi of the image I acquired by the imaging unit 12 is projected, the pixels up to the boundary line BG are displayed for each pixel indicating each stripe image Si. An interval k1 viewed in the first direction D1 and an interval k2 viewed in the second direction D2 are obtained. This is because the distance calculation unit 15 of the control unit 13 uses the edge in the detected projection pattern image Pi, and the boundary line BG viewed in the first direction D1 and the second direction D2 for each pixel indicating each stripe image Si. This can be done by obtaining the interval k. Thereafter, when the attention point ds is set, the distance calculation unit 15 obtains a shorter interval k from the attention point ds to the boundary line BG in the first direction D1 and the second direction D2. Then, the distance calculation unit 15 uses the shorter one of the interval k1 to the boundary line BG viewed in the first direction D1 and the interval k2 to the boundary line BG viewed in the second direction D2, and uses the shorter one. Correlate to the projection pattern PG projected Pi. When the boundary line BG is located only in one direction viewed in the first direction D1 or the second direction D2, the distance calculation unit 15 uses the interval k to the boundary line BG viewed in the one direction. The projection pattern image Pi is associated with the projected pattern PG.

このため、実施例6の三次元形状測定装置10では、第1方向D1で見た境界線BGまでの間隔k1と第2方向D2で見た境界線BGまでの間隔k2とのうちの短い方を用いて、投影パターン像Piを投影パターンPGに対応付けることができる。また、投影パターンPGでは、全ての位置に対して、第1方向D1で見て2つの境界線BGを位置させているので、全体的に第1方向D1で見た境界線BGまでの間隔k1を短いものとすることができる。   For this reason, in the three-dimensional shape measuring apparatus 10 of the sixth embodiment, the shorter one of the interval k1 to the boundary line BG viewed in the first direction D1 and the interval k2 to the boundary line BG viewed in the second direction D2. Can be used to associate the projection pattern image Pi with the projection pattern PG. Further, in the projection pattern PG, the two boundary lines BG are positioned with respect to all the positions as viewed in the first direction D1, and therefore the interval k1 to the boundary line BG viewed in the first direction D1 as a whole. Can be short.

実施例6の三次元形状測定装置10では、基本的に実施例1の三次元形状測定装置10と同様の構成であることから、基本的に実施例1と同様の効果を得ることができる。   Since the three-dimensional shape measuring apparatus 10 according to the sixth embodiment has basically the same configuration as the three-dimensional shape measuring apparatus 10 according to the first embodiment, the same effects as those of the first embodiment can be basically obtained.

それに加えて、実施例6の三次元形状測定装置10では、第1方向D1で見た境界線BGまでの間隔k1と第2方向D2で見た境界線BGまでの間隔k2とのうちの短い方を用いて、投影パターン像Piを投影パターンPGに対応付ける。このため、実施例6では、注目点dsから境界線BGまでの間隔kを求める際の演算処理を簡易なものとすることができるので、投影パターン像Piの投影パターンPGへの対応付けの演算処理を簡易なものとすることができる。これにより、実施例6では、投影パターン像Piにおける各ストライプ像Siを示す全ての画素を測定点とする深度方向距離Zの算出、すなわち三次元形状の測定を簡易なものとすることができ、それに要する時間を短縮することができる。   In addition, in the three-dimensional shape measuring apparatus 10 according to the sixth embodiment, the distance k1 to the boundary line BG viewed in the first direction D1 and the distance k2 to the boundary line BG viewed in the second direction D2 are short. Is used to associate the projection pattern image Pi with the projection pattern PG. For this reason, in the sixth embodiment, it is possible to simplify the calculation process for obtaining the interval k from the attention point ds to the boundary line BG, and therefore, the calculation of associating the projection pattern image Pi with the projection pattern PG. Processing can be simplified. Thereby, in Example 6, it is possible to simplify the calculation of the depth direction distance Z using all the pixels indicating each stripe image Si in the projection pattern image Pi, that is, the measurement of the three-dimensional shape, The time required for this can be shortened.

また、実施例6の三次元形状測定装置10では、全ての位置に対して第1方向D1で見て2つの境界線BGを位置させる投影パターンPGを用いているので、全体的に第1方向D1で見た境界線BGまでの間隔k1を短いものとすることができる。このため、実施例6では、投影パターン像Piの投影パターンPGへの対応付けの演算処理を簡易なものとすることができ、三次元形状に要する時間を短縮することができる。   Further, in the three-dimensional shape measuring apparatus 10 according to the sixth embodiment, since the projection pattern PG that positions the two boundary lines BG when viewed in the first direction D1 with respect to all positions is used, the first direction as a whole is used. The interval k1 to the boundary line BG viewed at D1 can be shortened. For this reason, in the sixth embodiment, the calculation processing for associating the projection pattern image Pi with the projection pattern PG can be simplified, and the time required for the three-dimensional shape can be shortened.

したがって、本発明に係る測定装置としての実施例6の三次元形状測定装置10では、測定可能な測定対象Oの大きさを大きくしつつ分解能の低下を防止することができる。   Therefore, in the three-dimensional shape measuring apparatus 10 of the sixth embodiment as the measuring apparatus according to the present invention, it is possible to prevent the resolution from being lowered while increasing the size of the measurable measurement object O.

なお、実施例6では、図14に示す投影パターンPGを用いているが、第1方向D1および第2方向D2に対して傾斜を為す境界線が設けられた投影パターンを用いるものであれば、実施例1から実施例5までのいずれかの投影パターンを用いてもよく、他の投影パターンを用いてもよく、実施例6の構成に限定されるものではない。   In the sixth embodiment, the projection pattern PG shown in FIG. 14 is used. However, if a projection pattern provided with a boundary line that is inclined with respect to the first direction D1 and the second direction D2 is used, Any one of the projection patterns from the first embodiment to the fifth embodiment may be used, and another projection pattern may be used, and the configuration is not limited to that of the sixth embodiment.

なお、上記した各実施例では、本発明に係る測定装置の一例としての各実施例の三次元形状測定装置10について説明したが、第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させた投影パターンを投影光軸上で測定対象に投影する投影部と、前記投影光軸とは異なる撮像光軸で前記測定対象を撮像する撮像部と、前記投影部で投影した前記投影パターンを前記撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する距離算出部と、を備え、前記投影パターンは、mを3以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプをm×(m−1)本用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を有し、前記投影パターンでは、前記第1方向で見て異なるレベルの輝度値となる境界線を設け、前記境界線を前記投影パターンにおいて前記第1方向および前記第2方向に対して傾斜する直線状に形成している測定装置であればよく、上記した各実施例に限定されるものではない。   In each of the above-described embodiments, the three-dimensional shape measurement apparatus 10 of each embodiment as an example of the measurement apparatus according to the present invention has been described. However, a plurality of stripes extending in the first direction are formed with respect to the first direction. A projection unit that projects a projection pattern arranged in parallel in the inclined second direction onto a measurement target on a projection optical axis, an imaging unit that images the measurement target with an imaging optical axis different from the projection optical axis, and the projection unit A distance calculation unit that calculates a distance from the projection pattern image captured by the imaging unit to the measurement target using a triangulation method, and the projection pattern includes m equal to or greater than 3 Using m × (m−1) stripes of m types coded with luminance values of m level as natural numbers, a set of two stripes adjacent in the second direction is arranged without overlapping. Forming A plurality of periodic regions, and the projection pattern is provided with boundary lines having different levels of luminance values when viewed in the first direction, and the boundary lines are defined in the projection pattern in the first direction and the second direction. Any measuring device may be used as long as the measuring device is linearly inclined with respect to the direction.

また、上記した各実施例では、注目点dsと境界線Bとの第2方向D2で見た間隔k2を画素数をカウントすることで求めていたが、ストライプSの本数から求めるものであってもよく、上記した各実施例に限定されるものではない。このような構成とすると、測定対象Oの基準線Lの傾斜度合や形状等に応じて各ストライプSの幅寸法が変化した場合であっても、何らの補正を加えることなく第2方向D2で見た間隔k2を求めることができる。   Further, in each of the above-described embodiments, the interval k2 between the attention point ds and the boundary line B viewed in the second direction D2 is obtained by counting the number of pixels, but is obtained from the number of stripes S. The present invention is not limited to the above-described embodiments. With such a configuration, even if the width dimension of each stripe S changes according to the degree of inclination or shape of the reference line L of the measurement object O, the second direction D2 is not corrected without any correction. The seen interval k2 can be obtained.

以上、本発明の測定装置を各実施例に基づき説明してきたが、具体的な構成については各実施例に限られるものではなく、本発明の要旨を逸脱しない限り、設計の変更や追加等は許容される。   As mentioned above, although the measuring apparatus of this invention has been demonstrated based on each Example, about a concrete structure, it is not restricted to each Example, Unless it deviates from the summary of this invention, a design change, an addition, etc. Permissible.

10 (測定装置の一例としての)三次元形状測定装置
11 投影部
12 撮像部
15 距離算出部
Ap 投影光軸
Ar 周期性領域
As 撮像光軸
B、BB、BC、BD、BE、BF、BG 境界線
D1 第1方向
D2 第2方向
Et (第1方向で見た端部の一例としての)上端部
Eb (第1方向で見た端部の一例としての)下端部
ds 注目点
H 高さ位置
h (端部から注目点までの)間隔
k (注目点から境界線までの)間隔
O 測定対象
P、PA、PB、PC、PD、PE、PF、PG 投影パターン
Pi 投影パターン像
S ストライプ
Si ストライプ像
DESCRIPTION OF SYMBOLS 10 Three-dimensional shape measuring apparatus (As an example of a measuring apparatus) 11 Projection part 12 Imaging part 15 Distance calculation part Ap Projection optical axis Ar Periodic area As Imaging optical axis B, BB, BC, BD, BE, BF, BG Line D1 First direction D2 Second direction Et Upper end portion (as an example of an end portion viewed in the first direction) Eb Lower end portion (as an example of an end portion viewed in the first direction) ds Attention point H Height position h Distance from the edge to the point of interest k Distance from the point of interest to the boundary O Measurement object P, PA, PB, PC, PD, PE, PF, PG Projection pattern Pi Projection pattern image S Stripe Si stripe image

特許4433907号公報Japanese Patent No. 4433907 特開2003−83730号公報JP 2003-83730 A 特開2002−131031号公報JP 2002-131031 A

Claims (14)

第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させた投影パターンを投影光軸上で測定対象に投影する投影部と、
前記投影光軸とは異なる撮像光軸で前記測定対象を撮像する撮像部と、
前記投影部で投影した前記投影パターンを前記撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する距離算出部と、を備え、
前記投影パターンは、mを3以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプをm×(m−1)本用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を有し、
前記投影パターンでは、前記第1方向で見て異なるレベルの輝度値となる境界線を設け、前記境界線を前記投影パターンにおいて前記第1方向および前記第2方向に対して傾斜する直線状に形成していることを特徴とする測定装置。
A projection unit configured to project a projection pattern in which a plurality of stripes extending in the first direction are arranged in parallel in a second direction inclined with respect to the first direction onto a measurement target on the projection optical axis;
An imaging unit that images the measurement object with an imaging optical axis different from the projection optical axis;
A distance calculation unit that calculates a distance from the projection pattern image projected by the projection unit to the measurement target using a triangulation method from a projection pattern image captured by the imaging unit;
The projection pattern uses m × (m−1) stripes of m types coded with luminance values of m value level, where m is a natural number of 3 or more, and two adjacent projections in the second direction. A plurality of periodic regions formed by arranging the stripe sets without overlapping,
In the projection pattern, boundary lines having different levels of luminance values when viewed in the first direction are provided, and the boundary lines are formed in a straight line inclined with respect to the first direction and the second direction in the projection pattern. A measuring device characterized by that.
前記距離算出部は、少なくとも、前記投影パターン像において注目した注目点の前記第1方向で見た前記境界線までの間隔と、前記注目点の前記第2方向で見た前記境界線までの間隔と、のいずれか一方を用いて、前記注目点の前記投影パターンとの対応付けを行うことを特徴とする請求項1に記載の測定装置。   The distance calculation unit includes at least an interval to the boundary line viewed in the first direction of the target point of interest in the projection pattern image, and an interval to the boundary line viewed in the second direction of the target point. The measurement apparatus according to claim 1, wherein the target point is associated with the projection pattern by using any one of the method. 前記距離算出部は、前記投影パターン像において注目した注目点の前記第1方向で見た前記境界線までの間隔と、前記注目点の前記第2方向で見た前記境界線までの間隔と、の双方を用いて、前記注目点の前記投影パターンとの対応付けを行うことを特徴とする請求項1に記載の測定装置。   The distance calculation unit, an interval to the boundary line seen in the first direction of the attention point noted in the projection pattern image, an interval to the boundary line seen in the second direction of the attention point, The measurement apparatus according to claim 1, wherein both are used to associate the attention point with the projection pattern. 前記距離算出部は、前記投影パターン像において注目した注目点の前記第1方向で見た前記境界線までの間隔と、前記注目点の前記第2方向で見た前記境界線までの間隔と、のうちの小さい方を用いて、前記注目点の前記投影パターンとの対応付けを行うことを特徴とする請求項1に記載の測定装置。   The distance calculation unit, an interval to the boundary line seen in the first direction of the attention point noted in the projection pattern image, an interval to the boundary line seen in the second direction of the attention point, The measuring apparatus according to claim 1, wherein the smaller one of the two is used to associate the attention point with the projection pattern. 前記距離算出部は、前記投影パターン像における前記第1方向で見た端部から前記注目点までの間隔から、前記投影パターンにおける前記注目点の高さ位置を求めることを特徴とする請求項2から請求項4のいずれか1項に記載の測定装置。   The distance calculation unit obtains a height position of the attention point in the projection pattern from an interval from an end portion viewed in the first direction in the projection pattern image to the attention point. The measuring device according to claim 1. 前記投影パターンでは、前記境界線を複数設けていることを特徴とする請求項1から請求項5のいずれか1項に記載の測定装置。   The measuring apparatus according to claim 1, wherein a plurality of the boundary lines are provided in the projection pattern. 前記投影パターンでは、前記第2方向での位置に拘わらず前記第2方向で隣接する3本の前記ストライプにおいて、中央に位置する前記ストライプの輝度値を極値とすべく前記各ストライプを配列していることを特徴とする請求項1から請求項6のいずれか1項に記載の測定装置。   In the projected pattern, each of the three stripes adjacent in the second direction is arranged so that the luminance value of the stripe located in the center is an extreme value regardless of the position in the second direction. The measuring apparatus according to claim 1, wherein the measuring apparatus is provided. 前記投影パターンでは、前記境界線を複数設けるとともに前記各境界線が交わらないこととし、かつ、前記投影パターン像において、前記第2方向での総画素数をαとし、前記境界線の本数をβとし、前記各ストライプを前記撮像部で撮像した各ストライプ像の前記第2方向での画素数をγとして、式(1)を満たすことを特徴とする請求項1から請求項7のいずれか1項に記載の測定装置。
α/β=m×(m−1)×γ ・・・(1)
In the projection pattern, a plurality of the boundary lines are provided and the boundary lines do not intersect with each other. In the projection pattern image, the total number of pixels in the second direction is α, and the number of the boundary lines is β Any one of Claims 1 to 7 satisfy | filling Formula (1) by making into γ the pixel number in the said 2nd direction of each stripe image which imaged each said stripe with the said imaging part. The measuring device according to item.
α / β = m × (m−1) × γ (1)
前記投影部は、無彩色の前記投影パターンを投影することを特徴とする請求項1から請求項8のいずれか1項に記載の測定装置。   The measurement apparatus according to claim 1, wherein the projection unit projects the achromatic projection pattern. 前記投影部は、有彩色の前記投影パターンを投影することを特徴とする請求項1から請求項8のいずれか1項に記載の測定装置。   The measurement apparatus according to claim 1, wherein the projection unit projects the projection pattern having a chromatic color. 前記投影部は、R、G、Bの3つの色成分のそれぞれを単独で用いることで3種類の前記ストライプを形成して前記投影パターンを投影することを特徴とする請求項10に記載の測定装置。   The measurement according to claim 10, wherein the projection unit projects the projection pattern by forming three types of the stripes by using each of the three color components of R, G, and B independently. apparatus. 第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させた投影パターンを投影光軸上で測定対象に投影する投影部と、
前記投影光軸とは異なる撮像光軸で前記測定対象を撮像する撮像部と、
前記投影部で投影した前記投影パターンを前記撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する距離算出部と、を備え、
前記投影パターンは、mを2以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプを用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を有し、
前記投影パターンでは、前記第1方向で見て異なるレベルの輝度値となる境界線を設け、前記境界線を前記投影パターンにおいて前記第1方向および前記第2方向に対して傾斜する直線状に形成していることを特徴とする測定装置。
A projection unit configured to project a projection pattern in which a plurality of stripes extending in the first direction are arranged in parallel in a second direction inclined with respect to the first direction onto a measurement target on the projection optical axis;
An imaging unit that images the measurement object with an imaging optical axis different from the projection optical axis;
A distance calculation unit that calculates a distance from the projection pattern image projected by the projection unit to the measurement target using a triangulation method from a projection pattern image captured by the imaging unit;
In the projection pattern, m is a natural number of 2 or more, and m kinds of the stripes coded with luminance values at an m-value level are used to overlap a set of two stripes adjacent in the second direction. Having a plurality of periodic regions formed in an array,
In the projection pattern, boundary lines having different levels of luminance values when viewed in the first direction are provided, and the boundary lines are formed in a straight line inclined with respect to the first direction and the second direction in the projection pattern. A measuring device characterized by that.
投影部が測定対象に投影した投影パターンを撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する測定装置で用いる投影パターンであって、
第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させて構成され、
mを3以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプをm×(m−1)本用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を備え、
前記第1方向で見て異なるレベルの輝度値となる境界線が設けられ、
前記境界線が、前記第1方向および前記第2方向に対して傾斜する直線状に形成されていることを特徴とする投影パターン。
A projection pattern used in a measurement apparatus that calculates a distance from the projection pattern image captured by the imaging unit to the measurement target using a triangulation method from the projection pattern image captured by the imaging unit.
A plurality of stripes extending in a first direction are arranged in parallel in a second direction inclined with respect to the first direction;
Using m × (m−1) stripes of m types coded with a luminance value of m value level, where m is a natural number of 3 or more, a set of two stripes adjacent in the second direction is used. Provided with a plurality of periodic regions formed in an array without overlapping,
A boundary line is provided that has different levels of luminance values when viewed in the first direction,
The projection pattern, wherein the boundary line is formed in a straight line inclined with respect to the first direction and the second direction.
投影部が測定対象に投影した投影パターンを撮像部で撮像した投影パターン像から三角測量法を用いて前記測定対象までの距離を算出する測定装置で用いる投影パターンであって、
第1方向に伸びる複数のストライプを前記第1方向に対して傾斜する第2方向に並列させて構成され、
mを2以上の自然数として、m値レベルの輝度値でコード化したm種類の前記ストライプを用いて、前記第2方向で隣接する2本の前記ストライプの組を重複させることなく配列して形成した複数の周期性領域を備え、
前記第1方向で見て異なるレベルの輝度値となる境界線が設けられ、
前記境界線が、前記第1方向および前記第2方向に対して傾斜する直線状に形成されていることを特徴とする投影パターン。
A projection pattern used in a measurement apparatus that calculates a distance from the projection pattern image captured by the imaging unit to the measurement target using a triangulation method from the projection pattern image captured by the imaging unit.
A plurality of stripes extending in a first direction are arranged in parallel in a second direction inclined with respect to the first direction;
Using m kinds of stripes coded with luminance values of m-value level, where m is a natural number of 2 or more, a set of two stripes adjacent in the second direction is arranged without overlapping. A plurality of periodic regions,
A boundary line is provided that has different levels of luminance values when viewed in the first direction,
The projection pattern, wherein the boundary line is formed in a straight line inclined with respect to the first direction and the second direction.
JP2014213088A 2014-10-17 2014-10-17 Measuring device, projection pattern Pending JP2016080545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014213088A JP2016080545A (en) 2014-10-17 2014-10-17 Measuring device, projection pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014213088A JP2016080545A (en) 2014-10-17 2014-10-17 Measuring device, projection pattern

Publications (1)

Publication Number Publication Date
JP2016080545A true JP2016080545A (en) 2016-05-16

Family

ID=55958367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014213088A Pending JP2016080545A (en) 2014-10-17 2014-10-17 Measuring device, projection pattern

Country Status (1)

Country Link
JP (1) JP2016080545A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180041552A (en) * 2016-10-14 2018-04-24 울산대학교 산학협력단 Non-contact gap measurement apparatus using monocular multi-line laser sensor and method thereof
US10775502B2 (en) 2016-11-10 2020-09-15 Ricoh Company, Ltd Distance-measuring apparatus, mobile object, robot, three-dimensional measuring device, surveillance camera, and distance-measuring method
JP2021524908A (en) * 2018-05-03 2021-09-16 ザ ガバニング カウンシル オブ ザ ユニバーシティ オブ トロント Methods and systems for optimizing depth imaging

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180041552A (en) * 2016-10-14 2018-04-24 울산대학교 산학협력단 Non-contact gap measurement apparatus using monocular multi-line laser sensor and method thereof
KR101889497B1 (en) * 2016-10-14 2018-08-17 울산대학교 산학협력단 Non-contact gap measurement apparatus using monocular multi-line laser sensor and method thereof
US10775502B2 (en) 2016-11-10 2020-09-15 Ricoh Company, Ltd Distance-measuring apparatus, mobile object, robot, three-dimensional measuring device, surveillance camera, and distance-measuring method
JP2021524908A (en) * 2018-05-03 2021-09-16 ザ ガバニング カウンシル オブ ザ ユニバーシティ オブ トロント Methods and systems for optimizing depth imaging
JP7296138B2 (en) 2018-05-03 2023-06-22 ザ ガバニング カウンシル オブ ザ ユニバーシティ オブ トロント Method and system for optimizing depth imaging

Similar Documents

Publication Publication Date Title
JP6796602B2 (en) Cameras and techniques for 3D measurement of dental objects
US9230326B1 (en) System, method and calibration plate employing embedded 2D data codes as self-positioning fiducials
US11330243B2 (en) System and method for 3D scanning
JP6706904B2 (en) Method for determining correction coefficient for three-dimensional display device and three-dimensional display device using the method
JP6484072B2 (en) Object detection device
JP5742753B2 (en) Luminance measuring device
KR101053506B1 (en) Method for adjusting parameters in distortion calibration of image acquired by camera having fish eye lens
EP2813827B1 (en) Brightness measurement method, brightness measurement device, and image quality adjustment technology using same
CN111256662A (en) Position information acquisition device, position information acquisition method, recording medium, and position information acquisition system
KR101783229B1 (en) Image processing apparatus and method for controlling image processing apparatus
JP2003042735A (en) Method and apparatus for three-dimensional measurement as well as computer program
US11073689B2 (en) Method and system for calibrating a wearable heads-up display to produce aligned virtual images in an eye space
JP2016080545A (en) Measuring device, projection pattern
US11182918B2 (en) Distance measurement device based on phase difference
KR20180038942A (en) Method of length measurement for 2d photography
JP2012194126A5 (en)
US20040258297A1 (en) 3D color information acquisition method and 3D color information acquisition device
US10326954B2 (en) Image sensor for focus detection
CN108538246A (en) Display screen matrix data capture method and device, pixel compensation method and system
JP5696107B2 (en) Image processing apparatus, method, program, and stereoscopic image display apparatus
CN109756667B (en) Position acquisition system, position acquisition device, position acquisition method, and recording medium
JP2012068691A (en) Optical information reading device
JP2013084031A (en) Marker, two-dimensional code, recognition method for marker, and recognition method for two-dimensional code
JP2020182127A (en) Calibration device, calibration system, and calibration method of display device
JP5743433B2 (en) 3D shape measuring device