JP5200042B2 - Disparity estimation apparatus and program thereof - Google Patents

Disparity estimation apparatus and program thereof Download PDF

Info

Publication number
JP5200042B2
JP5200042B2 JP2010042109A JP2010042109A JP5200042B2 JP 5200042 B2 JP5200042 B2 JP 5200042B2 JP 2010042109 A JP2010042109 A JP 2010042109A JP 2010042109 A JP2010042109 A JP 2010042109A JP 5200042 B2 JP5200042 B2 JP 5200042B2
Authority
JP
Japan
Prior art keywords
energy
parallax
term
smooth
pixel
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.)
Expired - Fee Related
Application number
JP2010042109A
Other languages
Japanese (ja)
Other versions
JP2011180675A (en
Inventor
健佑 池谷
祐一 岩舘
健介 久富
美和 片山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2010042109A priority Critical patent/JP5200042B2/en
Publication of JP2011180675A publication Critical patent/JP2011180675A/en
Application granted granted Critical
Publication of JP5200042B2 publication Critical patent/JP5200042B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、信頼度伝搬法により、ステレオ画像の各画素の視差を示す視差情報を決定する視差推定装置およびそのプログラムに関する。   The present invention relates to a disparity estimation apparatus that determines disparity information indicating the disparity of each pixel of a stereo image by a reliability propagation method and a program thereof.

例えば、3次元立体モデルを生成する際、ステレオ画像の各画素の視差を推定する視差推定技術が広く用いられている。この視差推定技術としては、例えば、ステレオ画像間で類似度を求めるブロックマッチングが知られている。また、類似度の計算方法としては、例えば、差の二乗和を求めるSSD(Sum of Squared Difference)、差の絶対和を求めるSAD(Sum of Absolute Difference)、および、正規化相互相関を求めるZNCC(Zero-mean Normalized Cross-Correlation)が知られている(例えば、非特許文献1)。   For example, when generating a three-dimensional stereo model, a parallax estimation technique for estimating the parallax of each pixel of a stereo image is widely used. As this parallax estimation technique, for example, block matching for obtaining a similarity between stereo images is known. As a method of calculating the similarity, for example, an SSD (Sum of Squared Difference) for obtaining the sum of squares of a difference, an SAD (Sum of Absolute Difference) for obtaining an absolute sum of the differences, and a ZNCC ( Zero-mean Normalized Cross-Correlation) is known (for example, Non-Patent Document 1).

また、視差推定技術としては、視差情報にマルコフランダムフィールドモデルを仮定し、ステレオ画像間のデータ項とスムーズ項とで構成されるエネルギーを最小化することにより、ノイズが少なく滑らかな視差情報を生成する信頼度伝搬法も知られている(例えば、非特許文献2)。ここで、データ項はステレオ画像間の類似度であり、スムーズ項は視差の不連続性を表す。   Also, as the parallax estimation technology, a Markov random field model is assumed for the parallax information, and the energy consisting of the data term between the stereo images and the smooth term is minimized to generate smooth parallax information with less noise A reliability propagation method is also known (for example, Non-Patent Document 2). Here, the data term is a similarity between stereo images, and the smooth term represents disparity disparity.

ディジタル画像処理、CG−Arts協会、2006年、p202−p204Digital image processing, CG-Arts Association, 2006, p202-p204 Pedro F.Felzenszwalb,Daniel P.Huttenlocher:Efficient Belief Propagation for Early Vision.CVPR(1)2004:261‐268Pedro F. Felzenszwalb, Daniel P. Huttenlocher: Efficient Belief Propagation for Early Vision. CVPR (1) 2004: 261-268

しかし、この信頼度伝搬法では、撮影カメラの個体差や撮影環境によってステレオ画像間に輝度差が生じた場合、視差の推定精度が低下するという問題がある。例えば、図14(a)のコート面に表示された「20」という模様を、2台の撮影カメラでステレオ画像として撮影した場合を考える。ここで、図14(a)の下方向に配置された1台目の撮影カメラが、図14(b)に示す画像を撮影したとする。この場合、図14(b)の画像において、「20」という模様の輝度ヒストグラムは、図14(c)に示すようになる。一方、図14(a)の斜め下方向に配置された2台目の撮影カメラが、図14(d)に示す画像を撮影したとする。この場合、図14(d)の画像において、「20」という模様の輝度ヒストグラムは、図14(e)に示すようになる。なお、図14(b),(d)では、照明光が強くなる程、濃い色を付している。また、図14(c),(e)では、縦軸が輝度値であり、横軸がその輝度値を有する画素数を示す。   However, this reliability propagation method has a problem that the parallax estimation accuracy is lowered when a luminance difference occurs between stereo images due to individual differences of photographing cameras or photographing environments. For example, consider a case where the pattern “20” displayed on the coat surface of FIG. 14A is shot as a stereo image by two shooting cameras. Here, it is assumed that the first photographing camera arranged in the downward direction of FIG. 14A has photographed the image shown in FIG. In this case, in the image of FIG. 14B, the luminance histogram having the pattern “20” is as shown in FIG. On the other hand, it is assumed that the second photographing camera arranged in the diagonally downward direction in FIG. 14A photographs the image shown in FIG. In this case, in the image of FIG. 14D, the luminance histogram having the pattern “20” is as shown in FIG. In FIGS. 14B and 14D, a darker color is given as the illumination light becomes stronger. 14C and 14E, the vertical axis represents the luminance value, and the horizontal axis represents the number of pixels having the luminance value.

ここで、2台の撮影カメラは、それぞれから見て、「20」という模様に対する照明光のあたり方が異なる撮影環境にある。このため、図14(c)および図14(e)に示すように、ステレオ画像間の輝度ヒストグラムは、大きく異なる。この場合、図14(a)の「20」という模様について、図14(b),(c)のステレオ画像から視差を推定することが困難である。この輝度差により視差の推定精度が低下する問題は、撮影カメラのレベル調整を十分に行っても解消することが難しい。   Here, the two photographing cameras are in a photographing environment in which the illumination light hits the pattern “20” as seen from each. For this reason, as shown in FIGS. 14C and 14E, the luminance histograms between the stereo images are greatly different. In this case, it is difficult to estimate the parallax from the stereo images in FIGS. 14B and 14C for the pattern “20” in FIG. The problem that the parallax estimation accuracy is reduced due to the luminance difference is difficult to solve even if the level of the photographing camera is sufficiently adjusted.

そこで、本発明は、前記した問題を解決し、視差の推定精度の低下を抑制する視差推定装置およびそのプログラムを提供することを課題とする。   Therefore, an object of the present invention is to provide a parallax estimation device that solves the above-described problems and suppresses a decrease in the accuracy of parallax estimation and a program thereof.

前記した課題を解決するため、本願第1発明に係る視差推定装置は、ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、上位階層データ項生成手段と、上位階層スムーズ項生成手段と、上位階層エネルギー伝搬手段と、視差候補決定手段と、下位階層データ項生成手段と、下位階層スムーズ項生成手段と、下位階層エネルギー伝搬手段と、視差決定手段と、を備えることを特徴とする。   In order to solve the above-described problem, the parallax estimation device according to the first invention of the present application uses the method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. A disparity estimation apparatus that determines disparity information indicating disparity for each pixel of a stereo image, wherein an upper layer data term generation unit, an upper layer smooth term generation unit, an upper layer energy propagation unit, a disparity candidate determination unit, The apparatus comprises: a lower layer data term generation unit, a lower layer smooth term generation unit, a lower layer energy propagation unit, and a disparity determination unit.

かかる構成によれば、視差推定装置は、上位階層データ項生成手段によって、前記ステレオ画像が入力されると共に、正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する。ここで、正規化相互相関で算出した類似度にコサイン逆関数を適用することで、視差推定装置は、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。そして、視差推定装置は、上位階層スムーズ項生成手段で、所定の生成式によってスムーズ項を生成する。   According to this configuration, the disparity estimation apparatus uses the error function obtained by applying the inverse cosine function to the similarity calculated by the normalized cross-correlation while the stereo image is input by the upper layer data term generation unit. A data term is generated from the input stereo image. Here, by applying the inverse cosine function to the similarity calculated by the normalized cross-correlation, the disparity estimation apparatus can obtain an energy distribution that facilitates finding the minimum value of energy. Then, the disparity estimation apparatus generates a smooth term using a predetermined generation formula by means of higher hierarchy smooth term generation means.

また、視差推定装置は、上位階層エネルギー伝搬手段によって、前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する。そして、視差推定装置は、視差候補決定手段によって、前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する。つまり、視差推定装置は、1つのブロックを1つの画素とみなしてエネルギーの伝搬を行う。   Further, the disparity estimation apparatus is configured to collect energy for each pixel including the data term generated by the upper layer data term generation unit and the smooth term generated by the upper layer smooth term generation unit by the upper layer energy propagation unit. Generate an energy set, divide the energy set into blocks composed of a plurality of pixels, and repeat the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed Then, the energy is updated for each block. Then, the disparity estimation apparatus determines, as the disparity of the block, the disparity that minimizes the energy for each block updated by the higher-layer energy propagation unit by the disparity candidate determining unit, and the disparity of the block is included in the block It assigns to a pixel and outputs it as a parallax candidate for each pixel. That is, the parallax estimation apparatus performs energy propagation by regarding one block as one pixel.

また、視差推定装置は、下位階層データ項生成手段によって、前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する。ここで、正規化相互相関で算出した類似度にコサイン逆関数を適用することで、視差推定装置は、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。そして、視差推定装置は、下位階層スムーズ項生成手段で、所定の生成式によってスムーズ項を生成する。   Further, the disparity estimation apparatus receives the stereo image by the lower-layer data term generation unit and uses an error function obtained by applying a cosine inverse function to the similarity calculated by the normalized cross-correlation. Data terms are generated from the stereo image. Here, by applying the inverse cosine function to the similarity calculated by the normalized cross-correlation, the disparity estimation apparatus can obtain an energy distribution that facilitates finding the minimum value of energy. Then, the disparity estimation apparatus generates a smooth term using a predetermined generation formula by the lower-layer smooth term generation unit.

また、視差推定装置は、下位階層エネルギー伝搬手段によって、前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する。そして、視差推定装置は、視差決定手段によって、前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する。   Further, the disparity estimation apparatus is configured to collect energy for each pixel including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit by the lower layer energy propagation unit. An energy set is generated, energy generated by a predetermined generation formula is propagated between pixels in the energy set, and the energy is updated for each pixel. Then, the disparity estimation device is a disparity in which the energy for each pixel updated by the lower-layer energy propagation unit is minimized by the disparity determination unit, and the disparity included in the disparity candidate input from the disparity candidate determination unit The parallax information is determined.

つまり、視差推定装置は、ブロックの階層(上位階層)で画像全体のおおまかな視差(視差候補)を求め、画素の階層(下位階層)で被写体の輪郭を重視した視差を求める。そして、視差推定装置は、上位階層の視差候補に含まれる下位階層の視差を視差情報として決定することで、上位階層と下位階層との視差推定結果を統合する。   In other words, the parallax estimation apparatus obtains a general parallax (parallax candidate) of the entire image at the block hierarchy (upper hierarchy) and obtains parallax that emphasizes the contour of the subject at the pixel hierarchy (lower hierarchy). Then, the disparity estimation apparatus integrates the disparity estimation results of the upper layer and the lower layer by determining the lower layer disparity included in the upper layer disparity candidates as disparity information.

また、本願第2発明に係る視差推定装置は、前記上位階層データ項生成手段が、予め設定した第1の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成し、前記下位階層データ項生成手段が、前記第1の重み係数より大きな第2の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成することを特徴とする。   Further, the disparity estimation apparatus according to the second invention of the present application uses the error function obtained by further multiplying the first hierarchical coefficient set in advance by the higher-layer data term generating means using the data from the input stereo image. And the lower hierarchy data term generating means generates the data term from the input stereo image using the error function further multiplied by a second weighting factor larger than the first weighting factor. It is characterized by doing.

ここで、例えば、信頼度伝搬法では、重み係数を大きくすると、被写体の輪郭が判別し易くなる代わりにノイズが多くなり、重み係数を小さくすると、被写体の輪郭がぼやける代わりにノイズが少なくなる。このように、信頼度伝搬法では、1つの重み係数を適切な値に設定することが難しい。このため、視差推定装置は、ブロックの階層(上位階層)で、第1の重み係数を小さな値に設定して画像全体のおおまかな視差(視差候補)を求め、画素の階層(下位階層)で、第2の重み係数を大きな値に設定して被写体の輪郭を重視した視差を求める。   Here, for example, in the reliability propagation method, increasing the weighting factor increases noise instead of making the contour of the subject easy to discriminate, and decreasing the weighting factor reduces noise instead of blurring the contour of the subject. Thus, in the reliability propagation method, it is difficult to set one weighting factor to an appropriate value. For this reason, the disparity estimation apparatus obtains a rough disparity (disparity candidate) of the entire image by setting the first weighting factor to a small value in the block layer (upper layer), and in the pixel layer (lower layer). Then, the second weighting factor is set to a large value to obtain parallax that emphasizes the contour of the subject.

また、前記した課題を解決するため、本願第3発明に係る視差推定装置は、ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、上位階層データ項生成手段と、上位階層スムーズ項生成手段と、上位階層エネルギー伝搬手段と、視差候補決定手段と、下位階層データ項生成手段と、下位階層スムーズ項生成手段と、下位階層エネルギー伝搬手段と、視差決定手段と、を備えることを特徴とする。   In order to solve the above-described problem, the parallax estimation device according to the third invention of the present application uses a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. , A disparity estimation apparatus for determining disparity information indicating disparity for each pixel of the stereo image, wherein the upper layer data term generation unit, the upper layer smooth term generation unit, the upper layer energy propagation unit, and the disparity candidate determination unit And a lower layer data term generating unit, a lower layer smooth term generating unit, a lower layer energy propagation unit, and a disparity determining unit.

かかる構成によれば、視差推定装置は、上位階層データ項生成手段によって、前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する。また、視差推定装置は、上位階層スムーズ項生成手段で、所定の生成式によってスムーズ項を生成する。   According to this configuration, the disparity estimation apparatus receives the stereo image by the upper layer data term generation unit and generates a data term from the input stereo image using an error function. Further, the disparity estimation apparatus generates a smooth term by a predetermined generation formula using a higher-level smooth term generation unit.

また、視差推定装置は、上位階層エネルギー伝搬手段によって、前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する。そして、視差推定装置は、視差候補決定手段によって、前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する。つまり、視差推定装置は、1つのブロックを1つの画素とみなしてエネルギーの伝搬を行う。   Further, the disparity estimation apparatus is configured to collect energy for each pixel including the data term generated by the upper layer data term generation unit and the smooth term generated by the upper layer smooth term generation unit by the upper layer energy propagation unit. Generate an energy set, divide the energy set into blocks composed of a plurality of pixels, and repeat the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed Then, the energy is updated for each block. Then, the disparity estimation apparatus determines, as the disparity of the block, the disparity that minimizes the energy for each block updated by the higher-layer energy propagation unit by the disparity candidate determining unit, and the disparity of the block is included in the block It assigns to a pixel and outputs it as a parallax candidate for each pixel. That is, the parallax estimation apparatus performs energy propagation by regarding one block as one pixel.

また、視差推定装置は、下位階層データ項生成手段によって、前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する。そして、視差推定装置は、下位階層スムーズ項生成手段で、所定の生成式によってスムーズ項を生成する。   In addition, the parallax estimation apparatus generates the data term using the error function from the input stereo image while the stereo image is input by the lower layer data term generating means. Then, the disparity estimation apparatus generates a smooth term using a predetermined generation formula by the lower-layer smooth term generation unit.

また、視差推定装置は、下位階層エネルギー伝搬手段によって、前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する。そして、視差推定装置は、視差決定手段によって、前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する。   Further, the disparity estimation apparatus is configured to collect energy for each pixel including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit by the lower layer energy propagation unit. An energy set is generated, energy generated by a predetermined generation formula is propagated between pixels in the energy set, and the energy is updated for each pixel. Then, the disparity estimation device is a disparity in which the energy for each pixel updated by the lower-layer energy propagation unit is minimized by the disparity determination unit, and the disparity included in the disparity candidate input from the disparity candidate determination unit The parallax information is determined.

つまり、視差推定装置は、ブロックの階層(上位階層)で画像全体のおおまかな視差(視差候補)を求め、画素の階層(下位階層)で被写体の輪郭を重視した視差を求める。そして、視差推定装置は、上位階層の視差候補に含まれる下位階層の視差を視差情報として決定することで、上位階層と下位階層との視差推定結果を統合する。   In other words, the parallax estimation apparatus obtains a general parallax (parallax candidate) of the entire image at the block hierarchy (upper hierarchy) and obtains parallax that emphasizes the contour of the subject at the pixel hierarchy (lower hierarchy). Then, the disparity estimation apparatus integrates the disparity estimation results of the upper layer and the lower layer by determining the lower layer disparity included in the upper layer disparity candidates as disparity information.

また、前記した課題を解決するため、本願第4発明に係る視差推定装置は、ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、データ項生成手段と、スムーズ項生成手段と、エネルギー伝搬手段と、視差決定手段と、を備えることを特徴とする。   In order to solve the above-described problem, the parallax estimation device according to the fourth invention of the present application uses a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. A parallax estimation apparatus for determining parallax information indicating parallax for each pixel of the stereo image, comprising: a data term generating unit, a smooth term generating unit, an energy propagating unit, and a parallax determining unit. And

かかる構成によれば、視差推定装置は、データ項生成手段によって、前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する。ここで、正規化相互相関で算出した類似度にコサイン逆関数を適用することで、視差推定装置は、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。また、視差推定装置は、スムーズ項生成手段で、所定の生成式によってスムーズ項を生成する。   According to this configuration, the disparity estimation apparatus uses the error function in which the stereo image is input by the data term generation unit and the cosine inverse function is applied to the similarity calculated by the normalized cross-correlation. Data terms are generated from the input stereo image. Here, by applying the inverse cosine function to the similarity calculated by the normalized cross-correlation, the disparity estimation apparatus can obtain an energy distribution that facilitates finding the minimum value of energy. In addition, the parallax estimation apparatus is a smooth term generation unit that generates a smooth term using a predetermined generation formula.

また、視差推定装置は、エネルギー伝搬手段によって、前記データ項生成手段が生成したデータ項と前記スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する。そして、視差推定装置は、視差決定手段によって、前記エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差を前記視差情報として推定する。   In addition, the disparity estimation apparatus generates an energy set in which energy for each pixel including the data term generated by the data term generation unit and the smooth term generated by the smooth term generation unit is collected by the energy propagation unit, Energy generated by a predetermined generation formula is propagated between pixels in the energy set, and the energy is updated for each pixel. Then, the parallax estimation device estimates, as the parallax information, the parallax that minimizes the energy for each pixel updated by the energy propagation unit by the parallax determination unit.

また、本願第1発明〜本願第4発明に係る視差推定装置は、コンピュータを、前記した各手段として機能させる視差推定プログラムによって実現することが好ましい。   Moreover, it is preferable that the parallax estimation apparatus according to the first to fourth inventions of the present application be realized by a parallax estimation program that causes a computer to function as each of the means described above.

本発明は、以下のような優れた効果を奏する。
本願第1発明は、エネルギーの最小値を見つけやすいエネルギー分布を得ることができると共に、画像全体のおおまかな視差を求めた上位階層の視差推定結果と、被写体の輪郭を重視して視差を求めた下位階層の視差推定結果とを統合する。これによって、本願第1発明は、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。
The present invention has the following excellent effects.
The first invention of the present application can obtain an energy distribution that makes it easy to find the minimum value of energy, and also obtains a parallax with an emphasis on the parallax estimation result of the upper layer obtained for the rough parallax of the entire image and the contour of the subject. Integrate with the lower layer disparity estimation results. As a result, even when a luminance difference occurs between stereo images, the first invention of the present application can reduce parallax estimation errors due to the luminance difference and suppress a decrease in parallax estimation accuracy.

本願第2発明は、信頼度伝搬法において、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   According to the second aspect of the present invention, in the reliability propagation method, even when a luminance difference occurs between stereo images, an error in parallax estimation due to the luminance difference can be reduced, and a decrease in parallax estimation accuracy can be suppressed. .

本願第3発明は、画像全体のおおまかな視差を求めた上位階層の視差推定結果と、被写体の輪郭を重視して視差を求めた下位階層の視差推定結果とを統合する。これによって、本願第3発明は、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   The third invention of the present application integrates the upper layer parallax estimation result obtained for the rough parallax of the entire image and the lower layer parallax estimation result obtained for the parallax with emphasis on the contour of the subject. Thus, according to the third aspect of the present invention, even when a luminance difference occurs between stereo images, an error in parallax estimation caused by the luminance difference can be reduced, and a reduction in parallax estimation accuracy can be suppressed.

本願第4発明は、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。これによって、本願第4発明は、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   The fourth invention of the present application can obtain an energy distribution that facilitates finding the minimum value of energy. As a result, according to the fourth aspect of the present invention, even when a luminance difference occurs between stereo images, an error in parallax estimation caused by the luminance difference can be reduced, and a decrease in parallax estimation accuracy can be suppressed.

本発明での信頼度伝搬法による視差推定を説明する説明図である。It is explanatory drawing explaining the parallax estimation by the reliability propagation method in this invention. 本発明での信頼度伝搬法による視差推定の手順を示すフローチャートである。It is a flowchart which shows the procedure of the parallax estimation by the reliability propagation method in this invention. 本発明の第1実施形態に係る視差推定装置の構成を示すブロック図である。It is a block diagram which shows the structure of the parallax estimation apparatus which concerns on 1st Embodiment of this invention. 本発明における上位階層(ブロック)を説明する説明図である。It is explanatory drawing explaining the upper hierarchy (block) in this invention. 本発明における下位階層(画素)を説明する説明図である。It is explanatory drawing explaining the lower hierarchy (pixel) in this invention. 図3の視差推定装置によるテンプレートマッチングを説明する説明図である。It is explanatory drawing explaining the template matching by the parallax estimation apparatus of FIG. 本発明における上位階層でのメッセージの伝搬を説明する説明図である。It is explanatory drawing explaining the propagation of the message in the upper hierarchy in this invention. 本発明における上位階層の移動を説明する説明図であり、(a)は初期位置の図であり、(b)は(a)から1画素だけ水平方向に移動した図であり、(c)は(b)から1画素だけ水平方向に移動した図であり、(d)は(a)から1画素だけ垂直方向に移動した図である。It is explanatory drawing explaining the movement of the upper hierarchy in this invention, (a) is a figure of an initial position, (b) is the figure which moved only 1 pixel horizontally from (a), (c) is a figure. It is the figure which moved only 1 pixel in the horizontal direction from (b), (d) is the figure which moved only 1 pixel in the vertical direction from (a). 図3の視差推定装置による視差の決定を説明する説明図である。It is explanatory drawing explaining the determination of the parallax by the parallax estimation apparatus of FIG. 図3の視差推定装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the parallax estimation apparatus of FIG. 本発明の第3実施形態に係る視差推定装置の構成を示すブロック図である。It is a block diagram which shows the structure of the parallax estimation apparatus which concerns on 3rd Embodiment of this invention. 本発明の実施例を説明する画像であり、(a)は従来の信頼度伝搬法による視差画像であり、(b)は本発明による視差画像である。It is an image explaining the Example of this invention, (a) is the parallax image by the conventional reliability propagation method, (b) is the parallax image by this invention. 本発明の実施例を説明する画像であり、輝度を徐々に低下させた際のステレオ画像(L画像、R画像)と、従来の信頼度伝搬法による視差画像と、本発明による視差画像とである。It is an image explaining the Example of this invention, The stereo image (L image, R image) at the time of reducing a brightness | luminance gradually, The parallax image by the conventional reliability propagation method, and the parallax image by this invention is there. 従来の信頼度伝搬法による視差推定の際、輝度差により視差の推定精度が低下する問題を説明する図であり、(a)はコート面を示す図であり、(b)は1台目の撮影カメラでコート面の模様を撮影した図であり、(c)は(b)の模様部分の輝度ヒストグラムであり、(d)は2台目の撮影カメラでコート面の模様を撮影した図であり、(e)は(d)の模様部分の輝度ヒストグラムである。It is a figure explaining the problem that the estimation precision of parallax falls by the luminance difference at the time of parallax estimation by the conventional reliability propagation method, (a) is a figure which shows a coated surface, (b) is the 1st unit | set. It is the figure which image | photographed the pattern of the coat surface with the imaging camera, (c) is a brightness | luminance histogram of the pattern part of (b), (d) is the figure which image | photographed the pattern of the coat surface with the 2nd imaging camera. Yes, (e) is a luminance histogram of the pattern portion of (d).

(本発明の概略:信頼度伝搬法による視差推定)
本発明の各実施形態では、データ項とスムーズ項とを含むエネルギーを最小化する手法として、信頼度伝搬法を用いている。そこで、最初に、本発明における信頼度伝搬法の概略を説明する。
この信頼度伝搬法(BP法:Belief Propagation法)は、視差情報にマルコフランダムフィールド(MRF:Markov Random Field)モデルを仮定し、ステレオ画像のブロック間のデータ項とスムーズ項とで構成されるエネルギーを最小化することにより、ノイズが少なく滑らかな視差情報を生成するものである。ここで、信頼度伝搬法は、図1に示すように、処理の対象となる画素の近傍画素から、メッセージと呼ばれる各画素にどの視差が割り当てられるかという確率に関するエネルギーを受け取り、それらからメッセージ(エネルギー)を更新して近傍画素に伝搬させる。そして、信頼度伝搬法は、この処理を画像内の全ての画素に対して繰り返し行うことで各画素の視差情報を求める。
(Outline of the present invention: parallax estimation by reliability propagation method)
In each embodiment of the present invention, the reliability propagation method is used as a technique for minimizing energy including a data term and a smooth term. First, an outline of the reliability propagation method in the present invention will be described.
This reliability propagation method (BP method: Belief Propagation method) assumes a Markov Random Field (MRF) model for disparity information, and energy composed of data terms between blocks of a stereo image and smooth terms. By minimizing, smooth parallax information with less noise is generated. Here, in the reliability propagation method, as shown in FIG. 1, energy related to the probability of which disparity is assigned to each pixel called a message is received from neighboring pixels of the pixel to be processed, and the message ( Energy) is updated and propagated to neighboring pixels. In the reliability propagation method, this process is repeated for all the pixels in the image to obtain parallax information for each pixel.

ここで、図1では、枠(白塗四角形)が画素を示し、矢印mが画素間のメッセージ(エネルギー)の流れを示している。また、図1に示すように、画素を縦横に配列したものをエネルギー集合と呼ぶ。さらに、文字「s」が付された画素sは、メッセージの伝搬元となる画素を示し、文字「p」が付された画素pは、処理対象の画素を示し、文字「q」が付された画素qは、メッセージの伝搬先となる隣接画素を示す。なお、図1では、説明を簡易にするために、一部符号のみを図示した。   Here, in FIG. 1, a frame (white square) indicates a pixel, and an arrow m indicates a message (energy) flow between the pixels. In addition, as shown in FIG. 1, an arrangement of pixels vertically and horizontally is called an energy set. Further, a pixel s with the letter “s” indicates a pixel that is a message propagation source, a pixel p with the letter “p” indicates a pixel to be processed, and has a letter “q”. The pixel q indicates an adjacent pixel as a message propagation destination. In FIG. 1, only a part of the reference numerals are shown for simplicity of explanation.

図2を参照し、信頼度伝搬法による視差推定の手順を説明する。
図2に示すように、信頼度伝搬法では、メッセージの生成に必要なデータ項を生成する(ステップS1)。ここで、データ項を生成する誤差関数は、様々のものがあるが、RSSD(Root Sum of Squared Difference)で生成する場合、下記の式(1)となる。
With reference to FIG. 2, the procedure of parallax estimation by the reliability propagation method will be described.
As shown in FIG. 2, in the reliability propagation method, a data term necessary for generating a message is generated (step S1). Here, there are various error functions for generating a data term. When the error function is generated by RSSD (Root Sum of Squared Difference), the following equation (1) is obtained.

ここで、fは画素pの視差値、fは画素qの視差値、R(p)は画素pを中心としたブロック内の画素集合、Iはブロック画像の画素値、I´は処理対象画像の画素値、λは誤差関数の重み付けを表す。例えば、視差値fは、2枚のステレオ画像をテンプレートマッチングした際の画素pのずれ量から求めることができる(視差値fも同様)。また、iは水平方向の画素位置、jは垂直方向の画素位置である。 Here, f p is the parallax value of the pixel p, f q is the parallax value of the pixel q, R (p) is a pixel set in the block centered on the pixel p, I is the pixel value of the block image, and I ′ is the process The pixel value of the target image, λ, represents the weighting of the error function. For example, the parallax value f p can be obtained from the shift amount of the pixel p when two stereo images are subjected to template matching (the same applies to the parallax value f q ). Further, i is a horizontal pixel position, and j is a vertical pixel position.

続いて、信頼度伝搬法では、下記の式(2)で表されるスムーズ関数でスムーズ項を生成する(ステップS2)。このスムーズ関数は、視差情報の滑らかさ(例えば、ノイズの少なさ)を示す関数である。   Subsequently, in the reliability propagation method, a smooth term is generated with a smooth function expressed by the following equation (2) (step S2). This smooth function is a function indicating the smoothness (for example, low noise) of parallax information.

そして、信頼度伝搬法では、下記の式(3)で表される生成式によって、メッセージを生成し、このメッセージの伝搬を行う(ステップS3)。   In the reliability propagation method, a message is generated by a generation expression represented by the following expression (3), and this message is propagated (step S3).

ここで、minは最小値を取得する関数、mはメッセージ、tは反復回数、N(p)/qは画素q以外で画素pへメッセージを渡す近傍画素の集合、sはその近傍画素の要素画素を表す。この式(3)は、漸化式になっており、受け取ったメッセージをもとにメッセージを更新する処理を繰り返し行うことを示す。そして、信頼度伝搬法では、このメッセージの伝搬を全画素で行う。   Here, min is a function for obtaining a minimum value, m is a message, t is the number of iterations, N (p) / q is a set of neighboring pixels that pass a message to the pixel p other than the pixel q, and s is an element of the neighboring pixel Represents a pixel. This formula (3) is a recurrence formula and indicates that the process of updating the message is repeatedly performed based on the received message. In the reliability propagation method, this message is propagated in all pixels.

予め設定したT回まで反復したとき、画素qの視差に関するエネルギーは、下記の式(4)で表すことができる。そして、信頼度伝搬法では、この式(4)で表されるエネルギーbが最小になる視差値fを各画素の最終的な視差として決定する(ステップS4)。 When iterating up to T times set in advance, the energy related to the parallax of the pixel q can be expressed by the following equation (4). In the reliability propagation method, the parallax value f q that minimizes the energy b q represented by the equation (4) is determined as the final parallax of each pixel (step S4).

以下、本発明の各実施形態について、適宜図面を参照しながら詳細に説明する。なお、各実施形態において、同一の機能を有する手段には同一の符号を付し、説明を省略した。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings as appropriate. In each embodiment, means having the same function are denoted by the same reference numerals and description thereof is omitted.

(第1実施形態)
[視差推定装置の構成]
図3を参照し、本発明の第1実施形態に係る視差推定装置1の構成について説明する。図3に示すように、視差推定装置1は、ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する信頼度伝搬法により、ステレオ画像の視差を示す視差情報を推定するものである。第1実施形態では、視差推定装置1は、上位階層(ブロックの階層)および下位階層(画素の階層)という2つの階層でそれぞれ信頼度伝搬法による視差推定を行うため、上位階層処理部10と、下位階層処理部20とを備える。
(First embodiment)
[Configuration of parallax estimation apparatus]
With reference to FIG. 3, the structure of the parallax estimation apparatus 1 which concerns on 1st Embodiment of this invention is demonstrated. As illustrated in FIG. 3, the parallax estimation device 1 uses a reliability propagation method that minimizes energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity, to generate a parallax of a stereo image. The parallax information indicating is estimated. In the first embodiment, since the disparity estimation apparatus 1 performs disparity estimation by the reliability propagation method in two layers of an upper layer (block layer) and a lower layer (pixel layer), the upper layer processing unit 10 And a lower layer processing unit 20.

ここで、図4および図5を参照し、ブロックの階層と、画素の階層とをそれぞれ説明する。この上位階層UBは、図1のエネルギー集合における複数の画素で構成されたブロックである。図4の例では、上位階層UBは、縦横3つの画素で構成されるブロックとなる。そして、上位階層処理部10は、1つの上位階層UBを1つの画素とみなして、信頼度伝搬法による視差推定を行う。なお、図4のエネルギー集合では、枠(白塗四角形)がエネルギー集合内の画素を示し、破線が上位階層UBを示している。また、図4では、説明を簡易にするために、一部符号のみを図示した。   Here, with reference to FIG. 4 and FIG. 5, the hierarchy of a block and the hierarchy of a pixel are each demonstrated. The upper hierarchy UB is a block composed of a plurality of pixels in the energy set of FIG. In the example of FIG. 4, the upper hierarchy UB is a block composed of three pixels vertically and horizontally. Then, the upper layer processing unit 10 regards one upper layer UB as one pixel and performs parallax estimation by the reliability propagation method. In the energy set of FIG. 4, a frame (white square) indicates pixels in the energy set, and a broken line indicates the upper hierarchy UB. Further, in FIG. 4, only a part of the reference numerals are shown for the sake of simplicity.

また、下位階層LBは、図5に示すように、図1のエネルギー集合における画素のそれぞれである。つまり、下位階層処理部20は、図1の信頼度伝搬法と同様、画素間でメッセージを伝搬させて、視差推定を行うことになる。なお、図5のエネルギー集合では、枠(白塗四角形)がエネルギー集合内の画素を示し、破線が下位階層LBを示している。また、図5では、説明を簡易にするために、一部符号のみを図示した。   Further, as shown in FIG. 5, the lower hierarchy LB is each of the pixels in the energy set of FIG. That is, the lower layer processing unit 20 performs the parallax estimation by propagating the message between the pixels as in the reliability propagation method of FIG. In the energy set of FIG. 5, a frame (white square) indicates pixels in the energy set, and a broken line indicates the lower hierarchy LB. Further, in FIG. 5, only a part of the reference numerals are shown for the sake of simplicity.

以下、図3に戻り、視差推定装置1の構成について説明を続ける。
上位階層処理部10は、画像全体のおおまかな視差を求めるべく、上位階層での視差推定を行うものであり、データ項生成手段(上位階層データ項生成手段)11と、スムーズ項生成手段(上位階層スムーズ項生成手段)12と、メッセージ伝搬手段(上位階層エネルギー伝搬手段)13と、視差候補決定手段14とを備える。
Hereinafter, returning to FIG. 3, the description of the configuration of the parallax estimation apparatus 1 will be continued.
The upper layer processing unit 10 performs parallax estimation in the upper layer in order to obtain a rough parallax of the entire image, and includes a data term generation unit (upper layer data term generation unit) 11 and a smooth term generation unit (upper layer). (Hierarchy smooth term generation means) 12, message propagation means (upper hierarchy energy propagation means) 13, and disparity candidate determination means 14.

データ項生成手段11は、ステレオ画像(L画像、R画像)が入力されると共に、後記する誤差関数を用いて、入力されたステレオ画像からデータ項を生成する。まず、データ項生成手段11は、入力されたステレオ画像に対してテンプレートマッチングを行って画素ごとにずれ(視差)を算出する。具体的には、図6に示すように、データ項生成手段11は、L画像(ブロック画像)から所定サイズのテンプレートTPを抜き出す。そして、データ項生成手段11は、抜き出したテンプレートTPをR画像(処理対象画像)全体で移動させながら、それぞれの位置で類似度を求める。このとき、データ項生成手段11は、テンプレートTPをR画像の左端から水平方向に移動させながらテンプレートマッチングを行う(ラスタスキャン)。   The data term generation means 11 receives a stereo image (L image, R image) and generates a data term from the input stereo image using an error function described later. First, the data term generation unit 11 performs template matching on the input stereo image to calculate a shift (parallax) for each pixel. Specifically, as shown in FIG. 6, the data term generation unit 11 extracts a template TP having a predetermined size from the L image (block image). Then, the data term generation unit 11 obtains the similarity at each position while moving the extracted template TP over the entire R image (processing target image). At this time, the data term generation unit 11 performs template matching while moving the template TP in the horizontal direction from the left end of the R image (raster scan).

ここで、データ項生成手段11は、正規化相互相関(ZNCC)で類似度を算出する。つまり、データ項生成手段11は、ステレオ画像の類似度を下記の式(5)を用いて算出する。   Here, the data term generation means 11 calculates the similarity by normalized cross correlation (ZNCC). That is, the data term generation unit 11 calculates the similarity of stereo images using the following equation (5).

ここで、Iはブロック画像のテンプレート内の画素値の平均値、I´は処理対象画像のテンプレート内の画素値の平均値である。   Here, I is an average value of pixel values in the template of the block image, and I ′ is an average value of pixel values in the template of the processing target image.

そして、データ項生成手段11は、この類似度にコサイン逆関数を適用する誤差関数によって、この類似度をブロック画像および処理対象画像双方のベクトルのなす角に変換し、データ項を生成する。つまり、データ項生成手段11は、下記の式(6)および式(7)で表される誤差関数によりデータ項を生成する。このとき、データ項生成手段11は、上位階層での処理を行うところ、式(7)で表される上位階層ごとの誤差関数を用いる。このとき、上位階層で画像全体のおおまかな視差を求めるため、データ項生成手段11は、後記するデータ項生成手段21よりも、式(6)における重み付けを小さく設定する(例えば、λ=5)。その後、データ項生成手段11は、生成したデータ項をメッセージ伝搬手段13に出力する。   Then, the data term generation unit 11 converts the similarity into an angle formed by the vectors of both the block image and the processing target image by using an error function that applies an inverse cosine function to the similarity, and generates a data term. That is, the data term generation unit 11 generates a data term by using an error function expressed by the following equations (6) and (7). At this time, the data term generation means 11 uses the error function for each upper layer expressed by the equation (7) when performing processing in the upper layer. At this time, in order to obtain a rough parallax of the entire image in the upper hierarchy, the data term generation unit 11 sets the weight in the equation (6) smaller than the data term generation unit 21 described later (for example, λ = 5). . Thereafter, the data term generation unit 11 outputs the generated data term to the message propagation unit 13.

ここで、p´は処理対象の上位階層(ブロック)であり、B(p)は画素pを中心とするε×εの上位階層(ブロック)内の画素集合である。   Here, p ′ is an upper layer (block) to be processed, and B (p) is a set of pixels in an upper layer (block) of ε × ε centered on the pixel p.

スムーズ項生成手段12は、所定の生成式によってスムーズ項を生成する。ここで、スムーズ項生成手段12は、下記の式(8)で表される上位階層ごとのスムーズ関数を用いて、スムーズ項を生成する。そして、スムーズ項生成手段12は、生成したスムーズ項をメッセージ伝搬手段13に出力する。   The smooth term generating means 12 generates a smooth term by a predetermined generation formula. Here, the smooth term generating means 12 generates a smooth term by using a smooth function for each upper layer expressed by the following equation (8). Then, the smooth term generation unit 12 outputs the generated smooth term to the message propagation unit 13.

ここで、q´は上位階層p´のメッセージ伝搬先となる上位階層(ブロック)、εは上位階層(ブロック)境界の画素数である。つまり、εは、上位階層(ブロック)の縦横一辺あたりの画素数である。   Here, q ′ is the upper layer (block) that is the message propagation destination of the upper layer p ′, and ε is the number of pixels at the upper layer (block) boundary. That is, ε is the number of pixels per one side of the upper and lower layers (blocks).

ここで、マルコフランダムフィールドおよびスムーズ項について補足する。このマルコフランダムフィールドは、画像で互いに隣接する画素の色、輝度や視差が似ていることを示すモデルである。そして、スムーズ項は、このマルコフランダムフィールドを踏まえた視差の連続性に関する関数であり、各画素に視差を割り当てた際、互いに隣接する画素の視差が同じであればエネルギーが小さく、異なればエネルギーが大きくなる。例えば、マルコフランダムフィールドでは、ある画素の視差値が1で、その隣接画素の視差値が1である場合、エネルギーは0となる。また、ある画素の視差値が1で、その画素に隣接する画素の視差値が2である場合、例えば、エネルギーは1となる。さらに、ある画素の視差値が1で、その隣接画素の視差値が10である場合、例えば、エネルギーは9となる。つまり、信頼度伝搬法において、エネルギーが最小となる視差が最終的な視差情報となることを考慮すれば、このマルコフランダムフィールドにより、互いに隣接する画素は、同じような視差値になり易くなる。   Here, it supplements about a Markov random field and a smooth term. This Markov random field is a model indicating that the colors, luminance and parallax of pixels adjacent to each other in the image are similar. The smooth term is a function related to continuity of parallax based on this Markov random field. When parallax is assigned to each pixel, if the parallax of adjacent pixels is the same, the energy is small, and if different, the energy is small. growing. For example, in a Markov random field, when a parallax value of a certain pixel is 1 and a parallax value of an adjacent pixel is 1, the energy is 0. In addition, when the disparity value of a pixel is 1 and the disparity value of a pixel adjacent to the pixel is 2, for example, the energy is 1. Further, when the disparity value of a certain pixel is 1 and the disparity value of the adjacent pixel is 10, for example, the energy is 9. That is, in the reliability propagation method, considering that the parallax with the minimum energy becomes the final parallax information, pixels adjacent to each other are likely to have the same parallax value due to this Markov random field.

メッセージ伝搬手段13は、データ項生成手段11からデータ項が入力され、スムーズ項生成手段12からスムーズ項が入力される。そして、メッセージ伝搬手段13は、図1と同様に、これらデータ項およびスムーズ項を含むエネルギーが集合したエネルギー集合を生成する。例えば、メッセージ伝搬手段13は、画像における画素位置に対応した位置に画素ごとのエネルギーを配置することで、エネルギー集合を生成する。   The message propagation means 13 receives a data term from the data term generation means 11 and receives a smooth term from the smooth term generation means 12. And the message propagation means 13 produces | generates the energy set which the energy containing these data terms and smooth terms gathered similarly to FIG. For example, the message propagation unit 13 generates an energy set by arranging energy for each pixel at a position corresponding to the pixel position in the image.

そして、メッセージ伝搬手段13は、このエネルギー集合を予め設定した数の画素(例えば、縦横にε個の画素)で構成される上位階層に分割し、処理対象の上位階層の移動と、処理対象の上位階層に対するメッセージの伝搬とを繰り返して、上位階層ごとにエネルギーを更新する。言い換えるなら、メッセージ伝搬手段13は、前記した式(3)において、1つの上位階層を1つの画素とみなして、上位階層間でメッセージの伝搬を行う。なお、移動とは、エネルギー集合内において、処理対象の上位階層を水平方向および垂直方向に所定の回数移動させることであり、その詳細は後記する。   Then, the message propagation means 13 divides this energy set into an upper layer composed of a predetermined number of pixels (for example, ε pixels vertically and horizontally), and moves the upper layer of the processing target, By repeating the message propagation to the upper layer, the energy is updated for each upper layer. In other words, the message propagation means 13 regards one upper layer as one pixel in the above equation (3), and propagates a message between the upper layers. The movement is to move the upper hierarchy to be processed a predetermined number of times in the horizontal direction and the vertical direction within the energy set, details of which will be described later.

視差候補決定手段14は、メッセージ伝搬手段13が更新した、上位階層ごとのエネルギーが最小となる視差を上位階層の視差として決定する。つまり、視差候補決定手段14は、前記した式(4)において、1つの上位階層を1つの画素とみなして、上位階層の視差を決定する。そして、視差候補決定手段14は、決定した上位階層の視差をこの上位階層に含まれる各画素に割り当てて、画素ごとの視差候補として後記する視差決定手段24に出力する。   The parallax candidate determining unit 14 determines the parallax with the lowest energy for each upper layer updated by the message propagation unit 13 as the parallax of the upper layer. That is, the parallax candidate determination unit 14 determines the upper layer parallax by regarding one upper layer as one pixel in the above-described equation (4). Then, the parallax candidate determination unit 14 assigns the determined upper layer parallax to each pixel included in the upper layer, and outputs it to the parallax determination unit 24 described later as a parallax candidate for each pixel.

<上位階層でのメッセージの伝搬および視差候補の決定>
以下、図7,図8を参照し、メッセージ伝搬手段13および視差候補決定手段14を詳細に説明する(適宜図3参照)。なお、図7,図8のエネルギー集合では、枠(白塗四角形)が画素を示し、矢印mがメッセージの流れを示し、破線が上位階層UB(UB1〜5)を示している。また、図7,図8では、説明を簡易にするために、一部符号のみを図示した。
<Propagation of messages and determination of disparity candidates at higher layers>
Hereinafter, the message propagation unit 13 and the parallax candidate determination unit 14 will be described in detail with reference to FIGS. 7 and 8 (see FIG. 3 as appropriate). In the energy set of FIGS. 7 and 8, a frame (white square) indicates a pixel, an arrow m indicates a message flow, and a broken line indicates an upper hierarchy UB (UB1 to UB5). 7 and 8, only a part of the reference numerals are shown for the sake of simplicity.

例えば、図7に示すように、メッセージ伝搬手段13は、メッセージの伝搬元である上位階層UB1〜UB3から、処理対象の上位階層UB4にメッセージを受け渡す。また、上位階層UB4において、メッセージ伝搬手段13が、受け取ったメッセージで、上位階層UB4のエネルギーを更新する共に、上位階層UB4から、メッセージの伝搬先である上位階層UB5にメッセージを受け渡す。このとき、視差候補決定手段14は、処理対象の上位階層UB4について、エネルギーが最小となる視差をこの上位階層UB4の視差として決定する。そして、視差候補決定手段14は、この上位階層UB4の視差を、上位階層UB4に含まれる全ての画素の視差とする。   For example, as shown in FIG. 7, the message propagation means 13 delivers a message from the upper layer UB1 to UB3, which is the message propagation source, to the upper layer UB4 to be processed. In the upper layer UB4, the message propagation means 13 updates the energy of the upper layer UB4 with the received message, and delivers the message from the upper layer UB4 to the upper layer UB5 that is the message propagation destination. At this time, the parallax candidate determination means 14 determines the parallax that minimizes the energy for the upper layer UB4 to be processed as the parallax of the upper layer UB4. And the parallax candidate determination means 14 makes the parallax of this upper hierarchy UB4 the parallax of all the pixels contained in the upper hierarchy UB4.

また、メッセージ伝搬手段13および視差候補決定手段14は、処理対象の上位階層UBを移動させながら、前記した処理を繰り返す。具体的には、メッセージ伝搬手段13および視差候補決定手段14は、図8(a)に示す初期位置において、処理対象の上位階層UBの視差を決定する。そして、メッセージ伝搬手段13は、図8(b)に示すように、図8(a)に示す初期位置から処理対象の上位階層UBを水平方向に1つの画素だけ移動させ、この位置での視差を決定する。さらに、メッセージ伝搬手段13は、図8(c)に示すように、図8(b)に示す位置から処理対象の上位階層UBを水平方向に1つの画素だけ移動させ、この位置での視差を決定する。このように、メッセージ伝搬手段13は、処理対象の上位階層UBを初期位置から水平方向に移動させながらの処理を、ε回行う。   In addition, the message propagation unit 13 and the parallax candidate determination unit 14 repeat the above-described processing while moving the upper layer UB to be processed. Specifically, the message propagation unit 13 and the parallax candidate determination unit 14 determine the parallax of the processing target upper layer UB at the initial position illustrated in FIG. Then, as shown in FIG. 8B, the message propagation means 13 moves the upper layer UB to be processed from the initial position shown in FIG. 8A by one pixel in the horizontal direction, and the disparity at this position To decide. Further, as shown in FIG. 8C, the message propagation means 13 moves the processing target upper layer UB by one pixel in the horizontal direction from the position shown in FIG. 8B, and the parallax at this position is changed. decide. Thus, the message propagation means 13 performs the process ε times while moving the upper layer UB to be processed from the initial position in the horizontal direction.

次に、図8(d)に示すように、メッセージ伝搬手段13は、図8(a)に示す初期位置から処理対象の上位階層UBを垂直方向に1つの画素だけ移動させ、この位置での視差を決定する。そして、メッセージ伝搬手段13は、図8(d)の位置から上位階層UBを水平方向に移動させながらそれぞれの位置で視差を決定する。このように、メッセージ伝搬手段13は、ε行の処理が完了するまで視差の決定を繰り返す。その結果、各画素には、処理を繰り返した回数(つまり、ε×ε回、図7の例では9回)だけの視差(視差値)が割り当てられる。従って、視差候補決定手段14は、割り当てられた視差(視差値)のそれぞれを、画素ごとの視差候補として視差決定手段24に出力する。   Next, as shown in FIG. 8D, the message propagation means 13 moves the upper layer UB to be processed by one pixel in the vertical direction from the initial position shown in FIG. Determine the parallax. Then, the message propagation means 13 determines the parallax at each position while moving the upper layer UB in the horizontal direction from the position of FIG. As described above, the message propagation unit 13 repeats the determination of the parallax until the processing of the ε row is completed. As a result, each pixel is assigned a disparity (disparity value) as many times as the number of times the process is repeated (that is, ε × ε times, 9 times in the example of FIG. 7). Accordingly, the parallax candidate determination unit 14 outputs each of the allocated parallaxes (parallax values) to the parallax determination unit 24 as parallax candidates for each pixel.

なお、エネルギー集合の周辺に位置する画素は、中心側に位置する画素よりも視差(視差候補)の数が少ない場合がある。例えば、左上等の4隅に位置する画素は、処理対象の上位階層UBに1回しか含まれないため、視差(視差候補)が1個となる。また、例えば、最上列左側2行目の画素は、処理対象の上位階層UBに2回しか含まれないため、視差(視差候補)が2個となる。   Note that pixels located near the energy set may have a smaller number of parallaxes (parallax candidates) than pixels located on the center side. For example, since the pixels located at the four corners such as the upper left are included only once in the upper hierarchy UB to be processed, there is one parallax (parallax candidate). Further, for example, the pixel in the second row on the left side of the top row is included only twice in the upper hierarchy UB to be processed, and thus there are two parallaxes (parallax candidates).

以下、図3に戻り、視差推定装置1の構成について説明を続ける。
下位階層処理部20は、被写体の輪郭を重視して視差を求めるべく、下位階層(下位ブロック)での視差推定を行うものであり、データ項生成手段(下位階層データ項生成手段)21と、スムーズ項生成手段(下位階層スムーズ項生成手段)22と、メッセージ伝搬手段(下位階層エネルギー伝搬手段)23と、視差決定手段24とを備える。
Hereinafter, returning to FIG. 3, the description of the configuration of the parallax estimation apparatus 1 will be continued.
The lower hierarchy processing unit 20 performs parallax estimation in a lower hierarchy (lower block) in order to obtain parallax with emphasis on the contour of the subject, and includes a data term generation means (lower hierarchy data term generation means) 21, A smooth term generating unit (lower layer smooth term generating unit) 22, a message propagation unit (lower layer energy propagation unit) 23, and a disparity determining unit 24 are provided.

データ項生成手段21は、ステレオ画像(L画像、R画像)が入力されると共に、データ項生成手段11と同様に、入力されたステレオ画像からデータ項を生成する。つまり、データ項生成手段21は、前記した式(5)でステレオ画像の類似度を求め、前記した式(6)で表される誤差関数を用いてデータ項を生成する。このとき、下位階層では被写体の輪郭を重視して視差を求めるため、データ項生成手段21は、前記したデータ項生成手段11よりも、式(6)における重み付けを大きくする(例えば、λ=15)。そして、データ項生成手段21は、生成したデータ項を後記するメッセージ伝搬手段23に出力する。   The data term generation unit 21 receives a stereo image (L image, R image) and generates a data term from the input stereo image in the same manner as the data term generation unit 11. That is, the data term generation means 21 obtains the stereo image similarity by the above-described equation (5), and generates a data term by using the error function represented by the above-described equation (6). At this time, since the parallax is obtained with an emphasis on the contour of the subject in the lower hierarchy, the data term generation unit 21 increases the weighting in the equation (6) more than the data term generation unit 11 (for example, λ = 15). ). Then, the data term generation means 21 outputs the generated data term to the message propagation means 23 described later.

