Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7276166B2 - Three-dimensional measuring device - Google Patents
[go: Go Back, main page]

JP7276166B2 - Three-dimensional measuring device - Google Patents

Three-dimensional measuring device Download PDF

Info

Publication number
JP7276166B2
JP7276166B2 JP2020003850A JP2020003850A JP7276166B2 JP 7276166 B2 JP7276166 B2 JP 7276166B2 JP 2020003850 A JP2020003850 A JP 2020003850A JP 2020003850 A JP2020003850 A JP 2020003850A JP 7276166 B2 JP7276166 B2 JP 7276166B2
Authority
JP
Japan
Prior art keywords
luminance value
image
color
phase
projection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020003850A
Other languages
Japanese (ja)
Other versions
JP2021110680A (en
Inventor
勇士 小寺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2020003850A priority Critical patent/JP7276166B2/en
Publication of JP2021110680A publication Critical patent/JP2021110680A/en
Application granted granted Critical
Publication of JP7276166B2 publication Critical patent/JP7276166B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

位相シフト法で計測対象物の三次元形状を計測する三次元計測装置に関する。 The present invention relates to a three-dimensional measuring device that measures the three-dimensional shape of an object using a phase shift method.

計測対象物の三次元形状等を計測する三次元計測装置として、位相シフト法を用いる装置が知られている。位相シフト法は位相をずらした複数枚の縞パターン画像を投影し三角測量を行う手法である。 A device using a phase shift method is known as a three-dimensional measuring device for measuring the three-dimensional shape of an object to be measured. The phase shift method is a technique for performing triangulation by projecting a plurality of phase-shifted fringe pattern images.

特許文献1は、三次元計測装置を用いた三次元形状の計測に要する時間の短縮を図る手法を開示している。特許文献1に開示されている三次元計測装置は、各位相の縞を異なる波長の光(例として赤、緑、青)に割り当て、これを合成した縞パターン画像を計測対象物に投影する。この縞パターン画像を投影している計測対象物をカラーカメラで撮影する。そして、撮影した画像から、各色成分を抽出することで1回の撮影で位相算出を行う。 Patent Literature 1 discloses a technique for shortening the time required to measure a three-dimensional shape using a three-dimensional measuring device. The three-dimensional measurement apparatus disclosed in Patent Document 1 assigns the fringes of each phase to light of different wavelengths (eg, red, green, and blue), and projects a fringe pattern image obtained by synthesizing these onto a measurement object. The object to be measured on which this fringe pattern image is projected is photographed with a color camera. Then, by extracting each color component from the photographed image, phase calculation is performed in one photographing.

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

物体認識あるいは形状認識精度の向上、視認性の向上等のために、物体の三次元計測に加えて物体の二次元画像を撮影したいという要求がある。なお、本明細書では、二次元画像は、縞パターンを積極的に生じさせてはいない状態で撮影した画像を意味する。たとえば、二次元画像は、白色光照射あるいは自然光下などで撮影した画像である。二次元画像を撮影するためには、縞模様の光を投影して撮影する前後に、別途、二次元画像を撮影することが考えられる。 In addition to three-dimensional measurement of an object, there is a demand for photographing a two-dimensional image of the object in order to improve the accuracy of object recognition or shape recognition, improve visibility, and the like. Note that in this specification, a two-dimensional image means an image captured in a state in which a striped pattern is not actively generated. For example, a two-dimensional image is an image captured under white light irradiation or natural light. In order to capture a two-dimensional image, it is conceivable to separately capture a two-dimensional image before and after capturing by projecting the striped light.

しかし、このようにすると、三次元計測をするために縞模様の光を投影して撮影する時刻と、二次元画像を撮影する時刻とが一致しないことになる。その結果、物体がロボット等の形状に時間変化がある場合や、物体が移動する場合には、三次元画像と二次元画像とで物体の形状や位置が異なることになり、画像処理が困難または計算処理が増加してしまう恐れがあった。 However, if this is done, the time at which the striped light is projected for three-dimensional measurement and the time at which the two-dimensional image is captured will not match. As a result, when the shape of an object such as a robot changes over time, or when the object moves, the shape and position of the object will differ between the 3D image and the 2D image, making image processing difficult or difficult. There was a fear that the calculation processing would increase.

本開示は、この事情に基づいて成されたものであり、その目的は、一度の撮影で三次元計測と二次元画像取得を行うことができる三次元計測装置を提供することにある。 The present disclosure has been made based on this situation, and an object thereof is to provide a three-dimensional measuring apparatus capable of performing three-dimensional measurement and obtaining a two-dimensional image in one shot.

上記目的は独立請求項に記載の特徴の組み合わせにより達成され、また、下位請求項は更なる有利な具体例を規定する。特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、開示した技術的範囲を限定するものではない。 The above objects are achieved by the combination of features stated in the independent claims, and the sub-claims define further advantageous embodiments. The symbols in parentheses described in the claims indicate the corresponding relationship with specific means described in the embodiments described later as one aspect, and do not limit the disclosed technical scope.

上記目的を達成するための三次元計測装置は、
複数の単色縞パターン画像が合成された合成縞パターン画像を投影するプロジェクタ(20)と、
計測対象物に投影された合成縞パターン画像をカラーで撮影するカメラ(30)とを備え、
カメラが撮影した画像に基づいて、位相シフト法により計測対象物の三次元形状を計測する三次元計測装置であって、
プロジェクタから計測対象物に向けて合成縞パターン画像を投影させる投影制御部(S11)と、
合成縞パターン画像が計測対象物に投影されている状態をカメラが撮影した撮影画像の輝度値であって、カメラが備える複数色のカラーフィルタにそれぞれ対応した色画素別の撮影画像の輝度値を取得する撮影画像取得部(S12)と、
撮影画像取得部が取得した色画素別の撮影画像の輝度値に基づいて、画素別に輝度値の位相を算出する位相算出部(S14)と、
位相算出部が算出した位相に基づいて、計測対象物の三次元座標を決定する座標決定部(S15、S16)と、
位相算出部が算出した画素別の位相に基づいて、計測対象物上に投影された合成縞パターン画像の色画素別の投影輝度値(I)を決定する投影輝度決定部(S22)と、
投影輝度決定部が決定した投影輝度値を予め設定した一定輝度値にするための補正係数を、色画素別の撮影画像の輝度値(I)に乗じる補正をすることで、二次元画像を生成する補正部(S24、S24-1)と、を備える。
A three-dimensional measuring device for achieving the above purpose is
a projector (20) for projecting a composite striped pattern image obtained by combining a plurality of single-color striped pattern images;
A camera (30) for capturing in color the composite fringe pattern image projected onto the measurement object,
A three-dimensional measuring device that measures the three-dimensional shape of an object to be measured by a phase shift method based on an image captured by a camera,
a projection control unit (S11) for projecting a composite fringe pattern image from the projector toward the measurement object;
The luminance value of the photographed image captured by the camera in which the composite stripe pattern image is projected onto the measurement object, and is the luminance value of the photographed image for each color pixel corresponding to each of the multiple color filters provided in the camera. a captured image acquisition unit (S12) to acquire;
a phase calculation unit (S14) that calculates the phase of the luminance value for each pixel based on the luminance value of the captured image for each color pixel acquired by the captured image acquisition unit;
A coordinate determination unit (S15, S16) that determines the three-dimensional coordinates of the measurement object based on the phase calculated by the phase calculation unit;
a projection brightness determination unit (S22) that determines a projection brightness value (I f ) for each color pixel of the composite fringe pattern image projected onto the measurement object based on the phase for each pixel calculated by the phase calculation unit;
The brightness value (I b ) of the captured image for each color pixel is multiplied by a correction coefficient for making the projection brightness value determined by the projection brightness determination unit a predetermined constant brightness value, thereby correcting the two-dimensional image. and a correction unit (S24, S24-1) for generating.

この三次元計測装置では、合成縞パターン画像を計測対象物に投影し、カメラにより、そのときの計測対象物の画像を撮影する。そして、カメラが撮影した撮影画像から色画素別の撮影画像の輝度値を取得する。これにより、位相シフト法が適用できるので、計測対象物の三次元座標を決定できる。 In this three-dimensional measuring device, a composite fringe pattern image is projected onto an object to be measured, and an image of the object to be measured at that time is captured by a camera. Then, the luminance value of the captured image for each color pixel is acquired from the captured image captured by the camera. Accordingly, since the phase shift method can be applied, the three-dimensional coordinates of the object to be measured can be determined.

さらに、この三次元計測装置は、計測対象物の三次元形状を計測するために算出している画素別の位相を利用し、計測対象物上に投影される合成縞パターン画像の色画素別の投影輝度値を決定している。そして、この投影輝度値を一定輝度値にするための補正係数を、色画素別の撮影画像の輝度値に乗じる補正をすることにより、二次元画像を生成している。 Furthermore, this three-dimensional measurement apparatus utilizes the phase for each pixel calculated to measure the three-dimensional shape of the object to be measured, and the phase for each color pixel of the composite fringe pattern image projected onto the object to be measured. Determines the projection luminance value. A two-dimensional image is generated by multiplying the luminance value of the captured image for each color pixel by a correction coefficient for making the projection luminance value a constant luminance value.

このように、合成縞パターン画像を投影して撮影した画像を補正して二次元画像を生成するので、一度の撮影で三次元計測と二次元画像取得とを行うことができる。 In this manner, since a two-dimensional image is generated by correcting an image captured by projecting a composite fringe pattern image, three-dimensional measurement and acquisition of a two-dimensional image can be performed in a single image capturing.

補正係数は、投影輝度決定部が決定した投影輝度値を、単色縞パターン画像の最高輝度値にするための補正係数とすることができる。 The correction coefficient can be a correction coefficient for making the projection luminance value determined by the projection luminance determination unit the maximum luminance value of the monochromatic stripe pattern image.

補正係数をこのような係数にすると、補正係数を用いた補正により得られる二次元画像を、明るく視認性のよい画像にすることができる。 When the correction coefficients are set to such coefficients, the two-dimensional image obtained by correction using the correction coefficients can be bright and highly visible.

投影輝度決定部は、位相から投影輝度値が算出できる予め設定された計算式に、位相算出部が算出した位相を代入して投影輝度値を決定することができる。 The projection brightness determination unit can determine the projection brightness value by substituting the phase calculated by the phase calculation unit into a preset calculation formula that can calculate the projection brightness value from the phase.

投影輝度値は、プロジェクタから投影する画像の輝度値である。よって、単色縞パターンの輝度変化を計算式により表しておけば、その計算式から投影輝度値を決定することができる。 The projection brightness value is the brightness value of the image projected from the projector. Therefore, if the brightness change of the monochromatic stripe pattern is represented by a formula, the projected brightness value can be determined from the formula.

投影輝度決定部は、位相から投影輝度値が定まるテーブルまたはグラフと、位相算出部が算出した位相とに基づいて、投影輝度値を決定することができる。 The projection brightness determination section can determine the projection brightness value based on a table or graph in which the projection brightness value is determined from the phase and the phase calculated by the phase calculation section.

テーブルまたはグラフであれば、色画素間の明るさが異なっているなどの実環境で生じる変動に対応した精度のよいテーブルまたはグラフを作成することができる。よって、実環境に応じた精度のよい投影輝度値を決定することができる。 If it is a table or a graph, it is possible to create a highly accurate table or graph that corresponds to fluctuations that occur in the actual environment, such as differences in brightness between color pixels. Therefore, it is possible to determine the projection brightness value with high accuracy according to the actual environment.

さらに、三次元計測装置は、
カメラが単色画像を撮影した場合に、カメラが備える複数色のカラーフィルタにそれぞれ対応した色画素により検出される輝度値の比を示す輝度値比を、色画素別に表した輝度値比テーブルを記憶するテーブル記憶部(11)と、
撮影画像取得部が取得した色画素別の撮影画像の輝度値と、輝度値比テーブルが示す輝度値比とに基づいて、色画素別の撮影画像の輝度値から他色成分の輝度値を除去する補正をする他色除去部(S12-1)と、を備え、
補正部(S24-1)は、補正係数を乗じる輝度値を、他色除去部が補正した後の色画素別の輝度値とする、ことができる。
Furthermore, the three-dimensional measuring device
Stores a luminance value ratio table that expresses, for each color pixel, the luminance value ratio that indicates the ratio of the luminance values detected by the color pixels corresponding to the color filters of a plurality of colors provided in the camera when the camera captures a monochrome image. a table storage unit (11) for
Based on the brightness value of the captured image for each color pixel acquired by the captured image acquisition unit and the brightness value ratio indicated by the brightness value ratio table, the brightness values of other color components are removed from the brightness values of the captured image for each color pixel. and a other color removal unit (S12-1) that corrects to
The correction unit (S24-1) can set the luminance value to be multiplied by the correction coefficient as the luminance value for each color pixel after correction by the other color removal unit.

このようにすれば、補正係数を乗じる輝度値は、他色成分の輝度値が除去された輝度値になることから、二次元画像を、投影される合成縞パターンの影響がより軽減された画像にすることができる。 In this way, the luminance value to be multiplied by the correction coefficient is the luminance value from which the luminance values of the other color components are removed, so that the two-dimensional image is an image in which the effect of the projected composite fringe pattern is further reduced. can be

第1実施形態の三次元計測装置1の構成を示す図である。It is a figure which shows the structure of the three-dimensional measuring device 1 of 1st Embodiment. 標準縞パターン画像を示す図である。It is a figure which shows a standard striped pattern image. 同じy画素座標上における各単色縞パターン画像の輝度値の変化を示す図である。It is a figure which shows the change of the luminance value of each monochromatic striped pattern image on the same y pixel coordinate. 第1実施形態における三次元形状を計測する処理を示す図である。It is a figure which shows the process which measures a three-dimensional shape in 1st Embodiment. 位相θと高さ座標zとの関係を示すグラフである。It is a graph which shows the relationship between phase (theta) and height coordinate zm . 水平座標(x、y)の算出方法を説明する図である。It is a figure explaining the calculation method of a horizontal coordinate ( xm , ym ). 第1実施形態における二次元画像生成処理を示す図である。It is a figure which shows the two-dimensional image generation process in 1st Embodiment. 第2実施形態の三次元計測装置100の構成を示す図である。It is a figure which shows the structure of the three-dimensional measuring device 100 of 2nd Embodiment. 単色縞パターン画像を撮影したときのx画素座標に対する輝度値の変化を示す図である。It is a figure which shows the change of the luminance value with respect to x pixel coordinate when imaging|photographing a single-color striped pattern image. 標準縞ターン画像を撮影したときのx画素座標に対する輝度値の変化を示す図である。FIG. 10 is a diagram showing changes in luminance value with respect to x-pixel coordinates when a standard striped turn image is captured; 輝度値比テーブル生成方法を示す図である。It is a figure which shows the luminance value ratio table generation method. 図11のS32で決定する輝度値比の一例を示す図である。FIG. 12 is a diagram showing an example of a luminance value ratio determined in S32 of FIG. 11; 図11のS35で生成する輝度値比テーブルの一例を示す図である。FIG. 12 is a diagram showing an example of a luminance value ratio table generated in S35 of FIG. 11; FIG. 輝度値比テーブルを用いた補正による効果を示す図である。It is a figure which shows the effect by correction|amendment using a luminance value ratio table. 第1実施形態における三次元形状を計測する処理を示す図である。It is a figure which shows the process which measures a three-dimensional shape in 1st Embodiment. 第1実施形態における二次元画像生成処理を示す図である。It is a figure which shows the two-dimensional image generation process in 1st Embodiment.

<第1実施形態>
以下、実施形態を図面に基づいて説明する。図1は、第1実施形態の三次元計測装置1の構成を示す図である。三次元計測装置1は、制御装置10と、プロジェクタ20と、カメラ30とを備えている。三次元計測装置1は、作業台2の上に置かれた計測対象物5の三次元形状を位相シフト法により計測する。また、この三次元計測装置1は、計測対象物5の二次元画像も生成する。二次元画像は、プロジェクタ20から画像を投影していない状態あるいは輝度変化のない単色光を投影している状態で、計測対象物5をカメラ30で撮影した画像である。
<First embodiment>
Hereinafter, embodiments will be described based on the drawings. FIG. 1 is a diagram showing the configuration of a three-dimensional measuring device 1 according to the first embodiment. The three-dimensional measuring device 1 includes a control device 10, a projector 20, and a camera 30. A three-dimensional measurement apparatus 1 measures the three-dimensional shape of a measurement object 5 placed on a workbench 2 using a phase shift method. The three-dimensional measuring device 1 also generates a two-dimensional image of the object 5 to be measured. The two-dimensional image is an image of the measurement object 5 photographed by the camera 30 while the projector 20 is not projecting an image or is projecting monochromatic light with no luminance change.

作業台2の上面は平面であり、作業台2の任意の位置に計測対象物5が位置する。三次元計測装置1は、たとえば、ロボットにピッキング、組付け作業、製品検査等を行わせる際のロボットの目として利用する。 The upper surface of the workbench 2 is flat, and the object 5 to be measured is positioned at an arbitrary position on the workbench 2 . The three-dimensional measuring device 1 is used, for example, as the eyes of a robot when the robot is caused to perform picking, assembly work, product inspection, and the like.

制御装置10は、コンピュータを備えたものとすることができる。制御装置10は、プロジェクタ20が投影する画像のデータとなる画像データを生成してプロジェクタ20へ出力する。プロジェクタ20が投影する画像には、縞パターン画像がある。 The controller 10 can be equipped with a computer. Control device 10 generates image data, which is data of an image projected by projector 20 , and outputs the image data to projector 20 . The image projected by the projector 20 includes a striped pattern image.

また、制御装置10は、プロジェクタ20から縞パターン画像が計測対象物5に投影された状態で、カメラ30が撮影した画像を表す画像データを取得する。そして、その画像データをもとに位相シフト法により、計測対象物5の三次元形状を計測する。 Further, the control device 10 acquires image data representing an image captured by the camera 30 while the stripe pattern image is projected from the projector 20 onto the measurement object 5 . Then, based on the image data, the three-dimensional shape of the measurement object 5 is measured by the phase shift method.

三次元形状を計測するために、プロジェクタ20が計測対象物5に投影する縞パターン画像は、図2に示す標準縞パターン画像である。標準縞パターン画像は、赤、緑、青ともに、0から255までの輝度範囲で輝度を変化させた3色の単色縞パターン画像を合成した縞パターン画像である。標準縞パターン画像は、合成縞パターン画像の一例である。 The stripe pattern image projected onto the measurement object 5 by the projector 20 in order to measure the three-dimensional shape is the standard stripe pattern image shown in FIG. The standard striped pattern image is a striped pattern image obtained by synthesizing three-color single-color striped pattern images in which the brightness is changed in a brightness range of 0 to 255 for each of red, green, and blue. The standard striped pattern image is an example of a composite striped pattern image.

単色縞パターン画像は、赤、緑、青のいずれか1色の輝度が画像の一方向には正弦波状に変化し、その一方向と直交する方向は輝度が一定である画像である。また、標準縞パターン画像は、3色の単色縞パターン画像の位相が所定の角度だけずれている。 A monochromatic striped pattern image is an image in which the luminance of any one of red, green, and blue varies sinusoidally in one direction of the image, and the luminance is constant in the direction perpendicular to the one direction. Further, the standard striped pattern image is such that the phases of the three-color single-color striped pattern images are shifted by a predetermined angle.

一例としては、赤色の単色縞パターン画像の位相が最も進んでおり、緑色の単色縞パターン画像の位相がそれよりも2π/3遅れている。青色の単色縞パターン画像は、緑色の単色縞パターン画像よりもさらに2π/3だけ位相が遅れている。図3には、同じy画素座標上における各単色縞パターン画像の輝度値の変化を示している。標準縞パターン画像は、赤、緑、青の単色縞パターン画像が均等に含まれる画像であるため、x画素座標の変化に伴い虹状に色が変化する。 As an example, the phase of the red monochromatic stripe pattern image is the most advanced, and the phase of the green monochromatic stripe pattern image is delayed by 2π/3. The single-color fringe pattern image of blue is delayed in phase from the single-color fringe pattern image of green by 2π/3. FIG. 3 shows the change in luminance value of each single-color striped pattern image on the same y-pixel coordinates. Since the standard striped pattern image is an image that evenly includes single-color striped pattern images of red, green, and blue, the colors change in a rainbow-like manner as the x-pixel coordinates change.

プロジェクタ20は、カラー画像を投影可能なプロジェクタである。カメラ30は、カラー画像を撮影可能なカメラである。カメラ30は、デジタルカメラであって、フォトダイオードなどの光検出素子を受光面に縦横に多数備えている。1つ1つの光検出素子が1画素に相当する。プロジェクタ20が投影する画像のx方向とカメラ30が撮影する画像のx方向は一致させているものとする。 The projector 20 is a projector capable of projecting color images. The camera 30 is a camera capable of capturing color images. The camera 30 is a digital camera, and has a large number of light detection elements such as photodiodes on its light receiving surface. Each photodetector corresponds to one pixel. It is assumed that the x direction of the image projected by the projector 20 and the x direction of the image captured by the camera 30 are matched.

光検出素子の光到来方向にはRGBカラーフィルタが設けられている。RGBカラーフィルタは、赤と緑と青のいずれかのカラーフィルタが各光検出素子の光到来方向に配置されたものである。赤と緑と青のカラーフィルタの配列は、一般にベイヤ配列に従っている。プロジェクタ20とカメラ30との間の距離は、事前に計測されている。 An RGB color filter is provided in the light arrival direction of the photodetector. The RGB color filter is formed by arranging any one of red, green, and blue color filters in the light arrival direction of each photodetector. The arrangement of red, green, and blue color filters generally follows the Bayer arrangement. The distance between projector 20 and camera 30 is measured in advance.

〔三次元形状を計測する処理〕
次に、三次元形状を計測する処理を説明する。図4に三次元形状を計測する処理を示している。図4に示す処理は、ユーザの操作に基づき、制御装置10が実行する。投影制御部としての処理であるステップ(以下、ステップを省略)S11では、標準縞パターン画像を計測対象物5に投影し、カメラ30により、そのときの計測対象物5の画像を撮影する。
[Processing for measuring three-dimensional shape]
Next, processing for measuring a three-dimensional shape will be described. FIG. 4 shows processing for measuring a three-dimensional shape. The processing shown in FIG. 4 is executed by the control device 10 based on the user's operation. In step (hereinafter, step is omitted) S11 which is a process of the projection control unit, the standard fringe pattern image is projected onto the measurement object 5, and the image of the measurement object 5 at that time is photographed by the camera 30. FIG.

撮影画像取得部としての処理であるS12では、赤、緑、青の3色について、色別の撮影画像の輝度値(以下、撮影輝度値)Iを取得する。これは、色画素別に撮影輝度値Iを示すデータを取得することを意味する。色画素が出力するデータはRAWデータと呼ばれることもある。色画素は、赤の光を検出する画素、緑の光を検出する画素、青の光を検出する画素のいずれか、または、それらの総称を意味する。 In S12, which is a process performed by the captured image acquisition unit, the brightness value (hereinafter referred to as captured brightness value) Ib of the captured image for each of the three colors of red, green, and blue is acquired. This means obtaining data indicating the shooting luminance value Ib for each color pixel. The data output by the color pixels is sometimes called RAW data. A color pixel means a pixel that detects red light, a pixel that detects green light, or a pixel that detects blue light, or a generic term for them.

S13では、各色の撮影輝度値Iを正規化する。正規化は、各色の最大輝度および最小輝度を揃える処理である。位相算出部としての処理であるS14では、各画素座標(x、y)の色画素別の正規化した撮影輝度値Iをもとに、式1から、各画素座標(x、y)における位相θ(x、y)を算出する。

Figure 0007276166000001
In S13, the shooting luminance value Ib of each color is normalized. Normalization is a process of aligning the maximum luminance and minimum luminance of each color. In S14, which is a process as a phase calculation unit, based on the normalized photographing luminance value Ib for each color pixel at each pixel coordinate (x, y), from Equation 1, at each pixel coordinate (x, y) Calculate the phase θ(x, y).
Figure 0007276166000001

なお、式1において、Nは位相シフト総回数、nは色別に取得した撮影画像の位相シフト回数である。縞パターン画像において最も早い位相とした色のnが0、次に位相が早い色のnが1、最も位相が遅い色のnが2である。位相シフト総回数Nは3である。また、a(x、y)は輝度振幅、b(x、y)は背景輝度、θ(x、y)はn=0での位相θである。 In Expression 1, N is the total number of phase shifts, and n is the number of phase shifts of the captured image acquired for each color. In the fringe pattern image, n is 0 for the color with the earliest phase, n is 1 for the color with the second earliest phase, and n is 2 for the color with the slowest phase. The total number of phase shifts N is three. Also, a(x, y) is the luminance amplitude, b(x, y) is the background luminance, and θ(x, y) is the phase θ at n=0.

式1において、未知数は、a(x、y)、b(x、y)、θ(x、y)の3つである。したがって、S13で正規化した色別の各座標(x、y)の撮影輝度値Iを用いれば、位相θを含む、3つの未知数、a(x、y)、b(x、y)、θ(x、y)を、画素座標別に算出することができる。 In Equation 1, there are three unknowns, a(x, y), b(x, y), and θ(x, y). Therefore, if the photographing luminance value Ib of each coordinate (x, y) for each color normalized in S13 is used, three unknowns including the phase θ, a (x, y), b (x, y), θ(x, y) can be calculated for each pixel coordinate.

S15とS16は座標決定部としての処理である。S15では、S14で算出した各画素座標(x、y)の位相θ(x、y)から、座標計測点Pの高さ座標zを決定する。座標計測点Pは、計測対象物5あるいは作業台2の表面上の点である。 S15 and S16 are processes of the coordinate determination unit. In S15, the height coordinate zm of the coordinate measurement point P is determined from the phase θ(x, y) of each pixel coordinate (x, y) calculated in S14. A coordinate measurement point P is a point on the surface of the object 5 to be measured or the workbench 2 .

高さ座標zは、プロジェクタ20とカメラ30とを含む平面から物体までの距離である。高さ座標zは、図5に示す位相θと高さ座標zとの関係を示すグラフと、S14で算出した位相θとを用いて決定する。図5に示すグラフは、プロジェクタ20の座標、カメラ30の座標、高さ座標z、基準面における縞パターン画像の1周期分の長さが分かれば作成することができるグラフである。なお、基準面は、作業台2の表面である投影面に平行であって、プロジェクタ20およびカメラ30までの距離がzとなっている面である。 The height coordinate zm is the distance from the plane containing the projector 20 and the camera 30 to the object. The height coordinate zm is determined using the graph showing the relationship between the phase θ and the height coordinate zm shown in FIG. 5 and the phase θ calculated in S14. The graph shown in FIG. 5 can be created if the coordinates of the projector 20, the coordinates of the camera 30, the height coordinate z m , and the length of one cycle of the stripe pattern image on the reference plane are known. The reference plane is a plane that is parallel to the projection plane, which is the surface of the workbench 2, and that is at a distance of z m from the projector 20 and the camera 30. FIG.

プロジェクタ20とカメラ30を固定すれば、プロジェクタ20の座標、カメラ30の座標は既知になる。また、基準面までの高さ座標zは与える値である。さらに、基準面までの高さ座標zが決まれば、その基準面における縞パターン画像の1周期分の長さも決まる。よって、図5に示すグラフは事前に求めることができる。 If the projector 20 and the camera 30 are fixed, the coordinates of the projector 20 and the coordinates of the camera 30 are known. Also, the height coordinate zm up to the reference plane is a given value. Furthermore, if the height coordinate zm to the reference plane is determined, the length of one cycle of the stripe pattern image on the reference plane is also determined. Therefore, the graph shown in FIG. 5 can be obtained in advance.

図5に示すグラフを事前に求めておき、S15では、事前に求めた図5に示すグラフに、S14で算出した位相θ(x、y)を当てはめて、各座標計測点Pの高さ座標zを決定する。なお、位相θが何周期目であるかが不明だと、高さ座標zも決定することができない。しかし、ある座標計測点Pにおける高さ座標zは、その座標計測点Pに隣接する座標計測点Pの高さ座標zに対して連続的な変化をする。したがって、位相θが何周期目であるかが不明でも計測対象物5の三次元形状を計測することはできる。また、作業台2の高さ座標zは既知であるので、作業台2の高さ座標zと比較をすることで、座標計測点Pの高さ座標zを決定してもよい。 The graph shown in FIG. 5 is obtained in advance, and in S15, the phase θ (x, y) calculated in S14 is applied to the graph shown in FIG. Determine zm . It should be noted that the height coordinate zm cannot be determined if it is unknown what cycle the phase θ is. However, the height coordinate zm at a certain coordinate measurement point P changes continuously with respect to the height coordinate zm of the coordinate measurement point P adjacent to that coordinate measurement point P. FIG. Therefore, it is possible to measure the three-dimensional shape of the measurement object 5 even if it is unknown what period the phase θ is. Further, since the height coordinate zm of the workbench 2 is known, the height coordinate zm of the coordinate measurement point P may be determined by comparing with the height coordinate zm of the workbench 2 .

S16では、S15で高さ座標zを決定した座標計測点Pについて、水平座標(x、y)を決定する。S15において決定した高さ座標zは、画素座標(x、y)には対応付けられている。画素座標(x、y)が決まると、カメラ30に対する方向(δ、δ)は定まる。なお、δは、図6に示すように、カメラ30から座標計測点Pに向かう方向のうち、x平面におけるz軸との間の角度である。δは図6には図示していないが、δはカメラ30から座標計測点Pに向かう方向のうち、y平面におけるz軸との間の角度である。図6から分かるように、水平座標(x、y)は、高さ座標zとδ、δから幾何学計算により算出することができる。 In S16, the horizontal coordinates ( xm , ym ) are determined for the coordinate measurement point P whose height coordinate zm was determined in S15. The height coordinate zm determined in S15 is associated with the pixel coordinates (x, y). Once the pixel coordinates (x, y) are determined, the directions (δ x , δ y ) with respect to the camera 30 are determined. As shown in FIG. 6, δx is the angle between the direction from the camera 30 to the coordinate measuring point P and the zm axis on the xmzm plane . Although δy is not shown in FIG. 6, δy is the angle between the zm axis on the ymzm plane in the direction from the camera 30 toward the coordinate measurement point P. As can be seen from FIG. 6, the horizontal coordinates (x m , y m ) can be calculated from the height coordinates z m and δ m , δ y by geometric calculation.

S14からS16までの処理を各画素座標(x、y)に対して実行することで、計測対象物5の三次元形状を計測することができる。 The three-dimensional shape of the measurement object 5 can be measured by executing the processing from S14 to S16 for each pixel coordinate (x, y).

〔二次元画像生成処理〕
次に、二次元画像生成処理を説明する。図7に二次元画像生成処理を示している。二次元画像生成処理は、三次元形状を計測する処理に続いて実行する。二次元画像生成処理も制御装置10が実行する。
[Two-dimensional image generation processing]
Next, two-dimensional image generation processing will be described. FIG. 7 shows the two-dimensional image generation processing. The two-dimensional image generation process is executed following the process of measuring the three-dimensional shape. The control device 10 also executes the two-dimensional image generation processing.

S21では、各画素座標(x、y)について色画素別の位相θを決定する。S14において、各画素座標(x、y)に対して、n=0での位相θは算出している。したがって、S21では、さらに式1を用い、各画素座標(x、y)についてn=1、n=2での位相θを算出する。 In S21, the phase θ for each color pixel is determined for each pixel coordinate (x, y). In S14, the phase θ at n=0 is calculated for each pixel coordinate (x, y). Therefore, in S21, Equation 1 is further used to calculate the phase θ at n=1 and n=2 for each pixel coordinate (x, y).

投影輝度決定部としての処理であるS22では、S21で決定した各画素座標(x、y)の色画素別の位相θを式2に代入して、各画素座標(x、y)の色画素別の投影輝度値Iを決定する。式2において、n、Nは式1と同じ意味である。αはプロジェクタ20が投影する合成縞パターン画像を生成するための単色縞パターン画像の振幅、βはその単色縞パターン画像の輝度値の中心値である。これらαとβは、予め設定されている値である。したがって、式2は、位相θから投影輝度値Iが算出できる計算式である。

Figure 0007276166000002
In S22, which is a process performed by the projection brightness determination unit, the phase θ for each color pixel at each pixel coordinate (x, y) determined in S21 is substituted into Equation 2 to determine the color pixel at each pixel coordinate (x, y). Determine another projection luminance value If . In Formula 2, n and N have the same meanings as in Formula 1. α is the amplitude of the single-color striped pattern image for generating the composite striped pattern image projected by the projector 20, and β is the central value of the luminance value of the single-color striped pattern image. These α and β are preset values. Therefore, Equation 2 is a calculation formula that can calculate the projection luminance value If from the phase θ.
Figure 0007276166000002

式2により算出される投影輝度値Iは、プロジェクタ20が投影した合成縞パターン画像の計測対象物5の表面における輝度値を意味する。 The projection luminance value If calculated by Equation 2 means the luminance value of the composite fringe pattern image projected by the projector 20 on the surface of the measurement object 5 .

S23では、各画素座標(x、y)の色画素別の補正係数Cを決定する。補正係数Cは式3を用いて算出する。式3の分子は、合成縞パターン画像に含まれている単色縞パターン画像の最高輝度値を意味する。したがって、補正係数Cは、投影輝度値Iを、一定輝度値である最高輝度値にするための補正係数である。

Figure 0007276166000003
In S23, a correction coefficient C for each color pixel of each pixel coordinate (x, y) is determined. The correction coefficient C is calculated using Equation (3). The numerator of Equation 3 means the highest luminance value of the monochromatic striped pattern image included in the composite striped pattern image. Therefore, the correction coefficient C is a correction coefficient for making the projection luminance value If the maximum luminance value, which is a constant luminance value.
Figure 0007276166000003

補正部としての処理であるS24では、S23で決定した補正係数Cを、S12で決定した各画素座標(x、y)の色画素別の撮影輝度値Iに乗じる。補正係数Cにより補正された後の輝度値は、投影縞パターン画像の輝度値が一定輝度値に補正された状態での撮影輝度値Iになる。つまり、補正係数Cにより補正された後の輝度値は、輝度変化がない光が投影された状態で撮影された輝度値となる。したがって、このS24の補正により二次元画像が生成される。 In S24, which is a process performed by the correction unit, the correction coefficient C determined in S23 is multiplied by the shooting brightness value Ib for each color pixel at each pixel coordinate (x, y) determined in S12. The luminance value corrected by the correction coefficient C becomes the shooting luminance value Ib in a state where the luminance value of the projected fringe pattern image is corrected to a constant luminance value. In other words, the luminance value after being corrected by the correction coefficient C is the luminance value photographed with light projected without luminance change. Therefore, a two-dimensional image is generated by the correction in S24.

〔第1実施形態のまとめ〕
以上、説明した本実施形態の三次元計測装置1は、標準縞パターン画像を計測対象物5に投影し、カメラ30により、そのときの計測対象物5の画像を撮影している(S11)。そして、カメラ30が撮影した撮影画像から色画素別の撮影画像の輝度値を取得することで、位相シフト法によって計測対象物5の三次元座標を決定している(S15、S16)。
[Summary of the first embodiment]
The three-dimensional measuring apparatus 1 of the present embodiment described above projects the standard fringe pattern image onto the measurement object 5, and the camera 30 captures the image of the measurement object 5 at that time (S11). Then, the three-dimensional coordinates of the measurement object 5 are determined by the phase shift method by acquiring the brightness values of the captured image for each color pixel from the captured image captured by the camera 30 (S15, S16).

さらに、この三次元計測装置1は、計測対象物5の三次元形状を計測するために算出している画素別の位相θを利用し、計測対象物上に投影される合成縞パターン画像の色画素別の投影輝度値Iを決定している(S22)。そして、この投影輝度値Iを一定輝度値にするための補正係数Cを、色画素別の撮影輝度値Iに乗じる補正をすることにより、二次元画像を生成している(S24)。したがって、計測対象物5の三次元座標を決定するための撮影とは別に画像を撮影することなく二次元画像を得ることができる。 Further, the three-dimensional measurement apparatus 1 utilizes the phase θ for each pixel calculated to measure the three-dimensional shape of the measurement object 5, and the color of the composite fringe pattern image projected onto the measurement object 5. A projection luminance value If for each pixel is determined (S22). A two-dimensional image is generated by multiplying the photographing luminance value Ib for each color pixel by a correction coefficient C for making the projection luminance value If a constant luminance value (S24). Therefore, it is possible to obtain a two-dimensional image without photographing an image separately from photographing for determining the three-dimensional coordinates of the object 5 to be measured.

また、補正係数Cは、投影輝度値Iを最高輝度値にする係数になっている。したがって、二次元画像を、明るく視認性のよい画像にすることができる。 Further, the correction coefficient C is a coefficient that makes the projection luminance value If the maximum luminance value. Therefore, the two-dimensional image can be made bright and highly visible.

<第2実施形態>
次に、第2実施形態を説明する。この第2実施形態以下の説明において、それまでに使用した符号と同一番号の符号を有する要素は、特に言及する場合を除き、それ以前の実施形態における同一符号の要素と同一である。また、構成の一部のみを説明している場合、構成の他の部分については先に説明した実施形態を適用できる。
<Second embodiment>
Next, a second embodiment will be described. In the following description of the second embodiment, the elements having the same reference numerals as those used so far are the same as the elements having the same reference numerals in the previous embodiments unless otherwise specified. Moreover, when only part of the configuration is described, the previously described embodiments can be applied to the other portions of the configuration.

図8に第2実施形態の三次元計測装置100を示す。第2実施形態の三次元計測装置100は、制御装置10がテーブル記憶部11を備えている。テーブル記憶部11は書き込み可能な不揮発性の記憶部である。テーブル記憶部11には、図11を実行して生成した輝度値比テーブルが記憶される。第2実施形態では、この輝度値比テーブルを用いた補正も行う。 FIG. 8 shows a three-dimensional measuring device 100 of the second embodiment. In the three-dimensional measuring device 100 of the second embodiment, the control device 10 has a table storage section 11 . The table storage unit 11 is a writable non-volatile storage unit. The table storage unit 11 stores a luminance value ratio table generated by executing FIG. In the second embodiment, correction using this luminance value ratio table is also performed.

まず、輝度値比テーブルを用いた補正を行う理由を説明する。図9に、プロジェクタ20から赤、緑、青の単色縞パターン画像を作業台2の表面に投影し、カメラ30でその単色縞パターン画像を撮影したときの、x画素座標に対する各色画素が検出した輝度値の変化を示す。 First, the reason for performing correction using the luminance value ratio table will be described. In FIG. 9, a single-color striped pattern image of red, green, and blue is projected from the projector 20 onto the surface of the workbench 2, and each color pixel is detected with respect to the x-pixel coordinate when the single-colored striped pattern image is photographed by the camera 30. It shows the change in luminance value.

図9において、赤画素はR画素、緑画素はG画素、青画素はB画素と表記している。図10以降の図でも同じ表記をしている。図9に示す3つの波形は、それぞれ正弦波に近い波形になっている。 In FIG. 9, red pixels are denoted as R pixels, green pixels as G pixels, and blue pixels as B pixels. The same notation is used in the figures after FIG. 10 . Each of the three waveforms shown in FIG. 9 is a waveform close to a sine wave.

図10も、x画素座標に対する各色画素が検出した輝度値の変化を示す図である。ただし、図10は、プロジェクタ20から標準縞パターン画像を作業台2の表面に投影し、カメラ30でその標準縞パターン画像を撮影したときの図である。 FIG. 10 is also a diagram showing changes in luminance values detected by each color pixel with respect to x pixel coordinates. However, FIG. 10 is a diagram when the standard striped pattern image is projected from the projector 20 onto the surface of the workbench 2 and the standard striped pattern image is photographed by the camera 30 .

図10に示す各波形は、正弦波からかなりずれた波形になっている。この理由は、カメラ30が備える赤フィルタ、緑フィルタ、青フィルタは、赤、緑、青の光のみを透過するのではなく、他の色の光も少しは透過してしまうからである。また、プロジェクタ20がカラーフィルタを備えた構成の場合、プロジェクタ20が備えるカラーフィルタにおいても、各カラーフィルタは、他の色の光も少しは透過してしまう。よって、プロジェクタ20がカラーフィルタを備えた構成の場合には、プロジェクタ20が画像を投影する際にも、赤、緑、青のそれぞれの色の光に、他の色の光が重畳してしまう。 Each waveform shown in FIG. 10 is a waveform considerably deviated from a sine wave. The reason for this is that the red, green, and blue filters of the camera 30 do not only transmit red, green, and blue light, but also transmit some other colors of light. Also, in the case where the projector 20 is configured to include color filters, each of the color filters included in the projector 20 also transmits light of other colors to some extent. Therefore, when the projector 20 is configured to have a color filter, when the projector 20 projects an image, the red, green, and blue lights are superimposed on the lights of other colors. .

〔輝度値比テーブル生成方法の説明〕
そこで、本実施形態では、図11に示す輝度値比テーブル生成方法を実行して、各色画素が検出した撮影輝度値Iを補正するための輝度値比テーブルを生成する。図11は、輝度値比テーブル生成方法の各工程を示すフローチャートである。輝度値比テーブル生成方法は、プロジェクタ20とカメラ30との組み合わせが変わるごとに1度、実行する。また、輝度値比テーブル生成は、作業台2に計測対象物5が載っていない状態で実行する。作業台2に計測対象物5が載っていないので、プロジェクタ20は平面である作業台2の表面を投影面として画像を投影し、カメラ30はその投影面を撮影する。
[Description of method for generating luminance value ratio table]
Therefore, in this embodiment, the brightness value ratio table generation method shown in FIG. 11 is executed to generate a brightness value ratio table for correcting the shooting brightness value Ib detected by each color pixel. FIG. 11 is a flow chart showing each step of the luminance value ratio table generating method. The brightness value ratio table generation method is executed once each time the combination of the projector 20 and the camera 30 changes. Moreover, the brightness value ratio table generation is executed in a state where the measurement object 5 is not placed on the workbench 2 . Since the object 5 to be measured is not placed on the workbench 2, the projector 20 projects an image on the plane surface of the workbench 2, and the camera 30 captures the projection surface.

S31では、プロジェクタ20から、投影画像の全部が単色であって輝度が全面均一である均一輝度画像を投影し、カメラ30で、その均一輝度画像を撮影する。均一輝度画像は輝度値比テーブルを作成するための補正用単色画像である。 In S31, the projector 20 projects a uniform brightness image in which the entire projection image is monochromatic and the brightness is uniform over the entire surface, and the camera 30 captures the uniform brightness image. A uniform luminance image is a correction monochromatic image for creating a luminance value ratio table.

均一輝度画像の色は、カメラ30が備えるカラーフィルタに対応して、赤と緑と青である。一度のS31においては、これら3色のうち、いずれか1つの色の均一輝度画像を用いる。用いる色の順番は予め設定されている。 The colors of the uniform luminance image are red, green and blue, corresponding to the color filters provided by camera 30 . In S31 once, a uniform luminance image of any one of these three colors is used. The order of colors to be used is set in advance.

S32では、カメラ30から、画素毎の撮影輝度値Iを取得する。取得する撮影輝度値Iは、赤画素、緑画素、青画素、それぞれの画素別の輝度値である。これら取得した撮影輝度値Iから、色画素の輝度値比を決定する。たとえば、S31で投影した均一輝度画像の色が赤であれば、赤画素が出力する輝度値が最も大きい値になる。そこで、赤画素が出力する輝度値を100%として、他の色画素が出力する輝度値の輝度値比を決定する。 In S32, the photographing luminance value Ib for each pixel is acquired from the camera 30. FIG. The shooting brightness value Ib to be acquired is a brightness value for each of red pixels, green pixels, and blue pixels. The luminance value ratio of the color pixels is determined from the acquired photographing luminance values Ib . For example, if the color of the uniform luminance image projected in S31 is red, the luminance value output by the red pixel will be the largest value. Therefore, the luminance value ratio of the luminance values output by the other color pixels is determined by assuming that the luminance value output by the red pixel is 100%.

図12には、S32で決定する輝度値比の一例を示している。図12において、波長R、波長G、波長Bは、それぞれ、プロジェクタ20が投影した均一輝度画像の色が赤、緑、青であることを意味する。図13における波長R、波長G、波長Bも同じ意味である。 FIG. 12 shows an example of the luminance value ratio determined in S32. In FIG. 12, wavelength R, wavelength G, and wavelength B mean that the colors of the uniform luminance image projected by the projector 20 are red, green, and blue, respectively. Wavelength R, wavelength G, and wavelength B in FIG. 13 have the same meaning.

図12に示す例では、赤の均一輝度画像を投影したときでも、緑画素は赤画素の60%もの大きさの輝度値を検出し、青画素も赤画素の10%の大きさの輝度値を検出している。 In the example shown in FIG. 12, even when a red uniform luminance image is projected, the luminance value of the green pixel is detected to be 60% of that of the red pixel, and the luminance value of the blue pixel is 10% of that of the red pixel. is detected.

S33では、3色とも均一輝度画像を投影したか否か判断する。S33の判断結果がNOであれば、S34に進む。S34では、色を、赤、緑、青のうち均一輝度画像を投影していない色に変更する。色を変更後、S31以下を実行する。 In S33, it is determined whether or not uniform brightness images have been projected for all three colors. If the judgment result of S33 is NO, it will progress to S34. In S34, the color is changed to a color out of red, green, and blue for which no uniform luminance image is projected. After changing the color, S31 and subsequent steps are executed.

S33の判断結果がYESになった場合にはS35に進む。S35では、輝度値比テーブルを生成する。生成した輝度値比テーブルは、テーブル記憶部11に記憶する。図13に輝度値比テーブルの一例を示す。 If the determination result of S33 is YES, the process proceeds to S35. At S35, a luminance value ratio table is generated. The generated brightness value ratio table is stored in the table storage unit 11 . FIG. 13 shows an example of the luminance value ratio table.

図12に示した各輝度値比は、プロジェクタ20から均一輝度画像を投影して求めている。均一輝度画像は単色画像である。図12に示した各輝度値比は、その均一輝度画像を、カメラ30で撮影したときに、各色画素により検出される輝度値の比である。図13に示す輝度値比テーブルは、図12に示した各輝度値比をテーブル化したものである。 Each luminance value ratio shown in FIG. 12 is obtained by projecting a uniform luminance image from the projector 20 . A uniform luminance image is a monochromatic image. Each luminance value ratio shown in FIG. 12 is a ratio of luminance values detected by each color pixel when the uniform luminance image is captured by the camera 30 . The luminance value ratio table shown in FIG. 13 tabulates each luminance value ratio shown in FIG.

図14には、輝度値比テーブルを用いた補正による効果を示している。図14において、一点鎖線は、標準縞パターン画像を投影したときに、カメラ30の赤画素が出力する輝度値である。実線は、一点鎖線で示した輝度値を輝度値比テーブルで補正した後の輝度値である。点線は、赤の単色縞パターン画像を投影したときにカメラ30の赤画素が出力する輝度値である。 FIG. 14 shows the effect of correction using the luminance value ratio table. In FIG. 14, the dashed-dotted line is the brightness value output by the red pixel of the camera 30 when the standard stripe pattern image is projected. The solid line is the luminance value after correcting the luminance value indicated by the dashed-dotted line using the luminance value ratio table. The dotted line is the luminance value output by the red pixels of the camera 30 when projecting a red monochromatic striped pattern image.

赤画素であっても他の色の光を検出してしまうので、標準縞パターン画像を撮影したときの赤画素の輝度値は、たとえば、x画素座標が430付近などで、他の色の光の影響による輝度値の増加が観測できる。しかし、補正後の波形は、赤の単色縞パターン画像を撮影したときの波形とよく似ている。したがって、補正により、他色成分の輝度が除去されていることが分かる。 Since even red pixels detect light of other colors, the luminance value of the red pixels when the standard striped pattern image is captured is, for example, near x-pixel coordinate 430, and light of other colors is detected. It is possible to observe an increase in the luminance value due to the influence of However, the waveform after correction is very similar to the waveform obtained when a single-color striped pattern image of red is captured. Therefore, it can be seen that the correction removes the luminance of the other color components.

補正後の輝度値は、以下に示す方程式を解くことにより得られる。下記式において、R、G、Bは、それぞれ、補正前の各色画素が出力する輝度値であり、R、G、Bが補正後の輝度値である。R、G、Bは、一組のR画素、G画素、B画素が検出した値である。なお、ベイヤ配列では、G画素は一組の画素セットに2画素ある。これら2画素が検出した輝度値を平均して用いてもよいし、いずれか一方のみを用いてもよい。αRG、αRB、αGR、αGB、αBR、αBGは、それぞれ輝度値比テーブルに示した値である。

Figure 0007276166000004
The corrected luminance value is obtained by solving the equation shown below. In the following formula, R d , G d , and B d are luminance values output by respective color pixels before correction, and R, G, and B are luminance values after correction. R d , G d and B d are values detected by a set of R, G and B pixels. In addition, in the Bayer array, there are two G pixels in one pixel set. The brightness values detected by these two pixels may be averaged and used, or only one of them may be used. α RG , α RB , α GR , α GB , α BR , and α BG are values shown in the luminance value ratio table.
Figure 0007276166000004

上記連立方程式は未知数がR、G、Bの3つのみである。したがって、連立方程式を解くことで、補正後輝度値であるR、G、Bを得ることができる。 The above simultaneous equations have only three unknowns, R, G, and B. Therefore, R, G, and B, which are luminance values after correction, can be obtained by solving the simultaneous equations.

図15に第2実施形態において実行する三次元計測処理を示す。図15は、図4に示した処理に対してS12-1が追加されている点が図4と相違するのみである。 FIG. 15 shows three-dimensional measurement processing executed in the second embodiment. FIG. 15 differs from FIG. 4 only in that S12-1 is added to the processing shown in FIG.

他色除去部としての処理であるS12-1では、S12で取得した各色の撮影輝度値Iと、テーブル記憶部11に記憶されている輝度値比テーブルが示す輝度値比とに基づいて、色画素別の撮影輝度値Iから他色成分の輝度値を除去する補正をする。具体的には、S12で取得した各色の撮影輝度値Iを式4のR、G、Bとし、輝度値比テーブルが示す輝度値比を、それぞれ、式4の係数αとして式4のR、G、Bを算出する。この処理により、他色成分の少なくとも一部が除去される。 In S12-1, which is a process performed by the other color removal unit, based on the shooting brightness value Ib of each color acquired in S12 and the brightness value ratio indicated by the brightness value ratio table stored in the table storage unit 11, Correction is performed by removing the luminance values of other color components from the shooting luminance value Ib for each color pixel. Specifically, the shooting luminance values I b of each color acquired in S12 are R d , G d , and B d in Equation 4, and the luminance value ratio indicated by the luminance value ratio table is the coefficient α in Equation 4. Calculate R, G, and B of 4. This processing removes at least part of the other color components.

S13では、S12-1で算出した各色の撮影輝度値Iを正規化し、S14では、他色成分の少なくとも一部が除去され、かつ、正規化された撮影輝度値Iを用いて第1実施形態と同様にして、各画素座標(x、y)における位相θ(x、y)を算出する。以降の処理は、第1実施形態と同じである。 In S13, the shooting luminance value I b of each color calculated in S12-1 is normalized, and in S14, at least part of the other color components are removed, and the normalized shooting luminance value I b is used to obtain the first Similar to the embodiment, the phase θ(x, y) at each pixel coordinate (x, y) is calculated. Subsequent processing is the same as in the first embodiment.

図16に第2実施形態において実行する二次元画像生成処理を示す。図16は、S24に代えてS24-1を実行する点が図7に示した処理と相違する。補正部としての処理であるS24-1では、S23で決定した補正係数Cを、S12-1で決定した他色成分の輝度値の少なくとも一部が除去された、各画素座標(x、y)の色画素別の撮影輝度値Iに乗じる。このS24-1の補正により二次元画像が生成される。 FIG. 16 shows the two-dimensional image generation processing executed in the second embodiment. FIG. 16 differs from the process shown in FIG. 7 in that S24-1 is executed instead of S24. In S24-1, which is a process performed by the correction unit, the correction coefficient C determined in S23 is applied to each pixel coordinate (x, y) from which at least a part of the luminance value of the other color component determined in S12-1 is removed. is multiplied by the photographic luminance value Ib for each color pixel. A two-dimensional image is generated by the correction in S24-1.

〔第2実施形態のまとめ〕
以上、説明した第2実施形態では、テーブル記憶部11に輝度値比テーブル(図13)を記憶している。この輝度値比テーブルは、単色画像である均一輝度画像を撮影したときの、カメラ30が備える3色の色画素により検出される輝度値の比を示している。
[Summary of the second embodiment]
In the second embodiment described above, the table storage unit 11 stores the luminance value ratio table (FIG. 13). This brightness value ratio table indicates the ratio of brightness values detected by three color pixels of the camera 30 when a uniform brightness image, which is a monochromatic image, is captured.

計測対象物5の三次元形状を計測する際には、この輝度値比テーブルを用いて、色画素別の撮影輝度値Iから他色成分の輝度値を除去する補正をする(S12-1)。そして、他色成分の少なくとも一部が除去され、かつ、正規化された撮影輝度値Iをもとに位相θを算出する(S14)。 When measuring the three-dimensional shape of the measurement object 5, this luminance value ratio table is used to correct the luminance values of other color components from the photographing luminance value Ib for each color pixel (S12-1). ). Then, the phase θ is calculated based on the normalized shooting luminance value Ib from which at least part of the other color components has been removed (S14).

