JP2018132452A - Image processor, image processing method, and program - Google Patents
Image processor, image processing method, and program Download PDFInfo
- Publication number
- JP2018132452A JP2018132452A JP2017027298A JP2017027298A JP2018132452A JP 2018132452 A JP2018132452 A JP 2018132452A JP 2017027298 A JP2017027298 A JP 2017027298A JP 2017027298 A JP2017027298 A JP 2017027298A JP 2018132452 A JP2018132452 A JP 2018132452A
- Authority
- JP
- Japan
- Prior art keywords
- data
- reflectance
- height
- image processing
- 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
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
本発明は、物体の三次元形状の測定に関する画像処理技術に関する。 The present invention relates to an image processing technique related to measurement of a three-dimensional shape of an object.
従来、物体の三次元形状を測定する方法として位相シフト法が知られている。位相シフト法では、明暗の縞パターンを位相をずらしながら対象物体に複数回投影し、縞パターンが投影された対象物体を撮像する。例えば、最初に投影した縞パターンに対して位相を2π/3、4π/3ずらしたパターンを投影し、対象物体を撮像することによって3種類の画像を取得する。このとき、撮像した各画像における同一画素位置の画素値(輝度)を用いて演算処理することにより各画素の位相が得られる。位相は投影装置における投影角度に対応するため、投影装置と撮像装置との位置関係が既知であれば、三角測量の原理から対象物の三次元形状が得られる。 Conventionally, a phase shift method is known as a method for measuring the three-dimensional shape of an object. In the phase shift method, a bright and dark stripe pattern is projected onto the target object a plurality of times while shifting the phase, and the target object on which the stripe pattern is projected is imaged. For example, three types of images are acquired by projecting a pattern whose phase is shifted by 2π / 3 and 4π / 3 with respect to the initially projected fringe pattern and imaging the target object. At this time, the phase of each pixel is obtained by performing arithmetic processing using the pixel value (luminance) at the same pixel position in each captured image. Since the phase corresponds to the projection angle in the projection device, if the positional relationship between the projection device and the imaging device is known, the three-dimensional shape of the object can be obtained from the principle of triangulation.
位相シフト法においては、対象物体の光の反射率に応じて投影された縞パターンのコントラストが異なってしまう。対象物体の反射率が低い場合には、撮像された縞パターンがノイズに埋もれてしまう。一方で、反射率が高い場合には、撮像された縞パターンの一部が飽和してしまう。つまり、何れの場合も各画素の位相を正確に得ることができず、物体の三次元形状を正確に得ることはできない。位相シフト法によって物体の三次元形状を正確に得る技術として、特許文献1の技術がある。特許文献1の技術では、複数の光量で投影パターンを投影し、撮像した複数の画像から画素ごとに縞パターンのコントラストが高いものを選択している。 In the phase shift method, the contrast of the projected fringe pattern differs according to the light reflectance of the target object. When the reflectance of the target object is low, the captured stripe pattern is buried in noise. On the other hand, when the reflectance is high, a part of the captured stripe pattern is saturated. That is, in any case, the phase of each pixel cannot be obtained accurately, and the three-dimensional shape of the object cannot be obtained accurately. As a technique for accurately obtaining a three-dimensional shape of an object by a phase shift method, there is a technique disclosed in Patent Document 1. In the technique of Patent Document 1, a projection pattern is projected with a plurality of light amounts, and a pattern with a high contrast of a stripe pattern is selected for each pixel from a plurality of captured images.
しかしながら、特許文献1の技術は、複数の光量で縞パターンを対象物体に投影し撮像するため、対象物体への光の曝露量が増え、対象物体へ与えるダメージが多くなってしまうという課題がある。 However, since the technique of Patent Document 1 projects and images a fringe pattern on a target object with a plurality of light quantities, there is a problem in that the amount of light exposure to the target object increases and damage to the target object increases. .
そこで本発明では、従来よりも対象物体への光の曝露量を増やすことなく、高精度に対象物体の三次元形状を得るための処理を提供することを目的とする。 Therefore, an object of the present invention is to provide a process for obtaining a three-dimensional shape of a target object with high accuracy without increasing the amount of exposure of light to the target object as compared with the prior art.
上記課題を解決するために、本発明に係る画像処理装置は、互いに異なる複数のパターンが投影された物体を撮像して得られた画像データに基づいて生成された、前記物体の高さ分布を表す高さデータを取得する第1取得手段と、前記高さ分布に対応する前記物体の反射率分布を表す反射率データを取得する第2取得手段と、前記反射率データに基づいて、前記反射率分布における第1領域に用いる平滑化フィルタのカットオフ周波数よりも、前記第1領域よりも反射率が大きい第2領域に用いる平滑化フィルタのカットオフ周波数の方が高くなるように、前記高さデータに対して平滑化フィルタによる平滑化処理を行う処理手段と、を有することを特徴とする。 In order to solve the above problems, an image processing apparatus according to the present invention uses a height distribution of an object generated based on image data obtained by imaging an object on which a plurality of different patterns are projected. Based on the reflectance data, the first obtaining means for obtaining the representing height data, the second obtaining means for obtaining the reflectance data representing the reflectance distribution of the object corresponding to the height distribution, and the reflectance data. The high frequency is set so that the cutoff frequency of the smoothing filter used for the second region having a higher reflectance than the first region is higher than the cutoff frequency of the smoothing filter used for the first region in the rate distribution. And processing means for performing a smoothing process on the data with a smoothing filter.
本発明は、従来よりも対象物体への光の曝露量を増やすことなく、高精度に対象物体の三次元形状を得ることができる。 The present invention can obtain the three-dimensional shape of the target object with high accuracy without increasing the amount of exposure of light to the target object as compared with the prior art.
[実施例1]
<3次元形状システムの装置構成について>
図1は、三次元形状測定システムの装置構成を示す図である。101は測定の対象となる被測定物体であり、102は被測定物体101を固定するための試料台である。103は三次元形状測定に必要な二次元のパターン画像を被測定物体101に投影するための投影装置である。投影装置103としては、640×480画素であり、LED光源を用いた単板モノクロのDLP方式プロジェクターを用いるが、これに限るものではない。被測定物体101上に二次元のパターン画像を投影できるものであればどのようなものであってもよい。104は、投影装置103によりパターン画像が投影された被測定物体101を撮像する撮像装置である。撮像装置104としては、8688×5792画素のCMOS方式のエリアセンサを有するDSLR(Digital Single Lens Reflex camra)に焦点距離が100mmのマクロレンズを組み合わせたものを用いる。また、撮像装置104は被測定物体101上の輝度に対し線形な信号値を得る光電変換特性を有しているものとする。また、記録される画像データは、各画素でRGB3チャンネルの色情報を有し、各チャンネルが16ビットで量子化されるものとする。尚、撮像装置104は、光電変換特性やチャンネル数、量子化ビット数など上記一例に限定するものではない。105は投影装置103及び撮像装置104を制御して得られた画像データから、被測定物体101の三次元形状を算出する処理を行う画像処理装置である。本実施例における画像処理装置105は、CPU、RAM(ランダムアクセスメモリ)等の主記憶装置、HD(ハードディスク)やフラッシュメモリ等の補助記憶装置を備えたPC(Personal Computer)として説明する。ただし、画像処理装置105は、PCに限るものではなく、マイクロコンピュータ等であってもよい。
[Example 1]
<Device configuration of 3D shape system>
FIG. 1 is a diagram illustrating a device configuration of a three-dimensional shape measurement system.
投影装置103及び撮像装置104は、不図示のUSB(Universal Serial Bus)等のインターフェースを介して画像処理装置105とそれぞれ接続されている。図1に示すように、本実施例では、撮像装置104は被測定物体101に正対するよう上方に配置され、斜め上方に投影装置103が配置されている。
The
<画像処理装置105において実行されるプログラムの機能構成について>
図2は画像処理装置105において実行されるプログラムの機能構成を示すブロック図である。尚、201はユーザからの操作を受け付ける入力装置であり、例えばキーボード、マウス等のデバイスである。また、202はユーザが入力した内容や測定条件、測定結果をユーザに提示する表示装置であり、液晶モニタ等のデバイスである。入力装置201、表示装置202は、何れも図1に不図示である。
<Functional Configuration of Program Executed in
FIG. 2 is a block diagram illustrating a functional configuration of a program executed in the
撮像ドライバ203は、撮像装置104を制御するための命令群であり、撮像装置104の撮像条件を変更する命令や撮像の実行を指示する命令、撮像によって得られた画像データを撮像装置104から画像処理装置105へ送信するための命令を含んでいる。また、投影ドライバ204は、投影装置103を制御するための命令群であり、パターン画像データを画像処理装置105から投影装置103へ送信するための命令や、投影を開始、終了する命令を含んでいる。同様に、入力ドライバ205は、入力装置201の制御をおこなう命令群、表示ドライバ206は表示装置202を制御する命令群である。
The
取得制御部207は、投影ドライバ204、撮像ドライバ203に命令を送り、被測定物体101の三次元形状を算出するために必要な撮像画像データを取得する一連の処理を行う命令群である。形状算出部208は、取得制御部207が取得した撮像画像データから被測定物体101の三次元形状を算出する命令群である。また、UI管理部209は、ユーザが入力装置201に入力した情報の管理や、測定結果を表示装置202に表示する等の処理を行うユーザインターフェース(UI)機能を有する命令群である。測定アプリケーション210は、207〜209の命令群を連動させ、1つの測定アプリケーションとして機能させるための命令群である。
The
<測定アプリケーション210の処理の流れについて>
図3は、測定アプリケーション210の処理の流れを説明するフローチャートである。測定アプリケーション210は、まず、ステップS301にて、取得制御部207の命令群を用いて被測定物体101上にパターン画像を投影し、撮像する一連の処理を実行する。ステップS301の処理が終了すると、ステップS302において形状算出部208の命令群を実行し、撮像によって得られた画像データから被測定物体101の三次元形状情報を算出する。本実施例において得られる三次元形状情報は、撮像装置104のエリアセンサの各画素の高さ情報を各32ビットの浮動小数点で記録した高さ画像(高さデータ)とするがこれに限るものではない。尚、高さ情報が表す高さは、試料台の表面からの被測定物体101の高さである。最後に、ステップS303において、ステップS302によって得られた三次元形状情報を表示装置202に表示し、処理を終了する。この処理は、3次元形状情報である高さデータの各画素に記録された高さを濃淡で示し二次元分布(高さ分布)を表示するなどの処理を行う。尚、ステップS303の処理を上記の処理に限定するものではなく、表示装置202に表示を行わず、不図示のHDやフラッシュメモリ等に直接記録するよう構成しても良い。
<About the processing flow of the
FIG. 3 is a flowchart for explaining the processing flow of the
<投影装置103が投影するパターン画像について>
図4は、投影装置103が投影するパターン画像を説明する図である。図4に示すパターン画像は、投影装置103の画素と1対1に対応する640×480画素、0(黒)〜255(白)の画素値をとる8ビットのグレースケール画像であるものとして説明する。尚、画素数、ビット深度、色数等はこれに限るものではない。
<Regarding Pattern Image Projected by
FIG. 4 is a diagram for explaining a pattern image projected by the
図4(a)〜(c)は、縞パターンを表すパターン画像である。本実施例ではこれらのパターン画像を被測定物体101に投影し、撮像された画像から位相を算出し、三次元形状を算出する。この縞パターンは、正弦波のパターンであり画素値は以下の式(1)〜式(3)で決定することができる。
4A to 4C are pattern images representing stripe patterns. In this embodiment, these pattern images are projected onto the measured
ここで、I1(j,i)は、図4(a)の位置(j,i)の画素値を示している。同様にI2(j,i)は図4(b)の画素値、I3(j,i)は図4(c)の画素値を示している。尚、jは画像の横方向、iは画像の縦方向の位置を示す添字である。また、Ncycleは正弦波1周期あたりの横方向の画素数を示すパラメータである。図4(d)は、I1、I2、I3のjに対する画素値の変化を示した図である。このように、図4(a)〜(c)に示した縞パターンは、1/3周期ずつ位相をシフトさせたパターンである。また、図4(e)は、図4(d)におけるjに対する位相の変化を示した図である。尚、位相ΦはI1、I2、I3から式(4)により算出したものである。 Here, I 1 (j, i) indicates the pixel value at position (j, i) in FIG. Similarly, I 2 (j, i) represents the pixel value in FIG. 4B, and I 3 (j, i) represents the pixel value in FIG. 4C. Note that j is a subscript indicating the position of the image in the horizontal direction, and i is the vertical position of the image. N cycle is a parameter indicating the number of pixels in the horizontal direction per cycle of the sine wave. FIG. 4D is a diagram illustrating changes in pixel values with respect to j of I 1 , I 2 , and I 3 . As described above, the stripe patterns shown in FIGS. 4A to 4C are patterns in which the phase is shifted by 1/3 period. FIG. 4 (e) is a diagram showing a change in phase with respect to j in FIG. 4 (d). Note that the phase Φ is calculated from I 1 , I 2 , and I 3 according to the equation (4).
ただし、Φ(j,i)は0〜2πの値をとるものとする。位相シフト法は、これらの縞パターンを被測定物体101に投影したときの位相の変化から三次元形状を推定する。尚、本実施例は1/3周期ずつ位相をシフトさせた3枚の縞パターンを用いたが、これに限るものではない。例えば、1/6周期ずつ位相をシフトさせた6枚の縞パターンであってもよい。また、縞パターンの波形は正弦波状に限らず、三角波等、位相が推定可能なものであればどのような波形であってもよい。
However, (phi) (j, i) shall take the value of 0-2 (pi). In the phase shift method, a three-dimensional shape is estimated from a change in phase when these fringe patterns are projected onto the
<三次元形状を算出する処理(S302)について>
図5は、ステップS302を実行する形状算出部208の機能構成を示すブロック図である。読み込み部501は、撮像装置104によって撮像され、HD等の記録媒体に記録された撮像画像データを読み込む。第1生成部502は、図4(a)〜(c)のパターン画像に対応する3枚の画像データから式(4)に従って各画素の位相を算出し、位相画像データを生成する。このとき、位相は、画像データのGチャンネルのみを使用して算出する。尚、R、G、Bの各チャンネルを所定の重みで加算した輝度情報から算出しても良い。また、位相画像データは、各画素1チャンネル、0〜2πまでの値をとる32ビットの浮動小数点の画素値が記録された画像データとして不図示のRAM等の記録媒体に記録されるものとするが、これに限るものではない。
<About the process of calculating the three-dimensional shape (S302)>
FIG. 5 is a block diagram illustrating a functional configuration of the
第2生成部503は、被測定物体101の反射率分布を推定し、被測定物体101の反射率分布を表す反射率データを生成する。この反射率データは、位相画像データの各画素に対応する振幅値を反射率として算出することで得られる。各画素の反射率(振幅値)Aは式(5)により算出できる。
The
反射率データは、32ビットの浮動小数点の反射率(振幅値)が記録された画像データとして不図示のRAM等の記録媒体に記録される。 The reflectance data is recorded on a recording medium such as a RAM (not shown) as image data in which a 32-bit floating point reflectance (amplitude value) is recorded.
図4(e)に示した図と同様に、位相画像データが表す位相画像は0〜2πの値を投影した縞パターンの周期に応じて繰り返すため、0と2πとの間で位相値が不連続となる。接続部504は、この不連続が生じないよう、N番目の周期の位相値に2πNを加えることによって位相を接続する。周期を示す番号Nは、位相画像を幅方向にスキャンしたときに不連続点があらわれたらNに1を加える処理を行うことで特定することができる。あるいは、周期を特定するためのグレイコードなどのパターン画像を投影し、撮像することで周期の特定を行ってもよい。以下、位相接続された位相画像データの位相値をΦCとする。
Similar to the diagram shown in FIG. 4E, the phase image represented by the phase image data repeats according to the period of the fringe pattern onto which the value of 0 to 2π is projected, and therefore the phase value is not between 0 and 2π. It will be continuous. The connecting
第3生成部505は、位相接続された位相画像データが表す位相値ΦCから高さHを算出し、当該高さHを表す高さデータを生成する。各画素の高さは、式(6)によって算出できる。
H(j,i)=α(ΦC(j,i)−ΦR(j,i))・・・式(6)
ここで、ΦRはリファレンスとして試料台102を測定した場合の、位相接続後の位相画像データが表す位相値である。リファレンスとなる位相画像データは予めHD等に保存されている。このΦRは、被測定物体101を除いた試料台102のみに対して接続部504による位相接続までの測定および処理を行うことによって取得できる。また、αは係数であり、位相の周期の長さや投影装置103の光軸と試料台102の法線とのなす角度に応じて予め決定された値である。
H (j, i) = α (Φ C (j, i) −Φ R (j, i)) (6)
Here, [Phi R in the case of measuring the
ノイズ低減部506は、第2生成部503で生成した反射率データに基づき、第3生成部505で生成した高さデータに対してノイズ低減処理を行う。処理の詳細は後述する。
The
図6は、三次元形状を算出する処理(S302)の流れを説明するフローチャートである。まず、ステップS601において、第1生成部502が位相画像データを生成する。次に、ステップS602において、第2生成部503が反射率データを生成する。そして、ステップS603において、接続部504が位相接続を行い、S604において、第3生成部505が高さデータを生成する。最後に、ステップS605において、ノイズ低減部506が高さデータに対してノイズ低減処理を行う。
FIG. 6 is a flowchart for explaining the flow of the process (S302) for calculating the three-dimensional shape. First, in step S601, the
<ノイズを低減する処理(S605)について>
図8は、式(4)のI1、I2、I3が表す正弦波信号の位相値の標準偏差を、反射率(振幅値)を横軸にしてプロットした図である。尚、当該正弦波信号には、標準偏差が0.4の正規分布特性を有するノイズを加えてある。この図から、式(4)により位相値を算出すると、正弦波の振幅値が低いときに急激に位相値の標準偏差が大きくなり、位相値がばらつくことがわかる。一般に、被測定物体101の反射率が低い場合、投影された正弦波パターンが被測定物体101で反射され、撮像装置104に入る光量が少なくなる。そのため、撮像された正弦波の振幅値が少なくなり、さらに撮像装置104のノイズが加わると位相値がばらつき、それに応じて式(6)で算出される高さもばらついてしまう。特に被測定物体101の領域ごとに反射率が大きく異なる場合には、反射率が高く明るいところノイズが小さく、反射率が低く暗いところでノイズが大きくなってしまう。この暗部でノイズが大きくなる高さデータを3Dプリンタ等で再現すると違和感のある不自然な再現となってしまう。そこで本実施例においては、どの反射率でもノイズが一様となるようノイズ低減を行う。尚、本実施例においては、高さデータに対して平滑化フィルタを用いたフィルタ処理(平滑化処理)を行うことによってノイズを低減する。
<Noise Reduction Processing (S605)>
FIG. 8 is a diagram in which the standard deviation of the phase value of the sine wave signal represented by I 1 , I 2 , and I 3 in Equation (4) is plotted with the reflectance (amplitude value) on the horizontal axis. Note that noise having a normal distribution characteristic with a standard deviation of 0.4 is added to the sine wave signal. From this figure, it can be seen that when the phase value is calculated by equation (4), the standard deviation of the phase value suddenly increases and the phase value varies when the amplitude value of the sine wave is low. In general, when the reflectance of the object to be measured 101 is low, the projected sine wave pattern is reflected by the object to be measured 101 and the amount of light entering the
図7は、ノイズ低減部506で行われるノイズ低減処理(S605)の流れを説明するフローチャートである。まずステップS701において、ノイズ低減処理に用いる平滑化フィルタのフィルタ係数を決定する。ステップS604において生成された高さデータの各画素について、着目画素の周辺画素におけるフィルタ係数を決定する。具体的には、着目画素(j、i)の周辺画素の位置を(x,y)とすると、式(7)によって係数Cを決定する。
FIG. 7 is a flowchart illustrating the flow of the noise reduction process (S605) performed by the
if(│j−x│<N/2)∩(│i−y│<N/2)
C(x,y)=1
otherwise
C(x,y)=1
・・・式(7)
ただし、Nはフィルタサイズであり、式(8)によって決定される。
if (│j-x│ <N / 2) ∩ (│i-y│ <N / 2)
C (x, y) = 1
otherwise
C (x, y) = 1
... Formula (7)
However, N is a filter size, and is determined by Expression (8).
N=αA(j,i)−β・・・式(8)
フィルタサイズNは、反射率データが表す反射率Aのβ乗に反比例するよう決定される。尚、α、βは予め設定された定数であり、α≧0、β≧1の値をとる。
N = αA (j, i) −β (8)
The filter size N is determined to be inversely proportional to the β power of the reflectance A represented by the reflectance data. Α and β are preset constants and take values of α ≧ 0 and β ≧ 1.
ステップS702において、ステップS701で算出したフィルタ係数に基づき、高さHを表す高さデータに対して式(9)により平滑化処理を行う。 In step S702, based on the filter coefficient calculated in step S701, the height data representing the height H is subjected to smoothing processing according to equation (9).
H’(j,i)=Σx,yC(x,y)H(j+x,i+y)/Σx,yC(x,y)
・・・式(9)
ここで、H’は平滑化処理後の高さデータが表す高さである。
H ′ (j, i) = Σx , y C (x, y) H (j + x, i + y) / Σ x, y C (x, y)
... Formula (9)
Here, H ′ is the height represented by the height data after the smoothing process.
ステップS703において、全画素を着目画素として処理したか確認し、処理されていない場合は画素の位置を示す変数j、iを更新し、ステップS701に処理を戻す。全画素について処理された場合は、平滑化処理後の高さデータをRAMまたはHD等のメモリに記憶させて処理を終了する。 In step S703, it is confirmed whether all the pixels have been processed as the target pixel. If not, the variables j and i indicating the pixel positions are updated, and the process returns to step S701. If all pixels have been processed, the height data after the smoothing process is stored in a memory such as RAM or HD, and the process is terminated.
尚、式(8)において、βの値は図8に示した特性の横軸を反射率Aの値とみなしてフィッティングすることで決定することができる。一般に、母集団が正規分布に従うと仮定したとき、標本平均の推定誤差は標本数をMとしたとき1/√Mとなる。式(7)および式(9)で示した方法による平滑化は、N×Nの画素を標本とし平均を推定することとほぼ等しく、平滑化後の画素の推定精度、すなわちノイズ量は1/Nとなる。そこで、式(8)に示したように、反射率に応じて、高さデータのノイズ量と比例するようNを決定すると、どの反射率においてもノイズ量が均一な高さデータを得ることができる。 In equation (8), the value of β can be determined by fitting the horizontal axis of the characteristic shown in FIG. 8 as the value of reflectance A. In general, assuming that the population follows a normal distribution, the estimation error of the sample mean is 1 / √M when the number of samples is M. Smoothing by the methods shown in Equations (7) and (9) is almost equivalent to estimating the average using N × N pixels as samples, and the estimation accuracy of the pixels after smoothing, that is, the noise amount is 1 / N. Therefore, as shown in Expression (8), if N is determined in proportion to the amount of noise in the height data according to the reflectance, height data with a uniform amount of noise can be obtained at any reflectance. it can.
以上で説明したように、本実施例では、被測定物体101の反射率分布に応じて適応的にノイズ低減を行う。これにより、投影パターンの光量を変えて撮像を複数回行う必要なく、どの反射率においてもノイズ量が均一な高さデータ(三次元形状情報)を得ることができる。また、反射率、つまり被測定物体101で反射した光量に応じて適応的にノイズ低減を行うため、投影装置103として比較的光の強度の弱い投影装置を用いても被測定物体101の反射率分布によらずノイズが均一な三次元形状情報を得ることができる。すなわち、被測定物体101への光の曝露によるダメージを軽減することが可能となる。また、撮像装置104の露光量が少なくてもノイズが均一な三次元形状情報が得られるため、撮像装置としてより安価なものが利用可能であると同時に、シャッター速度を短く設定できるため、測定時間を短縮することが可能である。
As described above, in this embodiment, noise reduction is adaptively performed according to the reflectance distribution of the measured
[変形例]
<変形例1>
実施例1においては、画像処理装置105が投影装置103および撮像装置104を制御することによって画像データを取得し、取得した画像データから反射率データおよび高さデータを生成していたが、上記一例には限定されない。予め投影装置103および撮像装置104を用いて、実施例1と同様の処理から反射率データおよび高さデータを予め生成しておいて、RAMまたはHD等のメモリに記憶させておく。画像処理装置105は、記憶させておいた反射率データおよび高さデータをメモリから取得し、実施例1のノイズ低減処理を行うのみでもよい。この場合の画像処理装置105における形状算出部208の機能構成を図9に示す。この構成により、反射率データおよび高さデータの生成を行わずにノイズが均一な三次元形状情報を得ることができる。
[Modification]
<Modification 1>
In the first embodiment, the
<変形例2>
実施例1における平滑化フィルタは公知の移動平均フィルタであり、フィルタ係数を式(7)によって決定した。しかし、平滑化フィルタは移動平均フィルタに限定されず、公知のガウシアンフィルタを用いてもよい。この場合、フィルタ係数は以下の式(10)を用いて決定する。
<Modification 2>
The smoothing filter in Example 1 is a known moving average filter, and the filter coefficient was determined by Equation (7). However, the smoothing filter is not limited to the moving average filter, and a known Gaussian filter may be used. In this case, the filter coefficient is determined using the following equation (10).
ここで、σ=N/4である。このようにガウス分布関数に比例するよう係数を決定することによって、平滑化フィルタにおける着目画素(j,i)と周辺画素(x,y)との距離に応じて平滑化の重みを設定できるため、より好適な平滑化処理を行うことができる。 Here, σ = N / 4. Since the coefficient is determined to be proportional to the Gaussian distribution function in this way, the smoothing weight can be set according to the distance between the pixel of interest (j, i) and the surrounding pixel (x, y) in the smoothing filter. More suitable smoothing processing can be performed.
<変形例3>
実施例1では、フィルタサイズNが反射率Aと反比例の関係にあるとして式(8)によってNを決定したが、上記一例に限定されない。図8の特性が横軸(反射率)の対数と比例関係にあるとみなし、式(11)を用いてフィルタサイズNを決定してもよい。
<Modification 3>
In the first embodiment, N is determined by Expression (8) on the assumption that the filter size N is inversely proportional to the reflectance A, but is not limited to the above example. The filter size N may be determined using Equation (11) assuming that the characteristic of FIG. 8 is proportional to the logarithm of the horizontal axis (reflectance).
N=α−β・log(A(j,i))・・・式(11)
このとき、定数α、βはα≧0、β≧0の値をとる。
N = α−β · log (A (j, i)) (11)
At this time, the constants α and β have values of α ≧ 0 and β ≧ 0.
式(10)をフーリエ変換し、カットオフ周波数ωCを振幅が1/√2となるときの周波数とすると、以下の式(12)が得られる。 Equation (10) and Fourier transform, if the frequency at which the amplitude of the cut-off frequency omega C becomes 1 / √2, of formula (12) below is obtained.
式(7)をフーリエ変換し、カットオフ周波数を求めても同様の結果が得られる。式(12)より、平滑化フィルタのカットオフ周波数が高くなると、フィルタサイズが小さくなることがわかる。実施例1において用いる平滑化フィルタは、式(8)又は式(11)のように、反射率が大きい領域ではフィルタサイズが小さくなるように設計されている。このため、実施例1において用いる平滑化フィルタは、反射率が大きい(光量が多い)領域ではカットオフ周波数が高くなるように設計されていればよい。 A similar result can be obtained by calculating the cut-off frequency by Fourier transform of Equation (7). From equation (12), it can be seen that the filter size decreases as the cutoff frequency of the smoothing filter increases. The smoothing filter used in the first embodiment is designed so that the filter size becomes small in a region where the reflectance is large, as in Expression (8) or Expression (11). For this reason, the smoothing filter used in Example 1 should just be designed so that a cutoff frequency may become high in the area | region where a reflectance is large (the amount of light is large).
<変形例4>
実施例1においては、撮像装置104を1台利用し、位相シフト法により三次元形状測定を行う例を示したが、これに限るものではなく、位相画像を算出する三次元形状測定の方法であればどのような方式でもよい。例えば、複数台の撮像装置を用い、それらから算出した位相画像をステレオマッチング法により対応させ、三角測量の原理により三次元形状を取得するいわゆるステレオ位相シフト法を用いてもよい。
<Modification 4>
In the first embodiment, an example in which one
<変形例5>
第2生成部503は、位相に対応する振幅値を算出することによって反射率データを生成したがこれに限るものではない。例えば、投影装置103から全面白色の投影パターンを投影し、投影された被測定物体101を撮像装置104で撮像して得られた画像データから、輝度情報を算出し、反射率データとして用いるよう構成してもよい。また、第2生成部が生成するデータは反射率分布を表す反射率データに限定されず、被測定物体101の光の反射率分布がわかれば、被測定物体101で反射した光の量の分布(光量分布)を表す光量データや輝度分布を表す輝度データであってもよい。
<Modification 5>
The
<変形例6>
実施例1では、ノイズ低減処理後の高さデータを表示装置202に表示する、もしくは、HDやフラッシュメモリ等に直接記録する。しかし、上記の例には限定されない。例えば、ノイズ低減処理後の高さデータに基づいて、インクジェットプリンタや3Dプリンタなどのプリンタが被測定物体101を表す画像又は三次元形状をプリントするためのプリントデータを生成しプリンタに出力してもよい。この場合、形状算出部208は、プリントデータ生成部およびプリントデータ出力部を有する。または、画像処理装置105が生成したプリントデータに基づいてプリントを行うプリント部を有していてもよい。尚、プリントデータは、例えば、色材量を表す色材量データや色材を記録するか否かの2値を表す2値データ、三次元形状を表すSTLデータなどである。
<Modification 6>
In the first embodiment, the height data after the noise reduction process is displayed on the
[その他の実施例]
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Examples]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
105 画像処理装置
901 第1取得部
902 第2取得部
506 ノイズ低減部
105
Claims (18)
前記高さ分布に対応する前記物体の反射率分布を表す反射率データを取得する第2取得手段と、
前記反射率データに基づいて、前記反射率分布における第1領域に用いる平滑化フィルタのカットオフ周波数よりも、前記第1領域よりも反射率が大きい第2領域に用いる平滑化フィルタのカットオフ周波数の方が高くなるように、前記高さデータに対して平滑化フィルタによる平滑化処理を行う処理手段と、
を有することを特徴とする画像処理装置。 First acquisition means for acquiring height data representing a height distribution of the object, generated based on image data obtained by imaging an object on which a plurality of different patterns are projected;
Second acquisition means for acquiring reflectance data representing the reflectance distribution of the object corresponding to the height distribution;
Based on the reflectance data, the cutoff frequency of the smoothing filter used for the second region having a higher reflectance than the first region than the cutoff frequency of the smoothing filter used for the first region in the reflectance distribution. Processing means for performing a smoothing process using a smoothing filter on the height data so that the height data is higher;
An image processing apparatus comprising:
前記第1制御手段によって制御された前記投影装置によって互いに異なる複数のパターンが投影された前記物体を撮像するように、撮像装置を制御する第2制御手段と、
前記第2制御手段によって制御された前記撮像手段の撮像によって得られた複数の前記画像データに基づいて、前記高さデータを生成する高さデータ生成手段と、をさらに有し、
前記第1取得手段は、前記高さデータ生成手段によって生成された前記高さデータを取得することを特徴とする請求項1乃至請求項9のいずれか一項に記載の画像処理装置。 First control means for controlling the projection device to project a plurality of different patterns on the object;
Second control means for controlling the imaging apparatus so as to image the object on which a plurality of different patterns are projected by the projection apparatus controlled by the first control means;
Height data generating means for generating the height data based on a plurality of the image data obtained by imaging of the imaging means controlled by the second control means,
The image processing apparatus according to any one of claims 1 to 9, wherein the first acquisition unit acquires the height data generated by the height data generation unit.
前記投影手段によって互いに異なる複数のパターンが投影された前記物体を撮像する撮像手段と、
前記撮像手段の撮像によって得られた複数の前記画像データに基づいて、前記高さデータを生成する高さデータ生成手段と、をさらに有し、
前記第1取得手段は、前記高さデータ生成手段によって生成された前記高さデータを取得することを特徴とする請求項1乃至請求項9のいずれか一項に記載の画像処理装置。 Projecting means for projecting a plurality of different patterns onto the object;
Imaging means for imaging the object on which a plurality of different patterns are projected by the projection means;
Height data generating means for generating the height data based on a plurality of the image data obtained by imaging by the imaging means,
The image processing apparatus according to any one of claims 1 to 9, wherein the first acquisition unit acquires the height data generated by the height data generation unit.
前記プリントデータを前記プリンタに出力するプリントデータ出力手段と、
をさらに有することを特徴とする請求項1乃至請求項11のいずれか一項に記載の画像処理装置。 Print data generation means for generating print data for a printer to print a three-dimensional shape representing the object based on the height data smoothed by the processing means;
Print data output means for outputting the print data to the printer;
The image processing apparatus according to claim 1, further comprising:
前記プリントデータに基づいて、前記物体を表す三次元形状をプリントするプリント手段と、
をさらに有することを特徴とする請求項1乃至請求項11のいずれか一項に記載の画像処理装置。 Print data generation means for generating print data for a printer to print a three-dimensional shape representing the object, based on the height data smoothed by the processing means;
Printing means for printing a three-dimensional shape representing the object based on the print data;
The image processing apparatus according to claim 1, further comprising:
前記高さ分布に対応する、前記物体において反射した光の光量分布を表す光量データを取得する第2取得手段と、
前記光量データに基づいて、前記光量分布における第1領域に用いる平滑化フィルタのカットオフ周波数よりも、前記第1領域よりも光量が多い第2領域に用いる平滑化フィルタのカットオフ周波数の方が高くなるように、前記高さデータに対して平滑化フィルタによる平滑化処理を行う処理手段と、
を有することを特徴とする画像処理装置。 First acquisition means for acquiring height data representing a height distribution of the object, generated based on image data obtained by imaging an object on which a plurality of different patterns are projected;
Second acquisition means for acquiring light amount data representing a light amount distribution of light reflected from the object corresponding to the height distribution;
Based on the light amount data, the cutoff frequency of the smoothing filter used for the second region having a larger amount of light than the first region is greater than the cutoff frequency of the smoothing filter used for the first region in the light amount distribution. Processing means for performing a smoothing process by a smoothing filter on the height data so as to be higher;
An image processing apparatus comprising:
前記高さ分布に対応する前記物体の反射率分布を表す反射率データを取得する第2取得ステップと、
前記反射率データに基づいて、前記反射率分布における第1領域に用いる平滑化フィルタのカットオフ周波数よりも、前記第1領域よりも反射率が大きい第2領域に用いる平滑化フィルタのカットオフ周波数の方が高くなるように、前記高さデータに対して平滑化フィルタによる平滑化処理を行う処理ステップと、
を有することを特徴とする画像処理方法。 A first acquisition step of acquiring height data representing a height distribution of the object generated based on image data obtained by imaging an object on which a plurality of different patterns are projected;
A second acquisition step of acquiring reflectance data representing the reflectance distribution of the object corresponding to the height distribution;
Based on the reflectance data, the cutoff frequency of the smoothing filter used for the second region having a higher reflectance than the first region than the cutoff frequency of the smoothing filter used for the first region in the reflectance distribution. A processing step of performing a smoothing process by a smoothing filter on the height data so that the height is higher;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017027298A JP2018132452A (en) | 2017-02-16 | 2017-02-16 | Image processor, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017027298A JP2018132452A (en) | 2017-02-16 | 2017-02-16 | Image processor, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018132452A true JP2018132452A (en) | 2018-08-23 |
JP2018132452A5 JP2018132452A5 (en) | 2020-04-02 |
Family
ID=63248749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017027298A Pending JP2018132452A (en) | 2017-02-16 | 2017-02-16 | Image processor, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018132452A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116608794A (en) * | 2023-07-17 | 2023-08-18 | 山东科技大学 | Anti-texture 3D structured light imaging method, system, device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002257528A (en) * | 2001-03-02 | 2002-09-11 | Ricoh Co Ltd | Three-dimensional shape measuring device by phase shift method |
JP2004317495A (en) * | 2003-03-31 | 2004-11-11 | Mitsutoyo Corp | Method and instrument for measuring noncontactly three-dimensional shape |
JP2015197297A (en) * | 2014-03-31 | 2015-11-09 | ダイハツ工業株式会社 | shape recognition device |
JP2016180708A (en) * | 2015-03-24 | 2016-10-13 | キヤノン株式会社 | Distance measurement device, distance measurement method and program |
-
2017
- 2017-02-16 JP JP2017027298A patent/JP2018132452A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002257528A (en) * | 2001-03-02 | 2002-09-11 | Ricoh Co Ltd | Three-dimensional shape measuring device by phase shift method |
JP2004317495A (en) * | 2003-03-31 | 2004-11-11 | Mitsutoyo Corp | Method and instrument for measuring noncontactly three-dimensional shape |
JP2015197297A (en) * | 2014-03-31 | 2015-11-09 | ダイハツ工業株式会社 | shape recognition device |
JP2016180708A (en) * | 2015-03-24 | 2016-10-13 | キヤノン株式会社 | Distance measurement device, distance measurement method and program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116608794A (en) * | 2023-07-17 | 2023-08-18 | 山东科技大学 | Anti-texture 3D structured light imaging method, system, device and storage medium |
CN116608794B (en) * | 2023-07-17 | 2023-10-03 | 山东科技大学 | Anti-texture 3D structured light imaging method, system, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10430962B2 (en) | Three-dimensional shape measuring apparatus, three-dimensional shape measuring method, and storage medium that calculate a three-dimensional shape of an object by capturing images of the object from a plurality of directions | |
JP5032943B2 (en) | 3D shape measuring apparatus and 3D shape measuring method | |
JP5517829B2 (en) | Three-dimensional measuring apparatus and three-dimensional measuring method | |
JP4830871B2 (en) | 3D shape measuring apparatus and 3D shape measuring method | |
US11295426B2 (en) | Image processing system, server apparatus, image processing method, and image processing program | |
JP6444233B2 (en) | Distance measuring device, distance measuring method, and program | |
WO2018163529A1 (en) | Three-dimensional-shape measurement device, three-dimensional-shape measurement method, and program | |
KR101173668B1 (en) | method and apparatus for measuring depth of three dimensional object with multiple spatial frequencies | |
JP6418884B2 (en) | Three-dimensional measuring apparatus, three-dimensional measuring method and program | |
JP2020004085A (en) | Image processor, image processing method and program | |
JP2022022326A (en) | Three-dimensional shape measurement device, method for measuring three-dimensional shape, program, and recording medium | |
JP2018009927A (en) | Image processing device, image processing method and program | |
JP2004133919A (en) | Device and method for generating pseudo three-dimensional image, and program and recording medium therefor | |
JP2017134561A (en) | Image processing device, imaging apparatus and image processing program | |
JP2018132452A (en) | Image processor, image processing method, and program | |
JP2009236696A (en) | Three-dimensional image measurement method, measurement system, and measurement program for subject | |
JP5474113B2 (en) | Image processing apparatus and image processing method | |
KR101653649B1 (en) | 3D shape measuring method using pattern-light with uniformity compensation | |
JP2009244229A (en) | Three-dimensional image processing method, three-dimensional image processing device, and three-dimensional image processing program | |
JP4091455B2 (en) | Three-dimensional shape measuring method, three-dimensional shape measuring apparatus, processing program therefor, and recording medium | |
JP2019105656A (en) | Measuring device and method for controlling the same | |
JP2018169274A (en) | Image processor, image processing method, and program | |
CN116105632B (en) | Self-supervision phase unwrapping method and device for structured light three-dimensional imaging | |
JP6292947B2 (en) | Image processing apparatus, image processing method, and program | |
JP3178436B2 (en) | Phase connection method and apparatus, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200214 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200214 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210114 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210202 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210331 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20211005 |