スムーズ項生成手段22は、所定の生成式によってスムーズ項を生成する。つまり、スムーズ項生成手段22は、前記した式(2)で表されるスムーズ関数を用いて、スムーズ項を生成する。そして、スムーズ項生成手段22は、生成したスムーズ項をメッセージ伝搬手段23に出力する。   The smooth term generating means 22 generates a smooth term using a predetermined generation formula. That is, the smooth term generating means 22 generates a smooth term using the smooth function expressed by the above-described equation (2). Then, the smooth term generation unit 22 outputs the generated smooth term to the message propagation unit 23.

メッセージ伝搬手段23は、データ項生成手段21からデータ項が入力され、スムーズ項生成手段22からスムーズ項が入力される。そして、メッセージ伝搬手段23は、これらデータ項およびスムーズ項を含むエネルギーが集合したエネルギー集合を生成する。この場合、メッセージ伝搬手段23は、前記した式(3)を用いて、メッセージを生成する。そして、メッセージ伝搬手段23は、このエネルギー集合内の下位階層間でメッセージを伝搬させて、下位階層におけるエネルギーを更新する。   The message propagation means 23 receives a data term from the data term generation means 21 and receives a smooth term from the smooth term generation means 22. Then, the message propagation means 23 generates an energy set in which energy including these data terms and smooth terms is gathered. In this case, the message propagation means 23 generates a message using the above-described equation (3). Then, the message propagation means 23 propagates the message between the lower layers in the energy set, and updates the energy in the lower layer.