カメラ30が、3つの単色縞パターン画像が合成された標準縞パターン画像を撮影していても、位相θを算出する撮影輝度値Iは、色画素に受光されてしまう他色の投影画像の影響を受ける程度が軽減されている。よって、各色の撮影輝度値Iをもとにして計測する計測対象物5の三次元形状の精度が向上する。 Even if the camera 30 captures a standard striped pattern image in which three single-color striped pattern images are combined, the captured brightness value Ib for calculating the phase The degree of influence is reduced. Therefore, the accuracy of the three-dimensional shape of the measurement object 5 measured based on the shooting brightness value Ib of each color is improved.

また、二次元画像生成処理においても、補正係数Cを乗じる輝度値を、S12-1で得た撮影輝度値I、すなわち、他色成分の輝度値の少なくとも一部が除去された撮影輝度値Iとしている。よって、第1実施形態よりも、縞パターンの影響が除去された二次元画像を生成できる。 Also in the two-dimensional image generation process, the brightness value to be multiplied by the correction coefficient C is the shooting brightness value I b obtained in S12-1, that is, the shooting brightness value from which at least part of the brightness value of the other color component is removed. Ib . Therefore, it is possible to generate a two-dimensional image in which the influence of the striped pattern is removed more than in the first embodiment.

以上、実施形態を説明したが、開示した技術は上述の実施形態に限定されるものではなく、次の変形例も開示した範囲に含まれ、さらに、下記以外にも要旨を逸脱しない範囲内で種々変更して実施できる。 Although the embodiments have been described above, the disclosed technology is not limited to the above-described embodiments, and the following modifications are also included in the disclosed scope. Various modifications can be made.

