JP2017228152A - Depth map generation device, depth map generation method and program - Google Patents

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

Info

Publication number
JP2017228152A
JP2017228152A JP2016124820A JP2016124820A JP2017228152A JP 2017228152 A JP2017228152 A JP 2017228152A JP 2016124820 A JP2016124820 A JP 2016124820A JP 2016124820 A JP2016124820 A JP 2016124820A JP 2017228152 A JP2017228152 A JP 2017228152A
Authority
JP
Japan
Prior art keywords
viewpoint
pixel
parameter
viewpoint image
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016124820A
Other languages
Japanese (ja)
Other versions
JP6765653B2 (en
Inventor
孝文 青木
Takafumi Aoki
孝文 青木
伊藤 康一
Koichi Ito
康一 伊藤
睦基 平舘
Mutsuki Hiradate
睦基 平舘
弘樹 運天
Hiroki Unten
弘樹 運天
渡邉 隆史
Takashi Watanabe
隆史 渡邉
酒井 修二
Shuji Sakai
修二 酒井
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 Printing Co Ltd
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 Printing Co Ltd filed Critical Tohoku University NUC
Priority to JP2016124820A priority Critical patent/JP6765653B2/en
Publication of JP2017228152A publication Critical patent/JP2017228152A/en
Application granted granted Critical
Publication of JP6765653B2 publication Critical patent/JP6765653B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a depth map generation device configured to generate a parameter for generating a depth map at high speed and with high accuracy.SOLUTION: A depth map generation device comprises: an initialization part for initializing parameters of depth and normal information in each of viewpoint images at all viewpoints by generating a random number for each pixel; a space propagation processing part for propagating the parameters correspondingly to a predetermined first evaluation value between adjacent pixels in a target viewpoint image; a viewpoint propagation processing part for propagating the parameters correspondingly to a predetermined second evaluation value between pixels of the target viewpoint image and a nearby viewpoint image; and a depth map generation part for generating a depth map from the parameters of the viewpoint images. The space propagation processing part performs processing for propagating parameters from each end pixel of a pixel to which a parameter is propagated to a non-end pixel adjacent to the end pixel in parallel, and the viewpoint propagation processing part performs processing for propagating the parameter of each end pixel to a non-end pixel of the nearby viewpoint image in parallel.SELECTED DRAWING: Figure 1

Description

本発明は、デプスマップ生成装置、デプスマップ生成方法及びプログラムに関する。   The present invention relates to a depth map generation device, a depth map generation method, and a program.

多視点画像に基づく3次元復元技術は、コンピュータビジョンの研究コミュニティだけでなく、文化財のデジタルアーカイブやエンターテイメント産業など、幅広い分野で注目されている(特許文献1参照)。   3D restoration technology based on multi-viewpoint images is attracting attention not only in the computer vision research community, but also in a wide range of fields such as digital archives of cultural assets and the entertainment industry (see Patent Document 1).

特開2013−019801号公報JP 2013-019801 A

上述した多視点画像に基づく3次元復元技術は、三角測量の技術を用いており、最終的に、各視点におけるデプスマップを統合することによって、3次元座標点群を生成する。
このため、各視点における画像(視点画像)を用いて世界座標系における対象物体の3次元形状を復元する際、2つ以上の異なる視点画像間において、世界座標系における3次元座標点の座標点に対応する視点画像それぞれの対応画素を検出し、各視点からのデプスマップを生成する必要がある。
従来においては、視点P1から視点画像に対して第1直線(エピポーラ直線)を生成し、視点P1と異なる視点P1から上記第1直線と交差する第2直線を生成する。
The three-dimensional restoration technique based on the above-described multi-viewpoint image uses a triangulation technique, and finally generates a three-dimensional coordinate point group by integrating depth maps at the respective viewpoints.
For this reason, when restoring the three-dimensional shape of the target object in the world coordinate system using the images (viewpoint images) at each viewpoint, the coordinate points of the three-dimensional coordinate points in the world coordinate system between two or more different viewpoint images It is necessary to detect the corresponding pixel of each viewpoint image corresponding to, and generate a depth map from each viewpoint.
Conventionally, a first straight line (epipolar straight line) is generated from the viewpoint P1 to the viewpoint image, and a second straight line that intersects the first straight line is generated from a viewpoint P1 different from the viewpoint P1.

ここで、第1直線に対して第2直線が交差する公差座標点を順次変化させ、この交差座標点に対象物体の3次元座標点が存在すると仮定し、この公差座標点を視点P1の視点画像及び視点P2の視点画像の各々に投影させる。そして、それぞれの視点画像に投影された位置のピクセルの輝度値を用い、視点画像間における各ピクセルの輝度値の相関をとり、最も高い相関値を有した公差座標点を3次元座標点として抽出し、デプスマップの生成を行っている。   Here, it is assumed that the tolerance coordinate point at which the second straight line intersects the first straight line is sequentially changed, and it is assumed that the three-dimensional coordinate point of the target object exists at the crossed coordinate point. Projecting to each of the image and the viewpoint image of the viewpoint P2. Then, using the luminance value of the pixel at the position projected on each viewpoint image, the luminance value of each pixel between the viewpoint images is correlated, and the tolerance coordinate point having the highest correlation value is extracted as a three-dimensional coordinate point. The depth map is generated.

しかしながら、3次元座標点に対応する交差座標点を抽出するためには、ピクセル単位において公差座標点を細かい刻み幅で変化させる毎に、視点画像間の相関値を求める必要がある。このため、対象物体の復元するデプスマップを生成するためには膨大な計算が必要となり、計算コストが非常に大きくなってしまう。結果として、世界座標系における対象物体の復元に長い時間がかかることとなる。   However, in order to extract the intersection coordinate point corresponding to the three-dimensional coordinate point, it is necessary to obtain the correlation value between the viewpoint images every time the tolerance coordinate point is changed in fine increments in pixel units. For this reason, enormous calculation is required to generate the depth map for restoring the target object, and the calculation cost becomes very high. As a result, it takes a long time to restore the target object in the world coordinate system.

本発明は、このような状況に鑑みてなされたもので、3次元座標点群の復元に用いるデプスマップを生成するパラメータ(奥行き、法線の傾き)を高速にかつ高精度に生成するデプスマップ生成装置、デプスマップ生成方法及びプログラムを提供する。   The present invention has been made in view of such a situation, and a depth map that generates parameters (depth, inclination of normal line) for generating a depth map used for restoration of a three-dimensional coordinate point group at high speed and with high accuracy. A generation apparatus, a depth map generation method, and a program are provided.

上述した課題を解決するために、本発明のデプスマップ生成装置は、パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成装置であり、デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化部と、対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理部と、対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理部と、複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成部とを備え、前記空間伝搬処理部が、パラメータが伝搬されたピクセルである終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理部が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を並列して行うことを特徴とする。   In order to solve the above-described problem, the depth map generation apparatus of the present invention is a depth map generation apparatus that generates a depth map used for three-dimensional image restoration using the patch match stereo method. Between the adjacent pixels in the target viewpoint image, which is the target viewpoint image, and an initialization unit that generates and initializes parameters including depth information and normal line information for each pixel with random numbers in each viewpoint image of the viewpoint The parameter is transmitted between pixels of a spatial propagation processing unit that propagates a parameter corresponding to a predetermined first evaluation value, and a target viewpoint image and a near viewpoint image that is an image of a near viewpoint that is a viewpoint near the target viewpoint. A viewpoint propagation processing unit that propagates corresponding to a predetermined second evaluation value, and the parameters of a plurality of different viewpoint images. A depth map generation unit that generates a depth map for each image, and the spatial propagation processing unit has not completed propagation adjacent to each of the end pixels from each of the end pixels that are the pixels to which the parameter has been propagated. Processing for propagating parameters to unfinished pixels is performed in parallel, and the viewpoint propagation processing unit performs processing for propagating the parameters of each of the ending pixels to unfinished pixels of the neighboring viewpoint image in parallel. It is characterized by performing.

本発明のデプスマップ生成装置は、前記空間伝搬処理部が、パラメータの伝搬処理を所定の複数回繰り返して行い、当該空間伝搬処理部が、伝搬の処理を行う際の回数が奇数回の場合、前記対象視点画像の矩形形状における所定の頂点である第1頂点のピクセルからパラメータを伝搬させる処理を行い、伝搬の処理を行う際の回数が偶数回の場合、当該対象視点の前記第1頂点の点対称の位置にある第2頂点のピクセルからパラメータを伝搬させる処理を行うことを特徴とする。   In the depth map generation device of the present invention, the spatial propagation processing unit repeatedly performs parameter propagation processing a predetermined number of times, and when the spatial propagation processing unit performs the propagation process an odd number of times, If the parameter is propagated from the pixel of the first vertex that is a predetermined vertex in the rectangular shape of the target viewpoint image, and the number of times of performing the propagation processing is an even number, the first vertex of the target viewpoint image A process for propagating a parameter from a pixel at the second vertex at a point-symmetrical position is performed.

本発明のデプスマップ生成装置は、前記空間伝搬処理部及び前記視点伝搬処理部の各々におけるパラメータの伝搬処理が終了したピクセルに対して、当該ピクセルに伝搬されたパラメータの微調整を、乱数により発生した調整値により行うパラメータ微調整部をさらに備えることを特徴とする。   The depth map generation device according to the present invention generates a fine adjustment of a parameter transmitted to a pixel by random numbers for a pixel for which parameter propagation processing has been completed in each of the spatial propagation processing unit and the viewpoint propagation processing unit. Further, a parameter fine adjustment unit that performs the adjustment value is provided.

本発明のデプスマップ生成装置は、前記空間伝搬処理部が、前記複数の対象視点画像に対して並列にパラメータの伝搬処理を行うことを特徴とする。   The depth map generation apparatus of the present invention is characterized in that the spatial propagation processing unit performs parameter propagation processing on the plurality of target viewpoint images in parallel.

本発明のデプスマップ生成方法は、パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成方法であり、初期化部が、デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化過程と、空間伝搬処理部が、対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理過程と、視点伝搬処理部が、対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理過程と、デプスマップ生成部が、複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成過程とを含み、前記空間伝搬処理部が、パラメータが伝搬されたピクセルである終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理部が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を並列して行うことを特徴とする。   The depth map generation method of the present invention is a depth map generation method for generating a depth map used for three-dimensional image restoration using a patch match stereo method, and the initialization unit uses all viewpoints used for generation of a depth map. An initialization process for generating and initializing parameters including depth information and normal information in each image by random numbers for each pixel, and a spatial propagation processing unit between adjacent pixels in the target viewpoint image that is the target viewpoint image A spatial propagation process for propagating the parameter in correspondence with a predetermined first evaluation value, and a near-point viewpoint image in which the viewpoint propagation processing unit is an image of a near-point viewpoint that is a viewpoint near the target viewpoint image and the target viewpoint. A viewpoint propagation process for propagating the parameter between pixels corresponding to a predetermined second evaluation value, and a depth map generator, A depth map generation process for generating a depth map for each viewpoint image from the parameters of the viewpoint image, wherein the spatial propagation processing unit performs the end from each of the end pixels that are the pixels to which the parameter has been propagated. A process of propagating parameters to unfinished pixels that have not been propagated adjacent to each pixel is performed in parallel, and the viewpoint propagation processing unit sets the parameters of each of the finished pixels to the unfinished pixels of the neighboring viewpoint image. The process of propagating the end pixel is performed in parallel.

本発明のプログラムは、パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成装置の処理をコンピュータに実行させるプログラムであり、前記コンピュータに、デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化手段と、対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理手段と、対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理手段、複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成手段として動作させ、パラメータが伝搬されたピクセルである終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理手段が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を前記空間伝搬処理手段に並列に行わせるプログラムである。   The program of the present invention is a program that causes a computer to execute processing of a depth map generation device that creates a depth map used for three-dimensional image restoration using the patch match stereo method. Between the adjacent pixels in the target viewpoint image that is an image of the target viewpoint, and an initialization unit that generates and initializes a parameter including depth information and normal line information for each pixel with random numbers in each viewpoint image of the viewpoint Spatial propagation processing means for propagating a parameter corresponding to a predetermined first evaluation value, and the parameter between pixels of a target viewpoint image and a near viewpoint image that is a near viewpoint image that is a viewpoint near the target viewpoint. , Viewpoint propagation processing means for propagating corresponding to a predetermined second evaluation value, and a plurality of different viewpoint images It is operated as a depth map generating means for generating a depth map for each viewpoint image from the parameters, and from each of the end pixels that are the pixels to which the parameter has been propagated, the propagation adjacent to each of the end pixels has not been completed. Processing for propagating parameters to end pixels is performed in parallel, and the viewpoint propagation processing means performs processing for propagating the parameters of each of the end pixels to unfinished pixels of the neighboring viewpoint image. This is a program to be executed in parallel by the processing means.

以上説明したように、本発明によれば、3次元座標点群の復元に用いるデプスマップを生成するパラメータ(奥行き、法線の傾き)を高速にかつ高精度に生成することができるデプスマップ生成装置、デプスマップ生成方法及びプログラムを提供することができる。   As described above, according to the present invention, depth map generation capable of generating parameters (depth, inclination of normal line) for generating a depth map used for restoration of a three-dimensional coordinate point group at high speed and with high accuracy. An apparatus, a depth map generation method, and a program can be provided.

本発明の実施形態によるデプスマップ生成装置の構成例を示す図である。It is a figure which shows the structural example of the depth map production | generation apparatus by embodiment of this invention. 視点画像のピクセルに対応する世界座標系における3次元座標点のパラメータとして用いる乱数を発生させる範囲の設定について説明する図である。It is a figure explaining the setting of the range which generates the random number used as a parameter of the three-dimensional coordinate point in the world coordinate system corresponding to the pixel of a viewpoint image. 本実施形態における記憶部19に記憶されているパラメータテーブルの構成例を示す図である。It is a figure which shows the structural example of the parameter table memorize | stored in the memory | storage part 19 in this embodiment. 空間伝搬処理及び視点伝搬処理の各々における対象視点画像と近傍視点画像との対応を示す図である。It is a figure which shows a response | compatibility with the object viewpoint image and the vicinity viewpoint image in each of space propagation processing and viewpoint propagation processing. 空間伝搬処理における参照ピクセルと対象ピクセルとの配置関係を示す概念図である。It is a conceptual diagram which shows the arrangement | positioning relationship between the reference pixel and object pixel in a spatial propagation process. 図5における対象視線画像Vkにおける各ピクセルの空間伝搬処理のスレッドについて説明する図である。It is a figure explaining the thread | sled of the spatial propagation process of each pixel in the target visual line image Vk in FIG. デプスマップ生成装置のパラメータ伝搬処理の動作手順を表すフローチャートである。It is a flowchart showing the operation | movement procedure of the parameter propagation process of a depth map production | generation apparatus. 3次元形状の対象物を撮像した撮像装置の各々の視点の位置を示す図である。It is a figure which shows the position of each viewpoint of the imaging device which imaged the three-dimensional-shaped target object. 一例として、視点伝搬処理における近傍視点画像を2個とした場合のグラフの構成を示している。As an example, a graph configuration is shown in the case where there are two neighboring viewpoint images in the viewpoint propagation processing. パラメータの伝搬を行う近傍視点画像を2個であり、スレッド数が2個の場合におけるスレッドの開始視点画像を示す図である。It is a figure which shows the start viewpoint image of the thread | sled in case the number of the near viewpoint images which propagate a parameter is two, and the number of threads is two. パラメータの伝搬を行う近傍視点画像を2個であり、スレッド数が3個の場合におけるスレッドの開始視点画像を示す図である。It is a figure which shows the start viewpoint image of the thread | sled in case the number of the near viewpoint images which propagate a parameter is two, and the number of threads is three.

本発明の一実施形態について図面を参照して詳細に説明する。図1は、本発明の実施形態によるデプスマップ生成装置の構成例を示す図である。図1に示すデプスマップ生成装置は、制御部11、初期化部12、視点選択部13、スレッド生成部14、空間伝搬処理部15、視点伝搬処理部16、微調整部17、デプスマップ生成部18及び記憶部19の各々が備えられている。また、本実施形態においては、パッチマッチステレオ(PatchMatch Stereo)法における視点画像におけるパラメータの推定を行っている。   An embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram illustrating a configuration example of a depth map generation device according to an embodiment of the present invention. 1 includes a control unit 11, an initialization unit 12, a viewpoint selection unit 13, a thread generation unit 14, a spatial propagation processing unit 15, a viewpoint propagation processing unit 16, a fine adjustment unit 17, and a depth map generation unit. 18 and storage unit 19 are provided. Further, in the present embodiment, the parameters in the viewpoint image are estimated by the patch match stereo (PatchMatch Stereo) method.

制御部11は、デプスマップ生成装置の各部の制御、及び外部装置とのデータの送受信処理を行う。
初期化部12は、全視点により撮像された視点画像の各ピクセルに対応する世界座標系における座標点の奥行き(深度情報)及び法線ベクトル(法線情報、後述する法線の傾きθVk(m)及びφVk(m)により示されるベクトル)の各々のパラメータを乱数により初期化する。
視点選択部13は、パラメータの伝搬処理における処理対象の視点の視点画像を、対象視点画像として選択する。
スレッド生成部14は、対象視点画像Vkにおけるピクセルの行方向にパラメータの伝搬処理を行うスレッドを各行に対応して生成する。
The control unit 11 performs control of each unit of the depth map generation device and data transmission / reception processing with an external device.
The initialization unit 12 includes the depth (depth information) of the coordinate point in the world coordinate system corresponding to each pixel of the viewpoint image captured from all viewpoints, and the normal vector (normal information, normal inclination θVk (m described later). ) And a vector indicated by φVk (m)) are initialized with random numbers.
The viewpoint selection unit 13 selects a viewpoint image of a viewpoint to be processed in the parameter propagation process as a target viewpoint image.
The thread generation unit 14 generates a thread for performing parameter propagation processing in the row direction of pixels in the target viewpoint image Vk corresponding to each row.