視差決定手段24は、メッセージ伝搬手段23が更新した、下位階層におけるエネルギーが最小となる視差を下位階層の視差として決定する。つまり、視差決定手段24は、前記した式(4)が最小となる視差を下位階層の視差として決定する。そして、視差決定手段24は、視差候補決定手段14から入力された視差候補(上位階層の視差)の中に含まれる下位階層の視差を、画素ごとの視差情報として推定する。   The parallax determination unit 24 determines the parallax with the lowest energy in the lower layer updated by the message propagation unit 23 as the lower layer parallax. That is, the parallax determination unit 24 determines the parallax that minimizes the above-described formula (4) as the parallax of the lower layer. Then, the parallax determination unit 24 estimates the lower layer parallax included in the parallax candidates (upper layer parallax) input from the parallax candidate determination unit 14 as parallax information for each pixel.

以下、図9を参照し、視差情報の推定について説明する。
この図9では、図左側が被写体Obであり、被写体Obの輪郭Egを太線で図示した。従って、図9右側が、被写体Ob以外の背景部分となる。さらに、図9では、画素のそれぞれを破線の枠(四角形)で図示した。
また、上位階層の一辺あたりの画素数が3画素(ε=3)であるとして説明する。言い換えるなら、各画素の視差候補が3×3=9個存在することになる。
Hereinafter, estimation of parallax information will be described with reference to FIG.
In FIG. 9, the left side of the drawing is the subject Ob, and the outline Eg of the subject Ob is shown by a bold line. Accordingly, the right side of FIG. 9 is a background portion other than the subject Ob. Further, in FIG. 9, each of the pixels is illustrated by a broken-line frame (rectangle).
Further, the description will be made assuming that the number of pixels per side of the upper hierarchy is 3 pixels (ε = 3). In other words, there are 3 × 3 = 9 parallax candidates for each pixel.