<変形例1>
実施形態では、式2に示した計算式を用いて位相θから投影輝度値Iを算出していた。しかし、位相θと投影輝度値Iの関係をテーブルまたはグラフ化して記憶しておいてもよい。このテーブルまたはグラフは、式2から作成することもできるが、実測値に基づいて作成してもよい。
<Modification 1>
In the embodiment, the projection luminance value If is calculated from the phase θ using the formula shown in Equation 2. However, the relationship between the phase θ and the projection luminance value If may be stored in a table or graph form. This table or graph can be created from Equation 2, but may also be created based on actual measurements.

実測値に基づいて位相θと投影輝度値Iの関係を示すテーブルまたはグラフを作成すれば、色画素間の明るさが異なっているなどの実環境で生じる変動に対応した精度のよいテーブルまたはグラフを作成することができる。 If a table or graph showing the relationship between the phase θ and the projected luminance value If is created based on actual measurement values, an accurate table or graph corresponding to variations occurring in the actual environment, such as differences in brightness between color pixels, can be obtained. Can create graphs.

<変形例2>
第2実施形態では、補正用単色画像として、均一輝度画像を説明した。しかし、補正用単色画像は均一輝度画像に限られない。たとえば、補正用単色画像として、単色グラデーションパターン画像や単色縞パターン画像を用いてもよい。単色グラデーションパターン画像は、プロジェクタ20の画素座標の一方向の変化に対して輝度が連続的に増加する単色の画像、または、その輝度が連続的に減少する画像である。単色縞パターン画像は、プロジェクタ20の画素座標の一方向の変化に対して輝度が連続的に増減を繰り返す単色の画像である。
<Modification 2>
In the second embodiment, the uniform luminance image has been described as the monochromatic image for correction. However, the monochromatic image for correction is not limited to the uniform luminance image. For example, a single-color gradation pattern image or a single-color striped pattern image may be used as the correction single-color image. A monochromatic gradation pattern image is a monochromatic image whose luminance continuously increases or an image whose luminance continuously decreases with respect to a change in pixel coordinates of the projector 20 in one direction. The single-color striped pattern image is a single-color image in which the luminance continuously repeats increase and decrease in response to changes in the pixel coordinates of the projector 20 in one direction.