空間伝搬処理部15は、各行に対応するスレッド毎に、行各々の対象ピクセルに対して、空間伝搬処理が終了している隣接した参照ピクセルからのパラメータ伝搬の処理を行う。
視点伝搬処理部16は、対象視点画像における空間伝搬処理が終了した対象ピクセルから、この対象ピクセルに対応する、対象視点画像の近傍の他の視点画像である近傍視点画像(対象視点に対するステレオペアとして選択された視点の画像)のピクセルに対するパラメータ伝搬の処理を行う。
微調整部17は、空間伝搬処理が終了した対象ピクセルのパラメータを、乱数により生成した調整値を用いた微調整を行う。
デプスマップ生成部18は、空間伝搬処理部15による各ピクセルに対する空間伝搬処理及び視点伝搬処理部16の視点伝搬処理の各々が終了した後、各視点画像の各々におけるデプスマップを生成する。
記憶部19は、視点画像群V={V1,V2,V3,…}に含まれる視点画像V1、視点画像V2、視点画像V3、…が記憶されており、またパラメータテーブル(後述)も記憶されている。
For each thread corresponding to each row, the spatial propagation processing unit 15 performs parameter propagation processing from the adjacent reference pixel for which spatial propagation processing has been completed for the target pixel in each row.
The viewpoint propagation processing unit 16 selects a near viewpoint image (as a stereo pair for the target viewpoint) corresponding to the target pixel, which is another viewpoint image in the vicinity of the target viewpoint image, from the target pixel for which the spatial propagation processing in the target viewpoint image has been completed. The parameter propagation process is performed for the pixel of the selected viewpoint image.
The fine adjustment unit 17 finely adjusts the parameter of the target pixel for which the spatial propagation process has been completed, using an adjustment value generated by a random number.
The depth map generation unit 18 generates a depth map in each viewpoint image after the spatial propagation processing for each pixel by the spatial propagation processing unit 15 and the viewpoint propagation processing of the viewpoint propagation processing unit 16 are completed.
The storage unit 19 stores viewpoint images V1, viewpoint images V2, viewpoint images V3, ... included in the viewpoint image group V = {V1, V2, V3, ...}, and also stores a parameter table (described later). ing.

<初期化処理>
以下、初期化部12が行う各視点画像のピクセルに対する初期化処理を説明する。この初期化処理においては、初期化部12は、対象視点画像として選択した視点画像(視点画像群Vから選択された視点画像)に対してピクセルのマッチングを行う際に用いる、対象視点画像のステレオペアとなる対象視点近傍の視点の視点画像である近傍視点画像(視点画像群Vから対象視点画像Vkの近傍の視点画像)の選択を行う。
<Initialization process>
Hereinafter, an initialization process for pixels of each viewpoint image performed by the initialization unit 12 will be described. In this initialization process, the initialization unit 12 uses the stereo of the target viewpoint image used when performing pixel matching on the viewpoint image selected as the target viewpoint image (the viewpoint image selected from the viewpoint image group V). A near viewpoint image (a viewpoint image near the target viewpoint image Vk from the viewpoint image group V) that is a viewpoint image of a viewpoint near the target viewpoint to be paired is selected.

視点画像群Vに含まれる全ての視点画像の各々を対象視点画像Vkとした際、この対象視点画像Vkとステレオペアとする近傍視点画像CVkを設定する。ここで、ステレオペアとして選択する近傍視点画像CVkを選択する際、選択される近傍視点画像CVkが対象視点画像Vkと所定の視差より離れている場合、対象視点画像Vkと近傍視点画像CVkとの視点画像間における画像変形が大きくなり、対象視点画像Vkと近傍視点画像CVkとのピクセルのマッチングの精度が低減して不安定となる。このため、対象視点画像Vkに対して視点間の基線長が短い順番に複数個の視点画像を選択し、この選択された視点画像から基線長の短い順に、例えばNpair個の近傍視点画像CVkの選択を行う。   When all of the viewpoint images included in the viewpoint image group V are set as the target viewpoint image Vk, a neighboring viewpoint image CVk that is a stereo pair with the target viewpoint image Vk is set. Here, when selecting the near viewpoint image CVk to be selected as a stereo pair, if the selected near viewpoint image CVk is separated from the target viewpoint image Vk by a predetermined parallax, the target viewpoint image Vk and the near viewpoint image CVk are Image deformation between the viewpoint images increases, and the accuracy of pixel matching between the target viewpoint image Vk and the neighboring viewpoint image CVk is reduced and becomes unstable. For this reason, a plurality of viewpoint images are selected in order from the shortest baseline length between the viewpoints with respect to the target viewpoint image Vk, and, for example, Npair of neighboring viewpoint images CVk are selected in order of the shortest baseline length from the selected viewpoint image. Make a selection.

そして、視点画像群Vに含まれる全ての視点画像において、初期化部12は、この視点画像における座標値である画像座標m=(u,v)のピクセルの各々に対応する世界座標系における3次元座標点のパラメータ、すなわち奥行きdVk(m)と、法線の傾きθVk(m)及びφVk(m)とを一様乱数を用いて初期化する。奥行きdVk(m)と、法線の傾きθVk(m)及びφVk(m)との初期値とする乱数を発生させる範囲は、視点画像の各々に合わせて自由に設定することができる。本実施形態においては、以下の説明による設定範囲により、乱数を発生させる。   Then, for all viewpoint images included in the viewpoint image group V, the initialization unit 12 sets 3 in the world coordinate system corresponding to each pixel of image coordinates m = (u, v), which is a coordinate value in the viewpoint image. The parameters of the dimensional coordinate points, that is, the depth dVk (m) and the normal gradients θVk (m) and φVk (m) are initialized using uniform random numbers. A range for generating random numbers as initial values of the depth dVk (m) and the normal gradients θVk (m) and φVk (m) can be freely set according to each viewpoint image. In the present embodiment, random numbers are generated according to the setting range described below.

図2は、視点画像のピクセルに対応する世界座標系における3次元座標点のパラメータとして用いる乱数を発生させる範囲の設定について説明する図である。図2は、対象視点画像Vkに対する近傍視点画像CVkとして、近傍視点画像C1及び近傍視点画像C2の各々が選択された場合について説明する。
図2(a)には、対象視点画像Vkと、近傍視点画像CVkである近傍視点画像C1及び近傍視点画像C2の各々との世界座標系における位置関係が示されている。対象視点画像Vkにおける画像中心Oを通る視点を視点Lとし、視点Lを近傍視点画像C1及び近傍視点画像C2の各々に対して投影(近傍視点画像C1及び近傍視点画像C2の2次元の視点座標系に座標変換)する。近傍視点画像C1に対して投影された視点Lは投影視点LC1であり、近傍視点画像C2に対して投影された視点Lは投影視点LC2である。
FIG. 2 is a diagram for explaining setting of a range for generating a random number used as a parameter of a three-dimensional coordinate point in the world coordinate system corresponding to the pixel of the viewpoint image. FIG. 2 illustrates a case where each of the vicinity viewpoint image C1 and the vicinity viewpoint image C2 is selected as the vicinity viewpoint image CVk for the target viewpoint image Vk.
FIG. 2A shows the positional relationship in the world coordinate system between the target viewpoint image Vk and each of the near viewpoint image C1 and the near viewpoint image C2 that are the near viewpoint images CVk. A viewpoint passing through the image center O in the target viewpoint image Vk is set as a viewpoint L, and the viewpoint L is projected onto each of the near viewpoint image C1 and the near viewpoint image C2 (two-dimensional viewpoint coordinates of the near viewpoint image C1 and the nearby viewpoint image C2). Coordinate conversion). The viewpoint L projected onto the near viewpoint image C1 is the projection viewpoint LC1, and the viewpoint L projected onto the near viewpoint image C2 is the projection viewpoint LC2.

図2(b)は、近傍視点画像C2に投影された投影視点LC2を示す図である。近傍視点画像C2の画像の幅(矩形上の視点画像C2における長辺C2Wの長さ)を、wとする。そして、視点画像C2の短辺C2H1に対して平行に、短辺C2H1から幅wの1/4の距離であるw/4離れた位置に線分LL1を生成する。同様に、視点画像C2の短辺C2H2に対して平行に、短辺C2H2から幅wの1/4の距離であるw/4離れた位置に線分LL2を生成する。
ここで、投影視点LC2と線分LL1との交点の座標を座標値xC2_1とし、投影視点LC2と線分LL2との交点の座標を座標値xC2_2とする。また、近傍視点画像C1にも同様の処理を行い、座標値xC1_1及び座標値xC1_2の各々を求める。
FIG. 2B is a diagram showing a projected viewpoint LC2 projected on the near viewpoint image C2. Let w be the image width of the near viewpoint image C2 (the length of the long side C2W in the rectangular viewpoint image C2). Then, a line segment LL1 is generated in parallel to the short side C2H1 of the viewpoint image C2 at a position separated from the short side C2H1 by w / 4, which is a ¼ distance of the width w. Similarly, a line segment LL2 is generated in parallel with the short side C2H2 of the viewpoint image C2 at a position separated from the short side C2H2 by w / 4, which is a distance ¼ of the width w.
Here, the coordinates of the intersection between the projection viewpoint LC2 and the line segment LL1 are set as a coordinate value xC2_1, and the coordinates of the intersection between the projection viewpoint LC2 and the line segment LL2 are set as a coordinate value xC2_2. In addition, similar processing is performed on the near viewpoint image C1, and each of the coordinate value xC1_1 and the coordinate value xC1_2 is obtained.

次に、座標値座標値xC2_1、座標値xC2_2、座標値xC1_1及び座標値xC1_2の各々を、世界座標系における視点Lに対して投影する。そして、対象視点画像Vkの中心座標である画像中心Oと、近傍視点画像C1上の座標値xC1_1及び座標値xC1_2の各々とが対応しているとして、すなわち座標値xC1_1及び座標値xC1_2のピクセルの各々が視点L上の3次元座標点に対応するとして、3次元座標点ZC1_1、3次元座標点ZC_2それぞれを生成する。同様に、対象視点画像Vkの中心座標である画像中心Oと、近傍視点画像C2上の座標値xC2_1及び座標値xC2_2の各々とが対応しているとして、すなわち座標値xC2_1及び座標値xC2_2のピクセルの各々が視点L上の3次元座標点に対応するとして、3次元座標点ZC2_1、3次元座標点ZC2_2それぞれを生成する。   Next, each of the coordinate value coordinate value xC2_1, the coordinate value xC2_2, the coordinate value xC1_1, and the coordinate value xC1_2 is projected onto the viewpoint L in the world coordinate system. Then, it is assumed that the image center O, which is the center coordinate of the target viewpoint image Vk, corresponds to each of the coordinate value xC1_1 and the coordinate value xC1_2 on the near viewpoint image C1, that is, the pixel value of the coordinate value xC1_1 and the coordinate value xC1_2. Assuming that each corresponds to a three-dimensional coordinate point on the viewpoint L, a three-dimensional coordinate point ZC1_1 and a three-dimensional coordinate point ZC_2 are generated. Similarly, it is assumed that the image center O, which is the center coordinate of the target viewpoint image Vk, corresponds to the coordinate value xC2_1 and the coordinate value xC2_2 on the near viewpoint image C2, that is, the pixel of the coordinate value xC2_1 and the coordinate value xC2_2. , Corresponding to a three-dimensional coordinate point on the viewpoint L, a three-dimensional coordinate point ZC2_1 and a three-dimensional coordinate point ZC2_2 are generated.

次に、視点Lに投影された3次元座標点ZC1_1及び3次元座標点ZC1_2において、座標中心Oから近い距離の3次元座標点ZC1_2を最小位置選択群に分類し、座標中心Oから遠い3次元座標点ZC1_1を最大位置選択群に分類する。同様に、視点Lに投影された3次元座標点ZC2_1及び3次元座標点ZC2_2において、座標中心Oから近い距離の3次元座標点ZC2_1を最小位置選択群に分類し、座標中心Oから遠い3次元座標点ZC2_2を最大位置選択群に分類する。例えば、近傍視点画像が3個以上であっても、上記と同様の処理を行い、視点Lに投影された3次元座標点ZCn_1及び3次元座標点ZCn_2の各々を、最小位置選択群、最大位置選択群それぞれに分類して振り分ける。   Next, at the three-dimensional coordinate point ZC1_1 and the three-dimensional coordinate point ZC1_2 projected onto the viewpoint L, the three-dimensional coordinate point ZC1_2 that is close to the coordinate center O is classified into the minimum position selection group, and the three-dimensional coordinate that is far from the coordinate center O is displayed. The coordinate point ZC1_1 is classified into the maximum position selection group. Similarly, in the three-dimensional coordinate point ZC2_1 and the three-dimensional coordinate point ZC2_2 projected onto the viewpoint L, the three-dimensional coordinate point ZC2_1 that is close to the coordinate center O is classified into the minimum position selection group, and the three-dimensional that is far from the coordinate center O. The coordinate point ZC2_2 is classified into the maximum position selection group. For example, even when there are three or more neighboring viewpoint images, the same processing as described above is performed, and each of the three-dimensional coordinate point ZCn_1 and the three-dimensional coordinate point ZCn_2 projected onto the viewpoint L is changed to the minimum position selection group, the maximum position. Sort and sort each selection group.

そして、初期化部12は、最小位置選択群のなかで、世界座標系において画像中心Oから最も遠い視点L上の3次元座標点の座標点を選択する。図2(a)においては、近傍視点画像C1の3次元座標点ZC2_1が最小値の3次元座標点Zminとして選択される。
同様に、初期化部12は、最大位置選択群のなかで、世界座標系において画像中心Oから最も近い視点L上の3次元座標点の座標点を選択する。図2(a)においては、近傍視点画像C2の3次元座標点ZC1_1が最大値の3次元座標点Zmaxとして選択される。
これにより、乱数で求められる画像中心Oからの奥行きが、3次元座標点ZC2_1及び3次元座標点ZC1_1で設定される線分の範囲内に乱数により設定される。すなわち、初期化部12は、3次元座標点ZC1_1を基準値として、乱数により0からΔdの範囲内の数値を求め、基準値に対して乱数により求めた数値を加算することにより、対象視点画像Vkにおける奥行きdVk(m)を求める。以下に、乱数により奥行きdVk(dVk(m))の範囲を表す式(1)を示す。
Then, the initialization unit 12 selects a coordinate point of a three-dimensional coordinate point on the viewpoint L farthest from the image center O in the world coordinate system in the minimum position selection group. In FIG. 2A, the three-dimensional coordinate point ZC2_1 of the near viewpoint image C1 is selected as the minimum three-dimensional coordinate point Zmin.
Similarly, the initialization unit 12 selects a coordinate point of a three-dimensional coordinate point on the viewpoint L closest to the image center O in the world coordinate system in the maximum position selection group. In FIG. 2A, the three-dimensional coordinate point ZC1_1 of the near viewpoint image C2 is selected as the maximum three-dimensional coordinate point Zmax.
Thereby, the depth from the image center O calculated | required with a random number is set with a random number within the range of the line segment set by the three-dimensional coordinate point ZC2_1 and the three-dimensional coordinate point ZC1_1. That is, the initialization unit 12 uses the three-dimensional coordinate point ZC1_1 as a reference value, obtains a numerical value within a range from 0 to Δd by a random number, and adds the numerical value obtained by the random number to the reference value, thereby obtaining the target viewpoint image. Depth dVk (m) at Vk is obtained. In the following, Expression (1) representing the range of the depth dVk (dVk (m)) by a random number is shown.

Figure 2017228152
Figure 2017228152

(1)式において、奥行きdVk(dVk(m))が、世界座標系における視点L上の3次元座標点Zmin(最小値の3次元座標点)と3次元座標点Zmax(最大値の3次元座標点)との間に存在することを示している。すなわち、初期化部12は、乱数によりΔdを求めて、対象視点画像Vkにおける奥行きdVk(dVk(m))を(1)式の3次元座標点の座標値の範囲内で求める。   In the equation (1), the depth dVk (dVk (m)) is determined by the three-dimensional coordinate point Zmin (minimum three-dimensional coordinate point) on the viewpoint L in the world coordinate system and the three-dimensional coordinate point Zmax (maximum three-dimensional coordinate). It is shown that it exists between the coordinate point). That is, the initialization unit 12 obtains Δd using a random number, and obtains the depth dVk (dVk (m)) in the target viewpoint image Vk within the range of the coordinate value of the three-dimensional coordinate point of the equation (1).

Figure 2017228152
Figure 2017228152

(2)式は、画像中心Oから見て、奥行きdVkの最小値を示す式である。すなわち、対象視点画像Vkを除いた視点画像の集合Vに属する近傍視点画像CnのZCnmin(最小位置選択群)の中で、画像中心Oから最大の距離を有するZCnminを、Zminとすることを示している。   The expression (2) is an expression indicating the minimum value of the depth dVk when viewed from the image center O. That is, ZCNmin having the maximum distance from the image center O in ZCNmin (minimum position selection group) of the neighboring viewpoint images Cn belonging to the set V of viewpoint images excluding the target viewpoint image Vk is represented as Zmin. ing.

Figure 2017228152
Figure 2017228152

(3)式は、画像中心Oから見て、(1)式における奥行きdVkの最大値を示す式である。すなわち、対象視点画像Vkの近傍視点画像CVkの集合に属する近隣画像CnのZCnmax(最大位置選択群)の中で、画像中心Oから最小の距離を有するZCnmaxを、最大値Zmaxとすることを示している。   The expression (3) is an expression indicating the maximum value of the depth dVk in the expression (1) when viewed from the image center O. That is, ZCnmax having the smallest distance from the image center O among ZCnmax (maximum position selection group) of the neighboring images Cn belonging to the set of neighboring viewpoint images CVk of the target viewpoint image Vk is set as the maximum value Zmax. ing.

図1に戻り、初期化部12は、例えば本実施形態において、法線の傾きθVk(m)及び法線の傾きφVk(m)の乱数による生成範囲を±60度としている。また、本実施形態において、法線の傾きθVk(m)は法線がz軸と成す角度を示し、法線の傾きφVk(m)が法線をx軸y軸により形成される2次元平面に投影し、投影された法線がx軸と成す角度を示している。   Returning to FIG. 1, for example, in the present embodiment, the initialization unit 12 sets the generation range of random numbers of the normal slope θVk (m) and the normal slope φVk (m) to ± 60 degrees. In the present embodiment, the normal inclination θVk (m) indicates an angle formed by the normal and the z-axis, and the normal inclination φVk (m) is a two-dimensional plane formed by the normal and the x-axis y-axis. The angle formed by the projected normal and the x axis is shown.