まず、輪郭Egから離れた被写体Obに対応する画素(下位階層)α1について考える。ここで、この画素α1は、その近隣画素と殆ど同じ視差になることから、視差候補決定手段14が出力する視差候補の種類が少なくなる(又は1種類)。ここで、例えば、視差候補決定手段14が、画素α1の視差候補を「4,4,3,4,4,4,4,3,4」という9個、つまり、「3,4」という2種類の視差候補を出力したとする。このとき、画素α1の視差値が「4」であれば、視差決定手段24は、画素α1の視差情報を2種類の視差候補「3,4」に含まれる「4」とする。   First, consider the pixel (lower layer) α1 corresponding to the subject Ob away from the contour Eg. Here, since this pixel α1 has almost the same parallax as its neighboring pixels, the types of parallax candidates output by the parallax candidate determination means 14 are reduced (or one type). Here, for example, the parallax candidate determining means 14 has nine parallax candidates “4, 4, 3, 4, 4, 4, 4, 3, 4”, that is, 2 “3,4”. Assume that types of parallax candidates are output. At this time, if the parallax value of the pixel α1 is “4”, the parallax determination unit 24 sets the parallax information of the pixel α1 to “4” included in the two types of parallax candidates “3, 4”.

次に、輪郭Egの近くにある被写体Obに対応する画素(下位階層)α2について考える。この画素α2は、被写体Obの視差および背景部分の視差のそれぞれが視差候補となることから、視差候補決定手段14が出力する視差候補の種類が多くなる。ここで、例えば、視差候補決定手段14が、画素α2の視差候補を「1,2,2,1,3,4,4,3,4」という9個、つまり、「1,2,3,4」という4種類の値の視差候補を出力したとする。このとき、画素α2(下位階層)の視差値が「4」であれば、視差決定手段24は、画素α2の視差情報を4種類の視差候補「1,2,3,4」に含まれる「4」とする。   Next, consider the pixel (lower layer) α2 corresponding to the subject Ob near the contour Eg. In this pixel α2, since the parallax of the subject Ob and the parallax of the background portion are parallax candidates, the types of parallax candidates output by the parallax candidate determination unit 14 increase. Here, for example, the parallax candidate determination means 14 determines nine parallax candidates “1, 2, 2, 1, 3, 4, 4, 3, 4” of the pixel α2, that is, “1, 2, 3, Assume that four types of parallax candidates of “4” are output. At this time, if the parallax value of the pixel α2 (lower hierarchy) is “4”, the parallax determining unit 24 includes the parallax information of the pixel α2 included in the four types of parallax candidates “1, 2, 3, 4”. 4 ”.