さらに、これら単色グラデーションパターン画像や単色縞パターン画像を用い、撮影輝度値Iに対する複数の色画素間の輝度値比の変化が許容できる許容輝度範囲を決定してもよい。この場合、許容輝度範囲内の輝度値比を用いて輝度値比テーブルを決定し、単色縞パターン画像の輝度値変化範囲を許容輝度範囲に補正し、補正後の単色縞パターン画像をもとに合成縞パターン画像を生成する。 Furthermore, using these single-color gradation pattern images and single-color striped pattern images, it is also possible to determine an allowable luminance range in which a change in the luminance value ratio between a plurality of color pixels with respect to the photographing luminance value Ib is permissible. In this case, the brightness value ratio table is determined using the brightness value ratio within the allowable brightness range, the brightness value change range of the single-color striped pattern image is corrected to the allowable brightness range, and based on the corrected single-color striped pattern image, Generate a composite stripe pattern image.

<変形例3>
実施形態のS12-1では、S12で取得した撮影輝度値Iを式4のR、G、Bに代入した後に、その式4の連立方程式を解いてR、G、Bを得ていた。しかし、R、G、Bに値を代入する前に、式4に示した連立方程式をR、G、Bについて解いておき、そのR、G、Bについて解いた式に、S12で取得した撮影輝度値Iを代入してもよい。
<Modification 3>
In S12-1 of the embodiment, after substituting the shooting luminance value I b acquired in S12 into R d , G d , and B d of Equation 4, the simultaneous equations of Equation 4 are solved to obtain R, G, and B. was However, before substituting values for R d , G d , and B d , the simultaneous equations shown in Equation 4 are solved for R, G, and B, and in the equations solved for R, G, and B, The acquired shooting luminance value Ib may be substituted.

