JP7156624B2 - Depth map filtering device, depth map filtering method and program - Google Patents

Depth map filtering device, depth map filtering method and program Download PDF

Info

Publication number
JP7156624B2
JP7156624B2 JP2017217794A JP2017217794A JP7156624B2 JP 7156624 B2 JP7156624 B2 JP 7156624B2 JP 2017217794 A JP2017217794 A JP 2017217794A JP 2017217794 A JP2017217794 A JP 2017217794A JP 7156624 B2 JP7156624 B2 JP 7156624B2
Authority
JP
Japan
Prior art keywords
depth
value
pixel
pixels
map
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
JP2017217794A
Other languages
Japanese (ja)
Other versions
JP2019091122A (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.)
Tohoku University NUC
Toppan Inc
Original Assignee
Tohoku University NUC
Toppan Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tohoku University NUC, Toppan Inc filed Critical Tohoku University NUC
Priority to JP2017217794A priority Critical patent/JP7156624B2/en
Publication of JP2019091122A publication Critical patent/JP2019091122A/en
Application granted granted Critical
Publication of JP7156624B2 publication Critical patent/JP7156624B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、対象物が異なる視点から撮像された複数の撮像画像のデプスマップに対し、このデプスマップにおける不正確なデプス値(実際と異なるデプス値)を修正するデプスマップフィルタ処理装置、デプスマップフィルタ処理方法及びプログラムに関する。 The present invention provides a depth map filter processing device for correcting inaccurate depth values (depth values different from actual depth values) in depth maps of a plurality of captured images in which an object is captured from different viewpoints. The present invention relates to a filtering method and program.

対象物を撮像した複数の撮像画像を用いて、対象物の三次元形状モデルを生成する三次元復元手法がある。この三次元復元手法においては、対象物を任意の視点(撮像画像の撮像位置)から観測した際の対象物までの距離情報(デプス値)を2次元画像として記録したデプスマップが用いられる。 There is a three-dimensional reconstruction method for generating a three-dimensional shape model of an object using a plurality of captured images of the object. In this three-dimensional reconstruction method, a depth map is used in which distance information (depth value) to an object when the object is observed from an arbitrary viewpoint (capturing position of the captured image) is recorded as a two-dimensional image.

例えば、上記三次元復元手法の一つとして、対象物を異なる視点から撮像した複数の二次元撮像画像(以下、「多視点画像」と示す)に基づいて、その対象物の三次元形状モデルを生成する多視点三次元復元手法がある(例えば、特許文献1参照)。
この多視点三次元復元手法においては、多視点画像間のステレオマッチングを行うことにより、各視点におけるデプスマップを生成し、全ての視点におけるデプスマップを統合することにより、対象物の三次元形状モデルを復元する。
For example, as one of the three-dimensional reconstruction methods, a three-dimensional shape model of an object is created based on a plurality of two-dimensional captured images (hereinafter referred to as "multi-viewpoint images") obtained by capturing the object from different viewpoints. There is a multi-view three-dimensional reconstruction method for generating (see, for example, Patent Document 1).
In this multi-viewpoint 3D reconstruction method, stereo matching between multi-viewpoint images is performed to generate a depth map at each viewpoint, and by integrating the depth maps at all viewpoints, a 3D shape model of the object is created. to restore.

また、ステレオマッチング以外のデプスマップの取得方法としては、デプスカメラ及びRGB(red green blue)-D(depth)カメラなどにより、直接的にデプスマップを2次元画像として得る。
このRGB-Dカメラは、カラー画像とデプスマップとの組合わせを撮像する特殊なカメラである。また、代表的なデプスカメラとしては、Time of Flight距離画像センサや、アクティブステレオセンサが挙げられる。Time of Flight距離画像センサ及びアクティブステレオセンサの各々は、対象物に対してレーザ光、パターン光(あるいはスリット光)それぞれを照射し、その反射光の様子を観察することにより、対象物に対応したデプスマップを生成する。
As a depth map acquisition method other than stereo matching, a depth map is directly obtained as a two-dimensional image using a depth camera, an RGB (red green blue)-D (depth) camera, or the like.
This RGB-D camera is a special camera that captures a combination of color images and depth maps. Typical depth cameras include Time of Flight distance image sensors and active stereo sensors. Each of the Time of Flight distance image sensor and active stereo sensor irradiates the target with laser light, pattern light (or slit light), and observes the state of the reflected light to correspond to the target. Generate a depth map.

このようなデプスカメラやRGB-Dカメラを用いて、複数の視点からの対象物までの距離を測定し、対象物に対応するデプスマップを取得する。
そして、複数の視点において取得した、対象物に対応するデプスマップを統合することにより、対象物の三次元形状を生成することもできる。
Using such a depth camera or RGB-D camera, the distance to an object is measured from multiple viewpoints, and a depth map corresponding to the object is obtained.
A three-dimensional shape of the object can also be generated by integrating the depth maps corresponding to the object obtained from a plurality of viewpoints.

上述したように、三次元復元手法においては、三次元形状モデルを生成する際、三次元形状モデルの復元における中間データあるいは取得データとしてデプスマップを用いることがある。このため、デプスマップにおけるデプス値の精度及びデプスマップ全体の品質の各々が、復元する三次元形状モデルの精度、品質に対して影響を与える重要な要素である。
高精度及び高品質な三次元形状モデルを復元するため、デプスマップを高精度かつ高品質に生成あるいは取得する必要がある。
As described above, in the three-dimensional reconstruction method, when generating a three-dimensional shape model, a depth map may be used as intermediate data or acquired data in the reconstruction of the three-dimensional shape model. Therefore, the accuracy of the depth values in the depth map and the quality of the depth map as a whole are important factors that affect the accuracy and quality of the restored three-dimensional shape model.
In order to restore a 3D shape model with high accuracy and high quality, it is necessary to generate or obtain a depth map with high accuracy and high quality.

一方、高精度及び高品質にデプスマップを取得したとしても、取得したデプスマップには、不正確なデプス値が含まれる場合がある。例えば、上述した多視点三次元復元手法にでは、繰り返しパターン領域やテクスチャレス領域における多視点画像間のステレオマッチングに失敗すると、その領域における画素のデプス値に大きな誤差を生じ、実際と異なるデプス値を得ることになる。 On the other hand, even if the depth map is obtained with high accuracy and high quality, the obtained depth map may contain inaccurate depth values. For example, in the multi-view three-dimensional reconstruction method described above, if stereo matching between multi-view images in a repeated pattern area or textureless area fails, a large error occurs in the depth value of pixels in that area, resulting in a depth value that differs from the actual depth value. will get

また、デプスマップにおいて、撮像画像における対象物体の物体境界を示す輪郭部分は、正確なデプス値を求めることが困難である。このため、得られるデプスマップにおいて、対象物体の物体境界領域におけるデプス値が不正確な数値となり、デプス値の誤差が大きくなり易い。 Further, in the depth map, it is difficult to obtain an accurate depth value for the contour portion indicating the object boundary of the target object in the captured image. Therefore, in the obtained depth map, the depth value in the object boundary region of the target object becomes an inaccurate numerical value, and the depth value error tends to increase.

一方、デプスカメラやRGB-Dカメラを用いた場合、対象物が照射した光の全反射・乱反射などにより、また日光などの照度が高いことなどの周囲の環境からの外乱により、視点から対象物までの距離を正確に測定できない。このため、対象物に対するデプス値に誤差が発生してしまう。 On the other hand, when a depth camera or RGB-D camera is used, due to total reflection or diffuse reflection of the light irradiated by the object, or due to external disturbances from the surrounding environment such as high illuminance such as sunlight, the object can be seen from the viewpoint. cannot measure the distance accurately. Therefore, an error occurs in the depth value with respect to the object.

上述したように、様々な要因により、デプスマップにおけるデプス値に誤差が生じる場合があり、デプスマップの品質が低下する。
このように、複数の撮像画像によるステレオマッチングや、デプスカメラやRGB-Dカメラを用いた場合、不正確なデプス値を含まない高品質なデプスマップを得ることは困難である。
したがって、三次元復元手法においては、三次元形状モデルの生成にデプスマップを用いる際、各種方法により得られたデプスマップに対し、不正確なデプス値を修正するフィルタ処理を施すことが必要である。
As described above, various factors can cause errors in the depth values in the depth map, degrading the quality of the depth map.
Thus, when using stereo matching using a plurality of captured images or using a depth camera or an RGB-D camera, it is difficult to obtain a high-quality depth map that does not contain inaccurate depth values.
Therefore, in the three-dimensional reconstruction method, when depth maps are used to generate a three-dimensional shape model, it is necessary to apply filtering to correct inaccurate depth values for depth maps obtained by various methods. .

デプスマップの不正確なデプス値を修正するためのフィルタ処理の一つとして、二次元カラー画像におけるノイズ除去を行うためのノイズ除去フィルタ、例えばバイラテラルフィルタやメディアンフィルタが用いられる。
また、デプスマップに対する他のフィルタ処理としては、デプスマップにおける画素の各々を三次元空間に投影した際の孤立点除去が挙げられる。この孤立点除去は、多視点のデプスマップを用いて対象物に対応する三次元点群を生成する。そして、この生成した三次元点群における三次元点の各々を中心とした一定範囲内に存在する他の三次元点の数が所定の閾値未満である場合、デプスマップにおけるその三次元点に対応する画素のデプス値を修正し、デプスマップの品質を向上する。
As one of filtering processes for correcting inaccurate depth values of a depth map, a noise removal filter, such as a bilateral filter or a median filter, is used to remove noise in a two-dimensional color image.
Another filtering process for the depth map includes removal of isolated points when each pixel in the depth map is projected onto a three-dimensional space. This isolated point removal generates a 3D point cloud corresponding to the object using multi-viewpoint depth maps. Then, when the number of other 3D points existing within a certain range centered on each 3D point in the generated 3D point group is less than a predetermined threshold, the corresponding 3D point in the depth map is modifies the depth values of the pixels to improve the quality of the depth map.

特開2017-027101号公報Japanese Patent Application Laid-Open No. 2017-027101

上述したように、二次元カラー画像のノイズ除去フィルタを適用する際、デプスマップに突発的に発生する、例えばいずれかの画素のデプス値にノイズが重畳した場合、この画素単位でのデプス値を修正することはできる。
しかしながら、デプスマップにおいて、クラスタ(複数の隣接する画素を含む領域)単位の複数の画素のデプス値にノイズが重畳した場合、これらの不正確なデプス値を修正することはできない。
As described above, when applying a noise reduction filter for a two-dimensional color image, if noise suddenly occurs in the depth map, for example, if noise is superimposed on the depth value of any pixel, the depth value for each pixel is You can fix it.
However, in the depth map, if noise is superimposed on the depth values of a plurality of pixels in units of clusters (regions including a plurality of adjacent pixels), these inaccurate depth values cannot be corrected.

一方、上記ノイズ除去フィルタを用いた際、周囲の画素のデプス値と比較されて修正が行われるため、正しいデプス値の画素であっても、デプスマップにおいて周囲の画素のデプス値と大きく異なる場合、この正しいデプス値が不正確なデプス値に変更されてしまう。また、上記ノイズ除去フィルタがデプスマップにおける全ての画素のデプス値を修正するため、各画素のデプス値を平滑化する傾向があり、デプスマップの品質を逆に低下させてしまう場合がある。 On the other hand, when the noise reduction filter is used, correction is performed by comparing the depth values of the surrounding pixels, so even if the correct depth value of the pixel is significantly different from the depth value of the surrounding pixels in the depth map, , this correct depth value is changed to an incorrect depth value. Also, since the denoising filter modifies the depth values of all pixels in the depth map, it tends to smooth the depth values of each pixel, which may adversely reduce the quality of the depth map.