さらに、輪郭Egの近くにある背景部分に対応する画素(下位階層)α3について考える。ここで、例えば、視差候補決定手段14が、画素α3の視差候補を「1,2,8,1,3,1,1,2,1」という9個の視差候補を出力したとする。通常、背景部分よりも被写体Obが手前側に位置することから、背景部分に対応する画素α3は、その視差値が、被写体Obに対応する画素α1,α2より小さくなる。しかし、この画素α3で、ステレオ画像の輝度差により、視差候補に「8」というノイズが混入したとする。この場合でも、画素α3(下位階層)の視差値が「2」であれば、視差決定手段24は、画素α3の視差情報を視差候補に含まれる「2」とし、「8」というノイズを視差情報とすることがない。このようにして、視差決定手段24は、画素ごとに上位階層の視差推定結果と下位階層の視差推定結果とを統合し、輝度差による視差推定の精度の低下を抑制する。   Further, consider the pixel (lower layer) α3 corresponding to the background portion near the contour Eg. Here, for example, it is assumed that the parallax candidate determination unit 14 outputs nine parallax candidates “1, 2, 8, 1, 3, 1, 1, 2, 1” as the parallax candidates of the pixel α3. Usually, since the subject Ob is located on the near side of the background portion, the parallax value of the pixel α3 corresponding to the background portion is smaller than the pixels α1 and α2 corresponding to the subject Ob. However, it is assumed that noise “8” is mixed in the parallax candidate due to the luminance difference of the stereo image at the pixel α3. Even in this case, if the parallax value of the pixel α3 (lower layer) is “2”, the parallax determination unit 24 sets the parallax information of the pixel α3 to “2” included in the parallax candidate, and converts the noise “8” to the parallax. There is no information. In this way, the parallax determination unit 24 integrates the upper layer parallax estimation result and the lower layer parallax estimation result for each pixel, and suppresses a decrease in the accuracy of the parallax estimation due to the luminance difference.

[視差推定装置の動作]
以下、図10を参照し、視差推定装置1の動作について説明する(適宜図3参照)。
視差推定装置1は、データ項生成手段11によって、上位階層についてデータ項を生成する(ステップS11)。つまり、データ項生成手段11は、入力されたステレオ画像に対してテンプレートマッチングを行い、前記した式(5)でステレオ画像の類似度を求め、前記した式(6)および式(7)で表される誤差関数によりデータ項を生成する。
[Operation of parallax estimation apparatus]
Hereinafter, the operation of the parallax estimation apparatus 1 will be described with reference to FIG. 10 (see FIG. 3 as appropriate).
The disparity estimation apparatus 1 generates a data term for the upper layer by the data term generation unit 11 (step S11). That is, the data term generation unit 11 performs template matching on the input stereo image, obtains the similarity of the stereo image by the above-described equation (5), and expresses by the above-described equations (6) and (7). A data term is generated by the error function.

また、視差推定装置1は、スムーズ項生成手段12によって、上位階層についてスムーズ項を生成する(ステップS12)。つまり、スムーズ項生成手段12は、前記した式(8)で表されるスムーズ関数を用いて、スムーズ項を生成する。   Moreover, the parallax estimation apparatus 1 generates a smooth term for the upper layer by the smooth term generation unit 12 (step S12). That is, the smooth term generation means 12 generates a smooth term using the smooth function expressed by the above-described equation (8).

また、視差推定装置1は、メッセージ伝搬手段13によって、上位階層についてメッセージの伝搬を行う(ステップS13)。つまり、メッセージ伝搬手段13は、エネルギー集合を生成し、このエネルギー集合内における上位階層の移動と、上位階層でのメッセージの伝搬とを繰り返して、上位階層におけるエネルギーを更新する。   Also, the parallax estimation apparatus 1 uses the message propagation unit 13 to propagate the message for the upper layer (step S13). That is, the message propagation unit 13 generates an energy set, and repeats the movement of the upper layer in the energy set and the propagation of the message in the upper layer to update the energy in the upper layer.

また、視差推定装置1は、視差候補決定手段14によって、視差候補(上位階層の視差)を決定する(ステップS14)。つまり、視差候補決定手段14は、上位階層におけるエネルギーが最小となる視差を上位階層の視差として決定し、これを上位階層に含まれる画素に割り当てて画素ごとの視差候補とする。   In addition, the parallax estimation apparatus 1 uses the parallax candidate determination unit 14 to determine parallax candidates (higher-level parallax) (step S14). That is, the parallax candidate determining unit 14 determines the parallax that minimizes the energy in the upper hierarchy as the parallax of the upper hierarchy, assigns this to the pixels included in the upper hierarchy, and sets the parallax candidate for each pixel.

また、視差推定装置1は、データ項生成手段21によって、下位階層についてデータ項を生成する(ステップS15)。つまり、データ項生成手段21は、入力されたステレオ画像に対してテンプレートマッチングを行い、前記した式(5)でステレオ画像の類似度を求め、前記した式(6)で表される誤差関数を用いてデータ項を生成する。   Moreover, the parallax estimation apparatus 1 generates a data term for the lower hierarchy by the data term generation unit 21 (step S15). That is, the data term generation unit 21 performs template matching on the input stereo image, obtains the similarity of the stereo image by the above equation (5), and calculates the error function represented by the above equation (6). To generate a data term.

また、視差推定装置1は、スムーズ項生成手段22によって、下位階層についてスムーズ項を生成する(ステップS16)。つまり、スムーズ項生成手段22は、前記した式(2)で表されるスムーズ関数を用いて、スムーズ項を生成する。   In addition, the parallax estimation apparatus 1 generates a smooth term for the lower hierarchy by the smooth term generation unit 22 (step S16). That is, the smooth term generating means 22 generates a smooth term using the smooth function expressed by the above-described equation (2).

