JP2022024688A - Depth map generation device and program thereof, and depth map generation system - Google Patents

Depth map generation device and program thereof, and depth map generation system Download PDF

Info

Publication number
JP2022024688A
JP2022024688A JP2020127411A JP2020127411A JP2022024688A JP 2022024688 A JP2022024688 A JP 2022024688A JP 2020127411 A JP2020127411 A JP 2020127411A JP 2020127411 A JP2020127411 A JP 2020127411A JP 2022024688 A JP2022024688 A JP 2022024688A
Authority
JP
Japan
Prior art keywords
depth
camera
depth map
cost
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.)
Granted
Application number
JP2020127411A
Other languages
Japanese (ja)
Other versions
JP7489253B2 (en
Inventor
正規 加納
Masanori Kano
真宏 河北
Masahiro Kawakita
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting Corp
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 Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2020127411A priority Critical patent/JP7489253B2/en
Publication of JP2022024688A publication Critical patent/JP2022024688A/en
Application granted granted Critical
Publication of JP7489253B2 publication Critical patent/JP7489253B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

To provide a depth map generation device capable of easily acquiring photographic images at a plurality of viewpoints and a highly accurate depth map.SOLUTION: A three-dimensional shape acquisition device 3 includes cost volume generation means 51 for generating a cost volume, scale conversion means 54 for converting a depth image into an intermediate depth map using a scale conversion function, cost weight calculation means 57 for calculating a cost weight, visibility weight calculation means 58 for calculating a visibility weight, weight application means 59 for applying the cost weight and the visibility weight to the cost volume, and final depth map generation means 60 for generating a final depth map indicating the depth of a depth layer that minimizes the cost in a cost column at the same pixel position in the cost volume.SELECTED DRAWING: Figure 2

Description

本発明は、デプスマップを生成するデプスマップ生成装置及びそのプログラム、並びに、デプスマップ生成システムに関する。 The present invention relates to a depth map generator and a program thereof for generating a depth map, and a depth map generation system.

近年、空間中に存在する被写体の三次元形状(デプスマップ)を取得する技術が盛んに研究されている。この技術は、三次元映像制作、AR(Augmented Reality)、VR(Virtual Reality)、ロボティクスなど様々な分野への適用が期待されている。被写体の三次元形状を取得するアプローチとしては、能動的な手法と受動的な手法に大別される(非特許文献1)。 In recent years, techniques for acquiring a three-dimensional shape (depth map) of a subject existing in space have been actively studied. This technology is expected to be applied to various fields such as 3D video production, AR (Augmented Reality), VR (Virtual Reality), and robotics. The approach for acquiring the three-dimensional shape of the subject is roughly classified into an active method and a passive method (Non-Patent Document 1).

能動的な手法は、計測装置が光源を有し、被写体からの反射光を利用して奥行き(デプス)を計測するものである。具体的な手法としては、パターン光投影、光飛行時間法(ToF:Time of Flight)、照度差ステレオ法がある。これらの中で近年注目されているのが、ToFカメラを用いた手法である。ToFカメラは、光源から照射した光が被写体で反射して戻るまでの時間を計測することで、ToFカメラから被写体までの距離を求める。能動的な手法のメリットは、高度な計算処理を行うことなくリアルタイムで高精度な距離が得られることである。一方、能動的な手法のデメリットは、外乱光に弱い、被写体の反射率や距離によっては測定誤差が生じる、スケールの校正が必要な場合があることである。 In the active method, the measuring device has a light source and the depth is measured by using the reflected light from the subject. Specific methods include pattern light projection, light flight time method (ToF: Time of Flight), and illuminance difference stereo method. Among these, the method using a ToF camera has been attracting attention in recent years. The ToF camera obtains the distance from the ToF camera to the subject by measuring the time until the light emitted from the light source is reflected by the subject and returned. The merit of the active method is that a highly accurate distance can be obtained in real time without performing advanced calculation processing. On the other hand, the disadvantages of the active method are that it is vulnerable to ambient light, measurement errors occur depending on the reflectance and distance of the subject, and scale calibration may be required.

受動的な手法は、複数台のカラーカメラ(以降、「RGBカメラ」)、又は1台のRGBカメラを移動させて、その視差から奥行き距離を計測するものである。具体的な手法としては、ステレオ法(多眼ステレオ)、モーションステレオがある。これらの原理はステレオ法であり、2台以上のカメラの視差からデプスを計算する。受動的な手法のメリットは、被写体に特殊な光を照射する必要がない、外乱光の影響を受けない、一般的なカラーカメラとコンピュータだけで実現できることである。一方、受動的な手法のデメリットは、得られるデプスに曖昧さが残る(テクスチャレス、オクルージョン領域)、計算コストが高くなることである。 The passive method is to move a plurality of color cameras (hereinafter referred to as "RGB cameras") or one RGB camera and measure the depth distance from the parallax. Specific methods include a stereo method (multi-eye stereo) and a motion stereo. These principles are the stereo method, which calculates the depth from the parallax of two or more cameras. The merit of the passive method is that it does not need to irradiate the subject with special light, is not affected by ambient light, and can be realized only with a general color camera and computer. On the other hand, the disadvantage of the passive method is that the obtained depth remains ambiguous (textureless, occlusion area) and the calculation cost is high.

その他、RGBカメラとデプスカメラを同一光軸上に配置し、レンズアレイを用いて、複数視点分のRGB画像及びデプス画像を取得できるRGB-Dカメラが知られている(特許文献1)。この手法では、カメラレンズから入射した光線をミラー(例えば、ハーフミラーやダイクロイックミラー)で分光し、RGBカメラとデプスカメラで受光する。 In addition, there is known an RGB-D camera capable of acquiring RGB images and depth images for a plurality of viewpoints by arranging an RGB camera and a depth camera on the same optical axis and using a lens array (Patent Document 1). In this method, light rays incident from a camera lens are separated by a mirror (for example, a half mirror or a dichroic mirror) and received by an RGB camera and a depth camera.

特開2009-300268号公報Japanese Unexamined Patent Publication No. 2009-300268

ディジタル画像処理(改訂新版)、CG-ARTS協会、2015年Digital Image Processing (Revised New Edition), CG-ARTS Association, 2015

前記したように、三次元形状の取得は、その応用できる分野が広いため、様々な手法が提案されているが、未だ確立されていない。汎用的な目的を考えると、1視点のカラー画像(以降、RGB画像)とデプスマップのみでなく、様々な視点のRGB画像とデプスマップがあると使い勝手がよい。つまり、複数視点のRGB画像及びデプスマップのセットがあると、汎用性が向上する。 As described above, since the acquisition of a three-dimensional shape has a wide range of applications, various methods have been proposed, but have not yet been established. Considering a general purpose, it is convenient to have RGB images and depth maps of various viewpoints as well as color images (hereinafter, RGB images) and depth maps of one viewpoint. That is, having a set of RGB images and depth maps from a plurality of viewpoints improves versatility.

また、デプスマップの精度も重要である。RGB-Dカメラで得られるデプス画像は、画素値(輝度値)で表されているため、この画素値を実スケールのデプスマップに変換する必要がある。しかし、実スケールへの変換関数が、デプスマップの精度に大きな影響を与える。さらに、デプスマップの精度は、撮影環境や被写体の種類によっても影響される。なお、実スケールとは、実空間上の距離(奥行き)のことである。 The accuracy of the depth map is also important. Since the depth image obtained by the RGB-D camera is represented by a pixel value (luminance value), it is necessary to convert this pixel value into a depth map of an actual scale. However, the conversion function to real scale has a great influence on the accuracy of the depth map. Furthermore, the accuracy of the depth map is also affected by the shooting environment and the type of subject. The actual scale is a distance (depth) in real space.

本発明は、前記した問題を解決し、複数視点の撮影画像及び高精度なデプスマップを容易に取得できるデプスマップ生成装置及びそのプログラム、並びに、デプスマップ生成システムを提供することを課題とする。 An object of the present invention is to provide a depth map generation device and a program thereof, and a depth map generation system, which can solve the above-mentioned problems and easily acquire a photographed image of a plurality of viewpoints and a highly accurate depth map.

前記課題を解決するため、本発明に係るデプスマップ生成装置は、同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置が各視点で被写体を撮影した撮影画像及びデプス画像を用いて、各視点の撮影画像に対応したデプスマップを生成するデプスマップ生成装置であって、コストボリューム生成手段と、奥行き変換手段と、コストウェイト算出手段と、ビジビリティウェイト算出手段と、ウェイト適用手段と、最終デプスマップ生成手段と、を備える構成とした。 In order to solve the above-mentioned problems, the depth map generation device according to the present invention is a photographed image and a depth image in which a photographing device composed of a photographing camera having the same optical axis and a depth camera and an optical element array captures a subject from each viewpoint. It is a depth map generation device that generates a depth map corresponding to a captured image of each viewpoint by using, and is a cost volume generation means, a depth conversion means, a cost weight calculation means, a visibility weight calculation means, and a weight application. The configuration includes a means and a final depth map generation means.

かかる構成によれば、コストボリューム生成手段は、奥行き方向で所定間隔の奥行きレイヤ及び撮影画像の画素位置毎に、奥行きレイヤに投影された撮影画像間の類似度を表すコストを算出し、コストを奥行きレイヤ及び画素位置で三次元配列したコストボリュームを生成する。
奥行き変換手段は、デプス画像の各画素の画素値を奥行きに変換する奥行き変換関数により、デプス画像を中間デプスマップに変換する。
コストウェイト算出手段は、中間デプスマップの重みを正規分布関数で表したコストウェイトを算出する。
According to such a configuration, the cost volume generating means calculates the cost representing the similarity between the captured images projected on the depth layer for each of the depth layers and the pixel positions of the captured images at predetermined intervals in the depth direction, and calculates the cost. Generate a cost volume that is three-dimensionally arranged by the depth layer and the pixel position.
The depth conversion means converts the depth image into an intermediate depth map by a depth conversion function that converts the pixel value of each pixel of the depth image into the depth.
The cost weight calculation means calculates the cost weight in which the weight of the intermediate depth map is expressed by a normal distribution function.

また、ビジビリティウェイト算出手段は、中間デプスマップから、オクルージョン発生時にコストを低下させるビジビリティウェイトを算出する。
ウェイト適用手段は、コストボリュームにコストウェイト及びビジビリティウェイトを適用する。
最終デプスマップ生成手段は、ウェイト適用後のコストボリュームで同一画素位置のコスト列において、コストが最小となる奥行きレイヤのデプスを示す最終デプスマップを生成する。
In addition, the visibility weight calculation means calculates the visibility weight that reduces the cost when occlusion occurs from the intermediate depth map.
The weight application means applies the cost weight and the visibility weight to the cost volume.
The final depth map generation means generates a final depth map showing the depth of the depth layer that minimizes the cost in the cost column at the same pixel position in the cost volume after weight application.

すなわち、デプスマップ生成装置は、デプス画像から生成したデプスマップに基づいて、撮影画像から生成したコストボリュームを2つのウェイトで制約するリファインメント処理を行う。このリファインメント処理によって、デプスマップ生成装置は、各視点の撮影画像に対応した高精度なデプスマップを生成できる。 That is, the depth map generation device performs refinement processing in which the cost volume generated from the captured image is constrained by two weights based on the depth map generated from the depth image. By this refinement processing, the depth map generator can generate a highly accurate depth map corresponding to the captured image of each viewpoint.

なお、本発明は、コンピュータを、前記したデプスマップ生成装置として機能させるためのプログラムで実現することができる。 The present invention can be realized by a program for making a computer function as the depth map generator described above.

また、本発明は、同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置と、前記したデプスマップ生成装置と、を備えることを特徴とするデプスマップ生成システムで実現することもできる。 Further, the present invention is realized by a depth map generation system including a photographing device including a photographing camera having the same optical axis, a depth camera, and an optical element array, and the depth map generating device described above. You can also do it.

本発明によれば、複数視点の撮影画像及び高精度なデプスマップを容易に取得できる。 According to the present invention, it is possible to easily acquire a photographed image from a plurality of viewpoints and a highly accurate depth map.

実施形態に係る三次元形状取得システムの全体構成図である。It is an overall block diagram of the 3D shape acquisition system which concerns on embodiment. 実施形態に係る三次元形状取得装置の構成を示すブロック図である。It is a block diagram which shows the structure of the 3D shape acquisition apparatus which concerns on embodiment. RGB-Dカメラによる校正パターンの撮影を説明する説明図であり、(a)は校正データAを示し、(b)は校正データBを示す。It is explanatory drawing explaining the photographing of the calibration pattern by the RGB-D camera, (a) shows calibration data A, and (b) shows calibration data B. 校正パターンを撮影した画像の分割を説明する説明図であり、(a)はRGB画像を示し、(b)はデプス画像を示す。It is explanatory drawing explaining the division of the image which photographed the calibration pattern, (a) shows an RGB image, (b) shows a depth image. スケール変換関数の算出を説明する説明図であり、(a)は仮想カメラから校正パターンまでの距離を示し、(b)はスケール変換関数の一例を示す。It is explanatory drawing explaining the calculation of a scale conversion function, (a) shows the distance from a virtual camera to a calibration pattern, and (b) shows an example of a scale conversion function. 被写体を撮影した画像の分割を説明する説明図であり、(a)はRGB画像を示し、(b)はデプス画像を示す。It is explanatory drawing explaining division of the image which photographed a subject, (a) shows an RGB image, (b) shows a depth image. 奥行きレイヤの一例を説明する説明図である。It is explanatory drawing explaining an example of a depth layer. コストボリュームを説明する説明図である。It is explanatory drawing explaining the cost volume. 正規分布関数を説明する説明図である。It is explanatory drawing explaining a normal distribution function. (a)はコストウェイト関数の一例を説明する説明図であり、(b)はビジビリティ関数の一例を説明する説明図である。(A) is an explanatory diagram for explaining an example of a cost weight function, and (b) is an explanatory diagram for explaining an example of a visibility function. 実施形態において、カメラ校正処理を示すフローチャートである。In the embodiment, it is a flowchart which shows the camera calibration process. 実施形態において、リファインメント手理を示すフローチャートである。In the embodiment, it is a flowchart which shows the refinement procedure.

以下、本発明の実施形態について図面を参照して説明する。但し、以下に説明する実施形態は、本発明の技術思想を具体化するためのものであって、特定的な記載がない限り、本発明を以下のものに限定しない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiments described below are for embodying the technical idea of the present invention, and the present invention is not limited to the following unless otherwise specified.

[三次元形状取得システムの概要]
図1を参照し、実施形態に係る三次元形状取得システム(デプスマップ生成システム)1の概要について説明する。
三次元形状取得システム1は、被写体9について、複数視点のRGB画像(撮影画像)及びデプスマップと、仮想カメラCのカメラパラメータとを取得するものである。図1に示すように、三次元形状取得システム1は、RGB-Dカメラ(撮影装置)2と、三次元形状取得装置(デプスマップ生成装置)3とを備える。
[Overview of 3D shape acquisition system]
An outline of the three-dimensional shape acquisition system (depth map generation system) 1 according to the embodiment will be described with reference to FIG.
The three-dimensional shape acquisition system 1 acquires RGB images (photographed images) and depth maps of a plurality of viewpoints and camera parameters of the virtual camera C for the subject 9. As shown in FIG. 1, the three-dimensional shape acquisition system 1 includes an RGB-D camera (shooting device) 2 and a three-dimensional shape acquisition device (depth map generation device) 3.

複数視点で撮影するために多数のRGBカメラ及びデプスカメラを配置した場合、システムが大規模となり、コストが高くなる。そこで、三次元形状取得システム1では、後記する1台のRGB-Dカメラ(撮影装置)2により、多数のRGBカメラ及びデプスカメラを配置したのと同等の構成を実現し、システム構成を簡略化できる。 If a large number of RGB cameras and depth cameras are arranged for shooting from multiple viewpoints, the system becomes large and the cost becomes high. Therefore, in the three-dimensional shape acquisition system 1, one RGB-D camera (shooting device) 2 described later realizes a configuration equivalent to arranging a large number of RGB cameras and depth cameras, and simplifies the system configuration. can.

三次元映像制作などの分野では、仮想カメラCのカメラパラメータが必要となる。さらに、デプス画像は画素値(輝度値)で表されているため、この画素値を実スケールのデプスマップに変換するスケール変換関数も必要となる。そこで、三次元形状取得システム1では、三次元形状取得装置3によって、校正パターンを用いたカメラ校正処理を行って、仮想カメラCのカメラパラメータとスケール変換関数を算出する。 In fields such as 3D video production, the camera parameters of the virtual camera C are required. Further, since the depth image is represented by a pixel value (luminance value), a scale conversion function for converting this pixel value into a depth map of an actual scale is also required. Therefore, in the three-dimensional shape acquisition system 1, the three-dimensional shape acquisition device 3 performs camera calibration processing using the calibration pattern, and calculates the camera parameters and the scale conversion function of the virtual camera C.

デプスマップの精度も重要である。前記したように、スケール変換関数が、デプスマップの精度に大きな影響を与えてしまう。さらに、デプスマップの精度は、撮影環境や被写体の種類によって大きく低下する。そこで、三次元形状取得システム1では、後記する三次元形状取得装置3によって、複数視点のRGB画像及びデプス画像を用いて、デプスマップの精度を改善する(リファインメント処理)。このとき、三次元形状取得装置3では、1台のRGB-Dカメラ2で撮影した1枚のRGB画像を視点毎に分割してマッチングするため、複数台のRGBカメラで撮影した画像をマッチングする場合に比べ、色の差に起因するエラーを抑制できる。 The accuracy of the depth map is also important. As mentioned above, the scale conversion function has a great influence on the accuracy of the depth map. Furthermore, the accuracy of the depth map is greatly reduced depending on the shooting environment and the type of subject. Therefore, in the three-dimensional shape acquisition system 1, the accuracy of the depth map is improved by using the RGB image and the depth image of a plurality of viewpoints by the three-dimensional shape acquisition device 3 described later (refining process). At this time, in the three-dimensional shape acquisition device 3, one RGB image taken by one RGB-D camera 2 is divided and matched for each viewpoint, so that the images taken by a plurality of RGB cameras are matched. Compared to the case, the error caused by the color difference can be suppressed.

最初に、RGB-Dカメラ2の構成について説明する。次に、三次元形状取得装置3によるカメラ校正処理について説明する。このカメラ校正処理は、各仮想カメラCのカメラパラメータ、及び、スケール変換関数を算出する処理である。最後に、三次元形状取得装置3による、デプスマップの精度を改善するリファインメント処理について説明する。 First, the configuration of the RGB-D camera 2 will be described. Next, the camera calibration process by the three-dimensional shape acquisition device 3 will be described. This camera calibration process is a process of calculating the camera parameters and the scale conversion function of each virtual camera C. Finally, the refinement process for improving the accuracy of the depth map by the three-dimensional shape acquisition device 3 will be described.

[RGB-Dカメラの構成]
図1に示すように、RGB-Dカメラ2は、カメラ本体20と、レンズ系21とを備える撮像装置である。本実施形態では、カメラ本体20は、図示を省略したRGBカメラ及びデプスカメラを同一光軸上に配置したものである。また、カメラ本体20は、被写体9からの光線を分光素子(不図示)で分光し、分光した光線をRGBカメラ及びデプスカメラでそれぞれ受光する。例えば、RGBカメラとしては、一般的なカラーカメラがあげられる。また、分光素子としては、ハーフミラー又はダイクロイックミラーがあげられる。
[Structure of RGB-D camera]
As shown in FIG. 1, the RGB-D camera 2 is an imaging device including a camera body 20 and a lens system 21. In the present embodiment, the camera body 20 has an RGB camera and a depth camera (not shown) arranged on the same optical axis. Further, the camera body 20 disperses the light rays from the subject 9 by a spectroscopic element (not shown), and the separated light rays are received by the RGB camera and the depth camera, respectively. For example, as an RGB camera, a general color camera can be mentioned. Further, examples of the spectroscopic element include a half mirror or a dichroic mirror.

本実施形態では、デプスカメラとして、ToFカメラを用いる。このToFカメラは、距離計測時、被写体9に赤外線を照射するための赤外線LEDアレイ25を備える。ToFカメラが撮影した赤外線画像のフレーム間差分を求めることにより、デプス画像を取得できる。 In this embodiment, a ToF camera is used as the depth camera. This ToF camera includes an infrared LED array 25 for irradiating the subject 9 with infrared rays at the time of distance measurement. A depth image can be acquired by obtaining the difference between frames of the infrared image taken by the ToF camera.

レンズ系21は、フレネルレンズ22と、レンズアレイ(光学素子アレイ)23とを備える。レンズアレイ23は、N×N個の要素レンズ24を2次元状に配列したものである。RGB-Dカメラ2は、このレンズアレイ23を介することで、N×N視点分のRGB画像及びデプス画像を取得できる。すなわち、RGB-Dカメラ2は、N×N個の仮想カメラCを配置したのと同等の構成を実現している。本実施形態では、2×2個の要素レンズ24に対応した4視点(4台の仮想カメラC)であることとする。 The lens system 21 includes a Fresnel lens 22 and a lens array (optical element array) 23. The lens array 23 is a two-dimensional arrangement of NX × NY element lenses 24. The RGB-D camera 2 can acquire RGB images and depth images for NX × NY viewpoints via the lens array 23. That is, the RGB-D camera 2 realizes a configuration equivalent to the arrangement of NX × NY virtual cameras C. In the present embodiment, it is assumed that there are four viewpoints (four virtual cameras C) corresponding to the 2 × 2 element lenses 24.

なお、カメラ本体20とレンズ系21との位置関係を調整すると、仮想カメラCの画角を調整できる。また、図1では、4台の仮想カメラCのうち、2台の仮想カメラCのみを図示した。 By adjusting the positional relationship between the camera body 20 and the lens system 21, the angle of view of the virtual camera C can be adjusted. Further, in FIG. 1, only two virtual cameras C out of the four virtual cameras C are shown.

[三次元形状取得装置の構成]
図2を参照し、三次元形状取得装置3の構成について説明する。
三次元形状取得装置3は、RGB-Dカメラ2が各視点で被写体9を撮影したRGB画像及びデプス画像を用いて、各視点のRGB画像に対応したデプスマップを生成するものである。図2に示すように、三次元形状取得装置3は、カメラ校正処理を行うカメラ校正手段4と、リファインメント処理を行うリファインメント手段5とを備える。
[Configuration of 3D shape acquisition device]
The configuration of the three-dimensional shape acquisition device 3 will be described with reference to FIG.
The three-dimensional shape acquisition device 3 generates a depth map corresponding to the RGB image of each viewpoint by using the RGB image and the depth image of the subject 9 taken by the RGB-D camera 2 at each viewpoint. As shown in FIG. 2, the three-dimensional shape acquisition device 3 includes a camera calibration means 4 for performing a camera calibration process and a refinement means 5 for performing a refinement process.

<カメラ校正手段>
カメラ校正手段4は、2種類のパラメータを推定する。一つ目は、仮想カメラCのカメラパラメータである。仮想カメラCのカメラパラメータは、レンズの焦点距離、レンズ歪み、仮想カメラCの位置や姿勢など表す。二つ目は、各仮想カメラCのスケール変換関数である。さらに、カメラ校正手段4は、必要に応じて、RGB画像及びデプス画像の画角補正を行う。なお、カメラ校正手段4は、撮影の都度、カメラ校正処理を行う必要がなく、RGB-Dカメラ2の焦点距離やRGB-Dカメラ2とフレネルレンズ22とレンズアレイ23との位置・姿勢の関係が変化したときにカメラ校正処理を行えばよい。
<Camera calibration means>
The camera calibration means 4 estimates two types of parameters. The first is the camera parameters of the virtual camera C. The camera parameters of the virtual camera C represent the focal length of the lens, the lens distortion, the position and orientation of the virtual camera C, and the like. The second is the scale conversion function of each virtual camera C. Further, the camera calibration means 4 corrects the angle of view of the RGB image and the depth image as necessary. The camera calibration means 4 does not need to perform camera calibration processing each time a photograph is taken, and is related to the focal length of the RGB-D camera 2 and the position / orientation of the RGB-D camera 2, the Frenel lens 22 and the lens array 23. The camera may be calibrated when the value changes.

図3(a)に示すように、カメラ校正手段4には、RGB-Dカメラ2で校正パターン90を撮影したRGB画像及びデプス画像が入力される。校正パターン90は、平面状で特徴点の配置が既知のパターンである(例えば、チェスボードパターン)。このとき、RGB-Dカメラ2は、校正パターン90の姿勢を2回以上変更して撮影する(破線で図示)。なお、RGB-Dカメラ2は、内部パラメータのスキューを0以外とする場合、校正パターン90の姿勢を3回以上変更して撮影する。図3(a)に示すように、レンズ系21を配置して撮影したRGB画像及びデプス画像を校正データAと呼ぶ。前記した画角補正を行う場合、図3(b)に示すように、レンズ系21を外して校正パターン90を撮影する。このように、レンズ系21を外して撮影したRGB画像及びデプス画像を校正データBと呼ぶ。 As shown in FIG. 3A, an RGB image and a depth image obtained by capturing the calibration pattern 90 with the RGB-D camera 2 are input to the camera calibration means 4. The calibration pattern 90 is a planar pattern in which the arrangement of feature points is known (for example, a chess board pattern). At this time, the RGB-D camera 2 changes the posture of the calibration pattern 90 two or more times to take a picture (shown by a broken line). When the skew of the internal parameter is set to other than 0, the RGB-D camera 2 changes the posture of the calibration pattern 90 three times or more to take a picture. As shown in FIG. 3A, the RGB image and the depth image taken by arranging the lens system 21 are referred to as calibration data A. When performing the above-mentioned angle of view correction, as shown in FIG. 3B, the lens system 21 is removed and the calibration pattern 90 is photographed. The RGB image and the depth image taken with the lens system 21 removed in this way are referred to as calibration data B.

図2に示すように、カメラ校正手段4は、画角補正手段40と、画像分割手段41と、初期カメラパラメータ算出手段42と、カメラパラメータ最適化手段43と、スケール変換関数算出手段(奥行き変換関数算出手段)44とを備える。 As shown in FIG. 2, the camera calibration means 4 includes an angle of view correction means 40, an image division means 41, an initial camera parameter calculation means 42, a camera parameter optimization means 43, and a scale conversion function calculation means (depth conversion). The function calculation means) 44 is provided.

画角補正手段40は、RGB-Dカメラ2から入力されたデプス画像の画角がRGB画像の画角に一致するように、デプス画像を射影変換するものである。RGB-Dカメラ2の取り付け精度に起因して、RGBカメラで撮影したRGB画像とデプスカメラで撮影したデプス画像との画角が微妙にずれることがある。このため、画角補正手段40は、校正データBを用いて、この微妙な画角のずれを補正する。具体的には、画角補正手段40は、RGB画像及びデプス画像の間で4点以上の対応点(校正パターン90の特徴点)を基準として、ホモグラフィ行列を算出する(参考文献1)。そして、画角補正手段40は、このホモグラフィ行列によりデプス画像を射影変換することで、デプス画像の画角をRGB画像の画角に一致させる。
なお、画角補正手段40は、RGBカメラ及びデプスカメラの画角が一致している場合、前記した画角補正処理を行う必要がない。
The angle of view correction means 40 projects and converts the depth image so that the angle of view of the depth image input from the RGB-D camera 2 matches the angle of view of the RGB image. Due to the mounting accuracy of the RGB-D camera 2, the angle of view between the RGB image taken by the RGB camera and the depth image taken by the depth camera may be slightly different. Therefore, the angle of view correction means 40 uses the calibration data B to correct this delicate angle of view deviation. Specifically, the angle-of-view correction means 40 calculates a homography matrix based on four or more corresponding points (characteristic points of the calibration pattern 90) between the RGB image and the depth image (Reference 1). Then, the angle of view correction means 40 projects and transforms the depth image by this homography matrix to match the angle of view of the depth image with the angle of view of the RGB image.
The angle of view correction means 40 does not need to perform the above-mentioned angle of view correction process when the angle of view of the RGB camera and the depth camera match.

参考文献1:“OpenCV”,[online]、[令和2年6月24日検索]、インターネット〈URL:https://opencv.org/〉 Reference 1: "OpenCV", [online], [Search on June 24, 2nd year of Reiwa], Internet <URL: https://opencv.org/>

また、画角補正手段40は、校正データBを用いて、レンズ歪みを除去できる。例えば、画角補正手段40は、Zhangの手法により、RGB-Dカメラ2のレンズ歪み係数を算出し、RGB画像及びデプス画像からレンズ歪みを除去する(参考文献2)。 Further, the angle of view correction means 40 can remove the lens distortion by using the calibration data B. For example, the angle of view correction means 40 calculates the lens distortion coefficient of the RGB-D camera 2 by the method of Zhang, and removes the lens distortion from the RGB image and the depth image (Reference 2).

参考文献2:Z. Zhang, “A flexible new technique for camera calibration”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, No. 11, pp. 1330-1334 (2000) Reference 2: Z. Zhang, “A flexible new technique for camera calibration”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, No. 11, pp. 1330-1334 (2000)

画像分割手段41は、画角補正手段40から入力されたRGB画像及びデプス画像を視点(要素レンズ24)毎に分割するものである。つまり、画像分割手段41は、RGB画像及びデプス画像を仮想カメラC毎に分割することで、仮想カメラCで仮想的に撮影したRGB画像及びデプス画像を生成する。本実施形態では、画像分割手段41は、図4(a)及び(b)に示すように、RGB画像P及びデプス画像Pを4分割する。 The image segmentation means 41 divides the RGB image and the depth image input from the angle of view correction means 40 for each viewpoint (element lens 24). That is, the image segmentation means 41 divides the RGB image and the depth image into each virtual camera C to generate the RGB image and the depth image virtually taken by the virtual camera C. In the present embodiment, the image segmentation means 41 divides the RGB image PC and the depth image P D into four as shown in FIGS. 4A and 4B.

なお、RGB画像P及びデプス画像Pを分割する領域αは、手動で設定する。このとき、分割後のRGB画像P及びデプス画像Pでは、レンズアレイ23の外側や要素レンズ24同士の隙間が不要なので、これら不要領域を分割せずともよい。以後の説明を簡易にするため、分割後のRGB画像P及びデプス画像Pは、同一の画像サイズであることとする。 The area α for dividing the RGB image PC and the depth image P D is manually set. At this time, since the RGB image CC and the depth image P D after division do not require a gap on the outside of the lens array 23 or between the element lenses 24, it is not necessary to divide these unnecessary regions. For the sake of simplification of the following description, it is assumed that the RGB image PC and the depth image PD after division have the same image size.

初期カメラパラメータ算出手段42は、画像分割手段41から入力された各視点のRGB画像Pにカメラ校正処理を施すことで、各視点に対応した仮想カメラCの初期カメラパラメータを算出するものである。例えば、初期カメラパラメータ算出手段42は、各視点のRGB画像PにZhangの手法を適用し、各仮想カメラCのカメラパラメータ及び各校正パターン90の位置・姿勢が含まれる初期カメラパラメータを算出する。 The initial camera parameter calculation means 42 calculates the initial camera parameters of the virtual camera C corresponding to each viewpoint by performing a camera calibration process on the RGB image PC of each viewpoint input from the image segmentation means 41. .. For example, the initial camera parameter calculation means 42 applies Zhang's method to the RGB image PC of each viewpoint, and calculates the camera parameters of each virtual camera C and the initial camera parameters including the position / orientation of each calibration pattern 90. ..