初期化部12は、視点画像から対象視点画像Vkを選択した際、この対象視点画像Vkに対する近傍視点画像CVkを決定し、(1)式に示される奥行きdVk(m)の乱数発生範囲を、対象視点画像Vk毎に求める。
そして、初期化部12は、対象視点画像Vkにおける各ピクセル(ピクセルm)のパラメータにおける奥行きdVk(m)を、上述したように対象視点画像Vkに対応した(1)式に示される範囲において乱数(Δd)を所定の刻み幅で発生させて求める。また、初期化部12は、奥行きdVk(m)を求めた際、求めたピクセルmの法線の傾きθVk(m)及び法線の傾きφVk(m)の各々も、上述したように±60度の範囲において乱数により求める。
初期化部12は、対象視点画像Vkとして選択した視点画像毎に、乱数により求めたピクセルのパラメータを、記憶部19のパラメータテーブルに書き込んで記憶させる。
When selecting the target viewpoint image Vk from the viewpoint images, the initialization unit 12 determines a near viewpoint image CVk for the target viewpoint image Vk, and sets the random number generation range of the depth dVk (m) expressed by the equation (1) as follows: Obtained for each target viewpoint image Vk.
Then, the initialization unit 12 sets the depth dVk (m) in the parameter of each pixel (pixel m) in the target viewpoint image Vk to a random number in the range indicated by the expression (1) corresponding to the target viewpoint image Vk as described above. (Δd) is determined at a predetermined step size. Further, when the initialization unit 12 obtains the depth dVk (m), each of the obtained normal gradient θVk (m) and normal gradient φVk (m) of the pixel m is ± 60 as described above. Obtained by random numbers in the range of degrees.
For each viewpoint image selected as the target viewpoint image Vk, the initialization unit 12 writes and stores the pixel parameters obtained by random numbers in the parameter table of the storage unit 19.

図3は、本実施形態における記憶部19に記憶されているパラメータテーブルの構成例を示す図である。パラメータテーブルは、視点画像毎に設けられており、例えば視点画像を識別する視点画像識別番号(V1、V2など)が付与されている。
図3において、パラメータテーブルは、画素座標と、パラメータと、処理終了フラグと、処理完了フラグとの各々の欄が設けられている。ここで、画素座標は、視点画像におけるピクセルmの座標値を示している。パラメータは、画素座標に対応したピクセルmの奥行きvVk(m)、法線の傾きθVk(m)及び法線の傾きφVk(m)の各々の数値を示している。処理終了フラグは、後述する空間伝搬処理が終了したピクセルを識別するものであり、空間伝搬処理毎に設定されるフラグである。処理完了フラグは、後述するパラメータを評価する評価値が所定の閾値を超えた場合、その後の伝搬処理を行う必要がないピクセルであることを識別するフラグである。
FIG. 3 is a diagram illustrating a configuration example of a parameter table stored in the storage unit 19 in the present embodiment. The parameter table is provided for each viewpoint image. For example, viewpoint image identification numbers (V1, V2, etc.) for identifying the viewpoint image are given.
In FIG. 3, the parameter table includes columns for pixel coordinates, parameters, a process end flag, and a process completion flag. Here, the pixel coordinate indicates the coordinate value of the pixel m in the viewpoint image. The parameters indicate numerical values of the depth vVk (m), the normal gradient θVk (m), and the normal gradient φVk (m) of the pixel m corresponding to the pixel coordinates. The process end flag identifies a pixel for which a spatial propagation process, which will be described later, has been completed, and is a flag that is set for each spatial propagation process. The processing completion flag is a flag for identifying a pixel that does not need to be subjected to subsequent propagation processing when an evaluation value for evaluating a parameter described later exceeds a predetermined threshold.

<空間伝搬処理>
この空間伝搬処理は、パッチマッチステレオ法におけるSpatial propagationの処理である。
視点選択部13は、全ての視点画像のなかから、空間伝搬処理の処理対象とする未処理の視点画像を、対象視点画像Vkとして選択する。
スレッド生成部14は、視点選択部13が選択した対象視点画像Vkにおいて、対象視点画像Vkとして選択された視点画像のパラメータの伝搬処理を行うスレッドを生成する(スレッドの生成については後に詳述)。
空間伝搬処理部15は、対象ピクセルのピクセルmに対し、同一の対象視点画像Vkにおけるこのピクセルmと隣接する、空間伝搬処理の終了したピクセルのパラメータを伝搬させる処理を行う。
<Spatial propagation processing>
This spatial propagation process is a process of spatial propagation in the patch match stereo method.
The viewpoint selection unit 13 selects an unprocessed viewpoint image as a processing target of the spatial propagation process from all viewpoint images as the target viewpoint image Vk.
The thread generation unit 14 generates a thread for performing propagation processing of parameters of the viewpoint image selected as the target viewpoint image Vk in the target viewpoint image Vk selected by the viewpoint selection unit 13 (details of thread generation will be described later). .
The spatial propagation processing unit 15 performs processing for propagating the parameter of the pixel of the target pixel adjacent to the pixel m in the same target viewpoint image Vk and having undergone the spatial propagation processing.

空間伝搬処理は、同一の視点画像内の隣接するピクセルが同一の物体における同様の状態の表面が撮像されている場合が多いため、隣接するピクセル間においてパラメータの変化がほとんど見られないことを基本としている。すなわち、空間伝搬処理は、隣接するピクセル間において、上述したパラメータの連続性の仮定を基に、近傍のピクセルから隣接するピクセルに対してパラメータを伝搬している。
対象視点画像Vkにおけるピクセルm=(u,v)が近傍のピクセルpと同一のパラメータを保つ場合の第1マッチングスコア(第1評価値)を算出する。この第1マッチングスコアは、ピクセルmの輝度値と、パラメータに基づいてピクセルmを世界座標系に座標変換して3次元座標点を生成し、この生成した3次元座標点を視点画像Vkに対して座標変換した際の輝度値とを比較した評価値であり、評価値が大きいほど真のパラメータに近いことを示している。
Spatial propagation processing is based on the fact that, in many cases, adjacent pixels in the same viewpoint image are imaged on the surface of the same state in the same object, so that there is almost no change in parameters between adjacent pixels. It is said. That is, in the spatial propagation processing, parameters are propagated from neighboring pixels to neighboring pixels based on the above-described assumption of parameter continuity between neighboring pixels.
A first matching score (first evaluation value) is calculated when the pixel m = (u, v) in the target viewpoint image Vk maintains the same parameters as the neighboring pixel p. The first matching score is obtained by generating a three-dimensional coordinate point by converting the pixel m into the world coordinate system based on the luminance value of the pixel m and the parameter, and generating the generated three-dimensional coordinate point with respect to the viewpoint image Vk. The evaluation value is compared with the luminance value when coordinate conversion is performed, and the larger the evaluation value, the closer to the true parameter.

図4は、空間伝搬処理及び視点伝搬処理の各々における対象視点画像と近傍視点画像との対応を示す図である。図4において、空間伝搬処理により、対象視点画像Vxにおけるピクセルmに対し、このピクセルmに隣接するピクセルpのパラメータが伝搬される。
ピクセルpに対応する世界座標系の3次元座標点Mとこの3次元座標点Mに隣接する3次元座標点200との各々は、世界座標系における座標点が近く、凹凸などの大きな変化がなく同様のテクスチャを有すると考えられる。
FIG. 4 is a diagram illustrating the correspondence between the target viewpoint image and the near viewpoint image in each of the spatial propagation process and the viewpoint propagation process. In FIG. 4, the parameter of the pixel p adjacent to the pixel m is propagated to the pixel m in the target viewpoint image Vx by the spatial propagation process.
Each of the three-dimensional coordinate point M in the world coordinate system corresponding to the pixel p and the three-dimensional coordinate point 200 adjacent to the three-dimensional coordinate point M is close to the coordinate point in the world coordinate system, and there is no significant change such as unevenness. It is considered to have a similar texture.

空間伝搬処理部15は、対象ピクセルとして選択されたピクセルmのパラメータと、ピクセルmにパラメータを伝搬するピクセルpのパラメータとの各々を、記憶部19のパラメータテーブルから読み出す。
例えば、対象視点画像Vkにおけるピクセルmのパラメータを、pVk(m)=(dVk(m),θVk(m)、φVk(m))とする。また、隣接する参照ピクセルのピクセルp=(u+δ,v)のパラメータを、pVk(u+δ,v)とする。空間伝搬処理部15は、このピクセルmのパラメータを用いた第1マッチングスコアを、Score(pVk(u,v),m)として計算する。
The spatial propagation processing unit 15 reads out from the parameter table of the storage unit 19 each of the parameter of the pixel m selected as the target pixel and the parameter of the pixel p that propagates the parameter to the pixel m.
For example, the parameter of the pixel m in the target viewpoint image Vk is pVk (m) = (dVk (m), θVk (m), φVk (m)). Further, the parameter of the pixel p = (u + δ, v) of the adjacent reference pixel is pVk (u + δ, v). The spatial propagation processing unit 15 calculates the first matching score using the parameter of the pixel m as Score (pVk (u, v), m).

空間伝搬処理部15は、上記関数Score(*,m)は、第1マッチングスコアを算出する関数であり、*がpVk(u,v)の場合、ピクセルmのパラメータpVk(m)のパラメータにより第1マッチングスコアを算出し、*が隣接する参照ピクセルのピクセルpのパラメータpVk(u+δ,v)により第1マッチングを算出する。
そして、空間伝搬処理部15は、*がpVk(u,v)の場合で求めた第1マッチングスコアScore(pVk(u,v)),m)と、*が隣接する参照ピクセルのピクセルpのパラメータpVk(u+δ,v)の場合の各々で求めた第1マッチングスコアScore(pVk(u+δ,v),m)との比較を行う。
In the spatial propagation processing unit 15, the function Score (*, m) is a function for calculating the first matching score. When * is pVk (u, v), the parameter pVk (m) of the pixel m is used as the parameter. The first matching score is calculated, and the first matching is calculated by the parameter pVk (u + δ, v) of the pixel p of the reference pixel adjacent to *.
The spatial propagation processing unit 15 then calculates the first matching score Score (pVk (u, v)), m) obtained when * is pVk (u, v) and * of the pixel p of the adjacent reference pixel. Comparison is made with the first matching score Score (pVk (u + δ, v), m) obtained for each of the parameters pVk (u + δ, v).

そして、空間伝搬処理部15は、
Score(pVk(u+δ,v),m)>Score(pVk(u,v)),m)
の場合、隣接する参照ピクセルであるピクセルpのパラメータに、ピクセルmのパラメータを変更する。すなわち、空間伝搬処理部15は、参照ピクセルのパラメータを対象ピクセルのパラメータとして伝搬させる。
一方、空間伝搬処理部15は、
Score(pVk(u+δ,v),m)≦Score(pVk(u,v)),m)
の場合、隣接する参照ピクセルであるピクセルpのパラメータに、ピクセルmのパラメータを変更せず、ピクセルmのパラメータのままとする。すなわち、空間伝搬処理部15は、参照ピクセルのパラメータを対象ピクセルのパラメータとして伝搬させない。
The spatial propagation processing unit 15
Score (pVk (u + δ, v), m)> Score (pVk (u, v)), m)
In the case of, the parameter of the pixel m is changed to the parameter of the pixel p which is an adjacent reference pixel. That is, the spatial propagation processing unit 15 propagates the parameter of the reference pixel as the parameter of the target pixel.
On the other hand, the spatial propagation processing unit 15
Score (pVk (u + δ, v), m) ≦ Score (pVk (u, v)), m)
In the case of, the parameter of the pixel m is not changed to the parameter of the pixel p which is the adjacent reference pixel, and the parameter of the pixel m is left as it is. That is, the spatial propagation processing unit 15 does not propagate the parameter of the reference pixel as the parameter of the target pixel.

また、参照ピクセルであるピクセルp=(u,v+δ)である場合も、空間伝搬処理部15は、第1マッチングスコアScore(pVk(u,v+δ),m)を求め、第1マッチングスコアScore(pVk(u,v)),m)との比較を行う。そして、空間伝搬処理部15は、すでに説明したように、参照ピクセルのパラメータを対象ピクセルのパラメータとして伝搬させるか否かの判定を、第1マッチングスコアの比較によって行う。   In addition, even when the pixel p = (u, v + δ) which is the reference pixel, the spatial propagation processing unit 15 obtains the first matching score Score (pVk (u, v + δ), m) and obtains the first matching score Score ( Comparison with pVk (u, v)), m). Then, as described above, the spatial propagation processing unit 15 determines whether or not to propagate the parameter of the reference pixel as the parameter of the target pixel by comparing the first matching score.

上述した空間伝搬処理を、対象視点画像Vkのピクセルの集合Ωにおける全てのピクセルに対して行う。そして、空間伝搬処理部15は、記憶部19のパラメータテーブルにおけるパラメータの空間伝搬処理が終了したピクセル(終了ピクセル)の処理終了フラグを立てる。例えば、この処理終了フラグは、空間伝搬処理が終了していないピクセル(未終了ピクセル)の場合「0」であり、空間伝搬処理が終了したピクセルの場合「1」に設定されている。また、空間伝搬処理部15は、所定の完了閾値を設け、ピクセルmのパラメータのマッチングスコアが完了閾値を超えた場合、記憶部19におけるパラメータテーブルの対応するピクセルの完了フラグを「0」から「1」に変更する。空間伝搬処理部15は、ピクセルmのパラメータを変更する際、記憶部19におけるパラメータテーブルを参照し、完了フラグが「1」のピクセルmに対しては伝搬処理を行わない。
上述した空間伝搬処理は、各視点画像毎に複数回ずつ行われる。
The spatial propagation process described above is performed for all the pixels in the pixel set Ω of the target viewpoint image Vk. Then, the spatial propagation processing unit 15 sets a processing end flag for the pixel (end pixel) for which the spatial propagation processing of the parameter in the parameter table of the storage unit 19 has been completed. For example, this processing end flag is set to “0” for a pixel for which spatial propagation processing has not been completed (unfinished pixel), and is set to “1” for a pixel for which spatial propagation processing has been completed. In addition, the spatial propagation processing unit 15 provides a predetermined completion threshold value, and when the parameter matching score of the pixel m exceeds the completion threshold value, the completion flag of the corresponding pixel in the parameter table in the storage unit 19 is changed from “0” to “ Change to 1 ”. When changing the parameter of the pixel m, the spatial propagation processing unit 15 refers to the parameter table in the storage unit 19 and does not perform the propagation process on the pixel m whose completion flag is “1”.
The spatial propagation process described above is performed a plurality of times for each viewpoint image.

図5は、空間伝搬処理における参照ピクセルと対象ピクセルとの配置関係を示す概念図である。図5においては、対象視点画像Vkにおける参照ピクセルのピクセルpと対象ピクセルのピクセルmとの配置関係が示されている。
ピクセルmがピクセルbの場合、ピクセルpはピクセルaとなる。ピクセルbが画素座標(u,v)の場合、ピクセルaが画素座標(u−1,v)となる。
また、ピクセルmがピクセルcの場合も、ピクセルpはピクセルaとなる。ピクセルcが画素座標(u,v)の場合、ピクセルaが画素座標(u,v−1)となる。
一方、ピクセルmがピクセルyの場合、ピクセルpはピクセルzとなる。ピクセルyが画素座標(u,v)の場合、ピクセルaが画素座標(u+1,v)となる。
また、ピクセルmがピクセルxの場合も、ピクセルpはピクセルzとなる。ピクセルxが画素座標(u,v)の場合、ピクセルzが画素座標(u,v+1)となる。
すなわち、ピクセルaから空間伝搬処理を開始した場合、pVk(u+δ,v)及びpVk(u,v+δ)におけるδは「−1」であり、ピクセルzから空間伝搬処理を開始した場合、pVk(u+δ,v)及びpVk(u,v+δ)におけるδは「+1」である。
FIG. 5 is a conceptual diagram showing an arrangement relationship between the reference pixel and the target pixel in the spatial propagation process. FIG. 5 shows an arrangement relationship between the pixel p of the reference pixel and the pixel m of the target pixel in the target viewpoint image Vk.
When the pixel m is the pixel b, the pixel p is the pixel a. When the pixel b is the pixel coordinate (u, v), the pixel a is the pixel coordinate (u-1, v).
Also, when the pixel m is the pixel c, the pixel p becomes the pixel a. When the pixel c is the pixel coordinate (u, v), the pixel a is the pixel coordinate (u, v−1).
On the other hand, when the pixel m is the pixel y, the pixel p is the pixel z. When the pixel y is the pixel coordinate (u, v), the pixel a is the pixel coordinate (u + 1, v).
In addition, when the pixel m is the pixel x, the pixel p is the pixel z. When the pixel x is the pixel coordinate (u, v), the pixel z is the pixel coordinate (u, v + 1).
That is, when the spatial propagation process is started from the pixel a, δ in pVk (u + δ, v) and pVk (u, v + δ) is “−1”, and when the spatial propagation process is started from the pixel z, pVk (u + δ , V) and pVk (u, v + δ) are “+1”.

上述したように、空間伝搬処理は、Bleyerの論文(M. Bleyer, C. Rhemann, and C. Rother, “PatchMatch Stereo - Stereo matchingwith slanted support windows,” Proc. British Machine Vision Conf., Vol. 11,pp. 1-11, 2011.)におけるパッチマッチステレオの空間伝搬処理と同様に、複数回の繰り返しにおいて、奇数回目に左上頂点のピクセルaから開始し、偶数回目に右下頂点のピクセルzから開始する。すなわち、奇数回目には矩形上に配列したピクセルの集合において、所定の頂点のピクセルから、この所定の頂点に点対称の頂点のピクセルに向かって、パラメータの空間伝搬処理が行われる。
また、対象視点画像において、奇数回目に右下頂点のピクセルzから開始し、偶数回目に左上頂点のピクセルaから開始するように構成しても良い。
また、右下頂点のピクセルと左上頂点のピクセルとでなく、対象視点画像の右上頂点のピクセルと左下頂点のピクセルとの各々を、偶数回目、奇数回目それぞれの開始するピクセルとして構成しても良い。
As described above, spatial propagation processing is performed by Breyer's paper (M. Bleyer, C. Rhemann, and C. Rother, “PatchMatch Stereo-Stereo matching with slanted support windows,” Proc. British Machine Vision Conf., Vol. 11, pp. 1-11, 2011.) Similar to the patch match stereo spatial propagation processing in the multiple iterations, it starts from the pixel a of the upper left vertex at the odd number of times and starts from the pixel z of the lower right vertex at the even number of times. To do. That is, in an odd number of times, in a set of pixels arranged on a rectangle, a parameter spatial propagation process is performed from a pixel at a predetermined vertex toward a pixel at a vertex symmetrical to the predetermined vertex.
Further, in the target viewpoint image, it may be configured to start from the pixel z of the lower right vertex at odd times and to start from the pixel a of the upper left vertex at even times.
Further, instead of the pixel at the lower right vertex and the pixel at the upper left vertex, each of the pixel at the upper right vertex and the pixel at the lower left vertex of the target viewpoint image may be configured as an even-numbered pixel and an odd-numbered pixel, respectively. .