<変形例4>
実施形態では、各画素座標(x、y)の色画素別の正規化した撮影輝度値Iをもとに、各画素座標(x、y)における位相θ(x、y)を算出していた。しかし、正規化をしない撮影輝度値Iをもとに、各画素座標(x、y)における位相θ(x、y)を算出してもよい。
<Modification 4>
In the embodiment, the phase θ(x, y) at each pixel coordinate (x, y) is calculated based on the normalized shooting luminance value Ib for each color pixel at each pixel coordinate (x, y). rice field. However, the phase θ(x, y) at each pixel coordinate (x, y) may be calculated based on the non-normalized shooting luminance value Ib .

<変形例5>
実施形態では、補正係数Cは、投影輝度値Iを単色縞パターン画像の最高輝度値にする係数であった。しかし、補正係数Cは、投影輝度値Iを単色縞パターン画像の最高輝度値以外の一定輝度値、たとえば、中心輝度値にする係数でもよい。
<Modification 5>
In the embodiment, the correction coefficient C is a coefficient that makes the projected luminance value If the maximum luminance value of the monochromatic fringe pattern image. However, the correction coefficient C may be a coefficient that sets the projection luminance value If to a constant luminance value other than the maximum luminance value of the monochromatic striped pattern image, for example, the central luminance value.