また、三次元点群を生成して孤立する三次元点を除去する際、孤立した三次元点を修正することはできるが、三次元空間においてクラスタ状の三次元点にノイズが重畳した場合、孤立点群とは見なされないため、ノイズが重畳したクラスタ状の画素のデプス値を修正することは困難である。
このため、閾値としての画素数を多く設定することで、ある程度の画素数のクラスタ状の画素に発生したデプス値に対応させることは可能である。一方、閾値の画素数を多くすることにより、正確な画素のデプス値を不正確なデプス値に変更する可能性も高くなる。
In addition, when generating a 3D point group and removing isolated 3D points, it is possible to correct the isolated 3D points, but if noise is superimposed on the clustered 3D points in the 3D space, It is difficult to correct the depth value of clustered pixels on which noise is superimposed, because they are not regarded as an isolated point group.
Therefore, by setting a large number of pixels as a threshold value, it is possible to deal with depth values generated in a certain number of clustered pixels. On the other hand, increasing the number of threshold pixels also increases the possibility of changing an accurate pixel depth value to an inaccurate depth value.

また、三次元空間における孤立点の除去においては、対象物体の表面からの距離が大きい画素のデプス値を修正することには対処可能である。しかしながら、対象物体の表面からの距離の小さい画素(表面近傍の画素)のデプス値の修正には対処できない。 Also, in the removal of isolated points in the three-dimensional space, it is possible to correct the depth value of pixels that are far from the surface of the target object. However, it cannot deal with the correction of the depth value of pixels (pixels near the surface) that are at a small distance from the surface of the target object.

本発明は、このような状況に鑑みてなされたもので、デプスマップにおける正しいデプス値を不正確なデプス値に変更することなく、かつクラスタ状の画素のデプス値の修正、物体表面近傍の画素の不正確なデプス値を修正することが可能なデプスマップフィルタ処理装置、デプスマップフィルタ処理方法及びプログラムを提供する。 The present invention has been made in view of such a situation, and corrects the depth values of clustered pixels without changing the correct depth value in the depth map to an incorrect depth value. Provided are a depth map filtering device, a depth map filtering method, and a program capable of correcting inaccurate depth values.

上述した課題を解決するために、本発明のデプスマップフィルタ処理装置は、異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性判定部と、整合性がないと判定された画素に対してペナルティスコアを与えるペナルティスコア積算部と、前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定部と、前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正部とを備えることを特徴とする。 In order to solve the above-described problems, the depth map filtering device of the present invention includes a consistency determination unit that compares pixel information of corresponding pixels in different depth maps and determines whether or not there is consistency between the pixels. a penalty score accumulation unit that gives a penalty score to pixels determined to be inconsistent; an integrated value determination unit configured to determine whether or not an integrated value of penalty scores exceeds a predetermined first threshold, and generate a penalty score map indicating the penalty score of each of the pixels; and a depth value correction unit that corrects the depth value of the pixel whose integrated value exceeds the first threshold.

本発明のデプスマップフィルタ処理装置は、前記積算値判定部が、前記積算値が前記第1閾値を超えている場合、前記デプス値の修正後のデプスマップによる画素間の整合性の判定を前記整合性判定部に対して行わせて、デプスマップの修正処理を継続させることを特徴とする。 In the depth map filter processing device of the present invention, if the integrated value determination unit exceeds the first threshold value, the depth map after the correction of the depth value determines consistency between pixels as described above. The feature is that the consistency determination unit is caused to continue the correction processing of the depth map.

本発明のデプスマップフィルタ処理装置は、比較する組における一のデプスマップの対象画素のデプス値及び当該一のデプスマップのカメラパラメータから三次元点を生成し、他のデプスマップに前記三次元点を投影し、当該他のデプスマップの対応する参照画素の前記画素情報である参照画素情報を抽出する参照画素抽出部とをさらに備え、前記整合性判定部が、前記参照画素情報と前記対象画素の前記画素情報である対象画素情報とを比較し、前記参照画素情報と前記対象画素情報とが所定の第2閾値未満であるか否かにより、前記整合性の判定を行うことを特徴とする。 The depth map filter processing device of the present invention generates a three-dimensional point from the depth value of the target pixel of one depth map in the set to be compared and the camera parameters of the one depth map, and stores the three-dimensional point on another depth map. and extracting reference pixel information, which is the pixel information of the corresponding reference pixel of the other depth map, wherein the consistency determination unit extracts the reference pixel information and the target pixel and comparing the target pixel information, which is the pixel information of the reference pixel information and the target pixel information, based on whether or not the reference pixel information and the target pixel information are less than a predetermined second threshold. .

本発明のデプスマップフィルタ処理装置は、前記画素情報が前記画素のデプス値であることを特徴とする。 The depth map filter processing device of the present invention is characterized in that the pixel information is the depth value of the pixel.

本発明のデプスマップフィルタ処理装置は、前記画素情報が前記画素の画素値であることを特徴とする。 The depth map filter processing device of the present invention is characterized in that the pixel information is the pixel value of the pixel.

本発明のデプスマップフィルタ処理装置は、前記画素情報が前記画素のデプス値及び画素値の各々であることを特徴とする。 The depth map filtering device of the present invention is characterized in that the pixel information is each of a depth value and a pixel value of the pixel.

本発明のデプスマップフィルタ処理装置は、前記デプス値修正部が、前記ペナルティスコアマップを参照し、前記第1閾値を超えている積算値の前記画素における、当該積算値の最大値を有する画素を最大値画素として抽出し、当該最大値画素のデプス値を修正することを特徴とする。 In the depth map filter processing device of the present invention, the depth value correction unit refers to the penalty score map, and selects a pixel having the maximum integrated value among the pixels whose integrated value exceeds the first threshold. It is characterized by extracting as a maximum value pixel and correcting the depth value of the maximum value pixel.

本発明のデプスマップフィルタ処理装置は、前記デプス値修正部が、前記画素のデプス値を修正する際、前記デプスマップから三次元形状モデルの三次元点を生成する際に、当該三次元点の生成の計算において無視される不正値に、前記画素のデプス値を変更することを特徴とする。 In the depth map filter processing device of the present invention, when the depth value correction unit corrects the depth value of the pixel, when generating the 3D point of the 3D shape model from the depth map, the 3D point It is characterized by changing the depth value of the pixel to an illegal value that is ignored in the computation of generation.

本発明のデプスマップフィルタ処理方法は、整合性判定部が、異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性比較過程と、ペナルティスコア積算部が、整合性がないと判定された画素に対して所定のペナルティスコアを積算するペナルティスコア積算過程と、積算値判定部が、前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定過程と、デプス値修正部が、前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正過程とを含むことを特徴とする。 The depth map filtering method of the present invention includes a consistency comparison step in which a consistency determination unit compares pixel information of corresponding pixels in different depth maps to determine whether there is consistency between the pixels; A penalty score accumulation process in which a score accumulation unit accumulates a predetermined penalty score for pixels determined to be inconsistent; After determining the consistency of the pixel information, it is determined whether or not the integrated value of the penalty scores exceeds a predetermined first threshold, and a penalty score map indicating the penalty score of each of the pixels is generated. and a depth value correction process in which the depth value correction unit corrects the depth value of the pixel whose integrated value exceeds the first threshold in the penalty score map.

本発明のプログラムは、コンピュータを、異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性比較手段、整合性がないと判定された画素に対してペナルティスコアを与えるペナルティスコア積算手段、前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定手段、前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正手段として動作させるためのプログラムである。 The program of the present invention provides a computer with a consistency comparing means for comparing pixel information of corresponding pixels of different depth maps and determining whether or not there is consistency between the pixels; penalty score accumulating means for providing a penalty score for each of said depth maps, after completion of determination of consistency of said pixel information between pixels in each and every combination of said depth maps, said integrated value of said penalty scores exceeding a predetermined first threshold integrated value determination means for determining whether or not the pixel exceeds the first threshold, and generating a penalty score map showing the penalty score of each of the pixels; A program for operating as depth value correction means for correcting depth values.

以上説明したように、本発明によれば、デプスマップにおける正しいデプス値を不正確なデプス値に変更することなく、かつクラスタ状の画素のデプス値の修正、物体表面近傍の画素の不正確なデプス値を修正することが可能なデプスマップフィルタ処理装置、デプスマップフィルタ処理方法及びプログラムを提供することができる。 As described above, according to the present invention, it is possible to correct the depth values of clustered pixels and to correct the inaccurate depth values of pixels near the object surface without changing the correct depth values in the depth map to inaccurate depth values. It is possible to provide a depth map filtering device, a depth map filtering method, and a program capable of correcting depth values.

本発明の一実施形態によるデプスマップフィルタ処理装置の構成例を示すブロック図である。1 is a block diagram showing a configuration example of a depth map filtering device according to an embodiment of the present invention; FIG. デプスマップ記憶部107におけるデプスマップテーブルの構成例を示す図である。3 is a diagram showing a configuration example of a depth map table in a depth map storage unit 107; FIG. 三次元点Mとデプス値Dk(xp)から生成した三次元点との各々の可視性の阻害を説明する概念図である。FIG. 4 is a conceptual diagram illustrating obstruction of visibility of each of a 3D point M and a 3D point generated from a depth value Dk(xp); 対象画素xjのデプス値ZMと参照画素xpのデプス値Dk(xp)との整合性判定によるペナルティを付加する処理の説明図である。FIG. 9 is an explanatory diagram of a process of adding a penalty based on consistency determination between the depth value ZM of the target pixel xj and the depth value Dk(xp) of the reference pixel xp; ペナルティスコアマップ記憶部108に記憶されているペナルティスコアマップテーブルの構成例を示す図である。4 is a diagram showing a configuration example of a penalty score map table stored in a penalty score map storage unit 108; FIG. 本実施形態によるデプスマップフィルタ処理装置1が行なうデプスマップにおける外れ値のデプス値を修正する処理の動作例を示すフローチャートである。5 is a flowchart showing an operation example of processing for correcting outlier depth values in a depth map performed by the depth map filtering device 1 according to the present embodiment. 最大値を有するペナルティスコアを有する修正対象画素の修正処理について説明する図である。It is a figure explaining the correction process of the correction object pixel which has a penalty score which has the maximum value. 対象物の多視点画像から生成したデプスマップを元に、対象物の三次元点群を復元した画像を示す図である。FIG. 4 is a diagram showing an image in which a three-dimensional point group of an object is restored based on a depth map generated from multi-viewpoint images of the object;

以下、本発明の一実施形態について、図面を参照して説明する。
図1は、本発明の一実施形態によるデプスマップフィルタ処理装置の構成例を示すブロック図である。図1において、デプスマップフィルタ処理装置1は、デプスマップ入力部101、参照画素抽出部102、整合性判定部103、ペナルティスコア積算部104、積算値判定部105、デプス値修正部106、デプスマップ記憶部107及びペナルティスコアマップ記憶部108の各々を備えている。ここで、デプスマップは、カメラパラメータである視点位置(三次元座標空間における視点座標)及び視点方向の位置からの対象物体までの深度(奥行き)を画素毎に、白(視点位置に近い)から黒(視点位置から遠い)までのグレースケールで表している。
An embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of a depth map filtering device according to one embodiment of the present invention. In FIG. 1, the depth map filter processing device 1 includes a depth map input unit 101, a reference pixel extraction unit 102, a consistency determination unit 103, a penalty score integration unit 104, an integrated value determination unit 105, a depth value correction unit 106, a depth map A storage unit 107 and a penalty score map storage unit 108 are provided. Here, the depth map is a camera parameter of the viewpoint position (viewpoint coordinates in a three-dimensional coordinate space) and the depth (depth) from the position of the viewpoint direction to the target object for each pixel, from white (close to the viewpoint position) to It is represented by a gray scale up to black (far from the viewpoint position).

デプスマップ入力部101は、外部装置から供給される、対象物体の三次元形状モデルを生成するために用いるデプスマップ群を入力する。このデプスマップ群は、上記対象物体に対する複数のカメラパラメータ(後述)の各々に対応したデプスマップから構成されている。
また、デプスマップ入力部101は、デプスマップ群におけるデプスマップの各々に対し、デプスマップを識別する識別情報であるデプスマップ識別情報を付与し、デプスマップ記憶部107に書き込んで記憶させる。
A depth map input unit 101 inputs a depth map group used to generate a three-dimensional shape model of a target object supplied from an external device. This depth map group is composed of depth maps corresponding to each of a plurality of camera parameters (described later) for the target object.
The depth map input unit 101 also assigns depth map identification information, which is identification information for identifying a depth map, to each depth map in the depth map group, and writes and stores the information in the depth map storage unit 107 .

図2は、デプスマップ記憶部107におけるデプスマップテーブルの構成例を示す図である。図2におけるデプステーブルは、レコード毎に、デプスマップ識別情報と、カメラパラメータと、デプスマップインデックスとの欄が設けられている。デプスマップ識別情報は、デプスマップ群におけるデプスマップの各々を識別する識別情報である。カメラパラメータは、視点座標及び視点方向を含む、デプスマップに対応する撮像画像(直接にデプスマップとして取得した画像も含まれる)を撮像した撮像装置の各種パラメータである。この視点座標は、対象物体の位置する三次元座標空間における座標位置を示している。視点方向は、対象物体の位置する三次元座標空間における視点座標からの観察方向を示している。このカメラパラメータは、外部パラメータと内部パラメータとを含み、外部パラメータが世界座標系におけるレンズの中心座標、レンズの光軸の方向などであり、内部パラメータが焦点距離、画像中心、画像の分解能(画素数)及び歪収差係数などである。 FIG. 2 is a diagram showing a configuration example of a depth map table in the depth map storage unit 107. As shown in FIG. The depth table in FIG. 2 has columns of depth map identification information, camera parameters, and depth map index for each record. The depth map identification information is identification information that identifies each depth map in the depth map group. Camera parameters are various parameters of an imaging device that captures a captured image corresponding to a depth map (including an image directly acquired as a depth map), including viewpoint coordinates and a viewpoint direction. The viewpoint coordinates indicate the coordinate position in the three-dimensional coordinate space where the target object is located. The viewpoint direction indicates the observation direction from the viewpoint coordinates in the three-dimensional coordinate space where the target object is located. The camera parameters include extrinsic parameters and intrinsic parameters. The extrinsic parameters are the center coordinates of the lens in the world coordinate system, the direction of the optical axis of the lens, etc. The intrinsic parameters are the focal length, image center, image resolution (pixel number) and distortion aberration coefficient.

また、デプスマップインデックスは、デプスマップのデータが記憶されたデプスマップ記憶部107におけるアドレスを示している。このアドレスの領域には、デプスマップのデータとして、画素単位にデプス値(深度値)が記載されたマップが書き込まれて記憶されている。すなわち、デプスマップとは、各視点において仮想的に設定された画像座標について、それぞれの画素毎のその視点から対象部までの距離情報(デプス値)が格納された二次元マップである。例えば、入力されたデプスマップは、多視点三次元復元におけるステレオマッチングにより生成されたデプスマップや、デプスカメラやRGB-Dカメラで撮影されたデプスマップなどである。 The depth map index indicates an address in the depth map storage unit 107 where the depth map data is stored. In this address area, a map in which a depth value (depth value) is described for each pixel is written and stored as depth map data. That is, the depth map is a two-dimensional map that stores distance information (depth value) from the viewpoint to the target part for each pixel with respect to image coordinates virtually set at each viewpoint. For example, the input depth map is a depth map generated by stereo matching in multi-view three-dimensional reconstruction, a depth map captured by a depth camera or an RGB-D camera, and the like.

図1に戻り、参照画素抽出部102は、デプスマップ記憶部107のデプスマップテーブルを参照し、デプス値を修正する対象のデプスマップである対象デプスマップDi(視点iに対応)と、対象デプスマップDiと比較するために参照するデプスマップである参照デプスマップDk(視点kに対応)との組合わせを抽出する。そして、参照画素抽出部102は、対象デプスマップDiにおける画素である対象画素xj(対象デプスマップDiに含まれるn個の画素のいずれか、1≦j≦n)の各々のデプス値Di(xj)と、カメラパラメータとを用いて、三次元座標空間における各画素に対応する三次元点Mをそれぞれ生成する。 Returning to FIG. 1, the reference pixel extraction unit 102 refers to the depth map table of the depth map storage unit 107, and extracts a target depth map Di (corresponding to the viewpoint i), which is a depth map whose depth value is to be corrected, and a target depth map Di (corresponding to the viewpoint i). A combination with a reference depth map Dk (corresponding to the viewpoint k), which is a depth map referred to for comparison with the map Di, is extracted. Then, the reference pixel extraction unit 102 extracts the depth value Di(xj ) and the camera parameters, a three-dimensional point M corresponding to each pixel in the three-dimensional coordinate space is generated.

また、参照画素抽出部102は、生成した三次元点を参照デプスマップDkに投影し、投影された位置にある参照デプスマップDkにおける画素である参照画素xp(参照デプスマップDkに含まれるn個の画素のいずれか、1≦p≦n)を抽出する。
ここで、参照画素抽出部102は、対象デプスマップDiにおける全ての対象画素のデプス値から三次元点を生成し、三次元点の各々を参照デプスマップに投影して、投影された位置にある参照画素を抽出する。ここで、参照画素抽出部102は、デプスマップ記憶部107に記憶されている全てのデプスマップの各々の組合わせを抽出し、参照画素xpそれぞれの抽出を行う。このとき、参照画素抽出部102は、対象デプスマップDiにおけるデプス値から生成した三次元点が参照デプスマップ内に投影されない場合、投影されない三次元点に対応する参照画素の抽出を行わない。
Further, the reference pixel extraction unit 102 projects the generated three-dimensional point onto the reference depth map Dk, and the reference pixel xp (n pixels included in the reference depth map Dk), which is a pixel in the reference depth map Dk at the projected position. , 1≤p≤n).
Here, the reference pixel extraction unit 102 generates three-dimensional points from the depth values of all target pixels in the target depth map Di, projects each of the three-dimensional points onto the reference depth map, and Extract a reference pixel. Here, the reference pixel extraction unit 102 extracts each combination of all depth maps stored in the depth map storage unit 107, and extracts each reference pixel xp. At this time, if the 3D points generated from the depth values in the target depth map Di are not projected in the reference depth map, the reference pixel extraction unit 102 does not extract reference pixels corresponding to the 3D points that are not projected.

整合性判定部103は、対象画素xjの三次元点Mと視点kとの距離を求め、この距離をデプス値ZMとする。すなわち、デプス値ZMは、対象画素xjの三次元点Mと視点kとの距離を示している。
また、整合性判定部103は、この対象画素xjに対応して参照画素抽出部102が抽出した参照画素xpのデプス値Dk(xp)を、デプスマップ記憶部107における参照デプスマップDkであるデプスマップから読み出す。
The consistency determination unit 103 obtains the distance between the three-dimensional point M of the target pixel xj and the viewpoint k, and sets this distance as the depth value ZM. That is, the depth value ZM indicates the distance between the three-dimensional point M of the target pixel xj and the viewpoint k.
Also, the consistency determination unit 103 converts the depth value Dk(xp) of the reference pixel xp extracted by the reference pixel extraction unit 102 corresponding to the target pixel xj to the depth value Dk that is the reference depth map Dk in the depth map storage unit 107. Read from map.

そして、整合性判定部103は、対象画素xjのデプス値ZMと参照画素xpのデプス値Dk(xp)とを比較する。例えば、整合性判定部103は、対象画素xjのデプス値ZMと参照画素xpのデプス値Dk(xp)との差分であるデプス値差分(ZM-Dk(xp))を求め、このデプス値差分が0以下であるか否かにより(以下の(1)式の関係に基づく)、対象画素xjのデプス値ZMと参照画素xpのデプス値Dk(xp)との整合性を判定する。
0≧ZM-Dk(xp) …(1)
Then, the consistency determination unit 103 compares the depth value ZM of the target pixel xj and the depth value Dk(xp) of the reference pixel xp. For example, the consistency determination unit 103 obtains a depth value difference (ZM−Dk(xp)), which is the difference between the depth value ZM of the target pixel xj and the depth value Dk(xp) of the reference pixel xp, and calculates the depth value difference is less than or equal to 0 (based on the following equation (1)), the consistency between the depth value ZM of the target pixel xj and the depth value Dk(xp) of the reference pixel xp is determined.
0≧ZM−Dk(xp) (1)

すなわち、デプス値ZMがデプス値Dk(xp)より大きい場合には、三次元点Mがデプス値Dk(xp)から生成した三次元点の可視性を邪魔することなく、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性が取れていると判定される。一方、デプス値ZMがデプス値Dk(xp)より小さい場合には、三次元点Mがデプス値Dk(xp)から生成した三次元点の可視性を邪魔することになり、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性が取れていないと判定される。 That is, when the depth value ZM is greater than the depth value Dk(xp), the depth value It is determined that Di(xj) is consistent with the depth value Dk(xp) of the reference pixel xp. On the other hand, when the depth value ZM is smaller than the depth value Dk(xp), the 3D point M obstructs the visibility of the 3D point generated from the depth value Dk(xp), and the depth of the target pixel xj is It is determined that the value Di(xj) does not match the depth value Dk(xp) of the reference pixel xp.

図3は、三次元点Mとデプス値Dk(xp)から生成した三次元点との各々の可視性の阻害を説明する概念図である。図3(a)及び図3(b)の各々は、それぞれ視点iの対象デプスマップDiにおける対象画素xjから生成した三次元点Mが、参照画素xpから生成した三次元点Nの可視性を阻害している。ここで、図3(a)は、対象画素xjのデプス値ZMが外れ値であり、三次元点Mが誤った位置に存在している。一方、図3(b)は、参照画素xpのデプス値Dk(xp)が外れ値であり、三次元点Nが誤った位置に存在している。すなわち、可視性を阻害するケースとしては、誤った三次元点が正しい三次元点の可視性を阻害する図3(a)と、正しい三次元点が誤った三次元点の可視性を阻害する図3(b)の場合とがある。 FIG. 3 is a conceptual diagram explaining the inhibition of visibility of each of the 3D point M and the 3D point generated from the depth value Dk(xp). Each of FIGS. 3A and 3B shows that the visibility of a three-dimensional point M generated from a target pixel xj in a target depth map Di at a viewpoint i is equal to the visibility of a three-dimensional point N generated from a reference pixel xp. hindering. Here, in FIG. 3(a), the depth value ZM of the target pixel xj is an outlier, and the three-dimensional point M exists at an erroneous position. On the other hand, in FIG. 3B, the depth value Dk(xp) of the reference pixel xp is an outlier, and the three-dimensional point N is present at the wrong position. That is, the cases of obstructing visibility are shown in FIG. There is a case of FIG. 3(b).

図4は、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性判定によるペナルティを付加する処理の説明図である。図4(a)は、三次元空間における三次元点M及び三次元点Nの視点kからのデプス値を比較していることを示している。
視点kからの三次元点Mのデプス値がZMであり、視点kからの三次元点Nのデプス値がDk(xp)である。この図4(a)のように、デプス値ZMとデプス値Dk(xp)との各々が(1)式の関係を満たす場合、後述するように、ペナルティスコア積算部104により視点iの画素xj及び視点kの画素xpの各々のペナルティスコアに対する積算処理が行われる(図4(a)の場合、ペナルティスコアをインクリメントする)。
図4(b)は、後述するように、デプス値差分が閾値(デプス差分閾値Dth)以下であるか否かにより、整合性の判定を行う際、デプス値差分が閾値以下であれば、整合性を有すると判定されることを示している。
FIG. 4 is an explanatory diagram of a process of adding a penalty based on consistency determination between the depth value Di(xj) of the target pixel xj and the depth value Dk(xp) of the reference pixel xp. FIG. 4(a) shows comparison of depth values of a 3D point M and a 3D point N in a 3D space from a viewpoint k.
The depth value of the three-dimensional point M from the viewpoint k is ZM, and the depth value of the three-dimensional point N from the viewpoint k is Dk(xp). As shown in FIG. 4A, when the depth value ZM and the depth value Dk(xp) each satisfy the relationship of formula (1), the penalty score integration unit 104 calculates the pixel xj at the viewpoint i as described later. and the penalty score of each pixel xp of the viewpoint k is integrated (in the case of FIG. 4A, the penalty score is incremented).
FIG. 4B shows, as will be described later, whether or not the depth value difference is equal to or less than a threshold (depth difference threshold Dth). It indicates that it is determined to have sex.

また、整合性判定部103の比較において、(1)式を用いていたが、以下の(2)式を用いても良い。
Dth≧ZM-Dk(xp) …(2)
(2)式においては、デプス差分閾値Dthを設定し、デプス値ZMがデプス値Dk(xp)に対して、デプス差分閾値Dthより小さければ、対象画素xjと参照画素xpとのデプス値の整合性はとれていると判定される。デプス値差分が0以下であるか否かの判定を行った場合には、少しでもデプス値ZMがデプス値Dk(xp)より小さいと、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性が無いと判定されてしまう。このため、デプス値差分が微少な誤差範囲(デプスマップ生成時に発生する所定の誤差範囲)にある場合、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)とが整合性ありと判定させるため(判定に対してロバスト性を含ませるため)、上記デプス差分閾値Dthを設定している。
Also, in the comparison by the consistency determination unit 103, formula (1) was used, but formula (2) below may also be used.
Dth≧ZM−Dk(xp) (2)
In equation (2), a depth difference threshold Dth is set, and if the depth value ZM is smaller than the depth difference threshold Dth with respect to the depth value Dk(xp), the depth values of the target pixel xj and the reference pixel xp are matched. It is determined that the sex is taken. When it is determined whether or not the depth value difference is 0 or less, if the depth value ZM is even slightly smaller than the depth value Dk(xp), the depth value Di(xj) of the target pixel xj and the reference pixel xp is determined to be inconsistent with the depth value Dk(xp) of . Therefore, when the depth value difference is within a very small error range (predetermined error range generated when the depth map is generated), the depth value Di(xj) of the target pixel xj and the depth value Dk(xp) of the reference pixel xp are The depth difference threshold Dth is set in order to determine that there is consistency (to include robustness in the determination).

また、整合性判定部103の比較において、(1)及び(2)式の各々の他に、以下の(3)式を用いても良い。
Dth≧|ZM-Dk(xp)| …(3)
(3)式においては、デプス値ZMとデプス値Dk(xp)とのデプス値差分の絶対値がデプス差分閾値Dth以下であれば、対象画素xjのデプス値ZMと参照画素xpのデプス値Dk(xp)との整合性があると判定する。一方、デプス値ZMとデプス値Dk(xp)とのデプス値差分の絶対値がデプス差分閾値Dthを超えた場合、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性がないと判定する。
Also, in the comparison by the consistency determination unit 103, the following formula (3) may be used in addition to each of the formulas (1) and (2).
Dth≧|ZM−Dk(xp)| (3)
In equation (3), if the absolute value of the depth value difference between the depth value ZM and the depth value Dk(xp) is equal to or less than the depth difference threshold value Dth, the depth value ZM of the target pixel xj and the depth value Dk of the reference pixel xp (xp). On the other hand, when the absolute value of the depth value difference between the depth value ZM and the depth value Dk(xp) exceeds the depth difference threshold value Dth, the depth value Di(xj) of the target pixel xj and the depth value Dk(xp ) is determined to be inconsistent.

すなわち、(3)式の場合には、三次元点Mとデプス値Dk(xp)から生成した三次元点とが対象物体の同一の表面を復元していることを仮定し、三次元点Mとデプス値Dk(xp)から生成した三次元点との距離が大きい場合、同一の表面を復元できていないとして、デプス値ZMとデプス値Dk(xp)との整合性が取れていないとする。
整合性判定部103は、上述した(1)式、(2)式及び(3)式のいずれかを用いて、対象画素xjのデプス値Di(xj)と参照画素xpのデプス値Dk(xp)との整合性の判定を行う。ここで、整合性判定部103は、デプスマップの全ての組合わせに対して、参照画素抽出部102が抽出した参照画素の各々と、参照画素に対応する対象画素とのデプス値の整合性の判定を行う。
That is, in the case of equation (3), it is assumed that the three-dimensional point M and the three-dimensional point generated from the depth value Dk(xp) restore the same surface of the target object, and the three-dimensional point M and the three-dimensional point generated from the depth value Dk(xp) is large, it is assumed that the same surface cannot be restored, and that the depth value ZM and the depth value Dk(xp) are not consistent. .
The consistency determination unit 103 uses any one of the formulas (1), (2), and (3) described above to determine the depth value Di(xj) of the target pixel xj and the depth value Dk(xp ) to determine consistency. Here, the consistency determination unit 103 determines the consistency of depth values between each of the reference pixels extracted by the reference pixel extraction unit 102 and target pixels corresponding to the reference pixels, for all combinations of depth maps. make a judgment.

ペナルティスコア積算部104は、整合性判定部103が整合性が無いと判定した対象画素xjと参照画素xpとの各々にペナルティとして、各画素のペナルティスコアをインクリメントする(「1」を加算する)処理を行う。ペナルティスコアは、デプスマップの画素毎に対応して、ペナルティスコアマップとして付与されている。このペナルティスコアマップは、デプスマップと同様の構成であるが、画素に対してデプス値ではなく、ペナルティスコアがデータとして与えられている。 The penalty score accumulation unit 104 increments the penalty score of each pixel (adds "1") as a penalty to each of the target pixel xj and the reference pixel xp determined by the consistency determination unit 103 to be inconsistent. process. A penalty score is assigned to each pixel of the depth map as a penalty score map. This penalty score map has the same configuration as the depth map, but instead of the depth value, the penalty score is given to the pixels as data.

図5は、ペナルティスコアマップ記憶部108に記憶されているペナルティスコアマップテーブルの構成例を示す図である。
図5において、ペナルティスコアテーブルは、レコード毎に、デプスマップ識別情報と、ペナルティスコアマップインデックスとの欄が設けられている。デプスマップ識別情報は、すでに述べたがデプスマップを識別する識別情報である。ペナルティスコアマップインデックスは、ペナルティスコアマップ記憶部108におけるペナルティスコアマップのデータが記憶されている領域のアドレスを示している。ペナルティスコアマップは、デプスマップにおける画素の各々と一対一に対応する、ペナルティスコアがデータとして記述された画素から構成されている。すなわち、ペナルティスコアマップは、デプスマップにおける画素の各々に対するペナルティスコアが、それぞれの画素に対応して記述されている。
FIG. 5 is a diagram showing a configuration example of a penalty score map table stored in the penalty score map storage unit 108. As shown in FIG.
In FIG. 5, the penalty score table has columns of depth map identification information and penalty score map index for each record. The depth map identification information is identification information for identifying the depth map, as already described. The penalty score map index indicates the address of the area in the penalty score map storage unit 108 where the penalty score map data is stored. The penalty score map is composed of pixels whose penalty scores are described as data in one-to-one correspondence with each pixel in the depth map. That is, the penalty score map describes a penalty score for each pixel in the depth map, corresponding to each pixel.

図1に戻り、ペナルティスコア積算部104は、ペナルティスコアマップ記憶部108におけるペナルティスコアテーブルを参照し、対象デプスマップDi及び参照デプスマップDkの各々のデプスマップ識別情報に対応するペナルティスコアマップを検出する。
そして、ペナルティスコア積算部104は、検出したペナルティスコアマップにおける、整合性判定部103が整合性が無いとした対象画素xj及び参照画素xpの各々のペナルティスコアをインクリメントし、ペナルティスコアの積算処理を行う。
上述したペナルティスコアテーブルにおけるペナルティスコアの積算処理を、整合性判定部103により整合性が無いと判定された、全ての対象デプスマップ及び参照デプスマップの各々における対象画素、参照画素それぞれに対して行う。
Returning to FIG. 1, the penalty score accumulation unit 104 refers to the penalty score table in the penalty score map storage unit 108, and detects the penalty score map corresponding to the depth map identification information of each of the target depth map Di and the reference depth map Dk. do.
Then, the penalty score accumulation unit 104 increments the penalty score of each of the target pixel xj and the reference pixel xp determined to be inconsistent by the consistency determination unit 103 in the detected penalty score map, and performs penalty score accumulation processing. conduct.
Integrating the penalty scores in the penalty score table described above is performed for each of the target pixels and the reference pixels in all the target depth maps and the reference depth maps that are determined to be inconsistent by the consistency determination unit 103. .

積算値判定部105は、ペナルティスコアマップ記憶部108に記憶されているペナルティスコアマップの各々を参照し、予め設定されているペナルティスコア閾値以上のペナルティスコアを有する画素の含まれるペナルティスコアマップを抽出する。このとき、積算値判定部105は、全てのペナルティスコアマップにおいてペナルティスコア閾値以上のペナルティスコアを有する画素が検出されない場合、デプスマップフィルタ処理装置によるデプスマップのフィルタ処理を終了する。積算値判定部105は、ペナルティスコア閾値以上のペナルティスコアを有する画素が検出された場合、デプス値修正部106に対してフィルタ処理を継続させる。 The integrated value determination unit 105 refers to each of the penalty score maps stored in the penalty score map storage unit 108, and extracts a penalty score map containing pixels having a penalty score equal to or higher than a preset penalty score threshold. do. At this time, if a pixel having a penalty score equal to or higher than the penalty score threshold is not detected in any of the penalty score maps, the integrated value determination unit 105 terminates depth map filtering by the depth map filtering device. The integrated value determination unit 105 causes the depth value correction unit 106 to continue filtering when a pixel having a penalty score equal to or higher than the penalty score threshold is detected.

ここで、上述した処理において、各画素の積算されたペナルティスコアからなるペナルティスコアマップにおいては、異なるデプスマップにおける対応する他の画素に対して整合性が取れない画素ほどペナルティスコアが大きくなる。したがって、ペナルティスコアマップの各々の画素におけるペナルティスコアは、他の視点のデプスマップの画素と整合性が取れない程度を示している。ペナルティスコアが大きい画素は、多くの他の視点のデプスマップと整合性が取れないため、多数決の論理により、デプス値が不正確である可能性が高いと言える。 Here, in the above-described processing, in the penalty score map, which is composed of the accumulated penalty scores of each pixel, the penalty score increases for pixels that are not consistent with other corresponding pixels in different depth maps. Therefore, the penalty score for each pixel of the penalty score map indicates the extent to which it is inconsistent with the pixels of the depth maps of other viewpoints. Pixels with large penalty scores are inconsistent with depth maps of many other viewpoints, so it can be said that there is a high possibility that the depth value is inaccurate due to majority logic.

デプス値修正部106は、積算値判定部105が抽出したペナルティスコア閾値以上のペナルティスコアを有する画素から、ペナルティスコアが最も大きい(ペナルティスコアが最大値の)画素を検出し、この画素を修正対象画素として抽出する。そして、デプス値修正部106は、抽出した修正対象画素のデプス値を所定の数値に変更することで、デプスマップの修正処理(フィルタ処理)を行う。この所定の数値は、例えば、三次元形状モデルの生成処理において、生成に用いるデプス値として不正値と判定される「0」あるいは負の数値である。 The depth value correction unit 106 detects a pixel with the highest penalty score (maximum penalty score) from pixels having a penalty score equal to or higher than the penalty score threshold extracted by the integrated value determination unit 105, and selects this pixel as a correction target. Extract as pixels. Then, the depth value correction unit 106 performs depth map correction processing (filter processing) by changing the depth value of the extracted correction target pixel to a predetermined numerical value. This predetermined numerical value is, for example, "0" or a negative numerical value that is determined to be an invalid value as a depth value used for generation in the process of generating a three-dimensional shape model.

また、デプス値修正部106は、デプスマップにおける修正対象画素に隣接する複数の画素のデプス値の平均値を、上記所定の数値としてデプス値の変更することで、デプスマップの修正処理(フィルタ処理)を行う構成としても良い。
また、ペナルティスコア積算部104は、ペナルティスコアをインクリメントするのではなく、対象画素のデプス値と参照画素のデプス値のデプス値差分(あるいは絶対値)の積算値をペナルティスコアとする構成としても良い。
Further, the depth value correction unit 106 changes the depth value by using the average value of the depth values of a plurality of pixels adjacent to the correction target pixel in the depth map as the predetermined numerical value, thereby performing depth map correction processing (filter processing). ) may be used.
Also, the penalty score accumulation unit 104 may be configured to use the accumulated value of the depth value difference (or absolute value) between the depth value of the target pixel and the depth value of the reference pixel as the penalty score instead of incrementing the penalty score. .

また、参照画素抽出部102は、対象デプスマップDiにおける対象画素xjの三次元点を生成する際、この対象画素xjのデプス値が不正値である場合、この対象画素xjの三次元点の生成を行わない。
また、参照画素抽出部102は、生成した三次元点を参照デプスマップDkに投影し、投影された位置にある参照デプスマップDkにおける画素である参照画素xpを検出した際、この参照画素xpのデプス値が不正値である場合、この参照画素xpの抽出を行わない。
Further, when generating the 3D point of the target pixel xj in the target depth map Di, if the depth value of the target pixel xj is an invalid value, the reference pixel extraction unit 102 generates the 3D point of the target pixel xj. do not
Further, when the reference pixel extracting unit 102 projects the generated three-dimensional point onto the reference depth map Dk and detects a reference pixel xp that is a pixel in the reference depth map Dk at the projected position, the reference pixel xp is If the depth value is an invalid value, this reference pixel xp is not extracted.

本実施形態においては、積算値判定部105がペナルティスコア閾値以上のペナルティスコアを有する画素が検出されなくなるまで、デプスマップのフィルタ処理を繰り返して行う。このため、本実施形態において、上述した不正値に対する処理を加えることにより、すでに前回のフィルタ処理までに三次元形状の生成に用いない処理として、不正値が書き込まれた画素に対して、再度フィルタ処理を行わない構成としている。 In the present embodiment, depth map filtering is repeatedly performed until the integrated value determination unit 105 no longer detects pixels having a penalty score equal to or greater than the penalty score threshold. For this reason, in the present embodiment, by adding the processing for the above-described invalid values, pixels to which invalid values have been written are filtered again as processing not used for generating a three-dimensional shape by the previous filtering process. The configuration is such that no processing is performed.

図6は、本実施形態によるデプスマップフィルタ処理装置1が行なうデプスマップにおける外れ値のデプス値を修正する処理の動作例を示すフローチャートである。以下に示すフローチャートは、デプスマップフィルタ処理装置1が行なうデプスマップにおける外れ値のデプス値を修正するフィルタ処理の流れを示している。 FIG. 6 is a flow chart showing an operation example of a process of correcting outlier depth values in a depth map performed by the depth map filter processing device 1 according to the present embodiment. The flowchart shown below shows the flow of filtering processing performed by the depth map filtering device 1 for correcting outlier depth values in the depth map.

ステップS1:
デプスマップ入力部101は、外部装置から供給される、対象物体の三次元形状モデルを生成するために用いるデプスマップ群を入力する。
そして、デプスマップ入力部101は、デプスマップ群におけるデプスマップの各々に対し、デプスマップを識別する識別情報であるデプスマップ識別情報を付与し、このデプスマップ識別情報とともにデプスマップをデプスマップ記憶部107に書き込んで記憶させる。
また、このとき、ペナルティスコア積算部104は、ペナルティスコアマップ記憶部108に記憶されている全てのペナルティスコアマップにおける画素のペナルティスコアを「0」として、ペナルティスコアマップに対するリセット処理を行う。
Step S1:
A depth map input unit 101 inputs a depth map group used to generate a three-dimensional shape model of a target object supplied from an external device.
Then, the depth map input unit 101 assigns depth map identification information, which is identification information for identifying the depth map, to each depth map in the depth map group, and stores the depth map together with the depth map identification information in the depth map storage unit. 107 to be stored.
Also, at this time, the penalty score accumulation unit 104 sets the penalty scores of pixels in all the penalty score maps stored in the penalty score map storage unit 108 to “0”, and resets the penalty score maps.

ステップS2:
参照画素抽出部102は、デプスマップ記憶部107のデプスマップテーブルを参照し、デプス値を修正する対象のデプスマップである対象デプスマップDiと、対象デプスマップDiと比較するた参照デプスマップDkとの組合わせを抽出する。
Step S2:
The reference pixel extraction unit 102 refers to the depth map table of the depth map storage unit 107, and extracts a target depth map Di, which is a depth map whose depth value is to be corrected, and a reference depth map Dk to be compared with the target depth map Di. Extract the combination of

ステップS3:
そして、参照画素抽出部102は、対象デプスマップDiにおける対象画素xjの各々のデプス値Di(xj)と、カメラパラメータとを用いて、三次元座標空間における各画素に対応する三次元点Mをそれぞれ生成する。このとき、参照画素抽出部102は、この対象画素xjのデプス値が不正値である場合、この対象画素xjの三次元点の生成を行わない。
Step S3:
Then, the reference pixel extraction unit 102 uses the depth value Di(xj) of each target pixel xj in the target depth map Di and camera parameters to extract a three-dimensional point M corresponding to each pixel in the three-dimensional coordinate space. Generate each. At this time, if the depth value of the target pixel xj is an invalid value, the reference pixel extraction unit 102 does not generate the three-dimensional point of the target pixel xj.

ステップS4:
また、参照画素抽出部102は、生成した三次元点を参照デプスマップDkに投影し、投影された位置にある参照デプスマップDkにおける画素である参照画素xpを抽出する。このとき、参照画素抽出部102は、生成した三次元点を参照デプスマップDkに投影した位置の参照画素xpのデプス値が不正値である場合、この参照画素xpの抽出を行わない。また、参照画素抽出部102は、デプスマップ記憶部107に記憶されている全てのデプスマップの各々の組合わせを抽出し、参照画素xpそれぞれの抽出を行う。ここで、参照画素抽出部102は、対象デプスマップDiにおける全ての対象画素のデプス値から三次元点を生成し、三次元点の各々を参照デプスマップに投影して、投影された位置にある参照画素を抽出する。
Step S4:
The reference pixel extracting unit 102 also projects the generated three-dimensional point onto the reference depth map Dk, and extracts a reference pixel xp, which is a pixel in the reference depth map Dk at the projected position. At this time, the reference pixel extraction unit 102 does not extract the reference pixel xp if the depth value of the reference pixel xp at the position where the generated three-dimensional point is projected onto the reference depth map Dk is an invalid value. Further, the reference pixel extraction unit 102 extracts each combination of all depth maps stored in the depth map storage unit 107, and extracts each reference pixel xp. Here, the reference pixel extraction unit 102 generates three-dimensional points from the depth values of all target pixels in the target depth map Di, projects each of the three-dimensional points onto the reference depth map, and Extract a reference pixel.

ステップS5:
整合性判定部103は、対象画素xjの三次元点Mと視点kとの距離を求め、この距離をデプス値ZMとする。
また、整合性判定部103は、上記対象画素xjに対応して参照画素抽出部102が抽出した参照画素xpのデプス値Dk(xp)との各々を、デプスマップ記憶部107をア参照して、記憶されている参照デプスマップDkであるデプスマップから読み出す。このデプス値ZMは、三次元点Mの視点kからの距離を示している。
そして、整合性判定部103は、デプス値ZMとデプス値Dk(xp)とを比較し、デプス値差分(ZM-Dk(xp))が0以下であるか否かの判定を行う(上記(1)式の関係に基づく)。このとき、整合性判定部103は、デプス値差分(ZM-Dk(xp))が0以下である場合、デプス値の整合性があると判定する。一方、整合性判定部103は、デプス値差分(ZM-Dk(xp))が0を超えた場合、デプス値に整合性がないと判定する。
Step S5:
The consistency determination unit 103 obtains the distance between the three-dimensional point M of the target pixel xj and the viewpoint k, and sets this distance as the depth value ZM.
Further, the consistency determination unit 103 references the depth map storage unit 107 for each of the depth value Dk(xp) of the reference pixel xp extracted by the reference pixel extraction unit 102 corresponding to the target pixel xj. , from the depth map, which is the stored reference depth map Dk. This depth value ZM indicates the distance of the three-dimensional point M from the viewpoint k.
Then, the consistency determination unit 103 compares the depth value ZM and the depth value Dk(xp), and determines whether the depth value difference (ZM−Dk(xp)) is 0 or less (the above ( 1) based on the relationship of the formula). At this time, if the depth value difference (ZM−Dk(xp)) is 0 or less, the consistency determination unit 103 determines that the depth values are consistent. On the other hand, when the depth value difference (ZM−Dk(xp)) exceeds 0, the consistency determination unit 103 determines that the depth values are not consistent.

ステップS6:
ペナルティスコア積算部104は、整合性判定部103が整合性が無いと判定した対象画素xjと参照画素xpとの各々にペナルティを与える。
すなわち、ペナルティスコア積算部104は、ペナルティスコアマップ記憶部108における対象デプスマップDiにおける対象画素xjと、参照デプスマップDkにおける参照画素xpとの各々のペナルティスコアをインクリメントする(ペナルティスコアの積算処理を行う)。
Step S6:
The penalty score accumulation unit 104 gives a penalty to each of the target pixel xj and the reference pixel xp determined by the consistency determination unit 103 to be inconsistent.
That is, the penalty score integration unit 104 increments the penalty score of each of the target pixel xj in the target depth map Di and the reference pixel xp in the reference depth map Dk in the penalty score map storage unit 108 (the penalty score integration process is conduct).

ステップS7:
ペナルティスコア積算部104は、参照画素抽出部102が全てのデプスマップの組合わせを作成し、自身が上記デプスマップの組合わせにおける対象画素及び参照画素の各々に対するペナルティ付加の処理が終了したか否かの判定を行う。
このとき、ペナルティスコア積算部104は、全てのデプスマップの組合わせにおける対象画素及び参照画素の各々に対するペナルティ付加の処理が終了した場合、処理をステップS8へ進める。一方、ペナルティスコア積算部104は、全てのデプスマップの組合わせにおける対象画素及び参照画素の各々に対するペナルティ付加の処理が終了していない場合、処理をステップS2へ進める。
Step S7:
The penalty score accumulation unit 104 determines whether the reference pixel extraction unit 102 has created a combination of all depth maps, and the penalty addition processing for each of the target pixel and the reference pixel in the combination of depth maps has been completed. make a judgment as to whether
At this time, the penalty score accumulation unit 104 advances the process to step S8 when the penalty addition process for each of the target pixel and the reference pixel in all combinations of depth maps is completed. On the other hand, the penalty score accumulation unit 104 advances the process to step S2 when the process of adding the penalty to each of the target pixel and the reference pixel in all combinations of depth maps has not been completed.

ステップS8:
積算値判定部105は、ペナルティスコアマップ記憶部108に記憶されているペナルティスコアマップの各々を参照する。そして、積算値判定部105は、予め設定されているペナルティスコア閾値以上のペナルティスコアを有する画素の有無を判定する。このとき、積算値判定部105は、ペナルティスコア閾値以上のペナルティスコアを有する画素が有った場合、処理をステップS9へ進める(すなわち、デプス値の変更処理を継続させる)。一方、積算値判定部105は、ペナルティスコア閾値以上のペナルティスコアを有する画素が無い場合、デプスマップフィルタ処理装置によるデプスマップのフィルタ処理を終了する。
Step S8:
Integrated value determination section 105 refers to each penalty score map stored in penalty score map storage section 108 . Then, the integrated value determination unit 105 determines whether or not there is a pixel having a penalty score equal to or higher than a preset penalty score threshold. At this time, if there is a pixel having a penalty score equal to or higher than the penalty score threshold, the integrated value determination unit 105 advances the process to step S9 (that is, continues the depth value change process). On the other hand, when there is no pixel having a penalty score equal to or higher than the penalty score threshold, the integrated value determination unit 105 terminates depth map filtering by the depth map filtering device.

ステップS9:
デプス値修正部106は、積算値判定部105が抽出したペナルティスコア閾値以上のペナルティスコアを有する画素の中から、ペナルティスコア(積算値)が最大値の画素を検出し、この画素を修正対象画素として抽出する。
Step S9:
The depth value correction unit 106 detects a pixel with a maximum penalty score (integrated value) from pixels having a penalty score equal to or higher than the penalty score threshold extracted by the integrated value determination unit 105, and selects this pixel as a correction target pixel. Extract as

ステップS10:
デプス値修正部106は、デプスマップ記憶部107における修正対象画素の含まれるデプスマップを抽出し、抽出した修正対象画素のデプス値を所定の数値に変更する(書き換える)ことで、デプスマップの修正処理を行う。この所定の数値は、例えば、三次元形状モデルの生成処理において、生成に用いるデプス値として不正値と判定される「0」あるいは負の数値に変更する。
そして、ペナルティスコア積算部104は、ペナルティスコアマップ記憶部108における全てのペナルティスコアマップにおける画素の各々のペナルティスコアを「0」としてリセットし、処理をステップS2へ進める。
Step S10:
The depth value correction unit 106 extracts the depth map containing the correction target pixel in the depth map storage unit 107, and changes (rewrites) the depth value of the extracted correction target pixel to a predetermined value, thereby correcting the depth map. process. This predetermined numerical value is changed, for example, to "0" or a negative numerical value that is determined to be an invalid value as a depth value used for generation in the processing of generating a three-dimensional shape model.
Penalty score accumulation unit 104 then resets the penalty score of each pixel in all penalty score maps in penalty score map storage unit 108 to "0", and advances the process to step S2.

図7は、最大値を有するペナルティスコアを有する修正対象画素の修正処理について説明する図である。図7(a)は、ペナルティスコアとして最大値を有する画素の検出を説明している。三次元点M2に対応する視点P4のデプスマップDP5における画素と、三次元点M1に対応する視点P5のデプスマップDP1に対応する画素とが、ペナルティスコアが「4」で最大値を有している。
このため、デプス値修正部106は、三次元点M1に対応する画素と三次元点M2に対応する画素との各々のデプス値を、不正値に変更する処理を行う。
FIG. 7 is a diagram illustrating correction processing of a correction target pixel having a maximum penalty score. FIG. 7(a) describes the detection of the pixel with the maximum penalty score. A pixel in the depth map DP5 of the viewpoint P4 corresponding to the three-dimensional point M2 and a pixel corresponding to the depth map DP1 of the viewpoint P5 corresponding to the three-dimensional point M1 have the maximum penalty score of "4". there is
Therefore, the depth value correction unit 106 performs processing to change the depth values of the pixels corresponding to the three-dimensional point M1 and the pixels corresponding to the three-dimensional point M2 to invalid values.

これにより、本実施形態によれば、修正対象画素の修正処理の後に、再度、ステップS2からステップS7におけるペナルティスコアの付加処理を行うことにより、図7に示すように、全体的なペナルティスコアが変化する。この処理を繰り返すことにより、全てのペナルティスコアマップにおける画素のペナルティスコアが、ペナルティスコア閾値未満となり、デプス値の外れ点を低減することができる。 As a result, according to the present embodiment, after the correction processing of the correction target pixel, the penalty score addition processing in steps S2 to S7 is performed again. Change. By repeating this process, the penalty scores of pixels in all penalty score maps become less than the penalty score threshold, and outliers of depth values can be reduced.

また、本実施形態によれば、他の画素の三次元点の見えを阻害するデプス値を有する画素を検出し、この画素のデプス値を外れ値としてのデプス値を不正値とする処理を行うため、デプスマップにおける正しいデプス値を不正確なデプス値に変更することなく、デプス値の外れ点を低減することができる。 Further, according to the present embodiment, a pixel having a depth value that hinders the appearance of a three-dimensional point of another pixel is detected, and the depth value of this pixel is treated as an outlier and the depth value is treated as an invalid value. Therefore, outliers of depth values can be reduced without changing correct depth values in the depth map to incorrect depth values.

また、本実施形態によれば、画素のデプス値に対応する三次元点の各々を、他の視点のデプスマップに投影し、この三次元点のデプス値を他の視点のデプスマップに変換した(他の視点における三次元点のデプス値を算出)後、投影された位置の画素のデプス値と比較していくため、それぞれの画素を独立して処理していくため、クラスタ状の画素のデプス値の修正、物体表面近傍の画素の不正確なデプス値を精度良く修正することで、スコア値の高いデプス値が修正され、他の視点のデプスマップと整合性が取れたデプスマップを得ることが可能である。 Further, according to this embodiment, each of the three-dimensional points corresponding to the depth value of the pixel is projected onto the depth map of another viewpoint, and the depth value of this three-dimensional point is converted into the depth map of the other viewpoint. After (calculating the depth value of the 3D point at another viewpoint), it is compared with the depth value of the pixel at the projected position, so each pixel is processed independently. By correcting depth values and correcting inaccurate depth values of pixels near the object surface with high accuracy, depth values with high scores are corrected, and depth maps consistent with depth maps from other viewpoints are obtained. It is possible.

また、本実施形態において、整合性の判定において、デプスマップのデプス値を用いるのではなく、デプスマップの画素の位置と一対一対応する画素を有する撮像画像における画素の画素値を用いても良い。この場合、デプスマップ入力部101は、デプスマップと対応する撮像画像を外部装置から読み込み、対応するデプスマップと同一のデプスマップ識別情報を付与し、デプスマップ記憶部107に対して書き込んで記憶させる。このときデプスマップテーブルに、撮像画像インデックスを書き込み、この撮像画像インデックスの示すアドレスの領域に撮像画像のデータを書き込んで記憶させる。
すでに上記実施形態において述べたように、参照画素抽出部102は、視点iの対象デプスマップDiにおける対象画素xjのデプス値とカメラパラメータとから三次元点Mを作成する。そして、参照画素抽出部102は、異なる視点kの参照デプスマップDk上に三次元点Mを投影し、投影された位置の参照画素xpを抽出する。
Further, in the present embodiment, in determining consistency, instead of using the depth value of the depth map, the pixel value of the pixel in the captured image having pixels in one-to-one correspondence with the pixel positions of the depth map may be used. . In this case, the depth map input unit 101 reads the captured image corresponding to the depth map from an external device, assigns the same depth map identification information as the corresponding depth map, and writes and stores it in the depth map storage unit 107. . At this time, the captured image index is written in the depth map table, and the data of the captured image is written and stored in the area of the address indicated by this captured image index.
As already described in the above embodiment, the reference pixel extraction unit 102 creates the three-dimensional point M from the depth value of the target pixel xj in the target depth map Di at the viewpoint i and the camera parameters. Then, the reference pixel extraction unit 102 projects the three-dimensional point M onto the reference depth map Dk of a different viewpoint k, and extracts the reference pixel xp at the projected position.

そして、整合性判定部103は、対象画素xjの画素値と参照画素xpの画素値とを比較する。本実施形態においては、画素値である階調度(カラー画像のRGB)あるいは、画素値から求めた輝度値を用いる。白黒画像の場合には、グレースケールの階調度が用いられる。
以下の説明において、整合性判定部103は、例えば、対象デプスマップDiに対応する対象カラー画像Iiの対象画素xiの色Ii(xj)と、参照デプスマップDkに対応する対象カラー画像Ikの参照画素xpの色Ik(xp)との比較を、以下の(4)式の関係式を用いて行う。
Then, the consistency determination unit 103 compares the pixel value of the target pixel xj and the pixel value of the reference pixel xp. In this embodiment, the gradation (RGB of a color image), which is a pixel value, or the luminance value obtained from the pixel value is used. For black and white images, grayscale gradients are used.
In the following description, the consistency determination unit 103, for example, refers to the color Ii(xj) of the target pixel xi of the target color image Ii corresponding to the target depth map Di and the target color image Ik corresponding to the reference depth map Dk. The pixel xp is compared with the color Ik(xp) using the following relational expression (4).

|Ii(xj)-Ik(xp)|>Ith …(4)
(4)式において、Ithは予め設定された画素値閾値である。
整合性判定部103は、色Ii(xj)と色Ik(xp)との差分値の絶対値が画素値閾値Ithを超えた場合に、対象画素xiと参照画素xpとの整合性が取れていないと判定する。そして、ペナルティスコア積算部104は、対象画素xj及び参照画素xpの各々のペナルティスコアをインクリメントする。
また、ペナルティスコア積算部104は、対象画素xj及び参照画素xpの各々のペナルティスコアに対し、差分値の絶対値|Ii(xj)-Ik(xp)|を積算する構成としても良い。ペナルティスコア積算処理以降における、ペナルティスコアを用いた画素のデプス値の修正処理については、すでに説明した動作と同様である。
|Ii(xj)−Ik(xp)|>Ith (4)
(4), Ith is a preset pixel value threshold.
If the absolute value of the difference between the color Ii (xj) and the color Ik (xp) exceeds the pixel value threshold Ith, the consistency determination unit 103 determines that the target pixel xi and the reference pixel xp are consistent. judge not. Then, the penalty score accumulation unit 104 increments the penalty score of each of the target pixel xj and the reference pixel xp.
Further, the penalty score integration unit 104 may be configured to integrate the absolute value of the difference value |Ii(xj)−Ik(xp)| with respect to the penalty score of each of the target pixel xj and the reference pixel xp. After the penalty score accumulation process, the pixel depth value correction process using the penalty score is the same as the operation already described.

また、(1)式から(3)式のいずれか一つと、(4)式との組合せを、対象画素xj及び参照画素xpの各々のペナルティスコアの積算処理を行う判定に用いてもよい。
例えば、デプス値の整合性がなく、かつ色の整合性がない場合にペナルティスコアの積算処理を行う構成としても良い。
一方、デプス値の整合性あるいは色の整合性のいずれかがない場合にペナルティスコアの積算処理を行う構成としても良い。
また、本実施形態においては、対象画素と参照画素との整合性が無いと判定された場合、対象画素と参照画素との双方のペナルティスコアの積算処理を行うとして説明したが、対象画素のペナルティスコアの積算処理のみを行う構成としても良い。
Also, a combination of any one of formulas (1) to (3) and formula (4) may be used for determining whether to integrate the penalty scores of the target pixel xj and the reference pixel xp.
For example, a configuration may be adopted in which penalty score integration processing is performed when there is no matching of depth values and no matching of colors.
On the other hand, a configuration may be employed in which penalty score integration processing is performed when there is no matching of depth values or matching of colors.
Further, in the present embodiment, when it is determined that there is no match between the target pixel and the reference pixel, the penalty scores of both the target pixel and the reference pixel are integrated. The configuration may be such that only score accumulation processing is performed.

また、上述した実施形態においては、デプスマップの修正処理を行うことで、デプスマップ間の対応する画素のデプス値の整合性や、デプスマップとカラー画像間の整合性が変化することにより、ペナルティスコアマップの値も変化する。このため、本実施形態においては、デプスマップのフィルタ処理を、すべてのペナルティスコアマップにおけるすべての画素のペナルティスコアが「1」以下になるまで、ペナルティスコアマップの計算とデプスマップの修正を繰り返し交互に処理する。また、ペナルティスコアの閾値を「1」以外の所定の数値に設定し、すべてのペナルティスコアマップのすべての画素のスコア値がその閾値未満となるまで、ペナルティスコアマップの計算とデプスマップの修正を繰り返し交互に処理する構成としても良い。 Further, in the above-described embodiment, by performing the depth map correction processing, the consistency of the depth values of corresponding pixels between the depth maps and the consistency between the depth map and the color image are changed. The value of the score map also changes. For this reason, in the present embodiment, depth map filtering is performed alternately between the calculation of penalty score maps and the modification of depth maps until the penalty scores of all pixels in all penalty score maps become "1" or less. to process. Also, the penalty score threshold is set to a predetermined value other than "1", and the calculation of the penalty score maps and the modification of the depth maps are performed until the score values of all pixels in all penalty score maps are less than the threshold. It is also possible to adopt a configuration in which the processing is performed repeatedly and alternately.

図8は、対象物の多視点画像から生成したデプスマップを元に、対象物の三次元点群を復元した画像を示す図である。図8(a)は、異なる視点から対象物を撮影したいずれかの視点における多視点画像の一例を示している。
この図8の例においては、図8(a)に示した多視点画像を含んだ、異なる視点で撮影された6枚の多視点画像の各々と、撮像装置の多視点画像を撮像したカメラパラメータそれぞれとを用い、PatchMatch Stereo法により各視点のデプスマップを生成し、各視点のデプスマップとカメラパラメータとから三次元点群を生成した。
FIG. 8 is a diagram showing an image in which a three-dimensional point cloud of an object is restored based on a depth map generated from multi-viewpoint images of the object. FIG. 8(a) shows an example of a multi-viewpoint image at any one of viewpoints in which an object is photographed from different viewpoints.
In the example of FIG. 8, each of six multi-viewpoint images taken at different viewpoints, including the multi-viewpoint image shown in FIG. A depth map of each viewpoint was generated by the PatchMatch Stereo method using each of them, and a three-dimensional point group was generated from the depth map of each viewpoint and the camera parameters.

図8(b)は、PatchMatch Stereo法により生成したデプスマップに対し、本実施形態においけるデプスマップフィルタ処理を行わずに、生成されたままのデプスマップにより三次元点群を生成した場合の結果を示している。
図8(b)を見て判るように、生成されたままのデプスマップを用いて復元された三次元点群には、多数の不正確な三次元点が含まれる。この不正確な三次元点群は、生成されたデプスマップに含まれる不正確な(外れ値である)デプス値がそのまま三次元点に変換されたため、発生したものである。
FIG. 8B shows the depth map generated by the PatchMatch Stereo method without performing the depth map filtering process in this embodiment, and generating a three-dimensional point cloud from the depth map as it is generated. shows the results.
As can be seen from FIG. 8(b), the 3D point cloud reconstructed using the as-generated depth map contains many inaccurate 3D points. This inaccurate 3D point group is generated because the inaccurate (outlier) depth values included in the generated depth map are directly converted into 3D points.

図8(c)は、PatchMatch Stereo法により生成したデプスマップに対し、本実施形態によるデプスマップフィルタ処理を行った後、修正されたデプスマップを用いて三次元点群を生成した場合の結果を示している。
図8(c)を見て判るように、修正されたデプスマップを用いて復元された三次元点群では、図8(b)に含まれていたような不正確な三次元点群が生成されず、対象物体の三次元形状モデルとして、図8(b)の場合より精度が高い結果となっている。
FIG. 8(c) shows the result of generating a three-dimensional point group using the modified depth map after performing the depth map filtering process according to the present embodiment on the depth map generated by the PatchMatch Stereo method. showing.
As can be seen in FIG. 8(c), the 3D point cloud reconstructed using the modified depth map produces an inaccurate 3D point cloud such as that contained in FIG. 8(b). Therefore, the accuracy of the three-dimensional shape model of the target object is higher than in the case of FIG. 8B.

この結果は、本実施形態によるデプスマップフィルタ処理により、デプスマップに含まれていた不正確な(外れ点である)デプス値を修正することができ、それらの不正確なデプス値が原因で発生していた不正確な三次元点が生成されることを抑制していることを示している。特に、この図8(c)の結果では、図8(b)の結果においてクラスタ状に発生していた不正確な三次元点や、対象物体表面付近に発生していた三次元点についても、修正されていることが確認できる。また、復元された三次元点群による三次元点群形状モデルが図8(a)の画像との比較により、不正確な三次元点が修正されているものの、正しく復元されていた三次元点が不当に修正されることがないことも確認できる。 The result is that depth map filtering according to the present embodiment can correct inaccurate (outlier) depth values that were included in the depth map, and that these inaccurate depth values caused This indicates that the generation of inaccurate 3D points that used to be suppressed is suppressed. In particular, in the result of FIG. 8(c), the inaccurate 3D points generated in clusters in the result of FIG. 8(b) and the 3D points generated near the surface of the target object You can confirm that it has been fixed. In addition, by comparing the 3D point cloud shape model based on the restored 3D point cloud with the image of FIG. It can also be confirmed that there is no unauthorized modification.

なお、本発明における図1のデプスマップフィルタ処理装置1の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませて実行することにより、デプスマップにおける各画素のデプス値の修正を行う処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OS(Operating System)や周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、ホームページ提供環境(あるいは表示環境)を備えたWWW(World Wide Web)システムも含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM(Read Only Memory)、CD-ROM(Compact Disc - Read Only Memory)等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM(Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。 A program for realizing the functions of the depth map filtering device 1 of FIG. 1 according to the present invention is recorded in a computer-readable recording medium, and the program recorded in this recording medium is read and executed by a computer system. By doing so, a process of correcting the depth value of each pixel in the depth map may be performed. It should be noted that the "computer system" referred to here includes hardware such as an OS (Operating System) and peripheral devices. Also, the "computer system" includes a WWW (World Wide Web) system provided with a homepage providing environment (or display environment). In addition, "computer-readable recording medium" refers to portable media such as flexible discs, magneto-optical discs, ROM (Read Only Memory), CD-ROM (Compact Disc - Read Only Memory), etc. A storage device such as a hard disk. In addition, "computer-readable recording medium" means the volatile memory (RAM (Random Access Memory)), which holds programs for a certain period of time.

また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。 Further, the above program may be transmitted from a computer system storing this program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in a transmission medium. Here, the "transmission medium" for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the program may be for realizing part of the functions described above. Further, it may be a so-called difference file (difference program) that can realize the above-described functions in combination with a program already recorded in the computer system.

以上、この発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計変更等も含まれる。 Although the embodiment of the present invention has been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and design changes and the like are included within the scope of the present invention.

1…デプスマップフィルタ処理装置
101…デプスマップ入力部
102…参照画素抽出部
103…整合性判定部
104…ペナルティスコア積算部
105…積算値判定部
106…デプス値修正部
107…デプスマップ記憶部
108…ペナルティスコアマップ記憶部
REFERENCE SIGNS LIST 1 depth map filter processing device 101 depth map input unit 102 reference pixel extraction unit 103 consistency determination unit 104 penalty score integration unit 105 integrated value determination unit 106 depth value correction unit 107 depth map storage unit 108 … Penalty score map memory

Claims (9)

異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性判定部と、
整合性がないと判定された画素に対してペナルティスコアを与えるペナルティスコア積算部と、
前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定部と、
前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正部と
を備え、
前記デプス値修正部が、
前記ペナルティスコアマップを参照し、前記第1閾値を超えている積算値の前記画素における、当該積算値の最大値を有する画素を最大値画素として抽出し、当該最大値画素のデプス値を修正すること
を特徴とするデプスマップフィルタ処理装置。
a consistency determination unit that compares pixel information of corresponding pixels in different depth maps and determines whether or not there is consistency between the pixels;
a penalty score accumulation unit that gives a penalty score to pixels that are determined to be inconsistent;
After determining the consistency of the pixel information between pixels in each and all combinations of the depth maps, it is determined whether or not the integrated value of the penalty scores exceeds a predetermined first threshold. an integrated value determination unit that generates a penalty score map showing each penalty score of
a depth value correction unit that corrects the depth value of the pixel whose integrated value exceeds the first threshold in the penalty score map,
The depth value correction unit
referring to the penalty score map, extracting a pixel having the maximum integrated value among the pixels with integrated values exceeding the first threshold as maximum value pixels, and correcting the depth value of the maximum value pixels; A depth map filtering device characterized by:
前記積算値判定部が、前記積算値が前記第1閾値を超えている場合、前記デプス値の修正後のデプスマップによる画素間の整合性の判定を前記整合性判定部に対して行わせて、デプスマップの修正処理を継続させる
ことを特徴とする請求項1に記載のデプスマップフィルタ処理装置。
When the integrated value exceeds the first threshold, the integrated value determination unit causes the consistency determination unit to determine consistency between pixels based on the depth map after the correction of the depth value. , continuing the correction processing of the depth map.
比較する組における一のデプスマップの対象画素のデプス値及び当該一のデプスマップのカメラパラメータから三次元点を生成し、他のデプスマップに前記三次元点を投影し、当該他のデプスマップの対応する参照画素の前記画素情報である参照画素情報を抽出する参照画素抽出部とを
さらに備え、
前記整合性判定部が、
前記参照画素情報と前記対象画素の前記画素情報である対象画素情報とを比較し、前記参照画素情報と前記対象画素情報とが所定の第2閾値未満であるか否かにより、前記整合性の判定を行う
ことを特徴とする請求項1または請求項2に記載のデプスマップフィルタ処理装置。
A three-dimensional point is generated from the depth value of the target pixel of one depth map in the set to be compared and the camera parameters of the one depth map, the three-dimensional point is projected onto another depth map, and the other depth map is projected. a reference pixel extraction unit that extracts reference pixel information that is the pixel information of the corresponding reference pixel,
The consistency determination unit
The reference pixel information is compared with the target pixel information, which is the pixel information of the target pixel, and the consistency is determined by whether the reference pixel information and the target pixel information are less than a predetermined second threshold. 3. The depth map filtering device according to claim 1, wherein determination is made.
前記画素情報が前記画素のデプス値である
ことを特徴とする請求項1から請求項3のいずれか一項に記載のデプスマップフィルタ処理装置。
The depth map filtering device according to any one of claims 1 to 3, wherein the pixel information is a depth value of the pixel.
前記画素情報が前記画素の画素値である
ことを特徴とする請求項1から請求項3のいずれか一項に記載のデプスマップフィルタ処理装置。
The depth map filtering device according to any one of claims 1 to 3, wherein the pixel information is a pixel value of the pixel.
前記画素情報が前記画素のデプス値及び画素値の各々である
ことを特徴とする請求項1から請求項3のいずれか一項に記載のデプスマップフィルタ処理装置。
The depth map filtering device according to any one of claims 1 to 3, wherein the pixel information is each of a depth value and a pixel value of the pixel.
前記デプス値修正部が、
前記画素のデプス値を修正する際、前記デプスマップから三次元形状モデルの三次元点を生成する際に、当該三次元点の生成の計算において無視される不正値に、前記画素のデプス値を変更する
ことを特徴とする請求項1から請求項6のいずれか一項に記載のデプスマップフィルタ処理装置。
The depth value correction unit
When modifying the depth value of the pixel, when generating the 3D point of the 3D shape model from the depth map, the depth value of the pixel is changed to an invalid value that is ignored in the calculation of generating the 3D point. 7. The depth map filtering device according to any one of claims 1 to 6, wherein the depth map filtering device is changed.
整合性判定部が、異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性比較過程と、
ペナルティスコア積算部が、整合性がないと判定された画素に対して所定のペナルティスコアを積算するペナルティスコア積算過程と、
積算値判定部が、前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定過程と、
デプス値修正部が、前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正過程と
を含み、
前記デプス値修正過程において、
前記ペナルティスコアマップを参照し、前記第1閾値を超えている積算値の前記画素における、当該積算値の最大値を有する画素を最大値画素として抽出し、当該最大値画素のデプス値を修正すること
を特徴とするデプスマップフィルタ処理方法。
a consistency comparison process in which a consistency determination unit compares pixel information of corresponding pixels in different depth maps and determines whether there is consistency between the pixels;
a penalty score accumulation process in which a penalty score accumulation unit accumulates a predetermined penalty score for pixels determined to be inconsistent;
The integrated value determination unit determines whether or not the integrated value of the penalty scores exceeds a predetermined first threshold after completion of determination of consistency of the pixel information between pixels in all combinations of the depth maps. a cumulative value determination process for determining and generating a penalty score map in which the penalty score for each of said pixels is indicated;
a depth value modification step in which the depth value modification unit modifies the depth value of the pixel whose integrated value exceeds the first threshold value in the penalty score map;
In the depth value correction process,
referring to the penalty score map, extracting a pixel having the maximum integrated value among the pixels with integrated values exceeding the first threshold as maximum value pixels, and correcting the depth value of the maximum value pixels; A depth map filtering method characterized by:
コンピュータを、
異なるデプスマップの各々の対応する画素の画素情報を比較し、前記画素間における整合性の有無を判定する整合性比較手段、
整合性がないと判定された画素に対してペナルティスコアを与えるペナルティスコア積算手段、
前記デプスマップの各々の全ての組合わせにおける画素間の前記画素情報の整合性の判定終了後、前記ペナルティスコアの積算値が所定の第1閾値を超えているか否かの判定を行い、前記画素の各々のペナルティスコアが示されるペナルティスコアマップを生成する積算値判定手段、
前記ペナルティスコアマップにおける前記第1閾値を超えている積算値の前記画素のデプス値を修正するデプス値修正手段
として動作させるためのプログラムであって、
前記デプス値修正手段が、
前記ペナルティスコアマップを参照し、前記第1閾値を超えている積算値の前記画素における、当該積算値の最大値を有する画素を最大値画素として抽出し、当該最大値画素のデプス値を修正すること
を特徴とするプログラム。
the computer,
Consistency comparing means for comparing pixel information of corresponding pixels in different depth maps and determining whether there is consistency between the pixels;
Penalty score accumulation means for giving a penalty score to pixels determined to be inconsistent;
After determining the consistency of the pixel information between pixels in each and all combinations of the depth maps, it is determined whether or not the integrated value of the penalty scores exceeds a predetermined first threshold. Integrated value determination means for generating a penalty score map showing each penalty score of
A program for operating as depth value correction means for correcting the depth value of the pixel whose integrated value exceeds the first threshold in the penalty score map,
The depth value correction means is
referring to the penalty score map, extracting a pixel having the maximum integrated value among the pixels with integrated values exceeding the first threshold as maximum value pixels, and correcting the depth value of the maximum value pixels; A program characterized by
JP2017217794A 2017-11-10 2017-11-10 Depth map filtering device, depth map filtering method and program Active JP7156624B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017217794A JP7156624B2 (en) 2017-11-10 2017-11-10 Depth map filtering device, depth map filtering method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017217794A JP7156624B2 (en) 2017-11-10 2017-11-10 Depth map filtering device, depth map filtering method and program

Publications (2)

Publication Number Publication Date
JP2019091122A JP2019091122A (en) 2019-06-13
JP7156624B2 true JP7156624B2 (en) 2022-10-19

Family

ID=66836324

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017217794A Active JP7156624B2 (en) 2017-11-10 2017-11-10 Depth map filtering device, depth map filtering method and program

Country Status (1)

Country Link
JP (1) JP7156624B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458797B (en) * 2019-06-18 2023-05-30 南开大学 Salient object detection method based on depth map filter
CN112446909B (en) * 2019-08-30 2022-02-01 上海商汤临港智能科技有限公司 Depth image completion method and device and computer readable storage medium
CN113496509A (en) * 2020-03-18 2021-10-12 广州极飞科技股份有限公司 Method and device for generating depth image frame, computer equipment and storage medium
CN113781424B (en) * 2021-09-03 2024-02-27 苏州凌云光工业智能技术有限公司 Surface defect detection method, device and equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
佐藤 智和,画像特徴点の数え上げに基づくマルチベースラインステレオ,情報処理学会論文誌,日本,社団法人情報処理学会,2007年,第48巻 No.SIG16(CVIM19),p.25-p.37
小甲 啓隆,自由視点画像を用いた車載カメラ画像処理アルゴリズムの評価,映像情報メディア学会技術報告 Vol.38 No.7,日本,(一社)映像情報メディア学会,2014年,Vol.38 No.7,p.141-p.146
高部 篤志,奥行情報と輝度情報の整合性を利用した屋外環境計測データからの移動物体検出,電子情報通信学会技術研究報告 Vol.115 No.456,日本,一般社団法人電子情報通信学会,2016年,Vol.115 No.456,p.103-p.108

Also Published As

Publication number Publication date
JP2019091122A (en) 2019-06-13

Similar Documents

Publication Publication Date Title
CN110717942B (en) Image processing method and device, electronic equipment and computer readable storage medium
JP7156624B2 (en) Depth map filtering device, depth map filtering method and program
US9774837B2 (en) System for performing distortion correction and calibration using pattern projection, and method using the same
JP2020010146A (en) Image processing system, image processing method, and program
CN109640066B (en) Method and device for generating high-precision dense depth image
CN110276831B (en) Method and device for constructing three-dimensional model, equipment and computer-readable storage medium
CN111080776B (en) Human body action three-dimensional data acquisition and reproduction processing method and system
JP2020004266A (en) Image processing device, image processing method, and program
CN110619660A (en) Object positioning method and device, computer readable storage medium and robot
JP2019530059A (en) Method for independently processing multiple target areas
JPWO2019107180A1 (en) Encoding device, coding method, decoding device, and decoding method
WO2012029658A1 (en) Imaging device, image-processing device, image-processing method, and image-processing program
CN112802081B (en) Depth detection method and device, electronic equipment and storage medium
CN114693760A (en) Image correction method, device and system and electronic equipment
DK3189493T3 (en) PERSPECTIVE CORRECTION OF DIGITAL PHOTOS USING DEPTH MAP
KR101943046B1 (en) Calibration Method of Projector-Camera using Auxiliary RGB-D camera
CN112204957A (en) White balance processing method and device, movable platform and camera
JP6395429B2 (en) Image processing apparatus, control method thereof, and storage medium
CN117058183A (en) Image processing method and device based on double cameras, electronic equipment and storage medium
KR102327304B1 (en) A method of improving the quality of 3D images acquired from RGB-depth camera
KR20170047780A (en) Low-cost calculation apparatus using the adaptive window mask and method therefor
JP7312026B2 (en) Image processing device, image processing method and program
KR20160024419A (en) System and Method for identifying stereo-scopic camera in Depth-Image-Based Rendering
GB2585197A (en) Method and system for obtaining depth data
CN115661258A (en) Calibration method and device, distortion correction method and device, storage medium and terminal

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171221

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201026

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220804

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220928

R150 Certificate of patent or registration of utility model

Ref document number: 7156624

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350