一方、偶数回目には矩形上に配列したピクセルの集合において、上記所定の頂点に点対称の頂点のピクセルから、この所定の頂点のピクセルに向かって、パラメータの空間伝搬処理が行われる。これにより、一方向からの空間伝搬処理では、不十分であったパラメータの伝搬が、双方向から行うことにより全てのピクセルに対して行える。例えば、一方向のみでは、空間伝搬処理を開始する頂点のピクセルにはパラメータが伝搬されない。また、一方向のみでは、途中のピクセルで真のパラメータが乱数により得られたとしても、そのピクセルより前に伝搬処理が行われるピクセルに対しては真のパラメータが伝搬されない。   On the other hand, in an even number of times, in a set of pixels arranged on a rectangle, a parameter spatial propagation process is performed from a vertex-symmetric pixel to the predetermined vertex toward the predetermined vertex. As a result, parameter propagation, which was insufficient in the spatial propagation processing from one direction, can be performed for all pixels by performing bidirectional transmission. For example, in only one direction, the parameter is not propagated to the vertex pixel at which the spatial propagation process is started. Further, in only one direction, even if a true parameter is obtained by a random number at a halfway pixel, the true parameter is not propagated to a pixel for which propagation processing is performed before that pixel.

<視点伝搬処理>
この視点伝搬処理は、パッチマッチステレオ法におけるView propagationの処理である。
この視点伝搬処理は、多くの視点画像間においてデプスマップの整合性が取れるとの仮定に基づいて、視点画像Vkのピクセルmのパラメータを、すでに近傍視点の画像として選択された近傍視点画像CVkのピクセルに対して伝搬させる処理である。
視点伝搬処理部16は、対象視点画像Vkのピクセルmと対応する、近傍視点画像CVkにおけるピクセルを求める。
<Viewpoint propagation processing>
This viewpoint propagation process is a view propagation process in the patch match stereo method.
This viewpoint propagation processing is based on the assumption that the depth map is consistent among many viewpoint images, and the parameters of the pixel m of the viewpoint image Vk are set to the neighboring viewpoint image CVk that has already been selected as the neighboring viewpoint image. This is a process for propagating to a pixel.
The viewpoint propagation processing unit 16 obtains a pixel in the near viewpoint image CVk corresponding to the pixel m of the target viewpoint image Vk.

視点伝搬処理部16は、ピクセルmのパラメータにおける奥行きdVk(m)を基に、対象視点画像Vkのピクセルmの座標に対して撮像視点画像Vkの変換行列により座標変換を行い、対象視点画像Vkの視点のカメラ座標系(3次元)における3次元座標点Mを復元する。そして、視点伝搬処理部16は、この復元した3次元座標点Mを座標変換により近傍視点画像CVkの視点のカメラ座標系(3次元)の3次元座標点M’を求める。
以下に、3次元座標点M’の座標値を求める(4)式を示す。また、視点伝搬処理部16は、(4)式により、 3次元座標点M’の座標値を求める。
The viewpoint propagation processing unit 16 performs coordinate conversion on the coordinates of the pixel m of the target viewpoint image Vk based on the depth dVk (m) in the parameter of the pixel m, using the conversion matrix of the captured viewpoint image Vk, and the target viewpoint image Vk. The three-dimensional coordinate point M in the camera coordinate system (three-dimensional) of the viewpoint is restored. Then, the viewpoint propagation processing unit 16 obtains a three-dimensional coordinate point M ′ in the camera coordinate system (three-dimensional) of the viewpoint of the near viewpoint image CVk by performing coordinate transformation on the restored three-dimensional coordinate point M.
The following formula (4) for obtaining the coordinate value of the three-dimensional coordinate point M ′ is shown below. In addition, the viewpoint propagation processing unit 16 obtains the coordinate value of the three-dimensional coordinate point M ′ by the equation (4).

Figure 2017228152
Figure 2017228152

(4)式において、Mx’、My’及びMz’の各々は、近傍視点画像CVkの視点におけるカメラ座標系における3次元座標点のx座標値、y座標値、z座標値それぞれを示している。また[*]は転置行列を示している。m〜(mの上部に〜)は、mの斉次座標を示す。Rcは、近傍視点画像CVkの視点のカメラ座標系における回転行列である。RVk−1は、対象視点画像Vkの視点における回転行列の逆行列である。tVkは、対象視点画像Vkの視点のカメラ座標系における並進ベクトルである。tcは、近傍視点画像CVkの視点のカメラ座標系における並進ベクトルである。AVk−1は、対象視点画像Vkの視点のカメラ座標系におけるカメラパラメータの逆行列である。 In the equation (4), Mx ′, My ′, and Mz ′ indicate the x-coordinate value, y-coordinate value, and z-coordinate value of the three-dimensional coordinate point in the camera coordinate system at the viewpoint of the near viewpoint image CVk, respectively. . [*] T indicates a transposed matrix. m˜ (on the top of m˜) represents the homogeneous coordinates of m. Rc is a rotation matrix in the camera coordinate system of the viewpoint of the near viewpoint image CVk. RVk −1 is an inverse matrix of the rotation matrix at the viewpoint of the target viewpoint image Vk. tVk is a translation vector in the camera coordinate system of the viewpoint of the target viewpoint image Vk. tc is a translation vector in the camera coordinate system of the viewpoint of the near viewpoint image CVk. AVk −1 is an inverse matrix of camera parameters in the camera coordinate system of the viewpoint of the target viewpoint image Vk.

そして、視点伝搬処理部16は、以下の(5)式を用いて、上記3次元座標点M’を近傍視点画像Cvkに投影したピクセルm’の座標点を求める。   Then, the viewpoint propagation processing unit 16 obtains the coordinate point of the pixel m ′ obtained by projecting the three-dimensional coordinate point M ′ onto the neighboring viewpoint image Cvk using the following equation (5).

Figure 2017228152
Figure 2017228152

(5)式において、Acは、近傍視点画像CVkの視点のカメラ座標系におけるカメラパラメータの行列である。sは、0でない実数である。
視点伝搬処理部16は、(5)式を用いることにより、近傍視点画像CVk上における、近傍視点画像CVkの視点のカメラ座標系における3次元座標点M’の対応点であるピクセルm’の座標点を求める。
そして、視点伝搬処理部16は、対象視点画像Vkの視点のカメラ座標系に対応したピクセルmのパラメータの法線ベクトルを、近傍視点画像CVkの視点のカメラ座標系に対応するパラメータの法線ベクトルに、以下の(6)式を用いて変換する。
In Expression (5), Ac is a matrix of camera parameters in the camera coordinate system of the viewpoint of the near viewpoint image CVk. s is a non-zero real number.
The viewpoint propagation processing unit 16 uses the equation (5) to determine the coordinates of the pixel m ′ that is the corresponding point of the three-dimensional coordinate point M ′ in the camera coordinate system of the viewpoint of the neighboring viewpoint image CVk on the neighboring viewpoint image CVk. Find a point.
Then, the viewpoint propagation processing unit 16 uses the parameter normal vector of the pixel m corresponding to the camera coordinate system of the viewpoint of the target viewpoint image Vk, and the parameter normal vector of the parameter corresponding to the camera coordinate system of the viewpoint of the neighboring viewpoint image CVk. Is converted using the following equation (6).

Figure 2017228152
Figure 2017228152

(6)式において、n’は、近傍視点画像CVkの視点のカメラ座標系に対応したピクセルm’のパラメータの法線ベクトルを示している。nは、対象視点画像Vkの視点のカメラ座標系に対応したピクセルmのパラメータにおける法線ベクトルを示している。nX’、nY’及びnZ’の各々は、近傍視点画像CVkの視点におけるカメラ座標系の3次元座標点のx座標値、y座標値、z座標値それぞれを示している。   In the equation (6), n ′ represents a normal vector of the parameter of the pixel m ′ corresponding to the camera coordinate system of the viewpoint of the near viewpoint image CVk. n indicates a normal vector in the parameter of the pixel m corresponding to the camera coordinate system of the viewpoint of the target viewpoint image Vk. Each of nX ′, nY ′, and nZ ′ indicates the x coordinate value, the y coordinate value, and the z coordinate value of the three-dimensional coordinate point of the camera coordinate system at the viewpoint of the near viewpoint image CVk.

次に、以下の(7)式は、上記(6)式より求められる近傍視点画像CVkにおけるピクセルm’のパラメータp’(m’)を示している。   Next, the following expression (7) shows the parameter p ′ (m ′) of the pixel m ′ in the near viewpoint image CVk obtained from the above expression (6).

Figure 2017228152
Figure 2017228152

上記(7)式において、Mz’はピクセルm’における奥行きdのパラメータを示している。tan−1(nX’/nZ’)は、法線の傾きθCVk(m’)を示している。tan−1(nY’/nZ’)は、法線の傾きφCVk(m’)を示している。 In the above equation (7), Mz ′ represents a parameter of the depth d at the pixel m ′. tan −1 (nX ′ / nZ ′) represents a normal gradient θCVk (m ′). tan −1 (nY ′ / nZ ′) represents a normal gradient φCVk (m ′).

視点伝搬処理部16は、上記(7)式を用いて近傍視点画像CVkにおけるピクセルm’に対するマッチングスコアScore(p’(m’),m’)を求める。このマッチングスコアは本実施形態における多視点画像に対応しており、詳細は後述する。
ここで、視点伝搬処理部16は、ピクセルmのパラメータに基づく、ピクセルm’のパラメータp’(m’)を用いてマッチングスコアScore(p’(m’),m’)を算出する。また、視点伝搬処理部16は、ピクセルm’のパラメータpC(m’)を、記憶部19における近傍視点画像CVkのパラメータテーブルから読み出し、マッチングスコアScore(pC(m’),m’)を算出する。
The viewpoint propagation processing unit 16 obtains a matching score Score (p ′ (m ′), m ′) for the pixel m ′ in the near viewpoint image CVk using the above equation (7). This matching score corresponds to the multi-viewpoint image in the present embodiment, and details will be described later.
Here, the viewpoint propagation processing unit 16 calculates the matching score Score (p ′ (m ′), m ′) using the parameter p ′ (m ′) of the pixel m ′ based on the parameter of the pixel m. Further, the viewpoint propagation processing unit 16 reads the parameter pC (m ′) of the pixel m ′ from the parameter table of the near viewpoint image CVk in the storage unit 19 and calculates the matching score Score (pC (m ′), m ′). To do.

そして、視点伝搬処理部16は、Score(p’(m’),m’)とScore(pC(m’),m’)との比較を行う。
ここで、視点伝搬処理部16は、
Score(p’(m’),m’)>Score(pC(m’),m’)
である場合、ピクセルm’のパラメータをpC(m’)からp’(m’)に変換する。このとき、視点伝搬処理部16は、記憶部19における近傍視点画像CVkのパラメータテーブルにおけるピクセルm’のパラメータをp’(m’)に書き換える。
Then, the viewpoint propagation processing unit 16 compares Score (p ′ (m ′), m ′) with Score (pC (m ′), m ′).
Here, the viewpoint propagation processing unit 16
Score (p ′ (m ′), m ′)> Score (pC (m ′), m ′)
, The parameter of the pixel m ′ is converted from pC (m ′) to p ′ (m ′). At this time, the viewpoint propagation processing unit 16 rewrites the parameter of the pixel m ′ in the parameter table of the near viewpoint image CVk in the storage unit 19 to p ′ (m ′).

一方、視点伝搬処理部16は、
Score(p’(m’),m’)≦Score(pC(m’),m’)
である場合、ピクセルm’のパラメータをpC(m’)のままとし、記憶部19における近傍視点画像CVkのパラメータテーブルの書き換えを行わない。
上述したように、視点伝搬処理部16は、対象視点画像Vkにおけるピクセルmのパラメータを、近傍視点画像CVkにおけるピクセルm’に対して伝搬させる視点伝搬処理を行う。
On the other hand, the viewpoint propagation processing unit 16
Score (p ′ (m ′), m ′) ≦ Score (pC (m ′), m ′)
In this case, the parameter of the pixel m ′ remains pC (m ′), and the parameter table of the near viewpoint image CVk in the storage unit 19 is not rewritten.
As described above, the viewpoint propagation processing unit 16 performs viewpoint propagation processing for propagating the parameter of the pixel m in the target viewpoint image Vk to the pixel m ′ in the neighboring viewpoint image CVk.

本実施形態においては、上述した視点伝搬処理を行うことにより、対象視点画像Vkにおけるピクセルmのパラメータを、対象視点画像Vkの視点の近傍における全ての視点の近傍視点画像CVkのピクセルm’に対して伝搬させることができる。
しかしながら、近傍の視点の全ての近傍視点画像CVkに対してパラメータの伝搬処理を行う場合、パラメータの伝搬処理は、ステレオペア数Npair個に対応したNpair回行う必要があり、計算コストが増加してしまう。このため、本実施形態においては、近傍視点画像CVkを1視点に対応して選択し、この選択した1個の近傍視点画像CVkをステレオペアとして、視点伝搬処理を行う。これにより、ステレオペア数Npairが増加したとしても、視点伝搬処理の処理時間を一定に保つことができる。
In the present embodiment, by performing the above-described viewpoint propagation processing, the parameters of the pixel m in the target viewpoint image Vk are set to the pixels m ′ of the neighboring viewpoint images CVk of all viewpoints in the vicinity of the viewpoint of the target viewpoint image Vk. Can be propagated.
However, when parameter propagation processing is performed on all neighboring viewpoint images CVk of neighboring viewpoints, parameter propagation processing needs to be performed Npair times corresponding to the number of stereo pairs Npair, which increases the calculation cost. End up. For this reason, in this embodiment, the near viewpoint image CVk is selected corresponding to one viewpoint, and the viewpoint propagation process is performed using the selected one near viewpoint image CVk as a stereo pair. Thereby, even if the number of stereo pairs Npair increases, the processing time of the viewpoint propagation process can be kept constant.

また、近傍視点画像CVkにおける全てのピクセルm’に対し、対象視点画像Vkのピクセルmからのパラメータの視点伝搬処理が行われない場合もある。しかしながら、この近傍視点画像CVkが対象視点画像Vkとして選択された際、空間伝搬処理により、視点伝搬処理が行われたピクセルm’から、他の視点伝搬処理が行われなかったピクセルm’に対し、視点伝搬処理で伝搬されたパラメータが伝搬する。
これにより、本実施形態においては、全ての視点画像の各々に対して、それぞれ相互にパラメータが伝搬されることになり、全ての視点画像をそれぞれの近傍視点画像として、視点伝搬処理を行った場合と同様の効果を得ることができる。
Further, the viewpoint propagation process of parameters from the pixel m of the target viewpoint image Vk may not be performed on all the pixels m ′ in the near viewpoint image CVk. However, when this neighboring viewpoint image CVk is selected as the target viewpoint image Vk, a pixel m ′ that has been subjected to the viewpoint propagation process is replaced with a pixel m ′ that has not been subjected to another viewpoint propagation process by the spatial propagation process. The parameter propagated in the viewpoint propagation process is propagated.
As a result, in this embodiment, parameters are propagated to each of all viewpoint images, and when viewpoint propagation processing is performed with all viewpoint images as respective neighboring viewpoint images. The same effect can be obtained.

すなわち、図4において、視点伝搬処理により、対象視点画像Vkにおけるピクセルmから、近傍視点画像CVkに対応するピクセルm’に対してパラメータの伝搬が行われる。
世界座標系における3次元座標点Mと3次元座標点M’との各々の投影であるピクセルm、ピクセルm’のそれぞれは、3次元座標点Mと3次元座標点M’とが対応する点にあると仮定すれば、テクスチャに整合性がとれるパラメータを有することが予想される。
That is, in FIG. 4, parameter propagation is performed from the pixel m in the target viewpoint image Vk to the pixel m ′ corresponding to the neighboring viewpoint image CVk by the viewpoint propagation process.
The pixel m and the pixel m ′, which are projections of the three-dimensional coordinate point M and the three-dimensional coordinate point M ′ in the world coordinate system, respectively correspond to the three-dimensional coordinate point M and the three-dimensional coordinate point M ′. Is assumed to have a parameter that is consistent with the texture.

また、上述したように、本実施形態においては、対象視点画像Vkからパラメータを伝搬させる近傍視点画像CVkをランダムに選択するため、対象視点画像Vkの周囲の近傍視点画像CVkに対して、ランダムな視点画像の間隔を設け、対象視点画像Vkのピクセルmのパラメータを伝搬させることに等しい視点伝搬処理を行っている。
このため、本実施形態によれば、対象視点画像Vkのピクセルmのパラメータを伝搬させる近傍視点画像CVkをランダムに選択した場合においても、視点伝搬処理により、対象視点画像Vkからステレオペアとなる近傍の視点画像の全てにパラメータを伝搬させた場合と同等の精度でのパラメータの伝搬が可能となる。また、本実施形態によれば、対象視点画像Vkからパラメータを伝搬する対象として、ランダムに1個のみ近傍視点画像CVkを選択し、この近傍視点画像CVkに対して視点伝搬処理を行うことにより、ステレオペアとなる視点画像が増加しても、計算コストと復元精度とを保ったままで、視点画像間のパラメータの伝搬処理を行うことができる。
In addition, as described above, in the present embodiment, since the near viewpoint image CVk that propagates the parameter from the target viewpoint image Vk is selected at random, a random viewpoint image CVk around the target viewpoint image Vk is randomly selected. A viewpoint propagation process equivalent to propagating the parameter of the pixel m of the target viewpoint image Vk is performed by providing an interval between the viewpoint images.
For this reason, according to the present embodiment, even when the neighborhood viewpoint image CVk that propagates the parameter of the pixel m of the target viewpoint image Vk is randomly selected, the neighborhood that becomes a stereo pair from the target viewpoint image Vk by the viewpoint propagation processing The parameter can be propagated with the same accuracy as when the parameter is propagated to all the viewpoint images. Further, according to the present embodiment, by selecting only one nearby viewpoint image CVk as a target for propagating parameters from the target viewpoint image Vk, and by performing viewpoint propagation processing on this nearby viewpoint image CVk, Even if the viewpoint images forming a stereo pair increase, it is possible to perform parameter propagation processing between viewpoint images while maintaining the calculation cost and the restoration accuracy.