また、視差推定装置1は、メッセージ伝搬手段23によって、下位階層についてメッセージの伝搬を行う(ステップS17)。つまり、メッセージ伝搬手段23は、エネルギー集合を生成し、このエネルギー集合内における下位階層(画素)間でメッセージを伝搬させ、下位階層におけるエネルギーを更新する。   Further, the parallax estimation apparatus 1 performs message propagation for the lower layer by the message propagation unit 23 (step S17). That is, the message propagation unit 23 generates an energy set, propagates a message between lower layers (pixels) in the energy set, and updates energy in the lower layer.

また、視差推定装置1は、視差決定手段24によって、視差を決定する(ステップS18)。つまり、視差決定手段24は、下位階層におけるエネルギーが最小となる視差を下位階層の視差として決定する。そして、視差決定手段24は、視差候補(上位階層の視差)の中に含まれる下位階層の視差を画素ごとの視差情報として決定する。   Moreover, the parallax estimation apparatus 1 determines parallax by the parallax determination means 24 (step S18). That is, the parallax determination unit 24 determines the parallax that minimizes the energy in the lower hierarchy as the parallax in the lower hierarchy. Then, the parallax determining unit 24 determines the lower-layer parallax included in the parallax candidates (upper-layer parallax) as disparity information for each pixel.

以上のように、本発明の第1実施形態に係る視差推定装置1は、正規化相互相関で算出した類似度にコサイン逆関数を適用することで(式(5)および式(6)参照)、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。また、視差推定装置1は、上位階層処理部10によって、式(6)のλ(第1の重み係数)を小さな値として画像全体のおおまかな視差を求める。また、視差推定装置1は、下位階層処理部20によって、式(6)のλ(第2の重み係数)を大きな値として被写体の輪郭を重視した視差を求める。そして、視差推定装置1は、上位階層の視差候補に含まれる下位階層の視差を視差情報として推定することで、上位階層と下位階層との視差推定結果を統合する。これによって、視差推定装置1は、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   As described above, the disparity estimation apparatus 1 according to the first embodiment of the present invention applies the inverse cosine function to the similarity calculated by the normalized cross-correlation (see Expression (5) and Expression (6)). An energy distribution that makes it easy to find the minimum value of energy can be obtained. In addition, the parallax estimation apparatus 1 uses the upper layer processing unit 10 to obtain a rough parallax of the entire image by setting λ (first weighting coefficient) in Expression (6) to a small value. In addition, the parallax estimation apparatus 1 uses the lower layer processing unit 20 to obtain parallax that emphasizes the contour of the subject with λ (second weighting coefficient) in Expression (6) as a large value. Then, the disparity estimation apparatus 1 integrates the disparity estimation results of the upper layer and the lower layer by estimating the lower layer disparity included in the upper layer disparity candidates as disparity information. Thus, even when a luminance difference occurs between stereo images, the parallax estimation device 1 can reduce an error in parallax estimation caused by the luminance difference, and can suppress a decrease in parallax estimation accuracy.

なお、第1実施形態では、データ項およびスムーズ項と記載して説明したが、信頼度伝搬法では、データ項およびスムーズ項のそれぞれをエネルギーと呼ぶ場合がある。この場合でも、本発明の第1実施形態に係る視差推定装置1を適用できることは言うまでもない。   In the first embodiment, the data term and the smooth term are described and described. However, in the reliability propagation method, each of the data term and the smooth term may be referred to as energy. Even in this case, it is needless to say that the parallax estimation apparatus 1 according to the first embodiment of the present invention can be applied.

なお、第1実施形態では、上位階層処理部10と、下位階層処理部20とを備えることとして説明したが、これに限定されない。例えば、本発明は、図3のデータ項生成手段11,21の機能を有する1つの手段によって上位階層および下位階層のデータ項を生成し、スムーズ項生成手段12,22の機能を有する1つの手段によって上位階層および下位階層のスムーズ項を生成してもよい。そして、本発明は、メッセージ伝搬手段13,23の機能を有する1つの手段によって上位階層および下位階層でのメッセージの伝搬を行い、視差候補決定手段14および視差決定手段24の機能を有する1つの手段によって、最終的に画素ごとに視差を決定してもよい。   Although the first embodiment has been described as including the upper layer processing unit 10 and the lower layer processing unit 20, the present invention is not limited to this. For example, in the present invention, one means having the functions of the smooth term generating means 12 and 22 is generated by generating the data terms of the upper and lower layers by one means having the functions of the data term generating means 11 and 21 of FIG. The smooth terms of the upper hierarchy and the lower hierarchy may be generated by. In the present invention, one means having the functions of the message propagation means 13 and 23 propagates messages in the upper and lower layers, and one means having the functions of the disparity candidate determination means 14 and the disparity determination means 24. Thus, the parallax may be finally determined for each pixel.

(第2実施形態)
[視差推定装置の構成]
以下、図3に戻り、本発明の第2実施形態に係る視差推定装置1Aについて、第1実施形態と異なる点を説明する。第2実施形態では、データ項生成手段11およびデータ項生成手段21が用いる誤差関数が、第1実施形態と異なる。
(Second Embodiment)
[Configuration of parallax estimation apparatus]
Hereinafter, returning to FIG. 3, differences from the first embodiment will be described for the disparity estimation apparatus 1 </ b> A according to the second embodiment of the present invention. In the second embodiment, the error function used by the data term generating means 11 and the data term generating means 21 is different from that of the first embodiment.

データ項生成手段11は、前記した式(6),式(7)以外の誤差関数、例えば、式(1)を用いて、データ項を生成する。
データ項生成手段21は、データ項生成手段11と同様、前記した式(6),式(7)以外の誤差関数、例えば、式(1)を用いて、データ項を生成する。
なお、これら以外の各手段は、第1実施形態と同様のものであるため、説明を省略する。
The data term generation unit 11 generates a data term using an error function other than the above formulas (6) and (7), for example, the formula (1).
Similar to the data term generation unit 11, the data term generation unit 21 generates a data term using an error function other than the above formulas (6) and (7), for example, the formula (1).
In addition, since each means other than these is the same as that of 1st Embodiment, description is abbreviate | omitted.

[視差推定装置の動作]
以下、図10を参照し、視差推定装置1Aの動作について、第1実施形態と異なる点を説明する(適宜図3参照)。
[Operation of parallax estimation apparatus]
Hereinafter, with respect to the operation of the parallax estimation apparatus 1A, differences from the first embodiment will be described with reference to FIG. 10 (see FIG. 3 as appropriate).

視差推定装置1Aは、データ項生成手段11によって、例えば、前記した式(1)で表される誤差関数を用いて、上位階層についてデータ項を生成する(ステップS11)。
また、視差推定装置1Aは、データ項生成手段21によって、例えば、前記した式(1)で表される誤差関数を用いて、下位階層についてデータ項を生成する(ステップS15)。
なお、これら以外の各ステップは、第1実施形態と同様のものであるため、説明を省略する。
In the parallax estimation device 1A, the data term generation unit 11 generates a data term for the upper layer by using, for example, the error function expressed by the above-described equation (1) (step S11).
In addition, the parallax estimation device 1A uses the data term generation unit 21 to generate data terms for the lower hierarchy using, for example, the error function expressed by the above-described equation (1) (step S15).
In addition, since each step other than these is the same as that of 1st Embodiment, description is abbreviate | omitted.

以上のように、本発明の第2実施形態に係る視差推定装置1Aは、上位階層の視差候補に含まれる下位階層の視差を視差情報として推定することで、上位階層と下位階層との視差推定結果を統合する。これによって、視差推定装置1Aは、第1実施形態と同様に、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   As described above, the disparity estimation device 1A according to the second embodiment of the present invention estimates the disparity of the lower layer included in the upper layer disparity candidates as the disparity information, so that the disparity estimation between the upper layer and the lower layer is performed. Integrate the results. As a result, the parallax estimation apparatus 1A can reduce the parallax estimation error due to the luminance difference even when a luminance difference occurs between the stereo images, and reduce the parallax estimation accuracy, as in the first embodiment. Can be suppressed.

なお、第2実施形態では、誤差関数が式(1)に限定されない。例えば、本発明の第2実施形態に係る視差推定装置1は、SADによる誤差関数を用いてもよい。   In the second embodiment, the error function is not limited to Expression (1). For example, the parallax estimation apparatus 1 according to the second embodiment of the present invention may use an error function by SAD.

(第3実施形態)
[視差推定装置の構成]
以下、図11を参照し、本発明の第3実施形態に係る視差推定装置1Bについて、第1実施形態と異なる点を説明する。第3実施形態では、視差候補(上位階層の視差)を求めない点が、第1実施形態と異なる。このため、視差推定装置1Bは、図11に示すように、データ項生成手段31と、スムーズ項生成手段32と、メッセージ伝搬手段(エネルギー伝搬手段)33と、視差決定手段34とを備える。
(Third embodiment)
[Configuration of parallax estimation apparatus]
Hereinafter, with reference to FIG. 11, differences from the first embodiment will be described regarding the disparity estimation device 1 </ b> B according to the third embodiment of the present invention. The third embodiment is different from the first embodiment in that a parallax candidate (upper-layer parallax) is not obtained. For this reason, the parallax estimation device 1B includes a data term generation unit 31, a smooth term generation unit 32, a message propagation unit (energy propagation unit) 33, and a parallax determination unit 34, as shown in FIG.

データ項生成手段31は、ステレオ画像(L画像、R画像)が入力されると共に、データ項生成手段21と同様に、入力されたステレオ画像からデータ項を生成する。つまり、データ項生成手段21は、前記した式(5)でステレオ画像の類似度を求め、前記した式(6)で表される誤差関数を用いてデータ項を生成する。そして、データ項生成手段31は、生成したデータ項を後記するメッセージ伝搬手段33に出力する。   The data term generation unit 31 receives a stereo image (L image, R image) and generates a data term from the input stereo image in the same manner as the data term generation unit 21. That is, the data term generation means 21 obtains the stereo image similarity by the above-described equation (5), and generates a data term by using the error function represented by the above-described equation (6). Then, the data term generation unit 31 outputs the generated data term to the message propagation unit 33 described later.

スムーズ項生成手段32は、所定の生成式によってスムーズ項を生成する。つまり、スムーズ項生成手段32は、前記した式(2)で表されるスムーズ関数を用いて、スムーズ項を生成する。そして、スムーズ項生成手段32は、生成したスムーズ項をメッセージ伝搬手段33に出力する。   The smooth term generating means 32 generates a smooth term using a predetermined generation formula. That is, the smooth term generating means 32 generates a smooth term using the smooth function expressed by the above-described equation (2). Then, the smooth term generation unit 32 outputs the generated smooth term to the message propagation unit 33.

メッセージ伝搬手段33は、データ項生成手段31からデータ項が入力され、スムーズ項生成手段32からスムーズ項が入力される。そして、メッセージ伝搬手段33は、これらデータ項およびスムーズ項を含むエネルギーが集合したエネルギー集合を生成する。この場合、メッセージ伝搬手段33は、前記した式(3)を用いて、メッセージを生成する。そして、メッセージ伝搬手段33は、このエネルギー集合内における画素間でメッセージを伝搬させて、画素ごとにエネルギーを更新する。   The message propagation means 33 receives a data term from the data term generation means 31 and receives a smooth term from the smooth term generation means 32. The message propagation means 33 generates an energy set in which the energy including these data terms and smooth terms is gathered. In this case, the message propagation means 33 generates a message using the above-described equation (3). Then, the message propagation unit 33 propagates the message between the pixels in the energy set, and updates the energy for each pixel.

視差決定手段34は、メッセージ伝搬手段33が更新した画素ごとのエネルギーが最小となる視差を画素ごとの視差情報として推定する。つまり、視差決定手段34は、前記した式(4)が最小となる視差を視差情報として推定する。   The parallax determination unit 34 estimates the parallax that minimizes the energy for each pixel updated by the message propagation unit 33 as the parallax information for each pixel. That is, the parallax determination unit 34 estimates the parallax that minimizes the above-described equation (4) as the parallax information.

[視差推定装置の動作]
以下、図2に戻り、視差推定装置1Bの動作について説明する(適宜図11参照)。
まず、視差推定装置1Bは、データ項生成手段31によって、データ項を生成する(ステップS1)。つまり、データ項生成手段31は、入力されたステレオ画像に対してテンプレートマッチングを行い、前記した式(5)でステレオ画像の類似度を求め、前記した式(6)で表される誤差関数を用いてデータ項を生成する。
[Operation of parallax estimation apparatus]
Hereinafter, returning to FIG. 2, the operation of the parallax estimation apparatus 1B will be described (see FIG. 11 as appropriate).
First, the parallax estimation apparatus 1B generates a data term by the data term generation unit 31 (step S1). That is, the data term generating unit 31 performs template matching on the input stereo image, obtains the similarity of the stereo image by the above equation (5), and obtains the error function represented by the above equation (6). To generate a data term.