1:三次元計測装置 2:作業台 5:計測対象物 10:制御装置 11:テーブル記憶部 20プロジェクタ 30:カメラ S11:投影制御部 S12:撮影画像取得部 S12-1:他色除去部 S14:位相算出部 S15、S16:座標決定部 S22:投影輝度決定部 S24、S24-1:補正部 I:投影輝度値 I:撮影輝度値 1: Three-dimensional measuring device 2: Workbench 5: Object to be measured 10: Control device 11: Table storage unit 20 Projector 30: Camera S11: Projection control unit S12: Captured image acquisition unit S12-1: Other color removal unit S14: Phase calculation unit S15, S16: Coordinate determination unit S22: Projection brightness determination unit S24, S24-1: Correction unit I f : Projection brightness value I b : Shooting brightness value

Claims (5)

複数の単色縞パターン画像が合成された合成縞パターン画像を投影するプロジェクタ(20)と、
計測対象物に投影された前記合成縞パターン画像をカラーで撮影するカメラ(30)とを備え、
前記カメラが撮影した画像に基づいて、位相シフト法により前記計測対象物の三次元形状を計測する三次元計測装置であって、
前記プロジェクタから前記計測対象物に向けて前記合成縞パターン画像を投影させる投影制御部(S11)と、
前記合成縞パターン画像が前記計測対象物に投影されている状態を前記カメラが撮影した撮影画像の輝度値であって、前記カメラが備える複数色のカラーフィルタにそれぞれ対応した色画素別の前記撮影画像の輝度値を取得する撮影画像取得部(S12)と、
前記撮影画像取得部が取得した前記色画素別の前記撮影画像の輝度値に基づいて、画素別に輝度値の位相を算出する位相算出部(S14)と、
前記位相算出部が算出した位相に基づいて、前記計測対象物の三次元座標を決定する座標決定部(S15、S16)と、
前記位相算出部が算出した前記画素別の位相に基づいて、前記計測対象物上に投影された前記合成縞パターン画像の色画素別の投影輝度値(I)を決定する投影輝度決定部(S22)と、
前記投影輝度決定部が決定した前記投影輝度値を予め設定した一定輝度値にするための補正係数を、前記色画素別の前記撮影画像の輝度値(I)に乗じる補正をすることで、二次元画像を生成する補正部(S24、S24-1)と、を備えた三次元計測装置。
a projector (20) for projecting a composite striped pattern image obtained by combining a plurality of single-color striped pattern images;
A camera (30) for capturing in color the composite fringe pattern image projected onto the measurement object,
A three-dimensional measuring device that measures the three-dimensional shape of the measurement object by a phase shift method based on the image captured by the camera,
a projection control unit (S11) for projecting the composite fringe pattern image from the projector toward the object to be measured;
A luminance value of an image captured by the camera of the state in which the composite stripe pattern image is projected onto the measurement object, the captured image being obtained by color pixels corresponding to color filters of a plurality of colors provided by the camera. a captured image acquisition unit (S12) for acquiring the luminance value of an image;
a phase calculation unit (S14) for calculating the phase of the luminance value for each pixel based on the luminance value of the photographed image for each color pixel acquired by the photographed image acquisition unit;
a coordinate determination unit (S15, S16) that determines the three-dimensional coordinates of the measurement object based on the phase calculated by the phase calculation unit;
A projection luminance determination unit ( S22) and
By performing correction by multiplying the luminance value (I b ) of the captured image for each color pixel by a correction coefficient for making the projection luminance value determined by the projection luminance determination unit a predetermined constant luminance value, A three-dimensional measurement device comprising a correction unit (S24, S24-1) that generates a two-dimensional image.
請求項1に記載の三次元計測装置であって、
前記補正係数は、前記投影輝度決定部が決定した投影輝度値を、前記単色縞パターン画像の最高輝度値にするための補正係数である、三次元計測装置。
The three-dimensional measuring device according to claim 1,
The three-dimensional measuring device, wherein the correction coefficient is a correction coefficient for making the projection luminance value determined by the projection luminance determination unit the maximum luminance value of the monochromatic stripe pattern image.
請求項1または2に記載の三次元計測装置であって、
前記投影輝度決定部は、前記位相から前記投影輝度値が算出できる予め設定された計算式に、前記位相算出部が算出した位相を代入して前記投影輝度値を決定する、三次元計測装置。
The three-dimensional measuring device according to claim 1 or 2,
The projection luminance determination unit determines the projection luminance value by substituting the phase calculated by the phase calculation unit into a preset calculation formula capable of calculating the projection luminance value from the phase.
請求項1または2に記載の三次元計測装置であって、
前記投影輝度決定部は、前記位相から前記投影輝度値が定まるテーブルまたはグラフと、前記位相算出部が算出した位相とに基づいて、前記投影輝度値を決定する、三次元計測装置。
The three-dimensional measuring device according to claim 1 or 2,
The three-dimensional measuring device, wherein the projection brightness determination unit determines the projection brightness value based on a table or graph in which the projection brightness value is determined from the phase and the phase calculated by the phase calculation unit.
請求項1~4のいずれか1項に記載の三次元計測装置であって、
前記カメラが単色画像を撮影した場合に、前記カメラが備える複数色のカラーフィルタにそれぞれ対応した色画素により検出される輝度値の比を示す輝度値比を、前記色画素別に表した輝度値比テーブルを記憶するテーブル記憶部(11)と、
前記撮影画像取得部が取得した前記色画素別の前記撮影画像の輝度値と、前記輝度値比テーブルが示す輝度値比とに基づいて、前記色画素別の前記撮影画像の輝度値から他色成分の輝度値を除去する補正をする他色除去部(S12-1)と、を備え、
前記補正部(S24-1)は、前記補正係数を乗じる輝度値を、前記他色除去部が補正した後の色画素別の輝度値とする、三次元計測装置。
The three-dimensional measuring device according to any one of claims 1 to 4,
A luminance value ratio representing a luminance value ratio indicating a ratio of luminance values detected by color pixels respectively corresponding to color filters of a plurality of colors provided in the camera when the camera captures a monochrome image, for each of the color pixels. a table storage unit (11) for storing tables;
Based on the luminance value of the photographed image for each color pixel acquired by the photographed image acquiring unit and the luminance value ratio indicated by the luminance value ratio table, the luminance value of the photographed image for each color pixel is extracted from the photographed image for another color. a non-color removal unit (S12-1) that performs correction to remove the luminance value of the component,
The correcting unit (S24-1) is a three-dimensional measuring device, wherein the luminance value to be multiplied by the correction coefficient is the luminance value for each color pixel corrected by the other color removing unit.
JP2020003850A 2020-01-14 2020-01-14 Three-dimensional measuring device Active JP7276166B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020003850A JP7276166B2 (en) 2020-01-14 2020-01-14 Three-dimensional measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020003850A JP7276166B2 (en) 2020-01-14 2020-01-14 Three-dimensional measuring device