<視点伝搬処理におけるマッチングスコア>
本実施形態においては、ZNCC(Zero-mean Normalized Cross Correlation 、ゼロ平均正規化相互相関)を用いて、パラメータにおける奥行きと法線の傾きとの各々に基づくマッチングスコアScore(p’(m’),m’)を求める。
また、本実施形態においては、ZNCCを求める際、法線の傾きを用いることで、評価対象の表面の傾きを補正し、対象視点画像Vkから切り出されたウィンドウ形状に合うように、近傍視点画像CVkから切り出したウィンドウ形状を変化させている。これにより、対象視点画像と、この対象視点画像に対して傾きを有する近傍視点画像との比較に対して、ロバスト性を持ったマッチングが可能となる。
<Matching score in viewpoint propagation processing>
In the present embodiment, using ZNCC (Zero-mean Normalized Cross Correlation), a matching score Score (p ′ (m ′), m ′).
In the present embodiment, when obtaining the ZNCC, the inclination of the normal line is used to correct the inclination of the surface of the evaluation target, so that the near viewpoint image matches the window shape cut out from the target viewpoint image Vk. The window shape cut out from CVk is changed. This makes it possible to perform matching with robustness for comparison between the target viewpoint image and a neighboring viewpoint image having an inclination with respect to the target viewpoint image.

ZNCCは、以下の(8)式により表される。   ZNCC is expressed by the following equation (8).

Figure 2017228152
Figure 2017228152

上記(8)式において、f−(fの上部に−)は以下の(9)式で表され、g−(gの上部に−)は以下の(10)式により表される。   In the above equation (8), f- (-) is represented by the following equation (9), and g- (-) is represented by the following equation (10).

Figure 2017228152
Figure 2017228152

Figure 2017228152
Figure 2017228152

(9)式及び(10)式の双方に示すように、関数によって求められる画素値f及び画素値gの各々において、画像全体の画素値の平均値を減算し、f−(fの上部に−)、g−(gの上部に−)それぞれを求めている。
本実施形態においては、上記(8)式における画素値fと画素値gとの各々を、それぞれ以下の(11)式、(12)式とする。
As shown in both the equations (9) and (10), the average value of the pixel values of the entire image is subtracted from each of the pixel value f and the pixel value g obtained by the function, and f− (f -) And g- (-) in the upper part of g.
In the present embodiment, each of the pixel value f and the pixel value g in the equation (8) is defined as the following equations (11) and (12).

Figure 2017228152
Figure 2017228152

Figure 2017228152
Figure 2017228152

IVkは画像を示している。mはピクセルの座標を示している。ωはピクセル数を示している。(11)式は、画像IVkから、ピクセルmを中心としてω×ωピクセルのウィンドウを切り出すことを示している。
また、(12)式における画像を示す、Trans(I,H)は、画像Iを射影変換行列Hにより変換することを示している。この(12)式において、あるピクセルmのパラメータp(d(m),θ(m),φ(m))が与えられた場合、対象視点画像Vkと近傍視点画像CVk(単にCとする場合もある)との間のマッチングを行うウィンドウの変形は、以下の(13)式を用いて行われる。
IVk indicates an image. m indicates the coordinates of the pixel. ω represents the number of pixels. Expression (11) indicates that a window of ω × ω pixels is cut out from the image IVk with the pixel m as the center.
Further, Trans (I, H) indicating an image in the expression (12) indicates that the image I is converted by the projective transformation matrix H. In the equation (12), when a parameter p (d (m), θ (m), φ (m)) of a certain pixel m is given, the target viewpoint image Vk and the neighboring viewpoint image CVk (simply C) The window that performs the matching is also modified using the following equation (13).

Figure 2017228152
Figure 2017228152

上記(13)式において、Rは回転行列であり、以下の(14)式により表される。   In the above equation (13), R is a rotation matrix and is represented by the following equation (14).

Figure 2017228152
Figure 2017228152

上記(14)式において、回転行列Rは、近傍視点画像CVkの視点における回転行列RCと、対象視点画像Vkの視点における回転行列RVkの逆行列RVk−1とから求められる。
また、(13)式におけるtは、並進ベクトルであり、以下の(15)式により表される。
In the above equation (14), the rotation matrix R is obtained from the rotation matrix RC at the viewpoint of the near viewpoint image CVk and the inverse matrix RVk −1 of the rotation matrix RVk at the viewpoint of the target viewpoint image Vk.
Further, t in the equation (13) is a translation vector, and is represented by the following equation (15).

Figure 2017228152
Figure 2017228152

上記(15)式において、並進ベクトルtは、近傍視点画像CVkの視点における並進ベクトルtCと、対象視点画像Vkの視点における並進ベクトルtVkに回転行列Rを乗算結果とから求められる。
また、(13)式におけるMは、対象視点画像Vkの視点におけるカメラ座標系における3次元座標点の座標値であり、以下の(16)式により求められる。
In the above equation (15), the translation vector t is obtained from the result of multiplying the translation vector tC at the viewpoint of the near viewpoint image CVk and the translation vector tVk at the viewpoint of the target viewpoint image Vk by the rotation matrix R.
M in the equation (13) is a coordinate value of a three-dimensional coordinate point in the camera coordinate system at the viewpoint of the target viewpoint image Vk, and is obtained by the following equation (16).

Figure 2017228152
Figure 2017228152

(16)式において、dは、対象視点画像Vkのパラメータにおける奥行きのデータである。AVk−1は、対象視点画像Vkの視点におけるカメラパラメータの行列AVkの逆行列である。uは、対象視点画像Vkにおけるピクセルmのx座標である。vは、対象視点画像Vkにおけるピクセルmのy座標である。
また、(13)式におけるnは、法線ベクトルであり、以下の(17)式により求められる。
In the equation (16), d is data of depth in the parameter of the target viewpoint image Vk. AVk −1 is an inverse matrix of the camera parameter matrix AVk at the viewpoint of the target viewpoint image Vk. u is the x coordinate of the pixel m in the target viewpoint image Vk. v is the y coordinate of the pixel m in the target viewpoint image Vk.
Further, n in the equation (13) is a normal vector, and is obtained by the following equation (17).

Figure 2017228152
Figure 2017228152

上記(17)式において、θ及びφの各々は、対象視点画像Vkの視点におけるカメラ座標系における角度であり、それぞれ法線がz軸と成す角度、法線をx軸y軸により形成される2次元平面に投影し、投影された法線がx軸と成す角度を示している。   In the above equation (17), each of θ and φ is an angle in the camera coordinate system at the viewpoint of the target viewpoint image Vk, and each is an angle formed by the normal line with the z axis, and the normal line is formed by the x axis and the y axis. Projected on a two-dimensional plane, the angle formed by the projected normal and the x axis is shown.

上述した(11)式及び(12)式の各々を用いることにより、2つの視点画像(対象視点画像Vk及び近傍視点画像CVk)間のマッチングスコアを算出することができる。
ZNCCについては、2つの視点画像のマッチングスコアであるため、値としては1つである。このため、ZNCCの値をそのまま奥行きと法線の傾きとから求められるマッチングスコアとして用いることができる。
一方、本実施形態においては、多視点画像を用いているため、対象視点画像Vkと複数の近傍視点画像CVkとにおいて、この近傍視点画像CVkの数に対応した複数のZNCCの値を得られる。しかしながら、複数のZNCCの値をそのまま、対象視点画像Vkと複数の近傍視点画像CVkとの比較のマッチングスコアとして用いることができない。このため、得られた複数のZNCCの値を統合させたマッチングスコアを定義し、対象視点画像Vkと複数の近傍視点画像CVkとの比較のマッチングスコアとして用いる。
By using each of the above-described equations (11) and (12), a matching score between two viewpoint images (the target viewpoint image Vk and the neighboring viewpoint image CVk) can be calculated.
Since ZNCC is a matching score between two viewpoint images, the value is one. For this reason, the value of ZNCC can be used as a matching score obtained from the depth and the slope of the normal as it is.
On the other hand, in the present embodiment, since multi-viewpoint images are used, a plurality of ZNCC values corresponding to the number of neighboring viewpoint images CVk can be obtained in the target viewpoint image Vk and the plurality of neighboring viewpoint images CVk. However, a plurality of ZNCC values cannot be used as they are as matching scores for comparison between the target viewpoint image Vk and the plurality of neighboring viewpoint images CVk. Therefore, a matching score obtained by integrating a plurality of obtained ZNCC values is defined and used as a matching score for comparison between the target viewpoint image Vk and the plurality of neighboring viewpoint images CVk.

また、対象視点画像Vkと複数の近傍視点画像CVkとの比較におけるZNCCは、ステレオペアとなる視点画像のオクルージョンの影響により低い値となる場合がある。この結果、得られたZNCCの値を単純平均により統合させた場合、上述したようにオクルージョンの影響を受ける場合があり、信頼性の低いマッチングスコアとなってしまう。
このため、本実施形態においては、対象視点画像Vkと複数の近傍視点画像CVkとを比較して得られる複数のZNCCの値を統合するために、信頼値をマッチングスコアとして用いる。
In addition, ZNCC in the comparison between the target viewpoint image Vk and the plurality of neighboring viewpoint images CVk may be a low value due to the influence of occlusion of the viewpoint images that form a stereo pair. As a result, when the obtained ZNCC values are integrated by a simple average, as described above, there may be the influence of occlusion, resulting in a low-reliability matching score.
For this reason, in the present embodiment, the confidence value is used as a matching score in order to integrate a plurality of ZNCC values obtained by comparing the target viewpoint image Vk and the plurality of neighboring viewpoint images CVk.

各視点画像Vk∈Vについて、マッチングを行うステレオペアとなる近傍視点画像を、CVk={C1,C2,C3,…,CNpair}⊆V\{Vk}と定義する。すなわち、視点画像群Vにおいて対象視点画像として選択されたVkを除いた視点画像の中から、近傍視点画像CVkを複数選択する。ここで、ステレオペア数Npairは、マッチングスコアを求める計算に用いるステレオペアの数である。
このとき、対象視点画像Vkにおけるピクセルmのパラメータp={d,θ,φ}におけるマッチングスコアScore(p,m)が、以下の(18)式により表される。
For each viewpoint image VkεV, a neighboring viewpoint image that is a stereo pair to be matched is defined as CVk = {C1, C2, C3,..., CNpair} ⊆V \ {Vk}. That is, a plurality of neighboring viewpoint images CVk are selected from viewpoint images excluding Vk selected as the target viewpoint image in the viewpoint image group V. Here, the number of stereo pairs Npair is the number of stereo pairs used in the calculation for obtaining the matching score.
At this time, the matching score Score (p, m) at the parameter p = {d, θ, φ} of the pixel m in the target viewpoint image Vk is expressed by the following equation (18).

Figure 2017228152
Figure 2017228152

上記(18)式において、thはZNCCの値を判定する所定の閾値である。また、fは上記(11)式であり、gは上記(12)式である。
また、(18)式におけるZNCC’(f,g,th)は、以下の(19)式により求められる。
In the above equation (18), th is a predetermined threshold value for determining the value of ZNCC. Further, f is the above formula (11), and g is the above formula (12).
Further, ZNCC ′ (f, g, th) in the equation (18) is obtained by the following equation (19).

Figure 2017228152
Figure 2017228152

(11)式において、ZNCC’(f,g,th)は、ZNCC(f,g)が閾値thより大きい場合にZNCC(f,g)となり、それ以外の場合に閾値thとなる。すなわち、この閾値thを超えた場合に、ZNCC(f,g)の信頼値が高いとして、(11)式によりZNCCが算出される。   In equation (11), ZNCC ′ (f, g, th) becomes ZNCC (f, g) when ZNCC (f, g) is larger than the threshold th, and becomes the threshold th otherwise. That is, when this threshold value th is exceeded, ZNCC is calculated by the equation (11), assuming that the reliability value of ZNCC (f, g) is high.

<微調整処理>
この微調整処理は、パッチマッチステレオ法におけるPlane refinementの処理である。
この微調整処理は、上述した空間伝搬処理及び視点伝搬処理によるパラメータの伝搬処理のみの場合、乱数で求めた初期値によっては、精度良く探索できないパラメータが存在する。そのため、この微調整処理においては、対象ピクセルで伝搬処理が終了したピクセルmのパラメータに対して、微少な乱数を調整値として加えてマッチングスコアを比較してパラメータを更新する。
<Fine adjustment process>
This fine adjustment process is a Plane refinement process in the patch match stereo method.
In the fine adjustment process, in the case of only the parameter propagation process by the spatial propagation process and the viewpoint propagation process described above, there are parameters that cannot be searched with high accuracy depending on the initial value obtained by a random number. Therefore, in this fine adjustment process, a parameter is updated by adding a small random number as an adjustment value to the parameter of the pixel m for which the propagation process has been completed for the target pixel, and comparing the matching score.

微調整部17は、奥行きdVk(m)、θVk(m)及びφVk(m)の各々に対して乱数ΔdVk、乱数ΔθVk、乱数ΔφVkそれぞれを発生する。
そして、微調整部17は、Δp=(ΔdVk,ΔθVk,ΔφVk)とし、記憶部19における対象視点画像Vkに対応したパラメータテーブルから、ピクセルmのパラメータを読み出す。微調整部17は、マッチングスコアScore(pVk(m),m)と、マッチングスコアScore(pVk(m)+Δp,m)との各々を算出する。
The fine adjustment unit 17 generates a random number ΔdVk, a random number ΔθVk, and a random number ΔφVk for each of the depths dVk (m), θVk (m), and φVk (m).
Then, the fine adjustment unit 17 sets Δp = (ΔdVk, ΔθVk, ΔφVk), and reads the parameter of the pixel m from the parameter table corresponding to the target viewpoint image Vk in the storage unit 19. The fine adjustment unit 17 calculates a matching score Score (pVk (m), m) and a matching score Score (pVk (m) + Δp, m).

微調整部17は、マッチングスコアのScore(pVk(m),m)とScore(pVk(m)+Δp,m)との各々を比較する。このとき、微調整部17は、Score(pVk(m)+Δp,m)>Score(pVk(m),m)である場合、pVk(m)をpVk(m)+Δpに変更する。すなわち、微調整部17は、記憶部19における対象視点画像Vkに対応したパラメータテーブルにおいて、pVk(m)=(dVk(m),θVk(m),φVk(m))を、pVk(m)+p=(dVk(m)+ΔdVk,θVk(m)+ΔθVk,φVk(m)+ΔφVk)に書き換える。   The fine adjustment unit 17 compares each of Score (pVk (m), m) and Score (pVk (m) + Δp, m) of the matching score. At this time, the fine adjustment unit 17 changes pVk (m) to pVk (m) + Δp when Score (pVk (m) + Δp, m)> Score (pVk (m), m). That is, the fine adjustment unit 17 sets pVk (m) = (dVk (m), θVk (m), φVk (m)) to pVk (m) in the parameter table corresponding to the target viewpoint image Vk in the storage unit 19. + P = (dVk (m) + ΔdVk, θVk (m) + ΔθVk, φVk (m) + ΔφVk).

上述したΔpは、対象視点画像Vkにおけるピクセルの集合の全ピクセルから選択されたピクセルm毎に乱数として発生される。
本実施形態においては、初期化におけるそれぞれの乱数を生成した範囲の1/4をΔpの生成範囲とする。例えば、奥行きdVk(m)については、(1)式に示される範囲の1/4の範囲において、Δdに対してより細かい刻み幅により、ΔdVkを調整値として乱数により生成する。また、法線の傾きにおいては、±60度であったものを±15度として、より細かい刻み幅で、ΔθVk及びΔφVkの調整値の各々を乱数により生成する。
Δp described above is generated as a random number for each pixel m selected from all the pixels in the set of pixels in the target viewpoint image Vk.
In the present embodiment, 1/4 of the range in which each random number is generated in initialization is set as the generation range of Δp. For example, the depth dVk (m) is generated by a random number with ΔdVk as an adjustment value with a finer step size than Δd in a quarter of the range shown in the equation (1). Further, with respect to the inclination of the normal line, the value of ± 60 degrees is set to ± 15 degrees, and each of the adjustment values of ΔθVk and ΔφVk is generated by a random number with a finer step size.

また、この微調整処理は、乱数により調整値を生成するため、乱数により調整値を一度だけ生成したしても、微調整の効果を得るには不十分である。このため、微調整部17は、ΔPをNrefine回生成し、最もマッチングスコアの高いpVkに変更する更新処理を行う。
また、微調整処理を繰り返す毎に、より調整の精度を向上させるため、ΔPの生成範囲を徐々に狭め、例えば生成範囲を1/2ずつ小さくする。
In addition, since this fine adjustment process generates an adjustment value using a random number, even if the adjustment value is generated only once using a random number, it is insufficient to obtain the effect of fine adjustment. For this reason, the fine adjustment unit 17 performs an update process of generating ΔP Nrefine times and changing it to pVk having the highest matching score.
Further, every time the fine adjustment process is repeated, in order to improve the accuracy of adjustment, the generation range of ΔP is gradually narrowed, for example, the generation range is decreased by ½.

<ピクセル単位のパラメータ伝搬の並列処理>
以下、本実施形態において上述したパッチマッチステレオ法の空間伝搬処理、視点伝搬処理及び微調整処理をピクセル単位で並列処理化する動作について、図5を用いて説明する。以下の説明において、全ての視点画像におけるピクセルの初期化は終了した状態にある。
パッチマッチステレオ法においては、上述したように、パラメータpを参照ピクセルから対象ピクセルに対して伝搬させていく処理が行われる。このため、空間伝搬処理、視点伝搬処理及び微調整処理を行う対象ピクセルを選択する際、伝搬処理が終了しているピクセルを参照ピクセルとする必要があり、伝搬処理を行う順序の依存性を有する。
<Parallel processing of parameter propagation in pixel units>
Hereinafter, an operation of parallelizing the spatial propagation processing, viewpoint propagation processing, and fine adjustment processing of the patch match stereo method described above in this embodiment in units of pixels will be described with reference to FIG. In the following description, the initialization of pixels in all viewpoint images has been completed.
In the patch match stereo method, as described above, the process of propagating the parameter p from the reference pixel to the target pixel is performed. For this reason, when selecting a target pixel to be subjected to spatial propagation processing, viewpoint propagation processing, and fine adjustment processing, the pixel for which propagation processing has been completed needs to be a reference pixel, and the order of performing the propagation processing is dependent. .

したがって、パッチマッチステレオ法においては、ピクセルの配列においてパラメータの伝搬処理を行う対象ピクセルの選択の順序が入れ替わると、パラメータの正しい伝搬処理の結果を得ることができない。そのため、従来のパッチマッチステレオ法においては、処理順序を伝搬処理が行われたピクセルを参照ピクセルとし、この参照ピクセルに隣接するピクセルを対象ピクセルとするように、パラメータの伝搬方向を一方向、例えば図5に示す行方向(x軸方向)に限定し、行毎の伝搬処理を行う並列化を行っている。   Therefore, in the patch match stereo method, if the order of selection of the target pixel for performing parameter propagation processing in the pixel array is changed, a result of correct parameter propagation processing cannot be obtained. Therefore, in the conventional patch match stereo method, the propagation direction of the parameter is set to one direction, for example, so that the pixel subjected to the propagation process is a reference pixel and the pixel adjacent to the reference pixel is a target pixel. Limiting to the row direction (x-axis direction) shown in FIG. 5, parallelization is performed to perform propagation processing for each row.

