JP7071633B2 - Distance measuring device, distance measuring method and distance measuring program - Google Patents
Distance measuring device, distance measuring method and distance measuring program Download PDFInfo
- Publication number
- JP7071633B2 JP7071633B2 JP2018128890A JP2018128890A JP7071633B2 JP 7071633 B2 JP7071633 B2 JP 7071633B2 JP 2018128890 A JP2018128890 A JP 2018128890A JP 2018128890 A JP2018128890 A JP 2018128890A JP 7071633 B2 JP7071633 B2 JP 7071633B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- distance
- polarized
- polarization
- depth
- 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
Links
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Optical Radar Systems And Details Thereof (AREA)
Description
本発明は、距離計測装置、距離計測方法および距離計測プログラムに関する。 The present invention relates to a distance measuring device, a distance measuring method, and a distance measuring program.
対象物までの距離を計測する測距技術の1つとして、TOF(Time Of Flight)方式がある。TOF方式は、対象物に対して測距用の光線を照射し、光線の照射から反射光が戻ってくるまでの時間に基づいて、対象物までの距離を計測する方式である。 There is a TOF (Time Of Flight) method as one of the distance measuring techniques for measuring the distance to an object. The TOF method is a method of irradiating an object with a light beam for distance measurement and measuring the distance to the object based on the time from the irradiation of the light ray to the return of the reflected light.
また、他の測距技術として、偏光方向の異なる直線偏光をカメラが受光して得られた画像を基に、偏光度を算出し、その偏光度に基づいて対象物までの距離を計測する技術も提案されている。 In addition, as another distance measuring technique, a technique for calculating the degree of polarization based on an image obtained by receiving linear polarization in different polarization directions by a camera and measuring the distance to an object based on the degree of polarization. Has also been proposed.
さらに、他の測距技術として、距離(デプス)センサから取得した距離画像と、上記のようにカメラから得られた偏光度を含む偏光画像の両方を用いて、距離センサだけを用いた場合より高精度に距離を計測するための技術も提案されている。 Furthermore, as another distance measuring technique, both the distance image acquired from the distance (depth) sensor and the polarized image including the degree of polarization obtained from the camera as described above are used, as compared with the case where only the distance sensor is used. Techniques for measuring distance with high accuracy have also been proposed.
ところで、TOFセンサとしては、ラインスキャン方式を用いて測距するものが多い。ラインスキャン方式のTOFセンサは、測距用の光線を、所定の第1の方向に延びる照射パターンとして発光し、このような照射パターンを第1の方向に直交する第2の方向に順次移動させながら、光線の反射光を受光する。 By the way, many TOF sensors measure a distance by using a line scan method. The line scan type TOF sensor emits a light beam for distance measurement as an irradiation pattern extending in a predetermined first direction, and sequentially moves such an irradiation pattern in a second direction orthogonal to the first direction. While receiving the reflected light of the light beam.
このようなラインスキャン方式のTOFセンサでは、対象物に対して照射パターンが発光される時刻が、第1の方向に対する位置によって異なる時刻となる。このため、移動する対象物を測距対称とした場合に、TOFセンサに写る対象物の像の形状が歪むことがある。このような像の形状の歪みが生じると、測距精度が悪化するという問題がある。 In such a line scan type TOF sensor, the time at which the irradiation pattern is emitted to the object is different depending on the position with respect to the first direction. Therefore, when the moving object is distance-measured symmetric, the shape of the image of the object reflected on the TOF sensor may be distorted. When such distortion of the shape of the image occurs, there is a problem that the distance measurement accuracy deteriorates.
1つの側面では、本発明は、移動する対象物までの距離を高精度に計測可能な距離計測装置、距離計測方法および距離計測プログラムを提供することを目的とする。 In one aspect, it is an object of the present invention to provide a distance measuring device, a distance measuring method, and a distance measuring program capable of measuring a distance to a moving object with high accuracy.
1つの案では、次のような記憶部と演算部とを有する距離計測装置が提供される。記憶部は、TOFセンサから取得された第1の距離画像と、それぞれ異なる偏光方向の直線偏光を受光する複数のカメラから取得された複数の画像に基づいて画素ごとに偏光度を算出することで生成された第1の偏光画像とを記憶する。演算部は、第1の距離画像に基づいて画素ごとに偏光度を算出することで生成された第2の偏光画像と、第1の偏光画像との比較結果に基づいて、第1の距離画像を変形させ、変形によって得られた第2の距離画像を出力する。 One proposal provides a distance measuring device having the following storage unit and arithmetic unit. The storage unit calculates the degree of polarization for each pixel based on the first distance image acquired from the TOF sensor and a plurality of images acquired from a plurality of cameras that receive linear polarization in different polarization directions. The generated first polarized image is stored. The calculation unit calculates the degree of polarization for each pixel based on the first distance image, and the first distance image is based on the comparison result between the second polarized image and the first polarized image. Is transformed, and the second distance image obtained by the transformation is output.
また、1つの案では、上記の距離計測装置と同様の処理をコンピュータが実行する距離計測方法が提供される。
さらに、1つの案では、上記の距離計測装置と同様の処理をコンピュータに実行させる距離計測プログラムが提供される。
Further, in one proposal, a distance measuring method is provided in which a computer executes the same processing as the above-mentioned distance measuring device.
Further, in one proposal, a distance measuring program for causing a computer to perform the same processing as the above-mentioned distance measuring device is provided.
1つの側面では、移動する対象物までの距離を高精度に計測できる。 On one side, the distance to a moving object can be measured with high accuracy.
以下、本発明の実施の形態について図面を参照して説明する。
〔第1の実施の形態〕
図1は、第1の実施の形態に係る距離計測装置の構成例および処理例を示す図である。図1に示す距離計測装置1は、TOFセンサ2による計測結果と、複数のカメラによる撮像画像とを用いて、TOFセンサ2と、距離の計測対象とする図示しない対象物との間の距離を、対象物が写った画像の画素ごとに計測する装置である。TOFセンサ2は、被写体に対して測距用の光線を発光し、光線の発光からその反射光を受光するまでの往復時間に基づいて、被写体の距離(デプス)を計測する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram showing a configuration example and a processing example of the distance measuring device according to the first embodiment. The
距離計測装置1は、記憶部1aと演算部1bを有する。記憶部1aは、例えば、距離計測装置1が備える図示しない記憶装置の記憶領域として実現される。演算部1bは、例えば、距離計測装置1が備える図示しないプロセッサとして実現される。
The distance measuring
記憶部1aには、TOFセンサ2から取得された距離画像11(第1の距離画像)と、複数のカメラからそれぞれ取得された複数の画像に基づいて生成される偏光画像12(第1の偏光画像)とが記憶される。本実施の形態では、例として、偏光画像12の生成のために3台のカメラ3a~3cが用いられるものとするが、4台以上のカメラが用いられてもよい。
In the
カメラ3a,3b,3cは、それぞれ異なる偏光方向の直線偏光を受光することで、それぞれ画像4a,4b,4cを出力する。例えば、カメラ3aは0°の直線偏光を受光し、カメラ3bは45°の直線偏光を受光し、カメラ3cは90°の直線偏光を受光する。偏光画像12は、画像4a~4cに基づいて画素ごとに偏光度を算出することで生成される。
The
ここで、カメラ3a~3cは、同一の撮影時刻に画像4a~4cを撮像する。「同一の撮影時刻」とは、画像4a~4cの全体において露光期間が同一であることを意味する。一方、TOFセンサ2は、距離画像11の全体で測距用の光線の反射光を同一時刻に受光できない構造のため、距離画像11においては距離の計測時刻が部分的に異なる。例えば、ラインスキャン方式が用いられる場合、TOFセンサ2は、測距用の光線を所定の第1方向(例えば、縦方向)に延びる照射パターンとして発光する。そして、TOFセンサ2は、このような照射パターンを第1方向に直交する第2方向(例えば、横方向)に順次移動させながら、光線の反射光を受光する。この場合、距離画像11上の第2方向に対する位置によって反射光の受光時刻が異なる時刻となるので、第2方向に対する位置によって距離の計測時刻も異なる時刻となる。
Here, the
このように、距離画像11においては、距離の計測時刻が画素の位置によって異なる。このため、移動する対象物を測距対象とした場合、距離画像11に写る対象物の像の形状が歪むことがある。このような像の形状の歪みが生じると、測距精度が悪化する。一方、上記のように、カメラ3a~3cによる画像4a~4cの撮影時刻は同一であり、画像4a~4cの全体において露光期間が同一となっている。このため、画像4a~4cから算出された偏光画像12には、上記のような対象物の移動に伴う像の形状歪みの影響は生じない。
As described above, in the
そこで、演算部1bは、次のような処理により、像の形状歪みの影響が生じない偏光画像12を用いて、距離画像11を補正する。演算部1bは、距離画像11に基づいて画素ごとに偏光度を算出することにより、偏光画像13(第2の偏光画像)を生成する。そして、演算部1bは、偏光画像12と偏光画像13とを比較し、その比較結果に基づいて距離画像11を変形させる。演算部1b、変形によって得られた距離画像14(第2の距離画像)を、像の形状歪みが低減された距離画像として出力する。
Therefore, the
このような処理により、演算部1bは、像の形状歪みの影響が生じない偏光画像12を基準として、像の形状歪みが低減されるように距離画像11を補正することができる。これにより、対象物が移動する場合に、その移動に伴う像の形状の歪みが距離の計測精度に与える影響を軽減でき、距離の計測精度を向上させることができる。
By such processing, the
〔第2の実施の形態〕
図2は、第2の実施の形態に係る形状計測システムの構成例を示す図である。図2に示す形状計測システムは、形状計測装置100とセンサユニット200とを含む。
[Second Embodiment]
FIG. 2 is a diagram showing a configuration example of the shape measurement system according to the second embodiment. The shape measuring system shown in FIG. 2 includes a
形状計測装置100は、被写体を写した画像をセンサユニット200から取得し、取得した画像に写る被写体とセンサユニット200との間のデプス(距離)を、画像上の画素ごとに計測する。例えば、計測の対象となる対象物300が画像に写っている場合、形状計測装置100は、画像に写っている対象物300の像について、画像の画素ごとにデプスを計測する。これによって、形状計測装置100は、対象物300の三次元形状を計測することができる。
The
センサユニット200は、TOFセンサ210とカメラ部220とを含む。TOFセンサ210は、TOF方式を用いて被写体のデプスを算出する。具体的には、TOFセンサ210は、被写体にレーザ光を発光し、その反射光が被写体から戻ってくるまでの往復時間に基づいて、被写体のデプスを算出する。TOFセンサ210は、画像上の画素ごとにデプスをプロットした「デプス画像」を、形状計測装置100に出力する。
The
一方、カメラ部220は、被写体からの光のうち、それぞれ異なる偏光方向の直線偏光の成分を受光することで得られる複数のカメラ画像を同時に撮像し、それらのカメラ画像を形状計測装置100に出力する。なお、形状計測装置100は、各カメラ画像として輝度画像を取得できればよい。この目的のために、カメラ部220が輝度画像を撮像する構成としてもよく、あるいは、カメラ部220がカラー画像を撮像し、形状計測装置100がカラー画像を輝度画像に変換する構成としてもよい。
On the other hand, the
形状計測装置100は、TOFセンサ210から出力されたデプスに基づくデプス画像を取得し、デプス画像に基づいて偏光画像を算出する。また、形状計測装置100は、カメラ部220から出力されたカメラ画像に基づいて偏光画像を算出する。後述するように、形状計測装置100は、デプス画像に基づく偏光画像とカメラ画像に基づく偏光画像の両方を用いることで、前者の偏光画像に現れる、対象物300の形状の歪みの影響を低減した、正確性の高いデプスを算出する。
The
図3は、形状計測装置およびセンサユニットのハードウェア構成例を示す図である。
まず、形状計測装置100は、例えば、図3に示すようなコンピュータとして実現される。図3に示す形状計測装置100は、プロセッサ101、RAM(Random Access Memory)102、HDD(Hard Disk Drive)103、グラフィック処理装置104、入力インタフェース105、読み取り装置106、ネットワークインタフェース107および通信インタフェース108を有する。
FIG. 3 is a diagram showing a hardware configuration example of the shape measuring device and the sensor unit.
First, the
プロセッサ101は、形状計測装置100全体を統括的に制御する。プロセッサ101は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)またはPLD(Programmable Logic Device)である。また、プロセッサ101は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。
The
RAM102は、形状計測装置100の主記憶装置として使用される。RAM102には、プロセッサ101に実行させるOS(Operating System)プログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、プロセッサ101による処理に必要な各種データが格納される。
The
HDD103は、形状計測装置100の補助記憶装置として使用される。HDD103には、OSプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、SSD(Solid State Drive)などの他の種類の不揮発性記憶装置を使用することもできる。
The
グラフィック処理装置104には、表示装置104aが接続されている。グラフィック処理装置104は、プロセッサ101からの命令にしたがって、画像を表示装置104aに表示させる。表示装置としては、液晶ディスプレイや有機EL(Electroluminescence)ディスプレイなどがある。
A
入力インタフェース105には、入力装置105aが接続されている。入力インタフェース105は、入力装置105aから出力される信号をプロセッサ101に送信する。入力装置105aとしては、キーボードやポインティングデバイスなどがある。ポインティングデバイスとしては、マウス、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。
An
読み取り装置106には、可搬型記録媒体106aが脱着される。読み取り装置106は、可搬型記録媒体106aに記録されたデータを読み取ってプロセッサ101に送信する。可搬型記録媒体106aとしては、光ディスク、光磁気ディスク、半導体メモリなどがある。
A
ネットワークインタフェース107は、ネットワーク107aを介して他の装置との間でデータの送受信を行う。
通信インタフェース108は、センサユニット200との間でデータの送受信を行う。
The
The
以上のようなハードウェア構成によって、形状計測装置100の処理機能を実現することができる。
一方、センサユニット200のTOFセンサ210は、赤外線発光部211と赤外線受光部212を有する。赤外線発光部211は、被写体に対して赤外線レーザを発光する。赤外線受光部212は、赤外線発光部211から発光された赤外線レーザの反射光を受光する。TOFセンサ210は、赤外線発光部211から発光された赤外線レーザの反射光が被写体から戻ってくるまでの往復時間を計測し、計測された往復時間に光速を乗算することによって、被写体のデプスを算出する。TOFセンサ210は、画像上の画素ごとにデプスをプロットしたデプス画像を形状計測装置100に出力する。
With the above hardware configuration, the processing function of the
On the other hand, the
また、センサユニットのカメラ部220は、カメラ221~223と偏光フィルタ221a~223aを有する。カメラ221~223のそれぞれは、例えば、RGB(Red/Green/Blue)カラー画像を撮影する。偏光フィルタ221a~223aは、入射光のうち特定の偏光方向の直線偏光を透過させる直線偏光板である。
Further, the
カメラ221の撮像面には、カメラ221の光軸を中心として0°の回転角で偏光フィルタ221aが配置され、カメラ221は偏光フィルタ221aを介して画像を撮像する。また、カメラ222の撮像面には、カメラ222の光軸を中心として45°の回転角で偏光フィルタ222aが配置され、カメラ222は偏光フィルタ222aを介して画像を撮像する。さらに、カメラ223の撮像面には、カメラ223の光軸を中心として90°の回転角で偏光フィルタ223aが配置され、カメラ223は偏光フィルタ223aを介して画像を撮像する。これにより、カメラ221は、0°の直線偏光を受光して得られたカメラ画像を出力し、カメラ222は、45°の直線偏光を受光して得られたカメラ画像を出力し、カメラ223は、90°の直線偏光を受光して得られたカメラ画像を出力する。
A
ここで、図示しないが、カメラ221~223はそれぞれグローバルシャッタを備えている。そして、カメラ221~223は、各グローバルシャッタを同期させて開閉することで、同一の撮影時刻に撮影された(すなわち、同一の露光期間に露光された)カメラ画像を出力することができるようになっている。
Here, although not shown, the
次に、図4は、TOFセンサによるデプス計測の問題点を説明するための図である。TOFセンサ210の赤外線発光部211は、赤外線レーザを直線状の照射パターンで照射し、その照射パターンを徐々にシフトすることで、デプス計測範囲の全体に赤外線レーザを照射する。図4の左側に示す例では、直線状の照射パターンを破線によって示している。この例では、照射パターンは上下方向に延びる直線形状をなしており、そのような照射パターンが右から左に対して徐々にシフトされて照射される。以下、照射パターンのシフト方向を「スキャン方向」と記載する。
Next, FIG. 4 is a diagram for explaining the problem of depth measurement by the TOF sensor. The infrared
このような方法で赤外線レーザが発光されることから、TOFセンサ210から出力されるデプス画像においては、スキャン方向に対する位置によってスキャン時刻(赤外線レーザの反射光の受光時刻)が異なる時刻になってしまう。このことは、例えば、移動する対象物300の三次元形状を計測する場合に、計測結果が不正確になる原因となる。
Since the infrared laser is emitted by such a method, in the depth image output from the
図4では、スキャン方向が右から左への方向であり、なおかつ、対象物300が上から下に対して移動する場合を例示している。この場合、図4の右側に示すように、デプス画像に写る対象物300の像301は、左側ほど位置が下側にずれた形状になってしまう。このように、対象物300が移動する場合には、対象物300の像301の形状に歪みが生じる可能性がある。このような像301の形状の歪みによって、計測されるデプスが不正確になるという問題がある。
FIG. 4 illustrates a case where the scanning direction is from right to left and the
また、TOFセンサ210のスキャン速度を高めることで、上記のような歪みの発生を軽減し、デプスの計測精度を改善できる。しかし、スキャン速度と1画像中のスキャン回数(スキャン方向に対する照射パターンの照射数)とはトレードオフの関係にあるため、スキャン速度を高めようとするとスキャン回数が少なくなる。その結果、デプス画像の解像度が低くなり、得られる三次元形状が粗い形状になってしまうという問題もある。
Further, by increasing the scanning speed of the
このような問題に対して、本実施の形態の形状計測装置100は、カメラ部220から取得したカメラ画像に基づく偏光画像を用いて、デプス画像を補正する。より具体的には、形状計測装置100は、デプス画像を基に偏光画像を生成し、この偏光画像とカメラ画像に基づく偏光画像との間の誤差が小さくなるように、デプス画像を変形させる。
To solve such a problem, the
上記のように、カメラ部220では、グローバルシャッタを用いることで、偏光方向が異なる直線偏光を受光して得られた複数のカメラ画像が、同一時刻に撮影される。このため、このようなカメラ画像から得られる偏光画像では、対象物300の像301の形状には歪みが生じない。この性質を利用して、形状計測装置100は、カメラ画像に基づく偏光画像を用いてデプス画像を補正することで、デプス画像に現れる像の形状の歪みの影響を低減した、正確性の高いデプスを算出する。
As described above, in the
図5は、形状計測装置が備える処理機能の構成例を示すブロック図である。形状計測装置100は、記憶部110、デプス取得部121、偏光画像算出部122、カメラ画像取得部123、偏光画像算出部124および詳細形状算出部125を有する。
FIG. 5 is a block diagram showing a configuration example of a processing function included in the shape measuring device. The
記憶部110は、例えば、RAM102やHDD103など、形状計測装置100が備える記憶装置の記憶領域として実現される。記憶部110には、デプス画像111、法線画像112、デプス偏光画像113、カメラ画像114a~114cおよびカメラ偏光画像115が記憶される。
The
デプス取得部121、偏光画像算出部122、カメラ画像取得部123、偏光画像算出部124および詳細形状算出部125の処理は、例えば、プロセッサ101が所定のプログラムを実行することで実現される。
The processing of the
デプス取得部121は、TOFセンサ210からデプス画像111を取得して、記憶部110に格納する。デプス画像111は、画像上の各画素に対してデプスの計測値がプロットされた構造を有している。デプス取得部121は、デプス画像111を偏光画像算出部122に入力する。その後、デプス取得部121は、偏光画像算出部122に入力したデプス画像111を詳細形状算出部125からの要求に応じて変形させ、変形後のデプス画像を偏光画像算出部122に再入力することができる。
The
偏光画像算出部122は、デプス取得部121から入力されたデプス画像に基づいて偏光画像を算出する。本明細書では、デプス画像に基づいて算出される偏光画像を「デプス偏光画像」と記載する。偏光画像算出部122は、まず、入力されたデプス画像上の画素ごとに法線の情報を算出し、画像上の各画素に対して法線の情報をプロットした法線画像112を生成して、記憶部110に格納する。そして、偏光画像算出部122は、生成された法線画像112上の画素ごとの偏光度を算出し、画像上の各画素に対して偏光度の情報をプロットしたデプス偏光画像113を算出し、記憶部110に格納する。なお、偏光度は、光がどれだけ偏光しているかを示す指標であり、0以上1以下の値となる。
The polarized
カメラ画像取得部123は、カメラ部220のカメラ221,222,223によってそれぞれ撮影されたカメラ画像114a,114b,114cを取得して、記憶部110に格納する。これらのカメラ画像114a~114cは、同一時刻に撮影された画像である。
The camera
なお、カメラ画像114a~114cは、輝度画像として記憶部110に格納される。カメラ221,222,223からカラー画像が出力される場合、カメラ画像取得部123は、カメラ221,222,223からそれぞれ出力されたカラー画像を輝度画像に変換し、それぞれカメラ画像114a,114b,114cとして記憶部110に格納する。また、カメラ画像114a~114cは、デプス画像111と同一の解像度の画像として記憶部110に格納されるものとする。
The
偏光画像算出部124は、カメラ画像114a~114cに基づいて偏光画像を算出する。本明細書では、カメラ画像114a~114cに基づいて算出される偏光画像を「カメラ偏光画像」と記載する。偏光画像算出部124は、カメラ画像114a~114cに基づいてカメラ偏光画像115を算出し、記憶部110に格納する。カメラ偏光画像115は、画像上の各画素に対して偏光度がプロットされた構造を有している。
The polarized
詳細形状算出部125は、デプス偏光画像113とカメラ偏光画像115との間の二乗誤差を算出し、二乗誤差が最小になるように、デプス取得部121から偏光画像算出部122に入力されるデプス画像を変形させる。詳細形状算出部125は、二乗誤差が最小と判定されたとき(例えば、二乗誤差が所定の閾値以下になったとき)にデプス取得部121から偏光画像算出部122に入力されたデプス画像を、像の形状の歪みが補正されたデプス画像として出力する。
The detailed
以下、形状計測装置100の処理についてさらに詳しく説明する。
<第1デプス画像とカメラ画像の取得>
デプス取得部121は、TOFセンサ210からデプス画像111を取得して、記憶部110に格納する。また、カメラ画像取得部123は、カメラ部220のカメラ221,222,223によってそれぞれ撮影されたカメラ画像114a,114b,114cを取得して、記憶部110に格納する。
Hereinafter, the processing of the
<Acquisition of 1st depth image and camera image>
The
前述のように、カメラ221,222,223は、グローバルシャッタを用いることにより、カメラ画像114a,114b,114cをそれぞれ同一時刻に撮影して出力する。また、デプス画像111の取得とカメラ画像114a~114cの取得は、同期して実行される。具体的には、デプス画像111のスキャン期間(スキャン方向に対する一端の位置のスキャン時刻から他端の位置のスキャン時刻までの期間)に、カメラ画像114a~114cの撮影時刻が包含されるように、デプス画像111とカメラ画像114a~114cが取得される。
As described above, the
図6は、デプス画像のデータ構造の一例を示す図である。デプス画像111のデータは、画素ごとに、X軸方向(水平方向)の位置、Y軸方向(垂直方向)の位置、Z方向(奥行き方向)の位置が対応付けられた構造のデータとして記憶部110に格納される。これらのうち、Z方向の位置がデプス(距離)を示す。デプス画像111のデータは、例えば、図6に示すようなデータテーブル111aとして格納される。図6に示すデータテーブル111aでは、各画素の画素番号に対してX方向、Y方向、Z方向の各位置が対応付けて登録されている。
FIG. 6 is a diagram showing an example of the data structure of the depth image. The data of the
<カメラ偏光画像の算出>
次に、偏光画像算出部124によるカメラ偏光画像115の算出処理について説明する。
<Calculation of camera polarized image>
Next, the calculation process of the camera
図7は、カメラ偏光画像算出処理の概要を示す図である。偏光画像算出部124は、カメラ画像114a~114cのそれぞれに対して、視点をデプス画像111の視点に合わせるための視点変換処理を施す。この視点変換処理のために、次のような事前準備が行われる。
FIG. 7 is a diagram showing an outline of the camera polarization image calculation process. The polarized
TOFセンサ210およびカメラ221~223の位置と向きとに基づいて、TOFセンサ210およびカメラ221~223の外部パラメータが設定される。また、カメラ221~223の内部パラメータが設定される。これらのパラメータは、キャリブレーションによって求められる。そして、これらのパラメータに基づいて、カメラ221~223の視点をTOFセンサ210の視点に変換するためのホモグラフィ行列が算出される。
External parameters of the
偏光画像算出部124は、カメラ画像114a,114b,114cをそれぞれホモグラフィ行列を用いて変換することで、カメラ画像114a1,114b1,114c1を算出する。カメラ画像114a1,114b1,114c1は、それぞれカメラ画像114a,114b,114cをTOFセンサ210と同じ位置から同じ向きで撮影した場合の画像を示す。
The polarized
次に、偏光画像算出部124は、変換により得られたカメラ画像114a1~114c1を用いて、カメラ偏光画像115を算出する。この算出処理では、カメラ画像114a1~114c1の画素ごとに次のような処理が実行される。
Next, the polarized
偏光画像算出部124は、カメラ画像114a1~114c1におけるm番目の画素の輝度値を、下記の式(1)で表されるコサインカーブによって近似する。
ym=amcos(Θ+bm)+cm ・・・(1)
偏光画像算出部124は、得られたコサインカーブにおける最大値と最小値を求め、「(最大値/最小値)/(最大値+最小値)」という式によって、m番目の画素の偏光度を算出する。これにより、偏光度は0以上1以下の値として算出される。
The polarized
ym = amcos (Θ + bm) + cm ・ ・ ・ (1)
The polarized
偏光画像算出部124は、以上の処理手順により画素ごとに偏光度を算出する。偏光画像算出部124は、各画素に対して偏光度をプロットしたカメラ偏光画像115を生成して、記憶部110に格納する。
The polarized
なお、偏光度は、3以上の異なる回転角の偏光フィルタを用いて得られたカメラ画像から算出可能である。本実施の形態では例として、3つの偏光フィルタ221a~223aを用いて得られた3つのカメラ画像114a~114cに基づいて偏光度が算出されるが、4つ以上の偏光フィルタを用いて得られたカメラ画像に基づいて偏光度が算出されてもよい。
The degree of polarization can be calculated from camera images obtained by using polarization filters having three or more different rotation angles. In the present embodiment, as an example, the degree of polarization is calculated based on the three
<デプス偏光画像の算出>
次に、偏光画像算出部122によるデプス偏光画像113の算出処理について説明する。
<Calculation of depth polarized image>
Next, the calculation process of the depth
まず、偏光画像算出部122は、次のような手順で、デプス取得部121から入力されたデプス画像に基づき、中間データとして法線画像112を算出する。デプス画像の座標(x,y)における法線nは、下記の式(2)によって表される。また、式(2)のp,qは、デプス画像の座標(x,y)におけるデプスHに基づき、式(3)によって算出される。
First, the polarized
また、法線nは、天頂角θ、方位角ψを用いて式(4)のように表される。 Further, the normal line n is expressed by the equation (4) using the zenith angle θ and the azimuth angle ψ.
式(2)と式(4)の関係から、式(4)に示した法線nのz成分であるcosθを、p,qによって表すことができる。法線画像112は、法線nのz成分であるcosθを画素ごとにプロットすることで算出される。偏光画像算出部122は、法線画像112から画素ごとの天頂角θを求め、下記の式(5)を用いて画素ごとの偏光度ρを算出する。なお、式(5)のNは屈折率を表し、例えば1.5である。
From the relationship between the equation (2) and the equation (4), cos θ, which is the z component of the normal n shown in the equation (4), can be expressed by p and q. The
偏光画像算出部122は、算出された偏光度ρを画素ごとにプロットすることで、デプス偏光画像113を算出する。
<詳細形状の算出>
次に、詳細形状算出部125の処理について説明する。
The polarized
<Calculation of detailed shape>
Next, the processing of the detailed
図8は、詳細形状算出部の処理手順の概要を示す図である。詳細形状算出部125は、偏光画像算出部122によって算出されたデプス偏光画像113と、偏光画像算出部124によって算出されたカメラ偏光画像115とを比較する。ここで、デプス偏光画像113では、TOFセンサ210から取得されたデプス画像111に基づいて算出されたものなので、撮影対象物の像に歪みが生じている可能性がある。一方、カメラ画像114a~114cに基づいて算出されたカメラ偏光画像115では、このような歪みが生じない。そこで、偏光画像算出部122は、算出されるデプス偏光画像113とカメラ偏光画像115との誤差が小さくなるように、デプス偏光画像113の算出元となるデプス画像111を、デプス取得部121に変形させる。
FIG. 8 is a diagram showing an outline of the processing procedure of the detailed shape calculation unit. The detailed
詳細形状算出部125は、最小二乗法を用いて次のような処理を実行する。デプス偏光画像113のm番目の画素における偏光度をPdmとし、カメラ偏光画像115のm番目の画素における偏光度をPcmとする。詳細形状算出部125は、次の式(6)で表される残差平方和RSSが最小となるように、偏光画像算出部122に入力されるデプス画像111を変形させる。
The detailed
図4で説明したように、デプス画像111では、赤外線レーザの照射パターンのスキャン方向に対して垂直な方向(図4の例では上下方向)に対象物が移動したとき、像の形状が歪む。そこで、デプス画像111の変形は、画像上の上下方向に並列するある画素列に対して、左右方向に隣接する画素列が、上下方向にシフトするように行われる。
As described with reference to FIG. 4, in the
例えば、図4のようにスキャン方向が右から左の方向とすると、デプス画像111に写る対象物の像は、右側ほど位置が上側にずれた形状となる。そこで、デプス画像111の1回の変形では、ある画素列に対して右側に隣接する画素列を、所定シフト量だけ下方向にシフトさせる。シフト量は、画素の倍数単位で設定されてもよいし、画素ピッチより小さい量(例えば、0.5画素)に設定されてもよい。後者の場合、変形後のデプス画像におけるデプス値は補間演算によって求められる。
For example, assuming that the scanning direction is from right to left as shown in FIG. 4, the image of the object reflected in the
<フローチャート>
次に、形状計測装置100の処理手順について、フローチャートを用いて説明する。
図9は、形状計測装置の処理手順を示すフローチャートの例である。
<Flow chart>
Next, the processing procedure of the
FIG. 9 is an example of a flowchart showing a processing procedure of the shape measuring device.
[ステップS11]デプス取得部121は、TOFセンサ210からデプス画像111を取得して、記憶部110に格納する。また、カメラ画像取得部123は、カメラ部220のカメラ221,222,223によってそれぞれ撮影されたカメラ画像114a,114b,114cを取得して、記憶部110に格納する。
[Step S11] The
[ステップS12]偏光画像算出部124は、カメラ画像114a~114cのそれぞれに対して、視点をデプス画像111の視点に合わせるための視点変換処理を施す。具体的には、偏光画像算出部124は、カメラ画像114a,114b,114cをそれぞれ視点変換用のホモグラフィ行列を用いて変換することで、カメラ画像114a1,114b1,114c1を算出する。
[Step S12] The polarized
[ステップS13]偏光画像算出部124は、ステップS12で変換されたカメラ画像114a1~114c1から、カメラ偏光画像115を算出する。具体的には、偏光画像算出部124は、カメラ画像114a1~114c1におけるm番目の画素の輝度値を、前述の式(1)で表されるコサインカーブによって近似する。偏光画像算出部124は、得られたコサインカーブにおける最大値と最小値を求め、「(最大値/最小値)/(最大値+最小値)」という式によって、m番目の画素の偏光度を算出する。偏光画像算出部124は、各画素に対して偏光度をプロットしたカメラ偏光画像115を生成して、記憶部110に格納する。
[Step S13] The polarized
[ステップS14]デプス取得部121は、デプス画像111を偏光画像算出部122に入力する。偏光画像算出部122は、入力されたデプス画像111に基づいて法線画像112を算出し、記憶部110に格納する。前述のように、偏光画像算出部122は、式(2)~(4)に基づき、法線nのz成分であるcosθを画素ごとにプロットすることで、法線画像112を算出する。
[Step S14] The
[ステップS15]偏光画像算出部122は、法線画像112に基づき、前述の式(5)を用いて画素ごとの偏光度ρを算出する。偏光画像算出部122は、算出された偏光度ρを画素ごとにプロットすることでデプス偏光画像113を算出し、記憶部110に格納する。
[Step S15] The polarized
[ステップS16]詳細形状算出部125は、ステップS13で算出されたカメラ偏光画像115と、ステップS15で算出されたデプス偏光画像113との間の二乗誤差を、前述の式(6)を用いて算出する。
[Step S16] The detailed
[ステップS17]詳細形状算出部125は、算出された二乗誤差が所定の閾値以下であるかを判定する。なお、ここでは例として、二乗誤差が閾値以下の場合に、二乗誤差が最小になったと判定する。詳細形状算出部125は、二乗誤差が閾値以下の場合、ステップS19の処理を実行し、二乗誤差が閾値より大きい場合、ステップS18の処理を実行する。
[Step S17] The detailed
[ステップS18]詳細形状算出部125は、デプス取得部121に対してデプス画像111の変形を要求する。デプス取得部121は、変形の要求に応じて、直近のステップS14で偏光画像算出部122に入力したデプス画像111を、1段階変形させる。例えば、スキャン方向を右から左の方向とし、1段階分のシフト量をSとすると、デプス取得部121は、変形前のデプス画像111において垂直方向に並列する画素列に対して、その右側に隣接する画素列を下方向にシフト量Sだけシフトする。この場合、第i列(ただし、i=1,2,・・・)の画素列は、(i-1)×Sだけ下方向にシフトされる。
[Step S18] The detailed
この後、処理がステップS14に戻る。ステップS14において、デプス取得部121は、ステップS18で変形されたデプス画像111を偏光画像算出部122に入力する。これにより、変形後のデプス画像111に基づいて法線画像112、デプス偏光画像113が算出される。
After this, the process returns to step S14. In step S14, the
[ステップS19]詳細形状算出部125は、二乗誤差が閾値以下になったときのデプス画像111、すなわち、直近のステップS14で偏光画像算出部122に入力したデプス画像111を、像の歪みが補正された最終的なデプス画像として出力する。
[Step S19] The detailed
以上の処理により、形状計測装置100は、撮影の対象物が移動した場合でも、その移動に伴ってデプス画像に現れる像の形状の歪みの影響を低減した、正確性の高いデプスを算出できる。
By the above processing, the
なお、上記の各実施の形態に示した装置(例えば、距離計測装置1、形状計測装置100)の処理機能は、コンピュータによって実現することができる。その場合、各装置が有すべき機能の処理内容を記述したプログラムが提供され、そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記憶装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記憶装置には、ハードディスク装置(HDD)、磁気テープなどがある。光ディスクには、CD(Compact Disc)、DVD(Digital Versatile Disc)、ブルーレイディスク(Blu-ray Disc:BD、登録商標)などがある。光磁気記録媒体には、MO(Magneto-Optical disk)などがある。
The processing functions of the devices (for example, the
プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CDなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。 When a program is distributed, for example, a portable recording medium such as a DVD or a CD on which the program is recorded is sold. It is also possible to store the program in the storage device of the server computer and transfer the program from the server computer to another computer via the network.
プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムまたはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムにしたがった処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムにしたがった処理を実行することもできる。また、コンピュータは、ネットワークを介して接続されたサーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムにしたがった処理を実行することもできる。 The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes the processing according to the program. The computer can also read the program directly from the portable recording medium and execute the processing according to the program. Further, the computer can sequentially execute the processing according to the received program each time the program is transferred from the server computer connected via the network.
1 距離計測装置
1a 記憶部
1b 演算部
2 TOFセンサ
3a~3c カメラ
4a~4c 画像
11,14 距離画像
12,13 偏光画像
1
Claims (7)
前記第1の距離画像に基づいて画素ごとに偏光度を算出することで生成された第2の偏光画像と、前記第1の偏光画像との比較結果に基づいて、前記第1の距離画像を変形させ、変形によって得られた第2の距離画像を出力する演算部と、
を有する距離計測装置。 To calculate the degree of polarization for each pixel based on the first distance image acquired from the TOF (Time Of Flight) sensor and multiple images acquired from multiple cameras that receive linear polarization in different polarization directions. A storage unit that stores the first polarized image generated in
Based on the comparison result between the second polarized image generated by calculating the degree of polarization for each pixel based on the first distance image and the first polarized image, the first distance image is obtained. A calculation unit that transforms and outputs the second distance image obtained by the transformation,
Distance measuring device with.
請求項1記載の距離計測装置。 In the modification, a comparison process of generating the second polarized image based on the first distance image and comparing the first polarized image with the second polarized image is performed on the first distance image. Is executed while deforming, and the second distance image is generated based on the result of the comparison process.
The distance measuring device according to claim 1.
前記第2の距離画像として、前記誤差が最小となるように前記第1の距離画像を変形させた距離画像が生成される、
請求項2記載の距離計測装置。 In the comparison process, an error between the first polarized image and the second polarized image is calculated.
As the second distance image, a distance image obtained by modifying the first distance image so that the error is minimized is generated.
The distance measuring device according to claim 2.
請求項1乃至3のいずれか1項に記載の距離計測装置。 The TOF sensor emits a light beam for distance measurement as an irradiation pattern extending in a predetermined first direction, and reflects the light ray while sequentially moving the irradiation pattern in a second direction orthogonal to the first direction. By receiving light, the first distance image is generated.
The distance measuring device according to any one of claims 1 to 3.
請求項4記載の距離計測装置。 The first distance image is deformed by sequentially shifting the pixels adjacent to the second direction in the first direction.
The distance measuring device according to claim 4.
TOFセンサから第1の距離画像を取得するとともに、それぞれ異なる偏光方向の直線偏光を受光する複数のカメラから取得された複数の画像に基づいて画素ごとに偏光度を算出することで生成された第1の偏光画像を取得し、
前記第1の距離画像に基づいて画素ごとに偏光度を算出することで生成された第2の偏光画像と、前記第1の偏光画像との比較結果に基づいて、前記第1の距離画像を変形させ、変形によって得られた第2の距離画像を出力する、
距離計測方法。 The computer
The first distance image is acquired from the TOF sensor, and the degree of polarization is calculated for each pixel based on a plurality of images acquired from a plurality of cameras that receive linear polarization in different polarization directions. Obtain a polarized image of 1 and
Based on the comparison result between the second polarized image generated by calculating the degree of polarization for each pixel based on the first distance image and the first polarized image, the first distance image is obtained. Deform and output the second distance image obtained by the deformation,
Distance measurement method.
TOFセンサから第1の距離画像を取得するとともに、それぞれ異なる偏光方向の直線偏光を受光する複数のカメラから取得された複数の画像に基づいて画素ごとに偏光度を算出することで生成された第1の偏光画像を取得し、
前記第1の距離画像に基づいて画素ごとに偏光度を算出することで生成された第2の偏光画像と、前記第1の偏光画像との比較結果に基づいて、前記第1の距離画像を変形させ、変形によって得られた第2の距離画像を出力する、
処理を実行させる距離計測プログラム。 On the computer
The first distance image is acquired from the TOF sensor, and the degree of polarization is calculated for each pixel based on a plurality of images acquired from a plurality of cameras that receive linear polarization in different polarization directions. Obtain a polarized image of 1 and
Based on the comparison result between the second polarized image generated by calculating the degree of polarization for each pixel based on the first distance image and the first polarized image, the first distance image is obtained. Deform and output the second distance image obtained by the deformation,
A distance measurement program that executes processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018128890A JP7071633B2 (en) | 2018-07-06 | 2018-07-06 | Distance measuring device, distance measuring method and distance measuring program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018128890A JP7071633B2 (en) | 2018-07-06 | 2018-07-06 | Distance measuring device, distance measuring method and distance measuring program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020008399A JP2020008399A (en) | 2020-01-16 |
JP7071633B2 true JP7071633B2 (en) | 2022-05-19 |
Family
ID=69151411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018128890A Active JP7071633B2 (en) | 2018-07-06 | 2018-07-06 | Distance measuring device, distance measuring method and distance measuring program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7071633B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003074967A1 (en) | 2002-03-07 | 2003-09-12 | Takaoka Electric Mfg.Co., Ltd. | Polarization bearing detection type two-dimensional light reception timing detecting device and surface shape measuring device using it |
JP2010256138A (en) | 2009-04-23 | 2010-11-11 | Canon Inc | Imaging apparatus and method for controlling the same |
WO2016174915A1 (en) | 2015-04-30 | 2016-11-03 | ソニー株式会社 | Image processing device, image processing method, and program |
WO2018061508A1 (en) | 2016-09-28 | 2018-04-05 | ソニー株式会社 | Image capturing element, image processing device, image processing method, and program |
-
2018
- 2018-07-06 JP JP2018128890A patent/JP7071633B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003074967A1 (en) | 2002-03-07 | 2003-09-12 | Takaoka Electric Mfg.Co., Ltd. | Polarization bearing detection type two-dimensional light reception timing detecting device and surface shape measuring device using it |
JP2010256138A (en) | 2009-04-23 | 2010-11-11 | Canon Inc | Imaging apparatus and method for controlling the same |
WO2016174915A1 (en) | 2015-04-30 | 2016-11-03 | ソニー株式会社 | Image processing device, image processing method, and program |
WO2018061508A1 (en) | 2016-09-28 | 2018-04-05 | ソニー株式会社 | Image capturing element, image processing device, image processing method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP2020008399A (en) | 2020-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11652975B2 (en) | Field calibration of stereo cameras with a projector | |
US11328446B2 (en) | Combining light-field data with active depth data for depth map generation | |
US8743349B2 (en) | Apparatus and method to correct image | |
US9451132B2 (en) | System for capturing a document in an image signal | |
US9153029B2 (en) | Block patterns as two-dimensional ruler | |
CN111047650B (en) | Parameter calibration method for time-of-flight camera | |
US20140086394A1 (en) | System and method for correction of geometric distortion of multi-camera flat panel x-ray detectors | |
US11428522B2 (en) | Distance measuring device, distance measuring method, and non-transitory computer-readable storage medium for storing program | |
WO2023015880A1 (en) | Acquisition method for training sample set, model training method and related apparatus | |
JP2016100698A (en) | Calibration device, calibration method, and program | |
EP4070130A1 (en) | Efficient algorithm for projecting world points to a rolling shutter image | |
Wilm et al. | Accurate and simple calibration of DLP projector systems | |
JP7071633B2 (en) | Distance measuring device, distance measuring method and distance measuring program | |
JP7275941B2 (en) | 3D information acquisition device and 3D information acquisition method | |
JP2009236696A (en) | Three-dimensional image measurement method, measurement system, and measurement program for subject | |
JP5363872B2 (en) | Image correction apparatus and program thereof | |
JP2021043679A (en) | Image registration device, image generation system, image registration method and image registration program | |
KR102684986B1 (en) | Device for 3D image reconstruction using rectangular grid projection | |
CN115830131A (en) | Method, device and equipment for determining fixed phase deviation | |
CN113341168A (en) | Speed measuring method, device and system based on contact type image sensor | |
CN113506351A (en) | Calibration method and device for ToF camera, electronic equipment and storage medium | |
CN112213711A (en) | Calibration method of TOF camera | |
US20230126591A1 (en) | System and method for calibrating a three-dimensional scanning device | |
WO2023139946A1 (en) | Distance measuring device and distance measuring method | |
KR20240071170A (en) | 3d calibration method and apparatus for multi-view phase shift profilometry |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210408 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20210413 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20210413 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220328 |
|
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: 20220405 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220418 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7071633 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |