JP7489253B2 - Depth map generating device and program thereof, and depth map generating system - Google Patents

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

Info

Publication number
JP7489253B2
JP7489253B2 JP2020127411A JP2020127411A JP7489253B2 JP 7489253 B2 JP7489253 B2 JP 7489253B2 JP 2020127411 A JP2020127411 A JP 2020127411A JP 2020127411 A JP2020127411 A JP 2020127411A JP 7489253 B2 JP7489253 B2 JP 7489253B2
Authority
JP
Japan
Prior art keywords
depth
camera
depth map
image
cost
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020127411A
Other languages
Japanese (ja)
Other versions
JP2022024688A (en
Inventor
正規 加納
真宏 河北
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
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 Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
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)

Description

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

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

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

受動的な手法は、複数台のカラーカメラ(以降、「RGBカメラ」)、又は1台のRGBカメラを移動させて、その視差から奥行き距離を計測するものである。具体的な手法としては、ステレオ法(多眼ステレオ)、モーションステレオがある。これらの原理はステレオ法であり、2台以上のカメラの視差からデプスを計算する。受動的な手法のメリットは、被写体に特殊な光を照射する必要がない、外乱光の影響を受けない、一般的なカラーカメラとコンピュータだけで実現できることである。一方、受動的な手法のデメリットは、得られるデプスに曖昧さが残る(テクスチャレス、オクルージョン領域)、計算コストが高くなることである。 Passive methods involve moving multiple color cameras (hereafter referred to as "RGB cameras") or a single RGB camera and measuring the depth distance from the parallax. Specific methods include the stereo method (multiple-eye stereo) and motion stereo. These methods are based on the same principle as stereo methods, which calculate depth from the parallax of two or more cameras. The advantages of passive methods are that they do not require special light to be shone on the subject, they are not affected by external light, and they can be achieved with just a general color camera and a computer. On the other hand, the disadvantages of passive methods are that the obtained depth can be ambiguous (texture-less, occlusion areas), and the calculation costs are high.

その他、RGBカメラとデプスカメラを同一光軸上に配置し、レンズアレイを用いて、複数視点分のRGB画像及びデプス画像を取得できるRGB-Dカメラが知られている(特許文献1)。この手法では、カメラレンズから入射した光線をミラー(例えば、ハーフミラーやダイクロイックミラー)で分光し、RGBカメラとデプスカメラで受光する。 Another known camera is an RGB-D camera that can acquire RGB images and depth images from multiple 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, the light entering through the camera lens is split by a mirror (e.g., a half mirror or a dichroic mirror) and received by the RGB camera and the depth camera.

特開2009-300268号公報JP 2009-300268 A

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

前記したように、三次元形状の取得は、その応用できる分野が広いため、様々な手法が提案されているが、未だ確立されていない。汎用的な目的を考えると、1視点のカラー画像(以降、RGB画像)とデプスマップのみでなく、様々な視点のRGB画像とデプスマップがあると使い勝手がよい。つまり、複数視点のRGB画像及びデプスマップのセットがあると、汎用性が向上する。 As mentioned above, since obtaining three-dimensional shapes can be applied in a wide range of fields, various methods have been proposed, but none have yet been established. For general-purpose purposes, it is more convenient to have RGB images and depth maps from various viewpoints, rather than just a color image (hereafter referred to as an RGB image) and depth map from one viewpoint. In other words, having a set of RGB images and depth maps from multiple viewpoints improves versatility.

また、デプスマップの精度も重要である。RGB-Dカメラで得られるデプス画像は、画素値(輝度値)で表されているため、この画素値を実スケールのデプスマップに変換する必要がある。しかし、実スケールへの変換関数が、デプスマップの精度に大きな影響を与える。さらに、デプスマップの精度は、撮影環境や被写体の種類によっても影響される。なお、実スケールとは、実空間上の距離(奥行き)のことである。 The accuracy of the depth map is also important. Depth images obtained with RGB-D cameras are represented by pixel values (brightness values), so these pixel values must be converted into a real-scale depth map. However, the conversion function to real scale has a significant impact 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. Note that real scale refers to the distance (depth) in real space.

本発明は、前記した問題を解決し、複数視点の撮影画像及び高精度なデプスマップを容易に取得できるデプスマップ生成装置及びそのプログラム、並びに、デプスマップ生成システムを提供することを課題とする。 The present invention aims to solve the above problems and provide a depth map generation device and program thereof, as well as a depth map generation system, that can easily obtain images captured from multiple viewpoints and highly accurate depth maps.

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

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

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

すなわち、デプスマップ生成装置は、デプス画像から生成したデプスマップに基づいて、撮影画像から生成したコストボリュームを2つのウェイトで制約するリファインメント処理を行う。このリファインメント処理によって、デプスマップ生成装置は、各視点の撮影画像に対応した高精度なデプスマップを生成できる。 In other words, the depth map generating device performs a refinement process that constrains the cost volume generated from the captured image with two weights based on the depth map generated from the depth image. This refinement process enables the depth map generating device to generate a highly accurate depth map that corresponds to the captured image from each viewpoint.

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

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

本発明によれば、複数視点の撮影画像及び高精度なデプスマップを容易に取得できる。 The present invention makes it easy to obtain images captured from multiple viewpoints and highly accurate depth maps.

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

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

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

複数視点で撮影するために多数のRGBカメラ及びデプスカメラを配置した場合、システムが大規模となり、コストが高くなる。そこで、三次元形状取得システム1では、後記する1台のRGB-Dカメラ(撮影装置)2により、多数のRGBカメラ及びデプスカメラを配置したのと同等の構成を実現し、システム構成を簡略化できる。 When multiple RGB cameras and depth cameras are arranged to capture images from multiple viewpoints, the system becomes large-scale and expensive. Therefore, the 3D shape acquisition system 1 uses a single RGB-D camera (image capture device) 2 (described below) to achieve a configuration equivalent to that of multiple RGB cameras and depth cameras, simplifying the system configuration.

三次元映像制作などの分野では、仮想カメラCのカメラパラメータが必要となる。さらに、デプス画像は画素値(輝度値)で表されているため、この画素値を実スケールのデプスマップに変換するスケール変換関数も必要となる。そこで、三次元形状取得システム1では、三次元形状取得装置3によって、校正パターンを用いたカメラ校正処理を行って、仮想カメラCのカメラパラメータとスケール変換関数を算出する。 In fields such as three-dimensional video production, the camera parameters of the virtual camera C are required. Furthermore, because a depth image is represented by pixel values (brightness values), a scale conversion function is also required to convert these pixel values into a real-scale depth map. Therefore, in the three-dimensional shape acquisition system 1, the three-dimensional shape acquisition device 3 performs a camera calibration process using a calibration pattern to calculate the camera parameters and 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 large effect 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 three-dimensional shape acquisition device 3 described below uses RGB images and depth images from multiple viewpoints to improve the accuracy of the depth map (refinement processing). At this time, the three-dimensional shape acquisition device 3 divides one RGB image captured by one RGB-D camera 2 for each viewpoint and matches them, so errors caused by color differences can be suppressed compared to matching images captured by multiple RGB cameras.

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

[RGB-Dカメラの構成]
図1に示すように、RGB-Dカメラ2は、カメラ本体20と、レンズ系21とを備える撮像装置である。本実施形態では、カメラ本体20は、図示を省略したRGBカメラ及びデプスカメラを同一光軸上に配置したものである。また、カメラ本体20は、被写体9からの光線を分光素子(不図示)で分光し、分光した光線をRGBカメラ及びデプスカメラでそれぞれ受光する。例えば、RGBカメラとしては、一般的なカラーカメラがあげられる。また、分光素子としては、ハーフミラー又はダイクロイックミラーがあげられる。
[RGB-D Camera Configuration]
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 this embodiment, the camera body 20 is an RGB camera and a depth camera (not shown) arranged on the same optical axis. The camera body 20 also disperses light from a subject 9 using a spectroscopic element (not shown), and receives the dispersed light with the RGB camera and the depth camera, respectively. For example, the RGB camera may be a general color camera. The spectroscopic element may be 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 is equipped with an infrared LED array 25 for irradiating the subject 9 with infrared rays when measuring distance. A depth image can be obtained by calculating the inter-frame difference of the infrared images captured 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 array of N x N Y element lenses 24. The RGB-D camera 2 can acquire RGB images and depth images for N x N Y viewpoints via the lens array 23. That is, the RGB-D camera 2 realizes a configuration equivalent to an arrangement of N x N Y virtual cameras C. In this embodiment, it is assumed that there are four viewpoints (four virtual cameras C) corresponding to the 2 x 2 element lenses 24.

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

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

<カメラ校正手段>
カメラ校正手段4は、2種類のパラメータを推定する。一つ目は、仮想カメラCのカメラパラメータである。仮想カメラCのカメラパラメータは、レンズの焦点距離、レンズ歪み、仮想カメラCの位置や姿勢など表す。二つ目は、各仮想カメラCのスケール変換関数である。さらに、カメラ校正手段4は、必要に応じて、RGB画像及びデプス画像の画角補正を行う。なお、カメラ校正手段4は、撮影の都度、カメラ校正処理を行う必要がなく、RGB-Dカメラ2の焦点距離やRGB-Dカメラ2とフレネルレンズ22とレンズアレイ23との位置・姿勢の関係が変化したときにカメラ校正処理を行えばよい。
<Camera calibration method>
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 the orientation of the virtual camera C, and the like. The second is a scale conversion function of each virtual camera C. Furthermore, the camera calibration means 4 corrects the angle of view of the RGB image and the depth image as necessary. Note that the camera calibration means 4 does not need to perform camera calibration processing every time shooting is performed, and it is sufficient to perform camera calibration processing when the focal length of the RGB-D camera 2 or the relationship between the position and orientation of the RGB-D camera 2, the Fresnel lens 22, and the lens array 23 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. 3(a), the camera calibration means 4 receives an RGB image and a depth image captured by the RGB-D camera 2 of a calibration pattern 90. The calibration pattern 90 is a planar pattern with a known arrangement of feature points (for example, a chessboard pattern). At this time, the RGB-D camera 2 captures the calibration pattern 90 by changing its posture two or more times (shown by the dashed line). Note that, when the skew of the internal parameters is other than 0, the RGB-D camera 2 captures the calibration pattern 90 by changing its posture three or more times. As shown in FIG. 3(a), the RGB image and the depth image captured by disposing the lens system 21 are called calibration data A. When performing the above-mentioned angle of view correction, the calibration pattern 90 is captured by removing the lens system 21 as shown in FIG. 3(b). The RGB image and the depth image captured by removing the lens system 21 in this way are called 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 function calculation means) 44.

画角補正手段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 performs projective transformation on the depth image so that the angle of view of the depth image input from the RGB-D camera 2 coincides with the angle of view of the RGB image. Due to the installation accuracy of the RGB-D camera 2, the angle of view of the RGB image captured by the RGB camera and the depth image captured by the depth camera may be slightly shifted. For this reason, the angle of view correction means 40 corrects this slight shift in the angle of view using the calibration data B. Specifically, the angle of view correction means 40 calculates a homography matrix based on four or more corresponding points (feature points of the calibration pattern 90) between the RGB image and the depth image (Reference 1). Then, the angle of view correction means 40 performs projective transformation on the depth image using this homography matrix to make the angle of view of the depth image coincide with the angle of view of the RGB image.
It should be noted that, when the angles of view of the RGB camera and the depth camera are the same, the angle-of-view correction means 40 does not need to perform the angle-of-view correction process described above.

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

また、画角補正手段40は、校正データBを用いて、レンズ歪みを除去できる。例えば、画角補正手段40は、Zhangの手法により、RGB-Dカメラ2のレンズ歪み係数を算出し、RGB画像及びデプス画像からレンズ歪みを除去する(参考文献2)。 The angle-of-view correction means 40 can also remove lens distortion 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 using Zhang's method, 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 division 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 division means 41 divides the RGB image and the depth image for each virtual camera C to generate an RGB image and a depth image virtually captured by the virtual camera C. In this embodiment, the image division means 41 divides the RGB image P C and the depth image P D into four, as shown in Figures 4(a) and 4(b).

なお、RGB画像P及びデプス画像Pを分割する領域αは、手動で設定する。このとき、分割後のRGB画像P及びデプス画像Pでは、レンズアレイ23の外側や要素レンズ24同士の隙間が不要なので、これら不要領域を分割せずともよい。以後の説明を簡易にするため、分割後のRGB画像P及びデプス画像Pは、同一の画像サイズであることとする。 The region α into which the RGB image P C and the depth image P D are divided is set manually. In this case, since the outside of the lens array 23 and the gaps between the element lenses 24 are not necessary in the divided RGB image P C and the depth image P D , it is not necessary to divide these unnecessary regions. To simplify the following explanation, it is assumed that the divided RGB image P C and the depth image P D have the same image size.

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

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

ここで、校正パターン90の位置・姿勢を共通のパラメータとする。最適化するカメラパラメータは、各仮想カメラCのカメラパラメータと、共通化した校正パターン90の位置・姿勢が含まれる。具体的には、カメラパラメータ最適化手段43は、各仮想カメラCのカメラパラメータ及び校正パターン90の位置・姿勢の平均値を初期値として、初期カメラパラメータに含まれる仮想カメラCの位置・姿勢を使用する。そして、カメラパラメータ最適化手段43は、これら初期値をバンドル調整することでカメラパラメータを最適化する。 Here, the position and orientation of the calibration pattern 90 are the common parameters. The camera parameters to be optimized include the camera parameters of each virtual camera C and the position and orientation of the common calibration pattern 90. Specifically, the camera parameter optimization means 43 uses the average values of the camera parameters of each virtual camera C and the position and orientation of the calibration pattern 90 as initial values, and uses the position and orientation of the virtual camera C included in the initial camera parameters. The camera parameter optimization means 43 then 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 calculates a scale conversion function by associating 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 with the pixel value of each pixel of the depth image P D. That is, the scale conversion function calculation means 44 calculates a scale conversion function for converting the depth image P D into a real-scale depth map. As described above, since the position and orientation of the virtual camera C and the position and orientation 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 in real 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 associates the distance r from the virtual camera C to the calibration pattern 90 with the brightness value q (pixel value) of each pixel of the depth image P D. At this time, the calibration pattern 90 included in the depth image P D has a low reflectance in the black pattern portion, making it difficult to perform accurate association. For this reason, it is preferable that the scale conversion function calculation means 44 performs association only in the white portion of the calibration pattern 90 included in the depth image P D. Here, the scale conversion function calculation means 44 performs association in all depth images P D in which the calibration pattern 90 is captured, thereby obtaining a graph as shown in FIG. 5B. 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). Note that the scale conversion function calculation means 44 may use a look-up table instead of approximating this graph with a scale conversion function.

その後、カメラ校正手段4は、算出したスケール変換関数をスケール変換手段54に出力し、仮想カメラCのカメラパラメータをコストボリューム生成手段51及びウェイト適用手段59に出力する。 Then, 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 receives an RGB image P C and a depth image P D captured by the RGB-D camera 2 of a subject 9. The refinement means 5 improves the accuracy of the depth map by restricting the cost volume generated from the RGB image P C with two weights based on the depth map generated from the depth image P D. The refinement means 5 performs refinement processing each time an image is captured.

図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 division means 50, a cost volume generation means 51, an initial depth map generation means 52, a smoothing means 53, 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 division means 50 divides the RGB image P C and the depth image P D input from the RGB-D camera 2 for each viewpoint. As shown in Figures 6(a) and 6(b), the image division means 50 divides the RGB image P C and the depth image P D of the subject 9, similar to the image division means 41.

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

コストボリューム生成手段51は、後記する奥行きレイヤ及びRGB画像Pの画素位置毎にコストを算出し、コストを奥行きレイヤ及び画素位置で三次元配列したコストボリュームを生成するものである。本実施形態では、コストボリューム生成手段51は、コストボリュームを推定する手法の一つであるプレーンスイープ法を用いることとする(参考文献3)。 The cost volume generating means 51 calculates a cost for each pixel position of a depth layer and an RGB image PC described below, and generates a cost volume in which the costs are arranged three-dimensionally by the depth layer and the pixel position. In this embodiment, the cost volume generating means 51 uses a plane sweep method, which is one of the methods for estimating a 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 N D at a predetermined interval in the depth direction in the space in which the subject 9 is arranged. In the example of FIG. 7, five depth layers N D 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 generating means 51 sets a camera pair with one of all virtual cameras C as a reference camera and another virtual camera C. Then, the cost volume generating means 51 projects the RGB images P C of each virtual camera C constituting the camera pair onto the depth layer N D by projective transformation. Furthermore, the cost volume generating means 51 calculates the cost by calculating the difference (for example, SAD: Sum of Absolute Difference) between the pixel values of each pixel of the two RGB images P C projected onto the depth layer N D. This cost represents the similarity between the two RGB images P C projected onto the depth layer N D , and the smaller the value, the higher the possibility that the depth of the subject 9 exists in the depth layer N D .

コストボリューム生成手段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 process for all depth layers N D. As shown in FIG. 8, if the size of the RGB image P C is U×V pixels, the cost volume 91 is a three-dimensional array of U×V×N D costs. In addition, in the cost volume 91, costs arranged in the depth direction at the same pixel position are set as a cost column 92. In other words, the cost column 92 is a three-dimensional array of 1×1×N D costs. Then, the cost volume generating means 51 applies a guided filter to the cost volume 91 using the RGB image P C of the reference camera as a guide (Reference 4). This allows the cost volume 91 to be smoothed while maintaining edges, thereby reducing noise in the cost volume 91.

参考文献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)となる。 If a set of virtual cameras C around a reference camera is S, then the number of camera pairs that can be set is the number of elements in the set |S|. In this case, the number of cost volumes 91 can be the same as the number of camera pairs. For example, when there are four virtual cameras C, there are three camera pairs for one reference camera, and there are also three cost volumes 91. For example, when virtual camera C1 is the reference camera, the camera pairs are ( C1 , C2 ), ( C1 , C3 ), and ( C1 , C4 ).

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

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

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

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

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

スケール変換手段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 a real-scale depth. In this embodiment, the scale conversion means 54 converts the depth image P D input from the smoothing means 53 into a real-scale depth map by the scale conversion function input from the scale conversion function calculation means 44. Note that, when a scale conversion function is provided by the manufacturer of the RGB-D camera 2, the scale conversion means 54 may use this function.

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

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

具体的には、スケール補正手段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 = D C - D D for each pixel between the initial depth map D C and the intermediate depth map D D. Next, the scale correction means 56 calculates the average of the depth differences D Sub at each depth d (d = 1, 2, ..., N D ) of the initial depth map D C for only pixels that satisfy | D Sub | ≤ threshold, and sets the average as a correction value. Note that the threshold value 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 + D Cor , to obtain the intermediate depth map D D New after correction (hereinafter, intermediate depth map D D ).
It should be noted that the scale correction means 56 does not need to perform the process if the scale conversion function has high accuracy.

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

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

Figure 0007489253000001
Figure 0007489253000001

ここで、μは平均、σは分散、σは標準偏差を表す。この正規分布関数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), a cost weight function f C (d) is defined by the following formula (2). Note that a c is a parameter that determines the cost weight W C. Also, as shown in FIG. 10(a), in the normal distribution function g(d) of formula (2), the mean μ represents the mean of the depth values D D (u, v) of the pixels (u, v) of the intermediate depth map D D , and the variance σ 2 is set in advance according to the design policy of the cost weight function f C (d) (for example, σ 2 = N D /3).

Figure 0007489253000002
Figure 0007489253000002

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

Figure 0007489253000003
Figure 0007489253000003

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

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

その一方、中間デプスマップDは、1台のデプスカメラから生成されているため、オクルージョンの影響を受けない。そこで、ビジビリティウェイト算出手段58は、オクルージョンの影響を緩和する(オクルージョンが発生した部分のコストを低下させる)ため、中間デプスマップDからビジビリティウェイトWを算出する。 On the other hand, the intermediate depth map D 1 D is not affected by occlusion because it is generated from a single depth camera. Therefore, the visibility weight calculation means 58 calculates a visibility weight W 1 V from the intermediate depth map D 1 D in order to mitigate the effect of occlusion (to 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. 10B, the visibility weight function f V (d) is defined by the following formula (4). Note that a V is a parameter that determines the visibility weight W V. In the normal distribution function g(d) of formula (4), the mean μ represents a value D D (u, v)+shift obtained by adding a constant shift to the average of the depth values D D (u, v) (where shift ≧0). In addition, 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, the presence of an error in the intermediate depth map D D is tolerated, but the effect of the visibility weight W V is reduced.

Figure 0007489253000004
Figure 0007489253000004

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

Figure 0007489253000005
Figure 0007489253000005

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

Figure 0007489253000006
Figure 0007489253000006

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

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

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

[カメラ校正処理]
図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.
11, in step S1, the angle-of-view correction means 40 performs projective transformation on the depth image P D input from the RGB-D camera 2 so that the angle of view of the depth image P D matches the angle of view of the RGB image P C. Note that the process of step S1 is not essential and is therefore illustrated by a dashed line.

ステップS2において、画像分割手段41は、RGB画像P及びデプス画像Pを視点毎に分割する。
ステップS3において、初期カメラパラメータ算出手段42は、各視点のRGB画像Pにカメラ校正処理を施すことで、各視点に対応した仮想カメラCの初期カメラパラメータを算出する。
ステップS4において、カメラパラメータ最適化手段43は、初期カメラパラメータを初期値としたカメラ校正処理により、各仮想カメラCの間でカメラパラメータを最適化する。
ステップS5において、スケール変換関数算出手段44は、カメラパラメータが示す仮想カメラCの位置から校正パターンまでの距離をデプス画像Pの各画素の画素値に対応させることで、スケール変換関数を算出する。
In step S2, the image dividing means 41 divides the RGB image PC and the depth image P D for each viewpoint.
In step S3, the initial camera parameter calculation means 42 performs camera calibration processing on the RGB image PC of each viewpoint to calculate initial camera parameters of the virtual camera C corresponding to each viewpoint.
In step S4, the camera parameter optimization means 43 optimizes the camera parameters between the virtual cameras C by a camera calibration process using the initial camera parameters as initial values.
In step S5, the scale conversion function calculation means 44 calculates a scale conversion function by associating the distance from the position of the virtual camera C indicated by the camera parameters to the calibration pattern with 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 now be described with reference to FIG.
As shown in FIG. 12, in step S10, the image dividing means 50 divides the RGB image P 1 C and the depth image P 1 D for 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 a cost volume 91 which is a three-dimensional array of the costs.

ステップS12において、初期デプスマップ生成手段52は、コストボリューム91で同一画素位置のコスト列92において、コストが最小となる奥行きレイヤのデプスを示す初期デプスマップを生成する。
なお、ステップS11,S12の処理と、後記するステップS13~S18の処理は、並列で実行できる。
In step S<b>12 , the initial depth map generating means 52 generates an initial depth map indicating the depth of the depth layer with the smallest cost in the cost column 92 at the same pixel position in the cost volume 91 .
The processes in steps S11 and S12 and the processes in steps S13 to S18 described below 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 PD into an intermediate depth map using a scale conversion function that converts the pixel value of each pixel of the depth image PD into a real-scale depth.
In step S15, the layering processing means 55 performs layering processing to replace the depth of the intermediate depth map with the depth of the closest 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 calculates an average of the depth differences in each depth layer N D as a correction value for pixels where the depth difference between the initial depth map D C and the intermediate depth map D D is equal to or less than a threshold value, and corrects the depth of the intermediate depth map D D with the correction value. Note that the process of step S16 is not essential and is therefore illustrated by a dashed line.
In step S17, the cost weight calculation means 57 calculates a cost weight W C which represents the weight of the intermediate depth map D D by a normal distribution function.
In step S18, the visibility weight calculation means 58 calculates, from the intermediate depth map D1D , a visibility weight W1V that reduces the cost when occlusion occurs.

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

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

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

前記した実施形態では、デプスカメラがToFカメラであることとして説明したが、これに限定されない。例えば、デプスカメラがステレオカメラであってもよい。 In the above embodiment, the depth camera is described as a ToF camera, but this 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 causes hardware resources such as a CPU, memory, and hard disk of a computer to operate as the above-mentioned three-dimensional shape acquisition device. These programs may be distributed via a communication line, or written onto a recording medium such as a CD-ROM or flash memory and distributed.

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 (photography 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 generation device)
4 Camera calibration means 40 View angle 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 division 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 Object 90 Calibration pattern 91 Cost volume 92 Cost sequence C Virtual camera D C Initial depth map D D Intermediate depth map N D Depth layer

Claims (8)

同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置が各視点で被写体を撮影した撮影画像及びデプス画像を用いて、各視点の前記撮影画像に対応したデプスマップを生成するデプスマップ生成装置であって、
奥行き方向で所定間隔の奥行きレイヤ及び前記撮影画像の画素位置毎に、前記奥行きレイヤに投影された前記撮影画像間の類似度を表すコストを算出し、当該コストを前記奥行きレイヤ及び前記画素位置で三次元配列したコストボリュームを生成するコストボリューム生成手段と、
前記デプス画像の各画素の画素値を奥行きに変換する奥行き変換関数により、前記デプス画像を中間デプスマップに変換する奥行き変換手段と、
前記中間デプスマップの重みを正規分布関数で表したコストウェイトを算出するコストウェイト算出手段と、
前記中間デプスマップから、オクルージョン発生時に前記コストを低下させるビジビリティウェイトを算出するビジビリティウェイト算出手段と、
前記コストボリュームに前記コストウェイト及び前記ビジビリティウェイトを適用するウェイト適用手段と、
ウェイト適用後の前記コストボリュームで同一画素位置のコスト列において、前記コストが最小となる前記奥行きレイヤのデプスを示す最終デプスマップを生成する最終デプスマップ生成手段と、
を備えることを特徴とするデプスマップ生成装置。
A depth map generating device that generates a depth map corresponding to the captured images at each viewpoint using captured images and depth images captured by an imaging device including a imaging camera and a depth camera on the same optical axis and an optical element array, the device comprising:
a cost volume generating means for calculating a cost representing a similarity between the captured images projected onto the depth layer for each pixel position of the depth layer and the captured images at a predetermined interval in the depth direction, and generating a cost volume in which the costs are three-dimensionally arranged in the depth layer and the pixel positions;
a depth conversion means for converting the depth image into an intermediate depth map using a depth conversion function that converts a pixel value of each pixel of the depth image into a depth;
a cost weight calculation means for calculating a cost weight obtained by expressing the weight of the intermediate depth map as a normal distribution function;
a visibility weight calculation means for calculating a visibility weight that reduces the cost when an occlusion occurs from the intermediate depth map;
weight application means for applying the cost weight and the visibility weight to the cost volume;
a final depth map generating means for generating a final depth map indicating a depth of the depth layer in which the cost is minimum in a cost sequence at the same pixel position in the cost volume after applying a weight;
A depth map generating device comprising:
前記デプス画像を平滑化する平滑化手段、をさらに備え、
前記奥行き変換手段は、前記奥行き変換関数により、前記平滑化手段が平滑化したデプス画像を前記中間デプスマップに変換することを特徴とする請求項1に記載のデプスマップ生成装置。
A smoothing means for smoothing the depth image is further provided,
2. The depth map generating device according to claim 1, wherein the depth conversion means converts the depth image smoothed by the smoothing means into the intermediate depth map using the depth conversion function.
前記コストボリューム生成手段が生成したコストボリュームで同一画素位置のコスト列において、前記コストが最小となる前記奥行きレイヤのデプスを示す初期デプスマップを生成する初期デプスマップ生成手段と、
前記初期デプスマップと前記中間デプスマップとのデプス差が閾値以下の画素について、前記奥行きレイヤ間でデプス差の平均を補正値として求め、前記中間デプスマップのデプスを前記補正値で補正する中間デプスマップ補正手段と、
をさらに備えることを特徴とする請求項1又は請求項2に記載のデプスマップ生成装置。
an initial depth map generating means for generating an initial depth map indicating a depth of the depth layer in which the cost is minimum in a cost sequence at the same pixel position in the cost volume generated by the cost volume generating means;
an intermediate depth map correction means for calculating an average of depth differences between the depth layers as a correction value for pixels in which a depth difference between the initial depth map and the intermediate depth map is equal to or smaller than a threshold, and correcting the depth of the intermediate depth map with the correction value;
The depth map generating device according to claim 1 or 2, further comprising:
前記中間デプスマップのデプスを最も近い前記奥行きレイヤのデプスに置き換えるレイヤ化処理を施すレイヤ化処理手段、をさらに備え、
前記中間デプスマップ補正手段は、前記レイヤ化処理手段がレイヤ化処理を施した中間デプスマップのデプスを前記補正値で補正することを特徴とする請求項3に記載のデプスマップ生成装置。
A layering processing means for performing a layering process of replacing a depth of the intermediate depth map with a depth of the closest depth layer,
4. The depth map generating device according to claim 3, wherein the intermediate depth map correcting means corrects the depth of the intermediate depth map, which has been subjected to layering processing by the layering processing means, with the correction value.
前記撮影装置が各視点で校正パターンを撮影した撮影画像にカメラ校正処理を施すことで、各視点に対応した仮想カメラの初期カメラパラメータを算出する初期カメラパラメータ算出手段と、
前記初期カメラパラメータを初期値とした前記カメラ校正処理により、各仮想カメラの間でカメラパラメータを最適化するカメラパラメータ最適化手段と、
最適化した前記カメラパラメータが示す仮想カメラの位置から前記校正パターンまでの距離を前記デプス画像の各画素の画素値に対応させることで、前記奥行き変換関数を算出する奥行き変換関数算出手段と、
をさらに備えることを特徴とする請求項1から請求項4の何れか一項に記載のデプスマップ生成装置。
an initial camera parameter calculation means for calculating initial camera parameters of a virtual camera corresponding to each viewpoint by performing a camera calibration process on a captured image of a calibration pattern captured by the image capture device from each viewpoint;
a camera parameter optimization means for optimizing camera parameters between the virtual cameras through the camera calibration process using the initial camera parameters as initial values;
a depth conversion function calculation means for calculating the depth conversion function by making the distance from the position of the virtual camera indicated by the optimized camera parameters to the calibration pattern correspond to the pixel value of each pixel of the depth image;
The depth map generating device according to claim 1 , further comprising:
前記撮影装置が各視点で前記校正パターンを撮影したデプス画像の画角が前記撮影画像の画角に一致するように、当該デプス画像を射影変換する画角補正手段、をさらに備え、
前記奥行き変換関数算出手段は、前記仮想カメラの位置から前記校正パターンまでの奥行きを、前記画角補正手段が射影変換した前記デプス画像の各画素の画素値に対応させることで、前記奥行き変換関数を算出することを特徴とする請求項5に記載のデプスマップ生成装置。
and a field-of-view correction unit that performs projective transformation on the depth image so that the field of view of the depth image, which is obtained by photographing the calibration pattern from each viewpoint by the photographing device, coincides with the field of view of the photographed image,
The depth map generating device according to claim 5, characterized in that the depth conversion function calculation means calculates the depth conversion function by making the depth from the position of the virtual camera to the calibration pattern correspond to the pixel values of each pixel of the depth image projected by the angle of view correction means.
コンピュータを、請求項1から請求項6の何れか一項に記載のデプスマップ生成装置として機能させるためのプログラム。 A program for causing a computer to function as a depth map generating device according to any one of claims 1 to 6. 同一光軸の撮影カメラ及びデプスカメラと光学素子アレイとで構成された撮影装置と、
請求項1から請求項6の何れか一項に記載のデプスマップ生成装置と、
を備えることを特徴とするデプスマップ生成システム。
A photographing device including a photographing camera and a depth camera on the same optical axis and an optical element array;
A depth map generating device according to any one of claims 1 to 6,
A depth map generating system comprising:
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 JP2022024688A (en) 2022-02-09
JP7489253B2 true 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)

Families Citing this family (1)

* 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

Citations (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
JP2019184308A (en) 2018-04-04 2019-10-24 日本放送協会 Depth estimation device and program, as well as virtual viewpoint video generator and its program
JP2020028114A (en) 2018-08-10 2020-02-20 日本放送協会 Stereoscopic image generation device and program thereof

Patent Citations (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
JP2019184308A (en) 2018-04-04 2019-10-24 日本放送協会 Depth estimation device and program, as well as virtual viewpoint video generator and its program
JP2020028114A (en) 2018-08-10 2020-02-20 日本放送協会 Stereoscopic image generation device and program thereof

Also Published As

Publication number Publication date
JP2022024688A (en) 2022-02-09

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
WO2019100933A1 (en) Method, device and system for three-dimensional measurement
US8836766B1 (en) Method and system for alignment of a pattern on a spatial coded slide image
JP5997645B2 (en) Image processing apparatus and method, and imaging apparatus
JP6570327B2 (en) Control device, imaging device, control method, program, and storage medium
CN109003311B (en) Calibration method of fisheye lens
CN109919911B (en) Mobile three-dimensional reconstruction method based on multi-view photometric stereo
CN106875435B (en) Method and system for obtaining depth image
CN108629756B (en) Kinectv2 depth image invalid point repairing method
US9025862B2 (en) Range image pixel matching method
JPWO2018235163A1 (en) Calibration apparatus, calibration chart, chart pattern generation apparatus, and calibration method
KR20150120066A (en) System for distortion correction and calibration using pattern projection, and method using the same
CN107808398B (en) Camera parameter calculation device, calculation method, program, and recording medium
JP7378219B2 (en) Imaging device, image processing device, control method, and program
WO2018001252A1 (en) Projection unit and photographing apparatus comprising same projection unit, processor, and imaging device
JP2016024052A (en) Three-dimensional measurement system, three-dimensional measurement method and program
CN114359406A (en) Calibration of auto-focusing binocular camera, 3D vision and depth point cloud calculation method
US11348271B2 (en) Image processing device and three-dimensional measuring system
JP7489253B2 (en) Depth map generating device and program thereof, and depth map generating system
CN111757086A (en) Active binocular camera, RGB-D image determination method and device
CN110708532A (en) Universal light field unit image generation method and system
JP2014178124A (en) Three-dimensional measurement system, program and method
JP5925109B2 (en) Image processing apparatus, control method thereof, and control program

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