しかしながら、パラメータの伝搬方向を一方向に限定しているため、パッチマッチステレオ法によるパラメータの伝搬が十分に行われないため、精度の高いパラメータ推定が行われず、3次元形状の復元精度が行われない場合がある。
このため、本実施形態においては、パラメータの正しい伝搬処理の結果を得て、3次元形状の復元精度を向上させるため、伝搬方向を一方向のみではなく、行方向のみではなく列方向(y軸方向)にも伝搬させる並列化処理を行う。
本実施形態においては、例えば、ピクセルエンジンLSI(Large Scale Integration)などの複数のスレッドの並列処理が行われるハードウェア回路を有し、複数のパラメータ伝搬処理が行われるシステムLSIを用いて構成される。また、高速のCPUを用いて、複数のスレッドを実行させる構成としても良い。いずれにしても、本実施形態においては、初期化部12、視点選択部13、空間伝搬処理部15、視点伝搬処理部16及び微調整部17の各々がそれぞれのスレッドにて独立に動作し、スレッドを並列して実行できる構成となっている。
However, since the parameter propagation direction is limited to one direction, parameter propagation by the patch match stereo method is not sufficiently performed, so that accurate parameter estimation is not performed and three-dimensional shape restoration accuracy is performed. There may not be.
For this reason, in this embodiment, in order to obtain the result of correct parameter propagation processing and improve the reconstruction accuracy of the three-dimensional shape, the propagation direction is not limited to only one direction, but not only in the row direction but in the column direction (y-axis). Parallel processing that propagates to (direction) is also performed.
In the present embodiment, for example, a hardware LSI that performs parallel processing of a plurality of threads such as a pixel engine LSI (Large Scale Integration) is used, and the system LSI is configured to perform a plurality of parameter propagation processes. . Alternatively, a configuration may be adopted in which a plurality of threads are executed using a high-speed CPU. In any case, in the present embodiment, each of the initialization unit 12, the viewpoint selection unit 13, the spatial propagation processing unit 15, the viewpoint propagation processing unit 16, and the fine adjustment unit 17 operates independently in each thread. The thread can be executed in parallel.

図5において、スレッド生成部14は、対象視点画像Vkにおけるピクセルの各行に対応した、空間伝搬処理部15が行うパラメータ伝搬のスレッドを生成する(ピクセルの行毎にスレッドを対応づける)。
また、空間伝搬処理部15は、各スレッドにおいて、各行のパラメータの伝搬を行う方向順に、ピクセルそれぞれの隣接するピクセル(同一行において隣接したピクセル、直上あるいは直下の行の隣接するピクセル)のいずれかがパラメータの伝搬処理が終了しているか否か、すなわち処理終了のフラグが立っている(「1」となっている)か否かの検出を、記憶部19のパラメータテーブルを参照して行う。そして、空間伝搬処理部15は、伝搬を行う方向における先頭のピクセルに隣接したピクセルのいずれかがパラメータの伝搬処理が終了していた場合、そのスレッドにおいて、先頭のピクセルを対象ピクセルとし、パラメータの伝搬処理が終了している直上あるいは直下の行の隣接ピクセルのいずれかを参照ピクセルとし、行間におけるパラメータの伝搬処理を行う。
In FIG. 5, the thread generation unit 14 generates a thread for parameter propagation performed by the spatial propagation processing unit 15 corresponding to each row of pixels in the target viewpoint image Vk (corresponding to each pixel row).
In addition, the spatial propagation processing unit 15 selects one of adjacent pixels (adjacent pixels in the same row, adjacent pixels in a row immediately above or directly below) in each thread in the order in which the parameters of each row are propagated. Is detected with reference to the parameter table in the storage unit 19 to determine whether or not the parameter propagation processing has ended, that is, whether or not the processing end flag is set (is set to “1”). Then, when the parameter propagation process has been completed for any of the pixels adjacent to the leading pixel in the propagation direction, the spatial propagation processing unit 15 sets the leading pixel as the target pixel in the thread, and sets the parameter A parameter propagation process between rows is performed by using any of the adjacent pixels in the row immediately above or immediately below the propagation process as a reference pixel.

図6は、図5における対象視点画像Vkにおける各ピクセルの空間伝搬処理のスレッドについて説明する図である。図6に示すように、スレッド生成部14は、対象視点画像Vkにおけるピクセルの各行に対応した、空間伝搬処理部15が行うパラメータ伝搬のスレッドTH1、スレッドTH2、…の各々を生成する。スレッドTH1、スレッドTH2、…の各々は、図5の対象視点画像Vkにおけるピクセルの1行目、2行目、…それぞれに対応して生成される。
例えば、ピクセルaを参照ピクセルとした場合、スレッドTH1において、空間伝搬処理部15は、隣接するピクセルbを対象ピクセルとして、空間伝搬処理によるパラメータの伝搬処理を行うことができる。そして、スレッドTH1において、空間伝搬処理部15は、ピクセルbに対するパラメータの伝搬処理が終了した場合、このピクセルbが参照ピクセルとなり、隣接するピクセルdが対象ピクセルとなり、順次、スレッドTH1に対応した行のパラメータの伝搬処理が行われる。スレッドTH1において、空間伝搬処理部15は、ピクセルbに対するパラメータの伝搬処理が終了した際、記憶部19におけるパラメータテーブルのピクセルbの終了フラグを「0」から「1」に書き換える。
FIG. 6 is a diagram illustrating a thread for spatial propagation processing of each pixel in the target viewpoint image Vk in FIG. As shown in FIG. 6, the thread generation unit 14 generates each of the parameter propagation thread TH1, the thread TH2,... That is performed by the spatial propagation processing unit 15 corresponding to each row of pixels in the target viewpoint image Vk. Each of the threads TH1, TH2,... Is generated corresponding to the first row, the second row,... Of pixels in the target viewpoint image Vk in FIG.
For example, when the pixel a is the reference pixel, in the thread TH1, the spatial propagation processing unit 15 can perform the parameter propagation process by the spatial propagation process with the adjacent pixel b as the target pixel. In the thread TH1, when the parameter propagation processing for the pixel b is completed, the spatial propagation processing unit 15 becomes the reference pixel, the adjacent pixel d becomes the target pixel, and sequentially corresponds to the thread TH1. The parameter propagation process is performed. In the thread TH1, the spatial propagation processing unit 15 rewrites the end flag for the pixel b in the parameter table in the storage unit 19 from “0” to “1” when the parameter propagation processing for the pixel b is completed.

また、ピクセルaを参照ピクセルとした場合、スレッドTH2において、空間伝搬処理部15は、対象ピクセルであるピクセルcに対して伝搬処理を行う方向に隣接するピクセルであるピクセルeと、スレッドの処理順番が自身より後となる行において隣接するピクセルであるピクセルfとを除き、隣接するピクセルaの伝搬処理が終了しているか否かの判定を行う。そして、スレッドTH2において、空間伝搬処理部15は、ピクセルaを参照ピクセルとし、ピクセルcに対して空間伝搬処理によるパラメータの伝搬処理を行う。また、スレッドTH2において、空間伝搬処理部15は、ピクセルcに対するパラメータの伝搬が終了すると、対象ピクセルをピクセルeとし、隣接するピクセルcを対象ピクセルとする。空間伝搬処理部15は、ピクセルcに対するパラメータの伝搬処理が終了した際、記憶部19におけるパラメータテーブルのピクセルcの終了フラグを「0」から「1」に書き換える。   When the pixel a is a reference pixel, the spatial propagation processing unit 15 in the thread TH2, the pixel e that is a pixel adjacent in the direction in which the propagation process is performed on the pixel c that is the target pixel, and the processing order of the thread Is determined whether or not the propagation process of the adjacent pixel a has been completed, excluding the pixel f which is an adjacent pixel in the row after the self. In the thread TH2, the spatial propagation processing unit 15 uses the pixel a as a reference pixel, and performs a parameter propagation process on the pixel c by the spatial propagation process. In the thread TH2, when the parameter propagation to the pixel c is completed, the spatial propagation processing unit 15 sets the target pixel as the pixel e and the adjacent pixel c as the target pixel. The spatial propagation processing unit 15 rewrites the end flag of the pixel c in the parameter table in the storage unit 19 from “0” to “1” when the parameter propagation processing for the pixel c is completed.

そして、スレッドTH2において、空間伝搬処理部15は、対象ピクセルであるピクセルeに対して伝搬処理を行う方向に隣接するピクセルであるピクセルhと、スレッドの処理順番が自身より後となる行において隣接するピクセルであるピクセルiとを除き、隣接するピクセルb及びピクセルcの各々の伝搬処理が終了しているか否かの判定を行う。そして、スレッドTH2において、空間伝搬処理部15は、ピクセルb及びピクセルcの各々の伝搬処理が終了した後、ピクセルb及びピクセルcの各々を参照ピクセルとし、ピクセルeに対して空間伝搬処理によるパラメータの伝搬処理を行う。   In the thread TH2, the spatial propagation processing unit 15 adjoins the pixel h that is adjacent to the pixel e that is the target pixel in the direction in which the propagation processing is performed, in the row in which the processing order of the thread is after itself. It is determined whether or not the propagation process of each of the adjacent pixels b and c is finished except for the pixel i which is a pixel to be processed. Then, in the thread TH2, the spatial propagation processing unit 15 sets each of the pixel b and the pixel c as the reference pixel after the propagation processing of each of the pixel b and the pixel c is finished, and sets the parameter by the spatial propagation processing for the pixel e. Propagation processing is performed.

ここで、スレッドTH2において、空間伝搬処理部15は、ピクセルb及びピクセルcの各々のパラメータのうち、マッチングスコアの高い方をピクセルeのパラメータとする。そして、スレッドTH2において、空間伝搬処理部15は、ピクセルeに対する空間伝搬処理が終了すると、記憶部19のパラメータテーブルにおいて、ピクセルeの終了フラグを、「0」から「1」に書き換える。
上述したように、スレッドの各々において、空間伝搬処理部15は、順次、スレッド単位において、行毎に隣接するピクセル間におけるパラメータの空間伝搬処理を行う。
Here, in the thread TH2, the spatial propagation processing unit 15 sets the parameter having the higher matching score among the parameters of the pixel b and the pixel c as the parameter of the pixel e. In the thread TH2, when the spatial propagation processing for the pixel e is completed, the spatial propagation processing unit 15 rewrites the end flag for the pixel e from “0” to “1” in the parameter table of the storage unit 19.
As described above, in each thread, the spatial propagation processing unit 15 sequentially performs a spatial propagation process of parameters between adjacent pixels for each row in a thread unit.

上述したスレッドの処理は、図5において、ピクセルaをパラメータ伝搬の開始ピクセルとした場合、上部のピクセルの行から下部のピクセルの行の順番に、各行において左のピクセルから右のピクセルの並び順に、空間伝搬処理が行われる場合に対応している。このとき、対象ピクセルのピクセルmの座標値を(u,v)とした場合、参照ピクセルのピクセルpの座標値が(u−1,v)あるいは(u,v−1)となる。
一方、ピクセルzをパラメータ伝搬の開始ピクセルとした場合、下部のピクセルの行から上部のピクセルの行の順番に、各行において右のピクセルから左のピクセルの並び順に、空間伝搬処理が行われる場合もある。このとき、対象ピクセルのピクセルmの座標値を(u,v)とした場合、参照ピクセルのピクセルpの座標値が(u+1,v)あるいは(u,v+1)となる。
In the thread processing described above, in the case where the pixel a is a parameter propagation start pixel in FIG. 5, the order of the upper pixel row to the lower pixel row is the order of the left pixel to the right pixel in each row. This corresponds to the case where spatial propagation processing is performed. At this time, when the coordinate value of the pixel m of the target pixel is (u, v), the coordinate value of the pixel p of the reference pixel is (u-1, v) or (u, v-1).
On the other hand, when the pixel z is set as the parameter propagation start pixel, spatial propagation processing may be performed in the order of the lower pixel row to the upper pixel row, and in the order of the right pixel to the left pixel in each row. is there. At this time, when the coordinate value of the pixel m of the target pixel is (u, v), the coordinate value of the pixel p of the reference pixel is (u + 1, v) or (u, v + 1).

上述したように、本実施形態においては、パラメータの空間伝搬処理において、参照ピクセルとするピクセルに対する伝搬処理が終了しているか否かを、終了フラグで確認しているため、各行におけるパラメータの伝搬順序を保つことができる。また、対処ピクセルに対して2個の参照ピクセルから、すなわち行方向のみではなく列方向(y軸方向)にもマッチングスコアの高い方のパラメータを伝搬させるため、パラメータ推定の精度を向上させることができる。
また、視点伝搬処理部16は、スレッド毎に、対象視点画像Vkにおける対象ピクセルに対する空間伝搬処理が終了した際、この対象ピクセルにより、近傍視点画像CVkのピクセルにおける視点伝搬処理を行う。
As described above, in the present embodiment, in the parameter spatial propagation processing, whether or not the propagation processing for the pixel to be the reference pixel has been completed is confirmed by the end flag, so the parameter propagation order in each row Can keep. In addition, since the parameter having the higher matching score is propagated from the two reference pixels to the corresponding pixel, that is, not only in the row direction but also in the column direction (y-axis direction), the parameter estimation accuracy can be improved. it can.
Further, when the spatial propagation processing for the target pixel in the target viewpoint image Vk is completed for each thread, the viewpoint propagation processing unit 16 performs the viewpoint propagation processing on the pixel of the near viewpoint image CVk using the target pixel.

<パラメータ伝搬処理の動作の説明>
次に、パラメータ伝搬処理の動作手順について説明する。
図7は、デプスマップ生成装置のパラメータ伝搬処理の動作手順を表すフローチャートである。
ステップS1:
制御部11は、伝搬処理の繰り返し回数を示す回数δを「1」とする初期化を行う。また、制御部11は、記憶部19におけるパラメータテーブルにおける全ての完了フラグを「0」に初期化する。
また、初期化部12は、記憶部19に記憶されている全ての視点画像における全てのピクセルのパラメータの初期化を、乱数を発生することにより行う。
<Description of parameter propagation processing>
Next, an operation procedure of parameter propagation processing will be described.
FIG. 7 is a flowchart showing an operation procedure of parameter propagation processing of the depth map generation device.
Step S1:
The control unit 11 performs initialization so that the number δ indicating the number of repetitions of the propagation process is “1”. Further, the control unit 11 initializes all completion flags in the parameter table in the storage unit 19 to “0”.
The initialization unit 12 initializes parameters of all pixels in all viewpoint images stored in the storage unit 19 by generating random numbers.

ステップS2:
制御部11は、記憶部19におけるパラメータテーブルにおける終了フラグを「0」とする初期化を行う。
Step S2:
The control unit 11 performs initialization to set the end flag in the parameter table in the storage unit 19 to “0”.

ステップS3:
視点選択部13は、対象視点と成る視点画像を、記憶部19に記憶されている視点画像のなかから選択する。
Step S3:
The viewpoint selection unit 13 selects a viewpoint image serving as a target viewpoint from viewpoint images stored in the storage unit 19.

ステップS4:
制御部11は、現在のパラメータの伝搬処理の回数が奇数回か偶数回かを判定、すなわち回数δが奇数か偶数かを判定する。このとき、制御部11は、回数δが奇数の場合に処理をステップS5へ進め、一方回数δが偶数の場合に処理をステップS6へ進める。
Step S4:
The control unit 11 determines whether the current parameter propagation process is an odd number or an even number, that is, whether the number δ is an odd number or an even number. At this time, the control unit 11 advances the process to step S5 when the number of times δ is an odd number, and advances the process to step S6 when the number of times δ is an even number.

ステップS5:
スレッド生成部14は、対象視点画像Vkの左上の頂部のピクセルa(図5参照)を開始ピクセルとした場合の空間伝搬処理部15が行うスレッドを生成する。ここで、スレッド生成部14は、開始ピクセルがピクセルaであるため、最上部の1行目から最下部のn行目までのピクセルの各行の順番に対応して、スレッドTH1、スレッドTH2、…の各々を生成する。
そして、空間伝搬処理部15は、各スレッドにおいて、対応する行の各ピクセルの隣接する他のピクセルにおける伝搬処理が終了したか否かを、記憶部19におけるパラメータテーブルを参照することにより検出し、参照ピクセルから対象ピクセルに対する伝搬処理を、すでに説明したように、マッチングスコアに対応して行う。
Step S5:
The thread generation unit 14 generates a thread to be performed by the spatial propagation processing unit 15 when the pixel a (see FIG. 5) at the top left of the target viewpoint image Vk is used as a start pixel. Here, since the start pixel is the pixel a, the thread generation unit 14 corresponds to the order of each row of the pixels from the first row at the top to the nth row at the bottom, and the thread TH1, the thread TH2,. Generate each of
Then, the spatial propagation processing unit 15 detects, in each thread, whether or not the propagation processing in other pixels adjacent to each pixel in the corresponding row is completed by referring to the parameter table in the storage unit 19, Propagation processing from the reference pixel to the target pixel is performed in accordance with the matching score as described above.

ステップS6:
スレッド生成部14は、対象視点画像Vkの右下の頂部のピクセルz(図5参照)を開始ピクセルとした場合の空間伝搬処理部15が行うスレッドを生成する。ここで、スレッド生成部14は、開始ピクセルがピクセルzであるため、最下部のn行目から最上部の1行目までのピクセルの各行の順番に対応して、スレッドTH1、スレッドTH2、…の各々を生成する。
そして、各スレッドにおいて、空間伝搬処理部15は、対応する行の各ピクセルの隣接する他のピクセルにおける伝搬処理が終了したか否かを、記憶部19におけるパラメータテーブルを参照することにより検出し、参照ピクセルから対象ピクセルに対する伝搬処理を、すでに説明したように、マッチングスコアに対応して行う。
Step S6:
The thread generation unit 14 generates a thread to be performed by the spatial propagation processing unit 15 when the lower right top pixel z (see FIG. 5) of the target viewpoint image Vk is set as a start pixel. Here, since the start pixel is the pixel z, the thread generation unit 14 corresponds to the order of each row of pixels from the lowermost nth row to the uppermost first row, and the threads TH1, TH2,. Generate each of
Then, in each thread, the spatial propagation processing unit 15 detects whether or not the propagation processing in other pixels adjacent to each pixel in the corresponding row is completed by referring to the parameter table in the storage unit 19, Propagation processing from the reference pixel to the target pixel is performed in accordance with the matching score as described above.

ステップS7:
視点選択部13は、対象視点画像Vkの対象ピクセルからパラメータを伝搬する伝搬先の近傍視点画像CVkを、記憶部19における対象視点画像Vkを除いた視点画像のなかから選択する。
Step S7:
The viewpoint selection unit 13 selects a propagation destination neighboring viewpoint image CVk that propagates parameters from the target pixel of the target viewpoint image Vk, from the viewpoint images excluding the target viewpoint image Vk in the storage unit 19.

ステップS8:
各スレッドにおいて、視点伝搬処理部16は、対象視点画像Vkの対象ピクセルのパラメータを、この対象ピクセルに対応する近傍視点画像CVkのピクセルに対して伝搬させる視点伝搬処理を行う。
Step S8:
In each thread, the viewpoint propagation processing unit 16 performs viewpoint propagation processing for propagating the parameter of the target pixel of the target viewpoint image Vk to the pixel of the neighboring viewpoint image CVk corresponding to the target pixel.

ステップS9:
各スレッドにおいて、微調整部17は、対象視点画像Vkの対象ピクセルの伝搬されたパラメータの微調整処理を、乱数により調整値を生成して行う。そして、微調整部17は、微調整処理が終了した対象ピクセルのパラメータを空間伝搬処理部17に出力する。
ここで、微調整部17は、微調整処理が終了した対象ピクセルのパラメータを、記憶部19のパラメータテーブルの対応するピクセルのレコードのパラメータの欄に書き込む。
Step S9:
In each thread, the fine adjustment unit 17 performs fine adjustment processing of the parameter propagated to the target pixel of the target viewpoint image Vk by generating an adjustment value using a random number. Then, the fine adjustment unit 17 outputs the parameter of the target pixel for which the fine adjustment process has been completed to the spatial propagation processing unit 17.
Here, the fine adjustment unit 17 writes the parameter of the target pixel for which the fine adjustment process has been completed in the parameter field of the corresponding pixel record in the parameter table of the storage unit 19.

ステップS10:
各スレッドにおいて、微調整部17は、記憶部19のパラメータテーブルの対応するピクセルの終了フラグを「0」から「1」に書き換えて変更する。このとき、空間伝搬処理部17は、対象ピクセルのパラメータによるマッチングスコアが、完了閾値を超えた場合、記憶部19のパラメータテーブルにおけるこのピクセルの完了フラグを「0」から1に変更する。
Step S10:
In each thread, the fine adjustment unit 17 rewrites and changes the end flag of the corresponding pixel in the parameter table of the storage unit 19 from “0”. At this time, when the matching score based on the parameter of the target pixel exceeds the completion threshold, the spatial propagation processing unit 17 changes the completion flag of this pixel in the parameter table of the storage unit 19 from “0” to 1.

ステップS11:
制御部11は、記憶部19における対象視点画像Vkに対応するパラメータテーブルを参照し、全てのピクセルの終了フラグが「1」となっているか否かの判定を行う。
このとき、制御部11は、パラメータテーブルにおける全てのピクセルの終了フラグが「1」となっている場合、対象視点画像Vkの全てのピクセルに対するパラメータの空間伝搬処理及び視点伝搬処理が終了していると判定し、処理をステップS12へ進める。一方、制御部11は、パラメータテーブルにおける全てのピクセルの終了フラグが「1」となっていない場合、対象視点画像Vkの全てのピクセルに対するパラメータの空間伝搬処理及び視点伝搬処理が終了していないと判定し、処理をステップS4へ進める。このとき、制御部11は、記憶部19に記憶されている、視点画像とこの視点画像が空間伝搬処理が終了しているか否かを示すフラグとが対応した視点画像処理テーブル(不図示)に対し、全てのピクセルのパラメータの伝搬処理が終了した視点画像のフラグを立てる(「0」から「1」とする)。
Step S11:
The control unit 11 refers to the parameter table corresponding to the target viewpoint image Vk in the storage unit 19 and determines whether or not the end flags of all the pixels are “1”.
At this time, when the end flag of all the pixels in the parameter table is “1”, the control unit 11 finishes the parameter spatial propagation process and the viewpoint propagation process for all the pixels of the target viewpoint image Vk. And the process proceeds to step S12. On the other hand, when the end flag of all the pixels in the parameter table is not “1”, the control unit 11 determines that the parameter spatial propagation process and the viewpoint propagation process for all the pixels of the target viewpoint image Vk are not completed. Determination is made, and the process proceeds to step S4. At this time, the control unit 11 stores a viewpoint image stored in the storage unit 19 in a viewpoint image processing table (not shown) in which the viewpoint image and a flag indicating whether or not the viewpoint image has been subjected to the spatial propagation processing have been associated. On the other hand, a flag is set for the viewpoint image for which the parameter propagation processing for all pixels has been completed (from “0” to “1”).

また、制御部11は、回数δが奇数の場合、開始ピクセルがピクセルaであり、最後に処理が行われる終了ピクセルがピクセルzであるため、ピクセルzの終了フラグのみが「1」であるか否かを判定し、一方、回数δが偶数の場合、開始ピクセルがピクセルzであり、最後に処理が行われる終了ピクセルがピクセルaであるため、ピクセルaの終了フラグのみが「1」であるか否かを判定するように構成しても良い。   In addition, when the number of times δ is an odd number, the control unit 11 determines whether only the end flag of the pixel z is “1” because the start pixel is the pixel a and the end pixel to be processed last is the pixel z. On the other hand, if the number δ is an even number, since the start pixel is the pixel z and the end pixel to be processed last is the pixel a, only the end flag of the pixel a is “1”. It may be configured to determine whether or not.

ステップS12:
制御部11は、記憶部19におけるに視点画像処理テーブルを参照し、全ての視点画像に対するパラメータの空間伝搬処理が終了したか否か、すなわち全ての視点画像のフラグが「1」であるか否かの判定を行う。
このとき、制御部11は、全ての視点画像に対するパラメータの空間伝搬処理が終了した場合、処理をステップS13へ進める。一方、制御部11は、全ての視点画像に対するパラメータの空間伝搬処理が終了していない場合、処理をステップS3へ進める。
Step S12:
The control unit 11 refers to the viewpoint image processing table in the storage unit 19 and determines whether or not the parameter spatial propagation processing for all viewpoint images has been completed, that is, whether or not the flags of all viewpoint images are “1”. Judgment is made.
At this time, if the parameter spatial propagation processing for all viewpoint images is completed, the control unit 11 advances the processing to step S13. On the other hand, if the parameter spatial propagation processing for all viewpoint images has not been completed, the control unit 11 advances the processing to step S3.

ステップS13:
制御部11は、回数δをインクリメント(1を加算)する。
Step S13:
The control unit 11 increments the number δ (adds 1).

ステップS14:
制御部11は、回数δが設定数hを超えたか否かの判定を行う。制御部11は、回数δが設定数hを超えた場合、パラメータの伝搬の処理を終了する。一方、制御部11は、回数δが設定数hを超えていない(設定数h以下の)場合、処理をステップS2へ進める。制御部11は、回数δが設定数hを超えた場合、全ての視点画像の各ピクセルにおけるパラメータが推定されていると判定する。
ここで、設定数hは、例えば、実験的に3回以上などであり、ピクセル間のパラメータの伝搬によって、十分なパラメータの推定が行われる繰り返し回数を、3次元形状の凹凸形状に対応させて、予め実験などにより求めて設定する。
Step S14:
The control unit 11 determines whether or not the number of times δ exceeds the set number h. When the number of times δ exceeds the set number h, the control unit 11 ends the parameter propagation process. On the other hand, when the number of times δ does not exceed the set number h (less than the set number h), the control unit 11 advances the process to step S2. When the number δ exceeds the set number h, the control unit 11 determines that the parameters in each pixel of all viewpoint images are estimated.
Here, the set number h is, for example, three or more experimentally, and the number of repetitions in which sufficient parameter estimation is performed by propagation of parameters between pixels is made to correspond to the three-dimensional uneven shape. In advance, it is obtained and set by an experiment or the like.

<視点画像単位のパラメータ伝搬の並列処理>
以下、本実施形態において上述したパッチマッチステレオ法の空間伝搬処理、視点伝搬処理及び微調整処理を視点画像単位で並列処理化する動作について、図8及び図9の各々を用いて説明する。以下の説明において、全ての視点画像におけるピクセルの初期化は終了した状態にある。
図8は、3次元形状の対象物を撮像した撮像装置の各々の視点の位置を示す図である。図8においては、例えば、対象物100を視点Aから視点Iの各々に配置した撮像装置により撮像し、複数の視点画像である多視点画像を取得している。視点Aの近傍の視点は視点Bであり、視点Bの近傍視点は視点A及び視点Cとなる。
<Parallel processing of parameter propagation for each viewpoint image>
Hereinafter, an operation of parallelizing the spatial propagation processing, viewpoint propagation processing, and fine adjustment processing of the patch match stereo method described above in this embodiment in units of viewpoint images will be described with reference to FIGS. 8 and 9. In the following description, the initialization of pixels in all viewpoint images has been completed.
FIG. 8 is a diagram illustrating the position of each viewpoint of the imaging apparatus that images a three-dimensional object. In FIG. 8, for example, the object 100 is imaged by an imaging device arranged in each of the viewpoint A to the viewpoint I, and a multi-viewpoint image that is a plurality of viewpoint images is acquired. The viewpoint near the viewpoint A is the viewpoint B, and the viewpoints near the viewpoint B are the viewpoint A and the viewpoint C.

図9は、一例として、視点伝搬処理における近傍視点画像を2個とした場合のグラフの構成を示している。このグラフにおいては、例えば視点Aが視点伝搬処理を開始する開始視点画像である場合、視点A→視点B→視点C→視点D→…と、順次、対象視点画像とされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。
例えば、視点Aの視点画像を対象視点画像Vkとされた場合、近傍視点画像CVkは視点Bと視点Cとの各々の視点画像である、次に、視点Bの視点画像が対象視点画像Vkとされた場合、近傍視点画像CVkは視点Aと視点Cとの各々の視点画像である。
FIG. 9 shows, as an example, the configuration of a graph when there are two neighboring viewpoint images in the viewpoint propagation process. In this graph, for example, when viewpoint A is a starting viewpoint image for starting viewpoint propagation processing, viewpoint A → view point B → view point C → view point D →... The line-of-sight propagation process of parameters between the viewpoint images is performed.
For example, when the viewpoint image of the viewpoint A is the target viewpoint image Vk, the neighboring viewpoint image CVk is the viewpoint image of each of the viewpoints B and C, and then the viewpoint image of the viewpoint B is the target viewpoint image Vk. In this case, the near viewpoint image CVk is a viewpoint image of each of the viewpoints A and C.

すでに説明した視点伝搬処理において、パラメータの伝搬を行う近傍視点画像CVkを2個とした場合、対象視点画像に対する近傍視点画像CVkを選択する処理は以下のように行われる。
視点画像単位で並列化するスレッド数を、例えばCPU数に合わせて割り当てていく。ここで、グラフにより各スレッドにより、処理する視点画像の順番をグラフで設定する。
In the viewpoint propagation processing already described, when there are two neighboring viewpoint images CVk for parameter propagation, the processing for selecting the neighboring viewpoint image CVk for the target viewpoint image is performed as follows.
The number of threads to be parallelized for each viewpoint image is allocated in accordance with, for example, the number of CPUs. Here, the order of viewpoint images to be processed is set in a graph by each thread.

図10は、パラメータの伝搬を行う近傍視点画像CVkが2個であり、スレッド数が2個の場合におけるスレッドの開始視点画像を示す図である。開始視点画像は、第1スレッドが視点Aにおける視点画像であり、第2スレッドが視点Iにおける視点画像である。
図10において、第1スレッドが視点A→視点B→視点C→視点D→…と、順次、対象視点画像とされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。一方、第2スレッドが視点I→視点H→視点G→視点F→…と、順次、対象視点画像Vkとされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。
FIG. 10 is a diagram illustrating a thread start viewpoint image when there are two neighboring viewpoint images CVk that perform parameter propagation and the number of threads is two. In the start viewpoint image, the first thread is the viewpoint image at the viewpoint A, and the second thread is the viewpoint image at the viewpoint I.
In FIG. 10, the first thread is set as a target viewpoint image in order of viewpoint A → viewpoint B → viewpoint C → viewpoint D →..., And parameter line-of-sight propagation processing is performed between viewpoint images between adjacent viewpoints. On the other hand, the second thread is set as the target viewpoint image Vk in order of viewpoint I → viewpoint H → viewpoint G → viewpoint F →..., And parameter line-of-sight propagation processing is performed between the viewpoint images between adjacent viewpoints.

第1スレッド及び第2スレッドの各々における開始視点画像は、互いに近傍視点画像が同一となりパラメータの伝搬処理が干渉しないように、最も離れた視点の視点画像それぞれが選択される。すなわち、スレッド生成部14は、視点の配列から対象視点画像の選択順を示すグラフ(例えば、図9に示すグラフ)を生成する。そして、スレッド生成部14は、スレッド数が2の場合、第1スレッド及び第2スレッドの各々を生成する。ここで、スレッド生成部14は、最も処理順番が離れている両端部である、視点A及び視点Iの各々の視点画像がそれぞれ第1スレッド、第2スレッドの開始視点画像とする。   As the starting viewpoint images in each of the first thread and the second thread, the viewpoint images of the farthest viewpoints are selected so that the neighboring viewpoint images are the same and the parameter propagation process does not interfere. That is, the thread generation unit 14 generates a graph (for example, the graph shown in FIG. 9) indicating the selection order of the target viewpoint image from the viewpoint array. Then, when the number of threads is 2, the thread generation unit 14 generates each of the first thread and the second thread. Here, the thread generation unit 14 sets the viewpoint images of the viewpoint A and the viewpoint I, which are both ends that are most distant from each other, as the start viewpoint images of the first thread and the second thread, respectively.

第1スレッド及び第2スレッドの各々は、それぞれ視点Aの視点画像、視点Iの視点画像それぞれを対象視点画像として選択し、パラメータの伝搬処理を開始する。
また、第1スレッド及び第2スレッドの各々において、すでに説明したピクセル単位におけるパラメータの伝搬の並列化処理がそれぞれ独立して行われる。近傍視点画像CVkが干渉しないためには3つ以上離れた視点画像を、それぞれ開始視点画像とする。
Each of the first thread and the second thread selects the viewpoint image of viewpoint A and the viewpoint image of viewpoint I as the target viewpoint image, respectively, and starts parameter propagation processing.
Further, in each of the first thread and the second thread, the parameter parallelization processing in units of pixels already described is performed independently. In order to prevent the neighboring viewpoint image CVk from interfering, viewpoint images separated by three or more are set as start viewpoint images, respectively.

図11は、パラメータの伝搬を行う近傍視点画像が2個であり、スレッド数が3個の場合におけるスレッドの開始視点画像を示す図である。開始視点画像は、第1スレッドが視点Aにおける視点画像であり、第2スレッドが視点Iにおける視点画像であり、第3スレッドが視点Eにおける視点画像である。
図10において、第1スレッドが視点A→視点B→視点C→視点D→…と、順次、対象視点画像とされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。一方、第2スレッドが視点I→視点H→視点G→視点F→…と、順次、対象視点画像Vkとされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。また、第2スレッドが視点E→視点D→視点F→視点C→…と、順次、対象視点画像Vkとされて、隣接する視点間の視点画像間におけるパラメータの視線伝搬処理が行われる。
FIG. 11 is a diagram illustrating a starting viewpoint image of a thread when there are two neighboring viewpoint images that perform parameter propagation and the number of threads is three. In the start viewpoint image, the first thread is the viewpoint image at viewpoint A, the second thread is the viewpoint image at viewpoint I, and the third thread is the viewpoint image at viewpoint E.
In FIG. 10, the first thread is set as a target viewpoint image in order of viewpoint A → viewpoint B → viewpoint C → viewpoint D →..., And parameter line-of-sight propagation processing is performed between viewpoint images between adjacent viewpoints. On the other hand, the second thread is set as the target viewpoint image Vk in order of viewpoint I → viewpoint H → viewpoint G → viewpoint F →..., And parameter line-of-sight propagation processing is performed between the viewpoint images between adjacent viewpoints. In addition, the second thread is set as the target viewpoint image Vk in order of viewpoint E → view point D → view point F → view point C →..., And parameter line-of-sight propagation processing is performed between viewpoint images between adjacent viewpoints.

第1スレッド、第2スレッド及び第3スレッドの各々における開始視点画像は、互いに近傍視点画像が同一となりパラメータの伝搬処理が干渉しないように、最も離れた視点の視点画像それぞれが選択される。すなわち、スレッド生成部14は、図10の場合と同様に、視点の配列から対象視点画像の選択順を示すグラフ(例えば、図9に示すグラフ)を生成する。そして、スレッド生成部14は、スレッド数が3の場合、第1スレッド、第2スレッド及び第3スレッドの各々を生成する。ここで、スレッド生成部14は、最も処理順番が離れている両端部である、視点A、視点I及び視点Eの各々の視点画像がそれぞれ第1スレッド、第2スレッド、第3スレッドの開始視点画像とする。   As the starting viewpoint images in each of the first thread, the second thread, and the third thread, the viewpoint images of the farthest viewpoints are selected so that the neighboring viewpoint images are the same and the parameter propagation process does not interfere. That is, as in the case of FIG. 10, the thread generation unit 14 generates a graph (for example, the graph shown in FIG. 9) indicating the selection order of the target viewpoint image from the viewpoint arrangement. Then, when the number of threads is 3, the thread generation unit 14 generates each of the first thread, the second thread, and the third thread. Here, the thread generation unit 14 has the viewpoint images of the viewpoint A, the viewpoint I, and the viewpoint E, which are the two end portions that are most distant from each other, as the start viewpoints of the first thread, the second thread, and the third thread, respectively. An image.

第1スレッド及び第2スレッドの各々は、それぞれ視点Aの視点画像、視点Iの視点画像、視点Eの視点画像それぞれを対象視点画像として選択し、パラメータの伝搬処理を開始する。
また、第1スレッド、第2スレッド及び第3スレッドの各々において、すでに説明したピクセル単位におけるパラメータの伝搬の並列化処理がそれぞれ独立して行われる。近傍視点画像CVkが干渉しないためには3つ以上離れた視点画像を、それぞれ開始視点画像とする。
Each of the first thread and the second thread selects a viewpoint image of viewpoint A, a viewpoint image of viewpoint I, and a viewpoint image of viewpoint E as target viewpoint images, respectively, and starts parameter propagation processing.
In each of the first thread, the second thread, and the third thread, the parameter propagation parallel processing in units of pixels described above is performed independently. In order to prevent the neighboring viewpoint image CVk from interfering, viewpoint images separated by three or more are set as start viewpoint images, respectively.

<3次元形状の復元処理>
デプスマップ生成部18は、記憶部19に記憶されている、それぞれの視点画像のパラメータテーブルに基づき、世界座標系における3次元座標点群(3次元座標点Mの群)における3次元座標点各々の座標値を求めるデプスマップを求める。そして、デプスマップ生成部18は、生成した視点画像Vk毎のデプスマップを記憶部19に書き込んで記憶させる、あるいは外部の3次元形状復元装置(不図示)に対して出力する。
3次元形状復元装置は、視点画像Vk(∈V)のデプスマップにおいて、それぞれのピクセルmの奥行きをdVk(m)とし、この視点画像Vkを撮像した撮像装置(例えば、カメラ)の内部パラメータをAVkとし、外部パラメータをRVk(回転行列)、tVk(並進ベクトル)とした場合、視点画像Vkのピクセルm(座標値)から復元される、世界座標系における3次元座標点Mの座標値は、以下の(20)式で表される。
<3D shape restoration processing>
The depth map generator 18 stores each of the 3D coordinate points in the 3D coordinate point group (group of 3D coordinate points M) in the world coordinate system based on the parameter table of each viewpoint image stored in the storage unit 19. A depth map for obtaining the coordinate value of is obtained. Then, the depth map generation unit 18 writes the depth map for each generated viewpoint image Vk into the storage unit 19 and stores it, or outputs it to an external three-dimensional shape restoration device (not shown).
In the depth map of the viewpoint image Vk (∈V), the three-dimensional shape restoration apparatus sets the depth of each pixel m to dVk (m), and sets the internal parameters of the imaging device (for example, camera) that images the viewpoint image Vk. When AVk is set and external parameters are RVk (rotation matrix) and tVk (translation vector), the coordinate value of the three-dimensional coordinate point M in the world coordinate system restored from the pixel m (coordinate value) of the viewpoint image Vk is It is represented by the following equation (20).

Figure 2017228152
Figure 2017228152

そして、3次元形状復元装置は、上記(3)式により、全ての視点画像Vkのピクセルmの3次元座標点Mの座標値を復元する。そして、3次元形状復元装置は、全ての視点画像Vkから得られた3次元座標点の点群を統合することにより、3次元形状の復元を行う。
また、上記3次元形状復元装置に本実施形態によるデプスマップ生成装置を含め、視点画像を入力することにより、デプスマップを生成し、3次元形状を復元する3次元形状復元装置として構成しても良い。
Then, the three-dimensional shape restoration device restores the coordinate values of the three-dimensional coordinate points M of the pixels m of all the viewpoint images Vk by the above equation (3). The three-dimensional shape restoration apparatus restores the three-dimensional shape by integrating the point groups of the three-dimensional coordinate points obtained from all the viewpoint images Vk.
In addition, the depth map generation device according to the present embodiment may be included in the above three-dimensional shape restoration device, and a depth map may be generated by inputting a viewpoint image, and the three-dimensional shape restoration device may be configured to restore the three-dimensional shape. good.

本実施形態によれば、上述したように、初期値を乱数として生成しており、視点画像のピクセル数が大きいほど、初期値として与えられる乱数の数が増加し、空間伝搬処理における周囲の隣接したピクセルへの並列処理によるパラメータの伝搬を行うため、真値に近い値を、高速に各ピクセルに与えることが可能となる。これにより、本実施形態によれば、視点画像におけるピクセルにおけるパラメータの推定が高い精度で高速に行うことができ、高精度のデプスマップの生成が可能となる。   According to the present embodiment, as described above, the initial value is generated as a random number, and the larger the number of pixels of the viewpoint image, the larger the number of random numbers given as the initial value, and the surrounding neighboring in the spatial propagation processing Since parameters are propagated to the pixels by parallel processing, a value close to the true value can be given to each pixel at high speed. Thereby, according to this embodiment, the parameter in the pixel in the viewpoint image can be estimated at high speed with high accuracy, and a depth map can be generated with high accuracy.

また、本実施形態によれば、初期値を乱数として生成しており、多視点画像の数が多いほど、対象視点画像で初期値として与えられた真値に近いパラメータが視点伝搬処理によって近傍視点画像に伝搬される確率が高くなり、パラメータの空間伝搬処理及び視点伝搬処理の各々を並列化して行うため、従来手法よりも少ない繰り返し数で、各ピクセルのパラメータの推定の結果を高速に収束させることができる。
また、本実施形態によれば、並列化した視点伝搬処理によって、複数の視点画像のパラメータを伝播させることにより、視点画像においてテクスチャの変化が少ない領域に対しても、高速に高い精度でパラメータを推定することが可能となる。
Further, according to the present embodiment, the initial value is generated as a random number, and as the number of multi-viewpoint images increases, a parameter closer to the true value given as the initial value in the target viewpoint image becomes a near viewpoint by the viewpoint propagation process. Probability of being propagated to the image increases, and parameter spatial propagation processing and viewpoint propagation processing are performed in parallel, so the parameter estimation results for each pixel converge at high speed with fewer iterations than the conventional method. be able to.
In addition, according to the present embodiment, the parameters of a plurality of viewpoint images are propagated by the parallel viewpoint propagation processing, so that the parameters can be quickly and highly accurately applied to an area where the texture change is small in the viewpoint image. It is possible to estimate.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

また、上記に説明した各装置を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、実行処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものであってもよい。   In addition, a program for realizing each device described above is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed, thereby executing an execution process. May be. Here, the “computer system” may include an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。   Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used. The “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a CD-ROM, a hard disk built in a computer system, etc. This is a storage device.

さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。
さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
Further, the “computer-readable recording medium” refers to a volatile memory (for example, DRAM (Dynamic) in a computer system serving as a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. Random Access Memory)) that holds a program for a certain period of time is also included.
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the 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.
The program may be for realizing a part of the functions described above.
Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

11…制御部
12…初期化部
13…視点選択部
14…スレッド生成部
15…空間伝搬処理部
16…視点伝搬処理部
17…微調整部
18…デプスマップ生成部
19…記憶部
DESCRIPTION OF SYMBOLS 11 ... Control part 12 ... Initialization part 13 ... Viewpoint selection part 14 ... Thread generation part 15 ... Spatial propagation processing part 16 ... Viewpoint propagation processing part 17 ... Fine adjustment part 18 ... Depth map generation part 19 ... Storage part

Claims (6)

パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成装置であり、
デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化部と、
対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理部と、
対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理部と、
複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成部と
を備え、
前記空間伝搬処理部が、パラメータが伝搬されたピクセルである終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理部が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を並列して行う
ことを特徴とするデプスマップ生成装置。
A depth map generation device that creates a depth map used for three-dimensional image restoration using a patch match stereo method,
An initialization unit that generates and initializes a parameter including depth information and normal information in each viewpoint image of all viewpoints used for generation of depth maps by random numbers for each pixel;
A spatial propagation processing unit that propagates the parameter corresponding to a predetermined first evaluation value between adjacent pixels in the target viewpoint image that is an image of the target viewpoint;
A viewpoint propagation processing unit for propagating the parameter in correspondence with a predetermined second evaluation value between pixels of a target viewpoint image and a neighboring viewpoint image that is a neighboring viewpoint image that is a viewpoint near the target viewpoint;
A depth map generation unit that generates a depth map for each viewpoint image from the parameters of a plurality of different viewpoint images, and
The spatial propagation processing unit performs in parallel the process of propagating the parameter from each of the end pixels, which are the pixels to which the parameter has been propagated, to an unfinished pixel that is adjacent to the end pixel and has not been propagated. In addition, the depth map generation device is characterized in that the viewpoint propagation processing unit performs in parallel the process of propagating the parameters of each of the end pixels to the unfinished pixels of the neighboring viewpoint image.
前記空間伝搬処理部が、パラメータの伝搬処理を所定の複数回繰り返して行い、当該空間伝搬処理部が、伝搬の処理を行う際の回数が奇数回の場合、前記対象視点画像の矩形形状における所定の頂点である第1頂点のピクセルからパラメータを伝搬させる処理を行い、伝搬の処理を行う際の回数が偶数回の場合、当該対象視点の前記第1頂点の点対称の位置にある第2頂点のピクセルからパラメータを伝搬させる処理を行う
ことを特徴とする請求項1に記載のデプスマップ生成装置。
The spatial propagation processing unit repeatedly performs parameter propagation processing a predetermined number of times, and when the spatial propagation processing unit performs the propagation process an odd number of times, the predetermined shape in the rectangular shape of the target viewpoint image When the parameter is propagated from the pixel of the first vertex that is the vertex of the target and the number of times of performing the propagation process is an even number, the second vertex at the point-symmetrical position of the first vertex of the target viewpoint The depth map generation apparatus according to claim 1, wherein a process of propagating a parameter from the pixel is performed.
前記空間伝搬処理部及び前記視点伝搬処理部の各々におけるパラメータの伝搬処理が終了した終了ピクセルに対して、当該ピクセルに伝搬されたパラメータの微調整を、乱数により発生した調整値により行うパラメータ微調整部
をさらに備える
ことを特徴とする請求項1または請求項2に記載のデプスマップ生成装置。
For the end pixel for which the parameter propagation processing has been completed in each of the spatial propagation processing unit and the viewpoint propagation processing unit, the parameter fine adjustment is performed by adjusting the parameter propagated to the pixel with an adjustment value generated by a random number. The depth map generating apparatus according to claim 1, further comprising: a unit.
前記空間伝搬処理部が、前記複数の対象視点画像に対して並列にパラメータの伝搬処理を行う
ことを特徴とする請求項1から請求項3のいずれか一項に記載のデプスマップ生成装置。
The depth map generation device according to any one of claims 1 to 3, wherein the spatial propagation processing unit performs parameter propagation processing on the plurality of target viewpoint images in parallel.
パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成方法であり、
初期化部が、デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化過程と、
空間伝搬処理部が、対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理過程と、
視点伝搬処理部が、対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理過程と、
デプスマップ生成部が、複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成過程と
を含み、
前記空間伝搬処理部が、パラメータが伝搬されたピクセルである伝搬終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理部が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を並列して行う
ことを特徴とするデプスマップ生成方法。
A depth map generation method for creating a depth map used for 3D image restoration using a patch match stereo method,
An initialization process in which an initialization unit generates and initializes a parameter including depth information and normal information for each pixel by random numbers in each viewpoint image of all viewpoints used to generate a depth map;
A spatial propagation processing step in which the spatial propagation processing unit propagates the parameter corresponding to a predetermined first evaluation value between adjacent pixels in the target viewpoint image that is an image of the target viewpoint;
A viewpoint in which the viewpoint propagation processing unit propagates the parameter in correspondence with a predetermined second evaluation value between pixels of the target viewpoint image and a neighboring viewpoint image that is a neighboring viewpoint image that is a viewpoint near the target viewpoint. Propagation process,
A depth map generating unit that generates a depth map for each viewpoint image from the parameters of a plurality of different viewpoint images; and
In parallel, the spatial propagation processing unit performs the process of propagating the parameter from each of the propagation end pixels which are the pixels to which the parameter has been propagated, to the unfinished pixels which are adjacent to the end pixel and have not been propagated. The depth map generation method is characterized in that the viewpoint propagation processing unit performs in parallel a process of propagating the parameters of each of the end pixels to the unfinished pixels of the neighboring viewpoint image.
パッチマッチステレオ法を用いて3次元画像復元に用いるデプスマップを作成するデプスマップ生成装置の処理をコンピュータに実行させるプログラムであり、
前記コンピュータに、
デプスマップの生成に用いる全ての視点の視点画像各々において深度情報及び法線情報を含むパラメータをピクセル毎に乱数により生成して初期化する初期化手段と、
対象視点の画像である対象視点画像における隣接するピクセル間において、前記パラメータを所定の第1評価値に対応して伝搬させる空間伝搬処理手段と、
対象視点画像と前記対象視点の近傍の視点である近傍視点の画像である近傍視点画像とのピクセル間で前記パラメータを、所定の第2評価値に対応して伝搬させる視点伝搬処理手段、
複数の異なる前記視点画像の前記パラメータから、前記視点画像毎のデプスマップを生成するデプスマップ生成手段
として動作させ、
パラメータが伝搬されたピクセルである終了ピクセルの各々から、当該終了ピクセルそれぞれに隣接する伝搬の終了していない未終了ピクセルに対してパラメータを伝搬する処理を並列して行い、また前記視点伝搬処理手段が、前記終了ピクセル各々のパラメータを、前記近傍視点画像の未終了ピクセルに対して伝搬させる処理を前記空間伝搬処理手段に並列に行わせるプログラム。
A program that causes a computer to execute processing of a depth map generation device that creates a depth map used for three-dimensional image restoration using a patch match stereo method,
In the computer,
Initialization means for generating and initializing parameters including depth information and normal line information for each pixel by random numbers in each viewpoint image of all viewpoints used for generation of the depth map;
Spatial propagation processing means for propagating the parameter corresponding to a predetermined first evaluation value between adjacent pixels in the target viewpoint image that is an image of the target viewpoint;
Viewpoint propagation processing means for propagating the parameter in correspondence with a predetermined second evaluation value between pixels of a target viewpoint image and a neighboring viewpoint image that is a neighboring viewpoint image that is a viewpoint near the target viewpoint;
Operating as a depth map generating means for generating a depth map for each viewpoint image from the parameters of a plurality of different viewpoint images;
The process of propagating parameters from each of the end pixels, which are the pixels to which the parameter has been propagated, to unfinished pixels that have not been propagated adjacent to the respective end pixels is performed in parallel. A program for causing the spatial propagation processing means to perform in parallel the process of propagating the parameters of each of the end pixels to the unfinished pixels of the neighboring viewpoint image.
JP2016124820A 2016-06-23 2016-06-23 Depth map generator, depth map generation method and program Active JP6765653B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016124820A JP6765653B2 (en) 2016-06-23 2016-06-23 Depth map generator, depth map generation method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016124820A JP6765653B2 (en) 2016-06-23 2016-06-23 Depth map generator, depth map generation method and program

Publications (2)

Publication Number Publication Date
JP2017228152A true JP2017228152A (en) 2017-12-28
JP6765653B2 JP6765653B2 (en) 2020-10-07

Family

ID=60891906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016124820A Active JP6765653B2 (en) 2016-06-23 2016-06-23 Depth map generator, depth map generation method and program

Country Status (1)

Country Link
JP (1) JP6765653B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111357034A (en) * 2019-03-28 2020-06-30 深圳市大疆创新科技有限公司 Point cloud generation method, system and computer storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011185720A (en) * 2010-03-08 2011-09-22 Ricoh Co Ltd Distance obtaining device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011185720A (en) * 2010-03-08 2011-09-22 Ricoh Co Ltd Distance obtaining device

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
MUTSUKI HIRADATE, 外4名: ""An Extension of PatchMatch Stereo for 3D Reconstruction from Multi-View Images"", 2015 3RD IAPR ASIAN CONFERENCE ON PATTERN RECOGNITION (ACPR), JPN6020019402, 6 November 2015 (2015-11-06), US, pages 061 - 065, ISSN: 0004280881 *
SILVANO GALLIANI, 外2名: ""Massively Parallel Multiview Stereopsis by Surface Normal Diffusion"", 2015 IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV), JPN6020019401, 13 December 2015 (2015-12-13), US, pages 873 - 881, ISSN: 0004280880 *
中野広基, 外2名: ""PatchMatch法を用いた時空間視差平面モデルの推定に基づくステレオ動画像における視差推定"", 電子情報通信学会技術研究報告, vol. 第115巻, 第117号, JPN6020019400, 22 June 2015 (2015-06-22), JP, pages 53 - 58, ISSN: 0004280879 *
中野広基, 外2名: ""時空間視差曲面モデルを用いたステレオ動画像における視差推定"", 電子情報通信学会論文誌D, JPN6020019399, 1 June 2016 (2016-06-01), JP, pages 1 - 12, ISSN: 0004280878 *
平舘睦基, 外4名: ""多視点ステレオのためのPatchMatch Stereoの拡張と性能評価"", 映像情報メディア学会技術報告, vol. 第39巻, 第30号, JPN6020019398, 17 August 2015 (2015-08-17), JP, pages 65 - 68, ISSN: 0004280877 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111357034A (en) * 2019-03-28 2020-06-30 深圳市大疆创新科技有限公司 Point cloud generation method, system and computer storage medium

Also Published As

Publication number Publication date
JP6765653B2 (en) 2020-10-07

Similar Documents

Publication Publication Date Title
JP7173772B2 (en) Video processing method and apparatus using depth value estimation
JP7403528B2 (en) Method and system for reconstructing color and depth information of a scene
JP6261489B2 (en) Non-primary computer-readable medium storing method, image processing apparatus, and program for extracting plane from three-dimensional point cloud
CN110276829B (en) Three-dimensional representation by multi-scale voxel hash processing
WO2015135323A1 (en) Camera tracking method and device
WO2020072905A1 (en) Depth from motion for augmented reality for handheld user devices
CN112889091A (en) Camera pose estimation using fuzzy features
JP2020515931A (en) Method and apparatus for combining scene segmentation and 3D reconstruction
EP3326156B1 (en) Consistent tessellation via topology-aware surface tracking
WO2012100225A1 (en) Systems and methods for generating a three-dimensional shape from stereo color images
US10643372B2 (en) Method for reconstructing three-dimensional information of object and apparatus for the same
US9171393B2 (en) Three-dimensional texture reprojection
da Silveira et al. Dense 3D scene reconstruction from multiple spherical images for 3-DoF+ VR applications
US10097808B2 (en) Image matching apparatus and method thereof
JP5178538B2 (en) Method for determining depth map from image, apparatus for determining depth map
US11189053B2 (en) Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable storage medium
JP2009530701A5 (en)
CN113393566A (en) Depth-based 3D reconstruction using a priori depth scenes
KR20220026423A (en) Method and apparatus for three dimesiontal reconstruction of planes perpendicular to ground
JP6765653B2 (en) Depth map generator, depth map generation method and program
CN112562087A (en) Method and apparatus for estimating pose
JP5728399B2 (en) Measuring device, method and program
JP2017045124A (en) Parallax detection device
TW201528774A (en) Apparatus and method for creating 3D scene
Uh et al. Efficient multiview stereo by random-search and propagation

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20160624

A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20160708

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160804

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20181116

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190416

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200609

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200720

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200909

R150 Certificate of patent or registration of utility model

Ref document number: 6765653

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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