また、視差推定装置1Bは、スムーズ項生成手段32によって、所定の生成式によってスムーズ項を生成する(ステップS2)。つまり、スムーズ項生成手段32は、前記した式(2)で表されるスムーズ関数を用いて、スムーズ項を生成する。   In addition, the parallax estimation apparatus 1B generates a smooth term using a predetermined generation formula by the smooth term generating unit 32 (step S2). That is, the smooth term generating means 32 generates a smooth term using the smooth function expressed by the above-described equation (2).

また、視差推定装置1Bは、メッセージ伝搬手段33によって、画素間でメッセージの伝搬を行う(ステップS3)。つまり、メッセージ伝搬手段33は、エネルギー集合を生成し、このエネルギー集合内における画素間でメッセージを伝搬させてエネルギーを更新する。   In addition, the parallax estimation apparatus 1B performs message propagation between pixels by the message propagation unit 33 (step S3). That is, the message propagation means 33 generates an energy set and propagates the message between pixels in the energy set to update the energy.

また、視差推定装置1Bは、視差決定手段34によって、視差を決定する(ステップS4)。つまり、視差決定手段34は、エネルギーが最小となる視差を視差情報として推定する。   Moreover, the parallax estimation apparatus 1B determines parallax by the parallax determination means 34 (step S4). That is, the parallax determination unit 34 estimates the parallax with the minimum energy as the parallax information.

以上のように、本発明の第3実施形態に係る視差推定装置1Bは、正規化相互相関で算出した類似度にコサイン逆関数を適用することで(式(5)および式(6)参照)、エネルギーの最小値を見つけやすいエネルギー分布を得ることができる。これによって、視差推定装置1Bは、第1,2実施形態と同様に、ステレオ画像間に輝度差が生じた場合でも、その輝度差に起因する視差推定の誤差を少なくでき、視差の推定精度の低下を抑制することができる。   As described above, the disparity estimation device 1B according to the third embodiment of the present invention applies the inverse cosine function to the similarity calculated by the normalized cross correlation (see Expression (5) and Expression (6)). An energy distribution that makes it easy to find the minimum value of energy can be obtained. Thereby, the parallax estimation device 1B can reduce the parallax estimation error caused by the luminance difference even when a luminance difference occurs between the stereo images, as in the first and second embodiments. The decrease can be suppressed.

なお、各実施形態では、データ項とスムーズ項とを含むエネルギーを最小化する手法の一例として信頼度伝搬法を説明したが、本発明は、これに限定されない。本発明では、この手法として、例えば、ビタビアルゴリズムを用いることもできる。   In each embodiment, although the reliability propagation method has been described as an example of a method for minimizing energy including a data term and a smooth term, the present invention is not limited to this. In the present invention, for example, a Viterbi algorithm can be used as this method.

なお、各実施形態では、本発明に係る視差推定装置を独立した装置として説明したが、本発明では、一般的なコンピュータを、前記した各手段として機能させる視差推定プログラムによっても実現することもできる。この視差推定プログラムは、通信回線を介して配布しても良く、CD−ROMやフラッシュメモリ等の記録媒体に書き込んで配布しても良い。   In each embodiment, the parallax estimation apparatus according to the present invention has been described as an independent apparatus. However, in the present invention, the present invention can also be realized by a parallax estimation program that causes a general computer to function as each unit described above. . The parallax estimation program may be distributed via a communication line, or may be distributed by writing in a recording medium such as a CD-ROM or a flash memory.

以下、実施例として、本発明の効果について説明する。
図3の視差推定装置1を用いて、ステレオ画像の視差推定を行った。また、比較対象として、同一のステレオ画像について、誤差関数に正規化相互相関を用いた従来の信頼度伝搬法により視差推定を行った。そして、それぞれが出力する視差情報から、各画素の視差が大きいほど輝度が高く、視差が小さいほど輝度が低くなる視差画像を生成した。
The effects of the present invention will be described below as examples.
The parallax estimation of the stereo image was performed using the parallax estimation apparatus 1 of FIG. As a comparison object, disparity estimation was performed on the same stereo image by a conventional reliability propagation method using normalized cross-correlation as an error function. Then, from the parallax information output from each, a parallax image is generated in which the luminance is higher as the parallax of each pixel is larger and the luminance is lower as the parallax is smaller.

図12(a)に示すように、従来の信頼度伝搬法は、その視差画像において、被写体の輪郭が不鮮明な箇所が点在する。一方、図12(b)に示すように、本発明は、その視差画像において、被写体の輪郭が鮮明になっている。この結果から、本発明は、従来技術に比べて有効であることが確認できる。   As shown in FIG. 12A, in the conventional reliability propagation method, the parallax image is dotted with portions where the contour of the subject is unclear. On the other hand, as shown in FIG. 12B, in the present invention, the contour of the subject is clear in the parallax image. From this result, it can be confirmed that the present invention is more effective than the prior art.

また、従来の信頼度伝搬法および本発明のそれぞれについて、ステレオ画像間に輝度差が生じた場合、視差の推定精度がどの程度低下するか実験した。具体的には、ステレオ画像の一方(R画像)の輝度を徐々に低下させながら、従来の信頼度伝搬法および本発明のそれぞれで視差推定を行って視差画像を生成した。そして、図13に、輝度を徐々に低下させた際のステレオ画像(L画像、R画像)、従来の信頼度伝搬法による視差画像(従来技術)、および、本発明による視差画像(実施例)を示した。   In addition, for each of the conventional reliability propagation method and the present invention, an experiment was conducted to determine how much the parallax estimation accuracy is reduced when a luminance difference occurs between stereo images. Specifically, parallax images were generated by performing parallax estimation using the conventional reliability propagation method and each of the present invention while gradually decreasing the luminance of one of the stereo images (R image). FIG. 13 shows a stereo image (L image, R image) when the luminance is gradually reduced, a parallax image according to a conventional reliability propagation method (conventional technology), and a parallax image according to the present invention (example). showed that.

なお、図13では、従来技術において、M=1、N=1、λ=0.07、および、T=10とした。ここで、Mは上位階層の縦方向の画素数、Nは上位階層の横方向の画素数である。また、実施例の上位階層において、M=3、N=3,λ=5、ε=3、および、T=10とした。さらに、実施例の下位階層において、M=3、N=3,λ=15、および、T=10とした。   In FIG. 13, in the conventional technique, M = 1, N = 1, λ = 0.07, and T = 10. Here, M is the number of pixels in the vertical direction of the upper layer, and N is the number of pixels in the horizontal direction of the upper layer. In the upper hierarchy of the example, M = 3, N = 3, λ = 5, ε = 3, and T = 10. Furthermore, in the lower hierarchy of the example, M = 3, N = 3, λ = 15, and T = 10.

従来の信頼度伝搬法で輝度を1%低下させた場合、その視差画像は、被写体の輪郭のくずれが目立つようになる。そして、従来の信頼度伝搬法で輝度を3%低下させた場合、その視差画像は、被写体の輪郭が大きく崩れるようになる。さらに、従来の信頼度伝搬法で輝度を10%低下させた場合、その視差画像において、被写体の輪郭を判別することが不可能となる。このことから、従来の信頼度伝搬法では、ステレオ画像間の輝度差が大きくなるほど、視差の推定精度が大きく低下していることがわかる。   When the luminance is reduced by 1% by the conventional reliability propagation method, the outline of the subject becomes conspicuous in the parallax image. When the luminance is reduced by 3% by the conventional reliability propagation method, the outline of the subject in the parallax image is greatly broken. Furthermore, when the luminance is reduced by 10% by the conventional reliability propagation method, it becomes impossible to determine the contour of the subject in the parallax image. From this, it can be seen that in the conventional reliability propagation method, the estimation accuracy of parallax is greatly reduced as the luminance difference between stereo images is increased.

一方、本発明では、輝度を1%から10%までの間で低下させても、被写体の輪郭に大きな崩れは見られない。このことから、本発明は、ステレオ画像間の輝度差が大きくなっても、視差の推定精度の低下を十分に抑制できると考えられる。従って、本発明は、例えば、屋外などの撮影環境が整っていない場所で撮影した多視点カメラ画像にも適用することができる。より具体的には、本発明は、例えば、スポーツのあるシーンを多視点カメラで撮影し、撮影映像に視差推定を行うことで、シーンの3次元立体モデルを生成に応用することができる。   On the other hand, in the present invention, even if the luminance is decreased from 1% to 10%, no major collapse is observed in the contour of the subject. From this, it can be considered that the present invention can sufficiently suppress a decrease in the estimation accuracy of parallax even if the luminance difference between stereo images becomes large. Therefore, the present invention can also be applied to a multi-viewpoint camera image shot in a place where the shooting environment is not prepared such as outdoors. More specifically, the present invention can be applied to generation of a three-dimensional solid model of a scene, for example, by shooting a scene with sports with a multi-viewpoint camera and performing parallax estimation on the captured video.

1 視差推定装置
1A 視差推定装置
1B 視差推定装置
10 上位階層処理部
11 データ項生成手段(上位階層データ項生成手段)
12 スムーズ項生成手段(上位階層スムーズ項生成手段)
13 メッセージ伝搬手段(上位階層エネルギー伝搬手段)
14 視差候補決定手段
20 下位階層処理部
21 データ項生成手段(下位階層データ項生成手段)
22 スムーズ項生成手段(下位階層スムーズ項生成手段)
23 メッセージ伝搬手段(下位階層エネルギー伝搬手段)
24 視差決定手段
31 データ項生成手段
32 スムーズ項生成手段
33 メッセージ伝搬手段(エネルギー伝搬手段)
34 視差決定手段
DESCRIPTION OF SYMBOLS 1 Parallax estimation apparatus 1A Parallax estimation apparatus 1B Parallax estimation apparatus 10 Upper hierarchy process part 11 Data term production | generation means (upper hierarchy data term production | generation means)
12 Smooth term generation means (upper layer smooth term generation means)
13 Message propagation means (upper layer energy propagation means)
14 Parallax candidate determining means 20 Lower hierarchy processing unit 21 Data term generating means (lower hierarchy data term generating means)
22 Smooth term generation means (lower hierarchy smooth term generation means)
23 Message propagation means (lower-layer energy propagation means)
24 Parallax determining means 31 Data term generating means 32 Smooth term generating means 33 Message propagation means (energy propagation means)
34 Parallax determining means