Publications (2)

Publication Number Publication Date
JP2021110680A JP2021110680A (en) 2021-08-02
JP7276166B2 true JP7276166B2 (en) 2023-05-18

Family

ID=77059630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020003850A Active JP7276166B2 (en) 2020-01-14 2020-01-14 Three-dimensional measuring device

Country Status (1)

Country Link
JP (1) JP7276166B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009204343A (en) 2008-02-26 2009-09-10 Panasonic Electric Works Co Ltd Three-dimensional shape measurement method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3723057B2 (en) * 2000-08-02 2005-12-07 シーケーディ株式会社 3D measuring device
JP7279596B2 (en) * 2019-09-24 2023-05-23 株式会社デンソーウェーブ Three-dimensional measuring device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009204343A (en) 2008-02-26 2009-09-10 Panasonic Electric Works Co Ltd Three-dimensional shape measurement method and device

Also Published As

Publication number Publication date
JP2021110680A (en) 2021-08-02

Similar Documents

Publication Publication Date Title
JP5578844B2 (en) Information processing apparatus, information processing method, and program
JP6016912B2 (en) 3D measuring device and 3D measuring method
JP2016510108A5 (en)
CN108195312B (en) Method and system for three-dimensional reconstruction of colored object based on dynamic weight
WO2018163530A1 (en) Three-dimensional shape measurement device, three-dimensional shape measurement method, and program
JP6634842B2 (en) Information processing apparatus, information processing method and program
CN112292577A (en) Three-dimensional measuring device and method
KR101766468B1 (en) Method for 3D shape measuring using of Triple Frequency Pattern
US20180180407A1 (en) Image processing apparatus and image processing method
CN104266606B (en) Calibration method for infrared/visible light target surface of 2CCD camera
JP5545932B2 (en) 3D shape measuring device
JP7279596B2 (en) Three-dimensional measuring device
JP7276166B2 (en) Three-dimensional measuring device
US11906288B2 (en) Three-dimensional shape measuring method and three-dimensional shape measuring device
CN114731368A (en) Imaging apparatus, information processing apparatus, imaging method, and information processing method
JP7488451B2 (en) 3D measuring device
KR101465996B1 (en) Method for measurement of high speed 3d shape using selective long period
JP2012202771A (en) Three-dimensional surface shape calculation method of measuring target and three-dimensional surface shape measuring apparatus
JP2008170281A (en) Shape measuring apparatus and shape measuring method
JP7294026B2 (en) Stripe pattern image determination method
JP7791431B2 (en) 3D measurement system
JP7448824B2 (en) 3D measurement system and 3D measurement method
JP2020129187A (en) Outline recognition device, outline recognition system, and outline recognition method
JP6432968B2 (en) Object shape estimation apparatus and program
JP2011252835A (en) Three dimensional shape measuring device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230329

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230404

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230417

R150 Certificate of patent or registration of utility model

Ref document number: 7276166

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S802 Written request for registration of partial abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311802

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350