カメラパラメータ最適化手段43は、初期カメラパラメータ算出手段42から入力された初期カメラパラメータを初期値としたカメラ校正処理により、各仮想カメラCの間でカメラパラメータを最適化するものである。前記した初期カメラパラメータ算出手段42では、各仮想カメラCのカメラパラメータを個別に算出していたが、全ての仮想カメラCの間でカメラパラメータを最適化することで、カメラパラメータの精度が向上する。 The camera parameter optimizing means 43 optimizes the camera parameters among the virtual cameras C by the camera calibration process using the initial camera parameters input from the initial camera parameter calculating means 42 as initial values. In the above-mentioned initial camera parameter calculation means 42, the camera parameters of each virtual camera C are calculated individually, but by optimizing the camera parameters among all the virtual cameras C, the accuracy of the camera parameters is improved. ..

ここで、校正パターン90の位置・姿勢を共通のパラメータとする。最適化するカメラパラメータは、各仮想カメラCのカメラパラメータと、共通化した校正パターン90の位置・姿勢が含まれる。具体的には、カメラパラメータ最適化手段43は、各仮想カメラCのカメラパラメータ及び校正パターン90の位置・姿勢の平均値を初期値として、初期カメラパラメータに含まれる仮想カメラCの位置・姿勢を使用する。そして、カメラパラメータ最適化手段43は、これら初期値をバンドル調整することでカメラパラメータを最適化する。 Here, the position and orientation of the calibration pattern 90 are set as common parameters. The camera parameters to be optimized include the camera parameters of each virtual camera C and the position / orientation of the common calibration pattern 90. Specifically, the camera parameter optimizing means 43 sets the position / posture of the virtual camera C included in the initial camera parameters as the initial value with the average value of the position / posture of the camera parameter of each virtual camera C and the calibration pattern 90 as the initial value. use. Then, the camera parameter optimizing means 43 optimizes the camera parameters by bundle-adjusting these initial values.

スケール変換関数算出手段44は、カメラパラメータ最適化手段43より入力されたカメラパラメータが示す仮想カメラCの位置から校正パターン90までの距離をデプス画像Pの各画素の画素値に対応させることで、スケール変換関数を算出するものである。すなわち、スケール変換関数算出手段44は、デプス画像Pを実スケールのデプスマップに変換するためのスケール変換関数を算出する。前記したように、カメラパラメータにおいて、仮想カメラCの位置・姿勢と校正パターン90の位置・姿勢とが既知のため、仮想カメラCから校正パターン90までの距離rが実スケールで算出できる。 The scale conversion function calculation means 44 makes the distance from the position of the virtual camera C indicated by the camera parameters input from the camera parameter optimization means 43 to the calibration pattern 90 correspond to the pixel value of each pixel of the depth image PD. , Calculates the scale conversion function. That is, the scale conversion function calculation means 44 calculates a scale conversion function for converting the depth image P D into a depth map of an actual scale. As described above, since the position / posture of the virtual camera C and the position / posture of the calibration pattern 90 are known in the camera parameters, the distance r from the virtual camera C to the calibration pattern 90 can be calculated on an actual scale.

具体的には、スケール変換関数算出手段44は、図5(a)に示すように、仮想カメラCから校正パターン90までの距離rと、デプス画像Pの各画素の輝度値q(画素値)とを対応づける。このとき、デプス画像Pに含まれる校正パターン90では、黒色模様の部分で反射率が低下するため、正確な対応付けが困難である。このため、スケール変換関数算出手段44は、デプス画像Pに含まれる校正パターン90の白色部分のみで対応付けを行うことが好ましい。ここで、スケール変換関数算出手段44は、校正パターン90を撮影した全てのデプス画像Pで対応付けを行うことで、図5(b)に示すようにグラフが得られる。そして、スケール変換関数算出手段44は、このグラフを関数(例えば、5次関数)で近似することで、スケール変換関数h(q)を算出できる。なお、スケール変換関数算出手段44は、このグラフをスケール変換関数で近似せず、ルックアップデーブルとしてもよい。 Specifically, as shown in FIG. 5A, the scale conversion function calculation means 44 has a distance r from the virtual camera C to the calibration pattern 90 and a luminance value q (pixel value) of each pixel of the depth image P D. ) And. At this time, in the calibration pattern 90 included in the depth image PD , the reflectance is lowered in the black pattern portion, so that accurate mapping is difficult. Therefore, it is preferable that the scale conversion function calculation means 44 associates only with the white portion of the calibration pattern 90 included in the depth image PD . Here, the scale conversion function calculation means 44 obtains a graph as shown in FIG. 5 (b) by associating all the depth images PD in which the calibration pattern 90 is captured. Then, the scale conversion function calculation means 44 can calculate the scale conversion function h (q) by approximating this graph with a function (for example, a quintic function). The scale conversion function calculation means 44 may not approximate this graph with the scale conversion function and may use it as a lookup table.

その後、カメラ校正手段4は、算出したスケール変換関数をスケール変換手段54に出力し、仮想カメラCのカメラパラメータをコストボリューム生成手段51及びウェイト適用手段59に出力する。 After that, the camera calibration means 4 outputs the calculated scale conversion function to the scale conversion means 54, and outputs the camera parameters of the virtual camera C to the cost volume generation means 51 and the weight application means 59.

<リファインメント手段>
リファインメント手段5は、RGB-Dカメラ2で被写体9を撮影したRGB画像P及びデプス画像Pが入力される。そして、リファインメント手段5は、デプス画像Pから生成したデプスマップに基づいて、RGB画像Pから生成したコストボリュームを2つのウェイトで制約することで、デプスマップの精度を向上させる。なお、リファインメント手段5は、撮影の都度、リファインメント処理を行う。
<Refinement means>
The refinement means 5 inputs an RGB image PC and a depth image P D obtained by photographing the subject 9 with the RGB-D camera 2. Then, the refinement means 5 improves the accuracy of the depth map by constraining the cost volume generated from the RGB image PC with two weights based on the depth map generated from the depth image PD . The refinement means 5 performs a refinement process each time a photograph is taken.

図2に示すように、リファインメント手段5は、画像分割手段50と、コストボリューム生成手段51と、初期デプスマップ生成手段52と、平滑化手段53と、スケール変換手段(奥行き変換手段)54と、レイヤ化処理手段55と、スケール補正手段(中間デプスマップ補正手段)56と、コストウェイト算出手段57と、ビジビリティウェイト算出手段58と、ウェイト適用手段59と、最終デプスマップ生成手段60とを備える。 As shown in FIG. 2, the refinement means 5 includes an image segmentation means 50, a cost volume generation means 51, an initial depth map generation means 52, a smoothing means 53, and a scale conversion means (depth conversion means) 54. , A layering processing means 55, a scale correction means (intermediate depth map correction means) 56, a cost weight calculation means 57, a visibility weight calculation means 58, a weight application means 59, and a final depth map generation means 60. ..

画像分割手段50は、RGB-Dカメラ2から入力されたRGB画像P及びデプス画像Pを視点毎に分割するものである。図6(a)及び(b)に示すように、画像分割手段50は、画像分割手段41と同様、被写体9が撮影されたRGB画像P及びデプス画像Pを分割する。 The image segmentation means 50 divides the RGB image PC and the depth image P D input from the RGB- D camera 2 for each viewpoint. As shown in FIGS. 6A and 6B, the image segmentation means 50 divides the RGB image PC and the depth image PD in which the subject 9 is captured, similarly to the image segmentation means 41.

なお、図6では、レンズ系21を介しているため、RGB画像P及びデプス画像Pで被写体9が逆立像になっている。この場合、被写体9が正立像となるようにRGB画像P及びデプス画像Pに反転処理を施してもよい。 In FIG. 6, since the subject 9 is interposed in the lens system 21, the subject 9 is an upright image in the RGB image PC and the depth image PD . In this case, the RGB image PC and the depth image P D may be inverted so that the subject 9 becomes an upright image.

コストボリューム生成手段51は、後記する奥行きレイヤ及びRGB画像Pの画素位置毎にコストを算出し、コストを奥行きレイヤ及び画素位置で三次元配列したコストボリュームを生成するものである。本実施形態では、コストボリューム生成手段51は、コストボリュームを推定する手法の一つであるプレーンスイープ法を用いることとする(参考文献3)。 The cost volume generating means 51 calculates the cost for each pixel position of the depth layer and the RGB image PC described later, and generates a cost volume in which the cost is three - dimensionally arranged in the depth layer and the pixel position. In the present embodiment, the cost volume generating means 51 uses the plain sweep method, which is one of the methods for estimating the cost volume (Reference 3).

参考文献3:David Gallup, et al. , "Real-time plane-sweeping stereo with multiple sweeping directions", IEEE Conference on Computer Vision and Pattern Recognition, pp. 1-8 (2007) Reference 3: David Gallup, et al., "Real-time plane-sweeping stereo with multiple sweeping directions", IEEE Conference on Computer Vision and Pattern Recognition, pp. 1-8 (2007)

まず、コストボリューム生成手段51は、図7に示すように、被写体9が配置された空間中に、奥行き方向で所定間隔の奥行きレイヤNを複数設定する。図7の例では、5つの奥行きレイヤNが設定されている(D=1,…,5)。なお、図7では、x軸が水平方向、y軸が垂直方向、z軸が奥行方向を示す。次に、コストボリューム生成手段51は、全ての仮想カメラCのうち何れか1台をリファレンスカメラとして、このリファレンスカメラと、別のもう1台の仮想カメラCとでカメラペアを設定する。そして、コストボリューム生成手段51は、カメラペアを構成する各仮想カメラCのRGB画像Pを射影変換により奥行きレイヤNに投影する。さらに、コストボリューム生成手段51は、奥行きレイヤNに投影した2つのRGB画像Pの各画素の画素値の差分(例えば、SAD:Sum of Absolute Difference)を求めることで、コストを算出する。このコストは、その奥行きレイヤNに投影された2つのRGB画像Pの類似度を表し、その値が小さくなる程、その奥行きレイヤNに被写体9の奥行きが存在する可能性が高いことを表す。 First, as shown in FIG. 7, the cost volume generating means 51 sets a plurality of depth layers ND at predetermined intervals in the depth direction in the space where the subject 9 is arranged. In the example of FIG. 7, five depth layers ND are set ( D = 1, ..., 5). In FIG. 7, the x-axis indicates the horizontal direction, the y-axis indicates the vertical direction, and the z-axis indicates the depth direction. Next, the cost volume generation means 51 uses any one of all the virtual cameras C as a reference camera, and sets a camera pair with this reference camera and another virtual camera C. Then, the cost volume generation means 51 projects the RGB image CC of each virtual camera C constituting the camera pair onto the depth layer ND by projective transformation. Further, the cost volume generating means 51 calculates the cost by obtaining the difference (for example, SAD: Sum of Absolute Difference) of the pixel value of each pixel of the two RGB image PCs projected on the depth layer ND. This cost represents the similarity between the two RGB images PC projected on the depth layer ND , and the smaller the value, the higher the possibility that the depth of the subject 9 exists in the depth layer ND . Represents.

コストボリューム生成手段51は、前記した処理を全ての奥行きレイヤNで行うことで、コストボリュームを生成できる。図8に示すように、RGB画像PのサイズをU×V画素とすると、コストボリューム91は、U×V×Nのコストの3次元配列となる。また、コストボリューム91では、同一画素位置で奥行方向に配列されたコストをコスト列92とする。つまり、コスト列92は、1×1×Nのコストの3次元配列となる。そして、コストボリューム生成手段51は、リファレンスカメラのRGB画像Pをガイドとして、ガイデッドフィルタをコストボリューム91に適用する(参考文献4)。これにより、エッジを保持したままコストボリューム91を平滑化できるため、コストボリューム91のノイズを低減できる。 The cost volume generating means 51 can generate a cost volume by performing the above- mentioned processing in all the depth layers ND. As shown in FIG. 8, assuming that the size of the RGB image PC is U × V pixels, the cost volume 91 is a three - dimensional array of costs of U × V × N D. Further, in the cost volume 91, the costs arranged in the depth direction at the same pixel position are referred to as the cost column 92. That is, the cost column 92 is a three-dimensional array of costs of 1 × 1 × ND. Then, the cost volume generating means 51 applies the guided filter to the cost volume 91 using the RGB image PC of the reference camera as a guide (Reference 4). As a result, the cost volume 91 can be smoothed while holding the edge, so that the noise of the cost volume 91 can be reduced.

参考文献4:Kaiming He, Sun Jian, and Tang Xiaoou, "Guided image filtering", European conference on computer vision. Springer, pp. 1-10, (2010) Reference 4: Kaiming He, Sun Jian, and Tang Xiaoou, "Guided image filtering", European conference on computer vision. Springer, pp. 1-10, (2010)

リファレンスカメラの周辺にある仮想カメラCの集合をSとすると、集合の要素数|S|だけカメラペアを設定できる。このとき、コストボリューム91もカメラペアと同数できる。例えば、仮想カメラCが4台の場合、1台のリファレンスカメラに対して、カメラペアが3つとなり、コストボリューム91も3つとなる。例えば、仮想カメラCがリファレンスカメラの場合、カメラペアが(C,C)、(C,C)、(C,C)となる。 Assuming that the set of virtual cameras C around the reference camera is S, the camera pair can be set by the number of elements | S | of the set. At this time, the cost volume 91 can be the same as that of the camera pair. For example, when there are four virtual cameras C, there are three camera pairs and three cost volumes 91 for one reference camera. For example, when the virtual camera C 1 is a reference camera, the camera pairs are (C 1 , C 2 ), (C 1 , C 3 ), and (C 1 , C 4 ).

初期デプスマップ生成手段52は、コストボリューム生成手段51から入力されたコストボリューム91で同一画素位置のコスト列92において、コストが最小となる奥行きレイヤNのデプスを示す初期デプスマップを生成するものである。 The initial depth map generation means 52 generates an initial depth map showing the depth of the depth layer ND that minimizes the cost in the cost column 92 at the same pixel position with the cost volume 91 input from the cost volume generation means 51. Is.

ここで、初期デプスマップ生成手段52は、1台のリファレンスカメラに対して複数のコストボリューム91が存在するため、各コストボリューム91の総和をリファレンスカメラの最終的なコストボリューム91として求める。そして、初期デプスマップ生成手段52は、各コスト列92で最小のコストを有する奥行きレイヤNを正しいデプスとして求め、リファレンスカメラの初期デプスマップDを生成する。 Here, since the initial depth map generation means 52 has a plurality of cost volumes 91 for one reference camera, the sum of the cost volumes 91 is obtained as the final cost volume 91 of the reference camera. Then, the initial depth map generation means 52 obtains the depth layer N D having the minimum cost in each cost column 92 as the correct depth, and generates the initial depth map DC of the reference camera.

その後、初期デプスマップ生成手段52は、初期デプスマップDをスケール補正手段56に出力し、最終的なコストボリューム91をウェイト適用手段59に出力する。 After that, the initial depth map generation means 52 outputs the initial depth map DC to the scale correction means 56, and outputs the final cost volume 91 to the weight application means 59.

平滑化手段53は、画像分割手段50から入力したデプス画像Pを平滑化するものである。ここで、平滑化手段53は、デプスカメラのショットノイズなどのノイズがデプス画像Pに含まれるため、このデプス画像Pをフィルタ処理により平滑化する。例えば、フィルタ処理として、ガイデッドフィルタがあげられる。このガイデッドフィルタは、平滑化フィルタの一種であり、ガイド画像を用いて対象の画像を平滑化する。ここでは、ガイド画像として、RGB画像Pを用いる。 The smoothing means 53 smoothes the depth image PD input from the image segmentation means 50. Here, the smoothing means 53 smoothes the depth image P D by filtering because noise such as shot noise of the depth camera is included in the depth image P D. For example, as a filtering process, a guided filter can be mentioned. This guided filter is a kind of smoothing filter and smoothes a target image by using a guide image. Here, an RGB image PC is used as the guide image.

なお、フィルタ処理によりノイズを除去できる一方、過度な平滑化によりデプス画像Pの精度が低下する可能性がある。このため、平滑化手段53は、必要に応じでフィルタ処理を実行すればよい。 While noise can be removed by filtering, the accuracy of the depth image PD may decrease due to excessive smoothing. Therefore, the smoothing means 53 may execute the filtering process as needed.

スケール変換手段54は、デプス画像Pの各画素の画素値を実スケールのデプスに変換するスケール変換関数により、デプス画像Pを中間デプスマップに変換するものである。本実施形態では、スケール変換手段54は、スケール変換関数算出手段44から入力されたスケール変換関数により、平滑化手段53から入力されたデプス画像Pを実スケールのデプスマップへと変換する。なお、スケール変換手段54は、RGB-Dカメラ2のメーカからスケール変換関数が提供される場合、これを使用してもよい。 The scale conversion means 54 converts the depth image P D into an intermediate depth map by a scale conversion function that converts the pixel value of each pixel of the depth image P D into the depth of the actual scale. In the present embodiment, the scale conversion means 54 converts the depth image PD input from the smoothing means 53 into an actual scale depth map by the scale conversion function input from the scale conversion function calculation means 44. The scale conversion means 54 may use the scale conversion function when the manufacturer of the RGB-D camera 2 provides the scale conversion function.

レイヤ化処理手段55は、スケール変換手段54から入力された中間デプスマップのデプスを最も近い奥行きレイヤNのデプスに置き換えるレイヤ化処理を施すものである。具体的には、レイヤ化処理手段55は、カメラパラメータが既知のため、実スケールの中間デプスマップを3次元点群化できる。ここで、レイヤ化処理手段55は、中間デプスマップがカメラ座標系における光軸方向(一般的にはz方向)の距離ではなく、光学中心からの距離を表している場合、その距離を考慮して3次元点群化する。そして、レイヤ化処理手段55は、各点のデプスを最も近い奥行きレイヤNの所属とすることで、中間デプスマップを奥行きレイヤNで表現する。以後、レイヤ化処理を施した中間デプスマップをDとする。 The layering processing means 55 performs layering processing in which the depth of the intermediate depth map input from the scale conversion means 54 is replaced with the depth of the nearest depth layer ND . Specifically, since the layering processing means 55 has known camera parameters, it is possible to form a real-scale intermediate depth map into a three-dimensional point cloud. Here, the layering processing means 55 considers the distance from the optical center when the intermediate depth map represents the distance from the optical center instead of the distance in the optical axis direction (generally the z direction) in the camera coordinate system. 3D point cloud. Then, the layering processing means 55 expresses the intermediate depth map by the depth layer ND by making the depth of each point belong to the nearest depth layer ND . Hereinafter, the intermediate depth map that has been layered is referred to as DD .

スケール補正手段56は、初期デプスマップDと中間デプスマップDとのデプス差が閾値以下の画素について、各奥行きレイヤNでデプス差の平均を補正値として求め、中間デプスマップDのデプスを補正値で補正するものである。つまり、スケール補正手段56は、スケール変換関数の精度が低い場合、デプス画像Pから生成した中間デプスマップDをRGB画像Pから生成した初期デプスマップDに合わせるように補正する。 The scale correction means 56 obtains the average of the depth differences in each depth layer N D for the pixels whose depth difference between the initial depth map DC and the intermediate depth map D D is equal to or less than the threshold value, and obtains the average of the depth differences as the correction value of the intermediate depth map D D. The depth is corrected by the correction value. That is, when the accuracy of the scale conversion function is low, the scale correction means 56 corrects the intermediate depth map DD generated from the depth image PD to match the initial depth map DC generated from the RGB image PC.

具体的には、スケール補正手段56は、初期デプスマップDと中間デプスマップDとの各画素のデプス差DSub=D-Dを算出する。次に、スケール補正手段56は、|DSub|≦thresoldを満たす画素のみを対象として、初期デプスマップDの各デプスd(d=1,2,・・・,N)でデプス差DSubの平均を算出し、補正値とする。なお、閾値thresoldは手動で設定する。そして、スケール補正手段56は、D New=D Old+DCorのように、補正前の中間デプスマップD Oldに補正デプス値DCorを適用し、補正後の中間デプスマップD Newを求める(以後、中間デプスマップD)。
なお、スケール補正手段56は、スケール変換関数の精度が高い場合、処理を行わなくともよい。
Specifically, the scale correction means 56 calculates the depth difference D Sub = DC −DD of each pixel between the initial depth map DC and the intermediate depth map D D. Next, the scale correction means 56 targets only the pixels satisfying | D Sub | ≤thold, and the depth difference D at each depth d (d = 1, 2, ..., N D ) of the initial depth map DC. The average of Sub is calculated and used as a correction value. The threshold threshold is set manually. Then, the scale correction means 56 applies the correction depth value D Cor to the intermediate depth map D D Old before correction, such as D D New = D D Old + DC Cor , and obtains the corrected intermediate depth map D D New . Find (hereafter, intermediate depth map DD ).
The scale correction means 56 does not have to perform processing when the accuracy of the scale conversion function is high.

コストウェイト算出手段57は、スケール補正手段56から入力された中間デプスマップDの重みを正規分布関数で表したコストウェイトWを算出するものである。前記したように、コストボリューム91は、RGB画像Pのみから生成されており、デプスマップを考慮していない。そこで、中間デプスマップDから算出したコストウェイトWをコストボリューム91に適用することで、RGB画像Pとデプスマップとの両方が考慮されたコストボリューム91となる。 The cost weight calculation means 57 calculates the cost weight WC in which the weights of the intermediate depth maps DD input from the scale correction means 56 are represented by a normal distribution function. As described above, the cost volume 91 is generated only from the RGB image PC and does not consider the depth map. Therefore, by applying the cost weight WC calculated from the intermediate depth map DD to the cost volume 91, the cost volume 91 is obtained in consideration of both the RGB image PC and the depth map.

コストウェイトWは、中間デプスマップDが正しいデプス値を有する可能性が高いとして、そのデプスのウェイトを最小値とした正規分布で表す。図9に示すように、正規分布の最大値を1とし、奥行きレイヤdの正規分布関数g(d)を以下の式(1)で定義する。 The cost weight WC is expressed as a normal distribution with the weight of the depth as the minimum value, assuming that the intermediate depth map DD is likely to have the correct depth value. As shown in FIG. 9, the maximum value of the normal distribution is set to 1, and the normal distribution function g (d) of the depth layer d is defined by the following equation (1).

Figure 2022024688000002
Figure 2022024688000002

ここで、μは平均、σは分散、σは標準偏差を表す。この正規分布関数g(d)を用いてコストウェイト関数f(d)を以下の式(2)で定義する。なお、aは、コストウェイトWを決めるパラメータである。また、図10(a)に示すように、式(2)の正規分布関数g(d)において、平均μが中間デプスマップDの画素(u,v)のデプス値D(u,v)の平均を表し、分散σがコストウェイト関数f(d)の設計方針に応じて予め設定される(例えば、σ=N/3)。 Here, μ represents the mean, σ 2 represents the variance, and σ represents the standard deviation. Using this normal distribution function g (d), the cost weight function f C (d) is defined by the following equation (2). Note that a c is a parameter that determines the cost weight WC . Further, as shown in FIG. 10A, in the normal distribution function g (d) of the equation (2), the depth values DD (u, v) of the pixels (u, v) whose average μ is the intermediate depth map DD . ), And the variance σ 2 is preset according to the design policy of the cost weight function f C (d) (for example, σ 2 = N D / 3).

Figure 2022024688000003
Figure 2022024688000003

コストウェイトWは、コストボリューム91と同一サイズの3次元配列となる。そして、コストウェイトWの各要素には、以下の式(3)に示すように、コストウェイト関数f(d)の値が入る。以上より、コストウェイト算出手段57は、式(3)を用いて、コストウェイトWを算出する。 The cost weight WC is a three-dimensional array having the same size as the cost volume 91. Then, as shown in the following equation (3), the value of the cost weight function f C (d) is input to each element of the cost weight WC . From the above, the cost weight calculation means 57 calculates the cost weight WC using the equation (3).

Figure 2022024688000004
Figure 2022024688000004

ビジビリティウェイト算出手段58は、コストウェイト算出手段57から入力された中間デプスマップDから、オクルージョン発生時にコストを低下させるビジビリティウェイトWを算出するものである。 The visibility weight calculation means 58 calculates the visibility weight WV that reduces the cost when occlusion occurs from the intermediate depth map DD input from the cost weight calculation means 57.

ここで、コストボリューム91を生成したときにオクルージョンが考慮されておらず、オクルージョンが発生した部分のコストがノイズとなり、前記したレイヤ化処理でもエラーが発生している。複数のカメラペアでコストボリューム91の総和を求めた場合でも、このエラーは同様に発生する。なお、オクルージョンとは、一方の仮想カメラCで見え、かつ、他方の仮想カメラCで見えない領域が発生することである。 Here, occlusion is not taken into consideration when the cost volume 91 is generated, the cost of the portion where occlusion occurs becomes noise, and an error occurs even in the layering process described above. This error also occurs when the sum of the cost volumes 91 is calculated for a plurality of camera pairs. Note that occlusion means that a region that can be seen by one virtual camera C and cannot be seen by the other virtual camera C is generated.

その一方、中間デプスマップDは、1台のデプスカメラから生成されているため、オクルージョンの影響を受けない。そこで、ビジビリティウェイト算出手段58は、オクルージョンの影響を緩和する(オクルージョンが発生した部分のコストを低下させる)ため、中間デプスマップDからビジビリティウェイトWを算出する。 On the other hand, since the intermediate depth map DD is generated from one depth camera, it is not affected by occlusion. Therefore, the visibility weight calculation means 58 calculates the visibility weight WV from the intermediate depth map DD in order to mitigate the influence of occlusion (reduce the cost of the portion where occlusion occurs).

図10(b)に示すように、ビジビリティウェイト関数f(d)を以下の式(4)で定義する。なお、aは、ビジビリティウェイトWを決めるパラメータである。式(4)の正規分布関数g(d)において、平均μは、デプス値D(u,v)の平均に定数shiftを加えた値D(u,v)+shiftを表す(但し、shift≧0)。また、分散σは、ビジビリティウェイト関数f(d)の設計方針に応じて予め設定される(例えば、σ=N/10)。定数shiftの値を大きくすることで、中間デプスマップDに誤差が存在しても許容される一方、ビジビリティウェイトWの効果が小さくなる。 As shown in FIG. 10 (b), the visibility weight function f V (d) is defined by the following equation (4). Note that a V is a parameter that determines the visibility weight W V. In the normal distribution function g (d) of the equation (4), the mean μ represents the value DD (u, v) + shift obtained by adding the constant shift to the mean of the depth values DD (u, v) (however, shift). ≧ 0). Further, the variance σ 2 is set in advance according to the design policy of the visibility weight function f V (d) (for example, σ 2 = N D / 10). By increasing the value of the constant shift, it is permissible even if there is an error in the intermediate depth map DD , but the effect of the visibility weight WV becomes smaller.

Figure 2022024688000005
Figure 2022024688000005

ビジビリティウェイトWは、コストボリューム91と同一サイズの3次元配列となる。そして、ビジビリティウェイトWの各要素には、以下の式(5)に示すように、ビジビリティウェイト関数f(d)の値が入る。以上より、ビジビリティウェイト算出手段58は、式(5)のビジビリティウェイトWを算出する。 The visibility weight WV is a three-dimensional array having the same size as the cost volume 91. Then, as shown in the following equation (5), the value of the visibility weight function f V (d) is input to each element of the visibility weight WV . From the above, the visibility weight calculation means 58 calculates the visibility weight WV of the equation (5).

Figure 2022024688000006
Figure 2022024688000006

ウェイト適用手段59は、初期デプスマップ生成手段52から入力されたコストボリューム91にコストウェイトW及びビジビリティウェイトWを適用するものである。ここで、最終的なコストボリュームEは、リファレンスカメラCとして、全てのカメラペアで統合したコストボリューム91である。つまり、ウェイト適用手段59は、以下の式(6)に示すように、リファレンスカメラのコストウェイトW(x,y,z)、コストボリュームE、ビジビリティウェイトWにより、最終的なコストボリュームEを算出する。 The weight applying means 59 applies the cost weight WC and the visibility weight WV to the cost volume 91 input from the initial depth map generating means 52. Here, the final cost volume ES is the cost volume 91 integrated in all camera pairs as the reference camera C. That is, as shown in the following equation (6), the weight applying means 59 has a final cost volume due to the cost weight WC (x, y, z ), the cost volume EJ, and the visibility weight WV of the reference camera. Calculate ES .

Figure 2022024688000007
Figure 2022024688000007

なお、コストボリュームEは、リファレンスカメラCと周囲のカメラ集合Sに含まれる仮想カメラC(j∈S)とのコストボリューム91である。また、warpは、仮想カメラCからリファレンスカメラCへの各奥行きレイヤNを平面とした射影変換を表す。 The cost volume E j is a cost volume 91 of the reference camera C and the virtual camera C j (j ∈ S) included in the surrounding camera set S. Further, warp represents a projective transformation with each depth layer ND as a plane from the virtual camera C j to the reference camera C.

最終デプスマップ生成手段60は、ウェイト適用手段59から入力されたコストボリューム91で同一画素位置のコスト列92において、コストが最小となる奥行きレイヤNのデプスを示す最終デプスマップを生成するものである。つまり、最終デプスマップ生成手段60は、各コスト列92で最小のコストを有する奥行きレイヤNを正しいデプスとして求め、最終的なデプスマップを生成する。
なお、最終デプスマップ生成手段60は、初期デプスマップ生成手段52と同様の手法で最終的なデプスマップを生成するため、これ以上の説明を省略する。
The final depth map generation means 60 generates a final depth map showing the depth of the depth layer ND that minimizes the cost in the cost column 92 at the same pixel position with the cost volume 91 input from the weight application means 59. be. That is, the final depth map generation means 60 obtains the depth layer ND having the lowest cost in each cost column 92 as the correct depth, and generates the final depth map.
Since the final depth map generation means 60 generates the final depth map by the same method as the initial depth map generation means 52, further description thereof will be omitted.

その後、リファインメント手段5は、各視点のRGB画像P及び最終的なデプスマップと、カメラ校正手段4から入力された仮想カメラCのカメラパラメータとをセットで出力する。 After that, the refinement means 5 outputs the RGB image PC of each viewpoint, the final depth map, and the camera parameters of the virtual camera C input from the camera calibration means 4 as a set.

[カメラ校正処理]
図11を参照し、カメラ校正処理について説明する。
図11に示すように、ステップS1において、画角補正手段40は、RGB-Dカメラ2から入力されたデプス画像Pの画角がRGB画像Pの画角に一致するように、デプス画像Pを射影変換する。なお、ステップS1の処理は、必須でないため破線で図示した。
[Camera calibration process]
The camera calibration process will be described with reference to FIG.
As shown in FIG. 11, in step S1, the angle-of-view correction means 40 uses the depth image so that the angle of view of the depth image PD input from the RGB - D camera 2 matches the angle of view of the RGB image PC. Projective conversion of PD. Since the process of step S1 is not essential, it is shown by a broken line.

ステップS2において、画像分割手段41は、RGB画像P及びデプス画像Pを視点毎に分割する。
ステップS3において、初期カメラパラメータ算出手段42は、各視点のRGB画像Pにカメラ校正処理を施すことで、各視点に対応した仮想カメラCの初期カメラパラメータを算出する。
ステップS4において、カメラパラメータ最適化手段43は、初期カメラパラメータを初期値としたカメラ校正処理により、各仮想カメラCの間でカメラパラメータを最適化する。
ステップS5において、スケール変換関数算出手段44は、カメラパラメータが示す仮想カメラCの位置から校正パターンまでの距離をデプス画像Pの各画素の画素値に対応させることで、スケール変換関数を算出する。
In step S2, the image segmentation means 41 divides the RGB image PC and the depth image PD for each viewpoint.
In step S3, the initial camera parameter calculation means 42 calculates the initial camera parameters of the virtual camera C corresponding to each viewpoint by performing camera calibration processing on the RGB image PC of each viewpoint.
In step S4, the camera parameter optimizing means 43 optimizes the camera parameters among the virtual cameras C by the camera calibration process with the initial camera parameters as the initial values.
In step S5, the scale conversion function calculation means 44 calculates the scale conversion function by making the distance from the position of the virtual camera C indicated by the camera parameters to the calibration pattern correspond to the pixel value of each pixel of the depth image PD. ..

[リファインメント処理]
図12を参照し、リファインメント処理について説明する。
図12に示すように、ステップS10において、画像分割手段50は、RGB画像P及びデプス画像Pを仮想カメラC毎に分割する。
ステップS11において、コストボリューム生成手段51は、奥行きレイヤ及びRGB画像Pの画素毎にコストを算出し、コストの三次元配列であるコストボリューム91を生成する。
[Refinement processing]
The refinement process will be described with reference to FIG.
As shown in FIG. 12, in step S10, the image segmentation means 50 divides the RGB image PC and the depth image PD into each virtual camera C.
In step S11, the cost volume generating means 51 calculates the cost for each pixel of the depth layer and the RGB image PC, and generates the cost volume 91 which is a three - dimensional array of costs.

ステップS12において、初期デプスマップ生成手段52は、コストボリューム91で同一画素位置のコスト列92において、コストが最小となる奥行きレイヤのデプスを示す初期デプスマップを生成する。
なお、ステップS11,S12の処理と、後記するステップS13~S18の処理は、並列で実行できる。
In step S12, the initial depth map generation means 52 generates an initial depth map showing the depth of the depth layer that minimizes the cost in the cost column 92 at the same pixel position with the cost volume 91.
The processes of steps S11 and S12 and the processes of steps S13 to S18 described later can be executed in parallel.

ステップS13において、平滑化手段53は、デプス画像Pを平滑化する。
ステップS14において、スケール変換手段54は、デプス画像Pの各画素の画素値を実スケールのデプスに変換するスケール変換関数により、デプス画像Pを中間デプスマップに変換する。
ステップS15において、レイヤ化処理手段55は、中間デプスマップのデプスを最も近い奥行きレイヤのデプスに置き換えるレイヤ化処理を施す。
In step S13, the smoothing means 53 smoothes the depth image PD.
In step S14, the scale conversion means 54 converts the depth image P D into an intermediate depth map by a scale conversion function that converts the pixel value of each pixel of the depth image P D into the depth of the actual scale.
In step S15, the layering processing means 55 performs a layering process of replacing the depth of the intermediate depth map with the depth of the nearest depth layer.

ステップS16において、スケール補正手段56は、初期デプスマップDと中間デプスマップDとのデプス差が閾値以下の画素について、各奥行きレイヤNでデプス差の平均を補正値として求め、中間デプスマップDのデプスを補正値で補正する。なお、ステップS16の処理は、必須でないため破線で図示した。
ステップS17において、コストウェイト算出手段57は、中間デプスマップDの重みを正規分布関数で表したコストウェイトWを算出する。
ステップS18において、ビジビリティウェイト算出手段58は、中間デプスマップDから、オクルージョン発生時にコストを低下させるビジビリティウェイトWを算出する。
In step S16, the scale correction means 56 obtains the average of the depth differences in each depth layer N D as a correction value for the pixels whose depth difference between the initial depth map DC and the intermediate depth map DD is equal to or less than the threshold value, and obtains the intermediate depth. Correct the depth of the map DD with the correction value. Since the process of step S16 is not essential, it is shown by a broken line.
In step S17, the cost weight calculation means 57 calculates the cost weight WC in which the weights of the intermediate depth maps DD are represented by a normal distribution function.
In step S18, the visibility weight calculation means 58 calculates the visibility weight WV that reduces the cost when occlusion occurs from the intermediate depth map DD .

ステップS19において、ウェイト適用手段59は、コストウェイトW及びビジビリティウェイトWをコストボリューム91に適用する。
ステップS20において、最終デプスマップ生成手段60は、コストボリューム91で同一画素位置のコスト列92において、コストが最小となる奥行きレイヤNのデプスを示す最終デプスマップを生成する。
In step S19, the weight applying means 59 applies the cost weight WC and the visibility weight WV to the cost volume 91.
In step S20, the final depth map generation means 60 generates a final depth map showing the depth of the depth layer ND that minimizes the cost in the cost column 92 at the same pixel position with the cost volume 91.

[作用・効果]
以上のように、三次元形状取得システム1は、複数視点のRGB画像P及び高精度なデプスマップと、仮想カメラCのカメラパラメータとを容易に取得できる。すなわち、三次元形状取得システム1は、簡易なシステム構成を実現し、複数視点分のRGB画像P及び高精度なデプスマップと、仮想カメラCのカメラパラメータとを提供できる。これらデータは、様々なアプリケーションで利用可能である。例えば、三次元画像を生成する場合、密な多視点RGB画像が必要になる。三次元形状取得システム1が提供するデータは、仮想カメラCのカメラパラメータや高精度なデプスマップを含んでいるため、簡単な処理で三次元画像を生成できる。
[Action / Effect]
As described above, the three-dimensional shape acquisition system 1 can easily acquire the RGB image CC of a plurality of viewpoints, the highly accurate depth map, and the camera parameters of the virtual camera C. That is, the three-dimensional shape acquisition system 1 can realize a simple system configuration, and can provide RGB image PCs for a plurality of viewpoints, a highly accurate depth map, and camera parameters of a virtual camera C. These data are available in various applications. For example, when generating a three-dimensional image, a dense multi-viewpoint RGB image is required. Since the data provided by the three-dimensional shape acquisition system 1 includes the camera parameters of the virtual camera C and the highly accurate depth map, a three-dimensional image can be generated by a simple process.

以上、本発明の実施形態を詳述してきたが、本発明はこれに限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。 Although the embodiments of the present invention have been described in detail above, the present invention is not limited to this, and includes design changes and the like within a range that does not deviate from the gist of the present invention.

前記した実施形態では、デプスカメラがToFカメラであることとして説明したが、これに限定されない。例えば、デプスカメラがステレオカメラであってもよい。 In the above-described embodiment, the depth camera is described as a ToF camera, but the present invention is not limited to this. For example, the depth camera may be a stereo camera.

本発明は、コンピュータが備えるCPU、メモリ、ハードディスク等のハードウェア資源を、前記した三次元形状取得装置として動作させるプログラムで実現することもできる。これらのプログラムは、通信回線を介して配布してもよく、CD-ROMやフラッシュメモリ等の記録媒体に書き込んで配布してもよい。 The present invention can also be realized by a program that operates the hardware resources such as the CPU, memory, and hard disk of the computer as the above-mentioned three-dimensional shape acquisition device. These programs may be distributed via a communication line, or may be written and distributed on a recording medium such as a CD-ROM or a flash memory.

1 三次元形状取得システム(デプスマップ生成システム)
2 RGB-Dカメラ(撮影装置)
20 カメラ本体
21 レンズ系
22 フレネルレンズ
23 レンズアレイ
24 要素レンズ
25 赤外線LEDアレイ
3 三次元形状取得装置(デプスマップ生成装置)
4 カメラ校正手段
40 画角補正手段
41 画像分割手段
42 初期カメラパラメータ算出手段
43 カメラパラメータ最適化手段
44 スケール変換関数算出手段(奥行き変換関数算出手段)
5 リファインメント手段
50 画像分割手段
51 コストボリューム生成手段
52 初期デプスマップ生成手段
53 平滑化手段
54 スケール変換手段(奥行き変換手段)
55 レイヤ化処理手段
56 スケール補正手段(中間デプスマップ補正手段)
57 コストウェイト算出手段
58 ビジビリティウェイト算出手段
59 ウェイト適用手段
60 最終デプスマップ生成手段
9 被写体
90 校正パターン
91 コストボリューム
92 コスト列
C 仮想カメラ
初期デプスマップ
中間デプスマップ
奥行きレイヤ
1 3D shape acquisition system (depth map generation system)
2 RGB-D camera (shooting device)
20 Camera body 21 Lens system 22 Fresnel lens 23 Lens array 24 Element lens 25 Infrared LED array 3 Three-dimensional shape acquisition device (depth map generator)
4 Camera calibration means 40 Angle of view correction means 41 Image division means 42 Initial camera parameter calculation means 43 Camera parameter optimization means 44 Scale conversion function calculation means (depth conversion function calculation means)
5 Refinement means 50 Image segmentation means 51 Cost volume generation means 52 Initial depth map generation means 53 Smoothing means 54 Scale conversion means (depth conversion means)
55 Layering processing means 56 Scale correction means (intermediate depth map correction means)
57 Cost weight calculation means 58 Visibility weight calculation means 59 Weight application means 60 Final depth map generation means 9 Subject 90 Calibration pattern 91 Cost volume 92 Cost column C Virtual camera DC Initial depth map D D Intermediate depth map N D Depth layer

Claims (8)

同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置が各視点で被写体を撮影した撮影画像及びデプス画像を用いて、各視点の前記撮影画像に対応したデプスマップを生成するデプスマップ生成装置であって、
奥行き方向で所定間隔の奥行きレイヤ及び前記撮影画像の画素位置毎に、前記奥行きレイヤに投影された前記撮影画像間の類似度を表すコストを算出し、当該コストを前記奥行きレイヤ及び前記画素位置で三次元配列したコストボリュームを生成するコストボリューム生成手段と、
前記デプス画像の各画素の画素値を奥行きに変換する奥行き変換関数により、前記デプス画像を中間デプスマップに変換する奥行き変換手段と、
前記中間デプスマップの重みを正規分布関数で表したコストウェイトを算出するコストウェイト算出手段と、
前記中間デプスマップから、オクルージョン発生時に前記コストを低下させるビジビリティウェイトを算出するビジビリティウェイト算出手段と、
前記コストボリュームに前記コストウェイト及び前記ビジビリティウェイトを適用するウェイト適用手段と、
ウェイト適用後の前記コストボリュームで同一画素位置のコスト列において、前記コストが最小となる前記奥行きレイヤのデプスを示す最終デプスマップを生成する最終デプスマップ生成手段と、
を備えることを特徴とするデプスマップ生成装置。
A shooting device composed of a shooting camera with the same optical axis, a depth camera, and an optical element array generates a depth map corresponding to the shot image of each viewpoint by using the shot image and the depth image of the subject taken from each viewpoint. Depth map generator
A cost representing the similarity between the captured images projected on the depth layer is calculated for each of the depth layers at predetermined intervals in the depth direction and the pixel positions of the captured images, and the cost is calculated at the depth layer and the pixel positions. A cost volume generation means that generates a three-dimensional array of cost volumes,
Depth conversion means for converting the depth image into an intermediate depth map by a depth conversion function that converts the pixel value of each pixel of the depth image into depth.
A cost weight calculation means for calculating a cost weight in which the weight of the intermediate depth map is expressed by a normal distribution function, and a cost weight calculation means.
A visibility weight calculation means that calculates a visibility weight that reduces the cost when an occlusion occurs from the intermediate depth map.
A weight application means for applying the cost weight and the visibility weight to the cost volume,
A final depth map generation means that generates a final depth map showing the depth of the depth layer that minimizes the cost in the cost column at the same pixel position in the cost volume after weight application.
A depth map generator characterized by being equipped with.
前記デプス画像を平滑化する平滑化手段、をさらに備え、
前記奥行き変換手段は、前記奥行き変換関数により、前記平滑化手段が平滑化したデプス画像を前記中間デプスマップに変換することを特徴とする請求項1に記載のデプスマップ生成装置。
Further provided with a smoothing means for smoothing the depth image,
The depth map generation device according to claim 1, wherein the depth conversion means converts a depth image smoothed by the smoothing means into the intermediate depth map by the depth conversion function.
前記コストボリューム生成手段が生成したコストボリュームで同一画素位置のコスト列において、前記コストが最小となる前記奥行きレイヤのデプスを示す初期デプスマップを生成する初期デプスマップ生成手段と、
前記初期デプスマップと前記中間デプスマップとのデプス差が閾値以下の画素について、前記奥行きレイヤ間でデプス差の平均を補正値として求め、前記中間デプスマップのデプスを前記補正値で補正する中間デプスマップ補正手段と、
をさらに備えることを特徴とする請求項1又は請求項2に記載のデプスマップ生成装置。
An initial depth map generation means that generates an initial depth map showing the depth of the depth layer that minimizes the cost in a cost column at the same pixel position in the cost volume generated by the cost volume generation means.
For pixels whose depth difference between the initial depth map and the intermediate depth map is equal to or less than the threshold value, the average of the depth differences between the depth layers is obtained as a correction value, and the depth of the intermediate depth map is corrected by the correction value. Map correction means and
The depth map generator according to claim 1 or 2, further comprising.
前記中間デプスマップのデプスを最も近い前記奥行きレイヤのデプスに置き換えるレイヤ化処理を施すレイヤ化処理手段、をさらに備え、
前記中間デプスマップ補正手段は、前記レイヤ化処理手段がレイヤ化処理を施した中間デプスマップのデプスを前記補正値で補正することを特徴とする請求項3に記載のデプスマップ生成装置。
Further provided is a layering processing means for performing a layering process for replacing the depth of the intermediate depth map with the depth of the nearest depth layer.
The depth map generation device according to claim 3, wherein the intermediate depth map correction means corrects the depth of the intermediate depth map to which the layering processing means has been layered with the correction value.
前記撮影装置が各視点で校正パターンを撮影した撮影画像にカメラ校正処理を施すことで、各視点に対応した仮想カメラの初期カメラパラメータを算出する初期カメラパラメータ算出手段と、
前記初期カメラパラメータを初期値とした前記カメラ校正処理により、各仮想カメラの間でカメラパラメータを最適化するカメラパラメータ最適化手段と、
最適化した前記カメラパラメータが示す仮想カメラの位置から前記校正パターンまでの距離を前記デプス画像の各画素の画素値に対応させることで、前記奥行き変換関数を算出する奥行き変換関数算出手段と、
をさらに備えることを特徴とする請求項1から請求項4の何れか一項に記載のデプスマップ生成装置。
An initial camera parameter calculation means for calculating the initial camera parameters of the virtual camera corresponding to each viewpoint by performing a camera calibration process on the captured image obtained by the photographing device from each viewpoint.
A camera parameter optimization means that optimizes camera parameters among virtual cameras by the camera calibration process with the initial camera parameters as initial values.
Depth conversion function calculation means for calculating the depth conversion function by associating the distance from the position of the virtual camera indicated by the optimized camera parameters to the calibration pattern with the pixel value of each pixel of the depth image.
The depth map generator according to any one of claims 1 to 4, further comprising.
前記撮影装置が各視点で前記校正パターンを撮影したデプス画像の画角が前記撮影画像の画角に一致するように、当該デプス画像を射影変換する画角補正手段、をさらに備え、
前記奥行き変換関数算出手段は、前記仮想カメラの位置から前記校正パターンまでの奥行きを、前記画角補正手段が射影変換した前記デプス画像の各画素の画素値に対応させることで、前記奥行き変換関数を算出することを特徴とする請求項5に記載のデプスマップ生成装置。
Further, the photographing apparatus further includes an angle-of-view correction means for projecting and converting the depth image so that the angle of view of the depth image obtained by photographing the calibration pattern at each viewpoint matches the angle of view of the photographed image.
The depth conversion function calculating means makes the depth from the position of the virtual camera to the calibration pattern correspond to the pixel value of each pixel of the depth image projected and converted by the angle of view correction means, thereby causing the depth conversion function. The depth map generator according to claim 5, wherein the depth map generator is calculated.
コンピュータを、請求項1から請求項6の何れか一項に記載のデプスマップ生成装置として機能させるためのプログラム。 A program for causing a computer to function as the depth map generator according to any one of claims 1 to 6. 同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置と、
請求項1から請求項6の何れか一項に記載のデプスマップ生成装置と、
を備えることを特徴とするデプスマップ生成システム。
An imaging device composed of a photographing camera with the same optical axis, a depth camera, and an optical element array, and
The depth map generator according to any one of claims 1 to 6.
Depth map generation system characterized by being equipped with.
JP2020127411A 2020-07-28 2020-07-28 Depth map generating device and program thereof, and depth map generating system Active JP7489253B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020127411A JP7489253B2 (en) 2020-07-28 2020-07-28 Depth map generating device and program thereof, and depth map generating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020127411A JP7489253B2 (en) 2020-07-28 2020-07-28 Depth map generating device and program thereof, and depth map generating system

Publications (2)

Publication Number Publication Date
JP2022024688A true JP2022024688A (en) 2022-02-09
JP7489253B2 JP7489253B2 (en) 2024-05-23

Family

ID=80265542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020127411A Active JP7489253B2 (en) 2020-07-28 2020-07-28 Depth map generating device and program thereof, and depth map generating system

Country Status (1)

Country Link
JP (1) JP7489253B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117455837A (en) * 2023-09-22 2024-01-26 苏州诺克汽车工程装备有限公司 High-reflection automobile part identification feeding method and system based on deep learning
WO2024057904A1 (en) * 2022-09-13 2024-03-21 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009300268A (en) 2008-06-13 2009-12-24 Nippon Hoso Kyokai <Nhk> Three-dimensional information detection device
JP7233150B2 (en) 2018-04-04 2023-03-06 日本放送協会 Depth estimation device and its program
JP7416573B2 (en) 2018-08-10 2024-01-17 日本放送協会 Stereoscopic image generation device and its program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024057904A1 (en) * 2022-09-13 2024-03-21 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program
CN117455837A (en) * 2023-09-22 2024-01-26 苏州诺克汽车工程装备有限公司 High-reflection automobile part identification feeding method and system based on deep learning

Also Published As

Publication number Publication date
JP7489253B2 (en) 2024-05-23

Similar Documents

Publication Publication Date Title
JP6722323B2 (en) System and method for imaging device modeling and calibration
CN106875339B (en) Fisheye image splicing method based on strip-shaped calibration plate
TWI555379B (en) An image calibrating, composing and depth rebuilding method of a panoramic fish-eye camera and a system thereof
EP2751521B1 (en) Method and system for alignment of a pattern on a spatial coded slide image
WO2019100933A1 (en) Method, device and system for three-dimensional measurement
JP6570327B2 (en) Control device, imaging device, control method, program, and storage medium
JP6585006B2 (en) Imaging device and vehicle
JP4782899B2 (en) Parallax detection device, distance measuring device, and parallax detection method
CN110689581A (en) Structured light module calibration method, electronic device and computer readable storage medium
JPWO2018235163A1 (en) Calibration apparatus, calibration chart, chart pattern generation apparatus, and calibration method
US9025862B2 (en) Range image pixel matching method
JP5070435B1 (en) Three-dimensional relative coordinate measuring apparatus and method
CN107808398B (en) Camera parameter calculation device, calculation method, program, and recording medium
JP2014192613A (en) Image processing apparatus and method, and imaging apparatus
CN108629756B (en) Kinectv2 depth image invalid point repairing method
JP6071257B2 (en) Image processing apparatus, control method therefor, and program
JP7378219B2 (en) Imaging device, image processing device, control method, and program
JP2016024052A (en) Three-dimensional measurement system, three-dimensional measurement method and program
WO2012029658A1 (en) Imaging device, image-processing device, image-processing method, and image-processing program
KR20200103374A (en) 3-dimensional modeling method using 2-dimensional image
JP7489253B2 (en) Depth map generating device and program thereof, and depth map generating system
JP2018044942A (en) Camera parameter calculation device, camera parameter calculation method, program and recording medium
JP2013015519A (en) Three-dimensional relative coordinate measurement instrument and method thereof
JP2014096761A (en) Image processing apparatus, and control method and control program of the same
Sun et al. Blind calibration for focused plenoptic cameras

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240311

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240513

R150 Certificate of patent or registration of utility model

Ref document number: 7489253

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150