Claims (8)

ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、
前記ステレオ画像が入力されると共に、正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する上位階層データ項生成手段と、
所定の生成式によってスムーズ項を生成する上位階層スムーズ項生成手段と、
前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する上位階層エネルギー伝搬手段と、
前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する視差候補決定手段と、
前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する下位階層データ項生成手段と、
所定の生成式によってスムーズ項を生成する下位階層スムーズ項生成手段と、
前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する下位階層エネルギー伝搬手段と、
前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する視差決定手段と、
を備えることを特徴とする視差推定装置。
A parallax estimation device that determines parallax information indicating parallax for each pixel of a stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. And
Higher layer data term generating means for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by normalized cross correlation while the stereo image is input When,
Upper hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which energy for each pixel including the data term generated by the upper hierarchy data term generation means and the smooth term generated by the upper hierarchy smooth term generation means is generated, and the energy set is divided into a plurality of pixels. Higher layer energy propagation in which energy is updated for each block by dividing the block to be configured and repeating the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed Means,
The parallax that minimizes the energy of each block updated by the upper layer energy propagation means is determined as the parallax of the block, and the parallax of the block is assigned to the pixels included in the block and output as parallax candidates for the pixels. Parallax candidate determination means;
Low-level data term generation for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by the normalized cross-correlation while the stereo image is input Means,
Lower-level smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which the energy of each pixel is collected including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit is generated, and between the pixels in the energy set A lower layer energy propagation means for propagating energy generated by a predetermined generation formula and updating the energy for each pixel;
Disparity determining means for determining, as the disparity information, a disparity in which the energy for each pixel updated by the lower-layer energy propagation means is minimized, and included in the disparity candidate input from the disparity candidate determining means;
A parallax estimation apparatus comprising:
前記上位階層データ項生成手段は、予め設定した第1の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成し、
前記下位階層データ項生成手段は、前記第1の重み係数より大きな第2の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成することを特徴とする請求項1に記載の視差推定装置。
The upper hierarchical data term generating means generates the data term from the input stereo image using the error function further multiplied by a preset first weighting factor,
The lower hierarchical data term generating means generates the data term from the input stereo image using the error function further multiplied by a second weighting factor larger than the first weighting factor. The parallax estimation device according to claim 1.
ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、
前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する上位階層データ項生成手段と、
所定の生成式によってスムーズ項を生成する上位階層スムーズ項生成手段と、
前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する上位階層エネルギー伝搬手段と、
前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する視差候補決定手段と、
前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する下位階層データ項生成手段と、
所定の生成式によってスムーズ項を生成する下位階層スムーズ項生成手段と、
前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する下位階層エネルギー伝搬手段と、
前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する視差決定手段と、
を備えることを特徴とする視差推定装置。
A parallax estimation device that determines parallax information indicating parallax for each pixel of a stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. And
The stereo image is input, and an upper layer data term generating unit that generates a data term using an error function from the input stereo image;
Upper hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which energy for each pixel including the data term generated by the upper hierarchy data term generation means and the smooth term generated by the upper hierarchy smooth term generation means is generated, and the energy set is divided into a plurality of pixels. Higher layer energy propagation in which energy is updated for each block by dividing the block to be configured and repeating the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed Means,
The parallax that minimizes the energy of each block updated by the upper layer energy propagation means is determined as the parallax of the block, and the parallax of the block is assigned to the pixels included in the block and output as parallax candidates for the pixels. Parallax candidate determination means;
The stereo image is input, and a lower-layer data term generating unit that generates a data term using an error function from the input stereo image;
Lower-level smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which the energy of each pixel is collected including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit is generated, and between the pixels in the energy set A lower layer energy propagation means for propagating energy generated by a predetermined generation formula and updating the energy for each pixel;
Disparity determining means for determining, as the disparity information, a disparity in which the energy for each pixel updated by the lower-layer energy propagation means is minimized, and included in the disparity candidate input from the disparity candidate determining means;
A parallax estimation apparatus comprising:
ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定する視差推定装置であって、
前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成するデータ項生成手段と、
所定の生成式によってスムーズ項を生成するスムーズ項生成手段と、
前記データ項生成手段が生成したデータ項と前記スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新するエネルギー伝搬手段と、
前記エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差を前記視差情報として決定する視差決定手段と、
を備えることを特徴とする視差推定装置。
A parallax estimation device that determines parallax information indicating parallax for each pixel of a stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating disparity continuity. And
Data term generating means for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by the normalized cross correlation while the stereo image is input ,
Smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which the energy for each pixel is collected including the data term generated by the data term generation unit and the smooth term generated by the smooth term generation unit is generated, and predetermined generation is performed between pixels in the energy set. Energy propagation means for propagating energy generated by the equation and updating the energy for each pixel;
Parallax determining means for determining, as the parallax information, a parallax that minimizes the energy for each pixel updated by the energy propagation means;
A parallax estimation apparatus comprising:
ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定するために、コンピュータを、
前記ステレオ画像が入力されると共に、正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する上位階層データ項生成手段、
所定の生成式によってスムーズ項を生成する上位階層スムーズ項生成手段、
前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する上位階層エネルギー伝搬手段、
前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する視差候補決定手段、
前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成する下位階層データ項生成手段、
所定の生成式によってスムーズ項を生成する下位階層スムーズ項生成手段、
前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとのエネルギーを更新する下位階層エネルギー伝搬手段、
前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する視差決定手段、
として機能させるための視差推定プログラム。
In order to determine parallax information indicating parallax for each pixel of the stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating continuity of parallax, ,
Higher layer data term generating means for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by normalized cross correlation while the stereo image is input ,
Upper hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula,
An energy set in which energy for each pixel including the data term generated by the upper hierarchy data term generation means and the smooth term generated by the upper hierarchy smooth term generation means is generated, and the energy set is divided into a plurality of pixels. Higher layer energy propagation in which energy is updated for each block by dividing the block to be configured and repeating the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed means,
The parallax that minimizes the energy of each block updated by the upper layer energy propagation means is determined as the parallax of the block, and the parallax of the block is assigned to the pixels included in the block and output as parallax candidates for the pixels. Parallax candidate determination means,
Low-level data term generation for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by the normalized cross-correlation while the stereo image is input means,
Lower hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula,
An energy set in which the energy of each pixel is collected including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit is generated, and between the pixels in the energy set A lower-layer energy propagation means for propagating energy generated by a predetermined generation formula and updating energy for each pixel;
Disparity determining means for determining, as the disparity information, a disparity in which the energy for each pixel updated by the lower-layer energy propagation means is minimized, and included in the disparity candidate input from the disparity candidate determining means;
As a parallax estimation program.
前記上位階層データ項生成手段は、予め設定した第1の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成し、
前記下位階層データ項生成手段は、前記第1の重み係数より大きな第2の重み係数をさらに乗じた前記誤差関数を用いて、前記入力されたステレオ画像から前記データ項を生成することを特徴とする請求項5に記載の視差推定プログラム。
The upper hierarchical data term generating means generates the data term from the input stereo image using the error function further multiplied by a preset first weighting factor,
The lower hierarchical data term generating means generates the data term from the input stereo image using the error function further multiplied by a second weighting factor larger than the first weighting factor. The parallax estimation program according to claim 5.
ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定するために、コンピュータを、
前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する上位階層データ項生成手段、
所定の生成式によってスムーズ項を生成する上位階層スムーズ項生成手段、
前記上位階層データ項生成手段が生成したデータ項と前記上位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合を複数の画素で構成されるブロックに分割し、処理対象の前記ブロックの移動と、当該処理対象のブロックに対する所定の生成式によって生成したエネルギーの伝搬とを繰り返して、前記ブロックごとにエネルギーを更新する上位階層エネルギー伝搬手段、
前記上位階層エネルギー伝搬手段が更新したブロックごとのエネルギーが最小となる視差を前記ブロックの視差として決定し、当該ブロックの視差を当該ブロックに含まれる画素に割り当てて当該画素ごとの視差候補として出力する視差候補決定手段、
前記ステレオ画像が入力されると共に、入力された前記ステレオ画像から誤差関数を用いてデータ項を生成する下位階層データ項生成手段、
所定の生成式によってスムーズ項を生成する下位階層スムーズ項生成手段、
前記下位階層データ項生成手段が生成したデータ項と前記下位階層スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとにエネルギーを更新する下位階層エネルギー伝搬手段、
前記下位階層エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差であって、前記視差候補決定手段から入力された視差候補に含まれる視差を前記視差情報として決定する視差決定手段、
として機能させるための視差推定プログラム。
In order to determine parallax information indicating parallax for each pixel of the stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating continuity of parallax, ,
Higher layer data term generating means for generating a data term using an error function from the inputted stereo image while the stereo image is input;
Upper hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula,
An energy set in which energy for each pixel including the data term generated by the upper hierarchy data term generation means and the smooth term generated by the upper hierarchy smooth term generation means is generated, and the energy set is divided into a plurality of pixels. Higher layer energy propagation in which energy is updated for each block by dividing the block to be configured and repeating the movement of the block to be processed and the propagation of energy generated by a predetermined generation formula for the block to be processed means,
The parallax that minimizes the energy of each block updated by the upper layer energy propagation means is determined as the parallax of the block, and the parallax of the block is assigned to the pixels included in the block and output as parallax candidates for the pixels. Parallax candidate determination means,
The lower hierarchy data term generating means for generating a data term from the input stereo image using an error function while the stereo image is input;
Lower hierarchy smooth term generating means for generating a smooth term by a predetermined generation formula,
An energy set in which the energy of each pixel is collected including the data term generated by the lower layer data term generation unit and the smooth term generated by the lower layer smooth term generation unit is generated, and between the pixels in the energy set A lower layer energy propagation means for propagating energy generated by a predetermined generation formula and updating energy for each pixel;
Disparity determining means for determining, as the disparity information, a disparity in which the energy for each pixel updated by the lower-layer energy propagation means is minimized, and included in the disparity candidate input from the disparity candidate determining means;
As a parallax estimation program.
ステレオ画像間の類似度を示すデータ項と視差の連続性を示すスムーズ項とを含むエネルギーを最小化する手法により、前記ステレオ画像の画素ごとの視差を示す視差情報を決定するために、コンピュータを、
前記ステレオ画像が入力されると共に、前記正規化相互相関で算出した前記類似度にコサイン逆関数を適用した誤差関数を用いて、入力された前記ステレオ画像からデータ項を生成するデータ項生成手段、
所定の生成式によってスムーズ項を生成するスムーズ項生成手段、
前記データ項生成手段が生成したデータ項と前記スムーズ項生成手段が生成したスムーズ項とを含む前記画素ごとのエネルギーが集合したエネルギー集合を生成し、当該エネルギー集合内における画素間で、所定の生成式によって生成したエネルギーを伝搬して、前記画素ごとのエネルギーを更新するエネルギー伝搬手段、
前記エネルギー伝搬手段が更新した画素ごとのエネルギーが最小となる視差を前記視差情報として決定する視差決定手段、
として機能させるための視差推定プログラム。
In order to determine parallax information indicating parallax for each pixel of the stereo image by a method of minimizing energy including a data term indicating similarity between stereo images and a smooth term indicating continuity of parallax, ,
A data term generating means for generating a data term from the input stereo image using an error function obtained by applying a cosine inverse function to the similarity calculated by the normalized cross correlation while the stereo image is input;
Smooth term generating means for generating a smooth term by a predetermined generation formula;
An energy set in which the energy for each pixel is collected including the data term generated by the data term generation unit and the smooth term generated by the smooth term generation unit is generated, and predetermined generation is performed between pixels in the energy set. Energy propagation means for propagating the energy generated by the equation and updating the energy for each pixel;
Parallax determination means for determining, as the parallax information, a parallax that minimizes the energy for each pixel updated by the energy propagation means;
As a parallax estimation program.
JP2010042109A 2010-02-26 2010-02-26 Disparity estimation apparatus and program thereof Expired - Fee Related JP5200042B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010042109A JP5200042B2 (en) 2010-02-26 2010-02-26 Disparity estimation apparatus and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010042109A JP5200042B2 (en) 2010-02-26 2010-02-26 Disparity estimation apparatus and program thereof

Publications (2)

Publication Number Publication Date
JP2011180675A JP2011180675A (en) 2011-09-15
JP5200042B2 true JP5200042B2 (en) 2013-05-15

Family

ID=44692143

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010042109A Expired - Fee Related JP5200042B2 (en) 2010-02-26 2010-02-26 Disparity estimation apparatus and program thereof

Country Status (1)

Country Link
JP (1) JP5200042B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5764027B2 (en) * 2011-09-30 2015-08-12 日本放送協会 Distance index information estimation apparatus and program thereof
JP2013076621A (en) * 2011-09-30 2013-04-25 Nippon Hoso Kyokai <Nhk> Distance index information estimation device and program thereof
JP5764028B2 (en) * 2011-09-30 2015-08-12 日本放送協会 Distance index information estimation apparatus and program thereof
JP6342128B2 (en) 2013-08-23 2018-06-13 キヤノンメディカルシステムズ株式会社 Image processing apparatus, method, program, and stereoscopic image display apparatus
JP6337446B2 (en) * 2013-11-18 2018-06-06 株式会社リコー Image processing apparatus and method, and control program for image processing apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006513502A (en) * 2003-01-17 2006-04-20 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ How to get a complete depth map
US20100220932A1 (en) * 2007-06-20 2010-09-02 Dong-Qing Zhang System and method for stereo matching of images
JP2009026250A (en) * 2007-07-23 2009-02-05 Panasonic Corp Plane component detector, ground plane detector, and obstacle detector

Also Published As

Publication number Publication date
JP2011180675A (en) 2011-09-15

Similar Documents

Publication Publication Date Title
JP5156837B2 (en) System and method for depth map extraction using region-based filtering
JP5153940B2 (en) System and method for image depth extraction using motion compensation
EP2992508B1 (en) Diminished and mediated reality effects from reconstruction
JP7403528B2 (en) Method and system for reconstructing color and depth information of a scene
JP4740657B2 (en) Stereo 3D reconstruction system and process based on color segmentation
JP5425897B2 (en) Image depth extraction system and method with forward and backward depth prediction
US9041819B2 (en) Method for stabilizing a digital video
US8611642B2 (en) Forming a steroscopic image using range map
JP2006244387A (en) Three-dimensional model generating device, and its method and program
JP2018151689A (en) Image processing apparatus, control method thereof, program and storage medium
JP5200042B2 (en) Disparity estimation apparatus and program thereof
JP6054771B2 (en) Background model construction apparatus, background model construction method, and program
JP2010121945A (en) Three-dimensional shape forming system
KR20210089737A (en) Image depth estimation method and apparatus, electronic device, storage medium
KR101875532B1 (en) Apparatus and method for hierarchical stereo matching
JP2013185905A (en) Information processing apparatus, method, and program
KR101088144B1 (en) Method for Measurement of Distance between Object and Camera using Stereo Camera
JP7159198B2 (en) Apparatus and method for processing depth maps
KR20200057612A (en) Method and apparatus for generating virtual viewpoint image
JP2010506482A (en) Method and filter for parallax recovery of video stream
EP3906530B1 (en) Method for 3d reconstruction of an object
CN107845108B (en) Optical flow value calculation method and device and electronic equipment
JP2013076621A (en) Distance index information estimation device and program thereof
JP2017199285A (en) Information processor, information processing method, program
JP5764028B2 (en) Distance index information estimation apparatus and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120321

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130208

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160215

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5200042

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees